From bc71575106db97b454d7ebc07822022624aa5bd5 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 26 Oct 2018 11:14:15 -0700 Subject: [PATCH 01/54] Skeleton for implementing with a new tranformer --- .../DnnImageFeaturizerTransform.cs | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs new file mode 100644 index 0000000000..ca278f9b83 --- /dev/null +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -0,0 +1,74 @@ +using Microsoft.ML.Core.Data; +using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Model; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.ML.Transforms +{ + public sealed class DnnImageFeaturizerTransform : OneToOneTransformerBase + { + public DnnImageFeaturizerTransform(IHost host, ModelLoadContext ctx) : base(host, ctx) + { + } + + public override void Save(ModelSaveContext ctx) + { + throw new NotImplementedException(); + } + + protected override IRowMapper MakeRowMapper(ISchema schema) + { + throw new NotImplementedException(); + } + + private sealed class Mapper : IRowMapper + { + public Delegate[] CreateGetters(IRow input, Func activeOutput, out Action disposer) + { + throw new NotImplementedException(); + } + + public Func GetDependencies(Func activeOutput) + { + throw new NotImplementedException(); + } + + public Schema.Column[] GetOutputColumns() + { + throw new NotImplementedException(); + } + + public void Save(ModelSaveContext ctx) + { + throw new NotImplementedException(); + } + } + } + + public sealed class DnnImageFeaturizerEstimator : TrivialEstimator + { + public enum DnnModelType : byte + { + Resnet18 = 10, + Resnet50 = 20, + Resnet101 = 30, + Alexnet = 100 + }; + + public DnnImageFeaturizerEstimator(IHostEnvironment env, DnnModelType model, string input, string output) + { + EstimatorChain + } + + /*public DnnImageFeaturizerEstimator(IHostEnvironment env, DnnImageFeaturizerTransform transformer) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(OnnxTransform)), transformer) + { + }*/ + public override SchemaShape GetOutputSchema(SchemaShape inputSchema) + { + throw new NotImplementedException(); + } + } +} From 32dc90c2de01ccd2ea003358b2a5023dc512054a Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 26 Oct 2018 14:04:11 -0700 Subject: [PATCH 02/54] Approach using a chain of transformers --- .../DnnImageFeaturizerTransform.cs | 83 +++++++++++-------- 1 file changed, 49 insertions(+), 34 deletions(-) diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index ca278f9b83..8fe9bd4b99 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -4,52 +4,64 @@ using Microsoft.ML.Runtime.Model; using System; using System.Collections.Generic; +using System.Linq; using System.Text; namespace Microsoft.ML.Transforms { - public sealed class DnnImageFeaturizerTransform : OneToOneTransformerBase + public sealed class DnnImageFeaturizerEstimator : TrivialEstimator> { - public DnnImageFeaturizerTransform(IHost host, ModelLoadContext ctx) : base(host, ctx) + private OnnxTransform _prepTransform; + private OnnxTransform _mainTransform; + + public DnnImageFeaturizerEstimator(IHostEnvironment env, DnnModelType model, string input, string output) + : this(env, CreateChain(env, model, input, output)) { } - public override void Save(ModelSaveContext ctx) + public DnnImageFeaturizerEstimator(IHostEnvironment env, TransformerChain transformer) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(TransformerChain)), transformer) { - throw new NotImplementedException(); } - protected override IRowMapper MakeRowMapper(ISchema schema) + private TransformerChain CreateChain(IHostEnvironment env, DnnModelType model, string input, string output) + { + _modelsPreprocess.TryGetValue(model, out string prepModel); + _modelsMain.TryGetValue(model, out string mainModel); + string tempCol = "onnxDnnPrep"; + _prepTransform = new OnnxTransform(env, prepModel, input, tempCol); + _mainTransform = new OnnxTransform(env, mainModel, tempCol, output); + return new TransformerChain(_prepTransform, _mainTransform); + } + + public override SchemaShape GetOutputSchema(SchemaShape inputSchema) { throw new NotImplementedException(); } - private sealed class Mapper : IRowMapper + private SchemaShape GetIntermediateSchema(SchemaShape inputSchema, OnnxTransform transformer) { - public Delegate[] CreateGetters(IRow input, Func activeOutput, out Action disposer) - { - throw new NotImplementedException(); - } + Host.CheckValue(inputSchema, nameof(inputSchema)); + var result = inputSchema.Columns.ToDictionary(x => x.Name); + var resultDic = inputSchema.Columns.ToDictionary(x => x.Name); - public Func GetDependencies(Func activeOutput) - { - throw new NotImplementedException(); - } + var input = transformer.Input; + if (!inputSchema.TryFindColumn(input, out var col)) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input); + if (!(col.Kind == SchemaShape.Column.VectorKind.VariableVector || col.Kind == SchemaShape.Column.VectorKind.Vector)) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input, nameof(VectorType), col.GetTypeString()); + var inputNodeInfo = transformer.Model.ModelInfo.InputsInfo[0]; + var expectedType = OnnxUtils.OnnxToMlNetType(inputNodeInfo.Type); + if (col.ItemType != expectedType) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input, expectedType.ToString(), col.ItemType.ToString()); - public Schema.Column[] GetOutputColumns() - { - throw new NotImplementedException(); - } + resultDic[transformer.Output] = new SchemaShape.Column(transformer.Output, + transformer.OutputType.IsKnownSizeVector ? SchemaShape.Column.VectorKind.Vector + : SchemaShape.Column.VectorKind.VariableVector, NumberType.R4, false); - public void Save(ModelSaveContext ctx) - { - throw new NotImplementedException(); - } + return new SchemaShape(resultDic.Values); } - } - public sealed class DnnImageFeaturizerEstimator : TrivialEstimator - { public enum DnnModelType : byte { Resnet18 = 10, @@ -58,17 +70,20 @@ public enum DnnModelType : byte Alexnet = 100 }; - public DnnImageFeaturizerEstimator(IHostEnvironment env, DnnModelType model, string input, string output) + private static Dictionary _modelsPreprocess = new Dictionary() { - EstimatorChain - } + { DnnModelType.Resnet18, "glove.6B.50d.txt" }, + { DnnModelType.Resnet50, "glove.6B.100d.txt" }, + { DnnModelType.Resnet101, "glove.6B.200d.txt" }, + { DnnModelType.Alexnet, "glove.6B.300d.txt" }, + }; - /*public DnnImageFeaturizerEstimator(IHostEnvironment env, DnnImageFeaturizerTransform transformer) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(OnnxTransform)), transformer) - { - }*/ - public override SchemaShape GetOutputSchema(SchemaShape inputSchema) + private static Dictionary _modelsMain = new Dictionary() { - throw new NotImplementedException(); - } + { DnnModelType.Resnet18, "glove.6B.50d.txt" }, + { DnnModelType.Resnet50, "glove.6B.100d.txt" }, + { DnnModelType.Resnet101, "glove.6B.200d.txt" }, + { DnnModelType.Alexnet, "glove.6B.300d.txt" }, + }; } } From 38fecff3c23371df1277eb197cde2f9be2f333c0 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 26 Oct 2018 16:48:31 -0700 Subject: [PATCH 03/54] Reworked to use estimator chain --- .../DnnImageFeaturizerTransform.cs | 69 ++++++------------- 1 file changed, 21 insertions(+), 48 deletions(-) diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index 8fe9bd4b99..c47613fe47 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -9,57 +9,20 @@ namespace Microsoft.ML.Transforms { - public sealed class DnnImageFeaturizerEstimator : TrivialEstimator> + public sealed class DnnImageFeaturizerEstimator : IEstimator> { - private OnnxTransform _prepTransform; - private OnnxTransform _mainTransform; + private readonly EstimatorChain _modelChain; - public DnnImageFeaturizerEstimator(IHostEnvironment env, DnnModelType model, string input, string output) - : this(env, CreateChain(env, model, input, output)) - { - } - - public DnnImageFeaturizerEstimator(IHostEnvironment env, TransformerChain transformer) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(TransformerChain)), transformer) - { - } - - private TransformerChain CreateChain(IHostEnvironment env, DnnModelType model, string input, string output) + public DnnImageFeaturizerEstimator(IHostEnvironment env, string input, string output, DnnModelType model) { + _modelChain = new EstimatorChain(); _modelsPreprocess.TryGetValue(model, out string prepModel); _modelsMain.TryGetValue(model, out string mainModel); - string tempCol = "onnxDnnPrep"; - _prepTransform = new OnnxTransform(env, prepModel, input, tempCol); - _mainTransform = new OnnxTransform(env, mainModel, tempCol, output); - return new TransformerChain(_prepTransform, _mainTransform); - } - - public override SchemaShape GetOutputSchema(SchemaShape inputSchema) - { - throw new NotImplementedException(); - } - - private SchemaShape GetIntermediateSchema(SchemaShape inputSchema, OnnxTransform transformer) - { - Host.CheckValue(inputSchema, nameof(inputSchema)); - var result = inputSchema.Columns.ToDictionary(x => x.Name); - var resultDic = inputSchema.Columns.ToDictionary(x => x.Name); - - var input = transformer.Input; - if (!inputSchema.TryFindColumn(input, out var col)) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input); - if (!(col.Kind == SchemaShape.Column.VectorKind.VariableVector || col.Kind == SchemaShape.Column.VectorKind.Vector)) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input, nameof(VectorType), col.GetTypeString()); - var inputNodeInfo = transformer.Model.ModelInfo.InputsInfo[0]; - var expectedType = OnnxUtils.OnnxToMlNetType(inputNodeInfo.Type); - if (col.ItemType != expectedType) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input, expectedType.ToString(), col.ItemType.ToString()); - - resultDic[transformer.Output] = new SchemaShape.Column(transformer.Output, - transformer.OutputType.IsKnownSizeVector ? SchemaShape.Column.VectorKind.Vector - : SchemaShape.Column.VectorKind.VariableVector, NumberType.R4, false); - - return new SchemaShape(resultDic.Values); + var tempCol = "onnxDnnPrep"; + var prepEstimator = new OnnxEstimator(env, prepModel, input, tempCol); + var mainEstimator = new OnnxEstimator(env, mainModel, tempCol, output); + _modelChain.Append(prepEstimator); + _modelChain.Append(mainEstimator); } public enum DnnModelType : byte @@ -72,7 +35,7 @@ public enum DnnModelType : byte private static Dictionary _modelsPreprocess = new Dictionary() { - { DnnModelType.Resnet18, "glove.6B.50d.txt" }, + { DnnModelType.Resnet18, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\Prep\\resnetPreprocess.onnx" }, { DnnModelType.Resnet50, "glove.6B.100d.txt" }, { DnnModelType.Resnet101, "glove.6B.200d.txt" }, { DnnModelType.Alexnet, "glove.6B.300d.txt" }, @@ -80,10 +43,20 @@ public enum DnnModelType : byte private static Dictionary _modelsMain = new Dictionary() { - { DnnModelType.Resnet18, "glove.6B.50d.txt" }, + { DnnModelType.Resnet18, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\ResNet18\\resnet18.onnx" }, { DnnModelType.Resnet50, "glove.6B.100d.txt" }, { DnnModelType.Resnet101, "glove.6B.200d.txt" }, { DnnModelType.Alexnet, "glove.6B.300d.txt" }, }; + + public TransformerChain Fit(IDataView input) + { + return _modelChain.Fit(input); + } + + public SchemaShape GetOutputSchema(SchemaShape inputSchema) + { + return _modelChain.GetOutputSchema(inputSchema); + } } } From 5e1faa5d4008916e36d9208dc703e6b3207182c9 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 26 Oct 2018 17:51:39 -0700 Subject: [PATCH 04/54] Add basic testing --- .../OnnxTransformTests.cs | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs b/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs index a95d5c15c8..49ba67900b 100644 --- a/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs +++ b/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs @@ -29,6 +29,11 @@ private class TestData [VectorType(inputSize)] public float[] data_0; } + private class ImageData + { + [VectorType(3 * 224 * 224)] + public float[] data_0; + } private class TestDataSize { [VectorType(2)] @@ -53,10 +58,41 @@ private float[] getSampleArrayData() return samplevector; } + private float[] getImagePixelData() + { + var samplevector = new float[3 * 224 * 224]; + for (int i = 0; i < 3 * 224 * 224; i++) + samplevector[i] = 40.0f; + return samplevector; + } + public OnnxTransformTests(ITestOutputHelper output) : base(output) { } + [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] + void TestDnnImageFeaturizer() + { + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + return; + + var samplevector = getImagePixelData(); + + var dataView = ComponentCreation.CreateDataView(Env, + new ImageData[] { + new ImageData() + { + data_0 = samplevector + }, + }); + + var pipe = new DnnImageFeaturizerEstimator(Env, "data_0", "dnnfeatures_1", DnnImageFeaturizerEstimator.DnnModelType.Resnet18); + TestEstimatorCore(pipe, dataView); + } + + + + [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 fails with "An attempt was made to load a program with an incorrect format." void TestSimpleCase() { From 3c3aa2ae548f5a18cd69f8b60f0ed28f4bafeb2d Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Mon, 29 Oct 2018 15:59:12 -0700 Subject: [PATCH 05/54] Reworked to use extension methods --- src/Microsoft.ML.OnnxTransform/AlexNet.cs | 25 +++++++++ .../DnnImageFeaturizerTransform.cs | 55 +++++++------------ src/Microsoft.ML.OnnxTransform/ResNet101.cs | 25 +++++++++ src/Microsoft.ML.OnnxTransform/ResNet18.cs | 25 +++++++++ src/Microsoft.ML.OnnxTransform/ResNet50.cs | 25 +++++++++ .../OnnxTransformTests.cs | 2 +- 6 files changed, 122 insertions(+), 35 deletions(-) create mode 100644 src/Microsoft.ML.OnnxTransform/AlexNet.cs create mode 100644 src/Microsoft.ML.OnnxTransform/ResNet101.cs create mode 100644 src/Microsoft.ML.OnnxTransform/ResNet18.cs create mode 100644 src/Microsoft.ML.OnnxTransform/ResNet50.cs diff --git a/src/Microsoft.ML.OnnxTransform/AlexNet.cs b/src/Microsoft.ML.OnnxTransform/AlexNet.cs new file mode 100644 index 0000000000..0b5deec4c0 --- /dev/null +++ b/src/Microsoft.ML.OnnxTransform/AlexNet.cs @@ -0,0 +1,25 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Data; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.ML.Transforms +{ + public partial class DnnImageModelSelector + { + public EstimatorChain AlexNet() + { + var modelChain = new EstimatorChain(); + var tempCol = "onnxDnnPrep"; + var prepEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\AlexPrep\\alexnetPreprocess.onnx", _input, tempCol); + var mainEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\AlexNet\\alexnet.onnx", tempCol, _output); + modelChain.Append(prepEstimator); + modelChain.Append(mainEstimator); + return modelChain; + } + } +} \ No newline at end of file diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index c47613fe47..170a0b065c 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -1,4 +1,8 @@ -using Microsoft.ML.Core.Data; +// Licensed to the .NET Foundation under one or more agreements. +// 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.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Model; @@ -13,42 +17,11 @@ public sealed class DnnImageFeaturizerEstimator : IEstimator _modelChain; - public DnnImageFeaturizerEstimator(IHostEnvironment env, string input, string output, DnnModelType model) + public DnnImageFeaturizerEstimator(IHostEnvironment env, string input, string output, Func> model) { - _modelChain = new EstimatorChain(); - _modelsPreprocess.TryGetValue(model, out string prepModel); - _modelsMain.TryGetValue(model, out string mainModel); - var tempCol = "onnxDnnPrep"; - var prepEstimator = new OnnxEstimator(env, prepModel, input, tempCol); - var mainEstimator = new OnnxEstimator(env, mainModel, tempCol, output); - _modelChain.Append(prepEstimator); - _modelChain.Append(mainEstimator); + _modelChain = model(new DnnImageModelSelector(env, input, output)); } - public enum DnnModelType : byte - { - Resnet18 = 10, - Resnet50 = 20, - Resnet101 = 30, - Alexnet = 100 - }; - - private static Dictionary _modelsPreprocess = new Dictionary() - { - { DnnModelType.Resnet18, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\Prep\\resnetPreprocess.onnx" }, - { DnnModelType.Resnet50, "glove.6B.100d.txt" }, - { DnnModelType.Resnet101, "glove.6B.200d.txt" }, - { DnnModelType.Alexnet, "glove.6B.300d.txt" }, - }; - - private static Dictionary _modelsMain = new Dictionary() - { - { DnnModelType.Resnet18, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\ResNet18\\resnet18.onnx" }, - { DnnModelType.Resnet50, "glove.6B.100d.txt" }, - { DnnModelType.Resnet101, "glove.6B.200d.txt" }, - { DnnModelType.Alexnet, "glove.6B.300d.txt" }, - }; - public TransformerChain Fit(IDataView input) { return _modelChain.Fit(input); @@ -59,4 +32,18 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) return _modelChain.GetOutputSchema(inputSchema); } } + + public partial class DnnImageModelSelector + { + private readonly IHostEnvironment _env; + private readonly string _input; + private readonly string _output; + + public DnnImageModelSelector(IHostEnvironment env, string input, string output) + { + _env = env; + _input = input; + _output = output; + } + } } diff --git a/src/Microsoft.ML.OnnxTransform/ResNet101.cs b/src/Microsoft.ML.OnnxTransform/ResNet101.cs new file mode 100644 index 0000000000..338208fb65 --- /dev/null +++ b/src/Microsoft.ML.OnnxTransform/ResNet101.cs @@ -0,0 +1,25 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Data; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.ML.Transforms +{ + public partial class DnnImageModelSelector + { + public EstimatorChain ResNet101() + { + var modelChain = new EstimatorChain(); + var tempCol = "onnxDnnPrep"; + var prepEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\Prep\\resnetPreprocess.onnx", _input, tempCol); + var mainEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\ResNet101\\resnet101.onnx", tempCol, _output); + modelChain.Append(prepEstimator); + modelChain.Append(mainEstimator); + return modelChain; + } + } +} \ No newline at end of file diff --git a/src/Microsoft.ML.OnnxTransform/ResNet18.cs b/src/Microsoft.ML.OnnxTransform/ResNet18.cs new file mode 100644 index 0000000000..28959d9011 --- /dev/null +++ b/src/Microsoft.ML.OnnxTransform/ResNet18.cs @@ -0,0 +1,25 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Data; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.ML.Transforms +{ + public partial class DnnImageModelSelector + { + public EstimatorChain ResNet18() + { + var modelChain = new EstimatorChain(); + var tempCol = "onnxDnnPrep"; + var prepEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\Prep\\resnetPreprocess.onnx", _input, tempCol); + var mainEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\ResNet18\\resnet18.onnx", tempCol, _output); + modelChain.Append(prepEstimator); + modelChain.Append(mainEstimator); + return modelChain; + } + } +} diff --git a/src/Microsoft.ML.OnnxTransform/ResNet50.cs b/src/Microsoft.ML.OnnxTransform/ResNet50.cs new file mode 100644 index 0000000000..cddb491f37 --- /dev/null +++ b/src/Microsoft.ML.OnnxTransform/ResNet50.cs @@ -0,0 +1,25 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Data; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Microsoft.ML.Transforms +{ + public partial class DnnImageModelSelector + { + public EstimatorChain ResNet50() + { + var modelChain = new EstimatorChain(); + var tempCol = "onnxDnnPrep"; + var prepEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\Prep\\resnetPreprocess.onnx", _input, tempCol); + var mainEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\ResNet50\\resnet50.onnx", tempCol, _output); + modelChain.Append(prepEstimator); + modelChain.Append(mainEstimator); + return modelChain; + } + } +} \ No newline at end of file diff --git a/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs b/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs index 49ba67900b..d17d9dd9fa 100644 --- a/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs +++ b/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs @@ -86,7 +86,7 @@ void TestDnnImageFeaturizer() }, }); - var pipe = new DnnImageFeaturizerEstimator(Env, "data_0", "dnnfeatures_1", DnnImageFeaturizerEstimator.DnnModelType.Resnet18); + var pipe = new DnnImageFeaturizerEstimator(Env, "data_0", "dnnfeatures_1", m => m.ResNet18()); TestEstimatorCore(pipe, dataView); } From 66b621ee1e12e2c2f27e1eb18ec6e595a3a69780 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Mon, 29 Oct 2018 17:26:52 -0700 Subject: [PATCH 06/54] Create more extensive tests --- src/Microsoft.ML.OnnxTransform/ResNet18.cs | 4 +- .../DnnImageFeaturizerTest.cs | 92 +++++++++++++++++++ 2 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs diff --git a/src/Microsoft.ML.OnnxTransform/ResNet18.cs b/src/Microsoft.ML.OnnxTransform/ResNet18.cs index 28959d9011..5da4c80e00 100644 --- a/src/Microsoft.ML.OnnxTransform/ResNet18.cs +++ b/src/Microsoft.ML.OnnxTransform/ResNet18.cs @@ -17,8 +17,8 @@ public EstimatorChain ResNet18() var tempCol = "onnxDnnPrep"; var prepEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\Prep\\resnetPreprocess.onnx", _input, tempCol); var mainEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\ResNet18\\resnet18.onnx", tempCol, _output); - modelChain.Append(prepEstimator); - modelChain.Append(mainEstimator); + modelChain = modelChain.Append(prepEstimator); + modelChain = modelChain.Append(mainEstimator); return modelChain; } } diff --git a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs new file mode 100644 index 0000000000..b42b786ac7 --- /dev/null +++ b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs @@ -0,0 +1,92 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Core.Data; +using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Runtime.RunTests; +using Microsoft.ML.Transforms; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; +using Xunit; +using Xunit.Abstractions; + +namespace Microsoft.ML.Tests +{ + public class DnnImageFeaturizerTests : TestDataPipeBase + { + private const int inputSize = 3 * 224 * 224; + + private class TestData + { + [VectorType(inputSize)] + public float[] data_0; + } + private class TestDataSize + { + [VectorType(2)] + public float[] data_0; + } + private class TestDataXY + { + [VectorType(inputSize)] + public float[] A; + } + private class TestDataDifferntType + { + [VectorType(inputSize)] + public string[] data_0; + } + + private float[] getSampleArrayData() + { + var samplevector = new float[inputSize]; + for (int i = 0; i < inputSize; i++) + samplevector[i] = (i / (inputSize * 1.01f)); + return samplevector; + } + + public DnnImageFeaturizerTests(ITestOutputHelper helper) : base(helper) + { + } + + [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] + void TestDnnImageFeaturizer() + { + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + return; + + + var samplevector = getSampleArrayData(); + + var dataView = ComponentCreation.CreateDataView(Env, + new TestData[] { + new TestData() + { + data_0 = samplevector + }, + }); + + var xyData = new List { new TestDataXY() { A = new float[inputSize] } }; + var stringData = new List { new TestDataDifferntType() { data_0 = new string[inputSize] } }; + var sizeData = new List { new TestDataSize() { data_0 = new float[2] } }; + var pipe = new DnnImageFeaturizerEstimator(Env, "data_0", "output_1", x => x.ResNet18()); + + var invalidDataWrongNames = ComponentCreation.CreateDataView(Env, xyData); + var invalidDataWrongTypes = ComponentCreation.CreateDataView(Env, stringData); + var invalidDataWrongVectorSize = ComponentCreation.CreateDataView(Env, sizeData); + TestEstimatorCore(pipe, dataView, invalidInput: invalidDataWrongNames); + TestEstimatorCore(pipe, dataView, invalidInput: invalidDataWrongTypes); + pipe.GetOutputSchema(SchemaShape.Create(invalidDataWrongVectorSize.Schema)); + try + { + pipe.Fit(invalidDataWrongVectorSize); + Assert.False(true); + } + catch (ArgumentOutOfRangeException) { } + catch (InvalidOperationException) { } + } + } +} From 87a5d51368906d1445a0cdf6d5db67efd649fe57 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Mon, 29 Oct 2018 17:27:11 -0700 Subject: [PATCH 07/54] Remove changes to onnx transform tests --- .../OnnxTransformTests.cs | 36 ------------------- 1 file changed, 36 deletions(-) diff --git a/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs b/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs index d17d9dd9fa..a95d5c15c8 100644 --- a/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs +++ b/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs @@ -29,11 +29,6 @@ private class TestData [VectorType(inputSize)] public float[] data_0; } - private class ImageData - { - [VectorType(3 * 224 * 224)] - public float[] data_0; - } private class TestDataSize { [VectorType(2)] @@ -58,41 +53,10 @@ private float[] getSampleArrayData() return samplevector; } - private float[] getImagePixelData() - { - var samplevector = new float[3 * 224 * 224]; - for (int i = 0; i < 3 * 224 * 224; i++) - samplevector[i] = 40.0f; - return samplevector; - } - public OnnxTransformTests(ITestOutputHelper output) : base(output) { } - [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] - void TestDnnImageFeaturizer() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - return; - - var samplevector = getImagePixelData(); - - var dataView = ComponentCreation.CreateDataView(Env, - new ImageData[] { - new ImageData() - { - data_0 = samplevector - }, - }); - - var pipe = new DnnImageFeaturizerEstimator(Env, "data_0", "dnnfeatures_1", m => m.ResNet18()); - TestEstimatorCore(pipe, dataView); - } - - - - [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 fails with "An attempt was made to load a program with an incorrect format." void TestSimpleCase() { From 5bec174a366f3aace86f9f300ad262ebe572e074 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Tue, 30 Oct 2018 17:07:33 -0700 Subject: [PATCH 08/54] Rework to use CDN approach --- src/Microsoft.ML.OnnxTransform/AlexNet.cs | 25 ------ .../DnnImageFeaturizerTransform.cs | 86 +++++++++++++++---- src/Microsoft.ML.OnnxTransform/ResNet101.cs | 25 ------ src/Microsoft.ML.OnnxTransform/ResNet18.cs | 25 ------ src/Microsoft.ML.OnnxTransform/ResNet50.cs | 25 ------ .../DnnImageFeaturizerTest.cs | 2 +- 6 files changed, 68 insertions(+), 120 deletions(-) delete mode 100644 src/Microsoft.ML.OnnxTransform/AlexNet.cs delete mode 100644 src/Microsoft.ML.OnnxTransform/ResNet101.cs delete mode 100644 src/Microsoft.ML.OnnxTransform/ResNet18.cs delete mode 100644 src/Microsoft.ML.OnnxTransform/ResNet50.cs diff --git a/src/Microsoft.ML.OnnxTransform/AlexNet.cs b/src/Microsoft.ML.OnnxTransform/AlexNet.cs deleted file mode 100644 index 0b5deec4c0..0000000000 --- a/src/Microsoft.ML.OnnxTransform/AlexNet.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; -using System; -using System.Collections.Generic; -using System.Text; - -namespace Microsoft.ML.Transforms -{ - public partial class DnnImageModelSelector - { - public EstimatorChain AlexNet() - { - var modelChain = new EstimatorChain(); - var tempCol = "onnxDnnPrep"; - var prepEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\AlexPrep\\alexnetPreprocess.onnx", _input, tempCol); - var mainEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\AlexNet\\alexnet.onnx", tempCol, _output); - modelChain.Append(prepEstimator); - modelChain.Append(mainEstimator); - return modelChain; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index 170a0b065c..7bf67dccfa 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -5,45 +5,93 @@ using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Model; -using System; +using Microsoft.ML.Runtime.Internal.Utilities; using System.Collections.Generic; +using System.IO; using System.Linq; -using System.Text; namespace Microsoft.ML.Transforms { public sealed class DnnImageFeaturizerEstimator : IEstimator> { private readonly EstimatorChain _modelChain; + private readonly IHost _host; + private const int Timeout = 10 * 60 * 1000; - public DnnImageFeaturizerEstimator(IHostEnvironment env, string input, string output, Func> model) + public enum DnnImageModel { - _modelChain = model(new DnnImageModelSelector(env, input, output)); + ResNet18 = 0, + ResNet50 = 1, + ResNet101 = 2, + AlexNet = 3 } - public TransformerChain Fit(IDataView input) + private static Dictionary _modelsPrep = new Dictionary() { - return _modelChain.Fit(input); + { DnnImageModel.ResNet18, "resnetPreprocess.onnx" }, + { DnnImageModel.ResNet50, "resnetPreprocess.onnx" }, + { DnnImageModel.ResNet101, "resnetPreprocess.onnx" }, + { DnnImageModel.AlexNet, "alexnetPreprocess.onnx" } + }; + + private static Dictionary _modelsMain = new Dictionary() + { + { DnnImageModel.ResNet18, "resnet18.onnx" }, + { DnnImageModel.ResNet50, "resnet50.onnx" }, + { DnnImageModel.ResNet101, "resnet101.onnx" }, + { DnnImageModel.AlexNet, "alexnet.onnx" } + }; + + private static Dictionary _modelDirs = new Dictionary() + { + { "resnetPreprocess.onnx", "ResNetPrep" }, + { "alexnetPreprocess.onnx", "AlexNetPrep" }, + { "resnet18.onnx", "ResNet18" }, + { "resnet50.onnx", "ResNet50" }, + { "resnet101.onnx", "ResNet101" }, + { "alexnet.onnx", "AlexNet" }, + }; + + public DnnImageFeaturizerEstimator(IHostEnvironment env, string input, string output, DnnImageModel model) + { + _host = env.Register(nameof(DnnImageFeaturizerEstimator)); + _modelChain = new EstimatorChain(); + var tempCol = "onnxDnnPrep"; + var prepEstimator = new OnnxEstimator(env, EnsureModelFile(env, _modelsPrep[model], model), input, tempCol); + var mainEstimator = new OnnxEstimator(env, EnsureModelFile(env, _modelsMain[model], model), tempCol, output); + _modelChain = _modelChain.Append(prepEstimator); + _modelChain = _modelChain.Append(mainEstimator); } - public SchemaShape GetOutputSchema(SchemaShape inputSchema) + private string EnsureModelFile(IHostEnvironment env, string modelFileName, DnnImageModel kind) { - return _modelChain.GetOutputSchema(inputSchema); + using (var ch = _host.Start("Ensuring resources")) + { + var dir = _modelDirs[modelFileName]; + var url = $"{dir}/{modelFileName}"; + var ensureModel = ResourceManagerUtils.Instance.EnsureResource(_host, ch, url, modelFileName, dir, Timeout); + ensureModel.Wait(); + var errorResult = ResourceManagerUtils.GetErrorMessage(out var errorMessage, ensureModel.Result); + if (errorResult != null) + { + var directory = Path.GetDirectoryName(errorResult.FileName); + var name = Path.GetFileName(errorResult.FileName); + throw ch.Except($"{errorMessage}\nModel file for Dnn Image Featurizer transform could not be found! " + + $@"Please copy the model file '{name}' from '{url}' to '{directory}'."); + } + return ensureModel.Result.FileName; + } + throw _host.Except($"Can't map model kind = {kind} to specific file, please refer to https://aka.ms/MLNetIssue for assistance"); } - } - public partial class DnnImageModelSelector - { - private readonly IHostEnvironment _env; - private readonly string _input; - private readonly string _output; + public TransformerChain Fit(IDataView input) + { + return _modelChain.Fit(input); + } - public DnnImageModelSelector(IHostEnvironment env, string input, string output) + public SchemaShape GetOutputSchema(SchemaShape inputSchema) { - _env = env; - _input = input; - _output = output; + return _modelChain.GetOutputSchema(inputSchema); } } } diff --git a/src/Microsoft.ML.OnnxTransform/ResNet101.cs b/src/Microsoft.ML.OnnxTransform/ResNet101.cs deleted file mode 100644 index 338208fb65..0000000000 --- a/src/Microsoft.ML.OnnxTransform/ResNet101.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; -using System; -using System.Collections.Generic; -using System.Text; - -namespace Microsoft.ML.Transforms -{ - public partial class DnnImageModelSelector - { - public EstimatorChain ResNet101() - { - var modelChain = new EstimatorChain(); - var tempCol = "onnxDnnPrep"; - var prepEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\Prep\\resnetPreprocess.onnx", _input, tempCol); - var mainEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\ResNet101\\resnet101.onnx", tempCol, _output); - modelChain.Append(prepEstimator); - modelChain.Append(mainEstimator); - return modelChain; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.ML.OnnxTransform/ResNet18.cs b/src/Microsoft.ML.OnnxTransform/ResNet18.cs deleted file mode 100644 index 5da4c80e00..0000000000 --- a/src/Microsoft.ML.OnnxTransform/ResNet18.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; -using System; -using System.Collections.Generic; -using System.Text; - -namespace Microsoft.ML.Transforms -{ - public partial class DnnImageModelSelector - { - public EstimatorChain ResNet18() - { - var modelChain = new EstimatorChain(); - var tempCol = "onnxDnnPrep"; - var prepEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\Prep\\resnetPreprocess.onnx", _input, tempCol); - var mainEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\ResNet18\\resnet18.onnx", tempCol, _output); - modelChain = modelChain.Append(prepEstimator); - modelChain = modelChain.Append(mainEstimator); - return modelChain; - } - } -} diff --git a/src/Microsoft.ML.OnnxTransform/ResNet50.cs b/src/Microsoft.ML.OnnxTransform/ResNet50.cs deleted file mode 100644 index cddb491f37..0000000000 --- a/src/Microsoft.ML.OnnxTransform/ResNet50.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; -using System; -using System.Collections.Generic; -using System.Text; - -namespace Microsoft.ML.Transforms -{ - public partial class DnnImageModelSelector - { - public EstimatorChain ResNet50() - { - var modelChain = new EstimatorChain(); - var tempCol = "onnxDnnPrep"; - var prepEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\Prep\\resnetPreprocess.onnx", _input, tempCol); - var mainEstimator = new OnnxEstimator(_env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\ResNet50\\resnet50.onnx", tempCol, _output); - modelChain.Append(prepEstimator); - modelChain.Append(mainEstimator); - return modelChain; - } - } -} \ No newline at end of file diff --git a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs index b42b786ac7..05ad0d1a9d 100644 --- a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs +++ b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs @@ -72,7 +72,7 @@ void TestDnnImageFeaturizer() var xyData = new List { new TestDataXY() { A = new float[inputSize] } }; var stringData = new List { new TestDataDifferntType() { data_0 = new string[inputSize] } }; var sizeData = new List { new TestDataSize() { data_0 = new float[2] } }; - var pipe = new DnnImageFeaturizerEstimator(Env, "data_0", "output_1", x => x.ResNet18()); + var pipe = new DnnImageFeaturizerEstimator(Env, "data_0", "output_1", DnnImageFeaturizerEstimator.DnnImageModel.ResNet18); var invalidDataWrongNames = ComponentCreation.CreateDataView(Env, xyData); var invalidDataWrongTypes = ComponentCreation.CreateDataView(Env, stringData); From 8876f0278ddfde8aaf4b3b04d22bb8ee5183dfd5 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Tue, 30 Oct 2018 17:39:11 -0700 Subject: [PATCH 09/54] Add static extensions --- .../DnnImageFeaturizerTransform.cs | 47 ++++++++++++++++++- .../DnnImageFeaturizerTest.cs | 2 +- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index 7bf67dccfa..63b3d6a624 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -6,9 +6,12 @@ using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Internal.Utilities; +using Microsoft.ML.StaticPipe; +using Microsoft.ML.StaticPipe.Runtime; using System.Collections.Generic; using System.IO; using System.Linq; +using static Microsoft.ML.Transforms.DnnImageFeaturizerEstimator; namespace Microsoft.ML.Transforms { @@ -52,7 +55,7 @@ public enum DnnImageModel { "alexnet.onnx", "AlexNet" }, }; - public DnnImageFeaturizerEstimator(IHostEnvironment env, string input, string output, DnnImageModel model) + public DnnImageFeaturizerEstimator(IHostEnvironment env, DnnImageModel model, string input, string output) { _host = env.Register(nameof(DnnImageFeaturizerEstimator)); _modelChain = new EstimatorChain(); @@ -94,4 +97,46 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) return _modelChain.GetOutputSchema(inputSchema); } } + + public static class DnnImageFeaturizerStaticExtensions + { + private sealed class OutColumn : Vector + { + public PipelineColumn Input { get; } + + public OutColumn(Vector input, DnnImageModel model) + : base(new Reconciler(model), input) + { + Input = input; + } + } + + private sealed class Reconciler : EstimatorReconciler + { + private readonly DnnImageModel _model; + + public Reconciler(DnnImageModel model) + { + _model = model; + } + + public override IEstimator Reconcile(IHostEnvironment env, + PipelineColumn[] toOutput, + IReadOnlyDictionary inputNames, + IReadOnlyDictionary outputNames, + IReadOnlyCollection usedNames) + { + Contracts.Assert(toOutput.Length == 1); + + var outCol = (OutColumn)toOutput[0]; + return new DnnImageFeaturizerEstimator(env, _model, inputNames[outCol.Input], outputNames[outCol]); + } + } + + public static Vector DnnImageFeaturizer(this Vector input, DnnImageModel model) + { + Contracts.CheckValue(input, nameof(input)); + return new OutColumn(input, model); + } + } } diff --git a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs index 05ad0d1a9d..6d56ec9d14 100644 --- a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs +++ b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs @@ -72,7 +72,7 @@ void TestDnnImageFeaturizer() var xyData = new List { new TestDataXY() { A = new float[inputSize] } }; var stringData = new List { new TestDataDifferntType() { data_0 = new string[inputSize] } }; var sizeData = new List { new TestDataSize() { data_0 = new float[2] } }; - var pipe = new DnnImageFeaturizerEstimator(Env, "data_0", "output_1", DnnImageFeaturizerEstimator.DnnImageModel.ResNet18); + var pipe = new DnnImageFeaturizerEstimator(Env, DnnImageFeaturizerEstimator.DnnImageModel.ResNet18, "data_0", "output_1"); var invalidDataWrongNames = ComponentCreation.CreateDataView(Env, xyData); var invalidDataWrongTypes = ComponentCreation.CreateDataView(Env, stringData); From 2630f7bbc86b774daec99db6e7c6a0b1c6bbf593 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Thu, 1 Nov 2018 16:57:29 -0700 Subject: [PATCH 10/54] Added test for static pipeline --- .../DnnImageFeaturizerTest.cs | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs index 6d56ec9d14..04f43827e8 100644 --- a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs +++ b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs @@ -4,10 +4,13 @@ using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.RunTests; +using Microsoft.ML.Runtime.ImageAnalytics; using Microsoft.ML.Transforms; using System; using System.Collections.Generic; +using System.IO; using System.Runtime.InteropServices; using System.Text; using Xunit; @@ -88,5 +91,50 @@ void TestDnnImageFeaturizer() catch (ArgumentOutOfRangeException) { } catch (InvalidOperationException) { } } + + [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 fails with "An attempt was made to load a program with an incorrect format." + public void OnnxStatic() + { + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + return; + + using (var env = new ConsoleEnvironment(null, false, 0, 1, null, null)) + { + var imageHeight = 224; + var imageWidth = 224; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + + var data = TextLoader.CreateReader(env, ctx => ( + imagePath: ctx.LoadText(0), + name: ctx.LoadText(1))) + .Read(dataFile); + + // Note that CamelCase column names are there to match the TF graph node names. + var pipe = data.MakeNewEstimator() + .Append(row => ( + row.name, + data_0: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) + .Append(row => (row.name, output_1: row.data_0.DnnImageFeaturizer(DnnImageFeaturizerEstimator.DnnImageModel.ResNet18))); + + TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); + + var result = pipe.Fit(data).Transform(data).AsDynamic; + result.Schema.TryGetColumnIndex("output_1", out int output); + using (var cursor = result.GetRowCursor(col => col == output)) + { + var buffer = default(VBuffer); + var getter = cursor.GetGetter>(output); + var numRows = 0; + while (cursor.MoveNext()) + { + getter(ref buffer); + Assert.Equal(512, buffer.Length); + numRows += 1; + } + Assert.Equal(3, numRows); + } + } + } } } From 4a38bf93133b063d30b0a02bb311c979f6053192 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 2 Nov 2018 11:42:36 -0700 Subject: [PATCH 11/54] Updated to use correct CDN location --- .../DnnImageFeaturizerTransform.cs | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index 63b3d6a624..a2e059bfd0 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -31,28 +31,28 @@ public enum DnnImageModel private static Dictionary _modelsPrep = new Dictionary() { - { DnnImageModel.ResNet18, "resnetPreprocess.onnx" }, - { DnnImageModel.ResNet50, "resnetPreprocess.onnx" }, - { DnnImageModel.ResNet101, "resnetPreprocess.onnx" }, - { DnnImageModel.AlexNet, "alexnetPreprocess.onnx" } + { DnnImageModel.ResNet18, "ResNetPreprocess.onnx" }, + { DnnImageModel.ResNet50, "ResNetPreprocess.onnx" }, + { DnnImageModel.ResNet101, "ResNetPreprocess.onnx" }, + { DnnImageModel.AlexNet, "AlexNetPreprocess.onnx" } }; private static Dictionary _modelsMain = new Dictionary() { - { DnnImageModel.ResNet18, "resnet18.onnx" }, - { DnnImageModel.ResNet50, "resnet50.onnx" }, - { DnnImageModel.ResNet101, "resnet101.onnx" }, - { DnnImageModel.AlexNet, "alexnet.onnx" } + { DnnImageModel.ResNet18, "ResNet18.onnx" }, + { DnnImageModel.ResNet50, "ResNet50.onnx" }, + { DnnImageModel.ResNet101, "ResNet101.onnx" }, + { DnnImageModel.AlexNet, "AlexNet.onnx" } }; private static Dictionary _modelDirs = new Dictionary() { - { "resnetPreprocess.onnx", "ResNetPrep" }, - { "alexnetPreprocess.onnx", "AlexNetPrep" }, - { "resnet18.onnx", "ResNet18" }, - { "resnet50.onnx", "ResNet50" }, - { "resnet101.onnx", "ResNet101" }, - { "alexnet.onnx", "AlexNet" }, + { "ResNetPreprocess.onnx", "ResNetPrepOnnx" }, + { "AlexNetPreprocess.onnx", "AlexNetPrepOnnx" }, + { "ResNet18.onnx", "ResNet18Onnx" }, + { "ResNet50.onnx", "ResNet50Onnx" }, + { "ResNet101.onnx", "ResNet101Onnx" }, + { "AlexNet.onnx", "AlexNetOnnx" }, }; public DnnImageFeaturizerEstimator(IHostEnvironment env, DnnImageModel model, string input, string output) @@ -70,7 +70,7 @@ private string EnsureModelFile(IHostEnvironment env, string modelFileName, DnnIm { using (var ch = _host.Start("Ensuring resources")) { - var dir = _modelDirs[modelFileName]; + var dir = Path.Combine("image", _modelDirs[modelFileName]); var url = $"{dir}/{modelFileName}"; var ensureModel = ResourceManagerUtils.Instance.EnsureResource(_host, ch, url, modelFileName, dir, Timeout); ensureModel.Wait(); From 75b1b0dc9cef85172f4194338fb42ddc00204417 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 2 Nov 2018 11:50:50 -0700 Subject: [PATCH 12/54] Added some minor comments --- .../DnnImageFeaturizerTransform.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index a2e059bfd0..740f276d73 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -29,6 +29,7 @@ public enum DnnImageModel AlexNet = 3 } + // Each main DNN model has preprocessing required based on the model type, these are simple models which do that. private static Dictionary _modelsPrep = new Dictionary() { { DnnImageModel.ResNet18, "ResNetPreprocess.onnx" }, @@ -37,6 +38,7 @@ public enum DnnImageModel { DnnImageModel.AlexNet, "AlexNetPreprocess.onnx" } }; + // The main DNN model private static Dictionary _modelsMain = new Dictionary() { { DnnImageModel.ResNet18, "ResNet18.onnx" }, @@ -45,6 +47,7 @@ public enum DnnImageModel { DnnImageModel.AlexNet, "AlexNet.onnx" } }; + // Currently OnnxTransform requires each ONNX model to be in it's own directory, this stores that. private static Dictionary _modelDirs = new Dictionary() { { "ResNetPreprocess.onnx", "ResNetPrepOnnx" }, @@ -55,6 +58,8 @@ public enum DnnImageModel { "AlexNet.onnx", "AlexNetOnnx" }, }; + // The actual transformations happen by applying the preprocessing model followed by the DNN model. + // OnnxTransform is used to run those models, and this transform just combines them for convinience. public DnnImageFeaturizerEstimator(IHostEnvironment env, DnnImageModel model, string input, string output) { _host = env.Register(nameof(DnnImageFeaturizerEstimator)); @@ -66,6 +71,7 @@ public DnnImageFeaturizerEstimator(IHostEnvironment env, DnnImageModel model, st _modelChain = _modelChain.Append(mainEstimator); } + // Downloads the models if necessary from the CDN private string EnsureModelFile(IHostEnvironment env, string modelFileName, DnnImageModel kind) { using (var ch = _host.Start("Ensuring resources")) From 271ae032f11dd3d5b5d0a2393cefe0104cbb6ecb Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Tue, 6 Nov 2018 16:37:39 -0800 Subject: [PATCH 13/54] Use extension methods and set up the model download/nuget placement --- Microsoft.ML.sln | 10 ++ ...t.ML.DnnImageFeaturizer.ResNet18.nupkgproj | 12 +++ ...ImageFeaturizer.ResNet18.symbols.nupkgproj | 5 + ...soft.ML.DnnImageFeaturizer.ResNet18.csproj | 46 +++++++++ .../ResNet18.cs | 22 +++++ .../DnnImageFeaturizerTransform.cs | 95 ++++--------------- .../DnnImageFeaturizerTest.cs | 4 +- 7 files changed, 116 insertions(+), 78 deletions(-) create mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj create mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.symbols.nupkgproj create mode 100644 src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj create mode 100644 src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs diff --git a/Microsoft.ML.sln b/Microsoft.ML.sln index fb15345497..6a56bec8b2 100644 --- a/Microsoft.ML.sln +++ b/Microsoft.ML.sln @@ -134,6 +134,7 @@ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.SamplesUtils", "src\Microsoft.ML.SamplesUtils\Microsoft.ML.SamplesUtils.csproj", "{11A5210E-2EA7-42F1-80DB-827762E9C781}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Recommender", "src\Microsoft.ML.Recommender\Microsoft.ML.Recommender.csproj", "{C8E1772B-DFD9-4A4D-830D-6AAB1C668BB3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.DnnImageFeaturizer.ResNet18", "src\Microsoft.ML.DnnImageFeaturizer.ResNet18\Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj", "{DBE14184-DC09-41E6-8BE7-D8529D9DF750}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -511,6 +512,14 @@ Global {C8E1772B-DFD9-4A4D-830D-6AAB1C668BB3}.Release|Any CPU.Build.0 = Release|Any CPU {C8E1772B-DFD9-4A4D-830D-6AAB1C668BB3}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU {C8E1772B-DFD9-4A4D-830D-6AAB1C668BB3}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU + {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU + {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU + {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Release|Any CPU.Build.0 = Release|Any CPU + {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU + {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -567,6 +576,7 @@ Global {ECB71297-9DF1-48CE-B93A-CD969221F9B6} = {DA452A53-2E94-4433-B08C-041EDEC729E6} {11A5210E-2EA7-42F1-80DB-827762E9C781} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {C8E1772B-DFD9-4A4D-830D-6AAB1C668BB3} = {09EADF06-BE25-4228-AB53-95AE3E15B530} + {DBE14184-DC09-41E6-8BE7-D8529D9DF750} = {09EADF06-BE25-4228-AB53-95AE3E15B530} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D} diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj new file mode 100644 index 0000000000..506ea86ccc --- /dev/null +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj @@ -0,0 +1,12 @@ + + + + netstandard2.0 + ML.NET component for pretrained ResNet18 image featurization + + + + + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.symbols.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.symbols.nupkgproj new file mode 100644 index 0000000000..9fb3f5ca75 --- /dev/null +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.symbols.nupkgproj @@ -0,0 +1,5 @@ + + + + + diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj new file mode 100644 index 0000000000..c644c6dc70 --- /dev/null +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj @@ -0,0 +1,46 @@ + + + + netstandard2.0 + Microsoft.ML.DnnImageFeaturizer.ResNet18 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs new file mode 100644 index 0000000000..f7ca0079e3 --- /dev/null +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs @@ -0,0 +1,22 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Data; + +namespace Microsoft.ML.Transforms +{ + public static class ResNet18Extension + { + public static EstimatorChain ResNet18(this DnnImageModelSelector model) + { + var modelChain = new EstimatorChain(); + var tempCol = "onnxDnnPrep"; + var prepEstimator = new OnnxEstimator(model.Env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\Prep\\resnetPreprocess.onnx", model.Input, tempCol); + var mainEstimator = new OnnxEstimator(model.Env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\ResNet18\\resnet18.onnx", tempCol, model.Output); + modelChain = modelChain.Append(prepEstimator); + modelChain = modelChain.Append(mainEstimator); + return modelChain; + } + } +} \ No newline at end of file diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index 740f276d73..b0ad2b0392 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -8,89 +8,32 @@ using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.StaticPipe; using Microsoft.ML.StaticPipe.Runtime; +using System; using System.Collections.Generic; -using System.IO; -using System.Linq; -using static Microsoft.ML.Transforms.DnnImageFeaturizerEstimator; namespace Microsoft.ML.Transforms { - public sealed class DnnImageFeaturizerEstimator : IEstimator> + public class DnnImageModelSelector { - private readonly EstimatorChain _modelChain; - private readonly IHost _host; - private const int Timeout = 10 * 60 * 1000; + public readonly IHostEnvironment Env; + public readonly string Input; + public readonly string Output; - public enum DnnImageModel + public DnnImageModelSelector(IHostEnvironment env, string input, string output) { - ResNet18 = 0, - ResNet50 = 1, - ResNet101 = 2, - AlexNet = 3 + Env = env; + Input = input; + Output = output; } + } - // Each main DNN model has preprocessing required based on the model type, these are simple models which do that. - private static Dictionary _modelsPrep = new Dictionary() - { - { DnnImageModel.ResNet18, "ResNetPreprocess.onnx" }, - { DnnImageModel.ResNet50, "ResNetPreprocess.onnx" }, - { DnnImageModel.ResNet101, "ResNetPreprocess.onnx" }, - { DnnImageModel.AlexNet, "AlexNetPreprocess.onnx" } - }; - - // The main DNN model - private static Dictionary _modelsMain = new Dictionary() - { - { DnnImageModel.ResNet18, "ResNet18.onnx" }, - { DnnImageModel.ResNet50, "ResNet50.onnx" }, - { DnnImageModel.ResNet101, "ResNet101.onnx" }, - { DnnImageModel.AlexNet, "AlexNet.onnx" } - }; - - // Currently OnnxTransform requires each ONNX model to be in it's own directory, this stores that. - private static Dictionary _modelDirs = new Dictionary() - { - { "ResNetPreprocess.onnx", "ResNetPrepOnnx" }, - { "AlexNetPreprocess.onnx", "AlexNetPrepOnnx" }, - { "ResNet18.onnx", "ResNet18Onnx" }, - { "ResNet50.onnx", "ResNet50Onnx" }, - { "ResNet101.onnx", "ResNet101Onnx" }, - { "AlexNet.onnx", "AlexNetOnnx" }, - }; - - // The actual transformations happen by applying the preprocessing model followed by the DNN model. - // OnnxTransform is used to run those models, and this transform just combines them for convinience. - public DnnImageFeaturizerEstimator(IHostEnvironment env, DnnImageModel model, string input, string output) - { - _host = env.Register(nameof(DnnImageFeaturizerEstimator)); - _modelChain = new EstimatorChain(); - var tempCol = "onnxDnnPrep"; - var prepEstimator = new OnnxEstimator(env, EnsureModelFile(env, _modelsPrep[model], model), input, tempCol); - var mainEstimator = new OnnxEstimator(env, EnsureModelFile(env, _modelsMain[model], model), tempCol, output); - _modelChain = _modelChain.Append(prepEstimator); - _modelChain = _modelChain.Append(mainEstimator); - } + public sealed class DnnImageFeaturizerEstimator : IEstimator> + { + private readonly EstimatorChain _modelChain; - // Downloads the models if necessary from the CDN - private string EnsureModelFile(IHostEnvironment env, string modelFileName, DnnImageModel kind) + public DnnImageFeaturizerEstimator(IHostEnvironment env, Func> model, string input, string output) { - using (var ch = _host.Start("Ensuring resources")) - { - var dir = Path.Combine("image", _modelDirs[modelFileName]); - var url = $"{dir}/{modelFileName}"; - var ensureModel = ResourceManagerUtils.Instance.EnsureResource(_host, ch, url, modelFileName, dir, Timeout); - ensureModel.Wait(); - var errorResult = ResourceManagerUtils.GetErrorMessage(out var errorMessage, ensureModel.Result); - if (errorResult != null) - { - var directory = Path.GetDirectoryName(errorResult.FileName); - var name = Path.GetFileName(errorResult.FileName); - throw ch.Except($"{errorMessage}\nModel file for Dnn Image Featurizer transform could not be found! " + - $@"Please copy the model file '{name}' from '{url}' to '{directory}'."); - } - return ensureModel.Result.FileName; - } - throw _host.Except($"Can't map model kind = {kind} to specific file, please refer to https://aka.ms/MLNetIssue for assistance"); + _modelChain = model(new DnnImageModelSelector(env, input, output)); } public TransformerChain Fit(IDataView input) @@ -110,7 +53,7 @@ private sealed class OutColumn : Vector { public PipelineColumn Input { get; } - public OutColumn(Vector input, DnnImageModel model) + public OutColumn(Vector input, Func> model) : base(new Reconciler(model), input) { Input = input; @@ -119,9 +62,9 @@ public OutColumn(Vector input, DnnImageModel model) private sealed class Reconciler : EstimatorReconciler { - private readonly DnnImageModel _model; + private readonly Func> _model; - public Reconciler(DnnImageModel model) + public Reconciler(Func> model) { _model = model; } @@ -139,7 +82,7 @@ public override IEstimator Reconcile(IHostEnvironment env, } } - public static Vector DnnImageFeaturizer(this Vector input, DnnImageModel model) + public static Vector DnnImageFeaturizer(this Vector input, Func> model) { Contracts.CheckValue(input, nameof(input)); return new OutColumn(input, model); diff --git a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs index 04f43827e8..7d5f4d5bf6 100644 --- a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs +++ b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs @@ -18,7 +18,7 @@ namespace Microsoft.ML.Tests { - public class DnnImageFeaturizerTests : TestDataPipeBase + /* public class DnnImageFeaturizerTests : TestDataPipeBase { private const int inputSize = 3 * 224 * 224; @@ -136,5 +136,5 @@ public void OnnxStatic() } } } - } + }*/ } From 2e5ef2d5b603ffbb11b821ebbb6f2f48b1d01dbd Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Tue, 6 Nov 2018 17:00:57 -0800 Subject: [PATCH 14/54] Change the proj to try to fix download --- .../Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj index c644c6dc70..68b0c0d97a 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj @@ -1,14 +1,14 @@ + + netstandard2.0 Microsoft.ML.DnnImageFeaturizer.ResNet18 - true - From 85ca8841f9216fb11337692575a48ca286bdc2c5 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Wed, 7 Nov 2018 11:25:52 -0800 Subject: [PATCH 15/54] Fix the download in csproj --- ...soft.ML.DnnImageFeaturizer.ResNet18.csproj | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj index 68b0c0d97a..78971dd938 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj @@ -1,46 +1,43 @@ - + netstandard2.0 Microsoft.ML.DnnImageFeaturizer.ResNet18 - - - + DestinationFile="$(MSBuildThisFileDirectory)ResNetPrepOnnx/ResNetPreprocess.onnx" /> - + DestinationFile="$(MSBuildThisFileDirectory)ResNet18Onnx/ResNet18.onnx" /> + AfterTargets="Build" + Inputs="@(ModelFile)" Outputs="%(ModelFile.DestinationFile)"> - \ No newline at end of file From b76dedaf0ba2cb8e5dc75e14118a405a0c954013 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Wed, 7 Nov 2018 13:34:18 -0800 Subject: [PATCH 16/54] Models successfully download into correct folder --- ...soft.ML.DnnImageFeaturizer.ResNet18.csproj | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj index 78971dd938..3d0121b000 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj @@ -12,22 +12,23 @@ - + DestinationFile="$(OutDir)/ResNetPrepOnnx/ResNetPreprocess.onnx" + DestinationDir="$(OutDir)/ResNetPrepOnnx" /> - + DestinationFile="$(OutDir)/ResNet18Onnx/ResNet18.onnx" + DestinationDir="$(OutDir)/ResNet18Onnx" /> - + + - + + \ No newline at end of file From 259ac0599725fb87b1e39b25ef055e23341c2d6b Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Wed, 7 Nov 2018 14:02:28 -0800 Subject: [PATCH 17/54] Include the onnx models in the nuget package --- .../Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj index 506ea86ccc..07d860fa7d 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj @@ -9,4 +9,9 @@ + + + + + From d093d4b1ffc0bf6fceea1c80bd1c80fe0e969fbc Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Thu, 8 Nov 2018 11:28:32 -0800 Subject: [PATCH 18/54] Fix tests and add documentation --- ...t.ML.DnnImageFeaturizer.ResNet18.nupkgproj | 4 +-- .../ResNet18.cs | 28 +++++++++++++++++-- .../DnnImageFeaturizerTransform.cs | 10 +++++++ .../DnnImageFeaturizerTest.cs | 14 ++++++---- .../Microsoft.ML.OnnxTransformTest.csproj | 1 + 5 files changed, 48 insertions(+), 9 deletions(-) diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj index 07d860fa7d..21c7a25438 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj @@ -10,8 +10,8 @@ - - + + diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs index f7ca0079e3..b292877e1f 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs @@ -3,17 +3,41 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Runtime.Data; +using System.IO; +using System.Reflection; namespace Microsoft.ML.Transforms { + // This is an extension method to be used with the DnnImageFeaturizerTransform in order to use a pretrained ResNet18 model. + // The NuGet containing this extension is also guaranteed to include the binary model file. public static class ResNet18Extension { + // If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. + // This should be the default way to use ResNet18 if importing the model from a NuGet. public static EstimatorChain ResNet18(this DnnImageModelSelector model) { var modelChain = new EstimatorChain(); var tempCol = "onnxDnnPrep"; - var prepEstimator = new OnnxEstimator(model.Env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\Prep\\resnetPreprocess.onnx", model.Input, tempCol); - var mainEstimator = new OnnxEstimator(model.Env, "C:\\Models\\DnnImageFeat\\Results\\FinalOnnx\\ResNet18\\resnet18.onnx", tempCol, model.Output); + var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + + var prepEstimator = new OnnxEstimator(model.Env, Path.Combine(execDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), model.Input, tempCol); + var mainEstimator = new OnnxEstimator(model.Env, Path.Combine(execDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, model.Output); + modelChain = modelChain.Append(prepEstimator); + modelChain = modelChain.Append(mainEstimator); + return modelChain; + } + + // This allows a custom model location to be specified. This is mainly useful for other code inside of ML.NET (such as tests), + // but could also be used if one wishes to change the directory of the model for whatever reason. Note that because Onnx models + // must be in a directory all by themsleves for the OnnxTransform to work, this method appends a ResNet18Onnx/ResNetPrepOnnx subdirectory + // to the passed in directory to prevent having to make that directory manually each time. + public static EstimatorChain ResNet18(this DnnImageModelSelector model, string modelDir) + { + var modelChain = new EstimatorChain(); + var tempCol = "onnxDnnPrep"; + + var prepEstimator = new OnnxEstimator(model.Env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), model.Input, tempCol); + var mainEstimator = new OnnxEstimator(model.Env, Path.Combine(modelDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, model.Output); modelChain = modelChain.Append(prepEstimator); modelChain = modelChain.Append(mainEstimator); return modelChain; diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index b0ad2b0392..076a303bca 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -13,6 +13,11 @@ namespace Microsoft.ML.Transforms { + // This is a helper class that is required to use the DnnImageFeaturizer estimator. + // Note that by default, it is not usable as it does not have any valid methods that return an EstimatorChain that + // is used by the DnnImageFeaturizeEstimator. + // In order to use this, at least one model project with the corresponding extension methods must by included. + // See Microsoft.ML.DNNImageFeaturizer.ResNet18 for an example. public class DnnImageModelSelector { public readonly IHostEnvironment Env; @@ -27,10 +32,15 @@ public DnnImageModelSelector(IHostEnvironment env, string input, string output) } } + // The Dnn Image Featurizer is just a wrapper around two OnnxTransforms with present pretrained DNN models. + // Note that because of this, it only works on Windows machines as that is a constraint of the OnnxTransform. public sealed class DnnImageFeaturizerEstimator : IEstimator> { private readonly EstimatorChain _modelChain; + // The function passed in to this method is expected to be an extension method on the DnnImageModelSelector class + // that creates a chain of two OnnxTransforms with specific models included together with that extension method. + // For an example, see Microsoft.ML.DnnImageFeaturizer.ResNet18. public DnnImageFeaturizerEstimator(IHostEnvironment env, Func> model, string input, string output) { _modelChain = model(new DnnImageModelSelector(env, input, output)); diff --git a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs index 7d5f4d5bf6..06fd99bb90 100644 --- a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs +++ b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs @@ -15,10 +15,11 @@ using System.Text; using Xunit; using Xunit.Abstractions; +using System.Reflection; namespace Microsoft.ML.Tests { - /* public class DnnImageFeaturizerTests : TestDataPipeBase + public class DnnImageFeaturizerTests : TestDataPipeBase { private const int inputSize = 3 * 224 * 224; @@ -75,7 +76,9 @@ void TestDnnImageFeaturizer() var xyData = new List { new TestDataXY() { A = new float[inputSize] } }; var stringData = new List { new TestDataDifferntType() { data_0 = new string[inputSize] } }; var sizeData = new List { new TestDataSize() { data_0 = new float[2] } }; - var pipe = new DnnImageFeaturizerEstimator(Env, DnnImageFeaturizerEstimator.DnnImageModel.ResNet18, "data_0", "output_1"); + var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + var pipe = new DnnImageFeaturizerEstimator(Env, m => m.ResNet18(Path.Combine(execDir, "..", "..", + "Microsoft.ML.DnnImageFeaturizer.ResNet18", "netstandard2.0")), "data_0", "output_1"); var invalidDataWrongNames = ComponentCreation.CreateDataView(Env, xyData); var invalidDataWrongTypes = ComponentCreation.CreateDataView(Env, stringData); @@ -110,12 +113,13 @@ public void OnnxStatic() name: ctx.LoadText(1))) .Read(dataFile); - // Note that CamelCase column names are there to match the TF graph node names. + var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); var pipe = data.MakeNewEstimator() .Append(row => ( row.name, data_0: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) - .Append(row => (row.name, output_1: row.data_0.DnnImageFeaturizer(DnnImageFeaturizerEstimator.DnnImageModel.ResNet18))); + .Append(row => (row.name, output_1: row.data_0.DnnImageFeaturizer(m => m.ResNet18(Path.Combine(execDir, "..", "..", + "Microsoft.ML.DnnImageFeaturizer.ResNet18", "netstandard2.0"))))); TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); @@ -136,5 +140,5 @@ public void OnnxStatic() } } } - }*/ + } } diff --git a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj index 7267ce4c34..698d257c94 100644 --- a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj +++ b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj @@ -3,6 +3,7 @@ + From 30b9488ddad0f65760deece72c479379038889b1 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Thu, 8 Nov 2018 15:07:43 -0800 Subject: [PATCH 19/54] Fixed building breaking due to merge --- Microsoft.ML.sln | 21 ++++++++++--------- .../Microsoft.ML.OnnxTransformTest.csproj | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Microsoft.ML.sln b/Microsoft.ML.sln index 6a56bec8b2..53624ae6d9 100644 --- a/Microsoft.ML.sln +++ b/Microsoft.ML.sln @@ -134,7 +134,8 @@ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.SamplesUtils", "src\Microsoft.ML.SamplesUtils\Microsoft.ML.SamplesUtils.csproj", "{11A5210E-2EA7-42F1-80DB-827762E9C781}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Recommender", "src\Microsoft.ML.Recommender\Microsoft.ML.Recommender.csproj", "{C8E1772B-DFD9-4A4D-830D-6AAB1C668BB3}" -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.DnnImageFeaturizer.ResNet18", "src\Microsoft.ML.DnnImageFeaturizer.ResNet18\Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj", "{DBE14184-DC09-41E6-8BE7-D8529D9DF750}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.DnnImageFeaturizer.ResNet18", "src\Microsoft.ML.DnnImageFeaturizer.ResNet18\Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj", "{9222FC9D-599A-49A5-B685-08CC9A5C81D7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -512,14 +513,14 @@ Global {C8E1772B-DFD9-4A4D-830D-6AAB1C668BB3}.Release|Any CPU.Build.0 = Release|Any CPU {C8E1772B-DFD9-4A4D-830D-6AAB1C668BB3}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU {C8E1772B-DFD9-4A4D-830D-6AAB1C668BB3}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU - {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU - {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU - {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Release|Any CPU.Build.0 = Release|Any CPU - {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU - {DBE14184-DC09-41E6-8BE7-D8529D9DF750}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU + {9222FC9D-599A-49A5-B685-08CC9A5C81D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9222FC9D-599A-49A5-B685-08CC9A5C81D7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9222FC9D-599A-49A5-B685-08CC9A5C81D7}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU + {9222FC9D-599A-49A5-B685-08CC9A5C81D7}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU + {9222FC9D-599A-49A5-B685-08CC9A5C81D7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9222FC9D-599A-49A5-B685-08CC9A5C81D7}.Release|Any CPU.Build.0 = Release|Any CPU + {9222FC9D-599A-49A5-B685-08CC9A5C81D7}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU + {9222FC9D-599A-49A5-B685-08CC9A5C81D7}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -576,7 +577,7 @@ Global {ECB71297-9DF1-48CE-B93A-CD969221F9B6} = {DA452A53-2E94-4433-B08C-041EDEC729E6} {11A5210E-2EA7-42F1-80DB-827762E9C781} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {C8E1772B-DFD9-4A4D-830D-6AAB1C668BB3} = {09EADF06-BE25-4228-AB53-95AE3E15B530} - {DBE14184-DC09-41E6-8BE7-D8529D9DF750} = {09EADF06-BE25-4228-AB53-95AE3E15B530} + {9222FC9D-599A-49A5-B685-08CC9A5C81D7} = {09EADF06-BE25-4228-AB53-95AE3E15B530} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D} diff --git a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj index 698d257c94..01cfa8e1e5 100644 --- a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj +++ b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj @@ -3,9 +3,9 @@ - + From a3792d921e1d9e2906c56b1f0bd923ded7468f84 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Thu, 8 Nov 2018 15:23:30 -0800 Subject: [PATCH 20/54] Update the estimator name to match new name --- src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs index b292877e1f..dce29cf5af 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs @@ -20,8 +20,8 @@ public static EstimatorChain ResNet18(this DnnImageModelSelector var tempCol = "onnxDnnPrep"; var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - var prepEstimator = new OnnxEstimator(model.Env, Path.Combine(execDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), model.Input, tempCol); - var mainEstimator = new OnnxEstimator(model.Env, Path.Combine(execDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, model.Output); + var prepEstimator = new OnnxScoringEstimator(model.Env, Path.Combine(execDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), model.Input, tempCol); + var mainEstimator = new OnnxScoringEstimator(model.Env, Path.Combine(execDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, model.Output); modelChain = modelChain.Append(prepEstimator); modelChain = modelChain.Append(mainEstimator); return modelChain; @@ -36,8 +36,8 @@ public static EstimatorChain ResNet18(this DnnImageModelSelector var modelChain = new EstimatorChain(); var tempCol = "onnxDnnPrep"; - var prepEstimator = new OnnxEstimator(model.Env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), model.Input, tempCol); - var mainEstimator = new OnnxEstimator(model.Env, Path.Combine(modelDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, model.Output); + var prepEstimator = new OnnxScoringEstimator(model.Env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), model.Input, tempCol); + var mainEstimator = new OnnxScoringEstimator(model.Env, Path.Combine(modelDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, model.Output); modelChain = modelChain.Append(prepEstimator); modelChain = modelChain.Append(mainEstimator); return modelChain; From 9338464b101b15da5b1327e4eb592cfd1d58d55e Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 9 Nov 2018 10:02:27 -0800 Subject: [PATCH 21/54] Change model download location and update the corresponding doc --- ...t.ML.DnnImageFeaturizer.ResNet18.nupkgproj | 4 ++-- ...soft.ML.DnnImageFeaturizer.ResNet18.csproj | 19 +++++++++++++------ .../ResNet18.cs | 6 +++++- .../DnnImageFeaturizerTest.cs | 12 ++++++------ 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj index 21c7a25438..6d87237edf 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj @@ -10,8 +10,8 @@ - - + + diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj index 3d0121b000..576a1078aa 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj @@ -11,22 +11,29 @@ + + $(AppData)/../Local + $(AppData)/../Local/mlnet-resources + + - + DestinationFile="$(MlnetAppDataDir)/ResNetPrepOnnx/ResNetPreprocess.onnx" + DestinationDir="$(MlnetAppDataDir)/ResNetPrepOnnx" /> - + DestinationFile="$(MlnetAppDataDir)/ResNet18Onnx/ResNet18.onnx" + DestinationDir="$(MlnetAppDataDir)/ResNet18Onnx" /> + + diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs index dce29cf5af..fdc4e224c3 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs @@ -9,7 +9,11 @@ namespace Microsoft.ML.Transforms { // This is an extension method to be used with the DnnImageFeaturizerTransform in order to use a pretrained ResNet18 model. - // The NuGet containing this extension is also guaranteed to include the binary model file. + // The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project + // containing this extension method, the corresponding binary model will be downloaded from the CDN at + // https://express-tlcresources.azureedge.net/image/ResNetPrepOnnx/ResNetPreprocess.onnx and + // https://express-tlcresources.azureedge.net/image/ResNet18Onnx/ResNet18.onnx and placed into the local app directory + // folder under mlnet-resources. public static class ResNet18Extension { // If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. diff --git a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs index 06fd99bb90..1b4a7c3f64 100644 --- a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs +++ b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs @@ -76,9 +76,9 @@ void TestDnnImageFeaturizer() var xyData = new List { new TestDataXY() { A = new float[inputSize] } }; var stringData = new List { new TestDataDifferntType() { data_0 = new string[inputSize] } }; var sizeData = new List { new TestDataSize() { data_0 = new float[2] } }; - var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - var pipe = new DnnImageFeaturizerEstimator(Env, m => m.ResNet18(Path.Combine(execDir, "..", "..", - "Microsoft.ML.DnnImageFeaturizer.ResNet18", "netstandard2.0")), "data_0", "output_1"); + var appDataBaseDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + var execDir = Path.Combine(appDataBaseDir, "mlnet-resources"); + var pipe = new DnnImageFeaturizerEstimator(Env, m => m.ResNet18(execDir), "data_0", "output_1"); var invalidDataWrongNames = ComponentCreation.CreateDataView(Env, xyData); var invalidDataWrongTypes = ComponentCreation.CreateDataView(Env, stringData); @@ -113,13 +113,13 @@ public void OnnxStatic() name: ctx.LoadText(1))) .Read(dataFile); - var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + var appDataBaseDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + var execDir = Path.Combine(appDataBaseDir, "mlnet-resources"); var pipe = data.MakeNewEstimator() .Append(row => ( row.name, data_0: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) - .Append(row => (row.name, output_1: row.data_0.DnnImageFeaturizer(m => m.ResNet18(Path.Combine(execDir, "..", "..", - "Microsoft.ML.DnnImageFeaturizer.ResNet18", "netstandard2.0"))))); + .Append(row => (row.name, output_1: row.data_0.DnnImageFeaturizer(m => m.ResNet18(execDir)))); TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); From 1e7c7ae055cd257acf55e6df8788bc32ded0c14b Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 9 Nov 2018 10:29:45 -0800 Subject: [PATCH 22/54] Actually fixed the download location --- .../Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj | 4 ++-- .../Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj index 6d87237edf..c0ffb97645 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj @@ -10,8 +10,8 @@ - - + + diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj index 576a1078aa..1ac7ae54d0 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj @@ -12,8 +12,8 @@ - $(AppData)/../Local - $(AppData)/../Local/mlnet-resources + $(LocalAppData) + $(LocalAppData)/mlnet-resources From ec352d45cc83a9a95d78231d07f07ff5fd760b3e Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 9 Nov 2018 13:21:08 -0800 Subject: [PATCH 23/54] Address PR comments and add experimental test (not enabled yet) --- .../ResNet18.cs | 17 ++--- .../DnnImageFeaturizerTransform.cs | 24 ++----- .../DnnImageFeaturizerTest.cs | 66 ++++++++++++++++++- 3 files changed, 79 insertions(+), 28 deletions(-) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs index fdc4e224c3..d9cb9793f5 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.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; using Microsoft.ML.Runtime.Data; using System.IO; using System.Reflection; @@ -18,30 +19,30 @@ public static class ResNet18Extension { // If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. // This should be the default way to use ResNet18 if importing the model from a NuGet. - public static EstimatorChain ResNet18(this DnnImageModelSelector model) + public static EstimatorChain ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output) { var modelChain = new EstimatorChain(); var tempCol = "onnxDnnPrep"; var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - var prepEstimator = new OnnxScoringEstimator(model.Env, Path.Combine(execDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), model.Input, tempCol); - var mainEstimator = new OnnxScoringEstimator(model.Env, Path.Combine(execDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, model.Output); + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, output); modelChain = modelChain.Append(prepEstimator); modelChain = modelChain.Append(mainEstimator); return modelChain; } - // This allows a custom model location to be specified. This is mainly useful for other code inside of ML.NET (such as tests), - // but could also be used if one wishes to change the directory of the model for whatever reason. Note that because Onnx models + // This allows a custom model location to be specified. This is useful is a custom model is specified, + // or if the model is desired to be placed or shipped separately in a different folder from the main application. Note that because Onnx models // must be in a directory all by themsleves for the OnnxTransform to work, this method appends a ResNet18Onnx/ResNetPrepOnnx subdirectory // to the passed in directory to prevent having to make that directory manually each time. - public static EstimatorChain ResNet18(this DnnImageModelSelector model, string modelDir) + public static EstimatorChain ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output, string modelDir) { var modelChain = new EstimatorChain(); var tempCol = "onnxDnnPrep"; - var prepEstimator = new OnnxScoringEstimator(model.Env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), model.Input, tempCol); - var mainEstimator = new OnnxScoringEstimator(model.Env, Path.Combine(modelDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, model.Output); + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, output); modelChain = modelChain.Append(prepEstimator); modelChain = modelChain.Append(mainEstimator); return modelChain; diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index 076a303bca..0b345c92f6 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -18,18 +18,8 @@ namespace Microsoft.ML.Transforms // is used by the DnnImageFeaturizeEstimator. // In order to use this, at least one model project with the corresponding extension methods must by included. // See Microsoft.ML.DNNImageFeaturizer.ResNet18 for an example. - public class DnnImageModelSelector + public sealed class DnnImageModelSelector { - public readonly IHostEnvironment Env; - public readonly string Input; - public readonly string Output; - - public DnnImageModelSelector(IHostEnvironment env, string input, string output) - { - Env = env; - Input = input; - Output = output; - } } // The Dnn Image Featurizer is just a wrapper around two OnnxTransforms with present pretrained DNN models. @@ -41,9 +31,9 @@ public sealed class DnnImageFeaturizerEstimator : IEstimator> model, string input, string output) + public DnnImageFeaturizerEstimator(IHostEnvironment env, Func> model, string input, string output) { - _modelChain = model(new DnnImageModelSelector(env, input, output)); + _modelChain = model(new DnnImageModelSelector(), env, input, output); } public TransformerChain Fit(IDataView input) @@ -63,7 +53,7 @@ private sealed class OutColumn : Vector { public PipelineColumn Input { get; } - public OutColumn(Vector input, Func> model) + public OutColumn(Vector input, Func> model) : base(new Reconciler(model), input) { Input = input; @@ -72,9 +62,9 @@ public OutColumn(Vector input, Func> _model; + private readonly Func> _model; - public Reconciler(Func> model) + public Reconciler(Func> model) { _model = model; } @@ -92,7 +82,7 @@ public override IEstimator Reconcile(IHostEnvironment env, } } - public static Vector DnnImageFeaturizer(this Vector input, Func> model) + public static Vector DnnImageFeaturizer(this Vector input, Func> model) { Contracts.CheckValue(input, nameof(input)); return new OutColumn(input, model); diff --git a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs index 1b4a7c3f64..03815c6b04 100644 --- a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs +++ b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs @@ -16,6 +16,7 @@ using Xunit; using Xunit.Abstractions; using System.Reflection; +using Microsoft.ML.Runtime.Model; namespace Microsoft.ML.Tests { @@ -48,7 +49,7 @@ private float[] getSampleArrayData() { var samplevector = new float[inputSize]; for (int i = 0; i < inputSize; i++) - samplevector[i] = (i / (inputSize * 1.01f)); + samplevector[i] = (i / ((float) inputSize)); return samplevector; } @@ -78,7 +79,7 @@ void TestDnnImageFeaturizer() var sizeData = new List { new TestDataSize() { data_0 = new float[2] } }; var appDataBaseDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); var execDir = Path.Combine(appDataBaseDir, "mlnet-resources"); - var pipe = new DnnImageFeaturizerEstimator(Env, m => m.ResNet18(execDir), "data_0", "output_1"); + var pipe = new DnnImageFeaturizerEstimator(Env, (m, env, input, output) => m.ResNet18(env, input, output, execDir), "data_0", "output_1"); var invalidDataWrongNames = ComponentCreation.CreateDataView(Env, xyData); var invalidDataWrongTypes = ComponentCreation.CreateDataView(Env, stringData); @@ -119,7 +120,7 @@ public void OnnxStatic() .Append(row => ( row.name, data_0: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) - .Append(row => (row.name, output_1: row.data_0.DnnImageFeaturizer(m => m.ResNet18(execDir)))); + .Append(row => (row.name, output_1: row.data_0.DnnImageFeaturizer((m, envi, input, estimator_output) => m.ResNet18(envi, input, estimator_output, execDir)))); TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); @@ -140,5 +141,64 @@ public void OnnxStatic() } } } + + /*[ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 fails with "An attempt was made to load a program with an incorrect format." + void TestOldSavingAndLoading() + { + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + return; + + + var samplevector = getSampleArrayData(); + + var dataView = ComponentCreation.CreateDataView(Env, + new TestData[] { + new TestData() + { + data_0 = samplevector + } + }); + + var inputNames = "data_0"; + var outputNames = "output_1"; + var appDataBaseDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + var execDir = Path.Combine(appDataBaseDir, "mlnet-resources"); + var est = new DnnImageFeaturizerEstimator(Env, (m, env, input, output) => m.ResNet18(env, input, output, execDir), inputNames, outputNames); + var transformer = est.Fit(dataView); + var result = transformer.Transform(dataView); + var resultRoles = new RoleMappedData(result); + using (var ms = new MemoryStream()) + { + TrainUtils.SaveModel(Env, Env.Start("saving"), ms, null, resultRoles); + ms.Position = 0; + var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms); + + loadedView.Schema.TryGetColumnIndex(outputNames, out int softMaxOut1); + using (var cursor = loadedView.GetRowCursor(col => col == softMaxOut1)) + { + VBuffer softMaxValue = default; + var softMaxGetter = cursor.GetGetter>(softMaxOut1); + float sum = 0f; + int i = 0; + while (cursor.MoveNext()) + { + softMaxGetter(ref softMaxValue); + var values = softMaxValue.DenseValues(); + foreach (var val in values) + { + sum += val; + if (i == 0) + Assert.InRange(val, 0.00004, 0.00005); + if (i == 1) + Assert.InRange(val, 0.003844, 0.003845); + if (i == 999) + Assert.InRange(val, 0.0029566, 0.0029567); + i++; + } + } + Assert.InRange(sum, 1.0, 1.00001); + } + } + }*/ } } From ee24322bb6196127c8146f03202cdc966fa72963 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 9 Nov 2018 13:41:11 -0800 Subject: [PATCH 24/54] Changed documentation style to use xml --- .../ResNet18.cs | 30 +++++++++++-------- .../DnnImageFeaturizerTransform.cs | 30 ++++++++++++------- 2 files changed, 38 insertions(+), 22 deletions(-) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs index d9cb9793f5..3280c11a00 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs @@ -9,16 +9,20 @@ namespace Microsoft.ML.Transforms { - // This is an extension method to be used with the DnnImageFeaturizerTransform in order to use a pretrained ResNet18 model. - // The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project - // containing this extension method, the corresponding binary model will be downloaded from the CDN at - // https://express-tlcresources.azureedge.net/image/ResNetPrepOnnx/ResNetPreprocess.onnx and - // https://express-tlcresources.azureedge.net/image/ResNet18Onnx/ResNet18.onnx and placed into the local app directory - // folder under mlnet-resources. + /// + /// This is an extension method to be used with the DnnImageFeaturizerTransform in order to use a pretrained ResNet18 model. + /// The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project + /// containing this extension method, the corresponding binary model will be downloaded from the CDN at + /// https://express-tlcresources.azureedge.net/image/ResNetPrepOnnx/ResNetPreprocess.onnx and + /// https://express-tlcresources.azureedge.net/image/ResNet18Onnx/ResNet18.onnx and placed into the local app directory + /// folder under mlnet-resources. + /// public static class ResNet18Extension { - // If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. - // This should be the default way to use ResNet18 if importing the model from a NuGet. + /// + /// If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. + /// This should be the default way to use ResNet18 if importing the model from a NuGet. + /// public static EstimatorChain ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output) { var modelChain = new EstimatorChain(); @@ -32,10 +36,12 @@ public static EstimatorChain ResNet18(this DnnImageModelSelector return modelChain; } - // This allows a custom model location to be specified. This is useful is a custom model is specified, - // or if the model is desired to be placed or shipped separately in a different folder from the main application. Note that because Onnx models - // must be in a directory all by themsleves for the OnnxTransform to work, this method appends a ResNet18Onnx/ResNetPrepOnnx subdirectory - // to the passed in directory to prevent having to make that directory manually each time. + /// + /// This allows a custom model location to be specified. This is useful is a custom model is specified, + /// or if the model is desired to be placed or shipped separately in a different folder from the main application. Note that because Onnx models + /// must be in a directory all by themsleves for the OnnxTransform to work, this method appends a ResNet18Onnx/ResNetPrepOnnx subdirectory + /// to the passed in directory to prevent having to make that directory manually each time. + /// public static EstimatorChain ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output, string modelDir) { var modelChain = new EstimatorChain(); diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index 0b345c92f6..e4a2460405 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -13,24 +13,34 @@ namespace Microsoft.ML.Transforms { - // This is a helper class that is required to use the DnnImageFeaturizer estimator. - // Note that by default, it is not usable as it does not have any valid methods that return an EstimatorChain that - // is used by the DnnImageFeaturizeEstimator. - // In order to use this, at least one model project with the corresponding extension methods must by included. - // See Microsoft.ML.DNNImageFeaturizer.ResNet18 for an example. + /// + /// This is a helper class that is required to use the DnnImageFeaturizer estimator. + /// Note that by default, it is not usable as it does not have any valid methods that return an EstimatorChain that + /// is used by the DnnImageFeaturizeEstimator. + /// In order to use this, at least one model project with the corresponding extension methods must by included. + /// See Microsoft.ML.DNNImageFeaturizer.ResNet18 for an example. + /// public sealed class DnnImageModelSelector { } - // The Dnn Image Featurizer is just a wrapper around two OnnxTransforms with present pretrained DNN models. - // Note that because of this, it only works on Windows machines as that is a constraint of the OnnxTransform. + /// + /// The Dnn Image Featurizer is just a wrapper around two OnnxTransforms with present pretrained DNN models. + /// Note that because of this, it only works on Windows machines as that is a constraint of the OnnxTransform. + /// public sealed class DnnImageFeaturizerEstimator : IEstimator> { private readonly EstimatorChain _modelChain; - // The function passed in to this method is expected to be an extension method on the DnnImageModelSelector class - // that creates a chain of two OnnxTransforms with specific models included together with that extension method. - // For an example, see Microsoft.ML.DnnImageFeaturizer.ResNet18. + /// + /// Constructor for the estimator for a DnnImageFeaturizer transform. + /// + /// Host environment. + /// An extension method on the DnnImageModelSelector class that creates a chain of two + /// OnnxTransforms with specific models included in a package together with that extension method. + /// For an example, see Microsoft.ML.DnnImageFeaturizer.ResNet18 + /// Input column name. + /// Output column name. public DnnImageFeaturizerEstimator(IHostEnvironment env, Func> model, string input, string output) { _modelChain = model(new DnnImageModelSelector(), env, input, output); From 6c97453d075d91567b0f6f151c9a5e3048323e89 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 9 Nov 2018 13:57:48 -0800 Subject: [PATCH 25/54] Add test that checks output results --- .../DnnImageFeaturizerTest.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs index 03815c6b04..45e90c3dc7 100644 --- a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs +++ b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs @@ -142,7 +142,7 @@ public void OnnxStatic() } } - /*[ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 fails with "An attempt was made to load a program with an incorrect format." + [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 fails with "An attempt was made to load a program with an incorrect format." void TestOldSavingAndLoading() { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) @@ -188,17 +188,17 @@ void TestOldSavingAndLoading() { sum += val; if (i == 0) - Assert.InRange(val, 0.00004, 0.00005); - if (i == 1) - Assert.InRange(val, 0.003844, 0.003845); - if (i == 999) - Assert.InRange(val, 0.0029566, 0.0029567); + Assert.InRange(val, 0.0, 0.00001); + if (i == 7) + Assert.InRange(val, 0.62935, 0.62940); + if (i == 500) + Assert.InRange(val, 0.15521, 0.155225); i++; } } - Assert.InRange(sum, 1.0, 1.00001); + Assert.InRange(sum, 83.50, 84.50); } } - }*/ + } } } From 24caec951b017461fcc3804ca1c7dccbf50eb95b Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 9 Nov 2018 14:10:42 -0800 Subject: [PATCH 26/54] Address more comments --- src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index e4a2460405..8bae8ddf96 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -46,6 +46,10 @@ public DnnImageFeaturizerEstimator(IHostEnvironment env, Func + /// Note that OnnxEstimator which this is based on is a trivial estimator, so this does not do any actual training, + /// just verifies the schema. + /// public TransformerChain Fit(IDataView input) { return _modelChain.Fit(input); From 3975134e05d9a845483f20f14ca3ecf00b3bc8ca Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 9 Nov 2018 14:36:53 -0800 Subject: [PATCH 27/54] Change param name to be more accurate --- .../DnnImageFeaturizerTransform.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index 8bae8ddf96..879572ce96 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -36,14 +36,14 @@ public sealed class DnnImageFeaturizerEstimator : IEstimator /// Host environment. - /// An extension method on the DnnImageModelSelector class that creates a chain of two + /// An extension method on the DnnImageModelSelector class that creates a chain of two /// OnnxTransforms with specific models included in a package together with that extension method. /// For an example, see Microsoft.ML.DnnImageFeaturizer.ResNet18 /// Input column name. /// Output column name. - public DnnImageFeaturizerEstimator(IHostEnvironment env, Func> model, string input, string output) + public DnnImageFeaturizerEstimator(IHostEnvironment env, Func> modelFactory, string input, string output) { - _modelChain = model(new DnnImageModelSelector(), env, input, output); + _modelChain = modelFactory(new DnnImageModelSelector(), env, input, output); } /// From bf25371181c5403d1fb665c9c4c52e6ea560407f Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 9 Nov 2018 14:49:24 -0800 Subject: [PATCH 28/54] Added refs to documentation --- src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs | 2 +- .../DnnImageFeaturizerTransform.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs index 3280c11a00..5099272d61 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs @@ -10,7 +10,7 @@ namespace Microsoft.ML.Transforms { /// - /// This is an extension method to be used with the DnnImageFeaturizerTransform in order to use a pretrained ResNet18 model. + /// This is an extension method to be used with the in order to use a pretrained ResNet18 model. /// The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project /// containing this extension method, the corresponding binary model will be downloaded from the CDN at /// https://express-tlcresources.azureedge.net/image/ResNetPrepOnnx/ResNetPreprocess.onnx and diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index 879572ce96..2a6fd83db1 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -14,7 +14,7 @@ namespace Microsoft.ML.Transforms { /// - /// This is a helper class that is required to use the DnnImageFeaturizer estimator. + /// This is a helper class that is required to use the . /// Note that by default, it is not usable as it does not have any valid methods that return an EstimatorChain that /// is used by the DnnImageFeaturizeEstimator. /// In order to use this, at least one model project with the corresponding extension methods must by included. @@ -25,7 +25,7 @@ public sealed class DnnImageModelSelector } /// - /// The Dnn Image Featurizer is just a wrapper around two OnnxTransforms with present pretrained DNN models. + /// The Dnn Image Featurizer is just a wrapper around two s with present pretrained DNN models. /// Note that because of this, it only works on Windows machines as that is a constraint of the OnnxTransform. /// public sealed class DnnImageFeaturizerEstimator : IEstimator> @@ -36,8 +36,8 @@ public sealed class DnnImageFeaturizerEstimator : IEstimator /// Host environment. - /// An extension method on the DnnImageModelSelector class that creates a chain of two - /// OnnxTransforms with specific models included in a package together with that extension method. + /// An extension method on the that creates a chain of two + /// s with specific models included in a package together with that extension method. /// For an example, see Microsoft.ML.DnnImageFeaturizer.ResNet18 /// Input column name. /// Output column name. From c72bcfebcef4503ca000bcb3ff0686f579827b98 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 9 Nov 2018 14:52:24 -0800 Subject: [PATCH 29/54] Add one more ref --- src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index 2a6fd83db1..759f2d2aa9 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -15,8 +15,8 @@ namespace Microsoft.ML.Transforms { /// /// This is a helper class that is required to use the . - /// Note that by default, it is not usable as it does not have any valid methods that return an EstimatorChain that - /// is used by the DnnImageFeaturizeEstimator. + /// Note that by default, it is not usable as it does not have any valid methods that return an + /// that is used by the DnnImageFeaturizeEstimator. /// In order to use this, at least one model project with the corresponding extension methods must by included. /// See Microsoft.ML.DNNImageFeaturizer.ResNet18 for an example. /// From 2bb216300b87f10e5e1656d37831423680b62a9a Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 9 Nov 2018 17:00:00 -0800 Subject: [PATCH 30/54] Added all 4 different models --- Microsoft.ML.sln | 33 +++++++++++ ...ft.ML.DnnImageFeaturizer.AlexNet.nupkgproj | 17 ++++++ ...nImageFeaturizer.AlexNet.symbols.nupkgproj | 5 ++ ....ML.DnnImageFeaturizer.ResNet101.nupkgproj | 17 ++++++ ...mageFeaturizer.ResNet101.symbols.nupkgproj | 5 ++ ...t.ML.DnnImageFeaturizer.ResNet50.nupkgproj | 17 ++++++ ...ImageFeaturizer.ResNet50.symbols.nupkgproj | 5 ++ .../AlexNet.cs | 57 +++++++++++++++++++ ...osoft.ML.DnnImageFeaturizer.AlexNet.csproj | 50 ++++++++++++++++ ...oft.ML.DnnImageFeaturizer.ResNet101.csproj | 50 ++++++++++++++++ .../ResNet101.cs | 57 +++++++++++++++++++ ...soft.ML.DnnImageFeaturizer.ResNet50.csproj | 50 ++++++++++++++++ .../ResNet50.cs | 57 +++++++++++++++++++ 13 files changed, 420 insertions(+) create mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj create mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.symbols.nupkgproj create mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj create mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.symbols.nupkgproj create mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj create mode 100644 pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.symbols.nupkgproj create mode 100644 src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs create mode 100644 src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj create mode 100644 src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj create mode 100644 src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs create mode 100644 src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj create mode 100644 src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs diff --git a/Microsoft.ML.sln b/Microsoft.ML.sln index 53624ae6d9..0635bfb168 100644 --- a/Microsoft.ML.sln +++ b/Microsoft.ML.sln @@ -137,6 +137,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Recommender", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.DnnImageFeaturizer.ResNet18", "src\Microsoft.ML.DnnImageFeaturizer.ResNet18\Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj", "{9222FC9D-599A-49A5-B685-08CC9A5C81D7}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.DnnImageFeaturizer.AlexNet", "src\Microsoft.ML.DnnImageFeaturizer.AlexNet\Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj", "{6C29AA9B-054B-4762-BEA5-D305B932AA80}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.DnnImageFeaturizer.ResNet50", "src\Microsoft.ML.DnnImageFeaturizer.ResNet50\Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj", "{4805129D-78C8-46D4-9519-0AD9B0574D6D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.DnnImageFeaturizer.ResNet101", "src\Microsoft.ML.DnnImageFeaturizer.ResNet101\Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj", "{DB7CEB5E-8BE6-48A7-87BE-B91D9AE96F71}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -521,6 +527,30 @@ Global {9222FC9D-599A-49A5-B685-08CC9A5C81D7}.Release|Any CPU.Build.0 = Release|Any CPU {9222FC9D-599A-49A5-B685-08CC9A5C81D7}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU {9222FC9D-599A-49A5-B685-08CC9A5C81D7}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU + {6C29AA9B-054B-4762-BEA5-D305B932AA80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C29AA9B-054B-4762-BEA5-D305B932AA80}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C29AA9B-054B-4762-BEA5-D305B932AA80}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU + {6C29AA9B-054B-4762-BEA5-D305B932AA80}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU + {6C29AA9B-054B-4762-BEA5-D305B932AA80}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C29AA9B-054B-4762-BEA5-D305B932AA80}.Release|Any CPU.Build.0 = Release|Any CPU + {6C29AA9B-054B-4762-BEA5-D305B932AA80}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU + {6C29AA9B-054B-4762-BEA5-D305B932AA80}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU + {4805129D-78C8-46D4-9519-0AD9B0574D6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4805129D-78C8-46D4-9519-0AD9B0574D6D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4805129D-78C8-46D4-9519-0AD9B0574D6D}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU + {4805129D-78C8-46D4-9519-0AD9B0574D6D}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU + {4805129D-78C8-46D4-9519-0AD9B0574D6D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4805129D-78C8-46D4-9519-0AD9B0574D6D}.Release|Any CPU.Build.0 = Release|Any CPU + {4805129D-78C8-46D4-9519-0AD9B0574D6D}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU + {4805129D-78C8-46D4-9519-0AD9B0574D6D}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU + {DB7CEB5E-8BE6-48A7-87BE-B91D9AE96F71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB7CEB5E-8BE6-48A7-87BE-B91D9AE96F71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB7CEB5E-8BE6-48A7-87BE-B91D9AE96F71}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU + {DB7CEB5E-8BE6-48A7-87BE-B91D9AE96F71}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU + {DB7CEB5E-8BE6-48A7-87BE-B91D9AE96F71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB7CEB5E-8BE6-48A7-87BE-B91D9AE96F71}.Release|Any CPU.Build.0 = Release|Any CPU + {DB7CEB5E-8BE6-48A7-87BE-B91D9AE96F71}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU + {DB7CEB5E-8BE6-48A7-87BE-B91D9AE96F71}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -578,6 +608,9 @@ Global {11A5210E-2EA7-42F1-80DB-827762E9C781} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {C8E1772B-DFD9-4A4D-830D-6AAB1C668BB3} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {9222FC9D-599A-49A5-B685-08CC9A5C81D7} = {09EADF06-BE25-4228-AB53-95AE3E15B530} + {6C29AA9B-054B-4762-BEA5-D305B932AA80} = {09EADF06-BE25-4228-AB53-95AE3E15B530} + {4805129D-78C8-46D4-9519-0AD9B0574D6D} = {09EADF06-BE25-4228-AB53-95AE3E15B530} + {DB7CEB5E-8BE6-48A7-87BE-B91D9AE96F71} = {09EADF06-BE25-4228-AB53-95AE3E15B530} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D} diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj new file mode 100644 index 0000000000..1f9c61a123 --- /dev/null +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj @@ -0,0 +1,17 @@ + + + + netstandard2.0 + ML.NET component for pretrained AlexNet image featurization + + + + + + + + + + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.symbols.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.symbols.nupkgproj new file mode 100644 index 0000000000..8c6a7fcc4c --- /dev/null +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.symbols.nupkgproj @@ -0,0 +1,5 @@ + + + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj new file mode 100644 index 0000000000..25a40a305f --- /dev/null +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj @@ -0,0 +1,17 @@ + + + + netstandard2.0 + ML.NET component for pretrained ResNet101 image featurization + + + + + + + + + + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.symbols.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.symbols.nupkgproj new file mode 100644 index 0000000000..7035bef747 --- /dev/null +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.symbols.nupkgproj @@ -0,0 +1,5 @@ + + + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj new file mode 100644 index 0000000000..5d1add2a23 --- /dev/null +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj @@ -0,0 +1,17 @@ + + + + netstandard2.0 + ML.NET component for pretrained ResNet50 image featurization + + + + + + + + + + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.symbols.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.symbols.nupkgproj new file mode 100644 index 0000000000..2b04e494f9 --- /dev/null +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.symbols.nupkgproj @@ -0,0 +1,5 @@ + + + + + diff --git a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs new file mode 100644 index 0000000000..8b95f65520 --- /dev/null +++ b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs @@ -0,0 +1,57 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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; +using Microsoft.ML.Runtime.Data; +using System.IO; +using System.Reflection; + +namespace Microsoft.ML.Transforms +{ + /// + /// This is an extension method to be used with the in order to use a pretrained AlexNet model. + /// The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project + /// containing this extension method, the corresponding binary model will be downloaded from the CDN at + /// https://express-tlcresources.azureedge.net/image/AlexNetPrepOnnx/AlexNetPreprocess.onnx and + /// https://express-tlcresources.azureedge.net/image/AlexNetOnnx/AlexNet.onnx and placed into the local app directory + /// folder under mlnet-resources. + /// + public static class AlexNetExtension + { + /// + /// If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. + /// This should be the default way to use AlexNet if importing the model from a NuGet. + /// + public static EstimatorChain AlexNet(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output) + { + var modelChain = new EstimatorChain(); + var tempCol = "onnxDnnPrep"; + var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "AlexNetPrepOnnx", "AlexNetPreprocess.onnx"), input, tempCol); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "AlexNetOnnx", "AlexNet.onnx"), tempCol, output); + modelChain = modelChain.Append(prepEstimator); + modelChain = modelChain.Append(mainEstimator); + return modelChain; + } + + /// + /// This allows a custom model location to be specified. This is useful is a custom model is specified, + /// or if the model is desired to be placed or shipped separately in a different folder from the main application. Note that because Onnx models + /// must be in a directory all by themsleves for the OnnxTransform to work, this method appends a AlexNetOnnx/AlexNetPrepOnnx subdirectory + /// to the passed in directory to prevent having to make that directory manually each time. + /// + public static EstimatorChain AlexNet(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output, string modelDir) + { + var modelChain = new EstimatorChain(); + var tempCol = "onnxDnnPrep"; + + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "AlexNetPrepOnnx", "AlexNetPreprocess.onnx"), input, tempCol); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "AlexNetOnnx", "AlexNet.onnx"), tempCol, output); + modelChain = modelChain.Append(prepEstimator); + modelChain = modelChain.Append(mainEstimator); + return modelChain; + } + } +} \ No newline at end of file diff --git a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj new file mode 100644 index 0000000000..a500d5d8a7 --- /dev/null +++ b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj @@ -0,0 +1,50 @@ + + + + + + netstandard2.0 + Microsoft.ML.DnnImageFeaturizer.AlexNet + + + + + + + + $(LocalAppData) + $(LocalAppData)/mlnet-resources + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj new file mode 100644 index 0000000000..89d409e624 --- /dev/null +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj @@ -0,0 +1,50 @@ + + + + + + netstandard2.0 + Microsoft.ML.DnnImageFeaturizer.ResNet101 + + + + + + + + $(LocalAppData) + $(LocalAppData)/mlnet-resources + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs new file mode 100644 index 0000000000..2c035b9e1b --- /dev/null +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs @@ -0,0 +1,57 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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; +using Microsoft.ML.Runtime.Data; +using System.IO; +using System.Reflection; + +namespace Microsoft.ML.Transforms +{ + /// + /// This is an extension method to be used with the in order to use a pretrained ResNet101 model. + /// The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project + /// containing this extension method, the corresponding binary model will be downloaded from the CDN at + /// https://express-tlcresources.azureedge.net/image/ResNetPrepOnnx/ResNetPreprocess.onnx and + /// https://express-tlcresources.azureedge.net/image/ResNet101Onnx/ResNet101.onnx and placed into the local app directory + /// folder under mlnet-resources. + /// + public static class ResNet101Extension + { + /// + /// If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. + /// This should be the default way to use ResNet101 if importing the model from a NuGet. + /// + public static EstimatorChain ResNet101(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output) + { + var modelChain = new EstimatorChain(); + var tempCol = "onnxDnnPrep"; + var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNet101Onnx", "ResNet101.onnx"), tempCol, output); + modelChain = modelChain.Append(prepEstimator); + modelChain = modelChain.Append(mainEstimator); + return modelChain; + } + + /// + /// This allows a custom model location to be specified. This is useful is a custom model is specified, + /// or if the model is desired to be placed or shipped separately in a different folder from the main application. Note that because Onnx models + /// must be in a directory all by themsleves for the OnnxTransform to work, this method appends a ResNet101Onnx/ResNetPrepOnnx subdirectory + /// to the passed in directory to prevent having to make that directory manually each time. + /// + public static EstimatorChain ResNet101(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output, string modelDir) + { + var modelChain = new EstimatorChain(); + var tempCol = "onnxDnnPrep"; + + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet101Onnx", "ResNet101.onnx"), tempCol, output); + modelChain = modelChain.Append(prepEstimator); + modelChain = modelChain.Append(mainEstimator); + return modelChain; + } + } +} \ No newline at end of file diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj new file mode 100644 index 0000000000..40098733c0 --- /dev/null +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj @@ -0,0 +1,50 @@ + + + + + + netstandard2.0 + Microsoft.ML.DnnImageFeaturizer.ResNet50 + + + + + + + + $(LocalAppData) + $(LocalAppData)/mlnet-resources + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs new file mode 100644 index 0000000000..0c47333b35 --- /dev/null +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs @@ -0,0 +1,57 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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; +using Microsoft.ML.Runtime.Data; +using System.IO; +using System.Reflection; + +namespace Microsoft.ML.Transforms +{ + /// + /// This is an extension method to be used with the in order to use a pretrained ResNet50 model. + /// The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project + /// containing this extension method, the corresponding binary model will be downloaded from the CDN at + /// https://express-tlcresources.azureedge.net/image/ResNetPrepOnnx/ResNetPreprocess.onnx and + /// https://express-tlcresources.azureedge.net/image/ResNet50Onnx/ResNet50.onnx and placed into the local app directory + /// folder under mlnet-resources. + /// + public static class ResNet50Extension + { + /// + /// If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. + /// This should be the default way to use ResNet50 if importing the model from a NuGet. + /// + public static EstimatorChain ResNet50(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output) + { + var modelChain = new EstimatorChain(); + var tempCol = "onnxDnnPrep"; + var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNet50Onnx", "ResNet50.onnx"), tempCol, output); + modelChain = modelChain.Append(prepEstimator); + modelChain = modelChain.Append(mainEstimator); + return modelChain; + } + + /// + /// This allows a custom model location to be specified. This is useful is a custom model is specified, + /// or if the model is desired to be placed or shipped separately in a different folder from the main application. Note that because Onnx models + /// must be in a directory all by themsleves for the OnnxTransform to work, this method appends a ResNet50Onnx/ResNetPrepOnnx subdirectory + /// to the passed in directory to prevent having to make that directory manually each time. + /// + public static EstimatorChain ResNet50(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output, string modelDir) + { + var modelChain = new EstimatorChain(); + var tempCol = "onnxDnnPrep"; + + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet50Onnx", "ResNet50.onnx"), tempCol, output); + modelChain = modelChain.Append(prepEstimator); + modelChain = modelChain.Append(mainEstimator); + return modelChain; + } + } +} \ No newline at end of file From 4cdd1eba826cbade2abc82dce241e0b2b5fb9c49 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 9 Nov 2018 18:02:34 -0800 Subject: [PATCH 31/54] Address comments --- .../DnnImageFeaturizerTransform.cs | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index 759f2d2aa9..eae287ce37 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -67,8 +67,8 @@ private sealed class OutColumn : Vector { public PipelineColumn Input { get; } - public OutColumn(Vector input, Func> model) - : base(new Reconciler(model), input) + public OutColumn(Vector input, Func> modelFactory) + : base(new Reconciler(modelFactory), input) { Input = input; } @@ -76,11 +76,11 @@ public OutColumn(Vector input, Func> _model; + private readonly Func> _modelFactory; - public Reconciler(Func> model) + public Reconciler(Func> modelFactory) { - _model = model; + _modelFactory = modelFactory; } public override IEstimator Reconcile(IHostEnvironment env, @@ -92,14 +92,23 @@ public override IEstimator Reconcile(IHostEnvironment env, Contracts.Assert(toOutput.Length == 1); var outCol = (OutColumn)toOutput[0]; - return new DnnImageFeaturizerEstimator(env, _model, inputNames[outCol.Input], outputNames[outCol]); + return new DnnImageFeaturizerEstimator(env, _modelFactory, inputNames[outCol.Input], outputNames[outCol]); } } - public static Vector DnnImageFeaturizer(this Vector input, Func> model) + /// + /// Creates a DnnImageFeaturizer transform to be used by the static API. + /// for more information about how the transformation works. + /// + /// Vector of image pixel weights. + /// An extension method on the that creates a chain of two + /// s with specific models included in a package together with that extension method. + /// For an example, see Microsoft.ML.DnnImageFeaturizer.ResNet18 + /// A vector of float feature weights based on the input image. + public static Vector DnnImageFeaturizer(this Vector input, Func> modelFactory) { Contracts.CheckValue(input, nameof(input)); - return new OutColumn(input, model); + return new OutColumn(input, modelFactory); } } } From af7a844cae486bd83e90b623c4373995f29ccbf6 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 9 Nov 2018 18:16:10 -0800 Subject: [PATCH 32/54] Address more comments --- .../DnnImageFeaturizerTransform.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index eae287ce37..f1c1fe126d 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -37,7 +37,8 @@ public sealed class DnnImageFeaturizerEstimator : IEstimator /// Host environment. /// An extension method on the that creates a chain of two - /// s with specific models included in a package together with that extension method. + /// s (one for preprocessing and one with a pretrained image DNN) with specific models + /// included in a package together with that extension method. /// For an example, see Microsoft.ML.DnnImageFeaturizer.ResNet18 /// Input column name. /// Output column name. @@ -97,12 +98,13 @@ public override IEstimator Reconcile(IHostEnvironment env, } /// - /// Creates a DnnImageFeaturizer transform to be used by the static API. + /// Creates and applies a DnnImageFeaturizer transform to be used by the static API. /// for more information about how the transformation works. /// /// Vector of image pixel weights. /// An extension method on the that creates a chain of two - /// s with specific models included in a package together with that extension method. + /// s (one for preprocessing and one with a pretrained image DNN) with specific models + /// included in a package together with that extension method. /// For an example, see Microsoft.ML.DnnImageFeaturizer.ResNet18 /// A vector of float feature weights based on the input image. public static Vector DnnImageFeaturizer(this Vector input, Func> modelFactory) From 0e2d617e7ed2303b0c47a6724076e5be504833dc Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Fri, 9 Nov 2018 18:30:14 -0800 Subject: [PATCH 33/54] More comment fixes --- src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs | 1 + src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs | 1 + src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs | 1 + src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs | 1 + 4 files changed, 4 insertions(+) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs index 8b95f65520..0c512924c2 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs @@ -29,6 +29,7 @@ public static EstimatorChain AlexNet(this DnnImageModelSelector d var tempCol = "onnxDnnPrep"; var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "AlexNetPrepOnnx", "AlexNetPreprocess.onnx"), input, tempCol); var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "AlexNetOnnx", "AlexNet.onnx"), tempCol, output); modelChain = modelChain.Append(prepEstimator); diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs index 2c035b9e1b..391ff424b8 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs @@ -29,6 +29,7 @@ public static EstimatorChain ResNet101(this DnnImageModelSelector var tempCol = "onnxDnnPrep"; var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNet101Onnx", "ResNet101.onnx"), tempCol, output); modelChain = modelChain.Append(prepEstimator); diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs index 5099272d61..262e94dcaa 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs @@ -29,6 +29,7 @@ public static EstimatorChain ResNet18(this DnnImageModelSelector var tempCol = "onnxDnnPrep"; var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, output); modelChain = modelChain.Append(prepEstimator); diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs index 0c47333b35..bae60abe25 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs @@ -29,6 +29,7 @@ public static EstimatorChain ResNet50(this DnnImageModelSelector var tempCol = "onnxDnnPrep"; var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNet50Onnx", "ResNet50.onnx"), tempCol, output); modelChain = modelChain.Append(prepEstimator); From e9e60b0a36c9d9ec24c07f9c574cbc4a1d178b87 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Mon, 12 Nov 2018 11:43:33 -0800 Subject: [PATCH 34/54] Address some of the comments --- .../AlexNet.cs | 20 ++--- .../ResNet101.cs | 20 ++--- .../ResNet18.cs | 20 ++--- .../ResNet50.cs | 20 ++--- .../DnnImageFeaturizerTransform.cs | 36 +++++++-- .../DnnImageFeaturizerTest.cs | 79 ++++++++++--------- 6 files changed, 92 insertions(+), 103 deletions(-) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs index 0c512924c2..0ef49c852d 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs @@ -23,18 +23,9 @@ public static class AlexNetExtension /// If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. /// This should be the default way to use AlexNet if importing the model from a NuGet. /// - public static EstimatorChain AlexNet(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output) + public static EstimatorChain AlexNet(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) { - var modelChain = new EstimatorChain(); - var tempCol = "onnxDnnPrep"; - var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - - // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. - var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "AlexNetPrepOnnx", "AlexNetPreprocess.onnx"), input, tempCol); - var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "AlexNetOnnx", "AlexNet.onnx"), tempCol, output); - modelChain = modelChain.Append(prepEstimator); - modelChain = modelChain.Append(mainEstimator); - return modelChain; + return AlexNet(dnnModelContext, env, inputColumn, outputColumn, Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); } /// @@ -43,13 +34,14 @@ public static EstimatorChain AlexNet(this DnnImageModelSelector d /// must be in a directory all by themsleves for the OnnxTransform to work, this method appends a AlexNetOnnx/AlexNetPrepOnnx subdirectory /// to the passed in directory to prevent having to make that directory manually each time. /// - public static EstimatorChain AlexNet(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output, string modelDir) + public static EstimatorChain AlexNet(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn, string modelDir) { var modelChain = new EstimatorChain(); var tempCol = "onnxDnnPrep"; - var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "AlexNetPrepOnnx", "AlexNetPreprocess.onnx"), input, tempCol); - var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "AlexNetOnnx", "AlexNet.onnx"), tempCol, output); + // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "AlexNetPrepOnnx", "AlexNetPreprocess.onnx"), inputColumn, tempCol); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "AlexNetOnnx", "AlexNet.onnx"), tempCol, outputColumn); modelChain = modelChain.Append(prepEstimator); modelChain = modelChain.Append(mainEstimator); return modelChain; diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs index 391ff424b8..2ce26a25e8 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs @@ -23,18 +23,9 @@ public static class ResNet101Extension /// If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. /// This should be the default way to use ResNet101 if importing the model from a NuGet. /// - public static EstimatorChain ResNet101(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output) + public static EstimatorChain ResNet101(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) { - var modelChain = new EstimatorChain(); - var tempCol = "onnxDnnPrep"; - var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - - // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. - var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); - var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNet101Onnx", "ResNet101.onnx"), tempCol, output); - modelChain = modelChain.Append(prepEstimator); - modelChain = modelChain.Append(mainEstimator); - return modelChain; + return ResNet101(dnnModelContext, env, inputColumn, outputColumn, Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); } /// @@ -43,13 +34,14 @@ public static EstimatorChain ResNet101(this DnnImageModelSelector /// must be in a directory all by themsleves for the OnnxTransform to work, this method appends a ResNet101Onnx/ResNetPrepOnnx subdirectory /// to the passed in directory to prevent having to make that directory manually each time. /// - public static EstimatorChain ResNet101(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output, string modelDir) + public static EstimatorChain ResNet101(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn, string modelDir) { var modelChain = new EstimatorChain(); var tempCol = "onnxDnnPrep"; - var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); - var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet101Onnx", "ResNet101.onnx"), tempCol, output); + // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), inputColumn, tempCol); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet101Onnx", "ResNet101.onnx"), tempCol, outputColumn); modelChain = modelChain.Append(prepEstimator); modelChain = modelChain.Append(mainEstimator); return modelChain; diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs index 262e94dcaa..e665f338e7 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs @@ -23,18 +23,9 @@ public static class ResNet18Extension /// If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. /// This should be the default way to use ResNet18 if importing the model from a NuGet. /// - public static EstimatorChain ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output) + public static EstimatorChain ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) { - var modelChain = new EstimatorChain(); - var tempCol = "onnxDnnPrep"; - var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - - // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. - var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); - var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, output); - modelChain = modelChain.Append(prepEstimator); - modelChain = modelChain.Append(mainEstimator); - return modelChain; + return ResNet18(dnnModelContext, env, inputColumn, outputColumn, Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); } /// @@ -43,13 +34,14 @@ public static EstimatorChain ResNet18(this DnnImageModelSelector /// must be in a directory all by themsleves for the OnnxTransform to work, this method appends a ResNet18Onnx/ResNetPrepOnnx subdirectory /// to the passed in directory to prevent having to make that directory manually each time. /// - public static EstimatorChain ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output, string modelDir) + public static EstimatorChain ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn, string modelDir) { var modelChain = new EstimatorChain(); var tempCol = "onnxDnnPrep"; - var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); - var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, output); + // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), inputColumn, tempCol); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, outputColumn); modelChain = modelChain.Append(prepEstimator); modelChain = modelChain.Append(mainEstimator); return modelChain; diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs index bae60abe25..71da0eee2d 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs @@ -23,18 +23,9 @@ public static class ResNet50Extension /// If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. /// This should be the default way to use ResNet50 if importing the model from a NuGet. /// - public static EstimatorChain ResNet50(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output) + public static EstimatorChain ResNet50(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) { - var modelChain = new EstimatorChain(); - var tempCol = "onnxDnnPrep"; - var execDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - - // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. - var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); - var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(execDir, "ResNet50Onnx", "ResNet50.onnx"), tempCol, output); - modelChain = modelChain.Append(prepEstimator); - modelChain = modelChain.Append(mainEstimator); - return modelChain; + return ResNet50(dnnModelContext, env, inputColumn, outputColumn, Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); } /// @@ -43,13 +34,14 @@ public static EstimatorChain ResNet50(this DnnImageModelSelector /// must be in a directory all by themsleves for the OnnxTransform to work, this method appends a ResNet50Onnx/ResNetPrepOnnx subdirectory /// to the passed in directory to prevent having to make that directory manually each time. /// - public static EstimatorChain ResNet50(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string input, string output, string modelDir) + public static EstimatorChain ResNet50(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn, string modelDir) { var modelChain = new EstimatorChain(); var tempCol = "onnxDnnPrep"; - var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), input, tempCol); - var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet50Onnx", "ResNet50.onnx"), tempCol, output); + // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), inputColumn, tempCol); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet50Onnx", "ResNet50.onnx"), tempCol, outputColumn); modelChain = modelChain.Append(prepEstimator); modelChain = modelChain.Append(mainEstimator); return modelChain; diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index f1c1fe126d..33a3e8ecbd 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -24,6 +24,26 @@ public sealed class DnnImageModelSelector { } + /// + /// This is a helper class used to store all the inputs to an extension method on a DnnImageModelSelector required to return + /// a chain of two s. + /// + public sealed class DnnImageFeaturizerInput + { + public readonly IHostEnvironment Env; + public readonly string InputColumn; + public readonly DnnImageModelSelector ModelSelector; + public readonly string OutputColumn; + + public DnnImageFeaturizerInput(IHostEnvironment env, string inputColumn, string outputColumn, DnnImageModelSelector modelSelector) + { + Env = env; + InputColumn = inputColumn; + OutputColumn = outputColumn; + ModelSelector = modelSelector; + } + } + /// /// The Dnn Image Featurizer is just a wrapper around two s with present pretrained DNN models. /// Note that because of this, it only works on Windows machines as that is a constraint of the OnnxTransform. @@ -40,11 +60,11 @@ public sealed class DnnImageFeaturizerEstimator : IEstimators (one for preprocessing and one with a pretrained image DNN) with specific models /// included in a package together with that extension method. /// For an example, see Microsoft.ML.DnnImageFeaturizer.ResNet18 - /// Input column name. - /// Output column name. - public DnnImageFeaturizerEstimator(IHostEnvironment env, Func> modelFactory, string input, string output) + /// inputColumn column name. + /// Output column name. + public DnnImageFeaturizerEstimator(IHostEnvironment env, Func> modelFactory, string inputColumn, string outputColumn) { - _modelChain = modelFactory(new DnnImageModelSelector(), env, input, output); + _modelChain = modelFactory( new DnnImageFeaturizerInput(env, inputColumn, outputColumn, new DnnImageModelSelector())); } /// @@ -68,7 +88,7 @@ private sealed class OutColumn : Vector { public PipelineColumn Input { get; } - public OutColumn(Vector input, Func> modelFactory) + public OutColumn(Vector input, Func> modelFactory) : base(new Reconciler(modelFactory), input) { Input = input; @@ -77,9 +97,9 @@ public OutColumn(Vector input, Func> _modelFactory; + private readonly Func> _modelFactory; - public Reconciler(Func> modelFactory) + public Reconciler(Func> modelFactory) { _modelFactory = modelFactory; } @@ -107,7 +127,7 @@ public override IEstimator Reconcile(IHostEnvironment env, /// included in a package together with that extension method. /// For an example, see Microsoft.ML.DnnImageFeaturizer.ResNet18 /// A vector of float feature weights based on the input image. - public static Vector DnnImageFeaturizer(this Vector input, Func> modelFactory) + public static Vector DnnImageFeaturizer(this Vector input, Func> modelFactory) { Contracts.CheckValue(input, nameof(input)); return new OutColumn(input, modelFactory); diff --git a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs index 45e90c3dc7..a43dcd0518 100644 --- a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs +++ b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs @@ -57,6 +57,7 @@ public DnnImageFeaturizerTests(ITestOutputHelper helper) : base(helper) { } + // Onnx is only supported on x64 Windows [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] void TestDnnImageFeaturizer() { @@ -79,7 +80,7 @@ void TestDnnImageFeaturizer() var sizeData = new List { new TestDataSize() { data_0 = new float[2] } }; var appDataBaseDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); var execDir = Path.Combine(appDataBaseDir, "mlnet-resources"); - var pipe = new DnnImageFeaturizerEstimator(Env, (m, env, input, output) => m.ResNet18(env, input, output, execDir), "data_0", "output_1"); + var pipe = new DnnImageFeaturizerEstimator(Env, m => m.ModelSelector.ResNet18(m.Env, m.InputColumn, m.OutputColumn), "data_0", "output_1"); var invalidDataWrongNames = ComponentCreation.CreateDataView(Env, xyData); var invalidDataWrongTypes = ComponentCreation.CreateDataView(Env, stringData); @@ -96,54 +97,54 @@ void TestDnnImageFeaturizer() catch (InvalidOperationException) { } } - [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 fails with "An attempt was made to load a program with an incorrect format." + // Onnx is only supported on x64 Windows + [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] public void OnnxStatic() { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return; - using (var env = new ConsoleEnvironment(null, false, 0, 1, null, null)) + var env = new MLContext(null, 1); + var imageHeight = 224; + var imageWidth = 224; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + + var data = TextLoader.CreateReader(env, ctx => ( + imagePath: ctx.LoadText(0), + name: ctx.LoadText(1))) + .Read(dataFile); + + var appDataBaseDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + var execDir = Path.Combine(appDataBaseDir, "mlnet-resources"); + var pipe = data.MakeNewEstimator() + .Append(row => ( + row.name, + data_0: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) + .Append(row => (row.name, output_1: row.data_0.DnnImageFeaturizer(m => m.ModelSelector.ResNet18(m.Env, m.InputColumn, m.OutputColumn)))); + + TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); + + var result = pipe.Fit(data).Transform(data).AsDynamic; + result.Schema.TryGetColumnIndex("output_1", out int output); + using (var cursor = result.GetRowCursor(col => col == output)) { - var imageHeight = 224; - var imageWidth = 224; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - - var data = TextLoader.CreateReader(env, ctx => ( - imagePath: ctx.LoadText(0), - name: ctx.LoadText(1))) - .Read(dataFile); - - var appDataBaseDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); - var execDir = Path.Combine(appDataBaseDir, "mlnet-resources"); - var pipe = data.MakeNewEstimator() - .Append(row => ( - row.name, - data_0: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) - .Append(row => (row.name, output_1: row.data_0.DnnImageFeaturizer((m, envi, input, estimator_output) => m.ResNet18(envi, input, estimator_output, execDir)))); - - TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); - - var result = pipe.Fit(data).Transform(data).AsDynamic; - result.Schema.TryGetColumnIndex("output_1", out int output); - using (var cursor = result.GetRowCursor(col => col == output)) + var buffer = default(VBuffer); + var getter = cursor.GetGetter>(output); + var numRows = 0; + while (cursor.MoveNext()) { - var buffer = default(VBuffer); - var getter = cursor.GetGetter>(output); - var numRows = 0; - while (cursor.MoveNext()) - { - getter(ref buffer); - Assert.Equal(512, buffer.Length); - numRows += 1; - } - Assert.Equal(3, numRows); + getter(ref buffer); + Assert.Equal(512, buffer.Length); + numRows += 1; } + Assert.Equal(3, numRows); } } - [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 fails with "An attempt was made to load a program with an incorrect format." - void TestOldSavingAndLoading() + // Onnx is only supported on x64 Windows + [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] + public void TestOldSavingAndLoading() { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return; @@ -163,7 +164,7 @@ void TestOldSavingAndLoading() var outputNames = "output_1"; var appDataBaseDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); var execDir = Path.Combine(appDataBaseDir, "mlnet-resources"); - var est = new DnnImageFeaturizerEstimator(Env, (m, env, input, output) => m.ResNet18(env, input, output, execDir), inputNames, outputNames); + var est = new DnnImageFeaturizerEstimator(Env, m => m.ModelSelector.ResNet18(m.Env, m.InputColumn, m.OutputColumn), inputNames, outputNames); var transformer = est.Fit(dataView); var result = transformer.Transform(dataView); var resultRoles = new RoleMappedData(result); From 326d8bff27c3d7efcca55c827c5b67b5e6784691 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Mon, 12 Nov 2018 11:48:02 -0800 Subject: [PATCH 35/54] Replace TLC links --- src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs | 4 ++-- src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs | 4 ++-- src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs | 4 ++-- src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs index 0ef49c852d..fc2d2ca44f 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs @@ -13,8 +13,8 @@ namespace Microsoft.ML.Transforms /// This is an extension method to be used with the in order to use a pretrained AlexNet model. /// The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project /// containing this extension method, the corresponding binary model will be downloaded from the CDN at - /// https://express-tlcresources.azureedge.net/image/AlexNetPrepOnnx/AlexNetPreprocess.onnx and - /// https://express-tlcresources.azureedge.net/image/AlexNetOnnx/AlexNet.onnx and placed into the local app directory + /// https://aka.ms/mlnet-resources/image/AlexNetPrepOnnx/AlexNetPreprocess.onnx and + /// https://aka.ms/mlnet-resources/image/AlexNetOnnx/AlexNet.onnx and placed into the local app directory /// folder under mlnet-resources. /// public static class AlexNetExtension diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs index 2ce26a25e8..08c5350a3a 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs @@ -13,8 +13,8 @@ namespace Microsoft.ML.Transforms /// This is an extension method to be used with the in order to use a pretrained ResNet101 model. /// The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project /// containing this extension method, the corresponding binary model will be downloaded from the CDN at - /// https://express-tlcresources.azureedge.net/image/ResNetPrepOnnx/ResNetPreprocess.onnx and - /// https://express-tlcresources.azureedge.net/image/ResNet101Onnx/ResNet101.onnx and placed into the local app directory + /// https://aka.ms/mlnet-resources/image/ResNetPrepOnnx/ResNetPreprocess.onnx and + /// https://aka.ms/mlnet-resources/image/ResNet101Onnx/ResNet101.onnx and placed into the local app directory /// folder under mlnet-resources. /// public static class ResNet101Extension diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs index e665f338e7..d46b853380 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs @@ -13,8 +13,8 @@ namespace Microsoft.ML.Transforms /// This is an extension method to be used with the in order to use a pretrained ResNet18 model. /// The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project /// containing this extension method, the corresponding binary model will be downloaded from the CDN at - /// https://express-tlcresources.azureedge.net/image/ResNetPrepOnnx/ResNetPreprocess.onnx and - /// https://express-tlcresources.azureedge.net/image/ResNet18Onnx/ResNet18.onnx and placed into the local app directory + /// https://aka.ms/mlnet-resources/image/ResNetPrepOnnx/ResNetPreprocess.onnx and + /// https://aka.ms/mlnet-resources/image/ResNet18Onnx/ResNet18.onnx and placed into the local app directory /// folder under mlnet-resources. /// public static class ResNet18Extension diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs index 71da0eee2d..6d24866392 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs @@ -13,8 +13,8 @@ namespace Microsoft.ML.Transforms /// This is an extension method to be used with the in order to use a pretrained ResNet50 model. /// The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project /// containing this extension method, the corresponding binary model will be downloaded from the CDN at - /// https://express-tlcresources.azureedge.net/image/ResNetPrepOnnx/ResNetPreprocess.onnx and - /// https://express-tlcresources.azureedge.net/image/ResNet50Onnx/ResNet50.onnx and placed into the local app directory + /// https://aka.ms/mlnet-resources/image/ResNetPrepOnnx/ResNetPreprocess.onnx and + /// https://aka.ms/mlnet-resources/image/ResNet50Onnx/ResNet50.onnx and placed into the local app directory /// folder under mlnet-resources. /// public static class ResNet50Extension From 579ad6b70e5f32b7f8dc6a91d0db619be5639dfd Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Mon, 12 Nov 2018 15:18:57 -0800 Subject: [PATCH 36/54] Rework download location --- ...ft.ML.DnnImageFeaturizer.AlexNet.nupkgproj | 7 +++--- ....ML.DnnImageFeaturizer.ResNet101.nupkgproj | 6 ++--- ...t.ML.DnnImageFeaturizer.ResNet18.nupkgproj | 6 ++--- ...t.ML.DnnImageFeaturizer.ResNet50.nupkgproj | 6 ++--- .../AlexNet.cs | 2 +- ...osoft.ML.DnnImageFeaturizer.AlexNet.csproj | 22 +++++++++---------- ...oft.ML.DnnImageFeaturizer.ResNet101.csproj | 22 +++++++++---------- .../ResNet101.cs | 2 +- ...soft.ML.DnnImageFeaturizer.ResNet18.csproj | 22 +++++++++---------- .../ResNet18.cs | 2 +- ...soft.ML.DnnImageFeaturizer.ResNet50.csproj | 22 +++++++++---------- .../ResNet50.cs | 2 +- .../DnnImageFeaturizerTest.cs | 8 +------ .../Microsoft.ML.OnnxTransformTest.csproj | 21 ++++++++++++++++++ 14 files changed, 79 insertions(+), 71 deletions(-) diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj index 1f9c61a123..9e4ef2968f 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj @@ -6,12 +6,13 @@ - + - - + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj index 25a40a305f..7dccd21e81 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj @@ -6,12 +6,12 @@ - + - - + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj index c0ffb97645..cc94dd72ef 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj @@ -6,12 +6,12 @@ - + - - + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj index 5d1add2a23..ff271323ff 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj @@ -6,12 +6,12 @@ - + - - + + diff --git a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs index fc2d2ca44f..b64503cc29 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs @@ -25,7 +25,7 @@ public static class AlexNetExtension /// public static EstimatorChain AlexNet(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) { - return AlexNet(dnnModelContext, env, inputColumn, outputColumn, Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); + return AlexNet(dnnModelContext, env, inputColumn, outputColumn, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "DnnImageModels")); } /// diff --git a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj index a500d5d8a7..99d1693bc3 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj @@ -12,28 +12,26 @@ - $(LocalAppData) - $(LocalAppData)/mlnet-resources + $(RepoRoot)bin\obj\DnnImageModels - + - + - - + diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj index 89d409e624..b7da2afb06 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj @@ -12,28 +12,26 @@ - $(LocalAppData) - $(LocalAppData)/mlnet-resources + $(RepoRoot)bin\obj\DnnImageModels - + - + - - + diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs index 08c5350a3a..4d0c089c63 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs @@ -25,7 +25,7 @@ public static class ResNet101Extension /// public static EstimatorChain ResNet101(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) { - return ResNet101(dnnModelContext, env, inputColumn, outputColumn, Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); + return ResNet101(dnnModelContext, env, inputColumn, outputColumn, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "DnnImageModels")); } /// diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj index 1ac7ae54d0..e205003e37 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj @@ -12,28 +12,26 @@ - $(LocalAppData) - $(LocalAppData)/mlnet-resources + $(RepoRoot)bin\obj\DnnImageModels - + - + - - + diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs index d46b853380..b2c40c815c 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs @@ -25,7 +25,7 @@ public static class ResNet18Extension /// public static EstimatorChain ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) { - return ResNet18(dnnModelContext, env, inputColumn, outputColumn, Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); + return ResNet18(dnnModelContext, env, inputColumn, outputColumn, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "DnnImageModels")); } /// diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj index 40098733c0..136f27ead2 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj @@ -12,28 +12,26 @@ - $(LocalAppData) - $(LocalAppData)/mlnet-resources + $(RepoRoot)bin\obj\DnnImageModels - + - + - - + diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs index 6d24866392..8140957e8d 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs @@ -25,7 +25,7 @@ public static class ResNet50Extension /// public static EstimatorChain ResNet50(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) { - return ResNet50(dnnModelContext, env, inputColumn, outputColumn, Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); + return ResNet50(dnnModelContext, env, inputColumn, outputColumn, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "DnnImageModels")); } /// diff --git a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs index a43dcd0518..f8a80eb74d 100644 --- a/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs +++ b/test/Microsoft.ML.OnnxTransformTest/DnnImageFeaturizerTest.cs @@ -78,8 +78,6 @@ void TestDnnImageFeaturizer() var xyData = new List { new TestDataXY() { A = new float[inputSize] } }; var stringData = new List { new TestDataDifferntType() { data_0 = new string[inputSize] } }; var sizeData = new List { new TestDataSize() { data_0 = new float[2] } }; - var appDataBaseDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); - var execDir = Path.Combine(appDataBaseDir, "mlnet-resources"); var pipe = new DnnImageFeaturizerEstimator(Env, m => m.ModelSelector.ResNet18(m.Env, m.InputColumn, m.OutputColumn), "data_0", "output_1"); var invalidDataWrongNames = ComponentCreation.CreateDataView(Env, xyData); @@ -114,9 +112,7 @@ public void OnnxStatic() imagePath: ctx.LoadText(0), name: ctx.LoadText(1))) .Read(dataFile); - - var appDataBaseDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); - var execDir = Path.Combine(appDataBaseDir, "mlnet-resources"); + var pipe = data.MakeNewEstimator() .Append(row => ( row.name, @@ -162,8 +158,6 @@ public void TestOldSavingAndLoading() var inputNames = "data_0"; var outputNames = "output_1"; - var appDataBaseDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); - var execDir = Path.Combine(appDataBaseDir, "mlnet-resources"); var est = new DnnImageFeaturizerEstimator(Env, m => m.ModelSelector.ResNet18(m.Env, m.InputColumn, m.OutputColumn), inputNames, outputNames); var transformer = est.Fit(dataView); var result = transformer.Transform(dataView); diff --git a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj index 01cfa8e1e5..20974dea70 100644 --- a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj +++ b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj @@ -12,4 +12,25 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file From 368cd64533456cfffe8c6d6011b61bac161de0d5 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Tue, 13 Nov 2018 16:24:30 -0800 Subject: [PATCH 37/54] Change model download to new redist proj --- ...osoft.ML.DnnImageFeaturizer.AlexNet.csproj | 36 ------ ...oft.ML.DnnImageFeaturizer.ResNet101.csproj | 32 ------ ...soft.ML.DnnImageFeaturizer.ResNet18.csproj | 36 ------ ...soft.ML.DnnImageFeaturizer.ResNet50.csproj | 36 ------ ...oft.ML.DnnImageFeaturizer.ModelRedist.proj | 106 ++++++++++++++++++ 5 files changed, 106 insertions(+), 140 deletions(-) create mode 100644 src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj diff --git a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj index 99d1693bc3..46391d7d6b 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.csproj @@ -1,7 +1,5 @@ - - netstandard2.0 Microsoft.ML.DnnImageFeaturizer.AlexNet @@ -11,38 +9,4 @@ - - $(RepoRoot)bin\obj\DnnImageModels - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj index b7da2afb06..8b4872db89 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj @@ -1,7 +1,5 @@ - - netstandard2.0 Microsoft.ML.DnnImageFeaturizer.ResNet101 @@ -15,34 +13,4 @@ $(RepoRoot)bin\obj\DnnImageModels - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj index e205003e37..6ae6417758 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.csproj @@ -1,7 +1,5 @@ - - netstandard2.0 Microsoft.ML.DnnImageFeaturizer.ResNet18 @@ -11,38 +9,4 @@ - - $(RepoRoot)bin\obj\DnnImageModels - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj index 136f27ead2..9f3ef3e729 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.csproj @@ -1,7 +1,5 @@ - - netstandard2.0 Microsoft.ML.DnnImageFeaturizer.ResNet50 @@ -11,38 +9,4 @@ - - $(RepoRoot)bin\obj\DnnImageModels - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj b/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj new file mode 100644 index 0000000000..922195db88 --- /dev/null +++ b/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj @@ -0,0 +1,106 @@ + + + + + netstandard2.0 + + + + + + $(RepoRoot)bin\obj\DnnImageModels + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 1d106bd9c733d4b73ab8def7e3b2ea10da41f72c Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Wed, 14 Nov 2018 11:19:01 -0800 Subject: [PATCH 38/54] Add the models to content folder --- .../Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj | 4 ++-- .../Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj | 4 ++-- .../Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj | 4 ++-- .../Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj index 9e4ef2968f..aa3eccd518 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj @@ -10,8 +10,8 @@ - - + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj index 7dccd21e81..2ca7e17de0 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj @@ -10,8 +10,8 @@ - - + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj index cc94dd72ef..f76a414d7f 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj @@ -10,8 +10,8 @@ - - + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj index ff271323ff..76ee8b166f 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj @@ -10,8 +10,8 @@ - - + + From 1bebc64b7f9f8f99533ea00c0572146c1a289307 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Wed, 21 Nov 2018 10:30:57 -0800 Subject: [PATCH 39/54] Address some comments --- src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs | 9 +++------ .../Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj | 6 +----- .../ResNet101.cs | 9 +++------ src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs | 9 +++------ src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs | 9 +++------ .../DnnImageFeaturizerTransform.cs | 8 ++++---- 6 files changed, 17 insertions(+), 33 deletions(-) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs index b64503cc29..2d7c0f056b 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs @@ -11,16 +11,13 @@ namespace Microsoft.ML.Transforms { /// /// This is an extension method to be used with the in order to use a pretrained AlexNet model. - /// The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project - /// containing this extension method, the corresponding binary model will be downloaded from the CDN at - /// https://aka.ms/mlnet-resources/image/AlexNetPrepOnnx/AlexNetPreprocess.onnx and - /// https://aka.ms/mlnet-resources/image/AlexNetOnnx/AlexNet.onnx and placed into the local app directory - /// folder under mlnet-resources. + /// The NuGet containing this extension is also guaranteed to include the binary model file. /// public static class AlexNetExtension { /// - /// If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. + /// Returns an estimator chain with the two corresponding models (a preprocessing one and a main one) required for the AlexNet pipeline. + /// This assumes both of the models are in the same location as the file containing this method, which they will be if used through the NuGet. /// This should be the default way to use AlexNet if importing the model from a NuGet. /// public static EstimatorChain AlexNet(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj index 8b4872db89..c9eb12268d 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.csproj @@ -8,9 +8,5 @@ - - - $(RepoRoot)bin\obj\DnnImageModels - - + \ No newline at end of file diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs index 4d0c089c63..71ca56e36a 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs @@ -11,16 +11,13 @@ namespace Microsoft.ML.Transforms { /// /// This is an extension method to be used with the in order to use a pretrained ResNet101 model. - /// The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project - /// containing this extension method, the corresponding binary model will be downloaded from the CDN at - /// https://aka.ms/mlnet-resources/image/ResNetPrepOnnx/ResNetPreprocess.onnx and - /// https://aka.ms/mlnet-resources/image/ResNet101Onnx/ResNet101.onnx and placed into the local app directory - /// folder under mlnet-resources. + /// The NuGet containing this extension is also guaranteed to include the binary model file. /// public static class ResNet101Extension { /// - /// If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. + /// Returns an estimator chain with the two corresponding models (a preprocessing one and a main one) required for the ResNet pipeline. + /// This assumes both of the models are in the same location as the file containing this method, which they will be if used through the NuGet. /// This should be the default way to use ResNet101 if importing the model from a NuGet. /// public static EstimatorChain ResNet101(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs index b2c40c815c..fc74c02d28 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs @@ -11,16 +11,13 @@ namespace Microsoft.ML.Transforms { /// /// This is an extension method to be used with the in order to use a pretrained ResNet18 model. - /// The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project - /// containing this extension method, the corresponding binary model will be downloaded from the CDN at - /// https://aka.ms/mlnet-resources/image/ResNetPrepOnnx/ResNetPreprocess.onnx and - /// https://aka.ms/mlnet-resources/image/ResNet18Onnx/ResNet18.onnx and placed into the local app directory - /// folder under mlnet-resources. + /// The NuGet containing this extension is also guaranteed to include the binary model file. /// public static class ResNet18Extension { /// - /// If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. + /// Returns an estimator chain with the two corresponding models (a preprocessing one and a main one) required for the ResNet pipeline. + /// This assumes both of the models are in the same location as the file containing this method, which they will be if used through the NuGet. /// This should be the default way to use ResNet18 if importing the model from a NuGet. /// public static EstimatorChain ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs index 8140957e8d..ea8bd38239 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs @@ -11,16 +11,13 @@ namespace Microsoft.ML.Transforms { /// /// This is an extension method to be used with the in order to use a pretrained ResNet50 model. - /// The NuGet containing this extension is also guaranteed to include the binary model file. Note that when building the project - /// containing this extension method, the corresponding binary model will be downloaded from the CDN at - /// https://aka.ms/mlnet-resources/image/ResNetPrepOnnx/ResNetPreprocess.onnx and - /// https://aka.ms/mlnet-resources/image/ResNet50Onnx/ResNet50.onnx and placed into the local app directory - /// folder under mlnet-resources. + /// The NuGet containing this extension is also guaranteed to include the binary model file. /// public static class ResNet50Extension { /// - /// If including this through a NuGet, the location of the model will be the same as of this file. This looks for the model there. + /// Returns an estimator chain with the two corresponding models (a preprocessing one and a main one) required for the ResNet pipeline. + /// This assumes both of the models are in the same location as the file containing this method, which they will be if used through the NuGet. /// This should be the default way to use ResNet50 if importing the model from a NuGet. /// public static EstimatorChain ResNet50(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index 33a3e8ecbd..5a9de1b09b 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -30,10 +30,10 @@ public sealed class DnnImageModelSelector /// public sealed class DnnImageFeaturizerInput { - public readonly IHostEnvironment Env; - public readonly string InputColumn; - public readonly DnnImageModelSelector ModelSelector; - public readonly string OutputColumn; + public IHostEnvironment Env { get; } + public string InputColumn { get; } + public DnnImageModelSelector ModelSelector { get; } + public string OutputColumn { get; } public DnnImageFeaturizerInput(IHostEnvironment env, string inputColumn, string outputColumn, DnnImageModelSelector modelSelector) { From 22e385b4b56632d9e05d0b7a1bd4ba2d23bbf233 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Wed, 21 Nov 2018 10:32:49 -0800 Subject: [PATCH 40/54] Merge remote-tracking branch 'upstream/master' into dnn-image-feat --- Directory.Build.props | 1 + Microsoft.ML.sln | 11 - README.md | 41 +- ROADMAP.md | 2 +- build/Dependencies.props | 3 +- build/ci/phase-template.yml | 2 +- docs/building/unix-instructions.md | 9 +- docs/code/MlNetCookBook.md | 144 +- docs/code/MlNetHighLevelConcepts.md | 52 +- .../Dynamic/ConcatTransform.cs | 23 +- .../IidChangePointDetectorTransform.cs | 92 + .../Dynamic/IidSpikeDetectorTransform.cs | 87 + .../Dynamic/KeyToValue_Term.cs | 33 +- .../Dynamic/MatrixFactorization.cs | 12 +- .../Dynamic/NgramExtraction.cs | 76 + .../{MinMaxNormalizer.cs => Normalizer.cs} | 44 +- .../Dynamic/ProjectionTransforms.cs | 114 + .../Microsoft.ML.Samples/Dynamic/SDCA.cs | 19 +- .../SsaChangePointDetectorTransform.cs | 88 + .../Dynamic/SsaSpikeDetectorTransform.cs | 95 + .../Dynamic/TextTransform.cs | 21 +- .../Dynamic/Timeseries.cs | 295 - .../Microsoft.ML.Samples.csproj | 1 + docs/samples/Microsoft.ML.Samples/Program.cs | 8 +- .../AveragedPerceptronBinaryClassification.cs | 20 +- .../Static/FastTreeBinaryClassification.cs | 22 +- .../Static/FastTreeRegression.cs | 22 +- .../Static/LightGBMBinaryClassification.cs | 20 +- .../Static/LightGBMRegression.cs | 23 +- .../Static/SDCABinaryClassification.cs | 20 +- .../Static/SDCARegression.cs | 23 +- pkg/Microsoft.ML/Microsoft.ML.nupkgproj | 1 + src/Microsoft.ML.Api/ComponentCreation.cs | 59 +- .../CustomMappingTransformer.cs | 36 +- .../DataViewConstructionUtils.cs | 31 +- src/Microsoft.ML.Api/GenerateCodeCommand.cs | 2 +- src/Microsoft.ML.Api/PredictionEngine.cs | 106 +- .../StatefulFilterTransform.cs | 2 +- src/Microsoft.ML.Api/TypedCursor.cs | 55 +- .../CommandLine/ArgumentAttribute.cs | 80 +- .../CommandLine/ArgumentType.cs | 54 + .../CommandLine/CharCursor.cs | 2 +- src/Microsoft.ML.Core/CommandLine/CmdLexer.cs | 5 +- .../CommandLine/CmdParser.cs | 362 +- .../CommandLine/DefaultArgumentAttribute.cs | 29 + .../CommandLine/EnumValueDisplayAttribute.cs | 23 + .../CommandLine/HideEnumValueAttribute.cs | 20 + .../{Utils.cs => SpecialPurpose.cs} | 3 +- .../ComponentModel}/AssemblyLoadingUtils.cs | 4 +- src/Microsoft.ML.Core/Data/ICommand.cs | 6 +- src/Microsoft.ML.Core/Data/IDataView.cs | 16 +- src/Microsoft.ML.Core/Data/IEstimator.cs | 15 +- src/Microsoft.ML.Core/Data/IFileHandle.cs | 12 +- .../Data/IHostEnvironment.cs | 8 +- .../Data/ITrainerArguments.cs | 15 - .../Data/LinkedRootCursorBase.cs | 3 +- .../Data/LinkedRowFilterCursorBase.cs | 3 +- .../Data/LinkedRowRootCursorBase.cs | 3 +- src/Microsoft.ML.Core/Data/MetadataUtils.cs | 34 +- .../Data/ProgressReporter.cs | 3 +- .../Data/ReadOnlyMemoryUtils.cs | 28 +- src/Microsoft.ML.Core/Data/RootCursorBase.cs | 3 +- src/Microsoft.ML.Core/Data/ServerChannel.cs | 6 +- .../Data/SynchronizedCursorBase.cs | 3 +- src/Microsoft.ML.Core/Data/VBuffer.cs | 362 +- src/Microsoft.ML.Core/Data/VBufferEditor.cs | 160 + .../EntryPoints/EntryPointModuleAttribute.cs | 6 +- .../EntryPoints/EntryPointUtils.cs | 3 +- .../{Data => EntryPoints}/IMlState.cs | 2 +- .../{Data => EntryPoints}/IPredictorModel.cs | 0 .../EntryPoints/ModuleArgs.cs | 3 +- .../Environment/ConsoleEnvironment.cs | 9 +- .../Environment/HostEnvironmentBase.cs | 31 +- .../Environment/TelemetryMessage.cs | 12 +- .../Prediction/IPredictor.cs | 90 - src/Microsoft.ML.Core/Prediction/ITrainer.cs | 42 +- src/Microsoft.ML.Core/Prediction/ITree.cs | 20 +- .../Prediction/TrainContext.cs | 15 +- .../Prediction/TrainerInfo.cs | 15 +- .../Properties/AssemblyInfo.cs | 12 +- src/Microsoft.ML.Core/Utilities/BigArray.cs | 19 +- src/Microsoft.ML.Core/Utilities/BinFinder.cs | 9 +- src/Microsoft.ML.Core/Utilities/BitUtils.cs | 2 +- src/Microsoft.ML.Core/Utilities/CharUtils.cs | 3 +- .../Utilities/CmdIndenter.cs | 8 +- src/Microsoft.ML.Core/Utilities/Contracts.cs | 999 +- .../Utilities/DoubleParser.cs | 3 +- .../Utilities/FixedSizeQueue.cs | 3 +- src/Microsoft.ML.Core/Utilities/FloatUtils.cs | 3 +- src/Microsoft.ML.Core/Utilities/HashArray.cs | 12 +- src/Microsoft.ML.Core/Utilities/Hashing.cs | 3 +- src/Microsoft.ML.Core/Utilities/Heap.cs | 8 +- .../Utilities/HybridMemoryStream.cs | 3 +- .../Utilities/IndentedTextWriterExtensions.cs | 50 + .../Utilities/IndentingTextWriter.cs | 281 - src/Microsoft.ML.Core/Utilities/LineParser.cs | 58 + .../Utilities/ListExtensions.cs | 42 - src/Microsoft.ML.Core/Utilities/LruCache.cs | 3 +- src/Microsoft.ML.Core/Utilities/MathUtils.cs | 71 +- .../Utilities/MatrixTransposeOps.cs | 3 +- src/Microsoft.ML.Core/Utilities/MemUtils.cs | 27 - src/Microsoft.ML.Core/Utilities/MinWaiter.cs | 3 +- src/Microsoft.ML.Core/Utilities/NormStr.cs | 3 +- src/Microsoft.ML.Core/Utilities/ObjectPool.cs | 8 +- .../Utilities/OrderedWaiter.cs | 3 +- src/Microsoft.ML.Core/Utilities/PathUtils.cs | 2 +- .../Utilities/PlatformUtils.cs | 3 +- .../Utilities/ReservoirSampler.cs | 9 +- .../Utilities/ResourceManagerUtils.cs | 5 +- src/Microsoft.ML.Core/Utilities/Stats.cs | 3 +- src/Microsoft.ML.Core/Utilities/Stream.cs | 5 +- .../Utilities/SubsetStream.cs | 3 +- .../Utilities/SummaryStatistics.cs | 8 +- .../Utilities/SupervisedBinFinder.cs | 3 +- .../Utilities/TextReaderStream.cs | 3 +- .../Utilities/ThreadUtils.cs | 8 +- src/Microsoft.ML.Core/Utilities/Tree.cs | 3 +- src/Microsoft.ML.Core/Utilities/Utils.cs | 80 +- .../Utilities/VBufferUtils.cs | 653 +- src/Microsoft.ML.CpuMath/AlignedArray.cs | 26 +- src/Microsoft.ML.CpuMath/AlignedMatrix.cs | 23 +- src/Microsoft.ML.CpuMath/AssemblyInfo.cs | 18 +- src/Microsoft.ML.CpuMath/AvxIntrinsics.cs | 18 + .../CpuAligenedMathUtils.cs | 3 +- .../CpuMathUtils.netcoreapp.cs | 5 +- .../CpuMathUtils.netstandard.cs | 5 +- src/Microsoft.ML.CpuMath/EigenUtils.cs | 3 +- src/Microsoft.ML.CpuMath/ICpuBuffer.cs | 12 +- src/Microsoft.ML.CpuMath/IntUtils.cs | 3 +- .../Microsoft.ML.CpuMath.csproj | 14 +- .../ProbabilityFunctions.cs | 3 +- src/Microsoft.ML.CpuMath/Sse.cs | 6 +- src/Microsoft.ML.CpuMath/SseIntrinsics.cs | 23 +- src/Microsoft.ML.CpuMath/Thunk.cs | 2 +- .../Commands/CrossValidationCommand.cs | 3 +- src/Microsoft.ML.Data/Commands/DataCommand.cs | 6 +- .../Commands/EvaluateCommand.cs | 2 +- .../Commands/SaveDataCommand.cs | 6 +- .../Commands/SavePredictorCommand.cs | 2 +- .../Commands/ScoreCommand.cs | 5 +- .../Commands/ShowSchemaCommand.cs | 23 +- src/Microsoft.ML.Data/Commands/TestCommand.cs | 8 +- .../Commands/TrainCommand.cs | 38 +- .../Commands/TrainTestCommand.cs | 31 +- .../Commands/TypeInfoCommand.cs | 2 +- src/Microsoft.ML.Data/Data/BufferBuilder.cs | 77 +- src/Microsoft.ML.Data/Data/DataViewUtils.cs | 2 +- src/Microsoft.ML.Data/Data/IColumn.cs | 12 +- src/Microsoft.ML.Data/Data/RowCursorUtils.cs | 25 +- .../DataLoadSave/Binary/BinaryLoader.cs | 8 +- .../Binary/BinaryLoaderSaverCatalog.cs | 65 + .../DataLoadSave/Binary/Codecs.cs | 20 +- .../DataLoadSave/Binary/Zlib/Zlib.cs | 2 + .../DataLoadSave/CompositeDataLoader.cs | 4 +- .../DataLoadSave/DataLoadSaveCatalog.cs | 20 - .../DataLoadSave/DataOperations.cs | 93 + .../DataLoadSave/EstimatorChain.cs | 47 +- .../DataLoadSave/EstimatorExtensions.cs | 17 + .../DataLoadSave/PartitionedFileLoader.cs | 2 +- .../DataLoadSave/Text/TextLoader.cs | 2 +- .../DataLoadSave/Text/TextLoaderParser.cs | 18 +- .../Text/TextLoaderSaverCatalog.cs | 8 +- .../DataLoadSave/Text/TextSaver.cs | 25 +- .../DataLoadSave/Transpose/TransposeLoader.cs | 2 +- .../DataView/AppendRowsDataView.cs | 6 +- .../DataView/ArrayDataViewBuilder.cs | 2 +- .../DataView/CacheDataView.cs | 40 +- .../DataView/CompositeSchema.cs | 2 +- .../DataView/EmptyDataView.cs | 2 +- .../DataView/OpaqueDataView.cs | 4 +- .../DataView/RowToRowMapperTransform.cs | 8 +- src/Microsoft.ML.Data/DataView/Transposer.cs | 88 +- src/Microsoft.ML.Data/DataView/ZipDataView.cs | 4 +- .../Depricated/Instances/HeaderSchema.cs | 18 +- .../Vector/GenericSpanSortHelper.cs | 269 + .../Depricated/Vector/VBufferMathUtils.cs | 221 +- .../Depricated/Vector/VectorUtils.cs | 181 +- src/Microsoft.ML.Data/Dirty/IniFileUtils.cs | 3 +- .../Dirty/PredictorInterfaces.cs | 5 - src/Microsoft.ML.Data/EntryPoints/Cache.cs | 3 + .../EntryPoints/InputBase.cs | 3 +- .../EntryPoints/PredictorModel.cs | 2 +- .../EntryPoints/SchemaManipulation.cs | 16 +- .../EntryPoints/ScoreColumnSelector.cs | 4 +- .../Evaluators/AnomalyDetectionEvaluator.cs | 8 +- .../Evaluators/AucAggregator.cs | 16 +- .../Evaluators/BinaryClassifierEvaluator.cs | 8 +- .../Evaluators/ClusteringEvaluator.cs | 24 +- .../Evaluators/EvaluatorBase.cs | 8 +- .../Evaluators/EvaluatorUtils.cs | 111 +- .../Evaluators/MamlEvaluator.cs | 4 +- .../MultiOutputRegressionEvaluator.cs | 31 +- .../MulticlassClassifierEvaluator.cs | 49 +- .../Evaluators/QuantileRegressionEvaluator.cs | 62 +- .../Evaluators/RankerEvaluator.cs | 42 +- src/Microsoft.ML.Data/MLContext.cs | 4 +- src/Microsoft.ML.Data/Model/ModelHeader.cs | 2 +- .../Model/ModelLoadContext.cs | 7 +- .../Model/ModelSaveContext.cs | 22 +- .../Model/Onnx/ICanSaveOnnx.cs | 18 +- .../Model/Onnx/OnnxContext.cs | 6 +- .../Model/Pfa/BoundPfaContext.cs | 3 +- .../Model/Pfa/ICanSavePfa.cs | 19 +- src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs | 2 +- src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs | 3 +- src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs | 3 +- .../Model/Pfa/SavePfaCommand.cs | 2 +- src/Microsoft.ML.Data/Model/Repository.cs | 45 +- .../Prediction/Calibrator.cs | 38 +- .../Properties/AssemblyInfo.cs | 34 +- .../Scorers/BinaryClassifierScorer.cs | 4 +- .../Scorers/GenericScorer.cs | 8 +- .../Scorers/MultiClassClassifierScorer.cs | 12 +- .../Scorers/PredictedLabelScorerBase.cs | 13 +- .../Scorers/RowToRowScorerBase.cs | 2 +- .../Scorers/SchemaBindablePredictorWrapper.cs | 40 +- .../DataLoadSaveOperationsExtensions.cs | 2 +- .../StaticPipe/Reconciler.cs | 2 +- .../StaticPipe/StaticPipeUtils.cs | 4 +- .../StaticPipe/TrainerEstimatorReconciler.cs | 6 +- src/Microsoft.ML.Data/TrainContext.cs | 26 +- src/Microsoft.ML.Data/Training/TrainerBase.cs | 8 +- .../Training/TrainerEstimatorBase.cs | 13 +- .../Transforms/BindingsWrappedRowCursor.cs | 2 +- .../Transforms/CatalogUtils.cs | 2 +- .../Transforms/CategoricalCatalog.cs | 6 +- .../Transforms/ColumnBindingsBase.cs | 8 +- .../ColumnConcatenatingEstimator.cs | 2 +- ...m.cs => ColumnConcatenatingTransformer.cs} | 162 +- ...ColumnsTransform.cs => ColumnSelecting.cs} | 103 +- ...yColumnsTransform.cs => ColumnsCopying.cs} | 48 +- .../Transforms/ConversionsCatalog.cs | 22 +- .../Transforms/DropSlotsTransform.cs | 2 +- .../Transforms/ExtensionsCatalog.cs | 12 +- .../Transforms/GenerateNumberTransform.cs | 2 +- .../{HashTransform.cs => Hashing.cs} | 170 +- .../Transforms/InvertHashUtils.cs | 4 +- .../{KeyToValueTransform.cs => KeyToValue.cs} | 135 +- ...KeyToVectorTransform.cs => KeyToVector.cs} | 107 +- .../Transforms/LabelConvertTransform.cs | 2 +- .../Transforms/LabelIndicatorTransform.cs | 2 +- src/Microsoft.ML.Data/Transforms/NAFilter.cs | 2 +- .../Transforms/NopTransform.cs | 4 +- .../Transforms/NormalizeColumn.cs | 82 +- .../Transforms/NormalizeColumnDbl.cs | 26 +- .../Transforms/NormalizeColumnSng.cs | 99 +- .../Transforms/NormalizeUtils.cs | 2 + .../Transforms/Normalizer.cs | 204 +- .../Transforms/NormalizerCatalog.cs | 18 +- .../Transforms/NormalizerStaticExtensions.cs | 11 +- .../Transforms/OneToOneTransformerBase.cs | 95 +- .../Transforms/PerGroupTransformBase.cs | 4 +- .../Transforms/RangeFilter.cs | 11 +- ...ransform.cs => RowShufflingTransformer.cs} | 24 +- .../Transforms/RowToRowTransformerBase.cs | 114 + .../Transforms/SkipTakeFilter.cs | 4 +- ...ansform.cs => TrainAndScoreTransformer.cs} | 25 +- .../Transforms/TransformBase.cs | 64 +- ...{ConvertTransform.cs => TypeConverting.cs} | 72 +- .../Transforms/ValueToKeyMappingEstimator.cs | 34 +- ...orm.cs => ValueToKeyMappingTransformer.cs} | 54 +- ...cs => ValueToKeyMappingTransformerImpl.cs} | 113 +- src/Microsoft.ML.Data/Transforms/doc.xml | 2 - .../Utilities/SlotDropper.cs | 42 +- .../Utilities/StreamUtils.cs | 3 +- src/Microsoft.ML.Data/Utilities/TimerScope.cs | 7 +- .../{IntSequencePool.cs => SequencePool.cs} | 9 +- .../Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs | 6 +- src/Microsoft.ML.Ensemble/EnsembleUtils.cs | 38 +- .../EntryPoints/Ensemble.cs | 2 +- .../OutputCombiners/BaseMultiAverager.cs | 11 +- .../OutputCombiners/BaseMultiCombiner.cs | 8 +- .../OutputCombiners/BaseScalarStacking.cs | 10 +- .../OutputCombiners/BaseStacking.cs | 12 +- .../OutputCombiners/MultiMedian.cs | 8 +- .../OutputCombiners/MultiStacking.cs | 13 +- .../OutputCombiners/MultiVoting.cs | 16 +- .../OutputCombiners/RegressionStacking.cs | 5 +- .../OutputCombiners/Stacking.cs | 5 +- .../SubsetSelector/BootstrapSelector.cs | 2 +- .../Trainer/Binary/EnsembleTrainer.cs | 3 +- .../Trainer/EnsembleTrainerBase.cs | 2 +- .../Trainer/IModelCombiner.cs | 2 + .../MulticlassDataPartitionEnsembleTrainer.cs | 5 +- .../Regression/RegressionEnsembleTrainer.cs | 3 +- .../BinFile/BinFinder.cs | 38 +- src/Microsoft.ML.FastTree/BoostingFastTree.cs | 4 +- src/Microsoft.ML.FastTree/Dataset/Dataset.cs | 6 +- src/Microsoft.ML.FastTree/FastTree.cs | 106 +- .../FastTreeArguments.cs | 14 +- .../FastTreeClassification.cs | 13 +- src/Microsoft.ML.FastTree/FastTreeRanking.cs | 20 +- .../FastTreeRegression.cs | 13 +- src/Microsoft.ML.FastTree/FastTreeTweedie.cs | 13 +- .../GamClassification.cs | 18 +- src/Microsoft.ML.FastTree/GamRegression.cs | 18 +- src/Microsoft.ML.FastTree/GamTrainer.cs | 24 +- .../Properties/AssemblyInfo.cs | 10 + src/Microsoft.ML.FastTree/RandomForest.cs | 4 +- .../RandomForestClassification.cs | 13 +- .../RandomForestRegression.cs | 25 +- .../SumupPerformanceCommand.cs | 2 +- .../TreeEnsemble/RegressionTree.cs | 9 +- .../TreeEnsembleFeaturizer.cs | 77 +- .../TreeTrainersCatalog.cs | 158 +- .../TreeTrainersStatic.cs | 32 +- .../ComputeLRTrainingStdThroughHal.cs | 92 + .../HalLearnersCatalog.cs | 20 +- .../OlsLinearRegression.cs | 50 +- .../ProjectionCatalog.cs | 47 + .../SymSgdClassificationTrainer.cs | 23 +- .../TransformsStatic.cs | 80 + .../VectorWhitening.cs | 821 + .../ImageGrayscaleTransform.cs | 6 +- .../ImageLoaderTransform.cs | 6 +- .../ImagePixelExtractorTransform.cs | 32 +- .../ImageResizerTransform.cs | 6 +- .../KMeansCatalog.cs | 2 +- .../KMeansPlusPlusTrainer.cs | 44 +- .../KMeansPredictor.cs | 18 +- .../AssemblyRegistration.cs | 4 +- src/Microsoft.ML.Legacy/CSharpApi.cs | 300 +- src/Microsoft.ML.Legacy/LearningPipeline.cs | 120 +- .../LearningPipelineDebugProxy.cs | 5 +- .../Microsoft.ML.Legacy.csproj | 6 +- .../Models/BinaryClassificationEvaluator.cs | 70 +- .../Models/ClassificationEvaluator.cs | 70 +- .../Models/ClusterEvaluator.cs | 58 +- .../Models/ConfusionMatrix.cs | 5 +- .../Models/CrossValidator.cs | 2 +- .../Models/OneVersusAll.cs | 30 +- .../Models/OnnxConverter.cs | 16 +- .../Models/RegressionEvaluator.cs | 60 +- .../Models/TrainTestEvaluator.cs | 2 +- src/Microsoft.ML.Legacy/PredictionModel.cs | 30 +- .../Properties/AssemblyInfo.cs | 6 +- .../Runtime/EntryPoints/CVSplit.cs | 4 +- .../CodeGen/EntryPointGeneratorBase.cs | 29 +- .../EntryPoints/CodeGen/GeneratorBase.cs | 15 +- .../EntryPoints/CodeGen/ImplGeneratorBase.cs | 23 +- .../EntryPoints/CodeGen/LearnerGenerators.cs | 17 +- .../EntryPoints/CodeGen/ModuleGenerator.cs | 5 +- .../CodeGen/TransformGenerators.cs | 37 +- .../Runtime/EntryPoints/FeatureCombiner.cs | 55 +- .../JsonUtils/ExecuteGraphCommand.cs | 2 +- .../EntryPoints/JsonUtils/GraphRunner.cs | 2 +- .../Runtime/EntryPoints/TrainTestSplit.cs | 10 +- .../Internal/Tools/CSharpApiGenerator.cs | 91 +- .../Internal/Tools/CSharpGeneratorUtils.cs | 19 +- .../LightGbmBinaryTrainer.cs | 12 +- src/Microsoft.ML.LightGBM/LightGbmCatalog.cs | 46 +- .../LightGbmMulticlassTrainer.cs | 26 +- .../LightGbmRankingTrainer.cs | 16 +- .../LightGbmRegressionTrainer.cs | 10 +- src/Microsoft.ML.LightGBM/LightGbmStatic.cs | 4 +- .../LightGbmTrainerBase.cs | 6 +- src/Microsoft.ML.Maml/ChainCommand.cs | 3 +- src/Microsoft.ML.Maml/HelpCommand.cs | 26 +- src/Microsoft.ML.Maml/MAML.cs | 4 +- .../Microsoft.ML.Maml.csproj | 4 - .../Properties/AssemblyInfo.cs | 10 +- src/Microsoft.ML.Maml/VersionCommand.cs | 2 +- src/Microsoft.ML.Onnx/AssemblyInfo.cs | 10 +- src/Microsoft.ML.Onnx/SaveOnnxCommand.cs | 2 +- src/Microsoft.ML.OnnxTransform/OnnxCatalog.cs | 10 +- .../OnnxTransform.cs | 439 +- src/Microsoft.ML.OnnxTransform/OnnxUtils.cs | 158 +- src/Microsoft.ML.PCA/PcaTrainer.cs | 58 +- src/Microsoft.ML.PCA/PcaTransform.cs | 15 +- src/Microsoft.ML.Parquet/ParquetLoader.cs | 2 +- .../AutoInference.cs | 2 +- .../AutoMlUtils.cs | 10 +- .../DatasetFeaturesInference.cs | 28 +- .../GenerateSweepCandidatesCommand.cs | 11 +- .../InferenceUtils.cs | 5 +- .../Interfaces/IPipelineNode.cs | 11 +- .../Microsoft.ML.PipelineInference.csproj | 2 +- .../Properties/AssemblyInfo.cs | 10 + .../RecipeInference.cs | 3 +- .../TextFileContents.cs | 2 +- .../TransformInference.cs | 34 +- .../MatrixFactorizationStatic.cs | 2 +- .../MatrixFactorizationTrainer.cs | 68 +- .../SafeTrainingAndModelBuffer.cs | 141 +- .../Microsoft.ML.ResultProcessor.csproj | 4 - .../ResultProcessor.cs | 6 + .../Microsoft.ML.SamplesUtils.csproj | 4 + .../SamplesDatasetUtils.cs | 107 +- .../AssemblyInfo.cs | 1 + .../FactorizationMachineCatalog.cs | 13 +- .../FactorizationMachineInterface.cs | 1 - .../FactorizationMachineStatic.cs | 2 +- .../FactorizationMachineTrainer.cs | 16 +- .../Microsoft.ML.StandardLearners.csproj | 6 +- .../Optimizer/DifferentiableFunction.cs | 10 +- .../Optimizer/LineSearch.cs | 2 +- .../Optimizer/OptimizationMonitor.cs | 2 +- .../Optimizer/Optimizer.cs | 2 +- .../Optimizer/SgdOptimizer.cs | 60 +- .../Standard/LinearPredictor.cs | 42 +- .../Standard/LinearPredictorUtils.cs | 4 +- .../LogisticRegression/LbfgsCatalog.cs | 123 - .../LogisticRegression/LbfgsPredictorBase.cs | 16 +- .../LogisticRegression/LbfgsStatic.cs | 6 +- .../LogisticRegression/LogisticRegression.cs | 184 +- .../MulticlassLogisticRegression.cs | 107 +- .../Standard/ModelStatistics.cs | 92 +- .../MultiClass/MetaMulticlassTrainer.cs | 24 +- .../MultiClass/MultiClassNaiveBayesTrainer.cs | 37 +- .../Standard/MultiClass/Ova.cs | 46 +- .../Standard/MultiClass/Pkpd.cs | 25 +- .../Standard/Online/AveragedPerceptron.cs | 12 +- .../Standard/Online/LinearSvm.cs | 6 +- .../Standard/Online/OnlineGradientDescent.cs | 4 +- .../Standard/Online/OnlineLearnerCatalog.cs | 97 - .../Standard/Online/OnlineLearnerStatic.cs | 2 +- .../Standard/Online/OnlineLinear.cs | 12 +- .../PoissonRegression/PoissonRegression.cs | 19 +- .../Standard/SdcaBinary.cs | 41 +- .../Standard/SdcaCatalog.cs | 126 - .../Standard/SdcaMultiClass.cs | 42 +- .../Standard/SdcaRegression.cs | 12 +- .../Standard/SdcaStatic.cs | 12 +- .../Standard/SgdCatalog.cs | 46 - .../Standard/SgdStatic.cs | 2 +- .../Standard/Simple/SimpleTrainers.cs | 16 +- .../Standard/StochasticTrainerBase.cs | 6 +- .../StandardLearnersCatalog.cs | 314 + .../Algorithms/SmacSweeper.cs | 13 +- .../Algorithms/SweeperProbabilityUtils.cs | 10 +- src/Microsoft.ML.Sweeper/AsyncSweeper.cs | 1 - src/Microsoft.ML.Sweeper/ConfigRunner.cs | 5 +- .../ISweeper.cs | 0 .../Microsoft.ML.Sweeper.csproj | 5 - src/Microsoft.ML.Sweeper/Parameters.cs | 1 - .../Properties/AssemblyInfo.cs | 9 + src/Microsoft.ML.Sweeper/SweepCommand.cs | 8 +- .../SweepResultEvaluator.cs | 1 - src/Microsoft.ML.Sweeper/SynthConfigRunner.cs | 3 - .../TensorFlow/TensorflowUtils.cs | 20 +- .../TensorflowTransform.cs | 194 +- ...AdaptiveSingularSpectrumSequenceModeler.cs | 83 +- .../ExponentialAverageTransform.cs | 8 +- .../IidAnomalyDetectionBase.cs | 6 +- .../IidChangePointDetector.cs | 14 +- .../IidSpikeDetector.cs | 14 +- .../MovingAverageTransform.cs | 12 +- .../PValueTransform.cs | 8 +- .../PercentileThresholdTransform.cs | 12 +- ...uenceModeler.cs => SequenceModelerBase.cs} | 25 +- ...SequentialAnomalyDetectionTransformBase.cs | 91 +- .../SequentialTransformBase.cs | 41 +- .../SequentialTransformerBase.cs | 42 +- .../SlidingWindowTransformBase.cs | 30 +- .../SsaAnomalyDetectionBase.cs | 14 +- .../SsaChangePointDetector.cs | 14 +- .../SsaSpikeDetector.cs | 14 +- ...orm.cs => BootstrapSamplingTransformer.cs} | 36 +- .../CategoricalCatalog.cs | 10 +- ...teTransform.cs => CompositeTransformer.cs} | 8 +- ...cs => CountFeatureSelectingTransformer.cs} | 14 +- .../EntryPoints/SelectFeatures.cs | 8 +- .../EntryPoints/TextAnalytics.cs | 74 +- .../ExtensionsCatalog.cs | 8 +- src/Microsoft.ML.Transforms/GcnTransform.cs | 988 +- src/Microsoft.ML.Transforms/GroupTransform.cs | 12 +- ...inTransform.cs => HashJoiningTransform.cs} | 65 +- ...ctorTransform.cs => KeyToVectorMapping.cs} | 68 +- .../LearnerFeatureSelection.cs | 40 +- .../Microsoft.ML.Transforms.csproj | 1 + .../MissingValueDroppingTransformer.cs | 390 + ....cs => MissingValueHandlingTransformer.cs} | 38 +- .../MissingValueIndicatorTransform.cs | 72 +- ...cs => MissingValueIndicatorTransformer.cs} | 101 +- ...eTransform.cs => MissingValueReplacing.cs} | 161 +- ...Utils.cs => MissingValueReplacingUtils.cs} | 15 +- .../MutualInformationFeatureSelection.cs | 120 +- .../NADropTransform.cs | 339 - src/Microsoft.ML.Transforms/NAHandling.cs | 43 +- ...nsform.cs => OneHotEncodingTransformer.cs} | 86 +- ...rm.cs => OneHotHashEncodingTransformer.cs} | 64 +- .../OptionalColumnTransform.cs | 8 +- .../ProjectionCatalog.cs | 70 +- ...ansform.cs => RandomFourierFeaturizing.cs} | 88 +- ...pTransform.cs => TermLookupTransformer.cs} | 30 +- .../Text/LdaSingleBox.cs | 29 +- .../Text/LdaStaticExtensions.cs | 174 + .../Text/LdaTransform.cs | 1103 +- ...ransform.cs => NgramHashingTransformer.cs} | 30 +- .../Text/NgramTransform.cs | 1044 +- .../Text/NgramUtils.cs | 8 +- ...form.cs => SentimentAnalyzingTransform.cs} | 28 +- ...orm.cs => StopWordsRemovingTransformer.cs} | 74 +- ...ansform.cs => TextFeaturizingEstimator.cs} | 62 +- ...malizerTransform.cs => TextNormalizing.cs} | 15 +- .../Text/TextStaticExtensions.cs | 77 +- ...Transform.cs => TokenizingByCharacters.cs} | 134 +- .../Text/WordBagTransform.cs | 147 +- ...ransform.cs => WordEmbeddingsExtractor.cs} | 249 +- ...rm.cs => WordHashBagProducingTransform.cs} | 71 +- ...TokenizeTransform.cs => WordTokenizing.cs} | 74 +- .../Text/WrappedTextTransformers.cs | 168 +- src/Microsoft.ML.Transforms/TextCatalog.cs | 147 +- .../TransformsStatic.cs | 120 + .../UngroupTransform.cs | 17 +- .../WhiteningTransform.cs | 640 - .../WrappedFeatureSelectionTransformers.cs | 16 +- .../WrappedGcnTransformers.cs | 223 - .../WrappedWhiteningTransformer.cs | 167 - src/Microsoft.ML.Transforms/doc.xml | 9 +- .../CommandTrainingLrWithStats-summary.txt | 12 + .../Common/EntryPoints/core_ep-list.tsv | 48 +- .../Common/EntryPoints/core_manifest.json | 22 +- .../EntryPoints/ensemble-model0-stats.txt | 12 +- .../EntryPoints/ensemble-model2-stats.txt | 12 +- .../ensemble-summary-key-value-pairs.txt | 20 + .../Common/EntryPoints/ensemble-summary.txt | 30 + .../Common/EntryPoints/lr-stats.txt | 12 +- ...ForestRegression-TrainTest-housing-out.txt | 13 +- ...eRegressorTester-TrainTest-housing-out.txt | 13 +- .../FastRank-TrainTest-breast-cancer-out.txt | 14 +- .../Common/NormalizerEstimator/gcnNorm.tsv | 9 + .../Common/NormalizerEstimator/lpNorm.tsv | 9 + .../lpnorm_gcnorm_whitened.tsv | 0 .../NormalizerEstimator/normalized.tsv | 0 .../Common/NormalizerEstimator/whitened.tsv | 9 + .../Onnx/Cluster/BreastCancer/Kmeans.json | 40 +- .../Onnx/Cluster/BreastCancer/Kmeans.onnx | Bin 867 -> 0 bytes .../SavePipeCustomStopwordsRemover-Data.txt | 6 + .../SavePipe/SavePipeDropColumns-Data.txt | 32569 ++++++++++++++++ .../SavePipe/SavePipeDropColumns-Schema.txt | 163 + .../SavePipe/SavePipeLabelParsers-Schema.txt | 2 +- .../SavePipe/SavePipeLabelParsers1-Schema.txt | 2 +- .../SavePipe/SavePipeLabelParsers2-Schema.txt | 2 +- .../SavePipe/SavePipeLabelParsers3-Schema.txt | 2 +- .../SavePipe/SavePipeLabelParsers4-Schema.txt | 4 +- .../SavePipe/SavePipeLabelParsers5-Schema.txt | 2 +- .../Common/SavePipe/SavePipeNgram-Schema.txt | 12 +- .../SavePipeNgramHash-Convert-Schema.txt | 2 +- .../SavePipe/SavePipeNgramHash-Schema.txt | 12 +- .../SavePipe/SavePipeNgramSparse-Schema.txt | 2 +- .../SavePipeTermDictionaryNgram-Schema.txt | 2 +- ...avePipeTermDictionaryNgramTerms-Schema.txt | 2 +- .../SavePipeTokenizerAndStopWords-Data.txt | 16 + .../SavePipeTokenizerAndStopWords-Schema.txt | 15 + .../SavePipe/SavePipeWordHash-Schema.txt | 2 +- test/BaselineOutput/README.md | 3 + ...sification-TrainTest-breast-cancer-out.txt | 14 +- ...Tree-TrainTest-Census-Cat-Only.Cat-out.txt | 13 +- .../FastTree-TrainTest-Census.Cat-out.txt | 13 +- ...Tree-TrainTest-breast-cancer-group-out.txt | 15 +- .../FastTree-TrainTest-breast-cancer-out.txt | 14 +- ...astTreeBsr-TrainTest-breast-cancer-out.txt | 14 +- ...ical-TrainTest-Census-Cat-Only.Cat-out.txt | 13 +- ...eeCategorical-TrainTest-Census.Cat-out.txt | 13 +- ...Disk-TrainTest-Census-Cat-Only.Cat-out.txt | 11 +- ...tegoricalDisk-TrainTest-Census.Cat-out.txt | 11 +- ...Disk-TrainTest-Census-Cat-Only.Cat-out.txt | 11 +- .../FastTreeDisk-TrainTest-Census.Cat-out.txt | 11 +- ...stTreeDisk-TrainTest-breast-cancer-out.txt | 12 +- ...stTreeDrop-TrainTest-breast-cancer-out.txt | 14 +- ...ighMinDocs-TrainTest-breast-cancer-out.txt | 14 +- test/BaselineOutput/SingleDebug/PCA/pca.tsv | 8 +- ...estClassification-CV-breast-cancer-out.txt | 4 +- ...sification-TrainTest-breast-cancer-out.txt | 16 +- ...Tree-TrainTest-Census-Cat-Only.Cat-out.txt | 15 +- .../FastTree-TrainTest-Census.Cat-out.txt | 15 +- ...Tree-TrainTest-breast-cancer-group-out.txt | 17 +- .../FastTree-TrainTest-breast-cancer-out.txt | 16 +- ...astTreeBsr-TrainTest-breast-cancer-out.txt | 16 +- ...ical-TrainTest-Census-Cat-Only.Cat-out.txt | 15 +- ...eeCategorical-TrainTest-Census.Cat-out.txt | 15 +- ...Disk-TrainTest-Census-Cat-Only.Cat-out.txt | 13 +- ...tegoricalDisk-TrainTest-Census.Cat-out.txt | 13 +- ...Disk-TrainTest-Census-Cat-Only.Cat-out.txt | 13 +- .../FastTreeDisk-TrainTest-Census.Cat-out.txt | 13 +- ...stTreeDisk-TrainTest-breast-cancer-out.txt | 14 +- ...stTreeDrop-TrainTest-breast-cancer-out.txt | 16 +- ...ighMinDocs-TrainTest-breast-cancer-out.txt | 16 +- .../NormalizerEstimator/normalized.tsv | 175 - test/BaselineOutput/SingleRelease/PCA/pca.tsv | 8 +- .../Text/lpnorm_gcnorm_whitened.tsv | 10 - .../Harness/Configs.cs | 18 +- .../Harness/ProjectGenerator.cs | 2 +- test/Microsoft.ML.Benchmarks/HashBench.cs | 4 +- .../Helpers/EnvironmentFactory.cs | 21 +- .../KMeansAndLogisticRegressionBench.cs | 56 +- .../Microsoft.ML.Benchmarks.csproj | 1 + .../Numeric/Ranking.cs | 26 +- .../PredictionEngineBench.cs | 60 +- test/Microsoft.ML.Benchmarks/README.md | 6 +- ...sticDualCoordinateAscentClassifierBench.cs | 54 +- .../Text/MultiClassClassification.cs | 40 +- .../Code/ContractsCheckTest.cs | 31 +- .../Helpers/CodeFixVerifier.cs | 5 + .../Microsoft.ML.CodeAnalyzer.Tests.csproj | 14 +- .../Resources/ContractsCheckResource.cs | 12 + .../UnitTests/TestCSharpApi.cs | 1524 +- .../UnitTests/TestContracts.cs | 4 +- .../UnitTests/TestEarlyStoppingCriteria.cs | 2 +- .../UnitTests/TestEntryPoints.cs | 66 +- .../UnitTests/TestHosts.cs | 2 +- .../UnitTests/TestVectorUtils.cs | 62 + .../UnitTests.cs | 12 +- .../Microsoft.ML.InferenceTesting.csproj | 22 - .../Microsoft.ML.OnnxTransformTest.csproj | 4 +- .../OnnxTransformTests.cs | 169 +- .../CmdLine/CmdIndenterTest.cs | 3 +- .../CmdLine/CmdLine.cs | 25 +- .../CmdLine/CmdLineReverseTest.cs | 2 +- .../Commands}/InferRecipesCommand.cs | 4 +- .../Commands}/InferSchemaCommand.cs | 4 +- .../Microsoft.ML.Predictor.Tests.csproj | 1 - .../TestAutoInference.cs | 314 +- .../TestDatasetInference.cs | 142 +- .../TestPipelineSweeper.cs | 62 +- .../TestTransposer.cs | 2 +- .../ImageAnalyticsTests.cs | 3 +- .../Microsoft.ML.StaticPipelineTesting.csproj | 1 + .../StaticPipeTests.cs | 74 +- .../Training.cs | 78 +- .../Microsoft.ML.Sweeper.Tests/SweeperTest.cs | 34 +- .../Microsoft.ML.Sweeper.Tests/TestSweeper.cs | 806 +- .../BaseTestBaseline.cs | 80 +- .../BaseTestPredictorsMaml.cs | 4 +- .../DataPipe/TestDataPipe.cs | 172 +- .../DataPipe/TestDataPipeBase.cs | 32 +- .../EnvironmentExtensions.cs | 2 +- .../Microsoft.ML.TestFramework/ModelHelper.cs | 3 +- .../TestCommandBase.cs | 70 +- .../TestSparseDataView.cs | 68 +- test/Microsoft.ML.Tests/CachingTests.cs | 82 + .../CollectionDataSourceTests.cs | 231 +- test/Microsoft.ML.Tests/ImagesTests.cs | 1182 +- .../LearningPipelineTests.cs | 2 +- test/Microsoft.ML.Tests/OnnxTests.cs | 140 +- test/Microsoft.ML.Tests/RangeFilterTests.cs | 40 + .../Api/CookbookSamples/CookbookSamples.cs | 10 +- .../CookbookSamplesDynamicApi.cs | 111 +- .../Api/Estimators/CrossValidation.cs | 6 +- .../Estimators/DecomposableTrainAndPredict.cs | 4 +- .../Scenarios/Api/Estimators/Evaluation.cs | 2 +- .../Scenarios/Api/Estimators/Extensibility.cs | 4 +- .../Api/Estimators/FileBasedSavingOfData.cs | 2 +- .../Api/Estimators/IntrospectiveTraining.cs | 2 +- .../Api/Estimators/Metacomponents.cs | 4 +- .../Api/Estimators/MultithreadedPrediction.cs | 2 +- .../Estimators/ReconfigurablePrediction.cs | 2 +- .../Api/Estimators/SimpleTrainAndPredict.cs | 2 +- .../Estimators/TrainSaveModelAndPredict.cs | 2 +- .../Estimators/TrainWithInitialPredictor.cs | 6 +- .../Api/Estimators/TrainWithValidationSet.cs | 2 +- .../Scenarios/Api/TestApi.cs | 182 +- test/Microsoft.ML.Tests/Scenarios/OvaTest.cs | 148 + .../Scenarios/SentimentPredictionTests.cs | 3 +- .../Scenarios/TensorflowTests.cs | 1 - .../IrisPlantClassificationTests.cs | 114 +- .../SentimentPredictionTests.cs | 181 +- .../TensorflowTests.cs | 1128 +- .../TensorFlowEstimatorTests.cs | 143 +- test/Microsoft.ML.Tests/TermEstimatorTests.cs | 36 +- test/Microsoft.ML.Tests/TextLoaderTests.cs | 234 +- .../TrainerEstimators/FAFMEstimator.cs | 2 +- .../TrainerEstimators/LbfgsTests.cs | 43 +- .../MatrixFactorizationTests.cs | 123 +- .../TrainerEstimators/MetalinearEstimators.cs | 10 +- .../OlsLinearRegressionTests.cs | 2 +- .../TrainerEstimators/OnlineLinearTests.cs | 1 + .../TrainerEstimators/SdcaTests.cs | 6 +- .../SymSgdClassificationTests.cs | 8 +- .../TrainerEstimators/TrainerEstimators.cs | 8 +- .../TrainerEstimators/TreeEstimators.cs | 2 +- .../Transformers/CategoricalHashTests.cs | 30 +- .../Transformers/CategoricalTests.cs | 48 +- .../Transformers/CharTokenizeTests.cs | 4 +- .../Transformers/ConcatTests.cs | 10 +- .../Transformers/ConvertTests.cs | 44 +- .../Transformers/CopyColumnEstimatorTests.cs | 151 +- .../Transformers/CustomMappingTests.cs | 64 +- .../Transformers/FeatureSelectionTests.cs | 4 +- .../Transformers/HashTests.cs | 46 +- .../KeyToBinaryVectorEstimatorTest.cs | 42 +- .../Transformers/KeyToValueTests.cs | 18 +- .../Transformers/KeyToVectorEstimatorTests.cs | 60 +- .../Transformers/LineParserTests.cs | 40 + .../Transformers/NAReplaceTests.cs | 26 +- .../Transformers/NormalizerTests.cs | 329 +- .../Transformers/PcaTests.cs | 7 +- .../Transformers/RffTests.cs | 8 +- .../Transformers/SelectColumnsTests.cs | 36 +- .../Transformers/TextFeaturizerTests.cs | 78 +- .../Transformers/WordTokenizeTests.cs | 8 +- .../TimeSeriesDirectApi.cs | 163 +- .../InstanceInitializerAnalyzer.cs | 2 +- 694 files changed, 51670 insertions(+), 16071 deletions(-) create mode 100644 docs/samples/Microsoft.ML.Samples/Dynamic/IidChangePointDetectorTransform.cs create mode 100644 docs/samples/Microsoft.ML.Samples/Dynamic/IidSpikeDetectorTransform.cs create mode 100644 docs/samples/Microsoft.ML.Samples/Dynamic/NgramExtraction.cs rename docs/samples/Microsoft.ML.Samples/Dynamic/{MinMaxNormalizer.cs => Normalizer.cs} (68%) create mode 100644 docs/samples/Microsoft.ML.Samples/Dynamic/ProjectionTransforms.cs create mode 100644 docs/samples/Microsoft.ML.Samples/Dynamic/SsaChangePointDetectorTransform.cs create mode 100644 docs/samples/Microsoft.ML.Samples/Dynamic/SsaSpikeDetectorTransform.cs delete mode 100644 docs/samples/Microsoft.ML.Samples/Dynamic/Timeseries.cs create mode 100644 src/Microsoft.ML.Core/CommandLine/ArgumentType.cs create mode 100644 src/Microsoft.ML.Core/CommandLine/DefaultArgumentAttribute.cs create mode 100644 src/Microsoft.ML.Core/CommandLine/EnumValueDisplayAttribute.cs create mode 100644 src/Microsoft.ML.Core/CommandLine/HideEnumValueAttribute.cs rename src/Microsoft.ML.Core/CommandLine/{Utils.cs => SpecialPurpose.cs} (93%) rename src/{Common => Microsoft.ML.Core/ComponentModel}/AssemblyLoadingUtils.cs (97%) delete mode 100644 src/Microsoft.ML.Core/Data/ITrainerArguments.cs create mode 100644 src/Microsoft.ML.Core/Data/VBufferEditor.cs rename src/Microsoft.ML.Core/{Data => EntryPoints}/IMlState.cs (98%) rename src/Microsoft.ML.Core/{Data => EntryPoints}/IPredictorModel.cs (100%) create mode 100644 src/Microsoft.ML.Core/Utilities/IndentedTextWriterExtensions.cs delete mode 100644 src/Microsoft.ML.Core/Utilities/IndentingTextWriter.cs create mode 100644 src/Microsoft.ML.Core/Utilities/LineParser.cs delete mode 100644 src/Microsoft.ML.Core/Utilities/ListExtensions.cs delete mode 100644 src/Microsoft.ML.Core/Utilities/MemUtils.cs create mode 100644 src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoaderSaverCatalog.cs delete mode 100644 src/Microsoft.ML.Data/DataLoadSave/DataLoadSaveCatalog.cs create mode 100644 src/Microsoft.ML.Data/DataLoadSave/DataOperations.cs create mode 100644 src/Microsoft.ML.Data/Depricated/Vector/GenericSpanSortHelper.cs rename src/Microsoft.ML.Data/Transforms/{ConcatTransform.cs => ColumnConcatenatingTransformer.cs} (84%) rename src/Microsoft.ML.Data/Transforms/{SelectColumnsTransform.cs => ColumnSelecting.cs} (85%) rename src/Microsoft.ML.Data/Transforms/{CopyColumnsTransform.cs => ColumnsCopying.cs} (75%) rename src/Microsoft.ML.Data/Transforms/{HashTransform.cs => Hashing.cs} (89%) rename src/Microsoft.ML.Data/Transforms/{KeyToValueTransform.cs => KeyToValue.cs} (83%) rename src/Microsoft.ML.Data/Transforms/{KeyToVectorTransform.cs => KeyToVector.cs} (91%) rename src/Microsoft.ML.Data/Transforms/{ShuffleTransform.cs => RowShufflingTransformer.cs} (96%) create mode 100644 src/Microsoft.ML.Data/Transforms/RowToRowTransformerBase.cs rename src/Microsoft.ML.Data/Transforms/{TrainAndScoreTransform.cs => TrainAndScoreTransformer.cs} (90%) rename src/Microsoft.ML.Data/Transforms/{ConvertTransform.cs => TypeConverting.cs} (88%) rename src/Microsoft.ML.Data/Transforms/{TermTransform.cs => ValueToKeyMappingTransformer.cs} (93%) rename src/Microsoft.ML.Data/Transforms/{TermTransformImpl.cs => ValueToKeyMappingTransformerImpl.cs} (93%) rename src/Microsoft.ML.Data/Utils/{IntSequencePool.cs => SequencePool.cs} (98%) create mode 100644 src/Microsoft.ML.FastTree/Properties/AssemblyInfo.cs create mode 100644 src/Microsoft.ML.HalLearners/ComputeLRTrainingStdThroughHal.cs create mode 100644 src/Microsoft.ML.HalLearners/ProjectionCatalog.cs create mode 100644 src/Microsoft.ML.HalLearners/TransformsStatic.cs create mode 100644 src/Microsoft.ML.HalLearners/VectorWhitening.cs rename {test/Microsoft.ML.InferenceTesting => src/Microsoft.ML.PipelineInference}/GenerateSweepCandidatesCommand.cs (96%) create mode 100644 src/Microsoft.ML.PipelineInference/Properties/AssemblyInfo.cs delete mode 100644 src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsCatalog.cs delete mode 100644 src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerCatalog.cs delete mode 100644 src/Microsoft.ML.StandardLearners/Standard/SdcaCatalog.cs delete mode 100644 src/Microsoft.ML.StandardLearners/Standard/SgdCatalog.cs create mode 100644 src/Microsoft.ML.StandardLearners/StandardLearnersCatalog.cs rename src/{Microsoft.ML.Core/Prediction => Microsoft.ML.Sweeper}/ISweeper.cs (100%) create mode 100644 src/Microsoft.ML.Sweeper/Properties/AssemblyInfo.cs rename src/Microsoft.ML.TimeSeries/{ISequenceModeler.cs => SequenceModelerBase.cs} (75%) rename src/Microsoft.ML.Transforms/{BootstrapSampleTransform.cs => BootstrapSamplingTransformer.cs} (84%) rename src/Microsoft.ML.Transforms/{CompositeTransform.cs => CompositeTransformer.cs} (89%) rename src/Microsoft.ML.Transforms/{CountFeatureSelection.cs => CountFeatureSelectingTransformer.cs} (94%) rename src/Microsoft.ML.Transforms/{HashJoinTransform.cs => HashJoiningTransform.cs} (92%) rename src/Microsoft.ML.Transforms/{KeyToBinaryVectorTransform.cs => KeyToVectorMapping.cs} (89%) create mode 100644 src/Microsoft.ML.Transforms/MissingValueDroppingTransformer.cs rename src/Microsoft.ML.Transforms/{NAHandleTransform.cs => MissingValueHandlingTransformer.cs} (79%) rename src/Microsoft.ML.Transforms/{NAIndicatorTransform.cs => MissingValueIndicatorTransformer.cs} (85%) rename src/Microsoft.ML.Transforms/{NAReplaceTransform.cs => MissingValueReplacing.cs} (86%) rename src/Microsoft.ML.Transforms/{NAReplaceUtils.cs => MissingValueReplacingUtils.cs} (98%) delete mode 100644 src/Microsoft.ML.Transforms/NADropTransform.cs rename src/Microsoft.ML.Transforms/{CategoricalTransform.cs => OneHotEncodingTransformer.cs} (83%) rename src/Microsoft.ML.Transforms/{CategoricalHashTransform.cs => OneHotHashEncodingTransformer.cs} (85%) rename src/Microsoft.ML.Transforms/{RffTransform.cs => RandomFourierFeaturizing.cs} (89%) rename src/Microsoft.ML.Transforms/{TermLookupTransform.cs => TermLookupTransformer.cs} (95%) create mode 100644 src/Microsoft.ML.Transforms/Text/LdaStaticExtensions.cs rename src/Microsoft.ML.Transforms/Text/{NgramHashTransform.cs => NgramHashingTransformer.cs} (97%) rename src/Microsoft.ML.Transforms/Text/{SentimentAnalyzerTransform.cs => SentimentAnalyzingTransform.cs} (82%) rename src/Microsoft.ML.Transforms/Text/{StopWordsRemoverTransform.cs => StopWordsRemovingTransformer.cs} (91%) rename src/Microsoft.ML.Transforms/Text/{TextTransform.cs => TextFeaturizingEstimator.cs} (91%) rename src/Microsoft.ML.Transforms/Text/{TextNormalizerTransform.cs => TextNormalizing.cs} (97%) rename src/Microsoft.ML.Transforms/Text/{CharTokenizeTransform.cs => TokenizingByCharacters.cs} (80%) rename src/Microsoft.ML.Transforms/Text/{WordEmbeddingsTransform.cs => WordEmbeddingsExtractor.cs} (78%) rename src/Microsoft.ML.Transforms/Text/{WordHashBagTransform.cs => WordHashBagProducingTransform.cs} (87%) rename src/Microsoft.ML.Transforms/Text/{WordTokenizeTransform.cs => WordTokenizing.cs} (86%) create mode 100644 src/Microsoft.ML.Transforms/TransformsStatic.cs delete mode 100644 src/Microsoft.ML.Transforms/WhiteningTransform.cs delete mode 100644 src/Microsoft.ML.Transforms/WrappedGcnTransformers.cs delete mode 100644 src/Microsoft.ML.Transforms/WrappedWhiteningTransformer.cs create mode 100644 test/BaselineOutput/Common/NormalizerEstimator/gcnNorm.tsv create mode 100644 test/BaselineOutput/Common/NormalizerEstimator/lpNorm.tsv rename test/BaselineOutput/{SingleDebug/Text => Common/NormalizerEstimator}/lpnorm_gcnorm_whitened.tsv (100%) rename test/BaselineOutput/{SingleDebug => Common}/NormalizerEstimator/normalized.tsv (100%) create mode 100644 test/BaselineOutput/Common/NormalizerEstimator/whitened.tsv delete mode 100644 test/BaselineOutput/Common/Onnx/Cluster/BreastCancer/Kmeans.onnx create mode 100644 test/BaselineOutput/Common/SavePipe/SavePipeCustomStopwordsRemover-Data.txt create mode 100644 test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Data.txt create mode 100644 test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Schema.txt create mode 100644 test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Data.txt create mode 100644 test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Schema.txt create mode 100644 test/BaselineOutput/README.md delete mode 100644 test/BaselineOutput/SingleRelease/NormalizerEstimator/normalized.tsv delete mode 100644 test/BaselineOutput/SingleRelease/Text/lpnorm_gcnorm_whitened.tsv create mode 100644 test/Microsoft.ML.Core.Tests/UnitTests/TestVectorUtils.cs delete mode 100644 test/Microsoft.ML.InferenceTesting/Microsoft.ML.InferenceTesting.csproj rename test/{Microsoft.ML.InferenceTesting => Microsoft.ML.Predictor.Tests/Commands}/InferRecipesCommand.cs (96%) rename test/{Microsoft.ML.InferenceTesting => Microsoft.ML.Predictor.Tests/Commands}/InferSchemaCommand.cs (95%) create mode 100644 test/Microsoft.ML.Tests/CachingTests.cs create mode 100644 test/Microsoft.ML.Tests/RangeFilterTests.cs create mode 100644 test/Microsoft.ML.Tests/Scenarios/OvaTest.cs create mode 100644 test/Microsoft.ML.Tests/Transformers/LineParserTests.cs diff --git a/Directory.Build.props b/Directory.Build.props index 22492ad639..497572b99f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -113,6 +113,7 @@ true + $(DefineContants);DEBUG false diff --git a/Microsoft.ML.sln b/Microsoft.ML.sln index 0635bfb168..6b76249bd5 100644 --- a/Microsoft.ML.sln +++ b/Microsoft.ML.sln @@ -17,8 +17,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.CpuMath", "src EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.PipelineInference", "src\Microsoft.ML.PipelineInference\Microsoft.ML.PipelineInference.csproj", "{2D7391C9-8254-4B8F-BF26-FADAF8F02F44}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.InferenceTesting", "test\Microsoft.ML.InferenceTesting\Microsoft.ML.InferenceTesting.csproj", "{E278EC99-E6EE-49FE-92E6-0A309A478D98}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Data", "src\Microsoft.ML.Data\Microsoft.ML.Data.csproj", "{AD92D96B-0E96-4F22-8DCE-892E13B1F282}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Onnx", "src\Microsoft.ML.Onnx\Microsoft.ML.Onnx.csproj", "{65D0603E-B96C-4DFC-BDD1-705891B88C18}" @@ -183,14 +181,6 @@ Global {2D7391C9-8254-4B8F-BF26-FADAF8F02F44}.Release|Any CPU.Build.0 = Release|Any CPU {2D7391C9-8254-4B8F-BF26-FADAF8F02F44}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU {2D7391C9-8254-4B8F-BF26-FADAF8F02F44}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU - {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU - {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU - {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Release|Any CPU.Build.0 = Release|Any CPU - {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU - {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU {AD92D96B-0E96-4F22-8DCE-892E13B1F282}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AD92D96B-0E96-4F22-8DCE-892E13B1F282}.Debug|Any CPU.Build.0 = Debug|Any CPU {AD92D96B-0E96-4F22-8DCE-892E13B1F282}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU @@ -560,7 +550,6 @@ Global {EC743D1D-7691-43B7-B9B0-5F2F7018A8F6} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} {46F2F967-C23F-4076-858D-33F7DA9BD2DA} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {2D7391C9-8254-4B8F-BF26-FADAF8F02F44} = {09EADF06-BE25-4228-AB53-95AE3E15B530} - {E278EC99-E6EE-49FE-92E6-0A309A478D98} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} {AD92D96B-0E96-4F22-8DCE-892E13B1F282} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {65D0603E-B96C-4DFC-BDD1-705891B88C18} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {707BB22C-7E5F-497A-8C2F-74578F675705} = {09EADF06-BE25-4228-AB53-95AE3E15B530} diff --git a/README.md b/README.md index 6de6080e50..15dd419948 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,11 @@ Along with these ML capabilities, this first release of ML.NET also brings the f [![NuGet Status](https://img.shields.io/nuget/v/Microsoft.ML.svg?style=flat)](https://www.nuget.org/packages/Microsoft.ML/) -ML.NET runs on Windows, Linux, and macOS - any platform where x64 [.NET Core](https://github.com/dotnet/core) or later is available. In addition, .NET Framework on Windows x64 is also supported. +ML.NET runs on Windows, Linux, and macOS using [.NET Core](https://github.com/dotnet/core), or Windows using .NET Framework. 64 bit is supported on all platforms. 32 bit is supported on Windows, except for TensorFlow, LightGBM, and ONNX related functionality. -The current release is 0.6. Check out the [release notes](docs/release-notes/0.6/release-0.6.md) to see what's new. +The current release is 0.7. Check out the [release notes](docs/release-notes/0.7/release-0.7.md) and [blog post](https://blogs.msdn.microsoft.com/dotnet/2018/11/08/announcing-ml-net-0-7-machine-learning-net/) to see what's new. -First, ensure you have installed [.NET Core 2.0](https://www.microsoft.com/net/learn/get-started) or later. ML.NET also works on the .NET Framework. Note that ML.NET currently must run in a 64-bit process. +First, ensure you have installed [.NET Core 2.1](https://www.microsoft.com/net/learn/get-started) or later. ML.NET also works on the .NET Framework 4.6.1 or later, but 4.7.2 or later is recommended. Once you have an app, you can install the ML.NET NuGet package from the .NET Core CLI using: ``` @@ -44,9 +44,9 @@ To build ML.NET from source please visit our [developers guide](docs/project-doc | | x64 Debug | x64 Release | |:---|----------------:|------------------:| -|**Linux**|[![x64-debug](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)|[![x64-release](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)| -|**macOS**|[![x64-debug](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)|[![x64-release](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)| -|**Windows**|[![x64-debug](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)|[![x64-release](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)| +|**Linux**|[![x64-debug](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobname=Linux&configuration=Build_Debug)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)|[![x64-release](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobname=Linux&configuration=Build_Release)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)| +|**macOS**|[![x64-debug](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobname=macOS&configuration=Build_Debug)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)|[![x64-release](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobname=macOS&configuration=Build_Release)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)| +|**Windows**|[![x64-debug](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobname=Windows_x64&configuration=Build_Debug)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)|[![x64-release](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobname=Windows_x64&configuration=Build_Release)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)| ## Contributing @@ -65,18 +65,19 @@ Here's an example of code to train a model to predict sentiment from text sample (You can find a sample of the legacy API [here](test/Microsoft.ML.Tests/Scenarios/SentimentPredictionTests.cs)): ```C# -var env = new LocalEnvironment(); -var reader = TextLoader.CreateReader(env, ctx => ( - Target: ctx.LoadFloat(2), - FeatureVector: ctx.LoadFloat(3, 6)), - separator: ',', - hasHeader: true); -var data = reader.Read(new MultiFileSource(dataPath)); -var classification = new MulticlassClassificationContext(env); -var learningPipeline = reader.MakeNewEstimator() - .Append(r => ( - r.Target, - Prediction: classification.Trainers.Sdca(r.Target.ToKey(), r.FeatureVector))); +var mlContext = new MLContext(); +var reader = mlContext.Data.TextReader(new TextLoader.Arguments + { + Column = new[] { + new TextLoader.Column("SentimentText", DataKind.Text, 1), + new TextLoader.Column("Label", DataKind.Bool, 0), + }, + HasHeader = true, + Separator = "," +}); +var data = reader.Read(dataPath); +var learningPipeline = mlContext.Transforms.Text.FeaturizeText("SentimentText", "Features") + .Append(mlContext.BinaryClassification.Trainers.FastTree()); var model = learningPipeline.Fit(data); ``` @@ -84,12 +85,12 @@ var model = learningPipeline.Fit(data); Now from the model we can make inferences (predictions): ```C# -var predictionFunc = model.MakePredictionFunction(env); +var predictionFunc = model.MakePredictionFunction(mlContext); var prediction = predictionFunc.Predict(new SentimentData { SentimentText = "Today is a great day!" }); -Console.WriteLine("prediction: " + prediction.Sentiment); +Console.WriteLine("prediction: " + prediction.Prediction); ``` A cookbook that shows how to use these APIs for a variety of existing and new scenarios can be found [here](docs/code/MlNetCookBook.md). diff --git a/ROADMAP.md b/ROADMAP.md index 113d4c339c..8547729599 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -18,7 +18,7 @@ In the meanwhile, we are looking for contributions. An easy place to start is t * _Ranking_ - problem where the goal is to automatically sort (rank) instances within a group based on ranked examples in training data * _Anomaly Detection_ - is also known as _outlier detection_. It is a task to identify items, events or observations which do not conform to an expected pattern in the dataset. * _Quantile Regression_ is a type of regression analysis. Whereas regression results in estimates that approximate the conditional mean of the response variable given certain values of the predictor variables, quantile regression aims at estimating either the conditional median or other quantiles of the response variable -* Additional Data source support (*) +* Additional Data Source support (*) * Apache Parquet * Native Binary high-performance format diff --git a/build/Dependencies.props b/build/Dependencies.props index 7a79b3a087..c221bf4f80 100644 --- a/build/Dependencies.props +++ b/build/Dependencies.props @@ -9,6 +9,7 @@ 4.3.0 4.8.0 4.5.0 + 4.6.0 @@ -38,7 +39,7 @@ - 0.11.1 + 0.11.3 0.0.3-test diff --git a/build/ci/phase-template.yml b/build/ci/phase-template.yml index e327231d64..9929ba182d 100644 --- a/build/ci/phase-template.yml +++ b/build/ci/phase-template.yml @@ -11,7 +11,7 @@ phases: _phaseName: ${{ parameters.name }} _arch: ${{ parameters.architecture }} queue: - timeoutInMinutes: 40 + timeoutInMinutes: 45 parallel: 99 matrix: Build_Debug: diff --git a/docs/building/unix-instructions.md b/docs/building/unix-instructions.md index 7919e97d63..7efa1c414c 100644 --- a/docs/building/unix-instructions.md +++ b/docs/building/unix-instructions.md @@ -42,11 +42,12 @@ macOS 10.12 (Sierra) or higher is needed to build dotnet/machinelearning. On macOS a few components are needed which are not provided by a default developer setup: * cmake 3.10.3 -* gcc +* libomp +* libgdiplus +* gettext * All the requirements necessary to run .NET Core 2.0 applications. To view macOS prerequisites click [here](https://docs.microsoft.com/en-us/dotnet/core/macos-prerequisites?tabs=netcore2x). -One way of obtaining CMake and gcc is via [Homebrew](https://brew.sh): +One way of obtaining CMake and other required libraries is via [Homebrew](https://brew.sh): ```sh -$ brew install cmake -$ brew install gcc +$ brew install cmake libomp mono-libgdiplus gettext && brew link gettext --force ``` diff --git a/docs/code/MlNetCookBook.md b/docs/code/MlNetCookBook.md index 92c589d3a8..f2358d05ac 100644 --- a/docs/code/MlNetCookBook.md +++ b/docs/code/MlNetCookBook.md @@ -21,6 +21,7 @@ Please feel free to search this page and use any code that suits your needs. - [How do I load data from a text file?](#how-do-i-load-data-from-a-text-file) - [How do I load data with many columns from a CSV?](#how-do-i-load-data-with-many-columns-from-a-csv) +- [How do I debug my experiment or preview my pipeline?](#how-do-i-debug-my-experiment-or-preview-my-pipeline) - [How do I look at the intermediate data?](#how-do-i-look-at-the-intermediate-data) - [How do I train a regression model?](#how-do-i-train-a-regression-model) - [How do I verify the model quality?](#how-do-i-verify-the-model-quality) @@ -33,6 +34,7 @@ Please feel free to search this page and use any code that suits your needs. - [How do I train my model on textual data?](#how-do-i-train-my-model-on-textual-data) - [How do I train using cross-validation?](#how-do-i-train-using-cross-validation) - [Can I mix and match static and dynamic pipelines?](#can-i-mix-and-match-static-and-dynamic-pipelines) +- [How can I define my own transformation of data?](#how-can-i-define-my-own-transformation-of-data) ### General questions about the samples @@ -244,6 +246,36 @@ var reader = mlContext.Data.TextReader(new[] { var data = reader.Read(dataPath); ``` +## How do I debug my experiment or preview my pipeline? + +Most ML.NET operations are 'lazy': they are not actually processing data, they just validate that the operation is possible, and then defer execution until the output data is actually requested. This provides good efficiency, but makes it hard to step through and debug the experiment. + +In order to improve debug-ability, we have added a `Preview()` extension method to all data views, transformers, estimators and readers: + +- `Preview` of a data view contains first 100 rows (configurable) of the data view, encoded as objects, in a single in-memory structure. +- `Preview` of a transformer takes data as input, and outputs the preview of the transformed data. +- `Preview` of an estimator also takes data as input, fits an 'approximated model' on the first 100 rows (configurable) of data, and then outputs the preview of the resulting transformer. + +We tried to make `Preview` debugger-friendly: our expectation is that, if you enter, say `data.Preview()` in your Watch window, you will be able to easily inspect the data there. + +Here is the code sample: +```csharp +var mlContext = new MLContext(); +var estimator = mlContext.Transforms.Categorical.MapValueToKey("Label") + .Append(mlContext.MulticlassClassification.Trainers.StochasticDualCoordinateAscent()) + .Append(mlContext.Transforms.Conversion.MapKeyToValue("PredictedLabel")); + +var data = mlContext.Data.ReadFromTextFile(new TextLoader.Column[] { + new TextLoader.Column("Label", DataKind.Text, 0), + new TextLoader.Column("Features", DataKind.R4, 1, 4) }, filePath); + +// Preview the data. +var dataPreview = data.Preview(); + +// Preview the result of training and transformation. +var transformationPreview = estimator.Preview(data); +``` + ## How do I look at the intermediate data? Oftentimes, when we construct the experiment, we want to make sure that the data processing 'up to a certain moment' produces the results that we want. With ML.NET it is not very easy to do: since all ML.NET operations are lazy, the objects we construct are just 'promises' of data. @@ -1100,10 +1132,10 @@ var learningPipeline = reader.MakeNewEstimator() BagOfBigrams: r.Message.NormalizeText().ToBagofHashedWords(ngramLength: 2, allLengths: false), // NLP pipeline 3: bag of tri-character sequences with TF-IDF weighting. - BagOfTrichar: r.Message.TokenizeIntoCharacters().ToNgrams(ngramLength: 3, weighting: NgramTransform.WeightingCriteria.TfIdf), + BagOfTrichar: r.Message.TokenizeIntoCharacters().ToNgrams(ngramLength: 3, weighting: NgramCountingEstimator.WeightingCriteria.TfIdf), // NLP pipeline 4: word embeddings. - Embeddings: r.Message.NormalizeText().TokenizeText().WordEmbeddings(WordEmbeddingsTransform.PretrainedModelKind.GloVeTwitter25D) + Embeddings: r.Message.NormalizeText().TokenizeText().WordEmbeddings(WordEmbeddingsExtractorTransformer.PretrainedModelKind.GloVeTwitter25D) )); // Let's train our pipeline, and then apply it to the same data. @@ -1154,13 +1186,13 @@ var dynamicPipeline = // NLP pipeline 3: bag of tri-character sequences with TF-IDF weighting. .Append(mlContext.Transforms.Text.TokenizeCharacters("Message", "MessageChars")) - .Append(new NgramEstimator(mlContext, "MessageChars", "BagOfTrichar", - ngramLength: 3, weighting: NgramTransform.WeightingCriteria.TfIdf)) + .Append(new NgramCountingEstimator(mlContext, "MessageChars", "BagOfTrichar", + ngramLength: 3, weighting: NgramTokenizingTransformer.WeightingCriteria.TfIdf)) // NLP pipeline 4: word embeddings. .Append(mlContext.Transforms.Text.TokenizeWords("NormalizedMessage", "TokenizedMessage")) .Append(mlContext.Transforms.Text.ExtractWordEmbeedings("TokenizedMessage", "Embeddings", - WordEmbeddingsTransform.PretrainedModelKind.GloVeTwitter25D)); + WordEmbeddingsExtractorTransformer.PretrainedModelKind.GloVeTwitter25D)); // Let's train our pipeline, and then apply it to the same data. // Note that even on a small dataset of 70KB the pipeline above can take up to a minute to completely train. @@ -1331,7 +1363,7 @@ var learningPipeline = reader.MakeNewEstimator() IEstimator dynamicPipe = learningPipeline.AsDynamic; // Create a binary classification trainer. -var binaryTrainer = mlContext.BinaryClassification.Trainers.AveragedPerceptron(); +var binaryTrainer = mlContext.BinaryClassification.Trainers.AveragedPerceptron("Label", "Features"); // Append the OVA learner to the pipeline. dynamicPipe = dynamicPipe.Append(new Ova(mlContext, binaryTrainer)); @@ -1366,3 +1398,103 @@ var dynamicModel = dynamicPipe.Fit(data.AsDynamic); // Now 'dynamicModel', and 'model.AsDynamic' are equivalent. ``` + +## How can I define my own transformation of data? + +ML.NET has quite a lot of built-in transformers, but we can not possibly cover everything. Inevitably, you will need to perform custom user-defined operations. +We added `MLContext.Transforms.CustomMapping` for this very purpose: it is a user-defined arbitrary *mapping* of the data. + +Suppose that we have the dataset with float 'Income' column, and we want to compute 'Label', that is equal to `true` if the income is more than 50000, and `false` otherwise. + +Here's how we can do this via a custom transformer: + +```csharp +// Define a class for all the input columns that we intend to consume. +class InputRow +{ + public float Income { get; set; } +} + +// Define a class for all output columns that we intend to produce. +class OutputRow +{ + public bool Label { get; set; } +} + +public static IDataView PrepareData(MLContext mlContext, IDataView data) +{ + // Define the operation code. + Action mapping = (input, output) => output.Label = input.Income > 50000; + // Make a custom transformer and transform the data. + var transformer = mlContext.Transforms.CustomMappingTransformer(mapping, null); + return transformer.Transform(data); +} +``` + +You can also insert a custom mapping inside an estimator pipeline: +```csharp +public static ITransformer TrainModel(MLContext mlContext, IDataView trainData) +{ + // Define the custom operation. + Action mapping = (input, output) => output.Label = input.Income > 50000; + // Construct the learning pipeline. + var estimator = mlContext.Transforms.CustomMapping(mapping, null) + .Append(mlContext.BinaryClassification.Trainers.FastTree(label: "Label")); + + return estimator.Fit(trainData); +} +``` + +Please note that you need to make your `mapping` operation into a 'pure function': +- It should be reentrant (we will call it simultaneously from multiple threads) +- It should not have side effects (we may call it arbitrarily at any time, or omit the call) + +One important caveat is: if you want your custom transformation to be part of your saved model, you will need to provide a `contractName` for it. +At loading time, you will need to reconstruct the custom transformer and inject it into MLContext. + +Here is a complete example that saves and loads a model with a custom mapping. +```csharp +/// +/// One class that contains all custom mappings that we need for our model. +/// +public class CustomMappings +{ + // This is the custom mapping. We now separate it into a method, so that we can use it both in training and in loading. + public static void IncomeMapping(InputRow input, OutputRow output) => output.Label = input.Income > 50000; + + // MLContext is needed to create a new transformer. We are using 'Import' to have ML.NET populate + // this property. + [Import] + public MLContext MLContext { get; set; } + + // We are exporting the custom transformer by the name 'IncomeMapping'. + [Export(nameof(IncomeMapping))] + public ITransformer MyCustomTransformer + => MLContext.Transforms.CustomMappingTransformer(IncomeMapping, nameof(IncomeMapping)); +} +``` + +```csharp +// Construct the learning pipeline. Note that we are now providing a contract name for the custom mapping: +// otherwise we will not be able to save the model. +var estimator = mlContext.Transforms.CustomMapping(CustomMappings.IncomeMapping, nameof(CustomMappings.IncomeMapping)) + .Append(mlContext.BinaryClassification.Trainers.FastTree(label: "Label")); + +// Train the model. +var model = estimator.Fit(trainData); + +// Save the model. +using (var fs = File.Create(modelPath)) + mlContext.Model.Save(model, fs); + +// Now pretend we are in a different process. +var newContext = new MLContext(); + +// Create a custom composition container for all our custom mapping actions. +newContext.CompositionContainer = new CompositionContainer(new TypeCatalog(typeof(CustomMappings))); + +// Now we can load the model. +ITransformer loadedModel; +using (var fs = File.OpenRead(modelPath)) + loadedModel = newContext.Model.Load(fs); +``` \ No newline at end of file diff --git a/docs/code/MlNetHighLevelConcepts.md b/docs/code/MlNetHighLevelConcepts.md index 3f47f5f287..42a49b38c8 100644 --- a/docs/code/MlNetHighLevelConcepts.md +++ b/docs/code/MlNetHighLevelConcepts.md @@ -21,6 +21,8 @@ This document is going to cover the following ML.NET concepts: - You can think of a machine learning *algorithm* as an estimator that learns on data and produces a machine learning *model* (which is a transformer). - [*Prediction function*](#prediction-function), represented as a `PredictionFunction` class. - The prediction function can be seen as a machine that applies a transformer to one 'row', such as at prediction time. +- [*MLContext*](#mlcontext) object + - This is a 'catalog of everything' available in ML.NET. Use this object to read data, create estimators, save/load models, evaluate and perform all other tasks. ## Data @@ -108,11 +110,11 @@ public interface IEstimator You can easily imagine how *a sequence of estimators can be phrased as an estimator* of its own. In ML.NET, we rely on this property to create 'learning pipelines' that chain together different estimators: ```c# -var env = new LocalEnvironment(); // Initialize the ML.NET environment. -var estimator = new ConcatEstimator(env, "Features", "SepalLength", "SepalWidth", "PetalLength", "PetalWidth") - .Append(new ToKeyEstimator(env, "Label")) - .Append(new SdcaMultiClassTrainer(env, "Features", "Label")) // This is the actual 'machine learning algorithm'. - .Append(new ToValueEstimator(env, "PredictedLabel")); +var mlContext = new MLContext(); +var estimator = mlContext.Transforms.Concatenate("Features", "SepalLength", "SepalWidth", "PetalLength", "PetalWidth") + .Append(mlContext.Transforms.Categorical.MapValueToKey("Label")) + .Append(mlContext.MulticlassClassification.Trainers.StochasticDualCoordinateAscent()) + .Append(mlContext.Transforms.Conversion.MapKeyToValue("PredictedLabel")); var endToEndModel = estimator.Fit(data); // This now contains all the transformers that were used at training. ``` @@ -135,19 +137,51 @@ Of course, we can reduce this to the batch prediction: The above algorithm can be implemented using the [schema comprehension](SchemaComprehension.md), with two user-defined objects `InputExample` and `OutputPrediction` as follows: ```c# -var inputData = env.CreateDataView(new InputExample[] { example }); +var inputData = mlContext.CreateDataView(new InputExample[] { example }); var outputData = model.Transform(inputData); -var output = outputData.AsDynamic.AsEnumerable(env, reuseRowObject: false).Single(); +var output = outputData.AsDynamic.AsEnumerable(mlContext, reuseRowObject: false).Single(); ``` - But this would be cumbersome, and would incur performance costs. Instead, we have a 'prediction function' object that performs the same work, but faster and more convenient, via an extension method `MakePredictionFunction`: ```c# -var predictionFunc = model.MakePredictionFunction(env); +var predictionFunc = model.MakePredictionFunction(mlContext); var output = predictionFunc.Predict(example); ``` The same `predictionFunc` can (and should!) be used multiple times, thus amortizing the initial cost of `MakePredictionFunction` call. The prediction function is *not re-entrant / thread-safe*: if you want to conduct predictions simultaneously with multiple threads, you need to have a prediction function per thread. + +## MLContext + +With a vast variety of components in ML.NET, it is important to have a consistent way to discover them. You can use the `MLContext` object for this purpose. + +Create one `MLContext` for your entire application. All ML.NET components and operations are available as methods of various sub-objects of `MLContext`. + +- `MLContext.Data` contains operations related to creating `IDataView`s (other than transformers): + - Loading / saving data to a file + - Caching the data in memory + - Filtering (removing rows from data) + +Remember that `IDataView`s are immutable, so each of the above operations create a new `IDataView`. +On the other hand, `IDataView`s are also lazy, so there is no data replication from the above. + +- `MLContext.Model` contains operations related to models (transformers): saving and loading, creating prediction functions. + +- `MLContext.Transforms` contains estimators for non-prediction operations: + - `Categorical` for handling categorical values + - `Text` for natural language processing + - `Conversion` for various type conversions + - `Projection` for vector operations (like Principal Component Analysis, Random Fourier features, Vector Whitening etc.) + - Normalization/rescaling + - Column-related operations (rename, delete, clone, concatenate, etc.) + - etc. + +- `MLContext.BinaryClassification`, `MulticlassClassification`, `Ranking`, etc. are catalogs of learning algorithms for specific machine learning tasks. + - `TrainTestSplit` and `CrossValidate` to facilitate the respective operations + - `Trainers` containing various task-specific trainers. + +- `MLContext.Log` is a providing a stream of text messages about the long-running processes ML.NET is running. + +We are continuously adding new extensions to `MLContext` catalog, so if certain operations are not yet available, they will in the future. diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/ConcatTransform.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/ConcatTransform.cs index 16dc0278b9..ba945f38fa 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/ConcatTransform.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/ConcatTransform.cs @@ -1,22 +1,17 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - // the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. - using Microsoft.ML.Runtime.Data; - using Microsoft.ML.Runtime.Api; - using System; - using System.Linq; - using System.Collections.Generic; - using Microsoft.ML.Transforms; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Api; +using System; +using System.Linq; +using System.Collections.Generic; +using Microsoft.ML.Transforms; namespace Microsoft.ML.Samples.Dynamic { - public partial class TransformSamples + public class ConcatTransformExample { class SampleInfertDataWithFeatures { - public VBuffer Features { get; set; } + public VBuffer Features { get; set; } } public static void ConcatTransform() @@ -51,7 +46,7 @@ public static void ConcatTransform() Console.WriteLine($"{outputColumnName} column obtained post-transformation."); foreach (var featureRow in featuresColumn) { - foreach (var value in featureRow.Features.Values) + foreach (var value in featureRow.Features.GetValues()) Console.Write($"{value} "); Console.WriteLine(""); } diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/IidChangePointDetectorTransform.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/IidChangePointDetectorTransform.cs new file mode 100644 index 0000000000..179dda7444 --- /dev/null +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/IidChangePointDetectorTransform.cs @@ -0,0 +1,92 @@ +using System; +using System.Linq; +using System.Collections.Generic; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Runtime.TimeSeriesProcessing; + +namespace Microsoft.ML.Samples.Dynamic +{ + public partial class TransformSamples + { + class ChangePointPrediction + { + [VectorType(4)] + public double[] Prediction { get; set; } + } + + class IidChangePointData + { + public float Value; + + public IidChangePointData(float value) + { + Value = value; + } + } + + // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). + // IidChangePointDetector is applied then to identify points where data distribution changed. + public static void IidChangePointDetectorTransform() + { + // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, + // as well as the source of randomness. + var ml = new MLContext(); + + // Generate sample series data with a change + const int size = 16; + var data = new List(size); + for (int i = 0; i < size / 2; i++) + data.Add(new IidChangePointData(5)); + // This is a change point + for (int i = 0; i < size / 2; i++) + data.Add(new IidChangePointData(7)); + + // Convert data to IDataView. + var dataView = ml.CreateStreamingDataView(data); + + // Setup IidSpikeDetector arguments + string outputColumnName = "Prediction"; + string inputColumnName = "Value"; + var args = new IidChangePointDetector.Arguments() + { + Source = inputColumnName, + Name = outputColumnName, + Confidence = 95, // The confidence for spike detection in the range [0, 100] + ChangeHistoryLength = size / 4, // The length of the sliding window on p-values for computing the martingale score. + }; + + // The transformed data. + var transformedData = new IidChangePointEstimator(ml, args).Fit(dataView).Transform(dataView); + + // Getting the data of the newly created column as an IEnumerable of ChangePointPrediction. + var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); + + Console.WriteLine($"{outputColumnName} column obtained post-transformation."); + Console.WriteLine("Data\tAlert\tScore\tP-Value\tMartingale value"); + int k = 0; + foreach (var prediction in predictionColumn) + Console.WriteLine("{0}\t{1}\t{2:0.00}\t{3:0.00}\t{4:0.00}", data[k++].Value, prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2], prediction.Prediction[3]); + Console.WriteLine(""); + + // Prediction column obtained post-transformation. + // Data Alert Score P-Value Martingale value + // 5 0 5.00 0.50 0.00 + // 5 0 5.00 0.50 0.00 + // 5 0 5.00 0.50 0.00 + // 5 0 5.00 0.50 0.00 + // 5 0 5.00 0.50 0.00 + // 5 0 5.00 0.50 0.00 + // 5 0 5.00 0.50 0.00 + // 5 0 5.00 0.50 0.00 + // 7 1 7.00 0.00 10298.67 <-- alert is on, predicted changepoint + // 7 0 7.00 0.13 33950.16 + // 7 0 7.00 0.26 60866.34 + // 7 0 7.00 0.38 78362.04 + // 7 0 7.00 0.50 0.01 + // 7 0 7.00 0.50 0.00 + // 7 0 7.00 0.50 0.00 + // 7 0 7.00 0.50 0.00 + } + } +} diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/IidSpikeDetectorTransform.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/IidSpikeDetectorTransform.cs new file mode 100644 index 0000000000..3c6ae7a9c9 --- /dev/null +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/IidSpikeDetectorTransform.cs @@ -0,0 +1,87 @@ +using System; +using System.Linq; +using System.Collections.Generic; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Runtime.TimeSeriesProcessing; + +namespace Microsoft.ML.Samples.Dynamic +{ + public partial class TransformSamples + { + class IidSpikeData + { + public float Value; + + public IidSpikeData(float value) + { + Value = value; + } + } + + class IidSpikePrediction + { + [VectorType(3)] + public double[] Prediction { get; set; } + } + + // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). + // IidSpikeDetector is applied then to identify spiking points in the series. + public static void IidSpikeDetectorTransform() + { + // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, + // as well as the source of randomness. + var ml = new MLContext(); + + // Generate sample series data with a spike + const int size = 10; + var data = new List(size); + for (int i = 0; i < size / 2; i++) + data.Add(new IidSpikeData(5)); + // This is a spike + data.Add(new IidSpikeData(10)); + for (int i = 0; i < size / 2; i++) + data.Add(new IidSpikeData(5)); + + // Convert data to IDataView. + var dataView = ml.CreateStreamingDataView(data); + + // Setup IidSpikeDetector arguments + string outputColumnName = "Prediction"; + string inputColumnName = "Value"; + var args = new IidSpikeDetector.Arguments() + { + Source = inputColumnName, + Name = outputColumnName, + Confidence = 95, // The confidence for spike detection in the range [0, 100] + PvalueHistoryLength = size / 4 // The size of the sliding window for computing the p-value + }; + + // The transformed data. + var transformedData = new IidSpikeEstimator(ml, args).Fit(dataView).Transform(dataView); + + // Getting the data of the newly created column as an IEnumerable of IidSpikePrediction. + var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); + + Console.WriteLine($"{outputColumnName} column obtained post-transformation."); + Console.WriteLine("Alert\tScore\tP-Value"); + foreach (var prediction in predictionColumn) + Console.WriteLine("{0}\t{1:0.00}\t{2:0.00}", prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2]); + Console.WriteLine(""); + + // Prediction column obtained post-transformation. + // Alert Score P-Value + // 0 5.00 0.50 + // 0 5.00 0.50 + // 0 5.00 0.50 + // 0 5.00 0.50 + // 0 5.00 0.50 + // 1 10.00 0.00 <-- alert is on, predicted spike + // 0 5.00 0.26 + // 0 5.00 0.26 + // 0 5.00 0.50 + // 0 5.00 0.50 + // 0 5.00 0.50 + } + } +} diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/KeyToValue_Term.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/KeyToValue_Term.cs index b51a16bea6..d6e15eeb50 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/KeyToValue_Term.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/KeyToValue_Term.cs @@ -1,21 +1,16 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - // the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. - using Microsoft.ML.Data; - using Microsoft.ML.Runtime.Api; - using Microsoft.ML.Runtime.Data; - using Microsoft.ML.Transforms.Categorical; - using Microsoft.ML.Transforms.Conversions; - using Microsoft.ML.Transforms.Text; - using System; - using System.Collections.Generic; - using System.Linq; +using Microsoft.ML.Data; +using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Transforms.Categorical; +using Microsoft.ML.Transforms.Conversions; +using Microsoft.ML.Transforms.Text; +using System; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.ML.Samples.Dynamic { - public partial class TransformSamples + public class KeyToValue_TermExample { public static void KeyToValue_Term() { @@ -49,7 +44,7 @@ public static void KeyToValue_Term() // to value/alphabetically. string customizedColumnName = "CustomizedKeys"; var customized_pipeline = new WordTokenizingEstimator(ml, "Review") - .Append(new ValueToKeyMappingEstimator(ml, "Review", customizedColumnName, maxNumTerms: 10, sort: TermTransform.SortOrder.Value)); + .Append(new ValueToKeyMappingEstimator(ml, "Review", customizedColumnName, maxNumTerms: 10, sort: ValueToKeyMappingTransformer.SortOrder.Value)); // The transformed data. var transformedData_default = default_pipeline.Fit(trainData).Transform(trainData); @@ -61,7 +56,7 @@ public static void KeyToValue_Term() Console.WriteLine($"{columnName} column obtained post-transformation."); foreach (var row in column) { - foreach (var value in row.Values) + foreach (var value in row.GetValues()) Console.Write($"{value} "); Console.WriteLine(""); } @@ -93,7 +88,7 @@ public static void KeyToValue_Term() // Retrieve the original values, by appending the KeyToValue etimator to the existing pipelines // to convert the keys back to the strings. - var pipeline = default_pipeline.Append(new KeyToValueEstimator(ml, defaultColumnName)); + var pipeline = default_pipeline.Append(new KeyToValueMappingEstimator(ml, defaultColumnName)); transformedData_default = pipeline.Fit(trainData).Transform(trainData); // Preview of the DefaultColumnName column obtained. @@ -101,7 +96,7 @@ public static void KeyToValue_Term() foreach (var row in originalColumnBack) { - foreach (var value in row.Values) + foreach (var value in row.GetValues()) Console.Write($"{value} "); Console.WriteLine(""); } diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/MatrixFactorization.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/MatrixFactorization.cs index 71366a8035..4c9169c9c6 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/MatrixFactorization.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/MatrixFactorization.cs @@ -1,7 +1,3 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Trainers; @@ -13,7 +9,7 @@ // line by line. namespace Microsoft.ML.Samples.Dynamic { - public partial class TrainerSamples + public class MatrixFactorizationExample { // The following variables defines the shape of a matrix. Its shape is _synthesizedMatrixRowCount-by-_synthesizedMatrixColumnCount. // The variable _synthesizedMatrixFirstRowIndex indicates the integer that would be mapped to the first row index. If user data uses @@ -71,8 +67,10 @@ public static void MatrixFactorizationInMemoryData() // Create a matrix factorization trainer which may consume "Value" as the training label, "MatrixColumnIndex" as the // matrix's column index, and "MatrixRowIndex" as the matrix's row index. Here nameof(...) is used to extract field // names' in MatrixElement class. - var pipeline = new MatrixFactorizationTrainer(mlContext, nameof(MatrixElement.Value), - nameof(MatrixElement.MatrixColumnIndex), nameof(MatrixElement.MatrixRowIndex), + var pipeline = new MatrixFactorizationTrainer(mlContext, + nameof(MatrixElement.MatrixColumnIndex), + nameof(MatrixElement.MatrixRowIndex), + nameof(MatrixElement.Value), advancedSettings: s => { s.NumIterations = 10; diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/NgramExtraction.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/NgramExtraction.cs new file mode 100644 index 0000000000..3c9147f32a --- /dev/null +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/NgramExtraction.cs @@ -0,0 +1,76 @@ +using Microsoft.ML.Data; +using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Runtime.Data; +using System; +using System.Collections.Generic; + +namespace Microsoft.ML.Samples.Dynamic +{ + public partial class NgramTransformSamples + { + public static void NgramTransform() + { + // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, + // as well as the source of randomness. + var ml = new MLContext(); + + // Get a small dataset as an IEnumerable and convert to IDataView. + IEnumerable data = SamplesUtils.DatasetUtils.GetSentimentData(); + var trainData = ml.CreateStreamingDataView(data); + + // Preview of the data. + // + // Sentiment SentimentText + // true Best game I've ever played. + // false ==RUDE== Dude, 2. + // true Until the next game, this is the best Xbox game! + + // A pipeline to tokenize text as characters and then combine them together into ngrams + // The pipeline uses the default settings to featurize. + + var charsPipeline = ml.Transforms.Text.TokenizeCharacters("SentimentText", "Chars", useMarkerCharacters:false); + var ngramOnePipeline = ml.Transforms.Text.ProduceNgrams("Chars", "CharsUnigrams", ngramLength:1); + var ngramTwpPipeline = ml.Transforms.Text.ProduceNgrams("Chars", "CharsTwograms"); + var oneCharsPipeline = charsPipeline.Append(ngramOnePipeline); + var twoCharsPipeline = charsPipeline.Append(ngramTwpPipeline); + + // The transformed data for pipelines. + var transformedData_onechars = oneCharsPipeline.Fit(trainData).Transform(trainData); + var transformedData_twochars = twoCharsPipeline.Fit(trainData).Transform(trainData); + + // Small helper to print the text inside the columns, in the console. + Action>, VBuffer>> printHelper = (columnName, column, names) => + { + Console.WriteLine($"{columnName} column obtained post-transformation."); + var slots = names.GetValues(); + foreach (var featureRow in column) + { + foreach (var item in featureRow.Items()) + Console.Write($"'{slots[item.Key]}' - {item.Value} "); + Console.WriteLine(""); + } + + Console.WriteLine("==================================================="); + }; + // Preview of the CharsUnigrams column obtained after processing the input. + VBuffer> slotNames = default; + transformedData_onechars.Schema["CharsUnigrams"].Metadata.GetValue(MetadataUtils.Kinds.SlotNames, ref slotNames); + var charsOneGramColumn = transformedData_onechars.GetColumn>(ml, "CharsUnigrams"); + printHelper("CharsUnigrams", charsOneGramColumn, slotNames); + + // CharsUnigrams column obtained post-transformation. + // 'B' - 1 'e' - 6 's' - 1 't' - 1 '' - 4 'g' - 1 'a' - 2 'm' - 1 'I' - 1 ''' - 1 'v' - 2 ... + // 'e' - 1 '' - 2 'd' - 1 '=' - 4 'R' - 1 'U' - 1 'D' - 2 'E' - 1 'u' - 1 ',' - 1 '2' - 1 + // 'B' - 0 'e' - 6 's' - 3 't' - 6 '' - 9 'g' - 2 'a' - 2 'm' - 2 'I' - 0 ''' - 0 'v' - 0 ... + // Preview of the CharsTwoGrams column obtained after processing the input. + var charsTwoGramColumn = transformedData_twochars.GetColumn>(ml, "CharsTwograms"); + transformedData_twochars.Schema["CharsTwograms"].Metadata.GetValue(MetadataUtils.Kinds.SlotNames, ref slotNames); + printHelper("CharsTwograms", charsTwoGramColumn, slotNames); + + // CharsTwograms column obtained post-transformation. + // 'B' - 1 'B|e' - 1 'e' - 6 'e|s' - 1 's' - 1 's|t' - 1 't' - 1 't|' - 1 '' - 4 '|g' - 1 ... + // 'e' - 1 '' - 2 'd' - 1 '=' - 4 '=|=' - 2 '=|R' - 1 'R' - 1 'R|U' - 1 'U' - 1 'U|D' - 1 'D' - 2 ... + // 'B' - 0 'B|e' - 0 'e' - 6 'e|s' - 1 's' - 3 's|t' - 1 't' - 6 't|' - 2 '' - 9 '|g' - 2 ... + } + } +} diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/MinMaxNormalizer.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Normalizer.cs similarity index 68% rename from docs/samples/Microsoft.ML.Samples/Dynamic/MinMaxNormalizer.cs rename to docs/samples/Microsoft.ML.Samples/Dynamic/Normalizer.cs index 67a1bd859f..121eede6e6 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/MinMaxNormalizer.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Normalizer.cs @@ -1,19 +1,15 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - // the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. - using Microsoft.ML.Runtime.Api; - using Microsoft.ML.Data; - using Microsoft.ML.Transforms.Normalizers; - using System; - using System.Collections.Generic; +using Microsoft.ML.Data; +using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Transforms.Normalizers; +using System; +using System.Collections.Generic; +using System.Linq; namespace Microsoft.ML.Samples.Dynamic { - public partial class TransformSamples + public class NormalizerExample { - public static void MinMaxNormalizer() + public static void Normalizer() { // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, // as well as the source of randomness. @@ -35,7 +31,19 @@ public static void MinMaxNormalizer() // A pipeline for normalizing the Induced column. var pipeline = ml.Transforms.Normalize("Induced"); // The transformed (normalized according to Normalizer.NormalizerMode.MinMax) data. - var transformedData = pipeline.Fit(trainData).Transform(trainData); + var transformer = pipeline.Fit(trainData); + + var modelParams = transformer.Columns + .First(x => x.Output == "Induced") + .ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters; + + Console.WriteLine($"The normalization parameters are: Scale = {modelParams.Scale} and Offset = {modelParams.Offset}"); + //Preview + // + //The normalization parameters are: Scale = 0.5 and Offset = 0" + + var transformedData = transformer.Transform(trainData); + // Getting the data of the newly created column, so we can preview it. var normalizedColumn = transformedData.GetColumn(ml, "Induced"); @@ -61,7 +69,8 @@ public static void MinMaxNormalizer() // Using log scale as the normalization mode. var multiColPipeline = ml.Transforms.Normalize(NormalizingEstimator.NormalizerMode.LogMeanVariance, new[] { ("Induced", "LogInduced"), ("Spontaneous", "LogSpontaneous") }); // The transformed data. - var multiColtransformedData = multiColPipeline.Fit(trainData).Transform(trainData); + var multiColtransformer = multiColPipeline.Fit(trainData); + var multiColtransformedData = multiColtransformer.Transform(trainData); // Getting the newly created columns. var normalizedInduced = multiColtransformedData.GetColumn(ml, "LogInduced"); @@ -86,6 +95,13 @@ public static void MinMaxNormalizer() // 0 // 0 // 0.1586974 + + // Inspect the weights of normalizing the columns + var multiColModelParams = multiColtransformer.Columns + .First(x=> x.Output == "LogInduced") + .ModelParameters as NormalizingTransformer.CdfNormalizerModelParameters; + + Console.WriteLine($"The normalization parameters are: Mean = {multiColModelParams.Mean} and Stddev = {multiColModelParams.Stddev}"); } } } diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/ProjectionTransforms.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/ProjectionTransforms.cs new file mode 100644 index 0000000000..0f7761cfba --- /dev/null +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/ProjectionTransforms.cs @@ -0,0 +1,114 @@ +using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Data; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.ML.Samples.Dynamic +{ + public class ProjectionTransformsExample + { + public static void ProjectionTransforms() + { + // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, + // as well as the source of randomness. + var ml = new MLContext(); + + // Get a small dataset as an IEnumerable and convert it to an IDataView. + IEnumerable data = SamplesUtils.DatasetUtils.GetVectorOfNumbersData(); + var trainData = ml.CreateStreamingDataView(data); + + // Preview of the data. + // + // Features + // 0 1 2 3 4 5 6 7 8 9 + // 1 2 3 4 5 6 7 8 9 0 + // 2 3 4 5 6 7 8 9 0 1 + // 3 4 5 6 7 8 9 0 1 2 + // 4 5 6 7 8 9 0 1 2 3 + // 5 6 7 8 9 0 1 2 3 4 + // 6 7 8 9 0 1 2 3 4 5 + + // A small printing utility. + Action>> printHelper = (colName, column) => + { + Console.WriteLine($"{colName} column obtained post-transformation."); + foreach (var row in column) + Console.WriteLine($"{string.Join(" ",row.DenseValues().Select(x=>x.ToString("f3")))} "); + }; + + // A pipeline to project Features column into Random fourier space. + var rffPipeline = ml.Transforms.Projection.CreateRandomFourierFeatures(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), newDim: 4); + // The transformed (projected) data. + var transformedData = rffPipeline.Fit(trainData).Transform(trainData); + // Getting the data of the newly created column, so we can preview it. + var randomFourier = transformedData.GetColumn>(ml, nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features)); + + printHelper(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), randomFourier); + + // Features column obtained post-transformation. + // + //0.634 0.628 -0.705 -0.337 + //0.704 0.683 -0.555 -0.422 + //0.407 0.542 -0.707 -0.616 + //0.473 0.331 -0.400 -0.699 + //0.181 0.361 -0.335 -0.157 + //0.165 0.117 -0.547 0.014 + + // A pipeline to project Features column into white noise vector. + var whiteningPipeline = ml.Transforms.Projection.VectorWhiten(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), kind: Transforms.Projections.WhiteningKind.Zca); + // The transformed (projected) data. + transformedData = whiteningPipeline.Fit(trainData).Transform(trainData); + // Getting the data of the newly created column, so we can preview it. + var whitening = transformedData.GetColumn>(ml, nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features)); + + printHelper(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), whitening); + + // Features column obtained post-transformation. + // + //-0.394 -0.318 -0.243 -0.168 0.209 0.358 0.433 0.589 0.873 2.047 + //-0.034 0.030 0.094 0.159 0.298 0.427 0.492 0.760 1.855 -1.197 + // 0.099 0.161 0.223 0.286 0.412 0.603 0.665 1.797 -1.265 -0.172 + // 0.211 0.277 0.344 0.410 0.606 1.267 1.333 -1.340 -0.205 0.065 + // 0.454 0.523 0.593 0.664 1.886 -0.757 -0.687 -0.022 0.176 0.310 + // 0.863 0.938 1.016 1.093 -1.326 -0.096 -0.019 0.189 0.330 0.483 + + // A pipeline to project Features column into L-p normalized vector. + var lpNormalizePipeline = ml.Transforms.Projection.LpNormalize(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), normKind: Transforms.Projections.LpNormalizingEstimatorBase.NormalizerKind.L1Norm); + // The transformed (projected) data. + transformedData = lpNormalizePipeline.Fit(trainData).Transform(trainData); + // Getting the data of the newly created column, so we can preview it. + var lpNormalize= transformedData.GetColumn>(ml, nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features)); + + printHelper(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), lpNormalize); + + // Features column obtained post-transformation. + // + // 0.000 0.022 0.044 0.067 0.089 0.111 0.133 0.156 0.178 0.200 + // 0.022 0.044 0.067 0.089 0.111 0.133 0.156 0.178 0.200 0.000 + // 0.044 0.067 0.089 0.111 0.133 0.156 0.178 0.200 0.000 0.022 + // 0.067 0.089 0.111 0.133 0.156 0.178 0.200 0.000 0.022 0.044 + // 0.111 0.133 0.156 0.178 0.200 0.000 0.022 0.044 0.067 0.089 + // 0.133 0.156 0.178 0.200 0.000 0.022 0.044 0.067 0.089 0.111 + + // A pipeline to project Features column into L-p normalized vector. + var gcNormalizePipeline = ml.Transforms.Projection.GlobalContrastNormalize(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), substractMean:false); + // The transformed (projected) data. + transformedData = gcNormalizePipeline.Fit(trainData).Transform(trainData); + // Getting the data of the newly created column, so we can preview it. + var gcNormalize = transformedData.GetColumn>(ml, nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features)); + + printHelper(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), gcNormalize); + + // Features column obtained post-transformation. + // + // 0.000 0.059 0.118 0.178 0.237 0.296 0.355 0.415 0.474 0.533 + // 0.059 0.118 0.178 0.237 0.296 0.355 0.415 0.474 0.533 0.000 + // 0.118 0.178 0.237 0.296 0.355 0.415 0.474 0.533 0.000 0.059 + // 0.178 0.237 0.296 0.355 0.415 0.474 0.533 0.000 0.059 0.118 + // 0.296 0.355 0.415 0.474 0.533 0.000 0.059 0.118 0.178 0.237 + // 0.355 0.415 0.474 0.533 0.000 0.059 0.118 0.178 0.237 0.296 + } + } +} diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/SDCA.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/SDCA.cs index d018b3df4b..32a33cdc43 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/SDCA.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/SDCA.cs @@ -1,15 +1,10 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -// the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. - using Microsoft.ML.Runtime.Data; - using System; - using System.Linq; +using Microsoft.ML.Runtime.Data; +using System; +using System.Linq; namespace Microsoft.ML.Samples.Dynamic { - public partial class TrainerSamples + public class SDCA_BinaryClassificationExample { public static void SDCA_BinaryClassification() { @@ -48,7 +43,7 @@ public static void SDCA_BinaryClassification() // Then append a binary classifier, setting the "Label" column as the label of the dataset, and // the "Features" column produced by FeaturizeText as the features column. var pipeline = mlContext.Transforms.Text.FeaturizeText("SentimentText", "Features") - .Append(mlContext.BinaryClassification.Trainers.StochasticDualCoordinateAscent(label: "Sentiment", features: "Features", l2Const: 0.001f)); + .Append(mlContext.BinaryClassification.Trainers.StochasticDualCoordinateAscent(labelColumn: "Sentiment", featureColumn: "Features", l2Const: 0.001f)); // Step 3: Run Cross-Validation on this pipeline. var cvResults = mlContext.BinaryClassification.CrossValidate(data, pipeline, labelColumn: "Sentiment"); @@ -60,8 +55,8 @@ public static void SDCA_BinaryClassification() // we could do so by tweaking the 'advancedSetting'. var advancedPipeline = mlContext.Transforms.Text.FeaturizeText("SentimentText", "Features") .Append(mlContext.BinaryClassification.Trainers.StochasticDualCoordinateAscent - (label: "Sentiment", - features: "Features", + (labelColumn: "Sentiment", + featureColumn: "Features", advancedSettings: s=> { s.ConvergenceTolerance = 0.01f; // The learning rate for adjusting bias from being regularized diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/SsaChangePointDetectorTransform.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/SsaChangePointDetectorTransform.cs new file mode 100644 index 0000000000..42bc17e54f --- /dev/null +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/SsaChangePointDetectorTransform.cs @@ -0,0 +1,88 @@ +using System; +using System.Linq; +using System.Collections.Generic; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Runtime.TimeSeriesProcessing; + +namespace Microsoft.ML.Samples.Dynamic +{ + public partial class TransformSamples + { + class SsaChangePointData + { + public float Value; + + public SsaChangePointData(float value) + { + Value = value; + } + } + + // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). + // SsaChangePointDetector is applied then to identify points where data distribution changed. + public static void SsaChangePointDetectorTransform() + { + // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, + // as well as the source of randomness. + var ml = new MLContext(); + + // Generate sample series data with a change + const int size = 16; + var data = new List(size); + for (int i = 0; i < size / 2; i++) + data.Add(new SsaChangePointData(5)); + // This is a change point + for (int i = 0; i < size / 2; i++) + data.Add(new SsaChangePointData(7)); + + // Convert data to IDataView. + var dataView = ml.CreateStreamingDataView(data); + + // Setup IidSpikeDetector arguments + string outputColumnName = "Prediction"; + string inputColumnName = "Value"; + var args = new SsaChangePointDetector.Arguments() + { + Source = inputColumnName, + Name = outputColumnName, + Confidence = 95, // The confidence for spike detection in the range [0, 100] + ChangeHistoryLength = size / 4, // The length of the sliding window on p-values for computing the martingale score. + TrainingWindowSize = size / 2, // The number of points from the beginning of the sequence used for training. + SeasonalWindowSize = size / 8, // An upper bound on the largest relevant seasonality in the input time - series." + }; + + // The transformed data. + var transformedData = new SsaChangePointEstimator(ml, args).Fit(dataView).Transform(dataView); + + // Getting the data of the newly created column as an IEnumerable of ChangePointPrediction. + var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); + + Console.WriteLine($"{outputColumnName} column obtained post-transformation."); + Console.WriteLine("Data\tAlert\tScore\tP-Value\tMartingale value"); + int k = 0; + foreach (var prediction in predictionColumn) + Console.WriteLine("{0}\t{1}\t{2:0.00}\t{3:0.00}\t{4:0.00}", data[k++].Value, prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2], prediction.Prediction[3]); + Console.WriteLine(""); + + // Prediction column obtained post-transformation. + // Data Alert Score P-Value Martingale value + // 5 0 0.00 0.50 0.00 + // 5 0 0.00 0.50 0.00 + // 5 0 0.00 0.50 0.00 + // 5 0 0.00 0.50 0.00 + // 5 0 0.00 0.50 0.00 + // 5 0 0.00 0.50 0.00 + // 5 0 0.00 0.50 0.00 + // 5 0 0.00 0.50 0.00 + // 7 1 2.00 0.00 10298.67 <-- alert is on, predicted changepoint + // 7 0 1.00 0.31 15741.58 + // 7 0 0.00 0.28 26487.48 + // 7 0 0.00 0.28 44569.02 + // 7 0 0.00 0.28 0.01 + // 7 0 0.00 0.38 0.01 + // 7 0 0.00 0.50 0.00 + // 7 0 0.00 0.50 0.00 + } + } +} diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/SsaSpikeDetectorTransform.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/SsaSpikeDetectorTransform.cs new file mode 100644 index 0000000000..82ff8a891f --- /dev/null +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/SsaSpikeDetectorTransform.cs @@ -0,0 +1,95 @@ +using System; +using System.Linq; +using System.Collections.Generic; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Runtime.TimeSeriesProcessing; + +namespace Microsoft.ML.Samples.Dynamic +{ + public partial class TransformSamples + { + class SsaSpikeData + { + public float Value; + + public SsaSpikeData(float value) + { + Value = value; + } + } + + class SsaSpikePrediction + { + [VectorType(3)] + public double[] Prediction { get; set; } + } + + // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). + // SsaSpikeDetector is applied then to identify spiking points in the series. + public static void SsaSpikeDetectorTransform() + { + // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, + // as well as the source of randomness. + var ml = new MLContext(); + + // Generate sample series data with a spike + const int size = 16; + var data = new List(size); + for (int i = 0; i < size / 2; i++) + data.Add(new SsaSpikeData(5)); + // This is a spike + data.Add(new SsaSpikeData(10)); + for (int i = 0; i < size / 2; i++) + data.Add(new SsaSpikeData(5)); + + // Convert data to IDataView. + var dataView = ml.CreateStreamingDataView(data); + + // Setup IidSpikeDetector arguments + string outputColumnName = "Prediction"; + string inputColumnName = "Value"; + var args = new SsaSpikeDetector.Arguments() + { + Source = inputColumnName, + Name = outputColumnName, + Confidence = 95, // The confidence for spike detection in the range [0, 100] + PvalueHistoryLength = size / 4, // The size of the sliding window for computing the p-value + TrainingWindowSize = size / 2, // The number of points from the beginning of the sequence used for training. + SeasonalWindowSize = size / 8, // An upper bound on the largest relevant seasonality in the input time - series." + }; + + // The transformed data. + var transformedData = new SsaSpikeEstimator(ml, args).Fit(dataView).Transform(dataView); + + // Getting the data of the newly created column as an IEnumerable of SsaSpikePrediction. + var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); + + Console.WriteLine($"{outputColumnName} column obtained post-transformation."); + Console.WriteLine("Alert\tScore\tP-Value"); + foreach (var prediction in predictionColumn) + Console.WriteLine("{0}\t{1:0.00}\t{2:0.00}", prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2]); + Console.WriteLine(""); + + // Prediction column obtained post-transformation. + // Alert Score P-Value + // 0 0.00 0.50 + // 0 0.00 0.50 + // 0 0.00 0.50 + // 0 0.00 0.50 + // 0 0.00 0.50 + // 0 0.00 0.50 + // 0 0.00 0.50 + // 0 0.00 0.50 + // 1 5.00 0.00 <-- alert is on, predicted spike + // 0 -2.50 0.09 + // 0 -2.50 0.22 + // 0 0.00 0.47 + // 0 0.00 0.47 + // 0 0.00 0.26 + // 0 0.00 0.38 + // 0 0.00 0.50 + // 0 0.00 0.50 + } + } +} diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/TextTransform.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/TextTransform.cs index a77bb703e0..57fbc7e493 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/TextTransform.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/TextTransform.cs @@ -1,18 +1,13 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - // the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. - using Microsoft.ML.Runtime.Data; - using Microsoft.ML.Runtime.Api; - using Microsoft.ML.Data; - using Microsoft.ML.Transforms.Text; - using System; - using System.Collections.Generic; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Data; +using Microsoft.ML.Transforms.Text; +using System; +using System.Collections.Generic; namespace Microsoft.ML.Samples.Dynamic { - public partial class TransformSamples + public class TextTransformExample { public static void TextTransform() { @@ -56,7 +51,7 @@ public static void TextTransform() Console.WriteLine($"{columnName} column obtained post-transformation."); foreach (var featureRow in column) { - foreach (var value in featureRow.Values) + foreach (var value in featureRow.GetValues()) Console.Write($"{value} "); Console.WriteLine(""); } diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Timeseries.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Timeseries.cs deleted file mode 100644 index bebabfc331..0000000000 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Timeseries.cs +++ /dev/null @@ -1,295 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - - // the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. - using System; - using System.Linq; - using System.Collections.Generic; - using Microsoft.ML.Runtime.Data; - using Microsoft.ML.Runtime.Api; - using Microsoft.ML.Runtime.TimeSeriesProcessing; - -namespace Microsoft.ML.Samples.Dynamic -{ - public partial class TransformSamples - { - class SpikePrediction - { - [VectorType(3)] - public double[] Prediction { get; set; } - } - - class ChangePointPrediction - { - [VectorType(4)] - public double[] Prediction { get; set; } - } - - class Data - { - public float Value; - - public Data(float value) - { - Value = value; - } - } - - // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). - // IidSpikeDetector is applied then to identify spiking points in the series. - public static void IidSpikeDetectorTransform() - { - // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, - // as well as the source of randomness. - var ml = new MLContext(); - - // Generate sample series data with a spike - const int size = 10; - var data = new List(size); - for (int i = 0; i < size / 2; i++) - data.Add(new Data(5)); - // This is a spike - data.Add(new Data(10)); - for (int i = 0; i < size / 2; i++) - data.Add(new Data(5)); - - // Convert data to IDataView. - var dataView = ml.CreateStreamingDataView(data); - - // Setup IidSpikeDetector arguments - string outputColumnName = "Prediction"; - string inputColumnName = "Value"; - var args = new IidSpikeDetector.Arguments() - { - Source = inputColumnName, - Name = outputColumnName, - Confidence = 95, // The confidence for spike detection in the range [0, 100] - PvalueHistoryLength = size / 4 // The size of the sliding window for computing the p-value - }; - - // The transformed data. - var transformedData = new IidSpikeEstimator(ml, args).Fit(dataView).Transform(dataView); - - // Getting the data of the newly created column as an IEnumerable of SpikePrediction. - var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); - - Console.WriteLine($"{outputColumnName} column obtained post-transformation."); - Console.WriteLine("Alert\tScore\tP-Value"); - foreach (var prediction in predictionColumn) - Console.WriteLine("{0}\t{1:0.00}\t{2:0.00}", prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2]); - Console.WriteLine(""); - - // Prediction column obtained post-transformation. - // Alert Score P-Value - // 0 5.00 0.50 - // 0 5.00 0.50 - // 0 5.00 0.50 - // 0 5.00 0.50 - // 0 5.00 0.50 - // 1 10.00 0.00 <-- alert is on, predicted spike - // 0 5.00 0.26 - // 0 5.00 0.26 - // 0 5.00 0.50 - // 0 5.00 0.50 - // 0 5.00 0.50 - } - - // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). - // SsaSpikeDetector is applied then to identify spiking points in the series. - public static void SsaSpikeDetectorTransform() - { - // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, - // as well as the source of randomness. - var ml = new MLContext(); - - // Generate sample series data with a spike - const int size = 16; - var data = new List(size); - for (int i = 0; i < size / 2; i++) - data.Add(new Data(5)); - // This is a spike - data.Add(new Data(10)); - for (int i = 0; i < size / 2; i++) - data.Add(new Data(5)); - - // Convert data to IDataView. - var dataView = ml.CreateStreamingDataView(data); - - // Setup IidSpikeDetector arguments - string outputColumnName = "Prediction"; - string inputColumnName = "Value"; - var args = new SsaSpikeDetector.Arguments() - { - Source = inputColumnName, - Name = outputColumnName, - Confidence = 95, // The confidence for spike detection in the range [0, 100] - PvalueHistoryLength = size / 4, // The size of the sliding window for computing the p-value - TrainingWindowSize = size / 2, // The number of points from the beginning of the sequence used for training. - SeasonalWindowSize = size / 8, // An upper bound on the largest relevant seasonality in the input time - series." - }; - - // The transformed data. - var transformedData = new SsaSpikeEstimator(ml, args).Fit(dataView).Transform(dataView); - - // Getting the data of the newly created column as an IEnumerable of SpikePrediction. - var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); - - Console.WriteLine($"{outputColumnName} column obtained post-transformation."); - Console.WriteLine("Alert\tScore\tP-Value"); - foreach (var prediction in predictionColumn) - Console.WriteLine("{0}\t{1:0.00}\t{2:0.00}", prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2]); - Console.WriteLine(""); - - // Prediction column obtained post-transformation. - // Alert Score P-Value - // 0 0.00 0.50 - // 0 0.00 0.50 - // 0 0.00 0.50 - // 0 0.00 0.50 - // 0 0.00 0.50 - // 0 0.00 0.50 - // 0 0.00 0.50 - // 0 0.00 0.50 - // 1 5.00 0.00 <-- alert is on, predicted spike - // 0 -2.50 0.09 - // 0 -2.50 0.22 - // 0 0.00 0.47 - // 0 0.00 0.47 - // 0 0.00 0.26 - // 0 0.00 0.38 - // 0 0.00 0.50 - // 0 0.00 0.50 - } - - // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). - // SsaChangePointDetector is applied then to identify points where data distribution changed. - public static void SsaChangePointDetectorTransform() - { - // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, - // as well as the source of randomness. - var ml = new MLContext(); - - // Generate sample series data with a change - const int size = 16; - var data = new List(size); - for (int i = 0; i < size / 2; i++) - data.Add(new Data(5)); - // This is a change point - for (int i = 0; i < size / 2; i++) - data.Add(new Data(7)); - - // Convert data to IDataView. - var dataView = ml.CreateStreamingDataView(data); - - // Setup IidSpikeDetector arguments - string outputColumnName = "Prediction"; - string inputColumnName = "Value"; - var args = new SsaChangePointDetector.Arguments() - { - Source = inputColumnName, - Name = outputColumnName, - Confidence = 95, // The confidence for spike detection in the range [0, 100] - ChangeHistoryLength = size / 4, // The length of the sliding window on p-values for computing the martingale score. - TrainingWindowSize = size / 2, // The number of points from the beginning of the sequence used for training. - SeasonalWindowSize = size / 8, // An upper bound on the largest relevant seasonality in the input time - series." - }; - - // The transformed data. - var transformedData = new SsaChangePointEstimator(ml, args).Fit(dataView).Transform(dataView); - - // Getting the data of the newly created column as an IEnumerable of ChangePointPrediction. - var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); - - Console.WriteLine($"{outputColumnName} column obtained post-transformation."); - Console.WriteLine("Data\tAlert\tScore\tP-Value\tMartingale value"); - int k = 0; - foreach (var prediction in predictionColumn) - Console.WriteLine("{0}\t{1}\t{2:0.00}\t{3:0.00}\t{4:0.00}", data[k++].Value, prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2], prediction.Prediction[3]); - Console.WriteLine(""); - - // Prediction column obtained post-transformation. - // Data Alert Score P-Value Martingale value - // 5 0 0.00 0.50 0.00 - // 5 0 0.00 0.50 0.00 - // 5 0 0.00 0.50 0.00 - // 5 0 0.00 0.50 0.00 - // 5 0 0.00 0.50 0.00 - // 5 0 0.00 0.50 0.00 - // 5 0 0.00 0.50 0.00 - // 5 0 0.00 0.50 0.00 - // 7 1 2.00 0.00 10298.67 <-- alert is on, predicted changepoint - // 7 0 1.00 0.31 15741.58 - // 7 0 0.00 0.28 26487.48 - // 7 0 0.00 0.28 44569.02 - // 7 0 0.00 0.28 0.01 - // 7 0 0.00 0.38 0.01 - // 7 0 0.00 0.50 0.00 - // 7 0 0.00 0.50 0.00 - } - - // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). - // IidChangePointDetector is applied then to identify points where data distribution changed. - public static void IidChangePointDetectorTransform() - { - // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, - // as well as the source of randomness. - var ml = new MLContext(); - - // Generate sample series data with a change - const int size = 16; - var data = new List(size); - for (int i = 0; i < size / 2; i++) - data.Add(new Data(5)); - // This is a change point - for (int i = 0; i < size / 2; i++) - data.Add(new Data(7)); - - // Convert data to IDataView. - var dataView = ml.CreateStreamingDataView(data); - - // Setup IidSpikeDetector arguments - string outputColumnName = "Prediction"; - string inputColumnName = "Value"; - var args = new IidChangePointDetector.Arguments() - { - Source = inputColumnName, - Name = outputColumnName, - Confidence = 95, // The confidence for spike detection in the range [0, 100] - ChangeHistoryLength = size / 4, // The length of the sliding window on p-values for computing the martingale score. - }; - - // The transformed data. - var transformedData = new IidChangePointEstimator(ml, args).Fit(dataView).Transform(dataView); - - // Getting the data of the newly created column as an IEnumerable of ChangePointPrediction. - var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); - - Console.WriteLine($"{outputColumnName} column obtained post-transformation."); - Console.WriteLine("Data\tAlert\tScore\tP-Value\tMartingale value"); - int k = 0; - foreach (var prediction in predictionColumn) - Console.WriteLine("{0}\t{1}\t{2:0.00}\t{3:0.00}\t{4:0.00}", data[k++].Value, prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2], prediction.Prediction[3]); - Console.WriteLine(""); - - // Prediction column obtained post-transformation. - // Data Alert Score P-Value Martingale value - // 5 0 5.00 0.50 0.00 - // 5 0 5.00 0.50 0.00 - // 5 0 5.00 0.50 0.00 - // 5 0 5.00 0.50 0.00 - // 5 0 5.00 0.50 0.00 - // 5 0 5.00 0.50 0.00 - // 5 0 5.00 0.50 0.00 - // 5 0 5.00 0.50 0.00 - // 7 1 7.00 0.00 10298.67 <-- alert is on, predicted changepoint - // 7 0 7.00 0.13 33950.16 - // 7 0 7.00 0.26 60866.34 - // 7 0 7.00 0.38 78362.04 - // 7 0 7.00 0.50 0.01 - // 7 0 7.00 0.50 0.00 - // 7 0 7.00 0.50 0.00 - // 7 0 7.00 0.50 0.00 - } - } -} diff --git a/docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj b/docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj index e1e2b6ea3f..6b3d9f957b 100644 --- a/docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj +++ b/docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj @@ -6,6 +6,7 @@ + diff --git a/docs/samples/Microsoft.ML.Samples/Program.cs b/docs/samples/Microsoft.ML.Samples/Program.cs index c2c9ef37a6..8dc2be6cd2 100644 --- a/docs/samples/Microsoft.ML.Samples/Program.cs +++ b/docs/samples/Microsoft.ML.Samples/Program.cs @@ -1,8 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Samples.Dynamic; +using Microsoft.ML.Samples.Dynamic; namespace Microsoft.ML.Samples { @@ -10,7 +6,7 @@ internal static class Program { static void Main(string[] args) { - TransformSamples.KeyToValue_Term(); + NormalizerExample.Normalizer(); } } } diff --git a/docs/samples/Microsoft.ML.Samples/Static/AveragedPerceptronBinaryClassification.cs b/docs/samples/Microsoft.ML.Samples/Static/AveragedPerceptronBinaryClassification.cs index b05e80cc3d..d2359526e9 100644 --- a/docs/samples/Microsoft.ML.Samples/Static/AveragedPerceptronBinaryClassification.cs +++ b/docs/samples/Microsoft.ML.Samples/Static/AveragedPerceptronBinaryClassification.cs @@ -1,20 +1,12 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; +using Microsoft.ML.StaticPipe; +using Microsoft.ML.Transforms; +using Microsoft.ML.Transforms.Categorical; +using System; -// the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. - using Microsoft.ML.Runtime.Data; - using Microsoft.ML.StaticPipe; - using Microsoft.ML.Transforms; - using Microsoft.ML.Transforms.Categorical; - using System; - -// NOTE: WHEN ADDING TO THE FILE, ALWAYS APPEND TO THE END OF IT. -// If you change the existing content, check that the files referencing it in the XML documentation are still correct, as they reference -// line by line. namespace Microsoft.ML.Samples.Static { - public partial class TrainersSamples + public class AveragedPerceptronBinaryClassificationExample { public static void AveragedPerceptronBinaryClassification() { diff --git a/docs/samples/Microsoft.ML.Samples/Static/FastTreeBinaryClassification.cs b/docs/samples/Microsoft.ML.Samples/Static/FastTreeBinaryClassification.cs index 7abde9de23..939bf3d4f2 100644 --- a/docs/samples/Microsoft.ML.Samples/Static/FastTreeBinaryClassification.cs +++ b/docs/samples/Microsoft.ML.Samples/Static/FastTreeBinaryClassification.cs @@ -1,20 +1,12 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; +using Microsoft.ML.StaticPipe; +using Microsoft.ML.Transforms; +using Microsoft.ML.Transforms.Categorical; +using System; -// the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. - using Microsoft.ML.Runtime.Data; - using Microsoft.ML.StaticPipe; - using Microsoft.ML.Transforms; - using Microsoft.ML.Transforms.Categorical; - using System; - -// NOTE: WHEN ADDING TO THE FILE, ALWAYS APPEND TO THE END OF IT. -// If you change the existing content, check that the files referencing it in the XML documentation are still correct, as they reference -// line by line. namespace Microsoft.ML.Samples.Static { - public partial class TrainersSamples + public class FastTreeBinaryClassificationExample { public static void FastTreeBinaryClassification() { @@ -89,7 +81,7 @@ public static void FastTreeBinaryClassification() row.Features, numTrees: 100, // try: (int) 20-2000 numLeaves: 20, // try: (int) 2-128 - minDatapointsInLeafs: 10, // try: (int) 1-100 + minDatapointsInLeaves: 10, // try: (int) 1-100 learningRate: 0.2))) // try: (float) 0.025-0.4 .Append(row => ( Label: row.Label, diff --git a/docs/samples/Microsoft.ML.Samples/Static/FastTreeRegression.cs b/docs/samples/Microsoft.ML.Samples/Static/FastTreeRegression.cs index 639fec5990..66ddc6772c 100644 --- a/docs/samples/Microsoft.ML.Samples/Static/FastTreeRegression.cs +++ b/docs/samples/Microsoft.ML.Samples/Static/FastTreeRegression.cs @@ -1,20 +1,12 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; +using Microsoft.ML.Trainers.FastTree; +using Microsoft.ML.StaticPipe; +using System; +using System.Linq; - // the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. - using Microsoft.ML.Runtime.Data; - using Microsoft.ML.Trainers.FastTree; - using Microsoft.ML.StaticPipe; - using System; - using System.Linq; - -// NOTE: WHEN ADDING TO THE FILE, ALWAYS APPEND TO THE END OF IT. -// If you change the existinc content, check that the files referencing it in the XML documentation are still correct, as they reference -// line by line. namespace Microsoft.ML.Samples.Static { - public partial class TrainersSamples + public class FastTreeRegressionExample { public static void FastTreeRegression() { @@ -47,7 +39,7 @@ public static void FastTreeRegression() r.features, numTrees: 100, // try: (int) 20-2000 numLeaves: 20, // try: (int) 2-128 - minDatapointsInLeafs: 10, // try: (int) 1-100 + minDatapointsInLeaves: 10, // try: (int) 1-100 learningRate: 0.2, // try: (float) 0.025-0.4 onFit: p => pred = p) ) diff --git a/docs/samples/Microsoft.ML.Samples/Static/LightGBMBinaryClassification.cs b/docs/samples/Microsoft.ML.Samples/Static/LightGBMBinaryClassification.cs index 3ac05caed0..7d0dd18d47 100644 --- a/docs/samples/Microsoft.ML.Samples/Static/LightGBMBinaryClassification.cs +++ b/docs/samples/Microsoft.ML.Samples/Static/LightGBMBinaryClassification.cs @@ -1,20 +1,12 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; +using Microsoft.ML.StaticPipe; +using Microsoft.ML.Transforms; +using Microsoft.ML.Transforms.Categorical; +using System; -// the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. - using Microsoft.ML.Runtime.Data; - using Microsoft.ML.StaticPipe; - using Microsoft.ML.Transforms; - using Microsoft.ML.Transforms.Categorical; - using System; - -// NOTE: WHEN ADDING TO THE FILE, ALWAYS APPEND TO THE END OF IT. -// If you change the existing content, check that the files referencing it in the XML documentation are still correct, as they reference -// line by line. namespace Microsoft.ML.Samples.Static { - public partial class TrainersSamples + public class LightGbmBinaryClassificationExample { public static void LightGbmBinaryClassification() { diff --git a/docs/samples/Microsoft.ML.Samples/Static/LightGBMRegression.cs b/docs/samples/Microsoft.ML.Samples/Static/LightGBMRegression.cs index c9548b03c5..ca257d864f 100644 --- a/docs/samples/Microsoft.ML.Samples/Static/LightGBMRegression.cs +++ b/docs/samples/Microsoft.ML.Samples/Static/LightGBMRegression.cs @@ -1,19 +1,11 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; +using Microsoft.ML.Runtime.LightGBM; +using Microsoft.ML.StaticPipe; +using System; - // the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. - using Microsoft.ML.Runtime.Data; - using Microsoft.ML.Runtime.LightGBM; - using Microsoft.ML.StaticPipe; - using System; - -// NOTE: WHEN ADDING TO THE FILE, ALWAYS APPEND TO THE END OF IT. -// If you change the existinc content, check that the files referencing it in the XML documentation are still correct, as they reference -// line by line. namespace Microsoft.ML.Samples.Static { - public partial class TrainersSamples + public class LightGbmRegressionExample { public static void LightGbmRegression() { @@ -59,8 +51,9 @@ public static void LightGbmRegression() VBuffer weights = default; pred.GetFeatureWeights(ref weights); - Console.WriteLine($"weight 0 - {weights.Values[0]}"); - Console.WriteLine($"weight 1 - {weights.Values[1]}"); + var weightsValues = weights.GetValues(); + Console.WriteLine($"weight 0 - {weightsValues[0]}"); + Console.WriteLine($"weight 1 - {weightsValues[1]}"); // Evaluate how the model is doing on the test data var dataWithPredictions = model.Transform(testData); diff --git a/docs/samples/Microsoft.ML.Samples/Static/SDCABinaryClassification.cs b/docs/samples/Microsoft.ML.Samples/Static/SDCABinaryClassification.cs index 630d982ba4..a475090551 100644 --- a/docs/samples/Microsoft.ML.Samples/Static/SDCABinaryClassification.cs +++ b/docs/samples/Microsoft.ML.Samples/Static/SDCABinaryClassification.cs @@ -1,20 +1,12 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; +using Microsoft.ML.StaticPipe; +using Microsoft.ML.Transforms; +using Microsoft.ML.Transforms.Categorical; +using System; -// the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. - using Microsoft.ML.Runtime.Data; - using Microsoft.ML.StaticPipe; - using Microsoft.ML.Transforms; - using Microsoft.ML.Transforms.Categorical; - using System; - -// NOTE: WHEN ADDING TO THE FILE, ALWAYS APPEND TO THE END OF IT. -// If you change the existing content, check that the files referencing it in the XML documentation are still correct, as they reference -// line by line. namespace Microsoft.ML.Samples.Static { - public partial class TrainersSamples + public class SdcaBinaryClassificationExample { public static void SdcaBinaryClassification() { diff --git a/docs/samples/Microsoft.ML.Samples/Static/SDCARegression.cs b/docs/samples/Microsoft.ML.Samples/Static/SDCARegression.cs index 60f1049165..4d35a28257 100644 --- a/docs/samples/Microsoft.ML.Samples/Static/SDCARegression.cs +++ b/docs/samples/Microsoft.ML.Samples/Static/SDCARegression.cs @@ -1,19 +1,11 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; +using Microsoft.ML.Runtime.Learners; +using Microsoft.ML.StaticPipe; +using System; -// the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. - using Microsoft.ML.Runtime.Data; - using Microsoft.ML.Runtime.Learners; - using Microsoft.ML.StaticPipe; - using System; - -// NOTE: WHEN ADDING TO THE FILE, ALWAYS APPEND TO THE END OF IT. -// If you change the existing content, check that the files referencing it in the XML documentation are still correct, as they reference -// line by line. namespace Microsoft.ML.Samples.Static { - public partial class TrainersSamples + public class SdcaRegressionExample { public static void SdcaRegression() { @@ -57,8 +49,9 @@ public static void SdcaRegression() VBuffer weights = default; pred.GetFeatureWeights(ref weights); - Console.WriteLine($"weight 0 - {weights.Values[0]}"); - Console.WriteLine($"weight 1 - {weights.Values[1]}"); + var weightsValues = weights.GetValues(); + Console.WriteLine($"weight 0 - {weightsValues[0]}"); + Console.WriteLine($"weight 1 - {weightsValues[1]}"); // Evaluate how the model is doing on the test data var dataWithPredictions = model.Transform(testData); diff --git a/pkg/Microsoft.ML/Microsoft.ML.nupkgproj b/pkg/Microsoft.ML/Microsoft.ML.nupkgproj index 75517c587e..f479d0e970 100644 --- a/pkg/Microsoft.ML/Microsoft.ML.nupkgproj +++ b/pkg/Microsoft.ML/Microsoft.ML.nupkgproj @@ -8,6 +8,7 @@ + diff --git a/src/Microsoft.ML.Api/ComponentCreation.cs b/src/Microsoft.ML.Api/ComponentCreation.cs index a6e97af41d..e83cfe10b6 100644 --- a/src/Microsoft.ML.Api/ComponentCreation.cs +++ b/src/Microsoft.ML.Api/ComponentCreation.cs @@ -150,46 +150,6 @@ public static BatchPredictionEngine CreateBatchPredictionEngine(env, dataPipe, ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition); } - /// - /// Create an on-demand prediction engine. - /// - /// The host environment to use. - /// The stream to deserialize the pipeline (transforms and predictor) from. - /// Whether to ignore missing columns in the data view. - /// The optional input schema. If null, the schema is inferred from the type. - /// The optional output schema. If null, the schema is inferred from the type. - public static PredictionEngine CreatePredictionEngine(this IHostEnvironment env, Stream modelStream, - bool ignoreMissingColumns = false, SchemaDefinition inputSchemaDefinition = null, SchemaDefinition outputSchemaDefinition = null) - where TSrc : class - where TDst : class, new() - { - Contracts.CheckValue(env, nameof(env)); - env.CheckValue(modelStream, nameof(modelStream)); - env.CheckValueOrNull(inputSchemaDefinition); - env.CheckValueOrNull(outputSchemaDefinition); - return new PredictionEngine(env, modelStream, ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition); - } - - /// - /// Create an on-demand prediction engine. - /// - /// The host environment to use. - /// The transformation pipe that may or may not include a scorer. - /// Whether to ignore missing columns in the data view. - /// The optional input schema. If null, the schema is inferred from the type. - /// The optional output schema. If null, the schema is inferred from the type. - public static PredictionEngine CreatePredictionEngine(this IHostEnvironment env, IDataView dataPipe, - bool ignoreMissingColumns = false, SchemaDefinition inputSchemaDefinition = null, SchemaDefinition outputSchemaDefinition = null) - where TSrc : class - where TDst : class, new() - { - Contracts.CheckValue(env, nameof(env)); - env.CheckValue(dataPipe, nameof(dataPipe)); - env.CheckValueOrNull(inputSchemaDefinition); - env.CheckValueOrNull(outputSchemaDefinition); - return new PredictionEngine(env, dataPipe, ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition); - } - /// /// Create an on-demand prediction engine. /// @@ -198,7 +158,7 @@ public static PredictionEngine CreatePredictionEngine(th /// Whether to ignore missing columns in the data view. /// The optional input schema. If null, the schema is inferred from the type. /// The optional output schema. If null, the schema is inferred from the type. - public static PredictionEngine CreatePredictionEngine(this IHostEnvironment env, ITransformer transformer, + internal static PredictionEngine CreatePredictionEngine(this IHostEnvironment env, ITransformer transformer, bool ignoreMissingColumns = false, SchemaDefinition inputSchemaDefinition = null, SchemaDefinition outputSchemaDefinition = null) where TSrc : class where TDst : class, new() @@ -210,23 +170,6 @@ public static PredictionEngine CreatePredictionEngine(th return new PredictionEngine(env, transformer, ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition); } - /// - /// Create a prediction engine. - /// This encapsulates the 'classic' prediction problem, where the input is denoted by the float array of features, - /// and the output is a float score. For binary classification predictors that can output probability, there are output - /// fields that report the predicted label and probability. - /// - /// The host environment to use. - /// The model stream to load pipeline from. - /// Number of features. - public static SimplePredictionEngine CreateSimplePredictionEngine(this IHostEnvironment env, Stream modelStream, int nFeatures) - { - Contracts.CheckValue(env, nameof(env)); - env.CheckValue(modelStream, nameof(modelStream)); - env.CheckParam(nFeatures > 0, nameof(nFeatures), "Number of features must be positive."); - return new SimplePredictionEngine(env, modelStream, nFeatures); - } - /// /// Load the transforms (but not loader) from the model steram and apply them to the specified data. /// It is acceptable to have no transforms in the model stream: in this case the original diff --git a/src/Microsoft.ML.Api/CustomMappingTransformer.cs b/src/Microsoft.ML.Api/CustomMappingTransformer.cs index e39d3da3a9..e6b8734a1a 100644 --- a/src/Microsoft.ML.Api/CustomMappingTransformer.cs +++ b/src/Microsoft.ML.Api/CustomMappingTransformer.cs @@ -26,13 +26,12 @@ public sealed class CustomMappingTransformer : ITransformer, ICanSav { private readonly IHost _host; private readonly Action _mapAction; - private readonly InternalSchemaDefinition _addedSchema; private readonly string _contractName; - internal InternalSchemaDefinition AddedSchema => _addedSchema; + internal InternalSchemaDefinition AddedSchema { get; } + internal SchemaDefinition InputSchemaDefinition { get; } public bool IsRowToRowMapper => true; - private readonly SchemaDefinition _inputSchemaDefinition; /// /// Create a custom mapping of input columns to output columns. /// @@ -52,14 +51,14 @@ public CustomMappingTransformer(IHostEnvironment env, Action mapActi _host.CheckValueOrNull(outputSchemaDefinition); _mapAction = mapAction; - _inputSchemaDefinition = inputSchemaDefinition; + InputSchemaDefinition = inputSchemaDefinition; var outSchema = outputSchemaDefinition == null ? InternalSchemaDefinition.Create(typeof(TDst), SchemaDefinition.Direction.Write) : InternalSchemaDefinition.Create(typeof(TDst), outputSchemaDefinition); _contractName = contractName; - _addedSchema = outSchema; + AddedSchema = outSchema; } public void Save(ModelSaveContext ctx) @@ -108,18 +107,18 @@ public Mapper(CustomMappingTransformer parent, Schema inputSchema) _inputSchema = inputSchema; var emptyDataView = new EmptyDataView(_host, inputSchema); - _typedSrc = TypedCursorable.Create(_host, emptyDataView, false, _parent._inputSchemaDefinition); + _typedSrc = TypedCursorable.Create(_host, emptyDataView, false, _parent.InputSchemaDefinition); } public Delegate[] CreateGetters(IRow input, Func activeOutput, out Action disposer) { disposer = null; // If no outputs are active, we short-circuit to empty array of getters. - var result = new Delegate[_parent._addedSchema.Columns.Length]; + var result = new Delegate[_parent.AddedSchema.Columns.Length]; if (!Enumerable.Range(0, result.Length).Any(activeOutput)) return result; - var dstRow = new DataViewConstructionUtils.InputRow(_host, _parent._addedSchema); + var dstRow = new DataViewConstructionUtils.InputRow(_host, _parent.AddedSchema); IRowReadableAs inputRow = _typedSrc.GetRow(input); TSrc src = new TSrc(); @@ -160,7 +159,7 @@ private Delegate GetDstGetter(IRow input, int colIndex, Action refreshAction) public Func GetDependencies(Func activeOutput) { - if (Enumerable.Range(0, _parent._addedSchema.Columns.Length).Any(activeOutput)) + if (Enumerable.Range(0, _parent.AddedSchema.Columns.Length).Any(activeOutput)) { // If any output column is requested, then we activate all input columns that we need. return _typedSrc.GetDependencies(col => false); @@ -171,7 +170,7 @@ public Func GetDependencies(Func activeOutput) public Schema.Column[] GetOutputColumns() { - var dstRow = new DataViewConstructionUtils.InputRow(_host, _parent._addedSchema); + var dstRow = new DataViewConstructionUtils.InputRow(_host, _parent.AddedSchema); // All the output columns of dstRow are our outputs. return Enumerable.Range(0, dstRow.Schema.ColumnCount).Select(x => dstRow.Schema[x]).ToArray(); } @@ -206,6 +205,23 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) var addedSchemaShape = SchemaShape.Create(new Schema(addedCols)); var result = inputSchema.Columns.ToDictionary(x => x.Name); + var inputDef = InternalSchemaDefinition.Create(typeof(TSrc), Transformer.InputSchemaDefinition); + foreach (var col in inputDef.Columns) + { + if (!result.TryGetValue(col.ColumnName, out var column)) + throw Contracts.ExceptSchemaMismatch(nameof(inputSchema), "input", col.ColumnName); + + SchemaShape.GetColumnTypeShape(col.ColumnType, out var vecKind, out var itemType, out var isKey); + // Special treatment for vectors: if we expect variable vector, we also allow fixed-size vector. + if (itemType != column.ItemType || isKey != column.IsKey + || vecKind == SchemaShape.Column.VectorKind.Scalar && column.Kind != SchemaShape.Column.VectorKind.Scalar + || vecKind == SchemaShape.Column.VectorKind.Vector && column.Kind != SchemaShape.Column.VectorKind.Vector + || vecKind == SchemaShape.Column.VectorKind.VariableVector && column.Kind == SchemaShape.Column.VectorKind.Scalar) + { + throw Contracts.ExceptSchemaMismatch(nameof(inputSchema), "input", col.ColumnName, col.ColumnType.ToString(), column.GetTypeString()); + } + } + foreach (var addedCol in addedSchemaShape.Columns) result[addedCol.Name] = addedCol; diff --git a/src/Microsoft.ML.Api/DataViewConstructionUtils.cs b/src/Microsoft.ML.Api/DataViewConstructionUtils.cs index a4bc8cfda5..97844696c3 100644 --- a/src/Microsoft.ML.Api/DataViewConstructionUtils.cs +++ b/src/Microsoft.ML.Api/DataViewConstructionUtils.cs @@ -238,11 +238,10 @@ private Delegate CreateConvertingArrayGetterDelegate(Delegate peekDe { peek(GetCurrentRowObject(), Position, ref buf); var n = Utils.Size(buf); - dst = new VBuffer(n, Utils.Size(dst.Values) < n - ? new TDst[n] - : dst.Values, dst.Indices); + var dstEditor = VBufferEditor.Create(ref dst, n); for (int i = 0; i < n; i++) - dst.Values[i] = convert(buf[i]); + dstEditor.Values[i] = convert(buf[i]); + dst = dstEditor.Commit(); }); } @@ -267,10 +266,10 @@ private Delegate CreateDirectArrayGetterDelegate(Delegate peekDel) { peek(GetCurrentRowObject(), Position, ref buf); var n = Utils.Size(buf); - dst = new VBuffer(n, Utils.Size(dst.Values) < n ? new TDst[n] : dst.Values, - dst.Indices); + var dstEditor = VBufferEditor.Create(ref dst, n); if (buf != null) - Array.Copy(buf, dst.Values, n); + buf.AsSpan(0, n).CopyTo(dstEditor.Values); + dst = dstEditor.Commit(); }); } @@ -397,7 +396,7 @@ protected DataViewBase(IHostEnvironment env, string name, InternalSchemaDefiniti } } - public abstract long? GetRowCount(bool lazy = true); + public abstract long? GetRowCount(); public abstract IRowCursor GetRowCursor(Func predicate, IRandom rand = null); @@ -555,7 +554,7 @@ public override bool CanShuffle get { return true; } } - public override long? GetRowCount(bool lazy = true) + public override long? GetRowCount() { return _data.Count; } @@ -654,7 +653,7 @@ public override bool CanShuffle get { return false; } } - public override long? GetRowCount(bool lazy = true) + public override long? GetRowCount() { return (_data as ICollection)?.Count; } @@ -735,7 +734,7 @@ public override bool CanShuffle get { return false; } } - public override long? GetRowCount(bool lazy = true) + public override long? GetRowCount() { return null; } @@ -955,11 +954,12 @@ private void GetStringArray(ref VBuffer> dst) { var value = (string[])(object)Value; var n = Utils.Size(value); - dst = new VBuffer>(n, Utils.Size(dst.Values) < n ? new ReadOnlyMemory[n] : dst.Values, dst.Indices); + var dstEditor = VBufferEditor.Create(ref dst, n); for (int i = 0; i < n; i++) - dst.Values[i] = value[i].AsMemory(); + dstEditor.Values[i] = value[i].AsMemory(); + dst = dstEditor.Commit(); } private ValueGetter> GetArrayGetter() @@ -968,9 +968,10 @@ private ValueGetter> GetArrayGetter() var n = Utils.Size(value); return (ref VBuffer dst) => { - dst = new VBuffer(n, Utils.Size(dst.Values) < n ? new TDst[n] : dst.Values, dst.Indices); + var dstEditor = VBufferEditor.Create(ref dst, n); if (value != null) - Array.Copy(value, dst.Values, n); + value.AsSpan(0, n).CopyTo(dstEditor.Values); + dst = dstEditor.Commit(); }; } diff --git a/src/Microsoft.ML.Api/GenerateCodeCommand.cs b/src/Microsoft.ML.Api/GenerateCodeCommand.cs index 26136971af..4855a94219 100644 --- a/src/Microsoft.ML.Api/GenerateCodeCommand.cs +++ b/src/Microsoft.ML.Api/GenerateCodeCommand.cs @@ -24,7 +24,7 @@ namespace Microsoft.ML.Runtime.Api /// /// REVIEW: Consider adding support for generating VBuffers instead of arrays, maybe for high dimensionality vectors. /// - public sealed class GenerateCodeCommand : ICommand + internal sealed class GenerateCodeCommand : ICommand { public const string LoadName = "GenerateSamplePredictionCode"; private const string CodeTemplatePath = "Microsoft.ML.Api.GeneratedCodeTemplate.csresource"; diff --git a/src/Microsoft.ML.Api/PredictionEngine.cs b/src/Microsoft.ML.Api/PredictionEngine.cs index 2d05b3d89d..14fb436893 100644 --- a/src/Microsoft.ML.Api/PredictionEngine.cs +++ b/src/Microsoft.ML.Api/PredictionEngine.cs @@ -140,12 +140,6 @@ public sealed class PredictionEngine private readonly IRowReadableAs _outputRow; private readonly Action _disposer; - internal PredictionEngine(IHostEnvironment env, Stream modelStream, bool ignoreMissingColumns, - SchemaDefinition inputSchemaDefinition = null, SchemaDefinition outputSchemaDefinition = null) - : this(env, StreamChecker(env, modelStream), ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition) - { - } - private static Func StreamChecker(IHostEnvironment env, Stream modelStream) { env.CheckValue(modelStream, nameof(modelStream)); @@ -158,29 +152,12 @@ private static Func StreamChecker(IHostEnvironment env, }; } - internal PredictionEngine(IHostEnvironment env, IDataView dataPipe, bool ignoreMissingColumns, - SchemaDefinition inputSchemaDefinition = null, SchemaDefinition outputSchemaDefinition = null) - : this(env, new TransformWrapper(env, env.CheckRef(dataPipe, nameof(dataPipe))), ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition) - { - } - internal PredictionEngine(IHostEnvironment env, ITransformer transformer, bool ignoreMissingColumns, SchemaDefinition inputSchemaDefinition = null, SchemaDefinition outputSchemaDefinition = null) - : this(env, TransformerChecker(env, transformer), ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition) - { - } - - private static Func TransformerChecker(IExceptionContext ectx, ITransformer transformer) - { - ectx.CheckValue(transformer, nameof(transformer)); - ectx.CheckParam(transformer.IsRowToRowMapper, nameof(transformer), "Must be a row to row mapper"); - return transformer.GetRowToRowMapper; - } - - private PredictionEngine(IHostEnvironment env, Func makeMapper, bool ignoreMissingColumns, - SchemaDefinition inputSchemaDefinition, SchemaDefinition outputSchemaDefinition) { Contracts.CheckValue(env, nameof(env)); + env.AssertValue(transformer); + var makeMapper = TransformerChecker(env, transformer); env.AssertValue(makeMapper); _inputRow = DataViewConstructionUtils.CreateInputRow(env, inputSchemaDefinition); @@ -190,6 +167,13 @@ private PredictionEngine(IHostEnvironment env, Func mak _outputRow = cursorable.GetRow(outputRow); } + private static Func TransformerChecker(IExceptionContext ectx, ITransformer transformer) + { + ectx.CheckValue(transformer, nameof(transformer)); + ectx.CheckParam(transformer.IsRowToRowMapper, nameof(transformer), "Must be a row to row mapper"); + return transformer.GetRowToRowMapper; + } + ~PredictionEngine() { _disposer?.Invoke(); @@ -222,76 +206,4 @@ public void Predict(TSrc example, ref TDst prediction) _outputRow.FillValues(prediction); } } - - /// - /// This class encapsulates the 'classic' prediction problem, where the input is denoted by the float array of features, - /// and the output is a float score. For binary classification predictors that can output probability, there are output - /// fields that report the predicted label and probability. - /// - public sealed class SimplePredictionEngine - { - private class Example - { - // REVIEW: convert to VBuffer once we have support for them. - public Float[] Features; - } - - /// - /// The prediction output. For every field, if there are no column with the matched name in the scoring pipeline, - /// the field will be left intact by the engine (and keep 0 as value unless the user code changes it). - /// - public class Prediction - { - public Float Score; - public Float Probability; - } - - private readonly PredictionEngine _engine; - private readonly int _nFeatures; - - /// - /// Create a prediction engine. - /// - /// The host environment to use. - /// The model stream to load pipeline from. - /// Number of features. - /// Name of the features column. - internal SimplePredictionEngine(IHostEnvironment env, Stream modelStream, int nFeatures, string featureColumnName = "Features") - { - Contracts.AssertValue(env); - Contracts.AssertValue(modelStream); - Contracts.Assert(nFeatures > 0); - - _nFeatures = nFeatures; - var schema = - new SchemaDefinition - { - new SchemaDefinition.Column - { - MemberName = featureColumnName, - ColumnType = new VectorType(NumberType.Float, nFeatures) - } - }; - _engine = new PredictionEngine(env, modelStream, true, schema); - } - - /// - /// Score an example. - /// - /// The feature array of the example. - /// The prediction object. New object is created on every call. - public Prediction Predict(Float[] features) - { - Contracts.CheckValue(features, nameof(features)); - if (features.Length != _nFeatures) - throw Contracts.ExceptParam(nameof(features), "Number of features should be {0}, but it is {1}", _nFeatures, features.Length); - - var example = new Example { Features = features }; - return _engine.Predict(example); - } - public Prediction Predict(VBuffer features) - { - throw Contracts.ExceptNotImpl("VBuffers aren't supported yet."); - } - } } \ No newline at end of file diff --git a/src/Microsoft.ML.Api/StatefulFilterTransform.cs b/src/Microsoft.ML.Api/StatefulFilterTransform.cs index eb67085bc2..9b93425f63 100644 --- a/src/Microsoft.ML.Api/StatefulFilterTransform.cs +++ b/src/Microsoft.ML.Api/StatefulFilterTransform.cs @@ -99,7 +99,7 @@ private StatefulFilterTransform(IHostEnvironment env, StatefulFilterTransform _bindings.Schema; - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { // REVIEW: currently stateful map is implemented via filter, and this is sub-optimal. return null; diff --git a/src/Microsoft.ML.Api/TypedCursor.cs b/src/Microsoft.ML.Api/TypedCursor.cs index 3450dd2bbf..a4a2e8b399 100644 --- a/src/Microsoft.ML.Api/TypedCursor.cs +++ b/src/Microsoft.ML.Api/TypedCursor.cs @@ -2,12 +2,12 @@ // 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.Data; +using Microsoft.ML.Runtime.Internal.Utilities; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Internal.Utilities; namespace Microsoft.ML.Runtime.Api { @@ -381,21 +381,21 @@ private Action CreateDirectVBufferSetter(IRow input, int col, Delega return row => { typedPeek(row, Position, ref buf); - value = new VBuffer(0, buf, value.Indices); getter(ref value); if (value.Length == Utils.Size(buf) && value.IsDense) { - // In this case, value.Values alone is enough to represent the vector. - // Otherwise, we are either sparse (and need densifying), or value.Values is too large, - // and we need to truncate. - buf = value.Values; + // In this case, buf (which came from the input object) is the + // right size to represent the vector. + // Otherwise, we are either sparse (and need densifying), or value.GetValues() + // is a different length than buf. + value.CopyTo(buf); } else { buf = new TDst[value.Length]; if (value.IsDense) - Array.Copy(value.Values, buf, value.Length); + value.GetValues().CopyTo(buf); else { foreach (var pair in value.Items(true)) @@ -528,8 +528,6 @@ public ICursor GetRootCursor() /// public static class CursoringUtils { - private const string NeedEnvObsoleteMessage = "This method is obsolete. Please use the overload that takes an additional 'env' argument. An environment can be created via new LocalEnvironment()."; - /// /// Generate a strongly-typed cursorable wrapper of the . /// @@ -550,24 +548,6 @@ public static ICursorable AsCursorable(this IDataView data, IHostEnv return TypedCursorable.Create(env, data, ignoreMissingColumns, schemaDefinition); } - /// - /// Generate a strongly-typed cursorable wrapper of the . - /// - /// The user-defined row type. - /// The underlying data view. - /// Whether to ignore the case when a requested column is not present in the data view. - /// Optional user-provided schema definition. If it is not present, the schema is inferred from the definition of T. - /// The cursorable wrapper of . - [Obsolete(NeedEnvObsoleteMessage)] - public static ICursorable AsCursorable(this IDataView data, bool ignoreMissingColumns = false, - SchemaDefinition schemaDefinition = null) - where TRow : class, new() - { - // REVIEW: Take an env as a parameter. - var env = new ConsoleEnvironment(); - return data.AsCursorable(env, ignoreMissingColumns, schemaDefinition); - } - /// /// Convert an into a strongly-typed . /// @@ -589,24 +569,5 @@ public static IEnumerable AsEnumerable(this IDataView data, IHostEnv var engine = new PipeEngine(env, data, ignoreMissingColumns, schemaDefinition); return engine.RunPipe(reuseRowObject); } - - /// - /// Convert an into a strongly-typed . - /// - /// The user-defined row type. - /// The underlying data view. - /// Whether to return the same object on every row, or allocate a new one per row. - /// Whether to ignore the case when a requested column is not present in the data view. - /// Optional user-provided schema definition. If it is not present, the schema is inferred from the definition of T. - /// The that holds the data in . It can be enumerated multiple times. - [Obsolete(NeedEnvObsoleteMessage)] - public static IEnumerable AsEnumerable(this IDataView data, bool reuseRowObject, - bool ignoreMissingColumns = false, SchemaDefinition schemaDefinition = null) - where TRow : class, new() - { - // REVIEW: Take an env as a parameter. - var env = new ConsoleEnvironment(); - return data.AsEnumerable(env, reuseRowObject, ignoreMissingColumns, schemaDefinition); - } } } diff --git a/src/Microsoft.ML.Core/CommandLine/ArgumentAttribute.cs b/src/Microsoft.ML.Core/CommandLine/ArgumentAttribute.cs index 64fe3b5b80..70f9ec8d98 100644 --- a/src/Microsoft.ML.Core/CommandLine/ArgumentAttribute.cs +++ b/src/Microsoft.ML.Core/CommandLine/ArgumentAttribute.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -// This is separated from CmdParser.cs - using System; using System.Linq; @@ -15,7 +13,8 @@ namespace Microsoft.ML.Runtime.CommandLine /// as the destination of command line argument parsing. /// [AttributeUsage(AttributeTargets.Field)] - public class ArgumentAttribute : Attribute + [BestFriend] + internal class ArgumentAttribute : Attribute { public enum VisibilityType { @@ -24,17 +23,8 @@ public enum VisibilityType EntryPointsOnly } - private ArgumentType _type; private string _shortName; - private string _helpText; - private bool _hide; - private double _sortOrder; - private string _nullName; - private bool _isInputFileName; - private string _specialPurpose; - private VisibilityType _visibility; private string _name; - private Type _signatureType; /// /// Allows control of command line parsing. @@ -42,17 +32,14 @@ public enum VisibilityType /// Specifies the error checking to be done on the argument. public ArgumentAttribute(ArgumentType type) { - _type = type; - _sortOrder = 150; + Type = type; + SortOrder = 150; } /// /// The error checking to be done on the argument. /// - public ArgumentType Type - { - get { return _type; } - } + public ArgumentType Type { get; } /// /// The short name(s) of the argument. @@ -64,7 +51,7 @@ public ArgumentType Type /// public string ShortName { - get { return _shortName; } + get => _shortName; set { Contracts.Check(value == null || !(this is DefaultArgumentAttribute)); @@ -75,54 +62,26 @@ public string ShortName /// /// The help text for the argument. /// - public string HelpText - { - get { return _helpText; } - set { _helpText = value; } - } + public string HelpText { get; set; } - public bool Hide - { - get { return _hide; } - set { _hide = value; } - } + public bool Hide { get; set; } - public double SortOrder - { - get { return _sortOrder; } - set { _sortOrder = value; } - } + public double SortOrder { get; set; } - public string NullName - { - get { return _nullName; } - set { _nullName = value; } - } + public string NullName { get; set; } - public bool IsInputFileName - { - get { return _isInputFileName; } - set { _isInputFileName = value; } - } + public bool IsInputFileName { get; set; } /// /// Allows the GUI or other tools to inspect the intended purpose of the argument and pick a correct custom control. /// - public string Purpose - { - get { return _specialPurpose; } - set { _specialPurpose = value; } - } + public string Purpose { get; set; } - public VisibilityType Visibility - { - get { return _visibility; } - set { _visibility = value; } - } + public VisibilityType Visibility { get; set; } public string Name { - get { return _name; } + get => _name; set { _name = string.IsNullOrWhiteSpace(value) ? null : value; } } @@ -136,15 +95,8 @@ public string[] Aliases } } - public bool IsRequired - { - get { return ArgumentType.Required == (_type & ArgumentType.Required); } - } + public bool IsRequired => ArgumentType.Required == (Type & ArgumentType.Required); - public Type SignatureType - { - get { return _signatureType; } - set { _signatureType = value; } - } + public Type SignatureType { get; set; } } } \ No newline at end of file diff --git a/src/Microsoft.ML.Core/CommandLine/ArgumentType.cs b/src/Microsoft.ML.Core/CommandLine/ArgumentType.cs new file mode 100644 index 0000000000..5840615fd5 --- /dev/null +++ b/src/Microsoft.ML.Core/CommandLine/ArgumentType.cs @@ -0,0 +1,54 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.ML.Runtime.CommandLine +{ + /// + /// Used to control parsing of command line arguments. + /// + [Flags] + [BestFriend] + internal enum ArgumentType + { + /// + /// Indicates that this field is required. An error will be displayed + /// if it is not present when parsing arguments. + /// + Required = 0x01, + + /// + /// Only valid in conjunction with Multiple. + /// Duplicate values will result in an error. + /// + Unique = 0x02, + + /// + /// Inidicates that the argument may be specified more than once. + /// Only valid if the argument is a collection + /// + Multiple = 0x04, + + /// + /// The default type for non-collection arguments. + /// The argument is not required, but an error will be reported if it is specified more than once. + /// + AtMostOnce = 0x00, + + /// + /// For non-collection arguments, when the argument is specified more than + /// once no error is reported and the value of the argument is the last + /// value which occurs in the argument list. + /// + LastOccurenceWins = Multiple, + + /// + /// The default type for collection arguments. + /// The argument is permitted to occur multiple times, but duplicate + /// values will cause an error to be reported. + /// + MultipleUnique = Multiple | Unique, + } +} diff --git a/src/Microsoft.ML.Core/CommandLine/CharCursor.cs b/src/Microsoft.ML.Core/CommandLine/CharCursor.cs index 2ea5dbe8d5..d8a591331c 100644 --- a/src/Microsoft.ML.Core/CommandLine/CharCursor.cs +++ b/src/Microsoft.ML.Core/CommandLine/CharCursor.cs @@ -6,7 +6,7 @@ namespace Microsoft.ML.Runtime.CommandLine { - public sealed class CharCursor + internal sealed class CharCursor { private readonly string _text; private readonly int _ichLim; diff --git a/src/Microsoft.ML.Core/CommandLine/CmdLexer.cs b/src/Microsoft.ML.Core/CommandLine/CmdLexer.cs index e7e6ae19cd..a5c14259a8 100644 --- a/src/Microsoft.ML.Core/CommandLine/CmdLexer.cs +++ b/src/Microsoft.ML.Core/CommandLine/CmdLexer.cs @@ -2,13 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; using System.Text; -using Microsoft.ML.Runtime.Internal.Utilities; namespace Microsoft.ML.Runtime.CommandLine { - public sealed class CmdLexer + [BestFriend] + internal sealed class CmdLexer { private CharCursor _curs; diff --git a/src/Microsoft.ML.Core/CommandLine/CmdParser.cs b/src/Microsoft.ML.Core/CommandLine/CmdParser.cs index 37fd791358..81018dad3e 100644 --- a/src/Microsoft.ML.Core/CommandLine/CmdParser.cs +++ b/src/Microsoft.ML.Core/CommandLine/CmdParser.cs @@ -1,132 +1,6 @@ -////////////////////////////////////////////////////////////////////////////// -// Command Line Argument Parser -// ---------------------------- -// Usage -// ----- -// -// Parsing command line arguments to a console application is a common problem. -// This library handles the common task of reading arguments from a command line -// and filling in the values in a type. -// -// To use this library, define a class whose fields represent the data that your -// application wants to receive from arguments on the command line. Then call -// CommandLine.ParseArguments() to fill the object with the data -// from the command line. Each field in the class defines a command line argument. -// The type of the field is used to validate the data read from the command line. -// The name of the field defines the name of the command line option. -// -// The parser can handle fields of the following types: -// -// - string -// - int -// - uint -// - bool -// - enum -// - array of the above type -// -// For example, suppose you want to read in the argument list for wc (word count). -// wc takes three optional boolean arguments: -l, -w, and -c and a list of files. -// -// You could parse these arguments using the following code: -// -// class WCArguments -// { -// public bool lines; -// public bool words; -// public bool chars; -// public string[] files; -// } -// -// class WC -// { -// static void Main(string[] args) -// { -// if (CommandLine.ParseArgumentsWithUsage(args, parsedArgs)) -// { -// // insert application code here -// } -// } -// } -// -// So you could call this aplication with the following command line to count -// lines in the foo and bar files: -// -// wc.exe /lines /files:foo /files:bar -// -// The program will display the following usage message when bad command line -// arguments are used: -// -// wc.exe -x -// -// Unrecognized command line argument '-x' -// /lines[+|-] short form /l -// /words[+|-] short form /w -// /chars[+|-] short form /c -// /files= short form /f -// @ Read response file for more options -// -// That was pretty easy. However, you realy want to omit the "/files:" for the -// list of files. The details of field parsing can be controled using custom -// attributes. The attributes which control parsing behaviour are: -// -// ArgumentAttribute -// - controls short name, long name, required, allow duplicates, default value -// and help text -// DefaultArgumentAttribute -// - allows omition of the "/name". -// - This attribute is allowed on only one field in the argument class. -// -// So for the wc.exe program we want this: -// -// using System; -// using Utilities; -// -// class WCArguments -// { -// [Argument(ArgumentType.AtMostOnce, HelpText="Count number of lines in the input text.")] -// public bool lines; -// [Argument(ArgumentType.AtMostOnce, HelpText="Count number of words in the input text.")] -// public bool words; -// [Argument(ArgumentType.AtMostOnce, HelpText="Count number of chars in the input text.")] -// public bool chars; -// [DefaultArgument(ArgumentType.MultipleUnique, HelpText="Input files to count.")] -// public string[] files; -// } -// -// class WC -// { -// static void Main(string[] args) -// { -// WCArguments parsedArgs = new WCArguments(); -// if (CommandLine.ParseArgumentsWithUsage(args, parsedArgs)) -// { -// // insert application code here -// } -// } -// } -// -// -// -// So now we have the command line we want: -// -// wc.exe /lines foo bar -// -// This will set lines to true and will set files to an array containing the -// strings "foo" and "bar". -// -// The new usage message becomes: -// -// wc.exe -x -// -// Unrecognized command line argument '-x' -// /lines[+|-] Count number of lines in the input text. (short form /l) -// /words[+|-] Count number of words in the input text. (short form /w) -// /chars[+|-] Count number of chars in the input text. (short form /c) -// @ Read response file for more options -// Input files to count. (short form /f) -// -// If you want more control over how error messages are reported, how /help is -// dealt with, etc you can instantiate the CommandLine.Parser class. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. using System; using System.Collections; @@ -142,103 +16,15 @@ namespace Microsoft.ML.Runtime.CommandLine { - /// - /// Used to control parsing of command line arguments. - /// - [Flags] - public enum ArgumentType - { - /// - /// Indicates that this field is required. An error will be displayed - /// if it is not present when parsing arguments. - /// - Required = 0x01, - - /// - /// Only valid in conjunction with Multiple. - /// Duplicate values will result in an error. - /// - Unique = 0x02, - - /// - /// Inidicates that the argument may be specified more than once. - /// Only valid if the argument is a collection - /// - Multiple = 0x04, - - /// - /// The default type for non-collection arguments. - /// The argument is not required, but an error will be reported if it is specified more than once. - /// - AtMostOnce = 0x00, - - /// - /// For non-collection arguments, when the argument is specified more than - /// once no error is reported and the value of the argument is the last - /// value which occurs in the argument list. - /// - LastOccurenceWins = Multiple, - - /// - /// The default type for collection arguments. - /// The argument is permitted to occur multiple times, but duplicate - /// values will cause an error to be reported. - /// - MultipleUnique = Multiple | Unique, - } - - /// - /// Indicates that this argument is the default argument. - /// '/' or '-' prefix only the argument value is specified. - /// The ShortName property should not be set for DefaultArgumentAttribute - /// instances. The LongName property is used for usage text only and - /// does not affect the usage of the argument. - /// - [AttributeUsage(AttributeTargets.Field)] - public class DefaultArgumentAttribute : ArgumentAttribute - { - /// - /// Indicates that this argument is the default argument. - /// - /// Specifies the error checking to be done on the argument. - public DefaultArgumentAttribute(ArgumentType type) - : base(type) - { - } - } - - /// - /// On an enum value - indicates that the value should not be shown in help or UI. - /// - [AttributeUsage(AttributeTargets.Field)] - public class HideEnumValueAttribute : Attribute - { - public HideEnumValueAttribute() - { - } - } - - /// - /// On an enum value - specifies the display name. - /// - [AttributeUsage(AttributeTargets.Field)] - public class EnumValueDisplayAttribute : Attribute - { - public readonly string Name; - - public EnumValueDisplayAttribute(string name) - { - Name = name; - } - } /// /// A delegate used in error reporting. /// - public delegate void ErrorReporter(string message); + internal delegate void ErrorReporter(string message); [Flags] - public enum SettingsFlags + [BestFriend] + internal enum SettingsFlags { None = 0x00, @@ -254,13 +40,144 @@ public enum SettingsFlags /// /// This allows components to be created by name, signature type, and a settings string. /// - public interface ICommandLineComponentFactory : IComponentFactory + [BestFriend] + internal interface ICommandLineComponentFactory : IComponentFactory { Type SignatureType { get; } string Name { get; } string GetSettingsString(); } + ////////////////////////////////////////////////////////////////////////////// + // Command Line Argument Parser + // ---------------------------- + // Usage + // ----- + // + // Parsing command line arguments to a console application is a common problem. + // This library handles the common task of reading arguments from a command line + // and filling in the values in a type. + // + // To use this library, define a class whose fields represent the data that your + // application wants to receive from arguments on the command line. Then call + // CommandLine.ParseArguments() to fill the object with the data + // from the command line. Each field in the class defines a command line argument. + // The type of the field is used to validate the data read from the command line. + // The name of the field defines the name of the command line option. + // + // The parser can handle fields of the following types: + // + // - string + // - int + // - uint + // - bool + // - enum + // - array of the above type + // + // For example, suppose you want to read in the argument list for wc (word count). + // wc takes three optional boolean arguments: -l, -w, and -c and a list of files. + // + // You could parse these arguments using the following code: + // + // class WCArguments + // { + // public bool lines; + // public bool words; + // public bool chars; + // public string[] files; + // } + // + // class WC + // { + // static void Main(string[] args) + // { + // if (CommandLine.ParseArgumentsWithUsage(args, parsedArgs)) + // { + // // insert application code here + // } + // } + // } + // + // So you could call this aplication with the following command line to count + // lines in the foo and bar files: + // + // wc.exe /lines /files:foo /files:bar + // + // The program will display the following usage message when bad command line + // arguments are used: + // + // wc.exe -x + // + // Unrecognized command line argument '-x' + // /lines[+|-] short form /l + // /words[+|-] short form /w + // /chars[+|-] short form /c + // /files= short form /f + // @ Read response file for more options + // + // That was pretty easy. However, you realy want to omit the "/files:" for the + // list of files. The details of field parsing can be controled using custom + // attributes. The attributes which control parsing behaviour are: + // + // ArgumentAttribute + // - controls short name, long name, required, allow duplicates, default value + // and help text + // DefaultArgumentAttribute + // - allows omition of the "/name". + // - This attribute is allowed on only one field in the argument class. + // + // So for the wc.exe program we want this: + // + // using System; + // using Utilities; + // + // class WCArguments + // { + // [Argument(ArgumentType.AtMostOnce, HelpText="Count number of lines in the input text.")] + // public bool lines; + // [Argument(ArgumentType.AtMostOnce, HelpText="Count number of words in the input text.")] + // public bool words; + // [Argument(ArgumentType.AtMostOnce, HelpText="Count number of chars in the input text.")] + // public bool chars; + // [DefaultArgument(ArgumentType.MultipleUnique, HelpText="Input files to count.")] + // public string[] files; + // } + // + // class WC + // { + // static void Main(string[] args) + // { + // WCArguments parsedArgs = new WCArguments(); + // if (CommandLine.ParseArgumentsWithUsage(args, parsedArgs)) + // { + // // insert application code here + // } + // } + // } + // + // + // + // So now we have the command line we want: + // + // wc.exe /lines foo bar + // + // This will set lines to true and will set files to an array containing the + // strings "foo" and "bar". + // + // The new usage message becomes: + // + // wc.exe -x + // + // Unrecognized command line argument '-x' + // /lines[+|-] Count number of lines in the input text. (short form /l) + // /words[+|-] Count number of words in the input text. (short form /w) + // /chars[+|-] Count number of chars in the input text. (short form /c) + // @ Read response file for more options + // Input files to count. (short form /f) + // + // If you want more control over how error messages are reported, how /help is + // dealt with, etc you can instantiate the CommandLine.Parser class. + /// /// Parser for command line arguments. /// @@ -285,7 +202,8 @@ public interface ICommandLineComponentFactory : IComponentFactory /// Arguments which are array types are collection arguments. Collection /// arguments can be specified multiple times. /// - public sealed class CmdParser + [BestFriend] + internal sealed class CmdParser { private const int SpaceBeforeParam = 2; private readonly ErrorReporter _reporter; diff --git a/src/Microsoft.ML.Core/CommandLine/DefaultArgumentAttribute.cs b/src/Microsoft.ML.Core/CommandLine/DefaultArgumentAttribute.cs new file mode 100644 index 0000000000..2d676f1ece --- /dev/null +++ b/src/Microsoft.ML.Core/CommandLine/DefaultArgumentAttribute.cs @@ -0,0 +1,29 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.ML.Runtime.CommandLine +{ + /// + /// Indicates that this argument is the default argument. + /// '/' or '-' prefix only the argument value is specified. + /// The ShortName property should not be set for DefaultArgumentAttribute + /// instances. The LongName property is used for usage text only and + /// does not affect the usage of the argument. + /// + [AttributeUsage(AttributeTargets.Field)] + [BestFriend] + internal class DefaultArgumentAttribute : ArgumentAttribute + { + /// + /// Indicates that this argument is the default argument. + /// + /// Specifies the error checking to be done on the argument. + public DefaultArgumentAttribute(ArgumentType type) + : base(type) + { + } + } +} diff --git a/src/Microsoft.ML.Core/CommandLine/EnumValueDisplayAttribute.cs b/src/Microsoft.ML.Core/CommandLine/EnumValueDisplayAttribute.cs new file mode 100644 index 0000000000..b6cf4254ca --- /dev/null +++ b/src/Microsoft.ML.Core/CommandLine/EnumValueDisplayAttribute.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.ML.Runtime.CommandLine +{ + /// + /// On an enum value - specifies the display name. + /// + [AttributeUsage(AttributeTargets.Field)] + [BestFriend] + internal class EnumValueDisplayAttribute : Attribute + { + public readonly string Name; + + public EnumValueDisplayAttribute(string name) + { + Name = name; + } + } +} \ No newline at end of file diff --git a/src/Microsoft.ML.Core/CommandLine/HideEnumValueAttribute.cs b/src/Microsoft.ML.Core/CommandLine/HideEnumValueAttribute.cs new file mode 100644 index 0000000000..964a5cc3f3 --- /dev/null +++ b/src/Microsoft.ML.Core/CommandLine/HideEnumValueAttribute.cs @@ -0,0 +1,20 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.ML.Runtime.CommandLine +{ + /// + /// On an enum value - indicates that the value should not be shown in help or UI. + /// + [AttributeUsage(AttributeTargets.Field)] + [BestFriend] + internal class HideEnumValueAttribute : Attribute + { + public HideEnumValueAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/Microsoft.ML.Core/CommandLine/Utils.cs b/src/Microsoft.ML.Core/CommandLine/SpecialPurpose.cs similarity index 93% rename from src/Microsoft.ML.Core/CommandLine/Utils.cs rename to src/Microsoft.ML.Core/CommandLine/SpecialPurpose.cs index 7006fbf6d2..46423d43d9 100644 --- a/src/Microsoft.ML.Core/CommandLine/Utils.cs +++ b/src/Microsoft.ML.Core/CommandLine/SpecialPurpose.cs @@ -4,7 +4,8 @@ namespace Microsoft.ML.Runtime.CommandLine { - public static class SpecialPurpose + [BestFriend] + internal static class SpecialPurpose { /// /// This is used to specify a column mapping of a data transform. diff --git a/src/Common/AssemblyLoadingUtils.cs b/src/Microsoft.ML.Core/ComponentModel/AssemblyLoadingUtils.cs similarity index 97% rename from src/Common/AssemblyLoadingUtils.cs rename to src/Microsoft.ML.Core/ComponentModel/AssemblyLoadingUtils.cs index ab2f2c563a..e947776bc9 100644 --- a/src/Common/AssemblyLoadingUtils.cs +++ b/src/Microsoft.ML.Core/ComponentModel/AssemblyLoadingUtils.cs @@ -6,11 +6,13 @@ using System; using System.IO; using System.IO.Compression; -using System.Linq; using System.Reflection; namespace Microsoft.ML.Runtime { + [Obsolete("The usage for this is intended for the internal command line utilities and is not intended for anything related to the API. " + + "Please consider another way of doing whatever it is you're attempting to accomplish.")] + [BestFriend] internal static class AssemblyLoadingUtils { /// diff --git a/src/Microsoft.ML.Core/Data/ICommand.cs b/src/Microsoft.ML.Core/Data/ICommand.cs index c300b4f3a5..44d4c7340b 100644 --- a/src/Microsoft.ML.Core/Data/ICommand.cs +++ b/src/Microsoft.ML.Core/Data/ICommand.cs @@ -11,9 +11,11 @@ namespace Microsoft.ML.Runtime.Command /// /// The signature for commands. /// - public delegate void SignatureCommand(); + [BestFriend] + internal delegate void SignatureCommand(); - public interface ICommand + [BestFriend] + internal interface ICommand { void Run(); } diff --git a/src/Microsoft.ML.Core/Data/IDataView.cs b/src/Microsoft.ML.Core/Data/IDataView.cs index 32cfbd2285..3f0b89aed7 100644 --- a/src/Microsoft.ML.Core/Data/IDataView.cs +++ b/src/Microsoft.ML.Core/Data/IDataView.cs @@ -82,17 +82,15 @@ public interface IDataView : ISchematized bool CanShuffle { get; } /// - /// Returns the number of rows if known. Null means unknown. If lazy is true, then - /// this is permitted to return null when it might return a non-null value on a subsequent - /// call. This indicates, that the transform does not YET know the number of rows, but - /// may in the future. If lazy is false, then this is permitted to do some work (no more - /// that it would normally do for cursoring) to determine the number of rows. + /// Returns the number of rows if known. Returning null means that the row count is unknown but + /// it might return a non-null value on a subsequent call. This indicates, that the transform does + /// not YET know the number of rows, but may in the future. Its implementation's computation + /// complexity should be O(1). /// - /// Most components will return the same answer whether lazy is true or false. Some, like - /// a cache, might return null until the cache is fully populated (when lazy is true). When - /// lazy is false, such a cache would block until the cache was populated. + /// Most implementation will return the same answer every time. Some, like a cache, might + /// return null until the cache is fully populated. /// - long? GetRowCount(bool lazy = true); + long? GetRowCount(); /// /// Get a row cursor. The active column indices are those for which needCol(col) returns true. diff --git a/src/Microsoft.ML.Core/Data/IEstimator.cs b/src/Microsoft.ML.Core/Data/IEstimator.cs index 46a8a01313..db0c4447a8 100644 --- a/src/Microsoft.ML.Core/Data/IEstimator.cs +++ b/src/Microsoft.ML.Core/Data/IEstimator.cs @@ -120,7 +120,16 @@ public SchemaShape(IEnumerable columns) Contracts.CheckParam(columns.All(c => c != null), nameof(columns), "No items should be null."); } - private static void GetColumnArgs(ColumnType type, + /// + /// Given a , extract the type parameters that describe this type + /// as a 's column type. + /// + /// The actual column type to process. + /// The vector kind of . + /// The item type of . + /// Whether (or its item type) is a key. + [BestFriend] + internal static void GetColumnTypeShape(ColumnType type, out Column.VectorKind vecKind, out ColumnType itemType, out bool isKey) @@ -154,12 +163,12 @@ public static SchemaShape Create(Schema schema) var mCols = new List(); foreach (var metaNameType in schema.GetMetadataTypes(iCol)) { - GetColumnArgs(metaNameType.Value, out var mVecKind, out var mItemType, out var mIsKey); + GetColumnTypeShape(metaNameType.Value, out var mVecKind, out var mItemType, out var mIsKey); mCols.Add(new Column(metaNameType.Key, mVecKind, mItemType, mIsKey)); } var metadata = mCols.Count > 0 ? new SchemaShape(mCols) : _empty; // Next create the single column. - GetColumnArgs(schema.GetColumnType(iCol), out var vecKind, out var itemType, out var isKey); + GetColumnTypeShape(schema.GetColumnType(iCol), out var vecKind, out var itemType, out var isKey); cols.Add(new Column(schema.GetColumnName(iCol), vecKind, itemType, isKey, metadata)); } } diff --git a/src/Microsoft.ML.Core/Data/IFileHandle.cs b/src/Microsoft.ML.Core/Data/IFileHandle.cs index 2b57187250..37b871b7b6 100644 --- a/src/Microsoft.ML.Core/Data/IFileHandle.cs +++ b/src/Microsoft.ML.Core/Data/IFileHandle.cs @@ -61,7 +61,7 @@ public sealed class SimpleFileHandle : IFileHandle // handle has been disposed. private List _streams; - private bool IsDisposed { get { return _streams == null; } } + private bool IsDisposed => _streams == null; public SimpleFileHandle(IExceptionContext ectx, string path, bool needsWrite, bool autoDelete) { @@ -84,15 +84,9 @@ public SimpleFileHandle(IExceptionContext ectx, string path, bool needsWrite, bo _streams = new List(); } - public bool CanWrite - { - get { return !_wrote && !IsDisposed; } - } + public bool CanWrite => !_wrote && !IsDisposed; - public bool CanRead - { - get { return _wrote && !IsDisposed; } - } + public bool CanRead => _wrote && !IsDisposed; public void Dispose() { diff --git a/src/Microsoft.ML.Core/Data/IHostEnvironment.cs b/src/Microsoft.ML.Core/Data/IHostEnvironment.cs index 0b8c097e7d..eb0d57845c 100644 --- a/src/Microsoft.ML.Core/Data/IHostEnvironment.cs +++ b/src/Microsoft.ML.Core/Data/IHostEnvironment.cs @@ -72,6 +72,8 @@ public interface IHostEnvironment : IChannelProvider, IProgressChannelProvider /// The suffix and prefix are optional. A common use for suffix is to specify an extension, eg, ".txt". /// The use of suffix and prefix, including whether they have any affect, is up to the host environment. /// + [Obsolete("The host environment is not disposable, so it is inappropriate to use this method. " + + "Please handle your own temporary files within the component yourself, including their proper disposal and deletion.")] IFileHandle CreateTempFile(string suffix = null, string prefix = null); /// @@ -188,7 +190,8 @@ public readonly struct ChannelMessage /// public string Message => _args != null ? string.Format(_message, _args) : _message; - public ChannelMessage(ChannelMessageKind kind, MessageSensitivity sensitivity, string message) + [BestFriend] + internal ChannelMessage(ChannelMessageKind kind, MessageSensitivity sensitivity, string message) { Contracts.CheckNonEmpty(message, nameof(message)); Kind = kind; @@ -197,7 +200,8 @@ public ChannelMessage(ChannelMessageKind kind, MessageSensitivity sensitivity, s _args = null; } - public ChannelMessage(ChannelMessageKind kind, MessageSensitivity sensitivity, string fmt, params object[] args) + [BestFriend] + internal ChannelMessage(ChannelMessageKind kind, MessageSensitivity sensitivity, string fmt, params object[] args) { Contracts.CheckNonEmpty(fmt, nameof(fmt)); Contracts.CheckNonEmpty(args, nameof(args)); diff --git a/src/Microsoft.ML.Core/Data/ITrainerArguments.cs b/src/Microsoft.ML.Core/Data/ITrainerArguments.cs deleted file mode 100644 index e4fdbbdc59..0000000000 --- a/src/Microsoft.ML.Core/Data/ITrainerArguments.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace Microsoft.ML.Runtime -{ - // This is basically a no-op interface put in primarily - // for backward binary compat support for AFx. - // REVIEW: This interface was removed in TLC 3.0 as part of the - // deprecation of the *Factory interfaces, but added back as a temporary - // hack. Remove it asap. - public interface ITrainerArguments - { - } -} diff --git a/src/Microsoft.ML.Core/Data/LinkedRootCursorBase.cs b/src/Microsoft.ML.Core/Data/LinkedRootCursorBase.cs index 20f84c6e24..ecec0b1a0d 100644 --- a/src/Microsoft.ML.Core/Data/LinkedRootCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/LinkedRootCursorBase.cs @@ -8,7 +8,8 @@ namespace Microsoft.ML.Runtime.Data /// Base class for a cursor has an input cursor, but still needs to do work on /// MoveNext/MoveMany. /// - public abstract class LinkedRootCursorBase : RootCursorBase + [BestFriend] + internal abstract class LinkedRootCursorBase : RootCursorBase where TInput : class, ICursor { private readonly ICursor _root; diff --git a/src/Microsoft.ML.Core/Data/LinkedRowFilterCursorBase.cs b/src/Microsoft.ML.Core/Data/LinkedRowFilterCursorBase.cs index 4a07bbd47b..22ade4a983 100644 --- a/src/Microsoft.ML.Core/Data/LinkedRowFilterCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/LinkedRowFilterCursorBase.cs @@ -7,7 +7,8 @@ namespace Microsoft.ML.Runtime.Data /// /// Base class for creating a cursor of rows that filters out some input rows. /// - public abstract class LinkedRowFilterCursorBase : LinkedRowRootCursorBase + [BestFriend] + internal abstract class LinkedRowFilterCursorBase : LinkedRowRootCursorBase { public override long Batch => Input.Batch; diff --git a/src/Microsoft.ML.Core/Data/LinkedRowRootCursorBase.cs b/src/Microsoft.ML.Core/Data/LinkedRowRootCursorBase.cs index f4b7a4da67..7874686797 100644 --- a/src/Microsoft.ML.Core/Data/LinkedRowRootCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/LinkedRowRootCursorBase.cs @@ -10,7 +10,8 @@ namespace Microsoft.ML.Runtime.Data /// that the default assumes /// that each input column is exposed as an output column with the same column index. /// - public abstract class LinkedRowRootCursorBase : LinkedRootCursorBase, IRowCursor + [BestFriend] + internal abstract class LinkedRowRootCursorBase : LinkedRootCursorBase, IRowCursor { private readonly bool[] _active; diff --git a/src/Microsoft.ML.Core/Data/MetadataUtils.cs b/src/Microsoft.ML.Core/Data/MetadataUtils.cs index ee70bc732a..72fc34e085 100644 --- a/src/Microsoft.ML.Core/Data/MetadataUtils.cs +++ b/src/Microsoft.ML.Core/Data/MetadataUtils.cs @@ -63,11 +63,6 @@ public static class Kinds /// public const string IsUserVisible = "IsUserVisible"; - /// - /// Metadata kind that indicates if a column has missing values. The value is typically a Bool to allow for unknown status. - /// - public const string HasMissingValues = "HasMissingValues"; - /// /// Metadata kind for the label values used in training to be used for the predicted label. /// The value is typically a fixed-sized vector of Text. @@ -318,12 +313,14 @@ public static void GetSlotNames(RoleMappedSchema schema, RoleMappedSchema.Column IReadOnlyList list; if ((list = schema?.GetColumns(role)) == null || list.Count != 1 || !schema.Schema.HasSlotNames(list[0].Index, vectorSize)) - slotNames = new VBuffer>(vectorSize, 0, slotNames.Values, slotNames.Indices); + { + VBufferUtils.Resize(ref slotNames, vectorSize, 0); + } else schema.Schema.GetMetadata(Kinds.SlotNames, list[0].Index, ref slotNames); } - public static bool HasKeyNames(this Schema schema, int col, int keyCount) + public static bool HasKeyValues(this Schema schema, int col, int keyCount) { if (keyCount == 0) return false; @@ -336,6 +333,14 @@ public static bool HasKeyNames(this Schema schema, int col, int keyCount) && type.ItemType.IsText; } + [BestFriend] + internal static bool HasKeyValues(this SchemaShape.Column col) + { + return col.Metadata.TryFindColumn(Kinds.KeyValues, out var metaCol) + && metaCol.Kind == SchemaShape.Column.VectorKind.Vector + && metaCol.ItemType.IsText; + } + /// /// Returns whether a column has the metadata set to true. /// That metadata should be set when the data has undergone transforms that would render it @@ -447,21 +452,22 @@ public static bool TryGetCategoricalFeatureIndices(Schema schema, int colIndex, { int previousEndIndex = -1; isValid = true; - for (int i = 0; i < catIndices.Values.Length; i += 2) + var catIndicesValues = catIndices.GetValues(); + for (int i = 0; i < catIndicesValues.Length; i += 2) { - if (catIndices.Values[i] > catIndices.Values[i + 1] || - catIndices.Values[i] <= previousEndIndex || - catIndices.Values[i] >= columnSlotsCount || - catIndices.Values[i + 1] >= columnSlotsCount) + if (catIndicesValues[i] > catIndicesValues[i + 1] || + catIndicesValues[i] <= previousEndIndex || + catIndicesValues[i] >= columnSlotsCount || + catIndicesValues[i + 1] >= columnSlotsCount) { isValid = false; break; } - previousEndIndex = catIndices.Values[i + 1]; + previousEndIndex = catIndicesValues[i + 1]; } if (isValid) - categoricalFeatures = catIndices.Values.Select(val => val).ToArray(); + categoricalFeatures = catIndicesValues.ToArray(); } } diff --git a/src/Microsoft.ML.Core/Data/ProgressReporter.cs b/src/Microsoft.ML.Core/Data/ProgressReporter.cs index f7741b462c..191364e2a3 100644 --- a/src/Microsoft.ML.Core/Data/ProgressReporter.cs +++ b/src/Microsoft.ML.Core/Data/ProgressReporter.cs @@ -14,7 +14,8 @@ namespace Microsoft.ML.Runtime.Data /// /// The progress reporting classes used by descendants. /// - public static class ProgressReporting + [BestFriend] + internal static class ProgressReporting { /// /// The progress channel for . diff --git a/src/Microsoft.ML.Core/Data/ReadOnlyMemoryUtils.cs b/src/Microsoft.ML.Core/Data/ReadOnlyMemoryUtils.cs index 4b207ab507..20ebb85b04 100644 --- a/src/Microsoft.ML.Core/Data/ReadOnlyMemoryUtils.cs +++ b/src/Microsoft.ML.Core/Data/ReadOnlyMemoryUtils.cs @@ -10,7 +10,8 @@ namespace Microsoft.ML.Runtime.Data { - public static class ReadOnlyMemoryUtils + [BestFriend] + internal static class ReadOnlyMemoryUtils { /// @@ -208,18 +209,6 @@ public static ReadOnlyMemory TrimEndWhiteSpace(ReadOnlyMemory memory return memory.Slice(0, ichLim); } - public static NormStr AddToPool(ReadOnlyMemory memory, NormStr.Pool pool) - { - Contracts.CheckValue(pool, nameof(pool)); - return pool.Add(memory); - } - - public static NormStr FindInPool(ReadOnlyMemory memory, NormStr.Pool pool) - { - Contracts.CheckValue(pool, nameof(pool)); - return pool.Get(memory); - } - public static void AddLowerCaseToStringBuilder(ReadOnlySpan span, StringBuilder sb) { Contracts.CheckValue(sb, nameof(sb)); @@ -265,5 +254,18 @@ public static StringBuilder AppendSpan(this StringBuilder sb, ReadOnlySpan return sb; } + + public sealed class ReadonlyMemoryCharComparer : IEqualityComparer> + { + public bool Equals(ReadOnlyMemory x, ReadOnlyMemory y) + { + return x.Span.SequenceEqual(y.Span); + } + + public int GetHashCode(ReadOnlyMemory obj) + { + return (int)Hashing.HashString(obj.Span); + } + } } } diff --git a/src/Microsoft.ML.Core/Data/RootCursorBase.cs b/src/Microsoft.ML.Core/Data/RootCursorBase.cs index 73be098e0f..5b64a40d6a 100644 --- a/src/Microsoft.ML.Core/Data/RootCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/RootCursorBase.cs @@ -17,7 +17,8 @@ namespace Microsoft.ML.Runtime.Data /// that has an input cursor and does NOT need notification on /, /// use . /// - public abstract class RootCursorBase : ICursor + [BestFriend] + internal abstract class RootCursorBase : ICursor { protected readonly IChannel Ch; diff --git a/src/Microsoft.ML.Core/Data/ServerChannel.cs b/src/Microsoft.ML.Core/Data/ServerChannel.cs index b11e962ab2..a9b33d1986 100644 --- a/src/Microsoft.ML.Core/Data/ServerChannel.cs +++ b/src/Microsoft.ML.Core/Data/ServerChannel.cs @@ -19,7 +19,8 @@ namespace Microsoft.ML.Runtime /// delegates will be published in some fashion, with the target scenario being /// that the library will publish some sort of restful API. /// - public sealed class ServerChannel : ServerChannel.IPendingBundleNotification, IDisposable + [BestFriend] + internal sealed class ServerChannel : ServerChannel.IPendingBundleNotification, IDisposable { // See ServerChannel.md for a more elaborate discussion of high level usage and design. private readonly IChannelProvider _chp; @@ -250,7 +251,8 @@ public void AddDoneAction(Action onDone) } } - public static class ServerChannelUtilities + [BestFriend] + internal static class ServerChannelUtilities { /// /// Convenience method for that looks more idiomatic to typical diff --git a/src/Microsoft.ML.Core/Data/SynchronizedCursorBase.cs b/src/Microsoft.ML.Core/Data/SynchronizedCursorBase.cs index 202c3d8cfd..da60c84ccf 100644 --- a/src/Microsoft.ML.Core/Data/SynchronizedCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/SynchronizedCursorBase.cs @@ -10,7 +10,8 @@ namespace Microsoft.ML.Runtime.Data /// It delegates all ICursor functionality except Dispose() to the root cursor. /// Dispose is virtual with the default implementation delegating to the input cursor. /// - public abstract class SynchronizedCursorBase : ICursor + [BestFriend] + internal abstract class SynchronizedCursorBase : ICursor where TBase : class, ICursor { protected readonly IChannel Ch; diff --git a/src/Microsoft.ML.Core/Data/VBuffer.cs b/src/Microsoft.ML.Core/Data/VBuffer.cs index b5ef6de0ea..a86f0bdae4 100644 --- a/src/Microsoft.ML.Core/Data/VBuffer.cs +++ b/src/Microsoft.ML.Core/Data/VBuffer.cs @@ -16,32 +16,24 @@ namespace Microsoft.ML.Runtime.Data /// public readonly struct VBuffer { - /// - /// The logical length of the buffer. - /// - public readonly int Length; + private readonly T[] _values; + private readonly int[] _indices; /// /// The number of items explicitly represented. This is == Length when the representation /// is dense and < Length when sparse. /// - public readonly int Count; + private readonly int _count; /// - /// The values. Only the first Count of these are valid. - /// - public readonly T[] Values; - - /// - /// The indices. For a dense representation, this array is not used. For a sparse representation - /// it is parallel to values and specifies the logical indices for the corresponding values. + /// The logical length of the buffer. /// - public readonly int[] Indices; + public readonly int Length; /// /// The explicitly represented values. /// - public ReadOnlySpan GetValues() => Values.AsSpan(0, Count); + public ReadOnlySpan GetValues() => _values.AsSpan(0, _count); /// /// The indices. For a dense representation, this array is not used. For a sparse representation @@ -53,17 +45,18 @@ public readonly struct VBuffer /// - non-zeros values 98 and 76 respectively at the 4th and 6th coordinates /// - zeros at all other coordinates /// - public ReadOnlySpan GetIndices() => IsDense ? default : Indices.AsSpan(0, Count); + public ReadOnlySpan GetIndices() => IsDense ? default : _indices.AsSpan(0, _count); /// - /// Equivalent to Count == Length. + /// Gets a value indicating whether every logical element is explicitly + /// represented in the buffer. /// public bool IsDense { get { - Contracts.Assert(Count <= Length); - return Count == Length; + Contracts.Assert(_count <= Length); + return _count == Length; } } @@ -77,9 +70,9 @@ public VBuffer(int length, T[] values, int[] indices = null) Contracts.CheckValueOrNull(indices); Length = length; - Count = length; - Values = values; - Indices = indices; + _count = length; + _values = values; + _indices = indices; } /// @@ -109,9 +102,9 @@ public VBuffer(int length, int count, T[] values, int[] indices) #endif Length = length; - Count = count; - Values = values; - Indices = indices; + _count = count; + _values = values; + _indices = indices; } /// @@ -119,15 +112,14 @@ public VBuffer(int length, int count, T[] values, int[] indices) /// public void CopyToDense(ref VBuffer dst) { - var values = dst.Values; - if (Utils.Size(values) < Length) - values = new T[Length]; + // create a dense editor + var editor = VBufferEditor.Create(ref dst, Length); if (!IsDense) - CopyTo(values); + CopyTo(editor.Values); else if (Length > 0) - Array.Copy(Values, values, Length); - dst = new VBuffer(Length, values, dst.Indices); + _values.AsSpan(0, Length).CopyTo(editor.Values); + dst = editor.Commit(); } /// @@ -135,31 +127,24 @@ public void CopyToDense(ref VBuffer dst) /// public void CopyTo(ref VBuffer dst) { - var values = dst.Values; - var indices = dst.Indices; + var editor = VBufferEditor.Create(ref dst, Length, _count); if (IsDense) { if (Length > 0) { - if (Utils.Size(values) < Length) - values = new T[Length]; - Array.Copy(Values, values, Length); + _values.AsSpan(0, Length).CopyTo(editor.Values); } - dst = new VBuffer(Length, values, indices); + dst = editor.Commit(); Contracts.Assert(dst.IsDense); } else { - if (Count > 0) + if (_count > 0) { - if (Utils.Size(values) < Count) - values = new T[Count]; - if (Utils.Size(indices) < Count) - indices = new int[Count]; - Array.Copy(Values, values, Count); - Array.Copy(Indices, indices, Count); + _values.AsSpan(0, _count).CopyTo(editor.Values); + _indices.AsSpan(0, _count).CopyTo(editor.Indices); } - dst = new VBuffer(Length, Count, values, indices); + dst = editor.Commit(); } } @@ -170,255 +155,81 @@ public void CopyTo(ref VBuffer dst, int srcMin, int length) { Contracts.Check(0 <= srcMin && srcMin <= Length, "srcMin"); Contracts.Check(0 <= length && srcMin <= Length - length, "length"); - var values = dst.Values; - var indices = dst.Indices; + if (IsDense) { + var editor = VBufferEditor.Create(ref dst, length, length); if (length > 0) { - if (Utils.Size(values) < length) - values = new T[length]; - Array.Copy(Values, srcMin, values, 0, length); + _values.AsSpan(srcMin, length).CopyTo(editor.Values); } - dst = new VBuffer(length, values, indices); + dst = editor.Commit(); Contracts.Assert(dst.IsDense); } else { int copyCount = 0; - if (Count > 0) + if (_count > 0) { - int copyMin = Indices.FindIndexSorted(0, Count, srcMin); - int copyLim = Indices.FindIndexSorted(copyMin, Count, srcMin + length); + int copyMin = _indices.FindIndexSorted(0, _count, srcMin); + int copyLim = _indices.FindIndexSorted(copyMin, _count, srcMin + length); Contracts.Assert(copyMin <= copyLim); copyCount = copyLim - copyMin; + var editor = VBufferEditor.Create(ref dst, length, copyCount); if (copyCount > 0) { - if (Utils.Size(values) < copyCount) - values = new T[copyCount]; - Array.Copy(Values, copyMin, values, 0, copyCount); + _values.AsSpan(copyMin, copyCount).CopyTo(editor.Values); if (copyCount < length) { - if (Utils.Size(indices) < copyCount) - indices = new int[copyCount]; for (int i = 0; i < copyCount; ++i) - indices[i] = Indices[i + copyMin] - srcMin; - } - } - } - dst = new VBuffer(length, copyCount, values, indices); - } - } - - /// - /// Copy from this buffer to the given destination, making sure to explicitly include the - /// first count indices in indicesInclude. Note that indicesInclude should be sorted - /// with each index less than this.Length. Note that this can make the destination be - /// dense even if "this" is sparse. - /// - public void CopyTo(ref VBuffer dst, int[] indicesInclude, int count) - { - Contracts.CheckParam(count >= 0, nameof(count)); - Contracts.CheckParam(Utils.Size(indicesInclude) >= count, nameof(indicesInclude)); - Contracts.CheckParam(Utils.Size(indicesInclude) <= Length, nameof(indicesInclude)); - - // REVIEW: Ideally we should Check that indicesInclude is sorted and in range. Would that - // check be too expensive? -#if DEBUG - int prev = -1; - for (int i = 0; i < count; i++) - { - Contracts.Assert(prev < indicesInclude[i]); - prev = indicesInclude[i]; - } - Contracts.Assert(prev < Length); -#endif - - if (IsDense || count == 0) - { - CopyTo(ref dst); - return; - } - - if (count >= Length / 2 || Count >= Length / 2) - { - CopyToDense(ref dst); - return; - } - - var indices = dst.Indices; - var values = dst.Values; - if (Count == 0) - { - // No values in "this". - if (Utils.Size(indices) < count) - indices = new int[count]; - Array.Copy(indicesInclude, indices, count); - if (Utils.Size(values) < count) - values = new T[count]; - else - Array.Clear(values, 0, count); - dst = new VBuffer(Length, count, values, indices); - return; - } - - int size = 0; - int max = count + Count; - Contracts.Assert(max < Length); - int ii1; - int ii2; - if (max >= Length / 2 || Utils.Size(values) < max || Utils.Size(indices) < max) - { - // Compute the needed size. - ii1 = 0; - ii2 = 0; - for (; ; ) - { - Contracts.Assert(ii1 < Count); - Contracts.Assert(ii2 < count); - size++; - int diff = Indices[ii1] - indicesInclude[ii2]; - if (diff == 0) - { - ii1++; - ii2++; - if (ii1 >= Count) - { - size += count - ii2; - break; - } - if (ii2 >= count) - { - size += Count - ii1; - break; - } - } - else if (diff < 0) - { - if (++ii1 >= Count) - { - size += count - ii2; - break; + editor.Indices[i] = _indices[i + copyMin] - srcMin; } } - else - { - if (++ii2 >= count) - { - size += Count - ii1; - break; - } - } - } - Contracts.Assert(size >= count && size >= Count); - - if (size == Count) - { - CopyTo(ref dst); - return; - } - - if (size >= Length / 2) - { - CopyToDense(ref dst); - return; - } - - if (Utils.Size(values) < size) - values = new T[size]; - if (Utils.Size(indices) < size) - indices = new int[size]; - max = size; - } - - int ii = 0; - ii1 = 0; - ii2 = 0; - for (; ; ) - { - Contracts.Assert(ii < max); - Contracts.Assert(ii1 < Count); - Contracts.Assert(ii2 < count); - int i1 = Indices[ii1]; - int i2 = indicesInclude[ii2]; - if (i1 <= i2) - { - indices[ii] = i1; - values[ii] = Values[ii1]; - ii++; - if (i1 == i2) - ii2++; - if (++ii1 >= Count) - { - if (ii2 >= count) - break; - Array.Clear(values, ii, count - ii2); - Array.Copy(indicesInclude, ii2, indices, ii, count - ii2); - ii += count - ii2; - break; - } - if (ii2 >= count) - { - Array.Copy(Values, ii1, values, ii, Count - ii1); - Array.Copy(Indices, ii1, indices, ii, Count - ii1); - ii += Count - ii1; - break; - } + dst = editor.Commit(); } else { - indices[ii] = i2; - values[ii] = default(T); - ii++; - if (++ii2 >= count) - { - Array.Copy(Values, ii1, values, ii, Count - ii1); - Array.Copy(Indices, ii1, indices, ii, Count - ii1); - ii += Count - ii1; - break; - } + var editor = VBufferEditor.Create(ref dst, length, copyCount); + dst = editor.Commit(); } } - Contracts.Assert(size == ii || size == 0); - - dst = new VBuffer(Length, ii, values, indices); } /// /// Copy from this buffer to the given destination array. This "densifies". /// - public void CopyTo(T[] dst) + public void CopyTo(Span dst) { CopyTo(dst, 0); } - public void CopyTo(T[] dst, int ivDst, T defaultValue = default(T)) + public void CopyTo(Span dst, int ivDst, T defaultValue = default(T)) { - Contracts.CheckParam(0 <= ivDst && ivDst <= Utils.Size(dst) - Length, nameof(dst), "dst is not large enough"); + Contracts.CheckParam(0 <= ivDst && ivDst <= dst.Length - Length, nameof(dst), "dst is not large enough"); if (Length == 0) return; if (IsDense) { - Array.Copy(Values, 0, dst, ivDst, Length); + _values.AsSpan(0, Length).CopyTo(dst.Slice(ivDst)); return; } - if (Count == 0) + if (_count == 0) { - Array.Clear(dst, ivDst, Length); + dst.Slice(ivDst, Length).Clear(); return; } int iv = 0; - for (int islot = 0; islot < Count; islot++) + for (int islot = 0; islot < _count; islot++) { - int slot = Indices[islot]; + int slot = _indices[islot]; Contracts.Assert(slot >= iv); while (iv < slot) dst[ivDst + iv++] = defaultValue; Contracts.Assert(iv == slot); - dst[ivDst + iv++] = Values[islot]; + dst[ivDst + iv++] = _values[islot]; } while (iv < Length) dst[ivDst + iv++] = defaultValue; @@ -431,24 +242,22 @@ public static void Copy(T[] src, int srcIndex, ref VBuffer dst, int length) { Contracts.CheckParam(0 <= length && length <= Utils.Size(src), nameof(length)); Contracts.CheckParam(0 <= srcIndex && srcIndex <= Utils.Size(src) - length, nameof(srcIndex)); - var values = dst.Values; + var editor = VBufferEditor.Create(ref dst, length, length); if (length > 0) { - if (Utils.Size(values) < length) - values = new T[length]; - Array.Copy(src, srcIndex, values, 0, length); + src.AsSpan(srcIndex, length).CopyTo(editor.Values); } - dst = new VBuffer(length, values, dst.Indices); + dst = editor.Commit(); } public IEnumerable> Items(bool all = false) { - return VBufferUtils.Items(Values, Indices, Length, Count, all); + return VBufferUtils.Items(_values, _indices, Length, _count, all); } public IEnumerable DenseValues() { - return VBufferUtils.DenseValues(Values, Indices, Length, Count); + return VBufferUtils.DenseValues(_values, _indices, Length, _count); } public void GetItemOrDefault(int slot, ref T dst) @@ -457,9 +266,9 @@ public void GetItemOrDefault(int slot, ref T dst) int index; if (IsDense) - dst = Values[slot]; - else if (Count > 0 && Indices.TryFindIndexSorted(0, Count, slot, out index)) - dst = Values[index]; + dst = _values[slot]; + else if (_count > 0 && _indices.TryFindIndexSorted(0, _count, slot, out index)) + dst = _values[index]; else dst = default(T); } @@ -470,13 +279,56 @@ public T GetItemOrDefault(int slot) int index; if (IsDense) - return Values[slot]; - if (Count > 0 && Indices.TryFindIndexSorted(0, Count, slot, out index)) - return Values[index]; + return _values[slot]; + if (_count > 0 && _indices.TryFindIndexSorted(0, _count, slot, out index)) + return _values[index]; return default(T); } public override string ToString() - => IsDense ? $"Dense vector of size {Length}" : $"Sparse vector of size {Length}, {Count} explicit values"; + => IsDense ? $"Dense vector of size {Length}" : $"Sparse vector of size {Length}, {_count} explicit values"; + + internal VBufferEditor GetEditor() + { + return GetEditor(Length, _count); + } + + internal VBufferEditor GetEditor( + int newLogicalLength, + int? valuesCount, + int maxCapacity = Utils.ArrayMaxSize, + bool keepOldOnResize = false, + bool requireIndicesOnDense = false) + { + Contracts.CheckParam(newLogicalLength >= 0, nameof(newLogicalLength)); + Contracts.CheckParam(valuesCount == null || valuesCount.Value <= newLogicalLength, nameof(valuesCount)); + + valuesCount = valuesCount ?? newLogicalLength; + + T[] values = _values; + bool createdNewValues; + Utils.EnsureSize(ref values, valuesCount.Value, maxCapacity, keepOldOnResize, out createdNewValues); + + int[] indices = _indices; + bool isDense = newLogicalLength == valuesCount.Value; + bool createdNewIndices; + if (isDense && !requireIndicesOnDense) + { + createdNewIndices = false; + } + else + { + Utils.EnsureSize(ref indices, valuesCount.Value, maxCapacity, keepOldOnResize, out createdNewIndices); + } + + return new VBufferEditor( + newLogicalLength, + valuesCount.Value, + values, + indices, + requireIndicesOnDense, + createdNewValues, + createdNewIndices); + } } -} +} \ No newline at end of file diff --git a/src/Microsoft.ML.Core/Data/VBufferEditor.cs b/src/Microsoft.ML.Core/Data/VBufferEditor.cs new file mode 100644 index 0000000000..8da19b641f --- /dev/null +++ b/src/Microsoft.ML.Core/Data/VBufferEditor.cs @@ -0,0 +1,160 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; + +namespace Microsoft.ML.Runtime.Data +{ + /// + /// Various methods for creating instances. + /// + public static class VBufferEditor + { + /// + /// Creates a with the same shape + /// (length and density) as the . + /// + public static VBufferEditor CreateFromBuffer( + ref VBuffer destination) + { + return destination.GetEditor(); + } + + /// + /// Creates a using + /// 's values and indices buffers. + /// + /// + /// The destination buffer. + /// + /// + /// The logical length of the new buffer being edited. + /// + /// + /// The optional number of physical values to be represented in the buffer. + /// The buffer will be dense if is omitted. + /// + /// + /// True means that the old buffer values and indices are preserved, if possible (Array.Resize is called). + /// False means that a new array will be allocated, if necessary. + /// + /// + /// True means to ensure the Indices buffer is available, even if the buffer will be dense. + /// + public static VBufferEditor Create( + ref VBuffer destination, + int newLogicalLength, + int? valuesCount = null, + bool keepOldOnResize = false, + bool requireIndicesOnDense = false) + { + return destination.GetEditor( + newLogicalLength, + valuesCount, + keepOldOnResize: keepOldOnResize, + requireIndicesOnDense: requireIndicesOnDense); + } + + internal static VBufferEditor Create( + ref VBuffer destination, + int newLogicalLength, + int valuesCount, + int maxValuesCapacity) + { + return destination.GetEditor( + newLogicalLength, + valuesCount, + maxValuesCapacity); + } + } + + /// + /// An object capable of editing a by filling out + /// (and if the buffer is not dense). + /// + public readonly ref struct VBufferEditor + { + private readonly int _logicalLength; + private readonly T[] _values; + private readonly int[] _indices; + + /// + /// The mutable span of values. + /// + public readonly Span Values; + + /// + /// The mutable span of indices. + /// + public readonly Span Indices; + + /// + /// Gets a value indicating whether a new Values array was allocated. + /// + public bool CreatedNewValues { get; } + + /// + /// Gets a value indicating whether a new Indices array was allocated. + /// + public bool CreatedNewIndices { get; } + + internal VBufferEditor(int logicalLength, + int physicalValuesCount, + T[] values, + int[] indices, + bool requireIndicesOnDense, + bool createdNewValues, + bool createdNewIndices) + { + _logicalLength = logicalLength; + _values = values; + _indices = indices; + + bool isDense = logicalLength == physicalValuesCount; + + Values = _values.AsSpan(0, physicalValuesCount); + Indices = !isDense || requireIndicesOnDense ? _indices.AsSpan(0, physicalValuesCount) : default; + + CreatedNewValues = createdNewValues; + CreatedNewIndices = createdNewIndices; + } + + /// + /// Commits the edits and creates a new using + /// the current Values and Indices. + /// + /// + /// The newly created . + /// + public VBuffer Commit() + { + return new VBuffer(_logicalLength, Values.Length, _values, _indices); + } + + /// + /// Commits the edits and creates a new using + /// the current Values and Indices, while allowing to truncate the length + /// of Values and Indices. + /// + /// + /// The new number of physical values to be represented in the created buffer. + /// + /// + /// The newly created . + /// + /// + /// CommitTruncated allows to modify the length of the explicitly + /// defined values. + /// This is useful in sparse situations where the + /// was created with a larger physical value count than was needed + /// because the final value count was not known at creation time. + /// + public VBuffer CommitTruncated(int physicalValuesCount) + { + Contracts.CheckParam(physicalValuesCount <= Values.Length, nameof(physicalValuesCount), "Updating physicalValuesCount during CommitTruncated cannot be greater than the original physicalValuesCount value used in Create."); + + return new VBuffer(_logicalLength, physicalValuesCount, _values, _indices); + } + } +} diff --git a/src/Microsoft.ML.Core/EntryPoints/EntryPointModuleAttribute.cs b/src/Microsoft.ML.Core/EntryPoints/EntryPointModuleAttribute.cs index 79a8c028ef..0163222fc1 100644 --- a/src/Microsoft.ML.Core/EntryPoints/EntryPointModuleAttribute.cs +++ b/src/Microsoft.ML.Core/EntryPoints/EntryPointModuleAttribute.cs @@ -9,13 +9,15 @@ namespace Microsoft.ML.Runtime.EntryPoints /// /// This is a signature for classes that are 'holders' of entry points and components. /// - public delegate void SignatureEntryPointModule(); + [BestFriend] + internal delegate void SignatureEntryPointModule(); /// /// A simplified assembly attribute for marking EntryPoint modules. /// [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] - public sealed class EntryPointModuleAttribute : LoadableClassAttributeBase + [BestFriend] + internal sealed class EntryPointModuleAttribute : LoadableClassAttributeBase { public EntryPointModuleAttribute(Type loaderType) : base(null, typeof(void), loaderType, null, new[] { typeof(SignatureEntryPointModule) }, loaderType.FullName) diff --git a/src/Microsoft.ML.Core/EntryPoints/EntryPointUtils.cs b/src/Microsoft.ML.Core/EntryPoints/EntryPointUtils.cs index f64c8d0758..c4d4325f79 100644 --- a/src/Microsoft.ML.Core/EntryPoints/EntryPointUtils.cs +++ b/src/Microsoft.ML.Core/EntryPoints/EntryPointUtils.cs @@ -12,7 +12,8 @@ namespace Microsoft.ML.Runtime.EntryPoints { - public static class EntryPointUtils + [BestFriend] + internal static class EntryPointUtils { private static bool IsValueWithinRange(TlcModule.RangeAttribute range, object obj) { diff --git a/src/Microsoft.ML.Core/Data/IMlState.cs b/src/Microsoft.ML.Core/EntryPoints/IMlState.cs similarity index 98% rename from src/Microsoft.ML.Core/Data/IMlState.cs rename to src/Microsoft.ML.Core/EntryPoints/IMlState.cs index 52b0828256..41ea062861 100644 --- a/src/Microsoft.ML.Core/Data/IMlState.cs +++ b/src/Microsoft.ML.Core/EntryPoints/IMlState.cs @@ -10,5 +10,5 @@ namespace Microsoft.ML.Runtime.EntryPoints /// black box to the graph. The macro itself will then case to the concrete type. /// public interface IMlState - {} + { } } \ No newline at end of file diff --git a/src/Microsoft.ML.Core/Data/IPredictorModel.cs b/src/Microsoft.ML.Core/EntryPoints/IPredictorModel.cs similarity index 100% rename from src/Microsoft.ML.Core/Data/IPredictorModel.cs rename to src/Microsoft.ML.Core/EntryPoints/IPredictorModel.cs diff --git a/src/Microsoft.ML.Core/EntryPoints/ModuleArgs.cs b/src/Microsoft.ML.Core/EntryPoints/ModuleArgs.cs index 4dc02993d2..d538f636ce 100644 --- a/src/Microsoft.ML.Core/EntryPoints/ModuleArgs.cs +++ b/src/Microsoft.ML.Core/EntryPoints/ModuleArgs.cs @@ -18,7 +18,8 @@ namespace Microsoft.ML.Runtime.EntryPoints /// This class defines attributes to annotate module inputs, outputs, entry points etc. when defining /// the module interface. /// - public static class TlcModule + [BestFriend] + internal static class TlcModule { /// /// An attribute used to annotate the component. diff --git a/src/Microsoft.ML.Core/Environment/ConsoleEnvironment.cs b/src/Microsoft.ML.Core/Environment/ConsoleEnvironment.cs index e683a42413..3e27ce2516 100644 --- a/src/Microsoft.ML.Core/Environment/ConsoleEnvironment.cs +++ b/src/Microsoft.ML.Core/Environment/ConsoleEnvironment.cs @@ -5,8 +5,6 @@ #pragma warning disable 420 // volatile with Interlocked.CompareExchange using System; -using System.Collections.Concurrent; -using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading; @@ -15,7 +13,12 @@ namespace Microsoft.ML.Runtime.Data { using Stopwatch = System.Diagnostics.Stopwatch; - public sealed class ConsoleEnvironment : HostEnvironmentBase + /// + /// The console environment. As its name suggests, should be limited to those applications that deliberately want + /// console functionality. + /// + [BestFriend] + internal sealed class ConsoleEnvironment : HostEnvironmentBase { public const string ComponentHistoryKey = "ComponentHistory"; diff --git a/src/Microsoft.ML.Core/Environment/HostEnvironmentBase.cs b/src/Microsoft.ML.Core/Environment/HostEnvironmentBase.cs index 6cfb4157be..31ab23e28f 100644 --- a/src/Microsoft.ML.Core/Environment/HostEnvironmentBase.cs +++ b/src/Microsoft.ML.Core/Environment/HostEnvironmentBase.cs @@ -15,7 +15,8 @@ namespace Microsoft.ML.Runtime.Data /// Base class for channel providers. This is a common base class for. /// The ParentFullName, ShortName, and FullName may be null or empty. /// - public abstract class ChannelProviderBase : IExceptionContext + [BestFriend] + internal abstract class ChannelProviderBase : IExceptionContext { /// /// Data keys that are attached to the exception thrown via the exception context. @@ -79,42 +80,22 @@ public virtual TException Process(TException ex) /// /// Message source (a channel) that generated the message being dispatched. /// - public interface IMessageSource + [BestFriend] + internal interface IMessageSource { string ShortName { get; } string FullName { get; } bool Verbose { get; } } - /// - /// A that is also a channel listener can attach - /// listeners for messages, as sent through . - /// - public interface IMessageDispatcher : IHostEnvironment - { - /// - /// Listen on this environment to messages of a particular type. - /// - /// The message type - /// The action to perform when a message of the - /// appropriate type is received. - void AddListener(Action listenerFunc); - - /// - /// Removes a previously added listener. - /// - /// The message type - /// The previous listener function that is now being removed. - void RemoveListener(Action listenerFunc); - } - /// /// A basic host environment suited for many environments. /// This also supports modifying the concurrency factor, provides the ability to subscribe to pipes via the /// AddListener/RemoveListener methods, and exposes the to /// query progress. /// - public abstract class HostEnvironmentBase : ChannelProviderBase, IHostEnvironment, IDisposable, IChannelProvider, IMessageDispatcher + [BestFriend] + internal abstract class HostEnvironmentBase : ChannelProviderBase, IHostEnvironment, IDisposable, IChannelProvider where TEnv : HostEnvironmentBase { /// diff --git a/src/Microsoft.ML.Core/Environment/TelemetryMessage.cs b/src/Microsoft.ML.Core/Environment/TelemetryMessage.cs index ebd7d41486..72b08e2715 100644 --- a/src/Microsoft.ML.Core/Environment/TelemetryMessage.cs +++ b/src/Microsoft.ML.Core/Environment/TelemetryMessage.cs @@ -13,7 +13,8 @@ namespace Microsoft.ML.Runtime /// /// A telemetry message. /// - public abstract class TelemetryMessage + [BestFriend] + internal abstract class TelemetryMessage { public static TelemetryMessage CreateCommand(string commandName, string commandText) { @@ -40,7 +41,8 @@ public static TelemetryMessage CreateException(Exception exception) /// /// Message with one long text and bunch of small properties (limit on value is ~1020 chars) /// - public sealed class TelemetryTrace : TelemetryMessage + [BestFriend] + internal sealed class TelemetryTrace : TelemetryMessage { public readonly string Text; public readonly string Name; @@ -57,7 +59,8 @@ public TelemetryTrace(string text, string name, string type) /// /// Message with exception /// - public sealed class TelemetryException : TelemetryMessage + [BestFriend] + internal sealed class TelemetryException : TelemetryMessage { public readonly Exception Exception; public TelemetryException(Exception exception) @@ -70,7 +73,8 @@ public TelemetryException(Exception exception) /// /// Message with metric value and it properites /// - public sealed class TelemetryMetric : TelemetryMessage + [BestFriend] + internal sealed class TelemetryMetric : TelemetryMessage { public readonly string Name; public readonly double Value; diff --git a/src/Microsoft.ML.Core/Prediction/IPredictor.cs b/src/Microsoft.ML.Core/Prediction/IPredictor.cs index d88b81d558..6bd1ac2056 100644 --- a/src/Microsoft.ML.Core/Prediction/IPredictor.cs +++ b/src/Microsoft.ML.Core/Prediction/IPredictor.cs @@ -69,94 +69,4 @@ public interface IPredictor : IPredictorProducing : IPredictorProducing { } - - /// - /// Predictor that returns a probability distribution associated with a prediction result - /// - /// Type of features container (instance) on which to make predictions - /// Type of prediction result - /// Type of probability distribution associated with the predicton - public interface IDistributionPredictor - : IDistPredictorProducing, IPredictor - { - /// - /// Return a probability distribution associated wtih the prediction. - /// - /// Data instance - /// Distribution associated with the prediction - TResultDistribution PredictDistribution(TFeatures features); - - /// - /// Return a probability distribution associated wtih the prediction, as well as the prediction. - /// - /// Data instance - /// Prediction - /// Distribution associated with the prediction - TResultDistribution PredictDistribution(TFeatures features, out TResult result); - } - - /// - /// Predictor that produces predictions for sets of instances at a time - /// for cases where this is more efficient than serial calls to Predict for each instance. - /// - /// Type of features container (instance) on which to make predictions - /// Type of collection of instances - /// Type of prediction result - /// Type of the collection of prediction results - public interface IBulkPredictor - : IPredictor - { - /// - /// Produce predictions for a set of instances - /// - /// Collection of instances - /// Collection of predictions - TResultCollection BulkPredict(TFeaturesCollection featuresCollection); - } - - /// - /// Predictor that can score sets of instances (presumably more efficiently) - /// and returns a distribution associated with a prediction result. - /// - /// Type of features container (instance) on which to make predictions - /// Type of collection of instances - /// Type of prediction result - /// Type of probability distribution associated with the predicton - /// Type of the collection of prediction results - /// Type of the collection of distributions for prediction results - public interface IBulkDistributionPredictor - : IBulkPredictor, - IDistributionPredictor - { - /// - /// Produce distributions over predictions for a set of instances - /// - /// Collection of instances - /// Collection of prediction distributions - TResultDistributionCollection BulkPredictDistribution(TFeaturesCollection featuresCollection); - - /// - /// Produce distributions over predictions for a set of instances, along with actual prediction results - /// - /// Collection of instances - /// Collection of prediction results - /// Collection of distributions associated with prediction results - TResultDistributionCollection BulkPredictDistribution(TFeaturesCollection featuresCollection, - out TResultCollection resultCollection); - } - -#if FUTURE - public interface IBulkPredictor : - IPredictor - { - // REVIEW: Should we also have versions where the caller supplies the "memory" to be filled in. - TResultSet BulkPredict(TTestDataSet dataset); - } - - public interface IBulkPredictor - : IBulkPredictor, IPredictor - { - } -#endif } diff --git a/src/Microsoft.ML.Core/Prediction/ITrainer.cs b/src/Microsoft.ML.Core/Prediction/ITrainer.cs index 7eca991b5c..5e796aa602 100644 --- a/src/Microsoft.ML.Core/Prediction/ITrainer.cs +++ b/src/Microsoft.ML.Core/Prediction/ITrainer.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Runtime.Data; +using System; namespace Microsoft.ML.Runtime { @@ -13,25 +14,34 @@ namespace Microsoft.ML.Runtime /// Loadable class signatures for trainers. Typically each trainer should register with /// both SignatureTrainer and SignatureXxxTrainer where Xxx is the prediction kind. /// - public delegate void SignatureTrainer(); + [BestFriend] + internal delegate void SignatureTrainer(); - public delegate void SignatureBinaryClassifierTrainer(); - public delegate void SignatureMultiClassClassifierTrainer(); - public delegate void SignatureRegressorTrainer(); - public delegate void SignatureMultiOutputRegressorTrainer(); - public delegate void SignatureRankerTrainer(); - public delegate void SignatureAnomalyDetectorTrainer(); - public delegate void SignatureClusteringTrainer(); - public delegate void SignatureSequenceTrainer(); - public delegate void SignatureMatrixRecommendingTrainer(); - - public delegate void SignatureModelCombiner(PredictionKind kind); + [BestFriend] + internal delegate void SignatureBinaryClassifierTrainer(); + [BestFriend] + internal delegate void SignatureMultiClassClassifierTrainer(); + [BestFriend] + internal delegate void SignatureRegressorTrainer(); + [BestFriend] + internal delegate void SignatureMultiOutputRegressorTrainer(); + [BestFriend] + internal delegate void SignatureRankerTrainer(); + [BestFriend] + internal delegate void SignatureAnomalyDetectorTrainer(); + [BestFriend] + internal delegate void SignatureClusteringTrainer(); + [BestFriend] + internal delegate void SignatureSequenceTrainer(); + [BestFriend] + internal delegate void SignatureMatrixRecommendingTrainer(); /// /// The base interface for a trainers. Implementors should not implement this interface directly, /// but rather implement the more specific . /// - public interface ITrainer + [BestFriend] + internal interface ITrainer { /// /// Auxiliary information about the trainer in terms of its capabilities @@ -58,7 +68,8 @@ public interface ITrainer /// and produces a predictor. /// /// Type of predictor produced - public interface ITrainer : ITrainer + [BestFriend] + internal interface ITrainer : ITrainer where TPredictor : IPredictor { /// @@ -69,7 +80,8 @@ public interface ITrainer : ITrainer new TPredictor Train(TrainContext context); } - public static class TrainerExtensions + [BestFriend] + internal static class TrainerExtensions { /// /// Convenience train extension for the case where one has only a training set with no auxiliary information. diff --git a/src/Microsoft.ML.Core/Prediction/ITree.cs b/src/Microsoft.ML.Core/Prediction/ITree.cs index 9014eadd68..67642ecfc5 100644 --- a/src/Microsoft.ML.Core/Prediction/ITree.cs +++ b/src/Microsoft.ML.Core/Prediction/ITree.cs @@ -7,10 +7,16 @@ namespace Microsoft.ML.Runtime.TreePredictor { + // The interfaces contained herein are meant to allow tree visualizer to run without an explicit dependency + // on FastTree, so as to allow it greater generality. These should probably be moved somewhere else, but where? + // FastTree itself is not a good candidate since their entire purpose was to avoid tying the tree visualizer + // to FastTree itself. They are semi-tolerable though as a set of internal types here. + /// /// Predictor that has ensemble tree structures and returns collection of trees. /// - public interface ITreeEnsemble + [BestFriend] + internal interface ITreeEnsemble { /// /// Returns the number of trees in the ensemble. @@ -27,7 +33,8 @@ public interface ITreeEnsemble /// /// Type of tree used in ensemble of tree based predictors /// - public interface ITree + [BestFriend] + internal interface ITree { /// /// Returns the array of right(Greater than) child nodes of every interior nodes @@ -63,7 +70,8 @@ public interface ITree /// Type of tree used in ensemble of tree based predictors /// /// Type of features container (instance) on which to make predictions - public interface ITree : ITree + [BestFriend] + internal interface ITree : ITree { /// /// Returns the leaf node for the given instance. @@ -77,7 +85,8 @@ public interface ITree : ITree /// /// Type to represent the structure of node /// - public interface INode + [BestFriend] + internal interface INode { /// /// Returns Key value pairs representing the properties of the node. @@ -88,7 +97,8 @@ public interface INode /// /// Keys to represent the properties of node. /// - public static class NodeKeys + [BestFriend] + internal static class NodeKeys { /// /// Name of the the interior node. It is Feature name if it is fasttree. Type is string for default trees. diff --git a/src/Microsoft.ML.Core/Prediction/TrainContext.cs b/src/Microsoft.ML.Core/Prediction/TrainContext.cs index be93ce68aa..e5e4bbad1c 100644 --- a/src/Microsoft.ML.Core/Prediction/TrainContext.cs +++ b/src/Microsoft.ML.Core/Prediction/TrainContext.cs @@ -11,7 +11,8 @@ namespace Microsoft.ML.Runtime /// into or . /// This holds at least a training set, as well as optioonally a predictor. /// - public sealed class TrainContext + [BestFriend] + internal sealed class TrainContext { /// /// The training set. Cannot be null. @@ -25,6 +26,14 @@ public sealed class TrainContext /// public RoleMappedData ValidationSet { get; } + /// + /// The test set, whose uses are very similar to validation set but it should not directly and indirectly + /// affect the training process. One major difference between validation set and test test is that validation + /// can affect the training process by, for example, early stopping. Note that early stopping is a technique + /// which terminates the training process once the scores computed on validation set starts getting worse. + /// + public RoleMappedData TestSet { get; } + /// /// The initial predictor, for incremental training. Note that if a implementor /// does not support incremental training, then it can ignore it similarly to how one would ignore @@ -38,8 +47,9 @@ public sealed class TrainContext /// /// Will set to this value. This must be specified /// Will set to this value if specified + /// Will set to this value if specified /// Will set to this value if specified - public TrainContext(RoleMappedData trainingSet, RoleMappedData validationSet = null, IPredictor initialPredictor = null) + public TrainContext(RoleMappedData trainingSet, RoleMappedData validationSet = null, RoleMappedData testSet = null, IPredictor initialPredictor = null) { Contracts.CheckValue(trainingSet, nameof(trainingSet)); Contracts.CheckValueOrNull(validationSet); @@ -50,6 +60,7 @@ public TrainContext(RoleMappedData trainingSet, RoleMappedData validationSet = n TrainingSet = trainingSet; ValidationSet = validationSet; + TestSet = testSet; InitialPredictor = initialPredictor; } } diff --git a/src/Microsoft.ML.Core/Prediction/TrainerInfo.cs b/src/Microsoft.ML.Core/Prediction/TrainerInfo.cs index abeb5917d5..4f97c0c893 100644 --- a/src/Microsoft.ML.Core/Prediction/TrainerInfo.cs +++ b/src/Microsoft.ML.Core/Prediction/TrainerInfo.cs @@ -36,12 +36,19 @@ public sealed class TrainerInfo public bool WantCaching { get; } /// - /// Whether the trainer supports validation sets via . Not implementing - /// this interface and returning true from this property is an indication the trainer does not support + /// Whether the trainer supports validation set via . Not implementing + /// this interface and returning false from this property is an indication the trainer does not support /// that. /// public bool SupportsValidation { get; } + /// + /// Whether the trainer can use test set via . Not implementing + /// this interface and returning false from this property is an indication the trainer does not support + /// that. + /// + public bool SupportsTest { get; } + /// /// Whether the trainer can support incremental trainers via . Not /// implementing this interface and returning true from this property is an indication the trainer does @@ -58,14 +65,16 @@ public sealed class TrainerInfo /// The value for the property /// The value for the property /// The value for the property + /// The value for the property public TrainerInfo(bool normalization = true, bool calibration = false, bool caching = true, - bool supportValid = false, bool supportIncrementalTrain = false) + bool supportValid = false, bool supportIncrementalTrain = false, bool supportTest = false) { NeedNormalization = normalization; NeedCalibration = calibration; WantCaching = caching; SupportsValidation = supportValid; SupportsIncrementalTraining = supportIncrementalTrain; + SupportsTest = supportTest; } } } diff --git a/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs index 838e12384c..aaa44a6bc7 100644 --- a/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs @@ -6,11 +6,17 @@ using Microsoft.ML; [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TestFramework" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.InferenceTesting" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.StaticPipelineTesting" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformTest" + PublicKey.TestValue)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Legacy" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PipelineInference" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.ResultProcessor" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.CpuMath" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Data" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Api" + PublicKey.Value)] @@ -21,12 +27,16 @@ [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.LightGBM" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Onnx" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransform" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Parquet" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PCA" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PipelineInference" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Recommender" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Runtime.ImageAnalytics" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Scoring" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.StandardLearners" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Sweeper" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Transforms" + PublicKey.Value)] [assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.Core/Utilities/BigArray.cs b/src/Microsoft.ML.Core/Utilities/BigArray.cs index b005c4cefe..3bfb4f688f 100644 --- a/src/Microsoft.ML.Core/Utilities/BigArray.cs +++ b/src/Microsoft.ML.Core/Utilities/BigArray.cs @@ -19,7 +19,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// than the total capacity. /// /// The type of entries. - public sealed class BigArray : IEnumerable + [BestFriend] + internal sealed class BigArray : IEnumerable { // REVIEW: This class merges and replaces the original private BigArray implementation in CacheDataView. // There the block size was 25 bits. Need to understand the performance implication of this 32x change. @@ -379,12 +380,12 @@ public void AddRange(ReadOnlySpan src) /// Concurrent calls to this method is valid even with one single concurrent call /// to . /// - public void CopyTo(long idx, T[] dst, int length) + public void CopyTo(long idx, Span dst, int length) { // Accesses on the internal arrays of this class should be valid even if // some other thread is utilizing AddRange, since Utils.EnsureSize(...) will // not replace the array until any allocation or copying has already happened. - Contracts.Assert(0 <= length && length <= Utils.Size(dst)); + Contracts.Assert(0 <= length && length <= dst.Length); Contracts.Assert(idx <= Length && length <= Length - idx); if (length == 0) return; @@ -403,15 +404,15 @@ public void CopyTo(long idx, T[] dst, int length) // Spans only one subarray, most common case and simplest implementation. Contracts.Assert(miLim - miMin == length); Contracts.Assert(miLim <= Utils.Size(_entries[maMax])); - Array.Copy(_entries[maMax], miMin, dst, 0, length); + _entries[maMax].AsSpan(miMin, length).CopyTo(dst); break; case 1: // Spans two subarrays. Contracts.Assert((BlockSize - miMin) + miLim == length); Contracts.Assert(BlockSize <= Utils.Size(_entries[maMin])); - Array.Copy(_entries[maMin], miMin, dst, 0, BlockSize - miMin); + _entries[maMin].AsSpan(miMin, BlockSize - miMin).CopyTo(dst); Contracts.Assert(miLim <= Utils.Size(_entries[maMax])); - Array.Copy(_entries[maMax], 0, dst, BlockSize - miMin, miLim); + _entries[maMax].AsSpan(0, miLim).CopyTo(dst.Slice(BlockSize - miMin)); break; default: // Spans three or more subarrays. Very rare. @@ -420,19 +421,19 @@ public void CopyTo(long idx, T[] dst, int length) // Copy the first segment. Contracts.Assert(BlockSize <= Utils.Size(_entries[maMin])); int dstSoFar = BlockSize - miMin; - Array.Copy(_entries[maMin], miMin, dst, 0, dstSoFar); + _entries[maMin].AsSpan(miMin, dstSoFar).CopyTo(dst); // Copy the internal segments. for (int major = maMin + 1; major < maMax; ++major) { Contracts.Assert(BlockSize <= Utils.Size(_entries[major])); - Array.Copy(_entries[major], 0, dst, dstSoFar, BlockSize); + _entries[major].AsSpan(0, BlockSize).CopyTo(dst.Slice(dstSoFar)); dstSoFar += BlockSize; Contracts.Assert(dstSoFar < length); } // Copy the last segment. Contracts.Assert(length - dstSoFar == miLim); Contracts.Assert(miLim <= Utils.Size(_entries[maMax])); - Array.Copy(_entries[maMax], 0, dst, dstSoFar, miLim); + _entries[maMax].AsSpan(0, miLim).CopyTo(dst.Slice(dstSoFar)); break; } } diff --git a/src/Microsoft.ML.Core/Utilities/BinFinder.cs b/src/Microsoft.ML.Core/Utilities/BinFinder.cs index 5cd7fd2a61..cdfd0ad08b 100644 --- a/src/Microsoft.ML.Core/Utilities/BinFinder.cs +++ b/src/Microsoft.ML.Core/Utilities/BinFinder.cs @@ -9,7 +9,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - public abstract class BinFinderBase + [BestFriend] + internal abstract class BinFinderBase { private Single[] _valuesSng; // distinct values private Double[] _valuesDbl; // distinct values @@ -278,7 +279,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities using EnergyType = System.Int64; // Uses the energy function: sum(1,N) dx^2 where dx is the difference in accum values. - public sealed class GreedyBinFinder : BinFinderBase + [BestFriend] + internal sealed class GreedyBinFinder : BinFinderBase { // Potential drop location for another peg, together with its energy improvement. // PlacePegs uses a heap of these. Note that this is a struct so size matters. @@ -529,7 +531,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities using EnergyType = System.Double; // Uses dynamic programming. - public sealed class DynamicBinFinder : BinFinderBase + [BestFriend] + internal sealed class DynamicBinFinder : BinFinderBase { private int[] _accum; // integral of counts diff --git a/src/Microsoft.ML.Core/Utilities/BitUtils.cs b/src/Microsoft.ML.Core/Utilities/BitUtils.cs index 9af79139ef..376b0ac8ef 100644 --- a/src/Microsoft.ML.Core/Utilities/BitUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/BitUtils.cs @@ -7,7 +7,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - public static partial class Utils + internal static partial class Utils { private const int CbitUint = 32; private const int CbitUlong = 64; diff --git a/src/Microsoft.ML.Core/Utilities/CharUtils.cs b/src/Microsoft.ML.Core/Utilities/CharUtils.cs index bf7ae4677e..d88197c8e7 100644 --- a/src/Microsoft.ML.Core/Utilities/CharUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/CharUtils.cs @@ -10,7 +10,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - public static class CharUtils + [BestFriend] + internal static class CharUtils { private const int CharsCount = 0x10000; private static volatile char[] _lowerInvariantChars; diff --git a/src/Microsoft.ML.Core/Utilities/CmdIndenter.cs b/src/Microsoft.ML.Core/Utilities/CmdIndenter.cs index d82fffe682..6b4dbc48db 100644 --- a/src/Microsoft.ML.Core/Utilities/CmdIndenter.cs +++ b/src/Microsoft.ML.Core/Utilities/CmdIndenter.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.CodeDom.Compiler; using System.Collections.Generic; using System.Linq; using System.Text; @@ -11,7 +12,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - public static class CmdIndenter + [BestFriend] + internal static class CmdIndenter { /// /// Get indented version of command line or same string if we unable to produce it. @@ -22,7 +24,7 @@ public static string GetIndentedCommandLine(string commandLine) { using (var sw = new System.IO.StringWriter()) { - var itw = IndentingTextWriter.Wrap(sw); + var itw = new IndentedTextWriter(sw, " "); if (TryProduceIndentString(commandLine, itw)) return sw.ToString().Trim(); return commandLine; @@ -35,7 +37,7 @@ public static string GetIndentedCommandLine(string commandLine) /// command line /// indenting text writer /// true if we was able to produce indented string without any problem - private static bool TryProduceIndentString(string text, IndentingTextWriter itw) + private static bool TryProduceIndentString(string text, IndentedTextWriter itw) { string[] tokens; if (!CmdParser.LexString(text, out tokens)) diff --git a/src/Microsoft.ML.Core/Utilities/Contracts.cs b/src/Microsoft.ML.Core/Utilities/Contracts.cs index 671bf41db8..67f559d2fb 100644 --- a/src/Microsoft.ML.Core/Utilities/Contracts.cs +++ b/src/Microsoft.ML.Core/Utilities/Contracts.cs @@ -16,11 +16,7 @@ using System.IO; using System.Threading; -#if PRIVATE_CONTRACTS -namespace Microsoft.ML.Runtime.Internal -#else namespace Microsoft.ML.Runtime -#endif { using Conditional = System.Diagnostics.ConditionalAttribute; using Debug = System.Diagnostics.Debug; @@ -31,11 +27,7 @@ namespace Microsoft.ML.Runtime /// totally replace the exception, etc. It is not legal to return null from /// Process (unless null was passed in, which really shouldn't happen). /// -#if PRIVATE_CONTRACTS - internal interface IExceptionContext -#else public interface IExceptionContext -#endif { TException Process(TException ex) where TException : Exception; @@ -46,20 +38,8 @@ TException Process(TException ex) string ContextDescription { get; } } -#if PRIVATE_CONTRACTS - [Flags] - internal enum MessageSensitivity - { - None = 0, - Unknown = ~None - } -#endif - -#if PRIVATE_CONTRACTS + [BestFriend] internal static partial class Contracts -#else - public static partial class Contracts -#endif { public const string IsMarkedKey = "ML_IsMarked"; public const string SensitivityKey = "ML_Sensitivity"; @@ -157,7 +137,6 @@ public static MessageSensitivity Sensitivity(this Exception ex) return (ex.Data[SensitivityKey] as MessageSensitivity?) ?? MessageSensitivity.Unknown; } -#if !PRIVATE_CONTRACTS /// /// This is an internal convenience implementation of an exception context to make marking /// exceptions with a specific sensitivity flag a bit less onorous. The alternative to a scheme @@ -234,7 +213,6 @@ public static IExceptionContext UserSensitive(this IExceptionContext ctx) /// public static IExceptionContext SchemaSensitive(this IExceptionContext ctx) => new SensitiveExceptionContext(ctx, MessageSensitivity.Schema); -#endif /// /// Sets the assert handler to the given function, returning the previous handler. @@ -467,283 +445,282 @@ private static string MakeSchemaMismatchMsg(string columnRole, string columnName return $"Schema mismatch for {columnRole} column '{columnName}': expected {expectedType}, got {actualType}"; } - // Check - these check a condition and if it fails, throw the corresponding exception. - // NOTE: The ordering of arguments to these is standardized to be: - // * boolean condition - // * parameter name - // * parameter value - // * message string - // - // Note that these do NOT support a params array of arguments since that would - // involve memory allocation whenever the condition is checked. When message string - // args are need, the condition test should be inlined, eg: - // if (!condition) - // throw Contracts.ExceptXxx(fmt, arg1, arg2); - - public static void Check(bool f) - { - if (!f) - throw Except(); - } - public static void Check(this IExceptionContext ctx, bool f) - { - if (!f) - throw Except(ctx); - } - public static void Check(bool f, string msg) - { - if (!f) - throw Except(msg); - } - public static void Check(this IExceptionContext ctx, bool f, string msg) - { - if (!f) - throw Except(ctx, msg); - } + // Check - these check a condition and if it fails, throw the corresponding exception. + // NOTE: The ordering of arguments to these is standardized to be: + // * boolean condition + // * parameter name + // * parameter value + // * message string + // + // Note that these do NOT support a params array of arguments since that would + // involve memory allocation whenever the condition is checked. When message string + // args are need, the condition test should be inlined, eg: + // if (!condition) + // throw Contracts.ExceptXxx(fmt, arg1, arg2); + + public static void Check(bool f) + { + if (!f) + throw Except(); + } + public static void Check(this IExceptionContext ctx, bool f) + { + if (!f) + throw Except(ctx); + } + public static void Check(bool f, string msg) + { + if (!f) + throw Except(msg); + } + public static void Check(this IExceptionContext ctx, bool f, string msg) + { + if (!f) + throw Except(ctx, msg); + } - /// - /// CheckUserArg / ExceptUserArg should be used when the validation of user-provided arguments failed. - /// Typically, this is shortly after the arguments are parsed using CmdParser. - /// - public static void CheckUserArg(bool f, string name) - { - if (!f) - throw ExceptUserArg(name); - } - public static void CheckUserArg(this IExceptionContext ctx, bool f, string name) - { - if (!f) - throw ExceptUserArg(ctx, name); - } - public static void CheckUserArg(bool f, string name, string msg) - { - if (!f) - throw ExceptUserArg(name, msg); - } - public static void CheckUserArg(this IExceptionContext ctx, bool f, string name, string msg) - { - if (!f) - throw ExceptUserArg(ctx, name, msg); - } + /// + /// CheckUserArg / ExceptUserArg should be used when the validation of user-provided arguments failed. + /// Typically, this is shortly after the arguments are parsed using CmdParser. + /// + public static void CheckUserArg(bool f, string name) + { + if (!f) + throw ExceptUserArg(name); + } + public static void CheckUserArg(this IExceptionContext ctx, bool f, string name) + { + if (!f) + throw ExceptUserArg(ctx, name); + } + public static void CheckUserArg(bool f, string name, string msg) + { + if (!f) + throw ExceptUserArg(name, msg); + } + public static void CheckUserArg(this IExceptionContext ctx, bool f, string name, string msg) + { + if (!f) + throw ExceptUserArg(ctx, name, msg); + } - public static void CheckParam(bool f, string paramName) - { - if (!f) - throw ExceptParam(paramName); - } - public static void CheckParam(this IExceptionContext ctx, bool f, string paramName) - { - if (!f) - throw ExceptParam(ctx, paramName); - } - public static void CheckParam(bool f, string paramName, string msg) - { - if (!f) - throw ExceptParam(paramName, msg); - } - public static void CheckParam(this IExceptionContext ctx, bool f, string paramName, string msg) - { - if (!f) - throw ExceptParam(ctx, paramName, msg); - } - public static void CheckParamValue(bool f, T value, string paramName, string msg) - { - if (!f) - throw ExceptParamValue(value, paramName, msg); - } - public static void CheckParamValue(this IExceptionContext ctx, bool f, T value, string paramName, string msg) - { - if (!f) - throw ExceptParamValue(ctx, value, paramName, msg); - } + public static void CheckParam(bool f, string paramName) + { + if (!f) + throw ExceptParam(paramName); + } + public static void CheckParam(this IExceptionContext ctx, bool f, string paramName) + { + if (!f) + throw ExceptParam(ctx, paramName); + } + public static void CheckParam(bool f, string paramName, string msg) + { + if (!f) + throw ExceptParam(paramName, msg); + } + public static void CheckParam(this IExceptionContext ctx, bool f, string paramName, string msg) + { + if (!f) + throw ExceptParam(ctx, paramName, msg); + } + public static void CheckParamValue(bool f, T value, string paramName, string msg) + { + if (!f) + throw ExceptParamValue(value, paramName, msg); + } + public static void CheckParamValue(this IExceptionContext ctx, bool f, T value, string paramName, string msg) + { + if (!f) + throw ExceptParamValue(ctx, value, paramName, msg); + } - public static T CheckRef(T val, string paramName) where T : class - { - if (object.ReferenceEquals(val, null)) - throw ExceptValue(paramName); - return val; - } - public static T CheckRef(this IExceptionContext ctx, T val, string paramName) where T : class - { - if (object.ReferenceEquals(val, null)) - throw ExceptValue(ctx, paramName); - return val; - } + public static T CheckRef(T val, string paramName) where T : class + { + if (object.ReferenceEquals(val, null)) + throw ExceptValue(paramName); + return val; + } + public static T CheckRef(this IExceptionContext ctx, T val, string paramName) where T : class + { + if (object.ReferenceEquals(val, null)) + throw ExceptValue(ctx, paramName); + return val; + } - public static T CheckRef(this IExceptionContext ctx, T val, string paramName, string msg) where T : class - { - if (object.ReferenceEquals(val, null)) - throw ExceptValue(ctx, paramName, msg); - return val; - } + public static T CheckRef(this IExceptionContext ctx, T val, string paramName, string msg) where T : class + { + if (object.ReferenceEquals(val, null)) + throw ExceptValue(ctx, paramName, msg); + return val; + } public static void CheckValue(T val, string paramName) where T : class - { - if (object.ReferenceEquals(val, null)) - throw ExceptValue(paramName); - } - public static void CheckValue(this IExceptionContext ctx, T val, string paramName) where T : class - { - if (object.ReferenceEquals(val, null)) - throw ExceptValue(ctx, paramName); - } - public static T CheckValue(T val, string paramName, string msg) where T : class - { - if (object.ReferenceEquals(val, null)) - throw ExceptValue(paramName, msg); - return val; - } - public static T CheckValue(this IExceptionContext ctx, T val, string paramName, string msg) where T : class - { - if (object.ReferenceEquals(val, null)) - throw ExceptValue(ctx, paramName, msg); - return val; - } + { + if (object.ReferenceEquals(val, null)) + throw ExceptValue(paramName); + } + public static void CheckValue(this IExceptionContext ctx, T val, string paramName) where T : class + { + if (object.ReferenceEquals(val, null)) + throw ExceptValue(ctx, paramName); + } + public static T CheckValue(T val, string paramName, string msg) where T : class + { + if (object.ReferenceEquals(val, null)) + throw ExceptValue(paramName, msg); + return val; + } + public static T CheckValue(this IExceptionContext ctx, T val, string paramName, string msg) where T : class + { + if (object.ReferenceEquals(val, null)) + throw ExceptValue(ctx, paramName, msg); + return val; + } - public static string CheckNonEmpty(string s, string paramName) - { - if (string.IsNullOrEmpty(s)) - throw ExceptEmpty(paramName); - return s; - } - public static string CheckNonEmpty(this IExceptionContext ctx, string s, string paramName) - { - if (string.IsNullOrEmpty(s)) - throw ExceptEmpty(ctx, paramName); - return s; - } + public static string CheckNonEmpty(string s, string paramName) + { + if (string.IsNullOrEmpty(s)) + throw ExceptEmpty(paramName); + return s; + } + public static string CheckNonEmpty(this IExceptionContext ctx, string s, string paramName) + { + if (string.IsNullOrEmpty(s)) + throw ExceptEmpty(ctx, paramName); + return s; + } - public static string CheckNonWhiteSpace(string s, string paramName) - { - if (string.IsNullOrWhiteSpace(s)) - throw ExceptWhiteSpace(paramName); - return s; - } - public static string CheckNonWhiteSpace(this IExceptionContext ctx, string s, string paramName) - { - if (string.IsNullOrWhiteSpace(s)) - throw ExceptWhiteSpace(ctx, paramName); - return s; - } + public static string CheckNonWhiteSpace(string s, string paramName) + { + if (string.IsNullOrWhiteSpace(s)) + throw ExceptWhiteSpace(paramName); + return s; + } + public static string CheckNonWhiteSpace(this IExceptionContext ctx, string s, string paramName) + { + if (string.IsNullOrWhiteSpace(s)) + throw ExceptWhiteSpace(ctx, paramName); + return s; + } - public static string CheckNonEmpty(string s, string paramName, string msg) - { - if (string.IsNullOrEmpty(s)) - throw ExceptEmpty(paramName, msg); - return s; - } - public static string CheckNonEmpty(this IExceptionContext ctx, string s, string paramName, string msg) - { - if (string.IsNullOrEmpty(s)) - throw ExceptEmpty(ctx, paramName, msg); - return s; - } + public static string CheckNonEmpty(string s, string paramName, string msg) + { + if (string.IsNullOrEmpty(s)) + throw ExceptEmpty(paramName, msg); + return s; + } + public static string CheckNonEmpty(this IExceptionContext ctx, string s, string paramName, string msg) + { + if (string.IsNullOrEmpty(s)) + throw ExceptEmpty(ctx, paramName, msg); + return s; + } - public static string CheckNonWhiteSpace(string s, string paramName, string msg) - { - if (string.IsNullOrWhiteSpace(s)) - throw ExceptWhiteSpace(paramName, msg); - return s; - } - public static string CheckNonWhiteSpace(this IExceptionContext ctx, string s, string paramName, string msg) - { - if (string.IsNullOrWhiteSpace(s)) - throw ExceptWhiteSpace(ctx, paramName, msg); - return s; - } + public static string CheckNonWhiteSpace(string s, string paramName, string msg) + { + if (string.IsNullOrWhiteSpace(s)) + throw ExceptWhiteSpace(paramName, msg); + return s; + } + public static string CheckNonWhiteSpace(this IExceptionContext ctx, string s, string paramName, string msg) + { + if (string.IsNullOrWhiteSpace(s)) + throw ExceptWhiteSpace(ctx, paramName, msg); + return s; + } - public static T[] CheckNonEmpty(T[] args, string paramName) - { - if (Size(args) == 0) - throw ExceptEmpty(paramName); - return args; - } - public static T[] CheckNonEmpty(this IExceptionContext ctx, T[] args, string paramName) - { - if (Size(args) == 0) - throw ExceptEmpty(ctx, paramName); - return args; - } - public static T[] CheckNonEmpty(T[] args, string paramName, string msg) - { - if (Size(args) == 0) - throw ExceptEmpty(paramName, msg); - return args; - } - public static T[] CheckNonEmpty(this IExceptionContext ctx, T[] args, string paramName, string msg) - { - if (Size(args) == 0) - throw ExceptEmpty(ctx, paramName, msg); - return args; - } - public static ICollection CheckNonEmpty(ICollection args, string paramName) - { - if (Size(args) == 0) - throw ExceptEmpty(paramName); - return args; - } - public static ICollection CheckNonEmpty(this IExceptionContext ctx, ICollection args, string paramName) - { - if (Size(args) == 0) - throw ExceptEmpty(ctx, paramName); - return args; - } - public static ICollection CheckNonEmpty(ICollection args, string paramName, string msg) - { - if (Size(args) == 0) - throw ExceptEmpty(paramName, msg); - return args; - } - public static ICollection CheckNonEmpty(this IExceptionContext ctx, ICollection args, string paramName, string msg) - { - if (Size(args) == 0) - throw ExceptEmpty(ctx, paramName, msg); - return args; - } + public static T[] CheckNonEmpty(T[] args, string paramName) + { + if (Size(args) == 0) + throw ExceptEmpty(paramName); + return args; + } + public static T[] CheckNonEmpty(this IExceptionContext ctx, T[] args, string paramName) + { + if (Size(args) == 0) + throw ExceptEmpty(ctx, paramName); + return args; + } + public static T[] CheckNonEmpty(T[] args, string paramName, string msg) + { + if (Size(args) == 0) + throw ExceptEmpty(paramName, msg); + return args; + } + public static T[] CheckNonEmpty(this IExceptionContext ctx, T[] args, string paramName, string msg) + { + if (Size(args) == 0) + throw ExceptEmpty(ctx, paramName, msg); + return args; + } + public static ICollection CheckNonEmpty(ICollection args, string paramName) + { + if (Size(args) == 0) + throw ExceptEmpty(paramName); + return args; + } + public static ICollection CheckNonEmpty(this IExceptionContext ctx, ICollection args, string paramName) + { + if (Size(args) == 0) + throw ExceptEmpty(ctx, paramName); + return args; + } + public static ICollection CheckNonEmpty(ICollection args, string paramName, string msg) + { + if (Size(args) == 0) + throw ExceptEmpty(paramName, msg); + return args; + } + public static ICollection CheckNonEmpty(this IExceptionContext ctx, ICollection args, string paramName, string msg) + { + if (Size(args) == 0) + throw ExceptEmpty(ctx, paramName, msg); + return args; + } - public static void CheckDecode(bool f) - { - if (!f) - throw ExceptDecode(); - } - public static void CheckDecode(this IExceptionContext ctx, bool f) - { - if (!f) - throw ExceptDecode(ctx); - } - public static void CheckDecode(bool f, string msg) - { - if (!f) - throw ExceptDecode(msg); - } - public static void CheckDecode(this IExceptionContext ctx, bool f, string msg) - { - if (!f) - throw ExceptDecode(ctx, msg); - } + public static void CheckDecode(bool f) + { + if (!f) + throw ExceptDecode(); + } + public static void CheckDecode(this IExceptionContext ctx, bool f) + { + if (!f) + throw ExceptDecode(ctx); + } + public static void CheckDecode(bool f, string msg) + { + if (!f) + throw ExceptDecode(msg); + } + public static void CheckDecode(this IExceptionContext ctx, bool f, string msg) + { + if (!f) + throw ExceptDecode(ctx, msg); + } - public static void CheckIO(bool f) - { - if (!f) - throw ExceptIO(); - } - public static void CheckIO(this IExceptionContext ctx, bool f) - { - if (!f) - throw ExceptIO(ctx); - } - public static void CheckIO(bool f, string msg) - { - if (!f) - throw ExceptIO(msg); - } - public static void CheckIO(this IExceptionContext ctx, bool f, string msg) - { - if (!f) - throw ExceptIO(ctx, msg); - } + public static void CheckIO(bool f) + { + if (!f) + throw ExceptIO(); + } + public static void CheckIO(this IExceptionContext ctx, bool f) + { + if (!f) + throw ExceptIO(ctx); + } + public static void CheckIO(bool f, string msg) + { + if (!f) + throw ExceptIO(msg); + } + public static void CheckIO(this IExceptionContext ctx, bool f, string msg) + { + if (!f) + throw ExceptIO(ctx, msg); + } -#if !PRIVATE_CONTRACTS /// /// Check state of the host and throw exception if host marked to stop all exection. /// @@ -752,248 +729,248 @@ public static void CheckAlive(this IHostEnvironment env) if (env.IsCancelled) throw Process(new OperationCanceledException("Operation was cancelled."), env); } -#endif - /// - /// This documents that the parameter can legally be null. - /// - [Conditional("INVARIANT_CHECKS")] - public static void CheckValueOrNull(T val) where T : class - { - } - [Conditional("INVARIANT_CHECKS")] - public static void CheckValueOrNull(this IExceptionContext ctx, T val) where T : class - { - } - // Assert + /// + /// This documents that the parameter can legally be null. + /// + [Conditional("INVARIANT_CHECKS")] + public static void CheckValueOrNull(T val) where T : class + { + } + [Conditional("INVARIANT_CHECKS")] + public static void CheckValueOrNull(this IExceptionContext ctx, T val) where T : class + { + } - #region Private assert handling + // Assert - private static void DbgFailCore(string msg, IExceptionContext ctx = null) - { - var handler = _handler; - - if (handler != null) - handler(msg, ctx); - else if (ctx != null) - Debug.Fail(msg, ctx.ContextDescription); - else - Debug.Fail(msg); - } + #region Private assert handling - private static void DbgFail(IExceptionContext ctx = null) - { - DbgFailCore("Assertion Failed", ctx); - } - private static void DbgFail(string msg) - { - DbgFailCore(msg); - } - private static void DbgFail(IExceptionContext ctx, string msg) - { - DbgFailCore(msg, ctx); - } - private static void DbgFailValue(IExceptionContext ctx = null) - { - DbgFailCore("Non-null assertion failure", ctx); - } - private static void DbgFailValue(string paramName) - { - DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}", paramName)); - } - private static void DbgFailValue(IExceptionContext ctx, string paramName) - { - DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}", paramName), ctx); - } - private static void DbgFailValue(string paramName, string msg) - { - DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}: {1}", paramName, msg)); - } - private static void DbgFailValue(IExceptionContext ctx, string paramName, string msg) - { - DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}: {1}", paramName, msg), ctx); - } - private static void DbgFailEmpty(IExceptionContext ctx = null) - { - DbgFailCore("Non-empty assertion failure", ctx); - } - private static void DbgFailEmpty(string msg) - { - DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-empty assertion failure: {0}", msg)); - } - private static void DbgFailEmpty(IExceptionContext ctx, string msg) - { - DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-empty assertion failure: {0}", msg), ctx); - } + private static void DbgFailCore(string msg, IExceptionContext ctx = null) + { + var handler = _handler; - #endregion Private assert handling + if (handler != null) + handler(msg, ctx); + else if (ctx != null) + Debug.Fail(msg, ctx.ContextDescription); + else + Debug.Fail(msg); + } - [Conditional("DEBUG")] - public static void Assert(bool f) - { - if (!f) - DbgFail(); - } - [Conditional("DEBUG")] - public static void Assert(this IExceptionContext ctx, bool f) - { - if (!f) - DbgFail(ctx); - } + private static void DbgFail(IExceptionContext ctx = null) + { + DbgFailCore("Assertion Failed", ctx); + } + private static void DbgFail(string msg) + { + DbgFailCore(msg); + } + private static void DbgFail(IExceptionContext ctx, string msg) + { + DbgFailCore(msg, ctx); + } + private static void DbgFailValue(IExceptionContext ctx = null) + { + DbgFailCore("Non-null assertion failure", ctx); + } + private static void DbgFailValue(string paramName) + { + DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}", paramName)); + } + private static void DbgFailValue(IExceptionContext ctx, string paramName) + { + DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}", paramName), ctx); + } + private static void DbgFailValue(string paramName, string msg) + { + DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}: {1}", paramName, msg)); + } + private static void DbgFailValue(IExceptionContext ctx, string paramName, string msg) + { + DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}: {1}", paramName, msg), ctx); + } + private static void DbgFailEmpty(IExceptionContext ctx = null) + { + DbgFailCore("Non-empty assertion failure", ctx); + } + private static void DbgFailEmpty(string msg) + { + DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-empty assertion failure: {0}", msg)); + } + private static void DbgFailEmpty(IExceptionContext ctx, string msg) + { + DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-empty assertion failure: {0}", msg), ctx); + } - [Conditional("DEBUG")] - public static void Assert(bool f, string msg) - { - if (!f) - DbgFail(msg); - } - [Conditional("DEBUG")] - public static void Assert(this IExceptionContext ctx, bool f, string msg) - { - if (!f) - DbgFail(ctx, msg); - } + #endregion Private assert handling - [Conditional("DEBUG")] - public static void AssertValue(T val) where T : class - { - if (object.ReferenceEquals(val, null)) - DbgFailValue(); - } - [Conditional("DEBUG")] - public static void AssertValue(this IExceptionContext ctx, T val) where T : class - { - if (object.ReferenceEquals(val, null)) - DbgFailValue(ctx); - } + [Conditional("DEBUG")] + public static void Assert(bool f) + { + if (!f) + DbgFail(); + } + [Conditional("DEBUG")] + public static void Assert(this IExceptionContext ctx, bool f) + { + if (!f) + DbgFail(ctx); + } - [Conditional("DEBUG")] - public static void AssertValue(T val, string paramName) where T : class - { - if (object.ReferenceEquals(val, null)) - DbgFailValue(paramName); - } - [Conditional("DEBUG")] - public static void AssertValue(this IExceptionContext ctx, T val, string paramName) where T : class - { - if (object.ReferenceEquals(val, null)) - DbgFailValue(ctx, paramName); - } + [Conditional("DEBUG")] + public static void Assert(bool f, string msg) + { + if (!f) + DbgFail(msg); + } + [Conditional("DEBUG")] + public static void Assert(this IExceptionContext ctx, bool f, string msg) + { + if (!f) + DbgFail(ctx, msg); + } - [Conditional("DEBUG")] - public static void AssertValue(T val, string name, string msg) where T : class - { - if (object.ReferenceEquals(val, null)) - DbgFailValue(name, msg); - } - [Conditional("DEBUG")] - public static void AssertValue(this IExceptionContext ctx, T val, string name, string msg) where T : class - { - if (object.ReferenceEquals(val, null)) - DbgFailValue(ctx, name, msg); - } + [Conditional("DEBUG")] + public static void AssertValue(T val) where T : class + { + if (object.ReferenceEquals(val, null)) + DbgFailValue(); + } + [Conditional("DEBUG")] + public static void AssertValue(this IExceptionContext ctx, T val) where T : class + { + if (object.ReferenceEquals(val, null)) + DbgFailValue(ctx); + } - [Conditional("DEBUG")] - public static void AssertNonEmpty(string s) - { - if (string.IsNullOrEmpty(s)) - DbgFailEmpty(); - } - [Conditional("DEBUG")] - public static void AssertNonEmpty(this IExceptionContext ctx, string s) - { - if (string.IsNullOrEmpty(s)) - DbgFailEmpty(ctx); - } + [Conditional("DEBUG")] + public static void AssertValue(T val, string paramName) where T : class + { + if (object.ReferenceEquals(val, null)) + DbgFailValue(paramName); + } + [Conditional("DEBUG")] + public static void AssertValue(this IExceptionContext ctx, T val, string paramName) where T : class + { + if (object.ReferenceEquals(val, null)) + DbgFailValue(ctx, paramName); + } - [Conditional("DEBUG")] - public static void AssertNonWhiteSpace(string s) - { - if (string.IsNullOrWhiteSpace(s)) - DbgFailEmpty(); - } - [Conditional("DEBUG")] - public static void AssertNonWhiteSpace(this IExceptionContext ctx, string s) - { - if (string.IsNullOrWhiteSpace(s)) - DbgFailEmpty(ctx); - } + [Conditional("DEBUG")] + public static void AssertValue(T val, string name, string msg) where T : class + { + if (object.ReferenceEquals(val, null)) + DbgFailValue(name, msg); + } + [Conditional("DEBUG")] + public static void AssertValue(this IExceptionContext ctx, T val, string name, string msg) where T : class + { + if (object.ReferenceEquals(val, null)) + DbgFailValue(ctx, name, msg); + } - [Conditional("DEBUG")] - public static void AssertNonEmpty(string s, string msg) - { - if (string.IsNullOrEmpty(s)) - DbgFailEmpty(msg); - } - [Conditional("DEBUG")] - public static void AssertNonEmpty(this IExceptionContext ctx, string s, string msg) - { - if (string.IsNullOrEmpty(s)) - DbgFailEmpty(ctx, msg); - } + [Conditional("DEBUG")] + public static void AssertNonEmpty(string s) + { + if (string.IsNullOrEmpty(s)) + DbgFailEmpty(); + } + [Conditional("DEBUG")] + public static void AssertNonEmpty(this IExceptionContext ctx, string s) + { + if (string.IsNullOrEmpty(s)) + DbgFailEmpty(ctx); + } - [Conditional("DEBUG")] - public static void AssertNonWhiteSpace(string s, string msg) - { - if (string.IsNullOrWhiteSpace(s)) - DbgFailEmpty(msg); - } - [Conditional("DEBUG")] - public static void AssertNonWhiteSpace(this IExceptionContext ctx, string s, string msg) - { - if (string.IsNullOrWhiteSpace(s)) - DbgFailEmpty(ctx, msg); - } + [Conditional("DEBUG")] + public static void AssertNonWhiteSpace(string s) + { + if (string.IsNullOrWhiteSpace(s)) + DbgFailEmpty(); + } + [Conditional("DEBUG")] + public static void AssertNonWhiteSpace(this IExceptionContext ctx, string s) + { + if (string.IsNullOrWhiteSpace(s)) + DbgFailEmpty(ctx); + } - [Conditional("DEBUG")] - public static void AssertNonEmpty(ReadOnlySpan args) - { - if (args.IsEmpty) - DbgFail(); - } - [Conditional("DEBUG")] - public static void AssertNonEmpty(Span args) - { - if (args.IsEmpty) - DbgFail(); - } + [Conditional("DEBUG")] + public static void AssertNonEmpty(string s, string msg) + { + if (string.IsNullOrEmpty(s)) + DbgFailEmpty(msg); + } + [Conditional("DEBUG")] + public static void AssertNonEmpty(this IExceptionContext ctx, string s, string msg) + { + if (string.IsNullOrEmpty(s)) + DbgFailEmpty(ctx, msg); + } - [Conditional("DEBUG")] - public static void AssertNonEmpty(ICollection args) - { - if (Size(args) == 0) - DbgFail(); - } - [Conditional("DEBUG")] - public static void AssertNonEmpty(this IExceptionContext ctx, ICollection args) - { - if (Size(args) == 0) - DbgFail(ctx); - } + [Conditional("DEBUG")] + public static void AssertNonWhiteSpace(string s, string msg) + { + if (string.IsNullOrWhiteSpace(s)) + DbgFailEmpty(msg); + } + [Conditional("DEBUG")] + public static void AssertNonWhiteSpace(this IExceptionContext ctx, string s, string msg) + { + if (string.IsNullOrWhiteSpace(s)) + DbgFailEmpty(ctx, msg); + } - [Conditional("DEBUG")] - public static void AssertNonEmpty(ICollection args, string msg) - { - if (Size(args) == 0) - DbgFail(msg); - } - [Conditional("DEBUG")] - public static void AssertNonEmpty(this IExceptionContext ctx, ICollection args, string msg) - { - if (Size(args) == 0) - DbgFail(ctx, msg); - } + [Conditional("DEBUG")] + public static void AssertNonEmpty(ReadOnlySpan args) + { + if (args.IsEmpty) + DbgFail(); + } + [Conditional("DEBUG")] + public static void AssertNonEmpty(Span args) + { + if (args.IsEmpty) + DbgFail(); + } - /// - /// This documents that the parameter can legally be null. - /// - [Conditional("INVARIANT_CHECKS")] - public static void AssertValueOrNull(T val) where T : class - { - } - [Conditional("INVARIANT_CHECKS")] - public static void AssertValueOrNull(this IExceptionContext ctx, T val) where T : class - { + [Conditional("DEBUG")] + public static void AssertNonEmpty(ICollection args) + { + if (Size(args) == 0) + DbgFail(); + } + [Conditional("DEBUG")] + public static void AssertNonEmpty(this IExceptionContext ctx, ICollection args) + { + if (Size(args) == 0) + DbgFail(ctx); + } + + [Conditional("DEBUG")] + public static void AssertNonEmpty(ICollection args, string msg) + { + if (Size(args) == 0) + DbgFail(msg); + } + [Conditional("DEBUG")] + public static void AssertNonEmpty(this IExceptionContext ctx, ICollection args, string msg) + { + if (Size(args) == 0) + DbgFail(ctx, msg); + } + + /// + /// This documents that the parameter can legally be null. + /// + [Conditional("INVARIANT_CHECKS")] + public static void AssertValueOrNull(T val) where T : class + { + } + [Conditional("INVARIANT_CHECKS")] + public static void AssertValueOrNull(this IExceptionContext ctx, T val) where T : class + { + } } } -} diff --git a/src/Microsoft.ML.Core/Utilities/DoubleParser.cs b/src/Microsoft.ML.Core/Utilities/DoubleParser.cs index a1a82d5218..4f2ef9ad80 100644 --- a/src/Microsoft.ML.Core/Utilities/DoubleParser.cs +++ b/src/Microsoft.ML.Core/Utilities/DoubleParser.cs @@ -13,7 +13,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - public class DoubleParser + [BestFriend] + internal static class DoubleParser { private const ulong TopBit = 0x8000000000000000UL; private const ulong TopTwoBits = 0xC000000000000000UL; diff --git a/src/Microsoft.ML.Core/Utilities/FixedSizeQueue.cs b/src/Microsoft.ML.Core/Utilities/FixedSizeQueue.cs index 1c375bd625..bdcea0c0ae 100644 --- a/src/Microsoft.ML.Core/Utilities/FixedSizeQueue.cs +++ b/src/Microsoft.ML.Core/Utilities/FixedSizeQueue.cs @@ -12,7 +12,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// A fixed-length circular array. Items are added at the end. If the array is full, adding /// an item will result in discarding the least recently added item. /// - public sealed class FixedSizeQueue + [BestFriend] + internal sealed class FixedSizeQueue { private readonly T[] _array; private int _startIndex; diff --git a/src/Microsoft.ML.Core/Utilities/FloatUtils.cs b/src/Microsoft.ML.Core/Utilities/FloatUtils.cs index fdbc59aa89..06d403da9a 100644 --- a/src/Microsoft.ML.Core/Utilities/FloatUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/FloatUtils.cs @@ -8,7 +8,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - public static class FloatUtils + [BestFriend] + internal static class FloatUtils { // This is used to read and write the bits of a Double. // Thanks to Vance Morrison for educating me about this excellent aliasing mechanism. diff --git a/src/Microsoft.ML.Core/Utilities/HashArray.cs b/src/Microsoft.ML.Core/Utilities/HashArray.cs index 27f0ec9b5d..64dced9792 100644 --- a/src/Microsoft.ML.Core/Utilities/HashArray.cs +++ b/src/Microsoft.ML.Core/Utilities/HashArray.cs @@ -17,7 +17,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// Also implements memory efficient sorting. /// Note: Supports adding and looking up of items but does not support removal of items. /// - public sealed class HashArray + [BestFriend] + internal sealed class HashArray // REVIEW: May want to not consider not making TItem have to be IComparable but instead // could support user specified sort order. where TItem : IEquatable, IComparable @@ -227,16 +228,15 @@ private void DumpStats() } /// - /// Copies all items to the passed in array. Requires the passed in array to be at least the + /// Copies all items to the passed in span. Requires the passed in span to be at least the /// same length as Count. /// - public void CopyTo(TItem[] array) + public void CopyTo(Span destination) { - Contracts.Check(array != null); - Contracts.Check(array.Length >= _ct); + Contracts.Check(destination.Length >= _ct); for (int i = 0; i < _ct; i++) - array[i] = _entries[i].Value; + destination[i] = _entries[i].Value; } private static class HashHelpers diff --git a/src/Microsoft.ML.Core/Utilities/Hashing.cs b/src/Microsoft.ML.Core/Utilities/Hashing.cs index a15677451b..ae36fae95d 100644 --- a/src/Microsoft.ML.Core/Utilities/Hashing.cs +++ b/src/Microsoft.ML.Core/Utilities/Hashing.cs @@ -9,7 +9,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - public static class Hashing + [BestFriend] + internal static class Hashing { private const uint _defaultSeed = (5381 << 16) + 5381; diff --git a/src/Microsoft.ML.Core/Utilities/Heap.cs b/src/Microsoft.ML.Core/Utilities/Heap.cs index 241acd0209..7652163f10 100644 --- a/src/Microsoft.ML.Core/Utilities/Heap.cs +++ b/src/Microsoft.ML.Core/Utilities/Heap.cs @@ -12,7 +12,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// Implements a heap. /// - public sealed class Heap + [BestFriend] + internal sealed class Heap { private readonly List _rgv; // The heap elements. The 0th element is a dummy. private readonly Func _fnReverse; @@ -196,7 +197,7 @@ private void BubbleDown(int iv) /// /// For the heap to allow deletion, the heap node has to derive from this class. /// - public abstract partial class HeapNode + internal abstract class HeapNode { // Where this node lives in the heap. Zero means it isn't in the heap. private int _index; @@ -207,10 +208,7 @@ protected HeapNode() } public bool InHeap { get { return _index > 0; } } - } - public abstract partial class HeapNode - { /// /// Implements a heap. /// diff --git a/src/Microsoft.ML.Core/Utilities/HybridMemoryStream.cs b/src/Microsoft.ML.Core/Utilities/HybridMemoryStream.cs index 73b4c4a828..02f713dd6e 100644 --- a/src/Microsoft.ML.Core/Utilities/HybridMemoryStream.cs +++ b/src/Microsoft.ML.Core/Utilities/HybridMemoryStream.cs @@ -15,7 +15,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// file system. This can be useful if we have intermediate operations that require streams. /// The temporary file will be destroyed if the object is properly disposed. /// - public sealed class HybridMemoryStream : Stream + [BestFriend] + internal sealed class HybridMemoryStream : Stream { private MemoryStream _memStream; private Stream _overflowStream; diff --git a/src/Microsoft.ML.Core/Utilities/IndentedTextWriterExtensions.cs b/src/Microsoft.ML.Core/Utilities/IndentedTextWriterExtensions.cs new file mode 100644 index 0000000000..fe8fd12e96 --- /dev/null +++ b/src/Microsoft.ML.Core/Utilities/IndentedTextWriterExtensions.cs @@ -0,0 +1,50 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; + +namespace Microsoft.ML.Runtime.Internal.Utilities +{ + [BestFriend] + internal static class IndentedTextWriterExtensions + { + public struct Scope : IDisposable + { + private IndentedTextWriter _writer; + + public Scope(IndentedTextWriter writer) + { + _writer = writer; + _writer.Indent(); + } + public void Dispose() + { + _writer.Outdent(); + _writer = null; + } + } + + public static Scope Nest(this IndentedTextWriter writer) + { + return new Scope(writer); + } + + public static void Indent(this IndentedTextWriter writer) + { + writer.Indent++; + } + public static void Outdent(this IndentedTextWriter writer) + { + writer.Indent--; + } + + public static void WriteLineNoTabs(this IndentedTextWriter writer) + { + writer.WriteLineNoTabs(string.Empty); + } + } +} \ No newline at end of file diff --git a/src/Microsoft.ML.Core/Utilities/IndentingTextWriter.cs b/src/Microsoft.ML.Core/Utilities/IndentingTextWriter.cs deleted file mode 100644 index e42bdf6519..0000000000 --- a/src/Microsoft.ML.Core/Utilities/IndentingTextWriter.cs +++ /dev/null @@ -1,281 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.IO; -using System.Text; - -namespace Microsoft.ML.Runtime.Internal.Utilities -{ - public sealed class IndentingTextWriter : TextWriter - { - public struct Scope : IDisposable - { - private IndentingTextWriter _wrt; - - public Scope(IndentingTextWriter wrt) - { - _wrt = wrt; - _wrt.Indent(); - } - public void Dispose() - { - _wrt.Outdent(); - _wrt = null; - } - } - - private readonly TextWriter _wrt; - private readonly string _str; - - private bool _bol; - private int _indent; - private bool _skipLine; - - public static IndentingTextWriter Wrap(TextWriter wrt, string indentString = " ") - { - Contracts.AssertValue(wrt); - Contracts.AssertNonEmpty(indentString); - - IndentingTextWriter itw = wrt as IndentingTextWriter; - if (itw != null) - return itw; - return new IndentingTextWriter(wrt, indentString); - } - - private IndentingTextWriter(TextWriter wrt, string indentString) - { - Contracts.AssertValue(wrt); - _wrt = wrt; - _str = indentString; - _bol = true; - } - - public Scope Nest() - { - return new Scope(this); - } - - public void Indent() - { - _indent++; - } - - public void Outdent() - { - Contracts.Assert(_indent > 0); - --_indent; - _skipLine = false; - } - - public void Skip() - { - _skipLine = true; - } - - private void Adjust() - { - if (_bol) - { - if (_skipLine) - { - _wrt.WriteLine(); - _skipLine = false; - } - for (int i = 0; i < _indent; i++) - _wrt.Write(_str); - _bol = false; - } - } - - private void AdjustLine() - { - Adjust(); - _bol = true; - } - - public override System.Text.Encoding Encoding - { - get { return _wrt.Encoding; } - } - - public override void Write(bool value) - { - Adjust(); - _wrt.Write(value); - } - public override void Write(char value) - { - Adjust(); - _wrt.Write(value); - } - public override void Write(char[] buffer) - { - Adjust(); - _wrt.Write(buffer); - } - public override void Write(decimal value) - { - Adjust(); - _wrt.Write(value); - } - public override void Write(double value) - { - Adjust(); - _wrt.Write(value); - } - public override void Write(float value) - { - Adjust(); - _wrt.Write(value); - } - public override void Write(int value) - { - Adjust(); - _wrt.Write(value); - } - public override void Write(long value) - { - Adjust(); - _wrt.Write(value); - } - public override void Write(object value) - { - Adjust(); - _wrt.Write(value); - } - public override void Write(string value) - { - Adjust(); - _wrt.Write(value); - } - public override void Write(uint value) - { - Adjust(); - _wrt.Write(value); - } - public override void Write(ulong value) - { - Adjust(); - _wrt.Write(value); - } - public override void Write(string format, object arg0) - { - Adjust(); - _wrt.Write(format, arg0); - } - public override void Write(string format, params object[] arg) - { - Adjust(); - _wrt.Write(format, arg); - } - public override void Write(char[] buffer, int index, int count) - { - Adjust(); - _wrt.Write(buffer, index, count); - } - public override void Write(string format, object arg0, object arg1) - { - Adjust(); - _wrt.Write(format, arg0, arg1); - } - public override void Write(string format, object arg0, object arg1, object arg2) - { - Adjust(); - _wrt.Write(format, arg0, arg1, arg2); - } - - public override void WriteLine() - { - _bol = true; - _skipLine = false; - _wrt.WriteLine(); - } - public override void WriteLine(bool value) - { - AdjustLine(); - _wrt.WriteLine(value); - } - public override void WriteLine(char value) - { - AdjustLine(); - _wrt.WriteLine(value); - } - public override void WriteLine(char[] buffer) - { - AdjustLine(); - _wrt.WriteLine(buffer); - } - public override void WriteLine(decimal value) - { - AdjustLine(); - _wrt.WriteLine(value); - } - public override void WriteLine(double value) - { - AdjustLine(); - _wrt.WriteLine(value); - } - public override void WriteLine(float value) - { - AdjustLine(); - _wrt.WriteLine(value); - } - public override void WriteLine(int value) - { - AdjustLine(); - _wrt.WriteLine(value); - } - public override void WriteLine(long value) - { - AdjustLine(); - _wrt.WriteLine(value); - } - public override void WriteLine(object value) - { - AdjustLine(); - _wrt.WriteLine(value); - } - public override void WriteLine(string value) - { - AdjustLine(); - _wrt.WriteLine(value); - } - public override void WriteLine(uint value) - { - AdjustLine(); - _wrt.WriteLine(value); - } - public override void WriteLine(ulong value) - { - AdjustLine(); - _wrt.WriteLine(value); - } - public override void WriteLine(string format, object arg0) - { - AdjustLine(); - _wrt.WriteLine(format, arg0); - } - public override void WriteLine(string format, params object[] arg) - { - AdjustLine(); - _wrt.WriteLine(format, arg); - } - public override void WriteLine(char[] buffer, int index, int count) - { - AdjustLine(); - _wrt.WriteLine(buffer, index, count); - } - public override void WriteLine(string format, object arg0, object arg1) - { - AdjustLine(); - _wrt.WriteLine(format, arg0, arg1); - } - public override void WriteLine(string format, object arg0, object arg1, object arg2) - { - AdjustLine(); - _wrt.WriteLine(format, arg0, arg1, arg2); - } - } -} diff --git a/src/Microsoft.ML.Core/Utilities/LineParser.cs b/src/Microsoft.ML.Core/Utilities/LineParser.cs new file mode 100644 index 0000000000..73d9bb6158 --- /dev/null +++ b/src/Microsoft.ML.Core/Utilities/LineParser.cs @@ -0,0 +1,58 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Runtime.CompilerServices; + +namespace Microsoft.ML.Runtime.Internal.Utilities +{ + [BestFriend] + internal static class LineParser + { + public static (bool isSuccess, string key, float[] values) ParseKeyThenNumbers(string line) + { + if (string.IsNullOrWhiteSpace(line)) + return (false, null, null); + + ReadOnlySpan trimmedLine = line.AsSpan().TrimEnd(); // TrimEnd creates a Span, no allocations + + int firstSeparatorIndex = trimmedLine.IndexOfAny(' ', '\t'); // the first word is the key, we just skip it + ReadOnlySpan valuesToParse = trimmedLine.Slice(start: firstSeparatorIndex + 1); + + float[] values = AllocateFixedSizeArrayToStoreParsedValues(valuesToParse); + + int toParseStartIndex = 0; + int valueIndex = 0; + for (int i = 0; i <= valuesToParse.Length; i++) + { + if (i == valuesToParse.Length || valuesToParse[i] == ' ' || valuesToParse[i] == '\t') + { + if (DoubleParser.TryParse(valuesToParse.Slice(toParseStartIndex, i - toParseStartIndex), out float parsed)) + values[valueIndex++] = parsed; + else + return (false, null, null); + + toParseStartIndex = i + 1; + } + } + + return (true, trimmedLine.Slice(0, firstSeparatorIndex).ToString(), values); + } + + /// + /// we count the number of values first to allocate a single array with of proper size + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + private static float[] AllocateFixedSizeArrayToStoreParsedValues(ReadOnlySpan valuesToParse) + { + int valuesCount = 0; + + for (int i = 0; i < valuesToParse.Length; i++) + if (valuesToParse[i] == ' ' || valuesToParse[i] == '\t') + valuesCount++; + + return new float[valuesCount + 1]; // + 1 because the line is trimmed and there is no whitespace at the end + } + } +} \ No newline at end of file diff --git a/src/Microsoft.ML.Core/Utilities/ListExtensions.cs b/src/Microsoft.ML.Core/Utilities/ListExtensions.cs deleted file mode 100644 index 22c45a3bca..0000000000 --- a/src/Microsoft.ML.Core/Utilities/ListExtensions.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections.Generic; - -namespace Microsoft.ML.Runtime.Internal.Utilities -{ - public static class ListExtensions - { - public static void Push(this List list, T item) - { - Contracts.AssertValue(list); - list.Add(item); - } - - public static T Pop(this List list) - { - Contracts.AssertValue(list); - Contracts.Assert(list.Count > 0); - int index = list.Count - 1; - T item = list[index]; - list.RemoveAt(index); - return item; - } - - public static void PopTo(this List list, int depth) - { - Contracts.AssertValue(list); - Contracts.Assert(0 <= depth && depth <= list.Count); - list.RemoveRange(depth, list.Count - depth); - } - - public static T Peek(this List list) - { - Contracts.AssertValue(list); - Contracts.Assert(list.Count > 0); - return list[list.Count - 1]; - } - } -} diff --git a/src/Microsoft.ML.Core/Utilities/LruCache.cs b/src/Microsoft.ML.Core/Utilities/LruCache.cs index 21897f4e27..e041efde02 100644 --- a/src/Microsoft.ML.Core/Utilities/LruCache.cs +++ b/src/Microsoft.ML.Core/Utilities/LruCache.cs @@ -10,7 +10,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// Implements a least recently used cache. /// - public sealed class LruCache + [BestFriend] + internal sealed class LruCache { private readonly int _size; private readonly Dictionary>> _cache; diff --git a/src/Microsoft.ML.Core/Utilities/MathUtils.cs b/src/Microsoft.ML.Core/Utilities/MathUtils.cs index fb68ee82d6..4ce1bb4cf0 100644 --- a/src/Microsoft.ML.Core/Utilities/MathUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/MathUtils.cs @@ -13,7 +13,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// Some useful math methods. /// - public static class MathUtils + [BestFriend] + internal static class MathUtils { public static Float ToFloat(this Double dbl) { @@ -132,40 +133,23 @@ public static Float Min(Float[] a) } /// - /// Finds the first index of the max element of the array. + /// Finds the first index of the max element of the span. /// NaNs are ignored. If all the elements to consider are NaNs, -1 is /// returned. The caller should distinguish in this case between two /// possibilities: /// 1) The number of the element to consider is zero. /// 2) All the elements to consider are NaNs. /// - /// an array + /// The span of floats. /// the first index of the max element - public static int ArgMax(Float[] a) + public static int ArgMax(ReadOnlySpan a) { - return ArgMax(a, Utils.Size(a)); - } - - /// - /// Finds the first index of the max element of the array. - /// NaNs are ignored. If all the elements to consider are NaNs, -1 is - /// returned. The caller should distinguish in this case between two - /// possibilities: - /// 1) The number of the element to consider is zero. - /// 2) All the elements to consider are NaNs. - /// - /// an array - /// number of the element in the array to consider - /// the first index of the max element - public static int ArgMax(Float[] a, int count) - { - Contracts.Assert(0 <= count && count <= Utils.Size(a)); - if (count == 0) + if (a.IsEmpty) return -1; int amax = -1; Float max = Float.NegativeInfinity; - for (int i = count - 1; i >= 0; i--) + for (int i = a.Length - 1; i >= 0; i--) { if (max <= a[i]) { @@ -178,40 +162,23 @@ public static int ArgMax(Float[] a, int count) } /// - /// Finds the first index of the minimum element of the array. + /// Finds the first index of the minimum element of the span. /// NaNs are ignored. If all the elements to consider are NaNs, -1 is /// returned. The caller should distinguish in this case between two /// possibilities: /// 1) The number of the element to consider is zero. /// 2) All the elements to consider are NaNs. /// - /// an array + /// The span of floats. /// the first index of the minimum element - public static int ArgMin(Float[] a) + public static int ArgMin(ReadOnlySpan a) { - return ArgMin(a, Utils.Size(a)); - } - - /// - /// Finds the first index of the minimum element of the array. - /// NaNs are ignored. If all the elements to consider are NaNs, -1 is - /// returned. The caller should distinguish in this case between two - /// possibilities: - /// 1) The number of the element to consider is zero. - /// 2) All the elements to consider are NaNs. - /// - /// an array - /// number of the element in the array to consider - /// the first index of the minimum element - public static int ArgMin(Float[] a, int count) - { - Contracts.Assert(0 <= count && count <= Utils.Size(a)); - if (count == 0) + if (a.IsEmpty) return -1; int amin = -1; Float min = Float.PositiveInfinity; - for (int i = count - 1; i >= 0; i--) + for (int i = a.Length - 1; i >= 0; i--) { if (min >= a[i]) { @@ -232,18 +199,14 @@ public static int ArgMin(Float[] a, int count) /// /// computes the "softmax" function: log sum_i exp x_i /// - /// Array of numbers to softmax - /// the number of input array elements to process + /// Span of numbers to softmax /// the softmax of the numbers /// may have slightly lower roundoff error if inputs are sorted, smallest first - public static Float SoftMax(Float[] inputs, int count) + public static Float SoftMax(ReadOnlySpan inputs) { - Contracts.AssertValue(inputs); - Contracts.Assert(0 < count & count <= inputs.Length); - int maxIdx = 0; Float max = Float.NegativeInfinity; - for (int i = 0; i < count; i++) + for (int i = 0; i < inputs.Length; i++) { if (inputs[i] > max) { @@ -255,13 +218,13 @@ public static Float SoftMax(Float[] inputs, int count) if (Float.IsNegativeInfinity(max)) return Float.NegativeInfinity; - if (count == 1) + if (inputs.Length == 1) return max; double intermediate = 0.0; Float cutoff = max - LogTolerance; - for (int i = 0; i < count; i++) + for (int i = 0; i < inputs.Length; i++) { if (i == maxIdx) continue; diff --git a/src/Microsoft.ML.Core/Utilities/MatrixTransposeOps.cs b/src/Microsoft.ML.Core/Utilities/MatrixTransposeOps.cs index 0afdd9a6a5..cb945e56a2 100644 --- a/src/Microsoft.ML.Core/Utilities/MatrixTransposeOps.cs +++ b/src/Microsoft.ML.Core/Utilities/MatrixTransposeOps.cs @@ -9,7 +9,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - public static class MatrixTransposeOps + [BestFriend] + internal static class MatrixTransposeOps { private const int _block = 32; diff --git a/src/Microsoft.ML.Core/Utilities/MemUtils.cs b/src/Microsoft.ML.Core/Utilities/MemUtils.cs deleted file mode 100644 index 1dba9205e9..0000000000 --- a/src/Microsoft.ML.Core/Utilities/MemUtils.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace Microsoft.ML.Runtime.Internal.CpuMath -{ - public static class MemUtils - { - // The signature of this method is intentionally identical to - // .Net 4.6's Buffer.MemoryCopy. - // REVIEW: Remove once we're on a version of .NET which includes - // Buffer.MemoryCopy. - public static unsafe void MemoryCopy(void* source, void* destination, long destinationSizeInBytes, long sourceBytesToCopy) - { - // MemCpy has undefined behavior when handed overlapping source and - // destination buffers. - // Do not pass it overlapping source and destination buffers. - Contracts.Check((byte*)destination + sourceBytesToCopy <= source || destination >= (byte*)source + sourceBytesToCopy); - Contracts.Check(destinationSizeInBytes >= sourceBytesToCopy); -#if CORECLR - System.Buffer.MemoryCopy(source, destination, destinationSizeInBytes, sourceBytesToCopy); -#else - Thunk.MemCpy(destination, source, sourceBytesToCopy); -#endif - } - } -} diff --git a/src/Microsoft.ML.Core/Utilities/MinWaiter.cs b/src/Microsoft.ML.Core/Utilities/MinWaiter.cs index 42ddf0c69c..fbaf8fb6d6 100644 --- a/src/Microsoft.ML.Core/Utilities/MinWaiter.cs +++ b/src/Microsoft.ML.Core/Utilities/MinWaiter.cs @@ -21,7 +21,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// registering itself for a new event (or, finally, retiring itself through /// ). /// - public sealed class MinWaiter + [BestFriend] + internal sealed class MinWaiter { /// /// This is an event-line pair. The intended usage is, when the line diff --git a/src/Microsoft.ML.Core/Utilities/NormStr.cs b/src/Microsoft.ML.Core/Utilities/NormStr.cs index fea018ac58..c79e2425d1 100644 --- a/src/Microsoft.ML.Core/Utilities/NormStr.cs +++ b/src/Microsoft.ML.Core/Utilities/NormStr.cs @@ -17,7 +17,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// Normalized string type. For string pooling. /// - public sealed class NormStr + [BestFriend] + internal sealed class NormStr { public readonly ReadOnlyMemory Value; public readonly int Id; diff --git a/src/Microsoft.ML.Core/Utilities/ObjectPool.cs b/src/Microsoft.ML.Core/Utilities/ObjectPool.cs index 4a65286551..a06202af76 100644 --- a/src/Microsoft.ML.Core/Utilities/ObjectPool.cs +++ b/src/Microsoft.ML.Core/Utilities/ObjectPool.cs @@ -8,7 +8,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - public sealed class ObjectPool : ObjectPoolBase where T : class, new() + [BestFriend] + internal sealed class ObjectPool : ObjectPoolBase where T : class, new() { protected override T Create() { @@ -16,7 +17,8 @@ protected override T Create() } } - public sealed class MadeObjectPool : ObjectPoolBase + [BestFriend] + internal sealed class MadeObjectPool : ObjectPoolBase { private readonly Func _maker; @@ -31,7 +33,7 @@ protected override T Create() } } - public abstract class ObjectPoolBase + internal abstract class ObjectPoolBase { private readonly ConcurrentBag _pool; private int _numCreated; diff --git a/src/Microsoft.ML.Core/Utilities/OrderedWaiter.cs b/src/Microsoft.ML.Core/Utilities/OrderedWaiter.cs index e3e118d8bf..ca0ef23445 100644 --- a/src/Microsoft.ML.Core/Utilities/OrderedWaiter.cs +++ b/src/Microsoft.ML.Core/Utilities/OrderedWaiter.cs @@ -17,7 +17,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// any order), the first thread to clear the wait will be 0, then 1 will /// be cleared once incremented, then 2 will be cleared once incremented. /// - public sealed class OrderedWaiter + [BestFriend] + internal sealed class OrderedWaiter { /// /// This is an event-line pair. The intended usage is, when the line diff --git a/src/Microsoft.ML.Core/Utilities/PathUtils.cs b/src/Microsoft.ML.Core/Utilities/PathUtils.cs index 6698c11f7f..98407e24a1 100644 --- a/src/Microsoft.ML.Core/Utilities/PathUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/PathUtils.cs @@ -8,7 +8,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - public static partial class Utils + internal static partial class Utils { /// /// Environment variable containing optional resources path. diff --git a/src/Microsoft.ML.Core/Utilities/PlatformUtils.cs b/src/Microsoft.ML.Core/Utilities/PlatformUtils.cs index 8f46f93017..2bd8acab3e 100644 --- a/src/Microsoft.ML.Core/Utilities/PlatformUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/PlatformUtils.cs @@ -11,7 +11,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// Contains extension methods that aid in building cross platform. /// - public static class PlatformUtils + [BestFriend] + internal static class PlatformUtils { public static ReadOnlyCollection AsReadOnly(this T[] items) { diff --git a/src/Microsoft.ML.Core/Utilities/ReservoirSampler.cs b/src/Microsoft.ML.Core/Utilities/ReservoirSampler.cs index acc7d4f3a2..8438a2e742 100644 --- a/src/Microsoft.ML.Core/Utilities/ReservoirSampler.cs +++ b/src/Microsoft.ML.Core/Utilities/ReservoirSampler.cs @@ -13,7 +13,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// The sample is created in one pass by calling for every data point in the stream. Implementations should have /// a delegate for getting the next data point, which is invoked if the current data point should go into the reservoir. /// - public interface IReservoirSampler + [BestFriend] + internal interface IReservoirSampler { /// /// If the number of elements sampled is less than the reservoir size, this should return the number of elements sampled. @@ -49,7 +50,8 @@ public interface IReservoirSampler /// for every data point in the stream. In case the next data point does not get 'picked' into the reservoir, the delegate is not invoked. /// Sampling is done according to the algorithm in this paper: https://epubs.siam.org/doi/pdf/10.1137/1.9781611972740.53. /// - public sealed class ReservoirSamplerWithoutReplacement : IReservoirSampler + [BestFriend] + internal sealed class ReservoirSamplerWithoutReplacement : IReservoirSampler { // This array contains a cache of the elements composing the reservoir. private readonly T[] _cache; @@ -122,7 +124,8 @@ public IEnumerable GetSample() /// for every data point in the stream. In case the next data point does not get 'picked' into the reservoir, the delegate is not invoked. /// Sampling is done according to the algorithm in this paper: https://epubs.siam.org/doi/pdf/10.1137/1.9781611972740.53. /// - public sealed class ReservoirSamplerWithReplacement : IReservoirSampler + [BestFriend] + internal sealed class ReservoirSamplerWithReplacement : IReservoirSampler { // This array contains pointers to the elements in the _cache array that are currently in the reservoir (may contain duplicates). private readonly int[] _reservoir; diff --git a/src/Microsoft.ML.Core/Utilities/ResourceManagerUtils.cs b/src/Microsoft.ML.Core/Utilities/ResourceManagerUtils.cs index 4ea8f0d5b7..9e9c6f80bb 100644 --- a/src/Microsoft.ML.Core/Utilities/ResourceManagerUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/ResourceManagerUtils.cs @@ -16,7 +16,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// This class takes care of downloading resources needed by ML.NET components. Resources are located in /// a pre-defined location, that can be overridden by defining Environment variable . /// - public sealed class ResourceManagerUtils + [BestFriend] + internal sealed class ResourceManagerUtils { private static volatile ResourceManagerUtils _instance; public static ResourceManagerUtils Instance @@ -301,7 +302,9 @@ public static ResourceDownloadResults GetErrorMessage(out string errorMessage, p return errorResult; } +#pragma warning disable IDE1006 [DllImport("libc", SetLastError = true)] private static extern int chmod(string pathname, int mode); +#pragma warning restore IDE1006 } } diff --git a/src/Microsoft.ML.Core/Utilities/Stats.cs b/src/Microsoft.ML.Core/Utilities/Stats.cs index 119ac22946..182239adde 100644 --- a/src/Microsoft.ML.Core/Utilities/Stats.cs +++ b/src/Microsoft.ML.Core/Utilities/Stats.cs @@ -11,7 +11,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// A class containing common statistical functions /// - public static class Stats + [BestFriend] + internal static class Stats { /// /// Returns a number uniformly sampled from 0...(rangeSize-1) diff --git a/src/Microsoft.ML.Core/Utilities/Stream.cs b/src/Microsoft.ML.Core/Utilities/Stream.cs index 926a425f5b..4fe21e7df7 100644 --- a/src/Microsoft.ML.Core/Utilities/Stream.cs +++ b/src/Microsoft.ML.Core/Utilities/Stream.cs @@ -8,11 +8,10 @@ using System.IO; using System.Text; using System.Threading; -using Microsoft.ML.Runtime.Internal.CpuMath; namespace Microsoft.ML.Runtime.Internal.Utilities { - public static partial class Utils + internal static partial class Utils { private const int _bulkReadThresholdInBytes = 4096; @@ -853,7 +852,7 @@ public static unsafe void ReadBytes(this BinaryReader reader, void* destination, int toRead = (int)Math.Min(bytesToRead - offset, blockSize); int read = reader.Read(work, 0, toRead); Contracts.CheckDecode(read == toRead); - MemUtils.MemoryCopy(src, (byte*)destination + offset, destinationSizeInBytes - offset, read); + Buffer.MemoryCopy(src, (byte*)destination + offset, destinationSizeInBytes - offset, read); offset += read; } Contracts.Assert(offset == bytesToRead); diff --git a/src/Microsoft.ML.Core/Utilities/SubsetStream.cs b/src/Microsoft.ML.Core/Utilities/SubsetStream.cs index 84cf4826e6..3bf9ad2c9e 100644 --- a/src/Microsoft.ML.Core/Utilities/SubsetStream.cs +++ b/src/Microsoft.ML.Core/Utilities/SubsetStream.cs @@ -22,7 +22,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// subset stream, the underlying stream will always remain open and /// undisposed. /// - public sealed class SubsetStream : Stream + [BestFriend] + internal sealed class SubsetStream : Stream { private readonly Stream _stream; // The position of the stream. diff --git a/src/Microsoft.ML.Core/Utilities/SummaryStatistics.cs b/src/Microsoft.ML.Core/Utilities/SummaryStatistics.cs index 3843342a2c..3e36191564 100644 --- a/src/Microsoft.ML.Core/Utilities/SummaryStatistics.cs +++ b/src/Microsoft.ML.Core/Utilities/SummaryStatistics.cs @@ -6,7 +6,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - public abstract class SummaryStatisticsBase + internal abstract class SummaryStatisticsBase { // Sum of squared difference from the current mean. protected double M2; @@ -152,7 +152,8 @@ public void Add(SummaryStatisticsBase s) } } - public sealed class SummaryStatisticsUpToSecondOrderMoments : SummaryStatisticsBase + [BestFriend] + internal sealed class SummaryStatisticsUpToSecondOrderMoments : SummaryStatisticsBase { /// /// A convenient way to combine the observations of two Stats objects @@ -177,7 +178,8 @@ public sealed class SummaryStatisticsUpToSecondOrderMoments : SummaryStatisticsB /// https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance /// All quantities are weighted, except for RawCount. /// - public sealed class SummaryStatistics : SummaryStatisticsBase + [BestFriend] + internal sealed class SummaryStatistics : SummaryStatisticsBase { // Sum of cubed difference from the current mean. private double _m3; diff --git a/src/Microsoft.ML.Core/Utilities/SupervisedBinFinder.cs b/src/Microsoft.ML.Core/Utilities/SupervisedBinFinder.cs index bb76952c25..63257823a2 100644 --- a/src/Microsoft.ML.Core/Utilities/SupervisedBinFinder.cs +++ b/src/Microsoft.ML.Core/Utilities/SupervisedBinFinder.cs @@ -20,7 +20,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// The class can be used several times sequentially, it is stateful and not thread-safe. /// Both Single and Double precision processing is implemented, and is identical. /// - public sealed class SupervisedBinFinder + [BestFriend] + internal sealed class SupervisedBinFinder { private readonly struct ValuePair : IComparable> where T : IComparable diff --git a/src/Microsoft.ML.Core/Utilities/TextReaderStream.cs b/src/Microsoft.ML.Core/Utilities/TextReaderStream.cs index 5c05275ba7..682a0336cb 100644 --- a/src/Microsoft.ML.Core/Utilities/TextReaderStream.cs +++ b/src/Microsoft.ML.Core/Utilities/TextReaderStream.cs @@ -14,7 +14,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// compensates by inserting \n line feed characters at the end of every /// input line, including the last one. /// - public sealed class TextReaderStream : Stream + [BestFriend] + internal sealed class TextReaderStream : Stream { private readonly TextReader _baseReader; private readonly Encoding _encoding; diff --git a/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs b/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs index 859ae7b28d..46a82a4e7c 100644 --- a/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs @@ -10,7 +10,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - public static partial class Utils + internal static partial class Utils { public static Thread CreateBackgroundThread(ParameterizedThreadStart start) { @@ -59,7 +59,8 @@ public static Thread CreateForegroundThread(ThreadStart start) /// that the workers have finished by its own means, will call to throw /// the set exception as an inner exception, in the wrapping thread. /// - public sealed class ExceptionMarshaller : IDisposable + [BestFriend] + internal sealed class ExceptionMarshaller : IDisposable { private readonly CancellationTokenSource _ctSource; private readonly object _lock; @@ -130,7 +131,8 @@ public void ThrowIfSet(IExceptionContext ectx) /// Provides a task scheduler that ensures a maximum concurrency level while /// running on top of the ThreadPool. /// - public sealed class LimitedConcurrencyLevelTaskScheduler : TaskScheduler + [BestFriend] + internal sealed class LimitedConcurrencyLevelTaskScheduler : TaskScheduler { // Whether the current thread is processing work items. [ThreadStatic] diff --git a/src/Microsoft.ML.Core/Utilities/Tree.cs b/src/Microsoft.ML.Core/Utilities/Tree.cs index 7d030cf46c..8d4c0f7585 100644 --- a/src/Microsoft.ML.Core/Utilities/Tree.cs +++ b/src/Microsoft.ML.Core/Utilities/Tree.cs @@ -17,7 +17,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// Children are keyed with values of this type /// The type of the node value - public sealed class Tree : IDictionary> + [BestFriend] + internal sealed class Tree : IDictionary> { // The key of this node in the parent, assuming this is a child node at all. // This back reference is necessary to complete any "remove" operations. diff --git a/src/Microsoft.ML.Core/Utilities/Utils.cs b/src/Microsoft.ML.Core/Utilities/Utils.cs index 9a6ecb9b0b..d0f6f6256e 100644 --- a/src/Microsoft.ML.Core/Utilities/Utils.cs +++ b/src/Microsoft.ML.Core/Utilities/Utils.cs @@ -16,7 +16,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - public static partial class Utils + [BestFriend] + internal static partial class Utils { // Maximum size of one-dimensional array. // See: https://msdn.microsoft.com/en-us/library/hh285054(v=vs.110).aspx @@ -181,15 +182,22 @@ public static void Push(ref Stack stack, T item) } /// - /// Assumes input is sorted and finds value using BinarySearch. - /// If value is not found, returns the logical index of 'value' in the sorted list i.e index of the first element greater than value. - /// In case of duplicates it returns the index of the first one. - /// It guarantees that items before the returned index are < value, while those at and after the returned index are >= value. + /// Copies the values from src to dst. /// - public static int FindIndexSorted(this int[] input, int value) + /// + /// This can be removed once we have the APIs from https://github.com/dotnet/corefx/issues/33006. + /// + public static void CopyTo(this List src, Span dst, int? count = null) { - Contracts.AssertValue(input); - return FindIndexSorted(input, 0, input.Length, value); + Contracts.Assert(src != null); + Contracts.Assert(!count.HasValue || (0 <= count && count <= src.Count)); + Contracts.Assert(src.Count <= dst.Length); + + count = count ?? src.Count; + for (int i = 0; i < count; i++) + { + dst[i] = src[i]; + } } /// @@ -239,6 +247,17 @@ public static bool TryFindIndexSorted(this int[] input, int min, int lim, int va return index < lim && input[index] == value; } + /// + /// Akin to FindIndexSorted, except stores the found index in the output + /// index parameter, and returns whether that index is a valid index + /// pointing to a value equal to the input parameter value. + /// + public static bool TryFindIndexSorted(ReadOnlySpan input, int min, int lim, int value, out int index) + { + index = FindIndexSorted(input, min, lim, value); + return index < lim && input[index] == value; + } + /// /// Assumes input is sorted and finds value using BinarySearch. /// If value is not found, returns the logical index of 'value' in the sorted list i.e index of the first element greater than value. @@ -465,9 +484,8 @@ public static int[] GetIdentityPermutation(int size) return res; } - public static void FillIdentity(int[] a, int lim) + public static void FillIdentity(Span a, int lim) { - Contracts.AssertValue(a); Contracts.Assert(0 <= lim & lim <= a.Length); for (int i = 0; i < lim; ++i) @@ -676,9 +694,9 @@ public static bool IsSorted(int[] values) /// and between an inclusive lower and exclusive upper bound for /// the first and last items, respectively. /// - public static bool IsIncreasing(int min, int[] values, int lim) + public static bool IsIncreasing(int min, ReadOnlySpan values, int lim) { - if (Utils.Size(values) < 1) + if (values.Length < 1) return true; var prev = values[0]; @@ -698,9 +716,9 @@ public static bool IsIncreasing(int min, int[] values, int lim) /// is sorted and unique, and between an inclusive lower and exclusive /// upper bound for the first and last items, respectively. /// - public static bool IsIncreasing(int min, int[] values, int len, int lim) + public static bool IsIncreasing(int min, ReadOnlySpan values, int len, int lim) { - Contracts.Check(Utils.Size(values) >= len); + Contracts.Check(values.Length >= len); if (len < 1) return true; @@ -856,12 +874,19 @@ public static int EnsureSize(ref T[] array, int min, bool keepOld = true) /// /// The new size, that is no less than and no more that . public static int EnsureSize(ref T[] array, int min, int max, bool keepOld = true) + => EnsureSize(ref array, min, max, keepOld, out bool _); + + public static int EnsureSize(ref T[] array, int min, int max, bool keepOld, out bool resized) { Contracts.CheckParam(min <= max, nameof(max), "min must not exceed max"); // This code adapted from the private method EnsureCapacity code of List. int size = Utils.Size(array); if (size >= min) + { + resized = false; return size; + } + int newSize = size == 0 ? 4 : size * 2; // This constant taken from the internal code of system\array.cs of mscorlib. if ((uint)newSize > max) @@ -872,6 +897,8 @@ public static int EnsureSize(ref T[] array, int min, int max, bool keepOld = Array.Resize(ref array, newSize); else array = new T[newSize]; + + resized = true; return newSize; } @@ -1097,5 +1124,30 @@ public static string GetDescription(this Enum value) } return null; } + + public static int Count(this ReadOnlySpan source, Func predicate) + { + Contracts.CheckValue(predicate, nameof(predicate)); + + int result = 0; + for (int i = 0; i < source.Length; i++) + { + if (predicate(source[i])) + result++; + } + return result; + } + + public static bool All(this ReadOnlySpan source, Func predicate) + { + Contracts.CheckValue(predicate, nameof(predicate)); + + for (int i = 0; i < source.Length; i++) + { + if (!predicate(source[i])) + return false; + } + return true; + } } } diff --git a/src/Microsoft.ML.Core/Utilities/VBufferUtils.cs b/src/Microsoft.ML.Core/Utilities/VBufferUtils.cs index 19a7819325..f730d61724 100644 --- a/src/Microsoft.ML.Core/Utilities/VBufferUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/VBufferUtils.cs @@ -14,7 +14,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// Convenience utilities for vector operations on . /// - public static class VBufferUtils + [BestFriend] + internal static class VBufferUtils { private const float SparsityThreshold = 0.25f; @@ -175,7 +176,7 @@ public static void ForEachDefined(in VBuffer a, Action visitor) /// Applies the to each corresponding pair of elements /// where the item is emplicitly defined in the vector. By explicitly defined, /// we mean that for a given index i, both vectors have an entry in - /// corresponding to that index. + /// corresponding to that index. /// /// The first vector /// The second vector @@ -313,9 +314,8 @@ public static void ForEachEitherDefined(in VBuffer a, in VBuffer b, Act /// public static void Clear(ref VBuffer dst) { - if (dst.Count == 0) - return; - Array.Clear(dst.Values, 0, dst.Count); + var editor = VBufferEditor.CreateFromBuffer(ref dst); + editor.Values.Clear(); } // REVIEW: Look into removing slot in this and other manipulators, so that we @@ -343,15 +343,17 @@ public static void Apply(ref VBuffer dst, SlotValueManipulator manip) { Contracts.CheckValue(manip, nameof(manip)); + var editor = VBufferEditor.CreateFromBuffer(ref dst); if (dst.IsDense) { - for (int i = 0; i < dst.Length; i++) - manip(i, ref dst.Values[i]); + for (int i = 0; i < editor.Values.Length; i++) + manip(i, ref editor.Values[i]); } else { - for (int i = 0; i < dst.Count; i++) - manip(dst.Indices[i], ref dst.Values[i]); + var dstIndices = dst.GetIndices(); + for (int i = 0; i < editor.Values.Length; i++) + manip(dstIndices[i], ref editor.Values[i]); } } @@ -375,17 +377,19 @@ public static void ApplyAt(ref VBuffer dst, int slot, SlotValueManipulator Contracts.CheckValue(manip, nameof(manip)); Contracts.CheckValueOrNull(pred); + var editor = VBufferEditor.CreateFromBuffer(ref dst); + int dstValuesCount = editor.Values.Length; if (dst.IsDense) { // The vector is dense, so we can just do a direct access. - manip(slot, ref dst.Values[slot]); + manip(slot, ref editor.Values[slot]); return; } int idx = 0; - if (dst.Count > 0 && Utils.TryFindIndexSorted(dst.Indices, 0, dst.Count, slot, out idx)) + if (dstValuesCount > 0 && Utils.TryFindIndexSorted(editor.Indices, 0, dstValuesCount, slot, out idx)) { // Vector is sparse, but the item exists so we can access it. - manip(slot, ref dst.Values[idx]); + manip(slot, ref editor.Values[idx]); return; } // The vector is sparse and there is no corresponding item, yet. @@ -396,26 +400,24 @@ public static void ApplyAt(ref VBuffer dst, int slot, SlotValueManipulator if (pred(ref value)) return; // We have to insert this value, somehow. - int[] indices = dst.Indices; - T[] values = dst.Values; + // There is a modest special case where there is exactly one free slot // we are modifying in the sparse vector, in which case the vector becomes // dense. Then there is no need to do anything with indices. - bool needIndices = dst.Count + 1 < dst.Length; - if (needIndices) - Utils.EnsureSize(ref indices, dst.Count + 1, dst.Length - 1); - Utils.EnsureSize(ref values, dst.Count + 1, dst.Length); - if (idx != dst.Count) + bool needIndices = dstValuesCount + 1 < dst.Length; + editor = VBufferEditor.Create(ref dst, dst.Length, dstValuesCount + 1); + if (idx != dstValuesCount) { // We have to do some sort of shift copy. + int sliceLength = dstValuesCount - idx; if (needIndices) - Array.Copy(indices, idx, indices, idx + 1, dst.Count - idx); - Array.Copy(values, idx, values, idx + 1, dst.Count - idx); + editor.Indices.Slice(idx, sliceLength).CopyTo(editor.Indices.Slice(idx + 1)); + editor.Values.Slice(idx, sliceLength).CopyTo(editor.Values.Slice(idx + 1)); } if (needIndices) - indices[idx] = slot; - values[idx] = value; - dst = new VBuffer(dst.Length, dst.Count + 1, values, indices); + editor.Indices[idx] = slot; + editor.Values[idx] = value; + dst = editor.Commit(); } /// @@ -425,37 +427,41 @@ public static void Densify(ref VBuffer dst) { if (dst.IsDense) return; - var indices = dst.Indices; - var values = dst.Values; - if (Utils.Size(values) >= dst.Length) + + var indices = dst.GetIndices(); + var values = dst.GetValues(); + var editor = VBufferEditor.Create( + ref dst, + dst.Length); + + if (!editor.CreatedNewValues) { // Densify in place. - for (int i = dst.Count; --i >= 0; ) + for (int i = values.Length; --i >= 0; ) { Contracts.Assert(i <= indices[i]); - values[indices[i]] = values[i]; + editor.Values[indices[i]] = values[i]; } - if (dst.Count == 0) - Array.Clear(values, 0, dst.Length); + if (values.Length == 0) + editor.Values.Clear(); else { int min = 0; - for (int ii = 0; ii < dst.Count; ++ii) + for (int ii = 0; ii < values.Length; ++ii) { - Array.Clear(values, min, indices[ii] - min); + editor.Values.Slice(min, indices[ii] - min).Clear(); min = indices[ii] + 1; } - Array.Clear(values, min, dst.Length - min); + editor.Values.Slice(min, dst.Length - min).Clear(); } } else { - T[] newValues = new T[dst.Length]; - for (int i = 0; i < dst.Count; ++i) - newValues[indices[i]] = values[i]; - values = newValues; + // createdNewValues is true, keepOldOnResize is false, so Values is already cleared + for (int i = 0; i < values.Length; ++i) + editor.Values[indices[i]] = values[i]; } - dst = new VBuffer(dst.Length, values, indices); + dst = editor.Commit(); } /// @@ -465,7 +471,9 @@ public static void Densify(ref VBuffer dst) public static void DensifyFirst(ref VBuffer dst, int denseCount) { Contracts.Check(0 <= denseCount && denseCount <= dst.Length); - if (dst.IsDense || denseCount == 0 || (dst.Count >= denseCount && dst.Indices[denseCount - 1] == denseCount - 1)) + var dstValues = dst.GetValues(); + var dstIndices = dst.GetIndices(); + if (dst.IsDense || denseCount == 0 || (dstValues.Length >= denseCount && dstIndices[denseCount - 1] == denseCount - 1)) return; if (denseCount == dst.Length) { @@ -473,37 +481,36 @@ public static void DensifyFirst(ref VBuffer dst, int denseCount) return; } - // Densify the first BiasCount entries. - int[] indices = dst.Indices; - T[] values = dst.Values; - if (indices == null) + // Densify the first denseCount entries. + if (dstIndices.IsEmpty) { - Contracts.Assert(dst.Count == 0); - indices = Utils.GetIdentityPermutation(denseCount); - Utils.EnsureSize(ref values, denseCount, dst.Length, keepOld: false); - Array.Clear(values, 0, denseCount); - dst = new VBuffer(dst.Length, denseCount, values, indices); + // no previous values + var newIndicesEditor = VBufferEditor.Create(ref dst, dst.Length, denseCount); + Utils.FillIdentity(newIndicesEditor.Indices, denseCount); + newIndicesEditor.Values.Clear(); + dst = newIndicesEditor.Commit(); return; } - int lim = Utils.FindIndexSorted(indices, 0, dst.Count, denseCount); + int lim = Utils.FindIndexSorted(dstIndices, 0, dstValues.Length, denseCount); Contracts.Assert(lim < denseCount); - int newLen = dst.Count + denseCount - lim; + int newLen = dstValues.Length + denseCount - lim; if (newLen == dst.Length) { Densify(ref dst); return; } - Utils.EnsureSize(ref values, newLen, dst.Length); - Utils.EnsureSize(ref indices, newLen, dst.Length); - Array.Copy(values, lim, values, denseCount, dst.Count - lim); - Array.Copy(indices, lim, indices, denseCount, dst.Count - lim); + + var editor = VBufferEditor.Create(ref dst, dst.Length, newLen, keepOldOnResize: true); + int sliceLength = dstValues.Length - lim; + editor.Values.Slice(lim, sliceLength).CopyTo(editor.Values.Slice(denseCount)); + editor.Indices.Slice(lim, sliceLength).CopyTo(editor.Indices.Slice(denseCount)); int i = lim - 1; for (int ii = denseCount; --ii >= 0; ) { - values[ii] = i >= 0 && indices[i] == ii ? values[i--] : default(T); - indices[ii] = ii; + editor.Values[ii] = i >= 0 && dstIndices[i] == ii ? dstValues[i--] : default(T); + editor.Indices[ii] = ii; } - dst = new VBuffer(dst.Length, newLen, values, indices); + dst = editor.Commit(); } /// @@ -521,9 +528,10 @@ public static void CreateMaybeSparseCopy(in VBuffer src, ref VBuffer ds int sparseCount = 0; var sparseCountThreshold = (int)(src.Length * sparsityThreshold); + var srcValues = src.GetValues(); for (int i = 0; i < src.Length; i++) { - if (!isDefaultPredicate(in src.Values[i])) + if (!isDefaultPredicate(in srcValues[i])) sparseCount++; if (sparseCount > sparseCountThreshold) @@ -533,23 +541,17 @@ public static void CreateMaybeSparseCopy(in VBuffer src, ref VBuffer ds } } - var indices = dst.Indices; - var values = dst.Values; - + var editor = VBufferEditor.Create(ref dst, src.Length, sparseCount); if (sparseCount > 0) { - if (Utils.Size(values) < sparseCount) - values = new T[sparseCount]; - if (Utils.Size(indices) < sparseCount) - indices = new int[sparseCount]; int j = 0; for (int i = 0; i < src.Length; i++) { - if (!isDefaultPredicate(in src.Values[i])) + if (!isDefaultPredicate(in srcValues[i])) { Contracts.Assert(j < sparseCount); - indices[j] = i; - values[j] = src.Values[i]; + editor.Indices[j] = i; + editor.Values[j] = srcValues[i]; j++; } } @@ -557,7 +559,7 @@ public static void CreateMaybeSparseCopy(in VBuffer src, ref VBuffer ds Contracts.Assert(j == sparseCount); } - dst = new VBuffer(src.Length, sparseCount, values, indices); + dst = editor.Commit(); } /// @@ -666,10 +668,10 @@ private static void ApplyWithCore(in VBuffer src, ref VBuffer< // of the "outer" parameter. There are nine, top level cases. Each case is // considered in this order. - // 1. src.Count == 0. + // 1. srcValues.Length == 0. // 2. src.Dense. // 3. dst.Dense. - // 4. dst.Count == 0. + // 4. dstValues.Length == 0. // Beyond this point the cases can assume both src/dst are sparse non-empty vectors. // We then calculate the size of the resulting output array, then use that to fall @@ -687,20 +689,24 @@ private static void ApplyWithCore(in VBuffer src, ref VBuffer< // Case 5 does not require special handling, because it falls through to other cases // that do the special handling for them. - if (src.Count == 0) + var srcValues = src.GetValues(); + var dstValues = dst.GetValues(); + var dstIndices = dst.GetIndices(); + var editor = VBufferEditor.CreateFromBuffer(ref dst); + if (srcValues.Length == 0) { - // Major case 1, with src.Count == 0. + // Major case 1, with srcValues.Length == 0. if (!outer) return; if (dst.IsDense) { for (int i = 0; i < dst.Length; i++) - manip(i, default(TSrc), ref dst.Values[i]); + manip(i, default(TSrc), ref editor.Values[i]); } else { - for (int i = 0; i < dst.Count; i++) - manip(dst.Indices[i], default(TSrc), ref dst.Values[i]); + for (int i = 0; i < dstValues.Length; i++) + manip(dstIndices[i], default(TSrc), ref editor.Values[i]); } return; } @@ -709,76 +715,81 @@ private static void ApplyWithCore(in VBuffer src, ref VBuffer< { // Major case 2, with src.Dense. if (!dst.IsDense) + { Densify(ref dst); + editor = VBufferEditor.CreateFromBuffer(ref dst); + } + // Both are now dense. Both cases of outer are covered. - for (int i = 0; i < src.Length; i++) - manip(i, src.Values[i], ref dst.Values[i]); + for (int i = 0; i < srcValues.Length; i++) + manip(i, srcValues[i], ref editor.Values[i]); return; } + var srcIndices = src.GetIndices(); if (dst.IsDense) { - // Major case 3, with dst.Dense. Note that !a.Dense. + // Major case 3, with dst.Dense. Note that !src.Dense. if (outer) { int sI = 0; - int sIndex = src.Indices[sI]; + int sIndex = srcIndices[sI]; for (int i = 0; i < dst.Length; ++i) { if (i == sIndex) { - manip(i, src.Values[sI], ref dst.Values[i]); - sIndex = ++sI == src.Count ? src.Length : src.Indices[sI]; + manip(i, srcValues[sI], ref editor.Values[i]); + sIndex = ++sI == srcValues.Length ? src.Length : srcIndices[sI]; } else - manip(i, default(TSrc), ref dst.Values[i]); + manip(i, default(TSrc), ref editor.Values[i]); } } else { - for (int i = 0; i < src.Count; i++) - manip(src.Indices[i], src.Values[i], ref dst.Values[src.Indices[i]]); + for (int i = 0; i < srcValues.Length; i++) + manip(srcIndices[i], srcValues[i], ref editor.Values[srcIndices[i]]); } return; } - if (dst.Count == 0) + if (dstValues.Length == 0) { // Major case 4, with dst empty. Note that !src.Dense. // Neither is dense, and dst is empty. Both cases of outer are covered. - var values = dst.Values; - var indices = dst.Indices; - Utils.EnsureSize(ref values, src.Count, src.Length); - Array.Clear(values, 0, src.Count); - Utils.EnsureSize(ref indices, src.Count, src.Length); - for (int i = 0; i < src.Count; i++) - manip(indices[i] = src.Indices[i], src.Values[i], ref values[i]); - dst = new VBuffer(src.Length, src.Count, values, indices); + editor = VBufferEditor.Create(ref dst, + src.Length, + srcValues.Length, + maxValuesCapacity: src.Length); + editor.Values.Clear(); + for (int i = 0; i < srcValues.Length; i++) + manip(editor.Indices[i] = srcIndices[i], srcValues[i], ref editor.Values[i]); + dst = editor.Commit(); return; } // Beyond this point, we can assume both a and b are sparse with positive count. int dI = 0; - int newCount = dst.Count; + int newCount = dstValues.Length; // Try to find each src index in dst indices, counting how many more we'll add. - for (int sI = 0; sI < src.Count; sI++) + for (int sI = 0; sI < srcValues.Length; sI++) { - int sIndex = src.Indices[sI]; - while (dI < dst.Count && dst.Indices[dI] < sIndex) + int sIndex = srcIndices[sI]; + while (dI < dstValues.Length && dstIndices[dI] < sIndex) dI++; - if (dI == dst.Count) + if (dI == dstValues.Length) { - newCount += src.Count - sI; + newCount += srcValues.Length - sI; break; } - if (dst.Indices[dI] == sIndex) + if (dstIndices[dI] == sIndex) dI++; else newCount++; } Contracts.Assert(newCount > 0); - Contracts.Assert(0 < src.Count && src.Count <= newCount); - Contracts.Assert(0 < dst.Count && dst.Count <= newCount); + Contracts.Assert(0 < srcValues.Length && srcValues.Length <= newCount); + Contracts.Assert(0 < dstValues.Length && dstValues.Length <= newCount); // REVIEW: Densify above a certain threshold, not just if // the output will necessarily become dense? But then we get into @@ -797,21 +808,23 @@ private static void ApplyWithCore(in VBuffer src, ref VBuffer< return; } - if (newCount != src.Count && newCount != dst.Count) + if (newCount != srcValues.Length && newCount != dstValues.Length) { // Major case 6, neither set of indices is a subset of the other. // This subcase used to fall through to another subcase, but this // proved to be inefficient so we go to the little bit of extra work // to handle it here. - var indices = dst.Indices; - var values = dst.Values; - Utils.EnsureSize(ref indices, newCount, dst.Length, keepOld: false); - Utils.EnsureSize(ref values, newCount, dst.Length, keepOld: false); - int sI = src.Count - 1; - dI = dst.Count - 1; - int sIndex = src.Indices[sI]; - int dIndex = dst.Indices[dI]; + editor = VBufferEditor.Create(ref dst, + src.Length, + newCount, + maxValuesCapacity: dst.Length); + var indices = editor.Indices; + var values = editor.Values; + int sI = srcValues.Length - 1; + dI = dstValues.Length - 1; + int sIndex = srcIndices[sI]; + int dIndex = dstIndices[dI]; // Go from the end, so that even if we're writing over dst's vectors in // place, we do not corrupt the data as we are reorganizing it. @@ -820,17 +833,17 @@ private static void ApplyWithCore(in VBuffer src, ref VBuffer< if (sIndex < dIndex) { indices[i] = dIndex; - values[i] = dst.Values[dI]; + values[i] = dstValues[dI]; if (outer) manip(dIndex, default(TSrc), ref values[i]); - dIndex = --dI >= 0 ? dst.Indices[dI] : -1; + dIndex = --dI >= 0 ? dstIndices[dI] : -1; } else if (sIndex > dIndex) { indices[i] = sIndex; values[i] = default(TDst); - manip(sIndex, src.Values[sI], ref values[i]); - sIndex = --sI >= 0 ? src.Indices[sI] : -1; + manip(sIndex, srcValues[sI], ref values[i]); + sIndex = --sI >= 0 ? srcIndices[sI] : -1; } else { @@ -838,84 +851,88 @@ private static void ApplyWithCore(in VBuffer src, ref VBuffer< Contracts.Assert(sIndex >= 0); Contracts.Assert(sIndex == dIndex); indices[i] = dIndex; - values[i] = dst.Values[dI]; - manip(sIndex, src.Values[sI], ref values[i]); - sIndex = --sI >= 0 ? src.Indices[sI] : -1; - dIndex = --dI >= 0 ? dst.Indices[dI] : -1; + values[i] = dstValues[dI]; + manip(sIndex, srcValues[sI], ref values[i]); + sIndex = --sI >= 0 ? srcIndices[sI] : -1; + dIndex = --dI >= 0 ? dstIndices[dI] : -1; } } - dst = new VBuffer(dst.Length, newCount, values, indices); + dst = editor.Commit(); return; } - if (newCount == dst.Count) + if (newCount == dstValues.Length) { - if (newCount == src.Count) + if (newCount == srcValues.Length) { // Major case 7, the set of indices is the same for src and dst. - Contracts.Assert(src.Count == dst.Count); - for (int i = 0; i < src.Count; i++) + Contracts.Assert(srcValues.Length == dstValues.Length); + for (int i = 0; i < srcValues.Length; i++) { - Contracts.Assert(src.Indices[i] == dst.Indices[i]); - manip(src.Indices[i], src.Values[i], ref dst.Values[i]); + Contracts.Assert(srcIndices[i] == dstIndices[i]); + manip(srcIndices[i], srcValues[i], ref editor.Values[i]); } return; } // Major case 8, the indices of src must be a subset of dst's indices. - Contracts.Assert(newCount > src.Count); + Contracts.Assert(newCount > srcValues.Length); dI = 0; if (outer) { int sI = 0; - int sIndex = src.Indices[sI]; - for (int i = 0; i < dst.Count; ++i) + int sIndex = srcIndices[sI]; + for (int i = 0; i < dstValues.Length; ++i) { - if (dst.Indices[i] == sIndex) + if (dstIndices[i] == sIndex) { - manip(sIndex, src.Values[sI], ref dst.Values[i]); - sIndex = ++sI == src.Count ? src.Length : src.Indices[sI]; + manip(sIndex, srcValues[sI], ref editor.Values[i]); + sIndex = ++sI == srcValues.Length ? src.Length : srcIndices[sI]; } else - manip(dst.Indices[i], default(TSrc), ref dst.Values[i]); + manip(dstIndices[i], default(TSrc), ref editor.Values[i]); } } else { - for (int sI = 0; sI < src.Count; sI++) + for (int sI = 0; sI < srcValues.Length; sI++) { - int sIndex = src.Indices[sI]; - while (dst.Indices[dI] < sIndex) + int sIndex = srcIndices[sI]; + while (dstIndices[dI] < sIndex) dI++; - Contracts.Assert(dst.Indices[dI] == sIndex); - manip(sIndex, src.Values[sI], ref dst.Values[dI++]); + Contracts.Assert(dstIndices[dI] == sIndex); + manip(sIndex, srcValues[sI], ref editor.Values[dI++]); } } return; } - if (newCount == src.Count) + if (newCount == srcValues.Length) { // Major case 9, the indices of dst must be a subset of src's indices. Both cases of outer are covered. // First do a "quasi" densification of dst, by making the indices // of dst correspond to those in src. + editor = VBufferEditor.Create(ref dst, newCount, dstValues.Length); int sI = 0; - for (dI = 0; dI < dst.Count; ++dI) + for (dI = 0; dI < dstValues.Length; ++dI) { - int bIndex = dst.Indices[dI]; - while (src.Indices[sI] < bIndex) + int bIndex = dstIndices[dI]; + while (srcIndices[sI] < bIndex) sI++; - Contracts.Assert(src.Indices[sI] == bIndex); - dst.Indices[dI] = sI++; + Contracts.Assert(srcIndices[sI] == bIndex); + editor.Indices[dI] = sI++; } - dst = new VBuffer(newCount, dst.Count, dst.Values, dst.Indices); + dst = editor.Commit(); Densify(ref dst); - int[] indices = dst.Indices; - Utils.EnsureSize(ref indices, src.Count, src.Length, keepOld: false); - Array.Copy(src.Indices, indices, newCount); - dst = new VBuffer(src.Length, newCount, dst.Values, indices); - for (sI = 0; sI < src.Count; sI++) - manip(src.Indices[sI], src.Values[sI], ref dst.Values[sI]); + + editor = VBufferEditor.Create(ref dst, + src.Length, + newCount, + maxValuesCapacity: src.Length); + srcIndices.CopyTo(editor.Indices); + for (sI = 0; sI < srcValues.Length; sI++) + manip(srcIndices[sI], srcValues[sI], ref editor.Values[sI]); + dst = editor.Commit(); return; } @@ -932,73 +949,78 @@ private static void ApplyWithCoreCopy(in VBuffer src, ref VBuf { Contracts.Check(src.Length == dst.Length, "Vectors must have the same dimensionality."); Contracts.CheckValue(manip, nameof(manip)); - Contracts.Assert(Utils.Size(src.Values) >= src.Count); - Contracts.Assert(Utils.Size(dst.Values) >= dst.Count); + int length = src.Length; - if (dst.Count == 0) + var srcValues = src.GetValues(); + var dstValues = dst.GetValues(); + + if (dstValues.Length == 0) { - if (src.Count == 0) - res = new VBuffer(length, 0, res.Values, res.Indices); + if (srcValues.Length == 0) + { + Resize(ref res, length, 0); + } else if (src.IsDense) { - Contracts.Assert(src.Count == src.Length); - TDst[] resValues = Utils.Size(res.Values) >= length ? res.Values : new TDst[length]; + Contracts.Assert(srcValues.Length == src.Length); + var editor = VBufferEditor.Create(ref res, length); for (int i = 0; i < length; i++) - manip(i, src.Values[i], default(TDst), ref resValues[i]); - res = new VBuffer(length, resValues, res.Indices); + manip(i, srcValues[i], default(TDst), ref editor.Values[i]); + res = editor.Commit(); } else { // src is non-empty sparse. - int count = src.Count; + int count = srcValues.Length; Contracts.Assert(0 < count && count < length); - int[] resIndices = Utils.Size(res.Indices) >= count ? res.Indices : new int[count]; - TDst[] resValues = Utils.Size(res.Values) >= count ? res.Values : new TDst[count]; - Array.Copy(src.Indices, resIndices, count); + var editor = VBufferEditor.Create(ref res, length, count); + var srcIndices = src.GetIndices(); + srcIndices.CopyTo(editor.Indices); for (int ii = 0; ii < count; ii++) { - int i = src.Indices[ii]; - resIndices[ii] = i; - manip(i, src.Values[ii], default(TDst), ref resValues[ii]); + int i = srcIndices[ii]; + editor.Indices[ii] = i; + manip(i, srcValues[ii], default(TDst), ref editor.Values[ii]); } - res = new VBuffer(length, count, resValues, resIndices); + res = editor.Commit(); } } else if (dst.IsDense) { - TDst[] resValues = Utils.Size(res.Values) >= length ? res.Values : new TDst[length]; - if (src.Count == 0) + var editor = VBufferEditor.Create(ref res, length); + if (srcValues.Length == 0) { if (outer) { // Apply manip to all slots, as all slots of dst are defined. for (int j = 0; j < length; j++) - manip(j, default(TSrc), dst.Values[j], ref resValues[j]); + manip(j, default(TSrc), dstValues[j], ref editor.Values[j]); } else { // Copy only. No slot of src is defined. for (int j = 0; j < length; j++) - resValues[j] = dst.Values[j]; + editor.Values[j] = dstValues[j]; } - res = new VBuffer(length, resValues, res.Indices); + res = editor.Commit(); } else if (src.IsDense) { - Contracts.Assert(src.Count == src.Length); + Contracts.Assert(srcValues.Length == src.Length); for (int i = 0; i < length; i++) - manip(i, src.Values[i], dst.Values[i], ref resValues[i]); - res = new VBuffer(length, resValues, res.Indices); + manip(i, srcValues[i], dstValues[i], ref editor.Values[i]); + res = editor.Commit(); } else { // src is sparse and non-empty. - int count = src.Count; + int count = srcValues.Length; Contracts.Assert(0 < count && count < length); int ii = 0; - int i = src.Indices[ii]; + var srcIndices = src.GetIndices(); + int i = srcIndices[ii]; if (outer) { // All slots of dst are defined. Always apply manip. @@ -1006,11 +1028,11 @@ private static void ApplyWithCoreCopy(in VBuffer src, ref VBuf { if (j == i) { - manip(j, src.Values[ii], dst.Values[j], ref resValues[j]); - i = ++ii == count ? length : src.Indices[ii]; + manip(j, srcValues[ii], dstValues[j], ref editor.Values[j]); + i = ++ii == count ? length : srcIndices[ii]; } else - manip(j, default(TSrc), dst.Values[j], ref resValues[j]); + manip(j, default(TSrc), dstValues[j], ref editor.Values[j]); } } else @@ -1020,88 +1042,89 @@ private static void ApplyWithCoreCopy(in VBuffer src, ref VBuf { if (j == i) { - manip(j, src.Values[ii], dst.Values[j], ref resValues[j]); - i = ++ii == count ? length : src.Indices[ii]; + manip(j, srcValues[ii], dstValues[j], ref editor.Values[j]); + i = ++ii == count ? length : srcIndices[ii]; } else - resValues[j] = dst.Values[j]; + editor.Values[j] = dstValues[j]; } } - res = new VBuffer(length, resValues, res.Indices); + res = editor.Commit(); } } else { // dst is non-empty sparse - int dstCount = dst.Count; + int dstCount = dstValues.Length; + var dstIndices = dst.GetIndices(); Contracts.Assert(dstCount > 0); - if (src.Count == 0) + if (srcValues.Length == 0) { - int[] resIndices = Utils.Size(res.Indices) >= dstCount ? res.Indices : new int[dstCount]; - TDst[] resValues = Utils.Size(res.Values) >= dstCount ? res.Values : new TDst[dstCount]; + var editor = VBufferEditor.Create(ref res, length, dstCount); if (outer) { for (int jj = 0; jj < dstCount; jj++) { - int j = dst.Indices[jj]; - resIndices[jj] = j; - manip(j, default(TSrc), dst.Values[jj], ref resValues[jj]); + int j = dstIndices[jj]; + editor.Indices[jj] = j; + manip(j, default(TSrc), dstValues[jj], ref editor.Values[jj]); } } else { for (int jj = 0; jj < dstCount; jj++) { - resIndices[jj] = dst.Indices[jj]; - resValues[jj] = dst.Values[jj]; + editor.Indices[jj] = dstIndices[jj]; + editor.Values[jj] = dstValues[jj]; } } - res = new VBuffer(length, dstCount, resValues, resIndices); + res = editor.Commit(); } else if (src.IsDense) { // res will be dense. - TDst[] resValues = Utils.Size(res.Values) >= length ? res.Values : new TDst[length]; + var editor = VBufferEditor.Create(ref res, length); int jj = 0; - int j = dst.Indices[jj]; + int j = dstIndices[jj]; for (int i = 0; i < length; i++) { if (i == j) { - manip(i, src.Values[i], dst.Values[jj], ref resValues[i]); - j = ++jj == dstCount ? length : dst.Indices[jj]; + manip(i, srcValues[i], dstValues[jj], ref editor.Values[i]); + j = ++jj == dstCount ? length : dstIndices[jj]; } else - manip(i, src.Values[i], default(TDst), ref resValues[i]); + manip(i, srcValues[i], default(TDst), ref editor.Values[i]); } - res = new VBuffer(length, resValues, res.Indices); + res = editor.Commit(); } else { // Both src and dst are non-empty sparse. - Contracts.Assert(src.Count > 0); + Contracts.Assert(srcValues.Length > 0); // Find the count of result, which is the size of the union of the indices set of src and dst. int resCount = dstCount; - for (int ii = 0, jj = 0; ii < src.Count; ii++) + var srcIndices = src.GetIndices(); + for (int ii = 0, jj = 0; ii < srcValues.Length; ii++) { - int i = src.Indices[ii]; - while (jj < dst.Count && dst.Indices[jj] < i) + int i = srcIndices[ii]; + while (jj < dstValues.Length && dstIndices[jj] < i) jj++; - if (jj == dst.Count) + if (jj == dstValues.Length) { - resCount += src.Count - ii; + resCount += srcValues.Length - ii; break; } - if (dst.Indices[jj] == i) + if (dstIndices[jj] == i) jj++; else resCount++; } Contracts.Assert(0 < resCount && resCount <= length); - Contracts.Assert(resCount <= src.Count + dstCount); - Contracts.Assert(src.Count <= resCount); + Contracts.Assert(resCount <= srcValues.Length + dstCount); + Contracts.Assert(srcValues.Length <= resCount); Contracts.Assert(dstCount <= resCount); if (resCount == length) @@ -1114,13 +1137,12 @@ private static void ApplyWithCoreCopy(in VBuffer src, ref VBuf } else { - int[] resIndices = Utils.Size(res.Indices) >= resCount ? res.Indices : new int[resCount]; - TDst[] resValues = Utils.Size(res.Values) >= resCount ? res.Values : new TDst[resCount]; + var editor = VBufferEditor.Create(ref res, length, resCount); int ii = 0; - int i = src.Indices[ii]; + int i = srcIndices[ii]; int jj = 0; - int j = dst.Indices[jj]; + int j = dstIndices[jj]; for (int kk = 0; kk < resCount; kk++) { @@ -1128,35 +1150,35 @@ private static void ApplyWithCoreCopy(in VBuffer src, ref VBuf if (i == j) { // Slot (i == j) both defined in src and dst. Apply manip. - resIndices[kk] = i; - manip(i, src.Values[ii], dst.Values[jj], ref resValues[kk]); - i = ++ii == src.Count ? length : src.Indices[ii]; - j = ++jj == dstCount ? length : dst.Indices[jj]; + editor.Indices[kk] = i; + manip(i, srcValues[ii], dstValues[jj], ref editor.Values[kk]); + i = ++ii == srcValues.Length ? length : srcIndices[ii]; + j = ++jj == dstCount ? length : dstIndices[jj]; } else if (i < j) { // Slot i defined only in src, but not in dst. Apply manip. - resIndices[kk] = i; - manip(i, src.Values[ii], default(TDst), ref resValues[kk]); - i = ++ii == src.Count ? length : src.Indices[ii]; + editor.Indices[kk] = i; + manip(i, srcValues[ii], default(TDst), ref editor.Values[kk]); + i = ++ii == srcValues.Length ? length : srcIndices[ii]; } else { // Slot j defined only in dst, but not in src. Apply manip if outer. // Otherwise just copy. - resIndices[kk] = j; + editor.Indices[kk] = j; // REVIEW: Should we move checking of outer outside the loop? if (outer) - manip(j, default(TSrc), dst.Values[jj], ref resValues[kk]); + manip(j, default(TSrc), dstValues[jj], ref editor.Values[kk]); else - resValues[kk] = dst.Values[jj]; - j = ++jj == dstCount ? length : dst.Indices[jj]; + editor.Values[kk] = dstValues[jj]; + j = ++jj == dstCount ? length : dstIndices[jj]; } } - Contracts.Assert(ii == src.Count && jj == dstCount); + Contracts.Assert(ii == srcValues.Length && jj == dstCount); Contracts.Assert(i == length && j == length); - res = new VBuffer(length, resCount, resValues, resIndices); + res = editor.Commit(); } } } @@ -1176,29 +1198,34 @@ public static void ApplyIntoEitherDefined(in VBuffer src, ref { Contracts.CheckValue(func, nameof(func)); + var srcValues = src.GetValues(); + // REVIEW: The analogous WritableVector method insisted on // equal lengths, but I don't care here. - if (src.Count == 0) + if (srcValues.Length == 0) { - dst = new VBuffer(src.Length, src.Count, dst.Values, dst.Indices); + Resize(ref dst, src.Length, 0); return; } - int[] indices = dst.Indices; - TDst[] values = dst.Values; - Utils.EnsureSize(ref values, src.Count, src.Length, keepOld: false); + var editor = VBufferEditor.Create(ref dst, + src.Length, + srcValues.Length, + maxValuesCapacity: src.Length); + Span values = editor.Values; if (src.IsDense) { for (int i = 0; i < src.Length; ++i) - values[i] = func(i, src.Values[i]); + values[i] = func(i, srcValues[i]); } else { - Utils.EnsureSize(ref indices, src.Count, src.Length, keepOld: false); - Array.Copy(src.Indices, indices, src.Count); - for (int i = 0; i < src.Count; ++i) - values[i] = func(src.Indices[i], src.Values[i]); + Span indices = editor.Indices; + var srcIndices = src.GetIndices(); + srcIndices.CopyTo(indices); + for (int i = 0; i < srcValues.Length; ++i) + values[i] = func(srcIndices[i], srcValues[i]); } - dst = new VBuffer(src.Length, src.Count, values, indices); + dst = editor.Commit(); } /// @@ -1225,54 +1252,61 @@ public static void ApplyInto(in VBuffer a, in VBuffer // 5. b's indices are a subset of a's. // 6. Neither a nor b's indices are a subset of the other. - if (a.Count == 0 && b.Count == 0) + var aValues = a.GetValues(); + var bValues = b.GetValues(); + if (aValues.Length == 0 && bValues.Length == 0) { // Case 1. Output will be empty. - dst = new VBuffer(a.Length, 0, dst.Values, dst.Indices); + Resize(ref dst, a.Length, 0); return; } int aI = 0; int bI = 0; - TDst[] values = dst.Values; + ReadOnlySpan aIndices; + ReadOnlySpan bIndices; + VBufferEditor editor; if (a.IsDense || b.IsDense) { // Case 2. One of the two inputs is dense. The output will be dense. - Utils.EnsureSize(ref values, a.Length, a.Length, keepOld: false); - + editor = VBufferEditor.Create(ref dst, a.Length); if (!a.IsDense) { // a is sparse, b is dense + aIndices = a.GetIndices(); for (int i = 0; i < b.Length; i++) { - TSrc1 aVal = (aI < a.Count && i == a.Indices[aI]) ? a.Values[aI++] : default(TSrc1); - values[i] = func(i, aVal, b.Values[i]); + TSrc1 aVal = (aI < aIndices.Length && i == aIndices[aI]) ? aValues[aI++] : default(TSrc1); + editor.Values[i] = func(i, aVal, bValues[i]); } } else if (!b.IsDense) { // b is sparse, a is dense + bIndices = b.GetIndices(); for (int i = 0; i < a.Length; i++) { - TSrc2 bVal = (bI < b.Count && i == b.Indices[bI]) ? b.Values[bI++] : default(TSrc2); - values[i] = func(i, a.Values[i], bVal); + TSrc2 bVal = (bI < bIndices.Length && i == bIndices[bI]) ? bValues[bI++] : default(TSrc2); + editor.Values[i] = func(i, aValues[i], bVal); } } else { // both dense for (int i = 0; i < a.Length; i++) - values[i] = func(i, a.Values[i], b.Values[i]); + editor.Values[i] = func(i, aValues[i], bValues[i]); } - dst = new VBuffer(a.Length, values, dst.Indices); + dst = editor.Commit(); return; } // a, b both sparse. int newCount = 0; - while (aI < a.Count && bI < b.Count) + aIndices = a.GetIndices(); + bIndices = b.GetIndices(); + while (aI < aIndices.Length && bI < bIndices.Length) { - int aCompB = a.Indices[aI] - b.Indices[bI]; + int aCompB = aIndices[aI] - bIndices[bI]; if (aCompB <= 0) // a is no larger than b. aI++; if (aCompB >= 0) // b is no larger than a. @@ -1280,58 +1314,57 @@ public static void ApplyInto(in VBuffer a, in VBuffer newCount++; } - if (aI < a.Count) - newCount += a.Count - aI; - if (bI < b.Count) - newCount += b.Count - bI; + if (aI < aIndices.Length) + newCount += aIndices.Length - aI; + if (bI < bIndices.Length) + newCount += bIndices.Length - bI; // REVIEW: Worth optimizing the newCount == a.Length case? // Probably not... - int[] indices = dst.Indices; - Utils.EnsureSize(ref indices, newCount, a.Length, keepOld: false); - Utils.EnsureSize(ref values, newCount, a.Length, keepOld: false); + editor = VBufferEditor.Create(ref dst, a.Length, newCount); + Span indices = editor.Indices; - if (newCount == b.Count) + if (newCount == bValues.Length) { - if (newCount == a.Count) + if (newCount == aValues.Length) { // Case 3, a and b actually have the same indices! - Array.Copy(a.Indices, indices, a.Count); - for (aI = 0; aI < a.Count; aI++) + aIndices.CopyTo(indices); + for (aI = 0; aI < aValues.Length; aI++) { - Contracts.Assert(a.Indices[aI] == b.Indices[aI]); - values[aI] = func(a.Indices[aI], a.Values[aI], b.Values[aI]); + Contracts.Assert(aIndices[aI] == bIndices[aI]); + editor.Values[aI] = func(aIndices[aI], aValues[aI], bValues[aI]); } } else { // Case 4, a's indices are a subset of b's. - Array.Copy(b.Indices, indices, b.Count); + bIndices.CopyTo(indices); aI = 0; - for (bI = 0; aI < a.Count && bI < b.Count; bI++) + for (bI = 0; aI < aValues.Length && bI < bValues.Length; bI++) { - Contracts.Assert(a.Indices[aI] >= b.Indices[bI]); - TSrc1 aVal = a.Indices[aI] == b.Indices[bI] ? a.Values[aI++] : default(TSrc1); - values[bI] = func(b.Indices[bI], aVal, b.Values[bI]); + Contracts.Assert(aIndices[aI] >= bIndices[bI]); + TSrc1 aVal = aIndices[aI] == bIndices[bI] ? aValues[aI++] : default(TSrc1); + editor.Values[bI] = func(bIndices[bI], aVal, bValues[bI]); } - for (; bI < b.Count; bI++) - values[bI] = func(b.Indices[bI], default(TSrc1), b.Values[bI]); + for (; bI < bValues.Length; bI++) + editor.Values[bI] = func(bIndices[bI], default(TSrc1), bValues[bI]); } } - else if (newCount == a.Count) + else if (newCount == aValues.Length) { // Case 5, b's indices are a subset of a's. - Array.Copy(a.Indices, indices, a.Count); + aIndices.CopyTo(indices); bI = 0; - for (aI = 0; bI < b.Count && aI < a.Count; aI++) + for (aI = 0; bI < bValues.Length && aI < aValues.Length; aI++) { - Contracts.Assert(b.Indices[bI] >= a.Indices[aI]); - TSrc2 bVal = a.Indices[aI] == b.Indices[bI] ? b.Values[bI++] : default(TSrc2); - values[aI] = func(a.Indices[aI], a.Values[aI], bVal); + Contracts.Assert(bIndices[bI] >= aIndices[aI]); + TSrc2 bVal = aIndices[aI] == bIndices[bI] ? bValues[bI++] : default(TSrc2); + editor.Values[aI] = func(aIndices[aI], aValues[aI], bVal); } - for (; aI < a.Count; aI++) - values[aI] = func(a.Indices[aI], a.Values[aI], default(TSrc2)); + for (; aI < aValues.Length; aI++) + editor.Values[aI] = func(aIndices[aI], aValues[aI], default(TSrc2)); } else { @@ -1339,49 +1372,49 @@ public static void ApplyInto(in VBuffer a, in VBuffer int newI = aI = bI = 0; TSrc1 aVal = default(TSrc1); TSrc2 bVal = default(TSrc2); - while (aI < a.Count && bI < b.Count) + while (aI < aIndices.Length && bI < bIndices.Length) { - int aCompB = a.Indices[aI] - b.Indices[bI]; + int aCompB = aIndices[aI] - bIndices[bI]; int index = 0; if (aCompB < 0) { - index = a.Indices[aI]; - aVal = a.Values[aI++]; + index = aIndices[aI]; + aVal = aValues[aI++]; bVal = default(TSrc2); } else if (aCompB > 0) { - index = b.Indices[bI]; + index = bIndices[bI]; aVal = default(TSrc1); - bVal = b.Values[bI++]; + bVal = bValues[bI++]; } else { - index = a.Indices[aI]; - Contracts.Assert(index == b.Indices[bI]); - aVal = a.Values[aI++]; - bVal = b.Values[bI++]; + index = aIndices[aI]; + Contracts.Assert(index == bIndices[bI]); + aVal = aValues[aI++]; + bVal = bValues[bI++]; } - values[newI] = func(index, aVal, bVal); + editor.Values[newI] = func(index, aVal, bVal); indices[newI++] = index; } - for (; aI < a.Count; aI++) + for (; aI < aIndices.Length; aI++) { - int index = a.Indices[aI]; - values[newI] = func(index, a.Values[aI], default(TSrc2)); + int index = aIndices[aI]; + editor.Values[newI] = func(index, aValues[aI], default(TSrc2)); indices[newI++] = index; } - for (; bI < b.Count; bI++) + for (; bI < bIndices.Length; bI++) { - int index = b.Indices[bI]; - values[newI] = func(index, default(TSrc1), b.Values[bI]); + int index = bIndices[bI]; + editor.Values[newI] = func(index, default(TSrc1), bValues[bI]); indices[newI++] = index; } } - dst = new VBuffer(a.Length, newCount, values, indices); + dst = editor.Commit(); } /// @@ -1390,14 +1423,26 @@ public static void ApplyInto(in VBuffer a, in VBuffer public static void Copy(List src, ref VBuffer dst, int length) { Contracts.CheckParam(0 <= length && length <= Utils.Size(src), nameof(length)); - var values = dst.Values; + var editor = VBufferEditor.Create(ref dst, length); if (length > 0) { - if (Utils.Size(values) < length) - values = new T[length]; - src.CopyTo(values); + // List.CopyTo should have an overload for Span - https://github.com/dotnet/corefx/issues/33006 + for (int i = 0; i < length; i++) + { + editor.Values[i] = src[i]; + } } - dst = new VBuffer(length, values, dst.Indices); + dst = editor.Commit(); + } + + /// + /// Updates the logical length and number of physical values to be represented in + /// , while preserving the underlying buffers. + /// + public static void Resize(ref VBuffer dst, int newLogicalLength, int? valuesCount = null) + { + dst = VBufferEditor.Create(ref dst, newLogicalLength, valuesCount) + .Commit(); } } } diff --git a/src/Microsoft.ML.CpuMath/AlignedArray.cs b/src/Microsoft.ML.CpuMath/AlignedArray.cs index 87583a8ef6..cfbee22eab 100644 --- a/src/Microsoft.ML.CpuMath/AlignedArray.cs +++ b/src/Microsoft.ML.CpuMath/AlignedArray.cs @@ -16,13 +16,14 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath /// /// The ctor takes an alignment value, which must be a power of two at least sizeof(Float). /// - public sealed class AlignedArray + [BestFriend] + internal sealed class AlignedArray { // Items includes "head" items filled with NaN, followed by _size entries, followed by "tail" // items, also filled with NaN. Note that _size * sizeof(Float) is divisible by _cbAlign. // It is illegal to access any slot outsize [_base, _base + _size). This is internal so clients // can easily pin it. - internal Float[] Items; + public Float[] Items; private readonly int _size; // Must be divisible by (_cbAlign / sizeof(Float)). private readonly int _cbAlign; // The alignment in bytes, a power of two, divisible by sizeof(Float). @@ -49,7 +50,7 @@ public AlignedArray(int size, int cbAlign) _lock = new object(); } - internal unsafe int GetBase(long addr) + public unsafe int GetBase(long addr) { #if DEBUG fixed (Float* pv = Items) @@ -125,28 +126,23 @@ public void CopyTo(int start, Float[] dst, int index, int count) Array.Copy(Items, start + _base, dst, index, count); } - public void CopyFrom(Float[] src, int index, int count) + public void CopyFrom(ReadOnlySpan src) { - Contracts.Assert(0 <= count && count <= _size); - Contracts.Assert(src != null); - Contracts.Assert(0 <= index && index <= src.Length - count); - Array.Copy(src, index, Items, _base, count); + Contracts.Assert(src.Length <= _size); + src.CopyTo(Items.AsSpan(_base)); } - public void CopyFrom(int start, Float[] src, int index, int count) + public void CopyFrom(int start, ReadOnlySpan src) { - Contracts.Assert(0 <= count); - Contracts.Assert(0 <= start && start <= _size - count); - Contracts.Assert(src != null); - Contracts.Assert(0 <= index && index <= src.Length - count); - Array.Copy(src, index, Items, start + _base, count); + Contracts.Assert(0 <= start && start <= _size - src.Length); + src.CopyTo(Items.AsSpan(start + _base)); } // Copies values from a sparse vector. // valuesSrc contains only the non-zero entries. Those are copied into their logical positions in the dense array. // rgposSrc contains the logical positions + offset of the non-zero entries in the dense array. // rgposSrc runs parallel to the valuesSrc array. - public void CopyFrom(int[] rgposSrc, Float[] valuesSrc, int posMin, int iposMin, int iposLim, bool zeroItems) + public void CopyFrom(ReadOnlySpan rgposSrc, ReadOnlySpan valuesSrc, int posMin, int iposMin, int iposLim, bool zeroItems) { Contracts.Assert(rgposSrc != null); Contracts.Assert(valuesSrc != null); diff --git a/src/Microsoft.ML.CpuMath/AlignedMatrix.cs b/src/Microsoft.ML.CpuMath/AlignedMatrix.cs index f76ec7815d..5412e5fd77 100644 --- a/src/Microsoft.ML.CpuMath/AlignedMatrix.cs +++ b/src/Microsoft.ML.CpuMath/AlignedMatrix.cs @@ -18,7 +18,8 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath /// the AlignedArray with a logical size, which does not include padding, while the AlignedArray /// size does include padding. /// - public sealed class CpuAlignedVector : ICpuVector + [BestFriend] + internal sealed class CpuAlignedVector : ICpuVector { private readonly AlignedArray _items; private readonly int _size; // The logical size. @@ -180,7 +181,7 @@ public void CopyFrom(Float[] src, ref int index) { Contracts.AssertValue(src); Contracts.Assert(0 <= index && index <= src.Length - _size); - _items.CopyFrom(src, index, _size); + _items.CopyFrom(src.AsSpan(index, _size)); index += _size; } @@ -198,7 +199,7 @@ public void CopyFrom(int ivDst, Float[] src, int ivSrc, int count) Contracts.Assert(0 <= count && count <= src.Length); Contracts.Assert(0 <= ivDst && ivDst <= _size - count); Contracts.Assert(0 <= ivSrc && ivSrc <= src.Length - count); - _items.CopyFrom(ivDst, src, ivSrc, _size); + _items.CopyFrom(ivDst, src.AsSpan(ivSrc, _size)); } /// @@ -231,7 +232,8 @@ IEnumerator IEnumerable.GetEnumerator() /// This implements a logical matrix of Floats that is automatically aligned for SSE/AVX operations. /// The ctor takes an alignment value, which must be a power of two at least sizeof(Float). /// - public abstract class CpuAlignedMatrixBase + [BestFriend] + internal abstract class CpuAlignedMatrixBase { // _items includes "head" items filled with NaN, followed by RunLenPhy * RunCntPhy entries, followed by // "tail" items, also filled with NaN. Note that RunLenPhy and RunCntPhy are divisible by the alignment @@ -393,7 +395,8 @@ public void CopyFrom(CpuAlignedMatrixBase src) /// This implements a logical row-major matrix of Floats that is automatically aligned for SSE/AVX operations. /// The ctor takes an alignment value, which must be a power of two at least sizeof(Float). /// - public abstract class CpuAlignedMatrixRowBase : CpuAlignedMatrixBase, ICpuBuffer + [BestFriend] + internal abstract class CpuAlignedMatrixRowBase : CpuAlignedMatrixBase, ICpuBuffer { protected CpuAlignedMatrixRowBase(int crow, int ccol, int cbAlign) : base(ccol, crow, cbAlign) @@ -461,14 +464,14 @@ public void CopyFrom(Float[] src, ref int ivSrc) if (ColCount == ColCountPhy) { - Items.CopyFrom(src, ivSrc, ValueCount); + Items.CopyFrom(src.AsSpan(ivSrc, ValueCount)); ivSrc += ValueCount; } else { for (int row = 0; row < RowCount; row++) { - Items.CopyFrom(row * ColCountPhy, src, ivSrc, ColCount); + Items.CopyFrom(row * ColCountPhy, src.AsSpan(ivSrc, ColCount)); ivSrc += ColCount; } } @@ -497,7 +500,8 @@ IEnumerator IEnumerable.GetEnumerator() /// This implements a row-major matrix of Floats that is automatically aligned for SSE/AVX operations. /// The ctor takes an alignment value, which must be a power of two at least sizeof(Float). /// - public sealed class CpuAlignedMatrixRow : CpuAlignedMatrixRowBase, ICpuFullMatrix + [BestFriend] + internal sealed class CpuAlignedMatrixRow : CpuAlignedMatrixRowBase, ICpuFullMatrix { public CpuAlignedMatrixRow(int crow, int ccol, int cbAlign) : base(crow, ccol, cbAlign) @@ -558,7 +562,8 @@ public void ZeroItems(int[] indices) /// This implements a logical matrix of Floats that is automatically aligned for SSE/AVX operations. /// The ctor takes an alignment value, which must be a power of two at least sizeof(Float). /// - public sealed class CpuAlignedMatrixCol : CpuAlignedMatrixBase, ICpuFullMatrix + [BestFriend] + internal sealed class CpuAlignedMatrixCol : CpuAlignedMatrixBase, ICpuFullMatrix { /// /// Allocate an aligned matrix with the given alignment (in bytes). diff --git a/src/Microsoft.ML.CpuMath/AssemblyInfo.cs b/src/Microsoft.ML.CpuMath/AssemblyInfo.cs index cb45bf5608..17bdf84324 100644 --- a/src/Microsoft.ML.CpuMath/AssemblyInfo.cs +++ b/src/Microsoft.ML.CpuMath/AssemblyInfo.cs @@ -2,8 +2,20 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Reflection; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; +using Microsoft.ML; -[assembly: InternalsVisibleTo("Microsoft.ML.StandardLearners, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] \ No newline at end of file +[assembly: InternalsVisibleTo("Microsoft.ML.CpuMath.UnitTests.netstandard" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo("Microsoft.ML.CpuMath.UnitTests.netcoreapp" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo("Microsoft.ML.Data" + PublicKey.Value)] +[assembly: InternalsVisibleTo("Microsoft.ML.FastTree" + PublicKey.Value)] +[assembly: InternalsVisibleTo("Microsoft.ML.HalLearners" + PublicKey.Value)] +[assembly: InternalsVisibleTo("Microsoft.ML.KMeansClustering" + PublicKey.Value)] +[assembly: InternalsVisibleTo("Microsoft.ML.PCA" + PublicKey.Value)] +[assembly: InternalsVisibleTo("Microsoft.ML.StandardLearners" + PublicKey.Value)] +[assembly: InternalsVisibleTo("Microsoft.ML.Sweeper" + PublicKey.Value)] +[assembly: InternalsVisibleTo("Microsoft.ML.TimeSeries" + PublicKey.Value)] +[assembly: InternalsVisibleTo("Microsoft.ML.Transforms" + PublicKey.Value)] +[assembly: InternalsVisibleTo("Microsoft.ML.Benchmarks.Tests" + PublicKey.TestValue)] + +[assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.CpuMath/AvxIntrinsics.cs b/src/Microsoft.ML.CpuMath/AvxIntrinsics.cs index a3f0582800..55e692eb63 100644 --- a/src/Microsoft.ML.CpuMath/AvxIntrinsics.cs +++ b/src/Microsoft.ML.CpuMath/AvxIntrinsics.cs @@ -951,6 +951,8 @@ public static unsafe void Scale(float scale, Span dst) public static unsafe void ScaleSrcU(float scale, ReadOnlySpan src, Span dst, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -1044,6 +1046,8 @@ public static unsafe void ScaleAddU(float a, float b, Span dst) public static unsafe void AddScaleU(float scale, ReadOnlySpan src, Span dst, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -1096,6 +1100,8 @@ public static unsafe void AddScaleU(float scale, ReadOnlySpan src, Span src, ReadOnlySpan dst, Span result, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) fixed (float* pres = &MemoryMarshal.GetReference(result)) @@ -1150,6 +1156,8 @@ public static unsafe void AddScaleCopyU(float scale, ReadOnlySpan src, Re public static unsafe void AddScaleSU(float scale, ReadOnlySpan src, ReadOnlySpan idx, Span dst, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (int* pidx = &MemoryMarshal.GetReference(idx)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) @@ -1198,6 +1206,8 @@ public static unsafe void AddScaleSU(float scale, ReadOnlySpan src, ReadO public static unsafe void AddU(ReadOnlySpan src, Span dst, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -1245,6 +1255,8 @@ public static unsafe void AddU(ReadOnlySpan src, Span dst, int cou public static unsafe void AddSU(ReadOnlySpan src, ReadOnlySpan idx, Span dst, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (int* pidx = &MemoryMarshal.GetReference(idx)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) @@ -1726,6 +1738,8 @@ public static unsafe float MaxAbsDiffU(float mean, ReadOnlySpan src) public static unsafe float DotU(ReadOnlySpan src, ReadOnlySpan dst, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -1778,6 +1792,8 @@ public static unsafe float DotU(ReadOnlySpan src, ReadOnlySpan dst public static unsafe float DotSU(ReadOnlySpan src, ReadOnlySpan dst, ReadOnlySpan idx, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) fixed (int* pidx = &MemoryMarshal.GetReference(idx)) @@ -1832,6 +1848,8 @@ public static unsafe float DotSU(ReadOnlySpan src, ReadOnlySpan ds public static unsafe float Dist2(ReadOnlySpan src, ReadOnlySpan dst, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { diff --git a/src/Microsoft.ML.CpuMath/CpuAligenedMathUtils.cs b/src/Microsoft.ML.CpuMath/CpuAligenedMathUtils.cs index eacdd85213..d4c8e8e087 100644 --- a/src/Microsoft.ML.CpuMath/CpuAligenedMathUtils.cs +++ b/src/Microsoft.ML.CpuMath/CpuAligenedMathUtils.cs @@ -4,7 +4,8 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath { - public static class CpuAligenedMathUtils + [BestFriend] + internal static class CpuAligenedMathUtils where TMatrix : CpuAlignedMatrixBase, ICpuFullMatrix { /// diff --git a/src/Microsoft.ML.CpuMath/CpuMathUtils.netcoreapp.cs b/src/Microsoft.ML.CpuMath/CpuMathUtils.netcoreapp.cs index e9d95ccc1d..ed5be5390a 100644 --- a/src/Microsoft.ML.CpuMath/CpuMathUtils.netcoreapp.cs +++ b/src/Microsoft.ML.CpuMath/CpuMathUtils.netcoreapp.cs @@ -8,7 +8,7 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath { - public static partial class CpuMathUtils + internal static partial class CpuMathUtils { // The count of bytes in Vector128, corresponding to _cbAlign in AlignedArray private const int Vector128Alignment = 16; @@ -88,10 +88,9 @@ public static void MatrixTimesSource(bool transpose, AlignedArray matrix, Aligne } } - public static void MatrixTimesSource(AlignedArray matrix, int[] rgposSrc, AlignedArray sourceValues, + public static void MatrixTimesSource(AlignedArray matrix, ReadOnlySpan rgposSrc, AlignedArray sourceValues, int posMin, int iposMin, int iposLimit, AlignedArray destination, int stride) { - Contracts.AssertValue(rgposSrc); Contracts.Assert(iposMin >= 0); Contracts.Assert(iposMin <= iposLimit); Contracts.Assert(iposLimit <= rgposSrc.Length); diff --git a/src/Microsoft.ML.CpuMath/CpuMathUtils.netstandard.cs b/src/Microsoft.ML.CpuMath/CpuMathUtils.netstandard.cs index bc9569d390..b3f46f0a5a 100644 --- a/src/Microsoft.ML.CpuMath/CpuMathUtils.netstandard.cs +++ b/src/Microsoft.ML.CpuMath/CpuMathUtils.netstandard.cs @@ -7,7 +7,8 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath { - public static partial class CpuMathUtils + [BestFriend] + internal static partial class CpuMathUtils { // The count of bytes in Vector128, corresponding to _cbAlign in AlignedArray private const int Vector128Alignment = 16; @@ -18,7 +19,7 @@ public static int GetVectorAlignment() public static void MatrixTimesSource(bool transpose, AlignedArray matrix, AlignedArray source, AlignedArray destination, int stride) => SseUtils.MatTimesSrc(transpose, matrix, source, destination, stride); - public static void MatrixTimesSource(AlignedArray matrix, int[] rgposSrc, AlignedArray sourceValues, + public static void MatrixTimesSource(AlignedArray matrix, ReadOnlySpan rgposSrc, AlignedArray sourceValues, int posMin, int iposMin, int iposLimit, AlignedArray destination, int stride) => SseUtils.MatTimesSrc(matrix, rgposSrc, sourceValues, posMin, iposMin, iposLimit, destination, stride); public static void Add(float value, Span destination) => SseUtils.Add(value, destination); diff --git a/src/Microsoft.ML.CpuMath/EigenUtils.cs b/src/Microsoft.ML.CpuMath/EigenUtils.cs index 622849d368..fc20b8bfe7 100644 --- a/src/Microsoft.ML.CpuMath/EigenUtils.cs +++ b/src/Microsoft.ML.CpuMath/EigenUtils.cs @@ -7,8 +7,9 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath { + [BestFriend] // REVIEW: improve perf with SSE and Multithreading - public static class EigenUtils + internal static class EigenUtils { //Compute the Eigen-decomposition of a symmetric matrix // REVIEW: use matrix/vector operations, not Array Math diff --git a/src/Microsoft.ML.CpuMath/ICpuBuffer.cs b/src/Microsoft.ML.CpuMath/ICpuBuffer.cs index ad55f5c8c6..7f0c0e8126 100644 --- a/src/Microsoft.ML.CpuMath/ICpuBuffer.cs +++ b/src/Microsoft.ML.CpuMath/ICpuBuffer.cs @@ -10,7 +10,8 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath { using Conditional = System.Diagnostics.ConditionalAttribute; - public interface ICpuBuffer : IEnumerable, IDisposable + [BestFriend] + internal interface ICpuBuffer : IEnumerable, IDisposable where T : struct { int ValueCount { get; } @@ -39,7 +40,8 @@ public interface ICpuBuffer : IEnumerable, IDisposable /// /// A logical math vector. /// - public interface ICpuVector : ICpuBuffer + [BestFriend] + internal interface ICpuVector : ICpuBuffer { /// /// The vector size @@ -52,7 +54,8 @@ public interface ICpuVector : ICpuBuffer Float GetValue(int i); } - public interface ICpuMatrix : ICpuBuffer + [BestFriend] + internal interface ICpuMatrix : ICpuBuffer { /// /// The row count @@ -68,7 +71,8 @@ public interface ICpuMatrix : ICpuBuffer /// /// A 2-dimensional matrix. /// - public interface ICpuFullMatrix : ICpuMatrix + [BestFriend] + internal interface ICpuFullMatrix : ICpuMatrix { /// /// Copy the values for the given row into dst, starting at slot ivDst. diff --git a/src/Microsoft.ML.CpuMath/IntUtils.cs b/src/Microsoft.ML.CpuMath/IntUtils.cs index 2492dddaff..cec2b71dfb 100644 --- a/src/Microsoft.ML.CpuMath/IntUtils.cs +++ b/src/Microsoft.ML.CpuMath/IntUtils.cs @@ -9,7 +9,8 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath { - public static class IntUtils + [BestFriend] + internal static class IntUtils { /// /// Add src to the 128 bits contained in dst. Ignores overflow, that is, the addition is done modulo 2^128. diff --git a/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj b/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj index f9d3d90b59..8fa97116ba 100644 --- a/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj +++ b/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj @@ -5,7 +5,6 @@ netstandard2.0;netcoreapp3.0 Microsoft.ML.CpuMath true - $(DefineConstants);CORECLR;PRIVATE_CONTRACTS 7.3 @@ -13,13 +12,6 @@ - - - - - - - @@ -32,4 +24,8 @@ - \ No newline at end of file + + + + + diff --git a/src/Microsoft.ML.CpuMath/ProbabilityFunctions.cs b/src/Microsoft.ML.CpuMath/ProbabilityFunctions.cs index 6b9659e753..ed1208c80c 100644 --- a/src/Microsoft.ML.CpuMath/ProbabilityFunctions.cs +++ b/src/Microsoft.ML.CpuMath/ProbabilityFunctions.cs @@ -9,7 +9,8 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath /// /// Probability Functions. /// - public sealed class ProbabilityFunctions + [BestFriend] + internal sealed class ProbabilityFunctions { /// /// The approximate complimentary error function (i.e., 1-erf). diff --git a/src/Microsoft.ML.CpuMath/Sse.cs b/src/Microsoft.ML.CpuMath/Sse.cs index 3ff59f2840..b3f00d1136 100644 --- a/src/Microsoft.ML.CpuMath/Sse.cs +++ b/src/Microsoft.ML.CpuMath/Sse.cs @@ -11,7 +11,8 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath /// Keep Sse.cs in sync with Avx.cs. When making changes to one, use BeyondCompare or a similar tool /// to view diffs and propagate appropriate changes to the other. /// - public static class SseUtils + [BestFriend] + internal static class SseUtils { public const int CbAlign = 16; @@ -57,13 +58,12 @@ public static void MatTimesSrc(bool tran, AlignedArray mat, AlignedArray src, Al } } - public static void MatTimesSrc(AlignedArray mat, int[] rgposSrc, AlignedArray srcValues, + public static void MatTimesSrc(AlignedArray mat, ReadOnlySpan rgposSrc, AlignedArray srcValues, int posMin, int iposMin, int iposLim, AlignedArray dst, int crun) { Contracts.Assert(Compat(mat)); Contracts.Assert(Compat(srcValues)); Contracts.Assert(Compat(dst)); - Contracts.AssertValue(rgposSrc); Contracts.Assert(0 <= iposMin && iposMin <= iposLim && iposLim <= rgposSrc.Length); Contracts.Assert(mat.Size == dst.Size * srcValues.Size); diff --git a/src/Microsoft.ML.CpuMath/SseIntrinsics.cs b/src/Microsoft.ML.CpuMath/SseIntrinsics.cs index cf85a98132..5d6f2ed134 100644 --- a/src/Microsoft.ML.CpuMath/SseIntrinsics.cs +++ b/src/Microsoft.ML.CpuMath/SseIntrinsics.cs @@ -276,7 +276,7 @@ public static unsafe void MatMul(ReadOnlySpan mat, ReadOnlySpan sr } // Partial sparse source vector. - public static unsafe void MatMulP(AlignedArray mat, int[] rgposSrc, AlignedArray src, + public static unsafe void MatMulP(AlignedArray mat, ReadOnlySpan rgposSrc, AlignedArray src, int posMin, int iposMin, int iposEnd, AlignedArray dst, int crow, int ccol) { MatMulP(mat.Items, rgposSrc, src.Items, posMin, iposMin, iposEnd, dst.Items, crow, ccol); @@ -893,6 +893,8 @@ public static unsafe void Scale(float scale, Span dst) public static unsafe void ScaleSrcU(float scale, ReadOnlySpan src, Span dst, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -961,6 +963,8 @@ public static unsafe void ScaleAddU(float a, float b, Span dst) public static unsafe void AddScaleU(float scale, ReadOnlySpan src, Span dst, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -1000,6 +1004,8 @@ public static unsafe void AddScaleU(float scale, ReadOnlySpan src, Span src, ReadOnlySpan dst, Span result, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) fixed (float* pres = &MemoryMarshal.GetReference(result)) @@ -1041,6 +1047,8 @@ public static unsafe void AddScaleCopyU(float scale, ReadOnlySpan src, Re public static unsafe void AddScaleSU(float scale, ReadOnlySpan src, ReadOnlySpan idx, Span dst, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (int* pidx = &MemoryMarshal.GetReference(idx)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) @@ -1077,6 +1085,8 @@ public static unsafe void AddScaleSU(float scale, ReadOnlySpan src, ReadO public static unsafe void AddU(ReadOnlySpan src, Span dst, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -1112,6 +1122,8 @@ public static unsafe void AddU(ReadOnlySpan src, Span dst, int cou public static unsafe void AddSU(ReadOnlySpan src, ReadOnlySpan idx, Span dst, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (int* pidx = &MemoryMarshal.GetReference(idx)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) @@ -1145,6 +1157,9 @@ public static unsafe void AddSU(ReadOnlySpan src, ReadOnlySpan idx, public static unsafe void MulElementWiseU(ReadOnlySpan src1, ReadOnlySpan src2, Span dst, int count) { + Contracts.Assert(src1.Length == dst.Length); + Contracts.Assert(src2.Length == dst.Length); + fixed (float* psrc1 = &MemoryMarshal.GetReference(src1)) fixed (float* psrc2 = &MemoryMarshal.GetReference(src2)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) @@ -1479,6 +1494,8 @@ public static unsafe float MaxAbsDiffU(float mean, ReadOnlySpan src) public static unsafe float DotU(ReadOnlySpan src, ReadOnlySpan dst, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -1518,6 +1535,8 @@ public static unsafe float DotU(ReadOnlySpan src, ReadOnlySpan dst public static unsafe float DotSU(ReadOnlySpan src, ReadOnlySpan dst, ReadOnlySpan idx, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) fixed (int* pidx = &MemoryMarshal.GetReference(idx)) @@ -1559,6 +1578,8 @@ public static unsafe float DotSU(ReadOnlySpan src, ReadOnlySpan ds public static unsafe float Dist2(ReadOnlySpan src, ReadOnlySpan dst, int count) { + Contracts.Assert(src.Length == dst.Length); + fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { diff --git a/src/Microsoft.ML.CpuMath/Thunk.cs b/src/Microsoft.ML.CpuMath/Thunk.cs index 86e3992f62..faf0b82c66 100644 --- a/src/Microsoft.ML.CpuMath/Thunk.cs +++ b/src/Microsoft.ML.CpuMath/Thunk.cs @@ -3,11 +3,11 @@ // See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; -using System.Runtime.CompilerServices; using System.Security; namespace Microsoft.ML.Runtime.Internal.CpuMath { + [BestFriend] internal static unsafe class Thunk { internal const string NativePath = "CpuMathNative"; diff --git a/src/Microsoft.ML.Data/Commands/CrossValidationCommand.cs b/src/Microsoft.ML.Data/Commands/CrossValidationCommand.cs index 24b84d38c1..2f20462290 100644 --- a/src/Microsoft.ML.Data/Commands/CrossValidationCommand.cs +++ b/src/Microsoft.ML.Data/Commands/CrossValidationCommand.cs @@ -21,7 +21,8 @@ namespace Microsoft.ML.Runtime.Data { - public sealed class CrossValidationCommand : DataCommand.ImplBase + [BestFriend] + internal sealed class CrossValidationCommand : DataCommand.ImplBase { // REVIEW: We need a way to specify different data sets, not just LabeledExamples. public sealed class Arguments : DataCommand.ArgumentsBase diff --git a/src/Microsoft.ML.Data/Commands/DataCommand.cs b/src/Microsoft.ML.Data/Commands/DataCommand.cs index f617fb206f..5c5ceef6f7 100644 --- a/src/Microsoft.ML.Data/Commands/DataCommand.cs +++ b/src/Microsoft.ML.Data/Commands/DataCommand.cs @@ -17,7 +17,8 @@ namespace Microsoft.ML.Runtime.Data /// /// This holds useful base classes for commands that ingest a primary dataset and deal with associated model files. /// - public static class DataCommand + [BestFriend] + internal static class DataCommand { public abstract class ArgumentsBase { @@ -56,7 +57,8 @@ public abstract class ArgumentsBase public KeyValuePair>[] Transform; } - public abstract class ImplBase : ICommand + [BestFriend] + internal abstract class ImplBase : ICommand where TArgs : ArgumentsBase { protected readonly IHost Host; diff --git a/src/Microsoft.ML.Data/Commands/EvaluateCommand.cs b/src/Microsoft.ML.Data/Commands/EvaluateCommand.cs index 937f019c37..7ed4144262 100644 --- a/src/Microsoft.ML.Data/Commands/EvaluateCommand.cs +++ b/src/Microsoft.ML.Data/Commands/EvaluateCommand.cs @@ -162,7 +162,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV } } - public sealed class EvaluateCommand : DataCommand.ImplBase + internal sealed class EvaluateCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { diff --git a/src/Microsoft.ML.Data/Commands/SaveDataCommand.cs b/src/Microsoft.ML.Data/Commands/SaveDataCommand.cs index f4e535816e..a721aee15a 100644 --- a/src/Microsoft.ML.Data/Commands/SaveDataCommand.cs +++ b/src/Microsoft.ML.Data/Commands/SaveDataCommand.cs @@ -22,7 +22,7 @@ namespace Microsoft.ML.Runtime.Data { - public sealed class SaveDataCommand : DataCommand.ImplBase + internal sealed class SaveDataCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { @@ -87,7 +87,7 @@ private void RunCore(IChannel ch) } } - public sealed class ShowDataCommand : DataCommand.ImplBase + internal sealed class ShowDataCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { @@ -133,7 +133,7 @@ private void RunCore(IChannel ch) var keepColumns = Args.Columns .Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToArray(); if (Utils.Size(keepColumns) > 0) - data = SelectColumnsTransform.CreateKeep(Host, data, keepColumns); + data = ColumnSelectingTransformer.CreateKeep(Host, data, keepColumns); } IDataSaver saver; diff --git a/src/Microsoft.ML.Data/Commands/SavePredictorCommand.cs b/src/Microsoft.ML.Data/Commands/SavePredictorCommand.cs index e1057d18b4..633f871dd0 100644 --- a/src/Microsoft.ML.Data/Commands/SavePredictorCommand.cs +++ b/src/Microsoft.ML.Data/Commands/SavePredictorCommand.cs @@ -20,7 +20,7 @@ namespace Microsoft.ML.Runtime.Tools { - public sealed class SavePredictorCommand : ICommand + internal sealed class SavePredictorCommand : ICommand { public sealed class Arguments { diff --git a/src/Microsoft.ML.Data/Commands/ScoreCommand.cs b/src/Microsoft.ML.Data/Commands/ScoreCommand.cs index d4c737f7b1..c0b2d7ecc5 100644 --- a/src/Microsoft.ML.Data/Commands/ScoreCommand.cs +++ b/src/Microsoft.ML.Data/Commands/ScoreCommand.cs @@ -37,7 +37,7 @@ public interface IDataScorerTransform : IDataTransform, ITransformTemplate public delegate void SignatureBindableMapper(IPredictor predictor); - public sealed class ScoreCommand : DataCommand.ImplBase + internal sealed class ScoreCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { @@ -232,7 +232,8 @@ private bool ShouldAddColumn(Schema schema, int i, uint scoreSet, bool outputNam } } - public static class ScoreUtils + [BestFriend] + internal static class ScoreUtils { public static IDataScorerTransform GetScorer(IPredictor predictor, RoleMappedData data, IHostEnvironment env, RoleMappedSchema trainSchema) { diff --git a/src/Microsoft.ML.Data/Commands/ShowSchemaCommand.cs b/src/Microsoft.ML.Data/Commands/ShowSchemaCommand.cs index 4fb0738e58..4082eab1df 100644 --- a/src/Microsoft.ML.Data/Commands/ShowSchemaCommand.cs +++ b/src/Microsoft.ML.Data/Commands/ShowSchemaCommand.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.CodeDom.Compiler; using System.Collections.Generic; using System.IO; using System.Linq; @@ -20,7 +21,7 @@ namespace Microsoft.ML.Runtime.Data { - public sealed class ShowSchemaCommand : DataCommand.ImplBase + internal sealed class ShowSchemaCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { @@ -126,9 +127,9 @@ private static void PrintSchema(TextWriter writer, Arguments args, ISchema schem } #endif int colLim = schema.ColumnCount; - writer.WriteLine("{0} columns:", colLim); - var itw = IndentingTextWriter.Wrap(writer); + var itw = new IndentedTextWriter(writer, " "); + itw.WriteLine("{0} columns:", colLim); using (itw.Nest()) { var names = default(VBuffer>); @@ -178,7 +179,7 @@ private static void PrintSchema(TextWriter writer, Arguments args, ISchema schem } } - private static void ShowMetadata(IndentingTextWriter itw, ISchema schema, int col, bool showVals) + private static void ShowMetadata(IndentedTextWriter itw, ISchema schema, int col, bool showVals) { Contracts.AssertValue(itw); Contracts.AssertValue(schema); @@ -204,7 +205,7 @@ private static void ShowMetadata(IndentingTextWriter itw, ISchema schema, int co } } - private static void ShowMetadataValue(IndentingTextWriter itw, ISchema schema, int col, string kind, ColumnType type) + private static void ShowMetadataValue(IndentedTextWriter itw, ISchema schema, int col, string kind, ColumnType type) { Contracts.AssertValue(itw); Contracts.AssertValue(schema); @@ -219,12 +220,12 @@ private static void ShowMetadataValue(IndentingTextWriter itw, ISchema schema, i return; } - Action del = ShowMetadataValue; + Action del = ShowMetadataValue; var meth = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(type.RawType); meth.Invoke(null, new object[] { itw, schema, col, kind, type }); } - private static void ShowMetadataValue(IndentingTextWriter itw, ISchema schema, int col, string kind, ColumnType type) + private static void ShowMetadataValue(IndentedTextWriter itw, ISchema schema, int col, string kind, ColumnType type) { Contracts.AssertValue(itw); Contracts.AssertValue(schema); @@ -244,7 +245,7 @@ private static void ShowMetadataValue(IndentingTextWriter itw, ISchema schema itw.Write(": '{0}'", sb); } - private static void ShowMetadataValueVec(IndentingTextWriter itw, ISchema schema, int col, string kind, ColumnType type) + private static void ShowMetadataValueVec(IndentedTextWriter itw, ISchema schema, int col, string kind, ColumnType type) { Contracts.AssertValue(itw); Contracts.AssertValue(schema); @@ -259,12 +260,12 @@ private static void ShowMetadataValueVec(IndentingTextWriter itw, ISchema schema return; } - Action del = ShowMetadataValueVec; + Action del = ShowMetadataValueVec; var meth = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(type.ItemType.RawType); meth.Invoke(null, new object[] { itw, schema, col, kind, type }); } - private static void ShowMetadataValueVec(IndentingTextWriter itw, ISchema schema, int col, string kind, ColumnType type) + private static void ShowMetadataValueVec(IndentedTextWriter itw, ISchema schema, int col, string kind, ColumnType type) { Contracts.AssertValue(itw); Contracts.AssertValue(schema); @@ -279,7 +280,7 @@ private static void ShowMetadataValueVec(IndentingTextWriter itw, ISchema sch var value = default(VBuffer); schema.GetMetadata(kind, col, ref value); - itw.Write(": Length={0}, Count={0}", value.Length, value.Count); + itw.Write(": Length={0}, Count={0}", value.Length, value.GetValues().Length); using (itw.Nest()) { diff --git a/src/Microsoft.ML.Data/Commands/TestCommand.cs b/src/Microsoft.ML.Data/Commands/TestCommand.cs index 574bd4e00a..407f7e713d 100644 --- a/src/Microsoft.ML.Data/Commands/TestCommand.cs +++ b/src/Microsoft.ML.Data/Commands/TestCommand.cs @@ -14,8 +14,12 @@ namespace Microsoft.ML.Runtime.Data { - // This command is essentially chaining together Score and Evaluate, without the need to save the intermediary scored data. - public sealed class TestCommand : DataCommand.ImplBase + /// + /// This command is essentially chaining together and + /// , without the need to save the intermediary scored data. + /// + [BestFriend] + internal sealed class TestCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { diff --git a/src/Microsoft.ML.Data/Commands/TrainCommand.cs b/src/Microsoft.ML.Data/Commands/TrainCommand.cs index e95758fdaf..ff709de143 100644 --- a/src/Microsoft.ML.Data/Commands/TrainCommand.cs +++ b/src/Microsoft.ML.Data/Commands/TrainCommand.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.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Command; using Microsoft.ML.Runtime.CommandLine; @@ -31,7 +32,8 @@ public enum NormalizeOption Yes } - public sealed class TrainCommand : DataCommand.ImplBase + [BestFriend] + internal sealed class TrainCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { @@ -64,6 +66,9 @@ public sealed class Arguments : DataCommand.ArgumentsBase [Argument(ArgumentType.AtMostOnce, IsInputFileName = true, HelpText = "The validation data file", ShortName = "valid")] public string ValidationFile; + [Argument(ArgumentType.AtMostOnce, IsInputFileName = true, HelpText = "The test data file", ShortName = "test")] + public string TestFile; + [Argument(ArgumentType.LastOccurenceWins, HelpText = "Whether we should cache input training data", ShortName = "cache")] public bool? CacheData; @@ -172,15 +177,34 @@ private void RunCore(IChannel ch, string cmd) } } + // In addition to the training set, some trainers can accept two extra data sets, validation set and test set, + // in training phase. The major difference between validation set and test set is that training process may + // indirectly use validation set to improve the model but the learned model should totally independent of test set. + // Similar to validation set, the trainer can report the scores computed using test set. + RoleMappedData testDataUsedInTrainer = null; + if (!string.IsNullOrWhiteSpace(Args.TestFile)) + { + // In contrast to the if-else block for validation above, we do not throw a warning if test file is provided + // because this is TrainTest command. + if (trainer.Info.SupportsTest) + { + ch.Trace("Constructing the test pipeline"); + IDataView testPipeUsedInTrainer = CreateRawLoader(dataFile: Args.TestFile); + testPipeUsedInTrainer = ApplyTransformUtils.ApplyAllTransformsToData(Host, view, testPipeUsedInTrainer); + testDataUsedInTrainer = new RoleMappedData(testPipeUsedInTrainer, data.Schema.GetColumnRoleNames()); + } + } + var predictor = TrainUtils.Train(Host, ch, data, trainer, validData, - Args.Calibrator, Args.MaxCalibrationExamples, Args.CacheData, inputPredictor); + Args.Calibrator, Args.MaxCalibrationExamples, Args.CacheData, inputPredictor, testDataUsedInTrainer); using (var file = Host.CreateOutputFile(Args.OutputModelFile)) TrainUtils.SaveModel(Host, ch, file, predictor, data, cmd); } } - public static class TrainUtils + [BestFriend] + internal static class TrainUtils { public static void CheckTrainer(IExceptionContext ectx, IComponentFactory trainer, string dataFile) { @@ -224,13 +248,13 @@ public static IPredictor Train(IHostEnvironment env, IChannel ch, RoleMappedData } public static IPredictor Train(IHostEnvironment env, IChannel ch, RoleMappedData data, ITrainer trainer, RoleMappedData validData, - IComponentFactory calibrator, int maxCalibrationExamples, bool? cacheData, IPredictor inputPredictor = null) + IComponentFactory calibrator, int maxCalibrationExamples, bool? cacheData, IPredictor inputPredictor = null, RoleMappedData testData = null) { - return TrainCore(env, ch, data, trainer, validData, calibrator, maxCalibrationExamples, cacheData, inputPredictor); + return TrainCore(env, ch, data, trainer, validData, calibrator, maxCalibrationExamples, cacheData, inputPredictor, testData); } private static IPredictor TrainCore(IHostEnvironment env, IChannel ch, RoleMappedData data, ITrainer trainer, RoleMappedData validData, - IComponentFactory calibrator, int maxCalibrationExamples, bool? cacheData, IPredictor inputPredictor = null) + IComponentFactory calibrator, int maxCalibrationExamples, bool? cacheData, IPredictor inputPredictor = null, RoleMappedData testData = null) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(ch, nameof(ch)); @@ -251,7 +275,7 @@ private static IPredictor TrainCore(IHostEnvironment env, IChannel ch, RoleMappe inputPredictor = null; } ch.Assert(validData == null || trainer.Info.SupportsValidation); - var predictor = trainer.Train(new TrainContext(data, validData, inputPredictor)); + var predictor = trainer.Train(new TrainContext(data, validData, testData, inputPredictor)); var caliTrainer = calibrator?.CreateComponent(env); return CalibratorUtils.TrainCalibratorIfNeeded(env, ch, caliTrainer, maxCalibrationExamples, trainer, predictor, data); } diff --git a/src/Microsoft.ML.Data/Commands/TrainTestCommand.cs b/src/Microsoft.ML.Data/Commands/TrainTestCommand.cs index ebc349e8a5..49f25375f5 100644 --- a/src/Microsoft.ML.Data/Commands/TrainTestCommand.cs +++ b/src/Microsoft.ML.Data/Commands/TrainTestCommand.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; +using System.IO; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Command; using Microsoft.ML.Runtime.CommandLine; @@ -16,7 +17,8 @@ namespace Microsoft.ML.Runtime.Data { - public sealed class TrainTestCommand : DataCommand.ImplBase + [BestFriend] + internal sealed class TrainTestCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { @@ -162,15 +164,34 @@ private void RunCore(IChannel ch, string cmd) } } + // In addition to the training set, some trainers can accept two data sets, validation set and test set, + // in training phase. The major difference between validation set and test set is that training process may + // indirectly use validation set to improve the model but the learned model should totally independent of test set. + // Similar to validation set, the trainer can report the scores computed using test set. + RoleMappedData testDataUsedInTrainer = null; + if (!string.IsNullOrWhiteSpace(Args.TestFile)) + { + // In contrast to the if-else block for validation above, we do not throw a warning if test file is provided + // because this is TrainTest command. + if (trainer.Info.SupportsTest) + { + ch.Trace("Constructing the test pipeline"); + IDataView testPipeUsedInTrainer = CreateRawLoader(dataFile: Args.TestFile); + testPipeUsedInTrainer = ApplyTransformUtils.ApplyAllTransformsToData(Host, trainPipe, testPipeUsedInTrainer); + testDataUsedInTrainer = new RoleMappedData(testPipeUsedInTrainer, data.Schema.GetColumnRoleNames()); + } + } + var predictor = TrainUtils.Train(Host, ch, data, trainer, validData, - Args.Calibrator, Args.MaxCalibrationExamples, Args.CacheData, inputPredictor); + Args.Calibrator, Args.MaxCalibrationExamples, Args.CacheData, inputPredictor, testDataUsedInTrainer); IDataLoader testPipe; - using (var file = !string.IsNullOrEmpty(Args.OutputModelFile) ? - Host.CreateOutputFile(Args.OutputModelFile) : Host.CreateTempFile(".zip")) + bool hasOutfile = !string.IsNullOrEmpty(Args.OutputModelFile); + var tempFilePath = hasOutfile ? null : Path.GetTempFileName(); + + using (var file = new SimpleFileHandle(ch, hasOutfile ? Args.OutputModelFile : tempFilePath, true, !hasOutfile)) { TrainUtils.SaveModel(Host, ch, file, predictor, data, cmd); - ch.Trace("Constructing the testing pipeline"); using (var stream = file.OpenReadStream()) using (var rep = RepositoryReader.Open(stream, ch)) diff --git a/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs b/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs index 79c3295017..e9db784f1f 100644 --- a/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs +++ b/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs @@ -17,7 +17,7 @@ namespace Microsoft.ML.Data.Commands { - public sealed class TypeInfoCommand : ICommand + internal sealed class TypeInfoCommand : ICommand { internal const string LoadName = "TypeInfo"; internal const string Summary = "Displays information about the standard primitive " + diff --git a/src/Microsoft.ML.Data/Data/BufferBuilder.cs b/src/Microsoft.ML.Data/Data/BufferBuilder.cs index 5020ae0418..2f37f4ea81 100644 --- a/src/Microsoft.ML.Data/Data/BufferBuilder.cs +++ b/src/Microsoft.ML.Data/Data/BufferBuilder.cs @@ -382,45 +382,6 @@ public bool TryGetFeature(int index, out T v) return false; } - private void GetResult(ref T[] values, ref int[] indices, out int count, out int length) - { - if (_count == 0) - { - count = 0; - length = _length; - return; - } - - if (!_dense) - { - if (!_sorted) - SortAndSumDups(); - if (!_dense && _count >= _length / 2) - MakeDense(); - } - - if (_dense) - { - if (Utils.Size(values) < _length) - values = new T[_length]; - Array.Copy(_values, values, _length); - count = _length; - length = _length; - } - else - { - Contracts.Assert(_count < _length); - if (Utils.Size(values) < _count) - values = new T[_count]; - if (Utils.Size(indices) < _count) - indices = new int[_count]; - Array.Copy(_values, values, _count); - Array.Copy(_indices, indices, _count); - count = _count; - length = _length; - } - } - public void Reset(int length, bool dense) { ResetImpl(length, dense); @@ -431,11 +392,11 @@ public void AddFeatures(int index, in VBuffer buffer) { Contracts.Check(0 <= index && index <= _length - buffer.Length); - int count = buffer.Count; + var values = buffer.GetValues(); + int count = values.Length; if (count == 0) return; - var values = buffer.Values; if (buffer.IsDense) { Contracts.Assert(count == buffer.Length); @@ -454,7 +415,7 @@ public void AddFeatures(int index, in VBuffer buffer) else { // REVIEW: Validate indices! - var indices = buffer.Indices; + var indices = buffer.GetIndices(); if (_dense) { for (int i = 0; i < count; i++) @@ -471,24 +432,34 @@ public void AddFeatures(int index, in VBuffer buffer) public void GetResult(ref VBuffer buffer) { - var values = buffer.Values; - var indices = buffer.Indices; - if (IsEmpty) { - buffer = new VBuffer(_length, 0, values, indices); + VBufferUtils.Resize(ref buffer, _length, 0); return; } - int count; - int length; - GetResult(ref values, ref indices, out count, out length); - Contracts.Assert(0 <= count && count <= length); + if (!_dense) + { + if (!_sorted) + SortAndSumDups(); + if (!_dense && _count >= _length / 2) + MakeDense(); + } - if (count == length) - buffer = new VBuffer(length, values, indices); + if (_dense) + { + var editor = VBufferEditor.Create(ref buffer, _length); + _values.AsSpan(0, _length).CopyTo(editor.Values); + buffer = editor.Commit(); + } else - buffer = new VBuffer(length, count, values, indices); + { + Contracts.Assert(_count < _length); + var editor = VBufferEditor.Create(ref buffer, _length, _count); + _values.AsSpan(0, _count).CopyTo(editor.Values); + _indices.AsSpan(0, _count).CopyTo(editor.Indices); + buffer = editor.Commit(); + } } } } diff --git a/src/Microsoft.ML.Data/Data/DataViewUtils.cs b/src/Microsoft.ML.Data/Data/DataViewUtils.cs index 0e33390c7e..b6ebaef135 100644 --- a/src/Microsoft.ML.Data/Data/DataViewUtils.cs +++ b/src/Microsoft.ML.Data/Data/DataViewUtils.cs @@ -77,7 +77,7 @@ public static string[] GetTempColumnNames(this ISchema schema, int n, string tag /// public static long ComputeRowCount(IDataView view) { - long? countNullable = view.GetRowCount(lazy: false); + long? countNullable = view.GetRowCount(); if (countNullable != null) return countNullable.Value; long count = 0; diff --git a/src/Microsoft.ML.Data/Data/IColumn.cs b/src/Microsoft.ML.Data/Data/IColumn.cs index 948d056677..14638081d8 100644 --- a/src/Microsoft.ML.Data/Data/IColumn.cs +++ b/src/Microsoft.ML.Data/Data/IColumn.cs @@ -274,7 +274,7 @@ public ValueGetter GetGetter() /// /// The base class for a few implementations that do not "go" anywhere. /// - public abstract class DefaultCounted : ICounted + private abstract class DefaultCounted : ICounted { public long Position => 0; public long Batch => 0; @@ -331,7 +331,7 @@ public ValueGetter GetGetter() /// column as an . This class will cease to be necessary at the point when all /// metadata implementations are just simple s. /// - public sealed class MetadataRow : DefaultCounted, IRow + public sealed class MetadataRow : IRow { public Schema Schema => _schemaImpl.AsSchema; @@ -341,6 +341,14 @@ public sealed class MetadataRow : DefaultCounted, IRow private readonly KeyValuePair[] _map; + long ICounted.Position => 0; + long ICounted.Batch => 0; + ValueGetter ICounted.GetIdGetter() + => IdGetter; + + private static void IdGetter(ref UInt128 id) + => id = default; + private sealed class SchemaImpl : ISchema { private readonly MetadataRow _parent; diff --git a/src/Microsoft.ML.Data/Data/RowCursorUtils.cs b/src/Microsoft.ML.Data/Data/RowCursorUtils.cs index e26e61fff6..77bd656392 100644 --- a/src/Microsoft.ML.Data/Data/RowCursorUtils.cs +++ b/src/Microsoft.ML.Data/Data/RowCursorUtils.cs @@ -267,29 +267,23 @@ private static ValueGetter> GetVecGetterAsCore(VectorT if (size > 0) Contracts.Check(src.Length == size); - var values = dst.Values; - var indices = dst.Indices; var srcValues = src.GetValues(); int count = srcValues.Length; + var editor = VBufferEditor.Create(ref dst, src.Length, count); if (count > 0) { - if (Utils.Size(values) < count) - values = new TDst[count]; - // REVIEW: This would be faster if there were loops for each std conversion. // Consider adding those to the Conversions class. for (int i = 0; i < count; i++) - conv(in srcValues[i], ref values[i]); + conv(in srcValues[i], ref editor.Values[i]); if (!src.IsDense) { var srcIndices = src.GetIndices(); - if (Utils.Size(indices) < count) - indices = new int[count]; - srcIndices.CopyTo(indices); + srcIndices.CopyTo(editor.Indices); } } - dst = new VBuffer(src.Length, count, values, indices); + dst = editor.Commit(); }; } @@ -447,16 +441,15 @@ public static ValueGetter> GetLabelGetter(ISlotCursor cursor) getSrc(ref src); // Unfortunately defaults in one to not translate to defaults of the other, // so this will not be sparsity preserving. Assume a dense output. - Single[] vals = dst.Values; - Utils.EnsureSize(ref vals, src.Length); + var editor = VBufferEditor.Create(ref dst, src.Length); foreach (var kv in src.Items(all: true)) { if (0 < kv.Value && kv.Value <= keyMax) - vals[kv.Key] = kv.Value - 1; + editor.Values[kv.Key] = kv.Value - 1; else - vals[kv.Key] = Single.NaN; + editor.Values[kv.Key] = Single.NaN; } - dst = new VBuffer(src.Length, vals, dst.Indices); + dst = editor.Commit(); }; } @@ -541,7 +534,7 @@ public IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolidator, Fun return new IRowCursor[] { GetRowCursor(needCol, rand) }; } - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { return 1; } diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoader.cs index 39816d3f24..73dd62152b 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoader.cs @@ -761,7 +761,7 @@ public void GetMetadata(string kind, int col, ref TValue value) private long RowCount { get { return _header.RowCount; } } - public long? GetRowCount(bool lazy = true) { return RowCount; } + public long? GetRowCount() { return RowCount; } public bool CanShuffle { get { return true; } } @@ -1192,7 +1192,7 @@ public void Dispose() private void CalculateShufflePoolRows(IChannel ch, out int poolRows) { - if (!ShuffleTransform.CanShuffleAll(Schema)) + if (!RowShufflingTransformer.CanShuffleAll(Schema)) { // This will only happen if we expand the set of types we can serialize, // without expanding the set of types we can cache. That is entirely @@ -1241,7 +1241,7 @@ private IRowCursor GetRowCursorCore(Func predicate, IRandom rand = nu // the entire dataset in memory anyway. var ourRand = _randomShufflePoolRows == _header.RowCount ? null : rand; var cursor = new Cursor(this, predicate, ourRand); - return ShuffleTransform.GetShuffledCursor(_host, _randomShufflePoolRows, cursor, rand); + return RowShufflingTransformer.GetShuffledCursor(_host, _randomShufflePoolRows, cursor, rand); } return new Cursor(this, predicate, rand); } @@ -2137,7 +2137,7 @@ public override ValueGetter GetIdGetter() } } - public sealed class InfoCommand : ICommand + internal sealed class InfoCommand : ICommand { public const string LoadName = "IdvInfo"; diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoaderSaverCatalog.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoaderSaverCatalog.cs new file mode 100644 index 0000000000..d697112719 --- /dev/null +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoaderSaverCatalog.cs @@ -0,0 +1,65 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.IO; +using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Data.IO; + +namespace Microsoft.ML +{ + public static class BinaryLoaderSaverCatalog + { + /// + /// Read a data view from a Stream on a binary file using . + /// + /// The catalog. + /// The stream to read from. + public static IDataView ReadFromBinary(this DataOperations catalog, Stream stream) + { + Contracts.CheckValue(stream, nameof(stream)); + + var env = catalog.GetEnvironment(); + + var reader = new BinaryLoader(env, new BinaryLoader.Arguments(), stream); + return reader; + } + + /// + /// Read a data view from a binary file using . + /// + /// The catalog. + /// The path to the file to read from. + public static IDataView ReadFromBinary(this DataOperations catalog, string path) + { + Contracts.CheckNonEmpty(path, nameof(path)); + + var env = catalog.GetEnvironment(); + + var reader = new BinaryLoader(env, new BinaryLoader.Arguments(), path); + return reader; + } + + /// + /// Save the data view into a binary stream. + /// + /// The catalog. + /// The data view to save. + /// The stream to write to. + /// Whether to keep hidden columns in the dataset. + public static void SaveAsBinary(this DataOperations catalog, IDataView data, Stream stream, + bool keepHidden = false) + { + Contracts.CheckValue(catalog, nameof(catalog)); + Contracts.CheckValue(data, nameof(data)); + Contracts.CheckValue(stream, nameof(stream)); + + var env = catalog.GetEnvironment(); + var saver = new BinarySaver(env, new BinarySaver.Arguments()); + + using (var ch = env.Start("Saving data")) + DataSaverUtils.SaveDataView(ch, saver, data, stream, keepHidden); + } + } +} diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/Codecs.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/Codecs.cs index 792ec4f9f3..29fa46c1a0 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/Codecs.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/Codecs.cs @@ -1109,29 +1109,29 @@ public override void Get(ref VBuffer value) int length = FixedLength ? _size : _lengths[_vectorIndex]; int count = _counts[_vectorIndex]; - int[] indices = value.Indices; - T[] values = value.Values; if (count < 0) { // dense + var editor = VBufferEditor.Create(ref value, length); if (length > 0) { - Utils.EnsureSize(ref values, length); - Array.Copy(_values, _valuesOffset, values, 0, length); + _values.AsSpan(_valuesOffset, length) + .CopyTo(editor.Values); } - value = new VBuffer(length, values, indices); + value = editor.Commit(); } else { // sparse + var editor = VBufferEditor.Create(ref value, length, count); if (count > 0) { - Utils.EnsureSize(ref values, count); - Utils.EnsureSize(ref indices, count); - Array.Copy(_values, _valuesOffset, values, 0, count); - Array.Copy(_indices, _indicesOffset, indices, 0, count); + _values.AsSpan(_valuesOffset, count) + .CopyTo(editor.Values); + _indices.AsSpan(_indicesOffset, count) + .CopyTo(editor.Indices); } - value = new VBuffer(length, count, values, indices); + value = editor.Commit(); } } } diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/Zlib/Zlib.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/Zlib/Zlib.cs index 024eaef4a2..7b2ae812a8 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/Zlib/Zlib.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/Zlib/Zlib.cs @@ -12,6 +12,7 @@ internal static class Zlib { public const string DllPath = "zlib.dll"; +#pragma warning disable IDE1006 [DllImport(DllPath), SuppressUnmanagedCodeSecurity] private static extern unsafe Constants.RetCode deflateInit2_(ZStream* strm, int level, int method, int windowBits, int memLevel, Constants.Strategy strategy, byte* version, int streamSize); @@ -44,6 +45,7 @@ public static unsafe Constants.RetCode InflateInit2(ZStream* strm, int windowBit [DllImport(DllPath), SuppressUnmanagedCodeSecurity] public static extern unsafe Constants.RetCode inflateEnd(ZStream* strm); +#pragma warning restore IDE1006 } [StructLayout(LayoutKind.Sequential)] diff --git a/src/Microsoft.ML.Data/DataLoadSave/CompositeDataLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/CompositeDataLoader.cs index 0009ad4768..7206745e03 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/CompositeDataLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/CompositeDataLoader.cs @@ -557,9 +557,9 @@ private static string GenerateTag(int index) return string.Format("xf{0:00}", index); } - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { - return View.GetRowCount(lazy); + return View.GetRowCount(); } public bool CanShuffle => View.CanShuffle; diff --git a/src/Microsoft.ML.Data/DataLoadSave/DataLoadSaveCatalog.cs b/src/Microsoft.ML.Data/DataLoadSave/DataLoadSaveCatalog.cs deleted file mode 100644 index 5adfc1ad60..0000000000 --- a/src/Microsoft.ML.Data/DataLoadSave/DataLoadSaveCatalog.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace Microsoft.ML.Runtime -{ - /// - /// A catalog of operations to load and save data. - /// - public sealed class DataLoadSaveOperations - { - internal IHostEnvironment Environment { get; } - - internal DataLoadSaveOperations(IHostEnvironment env) - { - Contracts.AssertValue(env); - Environment = env; - } - } -} diff --git a/src/Microsoft.ML.Data/DataLoadSave/DataOperations.cs b/src/Microsoft.ML.Data/DataLoadSave/DataOperations.cs new file mode 100644 index 0000000000..cc0998da03 --- /dev/null +++ b/src/Microsoft.ML.Data/DataLoadSave/DataOperations.cs @@ -0,0 +1,93 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Data; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Internal.Utilities; +using Microsoft.ML.Transforms; + +namespace Microsoft.ML.Runtime +{ + /// + /// A catalog of operations over data that are not transformers or estimators. + /// This includes data readers, saving, caching, filtering etc. + /// + public sealed class DataOperations + { + internal IHostEnvironment Environment { get; } + + internal DataOperations(IHostEnvironment env) + { + Contracts.AssertValue(env); + Environment = env; + } + + /// + /// Creates a lazy in-memory cache of . + /// Caching happens per-column. A column is only cached when it is first accessed. + /// In addition, are considered 'always needed', so all of them + /// will be cached whenever any data is requested. + /// + /// The data view to cache. + /// The columns that must be cached whenever anything is cached. Empty array or null + /// is acceptable, it means that all columns are only cached at the first access. + public IDataView Cache(IDataView input, params string[] columnsToPrefetch) + { + Environment.CheckValue(input, nameof(input)); + Environment.CheckValueOrNull(columnsToPrefetch); + + int[] prefetch = new int[Utils.Size(columnsToPrefetch)]; + for (int i = 0; i < prefetch.Length; i++) + { + if (!input.Schema.TryGetColumnIndex(columnsToPrefetch[i], out prefetch[i])) + throw Environment.ExceptSchemaMismatch(nameof(columnsToPrefetch), "prefetch", columnsToPrefetch[i]); + } + return new CacheDataView(Environment, input, prefetch); + } + + /// + /// Keep only those rows that satisfy the range condition: the value of column + /// must be between and , inclusive. + /// + /// The input data. + /// The name of a column to use for filtering. + /// The inclusive lower bound. + /// The exclusive upper bound. + public IDataView FilterByColumn(IDataView input, string columnName, double lowerBound = double.NegativeInfinity, double upperBound = double.PositiveInfinity) + { + Environment.CheckValue(input, nameof(input)); + Environment.CheckNonEmpty(columnName, nameof(columnName)); + Environment.CheckParam(lowerBound <= upperBound, nameof(upperBound), "Must be no less than lowerBound"); + + var type = input.Schema[columnName].Type; + if (!type.IsNumber) + throw Environment.ExceptSchemaMismatch(nameof(columnName), "filter", columnName, "number", type.ToString()); + return new RangeFilter(Environment, input, columnName, lowerBound, upperBound, false); + } + + /// + /// Keep only those rows that satisfy the range condition: the value of a key column + /// (treated as a fraction of the entire key range) must be between and , inclusive. + /// This filtering is useful if the is a key column obtained by some 'stable randomization' + /// (for example, hashing). + /// + /// The input data. + /// The name of a column to use for filtering. + /// The inclusive lower bound. + /// The exclusive upper bound. + public IDataView FilterByKeyColumnFraction(IDataView input, string columnName, double lowerBound = 0, double upperBound = 1) + { + Environment.CheckValue(input, nameof(input)); + Environment.CheckNonEmpty(columnName, nameof(columnName)); + Environment.CheckParam(0 <= lowerBound && lowerBound <= 1, nameof(lowerBound), "Must be in [0, 1]"); + Environment.CheckParam(0 <= upperBound && upperBound <= 2, nameof(upperBound), "Must be in [0, 2]"); + Environment.CheckParam(lowerBound <= upperBound, nameof(upperBound), "Must be no less than lowerBound"); + + var type = input.Schema[columnName].Type; + if (type.KeyCount == 0) + throw Environment.ExceptSchemaMismatch(nameof(columnName), "filter", columnName, "a known cardinality key", type.ToString()); + return new RangeFilter(Environment, input, columnName, lowerBound, upperBound, false); + } + } +} diff --git a/src/Microsoft.ML.Data/DataLoadSave/EstimatorChain.cs b/src/Microsoft.ML.Data/DataLoadSave/EstimatorChain.cs index 30331a2ea7..7d20d22761 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/EstimatorChain.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/EstimatorChain.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Core.Data; +using Microsoft.ML.Data; using Microsoft.ML.Runtime.Internal.Utilities; using System.Linq; @@ -15,20 +16,30 @@ namespace Microsoft.ML.Runtime.Data public sealed class EstimatorChain : IEstimator> where TLastTransformer : class, ITransformer { + // Host is not null iff there is any 'true' values in _needCacheAfter (in this case, we need to create an instance of + // CacheDataView. + private readonly IHost _host; private readonly TransformerScope[] _scopes; private readonly IEstimator[] _estimators; + private readonly bool[] _needCacheAfter; public readonly IEstimator LastEstimator; - private EstimatorChain(IEstimator[] estimators, TransformerScope[] scopes) + private EstimatorChain(IHostEnvironment env, IEstimator[] estimators, TransformerScope[] scopes, bool[] needCacheAfter) { + Contracts.AssertValueOrNull(env); Contracts.AssertValueOrNull(estimators); Contracts.AssertValueOrNull(scopes); + Contracts.AssertValueOrNull(needCacheAfter); Contracts.Assert(Utils.Size(estimators) == Utils.Size(scopes)); + Contracts.Assert(Utils.Size(estimators) == Utils.Size(needCacheAfter)); + _host = env?.Register(nameof(EstimatorChain)); _estimators = estimators ?? new IEstimator[0]; _scopes = scopes ?? new TransformerScope[0]; LastEstimator = estimators.LastOrDefault() as IEstimator; + _needCacheAfter = needCacheAfter ?? new bool[0]; + Contracts.Assert((_host != null) == _needCacheAfter.Any(x => x)); Contracts.Assert((_estimators.Length > 0) == (LastEstimator != null)); } @@ -37,16 +48,17 @@ private EstimatorChain(IEstimator[] estimators, TransformerScope[] /// public EstimatorChain() { + _host = null; _estimators = new IEstimator[0]; _scopes = new TransformerScope[0]; + _needCacheAfter = new bool[0]; LastEstimator = null; } public TransformerChain Fit(IDataView input) { - // REVIEW: before fitting, run schema propagation. - // Currently, it throws. - // GetOutputSchema(SchemaShape.Create(input.Schema); + // Before fitting, run schema propagation. + GetOutputSchema(SchemaShape.Create(input.Schema)); IDataView current = input; var xfs = new ITransformer[_estimators.Length]; @@ -55,6 +67,11 @@ public TransformerChain Fit(IDataView input) var est = _estimators[i]; xfs[i] = est.Fit(current); current = xfs[i].Transform(current); + if (_needCacheAfter[i] && i < _estimators.Length - 1) + { + Contracts.AssertValue(_host); + current = new CacheDataView(_host, current, null); + } } return new TransformerChain(xfs, _scopes); @@ -72,7 +89,27 @@ public EstimatorChain Append(IEstimator estimat where TNewTrans : class, ITransformer { Contracts.CheckValue(estimator, nameof(estimator)); - return new EstimatorChain(_estimators.AppendElement(estimator), _scopes.AppendElement(scope)); + return new EstimatorChain(_host, _estimators.AppendElement(estimator), _scopes.AppendElement(scope), _needCacheAfter.AppendElement(false)); + } + + /// + /// Append a 'caching checkpoint' to the estimator chain. This will ensure that the downstream estimators will be trained against + /// cached data. It is helpful to have a caching checkpoint before trainers that take multiple data passes. + /// + /// The host environment to use for caching. + public EstimatorChain AppendCacheCheckpoint(IHostEnvironment env) + { + Contracts.CheckValue(env, nameof(env)); + + if (_estimators.Length == 0 || _needCacheAfter.Last()) + { + // If there are no estimators, or if we already need to cache after this, we don't need to do anything else. + return this; + } + + bool[] newNeedCache = _needCacheAfter.ToArray(); + newNeedCache[newNeedCache.Length - 1] = true; + return new EstimatorChain(env, _estimators, _scopes, newNeedCache); } } } diff --git a/src/Microsoft.ML.Data/DataLoadSave/EstimatorExtensions.cs b/src/Microsoft.ML.Data/DataLoadSave/EstimatorExtensions.cs index 5bf90bb221..2d0c5eced4 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/EstimatorExtensions.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/EstimatorExtensions.cs @@ -50,9 +50,26 @@ public static EstimatorChain Append( Contracts.CheckValue(start, nameof(start)); Contracts.CheckValue(estimator, nameof(estimator)); + if (start is EstimatorChain est) + return est.Append(estimator, scope); + return new EstimatorChain().Append(start).Append(estimator, scope); } + /// + /// Append a 'caching checkpoint' to the estimator chain. This will ensure that the downstream estimators will be trained against + /// cached data. It is helpful to have a caching checkpoint before trainers that take multiple data passes. + /// + /// The starting estimator + /// The host environment to use for caching. + + public static EstimatorChain AppendCacheCheckpoint(this IEstimator start, IHostEnvironment env) + where TTrans : class, ITransformer + { + Contracts.CheckValue(start, nameof(start)); + return new EstimatorChain().Append(start).AppendCacheCheckpoint(env); + } + /// /// Create a new composite reader, by appending a transformer to this data reader. /// diff --git a/src/Microsoft.ML.Data/DataLoadSave/PartitionedFileLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/PartitionedFileLoader.cs index 5998cd0f22..eb2fd269e7 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/PartitionedFileLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/PartitionedFileLoader.cs @@ -287,7 +287,7 @@ public void Save(ModelSaveContext ctx) public Schema Schema { get; } - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { return null; } diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs index 282b3feea3..a808374573 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs @@ -1352,7 +1352,7 @@ public BoundLoader(TextLoader reader, IMultiStreamSource files) _files = files; } - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { // We don't know how many rows there are. // REVIEW: Should we try to support RowCount? diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs index 130f158d4e..cdcb507f51 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs @@ -401,28 +401,22 @@ public void Get(ref VBuffer dst) { AssertValid(); - var values = dst.Values; - var indices = dst.Indices; - if (_count == 0) { - dst = new VBuffer(_size, 0, values, indices); + VBufferUtils.Resize(ref dst, _size, 0); return; } - if (Utils.Size(values) < _count) - values = new TItem[_count]; - Array.Copy(_values, values, _count); + var editor = VBufferEditor.Create(ref dst, _size, _count); + _values.AsSpan(0, _count).CopyTo(editor.Values); if (_count == _size) { - dst = new VBuffer(_size, values, indices); + dst = editor.Commit(); return; } - if (Utils.Size(indices) < _count) - indices = new int[_count]; - Array.Copy(_indices, indices, _count); - dst = new VBuffer(_size, _count, values, indices); + _indices.AsSpan(0, _count).CopyTo(editor.Indices); + dst = editor.Commit(); } } diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderSaverCatalog.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderSaverCatalog.cs index ef95a7a7de..e5de3573ee 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderSaverCatalog.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderSaverCatalog.cs @@ -24,7 +24,7 @@ public static class TextLoaderSaverCatalog /// The catalog. /// The arguments to text reader, describing the data schema. /// The optional location of a data sample. - public static TextLoader TextReader(this DataLoadSaveOperations catalog, + public static TextLoader TextReader(this DataOperations catalog, TextLoader.Arguments args, IMultiStreamSource dataSample = null) => new TextLoader(CatalogUtils.GetEnvironment(catalog), args, dataSample); @@ -35,7 +35,7 @@ public static TextLoader TextReader(this DataLoadSaveOperations catalog, /// The columns of the schema. /// The delegate to set additional settings. /// The optional location of a data sample. - public static TextLoader TextReader(this DataLoadSaveOperations catalog, + public static TextLoader TextReader(this DataOperations catalog, TextLoader.Column[] columns, Action advancedSettings = null, IMultiStreamSource dataSample = null) => new TextLoader(CatalogUtils.GetEnvironment(catalog), columns, advancedSettings, dataSample); @@ -47,7 +47,7 @@ public static TextLoader TextReader(this DataLoadSaveOperations catalog, /// The delegate to set additional settings /// The path to the file /// The data view. - public static IDataView ReadFromTextFile(this DataLoadSaveOperations catalog, + public static IDataView ReadFromTextFile(this DataOperations catalog, TextLoader.Column[] columns, string path, Action advancedSettings = null) { Contracts.CheckNonEmpty(path, nameof(path)); @@ -70,7 +70,7 @@ public static IDataView ReadFromTextFile(this DataLoadSaveOperations catalog, /// Whether to write the header row. /// Whether to write the header comment with the schema. /// Whether to keep hidden columns in the dataset. - public static void SaveAsText(this DataLoadSaveOperations catalog, IDataView data, Stream stream, + public static void SaveAsText(this DataOperations catalog, IDataView data, Stream stream, char separator = '\t', bool headerRow = true, bool schema = true, bool keepHidden = false) { Contracts.CheckValue(catalog, nameof(catalog)); diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs index db84057b79..9474605079 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs @@ -166,20 +166,22 @@ public VecValueWriter(IRowCursor cursor, VectorType type, int source, char sep) public override void WriteData(Action appendItem, out int length) { _getSrc(ref _src); + var srcValues = _src.GetValues(); if (_src.IsDense) { - for (int i = 0; i < _src.Length; i++) + for (int i = 0; i < srcValues.Length; i++) { - Conv(in _src.Values[i], ref Sb); + Conv(in srcValues[i], ref Sb); appendItem(Sb, i); } } else { - for (int i = 0; i < _src.Count; i++) + var srcIndices = _src.GetIndices(); + for (int i = 0; i < srcValues.Length; i++) { - Conv(in _src.Values[i], ref Sb); - appendItem(Sb, _src.Indices[i]); + Conv(in srcValues[i], ref Sb); + appendItem(Sb, srcIndices[i]); } } length = _src.Length; @@ -188,15 +190,18 @@ public override void WriteData(Action appendItem, out int le public override void WriteHeader(Action appendItem, out int length) { length = _slotCount; - if (_slotNames.Count == 0) + var slotNamesValues = _slotNames.GetValues(); + if (slotNamesValues.Length == 0) return; - for (int i = 0; i < _slotNames.Count; i++) + + var slotNamesIndices = _slotNames.GetIndices(); + for (int i = 0; i < slotNamesValues.Length; i++) { - var name = _slotNames.Values[i]; + var name = slotNamesValues[i]; if (name.IsEmpty) continue; MapText(in name, ref Sb); - int index = _slotNames.IsDense ? i : _slotNames.Indices[i]; + int index = _slotNames.IsDense ? i : slotNamesIndices[i]; appendItem(Sb, index); } } @@ -420,7 +425,7 @@ private void WriteDataCore(IChannel ch, TextWriter writer, IDataView data, if (_outputSchema) WriteSchemaAsComment(writer, header); - double rowCount = data.GetRowCount(true) ?? double.NaN; + double rowCount = data.GetRowCount() ?? double.NaN; using (var pch = !_silent ? _host.StartProgressChannel("TextSaver: saving data") : null) { long stateCount = 0; diff --git a/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeLoader.cs index de1964c27b..b12f3ad1e7 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeLoader.cs @@ -662,7 +662,7 @@ public VectorType GetSlotType(int col) } } - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { return _header.RowCount; } diff --git a/src/Microsoft.ML.Data/DataView/AppendRowsDataView.cs b/src/Microsoft.ML.Data/DataView/AppendRowsDataView.cs index 4ea44a6957..89f863ca18 100644 --- a/src/Microsoft.ML.Data/DataView/AppendRowsDataView.cs +++ b/src/Microsoft.ML.Data/DataView/AppendRowsDataView.cs @@ -91,7 +91,7 @@ private AppendRowsDataView(IHostEnvironment env, Schema schema, IDataView[] sour _counts = null; break; } - long? count = dv.GetRowCount(true); + long? count = dv.GetRowCount(); if (count == null || count < 0 || count > int.MaxValue) { _canShuffle = false; @@ -127,12 +127,12 @@ private void CheckSchemaConsistency() } } - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { long sum = 0; foreach (var source in _sources) { - var cur = source.GetRowCount(lazy); + var cur = source.GetRowCount(); if (cur == null) return null; _host.Check(cur.Value >= 0, "One of the sources returned a negative row count"); diff --git a/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs b/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs index b7f9b494e9..ef6c06d9ad 100644 --- a/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs +++ b/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs @@ -197,7 +197,7 @@ private sealed class DataView : IDataView public Schema Schema { get { return _schema; } } - public long? GetRowCount(bool lazy = true) { return _rowCount; } + public long? GetRowCount() { return _rowCount; } public bool CanShuffle { get { return true; } } diff --git a/src/Microsoft.ML.Data/DataView/CacheDataView.cs b/src/Microsoft.ML.Data/DataView/CacheDataView.cs index 5db0021c60..3674ec40ca 100644 --- a/src/Microsoft.ML.Data/DataView/CacheDataView.cs +++ b/src/Microsoft.ML.Data/DataView/CacheDataView.cs @@ -4,16 +4,17 @@ #pragma warning disable 420 // volatile with Interlocked.CompareExchange +using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Internal.Utilities; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; -using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; -using Microsoft.ML.Runtime.Internal.Utilities; -namespace Microsoft.ML.Runtime.Data +namespace Microsoft.ML.Data { /// /// This is a dataview that wraps another dataview, and does on-demand caching of the @@ -192,18 +193,13 @@ public int MapInputToCacheColumnIndex(int inputIndex) public Schema Schema => _subsetInput.Schema; - public long? GetRowCount(bool lazy = true) + /// + /// Return the number of rows if available. + /// + public long? GetRowCount() { if (_rowCount < 0) - { - if (lazy) - return null; - if (_cacheDefaultWaiter == null) - KickoffFiller(new int[0]); - _host.Assert(_cacheDefaultWaiter != null); - _cacheDefaultWaiter.Wait(long.MaxValue); - _host.Assert(_rowCount >= 0); - } + return null; return _rowCount; } @@ -316,7 +312,7 @@ public IRowSeeker GetSeeker(Func predicate) _host.CheckValue(predicate, nameof(predicate)); // The seeker needs to know the row count when it validates the row index to move to. // Calling GetRowCount here to force a wait indirectly so that _rowCount will have a valid value. - GetRowCount(false); + GetRowCount(); _host.Assert(_rowCount >= 0); var waiter = WaiterWaiter.Create(this, predicate); if (waiter.IsTrivial) @@ -1475,19 +1471,13 @@ public override void Fetch(int idx, ref VBuffer value) Ctx.Assert(valueCount <= len); Ctx.Assert(valueCount == len || indexCount == valueCount); - T[] values = value.Values; - Utils.EnsureSize(ref values, valueCount); - _values.CopyTo(_valueBoundaries[idx], values, valueCount); - int[] indices = value.Indices; + var editor = VBufferEditor.Create(ref value, len, valueCount); + _values.CopyTo(_valueBoundaries[idx], editor.Values, valueCount); if (valueCount < len) - { - Utils.EnsureSize(ref indices, indexCount); - _indices.CopyTo(_indexBoundaries[idx], indices, indexCount); - value = new VBuffer(len, indexCount, values, indices); - } - else - value = new VBuffer(len, values, indices); + _indices.CopyTo(_indexBoundaries[idx], editor.Indices, indexCount); + + value = editor.Commit(); } public override void Freeze() diff --git a/src/Microsoft.ML.Data/DataView/CompositeSchema.cs b/src/Microsoft.ML.Data/DataView/CompositeSchema.cs index 2a526f152a..d61289b55c 100644 --- a/src/Microsoft.ML.Data/DataView/CompositeSchema.cs +++ b/src/Microsoft.ML.Data/DataView/CompositeSchema.cs @@ -67,7 +67,7 @@ public void CheckColumnInRange(int col) public void GetColumnSource(int col, out int srcIndex, out int srcCol) { CheckColumnInRange(col); - if (!_cumulativeColCounts.TryFindIndexSorted(0, _cumulativeColCounts.Length, col, out srcIndex)) + if (!Utils.TryFindIndexSorted(_cumulativeColCounts, 0, _cumulativeColCounts.Length, col, out srcIndex)) srcIndex--; Contracts.Assert(0 <= srcIndex && srcIndex < _cumulativeColCounts.Length); srcCol = col - _cumulativeColCounts[srcIndex]; diff --git a/src/Microsoft.ML.Data/DataView/EmptyDataView.cs b/src/Microsoft.ML.Data/DataView/EmptyDataView.cs index 543ac42952..8c6f385f88 100644 --- a/src/Microsoft.ML.Data/DataView/EmptyDataView.cs +++ b/src/Microsoft.ML.Data/DataView/EmptyDataView.cs @@ -25,7 +25,7 @@ public EmptyDataView(IHostEnvironment env, Schema schema) Schema = schema; } - public long? GetRowCount(bool lazy = true) => 0; + public long? GetRowCount() => 0; public IRowCursor GetRowCursor(Func needCol, IRandom rand = null) { diff --git a/src/Microsoft.ML.Data/DataView/OpaqueDataView.cs b/src/Microsoft.ML.Data/DataView/OpaqueDataView.cs index 44d8d0dcad..cc8b08a87a 100644 --- a/src/Microsoft.ML.Data/DataView/OpaqueDataView.cs +++ b/src/Microsoft.ML.Data/DataView/OpaqueDataView.cs @@ -21,9 +21,9 @@ public OpaqueDataView(IDataView source) _source = source; } - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { - return _source.GetRowCount(lazy); + return _source.GetRowCount(); } public IRowCursor GetRowCursor(Func predicate, IRandom rand = null) diff --git a/src/Microsoft.ML.Data/DataView/RowToRowMapperTransform.cs b/src/Microsoft.ML.Data/DataView/RowToRowMapperTransform.cs index e968348618..308c08ba24 100644 --- a/src/Microsoft.ML.Data/DataView/RowToRowMapperTransform.cs +++ b/src/Microsoft.ML.Data/DataView/RowToRowMapperTransform.cs @@ -76,9 +76,9 @@ private static VersionInfo GetVersionInfo() public override Schema Schema => _bindings.Schema; - public bool CanSaveOnnx(OnnxContext ctx) => _mapper is ICanSaveOnnx onnxMapper ? onnxMapper.CanSaveOnnx(ctx) : false; + bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => _mapper is ICanSaveOnnx onnxMapper ? onnxMapper.CanSaveOnnx(ctx) : false; - public bool CanSavePfa => _mapper is ICanSavePfa pfaMapper ? pfaMapper.CanSavePfa : false; + bool ICanSavePfa.CanSavePfa => _mapper is ICanSavePfa pfaMapper ? pfaMapper.CanSavePfa : false; public RowToRowMapperTransform(IHostEnvironment env, IDataView input, IRowMapper mapper, Func mapperFactory) : base(env, RegistrationName, input) @@ -205,7 +205,7 @@ public override IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolid return cursors; } - public void SaveAsOnnx(OnnxContext ctx) + void ISaveAsOnnx.SaveAsOnnx(OnnxContext ctx) { Host.CheckValue(ctx, nameof(ctx)); if (_mapper is ISaveAsOnnx onnx) @@ -215,7 +215,7 @@ public void SaveAsOnnx(OnnxContext ctx) } } - public void SaveAsPfa(BoundPfaContext ctx) + void ISaveAsPfa.SaveAsPfa(BoundPfaContext ctx) { Host.CheckValue(ctx, nameof(ctx)); if (_mapper is ISaveAsPfa pfa) diff --git a/src/Microsoft.ML.Data/DataView/Transposer.cs b/src/Microsoft.ML.Data/DataView/Transposer.cs index 5424f5a04b..df0d772a07 100644 --- a/src/Microsoft.ML.Data/DataView/Transposer.cs +++ b/src/Microsoft.ML.Data/DataView/Transposer.cs @@ -274,7 +274,7 @@ public IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolidator, Fun return _view.GetRowCursorSet(out consolidator, predicate, n, rand); } - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { // Not a passthrough. return RowCount; @@ -504,8 +504,25 @@ private sealed class SlotCursorVec : SlotCursor private T[][] _values; // Working intermediate value buffers. private int[] _counts; // Working intermediate count buffers. - // The transposed contents of _colStored. - private VBuffer[] _cbuff; // Working intermediate column-wise buffer. + private struct ColumnBufferStorage + { + // The transposed contents of _colStored. + public VBuffer Buffer; + + // These two arrays are the "cached" arrays inside of the Buffer + // to be swapped between the _cbuff and _values/_indices. + public readonly T[] Values; + public readonly int[] Indices; + + public ColumnBufferStorage(VBuffer buffer, T[] values, int[] indices) + { + Buffer = buffer; + Values = values; + Indices = indices; + } + } + + private ColumnBufferStorage[] _cbuff; // Working intermediate column-wise buffer. // Variables to track current cursor position. private int _colStored; // The current column of the source data view actually stored in the intermediate buffers. @@ -704,20 +721,24 @@ private void EnsureValid() Utils.EnsureSize(ref _cbuff, vecLen); for (int s = 0; s < vecLen; ++s) { - var temp = new VBuffer(_len, _counts[s], _values[s], _indices[s]); - if (temp.Count < _len / 2) + int count = _counts[s]; + T[] values = _values[s]; + int[] indices = _indices[s]; + var temp = new VBuffer(_len, count, values, indices); + if (count < _len / 2) { // Already sparse enough, I guess. Swap out the arrays. - Utils.Swap(ref temp, ref _cbuff[s]); - _indices[s] = temp.Indices ?? new int[_len]; - _values[s] = temp.Values ?? new T[_len]; + ColumnBufferStorage existingBuffer = _cbuff[s]; + _cbuff[s] = new ColumnBufferStorage(temp, values, indices); + _indices[s] = existingBuffer.Indices ?? new int[_len]; + _values[s] = existingBuffer.Values ?? new T[_len]; Ch.Assert(_indices[s].Length == _len); Ch.Assert(_values[s].Length == _len); } else { // Not dense enough. Densify temp into _cbuff[s]. Don't swap the arrays. - temp.CopyToDense(ref _cbuff[s]); + temp.CopyToDense(ref _cbuff[s].Buffer); } } _colStored = _colCurr; @@ -740,8 +761,8 @@ private void Getter(ref VBuffer dst) { Ch.Check(IsGood, "Cannot get values in the cursor's current state"); EnsureValid(); - Ch.Assert(0 <= _slotCurr && _slotCurr < Utils.Size(_cbuff) && _cbuff[_slotCurr].Length == _len); - _cbuff[_slotCurr].CopyTo(ref dst); + Ch.Assert(0 <= _slotCurr && _slotCurr < Utils.Size(_cbuff) && _cbuff[_slotCurr].Buffer.Length == _len); + _cbuff[_slotCurr].Buffer.CopyTo(ref dst); } protected override ValueGetter> GetGetterCore() @@ -818,9 +839,9 @@ public DataViewSlicer(IHost host, IDataView input, int[] toSlice) _schema = new SchemaImpl(this, nameToCol); } - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { - return _input.GetRowCount(lazy); + return _input.GetRowCount(); } /// @@ -1273,12 +1294,12 @@ private ValueGetter> CreateGetter(int col) (ref VBuffer value) => { EnsureValid(); - var values = value.Values; + VBufferEditor editor; if (_inputValue.IsDense) { - Utils.EnsureSize(ref values, len); - Array.Copy(_inputValue.Values, min, values, 0, len); - value = new VBuffer(len, values, value.Indices); + editor = VBufferEditor.Create(ref value, len); + _inputValue.GetValues().Slice(min, len).CopyTo(editor.Values); + value = editor.Commit(); return; } // In the sparse case we have ranges on Indices/Values to consider. @@ -1287,20 +1308,24 @@ private ValueGetter> CreateGetter(int col) int scount = slim - smin; if (scount == 0) { - value = new VBuffer(len, 0, value.Values, value.Indices); + VBufferUtils.Resize(ref value, len, 0); return; } - var indices = value.Indices; - Utils.EnsureSize(ref indices, scount); - Utils.EnsureSize(ref values, scount); - Array.Copy(_inputValue.Indices, smin, indices, 0, scount); - if (min != 0) + + editor = VBufferEditor.Create(ref value, len, scount); + bool isDense = len == scount; + if (!isDense) { - for (int i = 0; i < scount; ++i) - indices[i] -= min; + _inputValue.GetIndices().Slice(smin, scount).CopyTo(editor.Indices); + + if (min != 0) + { + for (int i = 0; i < scount; ++i) + editor.Indices[i] -= min; + } } - Array.Copy(_inputValue.Values, smin, values, 0, scount); - value = new VBuffer(len, scount, values, indices); + _inputValue.GetValues().Slice(smin, scount).CopyTo(editor.Values); + value = editor.Commit(); }; } @@ -1314,15 +1339,14 @@ private void EnsureValid() // and end of each slice. if (_inputValue.IsDense) return; - if (_inputValue.Count == 0) + var indices = _inputValue.GetIndices(); + if (indices.Length == 0) { // Handle this separately, since _inputValue.Indices might be null // in this case, and then we may as well short circuit it anyway. Array.Clear(_srcIndicesLims, 0, _srcIndicesLims.Length); return; } - var indices = _inputValue.Indices; - Contracts.AssertValue(indices); int ii = 0; for (int i = 0; i < Lims.Length; ++i) @@ -1331,7 +1355,7 @@ private void EnsureValid() // REVIEW: Would some form of bisection search be better // than this scan? Possibly if the search were to happen across // all lims at the same time, somehow. - while (ii < _inputValue.Count && indices[ii] < lim) + while (ii < indices.Length && indices[ii] < lim) ii++; _srcIndicesLims[i] = ii; } @@ -1503,7 +1527,7 @@ public SlotDataView(IHostEnvironment env, ITransposeDataView data, int col) _schemaImpl = new SchemaImpl(this); } - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { var type = _data.Schema.GetColumnType(_col); int valueCount = type.ValueCount; diff --git a/src/Microsoft.ML.Data/DataView/ZipDataView.cs b/src/Microsoft.ML.Data/DataView/ZipDataView.cs index b87efd9195..5489491b3f 100644 --- a/src/Microsoft.ML.Data/DataView/ZipDataView.cs +++ b/src/Microsoft.ML.Data/DataView/ZipDataView.cs @@ -54,12 +54,12 @@ private ZipDataView(IHost host, IDataView[] sources) public Schema Schema => _compositeSchema.AsSchema; - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { long min = -1; foreach (var source in _sources) { - var cur = source.GetRowCount(lazy); + var cur = source.GetRowCount(); if (cur == null) return null; _host.Check(cur.Value >= 0, "One of the sources returned a negative row count"); diff --git a/src/Microsoft.ML.Data/Depricated/Instances/HeaderSchema.cs b/src/Microsoft.ML.Data/Depricated/Instances/HeaderSchema.cs index 8631462504..293d7db3b4 100644 --- a/src/Microsoft.ML.Data/Depricated/Instances/HeaderSchema.cs +++ b/src/Microsoft.ML.Data/Depricated/Instances/HeaderSchema.cs @@ -98,20 +98,16 @@ private void GetSlotNames(int col, ref VBuffer> dst) indexList.Add(kvp.Key); } - var vals = dst.Values; - if (Utils.Size(vals) < nameList.Count) - vals = new ReadOnlyMemory[nameList.Count]; - Array.Copy(nameList.ToArray(), vals, nameList.Count); + Contracts.Assert(nameList.Count == indexList.Count); + + var editor = VBufferEditor.Create(ref dst, _collection.Count, nameList.Count); + nameList.CopyTo(editor.Values); if (nameList.Count < _collection.Count) { - var indices = dst.Indices; - if (Utils.Size(indices) < indexList.Count) - indices = new int[indexList.Count]; - Array.Copy(indexList.ToArray(), indices, indexList.Count); - dst = new VBuffer>(_collection.Count, nameList.Count, vals, indices); + indexList.CopyTo(editor.Indices); } - else - dst = new VBuffer>(_collection.Count, vals, dst.Indices); + + dst = editor.Commit(); } } diff --git a/src/Microsoft.ML.Data/Depricated/Vector/GenericSpanSortHelper.cs b/src/Microsoft.ML.Data/Depricated/Vector/GenericSpanSortHelper.cs new file mode 100644 index 0000000000..f94993e419 --- /dev/null +++ b/src/Microsoft.ML.Data/Depricated/Vector/GenericSpanSortHelper.cs @@ -0,0 +1,269 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +/*============================================================ +* Purpose: class to sort Spans +* +* Taken from https://github.com/dotnet/coreclr/blob/480defd204b58fae05b692937295c6533673d3a2/src/System.Private.CoreLib/shared/System/Collections/Generic/ArraySortHelper.cs#L871-L1112 +* and changed to support Span instead of arrays. +* +* Code changes from coreclr: +* 1. Name changed from GenericArraySortHelper => GenericSpanSortHelper +* 2. Changed Array usages to Span +* 3. Change Sort method to static +* 4. Changed single-line, multi-variable declarations to be multi-line. +* 5. Contracts.Assert => Contracts.Assert +* +*This can be removed once https://github.com/dotnet/corefx/issues/15329 is fixed. +===========================================================*/ + +using System; + +namespace Microsoft.ML.Runtime.Numeric +{ + internal static class IntrospectiveSortUtilities + { + // This is the threshold where Introspective sort switches to Insertion sort. + // Empirically, 16 seems to speed up most cases without slowing down others, at least for integers. + // Large value types may benefit from a smaller number. + internal const int IntrosortSizeThreshold = 16; + + internal static int FloorLog2PlusOne(int n) + { + int result = 0; + while (n >= 1) + { + result++; + n = n / 2; + } + return result; + } + } + + internal partial class GenericSpanSortHelper + where TKey : IComparable + { + public static void Sort(Span keys, Span values, int index, int length) + { + Contracts.Assert(keys != null, "Check the arguments in the caller!"); + Contracts.Assert(index >= 0 && length >= 0 && (keys.Length - index >= length), "Check the arguments in the caller!"); + + IntrospectiveSort(keys, values, index, length); + } + + private static void SwapIfGreaterWithItems(Span keys, Span values, int a, int b) + { + if (a != b) + { + if (keys[a] != null && keys[a].CompareTo(keys[b]) > 0) + { + TKey key = keys[a]; + keys[a] = keys[b]; + keys[b] = key; + + TValue value = values[a]; + values[a] = values[b]; + values[b] = value; + } + } + } + + private static void Swap(Span keys, Span values, int i, int j) + { + if (i != j) + { + TKey k = keys[i]; + keys[i] = keys[j]; + keys[j] = k; + + TValue v = values[i]; + values[i] = values[j]; + values[j] = v; + } + } + + internal static void IntrospectiveSort(Span keys, Span values, int left, int length) + { + Contracts.Assert(keys != null); + Contracts.Assert(values != null); + Contracts.Assert(left >= 0); + Contracts.Assert(length >= 0); + Contracts.Assert(length <= keys.Length); + Contracts.Assert(length + left <= keys.Length); + Contracts.Assert(length + left <= values.Length); + + if (length < 2) + return; + + IntroSort(keys, values, left, length + left - 1, 2 * IntrospectiveSortUtilities.FloorLog2PlusOne(length)); + } + + private static void IntroSort(Span keys, Span values, int lo, int hi, int depthLimit) + { + Contracts.Assert(keys != null); + Contracts.Assert(values != null); + Contracts.Assert(lo >= 0); + Contracts.Assert(hi < keys.Length); + + while (hi > lo) + { + int partitionSize = hi - lo + 1; + if (partitionSize <= IntrospectiveSortUtilities.IntrosortSizeThreshold) + { + if (partitionSize == 1) + { + return; + } + if (partitionSize == 2) + { + SwapIfGreaterWithItems(keys, values, lo, hi); + return; + } + if (partitionSize == 3) + { + SwapIfGreaterWithItems(keys, values, lo, hi - 1); + SwapIfGreaterWithItems(keys, values, lo, hi); + SwapIfGreaterWithItems(keys, values, hi - 1, hi); + return; + } + + InsertionSort(keys, values, lo, hi); + return; + } + + if (depthLimit == 0) + { + Heapsort(keys, values, lo, hi); + return; + } + depthLimit--; + + int p = PickPivotAndPartition(keys, values, lo, hi); + // Note we've already partitioned around the pivot and do not have to move the pivot again. + IntroSort(keys, values, p + 1, hi, depthLimit); + hi = p - 1; + } + } + + private static int PickPivotAndPartition(Span keys, Span values, int lo, int hi) + { + Contracts.Assert(keys != null); + Contracts.Assert(values != null); + Contracts.Assert(lo >= 0); + Contracts.Assert(hi > lo); + Contracts.Assert(hi < keys.Length); + + // Compute median-of-three. But also partition them, since we've done the comparison. + int middle = lo + ((hi - lo) / 2); + + // Sort lo, mid and hi appropriately, then pick mid as the pivot. + SwapIfGreaterWithItems(keys, values, lo, middle); // swap the low with the mid point + SwapIfGreaterWithItems(keys, values, lo, hi); // swap the low with the high + SwapIfGreaterWithItems(keys, values, middle, hi); // swap the middle with the high + + TKey pivot = keys[middle]; + Swap(keys, values, middle, hi - 1); + int left = lo; + int right = hi - 1; // We already partitioned lo and hi and put the pivot in hi - 1. And we pre-increment & decrement below. + + while (left < right) + { + if (pivot == null) + { + while (left < (hi - 1) && keys[++left] == null) ; + while (right > lo && keys[--right] != null) ; + } + else + { + while (pivot.CompareTo(keys[++left]) > 0) ; + while (pivot.CompareTo(keys[--right]) < 0) ; + } + + if (left >= right) + break; + + Swap(keys, values, left, right); + } + + // Put pivot in the right location. + Swap(keys, values, left, (hi - 1)); + return left; + } + + private static void Heapsort(Span keys, Span values, int lo, int hi) + { + Contracts.Assert(keys != null); + Contracts.Assert(values != null); + Contracts.Assert(lo >= 0); + Contracts.Assert(hi > lo); + Contracts.Assert(hi < keys.Length); + + int n = hi - lo + 1; + for (int i = n / 2; i >= 1; i = i - 1) + { + DownHeap(keys, values, i, n, lo); + } + for (int i = n; i > 1; i = i - 1) + { + Swap(keys, values, lo, lo + i - 1); + DownHeap(keys, values, 1, i - 1, lo); + } + } + + private static void DownHeap(Span keys, Span values, int i, int n, int lo) + { + Contracts.Assert(keys != null); + Contracts.Assert(lo >= 0); + Contracts.Assert(lo < keys.Length); + + TKey d = keys[lo + i - 1]; + TValue dValue = values[lo + i - 1]; + int child; + while (i <= n / 2) + { + child = 2 * i; + if (child < n && (keys[lo + child - 1] == null || keys[lo + child - 1].CompareTo(keys[lo + child]) < 0)) + { + child++; + } + if (keys[lo + child - 1] == null || keys[lo + child - 1].CompareTo(d) < 0) + break; + keys[lo + i - 1] = keys[lo + child - 1]; + values[lo + i - 1] = values[lo + child - 1]; + i = child; + } + keys[lo + i - 1] = d; + values[lo + i - 1] = dValue; + } + + private static void InsertionSort(Span keys, Span values, int lo, int hi) + { + Contracts.Assert(keys != null); + Contracts.Assert(values != null); + Contracts.Assert(lo >= 0); + Contracts.Assert(hi >= lo); + Contracts.Assert(hi <= keys.Length); + + int i; + int j; + TKey t; + TValue tValue; + for (i = lo; i < hi; i++) + { + j = i; + t = keys[i + 1]; + tValue = values[i + 1]; + while (j >= lo && (t == null || t.CompareTo(keys[j]) < 0)) + { + keys[j + 1] = keys[j]; + values[j + 1] = values[j]; + j--; + } + keys[j + 1] = t; + values[j + 1] = tValue; + } + } + } + +} diff --git a/src/Microsoft.ML.Data/Depricated/Vector/VBufferMathUtils.cs b/src/Microsoft.ML.Data/Depricated/Vector/VBufferMathUtils.cs index 1438cce601..9be89b4f83 100644 --- a/src/Microsoft.ML.Data/Depricated/Vector/VBufferMathUtils.cs +++ b/src/Microsoft.ML.Data/Depricated/Vector/VBufferMathUtils.cs @@ -20,17 +20,18 @@ public static partial class VectorUtils /// public static Float NormSquared(in VBuffer a) { - if (a.Count == 0) + var aValues = a.GetValues(); + if (aValues.Length == 0) return 0; - return CpuMathUtils.SumSq(a.Values.AsSpan(0, a.Count)); + return CpuMathUtils.SumSq(aValues); } /// /// Returns the L2 norm squared of the vector (sum of squares of the components). /// - public static Float NormSquared(Float[] a, int offset, int count) + public static Float NormSquared(ReadOnlySpan a) { - return CpuMathUtils.SumSq(a.AsSpan(offset, count)); + return CpuMathUtils.SumSq(a); } /// @@ -48,9 +49,10 @@ public static Float Norm(in VBuffer a) /// L1 norm of the vector public static Float L1Norm(in VBuffer a) { - if (a.Count == 0) + var aValues = a.GetValues(); + if (aValues.Length == 0) return 0; - return CpuMathUtils.SumAbs(a.Values.AsSpan(0, a.Count)); + return CpuMathUtils.SumAbs(aValues); } /// @@ -59,9 +61,10 @@ public static Float L1Norm(in VBuffer a) /// L-infinity norm of the vector public static Float MaxNorm(in VBuffer a) { - if (a.Count == 0) + var aValues = a.GetValues(); + if (aValues.Length == 0) return 0; - return CpuMathUtils.MaxAbs(a.Values.AsSpan(0, a.Count)); + return CpuMathUtils.MaxAbs(aValues); } /// @@ -69,9 +72,10 @@ public static Float MaxNorm(in VBuffer a) /// public static Float Sum(in VBuffer a) { - if (a.Count == 0) + var aValues = a.GetValues(); + if (aValues.Length == 0) return 0; - return CpuMathUtils.Sum(a.Values.AsSpan(0, a.Count)); + return CpuMathUtils.Sum(aValues); } /// @@ -81,12 +85,13 @@ public static Float Sum(in VBuffer a) /// Value to multiply vector with public static void ScaleBy(ref VBuffer dst, Float c) { - if (c == 1 || dst.Count == 0) + if (c == 1 || dst.GetValues().Length == 0) return; + var editor = VBufferEditor.CreateFromBuffer(ref dst); if (c != 0) - CpuMathUtils.Scale(c, dst.Values.AsSpan(0, dst.Count)); + CpuMathUtils.Scale(c, editor.Values); else // Maintain density of dst. - Array.Clear(dst.Values, 0, dst.Count); + editor.Values.Clear(); // REVIEW: Any benefit in sparsifying? } @@ -97,35 +102,36 @@ public static void ScaleBy(ref VBuffer dst, Float c) public static void ScaleBy(in VBuffer src, ref VBuffer dst, Float c) { int length = src.Length; - int count = src.Count; + var srcValues = src.GetValues(); + int count = srcValues.Length; if (count == 0) { // dst is a zero vector. - dst = new VBuffer(length, 0, dst.Values, dst.Indices); + VBufferUtils.Resize(ref dst, length, 0); return; } - var dstValues = Utils.Size(dst.Values) >= count ? dst.Values : new Float[count]; if (src.IsDense) { // Maintain the density of src to dst in order to avoid slow down of L-BFGS. + var editor = VBufferEditor.Create(ref dst, length); Contracts.Assert(length == count); if (c == 0) - Array.Clear(dstValues, 0, length); + editor.Values.Clear(); else - CpuMathUtils.Scale(c, src.Values, dstValues, length); - dst = new VBuffer(length, dstValues, dst.Indices); + CpuMathUtils.Scale(c, srcValues, editor.Values, length); + dst = editor.Commit(); } else { - var dstIndices = Utils.Size(dst.Indices) >= count ? dst.Indices : new int[count]; - Array.Copy(src.Indices, dstIndices, count); + var editor = VBufferEditor.Create(ref dst, length, count); + src.GetIndices().CopyTo(editor.Indices); if (c == 0) - Array.Clear(dstValues, 0, count); + editor.Values.Clear(); else - CpuMathUtils.Scale(c, src.Values, dstValues, count); - dst = new VBuffer(length, count, dstValues, dstIndices); + CpuMathUtils.Scale(c, srcValues, editor.Values, count); + dst = editor.Commit(); } } @@ -136,15 +142,17 @@ public static void Add(in VBuffer src, ref VBuffer dst) { Contracts.Check(src.Length == dst.Length, "Vectors must have the same dimensionality."); - if (src.Count == 0) + var srcValues = src.GetValues(); + if (srcValues.Length == 0) return; if (dst.IsDense) { + var editor = VBufferEditor.Create(ref dst, dst.Length); if (src.IsDense) - CpuMathUtils.Add(src.Values, dst.Values, src.Length); + CpuMathUtils.Add(srcValues, editor.Values, src.Length); else - CpuMathUtils.Add(src.Values, src.Indices, dst.Values, src.Count); + CpuMathUtils.Add(srcValues, src.GetIndices(), editor.Values, srcValues.Length); return; } // REVIEW: Should we use SSE for any of these possibilities? @@ -162,15 +170,17 @@ public static void AddMult(in VBuffer src, Float c, ref VBuffer ds { Contracts.Check(src.Length == dst.Length, "Vectors must have the same dimensionality."); - if (src.Count == 0 || c == 0) + var srcValues = src.GetValues(); + if (srcValues.Length == 0 || c == 0) return; if (dst.IsDense) { + var editor = VBufferEditor.Create(ref dst, dst.Length); if (src.IsDense) - CpuMathUtils.AddScale(c, src.Values, dst.Values, src.Length); + CpuMathUtils.AddScale(c, srcValues, editor.Values, src.Length); else - CpuMathUtils.AddScale(c, src.Values, src.Indices, dst.Values, src.Count); + CpuMathUtils.AddScale(c, srcValues, src.GetIndices(), editor.Values, srcValues.Length); return; } // REVIEW: Should we use SSE for any of these possibilities? @@ -186,7 +196,8 @@ public static void AddMult(in VBuffer src, Float c, ref VBuffer ds Contracts.Check(src.Length == dst.Length, "Vectors must have the same dimensionality."); int length = src.Length; - if (src.Count == 0 || c == 0) + var srcValues = src.GetValues(); + if (srcValues.Length == 0 || c == 0) { // src is zero vector, res = dst dst.CopyTo(ref res); @@ -196,9 +207,9 @@ public static void AddMult(in VBuffer src, Float c, ref VBuffer ds Contracts.Assert(length > 0); if (dst.IsDense && src.IsDense) { - Float[] resValues = Utils.Size(res.Values) >= length ? res.Values : new Float[length]; - CpuMathUtils.AddScaleCopy(c, src.Values, dst.Values, resValues, length); - res = new VBuffer(length, resValues, res.Indices); + var editor = VBufferEditor.Create(ref res, length); + CpuMathUtils.AddScaleCopy(c, srcValues, dst.GetValues(), editor.Values, length); + res = editor.Commit(); return; } @@ -214,9 +225,9 @@ public static void AddMultInto(in VBuffer a, Float c, in VBuffer b { Contracts.Check(a.Length == b.Length, "Vectors must have the same dimensionality."); - if (c == 0 || b.Count == 0) + if (c == 0 || b.GetValues().Length == 0) a.CopyTo(ref dst); - else if (a.Count == 0) + else if (a.GetValues().Length == 0) ScaleInto(in b, c, ref dst); else VBufferUtils.ApplyInto(in a, in b, ref dst, (ind, v1, v2) => v1 + c * v2); @@ -233,15 +244,20 @@ public static void AddMultWithOffset(in VBuffer src, Float c, ref VBuffer Contracts.CheckParam(0 <= offset && offset <= dst.Length, nameof(offset)); Contracts.CheckParam(src.Length <= dst.Length - offset, nameof(offset)); - if (src.Count == 0 || c == 0) + var srcValues = src.GetValues(); + if (srcValues.Length == 0 || c == 0) return; + VBufferEditor editor; + Span values; if (dst.IsDense) { // This is by far the most common case. + editor = VBufferEditor.Create(ref dst, dst.Length); + values = editor.Values.Slice(offset); if (src.IsDense) - CpuMathUtils.AddScale(c, src.Values, dst.Values.AsSpan(offset), src.Count); + CpuMathUtils.AddScale(c, srcValues, values, srcValues.Length); else - CpuMathUtils.AddScale(c, src.Values, src.Indices, dst.Values.AsSpan(offset), src.Count); + CpuMathUtils.AddScale(c, srcValues, src.GetIndices(), values, srcValues.Length); return; } // REVIEW: Perhaps implementing an ApplyInto with an offset would be more @@ -250,8 +266,9 @@ public static void AddMultWithOffset(in VBuffer src, Float c, ref VBuffer // dst is sparse. I expect this will see limited practical use, since accumulants // are often better off going into a dense vector in all applications of interest to us. // Correspondingly, this implementation will be functional, but not optimized. - int dMin = dst.Count == 0 ? 0 : Utils.FindIndexSorted(dst.Indices, 0, dst.Count, offset); - int dLim = dst.Count == 0 ? 0 : Utils.FindIndexSorted(dst.Indices, dMin, dst.Count, offset + src.Length); + var dstIndices = dst.GetIndices(); + int dMin = dstIndices.Length == 0 ? 0 : dstIndices.FindIndexSorted(0, dstIndices.Length, offset); + int dLim = dstIndices.Length == 0 ? 0 : dstIndices.FindIndexSorted(dMin, dstIndices.Length, offset + src.Length); Contracts.Assert(dMin - dLim <= src.Length); // First get the number of extra values that we will need to accomodate. int gapCount; @@ -259,10 +276,11 @@ public static void AddMultWithOffset(in VBuffer src, Float c, ref VBuffer gapCount = src.Length - (dLim - dMin); else { - gapCount = src.Count; - for (int iS = 0, iD = dMin; iS < src.Count && iD < dLim; ) + gapCount = srcValues.Length; + var srcIndices = src.GetIndices(); + for (int iS = 0, iD = dMin; iS < srcIndices.Length && iD < dLim; ) { - var comp = src.Indices[iS] - dst.Indices[iD] + offset; + var comp = srcIndices[iS] - dstIndices[iD] + offset; if (comp < 0) // dst index is larger. iS++; else if (comp > 0) // src index is larger. @@ -276,18 +294,23 @@ public static void AddMultWithOffset(in VBuffer src, Float c, ref VBuffer } } // Extend dst so that it has room for this additional stuff. Shift things over as well. - var indices = dst.Indices; - var values = dst.Values; + var dstValues = dst.GetValues(); + editor = VBufferEditor.Create(ref dst, + dst.Length, + dstValues.Length + gapCount, + keepOldOnResize: true); + var indices = editor.Indices; + values = editor.Values; if (gapCount > 0) { - Utils.EnsureSize(ref indices, dst.Count + gapCount, dst.Length); - Utils.EnsureSize(ref values, dst.Count + gapCount, dst.Length); // Shift things over, unless there's nothing to shift over, or no new elements are being introduced anyway. - if (dst.Count != dLim) + if (dstValues.Length != dLim) { - Contracts.Assert(dLim < dst.Count); - Array.Copy(indices, dLim, indices, dLim + gapCount, dst.Count - dLim); - Array.Copy(values, dLim, values, dLim + gapCount, dst.Count - dLim); + Contracts.Assert(dLim < dstValues.Length); + indices.Slice(dLim, dstValues.Length - dLim) + .CopyTo(indices.Slice(dLim + gapCount)); + values.Slice(dLim, dstValues.Length - dLim) + .CopyTo(values.Slice(dLim + gapCount)); } } // Now, fill in the stuff in this "gap." Both of these implementations work @@ -303,10 +326,10 @@ public static void AddMultWithOffset(in VBuffer src, Float c, ref VBuffer Contracts.Assert(iDD == iS + dMin); // iDD and iD are the points in where we are writing and reading from. Contracts.Assert(iDD >= iD); - if (iD >= 0 && offset + iS == dst.Indices[iD]) // Collision. - values[iDD] = dst.Values[iD--] + c * src.Values[iS]; + if (iD >= 0 && offset + iS == dstIndices[iD]) // Collision. + values[iDD] = dstValues[iD--] + c * srcValues[iS]; else // Miss. - values[iDD] = c * src.Values[iS]; + values[iDD] = c * srcValues[iS]; indices[iDD] = offset + iS; } } @@ -314,9 +337,10 @@ public static void AddMultWithOffset(in VBuffer src, Float c, ref VBuffer { // Both dst and src are sparse. int iD = dLim - 1; - int iS = src.Count - 1; - int sIndex = iS < 0 ? -1 : src.Indices[iS]; - int dIndex = iD < 0 ? -1 : dst.Indices[iD] - offset; + var srcIndices = src.GetIndices(); + int iS = srcIndices.Length - 1; + int sIndex = iS < 0 ? -1 : srcIndices[iS]; + int dIndex = iD < 0 ? -1 : dstIndices[iD] - offset; for (int iDD = dLim + gapCount; --iDD >= dMin; ) { @@ -324,26 +348,26 @@ public static void AddMultWithOffset(in VBuffer src, Float c, ref VBuffer int comp = sIndex - dIndex; if (comp == 0) // Collision on both. { - indices[iDD] = dst.Indices[iD]; - values[iDD] = dst.Values[iD--] + c * src.Values[iS--]; - sIndex = iS < 0 ? -1 : src.Indices[iS]; - dIndex = iD < 0 ? -1 : dst.Indices[iD] - offset; + indices[iDD] = dstIndices[iD]; + values[iDD] = dstValues[iD--] + c * srcValues[iS--]; + sIndex = iS < 0 ? -1 : srcIndices[iS]; + dIndex = iD < 0 ? -1 : dstIndices[iD] - offset; } else if (comp < 0) // Collision on dst. { - indices[iDD] = dst.Indices[iD]; - values[iDD] = dst.Values[iD--]; - dIndex = iD < 0 ? -1 : dst.Indices[iD] - offset; + indices[iDD] = dstIndices[iD]; + values[iDD] = dstValues[iD--]; + dIndex = iD < 0 ? -1 : dstIndices[iD] - offset; } else // Collision on src. { indices[iDD] = sIndex + offset; - values[iDD] = c * src.Values[iS--]; - sIndex = iS < 0 ? -1 : src.Indices[iS]; + values[iDD] = c * srcValues[iS--]; + sIndex = iS < 0 ? -1 : srcIndices[iS]; } } } - dst = new VBuffer(dst.Length, dst.Count + gapCount, values, indices); + dst = editor.Commit(); } /// @@ -361,19 +385,20 @@ public static void ScaleInto(in VBuffer src, Float c, ref VBuffer // equal lengths, but I assume I don't care here. if (c == 1) src.CopyTo(ref dst); - else if (src.Count == 0 || c == 0) + else if (src.GetValues().Length == 0 || c == 0) { if (src.Length > 0 && src.IsDense) { - var values = dst.Values; // Due to sparsity preservation from src, dst must be dense, in the same way. - Utils.EnsureSize(ref values, src.Length, src.Length, keepOld: false); - if (values == dst.Values) // We need to clear it. - Array.Clear(values, 0, src.Length); - dst = new VBuffer(src.Length, values, dst.Indices); + var editor = VBufferEditor.Create(ref dst, src.Length); + if (!editor.CreatedNewValues) // We need to clear it. + editor.Values.Clear(); + dst = editor.Commit(); } else - dst = new VBuffer(src.Length, 0, dst.Values, dst.Indices); + { + VBufferUtils.Resize(ref dst, src.Length, 0); + } } else if (c == -1) VBufferUtils.ApplyIntoEitherDefined(in src, ref dst, (i, v) => -v); @@ -385,33 +410,35 @@ public static int ArgMax(in VBuffer src) { if (src.Length == 0) return -1; - if (src.Count == 0) + var srcValues = src.GetValues(); + if (srcValues.Length == 0) return 0; - int ind = MathUtils.ArgMax(src.Values, src.Count); + int ind = MathUtils.ArgMax(srcValues); // ind < 0 iff all explicit values are NaN. - Contracts.Assert(-1 <= ind && ind < src.Count); + Contracts.Assert(-1 <= ind && ind < srcValues.Length); if (src.IsDense) return ind; + var srcIndices = src.GetIndices(); if (ind >= 0) { - Contracts.Assert(src.Indices[ind] >= ind); - if (src.Values[ind] > 0) - return src.Indices[ind]; + Contracts.Assert(srcIndices[ind] >= ind); + if (srcValues[ind] > 0) + return srcIndices[ind]; // This covers the case where there is an explicit zero, and zero is the max, // and the first explicit zero is before any implicit entries. - if (src.Values[ind] == 0 && src.Indices[ind] == ind) + if (srcValues[ind] == 0 && srcIndices[ind] == ind) return ind; } // All explicit values are non-positive or NaN, so return the first index not in src.Indices. ind = 0; - while (ind < src.Count && src.Indices[ind] == ind) + while (ind < srcIndices.Length && srcIndices[ind] == ind) ind++; - Contracts.Assert(ind <= src.Count); - Contracts.Assert(ind == src.Count || ind < src.Indices[ind]); + Contracts.Assert(ind <= srcIndices.Length); + Contracts.Assert(ind == srcIndices.Length || ind < srcIndices[ind]); return ind; } @@ -419,33 +446,35 @@ public static int ArgMin(in VBuffer src) { if (src.Length == 0) return -1; - if (src.Count == 0) + var srcValues = src.GetValues(); + if (srcValues.Length == 0) return 0; - int ind = MathUtils.ArgMin(src.Values, src.Count); + int ind = MathUtils.ArgMin(srcValues); // ind < 0 iff all explicit values are NaN. - Contracts.Assert(-1 <= ind && ind < src.Count); + Contracts.Assert(-1 <= ind && ind < srcValues.Length); if (src.IsDense) return ind; + var srcIndices = src.GetIndices(); if (ind >= 0) { - Contracts.Assert(src.Indices[ind] >= ind); - if (src.Values[ind] < 0) - return src.Indices[ind]; + Contracts.Assert(srcIndices[ind] >= ind); + if (srcValues[ind] < 0) + return srcIndices[ind]; // This covers the case where there is an explicit zero, and zero is the min, // and the first explicit zero is before any implicit entries. - if (src.Values[ind] == 0 && src.Indices[ind] == ind) + if (srcValues[ind] == 0 && srcIndices[ind] == ind) return ind; } - // All explicit values are non-negative or NaN, so return the first index not in src.Indices. + // All explicit values are non-negative or NaN, so return the first index not in srcIndices. ind = 0; - while (ind < src.Count && src.Indices[ind] == ind) + while (ind < srcIndices.Length && srcIndices[ind] == ind) ind++; - Contracts.Assert(ind <= src.Count); - Contracts.Assert(ind == src.Count || ind < src.Indices[ind]); + Contracts.Assert(ind <= srcIndices.Length); + Contracts.Assert(ind == srcIndices.Length || ind < srcIndices[ind]); return ind; } } diff --git a/src/Microsoft.ML.Data/Depricated/Vector/VectorUtils.cs b/src/Microsoft.ML.Data/Depricated/Vector/VectorUtils.cs index 79af700bcc..58655063d2 100644 --- a/src/Microsoft.ML.Data/Depricated/Vector/VectorUtils.cs +++ b/src/Microsoft.ML.Data/Depricated/Vector/VectorUtils.cs @@ -30,30 +30,33 @@ public static Float DotProduct(Float[] a, Float[] b) public static Float DotProduct(Float[] a, in VBuffer b) { Contracts.Check(Utils.Size(a) == b.Length, "Vectors must have the same dimensionality."); - if (b.Count == 0) + var bValues = b.GetValues(); + if (bValues.Length == 0) return 0; if (b.IsDense) - return CpuMathUtils.DotProductDense(a, b.Values, b.Length); - return CpuMathUtils.DotProductSparse(a, b.Values, b.Indices, b.Count); + return CpuMathUtils.DotProductDense(a, bValues, b.Length); + return CpuMathUtils.DotProductSparse(a, bValues, b.GetIndices(), bValues.Length); } public static Float DotProduct(in VBuffer a, in VBuffer b) { Contracts.Check(a.Length == b.Length, "Vectors must have the same dimensionality."); - if (a.Count == 0 || b.Count == 0) + var aValues = a.GetValues(); + var bValues = b.GetValues(); + if (aValues.Length == 0 || bValues.Length == 0) return 0; if (a.IsDense) { if (b.IsDense) - return CpuMathUtils.DotProductDense(a.Values, b.Values, a.Length); - return CpuMathUtils.DotProductSparse(a.Values, b.Values, b.Indices, b.Count); + return CpuMathUtils.DotProductDense(aValues, bValues, a.Length); + return CpuMathUtils.DotProductSparse(aValues, bValues, b.GetIndices(), bValues.Length); } if (b.IsDense) - return CpuMathUtils.DotProductSparse(b.Values, a.Values, a.Indices, a.Count); - return DotProductSparse(a.Values, a.Indices, 0, a.Count, b.Values, b.Indices, 0, b.Count, 0); + return CpuMathUtils.DotProductSparse(bValues, aValues, a.GetIndices(), aValues.Length); + return DotProductSparse(aValues, a.GetIndices(), 0, aValues.Length, bValues, b.GetIndices(), 0, bValues.Length); } /// @@ -75,10 +78,12 @@ public static void SparsifyNormalize(ref VBuffer a, int top, int bottom, var bottomHeap = new Heap>((left, right) => right.Value > left.Value, bottom + 1); bool isDense = a.IsDense; - for (int i = 0; i < a.Count; i++) + var aValues = a.GetValues(); + var aIndices = a.GetIndices(); + for (int i = 0; i < aValues.Length; i++) { - int idx = isDense ? i : a.Indices[i]; - var value = a.Values[i]; + int idx = isDense ? i : aIndices[i]; + var value = aValues[i]; if (value < 0 && bottom > 0) { @@ -108,22 +113,20 @@ public static void SparsifyNormalize(ref VBuffer a, int top, int bottom, } var newCount = topHeap.Count + bottomHeap.Count; - var indices = a.Indices; - Utils.EnsureSize(ref indices, newCount); - Contracts.Assert(Utils.Size(a.Values) >= newCount); + var aEditor = VBufferEditor.Create(ref a, a.Length, newCount, requireIndicesOnDense: true); int count = 0; while (topHeap.Count > 0) { var pair = topHeap.Pop(); - indices[count] = pair.Key; - a.Values[count++] = pair.Value; + aEditor.Indices[count] = pair.Key; + aEditor.Values[count++] = pair.Value; } while (bottomHeap.Count > 0) { var pair = bottomHeap.Pop(); - indices[count] = pair.Key; - a.Values[count++] = pair.Value; + aEditor.Indices[count] = pair.Key; + aEditor.Values[count++] = pair.Value; } Contracts.Assert(count == newCount); @@ -132,7 +135,7 @@ public static void SparsifyNormalize(ref VBuffer a, int top, int bottom, { for (var i = 0; i < newCount; i++) { - var value = a.Values[i]; + var value = aEditor.Values[i]; var absValue = Math.Abs(value); if (absValue > absMax) absMax = absValue; @@ -142,13 +145,13 @@ public static void SparsifyNormalize(ref VBuffer a, int top, int bottom, { var ratio = 1 / absMax; for (var i = 0; i < newCount; i++) - a.Values[i] = ratio * a.Values[i]; + aEditor.Values[i] = ratio * aEditor.Values[i]; } } - if (indices != null) - Array.Sort(indices, a.Values, 0, newCount); - a = new VBuffer(a.Length, newCount, a.Values, indices); + if (!aEditor.Indices.IsEmpty) + GenericSpanSortHelper.Sort(aEditor.Indices, aEditor.Values, 0, newCount); + a = aEditor.Commit(); } /// @@ -159,27 +162,24 @@ public static void MulElementWise(in VBuffer a, ref VBuffer dst) Contracts.Check(a.Length == dst.Length, "Vectors must have the same dimensionality."); if (a.IsDense && dst.IsDense) - CpuMathUtils.MulElementWise(a.Values, dst.Values, dst.Values, a.Length); + { + var editor = VBufferEditor.CreateFromBuffer(ref dst); + CpuMathUtils.MulElementWise(a.GetValues(), dst.GetValues(), editor.Values, a.Length); + } else VBufferUtils.ApplyWithEitherDefined(in a, ref dst, (int ind, Float v1, ref Float v2) => { v2 *= v1; }); } - private static Float L2DistSquaredSparse(Float[] valuesA, int[] indicesA, int countA, Float[] valuesB, int[] indicesB, int countB, int length) + private static Float L2DistSquaredSparse(ReadOnlySpan valuesA, ReadOnlySpan indicesA, ReadOnlySpan valuesB, ReadOnlySpan indicesB) { - Contracts.AssertValueOrNull(valuesA); - Contracts.AssertValueOrNull(indicesA); - Contracts.AssertValueOrNull(valuesB); - Contracts.AssertValueOrNull(indicesB); - Contracts.Assert(0 <= countA && countA <= Utils.Size(indicesA)); - Contracts.Assert(0 <= countB && countB <= Utils.Size(indicesB)); - Contracts.Assert(countA <= Utils.Size(valuesA)); - Contracts.Assert(countB <= Utils.Size(valuesB)); + Contracts.Assert(valuesA.Length == indicesA.Length); + Contracts.Assert(valuesB.Length == indicesB.Length); Float res = 0; int ia = 0; int ib = 0; - while (ia < countA && ib < countB) + while (ia < indicesA.Length && ib < indicesB.Length) { int diff = indicesA[ia] - indicesB[ib]; Float d; @@ -202,14 +202,14 @@ private static Float L2DistSquaredSparse(Float[] valuesA, int[] indicesA, int co res += d * d; } - while (ia < countA) + while (ia < indicesA.Length) { var d = valuesA[ia]; res += d * d; ia++; } - while (ib < countB) + while (ib < indicesB.Length) { var d = valuesB[ib]; res += d * d; @@ -219,30 +219,21 @@ private static Float L2DistSquaredSparse(Float[] valuesA, int[] indicesA, int co return res; } - private static Float L2DistSquaredHalfSparse(Float[] valuesA, int lengthA, Float[] valuesB, int[] indicesB, int countB) + private static Float L2DistSquaredHalfSparse(ReadOnlySpan valuesA, ReadOnlySpan valuesB, ReadOnlySpan indicesB) { - Contracts.AssertValueOrNull(valuesA); - Contracts.AssertValueOrNull(valuesB); - Contracts.AssertValueOrNull(indicesB); - Contracts.Assert(0 <= lengthA && lengthA <= Utils.Size(valuesA)); - Contracts.Assert(0 <= countB && countB <= Utils.Size(indicesB)); - Contracts.Assert(countB <= Utils.Size(valuesB)); - - var normA = CpuMathUtils.SumSq(valuesA.AsSpan(0, lengthA)); - if (countB == 0) + var normA = CpuMathUtils.SumSq(valuesA); + if (valuesB.Length == 0) return normA; - var normB = CpuMathUtils.SumSq(valuesB.AsSpan(0, countB)); - var dotP = CpuMathUtils.DotProductSparse(valuesA, valuesB, indicesB, countB); + var normB = CpuMathUtils.SumSq(valuesB); + var dotP = CpuMathUtils.DotProductSparse(valuesA, valuesB, indicesB, valuesB.Length); var res = normA + normB - 2 * dotP; return res < 0 ? 0 : res; } - private static Float L2DiffSquaredDense(Float[] valuesA, Float[] valuesB, int length) + private static Float L2DiffSquaredDense(ReadOnlySpan valuesA, ReadOnlySpan valuesB, int length) { - Contracts.AssertValueOrNull(valuesA); - Contracts.AssertValueOrNull(valuesB); - Contracts.Assert(0 <= length && length <= Utils.Size(valuesA)); - Contracts.Assert(0 <= length && length <= Utils.Size(valuesB)); + Contracts.Assert(0 <= length && length <= valuesA.Length); + Contracts.Assert(0 <= length && length <= valuesB.Length); if (length == 0) return 0; @@ -262,32 +253,36 @@ public static Float DotProductWithOffset(in VBuffer a, int offset, in VBu Contracts.Check(0 <= offset && offset <= a.Length); Contracts.Check(b.Length <= a.Length - offset, "VBuffer b must be no longer than a.Length - offset."); - if (a.Count == 0 || b.Count == 0) + var aValues = a.GetValues(); + var bValues = b.GetValues(); + if (aValues.Length == 0 || bValues.Length == 0) return 0; if (a.IsDense) { if (b.IsDense) - return CpuMathUtils.DotProductDense(a.Values.AsSpan(offset), b.Values, b.Length); - return CpuMathUtils.DotProductSparse(a.Values.AsSpan(offset), b.Values, b.Indices, b.Count); + return CpuMathUtils.DotProductDense(aValues.Slice(offset), bValues, b.Length); + return CpuMathUtils.DotProductSparse(aValues.Slice(offset), bValues, b.GetIndices(), bValues.Length); } else { Float result = 0; - int aMin = Utils.FindIndexSorted(a.Indices, 0, a.Count, offset); - int aLim = Utils.FindIndexSorted(a.Indices, 0, a.Count, offset + b.Length); + var aIndices = a.GetIndices(); + int aMin = Utils.FindIndexSorted(aIndices, 0, aIndices.Length, offset); + int aLim = Utils.FindIndexSorted(aIndices, 0, aIndices.Length, offset + b.Length); if (b.IsDense) { for (int iA = aMin; iA < aLim; ++iA) - result += a.Values[iA] * b.Values[a.Indices[iA] - offset]; + result += aValues[iA] * bValues[aIndices[iA] - offset]; return result; } - for (int iA = aMin, iB = 0; iA < aLim && iB < b.Count; ) + var bIndices = b.GetIndices(); + for (int iA = aMin, iB = 0; iA < aLim && iB < bIndices.Length; ) { - int aIndex = a.Indices[iA]; - int bIndex = b.Indices[iB]; + int aIndex = aIndices[iA]; + int bIndex = bIndices[iB]; int comp = (aIndex - offset) - bIndex; if (comp == 0) - result += a.Values[iA++] * b.Values[iB++]; + result += aValues[iA++] * bValues[iB++]; else if (comp < 0) iA++; else @@ -310,20 +305,21 @@ public static Float DotProductWithOffset(Float[] a, int offset, in VBuffer aValues, ReadOnlySpan aIndices, int ia, int iaLim, ReadOnlySpan bValues, ReadOnlySpan bIndices, int ib, int ibLim) { - Contracts.AssertValue(aValues); - Contracts.AssertValue(aIndices); - Contracts.AssertValue(bValues); - Contracts.AssertValue(bIndices); + Contracts.AssertNonEmpty(aValues); + Contracts.AssertNonEmpty(aIndices); + Contracts.AssertNonEmpty(bValues); + Contracts.AssertNonEmpty(bIndices); Contracts.Assert(0 <= ia && ia < iaLim && iaLim <= aIndices.Length); Contracts.Assert(0 <= ib && ib < ibLim && ibLim <= bIndices.Length); @@ -334,7 +330,7 @@ private static Float DotProductSparse(Float[] aValues, int[] aIndices, int ia, i for (; ; ) { - int d = aIndices[ia] - offset - bIndices[ib]; + int d = aIndices[ia] - bIndices[ib]; if (d == 0) { res += aValues[ia] * bValues[ib]; @@ -347,7 +343,7 @@ private static Float DotProductSparse(Float[] aValues, int[] aIndices, int ia, i { ia++; if (d < -thresh) - ia = Utils.FindIndexSorted(aIndices, ia, iaLim, bIndices[ib] + offset); + ia = Utils.FindIndexSorted(aIndices, ia, iaLim, bIndices[ib]); if (ia >= iaLim) break; } @@ -355,7 +351,7 @@ private static Float DotProductSparse(Float[] aValues, int[] aIndices, int ia, i { ib++; if (d > thresh) - ib = Utils.FindIndexSorted(bIndices, ib, ibLim, aIndices[ia] - offset); + ib = Utils.FindIndexSorted(bIndices, ib, ibLim, aIndices[ia]); if (ib >= ibLim) break; } @@ -401,12 +397,12 @@ public static Float L2DistSquared(in VBuffer a, in VBuffer b) if (a.IsDense) { if (b.IsDense) - return L2DiffSquaredDense(a.Values, b.Values, b.Length); - return L2DistSquaredHalfSparse(a.Values, a.Length, b.Values, b.Indices, b.Count); + return L2DiffSquaredDense(a.GetValues(), b.GetValues(), b.Length); + return L2DistSquaredHalfSparse(a.GetValues(), b.GetValues(), b.GetIndices()); } if (b.IsDense) - return L2DistSquaredHalfSparse(b.Values, b.Length, a.Values, a.Indices, a.Count); - return L2DistSquaredSparse(a.Values, a.Indices, a.Count, b.Values, b.Indices, b.Count, a.Length); + return L2DistSquaredHalfSparse(b.GetValues(), a.GetValues(), a.GetIndices()); + return L2DistSquaredSparse(a.GetValues(), a.GetIndices(), b.GetValues(), b.GetIndices()); } /// @@ -420,8 +416,8 @@ public static Float L2DistSquared(Float[] a, in VBuffer b) Contracts.CheckValue(a, nameof(a)); Contracts.Check(Utils.Size(a) == b.Length, "Vectors must have the same dimensionality."); if (b.IsDense) - return L2DiffSquaredDense(a, b.Values, b.Length); - return L2DistSquaredHalfSparse(a, a.Length, b.Values, b.Indices, b.Count); + return L2DiffSquaredDense(a, b.GetValues(), b.Length); + return L2DistSquaredHalfSparse(a.AsSpan(0, a.Length), b.GetValues(), b.GetIndices()); } /// @@ -441,22 +437,23 @@ public static void Add(Float[] src, Float[] dst) /// Adds a multiple of a to a array. /// /// Buffer to add - /// Array to add to + /// Span to add to /// Coefficient - public static void AddMult(in VBuffer src, Float[] dst, Float c) + public static void AddMult(in VBuffer src, Span dst, Float c) { - Contracts.CheckValue(dst, nameof(dst)); Contracts.CheckParam(src.Length == dst.Length, nameof(dst), "Arrays must have the same dimensionality."); - if (src.Count == 0 || c == 0) + var srcValues = src.GetValues(); + if (srcValues.Length == 0 || c == 0) return; if (src.IsDense) - CpuMathUtils.AddScale(c, src.Values, dst, src.Count); + CpuMathUtils.AddScale(c, srcValues, dst, srcValues.Length); else { - for (int i = 0; i < src.Count; i++) - dst[src.Indices[i]] += c * src.Values[i]; + var srcIndices = src.GetIndices(); + for (int i = 0; i < srcValues.Length; i++) + dst[srcIndices[i]] += c * srcValues[i]; } } @@ -474,18 +471,20 @@ public static void AddMultWithOffset(in VBuffer src, Float[] dst, int off Contracts.Check(0 <= offset && offset <= dst.Length); Contracts.Check(src.Length <= dst.Length - offset, "Vector src must be no longer than dst.Length - offset."); - if (src.Count == 0 || c == 0) + var srcValues = src.GetValues(); + if (srcValues.Length == 0 || c == 0) return; if (src.IsDense) { for (int i = 0; i < src.Length; i++) - dst[i + offset] += c * src.Values[i]; + dst[i + offset] += c * srcValues[i]; } else { - for (int i = 0; i < src.Count; i++) - dst[src.Indices[i] + offset] += c * src.Values[i]; + var srcIndices = src.GetIndices(); + for (int i = 0; i < srcValues.Length; i++) + dst[srcIndices[i] + offset] += c * srcValues[i]; } } diff --git a/src/Microsoft.ML.Data/Dirty/IniFileUtils.cs b/src/Microsoft.ML.Data/Dirty/IniFileUtils.cs index a54ab2eb4f..782c07af01 100644 --- a/src/Microsoft.ML.Data/Dirty/IniFileUtils.cs +++ b/src/Microsoft.ML.Data/Dirty/IniFileUtils.cs @@ -8,7 +8,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - public static class IniFileUtils + [BestFriend] + internal static class IniFileUtils { // This could be done better by having something that actually parses the .ini file and provides more // functionality. For now, we'll just provide the minimum needed. If we went the nicer route, probably would diff --git a/src/Microsoft.ML.Data/Dirty/PredictorInterfaces.cs b/src/Microsoft.ML.Data/Dirty/PredictorInterfaces.cs index 6db939a877..f866ca4817 100644 --- a/src/Microsoft.ML.Data/Dirty/PredictorInterfaces.cs +++ b/src/Microsoft.ML.Data/Dirty/PredictorInterfaces.cs @@ -173,11 +173,6 @@ public interface IPredictorWithFeatureWeights : IHaveFeatureWeights { } - public interface IHasLabelGains : ITrainer - { - Double[] GetLabelGains(); - } - /// /// Interface for mapping input values to corresponding feature contributions. /// This interface is commonly implemented by predictors. diff --git a/src/Microsoft.ML.Data/EntryPoints/Cache.cs b/src/Microsoft.ML.Data/EntryPoints/Cache.cs index 610621c6d1..aa2693f4aa 100644 --- a/src/Microsoft.ML.Data/EntryPoints/Cache.cs +++ b/src/Microsoft.ML.Data/EntryPoints/Cache.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using Microsoft.ML.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; @@ -67,9 +68,11 @@ public static CacheOutput CacheData(IHostEnvironment env, CacheInput input) cols.Add(i); } +#pragma warning disable CS0618 // This ought to be addressed. See #1287. // We are not disposing the fileHandle because we want it to stay around for the execution of the graph. // It will be disposed when the environment is disposed. var fileHandle = host.CreateTempFile(); +#pragma warning restore CS0618 using (var stream = fileHandle.CreateWriteStream()) saver.SaveData(stream, input.Data, cols.ToArray()); diff --git a/src/Microsoft.ML.Data/EntryPoints/InputBase.cs b/src/Microsoft.ML.Data/EntryPoints/InputBase.cs index 550191b157..3254289f12 100644 --- a/src/Microsoft.ML.Data/EntryPoints/InputBase.cs +++ b/src/Microsoft.ML.Data/EntryPoints/InputBase.cs @@ -99,7 +99,8 @@ public abstract class LearnerInputBaseWithGroupId : LearnerInputBaseWithWeight public Optional GroupIdColumn = Optional.Implicit(DefaultColumnNames.GroupId); } - public static class LearnerEntryPointsUtils + [BestFriend] + internal static class LearnerEntryPointsUtils { public static string FindColumn(IExceptionContext ectx, ISchema schema, Optional value) { diff --git a/src/Microsoft.ML.Data/EntryPoints/PredictorModel.cs b/src/Microsoft.ML.Data/EntryPoints/PredictorModel.cs index 65e8428f1b..f450c5e39a 100644 --- a/src/Microsoft.ML.Data/EntryPoints/PredictorModel.cs +++ b/src/Microsoft.ML.Data/EntryPoints/PredictorModel.cs @@ -124,7 +124,7 @@ public string[] GetLabelInfo(IHostEnvironment env, out ColumnType labelType) { labelType = trainRms.Label.Type; if (labelType.IsKey && - trainRms.Schema.HasKeyNames(trainRms.Label.Index, labelType.KeyCount)) + trainRms.Schema.HasKeyValues(trainRms.Label.Index, labelType.KeyCount)) { VBuffer> keyValues = default; trainRms.Schema.GetMetadata(MetadataUtils.Kinds.KeyValues, trainRms.Label.Index, diff --git a/src/Microsoft.ML.Data/EntryPoints/SchemaManipulation.cs b/src/Microsoft.ML.Data/EntryPoints/SchemaManipulation.cs index 1750d885ee..8b9c034ae2 100644 --- a/src/Microsoft.ML.Data/EntryPoints/SchemaManipulation.cs +++ b/src/Microsoft.ML.Data/EntryPoints/SchemaManipulation.cs @@ -13,38 +13,38 @@ namespace Microsoft.ML.Runtime.EntryPoints { public static class SchemaManipulation { - [TlcModule.EntryPoint(Name = "Transforms.ColumnConcatenator", Desc = ConcatTransform.Summary, UserName = ConcatTransform.UserName, ShortName = ConcatTransform.LoadName)] - public static CommonOutputs.TransformOutput ConcatColumns(IHostEnvironment env, ConcatTransform.Arguments input) + [TlcModule.EntryPoint(Name = "Transforms.ColumnConcatenator", Desc = ColumnConcatenatingTransformer.Summary, UserName = ColumnConcatenatingTransformer.UserName, ShortName = ColumnConcatenatingTransformer.LoadName)] + public static CommonOutputs.TransformOutput ConcatColumns(IHostEnvironment env, ColumnConcatenatingTransformer.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("ConcatColumns"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = ConcatTransform.Create(env, input, input.Data); + var xf = ColumnConcatenatingTransformer.Create(env, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } [TlcModule.EntryPoint(Name = "Transforms.ColumnSelector", Desc = "Selects a set of columns, dropping all others", UserName = "Select Columns")] - public static CommonOutputs.TransformOutput SelectColumns(IHostEnvironment env, SelectColumnsTransform.Arguments input) + public static CommonOutputs.TransformOutput SelectColumns(IHostEnvironment env, ColumnSelectingTransformer.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("SelectColumns"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = new SelectColumnsTransform(env, input.KeepColumns, input.DropColumns, input.KeepHidden, input.IgnoreMissing).Transform(input.Data); + var xf = new ColumnSelectingTransformer(env, input.KeepColumns, input.DropColumns, input.KeepHidden, input.IgnoreMissing).Transform(input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } - [TlcModule.EntryPoint(Name = "Transforms.ColumnCopier", Desc = "Duplicates columns from the dataset", UserName = CopyColumnsTransform.UserName, ShortName = CopyColumnsTransform.ShortName)] - public static CommonOutputs.TransformOutput CopyColumns(IHostEnvironment env, CopyColumnsTransform.Arguments input) + [TlcModule.EntryPoint(Name = "Transforms.ColumnCopier", Desc = "Duplicates columns from the dataset", UserName = ColumnsCopyingTransformer.UserName, ShortName = ColumnsCopyingTransformer.ShortName)] + public static CommonOutputs.TransformOutput CopyColumns(IHostEnvironment env, ColumnsCopyingTransformer.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("CopyColumns"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = CopyColumnsTransform.Create(env, input, input.Data); + var xf = ColumnsCopyingTransformer.Create(env, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } } diff --git a/src/Microsoft.ML.Data/EntryPoints/ScoreColumnSelector.cs b/src/Microsoft.ML.Data/EntryPoints/ScoreColumnSelector.cs index 96ce1d8c61..ab9fb55b0b 100644 --- a/src/Microsoft.ML.Data/EntryPoints/ScoreColumnSelector.cs +++ b/src/Microsoft.ML.Data/EntryPoints/ScoreColumnSelector.cs @@ -100,8 +100,8 @@ public static CommonOutputs.TransformOutput RenameBinaryPredictionScoreColumns(I copyCols.Add((source, name)); } - var copyColumn = new CopyColumnsTransform(env, copyCols.ToArray()).Transform(input.Data); - var dropColumn = SelectColumnsTransform.CreateDrop(env, copyColumn, copyCols.Select(c => c.Source).ToArray()); + var copyColumn = new ColumnsCopyingTransformer(env, copyCols.ToArray()).Transform(input.Data); + var dropColumn = ColumnSelectingTransformer.CreateDrop(env, copyColumn, copyCols.Select(c => c.Source).ToArray()); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, dropColumn, input.Data), OutputData = dropColumn }; } } diff --git a/src/Microsoft.ML.Data/Evaluators/AnomalyDetectionEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/AnomalyDetectionEvaluator.cs index 128dafc81e..59614a7559 100644 --- a/src/Microsoft.ML.Data/Evaluators/AnomalyDetectionEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/AnomalyDetectionEvaluator.cs @@ -293,7 +293,7 @@ public virtual void FinishFirstPass() { } - protected IEnumerable ReverseHeap(Heap heap) + private protected Info[] ReverseHeap(Heap heap) { var res = new Info[heap.Count]; while (heap.Count > 0) @@ -724,8 +724,8 @@ protected override void PrintFoldResultsCore(IChannel ch, Dictionary { - protected abstract class AucAggregatorBase + internal abstract class AucAggregatorBase { protected Single Score; protected Single Label; @@ -30,7 +30,7 @@ public void ProcessRow(Single label, Single score, Single weight = 1) public abstract Double ComputeWeightedAuc(out Double unweighted); } - protected abstract class AucAggregatorBase : AucAggregatorBase + internal abstract class AucAggregatorBase : AucAggregatorBase { private readonly ReservoirSamplerWithoutReplacement _posReservoir; private readonly ReservoirSamplerWithoutReplacement _negReservoir; @@ -117,7 +117,7 @@ public override Double ComputeWeightedAuc(out Double unweighted) protected abstract Double ComputeWeightedAucCore(out double unweighted); } - protected sealed class UnweightedAucAggregator : AucAggregatorBase + internal sealed class UnweightedAucAggregator : AucAggregatorBase { public UnweightedAucAggregator(IRandom rand, int reservoirSize) : base(rand, reservoirSize) @@ -210,7 +210,7 @@ protected override void AddExample(List examples) } } - protected sealed class WeightedAucAggregator : AucAggregatorBase + internal sealed class WeightedAucAggregator : AucAggregatorBase { public struct AucInfo { @@ -345,7 +345,7 @@ protected override void AddExample(List examples) } } - public abstract class AuPrcAggregatorBase + internal abstract class AuPrcAggregatorBase { protected Single Score; protected Single Label; @@ -364,7 +364,7 @@ public void ProcessRow(Single label, Single score, Single weight = 1) public abstract Double ComputeWeightedAuPrc(out Double unweighted); } - protected abstract class AuPrcAggregatorBase : AuPrcAggregatorBase + private protected abstract class AuPrcAggregatorBase : AuPrcAggregatorBase { protected readonly ReservoirSamplerWithoutReplacement Reservoir; @@ -393,7 +393,7 @@ public override Double ComputeWeightedAuPrc(out Double unweighted) protected abstract Double ComputeWeightedAuPrcCore(out Double unweighted); } - protected sealed class UnweightedAuPrcAggregator : AuPrcAggregatorBase + private protected sealed class UnweightedAuPrcAggregator : AuPrcAggregatorBase { public struct Info { @@ -466,7 +466,7 @@ protected override ValueGetter GetSampleGetter() } } - protected sealed class WeightedAuPrcAggregator : AuPrcAggregatorBase + private protected sealed class WeightedAuPrcAggregator : AuPrcAggregatorBase { public struct Info { diff --git a/src/Microsoft.ML.Data/Evaluators/BinaryClassifierEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/BinaryClassifierEvaluator.cs index bee170ecef..47e6dda091 100644 --- a/src/Microsoft.ML.Data/Evaluators/BinaryClassifierEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/BinaryClassifierEvaluator.cs @@ -535,7 +535,7 @@ private struct RocInfo public readonly List WeightedRecall; public readonly List WeightedFalsePositiveRate; - public readonly AuPrcAggregatorBase AuPrcAggregator; + internal readonly AuPrcAggregatorBase AuPrcAggregator; public double WeightedAuPrc; public double UnweightedAuPrc; @@ -1355,10 +1355,10 @@ protected override void PrintFoldResultsCore(IChannel ch, Dictionary[] metrics) diff --git a/src/Microsoft.ML.Data/Evaluators/ClusteringEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/ClusteringEvaluator.cs index 34113e36fd..d83de51f06 100644 --- a/src/Microsoft.ML.Data/Evaluators/ClusteringEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/ClusteringEvaluator.cs @@ -731,12 +731,10 @@ public override Delegate[] CreateGetters(IRow input, Func activeOutpu (ref VBuffer dst) => { updateCacheIfNeeded(); - var values = dst.Values; - if (Utils.Size(values) < _numClusters) - values = new Single[_numClusters]; + var editor = VBufferEditor.Create(ref dst, _numClusters); for (int i = 0; i < _numClusters; i++) - values[i] = scores.GetItemOrDefault(sortedIndices[i]); - dst = new VBuffer(_numClusters, values); + editor.Values[i] = scores.GetItemOrDefault(sortedIndices[i]); + dst = editor.Commit(); }; getters[SortedClusterScoreCol] = topKScoresFn; } @@ -747,12 +745,10 @@ public override Delegate[] CreateGetters(IRow input, Func activeOutpu (ref VBuffer dst) => { updateCacheIfNeeded(); - var values = dst.Values; - if (Utils.Size(values) < _numClusters) - values = new uint[_numClusters]; + var editor = VBufferEditor.Create(ref dst, _numClusters); for (int i = 0; i < _numClusters; i++) - values[i] = (uint)sortedIndices[i] + 1; - dst = new VBuffer(_numClusters, values); + editor.Values[i] = (uint)sortedIndices[i] + 1; + dst = editor.Commit(); }; getters[SortedClusterCol] = topKClassesFn; } @@ -783,12 +779,10 @@ private ValueGetter>> CreateSlotNamesGetter(int num return (ref VBuffer> dst) => { - var values = dst.Values; - if (Utils.Size(values) < numTopClusters) - values = new ReadOnlyMemory[numTopClusters]; + var editor = VBufferEditor.Create(ref dst, numTopClusters); for (int i = 1; i <= numTopClusters; i++) - values[i - 1] = $"#{i} {suffix}".AsMemory(); - dst = new VBuffer>(numTopClusters, values); + editor.Values[i - 1] = $"#{i} {suffix}".AsMemory(); + dst = editor.Commit(); }; } diff --git a/src/Microsoft.ML.Data/Evaluators/EvaluatorBase.cs b/src/Microsoft.ML.Data/Evaluators/EvaluatorBase.cs index 391bd73f85..03c1e804e1 100644 --- a/src/Microsoft.ML.Data/Evaluators/EvaluatorBase.cs +++ b/src/Microsoft.ML.Data/Evaluators/EvaluatorBase.cs @@ -201,12 +201,10 @@ protected ValueGetter>> GetKeyValueGetter(Aggregato return (ref VBuffer> dst) => { - var values = dst.Values; - if (Utils.Size(values) < dictionaries.Length) - values = new ReadOnlyMemory[dictionaries.Length]; + var editor = VBufferEditor.Create(ref dst, dictionaries.Length); for (int i = 0; i < dictionaries.Length; i++) - values[i] = dictionaries[i].ColName.AsMemory(); - dst = new VBuffer>(dictionaries.Length, values, dst.Indices); + editor.Values[i] = dictionaries[i].ColName.AsMemory(); + dst = editor.Commit(); }; } diff --git a/src/Microsoft.ML.Data/Evaluators/EvaluatorUtils.cs b/src/Microsoft.ML.Data/Evaluators/EvaluatorUtils.cs index 646b7b3547..f42b97074c 100644 --- a/src/Microsoft.ML.Data/Evaluators/EvaluatorUtils.cs +++ b/src/Microsoft.ML.Data/Evaluators/EvaluatorUtils.cs @@ -490,12 +490,7 @@ public static IDataView AddFoldIndex(IHostEnvironment env, IDataView input, int ValueGetter>> slotNamesGetter = (ref VBuffer> dst) => { - var values = dst.Values; - if (Utils.Size(values) < reconciledSlotNames.Length) - values = new ReadOnlyMemory[reconciledSlotNames.Length]; - - Array.Copy(reconciledSlotNames.Values, values, reconciledSlotNames.Length); - dst = new VBuffer>(reconciledSlotNames.Length, values, dst.Indices); + reconciledSlotNames.CopyTo(ref dst); }; // For each input data view, create the reconciled key column by wrapping it in a LambdaColumnMapper. @@ -510,13 +505,11 @@ public static IDataView AddFoldIndex(IHostEnvironment env, IDataView input, int (in VBuffer src, ref VBuffer dst) => { Contracts.Assert(src.Length == Utils.Size(map)); + var editor = VBufferEditor.Create(ref dst, slotNames.Count); - var values = dst.Values; - if (Utils.Size(values) < slotNames.Count) - values = new T[slotNames.Count]; foreach (var kvp in src.Items()) - values[map[kvp.Key]] = kvp.Value; - dst = new VBuffer(slotNames.Count, values, dst.Indices); + editor.Values[map[kvp.Key]] = kvp.Value; + dst = editor.Commit(); }; } else @@ -536,15 +529,13 @@ public static IDataView AddFoldIndex(IHostEnvironment env, IDataView input, int (in VBuffer src, ref VBuffer dst) => { Contracts.Assert(src.Length == Utils.Size(map)); - var values = dst.Values; - if (Utils.Size(values) < slotNames.Count) - values = new T[slotNames.Count]; + var editor = VBufferEditor.Create(ref dst, slotNames.Count); foreach (var kvp in src.Items(true)) - values[map[kvp.Key]] = kvp.Value; + editor.Values[map[kvp.Key]] = kvp.Value; foreach (var j in naIndices) - values[j] = def; - dst = new VBuffer(slotNames.Count, values, dst.Indices); + editor.Values[j] = def; + dst = editor.Commit(); }; } @@ -615,7 +606,7 @@ public static void ReconcileKeyValues(IHostEnvironment env, IDataView[] views, s var keyNamesVBuffer = new VBuffer>(keyNames.Count, keyNames.Keys.ToArray()); ValueGetter>> keyValueGetter = (ref VBuffer> dst) => - dst = new VBuffer>(keyNamesVBuffer.Length, keyNamesVBuffer.Count, keyNamesVBuffer.Values, keyNamesVBuffer.Indices); + keyNamesVBuffer.CopyTo(ref dst); // For each input data view, create the reconciled key column by wrapping it in a LambdaColumnMapper. for (int i = 0; i < dvCount; i++) @@ -683,7 +674,7 @@ public static void ReconcileVectorKeyValues(IHostEnvironment env, IDataView[] vi var keyNamesVBuffer = new VBuffer>(keyNames.Count, keyNames.Keys.ToArray()); ValueGetter>> keyValueGetter = (ref VBuffer> dst) => - dst = new VBuffer>(keyNamesVBuffer.Length, keyNamesVBuffer.Count, keyNamesVBuffer.Values, keyNamesVBuffer.Indices); + keyNamesVBuffer.CopyTo(ref dst); for (int i = 0; i < dvCount; i++) { @@ -691,35 +682,34 @@ public static void ReconcileVectorKeyValues(IHostEnvironment env, IDataView[] vi ValueMapper, VBuffer> mapper = (in VBuffer src, ref VBuffer dst) => { - var values = dst.Values; - if (Utils.Size(values) < src.Count) - values = new uint[src.Count]; + var srcValues = src.GetValues(); + var editor = VBufferEditor.Create( + ref dst, + src.Length, + srcValues.Length); if (src.IsDense) { for (int j = 0; j < src.Length; j++) { - if (src.Values[j] == 0 || src.Values[j] > keyMapperCur.Length) - values[j] = 0; + if (srcValues[j] == 0 || srcValues[j] > keyMapperCur.Length) + editor.Values[j] = 0; else - values[j] = (uint)keyMapperCur[src.Values[j] - 1] + 1; + editor.Values[j] = (uint)keyMapperCur[srcValues[j] - 1] + 1; } - dst = new VBuffer(src.Length, values, dst.Indices); } else { - var indices = dst.Indices; - if (Utils.Size(indices) < src.Count) - indices = new int[src.Count]; - for (int j = 0; j < src.Count; j++) + var srcIndices = src.GetIndices(); + for (int j = 0; j < srcValues.Length; j++) { - if (src.Values[j] == 0 || src.Values[j] > keyMapperCur.Length) - values[j] = 0; + if (srcValues[j] == 0 || srcValues[j] > keyMapperCur.Length) + editor.Values[j] = 0; else - values[j] = (uint)keyMapperCur[src.Values[j] - 1] + 1; - indices[j] = src.Indices[j]; + editor.Values[j] = (uint)keyMapperCur[srcValues[j] - 1] + 1; + editor.Indices[j] = srcIndices[j]; } - dst = new VBuffer(src.Length, src.Count, values, indices); } + dst = editor.Commit(); }; ValueGetter>> slotNamesGetter = null; @@ -837,7 +827,7 @@ private static IDataView AppendPerInstanceDataViews(IHostEnvironment env, string { if (dvNumber == 0) { - if (dv.Schema.HasKeyNames(i, type.ItemType.KeyCount)) + if (dv.Schema.HasKeyValues(i, type.ItemType.KeyCount)) firstDvVectorKeyColumns.Add(name); // Store the slot names of the 1st idv and use them as baseline. if (dv.Schema.HasSlotNames(i, type.VectorSize)) @@ -866,9 +856,9 @@ private static IDataView AppendPerInstanceDataViews(IHostEnvironment env, string // The label column can be a key. Reconcile the key values, and wrap with a KeyToValue transform. labelColKeyValuesType = dv.Schema.GetMetadataTypeOrNull(MetadataUtils.Kinds.KeyValues, i); } - else if (dvNumber == 0 && dv.Schema.HasKeyNames(i, type.KeyCount)) + else if (dvNumber == 0 && dv.Schema.HasKeyValues(i, type.KeyCount)) firstDvKeyWithNamesColumns.Add(name); - else if (type.KeyCount > 0 && name != labelColName && !dv.Schema.HasKeyNames(i, type.KeyCount)) + else if (type.KeyCount > 0 && name != labelColName && !dv.Schema.HasKeyValues(i, type.KeyCount)) { // For any other key column (such as GroupId) we do not reconcile the key values, we only convert to U4. if (!firstDvKeyNoNamesColumns.ContainsKey(name)) @@ -908,7 +898,7 @@ private static IDataView AppendPerInstanceDataViews(IHostEnvironment env, string if (keyCol == labelColName && labelColKeyValuesType == null) continue; - idv = new KeyToValueTransform(env, keyCol).Transform(idv); + idv = new KeyToValueMappingTransformer(env, keyCol).Transform(idv); var hidden = FindHiddenColumns(idv.Schema, keyCol); idv = new ChooseColumnsByIndexTransform(env, new ChooseColumnsByIndexTransform.Arguments() { Drop = true, Index = hidden.ToArray() }, idv); } @@ -933,7 +923,7 @@ private static IDataView AppendPerInstanceDataViews(IHostEnvironment env, string variableSizeVectorColumnName, type); // Drop the old column that does not have variable length. - idv = SelectColumnsTransform.CreateDrop(env, idv, variableSizeVectorColumnName); + idv = ColumnSelectingTransformer.CreateDrop(env, idv, variableSizeVectorColumnName); } return idv; }; @@ -1028,12 +1018,10 @@ private static List GetMetricNames(IChannel ch, Schema schema, IRow row, schema.GetMetadata(MetadataUtils.Kinds.SlotNames, i, ref names); else { - var namesArray = names.Values; - if (Utils.Size(namesArray) < type.VectorSize) - namesArray = new ReadOnlyMemory[type.VectorSize]; + var editor = VBufferEditor.Create(ref names, type.VectorSize); for (int j = 0; j < type.VectorSize; j++) - namesArray[j] = string.Format("Label_{0}", j).AsMemory(); - names = new VBuffer>(type.VectorSize, namesArray); + editor.Values[j] = string.Format("Label_{0}", j).AsMemory(); + names = editor.Commit(); } foreach (var name in names.Items(all: true)) metricNames.Add(string.Format("{0}{1}", metricName, name.Value)); @@ -1059,7 +1047,7 @@ internal static IDataView GetOverallMetricsData(IHostEnvironment env, IDataView { if (Utils.Size(nonAveragedCols) > 0) { - data = SelectColumnsTransform.CreateDrop(env, data, nonAveragedCols.ToArray()); + data = ColumnSelectingTransformer.CreateDrop(env, data, nonAveragedCols.ToArray()); } idvList.Add(data); } @@ -1069,7 +1057,7 @@ internal static IDataView GetOverallMetricsData(IHostEnvironment env, IDataView // If there are stratified results, apply a KeyToValue transform to get the stratification column // names from the key column. if (hasStrat) - overall = new KeyToValueTransform(env, MetricKinds.ColumnNames.StratCol).Transform(overall); + overall = new KeyToValueMappingTransformer(env, MetricKinds.ColumnNames.StratCol).Transform(overall); return overall; } @@ -1388,9 +1376,10 @@ public static string GetConfusionTable(IHost host, IDataView confusionDataView, var confusionTable = GetConfusionTableAsArray(confusionDataView, countCol, labelNames.Length, labelIndexToConfIndexMap, numConfusionTableLabels, out precisionSums, out recallSums); + var predictedLabelNames = GetPredictedLabelNames(in labelNames, labelIndexToConfIndexMap); var confusionTableString = GetConfusionTableAsString(confusionTable, recallSums, precisionSums, - labelNames.Values.Where((t, i) => labelIndexToConfIndexMap[i] >= 0).ToArray(), - sampled: numConfusionTableLabels < labelNames.Count, binary: binary); + predictedLabelNames, + sampled: numConfusionTableLabels < labelNames.Length, binary: binary); int weightIndex; if (confusionDataView.Schema.TryGetColumnIndex(MetricKinds.ColumnNames.Weight, out weightIndex)) @@ -1398,8 +1387,8 @@ public static string GetConfusionTable(IHost host, IDataView confusionDataView, confusionTable = GetConfusionTableAsArray(confusionDataView, weightIndex, labelNames.Length, labelIndexToConfIndexMap, numConfusionTableLabels, out precisionSums, out recallSums); weightedConfusionTable = GetConfusionTableAsString(confusionTable, recallSums, precisionSums, - labelNames.Values.Where((t, i) => labelIndexToConfIndexMap[i] >= 0).ToArray(), - sampled: numConfusionTableLabels < labelNames.Count, prefix: "Weighted ", binary: binary); + predictedLabelNames, + sampled: numConfusionTableLabels < labelNames.Length, prefix: "Weighted ", binary: binary); } else weightedConfusionTable = null; @@ -1407,6 +1396,20 @@ public static string GetConfusionTable(IHost host, IDataView confusionDataView, return confusionTableString; } + private static List> GetPredictedLabelNames(in VBuffer> labelNames, int[] labelIndexToConfIndexMap) + { + List> result = new List>(); + var values = labelNames.GetValues(); + for (int i = 0; i < values.Length; i++) + { + if (labelIndexToConfIndexMap[i] >= 0) + { + result.Add(values[i]); + } + } + return result; + } + // This methods is given a data view and a column index of the counts, and computes three arrays: the confusion table, // the per class recall and the per class precision. private static double[][] GetConfusionTableAsArray(IDataView confusionDataView, int countIndex, int numClasses, @@ -1537,7 +1540,7 @@ private static string GetFoldMetricsAsString(IHostEnvironment env, IDataView dat // Get a string representation of a confusion table. private static string GetConfusionTableAsString(double[][] confusionTable, double[] rowSums, double[] columnSums, - ReadOnlyMemory[] predictedLabelNames, string prefix = "", bool sampled = false, bool binary = true) + List> predictedLabelNames, string prefix = "", bool sampled = false, bool binary = true) { int numLabels = Utils.Size(confusionTable); @@ -1555,7 +1558,7 @@ private static string GetConfusionTableAsString(double[][] confusionTable, doubl { // The row label will also include the index, so a user can easily match against the header. // In such a case, a label like "Foo" would be presented as something like "5. Foo". - rowDigitLen = Math.Max(predictedLabelNames.Length - 1, 0).ToString().Length; + rowDigitLen = Math.Max(predictedLabelNames.Count - 1, 0).ToString().Length; Contracts.Assert(rowDigitLen >= 1); rowLabelLen += rowDigitLen + 2; } @@ -1733,7 +1736,7 @@ public static IDataView GetNonStratifiedMetrics(IHostEnvironment env, IDataView var found = data.Schema.TryGetColumnIndex(MetricKinds.ColumnNames.StratVal, out stratVal); env.Check(found, "If stratification column exist, data view must also contain a StratVal column"); - data = SelectColumnsTransform.CreateDrop(env, data, data.Schema.GetColumnName(stratCol), data.Schema.GetColumnName(stratVal)); + data = ColumnSelectingTransformer.CreateDrop(env, data, data.Schema.GetColumnName(stratCol), data.Schema.GetColumnName(stratVal)); return data; } } diff --git a/src/Microsoft.ML.Data/Evaluators/MamlEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/MamlEvaluator.cs index 5e3c77a9e8..4ada846423 100644 --- a/src/Microsoft.ML.Data/Evaluators/MamlEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/MamlEvaluator.cs @@ -245,8 +245,8 @@ private IDataView WrapPerInstance(RoleMappedData perInst) foreach (var col in GetPerInstanceColumnsToSave(perInst.Schema)) colsToKeep.Add(col); - idv = new CopyColumnsTransform(Host, cols.ToArray()).Transform(idv); - idv = SelectColumnsTransform.CreateKeep(Host, idv, colsToKeep.ToArray()); + idv = new ColumnsCopyingTransformer(Host, cols.ToArray()).Transform(idv); + idv = ColumnSelectingTransformer.CreateKeep(Host, idv, colsToKeep.ToArray()); return GetPerInstanceMetricsCore(idv, perInst.Schema); } diff --git a/src/Microsoft.ML.Data/Evaluators/MultiOutputRegressionEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/MultiOutputRegressionEvaluator.cs index bb9dd9f8f8..48d4f67a36 100644 --- a/src/Microsoft.ML.Data/Evaluators/MultiOutputRegressionEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/MultiOutputRegressionEvaluator.cs @@ -246,11 +246,11 @@ public Counters(IRegressionLoss lossFunction, int size) _fnLoss = new double[size]; } - public void Update(Float[] score, Float[] label, int length, Float weight) + public void Update(ReadOnlySpan score, ReadOnlySpan label, int length, Float weight) { Contracts.Assert(length == _l1Loss.Length); - Contracts.Assert(Utils.Size(score) >= length); - Contracts.Assert(Utils.Size(label) >= length); + Contracts.Assert(score.Length >= length); + Contracts.Assert(label.Length >= length); Double wht = weight; Double l1 = 0; @@ -340,22 +340,22 @@ public override void ProcessRow() } } - Float[] label; + ReadOnlySpan label; if (!_label.IsDense) { _label.CopyTo(_labelArr); label = _labelArr; } else - label = _label.Values; - Float[] score; + label = _label.GetValues(); + ReadOnlySpan score; if (!_score.IsDense) { _score.CopyTo(_scoreArr); score = _scoreArr; } else - score = _score.Values; + score = _score.GetValues(); UnweightedCounters.Update(score, label, _size, 1); if (WeightedCounters != null) WeightedCounters.Update(score, label, _size, weight); @@ -363,13 +363,10 @@ public override void ProcessRow() public void GetSlotNames(ref VBuffer> slotNames) { - var values = slotNames.Values; - if (Utils.Size(values) < _size) - values = new ReadOnlyMemory[_size]; - + var editor = VBufferEditor.Create(ref slotNames, _size); for (int i = 0; i < _size; i++) - values[i] = string.Format("(Label_{0})", i).AsMemory(); - slotNames = new VBuffer>(_size, values); + editor.Values[i] = string.Format("(Label_{0})", i).AsMemory(); + slotNames = editor.Commit(); } } } @@ -605,12 +602,10 @@ private ValueGetter>> CreateSlotNamesGetter(ISchema return (ref VBuffer> dst) => { - var values = dst.Values; - if (Utils.Size(values) < length) - values = new ReadOnlyMemory[length]; + var editor = VBufferEditor.Create(ref dst, length); for (int i = 0; i < length; i++) - values[i] = string.Format("{0}_{1}", prefix, i).AsMemory(); - dst = new VBuffer>(length, values); + editor.Values[i] = string.Format("{0}_{1}", prefix, i).AsMemory(); + dst = editor.Commit(); }; } } diff --git a/src/Microsoft.ML.Data/Evaluators/MulticlassClassifierEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/MulticlassClassifierEvaluator.cs index b2e479fcf0..a94fc32e82 100644 --- a/src/Microsoft.ML.Data/Evaluators/MulticlassClassifierEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/MulticlassClassifierEvaluator.cs @@ -487,13 +487,10 @@ protected override List GetWarningsCore() public void GetSlotNames(ref VBuffer> slotNames) { - var values = slotNames.Values; - if (Utils.Size(values) < ClassNames.Length) - values = new ReadOnlyMemory[ClassNames.Length]; - + var editor = VBufferEditor.Create(ref slotNames, ClassNames.Length); for (int i = 0; i < ClassNames.Length; i++) - values[i] = string.Format("(class {0})", ClassNames[i]).AsMemory(); - slotNames = new VBuffer>(ClassNames.Length, values); + editor.Values[i] = string.Format("(class {0})", ClassNames[i]).AsMemory(); + slotNames = editor.Commit(); } } @@ -804,12 +801,10 @@ public override Delegate[] CreateGetters(IRow input, Func activeOutpu (ref VBuffer dst) => { updateCacheIfNeeded(); - var values = dst.Values; - if (Utils.Size(values) < _numClasses) - values = new float[_numClasses]; + var editor = VBufferEditor.Create(ref dst, _numClasses); for (int i = 0; i < _numClasses; i++) - values[i] = scores.GetItemOrDefault(sortedIndices[i]); - dst = new VBuffer(_numClasses, values); + editor.Values[i] = scores.GetItemOrDefault(sortedIndices[i]); + dst = editor.Commit(); }; getters[SortedScoresCol] = topKScoresFn; } @@ -820,12 +815,10 @@ public override Delegate[] CreateGetters(IRow input, Func activeOutpu (ref VBuffer dst) => { updateCacheIfNeeded(); - var values = dst.Values; - if (Utils.Size(values) < _numClasses) - values = new uint[_numClasses]; + var editor = VBufferEditor.Create(ref dst, _numClasses); for (int i = 0; i < _numClasses; i++) - values[i] = (uint)sortedIndices[i] + 1; - dst = new VBuffer(_numClasses, values); + editor.Values[i] = (uint)sortedIndices[i] + 1; + dst = editor.Commit(); }; getters[SortedClassesCol] = topKClassesFn; } @@ -885,12 +878,10 @@ private ValueGetter>> CreateSlotNamesGetter(int num return (ref VBuffer> dst) => { - var values = dst.Values; - if (Utils.Size(values) < numTopClasses) - values = new ReadOnlyMemory[numTopClasses]; + var editor = VBufferEditor.Create(ref dst, numTopClasses); for (int i = 1; i <= numTopClasses; i++) - values[i - 1] = string.Format("#{0} {1}", i, suffix).AsMemory(); - dst = new VBuffer>(numTopClasses, values); + editor.Values[i - 1] = string.Format("#{0} {1}", i, suffix).AsMemory(); + dst = editor.Commit(); }; } @@ -899,12 +890,10 @@ private ValueGetter>> CreateKeyValueGetter() return (ref VBuffer> dst) => { - var values = dst.Values; - if (Utils.Size(values) < _numClasses) - values = new ReadOnlyMemory[_numClasses]; + var editor = VBufferEditor.Create(ref dst, _numClasses); for (int i = 0; i < _numClasses; i++) - values[i] = _classNames[i]; - dst = new VBuffer>(_numClasses, values); + editor.Values[i] = _classNames[i]; + dst = editor.Commit(); }; } @@ -1050,15 +1039,15 @@ protected override IDataView GetOverallResultsCore(IDataView overall) private IDataView ChangeTopKAccColumnName(IDataView input) { - input = new CopyColumnsTransform(Host, (MultiClassClassifierEvaluator.TopKAccuracy, string.Format(TopKAccuracyFormat, _outputTopKAcc))).Transform(input); - return SelectColumnsTransform.CreateDrop(Host, input, MultiClassClassifierEvaluator.TopKAccuracy ); + input = new ColumnsCopyingTransformer(Host, (MultiClassClassifierEvaluator.TopKAccuracy, string.Format(TopKAccuracyFormat, _outputTopKAcc))).Transform(input); + return ColumnSelectingTransformer.CreateDrop(Host, input, MultiClassClassifierEvaluator.TopKAccuracy); } private IDataView DropPerClassColumn(IDataView input) { if (input.Schema.TryGetColumnIndex(MultiClassClassifierEvaluator.PerClassLogLoss, out int perClassCol)) { - input = SelectColumnsTransform.CreateDrop(Host, input, MultiClassClassifierEvaluator.PerClassLogLoss); + input = ColumnSelectingTransformer.CreateDrop(Host, input, MultiClassClassifierEvaluator.PerClassLogLoss); } return input; } @@ -1101,7 +1090,7 @@ protected override IDataView GetPerInstanceMetricsCore(IDataView perInst, RoleMa if (!perInst.Schema.TryGetColumnIndex(schema.Label.Name, out int labelCol)) throw Host.Except("Could not find column '{0}'", schema.Label.Name); var labelType = perInst.Schema.GetColumnType(labelCol); - if (labelType.IsKey && (!perInst.Schema.HasKeyNames(labelCol, labelType.KeyCount) || labelType.RawKind != DataKind.U4)) + if (labelType.IsKey && (!perInst.Schema.HasKeyValues(labelCol, labelType.KeyCount) || labelType.RawKind != DataKind.U4)) { perInst = LambdaColumnMapper.Create(Host, "ConvertToDouble", perInst, schema.Label.Name, schema.Label.Name, perInst.Schema.GetColumnType(labelCol), NumberType.R8, diff --git a/src/Microsoft.ML.Data/Evaluators/QuantileRegressionEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/QuantileRegressionEvaluator.cs index b95f7f25fb..fe3e88dc42 100644 --- a/src/Microsoft.ML.Data/Evaluators/QuantileRegressionEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/QuantileRegressionEvaluator.cs @@ -50,7 +50,7 @@ protected override IRowMapper CreatePerInstanceRowMapper(RoleMappedSchema schema schema.Schema.GetMetadata(MetadataUtils.Kinds.SlotNames, scoreInfo.Index, ref quantiles); Host.Assert(quantiles.IsDense && quantiles.Length == scoreSize); - return new QuantileRegressionPerInstanceEvaluator(Host, schema.Schema, scoreInfo.Name, schema.Label.Name, scoreSize, quantiles.Values); + return new QuantileRegressionPerInstanceEvaluator(Host, schema.Schema, scoreInfo.Name, schema.Label.Name, scoreSize, quantiles); } protected override void CheckScoreAndLabelTypes(RoleMappedSchema schema) @@ -142,6 +142,9 @@ private void AddL1AndL2Loss(Float label, in VBuffer score, Float weight) { Contracts.Check(score.Length == TotalL1Loss.Length, "Vectors must have the same dimensionality."); + var totalL1LossEditor = VBufferEditor.CreateFromBuffer(ref TotalL1Loss); + var totalL2LossEditor = VBufferEditor.CreateFromBuffer(ref TotalL2Loss); + var scoreValues = score.GetValues(); if (score.IsDense) { @@ -150,8 +153,8 @@ private void AddL1AndL2Loss(Float label, in VBuffer score, Float weight) { var diff = Math.Abs((Double)label - scoreValues[i]); var weightedDiff = diff * weight; - TotalL1Loss.Values[i] += weightedDiff; - TotalL2Loss.Values[i] += diff * weightedDiff; + totalL1LossEditor.Values[i] += weightedDiff; + totalL2LossEditor.Values[i] += diff * weightedDiff; } return; } @@ -162,8 +165,8 @@ private void AddL1AndL2Loss(Float label, in VBuffer score, Float weight) { var diff = Math.Abs((Double)label - scoreValues[i]); var weightedDiff = diff * weight; - TotalL1Loss.Values[scoreIndices[i]] += weightedDiff; - TotalL2Loss.Values[scoreIndices[i]] += diff * weightedDiff; + totalL1LossEditor.Values[scoreIndices[i]] += weightedDiff; + totalL2LossEditor.Values[scoreIndices[i]] += diff * weightedDiff; } } @@ -171,19 +174,21 @@ private void AddCustomLoss(Float weight, in VBuffer loss) { Contracts.Check(loss.Length == TotalL1Loss.Length, "Vectors must have the same dimensionality."); + var totalLossEditor = VBufferEditor.CreateFromBuffer(ref TotalLoss); + var lossValues = loss.GetValues(); if (loss.IsDense) { // Both are dense. for (int i = 0; i < lossValues.Length; i++) - TotalLoss.Values[i] += lossValues[i] * weight; + totalLossEditor.Values[i] += lossValues[i] * weight; return; } // loss is sparse, and _totalL1Loss is dense. var lossIndices = loss.GetIndices(); for (int i = 0; i < lossValues.Length; i++) - TotalLoss.Values[lossIndices[i]] += lossValues[i] * weight; + totalLossEditor.Values[lossIndices[i]] += lossValues[i] * weight; } protected override void Normalize(in VBuffer src, ref VBuffer dst) @@ -191,13 +196,12 @@ protected override void Normalize(in VBuffer src, ref VBuffer ds Contracts.Assert(SumWeights > 0); Contracts.Assert(src.IsDense); - var values = dst.Values; - if (Utils.Size(values) < src.Length) - values = new Double[src.Length]; + var editor = VBufferEditor.Create(ref dst, src.Length); var inv = 1 / SumWeights; - for (int i = 0; i < src.Length; i++) - values[i] = src.Values[i] * inv; - dst = new VBuffer(src.Length, values); + var srcValues = src.GetValues(); + for (int i = 0; i < srcValues.Length; i++) + editor.Values[i] = srcValues[i] * inv; + dst = editor.Commit(); } protected override VBuffer Zero() @@ -277,15 +281,17 @@ private static VersionInfo GetVersionInfo() public const string L2 = "L2-loss"; private readonly int _scoreSize; - private readonly ReadOnlyMemory[] _quantiles; + private readonly VBuffer> _quantiles; private readonly ColumnType _outputType; - public QuantileRegressionPerInstanceEvaluator(IHostEnvironment env, ISchema schema, string scoreCol, string labelCol, int scoreSize, ReadOnlyMemory[] quantiles) + public QuantileRegressionPerInstanceEvaluator(IHostEnvironment env, ISchema schema, string scoreCol, string labelCol, int scoreSize, VBuffer> quantiles) : base(env, schema, scoreCol, labelCol) { Host.CheckParam(scoreSize > 0, nameof(scoreSize), "must be greater than 0"); - if (Utils.Size(quantiles) != scoreSize) - throw Host.ExceptParam(nameof(quantiles), "array must be of length '{0}'", scoreSize); + if (!quantiles.IsDense) + throw Host.ExceptParam(nameof(quantiles), "buffer must be dense"); + if (quantiles.Length != scoreSize) + throw Host.ExceptParam(nameof(quantiles), "buffer must be of length '{0}'", scoreSize); CheckInputColumnTypes(schema); _scoreSize = scoreSize; _quantiles = quantiles; @@ -304,9 +310,10 @@ private QuantileRegressionPerInstanceEvaluator(IHostEnvironment env, ModelLoadCo _scoreSize = ctx.Reader.ReadInt32(); Host.CheckDecode(_scoreSize > 0); - _quantiles = new ReadOnlyMemory[_scoreSize]; + ReadOnlyMemory[] quantiles = new ReadOnlyMemory[_scoreSize]; for (int i = 0; i < _scoreSize; i++) - _quantiles[i] = ctx.LoadNonEmptyString().AsMemory(); + quantiles[i] = ctx.LoadNonEmptyString().AsMemory(); + _quantiles = new VBuffer>(quantiles.Length, quantiles); _outputType = new VectorType(NumberType.R8, _scoreSize); } @@ -333,8 +340,9 @@ public override void Save(ModelSaveContext ctx) base.Save(ctx); Host.Assert(_scoreSize > 0); ctx.Writer.Write(_scoreSize); + var quantiles = _quantiles.GetValues(); for (int i = 0; i < _scoreSize; i++) - ctx.SaveNonEmptyString(_quantiles[i].ToString()); + ctx.SaveNonEmptyString(quantiles[i].ToString()); } public override Func GetDependencies(Func activeOutput) @@ -364,12 +372,11 @@ private ValueGetter>> CreateSlotNamesGetter(string return (ref VBuffer> dst) => { - var values = dst.Values; - if (Utils.Size(values) < _scoreSize) - values = new ReadOnlyMemory[_scoreSize]; + var editor = VBufferEditor.Create(ref dst, _scoreSize); + var quantiles = _quantiles.GetValues(); for (int i = 0; i < _scoreSize; i++) - values[i] = string.Format("{0} ({1})", prefix, _quantiles[i]).AsMemory(); - dst = new VBuffer>(_scoreSize, values); + editor.Values[i] = string.Format("{0} ({1})", prefix, quantiles[i]).AsMemory(); + dst = editor.Commit(); }; } @@ -400,8 +407,9 @@ public override Delegate[] CreateGetters(IRow input, Func activeCols, labelGetter(ref label); scoreGetter(ref score); var lab = (Double)label; + var l1Editor = VBufferEditor.CreateFromBuffer(ref l1); foreach (var s in score.Items(all: true)) - l1.Values[s.Key] = Math.Abs(lab - s.Value); + l1Editor.Values[s.Key] = Math.Abs(lab - s.Value); cachedPosition = input.Position; } }; @@ -426,7 +434,7 @@ public override Delegate[] CreateGetters(IRow input, Func activeCols, (ref VBuffer dst) => { updateCacheIfNeeded(); - dst = new VBuffer(_scoreSize, 0, dst.Values, dst.Indices); + VBufferUtils.Resize(ref dst, _scoreSize, 0); VBufferUtils.ApplyWith(in l1, ref dst, sqr); }; getters[L2Col] = l2Fn; diff --git a/src/Microsoft.ML.Data/Evaluators/RankerEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/RankerEvaluator.cs index 46278662f2..4c43ba274f 100644 --- a/src/Microsoft.ML.Data/Evaluators/RankerEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/RankerEvaluator.cs @@ -522,25 +522,19 @@ public ValueGetter>> GetGroupSummarySlotNames(strin return (ref VBuffer> dst) => { - var values = dst.Values; - if (Utils.Size(values) < UnweightedCounters.TruncationLevel) - values = new ReadOnlyMemory[UnweightedCounters.TruncationLevel]; - + var editor = VBufferEditor.Create(ref dst, UnweightedCounters.TruncationLevel); for (int i = 0; i < UnweightedCounters.TruncationLevel; i++) - values[i] = string.Format("{0}@{1}", prefix, i + 1).AsMemory(); - dst = new VBuffer>(UnweightedCounters.TruncationLevel, values); + editor.Values[i] = string.Format("{0}@{1}", prefix, i + 1).AsMemory(); + dst = editor.Commit(); }; } public void GetSlotNames(ref VBuffer> slotNames) { - var values = slotNames.Values; - if (Utils.Size(values) < UnweightedCounters.TruncationLevel) - values = new ReadOnlyMemory[UnweightedCounters.TruncationLevel]; - + var editor = VBufferEditor.Create(ref slotNames, UnweightedCounters.TruncationLevel); for (int i = 0; i < UnweightedCounters.TruncationLevel; i++) - values[i] = string.Format("@{0}", i + 1).AsMemory(); - slotNames = new VBuffer>(UnweightedCounters.TruncationLevel, values); + editor.Values[i] = string.Format("@{0}", i + 1).AsMemory(); + slotNames = editor.Commit(); } } @@ -573,8 +567,8 @@ internal Result(IExceptionContext ectx, IRow overallResult) { VBuffer Fetch(string name) => Fetch>(ectx, overallResult, name); - Dcg = Fetch(RankerEvaluator.Dcg).Values; - Ndcg = Fetch(RankerEvaluator.Ndcg).Values; + Dcg = Fetch(RankerEvaluator.Dcg).GetValues().ToArray(); + Ndcg = Fetch(RankerEvaluator.Ndcg).GetValues().ToArray(); } } } @@ -635,9 +629,9 @@ public void Save(ModelSaveContext ctx) _transform.Save(ctx); } - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { - return _transform.GetRowCount(lazy); + return _transform.GetRowCount(); } public IRowCursor GetRowCursor(Func needCol, IRandom rand = null) @@ -705,14 +699,12 @@ protected override void GetMetadataCore(string kind, int iinfo, ref TVal private void SlotNamesGetter(int iinfo, ref VBuffer> dst) { Contracts.Assert(0 <= iinfo && iinfo < InfoCount); - var values = dst.Values; - if (Utils.Size(values) < _truncationLevel) - values = new ReadOnlyMemory[_truncationLevel]; + var editor = VBufferEditor.Create(ref dst, _truncationLevel); for (int i = 0; i < _truncationLevel; i++) - values[i] = + editor.Values[i] = string.Format("{0}@{1}", iinfo == NdcgCol ? Ndcg : iinfo == DcgCol ? Dcg : MaxDcg, i + 1).AsMemory(); - dst = new VBuffer>(_truncationLevel, values); + dst = editor.Commit(); } } @@ -802,11 +794,9 @@ protected override Delegate[] CreateGetters(RowCursorState state, Func dst) { Host.AssertValue(src); - var values = dst.Values; - if (Utils.Size(values) < src.Length) - values = new Double[src.Length]; - src.CopyTo(values, 0); - dst = new VBuffer(src.Length, values); + var editor = VBufferEditor.Create(ref dst, src.Length); + src.CopyTo(editor.Values); + dst = editor.Commit(); } protected override ValueGetter GetLabelGetter(IRow row) diff --git a/src/Microsoft.ML.Data/MLContext.cs b/src/Microsoft.ML.Data/MLContext.cs index 658185e052..528a3fac70 100644 --- a/src/Microsoft.ML.Data/MLContext.cs +++ b/src/Microsoft.ML.Data/MLContext.cs @@ -53,7 +53,7 @@ public sealed class MLContext : IHostEnvironment /// /// Data loading and saving. /// - public DataLoadSaveOperations Data { get; } + public DataOperations Data { get; } // REVIEW: I think it's valuable to have the simplest possible interface for logging interception here, // and expand if and when necessary. Exposing classes like ChannelMessage, MessageSensitivity and so on @@ -85,7 +85,7 @@ public MLContext(int? seed = null, int conc = 0) Ranking = new RankingContext(_env); Transforms = new TransformsCatalog(_env); Model = new ModelOperationsCatalog(_env); - Data = new DataLoadSaveOperations(_env); + Data = new DataOperations(_env); } private CompositionContainer MakeCompositionContainer() diff --git a/src/Microsoft.ML.Data/Model/ModelHeader.cs b/src/Microsoft.ML.Data/Model/ModelHeader.cs index 9acaaccfee..b74d0fdca6 100644 --- a/src/Microsoft.ML.Data/Model/ModelHeader.cs +++ b/src/Microsoft.ML.Data/Model/ModelHeader.cs @@ -12,7 +12,7 @@ namespace Microsoft.ML.Runtime.Model { [StructLayout(LayoutKind.Explicit, Size = ModelHeader.Size)] - public struct ModelHeader + internal struct ModelHeader { /// /// This spells 'ML MODEL' with zero replacing space (assuming little endian). diff --git a/src/Microsoft.ML.Data/Model/ModelLoadContext.cs b/src/Microsoft.ML.Data/Model/ModelLoadContext.cs index 7efd9f4b47..749a226012 100644 --- a/src/Microsoft.ML.Data/Model/ModelLoadContext.cs +++ b/src/Microsoft.ML.Data/Model/ModelLoadContext.cs @@ -50,7 +50,8 @@ public sealed partial class ModelLoadContext : IDisposable /// /// The main stream's model header. /// - public ModelHeader Header; + [BestFriend] + internal ModelHeader Header; /// /// The min file position of the main stream. @@ -70,7 +71,7 @@ public sealed partial class ModelLoadContext : IDisposable /// /// Create a ModelLoadContext supporting loading from a repository, for implementors of ICanSaveModel. /// - public ModelLoadContext(RepositoryReader rep, Repository.Entry ent, string dir) + internal ModelLoadContext(RepositoryReader rep, Repository.Entry ent, string dir) { Contracts.CheckValue(rep, nameof(rep)); Repository = rep; @@ -96,7 +97,7 @@ public ModelLoadContext(RepositoryReader rep, Repository.Entry ent, string dir) /// /// Create a ModelLoadContext supporting loading from a single-stream, for implementors of ICanSaveInBinaryFormat. /// - public ModelLoadContext(BinaryReader reader, IExceptionContext ectx = null) + internal ModelLoadContext(BinaryReader reader, IExceptionContext ectx = null) { Contracts.AssertValueOrNull(ectx); _ectx = ectx; diff --git a/src/Microsoft.ML.Data/Model/ModelSaveContext.cs b/src/Microsoft.ML.Data/Model/ModelSaveContext.cs index c5a9199758..eee8d23df7 100644 --- a/src/Microsoft.ML.Data/Model/ModelSaveContext.cs +++ b/src/Microsoft.ML.Data/Model/ModelSaveContext.cs @@ -11,9 +11,9 @@ namespace Microsoft.ML.Runtime.Model { /// /// This is a convenience context object for saving models to a repository, for - /// implementors of ICanSaveModel. It is not mandated but designed to reduce the + /// implementors of . It is not mandated but designed to reduce the /// amount of boiler plate code. It can also be used when saving to a single stream, - /// for implementors of ICanSaveInBinaryFormat. + /// for implementors of . /// public sealed partial class ModelSaveContext : IDisposable { @@ -37,12 +37,14 @@ public sealed partial class ModelSaveContext : IDisposable /// /// The strings that will be saved in the main stream's string table. /// - public readonly NormStr.Pool Strings; + [BestFriend] + internal readonly NormStr.Pool Strings; /// /// The main stream's model header. /// - public ModelHeader Header; + [BestFriend] + internal ModelHeader Header; /// /// The min file position of the main stream. @@ -70,9 +72,9 @@ public sealed partial class ModelSaveContext : IDisposable public bool InRepository { get { return Repository != null; } } /// - /// Create a ModelSaveContext supporting saving to a repository, for implementors of ICanSaveModel. + /// Create a supporting saving to a repository, for implementors of . /// - public ModelSaveContext(RepositoryWriter rep, string dir, string name) + internal ModelSaveContext(RepositoryWriter rep, string dir, string name) { Contracts.CheckValue(rep, nameof(rep)); Repository = rep; @@ -106,9 +108,9 @@ public ModelSaveContext(RepositoryWriter rep, string dir, string name) } /// - /// Create a ModelSaveContext supporting saving to a single-stream, for implementors of ICanSaveInBinaryFormat. + /// Create a supporting saving to a single-stream, for implementors of . /// - public ModelSaveContext(BinaryWriter writer, IExceptionContext ectx = null) + internal ModelSaveContext(BinaryWriter writer, IExceptionContext ectx = null) { Contracts.AssertValueOrNull(ectx); _ectx = ectx; @@ -130,7 +132,7 @@ public void CheckAtModel() /// /// Set the version information in the main stream's header. This should be called before - /// Done is called. + /// is called. /// /// public void SetVersionInfo(VersionInfo ver) @@ -213,7 +215,7 @@ public void SaveNonEmptyString(ReadOnlyMemory str) /// /// Commit the save operation. This completes writing of the main stream. When in repository - /// mode, it disposes the Writer (but not the repository). + /// mode, it disposes (but not ). /// public void Done() { diff --git a/src/Microsoft.ML.Data/Model/Onnx/ICanSaveOnnx.cs b/src/Microsoft.ML.Data/Model/Onnx/ICanSaveOnnx.cs index 37d938e234..dfc8756303 100644 --- a/src/Microsoft.ML.Data/Model/Onnx/ICanSaveOnnx.cs +++ b/src/Microsoft.ML.Data/Model/Onnx/ICanSaveOnnx.cs @@ -6,7 +6,8 @@ namespace Microsoft.ML.Runtime.Model.Onnx { - public interface ICanSaveOnnx + [BestFriend] + internal interface ICanSaveOnnx { /// /// Whether this object really is capable of saving itself as part of an ONNX @@ -21,7 +22,8 @@ public interface ICanSaveOnnx /// /// This component know how to save himself in ONNX format. /// - public interface ISaveAsOnnx : ICanSaveOnnx + [BestFriend] + internal interface ISaveAsOnnx : ICanSaveOnnx { /// /// Save as ONNX. @@ -33,7 +35,8 @@ public interface ISaveAsOnnx : ICanSaveOnnx /// /// This data model component is savable as ONNX. /// - public interface ITransformCanSaveOnnx : ISaveAsOnnx, IDataTransform + [BestFriend] + internal interface ITransformCanSaveOnnx : ISaveAsOnnx, IDataTransform { } @@ -42,7 +45,8 @@ public interface ITransformCanSaveOnnx : ISaveAsOnnx, IDataTransform /// typically called within an that is wrapping /// this mapper, and has already been bound to it. /// - public interface IBindableCanSaveOnnx : ICanSaveOnnx, ISchemaBindableMapper + [BestFriend] + internal interface IBindableCanSaveOnnx : ICanSaveOnnx, ISchemaBindableMapper { /// /// Save as ONNX. If is @@ -66,7 +70,8 @@ public interface IBindableCanSaveOnnx : ICanSaveOnnx, ISchemaBindableMapper /// For simple mappers. Intended to be used for and /// instances. /// - public interface ISingleCanSaveOnnx : ICanSaveOnnx + [BestFriend] + internal interface ISingleCanSaveOnnx : ICanSaveOnnx { bool SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumn); } @@ -75,7 +80,8 @@ public interface ISingleCanSaveOnnx : ICanSaveOnnx /// For simple mappers. Intended to be used for /// instances. /// - public interface IDistCanSaveOnnx : ISingleCanSaveOnnx, IValueMapperDist + [BestFriend] + internal interface IDistCanSaveOnnx : ISingleCanSaveOnnx, IValueMapperDist { new bool SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumn); } diff --git a/src/Microsoft.ML.Data/Model/Onnx/OnnxContext.cs b/src/Microsoft.ML.Data/Model/Onnx/OnnxContext.cs index 850d2f6b64..38d9f77915 100644 --- a/src/Microsoft.ML.Data/Model/Onnx/OnnxContext.cs +++ b/src/Microsoft.ML.Data/Model/Onnx/OnnxContext.cs @@ -7,7 +7,8 @@ namespace Microsoft.ML.Runtime.Model.Onnx { - public enum OnnxVersion { Stable=0, Experimental=1 } + [BestFriend] + internal enum OnnxVersion { Stable = 0, Experimental = 1 } /// /// A context for defining a ONNX output. The context internally contains the model-in-progress being built. This @@ -16,7 +17,8 @@ public enum OnnxVersion { Stable=0, Experimental=1 } /// given to a component, all other components up to that component have already attempted to express themselves in /// this context, with their outputs possibly available in the ONNX graph. /// - public abstract class OnnxContext + [BestFriend] + internal abstract class OnnxContext { /// /// Generates a unique name for the node based on a prefix. diff --git a/src/Microsoft.ML.Data/Model/Pfa/BoundPfaContext.cs b/src/Microsoft.ML.Data/Model/Pfa/BoundPfaContext.cs index c75b760f3a..5090ea542c 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/BoundPfaContext.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/BoundPfaContext.cs @@ -20,7 +20,8 @@ namespace Microsoft.ML.Runtime.Model.Pfa /// has facilities to remember what column name in maps to /// what token in the PFA being built up. /// - public sealed class BoundPfaContext + [BestFriend] + internal sealed class BoundPfaContext { /// /// The internal PFA context, for an escape hatch. diff --git a/src/Microsoft.ML.Data/Model/Pfa/ICanSavePfa.cs b/src/Microsoft.ML.Data/Model/Pfa/ICanSavePfa.cs index bc0266f96e..bcda835fe8 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/ICanSavePfa.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/ICanSavePfa.cs @@ -7,7 +7,8 @@ namespace Microsoft.ML.Runtime.Model.Pfa { - public interface ICanSavePfa + [BestFriend] + internal interface ICanSavePfa { /// /// Whether this object really is capable of saving itself as part of a PFA @@ -22,7 +23,8 @@ public interface ICanSavePfa /// /// This component know how to save himself in Pfa format. /// - public interface ISaveAsPfa : ICanSavePfa + [BestFriend] + internal interface ISaveAsPfa : ICanSavePfa { /// /// Save as PFA. For any columns that are output, this interface should use @@ -37,9 +39,9 @@ public interface ISaveAsPfa : ICanSavePfa /// /// This data model component is savable as PFA. See https://dmg.org/pfa/ . /// - public interface ITransformCanSavePfa : ISaveAsPfa, IDataTransform + [BestFriend] + internal interface ITransformCanSavePfa : ISaveAsPfa, IDataTransform { - } /// @@ -47,7 +49,8 @@ public interface ITransformCanSavePfa : ISaveAsPfa, IDataTransform /// typically called within an that is wrapping /// this mapper, and has already been bound to it. /// - public interface IBindableCanSavePfa : ICanSavePfa, ISchemaBindableMapper + [BestFriend] + internal interface IBindableCanSavePfa : ICanSavePfa, ISchemaBindableMapper { /// /// Save as PFA. If is @@ -71,7 +74,8 @@ public interface IBindableCanSavePfa : ICanSavePfa, ISchemaBindableMapper /// For simple mappers. Intended to be used for and /// instances. /// - public interface ISingleCanSavePfa : ICanSavePfa + [BestFriend] + internal interface ISingleCanSavePfa : ICanSavePfa { /// /// Implementors of this method are responsible for providing the PFA expression that @@ -92,7 +96,8 @@ public interface ISingleCanSavePfa : ICanSavePfa /// For simple mappers. Intended to be used for /// instances. /// - public interface IDistCanSavePfa : ISingleCanSavePfa, IValueMapperDist + [BestFriend] + internal interface IDistCanSavePfa : ISingleCanSavePfa, IValueMapperDist { /// /// The call for distribution predictors. Unlike , diff --git a/src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs b/src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs index e772a65334..110296e1d0 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs @@ -6,7 +6,7 @@ namespace Microsoft.ML.Runtime.Model { - public static class ModelUtils + internal static class ModelUtils { private static string ArgCase(string name) { diff --git a/src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs b/src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs index b21ceaa3f0..2d89916028 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs @@ -11,7 +11,8 @@ namespace Microsoft.ML.Runtime.Model.Pfa /// /// A context for defining a restricted sort of PFA output. /// - public sealed class PfaContext + [BestFriend] + internal sealed class PfaContext { public JToken InputType { get; set; } public JToken OutputType { get; set; } diff --git a/src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs b/src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs index dbfbb99732..9b4f6bcf3f 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs @@ -8,7 +8,8 @@ namespace Microsoft.ML.Runtime.Model.Pfa { - public static class PfaUtils + [BestFriend] + internal static class PfaUtils { public static JObject AddReturn(this JObject toEdit, string name, JToken value) { diff --git a/src/Microsoft.ML.Data/Model/Pfa/SavePfaCommand.cs b/src/Microsoft.ML.Data/Model/Pfa/SavePfaCommand.cs index 2f789b7851..57a1f782c7 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/SavePfaCommand.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/SavePfaCommand.cs @@ -19,7 +19,7 @@ namespace Microsoft.ML.Runtime.Model.Pfa { - public sealed class SavePfaCommand : DataCommand.ImplBase + internal sealed class SavePfaCommand : DataCommand.ImplBase { public const string Summary = "Given a data model, write out the corresponding PFA."; public const string LoadName = "SavePfa"; diff --git a/src/Microsoft.ML.Data/Model/Repository.cs b/src/Microsoft.ML.Data/Model/Repository.cs index eb665f1bfc..c93e6d00b6 100644 --- a/src/Microsoft.ML.Data/Model/Repository.cs +++ b/src/Microsoft.ML.Data/Model/Repository.cs @@ -226,7 +226,7 @@ protected void RemoveEntry(Entry ent) /// When we load those entries into our look-up dictionary, we normalize them to always use /// backward slashes. /// - protected static string NormalizeForArchiveEntry(string path) => path?.Replace('/', '\\'); + protected static string NormalizeForArchiveEntry(string path) => path?.Replace('/', Path.DirectorySeparatorChar); /// /// When building paths to our local file system, we want to force both forward and backward slashes @@ -497,25 +497,38 @@ public Entry OpenEntryOrNull(string dir, string name) string pathAbs; string pathLower = pathEnt.ToLowerInvariant(); if (PathMap.TryGetValue(pathLower, out pathAbs)) - stream = new FileStream(pathAbs, FileMode.Open, FileAccess.Read); - else if (!_entries.TryGetValue(pathEnt, out entry)) - return null; - else if (pathTemp != null) { - // Extract to a temporary file. - Directory.CreateDirectory(Path.GetDirectoryName(pathTemp)); - entry.ExtractToFile(pathTemp); - PathMap.Add(pathLower, pathTemp); - stream = new FileStream(pathTemp, FileMode.Open, FileAccess.Read); + stream = new FileStream(pathAbs, FileMode.Open, FileAccess.Read); } else { - // Extract to a memory stream. - ExceptionContext.CheckDecode(entry.Length < int.MaxValue, "Repository stream too large to read into memory"); - stream = new MemoryStream((int)entry.Length); - using (var src = entry.Open()) - src.CopyTo(stream); - stream.Position = 0; + if (!_entries.TryGetValue(pathEnt, out entry)) + { + //Read old zip file that use backslash in filename + var pathEntTmp = pathEnt.Replace("/","\\"); + if (!_entries.TryGetValue(pathEntTmp, out entry)) + { + return null; + } + } + + if (pathTemp != null) + { + // Extract to a temporary file. + Directory.CreateDirectory(Path.GetDirectoryName(pathTemp)); + entry.ExtractToFile(pathTemp); + PathMap.Add(pathLower, pathTemp); + stream = new FileStream(pathTemp, FileMode.Open, FileAccess.Read); + } + else + { + // Extract to a memory stream. + ExceptionContext.CheckDecode(entry.Length < int.MaxValue, "Repository stream too large to read into memory"); + stream = new MemoryStream((int)entry.Length); + using (var src = entry.Open()) + src.CopyTo(stream); + stream.Position = 0; + } } return AddEntry(pathEnt, stream); diff --git a/src/Microsoft.ML.Data/Prediction/Calibrator.cs b/src/Microsoft.ML.Data/Prediction/Calibrator.cs index c05a87dbaf..20d87fcbf6 100644 --- a/src/Microsoft.ML.Data/Prediction/Calibrator.cs +++ b/src/Microsoft.ML.Data/Prediction/Calibrator.cs @@ -224,8 +224,8 @@ public abstract class ValueMapperCalibratedPredictorBase : CalibratedPredictorBa public ColumnType InputType => _mapper.InputType; public ColumnType OutputType => _mapper.OutputType; public ColumnType DistType => NumberType.Float; - public bool CanSavePfa => (_mapper as ICanSavePfa)?.CanSavePfa == true; - public bool CanSaveOnnx(OnnxContext ctx) => (_mapper as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; + bool ICanSavePfa.CanSavePfa => (_mapper as ICanSavePfa)?.CanSavePfa == true; + bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => (_mapper as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; protected ValueMapperCalibratedPredictorBase(IHostEnvironment env, string name, IPredictorProducing predictor, ICalibrator calibrator) : base(env, name, predictor, calibrator) @@ -265,7 +265,7 @@ public ValueMapper> GetWhatTheFeatureMapper(int return _whatTheFeature.GetWhatTheFeatureMapper(top, bottom, normalize); } - public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) + JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckValue(input, nameof(input)); @@ -275,7 +275,7 @@ public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) return mapper.SaveAsPfa(ctx, input); } - public void SaveAsPfa(BoundPfaContext ctx, JToken input, + void IDistCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input, string score, out JToken scoreToken, string prob, out JToken probToken) { Host.CheckValue(ctx, nameof(ctx)); @@ -283,7 +283,7 @@ public void SaveAsPfa(BoundPfaContext ctx, JToken input, Host.CheckValueOrNull(score); Host.CheckValueOrNull(prob); - JToken scoreExpression = SaveAsPfa(ctx, input); + JToken scoreExpression = ((ISingleCanSavePfa)this).SaveAsPfa(ctx, input); scoreToken = ctx.DeclareVar(score, scoreExpression); var calibrator = Calibrator as ISingleCanSavePfa; if (calibrator?.CanSavePfa != true) @@ -296,7 +296,10 @@ public void SaveAsPfa(BoundPfaContext ctx, JToken input, probToken = ctx.DeclareVar(prob, probExpression); } - public bool SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumnName) + bool IDistCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumnName) + => ((ISingleCanSaveOnnx)this).SaveAsOnnx(ctx, outputNames, featureColumnName); + + bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumnName) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckValue(outputNames, nameof(outputNames)); @@ -620,9 +623,9 @@ private static VersionInfo GetVersionInfo() /// Whether we can save as PFA. Note that this depends on whether the underlying predictor /// can save as PFA, since in the event that this in particular does not get saved, /// - public bool CanSavePfa => (_bindable as ICanSavePfa)?.CanSavePfa == true; + bool ICanSavePfa.CanSavePfa => (_bindable as ICanSavePfa)?.CanSavePfa == true; - public bool CanSaveOnnx(OnnxContext ctx) => (_bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; + bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => (_bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; public SchemaBindableCalibratedPredictor(IHostEnvironment env, IPredictorProducing predictor, ICalibrator calibrator) : base(env, LoaderSignature, predictor, calibrator) @@ -653,22 +656,22 @@ public void Save(ModelSaveContext ctx) SaveCore(ctx); } - public void SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputs) + void IBindableCanSavePfa.SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputs) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckValue(schema, nameof(schema)); Host.CheckParam(Utils.Size(outputs) == 2, nameof(outputs), "Expected this to have two outputs"); - Host.Check(CanSavePfa, "Called despite not being savable"); + Host.Check(((ICanSavePfa)this).CanSavePfa, "Called despite not being savable"); ctx.Hide(outputs); } - public bool SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputs) + bool IBindableCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputs) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckParam(Utils.Size(outputs) == 2, nameof(outputs), "Expected this to have two outputs"); Host.CheckValue(schema, nameof(schema)); - Host.Check(CanSaveOnnx(ctx), "Called despite not being savable"); + Host.Check(((ICanSaveOnnx)this).CanSaveOnnx(ctx), "Called despite not being savable"); return false; } @@ -687,7 +690,8 @@ public ValueMapper> GetWhatTheFeatureMapper(int } } - public static class CalibratorUtils + [BestFriend] + internal static class CalibratorUtils { private static bool NeedCalibration(IHostEnvironment env, IChannel ch, ICalibratorTrainer calibrator, ITrainer trainer, IPredictor predictor, RoleMappedSchema schema) @@ -1348,8 +1352,8 @@ private static VersionInfo GetVersionInfo() public Double ParamA { get; } public Double ParamB { get; } - public bool CanSavePfa => true; - public bool CanSaveOnnx(OnnxContext ctx) => true; + bool ICanSavePfa.CanSavePfa => true; + bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => true; public PlattCalibrator(IHostEnvironment env, Double paramA, Double paramB) { @@ -1426,7 +1430,7 @@ public static Float PredictProbability(Float output, Double a, Double b) return (Float)(1 / (1 + Math.Exp(a * output + b))); } - public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) + JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) { _host.CheckValue(ctx, nameof(ctx)); _host.CheckValue(input, nameof(input)); @@ -1435,7 +1439,7 @@ public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) PfaUtils.Call("+", -ParamB, PfaUtils.Call("*", -ParamA, input))); } - public bool SaveAsOnnx(OnnxContext ctx, string[] scoreProbablityColumnNames, string featureColumnName) + bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] scoreProbablityColumnNames, string featureColumnName) { _host.CheckValue(ctx, nameof(ctx)); _host.CheckValue(scoreProbablityColumnNames, nameof(scoreProbablityColumnNames)); diff --git a/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs index 97db2a8a07..849318c1e0 100644 --- a/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs @@ -2,8 +2,36 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Reflection; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; +using Microsoft.ML; -[assembly: InternalsVisibleTo("Microsoft.ML.TestFramework, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TestFramework" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.InferenceTesting" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformTest" + PublicKey.TestValue)] + +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Legacy" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.ResultProcessor" + PublicKey.Value)] + +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Api" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Ensemble" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.FastTree" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.HalLearners" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.KMeansClustering" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.LightGBM" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Onnx" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransform" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Parquet" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PCA" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PipelineInference" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Recommender" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Runtime.ImageAnalytics" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Scoring" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.StandardLearners" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Sweeper" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Transforms" + PublicKey.Value)] + +[assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.Data/Scorers/BinaryClassifierScorer.cs b/src/Microsoft.ML.Data/Scorers/BinaryClassifierScorer.cs index 958aba0da1..56a72d3f92 100644 --- a/src/Microsoft.ML.Data/Scorers/BinaryClassifierScorer.cs +++ b/src/Microsoft.ML.Data/Scorers/BinaryClassifierScorer.cs @@ -185,7 +185,7 @@ protected override void SaveCore(ModelSaveContext ctx) ctx.Writer.Write(_threshold); } - public override void SaveAsOnnx(OnnxContext ctx) + private protected override void SaveAsOnnxCore(OnnxContext ctx) { Host.CheckValue(ctx, nameof(ctx)); Host.Assert(Bindable is IBindableCanSaveOnnx); @@ -193,7 +193,7 @@ public override void SaveAsOnnx(OnnxContext ctx) if (!ctx.ContainsColumn(DefaultColumnNames.Features)) return; - base.SaveAsOnnx(ctx); + base.SaveAsOnnxCore(ctx); int delta = Bindings.DerivedColumnCount; Host.Assert(delta == 1); diff --git a/src/Microsoft.ML.Data/Scorers/GenericScorer.cs b/src/Microsoft.ML.Data/Scorers/GenericScorer.cs index 18fe6f2fda..ab3a74b26b 100644 --- a/src/Microsoft.ML.Data/Scorers/GenericScorer.cs +++ b/src/Microsoft.ML.Data/Scorers/GenericScorer.cs @@ -141,9 +141,9 @@ private static VersionInfo GetVersionInfo() public override Schema Schema { get; } - public bool CanSavePfa => (Bindable as ICanSavePfa)?.CanSavePfa == true; + bool ICanSavePfa.CanSavePfa => (Bindable as ICanSavePfa)?.CanSavePfa == true; - public bool CanSaveOnnx(OnnxContext ctx) => (Bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; + bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => (Bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; /// /// The entry point for creating a . @@ -205,7 +205,7 @@ protected override void SaveCore(ModelSaveContext ctx) _bindings.Save(ctx); } - public void SaveAsPfa(BoundPfaContext ctx) + void ISaveAsPfa.SaveAsPfa(BoundPfaContext ctx) { Host.CheckValue(ctx, nameof(ctx)); Host.Assert(Bindable is IBindableCanSavePfa); @@ -220,7 +220,7 @@ public void SaveAsPfa(BoundPfaContext ctx) pfaBindable.SaveAsPfa(ctx, schema, outColNames); } - public void SaveAsOnnx(OnnxContext ctx) + void ISaveAsOnnx.SaveAsOnnx(OnnxContext ctx) { Host.CheckValue(ctx, nameof(ctx)); Host.Assert(Bindable is IBindableCanSaveOnnx); diff --git a/src/Microsoft.ML.Data/Scorers/MultiClassClassifierScorer.cs b/src/Microsoft.ML.Data/Scorers/MultiClassClassifierScorer.cs index e4c2b80c83..ddde2f9396 100644 --- a/src/Microsoft.ML.Data/Scorers/MultiClassClassifierScorer.cs +++ b/src/Microsoft.ML.Data/Scorers/MultiClassClassifierScorer.cs @@ -77,8 +77,8 @@ public sealed class LabelNameBindableMapper : ISchemaBindableMapper, ICanSaveMod private readonly Func _canWrap; public VectorType Type => _type; - public bool CanSavePfa => (_bindable as ICanSavePfa)?.CanSavePfa == true; - public bool CanSaveOnnx(OnnxContext ctx) => (_bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; + bool ICanSavePfa.CanSavePfa => (_bindable as ICanSavePfa)?.CanSavePfa == true; + bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => (_bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; public ISchemaBindableMapper InnerBindable => _bindable; private static VersionInfo GetVersionInfo() @@ -196,20 +196,20 @@ private void SaveCore(ModelSaveContext ctx) throw _host.Except("We do not know how to serialize label names of type '{0}'", _type.ItemType); } - public void SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) + void IBindableCanSavePfa.SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) { Contracts.CheckValue(ctx, nameof(ctx)); Contracts.CheckValue(schema, nameof(schema)); - Contracts.Check(CanSavePfa, "Cannot be saved as PFA"); + Contracts.Check(((ICanSavePfa)this).CanSavePfa, "Cannot be saved as PFA"); Contracts.Assert(_bindable is IBindableCanSavePfa); ((IBindableCanSavePfa)_bindable).SaveAsPfa(ctx, schema, outputNames); } - public bool SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) + bool IBindableCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) { Contracts.CheckValue(ctx, nameof(ctx)); Contracts.CheckValue(schema, nameof(schema)); - Contracts.Check(CanSaveOnnx(ctx), "Cannot be saved as ONNX."); + Contracts.Check(((ICanSaveOnnx)this).CanSaveOnnx(ctx), "Cannot be saved as ONNX."); Contracts.Assert(_bindable is IBindableCanSaveOnnx); return ((IBindableCanSaveOnnx)_bindable).SaveAsOnnx(ctx, schema, outputNames); } diff --git a/src/Microsoft.ML.Data/Scorers/PredictedLabelScorerBase.cs b/src/Microsoft.ML.Data/Scorers/PredictedLabelScorerBase.cs index 508cab37b9..3a6ef6d1e8 100644 --- a/src/Microsoft.ML.Data/Scorers/PredictedLabelScorerBase.cs +++ b/src/Microsoft.ML.Data/Scorers/PredictedLabelScorerBase.cs @@ -194,7 +194,7 @@ protected override IEnumerable> GetMetadataType yield return TextType.Instance.GetPair(MetadataUtils.Kinds.ScoreValueKind); if (_predColMetadata != null) { - ISchema sch = _predColMetadata.Schema; + var sch = _predColMetadata.Schema; for (int i = 0; i < sch.ColumnCount; ++i) yield return new KeyValuePair(sch.GetColumnName(i), sch.GetColumnType(i)); } @@ -279,9 +279,9 @@ public override Func GetActiveMapperColumns(bool[] active) protected override BindingsBase GetBindings() => Bindings; public override Schema Schema { get; } - public bool CanSavePfa => (Bindable as ICanSavePfa)?.CanSavePfa == true; + bool ICanSavePfa.CanSavePfa => (Bindable as ICanSavePfa)?.CanSavePfa == true; - public bool CanSaveOnnx(OnnxContext ctx) => (Bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; + bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => (Bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; protected PredictedLabelScorerBase(ScorerArgumentsBase args, IHostEnvironment env, IDataView data, ISchemaBoundMapper mapper, RoleMappedSchema trainSchema, string registrationName, string scoreColKind, string scoreColName, @@ -336,7 +336,7 @@ protected override void SaveCore(ModelSaveContext ctx) Bindings.Save(ctx); } - public void SaveAsPfa(BoundPfaContext ctx) + void ISaveAsPfa.SaveAsPfa(BoundPfaContext ctx) { Host.CheckValue(ctx, nameof(ctx)); Host.Assert(Bindable is IBindableCanSavePfa); @@ -365,7 +365,10 @@ public void SaveAsPfa(BoundPfaContext ctx) protected abstract JToken PredictedLabelPfa(string[] mapperOutputs); - public virtual void SaveAsOnnx(OnnxContext ctx) + void ISaveAsOnnx.SaveAsOnnx(OnnxContext ctx) => SaveAsOnnxCore(ctx); + + [BestFriend] + private protected virtual void SaveAsOnnxCore(OnnxContext ctx) { Host.CheckValue(ctx, nameof(ctx)); Host.Assert(Bindable is IBindableCanSaveOnnx); diff --git a/src/Microsoft.ML.Data/Scorers/RowToRowScorerBase.cs b/src/Microsoft.ML.Data/Scorers/RowToRowScorerBase.cs index c05baf50c6..066e459a54 100644 --- a/src/Microsoft.ML.Data/Scorers/RowToRowScorerBase.cs +++ b/src/Microsoft.ML.Data/Scorers/RowToRowScorerBase.cs @@ -214,7 +214,7 @@ protected override int MapColumnIndex(out bool isSrc, int col) return bindings.MapColumnIndex(out isSrc, col); } - protected sealed class RowCursor : SynchronizedCursorBase, IRowCursor + private sealed class RowCursor : SynchronizedCursorBase, IRowCursor { private readonly BindingsBase _bindings; private readonly bool[] _active; diff --git a/src/Microsoft.ML.Data/Scorers/SchemaBindablePredictorWrapper.cs b/src/Microsoft.ML.Data/Scorers/SchemaBindablePredictorWrapper.cs index 5a43f069c4..eef238a29a 100644 --- a/src/Microsoft.ML.Data/Scorers/SchemaBindablePredictorWrapper.cs +++ b/src/Microsoft.ML.Data/Scorers/SchemaBindablePredictorWrapper.cs @@ -44,9 +44,9 @@ public abstract class SchemaBindablePredictorWrapperBase : ISchemaBindableMapper protected readonly IValueMapper ValueMapper; protected readonly ColumnType ScoreType; - public bool CanSavePfa => (ValueMapper as ICanSavePfa)?.CanSavePfa == true; + bool ICanSavePfa.CanSavePfa => (ValueMapper as ICanSavePfa)?.CanSavePfa == true; - public bool CanSaveOnnx(OnnxContext ctx) => (ValueMapper as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; + bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => (ValueMapper as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; public SchemaBindablePredictorWrapperBase(IPredictor predictor) { @@ -89,17 +89,31 @@ public virtual void Save(ModelSaveContext ctx) ctx.SaveModel(Predictor, ModelFileUtils.DirPredictor); } - public virtual void SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) + void IBindableCanSavePfa.SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) { Contracts.CheckValue(ctx, nameof(ctx)); Contracts.CheckValue(schema, nameof(schema)); Contracts.Assert(ValueMapper is ISingleCanSavePfa); - var mapper = (ISingleCanSavePfa)ValueMapper; + SaveAsPfaCore(ctx, schema, outputNames); + } + [BestFriend] + private protected virtual void SaveAsPfaCore(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) + { ctx.Hide(outputNames); } - public virtual bool SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) => false; + bool IBindableCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) + { + Contracts.CheckValue(ctx, nameof(ctx)); + Contracts.CheckValue(schema, nameof(schema)); + Contracts.Assert(ValueMapper is ISingleCanSaveOnnx); + var mapper = (ISingleCanSaveOnnx)ValueMapper; + return SaveAsOnnxCore(ctx, schema, outputNames); + } + + [BestFriend] + private protected virtual bool SaveAsOnnxCore(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) => false; public ISchemaBoundMapper Bind(IHostEnvironment env, RoleMappedSchema schema) { @@ -271,7 +285,7 @@ public override void Save(ModelSaveContext ctx) base.Save(ctx); } - public override void SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) + private protected override void SaveAsPfaCore(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) { Contracts.CheckValue(ctx, nameof(ctx)); Contracts.CheckValue(schema, nameof(schema)); @@ -287,7 +301,7 @@ public override void SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, str ctx.DeclareVar(outputNames[0], scoreToken); } - public override bool SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) + private protected override bool SaveAsOnnxCore(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) { Contracts.CheckValue(ctx, nameof(ctx)); Contracts.CheckValue(schema, nameof(schema)); @@ -382,7 +396,7 @@ public override void Save(ModelSaveContext ctx) base.Save(ctx); } - public override void SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) + private protected override void SaveAsPfaCore(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) { Contracts.CheckValue(ctx, nameof(ctx)); Contracts.CheckValue(schema, nameof(schema)); @@ -402,7 +416,7 @@ public override void SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, str Contracts.Assert(ctx.TokenOrNullForName(outputNames[1]) == probToken.ToString()); } - public override bool SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) + private protected override bool SaveAsOnnxCore(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) { Contracts.CheckValue(ctx, nameof(ctx)); Contracts.CheckValue(schema, nameof(schema)); @@ -740,12 +754,10 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) Contracts.Assert(Utils.Size(_slotNames) > 0); int size = Utils.Size(_slotNames); - var values = dst.Values; - if (Utils.Size(values) < size) - values = new ReadOnlyMemory[size]; + var editor = VBufferEditor.Create(ref dst, size); for (int i = 0; i < _slotNames.Length; i++) - values[i] = _slotNames[i].AsMemory(); - dst = new VBuffer>(size, values, dst.Indices); + editor.Values[i] = _slotNames[i].AsMemory(); + dst = editor.Commit(); } } } diff --git a/src/Microsoft.ML.Data/StaticPipe/DataLoadSaveOperationsExtensions.cs b/src/Microsoft.ML.Data/StaticPipe/DataLoadSaveOperationsExtensions.cs index 4449c5a388..57adb1be4d 100644 --- a/src/Microsoft.ML.Data/StaticPipe/DataLoadSaveOperationsExtensions.cs +++ b/src/Microsoft.ML.Data/StaticPipe/DataLoadSaveOperationsExtensions.cs @@ -41,7 +41,7 @@ public static class DataLoadSaveOperationsExtensions /// Remove trailing whitespace from lines. /// A configured statically-typed reader for text files. public static DataReader TextReader<[IsShape] TShape>( - this DataLoadSaveOperations catalog, Func func, IMultiStreamSource files = null, + this DataOperations catalog, Func func, IMultiStreamSource files = null, bool hasHeader = false, char separator = '\t', bool allowQuoting = true, bool allowSparse = true, bool trimWhitspace = false) => TextLoader.CreateReader(catalog.Environment, func, files, hasHeader, separator, allowQuoting, allowSparse, trimWhitspace); diff --git a/src/Microsoft.ML.Data/StaticPipe/Reconciler.cs b/src/Microsoft.ML.Data/StaticPipe/Reconciler.cs index 4eb2b6de2e..dd9318b6c4 100644 --- a/src/Microsoft.ML.Data/StaticPipe/Reconciler.cs +++ b/src/Microsoft.ML.Data/StaticPipe/Reconciler.cs @@ -64,7 +64,7 @@ public EstimatorReconciler() : base() { } /// subset of estimator transforms do not allow this: they produce columns whose names are unconfigurable. For /// these, there is this collection which provides the names used by the analysis tool. If the estimator under /// construction must use one of the names here, then they are responsible for "saving" the column they will - /// overwrite using applications of the . Note that if the estimator under + /// overwrite using applications of the . Note that if the estimator under /// construction has complete control over what columns it produces, there is no need for it to pay this argument /// any attention. /// Returns an estimator. diff --git a/src/Microsoft.ML.Data/StaticPipe/StaticPipeUtils.cs b/src/Microsoft.ML.Data/StaticPipe/StaticPipeUtils.cs index dfbacbacf1..4e66b91762 100644 --- a/src/Microsoft.ML.Data/StaticPipe/StaticPipeUtils.cs +++ b/src/Microsoft.ML.Data/StaticPipe/StaticPipeUtils.cs @@ -162,7 +162,7 @@ internal static IDataReaderEstimator> // If any renamings were necessary, create the CopyColumns estimator. if (toCopy.Count > 0) - estimator = new CopyColumnsEstimator(env, toCopy.ToArray()); + estimator = new ColumnsCopyingEstimator(env, toCopy.ToArray()); // First clear the inputs from zero-dependencies yet to be resolved. foreach (var col in baseInputs) @@ -281,7 +281,7 @@ internal static IDataReaderEstimator> // If any final renamings were necessary, insert the appropriate CopyColumns transform. if (toCopy.Count > 0) { - var copyEstimator = new CopyColumnsEstimator(env, toCopy.ToArray()); + var copyEstimator = new ColumnsCopyingEstimator(env, toCopy.ToArray()); if (estimator == null) estimator = copyEstimator; else diff --git a/src/Microsoft.ML.Data/StaticPipe/TrainerEstimatorReconciler.cs b/src/Microsoft.ML.Data/StaticPipe/TrainerEstimatorReconciler.cs index ce458ba9da..f2d87db6de 100644 --- a/src/Microsoft.ML.Data/StaticPipe/TrainerEstimatorReconciler.cs +++ b/src/Microsoft.ML.Data/StaticPipe/TrainerEstimatorReconciler.cs @@ -55,7 +55,7 @@ protected TrainerEstimatorReconciler(PipelineColumn[] inputs, string[] outputNam /// /// Produces the estimator. Note that this is made out of 's - /// return value, plus whatever usages of are necessary to avoid collisions with + /// return value, plus whatever usages of are necessary to avoid collisions with /// the output names fed to the constructor. This class provides the implementation, and subclasses should instead /// override . /// @@ -102,7 +102,7 @@ public sealed override IEstimator Reconcile(IHostEnvironment env, newInputNames[p.Key] = old2New.ContainsKey(p.Value) ? old2New[p.Value] : p.Value; inputNames = newInputNames; } - result = new CopyColumnsEstimator(env, old2New.Select(p => (p.Key, p.Value)).ToArray()); + result = new ColumnsCopyingEstimator(env, old2New.Select(p => (p.Key, p.Value)).ToArray()); } // Map the inputs to the names. @@ -128,7 +128,7 @@ public sealed override IEstimator Reconcile(IHostEnvironment env, foreach (var p in old2New) toRename.Add((p.Value, p.Key)); if (toRename.Count > 0) - result = result.Append(new CopyColumnsEstimator(env, toRename.ToArray())); + result = result.Append(new ColumnsCopyingEstimator(env, toRename.ToArray())); return result; } diff --git a/src/Microsoft.ML.Data/TrainContext.cs b/src/Microsoft.ML.Data/TrainContext.cs index 33e66a5c67..ff4648156c 100644 --- a/src/Microsoft.ML.Data/TrainContext.cs +++ b/src/Microsoft.ML.Data/TrainContext.cs @@ -328,14 +328,36 @@ public ClusteringEvaluator.Result Evaluate(IDataView data, Host.CheckNonEmpty(score, nameof(score)); if(features != null) - Host.CheckNonEmpty(features, nameof(features), "The features column name should be non-empty, if provided, if you want to calculate the Dbi metric."); + Host.CheckNonEmpty(features, nameof(features), "The features column name should be non-empty if you want to calculate the Dbi metric."); if (label != null) - Host.CheckNonEmpty(label, nameof(label), "The features column name should be non-empty, if provided, if you want to calculate the Nmi metric."); + Host.CheckNonEmpty(label, nameof(label), "The label column name should be non-empty if you want to calculate the Nmi metric."); var eval = new ClusteringEvaluator(Host, new ClusteringEvaluator.Arguments() { CalculateDbi = !string.IsNullOrEmpty(features) }); return eval.Evaluate(data, score, label, features); } + + /// + /// Run cross-validation over folds of , by fitting , + /// and respecting if provided. + /// Then evaluate each sub-model against and return metrics. + /// + /// The data to run cross-validation on. + /// The estimator to fit. + /// Number of cross-validation folds. + /// Optional label column for evaluation (clustering tasks may not always have a label). + /// Optional features column for evaluation (needed for calculating Dbi metric) + /// Optional stratification column. + /// If two examples share the same value of the (if provided), + /// they are guaranteed to appear in the same subset (train or test). Use this to make sure there is no label leakage from + /// train to the test set. + /// Per-fold results: metrics, models, scored datasets. + public (ClusteringEvaluator.Result metrics, ITransformer model, IDataView scoredTestData)[] CrossValidate( + IDataView data, IEstimator estimator, int numFolds = 5, string labelColumn = null, string featuresColumn = null, string stratificationColumn = null) + { + var result = CrossValidateTrain(data, estimator, numFolds, stratificationColumn); + return result.Select(x => (Evaluate(x.scoredTestSet, label: labelColumn, features: featuresColumn), x.model, x.scoredTestSet)).ToArray(); + } } /// diff --git a/src/Microsoft.ML.Data/Training/TrainerBase.cs b/src/Microsoft.ML.Data/Training/TrainerBase.cs index ca2f2c7b64..d82dfb7ba6 100644 --- a/src/Microsoft.ML.Data/Training/TrainerBase.cs +++ b/src/Microsoft.ML.Data/Training/TrainerBase.cs @@ -19,7 +19,8 @@ public abstract class TrainerBase : ITrainer public abstract PredictionKind PredictionKind { get; } public abstract TrainerInfo Info { get; } - protected TrainerBase(IHostEnvironment env, string name) + [BestFriend] + private protected TrainerBase(IHostEnvironment env, string name) { Contracts.CheckValue(env, nameof(env)); env.CheckNonEmpty(name, nameof(name)); @@ -30,6 +31,9 @@ protected TrainerBase(IHostEnvironment env, string name) IPredictor ITrainer.Train(TrainContext context) => Train(context); - public abstract TPredictor Train(TrainContext context); + TPredictor ITrainer.Train(TrainContext context) => Train(context); + + [BestFriend] + private protected abstract TPredictor Train(TrainContext context); } } diff --git a/src/Microsoft.ML.Data/Training/TrainerEstimatorBase.cs b/src/Microsoft.ML.Data/Training/TrainerEstimatorBase.cs index ad2916368d..1e49c32ed3 100644 --- a/src/Microsoft.ML.Data/Training/TrainerEstimatorBase.cs +++ b/src/Microsoft.ML.Data/Training/TrainerEstimatorBase.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Linq; using Microsoft.ML.Core.Data; +using Microsoft.ML.Data; using Microsoft.ML.Runtime.Data; namespace Microsoft.ML.Runtime.Training @@ -50,7 +51,8 @@ public abstract class TrainerEstimatorBase : ITrainerEstim public abstract PredictionKind PredictionKind { get; } - public TrainerEstimatorBase(IHost host, + [BestFriend] + private protected TrainerEstimatorBase(IHost host, SchemaShape.Column feature, SchemaShape.Column label, SchemaShape.Column weight = null) @@ -86,7 +88,7 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) /// protected abstract SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema); - public TModel Train(TrainContext context) + TModel ITrainer.Train(TrainContext context) { Host.CheckValue(context, nameof(context)); return TrainModelCore(context); @@ -144,18 +146,19 @@ protected TTransformer TrainTransformer(IDataView trainSet, validRoles = MakeRoles(cachedValid); } - var pred = TrainModelCore(new TrainContext(trainRoles, validRoles, initPredictor)); + var pred = TrainModelCore(new TrainContext(trainRoles, validRoles, null, initPredictor)); return MakeTransformer(pred, trainSet.Schema); } - protected abstract TModel TrainModelCore(TrainContext trainContext); + [BestFriend] + private protected abstract TModel TrainModelCore(TrainContext trainContext); protected abstract TTransformer MakeTransformer(TModel model, Schema trainSchema); protected virtual RoleMappedData MakeRoles(IDataView data) => new RoleMappedData(data, label: LabelColumn?.Name, feature: FeatureColumn.Name, weight: WeightColumn?.Name); - IPredictor ITrainer.Train(TrainContext context) => Train(context); + IPredictor ITrainer.Train(TrainContext context) => ((ITrainer)this).Train(context); } /// diff --git a/src/Microsoft.ML.Data/Transforms/BindingsWrappedRowCursor.cs b/src/Microsoft.ML.Data/Transforms/BindingsWrappedRowCursor.cs index 4959b7c7b2..409d0dbeaa 100644 --- a/src/Microsoft.ML.Data/Transforms/BindingsWrappedRowCursor.cs +++ b/src/Microsoft.ML.Data/Transforms/BindingsWrappedRowCursor.cs @@ -11,7 +11,7 @@ namespace Microsoft.ML.Runtime.Data /// inconvenient or inefficient to handle the "no output selected" case in their /// own implementation. /// - public sealed class BindingsWrappedRowCursor : SynchronizedCursorBase, IRowCursor + internal sealed class BindingsWrappedRowCursor : SynchronizedCursorBase, IRowCursor { private readonly ColumnBindingsBase _bindings; diff --git a/src/Microsoft.ML.Data/Transforms/CatalogUtils.cs b/src/Microsoft.ML.Data/Transforms/CatalogUtils.cs index 98d3a3afc0..3f7c3356c3 100644 --- a/src/Microsoft.ML.Data/Transforms/CatalogUtils.cs +++ b/src/Microsoft.ML.Data/Transforms/CatalogUtils.cs @@ -16,7 +16,7 @@ public static class CatalogUtils public static IHostEnvironment GetEnvironment(this TransformsCatalog catalog) => Contracts.CheckRef(catalog, nameof(catalog)).Environment; public static IHostEnvironment GetEnvironment(this TransformsCatalog.SubCatalogBase subCatalog) => Contracts.CheckRef(subCatalog, nameof(subCatalog)).Environment; public static IHostEnvironment GetEnvironment(this ModelOperationsCatalog catalog) => Contracts.CheckRef(catalog, nameof(catalog)).Environment; - public static IHostEnvironment GetEnvironment(this DataLoadSaveOperations catalog) => Contracts.CheckRef(catalog, nameof(catalog)).Environment; + public static IHostEnvironment GetEnvironment(this DataOperations catalog) => Contracts.CheckRef(catalog, nameof(catalog)).Environment; public static IHostEnvironment GetEnvironment(TrainContextBase.ContextInstantiatorBase obj) => Contracts.CheckRef(obj, nameof(obj)).Owner.Environment; public static IHostEnvironment GetEnvironment(TrainContextBase ctx) => Contracts.CheckRef(ctx, nameof(ctx)).Environment; diff --git a/src/Microsoft.ML.Data/Transforms/CategoricalCatalog.cs b/src/Microsoft.ML.Data/Transforms/CategoricalCatalog.cs index c2657da11b..8d2910d3e9 100644 --- a/src/Microsoft.ML.Data/Transforms/CategoricalCatalog.cs +++ b/src/Microsoft.ML.Data/Transforms/CategoricalCatalog.cs @@ -9,7 +9,7 @@ namespace Microsoft.ML { /// - /// Extensions for the ValueToKeyMappingEstimator + /// Extensions for the ValueToKey transformation's catalog /// public static class ValueToKeyCatalog { @@ -26,7 +26,7 @@ public static ValueToKeyMappingEstimator MapValueToKey(this TransformsCatalog.Ca string inputColumn, string outputColumn = null, int maxNumTerms = ValueToKeyMappingEstimator.Defaults.MaxNumTerms, - TermTransform.SortOrder sort = ValueToKeyMappingEstimator.Defaults.Sort) + ValueToKeyMappingTransformer.SortOrder sort = ValueToKeyMappingEstimator.Defaults.Sort) => new ValueToKeyMappingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, maxNumTerms, sort); /// @@ -38,7 +38,7 @@ public static ValueToKeyMappingEstimator MapValueToKey(this TransformsCatalog.Ca /// /// public static ValueToKeyMappingEstimator MapValueToKey(this TransformsCatalog.CategoricalTransforms catalog, - TermTransform.ColumnInfo[] columns, + ValueToKeyMappingTransformer.ColumnInfo[] columns, string file = null, string termsColumn = null, IComponentFactory loaderFactory = null) diff --git a/src/Microsoft.ML.Data/Transforms/ColumnBindingsBase.cs b/src/Microsoft.ML.Data/Transforms/ColumnBindingsBase.cs index f9909aed7a..8107404271 100644 --- a/src/Microsoft.ML.Data/Transforms/ColumnBindingsBase.cs +++ b/src/Microsoft.ML.Data/Transforms/ColumnBindingsBase.cs @@ -323,8 +323,8 @@ protected ColumnBindingsBase(ISchema input, bool user, params string[] names) // warning if we decide to rename this argument, and so know to change the below hard-coded // standard column name. const string standardColumnArgName = "Column"; - Contracts.Assert(nameof(TermTransform.Arguments.Column) == standardColumnArgName); - Contracts.Assert(nameof(ConcatTransform.Arguments.Column) == standardColumnArgName); + Contracts.Assert(nameof(ValueToKeyMappingTransformer.Arguments.Column) == standardColumnArgName); + Contracts.Assert(nameof(ColumnConcatenatingTransformer.Arguments.Column) == standardColumnArgName); for (int iinfo = 0; iinfo < names.Length; iinfo++) { @@ -817,8 +817,8 @@ protected ManyToOneColumnBindingsBase(ManyToOneColumn[] column, ISchema input, F // warning if we decide to rename this argument, and so know to change the below hard-coded // standard column name. const string standardColumnArgName = "Column"; - Contracts.Assert(nameof(TermTransform.Arguments.Column) == standardColumnArgName); - Contracts.Assert(nameof(ConcatTransform.Arguments.Column) == standardColumnArgName); + Contracts.Assert(nameof(ValueToKeyMappingTransformer.Arguments.Column) == standardColumnArgName); + Contracts.Assert(nameof(ColumnConcatenatingTransformer.Arguments.Column) == standardColumnArgName); Infos = new ColInfo[InfoCount]; for (int i = 0; i < Infos.Length; i++) diff --git a/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingEstimator.cs b/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingEstimator.cs index 7cf61df705..09b20ceddc 100644 --- a/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingEstimator.cs +++ b/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingEstimator.cs @@ -43,7 +43,7 @@ public ColumnConcatenatingEstimator (IHostEnvironment env, string outputColumn, public ITransformer Fit(IDataView input) { _host.CheckValue(input, nameof(input)); - return new ConcatTransform(_host, _name, _source); + return new ColumnConcatenatingTransformer(_host, _name, _source); } private bool HasCategoricals(SchemaShape.Column col) diff --git a/src/Microsoft.ML.Data/Transforms/ConcatTransform.cs b/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingTransformer.cs similarity index 84% rename from src/Microsoft.ML.Data/Transforms/ConcatTransform.cs rename to src/Microsoft.ML.Data/Transforms/ColumnConcatenatingTransformer.cs index 0348fbe40f..9c01ec4ed4 100644 --- a/src/Microsoft.ML.Data/Transforms/ConcatTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingTransformer.cs @@ -1,8 +1,7 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // 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.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; @@ -17,23 +16,23 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(ConcatTransform.Summary, typeof(IDataTransform), typeof(ConcatTransform), typeof(ConcatTransform.TaggedArguments), typeof(SignatureDataTransform), - ConcatTransform.UserName, ConcatTransform.LoadName, "ConcatTransform", DocName = "transform/ConcatTransform.md")] +[assembly: LoadableClass(ColumnConcatenatingTransformer.Summary, typeof(IDataTransform), typeof(ColumnConcatenatingTransformer), typeof(ColumnConcatenatingTransformer.TaggedArguments), typeof(SignatureDataTransform), + ColumnConcatenatingTransformer.UserName, ColumnConcatenatingTransformer.LoadName, "ConcatTransform", DocName = "transform/ConcatTransform.md")] -[assembly: LoadableClass(ConcatTransform.Summary, typeof(IDataTransform), typeof(ConcatTransform), null, typeof(SignatureLoadDataTransform), - ConcatTransform.UserName, ConcatTransform.LoaderSignature, ConcatTransform.LoaderSignatureOld)] +[assembly: LoadableClass(ColumnConcatenatingTransformer.Summary, typeof(IDataTransform), typeof(ColumnConcatenatingTransformer), null, typeof(SignatureLoadDataTransform), + ColumnConcatenatingTransformer.UserName, ColumnConcatenatingTransformer.LoaderSignature, ColumnConcatenatingTransformer.LoaderSignatureOld)] -[assembly: LoadableClass(typeof(ConcatTransform), null, typeof(SignatureLoadModel), - ConcatTransform.UserName, ConcatTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(ColumnConcatenatingTransformer), null, typeof(SignatureLoadModel), + ColumnConcatenatingTransformer.UserName, ColumnConcatenatingTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(ConcatTransform), null, typeof(SignatureLoadRowMapper), - ConcatTransform.UserName, ConcatTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(ColumnConcatenatingTransformer), null, typeof(SignatureLoadRowMapper), + ColumnConcatenatingTransformer.UserName, ColumnConcatenatingTransformer.LoaderSignature)] namespace Microsoft.ML.Runtime.Data { using PfaType = PfaUtils.Type; - public sealed class ConcatTransform : ITransformer, ICanSaveModel + public sealed class ColumnConcatenatingTransformer : RowToRowTransformerBase { internal const string Summary = "Concatenates one or more columns of the same item type."; internal const string UserName = "Concat Transform"; @@ -208,7 +207,6 @@ public ColumnInfo(ModelLoadContext ctx) } } - private readonly IHost _host; private readonly ColumnInfo[] _columns; public IReadOnlyCollection Columns => _columns.AsReadOnly(); @@ -218,7 +216,7 @@ public ColumnInfo(ModelLoadContext ctx) /// Original columns are also preserved. /// The column types must match, and the output column type is always a vector. /// - public ConcatTransform(IHostEnvironment env, string outputName, params string[] inputNames) + public ColumnConcatenatingTransformer(IHostEnvironment env, string outputName, params string[] inputNames) : this(env, new ColumnInfo(outputName, inputNames)) { } @@ -226,10 +224,9 @@ public ConcatTransform(IHostEnvironment env, string outputName, params string[] /// /// Concatenates multiple groups of columns, each group is denoted by one of . /// - public ConcatTransform(IHostEnvironment env, params ColumnInfo[] columns) + public ColumnConcatenatingTransformer(IHostEnvironment env, params ColumnInfo[] columns) : + base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ColumnConcatenatingTransformer))) { - Contracts.CheckValue(env, nameof(env)); - _host = env.Register(nameof(ConcatTransform)); Contracts.CheckValue(columns, nameof(columns)); _columns = columns.ToArray(); } @@ -245,15 +242,15 @@ private static VersionInfo GetVersionInfo() verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, loaderSignatureAlt: LoaderSignatureOld, - loaderAssemblyName: typeof(ConcatTransform).Assembly.FullName); + loaderAssemblyName: typeof(ColumnConcatenatingTransformer).Assembly.FullName); } private const int VersionAddedAliases = 0x00010002; private const int VersionTransformer = 0x00010003; - public void Save(ModelSaveContext ctx) + public override void Save(ModelSaveContext ctx) { - _host.CheckValue(ctx, nameof(ctx)); + Host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(); ctx.SetVersionInfo(GetVersionInfo()); @@ -271,11 +268,10 @@ public void Save(ModelSaveContext ctx) /// /// Constructor for SignatureLoadModel. /// - public ConcatTransform(IHostEnvironment env, ModelLoadContext ctx) + public ColumnConcatenatingTransformer(IHostEnvironment env, ModelLoadContext ctx) : + base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ColumnConcatenatingTransformer))) { - Contracts.CheckValue(env, nameof(env)); - _host = env.Register(nameof(ConcatTransform)); - _host.CheckValue(ctx, nameof(ctx)); + Host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); if (ctx.Header.ModelVerReadable >= VersionTransformer) { @@ -371,7 +367,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV var cols = args.Column .Select(c => new ColumnInfo(c.Name, c.Source)) .ToArray(); - var transformer = new ConcatTransform(env, cols); + var transformer = new ColumnConcatenatingTransformer(env, cols); return transformer.MakeDataTransform(input); } @@ -391,61 +387,36 @@ public static IDataTransform Create(IHostEnvironment env, TaggedArguments args, var cols = args.Column .Select(c => new ColumnInfo(c.Name, c.Source.Select(kvp => (kvp.Value, kvp.Key != "" ? kvp.Key : null)))) .ToArray(); - var transformer = new ConcatTransform(env, cols); + var transformer = new ColumnConcatenatingTransformer(env, cols); return transformer.MakeDataTransform(input); } - public IDataView Transform(IDataView input) => MakeDataTransform(input); - - private IDataTransform MakeDataTransform(IDataView input) - => new RowToRowMapperTransform(_host, input, MakeRowMapper(input.Schema), MakeRowMapper); - - public IRowMapper MakeRowMapper(Schema inputSchema) => new Mapper(this, inputSchema); + protected override IRowMapper MakeRowMapper(Schema inputSchema) => new Mapper(this, inputSchema); /// /// Factory method for SignatureLoadDataTransform. /// public static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) - => new ConcatTransform(env, ctx).MakeDataTransform(input); + => new ColumnConcatenatingTransformer(env, ctx).MakeDataTransform(input); /// /// Factory method for SignatureLoadRowMapper. /// public static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) - => new ConcatTransform(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); - - public Schema GetOutputSchema(Schema inputSchema) - { - _host.CheckValue(inputSchema, nameof(inputSchema)); - var mapper = MakeRowMapper(inputSchema); - return RowToRowMapperTransform.GetOutputSchema(inputSchema, mapper); - } - - public bool IsRowToRowMapper => true; + => new ColumnConcatenatingTransformer(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); - public IRowToRowMapper GetRowToRowMapper(Schema inputSchema) + private sealed class Mapper : MapperBase, ISaveAsOnnx, ISaveAsPfa { - _host.CheckValue(inputSchema, nameof(inputSchema)); - return new RowToRowMapperTransform(_host, new EmptyDataView(_host, inputSchema), MakeRowMapper(inputSchema), MakeRowMapper); - } - - private sealed class Mapper : IRowMapper, ISaveAsOnnx, ISaveAsPfa - { - private readonly IHost _host; - private readonly Schema _inputSchema; - private readonly ConcatTransform _parent; + private readonly ColumnConcatenatingTransformer _parent; private readonly BoundColumn[] _columns; public bool CanSaveOnnx(OnnxContext ctx) => true; public bool CanSavePfa => true; - public Mapper(ConcatTransform parent, Schema inputSchema) + public Mapper(ColumnConcatenatingTransformer parent, Schema inputSchema) : + base(Contracts.CheckRef(parent, nameof(parent)).Host.Register(nameof(Mapper)), inputSchema) { - Contracts.AssertValue(parent); - Contracts.AssertValue(inputSchema); - _host = parent._host.Register(nameof(Mapper)); _parent = parent; - _inputSchema = inputSchema; _columns = new BoundColumn[_parent._columns.Length]; for (int i = 0; i < _parent._columns.Length; i++) @@ -481,7 +452,7 @@ private BoundColumn MakeColumn(Schema inputSchema, int iinfo) { var (srcName, srcAlias) = _parent._columns[iinfo].Inputs[i]; if (!inputSchema.TryGetColumnIndex(srcName, out int srcCol)) - throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", srcName); + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", srcName); sources[i] = srcCol; var curType = inputSchema.GetColumnType(srcCol); @@ -499,7 +470,7 @@ private BoundColumn MakeColumn(Schema inputSchema, int iinfo) totalSize += curType.ValueCount; } else - throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", srcName, itemType.ToString(), curType.ToString()); + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", srcName, itemType.ToString(), curType.ToString()); if (isNormalized && !inputSchema.IsNormalized(srcCol)) isNormalized = false; @@ -523,7 +494,7 @@ private BoundColumn MakeColumn(Schema inputSchema, int iinfo) hasSlotNames = false; } - return new BoundColumn(_inputSchema, _parent._columns[iinfo], sources, new VectorType(itemType.AsPrimitive, totalSize), + return new BoundColumn(InputSchema, _parent._columns[iinfo], sources, new VectorType(itemType.AsPrimitive, totalSize), isNormalized, hasSlotNames, hasCategoricals, totalSize, catCount); } @@ -722,7 +693,7 @@ private Delegate MakeGetter(IRow input) .MarkSensitive(MessageSensitivity.Schema); } dstLength = checked(dstLength + tmpBufs[i].Length); - dstCount = checked(dstCount + tmpBufs[i].Count); + dstCount = checked(dstCount + tmpBufs[i].GetValues().Length); } else { @@ -731,15 +702,10 @@ private Delegate MakeGetter(IRow input) } } - var values = dst.Values; - var indices = dst.Indices; if (dstCount <= dstLength / 2) { // Concatenate into a sparse representation. - if (Utils.Size(values) < dstCount) - values = new T[dstCount]; - if (Utils.Size(indices) < dstCount) - indices = new int[dstCount]; + var editor = VBufferEditor.Create(ref dst, dstLength, dstCount); int offset = 0; int count = 0; @@ -749,22 +715,24 @@ private Delegate MakeGetter(IRow input) if (_srcTypes[j].IsVector) { var buffer = tmpBufs[j]; - Contracts.Assert(buffer.Count <= dstCount - count); + var bufferValues = buffer.GetValues(); + Contracts.Assert(bufferValues.Length <= dstCount - count); Contracts.Assert(buffer.Length <= dstLength - offset); if (buffer.IsDense) { - for (int i = 0; i < buffer.Length; i++) + for (int i = 0; i < bufferValues.Length; i++) { - values[count] = buffer.Values[i]; - indices[count++] = offset + i; + editor.Values[count] = bufferValues[i]; + editor.Indices[count++] = offset + i; } } else { - for (int i = 0; i < buffer.Count; i++) + var bufferIndices = buffer.GetIndices(); + for (int i = 0; i < bufferValues.Length; i++) { - values[count] = buffer.Values[i]; - indices[count++] = offset + buffer.Indices[i]; + editor.Values[count] = bufferValues[i]; + editor.Indices[count++] = offset + bufferIndices[i]; } } offset += buffer.Length; @@ -773,20 +741,19 @@ private Delegate MakeGetter(IRow input) { Contracts.Assert(count < dstCount); srcGetterOnes[j](ref tmp); - values[count] = tmp; - indices[count++] = offset; + editor.Values[count] = tmp; + editor.Indices[count++] = offset; offset++; } } Contracts.Assert(count <= dstCount); Contracts.Assert(offset == dstLength); - dst = new VBuffer(dstLength, count, values, indices); + dst = editor.CommitTruncated(count); } else { // Concatenate into a dense representation. - if (Utils.Size(values) < dstLength) - values = new T[dstLength]; + var editor = VBufferEditor.Create(ref dst, dstLength); int offset = 0; for (int j = 0; j < SrcIndices.Length; j++) @@ -794,17 +761,17 @@ private Delegate MakeGetter(IRow input) Contracts.Assert(tmpBufs[j].Length <= dstLength - offset); if (_srcTypes[j].IsVector) { - tmpBufs[j].CopyTo(values, offset); + tmpBufs[j].CopyTo(editor.Values, offset); offset += tmpBufs[j].Length; } else { srcGetterOnes[j](ref tmp); - values[offset++] = tmp; + editor.Values[offset++] = tmp; } } Contracts.Assert(offset == dstLength); - dst = new VBuffer(dstLength, values, indices); + dst = editor.Commit(); } }; return result; @@ -860,9 +827,9 @@ public KeyValuePair SavePfaInfo(BoundPfaContext ctx) } } - public Func GetDependencies(Func activeOutput) + public override Func GetDependencies(Func activeOutput) { - var active = new bool[_inputSchema.ColumnCount]; + var active = new bool[InputSchema.ColumnCount]; for (int i = 0; i < _columns.Length; i++) { if (activeOutput(i)) @@ -874,32 +841,19 @@ public Func GetDependencies(Func activeOutput) return col => active[col]; } - public Schema.Column[] GetOutputColumns() => _columns.Select(x => x.MakeColumnInfo()).ToArray(); + protected override Schema.Column[] GetOutputColumnsCore() => _columns.Select(x => x.MakeColumnInfo()).ToArray(); - public void Save(ModelSaveContext ctx) => _parent.Save(ctx); + public override void Save(ModelSaveContext ctx) => _parent.Save(ctx); - public Delegate[] CreateGetters(IRow input, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { - // REVIEW: it used to be that the mapper's input schema in the constructor was required to be reference-equal to the schema - // of the input row. - // It still has to be the same schema, but because we may make a transition from lazy to eager schema, the reference-equality - // is no longer always possible. So, we relax the assert as below. - if (input.Schema is Schema s) - Contracts.Assert(s == _inputSchema); - var result = new Delegate[_columns.Length]; - for (int i = 0; i < _columns.Length; i++) - { - if (!activeOutput(i)) - continue; - result[i] = _columns[i].MakeGetter(input); - } disposer = null; - return result; + return _columns[iinfo].MakeGetter(input); } public void SaveAsPfa(BoundPfaContext ctx) { - _host.CheckValue(ctx, nameof(ctx)); + Host.CheckValue(ctx, nameof(ctx)); var toHide = new List(); var toDeclare = new List>(); @@ -918,7 +872,7 @@ public void SaveAsPfa(BoundPfaContext ctx) public void SaveAsOnnx(OnnxContext ctx) { - _host.CheckValue(ctx, nameof(ctx)); + Host.CheckValue(ctx, nameof(ctx)); Contracts.Assert(CanSaveOnnx(ctx)); string opType = "FeatureVectorizer"; @@ -947,7 +901,7 @@ public void SaveAsOnnx(OnnxContext ctx) var srcIndex = boundCol.SrcIndices[i]; inputList.Add(new KeyValuePair(ctx.GetVariableName(srcName), - _inputSchema[srcIndex].Type.ValueCount)); + InputSchema[srcIndex].Type.ValueCount)); } var node = ctx.CreateNode(opType, inputList.Select(t => t.Key), diff --git a/src/Microsoft.ML.Data/Transforms/SelectColumnsTransform.cs b/src/Microsoft.ML.Data/Transforms/ColumnSelecting.cs similarity index 85% rename from src/Microsoft.ML.Data/Transforms/SelectColumnsTransform.cs rename to src/Microsoft.ML.Data/Transforms/ColumnSelecting.cs index ceec14882f..35370aa611 100644 --- a/src/Microsoft.ML.Data/Transforms/SelectColumnsTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/ColumnSelecting.cs @@ -14,30 +14,30 @@ using System.Collections.Generic; using System.Linq; -[assembly: LoadableClass(SelectColumnsTransform.Summary, typeof(IDataTransform), typeof(SelectColumnsTransform), - typeof(SelectColumnsTransform.Arguments), typeof(SignatureDataTransform), - SelectColumnsTransform.UserName, "SelectColumns", "SelectColumnsTransform", SelectColumnsTransform.ShortName, DocName = "transform/SelectTransforms.md")] +[assembly: LoadableClass(ColumnSelectingTransformer.Summary, typeof(IDataTransform), typeof(ColumnSelectingTransformer), + typeof(ColumnSelectingTransformer.Arguments), typeof(SignatureDataTransform), + ColumnSelectingTransformer.UserName, "SelectColumns", "SelectColumnsTransform", ColumnSelectingTransformer.ShortName, DocName = "transform/SelectTransforms.md")] -[assembly: LoadableClass(SelectColumnsTransform.Summary, typeof(IDataView), typeof(SelectColumnsTransform), null, typeof(SignatureLoadDataTransform), - SelectColumnsTransform.UserName, SelectColumnsTransform.LoaderSignature)] +[assembly: LoadableClass(ColumnSelectingTransformer.Summary, typeof(IDataView), typeof(ColumnSelectingTransformer), null, typeof(SignatureLoadDataTransform), + ColumnSelectingTransformer.UserName, ColumnSelectingTransformer.LoaderSignature)] -[assembly: LoadableClass(SelectColumnsTransform.Summary, typeof(SelectColumnsTransform), null, typeof(SignatureLoadModel), - SelectColumnsTransform.UserName, SelectColumnsTransform.LoaderSignature)] +[assembly: LoadableClass(ColumnSelectingTransformer.Summary, typeof(ColumnSelectingTransformer), null, typeof(SignatureLoadModel), + ColumnSelectingTransformer.UserName, ColumnSelectingTransformer.LoaderSignature)] // Back-compat to handle loading of the Drop and Keep Transformer -[assembly: LoadableClass("", typeof(IDataView), typeof(SelectColumnsTransform), null, typeof(SignatureLoadDataTransform), - "", SelectColumnsTransform.DropLoaderSignature)] +[assembly: LoadableClass("", typeof(IDataView), typeof(ColumnSelectingTransformer), null, typeof(SignatureLoadDataTransform), + "", ColumnSelectingTransformer.DropLoaderSignature)] // Back-compat to handle loading of the Choose Columns Transformer -[assembly: LoadableClass("", typeof(IDataView), typeof(SelectColumnsTransform), null, typeof(SignatureLoadDataTransform), - "", SelectColumnsTransform.ChooseLoaderSignature, SelectColumnsTransform.ChooseLoaderSignatureOld)] +[assembly: LoadableClass("", typeof(IDataView), typeof(ColumnSelectingTransformer), null, typeof(SignatureLoadDataTransform), + "", ColumnSelectingTransformer.ChooseLoaderSignature, ColumnSelectingTransformer.ChooseLoaderSignatureOld)] namespace Microsoft.ML.Transforms { /// /// The ColumnSelectingEstimator supports selection of specified columns to keep from a given input. /// - public sealed class ColumnSelectingEstimator : TrivialEstimator + public sealed class ColumnSelectingEstimator : TrivialEstimator { private readonly Func _selectPredicate; @@ -46,8 +46,8 @@ public sealed class ColumnSelectingEstimator : TrivialEstimator /// Instance of the host environment. /// The array of column names to keep. - public ColumnSelectingEstimator(IHostEnvironment env, params string[] keepColumns) - : this(env, keepColumns, null, SelectColumnsTransform.Defaults.KeepHidden, SelectColumnsTransform.Defaults.IgnoreMissing) + private ColumnSelectingEstimator(IHostEnvironment env, params string[] keepColumns) + : this(env, keepColumns, null, ColumnSelectingTransformer.Defaults.KeepHidden, ColumnSelectingTransformer.Defaults.IgnoreMissing) { } /// @@ -56,15 +56,16 @@ public ColumnSelectingEstimator(IHostEnvironment env, params string[] keepColumn /// Instance of the host environment. /// The array of column names to keep, cannot be set with . /// The array of column names to drop, cannot be set with . - /// If true will keep hidden columns and false will remove hidden columns. + /// If true will keep hidden columns and false will remove hidden columns. The argument is + /// ignored if the Estimator is in "drop mode". /// If false will check for any columns given in /// or that are missing from the input. If a missing colums exists a /// SchemaMistmatch exception is thrown. If true, the check is not made. - public ColumnSelectingEstimator(IHostEnvironment env, string[] keepColumns, - string[] dropColumns, bool keepHidden = SelectColumnsTransform.Defaults.KeepHidden, - bool ignoreMissing = SelectColumnsTransform.Defaults.IgnoreMissing) + internal ColumnSelectingEstimator(IHostEnvironment env, string[] keepColumns, + string[] dropColumns, bool keepHidden = ColumnSelectingTransformer.Defaults.KeepHidden, + bool ignoreMissing = ColumnSelectingTransformer.Defaults.IgnoreMissing) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ColumnSelectingEstimator)), - new SelectColumnsTransform(env, keepColumns, dropColumns, keepHidden, ignoreMissing)) + new ColumnSelectingTransformer(env, keepColumns, dropColumns, keepHidden, ignoreMissing)) { _selectPredicate = (name) => (keepColumns != null) ? keepColumns.Contains(name) : !dropColumns.Contains(name); @@ -96,7 +97,7 @@ public static ColumnSelectingEstimator DropColumns(IHostEnvironment env, params public override SchemaShape GetOutputSchema(SchemaShape inputSchema) { Host.CheckValue(inputSchema, nameof(inputSchema)); - if (!Transformer.IgnoreMissing && !SelectColumnsTransform.IsSchemaValid(inputSchema.Columns.Select(x => x.Name), + if (!Transformer.IgnoreMissing && !ColumnSelectingTransformer.IsSchemaValid(inputSchema.Columns.Select(x => x.Name), Transformer.SelectColumns, out IEnumerable invalidColumns)) { @@ -111,7 +112,7 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) /// /// The SelectColumns Transforms allows the user to specify columns to drop or keep from a given input. /// - public sealed class SelectColumnsTransform : ITransformer, ICanSaveModel + public sealed class ColumnSelectingTransformer : ITransformer, ICanSaveModel { internal const string Summary = "Selects which columns from the dataset to keep."; internal const string UserName = "Select Columns Transform"; @@ -149,7 +150,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(SelectColumnsTransform).Assembly.FullName); + loaderAssemblyName: typeof(ColumnSelectingTransformer).Assembly.FullName); } private static VersionInfo GetDropVersionInfo() @@ -161,7 +162,7 @@ private static VersionInfo GetDropVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010002, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(SelectColumnsTransform).Assembly.FullName); + loaderAssemblyName: typeof(ColumnSelectingTransformer).Assembly.FullName); } private static VersionInfo GetChooseVersionInfo() @@ -173,7 +174,7 @@ private static VersionInfo GetChooseVersionInfo() verWeCanReadBack: 0x00010001, loaderSignature: ChooseLoaderSignature, loaderSignatureAlt: ChooseLoaderSignatureOld, - loaderAssemblyName: typeof(SelectColumnsTransform).Assembly.FullName); + loaderAssemblyName: typeof(ColumnSelectingTransformer).Assembly.FullName); } public sealed class Arguments : TransformInputBase @@ -191,10 +192,10 @@ public sealed class Arguments : TransformInputBase public bool IgnoreMissing = Defaults.IgnoreMissing; } - public SelectColumnsTransform(IHostEnvironment env, string[] keepColumns, string[] dropColumns, + public ColumnSelectingTransformer(IHostEnvironment env, string[] keepColumns, string[] dropColumns, bool keepHidden = Defaults.KeepHidden, bool ignoreMissing = Defaults.IgnoreMissing) { - _host = Contracts.CheckRef(env, nameof(env)).Register(nameof(SelectColumnsTransform)); + _host = Contracts.CheckRef(env, nameof(env)).Register(nameof(ColumnSelectingTransformer)); _host.CheckValueOrNull(keepColumns); _host.CheckValueOrNull(dropColumns); @@ -232,7 +233,7 @@ private static bool CheckModelVersion(ModelLoadContext ctx, VersionInfo versionI /// /// Back-compatibilty function that handles loading the DropColumns Transform. /// - private static SelectColumnsTransform LoadDropColumnsTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + private static ColumnSelectingTransformer LoadDropColumnsTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { // *** Binary format *** // int: sizeof(Float) @@ -264,7 +265,7 @@ private static SelectColumnsTransform LoadDropColumnsTransform(IHostEnvironment // Note for backward compatibility, Drop/Keep Columns always preserves // hidden columns - return new SelectColumnsTransform(env, keepColumns, dropColumns, true); + return new ColumnSelectingTransformer(env, keepColumns, dropColumns, true); } /// @@ -296,7 +297,7 @@ private static bool GetHiddenOption(IHostEnvironment env, HiddenColumnOption opt /// /// Backwards compatibility helper function that loads a Choose Column Transform. /// - private static SelectColumnsTransform LoadChooseColumnsTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + private static ColumnSelectingTransformer LoadChooseColumnsTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { // *** Binary format *** // int: sizeof(Float) @@ -334,11 +335,11 @@ private static SelectColumnsTransform LoadChooseColumnsTransform(IHostEnvironmen env.Check(colKeepHidden == keepHidden, differentHideColumnNotSupportedMsg); } - return new SelectColumnsTransform(env, names.ToArray(), null, keepHidden); + return new ColumnSelectingTransformer(env, names.ToArray(), null, keepHidden); } // Factory method for SignatureLoadModelTransform. - private static SelectColumnsTransform Create(IHostEnvironment env, ModelLoadContext ctx) + private static ColumnSelectingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { ctx.CheckAtModel(GetVersionInfo()); // *** Binary format *** @@ -365,7 +366,7 @@ private static SelectColumnsTransform Create(IHostEnvironment env, ModelLoadCont else columnsToDrop = columns; - return new SelectColumnsTransform(env, columnsToKeep, columnsToDrop, keepHidden, ignoreMissing); + return new ColumnSelectingTransformer(env, columnsToKeep, columnsToDrop, keepHidden, ignoreMissing); } // Factory method for SignatureLoadDataTransform. @@ -373,7 +374,7 @@ public static IDataView Create(IHostEnvironment env, ModelLoadContext ctx, IData { Contracts.CheckValue(env, nameof(env)); env.CheckValue(ctx, nameof(ctx)); - SelectColumnsTransform transform; + ColumnSelectingTransformer transform; // Determine which version of the transform is being loaded. if (CheckModelVersion(ctx, GetDropVersionInfo())) @@ -392,27 +393,15 @@ public static IDataView Create(IHostEnvironment env, ModelLoadContext ctx, IData return transform.Transform(input); } - public static IDataTransform CreateKeep(IHostEnvironment env, IDataView input, params string[] keepColumns) + public static IDataTransform CreateKeep(IHostEnvironment env, IDataView input, string[] keepColumns, bool keepHidden = false) { - var transform = new SelectColumnsTransform(env, keepColumns, null); - return new SelectColumnsDataTransform(env, transform, new Mapper(transform, input.Schema), input); - } - - public static IDataTransform CreateKeep(IHostEnvironment env, IDataView input, bool keepHidden, params string[] keepColumns) - { - var transform = new SelectColumnsTransform(env, keepColumns, null, keepHidden); + var transform = new ColumnSelectingTransformer(env, keepColumns, null, keepHidden); return new SelectColumnsDataTransform(env, transform, new Mapper(transform, input.Schema), input); } public static IDataTransform CreateDrop(IHostEnvironment env, IDataView input, params string[] dropColumns) { - var transform = new SelectColumnsTransform(env, null, dropColumns); - return new SelectColumnsDataTransform(env, transform, new Mapper(transform, input.Schema), input); - } - - public static IDataTransform CreateDrop(IHostEnvironment env, IDataView input, bool keepHidden, params string[] dropColumns) - { - var transform = new SelectColumnsTransform(env, null, dropColumns, keepHidden); + var transform = new ColumnSelectingTransformer(env, null, dropColumns); return new SelectColumnsDataTransform(env, transform, new Mapper(transform, input.Schema), input); } @@ -421,7 +410,7 @@ private static IDataTransform Create(IHostEnvironment env, Arguments args, IData { Contracts.CheckValue(env, nameof(env)); env.CheckValue(args, nameof(args)); - var transform = new SelectColumnsTransform(env, args.KeepColumns, args.DropColumns, + var transform = new ColumnSelectingTransformer(env, args.KeepColumns, args.DropColumns, args.KeepHidden, args.IgnoreMissing); return new SelectColumnsDataTransform(env, transform, new Mapper(transform, input.Schema), input); } @@ -497,7 +486,7 @@ private sealed class Mapper public Schema Schema { get; } - public Mapper(SelectColumnsTransform transform, Schema inputSchema) + public Mapper(ColumnSelectingTransformer transform, Schema inputSchema) { _host = transform._host.Register(nameof(Mapper)); _inputSchema = inputSchema; @@ -567,17 +556,15 @@ private static int[] BuildOutputToInputMap(IEnumerable selectedColumns, // Handles the drop case, removing any columns specified from the input // In the case of drop, the order of the output is modeled after the input // given an input of ABC and dropping column B will result in AC. - for (int colIdx = 0; colIdx < inputSchema.ColumnCount; colIdx++) + // In drop mode, we drop all columns with the specified names and keep all the rest, + // ignoring the keepHidden argument. + for(int colIdx = 0; colIdx < inputSchema.ColumnCount; colIdx++) { - if (!keepHidden && inputSchema.IsHidden(colIdx)) - continue; - if (selectedColumns.Contains(inputSchema[colIdx].Name)) continue; outputToInputMapping.Add(colIdx); } - } return outputToInputMapping.ToArray(); @@ -622,10 +609,10 @@ public ValueGetter GetIdGetter() private sealed class SelectColumnsDataTransform : IDataTransform, IRowToRowMapper, ITransformTemplate { private readonly IHost _host; - private readonly SelectColumnsTransform _transform; + private readonly ColumnSelectingTransformer _transform; private readonly Mapper _mapper; - public SelectColumnsDataTransform(IHostEnvironment env, SelectColumnsTransform transform, Mapper mapper, IDataView input) + public SelectColumnsDataTransform(IHostEnvironment env, ColumnSelectingTransformer transform, Mapper mapper, IDataView input) { _host = Contracts.CheckRef(env, nameof(env)).Register(nameof(SelectColumnsDataTransform)); _transform = transform; @@ -641,7 +628,7 @@ public SelectColumnsDataTransform(IHostEnvironment env, SelectColumnsTransform t Schema ISchematized.Schema => _mapper.Schema; - public long? GetRowCount(bool lazy = true) => Source.GetRowCount(lazy); + public long? GetRowCount() => Source.GetRowCount(); public IRowCursor GetRowCursor(Func needCol, IRandom rand = null) { diff --git a/src/Microsoft.ML.Data/Transforms/CopyColumnsTransform.cs b/src/Microsoft.ML.Data/Transforms/ColumnsCopying.cs similarity index 75% rename from src/Microsoft.ML.Data/Transforms/CopyColumnsTransform.cs rename to src/Microsoft.ML.Data/Transforms/ColumnsCopying.cs index 302e2d8502..232e4978b0 100644 --- a/src/Microsoft.ML.Data/Transforms/CopyColumnsTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/ColumnsCopying.cs @@ -16,31 +16,31 @@ using Microsoft.ML.Runtime.Model.Onnx; using Microsoft.ML.Transforms; -[assembly: LoadableClass(CopyColumnsTransform.Summary, typeof(IDataTransform), typeof(CopyColumnsTransform), - typeof(CopyColumnsTransform.Arguments), typeof(SignatureDataTransform), - CopyColumnsTransform.UserName, "CopyColumns", "CopyColumnsTransform", CopyColumnsTransform.ShortName, +[assembly: LoadableClass(ColumnsCopyingTransformer.Summary, typeof(IDataTransform), typeof(ColumnsCopyingTransformer), + typeof(ColumnsCopyingTransformer.Arguments), typeof(SignatureDataTransform), + ColumnsCopyingTransformer.UserName, "CopyColumns", "CopyColumnsTransform", ColumnsCopyingTransformer.ShortName, DocName = "transform/CopyColumnsTransformer.md")] -[assembly: LoadableClass(CopyColumnsTransform.Summary, typeof(IDataTransform), typeof(CopyColumnsTransform), null, typeof(SignatureLoadDataTransform), - CopyColumnsTransform.UserName, CopyColumnsTransform.LoaderSignature)] +[assembly: LoadableClass(ColumnsCopyingTransformer.Summary, typeof(IDataTransform), typeof(ColumnsCopyingTransformer), null, typeof(SignatureLoadDataTransform), + ColumnsCopyingTransformer.UserName, ColumnsCopyingTransformer.LoaderSignature)] -[assembly: LoadableClass(CopyColumnsTransform.Summary, typeof(CopyColumnsTransform), null, typeof(SignatureLoadModel), - CopyColumnsTransform.UserName, CopyColumnsTransform.LoaderSignature)] +[assembly: LoadableClass(ColumnsCopyingTransformer.Summary, typeof(ColumnsCopyingTransformer), null, typeof(SignatureLoadModel), + ColumnsCopyingTransformer.UserName, ColumnsCopyingTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(CopyColumnsTransform), null, typeof(SignatureLoadRowMapper), - CopyColumnsTransform.UserName, CopyColumnsTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(ColumnsCopyingTransformer), null, typeof(SignatureLoadRowMapper), + ColumnsCopyingTransformer.UserName, ColumnsCopyingTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms { - public sealed class CopyColumnsEstimator : TrivialEstimator + public sealed class ColumnsCopyingEstimator : TrivialEstimator { - public CopyColumnsEstimator(IHostEnvironment env, string input, string output) : + public ColumnsCopyingEstimator(IHostEnvironment env, string input, string output) : this(env, (input, output)) { } - public CopyColumnsEstimator(IHostEnvironment env, params (string source, string name)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(CopyColumnsEstimator)), new CopyColumnsTransform(env, columns)) + public ColumnsCopyingEstimator(IHostEnvironment env, params (string source, string name)[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ColumnsCopyingEstimator)), new ColumnsCopyingTransformer(env, columns)) { } @@ -60,7 +60,7 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) } } - public sealed class CopyColumnsTransform : OneToOneTransformerBase + public sealed class ColumnsCopyingTransformer : OneToOneTransformerBase { public const string LoaderSignature = "CopyTransform"; internal const string Summary = "Copy a source column to a new column."; @@ -77,11 +77,11 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(CopyColumnsTransform).Assembly.FullName); + loaderAssemblyName: typeof(ColumnsCopyingTransformer).Assembly.FullName); } - public CopyColumnsTransform(IHostEnvironment env, params (string source, string name)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(CopyColumnsTransform)), columns) + public ColumnsCopyingTransformer(IHostEnvironment env, params (string source, string name)[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ColumnsCopyingTransformer)), columns) { } @@ -116,12 +116,12 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV Contracts.CheckValue(env, nameof(env)); env.CheckValue(args, nameof(args)); - var transformer = new CopyColumnsTransform(env, args.Column.Select(x => (x.Source, x.Name)).ToArray()); + var transformer = new ColumnsCopyingTransformer(env, args.Column.Select(x => (x.Source, x.Name)).ToArray()); return transformer.MakeDataTransform(input); } // Factory method for SignatureLoadModel. - private static CopyColumnsTransform Create(IHostEnvironment env, ModelLoadContext ctx) + private static ColumnsCopyingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(ctx, nameof(ctx)); @@ -140,7 +140,7 @@ private static CopyColumnsTransform Create(IHostEnvironment env, ModelLoadContex columns[i].Name = ctx.LoadNonEmptyString(); columns[i].Source = ctx.LoadNonEmptyString(); } - return new CopyColumnsTransform(env, columns); + return new ColumnsCopyingTransformer(env, columns); } // Factory method for SignatureLoadDataTransform. @@ -160,21 +160,21 @@ public override void Save(ModelSaveContext ctx) protected override IRowMapper MakeRowMapper(Schema inputSchema) => new Mapper(this, inputSchema, ColumnPairs); - private sealed class Mapper : MapperBase, ISaveAsOnnx + private sealed class Mapper : OneToOneMapperBase, ISaveAsOnnx { private readonly Schema _schema; private readonly (string Source, string Name)[] _columns; public bool CanSaveOnnx(OnnxContext ctx) => ctx.GetOnnxVersion() == OnnxVersion.Experimental; - internal Mapper(CopyColumnsTransform parent, Schema inputSchema, (string Source, string Name)[] columns) + internal Mapper(ColumnsCopyingTransformer parent, Schema inputSchema, (string Source, string Name)[] columns) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _schema = inputSchema; _columns = columns; } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _columns.Length); @@ -188,7 +188,7 @@ Delegate MakeGetter(IRow row, int index) return Utils.MarshalInvoke(MakeGetter, type.RawType, input, colIndex); } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var result = new Schema.Column[_columns.Length]; for (int i = 0; i < _columns.Length; i++) diff --git a/src/Microsoft.ML.Data/Transforms/ConversionsCatalog.cs b/src/Microsoft.ML.Data/Transforms/ConversionsCatalog.cs index 2d589f8e58..b5185393c2 100644 --- a/src/Microsoft.ML.Data/Transforms/ConversionsCatalog.cs +++ b/src/Microsoft.ML.Data/Transforms/ConversionsCatalog.cs @@ -9,7 +9,7 @@ namespace Microsoft.ML { using HashDefaults = HashingEstimator.Defaults; - using ConvertDefaults = ConvertingEstimator.Defaults; + using ConvertDefaults = TypeConvertingEstimator.Defaults; /// /// Extensions for the HashEstimator. @@ -33,7 +33,7 @@ public static HashingEstimator Hash(this TransformsCatalog.ConversionTransforms /// /// The transform's catalog. /// Description of dataset columns and how to process them. - public static HashingEstimator Hash(this TransformsCatalog.ConversionTransforms catalog, params HashTransformer.ColumnInfo[] columns) + public static HashingEstimator Hash(this TransformsCatalog.ConversionTransforms catalog, params HashingTransformer.ColumnInfo[] columns) => new HashingEstimator(CatalogUtils.GetEnvironment(catalog), columns); /// @@ -43,17 +43,17 @@ public static HashingEstimator Hash(this TransformsCatalog.ConversionTransforms /// Name of the input column. /// Name of the column to be transformed. If this is null '' will be used. /// Number of bits to hash into. Must be between 1 and 31, inclusive. - public static ConvertingEstimator ConvertTo(this TransformsCatalog.ConversionTransforms catalog, string inputColumn, string outputColumn = null, + public static TypeConvertingEstimator ConvertType(this TransformsCatalog.ConversionTransforms catalog, string inputColumn, string outputColumn = null, DataKind outputKind = ConvertDefaults.DefaultOutputKind) - => new ConvertingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, outputKind); + => new TypeConvertingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, outputKind); /// /// Changes column type of the input column. /// /// The transform's catalog. /// Description of dataset columns and how to process them. - public static ConvertingEstimator ConvertTo(this TransformsCatalog.ConversionTransforms catalog, params ConvertingTransform.ColumnInfo[] columns) - => new ConvertingEstimator(CatalogUtils.GetEnvironment(catalog), columns); + public static TypeConvertingEstimator ConvertType(this TransformsCatalog.ConversionTransforms catalog, params TypeConvertingTransformer.ColumnInfo[] columns) + => new TypeConvertingEstimator(CatalogUtils.GetEnvironment(catalog), columns); } public static class ToValueCatalog @@ -63,8 +63,8 @@ public static class ToValueCatalog /// /// The categorical transform's catalog. /// Name of the input column. - public static KeyToValueEstimator MapKeyToValue(this TransformsCatalog.ConversionTransforms catalog, string inputColumn) - => new KeyToValueEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn); + public static KeyToValueMappingEstimator MapKeyToValue(this TransformsCatalog.ConversionTransforms catalog, string inputColumn) + => new KeyToValueMappingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn); /// /// Convert the key types (name of the column specified in the first item of the tuple) back to their original values @@ -72,8 +72,8 @@ public static KeyToValueEstimator MapKeyToValue(this TransformsCatalog.Conversio /// /// The categorical transform's catalog /// The pairs of input and output columns. - public static KeyToValueEstimator MapKeyToValue(this TransformsCatalog.ConversionTransforms catalog, params (string input, string output)[] columns) - => new KeyToValueEstimator(CatalogUtils.GetEnvironment(catalog), columns); + public static KeyToValueMappingEstimator MapKeyToValue(this TransformsCatalog.ConversionTransforms catalog, params (string input, string output)[] columns) + => new KeyToValueMappingEstimator(CatalogUtils.GetEnvironment(catalog), columns); } /// @@ -87,7 +87,7 @@ public static class ToVectorCatalog /// The categorical transform's catalog. /// The input column to map back to vectors. public static KeyToVectorMappingEstimator MapKeyToVector(this TransformsCatalog.ConversionTransforms catalog, - params KeyToVectorTransform.ColumnInfo[] columns) + params KeyToVectorMappingTransformer.ColumnInfo[] columns) => new KeyToVectorMappingEstimator(CatalogUtils.GetEnvironment(catalog), columns); /// diff --git a/src/Microsoft.ML.Data/Transforms/DropSlotsTransform.cs b/src/Microsoft.ML.Data/Transforms/DropSlotsTransform.cs index d644725618..27a73824b2 100644 --- a/src/Microsoft.ML.Data/Transforms/DropSlotsTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/DropSlotsTransform.cs @@ -701,7 +701,7 @@ private ValueGetter> MakeVecTrivialGetter() // Delegates onto instance methods are more efficient than delegates onto static methods. private void VecTrivialGetter(ref VBuffer value) { - value = new VBuffer(1, 0, value.Values, value.Indices); + VBufferUtils.Resize(ref value, 1, 0); } private Delegate MakeVecGetter(IRow input, int iinfo) diff --git a/src/Microsoft.ML.Data/Transforms/ExtensionsCatalog.cs b/src/Microsoft.ML.Data/Transforms/ExtensionsCatalog.cs index b15b86f6bd..96393fdbaa 100644 --- a/src/Microsoft.ML.Data/Transforms/ExtensionsCatalog.cs +++ b/src/Microsoft.ML.Data/Transforms/ExtensionsCatalog.cs @@ -19,8 +19,8 @@ public static class ColumnCopyingCatalog /// The transform's catalog. /// Name of the input column. /// Name of the new column, resulting from copying. - public static CopyColumnsEstimator CopyColumns(this TransformsCatalog catalog, string inputColumn, string outputColumn) - => new CopyColumnsEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn); + public static ColumnsCopyingEstimator CopyColumns(this TransformsCatalog catalog, string inputColumn, string outputColumn) + => new ColumnsCopyingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn); /// /// Copies the input column, name specified in the first item of the tuple, @@ -28,8 +28,8 @@ public static CopyColumnsEstimator CopyColumns(this TransformsCatalog catalog, s /// /// The transform's catalog /// The pairs of input and output columns. - public static CopyColumnsEstimator CopyColumns(this TransformsCatalog catalog, params (string source, string name)[] columns) - => new CopyColumnsEstimator(CatalogUtils.GetEnvironment(catalog), columns); + public static ColumnsCopyingEstimator CopyColumns(this TransformsCatalog catalog, params (string source, string name)[] columns) + => new ColumnsCopyingEstimator(CatalogUtils.GetEnvironment(catalog), columns); } @@ -85,8 +85,8 @@ public static ColumnSelectingEstimator DropColumns(this TransformsCatalog catalo public static ColumnSelectingEstimator SelectColumns(this TransformsCatalog catalog, string[] keepColumns, string[] dropColumns, - bool keepHidden = SelectColumnsTransform.Defaults.KeepHidden, - bool ignoreMissing = SelectColumnsTransform.Defaults.IgnoreMissing) + bool keepHidden = ColumnSelectingTransformer.Defaults.KeepHidden, + bool ignoreMissing = ColumnSelectingTransformer.Defaults.IgnoreMissing) => new ColumnSelectingEstimator(CatalogUtils.GetEnvironment(catalog), keepColumns, dropColumns, keepHidden, ignoreMissing); } diff --git a/src/Microsoft.ML.Data/Transforms/GenerateNumberTransform.cs b/src/Microsoft.ML.Data/Transforms/GenerateNumberTransform.cs index 36d94fb8e8..f7f3e200ca 100644 --- a/src/Microsoft.ML.Data/Transforms/GenerateNumberTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/GenerateNumberTransform.cs @@ -258,7 +258,7 @@ private static VersionInfo GetVersionInfo() private const string RegistrationName = "GenerateNumber"; /// - /// Convenience constructor for public facing API. + /// Initializes a new instance of . /// /// Host Environment. /// Input . This is the output from previous transform or loader. diff --git a/src/Microsoft.ML.Data/Transforms/HashTransform.cs b/src/Microsoft.ML.Data/Transforms/Hashing.cs similarity index 89% rename from src/Microsoft.ML.Data/Transforms/HashTransform.cs rename to src/Microsoft.ML.Data/Transforms/Hashing.cs index 869684d5af..89ceceeb4e 100644 --- a/src/Microsoft.ML.Data/Transforms/HashTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/Hashing.cs @@ -15,17 +15,17 @@ using System.Runtime.CompilerServices; using System.Text; -[assembly: LoadableClass(HashTransformer.Summary, typeof(IDataTransform), typeof(HashTransformer), typeof(HashTransformer.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(HashingTransformer.Summary, typeof(IDataTransform), typeof(HashingTransformer), typeof(HashingTransformer.Arguments), typeof(SignatureDataTransform), "Hash Transform", "HashTransform", "Hash", DocName = "transform/HashTransform.md")] -[assembly: LoadableClass(HashTransformer.Summary, typeof(IDataTransform), typeof(HashTransformer), null, typeof(SignatureLoadDataTransform), - "Hash Transform", HashTransformer.LoaderSignature)] +[assembly: LoadableClass(HashingTransformer.Summary, typeof(IDataTransform), typeof(HashingTransformer), null, typeof(SignatureLoadDataTransform), + "Hash Transform", HashingTransformer.LoaderSignature)] -[assembly: LoadableClass(HashTransformer.Summary, typeof(HashTransformer), null, typeof(SignatureLoadModel), - "Hash Transform", HashTransformer.LoaderSignature)] +[assembly: LoadableClass(HashingTransformer.Summary, typeof(HashingTransformer), null, typeof(SignatureLoadModel), + "Hash Transform", HashingTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(HashTransformer), null, typeof(SignatureLoadRowMapper), - "Hash Transform", HashTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(HashingTransformer), null, typeof(SignatureLoadRowMapper), + "Hash Transform", HashingTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Conversions { @@ -34,7 +34,7 @@ namespace Microsoft.ML.Transforms.Conversions /// it hashes each slot separately. /// It can hash either text values or key values. /// - public sealed class HashTransformer : OneToOneTransformerBase + public sealed class HashingTransformer : OneToOneTransformerBase { public sealed class Arguments { @@ -195,7 +195,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010002, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(HashTransformer).Assembly.FullName); + loaderAssemblyName: typeof(HashingTransformer).Assembly.FullName); } private readonly ColumnInfo[] _columns; @@ -232,7 +232,7 @@ private ColumnType GetOutputType(ISchema inputSchema, ColumnInfo column) /// /// Host Environment. /// Description of dataset columns and how to process them. - public HashTransformer(IHostEnvironment env, ColumnInfo[] columns) : + public HashingTransformer(IHostEnvironment env, ColumnInfo[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), GetColumnPairs(columns)) { _columns = columns.ToArray(); @@ -243,7 +243,7 @@ public HashTransformer(IHostEnvironment env, ColumnInfo[] columns) : } } - internal HashTransformer(IHostEnvironment env, IDataView input, ColumnInfo[] columns) : + internal HashingTransformer(IHostEnvironment env, IDataView input, ColumnInfo[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), GetColumnPairs(columns)) { _columns = columns.ToArray(); @@ -321,7 +321,7 @@ private Delegate GetGetterCore(IRow input, int iinfo, out Action disposer) protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); // Factory method for SignatureLoadModel. - private static HashTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + private static HashingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(RegistrationName); @@ -329,10 +329,10 @@ private static HashTransformer Create(IHostEnvironment env, ModelLoadContext ctx host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new HashTransformer(host, ctx); + return new HashingTransformer(host, ctx); } - private HashTransformer(IHost host, ModelLoadContext ctx) + private HashingTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) { var columnsLength = ColumnPairs.Length; @@ -389,7 +389,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV item.Ordered ?? args.Ordered, item.InvertHash ?? args.InvertHash); }; - return new HashTransformer(env, input, cols).MakeDataTransform(input); + return new HashingTransformer(env, input, cols).MakeDataTransform(input); } #region Getters @@ -743,36 +743,33 @@ private static ValueGetter> MakeVectorHashGetter(uint se return (ref VBuffer dst) => { srcGetter(ref src); - int[] indices = dst.Indices; - if (src.Count == 0) + var srcValues = src.GetValues(); + if (srcValues.Length == 0) { - dst = new VBuffer(src.Length, 0, dst.Values, dst.Indices); + VBufferUtils.Resize(ref dst, src.Length, 0); return; } + var editor = VBufferEditor.Create(ref dst, src.Length, srcValues.Length); + + for (int i = 0; i < srcValues.Length; ++i) + editor.Values[i] = hasher.HashCore(seed, mask, srcValues[i]); if (!src.IsDense) - { - Utils.EnsureSize(ref indices, src.Count, keepOld: false); - Array.Copy(src.Indices, 0, indices, 0, src.Count); - } - var values = dst.Values; - Utils.EnsureSize(ref values, src.Count, keepOld: false); - var srcValuesSpan = src.Values.AsSpan(0, src.Count); - for (int i = 0; i < srcValuesSpan.Length; ++i) - values[i] = hasher.HashCore(seed, mask, srcValuesSpan[i]); - dst = new VBuffer(src.Length, src.Count, values, indices); + src.GetIndices().CopyTo(editor.Indices); + + dst = editor.Commit(); }; } // It is not sparsity preserving. return (ref VBuffer dst) => { srcGetter(ref src); - uint[] values = dst.Values; - Utils.EnsureSize(ref values, src.Length, keepOld: false); - var srcValuesSpan = src.Values.AsSpan(0, src.Count); + var editor = VBufferEditor.Create(ref dst, src.Length); + + var srcValues = src.GetValues(); if (src.IsDense) { - for (int i = 0; i < srcValuesSpan.Length; ++i) - values[i] = hasher.HashCore(seed, mask, srcValuesSpan[i]); + for (int i = 0; i < srcValues.Length; ++i) + editor.Values[i] = hasher.HashCore(seed, mask, srcValues[i]); } else { @@ -781,12 +778,13 @@ private static ValueGetter> MakeVectorHashGetter(uint se // values, rather than having complicated logic to do a simultaneous traversal of the // sparse vs. dense array. for (int i = 0; i < src.Length; ++i) - values[i] = defaultHash; + editor.Values[i] = defaultHash; // Next overwrite the values in the explicit entries. - for (int i = 0; i < srcValuesSpan.Length; ++i) - values[src.Indices[i]] = hasher.HashCore(seed, mask, srcValuesSpan[i]); + var srcIndices = src.GetIndices(); + for (int i = 0; i < srcValues.Length; ++i) + editor.Values[srcIndices[i]] = hasher.HashCore(seed, mask, srcValues[i]); } - dst = new VBuffer(src.Length, values, dst.Indices); + dst = editor.Commit(); }; } @@ -807,64 +805,62 @@ private static ValueGetter> MakeVectorOrderedHashGetter( return (ref VBuffer dst) => { srcGetter(ref src); - int[] indices = dst.Indices; - if (src.Count == 0) + var srcValues = src.GetValues(); + if (srcValues.Length == 0) { - dst = new VBuffer(src.Length, 0, dst.Values, dst.Indices); + VBufferUtils.Resize(ref dst, src.Length, 0); return; } - if (!src.IsDense) - { - Utils.EnsureSize(ref indices, src.Count, keepOld: false); - Array.Copy(src.Indices, 0, indices, 0, src.Count); - } - var values = dst.Values; - Utils.EnsureSize(ref values, src.Count, keepOld: false); - var srcValuesSpan = src.Values.AsSpan(0, src.Count); + var editor = VBufferEditor.Create(ref dst, src.Length, srcValues.Length); + if (src.IsDense) { - for (int i = 0; i < srcValuesSpan.Length; ++i) - values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)i), mask, srcValuesSpan[i]); + for (int i = 0; i < srcValues.Length; ++i) + editor.Values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)i), mask, srcValues[i]); } else { - for (int i = 0; i < srcValuesSpan.Length; ++i) - values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)src.Indices[i]), mask, srcValuesSpan[i]); + var srcIndices = src.GetIndices(); + for (int i = 0; i < srcValues.Length; ++i) + editor.Values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)srcIndices[i]), mask, srcValues[i]); + srcIndices.CopyTo(editor.Indices); + } - dst = new VBuffer(src.Length, src.Count, values, indices); + dst = editor.Commit(); }; } // It is not sparsity preserving. return (ref VBuffer dst) => { srcGetter(ref src); - uint[] values = dst.Values; - Utils.EnsureSize(ref values, src.Length, keepOld: false); - var srcValuesSpan = src.Values.AsSpan(0, src.Count); + var editor = VBufferEditor.Create(ref dst, src.Length); + + var srcValues = src.GetValues(); if (src.IsDense) { - for (int i = 0; i < srcValuesSpan.Length; ++i) - values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)i), mask, srcValuesSpan[i]); + for (int i = 0; i < srcValues.Length; ++i) + editor.Values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)i), mask, srcValues[i]); } else { + var srcIndices = src.GetIndices(); int j = 0; for (int i = 0; i < src.Length; i++) { uint indexSeed = Hashing.MurmurRound(seed, (uint)i); - if (src.Count <= j || src.Indices[j] > i) - values[i] = hasher.HashCore(indexSeed, mask, default); - else if (src.Indices[j] == i) - values[i] = hasher.HashCore(indexSeed, mask, srcValuesSpan[j++]); + if (srcIndices.Length <= j || srcIndices[j] > i) + editor.Values[i] = hasher.HashCore(indexSeed, mask, default); + else if (srcIndices[j] == i) + editor.Values[i] = hasher.HashCore(indexSeed, mask, srcValues[j++]); else Contracts.Assert(false, "this should have never happened."); } } - dst = new VBuffer(src.Length, values, dst.Indices); + dst = editor.Commit(); }; } - private sealed class Mapper : MapperBase + private sealed class Mapper : OneToOneMapperBase { private sealed class ColInfo { @@ -881,9 +877,9 @@ public ColInfo(string name, string source, ColumnType type) } private readonly ColumnType[] _types; - private readonly HashTransformer _parent; + private readonly HashingTransformer _parent; - public Mapper(HashTransformer parent, Schema inputSchema) + public Mapper(HashingTransformer parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -892,7 +888,7 @@ public Mapper(HashTransformer parent, Schema inputSchema) _types[i] = _parent.GetOutputType(inputSchema, _parent._columns[i]); } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -917,7 +913,7 @@ private void AddMetaKeyValues(int i, Schema.Metadata.Builder builder) builder.AddKeyValues(_parent._kvTypes[i].VectorSize, _parent._kvTypes[i].ItemType.AsPrimitive, getter); } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) => _parent.GetGetterCore(input, iinfo, out disposer); + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) => _parent.GetGetterCore(input, iinfo, out disposer); } private abstract class InvertHashHelper @@ -1111,12 +1107,17 @@ public override void Process() { _srcGetter(ref _value); _dstGetter(ref _hash); + + var valueValues = _value.GetValues(); + var hashValues = _hash.GetValues(); + // The two arrays should be consistent in their density, length, count, etc. Contracts.Assert(_value.IsDense == _hash.IsDense); Contracts.Assert(_value.Length == _hash.Length); - Contracts.Assert(_value.Count == _hash.Count); - for (int i = 0; i < _value.Count; ++i) - Collector.Add(_hash.Values[i], _value.Values[i]); + Contracts.Assert(valueValues.Length == hashValues.Length); + + for (int i = 0; i < valueValues.Length; ++i) + Collector.Add(hashValues[i], valueValues[i]); } } @@ -1151,19 +1152,24 @@ public override void Process() { _srcGetter(ref _value); _dstGetter(ref _hash); + + var valueValues = _value.GetValues(); + var hashValues = _hash.GetValues(); + // The two arrays should be consistent in their density, length, count, etc. Contracts.Assert(_value.IsDense == _hash.IsDense); Contracts.Assert(_value.Length == _hash.Length); - Contracts.Assert(_value.Count == _hash.Count); + Contracts.Assert(valueValues.Length == hashValues.Length); if (_hash.IsDense) { - for (int i = 0; i < _value.Count; ++i) - Collector.Add(_hash.Values[i], new KeyValuePair(i, _value.Values[i])); + for (int i = 0; i < valueValues.Length; ++i) + Collector.Add(hashValues[i], new KeyValuePair(i, valueValues[i])); } else { - for (int i = 0; i < _value.Count; ++i) - Collector.Add(_hash.Values[i], new KeyValuePair(_hash.Indices[i], _value.Values[i])); + var hashIndices = _hash.GetIndices(); + for (int i = 0; i < valueValues.Length; ++i) + Collector.Add(hashValues[i], new KeyValuePair(hashIndices[i], valueValues[i])); } } } @@ -1171,9 +1177,9 @@ public override void Process() } /// - /// Estimator for + /// Estimator for /// - public sealed class HashingEstimator : IEstimator + public sealed class HashingEstimator : IEstimator { internal const int NumBitsMin = 1; internal const int NumBitsLim = 32; @@ -1187,7 +1193,7 @@ internal static class Defaults } private readonly IHost _host; - private readonly HashTransformer.ColumnInfo[] _columns; + private readonly HashingTransformer.ColumnInfo[] _columns; internal static bool IsColumnTypeValid(ColumnType type) { @@ -1207,7 +1213,7 @@ internal static bool IsColumnTypeValid(ColumnType type) /// Limit the number of keys used to generate the slot name to this many. 0 means no invert hashing, -1 means no limit. public HashingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, int hashBits = Defaults.HashBits, int invertHash = Defaults.InvertHash) - : this(env, new HashTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn, hashBits: hashBits, invertHash: invertHash)) + : this(env, new HashingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn, hashBits: hashBits, invertHash: invertHash)) { } @@ -1216,14 +1222,14 @@ public HashingEstimator(IHostEnvironment env, string inputColumn, string outputC /// /// Host Environment. /// Description of dataset columns and how to process them. - public HashingEstimator(IHostEnvironment env, params HashTransformer.ColumnInfo[] columns) + public HashingEstimator(IHostEnvironment env, params HashingTransformer.ColumnInfo[] columns) { Contracts.CheckValue(env, nameof(env)); _host = env.Register(nameof(HashingEstimator)); _columns = columns.ToArray(); } - public HashTransformer Fit(IDataView input) => new HashTransformer(_host, input, _columns); + public HashingTransformer Fit(IDataView input) => new HashingTransformer(_host, input, _columns); public SchemaShape GetOutputSchema(SchemaShape inputSchema) { diff --git a/src/Microsoft.ML.Data/Transforms/InvertHashUtils.cs b/src/Microsoft.ML.Data/Transforms/InvertHashUtils.cs index 2a5f0a3fc1..4175916e58 100644 --- a/src/Microsoft.ML.Data/Transforms/InvertHashUtils.cs +++ b/src/Microsoft.ML.Data/Transforms/InvertHashUtils.cs @@ -45,7 +45,7 @@ public static ValueMapper GetSimpleMapper(Schema schema, in bool identity; // Second choice: if key, utilize the KeyValues metadata for that key, if it has one and is text. - if (schema.HasKeyNames(col, type.KeyCount)) + if (schema.HasKeyValues(col, type.KeyCount)) { // REVIEW: Non-textual KeyValues are certainly possible. Should we handle them? // Get the key names. @@ -412,7 +412,7 @@ private static void Save(IChannel ch, ModelSaveContext ctx, CodecFactory factory ctx.SaveTextStream("Terms.txt", writer => { - writer.WriteLine("# Number of terms = {0} of length {1}", v.Count, v.Length); + writer.WriteLine("# Number of terms = {0} of length {1}", v.GetValues().Length, v.Length); foreach (var pair in v.Items()) { var text = pair.Value; diff --git a/src/Microsoft.ML.Data/Transforms/KeyToValueTransform.cs b/src/Microsoft.ML.Data/Transforms/KeyToValue.cs similarity index 83% rename from src/Microsoft.ML.Data/Transforms/KeyToValueTransform.cs rename to src/Microsoft.ML.Data/Transforms/KeyToValue.cs index c437c17942..d8f55403d3 100644 --- a/src/Microsoft.ML.Data/Transforms/KeyToValueTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/KeyToValue.cs @@ -20,17 +20,17 @@ using System.Reflection; using System.Text; -[assembly: LoadableClass(typeof(IDataTransform), typeof(KeyToValueTransform), typeof(KeyToValueTransform.Arguments), typeof(SignatureDataTransform), - KeyToValueTransform.UserName, KeyToValueTransform.LoaderSignature, "KeyToValue", "KeyToVal", "Unterm")] +[assembly: LoadableClass(typeof(IDataTransform), typeof(KeyToValueMappingTransformer), typeof(KeyToValueMappingTransformer.Arguments), typeof(SignatureDataTransform), + KeyToValueMappingTransformer.UserName, KeyToValueMappingTransformer.LoaderSignature, "KeyToValue", "KeyToVal", "Unterm")] -[assembly: LoadableClass(typeof(IDataTransform), typeof(KeyToValueTransform), null, typeof(SignatureLoadDataTransform), - KeyToValueTransform.UserName, KeyToValueTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(IDataTransform), typeof(KeyToValueMappingTransformer), null, typeof(SignatureLoadDataTransform), + KeyToValueMappingTransformer.UserName, KeyToValueMappingTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(KeyToValueTransform), null, typeof(SignatureLoadModel), - KeyToValueTransform.UserName, KeyToValueTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(KeyToValueMappingTransformer), null, typeof(SignatureLoadModel), + KeyToValueMappingTransformer.UserName, KeyToValueMappingTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(KeyToValueTransform), null, typeof(SignatureLoadRowMapper), - KeyToValueTransform.UserName, KeyToValueTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(KeyToValueMappingTransformer), null, typeof(SignatureLoadRowMapper), + KeyToValueMappingTransformer.UserName, KeyToValueMappingTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Conversions { @@ -40,7 +40,7 @@ namespace Microsoft.ML.Transforms.Conversions /// * Output columns utilize the KeyValues metadata. /// * Maps zero values of the key type to the NA of the output type. /// - public sealed class KeyToValueTransform : OneToOneTransformerBase + public sealed class KeyToValueMappingTransformer : OneToOneTransformerBase { public sealed class Column : OneToOneColumn { @@ -78,22 +78,22 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(KeyToValueTransform).Assembly.FullName); + loaderAssemblyName: typeof(KeyToValueMappingTransformer).Assembly.FullName); } /// - /// Create a that takes and transforms one column. + /// Create a that takes and transforms one column. /// - public KeyToValueTransform(IHostEnvironment env, string columnName) + public KeyToValueMappingTransformer(IHostEnvironment env, string columnName) : this(env, (columnName, columnName)) { } /// - /// Create a that takes multiple pairs of columns. + /// Create a that takes multiple pairs of columns. /// - public KeyToValueTransform(IHostEnvironment env, params (string input, string output)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToValueTransform)), columns) + public KeyToValueMappingTransformer(IHostEnvironment env, params (string input, string output)[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToValueMappingTransformer)), columns) { } @@ -107,23 +107,23 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV env.CheckValue(input, nameof(input)); env.CheckNonEmpty(args.Column, nameof(args.Column)); - var transformer = new KeyToValueTransform(env, args.Column.Select(c => (c.Source ?? c.Name, c.Name)).ToArray()); + var transformer = new KeyToValueMappingTransformer(env, args.Column.Select(c => (c.Source ?? c.Name, c.Name)).ToArray()); return transformer.MakeDataTransform(input); } /// /// Factory method for SignatureLoadModel. /// - private static KeyToValueTransform Create(IHostEnvironment env, ModelLoadContext ctx) + private static KeyToValueMappingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); - var host = env.Register(nameof(KeyToValueTransform)); + var host = env.Register(nameof(KeyToValueMappingTransformer)); host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new KeyToValueTransform(host, ctx); + return new KeyToValueMappingTransformer(host, ctx); } - private KeyToValueTransform(IHost host, ModelLoadContext ctx) + private KeyToValueMappingTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) { } @@ -154,13 +154,13 @@ public override void Save(ModelSaveContext ctx) protected override IRowMapper MakeRowMapper(Schema inputSchema) => new Mapper(this, inputSchema); - private sealed class Mapper : MapperBase, ISaveAsPfa + private sealed class Mapper : OneToOneMapperBase, ISaveAsPfa { - private readonly KeyToValueTransform _parent; + private readonly KeyToValueMappingTransformer _parent; private readonly ColumnType[] _types; private readonly KeyToValueMap[] _kvMaps; - public Mapper(KeyToValueTransform parent, Schema inputSchema) + public Mapper(KeyToValueMappingTransformer parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -169,7 +169,7 @@ public Mapper(KeyToValueTransform parent, Schema inputSchema) public bool CanSavePfa => true; - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -210,7 +210,7 @@ public void SaveAsPfa(BoundPfaContext ctx) ctx.DeclareVar(toDeclare.ToArray()); } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _types.Length); @@ -257,7 +257,7 @@ private KeyToValueMap GetKeyMetadata(int iinfo, ColumnType typeKey Host.Check(keyMetadata.Length == typeKey.ItemType.KeyCount); VBufferUtils.Densify(ref keyMetadata); - return new KeyToValueMap(this, typeKey.ItemType.AsKey, typeVal.ItemType.AsPrimitive, keyMetadata.Values, iinfo); + return new KeyToValueMap(this, typeKey.ItemType.AsKey, typeVal.ItemType.AsPrimitive, keyMetadata, iinfo); } /// /// A map is an object capable of creating the association from an input type, to an output @@ -300,7 +300,7 @@ protected KeyToValueMap(Mapper mapper, PrimitiveType typeVal, int iinfo) private class KeyToValueMap : KeyToValueMap { - private readonly TValue[] _values; + private readonly VBuffer _values; private readonly TValue _na; private readonly bool _naMapsToDefault; @@ -308,10 +308,10 @@ private class KeyToValueMap : KeyToValueMap private readonly ValueMapper _convertToUInt; - public KeyToValueMap(Mapper parent, KeyType typeKey, PrimitiveType typeVal, TValue[] values, int iinfo) + public KeyToValueMap(Mapper parent, KeyType typeKey, PrimitiveType typeVal, VBuffer values, int iinfo) : base(parent, typeVal, iinfo) { - Parent.Host.AssertValue(values); + Parent.Host.Assert(values.IsDense); Parent.Host.Assert(typeKey.RawType == typeof(TKey)); Parent.Host.Assert(TypeOutput.RawType == typeof(TValue)); _values = values; @@ -329,13 +329,18 @@ public KeyToValueMap(Mapper parent, KeyType typeKey, PrimitiveType typeVal, TVal _convertToUInt = Runtime.Data.Conversion.Conversions.Instance.GetStandardConversion(typeKey, NumberType.U4, out identity); } - private void MapKey(ref TKey src, ref TValue dst) + private void MapKey(in TKey src, ref TValue dst) + { + MapKey(in src, _values.GetValues(), ref dst); + } + + private void MapKey(in TKey src, ReadOnlySpan values, ref TValue dst) { uint uintSrc = 0; _convertToUInt(in src, ref uintSrc); // Assign to NA if key value is not in valid range. - if (0 < uintSrc && uintSrc <= _values.Length) - dst = _values[uintSrc - 1]; + if (0 < uintSrc && uintSrc <= values.Length) + dst = values[(int)(uintSrc - 1)]; else dst = _na; } @@ -361,7 +366,7 @@ public override Delegate GetMappingGetter(IRow input) (ref TValue dst) => { getSrc(ref src); - MapKey(ref src, ref dst); + MapKey(in src, ref dst); }; return retVal; } @@ -369,27 +374,22 @@ public override Delegate GetMappingGetter(IRow input) { var src = default(VBuffer); var dstItem = default(TValue); - int maxSize = TypeOutput.IsKnownSizeVector ? TypeOutput.VectorSize : Utils.ArrayMaxSize; ValueGetter> getSrc = input.GetGetter>(Parent.ColMapNewToOld[InfoIndex]); ValueGetter> retVal = (ref VBuffer dst) => { getSrc(ref src); int srcSize = src.Length; - int srcCount = src.Count; - var srcValues = src.Values; - var dstValues = dst.Values; - var dstIndices = dst.Indices; - - int islotDst = 0; + var srcValues = src.GetValues(); + int srcCount = srcValues.Length; + var keyValues = _values.GetValues(); if (src.IsDense) { - Utils.EnsureSize(ref dstValues, srcSize, maxSize, keepOld: false); - + var editor = VBufferEditor.Create(ref dst, srcSize); for (int slot = 0; slot < srcSize; ++slot) { - MapKey(ref srcValues[slot], ref dstValues[slot]); + MapKey(in srcValues[slot], keyValues, ref editor.Values[slot]); // REVIEW: // The current implementation always maps dense to dense, even if the resulting columns could benefit from @@ -400,54 +400,54 @@ public override Delegate GetMappingGetter(IRow input) // defaults is hit. We assume that if the user was willing to densify the data into key values that they will // be fine with this output being dense. } - islotDst = srcSize; + dst = editor.Commit(); } else if (!_naMapsToDefault) { // Sparse input will always result in dense output unless the key metadata maps back to key types. // Currently this always maps sparse to dense, as long as the output type's NA does not equal its default value. - Utils.EnsureSize(ref dstValues, srcSize, maxSize, keepOld: false); + var editor = VBufferEditor.Create(ref dst, srcSize); - var srcIndices = src.Indices; - int nextExplicitSlot = src.Count == 0 ? srcSize : srcIndices[0]; + var srcIndices = src.GetIndices(); + int nextExplicitSlot = srcCount == 0 ? srcSize : srcIndices[0]; int islot = 0; for (int slot = 0; slot < srcSize; ++slot) { if (nextExplicitSlot == slot) { // Current slot has an explicitly defined value. - Parent.Host.Assert(islot < src.Count); - MapKey(ref srcValues[islot], ref dstValues[slot]); - nextExplicitSlot = ++islot == src.Count ? srcSize : srcIndices[islot]; + Parent.Host.Assert(islot < srcCount); + MapKey(in srcValues[islot], keyValues, ref editor.Values[slot]); + nextExplicitSlot = ++islot == srcCount ? srcSize : srcIndices[islot]; Parent.Host.Assert(slot < nextExplicitSlot); } else { Parent.Host.Assert(slot < nextExplicitSlot); - dstValues[slot] = _na; + editor.Values[slot] = _na; } } - islotDst = srcSize; + dst = editor.Commit(); } else { // As the default value equals the NA value for the output type, we produce sparse output. - Utils.EnsureSize(ref dstValues, srcCount, maxSize, keepOld: false); - Utils.EnsureSize(ref dstIndices, srcCount, maxSize, keepOld: false); - var srcIndices = src.Indices; + var editor = VBufferEditor.Create(ref dst, srcSize, srcCount); + var srcIndices = src.GetIndices(); + var islotDst = 0; for (int islotSrc = 0; islotSrc < srcCount; ++islotSrc) { // Current slot has an explicitly defined value. Parent.Host.Assert(islotSrc < srcCount); - MapKey(ref srcValues[islotSrc], ref dstItem); + MapKey(in srcValues[islotSrc], keyValues, ref dstItem); if (!_isDefault(in dstItem)) { - dstValues[islotDst] = dstItem; - dstIndices[islotDst++] = srcIndices[islotSrc]; + editor.Values[islotDst] = dstItem; + editor.Indices[islotDst++] = srcIndices[islotSrc]; } } + dst = editor.CommitTruncated(islotDst); } - dst = new VBuffer(srcSize, islotDst, dstValues, dstIndices); }; return retVal; } @@ -469,8 +469,9 @@ public override JToken SavePfa(BoundPfaContext ctx, JToken srcToken) if (TypeOutput.IsText) { jsonValues = new JArray(); - for (int i = 0; i < _values.Length; ++i) - jsonValues.Add(_values[i].ToString()); + var keyValues = _values.GetValues(); + for (int i = 0; i < keyValues.Length; ++i) + jsonValues.Add(keyValues[i].ToString()); } else jsonValues = new JArray(_values); @@ -495,15 +496,15 @@ public override JToken SavePfa(BoundPfaContext ctx, JToken srcToken) } } - public sealed class KeyToValueEstimator : TrivialEstimator + public sealed class KeyToValueMappingEstimator : TrivialEstimator { - public KeyToValueEstimator(IHostEnvironment env, string columnName) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToValueEstimator)), new KeyToValueTransform(env, columnName)) + public KeyToValueMappingEstimator(IHostEnvironment env, string columnName) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToValueMappingEstimator)), new KeyToValueMappingTransformer(env, columnName)) { } - public KeyToValueEstimator(IHostEnvironment env, params (string input, string output)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToValueEstimator)), new KeyToValueTransform(env, columns)) + public KeyToValueMappingEstimator(IHostEnvironment env, params (string input, string output)[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToValueMappingEstimator)), new KeyToValueMappingTransformer(env, columns)) { } @@ -604,7 +605,7 @@ public override IEstimator Reconcile(IHostEnvironment env, var outCol = (IColInput)toOutput[i]; cols[i] = (inputNames[outCol.Input], outputNames[toOutput[i]]); } - return new KeyToValueEstimator(env, cols); + return new KeyToValueMappingEstimator(env, cols); } } diff --git a/src/Microsoft.ML.Data/Transforms/KeyToVectorTransform.cs b/src/Microsoft.ML.Data/Transforms/KeyToVector.cs similarity index 91% rename from src/Microsoft.ML.Data/Transforms/KeyToVectorTransform.cs rename to src/Microsoft.ML.Data/Transforms/KeyToVector.cs index a076dc452b..55d0c4ca54 100644 --- a/src/Microsoft.ML.Data/Transforms/KeyToVectorTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/KeyToVector.cs @@ -19,21 +19,21 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(KeyToVectorTransform.Summary, typeof(IDataTransform), typeof(KeyToVectorTransform), typeof(KeyToVectorTransform.Arguments), typeof(SignatureDataTransform), - "Key To Vector Transform", KeyToVectorTransform.UserName, "KeyToVector", "ToVector", DocName = "transform/KeyToVectorTransform.md")] +[assembly: LoadableClass(KeyToVectorMappingTransformer.Summary, typeof(IDataTransform), typeof(KeyToVectorMappingTransformer), typeof(KeyToVectorMappingTransformer.Arguments), typeof(SignatureDataTransform), + "Key To Vector Transform", KeyToVectorMappingTransformer.UserName, "KeyToVector", "ToVector", DocName = "transform/KeyToVectorTransform.md")] -[assembly: LoadableClass(KeyToVectorTransform.Summary, typeof(IDataTransform), typeof(KeyToVectorTransform), null, typeof(SignatureLoadDataTransform), - "Key To Vector Transform", KeyToVectorTransform.LoaderSignature)] +[assembly: LoadableClass(KeyToVectorMappingTransformer.Summary, typeof(IDataTransform), typeof(KeyToVectorMappingTransformer), null, typeof(SignatureLoadDataTransform), + "Key To Vector Transform", KeyToVectorMappingTransformer.LoaderSignature)] -[assembly: LoadableClass(KeyToVectorTransform.Summary, typeof(KeyToVectorTransform), null, typeof(SignatureLoadModel), - KeyToVectorTransform.UserName, KeyToVectorTransform.LoaderSignature)] +[assembly: LoadableClass(KeyToVectorMappingTransformer.Summary, typeof(KeyToVectorMappingTransformer), null, typeof(SignatureLoadModel), + KeyToVectorMappingTransformer.UserName, KeyToVectorMappingTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(KeyToVectorTransform), null, typeof(SignatureLoadRowMapper), - KeyToVectorTransform.UserName, KeyToVectorTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(KeyToVectorMappingTransformer), null, typeof(SignatureLoadRowMapper), + KeyToVectorMappingTransformer.UserName, KeyToVectorMappingTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Conversions { - public sealed class KeyToVectorTransform : OneToOneTransformerBase + public sealed class KeyToVectorMappingTransformer : OneToOneTransformerBase { public abstract class ColumnBase : OneToOneColumn { @@ -127,7 +127,7 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].input, reason, type.ToString()); } - public KeyToVectorTransform(IHostEnvironment env, params ColumnInfo[] columns) : + public KeyToVectorMappingTransformer(IHostEnvironment env, params ColumnInfo[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), GetColumnPairs(columns)) { _columns = columns.ToArray(); @@ -146,7 +146,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(KeyToVectorTransform).Assembly.FullName); + loaderAssemblyName: typeof(KeyToVectorMappingTransformer).Assembly.FullName); } public override void Save(ModelSaveContext ctx) @@ -166,7 +166,7 @@ public override void Save(ModelSaveContext ctx) } // Factory method for SignatureLoadModel. - private static KeyToVectorTransform Create(IHostEnvironment env, ModelLoadContext ctx) + private static KeyToVectorMappingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(RegistrationName); @@ -178,10 +178,10 @@ private static KeyToVectorTransform Create(IHostEnvironment env, ModelLoadContex int cbFloat = ctx.Reader.ReadInt32(); env.CheckDecode(cbFloat == sizeof(float)); } - return new KeyToVectorTransform(host, ctx); + return new KeyToVectorMappingTransformer(host, ctx); } - private KeyToVectorTransform(IHost host, ModelLoadContext ctx) + private KeyToVectorMappingTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) { var columnsLength = ColumnPairs.Length; @@ -198,7 +198,7 @@ private KeyToVectorTransform(IHost host, ModelLoadContext ctx) } public static IDataTransform Create(IHostEnvironment env, IDataView input, params ColumnInfo[] columns) => - new KeyToVectorTransform(env, columns).MakeDataTransform(input); + new KeyToVectorMappingTransformer(env, columns).MakeDataTransform(input); // Factory method for SignatureDataTransform. private static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) @@ -217,7 +217,7 @@ private static IDataTransform Create(IHostEnvironment env, Arguments args, IData item.Name, item.Bag ?? args.Bag); }; - return new KeyToVectorTransform(env, cols).MakeDataTransform(input); + return new KeyToVectorMappingTransformer(env, cols).MakeDataTransform(input); } // Factory method for SignatureLoadDataTransform. @@ -230,7 +230,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : MapperBase, ISaveAsOnnx, ISaveAsPfa + private sealed class Mapper : OneToOneMapperBase, ISaveAsOnnx, ISaveAsPfa { private sealed class ColInfo { @@ -246,11 +246,11 @@ public ColInfo(string name, string source, ColumnType type) } } - private readonly KeyToVectorTransform _parent; + private readonly KeyToVectorMappingTransformer _parent; private readonly ColInfo[] _infos; private readonly VectorType[] _types; - public Mapper(KeyToVectorTransform parent, Schema inputSchema) + public Mapper(KeyToVectorMappingTransformer parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -280,7 +280,7 @@ private ColInfo[] CreateInfos(ISchema inputSchema) return infos; } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -388,9 +388,7 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) var keys = new ReadOnlyMemory[keyCount]; namesKeySrc.CopyTo(keys); - var values = dst.Values; - if (Utils.Size(values) < slotLim) - values = new ReadOnlyMemory[slotLim]; + var editor = VBufferEditor.Create(ref dst, slotLim); var sb = new StringBuilder(); int slot = 0; @@ -409,12 +407,12 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) { sb.Length = len; sb.AppendMemory(key); - values[slot++] = sb.ToString().AsMemory(); + editor.Values[slot++] = sb.ToString().AsMemory(); } } Host.Assert(slot == slotLim); - dst = new VBuffer>(slotLim, values, dst.Indices); + dst = editor.Commit(); } private void GetCategoricalSlotRanges(int iinfo, ref VBuffer dst) @@ -439,7 +437,7 @@ private void GetCategoricalSlotRanges(int iinfo, ref VBuffer dst) dst = new VBuffer(ranges.Length, ranges); } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _infos.Length); @@ -475,20 +473,15 @@ private ValueGetter> MakeGetterOne(IRow input, int iinfo) getSrc(ref src); if (src == 0 || src > size) { - dst = new VBuffer(size, 0, dst.Values, dst.Indices); + VBufferUtils.Resize(ref dst, size, 0); return; } - var values = dst.Values; - var indices = dst.Indices; - if (Utils.Size(values) < 1) - values = new float[1]; - if (Utils.Size(indices) < 1) - indices = new int[1]; - values[0] = 1; - indices[0] = (int)src - 1; + var editor = VBufferEditor.Create(ref dst, size, 1); + editor.Values[0] = 1; + editor.Indices[0] = (int)src - 1; - dst = new VBuffer(size, 1, values, indices); + dst = editor.Commit(); }; } @@ -523,8 +516,8 @@ private ValueGetter> MakeGetterBag(IRow input, int iinfo) Host.Check(cv == 0 || src.Length == cv); // The indices are irrelevant in the bagging case. - var values = src.Values; - int count = src.Count; + var values = src.GetValues(); + int count = values.Length; for (int slot = 0; slot < count; slot++) { uint key = values[slot] - 1; @@ -564,17 +557,11 @@ private ValueGetter> MakeGetterInd(IRow input, int iinfo) Host.Check(lenSrc == cv || cv == 0); // Since we generate values in order, no need for a builder. - var valuesDst = dst.Values; - var indicesDst = dst.Indices; - int lenDst = checked(size * lenSrc); - int cntSrc = src.Count; - if (Utils.Size(valuesDst) < cntSrc) - valuesDst = new float[cntSrc]; - if (Utils.Size(indicesDst) < cntSrc) - indicesDst = new int[cntSrc]; + var values = src.GetValues(); + int cntSrc = values.Length; + var editor = VBufferEditor.Create(ref dst, lenDst, cntSrc); - var values = src.Values; int count = 0; if (src.IsDense) { @@ -585,24 +572,24 @@ private ValueGetter> MakeGetterInd(IRow input, int iinfo) uint key = values[slot] - 1; if (key >= (uint)size) continue; - valuesDst[count] = 1; - indicesDst[count++] = slot * size + (int)key; + editor.Values[count] = 1; + editor.Indices[count++] = slot * size + (int)key; } } else { - var indices = src.Indices; + var indices = src.GetIndices(); for (int islot = 0; islot < cntSrc; islot++) { Host.Assert(count < cntSrc); uint key = values[islot] - 1; if (key >= (uint)size) continue; - valuesDst[count] = 1; - indicesDst[count++] = indices[islot] * size + (int)key; + editor.Values[count] = 1; + editor.Indices[count++] = indices[islot] * size + (int)key; } } - dst = new VBuffer(lenDst, count, valuesDst, indicesDst); + dst = editor.CommitTruncated(count); }; } @@ -733,24 +720,24 @@ private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColInfo info, string src } } - public sealed class KeyToVectorMappingEstimator : TrivialEstimator + public sealed class KeyToVectorMappingEstimator : TrivialEstimator { internal static class Defaults { public const bool Bag = false; } - public KeyToVectorMappingEstimator(IHostEnvironment env, params KeyToVectorTransform.ColumnInfo[] columns) - : this(env, new KeyToVectorTransform(env, columns)) + public KeyToVectorMappingEstimator(IHostEnvironment env, params KeyToVectorMappingTransformer.ColumnInfo[] columns) + : this(env, new KeyToVectorMappingTransformer(env, columns)) { } public KeyToVectorMappingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, bool bag = Defaults.Bag) - : this(env, new KeyToVectorTransform(env, new KeyToVectorTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn, bag))) + : this(env, new KeyToVectorMappingTransformer(env, new KeyToVectorMappingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn, bag))) { } - private KeyToVectorMappingEstimator(IHostEnvironment env, KeyToVectorTransform transformer) + private KeyToVectorMappingEstimator(IHostEnvironment env, KeyToVectorMappingTransformer transformer) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToVectorMappingEstimator)), transformer) { } @@ -885,11 +872,11 @@ public override IEstimator Reconcile(IHostEnvironment env, IReadOnlyDictionary outputNames, IReadOnlyCollection usedNames) { - var infos = new KeyToVectorTransform.ColumnInfo[toOutput.Length]; + var infos = new KeyToVectorMappingTransformer.ColumnInfo[toOutput.Length]; for (int i = 0; i < toOutput.Length; ++i) { var col = (IColInput)toOutput[i]; - infos[i] = new KeyToVectorTransform.ColumnInfo(inputNames[col.Input], outputNames[toOutput[i]], col.Bag); + infos[i] = new KeyToVectorMappingTransformer.ColumnInfo(inputNames[col.Input], outputNames[toOutput[i]], col.Bag); } return new KeyToVectorMappingEstimator(env, infos); } diff --git a/src/Microsoft.ML.Data/Transforms/LabelConvertTransform.cs b/src/Microsoft.ML.Data/Transforms/LabelConvertTransform.cs index 50bbe23a89..f63b97333b 100644 --- a/src/Microsoft.ML.Data/Transforms/LabelConvertTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/LabelConvertTransform.cs @@ -66,7 +66,7 @@ private static VersionInfo GetVersionInfo() private VectorType _slotType; /// - /// Convenience constructor for public facing API. + /// Initializes a new instance of . /// /// Host Environment. /// Input . This is the output from previous transform or loader. diff --git a/src/Microsoft.ML.Data/Transforms/LabelIndicatorTransform.cs b/src/Microsoft.ML.Data/Transforms/LabelIndicatorTransform.cs index 49af19d26a..3734245258 100644 --- a/src/Microsoft.ML.Data/Transforms/LabelIndicatorTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/LabelIndicatorTransform.cs @@ -113,7 +113,7 @@ private static string TestIsMulticlassLabel(ColumnType type) } /// - /// Convenience constructor for public facing API. + /// Initializes a new instance of . /// /// Host Environment. /// Input . This is the output from previous transform or loader. diff --git a/src/Microsoft.ML.Data/Transforms/NAFilter.cs b/src/Microsoft.ML.Data/Transforms/NAFilter.cs index cd49e30b78..280546f785 100644 --- a/src/Microsoft.ML.Data/Transforms/NAFilter.cs +++ b/src/Microsoft.ML.Data/Transforms/NAFilter.cs @@ -79,7 +79,7 @@ private static VersionInfo GetVersionInfo() private const string RegistrationName = "MissingValueFilter"; /// - /// Convenience constructor for public facing API. + /// Initializes a new instance of . /// /// Host Environment. /// Input . This is the output from previous transform or loader. diff --git a/src/Microsoft.ML.Data/Transforms/NopTransform.cs b/src/Microsoft.ML.Data/Transforms/NopTransform.cs index bf48e357f7..1ba9ed4c38 100644 --- a/src/Microsoft.ML.Data/Transforms/NopTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/NopTransform.cs @@ -103,9 +103,9 @@ public bool CanShuffle public Schema Schema => Source.Schema; - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { - return Source.GetRowCount(lazy); + return Source.GetRowCount(); } public IRowCursor GetRowCursor(Func predicate, IRandom rand = null) diff --git a/src/Microsoft.ML.Data/Transforms/NormalizeColumn.cs b/src/Microsoft.ML.Data/Transforms/NormalizeColumn.cs index fb001367c3..7c3bdd363c 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizeColumn.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizeColumn.cs @@ -263,33 +263,6 @@ public static IDataTransform CreateMinMaxNormalizer(IHostEnvironment env, IDataV return normalizer.Fit(input).MakeDataTransform(input); } - /// - /// Potentially apply a min-max normalizer to the data's feature column, keeping all existing role - /// mappings except for the feature role mapping. - /// - /// The host environment to use to potentially instantiate the transform - /// The role-mapped data that is potentially going to be modified by this method. - /// The trainer to query as to whether it wants normalization. If the - /// 's is true - /// True if the normalizer was applied and was modified - public static bool CreateIfNeeded(IHostEnvironment env, ref RoleMappedData data, ITrainer trainer) - { - Contracts.CheckValue(env, nameof(env)); - env.CheckValue(data, nameof(data)); - env.CheckValue(trainer, nameof(trainer)); - - // If the trainer does not need normalization, or if the features either don't exist - // or are not normalized, return false. - if (!trainer.Info.NeedNormalization || data.Schema.FeaturesAreNormalized() != false) - return false; - var featInfo = data.Schema.Feature; - env.AssertValue(featInfo); // Should be defined, if FeaturesAreNormalized returned a definite value. - - var view = CreateMinMaxNormalizer(env, data.Data, name: featInfo.Name); - data = new RoleMappedData(view, data.Schema.GetColumnRoleNames()); - return true; - } - /// /// Public create method corresponding to SignatureDataTransform. /// @@ -392,6 +365,8 @@ private AffineColumnFunction(IHost host) public abstract void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc); + public abstract NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams(); + public static AffineColumnFunction Create(ModelLoadContext ctx, IHost host, ColumnType typeSrc) { Contracts.CheckValue(host, nameof(host)); @@ -412,14 +387,10 @@ public static AffineColumnFunction Create(ModelLoadContext ctx, IHost host, Colu throw host.ExceptUserArg(nameof(AffineArgumentsBase.Column), "Wrong column type. Expected: R4, R8, Vec or Vec. Got: {0}.", typeSrc.ToString()); } - private abstract class ImplOne : AffineColumnFunction, NormalizerTransformer.IAffineData + private abstract class ImplOne : AffineColumnFunction { protected readonly TFloat Scale; protected readonly TFloat Offset; - - TFloat NormalizerTransformer.IAffineData.Scale => Scale; - TFloat NormalizerTransformer.IAffineData.Offset => Offset; - protected ImplOne(IHost host, TFloat scale, TFloat offset) : base(host) { @@ -435,18 +406,18 @@ public override void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType bldr.AddPrimitive("AffineScale", typeSrc, Scale); bldr.AddPrimitive("AffineOffset", typeSrc, Offset); } + + public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() + => new NormalizingTransformer.AffineNormalizerModelParameters(Scale, Offset); + } - private abstract class ImplVec : AffineColumnFunction, NormalizerTransformer.IAffineData> + private abstract class ImplVec : AffineColumnFunction { protected readonly TFloat[] Scale; protected readonly TFloat[] Offset; protected readonly int[] IndicesNonZeroOffset; - ImmutableArray NormalizerTransformer.IAffineData>.Scale => ImmutableArray.Create(Scale); - ImmutableArray NormalizerTransformer.IAffineData>.Offset - => Offset == null ? ImmutableArray.Create() : ImmutableArray.Create(Offset); - protected ImplVec(IHost host, TFloat[] scale, TFloat[] offset, int[] indicesNonZeroOffset) : base(host) { @@ -483,6 +454,9 @@ private void OffsetMetadataGetter(int col, ref VBuffer dst) var src = new VBuffer(Offset.Length, Offset); src.CopyTo(ref dst); } + + public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() + => new NormalizingTransformer.AffineNormalizerModelParameters> (ImmutableArray.Create(Scale), ImmutableArray.Create(Offset)); } } @@ -499,10 +473,7 @@ private CdfColumnFunction(IHost host) public abstract void Save(ModelSaveContext ctx); - public JToken PfaInfo(BoundPfaContext ctx, JToken srcToken) - { - return null; - } + public JToken PfaInfo(BoundPfaContext ctx, JToken srcToken) => null; public bool CanSaveOnnx(OnnxContext ctx) => false; @@ -510,6 +481,8 @@ public bool OnnxInfo(OnnxContext ctx, OnnxNode nodeProtoWrapper, int featureCoun => throw Host.ExceptNotSupp(); public abstract Delegate GetGetter(IRow input, int icol); + public abstract void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc); + public abstract NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams(); public static CdfColumnFunction Create(ModelLoadContext ctx, IHost host, ColumnType typeSrc) { @@ -531,9 +504,7 @@ public static CdfColumnFunction Create(ModelLoadContext ctx, IHost host, ColumnT throw host.ExceptUserArg(nameof(AffineArgumentsBase.Column), "Wrong column type. Expected: R4, R8, Vec or Vec. Got: {0}.", typeSrc); } - public abstract void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc); - - private abstract class ImplOne : CdfColumnFunction, NormalizerTransformer.ICdfData + private abstract class ImplOne : CdfColumnFunction { protected readonly TFloat Mean; protected readonly TFloat Stddev; @@ -547,10 +518,6 @@ protected ImplOne(IHost host, TFloat mean, TFloat stddev, bool useLog) UseLog = useLog; } - TFloat NormalizerTransformer.ICdfData.Mean => Mean; - TFloat NormalizerTransformer.ICdfData.Stddev => Stddev; - bool NormalizerTransformer.ICdfData.UseLog => UseLog; - public override void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc) { Host.CheckValue(bldr, nameof(bldr)); @@ -560,18 +527,17 @@ public override void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType bldr.AddPrimitive("CdfStdDev", typeSrc, Stddev); bldr.AddPrimitive("CdfUseLog", BoolType.Instance, UseLog); } + + public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() + => new NormalizingTransformer.CdfNormalizerModelParameters(Mean, Stddev, UseLog); } - private abstract class ImplVec : CdfColumnFunction, NormalizerTransformer.ICdfData> + private abstract class ImplVec : CdfColumnFunction { protected readonly TFloat[] Mean; protected readonly TFloat[] Stddev; protected readonly bool UseLog; - ImmutableArray NormalizerTransformer.ICdfData>.Mean => ImmutableArray.Create(Mean); - ImmutableArray NormalizerTransformer.ICdfData>.Stddev => ImmutableArray.Create(Stddev); - bool NormalizerTransformer.ICdfData>.UseLog => UseLog; - protected ImplVec(IHost host, TFloat[] mean, TFloat[] stddev, bool useLog) : base(host) { @@ -605,6 +571,9 @@ private void StddevMetadataGetter(int col, ref VBuffer dst) var src = new VBuffer(Stddev.Length, Stddev); src.CopyTo(ref dst); } + + public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() + => new NormalizingTransformer.CdfNormalizerModelParameters>(ImmutableArray.Create(Mean), ImmutableArray.Create(Stddev), UseLog); } public const string LoaderSignature = "CdfNormalizeFunction"; @@ -633,10 +602,7 @@ protected BinColumnFunction(IHost host) public abstract void Save(ModelSaveContext ctx); - public JToken PfaInfo(BoundPfaContext ctx, JToken srcToken) - { - return null; - } + public JToken PfaInfo(BoundPfaContext ctx, JToken srcToken) => null; public bool CanSaveOnnx(OnnxContext ctx) => false; @@ -650,6 +616,8 @@ public void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc) // REVIEW: How to attach information on the bins, to metadata? } + public abstract NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams(); + public static BinColumnFunction Create(ModelLoadContext ctx, IHost host, ColumnType typeSrc) { Contracts.CheckValue(host, nameof(host)); diff --git a/src/Microsoft.ML.Data/Transforms/NormalizeColumnDbl.cs b/src/Microsoft.ML.Data/Transforms/NormalizeColumnDbl.cs index 5f33651ba5..5792486012 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizeColumnDbl.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizeColumnDbl.cs @@ -594,6 +594,7 @@ public override Delegate GetGetter(IRow input, int icol) }; return del; } + } // REVIEW: Does it make sense to have 3 separate classes for the 3 cases in GetResult? @@ -1032,14 +1033,12 @@ public static IColumnFunction Create(IHost host, TFloat[][] binUpperBounds, bool private static class Dbl { - public sealed class ImplOne : BinColumnFunction, NormalizerTransformer.IBinData + public sealed class ImplOne : BinColumnFunction { private readonly TFloat[] _binUpperBounds; private readonly TFloat _den; private readonly TFloat _offset; - ImmutableArray NormalizerTransformer.IBinData.UpperBounds => ImmutableArray.Create(_binUpperBounds); - public ImplOne(IHost host, TFloat[] binUpperBounds, bool fixZero) : base(host) { @@ -1102,17 +1101,17 @@ private void GetResult(ref TFloat input, ref TFloat value) { value = BinUtils.GetValue(in input, _binUpperBounds, _den, _offset); } + + public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() + => new NormalizingTransformer.BinNormalizerModelParameters(ImmutableArray.Create(_binUpperBounds), _den,_offset); } - public sealed class ImplVec : BinColumnFunction, NormalizerTransformer.IBinData> + public sealed class ImplVec : BinColumnFunction { private readonly TFloat[][] _binUpperBounds; private readonly TFloat[] _den; private readonly TFloat[] _offset; - ImmutableArray> NormalizerTransformer.IBinData>.UpperBounds - => _binUpperBounds.Select(b => ImmutableArray.Create(b)).ToImmutableArray(); - public ImplVec(IHost host, TFloat[][] binUpperBounds, bool fixZero) : base(host) { @@ -1241,7 +1240,7 @@ private void GetResult(in VBuffer input, ref VBuffer value, Buff } else { - var indices = input.Indices; + var indices = input.GetIndices(); for (int ii = 0; ii < values.Length; ii++) { int i = indices[ii]; @@ -1252,6 +1251,11 @@ private void GetResult(in VBuffer input, ref VBuffer value, Buff bldr.GetResult(ref value); } + + public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() + => new NormalizingTransformer.BinNormalizerModelParameters>(_binUpperBounds.Select(b => ImmutableArray.Create(b)).ToImmutableArray(), + ImmutableArray.Create(_den), + ImmutableArray.Create(_offset)); } } } @@ -1410,7 +1414,7 @@ protected override bool ProcessValue(in TFloat val) { if (!base.ProcessValue(in val)) return false; - _buffer.Values[0] = val; + VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = val; Aggregator.ProcessValue(in _buffer); return true; } @@ -1554,7 +1558,7 @@ protected override bool ProcessValue(in TFloat origVal) { if (!base.ProcessValue(in origVal)) return false; - _buffer.Values[0] = origVal; + VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = origVal; _aggregator.ProcessValue(in _buffer); return true; } @@ -1886,7 +1890,7 @@ private SupervisedBinVecColumnFunctionBuilder(IHost host, long lim, bool fix, in protected override bool AcceptColumnValue(in VBuffer colValuesBuffer) { - return !colValuesBuffer.Values.Any(TFloat.IsNaN); + return !VBufferUtils.HasNaNs(in colValuesBuffer); } public override IColumnFunction CreateColumnFunction() diff --git a/src/Microsoft.ML.Data/Transforms/NormalizeColumnSng.cs b/src/Microsoft.ML.Data/Transforms/NormalizeColumnSng.cs index 7015814e70..54e6693f76 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizeColumnSng.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizeColumnSng.cs @@ -356,14 +356,14 @@ public void ProcessValue(in VBuffer value) var size = _min.Length; Contracts.Check(value.Length == size); _trainCount++; - var count = value.Count; + var values = value.GetValues(); + var count = values.Length; Contracts.Assert(0 <= count & count <= size); if (count == 0) return; if (count == size) { - var values = value.Values; for (int j = 0; j < count; j++) { var val = values[j]; @@ -373,8 +373,7 @@ public void ProcessValue(in VBuffer value) } else { - var indices = value.Indices; - var values = value.Values; + var indices = value.GetIndices(); for (int k = 0; k < count; k++) { var val = values[k]; @@ -459,14 +458,14 @@ public void ProcessValue(in VBuffer value) { _trainCount++; var size = _mean.Length; - var count = value.Count; + var values = value.GetValues(); + var count = values.Length; Contracts.Assert(0 <= count & count <= size); if (count == 0) return; if (count == size) { - var values = value.Values; for (int j = 0; j < count; j++) { var origVal = values[j]; @@ -475,8 +474,7 @@ public void ProcessValue(in VBuffer value) } else { - var indices = value.Indices; - var values = value.Values; + var indices = value.GetIndices(); for (int k = 0; k < count; k++) { var origVal = values[k]; @@ -706,7 +704,8 @@ private static void FillValues(in VBuffer input, BufferBuilder b { Contracts.Assert(input.Length == scale.Length); int size = scale.Length; - int count = input.Count; + var values = input.GetValues(); + int count = values.Length; Contracts.Assert(0 <= count & count <= size); // We always start with sparse, since we may make things sparser than the source. @@ -714,7 +713,6 @@ private static void FillValues(in VBuffer input, BufferBuilder b if (count == 0) return; - var values = input.Values; if (count >= size) { for (int i = 0; i < size; i++) @@ -723,7 +721,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b } // The input is sparse. - var indices = input.Indices; + var indices = input.GetIndices(); for (int ii = 0; ii < count; ii++) { int i = indices[ii]; @@ -737,7 +735,8 @@ private static void FillValues(in VBuffer input, BufferBuilder b { Contracts.Assert(input.Length == scale.Length); int size = scale.Length; - int count = input.Count; + var values = input.GetValues(); + int count = values.Length; Contracts.Assert(0 <= count & count <= size); // We always start with sparse, since we may make things sparser than the source. @@ -750,7 +749,6 @@ private static void FillValues(in VBuffer input, BufferBuilder b return; } - var values = input.Values; if (count >= size) { for (int i = 0; i < size; i++) @@ -759,7 +757,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b } // The input is sparse. - var indices = input.Indices; + var indices = input.GetIndices(); int ii = 0; int ivSrc = indices[ii]; Contracts.Assert(ivSrc < size); @@ -783,7 +781,8 @@ private static void FillValues(in VBuffer input, BufferBuilder b Contracts.Assert(input.Length == scale.Length); int size = scale.Length; - int count = input.Count; + var values = input.GetValues(); + int count = values.Length; Contracts.Assert(0 <= count & count <= size); // We always start with sparse, since we may make things sparser than the source. @@ -796,7 +795,6 @@ private static void FillValues(in VBuffer input, BufferBuilder b return; } - var values = input.Values; if (count >= size) { for (int i = 0; i < size; i++) @@ -805,7 +803,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b } // The input is sparse. - var indices = input.Indices; + var indices = input.GetIndices(); int ii = 0; int ivSrc = indices[ii]; int inz = 0; @@ -983,7 +981,8 @@ private static void FillValues(in VBuffer input, BufferBuilder b { Contracts.Assert(input.Length == mean.Length); int size = mean.Length; - int count = input.Count; + var values = input.GetValues(); + int count = values.Length; Contracts.Assert(0 <= count & count <= size); // We always start with sparse, since we may make things sparser than the source. @@ -992,7 +991,6 @@ private static void FillValues(in VBuffer input, BufferBuilder b if (count == 0) return; - var values = input.Values; if (count >= size) { for (int i = 0; i < size; i++) @@ -1009,7 +1007,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b } // The input is sparse. - var indices = input.Indices; + var indices = input.GetIndices(); for (int ii = 0; ii < indices.Length; ii++) { var ivDst = indices[ii]; @@ -1040,14 +1038,12 @@ public static IColumnFunction Create(IHost host, TFloat[][] binUpperBounds, bool private static class Sng { - public sealed class ImplOne : BinColumnFunction, NormalizerTransformer.IBinData + public sealed class ImplOne : BinColumnFunction { private readonly TFloat[] _binUpperBounds; private readonly TFloat _den; private readonly TFloat _offset; - ImmutableArray NormalizerTransformer.IBinData.UpperBounds => ImmutableArray.Create(_binUpperBounds); - public ImplOne(IHost host, TFloat[] binUpperBounds, bool fixZero) : base(host) { @@ -1101,26 +1097,26 @@ public override Delegate GetGetter(IRow input, int icol) (ref TFloat dst) => { getSrc(ref dst); - GetResult(ref dst, ref dst); + GetResult(dst, ref dst); }; return del; } - private void GetResult(ref TFloat input, ref TFloat value) + private void GetResult(TFloat input, ref TFloat value) { - value = BinUtils.GetValue(ref input, _binUpperBounds, _den, _offset); + value = BinUtils.GetValue(input, _binUpperBounds, _den, _offset); } + + public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() + => new NormalizingTransformer.BinNormalizerModelParameters(ImmutableArray.Create(_binUpperBounds), _den, _offset); } - public sealed class ImplVec : BinColumnFunction, NormalizerTransformer.IBinData> + public sealed class ImplVec : BinColumnFunction { private readonly TFloat[][] _binUpperBounds; private readonly TFloat[] _den; private readonly TFloat[] _offset; - ImmutableArray> NormalizerTransformer.IBinData>.UpperBounds - => _binUpperBounds.Select(b => ImmutableArray.Create(b)).ToImmutableArray(); - public ImplVec(IHost host, TFloat[][] binUpperBounds, bool fixZero) : base(host) { @@ -1197,7 +1193,8 @@ private void GetResult(in VBuffer input, ref VBuffer value, Buff { Contracts.Assert(input.Length == _binUpperBounds.Length); int size = _binUpperBounds.Length; - int count = input.Count; + var values = input.GetValues(); + int count = values.Length; Contracts.Assert(0 <= count & count <= size); // We always start with sparse, since we may make things sparser than the source. @@ -1208,18 +1205,17 @@ private void GetResult(in VBuffer input, ref VBuffer value, Buff return; } - var values = input.Values; if (count >= size) { if (_offset != null) { for (int i = 0; i < size; i++) - bldr.AddFeature(i, BinUtils.GetValue(ref values[i], _binUpperBounds[i], _den[i], _offset[i])); + bldr.AddFeature(i, BinUtils.GetValue(values[i], _binUpperBounds[i], _den[i], _offset[i])); } else { for (int i = 0; i < size; i++) - bldr.AddFeature(i, BinUtils.GetValue(ref values[i], _binUpperBounds[i], _den[i])); + bldr.AddFeature(i, BinUtils.GetValue(values[i], _binUpperBounds[i], _den[i])); } bldr.GetResult(ref value); return; @@ -1228,7 +1224,7 @@ private void GetResult(in VBuffer input, ref VBuffer value, Buff // The input is sparse. if (_offset != null) { - var indices = input.Indices; + var indices = input.GetIndices(); int ii = 0; int ivSrc = indices[ii]; Contracts.Assert(ivSrc < size); @@ -1239,29 +1235,35 @@ private void GetResult(in VBuffer input, ref VBuffer value, Buff if (ivDst == ivSrc) { bldr.AddFeature(ivDst, - BinUtils.GetValue(ref values[ii], _binUpperBounds[ivDst], _den[ivDst], _offset[ivDst])); + BinUtils.GetValue(values[ii], _binUpperBounds[ivDst], _den[ivDst], _offset[ivDst])); ivSrc = ++ii < count ? indices[ii] : size; Contracts.Assert(ii == count || ivSrc < size); } else bldr.AddFeature(ivDst, - BinUtils.GetValue(ref zero, _binUpperBounds[ivDst], _den[ivDst], _offset[ivDst])); + BinUtils.GetValue(zero, _binUpperBounds[ivDst], _den[ivDst], _offset[ivDst])); } } else { - var indices = input.Indices; + var indices = input.GetIndices(); for (int ii = 0; ii < count; ii++) { int i = indices[ii]; Contracts.Assert(0 <= i & i < size); - bldr.AddFeature(i, BinUtils.GetValue(ref values[ii], _binUpperBounds[i], _den[i])); + bldr.AddFeature(i, BinUtils.GetValue(values[ii], _binUpperBounds[i], _den[i])); } } bldr.GetResult(ref value); } - } + + public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() + => new NormalizingTransformer.BinNormalizerModelParameters>( + _binUpperBounds.Select(b => ImmutableArray.Create(b)).ToImmutableArray(), + ImmutableArray.Create(_den), + ImmutableArray.Create(_offset)); + } } } @@ -1376,7 +1378,7 @@ public static TFloat Cdf(TFloat input, TFloat mean, TFloat stddev) internal static partial class BinUtils { - public static TFloat GetValue(ref TFloat input, TFloat[] binUpperBounds, TFloat den, TFloat offset) + public static TFloat GetValue(TFloat input, TFloat[] binUpperBounds, TFloat den, TFloat offset) { if (TFloat.IsNaN(input)) return input; @@ -1387,7 +1389,7 @@ public static TFloat GetValue(ref TFloat input, TFloat[] binUpperBounds, TFloat return value; } - public static TFloat GetValue(ref TFloat input, TFloat[] binUpperBounds, TFloat den) + public static TFloat GetValue(TFloat input, TFloat[] binUpperBounds, TFloat den) { if (TFloat.IsNaN(input)) return input; @@ -1419,7 +1421,7 @@ protected override bool ProcessValue(in TFloat val) { if (!base.ProcessValue(in val)) return false; - _buffer.Values[0] = val; + VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = val; Aggregator.ProcessValue(in _buffer); return true; } @@ -1563,7 +1565,7 @@ protected override bool ProcessValue(in TFloat origVal) { if (!base.ProcessValue(in origVal)) return false; - _buffer.Values[0] = origVal; + VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = origVal; _aggregator.ProcessValue(in _buffer); return true; } @@ -1803,21 +1805,20 @@ protected override bool ProcessValue(in VBuffer buffer) int size = _values.Length; Host.Check(buffer.Length == size); - int count = buffer.Count; + var values = buffer.GetValues(); + int count = values.Length; Host.Assert(0 <= count & count <= size); if (count == 0) return true; if (count == size) { - var values = buffer.Values; for (int j = 0; j < count; j++) _values[j].Add(values[j]); } else { - var indices = buffer.Indices; - var values = buffer.Values; + var indices = buffer.GetIndices(); for (int k = 0; k < count; k++) { var val = values[k]; @@ -1897,7 +1898,7 @@ private SupervisedBinVecColumnFunctionBuilder(IHost host, long lim, bool fix, in protected override bool AcceptColumnValue(in VBuffer colValuesBuffer) { - return !colValuesBuffer.Values.Any(TFloat.IsNaN); + return !VBufferUtils.HasNaNs(in colValuesBuffer); } public override IColumnFunction CreateColumnFunction() diff --git a/src/Microsoft.ML.Data/Transforms/NormalizeUtils.cs b/src/Microsoft.ML.Data/Transforms/NormalizeUtils.cs index 8c01d69c74..5c06f78b53 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizeUtils.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizeUtils.cs @@ -63,6 +63,8 @@ internal interface IColumnFunction : ICanSaveModel bool CanSaveOnnx(OnnxContext ctx); bool OnnxInfo(OnnxContext ctx, OnnxNode nodeProtoWrapper, int featureCount); + + NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams(); } public static class NormalizeUtils diff --git a/src/Microsoft.ML.Data/Transforms/Normalizer.cs b/src/Microsoft.ML.Data/Transforms/Normalizer.cs index eee7c2bb29..bf570b06a7 100644 --- a/src/Microsoft.ML.Data/Transforms/Normalizer.cs +++ b/src/Microsoft.ML.Data/Transforms/Normalizer.cs @@ -16,15 +16,15 @@ using System.Collections.Immutable; using System.Linq; -[assembly: LoadableClass(typeof(NormalizerTransformer), null, typeof(SignatureLoadModel), - "", NormalizerTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(NormalizingTransformer), null, typeof(SignatureLoadModel), + "", NormalizingTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(NormalizerTransformer), null, typeof(SignatureLoadRowMapper), - "", NormalizerTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(NormalizingTransformer), null, typeof(SignatureLoadRowMapper), + "", NormalizingTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Normalizers { - public sealed class NormalizingEstimator : IEstimator + public sealed class NormalizingEstimator : IEstimator { internal static class Defaults { @@ -203,10 +203,10 @@ public NormalizingEstimator(IHostEnvironment env, params ColumnBase[] columns) _columns = columns.ToArray(); } - public NormalizerTransformer Fit(IDataView input) + public NormalizingTransformer Fit(IDataView input) { _host.CheckValue(input, nameof(input)); - return NormalizerTransformer.Train(_host, input, _columns); + return NormalizingTransformer.Train(_host, input, _columns); } public SchemaShape GetOutputSchema(SchemaShape inputSchema) @@ -237,7 +237,7 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) } } - public sealed partial class NormalizerTransformer : OneToOneTransformerBase + public sealed partial class NormalizingTransformer : OneToOneTransformerBase { public const string LoaderSignature = "Normalizer"; private static VersionInfo GetVersionInfo() @@ -248,22 +248,24 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(NormalizerTransformer).Assembly.FullName); + loaderAssemblyName: typeof(NormalizingTransformer).Assembly.FullName); } - private class ColumnInfo + public sealed class ColumnInfo { public readonly string Input; public readonly string Output; - public readonly ColumnType InputType; - public readonly IColumnFunction ColumnFunction; + public readonly NormalizerModelParametersBase ModelParameters; + internal readonly ColumnType InputType; + internal readonly IColumnFunction ColumnFunction; - public ColumnInfo(string input, string output, ColumnType inputType, IColumnFunction columnFunction) + internal ColumnInfo(string input, string output, ColumnType inputType, IColumnFunction columnFunction) { Input = input; Output = output; InputType = inputType; ColumnFunction = columnFunction; + ModelParameters = columnFunction.GetNormalizerModelParams(); } internal static ColumnType LoadType(ModelLoadContext ctx) @@ -305,9 +307,9 @@ internal static void SaveType(ModelSaveContext ctx, ColumnType type) private sealed class ColumnFunctionAccessor : IReadOnlyList { - private readonly ColumnInfo[] _infos; + private readonly ImmutableArray _infos; - public ColumnFunctionAccessor(ColumnInfo[] infos) + public ColumnFunctionAccessor(ImmutableArray infos) { _infos = infos; } @@ -318,21 +320,18 @@ public ColumnFunctionAccessor(ColumnInfo[] infos) IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); } - /// An accessor of the column functions within . + /// An accessor of the column functions within . internal readonly IReadOnlyList ColumnFunctions; - private readonly ColumnInfo[] _columns; - - public (string input, string output)[] Columns => ColumnPairs; - - private NormalizerTransformer(IHostEnvironment env, ColumnInfo[] columns) - : base(env.Register(nameof(NormalizerTransformer)), columns.Select(x => (x.Input, x.Output)).ToArray()) + public readonly ImmutableArray Columns; + private NormalizingTransformer(IHostEnvironment env, ColumnInfo[] columns) + : base(env.Register(nameof(NormalizingTransformer)), columns.Select(x => (x.Input, x.Output)).ToArray()) { - _columns = columns; - ColumnFunctions = new ColumnFunctionAccessor(_columns); + Columns = ImmutableArray.Create(columns); + ColumnFunctions = new ColumnFunctionAccessor(Columns); } - public static NormalizerTransformer Train(IHostEnvironment env, IDataView data, NormalizingEstimator.ColumnBase[] columns) + public static NormalizingTransformer Train(IHostEnvironment env, IDataView data, NormalizingEstimator.ColumnBase[] columns) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(data, nameof(data)); @@ -404,11 +403,11 @@ public static NormalizerTransformer Train(IHostEnvironment env, IDataView data, result[i] = new ColumnInfo(columns[i].Input, columns[i].Output, srcTypes[i], func); } - return new NormalizerTransformer(env, result); + return new NormalizingTransformer(env, result); } } - private NormalizerTransformer(IHost host, ModelLoadContext ctx) + private NormalizingTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) { // *** Binary format *** @@ -416,24 +415,25 @@ private NormalizerTransformer(IHost host, ModelLoadContext ctx) // for each added column: // - source type // - separate model for column function - - _columns = new ColumnInfo[ColumnPairs.Length]; - ColumnFunctions = new ColumnFunctionAccessor(_columns); + var cols = new ColumnInfo[ColumnPairs.Length]; + ColumnFunctions = new ColumnFunctionAccessor(Columns); for (int iinfo = 0; iinfo < ColumnPairs.Length; iinfo++) { var dir = string.Format("Normalizer_{0:000}", iinfo); var typeSrc = ColumnInfo.LoadType(ctx); ctx.LoadModel(Host, out var function, dir, Host, typeSrc); - _columns[iinfo] = new ColumnInfo(ColumnPairs[iinfo].input, ColumnPairs[iinfo].output, typeSrc, function); + cols[iinfo] = new ColumnInfo(ColumnPairs[iinfo].input, ColumnPairs[iinfo].output, typeSrc, function); } + + Columns = ImmutableArray.Create(cols); } - public static NormalizerTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + public static NormalizingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new NormalizerTransformer(env.Register(nameof(NormalizerTransformer)), ctx); + return new NormalizingTransformer(env.Register(nameof(NormalizingTransformer)), ctx); } // Factory method for SignatureLoadRowMapper. @@ -454,11 +454,11 @@ public override void Save(ModelSaveContext ctx) base.SaveColumns(ctx); // Individual normalization models. - for (int iinfo = 0; iinfo < _columns.Length; iinfo++) + for (int iinfo = 0; iinfo < Columns.Length; iinfo++) { - ColumnInfo.SaveType(ctx, _columns[iinfo].InputType); + ColumnInfo.SaveType(ctx, Columns[iinfo].InputType); var dir = string.Format("Normalizer_{0:000}", iinfo); - ctx.SaveSubModel(dir, _columns[iinfo].ColumnFunction.Save); + ctx.SaveSubModel(dir, Columns[iinfo].ColumnFunction.Save); } } @@ -479,30 +479,30 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : MapperBase, ISaveAsOnnx, ISaveAsPfa + private sealed class Mapper : OneToOneMapperBase, ISaveAsOnnx, ISaveAsPfa { - private NormalizerTransformer _parent; + private NormalizingTransformer _parent; public bool CanSaveOnnx(OnnxContext ctx) => true; public bool CanSavePfa => true; - public Mapper(NormalizerTransformer parent, Schema schema) + public Mapper(NormalizingTransformer parent, Schema schema) : base(parent.Host.Register(nameof(Mapper)), parent, schema) { _parent = parent; } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { - var result = new Schema.Column[_parent._columns.Length]; + var result = new Schema.Column[_parent.Columns.Length]; for (int i = 0; i < _parent.Columns.Length; i++) - result[i] = new Schema.Column(_parent._columns[i].Output, _parent._columns[i].InputType, MakeMetadata(i)); + result[i] = new Schema.Column(_parent.Columns[i].Output, _parent.Columns[i].InputType, MakeMetadata(i)); return result; } private Schema.Metadata MakeMetadata(int iinfo) { - var colInfo = _parent._columns[iinfo]; + var colInfo = _parent.Columns[iinfo]; var builder = new Schema.Metadata.Builder(); builder.Add(new Schema.Column(MetadataUtils.Kinds.IsNormalized, BoolType.Instance, null), (ValueGetter)IsNormalizedGetter); @@ -515,19 +515,19 @@ private void IsNormalizedGetter(ref bool dst) dst = true; } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { disposer = null; - return _parent._columns[iinfo].ColumnFunction.GetGetter(input, ColMapNewToOld[iinfo]); + return _parent.Columns[iinfo].ColumnFunction.GetGetter(input, ColMapNewToOld[iinfo]); } public void SaveAsOnnx(OnnxContext ctx) { Host.CheckValue(ctx, nameof(ctx)); - for (int iinfo = 0; iinfo < _parent._columns.Length; ++iinfo) + for (int iinfo = 0; iinfo < _parent.Columns.Length; ++iinfo) { - var info = _parent._columns[iinfo]; + var info = _parent.Columns[iinfo]; string sourceColumnName = info.Input; if (!ctx.ContainsColumn(sourceColumnName)) { @@ -550,9 +550,9 @@ public void SaveAsPfa(BoundPfaContext ctx) var toHide = new List(); var toDeclare = new List>(); - for (int iinfo = 0; iinfo < _parent._columns.Length; ++iinfo) + for (int iinfo = 0; iinfo < _parent.Columns.Length; ++iinfo) { - var info = _parent._columns[iinfo]; + var info = _parent.Columns[iinfo]; var srcName = info.Input; string srcToken = ctx.TokenOrNullForName(srcName); if (srcToken == null) @@ -575,8 +575,8 @@ public void SaveAsPfa(BoundPfaContext ctx) private JToken SaveAsPfaCore(BoundPfaContext ctx, int iinfo, ColumnInfo info, JToken srcToken) { Contracts.AssertValue(ctx); - Contracts.Assert(0 <= iinfo && iinfo < _parent._columns.Length); - Contracts.Assert(_parent._columns[iinfo] == info); + Contracts.Assert(0 <= iinfo && iinfo < _parent.Columns.Length); + Contracts.Assert(_parent.Columns[iinfo] == info); Contracts.AssertValue(srcToken); Contracts.Assert(CanSavePfa); return info.ColumnFunction.PfaInfo(ctx, srcToken); @@ -585,8 +585,8 @@ private JToken SaveAsPfaCore(BoundPfaContext ctx, int iinfo, ColumnInfo info, JT private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColumnInfo info, string srcVariableName, string dstVariableName) { Contracts.AssertValue(ctx); - Contracts.Assert(0 <= iinfo && iinfo < _parent._columns.Length); - Contracts.Assert(_parent._columns[iinfo] == info); + Contracts.Assert(0 <= iinfo && iinfo < _parent.Columns.Length); + Contracts.Assert(_parent.Columns[iinfo] == info); Contracts.Assert(CanSaveOnnx(ctx)); if (info.InputType.ValueCount == 0) @@ -605,61 +605,123 @@ private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColumnInfo info, string } /// - /// An interface implemented by items of corresponding to the - /// items. + /// Base class for all the NormalizerData classes: , + /// , . + /// + public abstract class NormalizerModelParametersBase + { + private protected NormalizerModelParametersBase() { } + } + + /// + /// The model parameters generated by affine normalization transformations. /// - internal interface IAffineData + /// + /// + /// + /// + /// + public sealed class AffineNormalizerModelParameters : NormalizerModelParametersBase { /// /// The scales. In the scalar case, this is a single value. In the vector case this is of length equal /// to the number of slots. Function is (input - offset) * scale. /// - TData Scale { get; } + public TData Scale { get; } /// /// The offsets. In the scalar case, this is a single value. In the vector case this is of length equal /// to the number of slots, or of length zero if all the offsets are zero. /// - TData Offset { get; } + public TData Offset { get; } + + /// + /// Initializes a new instance of + /// + internal AffineNormalizerModelParameters(TData scale, TData offset) + { + Scale = scale; + Offset = offset; + } } /// - /// An interface implemented by items of corresponding to the - /// items. The function is the value of the - /// cumulative density function of the normal distribution parameterized with mean - /// and standard deviation . + /// The model parameters generated by cumulative distribution normalization transformations. + /// The cumulative density function is parameterized by and + /// the as observed during fitting. /// - internal interface ICdfData + /// + /// + /// + /// + /// + public sealed class CdfNormalizerModelParameters : NormalizerModelParametersBase { /// /// The mean(s). In the scalar case, this is a single value. In the vector case this is of length equal /// to the number of slots. /// - TData Mean { get; } + public TData Mean { get; } /// /// The standard deviation(s). In the scalar case, this is a single value. In the vector case this is of /// length equal to the number of slots. /// - TData Stddev { get; } + public TData Stddev { get; } /// /// Whether the we ought to apply a logarithm to the input first. /// - bool UseLog { get; } + public bool UseLog { get; } + + /// + /// Initializes a new instance of + /// + internal CdfNormalizerModelParameters(TData mean, TData stddev, bool useLog) + { + Mean = mean; + Stddev = stddev; + UseLog = useLog; + } } /// - /// An interface implemented by items of corresponding to the - /// items. - /// - internal interface IBinData + /// The model parameters generated by buckettizing the data into bins with monotonically + /// increasing . + /// The value is constant from bin to bin, for most cases. + /// /// + public sealed class BinNormalizerModelParameters : NormalizerModelParametersBase { /// /// The standard deviation(s). In the scalar case, these are the bin upper bounds for that single value. /// In the vector case it is a jagged array of the bin upper bounds for all slots. /// - ImmutableArray UpperBounds { get; } + public ImmutableArray UpperBounds { get; } + + /// + /// The frequency of the datapoints per each bin. + /// + public TData Density { get; } + + /// + /// If normalization is performed with set to true, + /// the offset indicates the displacement of zero, if any. + /// + public TData Offset { get; } + + /// + /// Initializes a new instance of + /// + internal BinNormalizerModelParameters(ImmutableArray upperBounds, TData density, TData offset) + { + UpperBounds = upperBounds; + Density = density; + Offset = offset; + } } } } \ No newline at end of file diff --git a/src/Microsoft.ML.Data/Transforms/NormalizerCatalog.cs b/src/Microsoft.ML.Data/Transforms/NormalizerCatalog.cs index f02c9136c4..df9c435def 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizerCatalog.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizerCatalog.cs @@ -23,14 +23,7 @@ public static class NormalizerCatalog /// /// /// - /// - /// - /// - /// - /// /// /// @@ -49,14 +42,7 @@ public static NormalizingEstimator Normalize(this TransformsCatalog catalog, /// /// /// - /// - /// - /// - /// - /// /// /// diff --git a/src/Microsoft.ML.Data/Transforms/NormalizerStaticExtensions.cs b/src/Microsoft.ML.Data/Transforms/NormalizerStaticExtensions.cs index 67b42c8c40..1493ba78f3 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizerStaticExtensions.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizerStaticExtensions.cs @@ -3,15 +3,16 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Core.Data; +using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Internal.Utilities; -using Microsoft.ML.StaticPipe; using Microsoft.ML.StaticPipe.Runtime; using Microsoft.ML.Transforms.Normalizers; using System; using System.Collections.Generic; using System.Collections.Immutable; -namespace Microsoft.ML.Runtime.Data +namespace Microsoft.ML.StaticPipe { /// /// Extension methods for static pipelines for normalization of data. @@ -310,7 +311,7 @@ private static Action AffineMapper(OnFitAffine on return null; return col => { - var aCol = (NormalizerTransformer.IAffineData)col; + var aCol = (NormalizingTransformer.AffineNormalizerModelParameters)col?.GetNormalizerModelParams(); onFit(aCol.Scale, aCol.Offset); }; } @@ -322,7 +323,7 @@ private static Action CdfMapper(OnFitCumulativeDistribut return null; return col => { - var aCol = (NormalizerTransformer.ICdfData)col; + var aCol = (NormalizingTransformer.CdfNormalizerModelParameters)col?.GetNormalizerModelParams(); onFit(aCol.Mean, aCol.Stddev); }; } @@ -334,7 +335,7 @@ private static Action BinMapper(OnFitBinned onFit return null; return col => { - var aCol = (NormalizerTransformer.IBinData)col; + var aCol = (NormalizingTransformer.BinNormalizerModelParameters)col?.GetNormalizerModelParams(); onFit(aCol.UpperBounds); }; } diff --git a/src/Microsoft.ML.Data/Transforms/OneToOneTransformerBase.cs b/src/Microsoft.ML.Data/Transforms/OneToOneTransformerBase.cs index d33b5d6b6c..8c7dc59095 100644 --- a/src/Microsoft.ML.Data/Transforms/OneToOneTransformerBase.cs +++ b/src/Microsoft.ML.Data/Transforms/OneToOneTransformerBase.cs @@ -2,24 +2,23 @@ // 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.Model; using System; using System.Collections.Generic; using System.Linq; -using Microsoft.ML.Core.Data; -using Microsoft.ML.Runtime.Model; namespace Microsoft.ML.Runtime.Data { - public abstract class OneToOneTransformerBase : ITransformer, ICanSaveModel + /// + /// Base class for transformer which operates on pairs input and output columns. + /// + public abstract class OneToOneTransformerBase : RowToRowTransformerBase { - protected readonly IHost Host; protected readonly (string input, string output)[] ColumnPairs; - protected OneToOneTransformerBase(IHost host, (string input, string output)[] columns) + protected OneToOneTransformerBase(IHost host, (string input, string output)[] columns) : base(host) { - Contracts.AssertValue(host); host.CheckValue(columns, nameof(columns)); - var newNames = new HashSet(); foreach (var column in columns) { @@ -30,13 +29,11 @@ protected OneToOneTransformerBase(IHost host, (string input, string output)[] co throw Contracts.ExceptParam(nameof(columns), $"Output column '{column.output}' specified multiple times"); } - Host = host; ColumnPairs = columns; } - protected OneToOneTransformerBase(IHost host, ModelLoadContext ctx) + protected OneToOneTransformerBase(IHost host, ModelLoadContext ctx) : base(host) { - Host = host; // *** Binary format *** // int: number of added columns // for each added column @@ -53,8 +50,6 @@ protected OneToOneTransformerBase(IHost host, ModelLoadContext ctx) } } - public abstract void Save(ModelSaveContext ctx); - protected void SaveColumns(ModelSaveContext ctx) { Host.CheckValue(ctx, nameof(ctx)); @@ -88,46 +83,14 @@ protected virtual void CheckInputColumn(ISchema inputSchema, int col, int srcCol // By default, there are no extra checks. } - public bool IsRowToRowMapper => true; - - public IRowToRowMapper GetRowToRowMapper(Schema inputSchema) - { - Host.CheckValue(inputSchema, nameof(inputSchema)); - var simplerMapper = MakeRowMapper(inputSchema); - return new RowToRowMapperTransform(Host, new EmptyDataView(Host, inputSchema), simplerMapper, MakeRowMapper); - } - - protected abstract IRowMapper MakeRowMapper(Schema schema); - - public Schema GetOutputSchema(Schema inputSchema) - { - Host.CheckValue(inputSchema, nameof(inputSchema)); - var mapper = MakeRowMapper(inputSchema); - return RowToRowMapperTransform.GetOutputSchema(inputSchema, mapper); - } - - public IDataView Transform(IDataView input) => MakeDataTransform(input); - - protected RowToRowMapperTransform MakeDataTransform(IDataView input) - { - Host.CheckValue(input, nameof(input)); - return new RowToRowMapperTransform(Host, input, MakeRowMapper(input.Schema), MakeRowMapper); - } - - protected abstract class MapperBase : IRowMapper + protected abstract class OneToOneMapperBase : MapperBase { - protected readonly IHost Host; protected readonly Dictionary ColMapNewToOld; - protected readonly Schema InputSchema; private readonly OneToOneTransformerBase _parent; - protected MapperBase(IHost host, OneToOneTransformerBase parent, Schema inputSchema) + protected OneToOneMapperBase(IHost host, OneToOneTransformerBase parent, Schema inputSchema) : base(host, inputSchema) { - Contracts.AssertValue(host); Contracts.AssertValue(parent); - Contracts.AssertValue(inputSchema); - - Host = host; _parent = parent; ColMapNewToOld = new Dictionary(); @@ -136,9 +99,9 @@ protected MapperBase(IHost host, OneToOneTransformerBase parent, Schema inputSch _parent.CheckInput(inputSchema, i, out int srcCol); ColMapNewToOld.Add(i, srcCol); } - InputSchema = inputSchema; } - public Func GetDependencies(Func activeOutput) + + public override Func GetDependencies(Func activeOutput) { var active = new bool[InputSchema.ColumnCount]; foreach (var pair in ColMapNewToOld) @@ -147,41 +110,7 @@ public Func GetDependencies(Func activeOutput) return col => active[col]; } - public abstract Schema.Column[] GetOutputColumns(); - - public void Save(ModelSaveContext ctx) => _parent.Save(ctx); - - public Delegate[] CreateGetters(IRow input, Func activeOutput, out Action disposer) - { - // REVIEW: it used to be that the mapper's input schema in the constructor was required to be reference-equal to the schema - // of the input row. - // It still has to be the same schema, but because we may make a transition from lazy to eager schema, the reference-equality - // is no longer always possible. So, we relax the assert as below. - if (input.Schema is Schema s) - Contracts.Assert(s == InputSchema); - var result = new Delegate[_parent.ColumnPairs.Length]; - var disposers = new Action[_parent.ColumnPairs.Length]; - for (int i = 0; i < _parent.ColumnPairs.Length; i++) - { - if (!activeOutput(i)) - continue; - int srcCol = ColMapNewToOld[i]; - result[i] = MakeGetter(input, i, out disposers[i]); - } - if (disposers.Any(x => x != null)) - { - disposer = () => - { - foreach (var act in disposers) - act(); - }; - } - else - disposer = null; - return result; - } - - protected abstract Delegate MakeGetter(IRow input, int iinfo, out Action disposer); + public override void Save(ModelSaveContext ctx) => _parent.Save(ctx); } } } diff --git a/src/Microsoft.ML.Data/Transforms/PerGroupTransformBase.cs b/src/Microsoft.ML.Data/Transforms/PerGroupTransformBase.cs index 5d870f898a..1276ab8e22 100644 --- a/src/Microsoft.ML.Data/Transforms/PerGroupTransformBase.cs +++ b/src/Microsoft.ML.Data/Transforms/PerGroupTransformBase.cs @@ -144,9 +144,9 @@ public virtual void Save(ModelSaveContext ctx) protected abstract BindingsBase GetBindings(); - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { - return Source.GetRowCount(lazy); + return Source.GetRowCount(); } public IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolidator, Func predicate, int n, IRandom rand = null) diff --git a/src/Microsoft.ML.Data/Transforms/RangeFilter.cs b/src/Microsoft.ML.Data/Transforms/RangeFilter.cs index 66cd67b06b..59542b13aa 100644 --- a/src/Microsoft.ML.Data/Transforms/RangeFilter.cs +++ b/src/Microsoft.ML.Data/Transforms/RangeFilter.cs @@ -78,15 +78,16 @@ private static VersionInfo GetVersionInfo() private readonly bool _includeMax; /// - /// Convenience constructor for public facing API. + /// Initializes a new instance of . /// /// Host Environment. /// Input . This is the output from previous transform or loader. /// Name of the input column. - /// Minimum value (0 to 1 for key types). - /// Maximum value (0 to 1 for key types). - public RangeFilter(IHostEnvironment env, IDataView input, string column, Double? minimum = null, Double? maximum = null) - : this(env, new Arguments() { Column = column, Min = minimum, Max = maximum }, input) + /// Minimum value (0 to 1 for key types). + /// Maximum value (0 to 1 for key types). + /// Whether to include the upper bound. + public RangeFilter(IHostEnvironment env, IDataView input, string column, Double lowerBound, Double upperBound, bool includeUpperBound) + : this(env, new Arguments() { Column = column, Min = lowerBound, Max = upperBound, IncludeMax = includeUpperBound }, input) { } diff --git a/src/Microsoft.ML.Data/Transforms/ShuffleTransform.cs b/src/Microsoft.ML.Data/Transforms/RowShufflingTransformer.cs similarity index 96% rename from src/Microsoft.ML.Data/Transforms/ShuffleTransform.cs rename to src/Microsoft.ML.Data/Transforms/RowShufflingTransformer.cs index e3ecc922cf..909e289de4 100644 --- a/src/Microsoft.ML.Data/Transforms/ShuffleTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/RowShufflingTransformer.cs @@ -16,22 +16,22 @@ using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; -[assembly: LoadableClass(ShuffleTransform.Summary, typeof(ShuffleTransform), typeof(ShuffleTransform.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(RowShufflingTransformer.Summary, typeof(RowShufflingTransformer), typeof(RowShufflingTransformer.Arguments), typeof(SignatureDataTransform), "Shuffle Transform", "ShuffleTransform", "Shuffle", "shuf")] -[assembly: LoadableClass(ShuffleTransform.Summary, typeof(ShuffleTransform), null, typeof(SignatureLoadDataTransform), - "Shuffle Transform", ShuffleTransform.LoaderSignature)] +[assembly: LoadableClass(RowShufflingTransformer.Summary, typeof(RowShufflingTransformer), null, typeof(SignatureLoadDataTransform), + "Shuffle Transform", RowShufflingTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms { /// - /// This is a transform that, given any input dataview (even an unshufflable one) will, + /// This is a transformer that, given any input dataview (even an unshufflable one) will, /// when we construct a randomized cursor attempt to perform a rude version of shuffling /// using a pool. A pool of a given number of rows will be constructed from the first /// rows in the input cursor, and then, successively, the output cursor will yield one /// of these rows and replace it with another row from the input. /// - public sealed class ShuffleTransform : RowToRowTransformBase + public sealed class RowShufflingTransformer : RowToRowTransformBase { private static class Defaults { @@ -72,7 +72,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010002, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(ShuffleTransform).Assembly.FullName); + loaderAssemblyName: typeof(RowShufflingTransformer).Assembly.FullName); } private const string RegistrationName = "Shuffle"; @@ -88,14 +88,14 @@ private static VersionInfo GetVersionInfo() private readonly IDataView _subsetInput; /// - /// Convenience constructor for public facing API. + /// Initializes a new instance of . /// /// Host Environment. /// Input . This is the output from previous transform or loader. /// The pool will have this many rows /// If true, the transform will not attempt to shuffle the input cursor but only shuffle based on the pool. This parameter has no effect if the input data was not itself shufflable. /// If true, the transform will always provide a shuffled view. - public ShuffleTransform(IHostEnvironment env, + public RowShufflingTransformer(IHostEnvironment env, IDataView input, int poolRows = Defaults.PoolRows, bool poolOnly = Defaults.PoolOnly, @@ -107,7 +107,7 @@ public ShuffleTransform(IHostEnvironment env, /// /// Public constructor corresponding to SignatureDataTransform. /// - public ShuffleTransform(IHostEnvironment env, Arguments args, IDataView input) + public RowShufflingTransformer(IHostEnvironment env, Arguments args, IDataView input) : base(env, RegistrationName, input) { Host.CheckValue(args, nameof(args)); @@ -126,7 +126,7 @@ public ShuffleTransform(IHostEnvironment env, Arguments args, IDataView input) _subsetInput = SelectCachableColumns(input, env); } - private ShuffleTransform(IHost host, ModelLoadContext ctx, IDataView input) + private RowShufflingTransformer(IHost host, ModelLoadContext ctx, IDataView input) : base(host, input) { Host.AssertValue(ctx); @@ -149,14 +149,14 @@ private ShuffleTransform(IHost host, ModelLoadContext ctx, IDataView input) _subsetInput = SelectCachableColumns(input, host); } - public static ShuffleTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + public static RowShufflingTransformer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { Contracts.CheckValue(env, nameof(env)); var h = env.Register(RegistrationName); h.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); h.CheckValue(input, nameof(input)); - return h.Apply("Loading Model", ch => new ShuffleTransform(h, ctx, input)); + return h.Apply("Loading Model", ch => new RowShufflingTransformer(h, ctx, input)); } public override void Save(ModelSaveContext ctx) diff --git a/src/Microsoft.ML.Data/Transforms/RowToRowTransformerBase.cs b/src/Microsoft.ML.Data/Transforms/RowToRowTransformerBase.cs new file mode 100644 index 0000000000..31005ea5bd --- /dev/null +++ b/src/Microsoft.ML.Data/Transforms/RowToRowTransformerBase.cs @@ -0,0 +1,114 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Core.Data; +using Microsoft.ML.Runtime.Model; +using System; +using System.Linq; + +namespace Microsoft.ML.Runtime.Data +{ + /// + /// Base class for transformer which produce new columns, but doesn't affect existing ones. + /// + public abstract class RowToRowTransformerBase : ITransformer, ICanSaveModel + { + protected readonly IHost Host; + + protected RowToRowTransformerBase(IHost host) + { + Contracts.AssertValue(host); + Host = host; + } + + public abstract void Save(ModelSaveContext ctx); + + public bool IsRowToRowMapper => true; + + public IRowToRowMapper GetRowToRowMapper(Schema inputSchema) + { + Host.CheckValue(inputSchema, nameof(inputSchema)); + return new RowToRowMapperTransform(Host, new EmptyDataView(Host, inputSchema), MakeRowMapper(inputSchema), MakeRowMapper); + } + + protected abstract IRowMapper MakeRowMapper(Schema schema); + + public Schema GetOutputSchema(Schema inputSchema) + { + Host.CheckValue(inputSchema, nameof(inputSchema)); + var mapper = MakeRowMapper(inputSchema); + return RowToRowMapperTransform.GetOutputSchema(inputSchema, mapper); + } + + public IDataView Transform(IDataView input) => MakeDataTransform(input); + + protected RowToRowMapperTransform MakeDataTransform(IDataView input) + { + Host.CheckValue(input, nameof(input)); + return new RowToRowMapperTransform(Host, input, MakeRowMapper(input.Schema), MakeRowMapper); + } + + protected abstract class MapperBase : IRowMapper + { + protected readonly IHost Host; + protected readonly Schema InputSchema; + private Schema.Column[] _outputColumns; + + protected MapperBase(IHost host, Schema inputSchema) + { + Contracts.CheckValue(host, nameof(host)); + Contracts.CheckValue(inputSchema, nameof(inputSchema)); + Host = host; + InputSchema = inputSchema; + _outputColumns = null; + } + + protected abstract Schema.Column[] GetOutputColumnsCore(); + + public Schema.Column[] GetOutputColumns() + { + if (_outputColumns == null) + _outputColumns = GetOutputColumnsCore(); + return _outputColumns; + } + + public Delegate[] CreateGetters(IRow input, Func activeOutput, out Action disposer) + { + // make sure _outputColumns populated. + GetOutputColumns(); + // REVIEW: it used to be that the mapper's input schema in the constructor was required to be reference-equal to the schema + // of the input row. + // It still has to be the same schema, but because we may make a transition from lazy to eager schema, the reference-equality + // is no longer always possible. So, we relax the assert as below. + if (input.Schema is Schema s) + Contracts.Assert(s == InputSchema); + var result = new Delegate[_outputColumns.Length]; + var disposers = new Action[_outputColumns.Length]; + for (int i = 0; i < _outputColumns.Length; i++) + { + if (!activeOutput(i)) + continue; + result[i] = MakeGetter(input, i, activeOutput, out disposers[i]); + } + if (disposers.Any(x => x != null)) + { + disposer = () => + { + foreach (var act in disposers) + act(); + }; + } + else + disposer = null; + return result; + } + + protected abstract Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer); + + public abstract Func GetDependencies(Func activeOutput); + + public abstract void Save(ModelSaveContext ctx); + } + } +} diff --git a/src/Microsoft.ML.Data/Transforms/SkipTakeFilter.cs b/src/Microsoft.ML.Data/Transforms/SkipTakeFilter.cs index 69f184607d..353cf2ed47 100644 --- a/src/Microsoft.ML.Data/Transforms/SkipTakeFilter.cs +++ b/src/Microsoft.ML.Data/Transforms/SkipTakeFilter.cs @@ -169,11 +169,11 @@ public override void Save(ModelSaveContext ctx) /// Returns the computed count of rows remaining after skip and take operation. /// Returns null if count is unknown. /// - public override long? GetRowCount(bool lazy = true) + public override long? GetRowCount() { if (_take == 0) return 0; - long? count = Source.GetRowCount(lazy); + long? count = Source.GetRowCount(); if (count == null) return null; diff --git a/src/Microsoft.ML.Data/Transforms/TrainAndScoreTransform.cs b/src/Microsoft.ML.Data/Transforms/TrainAndScoreTransformer.cs similarity index 90% rename from src/Microsoft.ML.Data/Transforms/TrainAndScoreTransform.cs rename to src/Microsoft.ML.Data/Transforms/TrainAndScoreTransformer.cs index 84cd605bd8..e8ec5f4e53 100644 --- a/src/Microsoft.ML.Data/Transforms/TrainAndScoreTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/TrainAndScoreTransformer.cs @@ -9,17 +9,18 @@ using Microsoft.ML.Runtime.Internal.Calibration; using Microsoft.ML.Runtime.Model; using Microsoft.ML.Transforms; +using System; using System.Collections.Generic; -[assembly: LoadableClass(ScoreTransform.Summary, typeof(IDataTransform), typeof(ScoreTransform), typeof(ScoreTransform.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(ScoringTransformer.Summary, typeof(IDataTransform), typeof(ScoringTransformer), typeof(ScoringTransformer.Arguments), typeof(SignatureDataTransform), "Score Predictor", "Score")] -[assembly: LoadableClass(TrainAndScoreTransform.Summary, typeof(IDataTransform), typeof(TrainAndScoreTransform), - typeof(TrainAndScoreTransform.Arguments), typeof(SignatureDataTransform), "Train and Score Predictor", "TrainScore")] +[assembly: LoadableClass(TrainAndScoreTransformer.Summary, typeof(IDataTransform), typeof(TrainAndScoreTransformer), + typeof(TrainAndScoreTransformer.Arguments), typeof(SignatureDataTransform), "Train and Score Predictor", "TrainScore")] namespace Microsoft.ML.Transforms { - public static class ScoreTransform + public static class ScoringTransformer { public sealed class Arguments : TransformInputBase { @@ -48,8 +49,8 @@ public sealed class Arguments : TransformInputBase internal const string Summary = "Runs a previously trained predictor on the data."; /// - /// Convenience method for creating . - /// The allows for model stacking (i.e. to combine information from multiple predictive models to generate a new model) + /// Convenience method for creating . + /// The allows for model stacking (i.e. to combine information from multiple predictive models to generate a new model) /// in the pipeline by using the scores from an already trained model. /// /// Host Environment. @@ -98,7 +99,11 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV } } - public static class TrainAndScoreTransform + // Essentially, all trainer estimators when fitted return a transformer that produces scores -- which is to say, all machine + // learning algorithms actually behave more or less as this transform used to, so its presence is no longer necessary or helpful, + // from an API perspective, but this is still how things are invoked from the command line for now. + [BestFriend] + internal static class TrainAndScoreTransformer { public abstract class ArgumentsBase : TransformInputBase { @@ -156,11 +161,11 @@ public sealed class Arguments : ArgumentsBase internal const string Summary = "Trains a predictor, or loads it from a file, and runs it on the data."; /// - /// Convenience method for creating . - /// The allows for model stacking (i.e. to combine information from multiple predictive models to generate a new model) + /// Convenience method for creating . + /// The allows for model stacking (i.e. to combine information from multiple predictive models to generate a new model) /// in the pipeline by training a model first and then using the scores from the trained model. /// - /// Unlike , the trains the model on the fly as name indicates. + /// Unlike , the trains the model on the fly as name indicates. /// /// Host Environment. /// Input . diff --git a/src/Microsoft.ML.Data/Transforms/TransformBase.cs b/src/Microsoft.ML.Data/Transforms/TransformBase.cs index ca74ec9838..102dfa6998 100644 --- a/src/Microsoft.ML.Data/Transforms/TransformBase.cs +++ b/src/Microsoft.ML.Data/Transforms/TransformBase.cs @@ -44,7 +44,7 @@ protected TransformBase(IHost host, IDataView input) public abstract void Save(ModelSaveContext ctx); - public abstract long? GetRowCount(bool lazy = true); + public abstract long? GetRowCount(); public virtual bool CanShuffle { get { return Source.CanShuffle; } } @@ -104,7 +104,7 @@ protected RowToRowTransformBase(IHost host, IDataView input) { } - public sealed override long? GetRowCount(bool lazy = true) { return Source.GetRowCount(lazy); } + public sealed override long? GetRowCount() { return Source.GetRowCount(); } } /// @@ -112,23 +112,25 @@ protected RowToRowTransformBase(IHost host, IDataView input) /// public abstract class FilterBase : TransformBase, ITransformCanSavePfa { - protected FilterBase(IHostEnvironment env, string name, IDataView input) + [BestFriend] + private protected FilterBase(IHostEnvironment env, string name, IDataView input) : base(env, name, input) { } - protected FilterBase(IHost host, IDataView input) + [BestFriend] + private protected FilterBase(IHost host, IDataView input) : base(host, input) { } - public override long? GetRowCount(bool lazy = true) { return null; } + public override long? GetRowCount() => null; - public sealed override Schema Schema { get { return Source.Schema; } } + public sealed override Schema Schema => Source.Schema; - public virtual bool CanSavePfa => true; + bool ICanSavePfa.CanSavePfa => true; - public virtual void SaveAsPfa(BoundPfaContext ctx) + void ISaveAsPfa.SaveAsPfa(BoundPfaContext ctx) { Host.CheckValue(ctx, nameof(ctx)); // Because filters do not modify the schema, this is a no-op. @@ -468,11 +470,16 @@ private sealed class ColumnTmp : OneToOneColumn // The InputTranspose transpose schema, null iff InputTranspose is null. protected ITransposeSchema InputTransposeSchema => InputTranspose?.TransposeSchema; - public virtual bool CanSavePfa => false; + bool ICanSavePfa.CanSavePfa => CanSavePfaCore; - public virtual bool CanSaveOnnx(OnnxContext ctx) => false; + private protected virtual bool CanSavePfaCore => false; - protected OneToOneTransformBase(IHostEnvironment env, string name, OneToOneColumn[] column, + bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => CanSaveOnnxCore; + + private protected virtual bool CanSaveOnnxCore => false; + + [BestFriend] + private protected OneToOneTransformBase(IHostEnvironment env, string name, OneToOneColumn[] column, IDataView input, Func testType) : base(env, name, input) { @@ -485,7 +492,8 @@ protected OneToOneTransformBase(IHostEnvironment env, string name, OneToOneColum Metadata = new MetadataDispatcher(Infos.Length); } - protected OneToOneTransformBase(IHost host, OneToOneColumn[] column, + [BestFriend] + private protected OneToOneTransformBase(IHost host, OneToOneColumn[] column, IDataView input, Func testType) : base(host, input) { @@ -498,7 +506,8 @@ protected OneToOneTransformBase(IHost host, OneToOneColumn[] column, Metadata = new MetadataDispatcher(Infos.Length); } - protected OneToOneTransformBase(IHost host, ModelLoadContext ctx, + [BestFriend] + private protected OneToOneTransformBase(IHost host, ModelLoadContext ctx, IDataView input, Func testType) : base(host, input) { @@ -514,7 +523,8 @@ protected OneToOneTransformBase(IHost host, ModelLoadContext ctx, /// /// Re-applying constructor. /// - protected OneToOneTransformBase(IHostEnvironment env, string name, OneToOneTransformBase transform, + [BestFriend] + private protected OneToOneTransformBase(IHostEnvironment env, string name, OneToOneTransformBase transform, IDataView newInput, Func checkType) : base(env, name, newInput) { @@ -534,18 +544,20 @@ protected OneToOneTransformBase(IHostEnvironment env, string name, OneToOneTrans Metadata = new MetadataDispatcher(Infos.Length); } - protected MetadataDispatcher Metadata { get; } + [BestFriend] + private protected MetadataDispatcher Metadata { get; } - protected void SaveBase(ModelSaveContext ctx) + [BestFriend] + private protected void SaveBase(ModelSaveContext ctx) { Host.CheckValue(ctx, nameof(ctx)); _bindings.Save(ctx); } - public void SaveAsPfa(BoundPfaContext ctx) + void ISaveAsPfa.SaveAsPfa(BoundPfaContext ctx) { Host.CheckValue(ctx, nameof(ctx)); - Host.Assert(CanSavePfa); + Host.Assert(((ICanSavePfa)this).CanSavePfa); var toHide = new List(); var toDeclare = new List>(); @@ -572,10 +584,10 @@ public void SaveAsPfa(BoundPfaContext ctx) ctx.DeclareVar(toDeclare.ToArray()); } - public void SaveAsOnnx(OnnxContext ctx) + void ISaveAsOnnx.SaveAsOnnx(OnnxContext ctx) { Host.CheckValue(ctx, nameof(ctx)); - Host.Assert(CanSaveOnnx(ctx)); + Host.Assert(((ICanSaveOnnx)this).CanSaveOnnx(ctx)); for (int iinfo = 0; iinfo < Infos.Length; ++iinfo) { @@ -596,8 +608,8 @@ public void SaveAsOnnx(OnnxContext ctx) } /// - /// Called by . Should be implemented by subclasses that return - /// true from . Will be called + /// Called by . Should be implemented by subclasses that return + /// true from . Will be called /// /// The context. Can be used to declare cells, access other information, /// and whatnot. This method should not actually, however, declare the variable corresponding @@ -607,17 +619,19 @@ public void SaveAsOnnx(OnnxContext ctx) /// The token in the PFA corresponding to the source col /// Shuold return the declaration corresponding to the value of this column. Will /// return null in the event that we do not know how to express this column as PFA - protected virtual JToken SaveAsPfaCore(BoundPfaContext ctx, int iinfo, ColInfo info, JToken srcToken) + [BestFriend] + private protected virtual JToken SaveAsPfaCore(BoundPfaContext ctx, int iinfo, ColInfo info, JToken srcToken) { Host.AssertValue(ctx); Host.Assert(0 <= iinfo && iinfo < _bindings.InfoCount); Host.Assert(Infos[iinfo] == info); Host.AssertValue(srcToken); - Host.Assert(CanSavePfa); + Host.Assert(((ICanSavePfa)this).CanSavePfa); return null; } - protected virtual bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColInfo info, string srcVariableName, + [BestFriend] + private protected virtual bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColInfo info, string srcVariableName, string dstVariableName) => false; public sealed override Schema Schema => _bindings.AsSchema; diff --git a/src/Microsoft.ML.Data/Transforms/ConvertTransform.cs b/src/Microsoft.ML.Data/Transforms/TypeConverting.cs similarity index 88% rename from src/Microsoft.ML.Data/Transforms/ConvertTransform.cs rename to src/Microsoft.ML.Data/Transforms/TypeConverting.cs index a8758e0c43..28723b4517 100644 --- a/src/Microsoft.ML.Data/Transforms/ConvertTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/TypeConverting.cs @@ -20,17 +20,17 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(ConvertingTransform.Summary, typeof(IDataTransform), typeof(ConvertingTransform), typeof(ConvertingTransform.Arguments), typeof(SignatureDataTransform), - ConvertingTransform.UserName, ConvertingTransform.ShortName, "ConvertTransform", DocName = "transform/ConvertTransform.md")] +[assembly: LoadableClass(TypeConvertingTransformer.Summary, typeof(IDataTransform), typeof(TypeConvertingTransformer), typeof(TypeConvertingTransformer.Arguments), typeof(SignatureDataTransform), + TypeConvertingTransformer.UserName, TypeConvertingTransformer.ShortName, "ConvertTransform", DocName = "transform/ConvertTransform.md")] -[assembly: LoadableClass(ConvertingTransform.Summary, typeof(IDataTransform), typeof(ConvertingTransform), null, typeof(SignatureLoadDataTransform), - ConvertingTransform.UserName, ConvertingTransform.LoaderSignature, ConvertingTransform.LoaderSignatureOld)] +[assembly: LoadableClass(TypeConvertingTransformer.Summary, typeof(IDataTransform), typeof(TypeConvertingTransformer), null, typeof(SignatureLoadDataTransform), + TypeConvertingTransformer.UserName, TypeConvertingTransformer.LoaderSignature, TypeConvertingTransformer.LoaderSignatureOld)] -[assembly: LoadableClass(ConvertingTransform.Summary, typeof(ConvertingTransform), null, typeof(SignatureLoadModel), - ConvertingTransform.UserName, ConvertingTransform.LoaderSignature)] +[assembly: LoadableClass(TypeConvertingTransformer.Summary, typeof(TypeConvertingTransformer), null, typeof(SignatureLoadModel), + TypeConvertingTransformer.UserName, TypeConvertingTransformer.LoaderSignature)] -[assembly: LoadableClass(ConvertingTransform.Summary, typeof(IRowMapper), typeof(ConvertingTransform), null, typeof(SignatureLoadRowMapper), - ConvertingTransform.UserName, ConvertingTransform.LoaderSignature)] +[assembly: LoadableClass(TypeConvertingTransformer.Summary, typeof(IRowMapper), typeof(TypeConvertingTransformer), null, typeof(SignatureLoadRowMapper), + TypeConvertingTransformer.UserName, TypeConvertingTransformer.LoaderSignature)] [assembly: EntryPointModule(typeof(TypeConversion))] @@ -38,14 +38,14 @@ namespace Microsoft.ML.Transforms.Conversions { public static class TypeConversion { - [TlcModule.EntryPoint(Name = "Transforms.ColumnTypeConverter", Desc = ConvertingTransform.Summary, UserName = ConvertingTransform.UserName, ShortName = ConvertingTransform.ShortName)] - public static CommonOutputs.TransformOutput Convert(IHostEnvironment env, ConvertingTransform.Arguments input) + [TlcModule.EntryPoint(Name = "Transforms.ColumnTypeConverter", Desc = TypeConvertingTransformer.Summary, UserName = TypeConvertingTransformer.UserName, ShortName = TypeConvertingTransformer.ShortName)] + public static CommonOutputs.TransformOutput Convert(IHostEnvironment env, TypeConvertingTransformer.Arguments input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(input, nameof(input)); var h = EntryPointUtils.CheckArgsAndCreateHost(env, "Convert", input); - var view = ConvertingTransform.Create(h, input, input.Data); + var view = TypeConvertingTransformer.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { @@ -58,7 +58,7 @@ public static CommonOutputs.TransformOutput Convert(IHostEnvironment env, Conver /// /// ConvertTransform allow to change underlying column type as long as we know how to convert types. /// - public sealed class ConvertingTransform : OneToOneTransformerBase + public sealed class TypeConvertingTransformer : OneToOneTransformerBase { public class Column : OneToOneColumn { @@ -163,7 +163,7 @@ private static VersionInfo GetVersionInfo() verWeCanReadBack: 0x00010003, loaderSignature: LoaderSignature, loaderSignatureAlt: LoaderSignatureOld, - loaderAssemblyName: typeof(ConvertingTransform).Assembly.FullName); + loaderAssemblyName: typeof(TypeConvertingTransformer).Assembly.FullName); } private const string RegistrationName = "Convert"; @@ -212,16 +212,16 @@ private static (string input, string output)[] GetColumnPairs(ColumnInfo[] colum /// Name of the column to be transformed. If this is null '' will be used. /// The expected type of the converted column. /// New key range if we work with key type. - public ConvertingTransform(IHostEnvironment env, string inputColumn, string outputColumn, DataKind outputKind, KeyRange outputKeyRange = null) + public TypeConvertingTransformer(IHostEnvironment env, string inputColumn, string outputColumn, DataKind outputKind, KeyRange outputKeyRange = null) : this(env, new ColumnInfo(inputColumn, outputColumn, outputKind, outputKeyRange)) { } /// - /// Create a that takes multiple pairs of columns. + /// Create a that takes multiple pairs of columns. /// - public ConvertingTransform(IHostEnvironment env, params ColumnInfo[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ConvertingTransform)), GetColumnPairs(columns)) + public TypeConvertingTransformer(IHostEnvironment env, params ColumnInfo[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(TypeConvertingTransformer)), GetColumnPairs(columns)) { _columns = columns.ToArray(); } @@ -260,16 +260,16 @@ public override void Save(ModelSaveContext ctx) } // Factory method for SignatureLoadModel. - private static ConvertingTransform Create(IHostEnvironment env, ModelLoadContext ctx) + private static TypeConvertingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(RegistrationName); host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new ConvertingTransform(host, ctx); + return new TypeConvertingTransformer(host, ctx); } - private ConvertingTransform(IHost host, ModelLoadContext ctx) + private TypeConvertingTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) { var columnsLength = ColumnPairs.Length; @@ -348,7 +348,7 @@ internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDat } cols[i] = new ColumnInfo(item.Source ?? item.Name, item.Name, kind, range); }; - return new ConvertingTransform(env, cols).MakeDataTransform(input); + return new TypeConvertingTransformer(env, cols).MakeDataTransform(input); } // Factory method for SignatureLoadDataTransform. @@ -392,15 +392,15 @@ internal static bool GetNewType(IExceptionContext ectx, ColumnType srcType, Data return true; } - private sealed class Mapper : MapperBase, ICanSaveOnnx + private sealed class Mapper : OneToOneMapperBase, ICanSaveOnnx { - private readonly ConvertingTransform _parent; + private readonly TypeConvertingTransformer _parent; private readonly ColumnType[] _types; private readonly int[] _srcCols; public bool CanSaveOnnx(OnnxContext ctx) => ctx.GetOnnxVersion() == OnnxVersion.Experimental; - public Mapper(ConvertingTransform parent, Schema inputSchema) + public Mapper(TypeConvertingTransformer parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -441,7 +441,7 @@ private static bool CanConvertToType(IExceptionContext ectx, ColumnType srcType, return true; } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var result = new Schema.Column[_parent._columns.Length]; for (int i = 0; i < _parent._columns.Length; i++) @@ -467,7 +467,7 @@ public override Schema.Column[] GetOutputColumns() return result; } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); @@ -519,7 +519,7 @@ private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, string srcVariableName, /// /// Convert estimator allow you take column and change it type as long as we know how to do conversion between types. /// - public sealed class ConvertingEstimator : TrivialEstimator + public sealed class TypeConvertingEstimator : TrivialEstimator { internal sealed class Defaults { @@ -533,18 +533,18 @@ internal sealed class Defaults /// Name of the input column. /// Name of the output column. /// The expected type of the converted column. - public ConvertingEstimator(IHostEnvironment env, + public TypeConvertingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, DataKind outputKind = Defaults.DefaultOutputKind) - : this(env, new ConvertingTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn, outputKind)) + : this(env, new TypeConvertingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn, outputKind)) { } /// - /// Create a that takes multiple pairs of columns. + /// Create a that takes multiple pairs of columns. /// - public ConvertingEstimator(IHostEnvironment env, params ConvertingTransform.ColumnInfo[] columns) : - base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ConvertingEstimator)), new ConvertingTransform(env, columns)) + public TypeConvertingEstimator(IHostEnvironment env, params TypeConvertingTransformer.ColumnInfo[] columns) : + base(Contracts.CheckRef(env, nameof(env)).Register(nameof(TypeConvertingEstimator)), new TypeConvertingTransformer(env, columns)) { } @@ -556,7 +556,7 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) { if (!inputSchema.TryFindColumn(colInfo.Input, out var col)) throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.Input); - if (!ConvertingTransform.GetNewType(Host, col.ItemType, colInfo.OutputKind, colInfo.OutputKeyRange, out PrimitiveType newType)) + if (!TypeConvertingTransformer.GetNewType(Host, col.ItemType, colInfo.OutputKind, colInfo.OutputKeyRange, out PrimitiveType newType)) throw Host.ExceptParam(nameof(inputSchema), $"Can't convert {colInfo.Input} into {newType.ToString()}"); if (!Runtime.Data.Conversion.Conversions.Instance.TryGetStandardConversion(col.ItemType, newType, out Delegate del, out bool identity)) throw Host.ExceptParam(nameof(inputSchema), $"Don't know how to convert {colInfo.Input} into {newType.ToString()}"); @@ -627,13 +627,13 @@ private sealed class Rec : EstimatorReconciler public override IEstimator Reconcile(IHostEnvironment env, PipelineColumn[] toOutput, IReadOnlyDictionary inputNames, IReadOnlyDictionary outputNames, IReadOnlyCollection usedNames) { - var infos = new ConvertingTransform.ColumnInfo[toOutput.Length]; + var infos = new TypeConvertingTransformer.ColumnInfo[toOutput.Length]; for (int i = 0; i < toOutput.Length; ++i) { var tcol = (IConvertCol)toOutput[i]; - infos[i] = new ConvertingTransform.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], tcol.Kind); + infos[i] = new TypeConvertingTransformer.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], tcol.Kind); } - return new ConvertingEstimator(env, infos); + return new TypeConvertingEstimator(env, infos); } } } diff --git a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingEstimator.cs b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingEstimator.cs index 96ae753d25..4688cd09cc 100644 --- a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingEstimator.cs +++ b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingEstimator.cs @@ -14,16 +14,16 @@ namespace Microsoft.ML.Transforms.Categorical { /// - public sealed class ValueToKeyMappingEstimator: IEstimator + public sealed class ValueToKeyMappingEstimator: IEstimator { public static class Defaults { public const int MaxNumTerms = 1000000; - public const TermTransform.SortOrder Sort = TermTransform.SortOrder.Occurrence; + public const ValueToKeyMappingTransformer.SortOrder Sort = ValueToKeyMappingTransformer.SortOrder.Occurrence; } private readonly IHost _host; - private readonly TermTransform.ColumnInfo[] _columns; + private readonly ValueToKeyMappingTransformer.ColumnInfo[] _columns; private readonly string _file; private readonly string _termsColumn; private readonly IComponentFactory _loaderFactory; @@ -37,12 +37,12 @@ public static class Defaults /// Maximum number of keys to keep per column when auto-training. /// How items should be ordered when vectorized. By default, they will be in the order encountered. /// If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a'). - public ValueToKeyMappingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, int maxNumTerms = Defaults.MaxNumTerms, TermTransform.SortOrder sort = Defaults.Sort) : - this(env, new [] { new TermTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn, maxNumTerms, sort) }) + public ValueToKeyMappingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, int maxNumTerms = Defaults.MaxNumTerms, ValueToKeyMappingTransformer.SortOrder sort = Defaults.Sort) : + this(env, new [] { new ValueToKeyMappingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn, maxNumTerms, sort) }) { } - public ValueToKeyMappingEstimator(IHostEnvironment env, TermTransform.ColumnInfo[] columns, + public ValueToKeyMappingEstimator(IHostEnvironment env, ValueToKeyMappingTransformer.ColumnInfo[] columns, string file = null, string termsColumn = null, IComponentFactory loaderFactory = null) { @@ -54,7 +54,7 @@ public ValueToKeyMappingEstimator(IHostEnvironment env, TermTransform.ColumnInfo _loaderFactory = loaderFactory; } - public TermTransform Fit(IDataView input) => new TermTransform(_host, input, _columns, _file, _termsColumn, _loaderFactory); + public ValueToKeyMappingTransformer Fit(IDataView input) => new ValueToKeyMappingTransformer(_host, input, _columns, _file, _termsColumn, _loaderFactory); public SchemaShape GetOutputSchema(SchemaShape inputSchema) { @@ -94,12 +94,12 @@ public enum KeyValueOrder : byte /// /// Terms will be assigned ID in the order in which they appear. /// - Occurence = TermTransform.SortOrder.Occurrence, + Occurence = ValueToKeyMappingTransformer.SortOrder.Occurrence, /// /// Terms will be assigned ID according to their sort via an ordinal comparison for the type. /// - Value = TermTransform.SortOrder.Value + Value = ValueToKeyMappingTransformer.SortOrder.Value } /// @@ -117,7 +117,7 @@ public sealed class ToKeyFitResult // At the moment this is empty. Once PR #863 clears, we can change this class to hold the output // key-values metadata. - public ToKeyFitResult(TermTransform.TermMap map) + public ToKeyFitResult(ValueToKeyMappingTransformer.TermMap map) { } } @@ -135,9 +135,9 @@ private readonly struct Config { public readonly KeyValueOrder Order; public readonly int Max; - public readonly Action OnFit; + public readonly Action OnFit; - public Config(KeyValueOrder order, int max, Action onFit) + public Config(KeyValueOrder order, int max, Action onFit) { Order = order; Max = max; @@ -145,7 +145,7 @@ public Config(KeyValueOrder order, int max, Action onFit) } } - private static Action Wrap(ToKeyFitResult.OnFit onFit) + private static Action Wrap(ToKeyFitResult.OnFit onFit) { if (onFit == null) return null; @@ -201,13 +201,13 @@ private sealed class Rec : EstimatorReconciler public override IEstimator Reconcile(IHostEnvironment env, PipelineColumn[] toOutput, IReadOnlyDictionary inputNames, IReadOnlyDictionary outputNames, IReadOnlyCollection usedNames) { - var infos = new TermTransform.ColumnInfo[toOutput.Length]; - Action onFit = null; + var infos = new ValueToKeyMappingTransformer.ColumnInfo[toOutput.Length]; + Action onFit = null; for (int i = 0; i < toOutput.Length; ++i) { var tcol = (ITermCol)toOutput[i]; - infos[i] = new TermTransform.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], - tcol.Config.Max, (TermTransform.SortOrder)tcol.Config.Order); + infos[i] = new ValueToKeyMappingTransformer.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], + tcol.Config.Max, (ValueToKeyMappingTransformer.SortOrder)tcol.Config.Order); if (tcol.Config.OnFit != null) { int ii = i; // Necessary because if we capture i that will change to toOutput.Length on call. diff --git a/src/Microsoft.ML.Data/Transforms/TermTransform.cs b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs similarity index 93% rename from src/Microsoft.ML.Data/Transforms/TermTransform.cs rename to src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs index 6c082d50df..e57b12bac6 100644 --- a/src/Microsoft.ML.Data/Transforms/TermTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs @@ -20,18 +20,18 @@ using System.Text; using System.Threading; -[assembly: LoadableClass(TermTransform.Summary, typeof(IDataTransform), typeof(TermTransform), - typeof(TermTransform.Arguments), typeof(SignatureDataTransform), - TermTransform.UserName, "Term", "AutoLabel", "TermTransform", "AutoLabelTransform", DocName = "transform/TermTransform.md")] +[assembly: LoadableClass(ValueToKeyMappingTransformer.Summary, typeof(IDataTransform), typeof(ValueToKeyMappingTransformer), + typeof(ValueToKeyMappingTransformer.Arguments), typeof(SignatureDataTransform), + ValueToKeyMappingTransformer.UserName, "Term", "AutoLabel", "TermTransform", "AutoLabelTransform", DocName = "transform/TermTransform.md")] -[assembly: LoadableClass(TermTransform.Summary, typeof(IDataTransform), typeof(TermTransform), null, typeof(SignatureLoadDataTransform), - TermTransform.UserName, TermTransform.LoaderSignature)] +[assembly: LoadableClass(ValueToKeyMappingTransformer.Summary, typeof(IDataTransform), typeof(ValueToKeyMappingTransformer), null, typeof(SignatureLoadDataTransform), + ValueToKeyMappingTransformer.UserName, ValueToKeyMappingTransformer.LoaderSignature)] -[assembly: LoadableClass(TermTransform.Summary, typeof(TermTransform), null, typeof(SignatureLoadModel), - TermTransform.UserName, TermTransform.LoaderSignature)] +[assembly: LoadableClass(ValueToKeyMappingTransformer.Summary, typeof(ValueToKeyMappingTransformer), null, typeof(SignatureLoadModel), + ValueToKeyMappingTransformer.UserName, ValueToKeyMappingTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(TermTransform), null, typeof(SignatureLoadRowMapper), - TermTransform.UserName, TermTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(ValueToKeyMappingTransformer), null, typeof(SignatureLoadRowMapper), + ValueToKeyMappingTransformer.UserName, ValueToKeyMappingTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Categorical { @@ -42,7 +42,7 @@ namespace Microsoft.ML.Transforms.Categorical // * The Key value is the one-based index of the item in the dictionary. // * Not found is assigned the value zero. /// - public sealed partial class TermTransform : OneToOneTransformerBase + public sealed partial class ValueToKeyMappingTransformer : OneToOneTransformerBase { public abstract class ColumnBase : OneToOneColumn { @@ -195,7 +195,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010003, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(TermTransform).Assembly.FullName); + loaderAssemblyName: typeof(ValueToKeyMappingTransformer).Assembly.FullName); } private const uint VerNonTextTypesSupported = 0x00010003; @@ -227,7 +227,7 @@ private static VersionInfo GetTermManagerVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010001, loaderSignature: TermManagerLoaderSignature, - loaderAssemblyName: typeof(TermTransform).Assembly.FullName); + loaderAssemblyName: typeof(ValueToKeyMappingTransformer).Assembly.FullName); } private readonly TermMap[] _unboundMaps; @@ -264,12 +264,12 @@ private ColInfo[] CreateInfos(ISchema inputSchema) return infos; } - public TermTransform(IHostEnvironment env, IDataView input, + public ValueToKeyMappingTransformer(IHostEnvironment env, IDataView input, params ColumnInfo[] columns) : this(env, input, columns, null, null, null) { } - internal TermTransform(IHostEnvironment env, IDataView input, + internal ValueToKeyMappingTransformer(IHostEnvironment env, IDataView input, ColumnInfo[] columns, string file = null, string termsColumn = null, IComponentFactory loaderFactory = null) @@ -324,11 +324,11 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV cols[i].Terms = item.Terms ?? args.Terms; }; } - return new TermTransform(env, input, cols, args.DataFile, args.TermsColumn, args.Loader).MakeDataTransform(input); + return new ValueToKeyMappingTransformer(env, input, cols, args.DataFile, args.TermsColumn, args.Loader).MakeDataTransform(input); } // Factory method for SignatureLoadModel. - private static TermTransform Create(IHostEnvironment env, ModelLoadContext ctx) + private static ValueToKeyMappingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(RegistrationName); @@ -336,10 +336,10 @@ private static TermTransform Create(IHostEnvironment env, ModelLoadContext ctx) host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new TermTransform(host, ctx); + return new ValueToKeyMappingTransformer(host, ctx); } - private TermTransform(IHost host, ModelLoadContext ctx) + private ValueToKeyMappingTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) { var columnsLength = ColumnPairs.Length; @@ -391,7 +391,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); /// - /// Convenience constructor for public facing API. + /// Initializes a new instance of . /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -403,7 +403,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc public static IDataView Create(IHostEnvironment env, IDataView input, string name, string source = null, int maxNumTerms = ValueToKeyMappingEstimator.Defaults.MaxNumTerms, SortOrder sort = ValueToKeyMappingEstimator.Defaults.Sort) => - new TermTransform(env, input, new[] { new ColumnInfo(source ?? name, name, maxNumTerms, sort) }).MakeDataTransform(input); + new ValueToKeyMappingTransformer(env, input, new[] { new ColumnInfo(source ?? name, name, maxNumTerms, sort) }).MakeDataTransform(input); public static IDataTransform Create(IHostEnvironment env, ArgumentsBase args, ColumnBase[] column, IDataView input) { @@ -507,7 +507,7 @@ private static TermMap CreateFileTermMap(IHostEnvironment env, IChannel ch, stri { var header = new ProgressHeader(new[] { "Total Terms" }, new[] { "examples" }); var trainer = Trainer.Create(cursor, colSrc, autoConvert, int.MaxValue, bldr); - double rowCount = termData.GetRowCount(true) ?? double.NaN; + double rowCount = termData.GetRowCount() ?? double.NaN; long rowCur = 0; pch.SetHeader(header, e => @@ -606,7 +606,7 @@ private static TermMap[] Train(IHostEnvironment env, IChannel ch, ColInfo[] info using (var pch = env.StartProgressChannel("Building term dictionary")) { long rowCur = 0; - double rowCount = trainingData.GetRowCount(true) ?? double.NaN; + double rowCount = trainingData.GetRowCount() ?? double.NaN; var header = new ProgressHeader(new[] { "Total Terms" }, new[] { "examples" }); itrainer = 0; @@ -715,10 +715,10 @@ public TermMap GetTermMap(int iinfo) protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : MapperBase, ISaveAsOnnx, ISaveAsPfa + private sealed class Mapper : OneToOneMapperBase, ISaveAsOnnx, ISaveAsPfa { private readonly ColumnType[] _types; - private readonly TermTransform _parent; + private readonly ValueToKeyMappingTransformer _parent; private readonly ColInfo[] _infos; private readonly BoundTermMap[] _termMap; @@ -727,7 +727,7 @@ private sealed class Mapper : MapperBase, ISaveAsOnnx, ISaveAsPfa public bool CanSavePfa => true; - public Mapper(TermTransform parent, Schema inputSchema) + public Mapper(ValueToKeyMappingTransformer parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -751,7 +751,7 @@ public Mapper(TermTransform parent, Schema inputSchema) } } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -767,7 +767,7 @@ public override Schema.Column[] GetOutputColumns() return result; } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); diff --git a/src/Microsoft.ML.Data/Transforms/TermTransformImpl.cs b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformerImpl.cs similarity index 93% rename from src/Microsoft.ML.Data/Transforms/TermTransformImpl.cs rename to src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformerImpl.cs index 8ddc1f89ce..6aaf18c825 100644 --- a/src/Microsoft.ML.Data/Transforms/TermTransformImpl.cs +++ b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformerImpl.cs @@ -13,7 +13,7 @@ namespace Microsoft.ML.Transforms.Categorical { - public sealed partial class TermTransform + public sealed partial class ValueToKeyMappingTransformer { /// /// These are objects shared by both the scalar and vector implementations of @@ -106,12 +106,12 @@ public TextImpl(bool sorted) _sorted = sorted; } - public override bool TryAdd(ref ReadOnlyMemory val) + public override bool TryAdd(in ReadOnlyMemory val) { if (val.IsEmpty) return false; int count = _pool.Count; - return ReadOnlyMemoryUtils.AddToPool(val, _pool).Id == count; + return _pool.Add(val).Id == count; } public override TermMap Finish() @@ -170,7 +170,7 @@ public Impl(PrimitiveType type, InPredicate mapsToMissing, bool sort) _sort = sort; } - public override bool TryAdd(ref T val) + public override bool TryAdd(in T val) { return !_mapsToMissing(in val) && _values.TryAdd(val); } @@ -195,7 +195,7 @@ protected Builder(PrimitiveType type) /// Ensures that the item is in the set. Returns true iff it added the item. /// /// The value to consider - public abstract bool TryAdd(ref T val); + public abstract bool TryAdd(in T val); /// /// Handling for the "terms" arg. @@ -215,7 +215,7 @@ public override void ParseAddTermArg(ref ReadOnlyMemory terms, IChannel ch ch.Warning("Empty strings ignored in 'terms' specification"); else if (!tryParse(in term, out val)) throw ch.Except($"Item '{term}' in 'terms' specification could not be parsed as '{ItemType}'"); - else if (!TryAdd(ref val)) + else if (!TryAdd(in val)) ch.Warning($"Duplicate item '{term}' ignored in 'terms' specification", term); } @@ -240,7 +240,7 @@ public override void ParseAddTermArg(string[] terms, IChannel ch) ch.Warning("Empty strings ignored in 'term' specification"); else if (!tryParse(in term, out val)) ch.Warning("Item '{0}' ignored in 'term' specification since it could not be parsed as '{1}'", term, ItemType); - else if (!TryAdd(ref val)) + else if (!TryAdd(in val)) ch.Warning("Duplicate item '{0}' ignored in 'term' specification", term); } @@ -361,7 +361,7 @@ public sealed override bool ProcessRow() if (_remaining <= 0) return false; _getter(ref _val); - return !_bldr.TryAdd(ref _val) || --_remaining > 0; + return !_bldr.TryAdd(in _val) || --_remaining > 0; } } @@ -381,10 +381,10 @@ public ImplVec(ValueGetter> getter, int max, Builder bldr) _bldr = bldr; } - private bool AccumAndDecrement(ref T val) + private bool AccumAndDecrement(in T val) { Contracts.Assert(_remaining > 0); - return !_bldr.TryAdd(ref val) || --_remaining > 0; + return !_bldr.TryAdd(in val) || --_remaining > 0; } public sealed override bool ProcessRow() @@ -393,11 +393,12 @@ public sealed override bool ProcessRow() if (_remaining <= 0) return false; _getter(ref _val); + var values = _val.GetValues(); if (_val.IsDense || _addedDefaultFromSparse) { - for (int i = 0; i < _val.Count; ++i) + for (int i = 0; i < values.Length; ++i) { - if (!AccumAndDecrement(ref _val.Values[i])) + if (!AccumAndDecrement(in values[i])) return false; } return true; @@ -412,21 +413,22 @@ public sealed override bool ProcessRow() // excited about the slight inefficiency of that first if check. Contracts.Assert(!_val.IsDense && !_addedDefaultFromSparse); T def = default(T); - for (int i = 0; i < _val.Count; ++i) + var valIndices = _val.GetIndices(); + for (int i = 0; i < values.Length; ++i) { - if (!_addedDefaultFromSparse && _val.Indices[i] != i) + if (!_addedDefaultFromSparse && valIndices[i] != i) { _addedDefaultFromSparse = true; - if (!AccumAndDecrement(ref def)) + if (!AccumAndDecrement(in def)) return false; } - if (!AccumAndDecrement(ref _val.Values[i])) + if (!AccumAndDecrement(in values[i])) return false; } if (!_addedDefaultFromSparse) { _addedDefaultFromSparse = true; - if (!AccumAndDecrement(ref def)) + if (!AccumAndDecrement(in def)) return false; } return true; @@ -465,7 +467,7 @@ private static BoundTermMap Bind(IHostEnvironment env, Schema schema, TermMap un /// type, and will produce either , or a vector type with that output /// type if the input was a vector. /// - /// Note that instances of this class can be shared among multiple + /// Note that instances of this class can be shared among multiple /// instances. To associate this with a particular transform, use the method. /// /// These are the immutable and serializable analogs to the used in @@ -568,9 +570,9 @@ private static TermMap LoadCodecCore(ModelLoadContext ctx, IExceptionContext return new HashArrayImpl(codec.Type.AsPrimitive, values); } - public abstract void WriteTextTerms(TextWriter writer); + internal abstract void WriteTextTerms(TextWriter writer); - public sealed class TextImpl : TermMap> + internal sealed class TextImpl : TermMap> { private readonly NormStr.Pool _pool; @@ -634,7 +636,7 @@ internal override void Save(ModelSaveContext ctx, IHostEnvironment host, CodecFa private void KeyMapper(in ReadOnlyMemory src, ref uint dst) { - var nstr = ReadOnlyMemoryUtils.FindInPool(src, _pool); + var nstr = _pool.Get(src); if (nstr == null) dst = 0; else @@ -648,22 +650,20 @@ public override ValueMapper, uint> GetKeyMapper() public override void GetTerms(ref VBuffer> dst) { - ReadOnlyMemory[] values = dst.Values; - if (Utils.Size(values) < _pool.Count) - values = new ReadOnlyMemory[_pool.Count]; + var editor = VBufferEditor.Create(ref dst, _pool.Count); int slot = 0; foreach (var nstr in _pool) { - Contracts.Assert(0 <= nstr.Id & nstr.Id < values.Length); + Contracts.Assert(0 <= nstr.Id & nstr.Id < editor.Values.Length); Contracts.Assert(nstr.Id == slot); - values[nstr.Id] = nstr.Value; + editor.Values[nstr.Id] = nstr.Value; slot++; } - dst = new VBuffer>(_pool.Count, values, dst.Indices); + dst = editor.Commit(); } - public override void WriteTextTerms(TextWriter writer) + internal override void WriteTextTerms(TextWriter writer) { writer.WriteLine("# Number of terms = {0}", Count); foreach (var nstr in _pool) @@ -671,7 +671,7 @@ public override void WriteTextTerms(TextWriter writer) } } - public sealed class HashArrayImpl : TermMap + internal sealed class HashArrayImpl : TermMap where T : IEquatable, IComparable { // One of the two must exist. If we need one we can initialize it @@ -731,19 +731,17 @@ public override void GetTerms(ref VBuffer dst) { if (Count == 0) { - dst = new VBuffer(0, dst.Values, dst.Indices); + VBufferUtils.Resize(ref dst, 0); return; } - T[] values = dst.Values; - if (Utils.Size(values) < Count) - values = new T[Count]; + var editor = VBufferEditor.Create(ref dst, Count); Contracts.AssertValue(_values); Contracts.Assert(_values.Count == Count); - _values.CopyTo(values); - dst = new VBuffer(Count, values, dst.Indices); + _values.CopyTo(editor.Values); + dst = editor.Commit(); } - public override void WriteTextTerms(TextWriter writer) + internal override void WriteTextTerms(TextWriter writer) { writer.WriteLine("# Number of terms of type '{0}' = {1}", ItemType, Count); StringBuilder sb = null; @@ -782,20 +780,19 @@ private static void GetTextTerms(in VBuffer src, ValueMapper)); StringBuilder sb = null; - ReadOnlyMemory[] values = dst.Values; // We'd obviously have to adjust this a bit, if we ever had sparse metadata vectors. // The way the term map metadata getters are structured right now, this is impossible. Contracts.Assert(src.IsDense); - if (Utils.Size(values) < src.Length) - values = new ReadOnlyMemory[src.Length]; - for (int i = 0; i < src.Length; ++i) + var editor = VBufferEditor.Create(ref dst, src.Length); + var srcValues = src.GetValues(); + for (int i = 0; i < srcValues.Length; ++i) { - stringMapper(in src.Values[i], ref sb); - values[i] = sb.ToString().AsMemory(); + stringMapper(in srcValues[i], ref sb); + editor.Values[i] = sb.ToString().AsMemory(); } - dst = new VBuffer>(src.Length, values, dst.Indices); + dst = editor.Commit(); } /// @@ -954,21 +951,21 @@ public override Delegate GetMappingGetter(IRow input) { // REVIEW: Should the VBufferBuilder be changed so that it can // build vectors of length zero? - dst = new VBuffer(cval, dst.Values, dst.Indices); + VBufferUtils.Resize(ref dst, cval); return; } bldr.Reset(cval, dense: false); - var values = src.Values; - var indices = !src.IsDense ? src.Indices : null; - int count = src.Count; + var values = src.GetValues(); + var indices = src.GetIndices(); + int count = values.Length; for (int islot = 0; islot < count; islot++) { map(in values[islot], ref dstItem); if (dstItem != 0) { - int slot = indices != null ? indices[islot] : islot; + int slot = !src.IsDense ? indices[islot] : islot; bldr.AddFeature(slot, dstItem); } } @@ -989,7 +986,7 @@ public override Delegate GetMappingGetter(IRow input) { // REVIEW: Should the VBufferBuilder be changed so that it can // build vectors of length zero? - dst = new VBuffer(cval, dst.Values, dst.Indices); + VBufferUtils.Resize(ref dst, cval); return; } @@ -998,7 +995,7 @@ public override Delegate GetMappingGetter(IRow input) // unrecognized items. bldr.Reset(cval, dense: false); - var values = src.Values; + var values = src.GetValues(); if (src.IsDense) { for (int slot = 0; slot < src.Length; ++slot) @@ -1010,19 +1007,19 @@ public override Delegate GetMappingGetter(IRow input) } else { - var indices = src.Indices; - int nextExplicitSlot = src.Count == 0 ? src.Length : indices[0]; + var indices = src.GetIndices(); + int nextExplicitSlot = indices.Length == 0 ? src.Length : indices[0]; int islot = 0; for (int slot = 0; slot < src.Length; ++slot) { if (nextExplicitSlot == slot) { // This was an explicitly defined value. - _host.Assert(islot < src.Count); + _host.Assert(islot < values.Length); map(in values[islot], ref dstItem); if (dstItem != 0) bldr.AddFeature(slot, dstItem); - nextExplicitSlot = ++islot == src.Count ? src.Length : indices[islot]; + nextExplicitSlot = ++islot == indices.Length ? src.Length : indices[islot]; } else { @@ -1123,9 +1120,7 @@ private bool AddMetadataCore(ColumnType srcMetaType, Schema.Metadata.Buil VBuffer keyVals = default(VBuffer); TypedMap.GetTerms(ref keyVals); - TMeta[] values = dst.Values; - if (Utils.Size(values) < TypedMap.OutputType.KeyCount) - values = new TMeta[TypedMap.OutputType.KeyCount]; + var editor = VBufferEditor.Create(ref dst, TypedMap.OutputType.KeyCount); uint convKeyVal = 0; foreach (var pair in keyVals.Items(all: true)) { @@ -1133,9 +1128,9 @@ private bool AddMetadataCore(ColumnType srcMetaType, Schema.Metadata.Buil conv(in keyVal, ref convKeyVal); // The builder for the key values should not have any missings. _host.Assert(0 < convKeyVal && convKeyVal <= srcMeta.Length); - srcMeta.GetItemOrDefault((int)(convKeyVal - 1), ref values[pair.Key]); + srcMeta.GetItemOrDefault((int)(convKeyVal - 1), ref editor.Values[pair.Key]); } - dst = new VBuffer(TypedMap.OutputType.KeyCount, values, dst.Indices); + dst = editor.Commit(); }; if (IsTextMetadata && !srcMetaType.IsText) diff --git a/src/Microsoft.ML.Data/Transforms/doc.xml b/src/Microsoft.ML.Data/Transforms/doc.xml index 70ad394ce5..a743ee06a4 100644 --- a/src/Microsoft.ML.Data/Transforms/doc.xml +++ b/src/Microsoft.ML.Data/Transforms/doc.xml @@ -12,7 +12,6 @@ If the is set to true, this transform would do the exact opposite, it will keep only the rows that have missing values. - @@ -97,7 +96,6 @@ It can be changed to true for known length vectors, but it results in an error if changed to false for variable length vectors. - diff --git a/src/Microsoft.ML.Data/Utilities/SlotDropper.cs b/src/Microsoft.ML.Data/Utilities/SlotDropper.cs index 64b510a655..188f8e72b5 100644 --- a/src/Microsoft.ML.Data/Utilities/SlotDropper.cs +++ b/src/Microsoft.ML.Data/Utilities/SlotDropper.cs @@ -104,11 +104,10 @@ public void DropSlots(ref VBuffer src, ref VBuffer dst) } int newLength = DstLength == 0 ? ComputeLength(src.Length) : DstLength; - var values = dst.Values; if (newLength == 0) { // All slots dropped. - dst = new VBuffer(1, 0, dst.Values, dst.Indices); + VBufferUtils.Resize(ref dst, 1, 0); return; } @@ -116,12 +115,11 @@ public void DropSlots(ref VBuffer src, ref VBuffer dst) // End of the trivial cases // At this point, we need to drop some slots and keep some slots. + VBufferEditor editor; + var srcValues = src.GetValues(); if (src.IsDense) { - Contracts.Assert(Utils.Size(values) == Utils.Size(src.Values) || src.Values != dst.Values); - - if (Utils.Size(values) < newLength) - values = new TDst[newLength]; + editor = VBufferEditor.Create(ref dst, newLength); int iDst = 0; int iSrc = 0; @@ -131,33 +129,33 @@ public void DropSlots(ref VBuffer src, ref VBuffer dst) while (iSrc < lim) { Contracts.Assert(iDst <= iSrc); - values[iDst++] = src.Values[iSrc++]; + editor.Values[iDst++] = srcValues[iSrc++]; } iSrc = SlotsMax[i] + 1; } while (iSrc < src.Length) { Contracts.Assert(iDst <= iSrc); - values[iDst++] = src.Values[iSrc++]; + editor.Values[iDst++] = srcValues[iSrc++]; } Contracts.Assert(iDst == newLength); - dst = new VBuffer(newLength, values, dst.Indices); + dst = editor.Commit(); return; } // Sparse case. // Approximate new count is min(#indices, newLength). - var newCount = Math.Min(src.Count, newLength); - var indices = dst.Indices; + var newCount = Math.Min(srcValues.Length, newLength); + var indices = dst.GetIndices(); + var srcIndices = src.GetIndices(); Contracts.Assert(newCount <= src.Length); - Contracts.Assert(Utils.Size(values) == Utils.Size(src.Values) || src.Values != dst.Values); - Contracts.Assert(Utils.Size(indices) == Utils.Size(src.Indices) || src.Indices != dst.Indices); - if (Utils.Size(indices) < newCount) - indices = new int[newCount]; - if (Utils.Size(values) < newCount) - values = new TDst[newCount]; + editor = VBufferEditor.Create( + ref dst, + newLength, + newCount, + requireIndicesOnDense: true); int iiDst = 0; int iiSrc = 0; @@ -167,15 +165,15 @@ public void DropSlots(ref VBuffer src, ref VBuffer dst) // REVIEW: Consider using a BitArray with the slots to keep instead of SlotsMax. It would // only make sense when the number of ranges is greater than the number of slots divided by 32. int max = SlotsMax[iRange]; - while (iiSrc < src.Count) + while (iiSrc < srcValues.Length) { // Copy (with offset) the elements before the current range. - var index = src.Indices[iiSrc]; + var index = srcIndices[iiSrc]; if (index < min) { Contracts.Assert(iiDst <= iiSrc); - indices[iiDst] = index - iOffset; - values[iiDst++] = src.Values[iiSrc++]; + editor.Indices[iiDst] = index - iOffset; + editor.Values[iiDst++] = srcValues[iiSrc++]; continue; } if (index <= max) @@ -211,7 +209,7 @@ public void DropSlots(ref VBuffer src, ref VBuffer dst) Contracts.Assert(index <= max); } - dst = new VBuffer(newLength, iiDst, values, indices); + dst = editor.CommitTruncated(iiDst); } } } diff --git a/src/Microsoft.ML.Data/Utilities/StreamUtils.cs b/src/Microsoft.ML.Data/Utilities/StreamUtils.cs index ac05684a8e..5d52b45b3b 100644 --- a/src/Microsoft.ML.Data/Utilities/StreamUtils.cs +++ b/src/Microsoft.ML.Data/Utilities/StreamUtils.cs @@ -9,7 +9,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { // REVIEW: Implement properly on CoreCLR. - public static class StreamUtils + [BestFriend] + internal static class StreamUtils { public static Stream OpenInStream(string fileName) { diff --git a/src/Microsoft.ML.Data/Utilities/TimerScope.cs b/src/Microsoft.ML.Data/Utilities/TimerScope.cs index 403d8da81d..c2a590ffe8 100644 --- a/src/Microsoft.ML.Data/Utilities/TimerScope.cs +++ b/src/Microsoft.ML.Data/Utilities/TimerScope.cs @@ -3,17 +3,16 @@ // See the LICENSE file in the project root for more information. using System; -using Microsoft.ML.Runtime; -using Microsoft.ML.Runtime.Data; namespace Microsoft.ML.Runtime.Internal.Utilities { using Stopwatch = System.Diagnostics.Stopwatch; /// - /// A timer scope class that starts a Stopwatch when created, calculates and prints elapsed time, physical and virtual memory usages before sending these to the telemetry when disposed. + /// A timer scope class that starts a when created, calculates and prints elapsed time, physical and virtual memory usages before sending these to the telemetry when disposed. /// - public sealed class TimerScope : IDisposable + [BestFriend] + internal sealed class TimerScope : IDisposable { // Note that this class does not own nor dispose of this channel. private readonly IChannel _ch; diff --git a/src/Microsoft.ML.Data/Utils/IntSequencePool.cs b/src/Microsoft.ML.Data/Utils/SequencePool.cs similarity index 98% rename from src/Microsoft.ML.Data/Utils/IntSequencePool.cs rename to src/Microsoft.ML.Data/Utils/SequencePool.cs index 9a83d17168..6b9ebe01e3 100644 --- a/src/Microsoft.ML.Data/Utils/IntSequencePool.cs +++ b/src/Microsoft.ML.Data/Utils/SequencePool.cs @@ -3,13 +3,7 @@ // See the LICENSE file in the project root for more information. using System; -using System.Collections.Generic; -using System.Collections; using System.IO; -using System.Linq; -using System.Threading; -using System.Text; -using Microsoft.ML.Runtime.Model; namespace Microsoft.ML.Runtime.Internal.Utilities { @@ -19,7 +13,8 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// A dictionary of uint sequences of variable length. Stores the sequences as /// byte sequences encoded with LEB128. Empty sequences (or null) are also valid. /// - public sealed class SequencePool + [BestFriend] + internal sealed class SequencePool { // uint sequences are hashed into _mask+1 buckets. _buckets contains the ID of the first // sequence that falls in it (or -1 if it is empty). diff --git a/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs b/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs index 48fd32fc31..5179c60e56 100644 --- a/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs +++ b/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs @@ -2,12 +2,8 @@ // 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; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Transforms.TensorFlow; using System; -using System.Linq; namespace Microsoft.ML.DnnAnalyzer { @@ -15,7 +11,7 @@ public static class DnnAnalyzer { public static void Main(string[] args) { - if (Utils.Size(args) != 1) + if (args == null || args.Length != 1) { Console.Error.WriteLine("Usage: dotnet DnnAnalyzer.dll "); return; diff --git a/src/Microsoft.ML.Ensemble/EnsembleUtils.cs b/src/Microsoft.ML.Ensemble/EnsembleUtils.cs index 275594e17b..66a6ff165e 100644 --- a/src/Microsoft.ML.Ensemble/EnsembleUtils.cs +++ b/src/Microsoft.ML.Ensemble/EnsembleUtils.cs @@ -47,27 +47,20 @@ public static void SelectFeatures(in VBuffer src, BitArray includedIndices Contracts.Assert(cardinality == Utils.GetCardinality(includedIndices)); Contracts.Assert(cardinality < src.Length); - var values = dst.Values; - var indices = dst.Indices; - var srcValues = src.GetValues(); if (src.IsDense) { if (cardinality >= src.Length / 2) { T defaultValue = default; - if (Utils.Size(values) < src.Length) - values = new T[src.Length]; + var editor = VBufferEditor.Create(ref dst, src.Length); for (int i = 0; i < srcValues.Length; i++) - values[i] = !includedIndices[i] ? defaultValue : srcValues[i]; - dst = new VBuffer(src.Length, values, indices); + editor.Values[i] = !includedIndices[i] ? defaultValue : srcValues[i]; + dst = editor.Commit(); } else { - if (Utils.Size(values) < cardinality) - values = new T[cardinality]; - if (Utils.Size(indices) < cardinality) - indices = new int[cardinality]; + var editor = VBufferEditor.Create(ref dst, src.Length, cardinality); int count = 0; for (int i = 0; i < srcValues.Length; i++) @@ -75,28 +68,19 @@ public static void SelectFeatures(in VBuffer src, BitArray includedIndices if (includedIndices[i]) { Contracts.Assert(count < cardinality); - values[count] = srcValues[i]; - indices[count] = i; + editor.Values[count] = srcValues[i]; + editor.Indices[count] = i; count++; } } Contracts.Assert(count == cardinality); - dst = new VBuffer(src.Length, count, values, indices); + dst = editor.Commit(); } } else { - int valuesSize = Utils.Size(values); - int indicesSize = Utils.Size(indices); - - if (valuesSize < srcValues.Length || indicesSize < srcValues.Length) - { - if (valuesSize < cardinality) - values = new T[cardinality]; - if (indicesSize < cardinality) - indices = new int[cardinality]; - } + var editor = VBufferEditor.Create(ref dst, src.Length, cardinality); int count = 0; var srcIndices = src.GetIndices(); @@ -104,13 +88,13 @@ public static void SelectFeatures(in VBuffer src, BitArray includedIndices { if (includedIndices[srcIndices[i]]) { - values[count] = srcValues[i]; - indices[count] = srcIndices[i]; + editor.Values[count] = srcValues[i]; + editor.Indices[count] = srcIndices[i]; count++; } } - dst = new VBuffer(src.Length, count, values, indices); + dst = editor.CommitTruncated(count); } } } diff --git a/src/Microsoft.ML.Ensemble/EntryPoints/Ensemble.cs b/src/Microsoft.ML.Ensemble/EntryPoints/Ensemble.cs index 728cccb1f6..e5e9b79afc 100644 --- a/src/Microsoft.ML.Ensemble/EntryPoints/Ensemble.cs +++ b/src/Microsoft.ML.Ensemble/EntryPoints/Ensemble.cs @@ -11,7 +11,7 @@ namespace Microsoft.ML.Ensemble.EntryPoints { - public static class Ensemble + internal static class Ensemble { [TlcModule.EntryPoint(Name = "Trainers.EnsembleBinaryClassifier", Desc = "Train binary ensemble.", UserName = EnsembleTrainer.UserNameValue)] public static CommonOutputs.BinaryClassificationOutput CreateBinaryEnsemble(IHostEnvironment env, EnsembleTrainer.Arguments input) diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiAverager.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiAverager.cs index 15985316fc..e7a50c11c3 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiAverager.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiAverager.cs @@ -35,14 +35,11 @@ protected void CombineCore(ref VBuffer dst, VBuffer[] src, Singl return; } - var values = dst.Values; - if (Utils.Size(values) < len) - values = new Single[len]; - else - Array.Clear(values, 0, len); - + var editor = VBufferEditor.Create(ref dst, len); + if (!editor.CreatedNewValues) + editor.Values.Clear(); // Set the output to values. - dst = new VBuffer(len, values, dst.Indices); + dst = editor.Commit(); Single weightTotal; if (weights == null) diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiCombiner.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiCombiner.cs index cea9c698ae..350833aebb 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiCombiner.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiCombiner.cs @@ -98,12 +98,10 @@ protected bool TryNormalize(VBuffer[] values) protected void GetNaNOutput(ref VBuffer dst, int len) { Contracts.Assert(len >= 0); - var values = dst.Values; - if (Utils.Size(values) < len) - values = new Single[len]; + var editor = VBufferEditor.Create(ref dst, len); for (int i = 0; i < len; i++) - values[i] = Single.NaN; - dst = new VBuffer(len, values, dst.Indices); + editor.Values[i] = Single.NaN; + dst = editor.Commit(); } } } diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseScalarStacking.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseScalarStacking.cs index 9b9900a65f..257499cd13 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseScalarStacking.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseScalarStacking.cs @@ -9,7 +9,7 @@ namespace Microsoft.ML.Runtime.Ensemble.OutputCombiners { - public abstract class BaseScalarStacking : BaseStacking + internal abstract class BaseScalarStacking : BaseStacking { internal BaseScalarStacking(IHostEnvironment env, string name, ArgumentsBase args) : base(env, name, args) @@ -25,11 +25,9 @@ protected override void FillFeatureBuffer(Single[] src, ref VBuffer dst) { Contracts.AssertNonEmpty(src); int len = src.Length; - var values = dst.Values; - if (Utils.Size(values) < len) - values = new Single[len]; - Array.Copy(src, values, len); - dst = new VBuffer(len, values, dst.Indices); + var editor = VBufferEditor.Create(ref dst, len); + src.CopyTo(editor.Values); + dst = editor.Commit(); } } } diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs index eb6dc3a650..d62650b7c2 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs @@ -16,7 +16,7 @@ namespace Microsoft.ML.Runtime.Ensemble.OutputCombiners { using ColumnRole = RoleMappedSchema.ColumnRole; - public abstract class BaseStacking : IStackingTrainer + internal abstract class BaseStacking : IStackingTrainer { public abstract class ArgumentsBase { @@ -28,13 +28,13 @@ public abstract class ArgumentsBase internal abstract IComponentFactory>> GetPredictorFactory(); } - protected readonly IComponentFactory>> BasePredictorType; - protected readonly IHost Host; - protected IPredictorProducing Meta; + private protected readonly IComponentFactory>> BasePredictorType; + private protected readonly IHost Host; + private protected IPredictorProducing Meta; public Single ValidationDatasetProportion { get; } - internal BaseStacking(IHostEnvironment env, string name, ArgumentsBase args) + private protected BaseStacking(IHostEnvironment env, string name, ArgumentsBase args) { Contracts.AssertValue(env); env.AssertNonWhiteSpace(name); @@ -49,7 +49,7 @@ internal BaseStacking(IHostEnvironment env, string name, ArgumentsBase args) Host.CheckValue(BasePredictorType, nameof(BasePredictorType)); } - internal BaseStacking(IHostEnvironment env, string name, ModelLoadContext ctx) + private protected BaseStacking(IHostEnvironment env, string name, ModelLoadContext ctx) { Contracts.AssertValue(env); env.AssertNonWhiteSpace(name); diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/MultiMedian.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/MultiMedian.cs index 86312393de..3b11146203 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/MultiMedian.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/MultiMedian.cs @@ -81,9 +81,7 @@ public override Combiner> GetCombiner() return; } - var values = dst.Values; - if (Utils.Size(values) < len) - values = new Single[len]; + var editor = VBufferEditor.Create(ref dst, len); int count = src.Length; if (Utils.Size(raw) < count) @@ -92,11 +90,11 @@ public override Combiner> GetCombiner() { for (int j = 0; j < count; j++) raw[j] = i < src[j].Length ? src[j].GetItemOrDefault(i) : 0; - values[i] = MathUtils.GetMedianInPlace(raw, count); + editor.Values[i] = MathUtils.GetMedianInPlace(raw, count); } // Set the output to values. - dst = new VBuffer(len, values, dst.Indices); + dst = editor.Commit(); }; } } diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/MultiStacking.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/MultiStacking.cs index f02d692f54..f9e3b246f7 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/MultiStacking.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/MultiStacking.cs @@ -21,7 +21,7 @@ namespace Microsoft.ML.Runtime.Ensemble.OutputCombiners { using TVectorPredictor = IPredictorProducing>; - public sealed class MultiStacking : BaseStacking>, ICanSaveModel, IMultiClassOutputCombiner + internal sealed class MultiStacking : BaseStacking>, ICanSaveModel, IMultiClassOutputCombiner { public const string LoadName = "MultiStacking"; public const string LoaderSignature = "MultiStackingCombiner"; @@ -37,9 +37,11 @@ private static VersionInfo GetVersionInfo() loaderAssemblyName: typeof(MultiStacking).Assembly.FullName); } +#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. [TlcModule.Component(Name = LoadName, FriendlyName = Stacking.UserName)] public sealed class Arguments : ArgumentsBase, ISupportMulticlassOutputCombinerFactory { + // REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer. [Argument(ArgumentType.Multiple, HelpText = "Base predictor for meta learning", ShortName = "bp", SortOrder = 50, Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureMultiClassClassifierTrainer))] [TGUI(Label = "Base predictor")] @@ -49,6 +51,7 @@ public sealed class Arguments : ArgumentsBase, ISupportMulticlassOutputCombinerF public IMultiClassOutputCombiner CreateComponent(IHostEnvironment env) => new MultiStacking(env, this); } +#pragma warning restore CS0649 public MultiStacking(IHostEnvironment env, Arguments args) : base(env, LoaderSignature, args) @@ -83,19 +86,17 @@ protected override void FillFeatureBuffer(VBuffer[] src, ref VBuffer(len, values, dst.Indices); + var editor = VBufferEditor.Create(ref dst, len); int iv = 0; for (int i = 0; i < src.Length; i++) { - src[i].CopyTo(values, iv); + src[i].CopyTo(editor.Values, iv); iv += src[i].Length; Contracts.Assert(iv <= len); } Contracts.Assert(iv == len); + dst = editor.Commit(); } } } diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/MultiVoting.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/MultiVoting.cs index 75fd4f5222..ffa1b9c647 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/MultiVoting.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/MultiVoting.cs @@ -77,16 +77,14 @@ private void CombineCore(ref VBuffer dst, VBuffer[] src, Single[ int count = Utils.Size(src); if (count == 0) { - dst = new VBuffer(0, dst.Values, dst.Indices); + VBufferUtils.Resize(ref dst, 0); return; } int len = GetClassCount(src); - var values = dst.Values; - if (Utils.Size(values) < len) - values = new Single[len]; - else - Array.Clear(values, 0, len); + var editor = VBufferEditor.Create(ref dst, len); + if (!editor.CreatedNewValues) + editor.Values.Clear(); int voteCount = 0; for (int i = 0; i < count; i++) @@ -94,17 +92,17 @@ private void CombineCore(ref VBuffer dst, VBuffer[] src, Single[ int index = VectorUtils.ArgMax(in src[i]); if (index >= 0) { - values[index]++; + editor.Values[index]++; voteCount++; } } // Normalize by dividing by the number of votes. for (int i = 0; i < len; i++) - values[i] /= voteCount; + editor.Values[i] /= voteCount; // Set the output to values. - dst = new VBuffer(len, values, dst.Indices); + dst = editor.Commit(); } } } diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/RegressionStacking.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/RegressionStacking.cs index 9adb9ba799..8c984613db 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/RegressionStacking.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/RegressionStacking.cs @@ -19,7 +19,7 @@ namespace Microsoft.ML.Runtime.Ensemble.OutputCombiners { using TScalarPredictor = IPredictorProducing; - public sealed class RegressionStacking : BaseScalarStacking, IRegressionOutputCombiner, ICanSaveModel + internal sealed class RegressionStacking : BaseScalarStacking, IRegressionOutputCombiner, ICanSaveModel { public const string LoadName = "RegressionStacking"; public const string LoaderSignature = "RegressionStacking"; @@ -35,9 +35,11 @@ private static VersionInfo GetVersionInfo() loaderAssemblyName: typeof(RegressionStacking).Assembly.FullName); } +#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. [TlcModule.Component(Name = LoadName, FriendlyName = Stacking.UserName)] public sealed class Arguments : ArgumentsBase, ISupportRegressionOutputCombinerFactory { + // REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer. [Argument(ArgumentType.Multiple, HelpText = "Base predictor for meta learning", ShortName = "bp", SortOrder = 50, Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureRegressorTrainer))] [TGUI(Label = "Base predictor")] @@ -47,6 +49,7 @@ public sealed class Arguments : ArgumentsBase, ISupportRegressionOutputCombinerF public IRegressionOutputCombiner CreateComponent(IHostEnvironment env) => new RegressionStacking(env, this); } +#pragma warning restore CS0649 public RegressionStacking(IHostEnvironment env, Arguments args) : base(env, LoaderSignature, args) diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/Stacking.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/Stacking.cs index 8c36cc866e..f44f987b05 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/Stacking.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/Stacking.cs @@ -16,7 +16,7 @@ namespace Microsoft.ML.Runtime.Ensemble.OutputCombiners { using TScalarPredictor = IPredictorProducing; - public sealed class Stacking : BaseScalarStacking, IBinaryOutputCombiner, ICanSaveModel + internal sealed class Stacking : BaseScalarStacking, IBinaryOutputCombiner, ICanSaveModel { public const string UserName = "Stacking"; public const string LoadName = "Stacking"; @@ -33,9 +33,11 @@ private static VersionInfo GetVersionInfo() loaderAssemblyName: typeof(Stacking).Assembly.FullName); } +#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. [TlcModule.Component(Name = LoadName, FriendlyName = UserName)] public sealed class Arguments : ArgumentsBase, ISupportBinaryOutputCombinerFactory { + // REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer. [Argument(ArgumentType.Multiple, HelpText = "Base predictor for meta learning", ShortName = "bp", SortOrder = 50, Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureBinaryClassifierTrainer))] [TGUI(Label = "Base predictor")] @@ -45,6 +47,7 @@ public sealed class Arguments : ArgumentsBase, ISupportBinaryOutputCombinerFacto public IBinaryOutputCombiner CreateComponent(IHostEnvironment env) => new Stacking(env, this); } +#pragma warning restore CS0649 public Stacking(IHostEnvironment env, Arguments args) : base(env, LoaderSignature, args) diff --git a/src/Microsoft.ML.Ensemble/Selector/SubsetSelector/BootstrapSelector.cs b/src/Microsoft.ML.Ensemble/Selector/SubsetSelector/BootstrapSelector.cs index 102b9d10d5..fd045f71a8 100644 --- a/src/Microsoft.ML.Ensemble/Selector/SubsetSelector/BootstrapSelector.cs +++ b/src/Microsoft.ML.Ensemble/Selector/SubsetSelector/BootstrapSelector.cs @@ -46,7 +46,7 @@ public override IEnumerable GetSubsets(Batch batch, IRandom rand) for (int i = 0; i < Size; i++) { // REVIEW: Consider ways to reintroduce "balanced" samples. - var viewTrain = new BootstrapSampleTransform(Host, new BootstrapSampleTransform.Arguments(), Data.Data); + var viewTrain = new BootstrapSamplingTransformer(Host, new BootstrapSamplingTransformer.Arguments(), Data.Data); var dataTrain = new RoleMappedData(viewTrain, Data.Schema.GetColumnRoleNames()); yield return FeatureSelector.SelectFeatures(dataTrain, rand); } diff --git a/src/Microsoft.ML.Ensemble/Trainer/Binary/EnsembleTrainer.cs b/src/Microsoft.ML.Ensemble/Trainer/Binary/EnsembleTrainer.cs index cc03de02d4..a1befc112b 100644 --- a/src/Microsoft.ML.Ensemble/Trainer/Binary/EnsembleTrainer.cs +++ b/src/Microsoft.ML.Ensemble/Trainer/Binary/EnsembleTrainer.cs @@ -29,7 +29,7 @@ namespace Microsoft.ML.Runtime.Ensemble /// /// A generic ensemble trainer for binary classification. /// - public sealed class EnsembleTrainer : EnsembleTrainerBase, IModelCombiner { @@ -48,6 +48,7 @@ public sealed class Arguments : ArgumentsBase [TGUI(Label = "Output combiner", Description = "Output combiner type")] public ISupportBinaryOutputCombinerFactory OutputCombiner = new MedianFactory(); + // REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer. [Argument(ArgumentType.Multiple, HelpText = "Base predictor type", ShortName = "bp,basePredictorTypes", SortOrder = 1, Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureBinaryClassifierTrainer))] public IComponentFactory>[] BasePredictors; diff --git a/src/Microsoft.ML.Ensemble/Trainer/EnsembleTrainerBase.cs b/src/Microsoft.ML.Ensemble/Trainer/EnsembleTrainerBase.cs index 9d7c6fab40..a8fc896c5b 100644 --- a/src/Microsoft.ML.Ensemble/Trainer/EnsembleTrainerBase.cs +++ b/src/Microsoft.ML.Ensemble/Trainer/EnsembleTrainerBase.cs @@ -101,7 +101,7 @@ private protected EnsembleTrainerBase(ArgumentsBase args, IHostEnvironment env, } } - public sealed override TPredictor Train(TrainContext context) + private protected sealed override TPredictor Train(TrainContext context) { Host.CheckValue(context, nameof(context)); diff --git a/src/Microsoft.ML.Ensemble/Trainer/IModelCombiner.cs b/src/Microsoft.ML.Ensemble/Trainer/IModelCombiner.cs index 0a392585a7..196df4dc54 100644 --- a/src/Microsoft.ML.Ensemble/Trainer/IModelCombiner.cs +++ b/src/Microsoft.ML.Ensemble/Trainer/IModelCombiner.cs @@ -7,6 +7,8 @@ namespace Microsoft.ML.Runtime.Ensemble { + public delegate void SignatureModelCombiner(PredictionKind kind); + /// /// An interface that combines multiple predictors into a single predictor. /// diff --git a/src/Microsoft.ML.Ensemble/Trainer/Multiclass/MulticlassDataPartitionEnsembleTrainer.cs b/src/Microsoft.ML.Ensemble/Trainer/Multiclass/MulticlassDataPartitionEnsembleTrainer.cs index f207c9e0ad..1961e6a785 100644 --- a/src/Microsoft.ML.Ensemble/Trainer/Multiclass/MulticlassDataPartitionEnsembleTrainer.cs +++ b/src/Microsoft.ML.Ensemble/Trainer/Multiclass/MulticlassDataPartitionEnsembleTrainer.cs @@ -30,7 +30,7 @@ namespace Microsoft.ML.Runtime.Ensemble /// /// A generic ensemble classifier for multi-class classification /// - public sealed class MulticlassDataPartitionEnsembleTrainer : + internal sealed class MulticlassDataPartitionEnsembleTrainer : EnsembleTrainerBase, EnsembleMultiClassPredictor, IMulticlassSubModelSelector, IMultiClassOutputCombiner>, IModelCombiner @@ -49,6 +49,7 @@ public sealed class Arguments : ArgumentsBase [TGUI(Label = "Output combiner", Description = "Output combiner type")] public ISupportMulticlassOutputCombinerFactory OutputCombiner = new MultiMedian.Arguments(); + // REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer. [Argument(ArgumentType.Multiple, HelpText = "Base predictor type", ShortName = "bp,basePredictorTypes", SortOrder = 1, Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureMultiClassClassifierTrainer))] public IComponentFactory>[] BasePredictors; @@ -59,7 +60,7 @@ public Arguments() BasePredictors = new[] { ComponentFactoryUtils.CreateFromFunction( - env => new MulticlassLogisticRegression(env, FeatureColumn, LabelColumn)) + env => new MulticlassLogisticRegression(env, LabelColumn, FeatureColumn)) }; } } diff --git a/src/Microsoft.ML.Ensemble/Trainer/Regression/RegressionEnsembleTrainer.cs b/src/Microsoft.ML.Ensemble/Trainer/Regression/RegressionEnsembleTrainer.cs index b7e63b8862..09d394d596 100644 --- a/src/Microsoft.ML.Ensemble/Trainer/Regression/RegressionEnsembleTrainer.cs +++ b/src/Microsoft.ML.Ensemble/Trainer/Regression/RegressionEnsembleTrainer.cs @@ -26,7 +26,7 @@ namespace Microsoft.ML.Runtime.Ensemble { using TScalarPredictor = IPredictorProducing; - public sealed class RegressionEnsembleTrainer : EnsembleTrainerBase, IModelCombiner { @@ -43,6 +43,7 @@ public sealed class Arguments : ArgumentsBase [TGUI(Label = "Output combiner", Description = "Output combiner type")] public ISupportRegressionOutputCombinerFactory OutputCombiner = new MedianFactory(); + // REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer. [Argument(ArgumentType.Multiple, HelpText = "Base predictor type", ShortName = "bp,basePredictorTypes", SortOrder = 1, Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureRegressorTrainer))] public IComponentFactory>[] BasePredictors; diff --git a/src/Microsoft.ML.FastTree/BinFile/BinFinder.cs b/src/Microsoft.ML.FastTree/BinFile/BinFinder.cs index 782d85f24a..eaae7d5448 100644 --- a/src/Microsoft.ML.FastTree/BinFile/BinFinder.cs +++ b/src/Microsoft.ML.FastTree/BinFile/BinFinder.cs @@ -17,6 +17,7 @@ internal sealed class BinFinder { private readonly GreedyBinFinder _finder; private double[] _distinctValues; + private double[] _distinctCountsBuffer; private int[] _counts; private static double[] _trivialBinUpperBounds; // Will be initialized to a single element positive infinity array. @@ -43,15 +44,19 @@ public BinFinder() /// The scheme is destructive, because it modifies the arrays within . /// /// The values we are binning + /// A buffer space to work over the values, so the original + /// values aren't modified. /// This working array will be filled with a sorted list of the /// distinct values detected within /// This working array will be filled with a sorted list of the distinct /// values detected within /// The logical length of both and /// - private int FindDistinctCounts(in VBuffer values, double[] distinctValues, int[] counts) + private int FindDistinctCounts(in VBuffer values, double[] valueBuffer, double[] distinctValues, int[] counts) { - if (values.Count == 0) + var explicitValues = values.GetValues(); + var explicitValuesCount = explicitValues.Length; + if (explicitValuesCount == 0) { if (values.Length == 0) return 0; @@ -59,30 +64,31 @@ private int FindDistinctCounts(in VBuffer values, double[] distinctValue counts[0] = values.Length; return 1; } - var valArray = values.Values; // Get histogram of values - Array.Sort(valArray, 0, values.Count); + Contracts.Assert(valueBuffer.Length >= explicitValuesCount); + explicitValues.CopyTo(valueBuffer); + Array.Sort(valueBuffer, 0, explicitValuesCount); // Note that Array.Sort will, by MSDN documentation, make NaN be the first item of a sorted // list (that is, NaN is considered to be ordered "below" any other value for the purpose of // a sort, including negative infinity). So when checking if values contains no NaN values, it // suffices to check only the first item. - if (double.IsNaN(valArray[0])) + if (double.IsNaN(valueBuffer[0])) return -1; int idist = 0; // Index into the "distinct" arrays. - if (!values.IsDense && valArray[0] > 0) + if (!values.IsDense && valueBuffer[0] > 0) { // Implicit zeros at the head. distinctValues[0] = 0; - counts[0] = values.Length - values.Count; + counts[0] = values.Length - explicitValuesCount; idist = 1; } - double last = distinctValues[idist] = valArray[0]; + double last = distinctValues[idist] = valueBuffer[0]; counts[idist] = 1; - for (int i = 1; i < values.Count; ++i) + for (int i = 1; i < explicitValuesCount; ++i) { - double curr = valArray[i]; + double curr = valueBuffer[i]; if (curr != last) { Contracts.Assert(curr > last); @@ -92,7 +98,7 @@ private int FindDistinctCounts(in VBuffer values, double[] distinctValue { // This boundary is going from negative, to non-negative, and there are "implicit" zeros. distinctValues[idist] = 0; - counts[idist] = values.Length - values.Count; + counts[idist] = values.Length - explicitValuesCount; if (curr == 0) { // No need to do any more work. @@ -117,7 +123,7 @@ private int FindDistinctCounts(in VBuffer values, double[] distinctValue { // Implicit zeros at the tail. distinctValues[++idist] = 0; - counts[idist] = values.Length - values.Count; + counts[idist] = values.Length - explicitValuesCount; } return idist + 1; @@ -224,17 +230,19 @@ public bool FindBins(in VBuffer values, int maxBins, int minPerLeaf, out Contracts.Assert(maxBins > 0); Contracts.Assert(minPerLeaf >= 0); - if (values.Count == 0) + var valuesCount = values.GetValues().Length; + if (valuesCount == 0) { binUpperBounds = TrivialBinUpperBounds; return true; } - int arraySize = values.IsDense ? values.Count : values.Count + 1; + int arraySize = values.IsDense ? valuesCount : valuesCount + 1; + Utils.EnsureSize(ref _distinctCountsBuffer, arraySize, arraySize, keepOld: false); Utils.EnsureSize(ref _distinctValues, arraySize, arraySize, keepOld: false); Utils.EnsureSize(ref _counts, arraySize, arraySize, keepOld: false); - int numValues = FindDistinctCounts(in values, _distinctValues, _counts); + int numValues = FindDistinctCounts(in values, _distinctCountsBuffer, _distinctValues, _counts); if (numValues < 0) { binUpperBounds = null; diff --git a/src/Microsoft.ML.FastTree/BoostingFastTree.cs b/src/Microsoft.ML.FastTree/BoostingFastTree.cs index 99658d2a89..4ae0bf16b6 100644 --- a/src/Microsoft.ML.FastTree/BoostingFastTree.cs +++ b/src/Microsoft.ML.FastTree/BoostingFastTree.cs @@ -28,10 +28,10 @@ protected BoostingFastTreeTrainerBase(IHostEnvironment env, string groupIdColumn, int numLeaves, int numTrees, - int minDocumentsInLeafs, + int minDatapointsInLeaves, double learningRate, Action advancedSettings) - : base(env, label, featureColumn, weightColumn, groupIdColumn, numLeaves, numTrees, minDocumentsInLeafs, advancedSettings) + : base(env, label, featureColumn, weightColumn, groupIdColumn, numLeaves, numTrees, minDatapointsInLeaves, advancedSettings) { if (Args.LearningRates != learningRate) diff --git a/src/Microsoft.ML.FastTree/Dataset/Dataset.cs b/src/Microsoft.ML.FastTree/Dataset/Dataset.cs index 68283ca33c..a1e70ab5b9 100644 --- a/src/Microsoft.ML.FastTree/Dataset/Dataset.cs +++ b/src/Microsoft.ML.FastTree/Dataset/Dataset.cs @@ -388,7 +388,11 @@ private void SplitThreadWorker(FeatureFlockBase[][] features, int f, int[][] doc /// Row forward indexer public RowForwardIndexer GetFeatureBinRowwiseIndexer(bool[] activeFeatures = null) { - return new RowForwardIndexer(this, activeFeatures); + Contracts.Assert(activeFeatures == null || activeFeatures.Length >= NumFeatures); + var truncatedActiveFeatures = Enumerable.Repeat(true, NumFeatures).ToArray(); + if (activeFeatures != null) + Array.Copy(activeFeatures, 0, truncatedActiveFeatures, 0, NumFeatures); + return new RowForwardIndexer(this, truncatedActiveFeatures); } public struct DatasetSkeletonQueryDocData diff --git a/src/Microsoft.ML.FastTree/FastTree.cs b/src/Microsoft.ML.FastTree/FastTree.cs index 32ada36a09..9245dc3e19 100644 --- a/src/Microsoft.ML.FastTree/FastTree.cs +++ b/src/Microsoft.ML.FastTree/FastTree.cs @@ -58,12 +58,24 @@ public abstract class FastTreeTrainerBase : protected TreeEnsemble TrainedEnsemble; protected int FeatureCount; protected RoleMappedData ValidData; + /// + /// If not null, it's a test data set passed in from training context. It will be converted to one element in + /// by calling in . + /// + protected RoleMappedData TestData; protected IParallelTraining ParallelTraining; protected OptimizationAlgorithm OptimizationAlgorithm; protected Dataset TrainSet; protected Dataset ValidSet; + /// + /// Data sets used to evaluate the prediction scores produced the trained model during the triaining process. + /// protected Dataset[] TestSets; protected int[] FeatureMap; + /// + /// In the training process, , , would be + /// converted into for efficient model evaluation. + /// protected List Tests; protected TestHistory PruningTest; protected int[] CategoricalFeatures; @@ -102,7 +114,7 @@ private protected FastTreeTrainerBase(IHostEnvironment env, string groupIdColumn, int numLeaves, int numTrees, - int minDocumentsInLeafs, + int minDatapointsInLeaves, Action advancedSettings) : base(Contracts.CheckRef(env, nameof(env)).Register(RegisterName), TrainerUtils.MakeR4VecFeature(featureColumn), label, TrainerUtils.MakeR4ScalarWeightColumn(weightColumn), TrainerUtils.MakeU4ScalarColumn(groupIdColumn)) { @@ -112,7 +124,7 @@ private protected FastTreeTrainerBase(IHostEnvironment env, // override with the directly provided values. Args.NumLeaves = numLeaves; Args.NumTrees = numTrees; - Args.MinDocumentsInLeafs = minDocumentsInLeafs; + Args.MinDocumentsInLeafs = minDatapointsInLeaves; //apply the advanced args, if the user supplied any advancedSettings?.Invoke(Args); @@ -121,15 +133,15 @@ private protected FastTreeTrainerBase(IHostEnvironment env, Args.FeatureColumn = featureColumn; if (weightColumn != null) - Args.WeightColumn = Optional.Explicit(weightColumn); ; + Args.WeightColumn = Optional.Explicit(weightColumn); if (groupIdColumn != null) - Args.GroupIdColumn = Optional.Explicit(groupIdColumn); ; + Args.GroupIdColumn = Optional.Explicit(groupIdColumn); // The discretization step renders this trainer non-parametric, and therefore it does not need normalization. // Also since it builds its own internal discretized columnar structures, it cannot benefit from caching. // Finally, even the binary classifiers, being logitboost, tend to not benefit from external calibration. - Info = new TrainerInfo(normalization: false, caching: false, calibration: NeedCalibration, supportValid: true); + Info = new TrainerInfo(normalization: false, caching: false, calibration: NeedCalibration, supportValid: true, supportTest: true); // REVIEW: CLR 4.6 has a bug that is only exposed in Scope, and if we trigger GC.Collect in scope environment // with memory consumption more than 5GB, GC get stuck in infinite loop. // Before, we could check a specific type of the environment here, but now it is internal, so we will need another @@ -150,7 +162,7 @@ private protected FastTreeTrainerBase(IHostEnvironment env, TArgs args, SchemaSh // The discretization step renders this trainer non-parametric, and therefore it does not need normalization. // Also since it builds its own internal discretized columnar structures, it cannot benefit from caching. // Finally, even the binary classifiers, being logitboost, tend to not benefit from external calibration. - Info = new TrainerInfo(normalization: false, caching: false, calibration: NeedCalibration, supportValid: true); + Info = new TrainerInfo(normalization: false, caching: false, calibration: NeedCalibration, supportValid: true, supportTest: true); // REVIEW: CLR 4.6 has a bug that is only exposed in Scope, and if we trigger GC.Collect in scope environment // with memory consumption more than 5GB, GC get stuck in infinite loop. // Before, we could check a specific type of the environment here, but now it is internal, so we will need another @@ -207,6 +219,8 @@ protected void ConvertData(RoleMappedData trainData) FeatureMap = instanceConverter.FeatureMap; if (ValidData != null) ValidSet = instanceConverter.GetCompatibleDataset(ValidData, PredictionKind, CategoricalFeatures, Args.CategoricalSplit); + if (TestData != null) + TestSets = new[] { instanceConverter.GetCompatibleDataset(TestData, PredictionKind, CategoricalFeatures, Args.CategoricalSplit) }; } private bool UseTranspose(bool? useTranspose, RoleMappedData data) @@ -989,22 +1003,6 @@ public static DataConverter Create(RoleMappedData data, IHost host, Double[][] b return conv; } - protected void GetFeatureNames(RoleMappedData data, ref VBuffer> names) - { - // The existing implementations will have verified this by the time this utility - // function is called. - Host.AssertValue(data); - var feat = data.Schema.Feature; - Host.AssertValue(feat); - Host.Assert(feat.Type.ValueCount > 0); - - var sch = data.Schema.Schema; - if (sch.HasSlotNames(feat.Index, feat.Type.ValueCount)) - sch.GetMetadata(MetadataUtils.Kinds.SlotNames, feat.Index, ref names); - else - names = new VBuffer>(feat.Type.ValueCount, 0, names.Values, names.Indices); - } - #if !CORECLR protected void GetFeatureIniContent(RoleMappedData data, ref VBuffer> content) { @@ -1343,20 +1341,18 @@ private ValueMapper, VBuffer> GetCopier(ColumnType itemT return (in VBuffer src, ref VBuffer dst) => { - var indices = dst.Indices; - var values = dst.Values; - if (src.Count > 0) + var srcValues = src.GetValues(); + var editor = VBufferEditor.Create(ref dst, src.Length, srcValues.Length); + if (srcValues.Length > 0) { if (!src.IsDense) { - Utils.EnsureSize(ref indices, src.Count); - Array.Copy(src.Indices, indices, src.Count); + src.GetIndices().CopyTo(editor.Indices); } - Utils.EnsureSize(ref values, src.Count); - for (int i = 0; i < src.Count; ++i) - conv(in src.Values[i], ref values[i]); + for (int i = 0; i < srcValues.Length; ++i) + conv(in srcValues[i], ref editor.Values[i]); } - dst = new VBuffer(src.Length, src.Count, values, indices); + dst = editor.Commit(); }; } @@ -1392,7 +1388,7 @@ private Dataset Construct(RoleMappedData examples, ref int numExamples, int maxB } // Convert the group column, if one exists. if (examples.Schema.Group != null) - data = new ConvertingTransform(Host, new ConvertingTransform.ColumnInfo(examples.Schema.Group.Name, examples.Schema.Group.Name, DataKind.U8)).Transform(data); + data = new TypeConvertingTransformer(Host, new TypeConvertingTransformer.ColumnInfo(examples.Schema.Group.Name, examples.Schema.Group.Name, DataKind.U8)).Transform(data); // Since we've passed it through a few transforms, reconstitute the mapping on the // newly transformed data. @@ -1848,7 +1844,7 @@ private void MakeBoundariesAndCheckLabels(out long missingInstances, out long to ch.Info("Changing data from row-wise to column-wise"); long pos = 0; - double rowCountDbl = (double?)_data.Data.GetRowCount(lazy: true) ?? Double.NaN; + double rowCountDbl = (double?)_data.Data.GetRowCount() ?? Double.NaN; pch.SetHeader(new ProgressHeader("examples"), e => e.SetProgress(0, pos, rowCountDbl)); // REVIEW: Should we ignore rows with bad label, weight, or group? The previous code seemed to let @@ -2538,8 +2534,7 @@ public IEnumerable AllIndicesGT(int lim, Double gtValue) public void CopyTo(int length, ref VBuffer dst) { Contracts.Assert(0 <= length); - int[] indices = dst.Indices; - Double[] values = dst.Values; + VBufferEditor editor; if (!_isSparse) { Contracts.Assert(_dense.Count <= length); @@ -2547,29 +2542,28 @@ public void CopyTo(int length, ref VBuffer dst) Sparsify(); else { - Utils.EnsureSize(ref values, length, keepOld: false); + editor = VBufferEditor.Create(ref dst, length); if (_dense.Count < length) { - _dense.CopyTo(values, 0); - Array.Clear(values, _dense.Count, length - _dense.Count); + _dense.CopyTo(editor.Values); + editor.Values.Slice(_dense.Count, length - _dense.Count).Clear(); } else - _dense.CopyTo(0, values, 0, length); - dst = new VBuffer(length, values, indices); + _dense.CopyTo(editor.Values, length); + dst = editor.Commit(); return; } } int count = _sparse.Count; Contracts.Assert(count <= length); - Utils.EnsureSize(ref indices, count); - Utils.EnsureSize(ref values, count); + editor = VBufferEditor.Create(ref dst, length, count); for (int i = 0; i < _sparse.Count; ++i) { - indices[i] = _sparse[i].Key; - values[i] = _sparse[i].Value; + editor.Indices[i] = _sparse[i].Key; + editor.Values[i] = _sparse[i].Value; } - Contracts.Assert(Utils.IsIncreasing(0, indices, count, length)); - dst = new VBuffer(length, count, values, indices); + Contracts.Assert(Utils.IsIncreasing(0, editor.Indices, count, length)); + dst = editor.Commit(); } /// @@ -2818,7 +2812,7 @@ public abstract class FastTreePredictionWrapper : { //The below two properties are necessary for tree Visualizer public TreeEnsemble TrainedEnsemble { get; } - public int NumTrees => TrainedEnsemble.NumTrees; + int ITreeEnsemble.NumTrees => TrainedEnsemble.NumTrees; // Inner args is used only for documentation purposes when saving comments to INI files. protected readonly string InnerArgs; @@ -2838,8 +2832,8 @@ public abstract class FastTreePredictionWrapper : public ColumnType InputType { get; } public ColumnType OutputType => NumberType.Float; - public bool CanSavePfa => true; - public bool CanSaveOnnx(OnnxContext ctx) => true; + bool ICanSavePfa.CanSavePfa => true; + bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => true; protected FastTreePredictionWrapper(IHostEnvironment env, string name, TreeEnsemble trainedEnsemble, int numFeatures, string innerArgs) : base(env, name) @@ -3019,7 +3013,7 @@ private string AddCalibrationToIni(string ini, ICalibrator calibrator) } } - public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) + JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckValue(input, nameof(input)); @@ -3068,7 +3062,7 @@ private enum AggregateFunction Max } - public virtual bool SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumn) + bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumn) { Host.CheckValue(ctx, nameof(ctx)); @@ -3258,7 +3252,7 @@ public void GetFeatureWeights(ref VBuffer weights) // If there are no trees or no splits, there are no gains. if (gainMap.Count == 0) { - weights = new VBuffer(numFeatures, 0, weights.Values, weights.Indices); + VBufferUtils.Resize(ref weights, numFeatures, 0); return; } @@ -3288,7 +3282,7 @@ private static int FindMaxFeatureIndex(TreeEnsemble ensemble) return ifeatMax; } - public ITree[] GetTrees() + ITree[] ITreeEnsemble.GetTrees() { return TrainedEnsemble.Trees.Select(k => new Tree(k)).ToArray(); } @@ -3392,14 +3386,12 @@ public double GetLeafValue(int leafId) private sealed class TreeNode : INode { - private readonly Dictionary _keyValues; - public TreeNode(Dictionary keyValues) { - _keyValues = keyValues; + KeyValues = keyValues; } - public Dictionary KeyValues { get { return _keyValues; } } + public Dictionary KeyValues { get; } } } } diff --git a/src/Microsoft.ML.FastTree/FastTreeArguments.cs b/src/Microsoft.ML.FastTree/FastTreeArguments.cs index 989ee2171d..f68108d2e8 100644 --- a/src/Microsoft.ML.FastTree/FastTreeArguments.cs +++ b/src/Microsoft.ML.FastTree/FastTreeArguments.cs @@ -17,7 +17,7 @@ namespace Microsoft.ML.Trainers.FastTree { [TlcModule.ComponentKind("FastTreeTrainer")] - public interface IFastTreeTrainerFactory : IComponentFactory + internal interface IFastTreeTrainerFactory : IComponentFactory { } @@ -31,7 +31,7 @@ public sealed class Arguments : BoostedTreeArgs, IFastTreeTrainerFactory [TGUI(Label = "Optimize for unbalanced")] public bool UnbalancedSets = false; - public ITrainer CreateComponent(IHostEnvironment env) => new FastTreeBinaryClassificationTrainer(env, this); + ITrainer IComponentFactory.CreateComponent(IHostEnvironment env) => new FastTreeBinaryClassificationTrainer(env, this); } } @@ -45,7 +45,7 @@ public Arguments() EarlyStoppingMetrics = 1; // Use L1 by default. } - public ITrainer CreateComponent(IHostEnvironment env) => new FastTreeRegressionTrainer(env, this); + ITrainer IComponentFactory.CreateComponent(IHostEnvironment env) => new FastTreeRegressionTrainer(env, this); } } @@ -62,7 +62,7 @@ public sealed class Arguments : BoostedTreeArgs, IFastTreeTrainerFactory "and intermediate values are compound Poisson loss.")] public Double Index = 1.5; - public ITrainer CreateComponent(IHostEnvironment env) => new FastTreeTweedieTrainer(env, this); + ITrainer IComponentFactory.CreateComponent(IHostEnvironment env) => new FastTreeTweedieTrainer(env, this); } } @@ -111,7 +111,7 @@ public Arguments() EarlyStoppingMetrics = 1; } - public ITrainer CreateComponent(IHostEnvironment env) => new FastTreeRankingTrainer(env, this); + ITrainer IComponentFactory.CreateComponent(IHostEnvironment env) => new FastTreeRankingTrainer(env, this); internal override void Check(IExceptionContext ectx) { @@ -143,7 +143,7 @@ internal static class Defaults { internal const int NumTrees = 100; internal const int NumLeaves = 20; - internal const int MinDocumentsInLeafs = 10; + internal const int MinDocumentsInLeaves = 10; internal const double LearningRates = 0.2; } @@ -245,7 +245,7 @@ public abstract class TreeArgs : LearnerInputBaseWithGroupId [Argument(ArgumentType.LastOccurenceWins, HelpText = "The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data", ShortName = "mil", SortOrder = 3)] [TGUI(Description = "Minimum number of training instances required to form a leaf", SuggestedSweeps = "1,10,50")] [TlcModule.SweepableDiscreteParamAttribute("MinDocumentsInLeafs", new object[] { 1, 10, 50 })] - public int MinDocumentsInLeafs = Defaults.MinDocumentsInLeafs; + public int MinDocumentsInLeafs = Defaults.MinDocumentsInLeaves; // REVIEW: Different shortname than FastRank module. Same as the TLC FRWrapper. [Argument(ArgumentType.LastOccurenceWins, HelpText = "Total number of decision trees to create in the ensemble", ShortName = "iter", SortOrder = 1)] diff --git a/src/Microsoft.ML.FastTree/FastTreeClassification.cs b/src/Microsoft.ML.FastTree/FastTreeClassification.cs index da406e80ab..433cafa908 100644 --- a/src/Microsoft.ML.FastTree/FastTreeClassification.cs +++ b/src/Microsoft.ML.FastTree/FastTreeClassification.cs @@ -123,20 +123,20 @@ public sealed partial class FastTreeBinaryClassificationTrainer : /// The name of the feature column. /// The name for the column containing the initial weight. /// The learning rate. - /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. /// The max number of leaves in each regression tree. /// Total number of decision trees to create in the ensemble. /// A delegate to apply all the advanced arguments to the algorithm. public FastTreeBinaryClassificationTrainer(IHostEnvironment env, - string labelColumn, - string featureColumn, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weightColumn = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, Action advancedSettings = null) - : base(env, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDocumentsInLeafs, learningRate, advancedSettings) + : base(env, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings) { // Set the sigmoid parameter to the 2 * learning rate, for traditional FastTreeClassification loss _sigmoidParameter = 2.0 * Args.LearningRates; @@ -154,11 +154,12 @@ internal FastTreeBinaryClassificationTrainer(IHostEnvironment env, Arguments arg public override PredictionKind PredictionKind => PredictionKind.BinaryClassification; - protected override IPredictorWithFeatureWeights TrainModelCore(TrainContext context) + private protected override IPredictorWithFeatureWeights TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var trainData = context.TrainingSet; ValidData = context.ValidationSet; + TestData = context.TestSet; using (var ch = Host.Start("Training")) { diff --git a/src/Microsoft.ML.FastTree/FastTreeRanking.cs b/src/Microsoft.ML.FastTree/FastTreeRanking.cs index 21b21edce2..2663c9df51 100644 --- a/src/Microsoft.ML.FastTree/FastTreeRanking.cs +++ b/src/Microsoft.ML.FastTree/FastTreeRanking.cs @@ -42,8 +42,7 @@ namespace Microsoft.ML.Trainers.FastTree { /// public sealed partial class FastTreeRankingTrainer - : BoostingFastTreeTrainerBase, FastTreeRankingPredictor>, - IHasLabelGains + : BoostingFastTreeTrainerBase, FastTreeRankingPredictor> { internal const string LoadNameValue = "FastTreeRanking"; internal const string UserNameValue = "FastTree (Boosted Trees) Ranking"; @@ -69,20 +68,20 @@ public sealed partial class FastTreeRankingTrainer /// The name for the column containing the initial weight. /// The max number of leaves in each regression tree. /// Total number of decision trees to create in the ensemble. - /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. /// The learning rate. /// A delegate to apply all the advanced arguments to the algorithm. public FastTreeRankingTrainer(IHostEnvironment env, - string labelColumn, - string featureColumn, - string groupIdColumn, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string groupIdColumn = DefaultColumnNames.GroupId, string weightColumn = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, Action advancedSettings = null) - : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, groupIdColumn, numLeaves, numTrees, minDocumentsInLeafs, learningRate, advancedSettings) + : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, groupIdColumn, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings) { Host.CheckNonEmpty(groupIdColumn, nameof(groupIdColumn)); } @@ -100,11 +99,12 @@ protected override float GetMaxLabel() return GetLabelGains().Length - 1; } - protected override FastTreeRankingPredictor TrainModelCore(TrainContext context) + private protected override FastTreeRankingPredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var trainData = context.TrainingSet; ValidData = context.ValidationSet; + TestData = context.TestSet; using (var ch = Host.Start("Training")) { @@ -116,7 +116,7 @@ protected override FastTreeRankingPredictor TrainModelCore(TrainContext context) return new FastTreeRankingPredictor(Host, TrainedEnsemble, FeatureCount, InnerArgs); } - public Double[] GetLabelGains() + private Double[] GetLabelGains() { try { diff --git a/src/Microsoft.ML.FastTree/FastTreeRegression.cs b/src/Microsoft.ML.FastTree/FastTreeRegression.cs index 7b887da594..133f9c2bd4 100644 --- a/src/Microsoft.ML.FastTree/FastTreeRegression.cs +++ b/src/Microsoft.ML.FastTree/FastTreeRegression.cs @@ -59,20 +59,20 @@ public sealed partial class FastTreeRegressionTrainer /// The name of the feature column. /// The name for the column containing the initial weight. /// The learning rate. - /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. /// The max number of leaves in each regression tree. /// Total number of decision trees to create in the ensemble. /// A delegate to apply all the advanced arguments to the algorithm. public FastTreeRegressionTrainer(IHostEnvironment env, - string labelColumn, - string featureColumn, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weightColumn = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, Action advancedSettings = null) - : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDocumentsInLeafs, learningRate, advancedSettings) + : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings) { } @@ -84,11 +84,12 @@ internal FastTreeRegressionTrainer(IHostEnvironment env, Arguments args) { } - protected override FastTreeRegressionPredictor TrainModelCore(TrainContext context) + private protected override FastTreeRegressionPredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var trainData = context.TrainingSet; ValidData = context.ValidationSet; + TestData = context.TestSet; using (var ch = Host.Start("Training")) { diff --git a/src/Microsoft.ML.FastTree/FastTreeTweedie.cs b/src/Microsoft.ML.FastTree/FastTreeTweedie.cs index 3e7850a547..f49798aa22 100644 --- a/src/Microsoft.ML.FastTree/FastTreeTweedie.cs +++ b/src/Microsoft.ML.FastTree/FastTreeTweedie.cs @@ -56,20 +56,20 @@ public sealed partial class FastTreeTweedieTrainer /// The name of the feature column. /// The name for the column containing the initial weight. /// The learning rate. - /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. /// The max number of leaves in each regression tree. /// Total number of decision trees to create in the ensemble. /// A delegate to apply all the advanced arguments to the algorithm. public FastTreeTweedieTrainer(IHostEnvironment env, - string labelColumn, - string featureColumn, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weightColumn = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, Action advancedSettings = null) - : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDocumentsInLeafs, learningRate, advancedSettings) + : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings) { Host.CheckNonEmpty(labelColumn, nameof(labelColumn)); Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); @@ -86,11 +86,12 @@ internal FastTreeTweedieTrainer(IHostEnvironment env, Arguments args) Initialize(); } - protected override FastTreeTweediePredictor TrainModelCore(TrainContext context) + private protected override FastTreeTweediePredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var trainData = context.TrainingSet; ValidData = context.ValidationSet; + TestData = context.TestSet; using (var ch = Host.Start("Training")) { diff --git a/src/Microsoft.ML.FastTree/GamClassification.cs b/src/Microsoft.ML.FastTree/GamClassification.cs index 57c3f37eeb..f6965c7526 100644 --- a/src/Microsoft.ML.FastTree/GamClassification.cs +++ b/src/Microsoft.ML.FastTree/GamClassification.cs @@ -62,17 +62,19 @@ internal BinaryClassificationGamTrainer(IHostEnvironment env, Arguments args) /// The name of the label column. /// The name of the feature column. /// The name for the column containing the initial weight. - /// The learning rate. - /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. + /// The number of iterations to use in learning the features. + /// The learning rate. GAMs work best with a small learning rate. + /// The maximum number of bins to use to approximate features /// A delegate to apply all the advanced arguments to the algorithm. public BinaryClassificationGamTrainer(IHostEnvironment env, - string labelColumn, - string featureColumn, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weightColumn = null, - int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, - double learningRate = Defaults.LearningRates, + int numIterations = GamDefaults.NumIterations, + double learningRate = GamDefaults.LearningRates, + int maxBins = GamDefaults.MaxBins, Action advancedSettings = null) - : base(env, LoadNameValue, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weightColumn, minDocumentsInLeafs, learningRate, advancedSettings) + : base(env, LoadNameValue, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weightColumn, numIterations, learningRate, maxBins, advancedSettings) { _sigmoidParameter = 1; } @@ -102,7 +104,7 @@ private static bool[] ConvertTargetsToBool(double[] targets) return boolArray; } - protected override IPredictorProducing TrainModelCore(TrainContext context) + private protected override IPredictorProducing TrainModelCore(TrainContext context) { TrainBase(context); var predictor = new BinaryClassGamPredictor(Host, InputLength, TrainSet, diff --git a/src/Microsoft.ML.FastTree/GamRegression.cs b/src/Microsoft.ML.FastTree/GamRegression.cs index 481a991a8e..27ff31ca79 100644 --- a/src/Microsoft.ML.FastTree/GamRegression.cs +++ b/src/Microsoft.ML.FastTree/GamRegression.cs @@ -51,17 +51,19 @@ internal RegressionGamTrainer(IHostEnvironment env, Arguments args) /// The name of the label column. /// The name of the feature column. /// The name for the column containing the initial weight. - /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. - /// The learning rate. + /// The number of iterations to use in learning the features. + /// The learning rate. GAMs work best with a small learning rate. + /// The maximum number of bins to use to approximate features /// A delegate to apply all the advanced arguments to the algorithm. public RegressionGamTrainer(IHostEnvironment env, - string labelColumn, - string featureColumn, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weightColumn = null, - int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, - double learningRate = Defaults.LearningRates, + int numIterations = GamDefaults.NumIterations, + double learningRate = GamDefaults.LearningRates, + int maxBins = GamDefaults.MaxBins, Action advancedSettings = null) - : base(env, LoadNameValue, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, minDocumentsInLeafs, learningRate, advancedSettings) + : base(env, LoadNameValue, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, numIterations, learningRate, maxBins, advancedSettings) { } @@ -70,7 +72,7 @@ internal override void CheckLabel(RoleMappedData data) data.CheckRegressionLabel(); } - protected override RegressionGamPredictor TrainModelCore(TrainContext context) + private protected override RegressionGamPredictor TrainModelCore(TrainContext context) { TrainBase(context); return new RegressionGamPredictor(Host, InputLength, TrainSet, MeanEffect, BinEffects, FeatureMap); diff --git a/src/Microsoft.ML.FastTree/GamTrainer.cs b/src/Microsoft.ML.FastTree/GamTrainer.cs index 94b6864a8b..c0b7edeaca 100644 --- a/src/Microsoft.ML.FastTree/GamTrainer.cs +++ b/src/Microsoft.ML.FastTree/GamTrainer.cs @@ -54,7 +54,7 @@ public abstract class ArgumentsBase : LearnerInputBaseWithWeight [Argument(ArgumentType.LastOccurenceWins, HelpText = "Total number of iterations over all features", ShortName = "iter", SortOrder = 1)] [TGUI(SuggestedSweeps = "200,1500,9500")] [TlcModule.SweepableDiscreteParamAttribute("NumIterations", new object[] { 200, 1500, 9500 })] - public int NumIterations = 9500; + public int NumIterations = GamDefaults.NumIterations; [Argument(ArgumentType.LastOccurenceWins, HelpText = "The number of threads to use", ShortName = "t", NullName = "")] public int? NumThreads = null; @@ -62,13 +62,13 @@ public abstract class ArgumentsBase : LearnerInputBaseWithWeight [Argument(ArgumentType.LastOccurenceWins, HelpText = "The learning rate", ShortName = "lr", SortOrder = 4)] [TGUI(SuggestedSweeps = "0.001,0.1;log")] [TlcModule.SweepableFloatParamAttribute("LearningRates", 0.001f, 0.1f, isLogScale: true)] - public double LearningRates = 0.002; // Small learning rate. + public double LearningRates = GamDefaults.LearningRates; [Argument(ArgumentType.LastOccurenceWins, HelpText = "Whether to utilize the disk or the data's native transposition facilities (where applicable) when performing the transpose", ShortName = "dt")] public bool? DiskTranspose; [Argument(ArgumentType.LastOccurenceWins, HelpText = "Maximum number of distinct values (bins) per feature", ShortName = "mb")] - public int MaxBins = 255; // Save one for undefs. + public int MaxBins = GamDefaults.MaxBins; [Argument(ArgumentType.AtMostOnce, HelpText = "Upper bound on absolute value of single output", ShortName = "mo")] public double MaxOutput = Double.PositiveInfinity; @@ -137,15 +137,16 @@ private protected GamTrainerBase(IHostEnvironment env, SchemaShape.Column label, string featureColumn, string weightColumn, - int minDocumentsInLeafs, + int numIterations, double learningRate, + int maxBins, Action advancedSettings) : base(Contracts.CheckRef(env, nameof(env)).Register(name), TrainerUtils.MakeR4VecFeature(featureColumn), label, TrainerUtils.MakeR4ScalarWeightColumn(weightColumn)) { Args = new TArgs(); - - Args.MinDocuments = minDocumentsInLeafs; + Args.NumIterations = numIterations; Args.LearningRates = learningRate; + Args.MaxBins = maxBins; //apply the advanced args, if the user supplied any advancedSettings?.Invoke(Args); @@ -187,7 +188,7 @@ private protected GamTrainerBase(IHostEnvironment env, TArgs args, string name, InitializeThreads(); } - protected void TrainBase(TrainContext context) + private protected void TrainBase(TrainContext context) { using (var ch = Host.Start("Training")) { @@ -981,7 +982,7 @@ public void SaveSummary(TextWriter writer, RoleMappedSchema schema) /// , it is convenient to have the command itself nested within the base /// predictor class. /// - public sealed class VisualizationCommand : DataCommand.ImplBase + internal sealed class VisualizationCommand : DataCommand.ImplBase { public const string Summary = "Loads a model trained with a GAM learner, and starts an interactive web session to visualize it."; public const string LoadName = "GamVisualization"; @@ -1423,4 +1424,11 @@ public static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnvironm () => LearnerEntryPointsUtils.FindColumn(host, input.TrainingData.Schema, input.WeightColumn)); } } + + internal static class GamDefaults + { + internal const int NumIterations = 9500; + internal const int MaxBins = 255; + internal const double LearningRates = 0.002; // A small value + } } diff --git a/src/Microsoft.ML.FastTree/Properties/AssemblyInfo.cs b/src/Microsoft.ML.FastTree/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..a03d7bdab6 --- /dev/null +++ b/src/Microsoft.ML.FastTree/Properties/AssemblyInfo.cs @@ -0,0 +1,10 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.CompilerServices; +using Microsoft.ML; + +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)] + +[assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.FastTree/RandomForest.cs b/src/Microsoft.ML.FastTree/RandomForest.cs index f29383473c..ab91a02e21 100644 --- a/src/Microsoft.ML.FastTree/RandomForest.cs +++ b/src/Microsoft.ML.FastTree/RandomForest.cs @@ -35,11 +35,11 @@ protected RandomForestTrainerBase(IHostEnvironment env, string groupIdColumn, int numLeaves, int numTrees, - int minDocumentsInLeafs, + int minDatapointsInLeaves, double learningRate, Action advancedSettings, bool quantileEnabled = false) - : base(env, label, featureColumn, weightColumn, null, numLeaves, numTrees, minDocumentsInLeafs, advancedSettings) + : base(env, label, featureColumn, weightColumn, null, numLeaves, numTrees, minDatapointsInLeaves, advancedSettings) { _quantileEnabled = quantileEnabled; } diff --git a/src/Microsoft.ML.FastTree/RandomForestClassification.cs b/src/Microsoft.ML.FastTree/RandomForestClassification.cs index ad4f82b0c6..a7aedc692a 100644 --- a/src/Microsoft.ML.FastTree/RandomForestClassification.cs +++ b/src/Microsoft.ML.FastTree/RandomForestClassification.cs @@ -142,19 +142,19 @@ public sealed class Arguments : FastForestArgumentsBase /// The name for the column containing the initial weight. /// The max number of leaves in each regression tree. /// Total number of decision trees to create in the ensemble. - /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. /// The learning rate. /// A delegate to apply all the advanced arguments to the algorithm. public FastForestClassification(IHostEnvironment env, - string labelColumn, - string featureColumn, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weightColumn = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, Action advancedSettings = null) - : base(env, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDocumentsInLeafs, learningRate, advancedSettings) + : base(env, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings) { Host.CheckNonEmpty(labelColumn, nameof(labelColumn)); Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); @@ -168,11 +168,12 @@ public FastForestClassification(IHostEnvironment env, Arguments args) { } - protected override IPredictorWithFeatureWeights TrainModelCore(TrainContext context) + private protected override IPredictorWithFeatureWeights TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var trainData = context.TrainingSet; ValidData = context.ValidationSet; + TestData = context.TestSet; using (var ch = Host.Start("Training")) { diff --git a/src/Microsoft.ML.FastTree/RandomForestRegression.cs b/src/Microsoft.ML.FastTree/RandomForestRegression.cs index 99eabbc562..9817cc032b 100644 --- a/src/Microsoft.ML.FastTree/RandomForestRegression.cs +++ b/src/Microsoft.ML.FastTree/RandomForestRegression.cs @@ -120,12 +120,10 @@ public ValueMapper, VBuffer> GetMapper(float[] quantiles) var distribution = TrainedEnsemble.GetDistribution(in src, _quantileSampleCount, out weights); var qdist = new QuantileStatistics(distribution, weights); - var values = dst.Values; - if (Utils.Size(values) < quantiles.Length) - values = new float[quantiles.Length]; + var editor = VBufferEditor.Create(ref dst, quantiles.Length); for (int i = 0; i < quantiles.Length; i++) - values[i] = qdist.GetQuantile((float)quantiles[i]); - dst = new VBuffer(quantiles.Length, values, dst.Indices); + editor.Values[i] = qdist.GetQuantile((float)quantiles[i]); + dst = editor.Commit(); }; } @@ -160,22 +158,22 @@ public sealed class Arguments : FastForestArgumentsBase /// The private instance of . /// The name of the label column. /// The name of the feature column. - /// The name for the column containing the initial weight. - /// The learning rate. - /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. + /// The optional name for the column containing the initial weight. /// The max number of leaves in each regression tree. /// Total number of decision trees to create in the ensemble. + /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. + /// The learning rate. /// A delegate to apply all the advanced arguments to the algorithm. public FastForestRegression(IHostEnvironment env, - string labelColumn, - string featureColumn, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weightColumn = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, Action advancedSettings = null) - : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDocumentsInLeafs, learningRate, advancedSettings) + : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings) { Host.CheckNonEmpty(labelColumn, nameof(labelColumn)); Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); @@ -189,11 +187,12 @@ public FastForestRegression(IHostEnvironment env, Arguments args) { } - protected override FastForestRegressionPredictor TrainModelCore(TrainContext context) + private protected override FastForestRegressionPredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var trainData = context.TrainingSet; ValidData = context.ValidationSet; + TestData = context.TestSet; using (var ch = Host.Start("Training")) { diff --git a/src/Microsoft.ML.FastTree/SumupPerformanceCommand.cs b/src/Microsoft.ML.FastTree/SumupPerformanceCommand.cs index 4d02097941..14fcad759e 100644 --- a/src/Microsoft.ML.FastTree/SumupPerformanceCommand.cs +++ b/src/Microsoft.ML.FastTree/SumupPerformanceCommand.cs @@ -29,7 +29,7 @@ namespace Microsoft.ML.Trainers.FastTree /// /// This is an internal utility command to measure the performance of the IntArray sumup operation. /// - public sealed class SumupPerformanceCommand : ICommand + internal sealed class SumupPerformanceCommand : ICommand { public sealed class Arguments { diff --git a/src/Microsoft.ML.FastTree/TreeEnsemble/RegressionTree.cs b/src/Microsoft.ML.FastTree/TreeEnsemble/RegressionTree.cs index 05d809f8b4..834a4188f1 100644 --- a/src/Microsoft.ML.FastTree/TreeEnsemble/RegressionTree.cs +++ b/src/Microsoft.ML.FastTree/TreeEnsemble/RegressionTree.cs @@ -762,7 +762,7 @@ public int GetLeaf(in VBuffer feat) { // REVIEW: This really should validate feat.Length! if (feat.IsDense) - return GetLeafCore(feat.Values); + return GetLeafCore(feat.GetValues()); return GetLeafCore(feat.GetIndices(), feat.GetValues()); } @@ -778,7 +778,7 @@ private int GetLeafFrom(in VBuffer feat, int root) } if (feat.IsDense) - return GetLeafCore(feat.Values, root: root); + return GetLeafCore(feat.GetValues(), root: root); return GetLeafCore(feat.GetIndices(), feat.GetValues(), root: root); } @@ -796,7 +796,7 @@ public int GetLeaf(in VBuffer feat, ref List path) path.Clear(); if (feat.IsDense) - return GetLeafCore(feat.Values, path); + return GetLeafCore(feat.GetValues(), path); return GetLeafCore(feat.GetIndices(), feat.GetValues(), path); } @@ -816,9 +816,8 @@ private Float GetFeatureValue(Float x, int node) } } - private int GetLeafCore(Float[] nonBinnedInstance, List path = null, int root = 0) + private int GetLeafCore(ReadOnlySpan nonBinnedInstance, List path = null, int root = 0) { - Contracts.AssertValue(nonBinnedInstance); Contracts.Assert(path == null || path.Count == 0); Contracts.Assert(root >= 0); diff --git a/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizer.cs b/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizer.cs index f2821ed611..648b8f7ef5 100644 --- a/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizer.cs +++ b/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizer.cs @@ -11,6 +11,7 @@ using Microsoft.ML.Runtime.Internal.Calibration; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Model; +using Microsoft.ML.Runtime.TreePredictor; using Microsoft.ML.Transforms; using System; using System.Collections.Generic; @@ -191,7 +192,7 @@ public BoundMapper(IExceptionContext ectx, TreeEnsembleFeaturizerBindableMapper InputRoleMappedSchema = schema; // A vector containing the output of each tree on a given example. - var treeValueType = new VectorType(NumberType.Float, _owner._ensemble.NumTrees); + var treeValueType = new VectorType(NumberType.Float, _owner._ensemble.TrainedEnsemble.NumTrees); // An indicator vector with length = the total number of leaves in the ensemble, indicating which leaf the example // ends up in all the trees in the ensemble. var leafIdType = new VectorType(NumberType.Float, _owner._totalLeafCount); @@ -202,7 +203,7 @@ public BoundMapper(IExceptionContext ectx, TreeEnsembleFeaturizerBindableMapper // plus one (since the root node is not a child of any node). So we have #internal + #leaf = 2*(#internal) + 1, // which means that #internal = #leaf - 1. // Therefore, the number of internal nodes in the ensemble is #leaf - #trees. - var pathIdType = new VectorType(NumberType.Float, _owner._totalLeafCount - _owner._ensemble.NumTrees); + var pathIdType = new VectorType(NumberType.Float, _owner._totalLeafCount - _owner._ensemble.TrainedEnsemble.NumTrees); Schema = Schema.Create(new SchemaImpl(ectx, owner, treeValueType, leafIdType, pathIdType)); } @@ -280,10 +281,10 @@ public State(IExceptionContext ectx, IRow input, FastTreePredictionWrapper ensem _ectx = ectx; _ectx.AssertValue(input); _ectx.AssertValue(ensemble); - _ectx.Assert(ensemble.NumTrees > 0); + _ectx.Assert(ensemble.TrainedEnsemble.NumTrees > 0); _input = input; _ensemble = ensemble; - _numTrees = _ensemble.NumTrees; + _numTrees = _ensemble.TrainedEnsemble.NumTrees; _numLeaves = numLeaves; _src = default(VBuffer); @@ -302,14 +303,11 @@ public State(IExceptionContext ectx, IRow input, FastTreePredictionWrapper ensem public void GetTreeValues(ref VBuffer dst) { EnsureCachedPosition(); - var vals = dst.Values; - if (Utils.Size(vals) < _numTrees) - vals = new float[_numTrees]; - + var editor = VBufferEditor.Create(ref dst, _numTrees); for (int i = 0; i < _numTrees; i++) - vals[i] = _ensemble.GetLeafValue(i, _leafIds[i]); + editor.Values[i] = _ensemble.GetLeafValue(i, _leafIds[i]); - dst = new VBuffer(_numTrees, vals, dst.Indices); + dst = editor.Commit(); } public void GetLeafIds(ref VBuffer dst) @@ -326,7 +324,7 @@ public void GetLeafIds(ref VBuffer dst) _leafIdBuilder.Reset(_numLeaves, false); var offset = 0; - var trees = _ensemble.GetTrees(); + var trees = ((ITreeEnsemble)_ensemble).GetTrees(); for (int i = 0; i < trees.Length; i++) { _leafIdBuilder.AddFeature(offset + _leafIds[i], 1); @@ -350,7 +348,7 @@ public void GetPathIds(ref VBuffer dst) if (_pathIdBuilder == null) _pathIdBuilder = BufferBuilder.CreateDefault(); - var trees = _ensemble.GetTrees(); + var trees = ((ITreeEnsemble)_ensemble).GetTrees(); _pathIdBuilder.Reset(_numLeaves - _numTrees, dense: false); var offset = 0; for (int i = 0; i < _numTrees; i++) @@ -471,7 +469,7 @@ private static int CountLeaves(FastTreePredictionWrapper ensemble) { Contracts.AssertValue(ensemble); - var trees = ensemble.GetTrees(); + var trees = ((ITreeEnsemble)ensemble).GetTrees(); var numTrees = trees.Length; var totalLeafCount = 0; for (int i = 0; i < numTrees; i++) @@ -481,58 +479,50 @@ private static int CountLeaves(FastTreePredictionWrapper ensemble) private void GetTreeSlotNames(int col, ref VBuffer> dst) { - var numTrees = _ensemble.NumTrees; - - var names = dst.Values; - if (Utils.Size(names) < numTrees) - names = new ReadOnlyMemory[numTrees]; + var numTrees = _ensemble.TrainedEnsemble.NumTrees; + var editor = VBufferEditor.Create(ref dst, numTrees); for (int t = 0; t < numTrees; t++) - names[t] = string.Format("Tree{0:000}", t).AsMemory(); + editor.Values[t] = string.Format("Tree{0:000}", t).AsMemory(); - dst = new VBuffer>(numTrees, names, dst.Indices); + dst = editor.Commit(); } private void GetLeafSlotNames(int col, ref VBuffer> dst) { - var numTrees = _ensemble.NumTrees; - - var names = dst.Values; - if (Utils.Size(names) < _totalLeafCount) - names = new ReadOnlyMemory[_totalLeafCount]; + var numTrees = _ensemble.TrainedEnsemble.NumTrees; + var editor = VBufferEditor.Create(ref dst, _totalLeafCount); int i = 0; int t = 0; - foreach (var tree in _ensemble.GetTrees()) + foreach (var tree in ((ITreeEnsemble)_ensemble).GetTrees()) { for (int l = 0; l < tree.NumLeaves; l++) - names[i++] = string.Format("Tree{0:000}Leaf{1:000}", t, l).AsMemory(); + editor.Values[i++] = string.Format("Tree{0:000}Leaf{1:000}", t, l).AsMemory(); t++; } _host.Assert(i == _totalLeafCount); - dst = new VBuffer>(_totalLeafCount, names, dst.Indices); + dst = editor.Commit(); } private void GetPathSlotNames(int col, ref VBuffer> dst) { - var numTrees = _ensemble.NumTrees; + var numTrees = _ensemble.TrainedEnsemble.NumTrees; var totalNodeCount = _totalLeafCount - numTrees; - var names = dst.Values; - if (Utils.Size(names) < totalNodeCount) - names = new ReadOnlyMemory[totalNodeCount]; + var editor = VBufferEditor.Create(ref dst, totalNodeCount); int i = 0; int t = 0; - foreach (var tree in _ensemble.GetTrees()) + foreach (var tree in ((ITreeEnsemble)_ensemble).GetTrees()) { var numLeaves = tree.NumLeaves; for (int l = 0; l < tree.NumLeaves - 1; l++) - names[i++] = string.Format("Tree{0:000}Node{1:000}", t, l).AsMemory(); + editor.Values[i++] = string.Format("Tree{0:000}Node{1:000}", t, l).AsMemory(); t++; } _host.Assert(i == totalNodeCount); - dst = new VBuffer>(totalNodeCount, names, dst.Indices); + dst = editor.Commit(); } public ISchemaBoundMapper Bind(IHostEnvironment env, RoleMappedSchema schema) @@ -546,9 +536,11 @@ public ISchemaBoundMapper Bind(IHostEnvironment env, RoleMappedSchema schema) } /// - public static class TreeEnsembleFeaturizerTransform + [BestFriend] + internal static class TreeEnsembleFeaturizerTransform { - public sealed class Arguments : TrainAndScoreTransform.ArgumentsBase +#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. + public sealed class Arguments : TrainAndScoreTransformer.ArgumentsBase { [Argument(ArgumentType.Multiple, HelpText = "Trainer to use", ShortName = "tr", NullName = "", SortOrder = 1, SignatureType = typeof(SignatureTreeEnsembleTrainer))] public IComponentFactory Trainer; @@ -585,6 +577,7 @@ public sealed class ArgumentsForEntryPoint : TransformInputBase [Argument(ArgumentType.Required, HelpText = "Trainer to use", SortOrder = 10, Visibility = ArgumentAttribute.VisibilityType.EntryPointsOnly)] public IPredictorModel PredictorModel; } +#pragma warning restore CS0649 internal const string TreeEnsembleSummary = "Trains a tree ensemble, or loads it from a file, then maps a numeric feature vector " + @@ -645,7 +638,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV ModelLoadContext.LoadModel(host, out predictor, rep, ModelFileUtils.DirPredictor); ch.Trace("Creating scorer"); - var data = TrainAndScoreTransform.CreateDataFromArgs(ch, input, args); + var data = TrainAndScoreTransformer.CreateDataFromArgs(ch, input, args); // Make sure that the given predictor has the correct number of input features. if (predictor is CalibratedPredictorBase) @@ -671,7 +664,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV ch.Trace("Creating TrainAndScoreTransform"); - var trainScoreArgs = new TrainAndScoreTransform.Arguments(); + var trainScoreArgs = new TrainAndScoreTransformer.Arguments(); args.CopyTo(trainScoreArgs); trainScoreArgs.Trainer = args.Trainer; @@ -682,7 +675,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV (e, predictor) => new TreeEnsembleFeaturizerBindableMapper(e, scorerArgs, predictor)); var labelInput = AppendLabelTransform(host, ch, input, trainScoreArgs.LabelColumn, args.LabelPermutationSeed); - var scoreXf = TrainAndScoreTransform.Create(host, trainScoreArgs, labelInput, mapperFactory); + var scoreXf = TrainAndScoreTransformer.Create(host, trainScoreArgs, labelInput, mapperFactory); if (input == labelInput) return scoreXf; @@ -800,8 +793,9 @@ private static IDataView AppendLabelTransform(IHostEnvironment env, IChannel ch, } } - public static partial class TreeFeaturize + internal static partial class TreeFeaturize { +#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. [TlcModule.EntryPoint(Name = "Transforms.TreeLeafFeaturizer", Desc = TreeEnsembleFeaturizerTransform.TreeEnsembleSummary, UserName = TreeEnsembleFeaturizerTransform.UserName, @@ -817,5 +811,6 @@ public static CommonOutputs.TransformOutput Featurizer(IHostEnvironment env, Tre var xf = TreeEnsembleFeaturizerTransform.CreateForEntryPoint(env, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } +#pragma warning restore CS0649 } } diff --git a/src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs b/src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs index 2d6d1c25ef..bb6055053a 100644 --- a/src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs +++ b/src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs @@ -10,7 +10,7 @@ namespace Microsoft.ML { /// - /// FastTree extension methods. + /// Tree extension methods. /// public static class TreeExtensions { @@ -18,164 +18,214 @@ public static class TreeExtensions /// Predict a target using a decision tree regression model trained with the . /// /// The . - /// The label column. - /// The features column. + /// The label column. + /// The feature column. /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of a regression tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. public static FastTreeRegressionTrainer FastTree(this RegressionContext.RegressionTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new FastTreeRegressionTrainer(env, label, features, weights, numLeaves, numTrees, minDatapointsInLeafs, learningRate, advancedSettings); + return new FastTreeRegressionTrainer(env, labelColumn, featureColumn, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings); } /// /// Predict a target using a decision tree binary classification model trained with the . /// /// The . - /// The label column. - /// The features column. + /// The labelColumn column. + /// The featureColumn column. /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. public static FastTreeBinaryClassificationTrainer FastTree(this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new FastTreeBinaryClassificationTrainer(env, label, features, weights, numLeaves, numTrees, minDatapointsInLeafs, learningRate, advancedSettings); + return new FastTreeBinaryClassificationTrainer(env, labelColumn, featureColumn, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings); } /// /// Ranks a series of inputs based on their relevance, training a decision tree ranking model through the . /// - /// The . - /// The label column. - /// The features column. + /// The . + /// The labelColumn column. + /// The featureColumn column. /// The groupId column. /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. public static FastTreeRankingTrainer FastTree(this RankingContext.RankingTrainers ctx, - string label = DefaultColumnNames.Label, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string groupId = DefaultColumnNames.GroupId, - string features = DefaultColumnNames.Features, string weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new FastTreeRankingTrainer(env, label, features, groupId, weights, numLeaves, numTrees, minDatapointsInLeafs, learningRate, advancedSettings); + return new FastTreeRankingTrainer(env, labelColumn, featureColumn, groupId, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings); } /// /// Predict a target using a decision tree regression model trained with the . /// + /// The . + /// The labelColumn column. + /// The featureColumn column. + /// The optional weights column. + /// The number of iterations to use in learning the features. + /// The learning rate. GAMs work best with a small learning rate. + /// The maximum number of bins to use to approximate features. + /// Algorithm advanced settings. + public static BinaryClassificationGamTrainer GeneralizedAdditiveModels(this BinaryClassificationContext.BinaryClassificationTrainers ctx, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, + int numIterations = GamDefaults.NumIterations, + double learningRate = GamDefaults.LearningRates, + int maxBins = GamDefaults.MaxBins, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new BinaryClassificationGamTrainer(env, labelColumn, featureColumn, weights, numIterations, learningRate, maxBins, advancedSettings); + } + + /// + /// Predict a target using a decision tree binary classification model trained with the . + /// + /// The . + /// The labelColumn column. + /// The featureColumn column. + /// The optional weights column. + /// The number of iterations to use in learning the features. + /// The learning rate. GAMs work best with a small learning rate. + /// The maximum number of bins to use to approximate features. + /// Algorithm advanced settings. + public static RegressionGamTrainer GeneralizedAdditiveModels(this RegressionContext.RegressionTrainers ctx, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, + int numIterations = GamDefaults.NumIterations, + double learningRate = GamDefaults.LearningRates, + int maxBins = GamDefaults.MaxBins, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new RegressionGamTrainer(env, labelColumn, featureColumn, weights, numIterations, learningRate, maxBins, advancedSettings); + } + + /// + /// Predict a target using a decision tree regression model trained with the . + /// /// The . - /// The label column. - /// The features column. + /// The labelColumn column. + /// The featureColumn column. /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. - public static BinaryClassificationGamTrainer GeneralizedAdditiveMethods(this RegressionContext.RegressionTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, + public static FastTreeTweedieTrainer FastTreeTweedie(this RegressionContext.RegressionTrainers ctx, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, - Action advancedSettings = null) + Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new BinaryClassificationGamTrainer(env, label, features, weights, minDatapointsInLeafs, learningRate, advancedSettings); + return new FastTreeTweedieTrainer(env, labelColumn, featureColumn, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings); } /// - /// Predict a target using a decision tree binary classification model trained with the . + /// Predict a target using a decision tree regression model trained with the . /// - /// The . - /// The label column. - /// The features column. + /// The . + /// The labelColumn column. + /// The featureColumn column. /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. - public static RegressionGamTrainer GeneralizedAdditiveMethods(this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, + public static FastForestRegression FastForest(this RegressionContext.RegressionTrainers ctx, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, - Action advancedSettings = null) + Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new RegressionGamTrainer(env, label, features, weights, minDatapointsInLeafs, learningRate, advancedSettings); + return new FastForestRegression(env, labelColumn, featureColumn, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings); } /// - /// Predict a target using a decision tree regression model trained with the . + /// Predict a target using a decision tree regression model trained with the . /// - /// The . - /// The label column. - /// The features column. + /// The . + /// The labelColumn column. + /// The featureColumn column. /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. - public static FastTreeTweedieTrainer FastTreeTweedie(this RegressionContext.RegressionTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, + public static FastForestClassification FastForest(this BinaryClassificationContext.BinaryClassificationTrainers ctx, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, - Action advancedSettings = null) + Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new FastTreeTweedieTrainer(env, label, features, weights, numLeaves, numTrees, minDatapointsInLeafs, learningRate, advancedSettings); + return new FastForestClassification(env, labelColumn, featureColumn, weights,numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings); } } } diff --git a/src/Microsoft.ML.FastTree/TreeTrainersStatic.cs b/src/Microsoft.ML.FastTree/TreeTrainersStatic.cs index b919957303..176f0cead8 100644 --- a/src/Microsoft.ML.FastTree/TreeTrainersStatic.cs +++ b/src/Microsoft.ML.FastTree/TreeTrainersStatic.cs @@ -26,7 +26,7 @@ public static class TreeRegressionExtensions /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of a regression tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. /// A delegate that is called every time the @@ -38,25 +38,25 @@ public static class TreeRegressionExtensions /// /// /// /// public static Scalar FastTree(this RegressionContext.RegressionTrainers ctx, Scalar label, Vector features, Scalar weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, Action advancedSettings = null, Action onFit = null) { - CheckUserValues(label, features, weights, numLeaves, numTrees, minDatapointsInLeafs, learningRate, advancedSettings, onFit); + CheckUserValues(label, features, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings, onFit); var rec = new TrainerEstimatorReconciler.Regression( (env, labelName, featuresName, weightsName) => { var trainer = new FastTreeRegressionTrainer(env, labelName, featuresName, weightsName, numLeaves, - numTrees, minDatapointsInLeafs, learningRate, advancedSettings); + numTrees, minDatapointsInLeaves, learningRate, advancedSettings); if (onFit != null) return trainer.WithOnFitDelegate(trans => onFit(trans.Model)); return trainer; @@ -75,7 +75,7 @@ public static Scalar FastTree(this RegressionContext.RegressionTrainers c /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. /// A delegate that is called every time the @@ -88,25 +88,25 @@ public static Scalar FastTree(this RegressionContext.RegressionTrainers c /// /// /// /// public static (Scalar score, Scalar probability, Scalar predictedLabel) FastTree(this BinaryClassificationContext.BinaryClassificationTrainers ctx, Scalar label, Vector features, Scalar weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, Action advancedSettings = null, Action> onFit = null) { - CheckUserValues(label, features, weights, numLeaves, numTrees, minDatapointsInLeafs, learningRate, advancedSettings, onFit); + CheckUserValues(label, features, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings, onFit); var rec = new TrainerEstimatorReconciler.BinaryClassifier( (env, labelName, featuresName, weightsName) => { var trainer = new FastTreeBinaryClassificationTrainer(env, labelName, featuresName, weightsName, numLeaves, - numTrees, minDatapointsInLeafs, learningRate, advancedSettings); + numTrees, minDatapointsInLeaves, learningRate, advancedSettings); if (onFit != null) return trainer.WithOnFitDelegate(trans => onFit(trans.Model)); @@ -128,7 +128,7 @@ public static (Scalar score, Scalar probability, Scalar pred /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of a regression tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. /// A delegate that is called every time the @@ -141,18 +141,18 @@ public static Scalar FastTree(this RankingContext.RankingTrainers c Scalar label, Vector features, Key groupId, Scalar weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, + int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, double learningRate = Defaults.LearningRates, Action advancedSettings = null, Action onFit = null) { - CheckUserValues(label, features, weights, numLeaves, numTrees, minDatapointsInLeafs, learningRate, advancedSettings, onFit); + CheckUserValues(label, features, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings, onFit); var rec = new TrainerEstimatorReconciler.Ranker( (env, labelName, featuresName, groupIdName, weightsName) => { var trainer = new FastTreeRankingTrainer(env, labelName, featuresName, groupIdName, weightsName, numLeaves, - numTrees, minDatapointsInLeafs, learningRate, advancedSettings); + numTrees, minDatapointsInLeaves, learningRate, advancedSettings); if (onFit != null) return trainer.WithOnFitDelegate(trans => onFit(trans.Model)); return trainer; @@ -164,7 +164,7 @@ public static Scalar FastTree(this RankingContext.RankingTrainers c internal static void CheckUserValues(PipelineColumn label, Vector features, Scalar weights, int numLeaves, int numTrees, - int minDatapointsInLeafs, + int minDatapointsInLeaves, double learningRate, Delegate advancedSettings, Delegate onFit) @@ -174,7 +174,7 @@ internal static void CheckUserValues(PipelineColumn label, Vector feature Contracts.CheckValueOrNull(weights); Contracts.CheckParam(numLeaves >= 2, nameof(numLeaves), "Must be at least 2."); Contracts.CheckParam(numTrees > 0, nameof(numTrees), "Must be positive"); - Contracts.CheckParam(minDatapointsInLeafs > 0, nameof(minDatapointsInLeafs), "Must be positive"); + Contracts.CheckParam(minDatapointsInLeaves > 0, nameof(minDatapointsInLeaves), "Must be positive"); Contracts.CheckParam(learningRate > 0, nameof(learningRate), "Must be positive"); Contracts.CheckValueOrNull(advancedSettings); Contracts.CheckValueOrNull(onFit); diff --git a/src/Microsoft.ML.HalLearners/ComputeLRTrainingStdThroughHal.cs b/src/Microsoft.ML.HalLearners/ComputeLRTrainingStdThroughHal.cs new file mode 100644 index 0000000000..66868c1c9a --- /dev/null +++ b/src/Microsoft.ML.HalLearners/ComputeLRTrainingStdThroughHal.cs @@ -0,0 +1,92 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Data; +using Microsoft.ML.Runtime.Internal.Utilities; +using Microsoft.ML.Trainers.HalLearners; +using System; + +namespace Microsoft.ML.Runtime.Learners +{ + using Mkl = OlsLinearRegressionTrainer.Mkl; + + public sealed class ComputeLRTrainingStdThroughHal : ComputeLRTrainingStd + { + /// + /// Computes the standart deviation matrix of each of the non-zero training weights, needed to calculate further the standart deviation, + /// p-value and z-Score. + /// If you need faster calculations, use the ComputeStd method from the Microsoft.ML.HALLearners package, which makes use of hardware acceleration. + /// Due to the existence of regularization, an approximation is used to compute the variances of the trained linear coefficients. + /// + /// + /// + /// + /// + /// The used for messaging. + /// The L2Weight used for training. (Supply the same one that got used during training.) + public override VBuffer ComputeStd(double[] hessian, int[] weightIndices, int numSelectedParams, int currentWeightsCount, IChannel ch, float l2Weight) + { + Contracts.AssertValue(ch); + Contracts.AssertValue(hessian, nameof(hessian)); + Contracts.Assert(numSelectedParams > 0); + Contracts.Assert(currentWeightsCount > 0); + Contracts.Assert(l2Weight > 0); + + // Apply Cholesky Decomposition to find the inverse of the Hessian. + Double[] invHessian = null; + try + { + // First, find the Cholesky decomposition LL' of the Hessian. + Mkl.Pptrf(Mkl.Layout.RowMajor, Mkl.UpLo.Lo, numSelectedParams, hessian); + // Note that hessian is already modified at this point. It is no longer the original Hessian, + // but instead represents the Cholesky decomposition L. + // Also note that the following routine is supposed to consume the Cholesky decomposition L instead + // of the original information matrix. + Mkl.Pptri(Mkl.Layout.RowMajor, Mkl.UpLo.Lo, numSelectedParams, hessian); + // At this point, hessian should contain the inverse of the original Hessian matrix. + // Swap hessian with invHessian to avoid confusion in the following context. + Utils.Swap(ref hessian, ref invHessian); + Contracts.Assert(hessian == null); + } + catch (DllNotFoundException) + { + throw ch.ExceptNotSupp("The MKL library (MklImports.dll) or one of its dependencies is missing."); + } + + float[] stdErrorValues = new float[numSelectedParams]; + stdErrorValues[0] = (float)Math.Sqrt(invHessian[0]); + + for (int i = 1; i < numSelectedParams; i++) + { + // Initialize with inverse Hessian. + stdErrorValues[i] = (float)invHessian[i * (i + 1) / 2 + i]; + } + + if (l2Weight > 0) + { + // Iterate through all entries of inverse Hessian to make adjustment to variance. + // A discussion on ridge regularized LR coefficient covariance matrix can be found here: + // http://www.aloki.hu/pdf/0402_171179.pdf (Equations 11 and 25) + // http://www.inf.unibz.it/dis/teaching/DWDM/project2010/LogisticRegression.pdf (Section "Significance testing in ridge logistic regression") + int ioffset = 1; + for (int iRow = 1; iRow < numSelectedParams; iRow++) + { + for (int iCol = 0; iCol <= iRow; iCol++) + { + var entry = (float)invHessian[ioffset++]; + AdjustVariance(entry, iRow, iCol, l2Weight, stdErrorValues); + } + } + + Contracts.Assert(ioffset == invHessian.Length); + } + + for (int i = 1; i < numSelectedParams; i++) + stdErrorValues[i] = (float)Math.Sqrt(stdErrorValues[i]); + + // currentWeights vector size is Weights2 + the bias + return new VBuffer(currentWeightsCount, numSelectedParams, stdErrorValues, weightIndices); + } + } +} diff --git a/src/Microsoft.ML.HalLearners/HalLearnersCatalog.cs b/src/Microsoft.ML.HalLearners/HalLearnersCatalog.cs index acb83d11e7..6dab814ab1 100644 --- a/src/Microsoft.ML.HalLearners/HalLearnersCatalog.cs +++ b/src/Microsoft.ML.HalLearners/HalLearnersCatalog.cs @@ -19,36 +19,36 @@ public static class HalLearnersCatalog /// Predict a target using a linear regression model trained with the . /// /// The . - /// The label column. - /// The features column. + /// The labelColumn column. + /// The features column. /// The weights column. /// Algorithm advanced settings. public static OlsLinearRegressionTrainer OrdinaryLeastSquares(this RegressionContext.RegressionTrainers ctx, - string label, - string features, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weights = null, Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new OlsLinearRegressionTrainer(env, label, features, weights, advancedSettings); + return new OlsLinearRegressionTrainer(env, labelColumn, featureColumn, weights, advancedSettings); } /// /// Predict a target using a linear regression model trained with the . /// /// The . - /// The label column. - /// The features column. + /// The labelColumn column. + /// The features column. /// Algorithm advanced settings. public static SymSgdClassificationTrainer SymbolicStochasticGradientDescent(this RegressionContext.RegressionTrainers ctx, - string label, - string features, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new SymSgdClassificationTrainer(env, label, features, advancedSettings); + return new SymSgdClassificationTrainer(env, labelColumn, featureColumn, advancedSettings); } } } diff --git a/src/Microsoft.ML.HalLearners/OlsLinearRegression.cs b/src/Microsoft.ML.HalLearners/OlsLinearRegression.cs index 626b069f14..c1dfab7957 100644 --- a/src/Microsoft.ML.HalLearners/OlsLinearRegression.cs +++ b/src/Microsoft.ML.HalLearners/OlsLinearRegression.cs @@ -68,13 +68,16 @@ public sealed class Arguments : LearnerInputBaseWithWeight /// Initializes a new instance of /// /// The environment to use. - /// The name of the label column. + /// The name of the labelColumn column. /// The name of the feature column. - /// The name for the example weight column. + /// The name for the optional example weight column. /// A delegate to apply all the advanced arguments to the algorithm. - public OlsLinearRegressionTrainer(IHostEnvironment env, string featureColumn, string labelColumn, - string weightColumn = null, Action advancedSettings = null) - : this(env, ArgsInit(featureColumn, labelColumn, weightColumn, advancedSettings)) + public OlsLinearRegressionTrainer(IHostEnvironment env, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, + Action advancedSettings = null) + : this(env, ArgsInit(featureColumn, labelColumn, weights, advancedSettings)) { } @@ -91,8 +94,10 @@ internal OlsLinearRegressionTrainer(IHostEnvironment env, Arguments args) _perParameterSignificance = args.PerParameterSignificance; } - private static Arguments ArgsInit(string featureColumn, string labelColumn, - string weightColumn, Action advancedSettings) + private static Arguments ArgsInit(string featureColumn, + string labelColumn, + string weightColumn, + Action advancedSettings) { var args = new Arguments(); @@ -125,19 +130,19 @@ protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSc private static Double ProbClamp(Double p) => Math.Max(0, Math.Min(p, 1)); - protected override OlsLinearRegressionPredictor TrainModelCore(TrainContext context) + private protected override OlsLinearRegressionPredictor TrainModelCore(TrainContext context) { using (var ch = Host.Start("Training")) { ch.CheckValue(context, nameof(context)); var examples = context.TrainingSet; ch.CheckParam(examples.Schema.Feature != null, nameof(examples), "Need a feature column"); - ch.CheckParam(examples.Schema.Label != null, nameof(examples), "Need a label column"); + ch.CheckParam(examples.Schema.Label != null, nameof(examples), "Need a labelColumn column"); - // The label type must be either Float or a key type based on int (if allowKeyLabels is true). + // The labelColumn type must be either Float or a key type based on int (if allowKeyLabels is true). var typeLab = examples.Schema.Label.Type; if (typeLab != NumberType.Float) - throw ch.Except("Incompatible label column type {0}, must be {1}", typeLab, NumberType.Float); + throw ch.Except("Incompatible labelColumn column type {0}, must be {1}", typeLab, NumberType.Float); // The feature type must be a vector of Float. var typeFeat = examples.Schema.Feature.Type; @@ -222,7 +227,7 @@ private OlsLinearRegressionPredictor TrainCore(IChannel ch, FloatLabelCursor.Fac } ch.Check(n > 0, "No training examples in dataset."); if (cursor.BadFeaturesRowCount > 0) - ch.Warning("Skipped {0} instances with missing features/label during training", cursor.SkippedRowCount); + ch.Warning("Skipped {0} instances with missing features/labelColumn during training", cursor.SkippedRowCount); if (_l2Weight > 0) { @@ -273,9 +278,11 @@ private OlsLinearRegressionPredictor TrainCore(IChannel ch, FloatLabelCursor.Fac for (int i = 0; i < beta.Length; ++i) ch.Check(FloatUtils.IsFinite(beta[i]), "Non-finite values detected in OLS solution"); - var weights = VBufferUtils.CreateDense(beta.Length - 1); + var weightsValues = new float[beta.Length - 1]; for (int i = 1; i < beta.Length; ++i) - weights.Values[i - 1] = (float)beta[i]; + weightsValues[i - 1] = (float)beta[i]; + var weights = new VBuffer(weightsValues.Length, weightsValues); + var bias = (float)beta[0]; if (!(_l2Weight > 0) && m == n) { @@ -665,8 +672,9 @@ private OlsLinearRegressionPredictor(IHostEnvironment env, ModelLoadContext ctx) _tValues = ctx.Reader.ReadDoubleArray(m); TValueCheckDecode(Bias, _tValues[0]); + var weightValues = Weight.GetValues(); for (int i = 1; i < m; ++i) - TValueCheckDecode(Weight.Values[i - 1], _tValues[i]); + TValueCheckDecode(weightValues[i - 1], _tValues[i]); _pValues = ctx.Reader.ReadDoubleArray(m); for (int i = 0; i < m; ++i) @@ -742,7 +750,7 @@ public override void SaveSummary(TextWriter writer, RoleMappedSchema schema) const string format = "{0}\t{1}\t{2}\t{3:g4}\t{4:g4}\t{5:e4}"; writer.WriteLine(format, "", "Bias", Bias, _standardErrors[0], _tValues[0], _pValues[0]); Contracts.Assert(Weight.IsDense); - var coeffs = Weight.Values; + var coeffs = Weight.GetValues(); for (int i = 0; i < coeffs.Length; i++) { var name = names.GetItemOrDefault(i); @@ -757,7 +765,7 @@ public override void SaveSummary(TextWriter writer, RoleMappedSchema schema) const string format = "{0}\t{1}\t{2}"; writer.WriteLine(format, "", "Bias", Bias); Contracts.Assert(Weight.IsDense); - var coeffs = Weight.Values; + var coeffs = Weight.GetValues(); for (int i = 0; i < coeffs.Length; i++) { var name = names.GetItemOrDefault(i); @@ -774,18 +782,16 @@ public override void GetFeatureWeights(ref VBuffer weights) return; } - var values = weights.Values; var size = _pValues.Length - 1; - if (Utils.Size(values) < size) - values = new float[size]; + var editor = VBufferEditor.Create(ref weights, size); for (int i = 0; i < size; i++) { var score = -(float)Math.Log(_pValues[i + 1]); if (score > float.MaxValue) score = float.MaxValue; - values[i] = score; + editor.Values[i] = score; } - weights = new VBuffer(size, values, weights.Indices); + weights = editor.Commit(); } } } diff --git a/src/Microsoft.ML.HalLearners/ProjectionCatalog.cs b/src/Microsoft.ML.HalLearners/ProjectionCatalog.cs new file mode 100644 index 0000000000..4485029fa4 --- /dev/null +++ b/src/Microsoft.ML.HalLearners/ProjectionCatalog.cs @@ -0,0 +1,47 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Transforms.Projections; + +namespace Microsoft.ML +{ + public static class ProjectionCatalog + { + /// + /// Takes column filled with a vector of random variables with a known covariance matrix into a set of new variables whose covariance is the identity matrix, + /// meaning that they are uncorrelated and each have variance 1. + /// + /// The transform's catalog. + /// Name of the input column. + /// Name of the column resulting from the transformation of . Null means is replaced. + /// Whitening kind (PCA/ZCA). + /// Whitening constant, prevents division by zero. + /// Maximum number of rows used to train the transform. + /// In case of PCA whitening, indicates the number of components to retain. + /// + /// + /// + /// + /// + public static VectorWhiteningEstimator VectorWhiten(this TransformsCatalog.ProjectionTransforms catalog, string inputColumn, string outputColumn = null, + WhiteningKind kind = VectorWhiteningTransformer.Defaults.Kind, + float eps = VectorWhiteningTransformer.Defaults.Eps, + int maxRows = VectorWhiteningTransformer.Defaults.MaxRows, + int pcaNum = VectorWhiteningTransformer.Defaults.PcaNum) + => new VectorWhiteningEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, kind, eps, maxRows, pcaNum); + + /// + /// Takes columns filled with a vector of random variables with a known covariance matrix into a set of new variables whose covariance is the identity matrix, + /// meaning that they are uncorrelated and each have variance 1. + /// + /// The transform's catalog. + /// Describes the parameters of the whitening process for each column pair. + public static VectorWhiteningEstimator VectorWhiten(this TransformsCatalog.ProjectionTransforms catalog, params VectorWhiteningTransformer.ColumnInfo[] columns) + => new VectorWhiteningEstimator(CatalogUtils.GetEnvironment(catalog), columns); + } +} diff --git a/src/Microsoft.ML.HalLearners/SymSgdClassificationTrainer.cs b/src/Microsoft.ML.HalLearners/SymSgdClassificationTrainer.cs index 214ca4d98c..590aa06e27 100644 --- a/src/Microsoft.ML.HalLearners/SymSgdClassificationTrainer.cs +++ b/src/Microsoft.ML.HalLearners/SymSgdClassificationTrainer.cs @@ -110,12 +110,12 @@ private RoleMappedData PrepareDataFromTrainingExamples(IChannel ch, RoleMappedDa idvToFeedTrain = idvToShuffle; else { - var shuffleArgs = new ShuffleTransform.Arguments + var shuffleArgs = new RowShufflingTransformer.Arguments { PoolOnly = false, ForceShuffle = _args.Shuffle }; - idvToFeedTrain = new ShuffleTransform(Host, shuffleArgs, idvToShuffle); + idvToFeedTrain = new RowShufflingTransformer(Host, shuffleArgs, idvToShuffle); } ch.Assert(idvToFeedTrain.CanShuffle); @@ -133,7 +133,7 @@ private RoleMappedData PrepareDataFromTrainingExamples(IChannel ch, RoleMappedDa return examplesToFeedTrain; } - protected override TPredictor TrainModelCore(TrainContext context) + private protected override TPredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); using (var ch = Host.Start("Training")) @@ -157,7 +157,10 @@ protected override TPredictor TrainModelCore(TrainContext context) /// The name of the label column. /// The name of the feature column. /// A delegate to apply all the advanced arguments to the algorithm. - public SymSgdClassificationTrainer(IHostEnvironment env, string featureColumn, string labelColumn, Action advancedSettings = null) + public SymSgdClassificationTrainer(IHostEnvironment env, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + Action advancedSettings = null) : base(Contracts.CheckRef(env, nameof(env)).Register(LoadNameValue), TrainerUtils.MakeR4VecFeature(featureColumn), TrainerUtils.MakeBoolScalarLabel(labelColumn)) { @@ -651,6 +654,8 @@ private TPredictor TrainCore(IChannel ch, RoleMappedData data, LinearPredictor p else weights = VBufferUtils.CreateDense(numFeatures); + var weightsEditor = VBufferEditor.CreateFromBuffer(ref weights); + // Reference: Parasail. SymSGD. bool tuneLR = _args.LearningRate == null; var lr = _args.LearningRate ?? 1.0f; @@ -685,7 +690,7 @@ private TPredictor TrainCore(IChannel ch, RoleMappedData data, LinearPredictor p pch.SetHeader(new ProgressHeader(new[] { "iterations" }), entry => entry.SetProgress(0, state.PassIteration, _args.NumberOfIterations)); // If fully loaded, call the SymSGDNative and do not come back until learned for all iterations. - Native.LearnAll(inputDataManager, tuneLR, ref lr, l2Const, piw, weights.Values, ref bias, numFeatures, + Native.LearnAll(inputDataManager, tuneLR, ref lr, l2Const, piw, weightsEditor.Values, ref bias, numFeatures, _args.NumberOfIterations, numThreads, tuneNumLocIter, ref numLocIter, _args.Tolerance, _args.Shuffle, shouldInitialize, stateGCHandle); shouldInitialize = false; } @@ -706,7 +711,7 @@ private TPredictor TrainCore(IChannel ch, RoleMappedData data, LinearPredictor p // If all of this leaves us with 0 passes, then set numPassesForThisBatch to 1 numPassesForThisBatch = Math.Max(1, numPassesForThisBatch); state.PassIteration = iter; - Native.LearnAll(inputDataManager, tuneLR, ref lr, l2Const, piw, weights.Values, ref bias, numFeatures, + Native.LearnAll(inputDataManager, tuneLR, ref lr, l2Const, piw, weightsEditor.Values, ref bias, numFeatures, numPassesForThisBatch, numThreads, tuneNumLocIter, ref numLocIter, _args.Tolerance, _args.Shuffle, shouldInitialize, stateGCHandle); shouldInitialize = false; @@ -727,7 +732,7 @@ private TPredictor TrainCore(IChannel ch, RoleMappedData data, LinearPredictor p // Maps back the dense features that are mislocated if (numThreads > 1) - Native.MapBackWeightVector(weights.Values, stateGCHandle); + Native.MapBackWeightVector(weightsEditor.Values, stateGCHandle); Native.DeallocateSequentially(stateGCHandle); } } @@ -781,7 +786,7 @@ private static extern void LearnAll(int totalNumInstances, int* instSizes, int** /// Specifies if this is the first time to run SymSGD /// public static void LearnAll(InputDataManager inputDataManager, bool tuneLR, - ref float lr, float l2Const, float piw, float[] weightVector, ref float bias, int numFeatres, int numPasses, + ref float lr, float l2Const, float piw, Span weightVector, ref float bias, int numFeatres, int numPasses, int numThreads, bool tuneNumLocIter, ref int numLocIter, float tolerance, bool needShuffle, bool shouldInitialize, GCHandle stateGCHandle) { inputDataManager.PrepareCursoring(); @@ -835,7 +840,7 @@ public static void LearnAll(InputDataManager inputDataManager, bool tuneLR, /// /// The weight vector /// - public static void MapBackWeightVector(float[] weightVector, GCHandle stateGCHandle) + public static void MapBackWeightVector(Span weightVector, GCHandle stateGCHandle) { fixed (float* pweightVector = &weightVector[0]) MapBackWeightVector(pweightVector, (State*)stateGCHandle.AddrOfPinnedObject()); diff --git a/src/Microsoft.ML.HalLearners/TransformsStatic.cs b/src/Microsoft.ML.HalLearners/TransformsStatic.cs new file mode 100644 index 0000000000..87ea5a2c0f --- /dev/null +++ b/src/Microsoft.ML.HalLearners/TransformsStatic.cs @@ -0,0 +1,80 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Core.Data; +using Microsoft.ML.Runtime; +using Microsoft.ML.StaticPipe.Runtime; +using Microsoft.ML.Transforms.Projections; +using System.Collections.Generic; + +namespace Microsoft.ML.StaticPipe +{ + /// + /// Extensions for statically typed Whitening estimator. + /// + public static class VectorWhiteningExtensions + { + private sealed class OutPipelineColumn : Vector + { + public readonly Vector Input; + + public OutPipelineColumn(Vector input, WhiteningKind kind, float eps, int maxRows, int pcaNum) + : base(new Reconciler(kind, eps, maxRows, pcaNum), input) + { + Input = input; + } + } + + private sealed class Reconciler : EstimatorReconciler + { + private readonly WhiteningKind _kind; + private readonly float _eps; + private readonly int _maxRows; + private readonly int _pcaNum; + + public Reconciler(WhiteningKind kind, float eps, int maxRows, int pcaNum) + { + _kind = kind; + _eps = eps; + _maxRows = maxRows; + _pcaNum = pcaNum; + } + + public override IEstimator Reconcile(IHostEnvironment env, + PipelineColumn[] toOutput, + IReadOnlyDictionary inputNames, + IReadOnlyDictionary outputNames, + IReadOnlyCollection usedNames) + { + Contracts.Assert(toOutput.Length == 1); + + var infos = new VectorWhiteningTransformer.ColumnInfo[toOutput.Length]; + for (int i = 0; i < toOutput.Length; i++) + infos[i] = new VectorWhiteningTransformer.ColumnInfo(inputNames[((OutPipelineColumn)toOutput[i]).Input], outputNames[toOutput[i]], _kind, _eps, _maxRows, _pcaNum); + + return new VectorWhiteningEstimator(env, infos); + } + } + + /// + /// The column to which the transform will be applied. + /// Whitening constant, prevents division by zero when scaling the data by inverse of eigenvalues. + /// Maximum number of rows used to train the transform. + /// In case of PCA whitening, indicates the number of components to retain. + public static Vector PcaWhitening(this Vector input, + float eps = VectorWhiteningTransformer.Defaults.Eps, + int maxRows = VectorWhiteningTransformer.Defaults.MaxRows, + int pcaNum = VectorWhiteningTransformer.Defaults.PcaNum) + => new OutPipelineColumn(input, WhiteningKind.Pca, eps, maxRows, pcaNum); + + /// + /// The column to which the transform will be applied. + /// Whitening constant, prevents division by zero. + /// Maximum number of rows used to train the transform. + public static Vector ZcaWhitening(this Vector input, + float eps = VectorWhiteningTransformer.Defaults.Eps, + int maxRows = VectorWhiteningTransformer.Defaults.MaxRows) + => new OutPipelineColumn(input, WhiteningKind.Zca, eps, maxRows, VectorWhiteningTransformer.Defaults.PcaNum); + } +} diff --git a/src/Microsoft.ML.HalLearners/VectorWhitening.cs b/src/Microsoft.ML.HalLearners/VectorWhitening.cs new file mode 100644 index 0000000000..0d10a89c48 --- /dev/null +++ b/src/Microsoft.ML.HalLearners/VectorWhitening.cs @@ -0,0 +1,821 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Core.Data; +using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.CommandLine; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Internal.CpuMath; +using Microsoft.ML.Runtime.Internal.Internallearn; +using Microsoft.ML.Runtime.Internal.Utilities; +using Microsoft.ML.Runtime.Model; +using Microsoft.ML.StaticPipe; +using Microsoft.ML.StaticPipe.Runtime; +using Microsoft.ML.Transforms.Projections; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; + +[assembly: LoadableClass(VectorWhiteningTransformer.Summary, typeof(IDataTransform), typeof(VectorWhiteningTransformer), typeof(VectorWhiteningTransformer.Arguments), typeof(SignatureDataTransform), + VectorWhiteningTransformer.FriendlyName, VectorWhiteningTransformer.LoaderSignature, "Whitening")] + +[assembly: LoadableClass(VectorWhiteningTransformer.Summary, typeof(IDataTransform), typeof(VectorWhiteningTransformer), null, typeof(SignatureLoadDataTransform), + VectorWhiteningTransformer.FriendlyName, VectorWhiteningTransformer.LoaderSignature, VectorWhiteningTransformer.LoaderSignatureOld)] + +[assembly: LoadableClass(VectorWhiteningTransformer.Summary, typeof(VectorWhiteningTransformer), null, typeof(SignatureLoadModel), + VectorWhiteningTransformer.FriendlyName, VectorWhiteningTransformer.LoaderSignature)] + +[assembly: LoadableClass(typeof(IRowMapper), typeof(VectorWhiteningTransformer), null, typeof(SignatureLoadRowMapper), + VectorWhiteningTransformer.FriendlyName, VectorWhiteningTransformer.LoaderSignature)] + +namespace Microsoft.ML.Transforms.Projections +{ + public enum WhiteningKind + { + [TGUI(Label = "PCA whitening")] + Pca, + + [TGUI(Label = "ZCA whitening")] + Zca + } + + /// + public sealed class VectorWhiteningTransformer : OneToOneTransformerBase + { + internal static class Defaults + { + public const WhiteningKind Kind = WhiteningKind.Zca; + public const float Eps = 1e-5f; + public const int MaxRows = 100 * 1000; + public const bool SaveInverse = false; + public const int PcaNum = 0; + } + + public sealed class Arguments + { + [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "New column definition(s) (optional form: name:src)", ShortName = "col", SortOrder = 1)] + public Column[] Column; + + [Argument(ArgumentType.AtMostOnce, HelpText = "Whitening kind (PCA/ZCA)")] + public WhiteningKind Kind = Defaults.Kind; + + [Argument(ArgumentType.AtMostOnce, HelpText = "Scaling regularizer")] + public float Eps = Defaults.Eps; + + [Argument(ArgumentType.AtMostOnce, HelpText = "Max number of rows", ShortName = "rows")] + public int MaxRows = Defaults.MaxRows; + + [Argument(ArgumentType.AtMostOnce, HelpText = "Whether to save inverse (recovery) matrix", ShortName = "saveInv")] + public bool SaveInverse = Defaults.SaveInverse; + + [Argument(ArgumentType.AtMostOnce, HelpText = "PCA components to retain")] + public int PcaNum = Defaults.PcaNum; + + // REVIEW: add the following options: + // 1. Currently there is no way to apply an inverse transform AFTER the the transform is trained. + // 2. How many PCA components to retain/drop. Options: retain-first, drop-first, variance-threshold. + } + + public sealed class Column : OneToOneColumn + { + [Argument(ArgumentType.AtMostOnce, HelpText = "Whitening kind (PCA/ZCA)")] + public WhiteningKind? Kind; + + [Argument(ArgumentType.AtMostOnce, HelpText = "Scaling regularizer")] + public float? Eps; + + [Argument(ArgumentType.AtMostOnce, HelpText = "Max number of rows", ShortName = "rows")] + public int? MaxRows; + + [Argument(ArgumentType.AtMostOnce, HelpText = "Whether to save inverse (recovery) matrix", ShortName = "saveInv")] + public bool? SaveInverse; + + [Argument(ArgumentType.AtMostOnce, HelpText = "PCA components to keep/drop")] + public int? PcaNum; + + public static Column Parse(string str) + { + Contracts.AssertNonEmpty(str); + + var res = new Column(); + if (res.TryParse(str)) + return res; + return null; + } + + public bool TryUnparse(StringBuilder sb) + { + Contracts.AssertValue(sb); + if (Kind != null || Eps != null || MaxRows != null || SaveInverse != null || PcaNum != null) + return false; + return TryUnparseCore(sb); + } + } + + public sealed class ColumnInfo + { + public readonly string Input; + public readonly string Output; + public readonly WhiteningKind Kind; + public readonly float Epsilon; + public readonly int MaxRow; + public readonly int PcaNum; + internal readonly bool SaveInv; + + /// + /// Describes how the transformer handles one input-output column pair. + /// + /// Name of the input column. + /// Name of the column resulting from the transformation of . Null means is replaced. + /// Whitening kind (PCA/ZCA). + /// Whitening constant, prevents division by zero. + /// Maximum number of rows used to train the transform. + /// In case of PCA whitening, indicates the number of components to retain. + public ColumnInfo(string input, string output = null, WhiteningKind kind = Defaults.Kind, float eps = Defaults.Eps, + int maxRows = Defaults.MaxRows, int pcaNum = Defaults.PcaNum) + { + Input = input; + Contracts.CheckValue(Input, nameof(Input)); + Output = output ?? input; + Contracts.CheckValue(Output, nameof(Output)); + Kind = kind; + Contracts.CheckUserArg(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca, nameof(Kind)); + Epsilon = eps; + Contracts.CheckUserArg(0 <= Epsilon && Epsilon < float.PositiveInfinity, nameof(Epsilon)); + MaxRow = maxRows; + Contracts.CheckUserArg(MaxRow > 0, nameof(MaxRow)); + SaveInv = Defaults.SaveInverse; + PcaNum = pcaNum; // REVIEW: make it work with pcaNum == 1. + Contracts.CheckUserArg(PcaNum >= 0, nameof(PcaNum)); + } + + internal ColumnInfo(Column item, Arguments args) + { + Input = item.Source ?? item.Name; + Contracts.CheckValue(Input, nameof(Input)); + Output = item.Name; + Contracts.CheckValue(Output, nameof(Output)); + Kind = item.Kind ?? args.Kind; + Contracts.CheckUserArg(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca, nameof(item.Kind)); + Epsilon = item.Eps ?? args.Eps; + Contracts.CheckUserArg(0 <= Epsilon && Epsilon < float.PositiveInfinity, nameof(item.Eps)); + MaxRow = item.MaxRows ?? args.MaxRows; + Contracts.CheckUserArg(MaxRow > 0, nameof(item.MaxRows)); + SaveInv = item.SaveInverse ?? args.SaveInverse; + PcaNum = item.PcaNum ?? args.PcaNum; + Contracts.CheckUserArg(PcaNum >= 0, nameof(item.PcaNum)); + } + + internal ColumnInfo(ModelLoadContext ctx) + { + Contracts.AssertValue(ctx); + + // *** Binary format *** + // int: kind + // float: epsilon + // int: maxrow + // byte: saveInv + // int: pcaNum + Kind = (WhiteningKind)ctx.Reader.ReadInt32(); + Contracts.CheckDecode(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca); + Epsilon = ctx.Reader.ReadFloat(); + Contracts.CheckDecode(0 <= Epsilon && Epsilon < float.PositiveInfinity); + MaxRow = ctx.Reader.ReadInt32(); + Contracts.CheckDecode(MaxRow > 0); + SaveInv = ctx.Reader.ReadBoolByte(); + PcaNum = ctx.Reader.ReadInt32(); + Contracts.CheckDecode(PcaNum >= 0); + } + + internal void Save(ModelSaveContext ctx) + { + Contracts.AssertValue(ctx); + + // *** Binary format *** + // int: kind + // float: epsilon + // int: maxrow + // byte: saveInv + // int: pcaNum + Contracts.Assert(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca); + ctx.Writer.Write((int)Kind); + Contracts.Assert(0 <= Epsilon && Epsilon < float.PositiveInfinity); + ctx.Writer.Write(Epsilon); + Contracts.Assert(MaxRow > 0); + ctx.Writer.Write(MaxRow); + ctx.Writer.WriteBoolByte(SaveInv); + Contracts.Assert(PcaNum >= 0); + ctx.Writer.Write(PcaNum); + } + } + + private const Mkl.Layout Layout = Mkl.Layout.RowMajor; + + // Stores whitening matrix as float[] for each column. _models[i] is the whitening matrix of the i-th input column. + private readonly float[][] _models; + // Stores inverse ("recover") matrix as float[] for each column. Temporarily internal as it's used in unit test. + // REVIEW: It doesn't look like this is used by non-test code. Should it be saved at all? + private readonly float[][] _invModels; + + internal const string Summary = "Apply PCA or ZCA whitening algorithm to the input."; + + internal const string FriendlyName = "Whitening Transform"; + internal const string LoaderSignature = "WhiteningTransform"; + internal const string LoaderSignatureOld = "WhiteningFunction"; + private static VersionInfo GetVersionInfo() + { + return new VersionInfo( + modelSignature: "WHITENTF", + verWrittenCur: 0x00010001, // Initial + verReadableCur: 0x00010001, + verWeCanReadBack: 0x00010001, + loaderSignature: LoaderSignature, + loaderSignatureAlt: LoaderSignatureOld, + loaderAssemblyName: typeof(VectorWhiteningTransformer).Assembly.FullName); + } + + private readonly ColumnInfo[] _columns; + + /// + /// Initializes a new object. + /// + /// Host Environment. + /// An array of whitening matrices where models[i] is learned from the i-th element of . + /// An array of inverse whitening matrices, the i-th element being the inverse matrix of models[i]. + /// Describes the parameters of the whitening process for each column pair. + internal VectorWhiteningTransformer(IHostEnvironment env, float[][] models, float[][] invModels, params ColumnInfo[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(VectorWhiteningTransformer)), GetColumnPairs(columns)) + { + Host.AssertNonEmpty(ColumnPairs); + _columns = columns; + _models = models; + _invModels = invModels; + } + + private VectorWhiteningTransformer(IHostEnvironment env, ModelLoadContext ctx) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(VectorWhiteningTransformer)), ctx) + { + Host.AssertValue(ctx); + + // *** Binary format *** + // + // foreach column pair + // ColumnInfo + // foreach model + // whitening matrix + // recovery matrix + + Host.AssertNonEmpty(ColumnPairs); + _columns = new ColumnInfo[ColumnPairs.Length]; + for (int i = 0; i < _columns.Length; i++) + _columns[i] = new ColumnInfo(ctx); + + _models = new float[ColumnPairs.Length][]; + _invModels = new float[ColumnPairs.Length][]; + for (int i = 0; i < ColumnPairs.Length; i++) + { + _models[i] = ctx.Reader.ReadFloatArray(); + if (_columns[i].SaveInv) + _invModels[i] = ctx.Reader.ReadFloatArray(); + } + } + + // Factory method for SignatureLoadModel + internal static VectorWhiteningTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + { + Contracts.CheckValue(env, nameof(env)); + ctx.CheckAtModel(GetVersionInfo()); + return new VectorWhiteningTransformer(env, ctx); + } + + // Factory method for SignatureDataTransform. + internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) + { + var infos = args.Column.Select(colPair => new ColumnInfo(colPair, args)).ToArray(); + (var models, var invModels) = TrainVectorWhiteningTransform(env, input, infos); + return new VectorWhiteningTransformer(env, models, invModels, infos).MakeDataTransform(input); + } + + // Factory method for SignatureLoadDataTransform. + internal static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + => Create(env, ctx).MakeDataTransform(input); + + // Factory method for SignatureLoadRowMapper. + internal static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) + => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); + + private static (string input, string output)[] GetColumnPairs(ColumnInfo[] columns) + => columns.Select(c => (c.Input, c.Output ?? c.Input)).ToArray(); + + protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCol) + { + var inType = inputSchema.GetColumnType(srcCol); + var reason = TestColumn(inType); + if (reason != null) + throw Host.ExceptParam(nameof(inputSchema), reason); + } + + // Check if the input column's type is supported. Note that only float vector with a known shape is allowed. + internal static string TestColumn(ColumnType type) + { + if ((type.IsVector && !type.IsKnownSizeVector && (type.AsVector.Dimensions.Length > 1)) || type.ItemType != NumberType.R4) + return "Expected float or float vector of known size"; + + if ((long)type.ValueCount * type.ValueCount > Utils.ArrayMaxSize) + return "Vector size exceeds maximum size for one dimensional array (2 146 435 071 elements)"; + + return null; + } + + private static void ValidateModel(IExceptionContext ectx, float[] model, ColumnType col) + { + ectx.CheckDecode(Utils.Size(model) == (long)col.ValueCount * col.ValueCount, "Invalid model size."); + for (int i = 0; i < model.Length; i++) + ectx.CheckDecode(FloatUtils.IsFinite(model[i]), "Found NaN or infinity in the model."); + } + + // Sometime GetRowCount doesn't really return the number of rows in the associated IDataView. + // A more reliable solution is to turely iterate through all rows via a RowCursor. + private static long GetRowCount(IDataView inputData, params ColumnInfo[] columns) + { + long? rows = inputData.GetRowCount(); + if (rows != null) + return rows.GetValueOrDefault(); + + int maxRows = columns.Max(i => i.MaxRow); + long r = 0; + using (var cursor = inputData.GetRowCursor(col => false)) + { + while (r < maxRows && cursor.MoveNext()) + r++; + } + return r; + } + + // Computes the transformation matrices needed for whitening process from training data. + internal static (float[][] models, float[][] invModels) TrainVectorWhiteningTransform(IHostEnvironment env, IDataView inputData, params ColumnInfo[] columns) + { + var models = new float[columns.Length][]; + var invModels = new float[columns.Length][]; + // The training process will load all data into memory and perform whitening process + // for each resulting column separately. + using (var ch = env.Start("Training")) + { + GetColTypesAndIndex(env, inputData, columns, out ColumnType[] srcTypes, out int[] cols); + var columnData = LoadDataAsDense(env, ch, inputData, out int[] rowCounts, srcTypes, cols, columns); + TrainModels(env, ch, columnData, rowCounts, ref models, ref invModels, srcTypes, columns); + } + return (models, invModels); + } + + // Extracts the indices and types of the input columns to the whitening transform. + private static void GetColTypesAndIndex(IHostEnvironment env, IDataView inputData, ColumnInfo[] columns, out ColumnType[] srcTypes, out int[] cols) + { + cols = new int[columns.Length]; + srcTypes = new ColumnType[columns.Length]; + var inputSchema = inputData.Schema; + + for (int i = 0; i < columns.Length; i++) + { + if (!inputSchema.TryGetColumnIndex(columns[i].Input, out cols[i])) + throw env.ExceptSchemaMismatch(nameof(inputSchema), "input", columns[i].Input); + srcTypes[i] = inputSchema.GetColumnType(cols[i]); + var reason = TestColumn(srcTypes[i]); + if (reason != null) + throw env.ExceptParam(nameof(inputData.Schema), reason); + } + } + + // Loads all relevant data for whitening training into memory. + private static float[][] LoadDataAsDense(IHostEnvironment env, IChannel ch, IDataView inputData, out int[] actualRowCounts, + ColumnType[] srcTypes, int[] cols, params ColumnInfo[] columns) + { + long crowData = GetRowCount(inputData, columns); + + var columnData = new float[columns.Length][]; + actualRowCounts = new int[columns.Length]; + int maxActualRowCount = 0; + + for (int i = 0; i < columns.Length; i++) + { + ch.Assert(srcTypes[i].IsVector && srcTypes[i].IsKnownSizeVector); + // Use not more than MaxRow number of rows. + var ex = columns[i]; + if (crowData <= ex.MaxRow) + actualRowCounts[i] = (int)crowData; + else + { + ch.Info(MessageSensitivity.Schema, "Only {0:N0} rows of column '{1}' will be used for whitening transform.", ex.MaxRow, columns[i].Output); + actualRowCounts[i] = ex.MaxRow; + } + + int cslot = srcTypes[i].ValueCount; + // Check that total number of values in matrix does not exceed int.MaxValue and adjust row count if necessary. + if ((long)cslot * actualRowCounts[i] > int.MaxValue) + { + actualRowCounts[i] = int.MaxValue / cslot; + ch.Info(MessageSensitivity.Schema, "Only {0:N0} rows of column '{1}' will be used for whitening transform.", actualRowCounts[i], columns[i].Output); + } + columnData[i] = new float[cslot * actualRowCounts[i]]; + if (actualRowCounts[i] > maxActualRowCount) + maxActualRowCount = actualRowCounts[i]; + } + var idxDst = new int[columns.Length]; + + var colsSet = new HashSet(cols); + using (var cursor = inputData.GetRowCursor(colsSet.Contains)) + { + var getters = new ValueGetter>[columns.Length]; + for (int i = 0; i < columns.Length; i++) + getters[i] = cursor.GetGetter>(cols[i]); + var val = default(VBuffer); + int irow = 0; + while (irow < maxActualRowCount && cursor.MoveNext()) + { + for (int i = 0; i < columns.Length; i++) + { + if (irow >= actualRowCounts[i] || columnData[i].Length == 0) + continue; + + getters[i](ref val); + val.CopyTo(columnData[i], idxDst[i]); + idxDst[i] += srcTypes[i].ValueCount; + } + irow++; + } +#if DEBUG + for (int i = 0; i < columns.Length; i++) + ch.Assert(idxDst[i] == columnData[i].Length); +#endif + } + return columnData; + } + + // Performs whitening training for each column separately. Notice that for both PCA and ZCA, _models and _invModels + // will have dimension input_vec_size x input_vec_size. In the getter, the matrix will be truncated to only keep + // PcaNum columns, and thus produce the desired output size. + private static void TrainModels(IHostEnvironment env, IChannel ch, float[][] columnData, int[] rowCounts, + ref float[][] models, ref float[][] invModels, ColumnType[] srcTypes, params ColumnInfo[] columns) + { + ch.Assert(columnData.Length == rowCounts.Length); + + for (int iinfo = 0; iinfo < columns.Length; iinfo++) + { + var ex = columns[iinfo]; + var data = columnData[iinfo]; + int crow = rowCounts[iinfo]; + int ccol = srcTypes[iinfo].ValueCount; + + // If there is no training data, simply initialize the model matrices to identity matrices. + if (crow == 0) + { + var matrixSize = ccol * ccol; + models[iinfo] = new float[matrixSize]; + invModels[iinfo] = new float[matrixSize]; + for (int i = 0; i < ccol; i++) + { + models[iinfo][i * ccol + i] = 1; + invModels[iinfo][i * ccol + i] = 1; + } + continue; + } + + // Compute covariance matrix. + var u = new float[ccol * ccol]; + ch.Info("Computing covariance matrix..."); + Mkl.Gemm(Layout, Mkl.Transpose.Trans, Mkl.Transpose.NoTrans, + ccol, ccol, crow, 1 / (float)crow, data, ccol, data, ccol, 0, u, ccol); + + ch.Info("Computing SVD..."); + var eigValues = new float[ccol]; // Eigenvalues. + var unconv = new float[ccol]; // Superdiagonal unconverged values (if any). Not used but seems to be required by MKL. + // After the next call, values in U will be ovewritten by left eigenvectors. + // Each column in U will be an eigenvector. + int r = Mkl.Svd(Layout, Mkl.SvdJob.MinOvr, Mkl.SvdJob.None, + ccol, ccol, u, ccol, eigValues, null, ccol, null, ccol, unconv); + ch.Assert(r == 0); + if (r > 0) + throw ch.Except("SVD did not converge."); + if (r < 0) + throw ch.Except("Invalid arguments to LAPACK gesvd, error: {0}", r); + + ch.Info("Scaling eigenvectors..."); + // Scale eigenvalues first so we don't have to compute sqrt for every matrix element. + // Scaled eigenvalues are used to compute inverse transformation matrix + // while reciprocal (eigValuesRcp) values are used to compute whitening matrix. + for (int i = 0; i < eigValues.Length; i++) + eigValues[i] = MathUtils.Sqrt(Math.Max(0, eigValues[i]) + ex.Epsilon); + var eigValuesRcp = new float[eigValues.Length]; + for (int i = 0; i < eigValuesRcp.Length; i++) + eigValuesRcp[i] = 1 / eigValues[i]; + + // Scale eigenvectors. Note that resulting matrix is transposed, so the scaled + // eigenvectors are stored row-wise. + var uScaled = new float[u.Length]; + var uInvScaled = new float[u.Length]; + int isrc = 0; + for (int irowSrc = 0; irowSrc < ccol; irowSrc++) + { + int idst = irowSrc; + for (int icolSrc = 0; icolSrc < ccol; icolSrc++) + { + uScaled[idst] = u[isrc] * eigValuesRcp[icolSrc]; + uInvScaled[idst] = u[isrc] * eigValues[icolSrc]; + isrc++; + idst += ccol; + } + } + + // For ZCA need to do additional multiply by U. + if (ex.Kind == WhiteningKind.Pca) + { + // Save all components for PCA. Retained components will be selected during evaluation. + models[iinfo] = uScaled; + if (ex.SaveInv) + invModels[iinfo] = uInvScaled; + } + else if (ex.Kind == WhiteningKind.Zca) + { + models[iinfo] = new float[u.Length]; + Mkl.Gemm(Layout, Mkl.Transpose.NoTrans, Mkl.Transpose.NoTrans, + ccol, ccol, ccol, 1, u, ccol, uScaled, ccol, 0, models[iinfo], ccol); + + if (ex.SaveInv) + { + invModels[iinfo] = new float[u.Length]; + Mkl.Gemm(Layout, Mkl.Transpose.NoTrans, Mkl.Transpose.NoTrans, + ccol, ccol, ccol, 1, u, ccol, uInvScaled, ccol, 0, invModels[iinfo], ccol); + } + } + else + ch.Assert(false); + } + } + + public override void Save(ModelSaveContext ctx) + { + Host.CheckValue(ctx, nameof(ctx)); + ctx.CheckAtModel(); + ctx.SetVersionInfo(GetVersionInfo()); + + // *** Binary format *** + // + // foreach column pair + // ColumnInfo + // foreach model + // whitening matrix + // recovery matrix + + SaveColumns(ctx); + + Host.Assert(_columns.Length == ColumnPairs.Length); + for (int i = 0; i < _columns.Length; i++) + _columns[i].Save(ctx); + for (int i = 0; i < _models.Length; i++) + { + ctx.Writer.WriteSingleArray(_models[i]); + if (_columns[i].SaveInv) + ctx.Writer.WriteSingleArray(_invModels[i]); + } + } + + private static class Mkl + { + private const string DllName = "MklImports"; + + // The allowed value of Layout is specified in Intel's MLK library. See Layout parameter in this + // [doc](https://software.intel.com/en-us/mkl-developer-reference-c-cblas-gemm) for details. + public enum Layout + { + RowMajor = 101, + ColMajor = 102 + } + + // The allowed value of Transpose is specified in Intel's MLK library. See transa parameter in this + // [doc](https://software.intel.com/en-us/mkl-developer-reference-c-cblas-gemm) for details. + public enum Transpose + { + NoTrans = 111, + Trans = 112, + ConjTrans = 113 + } + + // The allowed value of SvdJob is specified in Intel's MLK library. See jobvt parameter in this + // [doc](https://software.intel.com/en-us/node/521150) for details. + public enum SvdJob : byte + { + None = (byte)'N', + All = (byte)'A', + Min = (byte)'S', + MinOvr = (byte)'O', + } + + public static unsafe void Gemv(Layout layout, Transpose trans, int m, int n, float alpha, + float[] a, int lda, ReadOnlySpan x, int incx, float beta, Span y, int incy) + { + fixed (float* pA = a) + fixed (float* pX = x) + fixed (float* pY = y) + Gemv(layout, trans, m, n, alpha, pA, lda, pX, incx, beta, pY, incy); + } + + // See: https://software.intel.com/en-us/node/520750 + [DllImport(DllName, EntryPoint = "cblas_sgemv")] + private static unsafe extern void Gemv(Layout layout, Transpose trans, int m, int n, float alpha, + float* a, int lda, float* x, int incx, float beta, float* y, int incy); + + // See: https://software.intel.com/en-us/node/520775 + [DllImport(DllName, EntryPoint = "cblas_sgemm")] + public static extern void Gemm(Layout layout, Transpose transA, Transpose transB, int m, int n, int k, float alpha, + float[] a, int lda, float[] b, int ldb, float beta, float[] c, int ldc); + + // See: https://software.intel.com/en-us/node/521150 + [DllImport(DllName, EntryPoint = "LAPACKE_sgesvd")] + public static extern int Svd(Layout layout, SvdJob jobu, SvdJob jobvt, + int m, int n, float[] a, int lda, float[] s, float[] u, int ldu, float[] vt, int ldvt, float[] superb); + } + + protected override IRowMapper MakeRowMapper(Schema schema) + => new Mapper(this, schema); + + private sealed class Mapper : OneToOneMapperBase + { + private readonly VectorWhiteningTransformer _parent; + private readonly int[] _cols; + private readonly ColumnType[] _srcTypes; + + public Mapper(VectorWhiteningTransformer parent, Schema inputSchema) + : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) + { + _parent = parent; + _cols = new int[_parent.ColumnPairs.Length]; + _srcTypes = new ColumnType[_parent.ColumnPairs.Length]; + + for (int i = 0; i < _parent.ColumnPairs.Length; i++) + { + if (!InputSchema.TryGetColumnIndex(_parent.ColumnPairs[i].input, out _cols[i])) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.ColumnPairs[i].input); + _srcTypes[i] = inputSchema.GetColumnType(_cols[i]); + ValidateModel(Host, _parent._models[i], _srcTypes[i]); + if (_parent._columns[i].SaveInv) + ValidateModel(Host, _parent._invModels[i], _srcTypes[i]); + } + } + + /// + /// For PCA, the transform equation is y=U^Tx, where "^T" denotes matrix transpose, x is an 1-D vector (i.e., the input column), and U=[u_1, ..., u_PcaNum] + /// is a n-by-PcaNum matrix. The symbol u_k is the k-th largest (in terms of the associated eigenvalue) eigenvector of (1/m)*\sum_{i=1}^m x_ix_i^T, + /// where x_i is the whitened column at the i-th row and we have m rows in the training data. + /// For ZCA, the transform equation is y = US^{-1/2}U^Tx, where U=[u_1, ..., u_n] (we retain all eigenvectors) and S is a diagonal matrix whose i-th + /// diagonal element is the eigenvalues of u_i. The first U^Tx rotates x to another linear space (bases are u_1, ..., u_n), then S^{-1/2} is applied + /// to ensure unit variance, and finally we rotate the scaled result back to the original space using U (note that UU^T is identity matrix so U is + /// the inverse rotation of U^T). + /// + protected override Schema.Column[] GetOutputColumnsCore() + { + var result = new Schema.Column[_parent.ColumnPairs.Length]; + for (int iinfo = 0; iinfo < _parent.ColumnPairs.Length; iinfo++) + { + InputSchema.TryGetColumnIndex(_parent.ColumnPairs[iinfo].input, out int colIndex); + Host.Assert(colIndex >= 0); + var info = _parent._columns[iinfo]; + ColumnType outType = (info.Kind == WhiteningKind.Pca && info.PcaNum > 0) ? new VectorType(NumberType.Float, info.PcaNum) : _srcTypes[iinfo]; + result[iinfo] = new Schema.Column(_parent.ColumnPairs[iinfo].output, outType, null); + } + return result; + } + + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + { + Host.AssertValue(input); + Host.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); + disposer = null; + + var ex = _parent._columns[iinfo]; + Host.Assert(ex.Kind == WhiteningKind.Pca || ex.Kind == WhiteningKind.Zca); + var getSrc = GetSrcGetter>(input, iinfo); + var src = default(VBuffer); + int cslotSrc = _srcTypes[iinfo].ValueCount; + // Notice that here that the learned matrices in _models will have the same size for both PCA and ZCA, + // so we perform a truncation of the matrix in FillValues, that only keeps PcaNum columns. + int cslotDst = (ex.Kind == WhiteningKind.Pca && ex.PcaNum > 0) ? ex.PcaNum : _srcTypes[iinfo].ValueCount; + var model = _parent._models[iinfo]; + ValueGetter> del = + (ref VBuffer dst) => + { + getSrc(ref src); + Host.Check(src.Length == cslotSrc, "Invalid column size."); + FillValues(model, ref src, ref dst, cslotDst); + }; + return del; + } + + private ValueGetter GetSrcGetter(IRow input, int iinfo) + { + Host.AssertValue(input); + Host.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); + int src = _cols[iinfo]; + Host.Assert(input.IsColumnActive(src)); + return input.GetGetter(src); + } + + private static void FillValues(float[] model, ref VBuffer src, ref VBuffer dst, int cdst) + { + var values = src.GetValues(); + int count = values.Length; + int length = src.Length; + + // Since the whitening process produces dense vector, always use dense representation of dst. + var editor = VBufferEditor.Create(ref dst, cdst); + if (src.IsDense) + { + Mkl.Gemv(Mkl.Layout.RowMajor, Mkl.Transpose.NoTrans, cdst, length, + 1, model, length, values, 1, 0, editor.Values, 1); + } + else + { + var indices = src.GetIndices(); + + int offs = 0; + for (int i = 0; i < cdst; i++) + { + // Returns a dot product of dense vector 'model' starting from offset 'offs' and sparse vector 'values' + // with first 'count' valid elements and their corresponding 'indices'. + editor.Values[i] = CpuMathUtils.DotProductSparse(model.AsSpan(offs), values, indices, count); + offs += length; + } + } + dst = editor.Commit(); + } + + private static float DotProduct(float[] a, int aOffset, ReadOnlySpan b, ReadOnlySpan indices, int count) + { + Contracts.Assert(count <= indices.Length); + return CpuMathUtils.DotProductSparse(a.AsSpan(aOffset), b, indices, count); + + } + } + } + + /// + public sealed class VectorWhiteningEstimator : IEstimator + { + private readonly IHost _host; + private readonly VectorWhiteningTransformer.ColumnInfo[] _infos; + + /// + /// The environment. + /// Describes the parameters of the whitening process for each column pair. + public VectorWhiteningEstimator(IHostEnvironment env, params VectorWhiteningTransformer.ColumnInfo[] columns) + { + _host = Contracts.CheckRef(env, nameof(env)).Register(nameof(VectorWhiteningTransformer)); + _infos = columns; + } + + /// + /// The environment. + /// Name of the input column. + /// Name of the column resulting from the transformation of . Null means is replaced. + /// Whitening kind (PCA/ZCA). + /// Whitening constant, prevents division by zero when scaling the data by inverse of eigenvalues. + /// Maximum number of rows used to train the transform. + /// In case of PCA whitening, indicates the number of components to retain. + public VectorWhiteningEstimator(IHostEnvironment env, string inputColumn, string outputColumn, + WhiteningKind kind = VectorWhiteningTransformer.Defaults.Kind, + float eps = VectorWhiteningTransformer.Defaults.Eps, + int maxRows = VectorWhiteningTransformer.Defaults.MaxRows, + int pcaNum = VectorWhiteningTransformer.Defaults.PcaNum) + : this(env, new VectorWhiteningTransformer.ColumnInfo(inputColumn, outputColumn, kind, eps, maxRows, pcaNum)) + { + } + + public VectorWhiteningTransformer Fit(IDataView input) + { + // Build transformation matrices for whitening process, then construct a trained transform. + (var models, var invModels) = VectorWhiteningTransformer.TrainVectorWhiteningTransform(_host, input, _infos); + return new VectorWhiteningTransformer(_host, models, invModels, _infos); + } + + /// + /// Returns the schema that would be produced by the transformation. + /// + public SchemaShape GetOutputSchema(SchemaShape inputSchema) + { + _host.CheckValue(inputSchema, nameof(inputSchema)); + var result = inputSchema.Columns.ToDictionary(x => x.Name); + foreach (var colPair in _infos) + { + if (!inputSchema.TryFindColumn(colPair.Input, out var col)) + throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colPair.Input); + var reason = VectorWhiteningTransformer.TestColumn(col.ItemType); + if (reason != null) + throw _host.ExceptUserArg(nameof(inputSchema), reason); + result[colPair.Output] = new SchemaShape.Column(colPair.Output, col.Kind, col.ItemType, col.IsKey, null); + } + return new SchemaShape(result.Values); + } + } +} diff --git a/src/Microsoft.ML.ImageAnalytics/ImageGrayscaleTransform.cs b/src/Microsoft.ML.ImageAnalytics/ImageGrayscaleTransform.cs index 67c446bd6e..f6b8ae0f15 100644 --- a/src/Microsoft.ML.ImageAnalytics/ImageGrayscaleTransform.cs +++ b/src/Microsoft.ML.ImageAnalytics/ImageGrayscaleTransform.cs @@ -159,7 +159,7 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].input, "image", inputSchema.GetColumnType(srcCol).ToString()); } - private sealed class Mapper : MapperBase + private sealed class Mapper : OneToOneMapperBase { private ImageGrayscaleTransform _parent; @@ -169,10 +169,10 @@ public Mapper(ImageGrayscaleTransform parent, Schema inputSchema) _parent = parent; } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() => _parent.ColumnPairs.Select((x, idx) => new Schema.Column(x.output, InputSchema[ColMapNewToOld[idx]].Type, null)).ToArray(); - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); diff --git a/src/Microsoft.ML.ImageAnalytics/ImageLoaderTransform.cs b/src/Microsoft.ML.ImageAnalytics/ImageLoaderTransform.cs index 206477c350..862c0fc21b 100644 --- a/src/Microsoft.ML.ImageAnalytics/ImageLoaderTransform.cs +++ b/src/Microsoft.ML.ImageAnalytics/ImageLoaderTransform.cs @@ -148,7 +148,7 @@ private static VersionInfo GetVersionInfo() protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : MapperBase + private sealed class Mapper : OneToOneMapperBase { private readonly ImageLoaderTransform _parent; private readonly ImageType _imageType; @@ -160,7 +160,7 @@ public Mapper(ImageLoaderTransform parent, Schema inputSchema) _parent = parent; } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); @@ -206,7 +206,7 @@ protected override Delegate MakeGetter(IRow input, int iinfo, out Action dispose return del; } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() => _parent.ColumnPairs.Select(x => new Schema.Column(x.output, _imageType, null)).ToArray(); } } diff --git a/src/Microsoft.ML.ImageAnalytics/ImagePixelExtractorTransform.cs b/src/Microsoft.ML.ImageAnalytics/ImagePixelExtractorTransform.cs index 2bb9b912ae..663af17553 100644 --- a/src/Microsoft.ML.ImageAnalytics/ImagePixelExtractorTransform.cs +++ b/src/Microsoft.ML.ImageAnalytics/ImagePixelExtractorTransform.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; +using System.Runtime.InteropServices; using System.Text; using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime; @@ -412,7 +413,7 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.Except("Image dimensions are too large"); } - private sealed class Mapper : MapperBase + private sealed class Mapper : OneToOneMapperBase { private readonly ImagePixelExtractorTransform _parent; private readonly VectorType[] _types; @@ -424,10 +425,10 @@ public Mapper(ImagePixelExtractorTransform parent, Schema inputSchema) _types = ConstructTypes(); } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() => _parent._columns.Select((x, idx) => new Schema.Column(x.Output, _types[idx], null)).ToArray(); - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _parent._columns.Length); @@ -439,6 +440,7 @@ protected override Delegate MakeGetter(IRow input, int iinfo, out Action dispose //REVIEW Rewrite it to where TValue : IConvertible private ValueGetter> GetGetterCore(IRow input, int iinfo, out Action disposer) + where TValue : struct { var type = _types[iinfo]; var dims = type.Dimensions; @@ -476,26 +478,26 @@ private ValueGetter> GetGetterCore(IRow input, int iinfo if (src == null) { - dst = new VBuffer(size, 0, dst.Values, dst.Indices); + VBufferUtils.Resize(ref dst, size, 0); return; } Host.Check(src.PixelFormat == System.Drawing.Imaging.PixelFormat.Format32bppArgb); Host.Check(src.Height == height && src.Width == width); - var values = dst.Values; - if (Utils.Size(values) < size) - values = new TValue[size]; + var editor = VBufferEditor.Create(ref dst, size); + var values = editor.Values; float offset = ex.Offset; float scale = ex.Scale; Contracts.Assert(scale != 0); - var vf = values as float[]; - var vb = values as byte[]; - Contracts.Assert(vf != null || vb != null); + // REVIEW: split the getter into 2 specialized getters, one for float case and one for byte case. + Span vf = typeof(TValue) == typeof(float) ? MemoryMarshal.Cast(editor.Values) : default; + Span vb = typeof(TValue) == typeof(byte) ? MemoryMarshal.Cast(editor.Values) : default; + Contracts.Assert(!vf.IsEmpty || !vb.IsEmpty); bool needScale = offset != 0 || scale != 1; - Contracts.Assert(!needScale || vf != null); + Contracts.Assert(!needScale || !vf.IsEmpty); bool a = ex.Alpha; bool r = ex.Red; @@ -512,7 +514,7 @@ private ValueGetter> GetGetterCore(IRow input, int iinfo for (int y = 0; y < h; ++y) { var pb = src.GetPixel(x, y); - if (vb != null) + if (!vb.IsEmpty) { if (a) { vb[idst++] = pb.A; } if (r) { vb[idst++] = pb.R; } @@ -543,7 +545,7 @@ private ValueGetter> GetGetterCore(IRow input, int iinfo { // The image only has rgb but we need to supply alpha as well, so fake it up, // assuming that it is 0xFF. - if (vf != null) + if (!vf.IsEmpty) { Single v = (0xFF - offset) * scale; for (int i = 0; i < cpix; i++) @@ -566,7 +568,7 @@ private ValueGetter> GetGetterCore(IRow input, int iinfo int idstBase = idstMin + y * w; // Note that the bytes are in order BGR[A]. We arrange the layers in order ARGB. - if (vb != null) + if (!vb.IsEmpty) { for (int x = 0; x < w; x++, idstBase++) { @@ -605,7 +607,7 @@ private ValueGetter> GetGetterCore(IRow input, int iinfo } } - dst = new VBuffer(size, values, dst.Indices); + dst = editor.Commit(); }; } diff --git a/src/Microsoft.ML.ImageAnalytics/ImageResizerTransform.cs b/src/Microsoft.ML.ImageAnalytics/ImageResizerTransform.cs index 200898a91d..de093e5dc6 100644 --- a/src/Microsoft.ML.ImageAnalytics/ImageResizerTransform.cs +++ b/src/Microsoft.ML.ImageAnalytics/ImageResizerTransform.cs @@ -292,7 +292,7 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _columns[col].Input, "image", inputSchema.GetColumnType(srcCol).ToString()); } - private sealed class Mapper : MapperBase + private sealed class Mapper : OneToOneMapperBase { private readonly ImageResizerTransform _parent; @@ -302,10 +302,10 @@ public Mapper(ImageResizerTransform parent, Schema inputSchema) _parent = parent; } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() => _parent._columns.Select(x => new Schema.Column(x.Output, x.Type, null)).ToArray(); - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _parent._columns.Length); diff --git a/src/Microsoft.ML.KMeansClustering/KMeansCatalog.cs b/src/Microsoft.ML.KMeansClustering/KMeansCatalog.cs index 7ba14181a0..c096750ae0 100644 --- a/src/Microsoft.ML.KMeansClustering/KMeansCatalog.cs +++ b/src/Microsoft.ML.KMeansClustering/KMeansCatalog.cs @@ -23,7 +23,7 @@ public static class KMeansClusteringExtensions /// The number of clusters to use for KMeans. /// Algorithm advanced settings. public static KMeansPlusPlusTrainer KMeans(this ClusteringContext.ClusteringTrainers ctx, - string features = DefaultColumnNames.Features, + string features, string weights = null, int clustersCount = KMeansPlusPlusTrainer.Defaults.K, Action advancedSettings = null) diff --git a/src/Microsoft.ML.KMeansClustering/KMeansPlusPlusTrainer.cs b/src/Microsoft.ML.KMeansClustering/KMeansPlusPlusTrainer.cs index c0bcb5318d..7e2bb4f807 100644 --- a/src/Microsoft.ML.KMeansClustering/KMeansPlusPlusTrainer.cs +++ b/src/Microsoft.ML.KMeansClustering/KMeansPlusPlusTrainer.cs @@ -94,35 +94,42 @@ public class Arguments : UnsupervisedLearnerInputBaseWithWeight /// /// Initializes a new instance of /// - /// The private instance of . + /// The to use. /// The name of the feature column. - /// The name for the column containing the example weights. + /// The name for the optional column containing the example weights. /// A delegate to apply all the advanced arguments to the algorithm. /// The number of clusters. - public KMeansPlusPlusTrainer(IHostEnvironment env, string featureColumn, int clustersCount = Defaults.K, string weightColumn = null, Action advancedSettings = null) - : this(env, new Arguments(), featureColumn, weightColumn, advancedSettings) + public KMeansPlusPlusTrainer(IHostEnvironment env, + string featureColumn = DefaultColumnNames.Features, + int clustersCount = Defaults.K, + string weights = null, + Action advancedSettings = null) + : this(env, new Arguments + { + FeatureColumn = featureColumn, + WeightColumn = weights, + K = clustersCount + }, advancedSettings) { - _k = clustersCount; } internal KMeansPlusPlusTrainer(IHostEnvironment env, Arguments args) - : this(env, args, args.FeatureColumn, args.WeightColumn, null) + : this(env, args, null) { } - private KMeansPlusPlusTrainer(IHostEnvironment env, Arguments args, string featureColumn, string weightColumn, Action advancedSettings = null) - : base(Contracts.CheckRef(env, nameof(env)).Register(LoadNameValue), TrainerUtils.MakeR4VecFeature(featureColumn), null, TrainerUtils.MakeR4ScalarWeightColumn(weightColumn)) + private KMeansPlusPlusTrainer(IHostEnvironment env, Arguments args, Action advancedSettings = null) + : base(Contracts.CheckRef(env, nameof(env)).Register(LoadNameValue), TrainerUtils.MakeR4VecFeature(args.FeatureColumn), null, TrainerUtils.MakeR4ScalarWeightColumn(args.WeightColumn)) { Host.CheckValue(args, nameof(args)); - if (advancedSettings != null) - advancedSettings.Invoke(args); + // override with the advanced settings. + advancedSettings?.Invoke(args); Host.CheckUserArg(args.K > 0, nameof(args.K), "Must be positive"); - Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); - _featureColumn = featureColumn; + _featureColumn = args.FeatureColumn; _k = args.K; @@ -143,7 +150,7 @@ private KMeansPlusPlusTrainer(IHostEnvironment env, Arguments args, string featu Info = new TrainerInfo(); } - protected override KMeansPredictor TrainModelCore(TrainContext context) + private protected override KMeansPredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var data = context.TrainingSet; @@ -389,7 +396,7 @@ public static void Initialize( "Not enough distinct instances to populate {0} clusters (only found {1} distinct instances)", k, i); } - candidate.CopyTo(centroids[i].Values); + candidate.CopyToDense(ref centroids[i]); centroidL2s[i] = cachedCandidateL2 ?? VectorUtils.NormSquared(candidate); } } @@ -648,7 +655,7 @@ private static void FindBestCluster(in VBuffer point, int pointRowIndex, if (pointRowIndex != -1) // if the space was available for cur in initializationState. { // pointNorm is necessary for using triangle inequality. - float pointNorm = VectorUtils.NormSquared(point); + float pointNorm = VectorUtils.NormSquared(in point); // We have cached distance information for this point. bestCluster = initializationState.GetBestCluster(pointRowIndex); float bestWeight = initializationState.GetBestWeight(pointRowIndex); @@ -781,6 +788,7 @@ public static void Initialize(IHost host, int numThreads, IChannel ch, FeatureFl // The final chosen points, to be approximately clustered to determine starting // centroids. VBuffer[] clusters = new VBuffer[totalSamples]; + // L2s, kept for distance trick. float[] clustersL2s = new float[totalSamples]; @@ -1311,7 +1319,7 @@ public static void Train(IHost host, int numThreads, IChannel ch, FeatureFloatVe float[] centroidL2s = new float[k]; for (int i = 0; i < k; i++) - centroidL2s[i] = VectorUtils.NormSquared(centroids[i]); + centroidL2s[i] = VectorUtils.NormSquared(in centroids[i]); using (var pch = host.StartProgressChannel("KMeansTrain")) { @@ -1381,8 +1389,10 @@ public static void Train(IHost host, int numThreads, IChannel ch, FeatureFloatVe for (int i = 0; i < k; i++) { + var reducedStateCacheValues = reducedState.CachedSumDebug[i].GetValues(); + var cachedSumCopyValues = cachedSumCopy[i].GetValues(); for (int j = 0; j < dimensionality; j++) - Contracts.Assert(AlmostEq(reducedState.CachedSumDebug[i].Values[j], cachedSumCopy[i].Values[j])); + Contracts.Assert(AlmostEq(reducedStateCacheValues[j], cachedSumCopyValues[j])); } } #endif diff --git a/src/Microsoft.ML.KMeansClustering/KMeansPredictor.cs b/src/Microsoft.ML.KMeansClustering/KMeansPredictor.cs index 326b549a98..38b5116da4 100644 --- a/src/Microsoft.ML.KMeansClustering/KMeansPredictor.cs +++ b/src/Microsoft.ML.KMeansClustering/KMeansPredictor.cs @@ -49,7 +49,7 @@ private static VersionInfo GetVersionInfo() public ColumnType InputType { get; } public ColumnType OutputType { get; } - public bool CanSaveOnnx(OnnxContext ctx) => true; + bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => true; private readonly int _dimensionality; private readonly int _k; @@ -148,21 +148,19 @@ public ValueMapper GetMapper() { if (src.Length != _dimensionality) throw Host.Except($"Incorrect number of features: expected {_dimensionality}, got {src.Length}"); - var values = dst.Values; - if (Utils.Size(values) < _k) - values = new Float[_k]; - Map(in src, values); - dst = new VBuffer(_k, values, dst.Indices); + var editor = VBufferEditor.Create(ref dst, _k); + Map(in src, editor.Values); + dst = editor.Commit(); }; return (ValueMapper)(Delegate)del; } - private void Map(in VBuffer src, Float[] distances) + private void Map(in VBuffer src, Span distances) { - Host.Assert(Utils.Size(distances) >= _k); + Host.Assert(distances.Length >= _k); - Float instanceL2 = VectorUtils.NormSquared(src); + Float instanceL2 = VectorUtils.NormSquared(in src); for (int i = 0; i < _k; i++) { Float distance = Math.Max(0, @@ -282,7 +280,7 @@ public void GetClusterCentroids(ref VBuffer[] centroids, out int k) k = _k; } - public bool SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumn) + bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumn) { // Computation graph of distances to all centriods for a batch of examples. Note that a centriod is just // the center of a cluster. We use [] to denote the dimension of a variable; for example, X [3, 2] means diff --git a/src/Microsoft.ML.Legacy/AssemblyRegistration.cs b/src/Microsoft.ML.Legacy/AssemblyRegistration.cs index df272e76a6..448395769a 100644 --- a/src/Microsoft.ML.Legacy/AssemblyRegistration.cs +++ b/src/Microsoft.ML.Legacy/AssemblyRegistration.cs @@ -28,7 +28,9 @@ public static void RegisterAssemblies(IHostEnvironment environment) Contracts.Assert(_assemblyInitializer.Value); } +#pragma warning disable CS0618 // The legacy API that internally uses dependency injection for all calls will be deleted anyway. AssemblyLoadingUtils.RegisterCurrentLoadedAssemblies(environment); +#pragma warning restore CS0618 } /// @@ -46,7 +48,7 @@ private static bool LoadStandardAssemblies() _ = typeof(Maml).Assembly; // ML.Maml _ = typeof(PcaPredictor).Assembly; // ML.PCA _ = typeof(SweepCommand).Assembly; // ML.Sweeper - _ = typeof(CategoricalTransform).Assembly; // ML.Transforms + _ = typeof(OneHotEncodingTransformer).Assembly; // ML.Transforms // The following assemblies reference this assembly, so we can't directly reference them diff --git a/src/Microsoft.ML.Legacy/CSharpApi.cs b/src/Microsoft.ML.Legacy/CSharpApi.cs index 455ab1a512..c891b2039c 100644 --- a/src/Microsoft.ML.Legacy/CSharpApi.cs +++ b/src/Microsoft.ML.Legacy/CSharpApi.cs @@ -11061,7 +11061,7 @@ public BinNormalizerPipelineStep(Output output) namespace Legacy.Transforms { - public enum CategoricalTransformOutputKind : byte + public enum OneHotEncodingTransformerOutputKind : byte { Bag = 1, Ind = 2, @@ -11070,7 +11070,7 @@ public enum CategoricalTransformOutputKind : byte } - public sealed partial class CategoricalHashTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class OneHotHashEncodingTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// The number of bits to hash into. Must be between 1 and 30, inclusive. @@ -11095,7 +11095,7 @@ public sealed partial class CategoricalHashTransformColumn : OneToOneColumn /// Output kind: Bag (multi-set vector), Ind (indicator vector), or Key (index) /// - public CategoricalTransformOutputKind? OutputKind { get; set; } + public OneHotEncodingTransformerOutputKind? OutputKind { get; set; } /// /// Name of the new column @@ -11142,15 +11142,15 @@ public CategoricalHashOneHotVectorizer(params (string inputColumn, string output public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -11158,7 +11158,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:hashBits:src) /// - public CategoricalHashTransformColumn[] Column { get; set; } + public OneHotHashEncodingTransformerColumn[] Column { get; set; } /// /// Number of bits to hash into. Must be between 1 and 30, inclusive. @@ -11183,7 +11183,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// Output kind: Bag (multi-set vector), Ind (indicator vector), or Key (index) /// - public CategoricalTransformOutputKind OutputKind { get; set; } = CategoricalTransformOutputKind.Bag; + public OneHotEncodingTransformerOutputKind OutputKind { get; set; } = OneHotEncodingTransformerOutputKind.Bag; /// /// Input dataset @@ -11237,19 +11237,19 @@ public CategoricalHashOneHotVectorizerPipelineStep(Output output) namespace Legacy.Transforms { - public enum TermTransformSortOrder : byte + public enum ValueToKeyMappingTransformerSortOrder : byte { Occurrence = 0, Value = 1 } - public sealed partial class CategoricalTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class OneHotEncodingTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// Output kind: Bag (multi-set vector), Ind (indicator vector), Key (index), or Binary encoded indicator vector /// - public CategoricalTransformOutputKind? OutputKind { get; set; } + public OneHotEncodingTransformerOutputKind? OutputKind { get; set; } /// /// Maximum number of terms to keep when auto-training @@ -11264,7 +11264,7 @@ public sealed partial class CategoricalTransformColumn : OneToOneColumn /// How items should be ordered when vectorized. By default, they will be in the order encountered. If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a'). /// - public TermTransformSortOrder? Sort { get; set; } + public ValueToKeyMappingTransformerSortOrder? Sort { get; set; } /// /// Whether key value metadata should be text, regardless of the actual input type @@ -11316,15 +11316,15 @@ public CategoricalOneHotVectorizer(params (string inputColumn, string outputColu public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -11332,12 +11332,12 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public CategoricalTransformColumn[] Column { get; set; } + public OneHotEncodingTransformerColumn[] Column { get; set; } /// /// Output kind: Bag (multi-set vector), Ind (indicator vector), or Key (index) /// - public CategoricalTransformOutputKind OutputKind { get; set; } = CategoricalTransformOutputKind.Ind; + public OneHotEncodingTransformerOutputKind OutputKind { get; set; } = OneHotEncodingTransformerOutputKind.Ind; /// /// Maximum number of terms to keep per column when auto-training @@ -11352,7 +11352,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// How items should be ordered when vectorized. By default, they will be in the order encountered. If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a'). /// - public TermTransformSortOrder Sort { get; set; } = TermTransformSortOrder.Occurrence; + public ValueToKeyMappingTransformerSortOrder Sort { get; set; } = ValueToKeyMappingTransformerSortOrder.Occurrence; /// /// Whether key value metadata should be text, regardless of the actual input type @@ -11412,7 +11412,7 @@ public CategoricalOneHotVectorizerPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class CharTokenizeTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class TokenizingByCharactersTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// Name of the new column @@ -11458,15 +11458,15 @@ public CharacterTokenizer(params (string inputColumn, string outputColumn)[] inp public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -11474,7 +11474,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public CharTokenizeTransformColumn[] Column { get; set; } + public TokenizingByCharactersTransformerColumn[] Column { get; set; } /// /// Whether to mark the beginning/end of each row/slot with start of text character (0x02)/end of text character (0x03) @@ -11534,7 +11534,7 @@ public CharacterTokenizerPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class ConcatTransformColumn : ManyToOneColumn, IManyToOneColumn + public sealed partial class ColumnConcatenatingTransformerColumn : ManyToOneColumn, IManyToOneColumn { /// /// Name of the new column @@ -11565,8 +11565,8 @@ public ColumnConcatenator(string outputColumn, params string[] inputColumns) public void AddColumn(string name, params string[] source) { - var list = Column == null ? new List() : new List(Column); - list.Add(ManyToOneColumn.Create(name, source)); + var list = Column == null ? new List() : new List(Column); + list.Add(ManyToOneColumn.Create(name, source)); Column = list.ToArray(); } @@ -11574,7 +11574,7 @@ public void AddColumn(string name, params string[] source) /// /// New column definition(s) (optional form: name:srcs) /// - public ConcatTransformColumn[] Column { get; set; } + public ColumnConcatenatingTransformerColumn[] Column { get; set; } /// /// Input dataset @@ -11629,7 +11629,7 @@ public ColumnConcatenatorPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class CopyColumnsTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class ColumnsCopyingTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// Name of the new column @@ -11677,15 +11677,15 @@ public ColumnCopier(params (string inputColumn, string outputColumn)[] inputOutp public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -11693,7 +11693,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public CopyColumnsTransformColumn[] Column { get; set; } + public ColumnsCopyingTransformerColumn[] Column { get; set; } /// /// Input dataset @@ -11828,7 +11828,7 @@ public ColumnSelectorPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class ConvertingTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class TypeConvertingTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// The result type @@ -11886,15 +11886,15 @@ public ColumnTypeConverter(params (string inputColumn, string outputColumn)[] in public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -11902,7 +11902,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:type:src) /// - public ConvertingTransformColumn[] Column { get; set; } + public TypeConvertingTransformerColumn[] Column { get; set; } /// /// The result type @@ -12318,7 +12318,7 @@ public sealed class Output namespace Legacy.Transforms { - public sealed partial class TermTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class ValueToKeyMappingTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// Maximum number of terms to keep when auto-training @@ -12333,7 +12333,7 @@ public sealed partial class TermTransformColumn : OneToOneColumn /// How items should be ordered when vectorized. By default, they will be in the order encountered. If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a'). /// - public TermTransformSortOrder? Sort { get; set; } + public ValueToKeyMappingTransformerSortOrder? Sort { get; set; } /// /// Whether key value metadata should be text, regardless of the actual input type @@ -12386,15 +12386,15 @@ public Dictionarizer(params (string inputColumn, string outputColumn)[] inputOut public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -12402,7 +12402,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public TermTransformColumn[] Column { get; set; } + public ValueToKeyMappingTransformerColumn[] Column { get; set; } /// /// Maximum number of terms to keep per column when auto-training @@ -12417,7 +12417,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// How items should be ordered when vectorized. By default, they will be in the order encountered. If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a'). /// - public TermTransformSortOrder Sort { get; set; } = TermTransformSortOrder.Occurrence; + public ValueToKeyMappingTransformerSortOrder Sort { get; set; } = ValueToKeyMappingTransformerSortOrder.Occurrence; /// /// Whether key value metadata should be text, regardless of the actual input type @@ -12690,7 +12690,7 @@ public FeatureSelectorByMutualInformationPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class LpNormNormalizerTransformGcnColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class LpNormalizingTransformerGcnColumn : OneToOneColumn, IOneToOneColumn { /// /// Normalize by standard deviation rather than L2 norm @@ -12751,15 +12751,15 @@ public GlobalContrastNormalizer(params (string inputColumn, string outputColumn) public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -12767,7 +12767,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public LpNormNormalizerTransformGcnColumn[] Column { get; set; } + public LpNormalizingTransformerGcnColumn[] Column { get; set; } /// /// Subtract mean from each value before normalizing @@ -12837,7 +12837,7 @@ public GlobalContrastNormalizerPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class HashJoinTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class HashJoiningTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// Whether the values need to be combined for a single hash @@ -12909,15 +12909,15 @@ public HashConverter(params (string inputColumn, string outputColumn)[] inputOut public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -12925,7 +12925,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public HashJoinTransformColumn[] Column { get; set; } + public HashJoiningTransformColumn[] Column { get; set; } /// /// Whether the values need to be combined for a single hash @@ -13616,7 +13616,7 @@ public ImageResizerPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class KeyToValueTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class KeyToValueMappingTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// Name of the new column @@ -13662,15 +13662,15 @@ public KeyToTextConverter(params (string inputColumn, string outputColumn)[] inp public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -13678,7 +13678,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public KeyToValueTransformColumn[] Column { get; set; } + public KeyToValueMappingTransformerColumn[] Column { get; set; } /// /// Input dataset @@ -13997,10 +13997,10 @@ public LabelToFloatConverterPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class LdaTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class LatentDirichletAllocationTransformerColumn : OneToOneColumn, IOneToOneColumn { /// - /// The number of topics in the LDA + /// The number of topics /// public int? NumTopic { get; set; } @@ -14099,15 +14099,15 @@ public LightLda(params (string inputColumn, string outputColumn)[] inputOutputCo public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -14115,10 +14115,10 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:srcs) /// - public LdaTransformColumn[] Column { get; set; } + public LatentDirichletAllocationTransformerColumn[] Column { get; set; } /// - /// The number of topics in the LDA + /// The number of topics /// [TlcModule.SweepableDiscreteParamAttribute("NumTopic", new object[]{20, 40, 100, 200})] public int NumTopic { get; set; } = 100; @@ -14153,14 +14153,14 @@ public void AddColumn(string outputColumn, string inputColumn) public int LikelihoodInterval { get; set; } = 5; /// - /// The threshold of maximum count of tokens per doc + /// The number of training threads. Default value depends on number of logical processors. /// - public int NumMaxDocToken { get; set; } = 512; + public int NumThreads { get; set; } /// - /// The number of training threads. Default value depends on number of logical processors. + /// The threshold of maximum count of tokens per doc /// - public int? NumThreads { get; set; } + public int NumMaxDocToken { get; set; } = 512; /// /// The number of words to summarize the topic @@ -14369,7 +14369,7 @@ public LogMeanVarianceNormalizerPipelineStep(Output output) namespace Legacy.Transforms { - public enum LpNormNormalizerTransformNormalizerKind : byte + public enum LpNormalizingEstimatorBaseNormalizerKind : byte { L2Norm = 0, StdDev = 1, @@ -14378,12 +14378,12 @@ public enum LpNormNormalizerTransformNormalizerKind : byte } - public sealed partial class LpNormNormalizerTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class LpNormalizingTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// The norm to use to normalize each sample /// - public LpNormNormalizerTransformNormalizerKind? NormKind { get; set; } + public LpNormalizingEstimatorBaseNormalizerKind? NormKind { get; set; } /// /// Subtract mean from each value before normalizing @@ -14434,15 +14434,15 @@ public LpNormalizer(params (string inputColumn, string outputColumn)[] inputOutp public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -14450,12 +14450,12 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public LpNormNormalizerTransformColumn[] Column { get; set; } + public LpNormalizingTransformerColumn[] Column { get; set; } /// /// The norm to use to normalize each sample /// - public LpNormNormalizerTransformNormalizerKind NormKind { get; set; } = LpNormNormalizerTransformNormalizerKind.L2Norm; + public LpNormalizingEstimatorBaseNormalizerKind NormKind { get; set; } = LpNormalizingEstimatorBaseNormalizerKind.L2Norm; /// /// Subtract mean from each value before normalizing @@ -14781,7 +14781,7 @@ public MinMaxNormalizerPipelineStep(Output output) namespace Legacy.Transforms { - public enum NAHandleTransformReplacementKind : byte + public enum MissingValueHandlingTransformerReplacementKind : byte { DefaultValue = 0, Mean = 1, @@ -14790,12 +14790,12 @@ public enum NAHandleTransformReplacementKind : byte } - public sealed partial class NAHandleTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class MissingValueHandlingTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// The replacement method to utilize /// - public NAHandleTransformReplacementKind? Kind { get; set; } + public MissingValueHandlingTransformerReplacementKind? Kind { get; set; } /// /// Whether to impute values by slot @@ -14852,15 +14852,15 @@ public MissingValueHandler(params (string inputColumn, string outputColumn)[] in public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -14868,12 +14868,12 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:rep:src) /// - public NAHandleTransformColumn[] Column { get; set; } + public MissingValueHandlingTransformerColumn[] Column { get; set; } /// /// The replacement method to utilize /// - public NAHandleTransformReplacementKind ReplaceWith { get; set; } = NAHandleTransformReplacementKind.DefaultValue; + public MissingValueHandlingTransformerReplacementKind ReplaceWith { get; set; } = MissingValueHandlingTransformerReplacementKind.DefaultValue; /// /// Whether to impute values by slot @@ -14938,7 +14938,7 @@ public MissingValueHandlerPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class NAIndicatorTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class MissingValueIndicatorTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// Name of the new column @@ -14985,15 +14985,15 @@ public MissingValueIndicator(params (string inputColumn, string outputColumn)[] public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -15001,7 +15001,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public NAIndicatorTransformColumn[] Column { get; set; } + public MissingValueIndicatorTransformerColumn[] Column { get; set; } /// /// Input dataset @@ -15056,7 +15056,7 @@ public MissingValueIndicatorPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class NADropTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class MissingValueDroppingTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// Name of the new column @@ -15103,15 +15103,15 @@ public MissingValuesDropper(params (string inputColumn, string outputColumn)[] i public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -15119,7 +15119,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// Columns to drop the NAs for /// - public NADropTransformColumn[] Column { get; set; } + public MissingValueDroppingTransformerColumn[] Column { get; set; } /// /// Input dataset @@ -15242,7 +15242,7 @@ public MissingValuesRowDropperPipelineStep(Output output) namespace Legacy.Transforms { - public enum NAReplaceTransformReplacementKind : byte + public enum MissingValueReplacingTransformerReplacementKind : byte { DefaultValue = 0, Mean = 1, @@ -15252,7 +15252,7 @@ public enum NAReplaceTransformReplacementKind : byte } - public sealed partial class NAReplaceTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class MissingValueReplacingTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// Replacement value for NAs (uses default value if not given) @@ -15262,7 +15262,7 @@ public sealed partial class NAReplaceTransformColumn : OneToOneColumn /// The replacement method to utilize /// - public NAReplaceTransformReplacementKind? Kind { get; set; } + public MissingValueReplacingTransformerReplacementKind? Kind { get; set; } /// /// Whether to impute values by slot @@ -15314,15 +15314,15 @@ public MissingValueSubstitutor(params (string inputColumn, string outputColumn)[ public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -15330,12 +15330,12 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:rep:src) /// - public NAReplaceTransformColumn[] Column { get; set; } + public MissingValueReplacingTransformerColumn[] Column { get; set; } /// /// The replacement method to utilize /// - public NAReplaceTransformReplacementKind ReplacementKind { get; set; } = NAReplaceTransformReplacementKind.DefaultValue; + public MissingValueReplacingTransformerReplacementKind ReplacementKind { get; set; } = MissingValueReplacingTransformerReplacementKind.DefaultValue; /// /// Whether to impute values by slot @@ -15421,7 +15421,7 @@ public sealed class Output namespace Legacy.Transforms { - public enum NgramTransformWeightingCriteria + public enum NgramCountingEstimatorWeightingCriteria { Tf = 0, Idf = 1, @@ -15429,7 +15429,7 @@ public enum NgramTransformWeightingCriteria } - public sealed partial class NgramTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class NgramCountingTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// Maximum ngram length @@ -15454,7 +15454,7 @@ public sealed partial class NgramTransformColumn : OneToOneColumn /// Statistical measure used to evaluate how important a word is to a document in a corpus /// - public NgramTransformWeightingCriteria? Weighting { get; set; } + public NgramCountingEstimatorWeightingCriteria? Weighting { get; set; } /// /// Name of the new column @@ -15500,15 +15500,15 @@ public NGramTranslator(params (string inputColumn, string outputColumn)[] inputO public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -15516,7 +15516,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public NgramTransformColumn[] Column { get; set; } + public NgramCountingTransformerColumn[] Column { get; set; } /// /// Maximum ngram length @@ -15541,7 +15541,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// The weighting criteria /// - public NgramTransformWeightingCriteria Weighting { get; set; } = NgramTransformWeightingCriteria.Tf; + public NgramCountingEstimatorWeightingCriteria Weighting { get; set; } = NgramCountingEstimatorWeightingCriteria.Tf; /// /// Input dataset @@ -16762,7 +16762,7 @@ public sealed partial class TermLoaderArguments /// /// How items should be ordered when vectorized. By default, they will be in the order encountered. If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a'). /// - public TermTransformSortOrder Sort { get; set; } = TermTransformSortOrder.Occurrence; + public ValueToKeyMappingTransformerSortOrder Sort { get; set; } = ValueToKeyMappingTransformerSortOrder.Occurrence; /// /// Drop unknown terms instead of mapping them to NA term. @@ -16940,15 +16940,15 @@ public TextToKeyConverter(params (string inputColumn, string outputColumn)[] inp public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -16956,7 +16956,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public TermTransformColumn[] Column { get; set; } + public ValueToKeyMappingTransformerColumn[] Column { get; set; } /// /// Maximum number of terms to keep per column when auto-training @@ -16971,7 +16971,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// How items should be ordered when vectorized. By default, they will be in the order encountered. If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a'). /// - public TermTransformSortOrder Sort { get; set; } = TermTransformSortOrder.Occurrence; + public ValueToKeyMappingTransformerSortOrder Sort { get; set; } = ValueToKeyMappingTransformerSortOrder.Occurrence; /// /// Whether key value metadata should be text, regardless of the actual input type @@ -17386,7 +17386,7 @@ public VectorToImagePipelineStep(Output output) namespace Legacy.Transforms { - public enum WordEmbeddingsTransformPretrainedModelKind + public enum WordEmbeddingsExtractingTransformerPretrainedModelKind { GloVe50D = 0, GloVe100D = 1, @@ -17401,7 +17401,7 @@ public enum WordEmbeddingsTransformPretrainedModelKind } - public sealed partial class WordEmbeddingsTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class WordEmbeddingsExtractingTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// Name of the new column @@ -17448,15 +17448,15 @@ public WordEmbeddings(params (string inputColumn, string outputColumn)[] inputOu public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -17464,12 +17464,12 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public WordEmbeddingsTransformColumn[] Column { get; set; } + public WordEmbeddingsExtractingTransformerColumn[] Column { get; set; } /// /// Pre-trained model used to create the vocabulary /// - public WordEmbeddingsTransformPretrainedModelKind? ModelKind { get; set; } = WordEmbeddingsTransformPretrainedModelKind.Sswe; + public WordEmbeddingsExtractingTransformerPretrainedModelKind? ModelKind { get; set; } = WordEmbeddingsExtractingTransformerPretrainedModelKind.Sswe; /// /// Filename for custom word embedding model @@ -17529,7 +17529,7 @@ public WordEmbeddingsPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class WordTokenizeTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class WordTokenizingTransformerColumn : OneToOneColumn, IOneToOneColumn { /// /// Comma separated set of term separator(s). Commonly: 'space', 'comma', 'semicolon' or other single character. @@ -17581,15 +17581,15 @@ public WordTokenizer(params (string inputColumn, string outputColumn)[] inputOut public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -17597,7 +17597,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) /// - public WordTokenizeTransformColumn[] Column { get; set; } + public WordTokenizingTransformerColumn[] Column { get; set; } /// /// Array of single character term separator(s). By default uses space character separator. @@ -20137,7 +20137,7 @@ public sealed class NGramNgramExtractor : NgramExtractor /// /// The weighting criteria /// - public Microsoft.ML.Legacy.Transforms.NgramTransformWeightingCriteria Weighting { get; set; } = Microsoft.ML.Legacy.Transforms.NgramTransformWeightingCriteria.Tf; + public Microsoft.ML.Legacy.Transforms.NgramCountingEstimatorWeightingCriteria Weighting { get; set; } = Microsoft.ML.Legacy.Transforms.NgramCountingEstimatorWeightingCriteria.Tf; internal override string ComponentName => "NGram"; } diff --git a/src/Microsoft.ML.Legacy/LearningPipeline.cs b/src/Microsoft.ML.Legacy/LearningPipeline.cs index e56e49f6a3..7544d2f112 100644 --- a/src/Microsoft.ML.Legacy/LearningPipeline.cs +++ b/src/Microsoft.ML.Legacy/LearningPipeline.cs @@ -161,86 +161,84 @@ public PredictionModel Train() where TInput : class where TOutput : class, new() { - using (var environment = new ConsoleEnvironment(seed: _seed, conc: _conc)) + var environment = new MLContext(seed: _seed, conc: _conc); + Experiment experiment = environment.CreateExperiment(); + ILearningPipelineStep step = null; + List loaders = new List(); + List> transformModels = new List>(); + Var lastTransformModel = null; + + foreach (ILearningPipelineItem currentItem in this) { - Experiment experiment = environment.CreateExperiment(); - ILearningPipelineStep step = null; - List loaders = new List(); - List> transformModels = new List>(); - Var lastTransformModel = null; + if (currentItem is ILearningPipelineLoader loader) + loaders.Add(loader); - foreach (ILearningPipelineItem currentItem in this) + step = currentItem.ApplyStep(step, experiment); + if (step is ILearningPipelineDataStep dataStep && dataStep.Model != null) + transformModels.Add(dataStep.Model); + else if (step is ILearningPipelinePredictorStep predictorDataStep) { - if (currentItem is ILearningPipelineLoader loader) - loaders.Add(loader); + if (lastTransformModel != null) + transformModels.Insert(0, lastTransformModel); - step = currentItem.ApplyStep(step, experiment); - if (step is ILearningPipelineDataStep dataStep && dataStep.Model != null) - transformModels.Add(dataStep.Model); - else if (step is ILearningPipelinePredictorStep predictorDataStep) + Var predictorModel; + if (transformModels.Count != 0) { - if (lastTransformModel != null) - transformModels.Insert(0, lastTransformModel); - - Var predictorModel; - if (transformModels.Count != 0) + var localModelInput = new Transforms.ManyHeterogeneousModelCombiner { - var localModelInput = new Transforms.ManyHeterogeneousModelCombiner - { - PredictorModel = predictorDataStep.Model, - TransformModels = new ArrayVar(transformModels.ToArray()) - }; - var localModelOutput = experiment.Add(localModelInput); - predictorModel = localModelOutput.PredictorModel; - } - else - predictorModel = predictorDataStep.Model; - - var scorer = new Transforms.Scorer - { - PredictorModel = predictorModel + PredictorModel = predictorDataStep.Model, + TransformModels = new ArrayVar(transformModels.ToArray()) }; - - var scorerOutput = experiment.Add(scorer); - lastTransformModel = scorerOutput.ScoringTransform; - step = new ScorerPipelineStep(scorerOutput.ScoredData, scorerOutput.ScoringTransform); - transformModels.Clear(); + var localModelOutput = experiment.Add(localModelInput); + predictorModel = localModelOutput.PredictorModel; } - } + else + predictorModel = predictorDataStep.Model; - if (transformModels.Count > 0) - { - if (lastTransformModel != null) - transformModels.Insert(0, lastTransformModel); - - var modelInput = new Transforms.ModelCombiner + var scorer = new Transforms.Scorer { - Models = new ArrayVar(transformModels.ToArray()) + PredictorModel = predictorModel }; - var modelOutput = experiment.Add(modelInput); - lastTransformModel = modelOutput.OutputModel; + var scorerOutput = experiment.Add(scorer); + lastTransformModel = scorerOutput.ScoringTransform; + step = new ScorerPipelineStep(scorerOutput.ScoredData, scorerOutput.ScoringTransform); + transformModels.Clear(); } + } - experiment.Compile(); - foreach (ILearningPipelineLoader loader in loaders) - { - loader.SetInput(environment, experiment); - } - experiment.Run(); + if (transformModels.Count > 0) + { + if (lastTransformModel != null) + transformModels.Insert(0, lastTransformModel); - ITransformModel model = experiment.GetOutput(lastTransformModel); - BatchPredictionEngine predictor; - using (var memoryStream = new MemoryStream()) + var modelInput = new Transforms.ModelCombiner { - model.Save(environment, memoryStream); + Models = new ArrayVar(transformModels.ToArray()) + }; - memoryStream.Position = 0; + var modelOutput = experiment.Add(modelInput); + lastTransformModel = modelOutput.OutputModel; + } - predictor = environment.CreateBatchPredictionEngine(memoryStream); + experiment.Compile(); + foreach (ILearningPipelineLoader loader in loaders) + { + loader.SetInput(environment, experiment); + } + experiment.Run(); - return new PredictionModel(predictor, memoryStream); - } + ITransformModel model = experiment.GetOutput(lastTransformModel); + BatchPredictionEngine predictor; + using (var memoryStream = new MemoryStream()) + { + model.Save(environment, memoryStream); + + memoryStream.Position = 0; + + predictor = environment.CreateBatchPredictionEngine(memoryStream); + + return new PredictionModel(predictor, memoryStream); } } diff --git a/src/Microsoft.ML.Legacy/LearningPipelineDebugProxy.cs b/src/Microsoft.ML.Legacy/LearningPipelineDebugProxy.cs index af99d8ff3c..586dbf99e3 100644 --- a/src/Microsoft.ML.Legacy/LearningPipelineDebugProxy.cs +++ b/src/Microsoft.ML.Legacy/LearningPipelineDebugProxy.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; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Legacy.Transforms; using System; @@ -25,7 +26,7 @@ internal sealed class LearningPipelineDebugProxy private const int MaxSlotNamesToDisplay = 100; private readonly LearningPipeline _pipeline; - private readonly ConsoleEnvironment _environment; + private readonly IHostEnvironment _environment; private IDataView _preview; private Exception _pipelineExecutionException; private PipelineItemDebugColumn[] _columns; @@ -39,7 +40,7 @@ public LearningPipelineDebugProxy(LearningPipeline pipeline) _pipeline = new LearningPipeline(); // use a ConcurrencyFactor of 1 so other threads don't need to run in the debugger - _environment = new ConsoleEnvironment(conc: 1); + _environment = new MLContext(conc: 1); foreach (ILearningPipelineItem item in pipeline) { diff --git a/src/Microsoft.ML.Legacy/Microsoft.ML.Legacy.csproj b/src/Microsoft.ML.Legacy/Microsoft.ML.Legacy.csproj index 6e4034aa24..ec7d25d104 100644 --- a/src/Microsoft.ML.Legacy/Microsoft.ML.Legacy.csproj +++ b/src/Microsoft.ML.Legacy/Microsoft.ML.Legacy.csproj @@ -6,10 +6,6 @@ CORECLR - - - - @@ -28,4 +24,4 @@ - + \ No newline at end of file diff --git a/src/Microsoft.ML.Legacy/Models/BinaryClassificationEvaluator.cs b/src/Microsoft.ML.Legacy/Models/BinaryClassificationEvaluator.cs index 71b32a323a..2f2bce8016 100644 --- a/src/Microsoft.ML.Legacy/Models/BinaryClassificationEvaluator.cs +++ b/src/Microsoft.ML.Legacy/Models/BinaryClassificationEvaluator.cs @@ -24,54 +24,52 @@ public sealed partial class BinaryClassificationEvaluator /// public BinaryClassificationMetrics Evaluate(PredictionModel model, ILearningPipelineLoader testData) { - using (var environment = new ConsoleEnvironment()) - { - environment.CheckValue(model, nameof(model)); - environment.CheckValue(testData, nameof(testData)); + var environment = new MLContext(); + environment.CheckValue(model, nameof(model)); + environment.CheckValue(testData, nameof(testData)); - Experiment experiment = environment.CreateExperiment(); + Experiment experiment = environment.CreateExperiment(); - ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); - if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) - { - throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); - } + ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); + if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) + { + throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); + } - var datasetScorer = new DatasetTransformScorer - { - Data = testDataOutput.Data - }; - DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); + var datasetScorer = new DatasetTransformScorer + { + Data = testDataOutput.Data + }; + DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); - Data = scoreOutput.ScoredData; - Output evaluteOutput = experiment.Add(this); + Data = scoreOutput.ScoredData; + Output evaluteOutput = experiment.Add(this); - experiment.Compile(); + experiment.Compile(); - experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); - testData.SetInput(environment, experiment); + experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); + testData.SetInput(environment, experiment); - experiment.Run(); + experiment.Run(); - IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); - if (overallMetrics == null) - { - throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(BinaryClassificationEvaluator)} Evaluate."); - } + IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); + if (overallMetrics == null) + { + throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(BinaryClassificationEvaluator)} Evaluate."); + } - IDataView confusionMatrix = experiment.GetOutput(evaluteOutput.ConfusionMatrix); - if (confusionMatrix == null) - { - throw environment.Except($"Could not find ConfusionMatrix in the results returned in {nameof(BinaryClassificationEvaluator)} Evaluate."); - } + IDataView confusionMatrix = experiment.GetOutput(evaluteOutput.ConfusionMatrix); + if (confusionMatrix == null) + { + throw environment.Except($"Could not find ConfusionMatrix in the results returned in {nameof(BinaryClassificationEvaluator)} Evaluate."); + } - var metric = BinaryClassificationMetrics.FromMetrics(environment, overallMetrics, confusionMatrix); + var metric = BinaryClassificationMetrics.FromMetrics(environment, overallMetrics, confusionMatrix); - if (metric.Count != 1) - throw environment.Except($"Exactly one metric set was expected but found {metric.Count} metrics"); + if (metric.Count != 1) + throw environment.Except($"Exactly one metric set was expected but found {metric.Count} metrics"); - return metric[0]; - } + return metric[0]; } } } diff --git a/src/Microsoft.ML.Legacy/Models/ClassificationEvaluator.cs b/src/Microsoft.ML.Legacy/Models/ClassificationEvaluator.cs index 63e7f8055e..5d644baf32 100644 --- a/src/Microsoft.ML.Legacy/Models/ClassificationEvaluator.cs +++ b/src/Microsoft.ML.Legacy/Models/ClassificationEvaluator.cs @@ -25,54 +25,52 @@ public sealed partial class ClassificationEvaluator /// public ClassificationMetrics Evaluate(PredictionModel model, ILearningPipelineLoader testData) { - using (var environment = new ConsoleEnvironment()) - { - environment.CheckValue(model, nameof(model)); - environment.CheckValue(testData, nameof(testData)); + var environment = new MLContext(); + environment.CheckValue(model, nameof(model)); + environment.CheckValue(testData, nameof(testData)); - Experiment experiment = environment.CreateExperiment(); + Experiment experiment = environment.CreateExperiment(); - ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); - if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) - { - throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); - } + ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); + if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) + { + throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); + } - var datasetScorer = new DatasetTransformScorer - { - Data = testDataOutput.Data, - }; - DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); + var datasetScorer = new DatasetTransformScorer + { + Data = testDataOutput.Data, + }; + DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); - Data = scoreOutput.ScoredData; - Output evaluteOutput = experiment.Add(this); + Data = scoreOutput.ScoredData; + Output evaluteOutput = experiment.Add(this); - experiment.Compile(); + experiment.Compile(); - experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); - testData.SetInput(environment, experiment); + experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); + testData.SetInput(environment, experiment); - experiment.Run(); + experiment.Run(); - IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); - if (overallMetrics == null) - { - throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(ClassificationEvaluator)} Evaluate."); - } + IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); + if (overallMetrics == null) + { + throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(ClassificationEvaluator)} Evaluate."); + } - IDataView confusionMatrix = experiment.GetOutput(evaluteOutput.ConfusionMatrix); - if (confusionMatrix == null) - { - throw environment.Except($"Could not find ConfusionMatrix in the results returned in {nameof(ClassificationEvaluator)} Evaluate."); - } + IDataView confusionMatrix = experiment.GetOutput(evaluteOutput.ConfusionMatrix); + if (confusionMatrix == null) + { + throw environment.Except($"Could not find ConfusionMatrix in the results returned in {nameof(ClassificationEvaluator)} Evaluate."); + } - var metric = ClassificationMetrics.FromMetrics(environment, overallMetrics, confusionMatrix); + var metric = ClassificationMetrics.FromMetrics(environment, overallMetrics, confusionMatrix); - if (metric.Count != 1) - throw environment.Except($"Exactly one metric set was expected but found {metric.Count} metrics"); + if (metric.Count != 1) + throw environment.Except($"Exactly one metric set was expected but found {metric.Count} metrics"); - return metric[0]; - } + return metric[0]; } } } diff --git a/src/Microsoft.ML.Legacy/Models/ClusterEvaluator.cs b/src/Microsoft.ML.Legacy/Models/ClusterEvaluator.cs index 411c85b176..5d12ad85f9 100644 --- a/src/Microsoft.ML.Legacy/Models/ClusterEvaluator.cs +++ b/src/Microsoft.ML.Legacy/Models/ClusterEvaluator.cs @@ -24,48 +24,46 @@ public sealed partial class ClusterEvaluator /// public ClusterMetrics Evaluate(PredictionModel model, ILearningPipelineLoader testData) { - using (var environment = new ConsoleEnvironment()) - { - environment.CheckValue(model, nameof(model)); - environment.CheckValue(testData, nameof(testData)); + var environment = new MLContext(); + environment.CheckValue(model, nameof(model)); + environment.CheckValue(testData, nameof(testData)); - Experiment experiment = environment.CreateExperiment(); + Experiment experiment = environment.CreateExperiment(); - ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); - if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) - { - throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); - } + ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); + if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) + { + throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); + } - var datasetScorer = new DatasetTransformScorer - { - Data = testDataOutput.Data, - }; - DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); + var datasetScorer = new DatasetTransformScorer + { + Data = testDataOutput.Data, + }; + DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); - Data = scoreOutput.ScoredData; - Output evaluteOutput = experiment.Add(this); + Data = scoreOutput.ScoredData; + Output evaluteOutput = experiment.Add(this); - experiment.Compile(); + experiment.Compile(); - experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); - testData.SetInput(environment, experiment); + experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); + testData.SetInput(environment, experiment); - experiment.Run(); + experiment.Run(); - IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); + IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); - if (overallMetrics == null) - { - throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(ClusterEvaluator)} Evaluate."); - } + if (overallMetrics == null) + { + throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(ClusterEvaluator)} Evaluate."); + } - var metric = ClusterMetrics.FromOverallMetrics(environment, overallMetrics); + var metric = ClusterMetrics.FromOverallMetrics(environment, overallMetrics); - Contracts.Assert(metric.Count == 1, $"Exactly one metric set was expected but found {metric.Count} metrics"); + Contracts.Assert(metric.Count == 1, $"Exactly one metric set was expected but found {metric.Count} metrics"); - return metric[0]; - } + return metric[0]; } } } diff --git a/src/Microsoft.ML.Legacy/Models/ConfusionMatrix.cs b/src/Microsoft.ML.Legacy/Models/ConfusionMatrix.cs index d8bb404d49..04c978ea44 100644 --- a/src/Microsoft.ML.Legacy/Models/ConfusionMatrix.cs +++ b/src/Microsoft.ML.Legacy/Models/ConfusionMatrix.cs @@ -75,9 +75,10 @@ internal static List Create(IHostEnvironment env, IDataView con elements = new double[type.VectorSize, type.VectorSize]; countGetter(ref countValues); - for (int i = 0; i < countValues.Length; i++) + ReadOnlySpan values = countValues.GetValues(); + for (int i = 0; i < values.Length; i++) { - elements[valuesRowIndex, i] = countValues.Values[i]; + elements[valuesRowIndex, i] = values[i]; } valuesRowIndex++; diff --git a/src/Microsoft.ML.Legacy/Models/CrossValidator.cs b/src/Microsoft.ML.Legacy/Models/CrossValidator.cs index d9d133a779..96be9db419 100644 --- a/src/Microsoft.ML.Legacy/Models/CrossValidator.cs +++ b/src/Microsoft.ML.Legacy/Models/CrossValidator.cs @@ -27,7 +27,7 @@ public CrossValidationOutput CrossValidate(Lea where TInput : class where TOutput : class, new() { - using (var environment = new ConsoleEnvironment()) + var environment = new MLContext(); { Experiment subGraph = environment.CreateExperiment(); ILearningPipelineStep step = null; diff --git a/src/Microsoft.ML.Legacy/Models/OneVersusAll.cs b/src/Microsoft.ML.Legacy/Models/OneVersusAll.cs index acd756556a..3269556f1f 100644 --- a/src/Microsoft.ML.Legacy/Models/OneVersusAll.cs +++ b/src/Microsoft.ML.Legacy/Models/OneVersusAll.cs @@ -52,26 +52,24 @@ public OvaPipelineItem(ITrainerInputWithLabel trainer, bool useProbabilities) public ILearningPipelineStep ApplyStep(ILearningPipelineStep previousStep, Experiment experiment) { - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var subgraph = env.CreateExperiment(); + subgraph.Add(_trainer); + var ova = new OneVersusAll(); + if (previousStep != null) { - var subgraph = env.CreateExperiment(); - subgraph.Add(_trainer); - var ova = new OneVersusAll(); - if (previousStep != null) + if (!(previousStep is ILearningPipelineDataStep dataStep)) { - if (!(previousStep is ILearningPipelineDataStep dataStep)) - { - throw new InvalidOperationException($"{ nameof(OneVersusAll)} only supports an { nameof(ILearningPipelineDataStep)} as an input."); - } - - _data = dataStep.Data; - ova.TrainingData = dataStep.Data; - ova.UseProbabilities = _useProbabilities; - ova.Nodes = subgraph; + throw new InvalidOperationException($"{ nameof(OneVersusAll)} only supports an { nameof(ILearningPipelineDataStep)} as an input."); } - Output output = experiment.Add(ova); - return new OvaPipelineStep(output); + + _data = dataStep.Data; + ova.TrainingData = dataStep.Data; + ova.UseProbabilities = _useProbabilities; + ova.Nodes = subgraph; } + Output output = experiment.Add(ova); + return new OvaPipelineStep(output); } public Var GetInputData() => _data; diff --git a/src/Microsoft.ML.Legacy/Models/OnnxConverter.cs b/src/Microsoft.ML.Legacy/Models/OnnxConverter.cs index c49c71cf71..0c9eca3ee8 100644 --- a/src/Microsoft.ML.Legacy/Models/OnnxConverter.cs +++ b/src/Microsoft.ML.Legacy/Models/OnnxConverter.cs @@ -70,16 +70,14 @@ public sealed partial class OnnxConverter /// Model that needs to be converted to ONNX format. public void Convert(PredictionModel model) { - using (var environment = new ConsoleEnvironment()) - { - environment.CheckValue(model, nameof(model)); + var environment = new MLContext(); + environment.CheckValue(model, nameof(model)); - Experiment experiment = environment.CreateExperiment(); - experiment.Add(this); - experiment.Compile(); - experiment.SetInput(Model, model.PredictorModel); - experiment.Run(); - } + Experiment experiment = environment.CreateExperiment(); + experiment.Add(this); + experiment.Compile(); + experiment.SetInput(Model, model.PredictorModel); + experiment.Run(); } } } diff --git a/src/Microsoft.ML.Legacy/Models/RegressionEvaluator.cs b/src/Microsoft.ML.Legacy/Models/RegressionEvaluator.cs index 35a7fd7500..ffee6108c6 100644 --- a/src/Microsoft.ML.Legacy/Models/RegressionEvaluator.cs +++ b/src/Microsoft.ML.Legacy/Models/RegressionEvaluator.cs @@ -24,49 +24,47 @@ public sealed partial class RegressionEvaluator /// public RegressionMetrics Evaluate(PredictionModel model, ILearningPipelineLoader testData) { - using (var environment = new ConsoleEnvironment()) - { - environment.CheckValue(model, nameof(model)); - environment.CheckValue(testData, nameof(testData)); + var environment = new MLContext(); + environment.CheckValue(model, nameof(model)); + environment.CheckValue(testData, nameof(testData)); - Experiment experiment = environment.CreateExperiment(); + Experiment experiment = environment.CreateExperiment(); - ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); - if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) - { - throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); - } + ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); + if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) + { + throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); + } - var datasetScorer = new DatasetTransformScorer - { - Data = testDataOutput.Data, - }; - DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); + var datasetScorer = new DatasetTransformScorer + { + Data = testDataOutput.Data, + }; + DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); - Data = scoreOutput.ScoredData; - Output evaluteOutput = experiment.Add(this); + Data = scoreOutput.ScoredData; + Output evaluteOutput = experiment.Add(this); - experiment.Compile(); + experiment.Compile(); - experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); - testData.SetInput(environment, experiment); + experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); + testData.SetInput(environment, experiment); - experiment.Run(); + experiment.Run(); - IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); + IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); - if (overallMetrics == null) - { - throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(RegressionEvaluator)} Evaluate."); - } + if (overallMetrics == null) + { + throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(RegressionEvaluator)} Evaluate."); + } - var metric = RegressionMetrics.FromOverallMetrics(environment, overallMetrics); + var metric = RegressionMetrics.FromOverallMetrics(environment, overallMetrics); - if (metric.Count != 1) - throw environment.Except($"Exactly one metric set was expected but found {metric.Count} metrics"); + if (metric.Count != 1) + throw environment.Except($"Exactly one metric set was expected but found {metric.Count} metrics"); - return metric[0]; - } + return metric[0]; } } } diff --git a/src/Microsoft.ML.Legacy/Models/TrainTestEvaluator.cs b/src/Microsoft.ML.Legacy/Models/TrainTestEvaluator.cs index 6972b8cf3e..dbf5df1b50 100644 --- a/src/Microsoft.ML.Legacy/Models/TrainTestEvaluator.cs +++ b/src/Microsoft.ML.Legacy/Models/TrainTestEvaluator.cs @@ -30,7 +30,7 @@ public TrainTestEvaluatorOutput TrainTestEvaluate /// Returns labels that correspond to indices of the score array in the case of @@ -40,7 +36,7 @@ internal TransformModel PredictorModel public bool TryGetScoreLabelNames(out string[] names, string scoreColumnName = DefaultColumnNames.Score) { names = null; - var schema = _predictorModel.OutputSchema; + var schema = PredictorModel.OutputSchema; int colIndex = -1; if (!schema.TryGetColumnIndex(scoreColumnName, out colIndex)) return false; @@ -125,15 +121,13 @@ public static Task> ReadAsync( if (stream == null) throw new ArgumentNullException(nameof(stream)); - using (var environment = new ConsoleEnvironment()) - { - AssemblyRegistration.RegisterAssemblies(environment); + var environment = new MLContext(); + AssemblyRegistration.RegisterAssemblies(environment); - BatchPredictionEngine predictor = - environment.CreateBatchPredictionEngine(stream); + BatchPredictionEngine predictor = + environment.CreateBatchPredictionEngine(stream); - return Task.FromResult(new PredictionModel(predictor, stream)); - } + return Task.FromResult(new PredictionModel(predictor, stream)); } /// @@ -141,7 +135,7 @@ public static Task> ReadAsync( /// /// Incoming IDataView /// IDataView which contains predictions - public IDataView Predict(IDataView input) => _predictorModel.Apply(_env, input); + public IDataView Predict(IDataView input) => PredictorModel.Apply(_env, input); /// /// Save model to file. @@ -168,7 +162,7 @@ public Task WriteAsync(Stream stream) { if (stream == null) throw new ArgumentNullException(nameof(stream)); - _predictorModel.Save(_env, stream); + PredictorModel.Save(_env, stream); return Task.CompletedTask; } } diff --git a/src/Microsoft.ML.Legacy/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Legacy/Properties/AssemblyInfo.cs index 52835b2f81..70fe21adb6 100644 --- a/src/Microsoft.ML.Legacy/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Legacy/Properties/AssemblyInfo.cs @@ -2,8 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Reflection; +using Microsoft.ML; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -[assembly: InternalsVisibleTo("Microsoft.ML.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")] +[assembly: InternalsVisibleTo("Microsoft.ML.Tests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo("Microsoft.ML.Core.Tests" + PublicKey.TestValue)] diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CVSplit.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CVSplit.cs index a99d3a9f6e..0b7f0fe94a 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CVSplit.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CVSplit.cs @@ -68,11 +68,11 @@ public static Output Split(IHostEnvironment env, Input input) { var trainData = new RangeFilter(host, new RangeFilter.Arguments { Column = stratCol, Min = i * fraction, Max = (i + 1) * fraction, Complement = true }, data); - output.TrainData[i] = SelectColumnsTransform.CreateDrop(host, trainData, stratCol); + output.TrainData[i] = ColumnSelectingTransformer.CreateDrop(host, trainData, stratCol); var testData = new RangeFilter(host, new RangeFilter.Arguments { Column = stratCol, Min = i * fraction, Max = (i + 1) * fraction, Complement = false }, data); - output.TestData[i] = SelectColumnsTransform.CreateDrop(host, testData, stratCol); + output.TestData[i] = ColumnSelectingTransformer.CreateDrop(host, testData, stratCol); } return output; diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/EntryPointGeneratorBase.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/EntryPointGeneratorBase.cs index 3018e08fb8..e5bc4f4cd6 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/EntryPointGeneratorBase.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/EntryPointGeneratorBase.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.CodeDom.Compiler; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Internal.Utilities; @@ -10,7 +11,7 @@ namespace Microsoft.ML.Runtime.EntryPoints.CodeGen { internal abstract class EntryPointGeneratorBase : GeneratorBase { - protected override void GenerateContent(IndentingTextWriter writer, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) + protected override void GenerateContent(IndentedTextWriter writer, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) { GenerateSummaryComment(writer, component); GenerateReturnComment(writer); @@ -21,9 +22,9 @@ protected override void GenerateContent(IndentingTextWriter writer, string prefi GenerateImplCall(writer, prefix, component); } - protected abstract void GenerateSummaryComment(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component); + protected abstract void GenerateSummaryComment(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component); - protected void GenerateSummaryComment(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) + protected void GenerateSummaryComment(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) { if (Exclude.Contains(arg.LongName)) return; @@ -31,18 +32,18 @@ protected void GenerateSummaryComment(IndentingTextWriter w, CmdParser.ArgInfo.A GenerateParameterComment(w, arg.LongName + argSuffix, arg.HelpText); } - protected void GenerateParameterComment(IndentingTextWriter w, string name, string description) + protected void GenerateParameterComment(IndentedTextWriter w, string name, string description) { w.WriteLine("/// {1}", name, description); } - protected abstract void GenerateReturnComment(IndentingTextWriter w); + protected abstract void GenerateReturnComment(IndentedTextWriter w); - protected abstract void GenerateModuleAttribute(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId); + protected abstract void GenerateModuleAttribute(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId); - protected abstract void GenerateOutputPort(IndentingTextWriter w); + protected abstract void GenerateOutputPort(IndentedTextWriter w); - protected void GenerateModuleType(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component) + protected void GenerateModuleType(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component) { string cat; if (component.IsOfType(typeof(SignatureBinaryClassifierTrainer))) @@ -58,9 +59,9 @@ protected void GenerateModuleType(IndentingTextWriter w, ComponentCatalog.Loadab w.WriteLine("[DataLabModuleType(Type = ModuleType.{0})]", cat); } - protected abstract void GenerateMethodSignature(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component); + protected abstract void GenerateMethodSignature(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component); - protected void GenerateMethodSignature(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string parent, string parentType, string parentValue, ref string linePrefix, string argSuffix) + protected void GenerateMethodSignature(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string parent, string parentType, string parentValue, ref string linePrefix, string argSuffix) { if (Exclude.Contains(arg.LongName)) return; @@ -79,7 +80,7 @@ protected void GenerateMethodSignature(IndentingTextWriter w, CmdParser.ArgInfo. } } - protected void GenerateDataLabParameterAttribute(IndentingTextWriter w, string friendlyName, + protected void GenerateDataLabParameterAttribute(IndentedTextWriter w, string friendlyName, bool isOptional, string displayName, object defaultValue, string description, string parent = null, string parentType = null, string parentValue = null) { @@ -93,9 +94,9 @@ protected void GenerateDataLabParameterAttribute(IndentingTextWriter w, string f friendlyName, isOptional ? "true" : "false", displayName, p, pv, dv, description); } - protected abstract void GenerateImplCall(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component); + protected abstract void GenerateImplCall(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component); - protected void GenerateImplCall(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) + protected void GenerateImplCall(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) { if (Exclude.Contains(arg.LongName)) return; @@ -119,7 +120,7 @@ protected override string GetCSharpTypeName(Type type) return base.GetCSharpTypeName(type); } - protected override void GenerateUsings(IndentingTextWriter w) + protected override void GenerateUsings(IndentedTextWriter w) { w.WriteLine("using System;"); w.WriteLine("using System.Diagnostics.CodeAnalysis;"); diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/GeneratorBase.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/GeneratorBase.cs index 562d4dacde..4bad797a57 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/GeneratorBase.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/GeneratorBase.cs @@ -9,6 +9,7 @@ using Microsoft.ML.Transforms; using System; using System.CodeDom; +using System.CodeDom.Compiler; using System.Collections.Generic; using System.Reflection; @@ -43,7 +44,7 @@ internal abstract class GeneratorBase /// /// The set of parameters to exclude /// The set of extra namespaces - public void Generate(IndentingTextWriter writer, string prefix, string regenerate, ComponentCatalog.LoadableClassInfo component, + public void Generate(IndentedTextWriter writer, string prefix, string regenerate, ComponentCatalog.LoadableClassInfo component, string moduleId, string moduleName, string moduleOwner, string moduleVersion, string moduleState, string moduleType, string moduleDeterminism, string moduleCategory, HashSet exclude, HashSet namespaces) { @@ -69,7 +70,7 @@ public void Generate(IndentingTextWriter writer, string prefix, string regenerat GenerateFooter(writer); } - private void GenerateHeader(IndentingTextWriter w, string regenerate) + private void GenerateHeader(IndentedTextWriter w, string regenerate) { w.WriteLine("//------------------------------------------------------------------------------"); w.WriteLine("// "); @@ -92,9 +93,9 @@ private void GenerateHeader(IndentingTextWriter w, string regenerate) GenerateUsings(w); } - protected abstract void GenerateUsings(IndentingTextWriter w); + protected abstract void GenerateUsings(IndentedTextWriter w); - protected virtual void GenerateClassName(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) + protected virtual void GenerateClassName(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.WriteLine(); var className = prefix + component.LoadNames[0]; @@ -103,9 +104,9 @@ protected virtual void GenerateClassName(IndentingTextWriter w, string prefix, C w.WriteLine("{"); } - protected abstract void GenerateContent(IndentingTextWriter writer, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId); + protected abstract void GenerateContent(IndentedTextWriter writer, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId); - private void GenerateFooter(IndentingTextWriter w) + private void GenerateFooter(IndentedTextWriter w) { w.WriteLine("}"); } @@ -149,7 +150,7 @@ protected bool IsTrainer(Type sigType) sigType == typeof(SignatureSequenceTrainer); } - protected virtual void GenerateParameter(IndentingTextWriter w, string type, string name) + protected virtual void GenerateParameter(IndentedTextWriter w, string type, string name) { w.Write("{0} {1}", type, name); } diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ImplGeneratorBase.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ImplGeneratorBase.cs index 910115d3ea..287481245f 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ImplGeneratorBase.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ImplGeneratorBase.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.CodeDom.Compiler; using System.Linq; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; @@ -12,7 +13,7 @@ namespace Microsoft.ML.Runtime.EntryPoints.CodeGen { internal abstract class ImplGeneratorBase : GeneratorBase { - protected override void GenerateContent(IndentingTextWriter writer, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) + protected override void GenerateContent(IndentedTextWriter writer, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) { GenerateImplFields(writer, component, (w, a) => GenerateFieldsOrProperties(w, a, "", GenerateField)); GenerateImplFields(writer, component, (w, a) => GenerateFieldsOrProperties(w, a, "", GenerateProperty)); @@ -20,8 +21,8 @@ protected override void GenerateContent(IndentingTextWriter writer, string prefi GenerateImplBody(writer, component); } - protected void GenerateImplFields(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component, - Action fieldGenerator) + protected void GenerateImplFields(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component, + Action fieldGenerator) { var argumentInfo = CmdParser.GetArgInfo(component.ArgType, component.CreateArguments()); var arguments = argumentInfo.Args.Where(a => !a.IsHidden).ToArray(); @@ -33,8 +34,8 @@ protected void GenerateImplFields(IndentingTextWriter w, ComponentCatalog.Loadab /// Generates private fields and public properties for all the fields in the arguments. /// Recursively generate fields and properties for subcomponents. /// - protected void GenerateFieldsOrProperties(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix, - Action oneFieldGenerator) + protected void GenerateFieldsOrProperties(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix, + Action oneFieldGenerator) { if (Exclude.Contains(arg.LongName)) return; @@ -45,14 +46,14 @@ protected void GenerateFieldsOrProperties(IndentingTextWriter w, CmdParser.ArgIn oneFieldGenerator(w, typeName, arg.LongName + argSuffix, defVal, arg.ItemType == typeof(bool), arg.HelpText); } - protected static void GenerateField(IndentingTextWriter w, string typeName, string argName, string defVal, + protected static void GenerateField(IndentedTextWriter w, string typeName, string argName, string defVal, bool isBool, string helpText) { w.WriteLine("private {0} {1}{2};", typeName, argName, defVal); w.WriteLine(); } - protected static void GenerateProperty(IndentingTextWriter w, string typeName, string argName, string defVal, + protected static void GenerateProperty(IndentedTextWriter w, string typeName, string argName, string defVal, bool isBool, string helpText) { var help = helpText ?? argName; @@ -69,12 +70,12 @@ protected static void GenerateProperty(IndentingTextWriter w, string typeName, s w.WriteLine(); } - protected abstract void GenerateMethodSignature(IndentingTextWriter w, string prefix, + protected abstract void GenerateMethodSignature(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component); - protected abstract void GenerateImplBody(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component); + protected abstract void GenerateImplBody(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component); - protected void GenerateImplBody(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) + protected void GenerateImplBody(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) { if (Exclude.Contains(arg.LongName)) return; @@ -92,7 +93,7 @@ protected void GenerateImplBody(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg w.WriteLine("args{0}.{1} = {2};", argSuffix, arg.LongName, arg.LongName + argSuffix); } - protected override void GenerateUsings(IndentingTextWriter w) + protected override void GenerateUsings(IndentedTextWriter w) { w.WriteLine("using System;"); w.WriteLine("using System.Linq;"); diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/LearnerGenerators.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/LearnerGenerators.cs index 1cafa36ac3..396abc1380 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/LearnerGenerators.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/LearnerGenerators.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.CodeDom.Compiler; using System.IO; using System.Linq; using Microsoft.ML.Runtime.CommandLine; @@ -12,7 +13,7 @@ namespace Microsoft.ML.Runtime.EntryPoints.CodeGen { internal class LearnerImplGenerator : ImplGeneratorBase { - protected override void GenerateMethodSignature(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateMethodSignature(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("/// "); w.WriteLine("/// Creates a {0}", component.LoadNames[0]); @@ -21,7 +22,7 @@ protected override void GenerateMethodSignature(IndentingTextWriter w, string pr w.WriteLine("public Tuple GetTlcSettings()"); } - protected override void GenerateImplBody(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateImplBody(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("{"); using (w.Nest()) @@ -40,7 +41,7 @@ protected override void GenerateImplBody(IndentingTextWriter w, ComponentCatalog internal sealed class LearnerEntryPointGenerator : EntryPointGeneratorBase { - protected override void GenerateSummaryComment(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateSummaryComment(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("/// "); var desc = component.Summary ?? component.LoadNames[0]; @@ -57,12 +58,12 @@ protected override void GenerateSummaryComment(IndentingTextWriter w, ComponentC GenerateSummaryComment(w, arg, ""); } - protected override void GenerateReturnComment(IndentingTextWriter w) + protected override void GenerateReturnComment(IndentedTextWriter w) { w.WriteLine("/// An untrained model."); } - protected override void GenerateModuleAttribute(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) + protected override void GenerateModuleAttribute(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) { if (!string.IsNullOrEmpty(prefix)) prefix += " "; @@ -94,13 +95,13 @@ protected override void GenerateModuleAttribute(IndentingTextWriter w, string pr } } - protected override void GenerateOutputPort(IndentingTextWriter w) + protected override void GenerateOutputPort(IndentedTextWriter w) { w.WriteLine( "[DataLabOutputPort(FriendlyName = \"Untrained model\", DisplayName = \"Untrained model\", Position = 0, DataType = WellKnownDataTypeIds.ITrainerDotNet, Description = \"An untrained model.\")]"); } - protected override void GenerateMethodSignature(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateMethodSignature(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.Write("public static Tuple Create{0}{1}(", prefix, component.LoadNames[0]); using (w.Nest()) @@ -114,7 +115,7 @@ protected override void GenerateMethodSignature(IndentingTextWriter w, string pr } } - protected override void GenerateImplCall(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateImplCall(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("{"); using (w.Nest()) diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ModuleGenerator.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ModuleGenerator.cs index c612197f31..d1377ce1f0 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ModuleGenerator.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ModuleGenerator.cs @@ -5,6 +5,7 @@ #pragma warning disable 420 // volatile with Interlocked.CompareExchange using System; +using System.CodeDom.Compiler; using System.Collections.Generic; using System.IO; using System.Linq; @@ -21,7 +22,7 @@ namespace Microsoft.ML.Runtime.EntryPoints.CodeGen { - public class ModuleGenerator : IGenerator + internal sealed class ModuleGenerator : IGenerator { private readonly string _modulePrefix; private readonly bool _generateModule; @@ -205,7 +206,7 @@ private void GenerateFile(ComponentCatalog.LoadableClassInfo info, string filena { using (var sw = new StreamWriter(filename)) { - var writer = IndentingTextWriter.Wrap(sw, " "); + var writer = new IndentedTextWriter(sw, " "); foreach (var kvp in mapping) { if (info.IsOfType(kvp.Key)) diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/TransformGenerators.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/TransformGenerators.cs index b17efbbbe8..facb3cfc5a 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/TransformGenerators.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/TransformGenerators.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.CodeDom.Compiler; using System.Collections.Generic; using System.IO; using System.Linq; @@ -15,7 +16,7 @@ namespace Microsoft.ML.Runtime.EntryPoints.CodeGen { internal sealed class TransformImplGenerator : ImplGeneratorBase { - protected override void GenerateMethodSignature(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateMethodSignature(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("/// "); w.WriteLine("/// Creates a {0}", component.LoadNames[0]); @@ -31,7 +32,7 @@ protected override void GenerateMethodSignature(IndentingTextWriter w, string pr } } - protected override void GenerateImplBody(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateImplBody(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("{"); using (w.Nest()) @@ -76,7 +77,7 @@ private string GenerateCall(ComponentCatalog.LoadableClassInfo component) internal sealed class TransformEntryPointGenerator : EntryPointGeneratorBase { - protected override void GenerateSummaryComment(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateSummaryComment(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("/// "); var desc = component.Summary ?? component.LoadNames[0]; @@ -93,12 +94,12 @@ protected override void GenerateSummaryComment(IndentingTextWriter w, ComponentC GenerateSummaryComment(w, arg, ""); } - protected override void GenerateReturnComment(IndentingTextWriter w) + protected override void GenerateReturnComment(IndentedTextWriter w) { w.WriteLine("/// A Tuple of transformed data and trained transform."); } - protected override void GenerateModuleAttribute(IndentingTextWriter w, string prefix, + protected override void GenerateModuleAttribute(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) { if (!string.IsNullOrEmpty(prefix)) @@ -117,7 +118,7 @@ protected override void GenerateModuleAttribute(IndentingTextWriter w, string pr } } - protected override void GenerateOutputPort(IndentingTextWriter w) + protected override void GenerateOutputPort(IndentedTextWriter w) { w.WriteLine( "[DataLabOutputPort(FriendlyName = \"Transformed IDataView\", DisplayName = \"Transformed IDataView\", Position = 0, DataType = WellKnownDataTypeIds.IDataViewDotNet, Description = \"Transformed data (IDataView)\")]"); @@ -125,7 +126,7 @@ protected override void GenerateOutputPort(IndentingTextWriter w) "[DataLabOutputPort(FriendlyName = \"Transformed data model\", DisplayName = \"Transformed data model\", Position = 1, DataType = WellKnownDataTypeIds.ITransformDotNet, Description = \"Transformed data model (ITransform)\")]"); } - protected override void GenerateMethodSignature(IndentingTextWriter w, string prefix, + protected override void GenerateMethodSignature(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("public static Tuple Create{0}{1}(", prefix, component.LoadNames[0]); @@ -141,7 +142,7 @@ protected override void GenerateMethodSignature(IndentingTextWriter w, string pr } } - protected override void GenerateImplCall(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateImplCall(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("{"); using (w.Nest()) @@ -163,7 +164,7 @@ internal sealed class TransformModuleInstanceEntryPointGenerator : GeneratorBase { private string _compName; - protected override void GenerateUsings(IndentingTextWriter w) + protected override void GenerateUsings(IndentedTextWriter w) { var allNamespaces = new HashSet(); foreach (var ns in Namespaces) @@ -185,7 +186,7 @@ protected override void GenerateUsings(IndentingTextWriter w) w.WriteLine("using {0};", ns); } - protected override void GenerateClassName(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateClassName(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.WriteLine(); var className = prefix + component.LoadNames[0]; @@ -194,7 +195,7 @@ protected override void GenerateClassName(IndentingTextWriter w, string prefix, w.WriteLine("{"); } - protected override void GenerateContent(IndentingTextWriter writer, string prefix, + protected override void GenerateContent(IndentedTextWriter writer, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) { writer.WriteLine("[Module("); @@ -310,7 +311,7 @@ protected override string EnumName(CmdParser.ArgInfo.Arg arg, Type sigType) return _compName + "." + base.EnumName(arg, sigType); } - private void GenerateMethodSignature(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string parent, string parentType, string parentValue, string argSuffix) + private void GenerateMethodSignature(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string parent, string parentType, string parentValue, string argSuffix) { if (Exclude.Contains(arg.LongName)) return; @@ -327,7 +328,7 @@ private void GenerateMethodSignature(IndentingTextWriter w, CmdParser.ArgInfo.Ar } } - private void GenerateDictionaryEntry(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) + private void GenerateDictionaryEntry(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) { if (Exclude.Contains(arg.LongName)) return; @@ -338,12 +339,12 @@ private void GenerateDictionaryEntry(IndentingTextWriter w, CmdParser.ArgInfo.Ar GenerateDictionaryEntry(w, GetCSharpTypeName(arg.ItemType), arg.LongName + argSuffix); } - private void GenerateDictionaryEntry(IndentingTextWriter w, string type, string name) + private void GenerateDictionaryEntry(IndentedTextWriter w, string type, string name) { w.WriteLine("{{ \"{0}\", {0} }},", name); } - private void GenerateImplCall(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string parent, string parentType, string parentValue, string argSuffix) + private void GenerateImplCall(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string parent, string parentType, string parentValue, string argSuffix) { if (Exclude.Contains(arg.LongName)) return; @@ -360,17 +361,17 @@ private void GenerateImplCall(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, GenerateImplCall(w, GetCSharpTypeName(arg.ItemType), arg.LongName + argSuffix); } - private void GenerateImplCall(IndentingTextWriter w, string type, string name) + private void GenerateImplCall(IndentedTextWriter w, string type, string name) { w.WriteLine("builder.{0} = ({1})parameters[\"{2}\"];", Capitalize(name), type, name); } - protected override void GenerateParameter(IndentingTextWriter w, string type, string name) + protected override void GenerateParameter(IndentedTextWriter w, string type, string name) { w.WriteLine("{0} {1},", type, name); } - private void GenerateParameterAttribute(IndentingTextWriter w, string displayName, object defaultValue, string description, + private void GenerateParameterAttribute(IndentedTextWriter w, string displayName, object defaultValue, string description, string parent = null, string parentType = null, string parentValue = null) { w.WriteLine("[Help(Display = @\"{0}\", ToolTip = \"{1}\")]", PrettyPrintDisplayName(displayName), description); diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/FeatureCombiner.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/FeatureCombiner.cs index f560671fae..ecf324f62a 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/FeatureCombiner.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/FeatureCombiner.cs @@ -58,7 +58,7 @@ public static CommonOutputs.TransformOutput PrepareFeatures(IHostEnvironment env throw ch.Except("No feature columns specified"); var featNames = new HashSet(); var concatNames = new List>(); - List cvt; + List cvt; int errCount; var ktv = ConvertFeatures(feats.ToArray(), featNames, concatNames, ch, out cvt, out errCount); Contracts.Assert(featNames.Count > 0); @@ -73,18 +73,18 @@ public static CommonOutputs.TransformOutput PrepareFeatures(IHostEnvironment env // (a key type) as a feature column. We convert that column to a vector so it is no longer valid // as a group id. That's just one example - you get the idea. string nameFeat = DefaultColumnNames.Features; - viewTrain = ConcatTransform.Create(host, - new ConcatTransform.TaggedArguments() + viewTrain = ColumnConcatenatingTransformer.Create(host, + new ColumnConcatenatingTransformer.TaggedArguments() { Column = - new[] { new ConcatTransform.TaggedColumn() { Name = nameFeat, Source = concatNames.ToArray() } } + new[] { new ColumnConcatenatingTransformer.TaggedColumn() { Name = nameFeat, Source = concatNames.ToArray() } } }, viewTrain); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, viewTrain, input.Data), OutputData = viewTrain }; } } - private static IDataView ApplyKeyToVec(List ktv, IDataView viewTrain, IHost host) + private static IDataView ApplyKeyToVec(List ktv, IDataView viewTrain, IHost host) { Contracts.AssertValueOrNull(ktv); Contracts.AssertValue(viewTrain); @@ -95,19 +95,19 @@ private static IDataView ApplyKeyToVec(List ktv // when the user has slightly different key values between the training and testing set. // The solution is to apply KeyToValue, then Term using the terms from the key metadata of the original key column // and finally the KeyToVector transform. - viewTrain = new KeyToValueTransform(host, ktv.Select(x => (x.Input, x.Output)).ToArray()) + viewTrain = new KeyToValueMappingTransformer(host, ktv.Select(x => (x.Input, x.Output)).ToArray()) .Transform(viewTrain); - viewTrain = TermTransform.Create(host, - new TermTransform.Arguments() + viewTrain = ValueToKeyMappingTransformer.Create(host, + new ValueToKeyMappingTransformer.Arguments() { Column = ktv - .Select(c => new TermTransform.Column() { Name = c.Output, Source = c.Output, Terms = GetTerms(viewTrain, c.Input) }) + .Select(c => new ValueToKeyMappingTransformer.Column() { Name = c.Output, Source = c.Output, Terms = GetTerms(viewTrain, c.Input) }) .ToArray(), TextKeyValues = true }, viewTrain); - viewTrain = KeyToVectorTransform.Create(host, viewTrain, ktv.Select(c => new KeyToVectorTransform.ColumnInfo(c.Output, c.Output)).ToArray()); + viewTrain = KeyToVectorMappingTransformer.Create(host, viewTrain, ktv.Select(c => new KeyToVectorMappingTransformer.ColumnInfo(c.Output, c.Output)).ToArray()); } return viewTrain; } @@ -129,33 +129,34 @@ private static string GetTerms(IDataView data, string colName) return null; var sb = new StringBuilder(); var pre = ""; - for (int i = 0; i < metadata.Length; i++) + var metadataValues = metadata.GetValues(); + for (int i = 0; i < metadataValues.Length; i++) { sb.Append(pre); - sb.AppendMemory(metadata.Values[i]); + sb.AppendMemory(metadataValues[i]); pre = ","; } return sb.ToString(); } - private static IDataView ApplyConvert(List cvt, IDataView viewTrain, IHostEnvironment env) + private static IDataView ApplyConvert(List cvt, IDataView viewTrain, IHostEnvironment env) { Contracts.AssertValueOrNull(cvt); Contracts.AssertValue(viewTrain); Contracts.AssertValue(env); if (Utils.Size(cvt) > 0) - viewTrain = new ConvertingTransform(env,cvt.ToArray()).Transform(viewTrain); + viewTrain = new TypeConvertingTransformer(env,cvt.ToArray()).Transform(viewTrain); return viewTrain; } - private static List ConvertFeatures(ColumnInfo[] feats, HashSet featNames, List> concatNames, IChannel ch, - out List cvt, out int errCount) + private static List ConvertFeatures(ColumnInfo[] feats, HashSet featNames, List> concatNames, IChannel ch, + out List cvt, out int errCount) { Contracts.AssertValue(feats); Contracts.AssertValue(featNames); Contracts.AssertValue(concatNames); Contracts.AssertValue(ch); - List ktv = null; + List ktv = null; cvt = null; errCount = 0; foreach (var col in feats) @@ -173,7 +174,7 @@ private static IDataView ApplyConvert(List cvt, { var colName = GetUniqueName(); concatNames.Add(new KeyValuePair(col.Name, colName)); - Utils.Add(ref ktv, new KeyToVectorTransform.ColumnInfo(col.Name, colName)); + Utils.Add(ref ktv, new KeyToVectorMappingTransformer.ColumnInfo(col.Name, colName)); continue; } } @@ -184,7 +185,7 @@ private static IDataView ApplyConvert(List cvt, // This happens when the training is done on an XDF and the scoring is done on a data frame. var colName = GetUniqueName(); concatNames.Add(new KeyValuePair(col.Name, colName)); - Utils.Add(ref cvt, new ConvertingTransform.ColumnInfo(col.Name, colName, DataKind.R4)); + Utils.Add(ref cvt, new TypeConvertingTransformer.ColumnInfo(col.Name, colName, DataKind.R4)); continue; } } @@ -241,20 +242,20 @@ public static CommonOutputs.TransformOutput PrepareClassificationLabel(IHostEnvi return new CommonOutputs.TransformOutput { Model = new TransformModel(env, nop, input.Data), OutputData = nop }; } - var args = new TermTransform.Arguments() + var args = new ValueToKeyMappingTransformer.Arguments() { Column = new[] { - new TermTransform.Column() + new ValueToKeyMappingTransformer.Column() { Name = input.LabelColumn, Source = input.LabelColumn, TextKeyValues = input.TextKeyValues, - Sort = TermTransform.SortOrder.Value + Sort = ValueToKeyMappingTransformer.SortOrder.Value } } }; - var xf = TermTransform.Create(host, args, input.Data); + var xf = ValueToKeyMappingTransformer.Create(host, args, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } @@ -276,7 +277,7 @@ public static CommonOutputs.TransformOutput ConvertPredictedLabel(IHostEnvironme return new CommonOutputs.TransformOutput { Model = new TransformModel(env, nop, input.Data), OutputData = nop }; } - var xf = new KeyToValueTransform(host, input.PredictedLabelColumn).Transform(input.Data); + var xf = new KeyToValueMappingTransformer(host, input.PredictedLabelColumn).Transform(input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } @@ -298,11 +299,11 @@ public static CommonOutputs.TransformOutput PrepareRegressionLabel(IHostEnvironm return new CommonOutputs.TransformOutput { Model = new TransformModel(env, nop, input.Data), OutputData = nop }; } - var args = new ConvertingTransform.Arguments() + var args = new TypeConvertingTransformer.Arguments() { Column = new[] { - new ConvertingTransform.Column() + new TypeConvertingTransformer.Column() { Name = input.LabelColumn, Source = input.LabelColumn, @@ -310,7 +311,7 @@ public static CommonOutputs.TransformOutput PrepareRegressionLabel(IHostEnvironm } } }; - var xf = new ConvertingTransform(host, new ConvertingTransform.ColumnInfo(input.LabelColumn, input.LabelColumn, DataKind.R4)).Transform(input.Data); + var xf = new TypeConvertingTransformer(host, new TypeConvertingTransformer.ColumnInfo(input.LabelColumn, input.LabelColumn, DataKind.R4)).Transform(input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } } diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/ExecuteGraphCommand.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/ExecuteGraphCommand.cs index a3d02d10e4..d6e95961ec 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/ExecuteGraphCommand.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/ExecuteGraphCommand.cs @@ -21,7 +21,7 @@ namespace Microsoft.ML.Runtime.EntryPoints.JsonUtils { - public sealed class ExecuteGraphCommand : ICommand + internal sealed class ExecuteGraphCommand : ICommand { public sealed class Arguments { diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/GraphRunner.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/GraphRunner.cs index 9ebb25e301..af6e2b818d 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/GraphRunner.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/GraphRunner.cs @@ -140,7 +140,7 @@ public void SetInput(string name, TInput input) /// /// Get the data kind of a particular port. /// - public TlcModule.DataKind GetPortDataKind(string name) + internal TlcModule.DataKind GetPortDataKind(string name) { _host.CheckNonEmpty(name, nameof(name)); EntryPointVariable variable; diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/TrainTestSplit.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/TrainTestSplit.cs index 3d4094ba85..928e557e37 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/TrainTestSplit.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/TrainTestSplit.cs @@ -54,11 +54,11 @@ public static Output Split(IHostEnvironment env, Input input) IDataView trainData = new RangeFilter(host, new RangeFilter.Arguments { Column = stratCol, Min = 0, Max = input.Fraction, Complement = false }, data); - trainData = SelectColumnsTransform.CreateDrop(host, trainData, stratCol); + trainData = ColumnSelectingTransformer.CreateDrop(host, trainData, stratCol); IDataView testData = new RangeFilter(host, new RangeFilter.Arguments { Column = stratCol, Min = 0, Max = input.Fraction, Complement = true }, data); - testData = SelectColumnsTransform.CreateDrop(host, testData, stratCol); + testData = ColumnSelectingTransformer.CreateDrop(host, testData, stratCol); return new Output() { TrainData = trainData, TestData = testData }; } @@ -91,10 +91,10 @@ public static string CreateStratificationColumn(IHost host, ref IDataView data, } else { - data = new HashJoinTransform(host, - new HashJoinTransform.Arguments + data = new HashJoiningTransform(host, + new HashJoiningTransform.Arguments { - Column = new[] { new HashJoinTransform.Column { Name = stratCol, Source = stratificationColumn } }, + Column = new[] { new HashJoiningTransform.Column { Name = stratCol, Source = stratificationColumn } }, Join = true, HashBits = 30 }, data); diff --git a/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpApiGenerator.cs b/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpApiGenerator.cs index 0bcf5a6776..d341e2f223 100644 --- a/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpApiGenerator.cs +++ b/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpApiGenerator.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.CodeDom.Compiler; using System.Collections.Generic; using System.IO; using System.Linq; @@ -22,7 +23,7 @@ namespace Microsoft.ML.Runtime.Internal.Tools { - public sealed class CSharpApiGenerator : IGenerator + internal sealed class CSharpApiGenerator : IGenerator { public sealed class Arguments { @@ -63,7 +64,7 @@ public void Generate(IEnumerable infos) using (var sw = new StreamWriter(_csFilename)) { - var writer = IndentingTextWriter.Wrap(sw, " "); + var writer = new IndentedTextWriter(sw, " "); // Generate header CSharpGeneratorUtils.GenerateHeader(writer); @@ -106,7 +107,7 @@ public void Generate(IEnumerable infos) } } - private void GenerateInputOutput(IndentingTextWriter writer, ComponentCatalog.EntryPointInfo entryPointInfo, ComponentCatalog catalog) + private void GenerateInputOutput(IndentedTextWriter writer, ComponentCatalog.EntryPointInfo entryPointInfo, ComponentCatalog catalog) { var classAndMethod = CSharpGeneratorUtils.GetEntryPointMetadata(entryPointInfo); writer.WriteLine($"namespace Legacy.{classAndMethod.Namespace}"); @@ -115,10 +116,10 @@ private void GenerateInputOutput(IndentingTextWriter writer, ComponentCatalog.En GenerateInput(writer, entryPointInfo, catalog); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLine(); + writer.WriteLineNoTabs(); } - private void GenerateEnums(IndentingTextWriter writer, Type inputType, string currentNamespace) + private void GenerateEnums(IndentedTextWriter writer, Type inputType, string currentNamespace) { foreach (var fieldInfo in inputType.GetFields()) { @@ -149,35 +150,37 @@ private void GenerateEnums(IndentingTextWriter writer, Type inputType, string cu } _generatedClasses.MarkAsGenerated(type.FullName); - writer.Write("{"); + writer.WriteLine("{"); writer.Indent(); var names = Enum.GetNames(type); var values = Enum.GetValues(type); - string prefix = ""; + var lines = new List(); for (int i = 0; i < names.Length; i++) { var name = names[i]; if (type.GetField(name).GetCustomAttribute() != null) continue; var value = values.GetValue(i); - writer.WriteLine(prefix); if (enumType == typeof(int)) - writer.Write($"{name} = {(int)value}"); + lines.Add($"{name} = {(int)value}"); else { Contracts.Assert(enumType == typeof(byte)); - writer.Write($"{name} = {(byte)value}"); + lines.Add($"{name} = {(byte)value}"); } - prefix = ","; } - writer.WriteLine(); + for (int i = 0; i < lines.Count - 1; i++) + { + writer.WriteLine($"{lines[i]},"); + } + writer.WriteLine($"{lines[lines.Count-1]}"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLine(); + writer.WriteLineNoTabs(); } } - private void GenerateClasses(IndentingTextWriter writer, Type inputType, ComponentCatalog catalog, string currentNamespace) + private void GenerateClasses(IndentedTextWriter writer, Type inputType, ComponentCatalog catalog, string currentNamespace) { foreach (var fieldInfo in inputType.GetFields()) { @@ -221,11 +224,11 @@ private void GenerateClasses(IndentingTextWriter writer, Type inputType, Compone GenerateInputFields(writer, type, catalog, currentNamespace); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLine(); + writer.WriteLineNoTabs(); } } - private void GenerateColumnAddMethods(IndentingTextWriter writer, Type inputType, ComponentCatalog catalog, + private void GenerateColumnAddMethods(IndentedTextWriter writer, Type inputType, ComponentCatalog catalog, string className, out Type columnType) { columnType = null; @@ -253,7 +256,7 @@ private void GenerateColumnAddMethods(IndentingTextWriter writer, Type inputType } } - private Type GenerateManyToOneColumn(IndentingTextWriter writer, string className, Type columnType, + private Type GenerateManyToOneColumn(IndentedTextWriter writer, string className, Type columnType, System.Reflection.FieldInfo fieldInfo, ArgumentAttribute inputAttr, Type type, bool isArray) { var fieldName = CSharpGeneratorUtils.Capitalize(inputAttr.Name ?? fieldInfo.Name); @@ -282,7 +285,7 @@ private Type GenerateManyToOneColumn(IndentingTextWriter writer, string classNam writer.WriteLine($"{fieldName} = ManyToOneColumn<{apiName}>.Create(name, source);"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLine(); + writer.WriteLineNoTabs(); Contracts.Assert(columnType == null); @@ -290,7 +293,7 @@ private Type GenerateManyToOneColumn(IndentingTextWriter writer, string classNam return columnType; } - private Type GenerateOneToOneColumn(IndentingTextWriter writer, string className, Type columnType, + private Type GenerateOneToOneColumn(IndentedTextWriter writer, string className, Type columnType, System.Reflection.FieldInfo fieldInfo, ArgumentAttribute inputAttr, Type type, bool isArray) { var fieldName = CSharpGeneratorUtils.Capitalize(inputAttr.Name ?? fieldInfo.Name); @@ -346,7 +349,7 @@ private Type GenerateOneToOneColumn(IndentingTextWriter writer, string className writer.WriteLine($"{fieldName} = OneToOneColumn<{generatedType}>.Create(inputColumn);"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLine(); + writer.WriteLineNoTabs(); writer.WriteLine($"public void Add{fieldName}(string outputColumn, string inputColumn)"); writer.WriteLine("{"); writer.Indent(); @@ -360,7 +363,7 @@ private Type GenerateOneToOneColumn(IndentingTextWriter writer, string className writer.WriteLine($"{fieldName} = OneToOneColumn<{generatedType}>.Create(outputColumn, inputColumn);"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLine(); + writer.WriteLineNoTabs(); Contracts.Assert(columnType == null); @@ -368,7 +371,7 @@ private Type GenerateOneToOneColumn(IndentingTextWriter writer, string className return columnType; } - private void GenerateInput(IndentingTextWriter writer, ComponentCatalog.EntryPointInfo entryPointInfo, ComponentCatalog catalog) + private void GenerateInput(IndentedTextWriter writer, ComponentCatalog.EntryPointInfo entryPointInfo, ComponentCatalog catalog) { var entryPointMetadata = CSharpGeneratorUtils.GetEntryPointMetadata(entryPointInfo); string classBase = ""; @@ -380,7 +383,7 @@ private void GenerateInput(IndentingTextWriter writer, ComponentCatalog.EntryPoi } GenerateEnums(writer, entryPointInfo.InputType, _defaultNamespace + entryPointMetadata.Namespace); - writer.WriteLine(); + writer.WriteLineNoTabs(); GenerateClasses(writer, entryPointInfo.InputType, catalog, _defaultNamespace + entryPointMetadata.Namespace); CSharpGeneratorUtils.GenerateSummary(writer, entryPointInfo.Description, entryPointInfo.XmlInclude); @@ -390,14 +393,14 @@ private void GenerateInput(IndentingTextWriter writer, ComponentCatalog.EntryPoi writer.WriteLine($"public sealed partial class {entryPointMetadata.ClassName}{classBase}"); writer.WriteLine("{"); writer.Indent(); - writer.WriteLine(); + writer.WriteLineNoTabs(); if (entryPointInfo.InputKinds != null && entryPointInfo.InputKinds.Any(t => typeof(Legacy.ILearningPipelineLoader).IsAssignableFrom(t))) CSharpGeneratorUtils.GenerateLoaderAddInputMethod(writer, entryPointMetadata.ClassName); GenerateColumnAddMethods(writer, entryPointInfo.InputType, catalog, entryPointMetadata.ClassName, out Type transformType); - writer.WriteLine(); + writer.WriteLineNoTabs(); GenerateInputFields(writer, entryPointInfo.InputType, catalog, _defaultNamespace + entryPointMetadata.Namespace); - writer.WriteLine(); + writer.WriteLineNoTabs(); GenerateOutput(writer, entryPointInfo, out HashSet outputVariableNames); GenerateApplyFunction(writer, entryPointMetadata.ClassName, transformType, outputVariableNames, entryPointInfo.InputKinds); @@ -405,7 +408,7 @@ private void GenerateInput(IndentingTextWriter writer, ComponentCatalog.EntryPoi writer.WriteLine("}"); } - private static void GenerateApplyFunction(IndentingTextWriter writer, string className, Type type, + private static void GenerateApplyFunction(IndentedTextWriter writer, string className, Type type, HashSet outputVariableNames, Type[] inputKinds) { if (inputKinds == null) @@ -441,7 +444,7 @@ private static void GenerateApplyFunction(IndentingTextWriter writer, string cla writer.WriteLine("throw new InvalidOperationException($\"{ nameof(" + className + ")} only supports an { nameof(ILearningPipelineDataStep)} as an input.\");"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLine(); + writer.WriteLineNoTabs(); if (isTransform) { @@ -460,7 +463,7 @@ private static void GenerateApplyFunction(IndentingTextWriter writer, string cla writer.WriteLine("}"); //Pipeline step. - writer.WriteLine(); + writer.WriteLineNoTabs(); if (isTransform && !isCalibrator) writer.WriteLine($"private class {pipelineStep} : ILearningPipelineDataStep"); else @@ -483,7 +486,7 @@ private static void GenerateApplyFunction(IndentingTextWriter writer, string cla writer.Outdent(); writer.WriteLine("}"); - writer.WriteLine(); + writer.WriteLineNoTabs(); if (isTransform && !isCalibrator) { @@ -497,7 +500,7 @@ private static void GenerateApplyFunction(IndentingTextWriter writer, string cla writer.WriteLine("}"); } - private void GenerateInputFields(IndentingTextWriter writer, Type inputType, ComponentCatalog catalog, string rootNameSpace) + private void GenerateInputFields(IndentedTextWriter writer, Type inputType, ComponentCatalog catalog, string rootNameSpace) { var defaults = Activator.CreateInstance(inputType); foreach (var fieldInfo in inputType.GetFields()) @@ -513,7 +516,7 @@ private void GenerateInputFields(IndentingTextWriter writer, Type inputType, Com if (fieldInfo.FieldType == typeof(JArray)) { writer.WriteLine($"public Experiment {CSharpGeneratorUtils.Capitalize(inputAttr.Name ?? fieldInfo.Name)} {{ get; set; }}"); - writer.WriteLine(); + writer.WriteLineNoTabs(); continue; } @@ -542,16 +545,16 @@ private void GenerateInputFields(IndentingTextWriter writer, Type inputType, Com writer.WriteLine(sweepableParamAttr.ToString()); } - writer.Write($"public {inputTypeString} {CSharpGeneratorUtils.Capitalize(inputAttr.Name ?? fieldInfo.Name)} {{ get; set; }}"); + var line = $"public {inputTypeString} {CSharpGeneratorUtils.Capitalize(inputAttr.Name ?? fieldInfo.Name)} {{ get; set; }}"; var defaultValue = CSharpGeneratorUtils.GetValue(catalog, fieldInfo.FieldType, fieldInfo.GetValue(defaults), _generatedClasses, rootNameSpace); if (defaultValue != null) - writer.Write($" = {defaultValue};"); - writer.WriteLine(); - writer.WriteLine(); + line += $" = {defaultValue};"; + writer.WriteLine(line); + writer.WriteLineNoTabs(); } } - private void GenerateOutput(IndentingTextWriter writer, ComponentCatalog.EntryPointInfo entryPointInfo, out HashSet outputVariableNames) + private void GenerateOutput(IndentedTextWriter writer, ComponentCatalog.EntryPointInfo entryPointInfo, out HashSet outputVariableNames) { outputVariableNames = new HashSet(); string classBase = ""; @@ -575,25 +578,25 @@ private void GenerateOutput(IndentingTextWriter writer, ComponentCatalog.EntryPo var outputTypeString = CSharpGeneratorUtils.GetOutputType(fieldInfo.FieldType); outputVariableNames.Add(CSharpGeneratorUtils.Capitalize(outputAttr.Name ?? fieldInfo.Name)); writer.WriteLine($"public {outputTypeString} {CSharpGeneratorUtils.Capitalize(outputAttr.Name ?? fieldInfo.Name)} {{ get; set; }} = new {outputTypeString}();"); - writer.WriteLine(); + writer.WriteLineNoTabs(); } writer.Outdent(); writer.WriteLine("}"); } - private void GenerateComponentKind(IndentingTextWriter writer, string kind) + private void GenerateComponentKind(IndentedTextWriter writer, string kind) { writer.WriteLine($"public abstract class {kind} : ComponentKind {{}}"); - writer.WriteLine(); + writer.WriteLineNoTabs(); } - private void GenerateComponent(IndentingTextWriter writer, ComponentCatalog.ComponentInfo component, ComponentCatalog catalog) + private void GenerateComponent(IndentedTextWriter writer, ComponentCatalog.ComponentInfo component, ComponentCatalog catalog) { GenerateEnums(writer, component.ArgumentType, "Runtime"); - writer.WriteLine(); + writer.WriteLineNoTabs(); GenerateClasses(writer, component.ArgumentType, catalog, "Runtime"); - writer.WriteLine(); + writer.WriteLineNoTabs(); CSharpGeneratorUtils.GenerateSummary(writer, component.Description); writer.WriteLine($"public sealed class {CSharpGeneratorUtils.GetComponentName(component)} : {component.Kind}"); writer.WriteLine("{"); @@ -602,7 +605,7 @@ private void GenerateComponent(IndentingTextWriter writer, ComponentCatalog.Comp writer.WriteLine($"internal override string ComponentName => \"{component.Name}\";"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLine(); + writer.WriteLineNoTabs(); } } } diff --git a/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpGeneratorUtils.cs b/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpGeneratorUtils.cs index b918aa8147..5c96a652ba 100644 --- a/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpGeneratorUtils.cs +++ b/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpGeneratorUtils.cs @@ -4,6 +4,7 @@ using System; using System.CodeDom; +using System.CodeDom.Compiler; using System.Collections.Generic; using System.Linq; using System.Reflection; @@ -349,7 +350,7 @@ public static string GetComponentName(ComponentCatalog.ComponentInfo component) return $"{Capitalize(component.Name)}{component.Kind}"; } - public static void GenerateSummary(IndentingTextWriter writer, string summary, string[] xmlInclude = null) + public static void GenerateSummary(IndentedTextWriter writer, string summary, string[] xmlInclude = null) { // if the class has an XML it should contain the summary and everything else if (xmlInclude != null) @@ -368,7 +369,7 @@ public static void GenerateSummary(IndentingTextWriter writer, string summary, s writer.WriteLine("/// "); } - public static void GenerateHeader(IndentingTextWriter writer) + public static void GenerateHeader(IndentedTextWriter writer) { writer.WriteLine("//------------------------------------------------------------------------------"); writer.WriteLine("// "); @@ -387,7 +388,7 @@ public static void GenerateHeader(IndentingTextWriter writer) writer.WriteLine("using System;"); writer.WriteLine("using System.Linq;"); writer.WriteLine("using Microsoft.ML.Runtime.CommandLine;"); - writer.WriteLine(); + writer.WriteLineNoTabs(); writer.WriteLine("namespace Microsoft.ML"); writer.WriteLine("{"); writer.Indent(); @@ -399,13 +400,13 @@ public static void GenerateHeader(IndentingTextWriter writer) writer.Indent(); } - public static void GenerateFooter(IndentingTextWriter writer) + public static void GenerateFooter(IndentedTextWriter writer) { writer.Outdent(); writer.WriteLine("}"); } - public static void GenerateMethod(IndentingTextWriter writer, string className, string defaultNamespace) + public static void GenerateMethod(IndentedTextWriter writer, string className, string defaultNamespace) { var inputOuputClassName = defaultNamespace + className; writer.WriteLine($"public {inputOuputClassName}.Output Add({inputOuputClassName} input)"); @@ -416,17 +417,17 @@ public static void GenerateMethod(IndentingTextWriter writer, string className, writer.WriteLine("return output;"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLine(); + writer.WriteLineNoTabs(); writer.WriteLine($"public void Add({inputOuputClassName} input, {inputOuputClassName}.Output output)"); writer.WriteLine("{"); writer.Indent(); writer.WriteLine($"_jsonNodes.Add(Serialize(\"{className}\", input, output));"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLine(); + writer.WriteLineNoTabs(); } - public static void GenerateLoaderAddInputMethod(IndentingTextWriter writer, string className) + public static void GenerateLoaderAddInputMethod(IndentedTextWriter writer, string className) { //Constructor. writer.WriteLine("[JsonIgnore]"); @@ -475,7 +476,7 @@ public static void GenerateLoaderAddInputMethod(IndentingTextWriter writer, stri writer.WriteLine("Model = null;"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLine(); + writer.WriteLineNoTabs(); writer.WriteLine("public Var Data { get; }"); writer.WriteLine("public Var Model { get; }"); writer.Outdent(); diff --git a/src/Microsoft.ML.LightGBM/LightGbmBinaryTrainer.cs b/src/Microsoft.ML.LightGBM/LightGbmBinaryTrainer.cs index 2100be29c9..5ecf507771 100644 --- a/src/Microsoft.ML.LightGBM/LightGbmBinaryTrainer.cs +++ b/src/Microsoft.ML.LightGBM/LightGbmBinaryTrainer.cs @@ -103,9 +103,9 @@ internal LightGbmBinaryTrainer(IHostEnvironment env, LightGbmArguments args) /// Initializes a new instance of /// /// The private instance of . - /// The name of the label column. + /// The name of the labelColumn column. /// The name of the feature column. - /// The name for the column containing the initial weight. + /// The name for the column containing the initial weight. /// The number of leaves to use. /// Number of iterations. /// The minimal number of documents allowed in a leaf of the tree, out of the subsampled data. @@ -114,14 +114,16 @@ internal LightGbmBinaryTrainer(IHostEnvironment env, LightGbmArguments args) /// The settings here will override the ones provided in the direct signature, /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . - public LightGbmBinaryTrainer(IHostEnvironment env, string labelColumn, string featureColumn, - string weightColumn = null, + public LightGbmBinaryTrainer(IHostEnvironment env, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, int? numLeaves = null, int? minDataPerLeaf = null, double? learningRate = null, int numBoostRound = LightGbmArguments.Defaults.NumBoostRound, Action advancedSettings = null) - : base(env, LoadNameValue, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) + : base(env, LoadNameValue, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weights, null, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) { } diff --git a/src/Microsoft.ML.LightGBM/LightGbmCatalog.cs b/src/Microsoft.ML.LightGBM/LightGbmCatalog.cs index 56a892be4a..de4b84c3f1 100644 --- a/src/Microsoft.ML.LightGBM/LightGbmCatalog.cs +++ b/src/Microsoft.ML.LightGBM/LightGbmCatalog.cs @@ -10,7 +10,7 @@ namespace Microsoft.ML { /// - /// Regression trainer estimators. + /// LightGBM extension methods. /// public static class LightGbmExtensions { @@ -18,8 +18,8 @@ public static class LightGbmExtensions /// Predict a target using a decision tree regression model trained with the . /// /// The . - /// The label column. - /// The features column. + /// The labelColumn column. + /// The features column. /// The weights column. /// The number of leaves to use. /// Number of iterations. @@ -30,8 +30,8 @@ public static class LightGbmExtensions /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public static LightGbmRegressorTrainer LightGbm(this RegressionContext.RegressionTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weights = null, int? numLeaves = null, int? minDataPerLeaf = null, @@ -41,15 +41,15 @@ public static LightGbmRegressorTrainer LightGbm(this RegressionContext.Regressio { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new LightGbmRegressorTrainer(env, label, features, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); + return new LightGbmRegressorTrainer(env, labelColumn, featureColumn, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); } /// /// Predict a target using a decision tree binary classification model trained with the . /// /// The . - /// The label column. - /// The features column. + /// The labelColumn column. + /// The features column. /// The weights column. /// The number of leaves to use. /// Number of iterations. @@ -60,8 +60,8 @@ public static LightGbmRegressorTrainer LightGbm(this RegressionContext.Regressio /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public static LightGbmBinaryTrainer LightGbm(this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weights = null, int? numLeaves = null, int? minDataPerLeaf = null, @@ -71,7 +71,7 @@ public static LightGbmBinaryTrainer LightGbm(this BinaryClassificationContext.Bi { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new LightGbmBinaryTrainer(env, label, features, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); + return new LightGbmBinaryTrainer(env, labelColumn, featureColumn, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); } @@ -79,10 +79,10 @@ public static LightGbmBinaryTrainer LightGbm(this BinaryClassificationContext.Bi /// Predict a target using a decision tree binary classification model trained with the . /// /// The . - /// The label column. - /// The features column. + /// The labelColumn column. + /// The features column. /// The weights column. - /// The groupId column. + /// The groupId column. /// The number of leaves to use. /// Number of iterations. /// The minimal number of documents allowed in a leaf of the tree, out of the subsampled data. @@ -92,9 +92,9 @@ public static LightGbmBinaryTrainer LightGbm(this BinaryClassificationContext.Bi /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public static LightGbmRankingTrainer LightGbm(this RankingContext.RankingTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, - string groupId = DefaultColumnNames.GroupId, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string groupIdColumn = DefaultColumnNames.GroupId, string weights = null, int? numLeaves = null, int? minDataPerLeaf = null, @@ -104,7 +104,7 @@ public static LightGbmRankingTrainer LightGbm(this RankingContext.RankingTrainer { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new LightGbmRankingTrainer(env, label, features, groupId, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); + return new LightGbmRankingTrainer(env, labelColumn, featureColumn, groupIdColumn, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); } @@ -112,8 +112,8 @@ public static LightGbmRankingTrainer LightGbm(this RankingContext.RankingTrainer /// Predict a target using a decision tree binary classification model trained with the . /// /// The . - /// The label column. - /// The features column. + /// The labelColumn column. + /// The features column. /// The weights column. /// The number of leaves to use. /// Number of iterations. @@ -124,8 +124,8 @@ public static LightGbmRankingTrainer LightGbm(this RankingContext.RankingTrainer /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public static LightGbmMulticlassTrainer LightGbm(this MulticlassClassificationContext.MulticlassClassificationTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weights = null, int? numLeaves = null, int? minDataPerLeaf = null, @@ -135,7 +135,7 @@ public static LightGbmMulticlassTrainer LightGbm(this MulticlassClassificationCo { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new LightGbmMulticlassTrainer(env, label, features, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); + return new LightGbmMulticlassTrainer(env, labelColumn, featureColumn, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); } } diff --git a/src/Microsoft.ML.LightGBM/LightGbmMulticlassTrainer.cs b/src/Microsoft.ML.LightGBM/LightGbmMulticlassTrainer.cs index c589edc933..c3222cfde5 100644 --- a/src/Microsoft.ML.LightGBM/LightGbmMulticlassTrainer.cs +++ b/src/Microsoft.ML.LightGBM/LightGbmMulticlassTrainer.cs @@ -44,9 +44,9 @@ internal LightGbmMulticlassTrainer(IHostEnvironment env, LightGbmArguments args) /// Initializes a new instance of /// /// The private instance of . - /// The name of the label column. + /// The name of the labelColumn column. /// The name of the feature column. - /// The name for the column containing the initial weight. + /// The name for the column containing the initial weight. /// The number of leaves to use. /// Number of iterations. /// The minimal number of documents allowed in a leaf of the tree, out of the subsampled data. @@ -56,15 +56,15 @@ internal LightGbmMulticlassTrainer(IHostEnvironment env, LightGbmArguments args) /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public LightGbmMulticlassTrainer(IHostEnvironment env, - string labelColumn, - string featureColumn, - string weightColumn = null, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, int? numLeaves = null, int? minDataPerLeaf = null, double? learningRate = null, int numBoostRound = LightGbmArguments.Defaults.NumBoostRound, Action advancedSettings = null) - : base(env, LoadNameValue, TrainerUtils.MakeU4ScalarColumn(labelColumn), featureColumn, weightColumn, null, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) + : base(env, LoadNameValue, TrainerUtils.MakeU4ScalarColumn(labelColumn), featureColumn, weights, null, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) { _numClass = -1; } @@ -124,23 +124,23 @@ protected override void ConvertNaNLabels(IChannel ch, RoleMappedData data, float float minLabel = float.MaxValue; float maxLabel = float.MinValue; bool hasNaNLabel = false; - foreach (var label in labels) + foreach (var labelColumn in labels) { - if (float.IsNaN(label)) + if (float.IsNaN(labelColumn)) hasNaNLabel = true; else { - minLabel = Math.Min(minLabel, label); - maxLabel = Math.Max(maxLabel, label); + minLabel = Math.Min(minLabel, labelColumn); + maxLabel = Math.Max(maxLabel, labelColumn); } } - ch.CheckParam(minLabel >= 0, nameof(data), "min label cannot be negative"); + ch.CheckParam(minLabel >= 0, nameof(data), "min labelColumn cannot be negative"); if (maxLabel >= _maxNumClass) - throw ch.ExceptParam(nameof(data), $"max label cannot exceed {_maxNumClass}"); + throw ch.ExceptParam(nameof(data), $"max labelColumn cannot exceed {_maxNumClass}"); if (data.Schema.Label.Type.IsKey) { - ch.Check(data.Schema.Label.Type.AsKey.Contiguous, "label value should be contiguous"); + ch.Check(data.Schema.Label.Type.AsKey.Contiguous, "labelColumn value should be contiguous"); if (hasNaNLabel) _numClass = data.Schema.Label.Type.AsKey.Count + 1; else diff --git a/src/Microsoft.ML.LightGBM/LightGbmRankingTrainer.cs b/src/Microsoft.ML.LightGBM/LightGbmRankingTrainer.cs index aa75030f6c..43ded6e8c0 100644 --- a/src/Microsoft.ML.LightGBM/LightGbmRankingTrainer.cs +++ b/src/Microsoft.ML.LightGBM/LightGbmRankingTrainer.cs @@ -92,8 +92,8 @@ internal LightGbmRankingTrainer(IHostEnvironment env, LightGbmArguments args) /// The private instance of . /// The name of the label column. /// The name of the feature column. - /// The name of the column containing the group ID. - /// The name of the column containing the initial weight. + /// The name of the column containing the group ID. + /// The name of the optional column containing the initial weights. /// The number of leaves to use. /// Number of iterations. /// The minimal number of documents allowed in a leaf of the tree, out of the subsampled data. @@ -103,18 +103,18 @@ internal LightGbmRankingTrainer(IHostEnvironment env, LightGbmArguments args) /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public LightGbmRankingTrainer(IHostEnvironment env, - string labelColumn, - string featureColumn, - string groupIdColumn, - string weightColumn = null, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string groupId = DefaultColumnNames.GroupId, + string weights = null, int? numLeaves = null, int? minDataPerLeaf = null, double? learningRate = null, int numBoostRound = LightGbmArguments.Defaults.NumBoostRound, Action advancedSettings = null) - : base(env, LoadNameValue, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, groupIdColumn, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) + : base(env, LoadNameValue, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weights, groupId, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) { - Host.CheckNonEmpty(groupIdColumn, nameof(groupIdColumn)); + Host.CheckNonEmpty(groupId, nameof(groupId)); } protected override void CheckDataValid(IChannel ch, RoleMappedData data) diff --git a/src/Microsoft.ML.LightGBM/LightGbmRegressionTrainer.cs b/src/Microsoft.ML.LightGBM/LightGbmRegressionTrainer.cs index adbff18ddf..85f5c01c60 100644 --- a/src/Microsoft.ML.LightGBM/LightGbmRegressionTrainer.cs +++ b/src/Microsoft.ML.LightGBM/LightGbmRegressionTrainer.cs @@ -91,7 +91,7 @@ public sealed class LightGbmRegressorTrainer : LightGbmTrainerBaseThe private instance of . /// The name of the label column. /// The name of the feature column. - /// The name for the column containing the initial weight. + /// The name for the column containing the initial weight. /// The number of leaves to use. /// Number of iterations. /// The minimal number of documents allowed in a leaf of the tree, out of the subsampled data. @@ -100,14 +100,16 @@ public sealed class LightGbmRegressorTrainer : LightGbmTrainerBase. - public LightGbmRegressorTrainer(IHostEnvironment env, string labelColumn, string featureColumn, - string weightColumn = null, + public LightGbmRegressorTrainer(IHostEnvironment env, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, int? numLeaves = null, int? minDataPerLeaf = null, double? learningRate = null, int numBoostRound = LightGbmArguments.Defaults.NumBoostRound, Action advancedSettings = null) - : base(env, LoadNameValue, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) + : base(env, LoadNameValue, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weights, null, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) { } diff --git a/src/Microsoft.ML.LightGBM/LightGbmStatic.cs b/src/Microsoft.ML.LightGBM/LightGbmStatic.cs index 604c3cd71d..1a66544111 100644 --- a/src/Microsoft.ML.LightGBM/LightGbmStatic.cs +++ b/src/Microsoft.ML.LightGBM/LightGbmStatic.cs @@ -38,7 +38,7 @@ public static class LightGbmTrainers /// /// /// /// public static Scalar LightGbm(this RegressionContext.RegressionTrainers ctx, @@ -87,7 +87,7 @@ public static Scalar LightGbm(this RegressionContext.RegressionTrainers c /// /// /// /// public static (Scalar score, Scalar probability, Scalar predictedLabel) LightGbm(this BinaryClassificationContext.BinaryClassificationTrainers ctx, diff --git a/src/Microsoft.ML.LightGBM/LightGbmTrainerBase.cs b/src/Microsoft.ML.LightGBM/LightGbmTrainerBase.cs index c6a68a8a51..53e6ba543b 100644 --- a/src/Microsoft.ML.LightGBM/LightGbmTrainerBase.cs +++ b/src/Microsoft.ML.LightGBM/LightGbmTrainerBase.cs @@ -102,7 +102,7 @@ private protected LightGbmTrainerBase(IHostEnvironment env, string name, LightGb InitParallelTraining(); } - protected override TModel TrainModelCore(TrainContext context) + private protected override TModel TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); @@ -540,8 +540,8 @@ private void GetFeatureValueSparse(IChannel ch, FloatLabelCursor cursor, fv = catMetaData.OnehotBias[colIdx] + 1; if (newColIdx != lastIdx) { - featureIndices.Push(newColIdx); - values.Push(fv); + featureIndices.Add(newColIdx); + values.Add(fv); nhot = 1; } else diff --git a/src/Microsoft.ML.Maml/ChainCommand.cs b/src/Microsoft.ML.Maml/ChainCommand.cs index e49162b45b..c51a78952b 100644 --- a/src/Microsoft.ML.Maml/ChainCommand.cs +++ b/src/Microsoft.ML.Maml/ChainCommand.cs @@ -15,7 +15,8 @@ namespace Microsoft.ML.Runtime.Tools { using Stopwatch = System.Diagnostics.Stopwatch; - public sealed class ChainCommand : ICommand + [BestFriend] + internal sealed class ChainCommand : ICommand { public sealed class Arguments { diff --git a/src/Microsoft.ML.Maml/HelpCommand.cs b/src/Microsoft.ML.Maml/HelpCommand.cs index ee2adbb495..65487fbfc3 100644 --- a/src/Microsoft.ML.Maml/HelpCommand.cs +++ b/src/Microsoft.ML.Maml/HelpCommand.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.CodeDom.Compiler; using System.Collections.Generic; using System.Globalization; using System.IO; @@ -23,14 +24,15 @@ namespace Microsoft.ML.Runtime.Tools { - public interface IGenerator + [BestFriend] + internal interface IGenerator { void Generate(IEnumerable infos); } public delegate void SignatureModuleGenerator(string regenerate); - public sealed class HelpCommand : ICommand + internal sealed class HelpCommand : ICommand { public sealed class Arguments { @@ -100,11 +102,13 @@ public void Run() public void Run(int? columns) { +#pragma warning disable CS0618 // The help command should be entirely within the command line anyway. AssemblyLoadingUtils.LoadAndRegister(_env, _extraAssemblies); +#pragma warning restore CCS0618 using (var ch = _env.Start("Help")) using (var sw = new StringWriter(CultureInfo.InvariantCulture)) - using (var writer = IndentingTextWriter.Wrap(sw)) + using (var writer = new IndentedTextWriter(sw, " ")) { if (_listKinds) { @@ -125,7 +129,7 @@ public void Run(int? columns) } } - private void ShowHelp(IndentingTextWriter writer, int? columns = null) + private void ShowHelp(IndentedTextWriter writer, int? columns = null) { _env.AssertValue(_component); @@ -183,7 +187,7 @@ private void ShowHelp(IndentingTextWriter writer, int? columns = null) Serialize(components); } - private void ShowAllHelp(IndentingTextWriter writer, int? columns = null) + private void ShowAllHelp(IndentedTextWriter writer, int? columns = null) { string sig = _kind?.ToLowerInvariant(); @@ -217,7 +221,7 @@ private void ShowAllHelp(IndentingTextWriter writer, int? columns = null) Serialize(components); } - private void ShowUsage(IndentingTextWriter writer, string kind, string summary, string loadName, + private void ShowUsage(IndentedTextWriter writer, string kind, string summary, string loadName, IReadOnlyList loadNames, object args, int? columns) { _env.Assert(loadName == loadNames[0]); @@ -238,7 +242,7 @@ private void ShowUsage(IndentingTextWriter writer, string kind, string summary, writer.WriteLine(CmdParser.ArgumentsUsage(_env, args.GetType(), args, false, columns)); } - private void ShowComponents(IndentingTextWriter writer) + private void ShowComponents(IndentedTextWriter writer) { Type typeSig; Type typeRes; @@ -304,7 +308,7 @@ private void Serialize(List components) GenerateModule(components); } - private void ShowAliases(IndentingTextWriter writer, IReadOnlyList names) + private void ShowAliases(IndentedTextWriter writer, IReadOnlyList names) { if (names.Count <= 1) return; @@ -319,7 +323,7 @@ private void ShowAliases(IndentingTextWriter writer, IReadOnlyList names writer.WriteLine(); } - private void ListKinds(IndentingTextWriter writer) + private void ListKinds(IndentedTextWriter writer) { var sigs = _env.ComponentCatalog.GetAllSignatureTypes() .Select(ComponentCatalog.SignatureToString) @@ -333,7 +337,7 @@ private void ListKinds(IndentingTextWriter writer) } } - private void ShowFormattedSummary(IndentingTextWriter writer, string summary, int? columns) + private void ShowFormattedSummary(IndentedTextWriter writer, string summary, int? columns) { _env.AssertValue(writer); @@ -423,7 +427,7 @@ private void GenerateModule(List components) } } - public sealed class XmlGenerator : IGenerator + internal sealed class XmlGenerator : IGenerator { public sealed class Arguments { diff --git a/src/Microsoft.ML.Maml/MAML.cs b/src/Microsoft.ML.Maml/MAML.cs index ff207b38e4..a4eaa43491 100644 --- a/src/Microsoft.ML.Maml/MAML.cs +++ b/src/Microsoft.ML.Maml/MAML.cs @@ -58,7 +58,9 @@ private static int MainWithProgress(string args) string currentDirectory = Path.GetDirectoryName(typeof(Maml).Module.FullyQualifiedName); using (var env = CreateEnvironment()) +#pragma warning disable CS0618 // This is the command line project, so the usage here is OK. using (AssemblyLoadingUtils.CreateAssemblyRegistrar(env, currentDirectory)) +#pragma warning restore CS0618 using (var progressCancel = new CancellationTokenSource()) { var progressTrackerTask = Task.Run(() => TrackProgress(env, progressCancel.Token)); @@ -107,7 +109,7 @@ private static ConsoleEnvironment CreateEnvironment() /// so we always write . If set to true though, this executable will also print stack traces from the /// marked exceptions as well. /// - internal static int MainCore(ConsoleEnvironment env, string args, bool alwaysPrintStacktrace) + internal static int MainCore(IHostEnvironment env, string args, bool alwaysPrintStacktrace) { // REVIEW: How should extra dlls, tracking, etc be handled? Should the args objects for // all commands derive from a common base? diff --git a/src/Microsoft.ML.Maml/Microsoft.ML.Maml.csproj b/src/Microsoft.ML.Maml/Microsoft.ML.Maml.csproj index 219b6bf0b8..a366fb6f9c 100644 --- a/src/Microsoft.ML.Maml/Microsoft.ML.Maml.csproj +++ b/src/Microsoft.ML.Maml/Microsoft.ML.Maml.csproj @@ -7,10 +7,6 @@ netstandard2.0 - - - - diff --git a/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs index 2ddc9c4ffa..2226c6d7fc 100644 --- a/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs @@ -2,9 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Reflection; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; +using Microsoft.ML; -[assembly: InternalsVisibleTo("Microsoft.ML.TestFramework, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")] -[assembly: InternalsVisibleTo("Microsoft.ML.Benchmarks, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")] \ No newline at end of file +[assembly: InternalsVisibleTo("Microsoft.ML.TestFramework" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo("Microsoft.ML.Benchmarks" + PublicKey.TestValue)] + +[assembly: InternalsVisibleTo("Microsoft.ML.Legacy" + PublicKey.Value)] +[assembly: InternalsVisibleTo("Microsoft.ML.ResultProcessor" + PublicKey.Value)] diff --git a/src/Microsoft.ML.Maml/VersionCommand.cs b/src/Microsoft.ML.Maml/VersionCommand.cs index a59f01e58b..7e20db2260 100644 --- a/src/Microsoft.ML.Maml/VersionCommand.cs +++ b/src/Microsoft.ML.Maml/VersionCommand.cs @@ -12,7 +12,7 @@ namespace Microsoft.ML.Runtime.Tools { - public sealed class VersionCommand : ICommand + internal sealed class VersionCommand : ICommand { internal const string Summary = "Prints the TLC version."; diff --git a/src/Microsoft.ML.Onnx/AssemblyInfo.cs b/src/Microsoft.ML.Onnx/AssemblyInfo.cs index a540e9aff2..2cfc638423 100644 --- a/src/Microsoft.ML.Onnx/AssemblyInfo.cs +++ b/src/Microsoft.ML.Onnx/AssemblyInfo.cs @@ -1,3 +1,9 @@ -using System.Runtime.CompilerServices; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. -[assembly: InternalsVisibleTo("Microsoft.ML.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")] +using System.Runtime.CompilerServices; +using Microsoft.ML; + +[assembly: InternalsVisibleTo("Microsoft.ML.Core.Tests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo("Microsoft.ML.Tests" + PublicKey.TestValue)] diff --git a/src/Microsoft.ML.Onnx/SaveOnnxCommand.cs b/src/Microsoft.ML.Onnx/SaveOnnxCommand.cs index 241abc6fbb..3c3dd97dcd 100644 --- a/src/Microsoft.ML.Onnx/SaveOnnxCommand.cs +++ b/src/Microsoft.ML.Onnx/SaveOnnxCommand.cs @@ -21,7 +21,7 @@ namespace Microsoft.ML.Runtime.Model.Onnx { - public sealed class SaveOnnxCommand : DataCommand.ImplBase + internal sealed class SaveOnnxCommand : DataCommand.ImplBase { public const string Summary = "Given a data model, write out the corresponding ONNX."; public const string LoadName = "SaveOnnx"; diff --git a/src/Microsoft.ML.OnnxTransform/OnnxCatalog.cs b/src/Microsoft.ML.OnnxTransform/OnnxCatalog.cs index 054900776d..4618c57ca1 100644 --- a/src/Microsoft.ML.OnnxTransform/OnnxCatalog.cs +++ b/src/Microsoft.ML.OnnxTransform/OnnxCatalog.cs @@ -15,13 +15,13 @@ public static class OnnxCatalog /// /// The transform's catalog. /// The path of the file containing the ONNX model. - /// The input column. - /// The output column resulting from the transformation. + /// The input columns. + /// The output columns resulting from the transformation. public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog, string modelFile, - string inputColumn, - string outputColumn) - => new OnnxScoringEstimator(CatalogUtils.GetEnvironment(catalog), modelFile, inputColumn, outputColumn); + string[] inputColumns, + string[] outputColumns) + => new OnnxScoringEstimator(CatalogUtils.GetEnvironment(catalog), modelFile, inputColumns, outputColumns); /// /// Initializes a new instance of . diff --git a/src/Microsoft.ML.OnnxTransform/OnnxTransform.cs b/src/Microsoft.ML.OnnxTransform/OnnxTransform.cs index 834889b946..be35d87e52 100644 --- a/src/Microsoft.ML.OnnxTransform/OnnxTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/OnnxTransform.cs @@ -17,6 +17,7 @@ using Microsoft.ML.StaticPipe; using Microsoft.ML.StaticPipe.Runtime; using Microsoft.ML.Core.Data; +using OnnxShape = System.Collections.Generic.List; [assembly: LoadableClass(OnnxTransform.Summary, typeof(IDataTransform), typeof(OnnxTransform), typeof(OnnxTransform.Arguments), typeof(SignatureDataTransform), OnnxTransform.UserName, OnnxTransform.ShortName, "OnnxTransform", "OnnxScorer")] @@ -34,7 +35,7 @@ namespace Microsoft.ML.Transforms { - public sealed class OnnxTransform : ITransformer, ICanSaveModel + public sealed class OnnxTransform : RowToRowTransformerBase { public sealed class Arguments : TransformInputBase { @@ -42,40 +43,40 @@ public sealed class Arguments : TransformInputBase public string ModelFile; [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "Name of the input column.", SortOrder = 1)] - public string InputColumn; + public string[] InputColumns; [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "Name of the output column.", SortOrder = 2)] - public string OutputColumn; + public string[] OutputColumns; } - private readonly IHost _host; private readonly Arguments _args; internal readonly OnnxModel Model; - private const string RegistrationName = "OnnxTransform"; internal const string Summary = "Transforms the data using the Onnx model."; internal const string UserName = "ONNX Scoring Transform"; internal const string ShortName = "Onnx"; internal const string LoaderSignature = "OnnxTransform"; - public readonly string Input; - public readonly string Output; - public readonly ColumnType OutputType; + public readonly string[] Inputs; + public readonly string[] Outputs; + public readonly ColumnType[] OutputTypes; private static VersionInfo GetVersionInfo() { return new VersionInfo( modelSignature: "ONNXSCOR", - verWrittenCur: 0x00010001, // Initial - verReadableCur: 0x00010001, + // version 10001 is single input & output. + // version 10002 = multiple inputs & outputs + verWrittenCur: 0x00010002, + verReadableCur: 0x00010002, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(OnnxTransform).Assembly.FullName); + loaderAssemblyName: typeof(OnnxTransform).Assembly.FullName); } - public static IDataTransform Create(IHostEnvironment env, IDataView input, string modelFile, string inputColumn, string outputColumn) + public static IDataTransform Create(IHostEnvironment env, IDataView input, string modelFile, string[] inputColumns, string[] outputColumns) { - var args = new Arguments { ModelFile = modelFile, InputColumn = inputColumn, OutputColumn = outputColumn }; + var args = new Arguments { ModelFile = modelFile, InputColumns = inputColumns, OutputColumns = outputColumns }; return Create(env, args, input); } @@ -100,9 +101,23 @@ private static OnnxTransform Create(IHostEnvironment env, ModelLoadContext ctx) if (!ctx.TryLoadBinaryStream("OnnxModel", r => modelBytes = r.ReadByteArray())) throw env.ExceptDecode(); - var inputColumn = ctx.LoadNonEmptyString(); - var outputColumn = ctx.LoadNonEmptyString(); - var args = new Arguments() { InputColumn = inputColumn, OutputColumn = outputColumn }; + bool supportsMultiInputOutput = ctx.Header.ModelVerWritten > 0x00010001; + + var numInputs = (supportsMultiInputOutput) ? ctx.Reader.ReadInt32() : 1; + + env.CheckDecode(numInputs > 0); + var inputs = new string[numInputs]; + for (int j = 0; j < inputs.Length; j++) + inputs[j] = ctx.LoadNonEmptyString(); + + var numOutputs = (supportsMultiInputOutput) ? ctx.Reader.ReadInt32() : 1; + + env.CheckDecode(numOutputs > 0); + var outputs = new string[numOutputs]; + for (int j = 0; j < outputs.Length; j++) + outputs[j] = ctx.LoadNonEmptyString(); + + var args = new Arguments() { InputColumns = inputs, OutputColumns = outputs }; return new OnnxTransform(env, args, modelBytes); } @@ -111,193 +126,301 @@ private static OnnxTransform Create(IHostEnvironment env, ModelLoadContext ctx) private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); - private OnnxTransform(IHostEnvironment env, Arguments args, byte[] modelBytes = null) + private OnnxTransform(IHostEnvironment env, Arguments args, byte[] modelBytes = null) : + base(Contracts.CheckRef(env, nameof(env)).Register(nameof(OnnxTransform))) { - Contracts.CheckValue(env, nameof(env)); - _host = env.Register(RegistrationName); - _host.CheckValue(args, nameof(args)); - _host.CheckNonWhiteSpace(args.InputColumn, nameof(args.InputColumn)); - _host.CheckNonWhiteSpace(args.OutputColumn, nameof(args.OutputColumn)); + Host.CheckValue(args, nameof(args)); + + foreach (var col in args.InputColumns) + Host.CheckNonWhiteSpace(col, nameof(args.InputColumns)); + foreach (var col in args.OutputColumns) + Host.CheckNonWhiteSpace(col, nameof(args.OutputColumns)); if (modelBytes == null) { - _host.CheckNonWhiteSpace(args.ModelFile, nameof(args.ModelFile)); - _host.CheckUserArg(File.Exists(args.ModelFile), nameof(args.ModelFile)); + Host.CheckNonWhiteSpace(args.ModelFile, nameof(args.ModelFile)); + Host.CheckUserArg(File.Exists(args.ModelFile), nameof(args.ModelFile)); Model = new OnnxModel(args.ModelFile); } else Model = OnnxModel.CreateFromBytes(modelBytes); var modelInfo = Model.ModelInfo; - if (modelInfo.InputsInfo.Length != 1) - throw env.Except($"OnnxTransform supports Onnx models with one input. The provided model has ${modelInfo.InputsInfo.Length} input(s)."); - if (modelInfo.OutputsInfo.Length != 1) - throw env.Except($"OnnxTransform supports Onnx models with one output. The provided model has ${modelInfo.OutputsInfo.Length} output(s)."); - - Input = args.InputColumn; - Output = args.OutputColumn; - - var outputNodeInfo = Model.ModelInfo.OutputsInfo[0]; - var type = OnnxUtils.OnnxToMlNetType(outputNodeInfo.Type); - var shape = outputNodeInfo.Shape; - var dims = shape.Count > 0 ? shape.Skip(shape[0] < 0 ? 1 : 0).Select( x => (int) x ).ToArray() : new[] { 0 }; - OutputType = new VectorType(type, dims); + Inputs = args.InputColumns; + Outputs = args.OutputColumns; + OutputTypes = new ColumnType[args.OutputColumns.Length]; + var numModelOutputs = Model.ModelInfo.OutputsInfo.Length; + for (int i=0; i < args.OutputColumns.Length; i++) + { + var idx = Model.OutputNames.IndexOf(args.OutputColumns[i]); + if (idx < 0) + throw Host.Except($"Column {args.OutputColumns[i]} doesn't match output node names of model"); + + var outputNodeInfo = Model.ModelInfo.OutputsInfo[idx]; + var shape = outputNodeInfo.Shape; + var dims = AdjustDimensions(shape); + OutputTypes[i] = new VectorType(OnnxUtils.OnnxToMlNetType(outputNodeInfo.Type), dims); + } _args = args; } public OnnxTransform(IHostEnvironment env, string modelFile, string inputColumn, string outputColumn) - : this(env, new Arguments() { ModelFile = modelFile, InputColumn = inputColumn, OutputColumn = outputColumn }) + : this(env, new Arguments() { ModelFile = modelFile, InputColumns = new[] { inputColumn }, OutputColumns = new[] { outputColumn } }) { } - public Schema GetOutputSchema(Schema inputSchema) + public OnnxTransform(IHostEnvironment env, string modelFile, string[] inputColumns, string[] outputColumns) + : this(env, new Arguments() { ModelFile = modelFile, InputColumns = inputColumns, OutputColumns = outputColumns }) { - _host.CheckValue(inputSchema, nameof(inputSchema)); - if (!inputSchema.TryGetColumnIndex(Input, out int srcCol)) - throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", Input); - - var transform = Transform(new EmptyDataView(_host, inputSchema)); - return transform.Schema; } - private IRowMapper MakeRowMapper(Schema schema) => new Mapper(_host, this, schema); - - private RowToRowMapperTransform MakeDataTransform(IDataView input) + public override void Save(ModelSaveContext ctx) { - _host.CheckValue(input, nameof(input)); - return new RowToRowMapperTransform(_host, input, MakeRowMapper(input.Schema), MakeRowMapper); - } - - public IDataView Transform(IDataView input) => MakeDataTransform(input); + Host.AssertValue(ctx); - public void Save(ModelSaveContext ctx) - { - _host.AssertValue(ctx); ctx.CheckAtModel(); ctx.SetVersionInfo(GetVersionInfo()); ctx.SaveBinaryStream("OnnxModel", w => { w.WriteByteArray(Model.ToByteArray()); }); - ctx.SaveNonEmptyString(_args.InputColumn); - ctx.SaveNonEmptyString(_args.OutputColumn); - } - public bool IsRowToRowMapper => true; + Host.CheckNonEmpty(Inputs, nameof(Inputs)); + ctx.Writer.Write(Inputs.Length); + foreach (var colName in Inputs) + ctx.SaveNonEmptyString(colName); - public IRowToRowMapper GetRowToRowMapper(Schema inputSchema) + Host.CheckNonEmpty(Outputs, nameof(Outputs)); + ctx.Writer.Write(Outputs.Length); + foreach (var colName in Outputs) + ctx.SaveNonEmptyString(colName); + } + protected override IRowMapper MakeRowMapper(Schema inputSchema) => new Mapper(this, inputSchema); + + private static int[] AdjustDimensions(OnnxShape shape) { - _host.CheckValue(inputSchema, nameof(inputSchema)); - return MakeDataTransform(new EmptyDataView(_host, inputSchema)); + // if the model output is of type Map or Sequence, the shape property + // will not be filled (so count=0). Don't throw an exception here + // it will be runtime exception, util Maps and Sequences become supported. + if (shape.Count > 0) + { + // some models may have -1 in first position. + // skip this dimension when setting output column dimensions. + if (shape[0] < 0) + { + return shape.Skip(1).Select(x => (int)x).ToArray(); + } + else + { + return shape.Select(x => (int)x).ToArray(); + } + } + return new[] { 0 }; } - private sealed class Mapper : IRowMapper + private sealed class Mapper : MapperBase { - private readonly IHost _host; private readonly OnnxTransform _parent; + private readonly int[] _inputColIndices; + private readonly bool[] _isInputVector; + private readonly OnnxShape[] _inputTensorShapes; + private readonly DataType[] _inputOnnxTypes; - private readonly Type _outputItemRawType; - private readonly ColumnType _outputColType; - private readonly string _outputColName; - - private readonly IdvToTensorAdapter _idvToTensorAdapter; - - public Mapper(IHostEnvironment env, OnnxTransform parent, Schema inputSchema) + public Mapper(OnnxTransform parent, Schema inputSchema) : + base(Contracts.CheckRef(parent, nameof(parent)).Host.Register(nameof(Mapper)), inputSchema) { - Contracts.CheckValue(env, nameof(env)); - _host = env.Register(nameof(Mapper)); - _host.CheckValue(inputSchema, nameof(inputSchema)); - _host.CheckValue(parent, nameof(parent)); _parent = parent; + _inputColIndices = new int[_parent.Inputs.Length]; + _isInputVector = new bool[_parent.Inputs.Length]; + _inputTensorShapes = new OnnxShape[_parent.Inputs.Length]; + _inputOnnxTypes = new DataType[_parent.Inputs.Length]; + var model = _parent.Model; - _idvToTensorAdapter = new IdvToTensorAdapter(inputSchema, parent._args.InputColumn, - model.ModelInfo.InputsInfo[0]); - - // TODO: Remove assumption below - // Assume first output dimension is 1 - var outputNodeInfo = model.ModelInfo.OutputsInfo[0]; - var inputNodeInfo = model.ModelInfo.InputsInfo[0]; - int[] dims = outputNodeInfo.Shape.Skip(1).Select(x => (int)x).ToArray(); - var outputItemType = OnnxUtils.OnnxToMlNetType(outputNodeInfo.Type); - var inputShape = inputNodeInfo.Shape; - _outputColType = new VectorType(outputItemType, dims); - _outputColName = _parent.Output; - _outputItemRawType = outputItemType.RawType; - - int inColIndex; - if (!inputSchema.TryGetColumnIndex(_parent.Input, out inColIndex)) - throw _host.Except($"Column {_parent.Input} doesn't exist"); - - var type = inputSchema.GetColumnType(inColIndex); - if (type.IsVector && type.VectorSize == 0) - throw _host.Except($"Variable length input columns not supported"); - - if (type.ItemType != outputItemType) - throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.Input, outputItemType.ToString(), type.ToString()); - - // If the column is one dimension we make sure that the total size of the TF shape matches. - // Compute the total size of the known dimensions of the shape. - int valCount = inputShape.Select(x => (int) x).Where(x => x > 0).Aggregate((x, y) => x * y); - // The column length should be divisible by this, so that the other dimensions can be integral. - if (type.ValueCount % valCount != 0) - throw Contracts.Except($"Input shape mismatch: Input '{_outputColName}' has shape {String.Join(",", inputShape)}, but input data is of length {type.ValueCount}."); - - _host.Assert(_outputItemRawType == _outputColType.ItemType.RawType); + for (int i = 0; i < _parent.Inputs.Length; i++) + { + var idx = model.InputNames.IndexOf(_parent.Inputs[i]); + if (idx < 0) + throw Host.Except($"Column {_parent.Inputs[i]} doesn't match input node names of model"); + + var inputNodeInfo = model.ModelInfo.InputsInfo[idx]; + + var shape = inputNodeInfo.Shape; + var inputType = OnnxUtils.OnnxToMlNetType(inputNodeInfo.Type); + + var inputShape = inputNodeInfo.Shape; + _inputTensorShapes[i] = inputShape; + _inputOnnxTypes[i] = inputNodeInfo.Type; + + if (!inputSchema.TryGetColumnIndex(_parent.Inputs[i], out _inputColIndices[i])) + throw Host.Except($"Column {_parent.Inputs[i]} doesn't exist"); + + var type = inputSchema.GetColumnType(_inputColIndices[i]); + _isInputVector[i] = type.IsVector; + + if (type.IsVector && type.VectorSize == 0) + throw Host.Except($"Variable length input columns not supported"); + + if (type.ItemType != inputType) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.Inputs[i], inputType.ToString(), type.ToString()); + + // If the column is one dimension we make sure that the total size of the Onnx shape matches. + // Compute the total size of the known dimensions of the shape. + int valCount = inputShape.Select(x => (int)x).Where(x => x > 0).Aggregate((x, y) => x * y); + // The column length should be divisible by this, so that the other dimensions can be integral. + if (type.ValueCount % valCount != 0) + throw Contracts.Except($"Input shape mismatch: Input '{_parent.Inputs[i]}' has shape {String.Join(",", inputShape)}, but input data is of length {type.ValueCount}."); + + //Host.Assert(_outputItemRawType == _outputColType.ItemType.RawType); + } } - public Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { - var info = new Schema.Column[1]; - info[0] = new Schema.Column(_outputColName, _outputColType, null); + var info = new Schema.Column[_parent.Outputs.Length]; + for (int i = 0; i < _parent.Outputs.Length; i++) + info[i] = new Schema.Column(_parent.Outputs[i], _parent.OutputTypes[i], null); return info; } - public Func GetDependencies(Func activeOutput) + public override Func GetDependencies(Func activeOutput) { - return col => activeOutput(0) && (_idvToTensorAdapter.IdvColumnIndex == col); + return col => Enumerable.Range(0, _parent.Outputs.Length).Any(i => activeOutput(i)) && _inputColIndices.Any(i => i == col); } - public void Save(ModelSaveContext ctx) + public override void Save(ModelSaveContext ctx) => _parent.Save(ctx); + + private interface ITensorValueGetter { - _parent.Save(ctx); + Tensor GetTensor(); + } + private class OutputCache + { + public long Position; + public Dictionary Outputs; + public OutputCache() + { + Position = -1; + Outputs = new Dictionary(); + } + } + + private void UpdateCacheIfNeeded(long position, ITensorValueGetter[] srcTensorGetters, string[] activeOutputColNames, OutputCache outputCache) + { + if (outputCache.Position != position) + { + var inputTensors = new List(); + + for (int i = 0; i < _inputColIndices.Length; i++) + inputTensors.Add(srcTensorGetters[i].GetTensor()); + + var outputTensors = _parent.Model.Run(inputTensors); + Contracts.Assert(outputTensors.Count > 0); + + for (int j = 0; j < outputTensors.Count; j++) + outputCache.Outputs[activeOutputColNames[j]] = outputTensors[j]; + + outputCache.Position = position; + } } - public Delegate[] CreateGetters(IRow input, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { disposer = null; - var getters = new Delegate[1]; - if (activeOutput(0)) - getters[0] = Utils.MarshalInvoke(MakeGetter, _outputItemRawType, input); - return getters; + Host.AssertValue(input); + //Host.Assert(typeof(T) == _outputItemRawType); + + var outputCache = new OutputCache(); + var activeOutputColNames = _parent.Outputs.Where((x, i) => activeOutput(i)).ToArray(); + var type = OnnxUtils.OnnxToMlNetType(_parent.Model.ModelInfo.OutputsInfo[iinfo].Type).RawType; + Host.Assert(type == _parent.OutputTypes[iinfo].ItemType.RawType); + var srcTensorGetters = GetTensorValueGetters(input, _inputColIndices, _isInputVector, _inputOnnxTypes, _inputTensorShapes); + return Utils.MarshalInvoke(MakeGetter, type, input, iinfo, srcTensorGetters, activeOutputColNames, outputCache); } - private Delegate MakeGetter(IRow input) + private Delegate MakeGetter(IRow input, int iinfo, ITensorValueGetter[] srcTensorGetters, string[] activeOutputColNames, OutputCache outputCache) { - _host.AssertValue(input); - _host.Assert(typeof(T) == _outputItemRawType); + Host.AssertValue(input); + ValueGetter> valuegetter = (ref VBuffer dst) => + { + UpdateCacheIfNeeded(input.Position, srcTensorGetters, activeOutputColNames, outputCache); + var tensor = outputCache.Outputs[_parent.Outputs[iinfo]]; + var editor = VBufferEditor.Create(ref dst, tensor.GetSize()); + OnnxUtils.CopyTo(tensor, editor.Values); + dst = editor.Commit(); + }; + return valuegetter; + } - ValueGetter> valueGetter = (ref VBuffer dst) => + private static ITensorValueGetter[] GetTensorValueGetters(IRow input, + int[] inputColIndices, + bool[] isInputVector, + DataType[] onnxInputTypes, + OnnxShape[] onnxInputShapes) + { + var srcTensorGetters = new ITensorValueGetter[inputColIndices.Length]; + for (int i = 0; i < inputColIndices.Length; i++) { - _idvToTensorAdapter.InitializeValueGetters(input); - var inputTensors = new List { _idvToTensorAdapter.GetTensor() }; - var outputTensors = _parent.Model.Run(inputTensors); - Contracts.Assert(outputTensors.Count() > 0); + int colIndex = inputColIndices[i]; + srcTensorGetters[i] = CreateTensorValueGetter(input, onnxInputTypes[i], isInputVector[i], colIndex, onnxInputShapes[i]); + } + return srcTensorGetters; + } + + private static ITensorValueGetter CreateTensorValueGetter(IRow input, DataType onnxType, bool isVector, int colIndex, OnnxShape onnxShape) + { + var type = OnnxUtils.OnnxToMlNetType(onnxType).RawType; + Contracts.AssertValue(type); + return Utils.MarshalInvoke(CreateTensorValueGetter, type, input, isVector, colIndex, onnxShape); + } - var values = dst.Values; - if (Utils.Size(values) < _outputColType.VectorSize) - values = new T[_outputColType.VectorSize]; + private static ITensorValueGetter CreateTensorValueGetter(IRow input, bool isVector, int colIndex, OnnxShape onnxShape) + { + if (isVector) + return new TensorValueGetterVec(input, colIndex, onnxShape); + return new TensorValueGetter(input, colIndex); + } - OnnxUtils.CopyTo(outputTensors[0], values); - dst = new VBuffer(values.Length, values, dst.Indices); - }; + private class TensorValueGetter : ITensorValueGetter + { + private readonly ValueGetter _srcgetter; + + public TensorValueGetter(IRow input, int colIndex) + { + _srcgetter = input.GetGetter(colIndex); + } + public Tensor GetTensor() + { + var scalar = default(T); + _srcgetter(ref scalar); + return OnnxUtils.CreateScalarTensor(scalar); + } + } - return valueGetter; + private class TensorValueGetterVec : ITensorValueGetter + { + private readonly ValueGetter> _srcgetter; + private readonly OnnxShape _tensorShape; + private VBuffer _vBuffer; + private VBuffer _vBufferDense; + public TensorValueGetterVec(IRow input, int colIndex, OnnxShape tensorShape) + { + _srcgetter = input.GetGetter>(colIndex); + _tensorShape = tensorShape; + _vBuffer = default; + _vBufferDense = default; + } + public Tensor GetTensor() + { + _srcgetter(ref _vBuffer); + _vBuffer.CopyToDense(ref _vBufferDense); + return OnnxUtils.CreateTensor(_vBufferDense.GetValues(), _tensorShape); + } } } } public sealed class OnnxScoringEstimator : TrivialEstimator { - public OnnxScoringEstimator(IHostEnvironment env, string modelFile, string input, string output) - : this(env, new OnnxTransform(env, modelFile, input, output)) + public OnnxScoringEstimator(IHostEnvironment env, string modelFile, string[] inputs, string[] outputs) + : this(env, new OnnxTransform(env, modelFile, inputs, outputs)) { } @@ -312,20 +435,31 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) var result = inputSchema.Columns.ToDictionary(x => x.Name); var resultDic = inputSchema.Columns.ToDictionary(x => x.Name); - var input = Transformer.Input; - if (!inputSchema.TryFindColumn(input, out var col)) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input); - if (!(col.Kind == SchemaShape.Column.VectorKind.VariableVector || col.Kind == SchemaShape.Column.VectorKind.Vector)) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input, nameof(VectorType), col.GetTypeString()); - var inputNodeInfo = Transformer.Model.ModelInfo.InputsInfo[0]; - var expectedType = OnnxUtils.OnnxToMlNetType(inputNodeInfo.Type); - if (col.ItemType != expectedType) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input, expectedType.ToString(), col.ItemType.ToString()); - - resultDic[Transformer.Output] = new SchemaShape.Column(Transformer.Output, - Transformer.OutputType.IsKnownSizeVector ? SchemaShape.Column.VectorKind.Vector - : SchemaShape.Column.VectorKind.VariableVector, NumberType.R4, false); + for (var i = 0; i < Transformer.Inputs.Length; i++) + { + var input = Transformer.Inputs[i]; + if (!inputSchema.TryFindColumn(input, out var col)) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input); + if (!(col.Kind == SchemaShape.Column.VectorKind.VariableVector || col.Kind == SchemaShape.Column.VectorKind.Vector)) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input, nameof(VectorType), col.GetTypeString()); + + var inputsInfo = Transformer.Model.ModelInfo.InputsInfo; + var idx = Transformer.Model.InputNames.IndexOf(input); + if (idx < 0) + throw Host.Except($"Column {input} doesn't match input node names of model."); + + var inputNodeInfo = inputsInfo[idx]; + var expectedType = OnnxUtils.OnnxToMlNetType(inputNodeInfo.Type); + if (col.ItemType != expectedType) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input, expectedType.ToString(), col.ItemType.ToString()); + } + for (var i = 0; i < Transformer.Outputs.Length; i++) + { + resultDic[Transformer.Outputs[i]] = new SchemaShape.Column(Transformer.Outputs[i], + Transformer.OutputTypes[i].IsKnownSizeVector ? SchemaShape.Column.VectorKind.Vector + : SchemaShape.Column.VectorKind.VariableVector, NumberType.R4, false); + } return new SchemaShape(resultDic.Values); } } @@ -363,7 +497,7 @@ public override IEstimator Reconcile(IHostEnvironment env, Contracts.Assert(toOutput.Length == 1); var outCol = (OutColumn)toOutput[0]; - return new OnnxScoringEstimator(env, _modelFile, inputNames[outCol.Input], outputNames[outCol]); + return new OnnxScoringEstimator(env, _modelFile, new[] { inputNames[outCol.Input] }, new[] { outputNames[outCol] }); } } @@ -379,3 +513,4 @@ public static Vector ApplyOnnxModel(this Vector input, string mode } } } + diff --git a/src/Microsoft.ML.OnnxTransform/OnnxUtils.cs b/src/Microsoft.ML.OnnxTransform/OnnxUtils.cs index 05abdfb40a..687133296f 100644 --- a/src/Microsoft.ML.OnnxTransform/OnnxUtils.cs +++ b/src/Microsoft.ML.OnnxTransform/OnnxUtils.cs @@ -16,106 +16,6 @@ namespace Microsoft.ML.Transforms { - /// - /// IdvToTensorAdapter adapts an Idv (row-iterator interface) to a tensor-iterator interface. - /// For an Idv, you'd need to create a cursor and iterate over it to get each rows of the Idv. - /// After adaptation, you'd call GetTensor() on the IdvToTensorAdapter object to get the Tensor equivalent of - /// each row. - /// - internal sealed class IdvToTensorAdapter - { - // Idv information - private readonly string _idvColumnName; - internal readonly int IdvColumnIndex; - private readonly bool _idvIsVectorColumn; - public readonly ColumnType IdvColumnType; - - // Onnx tensor information - private readonly OnnxShape _onnxTensorShape; - - private ITensorValueGetter _tensorValueGetter; - - public IdvToTensorAdapter(Schema idvSchema, string idvColumnName, - OnnxModel.OnnxNodeInfo onnxInputNodeInfo) - { - _idvColumnName = idvColumnName; - if (!idvSchema.TryGetColumnIndex(_idvColumnName, out IdvColumnIndex)) - throw Contracts.Except($"Column '{_idvColumnName}' does not exist"); - IdvColumnType = idvSchema.GetColumnType(IdvColumnIndex); - _idvIsVectorColumn = IdvColumnType.IsVector; - _onnxTensorShape = onnxInputNodeInfo.Shape; - - // TODO: Check that the idv and tensor sizes match - // TODO: Check type matches - - // TODO: Add Yaels shape logic here - if (_onnxTensorShape[0] == -1) - _onnxTensorShape[0] = 1; - } - - public void InitializeValueGetters(IRow idvRow) - { - var type = IdvColumnType.ItemType.RawType; - _tensorValueGetter = Utils.MarshalInvoke( - CreateTensorValueGetter, type, idvRow, _idvIsVectorColumn, IdvColumnIndex, _onnxTensorShape); - } - - public Tensor GetTensor() - { - return _tensorValueGetter.GetTensor(); - } - - private ITensorValueGetter CreateTensorValueGetter(IRow input, bool isVector, int colIndex, OnnxShape tensorShape) - { - if (isVector) - return new TensorValueGetterVec(input, colIndex, tensorShape); - else - return new TensorValueGetter(input, colIndex); - } - - private interface ITensorValueGetter - { - Tensor GetTensor(); - } - - private class TensorValueGetter : ITensorValueGetter - { - private readonly ValueGetter _srcgetter; - - public TensorValueGetter(IRow input, int colIndex) - { - _srcgetter = input.GetGetter(colIndex); - } - public Tensor GetTensor() - { - var scalar = default(T); - _srcgetter(ref scalar); - return OnnxUtils.CreateScalarTensor(scalar); - } - } - - private class TensorValueGetterVec : ITensorValueGetter - { - private readonly ValueGetter> _srcgetter; - private readonly OnnxShape _tensorShape; - private VBuffer _vBuffer; - private VBuffer _vBufferDense; - public TensorValueGetterVec(IRow input, int colIndex, OnnxShape tensorShape) - { - _srcgetter = input.GetGetter>(colIndex); - _tensorShape = tensorShape; - _vBuffer = default; - _vBufferDense = default; - } - public Tensor GetTensor() - { - _srcgetter(ref _vBuffer); - _vBuffer.CopyToDense(ref _vBufferDense); - return OnnxUtils.CreateTensor(_vBufferDense.Values, _tensorShape); - } - } - } - /// /// OnnxModel is a facad for ModelManager. ModelManager is provided by Sonoma API, /// and it has a lot of functionality (multiple models, multiple versions) that are not @@ -164,8 +64,8 @@ public OnnxNodeInfo(string name, OnnxShape shape, DataType type) private readonly ModelManager _modelManager; private readonly string _modelFile; private readonly string _modelName; - private readonly List _inputNames; - private readonly List _outputNames; + public readonly List InputNames; + public readonly List OutputNames; public OnnxModel(string modelFile) { @@ -178,8 +78,8 @@ public OnnxModel(string modelFile) _modelManager.InitOnnxModel(_modelName, _ignoredVersion); ModelInfo = new OnnxModelInfo(GetInputsInfo(), GetOutputsInfo()); - _inputNames = ModelInfo.InputsInfo.Select(i => i.Name).ToList(); - _outputNames = ModelInfo.OutputsInfo.Select(i => i.Name).ToList(); + InputNames = ModelInfo.InputsInfo.Select(i => i.Name).ToList(); + OutputNames = ModelInfo.OutputsInfo.Select(i => i.Name).ToList(); } public static OnnxModel CreateFromBytes(byte[] modelBytes) @@ -200,7 +100,7 @@ public static OnnxModel CreateFromBytes(byte[] modelBytes) public List Run(List inputTensors) { var outputTensors = _modelManager.RunModel( - _modelName, _ignoredVersion, _inputNames, inputTensors, _outputNames); + _modelName, _ignoredVersion, InputNames, inputTensors, OutputNames); return outputTensors; } @@ -246,6 +146,9 @@ internal sealed class OnnxUtils /// Sonoma API only provides Tensor() constructors with overloaded /// versions based on data type. /// + + private static Dictionary _typeMap; + public static Tensor CreateScalarTensor(T data) { if (typeof(T) == typeof(System.Boolean)) @@ -305,27 +208,27 @@ public static Tensor CreateScalarTensor(T data) /// generic version. CreateTensor<T> is generic wrapper on top of /// overloaded Tensor(T[] data, OnnxShape shape) constructors. /// - public static Tensor CreateTensor(T[] data, OnnxShape shape) + public static Tensor CreateTensor(ReadOnlySpan data, OnnxShape shape) { if (typeof(T) == typeof(System.Boolean)) { - return new Tensor(((System.Boolean[])(object)data).ToList(), shape); + return new Tensor((System.Boolean[])(object)data.ToArray(), shape.ToArray()); } else if (typeof(T) == typeof(System.Double)) { - return new Tensor(((System.Double[])(object)data).ToList(), shape); + return new Tensor((System.Double[])(object)data.ToArray(), shape.ToArray()); } else if (typeof(T) == typeof(System.Single)) { - return new Tensor(((System.Single[])(object)data).ToList(), shape); + return new Tensor((System.Single[])(object)data.ToArray(), shape.ToArray()); } else if (typeof(T) == typeof(System.Int32)) { - return new Tensor(((System.Int32[])(object)data).ToList(), shape); + return new Tensor((System.Int32[])(object)data.ToArray(), shape.ToArray()); } else if (typeof(T) == typeof(System.Int64)) { - return new Tensor(((System.Int64[])(object)data).ToList(), shape); + return new Tensor((System.Int64[])(object)data.ToArray(), shape.ToArray()); } throw new NotImplementedException($"Not implemented type {typeof(T)}"); } @@ -338,19 +241,24 @@ public static Tensor CreateTensor(T[] data, OnnxShape shape) /// Also Tensor.CopyTo(List<T> dst) requires a list input, whereas ML.NET /// provides array buffers to copy values to. This mismatch causes an extra copy. /// - public static void CopyTo(Tensor tensor, T[] dst) + public static unsafe void CopyTo(Tensor tensor, Span dst) { - if (typeof(T) == typeof(System.Single)) + var typeMap = SystemTypeToOnnxType(); + if (typeMap.ContainsKey(typeof(T))) { - var typedDst = (System.Single[])(object)dst; - tensor.CopyTo(typedDst); + if (tensor.GetDataType() != typeMap[typeof(T)]) + { + throw new InvalidOperationException( string.Format("Cannot copy source tensor of type {0} to managed type {1}.", tensor.GetDataType(), typeof(T))); + } + Span tensorSpan = new Span(tensor.UnsafeGetData().ToPointer(), tensor.GetSize()); + tensorSpan.CopyTo(dst); // TODO: the CopyTo() function is susceptible to GC reclaiming tensor // during the method call. Use KeepAlive for now, and remove // after permanent fix in CopyTo(). - GC.KeepAlive(tensor); } else throw new NotImplementedException($"Not implemented type {typeof(T)}"); + GC.KeepAlive(tensor); } public static PrimitiveType OnnxToMlNetType(DataType type) @@ -405,5 +313,23 @@ public static PrimitiveType OnnxToMlNetType(DataType type) return PrimitiveType.FromKind(kind); } + + internal static Dictionary SystemTypeToOnnxType() + { + if (_typeMap == null) + { + _typeMap = new Dictionary + { + { typeof(Boolean) , DataType.Type_Bool }, + { typeof(Double) , DataType.Type_Double }, + { typeof(Single) , DataType.Type_Float }, + { typeof(Int16) , DataType.Type_Int16 }, + { typeof(Int32) , DataType.Type_Int32 }, + { typeof(Int64) , DataType.Type_Int64 }, + { typeof(UInt16) , DataType.Type_Uint16 } + }; + } + return _typeMap; + } } } diff --git a/src/Microsoft.ML.PCA/PcaTrainer.cs b/src/Microsoft.ML.PCA/PcaTrainer.cs index cde9e08aeb..b87d816c01 100644 --- a/src/Microsoft.ML.PCA/PcaTrainer.cs +++ b/src/Microsoft.ML.PCA/PcaTrainer.cs @@ -84,15 +84,20 @@ public class Arguments : UnsupervisedLearnerInputBaseWithWeight /// Initializes a new instance of . /// /// The local instance of the . - /// The name of the feature column. - /// The name of the weight column. + /// The name of the feature column. + /// The name of the weight column. /// The number of components in the PCA. /// Oversampling parameter for randomized PCA training. /// If enabled, data is centered to be zero mean. /// The seed for random number generation. - public RandomizedPcaTrainer(IHostEnvironment env, string featureColumn, string weightColumn = null, - int rank = 20, int oversampling = 20, bool center = true, int? seed = null) - : this(env, null, featureColumn, weightColumn, rank, oversampling, center, seed) + public RandomizedPcaTrainer(IHostEnvironment env, + string features, + string weights = null, + int rank = 20, + int oversampling = 20, + bool center = true, + int? seed = null) + : this(env, null, features, weights, rank, oversampling, center, seed) { } @@ -131,7 +136,7 @@ private RandomizedPcaTrainer(IHostEnvironment env, Arguments args, string featur } //Note: the notations used here are the same as in https://web.stanford.edu/group/mmds/slides2010/Martinsson.pdf (pg. 9) - protected override PcaPredictor TrainModelCore(TrainContext context) + private protected override PcaPredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); @@ -185,11 +190,11 @@ private PcaPredictor TrainCore(IChannel ch, RoleMappedData data, int dimension) for (var i = 0; i < oversampledRank; ++i) { var v = y[i]; - VectorUtils.ScaleBy(ref v, 1 / VectorUtils.Norm(y[i])); + VectorUtils.ScaleBy(v, 1 / VectorUtils.Norm(y[i])); // Make the next vectors in the queue orthogonal to the orthonormalized vectors. for (var j = i + 1; j < oversampledRank; ++j) //subtract the projection of y[j] on v. - VectorUtils.AddMult(in v, -VectorUtils.DotProduct(in v, in y[j]), ref y[j]); + VectorUtils.AddMult(v, y[j], -VectorUtils.DotProduct(v, y[j])); } var q = y; // q in QR decomposition. @@ -201,7 +206,7 @@ private PcaPredictor TrainCore(IChannel ch, RoleMappedData data, int dimension) for (var i = 0; i < oversampledRank; ++i) { for (var j = i; j < oversampledRank; ++j) - b2[i * oversampledRank + j] = b2[j * oversampledRank + i] = VectorUtils.DotProduct(in b[i], in b[j]); + b2[i * oversampledRank + j] = b2[j * oversampledRank + i] = VectorUtils.DotProduct(b[i], b[j]); } float[] smallEigenvalues;// eigenvectors and eigenvalues of the small matrix B2. @@ -212,15 +217,15 @@ private PcaPredictor TrainCore(IChannel ch, RoleMappedData data, int dimension) return new PcaPredictor(Host, _rank, b, in mean); } - private static VBuffer[] Zeros(int k, int d) + private static float[][] Zeros(int k, int d) { - var rv = new VBuffer[k]; + float[][] rv = new float[k][]; for (var i = 0; i < k; ++i) - rv[i] = VBufferUtils.CreateDense(d); + rv[i] = new float[d]; return rv; } - private static VBuffer[] GaussianMatrix(int k, int d, int seed) + private static float[][] GaussianMatrix(int k, int d, int seed) { var rv = Zeros(k, d); var rng = new SysRandom(seed); @@ -230,7 +235,7 @@ private static VBuffer[] GaussianMatrix(int k, int d, int seed) for (var i = 0; i < k; ++i) { for (var j = 0; j < d; ++j) - rv[i].Values[j] = (float)Stats.SampleFromGaussian(rng); // not fast for large matrix generation + rv[i][j] = (float)Stats.SampleFromGaussian(rng); // not fast for large matrix generation } return rv; } @@ -238,7 +243,7 @@ private static VBuffer[] GaussianMatrix(int k, int d, int seed) //Project the covariance matrix A on to Omega: Y <- A * Omega //A = X' * X / n, where X = data - mean //Note that the covariance matrix is not computed explicitly - private static void Project(IHost host, FeatureFloatVectorCursor.Factory cursorFactory, ref VBuffer mean, VBuffer[] omega, VBuffer[] y, out long numBad) + private static void Project(IHost host, FeatureFloatVectorCursor.Factory cursorFactory, ref VBuffer mean, float[][] omega, float[][] y, out long numBad) { Contracts.AssertValue(host, "host"); host.AssertNonEmpty(omega); @@ -246,7 +251,7 @@ private static void Project(IHost host, FeatureFloatVectorCursor.Factory cursorF int numCols = omega.Length; for (int i = 0; i < y.Length; ++i) - VBufferUtils.Clear(ref y[i]); + Array.Clear(y[i], 0, y[i].Length); bool center = mean.IsDense; float n = 0; @@ -263,8 +268,8 @@ private static void Project(IHost host, FeatureFloatVectorCursor.Factory cursorF { VectorUtils.AddMult( in cursor.Features, - cursor.Weight * VectorUtils.DotProduct(in omega[i], in cursor.Features), - ref y[i]); + y[i], + cursor.Weight * VectorUtils.DotProduct(omega[i], in cursor.Features)); } n += cursor.Weight; count++; @@ -277,13 +282,13 @@ private static void Project(IHost host, FeatureFloatVectorCursor.Factory cursorF float invn = 1 / n; for (var i = 0; i < numCols; ++i) - VectorUtils.ScaleBy(ref y[i], invn); + VectorUtils.ScaleBy(y[i], invn); if (center) { VectorUtils.ScaleBy(ref mean, invn); for (int i = 0; i < numCols; i++) - VectorUtils.AddMult(in mean, -VectorUtils.DotProduct(in omega[i], in mean), ref y[i]); + VectorUtils.AddMult(in mean, y[i], -VectorUtils.DotProduct(omega[i], in mean)); } } @@ -291,9 +296,8 @@ private static void Project(IHost host, FeatureFloatVectorCursor.Factory cursorF /// Modifies in place so it becomes * eigenvectors / eigenvalues. /// // REVIEW: improve - private static void PostProcess(VBuffer[] y, float[] sigma, float[] z, int d, int k) + private static void PostProcess(float[][] y, float[] sigma, float[] z, int d, int k) { - Contracts.Assert(y.All(v => v.IsDense)); var pinv = new float[k]; var tmp = new float[k]; @@ -306,10 +310,10 @@ private static void PostProcess(VBuffer[] y, float[] sigma, float[] z, in { tmp[j] = 0; for (int l = 0; l < k; l++) - tmp[j] += y[l].Values[i] * z[j * k + l]; + tmp[j] += y[l][i] * z[j * k + l]; } for (int j = 0; j < k; j++) - y[j].Values[i] = pinv[j] * tmp[j]; + y[j][i] = pinv[j] * tmp[j]; } } @@ -393,7 +397,7 @@ public override PredictionKind PredictionKind get { return PredictionKind.AnomalyDetection; } } - internal PcaPredictor(IHostEnvironment env, int rank, VBuffer[] eigenVectors, in VBuffer mean) + internal PcaPredictor(IHostEnvironment env, int rank, float[][] eigenVectors, in VBuffer mean) : base(env, RegistrationName) { _dimension = eigenVectors[0].Length; @@ -403,8 +407,8 @@ internal PcaPredictor(IHostEnvironment env, int rank, VBuffer[] eigenVect for (var i = 0; i < rank; ++i) // Only want first k { - _eigenVectors[i] = eigenVectors[i]; - _meanProjected[i] = VectorUtils.DotProduct(in eigenVectors[i], in mean); + _eigenVectors[i] = new VBuffer(eigenVectors[i].Length, eigenVectors[i]); + _meanProjected[i] = VectorUtils.DotProduct(in _eigenVectors[i], in mean); } _mean = mean; diff --git a/src/Microsoft.ML.PCA/PcaTransform.cs b/src/Microsoft.ML.PCA/PcaTransform.cs index e124f9cb7b..aa7bbc69c4 100644 --- a/src/Microsoft.ML.PCA/PcaTransform.cs +++ b/src/Microsoft.ML.PCA/PcaTransform.cs @@ -554,7 +554,7 @@ internal static void ValidatePcaInput(IExceptionContext ectx, string name, Colum throw ectx.ExceptSchemaMismatch(nameof(inputSchema), "input", name, "vector of floats with fixed size greater than 1", type.ToString()); } - private sealed class Mapper : MapperBase + private sealed class Mapper : OneToOneMapperBase { public sealed class ColumnSchemaInfo { @@ -600,7 +600,7 @@ public Mapper(PcaTransform parent, Schema inputSchema) } } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var result = new Schema.Column[_numColumns]; for (int i = 0; i < _numColumns; i++) @@ -608,7 +608,7 @@ public override Schema.Column[] GetOutputColumns() return result; } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _numColumns); @@ -630,17 +630,14 @@ private static void TransformFeatures(IExceptionContext ectx, in VBuffer { ectx.Check(src.Length == transformInfo.Dimension); - var values = dst.Values; - if (Utils.Size(values) < transformInfo.Rank) - values = new float[transformInfo.Rank]; - + var editor = VBufferEditor.Create(ref dst, transformInfo.Rank); for (int i = 0; i < transformInfo.Rank; i++) { - values[i] = VectorUtils.DotProductWithOffset(transformInfo.Eigenvectors[i], 0, in src) - + editor.Values[i] = VectorUtils.DotProductWithOffset(transformInfo.Eigenvectors[i], 0, in src) - (transformInfo.MeanProjected == null ? 0 : transformInfo.MeanProjected[i]); } - dst = new VBuffer(transformInfo.Rank, values, dst.Indices); + dst = editor.Commit(); } } diff --git a/src/Microsoft.ML.Parquet/ParquetLoader.cs b/src/Microsoft.ML.Parquet/ParquetLoader.cs index 4bbfc608f5..6254c70a1a 100644 --- a/src/Microsoft.ML.Parquet/ParquetLoader.cs +++ b/src/Microsoft.ML.Parquet/ParquetLoader.cs @@ -384,7 +384,7 @@ private static Stream OpenStream(string filename) public Schema Schema { get; } - public long? GetRowCount(bool lazy = true) + public long? GetRowCount() { return _rowCount; } diff --git a/src/Microsoft.ML.PipelineInference/AutoInference.cs b/src/Microsoft.ML.PipelineInference/AutoInference.cs index 5fb8e70d20..d04b61403f 100644 --- a/src/Microsoft.ML.PipelineInference/AutoInference.cs +++ b/src/Microsoft.ML.PipelineInference/AutoInference.cs @@ -470,7 +470,7 @@ public static AutoMlMlState InferPipelines(IHostEnvironment env, PipelineOptimiz env.CheckValue(trainData, nameof(trainData)); env.CheckValue(testData, nameof(testData)); - int numOfRows = (int)(trainData.GetRowCount(false) ?? 1000); + int numOfRows = (int)(trainData.GetRowCount() ?? 1000); AutoMlMlState amls = new AutoMlMlState(env, metric, autoMlEngine, terminator, trainerKind, trainData, testData); bestPipeline = amls.InferPipelines(numTransformLevels, batchSize, numOfRows); return amls; diff --git a/src/Microsoft.ML.PipelineInference/AutoMlUtils.cs b/src/Microsoft.ML.PipelineInference/AutoMlUtils.cs index ba4b1e3872..8837ac945b 100644 --- a/src/Microsoft.ML.PipelineInference/AutoMlUtils.cs +++ b/src/Microsoft.ML.PipelineInference/AutoMlUtils.cs @@ -338,7 +338,7 @@ public static AutoInference.LevelDependencyMap ComputeColumnResponsibilities(IDa return mapping; } - public static TlcModule.SweepableParamAttribute[] GetSweepRanges(Type learnerInputType) + internal static TlcModule.SweepableParamAttribute[] GetSweepRanges(Type learnerInputType) { var paramSet = new List(); foreach (var prop in learnerInputType.GetProperties(BindingFlags.Instance | @@ -370,7 +370,7 @@ public static TlcModule.SweepableParamAttribute[] GetSweepRanges(Type learnerInp return paramSet.ToArray(); } - public static IValueGenerator ToIValueGenerator(TlcModule.SweepableParamAttribute attr) + internal static IValueGenerator ToIValueGenerator(TlcModule.SweepableParamAttribute attr) { if (attr is TlcModule.SweepableLongParamAttribute sweepableLongParamAttr) { @@ -430,7 +430,7 @@ private static void SetValue(PropertyInfo pi, IComparable value, object entryPoi /// /// Updates properties of entryPointObj instance based on the values in sweepParams /// - public static bool UpdateProperties(object entryPointObj, TlcModule.SweepableParamAttribute[] sweepParams) + internal static bool UpdateProperties(object entryPointObj, TlcModule.SweepableParamAttribute[] sweepParams) { bool result = true; foreach (var param in sweepParams) @@ -501,7 +501,7 @@ public static void PopulateSweepableParams(RecipeInference.SuggestedRecipe.Sugge } } - public static bool CheckEntryPointStateMatchesParamValues(object entryPointObj, + internal static bool CheckEntryPointStateMatchesParamValues(object entryPointObj, TlcModule.SweepableParamAttribute[] sweepParams) { foreach (var param in sweepParams) @@ -584,7 +584,7 @@ public static IRunResult[] ConvertToRunResults(PipelinePattern[] history, bool i /// Method to convert set of sweepable hyperparameters into instances used /// by the current smart hyperparameter sweepers. /// - public static IComponentFactory[] ConvertToComponentFactories(TlcModule.SweepableParamAttribute[] hps) + internal static IComponentFactory[] ConvertToComponentFactories(TlcModule.SweepableParamAttribute[] hps) { var results = new IComponentFactory[hps.Length]; diff --git a/src/Microsoft.ML.PipelineInference/DatasetFeaturesInference.cs b/src/Microsoft.ML.PipelineInference/DatasetFeaturesInference.cs index 097a61e621..235a85e96c 100644 --- a/src/Microsoft.ML.PipelineInference/DatasetFeaturesInference.cs +++ b/src/Microsoft.ML.PipelineInference/DatasetFeaturesInference.cs @@ -21,19 +21,19 @@ public static class DatasetFeatureInference { public sealed class Stats { - [JsonIgnore] public SummaryStatistics Statistics; + [JsonIgnore] private SummaryStatistics _statistics; [JsonIgnore] public double Sum; public Stats() { - Statistics = new SummaryStatistics(); + _statistics = new SummaryStatistics(); } public void Add(double x) { Sum += x; - Statistics.Add(x); + _statistics.Add(x); } public void Add(IEnumerable x) @@ -43,31 +43,31 @@ public void Add(IEnumerable x) } [JsonProperty] - public long Count => Statistics.RawCount; + public long Count => _statistics.RawCount; [JsonProperty] - public double? NonZeroValueCount => Statistics.RawCount > 20 ? (double?)Statistics.Nonzero : null; + public double? NonZeroValueCount => _statistics.RawCount > 20 ? (double?)_statistics.Nonzero : null; [JsonProperty] - public double? Variance => Statistics.RawCount > 20 ? (double?)Statistics.SampleVariance : null; + public double? Variance => _statistics.RawCount > 20 ? (double?)_statistics.SampleVariance : null; [JsonProperty] - public double? StandardDeviation => Statistics.RawCount > 20 ? (double?)Statistics.SampleStdDev : null; + public double? StandardDeviation => _statistics.RawCount > 20 ? (double?)_statistics.SampleStdDev : null; [JsonProperty] - public double? Skewness => Statistics.RawCount > 20 ? (double?)Statistics.Skewness : null; + public double? Skewness => _statistics.RawCount > 20 ? (double?)_statistics.Skewness : null; [JsonProperty] - public double? Kurtosis => Statistics.RawCount > 20 ? (double?)Statistics.Kurtosis : null; + public double? Kurtosis => _statistics.RawCount > 20 ? (double?)_statistics.Kurtosis : null; [JsonProperty] - public double? Mean => Statistics.RawCount > 20 ? (double?)Statistics.Mean : null; + public double? Mean => _statistics.RawCount > 20 ? (double?)_statistics.Mean : null; [JsonIgnore] - public double Min => Statistics.Min; + public double Min => _statistics.Min; [JsonIgnore] - public double Max => Statistics.Max; + public double Max => _statistics.Max; } public sealed class Column @@ -428,8 +428,8 @@ private void ApplyCore(ReadOnlyMemory[][] data, Column column) NumericColumnFeatures.Add(new ColumnStatistics { Column = column, Stats = stats }); else { - NonNumericColumnLengthFeature.Push(new ColumnStatistics { Column = column, Stats = stats }); - NonNumericColumnSpacesFeature.Push(new ColumnStatistics { Column = column, Stats = spacesStats }); + NonNumericColumnLengthFeature.Add(new ColumnStatistics { Column = column, Stats = stats }); + NonNumericColumnSpacesFeature.Add(new ColumnStatistics { Column = column, Stats = spacesStats }); } } diff --git a/test/Microsoft.ML.InferenceTesting/GenerateSweepCandidatesCommand.cs b/src/Microsoft.ML.PipelineInference/GenerateSweepCandidatesCommand.cs similarity index 96% rename from test/Microsoft.ML.InferenceTesting/GenerateSweepCandidatesCommand.cs rename to src/Microsoft.ML.PipelineInference/GenerateSweepCandidatesCommand.cs index 61aad5729a..8d03868719 100644 --- a/test/Microsoft.ML.InferenceTesting/GenerateSweepCandidatesCommand.cs +++ b/src/Microsoft.ML.PipelineInference/GenerateSweepCandidatesCommand.cs @@ -10,23 +10,23 @@ using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Internal.Utilities; -using Microsoft.ML.Runtime.MLTesting.Inference; using Microsoft.ML.Runtime.PipelineInference; using Microsoft.ML.Runtime.Sweeper; [assembly: LoadableClass(typeof(GenerateSweepCandidatesCommand), typeof(GenerateSweepCandidatesCommand.Arguments), typeof(SignatureCommand), "Generate Experiment Candidates", "GenerateSweepCandidates", DocName = "command/GenerateSweepCandidates.md")] -namespace Microsoft.ML.Runtime.MLTesting.Inference +namespace Microsoft.ML.Runtime.PipelineInference { /// /// This is a command that takes as an input: /// 1- the schema of a dataset, in the format produced by InferSchema - /// 2- the path to the datafile - /// and generates experiment candidates by combining all the transform recipes suggested for the dataset, with all the learners available for the task. + /// 2- the path to the datafile + /// and generates experiment candidates by combining all the transform recipes suggested for the dataset, with all the learners available for the task. /// - public sealed class GenerateSweepCandidatesCommand : ICommand + internal sealed class GenerateSweepCandidatesCommand : ICommand { +#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. public sealed class Arguments { [Argument(ArgumentType.Required, HelpText = "Text file with data to analyze.", ShortName = "data")] @@ -53,6 +53,7 @@ public sealed class Arguments [Argument(ArgumentType.AtMostOnce, HelpText = "If this option is provided, the result RSP are indented and written in separate files for easier visual inspection. Otherwise all the generated RSPs are written to a single file, one RSP per line.")] public bool Indent; } +#pragma warning disable CS0649 private readonly IHost _host; private readonly string _dataFile; diff --git a/src/Microsoft.ML.PipelineInference/InferenceUtils.cs b/src/Microsoft.ML.PipelineInference/InferenceUtils.cs index b87cf8cb02..9510e94eb3 100644 --- a/src/Microsoft.ML.PipelineInference/InferenceUtils.cs +++ b/src/Microsoft.ML.PipelineInference/InferenceUtils.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.Data; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Transforms; @@ -17,7 +18,7 @@ public static IDataView Take(this IDataView data, int count) { Contracts.CheckValue(data, nameof(data)); // REVIEW: This should take an env as a parameter, not create one. - var env = new ConsoleEnvironment(0); + var env = new MLContext(seed: 0); var take = SkipTakeFilter.Create(env, new SkipTakeFilter.TakeArguments { Count = count }, data); return CacheCore(take, env); } @@ -26,7 +27,7 @@ public static IDataView Cache(this IDataView data) { Contracts.CheckValue(data, nameof(data)); // REVIEW: This should take an env as a parameter, not create one. - return CacheCore(data, new ConsoleEnvironment(0)); + return CacheCore(data, new MLContext(0)); } private static IDataView CacheCore(IDataView data, IHostEnvironment env) diff --git a/src/Microsoft.ML.PipelineInference/Interfaces/IPipelineNode.cs b/src/Microsoft.ML.PipelineInference/Interfaces/IPipelineNode.cs index 30f93d2eb4..a8bee5d046 100644 --- a/src/Microsoft.ML.PipelineInference/Interfaces/IPipelineNode.cs +++ b/src/Microsoft.ML.PipelineInference/Interfaces/IPipelineNode.cs @@ -60,7 +60,7 @@ protected string GetEpName(Type type) return epName; } - protected void PropagateParamSetValues(ParameterSet hyperParams, + private protected void PropagateParamSetValues(ParameterSet hyperParams, TlcModule.SweepableParamAttribute[] sweepParams) { var spMap = sweepParams.ToDictionary(sp => sp.Name); @@ -79,9 +79,9 @@ public sealed class TransformPipelineNode : PipelineNodeBase, IPipelineNode sweepParams = null, CommonInputs.ITrainerInput subTrainerObj = null) { @@ -136,9 +136,10 @@ public sealed class TrainerPipelineNode : PipelineNodeBase, IPipelineNode sweepParams = null, ParameterSet hyperParameterSet = null) { diff --git a/src/Microsoft.ML.PipelineInference/Microsoft.ML.PipelineInference.csproj b/src/Microsoft.ML.PipelineInference/Microsoft.ML.PipelineInference.csproj index fdc8d2802d..9f79aebbe1 100644 --- a/src/Microsoft.ML.PipelineInference/Microsoft.ML.PipelineInference.csproj +++ b/src/Microsoft.ML.PipelineInference/Microsoft.ML.PipelineInference.csproj @@ -15,9 +15,9 @@ + - diff --git a/src/Microsoft.ML.PipelineInference/Properties/AssemblyInfo.cs b/src/Microsoft.ML.PipelineInference/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..db1d151fa2 --- /dev/null +++ b/src/Microsoft.ML.PipelineInference/Properties/AssemblyInfo.cs @@ -0,0 +1,10 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.CompilerServices; +using Microsoft.ML; + +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.TestValue)] + +[assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.PipelineInference/RecipeInference.cs b/src/Microsoft.ML.PipelineInference/RecipeInference.cs index 842bf339a2..4f3b796153 100644 --- a/src/Microsoft.ML.PipelineInference/RecipeInference.cs +++ b/src/Microsoft.ML.PipelineInference/RecipeInference.cs @@ -2,12 +2,13 @@ // 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.Data; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Runtime.Internal.Internallearn; using Microsoft.ML.Runtime.Sweeper; -using Microsoft.ML.Trainers.FastTree; using Microsoft.ML.Trainers; +using Microsoft.ML.Trainers.FastTree; using Microsoft.ML.Trainers.Online; using Newtonsoft.Json; using System; diff --git a/src/Microsoft.ML.PipelineInference/TextFileContents.cs b/src/Microsoft.ML.PipelineInference/TextFileContents.cs index f3f45cc8b9..df2dbc4a7f 100644 --- a/src/Microsoft.ML.PipelineInference/TextFileContents.cs +++ b/src/Microsoft.ML.PipelineInference/TextFileContents.cs @@ -114,7 +114,7 @@ private static bool TryParseFile(IChannel ch, TextLoader.Arguments args, IMultiS try { // No need to provide information from unsuccessful loader, so we create temporary environment and get information from it in case of success - using (var loaderEnv = new ConsoleEnvironment(0, true)) + using (var loaderEnv = new ConsoleEnvironment(0, verbose: true)) { var messages = new ConcurrentBag(); loaderEnv.AddListener( diff --git a/src/Microsoft.ML.PipelineInference/TransformInference.cs b/src/Microsoft.ML.PipelineInference/TransformInference.cs index 724d231843..4c8312d663 100644 --- a/src/Microsoft.ML.PipelineInference/TransformInference.cs +++ b/src/Microsoft.ML.PipelineInference/TransformInference.cs @@ -374,7 +374,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum var epInput = new ML.Legacy.Transforms.TextToKeyConverter(); epInput.Column = new[] { - new ML.Legacy.Transforms.TermTransformColumn + new ML.Legacy.Transforms.ValueToKeyMappingTransformerColumn { Name = dest, Source = source @@ -415,7 +415,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.CopyColumnsTransformColumn + new ML.Legacy.Transforms.ColumnsCopyingTransformerColumn { Name = dest, Source = source @@ -477,7 +477,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.CategoricalHashTransformColumn + new ML.Legacy.Transforms.OneHotHashEncodingTransformerColumn { Name = dest, Source = source @@ -510,7 +510,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.CopyColumnsTransformColumn + new ML.Legacy.Transforms.ColumnsCopyingTransformerColumn { Name = dest, Source = source @@ -590,8 +590,8 @@ public override IEnumerable Apply(IntermediateColumn[] colum bool foundCatHash = false; var colSpecCat = new StringBuilder(); var colSpecCatHash = new StringBuilder(); - var catColumns = new List(); - var catHashColumns = new List(); + var catColumns = new List(); + var catHashColumns = new List(); var featureCols = new List(); foreach (var column in columns) @@ -622,7 +622,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { foundCat = true; colSpecCat.Append(columnArgument); - catColumns.Add(new ML.Legacy.Transforms.CategoricalTransformColumn + catColumns.Add(new ML.Legacy.Transforms.OneHotEncodingTransformerColumn { Name = columnNameQuoted.ToString(), Source = columnNameQuoted.ToString() @@ -633,7 +633,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum ch.Info("Categorical column '{0}' has extremely high cardinality. Suggested hash-based category encoding.", column.ColumnName); foundCatHash = true; colSpecCatHash.Append(columnArgument); - catHashColumns.Add(new ML.Legacy.Transforms.CategoricalHashTransformColumn + catHashColumns.Add(new ML.Legacy.Transforms.OneHotHashEncodingTransformerColumn { Name = columnNameQuoted.ToString(), Source = columnNameQuoted.ToString() @@ -707,7 +707,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { var columnArgument = new StringBuilder(); var columnNameQuoted = new StringBuilder(); - var epColumns = new List(); + var epColumns = new List(); foreach (var column in columns) { @@ -730,7 +730,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum columnNameQuoted.AppendFormat("{0}", column.ColumnName); } - epColumns.Add(new ML.Legacy.Transforms.ConvertingTransformColumn + epColumns.Add(new ML.Legacy.Transforms.TypeConvertingTransformerColumn { Name = columnNameQuoted.ToString(), Source = columnNameQuoted.ToString(), @@ -846,7 +846,7 @@ public static SuggestedTransform ConcatColumnsIntoOne(List columnNames, { Column = new[] { - new ML.Legacy.Transforms.ConcatTransformColumn + new ML.Legacy.Transforms.ColumnConcatenatingTransformerColumn { Name = concatColumnName, Source = columnNames.ToArray() @@ -979,7 +979,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.ConcatTransformColumn + new ML.Legacy.Transforms.ColumnConcatenatingTransformerColumn { Name = featuresTreeFeatColumn, Source = new [] { treeFeaturizerOutputColumnName } @@ -1016,7 +1016,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.ConcatTransformColumn + new ML.Legacy.Transforms.ColumnConcatenatingTransformerColumn { Name = featuresKMeansColumn, Source = new [] { kMeansOutputColumnName } @@ -1292,7 +1292,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.NAHandleTransformColumn + new ML.Legacy.Transforms.MissingValueHandlingTransformerColumn { Name = name, Source = name @@ -1372,7 +1372,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.ConcatTransformColumn + new ML.Legacy.Transforms.ColumnConcatenatingTransformerColumn { Name = DefaultColumnNames.Features, Source = columnListQuoted.ToArray() @@ -1461,7 +1461,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.CopyColumnsTransformColumn + new ML.Legacy.Transforms.ColumnsCopyingTransformerColumn { Name = DefaultColumnNames.Name, Source = columnNameQuoted.ToString() @@ -1507,7 +1507,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.ConcatTransformColumn + new ML.Legacy.Transforms.ColumnConcatenatingTransformerColumn { Name = DefaultColumnNames.Name, Source = columnListQuoted.ToArray() diff --git a/src/Microsoft.ML.Recommender/MatrixFactorizationStatic.cs b/src/Microsoft.ML.Recommender/MatrixFactorizationStatic.cs index 5d53c1ec8d..fee3009a6e 100644 --- a/src/Microsoft.ML.Recommender/MatrixFactorizationStatic.cs +++ b/src/Microsoft.ML.Recommender/MatrixFactorizationStatic.cs @@ -56,7 +56,7 @@ public static Scalar MatrixFactorization(this RegressionContext.Regres var rec = new MatrixFactorizationReconciler((env, labelColName, matrixColumnIndexColName, matrixRowIndexColName) => { - var trainer = new MatrixFactorizationTrainer(env, labelColName, matrixColumnIndexColName, matrixRowIndexColName, advancedSettings: + var trainer = new MatrixFactorizationTrainer(env, matrixColumnIndexColName, matrixRowIndexColName, labelColName, advancedSettings: args => { args.Lambda = regularizationCoefficient; diff --git a/src/Microsoft.ML.Recommender/MatrixFactorizationTrainer.cs b/src/Microsoft.ML.Recommender/MatrixFactorizationTrainer.cs index 3894007701..a0b0d35ce6 100644 --- a/src/Microsoft.ML.Recommender/MatrixFactorizationTrainer.cs +++ b/src/Microsoft.ML.Recommender/MatrixFactorizationTrainer.cs @@ -78,17 +78,30 @@ namespace Microsoft.ML.Trainers /// ///

///

Example code can be found by searching for MatrixFactorization in ML.NET.

+ /// /// /// /// + /// ///
public sealed class MatrixFactorizationTrainer : TrainerBase, IEstimator { + public enum LossFunctionType { SquareLossRegression = 0, SquareLossOneClass = 12 }; + public sealed class Arguments { + /// + /// Loss function minimized for finding factor matrices. Two values are allowed, 0 or 12. The values 0 means traditional collaborative filtering + /// problem with squared loss. The value 12 triggers one-class matrix factorization for implicit-feedback recommendation problem. + /// + [Argument(ArgumentType.AtMostOnce, HelpText = "Loss function minimized for finding factor matrices.")] + [TGUI(SuggestedSweeps = "0,12")] + [TlcModule.SweepableDiscreteParam("LossFunction", new object[] { LossFunctionType.SquareLossRegression, LossFunctionType.SquareLossOneClass })] + public LossFunctionType LossFunction = LossFunctionType.SquareLossRegression; + [Argument(ArgumentType.AtMostOnce, HelpText = "Regularization parameter. " + "It's the weight of factor matrices' norms in the objective function minimized by matrix factorization's algorithm. " + "A small value could cause over-fitting.")] @@ -114,6 +127,33 @@ public sealed class Arguments [TlcModule.SweepableDiscreteParam("Eta", new object[] { 0.001f, 0.01f, 0.1f })] public double Eta = 0.1; + /// + /// Importance of unobserved (i.e., negative) entries' loss in one-class matrix factorization. + /// In general, only a few of matrix entries (e.g., less than 1%) in the training are observed (i.e., positive). + /// To balance the contributions from unobserved and obverved in the overall loss function, this parameter is + /// usually a small value so that the solver is able to find a factorization equally good to unobserved and observed + /// entries. If only 10000 observed entries present in a 200000-by-300000 training matrix, one can try Alpha = 10000 / (200000*300000 - 10000). + /// When most entries in the training matrix are observed, one can use Alpha >> 1; for example, if only 10000 in previous + /// matrix is not observed, one can try Alpha = (200000 * 300000 - 10000) / 10000. Consequently, + /// Alpha = (# of observed entries) / (# of unobserved entries) can make observed and unobserved entries equally important + /// in the minimized loss function. However, the best setting in machine learning is alwasy data-depedent so user still needs to + /// try multiple values. + /// + [Argument(ArgumentType.AtMostOnce, HelpText = "Importance of unobserved entries' loss in one-class matrix factorization.")] + [TGUI(SuggestedSweeps = "1,0.01,0.0001,0.000001")] + [TlcModule.SweepableDiscreteParam("Alpha", new object[] { 1f, 0.01f, 0.0001f, 0.000001f})] + public double Alpha = 0.0001; + + /// + /// Desired negative entries value in one-class matrix factorization. In one-class matrix factorization, all matrix values observed are one + /// (which can be viewed as positive cases in binary classification) while unobserved values (which can be viewed as negative cases in binary + /// classification) need to be specified manually using this option. + /// + [Argument(ArgumentType.AtMostOnce, HelpText = "Desired negative entries' value in one-class matrix factorization")] + [TGUI(SuggestedSweeps = "0.000001,0,0001,0.01")] + [TlcModule.SweepableDiscreteParam("C", new object[] { 0.000001f, 0.0001f, 0.01f })] + public double C = 0.000001f; + [Argument(ArgumentType.AtMostOnce, HelpText = "Number of threads can be used in the training procedure.", ShortName = "t")] public int? NumThreads; @@ -129,10 +169,13 @@ public sealed class Arguments + "and the values of the matrix are ratings. "; // LIBMF's parameter + private readonly int _fun; private readonly double _lambda; private readonly int _k; private readonly int _iter; private readonly double _eta; + private readonly double _alpha; + private readonly double _c; private readonly int _threads; private readonly bool _quiet; private readonly bool _doNmf; @@ -190,11 +233,15 @@ public MatrixFactorizationTrainer(IHostEnvironment env, Arguments args) : base(e Host.CheckUserArg(args.NumIterations > 0, nameof(args.NumIterations), posError); Host.CheckUserArg(args.Lambda > 0, nameof(args.Lambda), posError); Host.CheckUserArg(args.Eta > 0, nameof(args.Eta), posError); + Host.CheckUserArg(args.Alpha > 0, nameof(args.Alpha), posError); + _fun = (int)args.LossFunction; _lambda = args.Lambda; _k = args.K; _iter = args.NumIterations; _eta = args.Eta; + _alpha = args.Alpha; + _c = args.C; _threads = args.NumThreads ?? Environment.ProcessorCount; _quiet = args.Quiet; _doNmf = args.NonNegative; @@ -206,22 +253,29 @@ public MatrixFactorizationTrainer(IHostEnvironment env, Arguments args) : base(e /// Initializing a new instance of . ///
/// The private instance of . - /// The name of the label column. /// The name of the column hosting the matrix's column IDs. /// The name of the column hosting the matrix's row IDs. + /// The name of the label column. /// A delegate to apply all the advanced arguments to the algorithm. /// The for additional input data to training. - public MatrixFactorizationTrainer(IHostEnvironment env, string labelColumn, string matrixColumnIndexColumnName, string matrixRowIndexColumnName, - TrainerEstimatorContext context = null, Action advancedSettings = null) + public MatrixFactorizationTrainer(IHostEnvironment env, + string matrixColumnIndexColumnName, + string matrixRowIndexColumnName, + string labelColumn = DefaultColumnNames.Label, + TrainerEstimatorContext context = null, + Action advancedSettings = null) : base(env, LoadNameValue) { var args = new Arguments(); advancedSettings?.Invoke(args); + _fun = (int)args.LossFunction; _lambda = args.Lambda; _k = args.K; _iter = args.NumIterations; _eta = args.Eta; + _alpha = args.Alpha; + _c = args.C; _threads = args.NumThreads ?? Environment.ProcessorCount; _quiet = args.Quiet; _doNmf = args.NonNegative; @@ -238,7 +292,7 @@ public MatrixFactorizationTrainer(IHostEnvironment env, string labelColumn, stri /// Train a matrix factorization model based on training data, validation data, and so on in the given context. ///
/// The information collection needed for training. for details. - public override MatrixFactorizationPredictor Train(TrainContext context) + private protected override MatrixFactorizationPredictor Train(TrainContext context) { Host.CheckValue(context, nameof(context)); @@ -332,8 +386,8 @@ private MatrixFactorizationPredictor TrainCore(IChannel ch, RoleMappedData data, private SafeTrainingAndModelBuffer PrepareBuffer() { - return new SafeTrainingAndModelBuffer(Host, _k, Math.Max(20, 2 * _threads), - _threads, _iter, _lambda, _eta, _doNmf, _quiet, copyData: false); + return new SafeTrainingAndModelBuffer(Host, _fun, _k, _threads, Math.Max(20, 2 * _threads), + _iter, _lambda, _eta, _alpha, _c, _doNmf, _quiet, copyData: false); } /// diff --git a/src/Microsoft.ML.Recommender/SafeTrainingAndModelBuffer.cs b/src/Microsoft.ML.Recommender/SafeTrainingAndModelBuffer.cs index 615b0875f8..33bb90ae0b 100644 --- a/src/Microsoft.ML.Recommender/SafeTrainingAndModelBuffer.cs +++ b/src/Microsoft.ML.Recommender/SafeTrainingAndModelBuffer.cs @@ -44,23 +44,107 @@ private unsafe struct MFProblem [StructLayout(LayoutKind.Explicit)] private struct MFParameter { + /// + /// Enum of loss functions which can be minimized. + /// 0: square loss for regression. + /// 1: absolute loss for regression. + /// 2: KL-divergence for regression. + /// 5: logistic loss for binary classification. + /// 6: squared hinge loss for binary classification. + /// 7: hinge loss for binary classification. + /// 10: row-wise Bayesian personalized ranking. + /// 11: column-wise Bayesian personalized ranking. + /// 12: squared loss for implicit-feedback matrix factorization. + /// Fun 12 is solved by a coordinate descent method while other functions invoke + /// a stochastic gradient method. + /// [FieldOffset(0)] - public int K; + public int Fun; + + /// + /// Rank of factor matrices. + /// [FieldOffset(4)] - public int NrThreads; + public int K; + + /// + /// Number of threads which can be used for training. + /// [FieldOffset(8)] - public int NrBins; + public int NrThreads; + + /// + /// Number of blocks that the training matrix is divided into. The parallel stochastic gradient + /// method in LIBMF processes assigns each thread a block at one time. The ratings in one block + /// would be sequentially accessed (not randomaly accessed like standard stochastic gradient methods). + /// [FieldOffset(12)] - public int NrIters; + public int NrBins; + + /// + /// Number of training iteration. At one iteration, all values in the training matrix are roughly accessed once. + /// [FieldOffset(16)] - public float Lambda; + public int NrIters; + + /// + /// L1-norm regularization coefficient of left factor matrix. + /// [FieldOffset(20)] - public float Eta; + public float LambdaP1; + + /// + /// L2-norm regularization coefficient of left factor matrix. + /// [FieldOffset(24)] - public int DoNmf; + public float LambdaP2; + + /// + /// L1-norm regularization coefficient of right factor matrix. + /// [FieldOffset(28)] - public int Quiet; + public float LambdaQ1; + + /// + /// L2-norm regularization coefficient of right factor matrix. + /// [FieldOffset(32)] + public float LambdaQ2; + + /// + /// Learning rate of LIBMF's stochastic gradient method. + /// + [FieldOffset(36)] + public float Eta; + + /// + /// Coefficient of loss function on unobserved entries in the training matrix. It's used only with fun=12. + /// + [FieldOffset(40)] + public float Alpha; + + /// + /// Desired value of unobserved entries in the training matrix. It's used only with fun=12. + /// + [FieldOffset(44)] + public float C; + + /// + /// Specify if the factor matrices should be non-negative. + /// + [FieldOffset(48)] + public int DoNmf; + + /// + /// Set to true so that LIBMF may produce less information to STDOUT. + /// + [FieldOffset(52)] + public int Quiet; + + /// + /// Set to false so that LIBMF may reuse and modifiy the data passed in. + /// + [FieldOffset(56)] public int CopyData; } @@ -68,14 +152,36 @@ private struct MFParameter private unsafe struct MFModel { [FieldOffset(0)] - public int M; + public int Fun; + /// + /// Number of rows in the training matrix. + /// [FieldOffset(4)] - public int N; + public int M; + /// + /// Number of columns in the training matrix. + /// [FieldOffset(8)] + public int N; + /// + /// Rank of factor matrices. + /// + [FieldOffset(12)] public int K; + /// + /// Average value in the training matrix. + /// [FieldOffset(16)] + public float B; + /// + /// Left factor matrix. Its shape is M-by-K stored in row-major format. + /// + [FieldOffset(24)] // pointer is 8-byte on 64-bit machine. public float* P; - [FieldOffset(24)] + /// + /// Right factor matrix. Its shape is N-by-K stored in row-major format. + /// + [FieldOffset(32)] // pointer is 8-byte on 64-bit machine. public float* Q; } @@ -100,16 +206,23 @@ private unsafe struct MFModel private unsafe MFModel* _pMFModel; private readonly IHost _host; - public SafeTrainingAndModelBuffer(IHostEnvironment env, int k, int nrBins, int nrThreads, int nrIters, double lambda, double eta, + public SafeTrainingAndModelBuffer(IHostEnvironment env, int fun, int k, int nrThreads, + int nrBins, int nrIters, double lambda, double eta, double alpha, double c, bool doNmf, bool quiet, bool copyData) { _host = env.Register("SafeTrainingAndModelBuffer"); + _mfParam.Fun = fun; _mfParam.K = k; - _mfParam.NrBins = nrBins; _mfParam.NrThreads = nrThreads; + _mfParam.NrBins = nrBins; _mfParam.NrIters = nrIters; - _mfParam.Lambda = (float)lambda; + _mfParam.LambdaP1 = 0; + _mfParam.LambdaP2 = (float)lambda; + _mfParam.LambdaQ1 = 0; + _mfParam.LambdaQ2 = (float)lambda; _mfParam.Eta = (float)eta; + _mfParam.Alpha = (float)alpha; + _mfParam.C = (float)c; _mfParam.DoNmf = doNmf ? 1 : 0; _mfParam.Quiet = quiet ? 1 : 0; _mfParam.CopyData = copyData ? 1 : 0; diff --git a/src/Microsoft.ML.ResultProcessor/Microsoft.ML.ResultProcessor.csproj b/src/Microsoft.ML.ResultProcessor/Microsoft.ML.ResultProcessor.csproj index e5610126df..e0f084d70b 100644 --- a/src/Microsoft.ML.ResultProcessor/Microsoft.ML.ResultProcessor.csproj +++ b/src/Microsoft.ML.ResultProcessor/Microsoft.ML.ResultProcessor.csproj @@ -7,10 +7,6 @@ true - - - - diff --git a/src/Microsoft.ML.ResultProcessor/ResultProcessor.cs b/src/Microsoft.ML.ResultProcessor/ResultProcessor.cs index b896e37bf6..85b9234856 100644 --- a/src/Microsoft.ML.ResultProcessor/ResultProcessor.cs +++ b/src/Microsoft.ML.ResultProcessor/ResultProcessor.cs @@ -151,7 +151,9 @@ public void GetDefaultSettingValues(IHostEnvironment env, string predictorName, /// private Dictionary GetDefaultSettings(IHostEnvironment env, string predictorName, string[] extraAssemblies = null) { +#pragma warning disable CS0618 // The result processor is an internal command line processing utility anyway, so this is, while not great, OK. AssemblyLoadingUtils.LoadAndRegister(env, extraAssemblies); +#pragma warning restore CS0618 var cls = env.ComponentCatalog.GetLoadableClassInfo(predictorName); if (cls == null) @@ -1154,7 +1156,9 @@ public static int Main(string[] args) { string currentDirectory = Path.GetDirectoryName(typeof(ResultProcessor).Module.FullyQualifiedName); using (var env = new ConsoleEnvironment(42)) +#pragma warning disable CS0618 // The result processor is an internal command line processing utility anyway, so this is, while not great, OK. using (AssemblyLoadingUtils.CreateAssemblyRegistrar(env, currentDirectory)) +#pragma warning restore CS0618 return Main(env, args); } @@ -1197,7 +1201,9 @@ protected static void Run(IHostEnvironment env, string[] args) if (cmd.IncludePerFoldResults) cmd.PerFoldResultSeparator = "" + PredictionUtil.SepCharFromString(cmd.PerFoldResultSeparator); +#pragma warning disable CS0618 // The result processor is an internal command line processing utility anyway, so this is, while not great, OK. AssemblyLoadingUtils.LoadAndRegister(env, cmd.ExtraAssemblies); +#pragma warning restore CS0618 if (cmd.Metrics.Length == 0) cmd.Metrics = null; diff --git a/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj b/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj index 6e20746a31..8bc5796f73 100644 --- a/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj +++ b/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj @@ -5,4 +5,8 @@ Microsoft.ML + + + + diff --git a/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs b/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs index 82ae0516c8..aae179e822 100644 --- a/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs +++ b/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.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 System; using System.Collections.Generic; using System.Net; @@ -105,7 +106,7 @@ public static IEnumerable GetTopicsData() var data = new List(); data.Add(new SampleTopicsData { Review = "animals birds cats dogs fish horse", ReviewReverse = "radiation galaxy universe duck", Label = true }); data.Add(new SampleTopicsData { Review = "horse birds house fish duck cats", ReviewReverse = "space galaxy universe radiation", Label = false }); - data.Add(new SampleTopicsData { Review = "car truck driver bus pickup", ReviewReverse = "bus pickup", Label = true}); + data.Add(new SampleTopicsData { Review = "car truck driver bus pickup", ReviewReverse = "bus pickup", Label = true }); data.Add(new SampleTopicsData { Review = "car truck driver bus pickup horse", ReviewReverse = "car truck", Label = false }); return data; @@ -134,16 +135,100 @@ public class SampleInfertData public static IEnumerable GetInfertData() { var data = new List(); - data.Add(new SampleInfertData { - RowNum = 0, Education = "0-5yrs", Age = 26, Parity = 6, Induced = 1, Case = 1, Spontaneous = 2, Stratum = 1, PooledStratum = 3 }); - data.Add(new SampleInfertData { - RowNum = 1, Education = "0-5yrs", Age = 42, Parity = 1, Induced = 1, Case = 1, Spontaneous = 0, Stratum = 2, PooledStratum = 1 }); - data.Add(new SampleInfertData { - RowNum = 2, Education = "0-5yrs", Age = 39, Parity = 6, Induced = 2, Case = 1, Spontaneous = 0, Stratum = 3, PooledStratum = 4 }); - data.Add(new SampleInfertData { - RowNum = 3, Education = "0-5yrs", Age = 34, Parity = 4, Induced = 2, Case = 1, Spontaneous = 0, Stratum = 4, PooledStratum = 2 }); - data.Add(new SampleInfertData { - RowNum = 4, Education = "6-11yrs", Age = 35, Parity = 3, Induced = 1, Case = 1, Spontaneous = 1, Stratum = 5, PooledStratum = 32 }); + data.Add(new SampleInfertData + { + RowNum = 0, + Education = "0-5yrs", + Age = 26, + Parity = 6, + Induced = 1, + Case = 1, + Spontaneous = 2, + Stratum = 1, + PooledStratum = 3 + }); + data.Add(new SampleInfertData + { + RowNum = 1, + Education = "0-5yrs", + Age = 42, + Parity = 1, + Induced = 1, + Case = 1, + Spontaneous = 0, + Stratum = 2, + PooledStratum = 1 + }); + data.Add(new SampleInfertData + { + RowNum = 2, + Education = "0-5yrs", + Age = 39, + Parity = 6, + Induced = 2, + Case = 1, + Spontaneous = 0, + Stratum = 3, + PooledStratum = 4 + }); + data.Add(new SampleInfertData + { + RowNum = 3, + Education = "0-5yrs", + Age = 34, + Parity = 4, + Induced = 2, + Case = 1, + Spontaneous = 0, + Stratum = 4, + PooledStratum = 2 + }); + data.Add(new SampleInfertData + { + RowNum = 4, + Education = "6-11yrs", + Age = 35, + Parity = 3, + Induced = 1, + Case = 1, + Spontaneous = 1, + Stratum = 5, + PooledStratum = 32 + }); + return data; + } + + public class SampleVectorOfNumbersData + { + [VectorType(10)] + + public float[] Features { get; set; } + } + + /// + /// Returns a few rows of the infertility dataset. + /// + public static IEnumerable GetVectorOfNumbersData() + { + var data = new List(); + data.Add(new SampleVectorOfNumbersData { Features = new float[10] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } }); + data.Add(new SampleVectorOfNumbersData { Features = new float[10] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 } }); + data.Add(new SampleVectorOfNumbersData + { + Features = new float[10] { 2, 3, 4, 5, 6, 7, 8, 9, 0, 1 } + }); + data.Add(new SampleVectorOfNumbersData + { + Features = new float[10] { 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, } + }); + data.Add(new SampleVectorOfNumbersData + { + Features = new float[10] { 5, 6, 7, 8, 9, 0, 1, 2, 3, 4 } + }); + data.Add(new SampleVectorOfNumbersData + { + Features = new float[10] { 6, 7, 8, 9, 0, 1, 2, 3, 4, 5 } + }); return data; } } diff --git a/src/Microsoft.ML.StandardLearners/AssemblyInfo.cs b/src/Microsoft.ML.StandardLearners/AssemblyInfo.cs index 415752aa8d..671913b203 100644 --- a/src/Microsoft.ML.StandardLearners/AssemblyInfo.cs +++ b/src/Microsoft.ML.StandardLearners/AssemblyInfo.cs @@ -6,5 +6,6 @@ using Microsoft.ML; [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Legacy" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.HalLearners" + PublicKey.Value)] [assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineCatalog.cs b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineCatalog.cs index f94511ec76..cc11b083dd 100644 --- a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineCatalog.cs +++ b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineCatalog.cs @@ -18,21 +18,22 @@ public static class FactorizationMachineExtensions /// Predict a target using a field-aware factorization machine algorithm. /// /// The binary classification context trainer object. - /// The label, or dependent variable. - /// The features, or independent variables. + /// The features, or independent variables. + /// The label, or dependent variable. /// The optional example weights. /// A delegate to set more settings. /// The settings here will override the ones provided in the direct method signature, /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public static FieldAwareFactorizationMachineTrainer FieldAwareFactorizationMachine(this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string label, string[] features, - string weights = null, - Action advancedSettings = null) + string[] featureColumns, + string labelColumn = DefaultColumnNames.Label, + string weights = null, + Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new FieldAwareFactorizationMachineTrainer(env, label, features, weights, advancedSettings: advancedSettings); + return new FieldAwareFactorizationMachineTrainer(env, featureColumns, labelColumn, weights, advancedSettings: advancedSettings); } } } diff --git a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineInterface.cs b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineInterface.cs index a4a2b79787..f746c3bd89 100644 --- a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineInterface.cs +++ b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineInterface.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Runtime.Internal.CpuMath; -using Microsoft.ML.Runtime.Internal.Utilities; using System.Runtime.InteropServices; using System.Security; diff --git a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineStatic.cs b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineStatic.cs index 2a95df5dd7..3dbb900326 100644 --- a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineStatic.cs +++ b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineStatic.cs @@ -56,7 +56,7 @@ public static (Scalar score, Scalar predictedLabel) FieldAwareFacto var rec = new CustomReconciler((env, labelCol, featureCols) => { - var trainer = new FieldAwareFactorizationMachineTrainer(env, labelCol, featureCols, advancedSettings: + var trainer = new FieldAwareFactorizationMachineTrainer(env, featureCols, labelCol, advancedSettings: args => { args.LearningRate = learningRate; diff --git a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineTrainer.cs b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineTrainer.cs index 537a75a4d6..756c1964a6 100644 --- a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineTrainer.cs +++ b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineTrainer.cs @@ -134,13 +134,17 @@ public FieldAwareFactorizationMachineTrainer(IHostEnvironment env, Arguments arg /// Initializing a new instance of . ///
/// The private instance of . - /// The name of the label column. /// The name of column hosting the features. + /// The name of the label column. /// A delegate to apply all the advanced arguments to the algorithm. - /// The name of the weight column. + /// The name of the optional weights' column. /// The for additional input data to training. - public FieldAwareFactorizationMachineTrainer(IHostEnvironment env, string labelColumn, string[] featureColumns, - string weightColumn = null, TrainerEstimatorContext context = null, Action advancedSettings = null) + public FieldAwareFactorizationMachineTrainer(IHostEnvironment env, + string[] featureColumns, + string labelColumn = DefaultColumnNames.Label, + string weights = null, + TrainerEstimatorContext context = null, + Action advancedSettings = null) : base(env, LoadName) { var args = new Arguments(); @@ -157,7 +161,7 @@ public FieldAwareFactorizationMachineTrainer(IHostEnvironment env, string labelC FeatureColumns[i] = new SchemaShape.Column(featureColumns[i], SchemaShape.Column.VectorKind.Vector, NumberType.R4, false); LabelColumn = new SchemaShape.Column(labelColumn, SchemaShape.Column.VectorKind.Scalar, BoolType.Instance, false); - WeightColumn = weightColumn != null ? new SchemaShape.Column(weightColumn, SchemaShape.Column.VectorKind.Scalar, NumberType.R4, false) : null; + WeightColumn = weights != null ? new SchemaShape.Column(weights, SchemaShape.Column.VectorKind.Scalar, NumberType.R4, false) : null; } /// @@ -425,7 +429,7 @@ private FieldAwareFactorizationMachinePredictor TrainCore(IChannel ch, IProgress return new FieldAwareFactorizationMachinePredictor(Host, _norm, fieldCount, totalFeatureCount, _latentDim, linearWeights, latentWeightsAligned); } - public override FieldAwareFactorizationMachinePredictor Train(TrainContext context) + private protected override FieldAwareFactorizationMachinePredictor Train(TrainContext context) { Host.CheckValue(context, nameof(context)); var initPredictor = context.InitialPredictor as FieldAwareFactorizationMachinePredictor; diff --git a/src/Microsoft.ML.StandardLearners/Microsoft.ML.StandardLearners.csproj b/src/Microsoft.ML.StandardLearners/Microsoft.ML.StandardLearners.csproj index b1624559cd..d1c2fba257 100644 --- a/src/Microsoft.ML.StandardLearners/Microsoft.ML.StandardLearners.csproj +++ b/src/Microsoft.ML.StandardLearners/Microsoft.ML.StandardLearners.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -6,6 +6,10 @@ true + + + + diff --git a/src/Microsoft.ML.StandardLearners/Optimizer/DifferentiableFunction.cs b/src/Microsoft.ML.StandardLearners/Optimizer/DifferentiableFunction.cs index ee928e5cda..d54f6b8666 100644 --- a/src/Microsoft.ML.StandardLearners/Optimizer/DifferentiableFunction.cs +++ b/src/Microsoft.ML.StandardLearners/Optimizer/DifferentiableFunction.cs @@ -101,7 +101,7 @@ private void Eval(object chunkIndexObj) VBuffer tempGrad = default(VBuffer); for (int i = from; i < to; ++i) { - tempGrad = new VBuffer(0, 0, tempGrad.Values, tempGrad.Indices); + VBufferUtils.Resize(ref tempGrad, 0, 0); _tempVals[chunkIndex] += _func(i, in _input, ref tempGrad); if (_tempGrads[chunkIndex].Length == 0) tempGrad.CopyTo(ref _tempGrads[chunkIndex]); @@ -247,7 +247,7 @@ public static Float Test(DifferentiableFunction f, in VBuffer x, bool qui /// /// /// - public static void TestAllCoords(DifferentiableFunction f, ref VBuffer x) + public static void TestAllCoords(DifferentiableFunction f, in VBuffer x) { // REVIEW: Delete this method? VBuffer grad = default(VBuffer); @@ -263,7 +263,7 @@ public static void TestAllCoords(DifferentiableFunction f, ref VBuffer x) VBuffer dir = new VBuffer(x.Length, 1, new Float[] { 1 }, new int[] { 0 }); for (int n = 0; n < x.Length; n++) { - dir.Values[0] = n; + VBufferEditor.CreateFromBuffer(ref dir).Values[0] = n; VectorUtils.AddMultInto(in x, Eps, in dir, ref newX); Float rVal = f(in newX, ref newGrad, null); @@ -286,7 +286,7 @@ public static void TestAllCoords(DifferentiableFunction f, ref VBuffer x) /// Function to test /// Point at which to test /// List of coordinates to test - public static void TestCoords(DifferentiableFunction f, ref VBuffer x, IList coords) + public static void TestCoords(DifferentiableFunction f, in VBuffer x, IList coords) { // REVIEW: Delete this method? VBuffer grad = default(VBuffer); @@ -302,7 +302,7 @@ public static void TestCoords(DifferentiableFunction f, ref VBuffer x, IL VBuffer dir = new VBuffer(x.Length, 1, new Float[] { 1 }, new int[] { 0 }); foreach (int n in coords) { - dir.Values[0] = n; + VBufferEditor.CreateFromBuffer(ref dir).Values[0] = n; VectorUtils.AddMultInto(in x, Eps, in dir, ref newX); Float rVal = f(in newX, ref newGrad, null); diff --git a/src/Microsoft.ML.StandardLearners/Optimizer/LineSearch.cs b/src/Microsoft.ML.StandardLearners/Optimizer/LineSearch.cs index fb8e2a6520..6b905a8ef2 100644 --- a/src/Microsoft.ML.StandardLearners/Optimizer/LineSearch.cs +++ b/src/Microsoft.ML.StandardLearners/Optimizer/LineSearch.cs @@ -530,7 +530,7 @@ public static void Main(string[] argv) GDOptimizer gdo = new GDOptimizer(term, null, true); print = true; CreateWrapped(out init, 0, 0); - gdo.Minimize(QuadTest2D, ref init, ref ans); + gdo.Minimize(QuadTest2D, in init, ref ans); QuadTest2D(in ans, ref grad); Console.WriteLine(VectorUtils.Norm(grad)); } diff --git a/src/Microsoft.ML.StandardLearners/Optimizer/OptimizationMonitor.cs b/src/Microsoft.ML.StandardLearners/Optimizer/OptimizationMonitor.cs index 7b231bb027..705c9f8477 100644 --- a/src/Microsoft.ML.StandardLearners/Optimizer/OptimizationMonitor.cs +++ b/src/Microsoft.ML.StandardLearners/Optimizer/OptimizationMonitor.cs @@ -85,7 +85,7 @@ private Float Check(Optimizer.OptimizerState state) { Console.Error.Write(_checkingMessage); Console.Error.Flush(); - var x = state.X; + VBuffer x = state.X; var lastDir = state.LastDir; Float checkResult = GradientTester.Test(state.Function, in x, ref lastDir, true, ref _newGrad, ref _newX); for (int i = 0; i < _checkingMessage.Length; i++) diff --git a/src/Microsoft.ML.StandardLearners/Optimizer/Optimizer.cs b/src/Microsoft.ML.StandardLearners/Optimizer/Optimizer.cs index 4ec56d0eaa..914924d762 100644 --- a/src/Microsoft.ML.StandardLearners/Optimizer/Optimizer.cs +++ b/src/Microsoft.ML.StandardLearners/Optimizer/Optimizer.cs @@ -645,7 +645,7 @@ public void Minimize(DifferentiableFunction function, ref VBuffer initial double? improvement = null; double x; int end; - if (message != null && DoubleParser.TryParse(message.AsMemory().Span, out x, out end)) + if (message != null && DoubleParser.TryParse(message.AsSpan(), out x, out end)) improvement = x; pch.Checkpoint(state.Value, improvement, state.Iter); diff --git a/src/Microsoft.ML.StandardLearners/Optimizer/SgdOptimizer.cs b/src/Microsoft.ML.StandardLearners/Optimizer/SgdOptimizer.cs index 67fcf1c18b..c03c709e2a 100644 --- a/src/Microsoft.ML.StandardLearners/Optimizer/SgdOptimizer.cs +++ b/src/Microsoft.ML.StandardLearners/Optimizer/SgdOptimizer.cs @@ -169,7 +169,7 @@ public void Minimize(DStochasticGradient f, ref VBuffer initial, ref VBuf for (int n = 0; _maxSteps == 0 || n < _maxSteps; ++n) { if (_momentum == 0) - step = new VBuffer(step.Length, 0, step.Values, step.Indices); + VBufferUtils.Resize(ref step, step.Length, 0); else VectorUtils.ScaleBy(ref step, _momentum); @@ -349,7 +349,7 @@ public void ChangeDir() /// Function to minimize /// Initial point /// Approximate minimum - public void Minimize(DifferentiableFunction function, ref VBuffer initial, ref VBuffer result) + public void Minimize(DifferentiableFunction function, in VBuffer initial, ref VBuffer result) { Contracts.Check(FloatUtils.IsFinite(initial.GetValues()), "The initial vector contains NaNs or infinite values."); LineFunc lineFunc = new LineFunc(function, in initial, UseCG); @@ -387,96 +387,102 @@ internal static bool ShouldTerminate(in VBuffer x, in VBuffer xpre Contracts.Assert(x.Length == xprev.Length, "Vectors must have the same dimensionality."); Contracts.Assert(FloatUtils.IsFinite(xprev.GetValues())); - if (!FloatUtils.IsFinite(x.GetValues())) + var xValues = x.GetValues(); + if (!FloatUtils.IsFinite(xValues)) return true; + var xprevValues = xprev.GetValues(); if (x.IsDense && xprev.IsDense) { - for (int i = 0; i < x.Length; i++) + for (int i = 0; i < xValues.Length; i++) { - if (x.Values[i] != xprev.Values[i]) + if (xValues[i] != xprevValues[i]) return false; } } else if (xprev.IsDense) { + var xIndices = x.GetIndices(); int j = 0; - for (int ii = 0; ii < x.Count; ii++) + for (int ii = 0; ii < xValues.Length; ii++) { - int i = x.Indices[ii]; + int i = xIndices[ii]; while (j < i) { - if (xprev.Values[j++] != 0) + if (xprevValues[j++] != 0) return false; } Contracts.Assert(i == j); - if (x.Values[ii] != xprev.Values[j++]) + if (xValues[ii] != xprevValues[j++]) return false; } - while (j < xprev.Length) + while (j < xprevValues.Length) { - if (xprev.Values[j++] != 0) + if (xprevValues[j++] != 0) return false; } } else if (x.IsDense) { + var xprevIndices = xprev.GetIndices(); int i = 0; - for (int jj = 0; jj < xprev.Count; jj++) + for (int jj = 0; jj < xprevValues.Length; jj++) { - int j = xprev.Indices[jj]; + int j = xprevIndices[jj]; while (i < j) { - if (x.Values[i++] != 0) + if (xValues[i++] != 0) return false; } Contracts.Assert(j == i); - if (x.Values[i++] != xprev.Values[jj]) + if (xValues[i++] != xprevValues[jj]) return false; } - while (i < x.Length) + while (i < xValues.Length) { - if (x.Values[i++] != 0) + if (xValues[i++] != 0) return false; } } else { // Both sparse. + var xIndices = x.GetIndices(); + var xprevIndices = xprev.GetIndices(); int ii = 0; int jj = 0; - while (ii < x.Count && jj < xprev.Count) + while (ii < xValues.Length && jj < xprevValues.Length) { - int i = x.Indices[ii]; - int j = xprev.Indices[jj]; + int i = xIndices[ii]; + int j = xprevIndices[jj]; if (i == j) { - if (x.Values[ii++] != xprev.Values[jj++]) + if (xValues[ii++] != xprevValues[jj++]) return false; } else if (i < j) { - if (x.Values[ii++] != 0) + if (xValues[ii++] != 0) return false; } else { - if (xprev.Values[jj++] != 0) + if (xprevValues[jj++] != 0) return false; } } - while (ii < x.Count) + while (ii < xValues.Length) { - if (x.Values[ii++] != 0) + if (xValues[ii++] != 0) return false; } - while (jj < xprev.Count) + while (jj < xprevValues.Length) { - if (xprev.Values[jj++] != 0) + if (xprevValues[jj++] != 0) return false; } } diff --git a/src/Microsoft.ML.StandardLearners/Standard/LinearPredictor.cs b/src/Microsoft.ML.StandardLearners/Standard/LinearPredictor.cs index 6a0cfaff99..5f3c0c72cc 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/LinearPredictor.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/LinearPredictor.cs @@ -63,8 +63,10 @@ private sealed class WeightsCollection : IReadOnlyList public int Count => _pred.Weight.Length; - public Float this[int index] { - get { + public Float this[int index] + { + get + { Contracts.CheckParam(0 <= index && index < Count, nameof(index), "Out of range"); Float value = 0; _pred.Weight.GetItemOrDefault(index, ref value); @@ -99,9 +101,9 @@ IEnumerator IEnumerable.GetEnumerator() public ColumnType OutputType => NumberType.Float; - public bool CanSavePfa => true; + bool ICanSavePfa.CanSavePfa => true; - public bool CanSaveOnnx(OnnxContext ctx) => true; + bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => true; /// /// Constructs a new linear predictor. @@ -203,7 +205,7 @@ protected override void SaveCore(ModelSaveContext ctx) ctx.Writer.WriteSingleArray(Weight.GetValues()); } - public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) + JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckValue(input, nameof(input)); @@ -230,7 +232,7 @@ public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) return PfaUtils.Call("model.reg.linear", input, cellRef); } - public bool SaveAsOnnx(OnnxContext ctx, string[] outputs, string featureColumn) + bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputs, string featureColumn) { Host.CheckValue(ctx, nameof(ctx)); Host.Check(Utils.Size(outputs) == 1); @@ -439,17 +441,7 @@ private LinearBinaryPredictor(IHostEnvironment env, ModelLoadContext ctx) // (Base class) // LinearModelStatistics: model statistics (optional, in a separate stream) - string statsDir = Path.Combine(ctx.Directory ?? "", ModelStatsSubModelFilename); - using (var statsEntry = ctx.Repository.OpenEntryOrNull(statsDir, ModelLoadContext.ModelStreamName)) - { - if (statsEntry == null) - _stats = null; - else - { - using (var statsCtx = new ModelLoadContext(ctx.Repository, statsEntry, statsDir)) - _stats = LinearModelStatistics.Create(Host, statsCtx); - } - } + ctx.LoadModelOrNull(Host, out _stats, ModelStatsSubModelFilename); } public static IPredictorProducing Create(IHostEnvironment env, ModelLoadContext ctx) @@ -474,18 +466,11 @@ protected override void SaveCore(ModelSaveContext ctx) // LinearModelStatistics: model statistics (optional, in a separate stream) base.SaveCore(ctx); + ctx.SetVersionInfo(GetVersionInfo()); + Contracts.AssertValueOrNull(_stats); if (_stats != null) - { - using (var statsCtx = new ModelSaveContext(ctx.Repository, - Path.Combine(ctx.Directory ?? "", ModelStatsSubModelFilename), ModelLoadContext.ModelStreamName)) - { - _stats.Save(statsCtx); - statsCtx.Done(); - } - } - - ctx.SetVersionInfo(GetVersionInfo()); + ctx.SaveModel(_stats, ModelStatsSubModelFilename); } public override PredictionKind PredictionKind => PredictionKind.BinaryClassification; @@ -562,7 +547,8 @@ protected RegressionPredictor(IHostEnvironment env, string name, ModelLoadContex { } - public override PredictionKind PredictionKind { + public override PredictionKind PredictionKind + { get { return PredictionKind.Regression; } } diff --git a/src/Microsoft.ML.StandardLearners/Standard/LinearPredictorUtils.cs b/src/Microsoft.ML.StandardLearners/Standard/LinearPredictorUtils.cs index 244019bcdd..69740fa7fe 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/LinearPredictorUtils.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/LinearPredictorUtils.cs @@ -51,7 +51,7 @@ public static void SaveAsCode(TextWriter writer, in VBuffer weights, Floa writer.Write(FloatUtils.ToRoundTripString(value)); writer.Write("*"); - if (featureNames.Count > 0) + if (featureNames.GetValues().Length > 0) writer.Write(FeatureNameAsCode(featureNames.GetItemOrDefault(idx).ToString(), idx)); else writer.Write("f_" + idx); @@ -118,7 +118,7 @@ public static string LinearModelAsIni(in VBuffer weights, Float bias, IPr var name = featureNames.GetItemOrDefault(idx); inputBuilder.AppendLine("[Input:" + numNonZeroWeights + "]"); - inputBuilder.AppendLine("Name=" + (featureNames.Count == 0 ? "Feature_" + idx : name.IsEmpty ? $"f{idx}" : name.ToString())); + inputBuilder.AppendLine("Name=" + (featureNames.GetValues().Length == 0 ? "Feature_" + idx : name.IsEmpty ? $"f{idx}" : name.ToString())); inputBuilder.AppendLine("Transform=linear"); inputBuilder.AppendLine("Slope=1"); inputBuilder.AppendLine("Intercept=0"); diff --git a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsCatalog.cs b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsCatalog.cs deleted file mode 100644 index 5580e66e77..0000000000 --- a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsCatalog.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Internal.Calibration; -using Microsoft.ML.Runtime.Learners; -using Microsoft.ML.Trainers; -using System; - -namespace Microsoft.ML -{ - using Arguments = LogisticRegression.Arguments; - - /// - /// Binary Classification trainer estimators. - /// - public static class LbfgsBinaryClassificationExtensions - { - /// - /// Predict a target using a linear binary classification model trained with the trainer. - /// - /// The binary classificaiton context trainer object. - /// The label, or dependent variable. - /// The features, or independent variables. - /// The optional example weights. - /// Enforce non-negative weights. - /// Weight of L1 regularization term. - /// Weight of L2 regularization term. - /// Memory size for . Lower=faster, less accurate. - /// Threshold for optimizer convergence. - /// A delegate to apply all the advanced arguments to the algorithm. - public static LogisticRegression LogisticRegression(this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, - string weights = null, - float l1Weight = Arguments.Defaults.L1Weight, - float l2Weight = Arguments.Defaults.L2Weight, - float optimizationTolerance = Arguments.Defaults.OptTol, - int memorySize = Arguments.Defaults.MemorySize, - bool enforceNoNegativity = Arguments.Defaults.EnforceNonNegativity, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new LogisticRegression(env, features, label, weights, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity, advancedSettings); - } - } - - /// - /// Regression trainer estimators. - /// - public static class LbfgsRegressionExtensions - { - - /// - /// Predict a target using a linear regression model trained with the trainer. - /// - /// The regression context trainer object. - /// The label, or dependent variable. - /// The features, or independent variables. - /// The optional example weights. - /// Enforce non-negative weights. - /// Weight of L1 regularization term. - /// Weight of L2 regularization term. - /// Memory size for . Lower=faster, less accurate. - /// Threshold for optimizer convergence. - /// A delegate to apply all the advanced arguments to the algorithm. - public static PoissonRegression PoissonRegression(this RegressionContext.RegressionTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, - string weights = null, - float l1Weight = Arguments.Defaults.L1Weight, - float l2Weight = Arguments.Defaults.L2Weight, - float optimizationTolerance = Arguments.Defaults.OptTol, - int memorySize = Arguments.Defaults.MemorySize, - bool enforceNoNegativity = Arguments.Defaults.EnforceNonNegativity, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new PoissonRegression(env, features, label, weights, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity, advancedSettings); - } - } - - /// - /// Multiclass Classification trainer estimators. - /// - public static class LbfgsMulticlassExtensions - { - - /// - /// Predict a target using a linear multiclass classification model trained with the trainer. - /// - /// The multiclass classification context trainer object. - /// The label, or dependent variable. - /// The features, or independent variables. - /// The optional example weights. - /// Enforce non-negative weights. - /// Weight of L1 regularization term. - /// Weight of L2 regularization term. - /// Memory size for . Lower=faster, less accurate. - /// Threshold for optimizer convergence. - /// A delegate to apply all the advanced arguments to the algorithm. - public static MulticlassLogisticRegression LogisticRegression(this MulticlassClassificationContext.MulticlassClassificationTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, - string weights = null, - float l1Weight = Arguments.Defaults.L1Weight, - float l2Weight = Arguments.Defaults.L2Weight, - float optimizationTolerance = Arguments.Defaults.OptTol, - int memorySize = Arguments.Defaults.MemorySize, - bool enforceNoNegativity = Arguments.Defaults.EnforceNonNegativity, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new MulticlassLogisticRegression(env, features, label, weights, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity, advancedSettings); - } - - } -} diff --git a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsPredictorBase.cs b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsPredictorBase.cs index f17e617e29..0d12aee904 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsPredictorBase.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsPredictorBase.cs @@ -329,7 +329,7 @@ protected virtual VBuffer InitializeWeightsSgd(IChannel ch, FloatLabelCur (in VBuffer x, ref VBuffer grad) => { // Zero out the gradient by sparsifying. - grad = new VBuffer(grad.Length, 0, grad.Values, grad.Indices); + VBufferUtils.Resize(ref grad, grad.Length, 0); EnsureBiases(ref grad); if (cursor == null || !cursor.MoveNext()) @@ -378,7 +378,7 @@ protected virtual void PreTrainingProcessInstance(float label, in VBuffer /// /// The basic training calls the optimizer /// - protected override TModel TrainModelCore(TrainContext context) + private protected override TModel TrainModelCore(TrainContext context) { Contracts.CheckValue(context, nameof(context)); Host.CheckParam(context.InitialPredictor == null || context.InitialPredictor is TModel, nameof(context.InitialPredictor)); @@ -447,7 +447,7 @@ protected virtual void TrainCore(IChannel ch, RoleMappedData data) { // REVIEW: maybe it makes sense for the factory to capture the good row count after // the first successful cursoring? - Double totalCount = data.Data.GetRowCount(true) ?? Double.NaN; + Double totalCount = data.Data.GetRowCount() ?? Double.NaN; long exCount = 0; pch.SetHeader(new ProgressHeader(null, new[] { "examples" }), @@ -595,11 +595,15 @@ protected virtual float DifferentiableFunction(in VBuffer x, ref VBuffer< Contracts.AssertValueOrNull(progress); float scaleFactor = 1 / (float)WeightSum; - VBuffer xDense = default(VBuffer); + VBuffer xDense = default; if (x.IsDense) xDense = x; else - x.CopyToDense(ref xDense); + { + VBuffer xDenseTemp = default; + x.CopyToDense(ref xDenseTemp); + xDense = xDenseTemp; + } IProgressChannel pch = progress != null ? progress.StartProgressChannel("Gradient") : null; float loss; @@ -613,7 +617,7 @@ protected virtual float DifferentiableFunction(in VBuffer x, ref VBuffer< if (L2Weight > 0) { Contracts.Assert(xDense.IsDense); - var values = xDense.Values; + var values = xDense.GetValues(); Double r = 0; for (int i = BiasCount; i < values.Length; i++) { diff --git a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsStatic.cs b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsStatic.cs index 75056d6f20..08bef182cc 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsStatic.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsStatic.cs @@ -55,7 +55,7 @@ public static (Scalar score, Scalar probability, Scalar pred var rec = new TrainerEstimatorReconciler.BinaryClassifier( (env, labelName, featuresName, weightsName) => { - var trainer = new LogisticRegression(env, featuresName, labelName, weightsName, + var trainer = new LogisticRegression(env, labelName, featuresName, weightsName, l1Weight, l2Weight, optimizationTolerance, memorySize, enoforceNoNegativity, advancedSettings); if (onFit != null) @@ -110,7 +110,7 @@ public static Scalar PoissonRegression(this RegressionContext.RegressionT var rec = new TrainerEstimatorReconciler.Regression( (env, labelName, featuresName, weightsName) => { - var trainer = new PoissonRegression(env, featuresName, labelName, weightsName, + var trainer = new PoissonRegression(env, labelName, featuresName, weightsName, l1Weight, l2Weight, optimizationTolerance, memorySize, enoforceNoNegativity); if (onFit != null) @@ -166,7 +166,7 @@ public static (Vector score, Key predictedLabel) var rec = new TrainerEstimatorReconciler.MulticlassClassifier( (env, labelName, featuresName, weightsName) => { - var trainer = new MulticlassLogisticRegression(env, featuresName, labelName, weightsName, + var trainer = new MulticlassLogisticRegression(env, labelName, featuresName, weightsName, l1Weight, l2Weight, optimizationTolerance, memorySize, enoforceNoNegativity); if (onFit != null) diff --git a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LogisticRegression.cs b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LogisticRegression.cs index 2db21d6320..4507b1e5d3 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LogisticRegression.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LogisticRegression.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using MathNet.Numerics.LinearAlgebra; using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; @@ -40,11 +41,27 @@ public sealed partial class LogisticRegression : LbfgsTrainerBase + /// If set to truetraining statistics will be generated at the end of training. + /// If you have a large number of learned training parameters(more than 500), + /// generating the training statistics might take a few seconds. + /// More than 1000 weights might take a few minutes. For those cases consider using the instance of + /// present in the Microsoft.ML.HalLearners package. That computes the statistics using hardware acceleration. + /// [Argument(ArgumentType.AtMostOnce, HelpText = "Show statistics of training examples.", ShortName = "stat", SortOrder = 50)] public bool ShowTrainingStats = false; + + /// + /// The instance of that computes the training statistics at the end of training. + /// If you have a large number of learned training parameters(more than 500), + /// generating the training statistics might take a few seconds. + /// More than 1000 weights might take a few minutes. For those cases consider using the instance of + /// present in the Microsoft.ML.HalLearners package. That computes the statistics using hardware acceleration. + /// + public ComputeLRTrainingStd StdComputer; } - private Double _posWeight; + private double _posWeight; private LinearModelStatistics _stats; /// @@ -53,7 +70,7 @@ public sealed class Arguments : ArgumentsBase /// The environment to use. /// The name of the label column. /// The name of the feature column. - /// The name for the example weight column. + /// The name for the example weight column. /// Enforce non-negative weights. /// Weight of L1 regularizer term. /// Weight of L2 regularizer term. @@ -61,16 +78,16 @@ public sealed class Arguments : ArgumentsBase /// Threshold for optimizer convergence. /// A delegate to apply all the advanced arguments to the algorithm. public LogisticRegression(IHostEnvironment env, - string featureColumn, - string labelColumn, - string weightColumn = null, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, float l1Weight = Arguments.Defaults.L1Weight, float l2Weight = Arguments.Defaults.L2Weight, float optimizationTolerance = Arguments.Defaults.OptTol, int memorySize = Arguments.Defaults.MemorySize, bool enforceNoNegativity = Arguments.Defaults.EnforceNonNegativity, Action advancedSettings = null) - : base(env, featureColumn, TrainerUtils.MakeBoolScalarLabel(labelColumn), weightColumn, advancedSettings, + : base(env, featureColumn, TrainerUtils.MakeBoolScalarLabel(labelColumn), weights, advancedSettings, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity) { Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); @@ -78,6 +95,9 @@ public LogisticRegression(IHostEnvironment env, _posWeight = 0; ShowTrainingStats = Args.ShowTrainingStats; + + if (ShowTrainingStats && Args.StdComputer == null) + Args.StdComputer = new ComputeLRTrainingStdImpl(); } /// @@ -88,6 +108,9 @@ internal LogisticRegression(IHostEnvironment env, Arguments args) { _posWeight = 0; ShowTrainingStats = Args.ShowTrainingStats; + + if (ShowTrainingStats && Args.StdComputer == null) + Args.StdComputer = new ComputeLRTrainingStdImpl(); } public override PredictionKind PredictionKind => PredictionKind.BinaryClassification; @@ -134,8 +157,9 @@ protected override float AccumulateOneGradient(in VBuffer feat, float lab VectorUtils.AddMultWithOffset(in feat, mult, ref grad, 1); // Note that 0th L-BFGS weight is for bias. // Add bias using this strange trick that has advantage of working well for dense and sparse arrays. // Due to the call to EnsureBiases, we know this region is dense. - Contracts.Assert(grad.Count >= BiasCount && (grad.IsDense || grad.Indices[BiasCount - 1] == BiasCount - 1)); - grad.Values[0] += mult; + var editor = VBufferEditor.CreateFromBuffer(ref grad); + Contracts.Assert(editor.Values.Length >= BiasCount && (grad.IsDense || editor.Indices[BiasCount - 1] == BiasCount - 1)); + editor.Values[0] += mult; return weight * datumLoss; } @@ -155,12 +179,13 @@ protected override void ComputeTrainingStatistics(IChannel ch, FloatLabelCursor. // Compute deviance: start with loss function. float deviance = (float)(2 * loss * WeightSum); + var currentWeightsValues = CurrentWeights.GetValues(); if (L2Weight > 0) { // Need to subtract L2 regularization loss. // The bias term is not regularized. - var regLoss = VectorUtils.NormSquared(CurrentWeights.Values, 1, CurrentWeights.Length - 1) * L2Weight; + var regLoss = VectorUtils.NormSquared(currentWeightsValues.Slice(1)) * L2Weight; deviance -= regLoss; } @@ -212,9 +237,9 @@ protected override void ComputeTrainingStatistics(IChannel ch, FloatLabelCursor. weightIndices[0] = 0; weightIndicesInvMap[0] = 0; int j = 1; - for (int i = 1; i < CurrentWeights.Length; i++) + for (int i = 1; i < currentWeightsValues.Length; i++) { - if (CurrentWeights.Values[i] != 0) + if (currentWeightsValues[i] != 0) { weightIndices[j] = i; weightIndicesInvMap[i] = j++; @@ -261,7 +286,7 @@ protected override void ComputeTrainingStatistics(IChannel ch, FloatLabelCursor. } // Initialize the remaining entries. - var bias = CurrentWeights.Values[0]; + var bias = currentWeightsValues[0]; using (var cursor = cursorFactory.Create()) { while (cursor.MoveNext()) @@ -275,7 +300,7 @@ protected override void ComputeTrainingStatistics(IChannel ch, FloatLabelCursor. // Increment the first entry of hessian. hessian[0] += variance; - var values = cursor.Features.Values; + var values = cursor.Features.GetValues(); if (cursor.Features.IsDense) { int ioff = 1; @@ -301,8 +326,8 @@ protected override void ComputeTrainingStatistics(IChannel ch, FloatLabelCursor. } else { - var indices = cursor.Features.Indices; - for (int ii = 0; ii < cursor.Features.Count; ++ii) + var indices = cursor.Features.GetIndices(); + for (int ii = 0; ii < values.Length; ++ii) { int i = indices[ii]; int wi = i + 1; @@ -330,7 +355,13 @@ protected override void ComputeTrainingStatistics(IChannel ch, FloatLabelCursor. } } - _stats = new LinearModelStatistics(Host, NumGoodRows, numParams, deviance, nullDeviance); + if (Args.StdComputer == null) + _stats = new LinearModelStatistics(Host, NumGoodRows, numParams, deviance, nullDeviance); + else + { + var std = Args.StdComputer.ComputeStd(hessian, weightIndices, numParams, CurrentWeights.Length, ch, L2Weight); + _stats = new LinearModelStatistics(Host, NumGoodRows, numParams, deviance, nullDeviance, std); + } } protected override void ProcessPriorDistribution(float label, float weight) @@ -397,4 +428,125 @@ public static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnvironm () => LearnerEntryPointsUtils.FindColumn(host, input.TrainingData.Schema, input.WeightColumn)); } } + + /// + /// Computes the standard deviation matrix of each of the non-zero training weights, needed to calculate further the standard deviation, + /// p-value and z-Score. + /// If you need fast calculations, use the implementation in the Microsoft.ML.HALLearners package, + /// which makes use of hardware acceleration. + /// Due to the existence of regularization, an approximation is used to compute the variances of the trained linear coefficients. + /// + public abstract class ComputeLRTrainingStd + { + /// + /// Computes the standard deviation matrix of each of the non-zero training weights, needed to calculate further the standard deviation, + /// p-value and z-Score. + /// If you need fast calculations, use the ComputeStd method from the Microsoft.ML.HALLearners package, which makes use of hardware acceleration. + /// Due to the existence of regularization, an approximation is used to compute the variances of the trained linear coefficients. + /// + public abstract VBuffer ComputeStd(double[] hessian, int[] weightIndices, int parametersCount, int currentWeightsCount, IChannel ch, float l2Weight); + + /// + /// Adjust the variance for regularized cases. + /// + [BestFriend] + internal void AdjustVariance(float inverseEntry, int iRow, int iCol, float l2Weight, float[] stdErrorValues2) + { + var adjustment = l2Weight * inverseEntry * inverseEntry; + stdErrorValues2[iRow] -= adjustment; + + if (0 < iCol && iCol < iRow) + stdErrorValues2[iCol] -= adjustment; + } + } + + /// + /// Extends the implementing making use of Math.Net numeric + /// If you need faster calculations(have non-sparse weight vectors of more than 300 features), use the instance of ComputeLRTrainingStd from the Microsoft.ML.HALLearners package, which makes use of hardware acceleration + /// for those computations. + /// + public sealed class ComputeLRTrainingStdImpl : ComputeLRTrainingStd + { + /// + /// Computes the standard deviation matrix of each of the non-zero training weights, needed to calculate further the standard deviation, + /// p-value and z-Score. + /// If you need faster calculations, use the ComputeStd method from the Microsoft.ML.HALLearners package, which makes use of hardware acceleration. + /// Due to the existence of regularization, an approximation is used to compute the variances of the trained linear coefficients. + /// + /// + /// + /// + /// + /// The used for messaging. + /// The L2Weight used for training. (Supply the same one that got used during training.) + public override VBuffer ComputeStd(double[] hessian, int[] weightIndices, int numSelectedParams, int currentWeightsCount, IChannel ch, float l2Weight) + { + Contracts.AssertValue(ch); + Contracts.AssertValue(hessian, nameof(hessian)); + Contracts.Assert(numSelectedParams > 0); + Contracts.Assert(currentWeightsCount > 0); + Contracts.Assert(l2Weight > 0); + + double[,] matrixHessian = new double[numSelectedParams, numSelectedParams]; + + int hessianLength = 0; + int dimension = numSelectedParams - 1; + + for (int row = dimension; row >= 0; row--) + { + for (int col = 0; col <= dimension; col++) + { + if ((row + col) <= dimension) + { + if ((row + col) == dimension) + { + matrixHessian[row, col] = hessian[hessianLength]; + } + else + { + matrixHessian[row, col] = hessian[hessianLength]; + matrixHessian[dimension - col, dimension - row] = hessian[hessianLength]; + } + hessianLength++; + } + else + continue; + } + } + + var h = Matrix.Build.DenseOfArray(matrixHessian); + var invers = h.Inverse(); + + float[] stdErrorValues = new float[numSelectedParams]; + stdErrorValues[0] = (float)Math.Sqrt(invers[0, numSelectedParams - 1]); + + for (int i = 1; i < numSelectedParams; i++) + { + // Initialize with inverse Hessian. + // The diagonal of the inverse Hessian. + stdErrorValues[i] = (float)invers[i, numSelectedParams - i - 1]; + } + + if (l2Weight > 0) + { + // Iterate through all entries of inverse Hessian to make adjustment to variance. + // A discussion on ridge regularized LR coefficient covariance matrix can be found here: + // http://www.aloki.hu/pdf/0402_171179.pdf (Equations 11 and 25) + // http://www.inf.unibz.it/dis/teaching/DWDM/project2010/LogisticRegression.pdf (Section "Significance testing in ridge logistic regression") + for (int iRow = 1; iRow < numSelectedParams; iRow++) + { + for (int iCol = 0; iCol <= iRow; iCol++) + { + float entry = (float)invers[iRow, numSelectedParams - iCol - 1]; + AdjustVariance(entry, iRow, iCol, l2Weight, stdErrorValues); + } + } + } + + for (int i = 1; i < numSelectedParams; i++) + stdErrorValues[i] = (float)Math.Sqrt(stdErrorValues[i]); + + return new VBuffer(currentWeightsCount, numSelectedParams, stdErrorValues, weightIndices); + } + } } diff --git a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/MulticlassLogisticRegression.cs b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/MulticlassLogisticRegression.cs index 4a6a9e4413..0ba1a7ca8a 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/MulticlassLogisticRegression.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/MulticlassLogisticRegression.cs @@ -76,22 +76,24 @@ public sealed class Arguments : ArgumentsBase /// The environment to use. /// The name of the label column. /// The name of the feature column. - /// The name for the example weight column. + /// The name for the example weight column. /// Enforce non-negative weights. /// Weight of L1 regularizer term. /// Weight of L2 regularizer term. /// Memory size for . Lower=faster, less accurate. /// Threshold for optimizer convergence. /// A delegate to apply all the advanced arguments to the algorithm. - public MulticlassLogisticRegression(IHostEnvironment env, string featureColumn, string labelColumn, - string weightColumn = null, + public MulticlassLogisticRegression(IHostEnvironment env, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, float l1Weight = Arguments.Defaults.L1Weight, float l2Weight = Arguments.Defaults.L2Weight, float optimizationTolerance = Arguments.Defaults.OptTol, int memorySize = Arguments.Defaults.MemorySize, bool enforceNoNegativity = Arguments.Defaults.EnforceNonNegativity, Action advancedSettings = null) - : base(env, featureColumn, TrainerUtils.MakeU4ScalarColumn(labelColumn), weightColumn, advancedSettings, + : base(env, featureColumn, TrainerUtils.MakeU4ScalarColumn(labelColumn), weights, advancedSettings, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity) { Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); @@ -148,7 +150,7 @@ protected override void CheckLabel(RoleMappedData data) } _labelNames = new string[_numClasses]; - ReadOnlyMemory[] values = labelNames.Values; + ReadOnlySpan> values = labelNames.GetValues(); // This hashset is used to verify the uniqueness of label names. HashSet labelNamesSet = new HashSet(); @@ -202,7 +204,7 @@ protected override float AccumulateOneGradient(in VBuffer feat, float lab scores[c] = bias + VectorUtils.DotProductWithOffset(in x, start, in feat); } - float logZ = MathUtils.SoftMax(scores, _numClasses); + float logZ = MathUtils.SoftMax(scores.AsSpan(0, _numClasses)); float datumLoss = logZ; int lab = (int)label; @@ -216,8 +218,9 @@ protected override float AccumulateOneGradient(in VBuffer feat, float lab float mult = weight * (modelProb - probLabel); VectorUtils.AddMultWithOffset(in feat, mult, ref grad, start); // Due to the call to EnsureBiases, we know this region is dense. - Contracts.Assert(grad.Count >= BiasCount && (grad.IsDense || grad.Indices[BiasCount - 1] == BiasCount - 1)); - grad.Values[c] += mult; + var editor = VBufferEditor.CreateFromBuffer(ref grad); + Contracts.Assert(editor.Values.Length >= BiasCount && (grad.IsDense || editor.Indices[BiasCount - 1] == BiasCount - 1)); + editor.Values[c] += mult; } Contracts.Check(FloatUtils.IsFinite(datumLoss), "Data contain bad values."); @@ -270,7 +273,7 @@ protected override void ComputeTrainingStatistics(IChannel ch, FloatLabelCursor. { // Need to subtract L2 regularization loss. // The bias term is not regularized. - var regLoss = VectorUtils.NormSquared(CurrentWeights.Values, BiasCount, CurrentWeights.Length - BiasCount) * L2Weight; + var regLoss = VectorUtils.NormSquared(CurrentWeights.GetValues().Slice(BiasCount)) * L2Weight; deviance -= regLoss; } @@ -392,8 +395,8 @@ private static VersionInfo GetVersionInfo() public override PredictionKind PredictionKind => PredictionKind.MultiClassClassification; public ColumnType InputType { get; } public ColumnType OutputType { get; } - public bool CanSavePfa => true; - public bool CanSaveOnnx(OnnxContext ctx) => true; + bool ICanSavePfa.CanSavePfa => true; + bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => true; internal MulticlassLogisticRegressionPredictor(IHostEnvironment env, in VBuffer weights, int numClasses, int numFeatures, string[] labelNames, LinearModelStatistics stats = null) : base(env, RegistrationName) @@ -552,17 +555,7 @@ private MulticlassLogisticRegressionPredictor(IHostEnvironment env, ModelLoadCon if (ctx.TryLoadBinaryStream(LabelNamesSubModelFilename, r => labelNames = LoadLabelNames(ctx, r))) _labelNames = labelNames; - string statsDir = Path.Combine(ctx.Directory ?? "", ModelStatsSubModelFilename); - using (var statsEntry = ctx.Repository.OpenEntryOrNull(statsDir, ModelLoadContext.ModelStreamName)) - { - if (statsEntry == null) - _stats = null; - else - { - using (var statsCtx = new ModelLoadContext(ctx.Repository, statsEntry, statsDir)) - _stats = LinearModelStatistics.Create(Host, statsCtx); - } - } + ctx.LoadModelOrNull< LinearModelStatistics, SignatureLoadModel>(Host, out _stats, ModelStatsSubModelFilename); } public static MulticlassLogisticRegressionPredictor Create(IHostEnvironment env, ModelLoadContext ctx) @@ -644,11 +637,12 @@ protected override void SaveCore(ModelSaveContext ctx) int count = 0; foreach (var fw in _weights) { + var fwValues = fw.GetValues(); if (fw.IsDense) { - for (int i = 0; i < fw.Length; i++) + for (int i = 0; i < fwValues.Length; i++) { - if (fw.Values[i] != 0) + if (fwValues[i] != 0) { ctx.Writer.Write(i); count++; @@ -671,21 +665,22 @@ protected override void SaveCore(ModelSaveContext ctx) int count = 0; foreach (var fw in _weights) { + var fwValues = fw.GetValues(); if (fw.IsDense) { - for (int i = 0; i < fw.Length; i++) + for (int i = 0; i < fwValues.Length; i++) { - if (fw.Values[i] != 0) + if (fwValues[i] != 0) { - ctx.Writer.Write(fw.Values[i]); + ctx.Writer.Write(fwValues[i]); count++; } } } else { - ctx.Writer.WriteSinglesNoCount(fw.GetValues()); - count += fw.Count; + ctx.Writer.WriteSinglesNoCount(fwValues); + count += fwValues.Length; } } Host.Assert(count == numIndices); @@ -698,35 +693,18 @@ protected override void SaveCore(ModelSaveContext ctx) Contracts.AssertValueOrNull(_stats); if (_stats != null) - { - using (var statsCtx = new ModelSaveContext(ctx.Repository, - Path.Combine(ctx.Directory ?? "", ModelStatsSubModelFilename), ModelLoadContext.ModelStreamName)) - { - _stats.Save(statsCtx); - statsCtx.Done(); - } - } + ctx.SaveModel(_stats, ModelStatsSubModelFilename); } // REVIEW: Destroy. private static int NonZeroCount(in VBuffer vector) { int count = 0; - if (!vector.IsDense) + var values = vector.GetValues(); + for (int i = 0; i < values.Length; i++) { - for (int i = 0; i < vector.Count; i++) - { - if (vector.Values[i] != 0) - count++; - } - } - else - { - for (int i = 0; i < vector.Length; i++) - { - if (vector.Values[i] != 0) - count++; - } + if (values[i] != 0) + count++; } return count; } @@ -741,27 +719,24 @@ public ValueMapper GetMapper() { Host.Check(src.Length == _numFeatures); - var values = dst.Values; - PredictCore(in src, ref values); - dst = new VBuffer(_numClasses, values, dst.Indices); + PredictCore(in src, ref dst); }; return (ValueMapper)(Delegate)del; } - private void PredictCore(in VBuffer src, ref float[] dst) + private void PredictCore(in VBuffer src, ref VBuffer dst) { Host.Check(src.Length == _numFeatures, "src length should equal the number of features"); var weights = _weights; if (!src.IsDense) weights = DensifyWeights(); - if (Utils.Size(dst) < _numClasses) - dst = new float[_numClasses]; - + var editor = VBufferEditor.Create(ref dst, _numClasses); for (int i = 0; i < _biases.Length; i++) - dst[i] = _biases[i] + VectorUtils.DotProduct(in weights[i], in src); + editor.Values[i] = _biases[i] + VectorUtils.DotProduct(in weights[i], in src); - Calibrate(dst); + Calibrate(editor.Values); + dst = editor.Commit(); } private VBuffer[] DensifyWeights() @@ -791,13 +766,13 @@ private VBuffer[] DensifyWeights() return _weightsDense; } - private void Calibrate(float[] dst) + private void Calibrate(Span dst) { - Host.Assert(Utils.Size(dst) >= _numClasses); + Host.Assert(dst.Length >= _numClasses); // scores are in log-space; convert and fix underflow/overflow // TODO: re-normalize probabilities to account for underflow/overflow? - float softmax = MathUtils.SoftMax(dst, _numClasses); + float softmax = MathUtils.SoftMax(dst.Slice(0, _numClasses)); for (int i = 0; i < _numClasses; ++i) dst[i] = MathUtils.ExpSlow(dst[i] - softmax); } @@ -874,7 +849,7 @@ public void SaveAsCode(TextWriter writer, RoleMappedSchema schema) "score[" + i.ToString() + "]"); } - writer.WriteLine(string.Format("var softmax = MathUtils.SoftMax(scores, {0});", _numClasses)); + writer.WriteLine(string.Format("var softmax = MathUtils.SoftMax(scores.AsSpan(0, {0}));", _numClasses)); for (int c = 0; c < _biases.Length; c++) writer.WriteLine("output[{0}] = Math.Exp(scores[{0}] - softmax);", c); } @@ -884,7 +859,7 @@ public void SaveSummary(TextWriter writer, RoleMappedSchema schema) SaveAsText(writer, schema); } - public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) + JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckValue(input, nameof(input)); @@ -911,7 +886,7 @@ public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) return PfaUtils.Call("m.link.softmax", PfaUtils.Call("model.reg.linear", input, cellRef)); } - public bool SaveAsOnnx(OnnxContext ctx, string[] outputs, string featureColumn) + bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputs, string featureColumn) { Host.CheckValue(ctx, nameof(ctx)); diff --git a/src/Microsoft.ML.StandardLearners/Standard/ModelStatistics.cs b/src/Microsoft.ML.StandardLearners/Standard/ModelStatistics.cs index bd69453d5a..e71cb85257 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/ModelStatistics.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/ModelStatistics.cs @@ -2,17 +2,16 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.IO; -using System.Linq; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Internal.CpuMath; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Learners; using Microsoft.ML.Runtime.Model; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; // This is for deserialization from a model repository. [assembly: LoadableClass(typeof(LinearModelStatistics), null, typeof(SignatureLoadModel), @@ -84,13 +83,13 @@ private static VersionInfo GetVersionInfo() // of the variance-covariance matrix. private readonly VBuffer? _coeffStdError; - public long TrainingExampleCount { get { return _trainingExampleCount; } } + public long TrainingExampleCount => _trainingExampleCount; - public Single Deviance { get { return _deviance; } } + public Single Deviance => _deviance; - public Single NullDeviance { get { return _nullDeviance; } } + public Single NullDeviance => _nullDeviance; - public int ParametersCount { get { return _paramCount; } } + public int ParametersCount => _paramCount; internal LinearModelStatistics(IHostEnvironment env, long trainingExampleCount, int paramCount, Single deviance, Single nullDeviance) { @@ -107,11 +106,11 @@ internal LinearModelStatistics(IHostEnvironment env, long trainingExampleCount, internal LinearModelStatistics(IHostEnvironment env, long trainingExampleCount, int paramCount, Single deviance, Single nullDeviance, in VBuffer coeffStdError) : this(env, trainingExampleCount, paramCount, deviance, nullDeviance) { - _env.Assert(coeffStdError.Count == _paramCount); + _env.Assert(coeffStdError.GetValues().Length == _paramCount); _coeffStdError = coeffStdError; } - public LinearModelStatistics(IHostEnvironment env, ModelLoadContext ctx) + internal LinearModelStatistics(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); _env = env; @@ -157,7 +156,7 @@ public LinearModelStatistics(IHostEnvironment env, ModelLoadContext ctx) _coeffStdError = new VBuffer(length, _paramCount, stdErrorValues, stdErrorIndices); } - public static LinearModelStatistics Create(IHostEnvironment env, ModelLoadContext ctx) + internal static LinearModelStatistics Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(ctx, nameof(ctx)); @@ -209,6 +208,9 @@ private void SaveCore(ModelSaveContext ctx) ctx.Writer.WriteIntsNoCount(_coeffStdError.Value.GetIndices()); } + /// + /// Computes the standart deviation, Z-Score and p-Value. + /// public static bool TryGetBiasStatistics(LinearModelStatistics stats, Single bias, out Single stdError, out Single zScore, out Single pValue) { if (!stats._coeffStdError.HasValue) @@ -220,10 +222,10 @@ public static bool TryGetBiasStatistics(LinearModelStatistics stats, Single bias } const Double sqrt2 = 1.41421356237; // Math.Sqrt(2); - stdError = stats._coeffStdError.Value.Values[0]; + stdError = stats._coeffStdError.Value.GetValues()[0]; Contracts.Assert(stdError == stats._coeffStdError.Value.GetItemOrDefault(0)); zScore = bias / stdError; - pValue = 1 - (Single)ProbabilityFunctions.Erf(Math.Abs(zScore / sqrt2)); + pValue = 1.0f - (Single)ProbabilityFunctions.Erf(Math.Abs(zScore / sqrt2)); return true; } @@ -238,61 +240,55 @@ private static void GetUnorderedCoefficientStatistics(LinearModelStatistics stat Contracts.Assert(stats._coeffStdError.Value.Length == weights.Length + 1); - var estimateValues = estimate.Values; - if (Utils.Size(estimateValues) < stats.ParametersCount - 1) - estimateValues = new Single[stats.ParametersCount - 1]; - var stdErrorValues = stdErr.Values; - if (Utils.Size(stdErrorValues) < stats.ParametersCount - 1) - stdErrorValues = new Single[stats.ParametersCount - 1]; - var zScoreValues = zScore.Values; - if (Utils.Size(zScoreValues) < stats.ParametersCount - 1) - zScoreValues = new Single[stats.ParametersCount - 1]; - var pValueValues = pValue.Values; - if (Utils.Size(pValueValues) < stats.ParametersCount - 1) - pValueValues = new Single[stats.ParametersCount - 1]; + var statisticsCount = stats.ParametersCount - 1; + + var estimateEditor = VBufferEditor.Create(ref estimate, statisticsCount); + var stdErrorEditor = VBufferEditor.Create(ref stdErr, statisticsCount); + var zScoreEditor = VBufferEditor.Create(ref zScore, statisticsCount); + var pValueEditor = VBufferEditor.Create(ref pValue, statisticsCount); const Double sqrt2 = 1.41421356237; // Math.Sqrt(2); bool denseStdError = stats._coeffStdError.Value.IsDense; - int[] stdErrorIndices = stats._coeffStdError.Value.Indices; + ReadOnlySpan stdErrorIndices = stats._coeffStdError.Value.GetIndices(); + ReadOnlySpan coeffStdErrorValues = stats._coeffStdError.Value.GetValues(); for (int i = 1; i < stats.ParametersCount; i++) { int wi = denseStdError ? i - 1 : stdErrorIndices[i] - 1; Contracts.Assert(0 <= wi && wi < weights.Length); - var weight = estimateValues[i - 1] = weights.GetItemOrDefault(wi); - var stdError = stdErrorValues[wi] = stats._coeffStdError.Value.Values[i]; - zScoreValues[i - 1] = weight / stdError; - pValueValues[i - 1] = 1 - (Single)ProbabilityFunctions.Erf(Math.Abs(zScoreValues[i - 1] / sqrt2)); + var weight = estimateEditor.Values[i - 1] = weights.GetItemOrDefault(wi); + var stdError = stdErrorEditor.Values[wi] = coeffStdErrorValues[i]; + zScoreEditor.Values[i - 1] = weight / stdError; + pValueEditor.Values[i - 1] = 1 - (Single)ProbabilityFunctions.Erf(Math.Abs(zScoreEditor.Values[i - 1] / sqrt2)); } - estimate = new VBuffer(stats.ParametersCount - 1, estimateValues, estimate.Indices); - stdErr = new VBuffer(stats.ParametersCount - 1, stdErrorValues, stdErr.Indices); - zScore = new VBuffer(stats.ParametersCount - 1, zScoreValues, zScore.Indices); - pValue = new VBuffer(stats.ParametersCount - 1, pValueValues, pValue.Indices); + estimate = estimateEditor.Commit(); + stdErr = stdErrorEditor.Commit(); + zScore = zScoreEditor.Commit(); + pValue = pValueEditor.Commit(); var slotNames = names; getSlotNames = (ref VBuffer> dst) => { - var values = dst.Values; - if (Utils.Size(values) < stats.ParametersCount - 1) - values = new ReadOnlyMemory[stats.ParametersCount - 1]; - for (int i = 1; i < stats.ParametersCount; i++) + var editor = VBufferEditor.Create(ref dst, statisticsCount); + ReadOnlySpan stdErrorIndices2 = stats._coeffStdError.Value.GetIndices(); + for (int i = 1; i <= statisticsCount; i++) { - int wi = denseStdError ? i - 1 : stdErrorIndices[i] - 1; - values[i - 1] = slotNames.GetItemOrDefault(wi); + int wi = denseStdError ? i - 1 : stdErrorIndices2[i] - 1; + editor.Values[i - 1] = slotNames.GetItemOrDefault(wi); } - dst = new VBuffer>(stats.ParametersCount - 1, values, dst.Indices); + dst = editor.Commit(); }; } - private IEnumerable GetUnorderedCoefficientStatistics(LinearBinaryPredictor parent, RoleMappedSchema schema) + private List GetUnorderedCoefficientStatistics(LinearBinaryPredictor parent, RoleMappedSchema schema) { Contracts.AssertValue(_env); _env.CheckValue(parent, nameof(parent)); if (!_coeffStdError.HasValue) - yield break; + return new List(); var weights = parent.Weights2 as IReadOnlyList; _env.Assert(_paramCount == 1 || weights != null); @@ -301,11 +297,12 @@ private IEnumerable GetUnorderedCoefficientStatistics(Lin var names = default(VBuffer>); MetadataUtils.GetSlotNames(schema, RoleMappedSchema.ColumnRole.Feature, weights.Count, ref names); - Single[] stdErrorValues = _coeffStdError.Value.Values; + ReadOnlySpan stdErrorValues = _coeffStdError.Value.GetValues(); const Double sqrt2 = 1.41421356237; // Math.Sqrt(2); + List result = new List(_paramCount - 1); bool denseStdError = _coeffStdError.Value.IsDense; - int[] stdErrorIndices = _coeffStdError.Value.Indices; + ReadOnlySpan stdErrorIndices = _coeffStdError.Value.GetIndices(); Single[] zScores = new Single[_paramCount - 1]; for (int i = 1; i < _paramCount; i++) { @@ -318,8 +315,9 @@ private IEnumerable GetUnorderedCoefficientStatistics(Lin var stdError = stdErrorValues[i]; var zScore = zScores[i - 1] = weight / stdError; var pValue = 1 - (Single)ProbabilityFunctions.Erf(Math.Abs(zScore / sqrt2)); - yield return new CoefficientStatistics(name, weight, stdError, zScore, pValue); + result.Add(new CoefficientStatistics(name, weight, stdError, zScore, pValue)); } + return result; } /// diff --git a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MetaMulticlassTrainer.cs b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MetaMulticlassTrainer.cs index 286fad1063..def476c661 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MetaMulticlassTrainer.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MetaMulticlassTrainer.cs @@ -45,8 +45,7 @@ public abstract class ArgumentsBase protected readonly ArgumentsBase Args; protected readonly IHost Host; protected readonly ICalibratorTrainer Calibrator; - - private TScalarTrainer _trainer; + protected readonly TScalarTrainer Trainer; public PredictionKind PredictionKind => PredictionKind.MultiClassClassification; @@ -54,8 +53,6 @@ public abstract class ArgumentsBase public TrainerInfo Info { get; } - public TScalarTrainer PredictorType; - /// /// Initializes the from the Arguments class. /// @@ -75,17 +72,15 @@ internal MetaMulticlassTrainer(IHostEnvironment env, ArgumentsBase args, string if (labelColumn != null) LabelColumn = new SchemaShape.Column(labelColumn, SchemaShape.Column.VectorKind.Scalar, NumberType.U4, true); - // Create the first trainer so errors in the args surface early. - _trainer = singleEstimator ?? CreateTrainer(); + Trainer = singleEstimator ?? CreateTrainer(); Calibrator = calibrator ?? new PlattCalibratorTrainer(env); - if (args.Calibrator != null) Calibrator = args.Calibrator.CreateComponent(Host); // Regarding caching, no matter what the internal predictor, we're performing many passes // simply by virtue of this being a meta-trainer, so we will still cache. - Info = new TrainerInfo(normalization: _trainer.Info.NeedNormalization); + Info = new TrainerInfo(normalization: Trainer.Info.NeedNormalization); } private TScalarTrainer CreateTrainer() @@ -119,15 +114,6 @@ protected IDataView MapLabelsCore(ColumnType type, InPredicate equalsTarge dst = equalsTarget(in src) ? 1 : default(float)); } - protected TScalarTrainer GetTrainer() - { - // We may have instantiated the first trainer to use already, from the constructor. - // If so capture it and set the retained trainer to null; otherwise create a new one. - var train = _trainer ?? CreateTrainer(); - _trainer = null; - return train; - } - protected abstract TModel TrainCore(IChannel ch, RoleMappedData data, int count); /// @@ -135,7 +121,7 @@ protected TScalarTrainer GetTrainer() /// /// The trainig context for this learner. /// The trained model. - public TModel Train(TrainContext context) + TModel ITrainer.Train(TrainContext context) { Host.CheckValue(context, nameof(context)); var data = context.TrainingSet; @@ -216,7 +202,7 @@ private SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) return cols; } - IPredictor ITrainer.Train(TrainContext context) => Train(context); + IPredictor ITrainer.Train(TrainContext context) => ((ITrainer)this).Train(context); /// /// Fits the data to the trainer. diff --git a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MultiClassNaiveBayesTrainer.cs b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MultiClassNaiveBayesTrainer.cs index 64ef2baf3d..ce6b0566f0 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MultiClassNaiveBayesTrainer.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MultiClassNaiveBayesTrainer.cs @@ -50,7 +50,9 @@ public sealed class Arguments : LearnerInputBaseWithLabel /// The environment to use. /// The name of the label column. /// The name of the feature column. - public MultiClassNaiveBayesTrainer(IHostEnvironment env, string featureColumn, string labelColumn) + public MultiClassNaiveBayesTrainer(IHostEnvironment env, + string featureColumn = DefaultColumnNames.Features, + string labelColumn = DefaultColumnNames.Label) : base(Contracts.CheckRef(env, nameof(env)).Register(LoadName), TrainerUtils.MakeR4VecFeature(featureColumn), TrainerUtils.MakeU4ScalarColumn(labelColumn)) { @@ -89,7 +91,7 @@ protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSc protected override MulticlassPredictionTransformer MakeTransformer(MultiClassNaiveBayesPredictor model, Schema trainSchema) => new MulticlassPredictionTransformer(Host, model, trainSchema, FeatureColumn.Name, LabelColumn.Name); - protected override MultiClassNaiveBayesPredictor TrainModelCore(TrainContext context) + private protected override MultiClassNaiveBayesPredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var data = context.TrainingSet; @@ -131,20 +133,22 @@ protected override MultiClassNaiveBayesPredictor TrainModelCore(TrainContext con labelHistogram[cursor.Label] += 1; labelCount = labelCount < size ? size : labelCount; + var featureValues = cursor.Features.GetValues(); if (cursor.Features.IsDense) { - for (int i = 0; i < cursor.Features.Count; i += 1) + for (int i = 0; i < featureValues.Length; i += 1) { - if (cursor.Features.Values[i] > 0) + if (featureValues[i] > 0) featureHistogram[cursor.Label][i] += 1; } } else { - for (int i = 0; i < cursor.Features.Count; i += 1) + var featureIndices = cursor.Features.GetIndices(); + for (int i = 0; i < featureValues.Length; i += 1) { - if (cursor.Features.Values[i] > 0) - featureHistogram[cursor.Label][cursor.Features.Indices[i]] += 1; + if (featureValues[i] > 0) + featureHistogram[cursor.Label][featureIndices[i]] += 1; } } @@ -372,7 +376,12 @@ private void ComputeLabelProbabilityFromFeature(double labelOccurrenceCount, int private void Map(in VBuffer src, ref VBuffer dst) { Host.Check(src.Length == _featureCount, "Invalid number of features passed."); - float[] labelScores = (dst.Length >= _labelCount) ? dst.Values : new float[_labelCount]; + + var srcValues = src.GetValues(); + var srcIndices = src.GetIndices(); + + var editor = VBufferEditor.Create(ref dst, _labelCount); + Span labelScores = editor.Values; for (int iLabel = 0; iLabel < _labelCount; iLabel += 1) { double labelOccurrenceCount = _labelHistogram[iLabel]; @@ -382,18 +391,18 @@ private void Map(in VBuffer src, ref VBuffer dst) { if (src.IsDense) { - for (int iFeature = 0; iFeature < src.Count; iFeature += 1) + for (int iFeature = 0; iFeature < srcValues.Length; iFeature += 1) { ComputeLabelProbabilityFromFeature(labelOccurrenceCount, iLabel, iFeature, - src.Values[iFeature], ref logProb, ref absentFeatureLogProb); + srcValues[iFeature], ref logProb, ref absentFeatureLogProb); } } else { - for (int iFeature = 0; iFeature < src.Count; iFeature += 1) + for (int iFeature = 0; iFeature < srcValues.Length; iFeature += 1) { - ComputeLabelProbabilityFromFeature(labelOccurrenceCount, iLabel, src.Indices[iFeature], - src.Values[iFeature], ref logProb, ref absentFeatureLogProb); + ComputeLabelProbabilityFromFeature(labelOccurrenceCount, iLabel, srcIndices[iFeature], + srcValues[iFeature], ref logProb, ref absentFeatureLogProb); } } } @@ -402,7 +411,7 @@ private void Map(in VBuffer src, ref VBuffer dst) (float)(logProb + (_absentFeaturesLogProb[iLabel] - absentFeatureLogProb)); } - dst = new VBuffer(_labelCount, labelScores, dst.Indices); + dst = editor.Commit(); } } } diff --git a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Ova.cs b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Ova.cs index 529ee30f46..a8894f9149 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Ova.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Ova.cs @@ -82,9 +82,13 @@ public Ova(IHostEnvironment env, Arguments args) /// Whether to treat missing labels as having negative labels, instead of keeping them missing. /// Number of instances to train the calibrator. /// Use probabilities (vs. raw outputs) to identify top-score category. - public Ova(IHostEnvironment env, TScalarTrainer binaryEstimator, string labelColumn = DefaultColumnNames.Label, - bool imputeMissingLabelsAsNegative = false, ICalibratorTrainer calibrator = null, - int maxCalibrationExamples = 1000000000, bool useProbabilities = true) + public Ova(IHostEnvironment env, + TScalarTrainer binaryEstimator, + string labelColumn = DefaultColumnNames.Label, + bool imputeMissingLabelsAsNegative = false, + ICalibratorTrainer calibrator = null, + int maxCalibrationExamples = 1000000000, + bool useProbabilities = true) : base(env, new Arguments { @@ -105,7 +109,7 @@ protected override OvaPredictor TrainCore(IChannel ch, RoleMappedData data, int for (int i = 0; i < predictors.Length; i++) { ch.Info($"Training learner {i}"); - predictors[i] = TrainOne(ch, GetTrainer(), data, i).Model; + predictors[i] = TrainOne(ch, Trainer, data, i).Model; } return OvaPredictor.Create(Host, _args.UseProbabilities, predictors); } @@ -183,11 +187,11 @@ public override MulticlassPredictionTransformer Fit(IDataView inpu if (i == 0) { - var transformer = TrainOne(ch, GetTrainer(), td, i); + var transformer = TrainOne(ch, Trainer, td, i); featureColumn = transformer.FeatureColumn; } - predictors[i] = TrainOne(ch, GetTrainer(), td, i).Model; + predictors[i] = TrainOne(ch, Trainer, td, i).Model; } } @@ -225,7 +229,7 @@ private static VersionInfo GetVersionInfo() public ColumnType InputType => _impl.InputType; public ColumnType OutputType { get; } public ColumnType DistType => OutputType; - public bool CanSavePfa => _impl.CanSavePfa; + bool ICanSavePfa.CanSavePfa => _impl.CanSavePfa; [BestFriend] internal static OvaPredictor Create(IHost host, bool useProb, TScalarPredictor[] predictors) @@ -337,7 +341,7 @@ protected override void SaveCore(ModelSaveContext ctx) ctx.SaveModel(preds[i], string.Format(SubPredictorFmt, i)); } - public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) + JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckValue(input, nameof(input)); @@ -453,19 +457,19 @@ public override ValueMapper, VBuffer> GetMapper() for (int i = 0; i < Predictors.Length; i++) maps[i] = Predictors[i].GetMapper, float>(); + var buffer = new float[maps.Length]; return (in VBuffer src, ref VBuffer dst) => { if (InputType.VectorSize > 0) Contracts.Check(src.Length == InputType.VectorSize); - var values = dst.Values; - if (Utils.Size(values) < maps.Length) - values = new float[maps.Length]; - var tmp = src; - Parallel.For(0, maps.Length, i => maps[i](in tmp, ref values[i])); - dst = new VBuffer(maps.Length, values, dst.Indices); + Parallel.For(0, maps.Length, i => maps[i](in tmp, ref buffer[i])); + + var editor = VBufferEditor.Create(ref dst, maps.Length); + buffer.CopyTo(editor.Values); + dst = editor.Commit(); }; } @@ -522,25 +526,25 @@ public override ValueMapper, VBuffer> GetMapper() for (int i = 0; i < Predictors.Length; i++) maps[i] = _mappers[i].GetMapper, float, float>(); + var buffer = new float[maps.Length]; return (in VBuffer src, ref VBuffer dst) => { if (InputType.VectorSize > 0) Contracts.Check(src.Length == InputType.VectorSize); - var values = dst.Values; - if (Utils.Size(values) < maps.Length) - values = new float[maps.Length]; - var tmp = src; Parallel.For(0, maps.Length, i => { float score = 0; - maps[i](in tmp, ref score, ref values[i]); + maps[i](in tmp, ref score, ref buffer[i]); }); - Normalize(values, maps.Length); - dst = new VBuffer(maps.Length, values, dst.Indices); + Normalize(buffer, maps.Length); + + var editor = VBufferEditor.Create(ref dst, maps.Length); + buffer.CopyTo(editor.Values); + dst = editor.Commit(); }; } diff --git a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Pkpd.cs b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Pkpd.cs index d956702f32..9f5ab8ea3c 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Pkpd.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Pkpd.cs @@ -87,8 +87,12 @@ internal Pkpd(IHostEnvironment env, Arguments args) /// The name of the label colum. /// Whether to treat missing labels as having negative labels, instead of keeping them missing. /// Number of instances to train the calibrator. - public Pkpd(IHostEnvironment env, TScalarTrainer binaryEstimator, string labelColumn = DefaultColumnNames.Label, - bool imputeMissingLabelsAsNegative = false, ICalibratorTrainer calibrator = null, int maxCalibrationExamples = 1000000000) + public Pkpd(IHostEnvironment env, + TScalarTrainer binaryEstimator, + string labelColumn = DefaultColumnNames.Label, + bool imputeMissingLabelsAsNegative = false, + ICalibratorTrainer calibrator = null, + int maxCalibrationExamples = 1000000000) : base(env, new Arguments { @@ -112,7 +116,7 @@ protected override PkpdPredictor TrainCore(IChannel ch, RoleMappedData data, int for (int j = 0; j <= i; j++) { ch.Info($"Training learner ({i},{j})"); - predModels[i][j] = TrainOne(ch, GetTrainer(), data, i, j).Model; + predModels[i][j] = TrainOne(ch, Trainer, data, i, j).Model; } } @@ -197,11 +201,11 @@ public override TTransformer Fit(IDataView input) // need to capture the featureColum, and it is the same for all the transformers if (i == 0 && j == 0) { - var transformer = TrainOne(ch, GetTrainer(), td, i, j); + var transformer = TrainOne(ch, Trainer, td, i, j); featureColumn = transformer.FeatureColumn; } - predictors[i][j] = TrainOne(ch, GetTrainer(), td, i, j).Model; + predictors[i][j] = TrainOne(ch, Trainer, td, i, j).Model; } } } @@ -352,7 +356,7 @@ protected override void SaveCore(ModelSaveContext ctx) } } - private void ComputeProbabilities(Double[] buffer, ref float[] output) + private void ComputeProbabilities(Double[] buffer, Span output) { // Compute the probabilities and store them in the beginning of buffer. Note that this is safe to do since // once we've computed the ith probability, we are totally done with the ith row and all previous rows @@ -365,8 +369,7 @@ private void ComputeProbabilities(Double[] buffer, ref float[] output) sum += value; } - if (Utils.Size(output) < _numClasses) - output = new float[_numClasses]; + Contracts.Assert(output.Length >= _numClasses); // Normalize. if (sum <= 0) @@ -455,7 +458,6 @@ public ValueMapper GetMapper() if (InputType.VectorSize > 0) Host.Check(src.Length == InputType.VectorSize); - var values = dst.Values; var tmp = src; Parallel.For(0, maps.Length, i => { @@ -466,9 +468,10 @@ public ValueMapper GetMapper() }); ReconcilePredictions(buffer); - ComputeProbabilities(buffer, ref values); - dst = new VBuffer(_numClasses, values, dst.Indices); + var editor = VBufferEditor.Create(ref dst, _numClasses); + ComputeProbabilities(buffer, editor.Values); + dst = editor.Commit(); }; return (ValueMapper)(Delegate)del; } diff --git a/src/Microsoft.ML.StandardLearners/Standard/Online/AveragedPerceptron.cs b/src/Microsoft.ML.StandardLearners/Standard/Online/AveragedPerceptron.cs index 0e86d91c47..ee21496f56 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/Online/AveragedPerceptron.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/Online/AveragedPerceptron.cs @@ -96,8 +96,8 @@ internal AveragedPerceptronTrainer(IHostEnvironment env, Arguments args) /// /// The local instance of the /// The classification loss function. - /// The name of the label column. - /// The name of the feature column. + /// The name of the label column. + /// The name of the feature column. /// The optional name of the weights column. /// The learning rate. /// Wheather to decrease learning rate as iterations progress. @@ -105,8 +105,8 @@ internal AveragedPerceptronTrainer(IHostEnvironment env, Arguments args) /// The number of training iteraitons. /// A delegate to supply more advanced arguments to the algorithm. public AveragedPerceptronTrainer(IHostEnvironment env, - string label, - string features, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weights = null, IClassificationLoss lossFunction = null, float learningRate = Arguments.AveragedDefaultArgs.LearningRate, @@ -116,8 +116,8 @@ public AveragedPerceptronTrainer(IHostEnvironment env, Action advancedSettings = null) : this(env, InvokeAdvanced(advancedSettings, new Arguments { - LabelColumn = label, - FeatureColumn = features, + LabelColumn = labelColumn, + FeatureColumn = featureColumn, InitialWeights = weights, LearningRate = learningRate, DecreaseLearningRate = decreaseLearningRate, diff --git a/src/Microsoft.ML.StandardLearners/Standard/Online/LinearSvm.cs b/src/Microsoft.ML.StandardLearners/Standard/Online/LinearSvm.cs index 716bd1c4fc..09700c8184 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/Online/LinearSvm.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/Online/LinearSvm.cs @@ -119,7 +119,7 @@ private void BeginBatch() _batch++; _numBatchExamples = 0; _biasUpdate = 0; - _weightsUpdate = new VBuffer(_weightsUpdate.Length, 0, _weightsUpdate.Values, _weightsUpdate.Indices); + VBufferUtils.Resize(ref _weightsUpdate, _weightsUpdate.Length, 0); } private void FinishBatch(in VBuffer weightsUpdate, Float weightsUpdateScale) @@ -147,7 +147,7 @@ public override void ProcessDataInstance(IChannel ch, in VBuffer feat, Fl Float currentBiasUpdate = trueOutput * weight; _biasUpdate += currentBiasUpdate; // Only aggregate in the case where we're handling multiple instances. - if (_weightsUpdate.Count == 0) + if (_weightsUpdate.GetValues().Length == 0) { VectorUtils.ScaleInto(in feat, currentBiasUpdate, ref _weightsUpdate); _weightsUpdateScale = 1; @@ -160,7 +160,7 @@ public override void ProcessDataInstance(IChannel ch, in VBuffer feat, Fl { if (_batchSize == 1 && loss < 0) { - Contracts.Assert(_weightsUpdate.Count == 0); + Contracts.Assert(_weightsUpdate.GetValues().Length == 0); // If we aren't aggregating multiple instances, just use the instance's // vector directly. Float currentBiasUpdate = trueOutput * weight; diff --git a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineGradientDescent.cs b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineGradientDescent.cs index 7bc7b7d96d..9614155412 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineGradientDescent.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineGradientDescent.cs @@ -101,8 +101,8 @@ public override LinearRegressionPredictor CreatePredictor() /// The custom loss functions. Defaults to if not provided. /// A delegate to supply advanced arguments to the algorithm. public OnlineGradientDescentTrainer(IHostEnvironment env, - string labelColumn, - string featureColumn, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, float learningRate = Arguments.OgdDefaultArgs.LearningRate, bool decreaseLearningRate = Arguments.OgdDefaultArgs.DecreaseLearningRate, float l2RegularizerWeight = Arguments.OgdDefaultArgs.L2RegularizerWeight, diff --git a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerCatalog.cs b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerCatalog.cs deleted file mode 100644 index 6580defb4b..0000000000 --- a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerCatalog.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Trainers.Online; -using System; - -namespace Microsoft.ML -{ - /// - /// Binary Classification trainer estimators. - /// - public static class AveragedPerceptronExtensions - { - /// - /// Predict a target using a linear binary classification model trained with the AveragedPerceptron trainer, and a custom loss. - /// - /// The binary classification context trainer object. - /// The label, or dependent variable. - /// The features, or independent variables. - /// The custom loss. - /// The optional example weights. - /// The learning Rate. - /// Decrease learning rate as iterations progress. - /// L2 regularization weight. - /// Number of training iterations through the data. - /// A delegate to supply more advanced arguments to the algorithm. - public static AveragedPerceptronTrainer AveragedPerceptron( - this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, - string weights = null, - IClassificationLoss lossFunction = null, - float learningRate = AveragedLinearArguments.AveragedDefaultArgs.LearningRate, - bool decreaseLearningRate = AveragedLinearArguments.AveragedDefaultArgs.DecreaseLearningRate, - float l2RegularizerWeight = AveragedLinearArguments.AveragedDefaultArgs.L2RegularizerWeight, - int numIterations = AveragedLinearArguments.AveragedDefaultArgs.NumIterations, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new AveragedPerceptronTrainer(env, label, features, weights, lossFunction ?? new LogLoss(), learningRate, decreaseLearningRate, l2RegularizerWeight, numIterations, advancedSettings); - } - - private sealed class TrivialClassificationLossFactory : ISupportClassificationLossFactory - { - private readonly IClassificationLoss _loss; - - public TrivialClassificationLossFactory(IClassificationLoss loss) - { - _loss = loss; - } - - public IClassificationLoss CreateComponent(IHostEnvironment env) - { - return _loss; - } - } - } - - /// - /// Regression trainer estimators. - /// - public static class OnlineGradientDescentExtensions - { - /// - /// Predict a target using a linear regression model trained with the trainer. - /// - /// The regression context trainer object. - /// The label, or dependent variable. - /// The features, or independent variables. - /// The optional example weights. - /// The custom loss. Defaults to if not provided. - /// The learning Rate. - /// Decrease learning rate as iterations progress. - /// L2 regularization weight. - /// Number of training iterations through the data. - /// A delegate to supply more advanced arguments to the algorithm. - public static OnlineGradientDescentTrainer OnlineGradientDescent(this RegressionContext.RegressionTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, - string weights = null, - IRegressionLoss lossFunction = null, - float learningRate = OnlineGradientDescentTrainer.Arguments.OgdDefaultArgs.LearningRate, - bool decreaseLearningRate = OnlineGradientDescentTrainer.Arguments.OgdDefaultArgs.DecreaseLearningRate, - float l2RegularizerWeight = AveragedLinearArguments.AveragedDefaultArgs.L2RegularizerWeight, - int numIterations = OnlineLinearArguments.OnlineDefaultArgs.NumIterations, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new OnlineGradientDescentTrainer(env, label, features, learningRate, decreaseLearningRate, l2RegularizerWeight, numIterations, weights, lossFunction, advancedSettings); - } - } -} diff --git a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerStatic.cs b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerStatic.cs index 951fca08f6..8153d0f8cf 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerStatic.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerStatic.cs @@ -40,7 +40,7 @@ public static class AveragedPerceptronExtensions /// /// /// /// public static (Scalar score, Scalar predictedLabel) AveragedPerceptron( diff --git a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLinear.cs b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLinear.cs index 1c25986c77..ebcf5d0ad5 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLinear.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLinear.cs @@ -130,16 +130,18 @@ protected TrainStateBase(IChannel ch, int numFeatures, LinearPredictor predictor numFeatures + 1, numFeatures); } - Weights = VBufferUtils.CreateDense(numFeatures); + var weightValues = new float[numFeatures]; for (int i = 0; i < numFeatures; i++) - Weights.Values[i] = Float.Parse(weightStr[i], CultureInfo.InvariantCulture); + weightValues[i] = Float.Parse(weightStr[i], CultureInfo.InvariantCulture); + Weights = new VBuffer(numFeatures, weightValues); Bias = Float.Parse(weightStr[numFeatures], CultureInfo.InvariantCulture); } else if (parent.Args.InitWtsDiameter > 0) { - Weights = VBufferUtils.CreateDense(numFeatures); + var weightValues = new float[numFeatures]; for (int i = 0; i < numFeatures; i++) - Weights.Values[i] = parent.Args.InitWtsDiameter * (parent.Host.Rand.NextSingle() - (Float)0.5); + weightValues[i] = parent.Args.InitWtsDiameter * (parent.Host.Rand.NextSingle() - (Float)0.5); + Weights = new VBuffer(numFeatures, weightValues); Bias = parent.Args.InitWtsDiameter * (parent.Host.Rand.NextSingle() - (Float)0.5); } else if (numFeatures <= 1000) @@ -254,7 +256,7 @@ private protected static TArgs InvokeAdvanced(Action advancedSetti return args; } - protected sealed override TModel TrainModelCore(TrainContext context) + private protected sealed override TModel TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var initPredictor = context.InitialPredictor; diff --git a/src/Microsoft.ML.StandardLearners/Standard/PoissonRegression/PoissonRegression.cs b/src/Microsoft.ML.StandardLearners/Standard/PoissonRegression/PoissonRegression.cs index 34d9a743cc..cfa56e1e6f 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/PoissonRegression/PoissonRegression.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/PoissonRegression/PoissonRegression.cs @@ -46,22 +46,24 @@ public sealed class Arguments : ArgumentsBase /// The environment to use. /// The name of the label column. /// The name of the feature column. - /// The name for the example weight column. - /// Enforce non-negative weights. + /// The name for the example weight column. /// Weight of L1 regularizer term. /// Weight of L2 regularizer term. - /// Memory size for . Lower=faster, less accurate. /// Threshold for optimizer convergence. + /// Memory size for . Lower=faster, less accurate. + /// Enforce non-negative weights. /// A delegate to apply all the advanced arguments to the algorithm. - public PoissonRegression(IHostEnvironment env, string featureColumn, string labelColumn, - string weightColumn = null, + public PoissonRegression(IHostEnvironment env, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, float l1Weight = Arguments.Defaults.L1Weight, float l2Weight = Arguments.Defaults.L2Weight, float optimizationTolerance = Arguments.Defaults.OptTol, int memorySize = Arguments.Defaults.MemorySize, bool enforceNoNegativity = Arguments.Defaults.EnforceNonNegativity, Action advancedSettings = null) - : base(env, featureColumn, TrainerUtils.MakeR4ScalarLabel(labelColumn), weightColumn, advancedSettings, + : base(env, featureColumn, TrainerUtils.MakeR4ScalarLabel(labelColumn), weights, advancedSettings, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity) { Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); @@ -136,8 +138,9 @@ protected override float AccumulateOneGradient(in VBuffer feat, float lab float mult = -(y - lambda) * weight; VectorUtils.AddMultWithOffset(in feat, mult, ref grad, 1); // Due to the call to EnsureBiases, we know this region is dense. - Contracts.Assert(grad.Count >= BiasCount && (grad.IsDense || grad.Indices[BiasCount - 1] == BiasCount - 1)); - grad.Values[0] += mult; + var editor = VBufferEditor.CreateFromBuffer(ref grad); + Contracts.Assert(editor.Values.Length >= BiasCount && (grad.IsDense || editor.Indices[BiasCount - 1] == BiasCount - 1)); + editor.Values[0] += mult; // From the computer's perspective exp(infinity)==infinity // so inf-inf=nan, but in reality, infinity is just a large // number we can't represent, and exp(X)-X for X=inf is just inf. diff --git a/src/Microsoft.ML.StandardLearners/Standard/SdcaBinary.cs b/src/Microsoft.ML.StandardLearners/Standard/SdcaBinary.cs index eeeab2a5ad..1a2f435bf2 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/SdcaBinary.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/SdcaBinary.cs @@ -68,7 +68,7 @@ private protected LinearTrainerBase(IHostEnvironment env, string featureColumn, { } - protected override TModel TrainModelCore(TrainContext context) + private protected override TModel TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); using (var ch = Host.Start("Training")) @@ -105,12 +105,12 @@ protected RoleMappedData PrepareDataFromTrainingExamples(IChannel ch, RoleMapped idvToFeedTrain = idvToShuffle; else { - var shuffleArgs = new ShuffleTransform.Arguments + var shuffleArgs = new RowShufflingTransformer.Arguments { PoolOnly = false, ForceShuffle = ShuffleData }; - idvToFeedTrain = new ShuffleTransform(Host, shuffleArgs, idvToShuffle); + idvToFeedTrain = new RowShufflingTransformer(Host, shuffleArgs, idvToShuffle); } ch.Assert(idvToFeedTrain.CanShuffle); @@ -772,7 +772,7 @@ protected virtual void TrainWithoutLock(IProgressChannelProvider progress, Float while (cursor.MoveNext()) { long idx = getIndexFromId(cursor.Id); - var features = cursor.Features; + VBuffer features = cursor.Features; var label = cursor.Label; float invariant; if (invariants != null) @@ -787,6 +787,11 @@ protected virtual void TrainWithoutLock(IProgressChannelProvider progress, Float invariant = Loss.ComputeDualUpdateInvariant(featuresNormSquared * lambdaNInv * GetInstanceWeight(cursor)); } + var weightsEditor = VBufferEditor.CreateFromBuffer(ref weights[0]); + var l1IntermediateWeightsEditor = + !l1ThresholdZero ? VBufferEditor.CreateFromBuffer(ref l1IntermediateWeights[0]) : + default; + for (int numTrials = 0; numTrials < maxUpdateTrials; numTrials++) { var dual = duals[idx]; @@ -812,7 +817,7 @@ protected virtual void TrainWithoutLock(IProgressChannelProvider progress, Float if (l1ThresholdZero) { - VectorUtils.AddMult(in features, weights[0].Values, primalUpdate); + VectorUtils.AddMult(in features, weightsEditor.Values, primalUpdate); biasReg[0] += primalUpdate; } else @@ -829,10 +834,11 @@ protected virtual void TrainWithoutLock(IProgressChannelProvider progress, Float : 0; } + var featureValues = features.GetValues(); if (features.IsDense) - CpuMathUtils.SdcaL1UpdateDense(primalUpdate, features.Count, features.Values, l1Threshold, l1IntermediateWeights[0].Values, weights[0].Values); - else if (features.Count > 0) - CpuMathUtils.SdcaL1UpdateSparse(primalUpdate, features.Count, features.Values, features.Indices, l1Threshold, l1IntermediateWeights[0].Values, weights[0].Values); + CpuMathUtils.SdcaL1UpdateDense(primalUpdate, featureValues.Length, featureValues, l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); + else if (featureValues.Length > 0) + CpuMathUtils.SdcaL1UpdateSparse(primalUpdate, featureValues.Length, featureValues, features.GetIndices(), l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); } break; @@ -919,6 +925,7 @@ protected virtual bool CheckConvergence( var lossSum = new CompensatedSum(); var dualLossSum = new CompensatedSum(); var biasTotal = biasReg[0] + biasUnreg[0]; + VBuffer firstWeights = weights[0]; using (var cursor = cursorFactory.Create()) { @@ -955,7 +962,7 @@ protected virtual bool CheckConvergence( var dualityGap = metrics[(int)MetricKind.DualityGap] = newLoss - newDualLoss; metrics[(int)MetricKind.BiasUnreg] = biasUnreg[0]; metrics[(int)MetricKind.BiasReg] = biasReg[0]; - metrics[(int)MetricKind.L1Sparsity] = Args.L1Threshold == 0 ? 1 : (Double)weights[0].Values.Count(w => w != 0) / weights.Length; + metrics[(int)MetricKind.L1Sparsity] = Args.L1Threshold == 0 ? 1 : (Double)firstWeights.GetValues().Count(w => w != 0) / weights.Length; bool converged = dualityGap / newLoss < Args.ConvergenceTolerance; @@ -964,7 +971,7 @@ protected virtual bool CheckConvergence( // Maintain a copy of weights and bias with best primal loss thus far. // This is some extra work and uses extra memory, but it seems worth doing it. // REVIEW: Sparsify bestWeights? - weights[0].CopyTo(ref bestWeights[0]); + firstWeights.CopyTo(ref bestWeights[0]); bestBiasReg[0] = biasReg[0]; bestBiasUnreg[0] = biasUnreg[0]; bestPrimalLoss = metrics[(int)MetricKind.Loss]; @@ -1427,8 +1434,8 @@ internal override void Check(IHostEnvironment env) /// Initializes a new instance of /// /// The environment to use. - /// The features, or independent variables. /// The label, or dependent variable. + /// The features, or independent variables. /// The custom loss. /// The optional example weights. /// The L2 regularization hyperparameter. @@ -1439,8 +1446,8 @@ internal override void Check(IHostEnvironment env) /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public SdcaBinaryTrainer(IHostEnvironment env, - string featureColumn, - string labelColumn, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, string weightColumn = null, ISupportSdcaClassificationLoss loss = null, float? l2Const = null, @@ -1675,7 +1682,10 @@ internal static class Defaults /// The L2 regularizer constant. /// The loss function to use. /// A delegate to apply all the advanced arguments to the algorithm. - public StochasticGradientDescentClassificationTrainer(IHostEnvironment env, string featureColumn, string labelColumn, string weightColumn = null, + public StochasticGradientDescentClassificationTrainer(IHostEnvironment env, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weightColumn = null, int maxIterations = Arguments.Defaults.MaxIterations, double initLearningRate = Arguments.Defaults.InitLearningRate, float l2Weight = Arguments.Defaults.L2Weight, @@ -1831,6 +1841,7 @@ protected override TScalarPredictor TrainCore(IChannel ch, RoleMappedData data, { using (var cursor = _args.Shuffle ? cursorFactory.Create(rand) : cursorFactory.Create()) { + var weightsEditor = VBufferEditor.CreateFromBuffer(ref weights); while (cursor.MoveNext()) { VBuffer features = cursor.Features; @@ -1846,7 +1857,7 @@ protected override TScalarPredictor TrainCore(IChannel ch, RoleMappedData data, Double rate = ilr / (1 + ilr * l2Weight * (t++)); Double step = -derivative * rate; weightScaling *= 1 - rate * l2Weight; - VectorUtils.AddMult(in features, weights.Values, (float)(step / weightScaling)); + VectorUtils.AddMult(in features, weightsEditor.Values, (float)(step / weightScaling)); bias += (float)step; } if (e == 1) diff --git a/src/Microsoft.ML.StandardLearners/Standard/SdcaCatalog.cs b/src/Microsoft.ML.StandardLearners/Standard/SdcaCatalog.cs deleted file mode 100644 index 04727f5910..0000000000 --- a/src/Microsoft.ML.StandardLearners/Standard/SdcaCatalog.cs +++ /dev/null @@ -1,126 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Learners; -using Microsoft.ML.Trainers; -using System; - -namespace Microsoft.ML -{ - /// - /// Extension methods for instantiating SDCA trainer estimators. - /// - public static class SdcaRegressionExtensions - { - /// - /// Predict a target using a linear regression model trained with the SDCA trainer. - /// - /// The regression context trainer object. - /// The label, or dependent variable. - /// The features, or independent variables. - /// The optional example weights. - /// The L2 regularization hyperparameter. - /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. - /// The maximum number of passes to perform over the data. - /// The custom loss, if unspecified will be . - /// A delegate to set more settings. - /// The settings here will override the ones provided in the direct method signature, - /// if both are present and have different values. - /// The columns names, however need to be provided directly, not through the . - public static SdcaRegressionTrainer StochasticDualCoordinateAscent(this RegressionContext.RegressionTrainers ctx, - string label = DefaultColumnNames.Label, string features = DefaultColumnNames.Features, string weights = null, - ISupportSdcaRegressionLoss loss = null, - float? l2Const = null, - float? l1Threshold = null, - int? maxIterations = null, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new SdcaRegressionTrainer(env, features, label, weights, loss, l2Const, l1Threshold, maxIterations, advancedSettings); - } - } - - public static class SdcaBinaryClassificationExtensions - { - /// - /// Predict a target using a linear binary classification model trained with the SDCA trainer. - /// - /// The binary classification context trainer object. - /// The label, or dependent variable. - /// The features, or independent variables. - /// The optional example weights. - /// The custom loss. Defaults to log-loss if not specified. - /// The L2 regularization hyperparameter. - /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. - /// The maximum number of passes to perform over the data. - /// A delegate to set more settings. - /// The settings here will override the ones provided in the direct method signature, - /// if both are present and have different values. - /// The columns names, however need to be provided directly, not through the . - /// - /// - /// - /// - /// - /// - /// - /// - public static SdcaBinaryTrainer StochasticDualCoordinateAscent( - this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string label = DefaultColumnNames.Label, string features = DefaultColumnNames.Features, - string weights = null, - ISupportSdcaClassificationLoss loss = null, - float? l2Const = null, - float? l1Threshold = null, - int? maxIterations = null, - Action advancedSettings = null - ) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new SdcaBinaryTrainer(env, features, label, weights, loss, l2Const, l1Threshold, maxIterations, advancedSettings); - } - } - - public static class SdcaMulticlassExtensions - { - - /// - /// Predict a target using a linear multiclass classification model trained with the SDCA trainer. - /// - /// The multiclass classification context trainer object. - /// The label, or dependent variable. - /// The features, or independent variables. - /// The optional custom loss. - /// The optional example weights. - /// The L2 regularization hyperparameter. - /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. - /// The maximum number of passes to perform over the data. - /// A delegate to set more settings. - /// The settings here will override the ones provided in the direct method signature, - /// if both are present and have different values. - /// The columns names, however need to be provided directly, not through the . - public static SdcaMultiClassTrainer StochasticDualCoordinateAscent(this MulticlassClassificationContext.MulticlassClassificationTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, - string weights = null, - ISupportSdcaClassificationLoss loss = null, - float? l2Const = null, - float? l1Threshold = null, - int? maxIterations = null, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new SdcaMultiClassTrainer(env, features, label, weights, loss, l2Const, l1Threshold, maxIterations, advancedSettings); - } - } -} diff --git a/src/Microsoft.ML.StandardLearners/Standard/SdcaMultiClass.cs b/src/Microsoft.ML.StandardLearners/Standard/SdcaMultiClass.cs index deaa204b03..0b5647f446 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/SdcaMultiClass.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/SdcaMultiClass.cs @@ -51,10 +51,10 @@ public sealed class Arguments : ArgumentsBase /// Initializes a new instance of /// /// The environment to use. - /// The features, or independent variables. /// The label, or dependent variable. + /// The features, or independent variables. + /// The optional example weights. /// The custom loss. - /// The optional example weights. /// The L2 regularization hyperparameter. /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. /// The maximum number of passes to perform over the data. @@ -63,15 +63,15 @@ public sealed class Arguments : ArgumentsBase /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public SdcaMultiClassTrainer(IHostEnvironment env, - string featureColumn, - string labelColumn, - string weightColumn = null, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, ISupportSdcaClassificationLoss loss = null, float? l2Const = null, float? l1Threshold = null, int? maxIterations = null, Action advancedSettings = null) - : base(env, featureColumn, TrainerUtils.MakeU4ScalarColumn(labelColumn), TrainerUtils.MakeR4ScalarWeightColumn(weightColumn), advancedSettings, + : base(env, featureColumn, TrainerUtils.MakeU4ScalarColumn(labelColumn), TrainerUtils.MakeR4ScalarWeightColumn(weights), advancedSettings, l2Const, l1Threshold, maxIterations) { Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); @@ -167,7 +167,7 @@ protected override void TrainWithoutLock(IProgressChannelProvider progress, Floa } else { - normSquared = VectorUtils.NormSquared(features); + normSquared = VectorUtils.NormSquared(in features); if (Args.BiasLearningRate == 0) normSquared += 1; @@ -194,6 +194,11 @@ protected override void TrainWithoutLock(IProgressChannelProvider progress, Floa if (iClass == label) continue; + var weightsEditor = VBufferEditor.CreateFromBuffer(ref weights[iClass]); + var l1IntermediateWeightsEditor = + !l1ThresholdZero ? VBufferEditor.CreateFromBuffer(ref l1IntermediateWeights[iClass]) : + default; + // Loop trials for compare-and-swap updates of duals. // In general, concurrent update conflict to the same dual variable is rare // if data is shuffled. @@ -223,7 +228,7 @@ protected override void TrainWithoutLock(IProgressChannelProvider progress, Floa if (l1ThresholdZero) { - VectorUtils.AddMult(in features, weights[iClass].Values, -primalUpdate); + VectorUtils.AddMult(in features, weightsEditor.Values, -primalUpdate); biasReg[iClass] -= primalUpdate; } else @@ -240,10 +245,11 @@ protected override void TrainWithoutLock(IProgressChannelProvider progress, Floa : 0; } + var featureValues = features.GetValues(); if (features.IsDense) - CpuMathUtils.SdcaL1UpdateDense(-primalUpdate, features.Count, features.Values, l1Threshold, l1IntermediateWeights[iClass].Values, weights[iClass].Values); - else if (features.Count > 0) - CpuMathUtils.SdcaL1UpdateSparse(-primalUpdate, features.Count, features.Values, features.Indices, l1Threshold, l1IntermediateWeights[iClass].Values, weights[iClass].Values); + CpuMathUtils.SdcaL1UpdateDense(-primalUpdate, featureValues.Length, featureValues, l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); + else if (featureValues.Length > 0) + CpuMathUtils.SdcaL1UpdateSparse(-primalUpdate, featureValues.Length, featureValues, features.GetIndices(), l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); } break; @@ -256,7 +262,8 @@ protected override void TrainWithoutLock(IProgressChannelProvider progress, Floa biasUnreg[label] += labelAdjustment * lambdaNInv * instanceWeight; if (l1ThresholdZero) { - VectorUtils.AddMult(in features, weights[label].Values, labelPrimalUpdate); + var weightsEditor = VBufferEditor.CreateFromBuffer(ref weights[label]); + VectorUtils.AddMult(in features, weightsEditor.Values, labelPrimalUpdate); biasReg[label] += labelPrimalUpdate; } else @@ -267,10 +274,13 @@ protected override void TrainWithoutLock(IProgressChannelProvider progress, Floa ? intermediateBias - Math.Sign(intermediateBias) * l1Threshold : 0; + var weightsEditor = VBufferEditor.CreateFromBuffer(ref weights[label]); + var l1IntermediateWeightsEditor = VBufferEditor.CreateFromBuffer(ref l1IntermediateWeights[label]); + var featureValues = features.GetValues(); if (features.IsDense) - CpuMathUtils.SdcaL1UpdateDense(labelPrimalUpdate, features.Count, features.Values, l1Threshold, l1IntermediateWeights[label].Values, weights[label].Values); - else if (features.Count > 0) - CpuMathUtils.SdcaL1UpdateSparse(labelPrimalUpdate, features.Count, features.Values, features.Indices, l1Threshold, l1IntermediateWeights[label].Values, weights[label].Values); + CpuMathUtils.SdcaL1UpdateDense(labelPrimalUpdate, featureValues.Length, featureValues, l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); + else if (featureValues.Length > 0) + CpuMathUtils.SdcaL1UpdateSparse(labelPrimalUpdate, featureValues.Length, featureValues, features.GetIndices(), l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); } rowCount++; @@ -377,7 +387,7 @@ protected override bool CheckConvergence( metrics[(int)MetricKind.BiasUnreg] = biasUnreg[0]; metrics[(int)MetricKind.BiasReg] = biasReg[0]; metrics[(int)MetricKind.L1Sparsity] = Args.L1Threshold == 0 ? 1 : weights.Sum( - weight => weight.Values.Count(w => w != 0)) / (numClasses * numFeatures); + weight => weight.GetValues().Count(w => w != 0)) / (numClasses * numFeatures); bool converged = dualityGap / newLoss < Args.ConvergenceTolerance; diff --git a/src/Microsoft.ML.StandardLearners/Standard/SdcaRegression.cs b/src/Microsoft.ML.StandardLearners/Standard/SdcaRegression.cs index f55ba18fe1..0fb28424e7 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/SdcaRegression.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/SdcaRegression.cs @@ -56,10 +56,10 @@ public Arguments() /// Initializes a new instance of /// /// The environment to use. - /// The features, or independent variables. /// The label, or dependent variable. + /// The features, or independent variables. + /// The optional example weights. /// The custom loss. - /// The optional example weights. /// The L2 regularization hyperparameter. /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. /// The maximum number of passes to perform over the data. @@ -68,15 +68,15 @@ public Arguments() /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public SdcaRegressionTrainer(IHostEnvironment env, - string featureColumn, - string labelColumn, - string weightColumn = null, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, ISupportSdcaRegressionLoss loss = null, float? l2Const = null, float? l1Threshold = null, int? maxIterations = null, Action advancedSettings = null) - : base(env, featureColumn, TrainerUtils.MakeR4ScalarLabel(labelColumn), TrainerUtils.MakeR4ScalarWeightColumn(weightColumn), advancedSettings, + : base(env, featureColumn, TrainerUtils.MakeR4ScalarLabel(labelColumn), TrainerUtils.MakeR4ScalarWeightColumn(weights), advancedSettings, l2Const, l1Threshold, maxIterations) { Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); diff --git a/src/Microsoft.ML.StandardLearners/Standard/SdcaStatic.cs b/src/Microsoft.ML.StandardLearners/Standard/SdcaStatic.cs index b2d631480e..e53617c6e9 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/SdcaStatic.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/SdcaStatic.cs @@ -41,7 +41,7 @@ public static class SdcaExtensions /// /// /// /// public static Scalar Sdca(this RegressionContext.RegressionTrainers ctx, @@ -66,7 +66,7 @@ public static Scalar Sdca(this RegressionContext.RegressionTrainers ctx, var rec = new TrainerEstimatorReconciler.Regression( (env, labelName, featuresName, weightsName) => { - var trainer = new SdcaRegressionTrainer(env, featuresName, labelName, weightsName, loss, l2Const, l1Threshold, maxIterations, advancedSettings); + var trainer = new SdcaRegressionTrainer(env, labelName, featuresName, weightsName, loss, l2Const, l1Threshold, maxIterations, advancedSettings); if (onFit != null) return trainer.WithOnFitDelegate(trans => onFit(trans.Model)); return trainer; @@ -99,7 +99,7 @@ public static Scalar Sdca(this RegressionContext.RegressionTrainers ctx, /// /// /// /// public static (Scalar score, Scalar probability, Scalar predictedLabel) Sdca( @@ -123,7 +123,7 @@ public static (Scalar score, Scalar probability, Scalar pred var rec = new TrainerEstimatorReconciler.BinaryClassifier( (env, labelName, featuresName, weightsName) => { - var trainer = new SdcaBinaryTrainer(env, featuresName, labelName, weightsName, loss: new LogLoss(), l2Const, l1Threshold, maxIterations, advancedSettings); + var trainer = new SdcaBinaryTrainer(env, labelName, featuresName, weightsName, loss: new LogLoss(), l2Const, l1Threshold, maxIterations, advancedSettings); if (onFit != null) { return trainer.WithOnFitDelegate(trans => @@ -193,7 +193,7 @@ public static (Scalar score, Scalar predictedLabel) Sdca( var rec = new TrainerEstimatorReconciler.BinaryClassifierNoCalibration( (env, labelName, featuresName, weightsName) => { - var trainer = new SdcaBinaryTrainer(env, featuresName, labelName, weightsName, loss, l2Const, l1Threshold, maxIterations, advancedSettings); + var trainer = new SdcaBinaryTrainer(env, labelName, featuresName, weightsName, loss, l2Const, l1Threshold, maxIterations, advancedSettings); if (onFit != null) { return trainer.WithOnFitDelegate(trans => @@ -257,7 +257,7 @@ public static (Vector score, Key predictedLabel) var rec = new TrainerEstimatorReconciler.MulticlassClassifier( (env, labelName, featuresName, weightsName) => { - var trainer = new SdcaMultiClassTrainer(env, featuresName, labelName, weightsName, loss, l2Const, l1Threshold, maxIterations, advancedSettings); + var trainer = new SdcaMultiClassTrainer(env, labelName, featuresName, weightsName, loss, l2Const, l1Threshold, maxIterations, advancedSettings); if (onFit != null) return trainer.WithOnFitDelegate(trans => onFit(trans.Model)); return trainer; diff --git a/src/Microsoft.ML.StandardLearners/Standard/SgdCatalog.cs b/src/Microsoft.ML.StandardLearners/Standard/SgdCatalog.cs deleted file mode 100644 index be68580822..0000000000 --- a/src/Microsoft.ML.StandardLearners/Standard/SgdCatalog.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Trainers; -using System; - -namespace Microsoft.ML -{ - using Arguments = StochasticGradientDescentClassificationTrainer.Arguments; - - /// - /// Binary Classification trainer estimators. - /// - public static class StochasticGradientDescentCatalog - { - /// - /// Predict a target using a linear binary classification model trained with the trainer. - /// - /// The binary classificaiton context trainer object. - /// The name of the label column. - /// The name of the feature column. - /// The name for the example weight column. - /// The maximum number of iterations; set to 1 to simulate online learning. - /// The initial learning rate used by SGD. - /// The L2 regularization constant. - /// The loss function to use. - /// A delegate to apply all the advanced arguments to the algorithm. - public static StochasticGradientDescentClassificationTrainer StochasticGradientDescent(this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string label = DefaultColumnNames.Label, - string features = DefaultColumnNames.Features, - string weights = null, - int maxIterations = Arguments.Defaults.MaxIterations, - double initLearningRate = Arguments.Defaults.InitLearningRate, - float l2Weight = Arguments.Defaults.L2Weight, - ISupportClassificationLossFactory loss = null, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new StochasticGradientDescentClassificationTrainer(env, features, label, weights, maxIterations, initLearningRate, l2Weight, loss, advancedSettings); - } - } -} diff --git a/src/Microsoft.ML.StandardLearners/Standard/SgdStatic.cs b/src/Microsoft.ML.StandardLearners/Standard/SgdStatic.cs index 96c3b1a5ef..8bc0b510a1 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/SgdStatic.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/SgdStatic.cs @@ -50,7 +50,7 @@ public static (Scalar score, Scalar probability, Scalar pred var rec = new TrainerEstimatorReconciler.BinaryClassifier( (env, labelName, featuresName, weightsName) => { - var trainer = new StochasticGradientDescentClassificationTrainer(env, featuresName, labelName, weightsName, maxIterations, initLearningRate, l2Weight, loss, advancedSettings); + var trainer = new StochasticGradientDescentClassificationTrainer(env, labelName, featuresName, weightsName, maxIterations, initLearningRate, l2Weight, loss, advancedSettings); if (onFit != null) return trainer.WithOnFitDelegate(trans => onFit(trans.Model)); diff --git a/src/Microsoft.ML.StandardLearners/Standard/Simple/SimpleTrainers.cs b/src/Microsoft.ML.StandardLearners/Standard/Simple/SimpleTrainers.cs index 5dcb72ad02..ec39fc1e1c 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/Simple/SimpleTrainers.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/Simple/SimpleTrainers.cs @@ -70,14 +70,12 @@ public RandomTrainer(IHostEnvironment env, Arguments args) public BinaryPredictionTransformer Fit(IDataView input) { - var cachedTrain = Info.WantCaching ? new CacheDataView(Host, input, prefetch: null) : input; - - RoleMappedData trainRoles = new RoleMappedData(cachedTrain); + RoleMappedData trainRoles = new RoleMappedData(input); var pred = Train(new TrainContext(trainRoles)); - return new BinaryPredictionTransformer(Host, pred, cachedTrain.Schema, featureColumn: null); + return new BinaryPredictionTransformer(Host, pred, input.Schema, featureColumn: null); } - public override RandomPredictor Train(TrainContext context) + private protected override RandomPredictor Train(TrainContext context) { Host.CheckValue(context, nameof(context)); return new RandomPredictor(Host, Host.Rand.Next()); @@ -270,14 +268,12 @@ public PriorTrainer(IHost host, String labelColumn, String weightColunn = null) public BinaryPredictionTransformer Fit(IDataView input) { - var cachedTrain = Info.WantCaching ? new CacheDataView(Host, input, prefetch: null) : input; - - RoleMappedData trainRoles = new RoleMappedData(cachedTrain, feature: null, label: _labelColumnName, weight: _weightColumnName); + RoleMappedData trainRoles = new RoleMappedData(input, feature: null, label: _labelColumnName, weight: _weightColumnName); var pred = Train(new TrainContext(trainRoles)); - return new BinaryPredictionTransformer(Host, pred, cachedTrain.Schema, featureColumn: null); + return new BinaryPredictionTransformer(Host, pred, input.Schema, featureColumn: null); } - public override PriorPredictor Train(TrainContext context) + private protected override PriorPredictor Train(TrainContext context) { Contracts.CheckValue(context, nameof(context)); var data = context.TrainingSet; diff --git a/src/Microsoft.ML.StandardLearners/Standard/StochasticTrainerBase.cs b/src/Microsoft.ML.StandardLearners/Standard/StochasticTrainerBase.cs index cae4894214..d419a3a8a1 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/StochasticTrainerBase.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/StochasticTrainerBase.cs @@ -28,7 +28,7 @@ public StochasticTrainerBase(IHost host, SchemaShape.Column feature, SchemaShape private static readonly TrainerInfo _info = new TrainerInfo(); public override TrainerInfo Info => _info; - protected override TModel TrainModelCore(TrainContext context) + private protected override TModel TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); using (var ch = Host.Start("Training")) @@ -72,12 +72,12 @@ protected RoleMappedData PrepareDataFromTrainingExamples(IChannel ch, RoleMapped idvToFeedTrain = idvToShuffle; else { - var shuffleArgs = new ShuffleTransform.Arguments + var shuffleArgs = new RowShufflingTransformer.Arguments { PoolOnly = false, ForceShuffle = ShuffleData }; - idvToFeedTrain = new ShuffleTransform(Host, shuffleArgs, idvToShuffle); + idvToFeedTrain = new RowShufflingTransformer(Host, shuffleArgs, idvToShuffle); } ch.Assert(idvToFeedTrain.CanShuffle); diff --git a/src/Microsoft.ML.StandardLearners/StandardLearnersCatalog.cs b/src/Microsoft.ML.StandardLearners/StandardLearnersCatalog.cs new file mode 100644 index 0000000000..aaba510815 --- /dev/null +++ b/src/Microsoft.ML.StandardLearners/StandardLearnersCatalog.cs @@ -0,0 +1,314 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Learners; +using Microsoft.ML.Trainers; +using Microsoft.ML.Trainers.Online; +using System; + +namespace Microsoft.ML +{ + using SgdArguments = StochasticGradientDescentClassificationTrainer.Arguments; + using LRArguments = LogisticRegression.Arguments; + + /// + /// TrainerEstimator extension methods. + /// + public static class StandardLearnersCatalog + { + /// + /// Predict a target using a linear binary classification model trained with the trainer. + /// + /// The binary classificaiton context trainer object. + /// The name of the label column. + /// The name of the feature column. + /// The name for the example weight column. + /// The maximum number of iterations; set to 1 to simulate online learning. + /// The initial learning rate used by SGD. + /// The L2 regularization constant. + /// The loss function to use. + /// A delegate to apply all the advanced arguments to the algorithm. + public static StochasticGradientDescentClassificationTrainer StochasticGradientDescent(this BinaryClassificationContext.BinaryClassificationTrainers ctx, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, + int maxIterations = SgdArguments.Defaults.MaxIterations, + double initLearningRate = SgdArguments.Defaults.InitLearningRate, + float l2Weight = SgdArguments.Defaults.L2Weight, + ISupportClassificationLossFactory loss = null, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new StochasticGradientDescentClassificationTrainer(env, labelColumn, featureColumn, weights, maxIterations, initLearningRate, l2Weight, loss, advancedSettings); + } + + /// + /// Predict a target using a linear regression model trained with the SDCA trainer. + /// + /// The regression context trainer object. + /// The label column, or dependent variable. + /// The features, or independent variables. + /// The optional example weights. + /// The L2 regularization hyperparameter. + /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. + /// The maximum number of passes to perform over the data. + /// The custom loss, if unspecified will be . + /// A delegate to set more settings. + /// The settings here will override the ones provided in the direct method signature, + /// if both are present and have different values. + /// The columns names, however need to be provided directly, not through the . + public static SdcaRegressionTrainer StochasticDualCoordinateAscent(this RegressionContext.RegressionTrainers ctx, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, + ISupportSdcaRegressionLoss loss = null, + float? l2Const = null, + float? l1Threshold = null, + int? maxIterations = null, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new SdcaRegressionTrainer(env, labelColumn, featureColumn, weights, loss, l2Const, l1Threshold, maxIterations, advancedSettings); + } + + /// + /// Predict a target using a linear binary classification model trained with the SDCA trainer. + /// + /// The binary classification context trainer object. + /// The labelColumn, or dependent variable. + /// The features, or independent variables. + /// The optional example weights. + /// The custom loss. Defaults to log-loss if not specified. + /// The L2 regularization hyperparameter. + /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. + /// The maximum number of passes to perform over the data. + /// A delegate to set more settings. + /// The settings here will override the ones provided in the direct method signature, + /// if both are present and have different values. + /// The columns names, however need to be provided directly, not through the . + /// + /// + /// + /// + /// + /// + /// + /// + public static SdcaBinaryTrainer StochasticDualCoordinateAscent( + this BinaryClassificationContext.BinaryClassificationTrainers ctx, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, + ISupportSdcaClassificationLoss loss = null, + float? l2Const = null, + float? l1Threshold = null, + int? maxIterations = null, + Action advancedSettings = null + ) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new SdcaBinaryTrainer(env, labelColumn, featureColumn, weights, loss, l2Const, l1Threshold, maxIterations, advancedSettings); + } + + /// + /// Predict a target using a linear multiclass classification model trained with the SDCA trainer. + /// + /// The multiclass classification context trainer object. + /// The labelColumn, or dependent variable. + /// The features, or independent variables. + /// The optional custom loss. + /// The optional example weights. + /// The L2 regularization hyperparameter. + /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. + /// The maximum number of passes to perform over the data. + /// A delegate to set more settings. + /// The settings here will override the ones provided in the direct method signature, + /// if both are present and have different values. + /// The columns names, however need to be provided directly, not through the . + public static SdcaMultiClassTrainer StochasticDualCoordinateAscent(this MulticlassClassificationContext.MulticlassClassificationTrainers ctx, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, + ISupportSdcaClassificationLoss loss = null, + float? l2Const = null, + float? l1Threshold = null, + int? maxIterations = null, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new SdcaMultiClassTrainer(env, labelColumn, featureColumn, weights, loss, l2Const, l1Threshold, maxIterations, advancedSettings); + } + + /// + /// Predict a target using a linear binary classification model trained with the AveragedPerceptron trainer, and a custom loss. + /// + /// The binary classification context trainer object. + /// The name of the label column, or dependent variable. + /// The features, or independent variables. + /// The custom loss. + /// The optional example weights. + /// The learning Rate. + /// Decrease learning rate as iterations progress. + /// L2 regularization weight. + /// Number of training iterations through the data. + /// A delegate to supply more advanced arguments to the algorithm. + public static AveragedPerceptronTrainer AveragedPerceptron( + this BinaryClassificationContext.BinaryClassificationTrainers ctx, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, + IClassificationLoss lossFunction = null, + float learningRate = AveragedLinearArguments.AveragedDefaultArgs.LearningRate, + bool decreaseLearningRate = AveragedLinearArguments.AveragedDefaultArgs.DecreaseLearningRate, + float l2RegularizerWeight = AveragedLinearArguments.AveragedDefaultArgs.L2RegularizerWeight, + int numIterations = AveragedLinearArguments.AveragedDefaultArgs.NumIterations, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new AveragedPerceptronTrainer(env, labelColumn, featureColumn, weights, lossFunction ?? new LogLoss(), learningRate, decreaseLearningRate, l2RegularizerWeight, numIterations, advancedSettings); + } + + private sealed class TrivialClassificationLossFactory : ISupportClassificationLossFactory + { + private readonly IClassificationLoss _loss; + + public TrivialClassificationLossFactory(IClassificationLoss loss) + { + _loss = loss; + } + + public IClassificationLoss CreateComponent(IHostEnvironment env) + { + return _loss; + } + } + + /// + /// Predict a target using a linear regression model trained with the trainer. + /// + /// The regression context trainer object. + /// The name of the label, or dependent variable. + /// The features, or independent variables. + /// The optional example weights. + /// The custom loss. Defaults to if not provided. + /// The learning Rate. + /// Decrease learning rate as iterations progress. + /// L2 regularization weight. + /// Number of training iterations through the data. + /// A delegate to supply more advanced arguments to the algorithm. + public static OnlineGradientDescentTrainer OnlineGradientDescent(this RegressionContext.RegressionTrainers ctx, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, + IRegressionLoss lossFunction = null, + float learningRate = OnlineGradientDescentTrainer.Arguments.OgdDefaultArgs.LearningRate, + bool decreaseLearningRate = OnlineGradientDescentTrainer.Arguments.OgdDefaultArgs.DecreaseLearningRate, + float l2RegularizerWeight = AveragedLinearArguments.AveragedDefaultArgs.L2RegularizerWeight, + int numIterations = OnlineLinearArguments.OnlineDefaultArgs.NumIterations, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new OnlineGradientDescentTrainer(env, labelColumn, featureColumn, learningRate, decreaseLearningRate, l2RegularizerWeight, numIterations, weights, lossFunction, advancedSettings); + } + + /// + /// Predict a target using a linear binary classification model trained with the trainer. + /// + /// The binary classificaiton context trainer object. + /// The label column name, or dependent variable. + /// The features, or independent variables. + /// The optional example weights. + /// Enforce non-negative weights. + /// Weight of L1 regularization term. + /// Weight of L2 regularization term. + /// Memory size for . Lower=faster, less accurate. + /// Threshold for optimizer convergence. + /// A delegate to apply all the advanced arguments to the algorithm. + public static LogisticRegression LogisticRegression(this BinaryClassificationContext.BinaryClassificationTrainers ctx, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, + float l1Weight = LRArguments.Defaults.L1Weight, + float l2Weight = LRArguments.Defaults.L2Weight, + float optimizationTolerance = LRArguments.Defaults.OptTol, + int memorySize = LRArguments.Defaults.MemorySize, + bool enforceNoNegativity = LRArguments.Defaults.EnforceNonNegativity, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new LogisticRegression(env, labelColumn, featureColumn, weights, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity, advancedSettings); + } + + /// + /// Predict a target using a linear regression model trained with the trainer. + /// + /// The regression context trainer object. + /// The labelColumn, or dependent variable. + /// The features, or independent variables. + /// The optional example weights. + /// Weight of L1 regularization term. + /// Weight of L2 regularization term. + /// Threshold for optimizer convergence. + /// Memory size for . Lower=faster, less accurate. + /// Enforce non-negative weights. + /// A delegate to apply all the advanced arguments to the algorithm. + public static PoissonRegression PoissonRegression(this RegressionContext.RegressionTrainers ctx, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, + float l1Weight = LRArguments.Defaults.L1Weight, + float l2Weight = LRArguments.Defaults.L2Weight, + float optimizationTolerance = LRArguments.Defaults.OptTol, + int memorySize = LRArguments.Defaults.MemorySize, + bool enforceNoNegativity = LRArguments.Defaults.EnforceNonNegativity, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new PoissonRegression(env, labelColumn, featureColumn, weights, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity, advancedSettings); + } + + /// + /// Predict a target using a linear multiclass classification model trained with the trainer. + /// + /// The multiclass classification context trainer object. + /// The labelColumn, or dependent variable. + /// The features, or independent variables. + /// The optional example weights. + /// Enforce non-negative weights. + /// Weight of L1 regularization term. + /// Weight of L2 regularization term. + /// Memory size for . Lower=faster, less accurate. + /// Threshold for optimizer convergence. + /// A delegate to apply all the advanced arguments to the algorithm. + public static MulticlassLogisticRegression LogisticRegression(this MulticlassClassificationContext.MulticlassClassificationTrainers ctx, + string labelColumn = DefaultColumnNames.Label, + string featureColumn = DefaultColumnNames.Features, + string weights = null, + float l1Weight = LRArguments.Defaults.L1Weight, + float l2Weight = LRArguments.Defaults.L2Weight, + float optimizationTolerance = LRArguments.Defaults.OptTol, + int memorySize = LRArguments.Defaults.MemorySize, + bool enforceNoNegativity = LRArguments.Defaults.EnforceNonNegativity, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new MulticlassLogisticRegression(env, labelColumn, featureColumn, weights, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity, advancedSettings); + } + } +} diff --git a/src/Microsoft.ML.Sweeper/Algorithms/SmacSweeper.cs b/src/Microsoft.ML.Sweeper/Algorithms/SmacSweeper.cs index d78b6eaa7d..cf4de98e66 100644 --- a/src/Microsoft.ML.Sweeper/Algorithms/SmacSweeper.cs +++ b/src/Microsoft.ML.Sweeper/Algorithms/SmacSweeper.cs @@ -12,7 +12,6 @@ using Microsoft.ML.Runtime.Sweeper; using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Trainers.FastTree; using Microsoft.ML.Trainers.FastTree.Internal; using Microsoft.ML.Runtime.Internal.Utilities; @@ -163,20 +162,20 @@ private FastForestRegressionPredictor FitModel(IEnumerable previousR /// An array of ParamaterSets which are the candidate configurations to sweep. private ParameterSet[] GenerateCandidateConfigurations(int numOfCandidates, IEnumerable previousRuns, FastForestRegressionPredictor forest) { - ParameterSet[] configs = new ParameterSet[numOfCandidates]; - // Get k best previous runs ParameterSets. ParameterSet[] bestKParamSets = GetKBestConfigurations(previousRuns, forest, _args.LocalSearchParentCount); // Perform local searches using the k best previous run configurations. ParameterSet[] eiChallengers = GreedyPlusRandomSearch(bestKParamSets, forest, (int)Math.Ceiling(numOfCandidates / 2.0F), previousRuns); - // Generate another set of random configurations to interleave + // Generate another set of random configurations to interleave. ParameterSet[] randomChallengers = _randomSweeper.ProposeSweeps(numOfCandidates - eiChallengers.Length, previousRuns); - // Return interleaved challenger candidates with random candidates - for (int j = 0; j < configs.Length; j++) - configs[j] = j % 2 == 0 ? eiChallengers[j / 2] : randomChallengers[j / 2]; + // Return interleaved challenger candidates with random candidates. Since the number of candidates from either can be less than + // the number asked for, since we only generate unique candidates, and the number from either method may vary considerably. + ParameterSet[] configs = new ParameterSet[eiChallengers.Length + randomChallengers.Length]; + Array.Copy(eiChallengers, 0, configs, 0, eiChallengers.Length); + Array.Copy(randomChallengers, 0, configs, eiChallengers.Length, randomChallengers.Length); return configs; } diff --git a/src/Microsoft.ML.Sweeper/Algorithms/SweeperProbabilityUtils.cs b/src/Microsoft.ML.Sweeper/Algorithms/SweeperProbabilityUtils.cs index 08ef587596..503ffe75cc 100644 --- a/src/Microsoft.ML.Sweeper/Algorithms/SweeperProbabilityUtils.cs +++ b/src/Microsoft.ML.Sweeper/Algorithms/SweeperProbabilityUtils.cs @@ -2,12 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Float = System.Single; using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Microsoft.ML.Runtime.Internal.CpuMath; namespace Microsoft.ML.Runtime.Sweeper.Algorithms @@ -160,11 +156,11 @@ public static double[] InverseNormalize(double[] weights) return Normalize(weights); } - public static Float[] ParameterSetAsFloatArray(IHost host, IValueGenerator[] sweepParams, ParameterSet ps, bool expandCategoricals = true) + public static float[] ParameterSetAsFloatArray(IHost host, IValueGenerator[] sweepParams, ParameterSet ps, bool expandCategoricals = true) { host.Assert(ps.Count == sweepParams.Length); - var result = new List(); + var result = new List(); for (int i = 0; i < sweepParams.Length; i++) { @@ -212,7 +208,7 @@ public static Float[] ParameterSetAsFloatArray(IHost host, IValueGenerator[] swe return result.ToArray(); } - public static ParameterSet FloatArrayAsParameterSet(IHost host, IValueGenerator[] sweepParams, Float[] array, bool expandedCategoricals = true) + public static ParameterSet FloatArrayAsParameterSet(IHost host, IValueGenerator[] sweepParams, float[] array, bool expandedCategoricals = true) { Contracts.Assert(array.Length == sweepParams.Length); diff --git a/src/Microsoft.ML.Sweeper/AsyncSweeper.cs b/src/Microsoft.ML.Sweeper/AsyncSweeper.cs index fa537e793a..7f29dc2fa8 100644 --- a/src/Microsoft.ML.Sweeper/AsyncSweeper.cs +++ b/src/Microsoft.ML.Sweeper/AsyncSweeper.cs @@ -10,7 +10,6 @@ using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; -using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Sweeper; diff --git a/src/Microsoft.ML.Sweeper/ConfigRunner.cs b/src/Microsoft.ML.Sweeper/ConfigRunner.cs index 3219d691b1..504ba298a0 100644 --- a/src/Microsoft.ML.Sweeper/ConfigRunner.cs +++ b/src/Microsoft.ML.Sweeper/ConfigRunner.cs @@ -7,11 +7,8 @@ using System.IO; using System.Linq; using System.Threading.Tasks; - -using Microsoft.ML; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; -using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Sweeper; @@ -110,7 +107,9 @@ public virtual void Finish() string currentDirectory = Path.GetDirectoryName(typeof(ExeConfigRunnerBase).Module.FullyQualifiedName); using (var ch = Host.Start("Finish")) +#pragma warning disable CS0618 // As this deals with invoking command lines, this may be OK, though this code has some other problems. using (AssemblyLoadingUtils.CreateAssemblyRegistrar(Host, currentDirectory)) +#pragma warning restore CS0618 { var runs = RunNums.ToArray(); var args = Utils.BuildArray(RunNums.Count + 2, diff --git a/src/Microsoft.ML.Core/Prediction/ISweeper.cs b/src/Microsoft.ML.Sweeper/ISweeper.cs similarity index 100% rename from src/Microsoft.ML.Core/Prediction/ISweeper.cs rename to src/Microsoft.ML.Sweeper/ISweeper.cs diff --git a/src/Microsoft.ML.Sweeper/Microsoft.ML.Sweeper.csproj b/src/Microsoft.ML.Sweeper/Microsoft.ML.Sweeper.csproj index d48a762104..9ed5d25e0e 100644 --- a/src/Microsoft.ML.Sweeper/Microsoft.ML.Sweeper.csproj +++ b/src/Microsoft.ML.Sweeper/Microsoft.ML.Sweeper.csproj @@ -13,11 +13,6 @@ - - - - - diff --git a/src/Microsoft.ML.Sweeper/Parameters.cs b/src/Microsoft.ML.Sweeper/Parameters.cs index 1618881867..7e87d34c35 100644 --- a/src/Microsoft.ML.Sweeper/Parameters.cs +++ b/src/Microsoft.ML.Sweeper/Parameters.cs @@ -9,7 +9,6 @@ using System.Globalization; using System.Linq; using System.Text.RegularExpressions; -using Microsoft.ML; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Internal.Utilities; diff --git a/src/Microsoft.ML.Sweeper/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Sweeper/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..160c67eb55 --- /dev/null +++ b/src/Microsoft.ML.Sweeper/Properties/AssemblyInfo.cs @@ -0,0 +1,9 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.CompilerServices; +using Microsoft.ML; + +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Legacy" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PipelineInference" + PublicKey.Value)] diff --git a/src/Microsoft.ML.Sweeper/SweepCommand.cs b/src/Microsoft.ML.Sweeper/SweepCommand.cs index c738db0ef5..fe61dc3c6e 100644 --- a/src/Microsoft.ML.Sweeper/SweepCommand.cs +++ b/src/Microsoft.ML.Sweeper/SweepCommand.cs @@ -5,13 +5,10 @@ using System; using System.Collections.Generic; using System.IO; -using Microsoft.ML; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; -using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Sweeper; -using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Command; [assembly: LoadableClass(SweepCommand.Summary, typeof(SweepCommand), typeof(SweepCommand.Arguments), typeof(SignatureCommand), @@ -19,8 +16,10 @@ namespace Microsoft.ML.Runtime.Sweeper { - public sealed class SweepCommand : ICommand + [BestFriend] + internal sealed class SweepCommand : ICommand { +#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. public sealed class Arguments { [Argument(ArgumentType.Multiple, HelpText = "Config runner", ShortName = "run,ev,evaluator", SignatureType = typeof(SignatureConfigRunner))] @@ -42,6 +41,7 @@ public sealed class Arguments [Argument(ArgumentType.AtMostOnce, HelpText = "Random seed", ShortName = "seed")] public int? RandomSeed; } +#pragma warning restore CS0649 internal const string Summary = "Given a command line template and sweep ranges, creates and runs a sweep."; diff --git a/src/Microsoft.ML.Sweeper/SweepResultEvaluator.cs b/src/Microsoft.ML.Sweeper/SweepResultEvaluator.cs index fded15ddaf..1bfd37ec70 100644 --- a/src/Microsoft.ML.Sweeper/SweepResultEvaluator.cs +++ b/src/Microsoft.ML.Sweeper/SweepResultEvaluator.cs @@ -4,7 +4,6 @@ using System; using System.Text; -using Microsoft.ML; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.CommandLine; diff --git a/src/Microsoft.ML.Sweeper/SynthConfigRunner.cs b/src/Microsoft.ML.Sweeper/SynthConfigRunner.cs index bee7b8a60b..27da71cc64 100644 --- a/src/Microsoft.ML.Sweeper/SynthConfigRunner.cs +++ b/src/Microsoft.ML.Sweeper/SynthConfigRunner.cs @@ -7,12 +7,9 @@ using System.IO; using System.Threading.Tasks; -using Microsoft.ML; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; -using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Sweeper; -using Microsoft.ML.Runtime.Internal.Internallearn; [assembly: LoadableClass(typeof(SynthConfigRunner), typeof(SynthConfigRunner.Arguments), typeof(SignatureConfigRunner), "", "Synth")] diff --git a/src/Microsoft.ML.TensorFlow/TensorFlow/TensorflowUtils.cs b/src/Microsoft.ML.TensorFlow/TensorFlow/TensorflowUtils.cs index 8ac5e532a3..dbf080d9a1 100644 --- a/src/Microsoft.ML.TensorFlow/TensorFlow/TensorflowUtils.cs +++ b/src/Microsoft.ML.TensorFlow/TensorFlow/TensorflowUtils.cs @@ -115,8 +115,12 @@ public static ISchema GetModelSchema(IExceptionContext ectx, string modelFile) Contracts.Assert(metadataType.IsKnownSizeVector && metadataType.ItemType.IsText); schema.GetMetadata(TensorFlowUtils.InputOps, i, ref inputOps); } - yield return (name, opType.ToString(), type, - Utils.Size(inputOps.Values) > 0 ? inputOps.Values.Select(input => input.ToString()).ToArray() : new string[0]); + + string[] inputOpsResult = inputOps.DenseValues() + .Select(input => input.ToString()) + .ToArray(); + + yield return (name, opType.ToString(), type, inputOpsResult); } } @@ -328,16 +332,10 @@ internal static TFSession GetSession(IHostEnvironment env, string modelPath) return LoadTFSession(env, bytes, modelPath); } - internal static unsafe void FetchData(IntPtr data, T[] result) + internal static unsafe void FetchData(IntPtr data, Span result) { - var size = result.Length; - - GCHandle handle = GCHandle.Alloc(result, GCHandleType.Pinned); - IntPtr target = handle.AddrOfPinnedObject(); - - Int64 sizeInBytes = size * Marshal.SizeOf((typeof(T))); - Buffer.MemoryCopy(data.ToPointer(), target.ToPointer(), sizeInBytes, sizeInBytes); - handle.Free(); + var dataSpan = new Span(data.ToPointer(), result.Length); + dataSpan.CopyTo(result); } internal static bool IsTypeSupported(TFDataType tfoutput) diff --git a/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs b/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs index 8c0a079dd8..ff65f699e3 100644 --- a/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs +++ b/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs @@ -37,7 +37,7 @@ namespace Microsoft.ML.Transforms { /// - public sealed class TensorFlowTransform : ITransformer, ICanSaveModel + public sealed class TensorFlowTransform : RowToRowTransformerBase { public sealed class Arguments : TransformInputBase { @@ -140,10 +140,8 @@ public sealed class Arguments : TransformInputBase public bool ReTrain = false; } - private readonly IHost _host; private readonly string _savedModelPath; private readonly bool _isTemporarySavedModel; - private const string RegistrationName = "TensorFlowTransform"; internal readonly TFSession Session; internal readonly ColumnType[] OutputTypes; @@ -237,7 +235,7 @@ private static TensorFlowTransform Create(IHostEnvironment env, ModelLoadContext return new TensorFlowTransform(env, TensorFlowUtils.LoadTFSession(env, modelBytes), inputs, outputs, null, false); } - var tempDirPath = Path.GetFullPath(Path.Combine(Path.GetTempPath(), RegistrationName + "_" + Guid.NewGuid())); + var tempDirPath = Path.GetFullPath(Path.Combine(Path.GetTempPath(), nameof(TensorFlowTransform) + "_" + Guid.NewGuid())); TensorFlowUtils.CreateFolderWithAclIfNotExists(env, tempDirPath); try { @@ -285,7 +283,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV } internal TensorFlowTransform(IHostEnvironment env, Arguments args, IDataView input) - :this(env,args, TensorFlowUtils.LoadTensorFlowModel(env,args.ModelLocation), input) + : this(env, args, TensorFlowUtils.LoadTensorFlowModel(env, args.ModelLocation), input) { } @@ -310,49 +308,49 @@ internal TensorFlowTransform(IHostEnvironment env, Arguments args, TensorFlowMod private void CheckTrainingParameters(Arguments args) { - _host.CheckNonWhiteSpace(args.LabelColumn, nameof(args.LabelColumn)); - _host.CheckNonWhiteSpace(args.OptimizationOperation, nameof(args.OptimizationOperation)); + Host.CheckNonWhiteSpace(args.LabelColumn, nameof(args.LabelColumn)); + Host.CheckNonWhiteSpace(args.OptimizationOperation, nameof(args.OptimizationOperation)); if (Session.Graph[args.OptimizationOperation] == null) - throw _host.ExceptParam(nameof(args.OptimizationOperation), $"Optimization operation '{args.OptimizationOperation}' does not exist in the model"); + throw Host.ExceptParam(nameof(args.OptimizationOperation), $"Optimization operation '{args.OptimizationOperation}' does not exist in the model"); - _host.CheckNonWhiteSpace(args.TensorFlowLabel, nameof(args.TensorFlowLabel)); + Host.CheckNonWhiteSpace(args.TensorFlowLabel, nameof(args.TensorFlowLabel)); if (Session.Graph[args.TensorFlowLabel] == null) - throw _host.ExceptParam(nameof(args.TensorFlowLabel), $"'{args.TensorFlowLabel}' does not exist in the model"); + throw Host.ExceptParam(nameof(args.TensorFlowLabel), $"'{args.TensorFlowLabel}' does not exist in the model"); - _host.CheckNonWhiteSpace(args.SaveLocationOperation, nameof(args.SaveLocationOperation)); + Host.CheckNonWhiteSpace(args.SaveLocationOperation, nameof(args.SaveLocationOperation)); if (Session.Graph[args.SaveLocationOperation] == null) - throw _host.ExceptParam(nameof(args.SaveLocationOperation), $"'{args.SaveLocationOperation}' does not exist in the model"); + throw Host.ExceptParam(nameof(args.SaveLocationOperation), $"'{args.SaveLocationOperation}' does not exist in the model"); - _host.CheckNonWhiteSpace(args.SaveOperation, nameof(args.SaveOperation)); + Host.CheckNonWhiteSpace(args.SaveOperation, nameof(args.SaveOperation)); if (Session.Graph[args.SaveOperation] == null) - throw _host.ExceptParam(nameof(args.SaveOperation), $"'{args.SaveOperation}' does not exist in the model"); + throw Host.ExceptParam(nameof(args.SaveOperation), $"'{args.SaveOperation}' does not exist in the model"); if (args.LossOperation != null) { - _host.CheckNonWhiteSpace(args.LossOperation, nameof(args.LossOperation)); + Host.CheckNonWhiteSpace(args.LossOperation, nameof(args.LossOperation)); if (Session.Graph[args.LossOperation] == null) - throw _host.ExceptParam(nameof(args.LossOperation), $"'{args.LossOperation}' does not exist in the model"); + throw Host.ExceptParam(nameof(args.LossOperation), $"'{args.LossOperation}' does not exist in the model"); } if (args.MetricOperation != null) { - _host.CheckNonWhiteSpace(args.MetricOperation, nameof(args.MetricOperation)); + Host.CheckNonWhiteSpace(args.MetricOperation, nameof(args.MetricOperation)); if (Session.Graph[args.MetricOperation] == null) - throw _host.ExceptParam(nameof(args.MetricOperation), $"'{args.MetricOperation}' does not exist in the model"); + throw Host.ExceptParam(nameof(args.MetricOperation), $"'{args.MetricOperation}' does not exist in the model"); } if (args.LearningRateOperation != null) { - _host.CheckNonWhiteSpace(args.LearningRateOperation, nameof(args.LearningRateOperation)); + Host.CheckNonWhiteSpace(args.LearningRateOperation, nameof(args.LearningRateOperation)); if (Session.Graph[args.LearningRateOperation] == null) - throw _host.ExceptParam(nameof(args.LearningRateOperation), $"'{args.LearningRateOperation}' does not exist in the model"); + throw Host.ExceptParam(nameof(args.LearningRateOperation), $"'{args.LearningRateOperation}' does not exist in the model"); } } private (int, bool, TFDataType, TFShape) GetTrainingInputInfo(ISchema inputSchema, string columnName, string tfNodeName, int batchSize) { if (!inputSchema.TryGetColumnIndex(columnName, out int inputColIndex)) - throw _host.Except($"Column {columnName} doesn't exist"); + throw Host.Except($"Column {columnName} doesn't exist"); var type = inputSchema.GetColumnType(inputColIndex); var isInputVector = type.IsVector; @@ -372,7 +370,7 @@ private void CheckTrainingParameters(Arguments args) var expectedType = TensorFlowUtils.Tf2MlNetType(tfInputType); if (type.ItemType != expectedType) - throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", columnName, expectedType.ToString(), type.ToString()); + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", columnName, expectedType.ToString(), type.ToString()); return (inputColIndex, isInputVector, tfInputType, tfInputShape); } @@ -418,8 +416,8 @@ private void TrainCore(Arguments args, IDataView input) float loss = 0; float metric = 0; bool isDataLeft = false; - using (var ch = _host.Start("Training TensorFlow model...")) - using (var pch = _host.StartProgressChannel("TensorFlow training progress...")) + using (var ch = Host.Start("Training TensorFlow model...")) + using (var pch = Host.StartProgressChannel("TensorFlow training progress...")) { pch.SetHeader(new ProgressHeader(new[] { "Loss", "Metric" }, new[] { "Epoch" }), (e) => e.SetProgress(0, epoch, args.Epoch)); @@ -533,11 +531,11 @@ private void UpdateModelOnDisk(string modelDir, Arguments args) } if (tmpParamDir != null && tmpParamDir.Length > 0) - TensorFlowUtils.DeleteFolderWithRetries(_host, tmpParamDir[0]); + TensorFlowUtils.DeleteFolderWithRetries(Host, tmpParamDir[0]); } catch (Exception e) { - throw _host.ExceptIO(e, "Error serializing TensorFlow retrained model to disk."); + throw Host.ExceptIO(e, "Error serializing TensorFlow retrained model to disk."); } } @@ -602,13 +600,13 @@ private static void GetModelInfo(IHostEnvironment env, ModelLoadContext ctx, out outputs[j] = ctx.LoadNonEmptyString(); } - internal TensorFlowTransform(IHostEnvironment env, TFSession session, string[] inputs, string[] outputs, string savedModelPath, bool isTemporarySavedModel) + internal TensorFlowTransform(IHostEnvironment env, TFSession session, string[] inputs, string[] outputs, string savedModelPath, bool isTemporarySavedModel) : + base(Contracts.CheckRef(env, nameof(env)).Register(nameof(TensorFlowTransform))) + { - Contracts.CheckValue(env, nameof(env)); - _host = env.Register(nameof(RegistrationName)); - _host.CheckValue(session, nameof(session)); - _host.CheckNonEmpty(inputs, nameof(inputs)); - _host.CheckNonEmpty(outputs, nameof(outputs)); + Host.CheckValue(session, nameof(session)); + Host.CheckNonEmpty(inputs, nameof(inputs)); + Host.CheckNonEmpty(outputs, nameof(outputs)); Session = session; _savedModelPath = savedModelPath; @@ -616,8 +614,8 @@ internal TensorFlowTransform(IHostEnvironment env, TFSession session, string[] i Inputs = inputs; Outputs = outputs; - (TFInputTypes, TFInputShapes) = GetInputInfo(_host, Session, Inputs); - (TFOutputTypes, OutputTypes) = GetOutputInfo(_host, Session, Outputs); + (TFInputTypes, TFInputShapes) = GetInputInfo(Host, Session, Inputs); + (TFOutputTypes, OutputTypes) = GetOutputInfo(Host, Session, Outputs); } internal static (TFDataType[] tfInputTypes, TFShape[] tfInputShapes) GetInputInfo(IHost host, TFSession session, string[] inputs) @@ -680,30 +678,11 @@ internal static (TFDataType[] tfOutputTypes, ColumnType[] outputTypes) GetOutput return (tfOutputTypes, outputTypes); } - public Schema GetOutputSchema(Schema inputSchema) - { - _host.CheckValue(inputSchema, nameof(inputSchema)); - foreach (var input in Inputs) - { - if (!inputSchema.TryGetColumnIndex(input, out int srcCol)) - throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", input); - } - return Transform(new EmptyDataView(_host, inputSchema)).Schema; - } - - private IRowMapper MakeRowMapper(Schema schema) => new Mapper(_host, this, schema); + protected override IRowMapper MakeRowMapper(Schema inputSchema) => new Mapper(this, inputSchema); - private RowToRowMapperTransform MakeDataTransform(IDataView input) + public override void Save(ModelSaveContext ctx) { - _host.CheckValue(input, nameof(input)); - return new RowToRowMapperTransform(_host, input, MakeRowMapper(input.Schema), MakeRowMapper); - } - - public IDataView Transform(IDataView input) => MakeDataTransform(input); - - public void Save(ModelSaveContext ctx) - { - _host.AssertValue(ctx); + Host.AssertValue(ctx); ctx.CheckAtModel(); ctx.SetVersionInfo(GetVersionInfo()); @@ -751,17 +730,17 @@ public void Save(ModelSaveContext ctx) long fileLength = fs.Length; w.Write(fileLength); long actualWritten = fs.CopyRange(w.BaseStream, fileLength); - _host.Assert(actualWritten == fileLength); + Host.Assert(actualWritten == fileLength); } } }); } - _host.AssertNonEmpty(Inputs); + Host.AssertNonEmpty(Inputs); ctx.Writer.Write(Inputs.Length); foreach (var colName in Inputs) ctx.SaveNonEmptyString(colName); - _host.AssertNonEmpty(Outputs); + Host.AssertNonEmpty(Outputs); ctx.Writer.Write(Outputs.Length); foreach (var colName in Outputs) ctx.SaveNonEmptyString(colName); @@ -790,54 +769,42 @@ private void Dispose(bool disposing) { if (!string.IsNullOrEmpty(_savedModelPath) && _isTemporarySavedModel) { - TensorFlowUtils.DeleteFolderWithRetries(_host, _savedModelPath); + TensorFlowUtils.DeleteFolderWithRetries(Host, _savedModelPath); } } } - public bool IsRowToRowMapper => true; - - public IRowToRowMapper GetRowToRowMapper(Schema inputSchema) - { - _host.CheckValue(inputSchema, nameof(inputSchema)); - return MakeDataTransform(new EmptyDataView(_host, inputSchema)); - } - private sealed class Mapper : IRowMapper + private sealed class Mapper : MapperBase { - private readonly IHost _host; - private readonly ISchema _schema; private readonly TensorFlowTransform _parent; private readonly int[] _inputColIndices; private readonly bool[] _isInputVector; private readonly TFShape[] _fullySpecifiedShapes; - public Mapper(IHostEnvironment env, TensorFlowTransform parent, ISchema inputSchema) + public Mapper(TensorFlowTransform parent, Schema inputSchema) : + base(Contracts.CheckRef(parent, nameof(parent)).Host.Register(nameof(Mapper)), inputSchema) { - Contracts.CheckValue(env, nameof(env)); - _host = env.Register(nameof(Mapper)); - _host.CheckValue(inputSchema, nameof(inputSchema)); - _host.CheckValue(parent, nameof(parent)); + Host.CheckValue(parent, nameof(parent)); _parent = parent; - _schema = inputSchema; _inputColIndices = new int[_parent.Inputs.Length]; _isInputVector = new bool[_parent.Inputs.Length]; _fullySpecifiedShapes = new TFShape[_parent.Inputs.Length]; for (int i = 0; i < _parent.Inputs.Length; i++) { if (!inputSchema.TryGetColumnIndex(_parent.Inputs[i], out _inputColIndices[i])) - throw _host.Except($"Column {_parent.Inputs[i]} doesn't exist"); + throw Host.Except($"Column {_parent.Inputs[i]} doesn't exist"); var type = inputSchema.GetColumnType(_inputColIndices[i]); if (type is VectorType vecType && vecType.Size == 0) - throw _host.Except("Variable length input columns not supported"); + throw Host.Except("Variable length input columns not supported"); _isInputVector[i] = type is VectorType; if (!_isInputVector[i]) // Temporary pending fix of issue #1542. In its current state, the below code would fail anyway with a naked exception if this check was not here. - throw _host.Except("Non-vector columns not supported"); + throw Host.Except("Non-vector columns not supported"); vecType = (VectorType)type; var expectedType = TensorFlowUtils.Tf2MlNetType(_parent.TFInputTypes[i]); if (type.ItemType != expectedType) - throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.Inputs[i], expectedType.ToString(), type.ToString()); + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.Inputs[i], expectedType.ToString(), type.ToString()); var originalShape = _parent.TFInputShapes[i]; var shape = originalShape.ToIntArray(); @@ -880,10 +847,7 @@ public Mapper(IHostEnvironment env, TensorFlowTransform parent, ISchema inputSch } } - public void Save(ModelSaveContext ctx) - { - _parent.Save(ctx); - } + public override void Save(ModelSaveContext ctx) => _parent.Save(ctx); private class OutputCache { @@ -896,30 +860,23 @@ public OutputCache() } } - private Delegate[] MakeGetters(IRow input, Func activeOutput) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { - _host.AssertValue(input); + disposer = null; + Host.AssertValue(input); var outputCache = new OutputCache(); var activeOutputColNames = _parent.Outputs.Where((x, i) => activeOutput(i)).ToArray(); - var valueGetters = new Delegate[_parent.Outputs.Length]; - for (int i = 0; i < _parent.Outputs.Length; i++) - { - if (activeOutput(i)) - { - var type = TFTensor.TypeFromTensorType(_parent.TFOutputTypes[i]); - _host.Assert(type == _parent.OutputTypes[i].ItemType.RawType); - var srcTensorGetters = GetTensorValueGetters(input, _inputColIndices, _isInputVector, _parent.TFInputTypes, _fullySpecifiedShapes); - valueGetters[i] = Utils.MarshalInvoke(MakeGetter, type, input, i, srcTensorGetters, activeOutputColNames, outputCache); - } - } - return valueGetters; + var type = TFTensor.TypeFromTensorType(_parent.TFOutputTypes[iinfo]); + Host.Assert(type == _parent.OutputTypes[iinfo].ItemType.RawType); + var srcTensorGetters = GetTensorValueGetters(input, _inputColIndices, _isInputVector, _parent.TFInputTypes, _fullySpecifiedShapes); + return Utils.MarshalInvoke(MakeGetter, type, input, iinfo, srcTensorGetters, activeOutputColNames, outputCache); } private Delegate MakeGetter(IRow input, int iinfo, ITensorValueGetter[] srcTensorGetters, string[] activeOutputColNames, OutputCache outputCache) { - _host.AssertValue(input); + Host.AssertValue(input); ValueGetter> valuegetter = (ref VBuffer dst) => { UpdateCacheIfNeeded(input.Position, srcTensorGetters, activeOutputColNames, outputCache); @@ -927,12 +884,9 @@ private Delegate MakeGetter(IRow input, int iinfo, ITensorValueGetter[] srcTe var tensor = outputCache.Outputs[_parent.Outputs[iinfo]]; var tensorSize = tensor.Shape.Where(x => x > 0).Aggregate((x, y) => x * y); - var values = dst.Values; - if (Utils.Size(values) < tensorSize) - values = new T[tensorSize]; - - TensorFlowUtils.FetchData(tensor.Data, values); - dst = new VBuffer(values.Length, values, dst.Indices); + var editor = VBufferEditor.Create(ref dst, (int)tensorSize); + TensorFlowUtils.FetchData(tensor.Data, editor.Values); + dst = editor.Commit(); }; return valuegetter; } @@ -958,21 +912,12 @@ private void UpdateCacheIfNeeded(long position, ITensorValueGetter[] srcTensorGe } } - public Delegate[] CreateGetters(IRow input, Func activeOutput, out Action disposer) - { - disposer = null; - using (var ch = _host.Start("CreateGetters")) - { - return MakeGetters(input, activeOutput); - } - } - - public Func GetDependencies(Func activeOutput) + public override Func GetDependencies(Func activeOutput) { return col => Enumerable.Range(0, _parent.Outputs.Length).Any(i => activeOutput(i)) && _inputColIndices.Any(i => i == col); } - public Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var info = new Schema.Column[_parent.Outputs.Length]; for (int i = 0; i < _parent.Outputs.Length; i++) @@ -1058,7 +1003,7 @@ private class TensorValueGetterVec : ITensorValueGetter private readonly ValueGetter> _srcgetter; private readonly TFShape _tfShape; private VBuffer _vBuffer; - private VBuffer _vBufferDense; + private T[] _denseData; private readonly T[] _bufferedData; private int _position; @@ -1067,7 +1012,7 @@ public TensorValueGetterVec(IRow input, int colIndex, TFShape tfShape) _srcgetter = input.GetGetter>(colIndex); _tfShape = tfShape; _vBuffer = default; - _vBufferDense = default; + _denseData = default; long size = 0; _position = 0; @@ -1083,8 +1028,11 @@ public TensorValueGetterVec(IRow input, int colIndex, TFShape tfShape) public TFTensor GetTensor() { _srcgetter(ref _vBuffer); - _vBuffer.CopyToDense(ref _vBufferDense); - return TFTensor.Create(_vBufferDense.Values, _vBufferDense.Length, _tfShape); + + Utils.EnsureSize(ref _denseData, _vBuffer.Length, keepOld: false); + _vBuffer.CopyTo(_denseData); + + return TFTensor.Create(_denseData, _vBuffer.Length, _tfShape); } public void BufferTrainingData() @@ -1113,17 +1061,17 @@ public sealed class TensorFlowEstimator : IEstimator private TensorFlowTransform _transformer; public TensorFlowEstimator(IHostEnvironment env, string modelLocation, string[] inputs, string[] outputs) - :this(env, TensorFlowUtils.LoadTensorFlowModel(env,modelLocation), inputs, outputs) + : this(env, TensorFlowUtils.LoadTensorFlowModel(env, modelLocation), inputs, outputs) { } public TensorFlowEstimator(IHostEnvironment env, TensorFlowModelInfo tensorFlowModel, string[] inputs, string[] outputs) - :this(env, CreateArguments(tensorFlowModel,inputs, outputs), tensorFlowModel) + : this(env, CreateArguments(tensorFlowModel, inputs, outputs), tensorFlowModel) { } public TensorFlowEstimator(IHostEnvironment env, TensorFlowTransform.Arguments args) - :this(env, args, TensorFlowUtils.LoadTensorFlowModel(env, args.ModelLocation)) + : this(env, args, TensorFlowUtils.LoadTensorFlowModel(env, args.ModelLocation)) { } diff --git a/src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs b/src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs index a2b85313d6..c60717bce1 100644 --- a/src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs +++ b/src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs @@ -14,7 +14,7 @@ using Microsoft.ML.Runtime.Model; using Microsoft.ML.Runtime.TimeSeriesProcessing; -[assembly: LoadableClass(typeof(ISequenceModeler), typeof(AdaptiveSingularSpectrumSequenceModeler), null, typeof(SignatureLoadModel), +[assembly: LoadableClass(typeof(AdaptiveSingularSpectrumSequenceModeler), typeof(AdaptiveSingularSpectrumSequenceModeler), null, typeof(SignatureLoadModel), "SSA Sequence Modeler", AdaptiveSingularSpectrumSequenceModeler.LoaderSignature)] @@ -24,7 +24,7 @@ namespace Microsoft.ML.Runtime.TimeSeriesProcessing /// This class implements basic Singular Spectrum Analysis (SSA) model for modeling univariate time-series. /// For the details of the model, refer to http://arxiv.org/pdf/1206.6910.pdf. ///
- public sealed class AdaptiveSingularSpectrumSequenceModeler : ISequenceModeler + public sealed class AdaptiveSingularSpectrumSequenceModeler : SequenceModelerBase { public const string LoaderSignature = "SSAModel"; @@ -239,7 +239,6 @@ private static VersionInfo GetVersionInfo() /// The length of series that is kept in buffer for modeling (parameter N). /// The length of the window on the series for building the trajectory matrix (parameter L). /// The discount factor in [0,1] used for online updates (default = 1). - /// The buffer used to keep the series in the memory. If null, an internal buffer is created (default = null). /// The rank selection method (default = Exact). /// The desired rank of the subspace used for SSA projection (parameter r). This parameter should be in the range in [1, windowSize]. /// If set to null, the rank is automatically determined based on prediction error minimization. (default = null) @@ -249,8 +248,9 @@ private static VersionInfo GetVersionInfo() /// The flag determining whether the meta information for the model needs to be maintained. /// The maximum growth on the exponential trend public AdaptiveSingularSpectrumSequenceModeler(IHostEnvironment env, int trainSize, int seriesLength, int windowSize, Single discountFactor = 1, - FixedSizeQueue buffer = null, RankSelectionMethod rankSelectionMethod = RankSelectionMethod.Exact, int? rank = null, int? maxRank = null, + RankSelectionMethod rankSelectionMethod = RankSelectionMethod.Exact, int? rank = null, int? maxRank = null, bool shouldComputeForecastIntervals = true, bool shouldstablize = true, bool shouldMaintainInfo = false, GrowthRatio? maxGrowth = null) + : base() { Contracts.CheckValue(env, nameof(env)); _host = env.Register(LoaderSignature); @@ -285,10 +285,7 @@ public AdaptiveSingularSpectrumSequenceModeler(IHostEnvironment env, int trainSi _trainSize = trainSize; _discountFactor = discountFactor; - if (buffer == null) - _buffer = new FixedSizeQueue(seriesLength); - else - _buffer = buffer; + _buffer = new FixedSizeQueue(seriesLength); _alpha = new Single[windowSize - 1]; _state = new Single[windowSize - 1]; @@ -312,7 +309,7 @@ public AdaptiveSingularSpectrumSequenceModeler(IHostEnvironment env, int trainSi } /// - /// The copy constructor + /// The copy constructor. /// /// An object whose contents are copied to the current object. private AdaptiveSingularSpectrumSequenceModeler(AdaptiveSingularSpectrumSequenceModeler model) @@ -465,7 +462,7 @@ public AdaptiveSingularSpectrumSequenceModeler(IHostEnvironment env, ModelLoadCo _xSmooth = new CpuAlignedVector(_windowSize, SseUtils.CbAlign); } - public void Save(ModelSaveContext ctx) + public override void Save(ModelSaveContext ctx) { _host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(); @@ -741,7 +738,7 @@ private static int DetermineSignalRank(Single[] series, TrajectoryMatrix tMat, S return minIndex + 1; } - public void InitState() + internal override void InitState() { for (int i = 0; i < _windowSize - 2; ++i) _state[i] = 0; @@ -1114,7 +1111,7 @@ private bool Stabilize() ///
/// The next observation on the series. /// Determines whether the model parameters also need to be updated upon consuming the new observation (default = false). - public void Consume(ref Single input, bool updateModel = false) + internal override void Consume(ref Single input, bool updateModel = false) { if (Single.IsNaN(input)) return; @@ -1177,7 +1174,7 @@ public void Consume(ref Single input, bool updateModel = false) /// Train the model parameters based on a training series. ///
/// The training time-series. - public void Train(FixedSizeQueue data) + internal override void Train(FixedSizeQueue data) { _host.CheckParam(data != null, nameof(data), "The input series for training cannot be null."); _host.CheckParam(data.Count >= _trainSize, nameof(data), "The input series for training does not have enough points for training."); @@ -1218,7 +1215,7 @@ public void Train(FixedSizeQueue data) /// Train the model parameters based on a training series. ///
/// The training time-series. - public void Train(RoleMappedData data) + internal override void Train(RoleMappedData data) { _host.CheckParam(data != null, nameof(data), "The input series for training cannot be null."); if (data.Schema.Feature.Type != NumberType.Float) @@ -1428,7 +1425,7 @@ private void TrainCore(Single[] dataArray, int originalSeriesLength) ///
/// The forecast result. /// The forecast horizon. - public void Forecast(ref ForecastResultBase result, int horizon = 1) + internal override void Forecast(ref ForecastResultBase result, int horizon = 1) { _host.CheckParam(horizon >= 1, nameof(horizon), "The horizon parameter should be greater than 0."); if (result == null) @@ -1439,41 +1436,36 @@ public void Forecast(ref ForecastResultBase result, int horizon = 1) var output = result as SsaForecastResult; - var res = result.PointForecast.Values; - if (Utils.Size(res) < horizon) - res = new Single[horizon]; + var resEditor = VBufferEditor.Create(ref result.PointForecast, horizon); int i; int j; int k; // Computing the point forecasts - res[0] = _nextPrediction; + resEditor.Values[0] = _nextPrediction; for (i = 1; i < horizon; ++i) { k = 0; - res[i] = _autoregressionNoiseMean + _observationNoiseMean; + resEditor.Values[i] = _autoregressionNoiseMean + _observationNoiseMean; for (j = i; j < _windowSize - 1; ++j, ++k) - res[i] += _state[j] * _alpha[k]; + resEditor.Values[i] += _state[j] * _alpha[k]; for (j = Math.Max(0, i - _windowSize + 1); j < i; ++j, ++k) - res[i] += res[j] * _alpha[k]; + resEditor.Values[i] += resEditor.Values[j] * _alpha[k]; } // Computing the forecast variances if (ShouldComputeForecastIntervals) { - var sd = output.ForecastStandardDeviation.Values; - if (Utils.Size(sd) < horizon) - sd = new Single[horizon]; - + var sdEditor = VBufferEditor.Create(ref output.ForecastStandardDeviation, horizon); var lastCol = new FixedSizeQueue(_windowSize - 1); for (i = 0; i < _windowSize - 3; ++i) lastCol.AddLast(0); lastCol.AddLast(1); lastCol.AddLast(_alpha[_windowSize - 2]); - sd[0] = _autoregressionNoiseVariance + _observationNoiseVariance; + sdEditor.Values[0] = _autoregressionNoiseVariance + _observationNoiseVariance; for (i = 1; i < horizon; ++i) { @@ -1482,16 +1474,16 @@ public void Forecast(ref ForecastResultBase result, int horizon = 1) temp += _alpha[j] * lastCol[j]; lastCol.AddLast(temp); - sd[i] = sd[i - 1] + _autoregressionNoiseVariance * temp * temp; + sdEditor.Values[i] = sdEditor.Values[i - 1] + _autoregressionNoiseVariance * temp * temp; } for (i = 0; i < horizon; ++i) - sd[i] = (float)Math.Sqrt(sd[i]); + sdEditor.Values[i] = (float)Math.Sqrt(sdEditor.Values[i]); - output.ForecastStandardDeviation = new VBuffer(horizon, sd, output.ForecastStandardDeviation.Indices); + output.ForecastStandardDeviation = sdEditor.Commit(); } - result.PointForecast = new VBuffer(horizon, res, result.PointForecast.Indices); + result.PointForecast = resEditor.Commit(); output.CanComputeForecastIntervals = ShouldComputeForecastIntervals; output.BoundOffset = 0; } @@ -1500,12 +1492,12 @@ public void Forecast(ref ForecastResultBase result, int horizon = 1) /// Predicts the next value on the series. ///
/// The prediction result. - public void PredictNext(ref Single output) + internal override void PredictNext(ref Single output) { output = _nextPrediction; } - public ISequenceModeler Clone() + internal override SequenceModelerBase Clone() { return new AdaptiveSingularSpectrumSequenceModeler(this); } @@ -1521,35 +1513,30 @@ public static void ComputeForecastIntervals(ref SsaForecastResult forecast, Sing Contracts.CheckValue(forecast, nameof(forecast)); Contracts.Check(forecast.CanComputeForecastIntervals, "The forecast intervals cannot be computed for this forecast object."); - var horizon = Utils.Size(forecast.PointForecast.Values); - Contracts.Check(Utils.Size(forecast.ForecastStandardDeviation.Values) >= horizon, "The forecast standard deviation values are not available."); + var meanForecast = forecast.PointForecast.GetValues(); + var horizon = meanForecast.Length; + var sdForecast = forecast.ForecastStandardDeviation.GetValues(); + Contracts.Check(sdForecast.Length >= horizon, "The forecast standard deviation values are not available."); forecast.ConfidenceLevel = confidenceLevel; if (horizon == 0) return; - var upper = forecast.UpperBound.Values; - if (Utils.Size(upper) < horizon) - upper = new Single[horizon]; - - var lower = forecast.LowerBound.Values; - if (Utils.Size(lower) < horizon) - lower = new Single[horizon]; + var upper = VBufferEditor.Create(ref forecast.UpperBound, horizon); + var lower = VBufferEditor.Create(ref forecast.LowerBound, horizon); var z = ProbabilityFunctions.Probit(0.5 + confidenceLevel / 2.0); - var meanForecast = forecast.PointForecast.Values; - var sdForecast = forecast.ForecastStandardDeviation.Values; double temp; for (int i = 0; i < horizon; ++i) { temp = z * sdForecast[i]; - upper[i] = (Single)(meanForecast[i] + forecast.BoundOffset + temp); - lower[i] = (Single)(meanForecast[i] + forecast.BoundOffset - temp); + upper.Values[i] = (Single)(meanForecast[i] + forecast.BoundOffset + temp); + lower.Values[i] = (Single)(meanForecast[i] + forecast.BoundOffset - temp); } - forecast.UpperBound = new VBuffer(horizon, upper, forecast.UpperBound.Indices); - forecast.LowerBound = new VBuffer(horizon, lower, forecast.LowerBound.Indices); + forecast.UpperBound = upper.Commit(); + forecast.LowerBound = lower.Commit(); } } } diff --git a/src/Microsoft.ML.TimeSeries/ExponentialAverageTransform.cs b/src/Microsoft.ML.TimeSeries/ExponentialAverageTransform.cs index a6a7c20986..8a1807a797 100644 --- a/src/Microsoft.ML.TimeSeries/ExponentialAverageTransform.cs +++ b/src/Microsoft.ML.TimeSeries/ExponentialAverageTransform.cs @@ -109,12 +109,12 @@ public State() _firstIteration = true; } - protected override void SetNaOutput(ref Single output) + private protected override void SetNaOutput(ref Single output) { output = Single.NaN; } - protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref Single output) + private protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref Single output) { if (_firstIteration) { @@ -127,13 +127,13 @@ protected override void TransformCore(ref Single input, FixedSizeQueue w _previousAverage = output; } - protected override void InitializeStateCore() + private protected override void InitializeStateCore() { _firstIteration = true; _decay = ((ExponentialAverageTransform)ParentTransform)._decay; } - protected override void LearnStateFromDataCore(FixedSizeQueue data) + private protected override void LearnStateFromDataCore(FixedSizeQueue data) { // This method is empty because there is no need for parameter learning from the initial windowed buffer for this transform. } diff --git a/src/Microsoft.ML.TimeSeries/IidAnomalyDetectionBase.cs b/src/Microsoft.ML.TimeSeries/IidAnomalyDetectionBase.cs index 900407adec..f19694e38d 100644 --- a/src/Microsoft.ML.TimeSeries/IidAnomalyDetectionBase.cs +++ b/src/Microsoft.ML.TimeSeries/IidAnomalyDetectionBase.cs @@ -54,17 +54,17 @@ public override void Save(ModelSaveContext ctx) public sealed class State : AnomalyDetectionStateBase { - protected override void LearnStateFromDataCore(FixedSizeQueue data) + private protected override void LearnStateFromDataCore(FixedSizeQueue data) { // This method is empty because there is no need for initial tuning for this transform. } - protected override void InitializeAnomalyDetector() + private protected override void InitializeAnomalyDetector() { // This method is empty because there is no need for any extra initialization for this transform. } - protected override double ComputeRawAnomalyScore(ref Single input, FixedSizeQueue windowedBuffer, long iteration) + private protected override double ComputeRawAnomalyScore(ref Single input, FixedSizeQueue windowedBuffer, long iteration) { // This transform treats the input sequenence as the raw anomaly score. return (double)input; diff --git a/src/Microsoft.ML.TimeSeries/IidChangePointDetector.cs b/src/Microsoft.ML.TimeSeries/IidChangePointDetector.cs index 5338ae95cf..1fb5b2e62e 100644 --- a/src/Microsoft.ML.TimeSeries/IidChangePointDetector.cs +++ b/src/Microsoft.ML.TimeSeries/IidChangePointDetector.cs @@ -188,6 +188,14 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc /// /// Estimator for /// + ///

Example code can be found by searching for IidChangePointDetector in ML.NET.

+ /// + /// + /// + /// + /// public sealed class IidChangePointEstimator : TrivialEstimator { /// @@ -200,12 +208,6 @@ public sealed class IidChangePointEstimator : TrivialEstimatorThe length of the sliding window on p-values for computing the martingale score. /// The martingale used for scoring. /// The epsilon parameter for the Power martingale. - ///

Example code can be found by searching for IidChangePointDetector in ML.NET.

- /// - /// - /// public IidChangePointEstimator(IHostEnvironment env, string inputColumn, string outputColumn, int confidence, int changeHistoryLength, MartingaleType martingale = MartingaleType.Power, double eps = 0.1) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(IidChangePointEstimator)), diff --git a/src/Microsoft.ML.TimeSeries/IidSpikeDetector.cs b/src/Microsoft.ML.TimeSeries/IidSpikeDetector.cs index ceb3470049..9ccb302eb6 100644 --- a/src/Microsoft.ML.TimeSeries/IidSpikeDetector.cs +++ b/src/Microsoft.ML.TimeSeries/IidSpikeDetector.cs @@ -167,6 +167,14 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc /// /// Estimator for /// + ///

Example code can be found by searching for IidSpikeDetector in ML.NET.

+ /// + /// + /// + /// + /// public sealed class IidSpikeEstimator : TrivialEstimator { /// @@ -178,12 +186,6 @@ public sealed class IidSpikeEstimator : TrivialEstimator /// The confidence for spike detection in the range [0, 100]. /// The size of the sliding window for computing the p-value. /// The argument that determines whether to detect positive or negative anomalies, or both. - ///

Example code can be found by searching for IidSpikeDetector in ML.NET.

- /// - /// - /// public IidSpikeEstimator(IHostEnvironment env, string inputColumn, string outputColumn, int confidence, int pvalueHistoryLength, AnomalySide side = AnomalySide.TwoSided) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(IidSpikeDetector)), new IidSpikeDetector(env, new IidSpikeDetector.Arguments diff --git a/src/Microsoft.ML.TimeSeries/MovingAverageTransform.cs b/src/Microsoft.ML.TimeSeries/MovingAverageTransform.cs index da71c8d5e9..da4094a125 100644 --- a/src/Microsoft.ML.TimeSeries/MovingAverageTransform.cs +++ b/src/Microsoft.ML.TimeSeries/MovingAverageTransform.cs @@ -143,7 +143,7 @@ private static Single ComputeMovingAverageUniformInitialisation(FixedSizeQueue others, Single input, Single[] weights, int lag) + internal static Single ComputeMovingAverageNonUniform(FixedSizeQueue others, Single input, Single[] weights, int lag) { Single sumWeights = 0; Single sumValues = 0; @@ -178,7 +178,7 @@ public static Single ComputeMovingAverageNonUniform(FixedSizeQueue other /// NaN value: only NaN values in the sliding window or +/- Infinite /// Inifinite value: one infinite value in the sliding window (sign is no relevant) ///
- public static Single ComputeMovingAverageUniform(FixedSizeQueue others, Single input, int lag, + internal static Single ComputeMovingAverageUniform(FixedSizeQueue others, Single input, int lag, Single lastDropped, ref Single currentSum, ref bool initUniformMovingAverage, ref int nbNanValues) @@ -262,7 +262,7 @@ public sealed class State : StateBase // take part of the computation. private int _nbNanValues; - protected override void SetNaOutput(ref Single output) + private protected override void SetNaOutput(ref Single output) { output = Single.NaN; } @@ -274,7 +274,7 @@ protected override void SetNaOutput(ref Single output) /// /// /// - protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref Single output) + private protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref Single output) { if (_weights == null) output = ComputeMovingAverageUniform(windowedBuffer, input, _lag, _lastDroppedValue, ref _currentSum, ref _initUniformMovingAverage, ref _nbNanValues); @@ -283,14 +283,14 @@ protected override void TransformCore(ref Single input, FixedSizeQueue w _lastDroppedValue = windowedBuffer[0]; } - protected override void InitializeStateCore() + private protected override void InitializeStateCore() { _weights = ((MovingAverageTransform)ParentTransform)._weights; _lag = ((MovingAverageTransform)ParentTransform)._lag; _initUniformMovingAverage = true; } - protected override void LearnStateFromDataCore(FixedSizeQueue data) + private protected override void LearnStateFromDataCore(FixedSizeQueue data) { // This method is empty because there is no need for parameter learning from the initial windowed buffer for this transform. } diff --git a/src/Microsoft.ML.TimeSeries/PValueTransform.cs b/src/Microsoft.ML.TimeSeries/PValueTransform.cs index b6490de3c7..36e8bebf4b 100644 --- a/src/Microsoft.ML.TimeSeries/PValueTransform.cs +++ b/src/Microsoft.ML.TimeSeries/PValueTransform.cs @@ -113,12 +113,12 @@ public sealed class State : StateBase private PValueTransform _parent; - protected override void SetNaOutput(ref Single dst) + private protected override void SetNaOutput(ref Single dst) { dst = Single.NaN; } - protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref Single dst) + private protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref Single dst) { int count; int equalCount; @@ -131,13 +131,13 @@ protected override void TransformCore(ref Single input, FixedSizeQueue w // Based on the equation in http://arxiv.org/pdf/1204.3251.pdf } - protected override void InitializeStateCore() + private protected override void InitializeStateCore() { _parent = (PValueTransform)ParentTransform; _randomGen = RandomUtils.Create(_parent._seed); } - protected override void LearnStateFromDataCore(FixedSizeQueue data) + private protected override void LearnStateFromDataCore(FixedSizeQueue data) { // This method is empty because there is no need for parameter learning from the initial windowed buffer for this transform. } diff --git a/src/Microsoft.ML.TimeSeries/PercentileThresholdTransform.cs b/src/Microsoft.ML.TimeSeries/PercentileThresholdTransform.cs index 9d771ef21a..571a1b1bc4 100644 --- a/src/Microsoft.ML.TimeSeries/PercentileThresholdTransform.cs +++ b/src/Microsoft.ML.TimeSeries/PercentileThresholdTransform.cs @@ -101,7 +101,7 @@ public override void Save(ModelSaveContext ctx) ctx.Writer.Write(_percentile); } - public static void CountGreaterOrEqualValues(FixedSizeQueue others, Single theValue, out int greaterVals, out int equalVals, out int totalVals) + internal static void CountGreaterOrEqualValues(FixedSizeQueue others, Single theValue, out int greaterVals, out int equalVals, out int totalVals) { // The current linear algorithm for counting greater and equal elements takes O(n), // but it can be improved to O(log n) if a separate Binary Search Tree data structure is used. @@ -130,12 +130,12 @@ public sealed class State : StateBase ///
private PercentileThresholdTransform _parent; - protected override void SetNaOutput(ref bool dst) + private protected override void SetNaOutput(ref bool dst) { dst = false; } - protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref bool dst) + private protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref bool dst) { int greaterCount; int equalCount; @@ -145,15 +145,15 @@ protected override void TransformCore(ref Single input, FixedSizeQueue w dst = greaterCount < (int)(_parent._percentile * totalCount / 100); } - protected override void InitializeStateCore() + private protected override void InitializeStateCore() { _parent = (PercentileThresholdTransform)ParentTransform; } - protected override void LearnStateFromDataCore(FixedSizeQueue data) + private protected override void LearnStateFromDataCore(FixedSizeQueue data) { // This method is empty because there is no need for parameter learning from the initial windowed buffer for this transform. } } } -} +} \ No newline at end of file diff --git a/src/Microsoft.ML.TimeSeries/ISequenceModeler.cs b/src/Microsoft.ML.TimeSeries/SequenceModelerBase.cs similarity index 75% rename from src/Microsoft.ML.TimeSeries/ISequenceModeler.cs rename to src/Microsoft.ML.TimeSeries/SequenceModelerBase.cs index 5ee0c01711..5b7b86d93f 100644 --- a/src/Microsoft.ML.TimeSeries/ISequenceModeler.cs +++ b/src/Microsoft.ML.TimeSeries/SequenceModelerBase.cs @@ -22,50 +22,59 @@ public abstract class ForecastResultBase ///
/// The type of the elements in the input sequence /// The type of the elements in the output sequence - public interface ISequenceModeler : ICanSaveModel + public abstract class SequenceModelerBase : ICanSaveModel { + private protected SequenceModelerBase() + { + } + /// /// Initializes the state of the modeler /// - void InitState(); + internal abstract void InitState(); /// /// Consumes one element from the input sequence. /// /// An element in the sequence /// determines whether the sequence model should be updated according to the input - void Consume(ref TInput input, bool updateModel = false); + internal abstract void Consume(ref TInput input, bool updateModel = false); /// /// Trains the sequence model on a given sequence. /// /// The input sequence used for training - void Train(FixedSizeQueue data); + internal abstract void Train(FixedSizeQueue data); /// /// Trains the sequence model on a given sequence. The method accepts an object of RoleMappedData, /// and assumes the input column is the 'Feature' column of type TInput. /// /// The input sequence used for training - void Train(RoleMappedData data); + internal abstract void Train(RoleMappedData data); /// /// Forecasts the next 'horizon' elements in the output sequence. /// /// The forecast result for the given horizon along with optional information depending on the algorithm /// The forecast horizon - void Forecast(ref ForecastResultBase result, int horizon = 1); + internal abstract void Forecast(ref ForecastResultBase result, int horizon = 1); /// /// Predicts the next element in the output sequence. /// /// The output ref parameter the will contain the prediction result - void PredictNext(ref TOutput output); + internal abstract void PredictNext(ref TOutput output); /// /// Creates a clone of the model. /// /// A clone of the object - ISequenceModeler Clone(); + internal abstract SequenceModelerBase Clone(); + + /// + /// Implementation of . + /// + public abstract void Save(ModelSaveContext ctx); } } diff --git a/src/Microsoft.ML.TimeSeries/SequentialAnomalyDetectionTransformBase.cs b/src/Microsoft.ML.TimeSeries/SequentialAnomalyDetectionTransformBase.cs index e80f41a985..5c3f2403ac 100644 --- a/src/Microsoft.ML.TimeSeries/SequentialAnomalyDetectionTransformBase.cs +++ b/src/Microsoft.ML.TimeSeries/SequentialAnomalyDetectionTransformBase.cs @@ -159,7 +159,7 @@ private static int GetOutputLength(AlertingScore alertingScore, IHostEnvironment } } - protected SequentialAnomalyDetectionTransformBase(int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, string name, IHostEnvironment env, + private protected SequentialAnomalyDetectionTransformBase(int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, string name, IHostEnvironment env, AnomalySide anomalySide, MartingaleType martingale, AlertingScore alertingScore, Double powerMartingaleEpsilon, Double alertThreshold) : base(Contracts.CheckRef(env, nameof(env)).Register(name), windowSize, initialWindowSize, inputColumnName, outputColumnName, new VectorType(NumberType.R8, GetOutputLength(alertingScore, env))) @@ -183,13 +183,13 @@ protected SequentialAnomalyDetectionTransformBase(int windowSize, int initialWin _outputLength = GetOutputLength(ThresholdScore, Host); } - protected SequentialAnomalyDetectionTransformBase(ArgumentsBase args, string name, IHostEnvironment env) + private protected SequentialAnomalyDetectionTransformBase(ArgumentsBase args, string name, IHostEnvironment env) : this(args.WindowSize, args.InitialWindowSize, args.Source, args.Name, name, env, args.Side, args.Martingale, args.AlertOn, args.PowerMartingaleEpsilon, args.AlertThreshold) { } - protected SequentialAnomalyDetectionTransformBase(IHostEnvironment env, ModelLoadContext ctx, string name) + private protected SequentialAnomalyDetectionTransformBase(IHostEnvironment env, ModelLoadContext ctx, string name) : base(Contracts.CheckRef(env, nameof(env)).Register(name), ctx) { // *** Binary format *** @@ -319,8 +319,10 @@ public abstract class AnomalyDetectionStateBase : StateBase private int _martingaleAlertCounter; - protected Double LatestMartingaleScore { - get { return Math.Exp(_logMartingaleValue); } + protected Double LatestMartingaleScore => Math.Exp(_logMartingaleValue); + + private protected AnomalyDetectionStateBase() : base() + { } private Double ComputeKernelPValue(Double rawScore) @@ -359,83 +361,78 @@ private Double ComputeKernelPValue(Double rawScore) return pValue; } - protected override void SetNaOutput(ref VBuffer dst) + private protected override void SetNaOutput(ref VBuffer dst) { - var values = dst.Values; var outputLength = Parent._outputLength; - if (Utils.Size(values) < outputLength) - values = new Double[outputLength]; + var editor = VBufferEditor.Create(ref dst, outputLength); for (int i = 0; i < outputLength; ++i) - values[i] = Double.NaN; + editor.Values[i] = Double.NaN; - dst = new VBuffer(Utils.Size(values), values, dst.Indices); + dst = editor.Commit(); } - protected override sealed void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref VBuffer dst) + private protected override sealed void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref VBuffer dst) { var outputLength = Parent._outputLength; Host.Assert(outputLength >= 2); - var result = dst.Values; - if (Utils.Size(result) < outputLength) - result = new Double[outputLength]; - + var result = VBufferEditor.Create(ref dst, outputLength); float rawScore = 0; for (int i = 0; i < outputLength; ++i) - result[i] = Double.NaN; + result.Values[i] = Double.NaN; // Step 1: Computing the raw anomaly score - result[1] = ComputeRawAnomalyScore(ref input, windowedBuffer, iteration); + result.Values[1] = ComputeRawAnomalyScore(ref input, windowedBuffer, iteration); - if (Double.IsNaN(result[1])) - result[0] = 0; + if (Double.IsNaN(result.Values[1])) + result.Values[0] = 0; else { if (WindowSize > 0) { // Step 2: Computing the p-value score - rawScore = (float)result[1]; + rawScore = (float)result.Values[1]; if (Parent.ThresholdScore == AlertingScore.RawScore) { switch (Parent.Side) { case AnomalySide.Negative: - rawScore = (float)(-result[1]); + rawScore = (float)(-result.Values[1]); break; case AnomalySide.Positive: break; default: - rawScore = (float)Math.Abs(result[1]); + rawScore = (float)Math.Abs(result.Values[1]); break; } } else { - result[2] = ComputeKernelPValue(rawScore); + result.Values[2] = ComputeKernelPValue(rawScore); switch (Parent.Side) { case AnomalySide.Negative: - result[2] = 1 - result[2]; + result.Values[2] = 1 - result.Values[2]; break; case AnomalySide.Positive: break; default: - result[2] = Math.Min(result[2], 1 - result[2]); + result.Values[2] = Math.Min(result.Values[2], 1 - result.Values[2]); break; } // Keeping the p-value in the safe range - if (result[2] < MinPValue) - result[2] = MinPValue; - else if (result[2] > MaxPValue) - result[2] = MaxPValue; + if (result.Values[2] < MinPValue) + result.Values[2] = MinPValue; + else if (result.Values[2] > MaxPValue) + result.Values[2] = MaxPValue; _rawScoreBuffer.AddLast(rawScore); @@ -446,11 +443,11 @@ protected override sealed void TransformCore(ref TInput input, FixedSizeQueue= Parent.AlertThreshold; break; case AlertingScore.PValueScore: - alert = result[2] <= Parent.AlertThreshold; + alert = result.Values[2] <= Parent.AlertThreshold; break; case AlertingScore.MartingaleScore: - alert = (Parent.Martingale != MartingaleType.None) && (result[3] >= Parent.AlertThreshold); + alert = (Parent.Martingale != MartingaleType.None) && (result.Values[3] >= Parent.AlertThreshold); if (alert) { @@ -502,13 +499,13 @@ protected override sealed void TransformCore(ref TInput input, FixedSizeQueue(outputLength, result, dst.Indices); + dst = result.Commit(); } - protected override sealed void InitializeStateCore() + private protected override sealed void InitializeStateCore() { Parent = (SequentialAnomalyDetectionTransformBase)ParentTransform; Host.Assert(WindowSize >= 0); @@ -525,7 +522,7 @@ protected override sealed void InitializeStateCore() /// /// The abstract method that realizes the initialization functionality for the anomaly detector. /// - protected abstract void InitializeAnomalyDetector(); + private protected abstract void InitializeAnomalyDetector(); /// /// The abstract method that realizes the main logic for calculating the raw anomaly score bfor the current input given a windowed buffer @@ -535,7 +532,7 @@ protected override sealed void InitializeStateCore() /// A long number that indicates the number of times ComputeRawAnomalyScore has been called so far (starting value = 0). /// The raw anomaly score for the input. The Assumption is the higher absolute value of the raw score, the more anomalous the input is. /// The sign of the score determines whether it's a positive anomaly or a negative one. - protected abstract Double ComputeRawAnomalyScore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration); + private protected abstract Double ComputeRawAnomalyScore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration); } protected override IRowMapper MakeRowMapper(ISchema schema) => new Mapper(Host, this, schema); @@ -609,13 +606,13 @@ private Delegate MakeGetter(IRow input, TState state) _host.AssertValue(input); var srcGetter = input.GetGetter(_inputColumnIndex); ProcessData processData = _parent.WindowSize > 0 ? - (ProcessData) state.Process : state.ProcessWithoutBuffer; - ValueGetter > valueGetter = (ref VBuffer dst) => - { - TInput src = default; - srcGetter(ref src); - processData(ref src, ref dst); - }; + (ProcessData)state.Process : state.ProcessWithoutBuffer; + ValueGetter> valueGetter = (ref VBuffer dst) => + { + TInput src = default; + srcGetter(ref src); + processData(ref src, ref dst); + }; return valueGetter; } diff --git a/src/Microsoft.ML.TimeSeries/SequentialTransformBase.cs b/src/Microsoft.ML.TimeSeries/SequentialTransformBase.cs index 5d6bd8f553..0737809cb7 100644 --- a/src/Microsoft.ML.TimeSeries/SequentialTransformBase.cs +++ b/src/Microsoft.ML.TimeSeries/SequentialTransformBase.cs @@ -51,28 +51,28 @@ public abstract class StateBase /// /// A reference to the parent transform that operates on the state object. /// - protected SequentialTransformBase ParentTransform; + private protected SequentialTransformBase ParentTransform; /// /// The internal windowed buffer for buffering the values in the input sequence. /// - protected FixedSizeQueue WindowedBuffer; + private protected FixedSizeQueue WindowedBuffer; /// /// The buffer used to buffer the training data points. /// - protected FixedSizeQueue InitialWindowedBuffer; + private protected FixedSizeQueue InitialWindowedBuffer; - protected int WindowSize { get; private set; } + private protected int WindowSize { get; private set; } - protected int InitialWindowSize { get; private set; } + private protected int InitialWindowSize { get; private set; } /// /// Counts the number of rows observed by the transform so far. /// - protected int RowCounter { get; private set; } + private protected int RowCounter { get; private set; } - protected int IncrementRowCounter() + private protected int IncrementRowCounter() { RowCounter++; return RowCounter; @@ -166,10 +166,10 @@ public void ProcessWithoutBuffer(ref TInput input, ref TOutput output) } /// - /// The abstract method that specifies the NA value for the dst type. + /// The abstract method that specifies the NA value for 's type. /// /// - protected abstract void SetNaOutput(ref TOutput dst); + private protected abstract void SetNaOutput(ref TOutput dst); /// /// The abstract method that realizes the main logic for the transform. @@ -178,18 +178,18 @@ public void ProcessWithoutBuffer(ref TInput input, ref TOutput output) /// A reference to the dst object. /// A reference to the windowed buffer. /// A long number that indicates the number of times TransformCore has been called so far (starting value = 0). - protected abstract void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref TOutput dst); + private protected abstract void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref TOutput dst); /// /// The abstract method that realizes the logic for initializing the state object. /// - protected abstract void InitializeStateCore(); + private protected abstract void InitializeStateCore(); /// /// The abstract method that realizes the logic for learning the parameters and the initial state object from data. /// /// A queue of data points used for training - protected abstract void LearnStateFromDataCore(FixedSizeQueue data); + private protected abstract void LearnStateFromDataCore(FixedSizeQueue data); } /// @@ -242,13 +242,13 @@ private static IDataTransform CreateLambdaTransform(IHost host, IDataView input, /// A reference to the environment variable. /// A reference to the input data view. /// - protected SequentialTransformBase(int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, + private protected SequentialTransformBase(int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, string name, IHostEnvironment env, IDataView input, ColumnType outputColTypeOverride = null) : this(windowSize, initialWindowSize, inputColumnName, outputColumnName, Contracts.CheckRef(env, nameof(env)).Register(name), input, outputColTypeOverride) { } - protected SequentialTransformBase(int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, + private protected SequentialTransformBase(int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, IHost host, IDataView input, ColumnType outputColTypeOverride = null) : base(host, input) { @@ -268,7 +268,7 @@ protected SequentialTransformBase(int windowSize, int initialWindowSize, string _transform = CreateLambdaTransform(Host, input, InputColumnName, OutputColumnName, InitFunction, WindowSize > 0, outputColTypeOverride); } - protected SequentialTransformBase(IHostEnvironment env, ModelLoadContext ctx, string name, IDataView input) + private protected SequentialTransformBase(IHostEnvironment env, ModelLoadContext ctx, string name, IDataView input) : base(env, name, input) { Host.CheckValue(ctx, nameof(ctx)); @@ -343,7 +343,7 @@ private void InitFunction(TState state) state.InitState(WindowSize, InitialWindowSize, this, Host); } - public override bool CanShuffle { get { return false; } } + public override bool CanShuffle => false; protected override bool? ShouldUseParallelCursors(Func predicate) { @@ -357,14 +357,11 @@ protected override IRowCursor GetRowCursorCore(Func predicate, IRando return new Cursor(this, srcCursor); } - public override Schema Schema - { - get { return _transform.Schema; } - } + public override Schema Schema => _transform.Schema; - public override long? GetRowCount(bool lazy = true) + public override long? GetRowCount() { - return _transform.GetRowCount(lazy); + return _transform.GetRowCount(); } public override IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolidator, Func predicate, int n, IRandom rand = null) diff --git a/src/Microsoft.ML.TimeSeries/SequentialTransformerBase.cs b/src/Microsoft.ML.TimeSeries/SequentialTransformerBase.cs index 5e2b32a81b..b1a95b916f 100644 --- a/src/Microsoft.ML.TimeSeries/SequentialTransformerBase.cs +++ b/src/Microsoft.ML.TimeSeries/SequentialTransformerBase.cs @@ -29,7 +29,7 @@ public abstract class StateBase { // Ideally this class should be private. However, due to the current constraints with the LambdaTransform, we need to have // access to the state class when inheriting from SequentialTransformerBase. - protected IHost Host; + private protected IHost Host; /// /// A reference to the parent transform that operates on the state object. @@ -39,22 +39,26 @@ public abstract class StateBase /// /// The internal windowed buffer for buffering the values in the input sequence. /// - protected FixedSizeQueue WindowedBuffer; + private protected FixedSizeQueue WindowedBuffer; /// /// The buffer used to buffer the training data points. /// - protected FixedSizeQueue InitialWindowedBuffer; + private protected FixedSizeQueue InitialWindowedBuffer; - protected int WindowSize { get; private set; } + private protected int WindowSize { get; private set; } - protected int InitialWindowSize { get; private set; } + private protected int InitialWindowSize { get; private set; } /// /// Counts the number of rows observed by the transform so far. /// protected long RowCounter { get; private set; } + private protected StateBase() + { + } + protected long IncrementRowCounter() { RowCounter++; @@ -147,7 +151,7 @@ public void ProcessWithoutBuffer(ref TInput input, ref TOutput output) /// The abstract method that specifies the NA value for the dst type. /// /// - protected abstract void SetNaOutput(ref TOutput dst); + private protected abstract void SetNaOutput(ref TOutput dst); /// /// The abstract method that realizes the main logic for the transform. @@ -156,35 +160,35 @@ public void ProcessWithoutBuffer(ref TInput input, ref TOutput output) /// A reference to the dst object. /// A reference to the windowed buffer. /// A long number that indicates the number of times TransformCore has been called so far (starting value = 0). - protected abstract void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref TOutput dst); + private protected abstract void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref TOutput dst); /// /// The abstract method that realizes the logic for initializing the state object. /// - protected abstract void InitializeStateCore(); + private protected abstract void InitializeStateCore(); /// /// The abstract method that realizes the logic for learning the parameters and the initial state object from data. /// /// A queue of data points used for training - protected abstract void LearnStateFromDataCore(FixedSizeQueue data); + private protected abstract void LearnStateFromDataCore(FixedSizeQueue data); } - protected readonly IHost Host; + private protected readonly IHost Host; /// /// The window size for buffering. /// - protected readonly int WindowSize; + private protected readonly int WindowSize; /// /// The number of datapoints from the beginning of the sequence that are used for learning the initial state. /// - protected int InitialWindowSize; + private protected int InitialWindowSize; - public string InputColumnName; - public string OutputColumnName; - protected ColumnType OutputColumnType; + internal readonly string InputColumnName; + internal readonly string OutputColumnName; + private protected ColumnType OutputColumnType; public bool IsRowToRowMapper => false; @@ -197,7 +201,7 @@ public void ProcessWithoutBuffer(ref TInput input, ref TOutput output) /// The name of the input column. /// The name of the dst column. /// - protected SequentialTransformerBase(IHost host, int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, ColumnType outputColType) + private protected SequentialTransformerBase(IHost host, int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, ColumnType outputColType) { Host = host; Host.CheckParam(initialWindowSize >= 0, nameof(initialWindowSize), "Must be non-negative."); @@ -214,7 +218,7 @@ protected SequentialTransformerBase(IHost host, int windowSize, int initialWindo WindowSize = windowSize; } - protected SequentialTransformerBase(IHost host, ModelLoadContext ctx) + private protected SequentialTransformerBase(IHost host, ModelLoadContext ctx) { Host = host; Host.CheckValue(ctx, nameof(ctx)); @@ -352,9 +356,9 @@ protected override IRowCursor GetRowCursorCore(Func predicate, IRando public override Schema Schema => _bindings.Schema; - public override long? GetRowCount(bool lazy = true) + public override long? GetRowCount() { - return _transform.GetRowCount(lazy); + return _transform.GetRowCount(); } public override IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolidator, Func predicate, int n, IRandom rand = null) diff --git a/src/Microsoft.ML.TimeSeries/SlidingWindowTransformBase.cs b/src/Microsoft.ML.TimeSeries/SlidingWindowTransformBase.cs index 0947d02b25..267601dc42 100644 --- a/src/Microsoft.ML.TimeSeries/SlidingWindowTransformBase.cs +++ b/src/Microsoft.ML.TimeSeries/SlidingWindowTransformBase.cs @@ -72,7 +72,7 @@ protected SlidingWindowTransformBase(Arguments args, string loaderSignature, IHo { Host.Assert(args.WindowSize == 1); throw Host.ExceptUserArg(nameof(args.Lag), - $"If {args.Lag}=0 and {args.WindowSize}=1, the transform just copies the column. Use {CopyColumnsTransform.LoaderSignature} transform instead."); + $"If {args.Lag}=0 and {args.WindowSize}=1, the transform just copies the column. Use {ColumnsCopyingTransformer.LoaderSignature} transform instead."); } Host.CheckUserArg(Enum.IsDefined(typeof(BeginOptions), args.Begin), nameof(args.Begin), "Undefined value."); _lag = args.Lag; @@ -131,13 +131,11 @@ public sealed class StateSlide : StateBase { private SlidingWindowTransformBase _parentSliding; - protected override void SetNaOutput(ref VBuffer output) + private protected override void SetNaOutput(ref VBuffer output) { int size = _parentSliding.WindowSize - _parentSliding._lag + 1; - var result = output.Values; - if (Utils.Size(result) < size) - result = new TInput[size]; + var result = VBufferEditor.Create(ref output, size); TInput value = _parentSliding._nanValue; switch (_parentSliding._begin) @@ -152,37 +150,35 @@ protected override void SetNaOutput(ref VBuffer output) } for (int i = 0; i < size; ++i) - result[i] = value; - output = new VBuffer(size, result, output.Indices); + result.Values[i] = value; + output = result.Commit(); } - protected override void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref VBuffer output) + private protected override void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref VBuffer output) { int size = _parentSliding.WindowSize - _parentSliding._lag + 1; - var result = output.Values; - if (Utils.Size(result) < size) - result = new TInput[size]; + var result = VBufferEditor.Create(ref output, size); if (_parentSliding._lag == 0) { for (int i = 0; i < _parentSliding.WindowSize; ++i) - result[i] = windowedBuffer[i]; - result[_parentSliding.WindowSize] = input; + result.Values[i] = windowedBuffer[i]; + result.Values[_parentSliding.WindowSize] = input; } else { for (int i = 0; i < size; ++i) - result[i] = windowedBuffer[i]; + result.Values[i] = windowedBuffer[i]; } - output = new VBuffer(size, result, output.Indices); + output = result.Commit(); } - protected override void InitializeStateCore() + private protected override void InitializeStateCore() { _parentSliding = (SlidingWindowTransformBase)base.ParentTransform; } - protected override void LearnStateFromDataCore(FixedSizeQueue data) + private protected override void LearnStateFromDataCore(FixedSizeQueue data) { // This method is empty because there is no need for parameter learning from the initial windowed buffer for this transform. } diff --git a/src/Microsoft.ML.TimeSeries/SsaAnomalyDetectionBase.cs b/src/Microsoft.ML.TimeSeries/SsaAnomalyDetectionBase.cs index 86d422e484..b5a5cd9d16 100644 --- a/src/Microsoft.ML.TimeSeries/SsaAnomalyDetectionBase.cs +++ b/src/Microsoft.ML.TimeSeries/SsaAnomalyDetectionBase.cs @@ -104,7 +104,7 @@ public abstract class SsaArguments : ArgumentsBase protected readonly bool IsAdaptive; protected readonly ErrorFunctionUtils.ErrorFunction ErrorFunction; protected readonly Func ErrorFunc; - protected readonly ISequenceModeler Model; + protected readonly SequenceModelerBase Model; public SsaAnomalyDetectionBase(SsaArguments args, string name, IHostEnvironment env) : base(args.WindowSize, 0, args.Source, args.Name, name, env, args.Side, args.Martingale, args.AlertOn, args.PowerMartingaleEpsilon, args.AlertThreshold) @@ -120,7 +120,7 @@ public SsaAnomalyDetectionBase(SsaArguments args, string name, IHostEnvironment IsAdaptive = args.IsAdaptive; // Creating the master SSA model Model = new AdaptiveSingularSpectrumSequenceModeler(Host, args.InitialWindowSize, SeasonalWindowSize + 1, SeasonalWindowSize, - DiscountFactor, null, AdaptiveSingularSpectrumSequenceModeler.RankSelectionMethod.Exact, null, SeasonalWindowSize / 2, false, false); + DiscountFactor, AdaptiveSingularSpectrumSequenceModeler.RankSelectionMethod.Exact, null, SeasonalWindowSize / 2, false, false); } public SsaAnomalyDetectionBase(IHostEnvironment env, ModelLoadContext ctx, string name) @@ -150,7 +150,7 @@ public SsaAnomalyDetectionBase(IHostEnvironment env, ModelLoadContext ctx, strin IsAdaptive = ctx.Reader.ReadBoolean(); - ctx.LoadModel, SignatureLoadModel>(env, out Model, "SSA"); + ctx.LoadModel, SignatureLoadModel>(env, out Model, "SSA"); Host.CheckDecode(Model != null); } @@ -197,21 +197,21 @@ public override void Save(ModelSaveContext ctx) public sealed class State : AnomalyDetectionStateBase { - private ISequenceModeler _model; + private SequenceModelerBase _model; private SsaAnomalyDetectionBase _parentAnomalyDetector; - protected override void LearnStateFromDataCore(FixedSizeQueue data) + private protected override void LearnStateFromDataCore(FixedSizeQueue data) { // This method is empty because there is no need to implement a training logic here. } - protected override void InitializeAnomalyDetector() + private protected override void InitializeAnomalyDetector() { _parentAnomalyDetector = (SsaAnomalyDetectionBase)Parent; _model = _parentAnomalyDetector.Model.Clone(); } - protected override double ComputeRawAnomalyScore(ref Single input, FixedSizeQueue windowedBuffer, long iteration) + private protected override double ComputeRawAnomalyScore(ref Single input, FixedSizeQueue windowedBuffer, long iteration) { // Get the prediction for the next point opn the series Single expectedValue = 0; diff --git a/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs b/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs index 6bf0a13691..32f52ca786 100644 --- a/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs +++ b/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs @@ -197,6 +197,14 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc /// /// Estimator for /// + ///

Example code can be found by searching for SsaChangePointDetector in ML.NET.

+ /// + /// + /// + /// + /// public sealed class SsaChangePointEstimator : IEstimator { private readonly IHost _host; @@ -215,12 +223,6 @@ public sealed class SsaChangePointEstimator : IEstimator /// The function used to compute the error between the expected and the observed value. /// The martingale used for scoring. /// The epsilon parameter for the Power martingale. - ///

Example code can be found by searching for SsaChangePointDetector in ML.NET.

- /// - /// - /// public SsaChangePointEstimator(IHostEnvironment env, string inputColumn, string outputColumn, int confidence, int changeHistoryLength, int trainingWindowSize, int seasonalityWindowSize, ErrorFunctionUtils.ErrorFunction errorFunction = ErrorFunctionUtils.ErrorFunction.SignedDifference, diff --git a/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs b/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs index cca54842fb..1fbc36b49d 100644 --- a/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs +++ b/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs @@ -178,6 +178,14 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc /// /// Estimator for /// + ///

Example code can be found by searching for SsaSpikeDetector in ML.NET.

+ /// + /// + /// + /// + /// public sealed class SsaSpikeEstimator : IEstimator { private readonly IHost _host; @@ -195,12 +203,6 @@ public sealed class SsaSpikeEstimator : IEstimator /// An upper bound on the largest relevant seasonality in the input time-series. /// The argument that determines whether to detect positive or negative anomalies, or both. /// The function used to compute the error between the expected and the observed value. - ///

Example code can be found by searching for SsaSpikeDetector in ML.NET.

- /// - /// - /// public SsaSpikeEstimator(IHostEnvironment env, string inputColumn, string outputColumn, int confidence, int pvalueHistoryLength, int trainingWindowSize, int seasonalityWindowSize, AnomalySide side = AnomalySide.TwoSided, ErrorFunctionUtils.ErrorFunction errorFunction = ErrorFunctionUtils.ErrorFunction.SignedDifference) diff --git a/src/Microsoft.ML.Transforms/BootstrapSampleTransform.cs b/src/Microsoft.ML.Transforms/BootstrapSamplingTransformer.cs similarity index 84% rename from src/Microsoft.ML.Transforms/BootstrapSampleTransform.cs rename to src/Microsoft.ML.Transforms/BootstrapSamplingTransformer.cs index 10dad94cdd..abb41ab240 100644 --- a/src/Microsoft.ML.Transforms/BootstrapSampleTransform.cs +++ b/src/Microsoft.ML.Transforms/BootstrapSamplingTransformer.cs @@ -11,11 +11,11 @@ using Microsoft.ML.Transforms; using System; -[assembly: LoadableClass(BootstrapSampleTransform.Summary, typeof(BootstrapSampleTransform), typeof(BootstrapSampleTransform.Arguments), typeof(SignatureDataTransform), - BootstrapSampleTransform.UserName, "BootstrapSampleTransform", "BootstrapSample")] +[assembly: LoadableClass(BootstrapSamplingTransformer.Summary, typeof(BootstrapSamplingTransformer), typeof(BootstrapSamplingTransformer.Arguments), typeof(SignatureDataTransform), + BootstrapSamplingTransformer.UserName, "BootstrapSampleTransform", "BootstrapSample")] -[assembly: LoadableClass(BootstrapSampleTransform.Summary, typeof(BootstrapSampleTransform), null, typeof(SignatureLoadDataTransform), - BootstrapSampleTransform.UserName, BootstrapSampleTransform.LoaderSignature)] +[assembly: LoadableClass(BootstrapSamplingTransformer.Summary, typeof(BootstrapSamplingTransformer), null, typeof(SignatureLoadDataTransform), + BootstrapSamplingTransformer.UserName, BootstrapSamplingTransformer.LoaderSignature)] [assembly: EntryPointModule(typeof(BootstrapSample))] @@ -24,7 +24,7 @@ namespace Microsoft.ML.Transforms /// /// This class approximates bootstrap sampling of a dataview. /// - public sealed class BootstrapSampleTransform : FilterBase + public sealed class BootstrapSamplingTransformer : FilterBase { private static class Defaults { @@ -61,7 +61,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(BootstrapSampleTransform).Assembly.FullName); + loaderAssemblyName: typeof(BootstrapSamplingTransformer).Assembly.FullName); } internal const string RegistrationName = "BootstrapSample"; @@ -73,7 +73,7 @@ private static VersionInfo GetVersionInfo() private readonly bool _shuffleInput; private readonly int _poolSize; - public BootstrapSampleTransform(IHostEnvironment env, Arguments args, IDataView input) + public BootstrapSamplingTransformer(IHostEnvironment env, Arguments args, IDataView input) : base(env, RegistrationName, input) { Host.CheckValue(args, nameof(args)); @@ -86,7 +86,7 @@ public BootstrapSampleTransform(IHostEnvironment env, Arguments args, IDataView } /// - /// Convenience constructor for public facing API. + /// Initializes a new instance of . /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -94,7 +94,7 @@ public BootstrapSampleTransform(IHostEnvironment env, Arguments args, IDataView /// The random seed. If unspecified random state will be instead derived from the environment. /// Whether we should attempt to shuffle the source data. By default on, but can be turned off for efficiency. /// When shuffling the output, the number of output rows to keep in that pool. Note that shuffling of output is completely distinct from shuffling of input. - public BootstrapSampleTransform(IHostEnvironment env, + public BootstrapSamplingTransformer(IHostEnvironment env, IDataView input, bool complement = Defaults.Complement, uint? seed = null, @@ -104,7 +104,7 @@ public BootstrapSampleTransform(IHostEnvironment env, { } - private BootstrapSampleTransform(IHost host, ModelLoadContext ctx, IDataView input) + private BootstrapSamplingTransformer(IHost host, ModelLoadContext ctx, IDataView input) : base(host, input) { host.AssertValue(ctx); @@ -148,14 +148,14 @@ public override void Save(ModelSaveContext ctx) ctx.Writer.Write(_poolSize); } - public static BootstrapSampleTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + public static BootstrapSamplingTransformer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { Contracts.CheckValue(env, nameof(env)); var h = env.Register(RegistrationName); h.CheckValue(ctx, nameof(ctx)); h.CheckValue(input, nameof(input)); ctx.CheckAtModel(GetVersionInfo()); - return h.Apply("Loading Model", ch => new BootstrapSampleTransform(h, ctx, input)); + return h.Apply("Loading Model", ch => new BootstrapSamplingTransformer(h, ctx, input)); } protected override bool? ShouldUseParallelCursors(Func predicate) @@ -170,7 +170,7 @@ protected override IRowCursor GetRowCursorCore(Func predicate, IRando var input = Source.GetRowCursor(predicate, _shuffleInput ? new TauswortheHybrid(rgen) : null); IRowCursor cursor = new RowCursor(this, input, rgen); if (_poolSize > 1) - cursor = ShuffleTransform.GetShuffledCursor(Host, _poolSize, cursor, new TauswortheHybrid(rgen)); + cursor = RowShufflingTransformer.GetShuffledCursor(Host, _poolSize, cursor, new TauswortheHybrid(rgen)); return cursor; } @@ -184,14 +184,14 @@ public override IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolid private sealed class RowCursor : LinkedRootCursorBase, IRowCursor { private int _remaining; - private readonly BootstrapSampleTransform _parent; + private readonly BootstrapSamplingTransformer _parent; private readonly IRandom _rgen; public override long Batch { get { return 0; } } public Schema Schema { get { return Input.Schema; } } - public RowCursor(BootstrapSampleTransform parent, IRowCursor input, IRandom rgen) + public RowCursor(BootstrapSamplingTransformer parent, IRowCursor input, IRandom rgen) : base(parent.Host, input) { Ch.AssertValue(rgen); @@ -237,14 +237,14 @@ protected override bool MoveNextCore() public static class BootstrapSample { - [TlcModule.EntryPoint(Name = "Transforms.ApproximateBootstrapSampler", Desc = BootstrapSampleTransform.Summary, UserName = BootstrapSampleTransform.UserName, ShortName = BootstrapSampleTransform.RegistrationName)] - public static CommonOutputs.TransformOutput GetSample(IHostEnvironment env, BootstrapSampleTransform.Arguments input) + [TlcModule.EntryPoint(Name = "Transforms.ApproximateBootstrapSampler", Desc = BootstrapSamplingTransformer.Summary, UserName = BootstrapSamplingTransformer.UserName, ShortName = BootstrapSamplingTransformer.RegistrationName)] + public static CommonOutputs.TransformOutput GetSample(IHostEnvironment env, BootstrapSamplingTransformer.Arguments input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(input, nameof(input)); var h = EntryPointUtils.CheckArgsAndCreateHost(env, "BootstrapSample", input); - var view = new BootstrapSampleTransform(h, input, input.Data); + var view = new BootstrapSamplingTransformer(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, view, input.Data), diff --git a/src/Microsoft.ML.Transforms/CategoricalCatalog.cs b/src/Microsoft.ML.Transforms/CategoricalCatalog.cs index 8709c1702e..9f3b3b6547 100644 --- a/src/Microsoft.ML.Transforms/CategoricalCatalog.cs +++ b/src/Microsoft.ML.Transforms/CategoricalCatalog.cs @@ -24,7 +24,7 @@ public static class CategoricalCatalog public static OneHotEncodingEstimator OneHotEncoding(this TransformsCatalog.CategoricalTransforms catalog, string inputColumn, string outputColumn = null, - CategoricalTransform.OutputKind outputKind = CategoricalTransform.OutputKind.Ind) + OneHotEncodingTransformer.OutputKind outputKind = OneHotEncodingTransformer.OutputKind.Ind) => new OneHotEncodingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, outputKind); /// @@ -43,13 +43,17 @@ public static OneHotEncodingEstimator OneHotEncoding(this TransformsCatalog.Cate /// The transform catalog /// The input column /// The output column. If null, is used. + /// Number of bits to hash into. Must be between 1 and 30, inclusive. + /// Limit the number of keys used to generate the slot name to this many. 0 means no invert hashing, -1 means no limit. /// The conversion mode. /// public static OneHotHashEncodingEstimator OneHotHashEncoding(this TransformsCatalog.CategoricalTransforms catalog, string inputColumn, string outputColumn = null, - CategoricalTransform.OutputKind outputKind = CategoricalTransform.OutputKind.Ind) - => new OneHotHashEncodingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, outputKind); + int hashBits = OneHotHashEncodingEstimator.Defaults.HashBits, + int invertHash = OneHotHashEncodingEstimator.Defaults.InvertHash, + OneHotEncodingTransformer.OutputKind outputKind = OneHotEncodingTransformer.OutputKind.Ind) + => new OneHotHashEncodingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, hashBits, invertHash, outputKind); /// /// Convert several text column into hash-based one-hot encoded vectors. diff --git a/src/Microsoft.ML.Transforms/CompositeTransform.cs b/src/Microsoft.ML.Transforms/CompositeTransformer.cs similarity index 89% rename from src/Microsoft.ML.Transforms/CompositeTransform.cs rename to src/Microsoft.ML.Transforms/CompositeTransformer.cs index 180a613b32..fe1855c5fa 100644 --- a/src/Microsoft.ML.Transforms/CompositeTransform.cs +++ b/src/Microsoft.ML.Transforms/CompositeTransformer.cs @@ -10,12 +10,12 @@ // REVIEW: This is a temporary hack code to allow loading old saved loader models. Delete it once it is no longer needed. // The below signatures are for (de)serialization purposes only. -[assembly: LoadableClass(typeof(IDataTransform), typeof(CompositeTransform), null, typeof(SignatureLoadDataTransform), - "Composite Transform", CompositeTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(IDataTransform), typeof(CompositeTransformer), null, typeof(SignatureLoadDataTransform), + "Composite Transform", CompositeTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms { - public static class CompositeTransform + public static class CompositeTransformer { private const string RegistrationName = "CompositeTransform"; @@ -28,7 +28,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(CompositeTransform).Assembly.FullName); + loaderAssemblyName: typeof(CompositeTransformer).Assembly.FullName); } public static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) diff --git a/src/Microsoft.ML.Transforms/CountFeatureSelection.cs b/src/Microsoft.ML.Transforms/CountFeatureSelectingTransformer.cs similarity index 94% rename from src/Microsoft.ML.Transforms/CountFeatureSelection.cs rename to src/Microsoft.ML.Transforms/CountFeatureSelectingTransformer.cs index b4b876138d..34a6e79f62 100644 --- a/src/Microsoft.ML.Transforms/CountFeatureSelection.cs +++ b/src/Microsoft.ML.Transforms/CountFeatureSelectingTransformer.cs @@ -13,13 +13,13 @@ using System.Linq; using System.Reflection; -[assembly: LoadableClass(CountFeatureSelectionTransform.Summary, typeof(IDataTransform), typeof(CountFeatureSelectionTransform), typeof(CountFeatureSelectionTransform.Arguments), typeof(SignatureDataTransform), - CountFeatureSelectionTransform.UserName, "CountFeatureSelectionTransform", "CountFeatureSelection")] +[assembly: LoadableClass(CountFeatureSelectingTransformer.Summary, typeof(IDataTransform), typeof(CountFeatureSelectingTransformer), typeof(CountFeatureSelectingTransformer.Arguments), typeof(SignatureDataTransform), + CountFeatureSelectingTransformer.UserName, "CountFeatureSelectionTransform", "CountFeatureSelection")] namespace Microsoft.ML.Transforms { /// - public static class CountFeatureSelectionTransform + public static class CountFeatureSelectingTransformer { internal const string Summary = "Selects the slots for which the count of non-default values is greater than or equal to a threshold."; internal const string UserName = "Count Feature Selection Transform"; @@ -165,11 +165,11 @@ public static long[][] Train(IHostEnvironment env, IDataView input, string[] col int colSrc; var colName = columns[i]; if (!schema.TryGetColumnIndex(colName, out colSrc)) - throw env.ExceptUserArg(nameof(CountFeatureSelectionTransform.Arguments.Column), "Source column '{0}' not found", colName); + throw env.ExceptUserArg(nameof(CountFeatureSelectingTransformer.Arguments.Column), "Source column '{0}' not found", colName); var colType = schema.GetColumnType(colSrc); if (colType.IsVector && !colType.IsKnownSizeVector) - throw env.ExceptUserArg(nameof(CountFeatureSelectionTransform.Arguments.Column), "Variable length column '{0}' is not allowed", colName); + throw env.ExceptUserArg(nameof(CountFeatureSelectingTransformer.Arguments.Column), "Variable length column '{0}' is not allowed", colName); activeInput[colSrc] = true; colSrcs[i] = colSrc; @@ -179,7 +179,7 @@ public static long[][] Train(IHostEnvironment env, IDataView input, string[] col var aggregators = new CountAggregator[size]; long rowCur = 0; - double rowCount = input.GetRowCount(true) ?? double.NaN; + double rowCount = input.GetRowCount() ?? double.NaN; using (var pch = env.StartProgressChannel("Aggregating counts")) using (var cursor = input.GetRowCursor(col => activeInput[col])) { @@ -252,7 +252,7 @@ public CountAggregator(ColumnType type, ValueGetter getter) () => { getter(ref t); - _buffer.Values[0] = t; + VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = t; }; _isDefault = Runtime.Data.Conversion.Conversions.Instance.GetIsDefaultPredicate(type); if (!Runtime.Data.Conversion.Conversions.Instance.TryGetIsNAPredicate(type, out _isMissing)) diff --git a/src/Microsoft.ML.Transforms/EntryPoints/SelectFeatures.cs b/src/Microsoft.ML.Transforms/EntryPoints/SelectFeatures.cs index 1c07bfdc60..5869120b96 100644 --- a/src/Microsoft.ML.Transforms/EntryPoints/SelectFeatures.cs +++ b/src/Microsoft.ML.Transforms/EntryPoints/SelectFeatures.cs @@ -14,18 +14,18 @@ namespace Microsoft.ML.Transforms public static class SelectFeatures { [TlcModule.EntryPoint(Name = "Transforms.FeatureSelectorByCount", - Desc = CountFeatureSelectionTransform.Summary, - UserName = CountFeatureSelectionTransform.UserName, + Desc = CountFeatureSelectingTransformer.Summary, + UserName = CountFeatureSelectingTransformer.UserName, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput CountSelect(IHostEnvironment env, CountFeatureSelectionTransform.Arguments input) + public static CommonOutputs.TransformOutput CountSelect(IHostEnvironment env, CountFeatureSelectingTransformer.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("CountSelect"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = CountFeatureSelectionTransform.Create(host, input, input.Data); + var xf = CountFeatureSelectingTransformer.Create(host, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } diff --git a/src/Microsoft.ML.Transforms/EntryPoints/TextAnalytics.cs b/src/Microsoft.ML.Transforms/EntryPoints/TextAnalytics.cs index ba1af900ff..b7b93584e9 100644 --- a/src/Microsoft.ML.Transforms/EntryPoints/TextAnalytics.cs +++ b/src/Microsoft.ML.Transforms/EntryPoints/TextAnalytics.cs @@ -3,11 +3,10 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Runtime; -using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.EntryPoints; -using Microsoft.ML.Runtime.TextAnalytics; using Microsoft.ML.Transforms.Categorical; using Microsoft.ML.Transforms.Text; +using System.Linq; [assembly: LoadableClass(typeof(void), typeof(TextAnalytics), null, typeof(SignatureEntryPointModule), "TextAnalytics")] @@ -36,15 +35,15 @@ public static CommonOutputs.TransformOutput TextTransform(IHostEnvironment env, } [TlcModule.EntryPoint(Name = "Transforms.WordTokenizer", - Desc = ML.Transforms.Text.WordTokenizeTransform.Summary, - UserName = ML.Transforms.Text.WordTokenizeTransform.UserName, - ShortName = ML.Transforms.Text.WordTokenizeTransform.LoaderSignature, + Desc = ML.Transforms.Text.WordTokenizingTransformer.Summary, + UserName = ML.Transforms.Text.WordTokenizingTransformer.UserName, + ShortName = ML.Transforms.Text.WordTokenizingTransformer.LoaderSignature, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput DelimitedTokenizeTransform(IHostEnvironment env, WordTokenizeTransform.Arguments input) + public static CommonOutputs.TransformOutput DelimitedTokenizeTransform(IHostEnvironment env, WordTokenizingTransformer.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "DelimitedTokenizeTransform", input); - var xf = ML.Transforms.Text.WordTokenizeTransform.Create(h, input, input.Data); + var xf = ML.Transforms.Text.WordTokenizingTransformer.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), @@ -53,14 +52,14 @@ public static CommonOutputs.TransformOutput DelimitedTokenizeTransform(IHostEnvi } [TlcModule.EntryPoint(Name = "Transforms.NGramTranslator", - Desc = NgramTransform.Summary, - UserName = NgramTransform.UserName, - ShortName = NgramTransform.LoaderSignature, + Desc = NgramCountingTransformer.Summary, + UserName = NgramCountingTransformer.UserName, + ShortName = NgramCountingTransformer.LoaderSignature, XmlInclude = new[] { @"" })] - public static CommonOutputs.TransformOutput NGramTransform(IHostEnvironment env, NgramTransform.Arguments input) + public static CommonOutputs.TransformOutput NGramTransform(IHostEnvironment env, NgramCountingTransformer.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "NGramTransform", input); - var xf = new NgramTransform(h, input, input.Data); + var xf = NgramCountingTransformer.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), @@ -69,13 +68,13 @@ public static CommonOutputs.TransformOutput NGramTransform(IHostEnvironment env, } [TlcModule.EntryPoint(Name = "Transforms.Dictionarizer", - Desc = Categorical.TermTransform.Summary, - UserName = Categorical.TermTransform.UserName, - ShortName = Categorical.TermTransform.LoaderSignature)] - public static CommonOutputs.TransformOutput TermTransform(IHostEnvironment env, TermTransform.Arguments input) + Desc = ValueToKeyMappingTransformer.Summary, + UserName = ValueToKeyMappingTransformer.UserName, + ShortName = ValueToKeyMappingTransformer.LoaderSignature)] + public static CommonOutputs.TransformOutput TermTransform(IHostEnvironment env, ValueToKeyMappingTransformer.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "TermTransform", input); - var xf = Categorical.TermTransform.Create(h, input, input.Data); + var xf = ValueToKeyMappingTransformer.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), @@ -85,14 +84,14 @@ public static CommonOutputs.TransformOutput TermTransform(IHostEnvironment env, [TlcModule.EntryPoint(Name = "Transforms.SentimentAnalyzer", Desc = "Uses a pretrained sentiment model to score input strings", - UserName = SentimentAnalyzingTransform.UserName, - ShortName = SentimentAnalyzingTransform.ShortName, + UserName = SentimentAnalyzingTransformer.UserName, + ShortName = SentimentAnalyzingTransformer.ShortName, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput AnalyzeSentiment(IHostEnvironment env, SentimentAnalyzingTransform.Arguments input) + public static CommonOutputs.TransformOutput AnalyzeSentiment(IHostEnvironment env, SentimentAnalyzingTransformer.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "SentimentAnalyzer", input); - var view = SentimentAnalyzingTransform.Create(h, input, input.Data); + var view = SentimentAnalyzingTransformer.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, view, input.Data), @@ -101,17 +100,17 @@ public static CommonOutputs.TransformOutput AnalyzeSentiment(IHostEnvironment en } [TlcModule.EntryPoint(Name = "Transforms.CharacterTokenizer", - Desc = CharTokenizeTransform.Summary, - UserName = CharTokenizeTransform.UserName, - ShortName = CharTokenizeTransform.LoaderSignature, + Desc = TokenizingByCharactersTransformer.Summary, + UserName = TokenizingByCharactersTransformer.UserName, + ShortName = TokenizingByCharactersTransformer.LoaderSignature, XmlInclude = new[] { @"" })] - public static CommonOutputs.TransformOutput CharTokenize(IHostEnvironment env, CharTokenizeTransform.Arguments input) + public static CommonOutputs.TransformOutput CharTokenize(IHostEnvironment env, TokenizingByCharactersTransformer.Arguments input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(input, nameof(input)); var h = EntryPointUtils.CheckArgsAndCreateHost(env, "CharTokenize", input); - var view = CharTokenizeTransform.Create(h, input, input.Data); + var view = TokenizingByCharactersTransformer.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, view, input.Data), @@ -120,18 +119,21 @@ public static CommonOutputs.TransformOutput CharTokenize(IHostEnvironment env, C } [TlcModule.EntryPoint(Name = "Transforms.LightLda", - Desc = LdaTransform.Summary, - UserName = LdaTransform.UserName, - ShortName = LdaTransform.ShortName, + Desc = LatentDirichletAllocationTransformer.Summary, + UserName = LatentDirichletAllocationTransformer.UserName, + ShortName = LatentDirichletAllocationTransformer.ShortName, XmlInclude = new[] { @"", @"" })] - public static CommonOutputs.TransformOutput LightLda(IHostEnvironment env, LdaTransform.Arguments input) + public static CommonOutputs.TransformOutput LightLda(IHostEnvironment env, LatentDirichletAllocationTransformer.Arguments input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(input, nameof(input)); var h = EntryPointUtils.CheckArgsAndCreateHost(env, "LightLda", input); - var view = new LdaTransform(h, input, input.Data); + var cols = input.Column.Select(colPair => new LatentDirichletAllocationTransformer.ColumnInfo(colPair, input)).ToArray(); + var est = new LatentDirichletAllocationEstimator(h, cols); + var view = est.Fit(input.Data).Transform(input.Data); + return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, view, input.Data), @@ -140,18 +142,18 @@ public static CommonOutputs.TransformOutput LightLda(IHostEnvironment env, LdaTr } [TlcModule.EntryPoint(Name = "Transforms.WordEmbeddings", - Desc = WordEmbeddingsTransform.Summary, - UserName = WordEmbeddingsTransform.UserName, - ShortName = WordEmbeddingsTransform.ShortName, + Desc = WordEmbeddingsExtractingTransformer.Summary, + UserName = WordEmbeddingsExtractingTransformer.UserName, + ShortName = WordEmbeddingsExtractingTransformer.ShortName, XmlInclude = new[] { @"", @"" })] - public static CommonOutputs.TransformOutput WordEmbeddings(IHostEnvironment env, WordEmbeddingsTransform.Arguments input) + public static CommonOutputs.TransformOutput WordEmbeddings(IHostEnvironment env, WordEmbeddingsExtractingTransformer.Arguments input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(input, nameof(input)); var h = EntryPointUtils.CheckArgsAndCreateHost(env, "WordEmbeddings", input); - var view = WordEmbeddingsTransform.Create(h, input, input.Data); + var view = WordEmbeddingsExtractingTransformer.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, view, input.Data), diff --git a/src/Microsoft.ML.Transforms/ExtensionsCatalog.cs b/src/Microsoft.ML.Transforms/ExtensionsCatalog.cs index 2ece80109a..6e14ba7d05 100644 --- a/src/Microsoft.ML.Transforms/ExtensionsCatalog.cs +++ b/src/Microsoft.ML.Transforms/ExtensionsCatalog.cs @@ -41,11 +41,11 @@ public static class MissingValueReplacerCatalog /// The name of the input column. /// The optional name of the output column, /// If not provided, the will be replaced with the results of the transforms. - /// The type of replacement to use as specified in + /// The type of replacement to use as specified in public static MissingValueReplacingEstimator ReplaceMissingValues(this TransformsCatalog catalog, string inputColumn, string outputColumn = null, - NAReplaceTransform.ColumnInfo.ReplacementMode replacementKind = MissingValueReplacingEstimator.Defaults.ReplacementMode) + MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementKind = MissingValueReplacingEstimator.Defaults.ReplacementMode) => new MissingValueReplacingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, replacementKind); /// @@ -53,7 +53,7 @@ public static MissingValueReplacingEstimator ReplaceMissingValues(this Transform /// /// The transform's catalog. /// The name of the columns to use, and per-column transformation configuraiton. - public static MissingValueReplacingEstimator ReplaceMissingValues(this TransformsCatalog catalog, params NAReplaceTransform.ColumnInfo[] columns) + public static MissingValueReplacingEstimator ReplaceMissingValues(this TransformsCatalog catalog, params MissingValueReplacingTransformer.ColumnInfo[] columns) => new MissingValueReplacingEstimator(CatalogUtils.GetEnvironment(catalog), columns); } @@ -69,7 +69,7 @@ public static class ToBinaryVectorCatalog /// The input column. /// public static KeyToBinaryVectorMappingEstimator MapKeyToBinaryVector(this TransformsCatalog.CategoricalTransforms catalog, - params KeyToBinaryVectorTransform.ColumnInfo[] columns) + params KeyToBinaryVectorMappingTransformer.ColumnInfo[] columns) => new KeyToBinaryVectorMappingEstimator(CatalogUtils.GetEnvironment(catalog), columns); /// diff --git a/src/Microsoft.ML.Transforms/GcnTransform.cs b/src/Microsoft.ML.Transforms/GcnTransform.cs index 7d32a370e1..2f7d54f22d 100644 --- a/src/Microsoft.ML.Transforms/GcnTransform.cs +++ b/src/Microsoft.ML.Transforms/GcnTransform.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.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; @@ -9,19 +10,28 @@ using Microsoft.ML.Runtime.Internal.CpuMath; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Model; +using Microsoft.ML.StaticPipe; +using Microsoft.ML.StaticPipe.Runtime; using Microsoft.ML.Transforms.Projections; using System; +using System.Collections.Generic; +using System.Linq; using System.Text; -using Float = System.Single; -[assembly: LoadableClass(LpNormNormalizerTransform.GcnSummary, typeof(LpNormNormalizerTransform), typeof(LpNormNormalizerTransform.GcnArguments), typeof(SignatureDataTransform), - LpNormNormalizerTransform.UserNameGn, "GcnTransform", LpNormNormalizerTransform.ShortNameGn)] +[assembly: LoadableClass(LpNormalizingTransformer.GcnSummary, typeof(IDataTransform), typeof(LpNormalizingTransformer), typeof(LpNormalizingTransformer.GcnArguments), typeof(SignatureDataTransform), + LpNormalizingTransformer.UserNameGn, "GcnTransform", LpNormalizingTransformer.ShortNameGn)] -[assembly: LoadableClass(LpNormNormalizerTransform.GcnSummary, typeof(LpNormNormalizerTransform), null, typeof(SignatureLoadDataTransform), - LpNormNormalizerTransform.UserNameGn, LpNormNormalizerTransform.LoaderSignature, LpNormNormalizerTransform.LoaderSignatureOld)] +[assembly: LoadableClass(LpNormalizingTransformer.GcnSummary, typeof(IDataTransform), typeof(LpNormalizingTransformer), null, typeof(SignatureLoadDataTransform), + LpNormalizingTransformer.UserNameGn, LpNormalizingTransformer.LoaderSignature, LpNormalizingTransformer.LoaderSignatureOld)] -[assembly: LoadableClass(LpNormNormalizerTransform.Summary, typeof(LpNormNormalizerTransform), typeof(LpNormNormalizerTransform.Arguments), typeof(SignatureDataTransform), - LpNormNormalizerTransform.UserNameLP, "LpNormNormalizer", LpNormNormalizerTransform.ShortNameLP)] +[assembly: LoadableClass(LpNormalizingTransformer.Summary, typeof(IDataTransform), typeof(LpNormalizingTransformer), typeof(LpNormalizingTransformer.Arguments), typeof(SignatureDataTransform), + LpNormalizingTransformer.UserNameLP, "LpNormNormalizer", LpNormalizingTransformer.ShortNameLP)] + +[assembly: LoadableClass(LpNormalizingTransformer.Summary, typeof(LpNormalizingTransformer), null, typeof(SignatureLoadModel), + LpNormalizingTransformer.UserNameGn, LpNormalizingTransformer.LoaderSignature)] + +[assembly: LoadableClass(typeof(IRowMapper), typeof(LpNormalizingTransformer), null, typeof(SignatureLoadRowMapper), + LpNormalizingTransformer.UserNameGn, LpNormalizingTransformer.LoaderSignature)] [assembly: EntryPointModule(typeof(LpNormalization))] @@ -40,38 +50,18 @@ namespace Microsoft.ML.Transforms.Projections /// Usage examples and Matlab code: /// https://www.cs.stanford.edu/~acoates/papers/coatesleeng_aistats_2011.pdf. /// - public sealed class LpNormNormalizerTransform : OneToOneTransformBase + public sealed class LpNormalizingTransformer : OneToOneTransformerBase { - /// - /// The kind of unit norm vectors are rescaled to. This enumeration is serialized. - /// - public enum NormalizerKind : byte - { - L2Norm = 0, - StdDev = 1, - L1Norm = 2, - LInf = 3 - } - - private static class Defaults - { - public const NormalizerKind NormKind = NormalizerKind.L2Norm; - public const bool LpSubMean = false; - public const bool GcnSubMean = true; - public const bool UseStdDev = false; - public const Float Scale = 1; - } - public sealed class Arguments : TransformInputBase { [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "New column definition(s) (optional form: name:src)", ShortName = "col", SortOrder = 1)] public Column[] Column; [Argument(ArgumentType.AtMostOnce, HelpText = "The norm to use to normalize each sample", ShortName = "norm", SortOrder = 1)] - public NormalizerKind NormKind = Defaults.NormKind; + public LpNormalizingEstimatorBase.NormalizerKind NormKind = LpNormalizingEstimatorBase.Defaults.NormKind; [Argument(ArgumentType.AtMostOnce, HelpText = "Subtract mean from each value before normalizing", SortOrder = 2)] - public bool SubMean = Defaults.LpSubMean; + public bool SubMean = LpNormalizingEstimatorBase.Defaults.LpSubstractMean; } public sealed class GcnArguments : TransformInputBase @@ -80,13 +70,13 @@ public sealed class GcnArguments : TransformInputBase public GcnColumn[] Column; [Argument(ArgumentType.AtMostOnce, HelpText = "Subtract mean from each value before normalizing", SortOrder = 1)] - public bool SubMean = Defaults.GcnSubMean; + public bool SubMean = LpNormalizingEstimatorBase.Defaults.GcnSubstractMean; [Argument(ArgumentType.AtMostOnce, HelpText = "Normalize by standard deviation rather than L2 norm", ShortName = "useStd")] - public bool UseStdDev = Defaults.UseStdDev; + public bool UseStdDev = LpNormalizingEstimatorBase.Defaults.UseStdDev; [Argument(ArgumentType.AtMostOnce, HelpText = "Scale features by this value")] - public Float Scale = Defaults.Scale; + public float Scale = LpNormalizingEstimatorBase.Defaults.Scale; } public abstract class ColumnBase : OneToOneColumn @@ -106,7 +96,7 @@ protected override bool TryUnparseCore(StringBuilder sb) public sealed class Column : ColumnBase { [Argument(ArgumentType.AtMostOnce, HelpText = "The norm to use to normalize each sample", ShortName = "norm", SortOrder = 1)] - public NormalizerKind? NormKind; + public LpNormalizingEstimatorBase.NormalizerKind? NormKind; public static Column Parse(string str) { @@ -133,7 +123,7 @@ public sealed class GcnColumn : ColumnBase public bool? UseStdDev; [Argument(ArgumentType.AtMostOnce, HelpText = "Scale features by this value")] - public Float? Scale; + public float? Scale; public static GcnColumn Parse(string str) { @@ -154,66 +144,122 @@ public bool TryUnparse(StringBuilder sb) } } - private sealed class ColInfoEx + /// + /// Describes how the transformer handles one Gcn column pair. + /// + public sealed class GcnColumnInfo : ColumnInfoBase { - public readonly bool SubtractMean; - public readonly NormalizerKind NormKind; - public readonly Float Scale; + /// + /// Describes how the transformer handles one Gcn column pair. + /// + /// Name of input column. + /// Name of output column. + /// Subtract mean from each value before normalizing. + /// Normalize by standard deviation rather than L2 norm. + /// Scale features by this value. + public GcnColumnInfo(string input, string output, + bool substractMean = LpNormalizingEstimatorBase.Defaults.GcnSubstractMean, + bool useStdDev = LpNormalizingEstimatorBase.Defaults.UseStdDev, + float scale = LpNormalizingEstimatorBase.Defaults.Scale) + : base(input, output, substractMean, useStdDev ? LpNormalizingEstimatorBase.NormalizerKind.StdDev : LpNormalizingEstimatorBase.NormalizerKind.L2Norm, scale) + { + } + } - public ColInfoEx(Column col, Arguments args) + /// + /// Describes how the transformer handles one LpNorm column pair. + /// + public sealed class LpNormColumnInfo : ColumnInfoBase + { + /// + /// Describes how the transformer handles one LpNorm column pair. + /// + /// Name of input column. + /// Name of output column. + /// Subtract mean from each value before normalizing. + /// The norm to use to normalize each sample. + public LpNormColumnInfo(string input, string output, + bool substractMean = LpNormalizingEstimatorBase.Defaults.LpSubstractMean, + LpNormalizingEstimatorBase.NormalizerKind normalizerKind = LpNormalizingEstimatorBase.Defaults.NormKind) + : base(input, output, substractMean, normalizerKind, 1) { - SubtractMean = col.SubMean ?? args.SubMean; - NormKind = col.NormKind ?? args.NormKind; - Scale = 1; } + } - public ColInfoEx(GcnColumn col, GcnArguments args) + private sealed class ColumnInfoLoaded : ColumnInfoBase + { + internal ColumnInfoLoaded(ModelLoadContext ctx, string input, string output, bool normKindSerialized) + : base(ctx, input, output, normKindSerialized) + { + + } + } + + /// + /// Describes base class for one column pair. + /// + public abstract class ColumnInfoBase + { + public readonly string Input; + public readonly string Output; + public readonly bool SubtractMean; + public readonly LpNormalizingEstimatorBase.NormalizerKind NormKind; + public readonly float Scale; + + internal ColumnInfoBase(string input, string output, bool substractMean, LpNormalizingEstimatorBase.NormalizerKind normalizerKind, float scale) { - SubtractMean = col.SubMean ?? args.SubMean; - NormKind = (col.UseStdDev ?? args.UseStdDev) ? NormalizerKind.StdDev : NormalizerKind.L2Norm; - Scale = col.Scale ?? args.Scale; - Contracts.CheckUserArg(0 < Scale && Scale < Float.PositiveInfinity, nameof(args.Scale), "scale must be a positive finite value"); + Contracts.CheckNonWhiteSpace(input, nameof(input)); + Contracts.CheckNonWhiteSpace(output, nameof(output)); + Input = input; + Output = output; + SubtractMean = substractMean; + Contracts.CheckUserArg(0 < scale && scale < float.PositiveInfinity, nameof(scale), "scale must be a positive finite value"); + Scale = scale; + NormKind = normalizerKind; } - public ColInfoEx(ModelLoadContext ctx, bool normKindSerialized) + internal ColumnInfoBase(ModelLoadContext ctx, string input, string output, bool normKindSerialized) { Contracts.AssertValue(ctx); + Contracts.CheckNonWhiteSpace(input, nameof(input)); + Contracts.CheckNonWhiteSpace(output, nameof(output)); + Input = input; + Output = output; // *** Binary format *** - // byte: subMean + // byte: SubtractMean // byte: NormKind - // Float: scale + // Float: Scale SubtractMean = ctx.Reader.ReadBoolByte(); byte normKindVal = ctx.Reader.ReadByte(); - Contracts.CheckDecode(Enum.IsDefined(typeof(NormalizerKind), normKindVal)); - NormKind = (NormalizerKind)normKindVal; + Contracts.CheckDecode(Enum.IsDefined(typeof(LpNormalizingEstimatorBase.NormalizerKind), normKindVal)); + NormKind = (LpNormalizingEstimatorBase.NormalizerKind)normKindVal; // Note: In early versions, a bool option (useStd) to whether to normalize by StdDev rather than // L2 norm was used. normKind was added in version=verVectorNormalizerSupported. // normKind was defined in a way such that the serialized boolean (0: use StdDev, 1: use L2) is // still valid. Contracts.CheckDecode(normKindSerialized || - (NormKind == NormalizerKind.L2Norm || NormKind == NormalizerKind.StdDev)); + (NormKind == LpNormalizingEstimatorBase.NormalizerKind.L2Norm || NormKind == LpNormalizingEstimatorBase.NormalizerKind.StdDev)); Scale = ctx.Reader.ReadFloat(); - Contracts.CheckDecode(0 < Scale && Scale < Float.PositiveInfinity); + Contracts.CheckDecode(0 < Scale && Scale < float.PositiveInfinity); } - public void Save(ModelSaveContext ctx) + internal void Save(ModelSaveContext ctx) { Contracts.AssertValue(ctx); - // *** Binary format *** - // byte: subMean + // byte: SubtractMean // byte: NormKind - // Float: scale + // Float: Scale ctx.Writer.WriteBoolByte(SubtractMean); ctx.Writer.Write((byte)NormKind); - Contracts.Assert(0 < Scale && Scale < Float.PositiveInfinity); + Contracts.Assert(0 < Scale && Scale < float.PositiveInfinity); ctx.Writer.Write(Scale); } } internal const string GcnSummary = "Performs a global contrast normalization on input values: Y = (s * X - M) / D, where s is a scale, M is mean and D is " - + "either L2 norm or standard deviation."; + + "either L2 norm or standard deviation."; internal const string UserNameGn = "Global Contrast Normalization Transform"; internal const string ShortNameGn = "Gcn"; @@ -225,456 +271,452 @@ public void Save(ModelSaveContext ctx) private const uint VerVectorNormalizerSupported = 0x00010002; - public const string LoaderSignature = "GcnTransform"; + internal const string LoaderSignature = "GcnTransform"; internal const string LoaderSignatureOld = "GcnFunction"; + private static VersionInfo GetVersionInfo() { return new VersionInfo( modelSignature: "GCNORMAF", // verWrittenCur: 0x00010001, // Initial - verWrittenCur: 0x00010002, // Added arguments for Lp-norm (vector/row-wise) normalizer - verReadableCur: 0x00010002, + // verWrittenCur: 0x00010002, // Added arguments for Lp-norm (vector/row-wise) normalizer + verWrittenCur: 0x00010003, // Dropped sizeof(Float). + verReadableCur: 0x00010003, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, loaderSignatureAlt: LoaderSignatureOld, - loaderAssemblyName: typeof(LpNormNormalizerTransform).Assembly.FullName); + loaderAssemblyName: typeof(LpNormalizingTransformer).Assembly.FullName); } private const string RegistrationName = "LpNormNormalizer"; // REVIEW: should this be an argument instead? - private const Float MinScale = (Float)1e-8; + private const float MinScale = 1e-8f; - private readonly ColInfoEx[] _exes; + public IReadOnlyCollection Columns => _columns.AsReadOnly(); + private readonly ColumnInfoBase[] _columns; - /// - /// A helper method to create GlobalContrastNormalizer transform for public facing API. - /// - /// Host Environment. - /// Input . This is the output from previous transform or loader. - /// Name of the output column. - /// Name of the column to be transformed. If this is null '' will be used. - /// Subtract mean from each value before normalizing. - /// Normalize by standard deviation rather than L2 norm. - /// Scale features by this value. - public static IDataTransform CreateGlobalContrastNormalizer(IHostEnvironment env, - IDataView input, - string name, - string source = null, - bool subMean = Defaults.GcnSubMean, - bool useStdDev = Defaults.UseStdDev, - Float scale = Defaults.Scale) - { - var args = new GcnArguments() - { - Column = new[] { new GcnColumn(){ - Source = source ?? name, - Name = name - } - }, - SubMean = subMean, - UseStdDev = useStdDev, - Scale = scale - }; - return new LpNormNormalizerTransform(env, args, input); + private static (string input, string output)[] GetColumnPairs(ColumnInfoBase[] columns) + { + Contracts.CheckValue(columns, nameof(columns)); + return columns.Select(x => (x.Input, x.Output)).ToArray(); } + protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCol) + { + var inType = inputSchema.GetColumnType(srcCol); + if (!LpNormalizingEstimatorBase.IsColumnTypeValid(inType)) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", inputSchema.GetColumnName(srcCol), LpNormalizingEstimatorBase.ExpectedColumnType, inType.ToString()); + } /// - /// Public constructor corresponding to SignatureDataTransform. + /// Create a that takes multiple pairs of columns. /// - public LpNormNormalizerTransform(IHostEnvironment env, GcnArguments args, IDataView input) - : base(env, RegistrationName, env.CheckRef(args, nameof(args)).Column, - input, TestIsFloatVector) + public LpNormalizingTransformer(IHostEnvironment env, params ColumnInfoBase[] columns) : + base(Contracts.CheckRef(env, nameof(env)).Register(nameof(LpNormalizingTransformer)), GetColumnPairs(columns)) { - Host.AssertNonEmpty(Infos); - Host.Assert(Infos.Length == Utils.Size(args.Column)); + _columns = columns.ToArray(); + } - _exes = new ColInfoEx[Infos.Length]; - for (int i = 0; i < _exes.Length; i++) - _exes[i] = new ColInfoEx(args.Column[i], args); + // Factory method for SignatureDataTransform for GcnArguments class. + internal static IDataTransform Create(IHostEnvironment env, GcnArguments args, IDataView input) + { + Contracts.CheckValue(env, nameof(env)); + env.CheckValue(args, nameof(args)); + env.CheckValue(input, nameof(input)); - // REVIEW: for now check only global (default) values. Move to Bindings/ColInfoEx? - if (!args.SubMean && args.UseStdDev) + env.CheckValue(args.Column, nameof(args.Column)); + var cols = new GcnColumnInfo[args.Column.Length]; + using (var ch = env.Start("ValidateArgs")) { - using (var ch = Host.Start("Argument validation")) + for (int i = 0; i < cols.Length; i++) { - ch.Warning("subMean parameter is false while useStd is true. It is advisable to set subMean to true in case useStd is set to true."); + var item = args.Column[i]; + cols[i] = new GcnColumnInfo(item.Source ?? item.Name, + item.Name, + item.SubMean ?? args.SubMean, + item.UseStdDev ?? args.UseStdDev, + item.Scale ?? args.Scale); } + if (!args.SubMean && args.UseStdDev) + ch.Warning("subMean parameter is false while useStd is true. It is advisable to set subMean to true in case useStd is set to true."); } - SetMetadata(); + return new LpNormalizingTransformer(env, cols).MakeDataTransform(input); } - /// - /// A helper method to create LpNormNormalizer transform for public facing API. - /// - /// Host Environment. - /// Input . This is the output from previous transform or loader. - /// Name of the output column. - /// Name of the column to be transformed. If this is null '' will be used. - /// The norm to use to normalize each sample. - /// Subtract mean from each value before normalizing. - public static IDataTransform CreateLpNormNormalizer(IHostEnvironment env, - IDataView input, - string name, - string source = null, - NormalizerKind normKind = Defaults.NormKind, - bool subMean = Defaults.LpSubMean) - { - var args = new Arguments() + // Factory method for SignatureDataTransform for Arguments class. + internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) + { + Contracts.CheckValue(env, nameof(env)); + env.CheckValue(args, nameof(args)); + env.CheckValue(input, nameof(input)); + + env.CheckValue(args.Column, nameof(args.Column)); + var cols = new LpNormColumnInfo[args.Column.Length]; + using (var ch = env.Start("ValidateArgs")) { - Column = new[] { new Column(){ - Source = source ?? name, - Name = name - } - }, - SubMean = subMean, - NormKind = normKind - }; - return new LpNormNormalizerTransform(env, args, input); + for (int i = 0; i < cols.Length; i++) + { + var item = args.Column[i]; + cols[i] = new LpNormColumnInfo(item.Source ?? item.Name, + item.Name, + item.SubMean ?? args.SubMean, + item.NormKind ?? args.NormKind); + } + } + return new LpNormalizingTransformer(env, cols).MakeDataTransform(input); } - public LpNormNormalizerTransform(IHostEnvironment env, Arguments args, IDataView input) - : base(env, RegistrationName, env.CheckRef(args, nameof(args)).Column, - input, TestIsFloatVector) + // Factory method for SignatureLoadModel. + private static LpNormalizingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { - Host.AssertNonEmpty(Infos); - Host.Assert(Infos.Length == Utils.Size(args.Column)); + Contracts.CheckValue(env, nameof(env)); + var host = env.Register(nameof(LpNormalizingTransformer)); - _exes = new ColInfoEx[Infos.Length]; - for (int i = 0; i < _exes.Length; i++) - _exes[i] = new ColInfoEx(args.Column[i], args); - SetMetadata(); + host.CheckValue(ctx, nameof(ctx)); + ctx.CheckAtModel(GetVersionInfo()); + if (ctx.Header.ModelVerWritten <= 0x00010002) + { + int cbFloat = ctx.Reader.ReadInt32(); + env.CheckDecode(cbFloat == sizeof(float)); + } + return new LpNormalizingTransformer(host, ctx); } - private LpNormNormalizerTransform(IHost host, ModelLoadContext ctx, IDataView input) - : base(host, ctx, input, TestIsFloatItem) - { - Host.AssertValue(ctx); + // Factory method for SignatureLoadDataTransform. + private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + => Create(env, ctx).MakeDataTransform(input); + // Factory method for SignatureLoadRowMapper. + private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) + => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); + + private LpNormalizingTransformer(IHost host, ModelLoadContext ctx) + : base(host, ctx) + { // *** Binary format *** // // - // foreach added column - // ColInfoEx - - Host.AssertNonEmpty(Infos); - _exes = new ColInfoEx[Infos.Length]; - for (int i = 0; i < _exes.Length; i++) - _exes[i] = new ColInfoEx(ctx, ctx.Header.ModelVerWritten >= VerVectorNormalizerSupported); - SetMetadata(); - } - - public static LpNormNormalizerTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) - { - Contracts.CheckValue(env, nameof(env)); - var h = env.Register(RegistrationName); - h.CheckValue(ctx, nameof(ctx)); - h.CheckValue(input, nameof(input)); - ctx.CheckAtModel(GetVersionInfo()); - return h.Apply("Loading Model", - ch => - { - // *** Binary format *** - // int: sizeof(Float) - // - int cbFloat = ctx.Reader.ReadInt32(); - ch.CheckDecode(cbFloat == sizeof(Float)); - return new LpNormNormalizerTransform(h, ctx, input); - }); + // + var columnsLength = ColumnPairs.Length; + _columns = new ColumnInfoLoaded[columnsLength]; + for (int i = 0; i < columnsLength; i++) + _columns[i] = new ColumnInfoLoaded(ctx, ColumnPairs[i].input, ColumnPairs[i].output, ctx.Header.ModelVerWritten >= VerVectorNormalizerSupported); } public override void Save(ModelSaveContext ctx) { Host.CheckValue(ctx, nameof(ctx)); + ctx.CheckAtModel(); ctx.SetVersionInfo(GetVersionInfo()); // *** Binary format *** - // int: sizeof(Float) // - // foreach added column - // ColInfoEx - ctx.Writer.Write(sizeof(Float)); - SaveBase(ctx); - Host.Assert(_exes.Length == Infos.Length); - for (int i = 0; i < _exes.Length; i++) - _exes[i].Save(ctx); - } + // + SaveColumns(ctx); - protected override ColumnType GetColumnTypeCore(int iinfo) - { - Host.Check(0 <= iinfo & iinfo < Infos.Length); - return Infos[iinfo].TypeSrc; + Host.Assert(_columns.Length == ColumnPairs.Length); + foreach (var col in _columns) + col.Save(ctx); } - private void SetMetadata() + protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, Schema.Create(schema)); + + private sealed class Mapper : OneToOneMapperBase { - var md = Metadata; - for (int iinfo = 0; iinfo < Infos.Length; iinfo++) + private readonly ColumnType[] _srcTypes; + private readonly int[] _srcCols; + private readonly ColumnType[] _types; + private readonly LpNormalizingTransformer _parent; + + public Mapper(LpNormalizingTransformer parent, Schema inputSchema) + : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { - using (var bldr = md.BuildMetadata(iinfo, Source.Schema, Infos[iinfo].Source, MetadataUtils.Kinds.SlotNames)) - bldr.AddPrimitive(MetadataUtils.Kinds.IsNormalized, BoolType.Instance, true); + _parent = parent; + _types = new ColumnType[_parent.ColumnPairs.Length]; + _srcTypes = new ColumnType[_parent.ColumnPairs.Length]; + _srcCols = new int[_parent.ColumnPairs.Length]; + for (int i = 0; i < _parent.ColumnPairs.Length; i++) + { + inputSchema.TryGetColumnIndex(_parent.ColumnPairs[i].input, out _srcCols[i]); + var srcCol = inputSchema[_srcCols[i]]; + _srcTypes[i] = srcCol.Type; + _types[i] = srcCol.Type; + } } - md.Seal(); - } - protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, out Action disposer) - { - Host.AssertValueOrNull(ch); - Host.AssertValue(input); - Host.Assert(0 <= iinfo && iinfo < Infos.Length); - disposer = null; + protected override Schema.Column[] GetOutputColumnsCore() + { + var result = new Schema.Column[_parent.ColumnPairs.Length]; + for (int i = 0; i < _parent.ColumnPairs.Length; i++) + { + var builder = new Schema.Metadata.Builder(); + builder.Add(InputSchema[ColMapNewToOld[i]].Metadata, name => name == MetadataUtils.Kinds.SlotNames); + ValueGetter getter = (ref bool dst) => dst = true; + builder.Add(new Schema.Column(MetadataUtils.Kinds.IsNormalized, BoolType.Instance, null), getter); + result[i] = new Schema.Column(_parent.ColumnPairs[i].output, _types[i], builder.GetMetadata()); + } + return result; + } - var info = Infos[iinfo]; - var ex = _exes[iinfo]; - Host.Assert(0 < ex.Scale && ex.Scale < Float.PositiveInfinity); - Host.Assert(info.TypeSrc.IsVector); + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + { + Contracts.AssertValue(input); + Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); + disposer = null; - var getSrc = GetSrcGetter>(input, iinfo); - var src = default(VBuffer); - ValueGetter> del; - Float scale = ex.Scale; + var ex = _parent._columns[iinfo]; + Host.Assert(0 < ex.Scale && ex.Scale < float.PositiveInfinity); + Host.Assert(_srcTypes[iinfo].IsVector); + + var getSrc = input.GetGetter>(_srcCols[iinfo]); + var src = default(VBuffer); + ValueGetter> del; + float scale = ex.Scale; + + if (ex.SubtractMean) + { + switch (ex.NormKind) + { + case LpNormalizingEstimatorBase.NormalizerKind.StdDev: + del = + (ref VBuffer dst) => + { + getSrc(ref src); + var srcValues = src.GetValues(); + var mean = Mean(srcValues, src.Length); + var divisor = StdDev(srcValues, src.Length, mean); + FillValues(Host, in src, ref dst, divisor, scale, mean); + }; + return del; + case LpNormalizingEstimatorBase.NormalizerKind.L2Norm: + del = + (ref VBuffer dst) => + { + getSrc(ref src); + var srcValues = src.GetValues(); + var mean = Mean(srcValues, src.Length); + var divisor = L2Norm(srcValues, mean); + FillValues(Host, in src, ref dst, divisor, scale, mean); + }; + return del; + case LpNormalizingEstimatorBase.NormalizerKind.L1Norm: + del = + (ref VBuffer dst) => + { + getSrc(ref src); + var srcValues = src.GetValues(); + var mean = Mean(srcValues, src.Length); + var divisor = L1Norm(srcValues, mean); + FillValues(Host, in src, ref dst, divisor, scale, mean); + }; + return del; + case LpNormalizingEstimatorBase.NormalizerKind.LInf: + del = + (ref VBuffer dst) => + { + getSrc(ref src); + var srcValues = src.GetValues(); + var mean = Mean(srcValues, src.Length); + var divisor = LInfNorm(srcValues, mean); + FillValues(Host, in src, ref dst, divisor, scale, mean); + }; + return del; + default: + Host.Assert(false, "Unsupported normalizer type"); + goto case LpNormalizingEstimatorBase.NormalizerKind.L2Norm; + } + } - if (ex.SubtractMean) - { switch (ex.NormKind) { - case NormalizerKind.StdDev: + case LpNormalizingEstimatorBase.NormalizerKind.StdDev: del = - (ref VBuffer dst) => + (ref VBuffer dst) => { getSrc(ref src); - Float mean = Mean(src.Values, src.Count, src.Length); - Float divisor = StdDev(src.Values, src.Count, src.Length, mean); - FillValues(Host, in src, ref dst, divisor, scale, mean); + var divisor = StdDev(src.GetValues(), src.Length); + FillValues(Host, in src, ref dst, divisor, scale); }; return del; - case NormalizerKind.L2Norm: + case LpNormalizingEstimatorBase.NormalizerKind.L2Norm: del = - (ref VBuffer dst) => + (ref VBuffer dst) => { getSrc(ref src); - Float mean = Mean(src.Values, src.Count, src.Length); - Float divisor = L2Norm(src.Values, src.Count, mean); - FillValues(Host, in src, ref dst, divisor, scale, mean); + var divisor = L2Norm(src.GetValues()); + FillValues(Host, in src, ref dst, divisor, scale); }; return del; - case NormalizerKind.L1Norm: + case LpNormalizingEstimatorBase.NormalizerKind.L1Norm: del = - (ref VBuffer dst) => + (ref VBuffer dst) => { getSrc(ref src); - Float mean = Mean(src.Values, src.Count, src.Length); - Float divisor = L1Norm(src.Values, src.Count, mean); - FillValues(Host, in src, ref dst, divisor, scale, mean); + var divisor = L1Norm(src.GetValues()); + FillValues(Host, in src, ref dst, divisor, scale); }; return del; - case NormalizerKind.LInf: + case LpNormalizingEstimatorBase.NormalizerKind.LInf: del = - (ref VBuffer dst) => + (ref VBuffer dst) => { getSrc(ref src); - Float mean = Mean(src.Values, src.Count, src.Length); - Float divisor = LInfNorm(src.Values, src.Count, mean); - FillValues(Host, in src, ref dst, divisor, scale, mean); + var divisor = LInfNorm(src.GetValues()); + FillValues(Host, in src, ref dst, divisor, scale); }; return del; default: Host.Assert(false, "Unsupported normalizer type"); - goto case NormalizerKind.L2Norm; + goto case LpNormalizingEstimatorBase.NormalizerKind.L2Norm; } } - switch (ex.NormKind) + private static void FillValues(IExceptionContext ectx, in VBuffer src, ref VBuffer dst, float divisor, float scale, float offset = 0) { - case NormalizerKind.StdDev: - del = - (ref VBuffer dst) => - { - getSrc(ref src); - Float divisor = StdDev(src.Values, src.Count, src.Length); - FillValues(Host, in src, ref dst, divisor, scale); - }; - return del; - case NormalizerKind.L2Norm: - del = - (ref VBuffer dst) => - { - getSrc(ref src); - Float divisor = L2Norm(src.Values, src.Count); - FillValues(Host, in src, ref dst, divisor, scale); - }; - return del; - case NormalizerKind.L1Norm: - del = - (ref VBuffer dst) => - { - getSrc(ref src); - Float divisor = L1Norm(src.Values, src.Count); - FillValues(Host, in src, ref dst, divisor, scale); - }; - return del; - case NormalizerKind.LInf: - del = - (ref VBuffer dst) => - { - getSrc(ref src); - Float divisor = LInfNorm(src.Values, src.Count); - FillValues(Host, in src, ref dst, divisor, scale); - }; - return del; - default: - Host.Assert(false, "Unsupported normalizer type"); - goto case NormalizerKind.L2Norm; - } - } - - private static void FillValues(IExceptionContext ectx, in VBuffer src, ref VBuffer dst, Float divisor, Float scale, Float offset = 0) - { - int count = src.Count; - int length = src.Length; - ectx.Assert(Utils.Size(src.Values) >= count); - ectx.Assert(divisor >= 0); + var srcValues = src.GetValues(); + int count = srcValues.Length; + int length = src.Length; + ectx.Assert(divisor >= 0); - if (count == 0) - { - dst = new VBuffer(length, 0, dst.Values, dst.Indices); - return; - } - ectx.Assert(count > 0); - ectx.Assert(length > 0); + if (count == 0) + { + VBufferUtils.Resize(ref dst, length, 0); + return; + } + ectx.Assert(count > 0); + ectx.Assert(length > 0); - Float normScale = scale; - if (divisor > 0) - normScale /= divisor; + float normScale = scale; + if (divisor > 0) + normScale /= divisor; - // Don't normalize small values. - if (normScale < MinScale) - normScale = 1; + // Don't normalize small values. + if (normScale < MinScale) + normScale = 1; - if (offset == 0) - { - var dstValues = dst.Values; - if (Utils.Size(dstValues) < count) - dstValues = new Float[count]; - var dstIndices = dst.Indices; - if (!src.IsDense) + VBufferEditor editor; + if (offset == 0) { - if (Utils.Size(dstIndices) < count) - dstIndices = new int[count]; - Array.Copy(src.Indices, dstIndices, count); - } + editor = VBufferEditor.Create(ref dst, length, count); + var dstValues = editor.Values; + if (!src.IsDense) + { + src.GetIndices().CopyTo(editor.Indices); + } - CpuMathUtils.Scale(normScale, src.Values, dstValues, count); - dst = new VBuffer(length, count, dstValues, dstIndices); + CpuMathUtils.Scale(normScale, src.GetValues(), dstValues, count); + dst = editor.Commit(); - return; - } + return; + } - // Subtracting the mean requires a dense representation. - src.CopyToDense(ref dst); + // Subtracting the mean requires a dense representation. + src.CopyToDense(ref dst); - if (normScale != 1) - CpuMathUtils.ScaleAdd(normScale, -offset, dst.Values.AsSpan(0, length)); - else - CpuMathUtils.Add(-offset, dst.Values.AsSpan(0, length)); - } + editor = VBufferEditor.CreateFromBuffer(ref dst); + if (normScale != 1) + CpuMathUtils.ScaleAdd(normScale, -offset, editor.Values); + else + CpuMathUtils.Add(-offset, editor.Values); + } - /// - /// Compute Standard Deviation. In case of both subMean and useStd are true, we technically need to compute variance - /// based on centered values (i.e. after subtracting the mean). But since the centered - /// values mean is approximately zero, we can use variance of non-centered values. - /// - private static Float StdDev(Float[] values, int count, int length) - { - Contracts.Assert(0 <= count && count <= length); - if (count == 0) - return 0; - // We need a mean to compute variance. - Float tmpMean = CpuMathUtils.Sum(values.AsSpan(0, count)) / length; - Float sumSq = 0; - if (count != length && tmpMean != 0) + /// + /// Compute Standard Deviation. In case of both subMean and useStd are true, we technically need to compute variance + /// based on centered values (i.e. after subtracting the mean). But since the centered + /// values mean is approximately zero, we can use variance of non-centered values. + /// + private static float StdDev(ReadOnlySpan values, int length) { - // Sparse representation. - Float meanSq = tmpMean * tmpMean; - sumSq = (length - count) * meanSq; + Contracts.Assert(0 <= values.Length && values.Length <= length); + if (values.Length == 0) + return 0; + // We need a mean to compute variance. + var tmpMean = CpuMathUtils.Sum(values) / length; + float sumSq = 0; + if (values.Length != length && tmpMean != 0) + { + // Sparse representation. + float meanSq = tmpMean * tmpMean; + sumSq = (length - values.Length) * meanSq; + } + sumSq += CpuMathUtils.SumSq(tmpMean, values); + return MathUtils.Sqrt(sumSq / length); } - sumSq += CpuMathUtils.SumSq(tmpMean, values.AsSpan(0, count)); - return MathUtils.Sqrt(sumSq / length); - } - /// - /// Compute Standard Deviation. - /// We have two overloads of StdDev instead of one with mean for perf reasons. - /// - private static Float StdDev(Float[] values, int count, int length, Float mean) - { - Contracts.Assert(0 <= count && count <= length); - if (count == 0) - return 0; - Float sumSq = 0; - if (count != length && mean != 0) + /// + /// Compute Standard Deviation. + /// We have two overloads of StdDev instead of one with mean for perf reasons. + /// + private static float StdDev(ReadOnlySpan values, int length, float mean) { - // Sparse representation. - Float meanSq = mean * mean; - sumSq = (length - count) * meanSq; + Contracts.Assert(0 <= values.Length && values.Length <= length); + if (values.Length == 0) + return 0; + float sumSq = 0; + if (values.Length != length && mean != 0) + { + // Sparse representation. + float meanSq = mean * mean; + sumSq = (length - values.Length) * meanSq; + } + sumSq += CpuMathUtils.SumSq(mean, values); + return MathUtils.Sqrt(sumSq / length); } - sumSq += CpuMathUtils.SumSq(mean, values.AsSpan(0, count)); - return MathUtils.Sqrt(sumSq / length); - } - /// - /// Compute L2-norm. L2-norm computation doesn't subtract the mean from the source values. - /// However, we substract the mean here in case subMean is true (if subMean is false, mean is zero). - /// - private static Float L2Norm(Float[] values, int count, Float mean = 0) - { - if (count == 0) - return 0; - return MathUtils.Sqrt(CpuMathUtils.SumSq(mean, values.AsSpan(0, count))); - } + /// + /// Compute L2-norm. L2-norm computation doesn't subtract the mean from the source values. + /// However, we substract the mean here in case subMean is true (if subMean is false, mean is zero). + /// + private static float L2Norm(ReadOnlySpan values, float mean = 0) + { + if (values.Length == 0) + return 0; + return MathUtils.Sqrt(CpuMathUtils.SumSq(mean, values)); + } - /// - /// Compute L1-norm. L1-norm computation doesn't subtract the mean from the source values. - /// However, we substract the mean here in case subMean is true (if subMean is false, mean is zero). - /// - private static Float L1Norm(Float[] values, int count, Float mean = 0) - { - if (count == 0) - return 0; - return CpuMathUtils.SumAbs(mean, values.AsSpan(0, count)); - } + /// + /// Compute L1-norm. L1-norm computation doesn't subtract the mean from the source values. + /// However, we substract the mean here in case subMean is true (if subMean is false, mean is zero). + /// + private static float L1Norm(ReadOnlySpan values, float mean = 0) + { + if (values.Length == 0) + return 0; + return CpuMathUtils.SumAbs(mean, values); + } - /// - /// Compute LInf-norm. LInf-norm computation doesn't subtract the mean from the source values. - /// However, we substract the mean here in case subMean is true (if subMean is false, mean is zero). - /// - private static Float LInfNorm(Float[] values, int count, Float mean = 0) - { - if (count == 0) - return 0; - return CpuMathUtils.MaxAbsDiff(mean, values.AsSpan(0, count)); - } + /// + /// Compute LInf-norm. LInf-norm computation doesn't subtract the mean from the source values. + /// However, we substract the mean here in case subMean is true (if subMean is false, mean is zero). + /// + private static float LInfNorm(ReadOnlySpan values, float mean = 0) + { + if (values.Length == 0) + return 0; + return CpuMathUtils.MaxAbsDiff(mean, values); + } - private static Float Mean(Float[] src, int count, int length) - { - if (length == 0 || count == 0) - return 0; - return CpuMathUtils.Sum(src.AsSpan(0, count)) / length; + private static float Mean(ReadOnlySpan src, int length) + { + if (length == 0 || src.Length == 0) + return 0; + return CpuMathUtils.Sum(src) / length; + } } } public static class LpNormalization { [TlcModule.EntryPoint(Name = "Transforms.LpNormalizer", - Desc = LpNormNormalizerTransform.Summary, - UserName = LpNormNormalizerTransform.UserNameLP, - ShortName = LpNormNormalizerTransform.ShortNameLP, + Desc = LpNormalizingTransformer.Summary, + UserName = LpNormalizingTransformer.UserNameLP, + ShortName = LpNormalizingTransformer.ShortNameLP, XmlInclude = new[] { @"" })] - public static CommonOutputs.TransformOutput Normalize(IHostEnvironment env, LpNormNormalizerTransform.Arguments input) + public static CommonOutputs.TransformOutput Normalize(IHostEnvironment env, LpNormalizingTransformer.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "LpNormalize", input); - var xf = new LpNormNormalizerTransform(h, input, input.Data); + var xf = LpNormalizingTransformer.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), @@ -683,14 +725,14 @@ public static CommonOutputs.TransformOutput Normalize(IHostEnvironment env, LpNo } [TlcModule.EntryPoint(Name = "Transforms.GlobalContrastNormalizer", - Desc = LpNormNormalizerTransform.GcnSummary, - UserName = LpNormNormalizerTransform.UserNameGn, - ShortName = LpNormNormalizerTransform.ShortNameGn, + Desc = LpNormalizingTransformer.GcnSummary, + UserName = LpNormalizingTransformer.UserNameGn, + ShortName = LpNormalizingTransformer.ShortNameGn, XmlInclude = new[] { @"" })] - public static CommonOutputs.TransformOutput GcNormalize(IHostEnvironment env, LpNormNormalizerTransform.GcnArguments input) + public static CommonOutputs.TransformOutput GcNormalize(IHostEnvironment env, LpNormalizingTransformer.GcnArguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "GcNormalize", input); - var xf = new LpNormNormalizerTransform(h, input, input.Data); + var xf = LpNormalizingTransformer.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), @@ -698,4 +740,150 @@ public static CommonOutputs.TransformOutput GcNormalize(IHostEnvironment env, Lp }; } } + + /// + /// Base estimator class for LpNorm and Gcn normalizers. + /// + public abstract class LpNormalizingEstimatorBase : TrivialEstimator + { + /// + /// The kind of unit norm vectors are rescaled to. This enumeration is serialized. + /// + public enum NormalizerKind : byte + { + L2Norm = 0, + StdDev = 1, + L1Norm = 2, + LInf = 3 + } + + internal static class Defaults + { + public const NormalizerKind NormKind = NormalizerKind.L2Norm; + public const bool LpSubstractMean = false; + public const bool GcnSubstractMean = true; + public const bool UseStdDev = false; + public const float Scale = 1; + } + + /// + /// Create a that takes multiple pairs of columns. + /// + public LpNormalizingEstimatorBase(IHostEnvironment env, params LpNormalizingTransformer.ColumnInfoBase[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(LpNormalizingEstimator)), new LpNormalizingTransformer(env, columns)) + { + + } + + internal static bool IsColumnTypeValid(ColumnType type) + { + if (!(type.IsVector && type.IsKnownSizeVector)) + return false; + return type.ItemType == NumberType.R4; + } + + internal static bool IsSchemaColumnValid(SchemaShape.Column col) + { + if (col.Kind != SchemaShape.Column.VectorKind.Vector) + return false; + return col.ItemType == NumberType.R4; + } + + internal const string ExpectedColumnType = "Expected float or float vector of known size"; + + public override SchemaShape GetOutputSchema(SchemaShape inputSchema) + { + Host.CheckValue(inputSchema, nameof(inputSchema)); + var result = inputSchema.Columns.ToDictionary(x => x.Name); + foreach (var colPair in Transformer.Columns) + { + if (!inputSchema.TryFindColumn(colPair.Input, out var col)) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", colPair.Input); + if (!IsSchemaColumnValid(col)) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", colPair.Input, ExpectedColumnType, col.GetTypeString()); + var metadata = new List(); + if (col.Metadata.TryFindColumn(MetadataUtils.Kinds.SlotNames, out var slotMeta)) + metadata.Add(slotMeta); + metadata.Add(new SchemaShape.Column(MetadataUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BoolType.Instance, false)); + result[colPair.Output] = new SchemaShape.Column(colPair.Output, col.Kind, col.ItemType, false, new SchemaShape(metadata.ToArray())); + } + return new SchemaShape(result.Values); + } + } + + /// + /// Lp Normalizing estimator allow you take columns and normalize them individually by rescaling them to unit norm. + /// + public sealed class LpNormalizingEstimator : LpNormalizingEstimatorBase + { + /// + /// The environment. + /// Name of the input column. + /// Name of the column resulting from the transformation of . Null means is replaced. + /// Type of norm to use to normalize each sample. + /// Subtract mean from each value before normalizing. + public LpNormalizingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, + NormalizerKind normKind = Defaults.NormKind, bool substractMean = Defaults.LpSubstractMean) + : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, normKind, substractMean) + { + } + + /// + /// The environment. + /// Pairs of columns to run the normalization on. + /// Type of norm to use to normalize each sample. + /// Subtract mean from each value before normalizing. + public LpNormalizingEstimator(IHostEnvironment env, (string input, string output)[] columns, + NormalizerKind normKind = Defaults.NormKind, bool substractMean = Defaults.LpSubstractMean) + : this(env, columns.Select(x => new LpNormalizingTransformer.LpNormColumnInfo(x.input, x.output, substractMean, normKind)).ToArray()) + { + } + + /// + /// Create a that takes multiple pairs of columns. + /// + public LpNormalizingEstimator(IHostEnvironment env, params LpNormalizingTransformer.LpNormColumnInfo[] columns) + : base(env, columns) + { + } + } + + /// + /// Global contrast normalizing estimator allow you take columns and performs global constrast normalization on them. + /// + public sealed class GlobalContrastNormalizingEstimator : LpNormalizingEstimatorBase + { + /// + /// The environment. + /// Name of the input column. + /// Name of the column resulting from the transformation of . Null means is replaced. + /// Subtract mean from each value before normalizing. + /// Normalize by standard deviation rather than L2 norm. + /// Scale features by this value. + public GlobalContrastNormalizingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, + bool substractMean = Defaults.GcnSubstractMean, bool useStdDev = Defaults.UseStdDev, float scale = Defaults.Scale) + : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, substractMean, useStdDev, scale) + { + } + + /// + /// The environment. + /// Pairs of columns to run the normalization on. + /// Subtract mean from each value before normalizing. + /// Normalize by standard deviation rather than L2 norm. + /// Scale features by this value. + public GlobalContrastNormalizingEstimator(IHostEnvironment env, (string input, string output)[] columns, + bool substractMean = Defaults.GcnSubstractMean, bool useStdDev = Defaults.UseStdDev, float scale = Defaults.Scale) + : this(env, columns.Select(x => new LpNormalizingTransformer.GcnColumnInfo(x.input, x.output, substractMean, useStdDev, scale)).ToArray()) + { + } + + /// + /// Create a that takes multiple pairs of columns. + /// + public GlobalContrastNormalizingEstimator(IHostEnvironment env, params LpNormalizingTransformer.GcnColumnInfo[] columns) : + base(env, columns) + { + } + } } diff --git a/src/Microsoft.ML.Transforms/GroupTransform.cs b/src/Microsoft.ML.Transforms/GroupTransform.cs index 8eebd94230..2d6f1ddd54 100644 --- a/src/Microsoft.ML.Transforms/GroupTransform.cs +++ b/src/Microsoft.ML.Transforms/GroupTransform.cs @@ -96,7 +96,7 @@ public sealed class Arguments : TransformInputBase private readonly GroupSchema _groupSchema; /// - /// Convenience constructor for public facing API. + /// Initializes a new instance of . /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -147,7 +147,7 @@ public override void Save(ModelSaveContext ctx) _groupSchema.Save(ctx); } - public override long? GetRowCount(bool lazy = true) + public override long? GetRowCount() { // We have no idea how many total rows we'll have. return null; @@ -429,7 +429,7 @@ public void GetMetadata(string kind, int col, ref TValue value) /// - The group column getters are taken directly from the trailing cursor. /// - The keep column getters are provided by the aggregators. /// - public sealed class Cursor : RootCursorBase, IRowCursor + private sealed class Cursor : RootCursorBase, IRowCursor { /// /// This class keeps track of the previous group key and tests the current group key against the previous one. @@ -516,9 +516,9 @@ public ListAggregator(IRow row, int col) private void Getter(ref VBuffer dst) { - var values = (Utils.Size(dst.Values) < _size) ? new TValue[_size] : dst.Values; - Array.Copy(_buffer, values, _size); - dst = new VBuffer(_size, values, dst.Indices); + var editor = VBufferEditor.Create(ref dst, _size); + _buffer.AsSpan(0, _size).CopyTo(editor.Values); + dst = editor.Commit(); } public override ValueGetter GetGetter(IExceptionContext ctx) diff --git a/src/Microsoft.ML.Transforms/HashJoinTransform.cs b/src/Microsoft.ML.Transforms/HashJoiningTransform.cs similarity index 92% rename from src/Microsoft.ML.Transforms/HashJoinTransform.cs rename to src/Microsoft.ML.Transforms/HashJoiningTransform.cs index 9517130052..bf674b8ed5 100644 --- a/src/Microsoft.ML.Transforms/HashJoinTransform.cs +++ b/src/Microsoft.ML.Transforms/HashJoiningTransform.cs @@ -16,11 +16,11 @@ using System.Threading; using Float = System.Single; -[assembly: LoadableClass(HashJoinTransform.Summary, typeof(HashJoinTransform), typeof(HashJoinTransform.Arguments), typeof(SignatureDataTransform), - HashJoinTransform.UserName, "HashJoinTransform", HashJoinTransform.RegistrationName)] +[assembly: LoadableClass(HashJoiningTransform.Summary, typeof(HashJoiningTransform), typeof(HashJoiningTransform.Arguments), typeof(SignatureDataTransform), + HashJoiningTransform.UserName, "HashJoinTransform", HashJoiningTransform.RegistrationName)] -[assembly: LoadableClass(HashJoinTransform.Summary, typeof(HashJoinTransform), null, typeof(SignatureLoadDataTransform), - HashJoinTransform.UserName, HashJoinTransform.LoaderSignature, "HashJoinFunction")] +[assembly: LoadableClass(HashJoiningTransform.Summary, typeof(HashJoiningTransform), null, typeof(SignatureLoadDataTransform), + HashJoiningTransform.UserName, HashJoiningTransform.LoaderSignature, "HashJoinFunction")] [assembly: EntryPointModule(typeof(HashJoin))] @@ -31,7 +31,7 @@ namespace Microsoft.ML.Transforms.Conversions /// column there is an option to specify which slots should be hashed together into one output slot. /// This transform can be applied either to single valued columns or to known length vector columns. /// - public sealed class HashJoinTransform : OneToOneTransformBase + public sealed class HashJoiningTransform : OneToOneTransformBase { public const int NumBitsMin = 1; public const int NumBitsLim = 32; @@ -168,13 +168,13 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010005, verWeCanReadBack: 0x00010005, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(HashJoinTransform).Assembly.FullName); + loaderAssemblyName: typeof(HashJoiningTransform).Assembly.FullName); } private readonly ColumnInfoEx[] _exes; /// - /// Convenience constructor for public facing API. + /// Initializes a new instance of . /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -182,7 +182,7 @@ private static VersionInfo GetVersionInfo() /// Name of the column to be transformed. If this is null '' will be used. /// Whether the values need to be combined for a single hash. /// Number of bits to hash into. Must be between 1 and 31, inclusive. - public HashJoinTransform(IHostEnvironment env, + public HashJoiningTransform(IHostEnvironment env, IDataView input, string name, string source = null, @@ -193,7 +193,7 @@ public HashJoinTransform(IHostEnvironment env, } /// - public HashJoinTransform(IHostEnvironment env, Arguments args, IDataView input) + public HashJoiningTransform(IHostEnvironment env, Arguments args, IDataView input) : base(env, RegistrationName, Contracts.CheckRef(args, nameof(args)).Column, input, TestColumnType) { Host.AssertNonEmpty(Infos); @@ -219,7 +219,7 @@ public HashJoinTransform(IHostEnvironment env, Arguments args, IDataView input) SetMetadata(); } - private HashJoinTransform(IHost host, ModelLoadContext ctx, IDataView input) + private HashJoiningTransform(IHost host, ModelLoadContext ctx, IDataView input) : base(host, ctx, input, TestColumnType) { Host.AssertValue(ctx); @@ -272,7 +272,7 @@ private HashJoinTransform(IHost host, ModelLoadContext ctx, IDataView input) SetMetadata(); } - public static HashJoinTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + public static HashJoiningTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { Contracts.CheckValue(env, nameof(env)); var h = env.Register(RegistrationName); @@ -281,7 +281,7 @@ public static HashJoinTransform Create(IHostEnvironment env, ModelLoadContext ct ctx.CheckAtModel(GetVersionInfo()); h.CheckValue(input, nameof(input)); - return h.Apply("Loading Model", ch => new HashJoinTransform(h, ctx, input)); + return h.Apply("Loading Model", ch => new HashJoiningTransform(h, ctx, input)); } public override void Save(ModelSaveContext ctx) @@ -411,9 +411,7 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) Host.AssertValue(_exes[iinfo].SlotMap); int n = _exes[iinfo].OutputValueCount; - var output = dst.Values; - if (Utils.Size(output) < n) - output = new ReadOnlyMemory[n]; + var dstEditor = VBufferEditor.Create(ref dst, n); var srcColumnName = Source.Schema.GetColumnName(Infos[iinfo].Source); bool useDefaultSlotNames = !Source.Schema.HasSlotNames(Infos[iinfo].Source, Infos[iinfo].TypeSrc.VectorSize); @@ -427,6 +425,7 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) } var outputSlotName = new StringBuilder(); + var srcSlotNameValues = srcSlotNames.GetValues(); for (int slot = 0; slot < n; slot++) { var slotList = _exes[iinfo].SlotMap[slot]; @@ -441,13 +440,13 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) if (useDefaultSlotNames) outputSlotName.AppendFormat("{0}[{1}]", srcColumnName, inputSlotIndex); else - outputSlotName.Append(srcSlotNames.Values[inputSlotIndex]); + outputSlotName.Append(srcSlotNameValues[inputSlotIndex]); } - output[slot] = outputSlotName.ToString().AsMemory(); + dstEditor.Values[slot] = outputSlotName.ToString().AsMemory(); } - dst = new VBuffer>(n, output, dst.Indices); + dst = dstEditor.Commit(); } private delegate uint HashDelegate(in TSrc value, uint seed); @@ -548,25 +547,23 @@ private ValueGetter> ComposeGetterVecToVec(IRow input, int i { getSrc(ref src); Host.Check(src.Length == expectedSrcLength); - TSrc[] values; + ReadOnlySpan values; // force-densify the input // REVIEW: this performs poorly if only a fraction of sparse vector is used for hashing. // This scenario was unlikely at the time of writing. Regardless of performance, the hash value // needs to be consistent across equivalent representations - sparse vs dense. if (src.IsDense) - values = src.Values; + values = src.GetValues(); else { if (denseValues == null) denseValues = new TSrc[expectedSrcLength]; + src.CopyTo(denseValues); values = denseValues; - src.CopyTo(values); } - var hashes = dst.Values; - if (Utils.Size(hashes) < n) - hashes = new uint[n]; + var hashes = VBufferEditor.Create(ref dst, n); for (int i = 0; i < n; i++) { @@ -580,10 +577,10 @@ private ValueGetter> ComposeGetterVecToVec(IRow input, int i hash = hashFunction(in values[srcSlot], hash); } - hashes[i] = (Hashing.MixHash(hash) & mask) + 1; // +1 to offset from zero, which has special meaning for KeyType + hashes.Values[i] = (Hashing.MixHash(hash) & mask) + 1; // +1 to offset from zero, which has special meaning for KeyType } - dst = new VBuffer(n, hashes, dst.Indices); + dst = hashes.Commit(); }; } @@ -615,19 +612,19 @@ private ValueGetter ComposeGetterVecToOne(IRow input, int iinfo) getSrc(ref src); Host.Check(src.Length == expectedSrcLength); - TSrc[] values; + ReadOnlySpan values; // force-densify the input // REVIEW: this performs poorly if only a fraction of sparse vector is used for hashing. // This scenario was unlikely at the time of writing. Regardless of performance, the hash value // needs to be consistent across equivalent representations - sparse vs dense. if (src.IsDense) - values = src.Values; + values = src.GetValues(); else { if (denseValues == null) denseValues = new TSrc[expectedSrcLength]; + src.CopyTo(denseValues); values = denseValues; - src.CopyTo(values); } uint hash = hashSeed; @@ -702,18 +699,18 @@ protected override ColumnType GetColumnTypeCore(int iinfo) public static class HashJoin { [TlcModule.EntryPoint(Name = "Transforms.HashConverter", - Desc = HashJoinTransform.Summary, - UserName = HashJoinTransform.UserName, - ShortName = HashJoinTransform.RegistrationName, + Desc = HashJoiningTransform.Summary, + UserName = HashJoiningTransform.UserName, + ShortName = HashJoiningTransform.RegistrationName, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput Apply(IHostEnvironment env, HashJoinTransform.Arguments input) + public static CommonOutputs.TransformOutput Apply(IHostEnvironment env, HashJoiningTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(input, nameof(input)); var h = EntryPointUtils.CheckArgsAndCreateHost(env, "HashJoin", input); - var view = new HashJoinTransform(h, input, input.Data); + var view = new HashJoiningTransform(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, view, input.Data), diff --git a/src/Microsoft.ML.Transforms/KeyToBinaryVectorTransform.cs b/src/Microsoft.ML.Transforms/KeyToVectorMapping.cs similarity index 89% rename from src/Microsoft.ML.Transforms/KeyToBinaryVectorTransform.cs rename to src/Microsoft.ML.Transforms/KeyToVectorMapping.cs index 7cc814b4ce..f88bff5b87 100644 --- a/src/Microsoft.ML.Transforms/KeyToBinaryVectorTransform.cs +++ b/src/Microsoft.ML.Transforms/KeyToVectorMapping.cs @@ -16,27 +16,27 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(KeyToBinaryVectorTransform.Summary, typeof(IDataTransform), typeof(KeyToBinaryVectorTransform), typeof(KeyToBinaryVectorTransform.Arguments), typeof(SignatureDataTransform), - "Key To Binary Vector Transform", KeyToBinaryVectorTransform.UserName, "KeyToBinary", "ToBinaryVector", DocName = "transform/KeyToBinaryVectorTransform.md")] +[assembly: LoadableClass(KeyToBinaryVectorMappingTransformer.Summary, typeof(IDataTransform), typeof(KeyToBinaryVectorMappingTransformer), typeof(KeyToBinaryVectorMappingTransformer.Arguments), typeof(SignatureDataTransform), + "Key To Binary Vector Transform", KeyToBinaryVectorMappingTransformer.UserName, "KeyToBinary", "ToBinaryVector", DocName = "transform/KeyToBinaryVectorTransform.md")] -[assembly: LoadableClass(KeyToBinaryVectorTransform.Summary, typeof(IDataTransform), typeof(KeyToBinaryVectorTransform), null, typeof(SignatureLoadDataTransform), - "Key To Binary Vector Transform", KeyToBinaryVectorTransform.LoaderSignature)] +[assembly: LoadableClass(KeyToBinaryVectorMappingTransformer.Summary, typeof(IDataTransform), typeof(KeyToBinaryVectorMappingTransformer), null, typeof(SignatureLoadDataTransform), + "Key To Binary Vector Transform", KeyToBinaryVectorMappingTransformer.LoaderSignature)] -[assembly: LoadableClass(KeyToBinaryVectorTransform.Summary, typeof(KeyToBinaryVectorTransform), null, typeof(SignatureLoadModel), - KeyToBinaryVectorTransform.UserName, KeyToBinaryVectorTransform.LoaderSignature)] +[assembly: LoadableClass(KeyToBinaryVectorMappingTransformer.Summary, typeof(KeyToBinaryVectorMappingTransformer), null, typeof(SignatureLoadModel), + KeyToBinaryVectorMappingTransformer.UserName, KeyToBinaryVectorMappingTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(KeyToBinaryVectorTransform), null, typeof(SignatureLoadRowMapper), - KeyToBinaryVectorTransform.UserName, KeyToBinaryVectorTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(KeyToBinaryVectorMappingTransformer), null, typeof(SignatureLoadRowMapper), + KeyToBinaryVectorMappingTransformer.UserName, KeyToBinaryVectorMappingTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Conversions { - public sealed class KeyToBinaryVectorTransform : OneToOneTransformerBase + public sealed class KeyToBinaryVectorMappingTransformer : OneToOneTransformerBase { public sealed class Arguments { [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "New column definition(s) (optional form: name:src)", ShortName = "col", SortOrder = 1)] - public KeyToVectorTransform.Column[] Column; + public KeyToVectorMappingTransformer.Column[] Column; } public class ColumnInfo { @@ -62,7 +62,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00000001, verWeCanReadBack: 0x00000001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(KeyToBinaryVectorTransform).Assembly.FullName); + loaderAssemblyName: typeof(KeyToBinaryVectorMappingTransformer).Assembly.FullName); } private const string RegistrationName = "KeyToBinary"; @@ -91,7 +91,7 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].input, reason, type.ToString()); } - public KeyToBinaryVectorTransform(IHostEnvironment env, params ColumnInfo[] columns) + public KeyToBinaryVectorMappingTransformer(IHostEnvironment env, params ColumnInfo[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), GetColumnPairs(columns)) { _columns = columns.ToArray(); @@ -111,7 +111,7 @@ public override void Save(ModelSaveContext ctx) } // Factory method for SignatureLoadModel. - private static KeyToBinaryVectorTransform Create(IHostEnvironment env, ModelLoadContext ctx) + private static KeyToBinaryVectorMappingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(RegistrationName); @@ -119,10 +119,10 @@ private static KeyToBinaryVectorTransform Create(IHostEnvironment env, ModelLoad host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new KeyToBinaryVectorTransform(host, ctx); + return new KeyToBinaryVectorMappingTransformer(host, ctx); } - private KeyToBinaryVectorTransform(IHost host, ModelLoadContext ctx) + private KeyToBinaryVectorMappingTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) { _columns = new ColumnInfo[ColumnPairs.Length]; @@ -131,7 +131,7 @@ private KeyToBinaryVectorTransform(IHost host, ModelLoadContext ctx) } public static IDataTransform Create(IHostEnvironment env, IDataView input, params ColumnInfo[] columns) => - new KeyToBinaryVectorTransform(env, columns).MakeDataTransform(input); + new KeyToBinaryVectorMappingTransformer(env, columns).MakeDataTransform(input); // Factory method for SignatureDataTransform. public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) @@ -150,7 +150,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV cols[i] = new ColumnInfo(item.Source ?? item.Name, item.Name); }; } - return new KeyToBinaryVectorTransform(env, cols).MakeDataTransform(input); + return new KeyToBinaryVectorMappingTransformer(env, cols).MakeDataTransform(input); } // Factory method for SignatureLoadDataTransform. @@ -163,7 +163,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : MapperBase + private sealed class Mapper : OneToOneMapperBase { private sealed class ColInfo { @@ -179,12 +179,12 @@ public ColInfo(string name, string source, ColumnType type) } } - private readonly KeyToBinaryVectorTransform _parent; + private readonly KeyToBinaryVectorMappingTransformer _parent; private readonly ColInfo[] _infos; private readonly VectorType[] _types; private readonly int[] _bitsPerKey; - public Mapper(KeyToBinaryVectorTransform parent, Schema inputSchema) + public Mapper(KeyToBinaryVectorMappingTransformer parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -219,7 +219,7 @@ private ColInfo[] CreateInfos(ISchema inputSchema) return infos; } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -322,9 +322,7 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) int slotLim = _types[iinfo].VectorSize; Host.Assert(slotLim == (long)typeSrc.VectorSize * _bitsPerKey[iinfo]); - var values = dst.Values; - if (Utils.Size(values) < slotLim) - values = new ReadOnlyMemory[slotLim]; + var editor = VBufferEditor.Create(ref dst, slotLim); var sb = new StringBuilder(); int slot = 0; @@ -341,19 +339,19 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) sb.Append('.'); int len = sb.Length; - foreach (var key in bits.Values) + foreach (var key in bits.GetValues()) { sb.Length = len; sb.AppendMemory(key); - values[slot++] = sb.ToString().AsMemory(); + editor.Values[slot++] = sb.ToString().AsMemory(); } } Host.Assert(slot == slotLim); - dst = new VBuffer>(slotLim, values, dst.Indices); + dst = editor.Commit(); } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _infos.Length); @@ -445,20 +443,20 @@ private void EncodeValueToBinary(BufferBuilder bldr, uint value, int bits } } - public sealed class KeyToBinaryVectorMappingEstimator : TrivialEstimator + public sealed class KeyToBinaryVectorMappingEstimator : TrivialEstimator { - public KeyToBinaryVectorMappingEstimator(IHostEnvironment env, params KeyToBinaryVectorTransform.ColumnInfo[] columns) - : this(env, new KeyToBinaryVectorTransform(env, columns)) + public KeyToBinaryVectorMappingEstimator(IHostEnvironment env, params KeyToBinaryVectorMappingTransformer.ColumnInfo[] columns) + : this(env, new KeyToBinaryVectorMappingTransformer(env, columns)) { } public KeyToBinaryVectorMappingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null) - : this(env, new KeyToBinaryVectorTransform(env, new KeyToBinaryVectorTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn))) + : this(env, new KeyToBinaryVectorMappingTransformer(env, new KeyToBinaryVectorMappingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn))) { } - private KeyToBinaryVectorMappingEstimator(IHostEnvironment env, KeyToBinaryVectorTransform transformer) + private KeyToBinaryVectorMappingEstimator(IHostEnvironment env, KeyToBinaryVectorMappingTransformer transformer) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToBinaryVectorMappingEstimator)), transformer) { } @@ -562,11 +560,11 @@ public override IEstimator Reconcile(IHostEnvironment env, IReadOnlyDictionary outputNames, IReadOnlyCollection usedNames) { - var infos = new KeyToBinaryVectorTransform.ColumnInfo[toOutput.Length]; + var infos = new KeyToBinaryVectorMappingTransformer.ColumnInfo[toOutput.Length]; for (int i = 0; i < toOutput.Length; ++i) { var col = (IColInput)toOutput[i]; - infos[i] = new KeyToBinaryVectorTransform.ColumnInfo(inputNames[col.Input], outputNames[toOutput[i]]); + infos[i] = new KeyToBinaryVectorMappingTransformer.ColumnInfo(inputNames[col.Input], outputNames[toOutput[i]]); } return new KeyToBinaryVectorMappingEstimator(env, infos); } diff --git a/src/Microsoft.ML.Transforms/LearnerFeatureSelection.cs b/src/Microsoft.ML.Transforms/LearnerFeatureSelection.cs index a67816f348..e9a057feb6 100644 --- a/src/Microsoft.ML.Transforms/LearnerFeatureSelection.cs +++ b/src/Microsoft.ML.Transforms/LearnerFeatureSelection.cs @@ -21,10 +21,11 @@ namespace Microsoft.ML.Transforms /// is greater than a threshold. /// Instantiates a DropSlots transform to actually drop the slots. /// - public static class LearnerFeatureSelectionTransform + internal static class LearnerFeatureSelectionTransform { internal const string Summary = "Selects the slots for which the absolute value of the corresponding weight in a linear learner is greater than a threshold."; +#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. public sealed class Arguments { [Argument(ArgumentType.LastOccurenceWins, HelpText = "If the corresponding absolute value of the weight for a slot is greater than this threshold, the slot is preserved", ShortName = "ft", SortOrder = 2)] @@ -33,6 +34,8 @@ public sealed class Arguments [Argument(ArgumentType.AtMostOnce, HelpText = "The number of slots to preserve", ShortName = "topk", SortOrder = 1)] public int? NumSlotsToKeep; + // If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer, but the utility + // of this would be limited because estimators and transformers now act more or less like this transform used to. [Argument(ArgumentType.Multiple, HelpText = "Filter", ShortName = "f", SortOrder = 1, SignatureType = typeof(SignatureFeatureScorerTrainer))] public IComponentFactory>> Filter = ComponentFactoryUtils.CreateFromFunction(env => @@ -74,6 +77,7 @@ internal void Check(IExceptionContext ectx) ectx.CheckUserArg((NumSlotsToKeep ?? int.MaxValue) > 0, nameof(NumSlotsToKeep), "Must be positive"); } } +#pragma warning restore CS0649 internal static string RegistrationName = "LearnerFeatureSelectionTransform"; @@ -120,9 +124,10 @@ private static DropSlotsTransform.Column CreateDropSlotsColumn(Arguments args, i var col = new DropSlotsTransform.Column(); col.Source = args.FeatureColumn; selectedCount = 0; + var scoresValues = scores.GetValues(); // Degenerate case, dropping all slots. - if (scores.Count == 0) + if (scoresValues.Length == 0) { var range = new DropSlotsTransform.Range(); col.Slots = new DropSlotsTransform.Range[] { range }; @@ -139,13 +144,13 @@ private static DropSlotsTransform.Column CreateDropSlotsColumn(Arguments args, i else { Contracts.Assert(args.NumSlotsToKeep.HasValue); - threshold = ComputeThreshold(scores.Values, scores.Count, args.NumSlotsToKeep.Value, out tiedScoresToKeep); + threshold = ComputeThreshold(scoresValues, args.NumSlotsToKeep.Value, out tiedScoresToKeep); } var slots = new List(); - for (int i = 0; i < scores.Count; i++) + for (int i = 0; i < scoresValues.Length; i++) { - var score = Math.Abs(scores.Values[i]); + var score = Math.Abs(scoresValues[i]); if (score > threshold) { selectedCount++; @@ -160,9 +165,9 @@ private static DropSlotsTransform.Column CreateDropSlotsColumn(Arguments args, i var range = new DropSlotsTransform.Range(); range.Min = i; - while (++i < scores.Count) + while (++i < scoresValues.Length) { - score = Math.Abs(scores.Values[i]); + score = Math.Abs(scoresValues[i]); if (score > threshold) { selectedCount++; @@ -181,6 +186,7 @@ private static DropSlotsTransform.Column CreateDropSlotsColumn(Arguments args, i if (!scores.IsDense) { + var scoresIndices = scores.GetIndices(); int ii = 0; var count = slots.Count; for (int i = 0; i < count; i++) @@ -190,16 +196,16 @@ private static DropSlotsTransform.Column CreateDropSlotsColumn(Arguments args, i var min = range.Min; var max = range.Max.Value; Contracts.Assert(min <= max); - Contracts.Assert(max < scores.Count); + Contracts.Assert(max < scoresValues.Length); - range.Min = min == 0 ? 0 : scores.Indices[min - 1] + 1; - range.Max = max == scores.Count - 1 ? scores.Length - 1 : scores.Indices[max + 1] - 1; + range.Min = min == 0 ? 0 : scoresIndices[min - 1] + 1; + range.Max = max == scoresIndices.Length - 1 ? scores.Length - 1 : scoresIndices[max + 1] - 1; // Add the gaps before this range. for (; ii < min; ii++) { - var gapMin = ii == 0 ? 0 : scores.Indices[ii - 1] + 1; - var gapMax = scores.Indices[ii] - 1; + var gapMin = ii == 0 ? 0 : scoresIndices[ii - 1] + 1; + var gapMax = scoresIndices[ii] - 1; if (gapMin <= gapMax) { var gap = new DropSlotsTransform.Range(); @@ -212,10 +218,10 @@ private static DropSlotsTransform.Column CreateDropSlotsColumn(Arguments args, i } // Add the gaps after the last range. - for (; ii <= scores.Count; ii++) + for (; ii <= scoresIndices.Length; ii++) { - var gapMin = ii == 0 ? 0 : scores.Indices[ii - 1] + 1; - var gapMax = ii == scores.Count ? scores.Length - 1 : scores.Indices[ii] - 1; + var gapMin = ii == 0 ? 0 : scoresIndices[ii - 1] + 1; + var gapMax = ii == scoresIndices.Length ? scores.Length - 1 : scoresIndices[ii] - 1; if (gapMin <= gapMax) { var gap = new DropSlotsTransform.Range(); @@ -240,12 +246,12 @@ private static DropSlotsTransform.Column CreateDropSlotsColumn(Arguments args, i return null; } - private static float ComputeThreshold(float[] scores, int count, int topk, out int tiedScoresToKeep) + private static float ComputeThreshold(ReadOnlySpan scores, int topk, out int tiedScoresToKeep) { // Use a min-heap for the topk elements var heap = new Heap((f1, f2) => f1 > f2, topk); - for (int i = 0; i < count; i++) + for (int i = 0; i < scores.Length; i++) { var score = Math.Abs(scores[i]); if (float.IsNaN(score)) diff --git a/src/Microsoft.ML.Transforms/Microsoft.ML.Transforms.csproj b/src/Microsoft.ML.Transforms/Microsoft.ML.Transforms.csproj index 11d96a6cfc..7ab146b21c 100644 --- a/src/Microsoft.ML.Transforms/Microsoft.ML.Transforms.csproj +++ b/src/Microsoft.ML.Transforms/Microsoft.ML.Transforms.csproj @@ -4,6 +4,7 @@ netstandard2.0 Microsoft.ML CORECLR + true diff --git a/src/Microsoft.ML.Transforms/MissingValueDroppingTransformer.cs b/src/Microsoft.ML.Transforms/MissingValueDroppingTransformer.cs new file mode 100644 index 0000000000..61735dcf6c --- /dev/null +++ b/src/Microsoft.ML.Transforms/MissingValueDroppingTransformer.cs @@ -0,0 +1,390 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Core.Data; +using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.CommandLine; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.EntryPoints; +using Microsoft.ML.Runtime.Internal.Utilities; +using Microsoft.ML.Runtime.Model; +using Microsoft.ML.Transforms; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; + +[assembly: LoadableClass(MissingValueDroppingTransformer.Summary, typeof(IDataTransform), typeof(MissingValueDroppingTransformer), typeof(MissingValueDroppingTransformer.Arguments), typeof(SignatureDataTransform), + MissingValueDroppingTransformer.FriendlyName, MissingValueDroppingTransformer.ShortName, "NADropTransform")] + +[assembly: LoadableClass(MissingValueDroppingTransformer.Summary, typeof(IDataTransform), typeof(MissingValueDroppingTransformer), null, typeof(SignatureLoadDataTransform), + MissingValueDroppingTransformer.FriendlyName, MissingValueDroppingTransformer.LoaderSignature)] + +[assembly: LoadableClass(MissingValueDroppingTransformer.Summary, typeof(MissingValueDroppingTransformer), null, typeof(SignatureLoadModel), + MissingValueDroppingTransformer.FriendlyName, MissingValueDroppingTransformer.LoaderSignature)] + +[assembly: LoadableClass(typeof(IRowMapper), typeof(MissingValueDroppingTransformer), null, typeof(SignatureLoadRowMapper), + MissingValueDroppingTransformer.FriendlyName, MissingValueDroppingTransformer.LoaderSignature)] + +namespace Microsoft.ML.Transforms +{ + /// + public sealed class MissingValueDroppingTransformer : OneToOneTransformerBase + { + public sealed class Arguments : TransformInputBase + { + [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "Columns to drop the NAs for", ShortName = "col", SortOrder = 1)] + public Column[] Column; + } + + public sealed class Column : OneToOneColumn + { + public static Column Parse(string str) + { + var res = new Column(); + if (res.TryParse(str)) + return res; + return null; + } + + public bool TryUnparse(StringBuilder sb) + { + Contracts.AssertValue(sb); + return TryUnparseCore(sb); + } + } + + internal const string Summary = "Removes NAs from vector columns."; + internal const string FriendlyName = "NA Drop Transform"; + internal const string ShortName = "NADrop"; + internal const string LoaderSignature = "NADropTransform"; + + private static VersionInfo GetVersionInfo() + { + return new VersionInfo( + modelSignature: "NADROPXF", + verWrittenCur: 0x00010001, // Initial + verReadableCur: 0x00010001, + verWeCanReadBack: 0x00010001, + loaderSignature: LoaderSignature, + loaderAssemblyName: typeof(MissingValueDroppingTransformer).Assembly.FullName); + } + + private const string RegistrationName = "DropNAs"; + + public IReadOnlyList<(string input, string output)> Columns => ColumnPairs.AsReadOnly(); + + /// + /// Initializes a new instance of + /// + /// The environment to use. + /// The names of the input columns of the transformation and the corresponding names for the output columns. + public MissingValueDroppingTransformer(IHostEnvironment env, params (string input, string output)[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueDroppingTransformer)), columns) + { + } + + internal MissingValueDroppingTransformer(IHostEnvironment env, Arguments args) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueDroppingTransformer)), GetColumnPairs(args.Column)) + { + } + + private MissingValueDroppingTransformer(IHostEnvironment env, ModelLoadContext ctx) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueDroppingTransformer)), ctx) + { + Host.CheckValue(ctx, nameof(ctx)); + } + + private static (string input, string output)[] GetColumnPairs(Column[] columns) + => columns.Select(c => (c.Source ?? c.Name, c.Name)).ToArray(); + + protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCol) + { + var inType = inputSchema.GetColumnType(srcCol); + if (!inType.IsVector) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", inputSchema.GetColumnName(srcCol), "Vector", inType.ToString()); + } + + // Factory method for SignatureLoadModel + private static MissingValueDroppingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + { + Contracts.CheckValue(env, nameof(env)); + ctx.CheckAtModel(GetVersionInfo()); + + return new MissingValueDroppingTransformer(env, ctx); + } + + // Factory method for SignatureDataTransform. + internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) + => new MissingValueDroppingTransformer(env, args).MakeDataTransform(input); + + // Factory method for SignatureLoadDataTransform. + private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + => Create(env, ctx).MakeDataTransform(input); + + // Factory method for SignatureLoadRowMapper. + private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) + => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); + + /// + /// Saves the transform. + /// + public override void Save(ModelSaveContext ctx) + { + Host.CheckValue(ctx, nameof(ctx)); + ctx.CheckAtModel(); + ctx.SetVersionInfo(GetVersionInfo()); + SaveColumns(ctx); + } + + protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); + + private sealed class Mapper : OneToOneMapperBase + { + private readonly MissingValueDroppingTransformer _parent; + + private readonly ColumnType[] _srcTypes; + private readonly int[] _srcCols; + private readonly ColumnType[] _types; + private readonly Delegate[] _isNAs; + + public Mapper(MissingValueDroppingTransformer parent, Schema inputSchema) : + base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) + { + _parent = parent; + _types = new ColumnType[_parent.ColumnPairs.Length]; + _srcTypes = new ColumnType[_parent.ColumnPairs.Length]; + _srcCols = new int[_parent.ColumnPairs.Length]; + _isNAs = new Delegate[_parent.ColumnPairs.Length]; + for (int i = 0; i < _parent.ColumnPairs.Length; i++) + { + inputSchema.TryGetColumnIndex(_parent.ColumnPairs[i].input, out _srcCols[i]); + var srcCol = inputSchema[_srcCols[i]]; + _srcTypes[i] = srcCol.Type; + _types[i] = new VectorType(srcCol.Type.ItemType.AsPrimitive); + _isNAs[i] = GetIsNADelegate(srcCol.Type); + } + } + + /// + /// Returns the isNA predicate for the respective type. + /// + private Delegate GetIsNADelegate(ColumnType type) + { + Func func = GetIsNADelegate; + return Utils.MarshalInvoke(func, type.ItemType.RawType, type); + } + + private Delegate GetIsNADelegate(ColumnType type) => Runtime.Data.Conversion.Conversions.Instance.GetIsNAPredicate(type.ItemType); + + protected override Schema.Column[] GetOutputColumnsCore() + { + var result = new Schema.Column[_parent.ColumnPairs.Length]; + for (int i = 0; i < _parent.ColumnPairs.Length; i++) + { + var builder = new Schema.Metadata.Builder(); + builder.Add(InputSchema[ColMapNewToOld[i]].Metadata, x => x == MetadataUtils.Kinds.KeyValues || x == MetadataUtils.Kinds.IsNormalized); + result[i] = new Schema.Column(_parent.ColumnPairs[i].output, _types[i], builder.GetMetadata()); + } + return result; + } + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + { + Contracts.AssertValue(input); + Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); + disposer = null; + + Func>> del = MakeVecGetter; + var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(_srcTypes[iinfo].ItemType.RawType); + return (Delegate)methodInfo.Invoke(this, new object[] { input, iinfo }); + } + + private ValueGetter> MakeVecGetter(IRow input, int iinfo) + { + var srcGetter = input.GetGetter>(iinfo); + var buffer = default(VBuffer); + var isNA = (InPredicate)_isNAs[iinfo]; + var def = default(TDst); + if (isNA(in def)) + { + // Case I: NA equals the default value. + return + (ref VBuffer value) => + { + srcGetter(ref buffer); + DropNAsAndDefaults(ref buffer, ref value, isNA); + }; + } + + // Case II: NA is different form default value. + Host.Assert(!isNA(in def)); + return + (ref VBuffer value) => + { + srcGetter(ref buffer); + DropNAs(ref buffer, ref value, isNA); + }; + } + + private void DropNAsAndDefaults(ref VBuffer src, ref VBuffer dst, InPredicate isNA) + { + Host.AssertValue(isNA); + + var srcValues = src.GetValues(); + int newCount = 0; + for (int i = 0; i < srcValues.Length; i++) + { + if (!isNA(in srcValues[i])) + newCount++; + } + Host.Assert(newCount <= srcValues.Length); + + if (newCount == 0) + { + VBufferUtils.Resize(ref dst, 0); + return; + } + + if (newCount == srcValues.Length) + { + Utils.Swap(ref src, ref dst); + if (!dst.IsDense) + { + Host.Assert(dst.GetValues().Length == newCount); + VBufferUtils.Resize(ref dst, newCount); + } + return; + } + + int iDst = 0; + + // Densifying sparse vectors since default value equals NA and hence should be dropped. + var editor = VBufferEditor.Create(ref dst, newCount); + for (int i = 0; i < srcValues.Length; i++) + { + if (!isNA(in srcValues[i])) + editor.Values[iDst++] = srcValues[i]; + } + Host.Assert(iDst == newCount); + + dst = editor.Commit(); + } + + private void DropNAs(ref VBuffer src, ref VBuffer dst, InPredicate isNA) + { + Host.AssertValue(isNA); + + var srcValues = src.GetValues(); + int newCount = 0; + for (int i = 0; i < srcValues.Length; i++) + { + if (!isNA(in srcValues[i])) + newCount++; + } + Host.Assert(newCount <= srcValues.Length); + + if (newCount == 0) + { + VBufferUtils.Resize(ref dst, src.Length - srcValues.Length, 0); + return; + } + + if (newCount == srcValues.Length) + { + Utils.Swap(ref src, ref dst); + return; + } + + int iDst = 0; + if (src.IsDense) + { + var editor = VBufferEditor.Create(ref dst, newCount); + for (int i = 0; i < srcValues.Length; i++) + { + if (!isNA(in srcValues[i])) + { + editor.Values[iDst] = srcValues[i]; + iDst++; + } + } + Host.Assert(iDst == newCount); + dst = editor.Commit(); + } + else + { + var newLength = src.Length - srcValues.Length - newCount; + var editor = VBufferEditor.Create(ref dst, newLength, newCount); + + var srcIndices = src.GetIndices(); + int offset = 0; + for (int i = 0; i < srcValues.Length; i++) + { + if (!isNA(in srcValues[i])) + { + editor.Values[iDst] = srcValues[i]; + editor.Indices[iDst] = srcIndices[i] - offset; + iDst++; + } + else + offset++; + } + Host.Assert(iDst == newCount); + Host.Assert(offset == srcValues.Length - newCount); + dst = editor.Commit(); + } + } + } + } + /// + /// Drops missing values from columns. + /// + public sealed class MissingValueDroppingEstimator : TrivialEstimator + { + /// + /// Drops missing values from columns. + /// + /// The environment to use. + /// The names of the input columns of the transformation and the corresponding names for the output columns. + public MissingValueDroppingEstimator(IHostEnvironment env, params (string input, string output)[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueDroppingEstimator)), new MissingValueDroppingTransformer(env, columns)) + { + Contracts.CheckValue(env, nameof(env)); + } + + /// + /// Drops missing values from columns. + /// + /// The environment to use. + /// The name of the input column of the transformation. + /// The name of the column produced by the transformation. + public MissingValueDroppingEstimator(IHostEnvironment env, string input, string output = null) + : this(env, (input, output ?? input)) + { + } + + /// + /// Returns the schema that would be produced by the transformation. + /// + public override SchemaShape GetOutputSchema(SchemaShape inputSchema) + { + Host.CheckValue(inputSchema, nameof(inputSchema)); + var result = inputSchema.Columns.ToDictionary(x => x.Name); + foreach (var colPair in Transformer.Columns) + { + if (!inputSchema.TryFindColumn(colPair.input, out var col) || !Runtime.Data.Conversion.Conversions.Instance.TryGetIsNAPredicate(col.ItemType, out Delegate del)) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", colPair.input); + if (!(col.Kind == SchemaShape.Column.VectorKind.Vector || col.Kind == SchemaShape.Column.VectorKind.VariableVector)) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", colPair.input, "Vector", col.GetTypeString()); + var metadata = new List(); + if (col.Metadata.TryFindColumn(MetadataUtils.Kinds.KeyValues, out var keyMeta)) + metadata.Add(keyMeta); + if (col.Metadata.TryFindColumn(MetadataUtils.Kinds.IsNormalized, out var normMeta)) + metadata.Add(normMeta); + result[colPair.output] = new SchemaShape.Column(colPair.output, SchemaShape.Column.VectorKind.VariableVector, col.ItemType, false, new SchemaShape(metadata.ToArray())); + } + return new SchemaShape(result.Values); + } + } +} \ No newline at end of file diff --git a/src/Microsoft.ML.Transforms/NAHandleTransform.cs b/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs similarity index 79% rename from src/Microsoft.ML.Transforms/NAHandleTransform.cs rename to src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs index 9c70dab3e8..4e817a9098 100644 --- a/src/Microsoft.ML.Transforms/NAHandleTransform.cs +++ b/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs @@ -13,13 +13,13 @@ using System.Collections.Generic; using System.Text; -[assembly: LoadableClass(NAHandleTransform.Summary, typeof(IDataTransform), typeof(NAHandleTransform), typeof(NAHandleTransform.Arguments), typeof(SignatureDataTransform), - NAHandleTransform.FriendlyName, "NAHandleTransform", NAHandleTransform.ShortName, "NA", DocName = "transform/NAHandle.md")] +[assembly: LoadableClass(MissingValueHandlingTransformer.Summary, typeof(IDataTransform), typeof(MissingValueHandlingTransformer), typeof(MissingValueHandlingTransformer.Arguments), typeof(SignatureDataTransform), + MissingValueHandlingTransformer.FriendlyName, "NAHandleTransform", MissingValueHandlingTransformer.ShortName, "NA", DocName = "transform/NAHandle.md")] namespace Microsoft.ML.Transforms { /// - public static class NAHandleTransform + public static class MissingValueHandlingTransformer { public enum ReplacementKind : byte { @@ -108,7 +108,7 @@ public bool TryUnparse(StringBuilder sb) internal const string ShortName = "NAHandle"; /// - /// A helper method to create for public facing API. + /// A helper method to create for public facing API. /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -136,10 +136,10 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV h.CheckValue(input, nameof(input)); h.CheckUserArg(Utils.Size(args.Column) > 0, nameof(args.Column)); - var replaceCols = new List(); - var naIndicatorCols = new List(); - var naConvCols = new List(); - var concatCols = new List(); + var replaceCols = new List(); + var naIndicatorCols = new List(); + var naConvCols = new List(); + var concatCols = new List(); var dropCols = new List(); var tmpIsMissingColNames = input.Schema.GetTempColumnNames(args.Column.Length, "IsMissing"); var tmpReplaceColNames = input.Schema.GetTempColumnNames(args.Column.Length, "Replace"); @@ -150,7 +150,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV var addInd = column.ConcatIndicator ?? args.Concat; if (!addInd) { - replaceCols.Add(new NAReplaceTransform.ColumnInfo(column.Source, column.Name, (NAReplaceTransform.ColumnInfo.ReplacementMode)(column.Kind ?? args.ReplaceWith), column.ImputeBySlot ?? args.ImputeBySlot)); + replaceCols.Add(new MissingValueReplacingTransformer.ColumnInfo(column.Source, column.Name, (MissingValueReplacingTransformer.ColumnInfo.ReplacementMode)(column.Kind ?? args.ReplaceWith), column.ImputeBySlot ?? args.ImputeBySlot)); continue; } @@ -170,19 +170,19 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV var tmpReplacementColName = tmpReplaceColNames[i]; // Add an NAHandleTransform column. - naIndicatorCols.Add(new NAIndicatorTransform.Column() { Name = tmpIsMissingColName, Source = column.Source }); + naIndicatorCols.Add(new MissingValueIndicatorTransformer.Column() { Name = tmpIsMissingColName, Source = column.Source }); // Add a ConvertTransform column if necessary. if (!identity) - naConvCols.Add(new ConvertingTransform.ColumnInfo(tmpIsMissingColName, tmpIsMissingColName, replaceType.ItemType.RawKind)); + naConvCols.Add(new TypeConvertingTransformer.ColumnInfo(tmpIsMissingColName, tmpIsMissingColName, replaceType.ItemType.RawKind)); // Add the NAReplaceTransform column. - replaceCols.Add(new NAReplaceTransform.ColumnInfo(column.Source, tmpReplacementColName, (NAReplaceTransform.ColumnInfo.ReplacementMode)(column.Kind ?? args.ReplaceWith), column.ImputeBySlot ?? args.ImputeBySlot)); + replaceCols.Add(new MissingValueReplacingTransformer.ColumnInfo(column.Source, tmpReplacementColName, (MissingValueReplacingTransformer.ColumnInfo.ReplacementMode)(column.Kind ?? args.ReplaceWith), column.ImputeBySlot ?? args.ImputeBySlot)); // Add the ConcatTransform column. if (replaceType.IsVector) { - concatCols.Add(new ConcatTransform.TaggedColumn() + concatCols.Add(new ColumnConcatenatingTransformer.TaggedColumn() { Name = column.Name, Source = new[] { @@ -193,7 +193,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV } else { - concatCols.Add(new ConcatTransform.TaggedColumn() + concatCols.Add(new ColumnConcatenatingTransformer.TaggedColumn() { Name = column.Name, Source = new[] @@ -213,25 +213,25 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV // Create the indicator columns. if (naIndicatorCols.Count > 0) - output = NAIndicatorTransform.Create(h, new NAIndicatorTransform.Arguments() { Column = naIndicatorCols.ToArray() }, input); + output = MissingValueIndicatorTransformer.Create(h, new MissingValueIndicatorTransformer.Arguments() { Column = naIndicatorCols.ToArray() }, input); // Convert the indicator columns to the correct type so that they can be concatenated to the NAReplace outputs. if (naConvCols.Count > 0) { h.AssertValue(output); //REVIEW: all this need to be converted to estimatorChain as soon as we done with dropcolumns. - output = new ConvertingTransform(h, naConvCols.ToArray()).Transform(output) as IDataTransform; + output = new TypeConvertingTransformer(h, naConvCols.ToArray()).Transform(output) as IDataTransform; } // Create the NAReplace transform. - output = NAReplaceTransform.Create(env, output ?? input, replaceCols.ToArray()); + output = MissingValueReplacingTransformer.Create(env, output ?? input, replaceCols.ToArray()); // Concat the NAReplaceTransform output and the NAIndicatorTransform output. if (naIndicatorCols.Count > 0) - output = ConcatTransform.Create(h, new ConcatTransform.TaggedArguments() { Column = concatCols.ToArray() }, output); + output = ColumnConcatenatingTransformer.Create(h, new ColumnConcatenatingTransformer.TaggedArguments() { Column = concatCols.ToArray() }, output); // Finally, drop the temporary indicator columns. if (dropCols.Count > 0) - output = SelectColumnsTransform.CreateDrop(h, output, dropCols.ToArray()); + output = ColumnSelectingTransformer.CreateDrop(h, output, dropCols.ToArray()); return output; } diff --git a/src/Microsoft.ML.Transforms/MissingValueIndicatorTransform.cs b/src/Microsoft.ML.Transforms/MissingValueIndicatorTransform.cs index 5e42acfedb..72a52e5cdc 100644 --- a/src/Microsoft.ML.Transforms/MissingValueIndicatorTransform.cs +++ b/src/Microsoft.ML.Transforms/MissingValueIndicatorTransform.cs @@ -183,17 +183,15 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) if (size == 0) throw MetadataUtils.ExceptGetMetadata(); - var values = dst.Values; - if (Utils.Size(values) < size) - values = new ReadOnlyMemory[size]; + var editor = VBufferEditor.Create(ref dst, size); var type = Infos[iinfo].TypeSrc; if (!type.IsVector) { Host.Assert(_types[iinfo].VectorSize == 2); var columnName = Source.Schema.GetColumnName(Infos[iinfo].Source); - values[0] = columnName.AsMemory(); - values[1] = (columnName + IndicatorSuffix).AsMemory(); + editor.Values[0] = columnName.AsMemory(); + editor.Values[1] = (columnName + IndicatorSuffix).AsMemory(); } else { @@ -230,13 +228,13 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) sb.Append(IndicatorSuffix); var str = sb.ToString(); - values[slot++] = str.AsMemory().Slice(0, len); - values[slot++] = str.AsMemory(); + editor.Values[slot++] = str.AsMemory().Slice(0, len); + editor.Values[slot++] = str.AsMemory(); } Host.Assert(slot == size); } - dst = new VBuffer>(size, values, dst.Indices); + dst = editor.Commit(); } protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, out Action disposer) @@ -274,32 +272,25 @@ protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, ou private static void FillValues(Float input, ref VBuffer result) { - var values = result.Values; - var indices = result.Indices; - if (input == 0) { - result = new VBuffer(2, 0, values, indices); + VBufferUtils.Resize(ref result, 2, 0); return; } - if (Utils.Size(values) < 1) - values = new Float[1]; - if (Utils.Size(indices) < 1) - indices = new int[1]; - + var editor = VBufferEditor.Create(ref result, 2, 1); if (Float.IsNaN(input)) { - values[0] = 1; - indices[0] = 1; + editor.Values[0] = 1; + editor.Indices[0] = 1; } else { - values[0] = input; - indices[0] = 0; + editor.Values[0] = input; + editor.Indices[0] = 0; } - result = new VBuffer(2, 1, values, indices); + result = editor.Commit(); } // This converts in place. @@ -308,18 +299,14 @@ private static void FillValues(IExceptionContext ectx, ref VBuffer buffer int size = buffer.Length; ectx.Check(0 <= size & size < int.MaxValue / 2); - int count = buffer.Count; - var values = buffer.Values; - var indices = buffer.Indices; + var values = buffer.GetValues(); + var editor = VBufferEditor.Create(ref buffer, size * 2, values.Length); int iivDst = 0; - if (count >= size) + if (buffer.IsDense) { // Currently, it's dense. We always produce sparse. - ectx.Assert(Utils.Size(values) >= size); - if (Utils.Size(indices) < size) - indices = new int[size]; - for (int ivSrc = 0; ivSrc < count; ivSrc++) + for (int ivSrc = 0; ivSrc < values.Length; ivSrc++) { ectx.Assert(iivDst <= ivSrc); var val = values[ivSrc]; @@ -327,13 +314,13 @@ private static void FillValues(IExceptionContext ectx, ref VBuffer buffer continue; if (Float.IsNaN(val)) { - values[iivDst] = 1; - indices[iivDst] = 2 * ivSrc + 1; + editor.Values[iivDst] = 1; + editor.Indices[iivDst] = 2 * ivSrc + 1; } else { - values[iivDst] = val; - indices[iivDst] = 2 * ivSrc; + editor.Values[iivDst] = val; + editor.Indices[iivDst] = 2 * ivSrc; } iivDst++; } @@ -341,11 +328,10 @@ private static void FillValues(IExceptionContext ectx, ref VBuffer buffer else { // Currently, it's sparse. - ectx.Assert(Utils.Size(values) >= count); - ectx.Assert(Utils.Size(indices) >= count); + var indices = buffer.GetIndices(); int ivPrev = -1; - for (int iivSrc = 0; iivSrc < count; iivSrc++) + for (int iivSrc = 0; iivSrc < values.Length; iivSrc++) { ectx.Assert(iivDst <= iivSrc); var val = values[iivSrc]; @@ -356,20 +342,20 @@ private static void FillValues(IExceptionContext ectx, ref VBuffer buffer ivPrev = iv; if (Float.IsNaN(val)) { - values[iivDst] = 1; - indices[iivDst] = 2 * iv + 1; + editor.Values[iivDst] = 1; + editor.Indices[iivDst] = 2 * iv + 1; } else { - values[iivDst] = val; - indices[iivDst] = 2 * iv; + editor.Values[iivDst] = val; + editor.Indices[iivDst] = 2 * iv; } iivDst++; } } - ectx.Assert(0 <= iivDst & iivDst <= count); - buffer = new VBuffer(size * 2, iivDst, values, indices); + ectx.Assert(0 <= iivDst & iivDst <= values.Length); + buffer = editor.CommitTruncated(iivDst); } } } diff --git a/src/Microsoft.ML.Transforms/NAIndicatorTransform.cs b/src/Microsoft.ML.Transforms/MissingValueIndicatorTransformer.cs similarity index 85% rename from src/Microsoft.ML.Transforms/NAIndicatorTransform.cs rename to src/Microsoft.ML.Transforms/MissingValueIndicatorTransformer.cs index 1c16479613..cdf08a3244 100644 --- a/src/Microsoft.ML.Transforms/NAIndicatorTransform.cs +++ b/src/Microsoft.ML.Transforms/MissingValueIndicatorTransformer.cs @@ -18,22 +18,22 @@ using Microsoft.ML.StaticPipe.Runtime; using Microsoft.ML.Transforms; -[assembly: LoadableClass(NAIndicatorTransform.Summary, typeof(IDataTransform), typeof(NAIndicatorTransform), typeof(NAIndicatorTransform.Arguments), typeof(SignatureDataTransform), - NAIndicatorTransform.FriendlyName, NAIndicatorTransform.LoadName, "NAIndicator", NAIndicatorTransform.ShortName, DocName = "transform/NAHandle.md")] +[assembly: LoadableClass(MissingValueIndicatorTransformer.Summary, typeof(IDataTransform), typeof(MissingValueIndicatorTransformer), typeof(MissingValueIndicatorTransformer.Arguments), typeof(SignatureDataTransform), + MissingValueIndicatorTransformer.FriendlyName, MissingValueIndicatorTransformer.LoadName, "NAIndicator", MissingValueIndicatorTransformer.ShortName, DocName = "transform/NAHandle.md")] -[assembly: LoadableClass(NAIndicatorTransform.Summary, typeof(IDataTransform), typeof(NAIndicatorTransform), null, typeof(SignatureLoadDataTransform), - NAIndicatorTransform.FriendlyName, NAIndicatorTransform.LoadName)] +[assembly: LoadableClass(MissingValueIndicatorTransformer.Summary, typeof(IDataTransform), typeof(MissingValueIndicatorTransformer), null, typeof(SignatureLoadDataTransform), + MissingValueIndicatorTransformer.FriendlyName, MissingValueIndicatorTransformer.LoadName)] -[assembly: LoadableClass(NAIndicatorTransform.Summary, typeof(NAIndicatorTransform), null, typeof(SignatureLoadModel), - NAIndicatorTransform.FriendlyName, NAIndicatorTransform.LoadName)] +[assembly: LoadableClass(MissingValueIndicatorTransformer.Summary, typeof(MissingValueIndicatorTransformer), null, typeof(SignatureLoadModel), + MissingValueIndicatorTransformer.FriendlyName, MissingValueIndicatorTransformer.LoadName)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(NAIndicatorTransform), null, typeof(SignatureLoadRowMapper), - NAIndicatorTransform.FriendlyName, NAIndicatorTransform.LoadName)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(MissingValueIndicatorTransformer), null, typeof(SignatureLoadRowMapper), + MissingValueIndicatorTransformer.FriendlyName, MissingValueIndicatorTransformer.LoadName)] namespace Microsoft.ML.Transforms { /// - public sealed class NAIndicatorTransform : OneToOneTransformerBase + public sealed class MissingValueIndicatorTransformer : OneToOneTransformerBase { public sealed class Column : OneToOneColumn { @@ -70,7 +70,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoadName, - loaderAssemblyName: typeof(NAIndicatorTransform).Assembly.FullName); + loaderAssemblyName: typeof(MissingValueIndicatorTransformer).Assembly.FullName); } internal const string Summary = "Create a boolean output column with the same number of slots as the input column, where the output value" @@ -78,27 +78,27 @@ private static VersionInfo GetVersionInfo() internal const string FriendlyName = "NA Indicator Transform"; internal const string ShortName = "NAInd"; - private const string RegistrationName = nameof(NAIndicatorTransform); + private const string RegistrationName = nameof(MissingValueIndicatorTransformer); public IReadOnlyList<(string input, string output)> Columns => ColumnPairs.AsReadOnly(); /// - /// Initializes a new instance of + /// Initializes a new instance of /// /// The environment to use. /// The names of the input columns of the transformation and the corresponding names for the output columns. - public NAIndicatorTransform(IHostEnvironment env, params (string input, string output)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(NAIndicatorTransform)), columns) + public MissingValueIndicatorTransformer(IHostEnvironment env, params (string input, string output)[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueIndicatorTransformer)), columns) { } - internal NAIndicatorTransform(IHostEnvironment env, Arguments args) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(NAIndicatorTransform)), GetColumnPairs(args.Column)) + internal MissingValueIndicatorTransformer(IHostEnvironment env, Arguments args) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueIndicatorTransformer)), GetColumnPairs(args.Column)) { } - private NAIndicatorTransform(IHostEnvironment env, ModelLoadContext ctx) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(NAIndicatorTransform)), ctx) + private MissingValueIndicatorTransformer(IHostEnvironment env, ModelLoadContext ctx) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueIndicatorTransformer)), ctx) { Host.CheckValue(ctx, nameof(ctx)); } @@ -107,17 +107,17 @@ private static (string input, string output)[] GetColumnPairs(Column[] columns) => columns.Select(c => (c.Source ?? c.Name, c.Name)).ToArray(); // Factory method for SignatureLoadModel - internal static NAIndicatorTransform Create(IHostEnvironment env, ModelLoadContext ctx) + internal static MissingValueIndicatorTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); ctx.CheckAtModel(GetVersionInfo()); - return new NAIndicatorTransform(env, ctx); + return new MissingValueIndicatorTransformer(env, ctx); } // Factory method for SignatureDataTransform. internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) - => new NAIndicatorTransform(env, args).MakeDataTransform(input); + => new MissingValueIndicatorTransformer(env, args).MakeDataTransform(input); // Factory method for SignatureLoadDataTransform. internal static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) @@ -140,9 +140,9 @@ public override void Save(ModelSaveContext ctx) protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : MapperBase + private sealed class Mapper : OneToOneMapperBase { - private readonly NAIndicatorTransform _parent; + private readonly MissingValueIndicatorTransformer _parent; private readonly ColInfo[] _infos; private sealed class ColInfo @@ -163,7 +163,7 @@ public ColInfo(string input, string output, ColumnType inType, ColumnType outTyp } } - public Mapper(NAIndicatorTransform parent, Schema inputSchema) + public Mapper(MissingValueIndicatorTransformer parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -190,7 +190,7 @@ private ColInfo[] CreateInfos(Schema inputSchema) return infos; } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int iinfo = 0; iinfo < _infos.Length; iinfo++) @@ -223,7 +223,7 @@ private static Delegate GetIsNADelegate(ColumnType type) return Runtime.Data.Conversion.Conversions.Instance.GetIsNAPredicate(type.ItemType); } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _infos.Length); @@ -294,8 +294,8 @@ private void FindNAs(in VBuffer src, InPredicate isNA, bool defaultIsNA // Find the indices of all of the NAs. indices.Clear(); - var srcValues = src.Values; - var srcCount = src.Count; + var srcValues = src.GetValues(); + var srcCount = srcValues.Length; if (src.IsDense) { for (int i = 0; i < srcCount; i++) @@ -307,7 +307,7 @@ private void FindNAs(in VBuffer src, InPredicate isNA, bool defaultIsNA } else if (!defaultIsNA) { - var srcIndices = src.Indices; + var srcIndices = src.GetIndices(); for (int ii = 0; ii < srcCount; ii++) { if (isNA(in srcValues[ii])) @@ -318,7 +318,7 @@ private void FindNAs(in VBuffer src, InPredicate isNA, bool defaultIsNA else { // Note that this adds non-NAs to indices -- this is indicated by sense being false. - var srcIndices = src.Indices; + var srcIndices = src.GetIndices(); for (int ii = 0; ii < srcCount; ii++) { if (!isNA(in srcValues[ii])) @@ -334,23 +334,20 @@ private void FindNAs(in VBuffer src, InPredicate isNA, bool defaultIsNA ///
private void FillValues(int srcLength, ref VBuffer dst, List indices, bool sense) { - var dstValues = dst.Values; - var dstIndices = dst.Indices; - if (indices.Count == 0) { if (sense) { // Return empty VBuffer. - dst = new VBuffer(srcLength, 0, dstValues, dstIndices); + VBufferUtils.Resize(ref dst, srcLength, 0); return; } // Return VBuffer filled with 1's. - Utils.EnsureSize(ref dstValues, srcLength, false); + var editor = VBufferEditor.Create(ref dst, srcLength); for (int i = 0; i < srcLength; i++) - dstValues[i] = true; - dst = new VBuffer(srcLength, dstValues, dstIndices); + editor.Values[i] = true; + dst = editor.Commit(); return; } @@ -358,22 +355,20 @@ private void FillValues(int srcLength, ref VBuffer dst, List indices, { // Will produce sparse output. int dstCount = indices.Count; - Utils.EnsureSize(ref dstValues, dstCount, false); - Utils.EnsureSize(ref dstIndices, dstCount, false); + var editor = VBufferEditor.Create(ref dst, srcLength, dstCount); - indices.CopyTo(dstIndices); + indices.CopyTo(editor.Indices); for (int ii = 0; ii < dstCount; ii++) - dstValues[ii] = true; + editor.Values[ii] = true; Host.Assert(dstCount <= srcLength); - dst = new VBuffer(srcLength, dstCount, dstValues, dstIndices); + dst = editor.Commit(); } else if (!sense && srcLength - indices.Count < srcLength / 2) { // Will produce sparse output. int dstCount = srcLength - indices.Count; - Utils.EnsureSize(ref dstValues, dstCount, false); - Utils.EnsureSize(ref dstIndices, dstCount, false); + var editor = VBufferEditor.Create(ref dst, srcLength, dstCount); // Appends the length of the src to make the loop simpler, // as the length of src will never be reached in the loop. @@ -389,8 +384,8 @@ private void FillValues(int srcLength, ref VBuffer dst, List indices, if (i < iNext) { Host.Assert(iiDst < dstCount); - dstValues[iiDst] = true; - dstIndices[iiDst++] = i; + editor.Values[iiDst] = true; + editor.Indices[iiDst++] = i; } else { @@ -402,12 +397,12 @@ private void FillValues(int srcLength, ref VBuffer dst, List indices, Host.Assert(srcLength == iiSrc + iiDst); Host.Assert(iiDst == dstCount); - dst = new VBuffer(srcLength, dstCount, dstValues, dstIndices); + dst = editor.Commit(); } else { // Will produce dense output. - Utils.EnsureSize(ref dstValues, srcLength, false); + var editor = VBufferEditor.Create(ref dst, srcLength); // Appends the length of the src to make the loop simpler, // as the length of src will never be reached in the loop. @@ -419,22 +414,22 @@ private void FillValues(int srcLength, ref VBuffer dst, List indices, Host.Assert(0 <= i && i <= indices[ii]); if (i == indices[ii]) { - dstValues[i] = sense; + editor.Values[i] = sense; ii++; Host.Assert(ii < indices.Count); Host.Assert(indices[ii - 1] < indices[ii]); } else - dstValues[i] = !sense; + editor.Values[i] = !sense; } - dst = new VBuffer(srcLength, dstValues, dstIndices); + dst = editor.Commit(); } } } } - public sealed class MissingValueIndicatorEstimator : TrivialEstimator + public sealed class MissingValueIndicatorEstimator : TrivialEstimator { /// /// Initializes a new instance of @@ -442,7 +437,7 @@ public sealed class MissingValueIndicatorEstimator : TrivialEstimatorThe environment to use. /// The names of the input columns of the transformation and the corresponding names for the output columns. public MissingValueIndicatorEstimator(IHostEnvironment env, params (string input, string output)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(NAIndicatorTransform)), new NAIndicatorTransform(env, columns)) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueIndicatorTransformer)), new MissingValueIndicatorTransformer(env, columns)) { Contracts.CheckValue(env, nameof(env)); } diff --git a/src/Microsoft.ML.Transforms/NAReplaceTransform.cs b/src/Microsoft.ML.Transforms/MissingValueReplacing.cs similarity index 86% rename from src/Microsoft.ML.Transforms/NAReplaceTransform.cs rename to src/Microsoft.ML.Transforms/MissingValueReplacing.cs index ec2793cc2d..9dea80ca81 100644 --- a/src/Microsoft.ML.Transforms/NAReplaceTransform.cs +++ b/src/Microsoft.ML.Transforms/MissingValueReplacing.cs @@ -22,17 +22,17 @@ using System.Reflection; using System.Text; -[assembly: LoadableClass(NAReplaceTransform.Summary, typeof(IDataTransform), typeof(NAReplaceTransform), typeof(NAReplaceTransform.Arguments), typeof(SignatureDataTransform), - NAReplaceTransform.FriendlyName, NAReplaceTransform.LoadName, "NAReplace", NAReplaceTransform.ShortName, DocName = "transform/NAHandle.md")] +[assembly: LoadableClass(MissingValueReplacingTransformer.Summary, typeof(IDataTransform), typeof(MissingValueReplacingTransformer), typeof(MissingValueReplacingTransformer.Arguments), typeof(SignatureDataTransform), + MissingValueReplacingTransformer.FriendlyName, MissingValueReplacingTransformer.LoadName, "NAReplace", MissingValueReplacingTransformer.ShortName, DocName = "transform/NAHandle.md")] -[assembly: LoadableClass(NAReplaceTransform.Summary, typeof(IDataTransform), typeof(NAReplaceTransform), null, typeof(SignatureLoadDataTransform), - NAReplaceTransform.FriendlyName, NAReplaceTransform.LoadName)] +[assembly: LoadableClass(MissingValueReplacingTransformer.Summary, typeof(IDataTransform), typeof(MissingValueReplacingTransformer), null, typeof(SignatureLoadDataTransform), + MissingValueReplacingTransformer.FriendlyName, MissingValueReplacingTransformer.LoadName)] -[assembly: LoadableClass(NAReplaceTransform.Summary, typeof(NAReplaceTransform), null, typeof(SignatureLoadModel), - NAReplaceTransform.FriendlyName, NAReplaceTransform.LoadName)] +[assembly: LoadableClass(MissingValueReplacingTransformer.Summary, typeof(MissingValueReplacingTransformer), null, typeof(SignatureLoadModel), + MissingValueReplacingTransformer.FriendlyName, MissingValueReplacingTransformer.LoadName)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(NAReplaceTransform), null, typeof(SignatureLoadRowMapper), - NAReplaceTransform.FriendlyName, NAReplaceTransform.LoadName)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(MissingValueReplacingTransformer), null, typeof(SignatureLoadRowMapper), + MissingValueReplacingTransformer.FriendlyName, MissingValueReplacingTransformer.LoadName)] namespace Microsoft.ML.Transforms { @@ -42,7 +42,7 @@ namespace Microsoft.ML.Transforms // Imputation modes are supported for vectors both by slot and across all slots. // REVIEW: May make sense to implement the transform template interface. /// - public sealed partial class NAReplaceTransform : OneToOneTransformerBase + public sealed partial class MissingValueReplacingTransformer : OneToOneTransformerBase { public enum ReplacementKind : byte { @@ -140,7 +140,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010001, loaderSignature: LoadName, - loaderAssemblyName: typeof(NAReplaceTransform).Assembly.FullName); + loaderAssemblyName: typeof(MissingValueReplacingTransformer).Assembly.FullName); } internal const string Summary = "Create an output column of the same type and size of the input column, where missing values " @@ -239,8 +239,8 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.ExceptParam(nameof(inputSchema), reason); } - public NAReplaceTransform(IHostEnvironment env, IDataView input, params ColumnInfo[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(NAReplaceTransform)), GetColumnPairs(columns)) + public MissingValueReplacingTransformer(IHostEnvironment env, IDataView input, params ColumnInfo[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueReplacingTransformer)), GetColumnPairs(columns)) { // Check that all the input columns are present and correct. for (int i = 0; i < ColumnPairs.Length; i++) @@ -252,7 +252,7 @@ public NAReplaceTransform(IHostEnvironment env, IDataView input, params ColumnIn GetReplacementValues(input, columns, out _repValues, out _repIsDefault, out _replaceTypes); } - private NAReplaceTransform(IHost host, ModelLoadContext ctx) + private MissingValueReplacingTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) { var columnsLength = ColumnPairs.Length; @@ -289,13 +289,14 @@ private T[] GetValuesArray(VBuffer src, ColumnType srcType, int iinfo) VBufferUtils.Densify(ref src); InPredicate defaultPred = Runtime.Data.Conversion.Conversions.Instance.GetIsDefaultPredicate(srcType.ItemType); _repIsDefault[iinfo] = new BitArray(srcType.VectorSize); - for (int slot = 0; slot < src.Length; slot++) + var srcValues = src.GetValues(); + for (int slot = 0; slot < srcValues.Length; slot++) { - if (defaultPred(in src.Values[slot])) + if (defaultPred(in srcValues[slot])) _repIsDefault[iinfo][slot] = true; } - T[] valReturn = src.Values; - Array.Resize(ref valReturn, srcType.VectorSize); + // copy the result array out. Copying is OK because this method is only called on model load. + T[] valReturn = srcValues.ToArray(); Host.Assert(valReturn.Length == src.Length); return valReturn; } @@ -482,16 +483,16 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV item.Slot ?? args.ImputeBySlot); cols[i].ReplacementString = item.ReplacementString; }; - return new NAReplaceTransform(env, input, cols).MakeDataTransform(input); + return new MissingValueReplacingTransformer(env, input, cols).MakeDataTransform(input); } public static IDataTransform Create(IHostEnvironment env, IDataView input, params ColumnInfo[] columns) { - return new NAReplaceTransform(env, input, columns).MakeDataTransform(input); + return new MissingValueReplacingTransformer(env, input, columns).MakeDataTransform(input); } // Factory method for SignatureLoadModel. - public static NAReplaceTransform Create(IHostEnvironment env, ModelLoadContext ctx) + public static MissingValueReplacingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(LoadName); @@ -499,7 +500,7 @@ public static NAReplaceTransform Create(IHostEnvironment env, ModelLoadContext c host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new NAReplaceTransform(host, ctx); + return new MissingValueReplacingTransformer(host, ctx); } // Factory method for SignatureLoadDataTransform. @@ -558,7 +559,7 @@ public override void Save(ModelSaveContext ctx) protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : MapperBase, ISaveAsOnnx + private sealed class Mapper : OneToOneMapperBase, ISaveAsOnnx { private sealed class ColInfo { @@ -574,14 +575,14 @@ public ColInfo(string name, string source, ColumnType type) } } - private readonly NAReplaceTransform _parent; + private readonly MissingValueReplacingTransformer _parent; private readonly ColInfo[] _infos; private readonly ColumnType[] _types; // The isNA delegates, parallel to Infos. private readonly Delegate[] _isNAs; public bool CanSaveOnnx(OnnxContext ctx) => true; - public Mapper(NAReplaceTransform parent, Schema inputSchema) + public Mapper(MissingValueReplacingTransformer parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -629,7 +630,7 @@ private ColInfo[] CreateInfos(ISchema inputSchema) return infos; } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -643,7 +644,7 @@ public override Schema.Column[] GetOutputColumns() return result; } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _infos.Length); @@ -734,17 +735,13 @@ private void FillValues(in VBuffer src, ref VBuffer dst, InPredicate Host.AssertValue(isNA); int srcSize = src.Length; - int srcCount = src.Count; - var srcValues = src.Values; - Host.Assert(Utils.Size(srcValues) >= srcCount); - var srcIndices = src.Indices; + var srcValues = src.GetValues(); + int srcCount = srcValues.Length; - var dstValues = dst.Values; - var dstIndices = dst.Indices; - - // If the values array is not large enough, allocate sufficient space. - // Note: We can't set the max to srcSize as vectors can be of variable lengths. - Utils.EnsureSize(ref dstValues, srcCount, keepOld: false); + // REVIEW: One thing that changing the code to simply ensure that there are srcCount indices in the arrays + // does is over-allocate space if the replacement value is the default value in a dataset with a + // signficiant amount of NA values -- is it worth handling allocation of memory for this case? + var dstEditor = VBufferEditor.Create(ref dst, srcSize, srcCount); int iivDst = 0; if (src.IsDense) @@ -761,21 +758,15 @@ private void FillValues(in VBuffer src, ref VBuffer dst, InPredicate // the default value, resulting in more than half of the indices being the default value. // In this case, changing the dst vector to be sparse would be more memory efficient -- the current decision // is it is not worth handling this case at the expense of running checks that will almost always not be triggered. - dstValues[ivSrc] = isNA(in srcVal) ? rep : srcVal; + dstEditor.Values[ivSrc] = isNA(in srcVal) ? rep : srcVal; } iivDst = srcCount; } else { // The source vector is sparse. - Host.Assert(Utils.Size(srcIndices) >= srcCount); Host.Assert(srcCount < srcSize); - - // Allocate more space if necessary. - // REVIEW: One thing that changing the code to simply ensure that there are srcCount indices in the arrays - // does is over-allocate space if the replacement value is the default value in a dataset with a - // signficiant amount of NA values -- is it worth handling allocation of memory for this case? - Utils.EnsureSize(ref dstIndices, srcCount, keepOld: false); + var srcIndices = src.GetIndices(); // Note: ivPrev is only used for asserts. int ivPrev = -1; @@ -789,21 +780,21 @@ private void FillValues(in VBuffer src, ref VBuffer dst, InPredicate if (!isNA(in srcVal)) { - dstValues[iivDst] = srcVal; - dstIndices[iivDst++] = iv; + dstEditor.Values[iivDst] = srcVal; + dstEditor.Indices[iivDst++] = iv; } else if (!repIsDefault) { // Allow for further sparsification. - dstValues[iivDst] = rep; - dstIndices[iivDst++] = iv; + dstEditor.Values[iivDst] = rep; + dstEditor.Indices[iivDst++] = iv; } } Host.Assert(iivDst <= srcCount); } Host.Assert(0 <= iivDst); Host.Assert(repIsDefault || iivDst == srcCount); - dst = new VBuffer(srcSize, iivDst, dstValues, dstIndices); + dst = dstEditor.CommitTruncated(iivDst); } /// @@ -818,19 +809,15 @@ private void FillValues(in VBuffer src, ref VBuffer dst, InPredicate Host.AssertValue(isNA); int srcSize = src.Length; - int srcCount = src.Count; - var srcValues = src.Values; - Host.Assert(Utils.Size(srcValues) >= srcCount); - var srcIndices = src.Indices; + var srcValues = src.GetValues(); + int srcCount = srcValues.Length; - var dstValues = dst.Values; - var dstIndices = dst.Indices; - - // If the values array is not large enough, allocate sufficient space. - Utils.EnsureSize(ref dstValues, srcCount, srcSize, keepOld: false); + // REVIEW: One thing that changing the code to simply ensure that there are srcCount indices in the arrays + // does is over-allocate space if the replacement value is the default value in a dataset with a + // signficiant amount of NA values -- is it worth handling allocation of memory for this case? + var dstEditor = VBufferEditor.Create(ref dst, srcSize, srcCount); int iivDst = 0; - Host.Assert(Utils.Size(srcValues) >= srcCount); if (src.IsDense) { // The source vector is dense. @@ -845,21 +832,15 @@ private void FillValues(in VBuffer src, ref VBuffer dst, InPredicate // the default value, resulting in more than half of the indices being the default value. // In this case, changing the dst vector to be sparse would be more memory efficient -- the current decision // is it is not worth handling this case at the expense of running checks that will almost always not be triggered. - dstValues[ivSrc] = isNA(in srcVal) ? rep[ivSrc] : srcVal; + dstEditor.Values[ivSrc] = isNA(in srcVal) ? rep[ivSrc] : srcVal; } iivDst = srcCount; } else { // The source vector is sparse. - Host.Assert(Utils.Size(srcIndices) >= srcCount); Host.Assert(srcCount < srcSize); - - // Allocate more space if necessary. - // REVIEW: One thing that changing the code to simply ensure that there are srcCount indices in the arrays - // does is over-allocate space if the replacement value is the default value in a dataset with a - // signficiant amount of NA values -- is it worth handling allocation of memory for this case? - Utils.EnsureSize(ref dstIndices, srcCount, srcSize, keepOld: false); + var srcIndices = src.GetIndices(); // Note: ivPrev is only used for asserts. int ivPrev = -1; @@ -873,20 +854,20 @@ private void FillValues(in VBuffer src, ref VBuffer dst, InPredicate if (!isNA(in srcVal)) { - dstValues[iivDst] = srcVal; - dstIndices[iivDst++] = iv; + dstEditor.Values[iivDst] = srcVal; + dstEditor.Indices[iivDst++] = iv; } else if (!repIsDefault[iv]) { // Allow for further sparsification. - dstValues[iivDst] = rep[iv]; - dstIndices[iivDst++] = iv; + dstEditor.Values[iivDst] = rep[iv]; + dstEditor.Indices[iivDst++] = iv; } } Host.Assert(iivDst <= srcCount); } Host.Assert(0 <= iivDst); - dst = new VBuffer(srcSize, iivDst, dstValues, dstIndices); + dst = dstEditor.CommitTruncated(iivDst); } public void SaveAsOnnx(OnnxContext ctx) @@ -943,24 +924,24 @@ private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColInfo info, string src } } - public sealed class MissingValueReplacingEstimator : IEstimator + public sealed class MissingValueReplacingEstimator : IEstimator { public static class Defaults { - public const NAReplaceTransform.ColumnInfo.ReplacementMode ReplacementMode = NAReplaceTransform.ColumnInfo.ReplacementMode.DefaultValue; + public const MissingValueReplacingTransformer.ColumnInfo.ReplacementMode ReplacementMode = MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.DefaultValue; public const bool ImputeBySlot = true; } private readonly IHost _host; - private readonly NAReplaceTransform.ColumnInfo[] _columns; + private readonly MissingValueReplacingTransformer.ColumnInfo[] _columns; - public MissingValueReplacingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, NAReplaceTransform.ColumnInfo.ReplacementMode replacementKind = Defaults.ReplacementMode) - : this(env, new NAReplaceTransform.ColumnInfo(outputColumn ?? inputColumn, inputColumn, replacementKind)) + public MissingValueReplacingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementKind = Defaults.ReplacementMode) + : this(env, new MissingValueReplacingTransformer.ColumnInfo(outputColumn ?? inputColumn, inputColumn, replacementKind)) { } - public MissingValueReplacingEstimator(IHostEnvironment env, params NAReplaceTransform.ColumnInfo[] columns) + public MissingValueReplacingEstimator(IHostEnvironment env, params MissingValueReplacingTransformer.ColumnInfo[] columns) { Contracts.CheckValue(env, nameof(env)); _host = env.Register(nameof(MissingValueReplacingEstimator)); @@ -975,7 +956,7 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) { if (!inputSchema.TryFindColumn(colInfo.Input, out var col)) throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.Input); - string reason = NAReplaceTransform.TestType(col.ItemType); + string reason = MissingValueReplacingTransformer.TestType(col.ItemType); if (reason != null) throw _host.ExceptParam(nameof(inputSchema), reason); var metadata = new List(); @@ -989,7 +970,7 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) return new SchemaShape(result.Values); } - public NAReplaceTransform Fit(IDataView input) => new NAReplaceTransform(_host, input, _columns); + public MissingValueReplacingTransformer Fit(IDataView input) => new MissingValueReplacingTransformer(_host, input, _columns); } /// @@ -1000,9 +981,9 @@ public static class NAReplacerExtensions private readonly struct Config { public readonly bool ImputeBySlot; - public readonly NAReplaceTransform.ColumnInfo.ReplacementMode ReplacementMode; + public readonly MissingValueReplacingTransformer.ColumnInfo.ReplacementMode ReplacementMode; - public Config(NAReplaceTransform.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode, + public Config(MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode, bool imputeBySlot = MissingValueReplacingEstimator.Defaults.ImputeBySlot) { ImputeBySlot = imputeBySlot; @@ -1068,11 +1049,11 @@ public override IEstimator Reconcile(IHostEnvironment env, IReadOnlyDictionary outputNames, IReadOnlyCollection usedNames) { - var infos = new NAReplaceTransform.ColumnInfo[toOutput.Length]; + var infos = new MissingValueReplacingTransformer.ColumnInfo[toOutput.Length]; for (int i = 0; i < toOutput.Length; ++i) { var col = (IColInput)toOutput[i]; - infos[i] = new NAReplaceTransform.ColumnInfo(inputNames[col.Input], outputNames[toOutput[i]], col.Config.ReplacementMode, col.Config.ImputeBySlot); + infos[i] = new MissingValueReplacingTransformer.ColumnInfo(inputNames[col.Input], outputNames[toOutput[i]], col.Config.ReplacementMode, col.Config.ImputeBySlot); } return new MissingValueReplacingEstimator(env, infos); } @@ -1083,7 +1064,7 @@ public override IEstimator Reconcile(IHostEnvironment env, /// /// Incoming data. /// How NaN should be replaced - public static Scalar ReplaceNaNValues(this Scalar input, NAReplaceTransform.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) + public static Scalar ReplaceNaNValues(this Scalar input, MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) { Contracts.CheckValue(input, nameof(input)); return new OutScalar(input, new Config(replacementMode, false)); @@ -1094,7 +1075,7 @@ public static Scalar ReplaceNaNValues(this Scalar input, NAReplace /// /// Incoming data. /// How NaN should be replaced - public static Scalar ReplaceNaNValues(this Scalar input, NAReplaceTransform.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) + public static Scalar ReplaceNaNValues(this Scalar input, MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) { Contracts.CheckValue(input, nameof(input)); return new OutScalar(input, new Config(replacementMode, false)); @@ -1107,7 +1088,7 @@ public static Scalar ReplaceNaNValues(this Scalar input, NARepla /// If true, per-slot imputation of replacement is performed. /// Otherwise, replacement value is imputed for the entire vector column. This setting is ignored for scalars and variable vectors, /// where imputation is always for the entire column. - public static Vector ReplaceNaNValues(this Vector input, NAReplaceTransform.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode, bool imputeBySlot = MissingValueReplacingEstimator.Defaults.ImputeBySlot) + public static Vector ReplaceNaNValues(this Vector input, MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode, bool imputeBySlot = MissingValueReplacingEstimator.Defaults.ImputeBySlot) { Contracts.CheckValue(input, nameof(input)); return new OutVectorColumn(input, new Config(replacementMode, imputeBySlot)); @@ -1121,7 +1102,7 @@ public static Vector ReplaceNaNValues(this Vector input, NAReplace /// If true, per-slot imputation of replacement is performed. /// Otherwise, replacement value is imputed for the entire vector column. This setting is ignored for scalars and variable vectors, /// where imputation is always for the entire column. - public static Vector ReplaceNaNValues(this Vector input, NAReplaceTransform.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode, bool imputeBySlot = MissingValueReplacingEstimator.Defaults.ImputeBySlot) + public static Vector ReplaceNaNValues(this Vector input, MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode, bool imputeBySlot = MissingValueReplacingEstimator.Defaults.ImputeBySlot) { Contracts.CheckValue(input, nameof(input)); return new OutVectorColumn(input, new Config(replacementMode, imputeBySlot)); @@ -1132,7 +1113,7 @@ public static Vector ReplaceNaNValues(this Vector input, NARepla /// /// Incoming data. /// How NaN should be replaced - public static VarVector ReplaceNaNValues(this VarVector input, NAReplaceTransform.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) + public static VarVector ReplaceNaNValues(this VarVector input, MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) { Contracts.CheckValue(input, nameof(input)); return new OutVarVectorColumn(input, new Config(replacementMode, false)); @@ -1142,7 +1123,7 @@ public static VarVector ReplaceNaNValues(this VarVector input, NAR ///
/// Incoming data. /// How NaN should be replaced - public static VarVector ReplaceNaNValues(this VarVector input, NAReplaceTransform.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) + public static VarVector ReplaceNaNValues(this VarVector input, MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) { Contracts.CheckValue(input, nameof(input)); return new OutVarVectorColumn(input, new Config(replacementMode, false)); diff --git a/src/Microsoft.ML.Transforms/NAReplaceUtils.cs b/src/Microsoft.ML.Transforms/MissingValueReplacingUtils.cs similarity index 98% rename from src/Microsoft.ML.Transforms/NAReplaceUtils.cs rename to src/Microsoft.ML.Transforms/MissingValueReplacingUtils.cs index 82ca10a966..8466d1b5ef 100644 --- a/src/Microsoft.ML.Transforms/NAReplaceUtils.cs +++ b/src/Microsoft.ML.Transforms/MissingValueReplacingUtils.cs @@ -12,7 +12,7 @@ namespace Microsoft.ML.Transforms { using Conditional = System.Diagnostics.ConditionalAttribute; - public sealed partial class NAReplaceTransform + public sealed partial class MissingValueReplacingTransformer { private static StatAggregator CreateStatAggregator(IChannel ch, ColumnType type, ReplacementKind? kind, bool bySlot, IRowCursor cursor, int col) { @@ -185,9 +185,8 @@ protected StatAggregatorAcrossSlots(IChannel ch, IRowCursor cursor, int col) protected sealed override void ProcessRow(in VBuffer src) { - var srcCount = src.Count; - var srcValues = src.Values; - Ch.Assert(Utils.Size(srcValues) >= srcCount); + var srcValues = src.GetValues(); + var srcCount = srcValues.Length; for (int slot = 0; slot < srcCount; slot++) ProcessValue(in srcValues[slot]); @@ -210,9 +209,8 @@ protected StatAggregatorBySlot(IChannel ch, ColumnType type, IRowCursor cursor, protected sealed override void ProcessRow(in VBuffer src) { - var srcCount = src.Count; - var srcValues = src.Values; - Ch.Assert(Utils.Size(srcValues) >= srcCount); + var srcValues = src.GetValues(); + var srcCount = srcValues.Length; if (src.IsDense) { // The src vector is dense. @@ -222,8 +220,7 @@ protected sealed override void ProcessRow(in VBuffer src) else { // The src vector is sparse. - var srcIndices = src.Indices; - Ch.Assert(Utils.Size(srcIndices) >= srcCount); + var srcIndices = src.GetIndices(); for (int islot = 0; islot < srcCount; islot++) ProcessValue(in srcValues[islot], srcIndices[islot]); } diff --git a/src/Microsoft.ML.Transforms/MutualInformationFeatureSelection.cs b/src/Microsoft.ML.Transforms/MutualInformationFeatureSelection.cs index c98ccfab04..7982511cb8 100644 --- a/src/Microsoft.ML.Transforms/MutualInformationFeatureSelection.cs +++ b/src/Microsoft.ML.Transforms/MutualInformationFeatureSelection.cs @@ -291,7 +291,7 @@ private sealed class Impl private readonly IHost _host; private readonly BinFinderBase _binFinder; private int _numBins; - private int[] _labels; + private VBuffer _labels; // always dense private int _numLabels; private int[][] _contingencyTable; private int[] _labelSums; @@ -406,28 +406,28 @@ private void GetLabels(Transposer trans, ColumnType labelType, int labelCol) { var tmp = default(VBuffer); trans.GetSingleSlotValue(labelCol, ref tmp); - BinInts(ref tmp, ref labels, _numBins, out min, out lim); + BinInts(in tmp, ref labels, _numBins, out min, out lim); _numLabels = lim - min; } else if (labelType == NumberType.R4) { var tmp = default(VBuffer); trans.GetSingleSlotValue(labelCol, ref tmp); - BinSingles(ref tmp, ref labels, _numBins, out min, out lim); + BinSingles(in tmp, ref labels, _numBins, out min, out lim); _numLabels = lim - min; } else if (labelType == NumberType.R8) { var tmp = default(VBuffer); trans.GetSingleSlotValue(labelCol, ref tmp); - BinDoubles(ref tmp, ref labels, _numBins, out min, out lim); + BinDoubles(in tmp, ref labels, _numBins, out min, out lim); _numLabels = lim - min; } else if (labelType.IsBool) { var tmp = default(VBuffer); trans.GetSingleSlotValue(labelCol, ref tmp); - BinBools(ref tmp, ref labels); + BinBools(in tmp, ref labels); _numLabels = 3; min = -1; lim = 2; @@ -438,7 +438,7 @@ private void GetLabels(Transposer trans, ColumnType labelType, int labelCol) KeyLabelGetter del = GetKeyLabels; var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(labelType.RawType); var parameters = new object[] { trans, labelCol, labelType }; - _labels = (int[])methodInfo.Invoke(this, parameters); + _labels = (VBuffer)methodInfo.Invoke(this, parameters); _numLabels = labelType.KeyCount + 1; // No need to densify or shift in this case. @@ -448,29 +448,25 @@ private void GetLabels(Transposer trans, ColumnType labelType, int labelCol) // Densify and shift labels. VBufferUtils.Densify(ref labels); Contracts.Assert(labels.IsDense); - _labels = labels.Values; - if (labels.Length < _labels.Length) - Array.Resize(ref _labels, labels.Length); - for (int i = 0; i < _labels.Length; i++) + var labelsEditor = VBufferEditor.CreateFromBuffer(ref labels); + for (int i = 0; i < labels.Length; i++) { - _labels[i] -= min; - Contracts.Assert(_labels[i] < _numLabels); + labelsEditor.Values[i] -= min; + Contracts.Assert(labelsEditor.Values[i] < _numLabels); } + _labels = labelsEditor.Commit(); } - private delegate int[] KeyLabelGetter(Transposer trans, int labelCol, ColumnType labeColumnType); + private delegate VBuffer KeyLabelGetter(Transposer trans, int labelCol, ColumnType labeColumnType); - private int[] GetKeyLabels(Transposer trans, int labelCol, ColumnType labeColumnType) + private VBuffer GetKeyLabels(Transposer trans, int labelCol, ColumnType labelColumnType) { var tmp = default(VBuffer); var labels = default(VBuffer); trans.GetSingleSlotValue(labelCol, ref tmp); - BinKeys(labeColumnType)(in tmp, ref labels); + BinKeys(labelColumnType)(in tmp, ref labels); VBufferUtils.Densify(ref labels); - var values = labels.Values; - if (labels.Length < values.Length) - Array.Resize(ref values, labels.Length); - return values; + return labels; } /// @@ -485,7 +481,7 @@ private Single[] ComputeMutualInformation(Transposer trans, int col) return ComputeMutualInformation(trans, col, (ref VBuffer src, ref VBuffer dst, out int min, out int lim) => { - BinInts(ref src, ref dst, _numBins, out min, out lim); + BinInts(in src, ref dst, _numBins, out min, out lim); }); } if (type.ItemType == NumberType.R4) @@ -493,7 +489,7 @@ private Single[] ComputeMutualInformation(Transposer trans, int col) return ComputeMutualInformation(trans, col, (ref VBuffer src, ref VBuffer dst, out int min, out int lim) => { - BinSingles(ref src, ref dst, _numBins, out min, out lim); + BinSingles(in src, ref dst, _numBins, out min, out lim); }); } if (type.ItemType == NumberType.R8) @@ -501,7 +497,7 @@ private Single[] ComputeMutualInformation(Transposer trans, int col) return ComputeMutualInformation(trans, col, (ref VBuffer src, ref VBuffer dst, out int min, out int lim) => { - BinDoubles(ref src, ref dst, _numBins, out min, out lim); + BinDoubles(in src, ref dst, _numBins, out min, out lim); }); } if (type.ItemType.IsBool) @@ -511,7 +507,7 @@ private Single[] ComputeMutualInformation(Transposer trans, int col) { min = -1; lim = 2; - BinBools(ref src, ref dst); + BinBools(in src, ref dst); }); } Contracts.Assert(0 < type.ItemType.KeyCount && type.ItemType.KeyCount < Utils.ArrayMaxSize); @@ -609,13 +605,16 @@ private Single ComputeMutualInformation(in VBuffer features, int numFeature /// private void FillTable(in VBuffer features, int offset, int numFeatures) { + Contracts.Assert(_labels.IsDense); Contracts.Assert(_labels.Length == features.Length); + var featureValues = features.GetValues(); + var labelsValues = _labels.GetValues(); if (features.IsDense) { - for (int i = 0; i < _labels.Length; i++) + for (int i = 0; i < labelsValues.Length; i++) { - var label = _labels[i]; - var feature = features.Values[i] - offset; + var label = labelsValues[i]; + var feature = featureValues[i] - offset; Contracts.Assert(0 <= label && label < _numLabels); Contracts.Assert(0 <= feature && feature < numFeatures); _contingencyTable[label][feature]++; @@ -623,23 +622,24 @@ private void FillTable(in VBuffer features, int offset, int numFeatures) return; } + var featureIndices = features.GetIndices(); int ii = 0; - for (int i = 0; i < _labels.Length; i++) + for (int i = 0; i < labelsValues.Length; i++) { - var label = _labels[i]; + var label = labelsValues[i]; int feature; - if (ii == features.Count || i < features.Indices[ii]) + if (ii == featureIndices.Length || i < featureIndices[ii]) feature = -offset; else { - feature = features.Values[ii] - offset; + feature = featureValues[ii] - offset; ii++; } Contracts.Assert(0 <= label && label < _numLabels); Contracts.Assert(0 <= feature && feature < numFeatures); _contingencyTable[label][feature]++; } - Contracts.Assert(ii == features.Count); + Contracts.Assert(ii == featureIndices.Length); } /// @@ -673,12 +673,12 @@ private static ValueMapper, VBuffer> BinKeys(ColumnType colTy /// /// Maps Ints. /// - private void BinInts(ref VBuffer input, ref VBuffer output, + private void BinInts(in VBuffer input, ref VBuffer output, int numBins, out int min, out int lim) { Contracts.Assert(_singles.Count == 0); - var bounds = _binFinder.FindBins(numBins, _singles, input.Length - input.Count); + var bounds = _binFinder.FindBins(numBins, _singles, input.Length - input.GetValues().Length); min = -1 - bounds.FindIndexSorted(0); lim = min + bounds.Length + 1; int offset = min; @@ -692,21 +692,19 @@ private void BinInts(ref VBuffer input, ref VBuffer output, /// /// Maps from Singles to ints. NaNs (and only NaNs) are mapped to the first bin. /// - private void BinSingles(ref VBuffer input, ref VBuffer output, + private void BinSingles(in VBuffer input, ref VBuffer output, int numBins, out int min, out int lim) { Contracts.Assert(_singles.Count == 0); - if (input.Values != null) + var inputValues = input.GetValues(); + for (int i = 0; i < inputValues.Length; i++) { - for (int i = 0; i < input.Count; i++) - { - var val = input.Values[i]; - if (!Single.IsNaN(val)) - _singles.Add(val); - } + var val = inputValues[i]; + if (!Single.IsNaN(val)) + _singles.Add(val); } - var bounds = _binFinder.FindBins(numBins, _singles, input.Length - input.Count); + var bounds = _binFinder.FindBins(numBins, _singles, input.Length - inputValues.Length); min = -1 - bounds.FindIndexSorted(0); lim = min + bounds.Length + 1; int offset = min; @@ -720,21 +718,19 @@ private void BinSingles(ref VBuffer input, ref VBuffer output, /// /// Maps from Doubles to ints. NaNs (and only NaNs) are mapped to the first bin. /// - private void BinDoubles(ref VBuffer input, ref VBuffer output, + private void BinDoubles(in VBuffer input, ref VBuffer output, int numBins, out int min, out int lim) { Contracts.Assert(_doubles.Count == 0); - if (input.Values != null) + var inputValues = input.GetValues(); + for (int i = 0; i < inputValues.Length; i++) { - for (int i = 0; i < input.Count; i++) - { - var val = input.Values[i]; - if (!Double.IsNaN(val)) - _doubles.Add(val); - } + var val = inputValues[i]; + if (!Double.IsNaN(val)) + _doubles.Add(val); } - var bounds = _binFinder.FindBins(numBins, _doubles, input.Length - input.Count); + var bounds = _binFinder.FindBins(numBins, _doubles, input.Length - inputValues.Length); var offset = min = -1 - bounds.FindIndexSorted(0); lim = min + bounds.Length + 1; ValueMapper mapper = @@ -744,7 +740,7 @@ private void BinDoubles(ref VBuffer input, ref VBuffer output, _doubles.Clear(); } - private void BinBools(ref VBuffer input, ref VBuffer output) + private void BinBools(in VBuffer input, ref VBuffer output) { if (_boolMapper == null) _boolMapper = CreateVectorMapper(BinOneBool); @@ -775,24 +771,20 @@ private static ValueMapper, VBuffer> CreateVectorMapper(this ValueMapper map, in VBuffer input, ref VBuffer output) { - var values = output.Values; - if (Utils.Size(values) < input.Count) - values = new TDst[input.Count]; - for (int i = 0; i < input.Count; i++) + var inputValues = input.GetValues(); + var editor = VBufferEditor.Create(ref output, input.Length, inputValues.Length); + for (int i = 0; i < inputValues.Length; i++) { - TSrc val = input.Values[i]; - map(in val, ref values[i]); + TSrc val = inputValues[i]; + map(in val, ref editor.Values[i]); } - var indices = output.Indices; - if (!input.IsDense && input.Count > 0) + if (!input.IsDense && inputValues.Length > 0) { - if (Utils.Size(indices) < input.Count) - indices = new int[input.Count]; - Array.Copy(input.Indices, indices, input.Count); + input.GetIndices().CopyTo(editor.Indices); } - output = new VBuffer(input.Length, input.Count, values, indices); + output = editor.Commit(); } } } diff --git a/src/Microsoft.ML.Transforms/NADropTransform.cs b/src/Microsoft.ML.Transforms/NADropTransform.cs deleted file mode 100644 index c045ba5d7a..0000000000 --- a/src/Microsoft.ML.Transforms/NADropTransform.cs +++ /dev/null @@ -1,339 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Reflection; -using System.Text; -using Microsoft.ML.Runtime; -using Microsoft.ML.Runtime.CommandLine; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Data.Conversion; -using Microsoft.ML.Runtime.EntryPoints; -using Microsoft.ML.Runtime.Internal.Utilities; -using Microsoft.ML.Runtime.Model; - -[assembly: LoadableClass(NADropTransform.Summary, typeof(NADropTransform), typeof(NADropTransform.Arguments), typeof(SignatureDataTransform), - NADropTransform.FriendlyName, NADropTransform.ShortName, "NADropTransform")] - -[assembly: LoadableClass(NADropTransform.Summary, typeof(NADropTransform), null, typeof(SignatureLoadDataTransform), - NADropTransform.FriendlyName, NADropTransform.LoaderSignature)] - -namespace Microsoft.ML.Runtime.Data -{ - /// - public sealed class NADropTransform : OneToOneTransformBase - { - public sealed class Arguments : TransformInputBase - { - [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "Columns to drop the NAs for", ShortName = "col", SortOrder = 1)] - public Column[] Column; - } - - public sealed class Column : OneToOneColumn - { - public static Column Parse(string str) - { - var res = new Column(); - if (res.TryParse(str)) - return res; - return null; - } - - public bool TryUnparse(StringBuilder sb) - { - Contracts.AssertValue(sb); - return TryUnparseCore(sb); - } - } - - internal const string Summary = "Removes NAs from vector columns."; - internal const string FriendlyName = "NA Drop Transform"; - internal const string ShortName = "NADrop"; - public const string LoaderSignature = "NADropTransform"; - - private static VersionInfo GetVersionInfo() - { - return new VersionInfo( - modelSignature: "NADROPXF", - verWrittenCur: 0x00010001, // Initial - verReadableCur: 0x00010001, - verWeCanReadBack: 0x00010001, - loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(NADropTransform).Assembly.FullName); - } - - private const string RegistrationName = "DropNAs"; - - // The isNA delegates, parallel to Infos. - private readonly Delegate[] _isNAs; - - /// - /// Convenience constructor for public facing API. - /// - /// Host Environment. - /// Input . This is the output from previous transform or loader. - /// Name of the output column. - /// Name of the column to be transformed. If this is null '' will be used. - public NADropTransform(IHostEnvironment env, IDataView input, string name, string source = null) - : this(env, new Arguments() { Column = new[] { new Column() { Source = source ?? name, Name = name } } }, input) - { - } - - public NADropTransform(IHostEnvironment env, Arguments args, IDataView input) - : base(Contracts.CheckRef(env, nameof(env)), RegistrationName, env.CheckRef(args, nameof(args)).Column, input, TestType) - { - Host.CheckNonEmpty(args.Column, nameof(args.Column)); - _isNAs = InitIsNAAndMetadata(); - } - - private Delegate[] InitIsNAAndMetadata() - { - var md = Metadata; - var isNAs = new Delegate[Infos.Length]; - for (int iinfo = 0; iinfo < Infos.Length; iinfo++) - { - var type = Infos[iinfo].TypeSrc; - isNAs[iinfo] = GetIsNADelegate(type); - // Register for metadata. Propagate the IsNormalized metadata. - // SlotNames will not be propagated. - using (var bldr = md.BuildMetadata(iinfo, Source.Schema, Infos[iinfo].Source, - MetadataUtils.Kinds.IsNormalized, MetadataUtils.Kinds.KeyValues)) - { - // Output does not have missings. - bldr.AddPrimitive(MetadataUtils.Kinds.HasMissingValues, BoolType.Instance, false); - } - } - md.Seal(); - return isNAs; - } - - /// - /// Returns the isNA predicate for the respective type. - /// - private Delegate GetIsNADelegate(ColumnType type) - { - Func func = GetIsNADelegate; - return Utils.MarshalInvoke(func, type.ItemType.RawType, type); - } - - private Delegate GetIsNADelegate(ColumnType type) - { - return Conversions.Instance.GetIsNAPredicate(type.ItemType); - } - - private static string TestType(ColumnType type) - { - if (!type.IsVector) - { - return string.Format("Type '{0}' is not supported by {1} since it is not a vector", - type, LoaderSignature); - } - - // Item type must have an NA value that exists. - Func func = TestType; - return Utils.MarshalInvoke(func, type.ItemType.RawType, type.ItemType); - } - - private static string TestType(ColumnType type) - { - Contracts.Assert(type.ItemType.RawType == typeof(T)); - InPredicate isNA; - if (!Conversions.Instance.TryGetIsNAPredicate(type.ItemType, out isNA)) - { - return string.Format("Type '{0}' is not supported by {1} since it doesn't have an NA value", - type, LoaderSignature); - } - return null; - } - - public static NADropTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) - { - Contracts.CheckValue(env, nameof(env)); - var h = env.Register(RegistrationName); - h.CheckValue(ctx, nameof(ctx)); - h.CheckValue(input, nameof(input)); - ctx.CheckAtModel(GetVersionInfo()); - return h.Apply("Loading Model", ch => new NADropTransform(h, ctx, input)); - } - - private NADropTransform(IHost host, ModelLoadContext ctx, IDataView input) - : base(host, ctx, input, TestType) - { - Host.AssertValue(ctx); - // *** Binary format *** - // - Host.AssertNonEmpty(Infos); - - _isNAs = InitIsNAAndMetadata(); - } - - public override void Save(ModelSaveContext ctx) - { - Host.CheckValue(ctx, nameof(ctx)); - ctx.CheckAtModel(); - ctx.SetVersionInfo(GetVersionInfo()); - - // *** Binary format *** - // - SaveBase(ctx); - } - - protected override ColumnType GetColumnTypeCore(int iinfo) - { - Host.Assert(0 <= iinfo & iinfo < Infos.Length); - return new VectorType(Infos[iinfo].TypeSrc.ItemType.AsPrimitive); - } - - protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, out Action disposer) - { - Host.AssertValueOrNull(ch); - Host.AssertValue(input); - Host.Assert(0 <= iinfo && iinfo < Infos.Length); - Host.Assert(Infos[iinfo].TypeSrc.IsVector); - - disposer = null; - Func>> del = MakeVecGetter; - var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(Infos[iinfo].TypeSrc.ItemType.RawType); - return (Delegate)methodInfo.Invoke(this, new object[] { input, iinfo }); - } - - private ValueGetter> MakeVecGetter(IRow input, int iinfo) - { - var srcGetter = GetSrcGetter>(input, iinfo); - var buffer = default(VBuffer); - var isNA = (InPredicate)_isNAs[iinfo]; - var def = default(TDst); - if (isNA(in def)) - { - // Case I: NA equals the default value. - return - (ref VBuffer value) => - { - srcGetter(ref buffer); - DropNAsAndDefaults(ref buffer, ref value, isNA); - }; - } - - // Case II: NA is different form default value. - Host.Assert(!isNA(in def)); - return - (ref VBuffer value) => - { - srcGetter(ref buffer); - DropNAs(ref buffer, ref value, isNA); - }; - } - - private void DropNAsAndDefaults(ref VBuffer src, ref VBuffer dst, InPredicate isNA) - { - Host.AssertValue(isNA); - - int newCount = 0; - for (int i = 0; i < src.Count; i++) - { - if (!isNA(in src.Values[i])) - newCount++; - } - Host.Assert(newCount <= src.Count); - - if (newCount == 0) - { - dst = new VBuffer(0, dst.Values, dst.Indices); - return; - } - - if (newCount == src.Count) - { - Utils.Swap(ref src, ref dst); - if (!dst.IsDense) - { - Host.Assert(dst.Count == newCount); - dst = new VBuffer(dst.Count, dst.Values, dst.Indices); - } - return; - } - - int iDst = 0; - var values = dst.Values; - if (Utils.Size(values) < newCount) - values = new TDst[newCount]; - - // Densifying sparse vectors since default value equals NA and hence should be dropped. - for (int i = 0; i < src.Count; i++) - { - if (!isNA(in src.Values[i])) - values[iDst++] = src.Values[i]; - } - Host.Assert(iDst == newCount); - - dst = new VBuffer(newCount, values, dst.Indices); - } - - private void DropNAs(ref VBuffer src, ref VBuffer dst, InPredicate isNA) - { - Host.AssertValue(isNA); - - int newCount = 0; - for (int i = 0; i < src.Count; i++) - { - if (!isNA(in src.Values[i])) - newCount++; - } - Host.Assert(newCount <= src.Count); - - if (newCount == 0) - { - dst = new VBuffer(src.Length - src.Count, 0, dst.Values, dst.Indices); - return; - } - - if (newCount == src.Count) - { - Utils.Swap(ref src, ref dst); - return; - } - - var values = dst.Values; - if (Utils.Size(values) < newCount) - values = new TDst[newCount]; - - int iDst = 0; - if (src.IsDense) - { - for (int i = 0; i < src.Count; i++) - { - if (!isNA(in src.Values[i])) - { - values[iDst] = src.Values[i]; - iDst++; - } - } - Host.Assert(iDst == newCount); - dst = new VBuffer(newCount, values, dst.Indices); - } - else - { - var indices = dst.Indices; - if (Utils.Size(indices) < newCount) - indices = new int[newCount]; - - int offset = 0; - for (int i = 0; i < src.Count; i++) - { - if (!isNA(in src.Values[i])) - { - values[iDst] = src.Values[i]; - indices[iDst] = src.Indices[i] - offset; - iDst++; - } - else - offset++; - } - Host.Assert(iDst == newCount); - Host.Assert(offset == src.Count - newCount); - dst = new VBuffer(src.Length - offset, newCount, values, indices); - } - } - } -} \ No newline at end of file diff --git a/src/Microsoft.ML.Transforms/NAHandling.cs b/src/Microsoft.ML.Transforms/NAHandling.cs index 9ad7acd94a..e5809adf68 100644 --- a/src/Microsoft.ML.Transforms/NAHandling.cs +++ b/src/Microsoft.ML.Transforms/NAHandling.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Runtime; -using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Transforms; @@ -14,15 +13,15 @@ namespace Microsoft.ML.Transforms public static class NAHandling { [TlcModule.EntryPoint(Name = "Transforms.MissingValuesDropper", - Desc = NADropTransform.Summary, - UserName = NADropTransform.FriendlyName, - ShortName = NADropTransform.ShortName, + Desc = MissingValueDroppingTransformer.Summary, + UserName = MissingValueDroppingTransformer.FriendlyName, + ShortName = MissingValueDroppingTransformer.ShortName, XmlInclude = new[] { @"", @"" })] - public static CommonOutputs.TransformOutput Drop(IHostEnvironment env, NADropTransform.Arguments input) + public static CommonOutputs.TransformOutput Drop(IHostEnvironment env, MissingValueDroppingTransformer.Arguments input) { - var h = EntryPointUtils.CheckArgsAndCreateHost(env, NADropTransform.ShortName, input); - var xf = new NADropTransform(h, input, input.Data); + var h = EntryPointUtils.CheckArgsAndCreateHost(env, MissingValueDroppingTransformer.ShortName, input); + var xf = MissingValueDroppingTransformer.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), @@ -48,15 +47,15 @@ public static CommonOutputs.TransformOutput Filter(IHostEnvironment env, NAFilte } [TlcModule.EntryPoint(Name = "Transforms.MissingValueHandler", - Desc = NAHandleTransform.Summary, - UserName = NAHandleTransform.FriendlyName, - ShortName = NAHandleTransform.ShortName, + Desc = MissingValueHandlingTransformer.Summary, + UserName = MissingValueHandlingTransformer.FriendlyName, + ShortName = MissingValueHandlingTransformer.ShortName, XmlInclude = new[] { @"", @"" })] - public static CommonOutputs.TransformOutput Handle(IHostEnvironment env, NAHandleTransform.Arguments input) + public static CommonOutputs.TransformOutput Handle(IHostEnvironment env, MissingValueHandlingTransformer.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "NAHandle", input); - var xf = NAHandleTransform.Create(h, input, input.Data); + var xf = MissingValueHandlingTransformer.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), @@ -65,15 +64,15 @@ public static CommonOutputs.TransformOutput Handle(IHostEnvironment env, NAHandl } [TlcModule.EntryPoint(Name = "Transforms.MissingValueIndicator", - Desc = NAIndicatorTransform.Summary, - UserName = NAIndicatorTransform.FriendlyName, - ShortName = NAIndicatorTransform.ShortName, + Desc = MissingValueIndicatorTransformer.Summary, + UserName = MissingValueIndicatorTransformer.FriendlyName, + ShortName = MissingValueIndicatorTransformer.ShortName, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput Indicator(IHostEnvironment env, NAIndicatorTransform.Arguments input) + public static CommonOutputs.TransformOutput Indicator(IHostEnvironment env, MissingValueIndicatorTransformer.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "NAIndicator", input); - var xf = new NAIndicatorTransform(h, input).Transform(input.Data); + var xf = new MissingValueIndicatorTransformer(h, input).Transform(input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), @@ -82,15 +81,15 @@ public static CommonOutputs.TransformOutput Indicator(IHostEnvironment env, NAIn } [TlcModule.EntryPoint(Name = "Transforms.MissingValueSubstitutor", - Desc = NAReplaceTransform.Summary, - UserName = NAReplaceTransform.FriendlyName, - ShortName = NAReplaceTransform.ShortName, + Desc = MissingValueReplacingTransformer.Summary, + UserName = MissingValueReplacingTransformer.FriendlyName, + ShortName = MissingValueReplacingTransformer.ShortName, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput Replace(IHostEnvironment env, NAReplaceTransform.Arguments input) + public static CommonOutputs.TransformOutput Replace(IHostEnvironment env, MissingValueReplacingTransformer.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "NAReplace", input); - var xf = NAReplaceTransform.Create(h, input, input.Data); + var xf = MissingValueReplacingTransformer.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), diff --git a/src/Microsoft.ML.Transforms/CategoricalTransform.cs b/src/Microsoft.ML.Transforms/OneHotEncodingTransformer.cs similarity index 83% rename from src/Microsoft.ML.Transforms/CategoricalTransform.cs rename to src/Microsoft.ML.Transforms/OneHotEncodingTransformer.cs index addd2e54a3..bfe13f91db 100644 --- a/src/Microsoft.ML.Transforms/CategoricalTransform.cs +++ b/src/Microsoft.ML.Transforms/OneHotEncodingTransformer.cs @@ -19,15 +19,15 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(CategoricalTransform.Summary, typeof(IDataTransform), typeof(CategoricalTransform), typeof(CategoricalTransform.Arguments), typeof(SignatureDataTransform), - CategoricalTransform.UserName, "CategoricalTransform", "CatTransform", "Categorical", "Cat")] +[assembly: LoadableClass(OneHotEncodingTransformer.Summary, typeof(IDataTransform), typeof(OneHotEncodingTransformer), typeof(OneHotEncodingTransformer.Arguments), typeof(SignatureDataTransform), + OneHotEncodingTransformer.UserName, "CategoricalTransform", "CatTransform", "Categorical", "Cat")] [assembly: LoadableClass(typeof(void), typeof(Categorical), null, typeof(SignatureEntryPointModule), "Categorical")] namespace Microsoft.ML.Transforms.Categorical { /// - public sealed class CategoricalTransform : ITransformer, ICanSaveModel + public sealed class OneHotEncodingTransformer : ITransformer, ICanSaveModel { public enum OutputKind : byte { @@ -56,7 +56,7 @@ public enum OutputKind : byte Bin = 4, } - public sealed class Column : TermTransform.ColumnBase + public sealed class Column : ValueToKeyMappingTransformer.ColumnBase { [Argument(ArgumentType.AtMostOnce, HelpText = "Output kind: Bag (multi-set vector), Ind (indicator vector), Key (index), or Binary encoded indicator vector", ShortName = "kind")] public OutputKind? OutputKind; @@ -98,7 +98,7 @@ public bool TryUnparse(StringBuilder sb) } } - public sealed class Arguments : TermTransform.ArgumentsBase + public sealed class Arguments : ValueToKeyMappingTransformer.ArgumentsBase { [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "New column definition(s) (optional form: name:src)", ShortName = "col", SortOrder = 1)] public Column[] Column; @@ -146,7 +146,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV private readonly TransformerChain _transformer; - public CategoricalTransform(ValueToKeyMappingEstimator term, IEstimator toVector, IDataView input) + public OneHotEncodingTransformer(ValueToKeyMappingEstimator term, IEstimator toVector, IDataView input) { if (toVector != null) _transformer = term.Append(toVector).Fit(input); @@ -167,18 +167,18 @@ public CategoricalTransform(ValueToKeyMappingEstimator term, IEstimator /// Estimator which takes set of columns and produce for each column indicator array. /// - public sealed class OneHotEncodingEstimator : IEstimator + public sealed class OneHotEncodingEstimator : IEstimator { internal static class Defaults { - public const CategoricalTransform.OutputKind OutKind = CategoricalTransform.OutputKind.Ind; + public const OneHotEncodingTransformer.OutputKind OutKind = OneHotEncodingTransformer.OutputKind.Ind; } - public class ColumnInfo : TermTransform.ColumnInfo + public class ColumnInfo : ValueToKeyMappingTransformer.ColumnInfo { - public readonly CategoricalTransform.OutputKind OutputKind; - public ColumnInfo(string input, string output, CategoricalTransform.OutputKind outputKind = Defaults.OutKind, - int maxNumTerms = ValueToKeyMappingEstimator.Defaults.MaxNumTerms, TermTransform.SortOrder sort = ValueToKeyMappingEstimator.Defaults.Sort, + public readonly OneHotEncodingTransformer.OutputKind OutputKind; + public ColumnInfo(string input, string output, OneHotEncodingTransformer.OutputKind outputKind = Defaults.OutKind, + int maxNumTerms = ValueToKeyMappingEstimator.Defaults.MaxNumTerms, ValueToKeyMappingTransformer.SortOrder sort = ValueToKeyMappingEstimator.Defaults.Sort, string[] term = null) : base(input, output, maxNumTerms, sort, term, true) { @@ -202,7 +202,7 @@ internal void SetTerms(string terms) /// Name of the output column. If this is null, is used. /// The type of output expected. public OneHotEncodingEstimator(IHostEnvironment env, string inputColumn, - string outputColumn = null, CategoricalTransform.OutputKind outputKind = Defaults.OutKind) + string outputColumn = null, OneHotEncodingTransformer.OutputKind outputKind = Defaults.OutKind) : this(env, new[] { new ColumnInfo(inputColumn, outputColumn ?? inputColumn, outputKind) }) { } @@ -219,20 +219,20 @@ public OneHotEncodingEstimator(IHostEnvironment env, ColumnInfo[] columns, for (int i = 0; i < columns.Length; i++) { var column = columns[i]; - CategoricalTransform.OutputKind kind = columns[i].OutputKind; + OneHotEncodingTransformer.OutputKind kind = columns[i].OutputKind; switch (kind) { default: throw _host.ExceptUserArg(nameof(column.OutputKind)); - case CategoricalTransform.OutputKind.Key: + case OneHotEncodingTransformer.OutputKind.Key: continue; - case CategoricalTransform.OutputKind.Bin: + case OneHotEncodingTransformer.OutputKind.Bin: binaryCols.Add((column.Output, column.Output)); break; - case CategoricalTransform.OutputKind.Ind: + case OneHotEncodingTransformer.OutputKind.Ind: cols.Add((column.Output, column.Output, false)); break; - case CategoricalTransform.OutputKind.Bag: + case OneHotEncodingTransformer.OutputKind.Bag: cols.Add((column.Output, column.Output, true)); break; } @@ -240,9 +240,9 @@ public OneHotEncodingEstimator(IHostEnvironment env, ColumnInfo[] columns, IEstimator toBinVector = null; IEstimator toVector = null; if (binaryCols.Count > 0) - toBinVector = new KeyToBinaryVectorMappingEstimator(_host, binaryCols.Select(x => new KeyToBinaryVectorTransform.ColumnInfo(x.input, x.output)).ToArray()); + toBinVector = new KeyToBinaryVectorMappingEstimator(_host, binaryCols.Select(x => new KeyToBinaryVectorMappingTransformer.ColumnInfo(x.input, x.output)).ToArray()); if (cols.Count > 0) - toVector = new KeyToVectorMappingEstimator(_host, cols.Select(x => new KeyToVectorTransform.ColumnInfo(x.input, x.output, x.bag)).ToArray()); + toVector = new KeyToVectorMappingEstimator(_host, cols.Select(x => new KeyToVectorMappingTransformer.ColumnInfo(x.input, x.output, x.bag)).ToArray()); if (toBinVector != null && toVector != null) _toSomething = toVector.Append(toBinVector); @@ -257,9 +257,9 @@ public OneHotEncodingEstimator(IHostEnvironment env, ColumnInfo[] columns, public SchemaShape GetOutputSchema(SchemaShape inputSchema) => _term.Append(_toSomething).GetOutputSchema(inputSchema); - public CategoricalTransform Fit(IDataView input) => new CategoricalTransform(_term, _toSomething, input); + public OneHotEncodingTransformer Fit(IDataView input) => new OneHotEncodingTransformer(_term, _toSomething, input); - internal void WrapTermWithDelegate(Action onFit) + internal void WrapTermWithDelegate(Action onFit) { _term = (ValueToKeyMappingEstimator)_term.WithOnFitDelegate(onFit); } @@ -268,65 +268,65 @@ internal void WrapTermWithDelegate(Action onFit) public static class Categorical { [TlcModule.EntryPoint(Name = "Transforms.CategoricalOneHotVectorizer", - Desc = CategoricalTransform.Summary, - UserName = CategoricalTransform.UserName, + Desc = OneHotEncodingTransformer.Summary, + UserName = OneHotEncodingTransformer.UserName, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput CatTransformDict(IHostEnvironment env, CategoricalTransform.Arguments input) + public static CommonOutputs.TransformOutput CatTransformDict(IHostEnvironment env, OneHotEncodingTransformer.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("CatTransformDict"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = CategoricalTransform.Create(host, input, input.Data); + var xf = OneHotEncodingTransformer.Create(host, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } [TlcModule.EntryPoint(Name = "Transforms.CategoricalHashOneHotVectorizer", - Desc = CategoricalHashTransform.Summary, - UserName = CategoricalHashTransform.UserName, + Desc = OneHotHashEncodingTransformer.Summary, + UserName = OneHotHashEncodingTransformer.UserName, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput CatTransformHash(IHostEnvironment env, CategoricalHashTransform.Arguments input) + public static CommonOutputs.TransformOutput CatTransformHash(IHostEnvironment env, OneHotHashEncodingTransformer.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("CatTransformDict"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = CategoricalHashTransform.Create(host, input, input.Data); + var xf = OneHotHashEncodingTransformer.Create(host, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } [TlcModule.EntryPoint(Name = "Transforms.TextToKeyConverter", - Desc = TermTransform.Summary, - UserName = TermTransform.FriendlyName, + Desc = ValueToKeyMappingTransformer.Summary, + UserName = ValueToKeyMappingTransformer.FriendlyName, XmlInclude = new[] { @"", @"" })] - public static CommonOutputs.TransformOutput TextToKey(IHostEnvironment env, TermTransform.Arguments input) + public static CommonOutputs.TransformOutput TextToKey(IHostEnvironment env, ValueToKeyMappingTransformer.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("Term"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = TermTransform.Create(host, input, input.Data); + var xf = ValueToKeyMappingTransformer.Create(host, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } [TlcModule.EntryPoint(Name = "Transforms.KeyToTextConverter", Desc = "KeyToValueTransform utilizes KeyValues metadata to map key indices to the corresponding values in the KeyValues metadata.", - UserName = KeyToValueTransform.UserName, + UserName = KeyToValueMappingTransformer.UserName, XmlInclude = new[] { @"" })] - public static CommonOutputs.TransformOutput KeyToText(IHostEnvironment env, KeyToValueTransform.Arguments input) + public static CommonOutputs.TransformOutput KeyToText(IHostEnvironment env, KeyToValueMappingTransformer.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("KeyToValue"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = KeyToValueTransform.Create(host, input, input.Data); + var xf = KeyToValueMappingTransformer.Create(host, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } } @@ -373,9 +373,9 @@ private readonly struct Config public readonly KeyValueOrder Order; public readonly int Max; public readonly OneHotVectorOutputKind OutputKind; - public readonly Action OnFit; + public readonly Action OnFit; - public Config(OneHotVectorOutputKind outputKind, KeyValueOrder order, int max, Action onFit) + public Config(OneHotVectorOutputKind outputKind, KeyValueOrder order, int max, Action onFit) { OutputKind = outputKind; Order = order; @@ -384,7 +384,7 @@ public Config(OneHotVectorOutputKind outputKind, KeyValueOrder order, int max, A } } - private static Action Wrap(ToKeyFitResult.OnFit onFit) + private static Action Wrap(ToKeyFitResult.OnFit onFit) { if (onFit == null) return null; @@ -430,12 +430,12 @@ public override IEstimator Reconcile(IHostEnvironment env, Pipelin IReadOnlyDictionary inputNames, IReadOnlyDictionary outputNames, IReadOnlyCollection usedNames) { var infos = new OneHotEncodingEstimator.ColumnInfo[toOutput.Length]; - Action onFit = null; + Action onFit = null; for (int i = 0; i < toOutput.Length; ++i) { var tcol = (ICategoricalCol)toOutput[i]; - infos[i] = new OneHotEncodingEstimator.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], (CategoricalTransform.OutputKind)tcol.Config.OutputKind, - tcol.Config.Max, (TermTransform.SortOrder)tcol.Config.Order); + infos[i] = new OneHotEncodingEstimator.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], (OneHotEncodingTransformer.OutputKind)tcol.Config.OutputKind, + tcol.Config.Max, (ValueToKeyMappingTransformer.SortOrder)tcol.Config.Order); if (tcol.Config.OnFit != null) { int ii = i; // Necessary because if we capture i that will change to toOutput.Length on call. diff --git a/src/Microsoft.ML.Transforms/CategoricalHashTransform.cs b/src/Microsoft.ML.Transforms/OneHotHashEncodingTransformer.cs similarity index 85% rename from src/Microsoft.ML.Transforms/CategoricalHashTransform.cs rename to src/Microsoft.ML.Transforms/OneHotHashEncodingTransformer.cs index 24a800024c..8bd7856c7e 100644 --- a/src/Microsoft.ML.Transforms/CategoricalHashTransform.cs +++ b/src/Microsoft.ML.Transforms/OneHotHashEncodingTransformer.cs @@ -17,12 +17,12 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(CategoricalHashTransform.Summary, typeof(IDataTransform), typeof(CategoricalHashTransform), typeof(CategoricalHashTransform.Arguments), typeof(SignatureDataTransform), - CategoricalHashTransform.UserName, "CategoricalHashTransform", "CatHashTransform", "CategoricalHash", "CatHash")] +[assembly: LoadableClass(OneHotHashEncodingTransformer.Summary, typeof(IDataTransform), typeof(OneHotHashEncodingTransformer), typeof(OneHotHashEncodingTransformer.Arguments), typeof(SignatureDataTransform), + OneHotHashEncodingTransformer.UserName, "CategoricalHashTransform", "CatHashTransform", "CategoricalHash", "CatHash")] namespace Microsoft.ML.Transforms.Categorical { - public sealed class CategoricalHashTransform : ITransformer, ICanSaveModel + public sealed class OneHotHashEncodingTransformer : ITransformer, ICanSaveModel { public sealed class Column : OneToOneColumn { @@ -44,7 +44,7 @@ public sealed class Column : OneToOneColumn [Argument(ArgumentType.AtMostOnce, HelpText = "Output kind: Bag (multi-set vector), Ind (indicator vector), or Key (index)", ShortName = "kind", SortOrder = 102)] - public CategoricalTransform.OutputKind? OutputKind; + public OneHotEncodingTransformer.OutputKind? OutputKind; public static Column Parse(string str) { @@ -90,11 +90,11 @@ private static class Defaults public const uint Seed = 314489979; public const bool Ordered = true; public const int InvertHash = 0; - public const CategoricalTransform.OutputKind OutputKind = CategoricalTransform.OutputKind.Bag; + public const OneHotEncodingTransformer.OutputKind OutputKind = OneHotEncodingTransformer.OutputKind.Bag; } /// - /// This class is a merger of and + /// This class is a merger of and /// with join option removed /// public sealed class Arguments : TransformInputBase @@ -119,7 +119,7 @@ public sealed class Arguments : TransformInputBase [Argument(ArgumentType.AtMostOnce, HelpText = "Output kind: Bag (multi-set vector), Ind (indicator vector), or Key (index)", ShortName = "kind", SortOrder = 102)] - public CategoricalTransform.OutputKind OutputKind = Defaults.OutputKind; + public OneHotEncodingTransformer.OutputKind OutputKind = Defaults.OutputKind; } internal const string Summary = "Converts the categorical value into an indicator array by hashing the value and using the hash as an index in the " @@ -128,7 +128,7 @@ public sealed class Arguments : TransformInputBase public const string UserName = "Categorical Hash Transform"; /// - /// A helper method to create . + /// A helper method to create . /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -143,9 +143,9 @@ public static IDataView Create(IHostEnvironment env, string source = null, int hashBits = OneHotHashEncodingEstimator.Defaults.HashBits, int invertHash = OneHotHashEncodingEstimator.Defaults.InvertHash, - CategoricalTransform.OutputKind outputKind = OneHotHashEncodingEstimator.Defaults.OutputKind) + OneHotEncodingTransformer.OutputKind outputKind = OneHotHashEncodingEstimator.Defaults.OutputKind) { - return new OneHotHashEncodingEstimator(env, name, source, outputKind).Fit(input).Transform(input) as IDataView; + return new OneHotHashEncodingEstimator(env, name, source, hashBits, invertHash, outputKind).Fit(input).Transform(input) as IDataView; } internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) @@ -174,7 +174,7 @@ internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDat private readonly TransformerChain _transformer; - internal CategoricalHashTransform(HashingEstimator hash, IEstimator keyToVector, IDataView input) + internal OneHotHashEncodingTransformer(HashingEstimator hash, IEstimator keyToVector, IDataView input) { var chain = hash.Append(keyToVector); _transformer = chain.Fit(input); @@ -194,7 +194,7 @@ internal CategoricalHashTransform(HashingEstimator hash, IEstimator /// Estimator which takes set of columns and produce for each column indicator array. Use hashing to determine indicator position. ///
- public sealed class OneHotHashEncodingEstimator : IEstimator + public sealed class OneHotHashEncodingEstimator : IEstimator { internal static class Defaults { @@ -202,13 +202,13 @@ internal static class Defaults public const uint Seed = 314489979; public const bool Ordered = true; public const int InvertHash = 0; - public const CategoricalTransform.OutputKind OutputKind = CategoricalTransform.OutputKind.Bag; + public const OneHotEncodingTransformer.OutputKind OutputKind = OneHotEncodingTransformer.OutputKind.Bag; } public sealed class ColumnInfo { - public readonly HashTransformer.ColumnInfo HashInfo; - public readonly CategoricalTransform.OutputKind OutputKind; + public readonly HashingTransformer.ColumnInfo HashInfo; + public readonly OneHotEncodingTransformer.OutputKind OutputKind; /// /// Describes how the transformer handles one column pair. @@ -221,13 +221,13 @@ public sealed class ColumnInfo /// Whether the position of each term should be included in the hash. /// Limit the number of keys used to generate the slot name to this many. 0 means no invert hashing, -1 means no limit. public ColumnInfo(string input, string output, - CategoricalTransform.OutputKind outputKind = Defaults.OutputKind, + OneHotEncodingTransformer.OutputKind outputKind = Defaults.OutputKind, int hashBits = Defaults.HashBits, uint seed = Defaults.Seed, bool ordered = Defaults.Ordered, int invertHash = Defaults.InvertHash) { - HashInfo = new HashTransformer.ColumnInfo(input, output, hashBits, seed, ordered, invertHash); + HashInfo = new HashingTransformer.ColumnInfo(input, output, hashBits, seed, ordered, invertHash); OutputKind = outputKind; } } @@ -240,10 +240,16 @@ public ColumnInfo(string input, string output, /// Host Environment. /// Name of the input column. /// Name of the output column. If this is null '' will be used. + /// Number of bits to hash into. Must be between 1 and 30, inclusive. + /// Limit the number of keys used to generate the slot name to this many. 0 means no invert hashing, -1 means no limit. /// The type of output expected. - public OneHotHashEncodingEstimator(IHostEnvironment env, string inputColumn, - string outputColumn = null, CategoricalTransform.OutputKind outputKind = Defaults.OutputKind) - : this(env, new ColumnInfo(inputColumn, outputColumn ?? inputColumn, outputKind)) + public OneHotHashEncodingEstimator(IHostEnvironment env, + string inputColumn, + string outputColumn, + int hashBits = OneHotHashEncodingEstimator.Defaults.HashBits, + int invertHash = OneHotHashEncodingEstimator.Defaults.InvertHash, + OneHotEncodingTransformer.OutputKind outputKind = Defaults.OutputKind) + : this(env, new ColumnInfo(inputColumn, outputColumn ?? inputColumn, outputKind, hashBits, invertHash: invertHash)) { } @@ -259,22 +265,22 @@ public OneHotHashEncodingEstimator(IHostEnvironment env, params ColumnInfo[] col for (int i = 0; i < columns.Length; i++) { var column = columns[i]; - CategoricalTransform.OutputKind kind = columns[i].OutputKind; + OneHotEncodingTransformer.OutputKind kind = columns[i].OutputKind; switch (kind) { default: throw _host.ExceptUserArg(nameof(column.OutputKind)); - case CategoricalTransform.OutputKind.Key: + case OneHotEncodingTransformer.OutputKind.Key: continue; - case CategoricalTransform.OutputKind.Bin: + case OneHotEncodingTransformer.OutputKind.Bin: if ((column.HashInfo.InvertHash) != 0) ch.Warning("Invert hashing is being used with binary encoding."); binaryCols.Add((column.HashInfo.Output, column.HashInfo.Output)); break; - case CategoricalTransform.OutputKind.Ind: + case OneHotEncodingTransformer.OutputKind.Ind: cols.Add((column.HashInfo.Output, column.HashInfo.Output, false)); break; - case CategoricalTransform.OutputKind.Bag: + case OneHotEncodingTransformer.OutputKind.Bag: cols.Add((column.HashInfo.Output, column.HashInfo.Output, true)); break; } @@ -282,9 +288,9 @@ public OneHotHashEncodingEstimator(IHostEnvironment env, params ColumnInfo[] col IEstimator toBinVector = null; IEstimator toVector = null; if (binaryCols.Count > 0) - toBinVector = new KeyToBinaryVectorMappingEstimator(_host, binaryCols.Select(x => new KeyToBinaryVectorTransform.ColumnInfo(x.input, x.output)).ToArray()); + toBinVector = new KeyToBinaryVectorMappingEstimator(_host, binaryCols.Select(x => new KeyToBinaryVectorMappingTransformer.ColumnInfo(x.input, x.output)).ToArray()); if (cols.Count > 0) - toVector = new KeyToVectorMappingEstimator(_host, cols.Select(x => new KeyToVectorTransform.ColumnInfo(x.input, x.output, x.bag)).ToArray()); + toVector = new KeyToVectorMappingEstimator(_host, cols.Select(x => new KeyToVectorMappingTransformer.ColumnInfo(x.input, x.output, x.bag)).ToArray()); if (toBinVector != null && toVector != null) _toSomething = toVector.Append(toBinVector); @@ -300,7 +306,7 @@ public OneHotHashEncodingEstimator(IHostEnvironment env, params ColumnInfo[] col public SchemaShape GetOutputSchema(SchemaShape inputSchema) => _hash.Append(_toSomething).GetOutputSchema(inputSchema); - public CategoricalHashTransform Fit(IDataView input) => new CategoricalHashTransform(_hash, _toSomething, input); + public OneHotHashEncodingTransformer Fit(IDataView input) => new OneHotHashEncodingTransformer(_hash, _toSomething, input); } public static class CategoricalHashStaticExtensions @@ -399,7 +405,7 @@ public override IEstimator Reconcile(IHostEnvironment env, Pipelin for (int i = 0; i < toOutput.Length; ++i) { var tcol = (ICategoricalCol)toOutput[i]; - infos[i] = new OneHotHashEncodingEstimator.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], (CategoricalTransform.OutputKind)tcol.Config.OutputKind, + infos[i] = new OneHotHashEncodingEstimator.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], (OneHotEncodingTransformer.OutputKind)tcol.Config.OutputKind, tcol.Config.HashBits, tcol.Config.Seed, tcol.Config.Ordered, tcol.Config.InvertHash); } return new OneHotHashEncodingEstimator(env, infos); diff --git a/src/Microsoft.ML.Transforms/OptionalColumnTransform.cs b/src/Microsoft.ML.Transforms/OptionalColumnTransform.cs index 8139f3da01..d3e4cbefc0 100644 --- a/src/Microsoft.ML.Transforms/OptionalColumnTransform.cs +++ b/src/Microsoft.ML.Transforms/OptionalColumnTransform.cs @@ -235,7 +235,7 @@ private static VersionInfo GetVersionInfo() private const string RegistrationName = "OptionalColumn"; /// - /// Convenience constructor for public facing API. + /// Initializes a new instance of . /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -398,7 +398,8 @@ private Delegate MakeGetterOne() private Delegate MakeGetterVec(int length) { - return (ValueGetter>)((ref VBuffer value) => value = new VBuffer(length, 0, value.Values, value.Indices)); + return (ValueGetter>)((ref VBuffer value) => + VBufferUtils.Resize(ref value, length, 0)); } private sealed class RowCursor : SynchronizedCursorBase, IRowCursor @@ -467,7 +468,8 @@ private Delegate MakeGetterOne() private Delegate MakeGetterVec(int length) { - return (ValueGetter>)((ref VBuffer value) => value = new VBuffer(length, 0, value.Values, value.Indices)); + return (ValueGetter>)((ref VBuffer value) => + VBufferUtils.Resize(ref value, length, 0)); } } diff --git a/src/Microsoft.ML.Transforms/ProjectionCatalog.cs b/src/Microsoft.ML.Transforms/ProjectionCatalog.cs index ff182e46d6..1460613981 100644 --- a/src/Microsoft.ML.Transforms/ProjectionCatalog.cs +++ b/src/Microsoft.ML.Transforms/ProjectionCatalog.cs @@ -11,13 +11,20 @@ namespace Microsoft.ML public static class ProjectionCatalog { /// - /// Initializes a new instance of . + /// Takes column filled with a vector of floats and maps its to a random low-dimensional feature space. /// /// The transform's catalog. /// Name of the column to be transformed. /// Name of the output column. If this is null '' will be used. /// The number of random Fourier features to create. /// Create two features for every random Fourier frequency? (one for cos and one for sin). + /// + /// + /// + /// + /// public static RandomFourierFeaturizingEstimator CreateRandomFourierFeatures(this TransformsCatalog.ProjectionTransforms catalog, string inputColumn, string outputColumn = null, @@ -26,11 +33,68 @@ public static RandomFourierFeaturizingEstimator CreateRandomFourierFeatures(this => new RandomFourierFeaturizingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, newDim, useSin); /// - /// Initializes a new instance of . + /// Takes columns filled with a vector of floats and maps its to a random low-dimensional feature space. /// /// The transform's catalog. /// The input columns to use for the transformation. - public static RandomFourierFeaturizingEstimator CreateRandomFourierFeatures(this TransformsCatalog.ProjectionTransforms catalog, params RffTransform.ColumnInfo[] columns) + public static RandomFourierFeaturizingEstimator CreateRandomFourierFeatures(this TransformsCatalog.ProjectionTransforms catalog, params RandomFourierFeaturizingTransformer.ColumnInfo[] columns) => new RandomFourierFeaturizingEstimator(CatalogUtils.GetEnvironment(catalog), columns); + + /// + /// Takes column filled with a vector of floats and computes L-p norm of it. + /// + /// The transform's catalog. + /// Name of the input column. + /// Name of the column resulting from the transformation of . Null means is replaced. + /// Type of norm to use to normalize each sample. + /// Subtract mean from each value before normalizing. + /// + /// + /// + /// + /// + public static LpNormalizingEstimator LpNormalize(this TransformsCatalog.ProjectionTransforms catalog, string inputColumn, string outputColumn =null, + LpNormalizingEstimatorBase.NormalizerKind normKind = LpNormalizingEstimatorBase.Defaults.NormKind, bool subMean = LpNormalizingEstimatorBase.Defaults.LpSubstractMean) + => new LpNormalizingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, normKind, subMean); + + /// + /// Takes columns filled with a vector of floats and computes L-p norm of it. + /// + /// The transform's catalog. + /// Describes the parameters of the lp-normalization process for each column pair. + public static LpNormalizingEstimator LpNormalize(this TransformsCatalog.ProjectionTransforms catalog, params LpNormalizingTransformer.LpNormColumnInfo[] columns) + => new LpNormalizingEstimator(CatalogUtils.GetEnvironment(catalog), columns); + + /// + /// Takes column filled with a vector of floats and computes global contrast normalization of it. + /// + /// The transform's catalog. + /// Name of the input column. + /// Name of the column resulting from the transformation of . Null means is replaced. + /// Subtract mean from each value before normalizing. + /// Normalize by standard deviation rather than L2 norm. + /// Scale features by this value. + /// + /// + /// + /// + /// + public static GlobalContrastNormalizingEstimator GlobalContrastNormalize(this TransformsCatalog.ProjectionTransforms catalog, string inputColumn, string outputColumn = null, + bool substractMean = LpNormalizingEstimatorBase.Defaults.GcnSubstractMean, + bool useStdDev = LpNormalizingEstimatorBase.Defaults.UseStdDev, + float scale = LpNormalizingEstimatorBase.Defaults.Scale) + => new GlobalContrastNormalizingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, substractMean, useStdDev, scale); + + /// + /// Takes columns filled with a vector of floats and computes global contrast normalization of it. + /// + /// The transform's catalog. + /// Describes the parameters of the gcn-normaliztion process for each column pair. + public static GlobalContrastNormalizingEstimator GlobalContrastNormalize(this TransformsCatalog.ProjectionTransforms catalog, params LpNormalizingTransformer.GcnColumnInfo[] columns) + => new GlobalContrastNormalizingEstimator(CatalogUtils.GetEnvironment(catalog), columns); } } diff --git a/src/Microsoft.ML.Transforms/RffTransform.cs b/src/Microsoft.ML.Transforms/RandomFourierFeaturizing.cs similarity index 89% rename from src/Microsoft.ML.Transforms/RffTransform.cs rename to src/Microsoft.ML.Transforms/RandomFourierFeaturizing.cs index cd2623e05f..020d96883f 100644 --- a/src/Microsoft.ML.Transforms/RffTransform.cs +++ b/src/Microsoft.ML.Transforms/RandomFourierFeaturizing.cs @@ -18,21 +18,21 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(RffTransform.Summary, typeof(IDataTransform), typeof(RffTransform), typeof(RffTransform.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(RandomFourierFeaturizingTransformer.Summary, typeof(IDataTransform), typeof(RandomFourierFeaturizingTransformer), typeof(RandomFourierFeaturizingTransformer.Arguments), typeof(SignatureDataTransform), "Random Fourier Features Transform", "RffTransform", "Rff")] -[assembly: LoadableClass(RffTransform.Summary, typeof(IDataTransform), typeof(RffTransform), null, typeof(SignatureLoadDataTransform), - "Random Fourier Features Transform", RffTransform.LoaderSignature)] +[assembly: LoadableClass(RandomFourierFeaturizingTransformer.Summary, typeof(IDataTransform), typeof(RandomFourierFeaturizingTransformer), null, typeof(SignatureLoadDataTransform), + "Random Fourier Features Transform", RandomFourierFeaturizingTransformer.LoaderSignature)] -[assembly: LoadableClass(RffTransform.Summary, typeof(RffTransform), null, typeof(SignatureLoadModel), - "Random Fourier Features Transform", RffTransform.LoaderSignature)] +[assembly: LoadableClass(RandomFourierFeaturizingTransformer.Summary, typeof(RandomFourierFeaturizingTransformer), null, typeof(SignatureLoadModel), + "Random Fourier Features Transform", RandomFourierFeaturizingTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(RffTransform), null, typeof(SignatureLoadRowMapper), - "Random Fourier Features Transform", RffTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(RandomFourierFeaturizingTransformer), null, typeof(SignatureLoadRowMapper), + "Random Fourier Features Transform", RandomFourierFeaturizingTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Projections { - public sealed class RffTransform : OneToOneTransformerBase + public sealed class RandomFourierFeaturizingTransformer : OneToOneTransformerBase { public sealed class Arguments { @@ -219,7 +219,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(RffTransform).Assembly.FullName); + loaderAssemblyName: typeof(RandomFourierFeaturizingTransformer).Assembly.FullName); } private readonly TransformInfo[] _transformInfos; @@ -280,8 +280,8 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo new VectorType(NumberType.Float, _transformInfos[col].SrcDim).ToString(), type.ToString()); } - public RffTransform(IHostEnvironment env, IDataView input, ColumnInfo[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(RffTransform)), GetColumnPairs(columns)) + public RandomFourierFeaturizingTransformer(IHostEnvironment env, IDataView input, ColumnInfo[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(RandomFourierFeaturizingTransformer)), GetColumnPairs(columns)) { var avgDistances = GetAvgDistances(columns, input); _transformInfos = new TransformInfo[columns.Length]; @@ -432,7 +432,7 @@ private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); - private RffTransform(IHost host, ModelLoadContext ctx) + private RandomFourierFeaturizingTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) { // *** Binary format *** @@ -463,7 +463,7 @@ private static IDataTransform Create(IHostEnvironment env, Arguments args, IData for (int i = 0; i < cols.Length; i++) { var item = args.Column[i]; - cols[i] = new ColumnInfo(item.Source, + cols[i] = new ColumnInfo(item.Source ?? item.Name, item.Name, item.NewDim ?? args.NewDim, item.UseSin ?? args.UseSin, @@ -471,14 +471,14 @@ private static IDataTransform Create(IHostEnvironment env, Arguments args, IData item.Seed ?? args.Seed); }; } - return new RffTransform(env, input, cols).MakeDataTransform(input); + return new RandomFourierFeaturizingTransformer(env, input, cols).MakeDataTransform(input); } // Factory method for SignatureLoadModel. - private static RffTransform Create(IHostEnvironment env, ModelLoadContext ctx) + private static RandomFourierFeaturizingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); - var host = env.Register(nameof(RffTransform)); + var host = env.Register(nameof(RandomFourierFeaturizingTransformer)); host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); @@ -487,7 +487,7 @@ private static RffTransform Create(IHostEnvironment env, ModelLoadContext ctx) int cbFloat = ctx.Reader.ReadInt32(); env.CheckDecode(cbFloat == sizeof(float)); } - return new RffTransform(host, ctx); + return new RandomFourierFeaturizingTransformer(host, ctx); } public override void Save(ModelSaveContext ctx) @@ -506,14 +506,14 @@ public override void Save(ModelSaveContext ctx) protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : MapperBase + private sealed class Mapper : OneToOneMapperBase { private readonly ColumnType[] _srcTypes; private readonly int[] _srcCols; private readonly ColumnType[] _types; - private readonly RffTransform _parent; + private readonly RandomFourierFeaturizingTransformer _parent; - public Mapper(RffTransform parent, Schema inputSchema) + public Mapper(RandomFourierFeaturizingTransformer parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -531,7 +531,7 @@ public Mapper(RffTransform parent, Schema inputSchema) } } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -539,7 +539,7 @@ public override Schema.Column[] GetOutputColumns() return result; } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); @@ -580,7 +580,7 @@ private ValueGetter> GetterFromFloatType(IRow input, int iinfo) (ref VBuffer dst) => { getSrc(ref src); - oneDimensionalVector.Values[0] = src; + VBufferEditor.CreateFromBuffer(ref oneDimensionalVector).Values[0] = src; TransformFeatures(in oneDimensionalVector, ref dst, _parent._transformInfos[iinfo], featuresAligned, productAligned); }; } @@ -590,24 +590,22 @@ private void TransformFeatures(in VBuffer src, ref VBuffer dst, Tr { Host.Check(src.Length == transformInfo.SrcDim, "column does not have the expected dimensionality."); - var values = dst.Values; float scale; + int newDstLength; if (transformInfo.RotationTerms != null) { - if (Utils.Size(values) < transformInfo.NewDim) - values = new float[transformInfo.NewDim]; + newDstLength = transformInfo.NewDim; scale = MathUtils.Sqrt(2.0f / transformInfo.NewDim); } else { - if (Utils.Size(values) < 2 * transformInfo.NewDim) - values = new float[2 * transformInfo.NewDim]; + newDstLength = 2 * transformInfo.NewDim; scale = MathUtils.Sqrt(1.0f / transformInfo.NewDim); } if (src.IsDense) { - featuresAligned.CopyFrom(src.Values, 0, src.Length); + featuresAligned.CopyFrom(src.GetValues()); CpuMathUtils.MatrixTimesSource(false, transformInfo.RndFourierVectors, featuresAligned, productAligned, transformInfo.NewDim); } @@ -615,25 +613,27 @@ private void TransformFeatures(in VBuffer src, ref VBuffer dst, Tr { // This overload of MatTimesSrc ignores the values in slots that are not in src.Indices, so there is // no need to zero them out. - featuresAligned.CopyFrom(src.Indices, src.Values, 0, 0, src.Count, zeroItems: false); - CpuMathUtils.MatrixTimesSource(transformInfo.RndFourierVectors, src.Indices, featuresAligned, 0, 0, - src.Count, productAligned, transformInfo.NewDim); + var srcValues = src.GetValues(); + var srcIndices = src.GetIndices(); + featuresAligned.CopyFrom(srcIndices, srcValues, 0, 0, srcValues.Length, zeroItems: false); + CpuMathUtils.MatrixTimesSource(transformInfo.RndFourierVectors, srcIndices, featuresAligned, 0, 0, + srcValues.Length, productAligned, transformInfo.NewDim); } + var dstEditor = VBufferEditor.Create(ref dst, newDstLength); for (int i = 0; i < transformInfo.NewDim; i++) { var dotProduct = productAligned[i]; if (transformInfo.RotationTerms != null) - values[i] = (float)MathUtils.Cos(dotProduct + transformInfo.RotationTerms[i]) * scale; + dstEditor.Values[i] = (float)MathUtils.Cos(dotProduct + transformInfo.RotationTerms[i]) * scale; else { - values[2 * i] = (float)MathUtils.Cos(dotProduct) * scale; - values[2 * i + 1] = (float)MathUtils.Sin(dotProduct) * scale; + dstEditor.Values[2 * i] = (float)MathUtils.Cos(dotProduct) * scale; + dstEditor.Values[2 * i + 1] = (float)MathUtils.Sin(dotProduct) * scale; } } - dst = new VBuffer(transformInfo.RotationTerms == null ? 2 * transformInfo.NewDim : transformInfo.NewDim, - values, dst.Indices); + dst = dstEditor.Commit(); } } } @@ -641,7 +641,7 @@ private void TransformFeatures(in VBuffer src, ref VBuffer dst, Tr /// /// Estimator which takes set of vector columns and maps its input to a random low-dimensional feature space. /// - public sealed class RandomFourierFeaturizingEstimator : IEstimator + public sealed class RandomFourierFeaturizingEstimator : IEstimator { internal static class Defaults { @@ -650,7 +650,7 @@ internal static class Defaults } private readonly IHost _host; - private readonly RffTransform.ColumnInfo[] _columns; + private readonly RandomFourierFeaturizingTransformer.ColumnInfo[] _columns; /// /// Convinence constructor for simple one column case @@ -661,18 +661,18 @@ internal static class Defaults /// The number of random Fourier features to create. /// Create two features for every random Fourier frequency? (one for cos and one for sin). public RandomFourierFeaturizingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, int newDim = Defaults.NewDim, bool useSin = Defaults.UseSin) - : this(env, new RffTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn, newDim, useSin)) + : this(env, new RandomFourierFeaturizingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn, newDim, useSin)) { } - public RandomFourierFeaturizingEstimator(IHostEnvironment env, params RffTransform.ColumnInfo[] columns) + public RandomFourierFeaturizingEstimator(IHostEnvironment env, params RandomFourierFeaturizingTransformer.ColumnInfo[] columns) { Contracts.CheckValue(env, nameof(env)); _host = env.Register(nameof(RandomFourierFeaturizingEstimator)); _columns = columns; } - public RffTransform Fit(IDataView input) => new RffTransform(_host, input, _columns); + public RandomFourierFeaturizingTransformer Fit(IDataView input) => new RandomFourierFeaturizingTransformer(_host, input, _columns); public SchemaShape GetOutputSchema(SchemaShape inputSchema) { @@ -733,11 +733,11 @@ private sealed class Reconciler : EstimatorReconciler public override IEstimator Reconcile(IHostEnvironment env, PipelineColumn[] toOutput, IReadOnlyDictionary inputNames, IReadOnlyDictionary outputNames, IReadOnlyCollection usedNames) { - var infos = new RffTransform.ColumnInfo[toOutput.Length]; + var infos = new RandomFourierFeaturizingTransformer.ColumnInfo[toOutput.Length]; for (int i = 0; i < toOutput.Length; ++i) { var tcol = (IColInput)toOutput[i]; - infos[i] = new RffTransform.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], tcol.Config.NewDim, tcol.Config.UseSin, tcol.Config.Generator, tcol.Config.Seed); + infos[i] = new RandomFourierFeaturizingTransformer.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], tcol.Config.NewDim, tcol.Config.UseSin, tcol.Config.Generator, tcol.Config.Seed); } return new RandomFourierFeaturizingEstimator(env, infos); } diff --git a/src/Microsoft.ML.Transforms/TermLookupTransform.cs b/src/Microsoft.ML.Transforms/TermLookupTransformer.cs similarity index 95% rename from src/Microsoft.ML.Transforms/TermLookupTransform.cs rename to src/Microsoft.ML.Transforms/TermLookupTransformer.cs index 14fc80322a..bc46943263 100644 --- a/src/Microsoft.ML.Transforms/TermLookupTransform.cs +++ b/src/Microsoft.ML.Transforms/TermLookupTransformer.cs @@ -16,11 +16,11 @@ using System.Reflection; using System.Text; -[assembly: LoadableClass(TermLookupTransform.Summary, typeof(TermLookupTransform), typeof(TermLookupTransform.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(TermLookupTransformer.Summary, typeof(TermLookupTransformer), typeof(TermLookupTransformer.Arguments), typeof(SignatureDataTransform), "Term Lookup Transform", "TermLookup", "Lookup", "LookupTransform", "TermLookupTransform")] -[assembly: LoadableClass(TermLookupTransform.Summary, typeof(TermLookupTransform), null, typeof(SignatureLoadDataTransform), - "Term Lookup Transform", TermLookupTransform.LoaderSignature)] +[assembly: LoadableClass(TermLookupTransformer.Summary, typeof(TermLookupTransformer), null, typeof(SignatureLoadDataTransform), + "Term Lookup Transform", TermLookupTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Categorical { @@ -29,7 +29,7 @@ namespace Microsoft.ML.Transforms.Categorical /// /// This transform maps text values columns to new columns using a map dataset provided through its arguments. /// - public sealed class TermLookupTransform : OneToOneTransformBase + public sealed class TermLookupTransformer : OneToOneTransformBase { public sealed class Column : OneToOneColumn { @@ -158,7 +158,7 @@ public override void Train(IExceptionContext ectx, IRowCursor cursor, int colTer getTerm(ref term); // REVIEW: Should we trim? term = ReadOnlyMemoryUtils.TrimSpaces(term); - var nstr = ReadOnlyMemoryUtils.AddToPool(term, terms); + var nstr = terms.Add(term); if (nstr.Id != values.Count) throw ectx.Except("Duplicate term in lookup data: '{0}'", nstr); @@ -193,7 +193,7 @@ private ValueGetter GetGetterCore(ValueGetter> getTer { getTerm(ref src); src = ReadOnlyMemoryUtils.TrimSpaces(src); - var nstr = ReadOnlyMemoryUtils.FindInPool(src, _terms); + var nstr = _terms.Get(src); if (nstr == null) GetMissing(ref dst); else @@ -257,7 +257,7 @@ public VecValueMap(VectorType type) protected override void GetMissing(ref VBuffer dst) { - dst = new VBuffer(Type.VectorSize, 0, dst.Values, dst.Indices); + VBufferUtils.Resize(ref dst, Type.VectorSize, 0); } protected override void CopyValue(in VBuffer src, ref VBuffer dst) @@ -279,7 +279,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010002, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(TermLookupTransform).Assembly.FullName); + loaderAssemblyName: typeof(TermLookupTransformer).Assembly.FullName); } // This is the byte array containing the binary .idv file contents for the lookup data. @@ -301,7 +301,7 @@ private static VersionInfo GetVersionInfo() /// /// Public constructor corresponding to SignatureDataTransform. /// - public TermLookupTransform(IHostEnvironment env, Arguments args, IDataView input) + public TermLookupTransformer(IHostEnvironment env, Arguments args, IDataView input) : base(env, RegistrationName, env.CheckRef(args, nameof(args)).Column, input, TestIsText) { @@ -321,7 +321,7 @@ public TermLookupTransform(IHostEnvironment env, Arguments args, IDataView input } } - public TermLookupTransform(IHostEnvironment env, IDataView input, IDataView lookup, string sourceTerm, string sourceValue, string targetTerm, string targetValue) + public TermLookupTransformer(IHostEnvironment env, IDataView input, IDataView lookup, string sourceTerm, string sourceValue, string targetTerm, string targetValue) : base(env, RegistrationName, new[] { new Column { Name = sourceValue, Source = sourceTerm } }, input, TestIsText) { Host.AssertNonEmpty(Infos); @@ -513,8 +513,8 @@ private static byte[] GetBytesFromDataView(IHost host, IDataView lookup, string (valueColumn, "Value") }; - var view = new CopyColumnsTransform(host, cols.ToArray()).Transform(lookup); - view = SelectColumnsTransform.CreateKeep(host, view, cols.Select(x=>x.Name).ToArray()); + var view = new ColumnsCopyingTransformer(host, cols.ToArray()).Transform(lookup); + view = ColumnSelectingTransformer.CreateKeep(host, view, cols.Select(x=>x.Name).ToArray()); var saver = new BinarySaver(host, new BinarySaver.Arguments()); using (var strm = new MemoryStream()) @@ -589,7 +589,7 @@ private static ValueMap Train(IExceptionContext ectx, BinaryLoader ldr) return values; } - private TermLookupTransform(IChannel ch, ModelLoadContext ctx, IHost host, IDataView input) + private TermLookupTransformer(IChannel ch, ModelLoadContext ctx, IHost host, IDataView input) : base(host, ctx, input, TestIsText) { Host.AssertValue(ch); @@ -630,14 +630,14 @@ private static byte[] ReadAllBytes(IExceptionContext ectx, BinaryReader rdr) return rgb; } - public static TermLookupTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + public static TermLookupTransformer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { Contracts.CheckValue(env, nameof(env)); var h = env.Register(RegistrationName); h.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); h.CheckValue(input, nameof(input)); - return h.Apply("Loading Model", ch => new TermLookupTransform(ch, ctx, h, input)); + return h.Apply("Loading Model", ch => new TermLookupTransformer(ch, ctx, h, input)); } public override void Save(ModelSaveContext ctx) diff --git a/src/Microsoft.ML.Transforms/Text/LdaSingleBox.cs b/src/Microsoft.ML.Transforms/Text/LdaSingleBox.cs index 4a9ef780ca..af643a2907 100644 --- a/src/Microsoft.ML.Transforms/Text/LdaSingleBox.cs +++ b/src/Microsoft.ML.Transforms/Text/LdaSingleBox.cs @@ -181,7 +181,7 @@ public void SetAlphaSum(float averageDocLength) LdaInterface.SetAlphaSum(_engine, averageDocLength); } - public int LoadDoc(int[] termID, double[] termVal, int termNum, int numVocab) + public int LoadDoc(ReadOnlySpan termID, ReadOnlySpan termVal, int termNum, int numVocab) { Contracts.Check(numVocab == NumVocab); Contracts.Check(termNum > 0); @@ -189,12 +189,14 @@ public int LoadDoc(int[] termID, double[] termVal, int termNum, int numVocab) Contracts.Check(termVal.Length >= termNum); int[] pID = new int[termNum]; - int[] pVal = termVal.Select(item => (int)item).ToArray(); - Array.Copy(termID, pID, termNum); + int[] pVal = new int[termVal.Length]; + for (int i = 0; i < termVal.Length; i++) + pVal[i] = (int)termVal[i]; + termID.Slice(0, termNum).CopyTo(pID); return LdaInterface.FeedInData(_engine, pID, pVal, termNum, NumVocab); } - public int LoadDocDense(double[] termVal, int termNum, int numVocab) + public int LoadDocDense(ReadOnlySpan termVal, int termNum, int numVocab) { Contracts.Check(numVocab == NumVocab); Contracts.Check(termNum > 0); @@ -202,9 +204,10 @@ public int LoadDocDense(double[] termVal, int termNum, int numVocab) Contracts.Check(termVal.Length >= termNum); int[] pID = new int[termNum]; - int[] pVal = termVal.Select(item => (int)item).ToArray(); + int[] pVal = new int[termVal.Length]; + for (int i = 0; i < termVal.Length; i++) + pVal[i] = (int)termVal[i]; return LdaInterface.FeedInDataDense(_engine, pVal, termNum, NumVocab); - } public List> GetDocTopicVector(int docID) @@ -244,17 +247,19 @@ public List> GetDocTopicVector(int docID) return topicRet; } - public List> TestDoc(int[] termID, double[] termVal, int termNum, int numBurninIter, bool reset) + public List> TestDoc(ReadOnlySpan termID, ReadOnlySpan termVal, int termNum, int numBurninIter, bool reset) { Contracts.Check(termNum > 0); Contracts.Check(termVal.Length >= termNum); Contracts.Check(termID.Length >= termNum); int[] pID = new int[termNum]; - int[] pVal = termVal.Select(item => (int)item).ToArray(); + int[] pVal = new int[termVal.Length]; + for (int i = 0; i < termVal.Length; i++) + pVal[i] = (int)termVal[i]; int[] pTopic = new int[NumTopic]; int[] pProb = new int[NumTopic]; - Array.Copy(termID, pID, termNum); + termID.Slice(0, termNum).CopyTo(pID); int numTopicReturn = NumTopic; @@ -273,12 +278,14 @@ public List> TestDoc(int[] termID, double[] termVal, in return topicRet; } - public List> TestDocDense(double[] termVal, int termNum, int numBurninIter, bool reset) + public List> TestDocDense(ReadOnlySpan termVal, int termNum, int numBurninIter, bool reset) { Contracts.Check(termNum > 0); Contracts.Check(numBurninIter > 0); Contracts.Check(termVal.Length >= termNum); - int[] pVal = termVal.Select(item => (int)item).ToArray(); + int[] pVal = new int[termVal.Length]; + for (int i = 0; i < termVal.Length; i++) + pVal[i] = (int)termVal[i]; int[] pTopic = new int[NumTopic]; int[] pProb = new int[NumTopic]; diff --git a/src/Microsoft.ML.Transforms/Text/LdaStaticExtensions.cs b/src/Microsoft.ML.Transforms/Text/LdaStaticExtensions.cs new file mode 100644 index 0000000000..05acdca178 --- /dev/null +++ b/src/Microsoft.ML.Transforms/Text/LdaStaticExtensions.cs @@ -0,0 +1,174 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Core.Data; +using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.StaticPipe.Runtime; +using Microsoft.ML.Transforms.Text; +using System; +using System.Collections.Generic; + +namespace Microsoft.ML.StaticPipe +{ + /// + /// Information on the result of fitting a LDA transform. + /// + public sealed class LdaFitResult + { + /// + /// For user defined delegates that accept instances of the containing type. + /// + /// + public delegate void OnFit(LdaFitResult result); + + public LatentDirichletAllocationTransformer.LdaSummary LdaTopicSummary; + public LdaFitResult(LatentDirichletAllocationTransformer.LdaSummary ldaTopicSummary) + { + LdaTopicSummary = ldaTopicSummary; + } + } + + public static class LdaStaticExtensions + { + private struct Config + { + public readonly int NumTopic; + public readonly Single AlphaSum; + public readonly Single Beta; + public readonly int MHStep; + public readonly int NumIter; + public readonly int LikelihoodInterval; + public readonly int NumThread; + public readonly int NumMaxDocToken; + public readonly int NumSummaryTermPerTopic; + public readonly int NumBurninIter; + public readonly bool ResetRandomGenerator; + + public readonly Action OnFit; + + public Config(int numTopic, Single alphaSum, Single beta, int mhStep, int numIter, int likelihoodInterval, + int numThread, int numMaxDocToken, int numSummaryTermPerTopic, int numBurninIter, bool resetRandomGenerator, + Action onFit) + { + NumTopic = numTopic; + AlphaSum = alphaSum; + Beta = beta; + MHStep = mhStep; + NumIter = numIter; + LikelihoodInterval = likelihoodInterval; + NumThread = numThread; + NumMaxDocToken = numMaxDocToken; + NumSummaryTermPerTopic = numSummaryTermPerTopic; + NumBurninIter = numBurninIter; + ResetRandomGenerator = resetRandomGenerator; + + OnFit = onFit; + } + } + + private static Action Wrap(LdaFitResult.OnFit onFit) + { + if (onFit == null) + return null; + + return ldaTopicSummary => onFit(new LdaFitResult(ldaTopicSummary)); + } + + private interface ILdaCol + { + PipelineColumn Input { get; } + Config Config { get; } + } + + private sealed class ImplVector : Vector, ILdaCol + { + public PipelineColumn Input { get; } + public Config Config { get; } + public ImplVector(PipelineColumn input, Config config) : base(Rec.Inst, input) + { + Input = input; + Config = config; + } + } + + private sealed class Rec : EstimatorReconciler + { + public static readonly Rec Inst = new Rec(); + + public override IEstimator Reconcile(IHostEnvironment env, + PipelineColumn[] toOutput, + IReadOnlyDictionary inputNames, + IReadOnlyDictionary outputNames, + IReadOnlyCollection usedNames) + { + var infos = new LatentDirichletAllocationTransformer.ColumnInfo[toOutput.Length]; + Action onFit = null; + for (int i = 0; i < toOutput.Length; ++i) + { + var tcol = (ILdaCol)toOutput[i]; + + infos[i] = new LatentDirichletAllocationTransformer.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], + tcol.Config.NumTopic, + tcol.Config.AlphaSum, + tcol.Config.Beta, + tcol.Config.MHStep, + tcol.Config.NumIter, + tcol.Config.LikelihoodInterval, + tcol.Config.NumThread, + tcol.Config.NumMaxDocToken, + tcol.Config.NumSummaryTermPerTopic, + tcol.Config.NumBurninIter, + tcol.Config.ResetRandomGenerator); + + if (tcol.Config.OnFit != null) + { + int ii = i; // Necessary because if we capture i that will change to toOutput.Length on call. + onFit += tt => tcol.Config.OnFit(tt.GetLdaDetails(ii)); + } + } + + var est = new LatentDirichletAllocationEstimator(env, infos); + if (onFit == null) + return est; + + return est.WithOnFitDelegate(onFit); + } + } + + /// + /// A vector of floats representing the document. + /// The number of topics. + /// Dirichlet prior on document-topic vectors. + /// Dirichlet prior on vocab-topic vectors. + /// Number of Metropolis Hasting step. + /// Number of iterations. + /// Compute log likelihood over local dataset on this iteration interval. + /// The number of training threads. Default value depends on number of logical processors. + /// The threshold of maximum count of tokens per doc. + /// The number of words to summarize the topic. + /// The number of burn-in iterations. + /// Reset the random number generator for each document. + /// Called upon fitting with the learnt enumeration on the dataset. + public static Vector ToLdaTopicVector(this Vector input, + int numTopic = LatentDirichletAllocationEstimator.Defaults.NumTopic, + Single alphaSum = LatentDirichletAllocationEstimator.Defaults.AlphaSum, + Single beta = LatentDirichletAllocationEstimator.Defaults.Beta, + int mhstep = LatentDirichletAllocationEstimator.Defaults.Mhstep, + int numIterations = LatentDirichletAllocationEstimator.Defaults.NumIterations, + int likelihoodInterval = LatentDirichletAllocationEstimator.Defaults.LikelihoodInterval, + int numThreads = LatentDirichletAllocationEstimator.Defaults.NumThreads, + int numMaxDocToken = LatentDirichletAllocationEstimator.Defaults.NumMaxDocToken, + int numSummaryTermPerTopic = LatentDirichletAllocationEstimator.Defaults.NumSummaryTermPerTopic, + int numBurninIterations = LatentDirichletAllocationEstimator.Defaults.NumBurninIterations, + bool resetRandomGenerator = LatentDirichletAllocationEstimator.Defaults.ResetRandomGenerator, + LdaFitResult.OnFit onFit = null) + { + Contracts.CheckValue(input, nameof(input)); + return new ImplVector(input, + new Config(numTopic, alphaSum, beta, mhstep, numIterations, likelihoodInterval, numThreads, numMaxDocToken, numSummaryTermPerTopic, + numBurninIterations, resetRandomGenerator, Wrap(onFit))); + } + } +} \ No newline at end of file diff --git a/src/Microsoft.ML.Transforms/Text/LdaTransform.cs b/src/Microsoft.ML.Transforms/Text/LdaTransform.cs index 3f697a8478..3466e2219a 100644 --- a/src/Microsoft.ML.Transforms/Text/LdaTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/LdaTransform.cs @@ -2,13 +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 Float = System.Single; - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; +using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; @@ -18,12 +12,23 @@ using Microsoft.ML.Runtime.Model; using Microsoft.ML.Runtime.TextAnalytics; using Microsoft.ML.Transforms.Text; +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using System.Text; + +[assembly: LoadableClass(LatentDirichletAllocationTransformer.Summary, typeof(IDataTransform), typeof(LatentDirichletAllocationTransformer), typeof(LatentDirichletAllocationTransformer.Arguments), typeof(SignatureDataTransform), + "Latent Dirichlet Allocation Transform", LatentDirichletAllocationTransformer.LoaderSignature, "Lda")] -[assembly: LoadableClass(typeof(LdaTransform), typeof(LdaTransform.Arguments), typeof(SignatureDataTransform), - LdaTransform.UserName, LdaTransform.LoaderSignature, LdaTransform.ShortName, DocName = "transform/LdaTransform.md")] +[assembly: LoadableClass(LatentDirichletAllocationTransformer.Summary, typeof(IDataTransform), typeof(LatentDirichletAllocationTransformer), null, typeof(SignatureLoadDataTransform), + "Latent Dirichlet Allocation Transform", LatentDirichletAllocationTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(LdaTransform), null, typeof(SignatureLoadDataTransform), - LdaTransform.UserName, LdaTransform.LoaderSignature)] +[assembly: LoadableClass(LatentDirichletAllocationTransformer.Summary, typeof(LatentDirichletAllocationTransformer), null, typeof(SignatureLoadModel), + "Latent Dirichlet Allocation Transform", LatentDirichletAllocationTransformer.LoaderSignature)] + +[assembly: LoadableClass(typeof(IRowMapper), typeof(LatentDirichletAllocationTransformer), null, typeof(SignatureLoadRowMapper), + "Latent Dirichlet Allocation Transform", LatentDirichletAllocationTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Text { @@ -41,60 +46,60 @@ namespace Microsoft.ML.Transforms.Text // https://github.com/Microsoft/LightLDA // // See - // for an example on how to use LdaTransform. + // for an example on how to use LatentDirichletAllocationTransformer. /// - public sealed class LdaTransform : OneToOneTransformBase + public sealed class LatentDirichletAllocationTransformer : OneToOneTransformerBase { public sealed class Arguments : TransformInputBase { [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "New column definition(s) (optional form: name:srcs)", ShortName = "col", SortOrder = 49)] public Column[] Column; - [Argument(ArgumentType.AtMostOnce, HelpText = "The number of topics in the LDA", SortOrder = 50)] + [Argument(ArgumentType.AtMostOnce, HelpText = "The number of topics", SortOrder = 50)] [TGUI(SuggestedSweeps = "20,40,100,200")] [TlcModule.SweepableDiscreteParam("NumTopic", new object[] { 20, 40, 100, 200 })] - public int NumTopic = 100; + public int NumTopic = LatentDirichletAllocationEstimator.Defaults.NumTopic; [Argument(ArgumentType.AtMostOnce, HelpText = "Dirichlet prior on document-topic vectors")] [TGUI(SuggestedSweeps = "1,10,100,200")] [TlcModule.SweepableDiscreteParam("AlphaSum", new object[] { 1, 10, 100, 200 })] - public Single AlphaSum = 100; + public float AlphaSum = LatentDirichletAllocationEstimator.Defaults.AlphaSum; [Argument(ArgumentType.AtMostOnce, HelpText = "Dirichlet prior on vocab-topic vectors")] [TGUI(SuggestedSweeps = "0.01,0.015,0.07,0.02")] [TlcModule.SweepableDiscreteParam("Beta", new object[] { 0.01f, 0.015f, 0.07f, 0.02f })] - public Single Beta = 0.01f; + public float Beta = LatentDirichletAllocationEstimator.Defaults.Beta; [Argument(ArgumentType.Multiple, HelpText = "Number of Metropolis Hasting step")] [TGUI(SuggestedSweeps = "2,4,8,16")] [TlcModule.SweepableDiscreteParam("Mhstep", new object[] { 2, 4, 8, 16 })] - public int Mhstep = 4; + public int Mhstep = LatentDirichletAllocationEstimator.Defaults.Mhstep; [Argument(ArgumentType.AtMostOnce, HelpText = "Number of iterations", ShortName = "iter")] [TGUI(SuggestedSweeps = "100,200,300,400")] [TlcModule.SweepableDiscreteParam("NumIterations", new object[] { 100, 200, 300, 400 })] - public int NumIterations = 200; + public int NumIterations = LatentDirichletAllocationEstimator.Defaults.NumIterations; [Argument(ArgumentType.AtMostOnce, HelpText = "Compute log likelihood over local dataset on this iteration interval", ShortName = "llInterval")] - public int LikelihoodInterval = 5; - - [Argument(ArgumentType.AtMostOnce, HelpText = "The threshold of maximum count of tokens per doc", ShortName = "maxNumToken", SortOrder = 50)] - public int NumMaxDocToken = 512; + public int LikelihoodInterval = LatentDirichletAllocationEstimator.Defaults.LikelihoodInterval; // REVIEW: Should change the default when multi-threading support is optimized. [Argument(ArgumentType.AtMostOnce, HelpText = "The number of training threads. Default value depends on number of logical processors.", ShortName = "t", SortOrder = 50)] - public int? NumThreads; + public int NumThreads = LatentDirichletAllocationEstimator.Defaults.NumThreads; + + [Argument(ArgumentType.AtMostOnce, HelpText = "The threshold of maximum count of tokens per doc", ShortName = "maxNumToken", SortOrder = 50)] + public int NumMaxDocToken = LatentDirichletAllocationEstimator.Defaults.NumMaxDocToken; [Argument(ArgumentType.AtMostOnce, HelpText = "The number of words to summarize the topic", ShortName = "ns")] - public int NumSummaryTermPerTopic = 10; + public int NumSummaryTermPerTopic = LatentDirichletAllocationEstimator.Defaults.NumSummaryTermPerTopic; [Argument(ArgumentType.AtMostOnce, HelpText = "The number of burn-in iterations", ShortName = "burninIter")] [TGUI(SuggestedSweeps = "10,20,30,40")] [TlcModule.SweepableDiscreteParam("NumBurninIterations", new object[] { 10, 20, 30, 40 })] - public int NumBurninIterations = 10; + public int NumBurninIterations = LatentDirichletAllocationEstimator.Defaults.NumBurninIterations; [Argument(ArgumentType.AtMostOnce, HelpText = "Reset the random number generator for each document", ShortName = "reset")] - public bool ResetRandomGenerator; + public bool ResetRandomGenerator = LatentDirichletAllocationEstimator.Defaults.ResetRandomGenerator; [Argument(ArgumentType.AtMostOnce, HelpText = "Whether to output the topic-word summary in text format", ShortName = "summary")] public bool OutputTopicWordSummary; @@ -102,14 +107,14 @@ public sealed class Arguments : TransformInputBase public sealed class Column : OneToOneColumn { - [Argument(ArgumentType.AtMostOnce, HelpText = "The number of topics in the LDA")] + [Argument(ArgumentType.AtMostOnce, HelpText = "The number of topics")] public int? NumTopic; [Argument(ArgumentType.AtMostOnce, HelpText = "Dirichlet prior on document-topic vectors")] - public Single? AlphaSum; + public float? AlphaSum; [Argument(ArgumentType.AtMostOnce, HelpText = "Dirichlet prior on vocab-topic vectors")] - public Single? Beta; + public float? Beta; [Argument(ArgumentType.Multiple, HelpText = "Number of Metropolis Hasting step")] public int? Mhstep; @@ -155,11 +160,13 @@ public bool TryUnparse(StringBuilder sb) } } - private sealed class ColInfoEx + public sealed class ColumnInfo { + public readonly string Input; + public readonly string Output; public readonly int NumTopic; - public readonly Single AlphaSum; - public readonly Single Beta; + public readonly float AlphaSum; + public readonly float Beta; public readonly int MHStep; public readonly int NumIter; public readonly int LikelihoodInterval; @@ -169,50 +176,78 @@ private sealed class ColInfoEx public readonly int NumBurninIter; public readonly bool ResetRandomGenerator; - public ColInfoEx(IExceptionContext ectx, Column item, Arguments args) + /// + /// Describes how the transformer handles one column pair. + /// + /// The column representing the document as a vector of floats. + /// The column containing the output scores over a set of topics, represented as a vector of floats. A null value for the column means is replaced. + /// The number of topics. + /// Dirichlet prior on document-topic vectors. + /// Dirichlet prior on vocab-topic vectors. + /// Number of Metropolis Hasting step. + /// Number of iterations. + /// Compute log likelihood over local dataset on this iteration interval. + /// The number of training threads. Default value depends on number of logical processors. + /// The threshold of maximum count of tokens per doc. + /// The number of words to summarize the topic. + /// The number of burn-in iterations. + /// Reset the random number generator for each document. + public ColumnInfo(string input, + string output = null, + int numTopic = LatentDirichletAllocationEstimator.Defaults.NumTopic, + float alphaSum = LatentDirichletAllocationEstimator.Defaults.AlphaSum, + float beta = LatentDirichletAllocationEstimator.Defaults.Beta, + int mhStep = LatentDirichletAllocationEstimator.Defaults.Mhstep, + int numIter = LatentDirichletAllocationEstimator.Defaults.NumIterations, + int likelihoodInterval = LatentDirichletAllocationEstimator.Defaults.LikelihoodInterval, + int numThread = LatentDirichletAllocationEstimator.Defaults.NumThreads, + int numMaxDocToken = LatentDirichletAllocationEstimator.Defaults.NumMaxDocToken, + int numSummaryTermPerTopic = LatentDirichletAllocationEstimator.Defaults.NumSummaryTermPerTopic, + int numBurninIter = LatentDirichletAllocationEstimator.Defaults.NumBurninIterations, + bool resetRandomGenerator = LatentDirichletAllocationEstimator.Defaults.ResetRandomGenerator) { - Contracts.AssertValue(ectx); - - NumTopic = item.NumTopic ?? args.NumTopic; - Contracts.CheckUserArg(NumTopic > 0, nameof(item.NumTopic), "Must be positive."); - - AlphaSum = item.AlphaSum ?? args.AlphaSum; - - Beta = item.Beta ?? args.Beta; - - MHStep = item.Mhstep ?? args.Mhstep; - ectx.CheckUserArg(MHStep > 0, nameof(item.Mhstep), "Must be positive."); - - NumIter = item.NumIterations ?? args.NumIterations; - ectx.CheckUserArg(NumIter > 0, nameof(item.NumIterations), "Must be positive."); - - LikelihoodInterval = item.LikelihoodInterval ?? args.LikelihoodInterval; - ectx.CheckUserArg(LikelihoodInterval > 0, nameof(item.LikelihoodInterval), "Must be positive."); - - NumThread = item.NumThreads ?? args.NumThreads ?? 0; - ectx.CheckUserArg(NumThread >= 0, nameof(item.NumThreads), "Must be positive or zero."); - - NumMaxDocToken = item.NumMaxDocToken ?? args.NumMaxDocToken; - ectx.CheckUserArg(NumMaxDocToken > 0, nameof(item.NumMaxDocToken), "Must be positive."); - - NumSummaryTermPerTopic = item.NumSummaryTermPerTopic ?? args.NumSummaryTermPerTopic; - ectx.CheckUserArg(NumSummaryTermPerTopic > 0, nameof(item.NumSummaryTermPerTopic), "Must be positive"); - - NumBurninIter = item.NumBurninIterations ?? args.NumBurninIterations; - ectx.CheckUserArg(NumBurninIter >= 0, nameof(item.NumBurninIterations), "Must be non-negative."); + Contracts.CheckValue(input, nameof(input)); + Contracts.CheckValueOrNull(output); + Contracts.CheckParam(numTopic > 0, nameof(numTopic), "Must be positive."); + Contracts.CheckParam(mhStep > 0, nameof(mhStep), "Must be positive."); + Contracts.CheckParam(numIter > 0, nameof(numIter), "Must be positive."); + Contracts.CheckParam(likelihoodInterval > 0, nameof(likelihoodInterval), "Must be positive."); + Contracts.CheckParam(numThread >= 0, nameof(numThread), "Must be positive or zero."); + Contracts.CheckParam(numMaxDocToken > 0, nameof(numMaxDocToken), "Must be positive."); + Contracts.CheckParam(numSummaryTermPerTopic > 0, nameof(numSummaryTermPerTopic), "Must be positive"); + Contracts.CheckParam(numBurninIter >= 0, nameof(numBurninIter), "Must be non-negative."); + + Input = input; + Output = output ?? input; + NumTopic = numTopic; + AlphaSum = alphaSum; + Beta = beta; + MHStep = mhStep; + NumIter = numIter; + LikelihoodInterval = likelihoodInterval; + NumThread = numThread; + NumMaxDocToken = numMaxDocToken; + NumSummaryTermPerTopic = numSummaryTermPerTopic; + NumBurninIter = numBurninIter; + ResetRandomGenerator = resetRandomGenerator; + } - ResetRandomGenerator = item.ResetRandomGenerator ?? args.ResetRandomGenerator; + internal ColumnInfo(Column item, Arguments args) : + this(item.Source, item.Name, + args.NumTopic, args.AlphaSum, args.Beta, args.Mhstep, args.NumIterations, + args.LikelihoodInterval, args.NumThreads, args.NumMaxDocToken, args.NumSummaryTermPerTopic, args.NumBurninIterations, args.ResetRandomGenerator) + { } - public ColInfoEx(IExceptionContext ectx, ModelLoadContext ctx) + internal ColumnInfo(IExceptionContext ectx, ModelLoadContext ctx) { Contracts.AssertValue(ectx); ectx.AssertValue(ctx); // *** Binary format *** // int NumTopic; - // Single AlphaSum; - // Single Beta; + // float AlphaSum; + // float Beta; // int MHStep; // int NumIter; // int LikelihoodInterval; @@ -253,14 +288,14 @@ public ColInfoEx(IExceptionContext ectx, ModelLoadContext ctx) ResetRandomGenerator = ctx.Reader.ReadBoolByte(); } - public void Save(ModelSaveContext ctx) + internal void Save(ModelSaveContext ctx) { Contracts.AssertValue(ctx); // *** Binary format *** // int NumTopic; - // Single AlphaSum; - // Single Beta; + // float AlphaSum; + // float Beta; // int MHStep; // int NumIter; // int LikelihoodInterval; @@ -284,311 +319,41 @@ public void Save(ModelSaveContext ctx) } } - public const string LoaderSignature = "LdaTransform"; - private static VersionInfo GetVersionInfo() - { - return new VersionInfo( - modelSignature: "LIGHTLDA", - verWrittenCur: 0x00010001, // Initial - verReadableCur: 0x00010001, - verWeCanReadBack: 0x00010001, - loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(LdaTransform).Assembly.FullName); - } - - private readonly ColInfoEx[] _exes; - private readonly LdaState[] _ldas; - private readonly ColumnType[] _types; - private readonly bool _saveText; - - private const string RegistrationName = "LightLda"; - private const string WordTopicModelFilename = "word_topic_summary.txt"; - internal const string Summary = "The LDA transform implements LightLDA, a state-of-the-art implementation of Latent Dirichlet Allocation."; - internal const string UserName = "Latent Dirichlet Allocation Transform"; - internal const string ShortName = "LightLda"; - - public LdaTransform(IHostEnvironment env, Arguments args, IDataView input) - : base(env, RegistrationName, args.Column, input, TestType) - { - Host.CheckValue(args, nameof(args)); - Host.CheckUserArg(args.NumTopic > 0, nameof(args.NumTopic), "Must be positive."); - Host.CheckValue(input, nameof(input)); - Host.CheckUserArg(Utils.Size(args.Column) > 0, nameof(args.Column)); - _exes = new ColInfoEx[Infos.Length]; - _types = new ColumnType[Infos.Length]; - _ldas = new LdaState[Infos.Length]; - _saveText = args.OutputTopicWordSummary; - for (int i = 0; i < Infos.Length; i++) - { - var ex = new ColInfoEx(Host, args.Column[i], args); - _exes[i] = ex; - _types[i] = new VectorType(NumberType.Float, ex.NumTopic); - } - using (var ch = Host.Start("Train")) - { - Train(ch, input, _ldas); - } - Metadata.Seal(); - } - - private void Dispose(bool disposing) - { - if (_ldas != null) - { - foreach (var state in _ldas) - state?.Dispose(); - } - if (disposing) - GC.SuppressFinalize(this); - } - - public void Dispose() - { - Dispose(true); - } - - ~LdaTransform() + /// + /// Provide details about the topics discovered by LightLDA. + /// + public sealed class LdaSummary { - Dispose(false); - } + // For each topic, provide information about the (item, score) pairs. + public readonly ImmutableArray> ItemScoresPerTopic; - private LdaTransform(IHost host, ModelLoadContext ctx, IDataView input) - : base(host, ctx, input, TestType) - { - Host.AssertValue(ctx); + // For each topic, provide information about the (item, word, score) tuple. + public readonly ImmutableArray> WordScoresPerTopic; - // *** Binary format *** - // - // - // ldaState[num infos]: The LDA parameters - - // Note: infos.length would be just one in most cases. - _exes = new ColInfoEx[Infos.Length]; - _ldas = new LdaState[Infos.Length]; - _types = new ColumnType[Infos.Length]; - for (int i = 0; i < _ldas.Length; i++) + internal LdaSummary(ImmutableArray> itemScoresPerTopic) { - _ldas[i] = new LdaState(Host, ctx); - _exes[i] = _ldas[i].InfoEx; - _types[i] = new VectorType(NumberType.Float, _ldas[i].InfoEx.NumTopic); - } - using (var ent = ctx.Repository.OpenEntryOrNull("model", WordTopicModelFilename)) - { - _saveText = ent != null; + ItemScoresPerTopic = itemScoresPerTopic; } - Metadata.Seal(); - } - - public static LdaTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) - { - Contracts.CheckValue(env, nameof(env)); - var h = env.Register(RegistrationName); - - h.CheckValue(ctx, nameof(ctx)); - ctx.CheckAtModel(GetVersionInfo()); - h.CheckValue(input, nameof(input)); - return h.Apply( - "Loading Model", - ch => - { - // *** Binary Format *** - // int: sizeof(Float) - // - int cbFloat = ctx.Reader.ReadInt32(); - h.CheckDecode(cbFloat == sizeof(Float)); - return new LdaTransform(h, ctx, input); - }); - } - - public string GetTopicSummary() - { - StringWriter writer = new StringWriter(); - VBuffer> slotNames = default; - for (int i = 0; i < _ldas.Length; i++) + internal LdaSummary(ImmutableArray> wordScoresPerTopic) { - GetSlotNames(i, ref slotNames); - _ldas[i].GetTopicSummaryWriter(slotNames)(writer); - writer.WriteLine(); + WordScoresPerTopic = wordScoresPerTopic; } - return writer.ToString(); } - public override void Save(ModelSaveContext ctx) + internal LdaSummary GetLdaDetails(int iinfo) { - Host.CheckValue(ctx, nameof(ctx)); - ctx.CheckAtModel(); - ctx.SetVersionInfo(GetVersionInfo()); + Contracts.Assert(0 <= iinfo && iinfo < _ldas.Length); - // *** Binary format *** - // int: sizeof(Float) - // - // ldaState[num infos]: The LDA parameters + var ldaState = _ldas[iinfo]; + var mapping = _columnMappings[iinfo]; - ctx.Writer.Write(sizeof(Float)); - SaveBase(ctx); - Host.Assert(_ldas.Length == Infos.Length); - VBuffer> slotNames = default; - for (int i = 0; i < _ldas.Length; i++) - { - GetSlotNames(i, ref slotNames); - _ldas[i].Save(ctx, _saveText, slotNames); - } - } - - private void GetSlotNames(int iinfo, ref VBuffer> dst) - { - Host.Assert(0 <= iinfo && iinfo < Infos.Length); - if (Source.Schema.HasSlotNames(Infos[iinfo].Source, Infos[iinfo].TypeSrc.ValueCount)) - Source.Schema.GetMetadata(MetadataUtils.Kinds.SlotNames, Infos[iinfo].Source, ref dst); - else - dst = default(VBuffer>); - } - - private static string TestType(ColumnType t) - { - // LDA consumes term frequency vectors, so I am assuming VBuffer is an appropriate input type. - // It must also be of known size for the sake of the LDA trainer initialization. - if (t.IsKnownSizeVector && t.ItemType is NumberType) - return null; - return "Expected vector of number type of known size."; - } - - private static int GetFrequency(double value) - { - int result = (int)value; - if (!(result == value && result >= 0)) - return -1; - return result; - } - - private void Train(IChannel ch, IDataView trainingData, LdaState[] states) - { - Host.AssertValue(ch); - ch.AssertValue(trainingData); - ch.AssertValue(states); - ch.Assert(states.Length == Infos.Length); - - bool[] activeColumns = new bool[trainingData.Schema.ColumnCount]; - int[] numVocabs = new int[Infos.Length]; - - for (int i = 0; i < Infos.Length; i++) - { - activeColumns[Infos[i].Source] = true; - numVocabs[i] = 0; - } - - //the current lda needs the memory allocation before feedin data, so needs two sweeping of the data, - //one for the pre-calc memory, one for feedin data really - //another solution can be prepare these two value externally and put them in the beginning of the input file. - long[] corpusSize = new long[Infos.Length]; - int[] numDocArray = new int[Infos.Length]; - - using (var cursor = trainingData.GetRowCursor(col => activeColumns[col])) - { - var getters = new ValueGetter>[Utils.Size(Infos)]; - for (int i = 0; i < Infos.Length; i++) - { - corpusSize[i] = 0; - numDocArray[i] = 0; - getters[i] = RowCursorUtils.GetVecGetterAs(NumberType.R8, cursor, Infos[i].Source); - } - VBuffer src = default(VBuffer); - long rowCount = 0; - - while (cursor.MoveNext()) - { - ++rowCount; - for (int i = 0; i < Infos.Length; i++) - { - int docSize = 0; - getters[i](ref src); - - // compute term, doc instance#. - for (int termID = 0; termID < src.Count; termID++) - { - int termFreq = GetFrequency(src.Values[termID]); - if (termFreq < 0) - { - // Ignore this row. - docSize = 0; - break; - } - - if (docSize >= _exes[i].NumMaxDocToken - termFreq) - break; //control the document length - - //if legal then add the term - docSize += termFreq; - } - - // Ignore empty doc - if (docSize == 0) - continue; - - numDocArray[i]++; - corpusSize[i] += docSize * 2 + 1; // in the beggining of each doc, there is a cursor variable - - // increase numVocab if needed. - if (numVocabs[i] < src.Length) - numVocabs[i] = src.Length; - } - } - - for (int i = 0; i < Infos.Length; ++i) - { - if (numDocArray[i] != rowCount) - { - ch.Assert(numDocArray[i] < rowCount); - ch.Warning($"Column '{Infos[i].Name}' has skipped {rowCount - numDocArray[i]} of {rowCount} rows either empty or with negative, non-finite, or fractional values."); - } - } - } - - // Initialize all LDA states - for (int i = 0; i < Infos.Length; i++) - { - var state = new LdaState(Host, _exes[i], numVocabs[i]); - if (numDocArray[i] == 0 || corpusSize[i] == 0) - throw ch.Except("The specified documents are all empty in column '{0}'.", Infos[i].Name); - - state.AllocateDataMemory(numDocArray[i], corpusSize[i]); - states[i] = state; - } - - using (var cursor = trainingData.GetRowCursor(col => activeColumns[col])) - { - int[] docSizeCheck = new int[Infos.Length]; - // This could be optimized so that if multiple trainers consume the same column, it is - // fed into the train method once. - var getters = new ValueGetter>[Utils.Size(Infos)]; - for (int i = 0; i < Infos.Length; i++) - { - docSizeCheck[i] = 0; - getters[i] = RowCursorUtils.GetVecGetterAs(NumberType.R8, cursor, Infos[i].Source); - } - - VBuffer src = default(VBuffer); - - while (cursor.MoveNext()) - { - for (int i = 0; i < Infos.Length; i++) - { - getters[i](ref src); - docSizeCheck[i] += states[i].FeedTrain(Host, in src); - } - } - for (int i = 0; i < Infos.Length; i++) - { - Host.Assert(corpusSize[i] == docSizeCheck[i]); - states[i].CompleteTrain(); - } - } + return ldaState.GetLdaSummary(mapping); } private sealed class LdaState : IDisposable { - public readonly ColInfoEx InfoEx; + internal readonly ColumnInfo InfoEx; private readonly int _numVocab; private readonly object _preparationSyncRoot; private readonly object _testSyncRoot; @@ -601,7 +366,7 @@ private LdaState() _testSyncRoot = new object(); } - public LdaState(IExceptionContext ectx, ColInfoEx ex, int numVocab) + internal LdaState(IExceptionContext ectx, ColumnInfo ex, int numVocab) : this() { Contracts.AssertValue(ectx); @@ -625,7 +390,7 @@ public LdaState(IExceptionContext ectx, ColInfoEx ex, int numVocab) InfoEx.NumMaxDocToken); } - public LdaState(IExceptionContext ectx, ModelLoadContext ctx) + internal LdaState(IExceptionContext ectx, ModelLoadContext ctx) : this() { ectx.AssertValue(ctx); @@ -638,7 +403,7 @@ public LdaState(IExceptionContext ectx, ModelLoadContext ctx) // (serializing term by term, for one term) // int: term_id, int: topic_num, KeyValuePair[]: termTopicVector - InfoEx = new ColInfoEx(ectx, ctx); + InfoEx = new ColumnInfo(ectx, ctx); _numVocab = ctx.Reader.ReadInt32(); ectx.CheckDecode(_numVocab > 0); @@ -687,54 +452,52 @@ public LdaState(IExceptionContext ectx, ModelLoadContext ctx) //do the preparation if (!_predictionPreparationDone) { - _ldaTrainer.InitializeBeforeTest(); - _predictionPreparationDone = true; + lock (_preparationSyncRoot) + { + _ldaTrainer.InitializeBeforeTest(); + _predictionPreparationDone = true; + } } } - public Action GetTopicSummaryWriter(VBuffer> mapping) + internal LdaSummary GetLdaSummary(VBuffer> mapping) { - Action writeAction; - if (mapping.Length == 0) { - writeAction = - writer => + var itemScoresPerTopicBuilder = ImmutableArray.CreateBuilder>(); + for (int i = 0; i < _ldaTrainer.NumTopic; i++) + { + var scores = _ldaTrainer.GetTopicSummary(i); + var itemScores = new List<(int, float)>(); + foreach (KeyValuePair p in scores) { - for (int i = 0; i < _ldaTrainer.NumTopic; i++) - { - KeyValuePair[] topicSummaryVector = _ldaTrainer.GetTopicSummary(i); - writer.Write("{0}\t{1}\t", i, topicSummaryVector.Length); - foreach (KeyValuePair p in topicSummaryVector) - writer.Write("{0}:{1}\t", p.Key, p.Value); - writer.WriteLine(); - } - }; + itemScores.Add((p.Key, p.Value)); + } + + itemScoresPerTopicBuilder.Add(itemScores); + } + return new LdaSummary(itemScoresPerTopicBuilder.ToImmutable()); } else { - writeAction = - writer => + ReadOnlyMemory slotName = default; + var wordScoresPerTopicBuilder = ImmutableArray.CreateBuilder>(); + for (int i = 0; i < _ldaTrainer.NumTopic; i++) + { + var scores = _ldaTrainer.GetTopicSummary(i); + var wordScores = new List<(int, string, float)>(); + foreach (KeyValuePair p in scores) { - ReadOnlyMemory slotName = default; - for (int i = 0; i < _ldaTrainer.NumTopic; i++) - { - KeyValuePair[] topicSummaryVector = _ldaTrainer.GetTopicSummary(i); - writer.Write("{0}\t{1}\t", i, topicSummaryVector.Length); - foreach (KeyValuePair p in topicSummaryVector) - { - mapping.GetItemOrDefault(p.Key, ref slotName); - writer.Write("{0}[{1}]:{2}\t", p.Key, slotName, p.Value); - } - writer.WriteLine(); - } - }; + mapping.GetItemOrDefault(p.Key, ref slotName); + wordScores.Add((p.Key, slotName.ToString(), p.Value)); + } + wordScoresPerTopicBuilder.Add(wordScores); + } + return new LdaSummary(wordScoresPerTopicBuilder.ToImmutable()); } - - return writeAction; } - public void Save(ModelSaveContext ctx, bool saveText, VBuffer> mapping) + public void Save(ModelSaveContext ctx) { Contracts.AssertValue(ctx); long memBlockSize = 0; @@ -769,12 +532,6 @@ public void Save(ModelSaveContext ctx, bool saveText, VBuffer input) int docSize = 0; int termNum = 0; - for (int i = 0; i < input.Count; i++) + var inputValues = input.GetValues(); + for (int i = 0; i < inputValues.Length; i++) { - int termFreq = GetFrequency(input.Values[i]); + int termFreq = GetFrequency(inputValues[i]); if (termFreq < 0) { // Ignore this row. @@ -814,9 +572,9 @@ public int FeedTrain(IExceptionContext ectx, in VBuffer input) int actualSize = 0; if (input.IsDense) - actualSize = _ldaTrainer.LoadDocDense(input.Values, termNum, input.Length); + actualSize = _ldaTrainer.LoadDocDense(inputValues, termNum, input.Length); else - actualSize = _ldaTrainer.LoadDoc(input.Indices, input.Values, termNum, input.Length); + actualSize = _ldaTrainer.LoadDoc(input.GetIndices(), inputValues, termNum, input.Length); ectx.Assert(actualSize == 2 * docSize + 1, string.Format("The doc size are distinct. Actual: {0}, Expected: {1}", actualSize, 2 * docSize + 1)); return actualSize; @@ -831,7 +589,7 @@ public void CompleteTrain() _ldaTrainer.Train(""); /* Need to pass in an empty string */ } - public void Output(in VBuffer src, ref VBuffer dst, int numBurninIter, bool reset) + public void Output(in VBuffer src, ref VBuffer dst, int numBurninIter, bool reset) { // Prediction for a single document. // LdaSingleBox.InitializeBeforeTest() is NOT thread-safe. @@ -849,30 +607,30 @@ public void Output(in VBuffer src, ref VBuffer dst, int numBurnin } int len = InfoEx.NumTopic; - var values = dst.Values; - var indices = dst.Indices; - if (src.Count == 0) + var srcValues = src.GetValues(); + if (srcValues.Length == 0) { - dst = new VBuffer(len, 0, values, indices); + VBufferUtils.Resize(ref dst, len, 0); return; } + VBufferEditor editor; // Make sure all the frequencies are valid and truncate if the sum gets too large. int docSize = 0; int termNum = 0; - for (int i = 0; i < src.Count; i++) + for (int i = 0; i < srcValues.Length; i++) { - int termFreq = GetFrequency(src.Values[i]); + int termFreq = GetFrequency(srcValues[i]); if (termFreq < 0) { // REVIEW: Should this log a warning message? And what should it produce? // It currently produces a vbuffer of all NA values. // REVIEW: Need a utility method to do this... - if (Utils.Size(values) < len) - values = new Float[len]; + editor = VBufferEditor.Create(ref dst, len); + for (int k = 0; k < len; k++) - values[k] = Float.NaN; - dst = new VBuffer(len, values, indices); + editor.Values[k] = float.NaN; + dst = editor.Commit(); return; } @@ -886,42 +644,40 @@ public void Output(in VBuffer src, ref VBuffer dst, int numBurnin // REVIEW: Too much memory allocation here on each prediction. List> retTopics; if (src.IsDense) - retTopics = _ldaTrainer.TestDocDense(src.Values, termNum, numBurninIter, reset); + retTopics = _ldaTrainer.TestDocDense(srcValues, termNum, numBurninIter, reset); else - retTopics = _ldaTrainer.TestDoc(src.Indices.Take(src.Count).ToArray(), src.Values.Take(src.Count).ToArray(), termNum, numBurninIter, reset); + retTopics = _ldaTrainer.TestDoc(src.GetIndices(), srcValues, termNum, numBurninIter, reset); int count = retTopics.Count; Contracts.Assert(count <= len); - if (Utils.Size(values) < count) - values = new Float[count]; - if (count < len && Utils.Size(indices) < count) - indices = new int[count]; + editor = VBufferEditor.Create(ref dst, len, count); double normalizer = 0; for (int i = 0; i < count; i++) { int index = retTopics[i].Key; - Float value = retTopics[i].Value; + float value = retTopics[i].Value; Contracts.Assert(value >= 0); Contracts.Assert(0 <= index && index < len); if (count < len) { - Contracts.Assert(i == 0 || indices[i - 1] < index); - indices[i] = index; + Contracts.Assert(i == 0 || editor.Indices[i - 1] < index); + editor.Indices[i] = index; } else Contracts.Assert(index == i); - values[i] = value; + editor.Values[i] = value; normalizer += value; } if (normalizer > 0) { for (int i = 0; i < count; i++) - values[i] = (Float)(values[i] / normalizer); + editor.Values[i] = (float)(editor.Values[i] / normalizer); } - dst = new VBuffer(len, count, values, indices); + + dst = editor.Commit(); } public void Dispose() @@ -930,46 +686,481 @@ public void Dispose() } } - private ColumnType[] InitColumnTypes(int numTopics) + private sealed class Mapper : OneToOneMapperBase + { + private readonly LatentDirichletAllocationTransformer _parent; + private readonly int[] _srcCols; + + public Mapper(LatentDirichletAllocationTransformer parent, Schema inputSchema) + : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) + { + _parent = parent; + _srcCols = new int[_parent.ColumnPairs.Length]; + + for (int i = 0; i < _parent.ColumnPairs.Length; i++) + { + if (!inputSchema.TryGetColumnIndex(_parent.ColumnPairs[i].input, out _srcCols[i])) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.ColumnPairs[i].input); + + var srcCol = inputSchema[_srcCols[i]]; + if (!srcCol.Type.IsKnownSizeVector || !(srcCol.Type.ItemType is NumberType)) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.ColumnPairs[i].input, "a fixed vector of floats", srcCol.Type.ToString()); + } + } + + protected override Schema.Column[] GetOutputColumnsCore() + { + var result = new Schema.Column[_parent.ColumnPairs.Length]; + for (int i = 0; i < _parent.ColumnPairs.Length; i++) + { + var info = _parent._columns[i]; + result[i] = new Schema.Column(_parent.ColumnPairs[i].output, new VectorType(NumberType.Float, info.NumTopic), null); + } + return result; + } + + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + { + Contracts.AssertValue(input); + Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); + disposer = null; + + return GetTopic(input, iinfo); + } + + private ValueGetter> GetTopic(IRow input, int iinfo) + { + var getSrc = RowCursorUtils.GetVecGetterAs(NumberType.R8, input, _srcCols[iinfo]); + var src = default(VBuffer); + var lda = _parent._ldas[iinfo]; + int numBurninIter = lda.InfoEx.NumBurninIter; + bool reset = lda.InfoEx.ResetRandomGenerator; + return + (ref VBuffer dst) => + { + // REVIEW: This will work, but there are opportunities for caching + // based on input.Counter that are probably worthwhile given how long inference takes. + getSrc(ref src); + lda.Output(in src, ref dst, numBurninIter, reset); + }; + } + } + + internal const string LoaderSignature = "LdaTransform"; + private static VersionInfo GetVersionInfo() + { + return new VersionInfo( + modelSignature: "LIGHTLDA", + verWrittenCur: 0x00010001, // Initial + verReadableCur: 0x00010001, + verWeCanReadBack: 0x00010001, + loaderSignature: LoaderSignature, + loaderAssemblyName: typeof(LatentDirichletAllocationTransformer).Assembly.FullName); + } + + private readonly ColumnInfo[] _columns; + private readonly LdaState[] _ldas; + private readonly List>> _columnMappings; + + private const string RegistrationName = "LightLda"; + private const string WordTopicModelFilename = "word_topic_summary.txt"; + internal const string Summary = "The LDA transform implements LightLDA, a state-of-the-art implementation of Latent Dirichlet Allocation."; + internal const string UserName = "Latent Dirichlet Allocation Transform"; + internal const string ShortName = "LightLda"; + + private static (string input, string output)[] GetColumnPairs(ColumnInfo[] columns) + { + Contracts.CheckValue(columns, nameof(columns)); + return columns.Select(x => (x.Input, x.Output)).ToArray(); + } + + /// + /// Initializes a new object. + /// + /// Host Environment. + /// An array of LdaState objects, where ldas[i] is learnt from the i-th element of . + /// A list of mappings, where columnMapping[i] is a map of slot names for the i-th element of . + /// Describes the parameters of the LDA process for each column pair. + private LatentDirichletAllocationTransformer(IHostEnvironment env, + LdaState[] ldas, + List>> columnMappings, + params ColumnInfo[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(LatentDirichletAllocationTransformer)), GetColumnPairs(columns)) + { + Host.AssertNonEmpty(ColumnPairs); + _ldas = ldas; + _columnMappings = columnMappings; + _columns = columns; + } + + private LatentDirichletAllocationTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) + { + Host.AssertValue(ctx); + + // *** Binary format *** + // + // + // ldaState[num infos]: The LDA parameters + + // Note: columnsLength would be just one in most cases. + var columnsLength = ColumnPairs.Length; + _columns = new ColumnInfo[columnsLength]; + _ldas = new LdaState[columnsLength]; + for (int i = 0; i < _ldas.Length; i++) + { + _ldas[i] = new LdaState(Host, ctx); + _columns[i] = _ldas[i].InfoEx; + } + } + + internal static LatentDirichletAllocationTransformer TrainLdaTransformer(IHostEnvironment env, IDataView inputData, params ColumnInfo[] columns) + { + var ldas = new LdaState[columns.Length]; + + List>> columnMappings; + using (var ch = env.Start("Train")) + { + columnMappings = Train(env, ch, inputData, ldas, columns); + } + + return new LatentDirichletAllocationTransformer(env, ldas, columnMappings, columns); + } + + private void Dispose(bool disposing) { - Host.Assert(Utils.Size(Infos) > 0); - var types = new ColumnType[Infos.Length]; - for (int c = 0; c < Infos.Length; c++) - types[c] = new VectorType(NumberType.Float, numTopics); - return types; + if (_ldas != null) + { + foreach (var state in _ldas) + state?.Dispose(); + } + if (disposing) + GC.SuppressFinalize(this); } - protected override ColumnType GetColumnTypeCore(int iinfo) + public void Dispose() { - Host.Assert(0 <= iinfo & iinfo < Utils.Size(_types)); - return _types[iinfo]; + Dispose(true); } - protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, out Action disposer) + ~LatentDirichletAllocationTransformer() { - Host.AssertValueOrNull(ch); - Host.AssertValue(input); - Host.Assert(0 <= iinfo && iinfo < Infos.Length); - disposer = null; + Dispose(false); + } + + // Factory method for SignatureLoadDataTransform. + private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + => Create(env, ctx).MakeDataTransform(input); + + // Factory method for SignatureLoadRowMapper. + private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) + => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); - return GetTopic(input, iinfo); + // Factory method for SignatureDataTransform. + private static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) + { + Contracts.CheckValue(env, nameof(env)); + env.CheckValue(args, nameof(args)); + env.CheckValue(input, nameof(input)); + env.CheckValue(args.Column, nameof(args.Column)); + + var cols = args.Column.Select(colPair => new ColumnInfo(colPair, args)).ToArray(); + return TrainLdaTransformer(env, input, cols).MakeDataTransform(input); } - private ValueGetter> GetTopic(IRow input, int iinfo) + // Factory method for SignatureLoadModel + private static LatentDirichletAllocationTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { - var getSrc = RowCursorUtils.GetVecGetterAs(NumberType.R8, input, Infos[iinfo].Source); - var src = default(VBuffer); - var lda = _ldas[iinfo]; - int numBurninIter = lda.InfoEx.NumBurninIter; - bool reset = lda.InfoEx.ResetRandomGenerator; - return - (ref VBuffer dst) => + Contracts.CheckValue(env, nameof(env)); + var h = env.Register(RegistrationName); + + h.CheckValue(ctx, nameof(ctx)); + ctx.CheckAtModel(GetVersionInfo()); + + return h.Apply( + "Loading Model", + ch => { - // REVIEW: This will work, but there are opportunities for caching - // based on input.Counter that are probably worthwhile given how long inference takes. - getSrc(ref src); - lda.Output(in src, ref dst, numBurninIter, reset); - }; + // *** Binary Format *** + // int: sizeof(float) + // + int cbFloat = ctx.Reader.ReadInt32(); + h.CheckDecode(cbFloat == sizeof(float)); + return new LatentDirichletAllocationTransformer(h, ctx); + }); + } + + public override void Save(ModelSaveContext ctx) + { + Host.CheckValue(ctx, nameof(ctx)); + ctx.CheckAtModel(); + ctx.SetVersionInfo(GetVersionInfo()); + + // *** Binary format *** + // int: sizeof(float) + // + // ldaState[num infos]: The LDA parameters + + ctx.Writer.Write(sizeof(float)); + SaveColumns(ctx); + for (int i = 0; i < _ldas.Length; i++) + { + _ldas[i].Save(ctx); + } + } + + private static int GetFrequency(double value) + { + int result = (int)value; + if (!(result == value && result >= 0)) + return -1; + return result; + } + + private static List>> Train(IHostEnvironment env, IChannel ch, IDataView inputData, LdaState[] states, params ColumnInfo[] columns) + { + env.AssertValue(ch); + ch.AssertValue(inputData); + ch.AssertValue(states); + ch.Assert(states.Length == columns.Length); + + bool[] activeColumns = new bool[inputData.Schema.ColumnCount]; + int[] numVocabs = new int[columns.Length]; + int[] srcCols = new int[columns.Length]; + + var columnMappings = new List>>(); + + var inputSchema = inputData.Schema; + for (int i = 0; i < columns.Length; i++) + { + if (!inputData.Schema.TryGetColumnIndex(columns[i].Input, out int srcCol)) + throw env.ExceptSchemaMismatch(nameof(inputData), "input", columns[i].Input); + + var srcColType = inputSchema.GetColumnType(srcCol); + if (!srcColType.IsKnownSizeVector || !(srcColType.ItemType is NumberType)) + throw env.ExceptSchemaMismatch(nameof(inputSchema), "input", columns[i].Input, "a fixed vector of floats", srcColType.ToString()); + + srcCols[i] = srcCol; + activeColumns[srcCol] = true; + numVocabs[i] = 0; + + VBuffer> dst = default; + if (inputSchema.HasSlotNames(srcCol, srcColType.ValueCount)) + inputSchema.GetMetadata(MetadataUtils.Kinds.SlotNames, srcCol, ref dst); + else + dst = default(VBuffer>); + columnMappings.Add(dst); + } + + //the current lda needs the memory allocation before feedin data, so needs two sweeping of the data, + //one for the pre-calc memory, one for feedin data really + //another solution can be prepare these two value externally and put them in the beginning of the input file. + long[] corpusSize = new long[columns.Length]; + int[] numDocArray = new int[columns.Length]; + + using (var cursor = inputData.GetRowCursor(col => activeColumns[col])) + { + var getters = new ValueGetter>[columns.Length]; + for (int i = 0; i < columns.Length; i++) + { + corpusSize[i] = 0; + numDocArray[i] = 0; + getters[i] = RowCursorUtils.GetVecGetterAs(NumberType.R8, cursor, srcCols[i]); + } + VBuffer src = default(VBuffer); + long rowCount = 0; + while (cursor.MoveNext()) + { + ++rowCount; + for (int i = 0; i < columns.Length; i++) + { + int docSize = 0; + getters[i](ref src); + + // compute term, doc instance#. + var srcValues = src.GetValues(); + for (int termID = 0; termID < srcValues.Length; termID++) + { + int termFreq = GetFrequency(srcValues[termID]); + if (termFreq < 0) + { + // Ignore this row. + docSize = 0; + break; + } + + if (docSize >= columns[i].NumMaxDocToken - termFreq) + break; //control the document length + + //if legal then add the term + docSize += termFreq; + } + + // Ignore empty doc + if (docSize == 0) + continue; + + numDocArray[i]++; + corpusSize[i] += docSize * 2 + 1; // in the beggining of each doc, there is a cursor variable + + // increase numVocab if needed. + if (numVocabs[i] < src.Length) + numVocabs[i] = src.Length; + } + } + + // No data to train on, just return + if (rowCount == 0) + return columnMappings; + + for (int i = 0; i < columns.Length; ++i) + { + if (numDocArray[i] != rowCount) + { + ch.Assert(numDocArray[i] < rowCount); + ch.Warning($"Column '{columns[i].Input}' has skipped {rowCount - numDocArray[i]} of {rowCount} rows either empty or with negative, non-finite, or fractional values."); + } + } + } + + // Initialize all LDA states + for (int i = 0; i < columns.Length; i++) + { + var state = new LdaState(env, columns[i], numVocabs[i]); + + if (numDocArray[i] == 0 || corpusSize[i] == 0) + throw ch.Except("The specified documents are all empty in column '{0}'.", columns[i].Input); + + state.AllocateDataMemory(numDocArray[i], corpusSize[i]); + states[i] = state; + } + + using (var cursor = inputData.GetRowCursor(col => activeColumns[col])) + { + int[] docSizeCheck = new int[columns.Length]; + // This could be optimized so that if multiple trainers consume the same column, it is + // fed into the train method once. + var getters = new ValueGetter>[columns.Length]; + for (int i = 0; i < columns.Length; i++) + { + docSizeCheck[i] = 0; + getters[i] = RowCursorUtils.GetVecGetterAs(NumberType.R8, cursor, srcCols[i]); + } + + VBuffer src = default(VBuffer); + + while (cursor.MoveNext()) + { + for (int i = 0; i < columns.Length; i++) + { + getters[i](ref src); + docSizeCheck[i] += states[i].FeedTrain(env, in src); + } + } + + for (int i = 0; i < columns.Length; i++) + { + env.Assert(corpusSize[i] == docSizeCheck[i]); + states[i].CompleteTrain(); + } + } + + return columnMappings; + } + + protected override IRowMapper MakeRowMapper(Schema schema) + { + return new Mapper(this, schema); + } + } + + /// + public sealed class LatentDirichletAllocationEstimator : IEstimator + { + internal static class Defaults + { + public const int NumTopic = 100; + public const float AlphaSum = 100; + public const float Beta = 0.01f; + public const int Mhstep = 4; + public const int NumIterations = 200; + public const int LikelihoodInterval = 5; + public const int NumThreads = 0; + public const int NumMaxDocToken = 512; + public const int NumSummaryTermPerTopic = 10; + public const int NumBurninIterations = 10; + public const bool ResetRandomGenerator = false; + } + + private readonly IHost _host; + private readonly ImmutableArray _columns; + + /// + /// The environment. + /// The column representing the document as a vector of floats. + /// The column containing the output scores over a set of topics, represented as a vector of floats. A null value for the column means is replaced. + /// The number of topics. + /// Dirichlet prior on document-topic vectors. + /// Dirichlet prior on vocab-topic vectors. + /// Number of Metropolis Hasting step. + /// Number of iterations. + /// Compute log likelihood over local dataset on this iteration interval. + /// The number of training threads. Default value depends on number of logical processors. + /// The threshold of maximum count of tokens per doc. + /// The number of words to summarize the topic. + /// The number of burn-in iterations. + /// Reset the random number generator for each document. + public LatentDirichletAllocationEstimator(IHostEnvironment env, + string inputColumn, + string outputColumn = null, + int numTopic = Defaults.NumTopic, + float alphaSum = Defaults.AlphaSum, + float beta = Defaults.Beta, + int mhstep = Defaults.Mhstep, + int numIterations = Defaults.NumIterations, + int likelihoodInterval = Defaults.LikelihoodInterval, + int numThreads = Defaults.NumThreads, + int numMaxDocToken = Defaults.NumMaxDocToken, + int numSummaryTermPerTopic = Defaults.NumSummaryTermPerTopic, + int numBurninIterations = Defaults.NumBurninIterations, + bool resetRandomGenerator = Defaults.ResetRandomGenerator) + : this(env, new[] { new LatentDirichletAllocationTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn, + numTopic, alphaSum, beta, mhstep, numIterations, likelihoodInterval, numThreads, numMaxDocToken, + numSummaryTermPerTopic, numBurninIterations, resetRandomGenerator) }) + { } + + /// + /// The environment. + /// Describes the parameters of the LDA process for each column pair. + public LatentDirichletAllocationEstimator(IHostEnvironment env, params LatentDirichletAllocationTransformer.ColumnInfo[] columns) + { + Contracts.CheckValue(env, nameof(env)); + _host = env.Register(nameof(LatentDirichletAllocationEstimator)); + _columns = columns.ToImmutableArray(); + } + + /// + /// Returns the schema that would be produced by the transformation. + /// + public SchemaShape GetOutputSchema(SchemaShape inputSchema) + { + _host.CheckValue(inputSchema, nameof(inputSchema)); + var result = inputSchema.Columns.ToDictionary(x => x.Name); + foreach (var colInfo in _columns) + { + if (!inputSchema.TryFindColumn(colInfo.Input, out var col)) + throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.Input); + if (col.ItemType.RawKind != DataKind.R4 || col.Kind == SchemaShape.Column.VectorKind.Scalar) + throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.Input, "a vector of floats", col.GetTypeString()); + + result[colInfo.Output] = new SchemaShape.Column(colInfo.Output, SchemaShape.Column.VectorKind.Vector, NumberType.R4, false); + } + + return new SchemaShape(result.Values); + } + + public LatentDirichletAllocationTransformer Fit(IDataView input) + { + return LatentDirichletAllocationTransformer.TrainLdaTransformer(_host, input, _columns.ToArray()); } } } diff --git a/src/Microsoft.ML.Transforms/Text/NgramHashTransform.cs b/src/Microsoft.ML.Transforms/Text/NgramHashingTransformer.cs similarity index 97% rename from src/Microsoft.ML.Transforms/Text/NgramHashTransform.cs rename to src/Microsoft.ML.Transforms/Text/NgramHashingTransformer.cs index 563093e39a..7ec307d115 100644 --- a/src/Microsoft.ML.Transforms/Text/NgramHashTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/NgramHashingTransformer.cs @@ -16,17 +16,17 @@ using Microsoft.ML.Runtime.Model; using Microsoft.ML.Transforms.Text; -[assembly: LoadableClass(typeof(NgramHashTransform), typeof(NgramHashTransform.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(typeof(NgramHashingTransformer), typeof(NgramHashingTransformer.Arguments), typeof(SignatureDataTransform), "Ngram Hash Transform", "NgramHashTransform", "NgramHash")] -[assembly: LoadableClass(typeof(NgramHashTransform), null, typeof(SignatureLoadDataTransform), - "Ngram Hash Transform", NgramHashTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(NgramHashingTransformer), null, typeof(SignatureLoadDataTransform), + "Ngram Hash Transform", NgramHashingTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Text { using Conditional = System.Diagnostics.ConditionalAttribute; - public sealed class NgramHashTransform : RowToRowMapperTransformBase + public sealed class NgramHashingTransformer : RowToRowMapperTransformBase { public sealed class Column : ManyToOneColumn { @@ -151,16 +151,16 @@ public sealed class Arguments private sealed class Bindings : ManyToOneColumnBindingsBase { public readonly VectorType[] Types; - private readonly NgramHashTransform _parent; + private readonly NgramHashingTransformer _parent; - public Bindings(Arguments args, ISchema schemaInput, NgramHashTransform parent) + public Bindings(Arguments args, ISchema schemaInput, NgramHashingTransformer parent) : base(args.Column, schemaInput, TestTypes) { Types = new VectorType[args.Column.Length]; _parent = parent; } - public Bindings(ModelLoadContext ctx, ISchema schemaInput, NgramHashTransform parent) + public Bindings(ModelLoadContext ctx, ISchema schemaInput, NgramHashingTransformer parent) : base(ctx, schemaInput, TestTypes) { Types = new VectorType[Infos.Length]; @@ -319,7 +319,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010002, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(NgramHashTransform).Assembly.FullName); + loaderAssemblyName: typeof(NgramHashingTransformer).Assembly.FullName); } private readonly Bindings _bindings; @@ -333,7 +333,7 @@ private static VersionInfo GetVersionInfo() /// /// Public constructor corresponding to SignatureDataTransform. /// - public NgramHashTransform(IHostEnvironment env, Arguments args, IDataView input) + public NgramHashingTransformer(IHostEnvironment env, Arguments args, IDataView input) : base(env, RegistrationName, input) { Host.CheckValue(args, nameof(args)); @@ -376,7 +376,7 @@ public NgramHashTransform(IHostEnvironment env, Arguments args, IDataView input) } } - private NgramHashTransform(IHost host, ModelLoadContext ctx, IDataView input) + private NgramHashingTransformer(IHost host, ModelLoadContext ctx, IDataView input) : base(host, input) { Host.AssertValue(ctx); @@ -398,14 +398,14 @@ private NgramHashTransform(IHost host, ModelLoadContext ctx, IDataView input) TextModelHelper.LoadAll(Host, ctx, _exes.Length, out _slotNames, out _slotNamesTypes); } - public static NgramHashTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + public static NgramHashingTransformer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { Contracts.CheckValue(env, nameof(env)); var h = env.Register(RegistrationName); h.CheckValue(ctx, nameof(ctx)); h.CheckValue(input, nameof(input)); ctx.CheckAtModel(GetVersionInfo()); - return h.Apply("Loading Model", ch => new NgramHashTransform(h, ctx, input)); + return h.Apply("Loading Model", ch => new NgramHashingTransformer(h, ctx, input)); } public override void Save(ModelSaveContext ctx) @@ -723,7 +723,7 @@ private sealed class RowCursor : SynchronizedCursorBase, IRowCursor public Schema Schema => _bindings.AsSchema; - public RowCursor(NgramHashTransform parent, IRowCursor input, bool[] active, FinderDecorator decorator = null) + public RowCursor(NgramHashingTransformer parent, IRowCursor input, bool[] active, FinderDecorator decorator = null) : base(parent.Host, input) { Ch.AssertValue(parent); @@ -777,7 +777,7 @@ private ValueGetter GetSrcGetter(int iinfo, int isrc) private sealed class InvertHashHelper { - private readonly NgramHashTransform _parent; + private readonly NgramHashingTransformer _parent; // One per output column (will be null if invert hashing is not specified for // this column). private readonly InvertHashCollector[] _iinfoToCollector; @@ -788,7 +788,7 @@ private sealed class InvertHashHelper private readonly string[][] _friendlyNames; private readonly int[] _invertHashMaxCounts; - public InvertHashHelper(NgramHashTransform parent, string[][] friendlyNames, Func inputPred, int[] invertHashMaxCounts) + public InvertHashHelper(NgramHashingTransformer parent, string[][] friendlyNames, Func inputPred, int[] invertHashMaxCounts) { Contracts.AssertValue(parent); Contracts.AssertValue(friendlyNames); diff --git a/src/Microsoft.ML.Transforms/Text/NgramTransform.cs b/src/Microsoft.ML.Transforms/Text/NgramTransform.cs index 56322f68f9..d606d42ff1 100644 --- a/src/Microsoft.ML.Transforms/Text/NgramTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/NgramTransform.cs @@ -2,47 +2,38 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using Float = System.Single; - -using System; -using System.Linq; -using System.Text; +using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Model; -using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Transforms.Text; +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using System.Text; -[assembly: LoadableClass(NgramTransform.Summary, typeof(NgramTransform), typeof(NgramTransform.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(NgramCountingTransformer.Summary, typeof(IDataTransform), typeof(NgramCountingTransformer), typeof(NgramCountingTransformer.Arguments), typeof(SignatureDataTransform), "Ngram Transform", "NgramTransform", "Ngram")] -[assembly: LoadableClass(NgramTransform.Summary, typeof(NgramTransform), null, typeof(SignatureLoadDataTransform), - "Ngram Transform", NgramTransform.LoaderSignature)] +[assembly: LoadableClass(NgramCountingTransformer.Summary, typeof(IDataTransform), typeof(NgramCountingTransformer), null, typeof(SignatureLoadDataTransform), + "Ngram Transform", NgramCountingTransformer.LoaderSignature)] + +[assembly: LoadableClass(NgramCountingTransformer.Summary, typeof(NgramCountingTransformer), null, typeof(SignatureLoadModel), + "Ngram Transform", NgramCountingTransformer.LoaderSignature)] + +[assembly: LoadableClass(typeof(IRowMapper), typeof(NgramCountingTransformer), null, typeof(SignatureLoadRowMapper), + "Ngram Transform", NgramCountingTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Text { using Conditional = System.Diagnostics.ConditionalAttribute; - public sealed class NgramTransform : OneToOneTransformBase + public sealed class NgramCountingTransformer : OneToOneTransformerBase { - /// - /// Weighting criteria: a statistical measure used to evaluate how important a word is to a document in a corpus. - /// This enumeration is serialized. - /// - public enum WeightingCriteria - { - [EnumValueDisplay("TF (Term Frequency)")] - Tf = 0, - - [EnumValueDisplay("IDF (Inverse Document Frequency)")] - Idf = 1, - - [EnumValueDisplay("TF-IDF")] - TfIdf = 2 - } - public sealed class Column : OneToOneColumn { [Argument(ArgumentType.AtMostOnce, HelpText = "Maximum ngram length", ShortName = "ngram")] @@ -61,7 +52,7 @@ public sealed class Column : OneToOneColumn public int[] MaxNumTerms = null; [Argument(ArgumentType.AtMostOnce, HelpText = "Statistical measure used to evaluate how important a word is to a document in a corpus")] - public WeightingCriteria? Weighting; + public NgramCountingEstimator.WeightingCriteria? Weighting; public static Column Parse(string str) { @@ -84,64 +75,141 @@ public bool TryUnparse(StringBuilder sb) public sealed class Arguments : TransformInputBase { - internal const int DefaultMaxTerms = 10000000; - [Argument(ArgumentType.Multiple, HelpText = "New column definition(s) (optional form: name:src)", ShortName = "col", SortOrder = 1)] public Column[] Column; [Argument(ArgumentType.AtMostOnce, HelpText = "Maximum ngram length", ShortName = "ngram")] - public int NgramLength = 2; + public int NgramLength = NgramCountingEstimator.Defaults.NgramLength; [Argument(ArgumentType.AtMostOnce, HelpText = "Whether to store all ngram lengths up to ngramLength, or only ngramLength", ShortName = "all")] - public bool AllLengths = true; + public bool AllLengths = NgramCountingEstimator.Defaults.AllLength; [Argument(ArgumentType.AtMostOnce, HelpText = "Maximum number of tokens to skip when constructing an ngram", ShortName = "skips")] - public int SkipLength = 0; + public int SkipLength = NgramCountingEstimator.Defaults.SkipLength; [Argument(ArgumentType.Multiple, HelpText = "Maximum number of ngrams to store in the dictionary", ShortName = "max")] - public int[] MaxNumTerms = new int[] { DefaultMaxTerms }; + public int[] MaxNumTerms = new int[] { NgramCountingEstimator.Defaults.MaxNumTerms }; [Argument(ArgumentType.AtMostOnce, HelpText = "The weighting criteria")] - public WeightingCriteria Weighting = WeightingCriteria.Tf; + public NgramCountingEstimator.WeightingCriteria Weighting = NgramCountingEstimator.Defaults.Weighting; } - private sealed class ColInfoEx + private const uint VerTfIdfSupported = 0x00010002; + + internal const string LoaderSignature = "NgramTransform"; + internal const string Summary = "Produces a bag of counts of ngrams (sequences of consecutive values of length 1-n) in a given vector of keys. " + + "It does so by building a dictionary of ngrams and using the id in the dictionary as the index in the bag."; + + internal const string UserName = "NGram Transform"; + + private static VersionInfo GetVersionInfo() { - // Position i, indicates whether the pool contains any (i+1)-grams - public readonly bool[] NonEmptyLevels; + return new VersionInfo( + modelSignature: "NGRAMTRN", + // verWrittenCur: 0x00010001, // Initial + // verWrittenCur: 0x00010002, // Add support for TF-IDF + verWrittenCur: 0x00010003, // Get rid of writing float size in model context + verReadableCur: 0x00010003, + verWeCanReadBack: 0x00010001, + loaderSignature: LoaderSignature, + loaderAssemblyName: typeof(NgramCountingTransformer).Assembly.FullName); + } + /// + /// Describes how the transformer handles one column pair. + /// + public sealed class ColumnInfo + { + public readonly string Input; + public readonly string Output; public readonly int NgramLength; public readonly int SkipLength; - - public readonly WeightingCriteria Weighting; - - public bool RequireIdf() + public readonly bool AllLengths; + public readonly NgramCountingEstimator.WeightingCriteria Weighting; + /// + /// Contains the maximum number of grams to store in the dictionary, for each level of ngrams, + /// from 1 (in position 0) up to ngramLength (in position ngramLength-1) + /// + public readonly ImmutableArray Limits; + + /// + /// Describes how the transformer handles one Gcn column pair. + /// + /// Name of input column. + /// Name of output column. + /// Maximum ngram length. + /// Maximum number of tokens to skip when constructing an ngram. + /// "Whether to store all ngram lengths up to ngramLength, or only ngramLength. + /// The weighting criteria. + /// Maximum number of ngrams to store in the dictionary. + public ColumnInfo(string input, string output, + int ngramLength = NgramCountingEstimator.Defaults.NgramLength, + int skipLength = NgramCountingEstimator.Defaults.SkipLength, + bool allLengths = NgramCountingEstimator.Defaults.AllLength, + NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.Defaults.Weighting, + int maxNumTerms = NgramCountingEstimator.Defaults.MaxNumTerms) : this(input, output, ngramLength, skipLength, allLengths, weighting, new int[] { maxNumTerms }) { - return Weighting == WeightingCriteria.Idf || Weighting == WeightingCriteria.TfIdf; } - public ColInfoEx(Column item, Arguments args) + internal ColumnInfo(string input, string output, + int ngramLength, + int skipLength, + bool allLengths, + NgramCountingEstimator.WeightingCriteria weighting, + int[] maxNumTerms) { - NgramLength = item.NgramLength ?? args.NgramLength; - Contracts.CheckUserArg(0 < NgramLength && NgramLength <= NgramBufferBuilder.MaxSkipNgramLength, nameof(item.NgramLength)); - SkipLength = item.SkipLength ?? args.SkipLength; - Contracts.CheckUserArg(0 <= SkipLength && SkipLength <= NgramBufferBuilder.MaxSkipNgramLength, nameof(item.SkipLength)); + Input = input; + Output = output; + NgramLength = ngramLength; + Contracts.CheckUserArg(0 < NgramLength && NgramLength <= NgramBufferBuilder.MaxSkipNgramLength, nameof(ngramLength)); + SkipLength = skipLength; if (NgramLength + SkipLength > NgramBufferBuilder.MaxSkipNgramLength) { - throw Contracts.ExceptUserArg(nameof(item.SkipLength), - "The sum of skipLength and ngramLength must be less than or equal to {0}", - NgramBufferBuilder.MaxSkipNgramLength); + throw Contracts.ExceptUserArg(nameof(skipLength), + $"The sum of skipLength and ngramLength must be less than or equal to {NgramBufferBuilder.MaxSkipNgramLength}"); + } + AllLengths = allLengths; + Weighting = weighting; + var limits = new int[ngramLength]; + if (!AllLengths) + { + Contracts.CheckUserArg(Utils.Size(maxNumTerms) == 0 || + Utils.Size(maxNumTerms) == 1 && maxNumTerms[0] > 0, nameof(maxNumTerms)); + limits[ngramLength - 1] = Utils.Size(maxNumTerms) == 0 ? NgramCountingEstimator.Defaults.MaxNumTerms : maxNumTerms[0]; + } + else + { + Contracts.CheckUserArg(Utils.Size(maxNumTerms) <= ngramLength, nameof(maxNumTerms)); + Contracts.CheckUserArg(Utils.Size(maxNumTerms) == 0 || maxNumTerms.All(i => i >= 0) && maxNumTerms[maxNumTerms.Length - 1] > 0, nameof(maxNumTerms)); + var extend = Utils.Size(maxNumTerms) == 0 ? NgramCountingEstimator.Defaults.MaxNumTerms : maxNumTerms[maxNumTerms.Length - 1]; + limits = Utils.BuildArray(ngramLength, i => i < Utils.Size(maxNumTerms) ? maxNumTerms[i] : extend); } - Contracts.CheckUserArg(Enum.IsDefined(typeof(WeightingCriteria), args.Weighting), nameof(args.Weighting)); - Weighting = item.Weighting ?? args.Weighting; + Limits = ImmutableArray.Create(limits); + } + } + private sealed class TransformInfo + { + // Position i, indicates whether the pool contains any (i+1)-grams + public readonly bool[] NonEmptyLevels; + public readonly int NgramLength; + public readonly int SkipLength; + public readonly NgramCountingEstimator.WeightingCriteria Weighting; + + public bool RequireIdf => Weighting == NgramCountingEstimator.WeightingCriteria.Idf || Weighting == NgramCountingEstimator.WeightingCriteria.TfIdf; + + public TransformInfo(ColumnInfo info) + { + NgramLength = info.NgramLength; + SkipLength = info.SkipLength; + Weighting = info.Weighting; NonEmptyLevels = new bool[NgramLength]; } - public ColInfoEx(ModelLoadContext ctx, bool readWeighting) + public TransformInfo(ModelLoadContext ctx, bool readWeighting) { Contracts.AssertValue(ctx); @@ -158,8 +226,8 @@ public ColInfoEx(ModelLoadContext ctx, bool readWeighting) Contracts.CheckDecode(NgramLength <= NgramBufferBuilder.MaxSkipNgramLength - SkipLength); if (readWeighting) - Weighting = (WeightingCriteria)ctx.Reader.ReadInt32(); - Contracts.CheckDecode(Enum.IsDefined(typeof(WeightingCriteria), Weighting)); + Weighting = (NgramCountingEstimator.WeightingCriteria)ctx.Reader.ReadInt32(); + Contracts.CheckDecode(Enum.IsDefined(typeof(NgramCountingEstimator.WeightingCriteria), Weighting)); NonEmptyLevels = ctx.Reader.ReadBoolArray(NgramLength); } @@ -178,343 +246,113 @@ public void Save(ModelSaveContext ctx) Contracts.Assert(0 <= SkipLength && SkipLength <= NgramBufferBuilder.MaxSkipNgramLength); Contracts.Assert(NgramLength + SkipLength <= NgramBufferBuilder.MaxSkipNgramLength); ctx.Writer.Write(SkipLength); - Contracts.Assert(Enum.IsDefined(typeof(WeightingCriteria), Weighting)); + Contracts.Assert(Enum.IsDefined(typeof(NgramCountingEstimator.WeightingCriteria), Weighting)); ctx.Writer.Write((int)Weighting); Contracts.Assert(Utils.Size(NonEmptyLevels) == NgramLength); ctx.Writer.WriteBoolBytesNoCount(NonEmptyLevels); } } - private const uint VerTfIdfSupported = 0x00010002; + private readonly ImmutableArray _transformInfos; - public const string LoaderSignature = "NgramTransform"; - internal const string Summary = "Produces a bag of counts of ngrams (sequences of consecutive values of length 1-n) in a given vector of keys. " - + "It does so by building a dictionary of ngrams and using the id in the dictionary as the index in the bag."; - - internal const string UserName = "NGram Transform"; - - private static VersionInfo GetVersionInfo() - { - return new VersionInfo( - modelSignature: "NGRAMTRN", - // verWrittenCur: 0x00010001, // Initial - verWrittenCur: 0x00010002, // Add support for TF-IDF - verReadableCur: 0x00010002, - verWeCanReadBack: 0x00010001, - loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(NgramTransform).Assembly.FullName); - } - - private readonly VectorType[] _types; - - // REVIEW: The slot names types are not really needed. They are only used to "remember" which new - // columns have slot names. - private readonly VectorType[] _slotNamesTypes; - - private readonly ColInfoEx[] _exes; // These contain the ngram maps private readonly SequencePool[] _ngramMaps; // Ngram inverse document frequencies private readonly double[][] _invDocFreqs; - private const string RegistrationName = "Ngram"; - - /// - /// Public constructor corresponding to SignatureDataTransform. - /// - public NgramTransform(IHostEnvironment env, Arguments args, IDataView input) - : base(env, RegistrationName, Contracts.CheckRef(args, nameof(args)).Column, input, TestType) + private static (string input, string output)[] GetColumnPairs(ColumnInfo[] columns) { - Host.AssertNonEmpty(Infos); - Host.Assert(Utils.Size(Infos) == Utils.Size(args.Column)); - - _exes = new ColInfoEx[Infos.Length]; - for (int iinfo = 0; iinfo < _exes.Length; iinfo++) - _exes[iinfo] = new ColInfoEx(args.Column[iinfo], args); - - _ngramMaps = Train(args, input, out _invDocFreqs); - - InitColumnTypeAndMetadata(out _types, out _slotNamesTypes); + Contracts.CheckValue(columns, nameof(columns)); + return columns.Select(x => (x.Input, x.Output)).ToArray(); } - private NgramTransform(IHost host, ModelLoadContext ctx, IDataView input) - : base(host, ctx, input, TestType) + protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCol) { - Host.AssertValue(ctx); - - // *** Binary format *** - // - // - // for each column - // ColInfoEx - // the ngram SequencePool - // the ngram inverse document frequencies - - _exes = new ColInfoEx[Infos.Length]; - _ngramMaps = new SequencePool[Infos.Length]; - _invDocFreqs = new double[Infos.Length][]; - for (int i = 0; i < Infos.Length; i++) - { - _exes[i] = new ColInfoEx(ctx, ctx.Header.ModelVerWritten >= VerTfIdfSupported); - _ngramMaps[i] = new SequencePool(ctx.Reader); - - if (ctx.Header.ModelVerWritten >= VerTfIdfSupported) - { - _invDocFreqs[i] = ctx.Reader.ReadDoubleArray(); - for (int j = 0; j < Utils.Size(_invDocFreqs[i]); j++) - Host.CheckDecode(_invDocFreqs[i][j] >= 0); - } - } - - InitColumnTypeAndMetadata(out _types, out _slotNamesTypes); + var type = inputSchema.GetColumnType(srcCol); + if (!NgramCountingEstimator.IsColumnTypeValid(type)) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].input, NgramCountingEstimator.ExpectedColumnType, type.ToString()); } - public static NgramTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + internal NgramCountingTransformer(IHostEnvironment env, IDataView input, ColumnInfo[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(NgramCountingTransformer)), GetColumnPairs(columns)) { - Contracts.CheckValue(env, nameof(env)); - var h = env.Register(RegistrationName); - h.CheckValue(ctx, nameof(ctx)); - h.CheckValue(input, nameof(input)); - ctx.CheckAtModel(GetVersionInfo()); - return h.Apply("Loading Model", - ch => - { - // *** Binary format *** - // int: sizeof(Float) - // - int cbFloat = ctx.Reader.ReadInt32(); - ch.CheckDecode(cbFloat == sizeof(Float)); - return new NgramTransform(h, ctx, input); - }); - } - - public override void Save(ModelSaveContext ctx) - { - Host.CheckValue(ctx, nameof(ctx)); - ctx.CheckAtModel(); - ctx.SetVersionInfo(GetVersionInfo()); - - // *** Binary format *** - // int: sizeof(Float) - // - // for each added column - // ColInfoEx - // the ngram SequencePool - // the ngram inverse document frequencies - - ctx.Writer.Write(sizeof(Float)); - SaveBase(ctx); - var ngramsNames = default(VBuffer>); - for (int i = 0; i < _exes.Length; i++) + var transformInfos = new TransformInfo[columns.Length]; + for (int i = 0; i < columns.Length; i++) { - _exes[i].Save(ctx); - _ngramMaps[i].Save(ctx.Writer); - ctx.Writer.WriteDoubleArray(_invDocFreqs[i]); - - if (_slotNamesTypes[i] != null) - { - GetSlotNames(i, ref ngramsNames); - Host.Assert(_ngramMaps[i].Count == ngramsNames.Count); - Host.Assert(ngramsNames.IsDense); - ctx.SaveTextStream(string.Format("{0}-ngrams.txt", Infos[i].Name), - writer => - { - writer.WriteLine("# Number of Ngrams terms = {0}", ngramsNames.Count); - for (int j = 0; j < ngramsNames.Count; j++) - writer.WriteLine("{0}\t{1}", j, ngramsNames.Values[j]); - }); - } + input.Schema.TryGetColumnIndex(columns[i].Input, out int srcCol); + var typeSrc = input.Schema.GetColumnType(srcCol); + transformInfos[i] = new TransformInfo(columns[i]); } + _transformInfos = transformInfos.ToImmutableArray(); + _ngramMaps = Train(Host, columns, _transformInfos, input, out _invDocFreqs); } - private static string TestType(ColumnType type) + private static SequencePool[] Train(IHostEnvironment env, ColumnInfo[] columns, ImmutableArray transformInfos, IDataView trainingData, out double[][] invDocFreqs) { - const string reason = "Expected vector of Key type, and Key is convertable to U4"; - Contracts.AssertValue(type); - if (!type.IsVector) - return reason; - if (!type.ItemType.IsKey) - return reason; - // Can only accept key types that can be converted to U4. - if (type.ItemType.KeyCount == 0 && type.ItemType.RawKind > DataKind.U4) - return reason; - return null; - } - - private void InitColumnTypeAndMetadata(out VectorType[] types, out VectorType[] slotNamesTypes) - { - types = new VectorType[Infos.Length]; - slotNamesTypes = new VectorType[Infos.Length]; - - var md = Metadata; - for (int iinfo = 0; iinfo < _exes.Length; iinfo++) - { - types[iinfo] = new VectorType(NumberType.Float, _ngramMaps[iinfo].Count); - var info = Infos[iinfo]; - if (!Source.Schema.HasKeyNames(info.Source, info.TypeSrc.ItemType.KeyCount)) - continue; - - using (var bldr = md.BuildMetadata(iinfo)) - { - if (_ngramMaps[iinfo].Count > 0) - { - slotNamesTypes[iinfo] = new VectorType(TextType.Instance, _ngramMaps[iinfo].Count); - bldr.AddGetter>>(MetadataUtils.Kinds.SlotNames, - slotNamesTypes[iinfo], GetSlotNames); - } - } - } - md.Seal(); - } - - private void GetSlotNames(int iinfo, ref VBuffer> dst) - { - Host.Assert(0 <= iinfo && iinfo < Infos.Length); - Host.Assert(_slotNamesTypes[iinfo] != null); - - var keyCount = Infos[iinfo].TypeSrc.ItemType.KeyCount; - Host.Assert(Source.Schema.HasKeyNames(Infos[iinfo].Source, keyCount)); - - var unigramNames = new VBuffer>(); - - // Get the key values of the unigrams. - Source.Schema.GetMetadata(MetadataUtils.Kinds.KeyValues, Infos[iinfo].Source, ref unigramNames); - Host.Check(unigramNames.Length == keyCount); - - var pool = _ngramMaps[iinfo]; - var values = dst.Values; - - var ngramCount = pool.Count; - if (Utils.Size(values) < ngramCount) - Array.Resize(ref values, ngramCount); - - StringBuilder sb = new StringBuilder(); - uint[] ngram = new uint[_exes[iinfo].NgramLength]; - for (int slot = 0; slot < pool.Count; slot++) - { - var n = pool.GetById(slot, ref ngram); - Host.Assert(n >= 0); - - // Get the unigrams composing the current ngram. - ComposeNgramString(ngram, n, sb, keyCount, - unigramNames.GetItemOrDefault); - values[slot] = sb.ToString().AsMemory(); - } - - dst = new VBuffer>(ngramCount, values, dst.Indices); - } - - private delegate void TermGetter(int index, ref ReadOnlyMemory term); - - private void ComposeNgramString(uint[] ngram, int count, StringBuilder sb, int keyCount, TermGetter termGetter) - { - Host.AssertValue(sb); - Host.AssertValue(ngram); - Host.Assert(keyCount > 0); - - sb.Clear(); - ReadOnlyMemory term = default; - string sep = ""; - for (int iterm = 0; iterm < count; iterm++) - { - sb.Append(sep); - sep = "|"; - var unigram = ngram[iterm]; - if (unigram <= 0 || unigram > keyCount) - sb.Append("*"); - else - { - termGetter((int)unigram - 1, ref term); - sb.AppendMemory(term); - } - } - } - - private SequencePool[] Train(Arguments args, IDataView trainingData, out double[][] invDocFreqs) - { - // Contains the maximum number of grams to store in the dictionary, for each level of ngrams, - // from 1 (in position 0) up to ngramLength (in position ngramLength-1) - var lims = new int[Infos.Length][]; - for (int iinfo = 0; iinfo < Infos.Length; iinfo++) - { - var all = args.Column[iinfo].AllLengths ?? args.AllLengths; - var ngramLength = _exes[iinfo].NgramLength; - var maxNumTerms = Utils.Size(args.Column[iinfo].MaxNumTerms) > 0 ? args.Column[iinfo].MaxNumTerms : args.MaxNumTerms; - if (!all) - { - Host.CheckUserArg(Utils.Size(maxNumTerms) == 0 || - Utils.Size(maxNumTerms) == 1 && maxNumTerms[0] > 0, nameof(args.MaxNumTerms)); - lims[iinfo] = new int[ngramLength]; - lims[iinfo][ngramLength - 1] = Utils.Size(maxNumTerms) == 0 ? Arguments.DefaultMaxTerms : maxNumTerms[0]; - } - else - { - Host.CheckUserArg(Utils.Size(maxNumTerms) <= ngramLength, nameof(args.MaxNumTerms)); - Host.CheckUserArg(Utils.Size(maxNumTerms) == 0 || maxNumTerms.All(i => i >= 0) && maxNumTerms[maxNumTerms.Length - 1] > 0, nameof(args.MaxNumTerms)); - var extend = Utils.Size(maxNumTerms) == 0 ? Arguments.DefaultMaxTerms : maxNumTerms[maxNumTerms.Length - 1]; - lims[iinfo] = Utils.BuildArray(ngramLength, - i => i < Utils.Size(maxNumTerms) ? maxNumTerms[i] : extend); - } - } - - var helpers = new NgramBufferBuilder[Infos.Length]; - var getters = new ValueGetter>[Infos.Length]; - var src = new VBuffer[Infos.Length]; + var helpers = new NgramBufferBuilder[columns.Length]; + var getters = new ValueGetter>[columns.Length]; + var src = new VBuffer[columns.Length]; // Keep track of how many grams are in the pool for each value of n. Position // i in _counts counts how many (i+1)-grams are in the pool for column iinfo. - var counts = new int[Infos.Length][]; - var ngramMaps = new SequencePool[Infos.Length]; - bool[] activeInput = new bool[trainingData.Schema.ColumnCount]; - foreach (var info in Infos) - activeInput[info.Source] = true; + var counts = new int[columns.Length][]; + var ngramMaps = new SequencePool[columns.Length]; + var activeInput = new bool[trainingData.Schema.ColumnCount]; + var srcTypes = new ColumnType[columns.Length]; + var srcCols = new int[columns.Length]; + for (int iinfo = 0; iinfo < columns.Length; iinfo++) + { + trainingData.Schema.TryGetColumnIndex(columns[iinfo].Input, out srcCols[iinfo]); + srcTypes[iinfo] = trainingData.Schema[srcCols[iinfo]].Type; + activeInput[srcCols[iinfo]] = true; + } using (var cursor = trainingData.GetRowCursor(col => activeInput[col])) - using (var pch = Host.StartProgressChannel("Building n-gram dictionary")) + using (var pch = env.StartProgressChannel("Building n-gram dictionary")) { - for (int iinfo = 0; iinfo < Infos.Length; iinfo++) + for (int iinfo = 0; iinfo < columns.Length; iinfo++) { - Host.Assert(Infos[iinfo].TypeSrc.IsVector && Infos[iinfo].TypeSrc.ItemType.IsKey); - var ngramLength = _exes[iinfo].NgramLength; - var skipLength = _exes[iinfo].SkipLength; + env.Assert(srcTypes[iinfo].IsVector && srcTypes[iinfo].ItemType.IsKey); + var ngramLength = columns[iinfo].NgramLength; + var skipLength = columns[iinfo].SkipLength; - getters[iinfo] = RowCursorUtils.GetVecGetterAs(NumberType.U4, cursor, Infos[iinfo].Source); - src[iinfo] = default(VBuffer); + getters[iinfo] = RowCursorUtils.GetVecGetterAs(NumberType.U4, cursor, srcCols[iinfo]); + src[iinfo] = default; counts[iinfo] = new int[ngramLength]; ngramMaps[iinfo] = new SequencePool(); // Note: GetNgramIdFinderAdd will control how many ngrams of a specific length will // be added (using lims[iinfo]), therefore we set slotLim to the maximum helpers[iinfo] = new NgramBufferBuilder(ngramLength, skipLength, Utils.ArrayMaxSize, - GetNgramIdFinderAdd(counts[iinfo], lims[iinfo], ngramMaps[iinfo], _exes[iinfo].RequireIdf(), Host)); + GetNgramIdFinderAdd(env, counts[iinfo], columns[iinfo].Limits, ngramMaps[iinfo], transformInfos[iinfo].RequireIdf)); } int cInfoFull = 0; - bool[] infoFull = new bool[Infos.Length]; + bool[] infoFull = new bool[columns.Length]; - invDocFreqs = new double[Infos.Length][]; + invDocFreqs = new double[columns.Length][]; long totalDocs = 0; - Double rowCount = trainingData.GetRowCount(true) ?? Double.NaN; - var buffers = new VBuffer[Infos.Length]; + var rowCount = trainingData.GetRowCount() ?? double.NaN; + var buffers = new VBuffer[columns.Length]; pch.SetHeader(new ProgressHeader(new[] { "Total n-grams" }, new[] { "documents" }), e => e.SetProgress(0, totalDocs, rowCount)); - while (cInfoFull < Infos.Length && cursor.MoveNext()) + while (cInfoFull < columns.Length && cursor.MoveNext()) { totalDocs++; - for (int iinfo = 0; iinfo < Infos.Length; iinfo++) + for (int iinfo = 0; iinfo < columns.Length; iinfo++) { getters[iinfo](ref src[iinfo]); - var keyCount = (uint)Infos[iinfo].TypeSrc.ItemType.KeyCount; + var keyCount = (uint)srcTypes[iinfo].ItemType.KeyCount; if (keyCount == 0) keyCount = uint.MaxValue; if (!infoFull[iinfo]) { - if (_exes[iinfo].RequireIdf()) + if (transformInfos[iinfo].RequireIdf) helpers[iinfo].Reset(); helpers[iinfo].AddNgrams(in src[iinfo], 0, keyCount); - if (_exes[iinfo].RequireIdf()) + if (transformInfos[iinfo].RequireIdf) { int totalNgrams = counts[iinfo].Sum(); Utils.EnsureSize(ref invDocFreqs[iinfo], totalNgrams); @@ -526,25 +364,25 @@ private SequencePool[] Train(Arguments args, IDataView trainingData, out double[ } } } - AssertValid(counts[iinfo], lims[iinfo], ngramMaps[iinfo]); + AssertValid(env, counts[iinfo], columns[iinfo].Limits, ngramMaps[iinfo]); } } pch.Checkpoint(counts.Sum(c => c.Sum()), totalDocs); - for (int iinfo = 0; iinfo < Infos.Length; iinfo++) + for (int iinfo = 0; iinfo < columns.Length; iinfo++) { for (int i = 0; i < Utils.Size(invDocFreqs[iinfo]); i++) if (invDocFreqs[iinfo][i] != 0) invDocFreqs[iinfo][i] = Math.Log(totalDocs / invDocFreqs[iinfo][i]); } - for (int iinfo = 0; iinfo < Infos.Length; iinfo++) + for (int iinfo = 0; iinfo < columns.Length; iinfo++) { - AssertValid(counts[iinfo], lims[iinfo], ngramMaps[iinfo]); + AssertValid(env, counts[iinfo], columns[iinfo].Limits, ngramMaps[iinfo]); - int ngramLength = _exes[iinfo].NgramLength; + int ngramLength = transformInfos[iinfo].NgramLength; for (int i = 0; i < ngramLength; i++) - _exes[iinfo].NonEmptyLevels[i] = counts[iinfo][i] > 0; + transformInfos[iinfo].NonEmptyLevels[i] = counts[iinfo][i] > 0; } return ngramMaps; @@ -552,36 +390,36 @@ private SequencePool[] Train(Arguments args, IDataView trainingData, out double[ } [Conditional("DEBUG")] - private void AssertValid(int[] counts, int[] lims, SequencePool pool) + private static void AssertValid(IHostEnvironment env, int[] counts, ImmutableArray lims, SequencePool pool) { int count = 0; int countFull = 0; for (int i = 0; i < lims.Length; i++) { - Host.Assert(counts[i] >= 0); - Host.Assert(counts[i] <= lims[i]); + env.Assert(counts[i] >= 0); + env.Assert(counts[i] <= lims[i]); if (counts[i] == lims[i]) countFull++; count += counts[i]; } - Host.Assert(count == pool.Count); + env.Assert(count == pool.Count); } - private static NgramIdFinder GetNgramIdFinderAdd(int[] counts, int[] lims, SequencePool pool, bool requireIdf, IHost host) + private static NgramIdFinder GetNgramIdFinderAdd(IHostEnvironment env, int[] counts, ImmutableArray lims, SequencePool pool, bool requireIdf) { - Contracts.AssertValue(host); - host.Assert(Utils.Size(lims) > 0); - host.Assert(Utils.Size(lims) == Utils.Size(counts)); + Contracts.AssertValue(env); + env.Assert(lims.Length > 0); + env.Assert(lims.Length == Utils.Size(counts)); int numFull = lims.Count(l => l <= 0); int ngramLength = lims.Length; return (uint[] ngram, int lim, int icol, ref bool more) => { - host.Assert(0 < lim && lim <= Utils.Size(ngram)); - host.Assert(lim <= Utils.Size(counts)); - host.Assert(lim <= Utils.Size(lims)); - host.Assert(icol == 0); + env.Assert(0 < lim && lim <= Utils.Size(ngram)); + env.Assert(lim <= Utils.Size(counts)); + env.Assert(lim <= lims.Length); + env.Assert(icol == 0); var max = lim - 1; int slot = -1; @@ -600,101 +438,443 @@ private static NgramIdFinder GetNgramIdFinderAdd(int[] counts, int[] lims, Seque }; } - private NgramIdFinder GetNgramIdFinder(int iinfo) + // Factory method for SignatureLoadDataTransform. + private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + => Create(env, ctx).MakeDataTransform(input); + + // Factory method for SignatureLoadRowMapper. + private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) + => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); + + private NgramCountingTransformer(IHost host, ModelLoadContext ctx) : + base(host, ctx) { - return - (uint[] ngram, int lim, int icol, ref bool more) => + var columnsLength = ColumnPairs.Length; + // *** Binary format *** + // + // + // for each column + // _transformInfo + // the ngram SequencePool + // the ngram inverse document frequencies + var transformInfos = new TransformInfo[columnsLength]; + _ngramMaps = new SequencePool[columnsLength]; + _invDocFreqs = new double[columnsLength][]; + for (int i = 0; i < columnsLength; i++) + { + transformInfos[i] = new TransformInfo(ctx, ctx.Header.ModelVerWritten >= VerTfIdfSupported); + _ngramMaps[i] = new SequencePool(ctx.Reader); + + if (ctx.Header.ModelVerWritten >= VerTfIdfSupported) { - Host.Assert(0 < lim && lim <= Utils.Size(ngram)); - Host.Assert(lim <= Utils.Size(_exes[iinfo].NonEmptyLevels)); + _invDocFreqs[i] = ctx.Reader.ReadDoubleArray(); + for (int j = 0; j < Utils.Size(_invDocFreqs[i]); j++) + Host.CheckDecode(_invDocFreqs[i][j] >= 0); + } + } + _transformInfos = transformInfos.ToImmutableArray(); + } + + // Factory method for SignatureDataTransform. + internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) + { + Contracts.CheckValue(env, nameof(env)); + env.CheckValue(args, nameof(args)); + env.CheckValue(input, nameof(input)); + + env.CheckValue(args.Column, nameof(args.Column)); + var cols = new ColumnInfo[args.Column.Length]; + using (var ch = env.Start("ValidateArgs")) + { - if (!_exes[iinfo].NonEmptyLevels[lim - 1]) - return -1; - return _ngramMaps[iinfo].Get(ngram, 0, lim); + for (int i = 0; i < cols.Length; i++) + { + var item = args.Column[i]; + var maxNumTerms = Utils.Size(item.MaxNumTerms) > 0 ? item.MaxNumTerms : args.MaxNumTerms; + cols[i] = new ColumnInfo(item.Source ?? item.Name, + item.Name, + item.NgramLength ?? args.NgramLength, + item.SkipLength ?? args.SkipLength, + item.AllLengths ?? args.AllLengths, + item.Weighting ?? args.Weighting, + maxNumTerms); }; + } + return new NgramCountingTransformer(env, input, cols).MakeDataTransform(input); + } + + // Factory method for SignatureLoadModel. + private static NgramCountingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + { + Contracts.CheckValue(env, nameof(env)); + var host = env.Register(nameof(NgramCountingTransformer)); + + host.CheckValue(ctx, nameof(ctx)); + ctx.CheckAtModel(GetVersionInfo()); + if (ctx.Header.ModelVerWritten < 0x00010003) + { + int cbFloat = ctx.Reader.ReadInt32(); + env.CheckDecode(cbFloat == sizeof(float)); + } + return new NgramCountingTransformer(host, ctx); } - protected override ColumnType GetColumnTypeCore(int iinfo) + public override void Save(ModelSaveContext ctx) { - Host.Check(0 <= iinfo & iinfo < Infos.Length); - return _types[iinfo]; + Host.CheckValue(ctx, nameof(ctx)); + ctx.CheckAtModel(); + ctx.SetVersionInfo(GetVersionInfo()); + // *** Binary format *** + // + // for each added column + // _transformInfo + // the ngram SequencePool + // the ngram inverse document frequencies + SaveColumns(ctx); + for (int i = 0; i < _transformInfos.Length; i++) + { + _transformInfos[i].Save(ctx); + _ngramMaps[i].Save(ctx.Writer); + ctx.Writer.WriteDoubleArray(_invDocFreqs[i]); + } } - protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, out Action disposer) + protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); + + private sealed class Mapper : OneToOneMapperBase { - Host.AssertValueOrNull(ch); - Host.AssertValue(input); - Host.Assert(0 <= iinfo && iinfo < Infos.Length); - Host.Assert(Infos[iinfo].TypeSrc.IsVector); - Host.Assert(Infos[iinfo].TypeSrc.ItemType.IsKey); - - disposer = null; - - var getSrc = RowCursorUtils.GetVecGetterAs(NumberType.U4, input, Infos[iinfo].Source); - var src = default(VBuffer); - var bldr = new NgramBufferBuilder(_exes[iinfo].NgramLength, _exes[iinfo].SkipLength, - _ngramMaps[iinfo].Count, GetNgramIdFinder(iinfo)); - var keyCount = (uint)Infos[iinfo].TypeSrc.ItemType.KeyCount; - if (keyCount == 0) - keyCount = uint.MaxValue; - - ValueGetter> del; - switch (_exes[iinfo].Weighting) + private readonly ColumnType[] _srcTypes; + private readonly int[] _srcCols; + private readonly ColumnType[] _types; + private readonly NgramCountingTransformer _parent; + + public Mapper(NgramCountingTransformer parent, Schema inputSchema) + : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { - case WeightingCriteria.TfIdf: - Host.AssertValue(_invDocFreqs[iinfo]); - del = - (ref VBuffer dst) => - { - getSrc(ref src); - if (!bldr.IsEmpty) + _parent = parent; + _types = new ColumnType[_parent.ColumnPairs.Length]; + _srcTypes = new ColumnType[_parent.ColumnPairs.Length]; + _srcCols = new int[_parent.ColumnPairs.Length]; + for (int i = 0; i < _parent.ColumnPairs.Length; i++) + { + _types[i] = new VectorType(NumberType.Float, _parent._ngramMaps[i].Count); + inputSchema.TryGetColumnIndex(_parent.ColumnPairs[i].input, out _srcCols[i]); + _srcTypes[i] = inputSchema.GetColumnType(_srcCols[i]); + } + } + + protected override Schema.Column[] GetOutputColumnsCore() + { + var result = new Schema.Column[_parent.ColumnPairs.Length]; + for (int i = 0; i < _parent.ColumnPairs.Length; i++) + { + var builder = new Schema.Metadata.Builder(); + AddMetadata(i, builder); + + result[i] = new Schema.Column(_parent.ColumnPairs[i].output, _types[i], builder.GetMetadata()); + } + return result; + } + + private void AddMetadata(int iinfo, Schema.Metadata.Builder builder) + { + if (InputSchema.HasKeyValues(_srcCols[iinfo], _srcTypes[iinfo].ItemType.KeyCount)) + { + ValueGetter>> getter = (ref VBuffer> dst) => + { + GetSlotNames(iinfo, _parent._ngramMaps[iinfo].Count, ref dst); + }; + + var slotNamesType = new VectorType(TextType.Instance, _parent._ngramMaps[iinfo].Count); + builder.AddSlotNames(_parent._ngramMaps[iinfo].Count, getter); + } + } + + private void GetSlotNames(int iinfo, int size, ref VBuffer> dst) + { + Host.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); + + var keyCount = _srcTypes[iinfo].ItemType.KeyCount; + Host.Assert(InputSchema.HasKeyValues(_srcCols[iinfo], keyCount)); + + var unigramNames = new VBuffer>(); + + // Get the key values of the unigrams. + InputSchema.GetMetadata(MetadataUtils.Kinds.KeyValues, _srcCols[iinfo], ref unigramNames); + Host.Check(unigramNames.Length == keyCount); + + var pool = _parent._ngramMaps[iinfo]; + + var ngramCount = pool.Count; + var dstEditor = VBufferEditor.Create(ref dst, ngramCount); + + StringBuilder sb = new StringBuilder(); + uint[] ngram = new uint[_parent._transformInfos[iinfo].NgramLength]; + for (int slot = 0; slot < pool.Count; slot++) + { + var n = pool.GetById(slot, ref ngram); + Host.Assert(n >= 0); + + // Get the unigrams composing the current ngram. + ComposeNgramString(ngram, n, sb, keyCount, + unigramNames.GetItemOrDefault); + dstEditor.Values[slot] = sb.ToString().AsMemory(); + } + + dst = dstEditor.Commit(); + } + + private delegate void TermGetter(int index, ref ReadOnlyMemory term); + + private void ComposeNgramString(uint[] ngram, int count, StringBuilder sb, int keyCount, TermGetter termGetter) + { + Host.AssertValue(sb); + Host.AssertValue(ngram); + Host.Assert(keyCount > 0); + + sb.Clear(); + ReadOnlyMemory term = default; + string sep = ""; + for (int iterm = 0; iterm < count; iterm++) + { + sb.Append(sep); + sep = "|"; + var unigram = ngram[iterm]; + if (unigram <= 0 || unigram > keyCount) + sb.Append("*"); + else + { + termGetter((int)unigram - 1, ref term); + sb.AppendMemory(term); + } + } + } + + private NgramIdFinder GetNgramIdFinder(int iinfo) + { + return + (uint[] ngram, int lim, int icol, ref bool more) => + { + Host.Assert(0 < lim && lim <= Utils.Size(ngram)); + Host.Assert(lim <= Utils.Size(_parent._transformInfos[iinfo].NonEmptyLevels)); + + if (!_parent._transformInfos[iinfo].NonEmptyLevels[lim - 1]) + return -1; + return _parent._ngramMaps[iinfo].Get(ngram, 0, lim); + }; + } + + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + { + Contracts.AssertValue(input); + Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); + disposer = null; + + var getSrc = RowCursorUtils.GetVecGetterAs(NumberType.U4, input, _srcCols[iinfo]); + var src = default(VBuffer); + var bldr = new NgramBufferBuilder(_parent._transformInfos[iinfo].NgramLength, _parent._transformInfos[iinfo].SkipLength, + _parent._ngramMaps[iinfo].Count, GetNgramIdFinder(iinfo)); + var keyCount = (uint)_srcTypes[iinfo].ItemType.KeyCount; + if (keyCount == 0) + keyCount = uint.MaxValue; + + ValueGetter> del; + switch (_parent._transformInfos[iinfo].Weighting) + { + case NgramCountingEstimator.WeightingCriteria.TfIdf: + Host.AssertValue(_parent._invDocFreqs[iinfo]); + del = + (ref VBuffer dst) => { - bldr.Reset(); - bldr.AddNgrams(in src, 0, keyCount); - bldr.GetResult(ref dst); - VBufferUtils.Apply(ref dst, (int i, ref Float v) => v = (Float)(v * _invDocFreqs[iinfo][i])); - } - else - dst = new VBuffer(0, dst.Values, dst.Indices); - }; - break; - case WeightingCriteria.Idf: - Host.AssertValue(_invDocFreqs[iinfo]); - del = - (ref VBuffer dst) => - { - getSrc(ref src); - if (!bldr.IsEmpty) + getSrc(ref src); + if (!bldr.IsEmpty) + { + bldr.Reset(); + bldr.AddNgrams(in src, 0, keyCount); + bldr.GetResult(ref dst); + VBufferUtils.Apply(ref dst, (int i, ref float v) => v = (float)(v * _parent._invDocFreqs[iinfo][i])); + } + else + VBufferUtils.Resize(ref dst, 0); + }; + break; + case NgramCountingEstimator.WeightingCriteria.Idf: + Host.AssertValue(_parent._invDocFreqs[iinfo]); + del = + (ref VBuffer dst) => { - bldr.Reset(); - bldr.AddNgrams(in src, 0, keyCount); - bldr.GetResult(ref dst); - VBufferUtils.Apply(ref dst, (int i, ref Float v) => v = v >= 1 ? (Float)_invDocFreqs[iinfo][i] : 0); - } - else - dst = new VBuffer(0, dst.Values, dst.Indices); - }; - break; - case WeightingCriteria.Tf: - del = - (ref VBuffer dst) => - { - getSrc(ref src); - if (!bldr.IsEmpty) + getSrc(ref src); + if (!bldr.IsEmpty) + { + bldr.Reset(); + bldr.AddNgrams(in src, 0, keyCount); + bldr.GetResult(ref dst); + VBufferUtils.Apply(ref dst, (int i, ref float v) => v = v >= 1 ? (float)_parent._invDocFreqs[iinfo][i] : 0); + } + else + VBufferUtils.Resize(ref dst, 0); + }; + break; + case NgramCountingEstimator.WeightingCriteria.Tf: + del = + (ref VBuffer dst) => { - bldr.Reset(); - bldr.AddNgrams(in src, 0, keyCount); - bldr.GetResult(ref dst); - } - else - dst = new VBuffer(0, dst.Values, dst.Indices); - }; - break; - default: - throw Host.Except("Unsupported weighting criteria"); + getSrc(ref src); + if (!bldr.IsEmpty) + { + bldr.Reset(); + bldr.AddNgrams(in src, 0, keyCount); + bldr.GetResult(ref dst); + } + else + VBufferUtils.Resize(ref dst, 0); + }; + break; + default: + throw Host.Except("Unsupported weighting criteria"); + } + return del; } + } + } - return del; + /// + /// Produces a bag of counts of ngrams(sequences of consecutive values of length 1-n) in a given vector of keys. + /// It does so by building a dictionary of ngrams and using the id in the dictionary as the index in the bag. + /// + public sealed class NgramCountingEstimator : IEstimator + { + /// + /// Weighting criteria: a statistical measure used to evaluate how important a word is to a document in a corpus. + /// This enumeration is serialized. + /// + public enum WeightingCriteria + { + [EnumValueDisplay("TF (Term Frequency)")] + Tf = 0, + + [EnumValueDisplay("IDF (Inverse Document Frequency)")] + Idf = 1, + + [EnumValueDisplay("TF-IDF")] + TfIdf = 2 + } + + internal static class Defaults + { + public const int NgramLength = 2; + public const bool AllLength = true; + public const int SkipLength = 0; + public const int MaxNumTerms = 10000000; + public const WeightingCriteria Weighting = WeightingCriteria.Tf; + } + + private readonly IHost _host; + private readonly NgramCountingTransformer.ColumnInfo[] _columns; + + /// + /// Produces a bag of counts of ngrams (sequences of consecutive words) in + /// and outputs bag of word vector as + /// + /// The environment. + /// The column containing text to compute bag of word vector. + /// The column containing bag of word vector. Null means is replaced. + /// Ngram length. + /// Maximum number of tokens to skip when constructing an ngram. + /// Whether to include all ngram lengths up to or only . + /// Maximum number of ngrams to store in the dictionary. + /// Statistical measure used to evaluate how important a word is to a document in a corpus. + public NgramCountingEstimator(IHostEnvironment env, + string inputColumn, + string outputColumn = null, + int ngramLength = Defaults.NgramLength, + int skipLength = Defaults.SkipLength, + bool allLengths = Defaults.AllLength, + int maxNumTerms = Defaults.MaxNumTerms, + WeightingCriteria weighting = Defaults.Weighting) + : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, ngramLength, skipLength, allLengths, maxNumTerms, weighting) + { + } + + /// + /// Produces a bag of counts of ngrams (sequences of consecutive words) in + /// and outputs bag of word vector for each output in + /// + /// The environment. + /// Pairs of columns to compute bag of word vector. + /// Ngram length. + /// Maximum number of tokens to skip when constructing an ngram. + /// Whether to include all ngram lengths up to or only . + /// Maximum number of ngrams to store in the dictionary. + /// Statistical measure used to evaluate how important a word is to a document in a corpus. + public NgramCountingEstimator(IHostEnvironment env, + (string input, string output)[] columns, + int ngramLength = Defaults.NgramLength, + int skipLength = Defaults.SkipLength, + bool allLengths = Defaults.AllLength, + int maxNumTerms = Defaults.MaxNumTerms, + WeightingCriteria weighting = Defaults.Weighting) + : this(env, columns.Select(x => new NgramCountingTransformer.ColumnInfo(x.input, x.output, ngramLength, skipLength, allLengths, weighting, maxNumTerms)).ToArray()) + { + } + + /// + /// Produces a bag of counts of ngrams (sequences of consecutive words) in + /// and outputs bag of word vector for each output in + /// + /// The environment. + /// Array of columns with information how to transform data. + public NgramCountingEstimator(IHostEnvironment env, params NgramCountingTransformer.ColumnInfo[] columns) + { + Contracts.CheckValue(env, nameof(env)); + _host = env.Register(nameof(NgramCountingEstimator)); + _columns = columns; + } + + public NgramCountingTransformer Fit(IDataView input) => new NgramCountingTransformer(_host, input, _columns); + + internal static bool IsColumnTypeValid(ColumnType type) + { + if (!type.IsVector) + return false; + if (!type.ItemType.IsKey) + return false; + // Can only accept key types that can be converted to U4. + if (type.ItemType.KeyCount == 0 && type.ItemType.RawKind > DataKind.U4) + return false; + return true; + } + + internal static bool IsSchemaColumnValid(SchemaShape.Column col) + { + if (col.Kind == SchemaShape.Column.VectorKind.Scalar) + return false; + if (!col.IsKey) + return false; + // Can only accept key types that can be converted to U4. + if (col.ItemType.RawKind > DataKind.U4) + return false; + return true; + } + + internal const string ExpectedColumnType = "Expected vector of Key type, and Key is convertable to U4"; + + public SchemaShape GetOutputSchema(SchemaShape inputSchema) + { + _host.CheckValue(inputSchema, nameof(inputSchema)); + var result = inputSchema.Columns.ToDictionary(x => x.Name); + foreach (var colInfo in _columns) + { + if (!inputSchema.TryFindColumn(colInfo.Input, out var col)) + throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.Input); + if (!IsSchemaColumnValid(col)) + throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.Input, ExpectedColumnType, col.GetTypeString()); + var metadata = new List(); + if (col.HasKeyValues()) + metadata.Add(new SchemaShape.Column(MetadataUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextType.Instance, false)); + result[colInfo.Output] = new SchemaShape.Column(colInfo.Output, SchemaShape.Column.VectorKind.Vector, NumberType.R4, false, new SchemaShape(metadata)); + } + return new SchemaShape(result.Values); } } } diff --git a/src/Microsoft.ML.Transforms/Text/NgramUtils.cs b/src/Microsoft.ML.Transforms/Text/NgramUtils.cs index 7a0db6d8bd..38bc6333e8 100644 --- a/src/Microsoft.ML.Transforms/Text/NgramUtils.cs +++ b/src/Microsoft.ML.Transforms/Text/NgramUtils.cs @@ -73,12 +73,13 @@ public bool AddNgrams(in VBuffer src, int icol, uint keyMax) Contracts.Assert(icol >= 0); Contracts.Assert(keyMax > 0); + var srcValues = src.GetValues(); uint curKey = 0; if (src.IsDense) { for (int i = 0; i < src.Length; i++) { - curKey = src.Values[i]; + curKey = srcValues[i]; if (curKey > keyMax) curKey = 0; @@ -92,13 +93,14 @@ public bool AddNgrams(in VBuffer src, int icol, uint keyMax) else { var queueSize = _queue.Capacity; + var srcIndices = src.GetIndices(); int iindex = 0; for (int i = 0; i < src.Length; i++) { - if (iindex < src.Count && i == src.Indices[iindex]) + if (iindex < srcIndices.Length && i == srcIndices[iindex]) { - curKey = src.Values[iindex]; + curKey = srcValues[iindex]; if (curKey > keyMax) curKey = 0; iindex++; diff --git a/src/Microsoft.ML.Transforms/Text/SentimentAnalyzerTransform.cs b/src/Microsoft.ML.Transforms/Text/SentimentAnalyzingTransform.cs similarity index 82% rename from src/Microsoft.ML.Transforms/Text/SentimentAnalyzerTransform.cs rename to src/Microsoft.ML.Transforms/Text/SentimentAnalyzingTransform.cs index 785ef7234d..343bb3cb22 100644 --- a/src/Microsoft.ML.Transforms/Text/SentimentAnalyzerTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/SentimentAnalyzingTransform.cs @@ -12,13 +12,13 @@ using System.Collections.Generic; using System.Linq; -[assembly: LoadableClass(TextFeaturizingEstimator.Summary, typeof(IDataTransform), typeof(SentimentAnalyzingTransform), typeof(SentimentAnalyzingTransform.Arguments), typeof(SignatureDataTransform), - SentimentAnalyzingTransform.UserName, "SentimentAnalyzingTransform", SentimentAnalyzingTransform.LoaderSignature, SentimentAnalyzingTransform.ShortName, DocName = "transform/SentimentAnalyzingTransform.md")] +[assembly: LoadableClass(TextFeaturizingEstimator.Summary, typeof(IDataTransform), typeof(SentimentAnalyzingTransformer), typeof(SentimentAnalyzingTransformer.Arguments), typeof(SignatureDataTransform), + SentimentAnalyzingTransformer.UserName, "SentimentAnalyzingTransform", SentimentAnalyzingTransformer.LoaderSignature, SentimentAnalyzingTransformer.ShortName, DocName = "transform/SentimentAnalyzingTransform.md")] namespace Microsoft.ML.Transforms.Text { /// - public static class SentimentAnalyzingTransform + public static class SentimentAnalyzingTransformer { public sealed class Arguments : TransformInputBase { @@ -59,7 +59,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV if (string.IsNullOrWhiteSpace(args.Name)) args.Name = args.Source; - var file = Utils.FindExistentFileOrNull("pretrained.model", "Sentiment", assemblyForBasePath: typeof(SentimentAnalyzingTransform)); + var file = Utils.FindExistentFileOrNull("pretrained.model", "Sentiment", assemblyForBasePath: typeof(SentimentAnalyzingTransformer)); if (file == null) { throw h.Except("resourcePath", "Missing resource for SentimentAnalyzingTransform."); @@ -79,7 +79,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV // 2. Copy source column to a column with the name expected by the pretrained model featurization // transform pipeline. - var copyTransformer = new CopyColumnsTransform(env, (args.Source, ModelInputColumnName)); + var copyTransformer = new ColumnsCopyingTransformer(env, (args.Source, ModelInputColumnName)); input = copyTransformer.Transform(input); @@ -88,12 +88,12 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV // 4. Copy the output column from the pretrained model to a temporary column. var scoreTempName = input.Schema.GetTempColumnName("sa_out"); - copyTransformer = new CopyColumnsTransform(env, (ModelScoreColumnName, scoreTempName)); + copyTransformer = new ColumnsCopyingTransformer(env, (ModelScoreColumnName, scoreTempName)); input = copyTransformer.Transform(input); // 5. Drop all the columns created by the pretrained model, including the expected input column // and the output column, which we have copied to a temporary column in (4). - input = SelectColumnsTransform.CreateDrop(env, input, _modelIntermediateColumnNames); + input = ColumnSelectingTransformer.CreateDrop(env, input, _modelIntermediateColumnNames); // 6. Unalias all the original columns that were originally present in the IDataView, but may have // been shadowed by column names in the pretrained model. This method will also drop all the temporary @@ -101,11 +101,11 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV input = UnaliasIfNeeded(env, input, aliased); // 7. Copy the temporary column with the score we created in (4) to a column with the user-specified destination name. - copyTransformer = new CopyColumnsTransform(env, (scoreTempName, args.Name)); + copyTransformer = new ColumnsCopyingTransformer(env, (scoreTempName, args.Name)); input = copyTransformer.Transform(input); // 8. Drop the temporary column with the score created in (4). - return SelectColumnsTransform.CreateDrop(env, input, scoreTempName); + return ColumnSelectingTransformer.CreateDrop(env, input, scoreTempName); } /// @@ -130,9 +130,9 @@ private static IDataView AliasIfNeeded(IHostEnvironment env, IDataView input, st hiddenNames = toHide.Select(colName => new KeyValuePair(colName, input.Schema.GetTempColumnName(colName))).ToArray(); - return CopyColumnsTransform.Create(env, new CopyColumnsTransform.Arguments() + return ColumnsCopyingTransformer.Create(env, new ColumnsCopyingTransformer.Arguments() { - Column = hiddenNames.Select(pair => new CopyColumnsTransform.Column() { Name = pair.Value, Source = pair.Key }).ToArray() + Column = hiddenNames.Select(pair => new ColumnsCopyingTransformer.Column() { Name = pair.Value, Source = pair.Key }).ToArray() }, input); } @@ -141,12 +141,12 @@ private static IDataView UnaliasIfNeeded(IHostEnvironment env, IDataView input, if (Utils.Size(hiddenNames) == 0) return input; - input = CopyColumnsTransform.Create(env, new CopyColumnsTransform.Arguments() + input = ColumnsCopyingTransformer.Create(env, new ColumnsCopyingTransformer.Arguments() { - Column = hiddenNames.Select(pair => new CopyColumnsTransform.Column() { Name = pair.Key, Source = pair.Value }).ToArray() + Column = hiddenNames.Select(pair => new ColumnsCopyingTransformer.Column() { Name = pair.Key, Source = pair.Value }).ToArray() }, input); - return SelectColumnsTransform.CreateDrop(env, input, hiddenNames.Select(pair => pair.Value).ToArray()); + return ColumnSelectingTransformer.CreateDrop(env, input, hiddenNames.Select(pair => pair.Value).ToArray()); } private static IDataView LoadTransforms(IHostEnvironment env, IDataView input, string modelFile) diff --git a/src/Microsoft.ML.Transforms/Text/StopWordsRemoverTransform.cs b/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs similarity index 91% rename from src/Microsoft.ML.Transforms/Text/StopWordsRemoverTransform.cs rename to src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs index 98300ebb08..9c2c58b4e8 100644 --- a/src/Microsoft.ML.Transforms/Text/StopWordsRemoverTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs @@ -20,26 +20,26 @@ using System.Text; using System.Threading; -[assembly: LoadableClass(StopWordsRemoverTransform.Summary, typeof(StopWordsRemoverTransform), typeof(StopWordsRemoverTransform.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(StopWordsRemovingTransformer.Summary, typeof(StopWordsRemovingTransformer), typeof(StopWordsRemovingTransformer.Arguments), typeof(SignatureDataTransform), "Stopwords Remover Transform", "StopWordsRemoverTransform", "StopWordsRemover", "StopWords")] -[assembly: LoadableClass(StopWordsRemoverTransform.Summary, typeof(StopWordsRemoverTransform), null, typeof(SignatureStopWordsRemoverTransform), +[assembly: LoadableClass(StopWordsRemovingTransformer.Summary, typeof(StopWordsRemovingTransformer), null, typeof(SignatureStopWordsRemoverTransform), "Predefined Stopwords List Remover", "PredefinedStopWordsRemoverTransform", "PredefinedStopWordsRemover", "PredefinedStopWords", "Predefined")] -[assembly: LoadableClass(StopWordsRemoverTransform.Summary, typeof(StopWordsRemoverTransform), null, typeof(SignatureLoadDataTransform), - "Stopwords Remover Transform", StopWordsRemoverTransform.LoaderSignature)] +[assembly: LoadableClass(StopWordsRemovingTransformer.Summary, typeof(StopWordsRemovingTransformer), null, typeof(SignatureLoadDataTransform), + "Stopwords Remover Transform", StopWordsRemovingTransformer.LoaderSignature)] -[assembly: LoadableClass(CustomStopWordsRemoverTransform.Summary, typeof(CustomStopWordsRemoverTransform), typeof(CustomStopWordsRemoverTransform.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(CustomStopWordsRemovingTransformer.Summary, typeof(CustomStopWordsRemovingTransformer), typeof(CustomStopWordsRemovingTransformer.Arguments), typeof(SignatureDataTransform), "Custom Stopwords Remover Transform", "CustomStopWordsRemoverTransform", "CustomStopWords")] -[assembly: LoadableClass(CustomStopWordsRemoverTransform.Summary, typeof(CustomStopWordsRemoverTransform), typeof(CustomStopWordsRemoverTransform.LoaderArguments), +[assembly: LoadableClass(CustomStopWordsRemovingTransformer.Summary, typeof(CustomStopWordsRemovingTransformer), typeof(CustomStopWordsRemovingTransformer.LoaderArguments), typeof(SignatureStopWordsRemoverTransform), "Custom Stopwords Remover Transform", "CustomStopWordsRemoverTransform", "CustomStopWords", "Custom")] -[assembly: LoadableClass(CustomStopWordsRemoverTransform.Summary, typeof(CustomStopWordsRemoverTransform), null, typeof(SignatureLoadDataTransform), - "Custom Stopwords Remover Transform", CustomStopWordsRemoverTransform.LoaderSignature)] +[assembly: LoadableClass(CustomStopWordsRemovingTransformer.Summary, typeof(CustomStopWordsRemovingTransformer), null, typeof(SignatureLoadDataTransform), + "Custom Stopwords Remover Transform", CustomStopWordsRemovingTransformer.LoaderSignature)] [assembly: EntryPointModule(typeof(PredefinedStopWordsRemoverFactory))] -[assembly: EntryPointModule(typeof(CustomStopWordsRemoverTransform.LoaderArguments))] +[assembly: EntryPointModule(typeof(CustomStopWordsRemovingTransformer.LoaderArguments))] namespace Microsoft.ML.Transforms.Text { @@ -59,7 +59,7 @@ public sealed class PredefinedStopWordsRemoverFactory : IStopWordsRemoverFactory { public IStopWordsRemoverTransform CreateComponent(IHostEnvironment env, IDataView input, OneToOneColumn[] column) { - return new StopWordsRemoverTransform(env, input, column); + return new StopWordsRemovingTransformer(env, input, column); } } @@ -69,7 +69,7 @@ public IStopWordsRemoverTransform CreateComponent(IHostEnvironment env, IDataVie /// The transform is usually applied after tokenizing text, so it compares individual tokens /// (case-insensitive comparison) to the stopwords. /// - public sealed class StopWordsRemoverTransform : OneToOneTransformBase, IStopWordsRemoverTransform + public sealed class StopWordsRemovingTransformer : OneToOneTransformBase, IStopWordsRemoverTransform { /// /// Stopwords language. This enumeration is serialized. @@ -236,7 +236,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(StopWordsRemoverTransform).Assembly.FullName); + loaderAssemblyName: typeof(StopWordsRemovingTransformer).Assembly.FullName); } private readonly bool?[] _resourcesExist; @@ -278,7 +278,7 @@ private static Dictionary, Language> LangsDictionary if (_langsDictionary == null) { var langsDictionary = Enum.GetValues(typeof(Language)).Cast() - .ToDictionary(lang => lang.ToString().AsMemory()); + .ToDictionary(lang => lang.ToString().AsMemory(), new ReadOnlyMemoryUtils.ReadonlyMemoryCharComparer()); Interlocked.CompareExchange(ref _langsDictionary, langsDictionary, null); } @@ -286,7 +286,7 @@ private static Dictionary, Language> LangsDictionary } } - public StopWordsRemoverTransform(IHostEnvironment env, Arguments args, IDataView input) + public StopWordsRemovingTransformer(IHostEnvironment env, Arguments args, IDataView input) : base(env, RegistrationName, Contracts.CheckRef(args, nameof(args)).Column, input, TestIsTextVector) { Host.AssertNonEmpty(Infos); @@ -311,7 +311,7 @@ public StopWordsRemoverTransform(IHostEnvironment env, Arguments args, IDataView Metadata.Seal(); } - public StopWordsRemoverTransform(IHostEnvironment env, IDataView input, OneToOneColumn[] column) + public StopWordsRemovingTransformer(IHostEnvironment env, IDataView input, OneToOneColumn[] column) : base(env, RegistrationName, column, input, TestIsTextVector) { Host.AssertNonEmpty(Infos); @@ -334,7 +334,7 @@ public StopWordsRemoverTransform(IHostEnvironment env, IDataView input, OneToOne Metadata.Seal(); } - private StopWordsRemoverTransform(IHost host, ModelLoadContext ctx, IDataView input) + private StopWordsRemovingTransformer(IHost host, ModelLoadContext ctx, IDataView input) : base(host, ctx, input, TestIsTextVector) { Host.AssertValue(ctx); @@ -391,7 +391,7 @@ private void CheckResources(IChannel ch) } } - public static StopWordsRemoverTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + public static StopWordsRemovingTransformer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(ctx, nameof(ctx)); @@ -400,7 +400,7 @@ public static StopWordsRemoverTransform Create(IHostEnvironment env, ModelLoadCo env.CheckValue(input, nameof(input)); var h = env.Register(RegistrationName); - return h.Apply("Loading Model", ch => new StopWordsRemoverTransform(h, ctx, input)); + return h.Apply("Loading Model", ch => new StopWordsRemovingTransformer(h, ctx, input)); } public override void Save(ModelSaveContext ctx) @@ -464,16 +464,17 @@ protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, ou getSrc(ref src); list.Clear(); - for (int i = 0; i < src.Count; i++) + var srcValues = src.GetValues(); + for (int i = 0; i < srcValues.Length; i++) { - if (src.Values[i].IsEmpty) + if (srcValues[i].IsEmpty) continue; buffer.Clear(); - ReadOnlyMemoryUtils.AddLowerCaseToStringBuilder(src.Values[i].Span, buffer); + ReadOnlyMemoryUtils.AddLowerCaseToStringBuilder(srcValues[i].Span, buffer); // REVIEW nihejazi: Consider using a trie for string matching (Aho-Corasick, etc.) if (StopWords[(int)langToUse].Get(buffer) == null) - list.Add(src.Values[i]); + list.Add(srcValues[i]); } VBufferUtils.Copy(list, ref dst, list.Count); @@ -535,7 +536,7 @@ private static Stream GetResourceFileStreamOrNull(Language lang) } } - public sealed class CustomStopWordsRemoverTransform : OneToOneTransformBase, IStopWordsRemoverTransform + public sealed class CustomStopWordsRemovingTransformer : OneToOneTransformBase, IStopWordsRemoverTransform { public sealed class Column : OneToOneColumn { @@ -584,7 +585,7 @@ public sealed class LoaderArguments : ArgumentsBase, IStopWordsRemoverFactory { public IStopWordsRemoverTransform CreateComponent(IHostEnvironment env, IDataView input, OneToOneColumn[] column) { - return new CustomStopWordsRemoverTransform(env, this, input, column); + return new CustomStopWordsRemovingTransformer(env, this, input, column); } } @@ -601,7 +602,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(CustomStopWordsRemoverTransform).Assembly.FullName); + loaderAssemblyName: typeof(CustomStopWordsRemovingTransformer).Assembly.FullName); } public const string StopwordsManagerLoaderSignature = "CustomStopWordsManager"; @@ -613,7 +614,7 @@ private static VersionInfo GetStopwrodsManagerVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: StopwordsManagerLoaderSignature, - loaderAssemblyName: typeof(CustomStopWordsRemoverTransform).Assembly.FullName); + loaderAssemblyName: typeof(CustomStopWordsRemovingTransformer).Assembly.FullName); } private static readonly ColumnType _outputType = new VectorType(TextType.Instance); @@ -711,7 +712,7 @@ private void LoadStopWords(IHostEnvironment env, IChannel ch, ArgumentsBase load if (!stopword.IsEmpty) { buffer.Clear(); - ReadOnlyMemoryUtils.AddLowerCaseToStringBuilder(stopwords.Span, buffer); + ReadOnlyMemoryUtils.AddLowerCaseToStringBuilder(stopword.Span, buffer); stopWordsMap.Add(buffer); } else if (warnEmpty) @@ -777,7 +778,7 @@ private void LoadStopWords(IHostEnvironment env, IChannel ch, ArgumentsBase load } } - public CustomStopWordsRemoverTransform(IHostEnvironment env, Arguments args, IDataView input) + public CustomStopWordsRemovingTransformer(IHostEnvironment env, Arguments args, IDataView input) : base(env, RegistrationName, Contracts.CheckRef(args, nameof(args)).Column, input, TestIsTextVector) { Host.AssertNonEmpty(Infos); @@ -798,7 +799,7 @@ public CustomStopWordsRemoverTransform(IHostEnvironment env, Arguments args, IDa /// Public constructor corresponding to SignatureStopWordsRemoverTransform. It accepts arguments of type LoaderArguments, /// and a separate array of columns (constructed by the caller -TextFeaturizingEstimator - arguments). /// - public CustomStopWordsRemoverTransform(IHostEnvironment env, LoaderArguments loaderArgs, IDataView input, OneToOneColumn[] column) + public CustomStopWordsRemovingTransformer(IHostEnvironment env, LoaderArguments loaderArgs, IDataView input, OneToOneColumn[] column) : base(env, RegistrationName, column, input, TestIsTextItem) { Host.AssertNonEmpty(Infos); @@ -815,7 +816,7 @@ public CustomStopWordsRemoverTransform(IHostEnvironment env, LoaderArguments loa Metadata.Seal(); } - private CustomStopWordsRemoverTransform(IHost host, ModelLoadContext ctx, IDataView input) + private CustomStopWordsRemovingTransformer(IHost host, ModelLoadContext ctx, IDataView input) : base(host, ctx, input, TestIsTextVector) { Host.AssertValue(ctx); @@ -860,7 +861,7 @@ private CustomStopWordsRemoverTransform(IHost host, ModelLoadContext ctx, IDataV Metadata.Seal(); } - public static CustomStopWordsRemoverTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + public static CustomStopWordsRemovingTransformer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(ctx, nameof(ctx)); @@ -869,7 +870,7 @@ public static CustomStopWordsRemoverTransform Create(IHostEnvironment env, Model env.CheckValue(input, nameof(input)); var h = env.Register(RegistrationName); - return h.Apply("Loading Model", ch => new CustomStopWordsRemoverTransform(h, ctx, input)); + return h.Apply("Loading Model", ch => new CustomStopWordsRemovingTransformer(h, ctx, input)); } public override void Save(ModelSaveContext ctx) @@ -936,16 +937,17 @@ protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, ou getSrc(ref src); list.Clear(); - for (int i = 0; i < src.Count; i++) + var srcValues = src.GetValues(); + for (int i = 0; i < srcValues.Length; i++) { - if (src.Values[i].IsEmpty) + if (srcValues[i].IsEmpty) continue; buffer.Clear(); - ReadOnlyMemoryUtils.AddLowerCaseToStringBuilder(src.Values[i].Span, buffer); + ReadOnlyMemoryUtils.AddLowerCaseToStringBuilder(srcValues[i].Span, buffer); // REVIEW nihejazi: Consider using a trie for string matching (Aho-Corasick, etc.) if (_stopWordsMap.Get(buffer) == null) - list.Add(src.Values[i]); + list.Add(srcValues[i]); } VBufferUtils.Copy(list, ref dst, list.Count); diff --git a/src/Microsoft.ML.Transforms/Text/TextTransform.cs b/src/Microsoft.ML.Transforms/Text/TextFeaturizingEstimator.cs similarity index 91% rename from src/Microsoft.ML.Transforms/Text/TextTransform.cs rename to src/Microsoft.ML.Transforms/Text/TextFeaturizingEstimator.cs index 81032dbef6..8392b7c238 100644 --- a/src/Microsoft.ML.Transforms/Text/TextTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/TextFeaturizingEstimator.cs @@ -31,7 +31,7 @@ namespace Microsoft.ML.Transforms.Text { using CaseNormalizationMode = TextNormalizingEstimator.CaseNormalizationMode; - using StopWordsCol = StopWordsRemoverTransform.Column; + using StopWordsCol = StopWordsRemovingTransformer.Column; // A transform that turns a collection of text documents into numerical feature vectors. The feature vectors are counts // of (word or character) ngrams in a given text. It offers ngram hashing (finding the ngram token string name to feature @@ -82,7 +82,7 @@ public bool TryUnparse(StringBuilder sb) } /// - /// This class exposes / arguments. + /// This class exposes / arguments. /// public sealed class Arguments : TransformInputBase { @@ -115,11 +115,11 @@ public sealed class Arguments : TransformInputBase [TGUI(Label = "Word Gram Extractor")] [Argument(ArgumentType.Multiple, HelpText = "Ngram feature extractor to use for words (WordBag/WordHashBag).", ShortName = "wordExtractor", NullName = "", SortOrder = 11)] - public INgramExtractorFactoryFactory WordFeatureExtractor = new NgramExtractorTransform.NgramExtractorArguments(); + public INgramExtractorFactoryFactory WordFeatureExtractor = new NgramExtractingTransformer.NgramExtractorArguments(); [TGUI(Label = "Char Gram Extractor")] [Argument(ArgumentType.Multiple, HelpText = "Ngram feature extractor to use for characters (WordBag/WordHashBag).", ShortName = "charExtractor", NullName = "", SortOrder = 12)] - public INgramExtractorFactoryFactory CharFeatureExtractor = new NgramExtractorTransform.NgramExtractorArguments() { NgramLength = 3, AllLengths = false }; + public INgramExtractorFactoryFactory CharFeatureExtractor = new NgramExtractingTransformer.NgramExtractorArguments() { NgramLength = 3, AllLengths = false }; [Argument(ArgumentType.AtMostOnce, HelpText = "Normalize vectors (rows) individually by rescaling them to unit norm.", ShortName = "norm", SortOrder = 13)] public TextNormKind VectorNormalizer = TextNormKind.L2; @@ -171,24 +171,24 @@ private sealed class TransformApplierParams public readonly bool OutputTextTokens; public readonly TermLoaderArguments Dictionary; - public StopWordsRemoverTransform.Language StopwordsLanguage - =>(StopWordsRemoverTransform.Language) Enum.Parse(typeof(StopWordsRemoverTransform.Language), Language.ToString()); + public StopWordsRemovingTransformer.Language StopwordsLanguage + =>(StopWordsRemovingTransformer.Language) Enum.Parse(typeof(StopWordsRemovingTransformer.Language), Language.ToString()); - public LpNormNormalizerTransform.NormalizerKind LpNormalizerKind + public LpNormalizingEstimatorBase.NormalizerKind LpNormalizerKind { get { switch (VectorNormalizer) { case TextNormKind.L1: - return LpNormNormalizerTransform.NormalizerKind.L1Norm; + return LpNormalizingEstimatorBase.NormalizerKind.L1Norm; case TextNormKind.L2: - return LpNormNormalizerTransform.NormalizerKind.L2Norm; + return LpNormalizingEstimatorBase.NormalizerKind.L2Norm; case TextNormKind.LInf: - return LpNormNormalizerTransform.NormalizerKind.LInf; + return LpNormalizingEstimatorBase.NormalizerKind.LInf; default: Contracts.Assert(false, "Unexpected normalizer type"); - return LpNormNormalizerTransform.NormalizerKind.L2Norm; + return LpNormalizingEstimatorBase.NormalizerKind.L2Norm; } } } @@ -288,8 +288,8 @@ public TextFeaturizingEstimator (IHostEnvironment env, IEnumerable input _stopWordsRemover = null; _dictionary = null; - _wordFeatureExtractor = new NgramExtractorTransform.NgramExtractorArguments(); - _charFeatureExtractor = new NgramExtractorTransform.NgramExtractorArguments() { NgramLength = 3, AllLengths = false }; + _wordFeatureExtractor = new NgramExtractingTransformer.NgramExtractorArguments(); + _charFeatureExtractor = new NgramExtractingTransformer.NgramExtractorArguments() { NgramLength = 3, AllLengths = false }; } public ITransformer Fit(IDataView input) @@ -311,7 +311,7 @@ public ITransformer Fit(IDataView input) var srcCols = textCols; textCols = new[] { GenerateColumnName(input.Schema, OutputColumn, "InitialConcat") }; tempCols.Add(textCols[0]); - view = new ConcatTransform(h, textCols[0], srcCols).Transform(view); + view = new ColumnConcatenatingTransformer(h, textCols[0], srcCols).Transform(view); } if (tparams.NeedsNormalizeTransform) @@ -332,11 +332,11 @@ public ITransformer Fit(IDataView input) if (tparams.NeedsWordTokenizationTransform) { - var xfCols = new WordTokenizeTransform.ColumnInfo[textCols.Length]; + var xfCols = new WordTokenizingTransformer.ColumnInfo[textCols.Length]; wordTokCols = new string[textCols.Length]; for (int i = 0; i < textCols.Length; i++) { - var col = new WordTokenizeTransform.ColumnInfo(textCols[i], GenerateColumnName(view.Schema, textCols[i], "WordTokenizer")); + var col = new WordTokenizingTransformer.ColumnInfo(textCols[i], GenerateColumnName(view.Schema, textCols[i], "WordTokenizer")); xfCols[i] = col; wordTokCols[i] = col.Output; tempCols.Add(col.Output); @@ -382,7 +382,7 @@ public ITransformer Fit(IDataView input) if (tparams.OutputTextTokens) { string[] srcCols = wordTokCols ?? textCols; - view = new ConcatTransform(h, string.Format(TransformedTextColFormat, OutputColumn), srcCols).Transform(view); + view = new ColumnConcatenatingTransformer(h, string.Format(TransformedTextColFormat, OutputColumn), srcCols).Transform(view); } if (tparams.CharExtractorFactory != null) @@ -397,7 +397,7 @@ public ITransformer Fit(IDataView input) tempCols.Add(xfCols[i].output); charTokCols[i] = xfCols[i].output; } - view = new CharTokenizeTransform(h, columns: xfCols).Transform(view); + view = new TokenizingByCharactersTransformer(h, columns: xfCols).Transform(view); } { @@ -415,16 +415,13 @@ public ITransformer Fit(IDataView input) if (tparams.VectorNormalizer != TextNormKind.None) { - var xfCols = new List(2); + var xfCols = new List(2); + if (charFeatureCol != null) { var dstCol = GenerateColumnName(view.Schema, charFeatureCol, "LpCharNorm"); tempCols.Add(dstCol); - xfCols.Add(new LpNormNormalizerTransform.Column() - { - Source = charFeatureCol, - Name = dstCol - }); + xfCols.Add(new LpNormalizingTransformer.LpNormColumnInfo(charFeatureCol, dstCol, normalizerKind: tparams.LpNormalizerKind)); charFeatureCol = dstCol; } @@ -432,19 +429,12 @@ public ITransformer Fit(IDataView input) { var dstCol = GenerateColumnName(view.Schema, wordFeatureCol, "LpWordNorm"); tempCols.Add(dstCol); - xfCols.Add(new LpNormNormalizerTransform.Column() - { - Source = wordFeatureCol, - Name = dstCol - }); + xfCols.Add(new LpNormalizingTransformer.LpNormColumnInfo(wordFeatureCol, dstCol, normalizerKind: tparams.LpNormalizerKind)); wordFeatureCol = dstCol; } + if (xfCols.Count > 0) - view = new LpNormNormalizerTransform(h, new LpNormNormalizerTransform.Arguments() - { - NormKind = tparams.LpNormalizerKind, - Column = xfCols.ToArray() - }, view); + view = new LpNormalizingTransformer(h, xfCols.ToArray()).Transform(view); } { @@ -469,13 +459,13 @@ public ITransformer Fit(IDataView input) } if (srcTaggedCols.Count > 0) { - view = new ConcatTransform(h, new ConcatTransform.ColumnInfo(OutputColumn, + view = new ColumnConcatenatingTransformer(h, new ColumnConcatenatingTransformer.ColumnInfo(OutputColumn, srcTaggedCols.Select(kvp => (kvp.Value, kvp.Key)))) .Transform(view); } } - view = SelectColumnsTransform.CreateDrop(h, view, tempCols.ToArray()); + view = ColumnSelectingTransformer.CreateDrop(h, view, tempCols.ToArray()); return new Transformer(_host, input, view); } diff --git a/src/Microsoft.ML.Transforms/Text/TextNormalizerTransform.cs b/src/Microsoft.ML.Transforms/Text/TextNormalizing.cs similarity index 97% rename from src/Microsoft.ML.Transforms/Text/TextNormalizerTransform.cs rename to src/Microsoft.ML.Transforms/Text/TextNormalizing.cs index 60de96701b..89c4f4c696 100644 --- a/src/Microsoft.ML.Transforms/Text/TextNormalizerTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/TextNormalizing.cs @@ -194,7 +194,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : MapperBase + private sealed class Mapper : OneToOneMapperBase { private readonly ColumnType[] _types; private readonly TextNormalizingTransformer _parent; @@ -212,7 +212,7 @@ public Mapper(TextNormalizingTransformer parent, Schema inputSchema) } } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -279,7 +279,7 @@ private static Dictionary CombinedDiacriticsMap } } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); @@ -308,7 +308,7 @@ private ValueGetter> MakeGetterOne(IRow input, int iinfo) (ref ReadOnlyMemory dst) => { getSrc(ref src); - NormalizeSrc(ref src, ref dst, buffer); + NormalizeSrc(in src, ref dst, buffer); }; } @@ -325,9 +325,10 @@ private ValueGetter>> MakeGetterVec(IRow input, int { getSrc(ref src); list.Clear(); - for (int i = 0; i < src.Count; i++) + var srcValues = src.GetValues(); + for (int i = 0; i < srcValues.Length; i++) { - NormalizeSrc(ref src.Values[i], ref temp, buffer); + NormalizeSrc(in srcValues[i], ref temp, buffer); if (!temp.IsEmpty) list.Add(temp); } @@ -336,7 +337,7 @@ private ValueGetter>> MakeGetterVec(IRow input, int }; } - private void NormalizeSrc(ref ReadOnlyMemory src, ref ReadOnlyMemory dst, StringBuilder buffer) + private void NormalizeSrc(in ReadOnlyMemory src, ref ReadOnlyMemory dst, StringBuilder buffer) { Host.AssertValue(buffer); diff --git a/src/Microsoft.ML.Transforms/Text/TextStaticExtensions.cs b/src/Microsoft.ML.Transforms/Text/TextStaticExtensions.cs index cd5b11e3a1..83b05cbbb7 100644 --- a/src/Microsoft.ML.Transforms/Text/TextStaticExtensions.cs +++ b/src/Microsoft.ML.Transforms/Text/TextStaticExtensions.cs @@ -5,14 +5,13 @@ using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Transforms.Text; -using Microsoft.ML.StaticPipe; using Microsoft.ML.StaticPipe.Runtime; using System; using System.Collections.Generic; -using static Microsoft.ML.Transforms.Text.StopWordsRemoverTransform; -namespace Microsoft.ML.Transforms.Text +namespace Microsoft.ML.StaticPipe { + using Language = Microsoft.ML.Transforms.Text.StopWordsRemovingTransformer.Language; /// /// Extensions for statically typed word tokenizer. /// @@ -104,7 +103,7 @@ public override IEstimator Reconcile(IHostEnvironment env, foreach (var outCol in toOutput) pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); - return new CharacterTokenizingEstimator(env, _useMarker, pairs.ToArray()); + return new TokenizingByCharactersEstimator(env, _useMarker, pairs.ToArray()); } } @@ -256,7 +255,7 @@ public OutPipelineColumn(Scalar input, int skipLength, bool allLengths, int maxNumTerms, - NgramTransform.WeightingCriteria weighting) + NgramCountingEstimator.WeightingCriteria weighting) : base(new Reconciler(ngramLength, skipLength, allLengths, maxNumTerms, weighting), input) { Input = input; @@ -269,9 +268,9 @@ private sealed class Reconciler : EstimatorReconciler, IEquatable private readonly int _skipLength; private readonly bool _allLengths; private readonly int _maxNumTerms; - private readonly NgramTransform.WeightingCriteria _weighting; + private readonly NgramCountingEstimator.WeightingCriteria _weighting; - public Reconciler(int ngramLength, int skipLength, bool allLengths, int maxNumTerms, NgramTransform.WeightingCriteria weighting) + public Reconciler(int ngramLength, int skipLength, bool allLengths, int maxNumTerms, NgramCountingEstimator.WeightingCriteria weighting) { _ngramLength = ngramLength; _skipLength = skipLength; @@ -321,7 +320,7 @@ public static Vector ToBagofWords(this Scalar input, int skipLength = 0, bool allLengths = true, int maxNumTerms = 10000000, - NgramTransform.WeightingCriteria weighting = NgramTransform.WeightingCriteria.Tf) + NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.WeightingCriteria.Tf) => new OutPipelineColumn(input, ngramLength, skipLength, allLengths, maxNumTerms, weighting); } @@ -432,7 +431,7 @@ public OutPipelineColumn(PipelineColumn input, int skipLength, bool allLengths, int maxNumTerms, - NgramTransform.WeightingCriteria weighting) + NgramCountingEstimator.WeightingCriteria weighting) : base(new Reconciler(ngramLength, skipLength, allLengths, maxNumTerms, weighting), input) { Input = input; @@ -445,9 +444,9 @@ private sealed class Reconciler : EstimatorReconciler, IEquatable private readonly int _skipLength; private readonly bool _allLengths; private readonly int _maxNumTerms; - private readonly NgramTransform.WeightingCriteria _weighting; + private readonly NgramCountingEstimator.WeightingCriteria _weighting; - public Reconciler(int ngramLength, int skipLength, bool allLengths, int maxNumTerms, NgramTransform.WeightingCriteria weighting) + public Reconciler(int ngramLength, int skipLength, bool allLengths, int maxNumTerms, NgramCountingEstimator.WeightingCriteria weighting) { _ngramLength = ngramLength; _skipLength = skipLength; @@ -478,7 +477,7 @@ public override IEstimator Reconcile(IHostEnvironment env, foreach (var outCol in toOutput) pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); - return new NgramEstimator(env, pairs.ToArray(), _ngramLength, _skipLength, _allLengths, _maxNumTerms, _weighting); + return new NgramCountingEstimator(env, pairs.ToArray(), _ngramLength, _skipLength, _allLengths, _maxNumTerms, _weighting); } } @@ -500,7 +499,7 @@ public static Vector ToNgrams(this VarVector> inp int skipLength = 0, bool allLengths = true, int maxNumTerms = 10000000, - NgramTransform.WeightingCriteria weighting = NgramTransform.WeightingCriteria.Tf) + NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.WeightingCriteria.Tf) => new OutPipelineColumn(input, ngramLength, skipLength, allLengths, maxNumTerms, weighting); } @@ -592,56 +591,4 @@ public static Vector ToNgramsHash(this VarVector> input bool ordered = true, int invertHash = 0) => new OutPipelineColumn(input, hashBits, ngramLength, skipLength, allLengths, seed, ordered, invertHash); } - - /// - /// Extensions for statically typed . - /// - public static class LdaEstimatorExtensions - { - private sealed class OutPipelineColumn : Vector - { - public readonly Vector Input; - - public OutPipelineColumn(Vector input, int numTopic, Action advancedSettings) - : base(new Reconciler(numTopic, advancedSettings), input) - { - Input = input; - } - } - - private sealed class Reconciler : EstimatorReconciler - { - private readonly int _numTopic; - private readonly Action _advancedSettings; - - public Reconciler(int numTopic, Action advancedSettings) - { - _numTopic = numTopic; - _advancedSettings = advancedSettings; - } - - public override IEstimator Reconcile(IHostEnvironment env, - PipelineColumn[] toOutput, - IReadOnlyDictionary inputNames, - IReadOnlyDictionary outputNames, - IReadOnlyCollection usedNames) - { - Contracts.Assert(toOutput.Length == 1); - - var pairs = new List<(string input, string output)>(); - foreach (var outCol in toOutput) - pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); - - return new LdaEstimator(env, pairs.ToArray(), _numTopic, _advancedSettings); - } - } - - /// - /// The column to apply to. - /// The number of topics in the LDA. - /// A delegate to apply all the advanced arguments to the algorithm. - public static Vector ToLdaTopicVector(this Vector input, - int numTopic = 100, - Action advancedSettings = null) => new OutPipelineColumn(input, numTopic, advancedSettings); - } } diff --git a/src/Microsoft.ML.Transforms/Text/CharTokenizeTransform.cs b/src/Microsoft.ML.Transforms/Text/TokenizingByCharacters.cs similarity index 80% rename from src/Microsoft.ML.Transforms/Text/CharTokenizeTransform.cs rename to src/Microsoft.ML.Transforms/Text/TokenizingByCharacters.cs index 53f99405d7..71665b0c57 100644 --- a/src/Microsoft.ML.Transforms/Text/CharTokenizeTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/TokenizingByCharacters.cs @@ -19,24 +19,24 @@ using System.Text; using System.Threading; -[assembly: LoadableClass(CharTokenizeTransform.Summary, typeof(IDataTransform), typeof(CharTokenizeTransform), typeof(CharTokenizeTransform.Arguments), typeof(SignatureDataTransform), - CharTokenizeTransform.UserName, "CharTokenize", CharTokenizeTransform.LoaderSignature)] +[assembly: LoadableClass(TokenizingByCharactersTransformer.Summary, typeof(IDataTransform), typeof(TokenizingByCharactersTransformer), typeof(TokenizingByCharactersTransformer.Arguments), typeof(SignatureDataTransform), + TokenizingByCharactersTransformer.UserName, "CharTokenize", TokenizingByCharactersTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IDataTransform), typeof(CharTokenizeTransform), null, typeof(SignatureLoadDataTransform), - CharTokenizeTransform.UserName, CharTokenizeTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(IDataTransform), typeof(TokenizingByCharactersTransformer), null, typeof(SignatureLoadDataTransform), + TokenizingByCharactersTransformer.UserName, TokenizingByCharactersTransformer.LoaderSignature)] -[assembly: LoadableClass(CharTokenizeTransform.Summary, typeof(CharTokenizeTransform), null, typeof(SignatureLoadModel), - CharTokenizeTransform.UserName, CharTokenizeTransform.LoaderSignature)] +[assembly: LoadableClass(TokenizingByCharactersTransformer.Summary, typeof(TokenizingByCharactersTransformer), null, typeof(SignatureLoadModel), + TokenizingByCharactersTransformer.UserName, TokenizingByCharactersTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(CharTokenizeTransform), null, typeof(SignatureLoadRowMapper), - CharTokenizeTransform.UserName, CharTokenizeTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(TokenizingByCharactersTransformer), null, typeof(SignatureLoadRowMapper), + TokenizingByCharactersTransformer.UserName, TokenizingByCharactersTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Text { /// /// Character-oriented tokenizer where text is considered a sequence of characters. /// - public sealed class CharTokenizeTransform : OneToOneTransformerBase + public sealed class TokenizingByCharactersTransformer : OneToOneTransformerBase { public sealed class Column : OneToOneColumn { @@ -62,7 +62,7 @@ public sealed class Arguments : TransformInputBase [Argument(ArgumentType.Multiple, HelpText = "Whether to mark the beginning/end of each row/slot with start of text character (0x02)/end of text character (0x03)", ShortName = "mark", SortOrder = 2)] - public bool UseMarkerChars = CharacterTokenizingEstimator.Defaults.UseMarkerCharacters; + public bool UseMarkerChars = TokenizingByCharactersEstimator.Defaults.UseMarkerCharacters; // REVIEW: support UTF-32 encoding through an argument option? @@ -86,7 +86,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(CharTokenizeTransform).Assembly.FullName); + loaderAssemblyName: typeof(TokenizingByCharactersTransformer).Assembly.FullName); } // Controls whether to mark the beginning/end of each row/slot with TextStartMarker/TextEndMarker. @@ -108,7 +108,7 @@ private static VersionInfo GetVersionInfo() /// The environment. /// Whether to use marker characters to separate words. /// Pairs of columns to run the tokenization on. - public CharTokenizeTransform(IHostEnvironment env, bool useMarkerCharacters = CharacterTokenizingEstimator.Defaults.UseMarkerCharacters, params (string input, string output)[] columns) : + public TokenizingByCharactersTransformer(IHostEnvironment env, bool useMarkerCharacters = TokenizingByCharactersEstimator.Defaults.UseMarkerCharacters, params (string input, string output)[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), columns) { _useMarkerChars = useMarkerCharacters; @@ -119,11 +119,11 @@ public CharTokenizeTransform(IHostEnvironment env, bool useMarkerCharacters = Ch protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCol) { var type = inputSchema.GetColumnType(srcCol); - if (!CharacterTokenizingEstimator.IsColumnTypeValid(type)) - throw Host.ExceptParam(nameof(inputSchema), CharacterTokenizingEstimator.ExpectedColumnType); + if (!TokenizingByCharactersEstimator.IsColumnTypeValid(type)) + throw Host.ExceptParam(nameof(inputSchema), TokenizingByCharactersEstimator.ExpectedColumnType); } - private CharTokenizeTransform(IHost host, ModelLoadContext ctx) : + private TokenizingByCharactersTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) { // *** Binary format *** @@ -152,13 +152,13 @@ public override void Save(ModelSaveContext ctx) } // Factory method for SignatureLoadModel. - private static CharTokenizeTransform Create(IHostEnvironment env, ModelLoadContext ctx) + private static TokenizingByCharactersTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(RegistrationName); host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new CharTokenizeTransform(host, ctx); + return new TokenizingByCharactersTransformer(host, ctx); } // Factory method for SignatureDataTransform. @@ -175,7 +175,7 @@ internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDat var item = args.Column[i]; cols[i] = (item.Source ?? item.Name, item.Name); } - return new CharTokenizeTransform(env, args.UseMarkerChars, cols).MakeDataTransform(input); + return new TokenizingByCharactersTransformer(env, args.UseMarkerChars, cols).MakeDataTransform(input); } // Factory method for SignatureLoadRowMapper. @@ -184,16 +184,16 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : MapperBase + private sealed class Mapper : OneToOneMapperBase { private readonly ColumnType _type; - private readonly CharTokenizeTransform _parent; + private readonly TokenizingByCharactersTransformer _parent; private readonly bool[] _isSourceVector; // Constructed and cached the first time it is needed. private volatile string _keyValuesStr; private volatile int[] _keyValuesBoundaries; - public Mapper(CharTokenizeTransform parent, Schema inputSchema) + public Mapper(TokenizingByCharactersTransformer parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -204,7 +204,7 @@ public Mapper(CharTokenizeTransform parent, Schema inputSchema) _isSourceVector[i] = inputSchema[_parent.ColumnPairs[i].input].Type.IsVector; } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -258,12 +258,10 @@ private void GetKeyValues(int iinfo, ref VBuffer> dst) var keyValuesBoundaries = _keyValuesBoundaries; Host.AssertValue(keyValuesBoundaries); - var values = dst.Values; - if (Utils.Size(values) < CharsCount) - values = new ReadOnlyMemory[CharsCount]; + var editor = VBufferEditor.Create(ref dst, CharsCount); for (int i = 0; i < CharsCount; i++) - values[i] = keyValuesStr.AsMemory().Slice(keyValuesBoundaries[i], keyValuesBoundaries[i + 1] - keyValuesBoundaries[i]); - dst = new VBuffer>(CharsCount, values, dst.Indices); + editor.Values[i] = keyValuesStr.AsMemory().Slice(keyValuesBoundaries[i], keyValuesBoundaries[i + 1] - keyValuesBoundaries[i]); + dst = editor.Commit(); } private void AppendCharRepr(char c, StringBuilder bldr) @@ -399,7 +397,7 @@ private void AppendCharRepr(char c, StringBuilder bldr) } } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); @@ -421,24 +419,21 @@ private ValueGetter> MakeGetterOne(IRow input, int iinfo) getSrc(ref src); var len = !src.IsEmpty ? (_parent._useMarkerChars ? src.Length + TextMarkersCount : src.Length) : 0; - var values = dst.Values; + var editor = VBufferEditor.Create(ref dst, len); if (len > 0) { - if (Utils.Size(values) < len) - values = new ushort[len]; - int index = 0; if (_parent._useMarkerChars) - values[index++] = TextStartMarker; + editor.Values[index++] = TextStartMarker; var span = src.Span; for (int ich = 0; ich < src.Length; ich++) - values[index++] = span[ich]; + editor.Values[index++] = span[ich]; if (_parent._useMarkerChars) - values[index++] = TextEndMarker; + editor.Values[index++] = TextEndMarker; Contracts.Assert(index == len); } - dst = new VBuffer(len, values, dst.Indices); + dst = editor.Commit(); }; } @@ -457,39 +452,37 @@ private ValueGetter> MakeGetterVec(IRow input, int iinfo) getSrc(ref src); int len = 0; - for (int i = 0; i < src.Count; i++) + var srcValues = src.GetValues(); + for (int i = 0; i < srcValues.Length; i++) { - if (!src.Values[i].IsEmpty) + if (!srcValues[i].IsEmpty) { - len += src.Values[i].Length; + len += srcValues[i].Length; if (_parent._useMarkerChars) len += TextMarkersCount; } } - var values = dst.Values; + var editor = VBufferEditor.Create(ref dst, len); if (len > 0) { - if (Utils.Size(values) < len) - values = new ushort[len]; - int index = 0; - for (int i = 0; i < src.Count; i++) + for (int i = 0; i < srcValues.Length; i++) { - if (src.Values[i].IsEmpty) + if (srcValues[i].IsEmpty) continue; if (_parent._useMarkerChars) - values[index++] = TextStartMarker; - var span = src.Values[i].Span; - for (int ich = 0; ich < src.Values[i].Length; ich++) - values[index++] = span[ich]; + editor.Values[index++] = TextStartMarker; + var span = srcValues[i].Span; + for (int ich = 0; ich < srcValues[i].Length; ich++) + editor.Values[index++] = span[ich]; if (_parent._useMarkerChars) - values[index++] = TextEndMarker; + editor.Values[index++] = TextEndMarker; } Contracts.Assert(index == len); } - dst = new VBuffer(len, values, dst.Indices); + dst = editor.Commit(); }; ValueGetter> getterWithUnitSep = (ref VBuffer dst) => @@ -498,11 +491,12 @@ private ValueGetter> MakeGetterVec(IRow input, int iinfo) int len = 0; - for (int i = 0; i < src.Count; i++) + var srcValues = src.GetValues(); + for (int i = 0; i < srcValues.Length; i++) { - if (!src.Values[i].IsEmpty) + if (!srcValues[i].IsEmpty) { - len += src.Values[i].Length; + len += srcValues[i].Length; if (i > 0) len += 1; // add UnitSeparator character to len that will be added @@ -512,12 +506,9 @@ private ValueGetter> MakeGetterVec(IRow input, int iinfo) if (_parent._useMarkerChars) len += TextMarkersCount; - var values = dst.Values; + var editor = VBufferEditor.Create(ref dst, len); if (len > 0) { - if (Utils.Size(values) < len) - values = new ushort[len]; - int index = 0; // ReadOnlyMemory can be a result of either concatenating text columns together @@ -527,39 +518,38 @@ private ValueGetter> MakeGetterVec(IRow input, int iinfo) // Therefore, prepend and append start and end markers only once i.e. at the start and at end of vector. // Insert UnitSeparator after every piece of text in the vector. if (_parent._useMarkerChars) - values[index++] = TextStartMarker; + editor.Values[index++] = TextStartMarker; - for (int i = 0; i < src.Count; i++) + for (int i = 0; i < srcValues.Length; i++) { - if (src.Values[i].IsEmpty) + if (srcValues[i].IsEmpty) continue; if (i > 0) - values[index++] = UnitSeparator; + editor.Values[index++] = UnitSeparator; - var span = src.Values[i].Span; - for (int ich = 0; ich < src.Values[i].Length; ich++) - values[index++] = span[ich]; + var span = srcValues[i].Span; + for (int ich = 0; ich < srcValues[i].Length; ich++) + editor.Values[index++] = span[ich]; } if (_parent._useMarkerChars) - values[index++] = TextEndMarker; + editor.Values[index++] = TextEndMarker; Contracts.Assert(index == len); } - dst = new VBuffer(len, values, dst.Indices); + dst = editor.Commit(); }; return _parent._isSeparatorStartEnd ? getterWithStartEndSep : getterWithUnitSep; } } - } /// /// Character tokenizer splits text into sequences of characters using a sliding window. /// - public sealed class CharacterTokenizingEstimator : TrivialEstimator + public sealed class TokenizingByCharactersEstimator : TrivialEstimator { internal static class Defaults { @@ -576,7 +566,7 @@ internal static class Defaults /// The column containing text to tokenize. /// The column containing output tokens. Null means is replaced. /// Whether to use marker characters to separate words. - public CharacterTokenizingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, bool useMarkerCharacters = Defaults.UseMarkerCharacters) + public TokenizingByCharactersEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, bool useMarkerCharacters = Defaults.UseMarkerCharacters) : this(env, useMarkerCharacters, new[] { (inputColumn, outputColumn ?? inputColumn) }) { } @@ -588,8 +578,8 @@ public CharacterTokenizingEstimator(IHostEnvironment env, string inputColumn, st /// Whether to use marker characters to separate words. /// Pairs of columns to run the tokenization on. - public CharacterTokenizingEstimator(IHostEnvironment env, bool useMarkerCharacters = Defaults.UseMarkerCharacters, params (string input, string output)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(CharacterTokenizingEstimator)), new CharTokenizeTransform(env, useMarkerCharacters, columns)) + public TokenizingByCharactersEstimator(IHostEnvironment env, bool useMarkerCharacters = Defaults.UseMarkerCharacters, params (string input, string output)[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(TokenizingByCharactersEstimator)), new TokenizingByCharactersTransformer(env, useMarkerCharacters, columns)) { } diff --git a/src/Microsoft.ML.Transforms/Text/WordBagTransform.cs b/src/Microsoft.ML.Transforms/Text/WordBagTransform.cs index 279a0aaa3c..14f2668522 100644 --- a/src/Microsoft.ML.Transforms/Text/WordBagTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/WordBagTransform.cs @@ -14,13 +14,13 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(WordBagTransform.Summary, typeof(IDataTransform), typeof(WordBagTransform), typeof(WordBagTransform.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(WordBagBuildingTransformer.Summary, typeof(IDataTransform), typeof(WordBagBuildingTransformer), typeof(WordBagBuildingTransformer.Arguments), typeof(SignatureDataTransform), "Word Bag Transform", "WordBagTransform", "WordBag")] -[assembly: LoadableClass(NgramExtractorTransform.Summary, typeof(INgramExtractorFactory), typeof(NgramExtractorTransform), typeof(NgramExtractorTransform.NgramExtractorArguments), - typeof(SignatureNgramExtractorFactory), "Ngram Extractor Transform", "NgramExtractorTransform", "Ngram", NgramExtractorTransform.LoaderSignature)] +[assembly: LoadableClass(NgramExtractingTransformer.Summary, typeof(INgramExtractorFactory), typeof(NgramExtractingTransformer), typeof(NgramExtractingTransformer.NgramExtractorArguments), + typeof(SignatureNgramExtractorFactory), "Ngram Extractor Transform", "NgramExtractorTransform", "Ngram", NgramExtractingTransformer.LoaderSignature)] -[assembly: EntryPointModule(typeof(NgramExtractorTransform.NgramExtractorArguments))] +[assembly: EntryPointModule(typeof(NgramExtractingTransformer.NgramExtractorArguments))] namespace Microsoft.ML.Transforms.Text { @@ -30,8 +30,8 @@ namespace Microsoft.ML.Transforms.Text public delegate void SignatureNgramExtractorFactory(TermLoaderArguments termLoaderArgs); /// - /// A many-to-one column common to both - /// and . + /// A many-to-one column common to both + /// and . /// public sealed class ExtractorColumn : ManyToOneColumn { @@ -40,7 +40,7 @@ public sealed class ExtractorColumn : ManyToOneColumn public string[] FriendlyNames; } - public static class WordBagTransform + public static class WordBagBuildingTransformer { public sealed class Column : ManyToOneColumn { @@ -61,7 +61,7 @@ public sealed class Column : ManyToOneColumn public int[] MaxNumTerms = null; [Argument(ArgumentType.AtMostOnce, HelpText = "Statistical measure used to evaluate how important a word is to a document in a corpus")] - public NgramTransform.WeightingCriteria? Weighting; + public NgramCountingEstimator.WeightingCriteria? Weighting; public static Column Parse(string str) { @@ -94,7 +94,7 @@ public bool TryUnparse(StringBuilder sb) /// public sealed class TokenizeColumn : OneToOneColumn { } - public sealed class Arguments : NgramExtractorTransform.ArgumentsBase + public sealed class Arguments : NgramExtractingTransformer.ArgumentsBase { [Argument(ArgumentType.Multiple, HelpText = "New column definition(s) (optional form: name:srcs)", ShortName = "col", SortOrder = 1)] public Column[] Column; @@ -124,17 +124,17 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV // REVIEW: In order to make it possible to output separate bags for different columns // using the same dictionary, we need to find a way to make ConcatTransform remember the boundaries. - var tokenizeColumns = new WordTokenizeTransform.ColumnInfo[args.Column.Length]; + var tokenizeColumns = new WordTokenizingTransformer.ColumnInfo[args.Column.Length]; var extractorArgs = - new NgramExtractorTransform.Arguments() + new NgramExtractingTransformer.Arguments() { MaxNumTerms = args.MaxNumTerms, NgramLength = args.NgramLength, SkipLength = args.SkipLength, AllLengths = args.AllLengths, Weighting = args.Weighting, - Column = new NgramExtractorTransform.Column[args.Column.Length] + Column = new NgramExtractingTransformer.Column[args.Column.Length] }; for (int iinfo = 0; iinfo < args.Column.Length; iinfo++) @@ -144,10 +144,10 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV h.CheckUserArg(Utils.Size(column.Source) > 0, nameof(column.Source)); h.CheckUserArg(column.Source.All(src => !string.IsNullOrWhiteSpace(src)), nameof(column.Source)); - tokenizeColumns[iinfo] = new WordTokenizeTransform.ColumnInfo(column.Source.Length > 1 ? column.Name : column.Source[0], column.Name); + tokenizeColumns[iinfo] = new WordTokenizingTransformer.ColumnInfo(column.Source.Length > 1 ? column.Name : column.Source[0], column.Name); extractorArgs.Column[iinfo] = - new NgramExtractorTransform.Column() + new NgramExtractingTransformer.Column() { Name = column.Name, Source = column.Name, @@ -162,16 +162,16 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV IDataView view = input; view = NgramExtractionUtils.ApplyConcatOnSources(h, args.Column, view); view = new WordTokenizingEstimator(env, tokenizeColumns).Fit(view).Transform(view); - return NgramExtractorTransform.Create(h, extractorArgs, view); + return NgramExtractingTransformer.Create(h, extractorArgs, view); } } /// - /// A transform that turns a collection of tokenized text (vector of ReadOnlyMemory), or vectors of keys into numerical + /// A transform that turns a collection of tokenized text (vector of ReadOnlyMemory), or vectors of keys into numerical /// feature vectors. The feature vectors are counts of ngrams (sequences of consecutive *tokens* -words or keys- /// of length 1-n). /// - public static class NgramExtractorTransform + public static class NgramExtractingTransformer { public sealed class Column : OneToOneColumn { @@ -194,7 +194,7 @@ public sealed class Column : OneToOneColumn public int[] MaxNumTerms = null; [Argument(ArgumentType.AtMostOnce, HelpText = "The weighting criteria")] - public NgramTransform.WeightingCriteria? Weighting; + public NgramCountingEstimator.WeightingCriteria? Weighting; public static Column Parse(string str) { @@ -219,8 +219,8 @@ public bool TryUnparse(StringBuilder sb) } /// - /// This class is a merger of and - /// , with the allLength option removed. + /// This class is a merger of and + /// , with the allLength option removed. /// public abstract class ArgumentsBase { @@ -230,18 +230,18 @@ public abstract class ArgumentsBase [Argument(ArgumentType.AtMostOnce, HelpText = "Maximum number of tokens to skip when constructing an ngram", ShortName = "skips")] - public int SkipLength = 0; + public int SkipLength = NgramCountingEstimator.Defaults.SkipLength; [Argument(ArgumentType.AtMostOnce, HelpText = "Whether to include all ngram lengths up to " + nameof(NgramLength) + " or only " + nameof(NgramLength), ShortName = "all")] - public bool AllLengths = true; + public bool AllLengths = NgramCountingEstimator.Defaults.AllLength; [Argument(ArgumentType.Multiple, HelpText = "Maximum number of ngrams to store in the dictionary", ShortName = "max")] - public int[] MaxNumTerms = new int[] { NgramTransform.Arguments.DefaultMaxTerms }; + public int[] MaxNumTerms = new int[] { NgramCountingEstimator.Defaults.MaxNumTerms }; [Argument(ArgumentType.AtMostOnce, HelpText = "The weighting criteria")] - public NgramTransform.WeightingCriteria Weighting = NgramTransform.WeightingCriteria.Tf; + public NgramCountingEstimator.WeightingCriteria Weighting = NgramCountingEstimator.Defaults.Weighting; } [TlcModule.Component(Name = "NGram", FriendlyName = "NGram Extractor Transform", Alias = "NGramExtractorTransform,NGramExtractor", @@ -260,7 +260,7 @@ public sealed class Arguments : ArgumentsBase public Column[] Column; } - internal const string Summary = "A transform that turns a collection of tokenized text ReadOnlyMemory, or vectors of keys into numerical " + + internal const string Summary = "A transform that turns a collection of tokenized text ReadOnlyMemory, or vectors of keys into numerical " + "feature vectors. The feature vectors are counts of ngrams (sequences of consecutive *tokens* -words or keys- of length 1-n)."; internal const string LoaderSignature = "NgramExtractor"; @@ -300,12 +300,12 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV // of args.column are not text nor keys). if (termCols.Count > 0) { - TermTransform.Arguments termArgs = null; - NADropTransform.Arguments naDropArgs = null; + ValueToKeyMappingTransformer.Arguments termArgs = null; + string[] missingDropColumns = null; if (termLoaderArgs != null) { termArgs = - new TermTransform.Arguments() + new ValueToKeyMappingTransformer.Arguments() { MaxNumTerms = int.MaxValue, Terms = termLoaderArgs.Terms, @@ -314,19 +314,18 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV Loader = termLoaderArgs.Loader, TermsColumn = termLoaderArgs.TermsColumn, Sort = termLoaderArgs.Sort, - Column = new TermTransform.Column[termCols.Count] + Column = new ValueToKeyMappingTransformer.Column[termCols.Count] }; - if (termLoaderArgs.DropUnknowns) - naDropArgs = new NADropTransform.Arguments { Column = new NADropTransform.Column[termCols.Count] }; + missingDropColumns = new string[termCols.Count]; } else { termArgs = - new TermTransform.Arguments() + new ValueToKeyMappingTransformer.Arguments() { - MaxNumTerms = Utils.Size(args.MaxNumTerms) > 0 ? args.MaxNumTerms[0] : NgramTransform.Arguments.DefaultMaxTerms, - Column = new TermTransform.Column[termCols.Count] + MaxNumTerms = Utils.Size(args.MaxNumTerms) > 0 ? args.MaxNumTerms[0] : NgramCountingEstimator.Defaults.MaxNumTerms, + Column = new ValueToKeyMappingTransformer.Column[termCols.Count] }; } @@ -334,50 +333,36 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV { var column = termCols[iinfo]; termArgs.Column[iinfo] = - new TermTransform.Column() + new ValueToKeyMappingTransformer.Column() { Name = column.Name, Source = column.Source, MaxNumTerms = Utils.Size(column.MaxNumTerms) > 0 ? column.MaxNumTerms[0] : default(int?) }; - if (naDropArgs != null) - naDropArgs.Column[iinfo] = new NADropTransform.Column { Name = column.Name, Source = column.Name }; + if (missingDropColumns != null) + missingDropColumns[iinfo] = column.Name; } - view = TermTransform.Create(h, termArgs, view); - if (naDropArgs != null) - view = new NADropTransform(h, naDropArgs, view); + view = ValueToKeyMappingTransformer.Create(h, termArgs, view); + if (missingDropColumns != null) + view = new MissingValueDroppingTransformer(h, missingDropColumns.Select(x => (x, x)).ToArray()).Transform(view); } - var ngramArgs = - new NgramTransform.Arguments() - { - MaxNumTerms = args.MaxNumTerms, - NgramLength = args.NgramLength, - SkipLength = args.SkipLength, - AllLengths = args.AllLengths, - Weighting = args.Weighting, - Column = new NgramTransform.Column[args.Column.Length] - }; - + var ngramColumns = new NgramCountingTransformer.ColumnInfo[args.Column.Length]; for (int iinfo = 0; iinfo < args.Column.Length; iinfo++) { var column = args.Column[iinfo]; - ngramArgs.Column[iinfo] = - new NgramTransform.Column() - { - Name = column.Name, - Source = isTermCol[iinfo] ? column.Name : column.Source, - AllLengths = column.AllLengths, - MaxNumTerms = column.MaxNumTerms, - NgramLength = column.NgramLength, - SkipLength = column.SkipLength, - Weighting = column.Weighting - }; + ngramColumns[iinfo] = new NgramCountingTransformer.ColumnInfo(isTermCol[iinfo] ? column.Name : column.Source, column.Name, + column.NgramLength ?? args.NgramLength, + column.SkipLength ?? args.SkipLength, + column.AllLengths ?? args.AllLengths, + column.Weighting ?? args.Weighting, + column.MaxNumTerms ?? args.MaxNumTerms + ); } - return new NgramTransform(h, ngramArgs, view); + return new NgramCountingEstimator(env, ngramColumns).Fit(view).Transform(view) as IDataTransform; } public static IDataTransform Create(IHostEnvironment env, NgramExtractorArguments extractorArgs, IDataView input, @@ -425,7 +410,7 @@ public static INgramExtractorFactory Create(IHostEnvironment env, NgramExtractor /// /// Arguments for defining custom list of terms or data file containing the terms. - /// The class includes a subset of 's arguments. + /// The class includes a subset of 's arguments. /// public sealed class TermLoaderArguments { @@ -446,7 +431,7 @@ public sealed class TermLoaderArguments [Argument(ArgumentType.AtMostOnce, HelpText = "How items should be ordered when vectorized. By default, they will be in the order encountered. " + "If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a').", SortOrder = 5)] - public TermTransform.SortOrder Sort = TermTransform.SortOrder.Occurrence; + public ValueToKeyMappingTransformer.SortOrder Sort = ValueToKeyMappingTransformer.SortOrder.Occurrence; [Argument(ArgumentType.AtMostOnce, HelpText = "Drop unknown terms instead of mapping them to NA term.", ShortName = "dropna", SortOrder = 6)] public bool DropUnknowns = false; @@ -459,7 +444,7 @@ public interface INgramExtractorFactory { /// /// Whether the extractor transform created by this factory uses the hashing trick - /// (by using or , for example). + /// (by using or , for example). /// bool UseHashingTrick { get; } @@ -470,16 +455,16 @@ public interface INgramExtractorFactory public interface INgramExtractorFactoryFactory : IComponentFactory { } /// - /// An implementation of to create . + /// An implementation of to create . /// internal class NgramExtractorFactory : INgramExtractorFactory { - private readonly NgramExtractorTransform.NgramExtractorArguments _extractorArgs; + private readonly NgramExtractingTransformer.NgramExtractorArguments _extractorArgs; private readonly TermLoaderArguments _termLoaderArgs; public bool UseHashingTrick { get { return false; } } - public NgramExtractorFactory(NgramExtractorTransform.NgramExtractorArguments extractorArgs, + public NgramExtractorFactory(NgramExtractingTransformer.NgramExtractorArguments extractorArgs, TermLoaderArguments termLoaderArgs) { Contracts.CheckValue(extractorArgs, nameof(extractorArgs)); @@ -490,21 +475,21 @@ public NgramExtractorFactory(NgramExtractorTransform.NgramExtractorArguments ext public IDataTransform Create(IHostEnvironment env, IDataView input, ExtractorColumn[] cols) { - return NgramExtractorTransform.Create(env, _extractorArgs, input, cols, _termLoaderArgs); + return NgramExtractingTransformer.Create(env, _extractorArgs, input, cols, _termLoaderArgs); } } /// - /// An implementation of to create . + /// An implementation of to create . /// internal class NgramHashExtractorFactory : INgramExtractorFactory { - private readonly NgramHashExtractorTransform.NgramHashExtractorArguments _extractorArgs; + private readonly NgramHashExtractingTransformer.NgramHashExtractorArguments _extractorArgs; private readonly TermLoaderArguments _termLoaderArgs; public bool UseHashingTrick { get { return true; } } - public NgramHashExtractorFactory(NgramHashExtractorTransform.NgramHashExtractorArguments extractorArgs, + public NgramHashExtractorFactory(NgramHashExtractingTransformer.NgramHashExtractorArguments extractorArgs, TermLoaderArguments customTermsArgs = null) { Contracts.CheckValue(extractorArgs, nameof(extractorArgs)); @@ -515,7 +500,7 @@ public NgramHashExtractorFactory(NgramHashExtractorTransform.NgramHashExtractorA public IDataTransform Create(IHostEnvironment env, IDataView input, ExtractorColumn[] cols) { - return NgramHashExtractorTransform.Create(_extractorArgs, env, input, cols, _termLoaderArgs); + return NgramHashExtractingTransformer.Create(_extractorArgs, env, input, cols, _termLoaderArgs); } } @@ -528,10 +513,10 @@ public static IDataView ApplyConcatOnSources(IHostEnvironment env, ManyToOneColu env.CheckValue(input, nameof(input)); IDataView view = input; - var concatCols = new List(); + var concatCols = new List(); foreach (var col in columns) { - env.CheckUserArg(col != null, nameof(WordBagTransform.Arguments.Column)); + env.CheckUserArg(col != null, nameof(WordBagBuildingTransformer.Arguments.Column)); env.CheckUserArg(!string.IsNullOrWhiteSpace(col.Name), nameof(col.Name)); env.CheckUserArg(Utils.Size(col.Source) > 0, nameof(col.Source)); env.CheckUserArg(col.Source.All(src => !string.IsNullOrWhiteSpace(src)), nameof(col.Source)); @@ -539,7 +524,7 @@ public static IDataView ApplyConcatOnSources(IHostEnvironment env, ManyToOneColu if (col.Source.Length > 1) { concatCols.Add( - new ConcatTransform.Column + new ColumnConcatenatingTransformer.Column { Source = col.Source, Name = col.Name @@ -548,8 +533,8 @@ public static IDataView ApplyConcatOnSources(IHostEnvironment env, ManyToOneColu } if (concatCols.Count > 0) { - var concatArgs = new ConcatTransform.Arguments { Column = concatCols.ToArray() }; - return ConcatTransform.Create(env, concatArgs, view); + var concatArgs = new ColumnConcatenatingTransformer.Arguments { Column = concatCols.ToArray() }; + return ColumnConcatenatingTransformer.Create(env, concatArgs, view); } return view; @@ -570,7 +555,7 @@ public static string[][] GenerateUniqueSourceNames(IHostEnvironment env, ManyToO for (int iinfo = 0; iinfo < columns.Length; iinfo++) { var col = columns[iinfo]; - env.CheckUserArg(col != null, nameof(WordHashBagTransform.Arguments.Column)); + env.CheckUserArg(col != null, nameof(WordHashBagProducingTransformer.Arguments.Column)); env.CheckUserArg(!string.IsNullOrWhiteSpace(col.Name), nameof(col.Name)); env.CheckUserArg(Utils.Size(col.Source) > 0 && col.Source.All(src => !string.IsNullOrWhiteSpace(src)), nameof(col.Source)); @@ -595,4 +580,4 @@ public static string[][] GenerateUniqueSourceNames(IHostEnvironment env, ManyToO return uniqueNames; } } -} +} \ No newline at end of file diff --git a/src/Microsoft.ML.Transforms/Text/WordEmbeddingsTransform.cs b/src/Microsoft.ML.Transforms/Text/WordEmbeddingsExtractor.cs similarity index 78% rename from src/Microsoft.ML.Transforms/Text/WordEmbeddingsTransform.cs rename to src/Microsoft.ML.Transforms/Text/WordEmbeddingsExtractor.cs index c32c716e32..8f8177b291 100644 --- a/src/Microsoft.ML.Transforms/Text/WordEmbeddingsTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/WordEmbeddingsExtractor.cs @@ -15,27 +15,29 @@ using Microsoft.ML.StaticPipe.Runtime; using Microsoft.ML.Transforms.Text; using System; +using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; +using System.Threading.Tasks; -[assembly: LoadableClass(WordEmbeddingsTransform.Summary, typeof(IDataTransform), typeof(WordEmbeddingsTransform), typeof(WordEmbeddingsTransform.Arguments), - typeof(SignatureDataTransform), WordEmbeddingsTransform.UserName, "WordEmbeddingsTransform", WordEmbeddingsTransform.ShortName, DocName = "transform/WordEmbeddingsTransform.md")] +[assembly: LoadableClass(WordEmbeddingsExtractingTransformer.Summary, typeof(IDataTransform), typeof(WordEmbeddingsExtractingTransformer), typeof(WordEmbeddingsExtractingTransformer.Arguments), + typeof(SignatureDataTransform), WordEmbeddingsExtractingTransformer.UserName, "WordEmbeddingsTransform", WordEmbeddingsExtractingTransformer.ShortName, DocName = "transform/WordEmbeddingsTransform.md")] -[assembly: LoadableClass(WordEmbeddingsTransform.Summary, typeof(IDataTransform), typeof(WordEmbeddingsTransform), null, typeof(SignatureLoadDataTransform), - WordEmbeddingsTransform.UserName, WordEmbeddingsTransform.LoaderSignature)] +[assembly: LoadableClass(WordEmbeddingsExtractingTransformer.Summary, typeof(IDataTransform), typeof(WordEmbeddingsExtractingTransformer), null, typeof(SignatureLoadDataTransform), + WordEmbeddingsExtractingTransformer.UserName, WordEmbeddingsExtractingTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(WordEmbeddingsTransform), null, typeof(SignatureLoadModel), - WordEmbeddingsTransform.UserName, WordEmbeddingsTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(WordEmbeddingsExtractingTransformer), null, typeof(SignatureLoadModel), + WordEmbeddingsExtractingTransformer.UserName, WordEmbeddingsExtractingTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(WordEmbeddingsTransform), null, typeof(SignatureLoadRowMapper), - WordEmbeddingsTransform.UserName, WordEmbeddingsTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(WordEmbeddingsExtractingTransformer), null, typeof(SignatureLoadRowMapper), + WordEmbeddingsExtractingTransformer.UserName, WordEmbeddingsExtractingTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Text { /// - public sealed class WordEmbeddingsTransform : OneToOneTransformerBase + public sealed class WordEmbeddingsExtractingTransformer : OneToOneTransformerBase { public sealed class Column : OneToOneColumn { @@ -83,7 +85,7 @@ public static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(WordEmbeddingsTransform).Assembly.FullName); + loaderAssemblyName: typeof(WordEmbeddingsExtractingTransformer).Assembly.FullName); } private readonly PretrainedModelKind? _modelKind; @@ -118,7 +120,7 @@ public void AddWordVector(IChannel ch, string word, float[] wordVector) } } - public bool GetWordVector(ref ReadOnlyMemory word, float[] wordVector) + public bool GetWordVector(in ReadOnlyMemory word, float[] wordVector) { NormStr str = _pool.Get(word); if (str != null) @@ -170,53 +172,53 @@ public ColumnInfo(string input, string output) private const int Timeout = 10 * 60 * 1000; /// - /// Instantiates using the pretrained word embedding model specified by . + /// Instantiates using the pretrained word embedding model specified by . /// /// Host Environment. /// Name of the input column. /// Name of the output column. /// The pretrained word embedding model. - public WordEmbeddingsTransform(IHostEnvironment env, string inputColumn, string outputColumn, + public WordEmbeddingsExtractingTransformer(IHostEnvironment env, string inputColumn, string outputColumn, PretrainedModelKind modelKind = PretrainedModelKind.Sswe) : this(env, modelKind, new ColumnInfo(inputColumn, outputColumn)) { } /// - /// Instantiates using the custom word embedding model by loading it from the file specified by the . + /// Instantiates using the custom word embedding model by loading it from the file specified by the . /// /// Host Environment. /// Name of the input column. /// Name of the output column. /// Filename for custom word embedding model. - public WordEmbeddingsTransform(IHostEnvironment env, string inputColumn, string outputColumn, string customModelFile) + public WordEmbeddingsExtractingTransformer(IHostEnvironment env, string inputColumn, string outputColumn, string customModelFile) : this(env, customModelFile, new ColumnInfo(inputColumn, outputColumn)) { } /// - /// Instantiates using the pretrained word embedding model specified by . + /// Instantiates using the pretrained word embedding model specified by . /// /// Host Environment. /// The pretrained word embedding model. /// Input/Output columns. - public WordEmbeddingsTransform(IHostEnvironment env, PretrainedModelKind modelKind, params ColumnInfo[] columns) + public WordEmbeddingsExtractingTransformer(IHostEnvironment env, PretrainedModelKind modelKind, params ColumnInfo[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), GetColumnPairs(columns)) { env.CheckUserArg(Enum.IsDefined(typeof(PretrainedModelKind), modelKind), nameof(modelKind)); _modelKind = modelKind; _modelFileNameWithPath = EnsureModelFile(env, out _linesToSkip, (PretrainedModelKind)_modelKind); - _currentVocab = GetVocabularyDictionary(); + _currentVocab = GetVocabularyDictionary(env); } /// - /// Instantiates using the custom word embedding model by loading it from the file specified by the . + /// Instantiates using the custom word embedding model by loading it from the file specified by the . /// /// Host Environment. /// Filename for custom word embedding model. /// Input/Output columns. - public WordEmbeddingsTransform(IHostEnvironment env, string customModelFile, params ColumnInfo[] columns) + public WordEmbeddingsExtractingTransformer(IHostEnvironment env, string customModelFile, params ColumnInfo[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), GetColumnPairs(columns)) { env.CheckValue(customModelFile, nameof(customModelFile)); @@ -225,7 +227,7 @@ public WordEmbeddingsTransform(IHostEnvironment env, string customModelFile, par _modelKind = null; _customLookup = true; _modelFileNameWithPath = customModelFile; - _currentVocab = GetVocabularyDictionary(); + _currentVocab = GetVocabularyDictionary(env); } private static (string input, string output)[] GetColumnPairs(ColumnInfo[] columns) @@ -258,12 +260,12 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV bool customLookup = !string.IsNullOrWhiteSpace(args.CustomLookupTable); if (customLookup) - return new WordEmbeddingsTransform(env, args.CustomLookupTable, cols).MakeDataTransform(input); + return new WordEmbeddingsExtractingTransformer(env, args.CustomLookupTable, cols).MakeDataTransform(input); else - return new WordEmbeddingsTransform(env, args.ModelKind.Value, cols).MakeDataTransform(input); + return new WordEmbeddingsExtractingTransformer(env, args.ModelKind.Value, cols).MakeDataTransform(input); } - private WordEmbeddingsTransform(IHost host, ModelLoadContext ctx) + private WordEmbeddingsExtractingTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) { Host.AssertValue(ctx); @@ -281,16 +283,16 @@ private WordEmbeddingsTransform(IHost host, ModelLoadContext ctx) } Host.CheckNonWhiteSpace(_modelFileNameWithPath, nameof(_modelFileNameWithPath)); - _currentVocab = GetVocabularyDictionary(); + _currentVocab = GetVocabularyDictionary(host); } - public static WordEmbeddingsTransform Create(IHostEnvironment env, ModelLoadContext ctx) + public static WordEmbeddingsExtractingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); IHost h = env.Register(RegistrationName); h.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new WordEmbeddingsTransform(h, ctx); + return new WordEmbeddingsExtractingTransformer(h, ctx); } // Factory method for SignatureLoadDataTransform. @@ -324,12 +326,12 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].input, "Text", inputSchema.GetColumnType(srcCol).ToString()); } - private sealed class Mapper : MapperBase, ISaveAsOnnx + private sealed class Mapper : OneToOneMapperBase, ISaveAsOnnx { - private readonly WordEmbeddingsTransform _parent; + private readonly WordEmbeddingsExtractingTransformer _parent; private readonly VectorType _outputType; - public Mapper(WordEmbeddingsTransform parent, Schema inputSchema) + public Mapper(WordEmbeddingsExtractingTransformer parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { Host.CheckValue(inputSchema, nameof(inputSchema)); @@ -345,7 +347,7 @@ public Mapper(WordEmbeddingsTransform parent, Schema inputSchema) public bool CanSaveOnnx(OnnxContext ctx) => true; - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() => _parent.ColumnPairs.Select(x => new Schema.Column(x.output, _outputType, null)).ToArray(); public void SaveAsOnnx(OnnxContext ctx) @@ -556,7 +558,7 @@ private void SaveAsOnnxCore(OnnxContext ctx, string srcVariableName, string dstV nodeP.AddAttribute("axis", 1); } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); @@ -583,38 +585,37 @@ private ValueGetter> GetGetterVec(IRow input, int iinfo) { int deno = 0; srcGetter(ref src); - var values = dst.Values; - if (Utils.Size(values) != 3 * dimension) - values = new float[3 * dimension]; + var editor = VBufferEditor.Create(ref dst, 3 * dimension); int offset = 2 * dimension; for (int i = 0; i < dimension; i++) { - values[i] = float.MaxValue; - values[i + dimension] = 0; - values[i + offset] = float.MinValue; + editor.Values[i] = float.MaxValue; + editor.Values[i + dimension] = 0; + editor.Values[i + offset] = float.MinValue; } - for (int word = 0; word < src.Count; word++) + var srcValues = src.GetValues(); + for (int word = 0; word < srcValues.Length; word++) { - if (_parent._currentVocab.GetWordVector(ref src.Values[word], wordVector)) + if (_parent._currentVocab.GetWordVector(in srcValues[word], wordVector)) { deno++; for (int i = 0; i < dimension; i++) { float currentTerm = wordVector[i]; - if (values[i] > currentTerm) - values[i] = currentTerm; - values[dimension + i] += currentTerm; - if (values[offset + i] < currentTerm) - values[offset + i] = currentTerm; + if (editor.Values[i] > currentTerm) + editor.Values[i] = currentTerm; + editor.Values[dimension + i] += currentTerm; + if (editor.Values[offset + i] < currentTerm) + editor.Values[offset + i] = currentTerm; } } } if (deno != 0) for (int index = 0; index < dimension; index++) - values[index + dimension] /= deno; + editor.Values[index + dimension] /= deno; - dst = new VBuffer(values.Length, values, dst.Indices); + dst = editor.Commit(); }; } } @@ -697,7 +698,7 @@ private string EnsureModelFile(IHostEnvironment env, out int linesToSkip, Pretra throw Host.Except($"Can't map model kind = {kind} to specific file, please refer to https://aka.ms/MLNetIssue for assistance"); } - private Model GetVocabularyDictionary() + private Model GetVocabularyDictionary(IHostEnvironment hostEnvironment) { int dimension = 0; if (!File.Exists(_modelFileNameWithPath)) @@ -723,94 +724,96 @@ private Model GetVocabularyDictionary() } } - Model model = null; - using (StreamReader sr = File.OpenText(_modelFileNameWithPath)) + using (var ch = Host.Start(LoaderSignature)) + using (var pch = Host.StartProgressChannel("Building Vocabulary from Model File for Word Embeddings Transform")) { - string line; - int lineNumber = 1; - char[] delimiters = { ' ', '\t' }; - using (var ch = Host.Start(LoaderSignature)) - using (var pch = Host.StartProgressChannel("Building Vocabulary from Model File for Word Embeddings Transform")) - { - var header = new ProgressHeader(new[] { "lines" }); - pch.SetHeader(header, e => e.SetProgress(0, lineNumber)); - string firstLine = sr.ReadLine(); - while ((line = sr.ReadLine()) != null) + var parsedData = new ConcurrentBag<(string key, float[] values, long lineNumber)>(); + int skippedLinesCount = Math.Max(1, _linesToSkip); + + Parallel.ForEach(File.ReadLines(_modelFileNameWithPath).Skip(skippedLinesCount), GetParallelOptions(hostEnvironment), + (line, parallelState, lineNumber) => { - if (lineNumber >= _linesToSkip) - { - string[] words = line.TrimEnd().Split(delimiters); - dimension = words.Length - 1; - if (model == null) - model = new Model(dimension); - if (model.Dimension != dimension) - ch.Warning($"Dimension mismatch while reading model file: '{_modelFileNameWithPath}', line number {lineNumber + 1}, expected dimension = {model.Dimension}, received dimension = {dimension}"); - else - { - float tmp; - string key = words[0]; - float[] value = words.Skip(1).Select(x => float.TryParse(x, out tmp) ? tmp : Single.NaN).ToArray(); - if (!value.Contains(Single.NaN)) - model.AddWordVector(ch, key, value); - else - ch.Warning($"Parsing error while reading model file: '{_modelFileNameWithPath}', line number {lineNumber + 1}"); - } - } - lineNumber++; - } + (bool isSuccess, string key, float[] values) = LineParser.ParseKeyThenNumbers(line); + + if (isSuccess) + parsedData.Add((key, values, lineNumber + skippedLinesCount)); + else // we use shared state here (ch) but it's not our hot path and we don't care about unhappy-path performance + ch.Warning($"Parsing error while reading model file: '{_modelFileNameWithPath}', line number {lineNumber + skippedLinesCount}"); + }); - // Handle first line of the embedding file separately since some embedding files including fastText have a single-line header - string[] wordsInFirstLine = firstLine.TrimEnd().Split(delimiters); - dimension = wordsInFirstLine.Length - 1; + Model model = null; + foreach (var parsedLine in parsedData.OrderBy(parsedLine => parsedLine.lineNumber)) + { + dimension = parsedLine.values.Length; if (model == null) model = new Model(dimension); - if (model.Dimension == dimension) - { - float temp; - string firstKey = wordsInFirstLine[0]; - float[] firstValue = wordsInFirstLine.Skip(1).Select(x => float.TryParse(x, out temp) ? temp : Single.NaN).ToArray(); - if (!firstValue.Contains(Single.NaN)) - model.AddWordVector(ch, firstKey, firstValue); - } - pch.Checkpoint(lineNumber); + if (model.Dimension != dimension) + ch.Warning($"Dimension mismatch while reading model file: '{_modelFileNameWithPath}', line number {parsedLine.lineNumber}, expected dimension = {model.Dimension}, received dimension = {dimension}"); + else + model.AddWordVector(ch, parsedLine.key, parsedLine.values); } + + // Handle first line of the embedding file separately since some embedding files including fastText have a single-line header + var firstLine = File.ReadLines(_modelFileNameWithPath).First(); + string[] wordsInFirstLine = firstLine.TrimEnd().Split(' ', '\t'); + dimension = wordsInFirstLine.Length - 1; + if (model == null) + model = new Model(dimension); + if (model.Dimension == dimension) + { + float temp; + string firstKey = wordsInFirstLine[0]; + float[] firstValue = wordsInFirstLine.Skip(1).Select(x => float.TryParse(x, out temp) ? temp : Single.NaN).ToArray(); + if (!firstValue.Contains(Single.NaN)) + model.AddWordVector(ch, firstKey, firstValue); + } + + _vocab[_modelFileNameWithPath] = new WeakReference(model, false); + return model; } - _vocab[_modelFileNameWithPath] = new WeakReference(model, false); - return model; } } + + private static ParallelOptions GetParallelOptions(IHostEnvironment hostEnvironment) + { + // "Less than 1 means whatever the component views as ideal." (about ConcurrencyFactor) + if (hostEnvironment.ConcurrencyFactor < 1) + return new ParallelOptions(); // we provide default options and let the Parallel decide + else + return new ParallelOptions() { MaxDegreeOfParallelism = hostEnvironment.ConcurrencyFactor }; + } } /// - public sealed class WordEmbeddingsExtractorEstimator : IEstimator + public sealed class WordEmbeddingsExtractingEstimator : IEstimator { private readonly IHost _host; - private readonly WordEmbeddingsTransform.ColumnInfo[] _columns; - private readonly WordEmbeddingsTransform.PretrainedModelKind? _modelKind; + private readonly WordEmbeddingsExtractingTransformer.ColumnInfo[] _columns; + private readonly WordEmbeddingsExtractingTransformer.PretrainedModelKind? _modelKind; private readonly string _customLookupTable; /// - /// Initializes a new instance of + /// Initializes a new instance of /// /// The local instance of /// The input column. /// The optional output column. If it is null the input column will be substituted with its value. - /// The embeddings to use. - public WordEmbeddingsExtractorEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, - WordEmbeddingsTransform.PretrainedModelKind modelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe) - : this(env, modelKind, new WordEmbeddingsTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn)) + /// The embeddings to use. + public WordEmbeddingsExtractingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, + WordEmbeddingsExtractingTransformer.PretrainedModelKind modelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe) + : this(env, modelKind, new WordEmbeddingsExtractingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn)) { } /// - /// Initializes a new instance of + /// Initializes a new instance of /// /// The local instance of /// The input column. /// The optional output column. If it is null the input column will be substituted with its value. /// The path of the pre-trained embeedings model to use. - public WordEmbeddingsExtractorEstimator(IHostEnvironment env, string inputColumn, string outputColumn, string customModelFile) - : this(env, customModelFile, new WordEmbeddingsTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn)) + public WordEmbeddingsExtractingEstimator(IHostEnvironment env, string inputColumn, string outputColumn, string customModelFile) + : this(env, customModelFile, new WordEmbeddingsExtractingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn)) { } @@ -818,22 +821,22 @@ public WordEmbeddingsExtractorEstimator(IHostEnvironment env, string inputColumn /// Extracts word embeddings. /// /// The local instance of - /// The embeddings to use. + /// The embeddings to use. /// The array columns, and per-column configurations to extract embeedings from. - public WordEmbeddingsExtractorEstimator(IHostEnvironment env, - WordEmbeddingsTransform.PretrainedModelKind modelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe, params WordEmbeddingsTransform.ColumnInfo[] columns) + public WordEmbeddingsExtractingEstimator(IHostEnvironment env, + WordEmbeddingsExtractingTransformer.PretrainedModelKind modelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe, params WordEmbeddingsExtractingTransformer.ColumnInfo[] columns) { Contracts.CheckValue(env, nameof(env)); - _host = env.Register(nameof(WordEmbeddingsExtractorEstimator)); + _host = env.Register(nameof(WordEmbeddingsExtractingEstimator)); _modelKind = modelKind; _customLookupTable = null; _columns = columns; } - public WordEmbeddingsExtractorEstimator(IHostEnvironment env, string customModelFile, params WordEmbeddingsTransform.ColumnInfo[] columns) + public WordEmbeddingsExtractingEstimator(IHostEnvironment env, string customModelFile, params WordEmbeddingsExtractingTransformer.ColumnInfo[] columns) { Contracts.CheckValue(env, nameof(env)); - _host = env.Register(nameof(WordEmbeddingsExtractorEstimator)); + _host = env.Register(nameof(WordEmbeddingsExtractingEstimator)); _modelKind = null; _customLookupTable = customModelFile; _columns = columns; @@ -856,13 +859,13 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) return new SchemaShape(result.Values); } - public WordEmbeddingsTransform Fit(IDataView input) + public WordEmbeddingsExtractingTransformer Fit(IDataView input) { bool customLookup = !string.IsNullOrWhiteSpace(_customLookupTable); if (customLookup) - return new WordEmbeddingsTransform(_host, _customLookupTable, _columns); + return new WordEmbeddingsExtractingTransformer(_host, _customLookupTable, _columns); else - return new WordEmbeddingsTransform(_host, _modelKind.Value, _columns); + return new WordEmbeddingsExtractingTransformer(_host, _modelKind.Value, _columns); } } @@ -872,7 +875,7 @@ public static class WordEmbeddingsStaticExtensions /// Vector of tokenized text. /// The pretrained word embedding model. /// - public static Vector WordEmbeddings(this VarVector input, WordEmbeddingsTransform.PretrainedModelKind modelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe) + public static Vector WordEmbeddings(this VarVector input, WordEmbeddingsExtractingTransformer.PretrainedModelKind modelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe) { Contracts.CheckValue(input, nameof(input)); return new OutColumn(input, modelKind); @@ -891,7 +894,7 @@ private sealed class OutColumn : Vector { public PipelineColumn Input { get; } - public OutColumn(VarVector input, WordEmbeddingsTransform.PretrainedModelKind modelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe) + public OutColumn(VarVector input, WordEmbeddingsExtractingTransformer.PretrainedModelKind modelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe) : base(new Reconciler(modelKind), input) { Input = input; @@ -906,10 +909,10 @@ public OutColumn(VarVector input, string customModelFile = null) private sealed class Reconciler : EstimatorReconciler { - private readonly WordEmbeddingsTransform.PretrainedModelKind? _modelKind; + private readonly WordEmbeddingsExtractingTransformer.PretrainedModelKind? _modelKind; private readonly string _customLookupTable; - public Reconciler(WordEmbeddingsTransform.PretrainedModelKind modelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe) + public Reconciler(WordEmbeddingsExtractingTransformer.PretrainedModelKind modelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe) { _modelKind = modelKind; _customLookupTable = null; @@ -929,18 +932,18 @@ public override IEstimator Reconcile(IHostEnvironment env, { Contracts.Assert(toOutput.Length == 1); - var cols = new WordEmbeddingsTransform.ColumnInfo[toOutput.Length]; + var cols = new WordEmbeddingsExtractingTransformer.ColumnInfo[toOutput.Length]; for (int i = 0; i < toOutput.Length; ++i) { var outCol = (OutColumn)toOutput[i]; - cols[i] = new WordEmbeddingsTransform.ColumnInfo(inputNames[outCol.Input], outputNames[outCol]); + cols[i] = new WordEmbeddingsExtractingTransformer.ColumnInfo(inputNames[outCol.Input], outputNames[outCol]); } bool customLookup = !string.IsNullOrWhiteSpace(_customLookupTable); if (customLookup) - return new WordEmbeddingsExtractorEstimator(env, _customLookupTable, cols); + return new WordEmbeddingsExtractingEstimator(env, _customLookupTable, cols); else - return new WordEmbeddingsExtractorEstimator(env, _modelKind.Value, cols); + return new WordEmbeddingsExtractingEstimator(env, _modelKind.Value, cols); } } } diff --git a/src/Microsoft.ML.Transforms/Text/WordHashBagTransform.cs b/src/Microsoft.ML.Transforms/Text/WordHashBagProducingTransform.cs similarity index 87% rename from src/Microsoft.ML.Transforms/Text/WordHashBagTransform.cs rename to src/Microsoft.ML.Transforms/Text/WordHashBagProducingTransform.cs index aec1912bea..fa727b3bbd 100644 --- a/src/Microsoft.ML.Transforms/Text/WordHashBagTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/WordHashBagProducingTransform.cs @@ -14,19 +14,19 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(WordHashBagTransform.Summary, typeof(IDataTransform), typeof(WordHashBagTransform), typeof(WordHashBagTransform.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(WordHashBagProducingTransformer.Summary, typeof(IDataTransform), typeof(WordHashBagProducingTransformer), typeof(WordHashBagProducingTransformer.Arguments), typeof(SignatureDataTransform), "Word Hash Bag Transform", "WordHashBagTransform", "WordHashBag")] -[assembly: LoadableClass(NgramHashExtractorTransform.Summary, typeof(INgramExtractorFactory), typeof(NgramHashExtractorTransform), typeof(NgramHashExtractorTransform.NgramHashExtractorArguments), - typeof(SignatureNgramExtractorFactory), "Ngram Hash Extractor Transform", "NgramHashExtractorTransform", "NgramHash", NgramHashExtractorTransform.LoaderSignature)] +[assembly: LoadableClass(NgramHashExtractingTransformer.Summary, typeof(INgramExtractorFactory), typeof(NgramHashExtractingTransformer), typeof(NgramHashExtractingTransformer.NgramHashExtractorArguments), + typeof(SignatureNgramExtractorFactory), "Ngram Hash Extractor Transform", "NgramHashExtractorTransform", "NgramHash", NgramHashExtractingTransformer.LoaderSignature)] -[assembly: EntryPointModule(typeof(NgramHashExtractorTransform.NgramHashExtractorArguments))] +[assembly: EntryPointModule(typeof(NgramHashExtractingTransformer.NgramHashExtractorArguments))] namespace Microsoft.ML.Transforms.Text { - public static class WordHashBagTransform + public static class WordHashBagProducingTransformer { - public sealed class Column : NgramHashExtractorTransform.ColumnBase + public sealed class Column : NgramHashExtractingTransformer.ColumnBase { public static Column Parse(string str) { @@ -73,7 +73,7 @@ public bool TryUnparse(StringBuilder sb) } } - public sealed class Arguments : NgramHashExtractorTransform.ArgumentsBase + public sealed class Arguments : NgramHashExtractingTransformer.ArgumentsBase { [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "New column definition(s) (optional form: name:hashBits:srcs)", ShortName = "col", SortOrder = 1)] @@ -103,8 +103,8 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV var uniqueSourceNames = NgramExtractionUtils.GenerateUniqueSourceNames(h, args.Column, view.Schema); Contracts.Assert(uniqueSourceNames.Length == args.Column.Length); - var tokenizeColumns = new List(); - var extractorCols = new NgramHashExtractorTransform.Column[args.Column.Length]; + var tokenizeColumns = new List(); + var extractorCols = new NgramHashExtractingTransformer.Column[args.Column.Length]; var colCount = args.Column.Length; List tmpColNames = new List(); for (int iinfo = 0; iinfo < colCount; iinfo++) @@ -114,11 +114,11 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV var curTmpNames = new string[srcCount]; Contracts.Assert(uniqueSourceNames[iinfo].Length == args.Column[iinfo].Source.Length); for (int isrc = 0; isrc < srcCount; isrc++) - tokenizeColumns.Add(new WordTokenizeTransform.ColumnInfo(args.Column[iinfo].Source[isrc], curTmpNames[isrc] = uniqueSourceNames[iinfo][isrc])); + tokenizeColumns.Add(new WordTokenizingTransformer.ColumnInfo(args.Column[iinfo].Source[isrc], curTmpNames[isrc] = uniqueSourceNames[iinfo][isrc])); tmpColNames.AddRange(curTmpNames); extractorCols[iinfo] = - new NgramHashExtractorTransform.Column + new NgramHashExtractingTransformer.Column { Name = column.Name, Source = curTmpNames, @@ -136,7 +136,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV view = new WordTokenizingEstimator(env, tokenizeColumns.ToArray()).Fit(view).Transform(view); var featurizeArgs = - new NgramHashExtractorTransform.Arguments + new NgramHashExtractingTransformer.Arguments { AllLengths = args.AllLengths, HashBits = args.HashBits, @@ -148,10 +148,10 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV InvertHash = args.InvertHash }; - view = NgramHashExtractorTransform.Create(h, featurizeArgs, view); + view = NgramHashExtractingTransformer.Create(h, featurizeArgs, view); // Since we added columns with new names, we need to explicitly drop them before we return the IDataTransform. - return SelectColumnsTransform.CreateDrop(h, view, tmpColNames.ToArray()); + return ColumnSelectingTransformer.CreateDrop(h, view, tmpColNames.ToArray()); } } @@ -159,7 +159,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV /// A transform that turns a collection of tokenized text (vector of ReadOnlyMemory) into numerical feature vectors /// using the hashing trick. ///
- public static class NgramHashExtractorTransform + public static class NgramHashExtractingTransformer { public abstract class ColumnBase : ManyToOneColumn { @@ -245,8 +245,8 @@ public bool TryUnparse(StringBuilder sb) } /// - /// This class is a merger of and - /// , with the ordered option, + /// This class is a merger of and + /// , with the ordered option, /// the rehashUnigrams option and the allLength option removed. /// public abstract class ArgumentsBase @@ -316,11 +316,11 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV // bits (to minimize collisions) is applied first, followed by an NgramHashTransform. IDataView view = input; - List termCols = null; + List termCols = null; if (termLoaderArgs != null) - termCols = new List(); - var hashColumns = new List(); - var ngramHashColumns = new NgramHashTransform.Column[args.Column.Length]; + termCols = new List(); + var hashColumns = new List(); + var ngramHashColumns = new NgramHashingTransformer.Column[args.Column.Length]; var colCount = args.Column.Length; // The NGramHashExtractor has a ManyToOne column type. To avoid stepping over the source @@ -342,7 +342,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV if (termLoaderArgs != null) { termCols.Add( - new TermTransform.Column + new ValueToKeyMappingTransformer.Column { Name = tmpName, Source = column.Source[isrc] @@ -350,7 +350,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV } hashColumns.Add( - new HashTransformer.Column + new HashingTransformer.Column { Name = tmpName, Source = termLoaderArgs == null ? column.Source[isrc] : tmpName, @@ -362,7 +362,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV } ngramHashColumns[iinfo] = - new NgramHashTransform.Column + new NgramHashingTransformer.Column { Name = column.Name, Source = tmpColNames[iinfo], @@ -387,7 +387,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV { h.Assert(Utils.Size(termCols) == hashColumns.Count); var termArgs = - new TermTransform.Arguments() + new ValueToKeyMappingTransformer.Arguments() { MaxNumTerms = int.MaxValue, Terms = termLoaderArgs.Terms, @@ -398,23 +398,20 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV Sort = termLoaderArgs.Sort, Column = termCols.ToArray() }; - view = TermTransform.Create(h, termArgs, view); + view = ValueToKeyMappingTransformer.Create(h, termArgs, view); if (termLoaderArgs.DropUnknowns) { - var naDropArgs = new NADropTransform.Arguments { Column = new NADropTransform.Column[termCols.Count] }; + var missingDropColumns = new (string input, string output)[termCols.Count]; for (int iinfo = 0; iinfo < termCols.Count; iinfo++) - { - naDropArgs.Column[iinfo] = - new NADropTransform.Column { Name = termCols[iinfo].Name, Source = termCols[iinfo].Name }; - } - view = new NADropTransform(h, naDropArgs, view); + missingDropColumns[iinfo] = (termCols[iinfo].Name, termCols[iinfo].Name); + view = new MissingValueDroppingTransformer(h, missingDropColumns).Transform(view); } } // Args for the Hash function with multiple columns var hashArgs = - new HashTransformer.Arguments + new HashingTransformer.Arguments { HashBits = 31, Seed = args.Seed, @@ -423,11 +420,11 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV InvertHash = args.InvertHash }; - view = HashTransformer.Create(h, hashArgs, view); + view = HashingTransformer.Create(h, hashArgs, view); // creating the NgramHash function var ngramHashArgs = - new NgramHashTransform.Arguments + new NgramHashingTransformer.Arguments { AllLengths = args.AllLengths, HashBits = args.HashBits, @@ -440,8 +437,8 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV InvertHash = args.InvertHash }; - view = new NgramHashTransform(h, ngramHashArgs, view); - return SelectColumnsTransform.CreateDrop(h, view, tmpColNames.SelectMany(cols => cols).ToArray()); + view = new NgramHashingTransformer(h, ngramHashArgs, view); + return ColumnSelectingTransformer.CreateDrop(h, view, tmpColNames.SelectMany(cols => cols).ToArray()); } public static IDataTransform Create(NgramHashExtractorArguments extractorArgs, IHostEnvironment env, IDataView input, diff --git a/src/Microsoft.ML.Transforms/Text/WordTokenizeTransform.cs b/src/Microsoft.ML.Transforms/Text/WordTokenizing.cs similarity index 86% rename from src/Microsoft.ML.Transforms/Text/WordTokenizeTransform.cs rename to src/Microsoft.ML.Transforms/Text/WordTokenizing.cs index 9cc4d56bb6..f5fc5a2710 100644 --- a/src/Microsoft.ML.Transforms/Text/WordTokenizeTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/WordTokenizing.cs @@ -18,17 +18,17 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(WordTokenizeTransform.Summary, typeof(IDataTransform), typeof(WordTokenizeTransform), typeof(WordTokenizeTransform.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(WordTokenizingTransformer.Summary, typeof(IDataTransform), typeof(WordTokenizingTransformer), typeof(WordTokenizingTransformer.Arguments), typeof(SignatureDataTransform), "Word Tokenizer Transform", "WordTokenizeTransform", "DelimitedTokenizeTransform", "WordToken", "DelimitedTokenize", "Token")] -[assembly: LoadableClass(WordTokenizeTransform.Summary, typeof(IDataTransform), typeof(WordTokenizeTransform), null, typeof(SignatureLoadDataTransform), - "Word Tokenizer Transform", WordTokenizeTransform.LoaderSignature)] +[assembly: LoadableClass(WordTokenizingTransformer.Summary, typeof(IDataTransform), typeof(WordTokenizingTransformer), null, typeof(SignatureLoadDataTransform), + "Word Tokenizer Transform", WordTokenizingTransformer.LoaderSignature)] -[assembly: LoadableClass(WordTokenizeTransform.Summary, typeof(WordTokenizeTransform), null, typeof(SignatureLoadModel), - "Word Tokenizer Transform", WordTokenizeTransform.LoaderSignature)] +[assembly: LoadableClass(WordTokenizingTransformer.Summary, typeof(WordTokenizingTransformer), null, typeof(SignatureLoadModel), + "Word Tokenizer Transform", WordTokenizingTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(WordTokenizeTransform), null, typeof(SignatureLoadRowMapper), - "Word Tokenizer Transform", WordTokenizeTransform.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(WordTokenizingTransformer), null, typeof(SignatureLoadRowMapper), + "Word Tokenizer Transform", WordTokenizingTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Text { @@ -37,7 +37,7 @@ namespace Microsoft.ML.Transforms.Text // corresponding to the tokens in the input text, split using a set of user specified separator characters. // Empty strings and strings containing only spaces are dropped. /// - public sealed class WordTokenizeTransform : OneToOneTransformerBase + public sealed class WordTokenizingTransformer : OneToOneTransformerBase { public class Column : OneToOneColumn { @@ -105,7 +105,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(WordTokenizeTransform).Assembly.FullName); + loaderAssemblyName: typeof(WordTokenizingTransformer).Assembly.FullName); } private const string RegistrationName = "DelimitedTokenize"; @@ -138,7 +138,7 @@ private static (string input, string output)[] GetColumnPairs(ColumnInfo[] colum return columns.Select(x => (x.Input, x.Output)).ToArray(); } - public WordTokenizeTransform(IHostEnvironment env, params ColumnInfo[] columns) : + public WordTokenizingTransformer(IHostEnvironment env, params ColumnInfo[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), GetColumnPairs(columns)) { _columns = columns.ToArray(); @@ -151,7 +151,7 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].input, WordTokenizingEstimator.ExpectedColumnType, type.ToString()); } - private WordTokenizeTransform(IHost host, ModelLoadContext ctx) : + private WordTokenizingTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) { var columnsLength = ColumnPairs.Length; @@ -188,13 +188,13 @@ public override void Save(ModelSaveContext ctx) } // Factory method for SignatureLoadModel. - private static WordTokenizeTransform Create(IHostEnvironment env, ModelLoadContext ctx) + private static WordTokenizingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(RegistrationName); host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new WordTokenizeTransform(host, ctx); + return new WordTokenizingTransformer(host, ctx); } // Factory method for SignatureDataTransform. @@ -213,7 +213,7 @@ internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDat cols[i] = new ColumnInfo(item.Source ?? item.Name, item.Name, separators); } - return new WordTokenizeTransform(env, cols).MakeDataTransform(input); + return new WordTokenizingTransformer(env, cols).MakeDataTransform(input); } // Factory method for SignatureLoadRowMapper. @@ -222,15 +222,15 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : MapperBase, ISaveAsPfa + private sealed class Mapper : OneToOneMapperBase, ISaveAsPfa { private readonly ColumnType _type; - private readonly WordTokenizeTransform _parent; + private readonly WordTokenizingTransformer _parent; private readonly bool[] _isSourceVector; public bool CanSavePfa => true; - public Mapper(WordTokenizeTransform parent, Schema inputSchema) + public Mapper(WordTokenizingTransformer parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -244,7 +244,7 @@ public Mapper(WordTokenizeTransform parent, Schema inputSchema) } } - public override Schema.Column[] GetOutputColumns() + protected override Schema.Column[] GetOutputColumnsCore() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -256,7 +256,7 @@ public override Schema.Column[] GetOutputColumns() return result; } - protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _parent._columns.Length); @@ -287,15 +287,13 @@ private ValueGetter>> MakeGetterOne(IRow input, int AddTerms(src, separators, terms); - var values = dst.Values; + var editor = VBufferEditor.Create(ref dst, terms.Count); if (terms.Count > 0) { - if (Utils.Size(values) < terms.Count) - values = new ReadOnlyMemory[terms.Count]; - terms.CopyTo(values); + terms.CopyTo(editor.Values); } - dst = new VBuffer>(terms.Count, values, dst.Indices); + dst = editor.Commit(); }; } @@ -316,18 +314,14 @@ private ValueGetter>> MakeGetterVec(IRow input, int getSrc(ref src); terms.Clear(); - for (int i = 0; i < src.Count; i++) - AddTerms(src.Values[i], separators, terms); + var srcValues = src.GetValues(); + for (int i = 0; i < srcValues.Length; i++) + AddTerms(srcValues[i], separators, terms); - var values = dst.Values; - if (terms.Count > 0) - { - if (Utils.Size(values) < terms.Count) - values = new ReadOnlyMemory[terms.Count]; - terms.CopyTo(values); - } - - dst = new VBuffer>(terms.Count, values, dst.Indices); + var editor = VBufferEditor.Create(ref dst, terms.Count); + for (int i = 0; i < terms.Count; i++) + editor.Values[i] = terms[i]; + dst = editor.Commit(); }; } @@ -361,7 +355,7 @@ private void AddTerms(ReadOnlyMemory txt, char[] separators, List - public sealed class WordTokenizingEstimator : TrivialEstimator + public sealed class WordTokenizingEstimator : TrivialEstimator { public static bool IsColumnTypeValid(ColumnType type) => type.ItemType.IsText; @@ -456,7 +450,7 @@ public WordTokenizingEstimator(IHostEnvironment env, string inputColumn, string /// Pairs of columns to run the tokenization on. /// The separators to use (uses space character by default). public WordTokenizingEstimator(IHostEnvironment env, (string input, string output)[] columns, char[] separators = null) - : this(env, columns.Select(x => new WordTokenizeTransform.ColumnInfo(x.input, x.output, separators)).ToArray()) + : this(env, columns.Select(x => new WordTokenizingTransformer.ColumnInfo(x.input, x.output, separators)).ToArray()) { } @@ -465,8 +459,8 @@ public WordTokenizingEstimator(IHostEnvironment env, (string input, string outpu ///
/// The environment. /// Pairs of columns to run the tokenization on. - public WordTokenizingEstimator(IHostEnvironment env, params WordTokenizeTransform.ColumnInfo[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(WordTokenizingEstimator)), new WordTokenizeTransform(env, columns)) + public WordTokenizingEstimator(IHostEnvironment env, params WordTokenizingTransformer.ColumnInfo[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(WordTokenizingEstimator)), new WordTokenizingTransformer(env, columns)) { } diff --git a/src/Microsoft.ML.Transforms/Text/WrappedTextTransformers.cs b/src/Microsoft.ML.Transforms/Text/WrappedTextTransformers.cs index 4d61d67bc6..e5fd8f8cce 100644 --- a/src/Microsoft.ML.Transforms/Text/WrappedTextTransformers.cs +++ b/src/Microsoft.ML.Transforms/Text/WrappedTextTransformers.cs @@ -7,7 +7,7 @@ using Microsoft.ML.Runtime.Internal.Utilities; using System; using System.Linq; -using static Microsoft.ML.Transforms.Text.StopWordsRemoverTransform; +using static Microsoft.ML.Transforms.Text.StopWordsRemovingTransformer; namespace Microsoft.ML.Transforms.Text { @@ -55,9 +55,9 @@ private static TransformWrapper MakeTransformer(IHostEnvironment env, (string in } // Create arguments. - var args = new StopWordsRemoverTransform.Arguments + var args = new StopWordsRemovingTransformer.Arguments { - Column = columns.Select(x => new StopWordsRemoverTransform.Column { Source = x.input, Name = x.output }).ToArray(), + Column = columns.Select(x => new StopWordsRemovingTransformer.Column { Source = x.input, Name = x.output }).ToArray(), Language = language }; @@ -65,7 +65,7 @@ private static TransformWrapper MakeTransformer(IHostEnvironment env, (string in var schema = new Schema(columns.Select(x => new Schema.Column(x.input, new VectorType(TextType.Instance), null))); var emptyData = new EmptyDataView(env, schema); - return new TransformWrapper(env, new StopWordsRemoverTransform(env, args, emptyData)); + return new TransformWrapper(env, new StopWordsRemovingTransformer(env, args, emptyData)); } } @@ -80,7 +80,7 @@ public sealed class WordBagEstimator : TrainedWrapperEstimatorBase private readonly int _skipLength; private readonly bool _allLengths; private readonly int _maxNumTerms; - private readonly NgramTransform.WeightingCriteria _weighting; + private readonly NgramCountingEstimator.WeightingCriteria _weighting; /// /// Produces a bag of counts of ngrams (sequences of consecutive words) in @@ -101,7 +101,7 @@ public WordBagEstimator(IHostEnvironment env, int skipLength = 0, bool allLengths = true, int maxNumTerms = 10000000, - NgramTransform.WeightingCriteria weighting = NgramTransform.WeightingCriteria.Tf) + NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.WeightingCriteria.Tf) : this(env, new[] { (new[] { inputColumn }, outputColumn ?? inputColumn) }, ngramLength, skipLength, allLengths, maxNumTerms, weighting) { } @@ -125,7 +125,7 @@ public WordBagEstimator(IHostEnvironment env, int skipLength = 0, bool allLengths = true, int maxNumTerms = 10000000, - NgramTransform.WeightingCriteria weighting = NgramTransform.WeightingCriteria.Tf) + NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.WeightingCriteria.Tf) : this(env, new[] { (inputColumns, outputColumn) }, ngramLength, skipLength, allLengths, maxNumTerms, weighting) { } @@ -147,7 +147,7 @@ public WordBagEstimator(IHostEnvironment env, int skipLength = 0, bool allLengths = true, int maxNumTerms = 10000000, - NgramTransform.WeightingCriteria weighting = NgramTransform.WeightingCriteria.Tf) + NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.WeightingCriteria.Tf) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(WordBagEstimator))) { foreach (var (input, output) in columns) @@ -167,9 +167,9 @@ public WordBagEstimator(IHostEnvironment env, public override TransformWrapper Fit(IDataView input) { // Create arguments. - var args = new WordBagTransform.Arguments + var args = new WordBagBuildingTransformer.Arguments { - Column = _columns.Select(x => new WordBagTransform.Column { Source = x.inputs, Name = x.output }).ToArray(), + Column = _columns.Select(x => new WordBagBuildingTransformer.Column { Source = x.inputs, Name = x.output }).ToArray(), NgramLength = _ngramLength, SkipLength = _skipLength, AllLengths = _allLengths, @@ -177,7 +177,7 @@ public override TransformWrapper Fit(IDataView input) Weighting = _weighting }; - return new TransformWrapper(Host, WordBagTransform.Create(Host, args, input)); + return new TransformWrapper(Host, WordBagBuildingTransformer.Create(Host, args, input)); } } @@ -295,9 +295,9 @@ public WordHashBagEstimator(IHostEnvironment env, public override TransformWrapper Fit(IDataView input) { // Create arguments. - var args = new WordHashBagTransform.Arguments + var args = new WordHashBagProducingTransformer.Arguments { - Column = _columns.Select(x => new WordHashBagTransform.Column { Source = x.inputs, Name = x.output }).ToArray(), + Column = _columns.Select(x => new WordHashBagProducingTransformer.Column { Source = x.inputs, Name = x.output }).ToArray(), HashBits = _hashBits, NgramLength = _ngramLength, SkipLength = _skipLength, @@ -307,95 +307,7 @@ public override TransformWrapper Fit(IDataView input) InvertHash = _invertHash }; - return new TransformWrapper(Host, WordHashBagTransform.Create(Host, args, input)); - } - } - - /// - /// Produces a bag of counts of ngrams(sequences of consecutive values of length 1-n) in a given vector of keys. - /// It does so by building a dictionary of ngrams and using the id in the dictionary as the index in the bag. - /// - public sealed class NgramEstimator : TrainedWrapperEstimatorBase - { - private readonly (string inputs, string output)[] _columns; - private readonly int _ngramLength; - private readonly int _skipLength; - private readonly bool _allLengths; - private readonly int _maxNumTerms; - private readonly NgramTransform.WeightingCriteria _weighting; - - /// - /// Produces a bag of counts of ngrams (sequences of consecutive words) in - /// and outputs bag of word vector as - /// - /// The environment. - /// The column containing text to compute bag of word vector. - /// The column containing bag of word vector. Null means is replaced. - /// Ngram length. - /// Maximum number of tokens to skip when constructing an ngram. - /// Whether to include all ngram lengths up to or only . - /// Maximum number of ngrams to store in the dictionary. - /// Statistical measure used to evaluate how important a word is to a document in a corpus. - public NgramEstimator(IHostEnvironment env, - string inputColumn, - string outputColumn = null, - int ngramLength = 2, - int skipLength = 0, - bool allLengths = true, - int maxNumTerms = 10000000, - NgramTransform.WeightingCriteria weighting = NgramTransform.WeightingCriteria.Tf) - : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, ngramLength, skipLength, allLengths, maxNumTerms, weighting) - { - } - - /// - /// Produces a bag of counts of ngrams (sequences of consecutive words) in - /// and outputs bag of word vector for each output in - /// - /// The environment. - /// Pairs of columns to compute bag of word vector. - /// Ngram length. - /// Maximum number of tokens to skip when constructing an ngram. - /// Whether to include all ngram lengths up to or only . - /// Maximum number of ngrams to store in the dictionary. - /// Statistical measure used to evaluate how important a word is to a document in a corpus. - public NgramEstimator(IHostEnvironment env, - (string inputs, string output)[] columns, - int ngramLength = 2, - int skipLength = 0, - bool allLengths = true, - int maxNumTerms = 10000000, - NgramTransform.WeightingCriteria weighting = NgramTransform.WeightingCriteria.Tf) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(WordBagEstimator))) - { - foreach (var (input, output) in columns) - { - Host.CheckUserArg(Utils.Size(input) > 0, nameof(input)); - Host.CheckValue(output, nameof(input)); - } - - _columns = columns; - _ngramLength = ngramLength; - _skipLength = skipLength; - _allLengths = allLengths; - _maxNumTerms = maxNumTerms; - _weighting = weighting; - } - - public override TransformWrapper Fit(IDataView input) - { - // Create arguments. - var args = new NgramTransform.Arguments - { - Column = _columns.Select(x => new NgramTransform.Column { Source = x.inputs, Name = x.output }).ToArray(), - NgramLength = _ngramLength, - SkipLength = _skipLength, - AllLengths = _allLengths, - MaxNumTerms = new[] { _maxNumTerms }, - Weighting = _weighting - }; - - return new TransformWrapper(Host, new NgramTransform(Host, args, input)); + return new TransformWrapper(Host, WordHashBagProducingTransformer.Create(Host, args, input)); } } @@ -525,9 +437,9 @@ public NgramHashEstimator(IHostEnvironment env, public override TransformWrapper Fit(IDataView input) { // Create arguments. - var args = new NgramHashTransform.Arguments + var args = new NgramHashingTransformer.Arguments { - Column = _columns.Select(x => new NgramHashTransform.Column { Source = x.inputs, Name = x.output }).ToArray(), + Column = _columns.Select(x => new NgramHashingTransformer.Column { Source = x.inputs, Name = x.output }).ToArray(), HashBits = _hashBits, NgramLength = _ngramLength, SkipLength = _skipLength, @@ -537,53 +449,7 @@ public override TransformWrapper Fit(IDataView input) InvertHash = _invertHash }; - return new TransformWrapper(Host, new NgramHashTransform(Host, args, input)); - } - } - - /// - public sealed class LdaEstimator : TrainedWrapperEstimatorBase - { - private readonly LdaTransform.Arguments _args; - - /// - /// The environment. - /// The column containing text to tokenize. - /// The column containing output tokens. Null means is replaced. - /// The number of topics in the LDA. - /// A delegate to apply all the advanced arguments to the algorithm. - public LdaEstimator(IHostEnvironment env, - string inputColumn, - string outputColumn = null, - int numTopic = 100, - Action advancedSettings = null) - : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, - numTopic, - advancedSettings) - { - } - - /// - /// The environment. - /// Pairs of columns to compute LDA. - /// The number of topics in the LDA. - /// A delegate to apply all the advanced arguments to the algorithm. - public LdaEstimator(IHostEnvironment env, - (string input, string output)[] columns, - int numTopic = 100, - Action advancedSettings = null) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(LdaEstimator))) - { - _args = new LdaTransform.Arguments(); - _args.Column = columns.Select(x => new LdaTransform.Column { Source = x.input, Name = x.output }).ToArray(); - _args.NumTopic = numTopic; - - advancedSettings?.Invoke(_args); - } - - public override TransformWrapper Fit(IDataView input) - { - return new TransformWrapper(Host, new LdaTransform(Host, _args, input)); + return new TransformWrapper(Host, new NgramHashingTransformer(Host, args, input)); } } } \ No newline at end of file diff --git a/src/Microsoft.ML.Transforms/TextCatalog.cs b/src/Microsoft.ML.Transforms/TextCatalog.cs index e7d6ba892b..c3b01bfe0b 100644 --- a/src/Microsoft.ML.Transforms/TextCatalog.cs +++ b/src/Microsoft.ML.Transforms/TextCatalog.cs @@ -10,7 +10,7 @@ namespace Microsoft.ML { - using CharTokenizingDefaults = CharacterTokenizingEstimator.Defaults; + using CharTokenizingDefaults = TokenizingByCharactersEstimator.Defaults; using TextNormalizeDefaults = TextNormalizingEstimator.Defaults; public static class TextCatalog @@ -25,14 +25,7 @@ public static class TextCatalog /// /// /// - /// - /// - /// - /// - /// /// /// @@ -64,11 +57,11 @@ public static TextFeaturizingEstimator FeaturizeText(this TransformsCatalog.Text /// The column containing text to tokenize. /// The column containing output tokens. Null means is replaced. /// Whether to use marker characters to separate words. - public static CharacterTokenizingEstimator TokenizeCharacters(this TransformsCatalog.TextTransforms catalog, + public static TokenizingByCharactersEstimator TokenizeCharacters(this TransformsCatalog.TextTransforms catalog, string inputColumn, string outputColumn = null, bool useMarkerCharacters = CharTokenizingDefaults.UseMarkerCharacters) - => new CharacterTokenizingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), + => new TokenizingByCharactersEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), useMarkerCharacters, new[] { (inputColumn, outputColumn) }); /// @@ -78,10 +71,10 @@ public static CharacterTokenizingEstimator TokenizeCharacters(this TransformsCat /// Whether to use marker characters to separate words. /// Pairs of columns to run the tokenization on. - public static CharacterTokenizingEstimator TokenizeCharacters(this TransformsCatalog.TextTransforms catalog, + public static TokenizingByCharactersEstimator TokenizeCharacters(this TransformsCatalog.TextTransforms catalog, bool useMarkerCharacters = CharTokenizingDefaults.UseMarkerCharacters, params (string inputColumn, string outputColumn)[] columns) - => new CharacterTokenizingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), useMarkerCharacters, columns); + => new TokenizingByCharactersEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), useMarkerCharacters, columns); /// /// Normalizes incoming text in by changing case, removing diacritical marks, punctuation marks and/or numbers @@ -110,12 +103,12 @@ public static TextNormalizingEstimator NormalizeText(this TransformsCatalog.Text /// The text-related transform's catalog. /// The input column. /// The optional output column. If it is null the input column will be substituted with its value. - /// The embeddings to use. - public static WordEmbeddingsExtractorEstimator ExtractWordEmbeedings(this TransformsCatalog.TextTransforms catalog, + /// The embeddings to use. + public static WordEmbeddingsExtractingEstimator ExtractWordEmbeddings(this TransformsCatalog.TextTransforms catalog, string inputColumn, string outputColumn = null, - WordEmbeddingsTransform.PretrainedModelKind modelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe) - => new WordEmbeddingsExtractorEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), inputColumn, outputColumn, modelKind); + WordEmbeddingsExtractingTransformer.PretrainedModelKind modelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe) + => new WordEmbeddingsExtractingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), inputColumn, outputColumn, modelKind); /// /// Extracts word embeddings. @@ -124,23 +117,23 @@ public static WordEmbeddingsExtractorEstimator ExtractWordEmbeedings(this Transf /// The input column. /// The optional output column. If it is null the input column will be substituted with its value. /// The path of the pre-trained embeedings model to use. - public static WordEmbeddingsExtractorEstimator ExtractWordEmbeedings(this TransformsCatalog.TextTransforms catalog, + public static WordEmbeddingsExtractingEstimator ExtractWordEmbeddings(this TransformsCatalog.TextTransforms catalog, string inputColumn, string customModelFile, string outputColumn = null) - => new WordEmbeddingsExtractorEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), + => new WordEmbeddingsExtractingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), inputColumn, outputColumn, customModelFile); /// /// Extracts word embeddings. /// /// The text-related transform's catalog. - /// The embeddings to use. + /// The embeddings to use. /// The array columns, and per-column configurations to extract embeedings from. - public static WordEmbeddingsExtractorEstimator ExtractWordEmbeedings(this TransformsCatalog.TextTransforms catalog, - WordEmbeddingsTransform.PretrainedModelKind modelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe, - params WordEmbeddingsTransform.ColumnInfo[] columns) - => new WordEmbeddingsExtractorEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), modelKind, columns); + public static WordEmbeddingsExtractingEstimator ExtractWordEmbeddings(this TransformsCatalog.TextTransforms catalog, + WordEmbeddingsExtractingTransformer.PretrainedModelKind modelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe, + params WordEmbeddingsExtractingTransformer.ColumnInfo[] columns) + => new WordEmbeddingsExtractingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), modelKind, columns); /// /// Tokenizes incoming text in , using as separators, @@ -173,8 +166,112 @@ public static WordTokenizingEstimator TokenizeWords(this TransformsCatalog.TextT /// The text-related transform's catalog. /// Pairs of columns to run the tokenization on. public static WordTokenizingEstimator TokenizeWords(this TransformsCatalog.TextTransforms catalog, - params WordTokenizeTransform.ColumnInfo[] columns) + params WordTokenizingTransformer.ColumnInfo[] columns) => new WordTokenizingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), columns); + /// + /// Produces a bag of counts of ngrams (sequences of consecutive words) in + /// and outputs bag of word vector as + /// + /// The text-related transform's catalog. + /// The column containing text to compute bag of word vector. + /// The column containing bag of word vector. Null means is replaced. + /// Ngram length. + /// Maximum number of tokens to skip when constructing an ngram. + /// Whether to include all ngram lengths up to or only . + /// Maximum number of ngrams to store in the dictionary. + /// Statistical measure used to evaluate how important a word is to a document in a corpus. + /// + /// + /// + /// + /// + public static NgramCountingEstimator ProduceNgrams(this TransformsCatalog.TextTransforms catalog, + string inputColumn, + string outputColumn = null, + int ngramLength = NgramCountingEstimator.Defaults.NgramLength, + int skipLength = NgramCountingEstimator.Defaults.SkipLength, + bool allLengths = NgramCountingEstimator.Defaults.AllLength, + int maxNumTerms = NgramCountingEstimator.Defaults.MaxNumTerms, + NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.Defaults.Weighting) => + new NgramCountingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), inputColumn, outputColumn, + ngramLength, skipLength, allLengths, maxNumTerms, weighting); + + /// + /// Produces a bag of counts of ngrams (sequences of consecutive words) in + /// and outputs bag of word vector for each output in + /// + /// The text-related transform's catalog. + /// Pairs of columns to compute bag of word vector. + /// Ngram length. + /// Maximum number of tokens to skip when constructing an ngram. + /// Whether to include all ngram lengths up to or only . + /// Maximum number of ngrams to store in the dictionary. + /// Statistical measure used to evaluate how important a word is to a document in a corpus. + public static NgramCountingEstimator ProduceNgrams(this TransformsCatalog.TextTransforms catalog, + (string input, string output)[] columns, + int ngramLength = NgramCountingEstimator.Defaults.NgramLength, + int skipLength = NgramCountingEstimator.Defaults.SkipLength, + bool allLengths = NgramCountingEstimator.Defaults.AllLength, + int maxNumTerms = NgramCountingEstimator.Defaults.MaxNumTerms, + NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.Defaults.Weighting) + => new NgramCountingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), columns, + ngramLength, skipLength, allLengths, maxNumTerms, weighting); + + /// + /// Produces a bag of counts of ngrams (sequences of consecutive words) in + /// and outputs bag of word vector for each output in + /// + /// The text-related transform's catalog. + /// Pairs of columns to run the ngram process on. + public static NgramCountingEstimator ProduceNgrams(this TransformsCatalog.TextTransforms catalog, + params NgramCountingTransformer.ColumnInfo[] columns) + => new NgramCountingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), columns); + + /// + /// Uses LightLDA to transform a document (represented as a vector of floats) + /// into a vector of floats over a set of topics. + /// + /// The transform's catalog. + /// The column representing the document as a vector of floats. + /// The column containing the output scores over a set of topics, represented as a vector of floats. A null value for the column means is replaced. + /// The number of topics. + /// Dirichlet prior on document-topic vectors. + /// Dirichlet prior on vocab-topic vectors. + /// Number of Metropolis Hasting step. + /// Number of iterations. + /// Compute log likelihood over local dataset on this iteration interval. + /// The number of training threads. Default value depends on number of logical processors. + /// The threshold of maximum count of tokens per doc. + /// The number of words to summarize the topic. + /// The number of burn-in iterations. + /// Reset the random number generator for each document. + public static LatentDirichletAllocationEstimator LatentDirichletAllocation(this TransformsCatalog.TextTransforms catalog, + string inputColumn, + string outputColumn = null, + int numTopic = LatentDirichletAllocationEstimator.Defaults.NumTopic, + float alphaSum = LatentDirichletAllocationEstimator.Defaults.AlphaSum, + float beta = LatentDirichletAllocationEstimator.Defaults.Beta, + int mhstep = LatentDirichletAllocationEstimator.Defaults.Mhstep, + int numIterations = LatentDirichletAllocationEstimator.Defaults.NumIterations, + int likelihoodInterval = LatentDirichletAllocationEstimator.Defaults.LikelihoodInterval, + int numThreads = LatentDirichletAllocationEstimator.Defaults.NumThreads, + int numMaxDocToken = LatentDirichletAllocationEstimator.Defaults.NumMaxDocToken, + int numSummaryTermPerTopic = LatentDirichletAllocationEstimator.Defaults.NumSummaryTermPerTopic, + int numBurninIterations = LatentDirichletAllocationEstimator.Defaults.NumBurninIterations, + bool resetRandomGenerator = LatentDirichletAllocationEstimator.Defaults.ResetRandomGenerator) + => new LatentDirichletAllocationEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, numTopic, alphaSum, beta, mhstep, numIterations, likelihoodInterval, numThreads, numMaxDocToken, + numSummaryTermPerTopic, numBurninIterations, resetRandomGenerator); + + /// + /// Uses LightLDA to transform a document (represented as a vector of floats) + /// into a vector of floats over a set of topics. + /// + /// The transform's catalog. + /// Describes the parameters of LDA for each column pair. + public static LatentDirichletAllocationEstimator LatentDirichletAllocation(this TransformsCatalog.TextTransforms catalog, params LatentDirichletAllocationTransformer.ColumnInfo[] columns) + => new LatentDirichletAllocationEstimator(CatalogUtils.GetEnvironment(catalog), columns); } } diff --git a/src/Microsoft.ML.Transforms/TransformsStatic.cs b/src/Microsoft.ML.Transforms/TransformsStatic.cs new file mode 100644 index 0000000000..fc23ebfb38 --- /dev/null +++ b/src/Microsoft.ML.Transforms/TransformsStatic.cs @@ -0,0 +1,120 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Core.Data; +using Microsoft.ML.Runtime; +using Microsoft.ML.StaticPipe.Runtime; +using Microsoft.ML.Transforms.Projections; +using System.Collections.Generic; + +namespace Microsoft.ML.StaticPipe +{ + /// + /// Extensions for statically typed . + /// + public static class LpNormalizerExtensions + { + private sealed class OutPipelineColumn : Vector + { + public readonly Vector Input; + + public OutPipelineColumn(Vector input, LpNormalizingEstimatorBase.NormalizerKind normKind, bool subMean) + : base(new Reconciler(normKind, subMean), input) + { + Input = input; + } + } + + private sealed class Reconciler : EstimatorReconciler + { + private readonly LpNormalizingEstimatorBase.NormalizerKind _normKind; + private readonly bool _subMean; + + public Reconciler(LpNormalizingEstimatorBase.NormalizerKind normKind, bool subMean) + { + _normKind = normKind; + _subMean = subMean; + } + + public override IEstimator Reconcile(IHostEnvironment env, + PipelineColumn[] toOutput, + IReadOnlyDictionary inputNames, + IReadOnlyDictionary outputNames, + IReadOnlyCollection usedNames) + { + Contracts.Assert(toOutput.Length == 1); + + var pairs = new List<(string input, string output)>(); + foreach (var outCol in toOutput) + pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); + + return new LpNormalizingEstimator(env, pairs.ToArray(), _normKind, _subMean); + } + } + + /// + /// The column to apply to. + /// Type of norm to use to normalize each sample. + /// Subtract mean from each value before normalizing. + public static Vector LpNormalize(this Vector input, + LpNormalizingEstimatorBase.NormalizerKind normKind = LpNormalizingEstimatorBase.Defaults.NormKind, + bool subMean = LpNormalizingEstimatorBase.Defaults.LpSubstractMean) => new OutPipelineColumn(input, normKind, subMean); + } + + /// + /// Extensions for statically typed . + /// + public static class GlobalContrastNormalizerExtensions + { + private sealed class OutPipelineColumn : Vector + { + public readonly Vector Input; + + public OutPipelineColumn(Vector input, bool subMean, bool useStdDev, float scale) + : base(new Reconciler(subMean, useStdDev, scale), input) + { + Input = input; + } + } + + private sealed class Reconciler : EstimatorReconciler + { + private readonly bool _subMean; + private readonly bool _useStdDev; + private readonly float _scale; + + public Reconciler(bool subMean, bool useStdDev, float scale) + { + _subMean = subMean; + _useStdDev = useStdDev; + _scale = scale; + } + + public override IEstimator Reconcile(IHostEnvironment env, + PipelineColumn[] toOutput, + IReadOnlyDictionary inputNames, + IReadOnlyDictionary outputNames, + IReadOnlyCollection usedNames) + { + Contracts.Assert(toOutput.Length == 1); + + var pairs = new List<(string input, string output)>(); + foreach (var outCol in toOutput) + pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); + + return new GlobalContrastNormalizingEstimator(env, pairs.ToArray(), _subMean, _useStdDev, _scale); + } + } + + /// + /// The column to apply to. + /// Subtract mean from each value before normalizing. + /// Normalize by standard deviation rather than L2 norm. + /// Scale features by this value. + public static Vector GlobalContrastNormalize(this Vector input, + bool subMean = LpNormalizingEstimatorBase.Defaults.GcnSubstractMean, + bool useStdDev = LpNormalizingEstimatorBase.Defaults.UseStdDev, + float scale = LpNormalizingEstimatorBase.Defaults.Scale) => new OutPipelineColumn(input, subMean, useStdDev, scale); + } +} diff --git a/src/Microsoft.ML.Transforms/UngroupTransform.cs b/src/Microsoft.ML.Transforms/UngroupTransform.cs index 230138151d..99e1193e19 100644 --- a/src/Microsoft.ML.Transforms/UngroupTransform.cs +++ b/src/Microsoft.ML.Transforms/UngroupTransform.cs @@ -96,7 +96,7 @@ public sealed class Arguments : TransformInputBase private readonly SchemaImpl _schemaImpl; /// - /// Convenience constructor for public facing API. + /// Initializes a new instance of . /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -149,13 +149,13 @@ public override void Save(ModelSaveContext ctx) _schemaImpl.Save(ctx); } - public override long? GetRowCount(bool lazy = true) + public override long? GetRowCount() { // Row count is known if the input's row count is known, and pivot column sizes are fixed. var commonSize = _schemaImpl.GetCommonPivotColumnSize(); if (commonSize > 0) { - long? srcRowCount = Source.GetRowCount(true); + long? srcRowCount = Source.GetRowCount(); if (srcRowCount.HasValue && srcRowCount.Value <= (long.MaxValue / commonSize)) return srcRowCount.Value * commonSize; } @@ -205,7 +205,6 @@ private static bool ShouldPreserveMetadata(string kind) case MetadataUtils.Kinds.ScoreColumnSetId: case MetadataUtils.Kinds.ScoreColumnKind: case MetadataUtils.Kinds.ScoreValueKind: - case MetadataUtils.Kinds.HasMissingValues: case MetadataUtils.Kinds.IsUserVisible: return true; default: @@ -631,18 +630,20 @@ private ValueGetter MakeGetter(int col, PrimitiveType itemType) cachedIndex = 0; } + var rowValues = row.GetValues(); if (_pivotColPosition >= row.Length) value = naValue; else if (row.IsDense) - value = row.Values[_pivotColPosition]; + value = rowValues[_pivotColPosition]; else { // The row is sparse. - while (cachedIndex < row.Count && _pivotColPosition > row.Indices[cachedIndex]) + var rowIndices = row.GetIndices(); + while (cachedIndex < rowIndices.Length && _pivotColPosition > rowIndices[cachedIndex]) cachedIndex++; - if (cachedIndex < row.Count && _pivotColPosition == row.Indices[cachedIndex]) - value = row.Values[cachedIndex]; + if (cachedIndex < rowIndices.Length && _pivotColPosition == rowIndices[cachedIndex]) + value = rowValues[cachedIndex]; else value = default(T); } diff --git a/src/Microsoft.ML.Transforms/WhiteningTransform.cs b/src/Microsoft.ML.Transforms/WhiteningTransform.cs deleted file mode 100644 index 2550fe5821..0000000000 --- a/src/Microsoft.ML.Transforms/WhiteningTransform.cs +++ /dev/null @@ -1,640 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Float = System.Single; - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Runtime.InteropServices; -using Microsoft.ML.Runtime; -using Microsoft.ML.Runtime.CommandLine; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Internal.CpuMath; -using Microsoft.ML.Runtime.Internal.Utilities; -using Microsoft.ML.Runtime.Model; -using Microsoft.ML.Runtime.Internal.Internallearn; -using Microsoft.ML.Transforms.Projections; - -[assembly: LoadableClass(WhiteningTransform.Summary, typeof(WhiteningTransform), typeof(WhiteningTransform.Arguments), typeof(SignatureDataTransform), - "Whitening Transform", "WhiteningTransform", "Whitening")] - -[assembly: LoadableClass(WhiteningTransform.Summary, typeof(WhiteningTransform), null, typeof(SignatureLoadDataTransform), - "Whitening Transform", WhiteningTransform.LoaderSignature, WhiteningTransform.LoaderSignatureOld)] - -namespace Microsoft.ML.Transforms.Projections -{ - public enum WhiteningKind - { - [TGUI(Label = "PCA whitening")] - Pca, - - [TGUI(Label = "ZCA whitening")] - Zca - } - - /// - public sealed class WhiteningTransform : OneToOneTransformBase - { - private static class Defaults - { - public const WhiteningKind Kind = WhiteningKind.Zca; - public const Float Eps = (Float)1e-5; - public const int MaxRows = 100 * 1000; - public const bool SaveInverse = false; - public const int PcaNum = 0; - } - - public sealed class Arguments - { - [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "New column definition(s) (optional form: name:src)", ShortName = "col", SortOrder = 1)] - public Column[] Column; - - [Argument(ArgumentType.AtMostOnce, HelpText = "Whitening kind (PCA/ZCA)")] - public WhiteningKind Kind = Defaults.Kind; - - [Argument(ArgumentType.AtMostOnce, HelpText = "Scaling regularizer")] - public Float Eps = Defaults.Eps; - - [Argument(ArgumentType.AtMostOnce, HelpText = "Max number of rows", ShortName = "rows")] - public int MaxRows = Defaults.MaxRows; - - [Argument(ArgumentType.AtMostOnce, HelpText = "Whether to save inverse (recovery) matrix", ShortName = "saveInv")] - public bool SaveInverse = Defaults.SaveInverse; - - [Argument(ArgumentType.AtMostOnce, HelpText = "PCA components to retain")] - public int PcaNum = Defaults.PcaNum; - - // REVIEW: add the following options: - // 1. Currently there is no way to apply an inverse transform AFTER the the transform is trained. - // 2. How many PCA components to retain/drop. Options: retain-first, drop-first, variance-threshold. - } - - public sealed class Column : OneToOneColumn - { - [Argument(ArgumentType.AtMostOnce, HelpText = "Whitening kind (PCA/ZCA)")] - public WhiteningKind? Kind; - - [Argument(ArgumentType.AtMostOnce, HelpText = "Scaling regularizer")] - public Float? Eps; - - [Argument(ArgumentType.AtMostOnce, HelpText = "Max number of rows", ShortName = "rows")] - public int? MaxRows; - - [Argument(ArgumentType.AtMostOnce, HelpText = "Whether to save inverse (recovery) matrix", ShortName = "saveInv")] - public bool? SaveInverse; - - [Argument(ArgumentType.AtMostOnce, HelpText = "PCA components to keep/drop")] - public int? PcaNum; - - public static Column Parse(string str) - { - Contracts.AssertNonEmpty(str); - - var res = new Column(); - if (res.TryParse(str)) - return res; - return null; - } - - public bool TryUnparse(StringBuilder sb) - { - Contracts.AssertValue(sb); - if (Kind != null || Eps != null || MaxRows != null || SaveInverse != null || PcaNum != null) - return false; - return TryUnparseCore(sb); - } - } - - public sealed class ColInfoEx - { - public readonly WhiteningKind Kind; - public readonly Float Epsilon; - public readonly int MaxRow; - public readonly bool SaveInv; - public readonly int PcaNum; - public readonly VectorType Type; - - public ColInfoEx(Column item, Arguments args, ColInfo info) - { - Kind = item.Kind ?? args.Kind; - Contracts.CheckUserArg(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca, nameof(item.Kind)); - Epsilon = item.Eps ?? args.Eps; - Contracts.CheckUserArg(0 <= Epsilon && Epsilon < Float.PositiveInfinity, nameof(item.Eps)); - MaxRow = item.MaxRows ?? args.MaxRows; - Contracts.CheckUserArg(MaxRow > 0, nameof(item.MaxRows)); - SaveInv = item.SaveInverse ?? args.SaveInverse; - PcaNum = item.PcaNum ?? args.PcaNum; - Contracts.CheckUserArg(PcaNum >= 0, nameof(item.PcaNum)); - - if (Kind == WhiteningKind.Zca || PcaNum == 0) - Type = info.TypeSrc.AsVector; - else - Type = new VectorType(NumberType.Float, PcaNum); // REVIEW: make it work with pcaNum == 1. - } - - public ColInfoEx(ModelLoadContext ctx, ColInfo info) - { - Contracts.AssertValue(ctx); - - // *** Binary format *** - // int: kind - // Float: epsilon - // int: maxrow - // byte: saveInv - // int: pcaNum - Kind = (WhiteningKind)ctx.Reader.ReadInt32(); - Contracts.CheckDecode(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca); - Epsilon = ctx.Reader.ReadFloat(); - Contracts.CheckDecode(0 <= Epsilon && Epsilon < Float.PositiveInfinity); - MaxRow = ctx.Reader.ReadInt32(); - Contracts.CheckDecode(MaxRow > 0); - SaveInv = ctx.Reader.ReadBoolByte(); - PcaNum = ctx.Reader.ReadInt32(); - Contracts.CheckDecode(PcaNum >= 0); - - if (Kind == WhiteningKind.Zca || PcaNum == 0) - Type = info.TypeSrc.AsVector; - else - Type = new VectorType(NumberType.Float, PcaNum); // REVIEW: make it work with pcaNum == 1. - } - - public void Save(ModelSaveContext ctx) - { - Contracts.AssertValue(ctx); - - // *** Binary format *** - // int: kind - // Float: epsilon - // int: maxrow - // byte: saveInv - // int: pcaNum - Contracts.Assert(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca); - ctx.Writer.Write((int)Kind); - Contracts.Assert(0 <= Epsilon && Epsilon < Float.PositiveInfinity); - ctx.Writer.Write(Epsilon); - Contracts.Assert(MaxRow > 0); - ctx.Writer.Write(MaxRow); - ctx.Writer.WriteBoolByte(SaveInv); - Contracts.Assert(PcaNum >= 0); - ctx.Writer.Write(PcaNum); - } - } - - private const Mkl.Layout Layout = Mkl.Layout.RowMajor; - - // Stores whitening matrix as Float[] for each column. - private readonly Float[][] _models; - // Stores inverse ("recover") matrix as Float[] for each column. Temporarily internal as it's used in unit test. - // REVIEW: It doesn't look like this is used by non-test code. Should it be saved at all? - internal readonly Float[][] InvModels; - - internal const string Summary = "Apply PCA or ZCA whitening algorithm to the input."; - - public const string LoaderSignature = "WhiteningTransform"; - internal const string LoaderSignatureOld = "WhiteningFunction"; - private static VersionInfo GetVersionInfo() - { - return new VersionInfo( - modelSignature: "WHITENTF", - verWrittenCur: 0x00010001, // Initial - verReadableCur: 0x00010001, - verWeCanReadBack: 0x00010001, - loaderSignature: LoaderSignature, - loaderSignatureAlt: LoaderSignatureOld, - loaderAssemblyName: typeof(WhiteningTransform).Assembly.FullName); - } - - private readonly ColInfoEx[] _exes; - - private const string RegistrationName = "Whitening"; - - /// - /// Convenience constructor for public facing API. - /// - /// Host Environment. - /// Input . This is the output from previous transform or loader. - /// Name of the output column. - /// Name of the column to be transformed. If this is null '' will be used. - /// Whitening kind (PCA/ZCA). - public WhiteningTransform(IHostEnvironment env, - IDataView input, - string name, - string source = null, - WhiteningKind kind = Defaults.Kind) - : this(env, new Arguments() { Column = new[] { new Column() { Source = source ?? name, Name = name } }, Kind = kind }, input) - { - } - - /// - /// Public constructor corresponding to SignatureDataTransform. - /// - public WhiteningTransform(IHostEnvironment env, Arguments args, IDataView input) - : base(env, RegistrationName, Contracts.CheckRef(args, nameof(args)).Column, - input, TestColumn) - { - Host.AssertNonEmpty(Infos); - Host.Assert(Infos.Length == Utils.Size(args.Column)); - - _exes = new ColInfoEx[Infos.Length]; - for (int i = 0; i < _exes.Length; i++) - _exes[i] = new ColInfoEx(args.Column[i], args, Infos[i]); - - using (var ch = Host.Start("Training")) - { - // The training process will load all data into memory and perform whitening process - // for each resulting column separately. - _models = new Float[Infos.Length][]; - InvModels = new Float[Infos.Length][]; - int[] rowCounts; - var columnData = LoadDataAsDense(ch, out rowCounts); - TrainModels(columnData, rowCounts, ch); - } - Metadata.Seal(); - } - - private Float[][] LoadDataAsDense(IChannel ch, out int[] actualRowCounts) - { - long crowData = GetRowCount(); - - var columnData = new Float[Infos.Length][]; - actualRowCounts = new int[Infos.Length]; - int maxActualRowCount = 0; - for (int i = 0; i < Infos.Length; i++) - { - var type = Infos[i].TypeSrc; - ch.Assert(type.IsVector && type.IsKnownSizeVector); - // Use not more than MaxRow number of rows. - var ex = _exes[i]; - if (crowData <= ex.MaxRow) - actualRowCounts[i] = (int)crowData; - else - { - ch.Info(MessageSensitivity.Schema, "Only {0:N0} rows of column '{1}' will be used for whitening transform.", ex.MaxRow, Infos[i].Name); - actualRowCounts[i] = ex.MaxRow; - } - - int cslot = type.ValueCount; - // Check that total number of values in matrix does not exceed int.MaxValue and adjust row count if necessary. - if ((long)cslot * actualRowCounts[i] > int.MaxValue) - { - actualRowCounts[i] = int.MaxValue / cslot; - ch.Info(MessageSensitivity.Schema, "Only {0:N0} rows of column '{1}' will be used for whitening transform.", actualRowCounts[i], Infos[i].Name); - } - columnData[i] = new Float[cslot * actualRowCounts[i]]; - if (actualRowCounts[i] > maxActualRowCount) - maxActualRowCount = actualRowCounts[i]; - } - var idxDst = new int[Infos.Length]; - - var cols = new HashSet(Infos.Select(info => info.Source)); - using (var cursor = Source.GetRowCursor(cols.Contains)) - { - var getters = new ValueGetter>[Infos.Length]; - for (int i = 0; i < Infos.Length; i++) - getters[i] = cursor.GetGetter>(Infos[i].Source); - var val = default(VBuffer); - int irow = 0; - while (irow < maxActualRowCount && cursor.MoveNext()) - { - for (int i = 0; i < Infos.Length; i++) - { - if (irow >= actualRowCounts[i] || columnData[i].Length == 0) - continue; - - getters[i](ref val); - val.CopyTo(columnData[i], idxDst[i]); - idxDst[i] += Infos[i].TypeSrc.ValueCount; - } - irow++; - } -#if DEBUG - for (int i = 0; i < Infos.Length; i++) - ch.Assert(idxDst[i] == columnData[i].Length); -#endif - } - - return columnData; - } - - private void TrainModels(Float[][] columnData, int[] rowCounts, IChannel ch) - { - Host.AssertValue(ch); - ch.Assert(columnData.Length == rowCounts.Length); - - for (int iinfo = 0; iinfo < Infos.Length; iinfo++) - { - var ex = _exes[iinfo]; - var data = columnData[iinfo]; - int crow = rowCounts[iinfo]; - int ccol = Infos[iinfo].TypeSrc.ValueCount; - - // If there is no training data, simply initialize the model matrices. - if (crow == 0) - { - var matrixSize = ccol * ccol; - _models[iinfo] = new float[matrixSize]; - InvModels[iinfo] = new float[matrixSize]; - continue; - } - - // Compute covariance matrix (sigma). - var u = new Float[ccol * ccol]; - ch.Info("Computing covariance matrix..."); - Mkl.Gemm(Layout, Mkl.Transpose.Trans, Mkl.Transpose.NoTrans, - ccol, ccol, crow, 1 / (Float)crow, data, ccol, data, ccol, 0, u, ccol); - - ch.Info("Computing SVD..."); - var eigValues = new Float[ccol]; // Eigenvalues. - var unconv = new Float[ccol]; // Superdiagonal unconverged values (if any). Not used but seems to be required by MKL. - // After the next call, values in U will be ovewritten by left eigenvectors. - // Each column in U will be an eigenvector. - int r = Mkl.Svd(Layout, Mkl.SvdJob.MinOvr, Mkl.SvdJob.None, - ccol, ccol, u, ccol, eigValues, null, ccol, null, ccol, unconv); - ch.Assert(r == 0); - if (r > 0) - throw ch.Except("SVD did not converge."); - if (r < 0) - throw ch.Except("Invalid arguments to LAPACK gesvd, error: {0}", r); - - ch.Info("Scaling eigenvectors..."); - // Scale eigenvalues first so we don't have to compute sqrt for every matrix element. - // Scaled eigenvalues are used to compute inverse transformation matrix - // while reciprocal (eigValuesRcp) values are used to compute whitening matrix. - for (int i = 0; i < eigValues.Length; i++) - eigValues[i] = MathUtils.Sqrt(Math.Max(0, eigValues[i]) + ex.Epsilon); - var eigValuesRcp = new Float[eigValues.Length]; - for (int i = 0; i < eigValuesRcp.Length; i++) - eigValuesRcp[i] = 1 / eigValues[i]; - - // Scale eigenvectors. Note that resulting matrix is transposed, so the scaled - // eigenvectors are stored row-wise. - var uScaled = new Float[u.Length]; - var uInvScaled = new Float[u.Length]; - int isrc = 0; - for (int irowSrc = 0; irowSrc < ccol; irowSrc++) - { - int idst = irowSrc; - for (int icolSrc = 0; icolSrc < ccol; icolSrc++) - { - uScaled[idst] = u[isrc] * eigValuesRcp[icolSrc]; - uInvScaled[idst] = u[isrc] * eigValues[icolSrc]; - isrc++; - idst += ccol; - } - } - - // For ZCA need to do additional multiply by U. - if (ex.Kind == WhiteningKind.Pca) - { - // Save all components for PCA. Retained components will be selected during evaluation. - _models[iinfo] = uScaled; - if (ex.SaveInv) - InvModels[iinfo] = uInvScaled; - } - else if (ex.Kind == WhiteningKind.Zca) - { - _models[iinfo] = new Float[u.Length]; - Mkl.Gemm(Layout, Mkl.Transpose.NoTrans, Mkl.Transpose.NoTrans, - ccol, ccol, ccol, 1, u, ccol, uScaled, ccol, 0, _models[iinfo], ccol); - - if (ex.SaveInv) - { - InvModels[iinfo] = new Float[u.Length]; - Mkl.Gemm(Layout, Mkl.Transpose.NoTrans, Mkl.Transpose.NoTrans, - ccol, ccol, ccol, 1, u, ccol, uInvScaled, ccol, 0, InvModels[iinfo], ccol); - } - } - else - ch.Assert(false); - } - } - - private WhiteningTransform(IHost host, ModelLoadContext ctx, IDataView input) - : base(host, ctx, input, TestColumn) - { - Host.AssertValue(ctx); - - // *** Binary format *** - // - // - // foreach added column - // ColInfoEx - // foreach model - // whitening matrix - // recovery matrix - - Host.AssertNonEmpty(Infos); - _exes = new ColInfoEx[Infos.Length]; - for (int i = 0; i < _exes.Length; i++) - _exes[i] = new ColInfoEx(ctx, Infos[i]); - - _models = new Float[Infos.Length][]; - InvModels = new Float[Infos.Length][]; - for (int i = 0; i < Infos.Length; i++) - { - _models[i] = ctx.Reader.ReadFloatArray(); - ValidateModel(Host, _models[i], Infos[i].TypeSrc); - if (_exes[i].SaveInv) - { - InvModels[i] = ctx.Reader.ReadFloatArray(); - ValidateModel(Host, InvModels[i], Infos[i].TypeSrc); - } - } - Metadata.Seal(); - } - - public static WhiteningTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) - { - Contracts.CheckValue(env, nameof(env)); - var h = env.Register(RegistrationName); - h.CheckValue(ctx, nameof(ctx)); - h.CheckValue(input, nameof(input)); - ctx.CheckAtModel(GetVersionInfo()); - - // *** Binary format *** - // int: sizeof(Float) - // - int cbFloat = ctx.Reader.ReadInt32(); - h.CheckDecode(cbFloat == sizeof(Float)); - return h.Apply("Loading Model", ch => new WhiteningTransform(h, ctx, input)); - } - - public override void Save(ModelSaveContext ctx) - { - Host.CheckValue(ctx, nameof(ctx)); - ctx.CheckAtModel(); - ctx.SetVersionInfo(GetVersionInfo()); - - // *** Binary format *** - // int: sizeof(Float) - // - // foreach added column - // ColInfoEx - // foreach model - // whitening matrix - // recovery matrix - ctx.Writer.Write(sizeof(Float)); - - SaveBase(ctx); - - Host.Assert(_exes.Length == Infos.Length); - for (int i = 0; i < _exes.Length; i++) - _exes[i].Save(ctx); - for (int i = 0; i < _models.Length; i++) - { - ctx.Writer.WriteSingleArray(_models[i]); - if (_exes[i].SaveInv) - ctx.Writer.WriteSingleArray(InvModels[i]); - } - } - - private static string TestColumn(ColumnType t) - { - string reason = TestIsKnownSizeFloatVector(t); - if (reason != null) - return reason; - - if ((long)t.ValueCount * t.ValueCount > Utils.ArrayMaxSize) - return "Vector size exceeds limit"; - - return null; - } - - private static void ValidateModel(IExceptionContext ectx, Float[] model, ColumnType col) - { - ectx.CheckDecode(Utils.Size(model) == (long)col.ValueCount * col.ValueCount, "Invalid model size."); - for (int i = 0; i < model.Length; i++) - ectx.CheckDecode(FloatUtils.IsFinite(model[i]), "Found NaN or infinity in the model."); - } - - private long GetRowCount() - { - long? rows = Source.GetRowCount(lazy: false); - if (rows != null) - return rows.GetValueOrDefault(); - - int maxRows = _exes.Max(i => i.MaxRow); - long r = 0; - using (var cursor = Source.GetRowCursor(col => false)) - { - while (r < maxRows && cursor.MoveNext()) - r++; - } - return r; - } - - protected override ColumnType GetColumnTypeCore(int iinfo) - { - Host.Check(0 <= iinfo & iinfo < Infos.Length); - return _exes[iinfo].Type; - } - - protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, out Action disposer) - { - Host.AssertValueOrNull(ch); - Host.AssertValue(input); - Host.Assert(0 <= iinfo && iinfo < Infos.Length); - disposer = null; - - var ex = _exes[iinfo]; - Host.Assert(ex.Kind == WhiteningKind.Pca || ex.Kind == WhiteningKind.Zca); - var getSrc = GetSrcGetter>(input, iinfo); - var src = default(VBuffer); - int cslotSrc = Infos[iinfo].TypeSrc.ValueCount; - int cslotDst = (ex.Kind == WhiteningKind.Pca && ex.PcaNum > 0) ? ex.PcaNum : Infos[iinfo].TypeSrc.ValueCount; - var model = _models[iinfo]; - ValueGetter> del = - (ref VBuffer dst) => - { - getSrc(ref src); - Host.Check(src.Length == cslotSrc, "Invalid column size."); - FillValues(model, in src, ref dst, cslotDst); - }; - return del; - } - - private static void FillValues(Float[] model, in VBuffer src, ref VBuffer dst, int cdst) - { - int count = src.Count; - int length = src.Length; - var values = src.Values; - var indices = src.Indices; - Contracts.Assert(Utils.Size(values) >= count); - - // Since the whitening process produces dense vector, always use dense representation of dst. - var a = Utils.Size(dst.Values) >= cdst ? dst.Values : new Float[cdst]; - if (src.IsDense) - { - Mkl.Gemv(Mkl.Layout.RowMajor, Mkl.Transpose.NoTrans, cdst, length, - 1, model, length, values, 1, 0, a, 1); - } - else - { - Contracts.Assert(Utils.Size(indices) >= count); - - int offs = 0; - for (int i = 0; i < cdst; i++) - { - a[i] = DotProduct(model, offs, values, indices, count); - offs += length; - } - } - dst = new VBuffer(cdst, a, dst.Indices); - } - - /// - /// Returns a dot product of dense vector 'a' starting from offset 'aOffset' and sparse vector 'b' - /// with first 'count' valid elements and their corresponding 'indices'. - /// - private static Float DotProduct(Float[] a, int aOffset, Float[] b, int[] indices, int count) - { - Contracts.Assert(count <= indices.Length); - return CpuMathUtils.DotProductSparse(a.AsSpan(aOffset), b, indices, count); - - } - - private static class Mkl - { - private const string DllName = "MklImports"; - - public enum Layout - { - RowMajor = 101, - ColMajor = 102 - } - - public enum Transpose - { - NoTrans = 111, - Trans = 112, - ConjTrans = 113 - } - - public enum SvdJob : byte - { - None = (byte)'N', - All = (byte)'A', - Min = (byte)'S', - MinOvr = (byte)'O', - } - - // See: https://software.intel.com/en-us/node/520750 - [DllImport(DllName, EntryPoint = "cblas_sgemv")] - public static extern void Gemv(Layout layout, Transpose trans, int m, int n, Float alpha, - Float[] a, int lda, Float[] x, int incx, Float beta, Float[] y, int incy); - - // See: https://software.intel.com/en-us/node/520775 - [DllImport(DllName, EntryPoint = "cblas_sgemm")] - public static extern void Gemm(Layout layout, Transpose transA, Transpose transB, int m, int n, int k, Float alpha, - Float[] a, int lda, Float[] b, int ldb, Float beta, Float[] c, int ldc); - - // See: https://software.intel.com/en-us/node/521150 - [DllImport(DllName, EntryPoint = "LAPACKE_sgesvd")] - public static extern int Svd(Layout layout, SvdJob jobu, SvdJob jobvt, - int m, int n, Float[] a, int lda, Float[] s, Float[] u, int ldu, Float[] vt, int ldvt, Float[] superb); - } - } -} diff --git a/src/Microsoft.ML.Transforms/WrappedFeatureSelectionTransformers.cs b/src/Microsoft.ML.Transforms/WrappedFeatureSelectionTransformers.cs index 3fa2b55a37..f49bc4b58c 100644 --- a/src/Microsoft.ML.Transforms/WrappedFeatureSelectionTransformers.cs +++ b/src/Microsoft.ML.Transforms/WrappedFeatureSelectionTransformers.cs @@ -24,7 +24,7 @@ public sealed class CountFeatureSelector : TrainedWrapperEstimatorBase /// The input column to apply feature selection on. /// The output column. Null means is used. /// If the count of non-default values for a slot is greater than or equal to this threshold, the slot is preserved. - public CountFeatureSelector(IHostEnvironment env, string inputColumn, string outputColumn = null, long count = CountFeatureSelectionTransform.Defaults.Count) + public CountFeatureSelector(IHostEnvironment env, string inputColumn, string outputColumn = null, long count = CountFeatureSelectingTransformer.Defaults.Count) : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, count) { } @@ -33,7 +33,7 @@ public CountFeatureSelector(IHostEnvironment env, string inputColumn, string out /// The environment. /// If the count of non-default values for a slot is greater than or equal to this threshold, the slot is preserved. /// Columns to use for feature selection. - public CountFeatureSelector(IHostEnvironment env, (string input, string output)[] columns, long count = CountFeatureSelectionTransform.Defaults.Count) + public CountFeatureSelector(IHostEnvironment env, (string input, string output)[] columns, long count = CountFeatureSelectingTransformer.Defaults.Count) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(CountFeatureSelector))) { _count = count; @@ -42,10 +42,10 @@ public CountFeatureSelector(IHostEnvironment env, (string input, string output)[ public override TransformWrapper Fit(IDataView input) { - var copyColumn = new CopyColumnsEstimator(Host, _columns); + var copyColumn = new ColumnsCopyingEstimator(Host, _columns); var dataview = copyColumn.Fit(input).Transform(input); var names = _columns.Select(x => x.output).ToArray(); - return new TransformWrapper(Host, CountFeatureSelectionTransform.Create(Host, dataview, _count, names)); + return new TransformWrapper(Host, CountFeatureSelectingTransformer.Create(Host, dataview, _count, names)); } } @@ -95,7 +95,7 @@ public MutualInformationFeatureSelector(IHostEnvironment env, public override TransformWrapper Fit(IDataView input) { - var copyColumn = new CopyColumnsEstimator(Host, _columns); + var copyColumn = new ColumnsCopyingEstimator(Host, _columns); var dataview = copyColumn.Fit(input).Transform(input); var names = _columns.Select(x => x.output).ToArray(); return new TransformWrapper(Host, MutualInformationFeatureSelectionTransform.Create(Host, dataview, _labelColumn, _slotsInOutput, _numBins, names)); @@ -147,19 +147,19 @@ public override IEstimator Reconcile(IHostEnvironment env, /// The column to apply to. /// If the count of non-default values for a slot is greater than or equal to this threshold, the slot is preserved. public static Vector SelectFeaturesBasedOnCount(this Vector input, - long count = CountFeatureSelectionTransform.Defaults.Count) => new OutPipelineColumn(input, count); + long count = CountFeatureSelectingTransformer.Defaults.Count) => new OutPipelineColumn(input, count); /// /// The column to apply to. /// If the count of non-default values for a slot is greater than or equal to this threshold, the slot is preserved. public static Vector SelectFeaturesBasedOnCount(this Vector input, - long count = CountFeatureSelectionTransform.Defaults.Count) => new OutPipelineColumn(input, count); + long count = CountFeatureSelectingTransformer.Defaults.Count) => new OutPipelineColumn(input, count); /// /// The column to apply to. /// If the count of non-default values for a slot is greater than or equal to this threshold, the slot is preserved. public static Vector SelectFeaturesBasedOnCount(this Vector input, - long count = CountFeatureSelectionTransform.Defaults.Count) => new OutPipelineColumn(input, count); + long count = CountFeatureSelectingTransformer.Defaults.Count) => new OutPipelineColumn(input, count); } /// diff --git a/src/Microsoft.ML.Transforms/WrappedGcnTransformers.cs b/src/Microsoft.ML.Transforms/WrappedGcnTransformers.cs deleted file mode 100644 index 20620ba489..0000000000 --- a/src/Microsoft.ML.Transforms/WrappedGcnTransformers.cs +++ /dev/null @@ -1,223 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Core.Data; -using Microsoft.ML.Runtime; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.StaticPipe; -using Microsoft.ML.StaticPipe.Runtime; -using Microsoft.ML.Transforms.Projections; -using System.Collections.Generic; -using System.Linq; -using static Microsoft.ML.Transforms.Projections.LpNormNormalizerTransform; - -namespace Microsoft.ML.Transforms -{ - /// - public sealed class LpNormalizer : TrivialWrapperEstimator - { - /// - /// The environment. - /// The column containing text to tokenize. - /// The column containing output tokens. Null means is replaced. - /// Type of norm to use to normalize each sample. - /// Subtract mean from each value before normalizing. - public LpNormalizer(IHostEnvironment env, string inputColumn, string outputColumn = null, NormalizerKind normKind = NormalizerKind.L2Norm, bool subMean = false) - : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, normKind, subMean) - { - } - - /// - /// The environment. - /// Pairs of columns to run the tokenization on. - /// Type of norm to use to normalize each sample. - /// Subtract mean from each value before normalizing. - public LpNormalizer(IHostEnvironment env, (string input, string output)[] columns, NormalizerKind normKind = NormalizerKind.L2Norm, bool subMean = false) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(LpNormalizer)), MakeTransformer(env, columns, normKind, subMean)) - { - } - - private static TransformWrapper MakeTransformer(IHostEnvironment env, (string input, string output)[] columns, NormalizerKind normKind, bool subMean) - { - Contracts.AssertValue(env); - env.CheckNonEmpty(columns, nameof(columns)); - foreach (var (input, output) in columns) - { - env.CheckValue(input, nameof(input)); - env.CheckValue(output, nameof(input)); - } - - var args = new LpNormNormalizerTransform.Arguments - { - Column = columns.Select(x => new LpNormNormalizerTransform.Column { Source = x.input, Name = x.output }).ToArray(), - SubMean = subMean, - NormKind = normKind - }; - - // Create a valid instance of data. - var schema = new Schema(columns.Select(x => new Schema.Column(x.input, new VectorType(NumberType.R4), null))); - var emptyData = new EmptyDataView(env, schema); - - return new TransformWrapper(env, new LpNormNormalizerTransform(env, args, emptyData)); - } - } - - /// - public sealed class GlobalContrastNormalizer : TrivialWrapperEstimator - { - /// - /// The environment. - /// The column containing text to tokenize. - /// The column containing output tokens. Null means is replaced. - /// Subtract mean from each value before normalizing. - /// Normalize by standard deviation rather than L2 norm. - /// Scale features by this value. - public GlobalContrastNormalizer(IHostEnvironment env, string inputColumn, string outputColumn = null, bool subMean = true, bool useStdDev = false, float scale = 1) - : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, subMean, useStdDev , scale) - { - } - - /// - /// The environment. - /// Pairs of columns to run the tokenization on. - /// Subtract mean from each value before normalizing. - /// Normalize by standard deviation rather than L2 norm. - /// Scale features by this value. - public GlobalContrastNormalizer(IHostEnvironment env, (string input, string output)[] columns, bool subMean = true, bool useStdDev = false, float scale = 1) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(GlobalContrastNormalizer)), MakeTransformer(env, columns, subMean, useStdDev, scale)) - { - } - - private static TransformWrapper MakeTransformer(IHostEnvironment env, (string input, string output)[] columns, bool subMean, bool useStdDev, float scale) - { - Contracts.AssertValue(env); - env.CheckNonEmpty(columns, nameof(columns)); - foreach (var (input, output) in columns) - { - env.CheckValue(input, nameof(input)); - env.CheckValue(output, nameof(input)); - } - - var args = new LpNormNormalizerTransform.GcnArguments - { - Column = columns.Select(x => new LpNormNormalizerTransform.GcnColumn { Source = x.input, Name = x.output }).ToArray(), - SubMean = subMean, - UseStdDev = useStdDev, - Scale = scale - }; - - // Create a valid instance of data. - var schema = new Schema(columns.Select(x => new Schema.Column(x.input, new VectorType(NumberType.R4), null))); - var emptyData = new EmptyDataView(env, schema); - - return new TransformWrapper(env, new LpNormNormalizerTransform(env, args, emptyData)); - } - } - - /// - /// Extensions for statically typed LpNormalizer estimator. - /// - public static class LpNormNormalizerExtensions - { - private sealed class OutPipelineColumn : Vector - { - public readonly Vector Input; - - public OutPipelineColumn(Vector input, NormalizerKind normKind, bool subMean) - : base(new Reconciler(normKind, subMean), input) - { - Input = input; - } - } - - private sealed class Reconciler : EstimatorReconciler - { - private readonly NormalizerKind _normKind; - private readonly bool _subMean; - - public Reconciler(NormalizerKind normKind, bool subMean) - { - _normKind = normKind; - _subMean = subMean; - } - - public override IEstimator Reconcile(IHostEnvironment env, - PipelineColumn[] toOutput, - IReadOnlyDictionary inputNames, - IReadOnlyDictionary outputNames, - IReadOnlyCollection usedNames) - { - Contracts.Assert(toOutput.Length == 1); - - var pairs = new List<(string input, string output)>(); - foreach (var outCol in toOutput) - pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); - - return new LpNormalizer(env, pairs.ToArray(), _normKind, _subMean); - } - } - - /// - /// The column to apply to. - /// Type of norm to use to normalize each sample. - /// Subtract mean from each value before normalizing. - public static Vector LpNormalize(this Vector input, NormalizerKind normKind = NormalizerKind.L2Norm, bool subMean = false) => new OutPipelineColumn(input, normKind, subMean); - } - - /// - /// Extensions for statically typed GcNormalizer estimator. - /// - public static class GcNormalizerExtensions - { - private sealed class OutPipelineColumn : Vector - { - public readonly Vector Input; - - public OutPipelineColumn(Vector input, bool subMean, bool useStdDev, float scale) - : base(new Reconciler(subMean, useStdDev, scale), input) - { - Input = input; - } - } - - private sealed class Reconciler : EstimatorReconciler - { - private readonly bool _subMean; - private readonly bool _useStdDev; - private readonly float _scale; - - public Reconciler(bool subMean, bool useStdDev, float scale) - { - _subMean = subMean; - _useStdDev = useStdDev; - _scale = scale; - } - - public override IEstimator Reconcile(IHostEnvironment env, - PipelineColumn[] toOutput, - IReadOnlyDictionary inputNames, - IReadOnlyDictionary outputNames, - IReadOnlyCollection usedNames) - { - Contracts.Assert(toOutput.Length == 1); - - var pairs = new List<(string input, string output)>(); - foreach (var outCol in toOutput) - pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); - - return new GlobalContrastNormalizer(env, pairs.ToArray(), _subMean, _useStdDev, _scale); - } - } - - /// - /// The column to apply to. - /// Subtract mean from each value before normalizing. - /// Normalize by standard deviation rather than L2 norm. - /// Scale features by this value. - public static Vector GlobalContrastNormalize(this Vector input, - bool subMean = true, - bool useStdDev = false, - float scale = 1) => new OutPipelineColumn(input, subMean, useStdDev, scale); - } -} diff --git a/src/Microsoft.ML.Transforms/WrappedWhiteningTransformer.cs b/src/Microsoft.ML.Transforms/WrappedWhiteningTransformer.cs deleted file mode 100644 index ac52e8b98d..0000000000 --- a/src/Microsoft.ML.Transforms/WrappedWhiteningTransformer.cs +++ /dev/null @@ -1,167 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Core.Data; -using Microsoft.ML.Runtime; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Internal.Utilities; -using Microsoft.ML.StaticPipe; -using Microsoft.ML.StaticPipe.Runtime; -using System.Collections.Generic; -using System.Linq; -using Microsoft.ML.Transforms.Projections; - -namespace Microsoft.ML.Transforms -{ - /// - public sealed class Whitening : TrainedWrapperEstimatorBase - { - private readonly (string input, string output)[] _columns; - private readonly WhiteningKind _kind; - private readonly float _eps; - private readonly int _maxRows; - private readonly bool _saveInverse; - private readonly int _pcaNum; - - /// - /// The environment. - /// The column containing text to tokenize. - /// The column containing output tokens. Null means is replaced. - /// Whitening kind (PCA/ZCA). - /// Scaling regularizer. - /// Max number of rows. - /// Whether to save inverse (recovery) matrix. - /// PCA components to retain. - public Whitening(IHostEnvironment env, - string inputColumn, - string outputColumn = null, - WhiteningKind kind = WhiteningKind.Zca, - float eps = (float)1e-5, - int maxRows = 100 * 1000, - bool saveInverse = false, - int pcaNum = 0) - : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, kind, eps, maxRows, saveInverse, pcaNum) - { - } - - /// - /// The environment. - /// Pairs of columns to run the tokenization on. - /// Whitening kind (PCA/ZCA). - /// Scaling regularizer. - /// Max number of rows. - /// Whether to save inverse (recovery) matrix. - /// PCA components to retain. - public Whitening(IHostEnvironment env, (string input, string output)[] columns, - WhiteningKind kind = WhiteningKind.Zca, - float eps = (float)1e-5, - int maxRows = 100 * 1000, - bool saveInverse = false, - int pcaNum = 0) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(LpNormalizer))) - { - foreach (var (input, output) in columns) - { - Host.CheckUserArg(Utils.Size(input) > 0, nameof(input)); - Host.CheckValue(output, nameof(input)); - } - - _columns = columns; - _kind = kind; - _eps = eps; - _maxRows = maxRows; - _saveInverse = saveInverse; - _pcaNum = pcaNum; - } - - public override TransformWrapper Fit(IDataView input) - { - var args = new WhiteningTransform.Arguments - { - Column = _columns.Select(x => new WhiteningTransform.Column { Source = x.input, Name = x.output }).ToArray(), - Kind = _kind, - Eps = _eps, - MaxRows = _maxRows, - SaveInverse = _saveInverse, - PcaNum = _pcaNum - }; - - return new TransformWrapper(Host, new WhiteningTransform(Host, args, input)); - } - } - - /// - /// Extensions for statically typed Whitening estimator. - /// - public static class WhiteningExtensions - { - private sealed class OutPipelineColumn : Vector - { - public readonly Vector Input; - - public OutPipelineColumn(Vector input, WhiteningKind kind, float eps, int maxRows, bool saveInverse, int pcaNum) - : base(new Reconciler(kind, eps, maxRows, saveInverse, pcaNum), input) - { - Input = input; - } - } - - private sealed class Reconciler : EstimatorReconciler - { - private readonly WhiteningKind _kind; - private readonly float _eps; - private readonly int _maxRows; - private readonly bool _saveInverse; - private readonly int _pcaNum; - - public Reconciler(WhiteningKind kind, float eps, int maxRows, bool saveInverse, int pcaNum) - { - _kind = kind; - _eps = eps; - _maxRows = maxRows; - _saveInverse = saveInverse; - _pcaNum = pcaNum; - } - - public override IEstimator Reconcile(IHostEnvironment env, - PipelineColumn[] toOutput, - IReadOnlyDictionary inputNames, - IReadOnlyDictionary outputNames, - IReadOnlyCollection usedNames) - { - Contracts.Assert(toOutput.Length == 1); - - var pairs = new List<(string input, string output)>(); - foreach (var outCol in toOutput) - pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); - - return new Whitening(env, pairs.ToArray(), _kind, _eps, _maxRows, _saveInverse, _pcaNum); - } - } - - /// - /// The column to apply to. - /// Scaling regularizer. - /// Max number of rows. - /// Whether to save inverse (recovery) matrix. - /// PCA components to retain. - public static Vector PcaWhitening(this Vector input, - float eps = (float)1e-5, - int maxRows = 100 * 1000, - bool saveInverse = false, - int pcaNum = 0) => new OutPipelineColumn(input, WhiteningKind.Pca, eps, maxRows, saveInverse, pcaNum); - - /// - /// The column to apply to. - /// Scaling regularizer. - /// Max number of rows. - /// Whether to save inverse (recovery) matrix. - /// PCA components to retain. - public static Vector ZcaWhitening(this Vector input, - float eps = (float)1e-5, - int maxRows = 100 * 1000, - bool saveInverse = false, - int pcaNum = 0) => new OutPipelineColumn(input, WhiteningKind.Zca, eps, maxRows, saveInverse, pcaNum); - } -} diff --git a/src/Microsoft.ML.Transforms/doc.xml b/src/Microsoft.ML.Transforms/doc.xml index 6d15b547d0..f39322a75c 100644 --- a/src/Microsoft.ML.Transforms/doc.xml +++ b/src/Microsoft.ML.Transforms/doc.xml @@ -65,7 +65,7 @@ This transform uses a set of aggregators to count the number of non-default values for each slot and instantiates a to actually drop the slots. - This transform is useful when applied together with a . + This transform is useful when applied together with a . The count feature selection can remove those features generated by the hash transform that have no data in the examples. @@ -157,7 +157,6 @@ Removes missing values from vector type columns. - @@ -172,7 +171,6 @@ This transform can transform either scalars or vectors (both fixed and variable size), creating output columns that indicate, through the true/false booleans whether the row has a missing value. - @@ -193,7 +191,6 @@ with either the default value, user input, or imputed values (min/max/mean are currently supported). Imputation modes are supported for vectors both by slot and across all slots. - @@ -217,7 +214,7 @@ Scaling inputs to unit norms is a common operation for text classification or clustering. For more information see: - + pipeline.Add(new LpNormalizer("FeatureCol") @@ -239,7 +236,7 @@ For more information see: An Analysis of Single-Layer Networks in Unsupervised Feature Learning - + pipeline.Add(new GlobalContrastNormalizer("FeatureCol") diff --git a/test/BaselineOutput/Common/Command/CommandTrainingLrWithStats-summary.txt b/test/BaselineOutput/Common/Command/CommandTrainingLrWithStats-summary.txt index 6d58cb8d2d..4bd1c57233 100644 --- a/test/BaselineOutput/Common/Command/CommandTrainingLrWithStats-summary.txt +++ b/test/BaselineOutput/Common/Command/CommandTrainingLrWithStats-summary.txt @@ -13,3 +13,15 @@ Count of training examples: 32561 Residual Deviance: 26705.74 Null Deviance: 35948.08 AIC: 26719.74 + +Coefficients statistics: +Coefficient Estimate Std. Error z value Pr(>|z|) +(Bias) -8.228298 0.1161297 -70.85435 0 *** +education-num 5.066041 0.1048074 48.33666 0 *** +capital-gain 18.58347 0.4694776 39.5833 0 *** +age 3.86064 0.1061118 36.38277 0 *** +hours-per-week 3.946534 0.1258723 31.35349 0 *** +capital-loss 2.81616 0.13793 20.41732 0 *** +fnlwgt 0.7489593 0.2048056 3.656927 0.0002553463 *** +--- +Significance codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 diff --git a/test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv b/test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv index 8a90026359..655b617d72 100644 --- a/test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv +++ b/test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv @@ -75,48 +75,48 @@ Trainers.StochasticDualCoordinateAscentClassifier The SDCA linear multi-class cl Trainers.StochasticDualCoordinateAscentRegressor The SDCA linear regression trainer. Microsoft.ML.Trainers.Sdca TrainRegression Microsoft.ML.Trainers.SdcaRegressionTrainer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+RegressionOutput Trainers.StochasticGradientDescentBinaryClassifier Train an Hogwild SGD binary model. Microsoft.ML.Trainers.StochasticGradientDescentClassificationTrainer TrainBinary Microsoft.ML.Trainers.StochasticGradientDescentClassificationTrainer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+BinaryClassificationOutput Trainers.SymSgdBinaryClassifier Train a symbolic SGD. Microsoft.ML.Trainers.SymSgd.SymSgdClassificationTrainer TrainSymSgd Microsoft.ML.Trainers.SymSgd.SymSgdClassificationTrainer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+BinaryClassificationOutput -Transforms.ApproximateBootstrapSampler Approximate bootstrap sampling. Microsoft.ML.Transforms.BootstrapSample GetSample Microsoft.ML.Transforms.BootstrapSampleTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.ApproximateBootstrapSampler Approximate bootstrap sampling. Microsoft.ML.Transforms.BootstrapSample GetSample Microsoft.ML.Transforms.BootstrapSamplingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.BinaryPredictionScoreColumnsRenamer For binary prediction, it renames the PredictedLabel and Score columns to include the name of the positive class. Microsoft.ML.Runtime.EntryPoints.ScoreModel RenameBinaryPredictionScoreColumns Microsoft.ML.Runtime.EntryPoints.ScoreModel+RenameBinaryPredictionScoreColumnsInput Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.BinNormalizer The values are assigned into equidensity bins and a value is mapped to its bin_number/number_of_bins. Microsoft.ML.Runtime.Data.Normalize Bin Microsoft.ML.Transforms.Normalizers.NormalizeTransform+BinArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.CategoricalHashOneHotVectorizer Converts the categorical value into an indicator array by hashing the value and using the hash as an index in the bag. If the input column is a vector, a single indicator bag is returned for it. Microsoft.ML.Transforms.Categorical.Categorical CatTransformHash Microsoft.ML.Transforms.Categorical.CategoricalHashTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.CategoricalOneHotVectorizer Converts the categorical value into an indicator array by building a dictionary of categories based on the data and using the id in the dictionary as the index in the array. Microsoft.ML.Transforms.Categorical.Categorical CatTransformDict Microsoft.ML.Transforms.Categorical.CategoricalTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.CharacterTokenizer Character-oriented tokenizer where text is considered a sequence of characters. Microsoft.ML.Transforms.Text.TextAnalytics CharTokenize Microsoft.ML.Transforms.Text.CharTokenizeTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.ColumnConcatenator Concatenates one or more columns of the same item type. Microsoft.ML.Runtime.EntryPoints.SchemaManipulation ConcatColumns Microsoft.ML.Runtime.Data.ConcatTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.ColumnCopier Duplicates columns from the dataset Microsoft.ML.Runtime.EntryPoints.SchemaManipulation CopyColumns Microsoft.ML.Transforms.CopyColumnsTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.ColumnSelector Selects a set of columns, dropping all others Microsoft.ML.Runtime.EntryPoints.SchemaManipulation SelectColumns Microsoft.ML.Transforms.SelectColumnsTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.ColumnTypeConverter Converts a column to a different type, using standard conversions. Microsoft.ML.Transforms.Conversions.TypeConversion Convert Microsoft.ML.Transforms.Conversions.ConvertingTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.CategoricalHashOneHotVectorizer Converts the categorical value into an indicator array by hashing the value and using the hash as an index in the bag. If the input column is a vector, a single indicator bag is returned for it. Microsoft.ML.Transforms.Categorical.Categorical CatTransformHash Microsoft.ML.Transforms.Categorical.OneHotHashEncodingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.CategoricalOneHotVectorizer Converts the categorical value into an indicator array by building a dictionary of categories based on the data and using the id in the dictionary as the index in the array. Microsoft.ML.Transforms.Categorical.Categorical CatTransformDict Microsoft.ML.Transforms.Categorical.OneHotEncodingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.CharacterTokenizer Character-oriented tokenizer where text is considered a sequence of characters. Microsoft.ML.Transforms.Text.TextAnalytics CharTokenize Microsoft.ML.Transforms.Text.TokenizingByCharactersTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.ColumnConcatenator Concatenates one or more columns of the same item type. Microsoft.ML.Runtime.EntryPoints.SchemaManipulation ConcatColumns Microsoft.ML.Runtime.Data.ColumnConcatenatingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.ColumnCopier Duplicates columns from the dataset Microsoft.ML.Runtime.EntryPoints.SchemaManipulation CopyColumns Microsoft.ML.Transforms.ColumnsCopyingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.ColumnSelector Selects a set of columns, dropping all others Microsoft.ML.Runtime.EntryPoints.SchemaManipulation SelectColumns Microsoft.ML.Transforms.ColumnSelectingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.ColumnTypeConverter Converts a column to a different type, using standard conversions. Microsoft.ML.Transforms.Conversions.TypeConversion Convert Microsoft.ML.Transforms.Conversions.TypeConvertingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.CombinerByContiguousGroupId Groups values of a scalar column into a vector, by a contiguous group ID Microsoft.ML.Transforms.GroupingOperations Group Microsoft.ML.Transforms.GroupTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.ConditionalNormalizer Normalize the columns only if needed Microsoft.ML.Runtime.Data.Normalize IfNeeded Microsoft.ML.Transforms.Normalizers.NormalizeTransform+MinMaxArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+MacroOutput`1[Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput] Transforms.DataCache Caches using the specified cache option. Microsoft.ML.Runtime.EntryPoints.Cache CacheData Microsoft.ML.Runtime.EntryPoints.Cache+CacheInput Microsoft.ML.Runtime.EntryPoints.Cache+CacheOutput Transforms.DatasetScorer Score a dataset with a predictor model Microsoft.ML.Runtime.EntryPoints.ScoreModel Score Microsoft.ML.Runtime.EntryPoints.ScoreModel+Input Microsoft.ML.Runtime.EntryPoints.ScoreModel+Output Transforms.DatasetTransformScorer Score a dataset with a transform model Microsoft.ML.Runtime.EntryPoints.ScoreModel ScoreUsingTransform Microsoft.ML.Runtime.EntryPoints.ScoreModel+InputTransformScorer Microsoft.ML.Runtime.EntryPoints.ScoreModel+Output -Transforms.Dictionarizer Converts input values (words, numbers, etc.) to index in a dictionary. Microsoft.ML.Transforms.Text.TextAnalytics TermTransform Microsoft.ML.Transforms.Categorical.TermTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.Dictionarizer Converts input values (words, numbers, etc.) to index in a dictionary. Microsoft.ML.Transforms.Text.TextAnalytics TermTransform Microsoft.ML.Transforms.Categorical.ValueToKeyMappingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.FeatureCombiner Combines all the features into one feature column. Microsoft.ML.Runtime.EntryPoints.FeatureCombiner PrepareFeatures Microsoft.ML.Runtime.EntryPoints.FeatureCombiner+FeatureCombinerInput Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.FeatureSelectorByCount Selects the slots for which the count of non-default values is greater than or equal to a threshold. Microsoft.ML.Transforms.SelectFeatures CountSelect Microsoft.ML.Transforms.CountFeatureSelectionTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.FeatureSelectorByCount Selects the slots for which the count of non-default values is greater than or equal to a threshold. Microsoft.ML.Transforms.SelectFeatures CountSelect Microsoft.ML.Transforms.CountFeatureSelectingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.FeatureSelectorByMutualInformation Selects the top k slots across all specified columns ordered by their mutual information with the label column. Microsoft.ML.Transforms.SelectFeatures MutualInformationSelect Microsoft.ML.Transforms.MutualInformationFeatureSelectionTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.GlobalContrastNormalizer Performs a global contrast normalization on input values: Y = (s * X - M) / D, where s is a scale, M is mean and D is either L2 norm or standard deviation. Microsoft.ML.Transforms.Projections.LpNormalization GcNormalize Microsoft.ML.Transforms.Projections.LpNormNormalizerTransform+GcnArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.HashConverter Converts column values into hashes. This transform accepts both numeric and text inputs, both single and vector-valued columns. Microsoft.ML.Transforms.Conversions.HashJoin Apply Microsoft.ML.Transforms.Conversions.HashJoinTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.GlobalContrastNormalizer Performs a global contrast normalization on input values: Y = (s * X - M) / D, where s is a scale, M is mean and D is either L2 norm or standard deviation. Microsoft.ML.Transforms.Projections.LpNormalization GcNormalize Microsoft.ML.Transforms.Projections.LpNormalizingTransformer+GcnArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.HashConverter Converts column values into hashes. This transform accepts both numeric and text inputs, both single and vector-valued columns. Microsoft.ML.Transforms.Conversions.HashJoin Apply Microsoft.ML.Transforms.Conversions.HashJoiningTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.ImageGrayscale Convert image into grayscale. Microsoft.ML.Runtime.ImageAnalytics.EntryPoints.ImageAnalytics ImageGrayscale Microsoft.ML.Runtime.ImageAnalytics.ImageGrayscaleTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.ImageLoader Load images from files. Microsoft.ML.Runtime.ImageAnalytics.EntryPoints.ImageAnalytics ImageLoader Microsoft.ML.Runtime.ImageAnalytics.ImageLoaderTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.ImagePixelExtractor Extract color plane(s) from an image. Options include scaling, offset and conversion to floating point. Microsoft.ML.Runtime.ImageAnalytics.EntryPoints.ImageAnalytics ImagePixelExtractor Microsoft.ML.Runtime.ImageAnalytics.ImagePixelExtractorTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.ImageResizer Scales an image to specified dimensions using one of the three scale types: isotropic with padding, isotropic with cropping or anisotropic. In case of isotropic padding, transparent color is used to pad resulting image. Microsoft.ML.Runtime.ImageAnalytics.EntryPoints.ImageAnalytics ImageResizer Microsoft.ML.Runtime.ImageAnalytics.ImageResizerTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.KeyToTextConverter KeyToValueTransform utilizes KeyValues metadata to map key indices to the corresponding values in the KeyValues metadata. Microsoft.ML.Transforms.Categorical.Categorical KeyToText Microsoft.ML.Transforms.Conversions.KeyToValueTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.KeyToTextConverter KeyToValueTransform utilizes KeyValues metadata to map key indices to the corresponding values in the KeyValues metadata. Microsoft.ML.Transforms.Categorical.Categorical KeyToText Microsoft.ML.Transforms.Conversions.KeyToValueMappingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.LabelColumnKeyBooleanConverter Transforms the label to either key or bool (if needed) to make it suitable for classification. Microsoft.ML.Runtime.EntryPoints.FeatureCombiner PrepareClassificationLabel Microsoft.ML.Runtime.EntryPoints.FeatureCombiner+ClassificationLabelInput Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.LabelIndicator Label remapper used by OVA Microsoft.ML.Transforms.LabelIndicatorTransform LabelIndicator Microsoft.ML.Transforms.LabelIndicatorTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.LabelToFloatConverter Transforms the label to float to make it suitable for regression. Microsoft.ML.Runtime.EntryPoints.FeatureCombiner PrepareRegressionLabel Microsoft.ML.Runtime.EntryPoints.FeatureCombiner+RegressionLabelInput Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.LightLda The LDA transform implements LightLDA, a state-of-the-art implementation of Latent Dirichlet Allocation. Microsoft.ML.Transforms.Text.TextAnalytics LightLda Microsoft.ML.Transforms.Text.LdaTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.LightLda The LDA transform implements LightLDA, a state-of-the-art implementation of Latent Dirichlet Allocation. Microsoft.ML.Transforms.Text.TextAnalytics LightLda Microsoft.ML.Transforms.Text.LatentDirichletAllocationTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.LogMeanVarianceNormalizer Normalizes the data based on the computed mean and variance of the logarithm of the data. Microsoft.ML.Runtime.Data.Normalize LogMeanVar Microsoft.ML.Transforms.Normalizers.NormalizeTransform+LogMeanVarArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.LpNormalizer Normalize vectors (rows) individually by rescaling them to unit norm (L2, L1 or LInf). Performs the following operation on a vector X: Y = (X - M) / D, where M is mean and D is either L2 norm, L1 norm or LInf norm. Microsoft.ML.Transforms.Projections.LpNormalization Normalize Microsoft.ML.Transforms.Projections.LpNormNormalizerTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.LpNormalizer Normalize vectors (rows) individually by rescaling them to unit norm (L2, L1 or LInf). Performs the following operation on a vector X: Y = (X - M) / D, where M is mean and D is either L2 norm, L1 norm or LInf norm. Microsoft.ML.Transforms.Projections.LpNormalization Normalize Microsoft.ML.Transforms.Projections.LpNormalizingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.ManyHeterogeneousModelCombiner Combines a sequence of TransformModels and a PredictorModel into a single PredictorModel. Microsoft.ML.Runtime.EntryPoints.ModelOperations CombineModels Microsoft.ML.Runtime.EntryPoints.ModelOperations+PredictorModelInput Microsoft.ML.Runtime.EntryPoints.ModelOperations+PredictorModelOutput Transforms.MeanVarianceNormalizer Normalizes the data based on the computed mean and variance of the data. Microsoft.ML.Runtime.Data.Normalize MeanVar Microsoft.ML.Transforms.Normalizers.NormalizeTransform+MeanVarArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.MinMaxNormalizer Normalizes the data based on the observed minimum and maximum values of the data. Microsoft.ML.Runtime.Data.Normalize MinMax Microsoft.ML.Transforms.Normalizers.NormalizeTransform+MinMaxArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.MissingValueHandler Handle missing values by replacing them with either the default value or the mean/min/max value (for non-text columns only). An indicator column can optionally be concatenated, if theinput column type is numeric. Microsoft.ML.Transforms.NAHandling Handle Microsoft.ML.Transforms.NAHandleTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.MissingValueIndicator Create a boolean output column with the same number of slots as the input column, where the output value is true if the value in the input column is missing. Microsoft.ML.Transforms.NAHandling Indicator Microsoft.ML.Transforms.NAIndicatorTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.MissingValuesDropper Removes NAs from vector columns. Microsoft.ML.Transforms.NAHandling Drop Microsoft.ML.Runtime.Data.NADropTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.MissingValueHandler Handle missing values by replacing them with either the default value or the mean/min/max value (for non-text columns only). An indicator column can optionally be concatenated, if theinput column type is numeric. Microsoft.ML.Transforms.NAHandling Handle Microsoft.ML.Transforms.MissingValueHandlingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.MissingValueIndicator Create a boolean output column with the same number of slots as the input column, where the output value is true if the value in the input column is missing. Microsoft.ML.Transforms.NAHandling Indicator Microsoft.ML.Transforms.MissingValueIndicatorTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.MissingValuesDropper Removes NAs from vector columns. Microsoft.ML.Transforms.NAHandling Drop Microsoft.ML.Transforms.MissingValueDroppingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.MissingValuesRowDropper Filters out rows that contain missing values. Microsoft.ML.Transforms.NAHandling Filter Microsoft.ML.Transforms.NAFilter+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.MissingValueSubstitutor Create an output column of the same type and size of the input column, where missing values are replaced with either the default value or the mean/min/max value (for non-text columns only). Microsoft.ML.Transforms.NAHandling Replace Microsoft.ML.Transforms.NAReplaceTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.MissingValueSubstitutor Create an output column of the same type and size of the input column, where missing values are replaced with either the default value or the mean/min/max value (for non-text columns only). Microsoft.ML.Transforms.NAHandling Replace Microsoft.ML.Transforms.MissingValueReplacingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.ModelCombiner Combines a sequence of TransformModels into a single model Microsoft.ML.Runtime.EntryPoints.ModelOperations CombineTransformModels Microsoft.ML.Runtime.EntryPoints.ModelOperations+CombineTransformModelsInput Microsoft.ML.Runtime.EntryPoints.ModelOperations+CombineTransformModelsOutput -Transforms.NGramTranslator Produces a bag of counts of ngrams (sequences of consecutive values of length 1-n) in a given vector of keys. It does so by building a dictionary of ngrams and using the id in the dictionary as the index in the bag. Microsoft.ML.Transforms.Text.TextAnalytics NGramTransform Microsoft.ML.Transforms.Text.NgramTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.NGramTranslator Produces a bag of counts of ngrams (sequences of consecutive values of length 1-n) in a given vector of keys. It does so by building a dictionary of ngrams and using the id in the dictionary as the index in the bag. Microsoft.ML.Transforms.Text.TextAnalytics NGramTransform Microsoft.ML.Transforms.Text.NgramCountingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.NoOperation Does nothing. Microsoft.ML.Runtime.Data.NopTransform Nop Microsoft.ML.Runtime.Data.NopTransform+NopInput Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.OptionalColumnCreator If the source column does not exist after deserialization, create a column with the right type and default values. Microsoft.ML.Transforms.OptionalColumnTransform MakeOptional Microsoft.ML.Transforms.OptionalColumnTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.PcaCalculator PCA is a dimensionality-reduction transform which computes the projection of a numeric vector onto a low-rank subspace. Microsoft.ML.Transforms.Projections.PcaTransform Calculate Microsoft.ML.Transforms.Projections.PcaTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput @@ -129,13 +129,13 @@ Transforms.RowTakeFilter Allows limiting input to a subset of rows by taking N f Transforms.ScoreColumnSelector Selects only the last score columns and the extra columns specified in the arguments. Microsoft.ML.Runtime.EntryPoints.ScoreModel SelectColumns Microsoft.ML.Runtime.EntryPoints.ScoreModel+ScoreColumnSelectorInput Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.Scorer Turn the predictor model into a transform model Microsoft.ML.Runtime.EntryPoints.ScoreModel MakeScoringTransform Microsoft.ML.Runtime.EntryPoints.ScoreModel+ModelInput Microsoft.ML.Runtime.EntryPoints.ScoreModel+Output Transforms.Segregator Un-groups vector columns into sequences of rows, inverse of Group transform Microsoft.ML.Transforms.GroupingOperations Ungroup Microsoft.ML.Transforms.UngroupTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.SentimentAnalyzer Uses a pretrained sentiment model to score input strings Microsoft.ML.Transforms.Text.TextAnalytics AnalyzeSentiment Microsoft.ML.Transforms.Text.SentimentAnalyzingTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.SentimentAnalyzer Uses a pretrained sentiment model to score input strings Microsoft.ML.Transforms.Text.TextAnalytics AnalyzeSentiment Microsoft.ML.Transforms.Text.SentimentAnalyzingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.TensorFlowScorer Transforms the data using the TensorFlow model. Microsoft.ML.Transforms.TensorFlowTransform TensorFlowScorer Microsoft.ML.Transforms.TensorFlowTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.TextFeaturizer A transform that turns a collection of text documents into numerical feature vectors. The feature vectors are normalized counts of (word and/or character) ngrams in a given tokenized text. Microsoft.ML.Transforms.Text.TextAnalytics TextTransform Microsoft.ML.Transforms.Text.TextFeaturizingEstimator+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.TextToKeyConverter Converts input values (words, numbers, etc.) to index in a dictionary. Microsoft.ML.Transforms.Categorical.Categorical TextToKey Microsoft.ML.Transforms.Categorical.TermTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.TextToKeyConverter Converts input values (words, numbers, etc.) to index in a dictionary. Microsoft.ML.Transforms.Categorical.Categorical TextToKey Microsoft.ML.Transforms.Categorical.ValueToKeyMappingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.TrainTestDatasetSplitter Split the dataset into train and test sets Microsoft.ML.Runtime.EntryPoints.TrainTestSplit Split Microsoft.ML.Runtime.EntryPoints.TrainTestSplit+Input Microsoft.ML.Runtime.EntryPoints.TrainTestSplit+Output Transforms.TreeLeafFeaturizer Trains a tree ensemble, or loads it from a file, then maps a numeric feature vector to three outputs: 1. A vector containing the individual tree outputs of the tree ensemble. 2. A vector indicating the leaves that the feature vector falls on in the tree ensemble. 3. A vector indicating the paths that the feature vector falls on in the tree ensemble. If a both a model file and a trainer are specified - will use the model file. If neither are specified, will train a default FastTree model. This can handle key labels by training a regression model towards their optionally permuted indices. Microsoft.ML.Runtime.Data.TreeFeaturize Featurizer Microsoft.ML.Runtime.Data.TreeEnsembleFeaturizerTransform+ArgumentsForEntryPoint Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.TwoHeterogeneousModelCombiner Combines a TransformModel and a PredictorModel into a single PredictorModel. Microsoft.ML.Runtime.EntryPoints.ModelOperations CombineTwoModels Microsoft.ML.Runtime.EntryPoints.ModelOperations+SimplePredictorModelInput Microsoft.ML.Runtime.EntryPoints.ModelOperations+PredictorModelOutput Transforms.VectorToImage Converts vector array into image type. Microsoft.ML.Runtime.ImageAnalytics.EntryPoints.ImageAnalytics VectorToImage Microsoft.ML.Runtime.ImageAnalytics.VectorToImageTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.WordEmbeddings Word Embeddings transform is a text featurizer which converts vectors of text tokens into sentence vectors using a pre-trained model Microsoft.ML.Transforms.Text.TextAnalytics WordEmbeddings Microsoft.ML.Transforms.Text.WordEmbeddingsTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.WordTokenizer The input to this transform is text, and the output is a vector of text containing the words (tokens) in the original text. The separator is space, but can be specified as any other character (or multiple characters) if needed. Microsoft.ML.Transforms.Text.TextAnalytics DelimitedTokenizeTransform Microsoft.ML.Transforms.Text.WordTokenizeTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.WordEmbeddings Word Embeddings transform is a text featurizer which converts vectors of text tokens into sentence vectors using a pre-trained model Microsoft.ML.Transforms.Text.TextAnalytics WordEmbeddings Microsoft.ML.Transforms.Text.WordEmbeddingsExtractingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.WordTokenizer The input to this transform is text, and the output is a vector of text containing the words (tokens) in the original text. The separator is space, but can be specified as any other character (or multiple characters) if needed. Microsoft.ML.Transforms.Text.TextAnalytics DelimitedTokenizeTransform Microsoft.ML.Transforms.Text.WordTokenizingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput diff --git a/test/BaselineOutput/Common/EntryPoints/core_manifest.json b/test/BaselineOutput/Common/EntryPoints/core_manifest.json index bfdec78010..6b5b8eb81a 100644 --- a/test/BaselineOutput/Common/EntryPoints/core_manifest.json +++ b/test/BaselineOutput/Common/EntryPoints/core_manifest.json @@ -20054,7 +20054,7 @@ { "Name": "NumTopic", "Type": "Int", - "Desc": "The number of topics in the LDA", + "Desc": "The number of topics", "Required": false, "SortOrder": 150.0, "IsNullable": true, @@ -20209,7 +20209,7 @@ { "Name": "NumTopic", "Type": "Int", - "Desc": "The number of topics in the LDA", + "Desc": "The number of topics", "Required": false, "SortOrder": 50.0, "IsNullable": false, @@ -20225,28 +20225,28 @@ } }, { - "Name": "NumMaxDocToken", + "Name": "NumThreads", "Type": "Int", - "Desc": "The threshold of maximum count of tokens per doc", + "Desc": "The number of training threads. Default value depends on number of logical processors.", "Aliases": [ - "maxNumToken" + "t" ], "Required": false, "SortOrder": 50.0, "IsNullable": false, - "Default": 512 + "Default": 0 }, { - "Name": "NumThreads", + "Name": "NumMaxDocToken", "Type": "Int", - "Desc": "The number of training threads. Default value depends on number of logical processors.", + "Desc": "The threshold of maximum count of tokens per doc", "Aliases": [ - "t" + "maxNumToken" ], "Required": false, "SortOrder": 50.0, - "IsNullable": true, - "Default": null + "IsNullable": false, + "Default": 512 }, { "Name": "AlphaSum", diff --git a/test/BaselineOutput/Common/EntryPoints/ensemble-model0-stats.txt b/test/BaselineOutput/Common/EntryPoints/ensemble-model0-stats.txt index 5c5d36e4b6..057ef0ff87 100644 --- a/test/BaselineOutput/Common/EntryPoints/ensemble-model0-stats.txt +++ b/test/BaselineOutput/Common/EntryPoints/ensemble-model0-stats.txt @@ -5,6 +5,14 @@ #@ col={name={Residual Deviance} type=R4 src=1} #@ col={name={Null Deviance} type=R4 src=2} #@ col=AIC:R4:3 +#@ col=BiasEstimate:R4:4 +#@ col=BiasStandardError:R4:5 +#@ col=BiasZScore:R4:6 +#@ col=BiasPValue:R4:7 +#@ col=Estimate:R4:8-16 +#@ col=StandardError:R4:17-25 +#@ col=ZScore:R4:26-34 +#@ col=PValue:R4:35-43 #@ } -Count of training examples Residual Deviance Null Deviance AIC -521 98.29433 669.0935 118.294327 +Count of training examples Residual Deviance Null Deviance AIC BiasEstimate BiasStandardError BiasZScore BiasPValue Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 +521 98.29433 669.0935 118.294327 -5.120674 0.699818552 -7.31714535 0 2.353567 1.78653753 1.9442488 1.38072 1.0831089 2.43588924 1.61141682 1.34575915 -0.7715381 0.4267568 0.42040658 0.41370967 0.482155383 0.456691444 0.451504 0.4605175 0.478413582 0.342069477 5.5150075 4.249547 4.69954872 2.86364126 2.37164259 5.395056 3.4991436 2.81296182 -2.255501 5.96046448E-08 2.14576721E-05 2.62260437E-06 0.00418818 0.0177091956 5.96046448E-08 0.000466823578 0.00490885973 0.0241017938 diff --git a/test/BaselineOutput/Common/EntryPoints/ensemble-model2-stats.txt b/test/BaselineOutput/Common/EntryPoints/ensemble-model2-stats.txt index 152e94f64d..dbb2224574 100644 --- a/test/BaselineOutput/Common/EntryPoints/ensemble-model2-stats.txt +++ b/test/BaselineOutput/Common/EntryPoints/ensemble-model2-stats.txt @@ -5,6 +5,14 @@ #@ col={name={Residual Deviance} type=R4 src=1} #@ col={name={Null Deviance} type=R4 src=2} #@ col=AIC:R4:3 +#@ col=BiasEstimate:R4:4 +#@ col=BiasStandardError:R4:5 +#@ col=BiasZScore:R4:6 +#@ col=BiasPValue:R4:7 +#@ col=Estimate:R4:8-16 +#@ col=StandardError:R4:17-25 +#@ col=ZScore:R4:26-34 +#@ col=PValue:R4:35-43 #@ } -Count of training examples Residual Deviance Null Deviance AIC -520 94.1969452 673.3445 114.196945 +Count of training examples Residual Deviance Null Deviance AIC BiasEstimate BiasStandardError BiasZScore BiasPValue Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 +520 94.1969452 673.3445 114.196945 -4.860323 0.712811947 -6.81852055 0 2.143086 1.49418533 1.71121442 1.38318741 0.883200347 3.16845965 1.38684654 1.51904845 -0.8226236 0.430655479 0.4099987 0.4222687 0.4832917 0.457050323 0.457937717 0.445124656 0.4728626 0.338379949 4.976335 3.64436626 4.05243 2.86201358 1.93239188 6.918975 3.11563635 3.21245217 -2.43106484 6.556511E-07 0.0002681017 5.07235527E-05 0.00420969725 0.05331099 0 0.00183564425 0.00131618977 0.0150545239 diff --git a/test/BaselineOutput/Common/EntryPoints/ensemble-summary-key-value-pairs.txt b/test/BaselineOutput/Common/EntryPoints/ensemble-summary-key-value-pairs.txt index beeec64d77..d89d7a7619 100644 --- a/test/BaselineOutput/Common/EntryPoints/ensemble-summary-key-value-pairs.txt +++ b/test/BaselineOutput/Common/EntryPoints/ensemble-summary-key-value-pairs.txt @@ -14,6 +14,16 @@ Count of training examples: 521 Residual Deviance: 98.29433 Null Deviance: 669.0935 AIC: 118.2943 +(Bias): System.Single[] +Features.thickness: System.Single[] +Features.bare_nuclei: System.Single[] +Features.uniform_shape: System.Single[] +Features.uniform_size: System.Single[] +Features.bland_chromatin: System.Single[] +Features.adhesion: System.Single[] +Features.normal_nucleoli: System.Single[] +Features.epit_size: System.Single[] +Cat.1: System.Single[] Partition model 1 summary: Per-feature gain summary for the boosted tree ensemble: Features.uniform_size: 1 @@ -43,6 +53,16 @@ Count of training examples: 520 Residual Deviance: 94.19695 Null Deviance: 673.3445 AIC: 114.1969 +(Bias): System.Single[] +Features.bare_nuclei: System.Single[] +Features.thickness: System.Single[] +Features.uniform_shape: System.Single[] +Features.uniform_size: System.Single[] +Features.normal_nucleoli: System.Single[] +Features.bland_chromatin: System.Single[] +Features.adhesion: System.Single[] +Features.epit_size: System.Single[] +Cat.1: System.Single[] Partition model 3 summary: Per-feature gain summary for the boosted tree ensemble: Features.uniform_size: 1 diff --git a/test/BaselineOutput/Common/EntryPoints/ensemble-summary.txt b/test/BaselineOutput/Common/EntryPoints/ensemble-summary.txt index 50abe9df54..fadb2e27c8 100644 --- a/test/BaselineOutput/Common/EntryPoints/ensemble-summary.txt +++ b/test/BaselineOutput/Common/EntryPoints/ensemble-summary.txt @@ -17,6 +17,21 @@ Count of training examples: 521 Residual Deviance: 98.29433 Null Deviance: 669.0935 AIC: 118.2943 + +Coefficients statistics: +Coefficient Estimate Std. Error z value Pr(>|z|) +(Bias) -5.120674 0.6998186 -7.317145 0 *** +Features.thickness 2.353567 0.4267568 5.515007 5.960464E-08 *** +Features.bare_nuclei 2.435889 0.451504 5.395056 5.960464E-08 *** +Features.uniform_shape 1.944249 0.4137097 4.699549 2.622604E-06 *** +Features.uniform_size 1.786538 0.4204066 4.249547 2.145767E-05 *** +Features.bland_chromatin 1.611417 0.4605175 3.499144 0.0004668236 *** +Features.adhesion 1.38072 0.4821554 2.863641 0.00418818 ** +Features.normal_nucleoli 1.345759 0.4784136 2.812962 0.00490886 ** +Features.epit_size 1.083109 0.4566914 2.371643 0.0177092 * +Cat.1 -0.7715381 0.3420695 -2.255501 0.02410179 * +--- +Significance codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Partition model 1 summary: Per-feature gain summary for the boosted tree ensemble: @@ -50,6 +65,21 @@ Count of training examples: 520 Residual Deviance: 94.19695 Null Deviance: 673.3445 AIC: 114.1969 + +Coefficients statistics: +Coefficient Estimate Std. Error z value Pr(>|z|) +(Bias) -4.860323 0.7128119 -6.818521 0 *** +Features.bare_nuclei 3.16846 0.4579377 6.918975 0 *** +Features.thickness 2.143086 0.4306555 4.976335 6.556511E-07 *** +Features.uniform_shape 1.711214 0.4222687 4.05243 5.072355E-05 *** +Features.uniform_size 1.494185 0.4099987 3.644366 0.0002681017 *** +Features.normal_nucleoli 1.519048 0.4728626 3.212452 0.00131619 ** +Features.bland_chromatin 1.386847 0.4451247 3.115636 0.001835644 ** +Features.adhesion 1.383187 0.4832917 2.862014 0.004209697 ** +Features.epit_size 0.8832003 0.4570503 1.932392 0.05331099 . +Cat.1 -0.8226236 0.3383799 -2.431065 0.01505452 * +--- +Significance codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Partition model 3 summary: Per-feature gain summary for the boosted tree ensemble: diff --git a/test/BaselineOutput/Common/EntryPoints/lr-stats.txt b/test/BaselineOutput/Common/EntryPoints/lr-stats.txt index 8e04238c73..c467f102be 100644 --- a/test/BaselineOutput/Common/EntryPoints/lr-stats.txt +++ b/test/BaselineOutput/Common/EntryPoints/lr-stats.txt @@ -5,6 +5,14 @@ #@ col={name={Residual Deviance} type=R4 src=1} #@ col={name={Null Deviance} type=R4 src=2} #@ col=AIC:R4:3 +#@ col=BiasEstimate:R4:4 +#@ col=BiasStandardError:R4:5 +#@ col=BiasZScore:R4:6 +#@ col=BiasPValue:R4:7 +#@ col=Estimate:R4:8-16 +#@ col=StandardError:R4:17-25 +#@ col=ZScore:R4:26-34 +#@ col=PValue:R4:35-43 #@ } -Count of training examples Residual Deviance Null Deviance AIC -683 126.83107 884.350159 146.83107 +Count of training examples Residual Deviance Null Deviance AIC BiasEstimate BiasStandardError BiasZScore BiasPValue thickness uniform_size uniform_shape adhesion epit_size bare_nuclei bland_chromatin normal_nucleoli mitoses thickness uniform_size uniform_shape adhesion epit_size bare_nuclei bland_chromatin normal_nucleoli mitoses thickness uniform_size uniform_shape adhesion epit_size bare_nuclei bland_chromatin normal_nucleoli mitoses thickness uniform_size uniform_shape adhesion epit_size bare_nuclei bland_chromatin normal_nucleoli mitoses +683 126.83107 884.350159 146.83107 -6.186806 0.459383339 -13.4676332 0 2.65800762 1.68089855 1.944068 1.42514718 0.8536965 2.9325006 1.74816787 1.58165014 0.595681 0.455618978 0.429146379 0.431570023 0.479817748 0.470442533 0.4381438 0.469593167 0.4714128 0.467883229 5.83383846 3.916842 4.504641 2.97018433 1.814667 6.69301 3.72272849 3.35512757 1.27314031 0 8.9764595E-05 6.67572E-06 0.002976358 0.06957501 0 0.00019711256 0.0007933974 0.202968419 diff --git a/test/BaselineOutput/Common/FastForestRegression/FastForestRegression-TrainTest-housing-out.txt b/test/BaselineOutput/Common/FastForestRegression/FastForestRegression-TrainTest-housing-out.txt index f27cd71298..c4e8943cb8 100644 --- a/test/BaselineOutput/Common/FastForestRegression/FastForestRegression-TrainTest-housing-out.txt +++ b/test/BaselineOutput/Common/FastForestRegression/FastForestRegression-TrainTest-housing-out.txt @@ -4,6 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 506 instances Binning and forming Feature objects +Changing data from row-wise to column-wise Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. @@ -33,7 +34,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/Common/FastForestRegression/QuantileRegressorTester-TrainTest-housing-out.txt b/test/BaselineOutput/Common/FastForestRegression/QuantileRegressorTester-TrainTest-housing-out.txt index 846e03abea..a9834d1a5a 100644 --- a/test/BaselineOutput/Common/FastForestRegression/QuantileRegressorTester-TrainTest-housing-out.txt +++ b/test/BaselineOutput/Common/FastForestRegression/QuantileRegressorTester-TrainTest-housing-out.txt @@ -4,6 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 506 instances Binning and forming Feature objects +Changing data from row-wise to column-wise Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. @@ -33,7 +34,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/Common/FastRank/FastRank-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/Common/FastRank/FastRank-TrainTest-breast-cancer-out.txt index 5e8cb6c6d9..05ab7bc5ea 100644 --- a/test/BaselineOutput/Common/FastRank/FastRank-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/Common/FastRank/FastRank-TrainTest-breast-cancer-out.txt @@ -5,6 +5,8 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects +Changing data from row-wise to column-wise +Warning: Skipped 16 instances with missing features during training Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -48,7 +50,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/Common/NormalizerEstimator/gcnNorm.tsv b/test/BaselineOutput/Common/NormalizerEstimator/gcnNorm.tsv new file mode 100644 index 0000000000..334b7b2c5e --- /dev/null +++ b/test/BaselineOutput/Common/NormalizerEstimator/gcnNorm.tsv @@ -0,0 +1,9 @@ +#@ TextLoader{ +#@ sep=tab +#@ col=gcnNorm1:R4:0-10 +#@ col=gcnNorm2:R4:11-21 +#@ } +-0.626524031 0.289601743 -0.0695612058 0.125636056 0.4509648 0.188099176 -0.0487401523 -0.04093227 -0.465160966 -0.0123033375 0.208920211 -7.12135649 1.99397969 -1.57964635 0.362541765 3.59952188 0.9840419 -1.37247956 -1.294792 -5.5158143 -1.00993776 1.19120872 +-0.137441739 -0.055349838 0.0301625486 0.259335726 -0.270841062 0.3585301 0.0643675 0.5158729 -0.0108833946 -0.09981628 -0.653936446 -2.07604337 -1.25923944 -0.408401966 1.8718425 -3.40334988 2.85881376 -0.068067 4.42435455 -0.816803932 -1.70167494 -7.21510124 +-0.1769031 -0.19703348 0.715542555 0.114987031 -0.153417677 -0.3647864 -0.257424533 -0.109801918 0.410232216 -0.0158602744 0.0344656147 -2.83750534 -3.03779984 6.04221725 0.06676483 -2.60382843 -4.70692062 -3.63868332 -2.169857 3.00441742 -1.23514938 -0.734413147 +0.160775676 0.485780418 -0.0587080531 0.169217363 -0.3752711 0.122788109 0.177659035 -0.358387738 -0.459687948 -0.223320842 0.3591552 1.17591143 4.40966749 -1.00792408 1.2599051 -4.15768671 0.7979399 1.34389877 -3.98969936 -4.997624 -2.64580059 3.14976263 diff --git a/test/BaselineOutput/Common/NormalizerEstimator/lpNorm.tsv b/test/BaselineOutput/Common/NormalizerEstimator/lpNorm.tsv new file mode 100644 index 0000000000..e96c30bce6 --- /dev/null +++ b/test/BaselineOutput/Common/NormalizerEstimator/lpNorm.tsv @@ -0,0 +1,9 @@ +#@ TextLoader{ +#@ sep=tab +#@ col=lpNorm1:R4:0-10 +#@ col=lpNorm2:R4:11-21 +#@ } +-0.686319232 0.192169383 -0.152238086 0.03493989 0.346903175 0.09483684 -0.132272437 -0.124785319 -0.5315855 -0.0973325446 0.114802495 -0.2479865 0.114628196 -0.0275332443 0.04972841 0.178497821 0.07445214 -0.019291997 -0.0162015334 -0.18411687 -0.004869824 0.08269338 +-0.20306389 -0.1231699 -0.039946992 0.183090389 -0.3328916 0.279628932 -0.0066578323 0.432759076 -0.0798939839 -0.1664458 -0.7057302 -0.05594937 -0.0225316472 0.01227848 0.105569616 -0.110253163 0.145949364 0.0262025315 0.21 -0.00443037972 -0.0406329148 -0.2662025 +-0.268398017 -0.28734377 0.571529865 0.006315247 -0.246294647 -0.445224941 -0.344181 -0.20524554 0.284186125 -0.116832078 -0.06946772 -0.0693613961 -0.07725425 0.2805549 0.0450849123 -0.0601530671 -0.143027976 -0.100932792 -0.0430519 0.1608467 -0.006218606 0.0135135166 +0.117021732 0.438831449 -0.100304335 0.125380427 -0.413755417 0.0794076 0.133739114 -0.397038 -0.497342378 -0.2632989 0.313451052 0.05448634 0.164629385 -0.0198959652 0.0573472 -0.127178147 0.04161248 0.06020806 -0.121456429 -0.155786738 -0.0756827 0.121716514 diff --git a/test/BaselineOutput/SingleDebug/Text/lpnorm_gcnorm_whitened.tsv b/test/BaselineOutput/Common/NormalizerEstimator/lpnorm_gcnorm_whitened.tsv similarity index 100% rename from test/BaselineOutput/SingleDebug/Text/lpnorm_gcnorm_whitened.tsv rename to test/BaselineOutput/Common/NormalizerEstimator/lpnorm_gcnorm_whitened.tsv diff --git a/test/BaselineOutput/SingleDebug/NormalizerEstimator/normalized.tsv b/test/BaselineOutput/Common/NormalizerEstimator/normalized.tsv similarity index 100% rename from test/BaselineOutput/SingleDebug/NormalizerEstimator/normalized.tsv rename to test/BaselineOutput/Common/NormalizerEstimator/normalized.tsv diff --git a/test/BaselineOutput/Common/NormalizerEstimator/whitened.tsv b/test/BaselineOutput/Common/NormalizerEstimator/whitened.tsv new file mode 100644 index 0000000000..c06b317bd8 --- /dev/null +++ b/test/BaselineOutput/Common/NormalizerEstimator/whitened.tsv @@ -0,0 +1,9 @@ +#@ TextLoader{ +#@ sep=tab +#@ col=whitened1:R4:0-10 +#@ col=whitened2:R4:11-15 +#@ } +-2.604605 0.829638362 -0.5992434 0.19860521 1.33247662 0.369197041 -0.5760094 -0.5490271 -1.94509208 -0.393351972 0.507488966 1.75005662 -0.546613038 2.462052 1.32538271 -0.57087183 +-0.5923902 -0.324390084 -0.114805378 0.6855182 -1.055579 0.8767955 -0.0392023772 1.21807373 -0.160801888 -0.47570774 -2.22817 0.7284955 -0.8200103 0.4638015 -1.0152092 0.3444226 +-0.9132714 -0.911281645 1.814283 0.07471426 -0.8969923 -1.44387519 -1.19571114 -0.6542767 0.887983143 -0.4604767 -0.17543222 0.0112341344 0.913079262 -0.134250313 -0.118262529 -1.16476536 +0.236966148 1.004758 -0.233154371 0.3862052 -1.02724624 0.240614042 0.299898773 -1.03102541 -1.13852251 -0.6675951 0.766793966 0.490669161 -0.489173561 -0.5981086 1.18466234 1.05758965 diff --git a/test/BaselineOutput/Common/Onnx/Cluster/BreastCancer/Kmeans.json b/test/BaselineOutput/Common/Onnx/Cluster/BreastCancer/Kmeans.json index 880cd67637..d74ebe1c3f 100644 --- a/test/BaselineOutput/Common/Onnx/Cluster/BreastCancer/Kmeans.json +++ b/test/BaselineOutput/Common/Onnx/Cluster/BreastCancer/Kmeans.json @@ -166,24 +166,24 @@ ], "dataType": "FLOAT", "floatData": [ - 0.6232001, - 0.482400715, - 0.495733529, - 0.416533619, - 0.425866365, - 0.5456011, - 0.477333277, - 0.4338674, - 0.20399937, - 0.225407124, - 0.111400835, - 0.109446481, - 0.120521255, - 0.198697388, - 0.121824168, - 0.182410166, - 0.108143583, - 0.107166387 + 0.5522167, + 0.3039403, + 0.319211155, + 0.261575729, + 0.320196062, + 0.344088882, + 0.293349, + 0.273151934, + 0.15763472, + 0.285144627, + 0.332245946, + 0.325724274, + 0.315217048, + 0.328623, + 0.3706516, + 0.41992715, + 0.307970464, + 0.164492577 ], "name": "C" }, @@ -193,8 +193,8 @@ ], "dataType": "FLOAT", "floatData": [ - 1.97708726, - 0.200497344 + 0.9740776, + 0.940771043 ], "name": "C2" }, diff --git a/test/BaselineOutput/Common/Onnx/Cluster/BreastCancer/Kmeans.onnx b/test/BaselineOutput/Common/Onnx/Cluster/BreastCancer/Kmeans.onnx deleted file mode 100644 index e1dc568fc4f9e2535c67fabcc2d2fd16f4bd0ec1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 867 zcma)4%Wl&^6lEO8ac*dm8iC5ND42kdB`hb4R#@^xbrc?ILo3`xm7Nn$zz`?Jc0|d7 z6)Qe~bv^)z4`9Q#QjtK21t2OG^b0_hSVUs-YK%89(###5d(VA~2}!7JsCTQ|IHRen zYH3x|Zm62fZ+1F+`fCARA`ovx2Z2rrBVc;+iC?g)C;Hn;|!3X zXpjs>PV~aNg9GDVmoap(UA4;+Q@u76VV;e|?UZot9(8(6YV|zpanJUt90#Bpp#Z7? z-=}_8O6*ihn7>6mPaeNY4w80z_kn$u)$w+Kkg@oBl&jb#d2969+Um|LvmF4M6PANkms*5^s}pRALg&wd+k_I1+ee=`>PUkwvglrw-h=2I*!4$Id!Ys6$tRTcpu z2J)ljGRKpvVg0O diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeCustomStopwordsRemover-Data.txt b/test/BaselineOutput/Common/SavePipe/SavePipeCustomStopwordsRemover-Data.txt new file mode 100644 index 0000000000..4653d9e1f1 --- /dev/null +++ b/test/BaselineOutput/Common/SavePipe/SavePipeCustomStopwordsRemover-Data.txt @@ -0,0 +1,6 @@ +#@ TextLoader{ +#@ sep=tab +#@ col=T:TX:0-** +#@ } +Fred McGriff free agent +erythromycin treating pneumonia diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Data.txt b/test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Data.txt new file mode 100644 index 0000000000..f3ffa79f6e --- /dev/null +++ b/test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Data.txt @@ -0,0 +1,32569 @@ +#@ TextLoader{ +#@ header+ +#@ sep=tab +#@ col=One:TX:0 +#@ col=Num:R4:1-6 +#@ col=Cat:TX:7-15 +#@ } +One age fnlwgt education-num capital-gain capital-loss hours-per-week workclass education marital-status occupation relationship ethnicity sex native-country label(IsOver50K) +39 0.433333337 0.0522096977 0.8125 0.0217402168 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +50 0.5555556 0.0561128333 0.8125 0 0 0.13131313 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.145245016 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +53 0.5888889 0.158092692 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +28 0.311111122 0.227930129 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife Black Female Cuba 0 +37 0.411111116 0.1916758 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 0 +49 0.544444442 0.10789147 0.3125 0 0 0.161616161 Private 9th Married-spouse-absent Other-service Not-in-family Black Female Jamaica 0 +52 0.5777778 0.141201124 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.0308350828 0.875 0.14084141 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 +42 0.466666669 0.1073944 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.188902169 0.625 0 0 0.8080808 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +30 0.333333343 0.0951684043 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +23 0.25555557 0.08235441 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +32 0.355555564 0.138087362 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Sales Not-in-family Black Male United-States 0 +40 0.444444448 0.0820176452 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male ? 1 +34 0.377777785 0.165343955 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male Mexico 0 +25 0.2777778 0.119051263 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +32 0.355555564 0.125832409 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 +38 0.422222227 0.01945639 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 +43 0.477777779 0.196789935 0.875 0 0 0.454545468 Self-emp-not-inc Masters Divorced Exec-managerial Unmarried White Female United-States 1 +40 0.444444448 0.130345091 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +54 0.6 0.203505754 0.5625 0 0 0.2020202 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 +35 0.3888889 0.0517577566 0.3125 0 0 0.4040404 Federal-gov 9th Married-civ-spouse Farming-fishing Husband Black Male United-States 0 +43 0.477777779 0.078828454 0.4375 0 0.4687787 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.07342536 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 +56 0.622222245 0.146056622 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +19 0.211111113 0.113351814 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +54 0.6 0.121378325 0.625 0 0 0.6060606 ? Some-college Married-civ-spouse ? Husband Asian-Pac-Islander Male South 1 +39 0.433333337 0.247362271 0.5625 0 0 0.8080808 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +49 0.544444442 0.130238667 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.128449082 0.75 0 0 0.5252525 Local-gov Assoc-acdm Never-married Protective-serv Not-in-family White Male United-States 0 +20 0.222222224 0.179170281 0.625 0 0 0.444444448 Private Some-college Never-married Sales Own-child Black Male United-States 0 +45 0.5 0.260617435 0.8125 0 0.323232323 0.4040404 Private Bachelors Divorced Exec-managerial Own-child White Male United-States 0 +30 0.333333343 0.040379066 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Own-child White Male United-States 0 +22 0.244444445 0.209814072 0.625 0 0 0.151515156 State-gov Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 +48 0.533333361 0.1632688 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Unmarried White Male Puerto-Rico 0 +21 0.233333334 0.132821 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +19 0.211111113 0.366464049 0.5625 0 0 0.25252524 Private HS-grad Married-AF-spouse Adm-clerical Wife White Female United-States 0 +31 0.344444454 0.05668062 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Sales Husband White Male ? 1 +48 0.533333361 0.178807914 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +31 0.344444454 0.342071325 0.3125 0 0 0.434343427 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +53 0.5888889 0.059611842 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +24 0.266666681 0.116512708 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +49 0.544444442 0.06374196 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +25 0.2777778 0.195311531 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +57 0.6333333 0.22758393 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +53 0.5888889 0.09723211 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +44 0.4888889 0.086450845 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Unmarried White Female United-States 0 +41 0.455555558 0.06843312 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.182841718 0.6875 0 0 0.434343427 Private Assoc-voc Never-married Prof-specialty Not-in-family White Male United-States 0 +25 0.2777778 0.0217383262 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife Other Female United-States 0 +18 0.2 0.1528627 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female ? 0 +47 0.5222222 0.03491266 0.9375 0 0.43663913 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female Honduras 1 +50 0.5555556 0.169451177 0.8125 0 0 0.5555556 Federal-gov Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +47 0.5222222 0.07397564 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +43 0.477777779 0.1602965 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +46 0.51111114 0.145932019 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +35 0.3888889 0.0379550159 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male Puerto-Rico 0 +41 0.455555558 0.09926012 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +30 0.333333343 0.126722813 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +30 0.333333343 0.04007261 0.8125 0.02407024 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.197976038 0.25 0 0 0.4040404 ? 7th-8th Married-spouse-absent ? Not-in-family White Male ? 0 +48 0.533333361 0.1007877 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.07855567 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.0711239 0.625 0 0 0.5858586 Private Some-college Divorced Tech-support Not-in-family White Male United-States 0 +36 0.4 0.104759537 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.123374678 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +53 0.5888889 0.114397138 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +49 0.544444442 0.129103765 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.135165572 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +19 0.211111113 0.06836981 0.625 0 0 0.323232323 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +31 0.344444454 0.208778173 0.8125 0 0 0.4040404 Private Bachelors Separated Sales Own-child Black Female United-States 0 +29 0.322222233 0.1093133 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.142572433 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +79 0.8777778 0.0840193853 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Prof-specialty Other-relative White Male United-States 0 +27 0.3 0.144083172 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male Mexico 0 +40 0.444444448 0.02169724 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 +67 0.7444445 0.143300518 0.375 0 0 0.02020202 ? 10th Married-civ-spouse ? Husband White Male United-States 0 +18 0.2 0.208549172 0.4375 0 0 0.222222224 Private 11th Never-married Other-service Own-child White Female United-States 0 +31 0.344444454 0.08481618 0.25 0 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +18 0.2 0.300961465 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +52 0.5777778 0.186242387 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male Cuba 0 +46 0.51111114 0.0347665027 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +59 0.655555546 0.107723087 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.231420383 0.5625 0.143441439 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 1 +53 0.5888889 0.233213335 0.5625 0 0 0.353535354 Private HS-grad Divorced Sales Own-child White Female United-States 0 +49 0.544444442 0.180664852 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +33 0.366666675 0.136088312 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +30 0.333333343 0.03659582 0.3125 0 0 0.4040404 Private 9th Never-married Sales Not-in-family White Male United-States 0 +43 0.477777779 0.2767331 1 0 0 0.5050505 Federal-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 +57 0.6333333 0.168368131 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.193122551 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Female United-States 0 +28 0.311111122 0.143168509 0.625 0 0 0.25252524 Private Some-college Divorced Machine-op-inspct Unmarried Black Female United-States 0 +30 0.333333343 0.07930666 0.5625 0 0.3611111 0.353535354 Private HS-grad Married-civ-spouse Sales Wife Asian-Pac-Islander Female ? 0 +34 0.377777785 0.152418166 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +29 0.322222233 0.07785048 0.625 0 0 0.5050505 Local-gov Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +48 0.533333361 0.128831655 1 0 0.43663913 0.6060606 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.136514 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +48 0.533333361 0.115238383 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Unmarried White Female England 0 +32 0.355555564 0.167985559 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Other-service Own-child Black Male United-States 0 +76 0.844444454 0.08364692 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.133549765 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.100434765 0.875 0 0 0.5050505 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +20 0.222222224 0.12682654 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +29 0.322222233 0.06966502 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.21395497 0.5625 0.07688077 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +17 0.188888893 0.205342487 0.375 0.3409534 0 0.323232323 ? 10th Never-married ? Own-child White Female United-States 0 +30 0.333333343 0.131272539 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +31 0.344444454 0.1274765 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.08398436 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +24 0.266666681 0.291220158 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Other-relative White Male United-States 0 +38 0.422222227 0.0439979658 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +56 0.622222245 0.226041541 0.5625 0 0.4331956 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male Canada 1 +28 0.311111122 0.2545078 0.625 0.0406404063 0 0.25252524 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 +36 0.4 0.06928245 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +53 0.5888889 0.06442155 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +56 0.622222245 0.204141572 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +49 0.544444442 0.13293618 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 1 +55 0.6111111 0.166734815 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.06912619 0.5625 0 0 0.414141417 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.134649649 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +40 0.444444448 0.08005159 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.05195847 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child Black Male Germany 0 +29 0.322222233 0.180499837 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.203142047 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child Black Male United-States 0 +47 0.5222222 0.193862081 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +20 0.222222224 0.07523178 0.625 0 0.3946281 0.282828271 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +31 0.344444454 0.0774140358 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 +35 0.3888889 0.08709138 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +39 0.433333337 0.246337831 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.0468921438 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Sales Not-in-family White Female United-States 0 +24 0.266666681 0.0291795339 0.5625 0 0.404499531 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +38 0.422222227 0.0814875662 0.5625 0.04386044 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.171213821 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.09846737 0.75 0 0 0.363636374 Private Assoc-acdm Divorced Tech-support Not-in-family Black Female United-States 0 +38 0.422222227 0.08482022 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male Iran 1 +43 0.477777779 0.0383375846 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.109871663 0.6875 0 0 0.353535354 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 +20 0.222222224 0.0231089685 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 +49 0.544444442 0.05521164 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 1 +61 0.677777767 0.0448668264 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.15678671 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +19 0.211111113 0.213421524 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male Mexico 0 +45 0.5 0.1324061 0.6875 0 0.359045 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 1 +70 0.7777778 0.07097437 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Other-relative White Male United-States 0 +31 0.344444454 0.125152141 0.5625 0 0 0.3030303 Private HS-grad Never-married Transport-moving Unmarried Black Female United-States 0 +22 0.244444445 0.118120439 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +36 0.4 0.07293907 0.5625 0 0 0.24242425 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +64 0.7111111 0.122066 0.4375 0 0.500229537 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.117640883 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Female United-States 0 +47 0.5222222 0.12528348 0.625 0 0 0.3838384 Local-gov Some-college Divorced Adm-clerical Unmarried White Female Mexico 0 +34 0.377777785 0.133483082 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +33 0.366666675 0.109788142 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Other-relative Asian-Pac-Islander Female Philippines 0 +21 0.233333334 0.199472621 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +52 0.5777778 0.1703389 0.5625 0 0 0.454545468 ? HS-grad Divorced ? Not-in-family White Male United-States 1 +48 0.533333361 0.126432523 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.144501433 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family White Male United-States 0 +71 0.788888931 0.332876235 0.625 0 0.416896224 0.02020202 Self-emp-not-inc Some-college Separated Sales Unmarried Black Male United-States 0 +29 0.322222233 0.129005432 0.5625 0 0 0.6060606 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +42 0.466666669 0.153873 0.8125 0 0 0.5050505 Private Bachelors Separated Other-service Other-relative Black Male United-States 0 +68 0.75555557 0.02580782 0.125 0 0 0.2020202 ? 1st-4th Divorced ? Not-in-family White Female United-States 0 +25 0.2777778 0.170237184 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +44 0.4888889 0.05278759 0.875 0 0 0.4040404 Self-emp-inc Masters Divorced Exec-managerial Unmarried Asian-Pac-Islander Female United-States 0 +28 0.311111122 0.0595532469 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family Asian-Pac-Islander Female England 0 +45 0.5 0.135434315 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.13952738 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female Mexico 0 +39 0.433333337 0.158607274 0.75 0 0 0.424242437 Federal-gov Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 0 +46 0.51111114 0.0691235 0.875 0 0 0.4040404 State-gov Masters Widowed Protective-serv Unmarried White Male United-States 0 +18 0.2 0.01739605 0.4375 0 0 0.161616161 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +66 0.733333349 0.0369272 0.6875 0 0 0.2020202 Local-gov Assoc-voc Widowed Prof-specialty Not-in-family White Female United-States 0 +27 0.3 0.08416016 0.5625 0 0.454545438 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.118087433 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +51 0.566666663 0.06470107 0.625 0 0.453856736 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.288292974 0.8125 0 0 0.5050505 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.100776926 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.170952484 0.5625 0 0 0.25252524 Private HS-grad Married-spouse-absent Sales Unmarried White Female United-States 0 +21 0.233333334 0.210786656 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +34 0.377777785 0.3258405 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +18 0.2 0.123883195 0.5625 0 0 0.121212125 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +33 0.366666675 0.0251053236 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +44 0.4888889 0.122141436 0.625 0 0 0.3838384 Local-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +43 0.477777779 0.07717358 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.4268471 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 +40 0.444444448 0.192880064 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 1 +37 0.411111116 0.0195688717 0.625 0 0 0.424242437 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +34 0.377777785 0.2047747 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +41 0.455555558 0.09640232 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +53 0.5888889 0.0909978747 0.8125 0 0 0.5050505 ? Bachelors Divorced ? Not-in-family White Female United-States 0 +31 0.344444454 0.0673049539 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 +58 0.644444466 0.07379715 1 0 0 0.01010101 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.104547366 0.625 0 0 0.282828271 Private Some-college Divorced Machine-op-inspct Not-in-family Black Female United-States 0 +24 0.266666681 0.10747388 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +41 0.455555558 0.352871448 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Craft-repair Husband Black Male United-States 0 +47 0.5222222 0.08145659 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +41 0.455555558 0.08807137 0.8125 0 0 0.24242425 Federal-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +23 0.25555557 0.132946953 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Other-relative White Male Mexico 0 +36 0.4 0.066931814 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +40 0.444444448 0.038253393 0.875 0.14084141 0 0.5555556 Federal-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 1 +35 0.3888889 0.0936159045 0.875 0.07298073 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Other-relative White Male United-States 1 +24 0.266666681 0.0221734289 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Sales Not-in-family White Male United-States 0 +26 0.2888889 0.2676067 0.875 0 0.430670351 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +19 0.211111113 0.114940681 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male Italy 0 +51 0.566666663 0.174662977 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.171628043 0.625 0 0.307621658 0.4040404 Local-gov Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.0324717723 0.5625 0 0 0.353535354 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +18 0.2 0.094405286 0.4375 0 0 0.4040404 Private 11th Never-married Sales Own-child White Female United-States 0 +36 0.4 0.08672228 0.8125 0.07298073 0 0.363636374 Private Bachelors Married-civ-spouse Other-service Husband Black Male United-States 1 +35 0.3888889 0.0244290959 0.5625 0 0 0.6060606 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +58 0.644444466 0.141821444 0.5625 0.1502415 0 0.353535354 Self-emp-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 1 +17 0.188888893 0.0440276042 0.4375 0 0 0.121212125 Private 11th Never-married Sales Own-child White Female United-States 0 +44 0.4888889 0.108400658 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +37 0.411111116 0.1403363 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.103582866 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family Amer-Indian-Eskimo Female United-States 0 +60 0.6666667 0.05779936 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 0 +54 0.6 0.08447267 0.25 0 0 0.4040404 Self-emp-inc 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +37 0.411111116 0.428309321 0.8125 0 0 0.6060606 Private Bachelors Never-married Exec-managerial Not-in-family Black Male United-States 1 +50 0.5555556 0.2110325 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Sales Not-in-family White Female United-States 0 +38 0.422222227 0.122993462 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male Poland 0 +45 0.5 0.07370757 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +25 0.2777778 0.171753988 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 +31 0.344444454 0.13326554 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +64 0.7111111 0.126392782 0.125 0 0 0.4040404 ? 1st-4th Divorced ? Not-in-family White Male United-States 0 +90 1 0.03485137 0.5625 0 0.5064279 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 +54 0.6 0.119000748 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +53 0.5888889 0.0945366248 0.0625 0 0 0.353535354 Local-gov Preschool Never-married Machine-op-inspct Not-in-family White Female United-States 0 +18 0.2 0.1638797 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +60 0.6666667 0.0163096376 0.375 0 0 0.1010101 ? 10th Divorced ? Not-in-family Amer-Indian-Eskimo Female United-States 0 +66 0.733333349 0.112942979 0.5625 0.01409014 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +75 0.8333334 0.2116306 0.6875 0 0 0.2020202 Private Assoc-voc Widowed Adm-clerical Not-in-family White Female Columbia 0 +65 0.722222269 0.119078204 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.362754226 0.4375 0.0367403664 0 0.4040404 Private 11th Separated Transport-moving Not-in-family Black Male United-States 0 +41 0.455555558 0.08783428 0.5625 0 0 0.3838384 Private HS-grad Divorced Sales Unmarried Black Female United-States 0 +25 0.2777778 0.107585013 0.625 0 0 0.424242437 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +33 0.366666675 0.07474751 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Other-relative Other Female United-States 0 +28 0.311111122 0.0516695231 0.9375 0 0 0.5555556 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 +59 0.655555546 0.180978715 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +40 0.444444448 0.11485447 0.625 0 0 0.3838384 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +41 0.455555558 0.121329159 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Iran 1 +38 0.422222227 0.07750765 0.875 0 0 0.7070707 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.07776494 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +40 0.444444448 0.234315917 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.13201344 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +24 0.266666681 0.184484467 0.75 0 0 0.5050505 State-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 +20 0.222222224 0.08025567 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 +38 0.422222227 0.120891355 0.625 0 0.3996786 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +56 0.622222245 0.137118146 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male ? 0 +58 0.644444466 0.159355566 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +32 0.355555564 0.12387377 0.5625 0 0 0.343434334 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +40 0.444444448 0.139810935 0.75 0 0.453856736 0.6060606 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +45 0.5 0.103145748 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male ? 0 +41 0.455555558 0.0759497657 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 +42 0.466666669 0.2632045 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +59 0.655555546 0.115395315 0.375 0 0 0.3030303 Local-gov 10th Widowed Other-service Unmarried Black Female United-States 0 +19 0.211111113 0.018442722 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 +58 0.644444466 0.174454868 0.625 0 0 0.2020202 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +42 0.466666669 0.204110578 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male Cambodia 1 +20 0.222222224 0.07933495 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +32 0.355555564 0.116237909 0.5625 0 0 0.3030303 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +45 0.5 0.126399517 0.6875 0 0 0.454545468 Private Assoc-voc Widowed Exec-managerial Not-in-family White Female United-States 0 +50 0.5555556 0.137749925 0.25 0 0 0.4040404 Private 7th-8th Divorced Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.101058461 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Own-child White Female United-States 0 +45 0.5 0.0660683438 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +17 0.188888893 0.16563426 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Own-child White Male United-States 0 +59 0.655555546 0.09834479 0.625 0.0406404063 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.254812926 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.173297063 0.625 0 0 0.75757575 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Thailand 1 +19 0.211111113 0.147474423 0.625 0 0 0.24242425 ? Some-college Never-married ? Own-child White Male Canada 0 +64 0.7111111 0.014261419 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.124927178 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.149662733 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 1 +61 0.677777767 0.0470578335 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.128820211 0.3125 0.010550105 0 0.24242425 Private 9th Never-married Other-service Own-child White Male United-States 0 +50 0.5555556 0.0206458531 0.875 0.02407024 0 0.989899 Self-emp-not-inc Masters Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.140842125 0.875 0 0 0.353535354 Local-gov Masters Never-married Prof-specialty Own-child White Male United-States 0 +30 0.333333343 0.0474013351 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Own-child White Female United-States 0 +43 0.477777779 0.321938038 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +44 0.4888889 0.115123212 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.128088742 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +25 0.2777778 0.130522221 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +24 0.266666681 0.188234031 0.625 0.07298073 0 0.4848485 Private Some-college Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 +22 0.244444445 0.0235184766 0.8125 0 0 0.151515156 Private Bachelors Never-married Prof-specialty Not-in-family White Female Germany 0 +42 0.466666669 0.06579623 0.625 0.05178052 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.1181467 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Sales Unmarried Black Female United-States 0 +60 0.6666667 0.117168061 0.8125 0 0 0.424242437 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +21 0.233333334 0.138585776 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +57 0.6333333 0.2863606 0.875 0.1502415 0 0.4040404 Federal-gov Masters Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.148535237 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.118952252 0.625 0 0 0.454545468 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +25 0.2777778 0.250546068 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +50 0.5555556 0.130587563 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Ecuador 0 +36 0.4 0.134943977 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +31 0.344444454 0.08593963 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 +29 0.322222233 0.148459792 0.8125 0 0 0.565656543 Local-gov Bachelors Never-married Protective-serv Not-in-family White Male United-States 0 +21 0.233333334 0.156213522 0.625 0 0 0.454545468 Private Some-college Never-married Sales Own-child White Male United-States 0 +27 0.3 0.167307317 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Unmarried Black Female United-States 0 +65 0.722222269 0.074826315 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.0386770442 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Divorced Sales Not-in-family White Female United-States 0 +39 0.433333337 0.106043287 0.875 0.0346403457 0 0.4040404 ? Masters Married-civ-spouse ? Wife Asian-Pac-Islander Female ? 0 +24 0.266666681 0.187330142 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +38 0.422222227 0.114143215 0.5625 0 0 0.8080808 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +48 0.533333361 0.09851654 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +21 0.233333334 0.103534371 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Female United-States 0 +31 0.344444454 0.1464668 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +55 0.6111111 0.160730928 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.204280317 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female Laos 0 +43 0.477777779 0.116737671 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.130628645 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Tech-support Not-in-family White Male United-States 0 +46 0.51111114 0.05595859 0.75 0 0 0.333333343 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 +35 0.3888889 0.130541086 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 +41 0.455555558 0.0235649515 0.625 0 0 0.545454562 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +26 0.2888889 0.0399446376 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +34 0.377777785 0.0962460563 0.875 0.07298073 0 0.353535354 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Taiwan 1 +19 0.211111113 0.579474032 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child Black Female United-States 0 +36 0.4 0.1384834 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family Black Female United-States 1 +22 0.244444445 0.134503484 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Male United-States 0 +24 0.266666681 0.129287645 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +77 0.8555556 0.0934286639 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.268798858 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Other-relative White Female Mexico 0 +29 0.322222233 0.2850115 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +62 0.6888889 0.107658423 0.5625 0 0 0.24242425 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +39 0.433333337 0.117402449 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.0339165032 0.625 0 0.3409091 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.1253515 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +29 0.322222233 0.134963512 0.4375 0 0 0.4040404 Private 11th Never-married Exec-managerial Not-in-family White Female United-States 0 +76 0.844444454 0.11740312 0.875 0 0 0.1010101 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 0 +63 0.7 0.0527936555 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +23 0.25555557 0.142520577 0.6875 0 0 0.151515156 ? Assoc-voc Never-married ? Own-child Black Female United-States 0 +43 0.477777779 0.126441285 0.625 0 0.4331956 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +58 0.644444466 0.21631974 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +66 0.733333349 0.08615921 0.5625 0.0205002055 0 0.5555556 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +41 0.455555558 0.139128655 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 +26 0.2888889 0.151250929 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +47 0.5222222 0.12035118 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 +55 0.6111111 0.06637345 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +53 0.5888889 0.163403511 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +17 0.188888893 0.182488784 0.1875 0 0 0.4848485 Private 5th-6th Never-married Other-service Other-relative White Male Mexico 0 +30 0.333333343 0.06347052 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +49 0.544444442 0.0479522869 0.875 0 0 0.6060606 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +19 0.211111113 0.0701230243 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Unmarried Black Male Haiti 0 +45 0.5 0.175921813 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +26 0.2888889 0.06394267 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 +38 0.422222227 0.199688151 0.6875 0.07298073 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.08033381 0.5625 0.07298073 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +33 0.366666675 0.0572793931 0.5625 0 0 0.2020202 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +22 0.244444445 0.197590768 0.625 0 0 0.4040404 State-gov Some-college Never-married Protective-serv Own-child Black Female United-States 0 +43 0.477777779 0.162924618 0.8125 0 0 0.424242437 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 +67 0.7444445 0.024338169 0.4375 0 0 0.08080808 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +30 0.333333343 0.10236983 0.6875 0 0 0.4040404 ? Assoc-voc Divorced ? Unmarried White Female United-States 0 +56 0.622222245 0.06811319 0.75 0 0 0.25252524 Private Assoc-acdm Married-spouse-absent Other-service Not-in-family White Male Iran 0 +31 0.344444454 0.1053839 0.8125 0 0 0.25252524 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +33 0.366666675 0.07945215 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.129495084 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +33 0.366666675 0.07500682 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.222099349 0.4375 0 0 0.3030303 Local-gov 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.2505683 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +38 0.422222227 0.06427674 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +65 0.722222269 0.108708464 0.4375 0 0 0.4040404 Private 11th Widowed Other-service Unmarried Other Male United-States 0 +40 0.444444448 0.06474619 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +42 0.466666669 0.0754015148 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +26 0.2888889 0.07888772 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male Portugal 0 +36 0.4 0.234404817 0.375 0 0 0.24242425 Private 10th Married-civ-spouse Other-service Wife White Female United-States 0 +62 0.6888889 0.181916282 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.121646389 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +43 0.477777779 0.117582284 0.8125 0 0.359045 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +22 0.244444445 0.276444823 0.5625 0 0 0.5555556 Private HS-grad Married-spouse-absent Sales Not-in-family White Male United-States 0 +28 0.311111122 0.06214164 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +56 0.622222245 0.123311371 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.244216189 0.75 0 0 0.151515156 Private Assoc-acdm Never-married Sales Not-in-family White Female United-States 0 +57 0.6333333 0.143091053 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 +39 0.433333337 0.3240105 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +26 0.2888889 0.125199959 0.625 0 0 0.151515156 Federal-gov Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +17 0.188888893 0.06049754 0.4375 0 0 0.1010101 Private 11th Never-married Other-service Own-child White Male United-States 0 +40 0.444444448 0.123942472 0.6875 0 0 0.3838384 State-gov Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +45 0.5 0.172861949 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +44 0.4888889 0.107983068 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 +20 0.222222224 0.2363062 0.625 0 0 0.1010101 Local-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +33 0.366666675 0.18010582 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 0 +23 0.25555557 0.0240000542 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +46 0.51111114 0.05449837 0.875 0 0 0.3030303 Self-emp-not-inc Masters Divorced Exec-managerial Not-in-family White Male United-States 0 +38 0.422222227 0.1164723 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +54 0.6 0.117409855 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +46 0.51111114 0.144779608 0.1875 0 0.5369605 0.454545468 Private 5th-6th Divorced Craft-repair Not-in-family White Female United-States 0 +25 0.2777778 0.232363343 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.07321253 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +36 0.4 0.0790136755 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Wife White Female United-States 0 +23 0.25555557 0.266786337 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +29 0.322222233 0.090356 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family White Male United-States 0 +44 0.4888889 0.109131448 0.625 0 0.5544077 0.0606060624 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +19 0.211111113 0.017127309 0.625 0 0 0.161616161 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +19 0.211111113 0.156524032 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Female United-States 0 +35 0.3888889 0.148243591 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 +27 0.3 0.20293729 0.8125 0 0 0.5050505 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +46 0.51111114 0.187206224 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Separated Craft-repair Not-in-family White Male United-States 0 +34 0.377777785 0.06607441 0.8125 0.07688077 0 0.454545468 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 +34 0.377777785 0.132123217 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +44 0.4888889 0.07783499 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +45 0.5 0.06531601 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Unmarried White Female United-States 0 +20 0.222222224 0.092476286 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Other-relative White Female United-States 0 +25 0.2777778 0.058511287 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.08902644 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.280259728 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +28 0.311111122 0.0731283352 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +50 0.5555556 0.194215685 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +34 0.377777785 0.153356388 0.6875 0 0 0.646464646 Private Assoc-voc Divorced Tech-support Not-in-family White Female United-States 0 +28 0.311111122 0.112130694 0.25 0 0.500229537 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband Other Male Puerto-Rico 0 +41 0.455555558 0.299980134 0.875 0 0.453856736 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.07418646 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +46 0.51111114 0.213680834 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.08294375 0.625 0 0.4331956 0.4040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 +32 0.355555564 0.24560906 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.0285214912 0.625 0 0 0.24242425 Local-gov Some-college Divorced Other-service Not-in-family Black Female United-States 0 +24 0.266666681 0.162962347 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried Black Female United-States 0 +33 0.366666675 0.07981384 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +46 0.51111114 0.12688446 1 0.1502415 0 0.6060606 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.695910633 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.06226153 0.5 0 0 0.5050505 Private 12th Divorced Craft-repair Not-in-family White Male United-States 1 +52 0.5777778 0.128484786 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +30 0.333333343 0.286937147 0.4375 0 0 0.1919192 Private 11th Never-married Other-service Own-child White Female United-States 0 +34 0.377777785 0.164252833 0.4375 0 0 0.4040404 Local-gov 11th Separated Machine-op-inspct Not-in-family Black Male United-States 0 +34 0.377777785 0.161838889 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Transport-moving Unmarried White Female United-States 0 +20 0.222222224 0.04160894 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +17 0.188888893 0.1178847 0.4375 0.0217602178 0 0.181818187 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +32 0.355555564 0.0619671941 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +29 0.322222233 0.126894563 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +33 0.366666675 0.153921485 0.375 0 0 0.353535354 Private 10th Never-married Craft-repair Unmarried White Female United-States 0 +25 0.2777778 0.089831315 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.171879932 0.875 0 0.323232323 0.4040404 Federal-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +23 0.25555557 0.137840852 0.5625 0 0 0.727272749 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male Dominican-Republic 0 +63 0.7 0.149719313 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.1936277 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +80 0.8888889 0.0725814253 0.5625 0 0 0.24242425 ? HS-grad Widowed ? Not-in-family White Male United-States 0 +17 0.188888893 0.136404872 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child White Male United-States 0 +40 0.444444448 0.137479171 0.8125 0.0217402168 0 0.4040404 Self-emp-not-inc Bachelors Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.01997838 0.75 0 0 0.25252524 Private Assoc-acdm Married-civ-spouse Other-service Wife White Female United-States 1 +27 0.3 0.07837112 0.625 0 0.454545438 0.4040404 Private Some-college Never-married Craft-repair Own-child Asian-Pac-Islander Male Philippines 0 +33 0.366666675 0.140367955 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.191851586 0.5625 0.005940059 0 0.6060606 Local-gov HS-grad Never-married Farming-fishing Not-in-family Black Male United-States 0 +34 0.377777785 0.07881566 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family White Female United-States 0 +23 0.25555557 0.0547455549 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +42 0.466666669 0.2291014 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +29 0.322222233 0.244779274 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +45 0.5 0.03088627 0.5625 0 0 0.282828271 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.128694251 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Armed-Forces Own-child White Male United-States 0 +44 0.4888889 0.07855567 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.273357332 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Other-relative White Male Mexico 0 +20 0.222222224 0.200866163 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +44 0.4888889 0.19567591 0.5625 0 0 0.4040404 Private HS-grad Widowed Exec-managerial Unmarried Black Female United-States 0 +51 0.566666663 0.0383342169 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 +20 0.222222224 0.0986984 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +17 0.188888893 0.174359217 0.4375 0 0 0.05050505 ? 11th Never-married ? Own-child White Female United-States 0 +19 0.211111113 0.139016852 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Female United-States 0 +45 0.5 0.132909909 0.625 0 0 0.5555556 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +60 0.6666667 0.1650577 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.133078963 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband Black Male ? 1 +44 0.4888889 0.158203155 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 1 +40 0.444444448 0.04909191 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male United-States 1 +30 0.333333343 0.121488109 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +38 0.422222227 0.236611992 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 +23 0.25555557 0.0363789462 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.07795825 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +44 0.4888889 0.07855567 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Farming-fishing Own-child White Male United-States 0 +54 0.6 0.1945336 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +32 0.355555564 0.08931135 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +50 0.5555556 0.130244061 0.125 0 0 0.4040404 Private 1st-4th Married-spouse-absent Craft-repair Unmarried White Male United-States 0 +24 0.266666681 0.114548013 0.8125 0 0 0.2020202 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +37 0.411111116 0.0853422061 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +52 0.5777778 0.02397648 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Unmarried White Male United-States 0 +38 0.422222227 0.0228887219 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +49 0.544444442 0.129841283 0.875 0 0.453856736 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.0798481852 0.8125 0 0 0.161616161 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 +60 0.6666667 0.136030391 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Unmarried White Male United-States 1 +22 0.244444445 0.09421603 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +35 0.3888889 0.1919708 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.204747751 0.5625 0 0 0.6060606 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +67 0.7444445 0.0332732759 0.6875 0 0 0.24242425 Private Assoc-voc Divorced Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.188048139 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Female United-States 0 +17 0.188888893 0.142701745 0.3125 0 0 0.0606060624 Private 9th Never-married Other-service Not-in-family White Male United-States 0 +22 0.244444445 0.189554155 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +27 0.3 0.108543448 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Male United-States 0 +23 0.25555557 0.133295164 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +33 0.366666675 0.07526478 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male Portugal 0 +43 0.477777779 0.114986479 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.04721477 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +41 0.455555558 0.130413786 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Unmarried White Female United-States 0 +52 0.5777778 0.183032319 0.5 0.005940059 0 0.4040404 ? 12th Never-married ? Other-relative Black Male United-States 0 +25 0.2777778 0.12782 0.625 0 0 0.2020202 Private Some-college Married-spouse-absent Adm-clerical Own-child Black Female United-States 0 +63 0.7 0.270445 0.125 0 0 0.353535354 ? 1st-4th Married-civ-spouse ? Husband White Male United-States 0 +59 0.655555546 0.193282172 0.5625 0 0 0.454545468 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +45 0.5 0.110747255 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +38 0.422222227 0.0613179058 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.234345555 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.250132531 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +35 0.3888889 0.0217012819 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Female United-States 0 +34 0.377777785 0.12612 0.5625 0 0 0.25252524 Private HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 +33 0.366666675 0.11996121 0.8125 0 0 0.2020202 Private Bachelors Never-married Craft-repair Own-child White Male United-States 0 +41 0.455555558 0.231103823 0.5625 0 0 0.363636374 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +20 0.222222224 0.176970512 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +23 0.25555557 0.271506459 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Own-child White Male El-Salvador 0 +26 0.2888889 0.043303553 0.625 0 0 0.353535354 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +72 0.8 0.204476982 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +23 0.25555557 0.218871772 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Farming-fishing Not-in-family White Male Poland 0 +62 0.6888889 0.07682335 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +52 0.5777778 0.0329526737 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +58 0.644444466 0.121896274 0.625 0 0 0.424242437 Private Some-college Divorced Other-service Unmarried White Female France 0 +25 0.2777778 0.121946111 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +24 0.266666681 0.261394024 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family Black Male United-States 0 +19 0.211111113 0.168120265 0.625 0 0 0.08080808 Private Some-college Never-married Protective-serv Own-child White Male United-States 0 +43 0.477777779 0.0755241 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.365838349 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Adm-clerical Unmarried Black Female United-States 0 +39 0.433333337 0.0619624779 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +49 0.544444442 0.09560418 0.6875 0 0.3168044 0.424242437 Private Assoc-voc Married-spouse-absent Handlers-cleaners Unmarried White Male United-States 0 +53 0.5888889 0.169598684 0.1875 0 0 0.3030303 ? 5th-6th Widowed ? Unmarried Black Female United-States 0 +32 0.355555564 0.0249679238 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +34 0.377777785 0.227376491 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.127531067 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +57 0.6333333 0.149670139 0.6875 0 0 0.3838384 ? Assoc-voc Widowed ? Unmarried White Female United-States 0 +25 0.2777778 0.179863349 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family Amer-Indian-Eskimo Female United-States 0 +20 0.222222224 0.144564077 0.625 0 0 0.24242425 ? Some-college Never-married ? Own-child White Male United-States 0 +21 0.233333334 0.13755326 0.625 0 0 0.353535354 ? Some-college Never-married ? Unmarried White Female United-States 0 +34 0.377777785 0.07281985 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.06677825 0.8125 0.1502415 0 0.8080808 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.132169023 0.5625 0.07688077 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.167268246 0.625 0 0 0.5050505 Local-gov Some-college Divorced Handlers-cleaners Not-in-family Black Male United-States 0 +37 0.411111116 0.125300989 0.625 0 0 0.454545468 Local-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +44 0.4888889 0.119825155 0.625 0 0 0.5858586 Private Some-college Divorced Machine-op-inspct Unmarried White Male United-States 1 +28 0.311111122 0.0577973425 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 +42 0.466666669 0.148966968 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +74 0.822222233 0.06680317 0.625 0 0 0.09090909 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.128232211 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.136520058 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +44 0.4888889 0.07364359 0.4375 0 0 0.464646459 Private 11th Divorced Machine-op-inspct Unmarried Other Female Puerto-Rico 0 +26 0.2888889 0.07318491 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +36 0.4 0.13282235 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +41 0.455555558 0.0685247257 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 +67 0.7444445 0.155962974 0.9375 0.200512 0 0.4848485 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.139996171 0.5 0 0 0.5050505 Local-gov 12th Married-civ-spouse Tech-support Husband White Male United-States 0 +57 0.6333333 0.128606021 0.125 0 0 0.3030303 Private 1st-4th Widowed Priv-house-serv Not-in-family Black Female United-States 0 +29 0.322222233 0.06893288 0.6875 0 0 0.4040404 Private Assoc-voc Separated Craft-repair Not-in-family White Male United-States 0 +31 0.344444454 0.0279469658 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Never-married Farming-fishing Not-in-family White Female United-States 0 +34 0.377777785 0.127989739 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +44 0.4888889 0.141795844 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.09021119 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Own-child White Male United-States 0 +30 0.333333343 0.160235882 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Unmarried White Female United-States 0 +27 0.3 0.11036671 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +27 0.3 0.135967761 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.056697458 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 +58 0.644444466 0.0347961374 0.375 0 0 0.08080808 Private 10th Married-civ-spouse Other-service Wife White Female United-States 0 +35 0.3888889 0.157153785 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +21 0.233333334 0.174788937 0.5625 0 0 0.363636374 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +28 0.311111122 0.124490052 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 +46 0.51111114 0.165503591 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +36 0.4 0.0182211287 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Separated Other-service Unmarried White Female United-States 0 +72 0.8 0.13830559 0.4375 0 0 0.4040404 Private 11th Widowed Adm-clerical Unmarried White Female United-States 0 +35 0.3888889 0.154460311 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female United-States 0 +33 0.366666675 0.215234682 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Divorced Craft-repair Unmarried Black Female United-States 1 +69 0.7666667 0.09174752 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family White Female United-States 0 +35 0.3888889 0.0367588177 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.21759811 0.5625 0 0 0.2020202 Private HS-grad Separated Adm-clerical Unmarried White Female ? 0 +34 0.377777785 0.0998791 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Tech-support Wife White Female United-States 0 +30 0.333333343 0.102682352 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male Mexico 0 +28 0.311111122 0.07681863 0.8125 0 0 0.5555556 Private Bachelors Never-married Transport-moving Not-in-family White Male United-States 0 +54 0.6 0.14343591 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.17784813 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.05577135 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried Black Female United-States 0 +52 0.5777778 0.225144386 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.0184124131 0.5625 0 0 0.4848485 Private HS-grad Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 +43 0.477777779 0.126918152 0.875 0.0501305 0 0.454545468 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +45 0.5 0.29208833 0.25 0 0 0.4040404 Private 7th-8th Separated Other-service Unmarried White Female Mexico 0 +29 0.322222233 0.07453535 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Separated Craft-repair Not-in-family White Male United-States 0 +47 0.5222222 0.0589275323 0.875 0 0 0.424242437 Private Masters Divorced Exec-managerial Unmarried White Male United-States 0 +24 0.266666681 0.238667622 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +51 0.566666663 0.06430166 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +17 0.188888893 0.163478941 0.4375 0 0 0.121212125 Private 11th Never-married Sales Own-child White Male United-States 0 +37 0.411111116 0.0151296053 0.6875 0 0.453856736 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.106523521 1 0 0 0.7070707 Private Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 +29 0.322222233 0.235846177 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Male United-States 1 +18 0.2 0.111491509 0.5 0 0 0.25252524 ? 12th Never-married ? Own-child White Male United-States 0 +36 0.4 0.0193560347 0.75 0 0 0.353535354 Self-emp-not-inc Assoc-acdm Divorced Sales Unmarried White Female United-States 0 +58 0.644444466 0.191037953 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +26 0.2888889 0.0583590679 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +65 0.722222269 0.131832927 0.625 0 0 0.3030303 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +57 0.6333333 0.0470692851 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +59 0.655555546 0.134513587 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.1223536 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.229634181 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +21 0.233333334 0.133189425 0.625 0 0 0.24242425 Private Some-college Never-married Sales Own-child White Female United-States 0 +29 0.322222233 0.0230968446 0.625 0 0 0.6060606 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +18 0.2 0.105585963 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Own-child White Male United-States 0 +52 0.5777778 0.017394701 0.375 0 0.4331956 0.474747479 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +57 0.6333333 0.07001256 0.8125 0 0 0.8080808 Self-emp-inc Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +42 0.466666669 0.0925369039 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +55 0.6111111 0.0708140656 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife Asian-Pac-Islander Female United-States 0 +60 0.6666667 0.0265049282 0.25 0 0 0.4848485 Private 7th-8th Never-married Transport-moving Not-in-family White Male United-States 1 +31 0.344444454 0.113414451 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Canada 1 +23 0.25555557 0.07933495 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +27 0.3 0.179932714 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +23 0.25555557 0.06694865 0.625 0 0 0.25252524 ? Some-college Never-married ? Unmarried Amer-Indian-Eskimo Female United-States 0 +42 0.466666669 0.144299373 0.9375 0 0.43663913 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.1349817 0.625 0.0217402168 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Male United-States 0 +49 0.544444442 0.09190715 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +32 0.355555564 0.161529735 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +19 0.211111113 0.146183252 0.625 0 0 0.282828271 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +60 0.6666667 0.0345455855 0.25 0 0 0.4040404 Private 7th-8th Divorced Other-service Not-in-family White Female United-States 0 +42 0.466666669 0.1183225 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Other-service Husband White Male United-States 0 +35 0.3888889 0.1309378 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Never-married Farming-fishing Not-in-family White Male United-States 0 +48 0.533333361 0.0307212546 0.5625 0 0 0.373737365 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +51 0.566666663 0.276225924 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.122934185 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 +36 0.4 0.228848159 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Exec-managerial Not-in-family Black Male United-States 0 +17 0.188888893 0.114270516 0.375 0 0 0.212121218 Private 10th Never-married Other-service Own-child White Female United-States 0 +52 0.5777778 0.135281429 0.875 0.068490684 0 0.6060606 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.166742891 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +24 0.266666681 0.168322325 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +26 0.2888889 0.140177339 0.8125 0.010550105 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +27 0.3 0.07400864 0.8125 0 0 0.2020202 Private Bachelors Never-married Other-service Own-child White Female United-States 0 +39 0.433333337 0.139976636 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +30 0.333333343 0.248552412 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +50 0.5555556 0.07686173 0.5625 0 0 0.323232323 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +52 0.5777778 0.03438259 0.8125 0 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.06896185 0.9375 0.1502415 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.128296867 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Own-child White Female United-States 0 +45 0.5 0.3114693 0.4375 0 0 0.2020202 Private 11th Widowed Other-service Not-in-family Black Female United-States 0 +65 0.722222269 0.07365167 0.3125 0 0 0.24242425 Private 9th Widowed Priv-house-serv Unmarried Black Female United-States 0 +29 0.322222233 0.0231581368 0.6875 0 0 0.5555556 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 +47 0.5222222 0.1628822 0.3125 0 0 0.4040404 Private 9th Married-spouse-absent Handlers-cleaners Unmarried White Male El-Salvador 0 +30 0.333333343 0.0836442262 0.5625 0 0 0.6060606 Private HS-grad Never-married Farming-fishing Own-child Black Male United-States 0 +34 0.377777785 0.103464328 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.180208191 0.5625 0 0 0.646464646 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.138390452 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.180567861 0.8125 0 0 0.262626261 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.111159459 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Other-service Unmarried Black Female United-States 0 +49 0.544444442 0.0811279044 0.375 0 0 0.4040404 Local-gov 10th Separated Other-service Unmarried Black Female United-States 0 +43 0.477777779 0.103976212 0.625 0.1502415 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.06981117 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife Black Female United-States 1 +58 0.644444466 0.0240606721 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.176870823 0.5625 0 0 0.141414136 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +21 0.233333334 0.15234071 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family White Male United-States 0 +33 0.366666675 0.118337989 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.16713421 0.1875 0 0 0.5050505 Self-emp-inc 5th-6th Married-civ-spouse Transport-moving Husband White Male Cuba 0 +52 0.5777778 0.194945127 1 0 0 0.6060606 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.05095558 0.5625 0 0 0.5555556 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +60 0.6666667 0.134287953 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.108417496 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +36 0.4 0.127003685 0.625 0.05178052 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.0376162268 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.131556109 1 0 0 0.4040404 Self-emp-inc Doctorate Separated Prof-specialty Not-in-family White Male United-States 1 +31 0.344444454 0.2708208 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +71 0.788888931 0.05272226 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.106829979 0.5625 0 0 0.5050505 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +30 0.333333343 0.1141614 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +20 0.222222224 0.0882054046 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +24 0.266666681 0.3749297 0.5625 0.04101041 0 0.5050505 Private HS-grad Never-married Exec-managerial Other-relative White Male United-States 0 +35 0.3888889 0.196989983 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 +38 0.422222227 0.0968367457 0.625 0 0 0.454545468 State-gov Some-college Separated Exec-managerial Not-in-family White Female United-States 0 +27 0.3 0.194207609 0.5625 0 0 0.323232323 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +29 0.322222233 0.04821968 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Unmarried Asian-Pac-Islander Female Philippines 0 +70 0.7777778 0.112721384 0.3125 0.0111101111 0 0.151515156 ? 9th Widowed ? Unmarried White Female United-States 0 +34 0.377777785 0.0718944147 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.14769803 0.25 0 0 0.353535354 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.117547929 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +44 0.4888889 0.225757316 0.5 0 0 0.4040404 Self-emp-not-inc 12th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 +35 0.3888889 0.175989851 0.875 0 0 0.6060606 Private Masters Never-married Sales Not-in-family White Male United-States 0 +27 0.3 0.07536851 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +43 0.477777779 0.130908161 0.875 0 0 0.3838384 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +20 0.222222224 0.0546539575 0.625 0 0 0.25252524 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +42 0.466666669 0.229812667 0.75 0.0861408561 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 1 +27 0.3 0.167953908 0.625 0.03411034 0 0.4040404 State-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.166375816 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 +20 0.222222224 0.07728539 0.4375 0 0.404499531 0.4040404 ? 11th Married-spouse-absent ? Own-child Asian-Pac-Islander Female South 0 +24 0.266666681 0.115946271 0.3125 0 0.395087242 0.4040404 Private 9th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +48 0.533333361 0.0743965954 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +17 0.188888893 0.0539346226 0.4375 0 0 0.2020202 ? 11th Never-married ? Own-child White Female United-States 0 +17 0.188888893 0.248332173 0.4375 0 0 0.1010101 Self-emp-not-inc 11th Never-married Farming-fishing Own-child White Male United-States 0 +33 0.366666675 0.122957759 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.14778693 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.162198558 0.5625 0.02597026 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +17 0.188888893 0.0691895038 0.5 0 0 0.161616161 Private 12th Never-married Other-service Own-child White Male United-States 0 +32 0.355555564 0.152398631 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male Mexico 0 +31 0.344444454 0.08449961 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +58 0.644444466 0.137415186 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Widowed Exec-managerial Not-in-family White Male United-States 0 +29 0.322222233 0.06214164 0.5625 0 0 0.4848485 Local-gov HS-grad Never-married Protective-serv Own-child White Male United-States 0 +37 0.411111116 0.108534023 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Portugal 1 +34 0.377777785 0.128166884 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.290177524 0.625 0 0 0.4040404 Local-gov Some-college Separated Exec-managerial Unmarried Black Male United-States 0 +18 0.2 0.03996888 0.4375 0 0 0.05050505 State-gov 11th Never-married Adm-clerical Own-child White Female United-States 0 +34 0.377777785 0.09208631 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +66 0.733333349 0.100640871 0.25 0 0 0.04040404 ? 7th-8th Never-married ? Not-in-family White Male United-States 0 +45 0.5 0.0583577231 0.8125 0 0 0.5555556 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +41 0.455555558 0.131422743 0.875 0 0 0.353535354 Private Masters Never-married Exec-managerial Not-in-family White Male Dominican-Republic 0 +26 0.2888889 0.112716 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 +54 0.6 0.0761093944 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +24 0.266666681 0.09431301 0.625 0 0 0.454545468 Private Some-college Never-married Machine-op-inspct Own-child Black Female United-States 0 +42 0.466666669 0.176752284 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +20 0.222222224 0.21330972 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +23 0.25555557 0.22593917 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +25 0.2777778 0.13637726 0.75 0 0 0.454545468 ? Assoc-acdm Never-married ? Other-relative White Male United-States 0 +35 0.3888889 0.137150481 0.875 0 0 0.6060606 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +31 0.344444454 0.07995528 0.875 0 0.43663913 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 +30 0.333333343 0.1277156 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female Poland 0 +19 0.211111113 0.319947749 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 +36 0.4 0.07467207 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +31 0.344444454 0.164076373 0.8125 0 0.3168044 0.4040404 Private Bachelors Widowed Sales Unmarried White Female Cuba 0 +21 0.233333334 0.1103721 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +31 0.344444454 0.05398042 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.1990739 1 0.25236252 0 0.656565666 Private Doctorate Divorced Prof-specialty Unmarried White Female United-States 1 +44 0.4888889 0.04246096 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Own-child White Female United-States 1 +40 0.444444448 0.154339075 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Other-service Husband Black Male Jamaica 0 +45 0.5 0.163367137 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family Black Male United-States 0 +60 0.6666667 0.119663507 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.140164554 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Other-relative White Male United-States 0 +28 0.311111122 0.1996693 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +36 0.4 0.04733735 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +36 0.4 0.183044448 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Not-in-family White Male ? 0 +40 0.444444448 0.09765913 0.6875 0.04386044 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +36 0.4 0.257717878 0.8125 0 0 0.353535354 Local-gov Bachelors Divorced Adm-clerical Unmarried White Female Honduras 0 +31 0.344444454 0.199162126 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 +33 0.366666675 0.130760655 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.254877567 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Tech-support Own-child White Female United-States 0 +22 0.244444445 0.144405127 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 +34 0.377777785 0.1464668 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.122957759 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +41 0.455555558 0.08475152 0.5625 0 0.4708448 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.182748765 0.8125 0.046500463 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +50 0.5555556 0.0339858755 0.5625 0 0 0.424242437 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.109206885 0.8125 0.07298073 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.119846709 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male ? 1 +44 0.4888889 0.0751004443 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +20 0.222222224 0.201418474 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +31 0.344444454 0.150340974 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 +65 0.722222269 0.07979632 0.4375 0.09386094 0 0.5959596 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male ? 1 +23 0.25555557 0.237177759 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +55 0.6111111 0.116584107 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 +26 0.2888889 0.122350909 0.6875 0 0.5456841 0.454545468 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +25 0.2777778 0.22408627 0.6875 0 0 0.151515156 Private Assoc-voc Never-married Other-service Own-child White Female United-States 0 +45 0.5 0.03446072 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Wife Black Female United-States 0 +35 0.3888889 0.158213928 0.625 0.02407024 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.08851186 0.625 0 0 0.363636374 Private Some-college Never-married Sales Not-in-family Black Female United-States 0 +43 0.477777779 0.175765559 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +56 0.622222245 0.105106406 0.5625 0.005940059 0 0.2020202 Private HS-grad Widowed Other-service Unmarried Black Female United-States 0 +42 0.466666669 0.188531727 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +19 0.211111113 0.129623726 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Other-relative White Female United-States 0 +55 0.6111111 0.13533935 0.5625 0 0 0.727272749 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.101978511 0.875 0.14084141 0 0.5050505 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 +26 0.2888889 0.0760063455 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Own-child White Male United-States 0 +17 0.188888893 0.2134626 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 +42 0.466666669 0.08508021 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +55 0.6111111 0.132970527 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +32 0.355555564 0.180329427 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +29 0.322222233 0.179856613 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Own-child Black Male Haiti 0 +46 0.51111114 0.1300238 0.8125 0 0 0.373737365 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +29 0.322222233 0.239838228 0.8125 0.07688077 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.150545061 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Unmarried White Male United-States 0 +58 0.644444466 0.0589410029 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.09773726 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Unmarried White Male United-States 0 +39 0.433333337 0.0323922932 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +27 0.3 0.0213894341 0.6875 0 0 0.3838384 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 +54 0.6 0.192532524 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +33 0.366666675 0.0808672458 0.8125 0 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.112736873 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +37 0.411111116 0.0696488544 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family Black Male United-States 0 +36 0.4 0.06833681 0.5625 0 0 0.181818187 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +59 0.655555546 0.28324616 0.5625 0 0 0.3838384 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +34 0.377777785 0.08042742 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Protective-serv Unmarried White Male Portugal 0 +53 0.5888889 0.0863956138 1 0 0 0.7070707 Self-emp-inc Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.260504961 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +32 0.355555564 0.190790772 0.375 0 0 0.424242437 Private 10th Separated Other-service Unmarried White Female United-States 0 +31 0.344444454 0.203088164 0.625 0 0 0.4040404 State-gov Some-college Married-spouse-absent Other-service Other-relative White Male United-States 0 +22 0.244444445 0.1022358 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Sales Wife White Female Germany 0 +47 0.5222222 0.0715643838 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Sales Not-in-family White Female United-States 0 +32 0.355555564 0.126999646 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +26 0.2888889 0.115251184 0.625 0 0 0.3838384 Private Some-college Never-married Farming-fishing Not-in-family White Female United-States 0 +37 0.411111116 0.220463336 0.1875 0 0 0.323232323 Private 5th-6th Separated Farming-fishing Not-in-family White Male Guatemala 0 +31 0.344444454 0.164441422 0.5625 0 0 0.5555556 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +37 0.411111116 0.188779593 0.6875 0 0 0.24242425 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 +55 0.6111111 0.0784277 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +23 0.25555557 0.1903267 0.6875 0 0 0.565656543 Local-gov Assoc-voc Divorced Tech-support Not-in-family White Male United-States 0 +36 0.4 0.03491468 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.049562037 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 0 +43 0.477777779 0.152826324 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.188003 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Male United-States 0 +43 0.477777779 0.09894761 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Craft-repair Husband White Male ? 0 +28 0.311111122 0.132477492 0.6875 0 0.383149683 0.424242437 Private Assoc-voc Never-married Machine-op-inspct Not-in-family White Female United-States 0 +40 0.444444448 0.08807137 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.03338845 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +40 0.444444448 0.160032466 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Not-in-family Other Female United-States 1 +42 0.466666669 0.11425031 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 +61 0.677777767 0.0246991832 0.5625 0 0.5399449 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +18 0.2 0.155716464 0.5 0 0 0.3030303 Private 12th Never-married Machine-op-inspct Own-child White Male United-States 0 +59 0.655555546 0.129406184 0.5625 0 0 0.161616161 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +21 0.233333334 0.100830808 0.5625 0.010550105 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +48 0.533333361 0.06876922 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +41 0.455555558 0.0216777083 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +18 0.2 0.132053852 0.625 0 0 0.333333343 ? Some-college Never-married ? Own-child White Male United-States 0 +23 0.25555557 0.142146766 0.5625 0.0246302467 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +60 0.6666667 0.0212681983 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +22 0.244444445 0.109343611 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Other-relative Black Male United-States 0 +61 0.677777767 0.08677212 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +25 0.2777778 0.213300288 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +46 0.51111114 0.0611286424 0.875 0 0 0.353535354 Private Masters Never-married Tech-support Not-in-family White Male United-States 1 +43 0.477777779 0.184792936 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male England 1 +43 0.477777779 0.104086675 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 +24 0.266666681 0.0714519 0.5625 0 0.395087242 0.3030303 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +68 0.75555557 0.212741926 0.4375 0 0 0.2020202 Self-emp-not-inc 11th Never-married Farming-fishing Unmarried White Male United-States 0 +31 0.344444454 0.0346674919 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +17 0.188888893 0.130551189 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 +32 0.355555564 0.155615434 0.5625 0.05178052 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +50 0.5555556 0.0160166509 0.875 0 0 0.4040404 ? Masters Married-spouse-absent ? Other-relative White Male United-States 0 +33 0.366666675 0.114419363 0.8125 0.03103031 0 0.474747479 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +64 0.7111111 0.1820786 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.09346503 0.5625 0 0 0.3030303 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +30 0.333333343 0.129029676 0.5625 0 0 0.363636374 Private HS-grad Separated Other-service Own-child White Female United-States 0 +22 0.244444445 0.148137853 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Black Male United-States 0 +43 0.477777779 0.06338835 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +22 0.244444445 0.09261773 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +17 0.188888893 0.0219619386 0.375 0 0 0.2020202 Private 10th Never-married Farming-fishing Own-child White Male United-States 0 +47 0.5222222 0.0627788 0.5625 0 0 0.75757575 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female Italy 0 +41 0.455555558 0.171374112 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 +56 0.622222245 0.1256519 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +64 0.7111111 0.114413977 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +47 0.5222222 0.128831655 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +48 0.533333361 0.112587348 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Unmarried White Male United-States 0 +31 0.344444454 0.115761049 0.875 0 0 0.464646459 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +29 0.322222233 0.104001135 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Own-child White Male United-States 0 +30 0.333333343 0.0870388448 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.07431173 0.5625 0 0.3838384 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +57 0.6333333 0.0230813529 0.5625 0 0.14990817 0.424242437 Private HS-grad Widowed Transport-moving Unmarried White Male United-States 1 +62 0.6888889 0.117434107 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +39 0.433333337 0.458266139 0.5625 0 0 0.24242425 Private HS-grad Separated Machine-op-inspct Unmarried White Female United-States 0 +43 0.477777779 0.15702109 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +24 0.266666681 0.111452445 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Sales Own-child White Male United-States 0 +42 0.466666669 0.173623726 0.4375 0 0 0.151515156 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +53 0.5888889 0.130840138 0.625 0.04386044 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +26 0.2888889 0.188652292 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +73 0.811111152 0.119476259 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +72 0.8 0.0194846783 0.4375 0 0 0.24242425 ? 11th Widowed ? Not-in-family White Female United-States 0 +55 0.6111111 0.07092588 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +25 0.2777778 0.336250633 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +41 0.455555558 0.121621467 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 +24 0.266666681 0.216497555 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +63 0.7 0.05799671 0.5625 0 0 0.0606060624 Private HS-grad Widowed Farming-fishing Not-in-family White Male United-States 0 +17 0.188888893 0.133443341 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 +35 0.3888889 0.09103627 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.09888362 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +62 0.6888889 0.1961164 0.8125 0 0 0.4848485 Local-gov Bachelors Widowed Prof-specialty Not-in-family White Female United-States 0 +55 0.6111111 0.261041075 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.0693033338 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 0 +40 0.444444448 0.0224111862 0.5625 0 0 0.5050505 Local-gov HS-grad Divorced Other-service Not-in-family White Female United-States 0 +37 0.411111116 0.0582950823 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.09307708 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.0801277 0.5625 0 0 0.181818187 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +61 0.677777767 0.06720796 0.875 0 0 0.4040404 Private Masters Widowed Prof-specialty Not-in-family White Female United-States 1 +26 0.2888889 0.0612781681 0.6875 0 0 0.5555556 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 +46 0.51111114 0.119489729 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.06497385 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +48 0.533333361 0.220842525 1 0 0 0.5050505 State-gov Doctorate Divorced Prof-specialty Own-child White Male United-States 1 +34 0.377777785 0.0751442239 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +34 0.377777785 0.1121738 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +59 0.655555546 0.09576448 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +34 0.377777785 0.127161965 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +49 0.544444442 0.02597351 0.8125 0 0 0.565656543 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 +18 0.2 0.145674735 0.4375 0 0 0.2020202 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 +43 0.477777779 0.129013509 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +48 0.533333361 0.192182958 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.09612145 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.0545192473 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +24 0.266666681 0.2081592 0.625 0 0 0.151515156 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +21 0.233333334 0.0419874676 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +17 0.188888893 0.248332173 0.4375 0 0 0.282828271 Private 11th Never-married Sales Own-child White Male United-States 0 +39 0.433333337 0.118667349 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +29 0.322222233 0.179736048 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Separated Prof-specialty Own-child White Male United-States 0 +44 0.4888889 0.03238825 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.08170849 0.625 0 0 0.5050505 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +71 0.788888931 0.0966097638 0.875 0.106051058 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +51 0.566666663 0.108253159 0.8125 0 0.5544077 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male China 1 +55 0.6111111 0.1904439 0.1875 0 0 0.25252524 Private 5th-6th Divorced Other-service Unmarried Black Male United-States 0 +41 0.455555558 0.131094053 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.103080414 0.5625 0 0 0.07070707 Private HS-grad Never-married Handlers-cleaners Unmarried Black Female United-States 0 +38 0.422222227 0.2773595 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +39 0.433333337 0.07926356 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +19 0.211111113 0.253612667 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +49 0.544444442 0.04875918 0.3125 0 0 0.4040404 Private 9th Divorced Machine-op-inspct Not-in-family White Female United-States 0 +32 0.355555564 0.182079941 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Other-relative White Male Philippines 1 +27 0.3 0.06481153 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.0642120838 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.174107313 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Wife White Female United-States 0 +63 0.7 0.100826763 0.625 0 0 0.151515156 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +23 0.25555557 0.138657182 0.8125 0 0 0.282828271 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +33 0.366666675 0.104923874 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male ? 0 +54 0.6 0.2737702 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 +29 0.322222233 0.119295754 0.6875 0.0217402168 0 0.454545468 Private Assoc-voc Divorced Tech-support Not-in-family White Female United-States 0 +48 0.533333361 0.09725636 0.625 0 0 0.3030303 ? Some-college Divorced ? Unmarried Black Female United-States 0 +35 0.3888889 0.250908434 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +28 0.311111122 0.110574156 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female India 0 +37 0.411111116 0.123795636 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.119422376 0.9375 0 0 0.656565666 Self-emp-not-inc Prof-school Married-civ-spouse Farming-fishing Husband White Male United-States 1 +40 0.444444448 0.114573605 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +47 0.5222222 0.230345428 0.625 0 0 0.5555556 Private Some-college Divorced Sales Own-child White Male United-States 0 +22 0.244444445 0.152560949 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +30 0.333333343 0.0588790365 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.07352639 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +63 0.7 0.0194355119 0.25 0 0 0.5555556 Local-gov 7th-8th Married-civ-spouse Other-service Husband White Male United-States 0 +51 0.566666663 0.118472695 0.3125 0 0 0.2020202 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.06714937 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +27 0.3 0.0607999563 0.75 0 0 0.4040404 ? Assoc-acdm Married-civ-spouse ? Own-child Amer-Indian-Eskimo Male United-States 0 +35 0.3888889 0.102629818 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +46 0.51111114 0.115544841 0.5625 0 0 0.3838384 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +37 0.411111116 0.1422195 0.625 0 0 0.5252525 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +24 0.266666681 0.136437878 0.8125 0 0 0.151515156 Private Bachelors Never-married Prof-specialty Own-child Black Male United-States 0 +37 0.411111116 0.11348787 0.5625 0 0 0.1010101 Self-emp-not-inc HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 +53 0.5888889 0.0464051776 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +27 0.3 0.06279699 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +38 0.422222227 0.187864929 0.625 0 0 0.444444448 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +53 0.5888889 0.2094827 0.375 0 0 0.6060606 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +34 0.377777785 0.118459895 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.365748078 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Male United-States 0 +39 0.433333337 0.136072159 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.107042141 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female South 0 +67 0.7444445 0.05176786 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 +81 0.900000036 0.0916431248 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +21 0.233333334 0.12571387 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +23 0.25555557 0.173441187 0.625 0 0 0.25252524 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +25 0.2777778 0.0661107749 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Unmarried White Male United-States 0 +42 0.466666669 0.1846818 0.1875 0 0 0.3838384 Private 5th-6th Married-civ-spouse Machine-op-inspct Wife White Female Mexico 0 +38 0.422222227 0.06538875 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +64 0.7111111 0.020088166 0.5625 0 0 0.05050505 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +32 0.355555564 0.176569089 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.144633442 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.09296258 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.0618587546 0.625 0 0 0.424242437 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +33 0.366666675 0.251674235 0.125 0 0 0.4040404 Private 1st-4th Married-spouse-absent Priv-house-serv Not-in-family White Female Guatemala 0 +42 0.466666669 0.10911461 0.5625 0 0 0.5555556 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +19 0.211111113 0.0351005755 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Female United-States 0 +51 0.566666663 0.1628896 0.0625 0 0 0.4040404 Local-gov Preschool Married-civ-spouse Other-service Husband White Male United-States 0 +23 0.25555557 0.2531621 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female Mexico 0 +37 0.411111116 0.1259065 0.4375 0.03103031 0 0.444444448 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +37 0.411111116 0.119148254 0.5625 0 0 1 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.0147544462 0.875 0 0 0.25252524 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +41 0.455555558 0.0890560746 0.9375 0 0.5544077 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.09675525 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.0751442239 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +31 0.344444454 0.05294116 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 +35 0.3888889 0.313535 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +38 0.422222227 0.132263988 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.1974985 0.5625 0 0 0.454545468 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +20 0.222222224 0.162828311 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +54 0.6 0.112074792 0.625 0 0 0.353535354 Local-gov Some-college Divorced Exec-managerial Unmarried Black Female United-States 0 +40 0.444444448 0.124389693 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.07293907 0.8125 0 0.453856736 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +43 0.477777779 0.1689238 0.625 0 0 0.353535354 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 +44 0.4888889 0.2190058 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Farming-fishing Unmarried White Male United-States 0 +44 0.4888889 0.117649637 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 1 +43 0.477777779 0.1529361 0.875 0 0 0.434343427 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.181234658 0.25 0 0 0.4040404 Private 7th-8th Widowed Other-service Unmarried Black Female United-States 0 +18 0.2 0.1197019 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +51 0.566666663 0.0898905843 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.16143477 0.375 0 0 0.3030303 Private 10th Married-civ-spouse Craft-repair Husband White Male ? 0 +44 0.4888889 0.268385321 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.201242 0.375 0 0 0.4040404 Local-gov 10th Divorced Transport-moving Not-in-family White Male United-States 0 +33 0.366666675 0.08313032 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.1187347 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.101071931 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +32 0.355555564 0.113988973 0.5625 0 0 0.3838384 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +32 0.355555564 0.1941618 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Craft-repair Husband White Male Mexico 0 +36 0.4 0.354931116 0.375 0 0 0.4040404 Private 10th Divorced Exec-managerial Unmarried White Female United-States 0 +28 0.311111122 0.0384359173 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.217937574 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +35 0.3888889 0.248416364 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +55 0.6111111 0.127783641 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.111110292 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male India 1 +36 0.4 0.06395479 0.6875 0 0 0.2020202 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 +34 0.377777785 0.136084944 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.108801417 0.8125 0 0 0.353535354 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +67 0.7444445 0.07089085 0.8125 0 0.549127638 0.4040404 Private Bachelors Widowed Exec-managerial Not-in-family White Male United-States 1 +37 0.411111116 0.134809941 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.0216777083 0.5625 0 0 0.7070707 Private HS-grad Never-married Transport-moving Unmarried White Male United-States 0 +25 0.2777778 0.120108709 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +21 0.233333334 0.17239587 0.625 0.04101041 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +40 0.444444448 0.127091244 0.875 0 0 0.353535354 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +78 0.8666667 0.12324132 0.5625 0.0296402965 0 0.4040404 Private HS-grad Widowed Other-service Not-in-family Black Female United-States 0 +34 0.377777785 0.1077177 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 +49 0.544444442 0.0829841644 0.5625 0 0 0.444444448 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.191497311 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +23 0.25555557 0.124401145 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +60 0.6666667 0.104043566 0.5625 0 0 0.424242437 Self-emp-not-inc HS-grad Never-married Farming-fishing Unmarried White Male United-States 0 +45 0.5 0.21437256 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Protective-serv Not-in-family White Male United-States 1 +63 0.7 0.171688661 0.6875 0 0 0.2020202 Private Assoc-voc Divorced Other-service Not-in-family White Female United-States 0 +41 0.455555558 0.235212386 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Own-child Black Female United-States 0 +47 0.5222222 0.2262894 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +44 0.4888889 0.08533749 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +51 0.566666663 0.0822783 0.625 0.0332503319 0 0.4040404 Private Some-college Widowed Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.126200154 0.8125 0 0.3452709 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +41 0.455555558 0.131094053 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +50 0.5555556 0.08405239 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.129881024 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +35 0.3888889 0.195477217 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +56 0.622222245 0.07600163 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.0601634681 0.875 0 0 0.454545468 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +48 0.533333361 0.0223000534 0.8125 0 0 0.5858586 Federal-gov Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 +40 0.444444448 0.05554302 0.625 0.0258002579 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +39 0.433333337 0.2222529 0.8125 0.1502415 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.09988112 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +50 0.5555556 0.113296583 1 0 0.43663913 0.656565666 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.231454745 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 1 +23 0.25555557 0.07762081 0.8125 0 0 0.6060606 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +31 0.344444454 0.109497845 0.5625 0 0 0.161616161 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +58 0.644444466 0.2398234 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +66 0.733333349 0.182909742 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family Black Male United-States 0 +39 0.433333337 0.121777728 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.08285215 0.5625 0.1502415 0 0.5252525 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.07354054 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male Germany 0 +51 0.566666663 0.148539275 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +34 0.377777785 0.08407529 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Transport-moving Own-child White Male United-States 0 +50 0.5555556 0.5168724 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +42 0.466666669 0.07980979 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.116661564 0.875 0 0 0.25252524 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +48 0.533333361 0.07231942 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +33 0.366666675 0.0181672461 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 +51 0.566666663 0.129295051 0.5625 0 0 0.323232323 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +22 0.244444445 0.08240425 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +19 0.211111113 0.07893892 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Own-child White Male United-States 0 +41 0.455555558 0.133572668 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Not-in-family White Male Japan 0 +48 0.533333361 0.08289526 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.141017914 0.5625 0 0 0.3030303 Private HS-grad Separated Sales Not-in-family White Female United-States 0 +34 0.377777785 0.022305442 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +23 0.25555557 0.0869142339 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +56 0.622222245 0.113916911 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male Yugoslavia 0 +30 0.333333343 0.135800719 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family Black Male ? 0 +45 0.5 0.248238549 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.1399928 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Adm-clerical Wife White Female United-States 0 +48 0.533333361 0.0931969658 0.875 0 0 0.5050505 Self-emp-inc Masters Married-spouse-absent Sales Not-in-family Asian-Pac-Islander Male India 0 +31 0.344444454 0.0627101 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +20 0.222222224 0.150545061 0.75 0 0.3946281 0.2020202 State-gov Assoc-acdm Never-married Other-service Own-child White Male United-States 0 +27 0.3 0.262485147 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +32 0.355555564 0.138993949 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +76 0.844444454 0.290422678 0.25 0 0 0.02020202 ? 7th-8th Widowed ? Not-in-family White Male United-States 0 +19 0.211111113 0.162736714 0.5625 0 0.459366381 0.4040404 ? HS-grad Never-married ? Unmarried White Male United-States 0 +66 0.733333349 0.10151916 0.3125 0.01409014 0 0.01010101 Self-emp-inc 9th Married-civ-spouse Exec-managerial Husband White Male ? 0 +37 0.411111116 0.0833734646 0.5625 0 0 0.75757575 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +34 0.377777785 0.195314229 0.5625 0 0 0.3030303 Private HS-grad Divorced Priv-house-serv Unmarried Black Female United-States 0 +34 0.377777785 0.11066778 0.4375 0 0 0.08080808 ? 11th Married-civ-spouse ? Wife White Female United-States 0 +90 1 0.09228635 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +23 0.25555557 0.09294372 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child Black Female United-States 0 +43 0.477777779 0.229812667 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.112483628 0.8125 0.07688077 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.02320057 0.625 0 0 0.373737365 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +28 0.311111122 0.126058713 0.9375 0 0 0.5555556 Private Prof-school Divorced Prof-specialty Unmarried White Male United-States 0 +64 0.7111111 0.132206738 0.75 0 0 0.2020202 ? Assoc-acdm Never-married ? Not-in-family White Female United-States 0 +23 0.25555557 0.146804243 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +20 0.222222224 0.0502665527 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +36 0.4 0.105520628 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +61 0.677777767 0.08429621 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +53 0.5888889 0.177762583 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male Canada 1 +30 0.333333343 0.199671313 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +52 0.5777778 0.03012585 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.130009666 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male Iran 0 +32 0.355555564 0.05903058 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.0718944147 0.5 0 0 0.75757575 Self-emp-not-inc 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 +41 0.455555558 0.203489587 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Not-in-family White Female United-States 0 +49 0.544444442 0.130638748 0.875 0 0.43663913 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.124863192 0.5625 0 0 0.474747479 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.187004834 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +61 0.677777767 0.08678357 0.5625 0.0347103477 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +54 0.6 0.25439465 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 +34 0.377777785 0.106341667 0.75 0 0 0.4040404 Private Assoc-acdm Separated Other-service Unmarried White Female United-States 0 +49 0.544444442 0.118513778 0.625 0 0 0.8080808 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.150200889 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +35 0.3888889 0.134270445 0.9375 0 0.453856736 0.8080808 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.0201952588 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.122348212 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.0790136755 0.75 0 0 0.6060606 Private Assoc-acdm Divorced Tech-support Not-in-family White Female United-States 0 +22 0.244444445 0.0229197051 0.8125 0 0 0.2020202 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +38 0.422222227 0.08949859 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +37 0.411111116 0.145018712 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +48 0.533333361 0.0376256555 1 0 0.43663913 0.464646459 State-gov Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 +17 0.188888893 0.148436219 0.4375 0 0 0.151515156 Private 11th Never-married Adm-clerical Own-child White Male United-States 0 +19 0.211111113 0.0242553242 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 +27 0.3 0.0927086547 0.8125 0 0.365013778 0.4040404 Private Bachelors Never-married Sales Not-in-family Black Female United-States 0 +22 0.244444445 0.128875434 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Own-child Asian-Pac-Islander Male Taiwan 0 +49 0.544444442 0.0211078972 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.153505251 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +43 0.477777779 0.1170118 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Unmarried White Female United-States 0 +19 0.211111113 0.11302986 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +58 0.644444466 0.0549887 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +41 0.455555558 0.131513 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +31 0.344444454 0.156579927 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +30 0.333333343 0.162496254 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.07958551 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +29 0.322222233 0.136022985 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +42 0.466666669 0.10138917 0.625 0.07298073 0 0.5252525 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.277695566 0.5625 0 0 0.282828271 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 +41 0.455555558 0.0896205 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.08118717 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 1 +31 0.344444454 0.1320296 1 0 0 0.6060606 Private Doctorate Married-spouse-absent Prof-specialty Not-in-family Asian-Pac-Islander Male China 0 +34 0.377777785 0.0726023 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.1103721 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +22 0.244444445 0.243334547 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Male India 0 +62 0.6888889 0.0620850623 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.0543609671 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Female United-States 0 +29 0.322222233 0.175609976 0.5625 0 0.453856736 0.25252524 Self-emp-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 1 +43 0.477777779 0.122754358 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +68 0.75555557 0.09448476 0.25 0 0 0.08080808 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +45 0.5 0.100939244 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +39 0.433333337 0.146954447 0.3125 0 0.379017442 0.4040404 Self-emp-inc 9th Married-civ-spouse Exec-managerial Husband White Male Mexico 0 +41 0.455555558 0.0798939839 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +34 0.377777785 0.132545531 0.75 0 0 0.25252524 Self-emp-not-inc Assoc-acdm Married-civ-spouse Prof-specialty Wife White Female United-States 1 +34 0.377777785 0.113153122 0.5625 0 0 0.333333343 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +31 0.344444454 0.0345247053 0.8125 0 0 0.474747479 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +29 0.322222233 0.0882922858 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +41 0.455555558 0.07961986 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +41 0.455555558 0.197878376 0.6875 0 0 0.5555556 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.194941089 0.875 0 0 0.454545468 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male Mexico 1 +33 0.366666675 0.0238283034 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 +37 0.411111116 0.04056496 0.8125 0 0 0.3838384 State-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +69 0.7666667 0.113247417 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +34 0.377777785 0.195838913 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Own-child White Female United-States 0 +60 0.6666667 0.1524579 0.6875 0 0.5544077 0.7070707 Self-emp-inc Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male ? 1 +36 0.4 0.03441761 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.153326079 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +58 0.644444466 0.1382544 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +53 0.5888889 0.193991408 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Japan 0 +29 0.322222233 0.09487609 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +45 0.5 0.115117148 0.5625 0.0486504845 0 0.4040404 Federal-gov HS-grad Divorced Tech-support Not-in-family White Female United-States 0 +34 0.377777785 0.0337966122 0.625 0 0 0.3838384 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.07577061 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +48 0.533333361 0.06415012 0.625 0 0 0.353535354 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 +20 0.222222224 0.0792117 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +35 0.3888889 0.0602867231 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +63 0.7 0.08368262 0.5625 0 0 0.4040404 Federal-gov HS-grad Widowed Handlers-cleaners Not-in-family Black Male United-States 0 +41 0.455555558 0.103976212 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Divorced Other-service Unmarried White Male United-States 0 +28 0.311111122 0.19864957 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +30 0.333333343 0.233805373 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family Black Female United-States 0 +34 0.377777785 0.12253882 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +31 0.344444454 0.213289514 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female Mexico 0 +37 0.411111116 0.127555311 0.6875 0 0 0.3838384 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.123942472 0.625 0 0 0.4040404 ? Some-college Divorced ? Unmarried White Male United-States 0 +31 0.344444454 0.124137118 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Jamaica 1 +46 0.51111114 0.165832266 0.875 0 0 0.454545468 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.168723077 0.5625 0 0 0.6060606 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +27 0.3 0.0934226 0.5625 0 0 0.535353541 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.221220389 0.125 0 0 0.353535354 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +19 0.211111113 0.1310752 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +20 0.222222224 0.155513048 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +59 0.655555546 0.143091053 0.5625 0 0 0.4040404 Federal-gov HS-grad Widowed Sales Unmarried White Female Germany 0 +40 0.444444448 0.144143119 0.8125 0 0 0.373737365 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +56 0.622222245 0.13486518 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.23881714 0.875 0.1502415 0 0.444444448 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.138568267 0.625 0 0 0.6060606 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +46 0.51111114 0.124631494 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +61 0.677777767 0.0568523742 0.5625 0 0 0.353535354 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.197477624 0.5625 0.07298073 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.162743449 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +40 0.444444448 0.350632638 0.625 0 0 0.3939394 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +24 0.266666681 0.0240000542 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male ? 0 +51 0.566666663 0.2039779 0.5625 0 0 0.545454562 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.111341313 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +34 0.377777785 0.07915983 0.625 0 0 0.545454562 Private Some-college Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +46 0.51111114 0.07145662 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.300277829 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +26 0.2888889 0.153115943 0.8125 0 0 0.4040404 Private Bachelors Never-married Transport-moving Unmarried Asian-Pac-Islander Male ? 0 +20 0.222222224 0.1856874 0.5625 0 0 0.282828271 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +44 0.4888889 0.130301312 0.6875 0.03411034 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.191505387 0.5625 0 0 0.4040404 Private HS-grad Widowed Transport-moving Unmarried White Male United-States 0 +33 0.366666675 0.07724834 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.06470107 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +50 0.5555556 0.0902287 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +33 0.366666675 0.120229945 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family Black Female United-States 0 +65 0.722222269 0.2360725 0.8125 0.106051058 0 0.2020202 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +22 0.244444445 0.08861896 0.625 0 0 0.08080808 ? Some-college Never-married ? Own-child White Female United-States 0 +88 0.9777778 0.1389441 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +40 0.444444448 0.122786686 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +51 0.566666663 0.16255486 0.5625 0 0 0.434343427 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +50 0.5555556 0.105773874 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Not-in-family Black Female United-States 0 +25 0.2777778 0.272522837 0.875 0 0 1 Private Masters Married-civ-spouse Farming-fishing Not-in-family White Male United-States 1 +20 0.222222224 0.277403265 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 +47 0.5222222 0.123265564 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +58 0.644444466 0.114488736 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +22 0.244444445 0.126990885 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +50 0.5555556 0.2401952 0.5625 0 0 0.4848485 State-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.03088627 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +24 0.266666681 0.195248216 0.4375 0 0 0.454545468 Local-gov 11th Never-married Other-service Not-in-family Asian-Pac-Islander Male United-States 0 +50 0.5555556 0.09834614 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +40 0.444444448 0.14564307 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 +36 0.4 0.28069213 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +32 0.355555564 0.136695176 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +44 0.4888889 0.112968571 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.11156223 0.875 0 0 0.4040404 ? Masters Married-civ-spouse ? Husband White Male United-States 0 +59 0.655555546 0.0291505717 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Exec-managerial Own-child Black Female United-States 0 +65 0.722222269 0.08000175 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.128826261 0.8125 0 0 0.656565666 State-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.1667045 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +51 0.566666663 0.161079139 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Not-in-family White Male United-States 0 +48 0.533333361 0.123163864 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.02282339 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +28 0.311111122 0.29925406 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +19 0.211111113 0.126059383 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +49 0.544444442 0.07873079 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family Black Female United-States 0 +51 0.566666663 0.119089656 0.75 0 0 0.6060606 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +59 0.655555546 0.102118604 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +18 0.2 0.162151411 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female Dominican-Republic 0 +50 0.5555556 0.0508329943 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male ? 0 +45 0.5 0.216081992 0.5625 0 0 0.8080808 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +30 0.333333343 0.158463135 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.112141475 0.8125 0 0 0.353535354 Private Bachelors Divorced Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.231736273 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 1 +33 0.366666675 0.148983136 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 +61 0.677777767 0.0764758 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +61 0.677777767 0.216283381 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +38 0.422222227 0.0536261424 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.0282911435 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 +36 0.4 0.09112181 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +44 0.4888889 0.2161938 0.625 0.05178052 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.136774644 0.625 0 0 0.6262626 Private Some-college Separated Adm-clerical Own-child White Male United-States 0 +31 0.344444454 0.0218265578 0.625 0 0 0.2020202 Private Some-college Divorced Craft-repair Unmarried White Female United-States 0 +54 0.6 0.06680452 1 0.1502415 0 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.138639659 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Male United-States 0 +63 0.7 0.101292178 0.8125 0 0 0.4040404 ? Bachelors Widowed ? Not-in-family White Female United-States 1 +48 0.533333361 0.164093882 0.625 0.07688077 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 1 +33 0.366666675 0.109788142 0.5625 0 0 0.414141417 ? HS-grad Divorced ? Not-in-family Asian-Pac-Islander Female China 0 +31 0.344444454 0.155763611 0.8125 0.046500463 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +38 0.422222227 0.135257855 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.166618288 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +48 0.533333361 0.235165238 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.0149214827 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.118755579 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Own-child White Female United-States 0 +38 0.422222227 0.0149827749 0.875 0 0 0.727272749 Private Masters Married-civ-spouse Transport-moving Husband White Male ? 1 +29 0.322222233 0.1592478 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.238483742 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.112354308 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +50 0.5555556 0.241623759 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female England 0 +75 0.8333334 0.1403821 0.9375 0 0 0.353535354 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +46 0.51111114 0.1786658 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.021443991 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +27 0.3 0.117891438 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.278369784 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.07162837 0.4375 0 0 0.424242437 Private 11th Separated Other-service Not-in-family Black Female United-States 0 +23 0.25555557 0.117702849 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +34 0.377777785 0.2973345 0.5625 0 0 0.24242425 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +41 0.455555558 0.1410004 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Other-relative White Female Cuba 0 +31 0.344444454 0.1250969 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +42 0.466666669 0.0440302975 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +35 0.3888889 0.0228833333 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +55 0.6111111 0.219772279 0.5625 0 0 0.25252524 Private HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.131090015 0.5625 0 0 0.4040404 State-gov HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 +65 0.722222269 0.112759106 0.5625 0 0 0.5959596 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.111671343 0.625 0 0 0.121212125 Local-gov Some-college Never-married Other-service Not-in-family White Male United-States 0 +62 0.6888889 0.1299019 0.625 0 0 0.2020202 Private Some-college Widowed Other-service Not-in-family White Female United-States 0 +54 0.6 0.112115875 0.9375 1 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.100353271 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +34 0.377777785 0.1279985 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +32 0.355555564 0.141059682 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +51 0.566666663 0.1545526 0.875 0.1502415 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.26770705 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.191126868 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male ? 0 +52 0.5777778 0.13635841 0.5625 0 0 0.434343427 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.147204325 0.625 0 0.404499531 0.4040404 Self-emp-not-inc Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +29 0.322222233 0.08661923 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 0 +38 0.422222227 0.04409361 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +57 0.6333333 0.09518793 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.248849437 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.09169296 0.625 0 0 0.4040404 State-gov Some-college Separated Adm-clerical Not-in-family White Male United-States 0 +30 0.333333343 0.159472764 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.0603042357 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +69 0.7666667 0.1318639 0.6875 0 0 0.01010101 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 +73 0.811111152 0.02005651 0.5625 0 0 0.373737365 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +22 0.244444445 0.103398323 0.625 0 0 0.353535354 Self-emp-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 +31 0.344444454 0.110186204 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +38 0.422222227 0.127717629 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.231526136 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.260947466 0.625 0 0 0.373737365 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +44 0.4888889 0.275815725 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Protective-serv Not-in-family White Male United-States 0 +47 0.5222222 0.135201275 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Unmarried Black Female United-States 0 +27 0.3 0.07801618 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +28 0.311111122 0.101229541 0.75 0 0 0.8080808 Private Assoc-acdm Never-married Other-service Not-in-family White Female United-States 0 +25 0.2777778 0.217918709 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family Black Female United-States 0 +20 0.222222224 0.156648636 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Unmarried White Female United-States 0 +51 0.566666663 0.10288509 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +46 0.51111114 0.08689066 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +67 0.7444445 0.115567744 0.8125 0.06514065 0 0.07070707 Private Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +47 0.5222222 0.260075927 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.2309314 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +52 0.5777778 0.125806138 0.5625 0 0.430670351 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +42 0.466666669 0.107042141 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Divorced Prof-specialty Unmarried Asian-Pac-Islander Female Philippines 1 +65 0.722222269 0.02427351 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +21 0.233333334 0.110472456 0.625 0 0 0.1010101 Private Some-college Never-married Farming-fishing Own-child Black Male United-States 0 +50 0.5555556 0.05989473 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +46 0.51111114 0.1272044 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +47 0.5222222 0.2492879 0.8125 0.1502415 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +57 0.6333333 0.122625038 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband White Male United-States 0 +37 0.411111116 0.0250810776 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +50 0.5555556 0.2836469 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.120333672 0.5 0 0 0.4040404 ? 12th Married-civ-spouse ? Husband White Male United-States 0 +63 0.7 0.536018968 0.125 0 0 0.3030303 Self-emp-not-inc 1st-4th Widowed Other-service Unmarried White Female El-Salvador 0 +39 0.433333337 0.187514022 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +46 0.51111114 0.188361332 0.875 0 0 0.353535354 Private Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 0 +36 0.4 0.07637679 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +26 0.2888889 0.188652292 0.1875 0 0.373737365 0.5050505 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.159422919 0.625 0 0 0.575757563 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +41 0.455555558 0.1786658 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 +44 0.4888889 0.0235299282 0.625 0 0 0.4040404 Local-gov Some-college Never-married Other-service Own-child Black Male United-States 0 +22 0.244444445 0.0392145254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.20274061 0.625 0 0 0.6060606 Federal-gov Some-college Never-married Armed-Forces Not-in-family Black Male United-States 0 +29 0.322222233 0.282696575 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female Japan 0 +58 0.644444466 0.125810176 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Transport-moving Wife White Female United-States 1 +36 0.4 0.121698253 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +30 0.333333343 0.140838087 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.0220030248 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +29 0.322222233 0.173068732 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Not-in-family White Male United-States 0 +26 0.2888889 0.1361907 0.1875 0 0 0.4040404 Private 5th-6th Never-married Adm-clerical Own-child White Female Mexico 0 +43 0.477777779 0.0579205975 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +49 0.544444442 0.08447537 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 1 +45 0.5 0.190635175 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.129946351 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +20 0.222222224 0.164806485 0.625 0 0 0.25252524 ? Some-college Never-married ? Not-in-family White Female United-States 0 +51 0.566666663 0.120997779 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +32 0.355555564 0.343064785 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male Canada 1 +24 0.266666681 0.06484722 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +35 0.3888889 0.08021661 1 0.07298073 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.2203266 0.75 0 0 0.5555556 ? Assoc-acdm Never-married ? Not-in-family White Male United-States 0 +41 0.455555558 0.0976140052 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.0372040235 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +61 0.677777767 0.06820547 0.5625 0.0147101469 0 0.353535354 Local-gov HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +20 0.222222224 0.0773716 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +27 0.3 0.128325164 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 1 +55 0.6111111 0.08211194 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +39 0.433333337 0.056504827 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +17 0.188888893 0.09328924 0.375 0 0 0.2020202 ? 10th Never-married ? Own-child White Male United-States 0 +47 0.5222222 0.172776416 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male ? 0 +52 0.5777778 0.113410413 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried Asian-Pac-Islander Female India 1 +24 0.266666681 0.197735578 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child Black Female United-States 0 +29 0.322222233 0.192152649 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Unmarried Black Female United-States 0 +25 0.2777778 0.12695317 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 +20 0.222222224 0.218541056 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 +23 0.25555557 0.18538633 0.5625 0 0 0.353535354 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +57 0.6333333 0.178553313 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +51 0.566666663 0.0988526344 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.0274000559 0.625 0.0367403664 0 0.161616161 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +39 0.433333337 0.117826775 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +40 0.444444448 0.1617318 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +71 0.788888931 0.181657642 0.8125 0.0232902318 0 0.161616161 Private Bachelors Divorced Tech-support Own-child White Female United-States 0 +38 0.422222227 0.02302141 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.152154133 0.9375 0 0 0.4040404 State-gov Prof-school Never-married Prof-specialty Unmarried White Male United-States 0 +57 0.6333333 0.0602085963 0.875 0 0 0.4040404 Private Masters Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.0315598063 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 +59 0.655555546 0.07096561 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +26 0.2888889 0.131409943 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family Other Male United-States 0 +35 0.3888889 0.124009147 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +61 0.677777767 0.09077089 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Germany 1 +17 0.188888893 0.0982592553 0.4375 0 0 0.3030303 ? 11th Never-married ? Own-child White Female United-States 0 +36 0.4 0.10310331 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 1 +62 0.6888889 0.151984408 0.25 0.03411034 0 0.5050505 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +34 0.377777785 0.314613342 0.625 0 0 0.5050505 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 1 +32 0.355555564 0.134548619 0.8125 0.07688077 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.117153242 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Own-child White Female United-States 0 +39 0.433333337 0.128753528 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.0893147141 0.1875 0 0 0.4040404 Private 5th-6th Divorced Machine-op-inspct Not-in-family Black Male United-States 0 +61 0.677777767 0.0202552024 0.5625 0 0.4242424 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +40 0.444444448 0.104525819 0.375 0 0 0.5555556 Private 10th Never-married Craft-repair Other-relative Black Male United-States 0 +31 0.344444454 0.02889463 0.8125 0 0 0.373737365 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +36 0.4 0.128753528 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +23 0.25555557 0.122462042 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +33 0.366666675 0.07137714 0.5625 0 0 0.414141417 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +52 0.5777778 0.0985906348 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.06967041 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +51 0.566666663 0.137020484 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female Italy 0 +31 0.344444454 0.113363937 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Never-married Exec-managerial Not-in-family White Female United-States 0 +49 0.544444442 0.173612937 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +49 0.544444442 0.115377128 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female United-States 0 +53 0.5888889 0.151773587 0.625 0 0 0.4040404 Federal-gov Some-college Widowed Adm-clerical Not-in-family Black Female United-States 0 +52 0.5777778 0.102534845 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 +20 0.222222224 0.299422443 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 +26 0.2888889 0.271965146 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Own-child Black Male United-States 0 +61 0.677777767 0.128643066 0.5625 0 0 0.0606060624 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +43 0.477777779 0.149221569 0.875 0 0 0.3030303 Private Masters Never-married Other-service Not-in-family White Female Poland 0 +46 0.51111114 0.06663209 0.8125 0 0 0.5252525 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +43 0.477777779 0.113964058 0.6875 0 0 0.353535354 Local-gov Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +41 0.455555558 0.06892413 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried Black Female United-States 0 +44 0.4888889 0.155373633 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +54 0.6 0.302590072 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +65 0.722222269 0.133875757 0.875 0.200512 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.06562179 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female Canada 0 +25 0.2777778 0.140768036 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Own-child White Male United-States 0 +23 0.25555557 0.02496927 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +25 0.2777778 0.109854147 0.8125 0 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +19 0.211111113 0.08020112 0.625 0 0 0.5050505 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +37 0.411111116 0.09248571 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +45 0.5 0.08574296 0.625 0 0 0.454545468 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +37 0.411111116 0.235141665 0.5625 0 0 0.444444448 Private HS-grad Never-married Sales Not-in-family Black Male United-States 0 +40 0.444444448 0.1793784 0.625 0 0.359045 0.7070707 Self-emp-not-inc Some-college Divorced Exec-managerial Other-relative White Male Iran 1 +19 0.211111113 0.130729675 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +17 0.188888893 0.03131666 0.4375 0 0 0.05050505 Private 11th Never-married Other-service Own-child White Male United-States 0 +27 0.3 0.0201413762 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +40 0.444444448 0.1949229 0.25 0 0.4331956 0.4040404 Local-gov 7th-8th Married-civ-spouse Craft-repair Husband Black Male ? 1 +59 0.655555546 0.1528398 0.5625 0 0.404499531 0.3030303 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +19 0.211111113 0.157708779 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +43 0.477777779 0.1604945 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +42 0.466666669 0.155333221 0.375 0 0 0.4040404 Private 10th Never-married Transport-moving Unmarried White Male United-States 1 +54 0.6 0.268209517 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +54 0.6 0.07729347 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 +51 0.566666663 0.16603905 0.375 0.02105021 0 0.454545468 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +50 0.5555556 0.0928231552 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +40 0.444444448 0.175587744 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +55 0.6111111 0.218903422 0.75 0 0 0.25252524 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 +50 0.5555556 0.07622794 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.0450022072 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.03488572 0.5625 0 0 0.323232323 ? HS-grad Divorced ? Unmarried Black Female United-States 0 +24 0.266666681 0.162674069 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +30 0.333333343 0.0203582533 0.4375 0 0 0.4040404 Private 11th Divorced Sales Own-child White Male United-States 0 +39 0.433333337 0.23750712 0.75 0 0 0.5050505 Local-gov Assoc-acdm Married-civ-spouse Craft-repair Wife White Female United-States 1 +37 0.411111116 0.09692969 0.5625 0 0 0.5050505 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +33 0.366666675 0.0875736251 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +48 0.533333361 0.222116858 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +43 0.477777779 0.132649243 0.5625 0 0 0.7878788 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Thailand 0 +39 0.433333337 0.0163951758 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.0231480338 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.11708656 0.375 0 0 0.6060606 Self-emp-not-inc 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.0493101329 0.625 0 0 0.2020202 State-gov Some-college Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male United-States 0 +32 0.355555564 0.05841093 0.5625 0 0 0.5252525 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +31 0.344444454 0.120687954 0.8125 0 0 0.909090936 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 1 +31 0.344444454 0.0859497339 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +47 0.5222222 0.0775036141 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.116239928 0.625 0 0 0.5050505 ? Some-college Never-married ? Own-child White Male United-States 0 +40 0.444444448 0.172560886 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +40 0.444444448 0.1366413 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 +41 0.455555558 0.123999044 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Not-in-family White Male United-States 0 +53 0.5888889 0.0880329758 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +46 0.51111114 0.09074328 0.4375 0 0 0.434343427 Private 11th Divorced Machine-op-inspct Unmarried Amer-Indian-Eskimo Male Germany 0 +45 0.5 0.0244008079 0.8125 0.04386044 0 0.353535354 Self-emp-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +39 0.433333337 0.20061022 0.3125 0.03411034 0 0.343434334 Private 9th Married-civ-spouse Other-service Wife Black Female United-States 0 +19 0.211111113 0.1438966 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +57 0.6333333 0.1170576 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +49 0.544444442 0.099226445 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Wife White Female Peru 0 +59 0.655555546 0.1995366 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +32 0.355555564 0.121822856 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Sales Not-in-family White Male United-States 1 +18 0.2 0.114421383 0.625 0.005940059 0 0.151515156 ? Some-college Never-married ? Own-child White Female United-States 0 +35 0.3888889 0.142193228 0.625 0 0 0.4040404 State-gov Some-college Never-married Protective-serv Not-in-family Black Male United-States 0 +58 0.644444466 0.123842783 0.375 0 0 0.4040404 Self-emp-inc 10th Married-civ-spouse Transport-moving Wife White Female United-States 0 +28 0.311111122 0.2974463 0.8125 0 0 0.434343427 Private Bachelors Never-married Other-service Not-in-family White Male Mexico 0 +36 0.4 0.147195578 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 +41 0.455555558 0.09518861 0.875 0 0 0.353535354 Self-emp-not-inc Masters Divorced Prof-specialty Unmarried White Female United-States 0 +47 0.5222222 0.04560906 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.118096866 0.5625 0 0.3838384 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +61 0.677777767 0.2337764 0.5625 0 0 0.161616161 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +36 0.4 0.226708338 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.0188569445 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 +56 0.622222245 0.09804911 0.5625 0 0.43663913 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +50 0.5555556 0.0205071047 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 +45 0.5 0.173008114 0.625 0.0501305 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.0813878849 0.5625 0 0 0.6666667 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +51 0.566666663 0.124794491 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.154553264 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.200864822 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +60 0.6666667 0.125108361 0.4375 0 0 0.4040404 Private 11th Widowed Transport-moving Unmarried Black Male United-States 0 +17 0.188888893 0.224354342 0.375 0.010550105 0 0.3030303 ? 10th Never-married ? Own-child White Male United-States 0 +49 0.544444442 0.08479261 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.379794657 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 +56 0.622222245 0.209636942 0.5625 0 0 0.3838384 Private HS-grad Widowed Adm-clerical Unmarried Black Female United-States 0 +25 0.2777778 0.149360985 0.5625 0.0332503319 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +22 0.244444445 0.208898067 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +76 0.844444454 0.142420888 0.5625 0 0 0.02020202 ? HS-grad Widowed ? Not-in-family Black Female United-States 0 +41 0.455555558 0.06338835 0.9375 0 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.129955113 0.5625 0.07688077 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.108781211 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +30 0.333333343 0.119670242 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 1 +39 0.433333337 0.03441761 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +40 0.444444448 0.0677467957 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 +70 0.7777778 0.109788142 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +35 0.3888889 0.0456171446 0.625 0 0.4708448 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.06824251 0.875 0 0 0.75757575 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 0 +24 0.266666681 0.0287639629 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 0 +40 0.444444448 0.153926209 0.75 0.07298073 0 0.363636374 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +61 0.677777767 0.08145659 0.9375 0 0 0.05050505 Private Prof-school Married-civ-spouse Transport-moving Husband White Male United-States 1 +25 0.2777778 0.06619699 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Male United-States 0 +28 0.311111122 0.145807415 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +69 0.7666667 0.140680477 0.875 0 0 0.111111112 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +22 0.244444445 0.140054762 0.625 0 0 0.363636374 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 +47 0.5222222 0.02306721 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +38 0.422222227 0.0563930236 0.5625 0 0 0.4848485 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +26 0.2888889 0.123308674 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +17 0.188888893 0.1332588 0.4375 0 0 0.24242425 Private 11th Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +33 0.366666675 0.158463135 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Other-service Not-in-family White Male United-States 0 +43 0.477777779 0.02373266 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 +58 0.644444466 0.172304943 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +53 0.5888889 0.177762583 0.5625 1 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +26 0.2888889 0.172601968 0.5625 0 0 0.25252524 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +43 0.477777779 0.197705939 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +31 0.344444454 0.141070455 0.375 0.02105021 0 0.4040404 Private 10th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +30 0.333333343 0.0388299376 0.5625 0 0.459366381 0.424242437 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 +25 0.2777778 0.117593735 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +57 0.6333333 0.1877565 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +37 0.411111116 0.118024796 0.875 0 0 0.6060606 Private Masters Divorced Exec-managerial Unmarried White Male United-States 1 +32 0.355555564 0.271307766 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.06812801 0.5625 0 0 0.414141417 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +45 0.5 0.06973641 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +53 0.5888889 0.10566207 0.5625 0.1502415 0 0.353535354 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +27 0.3 0.0161244161 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative Amer-Indian-Eskimo Male United-States 0 +28 0.311111122 0.141640931 0.4375 0 0 0.5050505 Self-emp-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 +32 0.355555564 0.0539218225 0.4375 0 0 0.434343427 Private 11th Divorced Sales Not-in-family White Male United-States 1 +35 0.3888889 0.1260311 0.8125 0 0.454545438 0.656565666 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 +36 0.4 0.07073527 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.152067244 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +37 0.411111116 0.266605824 0.8125 0 0 0.8080808 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.0338666625 0.625 0.0332503319 0 0.454545468 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +20 0.222222224 0.02204613 0.625 0 0 0.454545468 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +64 0.7111111 0.120856337 0.8125 0.1502415 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +60 0.6666667 0.195724413 0.875 0 0 0.4040404 ? Masters Married-civ-spouse ? Husband White Male United-States 0 +32 0.355555564 0.0830151439 0.75 0 0 0.424242437 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.0326212943 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +42 0.466666669 0.165229455 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +20 0.222222224 0.290795147 0.625 0 0 0.141414136 Private Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 +42 0.466666669 0.293665081 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +25 0.2777778 0.151506871 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Prof-specialty Unmarried Black Male United-States 0 +30 0.333333343 0.113147058 0.6875 0.1502415 0 0.656565666 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.146193355 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +66 0.733333349 0.201275 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +59 0.655555546 0.0841918141 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male England 1 +44 0.4888889 0.08350682 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Not-in-family Asian-Pac-Islander Male China 0 +46 0.51111114 0.1047272 0.5625 0 0 0.5858586 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +59 0.655555546 0.191845521 0.8125 0.0288502872 0 0.3030303 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 +25 0.2777778 0.143122718 0.8125 0 0.307621658 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +17 0.188888893 0.021636622 0.3125 0 0 0.09090909 Local-gov 9th Never-married Other-service Own-child Black Male United-States 0 +47 0.5222222 0.1662896 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 +47 0.5222222 0.09529368 0.3125 0 0 0.4040404 State-gov 9th Divorced Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.021543 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +20 0.222222224 0.115039691 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Own-child White Female United-States 0 +26 0.2888889 0.11200542 0.8125 0 0.5369605 0.5555556 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +20 0.222222224 0.1557791 0.625 0 0 0.151515156 Private Some-college Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +33 0.366666675 0.107308865 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Male United-States 0 +48 0.533333361 0.118559584 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +52 0.5777778 0.07949391 0.8125 1 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.0181167312 0.5625 0 0 0.121212125 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +47 0.5222222 0.156682983 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +40 0.444444448 0.0579205975 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +48 0.533333361 0.08447537 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Unmarried White Female United-States 1 +49 0.544444442 0.165221378 0.375 0 0 0.424242437 Private 10th Married-civ-spouse Transport-moving Husband Black Male United-States 1 +50 0.5555556 0.04950007 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.132725358 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 +34 0.377777785 0.0822493359 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.0510148481 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +22 0.244444445 0.144628733 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +35 0.3888889 0.1791292 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family Black Male United-States 0 +26 0.2888889 0.13279137 0.5625 0 0 0.3030303 State-gov HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +62 0.6888889 0.109277606 0.9375 0 0.373737365 0.7070707 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +39 0.433333337 0.136774644 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Protective-serv Not-in-family White Male United-States 0 +59 0.655555546 0.111601293 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +69 0.7666667 0.318608761 0.1875 0 0 0.4040404 ? 5th-6th Divorced ? Not-in-family White Male United-States 0 +27 0.3 0.113225862 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.110118851 0.375 0 0 0.3030303 Private 10th Never-married Sales Own-child White Male United-States 0 +38 0.422222227 0.121466555 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +41 0.455555558 0.08242782 0.625 0 0.4331956 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.0997295752 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Unmarried White Female United-States 0 +23 0.25555557 0.135362253 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +17 0.188888893 0.0881023556 0.375 0 0 0.24242425 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 +56 0.622222245 0.07890322 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Female United-States 0 +24 0.266666681 0.144120887 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +62 0.6888889 0.09077089 1 0.07688077 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 +44 0.4888889 0.09384895 0.5 0 0 0.4040404 Private 12th Divorced Transport-moving Unmarried Black Male United-States 0 +23 0.25555557 0.212754056 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +41 0.455555558 0.131422743 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Sales Not-in-family White Male ? 0 +25 0.2777778 0.237122536 0.5625 0 0 0.656565666 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +21 0.233333334 0.159414843 0.625 0 0 0.08080808 Private Some-college Never-married Other-service Other-relative Black Female United-States 0 +18 0.2 0.140396237 0.5 0 0 0.0606060624 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 +45 0.5 0.1007877 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +75 0.8333334 0.0748815462 0.8125 0.251242518 0 0.161616161 ? Bachelors Widowed ? Not-in-family White Female United-States 1 +51 0.566666663 0.103954658 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Protective-serv Husband White Male United-States 0 +42 0.466666669 0.09527752 0.5625 0 0 0.4040404 Federal-gov HS-grad Separated Other-service Other-relative Black Female United-States 0 +47 0.5222222 0.07529914 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family Black Female Outlying-US(Guam-USVI-etc) 0 +29 0.322222233 0.07536851 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +33 0.366666675 0.05301188 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family Black Male United-States 0 +43 0.477777779 0.108152129 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.117675908 0.625 0 0 0.161616161 ? Some-college Never-married ? Own-child White Male United-States 0 +19 0.211111113 0.0421188064 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Own-child Black Female Jamaica 0 +44 0.4888889 0.146094352 0.75 0 0.4242424 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.133459508 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 +19 0.211111113 0.08369676 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +49 0.544444442 0.175832242 0.375 0.0217602178 0 0.4040404 ? 10th Separated ? Own-child White Male United-States 0 +52 0.5777778 0.140187442 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +38 0.422222227 0.173266754 0.5625 0 0 0.5252525 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +24 0.266666681 0.0991799757 0.625 0 0 0.5050505 State-gov Some-college Never-married Tech-support Not-in-family White Male United-States 0 +32 0.355555564 0.164522916 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +72 0.8 0.1436346 0.5625 0 0 0.08080808 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +26 0.2888889 0.179774433 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.113897376 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child Asian-Pac-Islander Male ? 0 +29 0.322222233 0.135051072 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.0866939947 0.5625 0.105201051 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 1 +48 0.533333361 0.04414008 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +40 0.444444448 0.0696401 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.04785193 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Unmarried White Male Scotland 0 +28 0.311111122 0.08448951 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Own-child White Male United-States 0 +22 0.244444445 0.113953955 0.5625 0 0 0.2020202 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 +23 0.25555557 0.08181491 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +65 0.722222269 0.1396109 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +26 0.2888889 0.03104792 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +20 0.222222224 0.139200047 0.625 0.010550105 0 0.5050505 ? Some-college Never-married ? Own-child White Male United-States 0 +55 0.6111111 0.06624953 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 +38 0.422222227 0.216974422 0.8125 0 0 0.1010101 Self-emp-not-inc Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 +33 0.366666675 0.100480571 0.5625 0 0 0.6060606 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 1 +33 0.366666675 0.0807089657 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +37 0.411111116 0.613184452 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family Black Female United-States 0 +19 0.211111113 0.118925981 0.4375 0 0 0.6060606 Private 11th Never-married Machine-op-inspct Own-child White Male United-States 0 +24 0.266666681 0.145570338 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +30 0.333333343 0.018324852 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.04635938 0.5625 0 0 0.5050505 State-gov HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +22 0.244444445 0.120440088 0.625 0 0 0.2020202 State-gov Some-college Never-married Prof-specialty Own-child White Female United-States 0 +57 0.6333333 0.159589961 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +46 0.51111114 0.184394211 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +67 0.7444445 0.214542955 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +35 0.3888889 0.304397166 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +47 0.5222222 0.068914704 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Own-child White Male United-States 0 +39 0.433333337 0.2555053 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.01420821 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried Asian-Pac-Islander Male Philippines 0 +58 0.644444466 0.1424842 0.5 0 0 0.5252525 Self-emp-not-inc 12th Divorced Sales Not-in-family White Female United-States 0 +36 0.4 0.05743363 0.75 0 0 0.3030303 Private Assoc-acdm Married-civ-spouse Prof-specialty Wife White Female United-States 1 +45 0.5 0.0312560424 0.875 0 0 0.363636374 Private Masters Married-civ-spouse Prof-specialty Husband White Male England 1 +54 0.6 0.03625838 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +26 0.2888889 0.108443767 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +60 0.6666667 0.036173515 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.2492879 0.9375 1 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.209406585 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +32 0.355555564 0.2531365 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Other-relative White Male United-States 0 +38 0.422222227 0.07241371 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +48 0.533333361 0.0395250246 0.625 0 0 0.7070707 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +44 0.4888889 0.120937832 0.5625 0 0.453856736 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.0473090634 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Asian-Pac-Islander Female Philippines 0 +44 0.4888889 0.09914832 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.11823763 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family Other Female United-States 0 +61 0.677777767 0.109903313 0.9375 0 0 0.353535354 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.08487208 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.0995995849 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 +45 0.5 0.2885085 0.5625 0 0.399449021 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +36 0.4 0.135315776 0.75 0 0 0.212121218 ? Assoc-acdm Married-civ-spouse ? Wife Black Female Haiti 0 +39 0.433333337 0.221233174 0.4375 0.02407024 0 0.7070707 Private 11th Married-civ-spouse Other-service Husband White Male Mexico 0 +67 0.7444445 0.174427241 0.5625 0 0 0.24242425 Local-gov HS-grad Divorced Other-service Not-in-family White Female United-States 0 +40 0.444444448 0.233022049 0.75 0 0 0.4040404 State-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 +27 0.3 0.0860750154 0.1875 0 0 0.353535354 Private 5th-6th Never-married Farming-fishing Not-in-family White Male Mexico 0 +37 0.411111116 0.273268431 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +57 0.6333333 0.118503004 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.1914158 0.375 0 0 0.4040404 Private 10th Divorced Other-service Not-in-family White Female United-States 0 +28 0.311111122 0.06042817 0.5625 0.0220202189 0 0.4848485 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +34 0.377777785 0.1183811 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +54 0.6 0.138996646 0.5625 0.05178052 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +52 0.5777778 0.107087269 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Other-relative Black Female United-States 0 +42 0.466666669 0.192001775 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.08537319 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +65 0.722222269 0.1409573 0.875 0.06514065 0 0.353535354 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.0356218927 0.9375 0 0 0.1010101 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 0 +71 0.788888931 0.090133056 0.5625 0 0 0.2020202 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +33 0.366666675 0.162162185 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +30 0.333333343 0.0263042152 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.08033381 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +59 0.655555546 0.0965659842 0.375 0 0 0.4040404 Private 10th Divorced Adm-clerical Not-in-family Black Female United-States 0 +19 0.211111113 0.2178352 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +36 0.4 0.09161955 0.3125 0 0 0.3030303 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.109913416 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Sales Own-child White Male United-States 0 +34 0.377777785 0.136544973 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +41 0.455555558 0.28414467 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 +44 0.4888889 0.08101071 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Italy 1 +26 0.2888889 0.142653257 0.5625 0 0 0.4040404 ? HS-grad Separated ? Unmarried White Female United-States 0 +47 0.5222222 0.133966684 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.144551948 0.625 0 0 0.161616161 Private Some-college Never-married Sales Own-child White Male United-States 0 +55 0.6111111 0.121044248 0.375 0 0 0.181818187 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.0722237751 0.5625 0 0.459595948 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.0743279 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.124184944 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +62 0.6888889 0.1841807 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Protective-serv Husband White Male Cuba 0 +44 0.4888889 0.298402727 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +39 0.433333337 0.0482930951 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried White Female United-States 0 +50 0.5555556 0.107867219 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.07273566 0.4375 0 0 0.454545468 Private 11th Never-married Sales Not-in-family White Male United-States 0 +52 0.5777778 0.0635755956 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +46 0.51111114 0.06724232 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.0294408668 0.75 0.07688077 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.0564125553 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Unmarried White Male United-States 0 +51 0.566666663 0.08143975 0.25 0.0296102948 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.12127123 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 +47 0.5222222 0.115070671 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female Italy 1 +43 0.477777779 0.0255518779 0.875 0 0 0.5050505 Private Masters Divorced Exec-managerial Unmarried White Male United-States 0 +64 0.7111111 0.113382794 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male ? 1 +24 0.266666681 0.0259007681 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +27 0.3 0.08625215 0.625 0 0 0.5050505 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.2834873 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.112307832 0.5625 0 0 0.121212125 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +26 0.2888889 0.160818487 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +43 0.477777779 0.118723921 0.8125 1 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.0946935639 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +20 0.222222224 0.14242965 0.5625 0 0 0.8080808 Self-emp-not-inc HS-grad Never-married Transport-moving Own-child White Male United-States 0 +37 0.411111116 0.126988187 0.5625 0 0.43663913 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.0266591683 0.5625 0 0 0.454545468 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +37 0.411111116 0.115275428 0.5625 0 0.4331956 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +53 0.5888889 0.07913761 0.3125 0 0 0.363636374 Private 9th Divorced Other-service Not-in-family White Female Canada 0 +44 0.4888889 0.0977702662 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.0192092042 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +17 0.188888893 0.06994723 0.4375 0.010550105 0 0.2020202 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 +19 0.211111113 0.252627283 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Own-child White Male United-States 0 +53 0.5888889 0.189660579 0.5625 0.1502415 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +44 0.4888889 0.102043167 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +51 0.566666663 0.2797101 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +49 0.544444442 0.0216958933 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +35 0.3888889 0.08325291 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +44 0.4888889 0.13643451 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +54 0.6 0.119839974 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.1729118 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +18 0.2 0.03114895 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 +24 0.266666681 0.179783866 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +29 0.322222233 0.07545674 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 +22 0.244444445 0.253435522 0.625 0 0 0.353535354 ? Some-college Divorced ? Not-in-family White Female United-States 0 +35 0.3888889 0.11370407 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +56 0.622222245 0.126278967 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +32 0.355555564 0.1069465 0.25 0 0 0.4040404 ? 7th-8th Widowed ? Not-in-family White Female United-States 0 +24 0.266666681 0.0452763364 0.8125 0 0 0.454545468 Private Bachelors Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male China 0 +43 0.477777779 0.1358674 0.875 0 0.43663913 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +73 0.811111152 0.180108517 0.5625 0 0 0.151515156 Private HS-grad Widowed Sales Other-relative White Female United-States 0 +47 0.5222222 0.113282442 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male ? 0 +49 0.544444442 0.07102017 0.5 0 0 0.3939394 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.105561711 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.100087225 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +39 0.433333337 0.0134127662 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 +42 0.466666669 0.128488153 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 +41 0.455555558 0.157576755 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 1 +35 0.3888889 0.02046265 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.125997424 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.247398645 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +51 0.566666663 0.0681071356 0.5625 0 0 0.7070707 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +38 0.422222227 0.0582950823 0.8125 0 0 0.4848485 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 +40 0.444444448 0.147500679 0.625 0 0 0.424242437 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.03887035 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +44 0.4888889 0.204431862 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +55 0.6111111 0.134078488 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.166662738 0.5625 0 0 0.454545468 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +49 0.544444442 0.125329956 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +31 0.344444454 0.0522891767 0.6875 0 0 0.424242437 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +24 0.266666681 0.121276617 0.875 0.068490684 0 0.909090936 Private Masters Never-married Exec-managerial Own-child White Male United-States 0 +46 0.51111114 0.0380425751 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family Black Male United-States 0 +26 0.2888889 0.211609051 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family Black Male United-States 0 +35 0.3888889 0.161483258 0.8125 0 0 0.3838384 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +27 0.3 0.2543805 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Sales Not-in-family White Male United-States 0 +64 0.7111111 0.09090021 0.8125 0.1502415 0 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.198351189 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Other-relative White Male United-States 0 +21 0.233333334 0.0219680015 0.5625 0 0.3946281 0.161616161 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +45 0.5 0.123024441 0.8125 0 0 0.454545468 Private Bachelors Divorced Other-service Not-in-family White Male ? 1 +57 0.6333333 0.03520363 0.5625 0 0 0.727272749 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.07945215 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +45 0.5 0.0665997639 0.4375 0 0 0.323232323 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 +50 0.5555556 0.132661372 0.25 0 0 0.3030303 Private 7th-8th Divorced Craft-repair Not-in-family White Female United-States 0 +38 0.422222227 0.112472177 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +43 0.477777779 0.130301312 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.122813627 0.625 0 0 0.5555556 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 0 +32 0.355555564 0.334573537 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +20 0.222222224 0.104250342 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.147753939 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +45 0.5 0.0668004751 0.4375 0 0 0.4040404 Private 11th Widowed Adm-clerical Unmarried White Female United-States 0 +40 0.444444448 0.151484638 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +38 0.422222227 0.205192953 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +37 0.411111116 0.2355276 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +60 0.6666667 0.07196716 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family White Female United-States 0 +53 0.5888889 0.132233679 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +25 0.2777778 0.114044882 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Own-child White Female United-States 0 +47 0.5222222 0.10973493 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family Asian-Pac-Islander Male Japan 0 +40 0.444444448 0.0229250938 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +51 0.566666663 0.112918727 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +19 0.211111113 0.132944927 0.625 0 0 0.1010101 Private Some-college Never-married Other-service Own-child White Female United-States 0 +42 0.466666669 0.169592619 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +65 0.722222269 0.179214731 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +41 0.455555558 0.111341313 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.145397916 0.375 0 0 0.454545468 Private 10th Never-married Machine-op-inspct Own-child Black Male United-States 0 +46 0.51111114 0.09021186 0.875 0.2782828 0 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 1 +49 0.544444442 0.107641585 0.8125 1 0 0.2020202 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +24 0.266666681 0.153851435 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative Black Male United-States 0 +32 0.355555564 0.131727174 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +71 0.788888931 0.0708558261 0.5625 0.06767067 0 0.2020202 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +26 0.2888889 0.112716 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +29 0.322222233 0.0351578258 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Protective-serv Not-in-family White Male United-States 0 +50 0.5555556 0.11540205 0.625 1 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.08094066 0.6875 0.03103031 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +17 0.188888893 0.106931679 0.375 0 0 0.2020202 ? 10th Never-married ? Own-child White Female United-States 0 +49 0.544444442 0.114378281 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 1 +31 0.344444454 0.19426015 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.139789388 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +59 0.655555546 0.099485755 0.5625 0 0.5369605 0.4040404 Local-gov HS-grad Widowed Farming-fishing Unmarried White Male United-States 0 +17 0.188888893 0.153817087 0.375 0 0 0.3030303 ? 10th Never-married ? Own-child White Male United-States 0 +43 0.477777779 0.1305862 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.0209017955 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.183841243 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.123609066 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Male United-States 0 +39 0.433333337 0.160580724 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.0130005628 0.75 0.0220202189 0 0.3838384 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 +42 0.466666669 0.228780136 0.8125 0.0861408561 0 0.454545468 Local-gov Bachelors Married-spouse-absent Prof-specialty Not-in-family White Female United-States 1 +35 0.3888889 0.06954917 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +39 0.433333337 0.0534321629 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 +40 0.444444448 0.0909648761 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +66 0.733333349 0.0961288661 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Handlers-cleaners Unmarried White Female Puerto-Rico 0 +30 0.333333343 0.127007723 0.3125 0 0 0.4040404 Federal-gov 9th Married-civ-spouse Tech-support Husband White Male United-States 0 +43 0.477777779 0.0386083424 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 +47 0.5222222 0.120097257 0.3125 0 0 0.5050505 Private 9th Never-married Other-service Unmarried White Female United-States 0 +45 0.5 0.11187879 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female Philippines 0 +31 0.344444454 0.0357256159 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male Trinadad&Tobago 0 +33 0.366666675 0.104628868 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.02397446 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +28 0.311111122 0.289287776 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +50 0.5555556 0.107543252 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +63 0.7 0.101845153 0.25 0 0 0.4040404 Private 7th-8th Divorced Sales Not-in-family White Female United-States 0 +28 0.311111122 0.125810847 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +38 0.422222227 0.13783209 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Unmarried Black Female United-States 0 +52 0.5777778 0.0587355755 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +38 0.422222227 0.0760063455 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 1 +41 0.455555558 0.07227429 0.5625 0.0217402168 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +50 0.5555556 0.142330632 0.875 0 0 0.3838384 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +59 0.655555546 0.123664975 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +32 0.355555564 0.138337255 0.5625 0 0 0.4949495 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +73 0.811111152 0.156846642 0.25 0.0222802218 0 0.1010101 Local-gov 7th-8th Married-civ-spouse Protective-serv Husband White Male United-States 0 +52 0.5777778 0.0680384338 0.5625 0 0 0.3838384 Self-emp-inc HS-grad Divorced Exec-managerial Unmarried White Male United-States 0 +57 0.6333333 0.07711633 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.123861648 0.6875 0.07298073 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.110406443 0.8125 0 0 0.565656543 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 +22 0.244444445 0.209983811 0.4375 0 0 0.353535354 Private 11th Widowed Sales Own-child Black Female United-States 0 +49 0.544444442 0.126846746 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.179950908 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +46 0.51111114 0.0244008079 0.5625 0 0.43663913 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.134531111 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +52 0.5777778 0.124878012 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male ? 0 +43 0.477777779 0.138841718 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +25 0.2777778 0.189979151 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +31 0.344444454 0.223868713 0.25 0 0 0.4040404 Private 7th-8th Never-married Craft-repair Not-in-family White Male United-States 0 +19 0.211111113 0.281755626 0.625 0 0 0.363636374 Private Some-college Never-married Sales Own-child White Male United-States 0 +19 0.211111113 0.177367225 0.625 0 0 0.454545468 ? Some-college Never-married ? Own-child White Male United-States 0 +51 0.566666663 0.10705696 0.5625 0 0 0.8484849 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +51 0.566666663 0.14920944 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 +22 0.244444445 0.136673614 0.5625 1 0 0.4040404 Self-emp-not-inc HS-grad Never-married Prof-specialty Unmarried White Female Dominican-Republic 1 +37 0.411111116 0.0800893158 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +19 0.211111113 0.192946747 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 +45 0.5 0.1292607 0.5625 0 0 0.5555556 Private HS-grad Divorced Transport-moving Unmarried White Female United-States 0 +21 0.233333334 0.09615783 0.625 0 0 0.1010101 State-gov Some-college Never-married Other-service Own-child White Male United-States 0 +52 0.5777778 0.133860931 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +46 0.51111114 0.183726743 0.625 0 0 0.24242425 Local-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +42 0.466666669 0.147876516 0.875 0 0 0.3838384 State-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +56 0.622222245 0.175948754 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.04330288 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +58 0.644444466 0.210230991 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 +70 0.7777778 0.0206862651 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +30 0.333333343 0.165985167 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Male United-States 0 +45 0.5 0.227725372 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 0 +23 0.25555557 0.153729528 0.625 0 0 0.444444448 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +34 0.377777785 0.0420709848 0.625 0 0.3624885 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +38 0.422222227 0.02128571 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Wife White Female United-States 0 +24 0.266666681 0.111169562 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.08191392 0.25 0 0 0.4040404 Private 7th-8th Never-married Transport-moving Not-in-family Amer-Indian-Eskimo Male United-States 0 +45 0.5 0.184005573 0.5625 0.0332503319 0 0.4040404 Federal-gov HS-grad Never-married Transport-moving Not-in-family Black Male United-States 0 +21 0.233333334 0.110234022 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +21 0.233333334 0.362576425 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female Puerto-Rico 0 +34 0.377777785 0.1604669 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +32 0.355555564 0.164790317 0.5625 0.05178052 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.0887792557 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +63 0.7 0.15610981 0.875 0 0 0.3030303 ? Masters Married-civ-spouse ? Husband White Male United-States 0 +23 0.25555557 0.105614923 0.3125 0 0 0.363636374 Private 9th Never-married Handlers-cleaners Own-child Black Male United-States 0 +28 0.311111122 0.159534052 0.8125 0 0 0.5050505 Private Bachelors Divorced Craft-repair Unmarried White Male United-States 0 +29 0.322222233 0.15480651 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Never-married Transport-moving Unmarried Black Male United-States 0 +25 0.2777778 0.128009945 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +44 0.4888889 0.037095584 0.875 0 0 0.6060606 State-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +18 0.2 0.102744319 0.5625 0 0 0.08080808 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +26 0.2888889 0.103343092 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +47 0.5222222 0.115238383 0.75 0 0 0.353535354 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 +23 0.25555557 0.161191627 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +46 0.51111114 0.09362062 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +61 0.677777767 0.06428887 0.8125 0.05178052 0 0.5050505 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.118892305 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +38 0.422222227 0.0487221368 0.5625 0 0 0.545454562 Local-gov HS-grad Married-civ-spouse Protective-serv Husband Asian-Pac-Islander Male United-States 1 +60 0.6666667 0.260160118 0.8125 0 0 0.151515156 ? Bachelors Married-spouse-absent ? Unmarried Black Female United-States 0 +23 0.25555557 0.1587669 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +36 0.4 0.08680782 0.5625 0 0 0.4848485 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +46 0.51111114 0.126103163 0.3125 0 0 0.25252524 Private 9th Divorced Other-service Not-in-family White Male United-States 0 +32 0.355555564 0.200936884 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.1169303 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.152727991 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 +31 0.344444454 0.106342338 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.115249157 0.8125 0 0 0.373737365 State-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +21 0.233333334 0.08507684 0.625 0 0 0.1010101 Private Some-college Never-married Other-service Own-child White Male United-States 0 +63 0.7 0.117207125 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 1 +44 0.4888889 0.0975129753 0.625 0 0 0.454545468 Private Some-college Separated Exec-managerial Not-in-family White Male United-States 1 +42 0.466666669 0.13573201 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.0154683935 0.8125 0 0 0.353535354 ? Bachelors Never-married ? Own-child White Male United-States 0 +30 0.333333343 0.268799543 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.190072775 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male El-Salvador 0 +42 0.466666669 0.06910868 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +44 0.4888889 0.166270077 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Wife White Female Italy 1 +27 0.3 0.342381835 0.8125 0 0 0.4848485 Federal-gov Bachelors Never-married Exec-managerial Not-in-family Black Male United-States 0 +27 0.3 0.17742987 0.625 0 0 0.4040404 Local-gov Some-college Never-married Exec-managerial Unmarried White Male United-States 0 +22 0.244444445 0.1587743 0.5625 0 0 0.454545468 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +68 0.75555557 0.07268111 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +55 0.6111111 0.1242166 0.625 0 0 1 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +22 0.244444445 0.09635719 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Other-service Own-child White Male Greece 0 +25 0.2777778 0.134400442 0.625 0 0 0.151515156 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +68 0.75555557 0.13269639 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +62 0.6888889 0.100772209 0.625 0 0 0.161616161 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 0 +26 0.2888889 0.0226374939 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Other-relative White Male United-States 0 +34 0.377777785 0.129319966 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +68 0.75555557 0.0456595756 0.625 0 0 0.4040404 Private Some-college Widowed Sales Not-in-family White Male United-States 0 +42 0.466666669 0.299980134 0.8125 0 0 0.454545468 Local-gov Bachelors Separated Exec-managerial Not-in-family White Male United-States 1 +45 0.5 0.07562647 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.105912626 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Not-in-family White Male United-States 0 +25 0.2777778 0.07400258 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.08071502 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +29 0.322222233 0.100991778 0.625 0 0.365013778 0.4040404 Private Some-college Never-married Other-service Not-in-family Other Male ? 0 +65 0.722222269 0.0181935132 0.25 0 0 0.5050505 Without-pay 7th-8th Widowed Farming-fishing Unmarried White Female United-States 0 +31 0.344444454 0.0617402121 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +26 0.2888889 0.1820402 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.120745204 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.108990677 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +45 0.5 0.228786871 0.875 0.01506015 0 0.454545468 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +26 0.2888889 0.148108214 0.875 0 0 0.5050505 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +26 0.2888889 0.0617516637 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.127186209 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +38 0.422222227 0.125981927 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.129188627 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 +52 0.5777778 0.121203206 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 0 +39 0.433333337 0.218508065 0.125 0 0 0.454545468 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +41 0.455555558 0.04487895 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +42 0.466666669 0.08198127 0.875 0 0.43663913 0.6060606 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.109135486 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +28 0.311111122 0.147497311 0.6875 0 0 0.464646459 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband Black Male United-States 0 +25 0.2777778 0.08477307 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +35 0.3888889 0.151767522 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.081111066 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +38 0.422222227 0.0806497 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Craft-repair Husband Black Male United-States 1 +44 0.4888889 0.0215531029 0.625 0 0 0.181818187 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +21 0.233333334 0.08368127 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +27 0.3 0.187633917 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 +30 0.333333343 0.155063808 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +30 0.333333343 0.137652934 0.8125 0 0.3996786 0.4848485 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +45 0.5 0.12688446 0.5625 0 0.373737365 0.454545468 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +20 0.222222224 0.111080654 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +57 0.6333333 0.131457761 0.875 0 0 0.8080808 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +43 0.477777779 0.112305142 0.625 0 0 0.4848485 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 +50 0.5555556 0.105076768 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Own-child Black Female United-States 0 +28 0.311111122 0.109483704 0.25 0 0 0.4848485 Private 7th-8th Married-civ-spouse Machine-op-inspct Other-relative Asian-Pac-Islander Female China 0 +25 0.2777778 0.14227137 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Tech-support Other-relative White Female United-States 1 +25 0.2777778 0.11449413 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +90 1 0.1494115 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.172057077 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Unmarried Black Male United-States 0 +35 0.3888889 0.01896673 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Exec-managerial Unmarried White Female United-States 0 +50 0.5555556 0.107239485 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male Canada 1 +26 0.2888889 0.069473736 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.11125847 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +56 0.622222245 0.0214062724 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.167778119 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Protective-serv Unmarried Black Female United-States 0 +46 0.51111114 0.163796857 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +18 0.2 0.103323556 0.4375 0 0 0.25252524 Local-gov 11th Never-married Adm-clerical Other-relative White Female United-States 0 +37 0.411111116 0.2222529 0.875 0 0.5544077 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +57 0.6333333 0.11859528 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +43 0.477777779 0.147195578 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +29 0.322222233 0.204381347 0.8125 0 0 0.25252524 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male Nicaragua 0 +40 0.444444448 0.06910868 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.325452536 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +77 0.8555556 0.0973984748 0.5625 0 0 0.0606060624 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.152227551 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 +21 0.233333334 0.111453116 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +66 0.733333349 0.177568614 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Protective-serv Husband White Male United-States 0 +40 0.444444448 0.135713831 0.4375 0 0 0.353535354 Private 11th Never-married Transport-moving Own-child White Male United-States 0 +68 0.75555557 0.1439478 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +64 0.7111111 0.11482618 0.5625 0 0 0.3838384 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +26 0.2888889 0.144340456 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +32 0.355555564 0.128315732 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.163096383 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +51 0.566666663 0.1076005 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.09943322 0.875 0.1502415 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.180522054 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.127103373 0.8125 0 0 0.2020202 Private Bachelors Never-married Transport-moving Unmarried White Male United-States 0 +29 0.322222233 0.304575652 0.5625 0 0 0.363636374 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +21 0.233333334 0.175689444 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Male United-States 0 +28 0.311111122 0.196250439 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +55 0.6111111 0.127926424 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.0902327448 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male South 1 +35 0.3888889 0.2227136 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +31 0.344444454 0.452892661 0.4375 0 0 0.4040404 ? 11th Separated ? Not-in-family Black Male United-States 0 +26 0.2888889 0.08284407 0.875 0.0861408561 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +30 0.333333343 0.0750418454 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Other-service Husband White Male Germany 0 +33 0.366666675 0.146315262 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.08214157 0.8125 0.135501355 0 0.4040404 Private Bachelors Married-spouse-absent Prof-specialty Not-in-family Asian-Pac-Islander Male Cambodia 1 +23 0.25555557 0.0809399858 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +35 0.3888889 0.231293768 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +48 0.533333361 0.07057968 0.4375 0 0 0.5050505 Self-emp-not-inc 11th Married-civ-spouse Farming-fishing Husband White Male United-States 1 +39 0.433333337 0.318950236 0.375 0 0 0.4040404 Local-gov 10th Divorced Handlers-cleaners Own-child Black Male United-States 0 +53 0.5888889 0.175190359 0.9375 0 0 0.5050505 Local-gov Prof-school Divorced Prof-specialty Not-in-family White Female United-States 0 +49 0.544444442 0.113310054 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +31 0.344444454 0.2347207 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family Black Female United-States 0 +36 0.4 0.0162362214 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +60 0.6666667 0.133058757 0.625 0.07688077 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.2836018 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +54 0.6 0.09352161 0.625 0 0 0.454545468 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.114252329 0.75 0 0 0.0303030312 ? Assoc-acdm Married-AF-spouse ? Wife White Female United-States 0 +34 0.377777785 0.255547076 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.122577891 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family Black Female United-States 0 +19 0.211111113 0.246271148 0.5625 0 0 0.454545468 Private HS-grad Never-married Priv-house-serv Not-in-family White Female ? 0 +26 0.2888889 0.159334019 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +47 0.5222222 0.24477455 0.625 0 0 0.7070707 Private Some-college Never-married Sales Not-in-family White Male United-States 1 +50 0.5555556 0.07567228 0.5625 0 0 0.3838384 Private HS-grad Divorced Exec-managerial Unmarried White Male United-States 0 +30 0.333333343 0.1378752 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Unmarried White Female United-States 1 +44 0.4888889 0.03678239 0.625 0 0 0.5050505 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +49 0.544444442 0.08630132 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +75 0.8333334 0.0206094813 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.255621165 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +51 0.566666663 0.132352218 0.5625 0 0 0.3838384 State-gov HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +35 0.3888889 0.05560162 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +28 0.311111122 0.0700637549 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Female United-States 0 +66 0.733333349 0.197422385 0.5625 0.01409014 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +72 0.8 0.04993652 0.3125 0 0 0.4848485 Private 9th Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female United-States 1 +39 0.433333337 0.1295456 0.8125 0 0 0.5050505 Private Bachelors Separated Sales Not-in-family White Male United-States 0 +27 0.3 0.176787987 0.5625 0 0 0.3030303 Private HS-grad Never-married Farming-fishing Own-child Black Male United-States 0 +57 0.6333333 0.124652378 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative Black Female Jamaica 0 +24 0.266666681 0.199396521 0.25 0.0263502635 0 0.3838384 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.166090235 0.5625 0 0 0.7070707 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +23 0.25555557 0.03668877 0.625 0 0 0.5050505 Private Some-college Married-spouse-absent Other-service Not-in-family White Female United-States 0 +31 0.344444454 0.222983688 0.8125 0 0.323232323 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +23 0.25555557 0.108915918 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +31 0.344444454 0.178443536 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +27 0.3 0.07647647 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.14294894 0.8125 0 0.399449021 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +31 0.344444454 0.114790484 0.9375 0 0 0.8080808 Private Prof-school Never-married Prof-specialty Not-in-family White Female ? 0 +34 0.377777785 0.117064334 0.875 0.0486504845 0 0.6060606 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +57 0.6333333 0.249807209 0.5625 0 0.518365443 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +39 0.433333337 0.340215057 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male Cuba 1 +23 0.25555557 0.1300521 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +24 0.266666681 0.0225176048 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Other-service Wife White Female United-States 0 +36 0.4 0.06944814 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male England 0 +32 0.355555564 0.108009338 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Other-relative White Male Nicaragua 0 +35 0.3888889 0.1378193 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Other-service Own-child White Female United-States 0 +36 0.4 0.0237818286 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.103975542 0.8125 0 0 0.5050505 ? Bachelors Never-married ? Not-in-family White Female United-States 0 +47 0.5222222 0.131185666 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +35 0.3888889 0.104000457 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +44 0.4888889 0.148556784 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +32 0.355555564 0.170642659 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +32 0.355555564 0.142586574 0.75 0 0.3409091 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 +63 0.7 0.1128177 0.625 0.200512 0 0.1010101 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +34 0.377777785 0.154732421 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.124917075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +27 0.3 0.226148635 0.4375 0 0 0.353535354 Private 11th Married-civ-spouse Sales Own-child Black Male United-States 0 +23 0.25555557 0.309856832 0.5625 0 0 0.424242437 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 +19 0.211111113 0.022554649 0.625 0 0 0.4040404 ? Some-college Never-married ? Other-relative Amer-Indian-Eskimo Female United-States 0 +50 0.5555556 0.119164415 0.375 0 0 0.3838384 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.14366962 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +36 0.4 0.056504827 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.130734384 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried White Male United-States 0 +61 0.677777767 0.160712734 0.25 0 0 0.3838384 Private 7th-8th Widowed Other-service Unmarried Black Female United-States 0 +41 0.455555558 0.0765114948 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.140368626 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +53 0.5888889 0.184904069 0.8125 0 0 0.7070707 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +17 0.188888893 0.0404902 0.375 0 0 0.1010101 Self-emp-not-inc 10th Never-married Adm-clerical Own-child White Male United-States 0 +23 0.25555557 0.132562369 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Not-in-family White Male United-States 0 +53 0.5888889 0.112054586 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.2047235 0.5625 0 0.4242424 0.424242437 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.0669399 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Prof-specialty Own-child White Female United-States 0 +22 0.244444445 0.127007723 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +53 0.5888889 0.203992039 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.1908406 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Other-relative Black Male United-States 0 +24 0.266666681 0.157456875 0.625 0 0 0.5050505 Private Some-college Never-married Sales Unmarried White Male Mexico 0 +20 0.222222224 0.114526458 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +30 0.333333343 0.17600736 0.25 0 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.247346789 0.6875 0.0861408561 0 0.4040404 State-gov Assoc-voc Never-married Prof-specialty Not-in-family White Male United-States 1 +34 0.377777785 0.0854297653 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.238501251 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +20 0.222222224 0.118758276 0.5 0 0 0.4040404 Private 12th Never-married Adm-clerical Own-child White Female Mexico 0 +47 0.5222222 0.0573373176 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Asian-Pac-Islander Female United-States 0 +20 0.222222224 0.253568232 0.625 0 0 0.323232323 ? Some-college Never-married ? Own-child White Male United-States 0 +22 0.244444445 0.04210062 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +42 0.466666669 0.07493206 0.875 0 0.453856736 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +60 0.6666667 0.105670154 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.370060056 0.5625 0 0 0.4040404 Private HS-grad Never-married Priv-house-serv Unmarried White Female Mexico 0 +46 0.51111114 0.0200012811 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +66 0.733333349 0.0665701255 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.058024995 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Other-service Wife Asian-Pac-Islander Female United-States 1 +34 0.377777785 0.138068512 0.625 0 0 0.444444448 Private Some-college Divorced Exec-managerial Own-child White Male United-States 0 +45 0.5 0.250478059 0.8125 0 0 0.464646459 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +35 0.3888889 0.06978154 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +63 0.7 0.03694404 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +51 0.566666663 0.0896137655 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +36 0.4 0.08524859 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +25 0.2777778 0.09716341 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 +51 0.566666663 0.108763695 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +25 0.2777778 0.205730438 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +19 0.211111113 0.08419855 0.5625 0 0 0.454545468 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +47 0.5222222 0.204844058 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +59 0.655555546 0.08123971 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Protective-serv Unmarried Black Female United-States 0 +34 0.377777785 0.106248043 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.20030646 0.625 0 0 0.6060606 Private Some-college Separated Exec-managerial Unmarried White Female United-States 0 +42 0.466666669 0.0816909745 0.5625 0 0 0.454545468 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +28 0.311111122 0.207780674 0.5625 0 0 0.171717167 ? HS-grad Married-civ-spouse ? Wife White Female Honduras 0 +37 0.411111116 0.0330806449 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.140298575 0.75 0 0 0.3838384 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +25 0.2777778 0.204776034 0.5625 0 0 0.363636374 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +31 0.344444454 0.139624372 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +37 0.411111116 0.082986854 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +42 0.466666669 0.02257755 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +29 0.322222233 0.276385546 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Not-in-family White Male United-States 0 +35 0.3888889 0.276172042 0.625 0 0 0.5050505 Private Some-college Divorced Sales Not-in-family White Male United-States 0 +51 0.566666663 0.118096866 0.8125 0 0 0.474747479 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.0188165326 0.625 0 0 0.363636374 ? Some-college Never-married ? Own-child White Male United-States 0 +49 0.544444442 0.113295913 0.625 0 0.3409091 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.0846498162 0.8125 0 0 0.161616161 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male Japan 0 +56 0.622222245 0.10832388 0.5625 0 0 0.464646459 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +52 0.5777778 0.179516479 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +61 0.677777767 0.07747196 0.875 0 0 0.04040404 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male ? 0 +47 0.5222222 0.150972083 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 +52 0.5777778 0.101656564 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.23149313 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +43 0.477777779 0.116404273 0.625 1 0 0.5555556 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.110050149 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male ? 0 +17 0.188888893 0.069919616 0.5 0 0 0.4040404 ? 12th Never-married ? Own-child White Male United-States 0 +42 0.466666669 0.144015819 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.142294258 0.625 0 0 0.353535354 Private Some-college Married-spouse-absent Craft-repair Other-relative Black Female Dominican-Republic 0 +58 0.644444466 0.108160213 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +66 0.733333349 0.09864182 0.625 0.0555605553 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.136914074 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +46 0.51111114 0.208724976 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 +45 0.5 0.0178634822 0.625 0 0.43663913 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +57 0.6333333 0.06991894 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Female United-States 0 +25 0.2777778 0.0608141 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +21 0.233333334 0.1224223 0.625 0 0 0.1010101 State-gov Some-college Never-married Tech-support Own-child White Female United-States 0 +37 0.411111116 0.0237959735 0.5625 0 0.383149683 0.5555556 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +45 0.5 0.09144982 0.875 0 0 0.3030303 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +61 0.677777767 0.126740336 1 0 0 0.05050505 ? Doctorate Widowed ? Not-in-family White Female United-States 0 +39 0.433333337 0.120952651 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +42 0.466666669 0.130413786 0.5625 0 0 0.535353541 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +20 0.222222224 0.07333915 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +23 0.25555557 0.134080514 0.5625 0 0 0.161616161 Private HS-grad Never-married Protective-serv Own-child Black Male United-States 0 +25 0.2777778 0.29742676 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 +47 0.5222222 0.124774955 0.1875 0 0 0.4040404 Private 5th-6th Never-married Priv-house-serv Own-child White Female El-Salvador 0 +24 0.266666681 0.07362203 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Own-child White Male United-States 0 +20 0.222222224 0.055130817 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child Asian-Pac-Islander Female United-States 0 +35 0.3888889 0.0159095582 0.5625 0 0 0.7070707 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.09778239 0.5625 0 0 0.3838384 Local-gov HS-grad Married-civ-spouse Other-service Wife Black Female Jamaica 1 +47 0.5222222 0.0205933172 0.625 0 0 0.5050505 State-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +28 0.311111122 0.0879770741 0.4375 0 0 0.4040404 State-gov 11th Separated Adm-clerical Unmarried Asian-Pac-Islander Female India 0 +41 0.455555558 0.0149221569 0.875 0 0 0.6060606 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +31 0.344444454 0.07168899 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.0537392944 0.875 0 0 0.25252524 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +47 0.5222222 0.220149457 0.6875 0.0501305 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.055130817 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family Asian-Pac-Islander Female United-States 0 +61 0.677777767 0.08145255 0.625 0 0 0.4040404 Private Some-college Never-married Priv-house-serv Not-in-family White Female United-States 0 +42 0.466666669 0.103147089 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Other-relative White Female Puerto-Rico 0 +46 0.51111114 0.0186360255 0.5625 0 0 0.282828271 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.07102017 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.114356056 0.875 0 0 0.3838384 Local-gov Masters Widowed Prof-specialty Unmarried White Female United-States 0 +49 0.544444442 0.08250326 0.5625 0 0 0.4040404 Private HS-grad Widowed Tech-support Unmarried White Male United-States 0 +56 0.622222245 0.16344662 0.625 0 0 0.4040404 Local-gov Some-college Widowed Adm-clerical Unmarried White Female United-States 0 +52 0.5777778 0.03699927 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Own-child White Female United-States 0 +34 0.377777785 0.140982226 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male Puerto-Rico 0 +25 0.2777778 0.190361723 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.0660360157 0.4375 0 0 0.4040404 Private 11th Never-married Prof-specialty Own-child White Female United-States 0 +58 0.644444466 0.126278967 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.0405373462 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +29 0.322222233 0.0509515367 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.1354983 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +30 0.333333343 0.0130005628 0.625 0 0 0.4848485 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +21 0.233333334 0.202607259 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 +44 0.4888889 0.0987798944 0.875 0 0.4331956 0.353535354 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +75 0.8333334 0.06862441 0.375 0 0 0.7070707 Private 10th Widowed Priv-house-serv Not-in-family White Female United-States 0 +66 0.733333349 0.0793275461 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +26 0.2888889 0.0409010537 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 +33 0.366666675 0.135894343 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +57 0.6333333 0.08032101 0.875 0.1502415 0 0.656565666 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.08158119 0.1875 0 0 0.5555556 Self-emp-not-inc 5th-6th Married-civ-spouse Sales Husband White Male Italy 1 +41 0.455555558 0.1482665 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.04084246 0.625 0 0 0.373737365 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +17 0.188888893 0.1315157 0.4375 0 0 0.171717167 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +61 0.677777767 0.0764758 0.8125 0 0 0.5555556 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +47 0.5222222 0.22337772 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Wife White Female United-States 1 +22 0.244444445 0.0677488148 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child Black Female United-States 0 +47 0.5222222 0.200800836 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +45 0.5 0.1632587 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.133270249 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Divorced Sales Unmarried White Male United-States 0 +59 0.655555546 0.102361754 0.375 0 0 0.3030303 Private 10th Separated Priv-house-serv Not-in-family Black Female United-States 0 +38 0.422222227 0.186802775 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.08435952 0.5625 0 0 0.4040404 Private HS-grad Separated Protective-serv Own-child White Female United-States 0 +41 0.455555558 0.1496203 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.181984976 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.1144975 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +27 0.3 0.241903275 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +60 0.6666667 0.08351289 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +64 0.7111111 0.17921406 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.135738075 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +54 0.6 0.121036842 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.265152335 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 +34 0.377777785 0.164441422 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 1 +41 0.455555558 0.295476884 0.875 0 0 0.05050505 Self-emp-not-inc Masters Divorced Sales Unmarried White Male United-States 1 +35 0.3888889 0.1398042 0.25 0 0 0.75757575 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +63 0.7 0.0364058875 0.875 0 0 0.686868668 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +46 0.51111114 0.126342267 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative White Male United-States 0 +47 0.5222222 0.051930856 0.875 0 0 0.4040404 Self-emp-not-inc Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +24 0.266666681 0.2377644 0.8125 0 0 0.656565666 Private Bachelors Never-married Machine-op-inspct Not-in-family White Male United-States 0 +29 0.322222233 0.0364590958 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +74 0.822222233 0.026867291 0.625 0 0 0.181818187 Federal-gov Some-college Widowed Transport-moving Not-in-family White Female United-States 0 +50 0.5555556 0.10566207 0.4375 0 0 0.7070707 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 1 +22 0.244444445 0.239566788 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +48 0.533333361 0.2021735 0.5 0 0 0.4040404 Private 12th Separated Adm-clerical Own-child Black Female United-States 0 +30 0.333333343 0.32916978 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Other-relative White Male Mexico 0 +32 0.355555564 0.105938219 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.1243742 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +49 0.544444442 0.144250214 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +25 0.2777778 0.129418984 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +50 0.5555556 0.09244463 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +44 0.4888889 0.251262039 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +65 0.722222269 0.0608720258 0.6875 0.06767067 0 0.6060606 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +28 0.311111122 0.123358518 0.75 0 0 0.6060606 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 +55 0.6111111 0.152998745 0.8125 0 0 0.4040404 Private Bachelors Widowed Adm-clerical Unmarried White Female United-States 0 +49 0.544444442 0.0229143165 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +31 0.344444454 0.111232877 0.5625 0 0 0.121212125 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 +47 0.5222222 0.1425657 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female United-States 1 +45 0.5 0.241722092 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +35 0.3888889 0.03213231 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +34 0.377777785 0.206762969 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male South 0 +49 0.544444442 0.0354211777 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Protective-serv Not-in-family Black Male United-States 0 +39 0.433333337 0.120799758 0.625 0 0 0.353535354 ? Some-college Divorced ? Not-in-family White Female United-States 0 +27 0.3 0.106523521 0.5625 0 0 0.424242437 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +42 0.466666669 0.04718446 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +60 0.6666667 0.08880687 0.1875 0 0 0.3030303 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 1 +64 0.7111111 0.119771272 0.5625 0.010550105 0 0.4040404 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family White Male United-States 0 +33 0.366666675 0.08568369 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.11799179 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.0958352 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.149069354 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +53 0.5888889 0.1532978 0.5625 0 0 0.373737365 Private HS-grad Divorced Sales Not-in-family White Female Mexico 0 +22 0.244444445 0.1538703 0.375 0 0 0.3030303 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 +57 0.6333333 0.0265237875 0.5625 0 0 0.353535354 State-gov HS-grad Separated Other-service Not-in-family White Female United-States 0 +20 0.222222224 0.0652399 0.625 0 0 0.08080808 ? Some-college Never-married ? Own-child White Female United-States 0 +23 0.25555557 0.226550058 0.25 0 0 0.4040404 Private 7th-8th Never-married Craft-repair Own-child Black Male United-States 0 +31 0.344444454 0.173532113 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Unmarried White Male United-States 0 +23 0.25555557 0.158855125 0.8125 0 0 0.222222224 State-gov Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +30 0.333333343 0.182242945 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +32 0.355555564 0.150130838 0.8125 0 0 0.5050505 Local-gov Bachelors Separated Prof-specialty Not-in-family White Female United-States 1 +42 0.466666669 0.06685099 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife Black Female United-States 1 +51 0.566666663 0.151385635 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male Cuba 0 +59 0.655555546 0.117232718 0.8125 0.1502415 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.0857449844 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +45 0.5 0.228669 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family Black Male United-States 0 +35 0.3888889 0.120106019 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male Germany 1 +33 0.366666675 0.1278658 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +43 0.477777779 0.108314447 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +60 0.6666667 0.139869541 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Wife White Female United-States 1 +37 0.411111116 0.10803628 0.8125 0 0 0.5555556 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.114678 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Unmarried White Female United-States 0 +36 0.4 0.1243742 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +38 0.422222227 0.227870181 0.9375 0 0.453856736 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +54 0.6 0.0680384338 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.137617916 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +45 0.5 0.162557542 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +63 0.7 0.146826476 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +51 0.566666663 0.08630873 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +58 0.644444466 0.110503435 0.875 0 0 0.181818187 Self-emp-not-inc Masters Divorced Sales Not-in-family White Male United-States 0 +64 0.7111111 0.05311897 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +20 0.222222224 0.1594721 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +44 0.4888889 0.161337778 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 +39 0.433333337 0.02291903 0.8125 0 0 0.4848485 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +45 0.5 0.139992118 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +44 0.4888889 0.118498288 1 0 0 0.5555556 Private Doctorate Married-civ-spouse Adm-clerical Husband White Male United-States 1 +22 0.244444445 0.147130236 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +63 0.7 0.145370975 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.105728753 0.6875 0 0 0.4040404 Private Assoc-voc Separated Other-service Not-in-family Black Male United-States 0 +42 0.466666669 0.148613364 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +20 0.222222224 0.147061542 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +29 0.322222233 0.16261211 0.875 0.07298073 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.08350682 0.8125 0 0.3996786 0.4040404 Local-gov Bachelors Never-married Exec-managerial Unmarried Asian-Pac-Islander Male Vietnam 0 +25 0.2777778 0.04936267 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +27 0.3 0.275221676 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Other-relative White Male United-States 0 +46 0.51111114 0.113948561 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.0369965769 0.625 0 0 0.6060606 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +24 0.266666681 0.206626236 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Exec-managerial Own-child White Male United-States 0 +43 0.477777779 0.107461751 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.324698865 0.5 0 0 0.212121218 Private 12th Never-married Machine-op-inspct Own-child White Male Mexico 0 +32 0.355555564 0.1926989 0.5625 0 0 0.373737365 Local-gov HS-grad Never-married Transport-moving Unmarried Black Female United-States 0 +44 0.4888889 0.113123484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Poland 0 +40 0.444444448 0.140795648 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.07073257 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +23 0.25555557 0.0187080931 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Not-in-family White Male United-States 0 +19 0.211111113 0.163629144 0.625 0 0.3677686 0.1010101 Private Some-college Never-married Sales Own-child White Female United-States 0 +41 0.455555558 0.08005159 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +48 0.533333361 0.08053115 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.132569775 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.185465127 0.75 0 0 0.353535354 Private Assoc-acdm Widowed Other-service Own-child White Female United-States 0 +42 0.466666669 0.151675254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.222120225 0.375 0 0 0.1010101 Private 10th Never-married Sales Other-relative White Female United-States 0 +29 0.322222233 0.07234501 0.9375 0 0 0.7070707 Local-gov Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 +21 0.233333334 0.174101934 0.625 0 0 0.2020202 State-gov Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +18 0.2 0.0809878 0.4375 0 0 0.272727281 ? 11th Never-married ? Own-child White Male United-States 0 +31 0.344444454 0.147846878 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 1 +27 0.3 0.0196496956 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 +29 0.322222233 0.0269972831 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male Canada 0 +23 0.25555557 0.058953125 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +41 0.455555558 0.07838527 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 +46 0.51111114 0.145627588 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.18054159 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Protective-serv Other-relative Black Female Haiti 0 +42 0.466666669 0.08198127 0.5625 0 0 0.24242425 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.135987282 0.5625 0 0.3946281 0.151515156 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +46 0.51111114 0.0734752044 0.5625 0 0 0.373737365 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +18 0.2 0.233300224 0.4375 0 0 0.151515156 ? 11th Never-married ? Own-child White Male United-States 0 +52 0.5777778 0.191370681 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +56 0.622222245 0.0963356346 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +21 0.233333334 0.143206224 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Own-child White Male United-States 0 +22 0.244444445 0.134040773 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +31 0.344444454 0.08008392 0.8125 0 0 0.454545468 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 +41 0.455555558 0.08746856 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +25 0.2777778 0.106351092 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.23529321 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +45 0.5 0.106879823 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Not-in-family White Female United-States 0 +26 0.2888889 0.260378331 0.625 0 0 0.6060606 Private Some-college Divorced Tech-support Not-in-family White Male United-States 0 +90 1 0.0352837779 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Male United-States 0 +45 0.5 0.1662896 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.12823087 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Wife White Female United-States 1 +42 0.466666669 0.0255060773 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.146700531 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +53 0.5888889 0.100884691 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +64 0.7111111 0.135577783 0.5625 0 0 0.3838384 State-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +56 0.622222245 0.08672699 0.25 0 0 0.2020202 Private 7th-8th Widowed Transport-moving Not-in-family White Male United-States 0 +42 0.466666669 0.01848448 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Prof-specialty Not-in-family White Male United-States 1 +26 0.2888889 0.0420541465 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 +31 0.344444454 0.102192692 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Adm-clerical Own-child Amer-Indian-Eskimo Female United-States 0 +40 0.444444448 0.0200989433 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 +58 0.644444466 0.08864253 0.625 0 0 0.4040404 Private Some-college Widowed Craft-repair Not-in-family White Male United-States 0 +41 0.455555558 0.0744673163 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +58 0.644444466 0.128335938 0.5625 0 0 0.474747479 Self-emp-inc HS-grad Never-married Sales Not-in-family White Male United-States 0 +62 0.6888889 0.02232228 0.875 0 0 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +65 0.722222269 0.09380449 0.8125 1 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.158033416 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +45 0.5 0.160561189 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +22 0.244444445 0.310388267 0.5625 0 0 0.5555556 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +23 0.25555557 0.163796857 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child Asian-Pac-Islander Male China 0 +63 0.7 0.0659087151 0.875 0 0 0.5050505 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.05196049 0.8125 0 0.4331956 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.135288164 0.625 0 0 0.4040404 Private Some-college Widowed Craft-repair Unmarried White Male United-States 0 +25 0.2777778 0.0276869815 0.8125 0 0 0.4040404 ? Bachelors Married-spouse-absent ? Not-in-family White Male Canada 0 +56 0.622222245 0.0521416739 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +32 0.355555564 0.159472764 0.625 0 0 0.5050505 Private Some-college Divorced Sales Not-in-family White Male United-States 0 +53 0.5888889 0.116584107 0.625 0 0.4331956 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female Philippines 1 +32 0.355555564 0.158364117 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Not-in-family White Male United-States 0 +23 0.25555557 0.190343544 0.4375 0.07688077 0 0.6060606 Self-emp-not-inc 11th Married-civ-spouse Transport-moving Husband White Male United-States 1 +35 0.3888889 0.134227335 0.4375 0 0 0.909090936 Private 11th Separated Transport-moving Not-in-family White Male United-States 0 +51 0.566666663 0.129088953 0.625 0 0.4331956 0.656565666 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.02915394 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +41 0.455555558 0.108329266 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Machine-op-inspct Not-in-family White Male Guatemala 0 +22 0.244444445 0.155299544 0.375 0 0 0.25252524 Private 10th Never-married Transport-moving Own-child White Male United-States 0 +23 0.25555557 0.118661962 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Own-child White Female United-States 0 +36 0.4 0.07837112 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Taiwan 1 +27 0.3 0.170992225 0.625 0 0 0.25252524 ? Some-college Divorced ? Not-in-family White Female United-States 0 +45 0.5 0.07259826 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Canada 0 +23 0.25555557 0.3499867 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male Mexico 0 +21 0.233333334 0.128954917 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Unmarried Black Female United-States 0 +44 0.4888889 0.133549765 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.144714266 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.04369555 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +18 0.2 0.454919338 0.3125 0.005940059 0 0.4040404 Private 9th Never-married Handlers-cleaners Own-child White Male United-States 0 +62 0.6888889 0.09077089 0.5 0 0 0.4040404 Self-emp-not-inc 12th Married-civ-spouse Craft-repair Husband White Male United-States 1 +25 0.2777778 0.139651984 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Exec-managerial Not-in-family Black Male United-States 0 +34 0.377777785 0.04366524 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 +31 0.344444454 0.148222044 0.8125 0.143441439 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 +37 0.411111116 0.05558074 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.119020954 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male England 0 +22 0.244444445 0.146440536 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 +28 0.311111122 0.07536851 0.75 0 0 0.3030303 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.1326479 0.625 0 0 0.25252524 ? Some-college Separated ? Own-child White Male United-States 0 +47 0.5222222 0.32463488 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +67 0.7444445 0.124271154 0.4375 0 0.09618916 0.0303030312 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +20 0.222222224 0.08170849 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 +34 0.377777785 0.106701337 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.172424823 0.9375 1 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.1238576 0.625 0.07298073 0 0.444444448 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.0287828222 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +22 0.244444445 0.122430384 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 +47 0.5222222 0.124566838 0.625 0 0 0.353535354 Private Some-college Separated Other-service Not-in-family Black Female United-States 0 +33 0.366666675 0.07223523 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Adm-clerical Not-in-family White Male United-States 0 +34 0.377777785 0.1450672 0.875 0.04787048 0 0.4040404 Self-emp-inc Masters Separated Prof-specialty Not-in-family White Female United-States 1 +25 0.2777778 0.08284407 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +37 0.411111116 0.5110106 0.3125 0.0378103778 0 0.5050505 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +36 0.4 0.112214886 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +61 0.677777767 0.129359037 0.8125 0 0 0.3030303 Local-gov Bachelors Separated Prof-specialty Not-in-family White Male ? 0 +74 0.822222233 0.229634181 0.3125 0.0347103477 0 0.4040404 ? 9th Married-civ-spouse ? Husband White Male United-States 0 +57 0.6333333 0.138551429 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Poland 0 +55 0.6111111 0.0454299 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male England 0 +20 0.222222224 0.163047209 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family Black Female United-States 0 +43 0.477777779 0.0872718841 0.5625 0 0 0.444444448 Private HS-grad Never-married Sales Not-in-family Black Female United-States 0 +54 0.6 0.121998645 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male England 1 +25 0.2777778 0.14299272 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 +42 0.466666669 0.0561801866 0.625 0 0.323232323 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +23 0.25555557 0.100188926 0.625 0 0 0.353535354 ? Some-college Never-married ? Not-in-family White Female United-States 0 +17 0.188888893 0.213969111 0.4375 0 0 0.1010101 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +39 0.433333337 0.0700381547 0.5625 0 0.365013778 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 +63 0.7 0.0206115022 0.25 0 0 0.4040404 Private 7th-8th Married-spouse-absent Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 +19 0.211111113 0.1164494 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +56 0.622222245 0.1426573 0.8125 0.1502415 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.2101798 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.04404242 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.135043666 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.162969753 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +30 0.333333343 0.0528926626 0.5625 0 0 0.656565666 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male Canada 1 +22 0.244444445 0.127937883 0.8125 0 0 0.5555556 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +35 0.3888889 0.07502299 0.625 0 0.3624885 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +20 0.222222224 0.162962347 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +18 0.2 0.23106207 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +25 0.2777778 0.203720614 0.5 0 0.3996786 0.4040404 Private 12th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +53 0.5888889 0.105639167 0.875 0 0.359045 0.545454562 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 +21 0.233333334 0.0536995567 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +19 0.211111113 0.03723568 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Female United-States 0 +34 0.377777785 0.343074232 0.5625 0 0 0.3030303 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +32 0.355555564 0.0794279 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 +20 0.222222224 0.09271269 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child Amer-Indian-Eskimo Male United-States 0 +70 0.7777778 0.08827343 0.25 0 0 0.25252524 Private 7th-8th Married-civ-spouse Other-service Husband White Male United-States 0 +57 0.6333333 0.233691543 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.123668343 0.625 0.031370312 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.0907500163 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +48 0.533333361 0.02458603 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.168465123 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 +45 0.5 0.222626716 0.5625 0.0332503319 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +27 0.3 0.26118052 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +51 0.566666663 0.02793417 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband White Male Mexico 0 +36 0.4 0.214838639 0.625 0 0 0.656565666 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +33 0.366666675 0.0580202825 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Asian-Pac-Islander Male Philippines 0 +50 0.5555556 0.122003362 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 +44 0.4888889 0.2197285 0.8125 0 0.5847107 0.5050505 Private Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 +39 0.433333337 0.103708148 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.0400544219 0.3125 0 0 0.25252524 Self-emp-not-inc 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +24 0.266666681 0.0856325 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +35 0.3888889 0.0918317139 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +32 0.355555564 0.236157358 0.5 0 0 0.4040404 Self-emp-not-inc 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +66 0.733333349 0.119452015 0.8125 0 0.499081731 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +68 0.75555557 0.11190708 0.5625 0 0.5064279 0.3030303 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.08184993 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.180100426 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 +61 0.677777767 0.0559336729 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.108067937 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +55 0.6111111 0.08361055 0.9375 0 0.5544077 0.353535354 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male Greece 1 +20 0.222222224 0.193763077 0.625 0 0 0.363636374 ? Some-college Never-married ? Own-child White Male United-States 0 +41 0.455555558 0.103854977 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +36 0.4 0.198778212 0.5625 0 0 0.8484849 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +60 0.6666667 0.161999181 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +61 0.677777767 0.16440101 0.5625 0 0 0.5252525 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.239946663 0.9375 0 0 0.353535354 Private Prof-school Married-civ-spouse Sales Husband Asian-Pac-Islander Male China 0 +42 0.466666669 0.197878376 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.0298429653 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +44 0.4888889 0.1417972 0.625 0 0 0.4040404 Local-gov Some-college Never-married Other-service Unmarried Black Female United-States 0 +31 0.344444454 0.102217615 0.875 0 0 0.25252524 State-gov Masters Never-married Adm-clerical Not-in-family White Male United-States 0 +39 0.433333337 0.18022503 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Not-in-family Black Male United-States 0 +20 0.222222224 0.06748007 0.625 0 0 0.24242425 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +32 0.355555564 0.07526478 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.115235686 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +61 0.677777767 0.239539176 0.3125 0 0 0.2020202 Private 9th Married-civ-spouse Machine-op-inspct Husband Black Male Trinadad&Tobago 0 +54 0.6 0.09273088 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.0477495529 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Other-relative White Male United-States 0 +19 0.211111113 0.115380496 0.5625 0 0 0.0303030312 Private HS-grad Never-married Sales Own-child White Male United-States 0 +31 0.344444454 0.06802496 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 +35 0.3888889 0.0430529974 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +29 0.322222233 0.0221572649 0.5625 0 0 0.25252524 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +29 0.322222233 0.16963236 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Not-in-family Black Female United-States 0 +25 0.2777778 0.2324509 0.375 0 0 0.25252524 Private 10th Separated Other-service Own-child White Female United-States 0 +46 0.51111114 0.0580721423 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 +35 0.3888889 0.116417065 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Other-service Unmarried White Female United-States 0 +20 0.222222224 0.115442462 0.375 0 0 0.4040404 Private 10th Never-married Sales Not-in-family Other Male United-States 0 +24 0.266666681 0.117458351 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +48 0.533333361 0.1394607 0.5625 0 0 0.373737365 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +37 0.411111116 0.196167588 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +60 0.6666667 0.151125655 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.07126871 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.121853165 0.625 0 0 0.3838384 Local-gov Some-college Separated Adm-clerical Unmarried White Female United-States 0 +31 0.344444454 0.08267569 0.6875 0 0 0.2020202 Self-emp-not-inc Assoc-voc Divorced Craft-repair Own-child White Male United-States 0 +38 0.422222227 0.0209260434 0.6875 0.04386044 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.19151482 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 +64 0.7111111 0.215107381 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.11734587 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Protective-serv Not-in-family Black Male United-States 0 +69 0.7666667 0.12390206 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +39 0.433333337 0.08605885 0.5625 0.03103031 0 0.444444448 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +48 0.533333361 0.05432123 0.5625 0 0 0.5555556 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +46 0.51111114 0.04229325 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Other-relative White Female United-States 0 +42 0.466666669 0.129124641 0.8125 0 0.365013778 0.4040404 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 +39 0.433333337 0.159985989 0.5625 0 0 0.545454562 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife Black Female Dominican-Republic 1 +50 0.5555556 0.0135912523 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Tech-support Husband White Male United-States 1 +24 0.266666681 0.209722474 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.291347444 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Other-relative White Female Canada 1 +39 0.433333337 0.2222529 0.8125 0 0.5544077 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +29 0.322222233 0.0843197852 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.230985954 0.4375 0 0 0.3838384 Private 11th Never-married Transport-moving Own-child White Female United-States 0 +21 0.233333334 0.148066461 0.6875 0 0 0.4040404 ? Assoc-voc Never-married ? Not-in-family White Male United-States 0 +32 0.355555564 0.08313369 0.375 0 0 0.4040404 Private 10th Separated Craft-repair Not-in-family White Male United-States 0 +69 0.7666667 0.0466146469 0.8125 0.03818038 0 0.3030303 Self-emp-inc Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +55 0.6111111 0.0446930528 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Unmarried White Male United-States 0 +41 0.455555558 0.13194339 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.103139684 0.8125 0.07688077 0 0.5252525 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.155502275 0.4375 0 0 0.4040404 Private 11th Never-married Adm-clerical Not-in-family White Male United-States 0 +74 0.822222233 0.0621658862 0.8125 0 0 0.1010101 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +40 0.444444448 0.124701545 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.2002391 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +75 0.8333334 0.111031488 0.3125 0.01409014 0 0.05050505 ? 9th Married-civ-spouse ? Husband Black Male United-States 0 +55 0.6111111 0.09780664 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +52 0.5777778 0.163225025 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 +54 0.6 0.162013337 0.625 0 0 0.4848485 Private Some-college Divorced Sales Unmarried White Female United-States 0 +36 0.4 0.0705675557 0.5625 0 0 0.4848485 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +76 0.844444454 0.102917418 0.625 0 0 0.08080808 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +26 0.2888889 0.122358315 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +18 0.2 0.279867053 0.4375 0 0 0.2020202 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +38 0.422222227 0.174284458 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +50 0.5555556 0.05983815 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 +19 0.211111113 0.2402612 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Female United-States 0 +32 0.355555564 0.106713459 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +57 0.6333333 0.138886854 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +20 0.222222224 0.0348998643 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Own-child Black Male United-States 0 +27 0.3 0.170952484 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.108940832 0.8125 0 0.454545438 0.6060606 Self-emp-not-inc Bachelors Married-spouse-absent Exec-managerial Not-in-family White Male United-States 0 +60 0.6666667 0.109750427 0.1875 0 0 0.4040404 Private 5th-6th Divorced Machine-op-inspct Not-in-family White Female Puerto-Rico 0 +52 0.5777778 0.10980431 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +61 0.677777767 0.09886678 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +57 0.6333333 0.04937614 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Widowed Craft-repair Not-in-family White Male United-States 1 +19 0.211111113 0.09689938 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +59 0.655555546 0.07019307 0.9375 0 0 0.25252524 Self-emp-not-inc Prof-school Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.232844234 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 +31 0.344444454 0.09009871 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Craft-repair Not-in-family Asian-Pac-Islander Male United-States 1 +42 0.466666669 0.14103274 0.5625 0 0 0.353535354 Private HS-grad Divorced Protective-serv Not-in-family Black Male United-States 0 +70 0.7777778 0.1766984 0.625 0 0 0.0606060624 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.186936125 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male ? 1 +47 0.5222222 0.117548607 0.5625 0.0394203924 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male ? 0 +29 0.322222233 0.3302555 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +27 0.3 0.142499685 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Other-relative Black Male United-States 0 +25 0.2777778 0.2525202 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Other-service Wife White Female United-States 0 +51 0.566666663 0.07188499 0.8125 0.05178052 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.116958588 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female ? 0 +35 0.3888889 0.1175971 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.15729253 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +54 0.6 0.114356056 0.875 0 0 0.4040404 ? Masters Never-married ? Not-in-family White Female United-States 0 +46 0.51111114 0.08969391 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.133914813 0.6875 0 0 0.353535354 Private Assoc-voc Separated Other-service Unmarried White Female United-States 0 +65 0.722222269 0.117232718 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +43 0.477777779 0.12709327 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Machine-op-inspct Not-in-family White Male United-States 0 +41 0.455555558 0.06108419 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Prof-specialty Unmarried Asian-Pac-Islander Female United-States 0 +34 0.377777785 0.183156252 0.8125 0 0.3996786 0.454545468 Private Bachelors Never-married Exec-managerial Other-relative White Female United-States 0 +47 0.5222222 0.0689423159 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +49 0.544444442 0.143912762 0.875 0 0 0.565656543 Federal-gov Masters Never-married Exec-managerial Not-in-family White Male United-States 1 +21 0.233333334 0.198550552 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +20 0.222222224 0.106148362 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +18 0.2 0.0908833742 0.5 0 0 0.4040404 Local-gov 12th Never-married Protective-serv Own-child White Male United-States 0 +27 0.3 0.314017951 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family Black Male United-States 0 +34 0.377777785 0.07542576 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.178235412 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +24 0.266666681 0.143750444 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +34 0.377777785 0.187926218 0.625 0 0 0.656565666 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +47 0.5222222 0.111764289 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +27 0.3 0.126855507 0.5625 0 0 0.4040404 Federal-gov HS-grad Separated Exec-managerial Unmarried Black Female United-States 0 +63 0.7 0.10682863 0.6875 0 0 0.08080808 Private Assoc-voc Widowed Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.1300164 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +25 0.2777778 0.1337855 0.625 0 0 0.5050505 Private Some-college Married-spouse-absent Sales Not-in-family White Male United-States 0 +54 0.6 0.1184828 0.5625 0.009140091 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried White Male United-States 0 +19 0.211111113 0.129839256 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 +35 0.3888889 0.06828764 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +24 0.266666681 0.0409394465 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +26 0.2888889 0.123407684 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +59 0.655555546 0.06787611 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.0387955867 1 0 0 0.4040404 Private Doctorate Married-spouse-absent Prof-specialty Not-in-family White Female ? 0 +20 0.222222224 0.117237434 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +41 0.455555558 0.20643495 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +51 0.566666663 0.16820918 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +27 0.3 0.06265285 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Other Female United-States 0 +36 0.4 0.03342482 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.04247443 0.625 0 0 0.6060606 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +55 0.6111111 0.216093436 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.0833344 0.625 0 0 0.212121218 Local-gov Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +58 0.644444466 0.07443701 1 0.0406404063 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 +43 0.477777779 0.100807905 0.625 0.0406404063 0 0.151515156 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +39 0.433333337 0.116134182 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 1 +40 0.444444448 0.145561576 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Unmarried Black Female Haiti 0 +46 0.51111114 0.117335767 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +54 0.6 0.117924437 0.5625 0 0 0.2020202 Federal-gov HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.0869256854 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child Black Male United-States 0 +24 0.266666681 0.08170849 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +53 0.5888889 0.122123249 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +24 0.266666681 0.1123799 0.875 0 0 0.13131313 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +29 0.322222233 0.0199473966 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +56 0.622222245 0.07111312 0.625 0.07688077 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.0841871 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +21 0.233333334 0.10002593 0.625 0 0 0.3030303 ? Some-college Never-married ? Not-in-family White Female United-States 0 +34 0.377777785 0.15507862 0.3125 0 0 0.4040404 Private 9th Separated Craft-repair Not-in-family White Male ? 0 +56 0.622222245 0.07939692 0.4375 0 0 0.4040404 Private 11th Divorced Machine-op-inspct Not-in-family White Female United-States 0 +34 0.377777785 0.1370023 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.300543875 0.375 0 0 0.4040404 Private 10th Never-married Sales Unmarried Black Female United-States 0 +32 0.355555564 0.07431173 0.5625 0 0 0.656565666 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +48 0.533333361 0.1400588 0.5625 0 0 0.5252525 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +67 0.7444445 0.03067074 0.875 0 0 0.4040404 ? Masters Married-civ-spouse ? Husband Black Male United-States 1 +47 0.5222222 0.126846746 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +52 0.5777778 0.09943322 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +40 0.444444448 0.103588931 0.125 0 0 0.4040404 Private 1st-4th Married-spouse-absent Machine-op-inspct Unmarried White Female Dominican-Republic 0 +28 0.311111122 0.13725017 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.113201618 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +57 0.6333333 0.234679624 0.125 0 0 0.4040404 Private 1st-4th Divorced Craft-repair Unmarried White Male Portugal 0 +51 0.566666663 0.0696481839 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.102408223 0.4375 0 0 0.353535354 ? 11th Never-married ? Not-in-family White Female Germany 0 +36 0.4 0.10318885 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 0 +33 0.366666675 0.2196423 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.160410315 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +50 0.5555556 0.14907743 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Other-relative Asian-Pac-Islander Female Philippines 0 +33 0.366666675 0.121678047 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Craft-repair Not-in-family White Male ? 0 +77 0.8555556 0.0978840962 0.5625 0.00401004 0 0.2020202 Self-emp-not-inc HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +39 0.433333337 0.212686032 0.875 0.0861408561 0 0.5252525 Private Masters Never-married Exec-managerial Not-in-family Black Male United-States 1 +67 0.7444445 0.101377718 0.5625 0 0 0.0303030312 ? HS-grad Widowed ? Unmarried White Male United-States 0 +35 0.3888889 0.219438881 0.75 0 0 0.24242425 Private Assoc-acdm Divorced Handlers-cleaners Unmarried White Female United-States 0 +23 0.25555557 0.09024352 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Own-child Black Female United-States 0 +37 0.411111116 0.18140237 0.6875 0.0861408561 0 0.454545468 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 1 +41 0.455555558 0.123393536 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +60 0.6666667 0.0512741581 0.75 0 0 0.353535354 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 +32 0.355555564 0.131939352 0.8125 0 0 0.5555556 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +56 0.622222245 0.109204859 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +45 0.5 0.0253733918 0.6875 0 0 0.4040404 State-gov Assoc-voc Divorced Tech-support Unmarried White Female United-States 0 +24 0.266666681 0.108915918 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 1 +18 0.2 0.0542976558 0.375 0 0 0.272727281 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 +31 0.344444454 0.1409546 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Other Male United-States 0 +21 0.233333334 0.0231985487 0.625 0 0 0.5050505 ? Some-college Never-married ? Own-child White Male United-States 0 +45 0.5 0.129881024 0.8125 0 0.453856736 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.136889145 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +45 0.5 0.06890797 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +18 0.2 0.02749974 0.4375 0 0 0.25252524 Private 11th Never-married Sales Other-relative Amer-Indian-Eskimo Female United-States 0 +25 0.2777778 0.0409010537 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +31 0.344444454 0.07858598 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +19 0.211111113 0.03843659 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 +41 0.455555558 0.2053647 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +74 0.822222233 0.06842437 0.9375 0 0 0.2020202 Private Prof-school Widowed Adm-clerical Not-in-family Black Female United-States 0 +27 0.3 0.1738406 0.1875 0 0 0.4040404 Private 5th-6th Never-married Transport-moving Not-in-family White Male Mexico 0 +23 0.25555557 0.162446409 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.08407529 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.05160958 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +41 0.455555558 0.1773679 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +25 0.2777778 0.09136158 0.875 0 0 0.2020202 Private Masters Never-married Sales Not-in-family White Male United-States 0 +42 0.466666669 0.165437579 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 +24 0.266666681 0.14196828 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Female United-States 0 +42 0.466666669 0.15881 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.107878 0.375 0 0 0.7070707 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.020698389 0.5625 0.07298073 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.2117424 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.05491192 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +54 0.6 0.123158477 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.199903682 0.4375 0 0.307621658 0.4040404 Federal-gov 11th Never-married Tech-support Not-in-family White Male United-States 0 +32 0.355555564 0.130952612 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +40 0.444444448 0.047581844 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +55 0.6111111 0.0955119058 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +66 0.733333349 0.07602251 0.4375 0 0 0.3030303 ? 11th Never-married ? Not-in-family White Male United-States 0 +52 0.5777778 0.0480526462 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +21 0.233333334 0.229951411 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +33 0.366666675 0.08011086 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +52 0.5777778 0.1076005 0.6875 0 0 0.5050505 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 1 +28 0.311111122 0.08655524 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Not-in-family White Female ? 0 +27 0.3 0.1543236 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.09615109 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +27 0.3 0.16425553 0.625 0 0 0.454545468 Self-emp-inc Some-college Never-married Adm-clerical Own-child White Female United-States 0 +47 0.5222222 0.143557146 0.6875 0.07688077 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.132589981 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.0933693945 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.108664013 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Widowed Other-service Not-in-family White Female Nicaragua 0 +50 0.5555556 0.18423593 0.25 0 0 0.4949495 Private 7th-8th Married-civ-spouse Sales Husband Other Male Dominican-Republic 0 +32 0.355555564 0.07788146 0.625 0.04101041 0 0.5050505 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.125248447 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +23 0.25555557 0.225200966 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +43 0.477777779 0.0647280142 0.875 0 0 0.5050505 Private Masters Married-spouse-absent Exec-managerial Not-in-family White Male United-States 0 +34 0.377777785 0.143615067 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Iran 1 +19 0.211111113 0.0776235 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male Vietnam 0 +37 0.411111116 0.124644965 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 0 +27 0.3 0.0994392857 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Other-relative Asian-Pac-Islander Female Hong 0 +18 0.2 0.188790366 0.5625 0 0 0.24242425 Private HS-grad Never-married Sales Own-child White Female United-States 0 +31 0.344444454 0.110133663 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 +49 0.544444442 0.186861366 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +26 0.2888889 0.139410183 0.9375 0 0 0.6060606 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male Columbia 0 +48 0.533333361 0.07341054 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.194349051 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +41 0.455555558 0.118588544 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried White Female United-States 0 +48 0.533333361 0.123584151 0.6875 0 0 0.565656543 State-gov Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 1 +40 0.444444448 0.109930933 0.8125 0.105201051 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 +70 0.7777778 0.0637783259 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +20 0.222222224 0.0797882453 0.5625 0 0 0.434343427 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +38 0.422222227 0.274174333 0.1875 0 0 0.75757575 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 +37 0.411111116 0.164064243 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Separated Other-service Own-child White Female Cuba 0 +49 0.544444442 0.0155411344 0.625 0 0 0.4040404 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 1 +51 0.566666663 0.160122722 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +43 0.477777779 0.126820475 0.125 0 0 0.4040404 Private 1st-4th Never-married Sales Own-child White Male United-States 0 +38 0.422222227 0.1913956 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 +18 0.2 0.2852149 0.4375 0 0 0.363636374 ? 11th Never-married ? Own-child White Male United-States 0 +23 0.25555557 0.193763077 0.25 0 0 0.25252524 Private 7th-8th Never-married Other-service Not-in-family White Male Mexico 0 +34 0.377777785 0.343074232 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.09388465 0.625 0 0 0.24242425 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +33 0.366666675 0.0619409271 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Male United-States 0 +31 0.344444454 0.0791578144 0.625 0 0 0.454545468 Private Some-college Never-married Farming-fishing Not-in-family White Female United-States 0 +64 0.7111111 0.06152266 0.625 0 0 0.4040404 Private Some-college Widowed Tech-support Unmarried White Female United-States 0 +26 0.2888889 0.226960242 0.8125 0 0 0.282828271 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male El-Salvador 0 +55 0.6111111 0.171996459 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +61 0.677777767 0.112931527 0.8125 0 0 0.4040404 Local-gov Bachelors Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 +37 0.411111116 0.1424485 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +78 0.8666667 0.09173405 0.8125 0 0 0.151515156 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +27 0.3 0.27602455 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +49 0.544444442 0.1271788 0.5625 0 0 0.424242437 Private HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 +55 0.6111111 0.09855561 0.875 0.07688077 0 0.454545468 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.103976212 0.8125 0 0 0.5858586 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +22 0.244444445 0.145862654 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Other-relative White Female United-States 0 +61 0.677777767 0.132878929 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +64 0.7111111 0.06783974 0.8125 0 0 0.05050505 Self-emp-not-inc Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +46 0.51111114 0.254341453 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +24 0.266666681 0.09831179 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +27 0.3 0.241553709 0.625 0.0282902829 0 0.7070707 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.1047272 0.5625 0.07688077 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +18 0.2 0.0386696346 0.625 0 0 0.151515156 Private Some-college Divorced Other-service Own-child White Male United-States 0 +48 0.533333361 0.21581459 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.1177015 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +40 0.444444448 0.15448457 0.875 0 0 0.454545468 State-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +56 0.622222245 0.106072254 0.375 0 0 0.4040404 Self-emp-not-inc 10th Divorced Sales Own-child White Male United-States 0 +34 0.377777785 0.0624245219 0.5625 0.0486504845 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +56 0.622222245 0.0682546347 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +18 0.2 0.08934569 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 +21 0.233333334 0.02331507 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +40 0.444444448 0.14743872 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 +27 0.3 0.137467042 0.5625 0 0 0.5050505 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Other-relative White Male United-States 0 +52 0.5777778 0.0431365147 0.9375 1 0 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.127811924 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +23 0.25555557 0.0176789332 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +50 0.5555556 0.0620183833 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +19 0.211111113 0.18863748 0.625 0 0 0.5050505 Private Some-college Never-married Machine-op-inspct Other-relative White Male United-States 0 +20 0.222222224 0.150911465 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +39 0.433333337 0.124954119 0.625 0.0861408561 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 1 +24 0.266666681 0.178868532 0.4375 0 0 0.353535354 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +72 0.8 0.0719941 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.026662536 0.875 0 0 0.2020202 State-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +42 0.466666669 0.103139684 0.8125 0 0 0.454545468 Private Bachelors Divorced Sales Unmarried White Male ? 0 +51 0.566666663 0.141382977 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family Amer-Indian-Eskimo Male United-States 0 +39 0.433333337 0.09710279 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.0339744277 0.625 0.0297702979 0 0.353535354 Local-gov Some-college Never-married Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 +34 0.377777785 0.0603783242 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +19 0.211111113 0.185820758 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male Mexico 0 +26 0.2888889 0.156016186 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 +45 0.5 0.151190981 0.8125 0.049340494 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 1 +28 0.311111122 0.2392792 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 +30 0.333333343 0.0460226126 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +32 0.355555564 0.124880031 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.0590373166 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +21 0.233333334 0.193205386 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +54 0.6 0.06513752 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Priv-house-serv Other-relative Black Female United-States 0 +62 0.6888889 0.107861832 0.9375 0 0 0.3030303 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.125900432 0.625 0.02597026 0 0.4848485 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +49 0.544444442 0.0738901 0.625 0 0 0.323232323 Self-emp-inc Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +32 0.355555564 0.06347052 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.151733175 0.625 0 0.3677686 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Male ? 0 +37 0.411111116 0.200342163 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +58 0.644444466 0.138678059 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Other-relative White Female United-States 0 +37 0.411111116 0.06312163 0.625 0.07298073 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +41 0.455555558 0.1311439 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +38 0.422222227 0.159217492 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.127380863 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +42 0.466666669 0.241581336 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Unmarried Black Male United-States 0 +30 0.333333343 0.1343964 0.5625 0 0.43663913 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +43 0.477777779 0.08632691 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +34 0.377777785 0.155746773 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +57 0.6333333 0.199468583 0.625 0.005940059 0 0.1010101 Private Some-college Divorced Exec-managerial Other-relative White Female United-States 0 +46 0.51111114 0.111808747 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +32 0.355555564 0.189557523 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.128127143 0.3125 0 0 0.111111112 Private 9th Never-married Machine-op-inspct Own-child White Female Nicaragua 0 +47 0.5222222 0.08218872 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Sales Not-in-family White Male United-States 0 +55 0.6111111 0.138429523 0.5625 0 0 0.2020202 ? HS-grad Divorced ? Not-in-family White Male United-States 0 +53 0.5888889 0.117263705 0.25 0.04386044 0 0.5050505 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male Greece 1 +43 0.477777779 0.08450231 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +80 0.8888889 0.124155983 0.25 0 0 0.3030303 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +24 0.266666681 0.14234814 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female Mexico 0 +43 0.477777779 0.09923049 0.875 0 0.453856736 0.6060606 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.150193483 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +40 0.444444448 0.152203977 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Not-in-family Black Male United-States 0 +48 0.533333361 0.08158119 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.441862881 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +34 0.377777785 0.233556166 0.4375 0 0 0.8484849 ? 11th Divorced ? Own-child White Male United-States 0 +51 0.566666663 0.157645464 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.206448421 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.0785085261 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +34 0.377777785 0.115281492 0.625 0 0 0.3030303 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +24 0.266666681 0.134040773 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +41 0.455555558 0.298717946 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Transport-moving Husband White Male Canada 1 +24 0.266666681 0.020078063 0.5625 0 0 0.3838384 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +22 0.244444445 0.160860911 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 +32 0.355555564 0.381299317 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +41 0.455555558 0.171780929 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +20 0.222222224 0.293831438 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 +31 0.344444454 0.202523068 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 +55 0.6111111 0.09703679 0.8125 0 0 0.181818187 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +49 0.544444442 0.09019772 1 0 0.43663913 0.6060606 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Black Male ? 1 +26 0.2888889 0.127141088 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 +27 0.3 0.202583686 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +35 0.3888889 0.0181766748 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.117461048 0.5625 0 0 0.6060606 Private HS-grad Divorced Other-service Not-in-family White Male Greece 0 +59 0.655555546 0.060813427 0.625 0 0 0.343434334 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +61 0.677777767 0.123751856 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.0830286145 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Female United-States 0 +43 0.477777779 0.125894368 0.875 0 0 0.6060606 Federal-gov Masters Divorced Protective-serv Not-in-family White Male United-States 1 +61 0.677777767 0.02933512 0.1875 0 0.5369605 0.4040404 Private 5th-6th Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +54 0.6 0.120058194 0.75 0 0 0.3030303 Private Assoc-acdm Widowed Adm-clerical Unmarried White Female United-States 0 +30 0.333333343 0.172347367 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +20 0.222222224 0.04330288 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +27 0.3 0.131186336 0.875 0 0 0.5050505 State-gov Masters Never-married Prof-specialty Not-in-family White Female Germany 0 +44 0.4888889 0.0896205 0.625 0 0 0.6060606 Self-emp-inc Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +64 0.7111111 0.173775941 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Not-in-family White Female Cuba 0 +55 0.6111111 0.0621099845 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.0228631273 0.5625 0.068490684 0 0.5555556 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +61 0.677777767 0.103083104 0.5625 0 0 0.353535354 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +28 0.311111122 0.129453331 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 0 +34 0.377777785 0.239489332 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried Black Female United-States 0 +47 0.5222222 0.0938018039 0.9375 0 0.453856736 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.0231709331 0.8125 0 0 0.454545468 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +35 0.3888889 0.0174815878 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Unmarried Amer-Indian-Eskimo Male United-States 0 +36 0.4 0.141178891 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +47 0.5222222 0.1133444 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.199021354 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Own-child Black Female United-States 0 +35 0.3888889 0.128574371 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.110587627 0.875 0 0 0.2020202 Private Masters Never-married Prof-specialty Own-child White Male United-States 0 +25 0.2777778 0.145490184 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 +18 0.2 0.261040419 0.375 0 0 0.1010101 Private 10th Never-married Sales Own-child White Male United-States 0 +47 0.5222222 0.12688446 0.875 0 0 0.3838384 State-gov Masters Separated Prof-specialty Not-in-family White Male United-States 0 +44 0.4888889 0.117525704 0.5625 0 0 0.3030303 Private HS-grad Widowed Other-service Unmarried Black Female United-States 0 +41 0.455555558 0.02102842 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +30 0.333333343 0.183505148 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +53 0.5888889 0.102816388 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +53 0.5888889 0.0703257546 0.5625 0 0 0.2020202 Private HS-grad Widowed Other-service Unmarried Black Female United-States 0 +40 0.444444448 0.07135155 0.5625 0.0501305 0 0.2020202 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +24 0.266666681 0.255314022 0.625 0 0.506198347 0.24242425 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +27 0.3 0.144714266 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 +50 0.5555556 0.160122722 0.1875 0 0 0.373737365 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male Mexico 0 +36 0.4 0.106817178 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.159843877 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 1 +41 0.455555558 0.0159263965 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +31 0.344444454 0.113988973 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.3061268 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +22 0.244444445 0.08779926 0.625 0 0 0.4848485 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +22 0.244444445 0.288061261 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Own-child White Male United-States 0 +18 0.2 0.0245240647 0.5 0 0 0.3030303 Local-gov 12th Never-married Prof-specialty Own-child White Male United-States 0 +39 0.433333337 0.3694404 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 0 +38 0.422222227 0.126128763 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +35 0.3888889 0.09480133 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.219300136 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +54 0.6 0.118410058 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.0722716 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +63 0.7 0.0277233534 0.5625 0 0 0.5555556 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +39 0.433333337 0.2706477 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +57 0.6333333 0.238301888 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +58 0.644444466 0.235676453 0.9375 0 0.453856736 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.108761005 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female Japan 0 +17 0.188888893 0.269565344 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 +40 0.444444448 0.247546151 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +69 0.7666667 0.04667998 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +28 0.311111122 0.182100832 0.375 0 0 0.4040404 Private 10th Divorced Sales Not-in-family White Female United-States 0 +38 0.422222227 0.0698798746 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.05066798 0.9375 0.14084141 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 +45 0.5 0.08928575 0.9375 0 0.396235079 0.4040404 Local-gov Prof-school Divorced Prof-specialty Unmarried Black Female United-States 0 +33 0.366666675 0.0535998754 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +41 0.455555558 0.232116148 0.625 0 0.3409091 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 1 +37 0.411111116 0.125519216 0.5625 0.07688077 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.08195905 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +48 0.533333361 0.0505851358 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +26 0.2888889 0.126855507 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +36 0.4 0.1659919 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.057309702 0.625 0 0 0.373737365 Private Some-college Never-married Other-service Own-child White Female United-States 0 +37 0.411111116 0.3674016 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Farming-fishing Husband White Male United-States 0 +20 0.222222224 0.164332986 0.625 0 0 0.2020202 State-gov Some-college Never-married Prof-specialty Own-child White Female United-States 0 +54 0.6 0.0220771134 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +28 0.311111122 0.248611 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Other-relative White Female United-States 0 +27 0.3 0.146291688 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +33 0.366666675 0.100504816 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Unmarried Black Female United-States 0 +46 0.51111114 0.109135486 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +28 0.311111122 0.1062925 0.4375 0 0 0.5858586 ? 11th Divorced ? Unmarried White Female Canada 0 +17 0.188888893 0.121044248 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 +40 0.444444448 0.226003826 0.9375 0 0.5610652 0.454545468 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 +47 0.5222222 0.06890797 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +44 0.4888889 0.247691631 0.125 0 0 0.4040404 Private 1st-4th Never-married Machine-op-inspct Not-in-family White Female El-Salvador 0 +25 0.2777778 0.0661956444 0.5 0 0 0.434343427 Private 12th Never-married Handlers-cleaners Unmarried White Male United-States 0 +35 0.3888889 0.0779899061 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +29 0.322222233 0.1870998 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 +30 0.333333343 0.06966704 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 +30 0.333333343 0.02535588 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +56 0.622222245 0.259736449 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Divorced Other-service Unmarried White Female United-States 0 +25 0.2777778 0.141629487 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +28 0.311111122 0.2258745 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +43 0.477777779 0.18331252 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.100353271 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +46 0.51111114 0.07640171 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.08927767 0.875 0 0 0.353535354 State-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +38 0.422222227 0.0777481049 0.75 0.07688077 0 0.333333343 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 +29 0.322222233 0.15349178 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Other-relative Black Male United-States 0 +25 0.2777778 0.33879593 0.1875 0 0 0.4040404 Private 5th-6th Never-married Craft-repair Not-in-family White Male Mexico 0 +56 0.622222245 0.168971613 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.2747549 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +22 0.244444445 0.09980906 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Other-relative White Male United-States 0 +31 0.344444454 0.107308865 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +28 0.311111122 0.225208372 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Not-in-family White Female United-States 0 +53 0.5888889 0.132233679 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +45 0.5 0.182421431 0.875 0 0 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 1 +71 0.788888931 0.158333808 0.0625 0 0 0.1010101 Private Preschool Widowed Craft-repair Unmarried Black Male United-States 0 +65 0.722222269 0.2203495 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Unmarried White Female United-States 0 +39 0.433333337 0.126887828 0.5625 0.07298073 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.02058254 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-AF-spouse Sales Wife White Female United-States 0 +34 0.377777785 0.1718173 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +36 0.4 0.167043284 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +40 0.444444448 0.117541872 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Other-service Own-child White Female United-States 0 +90 1 0.1158183 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Own-child White Female Puerto-Rico 0 +56 0.622222245 0.130079716 0.9375 0 0 0.161616161 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 0 +21 0.233333334 0.07319299 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 +48 0.533333361 0.125393257 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.2349652 0.625 0 0 0.272727281 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 +46 0.51111114 0.183085531 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +64 0.7111111 0.100091264 0.375 0 0 0.353535354 Private 10th Separated Other-service Not-in-family White Female United-States 0 +29 0.322222233 0.08350682 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Own-child Asian-Pac-Islander Male Taiwan 0 +22 0.244444445 0.0167683139 0.5625 0 0 0.3030303 Private HS-grad Divorced Tech-support Unmarried White Female Germany 0 +47 0.5222222 0.386327922 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Transport-moving Husband White Male Italy 1 +67 0.7444445 0.07151253 0.8125 0 0.549127638 0.75757575 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.207291692 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +42 0.466666669 0.13509351 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +31 0.344444454 0.0397944376 0.625 0 0.3838384 0.5050505 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +53 0.5888889 0.24116306 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Unmarried White Female United-States 0 +81 0.900000036 0.0772342 0.3125 0.0206202064 0 0.05050505 Private 9th Widowed Priv-house-serv Not-in-family Black Female United-States 0 +33 0.366666675 0.17649433 0.5625 0 0.261248857 0.4040404 Local-gov HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +17 0.188888893 0.138754845 0.5 0 0 0.08080808 Private 12th Never-married Other-service Own-child White Female United-States 0 +55 0.6111111 0.123842113 0.9375 0 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Exec-managerial Husband White Male ? 1 +28 0.311111122 0.107092656 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +24 0.266666681 0.1049488 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +40 0.444444448 0.06469636 0.5625 0 0 0.454545468 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +30 0.333333343 0.08875568 0.875 0 0 0.4040404 Local-gov Masters Never-married Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.153978735 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Unmarried White Female United-States 0 +26 0.2888889 0.133469611 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Wife White Female United-States 0 +38 0.422222227 0.0249396358 0.625 0 0 0.3838384 Private Some-college Divorced Sales Unmarried White Female United-States 0 +30 0.333333343 0.119420357 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +33 0.366666675 0.09703207 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +40 0.444444448 0.0987798944 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +63 0.7 0.0181207713 0.5625 0 0 0.989899 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +23 0.25555557 0.160918832 0.25 0 0 0.363636374 Private 7th-8th Never-married Craft-repair Other-relative White Male United-States 0 +56 0.622222245 0.114600547 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried Black Male United-States 0 +42 0.466666669 0.0187384021 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +40 0.444444448 0.148487419 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male Canada 0 +49 0.544444442 0.06824251 0.75 0 0.43663913 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Wife White Female United-States 1 +35 0.3888889 0.11709936 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Not-in-family Asian-Pac-Islander Male ? 0 +52 0.5777778 0.0613239668 0.5625 0 0 0.353535354 Private HS-grad Divorced Machine-op-inspct Own-child Black Female United-States 0 +28 0.311111122 0.201182052 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +35 0.3888889 0.139557689 0.375 0 0 0.7070707 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +21 0.233333334 0.15518032 0.625 0 0 0.05050505 ? Some-college Never-married ? Own-child White Female United-States 0 +43 0.477777779 0.121639654 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.134064347 0.6875 0 0 0.02020202 ? Assoc-voc Never-married ? Unmarried White Female United-States 0 +29 0.322222233 0.0893686 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Never-married Prof-specialty Own-child White Male Italy 1 +23 0.25555557 0.161690712 0.8125 0 0 0.25252524 Private Bachelors Never-married Machine-op-inspct Own-child White Male United-States 0 +50 0.5555556 0.119690448 0.625 0 0.399449021 0.4848485 Local-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +34 0.377777785 0.344419271 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Male United-States 0 +19 0.211111113 0.060211964 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +47 0.5222222 0.161270425 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Wife Black Female United-States 0 +37 0.411111116 0.0249133669 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +25 0.2777778 0.05184734 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 +75 0.8333334 0.134752691 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.306418449 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.07221502 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Tech-support Own-child Asian-Pac-Islander Male United-States 0 +17 0.188888893 0.122630425 0.4375 0 0 0.161616161 Local-gov 11th Never-married Other-service Own-child White Female United-States 0 +31 0.344444454 0.118784539 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +31 0.344444454 0.304710358 0.0625 0 0 0.353535354 Private Preschool Never-married Other-service Other-relative White Female Mexico 0 +18 0.2 0.20030646 0.5625 0 0 0.1010101 ? HS-grad Never-married ? Own-child White Male United-States 0 +45 0.5 0.05710899 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.125807479 0.5625 0 0 0.424242437 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +27 0.3 0.114273205 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.08482022 0.625 0 0.383149683 0.3838384 Private Some-college Widowed Exec-managerial Unmarried Black Female United-States 0 +22 0.244444445 0.02387545 0.5625 0 0 0.222222224 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +34 0.377777785 0.151914358 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 0 +26 0.2888889 0.1622154 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +53 0.5888889 0.07000111 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +60 0.6666667 0.156676248 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.194347024 0.875 0 0 0.5050505 Local-gov Masters Separated Prof-specialty Unmarried White Female United-States 0 +40 0.444444448 0.148587763 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +48 0.533333361 0.017609559 0.375 0 0 0.8080808 Self-emp-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +23 0.25555557 0.180860847 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +68 0.75555557 0.090090625 0.25 0 0 0.1010101 ? 7th-8th Widowed ? Not-in-family Black Male United-States 0 +42 0.466666669 0.0816754848 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.0200807564 0.5625 0 0 0.858585835 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +27 0.3 0.1304643 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Own-child White Female United-States 0 +38 0.422222227 0.123444729 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.110420592 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male Ireland 0 +75 0.8333334 0.127036691 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +49 0.544444442 0.06921981 0.8125 0 0 0.5252525 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.05767139 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +36 0.4 0.165076569 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Farming-fishing Not-in-family White Male Mexico 0 +36 0.4 0.08839399 0.8125 0.03103031 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.122633114 0.5625 0 0 0.353535354 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 +36 0.4 0.125981927 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +53 0.5888889 0.06103839 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband Black Male United-States 0 +27 0.3 0.0255491845 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +34 0.377777785 0.122702494 0.5625 0.0332503319 0 0.353535354 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +61 0.677777767 0.4825309 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +29 0.322222233 0.128350079 0.5625 0 0 0.565656543 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 +40 0.444444448 0.09536103 0.625 0 0 0.353535354 State-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +37 0.411111116 0.0666401759 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 +22 0.244444445 0.13587144 0.3125 0 0 0.3030303 Private 9th Never-married Handlers-cleaners Other-relative White Male United-States 0 +43 0.477777779 0.1181952 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +55 0.6111111 0.10046979 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +28 0.311111122 0.07811047 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.108915918 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Own-child White Female United-States 0 +64 0.7111111 0.164950609 0.4375 0 0 0.4040404 Local-gov 11th Married-civ-spouse Craft-repair Husband Black Male United-States 1 +46 0.51111114 0.104845069 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +29 0.322222233 0.07594371 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +44 0.4888889 0.12014845 0.875 0 0 0.4848485 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male India 0 +20 0.222222224 0.0296786241 0.625 0 0 0.25252524 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +62 0.6888889 0.08145659 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Sales Not-in-family White Male United-States 0 +49 0.544444442 0.111223444 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Exec-managerial Unmarried White Female Columbia 0 +29 0.322222233 0.06762623 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Farming-fishing Wife Amer-Indian-Eskimo Female United-States 0 +35 0.3888889 0.243744045 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male Japan 0 +39 0.433333337 0.113062195 0.4375 0 0 0.3030303 Local-gov 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +39 0.433333337 0.13669382 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +37 0.411111116 0.146957144 0.5625 0 0 0.323232323 Private HS-grad Divorced Machine-op-inspct Other-relative White Female United-States 0 +38 0.422222227 0.158255011 0.5625 0.0282902829 0 0.3030303 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +72 0.8 0.119367823 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +31 0.344444454 0.175072491 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +55 0.6111111 0.127653643 0.25 0 0 0.6060606 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.0235710125 0.625 0 0 0.4040404 Private Some-college Separated Other-service Unmarried White Female United-States 0 +33 0.366666675 0.07582921 0.625 0 0 0.25252524 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +25 0.2777778 0.0792002454 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.09782011 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 +37 0.411111116 0.179891631 0.6875 0 0 0.5252525 Private Assoc-voc Divorced Tech-support Unmarried White Female United-States 0 +49 0.544444442 0.0299278311 0.625 0 0 0.353535354 Private Some-college Divorced Tech-support Other-relative White Male United-States 0 +26 0.2888889 0.06474687 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +35 0.3888889 0.122167036 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.113722928 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +37 0.411111116 0.183044448 0.875 0 0 0.454545468 Private Masters Separated Exec-managerial Not-in-family White Male United-States 1 +42 0.466666669 0.131094053 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +64 0.7111111 0.131267831 1 0.04787048 0 0.4040404 State-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 +28 0.311111122 0.0893686 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +35 0.3888889 0.125175044 0.5625 0.046500463 0 0.5050505 Self-emp-not-inc HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +40 0.444444448 0.124184944 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +55 0.6111111 0.182432875 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.156169742 0.5625 0 0 0.656565666 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +49 0.544444442 0.0242687948 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family Black Female United-States 0 +51 0.566666663 0.11649587 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +57 0.6333333 0.06624211 0.9375 0 0.43663913 0.4040404 Private Prof-school Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 1 +51 0.566666663 0.0162894316 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.036323715 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family Black Male ? 0 +24 0.266666681 0.057309702 0.5625 0 0.404499531 0.323232323 Private HS-grad Never-married Sales Own-child White Female United-States 0 +45 0.5 0.06396018 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male England 0 +28 0.311111122 0.32387647 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +42 0.466666669 0.126423776 0.9375 0 0.5544077 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.03520026 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.03545216 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +60 0.6666667 0.118052408 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried White Female United-States 0 +31 0.344444454 0.220801443 0.5625 0 0.5137741 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried White Female United-States 0 +47 0.5222222 0.08479261 0.625 0 0 0.75757575 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.05270744 0.5625 0 0 0.25252524 ? HS-grad Divorced ? Not-in-family White Male United-States 0 +30 0.333333343 0.268623739 0.5625 0 0 0.6060606 Private HS-grad Married-AF-spouse Adm-clerical Husband White Male United-States 0 +61 0.677777767 0.140714154 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +71 0.788888931 0.246510923 0.8125 0 0 0.0606060624 Local-gov Bachelors Widowed Prof-specialty Unmarried White Female United-States 0 +42 0.466666669 0.2072048 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +44 0.4888889 0.0222724378 0.5 0 0 0.5555556 Local-gov 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.171273753 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.08447267 0.9375 0 0 0.5252525 Local-gov Prof-school Never-married Exec-managerial Not-in-family Black Female United-States 1 +27 0.3 0.0194301233 0.8125 0 0 0.09090909 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +40 0.444444448 0.184161171 0.6875 0 0 0.151515156 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 0 +21 0.233333334 0.13115266 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative White Female Mexico 0 +25 0.2777778 0.1314187 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +61 0.677777767 0.0830286145 0.1875 0 0.430670351 0.565656543 Private 5th-6th Divorced Transport-moving Not-in-family White Male United-States 0 +54 0.6 0.14825505 0.625 0 0 0.3030303 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 +31 0.344444454 0.178962156 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +53 0.5888889 0.188003 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +39 0.433333337 0.08267097 0.75 0.1502415 0 0.5555556 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +57 0.6333333 0.116288424 0.9375 0.1502415 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Transport-moving Husband White Male United-States 1 +48 0.533333361 0.08028464 0.8125 0 0 0.444444448 Private Bachelors Divorced Sales Unmarried White Female United-States 0 +30 0.333333343 0.0726023 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +35 0.3888889 0.160262823 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +42 0.466666669 0.04353188 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.06482433 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +59 0.655555546 0.243478671 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +69 0.7666667 0.08274371 0.375 0 0 0.2020202 Local-gov 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.116960607 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.110906206 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +21 0.233333334 0.06646304 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Male United-States 0 +40 0.444444448 0.165372252 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 +43 0.477777779 0.0372424163 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.0946875 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +41 0.455555558 0.05374603 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Prof-specialty Not-in-family Asian-Pac-Islander Male Japan 1 +72 0.8 0.07613903 0.5625 0 0 0.3030303 ? HS-grad Widowed ? Not-in-family White Male United-States 0 +20 0.222222224 0.190946355 0.625 0 0 0.3030303 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +41 0.455555558 0.03442502 0.8125 0 0 0.4040404 Local-gov Bachelors Widowed Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.156579927 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +48 0.533333361 0.118636362 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Unmarried Black Female United-States 0 +27 0.3 0.203174368 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 +35 0.3888889 0.253555417 0.625 0.1502415 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.129701868 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child Black Male United-States 0 +27 0.3 0.154780239 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +20 0.222222224 0.227411509 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +18 0.2 0.088131316 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 +32 0.355555564 0.199556142 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.1795946 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.07417501 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Own-child White Male United-States 0 +28 0.311111122 0.0607501157 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.0269575436 0.9375 0 0 0.3838384 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.09720585 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +74 0.822222233 0.109341592 0.625 0 0 0.4040404 Self-emp-inc Some-college Widowed Exec-managerial Unmarried White Male United-States 0 +28 0.311111122 0.1138738 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +23 0.25555557 0.07651419 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +20 0.222222224 0.105842575 0.625 0 0.518365443 0.1010101 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 +44 0.4888889 0.07494755 0.5625 0 0 0.565656543 Private HS-grad Divorced Machine-op-inspct Unmarried Black Female United-States 0 +46 0.51111114 0.06875171 0.5625 0 0 0.25252524 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +20 0.222222224 0.122662082 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +51 0.566666663 0.09793798 0.8125 0.1502415 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.128053725 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Not-in-family White Female United-States 0 +48 0.533333361 0.22326456 0.9375 0 0.453856736 0.4040404 Private Prof-school Married-civ-spouse Tech-support Husband White Male United-States 1 +60 0.6666667 0.114577644 0.3125 0 0.3838384 0.8484849 Self-emp-not-inc 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +48 0.533333361 0.130118787 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.180229753 0.8125 0 0 0.7070707 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +48 0.533333361 0.13502413 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.11826323 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +24 0.266666681 0.217321292 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +45 0.5 0.177800983 0.625 0 0 0.4040404 State-gov Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +18 0.2 0.179353476 0.5 0 0 0.353535354 Private 12th Never-married Sales Own-child White Female United-States 0 +39 0.433333337 0.187368542 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +65 0.722222269 0.0548344627 0.5625 0 0.5399449 0.656565666 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +22 0.244444445 0.149352908 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Own-child White Female United-States 0 +20 0.222222224 0.0948094055 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.138984516 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.119090326 0.9375 1 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.165222719 0.8125 0 0.453856736 0.4848485 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +61 0.677777767 0.08417228 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 +28 0.311111122 0.08051768 0.625 0.07688077 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Own-child White Male United-States 1 +18 0.2 0.1206994 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +24 0.266666681 0.0296860319 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 0 +45 0.5 0.120103993 1 0 0 0.565656543 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.1480119 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +44 0.4888889 0.133572668 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.113264926 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 +35 0.3888889 0.2403427 0.625 0.0282902829 0 0.5555556 Private Some-college Married-civ-spouse Tech-support Husband White Male Poland 0 +52 0.5777778 0.141937956 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.116664253 0.75 0.0235402342 0 0.454545468 Private Assoc-acdm Never-married Farming-fishing Not-in-family White Male United-States 0 +19 0.211111113 0.08784977 0.1875 0 0 0.363636374 Private 5th-6th Never-married Farming-fishing Not-in-family White Male Mexico 0 +35 0.3888889 0.114372216 0.8125 0 0 0.2020202 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +54 0.6 0.133010268 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +21 0.233333334 0.1044423 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +26 0.2888889 0.0210748948 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +42 0.466666669 0.0364395641 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.122277491 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +55 0.6111111 0.103376769 0.875 0 0.453856736 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.236564174 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +25 0.2777778 0.08889039 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +26 0.2888889 0.13513729 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +64 0.7111111 0.180201456 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Separated Prof-specialty Not-in-family White Female United-States 1 +41 0.455555558 0.121152014 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Unmarried Other Female United-States 0 +25 0.2777778 0.160210282 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Black Male ? 0 +43 0.477777779 0.202415973 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +45 0.5 0.04560906 0.5625 0.105201051 0 0.4848485 Private HS-grad Never-married Craft-repair Own-child White Male United-States 1 +48 0.533333361 0.219604567 0.8125 0 0 0.444444448 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +60 0.6666667 0.1287717 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +45 0.5 0.021668952 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 +51 0.566666663 0.1703389 0.375 0 0.453856736 0.4040404 Private 10th Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.225172013 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +22 0.244444445 0.05637753 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +44 0.4888889 0.108152129 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.13725017 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.221330166 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.199089378 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +40 0.444444448 0.117446229 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.166869521 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.134197712 0.375 0 0 0.4040404 ? 10th Divorced ? Not-in-family White Female United-States 0 +26 0.2888889 0.09428944 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.06444378 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 0 +55 0.6111111 0.127926424 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.335948884 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +24 0.266666681 0.119569883 0.8125 0 0 0.151515156 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +64 0.7111111 0.101111673 1 0 0 0.25252524 Self-emp-not-inc Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.08786527 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.08020382 0.5625 0 0 0.4949495 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.148810029 0.5625 0.07298073 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.06347052 0.9375 0 0 0.424242437 Private Prof-school Never-married Prof-specialty Own-child White Male United-States 1 +21 0.233333334 0.20601669 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +59 0.655555546 0.0417726077 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Craft-repair Not-in-family Black Male United-States 0 +58 0.644444466 0.158700883 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male Germany 1 +43 0.477777779 0.166709214 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried White Male United-States 0 +21 0.233333334 0.185710967 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +45 0.5 0.04909797 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +53 0.5888889 0.0744323 0.5625 0 0 0.5050505 Local-gov HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +41 0.455555558 0.117153242 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Adm-clerical Husband White Male ? 1 +27 0.3 0.135138631 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Wife White Female Mexico 0 +53 0.5888889 0.142556265 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male ? 1 +38 0.422222227 0.1634803 0.875 0 0 0.353535354 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.0751442239 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.120921664 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +22 0.244444445 0.225427285 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +43 0.477777779 0.133424491 0.875 0 0 0.6060606 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 +41 0.455555558 0.239613935 0.625 0 0 0.4040404 State-gov Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.0130632017 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Handlers-cleaners Wife White Female United-States 0 +41 0.455555558 0.16339004 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.1403363 0.9375 1 0 0.454545468 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 +49 0.544444442 0.108201295 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +20 0.222222224 0.153527468 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +58 0.644444466 0.1331342 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 +35 0.3888889 0.145570338 0.5 0 0 0.4040404 Self-emp-not-inc 12th Never-married Other-service Not-in-family Black Female Trinadad&Tobago 0 +30 0.333333343 0.2196423 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +21 0.233333334 0.0385335833 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +29 0.322222233 0.06750096 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Machine-op-inspct Unmarried White Male United-States 0 +40 0.444444448 0.196127862 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +54 0.6 0.06291822 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Unmarried Asian-Pac-Islander Female United-States 1 +35 0.3888889 0.1289832 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.176049784 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.114655778 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Other-service Not-in-family White Female ? 0 +59 0.655555546 0.252524257 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Unmarried Black Female United-States 0 +43 0.477777779 0.2161938 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +39 0.433333337 0.227870181 0.375 0 0 0.6060606 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.091055125 0.25 0 0 0.3030303 Private 7th-8th Separated Machine-op-inspct Not-in-family Black Female United-States 0 +71 0.788888931 0.106357157 0.625 0.0296402965 0 0.6060606 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +33 0.366666675 0.429191 0.5 0 0 0.4040404 Private 12th Divorced Machine-op-inspct Unmarried Black Female United-States 0 +28 0.311111122 0.2896764 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Own-child Black Male United-States 0 +30 0.333333343 0.0843797252 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Sales Unmarried White Male United-States 0 +20 0.222222224 0.14949435 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Farming-fishing Other-relative White Male Mexico 0 +51 0.566666663 0.121367544 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.140619189 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 +62 0.6888889 0.05491596 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Asian-Pac-Islander Male United-States 1 +37 0.411111116 0.219261065 0.5625 0 0 0.6060606 Private HS-grad Never-married Exec-managerial Own-child White Male ? 0 +28 0.311111122 0.09581971 0.3125 0 0 0.5050505 Private 9th Never-married Machine-op-inspct Not-in-family White Male Dominican-Republic 0 +23 0.25555557 0.08661923 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Own-child Asian-Pac-Islander Male South 0 +39 0.433333337 0.187165812 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 0 +50 0.5555556 0.06737298 0.8125 0 0 0.656565666 Self-emp-inc Bachelors Widowed Sales Unmarried White Male United-States 1 +31 0.344444454 0.114008509 0.25 0 0 0.4040404 Private 7th-8th Never-married Craft-repair Unmarried White Male United-States 0 +45 0.5 0.108083427 0.8125 0 0.453856736 0.5050505 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.08350682 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Own-child Other Male United-States 0 +47 0.5222222 0.20063515 0.375 0 0 0.4040404 Private 10th Widowed Machine-op-inspct Not-in-family White Male United-States 0 +59 0.655555546 0.06676815 0.5625 0 0 0.181818187 Private HS-grad Widowed Prof-specialty Not-in-family White Female United-States 0 +32 0.355555564 0.0298995432 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +82 0.9111111 0.0198295284 0.25 0 0 0.05050505 ? 7th-8th Widowed ? Not-in-family White Male United-States 0 +49 0.544444442 0.1340529 0.8125 0 0.5544077 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +74 0.822222233 0.1222519 0.5625 0 0 0.171717167 Federal-gov HS-grad Widowed Other-service Not-in-family White Male United-States 0 +22 0.244444445 0.128392518 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +32 0.355555564 0.1311641 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male Greece 0 +34 0.377777785 0.0184413735 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +59 0.655555546 0.108190522 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.151229367 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +59 0.655555546 0.190613627 0.4375 0 0 0.4040404 Private 11th Divorced Adm-clerical Unmarried White Female United-States 0 +47 0.5222222 0.06865068 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +53 0.5888889 0.0909958556 0.5625 0 0.459595948 0.454545468 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +25 0.2777778 0.07640306 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Craft-repair Unmarried White Male United-States 0 +44 0.4888889 0.1676919 0.8125 0 0 0.656565666 Private Bachelors Divorced Adm-clerical Not-in-family Black Male United-States 0 +57 0.6333333 0.151770219 0.9375 0.1502415 0 0.353535354 Self-emp-not-inc Prof-school Married-civ-spouse Sales Wife White Female United-States 1 +42 0.466666669 0.10612344 0.8125 0 0.43663913 0.8080808 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +58 0.644444466 0.208852947 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +39 0.433333337 0.08728805 0.8125 0.0346403457 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.0357256159 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child Black Male United-States 0 +45 0.5 0.1375391 0.25 0 0 0.4848485 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Male United-States 0 +47 0.5222222 0.114045553 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Exec-managerial Wife Black Female United-States 1 +52 0.5777778 0.09055469 0.625 0 0 0.5050505 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +56 0.622222245 0.1594465 0.125 0 0 0.25252524 Self-emp-not-inc 1st-4th Separated Exec-managerial Not-in-family White Male ? 0 +52 0.5777778 0.0951710939 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +34 0.377777785 0.158364117 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +36 0.4 0.247200623 0.25 0 0 0.353535354 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.10042534 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Not-in-family White Male Poland 0 +30 0.333333343 0.2854237 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Male Mexico 0 +44 0.4888889 0.142626986 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Other Male Puerto-Rico 0 +17 0.188888893 0.07476098 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Female Philippines 0 +34 0.377777785 0.0383126624 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Unmarried White Female United-States 0 +41 0.455555558 0.150239944 0.625 0 0 0.4040404 Private Some-college Separated Other-service Not-in-family Black Male United-States 0 +29 0.322222233 0.2739009 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +25 0.2777778 0.139152229 0.3125 0 0 0.4848485 Private 9th Never-married Machine-op-inspct Other-relative White Male Mexico 0 +42 0.466666669 0.099353075 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Unmarried White Male United-States 0 +48 0.533333361 0.15871571 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +26 0.2888889 0.126339585 0.6875 0 0 0.5555556 Private Assoc-voc Never-married Sales Not-in-family White Male United-States 0 +64 0.7111111 0.08946693 0.5625 0.200512 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female ? 1 +46 0.51111114 0.187459469 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.187864929 0.8125 0 0.4331956 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.136753768 0.4375 0 0 0.4040404 State-gov 11th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +23 0.25555557 0.0981009752 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Black Female United-States 0 +46 0.51111114 0.09734661 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +30 0.333333343 0.0613893 0.5625 0 0 0.5555556 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 +49 0.544444442 0.142629012 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.07514153 0.6875 0 0 0.4040404 ? Assoc-voc Divorced ? Not-in-family White Male United-States 0 +44 0.4888889 0.121899642 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 1 +31 0.344444454 0.139783323 0.5625 0 0.383149683 0.5050505 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 +19 0.211111113 0.2813064 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +45 0.5 0.127897456 0.75 0.0545505434 0 0.3838384 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 +34 0.377777785 0.150340974 0.8125 0 0.4242424 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Peru 1 +26 0.2888889 0.07318491 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +38 0.422222227 0.127987042 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +31 0.344444454 0.149612218 0.625 0 0 0.434343427 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.111042939 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Separated Exec-managerial Not-in-family White Male United-States 0 +31 0.344444454 0.115162946 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.1254586 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +37 0.411111116 0.192648381 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.271726042 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 1 +21 0.233333334 0.1510125 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Wife Black Female United-States 0 +73 0.811111152 0.08295251 0.375 0 0 0.1010101 Private 10th Widowed Other-service Not-in-family White Female United-States 0 +38 0.422222227 0.06703487 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.08296463 0.375 0 0 0.5050505 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.155615434 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +52 0.5777778 0.214004129 0.8125 0.07688077 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +58 0.644444466 0.162359536 0.625 0 0 0.464646459 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.148222044 0.875 0 0 0.5050505 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +35 0.3888889 0.121466555 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.0214453377 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.123369962 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +27 0.3 0.260008574 0.625 0 0 0.4848485 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +31 0.344444454 0.3006375 1 0 0 0.5050505 Local-gov Doctorate Never-married Prof-specialty Not-in-family White Male Mexico 1 +45 0.5 0.01888254 0.625 0 0 0.5050505 Private Some-college Never-married Farming-fishing Other-relative White Male United-States 0 +40 0.444444448 0.190041125 0.5625 0 0 0.25252524 Private HS-grad Separated Other-service Other-relative White Female United-States 0 +27 0.3 0.129577264 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Adm-clerical Husband White Male United-States 0 +19 0.211111113 0.258392751 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +29 0.322222233 0.308076024 0.1875 0 0 0.25252524 Private 5th-6th Never-married Other-service Not-in-family White Male Mexico 0 +34 0.377777785 0.0540504679 0.625 0 0 0.727272749 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +32 0.355555564 0.107453674 0.75 0 0 0.4040404 State-gov Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.162226841 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male Cuba 0 +33 0.366666675 0.05620376 0.4375 0 0 0.4040404 Private 11th Divorced Exec-managerial Unmarried White Female United-States 1 +74 0.822222233 0.0201157816 0.25 0 0 0.02020202 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +62 0.6888889 0.124942668 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.0463263765 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.1485743 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +22 0.244444445 0.03444186 0.625 0 0 0.6060606 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +24 0.266666681 0.03674804 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +76 0.844444454 0.0190078169 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male Canada 1 +25 0.2777778 0.1356586 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 +19 0.211111113 0.02722763 0.625 0 0 0.282828271 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +31 0.344444454 0.127608523 0.75 0 0 0.414141417 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +53 0.5888889 0.135094851 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Other-relative White Female United-States 0 +61 0.677777767 0.0624305867 0.5625 0 0 0.0303030312 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +47 0.5222222 0.447779864 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male El-Salvador 0 +37 0.411111116 0.117956094 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +50 0.5555556 0.263362765 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +27 0.3 0.167922243 0.625 0 0 0.444444448 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +58 0.644444466 0.07487615 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.22559768 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +39 0.433333337 0.237251177 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 +36 0.4 0.117062986 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +56 0.622222245 0.10470026 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +26 0.2888889 0.0496320836 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +23 0.25555557 0.1532924 0.8125 0 0 0.3838384 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +47 0.5222222 0.108894363 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Not-in-family Black Male United-States 0 +68 0.75555557 0.0511300229 0.5 0 0 0.3030303 Private 12th Widowed Sales Not-in-family White Female United-States 0 +47 0.5222222 0.163367137 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family Black Male United-States 0 +45 0.5 0.23714745 0.625 0.07688077 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male Guatemala 1 +26 0.2888889 0.107585013 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +20 0.222222224 0.08838793 0.5625 0 0.365013778 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +46 0.51111114 0.121704318 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +37 0.411111116 0.127919018 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +37 0.411111116 0.2756029 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.07493206 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.198285192 0.875 0 0 0.4040404 Private Masters Widowed Prof-specialty Not-in-family White Female United-States 0 +39 0.433333337 0.116331533 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +32 0.355555564 0.0292334165 0.625 0 0.365013778 0.545454562 Private Some-college Divorced Farming-fishing Not-in-family White Female United-States 0 +63 0.7 0.07541094 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +45 0.5 0.166948318 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +59 0.655555546 0.07680448 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.2403427 0.5 0 0 0.353535354 ? 12th Never-married ? Not-in-family White Male United-States 0 +26 0.2888889 0.120989017 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Other-relative White Male United-States 0 +34 0.377777785 0.0133676389 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +41 0.455555558 0.156050533 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.141403183 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +53 0.5888889 0.133017674 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +33 0.366666675 0.176761717 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +46 0.51111114 0.190635175 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +79 0.8777778 0.09734796 0.5625 0 0 0.3030303 ? HS-grad Widowed ? Not-in-family Black Female United-States 0 +31 0.344444454 0.05620376 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried White Female United-States 0 +24 0.266666681 0.1451083 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Male United-States 0 +57 0.6333333 0.180676967 0.5625 0 0 0.6262626 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +40 0.444444448 0.121919848 0.5625 0 0 0.474747479 Private HS-grad Separated Other-service Unmarried White Female United-States 0 +41 0.455555558 0.09423825 0.6875 0 0.500229537 0.8484849 Self-emp-inc Assoc-voc Married-civ-spouse Sales Husband Other Male Mexico 0 +20 0.222222224 0.131857842 0.625 0 0 0.262626261 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +45 0.5 0.0843224749 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family Black Female United-States 0 +27 0.3 0.0395054929 0.6875 0 0 0.4040404 Private Assoc-voc Separated Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.169950932 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Craft-repair Other-relative White Male Mexico 0 +30 0.333333343 0.07847215 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Germany 0 +36 0.4 0.112472177 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +25 0.2777778 0.2520117 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Farming-fishing Not-in-family Other Male Mexico 0 +30 0.333333343 0.0652324855 0.625 0 0.3946281 0.25252524 ? Some-college Never-married ? Not-in-family White Female United-States 0 +31 0.344444454 0.1325435 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +49 0.544444442 0.125393257 0.5625 0.07688077 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.165438935 0.4375 0 0 0.2020202 Private 11th Never-married Handlers-cleaners Unmarried White Male United-States 0 +25 0.2777778 0.107585013 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +29 0.322222233 0.08746249 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +24 0.266666681 0.123130187 0.625 0.0332503319 0 0.5252525 Private Some-college Never-married Adm-clerical Own-child White Female Dominican-Republic 0 +41 0.455555558 0.211706713 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +35 0.3888889 0.06935789 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 +57 0.6333333 0.0289343689 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Wife White Female United-States 1 +21 0.233333334 0.172664613 0.4375 0 0 0.4040404 Private 11th Never-married Priv-house-serv Other-relative White Female Mexico 0 +29 0.322222233 0.09178726 0.375 0 0 0.323232323 Private 10th Never-married Other-service Own-child Black Female United-States 0 +36 0.4 0.191698685 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +20 0.222222224 0.124977015 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +51 0.566666663 0.09351824 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.022554649 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +36 0.4 0.056783 0.8125 0.0501305 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +40 0.444444448 0.150791571 0.9375 1 0 0.7070707 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +61 0.677777767 0.100796454 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.234887749 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +20 0.222222224 0.1585783 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Male United-States 0 +21 0.233333334 0.0232409816 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Own-child White Female United-States 0 +40 0.444444448 0.233692214 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 +46 0.51111114 0.129458711 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.20601669 0.625 0 0 0.545454562 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.311772376 0.375 0 0 0.5050505 Self-emp-not-inc 10th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +39 0.433333337 0.0602867231 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.134809941 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.120863073 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.140745133 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Unmarried Other Male Mexico 0 +32 0.355555564 0.02703702 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.0386959 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.220631719 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.101883538 0.5625 0.1502415 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female United-States 1 +44 0.4888889 0.1786658 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +38 0.422222227 0.137290582 0.5625 0.0346403457 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male Columbia 0 +51 0.566666663 0.110458307 0.5625 0 0 0.2020202 ? HS-grad Married-spouse-absent ? Not-in-family White Male United-States 1 +46 0.51111114 0.0190482289 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +51 0.566666663 0.197477624 1 0.1502415 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male Iran 1 +45 0.5 0.144558683 1 0.1502015 0 0.4040404 Private Doctorate Widowed Prof-specialty Unmarried White Male Iran 1 +20 0.222222224 0.248434544 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +44 0.4888889 0.2380244 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.108940832 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +18 0.2 0.06598146 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +61 0.677777767 0.105436437 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Separated Prof-specialty Not-in-family White Male United-States 1 +50 0.5555556 0.1334292 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +47 0.5222222 0.037298318 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Machine-op-inspct Own-child Black Male United-States 0 +34 0.377777785 0.117013149 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +53 0.5888889 0.252297938 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +39 0.433333337 0.117417268 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.05263066 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +66 0.733333349 0.128189772 0.5625 0 0 0.181818187 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 +26 0.2888889 0.0211153068 0.4375 0 0 0.5050505 Private 11th Never-married Farming-fishing Not-in-family White Male United-States 0 +41 0.455555558 0.164077714 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Adm-clerical Husband White Male Mexico 0 +47 0.5222222 0.0907055661 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.132701784 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband Amer-Indian-Eskimo Male United-States 0 +52 0.5777778 0.0792574957 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.114376262 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.4031818 0.3125 0 0 0.5050505 Private 9th Separated Handlers-cleaners Unmarried Black Female United-States 0 +42 0.466666669 0.08275112 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.111965008 0.625 0 0 0.3030303 Private Some-college Never-married Machine-op-inspct Not-in-family Black Female United-States 0 +41 0.455555558 0.126503915 0.5625 0.0288502872 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.229634851 0.8125 0.07298073 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +52 0.5777778 0.131198451 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +61 0.677777767 0.155804023 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.205830112 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Exec-managerial Unmarried White Male United-States 0 +19 0.211111113 0.017127309 0.625 0 0 0.25252524 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +46 0.51111114 0.12984331 0.8125 0.07688077 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.23336488 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +22 0.244444445 0.229923114 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +30 0.333333343 0.199104875 0.5625 0 0 0.4040404 State-gov HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.113784224 0.6875 0 0 0.323232323 Private Assoc-voc Divorced Other-service Not-in-family White Female United-States 0 +43 0.477777779 0.147206351 0.8125 0.0332503319 0 0.4040404 Private Bachelors Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 +37 0.411111116 0.226710364 0.1875 0 0 0.363636374 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +23 0.25555557 0.207586691 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Other-service Own-child White Male United-States 0 +39 0.433333337 0.24056834 0.75 0 0 0.5959596 Local-gov Assoc-acdm Divorced Prof-specialty Not-in-family White Male United-States 0 +54 0.6 0.3079649 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.191821948 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +20 0.222222224 0.120847575 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Female United-States 0 +50 0.5555556 0.2447658 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 +17 0.188888893 0.09374455 0.375 0 0 0.151515156 Private 10th Never-married Sales Own-child White Female United-States 0 +36 0.4 0.137052149 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.075809 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +53 0.5888889 0.0670005158 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +50 0.5555556 0.0631034449 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +38 0.422222227 0.14857161 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +63 0.7 0.131095409 0.5625 0 0 0.323232323 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.104253039 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.109185331 0.8125 0 0 0.5050505 ? Bachelors Divorced ? Not-in-family White Female United-States 0 +23 0.25555557 0.144501433 0.625 0 0 0.5050505 Self-emp-inc Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +20 0.222222224 0.109060049 0.5625 0 0 0.434343427 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +46 0.51111114 0.140054762 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 +28 0.311111122 0.174681842 0.375 0 0 0.4040404 Private 10th Never-married Other-service Other-relative Amer-Indian-Eskimo Male Mexico 0 +59 0.655555546 0.14036122 0.875 0 0 0.5050505 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +41 0.455555558 0.078393355 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.161500767 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +56 0.622222245 0.11743141 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male Italy 0 +50 0.5555556 0.0298833773 0.5625 0.1502415 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male El-Salvador 1 +31 0.344444454 0.127161965 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +41 0.455555558 0.0337588973 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Sales Own-child White Male United-States 0 +38 0.422222227 0.0750303939 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +25 0.2777778 0.102400817 0.75 0 0 0.4040404 State-gov Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 +18 0.2 0.09362332 0.5625 0 0 0.121212125 ? HS-grad Never-married ? Other-relative Other Female United-States 0 +49 0.544444442 0.167904735 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried Black Female United-States 0 +39 0.433333337 0.173587352 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +22 0.244444445 0.07622726 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 +21 0.233333334 0.101810127 0.625 0 0 0.25252524 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +35 0.3888889 0.3134131 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.240298241 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried White Female United-States 0 +38 0.422222227 0.245693251 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +55 0.6111111 0.133619145 0.25 0 0 0.2020202 Private 7th-8th Widowed Other-service Unmarried White Female ? 0 +31 0.344444454 0.221795574 0.5625 0 0 0.5555556 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +17 0.188888893 0.171656325 0.4375 0 0 0.2020202 Self-emp-inc 11th Never-married Prof-specialty Own-child White Male United-States 0 +31 0.344444454 0.137056187 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +25 0.2777778 0.150063485 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +39 0.433333337 0.06496375 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.114534542 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.07852065 0.8125 0 0 0.2020202 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +50 0.5555556 0.269416481 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +63 0.7 0.123666324 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.130702734 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +23 0.25555557 0.14174062 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +18 0.2 0.0291451849 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +43 0.477777779 0.07337821 0.8125 0 0 0.4848485 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +34 0.377777785 0.07724834 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.204868317 0.4375 0 0 0.353535354 Private 11th Never-married Sales Own-child White Male United-States 0 +46 0.51111114 0.33940953 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +35 0.3888889 0.22929 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Unmarried White Female United-States 1 +46 0.51111114 0.0718695 0.875 0 0 0.3838384 State-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +59 0.655555546 0.09859939 0.6875 0.07298073 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +31 0.344444454 0.1585426 0.25 0 0 0.3030303 Private 7th-8th Never-married Handlers-cleaners Not-in-family White Female Portugal 0 +27 0.3 0.0267157461 0.5625 0 0 0.373737365 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +41 0.455555558 0.07666372 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male England 0 +42 0.466666669 0.146713316 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male ? 0 +55 0.6111111 0.2352683 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.133149683 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family Black Female United-States 0 +44 0.4888889 0.0367123447 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +26 0.2888889 0.07936459 0.8125 0 0.383149683 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +36 0.4 0.110052839 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +69 0.7666667 0.059652254 0.3125 0.014240142 0 0.353535354 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 +33 0.366666675 0.217968553 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +30 0.333333343 0.0510236062 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +35 0.3888889 0.100291304 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 +25 0.2777778 0.0275576636 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 +21 0.233333334 0.122991435 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Male ? 0 +18 0.2 0.08825524 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Other-relative Black Male United-States 0 +35 0.3888889 0.113473721 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.08188024 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +26 0.2888889 0.0936873 0.875 0.0501305 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +46 0.51111114 0.240679473 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +31 0.344444454 0.190790772 0.8125 0 0 0.363636374 Private Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 +40 0.444444448 0.385767549 0.9375 0.05178052 0 0.4040404 Private Prof-school Married-civ-spouse Craft-repair Husband White Male Mexico 1 +40 0.444444448 0.212379575 0.5625 0 0.143480256 0.5252525 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +31 0.344444454 0.08113464 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +32 0.355555564 0.0439669825 1 0 0 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.140433967 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Adm-clerical Own-child White Male United-States 0 +25 0.2777778 0.07599826 0.875 0 0 0.4040404 Local-gov Masters Never-married Protective-serv Not-in-family White Male United-States 0 +37 0.411111116 0.178512231 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +18 0.2 0.0602665171 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +55 0.6111111 0.186049759 0.5625 0 0 0.3838384 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +52 0.5777778 0.246669888 0.3125 0 0 0.4040404 Private 9th Divorced Craft-repair Unmarried White Female Cuba 0 +26 0.2888889 0.102400817 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +37 0.411111116 0.138302892 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Male United-States 1 +39 0.433333337 0.051185254 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +62 0.6888889 0.129477575 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 +19 0.211111113 0.127040729 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Female United-States 0 +47 0.5222222 0.154735789 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.134496748 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +55 0.6111111 0.0356656723 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +30 0.333333343 0.148880079 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.077718474 0.625 0 0 0.363636374 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.1375391 0.375 0 0 0.656565666 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.228204265 0.625 0.1502415 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.132946953 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +31 0.344444454 0.0286151133 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +29 0.322222233 0.247662678 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Male United-States 0 +24 0.266666681 0.06903257 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +17 0.188888893 0.177642033 0.375 0 0 0.24242425 Private 10th Never-married Other-service Own-child White Male United-States 0 +47 0.5222222 0.07769759 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Female United-States 0 +46 0.51111114 0.127756014 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.190355659 0.5625 0 0 0.282828271 ? HS-grad Divorced ? Unmarried White Female United-States 0 +34 0.377777785 0.08597735 0.375 0 0 0.444444448 Private 10th Never-married Farming-fishing Not-in-family White Male ? 0 +63 0.7 0.155467257 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male Cuba 0 +21 0.233333334 0.202607259 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Male United-States 0 +18 0.2 0.11768803 0.5625 0 0 0.363636374 Private HS-grad Never-married Other-service Other-relative Black Male United-States 0 +49 0.544444442 0.123735018 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +81 0.900000036 0.09228635 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.143468231 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.241022974 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.111671343 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.127009079 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +46 0.51111114 0.06592757 0.8125 0 0 0.353535354 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +43 0.477777779 0.0713017061 0.625 0 0.43663913 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +39 0.433333337 0.0386770442 0.8125 0 0 0.353535354 Local-gov Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 +29 0.322222233 0.102024309 0.625 0 0 0.4040404 Private Some-college Separated Sales Not-in-family White Female United-States 0 +23 0.25555557 0.08727862 0.5625 0 0 0.161616161 Private HS-grad Never-married Handlers-cleaners Own-child Black Female United-States 0 +57 0.6333333 0.121855862 0.375 0 0 0.434343427 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.122863464 0.5625 0 0 0.424242437 Self-emp-not-inc HS-grad Never-married Sales Unmarried Black Female United-States 0 +25 0.2777778 0.169673443 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 +39 0.433333337 0.1260365 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +24 0.266666681 0.04650419 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family Black Male Jamaica 0 +56 0.622222245 0.129903927 0.875 0 0.453856736 0.444444448 Private Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.0499513373 0.5 0 0 0.4040404 Private 12th Divorced Sales Not-in-family White Female United-States 0 +23 0.25555557 0.0409825519 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Sales Unmarried White Female United-States 0 +17 0.188888893 0.1434999 0.4375 0 0 0.2020202 ? 11th Never-married ? Not-in-family Other Female United-States 0 +67 0.7444445 0.07816839 0.5625 0.0327303261 0 0.161616161 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +41 0.455555558 0.05549453 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male United-States 0 +24 0.266666681 0.09037553 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +51 0.566666663 0.1077049 0.8125 0.105201051 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family Black Male United-States 1 +30 0.333333343 0.07918745 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Divorced Other-service Not-in-family White Female United-States 0 +47 0.5222222 0.144250214 0.5625 0.1502415 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +56 0.622222245 0.03794087 0.5625 0 0 0.323232323 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +51 0.566666663 0.0239616632 0.5625 0 0 0.3838384 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +57 0.6333333 0.10046979 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.105856046 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +24 0.266666681 0.187330142 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +57 0.6333333 0.173233077 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.190692425 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +23 0.25555557 0.390817046 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Female United-States 0 +35 0.3888889 0.1549493 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +58 0.644444466 0.349568427 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.0251443889 0.5625 0.010550105 0 0.121212125 ? HS-grad Never-married ? Own-child White Female United-States 0 +19 0.211111113 0.246426731 0.25 0 0 0.4040404 ? 7th-8th Never-married ? Not-in-family White Male Mexico 0 +68 0.75555557 0.158874661 1 0 0.5456841 0.6060606 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.226653114 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.07782758 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 +53 0.5888889 0.033709053 1 0.07688077 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.257830352 1 0 0 1 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +21 0.233333334 0.121440291 0.8125 0 0 0.25252524 ? Bachelors Never-married ? Not-in-family Asian-Pac-Islander Male ? 0 +63 0.7 0.07141015 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.223868713 0.625 0 0 0.5050505 Private Some-college Married-spouse-absent Transport-moving Unmarried White Male United-States 0 +29 0.322222233 0.06429897 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +43 0.477777779 0.0647280142 0.625 0 0.4331956 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +27 0.3 0.0245435964 0.9375 0 0 0.656565666 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 +25 0.2777778 0.141027346 0.5625 0 0 0.323232323 Self-emp-not-inc HS-grad Never-married Other-service Other-relative White Male United-States 0 +28 0.311111122 0.03422498 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 +54 0.6 0.09689804 0.5625 0 0 0.353535354 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +74 0.822222233 0.0704928 0.625 0 0 0.121212125 ? Some-college Widowed ? Not-in-family White Female United-States 0 +31 0.344444454 0.0339744277 0.625 0 0 0.323232323 Local-gov Some-college Never-married Exec-managerial Own-child Amer-Indian-Eskimo Female United-States 0 +23 0.25555557 0.159358934 0.625 0 0 0.4848485 Private Some-college Never-married Tech-support Not-in-family White Male United-States 0 +19 0.211111113 0.06802631 0.8125 0 0 0.3030303 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +39 0.433333337 0.24428086 0.0625 0 0 0.2020202 ? Preschool Widowed ? Not-in-family White Female El-Salvador 0 +61 0.677777767 0.02183801 0.5625 0.2204022 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Wife White Female United-States 0 +59 0.655555546 0.103883266 0.5625 0.07688077 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 1 +27 0.3 0.103418529 0.6875 0 0 0.363636374 Self-emp-inc Assoc-voc Married-civ-spouse Other-service Wife White Female United-States 1 +19 0.211111113 0.122822382 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +23 0.25555557 0.128944144 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 +25 0.2777778 0.029781 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Adm-clerical Not-in-family Amer-Indian-Eskimo Female United-States 0 +40 0.444444448 0.06579623 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +53 0.5888889 0.140783519 0.4375 0 0 0.373737365 Private 11th Divorced Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.0646700859 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +72 0.8 0.03511674 1 0 0.549127638 0.25252524 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +61 0.677777767 0.107122965 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.09337478 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +17 0.188888893 0.0876436755 0.375 0.010550105 0 0.2020202 Private 10th Never-married Other-service Own-child Amer-Indian-Eskimo Female United-States 0 +73 0.811111152 0.16660212 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Transport-moving Husband White Male Canada 0 +41 0.455555558 0.1529361 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Separated Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.164861709 0.625 0 0 0.2020202 Private Some-college Never-married Machine-op-inspct Own-child Black Female Jamaica 0 +23 0.25555557 0.14522481 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Female Canada 0 +65 0.722222269 0.260436922 0.6875 0 0 0.151515156 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +45 0.5 0.119581334 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +52 0.5777778 0.415584922 0.8125 0.07688077 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Tech-support Husband Black Male United-States 1 +24 0.266666681 0.07887695 0.8125 0 0 0.272727281 Local-gov Bachelors Never-married Adm-clerical Own-child Black Female United-States 0 +23 0.25555557 0.2515988 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.0133676389 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Own-child White Female United-States 0 +26 0.2888889 0.1276954 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +37 0.411111116 0.0392960235 0.5625 0 0 0.565656543 Self-emp-not-inc HS-grad Divorced Farming-fishing Unmarried White Male United-States 0 +17 0.188888893 0.238566592 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +31 0.344444454 0.08043484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +52 0.5777778 0.2447658 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Other-relative White Female United-States 0 +63 0.7 0.122491 0.8125 0 0 0.272727281 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +27 0.3 0.1309836 0.5625 0 0 0.6060606 Private HS-grad Never-married Priv-house-serv Not-in-family White Female United-States 0 +31 0.344444454 0.16658394 0.3125 0.031370312 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +71 0.788888931 0.08805184 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.159567058 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +44 0.4888889 0.2547651 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +36 0.4 0.08133602 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 0 +22 0.244444445 0.136850089 0.8125 0 0 0.2020202 Private Bachelors Never-married Exec-managerial Other-relative White Female United-States 0 +32 0.355555564 0.08776424 0.5625 0 0.3409091 0.4848485 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +30 0.333333343 0.2374492 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +60 0.6666667 0.128661245 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +25 0.2777778 0.133176625 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +76 0.844444454 0.2129615 0.25 0 0 0.121212125 Private 7th-8th Widowed Protective-serv Not-in-family White Female United-States 0 +41 0.455555558 0.06009679 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +26 0.2888889 0.19690983 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband Other Male United-States 0 +45 0.5 0.2051384 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male ? 0 +32 0.355555564 0.121435575 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +22 0.244444445 0.243473962 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +39 0.433333337 0.147160545 0.8125 0 0.4242424 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +63 0.7 0.15610981 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Transport-moving Not-in-family White Male United-States 0 +23 0.25555557 0.1278584 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Transport-moving Unmarried White Female United-States 0 +61 0.677777767 0.156467453 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.0224340875 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.224742964 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.114939332 0.5625 0.010550105 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +39 0.433333337 0.231293768 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +53 0.5888889 0.112066709 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female China 0 +26 0.2888889 0.0323963352 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +21 0.233333334 0.09635719 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Own-child White Male United-States 0 +18 0.2 0.07052176 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 +34 0.377777785 0.0205407813 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.1174139 0.875 0.07688077 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +31 0.344444454 0.193085492 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 +44 0.4888889 0.04005779 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +42 0.466666669 0.254854679 0.9375 0 0.43663913 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.165583059 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +33 0.366666675 0.184697971 0.8125 0.07688077 0 0.3838384 Private Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male United-States 1 +21 0.233333334 0.230736077 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child Black Female United-States 0 +30 0.333333343 0.138782457 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +55 0.6111111 0.157750532 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +57 0.6333333 0.0977898 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.157263562 0.5625 0 0 0.5050505 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +32 0.355555564 0.231782749 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +62 0.6888889 0.115386561 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.122236408 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Sales Not-in-family Black Male United-States 1 +51 0.566666663 0.1720288 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male France 1 +37 0.411111116 0.176741511 0.875 0 0.04889807 0.454545468 Private Masters Divorced Exec-managerial Unmarried White Female United-States 0 +45 0.5 0.134430751 0.1875 0 0 0.3838384 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male Mexico 0 +47 0.5222222 0.05706588 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.152813524 0.5625 0 0 0.75757575 ? HS-grad Divorced ? Own-child White Male United-States 0 +75 0.8333334 0.124155983 0.4375 0 0 0.3030303 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.06871735 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband Other Male United-States 0 +39 0.433333337 0.123861648 0.75 0.07688077 0 0.6060606 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male Germany 1 +30 0.333333343 0.0372403935 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.101047009 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Other-relative White Male Guatemala 0 +44 0.4888889 0.0677467957 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Amer-Indian-Eskimo Male United-States 0 +53 0.5888889 0.122418262 0.875 0 0 0.353535354 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 1 +40 0.444444448 0.1013858 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +18 0.2 0.07225476 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 +33 0.366666675 0.16650109 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Protective-serv Husband Black Male England 0 +20 0.222222224 0.196657926 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +38 0.422222227 0.182517737 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +48 0.533333361 0.0421666279 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +46 0.51111114 0.119123332 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +51 0.566666663 0.0358300135 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.180356368 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Other-service Other-relative White Female United-States 0 +24 0.266666681 0.207586691 0.25 0 0 0.4040404 Private 7th-8th Never-married Handlers-cleaners Other-relative White Male Mexico 0 +30 0.333333343 0.206359521 0.625 0 0 0.5050505 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 +70 0.7777778 0.023906434 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.19665052 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +34 0.377777785 0.0545111671 0.5625 0 0.3838384 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.183085531 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +70 0.7777778 0.08216649 0.5625 0 0 0.05050505 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +37 0.411111116 0.02089506 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +36 0.4 0.0245334934 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Divorced Sales Unmarried White Female United-States 0 +23 0.25555557 0.274589241 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Other-relative White Female Mexico 0 +28 0.311111122 0.162924618 0.5625 0 0.373737365 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.106792264 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.09453932 0.5625 0.0332503319 0 0.3030303 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +53 0.5888889 0.08313369 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.0269817915 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +26 0.2888889 0.195517629 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 +21 0.233333334 0.16789262 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +34 0.377777785 0.07150848 0.875 0 0 0.5050505 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +43 0.477777779 0.0515166335 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.29500407 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Other-relative Black Male United-States 0 +41 0.455555558 0.076483205 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 1 +36 0.4 0.107846342 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Vietnam 0 +41 0.455555558 0.23107554 0.8125 0 0.399449021 0.2020202 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +27 0.3 0.2739009 0.5625 0.04416044 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +42 0.466666669 0.02533702 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.07688935 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +41 0.455555558 0.07783499 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Own-child White Male United-States 0 +32 0.355555564 0.238427162 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Other-relative Asian-Pac-Islander Female China 1 +21 0.233333334 0.23229599 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Male United-States 0 +44 0.4888889 0.193136021 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +29 0.322222233 0.13079837 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +19 0.211111113 0.139151558 0.625 0 0 0.222222224 Self-emp-not-inc Some-college Never-married Other-service Own-child White Female United-States 0 +21 0.233333334 0.401949227 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Own-child White Male Guatemala 0 +46 0.51111114 0.0382843725 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +38 0.422222227 0.07581372 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.09908366 0.625 0 0 0.4848485 Private Some-college Never-married Adm-clerical Unmarried White Male United-States 1 +54 0.6 0.118096866 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.158213928 0.875 0 0.453856736 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.200802863 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +50 0.5555556 0.146212891 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +30 0.333333343 0.06584271 0.6875 0 0 0.363636374 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +30 0.333333343 0.102288336 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.0174202956 0.5625 0 0 0.353535354 Local-gov HS-grad Never-married Exec-managerial Unmarried Amer-Indian-Eskimo Female United-States 0 +26 0.2888889 0.07369747 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.136774644 0.625 0 0 0.434343427 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.07263598 0.5625 0.05178052 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +64 0.7111111 0.1781795 0.875 0 0 0.05050505 State-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +18 0.2 0.100116864 0.5625 0 0 0.282828271 Private HS-grad Never-married Sales Own-child White Female United-States 0 +30 0.333333343 0.08470505 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +36 0.4 0.03610549 0.6875 0.03908039 0 0.08080808 ? Assoc-voc Married-civ-spouse ? Wife White Female United-States 0 +18 0.2 0.130491242 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Other-relative Black Male United-States 0 +27 0.3 0.396647841 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.07786934 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 +46 0.51111114 0.149776563 0.5625 0 0 0.434343427 State-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +37 0.411111116 0.124845676 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +30 0.333333343 0.11695724 0.625 0 0 0.4040404 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 +29 0.322222233 0.0209913757 0.5625 0 0 0.3030303 Private HS-grad Divorced Prof-specialty Not-in-family Other Female Germany 0 +22 0.244444445 0.3488875 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male Mexico 0 +25 0.2777778 0.1273162 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +38 0.422222227 0.1994504 0.5625 0 0 0.3030303 Private HS-grad Separated Priv-house-serv Unmarried Black Female United-States 0 +32 0.355555564 0.431320041 0.8125 0 0 0.4040404 ? Bachelors Divorced ? Unmarried White Female United-States 0 +35 0.3888889 0.225156516 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +56 0.622222245 0.214487061 0.875 0 0 0.8080808 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 +29 0.322222233 0.117304787 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +41 0.455555558 0.0806362256 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +47 0.5222222 0.09612617 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.109511994 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 +46 0.51111114 0.159527987 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.104305573 0.5625 0 0.430670351 0.4040404 Local-gov HS-grad Never-married Protective-serv Other-relative Black Male United-States 0 +39 0.433333337 0.113755934 0.8125 0 0 0.2020202 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 +42 0.466666669 0.232315511 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Wife White Female United-States 0 +39 0.433333337 0.0224657431 0.5625 0.07298073 0 0.4848485 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +68 0.75555557 0.132539466 0.25 0 0 0.3030303 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +37 0.411111116 0.19634743 0.8125 0.1502415 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +57 0.6333333 0.1146652 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 +22 0.244444445 0.24890399 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family Black Female United-States 0 +24 0.266666681 0.0157863013 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Adm-clerical Not-in-family White Male United-States 1 +19 0.211111113 0.136507258 0.625 0 0 0.5050505 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +55 0.6111111 0.115699753 0.75 0 0 0.3030303 Private Assoc-acdm Divorced Sales Unmarried Black Female United-States 0 +37 0.411111116 0.178151891 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +37 0.411111116 0.16457209 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +28 0.311111122 0.140842125 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 +27 0.3 0.126214981 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +40 0.444444448 0.0805399045 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 +51 0.566666663 0.131409943 0.5625 0 0 0.4040404 Private HS-grad Divorced Priv-house-serv Own-child White Female United-States 0 +52 0.5777778 0.06853348 0.6875 0 0 0.565656543 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 +74 0.822222233 0.0645414442 0.625 0 0 0.0303030312 ? Some-college Widowed ? Not-in-family White Female United-States 0 +49 0.544444442 0.244259968 0.625 0.1502415 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.020078063 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +40 0.444444448 0.05208577 0.625 0 0 0.5050505 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +80 0.8888889 0.05894639 0.625 0 0.416896224 0.6060606 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +63 0.7 0.07632762 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +63 0.7 0.0648606941 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Unmarried White Male United-States 1 +51 0.566666663 0.160118684 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.135362253 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +66 0.733333349 0.143096447 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Widowed Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.08861559 0.5625 0 0 0.6666667 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +49 0.544444442 0.12518245 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.1562472 0.625 0 0 0.323232323 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +33 0.366666675 0.07945215 0.75 0 0.4331956 0.6060606 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.05265154 0.625 0 0 0.4040404 Private Some-college Married-AF-spouse Protective-serv Husband White Male United-States 0 +52 0.5777778 0.110550582 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.115319878 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.09474205 0.8125 0 0 0.454545468 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 +23 0.25555557 0.167896658 0.5625 0 0 0.75757575 Private HS-grad Never-married Exec-managerial Own-child Black Male United-States 0 +53 0.5888889 0.0793740153 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 +19 0.211111113 0.03527435 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +26 0.2888889 0.0645286441 0.625 0.0332503319 0 0.4040404 Federal-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +53 0.5888889 0.0925625 0.25 0 0 0.6060606 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 1 +65 0.722222269 0.113858983 0.5625 0 0 0.1010101 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +68 0.75555557 0.228441343 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.3399497 0.375 0 0 0.181818187 Private 10th Never-married Sales Other-relative White Male Guatemala 0 +28 0.311111122 0.08949253 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.09149292 0.375 0 0 0.454545468 Local-gov 10th Married-civ-spouse Protective-serv Husband White Male United-States 0 +30 0.333333343 0.0240074638 0.5625 0 0 0.1010101 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +22 0.244444445 0.133459508 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +25 0.2777778 0.148243591 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +19 0.211111113 0.1768129 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Other-relative White Male United-States 0 +19 0.211111113 0.285486341 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 +32 0.355555564 0.0751442239 0.9375 0 0 0.4040404 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.130730346 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +51 0.566666663 0.2835021 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +25 0.2777778 0.133272946 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +46 0.51111114 0.170482352 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 +38 0.422222227 0.139108449 0.625 0 0 0.5050505 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 +26 0.2888889 0.0474484824 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband Asian-Pac-Islander Male United-States 1 +46 0.51111114 0.135526583 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 +25 0.2777778 0.141422033 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +20 0.222222224 0.132514536 0.625 0.005940059 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 +29 0.322222233 0.118045 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Other-relative White Male United-States 0 +51 0.566666663 0.20539771 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.122088231 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.135362253 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.02521713 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Farming-fishing Unmarried White Male United-States 0 +31 0.344444454 0.266160637 0.6875 0 0 0.24242425 Private Assoc-voc Married-civ-spouse Other-service Wife Amer-Indian-Eskimo Female Mexico 0 +54 0.6 0.0218124148 0.5625 0 0 0.3030303 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +34 0.377777785 0.237901136 0.75 0 0 0.6060606 Private Assoc-acdm Separated Craft-repair Not-in-family White Male United-States 0 +19 0.211111113 0.0260112286 0.625 0 0 0.6666667 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +21 0.233333334 0.119694486 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 +21 0.233333334 0.128484115 0.375 0 0 0.7070707 Private 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +23 0.25555557 0.0187080931 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.31700775 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +40 0.444444448 0.0483180173 0.875 0 0 0.464646459 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +57 0.6333333 0.0499466248 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +48 0.533333361 0.136368513 0.8125 0 0.3409091 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.08350682 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male Vietnam 0 +43 0.477777779 0.130324885 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +32 0.355555564 0.11442408 0.8125 0 0 0.2020202 ? Bachelors Never-married ? Not-in-family White Female ? 0 +40 0.444444448 0.08794407 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +52 0.5777778 0.0608625971 0.9375 1 0 0.353535354 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.05620241 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +45 0.5 0.161037385 0.625 0.031370312 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 +62 0.6888889 0.10195224 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +29 0.322222233 0.0381422564 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +49 0.544444442 0.07886752 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried White Female United-States 0 +55 0.6111111 0.127961457 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +20 0.222222224 0.02348076 0.625 0 0 0.727272749 ? Some-college Never-married ? Own-child Amer-Indian-Eskimo Male United-States 0 +37 0.411111116 0.08531998 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +43 0.477777779 0.134576231 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +29 0.322222233 0.0387928933 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.0696832 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 1 +28 0.311111122 0.1902048 0.625 0 0 0.4040404 Private Some-college Separated Tech-support Unmarried White Male United-States 1 +38 0.422222227 0.201279715 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +45 0.5 0.0224286988 0.6875 0 0.453856736 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.206122428 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +19 0.211111113 0.2064161 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +20 0.222222224 0.127896115 0.5 0 0 0.4040404 Private 12th Never-married Other-service Not-in-family White Male United-States 0 +60 0.6666667 0.0564832762 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +30 0.333333343 0.0790682361 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +22 0.244444445 0.08751503 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male ? 0 +51 0.566666663 0.120569408 0.625 0 0 0.6060606 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +31 0.344444454 0.253033429 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Unmarried Black Female ? 0 +48 0.533333361 0.21290493 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +43 0.477777779 0.197551027 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +51 0.566666663 0.118373685 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Transport-moving Unmarried Black Male United-States 0 +41 0.455555558 0.08198127 0.6875 0 0.4242424 0.4848485 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +62 0.6888889 0.0639393 0.6875 0.03411034 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 0 +50 0.5555556 0.1544226 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 +46 0.51111114 0.09619959 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 1 +54 0.6 0.0153181944 0.625 0.1502415 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +68 0.75555557 0.051438503 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +23 0.25555557 0.145570338 0.75 0 0 0.3030303 Self-emp-not-inc Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 +49 0.544444442 0.07235444 0.875 0 0 0.353535354 Private Masters Never-married Sales Not-in-family White Female United-States 0 +24 0.266666681 0.4115491 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +30 0.333333343 0.24451457 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband Black Male United-States 0 +38 0.422222227 0.114514336 0.5625 0.031370312 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.0928804055 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +22 0.244444445 0.217332065 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +30 0.333333343 0.0160153024 0.25 0 0 0.4040404 Private 7th-8th Separated Handlers-cleaners Not-in-family White Male United-States 0 +61 0.677777767 0.09957871 0.25 0 0 0.3131313 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.118379749 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Male United-States 0 +51 0.566666663 0.112115875 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.0863552 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female Vietnam 1 +54 0.6 0.08584534 0.625 0 0 0.4848485 Federal-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +63 0.7 0.09072442 0.5625 0 0 0.25252524 Private HS-grad Widowed Prof-specialty Not-in-family White Female United-States 0 +51 0.566666663 0.171232671 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +63 0.7 0.107573561 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.0783226341 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.09882031 0.5625 0 0 0.353535354 Private HS-grad Divorced Sales Own-child White Female United-States 0 +35 0.3888889 0.243744045 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +31 0.344444454 0.01788436 0.8125 0 0 0.25252524 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 +46 0.51111114 0.022108769 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Separated Craft-repair Unmarried White Male United-States 0 +53 0.5888889 0.152062535 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 1 +26 0.2888889 0.265189379 0.625 0 0 0.24242425 Federal-gov Some-college Divorced Adm-clerical Own-child White Male United-States 0 +43 0.477777779 0.108014055 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +39 0.433333337 0.129188627 0.5625 0.1502415 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.119194724 0.5625 0 0.365013778 0.4040404 Federal-gov HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 +54 0.6 0.022807898 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +62 0.6888889 0.123045996 0.625 0 0 0.454545468 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 +57 0.6333333 0.09527752 0.625 0 0 0.4040404 State-gov Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +19 0.211111113 0.117351934 0.625 0 0 0.24242425 ? Some-college Never-married ? Own-child Black Male United-States 0 +29 0.322222233 0.06425048 0.5625 0 0 0.2020202 Local-gov HS-grad Never-married Other-service Own-child White Male United-States 0 +20 0.222222224 0.148915112 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative Black Male United-States 0 +53 0.5888889 0.070385024 0.8125 0 0.43663913 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.294907749 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +22 0.244444445 0.08838793 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +23 0.25555557 0.333997667 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male El-Salvador 0 +69 0.7666667 0.12506929 0.4375 0 0 0.2020202 Private 11th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +56 0.622222245 0.135934085 0.25 0 0.459595948 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +53 0.5888889 0.3700001 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 0 +28 0.311111122 0.166662738 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +28 0.311111122 0.134414583 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband Black Male United-States 0 +33 0.366666675 0.0936596841 0.5625 0 0 0.8484849 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Taiwan 1 +48 0.533333361 0.124630146 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +61 0.677777767 0.111890242 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +49 0.544444442 0.0556669533 0.8125 0.0501305 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +48 0.533333361 0.07360048 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.275022984 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.125505075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.08813603 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Not-in-family White Male United-States 0 +19 0.211111113 0.169447139 0.625 0 0 0.141414136 Private Some-college Never-married Other-service Own-child White Male United-States 0 +47 0.5222222 0.051600825 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +25 0.2777778 0.0151855089 0.8125 0 0 0.6060606 Private Bachelors Never-married Transport-moving Own-child White Male United-States 0 +72 0.8 0.0361580253 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 0 +29 0.322222233 0.123679116 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Not-in-family White Male United-States 0 +22 0.244444445 0.0493047461 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +57 0.6333333 0.0730286539 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Other-service Husband Black Male England 0 +50 0.5555556 0.0783233047 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male Columbia 0 +45 0.5 0.0981319547 0.625 0 0 0.3030303 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +52 0.5777778 0.219677314 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 1 +53 0.5888889 0.135465965 0.875 0 0 0.4848485 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.168916389 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +46 0.51111114 0.221064791 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.26971218 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 +75 0.8333334 0.06464921 0.1875 0 0 0.1010101 Private 5th-6th Widowed Other-service Unmarried Black Male United-States 0 +32 0.355555564 0.08597735 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.168840945 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.07001391 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +17 0.188888893 0.134840935 0.4375 0 0 0.353535354 Private 11th Never-married Sales Own-child White Female United-States 0 +46 0.51111114 0.199225441 0.6875 0 0 0.3838384 State-gov Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +39 0.433333337 0.12921153 0.75 0 0 0.3030303 Private Assoc-acdm Separated Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.0556487665 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 +36 0.4 0.108255848 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +63 0.7 0.07398709 0.8125 0 0 0.212121218 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 +28 0.311111122 0.228932351 0.125 0 0 0.434343427 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +28 0.311111122 0.025065586 0.8125 0 0 0.454545468 ? Bachelors Never-married ? Own-child White Male United-States 0 +49 0.544444442 0.250082672 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.284121782 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +38 0.422222227 0.0200053211 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.07906015 0.5625 0 0 0.6262626 Private HS-grad Never-married Tech-support Not-in-family White Male England 0 +42 0.466666669 0.161666468 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family Black Female United-States 0 +40 0.444444448 0.228153065 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +45 0.5 0.0191007648 0.5625 0 0 0.1010101 ? HS-grad Separated ? Unmarried White Female United-States 0 +29 0.322222233 0.212180883 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried White Female United-States 0 +24 0.266666681 0.211843431 0.8125 0 0.3996786 0.454545468 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +30 0.333333343 0.11652483 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +44 0.4888889 0.193136021 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 +40 0.444444448 0.110449553 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.147718236 0.5625 0 0 0.353535354 Private HS-grad Never-married Machine-op-inspct Other-relative White Female Puerto-Rico 0 +42 0.466666669 0.0297170151 0.875 0 0.430670351 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +52 0.5777778 0.069908835 0.6875 0 0 0.353535354 Self-emp-not-inc Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 +42 0.466666669 0.209221363 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 +39 0.433333337 0.103708148 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.117582284 0.625 0 0 0.454545468 Private Some-college Divorced Prof-specialty Unmarried White Male United-States 0 +62 0.6888889 0.05549116 0.5625 0.105661057 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.139592037 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male England 0 +83 0.922222257 0.169697687 0.5625 0 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +39 0.433333337 0.502986133 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.207648 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Transport-moving Wife White Female United-States 0 +49 0.544444442 0.06858265 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +25 0.2777778 0.07342132 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.278414249 0.4375 0 0.459595948 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.07930936 0.75 0 0 0.08080808 ? Assoc-acdm Divorced ? Not-in-family White Male United-States 0 +44 0.4888889 0.199585781 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +36 0.4 0.1403363 0.3125 0.046500463 0 0.565656543 Private 9th Divorced Handlers-cleaners Not-in-family White Male United-States 0 +40 0.444444448 0.08101071 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male Ireland 0 +21 0.233333334 0.130139664 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Own-child Black Female Jamaica 0 +41 0.455555558 0.0581927076 0.625 0 0 0.3838384 Private Some-college Separated Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.14497897 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +67 0.7444445 0.0838348344 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +24 0.266666681 0.154003 0.8125 0 0 0.3838384 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +50 0.5555556 0.2602517 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +48 0.533333361 0.06519679 0.875 0 0 0.353535354 Private Masters Divorced Sales Not-in-family White Male United-States 0 +55 0.6111111 0.07187084 0.75 0 0 0.2020202 ? Assoc-acdm Married-civ-spouse ? Husband Black Male United-States 1 +29 0.322222233 0.107609257 0.5625 0.0332503319 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male Ecuador 0 +50 0.5555556 0.09393381 0.8125 0 0 0.363636374 Private Bachelors Divorced Prof-specialty Unmarried White Female Ireland 0 +64 0.7111111 0.371015131 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.04614048 0.3125 0 0 0.373737365 Private 9th Divorced Other-service Not-in-family Black Male United-States 0 +20 0.222222224 0.08231602 0.5625 0 0 0.5252525 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +30 0.333333343 0.107389688 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.054312475 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 +52 0.5777778 0.1295813 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +22 0.244444445 0.1288633 0.625 0 0 0.25252524 Private Some-college Never-married Protective-serv Own-child White Male United-States 0 +77 0.8555556 0.09920085 0.5625 0 0 0.141414136 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +19 0.211111113 0.0491740778 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 +52 0.5777778 0.1197935 0.5625 0 0 0.5555556 Private HS-grad Divorced Craft-repair Other-relative White Male United-States 1 +42 0.466666669 0.109788142 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Tech-support Own-child Asian-Pac-Islander Female United-States 0 +35 0.3888889 0.06435689 0.5625 0 0 0.363636374 Private HS-grad Separated Exec-managerial Not-in-family White Female United-States 0 +27 0.3 0.0843925253 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +54 0.6 0.133485109 0.5625 0 0 0.3838384 State-gov HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +37 0.411111116 0.199331865 0.5625 0 0.373737365 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.123033196 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +28 0.311111122 0.08412783 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +63 0.7 0.115602091 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +19 0.211111113 0.2534106 0.5625 0 0 0.424242437 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +28 0.311111122 0.106008269 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 +23 0.25555557 0.07702339 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 +44 0.4888889 0.119979389 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 +31 0.344444454 0.139557019 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.0838436 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family Asian-Pac-Islander Male ? 1 +64 0.7111111 0.0687698945 0.5625 0 0 0.5050505 Private HS-grad Divorced Priv-house-serv Not-in-family White Female United-States 0 +40 0.444444448 0.06198942 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +59 0.655555546 0.159241065 0.75 0 0 0.5050505 Local-gov Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 +22 0.244444445 0.270064443 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.272493869 0.625 0 0 0.444444448 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +35 0.3888889 0.15327692 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +20 0.222222224 0.09828013 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +35 0.3888889 0.128123775 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Own-child White Male United-States 0 +28 0.311111122 0.240152091 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.0447718576 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 +37 0.411111116 0.116020359 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +72 0.8 0.0800846 1 0 0.549127638 0.0606060624 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 +25 0.2777778 0.109812386 0.75 0 0 0.6060606 Self-emp-inc Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 +37 0.411111116 0.060321074 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.0239151884 0.625 0 0 0.454545468 ? Some-college Never-married ? Own-child White Female United-States 0 +31 0.344444454 0.1099902 0.6875 0 0 0.3838384 Private Assoc-voc Divorced Sales Own-child White Female United-States 0 +41 0.455555558 0.129798174 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +31 0.344444454 0.256719679 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Tech-support Husband White Male United-States 1 +44 0.4888889 0.149816975 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.0233756881 0.625 0 0 0.474747479 Private Some-college Never-married Exec-managerial Not-in-family Black Male United-States 0 +57 0.6333333 0.03223334 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +26 0.2888889 0.1314847 0.5625 0 0 0.121212125 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +44 0.4888889 0.0698071346 0.5625 0.0501305 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male Greece 0 +29 0.322222233 0.221879765 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 +36 0.4 0.123669013 0.5625 0 0.453856736 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.124001063 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.142375082 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Other-service Not-in-family Black Male Jamaica 0 +21 0.233333334 0.04160894 0.625 0 0 0.7070707 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +34 0.377777785 0.2156617 0.9375 0 0 0.4848485 Self-emp-not-inc Prof-school Separated Prof-specialty Unmarried White Male United-States 1 +24 0.266666681 0.134332418 0.8125 0 0 0.151515156 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +28 0.311111122 0.2105388 0.375 0 0 0.4040404 Private 10th Divorced Other-service Not-in-family White Female United-States 0 +35 0.3888889 0.113608427 0.5625 0 0 0.5050505 Private HS-grad Separated Transport-moving Own-child White Male United-States 0 +35 0.3888889 0.0589719862 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +38 0.422222227 0.148461148 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +44 0.4888889 0.2725114 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +39 0.433333337 0.0667237 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Wife White Female Poland 1 +57 0.6333333 0.07407061 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Other-service Not-in-family White Female United-States 0 +19 0.211111113 0.166128635 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +29 0.322222233 0.03867637 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.196165577 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative Black Male United-States 0 +50 0.5555556 0.110262983 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +51 0.566666663 0.1618894 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.0174815878 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 +44 0.4888889 0.0684263855 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.15349178 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 +31 0.344444454 0.15158096 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +27 0.3 0.15388377 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.165270552 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +50 0.5555556 0.10549099 0.9375 0.07688077 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 +27 0.3 0.02359526 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +31 0.344444454 0.174343735 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Unmarried Black Female United-States 0 +46 0.51111114 0.128049016 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.0430455878 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +40 0.444444448 0.343551069 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.1420262 0.4375 0 0 0.4040404 Private 11th Divorced Sales Own-child White Male United-States 0 +18 0.2 0.177155733 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +51 0.566666663 0.206630275 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +58 0.644444466 0.07027187 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 +66 0.733333349 0.2294961 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.194371954 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife Asian-Pac-Islander Female South 0 +38 0.422222227 0.162837058 0.4375 0 0 0.6060606 Private 11th Divorced Handlers-cleaners Not-in-family White Female United-States 0 +25 0.2777778 0.07480139 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Exec-managerial Own-child White Male United-States 0 +25 0.2777778 0.07049347 0.5625 0 0 0.222222224 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +90 1 0.2114804 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +41 0.455555558 0.0350487158 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.09873275 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +33 0.366666675 0.08875568 0.8125 0.009140091 0 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried White Female Germany 0 +33 0.366666675 0.1712266 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.102989487 0.8125 0 0.4331956 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.1426445 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child Black Female United-States 0 +59 0.655555546 0.108009338 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +19 0.211111113 0.260802656 0.625 0 0.3946281 0.161616161 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +39 0.433333337 0.125981927 0.5625 0.0406404063 0 0.3838384 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +19 0.211111113 0.140683845 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +27 0.3 0.114252329 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +52 0.5777778 0.136697859 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.0541973 0.5625 0 0 0.24242425 Self-emp-not-inc HS-grad Divorced Other-service Own-child White Female United-States 0 +28 0.311111122 0.274581164 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Female United-States 0 +37 0.411111116 0.163955137 0.5625 0 0 0.5050505 Private HS-grad Divorced Other-service Other-relative White Female Peru 0 +50 0.5555556 0.117844291 0.375 0 0 1 ? 10th Married-civ-spouse ? Husband White Male United-States 0 +36 0.4 0.234047174 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.09844448 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.30270794 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +19 0.211111113 0.118204631 0.4375 0 0 0.3030303 ? 11th Never-married ? Own-child White Female United-States 0 +33 0.366666675 0.1945336 0.5625 0 0.518365443 0.8484849 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +27 0.3 0.0908012 0.875 0 0 0.5252525 Local-gov Masters Never-married Prof-specialty Own-child White Male United-States 0 +31 0.344444454 0.128241643 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +21 0.233333334 0.175534531 0.375 0 0 0.363636374 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.030715866 0.5625 0 0 0.545454562 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +59 0.655555546 0.0456932522 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +40 0.444444448 0.164694 0.875 0 0.43663913 0.4848485 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.289937079 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +47 0.5222222 0.131135821 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +34 0.377777785 0.06347052 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Unmarried White Male United-States 0 +57 0.6333333 0.126846746 0.5625 0 0 0.7878788 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +51 0.566666663 0.09845795 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +21 0.233333334 0.1192998 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +30 0.333333343 0.0460226126 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.06441414 0.625 0 0 0.454545468 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 +40 0.444444448 0.1605228 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +52 0.5777778 0.280277222 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Other-service Not-in-family White Male El-Salvador 0 +23 0.25555557 0.191960022 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family Asian-Pac-Islander Male Taiwan 0 +90 1 0.172771022 0.8125 0.009910099 0 0.1010101 ? Bachelors Widowed ? Other-relative White Female United-States 0 +25 0.2777778 0.125475436 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.127153888 0.625 0 0 0.454545468 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 +38 0.422222227 0.0211166535 0.625 0 0 0.4040404 State-gov Some-college Divorced Protective-serv Unmarried Amer-Indian-Eskimo Female United-States 1 +22 0.244444445 0.133099169 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 +33 0.366666675 0.10907352 0.8125 0.010550105 0 0.4040404 Local-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.185517 0.625 0.05178052 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +65 0.722222269 0.243631572 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 +50 0.5555556 0.09764095 0.5625 0 0 0.151515156 Private HS-grad Never-married Tech-support Own-child White Male United-States 0 +29 0.322222233 0.128334582 0.8125 0.068490684 0 0.4848485 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +25 0.2777778 0.119914062 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +54 0.6 0.206764981 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +49 0.544444442 0.05922254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +44 0.4888889 0.163412258 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +24 0.266666681 0.103835441 0.3125 0 0 0.4040404 Private 9th Divorced Other-service Own-child White Female United-States 0 +25 0.2777778 0.344399065 0.8125 0 0 0.3838384 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +65 0.722222269 0.148868635 0.5625 0 0 0.2020202 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +56 0.622222245 0.149647236 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +39 0.433333337 0.08524859 0.9375 0.1502415 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.136285663 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +20 0.222222224 0.128256455 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +24 0.266666681 0.160918832 0.1875 0 0 0.4040404 Private 5th-6th Never-married Craft-repair Unmarried White Male El-Salvador 0 +41 0.455555558 0.149488956 0.625 0 0.4331956 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.02559229 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +55 0.6111111 0.09907558 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.187412992 0.5625 0 0 0.4848485 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.131616041 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +44 0.4888889 0.0513206348 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +45 0.5 0.080912374 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.125286847 0.625 0 0 0.121212125 Self-emp-not-inc Some-college Never-married Adm-clerical Own-child White Female Germany 0 +29 0.322222233 0.138682768 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +43 0.477777779 0.0844645947 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +30 0.333333343 0.148068473 0.5 0 0 0.4040404 Private 12th Divorced Machine-op-inspct Not-in-family White Male United-States 0 +28 0.311111122 0.0130632017 0.625 0 0 0.3838384 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.150418431 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.07682469 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +36 0.4 0.0644262657 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female Iran 1 +38 0.422222227 0.119421035 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +66 0.733333349 0.2018017 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +63 0.7 0.07926221 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +21 0.233333334 0.160066143 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 +33 0.366666675 0.101414084 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +46 0.51111114 0.0718695 0.625 0.01506015 0 0.5050505 State-gov Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +20 0.222222224 0.117675908 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 +47 0.5222222 0.118513778 0.8125 0.0332503319 0 0.6060606 Self-emp-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 +33 0.366666675 0.09703207 1 0 0 0.5555556 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +66 0.733333349 0.07214363 0.25 0 0 0.3030303 ? 7th-8th Never-married ? Other-relative Black Male United-States 0 +20 0.222222224 0.03647324 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Female ? 0 +28 0.311111122 0.10301777 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +46 0.51111114 0.128299564 0.5625 0 0 0.282828271 Private HS-grad Divorced Priv-house-serv Unmarried White Female Ecuador 0 +25 0.2777778 0.206550121 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 0 +37 0.411111116 0.131438911 0.5625 0.031370312 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Own-child White Male United-States 0 +31 0.344444454 0.152639076 0.3125 0 0 0.6060606 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.106128156 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.0154683935 0.625 0 0 0.2020202 State-gov Some-college Married-spouse-absent Tech-support Unmarried White Male United-States 0 +52 0.5777778 0.25572893 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Other-service Wife White Female United-States 1 +29 0.322222233 0.300772876 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 0 +18 0.2 0.0281497 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 +31 0.344444454 0.06089358 0.625 0 0 0.353535354 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.0845225155 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Female Vietnam 0 +27 0.3 0.08733115 0.6875 0 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Wife Amer-Indian-Eskimo Female United-States 1 +54 0.6 0.07055139 0.375 0 0 0.656565666 Self-emp-not-inc 10th Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.11394991 0.5625 0 0 0.4949495 Local-gov HS-grad Divorced Other-service Unmarried White Female Dominican-Republic 0 +46 0.51111114 0.218666345 0.875 0 0.43663913 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male ? 1 +24 0.266666681 0.08235441 0.8125 0 0 0.4040404 Private Bachelors Never-married Farming-fishing Own-child White Female United-States 0 +17 0.188888893 0.07732041 0.4375 0 0 0.181818187 ? 11th Never-married ? Own-child White Female United-States 0 +49 0.544444442 0.195127651 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Separated Other-service Not-in-family White Male United-States 0 +54 0.6 0.0927396342 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +41 0.455555558 0.05698775 0.8125 0 0.43663913 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.112338141 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +36 0.4 0.234880328 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.234451964 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male Haiti 0 +63 0.7 0.104078591 0.625 0 0 0.4040404 Private Some-college Widowed Other-service Not-in-family White Female United-States 0 +67 0.7444445 0.194227815 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male Canada 1 +23 0.25555557 0.122813627 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +22 0.244444445 0.164588928 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +66 0.733333349 0.0689854249 0.6875 0 0 0.3030303 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +25 0.2777778 0.174908817 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.06650008 0.625 0 0 0.2020202 Private Some-college Divorced Machine-op-inspct Unmarried White Female United-States 0 +35 0.3888889 0.117771544 0.5625 0.0288502872 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +67 0.7444445 0.09550517 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.220381826 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Not-in-family Black Male United-States 0 +26 0.2888889 0.05185946 0.625 0 0 0.3838384 Private Some-college Never-married Machine-op-inspct Not-in-family Black Female United-States 0 +34 0.377777785 0.175496146 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +21 0.233333334 0.249874562 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +18 0.2 0.08689269 0.5 0 0 0.1010101 Private 12th Never-married Craft-repair Own-child White Male United-States 0 +21 0.233333334 0.304868639 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +76 0.844444454 0.08136027 0.3125 0 0 0.4040404 Self-emp-inc 9th Married-civ-spouse Prof-specialty Husband White Male United-States 0 +51 0.566666663 0.0305340122 0.625 0 0 0.7070707 Federal-gov Some-college Married-civ-spouse Protective-serv Husband Asian-Pac-Islander Male ? 0 +26 0.2888889 0.15459165 0.5625 0 0 0.565656543 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +18 0.2 0.08580021 0.5 0 0 0.25252524 Private 12th Never-married Other-service Not-in-family White Female United-States 0 +18 0.2 0.266428024 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child White Male United-States 0 +34 0.377777785 0.08043484 0.6875 0 0.3838384 0.5050505 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +59 0.655555546 0.130594969 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +55 0.6111111 0.109842025 0.8125 0.14084141 0 0.454545468 Private Bachelors Separated Exec-managerial Not-in-family White Male United-States 1 +33 0.366666675 0.104628868 0.625 0 0 0.727272749 Self-emp-not-inc Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 +25 0.2777778 0.0497708321 0.5625 0 0 0.1010101 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +48 0.533333361 0.07252754 0.5625 0 0 0.1010101 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 +64 0.7111111 0.216316372 0.8125 0 0 0.05050505 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 +47 0.5222222 0.104357436 0.875 0 0 0.454545468 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 1 +26 0.2888889 0.06984553 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +36 0.4 0.0427755 0.75 0 0 0.4848485 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.164236 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +54 0.6 0.1260998 0.25 0 0 0.25252524 ? 7th-8th Never-married ? Not-in-family White Female United-States 0 +30 0.333333343 0.0394671 0.5625 0 0 0.444444448 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +41 0.455555558 0.128166884 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +53 0.5888889 0.106655531 0.875 0.0861408561 0 0.353535354 ? Masters Never-married ? Not-in-family White Female United-States 1 +34 0.377777785 0.04187027 0.625 0 0 0.3030303 Private Some-college Never-married Sales Other-relative Black Male United-States 0 +20 0.222222224 0.206875443 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 +24 0.266666681 0.1886799 0.375 0 0 0.4949495 Private 10th Never-married Sales Not-in-family White Male El-Salvador 0 +26 0.2888889 0.07997279 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +25 0.2777778 0.115251184 0.5625 0 0 0.4848485 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.114257045 0.625 0 0 0.363636374 Private Some-college Divorced Sales Unmarried White Female United-States 0 +41 0.455555558 0.08450231 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 1 +33 0.366666675 0.09795482 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +18 0.2 0.102499828 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +27 0.3 0.157421172 0.5625 0 0 0.3838384 Self-emp-inc HS-grad Separated Adm-clerical Not-in-family White Male United-States 0 +32 0.355555564 0.103699394 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +51 0.566666663 0.0593518578 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Not-in-family Black Male United-States 0 +38 0.422222227 0.06488158 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried Black Female United-States 0 +41 0.455555558 0.0445327535 0.625 0 0 0.25252524 Local-gov Some-college Married-civ-spouse Transport-moving Wife White Female United-States 0 +26 0.2888889 0.122703165 0.625 0.0282902829 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.0361203067 0.6875 0 0 0.353535354 Self-emp-not-inc Assoc-voc Divorced Exec-managerial Unmarried White Male United-States 0 +54 0.6 0.117777608 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.0445839427 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family White Female Outlying-US(Guam-USVI-etc) 0 +31 0.344444454 0.04970415 0.625 0 0 0.3030303 Private Some-college Widowed Exec-managerial Unmarried White Female United-States 0 +26 0.2888889 0.01910548 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +75 0.8333334 0.156085551 1 0.04931049 0 0.0303030312 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +29 0.322222233 0.160210282 0.875 0 0 0.4040404 Private Masters Never-married Transport-moving Own-child Black Male United-States 0 +61 0.677777767 0.131644338 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.07875908 0.625 0 0 0.454545468 Private Some-college Separated Sales Unmarried White Female United-States 0 +22 0.244444445 0.0591814555 0.5 0 0 0.3030303 ? 12th Never-married ? Not-in-family White Male United-States 0 +34 0.377777785 0.307400465 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 0 +42 0.466666669 0.177549079 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Own-child White Male United-States 0 +24 0.266666681 0.17747499 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 +42 0.466666669 0.123772062 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male ? 0 +27 0.3 0.31636253 0.5625 0 0.454545438 0.4040404 Federal-gov HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 +39 0.433333337 0.0762798041 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +20 0.222222224 0.09346503 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +51 0.566666663 0.203505754 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family Black Female United-States 0 +68 0.75555557 0.1709875 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +28 0.311111122 0.144714266 0.5625 0 0 0.4848485 Federal-gov HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +43 0.477777779 0.163989484 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Not-in-family White Female United-States 0 +35 0.3888889 0.113897376 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.06952088 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +41 0.455555558 0.0385484 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family White Male United-States 0 +44 0.4888889 0.1537814 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +20 0.222222224 0.146440536 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 +46 0.51111114 0.124631494 0.5625 0 0 0.75757575 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.0251241829 0.75 0.07688077 0 0.7070707 Self-emp-not-inc Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 1 +32 0.355555564 0.175832242 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +46 0.51111114 0.0402551368 0.625 0 0 0.5050505 Private Some-college Divorced Sales Not-in-family White Male United-States 0 +26 0.2888889 0.224651366 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +20 0.222222224 0.0898171738 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female Vietnam 0 +36 0.4 0.06686177 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Wife White Female United-States 0 +49 0.544444442 0.137824684 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.02297022 0.5625 0.03103031 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.210592 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.22199899 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.189277336 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +22 0.244444445 0.1854813 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Other-relative White Male United-States 0 +52 0.5777778 0.08700516 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.259708822 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.135501 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +72 0.8 0.0258367825 0.5625 0 0 0.161616161 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +30 0.333333343 0.04970415 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Not-in-family White Female United-States 0 +44 0.4888889 0.04557875 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +23 0.25555557 0.173516631 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +22 0.244444445 0.12127123 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 +59 0.655555546 0.441862881 0.8125 0 0 0.6060606 Private Bachelors Separated Adm-clerical Unmarried White Male United-States 0 +46 0.51111114 0.145445064 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 +30 0.333333343 0.32916978 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +64 0.7111111 0.134234071 0.25 0 0 0.3030303 Federal-gov 7th-8th Widowed Other-service Unmarried White Female Puerto-Rico 0 +31 0.344444454 0.2058941 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife Black Female United-States 0 +64 0.7111111 0.07745242 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +45 0.5 0.05944952 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +59 0.655555546 0.113537036 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +32 0.355555564 0.1181467 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative Black Female Jamaica 0 +43 0.477777779 0.108591273 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband Amer-Indian-Eskimo Male United-States 0 +66 0.733333349 0.108435683 0.375 0.0108601088 0 0.2020202 ? 10th Divorced ? Not-in-family White Female United-States 0 +23 0.25555557 0.140497953 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +49 0.544444442 0.13502413 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.172835 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +49 0.544444442 0.119002767 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Unmarried White Female United-States 0 +33 0.366666675 0.139092952 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 0 +28 0.311111122 0.14322038 0.9375 0 0 0.858585835 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.100170746 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 +41 0.455555558 0.179503679 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +34 0.377777785 0.161818013 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.241782039 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +20 0.222222224 0.08368127 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +21 0.233333334 0.292792171 0.625 0 0 0.151515156 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +25 0.2777778 0.137628689 0.5625 0 0 0.3030303 Private HS-grad Never-married Farming-fishing Unmarried White Male ? 0 +46 0.51111114 0.16289027 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 +37 0.411111116 0.128875434 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Cambodia 0 +41 0.455555558 0.149488956 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.0750876442 0.5625 0 0.3452709 0.5050505 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +30 0.333333343 0.0439669825 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +54 0.6 0.08985152 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.112086914 0.5625 0 0 1 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +58 0.644444466 0.09574831 0.5625 0 0 0.121212125 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +21 0.233333334 0.149174422 0.625 0 0 0.25252524 Private Some-college Never-married Tech-support Own-child White Female Ecuador 0 +35 0.3888889 0.12788938 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.187514022 0.9375 0 0 0.8080808 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.124408558 0.625 0 0 0.2020202 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +48 0.533333361 0.119737595 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +56 0.622222245 0.185857132 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male Nicaragua 0 +65 0.722222269 0.151863843 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Widowed Craft-repair Not-in-family White Female United-States 0 +40 0.444444448 0.1949229 0.8125 0 0 0.353535354 Private Bachelors Separated Adm-clerical Unmarried Black Male United-States 0 +26 0.2888889 0.181221187 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.302655429 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.144414544 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +32 0.355555564 0.0539218225 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +35 0.3888889 0.136072159 0.8125 0.2782828 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +22 0.244444445 0.0831410959 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +37 0.411111116 0.128998026 0.6875 0 0 0.3838384 Private Assoc-voc Separated Prof-specialty Own-child White Female United-States 0 +25 0.2777778 0.207545608 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male Mexico 0 +64 0.7111111 0.110597059 0.125 0 0 0.535353541 Private 1st-4th Married-civ-spouse Transport-moving Husband White Male ? 0 +46 0.51111114 0.13814193 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.131844372 0.5625 0 0 0.272727281 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +63 0.7 0.100865833 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Male United-States 1 +51 0.566666663 0.1618894 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +68 0.75555557 0.162439 0.25 0 0 0.161616161 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.2403427 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male Canada 0 +28 0.311111122 0.07793131 0.625 0 0 0.5050505 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +41 0.455555558 0.09236987 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Sales Husband White Male United-States 0 +47 0.5222222 0.199410662 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +22 0.244444445 0.270312965 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 +33 0.366666675 0.123102568 0.8125 0 0 0.8080808 ? Bachelors Never-married ? Own-child Asian-Pac-Islander Male Philippines 0 +34 0.377777785 0.125832409 0.9375 0.1502415 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.109238535 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.06601311 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Adm-clerical Own-child White Female United-States 0 +36 0.4 0.1162103 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.0539925434 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +33 0.366666675 0.0296079032 0.875 0.07688077 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.109538257 0.5625 0.07298073 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +56 0.622222245 0.0777407 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +54 0.6 0.0679818541 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +29 0.322222233 0.182109579 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Unmarried Black Female United-States 0 +40 0.444444448 0.013544105 0.625 0 0 0.8484849 Private Some-college Divorced Handlers-cleaners Not-in-family Amer-Indian-Eskimo Female United-States 0 +53 0.5888889 0.07729347 0.875 0.1502415 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.06758582 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +33 0.366666675 0.1245372 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +28 0.311111122 0.0587584749 0.5625 0 0 0.5050505 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +63 0.7 0.08578337 0.625 0 0 0.121212125 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 0 +53 0.5888889 0.13451831 1 0.1502415 0 0.6060606 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male Germany 1 +37 0.411111116 0.0963545 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.0245766 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Unmarried White Male United-States 0 +22 0.244444445 0.09543849 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +40 0.444444448 0.0177530218 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.13169755 0.8125 0.0861408561 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +21 0.233333334 0.0202323031 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +25 0.2777778 0.0842989 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband Black Male Jamaica 0 +20 0.222222224 0.165857866 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Female United-States 0 +43 0.477777779 0.0521113649 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.239487991 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Exec-managerial Unmarried White Female United-States 0 +32 0.355555564 0.121642351 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.135909155 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.17256695 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male South 0 +27 0.3 0.0988506153 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +22 0.244444445 0.142767757 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female Iran 0 +29 0.322222233 0.135053769 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +29 0.322222233 0.03545216 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.0182184335 0.625 0 0 0.2020202 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +35 0.3888889 0.07484854 0.375 0 0 0.4040404 Private 10th Never-married Adm-clerical Own-child White Male United-States 0 +31 0.344444454 0.234415591 0.8125 0 0.43663913 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male Puerto-Rico 1 +33 0.366666675 0.06326509 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +67 0.7444445 0.2679529 0.625 0 0.3533058 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +46 0.51111114 0.022761425 0.625 0 0 0.1010101 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +45 0.5 0.12003395 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 +17 0.188888893 0.129258 0.4375 0 0 0.2020202 Local-gov 11th Never-married Sales Own-child White Male United-States 0 +35 0.3888889 0.229075819 0.8125 0 0.4242424 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.09004752 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-spouse-absent Exec-managerial Not-in-family Black Male Jamaica 1 +49 0.544444442 0.09995117 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Female United-States 0 +20 0.222222224 0.08992696 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Female United-States 0 +27 0.3 0.122358993 0.5625 0.0501305 0 0.464646459 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Canada 0 +64 0.7111111 0.107573561 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.117221944 0.625 0 0 0.4040404 Federal-gov Some-college Separated Craft-repair Not-in-family Black Male United-States 0 +52 0.5777778 0.07927501 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.025065586 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.03152613 0.5625 1 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +48 0.533333361 0.21375291 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +30 0.333333343 0.28667447 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Other-relative White Male Mexico 0 +34 0.377777785 0.05564944 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +19 0.211111113 0.04281928 0.625 0 0 0.5050505 ? Some-college Never-married ? Own-child White Male United-States 0 +39 0.433333337 0.09487002 0.5625 0 0 0.5050505 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +28 0.311111122 0.124644965 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Other-relative White Male United-States 0 +17 0.188888893 0.107844993 0.5 0 0 0.1010101 Private 12th Never-married Sales Not-in-family White Female ? 0 +54 0.6 0.190394729 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.09267228 0.625 0 0.404499531 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +25 0.2777778 0.133469611 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 +25 0.2777778 0.08941103 0.4375 0 0 0.121212125 Private 11th Divorced Other-service Unmarried White Female United-States 0 +48 0.533333361 0.0210573822 0.625 0.05178052 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +24 0.266666681 0.269042671 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 +31 0.344444454 0.0185181573 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband Asian-Pac-Islander Male Taiwan 0 +47 0.5222222 0.248238549 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.06876518 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 +19 0.211111113 0.273507535 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +52 0.5777778 0.0676942542 0.625 0.1502415 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +52 0.5777778 0.0199756864 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +19 0.211111113 0.0137865776 0.5625 0 0 0.121212125 ? HS-grad Never-married ? Other-relative Asian-Pac-Islander Female South 0 +60 0.6666667 0.12255162 0.5625 0 0 0.282828271 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +43 0.477777779 0.204872355 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.114548013 0.75 0 0 0.3030303 Private Assoc-acdm Divorced Other-service Own-child White Female United-States 0 +20 0.222222224 0.130272344 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +51 0.566666663 0.131277263 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.241099745 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Divorced Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.14461863 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.139810935 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +54 0.6 0.09861151 0.625 0 0 0.4040404 Private Some-college Widowed Exec-managerial Unmarried White Female United-States 0 +35 0.3888889 0.230108336 0.8125 0 0 0.5050505 Private Bachelors Never-married Other-service Other-relative White Male United-States 0 +52 0.5777778 0.08865802 0.4375 0 0 0.4040404 Private 11th Separated Machine-op-inspct Unmarried Black Male United-States 0 +53 0.5888889 0.05983815 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.0868186 0.625 0 0 0.4040404 ? Some-college Widowed ? Not-in-family Black Female United-States 0 +35 0.3888889 0.2809555 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried Black Male United-States 0 +43 0.477777779 0.2268215 0.625 0 0.2020202 0.424242437 Self-emp-not-inc Some-college Divorced Sales Unmarried White Female United-States 0 +29 0.322222233 0.140971437 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male Canada 0 +29 0.322222233 0.0814882442 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +27 0.3 0.0343670957 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +58 0.644444466 0.147019789 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male Mexico 0 +64 0.7111111 0.07745242 0.5625 0 0 0.181818187 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +53 0.5888889 0.225958019 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +21 0.233333334 0.117533788 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.155234888 0.75 0 0 0.3030303 Self-emp-not-inc Assoc-acdm Divorced Exec-managerial Not-in-family White Male United-States 0 +52 0.5777778 0.100794435 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male Iran 1 +38 0.422222227 0.100638852 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 +40 0.444444448 0.2300383 0.625 0 0 0.3030303 ? Some-college Divorced ? Not-in-family White Female United-States 0 +39 0.433333337 0.124670558 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +56 0.622222245 0.08953294 0.875 0 0 0.5050505 ? Masters Never-married ? Not-in-family White Female United-States 1 +68 0.75555557 0.08653032 1 0 0 0.5555556 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.08417228 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +40 0.444444448 0.231736273 0.9375 0 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.193136021 0.9375 0 0 1 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +38 0.422222227 0.200039074 0.8125 0 0 0.7070707 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +45 0.5 0.08330342 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.156276166 0.4375 0 0 0.5555556 Private 11th Never-married Machine-op-inspct Own-child White Male United-States 0 +57 0.6333333 0.03520363 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.08027319 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Not-in-family Black Female United-States 0 +25 0.2777778 0.1288 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female Yugoslavia 0 +52 0.5777778 0.0160166509 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 +56 0.622222245 0.124302812 0.375 0 0 0.565656543 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 +26 0.2888889 0.16343382 0.625 0 0 0.4848485 Self-emp-inc Some-college Never-married Sales Not-in-family White Male United-States 0 +19 0.211111113 0.1658417 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 +25 0.2777778 0.05842575 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +25 0.2777778 0.0719934255 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +21 0.233333334 0.310388267 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Other-relative White Male United-States 0 +48 0.533333361 0.143557146 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male Italy 0 +33 0.366666675 0.0249679238 0.875 0 0 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male Canada 0 +31 0.344444454 0.06303542 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Protective-serv Own-child Other Male United-States 0 +26 0.2888889 0.143636614 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Divorced Farming-fishing Unmarried White Male United-States 0 +37 0.411111116 0.0315308422 0.8125 0 0 0.3838384 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +29 0.322222233 0.113741793 0.625 0 0 0.3030303 ? Some-college Divorced ? Unmarried White Female United-States 0 +20 0.222222224 0.1917802 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +28 0.311111122 0.208539754 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband Other Male ? 0 +49 0.544444442 0.13296783 0.5625 0 0 0.2020202 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +73 0.811111152 0.0894029438 0.375 0 0 0.04040404 ? 10th Never-married ? Not-in-family White Male United-States 0 +49 0.544444442 0.124631494 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.107498795 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +40 0.444444448 0.0832199 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.185505539 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Own-child White Female United-States 0 +18 0.2 0.112579271 0.5 0 0 0.24242425 Private 12th Never-married Sales Own-child White Male United-States 0 +41 0.455555558 0.133078963 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband Black Male United-States 1 +46 0.51111114 0.117941953 0.5625 0 0.3409091 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +46 0.51111114 0.07914165 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +64 0.7111111 0.121506296 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 +50 0.5555556 0.09874218 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.0968690738 0.875 0 0 0.363636374 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.03501369 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +22 0.244444445 0.0324111544 0.625 0 0 0.25252524 State-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +37 0.411111116 0.158150613 0.8125 0.07430074 0 0.454545468 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 1 +39 0.433333337 0.0439979658 0.9375 0 0 0.5555556 Federal-gov Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 +30 0.333333343 0.203507766 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male India 0 +25 0.2777778 0.113425225 0.8125 0 0.3996786 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +26 0.2888889 0.107696146 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Unmarried Black Female United-States 0 +43 0.477777779 0.280418 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +59 0.655555546 0.249621987 0.5625 0 0 0.6060606 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +27 0.3 0.147753939 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Unmarried White Female Jamaica 0 +55 0.6111111 0.08147746 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband Black Male United-States 1 +20 0.222222224 0.0154683935 0.625 0 0 0.121212125 Private Some-college Never-married Other-service Own-child White Male Canada 0 +25 0.2777778 0.0232645553 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female Canada 0 +28 0.311111122 0.128663272 0.75 0 0 0.4040404 Private Assoc-acdm Separated Other-service Not-in-family White Male United-States 0 +29 0.322222233 0.07237667 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +60 0.6666667 0.08205806 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.1574892 0.8125 0.1502415 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +25 0.2777778 0.0497331135 0.4375 0 0 0.4040404 Private 11th Divorced Sales Own-child White Female United-States 0 +27 0.3 0.07352639 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.0694164857 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.0200457331 0.625 0.0501305 0 0.7070707 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +46 0.51111114 0.07542172 0.25 0 0 0.474747479 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.101114362 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Unmarried Black Female United-States 0 +21 0.233333334 0.2033084 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +35 0.3888889 0.19986327 0.4375 0.068490684 0 0.6060606 ? 11th Separated ? Not-in-family White Female United-States 0 +40 0.444444448 0.07947774 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +49 0.544444442 0.10058362 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.0246520359 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +43 0.477777779 0.07988119 0.8125 0 0.143480256 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +39 0.433333337 0.188099325 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Transport-moving Not-in-family Black Male United-States 0 +35 0.3888889 0.121923216 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +52 0.5777778 0.111805379 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +25 0.2777778 0.146922112 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family Black Male Outlying-US(Guam-USVI-etc) 0 +20 0.222222224 0.122717984 0.5625 0 0 0.3030303 Self-emp-inc HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +46 0.51111114 0.0265123378 0.625 0 0 0.1010101 Private Some-college Divorced Other-service Unmarried White Female ? 0 +24 0.266666681 0.0942955 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +29 0.322222233 0.130167276 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Craft-repair Other-relative Asian-Pac-Islander Male India 0 +21 0.233333334 0.128808752 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +37 0.411111116 0.140019059 0.8125 0 0 0.5050505 Federal-gov Bachelors Divorced Exec-managerial Other-relative White Female United-States 0 +43 0.477777779 0.142418861 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +19 0.211111113 0.124441557 0.5625 0 0 0.262626261 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.133249372 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +61 0.677777767 0.156467453 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +21 0.233333334 0.127896115 0.75 0 0 0.5555556 ? Assoc-acdm Never-married ? Not-in-family White Male United-States 0 +35 0.3888889 0.203147426 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +60 0.6666667 0.09879 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +27 0.3 0.151741251 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +57 0.6333333 0.10002593 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 +56 0.622222245 0.09187886 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.08490576 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +47 0.5222222 0.0492111221 0.25 0 0 0.353535354 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife Black Female United-States 0 +19 0.211111113 0.0262853578 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.02225021 0.5 0 0 0.3030303 Self-emp-not-inc 12th Divorced Other-service Unmarried White Female United-States 0 +43 0.477777779 0.130324885 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +63 0.7 0.09930593 0.625 0 0 0.353535354 Local-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +22 0.244444445 0.103139013 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +25 0.2777778 0.04355815 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Own-child Asian-Pac-Islander Female Philippines 0 +35 0.3888889 0.151814 0.5625 0.0861408561 0 0.4040404 Self-emp-not-inc HS-grad Never-married Machine-op-inspct Own-child White Male United-States 1 +20 0.222222224 0.117458351 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +48 0.533333361 0.25443238 0.375 0 0 0.7070707 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.24537535 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female Germany 0 +31 0.344444454 0.07452188 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.0473090634 0.5625 0 0 0.24242425 Private HS-grad Never-married Sales Own-child Asian-Pac-Islander Female Philippines 0 +57 0.6333333 0.0220205374 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.06401743 0.6875 0.07688077 0 0.444444448 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 1 +33 0.366666675 0.178443536 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Other-relative White Female United-States 0 +27 0.3 0.247408748 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +34 0.377777785 0.0377354436 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +22 0.244444445 0.125581846 0.375 0 0 0.3030303 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 +50 0.5555556 0.08447267 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife Black Female United-States 1 +40 0.444444448 0.163050577 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.02089506 0.5625 0 0 0.5151515 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.267626226 0.75 0 0 0.4040404 ? Assoc-acdm Divorced ? Not-in-family White Male United-States 0 +53 0.5888889 0.285631835 0.875 0.1502415 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.07337956 0.625 0.07688077 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +25 0.2777778 0.176451892 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +51 0.566666663 0.0373858772 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +22 0.244444445 0.196272671 0.5 0 0 0.4040404 ? 12th Never-married ? Own-child Black Male United-States 0 +18 0.2 0.2379988 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Male United-States 0 +41 0.455555558 0.0453551374 0.4375 0.07688077 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +33 0.366666675 0.158354014 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +33 0.366666675 0.14021641 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +67 0.7444445 0.28528294 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +47 0.5222222 0.0978578255 0.5625 0 0.5544077 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.271886349 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +32 0.355555564 0.0332220867 0.25 0 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Other-service Husband White Male United-States 0 +29 0.322222233 0.2495405 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female Mexico 0 +25 0.2777778 0.179841787 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Sales Not-in-family White Male United-States 0 +33 0.366666675 0.129221633 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +55 0.6111111 0.05418248 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.255807042 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.113414451 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +18 0.2 0.203372389 0.5625 0.3409534 0 0.0303030312 Private HS-grad Never-married Protective-serv Own-child White Male United-States 0 +36 0.4 0.185093343 0.5625 0 0 0.5050505 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +58 0.644444466 0.157063529 0.5625 0 0 0.272727281 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.2018145 0.875 0 0.43663913 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.159220859 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +21 0.233333334 0.463630825 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +36 0.4 0.0249335729 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +37 0.411111116 0.09969321 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife Black Female United-States 1 +43 0.477777779 0.0828279 0.5625 0 0 0.212121218 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female Trinadad&Tobago 0 +52 0.5777778 0.235599 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 +48 0.533333361 0.1548092 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Not-in-family White Female ? 0 +43 0.477777779 0.07337821 0.625 0 0 0.3838384 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +22 0.244444445 0.159963086 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +57 0.6333333 0.127211809 0.1875 0.06497065 0 0.4040404 Private 5th-6th Divorced Transport-moving Unmarried White Male United-States 0 +37 0.411111116 0.218237966 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.0555585138 0.625 0 0 0.3838384 Private Some-college Divorced Sales Unmarried Asian-Pac-Islander Female United-States 0 +54 0.6 0.1393974 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.0249800477 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Not-in-family White Male United-States 0 +21 0.233333334 0.102740951 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +65 0.722222269 0.09668857 0.625 0 0 0.3838384 Private Some-college Separated Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.08502834 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +22 0.244444445 0.08566348 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Not-in-family White Female United-States 0 +26 0.2888889 0.110471778 0.8125 0.0406404063 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.141566172 0.4375 0 0 0.4040404 Private 11th Separated Craft-repair Own-child White Male United-States 0 +35 0.3888889 0.07915916 0.6875 0 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Wife White Female United-States 1 +47 0.5222222 0.08417363 0.6875 0.1502415 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.122662082 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Other-service Own-child White Male United-States 0 +42 0.466666669 0.148210585 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 1 +39 0.433333337 0.16701971 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family Asian-Pac-Islander Male United-States 0 +55 0.6111111 0.0337871835 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.08295251 0.875 0 0 0.1010101 State-gov Masters Married-spouse-absent Prof-specialty Not-in-family Asian-Pac-Islander Female China 0 +46 0.51111114 0.148152 0.8125 0.07298073 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Machine-op-inspct Husband White Male ? 1 +53 0.5888889 0.05342745 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.0869533047 0.4375 0 0 0.6060606 Private 11th Separated Other-service Unmarried Black Female United-States 0 +40 0.444444448 0.141627461 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Unmarried Black Female United-States 0 +48 0.533333361 0.1276092 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.115251184 0.6875 0 0 0.353535354 Private Assoc-voc Separated Adm-clerical Unmarried White Female United-States 0 +22 0.244444445 0.135918587 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +35 0.3888889 0.134993821 0.5625 0 0 0.121212125 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +20 0.222222224 0.0164308734 0.625 0 0 0.2020202 ? Some-college Never-married ? Unmarried White Female United-States 0 +43 0.477777779 0.128745437 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +37 0.411111116 0.0230166949 0.5625 0 0 0.25252524 Local-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +30 0.333333343 0.236396462 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Laos 0 +41 0.455555558 0.09922106 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband Amer-Indian-Eskimo Male United-States 0 +38 0.422222227 0.09165525 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +77 0.8555556 0.15686214 0.3125 0 0 0.4040404 ? 9th Married-civ-spouse ? Husband Black Male United-States 0 +42 0.466666669 0.2514998 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +20 0.222222224 0.0812289342 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 +36 0.4 0.08818318 0.8125 0.0367403664 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.0487221368 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Never-married Prof-specialty Other-relative Asian-Pac-Islander Male United-States 0 +27 0.3 0.08730623 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.221388772 0.625 0 0 0.454545468 State-gov Some-college Divorced Protective-serv Other-relative White Male United-States 0 +40 0.444444448 0.1287771 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 0 +18 0.2 0.12872389 0.4375 0 0 0.25252524 ? 11th Never-married ? Own-child White Male United-States 0 +49 0.544444442 0.0742524639 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.122300394 0.4375 0 0 0.161616161 Private 11th Never-married Other-service Own-child White Female United-States 0 +29 0.322222233 0.059964776 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Female United-States 0 +47 0.5222222 0.232701451 0.9375 1 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 +24 0.266666681 0.187040523 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Separated Handlers-cleaners Own-child White Male United-States 0 +58 0.644444466 0.133681774 0.25 0 0 0.24242425 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +29 0.322222233 0.168840945 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +45 0.5 0.113717541 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Adm-clerical Wife White Female Canada 1 +30 0.333333343 0.09609653 0.5 0 0 0.5050505 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.201420486 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +59 0.655555546 0.07262924 0.375 0 0.3409091 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 +47 0.5222222 0.08214292 0.25 0 0 0.3030303 Private 7th-8th Married-spouse-absent Other-service Unmarried White Female United-States 0 +41 0.455555558 0.190575242 0.625 0.031370312 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband Black Male United-States 0 +28 0.311111122 0.1190021 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Own-child White Male France 0 +46 0.51111114 0.0231540948 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.141329765 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +66 0.733333349 0.0279557221 0.375 0 0 0.4040404 State-gov 10th Divorced Other-service Not-in-family Black Female United-States 0 +30 0.333333343 0.0842989 0.8125 0.14084141 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Male ? 1 +44 0.4888889 0.09914832 0.625 0 0 0.121212125 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 +58 0.644444466 0.063085936 0.5625 0.1502415 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.212207139 0.25 0 0 0.4848485 Private 7th-8th Never-married Other-service Other-relative White Male Mexico 0 +59 0.655555546 0.2571898 0.3125 0 0 0.4040404 Private 9th Widowed Other-service Unmarried Black Female United-States 0 +35 0.3888889 0.125121832 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +45 0.5 0.12546061 0.3125 0.05178052 0 0.4040404 Private 9th Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +30 0.333333343 0.210592 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.231645346 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male Jamaica 0 +26 0.2888889 0.132008716 0.625 0 0 0.151515156 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +48 0.533333361 0.268634528 0.625 0 0 0.353535354 Private Some-college Separated Sales Unmarried Black Female United-States 0 +31 0.344444454 0.0495142154 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Asian-Pac-Islander Female United-States 0 +36 0.4 0.194010928 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +48 0.533333361 0.0368820764 0.5625 0 0 0.3838384 Private HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 +30 0.333333343 0.104628868 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.270157367 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +19 0.211111113 0.08411368 0.3125 0 0 0.25252524 ? 9th Never-married ? Not-in-family White Female United-States 0 +37 0.411111116 0.1935105 0.75 1 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Wife Black Female ? 1 +53 0.5888889 0.07677957 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.0985906348 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female ? 0 +38 0.422222227 0.0750984251 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +34 0.377777785 0.0231520738 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +45 0.5 0.109238535 0.8125 0 0 0.5252525 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.09945006 0.6875 0 0 0.6060606 Local-gov Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +35 0.3888889 0.122897819 0.6875 0 0 0.444444448 Private Assoc-voc Married-civ-spouse Craft-repair Wife White Female United-States 0 +22 0.244444445 0.123910137 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +35 0.3888889 0.224009484 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +45 0.5 0.0180379264 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 +17 0.188888893 0.03274051 0.4375 0 0 0.454545468 Private 11th Never-married Farming-fishing Own-child White Male United-States 0 +50 0.5555556 0.109538257 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.06177052 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.133361846 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.120595 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Husband White Male ? 0 +25 0.2777778 0.176990047 0.8125 0.068490684 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +64 0.7111111 0.06901708 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.08295924 0.625 0 0 0.1010101 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.110623322 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +17 0.188888893 0.1768102 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 +61 0.677777767 0.0344647579 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.0619308241 1 0 0 0.4040404 State-gov Doctorate Never-married Prof-specialty Not-in-family Black Female United-States 0 +21 0.233333334 0.0833344 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Other-relative White Female United-States 0 +39 0.433333337 0.116639338 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.0810268745 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.169034928 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +27 0.3 0.1922483 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Transport-moving Not-in-family Black Male United-States 0 +20 0.222222224 0.0244055223 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.21365793 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 +51 0.566666663 0.0747387558 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Own-child White Male United-States 0 +45 0.5 0.08303535 0.5625 0 0 0.151515156 Private HS-grad Separated Machine-op-inspct Unmarried Black Female United-States 0 +20 0.222222224 0.167768687 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +31 0.344444454 0.103010364 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.253706962 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Own-child Black Male United-States 0 +56 0.622222245 0.15574272 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male Canada 0 +55 0.6111111 0.113574751 0.625 0 0 0.121212125 Self-emp-not-inc Some-college Divorced Tech-support Not-in-family White Female United-States 1 +26 0.2888889 0.0228590872 0.625 0 0 0.2020202 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +46 0.51111114 0.1048417 0.625 0.1502415 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +32 0.355555564 0.128125116 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +28 0.311111122 0.145603344 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +27 0.3 0.395573527 0.25 0 0 0.353535354 Private 7th-8th Never-married Other-service Other-relative White Male Guatemala 0 +23 0.25555557 0.10501682 0.3125 0 0 0.4040404 Private 9th Married-spouse-absent Craft-repair Not-in-family White Male Mexico 0 +59 0.655555546 0.153152317 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.09305014 0.5 0 0 0.4848485 Private 12th Never-married Craft-repair Other-relative Other Male Guatemala 0 +36 0.4 0.112804905 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +18 0.2 0.03903604 0.5625 0 0 0.151515156 Private HS-grad Never-married Sales Own-child White Female United-States 0 +33 0.366666675 0.106248043 0.3125 0 0 0.7070707 Private 9th Divorced Handlers-cleaners Not-in-family White Male United-States 0 +60 0.6666667 0.05965495 0.6875 0 0 0.151515156 Self-emp-not-inc Assoc-voc Married-civ-spouse Transport-moving Wife White Female Germany 1 +40 0.444444448 0.184082359 0.5625 0 0 0.4848485 Private HS-grad Divorced Machine-op-inspct Unmarried White Female Mexico 0 +48 0.533333361 0.145680115 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.08843373 0.375 0 0 0.4848485 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.260238916 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +38 0.422222227 0.121012591 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.141989157 0.625 0 0 0.434343427 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +45 0.5 0.209921166 0.6875 0.03908039 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 +20 0.222222224 0.144976273 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +32 0.355555564 0.0847683549 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +22 0.244444445 0.0502665527 0.625 0 0 0.13131313 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 +22 0.244444445 0.0161702167 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +38 0.422222227 0.23882927 0.5625 0.00114001136 0 0.3838384 State-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 +34 0.377777785 0.104628868 0.5625 0 0.4242424 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.207673579 0.125 0 0 0.3030303 Private 1st-4th Widowed Other-service Unmarried Other Female Mexico 0 +39 0.433333337 0.1652591 0.8125 0 0 0.25252524 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +79 0.8777778 0.106633306 0.5625 0 0 0.24242425 Self-emp-not-inc HS-grad Widowed Other-service Not-in-family White Female United-States 0 +60 0.6666667 0.137728378 0.8125 0 0 0.08080808 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +24 0.266666681 0.21204415 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male Dominican-Republic 0 +31 0.344444454 0.142340735 0.625 0.02407024 0 0.656565666 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.0493020527 0.8125 0.031370312 0 0.7777778 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male Vietnam 0 +23 0.25555557 0.08523579 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +31 0.344444454 0.175645664 0.625 0 0.3624885 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male El-Salvador 0 +29 0.322222233 0.0769338 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.04330288 0.8125 0 0 0.434343427 State-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +69 0.7666667 0.423516452 0.625 0 0 0.2020202 ? Some-college Widowed ? Not-in-family White Female United-States 0 +55 0.6111111 0.148026049 0.5625 0 0 0.3838384 Local-gov HS-grad Divorced Other-service Unmarried White Female United-States 0 +43 0.477777779 0.143391445 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative White Male United-States 0 +23 0.25555557 0.175131768 0.25 0 0 0.363636374 Private 7th-8th Never-married Farming-fishing Unmarried Other Male Mexico 0 +29 0.322222233 0.153616384 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried White Male Mexico 0 +22 0.244444445 0.1615176 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Other-relative White Female Mexico 0 +22 0.244444445 0.218654215 0.625 0 0 0.424242437 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +25 0.2777778 0.110203713 0.5625 0.07298073 0 0.8484849 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.1308004 0.625 0 0 0.454545468 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +25 0.2777778 0.08702066 0.625 0 0 0.4040404 State-gov Some-college Never-married Transport-moving Not-in-family Black Male United-States 0 +33 0.366666675 0.139537483 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +33 0.366666675 0.0911373 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +31 0.344444454 0.0678478256 1 0 0 0.282828271 Private Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.15251717 0.875 0 0.4331956 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.07467544 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.1297928 0.5 0.046500463 0 0.5050505 Private 12th Never-married Exec-managerial Not-in-family White Male United-States 0 +47 0.5222222 0.150944471 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Unmarried White Female United-States 0 +28 0.311111122 0.0531216636 0.8125 0.0861408561 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +42 0.466666669 0.0725814253 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.123668343 0.75 0 0 0.5555556 Private Assoc-acdm Divorced Exec-managerial Unmarried White Male Germany 0 +62 0.6888889 0.167762622 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family Black Female United-States 0 +65 0.722222269 0.1403996 0.625 0 0 0.353535354 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.203538761 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +60 0.6666667 0.1346712 0.5625 0 0 0.323232323 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +47 0.5222222 0.25534904 0.25 0 0 0.6060606 Private 7th-8th Married-civ-spouse Craft-repair Husband Black Male United-States 1 +50 0.5555556 0.117770873 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +70 0.7777778 0.117017187 0.8125 0 0 0.0606060624 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +32 0.355555564 0.02651638 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.13224715 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.229619354 0.5625 0.143441439 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 1 +76 0.844444454 0.06538471 0.375 0 0 0.121212125 Private 10th Widowed Sales Unmarried Black Female United-States 0 +54 0.6 0.1347729 0.8125 0 0 0.6060606 Private Bachelors Divorced Sales Not-in-family Black Female United-States 0 +32 0.355555564 0.08597735 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.212249577 0.625 0 0 0.5252525 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.139302418 0.8125 0 0 0.5050505 Federal-gov Bachelors Divorced Protective-serv Not-in-family White Male United-States 1 +65 0.722222269 0.212899536 0.9375 0 0.382920116 0.4040404 Self-emp-not-inc Prof-school Divorced Prof-specialty Not-in-family White Male United-States 0 +30 0.333333343 0.07551332 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Ireland 1 +63 0.7 0.137280479 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +21 0.233333334 0.168417975 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +40 0.444444448 0.20114097 0.875 0 0.43663913 0.4040404 Federal-gov Masters Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male Philippines 1 +26 0.2888889 0.0735452548 0.625 0 0 0.4040404 State-gov Some-college Never-married Craft-repair Not-in-family White Female United-States 0 +18 0.2 0.088131316 0.4375 0 0 0.08080808 Private 11th Never-married Other-service Own-child White Female United-States 0 +34 0.377777785 0.0296079032 0.5625 0 0 0.5050505 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +66 0.733333349 0.15007022 0.625 0.07896079 0 0.4040404 Local-gov Some-college Divorced Other-service Other-relative White Female ? 1 +44 0.4888889 0.0183484256 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 +30 0.333333343 0.0358037464 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 +36 0.4 0.139098346 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Craft-repair Own-child White Male United-States 0 +31 0.344444454 0.110587627 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.193969846 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +28 0.311111122 0.135258526 0.25 0 0 0.8484849 ? 7th-8th Divorced ? Own-child White Male United-States 0 +23 0.25555557 0.0565034822 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Asian-Pac-Islander Male United-States 0 +49 0.544444442 0.04383834 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.24477455 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Separated Craft-repair Own-child White Male United-States 0 +67 0.7444445 0.122837871 0.8125 0.09386094 0 0.6060606 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +19 0.211111113 0.187828556 0.625 0 0 0.161616161 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +30 0.333333343 0.117726423 0.75 0 0.4242424 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.153975368 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Other-relative Asian-Pac-Islander Female Cambodia 0 +24 0.266666681 0.124199763 0.5625 0 0 0.3030303 Private HS-grad Never-married Transport-moving Own-child Asian-Pac-Islander Male ? 0 +46 0.51111114 0.177522138 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.07906015 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +41 0.455555558 0.0561801866 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +40 0.444444448 0.03310826 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +44 0.4888889 0.283860445 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +32 0.355555564 0.160937026 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +58 0.644444466 0.1272859 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 +48 0.533333361 0.118491553 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.110587627 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.15687561 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child Black Female United-States 0 +46 0.51111114 0.08090564 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.121778406 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Transport-moving Not-in-family Asian-Pac-Islander Male United-States 0 +59 0.655555546 0.109074868 0.8125 0 0 0.3838384 Local-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +29 0.322222233 0.214957863 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male Mexico 0 +50 0.5555556 0.0151060317 0.875 0 0 0.4040404 ? Masters Never-married ? Not-in-family White Male United-States 0 +25 0.2777778 0.195680633 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.0835075 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Other-service Not-in-family Asian-Pac-Islander Female Philippines 0 +48 0.533333361 0.02302545 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +51 0.566666663 0.190394729 1 0 0.359045 0.7070707 Federal-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 +36 0.4 0.1238576 0.5625 0.0861408561 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 1 +42 0.466666669 0.131422743 0.4375 0.07430074 0 0.5050505 Local-gov 11th Divorced Sales Unmarried White Male Puerto-Rico 1 +49 0.544444442 0.03767617 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +33 0.366666675 0.141374886 0.625 0 0 0.2020202 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +40 0.444444448 0.1210456 0.8125 0 0.359045 0.6060606 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 +26 0.2888889 0.101273321 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +69 0.7666667 0.110528357 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 1 +59 0.655555546 0.1702116 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Italy 0 +30 0.333333343 0.138211966 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +31 0.344444454 0.113764018 0.75 0 0 0.353535354 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 +30 0.333333343 0.07551332 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.07848765 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +20 0.222222224 0.136723459 0.625 0 0 0.161616161 ? Some-college Never-married ? Own-child White Female United-States 0 +56 0.622222245 0.129262716 0.75 0.04101041 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +24 0.266666681 0.229873285 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.145977825 0.8125 0 0 0.5050505 Private Bachelors Divorced Sales Unmarried White Female United-States 0 +51 0.566666663 0.12270923 0.8125 0 0 0.353535354 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 +34 0.377777785 0.286244065 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.25534904 0.5625 0 0 0.09090909 Private HS-grad Divorced Other-service Unmarried Black Male United-States 0 +47 0.5222222 0.113310054 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +20 0.222222224 0.0991247445 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Asian-Pac-Islander Female Vietnam 0 +34 0.377777785 0.139871553 0.5625 0 0 0.545454562 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male ? 1 +31 0.344444454 0.130429953 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Not-in-family White Female United-States 0 +42 0.466666669 0.134832844 0.6875 0 0 0.323232323 Private Assoc-voc Divorced Other-service Unmarried White Female United-States 0 +52 0.5777778 0.127058238 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Craft-repair Other-relative White Male Mexico 0 +56 0.622222245 0.268111855 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +53 0.5888889 0.0199756864 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.104374945 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +81 0.900000036 0.245233238 0.625 0 0 0.2020202 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.196250439 0.375 0 0 0.4040404 ? 10th Never-married ? Unmarried Black Female United-States 0 +57 0.6333333 0.06589659 0.625 0 0 0.4848485 Federal-gov Some-college Divorced Prof-specialty Not-in-family White Male United-States 1 +34 0.377777785 0.07946562 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.232704148 0.375 0 0 0.4040404 ? 10th Married-civ-spouse ? Husband White Male United-States 0 +24 0.266666681 0.0432186872 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Unmarried Black Female United-States 0 +20 0.222222224 0.212754056 0.5625 0 0.459366381 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male United-States 0 +68 0.75555557 0.1563617 0.625 0.0234602336 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Other-relative Black Female United-States 0 +60 0.6666667 0.151899531 0.5625 0 0 0.323232323 Private HS-grad Separated Sales Not-in-family White Female United-States 0 +37 0.411111116 0.195091277 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.120873846 0.25 0 0 0.4040404 Private 7th-8th Never-married Handlers-cleaners Unmarried White Male United-States 0 +36 0.4 0.045340322 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +45 0.5 0.052376736 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.170699239 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.101238295 0.8125 0 0 0.7070707 Private Bachelors Separated Exec-managerial Not-in-family White Female United-States 0 +47 0.5222222 0.05594647 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +60 0.6666667 0.2539043 0.5625 0 0 0.424242437 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +75 0.8333334 0.209593162 0.8125 0 0 0.24242425 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.1073944 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +18 0.2 0.113347769 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +25 0.2777778 0.0504362844 0.8125 0 0.2506887 0.4040404 Private Bachelors Never-married Tech-support Not-in-family Asian-Pac-Islander Female Philippines 0 +20 0.222222224 0.185349956 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +32 0.355555564 0.127862439 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +57 0.6333333 0.0682546347 0.8125 0 0 0.2020202 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.22354205 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +18 0.2 0.0271387249 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Other-relative White Male United-States 0 +41 0.455555558 0.05987991 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Unmarried Black Female United-States 0 +48 0.533333361 0.09769011 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male Dominican-Republic 0 +35 0.3888889 0.0312418975 0.5625 0.05178052 0 0.909090936 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +41 0.455555558 0.244891077 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.123477057 0.5625 0 0.365932047 0.2020202 Private HS-grad Never-married Craft-repair Own-child Black Female United-States 0 +32 0.355555564 0.122957759 0.8125 0 0.4331956 0.454545468 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +33 0.366666675 0.180412278 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male El-Salvador 0 +58 0.644444466 0.128474683 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +22 0.244444445 0.109697886 0.625 0 0 0.656565666 Private Some-college Never-married Sales Other-relative White Male United-States 0 +33 0.366666675 0.0951226056 0.625 0 0 0.5050505 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +42 0.466666669 0.117340483 0.9375 0 0 0.3838384 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.2467938 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +39 0.433333337 0.1162103 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.130009666 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.124215923 0.625 0 0.43663913 0.3838384 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +49 0.544444442 0.2274984 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.120602414 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +47 0.5222222 0.06704968 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +46 0.51111114 0.0489114 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +42 0.466666669 0.0375589766 0.75 0 0 0.4040404 State-gov Assoc-acdm Divorced Prof-specialty Not-in-family Black Male United-States 0 +37 0.411111116 0.0203858688 0.4375 0 0 0.6060606 Private 11th Never-married Transport-moving Not-in-family White Male United-States 1 +25 0.2777778 0.207545608 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male Mexico 0 +29 0.322222233 0.138984516 0.375 0.0501305 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.190141484 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +26 0.2888889 0.118593931 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried White Female United-States 0 +45 0.5 0.09612617 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.07743828 0.5625 0 0 0.3030303 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 +33 0.366666675 0.10746108 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Adm-clerical Unmarried Black Female United-States 0 +43 0.477777779 0.0614324063 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.13239263 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.100504816 0.625 0 0 0.75757575 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +21 0.233333334 0.114298128 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +23 0.25555557 0.146975324 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 +30 0.333333343 0.105554976 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Female United-States 0 +46 0.51111114 0.0375293419 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.173266754 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +20 0.222222224 0.131090015 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +36 0.4 0.268693775 0.8125 0 0.3409091 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.243861243 0.9375 1 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.0684263855 0.875 0 0.430670351 0.424242437 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +33 0.366666675 0.132191926 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.132909909 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +47 0.5222222 0.06589996 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.0584877133 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 1 +17 0.188888893 0.03860969 0.375 0 0 0.3030303 Private 10th Never-married Other-service Own-child White Male United-States 0 +43 0.477777779 0.07870385 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female Portugal 1 +45 0.5 0.104013927 0.8125 0.105201051 0 0.5050505 Private Bachelors Widowed Prof-specialty Not-in-family White Female United-States 1 +37 0.411111116 0.0259095244 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.1271687 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +55 0.6111111 0.119325392 0.875 0.009140091 0 0.5050505 Local-gov Masters Widowed Prof-specialty Unmarried White Female United-States 0 +41 0.455555558 0.126167834 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.07245749 0.8125 0.0217402168 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +38 0.422222227 0.113611795 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +23 0.25555557 0.17293334 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Other-relative White Female Cuba 0 +35 0.3888889 0.243010566 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.1269451 0.4375 0 0 0.2020202 Private 11th Never-married Exec-managerial Own-child White Male United-States 0 +47 0.5222222 0.02051384 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +25 0.2777778 0.170237184 0.625 0 0 0.08080808 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +41 0.455555558 0.298717946 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.164617211 0.625 0 0 0.24242425 Private Some-college Never-married Adm-clerical Other-relative Asian-Pac-Islander Female Vietnam 0 +41 0.455555558 0.120551221 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +26 0.2888889 0.0963612348 0.625 0.02407024 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.16658394 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +42 0.466666669 0.135873452 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.166247845 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +28 0.311111122 0.195504829 0.8125 0 0 0.181818187 ? Bachelors Never-married ? Not-in-family White Male United-States 0 +29 0.322222233 0.0802651048 0.625 0 0 0.4040404 Private Some-college Separated Tech-support Unmarried White Female United-States 0 +21 0.233333334 0.140043318 0.625 0 0 0.151515156 Private Some-college Married-spouse-absent Adm-clerical Own-child White Female United-States 0 +48 0.533333361 0.1145965 0.875 0 0 0.4040404 State-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 1 +44 0.4888889 0.12606141 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Transport-moving Unmarried White Male United-States 0 +34 0.377777785 0.2046649 0.3125 0 0 0.4040404 Local-gov 9th Never-married Other-service Own-child White Male United-States 0 +19 0.211111113 0.196287483 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +32 0.355555564 0.1435834 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Own-child White Male United-States 1 +31 0.344444454 0.0753301159 0.75 0 0 0.4040404 State-gov Assoc-acdm Separated Other-service Unmarried Black Female United-States 0 +25 0.2777778 0.200143471 0.5625 0.02407024 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +47 0.5222222 0.0461323969 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +46 0.51111114 0.229485318 0.4375 0 0 0.4040404 Federal-gov 11th Widowed Adm-clerical Not-in-family White Female United-States 0 +18 0.2 0.130705431 0.5 0 0 0.4040404 Private 12th Never-married Adm-clerical Own-child White Male United-States 0 +31 0.344444454 0.0318554863 0.625 0 0.399449021 0.2020202 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +28 0.311111122 0.192839652 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Own-child White Female United-States 0 +38 0.422222227 0.139557689 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +33 0.366666675 0.08931135 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +17 0.188888893 0.09374455 0.375 0 0 0.151515156 ? 10th Never-married ? Own-child White Female United-States 0 +41 0.455555558 0.108294241 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.0793753639 0.625 0.1502415 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.151952744 0.625 0 0 0.444444448 Local-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +24 0.266666681 0.128166884 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +49 0.544444442 0.110997811 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +60 0.6666667 0.01473424 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Prof-specialty Not-in-family Amer-Indian-Eskimo Female United-States 0 +44 0.4888889 0.108294241 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +63 0.7 0.183487639 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.113516152 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.1375391 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.0958352 0.625 0 0.43663913 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +36 0.4 0.114451021 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +65 0.722222269 0.13809073 0.5625 0 0 0.08080808 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +41 0.455555558 0.2524165 0.8125 0 0 0.2020202 Private Bachelors Widowed Exec-managerial Unmarried White Male United-States 0 +25 0.2777778 0.07326641 0.875 0 0 0.4040404 Private Masters Separated Other-service Own-child White Female United-States 0 +20 0.222222224 0.197437212 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 +60 0.6666667 0.153115943 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Adm-clerical Not-in-family White Male United-States 0 +17 0.188888893 0.165896937 0.4375 0 0 0.2020202 Local-gov 11th Never-married Prof-specialty Own-child White Female Puerto-Rico 0 +28 0.311111122 0.0345731974 0.75 0 0 0.161616161 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 +31 0.344444454 0.10310331 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Craft-repair Own-child Other Male United-States 0 +47 0.5222222 0.113948561 0.875 0 0 0.353535354 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +45 0.5 0.130295917 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +51 0.566666663 0.205527022 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +23 0.25555557 0.09354855 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Male United-States 0 +44 0.4888889 0.27102825 0.875 0 0.43663913 0.6060606 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 +34 0.377777785 0.150378019 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Other-relative White Male United-States 0 +19 0.211111113 0.019700883 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +51 0.566666663 0.137369379 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +46 0.51111114 0.0200012811 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.21259442 1 0 0.453856736 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 1 +37 0.411111116 0.426086664 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +56 0.622222245 0.18995221 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.0523740426 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +46 0.51111114 0.100086555 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 +55 0.6111111 0.279512763 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.228909448 0.8125 0.0861408561 0 0.4848485 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 +34 0.377777785 0.336261421 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Handlers-cleaners Not-in-family White Male Guatemala 0 +45 0.5 0.0972273946 0.3125 0 0 0.4040404 ? 9th Separated ? Own-child Black Male United-States 0 +41 0.455555558 0.169769749 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +22 0.244444445 0.0670456439 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 +34 0.377777785 0.07945215 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.131104842 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +29 0.322222233 0.20186165 0.625 0 0 0.373737365 Private Some-college Never-married Handlers-cleaners Unmarried Black Male United-States 0 +19 0.211111113 0.0184770711 0.5 0 0 0.3030303 Federal-gov 12th Never-married Other-service Own-child White Female United-States 0 +47 0.5222222 0.02693195 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +43 0.477777779 0.0911575 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.181949958 0.6875 0 0 0.6060606 Private Assoc-voc Separated Exec-managerial Unmarried Black Female United-States 0 +33 0.366666675 0.07965691 0.75 0 0 0.6060606 Self-emp-not-inc Assoc-acdm Divorced Sales Not-in-family White Male United-States 0 +29 0.322222233 0.179189131 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +23 0.25555557 0.0240000542 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +23 0.25555557 0.0502241179 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +39 0.433333337 0.144685984 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.150178656 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Unmarried White Female Mexico 0 +31 0.344444454 0.174731687 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.142870128 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.165608659 0.5625 0 0 0.6060606 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +58 0.644444466 0.0370087 0.625 0 0 0.5555556 Local-gov Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.05363153 0.9375 0.2782828 0 0.5050505 Self-emp-inc Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 +55 0.6111111 0.102022961 0.8125 0 0.365013778 0.3838384 Private Bachelors Never-married Tech-support Other-relative White Female United-States 0 +26 0.2888889 0.08935176 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +28 0.311111122 0.108893014 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Female United-States 0 +36 0.4 0.04199218 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +40 0.444444448 0.153051287 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +19 0.211111113 0.190632492 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family White Male United-States 0 +63 0.7 0.200880989 0.8125 0.106051058 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.1692114 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +76 0.844444454 0.134672552 0.3125 0 0 0.13131313 Private 9th Married-civ-spouse Protective-serv Husband White Male United-States 0 +23 0.25555557 0.205763444 0.6875 0 0 0.4040404 State-gov Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 +38 0.422222227 0.137290582 0.1875 0 0 0.4040404 Self-emp-not-inc 5th-6th Never-married Transport-moving Not-in-family White Male United-States 0 +33 0.366666675 0.05350558 0.875 0 0 0.3030303 State-gov Masters Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male Japan 0 +48 0.533333361 0.09612617 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +56 0.622222245 0.08072917 0.625 0 0 0.4040404 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 1 +32 0.355555564 0.09524451 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +44 0.4888889 0.1366413 0.625 0 0 0.25252524 Local-gov Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +27 0.3 0.133907408 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child Black Female United-States 0 +33 0.366666675 0.08736214 0.625 0 0 0.5050505 Federal-gov Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +22 0.244444445 0.3002334 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 +18 0.2 0.0203717239 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 +44 0.4888889 0.1171822 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.07308254 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +34 0.377777785 0.0908503756 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.122563072 0.5625 0 0.3838384 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +57 0.6333333 0.190551668 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male Cuba 0 +59 0.655555546 0.132021517 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.2347207 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Wife Black Female United-States 1 +52 0.5777778 0.2803008 0.5625 0 0 0.4949495 Private HS-grad Married-civ-spouse Farming-fishing Husband Other Male Mexico 0 +17 0.188888893 0.08152259 0.5 0 0 0.151515156 Private 12th Never-married Sales Own-child White Female United-States 0 +29 0.322222233 0.0694488138 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male Canada 0 +63 0.7 0.09940628 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +20 0.222222224 0.0161702167 0.625 0 0 0.24242425 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +42 0.466666669 0.08340916 0.9375 0 0.453856736 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.118175671 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +55 0.6111111 0.0570982136 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Priv-house-serv Wife White Female United-States 0 +27 0.3 0.131063074 0.75 0 0 0.25252524 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +28 0.311111122 0.0906348452 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +55 0.6111111 0.142572433 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +44 0.4888889 0.0301891621 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.0973836556 0.625 0 0 0.4040404 State-gov Some-college Never-married Protective-serv Not-in-family White Female United-States 0 +23 0.25555557 0.08025567 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.250546068 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.09707316 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +55 0.6111111 0.0214891173 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.08158119 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.0391498655 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.214532852 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +30 0.333333343 0.199709043 0.25 0 0 0.454545468 Private 7th-8th Separated Farming-fishing Not-in-family White Male Mexico 0 +32 0.355555564 0.3186714 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.104690157 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +52 0.5777778 0.06680452 0.5625 0.07298073 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.0381543823 0.5625 0 0 0.474747479 Private HS-grad Separated Sales Not-in-family White Female United-States 0 +57 0.6333333 0.07980104 0.8125 0 0.43663913 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.216653138 0.5625 0.005940059 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +22 0.244444445 0.08071502 0.625 0 0 0.1010101 State-gov Some-college Never-married Other-service Own-child White Male United-States 0 +26 0.2888889 0.222734481 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +26 0.2888889 0.0390912667 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +44 0.4888889 0.2108311 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +42 0.466666669 0.119979389 0.625 0 0 0.3030303 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.111341313 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +22 0.244444445 0.145605356 0.4375 0 0 0.454545468 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +62 0.6888889 0.120390922 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.07480746 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.110316865 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +33 0.366666675 0.199090734 0.125 0 0 0.4040404 Self-emp-not-inc 1st-4th Married-spouse-absent Craft-repair Not-in-family White Male Mexico 0 +45 0.5 0.08289526 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +18 0.2 0.052566 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Own-child White Male United-States 0 +32 0.355555564 0.171753988 0.625 0 0 0.4040404 Local-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.1712266 1 0 0 0.6060606 Private Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 +20 0.222222224 0.117675908 0.625 0 0 0.151515156 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +68 0.75555557 0.303481162 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +61 0.677777767 0.086367324 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Sales Husband White Male United-States 1 +48 0.533333361 0.129920766 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.219161391 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.0136949765 0.5625 0.07688077 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 1 +32 0.355555564 0.08669332 0.5625 0 0 0.323232323 Federal-gov HS-grad Never-married Other-service Own-child Black Female United-States 0 +35 0.3888889 0.115037672 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Not-in-family White Female United-States 0 +39 0.433333337 0.181306049 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.0859908238 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +30 0.333333343 0.142681539 0.625 0 0 0.161616161 Private Some-college Separated Sales Unmarried Black Female United-States 0 +37 0.411111116 0.110050149 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Other-relative Asian-Pac-Islander Male ? 0 +40 0.444444448 0.135713831 0.8125 0 0 0.454545468 Private Bachelors Divorced Protective-serv Not-in-family White Male United-States 0 +25 0.2777778 0.16963236 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Black Female Jamaica 0 +41 0.455555558 0.188116163 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Not-in-family Black Female United-States 0 +52 0.5777778 0.1316504 0.5625 0 0 0.989899 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +33 0.366666675 0.115018807 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.09594027 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +25 0.2777778 0.123128168 0.5625 0.07298073 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +53 0.5888889 0.0817947 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.1852853 0.125 0 0 0.1010101 Private 1st-4th Never-married Other-service Own-child White Male United-States 0 +35 0.3888889 0.114678 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +38 0.422222227 0.116232522 0.625 0 0 0.5858586 Private Some-college Divorced Craft-repair Own-child White Male Poland 0 +34 0.377777785 0.120303363 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.188269049 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +24 0.266666681 0.111268573 0.625 0 0 0.454545468 State-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +65 0.722222269 0.217555687 0.5625 0 0 0.25252524 Local-gov HS-grad Widowed Other-service Unmarried Black Female United-States 0 +29 0.322222233 0.158393756 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.07735139 0.9375 1 0 0.656565666 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.1457623 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +37 0.411111116 0.02315477 0.25 0.0258002579 0 0.6060606 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +47 0.5222222 0.05449837 0.875 0 0 0.474747479 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.04936469 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +54 0.6 0.142900437 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +90 1 0.0352837779 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Male United-States 0 +33 0.366666675 0.138511688 0.75 0 0 0.2020202 Private Assoc-acdm Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 +57 0.6333333 0.07384498 0.625 0 0.3838384 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.1349817 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Own-child White Male United-States 0 +44 0.4888889 0.126435891 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +52 0.5777778 0.159075379 0.8125 0 0 0.5050505 Private Bachelors Married-spouse-absent Other-service Not-in-family White Male United-States 0 +21 0.233333334 0.07994383 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +31 0.344444454 0.244580582 0.5625 0 0 0.181818187 Private HS-grad Never-married Other-service Unmarried Black Male United-States 0 +39 0.433333337 0.151911661 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Transport-moving Husband White Male Poland 0 +59 0.655555546 0.164081082 0.5625 0 0 0.4040404 Federal-gov HS-grad Widowed Machine-op-inspct Unmarried White Female United-States 0 +29 0.322222233 0.108294919 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +49 0.544444442 0.1578226 0.25 0 0 0.454545468 Private 7th-8th Never-married Prof-specialty Other-relative Black Male United-States 0 +34 0.377777785 0.211924925 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.08417228 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +32 0.355555564 0.14089264 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband Other Male Puerto-Rico 0 +39 0.433333337 0.0820620954 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Other-service Unmarried Black Female United-States 0 +46 0.51111114 0.178671867 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +50 0.5555556 0.0481018126 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.0306606367 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.168474555 0.875 0 0.43663913 0.5555556 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 +18 0.2 0.08101475 0.5 0 0 0.24242425 Private 12th Never-married Sales Own-child White Female United-States 0 +20 0.222222224 0.146138132 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +20 0.222222224 0.07866277 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Female United-States 0 +55 0.6111111 0.0177072212 0.6875 0 0 0.3838384 State-gov Assoc-voc Widowed Exec-managerial Not-in-family Amer-Indian-Eskimo Female United-States 0 +22 0.244444445 0.1455737 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child Black Female United-States 0 +60 0.6666667 0.09694316 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +40 0.444444448 0.1462378 0.375 0 0 0.5050505 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 +47 0.5222222 0.150834009 0.625 0 0 0.3030303 State-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +23 0.25555557 0.124908321 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Not-in-family White Female Canada 0 +57 0.6333333 0.0298193917 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Transport-moving Not-in-family White Female United-States 0 +52 0.5777778 0.120551221 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 +42 0.466666669 0.14769803 0.25 0 0 0.4040404 Private 7th-8th Widowed Craft-repair Unmarried White Male United-States 0 +25 0.2777778 0.235191509 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Handlers-cleaners Own-child White Male United-States 0 +49 0.544444442 0.106879823 0.5625 0 0.5456841 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +41 0.455555558 0.03901381 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 +40 0.444444448 0.182072535 0.6875 0 0 0.3030303 State-gov Assoc-voc Married-civ-spouse Other-service Husband Black Male United-States 0 +38 0.422222227 0.0222273115 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.137415186 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male Canada 0 +26 0.2888889 0.129659429 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Not-in-family Black Female United-States 0 +57 0.6333333 0.25120613 0.375 0 0 0.7070707 Private 10th Divorced Adm-clerical Other-relative White Female Germany 0 +28 0.311111122 0.184500635 0.5625 0 0.373737365 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.131892189 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Unmarried White Female United-States 0 +28 0.311111122 0.0378384925 0.625 0.0217402168 0 0.5555556 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +17 0.188888893 0.0855409 0.3125 0 0 0.4040404 ? 9th Never-married ? Own-child Black Male United-States 0 +39 0.433333337 0.08357889 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.134437487 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +42 0.466666669 0.172321782 0.5625 0.04386044 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +51 0.566666663 0.14704 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Divorced Sales Unmarried White Female United-States 0 +27 0.3 0.112706564 0.625 0 0 0.3939394 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +41 0.455555558 0.04037031 0.5625 0 0 0.434343427 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.1776299 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.1873975 0.625 0.105201051 0 0.3030303 Self-emp-not-inc Some-college Divorced Farming-fishing Unmarried White Female United-States 1 +73 0.811111152 0.121642351 0.5625 0 0 0.08080808 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +49 0.544444442 0.029574899 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +47 0.5222222 0.128065169 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.073415935 0.625 0 0 0.4949495 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.107719041 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +32 0.355555564 0.131330475 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +32 0.355555564 0.0588062964 0.5625 0 0 0.414141417 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +27 0.3 0.09021119 0.875 0 0 0.4040404 Private Masters Never-married Sales Own-child White Male United-States 0 +29 0.322222233 0.139464751 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.02425465 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Prof-specialty Not-in-family White Male United-States 0 +41 0.455555558 0.113351814 0.5625 0.05178052 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +49 0.544444442 0.1312685 0.625 0.07298073 0 0.4040404 Local-gov Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +58 0.644444466 0.0335985944 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +41 0.455555558 0.0183908585 0.5625 0.07688077 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +26 0.2888889 0.154897436 0.3125 0 0 0.353535354 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.0434564464 0.5625 0 0 0.5555556 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +32 0.355555564 0.0908503756 0.5625 0 0 0.02020202 ? HS-grad Married-civ-spouse ? Wife White Female United-States 1 +37 0.411111116 0.205683291 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.136245251 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Own-child White Male United-States 0 +42 0.466666669 0.06680452 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.107537866 0.5625 0 0 0.262626261 Private HS-grad Married-civ-spouse Sales Own-child White Male United-States 1 +67 0.7444445 0.133268908 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +41 0.455555558 0.117968895 0.5625 0 0 0.3838384 Local-gov HS-grad Divorced Transport-moving Not-in-family Black Female United-States 0 +49 0.544444442 0.23548989 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +36 0.4 0.0911245048 0.8125 0.01506015 0 0.454545468 Private Bachelors Divorced Prof-specialty Unmarried White Female ? 0 +18 0.2 0.163596809 0.4375 0 0 0.353535354 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +25 0.2777778 0.147279769 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Own-child White Male United-States 0 +43 0.477777779 0.0975352 0.9375 0 0 0.5050505 State-gov Prof-school Divorced Prof-specialty Not-in-family White Male United-States 0 +38 0.422222227 0.09839733 1 1 0 0.363636374 Private Doctorate Married-civ-spouse Exec-managerial Wife White Female United-States 1 +21 0.233333334 0.139328018 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male ? 0 +65 0.722222269 0.1523636 0.8125 0 0 0.151515156 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +66 0.733333349 0.0770840049 0.6875 0 0 0.353535354 Private Assoc-voc Widowed Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.0836442262 0.4375 0 0 0.6060606 Private 11th Never-married Transport-moving Not-in-family Black Male United-States 0 +51 0.566666663 0.09965212 0.5625 0.03411034 0 0.3838384 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +27 0.3 0.0433614776 0.5625 0 0.399449021 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.105408818 0.5 0 0 0.161616161 Private 12th Never-married Other-service Own-child White Female United-States 0 +32 0.355555564 0.139871553 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +61 0.677777767 0.108626969 0.5625 0 0 0.363636374 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +38 0.422222227 0.152021453 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Cuba 1 +43 0.477777779 0.0778626055 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +40 0.444444448 0.341030031 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 +63 0.7 0.185244888 0.8125 0 0.399449021 0.353535354 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +76 0.844444454 0.116276972 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +42 0.466666669 0.03804325 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.0975129753 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +76 0.844444454 0.0223701 0.875 0 0 0.3030303 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 +41 0.455555558 0.200206786 0.9375 0 0.5544077 0.454545468 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.0923025161 0.375 0 0 0.2020202 Private 10th Never-married Prof-specialty Own-child White Male United-States 0 +30 0.333333343 0.0224340875 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.106701337 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male Iran 0 +22 0.244444445 0.0281288214 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +53 0.5888889 0.148608655 0.8125 0 0 0.2020202 ? Bachelors Divorced ? Other-relative Other Female United-States 0 +28 0.311111122 0.100851014 0.5625 0 0 0.5252525 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +25 0.2777778 0.176631048 0.6875 0.03418034 0 0.4040404 ? Assoc-voc Never-married ? Own-child White Female United-States 0 +24 0.266666681 0.235528946 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative Black Female United-States 0 +47 0.5222222 0.124863192 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +34 0.377777785 0.117506847 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Not-in-family White Male United-States 0 +26 0.2888889 0.158999935 0.625 0 0 0.2020202 Private Some-college Never-married Sales Other-relative White Female United-States 0 +63 0.7 0.299836 0.8125 0 0 0.565656543 ? Bachelors Widowed ? Not-in-family Amer-Indian-Eskimo Female United-States 0 +25 0.2777778 0.0615165979 0.6875 0 0 0.75757575 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.02282945 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +36 0.4 0.144685984 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 +24 0.266666681 0.154760033 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +51 0.566666663 0.112066709 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female Taiwan 0 +44 0.4888889 0.1792511 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.202315614 0.5 0 0 0.121212125 Private 12th Never-married Adm-clerical Own-child White Male United-States 0 +54 0.6 0.264363647 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +61 0.677777767 0.0497129075 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +51 0.566666663 0.1304771 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.212960154 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.1097484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.125875518 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Wife Black Female United-States 1 +27 0.3 0.222355291 0.5625 0 0 0.25252524 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +24 0.266666681 0.129330069 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +20 0.222222224 0.109097771 0.625 0 0 0.2020202 State-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +52 0.5777778 0.13668035 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +57 0.6333333 0.217759758 0.25 0 0 0.4040404 Local-gov 7th-8th Divorced Other-service Not-in-family White Male United-States 0 +49 0.544444442 0.132909909 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.137423262 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Married-civ-spouse Adm-clerical Wife White Female ? 0 +22 0.244444445 0.182712391 0.4375 0 0 0.4040404 Private 11th Never-married Sales Not-in-family White Female United-States 0 +38 0.422222227 0.117358 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +21 0.233333334 0.141094029 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +39 0.433333337 0.06677825 0.8125 0 0.4331956 0.6060606 Federal-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +52 0.5777778 0.06893356 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Prof-specialty Own-child White Female United-States 0 +25 0.2777778 0.122358315 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Own-child White Female United-States 0 +50 0.5555556 0.139668822 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Other-service Not-in-family White Female Cuba 0 +35 0.3888889 0.0556487665 0.625 0 0 0.8080808 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +50 0.5555556 0.136253327 0.6875 0 0 0.4040404 Private Assoc-voc Separated Prof-specialty Unmarried White Female United-States 0 +58 0.644444466 0.09576448 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.06354259 0.8125 0 0 0.454545468 Federal-gov Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +30 0.333333343 0.0279469658 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Not-in-family White Female Canada 0 +18 0.2 0.1223893 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +29 0.322222233 0.110868491 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.0279489867 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +63 0.7 0.09638144 0.5625 0.0406404063 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.132369056 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +24 0.266666681 0.105968527 0.625 0 0 0.424242437 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 +30 0.333333343 0.104354069 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Protective-serv Not-in-family Black Male United-States 0 +23 0.25555557 0.150353774 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Other Male Mexico 0 +35 0.3888889 0.170983464 0.5625 0 0 0.2020202 ? HS-grad Divorced ? Unmarried White Female United-States 0 +21 0.233333334 0.244216189 0.8125 0 0 0.2020202 Private Bachelors Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.06390495 0.625 0 0 0.434343427 Private Some-college Never-married Craft-repair Not-in-family White Male Mexico 0 +20 0.222222224 0.208512813 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +18 0.2 0.08782149 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male Scotland 0 +21 0.233333334 0.235309377 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +27 0.3 0.2538794 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +42 0.466666669 0.120937832 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 +21 0.233333334 0.07110975 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 +51 0.566666663 0.151011154 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.0322670154 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +23 0.25555557 0.1288357 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Transport-moving Own-child White Male United-States 0 +57 0.6333333 0.0141125685 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.125660658 0.8125 0 0 0.121212125 State-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +59 0.655555546 0.029110834 0.3125 0 0 0.6060606 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 1 +38 0.422222227 0.108534023 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +20 0.222222224 0.136729524 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Other-relative White Male United-States 0 +90 1 0.0954789 0.3125 0 0 0.4040404 Private 9th Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.07632627 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.231592819 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +45 0.5 0.144182175 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.07855567 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.161756039 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Own-child White Male United-States 0 +34 0.377777785 0.34777078 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +23 0.25555557 0.191722259 0.8125 0 0 0.434343427 Self-emp-inc Bachelors Divorced Sales Not-in-family White Female United-States 0 +39 0.433333337 0.09525125 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +19 0.211111113 0.0287936 0.625 0 0 0.5555556 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +54 0.6 0.111320436 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.112658747 0.875 0 0 0.434343427 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +44 0.4888889 0.09423219 0.625 0 0 0.5050505 Private Some-college Never-married Sales Own-child White Male United-States 0 +31 0.344444454 0.15923366 0.625 0 0 0.2020202 Self-emp-inc Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +25 0.2777778 0.210793391 0.3125 0 0 0.4040404 Private 9th Separated Handlers-cleaners Other-relative White Male El-Salvador 0 +33 0.366666675 0.08011086 0.8125 0 0 0.323232323 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +32 0.355555564 0.133405626 0.5625 0 0 0.6060606 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +36 0.4 0.251869559 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.1590289 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband Other Male United-States 1 +80 0.8888889 0.106268927 0.875 0 0 0.1010101 Private Masters Widowed Prof-specialty Not-in-family White Female United-States 0 +21 0.233333334 0.0967222452 0.625 0 0 0.08080808 Private Some-college Never-married Sales Own-child White Female United-States 0 +35 0.3888889 0.2154172 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +77 0.8555556 0.08939689 0.875 0 0 0.454545468 ? Masters Divorced ? Not-in-family White Male United-States 0 +30 0.333333343 0.092682384 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.0413166247 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +49 0.544444442 0.180664852 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +33 0.366666675 0.06744438 0.5625 0 0.399449021 0.25252524 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +53 0.5888889 0.02355552 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +41 0.455555558 0.218083724 0.5625 0 0 0.5555556 Private HS-grad Divorced Handlers-cleaners Unmarried White Male United-States 0 +57 0.6333333 0.215351209 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male Poland 1 +21 0.233333334 0.121464536 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Female United-States 0 +19 0.211111113 0.08458987 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.0409320369 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +42 0.466666669 0.0502995551 0.875 0 0.459366381 0.6060606 Federal-gov Masters Divorced Adm-clerical Not-in-family White Male United-States 0 +29 0.322222233 0.09509297 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +38 0.422222227 0.137850955 0.6875 0 0 0.25252524 ? Assoc-voc Separated ? Unmarried White Female United-States 0 +26 0.2888889 0.184408352 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +41 0.455555558 0.047172334 0.625 0 0.6896235 0.6060606 Private Some-college Never-married Craft-repair Unmarried White Male ? 1 +40 0.444444448 0.231068134 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +36 0.4 0.1198265 1 0 0 0.4040404 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 +28 0.311111122 0.0970314 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.173484966 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 +42 0.466666669 0.04517059 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +32 0.355555564 0.123496592 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +32 0.355555564 0.103010364 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Adm-clerical Own-child White Male United-States 0 +37 0.411111116 0.152978539 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.030717887 0.5625 0 0 0.565656543 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +49 0.544444442 0.1047272 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.1553871 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family Black Male United-States 0 +24 0.266666681 0.180476934 0.3125 0 0 0.2020202 ? 9th Never-married ? Own-child White Female United-States 0 +19 0.211111113 0.111210644 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +31 0.344444454 0.03362486 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +40 0.444444448 0.183363035 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +29 0.322222233 0.1720719 0.25 0 0 0.3030303 Private 7th-8th Never-married Handlers-cleaners Own-child White Male Mexico 0 +59 0.655555546 0.130861014 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +52 0.5777778 0.0980315953 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 +27 0.3 0.118045 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +45 0.5 0.0251268782 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +58 0.644444466 0.09264265 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male South 0 +53 0.5888889 0.186242387 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male Cuba 0 +23 0.25555557 0.117616631 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +35 0.3888889 0.145018712 0.4375 0 0 0.4040404 Private 11th Divorced Handlers-cleaners Other-relative White Male United-States 0 +49 0.544444442 0.22385256 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +49 0.544444442 0.13743943 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 +25 0.2777778 0.263750046 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Not-in-family White Male United-States 0 +47 0.5222222 0.113889292 0.875 0 0 0.5050505 Private Masters Divorced Prof-specialty Unmarried White Female United-States 1 +28 0.311111122 0.155413374 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 +20 0.222222224 0.128620163 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +74 0.822222233 0.137966812 0.1875 0 0 0.565656543 ? 5th-6th Married-civ-spouse ? Husband White Male Mexico 0 +19 0.211111113 0.114401855 0.5625 0 0 0.24242425 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +28 0.311111122 0.142850608 0.5625 0.0258002579 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.136607617 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +61 0.677777767 0.152884915 0.625 0 0 0.4040404 ? Some-college Married-spouse-absent ? Not-in-family White Male United-States 0 +30 0.333333343 0.09430224 0.6875 0 0 0.535353541 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +20 0.222222224 0.291220158 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male Germany 0 +35 0.3888889 0.06080198 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male ? 1 +23 0.25555557 0.1511573 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Male United-States 0 +25 0.2777778 0.11378894 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +19 0.211111113 0.3851627 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +30 0.333333343 0.1053839 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +26 0.2888889 0.07310678 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +34 0.377777785 0.130884588 0.5625 0 0 0.454545468 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +49 0.544444442 0.07731974 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried Black Female United-States 0 +35 0.3888889 0.0270323064 0.625 0 0.4687787 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +38 0.422222227 0.137910232 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +36 0.4 0.15369384 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +33 0.366666675 0.110050149 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 1 +54 0.6 0.09351689 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +19 0.211111113 0.114401855 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Own-child White Male United-States 0 +18 0.2 0.13898991 0.375 0 0 0.4040404 Never-worked 10th Never-married ? Own-child White Male United-States 0 +60 0.6666667 0.150937051 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.108294919 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 +43 0.477777779 0.128001183 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +49 0.544444442 0.0978578255 0.1875 0 0 0.4040404 Local-gov 5th-6th Married-civ-spouse Other-service Husband White Male United-States 0 +25 0.2777778 0.08100464 0.8125 0 0 0.7070707 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +17 0.188888893 0.2205381 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Male United-States 0 +41 0.455555558 0.14703393 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.797883749 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 +90 1 0.153428465 0.875 0.200512 0 0.6060606 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.138979122 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Other-relative White Male United-States 0 +27 0.3 0.024820419 0.6875 0 0 0.353535354 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.100053549 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.105798125 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband Black Male ? 1 +31 0.344444454 0.09595846 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family Black Female United-States 0 +43 0.477777779 0.05842912 0.6875 0 0 1 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +63 0.7 0.243570954 0.875 0 0 0.4040404 Private Masters Separated Prof-specialty Not-in-family White Female United-States 1 +46 0.51111114 0.109940358 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.120962754 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.1715984 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Wife Black Female United-States 1 +26 0.2888889 0.03910878 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.13836284 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +20 0.222222224 0.02773817 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 +19 0.211111113 0.207491726 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family Black Female United-States 0 +61 0.677777767 0.11714381 0.3125 0 0 0.4040404 Private 9th Divorced Handlers-cleaners Not-in-family White Male Puerto-Rico 1 +23 0.25555557 0.09601032 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +24 0.266666681 0.0806247741 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +35 0.3888889 0.185467154 0.8125 0.07430074 0 0.4040404 Private Bachelors Divorced Tech-support Unmarried White Male Germany 1 +42 0.466666669 0.139685661 0.5625 0 0 0.121212125 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +31 0.344444454 0.09915438 0.5 0 0 0.212121218 Private 12th Divorced Other-service Unmarried White Female United-States 0 +31 0.344444454 0.06840551 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +63 0.7 0.145761624 0.8125 0 0 0.25252524 Private Bachelors Widowed Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.1272886 0.6875 0 0.365013778 0.646464646 State-gov Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 +43 0.477777779 0.0355956256 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +22 0.244444445 0.2052327 0.8125 0 0 0.1010101 Private Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female Vietnam 0 +17 0.188888893 0.17892915 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Own-child White Male United-States 0 +23 0.25555557 0.1739726 0.8125 0 0.5121671 0.4040404 Self-emp-not-inc Bachelors Never-married Adm-clerical Own-child White Male United-States 1 +35 0.3888889 0.243020669 0.3125 0 0 0.454545468 Private 9th Divorced Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.03587245 0.5625 0 0 0.282828271 Private HS-grad Divorced Other-service Unmarried Other Female United-States 0 +50 0.5555556 0.08575104 0.8125 0.1502415 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.157456875 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Other-relative White Male ? 0 +26 0.2888889 0.133043274 0.875 0 0 0.4040404 Local-gov Masters Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 +32 0.355555564 0.229634851 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.059562 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.123802371 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +90 1 0.03485137 0.875 0 0 0.5050505 Private Masters Never-married Exec-managerial Not-in-family Black Male United-States 1 +35 0.3888889 0.118282087 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 1 +31 0.344444454 0.158440232 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband Black Male United-States 1 +60 0.6666667 0.1530715 0.5625 0 0 0.333333343 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +21 0.233333334 0.09867213 0.6875 0 0.3624885 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 +71 0.788888931 0.227024227 0.875 0 0 0.4040404 Local-gov Masters Widowed Prof-specialty Not-in-family White Female United-States 0 +22 0.244444445 0.09497038 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Other-service Own-child White Male United-States 0 +50 0.5555556 0.0793363 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.116417743 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.0495142154 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Asian-Pac-Islander Female Vietnam 0 +74 0.822222233 0.142166287 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +67 0.7444445 0.1332359 0.625 0 0.423324138 0.7070707 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +59 0.655555546 0.029110834 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.123782165 0.5625 0 0.399449021 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +45 0.5 0.0180379264 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband Amer-Indian-Eskimo Male United-States 0 +63 0.7 0.182898283 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +39 0.433333337 0.168489367 0.8125 0 0 0.6363636 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.6152381 0.625 0 0 0.4040404 State-gov Some-college Divorced Other-service Unmarried Black Female United-States 0 +32 0.355555564 0.10310331 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family Asian-Pac-Islander Male South 0 +34 0.377777785 0.121971034 0.8125 0 0.453856736 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.155917168 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +29 0.322222233 0.06427068 0.875 0 0 0.363636374 State-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 +22 0.244444445 0.158053622 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +53 0.5888889 0.19101572 0.8125 0.135501355 0 0.434343427 Private Bachelors Divorced Sales Not-in-family White Female United-States 1 +46 0.51111114 0.2213699 0.6875 0 0 0.424242437 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.09681452 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 1 +44 0.4888889 0.056245517 0.9375 0.0235402342 0 1 Private Prof-school Divorced Prof-specialty Not-in-family White Female United-States 0 +56 0.622222245 0.0551988445 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.176045075 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child Black Female United-States 0 +52 0.5777778 0.208826 0.3125 0 0 0.3030303 Private 9th Married-spouse-absent Machine-op-inspct Not-in-family Asian-Pac-Islander Female China 0 +39 0.433333337 0.212979019 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +45 0.5 0.05965091 0.625 0.07688077 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.04128699 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.07635456 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Male United-States 0 +35 0.3888889 0.320988357 0.5625 0 0 0.04040404 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +46 0.51111114 0.179905772 0.1875 0 0 0.454545468 Private 5th-6th Married-civ-spouse Craft-repair Wife White Female Italy 0 +35 0.3888889 0.0324125 0.5 0 0 0.5050505 Private 12th Married-civ-spouse Craft-repair Wife White Female United-States 0 +33 0.366666675 0.144564077 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +48 0.533333361 0.07785048 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.130760655 0.5625 0 0 0.5050505 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 +18 0.2 0.0156482272 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 +20 0.222222224 0.06061204 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Own-child White Female United-States 0 +35 0.3888889 0.06850452 0.5625 0 0 0.6060606 Private HS-grad Never-married Transport-moving Own-child Asian-Pac-Islander Male United-States 0 +19 0.211111113 0.159934133 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +21 0.233333334 0.139079481 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female ? 0 +56 0.622222245 0.0193499718 0.4375 0 0 0.4040404 Private 11th Separated Machine-op-inspct Not-in-family White Female United-States 0 +28 0.311111122 0.103370704 0.8125 0 0 0.161616161 Private Bachelors Never-married Adm-clerical Own-child White Female El-Salvador 0 +45 0.5 0.1855702 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +32 0.355555564 0.08621376 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 +44 0.4888889 0.1181952 0.8125 0 0 0.121212125 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.127745241 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.141312927 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +33 0.366666675 0.119210213 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.104174905 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +25 0.2777778 0.128827617 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +28 0.311111122 0.252900064 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +39 0.433333337 0.0693424 0.8125 0.07298073 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +53 0.5888889 0.11394991 0.375 0 0 0.4040404 Private 10th Married-spouse-absent Machine-op-inspct Not-in-family White Female Columbia 0 +47 0.5222222 0.12393371 0.5625 0.0332503319 0 0.454545468 Private HS-grad Divorced Exec-managerial Not-in-family Amer-Indian-Eskimo Female United-States 0 +49 0.544444442 0.02071186 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 0 +22 0.244444445 0.09798378 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 +31 0.344444454 0.0619409271 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative White Male United-States 0 +44 0.4888889 0.0331709 0.625 0 0 0.8080808 Self-emp-inc Some-college Divorced Other-service Unmarried White Male United-States 0 +19 0.211111113 0.147474423 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Own-child White Male United-States 0 +37 0.411111116 0.162527919 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +60 0.6666667 0.169442415 0.5625 0 0 0.353535354 ? HS-grad Widowed ? Not-in-family White Male Poland 0 +23 0.25555557 0.215424612 0.625 0 0 0.25252524 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +44 0.4888889 0.223883539 0.9375 1 0 0.656565666 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +54 0.6 0.122844607 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +23 0.25555557 0.138707012 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.137343109 0.625 0 0 0.1010101 Private Some-college Never-married Other-service Own-child White Female United-States 0 +19 0.211111113 0.1052694 0.625 0 0 0.25252524 State-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 +51 0.566666663 0.17121987 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +41 0.455555558 0.102043167 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +61 0.677777767 0.057619527 0.625 0.1502415 0 0.181818187 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +19 0.211111113 0.020744862 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-spouse-absent Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 +22 0.244444445 0.08838793 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 +22 0.244444445 0.0416581072 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +49 0.544444442 0.153431162 0.25 0 0 0.323232323 Private 7th-8th Married-civ-spouse Prof-specialty Husband White Male United-States 0 +35 0.3888889 0.08988587 0.375 0 0 0.5050505 Private 10th Divorced Machine-op-inspct Not-in-family White Male United-States 0 +38 0.422222227 0.0701109 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.07100535 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +56 0.622222245 0.09576448 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +41 0.455555558 0.226740673 0.625 0 0 0.8080808 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +62 0.6888889 0.135095522 0.875 0 0 0.454545468 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.140568674 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Own-child White Male Japan 0 +55 0.6111111 0.130594969 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female England 0 +25 0.2777778 0.18348965 0.5625 0.04416044 0 0.424242437 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +33 0.366666675 0.038190078 0.8125 0.1502415 0 0.75757575 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.194376662 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.179455861 0.5625 0 0 0.454545468 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +53 0.5888889 0.18648015 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 +43 0.477777779 0.088526 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Not-in-family White Female United-States 0 +56 0.622222245 0.117954075 0.5625 0 0 0.353535354 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +25 0.2777778 0.1868681 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +60 0.6666667 0.04263204 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Other-relative Black Male United-States 0 +28 0.311111122 0.0648862943 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.14949435 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male Mexico 0 +40 0.444444448 0.133307964 0.8125 0.0297702979 0 0.4040404 Private Bachelors Never-married Adm-clerical Unmarried Black Female United-States 0 +29 0.322222233 0.4260732 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +20 0.222222224 0.1387279 0.625 0 0 0.25252524 Private Some-college Never-married Craft-repair Own-child White Female United-States 0 +25 0.2777778 0.09411298 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.135987282 0.4375 0 0 0.1010101 Private 11th Never-married Sales Own-child White Female United-States 0 +32 0.355555564 0.155063808 0.75 0 0 0.353535354 State-gov Assoc-acdm Married-civ-spouse Other-service Husband White Male United-States 0 +27 0.3 0.07642192 0.125 0 0 0.353535354 Private 1st-4th Never-married Other-service Own-child Other Male Dominican-Republic 0 +48 0.533333361 0.06362274 0.5625 0 0 0.161616161 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 +20 0.222222224 0.182783112 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 +55 0.6111111 0.156083539 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female England 0 +33 0.366666675 0.133483082 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +21 0.233333334 0.0948094055 0.625 0 0 0.121212125 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +43 0.477777779 0.123579435 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.111649789 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +39 0.433333337 0.09386646 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.153223038 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family Asian-Pac-Islander Female United-States 0 +25 0.2777778 0.149695739 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +44 0.4888889 0.130324885 0.625 0 0 0.727272749 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +27 0.3 0.0197082926 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Unmarried White Male United-States 0 +39 0.433333337 0.117442861 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +69 0.7666667 0.0728737339 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Other-relative White Male United-States 0 +34 0.377777785 0.0745077357 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family Asian-Pac-Islander Female Philippines 0 +20 0.222222224 0.135838434 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Male United-States 0 +37 0.411111116 0.0877460539 0.1875 0 0 0.4040404 Private 5th-6th Separated Other-service Unmarried White Female United-States 0 +43 0.477777779 0.06609394 0.8125 0 0 0.3939394 Local-gov Bachelors Divorced Prof-specialty Own-child White Female United-States 0 +62 0.6888889 0.158631518 0.5625 0 0 0.4848485 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +34 0.377777785 0.400753021 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Wife Black Female United-States 1 +31 0.344444454 0.235163212 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +42 0.466666669 0.07919621 1 0.0861408561 0 0.6060606 State-gov Doctorate Divorced Prof-specialty Not-in-family White Female United-States 1 +26 0.2888889 0.110852323 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +39 0.433333337 0.229063019 0.625 0 0 0.75757575 Private Some-college Separated Other-service Unmarried White Female United-States 0 +25 0.2777778 0.0330651551 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Male United-States 0 +54 0.6 0.125872821 0.625 0 0 0.3030303 Local-gov Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 +44 0.4888889 0.112658747 0.875 0 0 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.02297022 0.875 0.07688077 0 0.3838384 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.178564772 0.625 0 0 0.4040404 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +50 0.5555556 0.08646701 0.1875 0 0 0.5555556 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male ? 0 +33 0.366666675 0.10669864 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +40 0.444444448 0.114418693 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 +44 0.4888889 0.199856535 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.230657279 0.75 0 0 0.565656543 Local-gov Assoc-acdm Divorced Protective-serv Not-in-family White Male United-States 0 +21 0.233333334 0.0261136051 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 +35 0.3888889 0.181382835 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Never-married Other-service Not-in-family Black Female United-States 0 +43 0.477777779 0.0750876442 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +57 0.6333333 0.134110153 0.375 0 0 0.3030303 ? 10th Separated ? Not-in-family White Male United-States 0 +51 0.566666663 0.022807898 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +29 0.322222233 0.08949522 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.186585218 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Protective-serv Not-in-family Black Male United-States 0 +35 0.3888889 0.07554363 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +18 0.2 0.473539859 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 +58 0.644444466 0.0857166946 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.173233077 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.0385302156 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 +37 0.411111116 0.135595292 0.625 0 0 0.4040404 Private Some-college Separated Other-service Unmarried White Female United-States 0 +38 0.422222227 0.07683614 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +45 0.5 0.155572325 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.196989983 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Cambodia 1 +64 0.7111111 0.193123892 0.25 0 0 0.4040404 ? 7th-8th Widowed ? Not-in-family White Female United-States 0 +38 0.422222227 0.09055267 0.625 0 0 0.727272749 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +30 0.333333343 0.116119362 0.5625 0 0 0.3030303 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +46 0.51111114 0.128885537 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +18 0.2 0.1881101 0.375 0 0 0.3030303 ? 10th Never-married ? Other-relative White Female United-States 0 +60 0.6666667 0.262176 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.2046649 0.5625 0 0 0.444444448 Private HS-grad Separated Transport-moving Not-in-family White Male United-States 0 +47 0.5222222 0.110535763 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 +39 0.433333337 0.0750984251 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +42 0.466666669 0.179216757 0.625 0.07298073 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.0414762534 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Other-relative White Female United-States 0 +44 0.4888889 0.155820861 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Male United-States 0 +33 0.366666675 0.110963456 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +54 0.6 0.138301551 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +58 0.644444466 0.0367520824 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +45 0.5 0.0231823828 0.8125 0 0 0.3030303 Private Bachelors Never-married Transport-moving Not-in-family White Male United-States 0 +59 0.655555546 0.0784277 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +29 0.322222233 0.195823416 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Priv-house-serv Not-in-family White Female United-States 0 +27 0.3 0.1721433 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +44 0.4888889 0.07578408 0.875 0 0 0.2020202 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 +44 0.4888889 0.114094719 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +33 0.366666675 0.116295159 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.221596211 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +33 0.366666675 0.0830151439 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.0551389 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried Black Female United-States 0 +32 0.355555564 0.116732955 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Husband Other Male United-States 0 +31 0.344444454 0.0232854337 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +57 0.6333333 0.107110843 0.9375 1 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.100480571 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +78 0.8666667 0.244583279 0.5625 0 0 0.01010101 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +28 0.311111122 0.207926154 0.8125 0 0 0.4848485 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +30 0.333333343 0.173297063 0.625 0 0.518365443 0.4040404 Self-emp-not-inc Some-college Never-married Sales Other-relative Asian-Pac-Islander Male South 0 +29 0.322222233 0.113476418 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +66 0.733333349 0.09597934 0.5625 0 0 0.0303030312 Private HS-grad Never-married Other-service Other-relative Black Female United-States 0 +60 0.6666667 0.22788702 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.119670242 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +26 0.2888889 0.176881611 0.5625 0.02597026 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +24 0.266666681 0.1353784 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +29 0.322222233 0.1190021 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +44 0.4888889 0.253297448 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +34 0.377777785 0.119670242 0.8125 0 0 0.5555556 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +59 0.655555546 0.234679624 0.8125 0 0.43663913 0.434343427 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.2158348 0.8125 0 0 0.24242425 Private Bachelors Never-married Exec-managerial Own-child Asian-Pac-Islander Male United-States 0 +23 0.25555557 0.025696015 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Other-relative White Male Philippines 0 +55 0.6111111 0.08310203 0.6875 0 0 0.353535354 Local-gov Assoc-voc Separated Prof-specialty Unmarried Black Female United-States 0 +39 0.433333337 0.101723239 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.326310635 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family Black Male United-States 0 +57 0.6333333 0.22212629 0.25 0 0 0.75757575 Private 7th-8th Divorced Transport-moving Unmarried White Male United-States 0 +35 0.3888889 0.100291304 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +39 0.433333337 0.203147426 0.6875 0 0 0.4848485 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 +47 0.5222222 0.118756928 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Sales Own-child White Female United-States 1 +53 0.5888889 0.0358300135 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Adm-clerical Husband White Male United-States 1 +23 0.25555557 0.196272671 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child Black Male United-States 0 +35 0.3888889 0.13775599 0.875 0 0 0.5050505 Private Masters Never-married Craft-repair Not-in-family White Male United-States 1 +44 0.4888889 0.32086578 0.625 0 0 0.4040404 Private Some-college Divorced Farming-fishing Not-in-family White Female United-States 0 +28 0.311111122 0.151521012 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +26 0.2888889 0.2062531 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family Asian-Pac-Islander Female Poland 0 +23 0.25555557 0.196687564 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +32 0.355555564 0.06333986 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Husband White Male Ireland 0 +49 0.544444442 0.126330152 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +36 0.4 0.1186101 0.625 0.0217402168 0 0.6060606 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +36 0.4 0.5045481 0.5625 0 0 0.363636374 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +41 0.455555558 0.1549264 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Husband Other Male United-States 0 +21 0.233333334 0.1455306 0.75 0 0 0.464646459 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife Amer-Indian-Eskimo Female United-States 1 +54 0.6 0.070727855 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.133496553 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Other-service Not-in-family Black Female United-States 0 +35 0.3888889 0.14509213 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +31 0.344444454 0.08113396 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +46 0.51111114 0.1342462 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Other-relative Asian-Pac-Islander Male India 0 +46 0.51111114 0.09895501 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Not-in-family White Female United-States 0 +56 0.622222245 0.117696114 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +45 0.5 0.127677888 0.875 0 0 0.01010101 ? Masters Married-civ-spouse ? Wife White Female United-States 0 +21 0.233333334 0.16835466 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +51 0.566666663 0.0987226442 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.105352245 0.625 0 0 0.2020202 State-gov Some-college Divorced Prof-specialty Unmarried White Male United-States 0 +42 0.466666669 0.159028232 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Craft-repair Not-in-family White Male Puerto-Rico 0 +19 0.211111113 0.0426771641 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 +25 0.2777778 0.128043622 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Own-child White Male United-States 0 +37 0.411111116 0.08524859 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 +35 0.3888889 0.119051263 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Other-service Husband Black Male United-States 0 +40 0.444444448 0.0775649 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +57 0.6333333 0.09354855 0.4375 0 0 0.151515156 Self-emp-not-inc 11th Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.173006758 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +48 0.533333361 0.178542539 0.375 0 0 0.3838384 Private 10th Divorced Sales Not-in-family White Female United-States 0 +34 0.377777785 0.1683486 0.625 0 0 0.343434334 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.0209745374 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Transport-moving Not-in-family White Male United-States 0 +30 0.333333343 0.110587627 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Not-in-family White Male ? 0 +45 0.5 0.04549321 0.875 0 0 0.5050505 State-gov Masters Divorced Protective-serv Not-in-family White Male United-States 0 +32 0.355555564 0.117726423 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.134540528 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +62 0.6888889 0.0823368952 0.625 0.0861408561 0 0.3939394 Private Some-college Never-married Craft-repair Not-in-family White Female United-States 1 +56 0.622222245 0.126736283 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +50 0.5555556 0.065054 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +25 0.2777778 0.1276954 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +41 0.455555558 0.0946922153 0.625 0 0 0.333333343 Private Some-college Never-married Sales Not-in-family Black Male United-States 0 +35 0.3888889 0.172224119 0.5625 0 0 0.272727281 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +33 0.366666675 0.175645664 0.625 0 0 0.414141417 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.114451021 0.75 0 0.43663913 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 +37 0.411111116 0.101920582 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +56 0.622222245 0.129903927 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +19 0.211111113 0.0630455241 0.25 0 0.3677686 0.323232323 Private 7th-8th Never-married Craft-repair Own-child White Male United-States 0 +31 0.344444454 0.05856921 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Exec-managerial Wife White Female United-States 0 +53 0.5888889 0.154052824 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Craft-repair Not-in-family Other Male ? 1 +33 0.366666675 0.129752383 0.5625 0 0 0.353535354 Private HS-grad Separated Handlers-cleaners Unmarried White Male Puerto-Rico 0 +72 0.8 0.191337675 0.125 0 0 0.4040404 Private 1st-4th Divorced Other-service Not-in-family Black Male United-States 0 +54 0.6 0.0291431639 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +30 0.333333343 0.1279985 0.8125 0 0 0.4040404 Private Bachelors Never-married Machine-op-inspct Not-in-family White Female United-States 0 +51 0.566666663 0.2061743 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 +30 0.333333343 0.148277268 0.5625 0 0.4242424 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.25705108 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +32 0.355555564 0.145726591 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 0 +30 0.333333343 0.143949136 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Male United-States 1 +35 0.3888889 0.07561839 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 +40 0.444444448 0.140281737 0.625 0 0 0.444444448 Private Some-college Divorced Adm-clerical Own-child White Female United-States 1 +38 0.422222227 0.23750712 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +19 0.211111113 0.08730354 0.375 0 0 0.3030303 Private 10th Never-married Other-service Other-relative White Female United-States 0 +32 0.355555564 0.168080539 0.625 0 0 0.444444448 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +49 0.544444442 0.120393619 0.875 0 0 0.4040404 Private Masters Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 +76 0.844444454 0.116886519 0.8125 0 0 0.1010101 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +60 0.6666667 0.112931527 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +60 0.6666667 0.0549455956 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Sales Husband White Male United-States 0 +55 0.6111111 0.1082114 1 0 0 0.8080808 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.110003 0.8125 0 0 0.3030303 Private Bachelors Divorced Tech-support Not-in-family White Female ? 0 +24 0.266666681 0.102504537 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +53 0.5888889 0.0715132 0.875 0.07298073 0 0.6060606 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +69 0.7666667 0.107220627 0.625 0 0.185950413 0.3838384 State-gov Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +71 0.788888931 0.168560758 0.625 0.0343203433 0 0.3030303 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +41 0.455555558 0.05281184 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +32 0.355555564 0.08848829 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +45 0.5 0.112432435 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.256183565 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +31 0.344444454 0.0533371978 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +40 0.444444448 0.230459258 0.5625 0 0 0.373737365 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +44 0.4888889 0.122998171 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +63 0.7 0.22864677 0.625 0 0 0.6060606 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +31 0.344444454 0.256719679 0.625 0.1502415 0 0.565656543 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +51 0.566666663 0.202609956 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Unmarried White Male United-States 0 +51 0.566666663 0.16231373 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Philippines 0 +23 0.25555557 0.100507513 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +49 0.544444442 0.11329928 0.25 0 0 0.4848485 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +56 0.622222245 0.192958876 0.5625 0.0288502872 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.205830112 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.07393119 0.9375 0.1502415 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.127161965 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Other-service Unmarried White Female United-States 0 +43 0.477777779 0.161762774 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Germany 0 +31 0.344444454 0.309465528 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.109453395 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +43 0.477777779 0.0979595259 0.9375 0 0 0.3030303 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.0872718841 1 0 0 0.727272749 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 +41 0.455555558 0.01848448 0.625 0 0 0.464646459 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +43 0.477777779 0.131513 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +47 0.5222222 0.0372275971 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.110813938 0.9375 0 0.6483012 0.454545468 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 +46 0.51111114 0.0187256057 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.111327842 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 +19 0.211111113 0.184990957 0.1875 0 0 0.5050505 Private 5th-6th Never-married Other-service Not-in-family White Male Guatemala 0 +24 0.266666681 0.2136283 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.109945752 0.625 0 0 0.656565666 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +37 0.411111116 0.114775665 0.6875 0 0 0.3030303 Private Assoc-voc Divorced Machine-op-inspct Not-in-family White Female United-States 0 +28 0.311111122 0.0376842543 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Own-child Black Female Germany 0 +40 0.444444448 0.05160958 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +27 0.3 0.24655807 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 +22 0.244444445 0.2353114 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +21 0.233333334 0.193185851 0.625 0 0 0.121212125 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +32 0.355555564 0.2514055 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +20 0.222222224 0.109097771 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Own-child White Male United-States 0 +45 0.5 0.366350234 0.875 0.143441439 0 0.4848485 Private Masters Divorced Transport-moving Not-in-family White Male United-States 1 +46 0.51111114 0.0734752044 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Protective-serv Husband White Male United-States 1 +46 0.51111114 0.0741905 0.6875 0 0 0.454545468 Private Assoc-voc Divorced Exec-managerial Unmarried White Female United-States 0 +26 0.2888889 0.022974262 0.625 0 0 0.444444448 Private Some-college Never-married Protective-serv Not-in-family White Male United-States 0 +47 0.5222222 0.0798178762 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Own-child White Male United-States 0 +22 0.244444445 0.07933495 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +34 0.377777785 0.238351062 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +49 0.544444442 0.13502413 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male Portugal 0 +20 0.222222224 0.174120113 0.625 0 0 0.25252524 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +28 0.311111122 0.12821874 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +30 0.333333343 0.117669173 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +23 0.25555557 0.12084084 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.221949816 0.3125 0 0 0.4040404 Private 9th Never-married Priv-house-serv Own-child White Male Mexico 0 +31 0.344444454 0.184425861 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Other-service Husband White Male Mexico 0 +46 0.51111114 0.172776416 0.125 0 0 0.4040404 Private 1st-4th Never-married Machine-op-inspct Own-child White Male Puerto-Rico 0 +42 0.466666669 0.13201344 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +60 0.6666667 0.190381259 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.04891881 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.033875417 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.136889145 0.3125 0 0 0.323232323 Private 9th Never-married Sales Own-child White Female United-States 0 +56 0.622222245 0.116264179 0.8125 0.07688077 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.136167124 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +61 0.677777767 0.119107164 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.118636362 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried Black Female United-States 1 +60 0.6666667 0.02690905 0.3125 0.0222802218 0 0.373737365 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.19698526 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +40 0.444444448 0.108631007 0.625 0 0 0.25252524 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +48 0.533333361 0.239320278 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Canada 1 +56 0.622222245 0.1228931 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +50 0.5555556 0.0467062481 0.6875 0.03103031 0 0.5555556 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 +57 0.6333333 0.0687395856 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.111674711 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Other Female United-States 0 +46 0.51111114 0.214358419 0.6875 0 0 0.363636374 Private Assoc-voc Divorced Tech-support Other-relative White Female United-States 0 +21 0.233333334 0.0792117 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.11498446 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +42 0.466666669 0.278369784 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +20 0.222222224 0.128279358 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +54 0.6 0.0594582781 1 0 0.453856736 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.146356344 0.5625 0.0406404063 0 0.222222224 Local-gov HS-grad Married-civ-spouse Transport-moving Wife White Female United-States 0 +62 0.6888889 0.0654884353 0.625 0 0 0.01010101 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +50 0.5555556 0.08313369 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +49 0.544444442 0.2830744 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +48 0.533333361 0.33563906 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.167395547 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative Black Female United-States 0 +46 0.51111114 0.09251265 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male Philippines 1 +42 0.466666669 0.1838143 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +52 0.5777778 0.138784468 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.06206014 0.75 0 0 0.4040404 Local-gov Assoc-acdm Widowed Adm-clerical Not-in-family Black Female United-States 0 +37 0.411111116 0.109920152 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family Amer-Indian-Eskimo Female United-States 0 +34 0.377777785 0.13191846 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.07793939 0.625 0 0.4708448 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +18 0.2 0.08084367 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Other-relative White Female United-States 0 +33 0.366666675 0.149364352 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family Black Male United-States 0 +41 0.455555558 0.230459258 0.625 0 0 0.151515156 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +21 0.233333334 0.11878185 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.08974106 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 +26 0.2888889 0.113895357 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Tech-support Own-child White Female United-States 0 +33 0.366666675 0.107389688 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Wife White Female United-States 0 +24 0.266666681 0.1175055 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +43 0.477777779 0.243334547 0.375 0 0 0.424242437 Private 10th Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male China 0 +52 0.5777778 0.301459879 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Not-in-family White Female England 0 +27 0.3 0.208118781 0.625 0 0 0.4040404 ? Some-college Divorced ? Own-child Black Female United-States 0 +61 0.677777767 0.1673383 0.25 0 0 0.4040404 Private 7th-8th Divorced Other-service Unmarried White Female United-States 0 +35 0.3888889 0.108534023 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.143102512 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.115087509 0.5625 0.1502415 0 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.157516137 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.109821148 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +35 0.3888889 0.234854743 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +47 0.5222222 0.0234693084 0.8125 0 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male Germany 1 +22 0.244444445 0.139328018 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +49 0.544444442 0.23521845 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.08812525 0.5625 0 0 0.2020202 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +19 0.211111113 0.279755235 0.375 0 0 0.4040404 Private 10th Divorced Other-service Not-in-family White Female United-States 0 +27 0.3 0.0890352 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +42 0.466666669 0.136367828 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 +27 0.3 0.151155278 0.625 0 0 0.4040404 ? Some-college Divorced ? Own-child White Male United-States 0 +23 0.25555557 0.159495667 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 +20 0.222222224 0.072511375 0.625 0 0 0.1010101 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +47 0.5222222 0.06921981 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +17 0.188888893 0.149122551 0.5 0 0 0.181818187 Private 12th Never-married Other-service Own-child Black Male United-States 0 +76 0.844444454 0.142502382 0.375 0 0 0.01010101 ? 10th Married-civ-spouse ? Husband White Male United-States 0 +39 0.433333337 0.035458222 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 +25 0.2777778 0.186104313 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +31 0.344444454 0.0906664953 0.6875 0 0 0.434343427 Private Assoc-voc Married-civ-spouse Exec-managerial Wife Black Female United-States 0 +44 0.4888889 0.145132542 0.5625 0 0 0.2020202 Private HS-grad Divorced Transport-moving Not-in-family Black Male Haiti 0 +53 0.5888889 0.179516479 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.17903018 0.625 0 0 0.454545468 Private Some-college Separated Craft-repair Not-in-family White Male United-States 0 +45 0.5 0.04560906 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.120529667 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.162406683 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.118908472 0.625 0 0 0.4848485 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +45 0.5 0.113948561 0.625 0 0 0.454545468 Private Some-college Widowed Other-service Unmarried White Female United-States 0 +37 0.411111116 0.190247223 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +53 0.5888889 0.10579139 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +35 0.3888889 0.06692036 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +38 0.422222227 0.279510736 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male ? 0 +65 0.722222269 0.2278675 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +49 0.544444442 0.04015074 0.375 0 0 0.7070707 Self-emp-not-inc 10th Divorced Farming-fishing Unmarried White Male United-States 0 +24 0.266666681 0.148464516 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +54 0.6 0.07807073 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.0182069838 0.375 0 0 0.121212125 Private 10th Never-married Sales Own-child White Female United-States 0 +19 0.211111113 0.114985809 0.5 0 0 0.161616161 Private 12th Never-married Other-service Own-child White Male United-States 0 +60 0.6666667 0.123365924 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 +46 0.51111114 0.1295611 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +78 0.8666667 0.111600623 0.875 0 0 0.151515156 ? Masters Widowed ? Not-in-family White Female United-States 0 +26 0.2888889 0.08658488 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Black Female United-States 0 +58 0.644444466 0.141053617 0.125 0 0 0.3838384 Private 1st-4th Married-civ-spouse Other-service Husband White Male Cuba 0 +37 0.411111116 0.08184118 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Divorced Exec-managerial Unmarried White Male United-States 0 +41 0.455555558 0.06317282 0.875 0 0 0.3838384 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.08998556 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +19 0.211111113 0.2635736 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +48 0.533333361 0.0649011061 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Greece 1 +22 0.244444445 0.137329638 0.625 0 0 0.24242425 Private Some-college Never-married Transport-moving Not-in-family White Female United-States 0 +50 0.5555556 0.132142752 0.875 0 0 0.6060606 Private Masters Married-spouse-absent Prof-specialty Other-relative White Male ? 0 +25 0.2777778 0.132008716 0.125 0 0 0.4040404 Private 1st-4th Never-married Priv-house-serv Not-in-family White Female Guatemala 0 +18 0.2 0.0342687629 0.375 0 0 0.0606060624 Private 10th Never-married Other-service Own-child White Male United-States 0 +21 0.233333334 0.125849247 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +47 0.5222222 0.135465965 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.07476098 0.5625 0 0 0.363636374 Private HS-grad Never-married Other-service Other-relative Amer-Indian-Eskimo Female United-States 0 +39 0.433333337 0.128285423 0.5625 0.0217402168 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 +67 0.7444445 0.117151223 0.8125 0 0 0.08080808 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.112574555 0.625 0 0.3677686 0.24242425 Private Some-college Never-married Other-service Own-child White Male United-States 0 +18 0.2 0.07424371 0.375 0 0 0.111111112 Private 10th Never-married Other-service Own-child White Male United-States 0 +36 0.4 0.19374758 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 +23 0.25555557 0.151514277 0.625 0 0 0.25252524 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +25 0.2777778 0.2659249 0.625 0 0 0.2020202 ? Some-college Separated ? Unmarried White Female United-States 0 +40 0.444444448 0.02533702 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male ? 0 +73 0.811111152 0.0197386015 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +35 0.3888889 0.0251322649 0.625 0.0501305 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.283388972 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.325136662 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +20 0.222222224 0.138892919 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +27 0.3 0.06827215 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +66 0.733333349 0.124852411 0.375 0 0 0.3030303 Self-emp-inc 10th Married-civ-spouse Sales Husband White Male United-States 0 +66 0.733333349 0.14605999 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 +64 0.7111111 0.172437623 0.875 0 0 0.353535354 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +48 0.533333361 0.234487 0.625 0.0332503319 0 0.535353541 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 +24 0.266666681 0.1281689 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +51 0.566666663 0.0174660962 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +25 0.2777778 0.119033076 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +33 0.366666675 0.11245399 0.4375 0 0 0.2020202 Private 11th Separated Sales Own-child White Female United-States 0 +50 0.5555556 0.058175195 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.215876564 0.25 0 0 0.5050505 Private 7th-8th Married-spouse-absent Craft-repair Not-in-family Black Male Dominican-Republic 0 +34 0.377777785 0.128166884 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.0753624439 0.25 0 0 0.4040404 Local-gov 7th-8th Never-married Other-service Unmarried Black Female United-States 0 +30 0.333333343 0.0308451857 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +59 0.655555546 0.0730758 0.625 0.02907029 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +41 0.455555558 0.08118717 0.625 0.03103031 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +36 0.4 0.110813938 0.875 0.105201051 0 0.454545468 Self-emp-not-inc Masters Never-married Sales Not-in-family White Male United-States 1 +37 0.411111116 0.217656031 0.125 0 0 0.858585835 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +28 0.311111122 0.0440417454 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family Amer-Indian-Eskimo Male United-States 0 +19 0.211111113 0.2794299 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +28 0.311111122 0.108847886 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +62 0.6888889 0.1515136 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +36 0.4 0.176049784 0.875 0.1502415 0 0.454545468 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +58 0.644444466 0.156137422 0.375 0 0 0.4040404 Self-emp-not-inc 10th Never-married Craft-repair Not-in-family White Male Greece 0 +42 0.466666669 0.123942472 0.5625 0.0115101151 0 0.5050505 Self-emp-inc HS-grad Divorced Sales Unmarried White Male United-States 0 +43 0.477777779 0.0896205 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.02359526 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.20489727 0.5625 0 0 0.5050505 State-gov HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +64 0.7111111 0.0339744277 0.3125 0 0 0.4040404 Local-gov 9th Never-married Adm-clerical Other-relative White Male United-States 0 +39 0.433333337 0.09839733 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +26 0.2888889 0.180124 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Own-child Black Female United-States 0 +19 0.211111113 0.0816593245 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +21 0.233333334 0.129703879 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +32 0.355555564 0.142134637 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.2331251 0.75 0.0501305 0 0.454545468 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 +26 0.2888889 0.1361907 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Other-relative White Female United-States 0 +20 0.222222224 0.107292026 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +19 0.211111113 0.2089021 0.625 0 0 0.3030303 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +33 0.366666675 0.130157843 0.8125 0 0 0.424242437 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +23 0.25555557 0.134766847 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Other-relative White Male El-Salvador 0 +29 0.322222233 0.0258320682 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.05137721 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +30 0.333333343 0.164116785 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +63 0.7 0.04638767 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Transport-moving Wife Asian-Pac-Islander Female United-States 0 +34 0.377777785 0.06977548 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +60 0.6666667 0.05930808 0.625 0 0 0.24242425 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.125414148 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +25 0.2777778 0.173711285 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +27 0.3 0.134859785 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +55 0.6111111 0.0841749758 0.5625 0.2782828 0 0.5555556 Self-emp-not-inc HS-grad Divorced Craft-repair Unmarried White Male United-States 1 +32 0.355555564 0.153342918 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child Black Female United-States 0 +22 0.244444445 0.07894497 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Male Greece 0 +25 0.2777778 0.05128561 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +18 0.2 0.066455625 0.4375 0 0 0.161616161 Private 11th Never-married Other-service Own-child White Female United-States 0 +24 0.266666681 0.1049488 0.625 0 0 0.444444448 Local-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +29 0.322222233 0.191122144 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +73 0.811111152 0.189874083 0.4375 0 0 0.0303030312 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +39 0.433333337 0.125400677 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +33 0.366666675 0.136157021 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.246300116 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 1 +22 0.244444445 0.126313314 0.375 0 0 0.4040404 Private 10th Separated Other-service Unmarried White Female United-States 0 +33 0.366666675 0.141059682 0.5625 0 0 0.2020202 ? HS-grad Separated ? Unmarried White Female United-States 0 +33 0.366666675 0.0855052 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.0741076544 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.07049212 0.8125 0 0 0.454545468 Private Bachelors Separated Prof-specialty Unmarried White Male United-States 0 +57 0.6333333 0.294523835 0.625 0 0 0.3838384 Self-emp-not-inc Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +42 0.466666669 0.174878508 0.875 0.046500463 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +22 0.244444445 0.146804243 0.625 0 0.3946281 0.3030303 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +21 0.233333334 0.09075608 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 +42 0.466666669 0.08118717 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.0173792113 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +41 0.455555558 0.0428341 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +20 0.222222224 0.219230756 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +47 0.5222222 0.142276749 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.13921015 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +29 0.322222233 0.2882492 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 +52 0.5777778 0.147200957 0.625 0.14084141 0 0.161616161 Private Some-college Married-spouse-absent Adm-clerical Not-in-family White Female United-States 1 +71 0.788888931 0.110045433 0.625 0 0 0.353535354 Private Some-college Widowed Sales Not-in-family White Male United-States 1 +52 0.5777778 0.0841871 0.5625 0 0 0.5555556 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +36 0.4 0.07234434 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +53 0.5888889 0.102628469 0.625 0 0 0.4848485 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 1 +37 0.411111116 0.108591273 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 +26 0.2888889 0.144001 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +34 0.377777785 0.13771154 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.254459977 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +20 0.222222224 0.078382574 0.3125 0 0 0.4040404 Private 9th Never-married Sales Own-child White Female United-States 0 +34 0.377777785 0.1415527 0.625 0 0.399449021 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +56 0.622222245 0.1742784 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +39 0.433333337 0.220538765 0.8125 0 0 0.363636374 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +24 0.266666681 0.20286791 0.625 0 0 0.2020202 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +24 0.266666681 0.125426263 0.4375 0 0 0.353535354 Private 11th Divorced Sales Unmarried White Female United-States 0 +23 0.25555557 0.137349844 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.129477575 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +25 0.2777778 0.102400817 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +29 0.322222233 0.135686219 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.10546203 0.625 0 0 0.373737365 Private Some-college Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 +51 0.566666663 0.07802965 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.07190183 0.6875 0 0.399449021 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.241995558 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +29 0.322222233 0.0559053831 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +18 0.2 0.0530859679 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +24 0.266666681 0.1353582 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 0 +38 0.422222227 0.07217865 0.625 0 0 0.4040404 State-gov Some-college Separated Exec-managerial Own-child White Male United-States 0 +36 0.4 0.127751976 0.5625 0 0 0.282828271 Private HS-grad Never-married Priv-house-serv Unmarried Black Female ? 0 +34 0.377777785 0.0610316545 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Separated Exec-managerial Not-in-family White Male United-States 0 +42 0.466666669 0.218083724 0.8125 0 0.453856736 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.163367137 0.5 0 0 0.353535354 Self-emp-not-inc 12th Divorced Craft-repair Other-relative Black Male United-States 0 +21 0.233333334 0.06124786 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Transport-moving Own-child White Male United-States 0 +64 0.7111111 0.111582436 1 0.07688077 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male Canada 1 +32 0.355555564 0.1095194 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative Black Male United-States 0 +45 0.5 0.138360143 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +53 0.5888889 0.06560967 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Laos 0 +42 0.466666669 0.124507561 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.111285411 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +49 0.544444442 0.07798452 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +62 0.6888889 0.2481813 0.1875 0 0 0.24242425 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +28 0.311111122 0.03573976 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.0906348452 1 0 0 0.5050505 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 +32 0.355555564 0.103368014 0.5625 0 0 0.353535354 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +37 0.411111116 0.07217865 0.375 0 0.5874656 0.5050505 Self-emp-inc 10th Never-married Transport-moving Not-in-family White Male United-States 1 +38 0.422222227 0.121440291 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 +44 0.4888889 0.159170344 0.5625 0 0 0.25252524 Local-gov HS-grad Divorced Transport-moving Own-child White Male United-States 0 +19 0.211111113 0.09555299 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +22 0.244444445 0.247628316 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +24 0.266666681 0.1370764 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +58 0.644444466 0.0805264339 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.07292762 0.8125 0 0 0.4040404 Private Bachelors Widowed Other-service Not-in-family White Female United-States 0 +37 0.411111116 0.2596152 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Unmarried White Female United-States 0 +43 0.477777779 0.10911461 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +32 0.355555564 0.235082388 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.0303858351 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child Black Female United-States 0 +44 0.4888889 0.07597267 0.3125 0 0 0.5050505 Private 9th Divorced Other-service Own-child White Female United-States 0 +28 0.311111122 0.1236872 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 +35 0.3888889 0.1192971 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +38 0.422222227 0.161483258 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +26 0.2888889 0.101273321 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +20 0.222222224 0.1974069 0.4375 0 0 0.6060606 Private 11th Never-married Transport-moving Own-child White Male United-States 0 +24 0.266666681 0.134766847 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 1 +40 0.444444448 0.0618547127 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.218871772 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +79 0.8777778 0.0569917932 0.4375 0 0 0.07070707 Local-gov 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +44 0.4888889 0.170357078 0.375 0 0 0.424242437 Private 10th Divorced Adm-clerical Unmarried Other Female United-States 0 +51 0.566666663 0.0296355169 0.875 1 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +30 0.333333343 0.1042921 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +52 0.5777778 0.0668866858 0.75 0.03103031 0 0.4848485 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.122965172 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 +33 0.366666675 0.06277745 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male Philippines 0 +50 0.5555556 0.06742686 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 +51 0.566666663 0.0774073 0.6875 0.07298073 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +41 0.455555558 0.0816909745 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +35 0.3888889 0.12791498 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 +34 0.377777785 0.106248043 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.0264241043 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +31 0.344444454 0.09016 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Divorced Sales Not-in-family White Male United-States 0 +22 0.244444445 0.340794981 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +67 0.7444445 0.123508714 0.5625 0.0232902318 0 0.151515156 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +65 0.722222269 0.130137637 0.5625 0.09386094 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.09480133 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.3700055 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +29 0.322222233 0.120568059 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +57 0.6333333 0.128344685 0.375 0 0 0.6060606 Self-emp-not-inc 10th Divorced Exec-managerial Own-child White Male United-States 1 +47 0.5222222 0.0545051061 0.625 0 0 0.353535354 Private Some-college Widowed Other-service Not-in-family White Female United-States 0 +51 0.566666663 0.214893878 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +34 0.377777785 0.200103059 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +52 0.5777778 0.114879392 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.162145346 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.200406149 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.11443688 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +21 0.233333334 0.10078568 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +38 0.422222227 0.122937553 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 +55 0.6111111 0.106630616 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +61 0.677777767 0.15304859 0.8125 0 0 0.3030303 Self-emp-inc Bachelors Separated Sales Not-in-family White Female United-States 0 +34 0.377777785 0.06498463 0.75 0.0861408561 0 0.6060606 Private Assoc-acdm Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 1 +41 0.455555558 0.1932842 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +27 0.3 0.1505545 0.6875 0 0 0.434343427 Local-gov Assoc-voc Never-married Adm-clerical Own-child White Male United-States 0 +78 0.8666667 0.2130127 0.8125 1 0 0.2020202 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +40 0.444444448 0.114645 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +26 0.2888889 0.151114866 0.25 0 0 0.75757575 Self-emp-not-inc 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +43 0.477777779 0.08413725 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Japan 0 +55 0.6111111 0.06981454 0.5625 0 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +25 0.2777778 0.206338644 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male Mexico 0 +26 0.2888889 0.153470218 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Never-married Other-service Not-in-family White Female United-States 0 +43 0.477777779 0.10138917 0.5625 0 0 0.686868668 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +25 0.2777778 0.0973109156 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male Poland 0 +22 0.244444445 0.171446189 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Other-relative Black Female Jamaica 0 +52 0.5777778 0.210979968 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +61 0.677777767 0.101017378 0.5625 0.02414024 0 0.05050505 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +42 0.466666669 0.08450231 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Unmarried White Male United-States 0 +21 0.233333334 0.206752867 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.129975989 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +65 0.722222269 0.1294082 0.5625 0.02290023 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Greece 0 +56 0.622222245 0.08864253 0.5625 0 0 0.1010101 ? HS-grad Divorced ? Not-in-family White Male United-States 0 +33 0.366666675 0.22858952 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Divorced Other-service Unmarried White Male United-States 0 +22 0.244444445 0.136889145 0.375 0 0 0.4040404 Private 10th Never-married Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.0564603768 0.5625 0 0 0.24242425 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +45 0.5 0.108061872 0.5625 0 0 0.424242437 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +42 0.466666669 0.07307984 0.5625 0 0 0.424242437 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +37 0.411111116 0.276764065 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Farming-fishing Unmarried Other Male Mexico 0 +56 0.622222245 0.130543113 0.3125 0 0 0.4040404 Private 9th Divorced Craft-repair Not-in-family White Male United-States 0 +35 0.3888889 0.11017812 0.375 0 0 0.161616161 ? 10th Divorced ? Unmarried White Female ? 0 +40 0.444444448 0.06990547 0.75 0 0 0.323232323 Private Assoc-acdm Divorced Adm-clerical Unmarried Black Female United-States 0 +31 0.344444454 0.0232854337 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.0292367842 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +26 0.2888889 0.07125119 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +42 0.466666669 0.0610848628 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +45 0.5 0.1923446 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male China 0 +47 0.5222222 0.0380425751 0.625 0.07688077 0 0.5050505 Local-gov Some-college Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +22 0.244444445 0.334089935 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +33 0.366666675 0.257804751 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +37 0.411111116 0.174636722 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Not-in-family Black Male United-States 0 +48 0.533333361 0.124863192 0.5625 0 0 0.989899 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +57 0.6333333 0.193193942 0.375 0 0 0.08080808 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.09371895 0.625 0 0 0.6060606 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +58 0.644444466 0.0298012067 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +55 0.6111111 0.114238858 0.4375 0 0 0.4040404 Private 11th Widowed Adm-clerical Unmarried White Female United-States 0 +52 0.5777778 0.08985152 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.1261712 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +42 0.466666669 0.12125776 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.03136044 0.5625 0 0 0.6060606 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.0579677448 0.5 0 0 0.3030303 Private 12th Never-married Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.172434255 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.126895919 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +43 0.477777779 0.267230183 0.8125 0 0.4331956 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +25 0.2777778 0.04073873 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +32 0.355555564 0.182713747 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +56 0.622222245 0.154593 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +33 0.366666675 0.0232867822 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.07572683 0.625 0 0 0.1010101 State-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 +20 0.222222224 0.07093126 0.625 0 0 0.181818187 Private Some-college Never-married Sales Own-child White Female United-States 0 +34 0.377777785 0.149117842 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +34 0.377777785 0.2053418 0.3125 0 0 0.4040404 Private 9th Divorced Other-service Unmarried White Female United-States 0 +55 0.6111111 0.215351209 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.118550152 0.3125 0 0 0.232323229 Private 9th Married-civ-spouse Tech-support Wife White Female United-States 0 +31 0.344444454 0.143968 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +30 0.333333343 0.167295188 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +31 0.344444454 0.236536562 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Male United-States 0 +51 0.566666663 0.093068324 0.5625 0 0.430670351 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family White Male United-States 0 +59 0.655555546 0.03382692 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.07912481 0.5625 0 0 0.363636374 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +40 0.444444448 0.130908161 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +54 0.6 0.07954981 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +25 0.2777778 0.061109785 0.8125 0 0.453856736 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.0258010849 0.4375 0 0 0.3030303 Self-emp-inc 11th Never-married Farming-fishing Own-child White Male United-States 0 +41 0.455555558 0.078393355 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.141776308 0.375 0 0 0.4040404 Private 10th Widowed Other-service Unmarried White Female United-States 0 +37 0.411111116 0.113473721 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.117454983 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +39 0.433333337 0.112307832 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +19 0.211111113 0.252652228 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 +41 0.455555558 0.251544237 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +54 0.6 0.228777438 0.5625 0 0 0.414141417 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +39 0.433333337 0.06177052 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.05526283 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.159117132 0.9375 0 0 0.3030303 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 +57 0.6333333 0.09450968 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +33 0.366666675 0.022954056 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +56 0.622222245 0.137950644 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +60 0.6666667 0.126034468 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +22 0.244444445 0.04870328 0.5625 0 0 0.7070707 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +58 0.644444466 0.117954075 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Other-relative White Male United-States 0 +48 0.533333361 0.138550758 0.875 0.105201051 0 0.5050505 Federal-gov Masters Married-spouse-absent Exec-managerial Not-in-family White Female United-States 1 +45 0.5 0.159348831 0.875 0.07688077 0 0.5555556 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.0483543873 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Asian-Pac-Islander Female United-States 0 +56 0.622222245 0.0589908436 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +48 0.533333361 0.0921920538 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.193966478 0.8125 0 0.518365443 0.4848485 Private Bachelors Never-married Tech-support Not-in-family Asian-Pac-Islander Female Philippines 0 +38 0.422222227 0.07449763 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +58 0.644444466 0.07342536 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.158328429 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +63 0.7 0.0597108528 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male ? 0 +51 0.566666663 0.223777115 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +22 0.244444445 0.196366966 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Wife Other Female Mexico 0 +44 0.4888889 0.03037169 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +46 0.51111114 0.108666033 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Tech-support Not-in-family White Male United-States 0 +64 0.7111111 0.1422653 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +32 0.355555564 0.198771477 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male England 1 +31 0.344444454 0.139112487 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +36 0.4 0.160580724 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +21 0.233333334 0.020078063 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.0727572143 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.0770011544 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family Black Female United-States 0 +54 0.6 0.1160372 0.5625 0 0.4708448 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.132881612 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Other-service Husband White Male United-States 0 +28 0.311111122 0.1287643 0.875 0 0 0.2020202 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +57 0.6333333 0.378902227 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +44 0.4888889 0.0535668731 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.1063383 0.625 0 0 0.6060606 Self-emp-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +58 0.644444466 0.137950644 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.125071988 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +39 0.433333337 0.112804905 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.0564071648 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female South 0 +27 0.3 0.0264241043 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.159511149 0.3125 0 0 0.4040404 Local-gov 9th Separated Other-service Unmarried Black Female United-States 0 +37 0.411111116 0.104000457 0.875 0 0 0.4040404 Self-emp-not-inc Masters Never-married Exec-managerial Not-in-family White Male United-States 0 +27 0.3 0.09113461 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family Black Female United-States 0 +33 0.366666675 0.137429327 0.625 0 0 0.5555556 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +20 0.222222224 0.2076096 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Male United-States 0 +55 0.6111111 0.123852216 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +39 0.433333337 0.06664489 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family White Female United-States 0 +41 0.455555558 0.09540077 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.1095322 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +39 0.433333337 0.1259065 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-spouse-absent Sales Not-in-family White Male United-States 0 +28 0.311111122 0.120907523 0.5625 0 0 0.5050505 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 +25 0.2777778 0.2634813 0.625 0 0 0.24242425 Private Some-college Never-married Sales Own-child White Male United-States 0 +31 0.344444454 0.05863387 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.0202114228 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.076423265 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +70 0.7777778 0.432968169 0.5625 0 0 0.323232323 Private HS-grad Divorced Protective-serv Not-in-family White Female United-States 0 +23 0.25555557 0.122662082 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +61 0.677777767 0.109403551 0.5625 0 0 0.4040404 Private HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 +45 0.5 0.163119271 0.25 0 0 0.5555556 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.115073368 0.5625 0.0406404063 0 0.6060606 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +56 0.622222245 0.2930023 0.625 0 0 0.5050505 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +79 0.8777778 0.0813003257 1 0.200512 0 0.353535354 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male El-Salvador 1 +20 0.222222224 0.115039691 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +30 0.333333343 0.180894524 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried Asian-Pac-Islander Male Vietnam 0 +27 0.3 0.181419209 0.8125 0 0 0.25252524 Private Bachelors Married-civ-spouse Sales Husband White Male ? 0 +40 0.444444448 0.151027992 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +60 0.6666667 0.103099272 0.5625 0 0 0.05050505 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +58 0.644444466 0.119463466 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +71 0.788888931 0.109983467 0.9375 0 0 0.02020202 Self-emp-not-inc Prof-school Married-civ-spouse Farming-fishing Husband White Male United-States 0 +50 0.5555556 0.120246112 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.123609066 0.625 0 0 0.4040404 Local-gov Some-college Never-married Exec-managerial Not-in-family White Male Iran 0 +33 0.366666675 0.139601469 0.375 0.03418034 0 0.353535354 Private 10th Separated Other-service Unmarried White Female United-States 0 +60 0.6666667 0.0182103515 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband Amer-Indian-Eskimo Male United-States 1 +33 0.366666675 0.119020954 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 +43 0.477777779 0.109930933 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Other-service Wife White Female ? 1 +33 0.366666675 0.265862256 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Unmarried Black Male United-States 0 +33 0.366666675 0.131667912 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +32 0.355555564 0.298743516 0.5625 0 0 0.454545468 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +21 0.233333334 0.08151317 0.625 0 0 0.09090909 Private Some-college Never-married Other-service Own-child White Female United-States 0 +38 0.422222227 0.03491468 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 +38 0.422222227 0.174369991 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +39 0.433333337 0.127557322 0.625 0 0 0.3030303 State-gov Some-college Separated Exec-managerial Unmarried Black Female United-States 0 +17 0.188888893 0.133458167 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Female United-States 0 +21 0.233333334 0.227497056 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +42 0.466666669 0.141795844 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +42 0.466666669 0.125009343 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +36 0.4 0.117062986 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.16922082 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 1 +37 0.411111116 0.2800873 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.080684714 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +37 0.411111116 0.122384585 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.122825749 0.5625 0 0 0.6060606 Private HS-grad Separated Prof-specialty Unmarried Other Female Puerto-Rico 0 +49 0.544444442 0.04168168 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.09868627 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.218083724 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +49 0.544444442 0.09851654 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.193325281 0.875 0.0861408561 0 0.4040404 Federal-gov Masters Never-married Exec-managerial Not-in-family White Male United-States 1 +33 0.366666675 0.196818233 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Protective-serv Unmarried White Male United-States 0 +24 0.266666681 0.0593559 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +41 0.455555558 0.0963464156 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.270506948 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband Black Male Jamaica 1 +36 0.4 0.190692425 0.5625 0 0.43663913 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +84 0.933333337 0.104436234 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +23 0.25555557 0.175290048 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +41 0.455555558 0.102573916 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.09334784 0.5625 0 0.453856736 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.352322519 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +46 0.51111114 0.118045 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male India 0 +55 0.6111111 0.21802716 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.213153452 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +54 0.6 0.110335052 0.875 0 0 0.6060606 Self-emp-not-inc Masters Divorced Sales Not-in-family White Male United-States 0 +27 0.3 0.0486345775 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Male United-States 0 +52 0.5777778 0.0503696 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +36 0.4 0.2583126 0.625 1 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 1 +25 0.2777778 0.179610088 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +52 0.5777778 0.234066024 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.226366863 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Not-in-family Amer-Indian-Eskimo Female United-States 0 +36 0.4 0.1282073 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 +31 0.344444454 0.137436062 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +66 0.733333349 0.0211233888 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +90 1 0.105058581 0.8125 0.105661057 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +67 0.7444445 0.131447658 0.875 0.200512 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.181573451 0.25 0.0258002579 0 0.4040404 Self-emp-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.01818139 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.07849304 0.8125 0 0.4331956 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.127926424 0.25 0 0 0.5050505 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +32 0.355555564 0.06821759 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 +48 0.533333361 0.07651217 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Other-relative Black Female United-States 0 +21 0.233333334 0.1271586 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Husband Other Male United-States 0 +33 0.366666675 0.0740861 0.75 0 0 0.4040404 Private Assoc-acdm Married-spouse-absent Prof-specialty Own-child White Female United-States 0 +27 0.3 0.1317979 0.625 0 0 0.4848485 Private Some-college Never-married Prof-specialty Not-in-family White Female ? 0 +47 0.5222222 0.294179648 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 +18 0.2 0.0567473024 0.4375 0 0 0.24242425 Private 11th Never-married Other-service Own-child White Female United-States 0 +44 0.4888889 0.258295774 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.146067411 0.625 0 0 0.373737365 Private Some-college Never-married Craft-repair Own-child White Male Mexico 0 +18 0.2 0.2701217 0.375 0 0 0.353535354 Private 10th Never-married Sales Own-child White Female United-States 0 +56 0.622222245 0.0560353734 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +24 0.266666681 0.219300136 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +43 0.477777779 0.126167834 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.130631343 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Own-child White Female United-States 0 +26 0.2888889 0.089831315 0.625 0 0 0.424242437 Private Some-college Never-married Sales Own-child White Male United-States 0 +42 0.466666669 0.07632762 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Unmarried White Male United-States 0 +23 0.25555557 0.120440088 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +53 0.5888889 0.102922805 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.226305574 0.5625 0.04386044 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.2939931 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +27 0.3 0.474241018 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +24 0.266666681 0.101086751 0.625 0 0 0.6060606 Local-gov Some-college Separated Protective-serv Not-in-family White Male United-States 0 +42 0.466666669 0.229812667 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative White Female United-States 0 +41 0.455555558 0.126177251 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.1375418 0.625 0 0 0.1010101 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +42 0.466666669 0.13879256 0.875 0 0 0.656565666 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +38 0.422222227 0.0427755 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +63 0.7 0.2634335 0.25 0 0 0.3030303 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +31 0.344444454 0.0377354436 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.04107281 0.4375 0 0 0.04040404 Self-emp-not-inc 11th Never-married Other-service Own-child White Female United-States 0 +21 0.233333334 0.15373762 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 +24 0.266666681 0.05842575 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Other-relative Asian-Pac-Islander Female Philippines 0 +55 0.6111111 0.157827318 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.0403770469 0.3125 0.00114001136 0 0.2020202 Private 9th Never-married Adm-clerical Unmarried Black Female United-States 0 +31 0.344444454 0.0928224847 0.625 0 0 0.3030303 Private Some-college Divorced Sales Own-child White Female United-States 0 +23 0.25555557 0.112946346 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +35 0.3888889 0.165076569 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 +51 0.566666663 0.173073441 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +19 0.211111113 0.107787743 0.625 0 0 0.3030303 Private Some-college Never-married Protective-serv Own-child White Female United-States 0 +38 0.422222227 0.194941089 0.5625 0 0 0.565656543 Local-gov HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 +52 0.5777778 0.205463722 0.5625 0 0.4708448 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +70 0.7777778 0.116097137 0.9375 0 0 0.25252524 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +53 0.5888889 0.215874538 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 +59 0.655555546 0.1154135 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.04379793 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +18 0.2 0.144937888 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 +41 0.455555558 0.100615948 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +19 0.211111113 0.114045553 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Male United-States 0 +24 0.266666681 0.09357954 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.375213951 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.184068218 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family Black Male Jamaica 0 +34 0.377777785 0.0520029254 0.5625 0 0.43663913 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.21361348 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +50 0.5555556 0.06430166 0.5625 0.07298073 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +18 0.2 0.203985974 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Male United-States 0 +37 0.411111116 0.224725455 0.5625 0 0 0.424242437 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +30 0.333333343 0.11961703 0.625 0 0 0.363636374 Private Some-college Never-married Other-service Unmarried White Female United-States 0 +40 0.444444448 0.105906561 0.875 0.1502415 0 0.3030303 Self-emp-inc Masters Married-civ-spouse Exec-managerial Wife White Female Iran 1 +22 0.244444445 0.124455027 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 +50 0.5555556 0.09318888 0.625 0 0 0.282828271 Local-gov Some-college Separated Other-service Unmarried Black Female United-States 0 +70 0.7777778 0.118734024 0.5625 0 0 0.232323229 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +43 0.477777779 0.06882175 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +77 0.8555556 0.1411102 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.154738486 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.218592927 0.625 0 0 0.3939394 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.227112457 0.625 0 0.43663913 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +58 0.644444466 0.1307115 0.875 0 0.453856736 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.1688194 0.625 0 0 0.121212125 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +33 0.366666675 0.321347356 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +27 0.3 0.07026918 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.15125294 0.625 0 0 0.6060606 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +32 0.355555564 0.114393771 0.625 0 0 0.5555556 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +41 0.455555558 0.02866765 0.8125 0 0 0.25252524 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 +37 0.411111116 0.0211274289 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.08941507 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Male United-States 0 +50 0.5555556 0.188003 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +31 0.344444454 0.0580202825 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Asian-Pac-Islander Male Philippines 0 +54 0.6 0.029751366 0.5625 0 0 0.3838384 State-gov HS-grad Separated Exec-managerial Unmarried White Female United-States 0 +23 0.25555557 0.06268989 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Own-child Black Male United-States 0 +40 0.444444448 0.0987758562 0.8125 0 0 0.2020202 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 +29 0.322222233 0.149097636 0.8125 0.0501305 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Germany 0 +38 0.422222227 0.127570122 0.5625 0 0 0.353535354 Private HS-grad Married-spouse-absent Other-service Not-in-family White Male ? 0 +30 0.333333343 0.116052687 0.6875 0 0 0.5555556 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +20 0.222222224 0.07857858 0.625 0 0 0.08080808 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Male India 0 +43 0.477777779 0.0431816429 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +25 0.2777778 0.0375279933 0.625 0 0 0.25252524 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +39 0.433333337 0.08531998 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +48 0.533333361 0.06877595 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.152558923 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Other-service Unmarried White Female United-States 0 +24 0.266666681 0.142470732 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +20 0.222222224 0.117915012 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male Yugoslavia 0 +25 0.2777778 0.0170060731 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +57 0.6333333 0.04944484 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.139546245 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Exec-managerial Wife White Female Puerto-Rico 1 +66 0.733333349 0.0856325 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.0281598028 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.200342163 0.8125 0.14084141 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 +46 0.51111114 0.09529368 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +42 0.466666669 0.0789564252 0.875 0 0 0.454545468 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +46 0.51111114 0.2541926 0.5625 0 0.43663913 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male Canada 1 +34 0.377777785 0.112522691 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Own-child White Male United-States 0 +43 0.477777779 0.17091544 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife Black Female United-States 0 +42 0.466666669 0.123321474 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Own-child White Female United-States 0 +31 0.344444454 0.181621268 0.8125 0 0 0.4848485 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +70 0.7777778 0.1973968 0.625 0 0 0.3030303 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +32 0.355555564 0.02297022 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +46 0.51111114 0.0539211519 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male Germany 1 +42 0.466666669 0.249060258 0.25 0 0 0.25252524 Self-emp-inc 7th-8th Divorced Craft-repair Unmarried White Male United-States 0 +21 0.233333334 0.150744423 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Own-child White Male United-States 0 +24 0.266666681 0.109821819 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +23 0.25555557 0.127608523 0.5625 0 0 0.5555556 Private HS-grad Never-married Sales Other-relative White Male United-States 0 +50 0.5555556 0.0977743044 0.875 0.07298073 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.05813276 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.17729044 0.4375 0 0 0.3030303 ? 11th Never-married ? Unmarried White Female United-States 0 +44 0.4888889 0.188833475 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.202754766 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +30 0.333333343 0.0504921861 0.6875 0 0 0.24242425 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 +36 0.4 0.171409816 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +49 0.544444442 0.137563363 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 +29 0.322222233 0.151561424 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +45 0.5 0.09983263 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 +75 0.8333334 0.07669403 1 0 0 0.2020202 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +42 0.466666669 0.0893329 0.5625 0 0 0.4040404 Private HS-grad Never-married Priv-house-serv Not-in-family White Female ? 0 +37 0.411111116 0.0301608741 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 +51 0.566666663 0.058175195 0.8125 0 0 0.25252524 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +61 0.677777767 0.119049244 0.5625 0 0 0.4848485 Local-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +33 0.366666675 0.110935844 0.75 0.0217402168 0 0.5555556 Private Assoc-acdm Never-married Exec-managerial Unmarried White Female ? 0 +50 0.5555556 0.249701455 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +59 0.655555546 0.146056622 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +25 0.2777778 0.09291475 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +22 0.244444445 0.124791794 0.5625 0 0 0.161616161 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +56 0.622222245 0.107579619 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +44 0.4888889 0.0695309862 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Unmarried Black Female United-States 0 +35 0.3888889 0.0427755 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.117432758 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +47 0.5222222 0.113227211 0.5625 0.1502415 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +27 0.3 0.107579619 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +50 0.5555556 0.070727855 0.5625 0 0.4708448 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +30 0.333333343 0.12063811 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Black Male ? 0 +46 0.51111114 0.2457815 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +48 0.533333361 0.104845069 0.9375 0 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +61 0.677777767 0.1552955 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Male United-States 1 +33 0.366666675 0.0582553446 0.5625 0 0 0.8787879 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +40 0.444444448 0.0480263755 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +58 0.644444466 0.127926424 0.625 0 0 0.656565666 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.1293038 0.875 0 0.549127638 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.0262328219 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.09370683 0.625 0 0 0.5050505 Self-emp-inc Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +37 0.411111116 0.203116447 0.5 0 0 0.4040404 Private 12th Never-married Other-service Own-child White Female United-States 0 +64 0.7111111 0.100386277 0.875 0 0.4722222 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 0 +41 0.455555558 0.132917985 0.5625 0 0 0.545454562 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +18 0.2 0.0217174459 0.4375 0.005940059 0 0.3030303 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +44 0.4888889 0.212436825 0.4375 0 0 0.8888889 Self-emp-not-inc 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +41 0.455555558 0.03177062 0.8125 0 0 0.4848485 State-gov Bachelors Married-civ-spouse Prof-specialty Wife Amer-Indian-Eskimo Female United-States 1 +33 0.366666675 0.1406239 0.625 0.105201051 0 0.4040404 State-gov Some-college Separated Prof-specialty Not-in-family White Male United-States 1 +37 0.411111116 0.132240415 0.3125 0 0 0.161616161 Private 9th Separated Priv-house-serv Unmarried White Female Mexico 0 +34 0.377777785 0.18134445 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +24 0.266666681 0.144887373 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Tech-support Own-child White Female ? 0 +20 0.222222224 0.07932013 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +38 0.422222227 0.1186101 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.09313837 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 +20 0.222222224 0.08912209 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Never-married Transport-moving Own-child White Male United-States 0 +22 0.244444445 0.3175392 0.8125 0 0 0.08080808 Federal-gov Bachelors Never-married Tech-support Own-child White Male United-States 0 +55 0.6111111 0.09944939 0.8125 0 0 0.7373737 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 +20 0.222222224 0.033123754 0.625 0 0 0.353535354 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +26 0.2888889 0.117815323 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +20 0.222222224 0.06465729 0.5625 0 0 0.7070707 Self-emp-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +40 0.444444448 0.166528031 0.3125 0 0 0.4040404 Private 9th Divorced Other-service Not-in-family White Female United-States 0 +33 0.366666675 0.0451753065 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.06420737 0.625 0 0 0.5050505 ? Some-college Divorced ? Own-child White Male United-States 0 +24 0.266666681 0.07266225 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +25 0.2777778 0.16287747 0.625 0 0 0.464646459 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +18 0.2 0.0535076 0.4375 0 0 0.08080808 Private 11th Never-married Other-service Own-child White Male United-States 0 +49 0.544444442 0.156973273 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.152878851 0.5 0 0 0.171717167 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 +34 0.377777785 0.121968336 0.6875 0 0 0.454545468 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.205830112 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.209921166 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +74 0.822222233 0.08747798 0.5625 0.158311576 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 1 +37 0.411111116 0.05615594 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +20 0.222222224 0.07801146 0.4375 0 0.3611111 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +40 0.444444448 0.095410876 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +34 0.377777785 0.03386262 0.8125 0.2782828 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +30 0.333333343 0.119361088 0.9375 0 0.399449021 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband Black Male Haiti 0 +44 0.4888889 0.153604254 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Female Puerto-Rico 0 +40 0.444444448 0.15009582 0.375 0 0 0.323232323 Private 10th Married-civ-spouse Other-service Wife Black Female United-States 0 +58 0.644444466 0.0815724358 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female Greece 0 +44 0.4888889 0.201309353 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.100968882 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.260947466 0.5625 0 0 0.181818187 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +19 0.211111113 0.08215235 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +41 0.455555558 0.188702136 0.875 0.1502415 0 0.7070707 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.1288842 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +34 0.377777785 0.07551332 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Craft-repair Other-relative White Male United-States 0 +38 0.422222227 0.0701109 0.625 0 0 0.151515156 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +27 0.3 0.142137334 0.0625 0.413104117 0 0.24242425 Private Preschool Married-civ-spouse Farming-fishing Other-relative White Male Mexico 0 +54 0.6 0.134240136 0.625 0 0 0.4848485 Private Some-college Divorced Craft-repair Unmarried White Female United-States 0 +40 0.444444448 0.138192445 0.5625 0 0 0.373737365 Private HS-grad Widowed Machine-op-inspct Unmarried Black Female United-States 0 +19 0.211111113 0.17360352 0.625 0 0 0.25252524 Private Some-college Never-married Sales Other-relative White Female United-States 0 +17 0.188888893 0.128820211 0.4375 0.005940059 0 0.1010101 Private 11th Never-married Other-service Own-child White Male United-States 0 +33 0.366666675 0.230840474 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +80 0.8888889 0.168372169 0.25 0 0 0.24242425 Private 7th-8th Widowed Other-service Not-in-family White Female United-States 0 +24 0.266666681 0.108781211 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 +28 0.311111122 0.227907911 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +55 0.6111111 0.22516796 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +21 0.233333334 0.08989732 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +51 0.566666663 0.08700516 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.120435372 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Female United-States 0 +42 0.466666669 0.120250829 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +60 0.6666667 0.158640951 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +20 0.222222224 0.200817674 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Black Female United-States 0 +51 0.566666663 0.09773929 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.130730346 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +37 0.411111116 0.129169777 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.107585013 0.5625 0 0 0.5252525 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +42 0.466666669 0.114655778 0.875 0.14084141 0 0.6060606 Federal-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 1 +40 0.444444448 0.07053186 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +55 0.6111111 0.109842025 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.27180618 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 +62 0.6888889 0.146836579 0.5625 0 0.453856736 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +47 0.5222222 0.120773487 0.375 0 0 0.3030303 Private 10th Divorced Sales Unmarried White Female United-States 0 +26 0.2888889 0.0349975266 0.5 0 0 0.5151515 Private 12th Never-married Sales Other-relative Black Male United-States 0 +59 0.655555546 0.286926359 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Adm-clerical Unmarried White Female Puerto-Rico 0 +70 0.7777778 0.118874125 0.625 0 0 0.171717167 Local-gov Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.08356408 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.0730852261 0.375 0 0 0.656565666 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.122265369 0.875 0 0 0.434343427 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +52 0.5777778 0.117029309 0.9375 0.1502415 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.114298128 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +67 0.7444445 0.08543718 0.375 0 0 0.2020202 Private 10th Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +34 0.377777785 0.13771759 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +53 0.5888889 0.07837719 0.625 0.046500463 0 0.4040404 State-gov Some-college Divorced Adm-clerical Other-relative White Female United-States 0 +22 0.244444445 0.07904803 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.07159469 0.5625 0 0 0.424242437 Local-gov HS-grad Divorced Adm-clerical Own-child White Male United-States 0 +54 0.6 0.07337013 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.128067866 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +37 0.411111116 0.166145474 0.5625 0 0 0.3838384 Private HS-grad Separated Prof-specialty Unmarried White Female United-States 0 +38 0.422222227 0.118111007 0.375 0 0.5874656 0.909090936 Private 10th Never-married Prof-specialty Not-in-family White Male United-States 1 +41 0.455555558 0.141616687 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family Black Female United-States 0 +36 0.4 0.112011477 0.5625 0 0 0.333333343 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +43 0.477777779 0.2041153 0.6875 0.1502415 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.03321064 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +26 0.2888889 0.129495084 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Own-child White Male United-States 0 +49 0.544444442 0.129553691 0.875 0.046500463 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.0323720872 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.114645 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.03438259 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.166068017 0.1875 0 0 0.4040404 Self-emp-inc 5th-6th Married-civ-spouse Sales Husband White Male Mexico 1 +57 0.6333333 0.144927785 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +28 0.311111122 0.07743424 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.312881023 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 +21 0.233333334 0.3044349 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +51 0.566666663 0.09352161 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.237765759 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +50 0.5555556 0.216758221 0.9375 0 0 0.75757575 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.218565986 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Widowed Exec-managerial Unmarried Asian-Pac-Islander Female South 0 +36 0.4 0.109285012 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +31 0.344444454 0.240242347 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +20 0.222222224 0.175253 0.5625 0 0 0.1010101 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +36 0.4 0.06978154 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +38 0.422222227 0.212979019 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 +37 0.411111116 0.207914039 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.1309378 0.875 0.07688077 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.225248113 0.375 0 0 0.363636374 Private 10th Never-married Farming-fishing Own-child White Male United-States 0 +33 0.366666675 0.143615067 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +35 0.3888889 0.230903789 0.5625 0.0115101151 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Female United-States 0 +23 0.25555557 0.02229736 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 +37 0.411111116 0.0994392857 0.8125 0 0 0.363636374 Private Bachelors Separated Other-service Unmarried Asian-Pac-Islander Female Philippines 0 +25 0.2777778 0.212596446 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +51 0.566666663 0.07156775 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Tech-support Husband Black Male United-States 0 +35 0.3888889 0.230866075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.0733883157 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +66 0.733333349 0.113201618 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +32 0.355555564 0.09223045 0.5625 0 0 0.13131313 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +37 0.411111116 0.1271458 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Never-married Protective-serv Not-in-family White Male United-States 1 +29 0.322222233 0.188821346 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.136388034 0.8125 0 0 0.373737365 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +61 0.677777767 0.09077089 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.118330583 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +24 0.266666681 0.1311695 0.5625 0 0 0.4949495 Private HS-grad Never-married Transport-moving Not-in-family White Female United-States 0 +49 0.544444442 0.04129238 0.25 0 0 0.3838384 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband Other Male United-States 0 +51 0.566666663 0.111133866 0.875 0.25236252 0 0.5050505 Self-emp-not-inc Masters Divorced Exec-managerial Unmarried White Male United-States 1 +34 0.377777785 0.219341889 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +28 0.311111122 0.1359489 0.5625 0 0 0.4040404 ? HS-grad Separated ? Unmarried White Female Mexico 0 +20 0.222222224 0.340794981 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +30 0.333333343 0.124830186 0.625 0 0 0.373737365 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +49 0.544444442 0.244354948 0.875 1 0 0.8080808 Self-emp-inc Masters Divorced Prof-specialty Unmarried White Male Mexico 1 +26 0.2888889 0.08542371 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +63 0.7 0.178217232 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +36 0.4 0.0557302646 0.75 0 0 0.5555556 Private Assoc-acdm Never-married Transport-moving Not-in-family White Male Iran 0 +63 0.7 0.0843117 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.08654042 0.5625 0 0 0.1010101 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.216715112 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.08636059 0.25 0 0 0.353535354 Private 7th-8th Widowed Adm-clerical Not-in-family White Female United-States 0 +49 0.544444442 0.119090326 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male Canada 0 +35 0.3888889 0.126670957 0.875 0.135501355 0 0.5555556 Private Masters Never-married Prof-specialty Not-in-family White Male ? 1 +23 0.25555557 0.105356283 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +25 0.2777778 0.11443688 0.6875 0.2782828 0 0.4040404 Private Assoc-voc Never-married Sales Not-in-family White Male United-States 1 +34 0.377777785 0.105939567 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +28 0.311111122 0.119196743 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.115459979 0.625 0 0.506198347 0.353535354 Self-emp-not-inc Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +33 0.366666675 0.0618378744 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Not-in-family White Male United-States 0 +21 0.233333334 0.137349844 0.625 0.02597026 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +55 0.6111111 0.119541593 0.4375 0 0.3838384 0.4040404 Private 11th Married-civ-spouse Other-service Husband Black Male United-States 0 +17 0.188888893 0.3061982 0.4375 0 0 0.08080808 ? 11th Never-married ? Own-child White Female United-States 0 +75 0.8333334 0.163068086 0.5625 0.0234602336 0 0.151515156 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 +61 0.677777767 0.08956123 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Unmarried Black Female United-States 0 +53 0.5888889 0.10638275 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.119540244 0.75 0 0 0.454545468 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 +48 0.533333361 0.1662896 0.625 0 0 0.5050505 Private Some-college Widowed Sales Unmarried White Male United-States 1 +28 0.311111122 0.106980175 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.137289226 0.8125 0 0 0.5050505 ? Bachelors Never-married ? Not-in-family Asian-Pac-Islander Female Taiwan 0 +29 0.322222233 0.07438649 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +25 0.2777778 0.1621036 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Own-child White Female United-States 0 +37 0.411111116 0.129951075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +43 0.477777779 0.175587744 0.8125 0 0 0.5555556 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +40 0.444444448 0.03728889 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +34 0.377777785 0.0976281539 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +55 0.6111111 0.07872137 1 0.1502415 0 0.3030303 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.241094366 0.75 0 0 0.2020202 Local-gov Assoc-acdm Never-married Tech-support Not-in-family White Male United-States 0 +21 0.233333334 0.114526458 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +32 0.355555564 0.128166884 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male Italy 0 +26 0.2888889 0.136915416 0.9375 0.0246302467 0 0.5050505 State-gov Prof-school Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male India 0 +26 0.2888889 0.112992816 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.09351689 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +49 0.544444442 0.0975574255 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +21 0.233333334 0.109065436 0.5625 0 0.3452709 0.3030303 ? HS-grad Never-married ? Own-child Black Female United-States 0 +26 0.2888889 0.03754483 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +40 0.444444448 0.07928915 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +19 0.211111113 0.07838931 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Never-married Adm-clerical Not-in-family White Female United-States 0 +58 0.644444466 0.203317836 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +61 0.677777767 0.16091615 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +28 0.311111122 0.08350682 0.625 0 0 0.6363636 Self-emp-not-inc Some-college Married-civ-spouse Sales Own-child Asian-Pac-Islander Male South 0 +26 0.2888889 0.11147669 0.8125 0 0 0.4040404 Private Bachelors Never-married Farming-fishing Own-child White Male United-States 0 +64 0.7111111 0.123602331 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.0803398639 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.1028009 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +45 0.5 0.07420397 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +39 0.433333337 0.142412126 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.241973326 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +51 0.566666663 0.08472794 0.4375 0 0 0.4040404 Private 11th Separated Other-service Not-in-family Black Female Jamaica 0 +34 0.377777785 0.0266780276 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +33 0.366666675 0.0751442239 0.875 0 0.43663913 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male Germany 1 +23 0.25555557 0.0296786241 0.625 0 0.5874656 0.4040404 Private Some-college Separated Other-service Not-in-family White Male United-States 1 +35 0.3888889 0.0808685943 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 +41 0.455555558 0.0893329 0.4375 0 0 0.25252524 Private 11th Divorced Priv-house-serv Unmarried White Female Guatemala 0 +39 0.433333337 0.129791439 0.875 0 0 0.5050505 Private Masters Never-married Craft-repair Not-in-family White Female United-States 0 +41 0.455555558 0.112354308 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.02724043 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +22 0.244444445 0.195664465 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 +25 0.2777778 0.120229274 0.625 0 0.3452709 0.454545468 Private Some-college Never-married Exec-managerial Other-relative White Female United-States 0 +25 0.2777778 0.118117742 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Own-child White Female United-States 0 +77 0.8555556 0.0491215438 0.25 0 0 0.2020202 Self-emp-not-inc 7th-8th Married-spouse-absent Adm-clerical Not-in-family White Male Italy 1 +33 0.366666675 0.157972127 0.6875 0 0 0.4040404 ? Assoc-voc Never-married ? Own-child White Female United-States 0 +66 0.733333349 0.191297933 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +19 0.211111113 0.187225074 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 +44 0.4888889 0.07494755 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +45 0.5 0.12916775 0.875 0.25236252 0 0.424242437 Self-emp-inc Masters Divorced Sales Unmarried White Female United-States 1 +28 0.311111122 0.08454677 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +19 0.211111113 0.02579233 0.5625 0.02597026 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +43 0.477777779 0.2108311 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +39 0.433333337 0.121012591 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +33 0.366666675 0.133804366 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.145561576 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Other-service Not-in-family Black Female Jamaica 0 +62 0.6888889 0.135327891 0.25 0 0 0.4040404 Private 7th-8th Widowed Machine-op-inspct Not-in-family White Female United-States 0 +40 0.444444448 0.103301331 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.27386114 0.5625 0 0 0.0606060624 Private HS-grad Never-married Other-service Not-in-family White Male Iran 0 +23 0.25555557 0.167268246 0.625 0 0 0.3030303 Local-gov Some-college Never-married Other-service Not-in-family Black Male United-States 0 +48 0.533333361 0.162071928 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Italy 1 +38 0.422222227 0.211698622 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.174974158 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.0856136456 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.120072342 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +66 0.733333349 0.05060534 0.5625 0 0 0.25252524 Local-gov HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.132002652 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +23 0.25555557 0.14949435 0.3125 0 0 0.3939394 Private 9th Never-married Handlers-cleaners Other-relative White Male Mexico 0 +34 0.377777785 0.119670242 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +39 0.433333337 0.123140961 0.875 0 0 0.454545468 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +33 0.366666675 0.182453081 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +43 0.477777779 0.123321474 0.625 0 0 0.1010101 Private Some-college Separated Sales Unmarried White Female United-States 0 +27 0.3 0.226948112 0.5625 0 0 1 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.199089378 0.625 0 0 0.353535354 State-gov Some-college Separated Adm-clerical Own-child Black Male United-States 0 +26 0.2888889 0.195311531 0.1875 0 0 0.3030303 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +56 0.622222245 0.04763236 0.875 0.2782828 0 0.6060606 Self-emp-inc Masters Divorced Exec-managerial Not-in-family White Male United-States 1 +46 0.51111114 0.110023208 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.128494218 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Unmarried White Female United-States 0 +90 1 0.2114804 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +72 0.8 0.319085628 0.625 0 0 0.25252524 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.109788142 0.5625 0 0 0.151515156 Private HS-grad Never-married Adm-clerical Unmarried Asian-Pac-Islander Female United-States 0 +29 0.322222233 0.1232979 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 +49 0.544444442 0.08323809 0.4375 0 0 0.75757575 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +23 0.25555557 0.08143705 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +20 0.222222224 0.153265461 0.625 0 0 0.181818187 Private Some-college Married-spouse-absent Sales Own-child Black Female United-States 0 +57 0.6333333 0.123039261 0.8125 0.04508045 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male South 0 +46 0.51111114 0.144779608 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 +33 0.366666675 0.141285986 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.173852727 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Not-in-family White Male Jamaica 0 +49 0.544444442 0.0740989 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Greece 0 +54 0.6 0.102816388 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +46 0.51111114 0.029100731 1 0 0.359045 0.5050505 Federal-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 +31 0.344444454 0.07721332 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.148966968 0.9375 0 0.453856736 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.08657478 0.625 0 0 0.0606060624 ? Some-college Never-married ? Own-child White Female United-States 0 +19 0.211111113 0.08864724 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +46 0.51111114 0.238312662 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 +43 0.477777779 0.120170005 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +58 0.644444466 0.1203229 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried White Male United-States 0 +43 0.477777779 0.182975739 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +37 0.411111116 0.150691211 0.625 0 0 0.4040404 ? Some-college Separated ? Unmarried White Male United-States 0 +21 0.233333334 0.113829352 0.5 0 0 0.25252524 Federal-gov 12th Never-married Adm-clerical Own-child Black Male United-States 0 +52 0.5777778 0.228204265 0.875 0 0 0.7070707 State-gov Masters Never-married Adm-clerical Not-in-family White Male United-States 1 +34 0.377777785 0.341386348 0.6875 0 0 0.323232323 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.178909615 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Handlers-cleaners Own-child White Female United-States 0 +34 0.377777785 0.116854869 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +29 0.322222233 0.119493775 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +39 0.433333337 0.0213308372 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +49 0.544444442 0.104028076 0.4375 0 0 0.353535354 Private 11th Divorced Machine-op-inspct Unmarried Black Female United-States 0 +35 0.3888889 0.178846985 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband Black Male Jamaica 1 +31 0.344444454 0.08011086 0.625 0 0 0.2020202 Private Some-college Divorced Other-service Own-child White Female United-States 0 +18 0.2 0.144551948 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +47 0.5222222 0.178551972 0.5625 0.04386044 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +46 0.51111114 0.185954109 0.5625 0.0501305 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +43 0.477777779 0.08398436 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +51 0.566666663 0.2066296 0.5625 0.04386044 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.292382658 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +18 0.2 0.2610896 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +31 0.344444454 0.122464731 0.8125 0 0.43663913 0.353535354 State-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +39 0.433333337 0.1198265 0.5625 0 0.4331956 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +58 0.644444466 0.0588190928 0.4375 0 0 0.4848485 Private 11th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +36 0.4 0.177227125 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.1770601 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +31 0.344444454 0.025288526 0.8125 0 0.43663913 0.353535354 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +19 0.211111113 0.0184770711 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +38 0.422222227 0.26533553 0.6875 0 0 0.363636374 Private Assoc-voc Divorced Tech-support Not-in-family White Female United-States 0 +26 0.2888889 0.117145836 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Prof-specialty Own-child Other Female Jamaica 0 +38 0.422222227 0.231293768 0.75 0 0 0.161616161 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.07484854 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.1305862 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.209377632 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family Black Male ? 0 +41 0.455555558 0.086450845 0.8125 0 0 0.25252524 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 +33 0.366666675 0.07635456 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +63 0.7 0.133736327 0.5625 0 0 0.161616161 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +51 0.566666663 0.09221563 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.07778515 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.1038772 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Not-in-family White Male United-States 0 +25 0.2777778 0.18836537 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.1892834 0.5625 0 0 0.6666667 Self-emp-not-inc HS-grad Never-married Sales Unmarried White Male United-States 0 +19 0.211111113 0.191246748 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +47 0.5222222 0.306450784 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +26 0.2888889 0.263587058 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.11228089 0.625 0 0 0.141414136 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 +36 0.4 0.10226611 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +60 0.6666667 0.134090617 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.0414136164 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Unmarried Black Male United-States 0 +19 0.211111113 0.0809932 0.5625 0 0 0.141414136 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.184029832 0.8125 0 0 0.909090936 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +36 0.4 0.241376579 0.5625 0 0 0.363636374 Private HS-grad Separated Machine-op-inspct Not-in-family Black Female United-States 0 +35 0.3888889 0.180433825 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +22 0.244444445 0.158199787 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +54 0.6 0.03257078 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.06496375 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +55 0.6111111 0.137906864 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +57 0.6333333 0.253160059 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 +56 0.622222245 0.278420985 0.25 0 0 0.363636374 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.361837536 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.0228833333 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.10933283 0.4375 0 0 0.4040404 Self-emp-inc 11th Divorced Sales Not-in-family White Male United-States 0 +34 0.377777785 0.123048685 0.5625 0 0 0.444444448 Private HS-grad Divorced Exec-managerial Own-child White Male United-States 0 +36 0.4 0.2026187 0.75 0 0 0.424242437 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +51 0.566666663 0.07712509 0.3125 0 0 0.4040404 Local-gov 9th Separated Other-service Other-relative White Female United-States 0 +46 0.51111114 0.144558683 1 0 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.08734664 0.5625 0.0545505434 0 0.5050505 Private HS-grad Divorced Exec-managerial Not-in-family Black Female United-States 0 +25 0.2777778 0.080851756 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +22 0.244444445 0.2432389 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +37 0.411111116 0.05179009 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.138360143 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Unmarried White Male United-States 1 +61 0.677777767 0.119107164 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.154339075 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband Black Male Jamaica 0 +58 0.644444466 0.104086 0.5625 0 0 0.2020202 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +52 0.5777778 0.122516595 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Farming-fishing Other-relative White Male Mexico 0 +18 0.2 0.102379933 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child Black Male United-States 0 +27 0.3 0.138201192 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +48 0.533333361 0.0207718033 0.625 0.0501305 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +63 0.7 0.044880297 0.3125 0 0 0.161616161 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.121384382 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.196033552 0.625 0 0.4708448 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +40 0.444444448 0.0671183839 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +41 0.455555558 0.220732749 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +28 0.311111122 0.0217491016 0.8125 0.0217402168 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +31 0.344444454 0.232451573 0.9375 0.14084141 0 0.5050505 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 +32 0.355555564 0.08579752 0.6875 0 0 0.5555556 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.244692385 0.5625 0 0 0.727272749 Private HS-grad Never-married Handlers-cleaners Unmarried Black Male United-States 0 +39 0.433333337 0.0582950823 0.5625 0 0.430670351 0.4040404 Local-gov HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.0202531815 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +31 0.344444454 0.400753021 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Other-relative Black Female United-States 0 +21 0.233333334 0.102598161 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 +33 0.366666675 0.119770594 0.5625 0 0 0.4040404 ? HS-grad Separated ? Unmarried White Female United-States 0 +44 0.4888889 0.0750876442 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.134407178 0.625 0 0 0.25252524 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +42 0.466666669 0.033688847 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male ? 0 +36 0.4 0.147160545 0.75 0 0 0.353535354 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.03301666 0.875 0 0.453168035 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 0 +61 0.677777767 0.143679053 0.625 0 0.3838384 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.107217938 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Own-child White Male United-States 0 +21 0.233333334 0.05592559 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Female Germany 0 +39 0.433333337 0.0214507263 0.625 0.0282902829 0 0.909090936 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +34 0.377777785 0.0168120936 0.5625 0 0 0.8080808 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +21 0.233333334 0.122662082 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Male United-States 0 +75 0.8333334 0.09872399 0.8125 0 0 0.4848485 Self-emp-not-inc Bachelors Widowed Prof-specialty Unmarried White Male United-States 1 +21 0.233333334 0.119006805 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Male United-States 0 +81 0.900000036 0.0826096758 0.625 0 0 0.151515156 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +54 0.6 0.100794435 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Divorced Other-service Not-in-family White Male Canada 0 +34 0.377777785 0.3061268 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Iran 0 +54 0.6 0.181226581 0.9375 1 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 +41 0.455555558 0.17951715 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Husband Amer-Indian-Eskimo Male United-States 0 +61 0.677777767 0.133724883 0.8125 0 0 0.4040404 ? Bachelors Divorced ? Not-in-family White Female United-States 0 +63 0.7 0.08967707 0.5625 0.0258002579 0 0.2020202 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +24 0.266666681 0.146804243 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +20 0.222222224 0.149296328 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female Mexico 0 +44 0.4888889 0.04090712 0.8125 0 0 0.6060606 Local-gov Bachelors Divorced Prof-specialty Own-child White Female United-States 0 +47 0.5222222 0.08158119 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.03272569 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.03238825 0.25 0 0.365013778 0.4040404 Private 7th-8th Divorced Craft-repair Not-in-family White Male United-States 0 +53 0.5888889 0.161741227 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +63 0.7 0.183881655 0.5625 0.0347103477 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +44 0.4888889 0.0701796 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.1549365 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.0262126159 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male Germany 1 +71 0.788888931 0.138081983 0.625 0 0 0.1010101 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +57 0.6333333 0.11859528 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.12127123 0.625 0 0 0.1010101 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +33 0.366666675 0.11652483 0.8125 0 0.4242424 0.454545468 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +30 0.333333343 0.255083 0.625 0 0 0.5555556 Private Some-college Divorced Adm-clerical Own-child White Female United-States 0 +20 0.222222224 0.157353818 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +28 0.311111122 0.129716679 0.8125 0 0 0.454545468 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +54 0.6 0.168289334 0.4375 0 0 0.1010101 Private 11th Divorced Priv-house-serv Unmarried Black Female United-States 0 +20 0.222222224 0.166742891 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +34 0.377777785 0.160915464 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +21 0.233333334 0.128124446 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +29 0.322222233 0.197538912 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Unmarried White Female United-States 0 +51 0.566666663 0.121779747 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +39 0.433333337 0.168529779 0.5625 0 0 0.7070707 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Female United-States 0 +19 0.211111113 0.146438524 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Other-relative Black Female United-States 0 +22 0.244444445 0.09261773 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +59 0.655555546 0.109817781 0.625 0 0 0.3838384 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +18 0.2 0.3889803 0.4375 0 0 0.13131313 Private 11th Never-married Sales Own-child White Male United-States 0 +22 0.244444445 0.14921011 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +42 0.466666669 0.172205925 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.07683614 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 +31 0.344444454 0.104923874 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.164182112 0.4375 0 0 0.4040404 Private 11th Separated Craft-repair Unmarried White Female United-States 0 +22 0.244444445 0.0761511549 0.8125 0 0 0.07070707 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +67 0.7444445 0.146175846 0.875 0 0 0.4040404 Private Masters Never-married Other-service Not-in-family White Female United-States 0 +17 0.188888893 0.07457576 0.4375 0 0 0.25252524 Private 11th Never-married Sales Own-child White Female United-States 0 +47 0.5222222 0.129222974 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 +23 0.25555557 0.120847575 0.8125 0 0 0.05050505 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +20 0.222222224 0.228724226 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female Peru 0 +22 0.244444445 0.139297038 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Female Peru 0 +47 0.5222222 0.06987449 0.25 0 0 0.4040404 State-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +49 0.544444442 0.158740625 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 +64 0.7111111 0.139637843 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +35 0.3888889 0.1330197 0.625 0 0 0.4040404 State-gov Some-college Divorced Exec-managerial Not-in-family Black Female United-States 0 +52 0.5777778 0.2855867 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +29 0.322222233 0.12020503 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +73 0.811111152 0.06256192 0.375 0 0 0.4040404 Self-emp-inc 10th Widowed Sales Unmarried White Female Canada 0 +38 0.422222227 0.144141763 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +59 0.655555546 0.219391733 0.5625 0 0.43663913 0.5252525 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.0192442276 0.625 0.0406404063 0 0.353535354 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.07973032 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 +24 0.266666681 0.0348884128 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +33 0.366666675 0.07778515 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +40 0.444444448 0.12838982 0.625 0 0 0.5555556 Private Some-college Divorced Exec-managerial Other-relative Black Female United-States 0 +55 0.6111111 0.13037473 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.129909977 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 +40 0.444444448 0.178259656 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +22 0.244444445 0.158099428 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 +55 0.6111111 0.20769985 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +45 0.5 0.13850832 0.5625 0 0 0.262626261 Private HS-grad Separated Tech-support Not-in-family White Female United-States 0 +47 0.5222222 0.216777742 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +56 0.622222245 0.139016852 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.08389748 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +32 0.355555564 0.133501947 0.625 0 0 0.3838384 State-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +17 0.188888893 0.08809494 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Male United-States 0 +44 0.4888889 0.0480021276 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +32 0.355555564 0.2150461 0.75 0 0 0.8080808 Self-emp-not-inc Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 +35 0.3888889 0.08482022 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.07222714 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +32 0.355555564 0.02204613 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +68 0.75555557 0.1917977 0.4375 0 0 0.7070707 Private 11th Divorced Transport-moving Not-in-family White Male United-States 0 +20 0.222222224 0.07588578 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +33 0.366666675 0.253574282 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 +24 0.266666681 0.271284878 0.3125 0 0 0.121212125 Private 9th Never-married Handlers-cleaners Own-child White Male United-States 0 +48 0.533333361 0.024366457 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.08452117 0.875 0 0 0.5050505 Private Masters Divorced Prof-specialty Unmarried White Female United-States 0 +48 0.533333361 0.205287248 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.140906781 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +60 0.6666667 0.07598884 0.625 0 0 0.353535354 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +39 0.433333337 0.119956493 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +23 0.25555557 0.04732321 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 +23 0.25555557 0.125704437 0.5 0 0 0.4040404 State-gov 12th Never-married Exec-managerial Not-in-family White Male United-States 0 +36 0.4 0.02219835 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Other-relative White Female United-States 0 +25 0.2777778 0.17158021 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +52 0.5777778 0.106920905 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male United-States 0 +35 0.3888889 0.09487002 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.0346910655 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +45 0.5 0.127677888 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 +37 0.411111116 0.219261065 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 +58 0.644444466 0.144119546 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Prof-specialty Not-in-family White Female United-States 0 +67 0.7444445 0.2905803 0.5625 0 0 0.02020202 Self-emp-not-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +48 0.533333361 0.134547263 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 +63 0.7 0.108818255 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.169746861 0.625 0 0 0.727272749 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +43 0.477777779 0.0295984726 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.120217152 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Own-child White Male United-States 0 +32 0.355555564 0.407155633 0.5625 0 0 0.727272749 Private HS-grad Married-civ-spouse Transport-moving Own-child White Male Mexico 0 +36 0.4 0.1536716 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Asian-Pac-Islander Male Laos 0 +43 0.477777779 0.134162009 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.12782 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 +17 0.188888893 0.11522828 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Own-child White Male United-States 0 +45 0.5 0.0790123343 0.8125 0 0 0.464646459 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 +41 0.455555558 0.05526283 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.0849286541 0.5625 0 0 0.3838384 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +18 0.2 0.1364015 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Own-child White Female United-States 0 +48 0.533333361 0.1659535 0.75 0 0 0.4040404 Local-gov Assoc-acdm Separated Adm-clerical Not-in-family Black Female United-States 0 +51 0.566666663 0.0466948 0.6875 0 0 0.5050505 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 1 +26 0.2888889 0.19721292 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Female United-States 0 +54 0.6 0.193296984 0.0625 0 0 0.6060606 Private Preschool Married-civ-spouse Farming-fishing Husband White Male United-States 0 +22 0.244444445 0.128296867 0.625 0 0 0.4848485 Private Some-college Divorced Sales Own-child White Female Iran 0 +19 0.211111113 0.158852428 0.5625 0 0 0.353535354 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +47 0.5222222 0.242314816 0.25 0 0 0.4040404 Private 7th-8th Divorced Handlers-cleaners Other-relative Black Male United-States 0 +32 0.355555564 0.08622319 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 +46 0.51111114 0.242537081 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.114604585 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 1 +35 0.3888889 0.227173746 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family Asian-Pac-Islander Male United-States 0 +52 0.5777778 0.137617916 0.6875 0.0501305 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +73 0.811111152 0.09687649 0.5 0 0 0.181818187 Self-emp-not-inc 12th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +17 0.188888893 0.246252969 0.375 0 0 0.1010101 Private 10th Never-married Other-service Own-child White Male Canada 0 +32 0.355555564 0.06744438 0.8125 0 0 0.323232323 Private Bachelors Separated Prof-specialty Unmarried White Female United-States 0 +43 0.477777779 0.121300869 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.2504383 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male Portugal 0 +26 0.2888889 0.04126746 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Other Female Columbia 0 +41 0.455555558 0.379964381 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.133871034 0.75 0.1502415 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +52 0.5777778 0.20439212 0.625 0 0 0.4040404 State-gov Some-college Separated Protective-serv Unmarried White Male United-States 0 +35 0.3888889 0.130063549 0.5625 0 0 0.323232323 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +57 0.6333333 0.168519 0.4375 0 0 0.5252525 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 +35 0.3888889 0.134993821 0.6875 0 0 0.444444448 Private Assoc-voc Married-spouse-absent Prof-specialty Unmarried White Female United-States 0 +33 0.366666675 0.149965152 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +56 0.622222245 0.03594384 0.25 0 0 0.4040404 Private 7th-8th Divorced Transport-moving Unmarried White Male United-States 0 +42 0.466666669 0.0890560746 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Own-child White Male United-States 0 +17 0.188888893 0.06791113 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +49 0.544444442 0.0210573822 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.136072159 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.113764018 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +37 0.411111116 0.172057077 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family Black Male United-States 0 +22 0.244444445 0.165368885 0.5 0 0 0.353535354 Private 12th Never-married Other-service Not-in-family White Male United-States 0 +27 0.3 0.260011256 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Mexico 0 +21 0.233333334 0.0238592848 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 +59 0.655555546 0.06307987 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +44 0.4888889 0.1028009 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +53 0.5888889 0.1018108 0.375 0 0 1 Self-emp-not-inc 10th Married-spouse-absent Transport-moving Not-in-family White Male United-States 0 +26 0.2888889 0.2763108 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 +48 0.533333361 0.0936010852 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.181667075 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.150654852 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 +54 0.6 0.13281022 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.09664277 0.5625 0.07298073 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +60 0.6666667 0.108186476 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +50 0.5555556 0.09464237 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +48 0.533333361 0.057480108 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +35 0.3888889 0.07293907 0.625 0 0.506198347 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.1296601 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.125905156 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +65 0.722222269 0.15058884 0.625 0.06514065 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +31 0.344444454 0.159534052 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.220842525 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 +67 0.7444445 0.274544775 0.3125 0.0205002055 0 0.4040404 ? 9th Divorced ? Not-in-family White Female United-States 0 +62 0.6888889 0.1327267 0.6875 0 0 0.5050505 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.154360637 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried White Female Cuba 0 +24 0.266666681 0.191497311 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Own-child White Female United-States 0 +24 0.266666681 0.0495142154 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family Asian-Pac-Islander Female Philippines 0 +27 0.3 0.0322670154 0.8125 0 0 0.4848485 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +43 0.477777779 0.0907803252 0.75 0 0 0.3030303 State-gov Assoc-acdm Married-spouse-absent Other-service Unmarried White Female United-States 0 +48 0.533333361 0.0800367743 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Unmarried Asian-Pac-Islander Female South 0 +41 0.455555558 0.201726943 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family Black Male United-States 0 +30 0.333333343 0.179942146 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Wife Black Female United-States 0 +38 0.422222227 0.08026982 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.220842525 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 +45 0.5 0.126442626 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +55 0.6111111 0.07342536 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +46 0.51111114 0.0740989 0.25 0 0 0.75757575 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male Greece 0 +24 0.266666681 0.07014592 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Male United-States 0 +31 0.344444454 0.0339744277 0.625 0 0 0.25252524 Local-gov Some-college Never-married Adm-clerical Own-child Amer-Indian-Eskimo Female United-States 0 +35 0.3888889 0.038822528 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.224734217 0.625 0 0 0.4040404 Local-gov Some-college Separated Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.151449621 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +56 0.622222245 0.195756733 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +60 0.6666667 0.12872456 0.5625 0 0.4242424 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +25 0.2777778 0.0231709331 0.8125 0 0.365013778 0.6060606 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +33 0.366666675 0.165270552 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +44 0.4888889 0.120654278 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +21 0.233333334 0.07866075 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +21 0.233333334 0.0873567462 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +46 0.51111114 0.0266760066 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male England 1 +44 0.4888889 0.06408681 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +63 0.7 0.06902314 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +44 0.4888889 0.134162009 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +31 0.344444454 0.154667765 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male Mexico 0 +26 0.2888889 0.03625838 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.0188569445 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +60 0.6666667 0.0838462859 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Female United-States 1 +33 0.366666675 0.07500682 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.07249252 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.09044693 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Sales Own-child White Female United-States 0 +46 0.51111114 0.190612957 0.6875 0 0 0.6363636 Self-emp-inc Assoc-voc Divorced Exec-managerial Unmarried Asian-Pac-Islander Female Thailand 0 +24 0.266666681 0.0226415358 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +47 0.5222222 0.08158119 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.126751781 0.625 0 0 0.3030303 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +46 0.51111114 0.07156641 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.190495759 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +47 0.5222222 0.164277762 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Male Honduras 0 +69 0.7666667 0.11114464 0.5625 0.0253802538 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried White Male United-States 0 +32 0.355555564 0.08862636 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +51 0.566666663 0.288125247 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +36 0.4 0.225156516 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.116672337 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 +29 0.322222233 0.0589389838 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 +32 0.355555564 0.126328126 0.9375 0.03908039 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +27 0.3 0.137735784 0.375 0 0 0.75757575 Private 10th Divorced Transport-moving Not-in-family Amer-Indian-Eskimo Male United-States 0 +60 0.6666667 0.155280009 0.25 0 0 0.353535354 Private 7th-8th Divorced Adm-clerical Not-in-family White Female Cuba 0 +31 0.344444454 0.07958551 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +46 0.51111114 0.101366267 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.06503245 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +39 0.433333337 0.194349051 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 +69 0.7666667 0.0700496063 0.25 0 0 0.5555556 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 +54 0.6 0.08416689 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.133621156 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.08500274 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.0617691725 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 +34 0.377777785 0.102450654 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.129287645 0.25 0 0 0.5050505 Self-emp-not-inc 7th-8th Never-married Farming-fishing Own-child White Male United-States 0 +63 0.7 0.07280706 0.625 0.105661057 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.195318937 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +64 0.7111111 0.0620426275 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +44 0.4888889 0.2157176 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +26 0.2888889 0.0226374939 0.5625 0 0 0.6060606 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +36 0.4 0.113339692 0.375 0 0 0.4040404 Private 10th Divorced Other-service Not-in-family White Female United-States 0 +55 0.6111111 0.117954075 0.8125 0.07688077 0 0.3838384 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +37 0.411111116 0.171733111 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Wife White Female United-States 1 +37 0.411111116 0.0642120838 0.375 0 0 0.656565666 Private 10th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +63 0.7 0.233699635 0.8125 0.07688077 0 0.363636374 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +33 0.366666675 0.153082266 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.09305081 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +57 0.6333333 0.117283911 0.875 0 0.453856736 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife Black Female United-States 1 +31 0.344444454 0.122742906 0.75 0.04386044 0 0.454545468 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +20 0.222222224 0.07493206 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 +58 0.644444466 0.146678969 0.5625 0.07298073 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.113735057 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 +25 0.2777778 0.265711367 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.095410876 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +18 0.2 0.08448884 0.4375 0.010550105 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 +26 0.2888889 0.116002843 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +29 0.322222233 0.190572545 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.037298318 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 0 +35 0.3888889 0.0332402736 0.625 0 0 0.3838384 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +32 0.355555564 0.144060269 0.625 0 0 0.454545468 Private Some-college Divorced Machine-op-inspct Unmarried White Male United-States 0 +61 0.677777767 0.01619581 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Widowed Other-service Other-relative White Female United-States 0 +26 0.2888889 0.140177339 0.8125 0 0 0.151515156 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +56 0.622222245 0.118621543 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.153561816 0.625 0 0 0.3939394 Private Some-college Married-spouse-absent Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +49 0.544444442 0.145071924 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +40 0.444444448 0.0669722259 0.5625 0 0 0.121212125 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +37 0.411111116 0.128620833 0.5625 0 0 0.4040404 Private HS-grad Separated Exec-managerial Own-child White Male United-States 0 +23 0.25555557 0.0765808746 0.8125 0 0 0.5050505 ? Bachelors Never-married ? Own-child White Male United-States 0 +28 0.311111122 0.1750112 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.113710806 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.0195217244 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Divorced Sales Unmarried White Female United-States 0 +49 0.544444442 0.12272539 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +41 0.455555558 0.05549453 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child Asian-Pac-Islander Male United-States 0 +28 0.311111122 0.1236872 0.8125 0 0 0.212121218 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +38 0.422222227 0.230650544 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.316498578 0.75 0 0.399449021 0.4040404 State-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 +28 0.311111122 0.142735422 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +44 0.4888889 0.0226698238 0.875 0.07688077 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.0230200626 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +50 0.5555556 0.269838125 0.9375 0 0 0.363636374 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +73 0.811111152 0.108608112 0.5625 0 0 0.24242425 Self-emp-not-inc HS-grad Widowed Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.17221266 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Male Outlying-US(Guam-USVI-etc) 0 +38 0.422222227 0.134205788 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +64 0.7111111 0.09679768 0.875 0 0 0.02020202 ? Masters Married-civ-spouse ? Husband White Male United-States 0 +47 0.5222222 0.1492997 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 +52 0.5777778 0.09793798 0.625 0.1502415 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male Canada 1 +24 0.266666681 0.02668207 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +44 0.4888889 0.07034394 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.101960994 0.25 0 0.223599628 0.4040404 Private 7th-8th Divorced Machine-op-inspct Unmarried White Male United-States 0 +61 0.677777767 0.3392425 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband Black Male United-States 1 +58 0.644444466 0.206258491 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +51 0.566666663 0.145803377 0.8125 0 0.359045 0.434343427 Private Bachelors Never-married Sales Not-in-family White Female United-States 1 +49 0.544444442 0.03418053 0.625 0 0 0.5555556 Private Some-college Divorced Sales Unmarried White Female England 0 +23 0.25555557 0.07219616 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Black Male United-States 0 +19 0.211111113 0.13933678 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child Black Female United-States 0 +21 0.233333334 0.05599833 0.5625 0 0 0.535353541 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +56 0.622222245 0.29910925 0.4375 0 0 0.4040404 Private 11th Divorced Sales Not-in-family White Female United-States 0 +35 0.3888889 0.09557185 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.022554649 0.625 0 0 0.2020202 Federal-gov Some-college Divorced Tech-support Unmarried Amer-Indian-Eskimo Female United-States 0 +41 0.455555558 0.0440302975 1 0 0 0.5050505 Private Doctorate Divorced Sales Unmarried White Female United-States 1 +30 0.333333343 0.2299083 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.231293768 1 0 0 0.2020202 Private Doctorate Married-civ-spouse Tech-support Wife White Female ? 0 +47 0.5222222 0.1936277 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.0722615 0.375 0 0.5874656 0.5050505 Self-emp-inc 10th Widowed Exec-managerial Unmarried White Female United-States 1 +55 0.6111111 0.134078488 0.4375 0 0 0.323232323 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +22 0.244444445 0.123102568 0.6875 0 0 0.2020202 ? Assoc-voc Never-married ? Own-child Asian-Pac-Islander Male United-States 0 +31 0.344444454 0.107588381 0.375 0 0 0.4040404 Private 10th Never-married Adm-clerical Unmarried Black Female United-States 0 +30 0.333333343 0.07452188 0.875 0.04386044 0 0.4040404 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 +24 0.266666681 0.07919621 0.8125 0 0 0.4848485 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +49 0.544444442 0.0292846058 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.136729524 0.25 0 0 0.25252524 Private 7th-8th Never-married Craft-repair Not-in-family White Male Germany 0 +50 0.5555556 0.0902287 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +38 0.422222227 0.153427109 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Black Male United-States 0 +20 0.222222224 0.07552814 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Never-married Prof-specialty Other-relative Asian-Pac-Islander Female South 0 +49 0.544444442 0.0743965954 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.189643741 0.5625 0 0 0.5050505 Private HS-grad Widowed Other-service Other-relative Asian-Pac-Islander Female South 0 +46 0.51111114 0.200649962 0.8125 0 0 0.5050505 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 1 +19 0.211111113 0.102044515 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +31 0.344444454 0.09392775 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Own-child White Female Cuba 0 +38 0.422222227 0.0181766748 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +56 0.622222245 0.157143682 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.108501017 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +58 0.644444466 0.06624953 0.5625 0 0 0.5050505 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.127249524 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +22 0.244444445 0.111080654 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +46 0.51111114 0.125057176 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +30 0.333333343 0.130394936 0.0625 0 0 0.4040404 Private Preschool Never-married Farming-fishing Not-in-family White Male Mexico 0 +56 0.622222245 0.184623212 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +32 0.355555564 0.165340587 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male ? 0 +56 0.622222245 0.108393252 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +50 0.5555556 0.0298833773 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.196250439 0.5625 0 0 0.3030303 ? HS-grad Separated ? Unmarried Black Female United-States 0 +30 0.333333343 0.189214021 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.150193483 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +42 0.466666669 0.01700001 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Divorced Prof-specialty Unmarried Amer-Indian-Eskimo Female United-States 0 +31 0.344444454 0.137436062 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.049877923 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child Other Female ? 0 +46 0.51111114 0.113855615 0.375 0 0 0.25252524 Private 10th Never-married Other-service Not-in-family White Female Ecuador 0 +31 0.344444454 0.07039042 0.8125 0 0 0.656565666 Private Bachelors Never-married Sales Not-in-family White Female United-States 1 +38 0.422222227 0.12486925 0.8125 0.07688077 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +44 0.4888889 0.171176091 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.153468877 0.8125 0 0.5544077 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.123284429 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +45 0.5 0.07252754 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 1 +50 0.5555556 0.193707168 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.122708552 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male Dominican-Republic 0 +41 0.455555558 0.131094053 0.8125 1 0 0.656565666 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.07564129 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 +21 0.233333334 0.143234521 0.375 0 0 0.3939394 Private 10th Never-married Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.02203064 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 +42 0.466666669 0.0312291 0.5625 0 0 0.4040404 Federal-gov HS-grad Separated Adm-clerical Unmarried Black Female United-States 0 +37 0.411111116 0.0162362214 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +46 0.51111114 0.115073368 0.8125 0 0.365013778 0.4040404 Private Bachelors Divorced Machine-op-inspct Not-in-family White Male ? 0 +45 0.5 0.0273899529 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +32 0.355555564 0.123239972 0.625 0 0 0.2020202 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +30 0.333333343 0.232451573 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +57 0.6333333 0.14030464 0.8125 0 0 0.8080808 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +37 0.411111116 0.0808544457 0.5625 0 0 0.565656543 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +18 0.2 0.135581821 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +32 0.355555564 0.103010364 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.164059535 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.122669488 0.875 0.06497065 0 0.5050505 Private Masters Divorced Prof-specialty Unmarried White Female United-States 0 +36 0.4 0.118850552 0.5625 0 0 0.282828271 ? HS-grad Divorced ? Unmarried White Female United-States 0 +33 0.366666675 0.06840551 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +48 0.533333361 0.07321253 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.118459895 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Female United-States 0 +34 0.377777785 0.119670242 0.625 0 0 0.5050505 Local-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 1 +33 0.366666675 0.144060269 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +36 0.4 0.240868732 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female Germany 0 +23 0.25555557 0.2935499 0.5625 0 0.383149683 0.5555556 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +39 0.433333337 0.111671343 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +22 0.244444445 0.0481368378 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 +19 0.211111113 0.154741183 0.5625 0 0 0.2020202 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +47 0.5222222 0.191900745 0.5625 0.07298073 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +46 0.51111114 0.0191411767 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Transport-moving Not-in-family White Male United-States 0 +47 0.5222222 0.0181517545 0.875 0 0 0.0606060624 Private Masters Divorced Sales Not-in-family White Female United-States 0 +47 0.5222222 0.0722237751 1 0 0 0.353535354 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.344919026 0.625 0 0 0.4040404 Local-gov Some-college Divorced Transport-moving Not-in-family White Female United-States 0 +38 0.422222227 0.165076569 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +58 0.644444466 0.211592883 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.164334327 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 +54 0.6 0.0556009449 0.6875 0 0 0.1010101 Self-emp-not-inc Assoc-voc Married-civ-spouse Tech-support Other-relative White Female United-States 0 +20 0.222222224 0.0287639629 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +25 0.2777778 0.158816069 0.75 0 0 0.4848485 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 +25 0.2777778 0.0727423951 0.3125 0 0 0.151515156 Self-emp-not-inc 9th Never-married Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.07577061 0.8125 0 0.430670351 0.444444448 State-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +69 0.7666667 0.08635116 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +28 0.311111122 0.151298746 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +20 0.222222224 0.244492352 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +21 0.233333334 0.23350969 0.25 0 0 0.4040404 Private 7th-8th Never-married Farming-fishing Unmarried White Male United-States 0 +37 0.411111116 0.118379749 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +21 0.233333334 0.0668139458 0.5625 0 0 0.323232323 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +25 0.2777778 0.148168832 0.75 0 0 0.13131313 ? Assoc-acdm Married-civ-spouse ? Husband White Male United-States 0 +39 0.433333337 0.09661516 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Other-relative Black Female United-States 0 +34 0.377777785 0.07995528 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 1 +33 0.366666675 0.150996327 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.08013175 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +29 0.322222233 0.11137566 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +48 0.533333361 0.0262341686 0.5625 0 0 0.8989899 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +42 0.466666669 0.186741471 1 0 0.453856736 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.166464716 0.4375 0 0 0.4040404 Private 11th Divorced Machine-op-inspct Unmarried White Female United-States 0 +34 0.377777785 0.143949136 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +20 0.222222224 0.14141193 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Male United-States 0 +41 0.455555558 0.117461048 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.0933693945 0.625 0 0.430670351 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +22 0.244444445 0.121218026 0.6875 0 0 0.4040404 ? Assoc-voc Never-married ? Own-child White Male United-States 0 +23 0.25555557 0.134846315 0.5625 0 0 0.444444448 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 +19 0.211111113 0.105466746 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +24 0.266666681 0.0222374145 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +20 0.222222224 0.133020371 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Male ? 0 +32 0.355555564 0.103446811 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +52 0.5777778 0.0671756342 0.875 0.1502015 0 0.5050505 Private Masters Divorced Prof-specialty Unmarried White Male United-States 1 +36 0.4 0.1913956 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Unmarried White Male United-States 1 +18 0.2 0.482295156 0.375 0 0 0.3030303 Private 10th Never-married Machine-op-inspct Own-child White Male United-States 0 +27 0.3 0.126974046 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Own-child White Female United-States 0 +26 0.2888889 0.07346914 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +52 0.5777778 0.117478557 0.75 0 0 0.323232323 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 +24 0.266666681 0.174681842 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried Amer-Indian-Eskimo Male Mexico 0 +42 0.466666669 0.191555232 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family Black Male United-States 0 +39 0.433333337 0.05746529 0.9375 0.07688077 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 +20 0.222222224 0.135896355 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 +20 0.222222224 0.229321659 0.625 0 0 0.1010101 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +39 0.433333337 0.328338623 0.5625 0 0 0.4040404 Private HS-grad Widowed Handlers-cleaners Unmarried White Male ? 0 +68 0.75555557 0.3261914 0.4375 0 0 0.3030303 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +35 0.3888889 0.114916436 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +54 0.6 0.0633492842 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 +24 0.266666681 0.07932822 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +24 0.266666681 0.141287327 0.8125 0 0 0.08080808 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +20 0.222222224 0.2138088 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +64 0.7111111 0.09445445 0.0625 0 0 0.4040404 ? Preschool Married-civ-spouse ? Husband White Male United-States 0 +28 0.311111122 0.07234501 0.8125 0 0 0.353535354 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +36 0.4 0.08250326 0.5625 0 0 0.474747479 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.131422743 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Transport-moving Husband White Male ? 0 +38 0.422222227 0.0686857 0.625 0 0.518365443 0.5555556 Private Some-college Separated Machine-op-inspct Not-in-family White Male United-States 1 +22 0.244444445 0.22593917 0.5625 0 0 0.6060606 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +56 0.622222245 0.214405566 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +24 0.266666681 0.06756965 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +24 0.266666681 0.0546539575 0.625 0 0 0.75757575 Self-emp-not-inc Some-college Never-married Other-service Not-in-family White Female United-States 0 +22 0.244444445 0.0423417464 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.118718535 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +42 0.466666669 0.113223165 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.140212372 0.875 0 0 0.5555556 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +19 0.211111113 0.127173409 0.5625 0.3409534 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +67 0.7444445 0.152280763 0.625 0 0 0.444444448 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +20 0.222222224 0.14323923 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 +32 0.355555564 0.2570093 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Other Male United-States 0 +46 0.51111114 0.161270425 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Own-child Black Female United-States 0 +52 0.5777778 0.116179988 0.5625 0 0 0.363636374 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +44 0.4888889 0.161564752 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried Black Male United-States 0 +65 0.722222269 0.1494445 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Husband White Male Mexico 0 +37 0.411111116 0.146954447 0.8125 0 0.4331956 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.139346883 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +35 0.3888889 0.0745387152 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female United-States 0 +30 0.333333343 0.142134637 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +64 0.7111111 0.136716723 0.5625 0.031370312 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.0136700561 0.5625 0 0 0.373737365 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 1 +35 0.3888889 0.131130427 0.25 0 0 0.4040404 Private 7th-8th Divorced Tech-support Unmarried White Female United-States 0 +28 0.311111122 0.138063788 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +63 0.7 0.02358785 0.8125 0 0.453856736 0.323232323 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 1 +40 0.444444448 0.160687819 0.9375 0 0 0.5555556 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.232611865 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +40 0.444444448 0.129575238 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +25 0.2777778 0.323138267 0.25 0 0 0.454545468 Private 7th-8th Never-married Sales Other-relative White Male Guatemala 0 +45 0.5 0.0229614638 0.8125 0 0 0.3838384 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.10222435 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +53 0.5888889 0.201440692 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +63 0.7 0.0911554843 0.5625 0.02105021 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Vietnam 0 +27 0.3 0.0351288654 0.625 0 0 0.6060606 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +31 0.344444454 0.214619741 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.05398042 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +39 0.433333337 0.231457427 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Protective-serv Not-in-family White Male Mexico 1 +42 0.466666669 0.133825913 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.179587871 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +31 0.344444454 0.13313891 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +53 0.5888889 0.125173688 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.212237448 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +27 0.3 0.148685426 1 0 0 0.4040404 Private Doctorate Never-married Adm-clerical Own-child White Female United-States 0 +22 0.244444445 0.04330288 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Female United-States 0 +29 0.322222233 0.08490576 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 1 +52 0.5777778 0.0525437742 0.5625 0 0.404499531 0.4040404 Private HS-grad Widowed Sales Unmarried White Female United-States 0 +32 0.355555564 0.141820773 0.6875 0 0 0.464646459 Private Assoc-voc Divorced Craft-repair Own-child White Male United-States 0 +23 0.25555557 0.235858977 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +27 0.3 0.1572171 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +53 0.5888889 0.112594761 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family Black Female United-States 0 +18 0.2 0.175658464 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +41 0.455555558 0.116770677 0.8125 0 0 0.3030303 Private Bachelors Separated Sales Unmarried White Female United-States 0 +27 0.3 0.09127739 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female Dominican-Republic 0 +30 0.333333343 0.08170512 0.625 0 0 0.4040404 Private Some-college Divorced Sales Own-child White Male United-States 0 +41 0.455555558 0.299549758 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 +21 0.233333334 0.0439312868 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +58 0.644444466 0.0922621042 0.5625 0 0 0.4040404 State-gov HS-grad Married-spouse-absent Other-service Unmarried Black Female Honduras 0 +45 0.5 0.183175787 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Protective-serv Not-in-family White Female United-States 0 +40 0.444444448 0.137432024 0.375 0 0 0.4040404 Private 10th Divorced Transport-moving Own-child White Male United-States 0 +21 0.233333334 0.15209958 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.123262875 0.8125 0 0.365013778 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Other Female United-States 0 +50 0.5555556 0.08152327 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Wife Black Female United-States 0 +26 0.2888889 0.0330651551 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.100160643 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Other-relative White Female United-States 0 +27 0.3 0.140906781 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 +36 0.4 0.19253993 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 +22 0.244444445 0.145570338 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 +37 0.411111116 0.0275846049 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Other-service Own-child White Male Japan 0 +54 0.6 0.132813588 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.0222273115 0.5625 0 0 0.5050505 Private HS-grad Divorced Farming-fishing Unmarried White Male United-States 0 +44 0.4888889 0.153161064 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +38 0.422222227 0.110493332 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 1 +49 0.544444442 0.174504027 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Female United-States 0 +18 0.2 0.1591306 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +26 0.2888889 0.119841315 0.8125 0 0 0.4848485 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +48 0.533333361 0.112432435 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male ? 1 +32 0.355555564 0.13468197 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +35 0.3888889 0.06652904 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Tech-support Own-child White Male United-States 0 +40 0.444444448 0.0909648761 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.03728889 0.5625 0.03411034 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.06893154 0.9375 0 0 0.727272749 State-gov Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +30 0.333333343 0.155763611 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +19 0.211111113 0.15283373 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +36 0.4 0.0872718841 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.128645763 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +50 0.5555556 0.0467062481 0.75 0 0 0.6060606 Federal-gov Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.137775525 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family Black Male United-States 0 +35 0.3888889 0.129740253 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.136600882 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.272900671 0.375 0 0 0.4040404 Private 10th Separated Sales Unmarried White Female United-States 0 +41 0.455555558 0.15349178 0.625 0 0 0.464646459 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 1 +33 0.366666675 0.06826407 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 +49 0.544444442 0.05561509 0.625 0 0 0.6060606 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +28 0.311111122 0.0893686 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.10049808 0.8125 0.1502415 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 1 +27 0.3 0.165461153 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Own-child White Female United-States 0 +47 0.5222222 0.325718582 0.5625 0.0288502872 0 0.323232323 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +42 0.466666669 0.07049414 1 0 0 0.4040404 State-gov Doctorate Never-married Exec-managerial Not-in-family White Female Italy 1 +30 0.333333343 0.233828276 0.5625 0 0 0.6060606 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +37 0.411111116 0.07310543 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.224492416 1 0 0 0.353535354 Private Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 0 +51 0.566666663 0.104672648 0.5625 0 0 0.3838384 Private HS-grad Married-spouse-absent Sales Not-in-family Black Female United-States 0 +27 0.3 0.165940031 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +53 0.5888889 0.02040136 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +45 0.5 0.233932674 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +37 0.411111116 0.138648421 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +40 0.444444448 0.109930933 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female ? 0 +54 0.6 0.06294113 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +47 0.5222222 0.0787543654 0.5625 0 0 0.424242437 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.110813938 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Yugoslavia 1 +33 0.366666675 0.0212655049 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.0842989 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Other-relative Black Male Haiti 0 +39 0.433333337 0.135451153 0.8125 0 0 0.5555556 State-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +25 0.2777778 0.08267299 0.5625 0 0.3677686 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 +33 0.366666675 0.101414084 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.08011086 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family White Female Ireland 0 +53 0.5888889 0.09522969 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +21 0.233333334 0.117675908 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Adm-clerical Own-child White Male United-States 0 +31 0.344444454 0.0510236062 1 0.07298073 0 0.5555556 State-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +63 0.7 0.08967707 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +21 0.233333334 0.214766577 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Never-married Other-service Own-child White Male United-States 0 +59 0.655555546 0.07384498 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +50 0.5555556 0.06261783 0.125 0 0 0.4040404 Private 1st-4th Separated Prof-specialty Unmarried Black Female United-States 0 +66 0.733333349 0.253267825 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +19 0.211111113 0.0970974043 0.5625 0 0 0.3030303 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +31 0.344444454 0.123780824 0.8125 0 0 0.454545468 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +23 0.25555557 0.2686756 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +45 0.5 0.115070671 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 +35 0.3888889 0.1375876 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +32 0.355555564 0.138176948 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Own-child White Male United-States 0 +20 0.222222224 0.1518113 0.25 0 0 0.6060606 Private 7th-8th Never-married Machine-op-inspct Other-relative White Female Mexico 0 +38 0.422222227 0.0228833333 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Other-relative White Male United-States 1 +49 0.544444442 0.09903112 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Philippines 0 +64 0.7111111 0.117751338 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +60 0.6666667 0.156777948 0.4375 0 0 0.2020202 Local-gov 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +25 0.2777778 0.02491 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +21 0.233333334 0.196849883 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +26 0.2888889 0.204736292 0.5625 0 0.3677686 0.151515156 Private HS-grad Never-married Priv-house-serv Other-relative White Female Mexico 0 +23 0.25555557 0.193969846 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +67 0.7444445 0.222363368 0.875 0 0 0.4848485 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.129283592 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +46 0.51111114 0.218629971 0.125 0 0 0.4040404 Private 1st-4th Separated Machine-op-inspct Own-child White Female Guatemala 0 +38 0.422222227 0.134901553 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 0 +20 0.222222224 0.07631617 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Other-relative White Male United-States 0 +28 0.311111122 0.130724281 0.625 0 0 0.4040404 ? Some-college Never-married ? Other-relative White Female United-States 0 +26 0.2888889 0.104541309 0.8125 0 0 0.4848485 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +58 0.644444466 0.117954075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.241435841 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Male United-States 0 +37 0.411111116 0.239056915 0.75 0 0 0.3838384 State-gov Assoc-acdm Divorced Protective-serv Not-in-family Black Male United-States 0 +53 0.5888889 0.070385024 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 +45 0.5 0.07606158 0.25 0 0 0.353535354 Private 7th-8th Divorced Machine-op-inspct Not-in-family Black Female United-States 0 +33 0.366666675 0.08946693 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +33 0.366666675 0.240917221 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Protective-serv Husband Black Male United-States 0 +35 0.3888889 0.07719042 0.5625 0 0 0.25252524 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +60 0.6666667 0.354196966 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +21 0.233333334 0.04604147 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +38 0.422222227 0.117579587 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Craft-repair Husband Black Male United-States 0 +40 0.444444448 0.0287619438 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Unmarried White Female United-States 0 +40 0.444444448 0.1485743 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 +44 0.4888889 0.133062124 0.9375 0 0 0.7070707 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.285073459 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.0197035782 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.208070964 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Male United-States 0 +49 0.544444442 0.186061874 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +37 0.411111116 0.144029289 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +52 0.5777778 0.122365728 0.375 0 0 0.3030303 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 +46 0.51111114 0.1078066 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +20 0.222222224 0.192156017 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Female ? 0 +43 0.477777779 0.1786658 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.149602115 0.8125 1 0 0.4040404 Local-gov Bachelors Divorced Adm-clerical Not-in-family White Female United-States 1 +25 0.2777778 0.131308243 0.625 0 0 0.151515156 State-gov Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +48 0.533333361 0.105695076 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Male United-States 0 +36 0.4 0.146435827 0.625 0 0 0.5555556 Local-gov Some-college Divorced Protective-serv Unmarried White Male United-States 0 +37 0.411111116 0.362659931 0.5625 0.143441439 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 +18 0.2 0.129587367 0.625 0 0 0.6060606 ? Some-college Never-married ? Own-child White Male United-States 0 +42 0.466666669 0.258295774 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +60 0.6666667 0.130150437 0.75 0 0 0.24242425 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 +37 0.411111116 0.0669843554 0.625 0 0 0.5555556 Self-emp-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +44 0.4888889 0.171168014 0.75 0 0 0.4040404 Local-gov Assoc-acdm Divorced Tech-support Not-in-family Black Male United-States 0 +32 0.355555564 0.0609185 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.07854288 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female Portugal 0 +42 0.466666669 0.160427839 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.06459802 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +41 0.455555558 0.0554446839 0.5 0 0 0.1010101 Private 12th Married-civ-spouse Other-service Wife White Female United-States 0 +34 0.377777785 0.122767828 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +56 0.622222245 0.12098363 0.375 0 0 0.323232323 Private 10th Separated Other-service Unmarried White Female United-States 0 +28 0.311111122 0.080684714 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +28 0.311111122 0.171743885 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Never-married Sales Own-child White Male United-States 0 +19 0.211111113 0.07060662 0.25 0 0 0.25252524 Private 7th-8th Never-married Transport-moving Unmarried White Male Guatemala 0 +49 0.544444442 0.07434002 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +36 0.4 0.09120735 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +25 0.2777778 0.200864822 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.112305142 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +47 0.5222222 0.143912762 0.9375 0 0.453856736 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.1863158 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +35 0.3888889 0.152750209 0.625 0 0 0.5858586 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.02089506 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.07857858 0.5625 0.046500463 0 0.4848485 Local-gov HS-grad Never-married Protective-serv Own-child Amer-Indian-Eskimo Male United-States 0 +42 0.466666669 0.0922647938 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.120953321 0.625 0 0 0.363636374 Private Some-college Divorced Other-service Not-in-family White Female United-States 1 +23 0.25555557 0.0695606247 0.625 0 0 0.24242425 Private Some-college Divorced Other-service Own-child White Female United-States 0 +31 0.344444454 0.236505568 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +36 0.4 0.128753528 0.625 0 0 0.575757563 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +20 0.222222224 0.100160643 0.625 0 0 0.25252524 Private Some-college Never-married Prof-specialty Unmarried White Female United-States 0 +36 0.4 0.0864697 0.625 0 0 0.454545468 Private Some-college Never-married Machine-op-inspct Unmarried White Male United-States 0 +50 0.5555556 0.09723211 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +37 0.411111116 0.1162103 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +25 0.2777778 0.06902112 0.8125 0.2782828 0 0.5050505 Private Bachelors Never-married Farming-fishing Own-child White Male United-States 1 +39 0.433333337 0.0310014449 0.625 0 0 0.6060606 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +32 0.355555564 0.133664265 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Wife White Female United-States 0 +59 0.655555546 0.130594969 0.625 0 0 0.353535354 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.1572171 0.8125 0.03411034 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.255099177 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +42 0.466666669 0.0210486259 0.6875 0 0 0.373737365 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.0481846556 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 0 +48 0.533333361 0.131185666 0.75 0 0.43663913 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +20 0.222222224 0.02328274 0.5625 0.0378103778 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.0245705377 0.375 0 0 0.454545468 Self-emp-not-inc 10th Divorced Craft-repair Not-in-family White Male United-States 0 +18 0.2 0.07848562 0.625 0 0 0.3030303 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +60 0.6666667 0.035126172 0.875 0 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +60 0.6666667 0.145948187 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male ? 0 +42 0.466666669 0.1529361 0.875 0 0 0.222222224 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +49 0.544444442 0.0565856546 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +35 0.3888889 0.05526418 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Wife White Female United-States 0 +30 0.333333343 0.118666671 0.75 0 0 0.6060606 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male Iran 0 +59 0.655555546 0.07773531 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.332075417 0.5625 0.135501355 0 0.5050505 Self-emp-inc HS-grad Never-married Other-service Not-in-family Black Male United-States 1 +55 0.6111111 0.239052877 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.265178621 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +39 0.433333337 0.0666401759 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.09529368 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +44 0.4888889 0.116170555 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.152316451 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +23 0.25555557 0.2657848 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child Black Male United-States 0 +22 0.244444445 0.155643716 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 +55 0.6111111 0.123802371 0.875 0 0 0.5555556 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.12538451 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +23 0.25555557 0.109302521 0.625 0 0 0.25252524 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +46 0.51111114 0.1475182 0.5625 0.1502415 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +23 0.25555557 0.184013665 0.8125 0 0 0.232323229 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.22385256 0.875 0.1502415 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.06919152 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 +42 0.466666669 0.133424491 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 1 +22 0.244444445 0.197300479 0.8125 0 0 0.1010101 State-gov Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +18 0.2 0.0915495 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +37 0.411111116 0.06677825 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.018460907 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.2017283 0.75 0 0 0.4040404 Private Assoc-acdm Separated Other-service Unmarried White Female United-States 0 +62 0.6888889 0.06912552 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Widowed Farming-fishing Unmarried White Female United-States 0 +51 0.566666663 0.103378117 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +34 0.377777785 0.292510629 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +28 0.311111122 0.16176413 0.875 0 0 0.4040404 Self-emp-not-inc Masters Never-married Prof-specialty Own-child White Male United-States 0 +56 0.622222245 0.147790983 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +46 0.51111114 0.199225441 0.5625 0 0 0.3030303 Private HS-grad Divorced Tech-support Not-in-family White Female United-States 0 +46 0.51111114 0.07680448 0.625 0 0.4331956 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +23 0.25555557 0.3343304 0.625 0 0 0.4040404 Local-gov Some-college Married-spouse-absent Adm-clerical Own-child White Female Guatemala 0 +33 0.366666675 0.253574282 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +27 0.3 0.07221502 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Asian-Pac-Islander Male United-States 0 +21 0.233333334 0.1658289 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +18 0.2 0.05426263 0.5625 0 0 0.6060606 ? HS-grad Never-married ? Own-child White Male United-States 0 +36 0.4 0.0559633076 0.1875 0.07298073 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 1 +37 0.411111116 0.221122041 0.8125 0 0 0.363636374 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +39 0.433333337 0.203147426 0.4375 0 0 0.4040404 Local-gov 11th Married-civ-spouse Other-service Husband White Male United-States 0 +36 0.4 0.134531111 0.5625 0.07298073 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +24 0.266666681 0.121276617 0.75 0.0235402342 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 +26 0.2888889 0.08152462 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Exec-managerial Own-child Black Female United-States 0 +37 0.411111116 0.08456226 0.5625 0 0 0.6060606 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +34 0.377777785 0.115020834 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.121607326 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +33 0.366666675 0.0324569531 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +20 0.222222224 0.2910706 0.5625 0 0 0.08080808 Private HS-grad Never-married Sales Own-child White Female Mexico 0 +26 0.2888889 0.177274272 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +47 0.5222222 0.0829841644 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +17 0.188888893 0.0746262744 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 +53 0.5888889 0.160625175 0.6875 0 0.3409091 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.124959506 0.625 0 0 0.353535354 Private Some-college Divorced Sales Own-child White Female United-States 0 +34 0.377777785 0.122119211 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.3560411 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 +39 0.433333337 0.183841243 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.13169755 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Female United-States 0 +21 0.233333334 0.133078963 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.03274186 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +54 0.6 0.0212385636 0.875 0.07298073 0 0.4040404 Local-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 +32 0.355555564 0.09977605 0.8125 0 0.459595948 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Iran 0 +29 0.322222233 0.020252509 0.5625 0.0263502635 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +68 0.75555557 0.11462345 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried Black Female United-States 0 +27 0.3 0.15550901 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +54 0.6 0.117263705 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 1 +23 0.25555557 0.237492308 0.5625 0 0 0.4040404 Private HS-grad Divorced Priv-house-serv Unmarried White Female United-States 0 +38 0.422222227 0.162424862 0.875 0 0 0.4848485 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.104689486 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +21 0.233333334 0.0736941 0.625 0 0.453168035 0.4040404 Private Some-college Never-married Prof-specialty Own-child Asian-Pac-Islander Male United-States 0 +40 0.444444448 0.08450231 0.6875 0 0 0.424242437 Private Assoc-voc Never-married Prof-specialty Not-in-family White Male United-States 0 +19 0.211111113 0.2233144 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Female United-States 0 +21 0.233333334 0.09333504 0.5625 0 0 0.6060606 ? HS-grad Never-married ? Other-relative White Male United-States 0 +35 0.3888889 0.15054439 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +39 0.433333337 0.077738 0.625 0.0217402168 0 0.454545468 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +38 0.422222227 0.130009666 0.5625 0 0.323232323 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male ? 0 +41 0.455555558 0.09914832 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +26 0.2888889 0.117593735 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.180924833 0.5625 0 0 0.454545468 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +70 0.7777778 0.101626925 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.07567968 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 +83 0.922222257 0.131680712 0.5625 0 0 0.5555556 Private HS-grad Widowed Protective-serv Not-in-family White Male United-States 0 +59 0.655555546 0.129980713 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +18 0.2 0.08119054 0.3125 0 0 0.151515156 Private 9th Never-married Other-service Own-child Black Male United-States 0 +31 0.344444454 0.0397944376 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +43 0.477777779 0.140281737 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +24 0.266666681 0.124387 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.187738314 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +48 0.533333361 0.0265803654 0.875 0 0 0.5252525 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +27 0.3 0.109343611 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Dominican-Republic 0 +41 0.455555558 0.137432024 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.172187075 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Wife White Female Mexico 0 +53 0.5888889 0.08285215 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 1 +66 0.733333349 0.196242362 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +31 0.344444454 0.107217938 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.08514419 0.8125 0 0 0.4040404 State-gov Bachelors Married-spouse-absent Adm-clerical Not-in-family White Male United-States 0 +22 0.244444445 0.153313965 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +47 0.5222222 0.117048845 0.8125 0.1502415 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +74 0.822222233 0.142166287 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.119051263 0.625 0 0.3409091 0.7070707 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +35 0.3888889 0.0209435541 0.625 0.04101041 0 0.6060606 Self-emp-not-inc Some-college Separated Farming-fishing Not-in-family White Male United-States 0 +51 0.566666663 0.0218036585 0.8125 0 0.3838384 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +40 0.444444448 0.22337839 0.625 0 0 0.4040404 Private Some-college Separated Other-service Not-in-family White Female United-States 0 +51 0.566666663 0.09855493 1 0 0.4331956 0.4040404 Local-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.3468871 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Wife White Female United-States 0 +53 0.5888889 0.265691847 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Unmarried Black Female United-States 0 +32 0.355555564 0.269774139 0.5625 0.0378103778 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.227321252 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male South 0 +42 0.466666669 0.14269501 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Male United-States 0 +22 0.244444445 0.0691612139 0.625 0 0 0.323232323 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +62 0.6888889 0.151987776 0.5625 0 0 0.24242425 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +33 0.366666675 0.0821483061 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.26725176 0.5625 0 0 0.2020202 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 +46 0.51111114 0.100995824 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.169856638 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +29 0.322222233 0.141397789 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 +29 0.322222233 0.154441461 0.8125 0 0 0.4848485 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +33 0.366666675 0.115018807 1 1 0 0.6060606 Private Doctorate Divorced Sales Not-in-family White Male United-States 1 +50 0.5555556 0.135123149 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 +22 0.244444445 0.146146208 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Amer-Indian-Eskimo Female United-States 0 +40 0.444444448 0.1433012 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.101238295 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Amer-Indian-Eskimo Male United-States 0 +54 0.6 0.117636167 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +29 0.322222233 0.0738335252 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.151628777 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried Black Female United-States 0 +46 0.51111114 0.116316035 0.4375 0 0 0.272727281 Private 11th Widowed Other-service Not-in-family White Female El-Salvador 0 +71 0.788888931 0.160623834 0.375 0 0 0.08080808 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.0254286211 0.625 0 0 0.8080808 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +56 0.622222245 0.0572625548 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +64 0.7111111 0.1727387 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male Philippines 1 +23 0.25555557 0.113953955 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +36 0.4 0.142078727 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.193325281 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.151114866 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +31 0.344444454 0.07305425 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 +36 0.4 0.0510714278 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.08101071 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +25 0.2777778 0.07034327 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.038303908 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +24 0.266666681 0.135258526 0.5 0 0 0.4040404 Private 12th Never-married Sales Not-in-family White Male United-States 0 +50 0.5555556 0.114879392 0.75 0 0 0.2020202 Self-emp-not-inc Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 +30 0.333333343 0.0545111671 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.0222859085 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +41 0.455555558 0.0759497657 0.875 0.07430074 0 0.363636374 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 1 +29 0.322222233 0.119654074 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +31 0.344444454 0.176427647 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +54 0.6 0.114356056 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female Italy 0 +20 0.222222224 0.09529233 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Sales Other-relative White Female United-States 0 +37 0.411111116 0.291971147 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +28 0.311111122 0.05833819 0.5625 0 0 0.3030303 Local-gov HS-grad Never-married Other-service Own-child Black Male United-States 0 +39 0.433333337 0.08456226 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +46 0.51111114 0.2837082 0.625 0 0 0.4040404 State-gov Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +35 0.3888889 0.0181847569 0.8125 0 0 0.424242437 Private Bachelors Separated Exec-managerial Unmarried White Female United-States 0 +36 0.4 0.162994 0.625 1 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +34 0.377777785 0.09016 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +44 0.4888889 0.07767402 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.0160153024 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +28 0.311111122 0.12853463 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.107212543 0.9375 0 0 0.454545468 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +64 0.7111111 0.138397187 0.8125 0 0 0.5050505 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +19 0.211111113 0.03213635 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +35 0.3888889 0.109945752 0.8125 0 0 0.5252525 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +61 0.677777767 0.136190027 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.113717541 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 +36 0.4 0.07561839 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +34 0.377777785 0.035385482 0.5625 0 0 0.3030303 Private HS-grad Never-married Transport-moving Unmarried Black Male United-States 0 +27 0.3 0.0258320682 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.09543849 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Unmarried White Male United-States 0 +26 0.2888889 0.0194355119 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +19 0.211111113 0.11830768 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Other-relative White Female United-States 0 +36 0.4 0.143468231 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +51 0.566666663 0.1323502 0.8125 0.14084141 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +63 0.7 0.08001455 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.06227702 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +20 0.222222224 0.08430295 0.625 0 0 0.25252524 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.07003412 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +40 0.444444448 0.121480025 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Own-child White Female United-States 0 +25 0.2777778 0.0363055281 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.121057719 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +41 0.455555558 0.186831728 0.8125 0 0 0.3030303 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 +49 0.544444442 0.0822904259 0.5625 0 0 0.8080808 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +46 0.51111114 0.126732916 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Own-child Black Female United-States 0 +32 0.355555564 0.114573605 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Separated Sales Not-in-family White Male United-States 0 +28 0.311111122 0.118045 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband Black Male Mexico 0 +19 0.211111113 0.137698069 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Other-relative Black Male United-States 0 +19 0.211111113 0.1107257 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +18 0.2 0.07788079 0.4375 0 0 0.2020202 Private 11th Never-married Adm-clerical Own-child Black Male United-States 0 +39 0.433333337 0.120438069 0.5625 0 0 0.5555556 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +60 0.6666667 0.113303989 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.136431143 0.8125 0 0.323232323 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.06755214 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife White Female Canada 1 +36 0.4 0.116020359 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +45 0.5 0.0347974859 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +60 0.6666667 0.241726816 0.8125 0 0.5369605 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.07810508 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.2248999 0.625 0 0 0.434343427 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +23 0.25555557 0.100321613 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +48 0.533333361 0.08793733 0.625 0 0 0.24242425 State-gov Some-college Never-married Prof-specialty Not-in-family Black Female United-States 0 +46 0.51111114 0.2885085 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Other-service Own-child White Female United-States 0 +43 0.477777779 0.1271687 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.0760063455 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Own-child Other Male United-States 0 +50 0.5555556 0.0745926 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +61 0.677777767 0.105511196 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 +35 0.3888889 0.132343471 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +65 0.722222269 0.171355933 0.625 0 0 0.4040404 Local-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +56 0.622222245 0.0614681058 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male United-States 0 +43 0.477777779 0.104253039 0.8125 0 0 0.8080808 Self-emp-not-inc Bachelors Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female Thailand 0 +55 0.6111111 0.0567324832 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +22 0.244444445 0.152439043 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.167310014 0.625 0 0 0.323232323 Private Some-college Divorced Machine-op-inspct Own-child White Male United-States 0 +35 0.3888889 0.0365843736 0.5625 0 0.3838384 0.5050505 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +22 0.244444445 0.02204613 0.625 0 0 0.5050505 ? Some-college Never-married ? Own-child White Male United-States 0 +20 0.222222224 0.06460408 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +46 0.51111114 0.253030062 0.5 0 0 0.353535354 Local-gov 12th Married-civ-spouse Other-service Husband White Male United-States 1 +43 0.477777779 0.16445826 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Unmarried White Male Mexico 0 +46 0.51111114 0.157307342 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried Black Female ? 0 +39 0.433333337 0.219802588 0.4375 0.0263502635 0 0.373737365 Private 11th Married-civ-spouse Other-service Husband Black Male United-States 0 +34 0.377777785 0.0520446822 0.5625 0 0 0.2020202 Private HS-grad Never-married Exec-managerial Unmarried White Female England 0 +35 0.3888889 0.0224940311 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.3006375 0.5625 0 0 0.414141417 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 +25 0.2777778 0.102249272 0.5625 0 0 0.282828271 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +44 0.4888889 0.08450231 0.875 0 0 0.353535354 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.09019031 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +41 0.455555558 0.10446924 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +43 0.477777779 0.137156546 0.8125 0.07298073 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +32 0.355555564 0.156775922 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +50 0.5555556 0.205642879 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.08151317 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +29 0.322222233 0.13403134 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +38 0.422222227 0.112574555 0.9375 1 0 0.7070707 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.02611428 0.375 0 0 0.5050505 Private 10th Never-married Handlers-cleaners Unmarried White Male United-States 0 +41 0.455555558 0.17091544 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 +27 0.3 0.08760461 0.625 0 0 0.656565666 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +37 0.411111116 0.137285188 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.149226949 0.875 0 0 0.24242425 State-gov Masters Separated Prof-specialty Unmarried White Female ? 0 +31 0.344444454 0.1053839 0.375 0 0 0.4040404 Private 10th Divorced Other-service Not-in-family White Male United-States 0 +49 0.544444442 0.04871877 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 +33 0.366666675 0.056355305 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 +31 0.344444454 0.228652835 0.5625 0 0.4242424 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.06191668 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Other-relative White Female United-States 0 +44 0.4888889 0.06681664 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.30712837 0.625 0 0 0.656565666 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 1 +62 0.6888889 0.1296655 0.5625 0 0 0.4040404 Private HS-grad Widowed Farming-fishing Unmarried White Female United-States 0 +65 0.722222269 0.0750876442 0.625 0 0.499081731 0.1010101 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.148938 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 +60 0.6666667 0.0575286 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +31 0.344444454 0.132096946 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.17891635 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 +53 0.5888889 0.119705267 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +44 0.4888889 0.138628215 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.0758447 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.119616359 0.625 0 0.3624885 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.123468973 0.4375 0 0 0.1010101 Private 11th Never-married Sales Own-child Black Female United-States 0 +47 0.5222222 0.07831792 0.5625 0 0 0.434343427 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +38 0.422222227 0.08250326 0.8125 0.0406404063 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.14509213 0.75 0 0 0.25252524 Private Assoc-acdm Married-civ-spouse Other-service Wife White Female United-States 0 +40 0.444444448 0.20886372 0.625 0 0 0.4040404 Private Some-college Separated Sales Not-in-family Amer-Indian-Eskimo Female United-States 0 +57 0.6333333 0.04168168 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +43 0.477777779 0.0398106 0.5625 0.04101041 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.15303646 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Other Male Ecuador 0 +64 0.7111111 0.161277831 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +18 0.2 0.0800475553 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 +40 0.444444448 0.0641379952 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +17 0.188888893 0.4440431 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child Black Female Trinadad&Tobago 0 +23 0.25555557 0.145075962 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +45 0.5 0.114904985 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried Black Female United-States 0 +45 0.5 0.0613212734 0.875 0 0 0.151515156 Self-emp-not-inc Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +27 0.3 0.214614362 0.375 0 0 0.6060606 Private 10th Never-married Other-service Not-in-family White Male Mexico 0 +23 0.25555557 0.108033583 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Handlers-cleaners Unmarried White Male United-States 0 +58 0.644444466 0.146038443 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male United-States 0 +35 0.3888889 0.2080851 0.5625 0 0 0.75757575 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 +47 0.5222222 0.0207718033 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 1 +33 0.366666675 0.0668880343 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +27 0.3 0.127012447 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Not-in-family Asian-Pac-Islander Male Philippines 1 +46 0.51111114 0.05594647 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +24 0.266666681 0.272017 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.15881 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.129246548 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +31 0.344444454 0.100480571 0.8125 0 0 0.979797959 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +37 0.411111116 0.102989487 0.6875 0.07688077 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 1 +23 0.25555557 0.293394327 0.6875 0 0 0.4040404 Private Assoc-voc Separated Exec-managerial Own-child White Female United-States 0 +30 0.333333343 0.0736051947 0.8125 0 0 0.5252525 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.167156443 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 +24 0.266666681 0.07589588 0.5625 0 0 0.323232323 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +32 0.355555564 0.140838087 0.625 0.0346403457 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +27 0.3 0.1236872 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +35 0.3888889 0.07222512 0.5625 0 0 0.5555556 Local-gov HS-grad Never-married Adm-clerical Unmarried Amer-Indian-Eskimo Male United-States 0 +27 0.3 0.118129194 0.8125 0 0.430670351 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +30 0.333333343 0.120060891 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male ? 0 +33 0.366666675 0.025744509 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +34 0.377777785 0.154153854 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.136176556 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.28631413 0.875 0.0217402168 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +39 0.433333337 0.102772608 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 +37 0.411111116 0.0263277888 0.625 0.03103031 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.137605786 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 1 +40 0.444444448 0.07819937 0.625 0.049340494 0 0.474747479 Private Some-college Separated Craft-repair Unmarried White Male United-States 1 +53 0.5888889 0.195756063 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Vietnam 0 +58 0.644444466 0.05521164 0.625 0 0.3409091 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male United-States 1 +29 0.322222233 0.0908530653 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +33 0.366666675 0.30505994 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Other Male Mexico 0 +57 0.6333333 0.165145949 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +69 0.7666667 0.0231285 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +20 0.222222224 0.124439538 0.625 0 0 0.121212125 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +56 0.622222245 0.264133275 0.5625 0 0 0.25252524 Private HS-grad Widowed Sales Unmarried White Female Mexico 0 +49 0.544444442 0.113380775 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.208467677 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +70 0.7777778 0.05200966 0.5625 0 0 0.373737365 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.1433874 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +37 0.411111116 0.243744045 0.8125 0.105201051 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +58 0.644444466 0.160219714 0.8125 0 0 0.5858586 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +42 0.466666669 0.06270539 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Own-child White Female United-States 0 +41 0.455555558 0.151675254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +28 0.311111122 0.03422498 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.08330342 0.875 0.07688077 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.1679465 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +58 0.644444466 0.149734125 0.5625 0.07688077 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +18 0.2 0.203247115 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +50 0.5555556 0.131539941 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +69 0.7666667 0.364878565 0.625 0.0205002055 0 0.24242425 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +84 0.933333337 0.162365586 0.875 0 0 0.6666667 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +47 0.5222222 0.08723147 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.252078354 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 +24 0.266666681 0.2573885 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family Black Male United-States 0 +48 0.533333361 0.124799877 0.8125 0 0 0.0606060624 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +53 0.5888889 0.0205071047 0.5625 0 0 0.5050505 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +58 0.644444466 0.0336046554 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.132946953 0.625 0 0 0.24242425 Private Some-college Never-married Handlers-cleaners Other-relative White Male Mexico 0 +36 0.4 0.0754069 0.625 0 0 0.5252525 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.2293102 0.5 0 0 0.4040404 Private 12th Never-married Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.125055149 0.125 0 0 0.212121218 Private 1st-4th Widowed Prof-specialty Unmarried White Female Mexico 0 +37 0.411111116 0.142078727 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +43 0.477777779 0.236182272 0.9375 0 0 0.5050505 Private Prof-school Separated Tech-support Not-in-family White Male Columbia 1 +42 0.466666669 0.128337279 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 1 +21 0.233333334 0.04732321 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 +49 0.544444442 0.120595 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male Greece 0 +35 0.3888889 0.163058653 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Other-relative Black Male United-States 0 +49 0.544444442 0.0792305544 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Widowed Craft-repair Unmarried White Female United-States 0 +28 0.311111122 0.0555874743 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family Black Male United-States 0 +51 0.566666663 0.130244061 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +30 0.333333343 0.1255603 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Not-in-family White Female United-States 0 +19 0.211111113 0.217959121 0.25 0 0 0.6060606 Private 7th-8th Never-married Other-service Not-in-family White Male United-States 1 +56 0.622222245 0.2499244 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 +20 0.222222224 0.0268922113 0.5625 0 0 0.08080808 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +22 0.244444445 0.04330288 0.625 0 0 0.373737365 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +33 0.366666675 0.133804366 0.5625 1 0 0.565656543 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +54 0.6 0.132669449 0.5625 0 0 0.454545468 ? HS-grad Divorced ? Other-relative White Male United-States 0 +22 0.244444445 0.141553372 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +68 0.75555557 0.097081244 0.625 0 0 0.3030303 Private Some-college Divorced Priv-house-serv Other-relative White Female United-States 0 +56 0.622222245 0.104840361 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +23 0.25555557 0.049136363 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 +69 0.7666667 0.07243729 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +41 0.455555558 0.109959893 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +33 0.366666675 0.149069354 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +18 0.2 0.299602956 0.4375 0 0 0.08080808 Private 11th Never-married Sales Own-child White Female Mexico 0 +17 0.188888893 0.10399238 0.4375 0 0 0.161616161 Private 11th Never-married Other-service Own-child Black Male Haiti 0 +31 0.344444454 0.08127675 0.4375 0 0.395087242 0.4040404 Private 11th Divorced Handlers-cleaners Other-relative Black Male United-States 0 +50 0.5555556 0.107529782 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +62 0.6888889 0.195832849 0.375 0 0 0.4040404 Private 10th Widowed Handlers-cleaners Not-in-family White Female United-States 0 +41 0.455555558 0.0334436819 0.5625 0 0 0.5252525 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +20 0.222222224 0.09924665 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Other-service Not-in-family White Female United-States 0 +23 0.25555557 0.153527468 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Sales Own-child White Male United-States 0 +18 0.2 0.284921259 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +53 0.5888889 0.0433230847 0.25 0 0 0.4040404 ? 7th-8th Separated ? Not-in-family White Male United-States 0 +42 0.466666669 0.300355971 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +23 0.25555557 0.155467927 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +43 0.477777779 0.0329237133 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Other-relative White Female United-States 0 +47 0.5222222 0.113285132 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +53 0.5888889 0.127058238 0.1875 0 0 0.4040404 Local-gov 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 +28 0.311111122 0.09165255 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +28 0.311111122 0.080684714 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +44 0.4888889 0.226653114 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +58 0.644444466 0.125944883 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +25 0.2777778 0.147469029 0.25 0 0 0.323232323 ? 7th-8th Never-married ? Not-in-family White Female Mexico 0 +26 0.2888889 0.142408758 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Female United-States 0 +36 0.4 0.188703477 0.625 0.0345603451 0 0.08080808 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.07408677 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +39 0.433333337 0.193162277 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.06901035 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +17 0.188888893 0.19341217 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Female United-States 0 +39 0.433333337 0.133425161 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +52 0.5777778 0.08022536 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +24 0.266666681 0.1175055 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +26 0.2888889 0.189719841 0.6875 0 0 0.5555556 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +24 0.266666681 0.2544108 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Not-in-family White Female United-States 0 +32 0.355555564 0.101739407 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +49 0.544444442 0.125640452 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Protective-serv Husband White Male United-States 1 +20 0.222222224 0.100678585 0.625 0 0 0.25252524 ? Some-college Never-married ? Other-relative White Female United-States 0 +40 0.444444448 0.133664265 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +52 0.5777778 0.133941084 0.9375 0 0.5874656 0.6060606 Private Prof-school Divorced Exec-managerial Not-in-family White Male United-States 1 +33 0.366666675 0.119020954 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +19 0.211111113 0.111341983 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Machine-op-inspct Other-relative White Male United-States 0 +37 0.411111116 0.143468231 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male Japan 0 +21 0.233333334 0.0257633682 0.625 0 0 0.2020202 State-gov Some-college Never-married Tech-support Own-child White Female United-States 0 +33 0.366666675 0.08470437 0.625 0 0 0.363636374 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +28 0.311111122 0.100117534 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 +48 0.533333361 0.1841679 0.5625 0 0.3624885 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.140508056 0.8125 0 0 0.4040404 Private Bachelors Separated Tech-support Not-in-family White Male United-States 0 +32 0.355555564 0.129699171 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.123852886 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +47 0.5222222 0.164093882 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male South 0 +37 0.411111116 0.129152939 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +26 0.2888889 0.175979748 0.625 0 0 0.3030303 Private Some-college Separated Sales Other-relative Black Male United-States 0 +55 0.6111111 0.08554831 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +40 0.444444448 0.133305266 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Sales Unmarried White Female United-States 0 +31 0.344444454 0.1464668 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.0582950823 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +54 0.6 0.06604073 0.625 0 0 0.545454562 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.14542754 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Asian-Pac-Islander Male Philippines 0 +53 0.5888889 0.129980028 0.5625 0 0 0.858585835 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.225049421 0.75 0 0 0.7878788 Self-emp-not-inc Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 +42 0.466666669 0.0922647938 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.07867691 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.127380863 0.4375 0 0.3409091 0.5858586 Private 11th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +26 0.2888889 0.06038102 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +33 0.366666675 0.127989739 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +59 0.655555546 0.06684695 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +42 0.466666669 0.0387955867 0.5625 0 0 0.454545468 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 +25 0.2777778 0.134184241 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +58 0.644444466 0.09453932 0.5625 0 0 0.363636374 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +30 0.333333343 0.207995534 0.625 0 0 0.6060606 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +21 0.233333334 0.185505539 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Female United-States 0 +61 0.677777767 0.143679053 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +33 0.366666675 0.106248043 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +51 0.566666663 0.12279477 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 +70 0.7777778 0.1485743 0.625 0 0 0.121212125 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 0 +55 0.6111111 0.140526235 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +29 0.322222233 0.127531067 0.625 0.0220202189 0 0.5050505 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +46 0.51111114 0.0835661 0.875 0 0 0.444444448 Private Masters Widowed Prof-specialty Not-in-family White Female United-States 0 +35 0.3888889 0.0137865776 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Unmarried Asian-Pac-Islander Female Philippines 0 +31 0.344444454 0.1038772 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +37 0.411111116 0.07075076 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.0241866242 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.127434745 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +41 0.455555558 0.07846205 0.5625 0.135501355 0 0.444444448 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 +42 0.466666669 0.0132686291 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +26 0.2888889 0.0328132547 0.375 0.02907029 0 0.4040404 Private 10th Never-married Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.07147077 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.172601968 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.13638939 0.25 0 0 0.4040404 ? 7th-8th Separated ? Not-in-family White Male Guatemala 0 +38 0.422222227 0.08087398 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +28 0.311111122 0.08279221 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +68 0.75555557 0.0787382051 0.6875 0 0.493342519 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +42 0.466666669 0.149926081 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.0722716 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male India 0 +36 0.4 0.105340794 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +33 0.366666675 0.0359485559 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.0396819562 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.112587348 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +24 0.266666681 0.191153124 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +57 0.6333333 0.09458175 0.125 0 0 0.353535354 Private 1st-4th Married-spouse-absent Other-service Not-in-family White Male ? 0 +36 0.4 0.0416096151 0.5625 0.1502415 0 0.4040404 Local-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.0224354342 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.136431143 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Prof-specialty Own-child White Female United-States 0 +25 0.2777778 0.0409697555 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Female United-States 0 +53 0.5888889 0.103378117 0.625 0 0 0.5050505 State-gov Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +28 0.311111122 0.112841271 0.75 0 0 0.4040404 Local-gov Assoc-acdm Widowed Prof-specialty Unmarried White Male United-States 0 +30 0.333333343 0.249874562 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.133943781 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.11781735 0.625 0 0 0.4848485 Local-gov Some-college Divorced Protective-serv Unmarried White Male Germany 0 +30 0.333333343 0.118445083 0.875 0 0 0.3838384 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +41 0.455555558 0.11425031 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female ? 0 +29 0.322222233 0.0842989 0.625 0 0 0.363636374 ? Some-college Never-married ? Not-in-family Black Male ? 0 +31 0.344444454 0.148642331 0.625 0 0 0.8080808 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.107789092 0.5625 0.03908039 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.07872137 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male Greece 0 +33 0.366666675 0.0907500163 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.0549927428 0.5625 0 0.4331956 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +49 0.544444442 0.0822904259 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +50 0.5555556 0.04688743 0.375 0 0 0.565656543 Federal-gov 10th Separated Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.07551332 0.8125 0 0.43663913 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.201671049 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +81 0.900000036 0.109706648 0.5625 0 0 0.353535354 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +24 0.266666681 0.07601106 0.625 0 0 0.161616161 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +32 0.355555564 0.0225075018 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.151248232 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 +44 0.4888889 0.315689653 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 +24 0.266666681 0.240470678 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +37 0.411111116 0.0344566777 0.625 0.07298073 0 0.363636374 Local-gov Some-college Married-civ-spouse Tech-support Wife White Female United-States 1 +51 0.566666663 0.1254815 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +52 0.5777778 0.08604336 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +22 0.244444445 0.196258515 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.09298413 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Not-in-family Other Male United-States 0 +47 0.5222222 0.117553994 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.1352693 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.07318491 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +43 0.477777779 0.121899642 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +25 0.2777778 0.02344102 0.8125 0 0 0.2020202 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +59 0.655555546 0.05109904 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +29 0.322222233 0.105623007 0.75 0 0 0.353535354 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 +30 0.333333343 0.0412688069 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Wife White Female Portugal 0 +24 0.266666681 0.026824858 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Wife Other Female Puerto-Rico 0 +38 0.422222227 0.0875642 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +37 0.411111116 0.0541009828 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.217291653 0.0625 0 0.3946281 0.4040404 Private Preschool Married-spouse-absent Machine-op-inspct Not-in-family White Male Mexico 0 +30 0.333333343 0.09488013 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +73 0.811111152 0.122517273 0.875 0 0 0.1010101 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male Poland 1 +30 0.333333343 0.193915963 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +33 0.366666675 0.208546489 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +46 0.51111114 0.01901051 0.625 0 0 0.5858586 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +40 0.444444448 0.2886661 0.5625 0.0346403457 0 0.2020202 ? HS-grad Married-civ-spouse ? Wife Black Female United-States 0 +18 0.2 0.026417369 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Own-child White Male United-States 0 +35 0.3888889 0.241887107 0.8125 0.07298073 0 0.08080808 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female ? 1 +22 0.244444445 0.08235441 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +50 0.5555556 0.133629248 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 +62 0.6888889 0.04922931 0.25 0 0 0.4040404 ? 7th-8th Widowed ? Not-in-family Black Male United-States 0 +39 0.433333337 0.19083792 0.8125 0.07298073 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.140732333 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +33 0.366666675 0.234670192 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +31 0.344444454 0.255300552 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Asian-Pac-Islander Female Vietnam 0 +29 0.322222233 0.123854235 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +38 0.422222227 0.08618615 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +24 0.266666681 0.14220266 0.8125 0 0 0.353535354 Private Bachelors Never-married Sales Own-child White Female United-States 0 +29 0.322222233 0.126388073 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Protective-serv Other-relative White Female United-States 0 +49 0.544444442 0.06382009 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 +33 0.366666675 0.1561428 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +28 0.311111122 0.09615648 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +22 0.244444445 0.08541899 0.8125 0 0 0.6060606 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +37 0.411111116 0.126670957 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +30 0.333333343 0.191549838 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.0210594032 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.1087381 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male Columbia 0 +25 0.2777778 0.09731428 0.5625 0 0 0.4040404 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 +36 0.4 0.09002125 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.07548571 1 0 0 0.454545468 State-gov Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 +21 0.233333334 0.168199748 0.5625 0 0 0.222222224 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +18 0.2 0.111641034 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 +30 0.333333343 0.116401576 0.6875 0 0 0.4040404 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 0 +44 0.4888889 0.194269568 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +40 0.444444448 0.0224495772 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +43 0.477777779 0.113201618 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +45 0.5 0.1396082 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.0879770741 0.625 0 0 0.262626261 Private Some-college Married-spouse-absent Sales Own-child Asian-Pac-Islander Female India 0 +40 0.444444448 0.09176503 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +43 0.477777779 0.654913962 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +20 0.222222224 0.165215984 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.0479226522 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +19 0.211111113 0.07971416 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 +21 0.233333334 0.07894497 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +23 0.25555557 0.0808699355 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +24 0.266666681 0.0325606763 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family Black Female United-States 0 +52 0.5777778 0.05688066 0.6875 0 0 0.323232323 Private Assoc-voc Divorced Other-service Not-in-family White Male United-States 0 +51 0.566666663 0.0514829569 0.625 0 0 0.4040404 ? Some-college Divorced ? Unmarried White Female United-States 0 +19 0.211111113 0.189737365 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +54 0.6 0.08285215 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.0705385953 0.5625 0 0 0.4848485 Private HS-grad Divorced Machine-op-inspct Other-relative White Female United-States 0 +29 0.322222233 0.0741790459 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +17 0.188888893 0.125322536 0.375 0 0 0.1010101 Private 10th Never-married Tech-support Own-child White Male United-States 0 +47 0.5222222 0.1446092 0.5625 0 0 0.373737365 Private HS-grad Divorced Other-service Unmarried White Female Puerto-Rico 0 +46 0.51111114 0.2591727 0.8125 0 0 0.323232323 Private Bachelors Divorced Prof-specialty Unmarried Black Female United-States 0 +30 0.333333343 0.1184956 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +58 0.644444466 0.246731848 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +48 0.533333361 0.079959996 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family Black Female United-States 0 +23 0.25555557 0.148066461 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Own-child White Male Mexico 0 +23 0.25555557 0.118869409 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +45 0.5 0.1841679 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.12302848 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Black Male United-States 0 +26 0.2888889 0.142994061 0.25 0 0 0.4848485 Private 7th-8th Never-married Machine-op-inspct Own-child White Male United-States 0 +50 0.5555556 0.0902287 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 1 +49 0.544444442 0.111235566 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +26 0.2888889 0.1850361 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Other-relative White Male Nicaragua 0 +47 0.5222222 0.132488951 0.9375 0 0 0.4040404 Private Prof-school Divorced Adm-clerical Not-in-family White Male United-States 0 +31 0.344444454 0.1434642 0.5 0.046500463 0 0.5050505 Private 12th Never-married Sales Not-in-family White Male United-States 0 +19 0.211111113 0.0179294888 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +23 0.25555557 0.243469924 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband White Male ? 0 +35 0.3888889 0.100074425 0.5625 0 0.399449021 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.309279621 0.625 0 0.43663913 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.144600451 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Never-married Craft-repair Not-in-family White Male United-States 0 +58 0.644444466 0.194896638 0.625 0.07688077 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.1178059 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +50 0.5555556 0.234456688 0.375 0 0 0.5050505 Self-emp-not-inc 10th Divorced Sales Not-in-family White Female United-States 0 +30 0.333333343 0.070697546 0.3125 0 0 0.3030303 ? 9th Never-married ? Not-in-family White Female United-States 0 +31 0.344444454 0.02128369 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +31 0.344444454 0.1928208 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 +35 0.3888889 0.122384585 0.5625 0.03103031 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +33 0.366666675 0.160915464 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.0907500163 0.875 0.07688077 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +67 0.7444445 0.106016345 0.9375 0.06418064 0 0.1010101 ? Prof-school Married-civ-spouse ? Husband White Male United-States 1 +37 0.411111116 0.132975236 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +48 0.533333361 0.0318871439 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.0451827124 0.8125 0.0147101469 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Unmarried Asian-Pac-Islander Male Cambodia 0 +24 0.266666681 0.16835466 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +55 0.6111111 0.118503004 0.5625 0 0 0.4040404 Private HS-grad Divorced Priv-house-serv Not-in-family White Female France 0 +50 0.5555556 0.129980028 0.5625 0 0.4242424 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +40 0.444444448 0.141137138 0.8125 0 0.453856736 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.09609653 0.8125 0 0 0.3030303 Private Bachelors Never-married Handlers-cleaners Not-in-family White Male United-States 0 +51 0.566666663 0.128195837 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.132279485 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +41 0.455555558 0.112305142 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.117553994 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.1420262 0.25 0 0 0.5050505 Private 7th-8th Never-married Farming-fishing Own-child White Male ? 0 +37 0.411111116 0.0798044056 0.8125 0.049340494 0 0.323232323 Private Bachelors Separated Prof-specialty Unmarried White Female United-States 1 +40 0.444444448 0.09703409 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.07204394 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.119980738 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +38 0.422222227 0.1323859 0.9375 0 0 0.353535354 Private Prof-school Separated Prof-specialty Not-in-family White Male United-States 1 +40 0.444444448 0.271804839 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.335565656 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +47 0.5222222 0.129827142 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 +20 0.222222224 0.0361943953 0.625 0 0 0.6060606 ? Some-college Never-married ? Own-child White Male United-States 0 +33 0.366666675 0.1052007 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.1278382 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +66 0.733333349 0.1435632 0.625 0 0.418962359 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +35 0.3888889 0.120677851 0.5625 0 0 0.3838384 Self-emp-not-inc HS-grad Never-married Sales Unmarried Black Female Germany 0 +32 0.355555564 0.0522891767 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +23 0.25555557 0.127857044 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 +19 0.211111113 0.08566685 0.5625 0 0 0.151515156 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +44 0.4888889 0.117294014 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +20 0.222222224 0.09301983 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +44 0.4888889 0.18167448 0.8125 0 0 0.3030303 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +41 0.455555558 0.1533867 0.5625 0.0346403457 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +19 0.211111113 0.214737609 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative White Female United-States 0 +48 0.533333361 0.0329257324 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +45 0.5 0.138360143 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.11709936 0.25 0 0 0.424242437 Private 7th-8th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Cambodia 0 +34 0.377777785 0.136357054 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.104248993 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative Other Female United-States 0 +33 0.366666675 0.121607326 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 +30 0.333333343 0.119567186 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.186789975 0.625 0 0 0.323232323 Private Some-college Never-married Handlers-cleaners Own-child White Male Cuba 0 +34 0.377777785 0.07582921 0.375 0 0 0.3838384 Private 10th Divorced Other-service Unmarried White Female United-States 0 +48 0.533333361 0.05750907 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +32 0.355555564 0.0834987462 0.4375 0 0 0.4949495 ? 11th Divorced ? Not-in-family White Female United-States 0 +42 0.466666669 0.0464866757 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 +22 0.244444445 0.0760063455 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Asian-Pac-Islander Male United-States 0 +60 0.6666667 0.0356299728 0.5625 0 0 0.424242437 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.0255518779 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.03999448 0.8125 0 0 0.5555556 Private Bachelors Separated Exec-managerial Not-in-family White Female United-States 0 +47 0.5222222 0.0773015544 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Own-child White Female United-States 0 +29 0.322222233 0.145807415 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 +34 0.377777785 0.118857957 0.8125 0 0 0.3838384 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +34 0.377777785 0.119101778 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 1 +39 0.433333337 0.276172042 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +29 0.322222233 0.06308459 0.625 0 0 0.24242425 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +42 0.466666669 0.09714792 0.625 0 0 0.6060606 Self-emp-inc Some-college Never-married Sales Not-in-family White Male United-States 0 +48 0.533333361 0.162265912 0.4375 0 0 0.353535354 Private 11th Separated Other-service Not-in-family Black Female United-States 0 +53 0.5888889 0.4096329 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +51 0.566666663 0.163912028 0.625 0 0 0.454545468 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 +44 0.4888889 0.0236855131 0.8125 0 0 0.909090936 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +46 0.51111114 0.123024441 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.09612482 1 0.04787048 0 0.6060606 Private Doctorate Divorced Craft-repair Not-in-family White Female United-States 1 +32 0.355555564 0.18383719 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Female United-States 0 +22 0.244444445 0.147660986 0.5625 0 0.3677686 0.3030303 ? HS-grad Never-married ? Own-child Black Male United-States 0 +24 0.266666681 0.154027909 0.625 0 0 0.454545468 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +33 0.366666675 0.159505084 0.6875 0 0 0.262626261 Private Assoc-voc Never-married Prof-specialty Unmarried Black Female United-States 0 +47 0.5222222 0.0793861449 0.5625 0 0 0.909090936 Self-emp-not-inc HS-grad Married-AF-spouse Craft-repair Husband White Male United-States 0 +64 0.7111111 0.07175702 0.875 0 0 0.5050505 Self-emp-not-inc Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +62 0.6888889 0.1036509 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.128583789 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.128646433 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female Poland 0 +42 0.466666669 0.0599937364 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +38 0.422222227 0.160531551 0.8125 0.07688077 0 0.424242437 Federal-gov Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +55 0.6111111 0.174803749 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.127487957 0.5625 0 0 0.272727281 ? HS-grad Married-civ-spouse ? Not-in-family White Female United-States 0 +42 0.466666669 0.08923052 0.75 0 0 0.24242425 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.138518423 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female Thailand 1 +32 0.355555564 0.122800827 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.14565587 0.5625 0.0346403457 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +50 0.5555556 0.112088934 0.4375 0.0367403664 0 0.4040404 Federal-gov 11th Never-married Sales Not-in-family Black Female United-States 0 +27 0.3 0.102542929 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Asian-Pac-Islander Male Philippines 0 +47 0.5222222 0.1048417 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.104531206 0.3125 0 0 0.353535354 Private 9th Divorced Machine-op-inspct Not-in-family White Male United-States 0 +48 0.533333361 0.06798051 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +23 0.25555557 0.109749079 0.25 0 0 0.353535354 Private 7th-8th Never-married Other-service Own-child White Male United-States 0 +31 0.344444454 0.22519356 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.122311845 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +61 0.677777767 0.0902327448 0.5625 0 0 0.6363636 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male South 0 +50 0.5555556 0.1415884 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Unmarried Black Male United-States 0 +49 0.544444442 0.114306211 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male Germany 1 +57 0.6333333 0.202130392 0.1875 0.07298073 0 0.8484849 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 1 +19 0.211111113 0.182878762 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Other-relative Asian-Pac-Islander Male United-States 0 +18 0.2 0.0345220119 0.4375 0 0 0.151515156 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +44 0.4888889 0.0179624911 0.75 0 0 1 Self-emp-not-inc Assoc-acdm Married-civ-spouse Other-service Wife White Female United-States 0 +54 0.6 0.131056339 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.119871624 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +27 0.3 0.21259442 0.875 0 0 0.2020202 State-gov Masters Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male China 0 +50 0.5555556 0.09221563 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +43 0.477777779 0.1555602 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.112522021 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Male United-States 0 +47 0.5222222 0.080912374 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +21 0.233333334 0.163916737 0.0625 0 0 0.5050505 Private Preschool Never-married Farming-fishing Not-in-family White Male Mexico 0 +30 0.333333343 0.115764417 0.9375 0 0 0.454545468 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 +19 0.211111113 0.09218397 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +40 0.444444448 0.2133892 0.625 0 0.3409091 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +55 0.6111111 0.124913029 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +67 0.7444445 0.0550688542 0.5625 0 0 0.2020202 ? HS-grad Divorced ? Own-child White Male United-States 0 +31 0.344444454 0.0294442344 0.6875 0 0 0.434343427 Private Assoc-voc Divorced Machine-op-inspct Unmarried White Male United-States 0 +30 0.333333343 0.148810029 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 0 +54 0.6 0.100125618 0.0625 0 0 0.4040404 ? Preschool Married-civ-spouse ? Wife White Female Mexico 0 +51 0.566666663 0.027485596 0.8125 0 0 0.434343427 Federal-gov Bachelors Never-married Prof-specialty Not-in-family Amer-Indian-Eskimo Female United-States 0 +34 0.377777785 0.123575389 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Own-child White Female United-States 0 +59 0.655555546 0.0730758 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.137965456 0.5625 0 0 0.3838384 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +29 0.322222233 0.0893686 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 +17 0.188888893 0.07941376 0.375 0 0 0.4040404 State-gov 10th Never-married Farming-fishing Own-child White Male United-States 0 +24 0.266666681 0.205014467 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +52 0.5777778 0.167112663 0.0625 0 0 0.4040404 ? Preschool Married-spouse-absent ? Other-relative White Male Mexico 0 +39 0.433333337 0.111278 0.875 0 0.43663913 0.181818187 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +18 0.2 0.145121768 0.5 0 0 0.25252524 ? 12th Never-married ? Own-child White Female United-States 0 +32 0.355555564 0.174929708 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Unmarried Black Male Nicaragua 0 +25 0.2777778 0.0241320673 0.625 0 0 0.5050505 ? Some-college Divorced ? Unmarried White Female United-States 0 +34 0.377777785 0.167572 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +44 0.4888889 0.08398436 0.5625 0 0.43663913 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.0862487853 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +39 0.433333337 0.121055029 0.875 0 0.5544077 0.656565666 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 +32 0.355555564 0.07647513 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.169833735 0.625 0 0 0.282828271 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +45 0.5 0.0309091713 0.625 0 0 0.424242437 Federal-gov Some-college Divorced Adm-clerical Unmarried White Male United-States 0 +30 0.333333343 0.075613 0.4375 0 0 0.4040404 Private 11th Divorced Handlers-cleaners Own-child White Male United-States 0 +20 0.222222224 0.0321888849 0.5 0 0 0.1010101 Private 12th Divorced Other-service Not-in-family White Female United-States 0 +41 0.455555558 0.136714026 0.5625 0 0 0.04040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Peru 0 +21 0.233333334 0.0235184766 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 +48 0.533333361 0.0614606962 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 +31 0.344444454 0.08957739 0.5625 0.05178052 0 0.454545468 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.206246361 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +25 0.2777778 0.13711141 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried Black Male United-States 0 +41 0.455555558 0.239723042 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Separated Craft-repair Not-in-family White Male United-States 0 +35 0.3888889 0.133926272 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.190586016 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +34 0.377777785 0.210275441 0.5625 0 0 0.75757575 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male Mexico 1 +44 0.4888889 0.06653106 0.375 0.04386044 0 0.6060606 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +32 0.355555564 0.134872586 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.123102568 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Male United-States 0 +23 0.25555557 0.134644926 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.115917981 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family Other Male India 1 +53 0.5888889 0.0237724 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Never-married Sales Unmarried White Male United-States 1 +27 0.3 0.146061346 1 0 0 0.5252525 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.2237394 0.8125 0 0 0.656565666 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +57 0.6333333 0.171824709 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +17 0.188888893 0.0749859437 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 +59 0.655555546 0.1605915 0.5625 0 0 0.3838384 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.08860481 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +30 0.333333343 0.07424977 0.375 0 0 0.5555556 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.172310323 0.75 0 0 0.454545468 State-gov Assoc-acdm Never-married Adm-clerical Own-child Black Female United-States 0 +18 0.2 0.118304983 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child White Male United-States 0 +23 0.25555557 0.0559020154 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +19 0.211111113 0.110675186 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +20 0.222222224 0.17747499 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Own-child White Male United-States 0 +52 0.5777778 0.1093692 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 +39 0.433333337 0.154677868 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.240686208 0.5625 0 0 0.5050505 Private HS-grad Separated Other-service Unmarried White Female United-States 0 +19 0.211111113 0.1816233 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +38 0.422222227 0.05582254 0.8125 0 0 0.151515156 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +19 0.211111113 0.262513429 0.5625 0 0 0.161616161 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +34 0.377777785 0.13143082 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +41 0.455555558 0.139883012 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male ? 0 +23 0.25555557 0.150147676 0.5625 0.02105021 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Own-child White Female United-States 0 +24 0.266666681 0.132274091 0.75 0 0 0.121212125 ? Assoc-acdm Never-married ? Not-in-family White Male United-States 0 +24 0.266666681 0.0339064 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.14422664 0.375 0 0 0.8484849 Private 10th Never-married Transport-moving Not-in-family Amer-Indian-Eskimo Male United-States 0 +45 0.5 0.07680448 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.129354313 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.161803856 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 +42 0.466666669 0.0299062785 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.12898387 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.110143095 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 +51 0.566666663 0.09215501 0.5625 0 0 0.323232323 Local-gov HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +59 0.655555546 0.08211194 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.0394852869 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Transport-moving Own-child White Male United-States 0 +27 0.3 0.04987927 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +29 0.322222233 0.09716341 0.8125 0.04386044 0 0.8080808 Private Bachelors Married-civ-spouse Handlers-cleaners Husband Black Male ? 1 +57 0.6333333 0.122602135 0.75 0 0 0.353535354 Private Assoc-acdm Widowed Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.140795648 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +31 0.344444454 0.138779089 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +23 0.25555557 0.122916006 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Own-child White Male United-States 0 +42 0.466666669 0.124642268 0.5625 0 0 0.353535354 Private HS-grad Separated Adm-clerical Unmarried White Female Scotland 0 +60 0.6666667 0.09932815 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +53 0.5888889 0.149337411 0.875 0.143441439 0 0.5050505 Local-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 1 +20 0.222222224 0.261877626 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +27 0.3 0.149465382 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +31 0.344444454 0.0324569531 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.257473379 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +22 0.244444445 0.0325633734 0.8125 0 0 0.4040404 Private Bachelors Never-married Farming-fishing Own-child White Male United-States 0 +42 0.466666669 0.0963464156 0.8125 0 0.359045 0.3838384 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +63 0.7 0.09290735 0.9375 0.1502415 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.16809468 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +79 0.8777778 0.08171186 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +39 0.433333337 0.151229367 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.124616675 0.5 0 0 0.4040404 Private 12th Never-married Other-service Not-in-family Other Male United-States 0 +60 0.6666667 0.0187821835 0.25 0 0 0.4040404 Private 7th-8th Divorced Other-service Not-in-family White Male United-States 0 +58 0.644444466 0.06381133 0.5 0 0 0.24242425 Private 12th Married-civ-spouse Other-service Wife White Female United-States 0 +20 0.222222224 0.07260769 0.75 0 0.506198347 0.181818187 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 +44 0.4888889 0.128817514 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +47 0.5222222 0.173008114 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.132785976 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +37 0.411111116 0.210325286 0.875 0 0 0.656565666 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 0 +21 0.233333334 0.0799195841 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Other-relative White Male United-States 0 +68 0.75555557 0.151099384 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Exec-managerial Not-in-family White Female United-States 0 +43 0.477777779 0.163324028 0.625 0.0501305 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +23 0.25555557 0.1582604 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Black Female United-States 0 +23 0.25555557 0.153508618 0.5625 0 0 0.333333343 Private HS-grad Never-married Craft-repair Unmarried White Female United-States 0 +40 0.444444448 0.0712040439 0.875 0 0.430670351 0.353535354 Local-gov Masters Never-married Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.108413458 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Sales Own-child White Female United-States 0 +34 0.377777785 0.238351062 0.6875 0.03103031 0 0.6060606 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 1 +22 0.244444445 0.127264336 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +38 0.422222227 0.135601357 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.147287175 0.625 0 0 0.4949495 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +23 0.25555557 0.124102093 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +39 0.433333337 0.135358885 0.625 0 0 0.454545468 Federal-gov Some-college Married-civ-spouse Adm-clerical Other-relative White Male United-States 1 +26 0.2888889 0.06887833 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +24 0.266666681 0.202453688 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 +22 0.244444445 0.140732333 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +36 0.4 0.07073527 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +20 0.222222224 0.0840241 0.625 0 0 0.2020202 Private Some-college Never-married Priv-house-serv Own-child White Female United-States 0 +18 0.2 0.184586838 0.4375 0 0 0.08080808 Private 11th Never-married Other-service Own-child Black Male United-States 0 +38 0.422222227 0.08949859 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.175765559 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Divorced Farming-fishing Not-in-family White Male United-States 0 +56 0.622222245 0.14037469 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family Black Male ? 0 +42 0.466666669 0.240407363 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.104000457 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.0238283034 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +73 0.811111152 0.202875316 0.125 0 0.398301184 0.2020202 Private 1st-4th Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.04958628 0.625 0 0 0.424242437 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +37 0.411111116 0.07283602 0.875 0.1502415 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +66 0.733333349 0.146290347 0.5625 0 0 0.1010101 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +22 0.244444445 0.105968527 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +51 0.566666663 0.136697859 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +31 0.344444454 0.116854869 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +65 0.722222269 0.100902878 0.5625 0 0.5064279 0.5959596 Private HS-grad Divorced Adm-clerical Unmarried White Female Canada 0 +39 0.433333337 0.2991968 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Wife Black Female United-States 0 +48 0.533333361 0.08427264 0.625 0 0 0.373737365 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +20 0.222222224 0.1282605 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +28 0.311111122 0.128175631 0.75 0 0 0.4040404 ? Assoc-acdm Never-married ? Other-relative White Male United-States 0 +48 0.533333361 0.167147011 0.8125 0.04386044 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +29 0.322222233 0.140454844 0.9375 0 0 0.8080808 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +36 0.4 0.231507942 1 0 0 0.3030303 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Male ? 1 +35 0.3888889 0.132263988 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.29217118 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +48 0.533333361 0.08222913 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +36 0.4 0.09248571 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 +40 0.444444448 0.0222724378 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +57 0.6333333 0.141905636 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +26 0.2888889 0.07936459 0.8125 0.0486504845 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.0696933046 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Own-child White Female United-States 0 +65 0.722222269 0.0780491754 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.157561943 0.375 0 0 0.323232323 Self-emp-not-inc 10th Never-married Prof-specialty Not-in-family White Female United-States 0 +42 0.466666669 0.0355498232 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +47 0.5222222 0.395133734 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male Japan 1 +62 0.6888889 0.07616328 0.25 0 0 0.4040404 Private 7th-8th Divorced Craft-repair Own-child White Male United-States 0 +27 0.3 0.169666708 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Exec-managerial Own-child White Male United-States 0 +76 0.844444454 0.152194545 0.625 0 0 0.08080808 Self-emp-not-inc Some-college Widowed Sales Not-in-family White Male United-States 0 +20 0.222222224 0.130730346 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +29 0.322222233 0.177699283 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +29 0.322222233 0.08967169 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 1 +32 0.355555564 0.08192469 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Own-child White Male Mexico 0 +22 0.244444445 0.02745798 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.239636168 0.5625 0 0 0.5050505 Federal-gov HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 +43 0.477777779 0.210084841 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +23 0.25555557 0.0614189357 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 +44 0.4888889 0.231736273 0.9375 0 0 0.4040404 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.07666372 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Not-in-family White Male United-States 0 +49 0.544444442 0.125142708 0.875 0.07430074 0 0.4040404 State-gov Masters Divorced Prof-specialty Unmarried Black Female United-States 1 +30 0.333333343 0.0512606874 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 1 +23 0.25555557 0.07921978 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +39 0.433333337 0.1603066 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Own-child White Female United-States 0 +32 0.355555564 0.09192399 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.192092031 0.625 0 0.4331956 0.353535354 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.236437544 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female Puerto-Rico 0 +35 0.3888889 0.826145947 0.8125 0 0 0.5252525 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.131855831 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +25 0.2777778 0.126314655 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +40 0.444444448 0.05345978 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +30 0.333333343 0.152666688 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +52 0.5777778 0.143603608 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +49 0.544444442 0.142119139 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +24 0.266666681 0.0647792 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +46 0.51111114 0.221064791 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.0745690241 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.151852384 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.107703552 0.8125 0 0.288797051 0.3838384 Local-gov Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 +43 0.477777779 0.07968452 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.12144433 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried White Female United-States 0 +62 0.6888889 0.0266921725 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +48 0.533333361 0.1844326 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 +56 0.622222245 0.115895756 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried Black Female Jamaica 0 +28 0.311111122 0.147427946 0.5625 0 0 0.353535354 Private HS-grad Never-married Farming-fishing Unmarried White Female United-States 0 +23 0.25555557 0.447678179 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +43 0.477777779 0.140869066 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +26 0.2888889 0.056993816 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.301302969 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +55 0.6111111 0.0255060773 1 0 0 0.6060606 Local-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 +48 0.533333361 0.06673784 0.8125 0 0 0.5050505 State-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +43 0.477777779 0.096707426 0.1875 0 0.488751143 0.727272749 Private 5th-6th Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female ? 0 +38 0.422222227 0.220169 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.122418262 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +56 0.622222245 0.167957947 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-spouse-absent Exec-managerial Not-in-family White Male United-States 0 +39 0.433333337 0.219841659 0.875 0 0 0.4040404 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +46 0.51111114 0.3399497 0.1875 0 0 0.5050505 Private 5th-6th Separated Handlers-cleaners Not-in-family White Male Mexico 0 +36 0.4 0.05992234 0.4375 0 0 0.656565666 Private 11th Never-married Transport-moving Unmarried Amer-Indian-Eskimo Male United-States 0 +42 0.466666669 0.114986479 0.5625 0 0.459595948 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.100324981 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +17 0.188888893 0.230855286 0.4375 0 0 0.2020202 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +57 0.6333333 0.148764238 0.25 0 0 0.4040404 Private 7th-8th Widowed Machine-op-inspct Unmarried Black Female United-States 0 +73 0.811111152 0.0199871361 0.5625 0 0 0.121212125 Private HS-grad Widowed Other-service Other-relative White Female United-States 0 +50 0.5555556 0.123668343 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +35 0.3888889 0.07760128 0.625 0 0 0.454545468 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +27 0.3 0.102532826 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +24 0.266666681 0.0278546922 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Female United-States 0 +27 0.3 0.1516409 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +23 0.25555557 0.08170849 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 +25 0.2777778 0.090806596 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +51 0.566666663 0.209704965 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.06877191 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Adm-clerical Wife White Female United-States 0 +47 0.5222222 0.28763628 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Husband White Male Mexico 0 +40 0.444444448 0.07938278 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Male United-States 0 +58 0.644444466 0.1925534 0.3125 0 0 0.4040404 Private 9th Divorced Other-service Unmarried White Female United-States 0 +25 0.2777778 0.143328145 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +29 0.322222233 0.131247625 0.5625 0 0 0.181818187 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +36 0.4 0.021174578 0.4375 0 0 0.434343427 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +46 0.51111114 0.09985418 0.5625 0 0 0.6060606 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +69 0.7666667 0.07613297 0.125 0 0 0.04040404 Private 1st-4th Widowed Priv-house-serv Not-in-family Black Female United-States 0 +69 0.7666667 0.07179541 0.5625 0.0184801836 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.097339876 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 +20 0.222222224 0.116004191 0.5625 0 0 0.4848485 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +54 0.6 0.0832434744 0.5625 0.0388703868 0 0.353535354 State-gov HS-grad Separated Adm-clerical Unmarried Black Female United-States 0 +25 0.2777778 0.129265413 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +64 0.7111111 0.159882948 0.5625 0.0347103477 0 0.4040404 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +17 0.188888893 0.140407026 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 +53 0.5888889 0.0464637764 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +50 0.5555556 0.0150992963 0.3125 0 0 0.5050505 Private 9th Divorced Transport-moving Not-in-family White Male United-States 0 +57 0.6333333 0.109817781 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +51 0.566666663 0.103636749 0.625 0 0.597566545 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.08416083 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 +47 0.5222222 0.133159116 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.112086244 0.5625 0 0 0.5252525 Private HS-grad Never-married Transport-moving Unmarried White Male United-States 0 +50 0.5555556 0.07827212 0.9375 0 0 0.5252525 State-gov Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.0226603951 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +43 0.477777779 0.0224495772 0.9375 0 0.453856736 0.7070707 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.0491808131 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +54 0.6 0.11394991 0.5625 0 0 0.3838384 Private HS-grad Separated Adm-clerical Unmarried White Female Puerto-Rico 0 +53 0.5888889 0.0137656983 0.625 0 0 0.151515156 Private Some-college Separated Exec-managerial Unmarried Amer-Indian-Eskimo Female United-States 0 +21 0.233333334 0.07400056 0.5625 0 0 0.3030303 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +58 0.644444466 0.213408723 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +30 0.333333343 0.140124142 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +61 0.677777767 0.103582866 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +56 0.622222245 0.103354543 0.625 0 0 0.353535354 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +59 0.655555546 0.06522508 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +72 0.8 0.129811645 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +33 0.366666675 0.140836731 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +46 0.51111114 0.09895501 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +46 0.51111114 0.129536167 0.625 0 0 0.3838384 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +48 0.533333361 0.146169782 0.5625 0 0 0.282828271 Private HS-grad Never-married Prof-specialty Unmarried Black Female United-States 0 +33 0.366666675 0.133501947 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +21 0.233333334 0.14985469 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 +27 0.3 0.0719051957 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +31 0.344444454 0.3780778 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +28 0.311111122 0.1372057 0.8125 0 0 0.4040404 Private Bachelors Never-married Machine-op-inspct Not-in-family White Male United-States 0 +45 0.5 0.136944383 0.625 0 0 0.3838384 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +51 0.566666663 0.08331823 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +46 0.51111114 0.210152864 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +25 0.2777778 0.141056985 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Sales Husband White Male El-Salvador 0 +61 0.677777767 0.1551096 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +17 0.188888893 0.07706582 0.4375 0 0 0.3030303 Private 11th Never-married Sales Own-child White Female United-States 0 +26 0.2888889 0.080984436 0.8125 0.0332503319 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +35 0.3888889 0.0676060244 0.375 0 0 0.6060606 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.0286151133 0.4375 0 0 0.7070707 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.0879770741 0.5 0 0 0.333333343 Private 12th Married-civ-spouse Sales Wife Asian-Pac-Islander Female ? 0 +39 0.433333337 0.09050081 0.5625 0 0 0.353535354 Local-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.09907625 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +35 0.3888889 0.0243913773 0.8125 0.04386044 0 0.474747479 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.08075948 0.5625 0 0 0.5050505 Private HS-grad Divorced Tech-support Not-in-family White Female United-States 1 +47 0.5222222 0.0712458044 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Sales Own-child White Male United-States 1 +64 0.7111111 0.111146659 0.4375 0 0 0.4848485 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.12601696 0.9375 0.1502415 0 0.474747479 Private Prof-school Married-civ-spouse Exec-managerial Wife White Female United-States 1 +43 0.477777779 0.0956621 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried White Female United-States 0 +34 0.377777785 0.162564278 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male ? 0 +62 0.6888889 0.08171253 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.10209436 0.625 0.1502415 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.109497845 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.0241913386 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +56 0.622222245 0.0240606721 0.25 0 0 0.5050505 Self-emp-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.131186336 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +33 0.366666675 0.0418635346 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family Black Male United-States 0 +45 0.5 0.129455343 0.625 0 0.3409091 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.11744421 0.625 0 0 0.5555556 Private Some-college Separated Sales Not-in-family White Male United-States 0 +26 0.2888889 0.108443767 0.6875 0 0 0.8080808 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +24 0.266666681 0.182202533 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female Mexico 0 +43 0.477777779 0.110356607 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +40 0.444444448 0.1305862 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Own-child White Male United-States 0 +61 0.677777767 0.10779044 0.25 0 0 0.353535354 Private 7th-8th Divorced Other-service Not-in-family White Male United-States 0 +34 0.377777785 0.12793383 0.625 0 0 0.727272749 Federal-gov Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 +85 0.9444445 0.0777016357 0.5625 0 0 0.353535354 Private HS-grad Widowed Sales Unmarried White Male United-States 0 +41 0.455555558 0.109903313 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.127230659 0.75 0.0332503319 0 0.353535354 State-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.144405127 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 +60 0.6666667 0.105486274 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried Black Female United-States 0 +29 0.322222233 0.137981623 0.75 0 0 0.363636374 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 +34 0.377777785 0.0376647227 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +35 0.3888889 0.116167858 0.8125 0.0297702979 0 0.454545468 State-gov Bachelors Never-married Exec-managerial Not-in-family Asian-Pac-Islander Female United-States 0 +24 0.266666681 0.103106007 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +45 0.5 0.131620765 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family Black Male United-States 0 +21 0.233333334 0.186461285 0.5 0 0 0.2020202 Local-gov 12th Never-married Other-service Own-child Black Male United-States 0 +30 0.333333343 0.06596126 0.75 0 0.3409091 0.373737365 Private Assoc-acdm Married-civ-spouse Transport-moving Wife White Female United-States 1 +50 0.5555556 0.08021729 0.625 0 0 1 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.0561801866 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.134027973 0.5625 0 0 0.333333343 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +45 0.5 0.227536783 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.129319966 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.127531067 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 +19 0.211111113 0.156234413 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male United-States 0 +26 0.2888889 0.110788338 0.8125 0.135501355 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +48 0.533333361 0.13502413 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 +69 0.7666667 0.154186189 0.8125 0 0.5238751 0.4040404 Private Bachelors Widowed Prof-specialty Not-in-family White Male United-States 1 +41 0.455555558 0.124500155 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.157506719 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.336094379 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male Mexico 0 +65 0.722222269 0.0847090855 0.625 0 0 0.282828271 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.171753988 0.8125 0 0.3996786 0.3838384 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +28 0.311111122 0.1061652 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +51 0.566666663 0.0988526344 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.07967307 0.625 0 0 0.8080808 Private Some-college Never-married Craft-repair Not-in-family White Female United-States 0 +43 0.477777779 0.2109382 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Other-relative Black Male United-States 0 +31 0.344444454 0.05919762 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +31 0.344444454 0.15251717 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.0546452 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Other-relative Asian-Pac-Islander Male Philippines 0 +20 0.222222224 0.1457771 0.8125 0 0 0.3030303 Private Bachelors Never-married Sales Other-relative Black Female United-States 0 +25 0.2777778 0.143740341 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Unmarried White Male United-States 0 +36 0.4 0.120803796 0.5625 0 0 0.3030303 Private HS-grad Widowed Handlers-cleaners Unmarried White Female United-States 0 +31 0.344444454 0.2490899 0.8125 0.04101041 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +56 0.622222245 0.134547263 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.161237419 0.8125 0 0 0.181818187 Private Bachelors Never-married Sales Own-child White Male United-States 0 +47 0.5222222 0.116934344 0.625 0 0 0.656565666 Self-emp-not-inc Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +40 0.444444448 0.0255060773 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.203976557 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +34 0.377777785 0.05739726 0.875 0 0 0.24242425 State-gov Masters Never-married Prof-specialty Unmarried Black Female United-States 0 +37 0.411111116 0.03251016 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.117173448 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.047808826 0.6875 0 0 0.161616161 Private Assoc-voc Never-married Other-service Own-child Asian-Pac-Islander Male United-States 0 +49 0.544444442 0.112383947 0.3125 0 0 0.4040404 Private 9th Divorced Handlers-cleaners Not-in-family White Female United-States 0 +18 0.2 0.17255348 0.5625 0 0 0.25252524 ? HS-grad Never-married ? Own-child Black Female United-States 0 +26 0.2888889 0.109699912 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 +82 0.9111111 0.102476925 0.25 0 0 0.02020202 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +40 0.444444448 0.09375129 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.5328224 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +23 0.25555557 0.09241836 0.5625 0 0 0.373737365 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 +19 0.211111113 0.12343058 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +67 0.7444445 0.103747882 0.5625 0 0 0.323232323 Private HS-grad Widowed Handlers-cleaners Other-relative Black Male United-States 0 +43 0.477777779 0.07767402 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.1434999 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Adm-clerical Not-in-family Other Female United-States 0 +37 0.411111116 0.10444095 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +20 0.222222224 0.0225977562 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +40 0.444444448 0.1144975 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +47 0.5222222 0.11333026 0.875 1 0 0.5050505 Private Masters Separated Exec-managerial Not-in-family White Male United-States 1 +40 0.444444448 0.0701796 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +39 0.433333337 0.07681998 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +24 0.266666681 0.184816509 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +78 0.8666667 0.01884482 0.5625 0.0222802218 0 0.323232323 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +67 0.7444445 0.164424583 0.6875 0 0 0.01010101 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 +49 0.544444442 0.132397354 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +66 0.733333349 0.06843582 0.5625 0 0 0.1010101 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +52 0.5777778 0.08224462 0.5625 0 0.0741506 0.4040404 Private HS-grad Never-married Prof-specialty Unmarried White Female United-States 0 +59 0.655555546 0.172304943 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +72 0.8 0.131463155 0.5625 0 0 0.121212125 Private HS-grad Widowed Priv-house-serv Unmarried White Female Cuba 0 +35 0.3888889 0.1652665 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +30 0.333333343 0.11422 0.8125 0 0 0.4040404 Private Bachelors Married-AF-spouse Exec-managerial Wife White Female United-States 1 +36 0.4 0.151229367 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +26 0.2888889 0.125379115 0.5625 0 0 0.4040404 Private HS-grad Separated Tech-support Own-child White Female United-States 0 +23 0.25555557 0.07994383 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +39 0.433333337 0.200342163 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.08433056 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +29 0.322222233 0.264876872 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +38 0.422222227 0.07283602 0.8125 0 0 0.2020202 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +63 0.7 0.178465083 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +58 0.644444466 0.214255363 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.105088219 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +38 0.422222227 0.100663096 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 +25 0.2777778 0.2424623 0.1875 0 0 0.333333343 Private 5th-6th Never-married Adm-clerical Not-in-family White Female Mexico 0 +44 0.4888889 0.111205935 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.0775763541 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 1 +21 0.233333334 0.100507513 0.625 0 0 0.3030303 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +41 0.455555558 0.23712185 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 0 +38 0.422222227 0.117677927 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +75 0.8333334 0.116564572 0.8125 0 0 0.0606060624 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +29 0.322222233 0.09951809 0.625 0 0.3838384 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.09140941 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +47 0.5222222 0.029781 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +28 0.311111122 0.0251625758 0.6875 1 0 0.5050505 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.120060891 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Priv-house-serv Wife White Female ? 0 +30 0.333333343 0.0475629866 0.875 0 0 0.1010101 State-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 0 +30 0.333333343 0.104364172 0.625 0.1502415 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.240407363 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Male United-States 1 +27 0.3 0.183008745 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 +26 0.2888889 0.166379854 0.5625 0 0 0.444444448 Private HS-grad Never-married Protective-serv Unmarried White Male United-States 0 +32 0.355555564 0.07234906 0.5625 0 0 0.373737365 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +36 0.4 0.07850314 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.6177793 0.5 0 0 0.4040404 Private 12th Never-married Transport-moving Own-child Black Male United-States 0 +25 0.2777778 0.2896764 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family Black Male United-States 0 +39 0.433333337 0.136685073 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Female Poland 0 +27 0.3 0.042255532 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +24 0.266666681 0.342524618 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +38 0.422222227 0.185372189 0.8125 0.07688077 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.2572437 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +29 0.322222233 0.1663455 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 +49 0.544444442 0.07101142 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 +36 0.4 0.09854551 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.107677288 1 0 0 0.5050505 Self-emp-not-inc Doctorate Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.137832776 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +35 0.3888889 0.0446533151 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female Philippines 1 +38 0.422222227 0.153306559 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +66 0.733333349 0.0725693 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +45 0.5 0.242737114 0.875 0 0.43663913 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.177368566 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 +18 0.2 0.095586665 0.5625 0 0 0.222222224 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +37 0.411111116 0.198215812 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 0 +49 0.544444442 0.0867081359 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 +33 0.366666675 0.344370782 0.6875 0 0 0.4848485 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 +27 0.3 0.203680873 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +34 0.377777785 0.0683752 0.625 0 0 0.353535354 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +54 0.6 0.108664013 0.875 0 0 0.4040404 State-gov Masters Married-spouse-absent Prof-specialty Not-in-family Asian-Pac-Islander Female China 0 +24 0.266666681 0.1273977 0.625 0 0 0.4040404 Self-emp-inc Some-college Never-married Transport-moving Own-child White Male United-States 0 +44 0.4888889 0.0694488138 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.03476785 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Separated Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.0212877318 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +29 0.322222233 0.0230968446 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +21 0.233333334 0.07266225 0.75 0 0 0.09090909 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 +18 0.2 0.026624145 0.5 0 0 0.323232323 Private 12th Never-married Other-service Own-child White Female United-States 0 +18 0.2 0.09113932 0.3125 0 0 0.323232323 Private 9th Never-married Sales Own-child Other Female United-States 0 +29 0.322222233 0.0726151 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +29 0.322222233 0.154730409 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +41 0.455555558 0.0753624439 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Other-relative Black Female United-States 0 +32 0.355555564 0.229619354 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +61 0.677777767 0.136695176 0.375 0 0 0.24242425 Private 10th Divorced Other-service Not-in-family Black Female United-States 0 +79 0.8777778 0.2244419 0.5625 0 0 0.0606060624 Private HS-grad Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 +34 0.377777785 0.07742616 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Machine-op-inspct Not-in-family White Male United-States 0 +46 0.51111114 0.107677288 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.0389020033 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +29 0.322222233 0.139464751 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.130052775 0.625 0.0367403664 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +64 0.7111111 0.101948872 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +70 0.7777778 0.05970075 0.875 0.07896079 0 0.5050505 Local-gov Masters Never-married Prof-specialty Unmarried White Female United-States 1 +28 0.311111122 0.205401078 0.75 0 0.454545438 0.4040404 Local-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +51 0.566666663 0.0692582056 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male Greece 0 +20 0.222222224 0.141461775 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +34 0.377777785 0.10389 0.8125 0.0486504845 0 0.5555556 State-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +29 0.322222233 0.09599146 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +49 0.544444442 0.0703540444 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Other-service Not-in-family Asian-Pac-Islander Male Philippines 0 +77 0.8555556 0.129473537 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.1970708 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +27 0.3 0.222355291 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 +22 0.244444445 0.03442502 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +35 0.3888889 0.173796818 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male Cuba 1 +42 0.466666669 0.126820475 0.8125 0 0.43663913 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +35 0.3888889 0.235107988 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 +62 0.6888889 0.1287717 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +33 0.366666675 0.0899188742 0.5625 0.0263502635 0 0.161616161 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +45 0.5 0.09867078 0.625 0 0 0.5555556 Private Some-college Widowed Exec-managerial Unmarried White Female United-States 0 +19 0.211111113 0.1619635 0.625 0 0.3677686 0.4040404 Private Some-college Married-spouse-absent Sales Own-child White Female United-States 0 +38 0.422222227 0.117949359 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +26 0.2888889 0.280578971 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +29 0.322222233 0.170952484 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +33 0.366666675 0.10725835 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.06901775 0.5625 0 0 0.8080808 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male Puerto-Rico 0 +42 0.466666669 0.143775359 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.142767757 0.6875 0 0 0.2020202 Private Assoc-voc Never-married Other-service Own-child White Female United-States 0 +43 0.477777779 0.02156388 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +69 0.7666667 0.3455178 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Prof-specialty Husband Black Male United-States 0 +39 0.433333337 0.0909406245 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +37 0.411111116 0.07350484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Portugal 0 +28 0.311111122 0.09612145 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.0517948 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +32 0.355555564 0.07555441 0.625 0 0 0.3030303 Private Some-college Divorced Sales Own-child White Male United-States 0 +43 0.477777779 0.176622972 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +49 0.544444442 0.08221566 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male Hungary 0 +28 0.311111122 0.131130427 0.25 0 0 0.6060606 Private 7th-8th Separated Other-service Own-child White Male Mexico 0 +35 0.3888889 0.206558213 0.5625 0.0288502872 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.146674931 0.625 0.005940059 0 0.1010101 ? Some-college Never-married ? Own-child White Female United-States 0 +35 0.3888889 0.2080851 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +57 0.6333333 0.0314533859 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +45 0.5 0.25443238 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +23 0.25555557 0.1488464 0.5625 0 0.365013778 0.4848485 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +45 0.5 0.0687995255 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.07662802 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +35 0.3888889 0.0936293751 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Vietnam 0 +45 0.5 0.100289285 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.221879765 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +64 0.7111111 0.122184545 0.6875 0 0 0.1010101 Self-emp-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.06866684 0.9375 0 0 0.4040404 Local-gov Prof-school Separated Prof-specialty Unmarried White Female United-States 0 +59 0.655555546 0.0219147913 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +41 0.455555558 0.141137138 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +21 0.233333334 0.1363052 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child Black Male United-States 0 +29 0.322222233 0.102024309 0.6875 0.0217402168 0 0.4040404 Self-emp-not-inc Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +51 0.566666663 0.11775 0.5625 0.0861408561 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 1 +22 0.244444445 0.09346503 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +49 0.544444442 0.09664007 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +53 0.5888889 0.134834871 0.75 0 0 0.8080808 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.113427922 0.625 0.0572105721 0 0.444444448 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.09989527 0.625 0 0 0.4040404 Private Some-college Separated Craft-repair Own-child White Male United-States 0 +20 0.222222224 0.182202533 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female Mexico 0 +40 0.444444448 0.036038138 0.8125 0 0 0.4040404 Private Bachelors Divorced Craft-repair Own-child White Female United-States 0 +25 0.2777778 0.07118788 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +27 0.3 0.127694726 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 +20 0.222222224 0.110846266 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +37 0.411111116 0.125105 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +40 0.444444448 0.0223310366 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Own-child White Male United-States 0 +28 0.311111122 0.14545314 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.15731813 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Separated Other-service Unmarried White Female United-States 0 +42 0.466666669 0.142286181 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +32 0.355555564 0.1289044 0.75 0.0217402168 0 0.4040404 Federal-gov Assoc-acdm Divorced Protective-serv Not-in-family White Male United-States 0 +20 0.222222224 0.09287704 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +62 0.6888889 0.10756278 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +31 0.344444454 0.19931367 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +31 0.344444454 0.118445083 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.145570338 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +62 0.6888889 0.274579138 0.25 0 0 0.353535354 Local-gov 7th-8th Widowed Other-service Not-in-family Black Female United-States 0 +43 0.477777779 0.144299373 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.192265138 0.625 0 0 0.5050505 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +30 0.333333343 0.08380116 0.5625 0.046500463 0 0.4040404 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +22 0.244444445 0.165949464 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +18 0.2 0.09614772 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +59 0.655555546 0.191037953 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.217505172 0.25 0 0.43663913 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 1 +49 0.544444442 0.0515132658 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.290795147 0.4375 0 0 0.3030303 State-gov 11th Never-married Other-service Own-child White Male United-States 0 +48 0.533333361 0.09560418 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +32 0.355555564 0.13002044 0.9375 0.1502415 0 0.6060606 Private Prof-school Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.0451308526 0.375 0 0 0.454545468 Private 10th Never-married Machine-op-inspct Not-in-family White Female United-States 0 +23 0.25555557 0.161916345 0.8125 0 0 0.151515156 Private Bachelors Never-married Sales Not-in-family Black Male United-States 0 +33 0.366666675 0.123064183 0.9375 0 0 0.656565666 Federal-gov Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 +50 0.5555556 0.115878917 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.1247231 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.06927841 0.75 0 0.459595948 0.424242437 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +39 0.433333337 0.05721945 0.625 0.0282902829 0 0.656565666 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.07805928 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +23 0.25555557 0.124327056 0.8125 0 0 0.212121218 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +32 0.355555564 0.190348253 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +57 0.6333333 0.14726764 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +22 0.244444445 0.1061093 0.625 0 0 0.1010101 State-gov Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +70 0.7777778 0.0979447141 0.5625 0 0 0.05050505 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.0825861 0.625 0 0 0.8484849 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +53 0.5888889 0.137794375 0.875 0 0 0.4040404 Private Masters Divorced Sales Not-in-family White Female United-States 0 +21 0.233333334 0.07894497 0.625 0 0 0.454545468 Private Some-college Never-married Sales Own-child White Male United-States 0 +37 0.411111116 0.04679785 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +60 0.6666667 0.100014485 0.5625 0 0.3409091 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.07203923 0.4375 0.143441439 0 0.4040404 Private 11th Never-married Craft-repair Own-child Asian-Pac-Islander Male Vietnam 1 +32 0.355555564 0.0197426435 0.375 0 0 0.8080808 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 +57 0.6333333 0.081027545 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +65 0.722222269 0.07537928 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +25 0.2777778 0.122736171 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +30 0.333333343 0.147578135 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.134836212 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female Germany 0 +19 0.211111113 0.2881798 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 +23 0.25555557 0.0225977562 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +44 0.4888889 0.110488616 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +43 0.477777779 0.07855567 0.625 0 0 0.454545468 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +42 0.466666669 0.117958114 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Unmarried Black Female United-States 0 +34 0.377777785 0.195143819 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +32 0.355555564 0.172668651 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +25 0.2777778 0.190348923 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Unmarried Black Female United-States 0 +21 0.233333334 0.04962535 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +31 0.344444454 0.16018267 0.5625 0 0 0.6060606 Private HS-grad Married-spouse-absent Priv-house-serv Other-relative Black Female Jamaica 0 +36 0.4 0.240936756 0.6875 0 0 0.4040404 Local-gov Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 +49 0.544444442 0.1047272 0.625 0 0 0.656565666 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male Poland 0 +44 0.4888889 0.09299962 0.8125 0 0 0.323232323 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 +42 0.466666669 0.123579435 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.06977548 0.5625 0 0 1 Private HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 +33 0.366666675 0.116052687 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +36 0.4 0.211390823 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Divorced Other-service Unmarried Black Male United-States 1 +17 0.188888893 0.19834581 0.375 0 0 0.3030303 Private 10th Never-married Other-service Own-child White Male United-States 0 +20 0.222222224 0.429095358 0.625 0 0 0.25252524 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +32 0.355555564 0.2599567 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +33 0.366666675 0.07849304 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.08706309 0.625 0 0 0.6060606 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +60 0.6666667 0.0951387659 0.375 0 0 0.4848485 Private 10th Divorced Farming-fishing Not-in-family White Male United-States 0 +35 0.3888889 0.02399534 0.625 0 0 0.151515156 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.06394334 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 +46 0.51111114 0.148358762 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +29 0.322222233 0.11419373 0.5625 0.05178052 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +36 0.4 0.1445432 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.0549200028 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +50 0.5555556 0.0161735844 0.625 0 0 0.8484849 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.0841514 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Adm-clerical Wife Amer-Indian-Eskimo Female United-States 0 +33 0.366666675 0.2113073 0.875 0 0 0.6060606 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +61 0.677777767 0.129478246 0.375 0 0 0.4040404 Private 10th Divorced Sales Unmarried White Female United-States 0 +28 0.311111122 0.113506727 0.6875 0 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Own-child White Female United-States 0 +41 0.455555558 0.07632762 0.6875 0 0 0.7070707 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 +22 0.244444445 0.145131186 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +27 0.3 0.134641558 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +25 0.2777778 0.2908733 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.0713529 0.5625 0 0.3677686 0.2020202 Private HS-grad Never-married Machine-op-inspct Own-child Black Female United-States 0 +28 0.311111122 0.185005784 0.875 0 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +25 0.2777778 0.119551696 0.8125 0 0.365013778 0.353535354 Private Bachelors Never-married Craft-repair Own-child White Male United-States 0 +28 0.311111122 0.1388323 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.14934954 0.8125 0 0 0.3030303 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +58 0.644444466 0.136493117 0.5625 0 0 0.373737365 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.2350366 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +33 0.366666675 0.115764417 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +59 0.655555546 0.106372647 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +58 0.644444466 0.13561213 0.8125 0 0 0.2020202 Private Bachelors Divorced Craft-repair Own-child White Female United-States 0 +38 0.422222227 0.238928944 0.6875 0 0 0.363636374 Private Assoc-voc Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 +34 0.377777785 0.0269865058 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.220152825 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Own-child Black Male United-States 0 +48 0.533333361 0.127811253 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +65 0.722222269 0.100389645 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +45 0.5 0.15238449 0.5625 0 0 0.5050505 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +80 0.8888889 0.01954597 0.9375 0.106051058 0 0.1010101 ? Prof-school Married-civ-spouse ? Husband White Male United-States 1 +23 0.25555557 0.0257633682 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +33 0.366666675 0.132272065 0.875 0 0 0.373737365 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.146193355 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Farming-fishing Not-in-family White Male United-States 0 +44 0.4888889 0.07070293 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Farming-fishing Husband White Male United-States 1 +48 0.533333361 0.160947129 0.875 0.09562095 0 0.4040404 Local-gov Masters Divorced Exec-managerial Unmarried Black Female United-States 1 +40 0.444444448 0.0230470039 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.197320014 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Other-relative Black Female United-States 0 +45 0.5 0.158902943 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Own-child White Female United-States 0 +34 0.377777785 0.06644822 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +70 0.7777778 0.06911138 0.625 0 0 0.8080808 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +32 0.355555564 0.199680075 0.875 0 0 0.6060606 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +33 0.366666675 0.21759811 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Unmarried White Female United-States 0 +24 0.266666681 0.124439538 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +30 0.333333343 0.157602355 0.8125 0 0 0.151515156 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +22 0.244444445 0.0880471244 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child Black Male United-States 0 +52 0.5777778 0.122485615 0.9375 1 0 0.656565666 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband Other Male United-States 1 +67 0.7444445 0.0859046057 0.375 0.02414024 0 0.8080808 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +40 0.444444448 0.12606141 0.5625 0 0.3838384 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +55 0.6111111 0.07672366 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 0 +29 0.322222233 0.145806074 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +62 0.6888889 0.09125045 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.1375088 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Female United-States 0 +64 0.7111111 0.07722073 0.3125 0 0 0.4040404 State-gov 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.16176413 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Exec-managerial Other-relative White Male United-States 0 +28 0.311111122 0.124490052 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.08391566 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Other-relative White Male United-States 0 +47 0.5222222 0.0811130852 1 0.1502415 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.1360762 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 +18 0.2 0.105660051 0.5 0 0 0.272727281 Private 12th Never-married Other-service Own-child White Male United-States 0 +52 0.5777778 0.119705267 0.375 0.0406404063 0 0.454545468 Self-emp-inc 10th Married-civ-spouse Sales Husband White Male United-States 0 +48 0.533333361 0.225236 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +36 0.4 0.20964098 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male Haiti 0 +23 0.25555557 0.14428927 0.6875 0 0 0.3030303 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 +41 0.455555558 0.0780283 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +56 0.622222245 0.4521383 0.5625 0 0 0.3838384 State-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +53 0.5888889 0.0211893953 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 +26 0.2888889 0.09552336 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +22 0.244444445 0.208898067 0.625 0.0332503319 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +25 0.2777778 0.121204555 0.875 0.02597026 0 0.3131313 Private Masters Never-married Prof-specialty Own-child White Female United-States 0 +31 0.344444454 0.09291543 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband Other Male Puerto-Rico 0 +36 0.4 0.0695916042 0.75 0.0282902829 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +46 0.51111114 0.117481925 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +46 0.51111114 0.12984331 0.75 0 0.518365443 0.3838384 State-gov Assoc-acdm Divorced Adm-clerical Unmarried White Male United-States 1 +32 0.355555564 0.114470556 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Other-service Wife White Female Puerto-Rico 0 +43 0.477777779 0.03238825 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +30 0.333333343 0.08931135 0.8125 1 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.170444638 0.8125 0.07688077 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.07303471 0.875 1 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.141746685 0.875 0 0 0.3838384 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +22 0.244444445 0.09037553 0.5625 0 0 0.5050505 Local-gov HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +51 0.566666663 0.0306370631 0.5625 0 0 0.8080808 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +47 0.5222222 0.123608395 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife Black Female United-States 1 +40 0.444444448 0.134237438 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +46 0.51111114 0.05594647 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.0909251347 0.625 0 0 0.2020202 ? Some-college Separated ? Unmarried White Female United-States 0 +30 0.333333343 0.0299177282 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Unmarried White Female United-States 0 +27 0.3 0.298114449 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.106480412 0.625 0 0 0.353535354 Local-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +31 0.344444454 0.252462953 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +30 0.333333343 0.07587366 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 +50 0.5555556 0.123519488 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Not-in-family White Male United-States 1 +27 0.3 0.139703169 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +22 0.244444445 0.22593917 0.625 0 0 0.161616161 ? Some-college Never-married ? Own-child White Female United-States 0 +29 0.322222233 0.164113417 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +28 0.311111122 0.0365345329 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +54 0.6 0.0339360349 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family Black Female United-States 1 +47 0.5222222 0.126342267 0.6875 0 0 0.4848485 State-gov Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +34 0.377777785 0.0251767188 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Unmarried White Female United-States 0 +26 0.2888889 0.166379854 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +53 0.5888889 0.0196880866 0.25 0 0 0.353535354 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +23 0.25555557 0.0680903 0.625 0 0 0.6060606 State-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 +42 0.466666669 0.119024321 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +36 0.4 0.07976601 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +52 0.5777778 0.14920944 0.8125 0 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +22 0.244444445 0.0812094 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +27 0.3 0.0839762762 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +42 0.466666669 0.103158541 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +39 0.433333337 0.07723959 0.5625 0.0545505434 0 0.4040404 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 +49 0.544444442 0.0962184444 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.0200053211 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +20 0.222222224 0.187040523 0.0625 0 0 0.323232323 Private Preschool Never-married Other-service Own-child White Male United-States 0 +55 0.6111111 0.0454184525 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.08158119 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.265673667 0.875 0 0 0.333333343 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.05364635 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.137241408 1 0 0 0.8080808 Private Doctorate Divorced Prof-specialty Unmarried White Female United-States 0 +55 0.6111111 0.154258937 0.8125 0.1502415 0 0.4848485 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.333155751 0.75 0 0 0.151515156 ? Assoc-acdm Never-married ? Own-child White Male United-States 0 +48 0.533333361 0.10966219 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.07349406 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Handlers-cleaners Own-child White Male United-States 0 +24 0.266666681 0.02204613 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.146623075 0.5625 0 0 0.3838384 Self-emp-not-inc HS-grad Widowed Craft-repair Not-in-family White Female United-States 0 +20 0.222222224 0.0232975576 0.625 0 0 0.6060606 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +18 0.2 0.186477453 0.625 0 0.3677686 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 +56 0.622222245 0.113574751 0.5625 0.04101041 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 +36 0.4 0.0613165572 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +44 0.4888889 0.115500391 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +57 0.6333333 0.135012016 0.5625 0.1502415 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +57 0.6333333 0.0249140412 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +33 0.366666675 0.133501947 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +61 0.677777767 0.020525964 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 1 +39 0.433333337 0.04781758 0.8125 0.1502415 0 1 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 +28 0.311111122 0.165548041 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +31 0.344444454 0.184093148 0.625 0 0.395087242 0.161616161 Private Some-college Never-married Other-service Own-child White Male United-States 0 +60 0.6666667 0.123045996 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Other-service Not-in-family White Female United-States 0 +36 0.4 0.166906565 0.6875 0 0 0.4040404 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 1 +58 0.644444466 0.109862231 0.5625 0 0 0.353535354 Private HS-grad Widowed Sales Not-in-family White Female United-States 1 +50 0.5555556 0.121587791 0.625 0 0 0.3838384 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +23 0.25555557 0.13696526 0.8125 0 0 0.121212125 Local-gov Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +30 0.333333343 0.0589133874 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +20 0.222222224 0.145862654 0.4375 0 0 0.4040404 ? 11th Never-married ? Other-relative White Male United-States 0 +90 1 0.0588480569 0.9375 0.200512 0 0.727272749 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.116914809 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.0540726967 0.8125 0.031370312 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +34 0.377777785 0.2154327 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male Taiwan 1 +37 0.411111116 0.274956316 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Tech-support Unmarried White Female United-States 0 +25 0.2777778 0.290500134 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Protective-serv Wife Black Female United-States 0 +37 0.411111116 0.09031289 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.1659562 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male Mexico 0 +34 0.377777785 0.107263736 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.0714040846 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +35 0.3888889 0.1259065 0.5625 0.07688077 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.080911696 0.625 0 0 0.4040404 Private Some-college Separated Machine-op-inspct Own-child White Male United-States 0 +32 0.355555564 0.137299329 0.25 0 0 0.1919192 State-gov 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +24 0.266666681 0.140054762 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +28 0.311111122 0.203680873 0.9375 0 0 0.6060606 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 +41 0.455555558 0.09738904 0.25 0 0.500229537 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +69 0.7666667 0.115208074 0.5625 0 0 0.09090909 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +32 0.355555564 0.309157044 0.5625 0 0 0.909090936 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +58 0.644444466 0.250676751 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 1 +47 0.5222222 0.115870833 0.5625 0 0 0.75757575 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.1054526 0.8125 0.04386044 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.227870181 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.238226458 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male Canada 0 +46 0.51111114 0.230959684 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband Black Male United-States 1 +69 0.7666667 0.11431025 0.8125 0.06418064 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.06988729 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +36 0.4 0.0320400372 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +31 0.344444454 0.08044157 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.0971001 0.8125 0 0 0.3030303 Local-gov Bachelors Never-married Prof-specialty Own-child Amer-Indian-Eskimo Male United-States 0 +35 0.3888889 0.121671982 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family Black Female United-States 0 +37 0.411111116 0.210299015 0.8125 0.05178052 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +35 0.3888889 0.101358861 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +18 0.2 0.135296911 0.4375 0 0 0.161616161 Private 11th Never-married Transport-moving Own-child White Male United-States 0 +43 0.477777779 0.126758516 0.3125 0 0 0.4040404 Private 9th Divorced Handlers-cleaners Unmarried White Female United-States 0 +53 0.5888889 0.08001118 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +54 0.6 0.137619928 0.625 0 0 0.5252525 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +29 0.322222233 0.172876775 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +46 0.51111114 0.155933335 0.75 0 0 0.474747479 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female Cuba 0 +24 0.266666681 0.067804046 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child Asian-Pac-Islander Male United-States 0 +30 0.333333343 0.05988597 0.625 0 0 0.4040404 Private Some-college Separated Other-service Unmarried Asian-Pac-Islander Female United-States 0 +23 0.25555557 0.244640529 0.625 0 0 0.0606060624 Private Some-college Never-married Priv-house-serv Not-in-family White Female United-States 0 +27 0.3 0.196366966 0.8125 0 0 0.0606060624 ? Bachelors Married-civ-spouse ? Not-in-family Other Female Mexico 0 +36 0.4 0.2080851 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.06756628 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.199671313 0.875 0 0 0.151515156 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 0 +66 0.733333349 0.201275 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male Canada 0 +45 0.5 0.127091914 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +68 0.75555557 0.0196941476 0.5625 0 0 0.121212125 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +37 0.411111116 0.1259065 0.5625 0.1502415 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +17 0.188888893 0.104335882 0.375 0 0 0.1010101 Private 10th Never-married Other-service Own-child White Female United-States 0 +31 0.344444454 0.0149531392 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Amer-Indian-Eskimo Male United-States 1 +46 0.51111114 0.146156311 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +40 0.444444448 0.125894368 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +34 0.377777785 0.07858598 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +56 0.622222245 0.06449968 0.375 0 0 0.454545468 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 +42 0.466666669 0.179638386 0.625 0 0 0.414141417 Private Some-college Separated Adm-clerical Unmarried Black Female United-States 0 +46 0.51111114 0.0793753639 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.163305178 0.5625 0 0 0.5050505 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.136544973 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.12234889 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +57 0.6333333 0.117706887 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-spouse-absent Farming-fishing Unmarried Amer-Indian-Eskimo Male United-States 0 +34 0.377777785 0.03779943 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Unmarried White Male United-States 0 +40 0.444444448 0.262927 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 +33 0.366666675 0.100845627 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.0345267244 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +29 0.322222233 0.1282073 0.5 0 0 0.353535354 Private 12th Never-married Other-service Unmarried Black Female ? 0 +53 0.5888889 0.138268545 0.5625 0.07688077 0 0.353535354 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +36 0.4 0.104286715 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Own-child Asian-Pac-Islander Female Philippines 0 +45 0.5 0.0599634275 0.5625 0.105201051 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family Asian-Pac-Islander Male United-States 1 +36 0.4 0.131090015 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 +18 0.2 0.142928734 0.5625 0 0 0.111111112 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +27 0.3 0.137931779 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.106881842 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.06581981 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.130009666 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.173266754 0.25 0 0 0.75757575 Self-emp-not-inc 7th-8th Never-married Farming-fishing Own-child White Male United-States 0 +48 0.533333361 0.239763454 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.13509351 0.9375 0 0.453856736 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.2538747 0.1875 0 0 0.4040404 Private 5th-6th Never-married Priv-house-serv Not-in-family White Female Mexico 0 +47 0.5222222 0.08299225 0.875 0 0 0.3838384 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.05575384 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +61 0.677777767 0.078050524 0.125 0 0 0.2020202 Self-emp-not-inc 1st-4th Married-civ-spouse Craft-repair Husband White Male United-States 0 +64 0.7111111 0.0693881959 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.200556338 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Not-in-family Black Male United-States 0 +44 0.4888889 0.17476806 0.5625 0 0 0.5050505 Private HS-grad Divorced Transport-moving Unmarried White Male United-States 0 +20 0.222222224 0.113010332 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +23 0.25555557 0.0269555245 0.625 0 0 0.7070707 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +52 0.5777778 0.165201172 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Other-service Wife White Female United-States 0 +43 0.477777779 0.0251915362 0.875 0 0 0.25252524 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +32 0.355555564 0.06978356 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband Asian-Pac-Islander Male United-States 0 +63 0.7 0.092403546 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male South 0 +29 0.322222233 0.09269047 0.625 0 0 0.414141417 Private Some-college Never-married Other-service Not-in-family White Female United-States 1 +42 0.466666669 0.06500214 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Taiwan 0 +65 0.722222269 0.132129952 0.375 0 0 0.282828271 Private 10th Divorced Handlers-cleaners Not-in-family White Female United-States 0 +24 0.266666681 0.116260134 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.09509364 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +35 0.3888889 0.15369384 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +40 0.444444448 0.128166884 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male ? 1 +38 0.422222227 0.2070472 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +26 0.2888889 0.1026709 0.5625 0 0 0.5050505 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +46 0.51111114 0.122947656 0.5625 0 0.3838384 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +39 0.433333337 0.190039769 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +29 0.322222233 0.0278041773 0.8125 0 0 0.5050505 ? Bachelors Married-spouse-absent ? Not-in-family White Male United-States 0 +42 0.466666669 0.10911461 1 0 0 0.363636374 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 +36 0.4 0.128482759 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.140177339 0.625 0 0 0.454545468 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 +57 0.6333333 0.117081843 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +55 0.6111111 0.08700247 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +35 0.3888889 0.193673491 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.145561576 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried Black Female ? 0 +24 0.266666681 0.09881155 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +47 0.5222222 0.192092031 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.2117424 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +44 0.4888889 0.137362644 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +18 0.2 0.1850509 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Unmarried White Female United-States 0 +27 0.3 0.348217338 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +36 0.4 0.0445697978 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.123137593 0.8125 0 0 0.3030303 Private Bachelors Never-married Sales Own-child White Male United-States 0 +29 0.322222233 0.1074146 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband Other Male United-States 0 +25 0.2777778 0.0913097262 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +73 0.811111152 0.2247423 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +45 0.5 0.135851234 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +28 0.311111122 0.06467278 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +43 0.477777779 0.118635021 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.0319901928 0.5625 0 0 0.424242437 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +20 0.222222224 0.126057371 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +22 0.244444445 0.168199748 0.625 0 0 0.2020202 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +76 0.844444454 0.160047963 0.25 0 0 0.1010101 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.118039615 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family Black Male United-States 0 +54 0.6 0.0289107952 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.138714433 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +33 0.366666675 0.07542576 0.625 0 0 0.5858586 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.112800859 0.625 0 0 0.5050505 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +40 0.444444448 0.148966968 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.127103373 0.625 0 0 0.3030303 ? Some-college Divorced ? Not-in-family White Male United-States 0 +49 0.544444442 0.1343351 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Unmarried White Female United-States 0 +30 0.333333343 0.2108419 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +22 0.244444445 0.0999733955 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Other Female United-States 0 +19 0.211111113 0.07572683 0.5625 0 0 0.5858586 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +46 0.51111114 0.0390070751 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +51 0.566666663 0.0977743044 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +56 0.622222245 0.166443169 0.25 0 0 0.4040404 Private 7th-8th Widowed Machine-op-inspct Unmarried Other Female Dominican-Republic 0 +53 0.5888889 0.1322 0.625 0 0 0.4040404 Private Some-college Widowed Sales Not-in-family White Female United-States 0 +60 0.6666667 0.246871263 0.6875 0 0 0.4040404 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 +27 0.3 0.145807415 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.126642674 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Unmarried White Female United-States 0 +37 0.411111116 0.0449153222 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +41 0.455555558 0.05036354 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Vietnam 0 +65 0.722222269 0.2192604 0.6875 0 0 0.5050505 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 1 +30 0.333333343 0.168719709 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +57 0.6333333 0.129903927 0.5625 0 0 0.727272749 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +44 0.4888889 0.0817347541 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.0478108451 0.5625 0.0406404063 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.08292287 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +57 0.6333333 0.228437975 0.625 0 0 0.4040404 Local-gov Some-college Widowed Adm-clerical Unmarried White Female Mexico 0 +59 0.655555546 0.08403757 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +32 0.355555564 0.1128379 0.9375 0.1502415 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female United-States 1 +90 1 0.0518978536 0.5625 0 1 0.4040404 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +22 0.244444445 0.134212524 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +39 0.433333337 0.128461882 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.0668227 0.6875 0.03103031 0 0.4848485 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.283858418 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +61 0.677777767 0.145445734 0.3125 0 0 0.25252524 Private 9th Divorced Sales Not-in-family White Male United-States 0 +24 0.266666681 0.04870328 0.625 0 0 0.434343427 Private Some-college Never-married Sales Own-child White Male United-States 0 +25 0.2777778 0.0387363136 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +44 0.4888889 0.0602227375 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.01896067 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 1 +90 1 0.0315119848 0.8125 0.09386094 0 0.151515156 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.152853936 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +44 0.4888889 0.122854039 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.2056651 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Other-relative Black Male United-States 0 +63 0.7 0.127468422 0.625 0 0 0.454545468 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +60 0.6666667 0.199692875 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 0 +34 0.377777785 0.1376536 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 +49 0.544444442 0.168104112 0.4375 0 0 0.656565666 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.100353271 0.875 0 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.113201618 0.5625 0 0 0.434343427 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +53 0.5888889 0.131335855 0.1875 0 0 0.454545468 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Italy 0 +23 0.25555557 0.142148778 0.625 0.04101041 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +28 0.311111122 0.13243708 0.6875 0 0 0.4040404 ? Assoc-voc Separated ? Unmarried White Female Mexico 0 +20 0.222222224 0.03394412 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 0 +43 0.477777779 0.119825155 0.5625 0.03908039 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +32 0.355555564 0.137652934 0.9375 0 0.453856736 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.0404127426 0.8125 0 0 0.444444448 Private Bachelors Divorced Sales Unmarried White Male United-States 1 +31 0.344444454 0.150229171 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.030255843 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +24 0.266666681 0.1041089 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Male United-States 0 +39 0.433333337 0.04521841 0.6875 0 0 0.4040404 Private Assoc-voc Separated Adm-clerical Not-in-family Asian-Pac-Islander Male United-States 0 +29 0.322222233 0.127079114 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male Jamaica 1 +20 0.222222224 0.2632287 0.1875 0 0 0.25252524 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 +23 0.25555557 0.09831179 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 +42 0.466666669 0.0204916131 0.4375 0 0 0.3838384 Private 11th Separated Other-service Unmarried White Female United-States 0 +53 0.5888889 0.369340032 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.1273977 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +58 0.644444466 0.179636359 0.125 0 0.500229537 0.181818187 Self-emp-not-inc 1st-4th Married-civ-spouse Transport-moving Husband White Male United-States 0 +51 0.566666663 0.209852472 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 +25 0.2777778 0.12639077 0.5625 0 0 0.4848485 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +38 0.422222227 0.158535868 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Prof-specialty Unmarried White Female United-States 0 +41 0.455555558 0.1270387 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +58 0.644444466 0.217343524 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +25 0.2777778 0.124400474 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family White Male Dominican-Republic 0 +50 0.5555556 0.09723211 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.08759788 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.07945215 1 0 0 0.4040404 Self-emp-inc Doctorate Never-married Prof-specialty Own-child White Male United-States 0 +22 0.244444445 0.08343476 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +37 0.411111116 0.16733627 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Other-relative White Male El-Salvador 0 +32 0.355555564 0.139537483 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Female United-States 0 +46 0.51111114 0.08075948 0.9375 0 0.359045 0.5555556 State-gov Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 +62 0.6888889 0.09077089 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +40 0.444444448 0.181293935 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband Other Male ? 0 +56 0.622222245 0.0889240652 0.8125 0.07688077 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 1 +37 0.411111116 0.04089836 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family Asian-Pac-Islander Female Japan 1 +41 0.455555558 0.436600536 0.125 0 0 0.4040404 Private 1st-4th Married-spouse-absent Farming-fishing Unmarried White Male Mexico 0 +56 0.622222245 0.201181382 0.25 0 0 0.4848485 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +20 0.222222224 0.148066461 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +34 0.377777785 0.2113073 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.09472858 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.137056187 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +51 0.566666663 0.08913623 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.108899079 0.4375 0 0 0.424242437 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.210662052 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.1738406 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +57 0.6333333 0.0162503663 0.8125 0 0 0.08080808 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +47 0.5222222 0.171324953 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +77 0.8555556 0.124890804 0.5625 0 0 0.151515156 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +43 0.477777779 0.1028009 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.09500743 0.5625 0 0 0.656565666 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.15702109 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.27388674 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.08043484 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +30 0.333333343 0.172078639 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +22 0.244444445 0.108797371 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +25 0.2777778 0.0510263 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +18 0.2 0.110009737 0.5625 0 0 0.222222224 Private HS-grad Never-married Sales Own-child White Female United-States 0 +28 0.311111122 0.06991423 0.8125 0 0.323232323 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female ? 0 +50 0.5555556 0.023460554 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +28 0.311111122 0.0255491845 0.5625 0 0 0.4848485 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +21 0.233333334 0.111205257 0.625 0 0 0.4040404 Private Some-college Never-married Priv-house-serv Own-child White Female United-States 0 +37 0.411111116 0.08487275 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Own-child White Male United-States 0 +28 0.311111122 0.0381564 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 +23 0.25555557 0.3521784 0.1875 0 0 0.353535354 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 +32 0.355555564 0.129168421 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Exec-managerial Not-in-family Black Female England 0 +27 0.3 0.0893686 0.5 0 0 0.5050505 Private 12th Never-married Machine-op-inspct Own-child White Male United-States 0 +55 0.6111111 0.135455862 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried Black Female United-States 0 +44 0.4888889 0.117385611 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +25 0.2777778 0.140493229 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +29 0.322222233 0.08513409 0.5625 0 0 0.323232323 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +50 0.5555556 0.09569106 0.5625 0 0 0.5555556 Private HS-grad Married-spouse-absent Exec-managerial Not-in-family White Female United-States 0 +18 0.2 0.266428024 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +74 0.822222233 0.121542662 0.8125 0 0 0.08080808 Private Bachelors Widowed Other-service Not-in-family White Female United-States 0 +22 0.244444445 0.158855125 0.3125 0 0 0.4040404 Private 9th Never-married Sales Not-in-family White Male United-States 0 +27 0.3 0.108257875 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +27 0.3 0.0215093233 0.625 0 0 0.8080808 State-gov Some-college Never-married Tech-support Own-child White Female United-States 0 +41 0.455555558 0.0236855131 0.9375 0.1502415 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.108501017 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +23 0.25555557 0.150210992 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +34 0.377777785 0.121015958 0.9375 0.07688077 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.16763936 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.134924442 0.9375 0 0 0.6060606 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 +41 0.455555558 0.1549264 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Other Male United-States 0 +29 0.322222233 0.0908530653 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 +48 0.533333361 0.109177247 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Machine-op-inspct Other-relative Asian-Pac-Islander Female China 0 +51 0.566666663 0.06992904 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male Haiti 0 +34 0.377777785 0.0413758978 0.5 0 0 0.4040404 State-gov 12th Never-married Adm-clerical Not-in-family Black Female United-States 0 +58 0.644444466 0.132901147 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.123673059 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +37 0.411111116 0.180910021 0.8125 0.07298073 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Other Male Puerto-Rico 1 +53 0.5888889 0.177630574 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Not-in-family White Female United-States 0 +54 0.6 0.0265998971 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.124846354 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.08935176 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +20 0.222222224 0.179429591 0.625 0 0 0.4848485 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +23 0.25555557 0.292091042 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 +39 0.433333337 0.145802036 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.146429092 0.375 0 0 0.4040404 Self-emp-not-inc 10th Never-married Machine-op-inspct Own-child White Male United-States 0 +28 0.311111122 0.153416336 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Other-relative Black Male United-States 0 +73 0.811111152 0.06483578 0.5625 0 0 0.4040404 State-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +67 0.7444445 0.166744232 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +56 0.622222245 0.09403619 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +32 0.355555564 0.049562037 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.0255060773 0.625 0 0.365013778 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +33 0.366666675 0.111681446 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +37 0.411111116 0.07335666 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +33 0.366666675 0.02355687 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.105797447 0.375 0 0 0.4040404 Private 10th Never-married Adm-clerical Unmarried White Female United-States 0 +59 0.655555546 0.156712621 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.198217839 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 +58 0.644444466 0.08786527 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.310956061 0.375 0 0 0.4040404 Local-gov 10th Never-married Other-service Not-in-family White Male United-States 0 +26 0.2888889 0.169921979 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +26 0.2888889 0.172921225 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.06498261 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female Germany 0 +25 0.2777778 0.157784209 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +21 0.233333334 0.07405646 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +24 0.266666681 0.176849946 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +39 0.433333337 0.044261992 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 +68 0.75555557 0.135873452 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +66 0.733333349 0.117725745 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Never-married Sales Not-in-family White Female United-States 0 +38 0.422222227 0.187864929 0.8125 0 0 0.4040404 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 +41 0.455555558 0.0684263855 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +71 0.788888931 0.130573422 0.25 0 0 0.161616161 ? 7th-8th Widowed ? Other-relative White Female Poland 0 +37 0.411111116 0.230866075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.163403511 0.875 0.04386044 0 0.454545468 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.119031727 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +49 0.544444442 0.0668004751 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +19 0.211111113 0.238501251 0.625 0 0 0.1010101 State-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 +25 0.2777778 0.0417295024 0.625 0 0 0.5050505 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +47 0.5222222 0.09289186 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +40 0.444444448 0.151314914 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Other-relative White Male United-States 0 +38 0.422222227 0.03441761 0.8125 0.0332503319 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +25 0.2777778 0.151114866 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +25 0.2777778 0.244433746 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Own-child White Female United-States 0 +23 0.25555557 0.147357225 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Other-relative Other Male United-States 0 +28 0.311111122 0.0696360543 0.875 0 0 0.4040404 Private Masters Divorced Sales Own-child White Female United-States 0 +29 0.322222233 0.208084434 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.09435679 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.1361954 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +52 0.5777778 0.280230075 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +33 0.366666675 0.1892834 0.5625 0 0 0.949494958 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +19 0.211111113 0.114337869 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 +68 0.75555557 0.130440727 1 0.200512 0 0.5555556 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.09423219 0.375 0 0 0.5050505 Private 10th Never-married Handlers-cleaners Unmarried White Male United-States 0 +18 0.2 0.08043484 0.5625 0 0 0.3030303 Self-emp-inc HS-grad Never-married Other-service Unmarried Asian-Pac-Islander Female India 0 +29 0.322222233 0.100574866 0.625 0 0.3409091 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.1746522 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.04994932 0.875 0 0 0.6060606 Self-emp-not-inc Masters Divorced Prof-specialty Unmarried White Male United-States 1 +49 0.544444442 0.09079043 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 +20 0.222222224 0.0276842881 0.625 0 0 0.2020202 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 +38 0.422222227 0.130009666 0.5625 0 0 0.5050505 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +57 0.6333333 0.204745054 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Not-in-family White Male Cuba 0 +35 0.3888889 0.08524859 0.625 0.0406404063 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +66 0.733333349 0.112117223 0.4375 0 0 0.262626261 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 +27 0.3 0.0413462631 0.8125 0 0 0.151515156 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +25 0.2777778 0.17158021 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +77 0.8555556 0.0193156227 0.875 0.09386094 0 0.0606060624 ? Masters Married-civ-spouse ? Husband White Male United-States 1 +19 0.211111113 0.121893577 0.375 0 0 0.353535354 ? 10th Never-married ? Unmarried White Female United-States 0 +70 0.7777778 0.190369129 0.5625 0 0.499081731 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +59 0.655555546 0.09187886 0.25 0 0 0.4848485 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +25 0.2777778 0.08854487 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +44 0.4888889 0.119377255 0.9375 0.105201051 0 0.4040404 Local-gov Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 +37 0.411111116 0.147160545 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male El-Salvador 1 +75 0.8333334 0.1754847 0.375 0 0 0.01010101 ? 10th Widowed ? Other-relative Asian-Pac-Islander Female China 0 +21 0.233333334 0.05434076 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +21 0.233333334 0.0139610227 0.5625 0.04101041 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +47 0.5222222 0.0792265162 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.06192409 0.5625 0 0.395087242 0.3030303 Private HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 +32 0.355555564 0.1184956 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +28 0.311111122 0.20850338 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +53 0.5888889 0.08331823 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +19 0.211111113 0.248990878 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Not-in-family Other Male United-States 0 +58 0.644444466 0.02015754 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 +22 0.244444445 0.113064885 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +23 0.25555557 0.158882737 0.4375 0 0 0.5555556 Private 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +21 0.233333334 0.127896115 0.5625 0.0332503319 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +36 0.4 0.0751294047 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.11852321 0.625 0 0 0.151515156 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +34 0.377777785 0.171259612 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +41 0.455555558 0.124642268 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +72 0.8 0.106144324 0.8125 0.0145501448 0 0.0606060624 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.06825935 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 +51 0.566666663 0.119047895 0.8125 0 0.43663913 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.06581981 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +38 0.422222227 0.08594368 0.625 0 0 0.4040404 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 1 +37 0.411111116 0.153294429 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.0969856 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child Black Male United-States 0 +21 0.233333334 0.168417975 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +26 0.2888889 0.191336334 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +34 0.377777785 0.139871553 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +18 0.2 0.110316195 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 +27 0.3 0.0802651048 0.4375 0 0 0.454545468 Private 11th Never-married Exec-managerial Unmarried White Female United-States 0 +20 0.222222224 0.127036691 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Own-child White Female Nicaragua 0 +36 0.4 0.07719042 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 1 +31 0.344444454 0.214023 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Not-in-family White Male United-States 0 +32 0.355555564 0.110592343 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.221772 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.1396796 0.875 0 0 0.4040404 Local-gov Masters Widowed Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.08324751 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.175072491 0.4375 0 0 0.3030303 Private 11th Separated Machine-op-inspct Other-relative White Male United-States 0 +32 0.355555564 0.0907500163 0.8125 1 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.07200084 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 +30 0.333333343 0.05863387 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.0556487665 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 1 +28 0.311111122 0.1223536 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +25 0.2777778 0.216342643 0.8125 0.04101041 0 0.353535354 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +44 0.4888889 0.155820861 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 1 +40 0.444444448 0.185960174 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +36 0.4 0.19570218 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +21 0.233333334 0.206987247 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Male United-States 0 +39 0.433333337 0.0667849854 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.16025272 0.8125 0 0 0.3939394 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +46 0.51111114 0.10338822 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family Amer-Indian-Eskimo Male United-States 0 +47 0.5222222 0.100828111 0.8125 0 0 0.363636374 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +47 0.5222222 0.127756014 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.252254844 0.9375 0 0 0.75757575 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +60 0.6666667 0.08608107 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 1 +35 0.3888889 0.101176329 0.8125 0 0 0.24242425 Private Bachelors Married-civ-spouse Other-service Wife White Female Poland 0 +33 0.366666675 0.19912979 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried White Female China 0 +21 0.233333334 0.132808879 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.162994 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +48 0.533333361 0.105347529 0.5625 0 0 0.5050505 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +58 0.644444466 0.319144875 0.25 0 0 0.454545468 Private 7th-8th Widowed Farming-fishing Other-relative White Female Guatemala 0 +21 0.233333334 0.133650124 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 +22 0.244444445 0.0767398253 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +22 0.244444445 0.214800254 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +28 0.311111122 0.118141994 0.875 0 0 0.3030303 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 +33 0.366666675 0.130108 0.6875 0.07688077 0 0.5050505 ? Assoc-voc Married-civ-spouse ? Own-child White Female United-States 1 +23 0.25555557 0.215729058 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +58 0.644444466 0.269605756 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +24 0.266666681 0.191102609 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Own-child White Male United-States 0 +38 0.422222227 0.152996048 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 0 +49 0.544444442 0.201157138 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Sales Husband White Male Mexico 0 +47 0.5222222 0.142870128 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.215874538 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.118407361 0.5625 0 0 0.5555556 Private HS-grad Never-married Prof-specialty Unmarried White Female United-States 0 +55 0.6111111 0.114614688 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.231801614 0.4375 0 0 0.4040404 Private 11th Divorced Handlers-cleaners Not-in-family White Male United-States 0 +19 0.211111113 0.134330392 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.151852384 0.5625 0 0 0.5050505 Private HS-grad Never-married Tech-support Other-relative White Male United-States 0 +36 0.4 0.0412054919 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.118045 0.75 0 0.459595948 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male England 0 +42 0.466666669 0.102759808 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Unmarried Amer-Indian-Eskimo Female United-States 0 +41 0.455555558 0.122656018 0.875 0.2782828 0 0.353535354 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 +46 0.51111114 0.184394211 0.8125 1 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.140291169 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.151112854 0.375 0 0 0.4040404 Private 10th Never-married Other-service Unmarried Black Female United-States 0 +33 0.366666675 0.0371629372 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +60 0.6666667 0.102856122 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +53 0.5888889 0.0462610424 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.124908321 0.8125 0 0 0.5050505 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +39 0.433333337 0.118024796 0.625 0 0.453856736 0.6060606 Federal-gov Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +23 0.25555557 0.117094643 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +50 0.5555556 0.10933283 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male ? 1 +36 0.4 0.0346358381 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.0831249356 0.5 0.010550105 0 0.4040404 Private 12th Separated Prof-specialty Own-child White Female United-States 0 +26 0.2888889 0.176907867 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +38 0.422222227 0.1570642 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 1 +41 0.455555558 0.195769534 0.8125 0.07688077 0 0.5555556 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.101774432 0.625 0 0 0.181818187 Private Some-college Never-married Sales Other-relative White Female United-States 0 +38 0.422222227 0.120641477 0.75 0.105201051 0 0.5050505 Private Assoc-acdm Never-married Machine-op-inspct Not-in-family Black Female United-States 1 +72 0.8 0.0226361472 0.625 0.09386094 0 0.3030303 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +39 0.433333337 0.21380274 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.08524859 0.5625 0.07298073 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.502300441 0.625 0 0 0.454545468 Local-gov Some-college Divorced Exec-managerial Unmarried Black Female United-States 0 +19 0.211111113 0.0470982455 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 +26 0.2888889 0.203813553 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +52 0.5777778 0.0315133333 0.8125 0 0 0.25252524 Private Bachelors Divorced Craft-repair Unmarried White Male United-States 0 +41 0.455555558 0.195248216 0.1875 0 0.3624885 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband Other Male Nicaragua 0 +45 0.5 0.1206536 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +58 0.644444466 0.118456528 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +34 0.377777785 0.0386783928 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +36 0.4 0.2102815 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.232273757 0.5625 0 0 0.2020202 Without-pay HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +26 0.2888889 0.119239181 0.4375 0 0 0.4040404 State-gov 11th Divorced Other-service Unmarried White Female United-States 0 +60 0.6666667 0.05930808 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.074826315 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +39 0.433333337 0.129487678 0.375 0 0 0.6060606 Private 10th Divorced Other-service Not-in-family White Female United-States 0 +27 0.3 0.020076042 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Unmarried White Female Japan 0 +26 0.2888889 0.142517209 0.875 0 0 0.4040404 Federal-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +17 0.188888893 0.180693135 0.5 0 0 0.121212125 Private 12th Never-married Other-service Own-child White Male United-States 0 +59 0.655555546 0.121956892 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male England 1 +53 0.5888889 0.0139259994 0.5625 0 0 0.4848485 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 +35 0.3888889 0.07799731 0.4375 0 0 0.4040404 Private 11th Divorced Transport-moving Not-in-family White Male United-States 0 +34 0.377777785 0.08407529 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.0642120838 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +36 0.4 0.173732832 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.0488938875 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +29 0.322222233 0.0992385745 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +35 0.3888889 0.12482278 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +59 0.655555546 0.24108696 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.145075962 0.625 0 0.3677686 0.1010101 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +50 0.5555556 0.0206653848 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +24 0.266666681 0.0199305583 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family Other Female United-States 0 +36 0.4 0.145073935 0.8125 0 0 0.4040404 Private Bachelors Divorced Tech-support Not-in-family White Female United-States 0 +31 0.344444454 0.07446193 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 +42 0.466666669 0.08997343 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male El-Salvador 0 +38 0.422222227 0.141737252 0.25 0 0 0.4040404 Private 7th-8th Divorced Sales Unmarried White Female United-States 0 +52 0.5777778 0.173041791 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +46 0.51111114 0.0495324 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.07405646 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.133343 0.1875 0 0 0.5151515 Private 5th-6th Married-civ-spouse Sales Husband White Male United-States 0 +27 0.3 0.2705743 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 +42 0.466666669 0.120915607 0.8125 0 0 0.5050505 Private Bachelors Separated Other-service Not-in-family White Female United-States 0 +33 0.366666675 0.199556142 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.0982309654 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Female United-States 0 +59 0.655555546 0.129295051 0.4375 0.03908039 0 0.282828271 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 +54 0.6 0.06519275 0.5625 0 0 0.323232323 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +48 0.533333361 0.124631494 0.25 0 0.3838384 0.5555556 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.157458216 0.625 0 0 0.6060606 ? Some-college Never-married ? Own-child White Male United-States 0 +45 0.5 0.2342782 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.14506115 0.8125 0 0 0.7070707 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +35 0.3888889 0.114114255 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.1366305 0.625 0 0 0.363636374 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +33 0.366666675 0.03386262 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +48 0.533333361 0.126256734 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +42 0.466666669 0.08493135 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Female United-States 0 +19 0.211111113 0.168814 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Male United-States 0 +64 0.7111111 0.131585732 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +51 0.566666663 0.12584655 0.8125 0 0 0.08080808 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +20 0.222222224 0.08025567 0.5625 0 0 0.2020202 Federal-gov HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 +28 0.311111122 0.109343611 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male Puerto-Rico 0 +52 0.5777778 0.07303471 0.875 0 0.43663913 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male Greece 1 +29 0.322222233 0.265996963 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +51 0.566666663 0.1160372 0.8125 0 0 0.4040404 Private Bachelors Separated Sales Not-in-family White Male United-States 0 +36 0.4 0.249724358 0.5625 0 0.5456841 0.6060606 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +43 0.477777779 0.2370875 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +52 0.5777778 0.111591868 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +50 0.5555556 0.174323529 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 +25 0.2777778 0.08809359 0.625 0 0 0.3030303 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +36 0.4 0.0800893158 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Unmarried Black Female Jamaica 0 +44 0.4888889 0.136367828 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +47 0.5222222 0.108814888 0.375 0 0 0.454545468 Private 10th Married-spouse-absent Transport-moving Not-in-family Black Male United-States 0 +32 0.355555564 0.126790166 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 +37 0.411111116 0.107846342 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Unmarried Asian-Pac-Islander Male South 0 +40 0.444444448 0.09738904 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +34 0.377777785 0.08313369 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.229075819 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +26 0.2888889 0.352303654 0.625 0 0 0.0303030312 Private Some-college Never-married Prof-specialty Own-child White Male El-Salvador 0 +49 0.544444442 0.07645492 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +63 0.7 0.1258223 0.8125 0 0 0.3030303 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +46 0.51111114 0.21581459 0.8125 0 0 0.25252524 Self-emp-not-inc Bachelors Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 +31 0.344444454 0.199089378 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Own-child Black Male United-States 0 +22 0.244444445 0.249576852 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +20 0.222222224 0.0812094 0.625 0 0 0.121212125 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +52 0.5777778 0.07474684 1 0 0 0.4040404 Private Doctorate Never-married Exec-managerial Not-in-family White Male United-States 1 +26 0.2888889 0.0376236364 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 +34 0.377777785 0.106957279 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.08861559 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +46 0.51111114 0.116934344 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +22 0.244444445 0.146067411 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +38 0.422222227 0.0701075345 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 +35 0.3888889 0.140166566 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male Ecuador 0 +27 0.3 0.2291829 0.625 0 0 0.4040404 State-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 0 +27 0.3 0.15911983 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 +46 0.51111114 0.143737644 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female Cuba 0 +40 0.444444448 0.0567331575 0.5625 0 0 0.04040404 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +19 0.211111113 0.20404391 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Male Thailand 0 +69 0.7666667 0.018991651 0.5625 0 0 0.6060606 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +20 0.222222224 0.176970512 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 +34 0.377777785 0.133538321 0.8125 0 0 0.6060606 Federal-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 +49 0.544444442 0.115087509 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.119728163 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Farming-fishing Husband Other Male United-States 0 +59 0.655555546 0.1183326 0.625 0 0 0.141414136 Private Some-college Married-civ-spouse Adm-clerical Wife White Female Cuba 1 +45 0.5 0.13814193 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.05237337 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 +51 0.566666663 0.0524717048 0.6875 0 0 0.4040404 State-gov Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +64 0.7111111 0.130379438 0.4375 0 0 0.4040404 ? 11th Never-married ? Unmarried White Male United-States 0 +41 0.455555558 0.0784802362 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.0573541559 0.5 0 0 0.24242425 ? 12th Never-married ? Own-child Asian-Pac-Islander Female Germany 0 +49 0.544444442 0.121594526 0.875 0 0 0.4040404 Private Masters Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 +51 0.566666663 0.342755646 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child Black Male United-States 0 +20 0.222222224 0.14234814 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 +69 0.7666667 0.115091555 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +18 0.2 0.06554703 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Own-child White Female United-States 0 +43 0.477777779 0.124001063 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +50 0.5555556 0.101663969 0.5625 0 0 0.444444448 Private HS-grad Divorced Machine-op-inspct Unmarried Black Female United-States 0 +32 0.355555564 0.204715416 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.184500635 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +38 0.422222227 0.132738158 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +62 0.6888889 0.109668255 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +46 0.51111114 0.107677288 0.5625 0 0 0.444444448 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +19 0.211111113 0.106649473 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Female ? 0 +17 0.188888893 0.274074644 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 +21 0.233333334 0.153556436 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Female United-States 0 +36 0.4 0.09262918 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.121337235 0.5 0 0 0.4040404 Private 12th Divorced Handlers-cleaners Not-in-family White Male United-States 0 +23 0.25555557 0.161337778 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Asian-Pac-Islander Male Philippines 0 +58 0.644444466 0.189796627 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.151409879 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +64 0.7111111 0.197102457 0.625 0.105661057 0 0.353535354 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +66 0.733333349 0.0150285754 0.4375 0 0 0.2020202 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.131094053 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +55 0.6111111 0.105131328 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 +53 0.5888889 0.1304771 0.625 0 0.453856736 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.147279769 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +39 0.433333337 0.2416891 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Unmarried Black Female United-States 0 +20 0.222222224 0.117656372 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +32 0.355555564 0.113728993 0.5625 0 0 0.545454562 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +28 0.311111122 0.0900488645 0.8125 0 0 0.656565666 Private Bachelors Never-married Sales Unmarried White Male United-States 0 +23 0.25555557 0.236195073 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Exec-managerial Own-child White Female Poland 0 +18 0.2 0.07760128 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +43 0.477777779 0.103022486 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.146291688 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.158364117 0.625 0 0 0.464646459 Private Some-college Married-civ-spouse Protective-serv Husband White Male Dominican-Republic 0 +31 0.344444454 0.0976281539 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +60 0.6666667 0.0912437141 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +42 0.466666669 0.189403966 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +46 0.51111114 0.1047272 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.1955311 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.122611567 0.4375 0 0 0.1919192 Private 11th Never-married Other-service Own-child White Female United-States 0 +31 0.344444454 0.141447634 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +54 0.6 0.158238843 0.5625 0.0406404063 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.212448269 0.625 0 0.4687787 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +27 0.3 0.0203703772 0.5625 0 0 0.8080808 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +50 0.5555556 0.0202114228 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.135601357 0.25 0 0 0.565656543 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +36 0.4 0.0649745241 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Own-child White Female United-States 0 +25 0.2777778 0.327561378 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male Mexico 0 +19 0.211111113 0.0310917 0.5625 0 0 0.25252524 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +60 0.6666667 0.06624211 0.625 0 0 0.6060606 Local-gov Some-college Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 0 +45 0.5 0.118513778 0.3125 0 0 0.4040404 Local-gov 9th Never-married Other-service Own-child White Male United-States 0 +21 0.233333334 0.08035873 0.625 0 0.3677686 0.161616161 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +42 0.466666669 0.118498288 0.5625 0 0.454545438 0.464646459 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +38 0.422222227 0.13775599 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.03894848 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +19 0.211111113 0.281655967 0.5625 0 0 0.323232323 Private HS-grad Never-married Exec-managerial Not-in-family Black Male United-States 0 +23 0.25555557 0.176967144 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +24 0.266666681 0.119408906 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 +30 0.333333343 0.171753988 0.75 0 0 0.5252525 Private Assoc-acdm Divorced Sales Not-in-family White Male United-States 0 +62 0.6888889 0.123751856 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.214617729 0.9375 0 0 0.2020202 Self-emp-not-inc Prof-school Never-married Prof-specialty Own-child White Male United-States 0 +42 0.466666669 0.08899074 0.8125 0 0 0.5252525 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.138782457 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.06680452 1 0 0 0.5050505 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 +35 0.3888889 0.1520504 0.8125 0 0 0.323232323 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +33 0.366666675 0.16553928 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +45 0.5 0.113889292 0.5625 0 0 0.5555556 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +62 0.6888889 0.142139345 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +24 0.266666681 0.1922483 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 +50 0.5555556 0.104248993 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 +54 0.6 0.0250804033 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +58 0.644444466 0.281146079 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Own-child White Male United-States 0 +39 0.433333337 0.0228833333 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.0286151133 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +27 0.3 0.114512309 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +27 0.3 0.102837265 0.5625 0.03908039 0 0.353535354 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.0281005315 0.625 0 0 0.6060606 Private Some-college Never-married Other-service Own-child White Male United-States 0 +64 0.7111111 0.044880297 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.17324385 0.875 0 0 0.4040404 Self-emp-inc Masters Widowed Sales Not-in-family White Female United-States 0 +46 0.51111114 0.113074318 0.5625 0 0 0.434343427 Private HS-grad Divorced Tech-support Not-in-family White Female United-States 0 +45 0.5 0.120850943 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +26 0.2888889 0.0387363136 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +36 0.4 0.203147426 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.130544454 0.8125 0 0.430670351 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +58 0.644444466 0.149691015 0.375 0 0.4331956 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 +39 0.433333337 0.127359986 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.146499813 0.5625 0 0 0.454545468 Private HS-grad Widowed Priv-house-serv Not-in-family Asian-Pac-Islander Female Thailand 0 +35 0.3888889 0.207914039 0.875 0 0 0.4848485 Private Masters Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.114279941 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +50 0.5555556 0.08143975 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.249312833 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.2682149 0.1875 0 0 0.4040404 Private 5th-6th Never-married Craft-repair Other-relative White Male Mexico 0 +44 0.4888889 0.140281737 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +40 0.444444448 0.227288261 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Unmarried White Female United-States 0 +55 0.6111111 0.116296507 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.0217416938 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +33 0.366666675 0.131272539 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.03861306 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female Japan 0 +32 0.355555564 0.117013149 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.103260919 0.875 0 0 0.1010101 Local-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +23 0.25555557 0.185085252 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +31 0.344444454 0.24196659 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Protective-serv Own-child Black Male United-States 0 +22 0.244444445 0.102878354 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Female Philippines 0 +59 0.655555546 0.126652092 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family Black Male United-States 0 +32 0.355555564 0.06581981 0.625 0 0 0.3838384 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +49 0.544444442 0.2387875 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.168199748 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +26 0.2888889 0.1276954 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +23 0.25555557 0.201299921 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Vietnam 0 +55 0.6111111 0.138273939 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Wife White Female United-States 0 +47 0.5222222 0.204509988 0.5625 0 0 0.4949495 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.163575262 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +27 0.3 0.0253242236 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +40 0.444444448 0.13428998 0.875 0.1502415 0 0.373737365 State-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +32 0.355555564 0.0379388519 0.8125 0 0 0.08080808 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +20 0.222222224 0.17256695 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Other-relative Asian-Pac-Islander Male Vietnam 0 +84 0.933333337 0.110247493 0.5625 0 0 0.333333343 Local-gov HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 +40 0.444444448 0.179216757 0.625 0 0 0.5050505 Private Some-college Divorced Craft-repair Other-relative White Male United-States 0 +37 0.411111116 0.108513817 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +44 0.4888889 0.134054244 0.625 0 0.3168044 0.4040404 Private Some-college Divorced Transport-moving Own-child White Male United-States 0 +47 0.5222222 0.112233743 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female Germany 0 +62 0.6888889 0.13745828 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +19 0.211111113 0.248889178 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +47 0.5222222 0.3131565 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +44 0.4888889 0.1176557 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Craft-repair Unmarried Black Male United-States 0 +26 0.2888889 0.11200542 0.8125 0 0 0.414141417 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +36 0.4 0.148521766 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.1663199 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 +33 0.366666675 0.07039042 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +48 0.533333361 0.179387152 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +33 0.366666675 0.169843838 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +25 0.2777778 0.062027812 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +62 0.6888889 0.05930808 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.0872840062 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.09612617 0.5625 0 0 0.656565666 Private HS-grad Married-spouse-absent Farming-fishing Not-in-family White Male United-States 0 +18 0.2 0.178435445 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +46 0.51111114 0.08674855 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.07768277 0.5625 0 0 0.7070707 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +52 0.5777778 0.128195837 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +63 0.7 0.120861724 0.25 0 0 0.151515156 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +49 0.544444442 0.147285834 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +17 0.188888893 0.09981377 0.4375 0 0 0.121212125 Local-gov 11th Never-married Adm-clerical Own-child White Female United-States 0 +33 0.366666675 0.1244914 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +70 0.7777778 0.189020038 0.5625 0.0232902318 0 0.2020202 Self-emp-not-inc HS-grad Widowed Other-service Other-relative White Female United-States 0 +19 0.211111113 0.146674931 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 +27 0.3 0.121608675 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 1 +61 0.677777767 0.037723992 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.171976253 0.8125 0 0 0.25252524 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.221064791 0.8125 0 0.43663913 0.424242437 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male ? 1 +29 0.322222233 0.235167265 0.375 0 0 0.4040404 Private 10th Separated Farming-fishing Unmarried White Female Guatemala 0 +40 0.444444448 0.0166787338 0.625 0.068490684 0 0.4040404 Local-gov Some-college Divorced Transport-moving Unmarried White Male United-States 0 +43 0.477777779 0.0281766411 0.5625 0 0 0.3838384 State-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +24 0.266666681 0.076423265 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +29 0.322222233 0.08813603 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +61 0.677777767 0.181044042 0.5625 0 0 0.171717167 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 +48 0.533333361 0.136132777 0.4375 0 0 0.343434334 Private 11th Divorced Other-service Not-in-family White Female United-States 0 +19 0.211111113 0.188688 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +30 0.333333343 0.0474013351 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 +24 0.266666681 0.159422919 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +39 0.433333337 0.149909914 0.875 0 0 0.434343427 Local-gov Masters Never-married Prof-specialty Unmarried White Female United-States 0 +46 0.51111114 0.07456162 0.625 0.0203602035 0 0.6060606 Self-emp-inc Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +40 0.444444448 0.06474619 0.5625 0 0 0.727272749 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.135038272 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +25 0.2777778 0.130544454 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Own-child White Female United-States 0 +31 0.344444454 0.3061268 0.4375 0 0.459366381 0.4040404 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 +58 0.644444466 0.148709 0.8125 0 0 0.454545468 Private Bachelors Divorced Transport-moving Not-in-family White Male United-States 0 +33 0.366666675 0.06825935 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female Canada 1 +40 0.444444448 0.09467133 0.5625 0 0 0.25252524 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +40 0.444444448 0.0437022857 0.875 0 0 0.7070707 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.271004021 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.096707426 0.5625 0 0 0.4848485 Private HS-grad Separated Other-service Unmarried Asian-Pac-Islander Female China 0 +49 0.544444442 0.124863192 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.07591138 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Own-child White Male United-States 0 +46 0.51111114 0.08780465 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +58 0.644444466 0.0992978439 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.138677388 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +65 0.722222269 0.184258163 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Unmarried White Male United-States 0 +43 0.477777779 0.103158541 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +48 0.533333361 0.113098562 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Sales Husband Asian-Pac-Islander Male India 0 +41 0.455555558 0.131784424 0.625 0 0 0.545454562 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +27 0.3 0.0984997 0.625 0 0 0.3030303 State-gov Some-college Separated Other-service Not-in-family White Female United-States 0 +52 0.5777778 0.0710094 0.625 0 0 0.121212125 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +26 0.2888889 0.100991778 0.5625 0 0 0.6060606 Private HS-grad Never-married Other-service Other-relative Asian-Pac-Islander Male ? 0 +52 0.5777778 0.165822163 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.129697815 0.625 0 0 0.3838384 Local-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +19 0.211111113 0.164419875 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +39 0.433333337 0.06640174 0.625 0 0 0.454545468 Local-gov Some-college Divorced Prof-specialty Own-child White Female United-States 0 +47 0.5222222 0.0982592553 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +27 0.3 0.164554581 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative Other Male United-States 0 +48 0.533333361 0.12984331 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +50 0.5555556 0.141081229 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Unmarried White Female United-States 0 +60 0.6666667 0.0169333313 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +28 0.311111122 0.273315579 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +47 0.5222222 0.0360327475 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Other-service Unmarried Black Female United-States 0 +69 0.7666667 0.32104224 0.8125 0 0 0.2020202 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +40 0.444444448 0.109322727 0.5625 0 0 0.6666667 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male South 0 +37 0.411111116 0.186583877 0.5625 0.0388703868 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried White Female Nicaragua 0 +41 0.455555558 0.07392849 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +38 0.422222227 0.08286562 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Trinadad&Tobago 0 +46 0.51111114 0.08075005 0.6875 0 0 0.3030303 Federal-gov Assoc-voc Separated Tech-support Not-in-family Other Female United-States 0 +21 0.233333334 0.2756305 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Never-married Adm-clerical Own-child White Male United-States 0 +44 0.4888889 0.150405645 0.875 0 0 0.4848485 Private Masters Separated Sales Unmarried White Female United-States 0 +38 0.422222227 0.08698698 0.375 0 0 0.353535354 ? 10th Separated ? Own-child White Male United-States 0 +47 0.5222222 0.08028464 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +42 0.466666669 0.031131437 1 0.2782828 0 0.6060606 Private Doctorate Married-spouse-absent Other-service Not-in-family White Male ? 1 +42 0.466666669 0.236519039 0.625 0 0 0.4040404 Local-gov Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +56 0.622222245 0.117553994 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 +32 0.355555564 0.218485162 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +24 0.266666681 0.08524791 0.8125 0 0 0.333333343 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 +26 0.2888889 0.185695484 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.147915587 0.8125 0.0217402168 0 0.5050505 Self-emp-not-inc Bachelors Never-married Sales Not-in-family Black Female United-States 0 +49 0.544444442 0.13502413 0.4375 0 0 0.6060606 Private 11th Never-married Other-service Not-in-family White Male United-States 0 +65 0.722222269 0.104573637 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +73 0.811111152 0.0498684943 0.25 0 0 0.4040404 State-gov 7th-8th Divorced Other-service Not-in-family Asian-Pac-Islander Female United-States 0 +34 0.377777785 0.152418166 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +22 0.244444445 0.142767757 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +49 0.544444442 0.08516574 0.625 0 0 0.3030303 Local-gov Some-college Never-married Other-service Unmarried White Female United-States 0 +25 0.2777778 0.177062109 0.4375 0 0 0.323232323 Private 11th Never-married Other-service Unmarried Black Female United-States 0 +39 0.433333337 0.126670957 0.3125 0 0 0.25252524 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.07647715 0.4375 0 0 0.565656543 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 +24 0.266666681 0.152939469 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +34 0.377777785 0.09227221 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +35 0.3888889 0.08015464 0.5625 0 0 0.3838384 ? HS-grad Widowed ? Own-child White Female United-States 0 +21 0.233333334 0.143063441 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 +43 0.477777779 0.133231863 0.875 0 0 0.4040404 Private Masters Divorced Other-service Unmarried White Female United-States 0 +35 0.3888889 0.0237818286 0.8125 0 0 0.282828271 Federal-gov Bachelors Never-married Tech-support Not-in-family Asian-Pac-Islander Male ? 0 +39 0.433333337 0.09550854 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +48 0.533333361 0.124275871 0.8125 0 0 0.8080808 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +33 0.366666675 0.0836442262 0.75 0 0 0.323232323 Self-emp-not-inc Assoc-acdm Never-married Other-service Not-in-family Black Male United-States 0 +19 0.211111113 0.135880873 0.625 0 0 0.262626261 Private Some-college Never-married Other-service Own-child White Female United-States 0 +17 0.188888893 0.1055671 0.375 0 0 0.121212125 Private 10th Never-married Sales Unmarried White Female United-States 0 +43 0.477777779 0.0318319127 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +62 0.6888889 0.101496935 0.5625 0 0 0.424242437 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +53 0.5888889 0.1574279 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family Black Female United-States 1 +45 0.5 0.0242263619 0.875 0 0 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.107462429 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family Black Female United-States 0 +30 0.333333343 0.128525868 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Female United-States 0 +53 0.5888889 0.143717438 0.5625 0 0 0.333333343 Private HS-grad Separated Sales Not-in-family White Female United-States 0 +24 0.266666681 0.173435137 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Own-child Black Female United-States 0 +41 0.455555558 0.329160333 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +58 0.644444466 0.161247522 0.1875 0 0 0.4040404 Local-gov 5th-6th Divorced Other-service Other-relative Black Female Haiti 0 +27 0.3 0.07084842 0.5625 0.0486504845 0 0.5050505 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +63 0.7 0.0739103 0.5625 0 0 0.3838384 State-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +50 0.5555556 0.1164824 0.625 0 0 0.282828271 Private Some-college Divorced Other-service Own-child White Male United-States 0 +43 0.477777779 0.141374215 0.875 0.0861408561 0 0.474747479 Local-gov Masters Never-married Tech-support Not-in-family Black Female United-States 1 +29 0.322222233 0.0590992831 0.625 0 0 0.6060606 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +41 0.455555558 0.126544327 0.625 0.0394203924 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +55 0.6111111 0.157691255 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +36 0.4 0.18383719 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +23 0.25555557 0.08704221 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +22 0.244444445 0.06758582 0.8125 0.135501355 0 0.5555556 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 1 +58 0.644444466 0.131901622 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +25 0.2777778 0.16963236 0.4375 0 0 0.4040404 Private 11th Never-married Adm-clerical Own-child Black Female United-States 0 +40 0.444444448 0.0696933046 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +38 0.422222227 0.0148460474 0.6875 0 0 0.3939394 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.231507942 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.156507865 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 +55 0.6111111 0.11751695 0.375 0 0 0.2929293 Private 10th Never-married Other-service Not-in-family White Male United-States 0 +55 0.6111111 0.18995221 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.18501319 0.8125 0 0 0.454545468 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +53 0.5888889 0.1695118 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male El-Salvador 0 +32 0.355555564 0.436370879 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male ? 0 +60 0.6666667 0.0864596 0.625 0.0332503319 0 0.424242437 Private Some-college Divorced Prof-specialty Unmarried White Male United-States 0 +32 0.355555564 0.0251767188 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.117013149 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +49 0.544444442 0.238312662 0.625 0 0 0.454545468 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 1 +21 0.233333334 0.1521447 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Other-relative White Female United-States 0 +24 0.266666681 0.09910858 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 +53 0.5888889 0.157458887 0.6875 0.0220202189 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Not-in-family Black Female United-States 0 +29 0.322222233 0.265996963 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male ? 0 +34 0.377777785 0.127083838 0.8125 0 0 0.4040404 Local-gov Bachelors Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 +52 0.5777778 0.07759724 0.9375 0 0 0.4040404 ? Prof-school Married-spouse-absent ? Unmarried Asian-Pac-Islander Female Vietnam 0 +41 0.455555558 0.186698377 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Wife White Female Mexico 0 +21 0.233333334 0.211612418 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +43 0.477777779 0.148700252 0.875 0 0 0.353535354 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.1274792 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Own-child White Male United-States 0 +38 0.422222227 0.0238626525 0.5625 0 0.4687787 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +42 0.466666669 0.103976212 0.8125 0 0.5544077 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.108748876 0.8125 0 0 0.3030303 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 +51 0.566666663 0.169385165 0.25 0 0 0.4040404 Private 7th-8th Widowed Machine-op-inspct Not-in-family Amer-Indian-Eskimo Female United-States 0 +30 0.333333343 0.11957325 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 +24 0.266666681 0.0363318 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +36 0.4 0.07643337 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +57 0.6333333 0.24336417 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.222324982 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.186044365 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +42 0.466666669 0.08153472 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +62 0.6888889 0.07994585 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +64 0.7111111 0.195150554 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +18 0.2 0.160571292 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 +43 0.477777779 0.176491633 0.1875 0 0 0.353535354 Private 5th-6th Married-spouse-absent Farming-fishing Unmarried White Male Mexico 0 +62 0.6888889 0.0181254875 0.25 0 0 0.6666667 Self-emp-not-inc 7th-8th Widowed Other-service Not-in-family White Female United-States 0 +29 0.322222233 0.108543448 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +43 0.477777779 0.170080259 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband Black Male Haiti 1 +39 0.433333337 0.02944154 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +69 0.7666667 0.113036595 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +34 0.377777785 0.127230659 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 +44 0.4888889 0.08086253 0.75 0.04386044 0 0.454545468 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.09032973 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +47 0.5222222 0.111686833 0.625 0 0 0.4040404 Local-gov Some-college Divorced Transport-moving Unmarried White Male United-States 0 +17 0.188888893 0.06678835 0.375 0 0 0.08080808 Private 10th Never-married Other-service Own-child White Male United-States 0 +41 0.455555558 0.0502328761 0.8125 0 0 0.656565666 Local-gov Bachelors Divorced Prof-specialty Unmarried White Male United-States 0 +19 0.211111113 0.205187574 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 +57 0.6333333 0.0820506439 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Other-service Husband Other Male Dominican-Republic 0 +25 0.2777778 0.104305573 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried Black Male United-States 0 +37 0.411111116 0.2461297 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Husband White Male Canada 1 +29 0.322222233 0.123331577 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +32 0.355555564 0.0337966122 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 +35 0.3888889 0.12584655 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.107703552 0.5 0 0 0.4040404 Private 12th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +41 0.455555558 0.109239884 0.5625 0.0183101818 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female Peru 0 +29 0.322222233 0.08655524 0.5625 0 0 0.3838384 Private HS-grad Married-spouse-absent Machine-op-inspct Not-in-family White Female El-Salvador 0 +23 0.25555557 0.09633698 0.875 0 0 0.363636374 Private Masters Never-married Prof-specialty Own-child White Female United-States 0 +31 0.344444454 0.257538021 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.141451 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.197970644 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +21 0.233333334 0.140433967 0.625 0 0 0.1010101 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +37 0.411111116 0.12921153 0.8125 0.0861408561 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 1 +49 0.544444442 0.239763454 0.9375 1 0 0.353535354 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +64 0.7111111 0.136551037 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +37 0.411111116 0.09720585 0.6875 0 0 0.434343427 Local-gov Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +70 0.7777778 0.104492813 0.8125 0 0.5456841 0.121212125 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.107846342 0.375 0 0 0.3030303 Private 10th Never-married Transport-moving Own-child Asian-Pac-Islander Male United-States 0 +29 0.322222233 0.128274649 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male Germany 0 +37 0.411111116 0.1433955 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.07791245 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +38 0.422222227 0.169899076 0.4375 0 0 0.656565666 Private 11th Divorced Machine-op-inspct Not-in-family White Male United-States 0 +27 0.3 0.142816931 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +58 0.644444466 0.1334575 0.8125 0 0 0.353535354 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +60 0.6666667 0.0765525848 0.625 0 0 0.353535354 Local-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +20 0.222222224 0.0218400285 0.625 0 0 0.25252524 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +51 0.566666663 0.066539146 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.137285188 0.3125 0 0 0.656565666 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +22 0.244444445 0.125704437 0.5 0 0 0.5050505 State-gov 12th Never-married Exec-managerial Not-in-family White Male United-States 1 +56 0.622222245 0.08429082 0.375 0 0 0.6060606 Self-emp-not-inc 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +26 0.2888889 0.166669473 0.8125 0.05178052 0 0.424242437 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 +19 0.211111113 0.0654776543 0.625 0 0 0.25252524 Private Some-college Separated Sales Unmarried White Female United-States 0 +37 0.411111116 0.222822726 0.6875 0 0 0.3030303 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 0 +27 0.3 0.135247067 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +27 0.3 0.105250537 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child Amer-Indian-Eskimo Male United-States 0 +52 0.5777778 0.04866758 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +45 0.5 0.244551614 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried Black Female United-States 0 +28 0.311111122 0.0174815878 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child Amer-Indian-Eskimo Male United-States 0 +20 0.222222224 0.225386873 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.07352437 0.875 0 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +44 0.4888889 0.3837537 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +30 0.333333343 0.141374886 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.183865488 0.75 0 0 0.08080808 State-gov Assoc-acdm Never-married Adm-clerical Own-child Black Female United-States 0 +55 0.6111111 0.03520363 0.875 0 0 0.181818187 ? Masters Married-civ-spouse ? Husband White Male United-States 0 +46 0.51111114 0.05586699 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +51 0.566666663 0.07048606 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.03936203 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +43 0.477777779 0.18167448 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Other-service Not-in-family White Male United-States 0 +19 0.211111113 0.08651753 0.5625 0 0 0.282828271 ? HS-grad Never-married ? Own-child White Female United-States 0 +36 0.4 0.120877884 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.123311371 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +48 0.533333361 0.0693322942 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Unmarried Asian-Pac-Islander Female Vietnam 0 +30 0.333333343 0.105939567 0.4375 0 0 0.4040404 ? 11th Never-married ? Unmarried White Male United-States 0 +24 0.266666681 0.242356569 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.1048417 0.5625 0 0 0.363636374 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +24 0.266666681 0.3941544 0.8125 0.07688077 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +62 0.6888889 0.11692626 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +41 0.455555558 0.144500762 0.5625 0 0.365013778 0.4040404 Self-emp-not-inc HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +49 0.544444442 0.110023208 0.9375 0 0 0.858585835 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.103708148 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +47 0.5222222 0.166818321 0.875 0.0545505434 0 0.454545468 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +49 0.544444442 0.104648404 0.875 0 0 0.4040404 State-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +52 0.5777778 0.222086549 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +52 0.5777778 0.109500542 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +26 0.2888889 0.118892305 0.5625 0 0 0.535353541 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +51 0.566666663 0.152814865 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +18 0.2 0.08135017 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Male United-States 0 +30 0.333333343 0.253132433 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +46 0.51111114 0.138414025 0.5625 0 0 0.2020202 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +28 0.311111122 0.133907408 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Female United-States 0 +48 0.533333361 0.171273753 0.8125 0.07298073 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.107703552 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +49 0.544444442 0.02694138 0.8125 0.0406404063 0 0.444444448 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +69 0.7666667 0.0692891851 0.5625 0 0 0.24242425 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.07906015 0.8125 0.0861408561 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +78 0.8666667 0.121397182 0.875 0 0 0.4040404 Private Masters Widowed Craft-repair Unmarried Asian-Pac-Islander Male South 0 +61 0.677777767 0.3634143 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.176170349 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +29 0.322222233 0.0545946844 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +36 0.4 0.107846342 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband Other Male ? 0 +17 0.188888893 0.0282743033 0.375 0 0 0.4040404 Private 10th Never-married Farming-fishing Own-child White Male United-States 0 +27 0.3 0.185296074 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 +64 0.7111111 0.178931847 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.130157843 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Never-married Exec-managerial Not-in-family White Male France 0 +32 0.355555564 0.159319863 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Other-relative White Male Mexico 0 +19 0.211111113 0.0198760033 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +42 0.466666669 0.07126264 0.4375 0 0 0.4040404 State-gov 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +24 0.266666681 0.1310725 0.8125 0 0 0.151515156 Private Bachelors Never-married Sales Own-child White Female United-States 0 +23 0.25555557 0.6995013 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family Black Male United-States 0 +51 0.566666663 0.140984237 0.9375 0.0332503319 0 0.4040404 Local-gov Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 +31 0.344444454 0.13014774 0.8125 0.0332503319 0 0.6060606 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +44 0.4888889 0.2070903 0.9375 0 0 0.2929293 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.1723851 0.875 0.105201051 0 0.5050505 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 +44 0.4888889 0.07263733 0.75 0 0 0.565656543 Local-gov Assoc-acdm Divorced Protective-serv Not-in-family White Female United-States 1 +44 0.4888889 0.3824248 0.1875 0 0 0.4040404 Self-emp-not-inc 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +38 0.422222227 0.0618688576 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.4934105 0.3125 0 0 0.4040404 Private 9th Divorced Adm-clerical Unmarried White Female United-States 0 +29 0.322222233 0.0583368428 0.125 0 0 0.2020202 Private 1st-4th Never-married Other-service Not-in-family White Male El-Salvador 0 +46 0.51111114 0.0242209733 0.75 0 0 0.25252524 Private Assoc-acdm Divorced Sales Not-in-family White Female Germany 0 +47 0.5222222 0.07729077 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +30 0.333333343 0.158364117 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +37 0.411111116 0.147160545 0.5625 0.07688077 0 0.353535354 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +27 0.3 0.221879765 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +43 0.477777779 0.121919848 0.5625 0 0 0.5050505 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +44 0.4888889 0.178311527 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.256719679 0.625 0 0 0.6060606 Private Some-college Never-married Exec-managerial Unmarried White Male United-States 0 +34 0.377777785 0.127809227 0.8125 0 0.453856736 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.155227467 0.8125 0 0.2506887 0.4040404 Private Bachelors Never-married Sales Own-child White Male Germany 0 +36 0.4 0.147195578 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Female United-States 0 +57 0.6333333 0.201054752 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +78 0.8666667 0.07488962 0.25 0 0 0.353535354 Private 7th-8th Never-married Machine-op-inspct Not-in-family White Female Dominican-Republic 0 +24 0.266666681 0.113825306 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.113755934 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.100901529 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Own-child White Male United-States 0 +34 0.377777785 0.231745034 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Male United-States 1 +22 0.244444445 0.280301481 0.625 0 0 0.323232323 Private Some-college Never-married Sales Unmarried White Female United-States 0 +36 0.4 0.0279449467 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +61 0.677777767 0.02712256 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +67 0.7444445 0.1638413 0.3125 0 0 0.151515156 ? 9th Married-civ-spouse ? Husband White Male United-States 0 +42 0.466666669 0.168744639 0.625 0 0 0.212121218 Private Some-college Separated Other-service Unmarried Black Female Haiti 0 +49 0.544444442 0.0711158141 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 1 +58 0.644444466 0.0346863531 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.12788938 0.625 0 0 0.6060606 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +39 0.433333337 0.120886646 0.5625 0.046500463 0 0.444444448 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 +25 0.2777778 0.201902062 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Other-relative Black Female Jamaica 0 +45 0.5 0.104845069 0.1875 0 0 0.4040404 Self-emp-inc 5th-6th Married-civ-spouse Craft-repair Husband White Male ? 1 +30 0.333333343 0.0367803723 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +49 0.544444442 0.117667824 0.625 0 0 0.353535354 ? Some-college Never-married ? Not-in-family White Male United-States 0 +36 0.4 0.1919708 0.5625 0.0288502872 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.1354781 0.5625 0 0 0.656565666 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +51 0.566666663 0.08472794 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female Jamaica 0 +55 0.6111111 0.167758584 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.0667849854 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +45 0.5 0.06382009 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Adm-clerical Husband White Male India 0 +36 0.4 0.07484854 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.106342338 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.0499722175 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.113282442 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.0190839265 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.05676414 0.625 0.07688077 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male ? 1 +44 0.4888889 0.4857268 0.625 0 0 0.4040404 Private Some-college Separated Machine-op-inspct Not-in-family Black Male United-States 0 +36 0.4 0.126670957 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.09778239 0.625 0 0 0.3030303 Private Some-college Divorced Craft-repair Unmarried Black Female United-States 0 +17 0.188888893 0.0356751 0.375 0 0 0.0606060624 Private 10th Never-married Other-service Own-child White Female United-States 0 +18 0.2 0.119604908 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Own-child White Female United-States 0 +30 0.333333343 0.124862514 0.625 0 0 0.25252524 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +66 0.733333349 0.044458665 0.5625 0 0 0.5050505 Private HS-grad Widowed Priv-house-serv Not-in-family White Female England 0 +59 0.655555546 0.221632585 0.8125 0 0 0.5050505 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.234930173 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +50 0.5555556 0.0230571069 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +24 0.266666681 0.343252718 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.01882933 0.9375 0 0 1 Private Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 0 +44 0.4888889 0.056095995 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +25 0.2777778 0.208188161 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Male United-States 0 +45 0.5 0.127264336 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.151017889 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +67 0.7444445 0.150130168 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +40 0.444444448 0.08305085 0.9375 0 0 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.1881431 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +34 0.377777785 0.233828276 1 0 0 0.5050505 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 +37 0.411111116 0.169323877 0.75 0 0 0.454545468 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male Canada 1 +17 0.188888893 0.09633833 0.375 0 0 0.04040404 Self-emp-inc 10th Never-married Other-service Own-child White Male United-States 0 +25 0.2777778 0.03881916 0.6875 0 0 0.424242437 Private Assoc-voc Married-civ-spouse Sales Wife White Female United-States 1 +35 0.3888889 0.109551057 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male Puerto-Rico 0 +63 0.7 0.0190839265 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 1 +38 0.422222227 0.05696081 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Own-child Amer-Indian-Eskimo Female United-States 0 +33 0.366666675 0.121971034 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male Iran 1 +51 0.566666663 0.07913761 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +64 0.7111111 0.145591214 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male Columbia 1 +50 0.5555556 0.1377021 0.625 0 0 0.4040404 Self-emp-inc Some-college Divorced Protective-serv Not-in-family White Male United-States 0 +18 0.2 0.252554566 0.375 0 0 0.565656543 Private 10th Never-married Transport-moving Not-in-family White Male United-States 0 +67 0.7444445 0.02358381 0.875 0 0 1 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +46 0.51111114 0.121147975 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +60 0.6666667 0.0927679241 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +29 0.322222233 0.130076349 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +30 0.333333343 0.06981117 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Female United-States 0 +56 0.622222245 0.03654598 1 0.0288502872 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Not-in-family Asian-Pac-Islander Male China 0 +29 0.322222233 0.133314028 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Wife White Female Mexico 1 +37 0.411111116 0.168195039 0.8125 0 0 0.272727281 Private Bachelors Never-married Adm-clerical Unmarried Black Female United-States 0 +55 0.6111111 0.150611073 0.125 0 0 0.3030303 Private 1st-4th Divorced Priv-house-serv Unmarried White Female Cuba 0 +24 0.266666681 0.175028041 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.203201309 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male Mexico 0 +46 0.51111114 0.1865246 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +25 0.2777778 0.266390979 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Other-relative Other Male Mexico 0 +40 0.444444448 0.113201618 0.5625 0 0 0.282828271 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +23 0.25555557 0.0305225626 0.625 0 0 0.4040404 Private Some-college Separated Sales Own-child White Female United-States 0 +43 0.477777779 0.209588438 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Never-married Transport-moving Not-in-family Black Male United-States 0 +29 0.322222233 0.128399923 0.625 0 0.3409091 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 1 +59 0.655555546 0.14907743 0.375 0 0 0.4040404 Private 10th Widowed Other-service Other-relative Asian-Pac-Islander Female Philippines 0 +18 0.2 0.08128955 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child Black Male ? 0 +28 0.311111122 0.07233019 0.5625 0 0 0.323232323 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 +17 0.188888893 0.197641954 0.4375 0 0 0.151515156 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 +53 0.5888889 0.09793798 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +22 0.244444445 0.144070372 0.1875 0 0 0.4040404 Private 5th-6th Never-married Priv-house-serv Other-relative White Female El-Salvador 0 +63 0.7 0.067420125 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.129221633 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Sales Wife White Female United-States 1 +40 0.444444448 0.157533661 0.5625 0 0 0.353535354 Local-gov HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +61 0.677777767 0.06470848 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male England 1 +35 0.3888889 0.319346935 0.5625 0 0.323232323 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +43 0.477777779 0.239681289 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Philippines 0 +20 0.222222224 0.09745034 0.625 0 0.3677686 0.4040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Female Taiwan 0 +48 0.533333361 0.09376408 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +56 0.622222245 0.09694249 0.8125 0 0 0.4040404 State-gov Bachelors Widowed Prof-specialty Not-in-family White Female United-States 0 +51 0.566666663 0.10823901 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +34 0.377777785 0.128841087 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.04629135 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Sales Husband Asian-Pac-Islander Male United-States 1 +61 0.677777767 0.08081471 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 +37 0.411111116 0.153259411 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.0220757667 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.154159248 0.625 0 0 0.4040404 Private Some-college Separated Machine-op-inspct Not-in-family Other Male United-States 0 +23 0.25555557 0.0570133477 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 +63 0.7 0.0686978251 0.875 0 0 0.4040404 Federal-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 1 +63 0.7 0.0464428961 0.5625 0 0 0.111111112 ? HS-grad Widowed ? Not-in-family Black Female United-States 0 +47 0.5222222 0.191997737 0.875 0 0.453856736 0.414141417 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.14115195 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Divorced Sales Unmarried White Female United-States 1 +31 0.344444454 0.223024786 0.8125 0 0 0.4848485 Local-gov Bachelors Never-married Protective-serv Own-child Black Male United-States 0 +27 0.3 0.188503444 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +58 0.644444466 0.101407349 0.8125 0.14084141 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 1 +28 0.311111122 0.125039652 0.625 0 0 0.4848485 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +52 0.5777778 0.08679906 0.25 0 0 0.646464646 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Female United-States 0 +31 0.344444454 0.260207266 0.5625 0 0 0.5050505 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +53 0.5888889 0.07935179 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.148587763 0.625 0 0 0.5050505 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 +43 0.477777779 0.07881835 0.5625 0 0 0.4040404 Local-gov HS-grad Married-spouse-absent Farming-fishing Unmarried Black Male United-States 0 +50 0.5555556 0.119047895 0.875 0 0 0.8080808 Self-emp-inc Masters Divorced Exec-managerial Not-in-family White Male United-States 1 +68 0.75555557 0.051438503 0.5625 0 0 0.353535354 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +37 0.411111116 0.0541589074 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 +26 0.2888889 0.0856749341 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +22 0.244444445 0.08181491 0.4375 0 0 0.4040404 Private 11th Never-married Sales Not-in-family White Female United-States 0 +22 0.244444445 0.147561982 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +59 0.655555546 0.182912439 0.625 0.1502415 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.162714481 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +24 0.266666681 0.2520723 0.5625 0 0 0.5555556 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.1448052 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.134703532 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Protective-serv Not-in-family White Male United-States 1 +38 0.422222227 0.303712875 0.5 0.0394203924 0 0.4040404 Private 12th Married-civ-spouse Other-service Husband White Male United-States 0 +29 0.322222233 0.08106594 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +76 0.844444454 0.0627229 0.5625 0.014240142 0 0.24242425 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.126296476 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Unmarried White Male United-States 0 +65 0.722222269 0.164052129 0.625 0 0 0.24242425 Private Some-college Widowed Other-service Unmarried White Female United-States 0 +43 0.477777779 0.199036181 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.0200255271 0.8125 0 0 0.24242425 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +32 0.355555564 0.142616212 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +37 0.411111116 0.169323877 0.75 0 0 0.656565666 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +64 0.7111111 0.3217454 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +49 0.544444442 0.102097049 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.1305862 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +68 0.75555557 0.07916859 0.5625 0.01409014 0 0.151515156 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +34 0.377777785 0.163305178 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.277088732 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +53 0.5888889 0.128661931 0.625 0 0 0.434343427 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.1041089 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Sales Unmarried Asian-Pac-Islander Male South 0 +31 0.344444454 0.140537679 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +25 0.2777778 0.0199359469 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.28538397 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +29 0.322222233 0.08217121 0.625 0 0 0.6060606 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +37 0.411111116 0.100074425 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +42 0.466666669 0.15018338 1 0 0 0.454545468 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.100436114 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 +32 0.355555564 0.147104651 0.625 0 0 0.7070707 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Male Cuba 0 +47 0.5222222 0.07557057 0.8125 0.105201051 0 0.454545468 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family Black Male United-States 1 +44 0.4888889 0.0576572455 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 +19 0.211111113 0.07491859 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +22 0.244444445 0.0668139458 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +51 0.566666663 0.134703532 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 1 +69 0.7666667 0.08274371 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +73 0.811111152 0.06099326 0.4375 0 0 0.08080808 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +18 0.2 0.183157608 0.4375 0 0 0.2020202 ? 11th Never-married ? Other-relative White Female United-States 0 +33 0.366666675 0.2434807 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +22 0.244444445 0.268753737 0.625 0 0 0.5555556 Local-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +33 0.366666675 0.232555971 0.8125 0 0 0.454545468 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 1 +20 0.222222224 0.03720133 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Other-relative White Female United-States 0 +28 0.311111122 0.135053769 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.126704633 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 +27 0.3 0.1190021 0.5625 0 0 0.4848485 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +22 0.244444445 0.208242044 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +67 0.7444445 0.0269555245 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +31 0.344444454 0.03362486 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.0246749353 0.625 0 0 0.25252524 ? Some-college Never-married ? Unmarried White Female United-States 0 +43 0.477777779 0.219374225 0.9375 0 0 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +33 0.366666675 0.0837924 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.203116447 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 1 +27 0.3 0.228972092 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +36 0.4 0.1187677 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +33 0.366666675 0.133664265 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Sales Not-in-family White Female United-States 0 +63 0.7 0.14409934 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male Iran 1 +48 0.533333361 0.11571794 0.8125 0 0 0.565656543 Private Bachelors Divorced Other-service Unmarried White Female United-States 1 +25 0.2777778 0.244375825 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +41 0.455555558 0.231917456 0.5625 0 0 0.1010101 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +26 0.2888889 0.09273088 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +23 0.25555557 0.118154116 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +33 0.366666675 0.0493673831 0.5625 0.0183101818 0 0.4040404 State-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 +30 0.333333343 0.0926871 0.875 0 0 0.171717167 State-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 0 +67 0.7444445 0.238704 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Widowed Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.08759788 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +48 0.533333361 0.24441421 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 +51 0.566666663 0.03301464 0.5625 0 0 0.24242425 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +39 0.433333337 0.100991778 0.875 0 0 0.4040404 Private Masters Never-married Sales Not-in-family Asian-Pac-Islander Male China 0 +40 0.444444448 0.06680452 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +40 0.444444448 0.198496 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 +19 0.211111113 0.153726161 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male Mexico 0 +28 0.311111122 0.105623007 0.5625 0 0 0.363636374 Private HS-grad Divorced Handlers-cleaners Unmarried White Female United-States 0 +47 0.5222222 0.224103108 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.195287287 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +41 0.455555558 0.07819937 0.5625 0.009140091 0 0.4040404 Private HS-grad Widowed Exec-managerial Other-relative White Male United-States 0 +29 0.322222233 0.0162678789 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife Amer-Indian-Eskimo Female United-States 0 +40 0.444444448 0.184161171 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +61 0.677777767 0.155709729 0.5625 0 0 0.4040404 Private HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 +25 0.2777778 0.211442679 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family White Male Mexico 0 +26 0.2888889 0.07710825 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +43 0.477777779 0.109185331 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +17 0.188888893 0.113697335 0.25 0 0 0.454545468 Private 7th-8th Never-married Craft-repair Not-in-family White Male United-States 0 +43 0.477777779 0.09687312 0.875 0.09562095 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried Black Female United-States 1 +73 0.811111152 0.163513288 0.5625 0.0347103477 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male England 0 +46 0.51111114 0.07513816 0.625 0 0 0.4040404 Local-gov Some-college Divorced Machine-op-inspct Own-child White Female United-States 0 +19 0.211111113 0.0469925 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +37 0.411111116 0.196659267 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +26 0.2888889 0.06901035 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +47 0.5222222 0.102097049 0.5625 0 0.430670351 0.4040404 Private HS-grad Divorced Sales Own-child White Male United-States 0 +47 0.5222222 0.193519935 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +29 0.322222233 0.07791245 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +29 0.322222233 0.161400422 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +33 0.366666675 0.275591463 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Own-child White Male United-States 0 +20 0.222222224 0.125849247 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Other-relative White Male United-States 0 +28 0.311111122 0.08005698 0.375 0 0 0.4848485 Private 10th Married-civ-spouse Craft-repair Wife Other Female Guatemala 0 +26 0.2888889 0.09610596 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male ? 0 +41 0.455555558 0.115123212 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +67 0.7444445 0.184852213 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +43 0.477777779 0.103380136 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.125606775 0.3125 0 0 0.464646459 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +18 0.2 0.1295941 0.5 0 0 0.25252524 Private 12th Never-married Other-service Own-child White Female United-States 0 +55 0.6111111 0.227384567 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 +44 0.4888889 0.1317063 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child Black Female United-States 0 +64 0.7111111 0.041686397 0.5625 0 0 0.151515156 Private HS-grad Widowed Priv-house-serv Not-in-family White Female United-States 0 +34 0.377777785 0.118337989 0.6875 0 0 0.75757575 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.05408684 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +25 0.2777778 0.282654136 0.5625 0 0 0.08080808 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +21 0.233333334 0.214967281 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child Black Male United-States 0 +37 0.411111116 0.08536578 0.125 0 0 0.535353541 Private 1st-4th Married-civ-spouse Other-service Husband White Male Mexico 0 +39 0.433333337 0.203116447 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 +34 0.377777785 0.08113464 0.625 0 0 0.5050505 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +23 0.25555557 0.1806049 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +54 0.6 0.173325345 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +49 0.544444442 0.14370127 0.875 0 0 0.7070707 Self-emp-inc Masters Separated Exec-managerial Not-in-family White Male United-States 1 +25 0.2777778 0.204371244 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +51 0.566666663 0.08416689 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.106565282 0.5625 0 0 0.353535354 Private HS-grad Never-married Farming-fishing Unmarried White Male United-States 0 +27 0.3 0.372783154 0.8125 0 0 0.4848485 State-gov Bachelors Married-civ-spouse Protective-serv Wife Black Female United-States 0 +53 0.5888889 0.031086985 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Priv-house-serv Other-relative White Female United-States 0 +68 0.75555557 0.0934286639 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +56 0.622222245 0.156112492 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.334351957 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male ? 0 +24 0.266666681 0.0130733047 0.5625 0 0 0.4848485 Private HS-grad Divorced Sales Unmarried Amer-Indian-Eskimo Female United-States 0 +70 0.7777778 0.0191762 0.3125 0 0 0.25252524 ? 9th Widowed ? Unmarried White Female United-States 0 +24 0.266666681 0.12515685 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +74 0.822222233 0.183650628 0.75 0 0 0.2020202 ? Assoc-acdm Widowed ? Not-in-family White Female United-States 0 +23 0.25555557 0.130686566 0.625 0 0 0.25252524 ? Some-college Never-married ? Not-in-family White Female United-States 0 +41 0.455555558 0.09765913 0.875 0 0 0.5555556 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +45 0.5 0.109445311 0.5625 0 0 0.1919192 Private HS-grad Never-married Sales Own-child White Female United-States 0 +35 0.3888889 0.115826376 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +21 0.233333334 0.156643242 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +45 0.5 0.108990677 0.4375 0 0 0.25252524 Private 11th Separated Adm-clerical Unmarried Black Female United-States 0 +18 0.2 0.08307576 0.4375 0 0 0.3030303 Private 11th Never-married Sales Not-in-family White Female United-States 0 +49 0.544444442 0.07102354 0.8125 0 0 0.25252524 Private Bachelors Never-married Priv-house-serv Not-in-family White Male United-States 0 +49 0.544444442 0.122392669 0.6875 0 0 0.363636374 Private Assoc-voc Separated Prof-specialty Own-child White Female United-States 0 +45 0.5 0.0689423159 0.8125 0 0 0.373737365 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +27 0.3 0.04909191 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative Asian-Pac-Islander Male United-States 0 +28 0.311111122 0.1041089 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Philippines 0 +35 0.3888889 0.171879932 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.117726423 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +35 0.3888889 0.07435955 0.4375 0 0 0.353535354 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 +19 0.211111113 0.1404407 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +33 0.366666675 0.0821065456 0.625 0 0 0.282828271 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +28 0.311111122 0.0231258068 0.5625 0.14084141 0 0.4040404 Private HS-grad Divorced Sales Not-in-family Amer-Indian-Eskimo Male United-States 1 +49 0.544444442 0.03999448 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 +61 0.677777767 0.09111911 0.5625 0 0.597566545 0.323232323 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +39 0.433333337 0.08531998 0.625 0 0 0.25252524 Self-emp-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +22 0.244444445 0.14640148 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +42 0.466666669 0.0618547127 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.12447793 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +18 0.2 0.119984783 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +49 0.544444442 0.0689423159 0.3125 0 0.5121671 0.4040404 Local-gov 9th Widowed Handlers-cleaners Unmarried White Male United-States 1 +33 0.366666675 0.189823568 1 0 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male Cuba 1 +28 0.311111122 0.06481153 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.131422743 0.25 0 0 0.353535354 Private 7th-8th Married-spouse-absent Prof-specialty Other-relative White Male Puerto-Rico 0 +20 0.222222224 0.03793481 0.625 0.0217602178 0 0.25252524 Private Some-college Never-married Other-service Own-child White Male United-States 0 +50 0.5555556 0.0656352639 0.625 0 0 0.4848485 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +32 0.355555564 0.22884883 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.142065942 0.5625 0 0 0.4040404 Federal-gov HS-grad Separated Handlers-cleaners Unmarried White Female United-States 0 +29 0.322222233 0.134369463 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family Black Male United-States 0 +46 0.51111114 0.128462553 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +32 0.355555564 0.1289044 1 0 0 0.7777778 Self-emp-inc Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 +61 0.677777767 0.130314782 0.5625 0 0 0.24242425 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.151656389 0.4375 0 0 0.5555556 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.233558863 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 +39 0.433333337 0.102584019 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +18 0.2 0.0538760237 0.4375 0 0 0.353535354 ? 11th Never-married ? Own-child White Male United-States 0 +42 0.466666669 0.114937983 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +23 0.25555557 0.132825717 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +32 0.355555564 0.154732421 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +52 0.5777778 0.1376718 0.5625 0 0 0.858585835 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +36 0.4 0.121953525 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +38 0.422222227 0.120952651 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male ? 1 +50 0.5555556 0.160118684 0.5625 0 0.5610652 0.727272749 Private HS-grad Widowed Sales Not-in-family White Female United-States 1 +23 0.25555557 0.110846266 0.75 0 0 0.4040404 ? Assoc-acdm Never-married ? Own-child White Male United-States 0 +71 0.788888931 0.120949283 0.9375 0 0 0.121212125 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.129171789 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Other-relative Black Female United-States 0 +56 0.622222245 0.098780565 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.0780929551 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Prof-specialty Unmarried White Male United-States 0 +45 0.5 0.14203158 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.09287906 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +28 0.311111122 0.146133408 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +18 0.2 0.135753572 0.625 0 0 0.151515156 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 +62 0.6888889 0.0390447937 0.25 0 0 0.4040404 Private 7th-8th Divorced Handlers-cleaners Not-in-family White Male United-States 0 +35 0.3888889 0.140349776 0.5 0 0 0.4040404 Private 12th Separated Machine-op-inspct Unmarried White Female United-States 0 +39 0.433333337 0.0413166247 0.375 0 0 0.6060606 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +24 0.266666681 0.191197589 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family Black Male United-States 0 +58 0.644444466 0.1519514 0.3125 0 0 0.4040404 Private 9th Divorced Farming-fishing Not-in-family Black Male United-States 0 +48 0.533333361 0.270311624 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +57 0.6333333 0.187396154 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.0979164243 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.080984436 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.126095757 0.8125 0.1502415 0 0.363636374 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +29 0.322222233 0.0970314 0.25 0 0 0.727272749 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +38 0.422222227 0.160786822 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Unmarried Black Female United-States 0 +21 0.233333334 0.111079305 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +34 0.377777785 0.102709293 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +50 0.5555556 0.06261715 0.8125 0 0 0.323232323 Private Bachelors Never-married Sales Unmarried White Female United-States 0 +50 0.5555556 0.0921637639 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried Black Female United-States 0 +49 0.544444442 0.145788565 0.6875 0 0 0.454545468 Federal-gov Assoc-voc Divorced Exec-managerial Unmarried Black Female United-States 0 +30 0.333333343 0.235163212 0.8125 0 0 0.7070707 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +29 0.322222233 0.208539754 0.875 0 0 0.2020202 State-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 0 +22 0.244444445 0.234257311 0.625 0 0 0.2020202 State-gov Some-college Never-married Adm-clerical Not-in-family Other Male United-States 0 +42 0.466666669 0.0579205975 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.112768531 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +31 0.344444454 0.1108429 0.625 0 0 0.4848485 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +42 0.466666669 0.207636535 0.8125 0 0 0.212121218 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +20 0.222222224 0.03793481 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +51 0.566666663 0.1367376 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +50 0.5555556 0.142556265 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.08090901 0.3125 0 0 0.4040404 Self-emp-inc 9th Never-married Craft-repair Own-child White Male United-States 0 +26 0.2888889 0.161003709 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family White Male United-States 0 +61 0.677777767 0.121075235 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +20 0.222222224 0.2101542 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Own-child White Male Germany 0 +51 0.566666663 0.173425034 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +52 0.5777778 0.03316686 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.154721648 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +31 0.344444454 0.230127871 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male India 0 +24 0.266666681 0.0217625722 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +56 0.622222245 0.185380936 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.269653559 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +29 0.322222233 0.124331772 0.4375 0.0394203924 0 0.5050505 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.125889659 0.5625 0.010550105 0 0.3030303 Private HS-grad Never-married Sales Other-relative White Female United-States 0 +43 0.477777779 0.102660127 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +43 0.477777779 0.176418215 1 0.25236252 0 0.646464646 State-gov Doctorate Married-spouse-absent Prof-specialty Unmarried White Male United-States 1 +21 0.233333334 0.1585783 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +51 0.566666663 0.108904466 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +20 0.222222224 0.117157958 0.4375 0 0 0.3939394 ? 11th Married-civ-spouse ? Other-relative White Female United-States 0 +41 0.455555558 0.239723042 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +45 0.5 0.133804366 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.0826083347 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +28 0.311111122 0.284209341 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +50 0.5555556 0.174699351 0.875 0.1502415 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +47 0.5222222 0.05004698 0.8125 0 0 0.4040404 Private Bachelors Divorced Craft-repair Not-in-family White Male United-States 0 +80 0.8888889 0.0231291745 0.25 0 0 0.353535354 Self-emp-not-inc 7th-8th Widowed Farming-fishing Not-in-family White Male United-States 0 +47 0.5222222 0.123089775 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female Iran 0 +19 0.211111113 0.032594353 0.625 0 0 0.8484849 ? Some-college Never-married ? Own-child White Male United-States 0 +45 0.5 0.02306721 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +17 0.188888893 0.12573339 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +37 0.411111116 0.113053434 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.09864586 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 +17 0.188888893 0.1412065 0.5 0 0 0.161616161 Private 12th Never-married Other-service Own-child White Male United-States 0 +18 0.2 0.08957066 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +57 0.6333333 0.06360119 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +26 0.2888889 0.170004144 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +26 0.2888889 0.117593735 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Own-child White Female United-States 0 +36 0.4 0.101920582 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.0250804033 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +38 0.422222227 0.0681563 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +77 0.8555556 0.102983423 0.1875 0 0 0.2020202 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 0 +51 0.566666663 0.0633668 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 +24 0.266666681 0.221867651 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +35 0.3888889 0.07141352 0.5625 0 0 0.656565666 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +35 0.3888889 0.111042939 0.375 0 0 1 ? 10th Divorced ? Not-in-family White Male United-States 0 +51 0.566666663 0.11301437 0.8125 0.1502415 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.0934138447 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.117173448 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +43 0.477777779 0.1537814 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.06505333 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +42 0.466666669 0.10546203 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Wife White Female Puerto-Rico 0 +58 0.644444466 0.141895533 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +52 0.5777778 0.0927813947 0.5625 0 0 0.2020202 Local-gov HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 +29 0.322222233 0.0201151073 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Not-in-family Amer-Indian-Eskimo Female United-States 0 +27 0.3 0.1320424 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.208118781 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female Jamaica 0 +59 0.655555546 0.107097372 0.75 0.07298073 0 0.2020202 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.244150192 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +24 0.266666681 0.0635782853 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +20 0.222222224 0.215562686 0.375 0 0 0.4040404 Private 10th Married-spouse-absent Handlers-cleaners Not-in-family White Male United-States 0 +54 0.6 0.06636672 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +65 0.722222269 0.123371311 0.5625 0 0 0.25252524 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +18 0.2 0.2232841 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 +38 0.422222227 0.131801262 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.120053478 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.08609994 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +36 0.4 0.181667075 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Other-service Husband White Male United-States 0 +55 0.6111111 0.09215231 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +22 0.244444445 0.138481379 0.1875 0 0 0.3030303 Private 5th-6th Never-married Machine-op-inspct Not-in-family White Male Mexico 0 +28 0.311111122 0.08895909 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +20 0.222222224 0.158199787 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 +24 0.266666681 0.132562369 0.8125 0.03908039 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +36 0.4 0.160262823 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +68 0.75555557 0.09486868 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +49 0.544444442 0.07113467 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 1 +18 0.2 0.05623474 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Own-child White Male United-States 0 +50 0.5555556 0.152065232 1 0 0 0.6060606 Self-emp-not-inc Doctorate Divorced Prof-specialty Not-in-family White Female United-States 1 +37 0.411111116 0.163475573 0.5 0 0 0.4040404 Private 12th Separated Priv-house-serv Unmarried Black Female United-States 0 +60 0.6666667 0.239687353 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.1167343 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.0240195878 1 0 0 0.7070707 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 +17 0.188888893 0.20020543 0.4375 0 0 0.09090909 Private 11th Never-married Priv-house-serv Own-child White Female United-States 0 +43 0.477777779 0.07337821 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +39 0.433333337 0.07554228 0.625 0 0 0.262626261 Private Some-college Married-civ-spouse Sales Husband White Male ? 0 +21 0.233333334 0.03859218 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.07767402 1 0 0 0.07070707 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Male ? 0 +48 0.533333361 0.110851653 0.625 0.07298073 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +56 0.622222245 0.1987378 0.8125 0.14084141 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +21 0.233333334 0.119394094 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.22667332 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband Asian-Pac-Islander Male Hong 1 +39 0.433333337 0.0356097668 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.2133892 0.25 0.0406404063 0 0.4040404 Private 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.134809941 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 0 +59 0.655555546 0.305156261 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.0182972383 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +19 0.211111113 0.201789588 0.5625 0 0 0.161616161 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +23 0.25555557 0.08220354 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +31 0.344444454 0.232555971 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +42 0.466666669 0.0762084052 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband Black Male United-States 0 +43 0.477777779 0.0229048878 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.171760723 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.102826491 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +21 0.233333334 0.155622169 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +34 0.377777785 0.06981252 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.08361055 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.133483082 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 +29 0.322222233 0.123679116 0.5625 0.031370312 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Ireland 0 +19 0.211111113 0.314175546 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +45 0.5 0.07704965 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +42 0.466666669 0.12553066 0.8125 0 0 0.727272749 Private Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 1 +32 0.355555564 0.19597429 0.8125 0 0.365013778 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +90 1 0.190000713 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +44 0.4888889 0.164998442 0.8125 0 0 0.444444448 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +34 0.377777785 0.07724834 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.07217596 0.5 0 0 0.3030303 Private 12th Separated Other-service Not-in-family White Female United-States 0 +39 0.433333337 0.09602783 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +29 0.322222233 0.137288556 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 +24 0.266666681 0.0321888849 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +49 0.544444442 0.0900711 0.625 0 0 0.171717167 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +52 0.5777778 0.0911554843 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male ? 1 +54 0.6 0.09146801 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male South 1 +31 0.344444454 0.08661047 0.3125 0 0 0.4040404 Private 9th Divorced Transport-moving Not-in-family White Male United-States 0 +44 0.4888889 0.09015461 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +18 0.2 0.09251872 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 +27 0.3 0.164052129 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.08025567 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +30 0.333333343 0.263428777 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +27 0.3 0.1700715 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Own-child White Female United-States 0 +34 0.377777785 0.0791423246 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male Italy 0 +25 0.2777778 0.07936459 0.625 0 0 0.1919192 State-gov Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +39 0.433333337 0.1981424 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +28 0.311111122 0.265996963 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +51 0.566666663 0.174662977 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.1400871 0.5625 0 0 0.353535354 ? HS-grad Married-civ-spouse ? Other-relative White Female United-States 0 +33 0.366666675 0.0650870055 0.625 0 0 0.262626261 Private Some-college Never-married Sales Not-in-family Asian-Pac-Islander Male South 0 +27 0.3 0.129509225 0.6875 0 0 0.3838384 Private Assoc-voc Never-married Handlers-cleaners Own-child White Female United-States 0 +29 0.322222233 0.144729763 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +33 0.366666675 0.112799518 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +37 0.411111116 0.0745690241 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +20 0.222222224 0.135517836 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +24 0.266666681 0.133134872 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +29 0.322222233 0.109113932 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +31 0.344444454 0.177517429 0.8125 0 0.515610635 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.151409879 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.06057904 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.160762578 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +54 0.6 0.026129771 0.3125 0 0 0.4040404 Private 9th Separated Craft-repair Unmarried White Male United-States 0 +55 0.6111111 0.060896948 0.8125 0 0 0.5555556 Private Bachelors Married-spouse-absent Craft-repair Unmarried White Female Ireland 0 +21 0.233333334 0.128513753 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +52 0.5777778 0.0160166509 0.6875 0 0.453856736 0.454545468 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.19213447 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +33 0.366666675 0.119438544 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 0 +22 0.244444445 0.234073445 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 +59 0.655555546 0.1549392 0.5625 0 0.143480256 0.3838384 Private HS-grad Never-married Exec-managerial Unmarried White Female United-States 0 +17 0.188888893 0.14181067 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 +31 0.344444454 0.137907535 0.5 0 0 0.323232323 Private 12th Never-married Sales Own-child White Male United-States 0 +74 0.822222233 0.07004826 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.170482352 0.375 0 0 0.4040404 Private 10th Divorced Other-service Unmarried Black Female United-States 0 +36 0.4 0.113852248 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.136072159 0.625 0 0 0.6060606 Self-emp-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +45 0.5 0.114567541 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +42 0.466666669 0.1433598 0.5625 0 0 0.858585835 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +50 0.5555556 0.207039118 0.875 0 0 0.4040404 State-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +39 0.433333337 0.157221809 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Other-relative White Female United-States 0 +44 0.4888889 0.23959507 0.625 0 0.454545438 0.454545468 Private Some-college Separated Exec-managerial Not-in-family White Male England 0 +52 0.5777778 0.119885772 0.125 0 0 0.565656543 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male Mexico 1 +24 0.266666681 0.191023141 0.8125 0 0 0.434343427 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +56 0.622222245 0.124333121 0.3125 0 0 1 Self-emp-inc 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +27 0.3 0.125039652 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +47 0.5222222 0.129920766 0.8125 0 0.43663913 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.1917593 0.9375 0 0.453856736 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 1 +38 0.422222227 0.120952651 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.08869035 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Not-in-family White Female United-States 0 +52 0.5777778 0.0895619 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +22 0.244444445 0.104204543 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Own-child White Male United-States 0 +41 0.455555558 0.08198127 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Italy 0 +30 0.333333343 0.171939209 0.5625 0 0 0.2020202 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +55 0.6111111 0.136430472 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Other-service Other-relative Asian-Pac-Islander Male Philippines 0 +25 0.2777778 0.08290873 0.625 0 0.365013778 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +32 0.355555564 0.103270352 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Other-relative White Male United-States 0 +28 0.311111122 0.0509831943 0.625 0 0 0.6060606 Private Some-college Separated Other-service Not-in-family White Female United-States 0 +33 0.366666675 0.1391583 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +17 0.188888893 0.158132434 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child Black Male United-States 0 +27 0.3 0.120413147 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +55 0.6111111 0.1154135 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +63 0.7 0.06444378 0.625 0 0 0.181818187 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +39 0.433333337 0.132466048 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +51 0.566666663 0.0496192873 1 0.04386044 0 0.5252525 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +67 0.7444445 0.09426789 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.2675818 0.8125 0 0 0.727272749 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 0 +27 0.3 0.0406639725 0.5625 0 0.365932047 0.262626261 Private HS-grad Widowed Craft-repair Unmarried White Female United-States 0 +54 0.6 0.283935875 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +59 0.655555546 0.16514796 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband Black Male United-States 1 +18 0.2 0.0186030231 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.126334861 0.5625 0 0 0.2020202 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +31 0.344444454 0.06929592 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +17 0.188888893 0.1538346 0.4375 0 0 0.07070707 Private 11th Never-married Other-service Own-child White Female United-States 0 +42 0.466666669 0.229159325 0.5625 0.1502415 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male United-States 1 +37 0.411111116 0.118739419 0.625 0 0 0.3030303 Private Some-college Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 +51 0.566666663 0.07303471 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.108565 0.5625 0.0246302467 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +23 0.25555557 0.187505946 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +27 0.3 0.106378712 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.123166561 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +69 0.7666667 0.249805853 0.75 0.0296402965 0 0.0606060624 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Female Germany 0 +30 0.333333343 0.139092952 0.8125 0 0 0.444444448 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +33 0.366666675 0.241094366 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male India 0 +28 0.311111122 0.127531067 0.5625 0 0 0.4848485 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +45 0.5 0.158046216 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +25 0.2777778 0.07640306 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +37 0.411111116 0.137498692 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +59 0.655555546 0.105950341 0.0625 0 0 0.4040404 Private Preschool Never-married Machine-op-inspct Not-in-family White Male Dominican-Republic 0 +26 0.2888889 0.0700778961 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +48 0.533333361 0.188873887 0.625 0 0 0.25252524 Private Some-college Separated Other-service Not-in-family White Female Peru 0 +64 0.7111111 0.117029309 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +39 0.433333337 0.1422195 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +24 0.266666681 0.216497555 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +40 0.444444448 0.119271509 0.875 0 0 0.353535354 State-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +46 0.51111114 0.1204475 0.875 0 0 0.7070707 Private Masters Married-spouse-absent Exec-managerial Not-in-family White Male United-States 1 +35 0.3888889 0.19374758 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 1 +43 0.477777779 0.141370848 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +31 0.344444454 0.225461632 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Not-in-family White Male United-States 0 +22 0.244444445 0.206752867 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.0351497456 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +35 0.3888889 0.0686857 0.5625 0 0 0.5050505 Private HS-grad Separated Transport-moving Not-in-family White Male United-States 0 +35 0.3888889 0.325674117 0.625 0 0 0.4040404 State-gov Some-college Divorced Tech-support Unmarried White Female United-States 0 +40 0.444444448 0.0521026067 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.100875258 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Unmarried White Female United-States 0 +48 0.533333361 0.221327469 0.9375 0.14084141 0 0.6363636 Self-emp-not-inc Prof-school Divorced Prof-specialty Unmarried White Male United-States 1 +70 0.7777778 0.116287075 0.875 0 0 0.08080808 ? Masters Married-civ-spouse ? Husband White Male United-States 0 +46 0.51111114 0.126821831 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.07853951 0.5625 0 0 0.3838384 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +37 0.411111116 0.2350366 0.8125 0 0 0.363636374 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.221949816 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Sales Husband White Male Mexico 0 +47 0.5222222 0.06295931 0.8125 0 0 0.7070707 Local-gov Bachelors Separated Prof-specialty Not-in-family White Female United-States 0 +35 0.3888889 0.131840333 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +43 0.477777779 0.0847528651 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Vietnam 0 +18 0.2 0.12872389 0.4375 0 0 0.2020202 State-gov 11th Never-married Other-service Own-child White Male United-States 0 +54 0.6 0.2094827 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +62 0.6888889 0.141754761 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Other-relative Black Female United-States 0 +36 0.4 0.09112181 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.105250537 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Farming-fishing Husband Amer-Indian-Eskimo Male United-States 0 +23 0.25555557 0.10386575 0.625 0 0 0.141414136 Private Some-college Never-married Adm-clerical Other-relative Asian-Pac-Islander Male Puerto-Rico 0 +61 0.677777767 0.108186476 0.8125 0.04386044 0 0.151515156 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +39 0.433333337 0.22326389 0.8125 0 0.383149683 0.6060606 Self-emp-not-inc Bachelors Divorced Craft-repair Not-in-family Black Male ? 0 +33 0.366666675 0.1678778 0.1875 0 0 0.5050505 Self-emp-not-inc 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.176280811 0.125 0 0 0.4040404 Private 1st-4th Never-married Machine-op-inspct Not-in-family White Female Mexico 0 +22 0.244444445 0.161386952 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +31 0.344444454 0.152687579 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 +26 0.2888889 0.128193825 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +44 0.4888889 0.130500674 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +73 0.811111152 0.129817039 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +44 0.4888889 0.136002779 0.8125 0 0 0.353535354 Private Bachelors Divorced Sales Unmarried White Female United-States 0 +35 0.3888889 0.05196049 0.6875 0 0 0.454545468 Private Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 0 +33 0.366666675 0.08514419 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Wife White Female ? 0 +27 0.3 0.0294011272 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.153056666 0.8125 0 0 0.5050505 Federal-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 1 +29 0.322222233 0.108257875 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +33 0.366666675 0.193895757 0.625 0 0 0.262626261 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +50 0.5555556 0.112317264 0.625 0 0 0.151515156 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.123803049 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +41 0.455555558 0.171628714 0.875 0 0 0.4040404 Self-emp-not-inc Masters Divorced Handlers-cleaners Unmarried White Male Peru 0 +19 0.211111113 0.1485258 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 +45 0.5 0.198723659 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +65 0.722222269 0.128354117 0.5625 0 0.185950413 0.363636374 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.142732054 0.625 0 0 0.4040404 State-gov Some-college Separated Tech-support Unmarried White Female United-States 0 +33 0.366666675 0.19911094 0.8125 0 0 0.25252524 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +32 0.355555564 0.137782931 0.8125 1 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.13755931 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.125938833 0.625 0 0 0.454545468 Private Some-college Separated Exec-managerial Not-in-family White Female United-States 1 +38 0.422222227 0.0899747759 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Protective-serv Own-child White Male United-States 0 +38 0.422222227 0.111759581 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.111064486 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.18734698 0.625 0 0 0.3030303 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +27 0.3 0.07793131 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Sales Not-in-family White Male United-States 0 +25 0.2777778 0.10140264 0.3125 0 0 0.4040404 Private 9th Married-spouse-absent Adm-clerical Unmarried Asian-Pac-Islander Female Vietnam 0 +29 0.322222233 0.124689423 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.135781184 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +44 0.4888889 0.111682124 0.5625 0 0 0.969697 Self-emp-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +26 0.2888889 0.0689834058 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family Asian-Pac-Islander Female South 0 +46 0.51111114 0.231811717 0.75 0 0 0.4949495 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 +38 0.422222227 0.149827749 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Unmarried White Male United-States 0 +38 0.422222227 0.14295432 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.128392518 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.137056187 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Male United-States 0 +50 0.5555556 0.2049296 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family Asian-Pac-Islander Male United-States 0 +31 0.344444454 0.164116785 0.5625 0 0 0.414141417 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +26 0.2888889 0.127458319 0.625 0 0 0.04040404 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family White Female Mexico 0 +42 0.466666669 0.052113384 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +27 0.3 0.276385546 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.0245065521 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +64 0.7111111 0.07418983 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +43 0.477777779 0.133572668 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.08605885 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.134072423 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 +56 0.622222245 0.192449 0.875 0 0 0.6666667 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +25 0.2777778 0.225050092 0.875 0 0 0.2020202 Local-gov Masters Never-married Prof-specialty Own-child White Male United-States 0 +60 0.6666667 0.06535305 0.8125 0 0 0.353535354 State-gov Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +52 0.5777778 0.04518743 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +43 0.477777779 0.268041819 0.5625 0.005940059 0 0.161616161 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +46 0.51111114 0.122942269 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Unmarried Asian-Pac-Islander Female Philippines 0 +19 0.211111113 0.377720833 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +56 0.622222245 0.245873764 0.25 0 0 0.2020202 Private 7th-8th Never-married Farming-fishing Unmarried Black Female United-States 0 +22 0.244444445 0.0742235 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +28 0.311111122 0.101047009 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family White Male ? 0 +39 0.433333337 0.2019445 0.1875 0 0 0.3030303 Private 5th-6th Separated Sales Unmarried Black Female Puerto-Rico 0 +28 0.311111122 0.0736051947 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 0 +31 0.344444454 0.06966704 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.0234033037 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +39 0.433333337 0.09262581 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male ? 1 +39 0.433333337 0.193162277 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.142137334 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Never-married Craft-repair Not-in-family White Male Mexico 0 +67 0.7444445 0.129935578 0.5625 0.03818038 0 0.111111112 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +31 0.344444454 0.147718236 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried White Female Puerto-Rico 0 +50 0.5555556 0.07602386 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.0242937151 0.5625 0.03908039 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.0494603328 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female Germany 1 +51 0.566666663 0.135094851 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 +54 0.6 0.11649587 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.0296395589 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Transport-moving Not-in-family White Male United-States 0 +20 0.222222224 0.157926321 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Black Female United-States 0 +37 0.411111116 0.143345654 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +38 0.422222227 0.158213928 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +59 0.655555546 0.135178372 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Farming-fishing Husband Black Male United-States 0 +59 0.655555546 0.0277886856 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +51 0.566666663 0.168143839 0.625 0 0 0.4848485 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 1 +60 0.6666667 0.155024067 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband Black Male United-States 0 +29 0.322222233 0.236902952 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.07729819 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 +42 0.466666669 0.235658944 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.1375674 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.0965794548 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +50 0.5555556 0.0255357139 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Italy 1 +22 0.244444445 0.1014902 0.5625 0 0 0.24242425 Self-emp-inc HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +27 0.3 0.139833167 0.5625 0 0 0.5252525 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +45 0.5 0.215306073 0.9375 0 0 0.434343427 State-gov Prof-school Divorced Prof-specialty Unmarried White Female United-States 0 +39 0.433333337 0.10504511 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +25 0.2777778 0.07936459 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +63 0.7 0.3011231 0.5625 0 0 0.151515156 ? HS-grad Never-married ? Not-in-family White Male United-States 0 +24 0.266666681 0.0959140062 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.104904346 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +19 0.211111113 0.169927359 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 +23 0.25555557 0.07506542 0.5 0 0 0.3838384 Private 12th Never-married Other-service Unmarried Black Male United-States 0 +20 0.222222224 0.3560411 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Other-relative White Male Mexico 0 +17 0.188888893 0.154095262 0.375 0 0 0.24242425 Self-emp-not-inc 10th Never-married Other-service Own-child White Female United-States 0 +63 0.7 0.05426802 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +28 0.311111122 0.121418737 0.8125 0 0 0.656565666 Local-gov Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +51 0.566666663 0.1601793 0.8125 0 0 0.5050505 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.106157117 0.8125 0.0332503319 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +64 0.7111111 0.25531134 0.625 0 0 0.121212125 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 +17 0.188888893 0.129258 0.375 0 0 0.25252524 Private 10th Never-married Other-service Own-child White Male United-States 0 +45 0.5 0.219615355 0.625 0.06497065 0 0.353535354 Local-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +18 0.2 0.210380524 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child Black Male United-States 0 +31 0.344444454 0.14366962 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +48 0.533333361 0.140807092 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-spouse-absent Sales Own-child White Male United-States 1 +41 0.455555558 0.2291014 0.625 0 0 0.454545468 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +65 0.722222269 0.103839487 0.9375 0.200512 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.06335535 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Machine-op-inspct Not-in-family White Male United-States 0 +39 0.433333337 0.08021661 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +51 0.566666663 0.261665463 0.625 0 0 0.08080808 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male Puerto-Rico 1 +49 0.544444442 0.122154236 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.141463116 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried White Male United-States 0 +36 0.4 0.139388636 0.8125 0 0.43663913 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +25 0.2777778 0.3269983 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Female United-States 0 +41 0.455555558 0.141616687 0.625 0 0 0.373737365 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +31 0.344444454 0.0798481852 0.3125 0 0 0.4040404 Private 9th Divorced Adm-clerical Not-in-family White Female United-States 0 +63 0.7 0.1218498 0.4375 0.04386044 0 0.373737365 Private 11th Married-civ-spouse Protective-serv Husband White Male United-States 1 +50 0.5555556 0.163343564 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +63 0.7 0.200789392 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +44 0.4888889 0.187096432 0.875 0 0 1 Self-emp-not-inc Masters Never-married Farming-fishing Own-child White Male United-States 0 +48 0.533333361 0.104978435 0.5625 0 0 0.656565666 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +51 0.566666663 0.115796745 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +18 0.2 0.164275065 0.5625 0 0 0.151515156 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.155694231 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Male United-States 0 +31 0.344444454 0.24037233 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.03301666 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.0710309446 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male England 0 +56 0.622222245 0.106249392 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +31 0.344444454 0.08861559 0.25 0 0 0.2020202 Private 7th-8th Divorced Transport-moving Unmarried White Male United-States 0 +46 0.51111114 0.22385256 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +39 0.433333337 0.137738481 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.205944613 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 +31 0.344444454 0.08739851 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Unmarried White Female United-States 0 +42 0.466666669 0.0876443461 0.8125 0 0.453856736 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.0692582056 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.108428277 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Female United-States 0 +18 0.2 0.171941236 0.4375 0 0.3677686 0.4848485 ? 11th Never-married ? Own-child Black Male United-States 0 +20 0.222222224 0.233272612 0.625 0 0 0.353535354 ? Some-college Never-married ? Not-in-family White Female United-States 0 +27 0.3 0.192561492 0.5625 0 0.4242424 0.454545468 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.240242347 0.8125 0 0 0.4040404 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 +52 0.5777778 0.1295786 0.875 0.0501305 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +46 0.51111114 0.265951842 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +30 0.333333343 0.07619628 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +26 0.2888889 0.03767011 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +48 0.533333361 0.11922773 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.108534023 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.208434 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.111448407 0.5625 0.07688077 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.03315002 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +74 0.822222233 0.08023749 0.5625 0 0.493342519 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +56 0.622222245 0.10920015 0.1875 0 0.4331956 0.676767647 Self-emp-not-inc 5th-6th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.0872718841 0.8125 0 0.3996786 0.4040404 Federal-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +21 0.233333334 0.206674054 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +29 0.322222233 0.0911265239 0.8125 0 0.518365443 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 +43 0.477777779 0.126167834 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Divorced Other-service Unmarried White Male United-States 0 +23 0.25555557 0.03749836 0.8125 0.02907029 0 0.4040404 Private Bachelors Never-married Protective-serv Not-in-family White Female United-States 0 +26 0.2888889 0.09988382 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +47 0.5222222 0.0234693084 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +27 0.3 0.1352006 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +45 0.5 0.129222974 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +30 0.333333343 0.286607772 0.5625 0 0 0.7070707 Private HS-grad Never-married Protective-serv Own-child White Male United-States 0 +35 0.3888889 0.0301608741 0.625 0.07688077 0 0.2020202 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +33 0.366666675 0.0847683549 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.0676956 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.09988112 0.5625 0 0 0.2020202 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +42 0.466666669 0.02648607 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +48 0.533333361 0.09927696 0.5625 0 0 0.363636374 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +46 0.51111114 0.01665516 0.5625 0 0 0.4848485 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 +36 0.4 0.1196305 0.1875 0 0 0.4040404 Private 5th-6th Separated Machine-op-inspct Not-in-family White Female United-States 0 +54 0.6 0.110342458 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +25 0.2777778 0.1346712 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +26 0.2888889 0.260623485 0.5625 0 0 0.25252524 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.07821958 0.5625 0 0 0.575757563 Self-emp-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +56 0.622222245 0.132219538 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +37 0.411111116 0.119337514 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.218800366 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +23 0.25555557 0.126964614 0.8125 0 0 0.25252524 Private Bachelors Never-married Other-service Own-child White Female United-States 0 +23 0.25555557 0.33832714 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +41 0.455555558 0.01811269 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +55 0.6111111 0.0687395856 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.112970591 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +67 0.7444445 0.157392219 0.75 0 0 0.353535354 Local-gov Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 +60 0.6666667 0.0180210881 0.5625 0 0 0.5050505 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +54 0.6 0.0686264262 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Unmarried White Female United-States 0 +38 0.422222227 0.1295456 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male England 1 +47 0.5222222 0.229663134 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Philippines 1 +49 0.544444442 0.06890797 0.8125 0 0 0.424242437 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.0570800267 0.5625 0 0 0.24242425 Private HS-grad Never-married Sales Own-child White Female United-States 0 +20 0.222222224 0.133192793 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 +66 0.733333349 0.124830186 0.5625 0 0 0.353535354 Private HS-grad Widowed Sales Other-relative White Female United-States 0 +22 0.244444445 0.195314229 0.625 0 0 0.25252524 ? Some-college Never-married ? Not-in-family Black Female United-States 0 +51 0.566666663 0.08447267 0.875 0 0 0.424242437 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.187565878 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +36 0.4 0.09861353 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +33 0.366666675 0.13002044 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +41 0.455555558 0.0363412276 0.8125 0 0.454545438 0.565656543 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 +90 1 0.118199244 0.5625 0.09386094 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Ecuador 1 +78 0.8666667 0.022351915 0.25 0 0 0.6060606 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +36 0.4 0.09709269 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +30 0.333333343 0.131272539 0.9375 0 0 0.5555556 Private Prof-school Divorced Sales Own-child White Male United-States 0 +35 0.3888889 0.226157382 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Male Mexico 0 +46 0.51111114 0.0938018039 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.0228240639 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 +24 0.266666681 0.191023141 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +40 0.444444448 0.09513338 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Wife White Female Puerto-Rico 0 +49 0.544444442 0.200800836 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.125342071 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +77 0.8555556 0.126392782 0.625 0 0 0.2020202 Private Some-college Widowed Priv-house-serv Not-in-family White Female United-States 0 +46 0.51111114 0.06890797 0.5625 0 0 0.565656543 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +41 0.455555558 0.0839486644 0.625 0 0 0.4040404 Private Some-college Separated Craft-repair Not-in-family Black Male United-States 0 +28 0.311111122 0.2614068 0.125 0 0 0.7777778 Private 1st-4th Never-married Farming-fishing Unmarried White Male Mexico 0 +21 0.233333334 0.07405646 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.110815957 0.5 0 0 0.4040404 Private 12th Never-married Farming-fishing Own-child Black Male United-States 0 +36 0.4 0.166868165 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +23 0.25555557 0.06977009 0.625 0 0 0.25252524 State-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 +38 0.422222227 0.167655528 0.5625 0 0.4708448 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.120260254 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.09169296 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Other-relative White Male United-States 1 +47 0.5222222 0.037298318 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Adm-clerical Unmarried Black Male United-States 1 +39 0.433333337 0.119705938 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +40 0.444444448 0.164059535 0.8125 0 0 0.4848485 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +21 0.233333334 0.12698482 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +32 0.355555564 0.0430455878 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +23 0.25555557 0.147864386 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 +44 0.4888889 0.121646389 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +37 0.411111116 0.03994935 0.625 0 0 0.4040404 Private Some-college Separated Other-service Not-in-family Black Male ? 0 +70 0.7777778 0.114789136 0.8125 0 0 0.2020202 Private Bachelors Widowed Prof-specialty Unmarried White Female Puerto-Rico 0 +51 0.566666663 0.0691147447 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Protective-serv Husband White Male United-States 1 +66 0.733333349 0.130081058 0.3125 0 0 0.3030303 Private 9th Separated Other-service Not-in-family Black Female United-States 0 +57 0.6333333 0.08361055 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.09202434 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +48 0.533333361 0.100353271 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Divorced Sales Not-in-family White Male United-States 1 +24 0.266666681 0.136778682 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +51 0.566666663 0.04271825 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +43 0.477777779 0.162924618 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.179815516 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.126656815 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +20 0.222222224 0.247139335 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +33 0.366666675 0.144223273 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.168934569 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +32 0.355555564 0.162307665 0.625 0 0 0.6060606 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.06619699 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male India 1 +26 0.2888889 0.07055005 0.5625 0.0501305 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.06985226 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Unmarried White Female United-States 0 +24 0.266666681 0.107482634 0.8125 0 0 0.75757575 Private Bachelors Never-married Other-service Own-child Black Female United-States 0 +45 0.5 0.07907901 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.0942955 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +49 0.544444442 0.0213173665 0.8125 0 0 0.454545468 State-gov Bachelors Married-civ-spouse Prof-specialty Other-relative White Female United-States 0 +35 0.3888889 0.0544020534 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.04464052 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +23 0.25555557 0.07260769 0.625 0 0.371212125 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +33 0.366666675 0.1391583 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.190247223 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.126790166 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +20 0.222222224 0.188430026 0.4375 0 0 0.25252524 Private 11th Never-married Craft-repair Not-in-family Black Male United-States 0 +44 0.4888889 0.315078765 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.09272819 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +50 0.5555556 0.106609732 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +25 0.2777778 0.137548536 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female Mexico 0 +28 0.311111122 0.141777664 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +60 0.6666667 0.0427869521 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +38 0.422222227 0.1461058 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.250931323 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 +57 0.6333333 0.134110153 0.8125 0 0.518365443 0.4040404 Federal-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +50 0.5555556 0.11351683 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.127911612 0.4375 0 0 0.4040404 Local-gov 11th Divorced Adm-clerical Unmarried White Female United-States 0 +69 0.7666667 0.04173085 0.5625 0.014240142 0 0.0606060624 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.0464051776 0.6875 0 0.5610652 0.3939394 State-gov Assoc-voc Divorced Tech-support Not-in-family White Male United-States 1 +42 0.466666669 0.137704119 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +53 0.5888889 0.209704965 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.07661455 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +37 0.411111116 0.242196932 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.08949859 0.5625 0.07298073 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.20286791 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Female United-States 0 +38 0.422222227 0.180197418 0.625 0 0 0.3838384 State-gov Some-college Separated Adm-clerical Unmarried Black Female United-States 0 +52 0.5777778 0.124878012 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Poland 1 +48 0.533333361 0.128831655 0.6875 0 0 0.5050505 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.0531957522 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +37 0.411111116 0.162633657 0.5625 0 0.4242424 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.146156311 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.0811663 0.8125 0 0 0.6060606 Local-gov Bachelors Divorced Protective-serv Unmarried White Female Germany 0 +33 0.366666675 0.08258341 0.5625 0 0 0.353535354 Private HS-grad Married-spouse-absent Other-service Not-in-family Asian-Pac-Islander Female Thailand 0 +20 0.222222224 0.06335063 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Male United-States 0 +41 0.455555558 0.133062124 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +32 0.355555564 0.2369959 0.625 0 0.3409091 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +54 0.6 0.08201023 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 0 +36 0.4 0.124304831 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 +46 0.51111114 0.1806965 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +45 0.5 0.15871571 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.125889659 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 +62 0.6888889 0.0241010841 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.1272044 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +42 0.466666669 0.244891077 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +18 0.2 0.316508 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +32 0.355555564 0.0344512872 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.1174139 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +20 0.222222224 0.234073445 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +50 0.5555556 0.0487308949 0.8125 0 0 0.454545468 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 +42 0.466666669 0.124690764 1 0 0 0.434343427 Local-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male ? 1 +36 0.4 0.127009079 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.17192103 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +30 0.333333343 0.196639061 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +33 0.366666675 0.150229171 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +43 0.477777779 0.0255518779 0.75 0 0 0.434343427 Local-gov Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 +38 0.422222227 0.198778212 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.123796314 0.8125 0 0 0.141414136 Local-gov Bachelors Never-married Other-service Not-in-family White Male United-States 0 +40 0.444444448 0.07827683 0.625 0 0 0.454545468 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 +40 0.444444448 0.0963619053 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +41 0.455555558 0.158921137 0.9375 0 0 0.5050505 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +57 0.6333333 0.07600163 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +65 0.722222269 0.09864182 0.875 0 0.378328741 0.04040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male Greece 0 +52 0.5777778 0.0294368248 0.625 0 0 0.5050505 Federal-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +59 0.655555546 0.08236182 0.9375 1 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +18 0.2 0.253684729 0.5625 0.0217602178 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +48 0.533333361 0.06822837 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +45 0.5 0.06519679 0.1875 0 0 0.4040404 Private 5th-6th Divorced Transport-moving Unmarried White Male United-States 0 +24 0.266666681 0.131106183 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +27 0.3 0.139346883 0.75 0 0 0.4040404 State-gov Assoc-acdm Never-married Protective-serv Not-in-family White Male United-States 0 +40 0.444444448 0.152826324 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.101538688 0.8125 0.0501305 0 0.4040404 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +24 0.266666681 0.135164231 0.5625 0 0 0.5050505 Private HS-grad Never-married Farming-fishing Own-child Black Male United-States 0 +71 0.788888931 0.123713471 0.9375 0 0 0.161616161 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +17 0.188888893 0.0223195851 0.5 0 0 0.4040404 Private 12th Never-married Sales Own-child White Male United-States 0 +57 0.6333333 0.038439285 0.625 0.031370312 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +71 0.788888931 0.0237777885 0.8125 0.09386094 0 0.3030303 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +37 0.411111116 0.127012447 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 0 +33 0.366666675 0.1141614 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +41 0.455555558 0.039148517 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +25 0.2777778 0.240009978 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.299139559 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +18 0.2 0.229080528 0.4375 0 0 0.5050505 ? 11th Never-married ? Unmarried Black Female United-States 0 +34 0.377777785 0.147920966 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +57 0.6333333 0.225354537 0.375 0 0 0.4040404 ? 10th Married-civ-spouse ? Wife White Female United-States 0 +27 0.3 0.2229709 0.8125 0 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.298496336 0.8125 0 0 0.08080808 ? Bachelors Divorced ? Not-in-family White Female United-States 0 +64 0.7111111 0.161331043 0.4375 0.0367403664 0 0.353535354 ? 11th Widowed ? Not-in-family White Female United-States 0 +24 0.266666681 0.06758582 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +23 0.25555557 0.138514385 0.8125 0 0 0.3030303 Private Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 +33 0.366666675 0.07569382 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +58 0.644444466 0.0145658571 0.6875 0.0220202189 0 0.565656543 Self-emp-inc Assoc-voc Divorced Sales Not-in-family White Male United-States 0 +25 0.2777778 0.0913097262 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +44 0.4888889 0.128329873 0.875 0 0 0.5555556 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +53 0.5888889 0.179562941 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.07853951 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +36 0.4 0.237934813 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +25 0.2777778 0.106160484 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +54 0.6 0.0146143511 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +31 0.344444454 0.05195847 0.5 0 0 0.4040404 Private 12th Separated Transport-moving Unmarried Black Male United-States 0 +18 0.2 0.230922639 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +40 0.444444448 0.118947536 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Male United-States 0 +26 0.2888889 0.09856706 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife Black Female United-States 0 +68 0.75555557 0.09877046 1 0.200512 0 0.5050505 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 +33 0.366666675 0.149501756 0.8125 0.0220202189 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +22 0.244444445 0.145177662 0.75 0 0 0.5555556 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 0 +50 0.5555556 0.116534933 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.166857392 0.8125 0 0 0.3030303 ? Bachelors Never-married ? Own-child White Male United-States 0 +44 0.4888889 0.169866741 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.3349487 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Male United-States 0 +34 0.377777785 0.287215978 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.109388739 0.625 0 0 0.454545468 Federal-gov Some-college Widowed Tech-support Not-in-family White Female United-States 1 +77 0.8555556 0.0966629758 0.875 0 0 0.08080808 ? Masters Married-civ-spouse ? Husband White Male United-States 1 +25 0.2777778 0.1282073 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Other-service Own-child White Female United-States 0 +20 0.222222224 0.131005153 0.625 0 0 0.4040404 Private Some-college Separated Sales Unmarried Black Female United-States 0 +46 0.51111114 0.0746841952 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family Amer-Indian-Eskimo Male United-States 0 +26 0.2888889 0.1263901 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Own-child White Male United-States 0 +45 0.5 0.05482571 0.125 0 0 0.25252524 Private 1st-4th Married-civ-spouse Other-service Wife White Female El-Salvador 0 +70 0.7777778 0.0658925548 0.5625 0 0 0.04040404 ? HS-grad Widowed ? Unmarried White Female United-States 0 +57 0.6333333 0.121855862 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +28 0.311111122 0.1274233 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Sales Not-in-family White Male United-States 0 +35 0.3888889 0.09710482 0.75 0 0 0.161616161 ? Assoc-acdm Married-civ-spouse ? Wife White Female United-States 0 +36 0.4 0.4094066 0.625 0.07688077 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.139624372 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 +29 0.322222233 0.197394773 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +36 0.4 0.141746685 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Unmarried White Male United-States 0 +19 0.211111113 0.0278843269 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +27 0.3 0.110574156 0.8125 0 0 0.2020202 Private Bachelors Never-married Tech-support Unmarried Asian-Pac-Islander Female Philippines 0 +48 0.533333361 0.07604609 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Transport-moving Husband White Male United-States 1 +49 0.544444442 0.08504585 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.14030464 0.875 0 0.453856736 0.2020202 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 +61 0.677777767 0.0190549642 0.5625 0 0 0.828282833 Private HS-grad Divorced Farming-fishing Not-in-family White Female United-States 0 +42 0.466666669 0.08216986 0.625 0.1502415 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.0212978348 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.07300171 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 +32 0.355555564 0.09074328 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.140358523 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +35 0.3888889 0.07561839 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.116757207 0.6875 0 0 0.4040404 Private Assoc-voc Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.163796857 0.9375 0 0 0.2020202 Private Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +55 0.6111111 0.12489754 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.19560048 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.0539218225 0.5625 0 0 0.4848485 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +56 0.622222245 0.249238074 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.02487767 0.6875 0 0.459595948 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.1557077 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.080684714 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Own-child White Male United-States 0 +38 0.422222227 0.06882041 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +76 0.844444454 0.0909534246 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +35 0.3888889 0.2140358 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried Black Female United-States 0 +48 0.533333361 0.156825766 0.625 0 0 0.434343427 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 +35 0.3888889 0.0228833333 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.173096344 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +64 0.7111111 0.200916 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +22 0.244444445 0.209051639 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +45 0.5 0.122650631 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.33755663 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male Mexico 0 +43 0.477777779 0.09694788 0.5625 0 0 0.5050505 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 1 +23 0.25555557 0.057309702 0.625 0 0 0.373737365 Private Some-college Never-married Other-service Own-child White Female United-States 0 +25 0.2777778 0.190147549 0.375 0 0.3677686 0.4040404 Private 10th Never-married Handlers-cleaners Own-child Black Male United-States 0 +39 0.433333337 0.1549493 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +63 0.7 0.159181789 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +37 0.411111116 0.216839716 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.147357225 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Other Male United-States 0 +33 0.366666675 0.1289044 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male Canada 0 +45 0.5 0.12493863 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female ? 0 +28 0.311111122 0.08495223 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +20 0.222222224 0.134213865 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +34 0.377777785 0.172218055 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +34 0.377777785 0.137056187 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +41 0.455555558 0.136884436 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.137290582 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.126521438 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.07837112 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 0 +46 0.51111114 0.133804366 0.8125 1 0 0.727272749 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.0603729375 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Wife Asian-Pac-Islander Female South 0 +49 0.544444442 0.08124779 0.625 0 0 0.3030303 Private Some-college Widowed Sales Unmarried White Female United-States 0 +26 0.2888889 0.101182394 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +28 0.311111122 0.09287906 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +54 0.6 0.0987226442 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +53 0.5888889 0.05975935 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Other Female ? 0 +24 0.266666681 0.0956567153 0.625 0 0 0.5050505 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +23 0.25555557 0.19188863 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +55 0.6111111 0.143091053 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +58 0.644444466 0.136753768 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Separated Craft-repair Not-in-family White Male United-States 0 +26 0.2888889 0.153221682 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Other-relative Black Male ? 0 +19 0.211111113 0.07091577 0.375 0 0 0.2020202 Private 10th Never-married Other-service Other-relative Black Female United-States 0 +28 0.311111122 0.150699973 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried White Female United-States 0 +45 0.5 0.163664833 0.625 0 0 0.5252525 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +30 0.333333343 0.132272065 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +76 0.844444454 0.0782660544 0.5625 0 0 0.333333343 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +47 0.5222222 0.09432514 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.0899188742 0.625 0.0217402168 0 0.4040404 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 +40 0.444444448 0.1526128 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +24 0.266666681 0.0572780445 0.5625 0 0 0.25252524 Private HS-grad Separated Other-service Unmarried White Female United-States 0 +30 0.333333343 0.109410286 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +67 0.7444445 0.188576192 0.625 0.106051058 0 0.1010101 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +24 0.266666681 0.145862654 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +43 0.477777779 0.156235754 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +29 0.322222233 0.177715436 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Unmarried White Male United-States 0 +40 0.444444448 0.0841345638 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +61 0.677777767 0.120099284 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +45 0.5 0.1453905 1 0.07688077 0 0.454545468 Local-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.0264268 0.625 0 0 0.5050505 State-gov Some-college Never-married Tech-support Not-in-family White Female United-States 0 +58 0.644444466 0.235676453 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.0510801822 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +34 0.377777785 0.119020954 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +20 0.222222224 0.179513782 0.625 0.005940059 0 0.2020202 Private Some-college Never-married Prof-specialty Other-relative Black Female United-States 0 +25 0.2777778 0.0231069475 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 +46 0.51111114 0.223462582 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +54 0.6 0.07507822 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +43 0.477777779 0.1340098 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.194102541 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +21 0.233333334 0.133393511 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +65 0.722222269 0.163386 0.625 0.116781168 0 0.5050505 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 1 +37 0.411111116 0.116607681 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +29 0.322222233 0.05920705 0.5625 0.105201051 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 1 +44 0.4888889 0.116995633 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.06279025 0.625 0.07688077 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +38 0.422222227 0.217732817 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife Black Female United-States 0 +35 0.3888889 0.106449433 0.625 0.0501305 0 0.7070707 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.0899188742 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +44 0.4888889 0.1160473 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Separated Sales Unmarried White Male United-States 0 +39 0.433333337 0.135451153 0.8125 0 0 0.3030303 ? Bachelors Married-civ-spouse ? Wife White Female United-States 0 +23 0.25555557 0.118869409 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Other-relative White Female United-States 0 +25 0.2777778 0.123088427 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Never-married Sales Not-in-family White Male United-States 1 +23 0.25555557 0.0555645749 0.625 0 0 0.282828271 Private Some-college Never-married Sales Own-child White Female United-States 0 +47 0.5222222 0.140682489 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.0978436843 0.4375 0 0 0.454545468 Private 11th Divorced Craft-repair Not-in-family White Female United-States 0 +25 0.2777778 0.0129412916 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +35 0.3888889 0.100590356 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +68 0.75555557 0.0362698324 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband Amer-Indian-Eskimo Male United-States 0 +50 0.5555556 0.106616467 0.6875 0.03103031 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +47 0.5222222 0.10242641 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +35 0.3888889 0.127717629 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.229923114 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +21 0.233333334 0.135786578 0.5625 0.0217602178 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +35 0.3888889 0.182239577 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 +30 0.333333343 0.192156017 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Philippines 0 +17 0.188888893 0.08539003 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child Black Male United-States 0 +49 0.544444442 0.136642635 0.5625 0 0 0.4040404 ? HS-grad Separated ? Unmarried White Female Columbia 0 +27 0.3 0.251564443 0.1875 0 0 0.6060606 Private 5th-6th Never-married Other-service Not-in-family White Male El-Salvador 0 +22 0.244444445 0.16486305 0.5625 0 0 0.151515156 Private HS-grad Never-married Sales Own-child Black Female United-States 0 +22 0.244444445 0.0652399 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +50 0.5555556 0.109538257 0.5625 0 0 0.02020202 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.1076005 0.6875 0 0 0.3838384 Self-emp-not-inc Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +27 0.3 0.0249800477 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +27 0.3 0.225917608 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.12698482 0.25 0 0 0.353535354 Never-worked 7th-8th Divorced ? Not-in-family White Male United-States 0 +20 0.222222224 0.235309377 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Not-in-family White Female United-States 0 +42 0.466666669 0.0222279858 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.222747952 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.09891325 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.185573563 0.25 0 0 0.8080808 Private 7th-8th Widowed Other-service Unmarried White Female United-States 0 +22 0.244444445 0.0293970853 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Own-child White Male United-States 0 +34 0.377777785 0.10409341 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.0322670154 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.1605686 0.8125 0 0 0.24242425 Private Bachelors Divorced Priv-house-serv Unmarried White Female United-States 0 +48 0.533333361 0.131978408 0.625 0 0 0.424242437 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +22 0.244444445 0.238667622 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 +34 0.377777785 0.235177368 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Craft-repair Husband White Male Mexico 0 +25 0.2777778 0.106864326 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +23 0.25555557 0.0157863013 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.0722716 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.117327012 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +49 0.544444442 0.152805448 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +23 0.25555557 0.08417228 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 +57 0.6333333 0.144177467 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.2975002 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 +44 0.4888889 0.07064838 0.625 0 0 0.5858586 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.157867059 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 +29 0.322222233 0.126811728 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +29 0.322222233 0.164608464 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Unmarried Black Female United-States 0 +35 0.3888889 0.0208229925 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +48 0.533333361 0.147884592 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.254249841 0.5625 0 0 0.363636374 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +42 0.466666669 0.09243049 0.5625 0 0 0.5050505 Local-gov HS-grad Divorced Protective-serv Unmarried White Female United-States 0 +53 0.5888889 0.157182068 0.625 0 0 0.4040404 Private Some-college Widowed Exec-managerial Unmarried White Female United-States 0 +29 0.322222233 0.0478660762 0.9375 0 0 0.5555556 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 +59 0.655555546 0.131457761 0.8125 0 0 0.727272749 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +31 0.344444454 0.06643677 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +34 0.377777785 0.123780824 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.08285215 0.8125 0 0.5874656 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +25 0.2777778 0.111091428 0.5625 0.04416044 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +28 0.311111122 0.0993268043 0.5625 0 0 0.1010101 ? HS-grad Divorced ? Own-child White Female United-States 0 +30 0.333333343 0.138779089 0.5625 0 0.4242424 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.05489104 0.5625 0 0 0.4848485 Private HS-grad Divorced Handlers-cleaners Not-in-family White Female United-States 0 +45 0.5 0.127449557 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +23 0.25555557 0.09514618 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Other-relative Black Female United-States 0 +33 0.366666675 0.0659652948 0.75 0 0 0.424242437 Private Assoc-acdm Divorced Machine-op-inspct Not-in-family White Female United-States 0 +44 0.4888889 0.10832388 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 +25 0.2777778 0.3258708 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male El-Salvador 0 +48 0.533333361 0.100180171 0.625 0 0 0.4040404 State-gov Some-college Divorced Other-service Own-child White Male United-States 0 +23 0.25555557 0.195312873 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +33 0.366666675 0.03953782 0.6875 0.03103031 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +20 0.222222224 0.09881155 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Sales Other-relative White Female United-States 0 +23 0.25555557 0.283539832 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +71 0.788888931 0.0841641948 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.08181491 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +36 0.4 0.133519456 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.189100191 0.4375 0 0 0.6060606 Private 11th Never-married Craft-repair Other-relative White Male United-States 0 +40 0.444444448 0.1290115 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.175808 0.625 0 0 0.5050505 Private Some-college Divorced Machine-op-inspct Unmarried White Male United-States 0 +30 0.333333343 0.155615434 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 +30 0.333333343 0.229619354 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.112574555 0.8125 0.0501305 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +39 0.433333337 0.249743223 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +39 0.433333337 0.141178891 0.5625 0 0 0.5050505 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +74 0.822222233 0.1410745 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +32 0.355555564 0.0528926626 0.625 0.1502415 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.0598920323 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +64 0.7111111 0.05857864 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +47 0.5222222 0.111448407 0.5625 0.07298073 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +37 0.411111116 0.09050081 0.8125 0 0 0.373737365 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +47 0.5222222 0.134072423 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +33 0.366666675 0.123669013 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +40 0.444444448 0.1293065 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 1 +22 0.244444445 0.346218944 0.5625 0 0 0.8080808 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 +56 0.622222245 0.1160931 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.128042281 0.5625 0 0 0.5555556 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +30 0.333333343 0.08043484 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +20 0.222222224 0.159352869 0.5 0 0 0.353535354 Private 12th Never-married Prof-specialty Not-in-family White Female Italy 0 +53 0.5888889 0.029603187 0.875 0.1502415 0 0.3838384 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.131094053 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.158855125 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +43 0.477777779 0.1013858 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.143949136 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +20 0.222222224 0.0279058814 0.625 0 0 0.464646459 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +22 0.244444445 0.192479312 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 +38 0.422222227 0.31700775 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +54 0.6 0.07713317 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.076423265 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +46 0.51111114 0.151248232 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +59 0.655555546 0.125536725 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.112543568 0.375 0 0 0.5050505 ? 10th Divorced ? Not-in-family White Male United-States 0 +18 0.2 0.14582561 0.5 0 0 0.25252524 ? 12th Never-married ? Not-in-family White Male United-States 0 +41 0.455555558 0.2587962 0.6875 0 0 0.4040404 Local-gov Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 +42 0.466666669 0.122088231 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 +58 0.644444466 0.128643066 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.06619968 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.06968118 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +28 0.311111122 0.124417312 0.8125 0 0.454545438 0.353535354 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +25 0.2777778 0.111552127 0.875 0 0 0.5555556 Private Masters Never-married Sales Not-in-family White Male United-States 0 +29 0.322222233 0.06842908 0.625 0 0 0.545454562 Private Some-college Divorced Sales Unmarried White Female United-States 0 +53 0.5888889 0.0985906348 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 +63 0.7 0.102487028 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +26 0.2888889 0.07194156 0.6875 0 0 0.3838384 State-gov Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 +21 0.233333334 0.09982522 0.5625 0.0367403664 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +45 0.5 0.126342267 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.0911265239 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +72 0.8 0.09733584 1 0 0.288797051 0.4040404 Local-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 0 +51 0.566666663 0.141937956 0.375 0 0 0.4040404 Private 10th Married-spouse-absent Craft-repair Other-relative White Male United-States 0 +21 0.233333334 0.141553372 0.3125 0 0 0.4040404 Private 9th Married-spouse-absent Handlers-cleaners Own-child White Male United-States 0 +38 0.422222227 0.15126507 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried Black Female United-States 0 +38 0.422222227 0.0544020534 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +46 0.51111114 0.110953353 0.875 0 0 0.414141417 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +31 0.344444454 0.08042742 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 +68 0.75555557 0.11961703 0.375 0 0 0.909090936 Local-gov 10th Separated Other-service Not-in-family Black Female United-States 0 +43 0.477777779 0.266797781 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +21 0.233333334 0.124772936 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +44 0.4888889 0.116918854 0.8125 0 0 0.0303030312 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +56 0.622222245 0.132219538 1 0 0 0.4040404 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.1974069 0.5625 0 0 0.121212125 ? HS-grad Never-married ? Own-child White Male United-States 0 +36 0.4 0.118024796 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.0343819149 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.22537677 0.625 1 0 0.4040404 Private Some-college Never-married Protective-serv Not-in-family Black Female United-States 1 +52 0.5777778 0.1029127 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +56 0.622222245 0.138479367 1 1 0 0.7070707 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.08700516 0.8125 0 0.6483012 0.2020202 Private Bachelors Widowed Other-service Not-in-family White Female United-States 1 +51 0.566666663 0.08186677 0.8125 0 0 0.25252524 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.164723635 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 +36 0.4 0.0505642556 0.625 0 0 0.5555556 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 +29 0.322222233 0.120568059 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +21 0.233333334 0.115039691 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 +58 0.644444466 0.251460046 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +37 0.411111116 0.08618615 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +50 0.5555556 0.066943936 0.625 0 0 0.454545468 Private Some-college Divorced Craft-repair Not-in-family Black Female United-States 0 +30 0.333333343 0.264572442 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male Germany 0 +29 0.322222233 0.176787987 0.5625 0 0 0.3030303 Private HS-grad Never-married Farming-fishing Own-child Black Male United-States 0 +48 0.533333361 0.022108769 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.1127362 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +39 0.433333337 0.1368649 0.75 0 0 0.25252524 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 +35 0.3888889 0.0708140656 0.9375 0 0 0.5555556 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +54 0.6 0.0981434062 0.5625 0.07688077 0 0.25252524 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +24 0.266666681 0.12276917 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +20 0.222222224 0.1854813 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +30 0.333333343 0.196989983 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband Amer-Indian-Eskimo Male United-States 1 +19 0.211111113 0.0495142154 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +26 0.2888889 0.134437487 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family Black Male United-States 0 +38 0.422222227 0.0750984251 0.5625 0 0.453856736 1 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +25 0.2777778 0.136431143 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +33 0.366666675 0.0668880343 0.625 0 0 0.5050505 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 +60 0.6666667 0.08418305 0.8125 0.07298073 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.1939685 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +30 0.333333343 0.08042742 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +19 0.211111113 0.133809745 0.25 0 0 0.4040404 Private 7th-8th Never-married Other-service Not-in-family White Female United-States 0 +23 0.25555557 0.07919621 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +27 0.3 0.158054292 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.07702339 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 +39 0.433333337 0.119181253 0.75 0 0 0.5252525 State-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 +33 0.366666675 0.12777622 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +65 0.722222269 0.138282686 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +34 0.377777785 0.131727174 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.146039113 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child White Female Mexico 0 +23 0.25555557 0.221710041 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 +25 0.2777778 0.132710546 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Own-child White Male United-States 0 +28 0.311111122 0.12210574 0.8125 0 0.359045 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 +31 0.344444454 0.139092952 0.4375 0 0 0.25252524 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +28 0.311111122 0.0258024335 0.8125 0.068490684 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +37 0.411111116 0.210658684 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +52 0.5777778 0.094073236 0.625 0 0.453856736 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +66 0.733333349 0.0260125753 0.6875 0.0327303261 0 0.4040404 Federal-gov Assoc-voc Widowed Other-service Unmarried Black Female United-States 0 +31 0.344444454 0.08407529 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +37 0.411111116 0.0524144545 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.0383268073 0.8125 0.0501305 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +45 0.5 0.128049016 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Unmarried White Male United-States 0 +44 0.4888889 0.071854 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.0286898743 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +35 0.3888889 0.0963545 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +53 0.5888889 0.0691147447 0.4375 0 0 0.4040404 Private 11th Divorced Transport-moving Not-in-family White Male Canada 0 +54 0.6 0.09409479 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Germany 1 +43 0.477777779 0.1617318 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.0892871 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 +49 0.544444442 0.218089119 0.625 0.0332503319 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +52 0.5777778 0.0649011061 1 0 0 0.575757563 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.111268573 0.625 0 0 0.04040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +60 0.6666667 0.111557513 0.5625 0 0.453856736 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +45 0.5 0.178167388 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Machine-op-inspct Own-child White Male United-States 0 +48 0.533333361 0.0689423159 0.8125 0.07298073 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.0251625758 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +61 0.677777767 0.156676248 0.9375 0 0 0.4040404 ? Prof-school Married-civ-spouse ? Husband White Male United-States 1 +48 0.533333361 0.077791214 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.106248043 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +27 0.3 0.0276815947 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +38 0.422222227 0.3183151 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Other-service Husband White Male Mexico 0 +33 0.366666675 0.23480624 0.1875 0 0 0.2020202 Private 5th-6th Married-spouse-absent Transport-moving Unmarried Other Male El-Salvador 0 +43 0.477777779 0.09133532 0.875 0 0 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 1 +36 0.4 0.16733627 0.5625 0 0 0.6060606 Private HS-grad Separated Transport-moving Other-relative White Male Mexico 0 +38 0.422222227 0.0754985 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.133058086 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Tech-support Not-in-family White Female United-States 0 +22 0.244444445 0.204634592 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Own-child White Male United-States 0 +30 0.333333343 0.194359154 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +55 0.6111111 0.3282881 0.875 0 0 0.4040404 ? Masters Married-civ-spouse ? Husband White Male United-States 1 +46 0.51111114 0.0291963723 0.9375 0.1502415 0 0.5555556 Self-emp-not-inc Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.161250219 0.5625 0 0 0.5050505 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +50 0.5555556 0.227389291 0.5625 0 0.3409091 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.02190873 0.6875 0 0.223599628 0.4040404 Private Assoc-voc Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 +47 0.5222222 0.07977814 0.8125 0 0 0.6060606 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.158071816 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.09497038 0.5625 0 0 0.6060606 ? HS-grad Never-married ? Own-child White Male United-States 0 +43 0.477777779 0.145511732 0.625 0 0.371212125 0.727272749 Private Some-college Divorced Tech-support Own-child White Female United-States 0 +45 0.5 0.1282962 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 +55 0.6111111 0.2572666 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Other-relative White Male United-States 0 +68 0.75555557 0.125912562 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.0961180851 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +39 0.433333337 0.0359983966 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family White Female United-States 0 +37 0.411111116 0.08605885 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +19 0.211111113 0.2319747 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +20 0.222222224 0.130758643 0.4375 0 0 0.2020202 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +49 0.544444442 0.3759555 0.6875 0 0 0.4040404 ? Assoc-voc Married-spouse-absent ? Unmarried White Female United-States 0 +33 0.366666675 0.1011339 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.206178337 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +72 0.8 0.1192971 0.8125 0 0 0.0303030312 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +58 0.644444466 0.2483975 0.875 0 0 0.353535354 Local-gov Masters Widowed Prof-specialty Unmarried White Male United-States 1 +43 0.477777779 0.118350111 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Never-married Exec-managerial Not-in-family Black Male United-States 0 +62 0.6888889 0.2807487 0.4375 0 0 0.212121218 Private 11th Separated Other-service Not-in-family Black Female United-States 0 +21 0.233333334 0.235737741 0.625 0 0 0.2020202 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +26 0.2888889 0.2289694 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +27 0.3 0.07743424 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.110587627 0.625 0 0.43663913 0.3838384 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.111832991 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Other-service Unmarried White Female United-States 0 +28 0.311111122 0.168474555 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Other-relative White Female United-States 0 +34 0.377777785 0.15825367 0.8125 0 0.4331956 0.4848485 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +29 0.322222233 0.06979703 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +58 0.644444466 0.2896232 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 +45 0.5 0.07174287 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +47 0.5222222 0.109271541 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Craft-repair Not-in-family White Female United-States 0 +53 0.5888889 0.0622547939 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +52 0.5777778 0.0273731146 0.375 0.0501305 0 0.4040404 Local-gov 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.114088662 0.4375 0 0 0.151515156 Private 11th Divorced Other-service Unmarried White Female United-States 0 +36 0.4 0.276172042 0.8125 0 0.4331956 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.159981281 0.8125 0.07688077 0 0.656565666 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.101068564 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.100052871 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.0510148481 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.119670242 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Germany 1 +49 0.544444442 0.13015987 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 +17 0.188888893 0.179208666 0.375 0 0 0.2020202 Private 10th Never-married Other-service Not-in-family White Male El-Salvador 0 +28 0.311111122 0.0539938919 0.625 0 0 0.3030303 ? Some-college Divorced ? Not-in-family White Female United-States 0 +25 0.2777778 0.228546411 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +69 0.7666667 0.07492263 0.3125 0 0 0.2020202 ? 9th Married-civ-spouse ? Husband White Male United-States 0 +41 0.455555558 0.191341713 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Divorced Sales Not-in-family White Male United-States 0 +31 0.344444454 0.138782457 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +57 0.6333333 0.287102818 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Unmarried White Male United-States 1 +49 0.544444442 0.06909319 0.625 0 0.4242424 0.444444448 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.187004834 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.0840624943 0.6875 0 0.453856736 0.5050505 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male Germany 1 +47 0.5222222 0.13003324 0.625 0 0 0.6060606 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +50 0.5555556 0.0817744955 0.5 0 0 0.4040404 Private 12th Divorced Transport-moving Not-in-family White Male United-States 0 +36 0.4 0.0600806251 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +17 0.188888893 0.156866178 0.4375 0 0 0.25252524 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +30 0.333333343 0.2150461 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +79 0.8777778 0.111273959 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +42 0.466666669 0.130324885 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +67 0.7444445 0.131383672 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +36 0.4 0.06677825 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +35 0.3888889 0.0619840324 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.117477208 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +21 0.233333334 0.0390084237 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Own-child White Male United-States 0 +46 0.51111114 0.258222342 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +45 0.5 0.133510023 0.8125 0 0.43663913 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +20 0.222222224 0.0739628449 0.4375 0 0 0.4040404 Private 11th Never-married Tech-support Other-relative White Male United-States 0 +17 0.188888893 0.117395714 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 +40 0.444444448 0.03077177 0.625 0.04787048 0 0.5050505 Private Some-college Divorced Other-service Not-in-family Black Male United-States 1 +28 0.311111122 0.177553117 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.06474552 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +55 0.6111111 0.148354053 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +55 0.6111111 0.0238027088 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.18891497 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Female United-States 0 +52 0.5777778 0.17121987 0.875 0.1502415 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.23662883 0.625 0 0 0.4040404 Private Some-college Never-married Sales Unmarried White Female United-States 0 +36 0.4 0.0394704677 0.1875 0 0 0.353535354 Private 5th-6th Never-married Other-service Not-in-family White Male United-States 0 +37 0.411111116 0.0437272042 0.8125 0 0 0.7070707 Private Bachelors Separated Other-service Not-in-family White Male England 0 +41 0.455555558 0.125018775 0.5625 0 0.454545438 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.125164255 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +24 0.266666681 0.171594366 0.25 0.02105021 0 0.5050505 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +39 0.433333337 0.0217632465 0.8125 0 0 0.6060606 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.07369882 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +42 0.466666669 0.123394884 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +39 0.433333337 0.105675541 0.5625 0 0.518365443 0.424242437 Private HS-grad Never-married Craft-repair Own-child White Male United-States 1 +48 0.533333361 0.0982592553 0.8125 0 0 0.6060606 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +47 0.5222222 0.0200841241 0.875 0 0.453856736 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +27 0.3 0.164723635 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +29 0.322222233 0.170943722 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Ecuador 0 +22 0.244444445 0.122120559 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 +37 0.411111116 0.101411395 0.5625 0 0 0.444444448 State-gov HS-grad Separated Craft-repair Not-in-family White Male United-States 0 +38 0.422222227 0.160107911 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.07552814 0.0625 0.04508045 0 0.4040404 Private Preschool Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female Cambodia 0 +48 0.533333361 0.1266036 0.875 0 0 0.8080808 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +46 0.51111114 0.150944471 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +51 0.566666663 0.117702849 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +28 0.311111122 0.1479789 0.8125 0.0501305 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.112522021 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +18 0.2 0.128190458 0.4375 0 0 0.3030303 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +45 0.5 0.07332029 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Female United-States 0 +36 0.4 0.231932268 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Transport-moving Own-child White Male United-States 0 +73 0.811111152 0.103136316 0.625 0 0 0.1010101 Private Some-college Widowed Priv-house-serv Unmarried White Female United-States 0 +52 0.5777778 0.121829592 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +17 0.188888893 0.123301268 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Female United-States 0 +29 0.322222233 0.228329539 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.124927178 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female ? 1 +20 0.222222224 0.115879588 0.625 0 0 0.1010101 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +42 0.466666669 0.06371636 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +37 0.411111116 0.203814223 0.625 0 0 0.4040404 Private Some-college Separated Other-service Other-relative White Female United-States 0 +40 0.444444448 0.167099863 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.0245617814 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 +29 0.322222233 0.0358192362 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.121931292 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 +26 0.2888889 0.167703345 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Adm-clerical Husband White Male United-States 1 +25 0.2777778 0.02728623 0.8125 0.0367403664 0 0.3030303 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +37 0.411111116 0.07906015 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +18 0.2 0.116605654 0.5 0 0 0.24242425 ? 12th Never-married ? Own-child White Female United-States 0 +33 0.366666675 0.213283449 0.625 0 0 0.5050505 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +26 0.2888889 0.104374945 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Puerto-Rico 0 +24 0.266666681 0.133534268 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 +33 0.366666675 0.11311271 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Own-child White Female United-States 0 +23 0.25555557 0.08841824 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Amer-Indian-Eskimo Male United-States 0 +20 0.222222224 0.159306392 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child Black Male United-States 0 +36 0.4 0.183841243 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +37 0.411111116 0.117533788 0.8125 0 0 0.5050505 Private Bachelors Widowed Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.0786688253 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Machine-op-inspct Own-child White Male United-States 0 +38 0.422222227 0.0745690241 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +50 0.5555556 0.1360836 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +44 0.4888889 0.202415973 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Adm-clerical Husband White Male United-States 1 +46 0.51111114 0.0370342955 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +57 0.6333333 0.08966495 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Female United-States 0 +37 0.411111116 0.0502409562 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.203692988 0.5625 0 0 0.5555556 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +21 0.233333334 0.232027248 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 +31 0.344444454 0.235163212 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +32 0.355555564 0.1496735 0.6875 0.07298073 0 0.424242437 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.158077866 0.5625 0 0 0.6060606 Private HS-grad Married-spouse-absent Other-service Unmarried Black Female United-States 1 +20 0.222222224 0.163788766 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +52 0.5777778 0.12778835 0.5625 0 0 0.5050505 Private HS-grad Separated Priv-house-serv Not-in-family White Female United-States 0 +47 0.5222222 0.214583367 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.0732004046 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +40 0.444444448 0.1262042 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.0507905632 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +46 0.51111114 0.116239257 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.179261208 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +65 0.722222269 0.182589814 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female ? 0 +50 0.5555556 0.09136024 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Other-relative Asian-Pac-Islander Female China 0 +59 0.655555546 0.0312964544 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +18 0.2 0.08799863 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +47 0.5222222 0.07709208 0.875 0.07688077 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.07397564 0.5625 0.05178052 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male Canada 1 +45 0.5 0.131712362 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +17 0.188888893 0.164739132 0.4375 0 0 0.4040404 Private 11th Never-married Sales Own-child White Female United-States 0 +45 0.5 0.1831347 0.5625 0 0 0.323232323 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +73 0.811111152 0.09428001 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +48 0.533333361 0.121536605 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +64 0.7111111 0.120376781 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +38 0.422222227 0.230108336 0.75 0 0 0.6060606 State-gov Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 0 +37 0.411111116 0.195091277 0.5625 0 0 0.5050505 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +62 0.6888889 0.07996538 0.5625 0.200512 0 0.727272749 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +26 0.2888889 0.126551062 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Male United-States 0 +46 0.51111114 0.07835765 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 +46 0.51111114 0.06921981 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 +51 0.566666663 0.0603837147 0.5625 0.04787048 0 0.24242425 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 1 +54 0.6 0.296091139 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +65 0.722222269 0.222363368 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.169666708 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.147473738 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +36 0.4 0.127279162 1 0 0 0.1010101 Self-emp-not-inc Doctorate Separated Prof-specialty Unmarried White Female Canada 0 +60 0.6666667 0.0173940286 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 +33 0.366666675 0.136084944 0.8125 0 0.459366381 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family White Male United-States 0 +62 0.6888889 0.07820005 0.5625 0 0 0.2020202 Private HS-grad Widowed Adm-clerical Not-in-family White Female Germany 0 +20 0.222222224 0.1312658 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.08456226 0.5625 0.14084141 0 0.353535354 Private HS-grad Never-married Tech-support Not-in-family White Female United-States 1 +66 0.733333349 0.07844521 0.875 0.0293602925 0 0.2020202 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +32 0.355555564 0.192045555 0.75 0 0 0.2020202 ? Assoc-acdm Never-married ? Unmarried White Male United-States 0 +29 0.322222233 0.275610983 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +70 0.7777778 0.2558212 0.625 0.105661057 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +74 0.822222233 0.0654453263 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +37 0.411111116 0.164883256 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male ? 0 +51 0.566666663 0.07802965 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.0795161352 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.174168617 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Not-in-family White Male United-States 1 +26 0.2888889 0.106964014 0.8125 0 0 0.7070707 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.0622554645 0.625 0 0.5121671 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 1 +58 0.644444466 0.111601293 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +30 0.333333343 0.06552211 0.625 0 0 0.6060606 ? Some-college Separated ? Not-in-family White Male United-States 0 +32 0.355555564 0.164441422 0.8125 0 0.430670351 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +66 0.733333349 0.17090331 0.5625 0 0.418962359 0.1010101 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.114825509 0.625 0 0 0.454545468 Private Some-college Never-married Sales Own-child White Male United-States 0 +35 0.3888889 0.162322491 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +50 0.5555556 0.111133866 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.200118542 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child White Female United-States 0 +35 0.3888889 0.229176849 0.5625 0 0 0.4848485 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +31 0.344444454 0.06498261 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.1247231 0.4375 0 0 0.4949495 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +84 0.933333337 0.116458826 0.625 0 0 0.353535354 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.208037287 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 +45 0.5 0.036436867 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 +46 0.51111114 0.194387436 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +50 0.5555556 0.171177447 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +37 0.411111116 0.07484854 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +32 0.355555564 0.115252525 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Own-child White Female United-States 0 +53 0.5888889 0.06470107 0.8125 0 0.43663913 0.4848485 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.186418176 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +22 0.244444445 0.1029686 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.100498751 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +35 0.3888889 0.0392960235 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.08594368 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Handlers-cleaners Wife White Female United-States 0 +29 0.322222233 0.240977839 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +26 0.2888889 0.0925214142 0.625 0 0 0.444444448 Private Some-college Never-married Handlers-cleaners Other-relative Asian-Pac-Islander Male Philippines 0 +34 0.377777785 0.07474751 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female United-States 0 +31 0.344444454 0.02323896 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.0566570461 0.625 0 0.4708448 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.150545061 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +37 0.411111116 0.250908434 0.875 0 0 0.4848485 Private Masters Divorced Prof-specialty Unmarried White Male United-States 0 +32 0.355555564 0.07837584 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +36 0.4 0.0749428347 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Sales Unmarried White Female United-States 0 +54 0.6 0.1519487 0.875 0.07298073 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +78 0.8666667 0.05624754 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male Portugal 0 +46 0.51111114 0.134434789 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +18 0.2 0.203317836 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child Amer-Indian-Eskimo Female United-States 0 +57 0.6333333 0.129307166 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +37 0.411111116 0.07126197 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +43 0.477777779 0.307290673 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.07830175 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family Black Female United-States 0 +32 0.355555564 0.158354014 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +38 0.422222227 0.06177389 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +25 0.2777778 0.08156637 0.75 0 0.459366381 0.3030303 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 +70 0.7777778 0.158806637 0.625 0 0 0.4040404 Private Some-college Divorced Farming-fishing Not-in-family Asian-Pac-Islander Male Vietnam 0 +40 0.444444448 0.0922647938 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +40 0.444444448 0.0226698238 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +20 0.222222224 0.03628869 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +29 0.322222233 0.135331944 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.117017187 0.6875 0 0 0.5555556 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.1443957 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Own-child Black Female United-States 0 +58 0.644444466 0.0690433457 0.375 0 0 0.5050505 Private 10th Divorced Transport-moving Not-in-family Black Male United-States 0 +38 0.422222227 0.11655312 0.8125 0 0.04889807 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried Asian-Pac-Islander Female Philippines 0 +59 0.655555546 0.162521854 0.625 0.068490684 0 0.4040404 Self-emp-not-inc Some-college Widowed Farming-fishing Not-in-family White Female United-States 0 +18 0.2 0.221629217 0.4375 0 0 0.151515156 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.184654862 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +39 0.433333337 0.162424862 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.1347857 0.8125 0 0.4331956 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 1 +45 0.5 0.154586941 0.5625 0 0 0.727272749 Private HS-grad Married-spouse-absent Craft-repair Not-in-family White Male Mexico 0 +62 0.6888889 0.168444917 0.8125 0 0 0.05050505 ? Bachelors Divorced ? Not-in-family White Male United-States 0 +24 0.266666681 0.166413531 0.5625 0 0 0.2020202 State-gov HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +22 0.244444445 0.2125163 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child Black Male Dominican-Republic 0 +23 0.25555557 0.0855018348 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +39 0.433333337 0.0201211683 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Separated Craft-repair Not-in-family White Male United-States 1 +28 0.311111122 0.0778464451 0.6875 0 0 0.3838384 Private Assoc-voc Never-married Tech-support Own-child White Female United-States 0 +51 0.566666663 0.01992315 0.4375 0.04386044 0 0.3030303 Private 11th Married-civ-spouse Sales Husband White Male United-States 1 +44 0.4888889 0.03804325 0.8125 0 0 0.373737365 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +73 0.811111152 0.06051842 0.125 0 0 0.4040404 ? 1st-4th Married-civ-spouse ? Husband White Male Portugal 0 +24 0.266666681 0.283409178 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Farming-fishing Husband Black Male United-States 0 +24 0.266666681 0.172070548 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 +52 0.5777778 0.162620857 0.125 0 0 0.5050505 Private 1st-4th Married-civ-spouse Craft-repair Husband Other Male Puerto-Rico 0 +43 0.477777779 0.0579205975 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +67 0.7444445 0.07879411 0.5 0 0 0.2020202 Self-emp-inc 12th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.146804929 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Not-in-family Black Male ? 0 +36 0.4 0.0138121713 0.5625 0.07688077 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.123997025 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.07935314 0.25 0 0 0.7070707 Private 7th-8th Divorced Handlers-cleaners Other-relative White Male United-States 0 +23 0.25555557 0.177745074 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Black Male Haiti 0 +26 0.2888889 0.030894354 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 +48 0.533333361 0.125640452 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +40 0.444444448 0.219781041 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.05695677 0.9375 0 0 0.3939394 Local-gov Prof-school Divorced Prof-specialty Not-in-family White Female United-States 0 +49 0.544444442 0.166561037 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.049028594 0.8125 0 0 0.151515156 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +29 0.322222233 0.176045075 0.5625 0 0 0.6060606 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +50 0.5555556 0.0524717048 0.8125 0 0 0.08080808 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.0450176969 0.625 0 0 0.09090909 Private Some-college Never-married Sales Own-child White Female United-States 0 +63 0.7 0.131125048 1 0 0.43663913 0.5050505 State-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +66 0.733333349 0.121378325 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 0 +65 0.722222269 0.0533924252 0.625 0 0 0.0606060624 ? Some-college Widowed ? Not-in-family Asian-Pac-Islander Female United-States 0 +60 0.6666667 0.06816034 0.6875 0 0 0.2020202 Private Assoc-voc Divorced Other-service Not-in-family White Male United-States 0 +60 0.6666667 0.054269366 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +19 0.211111113 0.133806378 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Own-child White Male United-States 0 +26 0.2888889 0.107994519 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +75 0.8333334 0.138653815 0.625 0 0.398301184 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 +58 0.644444466 0.0468638577 0.625 0 0 0.2020202 State-gov Some-college Widowed Prof-specialty Not-in-family White Female United-States 0 +18 0.2 0.255432576 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +65 0.722222269 0.07632695 0.75 0.03818038 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 +50 0.5555556 0.210464031 0.5625 0 0.4331956 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.174785569 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +45 0.5 0.115400031 0.875 0 0 0.5050505 Federal-gov Masters Married-civ-spouse Sales Husband White Male United-States 1 +19 0.211111113 0.3645721 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +29 0.322222233 0.105051175 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +52 0.5777778 0.06713927 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Sales Wife White Female Canada 1 +23 0.25555557 0.07933495 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +21 0.233333334 0.199472621 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +48 0.533333361 0.0531142578 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Exec-managerial Own-child White Female United-States 0 +59 0.655555546 0.126671627 0.875 0 0 0.353535354 ? Masters Married-civ-spouse ? Husband White Male United-States 1 +50 0.5555556 0.127844259 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.348911077 0.8125 0 0.365013778 0.4040404 State-gov Bachelors Never-married Protective-serv Not-in-family Black Male Puerto-Rico 0 +32 0.355555564 0.242871821 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Unmarried Black Female United-States 0 +40 0.444444448 0.0980019644 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband Black Male United-States 0 +19 0.211111113 0.309319377 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +30 0.333333343 0.19426015 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Husband White Male Mexico 0 +42 0.466666669 0.0849286541 0.5625 0 0 0.3939394 State-gov HS-grad Separated Adm-clerical Unmarried White Male United-States 0 +23 0.25555557 0.141094029 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +37 0.411111116 0.0217140783 0.5625 0.2782828 0 0.4040404 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 1 +21 0.233333334 0.141681343 0.4375 0 0 0.24242425 Private 11th Never-married Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.05694532 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +50 0.5555556 0.175508946 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 +20 0.222222224 0.0711151361 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Male United-States 0 +21 0.233333334 0.08912209 0.4375 0 0 0.353535354 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.08700179 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Other-relative White Male United-States 0 +45 0.5 0.149776563 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +49 0.544444442 0.135715857 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.1695118 0.625 0.0861408561 0 0.5050505 Self-emp-inc Some-college Divorced Sales Not-in-family White Male Cuba 1 +41 0.455555558 0.07688867 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 +48 0.533333361 0.0997646 0.8125 0 0 0.4040404 Local-gov Bachelors Married-spouse-absent Adm-clerical Unmarried Asian-Pac-Islander Female Philippines 0 +73 0.811111152 0.0566125959 0.5625 0 0 0.151515156 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +34 0.377777785 0.06498261 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Unmarried White Female United-States 0 +24 0.266666681 0.120847575 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +58 0.644444466 0.08306634 0.5625 0 0 0.161616161 State-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +41 0.455555558 0.09034118 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +53 0.5888889 0.127058238 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Other-service Husband White Male Mexico 0 +40 0.444444448 0.152480125 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +28 0.311111122 0.140906781 0.625 0.07298073 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +32 0.355555564 0.141312927 0.625 0 0.399449021 0.474747479 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.0378768854 0.625 0.0220202189 0 0.454545468 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family Black Male United-States 0 +18 0.2 0.0192954168 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Other-relative White Female United-States 0 +37 0.411111116 0.0235710125 0.5625 0 0 0.4040404 State-gov HS-grad Separated Other-service Unmarried White Female United-States 0 +43 0.477777779 0.18954742 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Adm-clerical Not-in-family Black Female United-States 0 +22 0.244444445 0.14461863 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.211609051 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Other-relative Black Male United-States 0 +51 0.566666663 0.07564466 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +63 0.7 0.137254879 0.5625 0 0 0.727272749 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 +29 0.322222233 0.138410658 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +44 0.4888889 0.0979595259 0.8125 0.07298073 0 0.4848485 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.104869992 0.25 0 0 0.3838384 Private 7th-8th Separated Other-service Unmarried White Female Peru 0 +37 0.411111116 0.1259065 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +62 0.6888889 0.141060352 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +31 0.344444454 0.0545111671 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.06910935 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +48 0.533333361 0.171622649 0.375 0 0.365932047 0.323232323 Private 10th Divorced Machine-op-inspct Unmarried White Female United-States 0 +24 0.266666681 0.0693349838 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Other-service Not-in-family White Female United-States 0 +56 0.622222245 0.117906928 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.0463263765 0.625 0 0 0.353535354 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +29 0.322222233 0.0731418058 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +34 0.377777785 0.06619699 0.9375 0 0.359045 0.4040404 Private Prof-school Never-married Tech-support Not-in-family Asian-Pac-Islander Male India 1 +39 0.433333337 0.03789911 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child Black Male United-States 0 +29 0.322222233 0.102716029 0.625 0 0 0.454545468 Private Some-college Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +38 0.422222227 0.139388636 0.5625 0 0 0.656565666 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.05549453 0.3125 0 0 0.2020202 Private 9th Never-married Other-service Own-child Asian-Pac-Islander Male Philippines 0 +37 0.411111116 0.112746976 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Guatemala 0 +30 0.333333343 0.0831121355 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Divorced Other-service Unmarried White Female United-States 0 +58 0.644444466 0.09944939 0.625 0 0 0.363636374 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +42 0.466666669 0.07991622 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 +59 0.655555546 0.07705302 0.5625 0 0.3452709 0.1919192 Local-gov HS-grad Widowed Other-service Not-in-family White Female United-States 0 +45 0.5 0.12546061 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 +46 0.51111114 0.123047344 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.15559724 0.875 0.046500463 0 0.373737365 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +41 0.455555558 0.0410512537 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +49 0.544444442 0.08723147 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +37 0.411111116 0.056783 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +31 0.344444454 0.0791450143 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +22 0.244444445 0.05930471 0.75 0 0 0.0606060624 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 0 +22 0.244444445 0.205763444 0.5625 0 0 0.333333343 Private HS-grad Divorced Sales Own-child White Female United-States 0 +17 0.188888893 0.198900118 0.4375 0 0 0.2020202 Private 11th Never-married Priv-house-serv Own-child White Female United-States 0 +47 0.5222222 0.07709208 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.118553519 0.375 0 0 0.151515156 Private 10th Never-married Other-service Other-relative White Male United-States 0 +39 0.433333337 0.16733627 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +23 0.25555557 0.144501433 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +41 0.455555558 0.2589794 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.271763742 0.875 0 0 0.454545468 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.09695731 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.171686634 0.5625 0 0 0.3030303 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 +33 0.366666675 0.06667655 0.375 0 0 0.363636374 Private 10th Divorced Handlers-cleaners Not-in-family White Female United-States 0 +17 0.188888893 0.1596802 0.4375 0 0 0.353535354 ? 11th Never-married ? Own-child White Female United-States 0 +41 0.455555558 0.130662322 0.5625 0 0 0.444444448 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +19 0.211111113 0.138632923 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Female United-States 0 +38 0.422222227 0.138648421 0.5625 0 0 0.454545468 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Male United-States 1 +24 0.266666681 0.02496927 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +38 0.422222227 0.185449645 0.8125 0.0115101151 0 0.4040404 Private Bachelors Divorced Sales Unmarried White Female United-States 0 +39 0.433333337 0.0824089646 0.8125 0 0 0.454545468 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.06735951 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 +31 0.344444454 0.0249409825 0.75 0 0 0.25252524 ? Assoc-acdm Never-married ? Own-child White Female United-States 0 +42 0.466666669 0.0909648761 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +36 0.4 0.09103627 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Own-child White Male ? 0 +29 0.322222233 0.1890059 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +17 0.188888893 0.152701721 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 +47 0.5222222 0.117153242 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.196237639 0.625 0 0 0.6060606 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +61 0.677777767 0.107869916 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.0200457331 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.05554841 0.3125 0 0 0.25252524 ? 9th Divorced ? Not-in-family White Female United-States 0 +59 0.655555546 0.115895756 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Prof-specialty Wife Black Female Jamaica 0 +29 0.322222233 0.11194817 0.625 0 0 0.5555556 Private Some-college Divorced Tech-support Not-in-family White Male United-States 0 +26 0.2888889 0.222443521 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Male United-States 0 +46 0.51111114 0.166391984 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +56 0.622222245 0.104558147 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +25 0.2777778 0.08793464 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +17 0.188888893 0.0383820347 0.5 0 0 0.181818187 Private 12th Never-married Sales Own-child White Female United-States 0 +29 0.322222233 0.148643672 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Not-in-family Black Female United-States 0 +23 0.25555557 0.08193547 0.1875 0 0 0.3030303 Private 5th-6th Never-married Handlers-cleaners Unmarried White Male United-States 0 +67 0.7444445 0.117601141 0.5625 0 0 0.353535354 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +29 0.322222233 0.230245069 0.875 0 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.06690824 0.75 0 0.2020202 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.0231945068 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +34 0.377777785 0.09500743 0.625 0 0 0.6262626 Private Some-college Married-civ-spouse Other-service Husband White Male Mexico 0 +49 0.544444442 0.129536167 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +54 0.6 0.0792574957 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male ? 0 +39 0.433333337 0.0192442276 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +41 0.455555558 0.08101071 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +31 0.344444454 0.11066778 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +47 0.5222222 0.06921981 1 0 0 0.4040404 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.0996501 0.5625 0 0 0.01010101 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 +23 0.25555557 0.126899958 0.4375 0.04508045 0 0.25252524 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +44 0.4888889 0.117119566 0.25 0 0 0.8080808 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 1 +25 0.2777778 0.166367054 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.0558286 0.625 0 0 0.161616161 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +52 0.5777778 0.174689919 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +62 0.6888889 0.107203119 0.5625 0 0 0.363636374 Federal-gov HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 +31 0.344444454 0.07547762 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +19 0.211111113 0.201420486 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.125581846 0.625 0 0 0.363636374 ? Some-college Never-married ? Own-child White Male United-States 0 +53 0.5888889 0.369487554 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Guatemala 0 +25 0.2777778 0.157645464 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 +45 0.5 0.162557542 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +69 0.7666667 0.0728737339 0.3125 0.0299303 0 0.4040404 Private 9th Never-married Craft-repair Other-relative White Male United-States 0 +49 0.544444442 0.187459469 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.106043287 0.8125 0 0 0.272727281 Private Bachelors Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female Taiwan 1 +44 0.4888889 0.02533702 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +56 0.622222245 0.1606932 0.625 0 0 0.414141417 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +37 0.411111116 0.01945639 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +37 0.411111116 0.0524144545 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.0747259557 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +34 0.377777785 0.155195817 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.139099017 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +54 0.6 0.10566207 0.5625 0 0 0.2020202 ? HS-grad Divorced ? Not-in-family White Male United-States 0 +28 0.311111122 0.190763146 0.625 0 0 0.656565666 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.0956129357 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +36 0.4 0.03929198 0.375 0 0 0.353535354 Private 10th Never-married Sales Unmarried White Female ? 0 +73 0.811111152 0.108457237 0.1875 0 0 0.2020202 Local-gov 5th-6th Married-civ-spouse Protective-serv Husband White Male United-States 0 +37 0.411111116 0.0213308372 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +24 0.266666681 0.138643026 0.8125 0 0 0.656565666 Private Bachelors Never-married Exec-managerial Own-child Black Female United-States 0 +30 0.333333343 0.0310795754 0.5625 0 0 0.3838384 State-gov HS-grad Married-AF-spouse Adm-clerical Own-child White Female United-States 0 +38 0.422222227 0.113190837 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +50 0.5555556 0.06624211 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 +69 0.7666667 0.123033196 0.5625 0 0 0.454545468 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +43 0.477777779 0.140508056 0.9375 1 0 0.4040404 Private Prof-school Married-spouse-absent Prof-specialty Not-in-family White Male United-States 1 +42 0.466666669 0.2253121 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +54 0.6 0.126412988 0.625 0 0 0.3838384 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.24645704 0.75 0 0 0.5858586 State-gov Assoc-acdm Never-married Exec-managerial Not-in-family White Female United-States 0 +39 0.433333337 0.128455818 0.625 0 0 0.454545468 Private Some-college Divorced Sales Not-in-family White Male United-States 0 +27 0.3 0.146954447 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Black Female Jamaica 0 +30 0.333333343 0.149633765 0.5625 0 0 0.6666667 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +30 0.333333343 0.100036032 0.5625 0 0.4722222 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.17989096 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.2071489 0.8125 0 0 0.6060606 Federal-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 +36 0.4 0.154360637 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Female Cuba 0 +22 0.244444445 0.187943742 0.625 0 0 0.1010101 Private Some-college Never-married Handlers-cleaners Own-child Black Male United-States 0 +21 0.233333334 0.2101542 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.0368975662 0.8125 0 0.3624885 0.424242437 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +76 0.844444454 0.04761687 0.25 0 0 0.25252524 Private 7th-8th Widowed Other-service Not-in-family White Female United-States 0 +22 0.244444445 0.177792892 0.625 0 0 0.282828271 ? Some-college Never-married ? Not-in-family White Female United-States 0 +37 0.411111116 0.1271458 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +34 0.377777785 0.203926042 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.1236872 0.5625 0 0 0.979797959 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +29 0.322222233 0.120260254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +28 0.311111122 0.118099555 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +73 0.811111152 0.128024086 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.07922584 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family Black Female United-States 0 +39 0.433333337 0.07302394 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +74 0.822222233 0.123728961 0.375 0 0 0.0606060624 Private 10th Widowed Other-service Not-in-family Black Female United-States 0 +27 0.3 0.140368626 0.8125 0 0 0.3030303 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +47 0.5222222 0.100278512 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +90 1 0.0587894581 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +47 0.5222222 0.134072423 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.116944447 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +69 0.7666667 0.2497715 0.8125 0 0 0.4040404 Private Bachelors Divorced Handlers-cleaners Not-in-family White Male United-States 0 +18 0.2 0.120888665 0.5 0 0 0.4040404 ? 12th Never-married ? Own-child Other Male United-States 0 +23 0.25555557 0.230866745 0.8125 0 0 0.2020202 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +44 0.4888889 0.0438774042 0.5625 0 0 0.3030303 Local-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +41 0.455555558 0.10138917 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +47 0.5222222 0.183323964 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Not-in-family Black Male United-States 0 +43 0.477777779 0.27174893 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +33 0.366666675 0.169843838 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family Black Male United-States 0 +48 0.533333361 0.054172378 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Not-in-family White Female United-States 0 +39 0.433333337 0.127717629 0.8125 0 0 0.6060606 Private Bachelors Divorced Sales Unmarried White Male United-States 0 +43 0.477777779 0.07799934 0.875 0 0.5847107 0.4040404 Private Masters Divorced Exec-managerial Unmarried White Female United-States 1 +18 0.2 0.0190994181 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 +52 0.5777778 0.152275369 0.5625 0 0 0.4040404 Private HS-grad Widowed Priv-house-serv Other-relative White Female United-States 0 +18 0.2 0.101580448 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 +27 0.3 0.128585145 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Never-married Sales Own-child White Male United-States 0 +27 0.3 0.08090901 0.8125 0 0.4331956 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.1721278 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +79 0.8777778 0.0958911 0.9375 0 0 0.1010101 ? Prof-school Married-civ-spouse ? Husband White Male United-States 0 +24 0.266666681 0.116978794 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +25 0.2777778 0.0241489056 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Sales Unmarried White Female United-States 0 +42 0.466666669 0.0553382672 0.375 0 0 0.353535354 Self-emp-not-inc 10th Widowed Transport-moving Unmarried White Male United-States 0 +63 0.7 0.08745509 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.152558923 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +47 0.5222222 0.102097049 0.9375 0.07688077 0 0.6060606 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.0918829 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.0447631031 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +63 0.7 0.2559027 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.0693309456 0.8125 0 0 0.5555556 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +65 0.722222269 0.138282686 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +30 0.333333343 0.105670825 0.375 0 0 0.4040404 ? 10th Divorced ? Unmarried White Male United-States 0 +62 0.6888889 0.140574053 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.09264265 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 +23 0.25555557 0.148290738 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Other-relative Black Female Jamaica 0 +47 0.5222222 0.0253733918 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +20 0.222222224 0.132445842 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +21 0.233333334 0.239566788 0.5625 0 0 0.1010101 ? HS-grad Never-married ? Own-child White Female United-States 0 +28 0.311111122 0.13301228 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +61 0.677777767 0.07747196 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +30 0.333333343 0.158162057 0.5625 0 0 0.727272749 State-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +30 0.333333343 0.2434807 0.8125 0 0 0.727272749 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +29 0.322222233 0.236997247 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +39 0.433333337 0.218380764 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried Black Female United-States 0 +23 0.25555557 0.08317477 0.4375 0 0 0.353535354 Private 11th Divorced Other-service Unmarried White Female United-States 0 +32 0.355555564 0.1267895 0.4375 0 0 0.4040404 Private 11th Never-married Priv-house-serv Unmarried Black Female United-States 0 +63 0.7 0.033911787 0.5625 0 0 0.343434334 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +19 0.211111113 0.0317746624 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Female United-States 0 +57 0.6333333 0.1957702 1 0 0 0.6060606 State-gov Doctorate Divorced Prof-specialty Not-in-family White Male United-States 1 +41 0.455555558 0.148966968 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.127264336 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Sales Own-child White Male United-States 0 +30 0.333333343 0.24037233 1 0 0 0.2020202 Private Doctorate Never-married Prof-specialty Own-child White Male United-States 0 +43 0.477777779 0.10138917 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 +64 0.7111111 0.112580612 0.25 0 0 0.25252524 Self-emp-not-inc 7th-8th Married-civ-spouse Other-service Husband White Male United-States 0 +56 0.622222245 0.203296289 0.1875 0 0 0.4040404 Private 5th-6th Separated Machine-op-inspct Not-in-family White Male United-States 0 +32 0.355555564 0.2113073 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +55 0.6111111 0.088204056 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.133179322 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Own-child White Female United-States 0 +17 0.188888893 0.168748 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child Black Male United-States 0 +29 0.322222233 0.147359237 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +23 0.25555557 0.156604856 0.5625 0 0 0.4040404 ? HS-grad Separated ? Own-child White Female United-States 0 +37 0.411111116 0.131090015 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +39 0.433333337 0.0260799285 0.5625 0 0 0.222222224 Private HS-grad Divorced Priv-house-serv Unmarried White Female United-States 0 +36 0.4 0.13573 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +50 0.5555556 0.1881431 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +41 0.455555558 0.0183113813 0.6875 0 0.5544077 0.121212125 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 1 +31 0.344444454 0.05897468 0.625 0 0 0.5050505 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 +71 0.788888931 0.06790575 0.5625 0 0.571395755 0.151515156 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +56 0.622222245 0.140385464 0.625 0 0 0.323232323 Private Some-college Widowed Exec-managerial Not-in-family Black Female United-States 0 +51 0.566666663 0.0968690738 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.1099242 0.625 0 0 0.3030303 Private Some-college Separated Other-service Own-child White Female United-States 0 +53 0.5888889 0.115796745 0.8125 0.143441439 0 0.5555556 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 +33 0.366666675 0.09268912 0.875 0 0 0.353535354 State-gov Masters Never-married Prof-specialty Not-in-family Black Female United-States 0 +27 0.3 0.105418921 0.625 0 0.5456841 0.2020202 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +40 0.444444448 0.08021863 0.625 0.05178052 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.07917802 0.625 0 0 0.323232323 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +54 0.6 0.09959083 0.6875 0.0501305 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Vietnam 0 +33 0.366666675 0.01650429 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Separated Craft-repair Other-relative White Male United-States 0 +27 0.3 0.1061652 0.5625 0 0 0.4040404 ? HS-grad Separated ? Other-relative White Female United-States 0 +36 0.4 0.122395359 0.375 0 0 0.6060606 Private 10th Never-married Farming-fishing Own-child Black Male United-States 0 +42 0.466666669 0.03728889 0.875 0 0 0.5555556 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.06254778 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +19 0.211111113 0.17419824 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female ? 0 +52 0.5777778 0.14920944 0.8125 0 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.123407684 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female Taiwan 1 +30 0.333333343 0.256719679 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.202647 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +47 0.5222222 0.0227048472 0.8125 0.03103031 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.106642738 0.1875 0 0 0.4040404 Private 5th-6th Never-married Transport-moving Not-in-family White Male Columbia 0 +36 0.4 0.1940473 0.4375 0 0 0.4040404 Private 11th Separated Machine-op-inspct Not-in-family Black Male United-States 0 +35 0.3888889 0.07335262 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried White Male United-States 0 +46 0.51111114 0.241484344 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 1 +24 0.266666681 0.08527822 0.8125 0 0 0.08080808 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +30 0.333333343 0.110587627 0.6875 0.05178052 0 0.5252525 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.134582967 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 +50 0.5555556 0.06615995 0.5625 0 0 0.454545468 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +41 0.455555558 0.08692636 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +38 0.422222227 0.0149827749 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.1528371 0.8125 0 0 0.4848485 Private Bachelors Never-married Sales Not-in-family Black Male United-States 0 +47 0.5222222 0.268505871 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +59 0.655555546 0.18107301 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Adm-clerical Other-relative White Female United-States 1 +35 0.3888889 0.06985226 0.8125 0 0 0.161616161 ? Bachelors Divorced ? Unmarried White Female ? 0 +59 0.655555546 0.0615502745 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.1177116 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.08531998 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +52 0.5777778 0.0554217845 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Other-service Other-relative Black Female Haiti 0 +51 0.566666663 0.119705267 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +67 0.7444445 0.232528359 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +58 0.644444466 0.234182552 0.4375 0 0 0.151515156 ? 11th Divorced ? Not-in-family Black Male United-States 0 +68 0.75555557 0.105071381 0.375 0 0 0.2020202 Private 10th Widowed Other-service Unmarried Black Female United-States 0 +71 0.788888931 0.154108733 0.3125 0 0 0.0606060624 Private 9th Divorced Priv-house-serv Not-in-family Black Female United-States 0 +49 0.544444442 0.12421862 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 +35 0.3888889 0.0693322942 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +18 0.2 0.108481482 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +29 0.322222233 0.170910716 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Farming-fishing Wife White Female United-States 0 +47 0.5222222 0.185087278 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +31 0.344444454 0.08742747 0.3125 0 0 0.4040404 Private 9th Never-married Farming-fishing Not-in-family White Male Puerto-Rico 0 +22 0.244444445 0.0441481657 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Exec-managerial Not-in-family Black Male United-States 0 +20 0.222222224 0.072511375 0.625 0 0 0.1010101 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +57 0.6333333 0.108504385 0.5625 0 0 0.262626261 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +18 0.2 0.07973032 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 +32 0.355555564 0.08838389 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +39 0.433333337 0.0814875662 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Own-child White Male United-States 0 +37 0.411111116 0.145073935 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +51 0.566666663 0.042894043 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male Cambodia 0 +48 0.533333361 0.08878936 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +39 0.433333337 0.142412126 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +35 0.3888889 0.02089506 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.0979581848 0.1875 0.0406404063 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband Other Male Mexico 0 +19 0.211111113 0.171859726 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child White Male United-States 0 +28 0.311111122 0.277462542 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +23 0.25555557 0.185772941 0.625 0 0.453168035 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +18 0.2 0.2142392 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 +23 0.25555557 0.193969846 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +47 0.5222222 0.09317811 0.4375 0.03411034 0 0.4040404 Local-gov 11th Married-civ-spouse Transport-moving Husband White Male El-Salvador 0 +42 0.466666669 0.0780842 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Adm-clerical Own-child White Male United-States 0 +25 0.2777778 0.0406531952 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +17 0.188888893 0.09437363 0.375 0 0 0.121212125 Private 10th Never-married Sales Own-child White Female United-States 0 +34 0.377777785 0.106445387 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +30 0.333333343 0.216871366 0.875 0.1502415 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male ? 1 +29 0.322222233 0.156788051 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Exec-managerial Own-child White Male United-States 0 +22 0.244444445 0.2353114 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +46 0.51111114 0.219284639 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +69 0.7666667 0.09441337 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.086534366 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.214361787 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 +59 0.655555546 0.09967569 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male ? 0 +45 0.5 0.1048417 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.194269568 0.875 0 0 0.4040404 State-gov Masters Never-married Adm-clerical Not-in-family Black Female United-States 0 +47 0.5222222 0.221730918 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Prof-specialty Unmarried White Male United-States 0 +64 0.7111111 0.115425624 0.4375 0 0 0.4040404 Private 11th Widowed Farming-fishing Unmarried White Female United-States 0 +29 0.322222233 0.1541451 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +29 0.322222233 0.1320909 0.9375 0.0217402168 0 0.727272749 Private Prof-school Divorced Prof-specialty Own-child White Female United-States 0 +17 0.188888893 0.0321754143 0.4375 0 0 0.2020202 Private 11th Never-married Prof-specialty Own-child White Female United-States 0 +24 0.266666681 0.135838434 0.5625 0 0 0.6060606 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 +28 0.311111122 0.22723572 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.1659919 0.5625 0.0332503319 0 0.5050505 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +48 0.533333361 0.153373227 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.119407564 0.6875 0 0 0.3838384 Private Assoc-voc Never-married Prof-specialty Unmarried Black Female United-States 0 +38 0.422222227 0.0482930951 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Female Portugal 0 +49 0.544444442 0.0203535389 0.5625 0 0.383149683 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +42 0.466666669 0.188702136 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.0184602328 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.112501137 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family White Female Columbia 0 +41 0.455555558 0.116980813 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.187617749 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +32 0.355555564 0.07657279 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 +41 0.455555558 0.1703948 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.0226772334 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +56 0.622222245 0.06787611 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +47 0.5222222 0.119523406 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 +30 0.333333343 0.210659355 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Sales Unmarried Black Female United-States 0 +51 0.566666663 0.0292004142 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.252859652 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Adm-clerical Own-child White Male South 0 +49 0.544444442 0.177522138 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +67 0.7444445 0.0500671864 0.5625 0 0 0.1010101 ? HS-grad Widowed ? Not-in-family White Female Germany 0 +26 0.2888889 0.203472748 0.5625 0.0346403457 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.167043284 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Craft-repair Unmarried White Male United-States 0 +37 0.411111116 0.0588460341 0.3125 0 0 0.4040404 ? 9th Divorced ? Unmarried White Female United-States 0 +34 0.377777785 0.273170084 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +51 0.566666663 0.11252404 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.06902112 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.354634762 0.625 0.0388703868 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +32 0.355555564 0.118459895 0.25 0 0 0.353535354 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.144065 0.4375 0 0 0.4040404 Private 11th Separated Adm-clerical Unmarried Black Female United-States 0 +17 0.188888893 0.101206638 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 +40 0.444444448 0.05075958 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Unmarried White Female United-States 0 +38 0.422222227 0.183653325 0.8125 0 0 0.5050505 Private Bachelors Divorced Sales Own-child White Male United-States 0 +67 0.7444445 0.2768274 0.5625 0.158311576 0 0.4040404 Self-emp-inc HS-grad Widowed Exec-managerial Not-in-family White Female United-States 1 +44 0.4888889 0.149816975 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 +26 0.2888889 0.1214019 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.115333349 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Own-child White Female United-States 0 +45 0.5 0.247212082 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +38 0.422222227 0.205192953 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +62 0.6888889 0.0653443 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.09892807 0.5625 0 0.459366381 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +45 0.5 0.216081992 0.625 0 0 0.4040404 State-gov Some-college Married-spouse-absent Other-service Other-relative Black Male Haiti 0 +47 0.5222222 0.0570719466 0.875 0 0 0.2020202 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +49 0.544444442 0.12421862 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Male United-States 0 +36 0.4 0.220169 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.114247613 0.5625 0 0 0.373737365 ? HS-grad Divorced ? Unmarried Black Female United-States 0 +29 0.322222233 0.142858014 0.5625 0 0 0.3030303 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 +23 0.25555557 0.118432283 0.4375 0 0 0.4040404 Private 11th Never-married Farming-fishing Other-relative White Female Puerto-Rico 0 +50 0.5555556 0.119543612 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.193136021 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +44 0.4888889 0.115459979 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.131326422 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Tech-support Wife White Female United-States 0 +73 0.811111152 0.13427718 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +24 0.266666681 0.13755326 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.0488352925 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 +61 0.677777767 0.0411125459 0.625 0.07688077 0 0.363636374 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.131090015 0.875 0 0 0.4040404 Federal-gov Masters Never-married Exec-managerial Own-child White Female United-States 0 +29 0.322222233 0.263935953 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.06336612 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.19492425 0.4375 0 0 0.121212125 Private 11th Never-married Machine-op-inspct Own-child Other Male United-States 0 +30 0.333333343 0.114588425 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.106497929 0.5625 0 0.3946281 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.301567644 1 0 0 0.6060606 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 +90 1 0.0268228371 0.5625 0.00401004 0 0.04040404 ? HS-grad Widowed ? Not-in-family White Male United-States 0 +76 0.844444454 0.210479528 0.1875 0 0 0.4040404 ? 5th-6th Widowed ? Unmarried White Female United-States 0 +47 0.5222222 0.150428534 0.5625 0 0.3452709 0.353535354 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +65 0.722222269 0.19760491 0.0625 0 0 0.3030303 ? Preschool Married-civ-spouse ? Husband Black Male United-States 0 +25 0.2777778 0.0716485754 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +41 0.455555558 0.0445327535 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Own-child White Female United-States 0 +47 0.5222222 0.185143188 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +27 0.3 0.08336538 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Adm-clerical Unmarried Black Female United-States 0 +42 0.466666669 0.04758858 0.5625 0 0 0.444444448 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.11950253 0.5625 0 0 0.2020202 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +37 0.411111116 0.1349588 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +19 0.211111113 0.107273161 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 +24 0.266666681 0.158882737 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.06581981 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.112688385 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +44 0.4888889 0.0660777763 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +37 0.411111116 0.0149531392 0.8125 0.07298073 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 +45 0.5 0.07341054 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +35 0.3888889 0.1791292 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +58 0.644444466 0.06800004 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +45 0.5 0.114562824 0.625 0 0 0.5050505 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +54 0.6 0.219677314 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.14611119 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +69 0.7666667 0.02489114 0.625 0.200512 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.144145817 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +36 0.4 0.06726724 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male India 0 +61 0.677777767 0.102012858 0.375 0 0 0.3838384 State-gov 10th Never-married Other-service Not-in-family Black Female United-States 0 +57 0.6333333 0.108884931 0.8125 0.07688077 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.247321859 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative White Male United-States 0 +35 0.3888889 0.0583604164 0.875 0 0.453856736 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.11351683 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.0947939157 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Other-relative White Female United-States 0 +25 0.2777778 0.133124769 0.625 0 0 0.434343427 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +46 0.51111114 0.08288044 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 +23 0.25555557 0.222650975 0.8125 0 0 0.25252524 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +44 0.4888889 0.13755931 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +38 0.422222227 0.233558863 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +35 0.3888889 0.173266754 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 +25 0.2777778 0.110052839 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family Other Female United-States 0 +78 0.8666667 0.09149225 0.5625 0.0108601088 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +18 0.2 0.0244163 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Female United-States 0 +40 0.444444448 0.10042534 0.5625 0.0217402168 0 0.6060606 Private HS-grad Married-spouse-absent Handlers-cleaners Not-in-family White Male Poland 0 +61 0.677777767 0.1497907 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +31 0.344444454 0.0196348783 0.5 0 0 0.4040404 State-gov 12th Married-civ-spouse Other-service Wife White Female United-States 0 +33 0.366666675 0.0534133054 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +35 0.3888889 0.183429033 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +55 0.6111111 0.135041639 0.875 0 0 0.454545468 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.09994713 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +31 0.344444454 0.110623322 0.625 0 0.3624885 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.08708666 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.117855735 0.875 0 0 0.474747479 Local-gov Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +48 0.533333361 0.221330166 0.9375 0 0 0.454545468 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.05238347 0.5625 0 0 0.343434334 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +38 0.422222227 0.0903001 0.875 0.07298073 0 0.6060606 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.140912846 0.5625 0.04386044 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +29 0.322222233 0.103592969 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative Other Male Ecuador 0 +27 0.3 0.113710806 0.8125 0 0 0.02020202 Private Bachelors Never-married Sales Own-child White Male United-States 0 +31 0.344444454 0.251519322 0.3125 0 0 0.434343427 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.0387955867 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +53 0.5888889 0.2039779 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.1532924 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.0301588532 0.5625 0 0 0.464646459 Federal-gov HS-grad Separated Machine-op-inspct Not-in-family Black Male United-States 0 +54 0.6 0.0902287 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Own-child White Female United-States 0 +36 0.4 0.188330352 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Own-child White Female United-States 0 +22 0.244444445 0.1859851 0.5625 0 0 0.5050505 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +62 0.6888889 0.09181218 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +41 0.455555558 0.137677178 0.5625 0 0.3409091 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +59 0.655555546 0.150343 0.8125 0 0.453856736 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.124351308 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +34 0.377777785 0.179104269 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.106854223 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.0148548028 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 +41 0.455555558 0.119024321 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.182339936 0.8125 0 0 0.323232323 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +24 0.266666681 0.06756965 0.625 0 0 0.4848485 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +35 0.3888889 0.0532429 0.5625 0 0 0.727272749 Private HS-grad Never-married Transport-moving Unmarried Black Male United-States 0 +40 0.444444448 0.0287619438 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +46 0.51111114 0.0787712038 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Prof-specialty Wife White Female United-States 0 +45 0.5 0.223373 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +33 0.366666675 0.140052736 0.5625 0 0.2506887 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +68 0.75555557 0.150525525 0.5625 0 0 0.07070707 Private HS-grad Widowed Other-service Unmarried White Female England 0 +33 0.366666675 0.229225338 0.8125 0 0 0.454545468 Private Bachelors Separated Exec-managerial Not-in-family Black Female United-States 0 +23 0.25555557 0.12447793 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +42 0.466666669 0.0216777083 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +30 0.333333343 0.133283049 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 1 +35 0.3888889 0.167288452 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +40 0.444444448 0.257626265 0.5625 0 0 0.5050505 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.0729572549 0.875 0.0545505434 0 0.3030303 State-gov Masters Divorced Prof-specialty Unmarried White Male United-States 0 +46 0.51111114 0.108699039 0.3125 0 0 0.5050505 Self-emp-inc 9th Married-civ-spouse Adm-clerical Wife White Female United-States 0 +49 0.544444442 0.07420464 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +41 0.455555558 0.0970105156 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.151158646 0.875 0 0 0.3838384 Private Masters Never-married Exec-managerial Own-child White Male United-States 0 +37 0.411111116 0.155187741 0.5625 0 0 0.2020202 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 +50 0.5555556 0.01400615 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +20 0.222222224 0.117675908 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +59 0.655555546 0.268488348 1 0.25236252 0 0.454545468 State-gov Doctorate Divorced Prof-specialty Unmarried White Male United-States 1 +30 0.333333343 0.100714289 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.0229762811 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.218083724 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +28 0.311111122 0.223196536 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +48 0.533333361 0.108201295 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female Ireland 1 +34 0.377777785 0.228423834 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Unmarried White Female United-States 0 +58 0.644444466 0.111036874 0.8125 0 0 1 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +33 0.366666675 0.180412278 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +38 0.422222227 0.112968571 0.8125 0 0 0.8484849 Private Bachelors Married-spouse-absent Transport-moving Not-in-family Other Male India 0 +49 0.544444442 0.395133734 0.8125 0.07298073 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +67 0.7444445 0.0713320151 0.125 0 0 0.2020202 Self-emp-not-inc 1st-4th Widowed Other-service Not-in-family Black Female United-States 0 +23 0.25555557 0.135162875 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family White Female United-States 0 +42 0.466666669 0.1305862 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +54 0.6 0.09296527 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +49 0.544444442 0.08243052 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.03301666 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.191091835 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +31 0.344444454 0.192904323 0.5625 0.0332503319 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +36 0.4 0.112086914 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +25 0.2777778 0.105296344 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.030717887 0.875 0 0 0.6060606 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +40 0.444444448 0.07567968 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +52 0.5777778 0.134989113 0.75 0 0 0.5050505 Private Assoc-acdm Separated Prof-specialty Not-in-family White Female United-States 0 +42 0.466666669 0.230104968 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.0230086111 0.5 0 0 0.3030303 ? 12th Separated ? Unmarried White Female United-States 0 +50 0.5555556 0.08564059 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Wife White Female Canada 1 +52 0.5777778 0.216850489 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband Black Male United-States 1 +51 0.566666663 0.023715822 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 +19 0.211111113 0.144766137 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +43 0.477777779 0.08899411 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 +57 0.6333333 0.149691015 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 1 +35 0.3888889 0.111671343 0.5625 0 0 0.6060606 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +30 0.333333343 0.173687026 0.8125 0 0 0.3030303 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +38 0.422222227 0.24056834 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.205925763 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +23 0.25555557 0.115879588 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +22 0.244444445 0.07454478 0.625 0 0 0.4040404 Private Some-college Separated Other-service Own-child White Female United-States 0 +21 0.233333334 0.273242176 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Other-relative White Male Mexico 0 +60 0.6666667 0.05549116 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +45 0.5 0.194806382 0.8125 0 0 0.4848485 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 1 +26 0.2888889 0.06857389 0.5625 0.0572105721 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 +49 0.544444442 0.226650417 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Other-service Husband White Male United-States 0 +29 0.322222233 0.258234471 0.625 0 0 0.353535354 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +47 0.5222222 0.221064791 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +40 0.444444448 0.188833475 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +34 0.377777785 0.142832413 0.5625 0.07443074 0 0.353535354 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +42 0.466666669 0.116995633 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.291893 0.125 0 0 0.353535354 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +63 0.7 0.07176577 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.0150992963 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.0369204655 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.241259381 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.128001183 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +26 0.2888889 0.06580297 0.875 0 0 0.323232323 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 0 +56 0.622222245 0.03594384 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +39 0.433333337 0.159045741 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried Black Female United-States 0 +44 0.4888889 0.2197285 0.25 0 0 0.4848485 Private 7th-8th Divorced Handlers-cleaners Not-in-family White Male United-States 0 +34 0.377777785 0.391371369 0.5625 0 0 0.4848485 Private HS-grad Separated Adm-clerical Not-in-family White Male United-States 1 +40 0.444444448 0.1485743 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.1087509 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 +44 0.4888889 0.06415753 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.150378019 0.625 0 0 0.727272749 Federal-gov Some-college Divorced Protective-serv Own-child White Male United-States 0 +22 0.244444445 0.1594721 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Not-in-family White Male England 0 +58 0.644444466 0.154574811 0.625 0 0 0.2020202 Self-emp-inc Some-college Widowed Sales Not-in-family White Female United-States 1 +43 0.477777779 0.119271509 0.625 0 0 0.3030303 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 +23 0.25555557 0.193763077 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male Columbia 0 +41 0.455555558 0.0335399956 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Not-in-family Black Female United-States 0 +44 0.4888889 0.11722935 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +32 0.355555564 0.131272539 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +38 0.422222227 0.169899076 0.75 0 0 0.565656543 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 +47 0.5222222 0.128831655 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.1178059 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +39 0.433333337 0.112574555 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.159319863 0.5 0 0 0.545454562 Private 12th Divorced Protective-serv Own-child White Male Mexico 0 +40 0.444444448 0.144299373 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.146065384 0.5625 0 0.8654729 0.454545468 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +34 0.377777785 0.165158063 0.5625 0.0203602035 0 0.3030303 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +57 0.6333333 0.294824243 0.875 0 0.453856736 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +71 0.788888931 0.134988442 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 0 +45 0.5 0.112705223 0.875 0 0 0.5050505 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +54 0.6 0.09889776 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +26 0.2888889 0.0528212674 0.6875 0 0 0.545454562 Private Assoc-voc Never-married Sales Unmarried White Female United-States 0 +37 0.411111116 0.123037912 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +28 0.311111122 0.02564752 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +42 0.466666669 0.0775763541 0.8125 0 0 0.151515156 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +45 0.5 0.131978408 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.112759776 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +57 0.6333333 0.15034233 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.0149827749 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Not-in-family White Male United-States 0 +45 0.5 0.055130817 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female United-States 1 +30 0.333333343 0.0996298939 0.6875 0 0 0.464646459 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.0197082926 0.5625 0 0 0.4040404 Private HS-grad Married-AF-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.1736089 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.09196844 1 0 0.43663913 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.138406619 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +19 0.211111113 0.0482587442 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +39 0.433333337 0.101176329 0.625 0 0 0.3838384 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +55 0.6111111 0.174208343 0.375 0 0 0.4040404 Self-emp-inc 10th Widowed Transport-moving Not-in-family White Male United-States 0 +17 0.188888893 0.07732041 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Female United-States 0 +43 0.477777779 0.125404045 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.118040286 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +45 0.5 0.168339849 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +44 0.4888889 0.08101071 0.875 0 0 0.3838384 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.13010329 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +32 0.355555564 0.124622062 0.75 0 0.4331956 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male Ireland 1 +21 0.233333334 0.149132654 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +43 0.477777779 0.0377603658 0.8125 0 0 0.6060606 Federal-gov Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.103675142 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.109860212 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +40 0.444444448 0.118337318 0.5625 0 0 0.5151515 Self-emp-inc HS-grad Never-married Sales Not-in-family White Male United-States 0 +46 0.51111114 0.09644273 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Own-child White Female Dominican-Republic 0 +20 0.222222224 0.07743558 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 +54 0.6 0.0220771134 0.5625 0 0 0.4040404 State-gov HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 +23 0.25555557 0.1014902 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +58 0.644444466 0.052605737 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.225637421 0.625 0.031370312 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +50 0.5555556 0.209840342 0.875 0.07688077 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.135730669 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.08359304 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +60 0.6666667 0.112066709 0.4375 0 0 0.3030303 Private 11th Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female Hong 0 +43 0.477777779 0.07912077 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.243352726 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 +31 0.344444454 0.09566749 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 0 +35 0.3888889 0.186267316 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +48 0.533333361 0.0339474864 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried White Male United-States 0 +43 0.477777779 0.117255621 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +27 0.3 0.187080935 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +24 0.266666681 0.0163284969 0.5625 0 0.365013778 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.101763651 0.5625 0 0.4331956 0.7070707 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.111320436 0.5625 0 0 0.222222224 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +49 0.544444442 0.123089775 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +31 0.344444454 0.116522811 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +59 0.655555546 0.175948754 0.4375 0 0 0.4040404 Private 11th Divorced Farming-fishing Not-in-family White Male United-States 0 +27 0.3 0.110868491 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 +38 0.422222227 0.0872718841 0.875 0 0 0.4040404 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +51 0.566666663 0.0243725181 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.219399825 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +58 0.644444466 0.222126961 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.08999498 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +55 0.6111111 0.05617345 0.1875 0 0 0.4040404 Private 5th-6th Widowed Machine-op-inspct Unmarried White Female United-States 0 +76 0.844444454 0.16156745 0.5625 0 0 0.08080808 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.135876819 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +51 0.566666663 0.1294412 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +33 0.366666675 0.09667914 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.0190839265 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +51 0.566666663 0.165603951 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +42 0.466666669 0.134097353 0.6875 0 0 0.4040404 Local-gov Assoc-voc Widowed Prof-specialty Unmarried Black Female United-States 0 +53 0.5888889 0.07035808 0.8125 0.0861408561 0 0.5050505 Private Bachelors Never-married Other-service Not-in-family White Male Italy 1 +33 0.366666675 0.123878486 0.875 0.07688077 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +30 0.333333343 0.08736214 0.8125 1 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.387580037 0.625 0 0 0.4040404 Local-gov Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +42 0.466666669 0.124389693 0.75 0 0 0.4040404 State-gov Assoc-acdm Divorced Other-service Not-in-family White Female United-States 0 +34 0.377777785 0.0466429368 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male United-States 1 +31 0.344444454 0.151886746 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Unmarried White Female United-States 0 +46 0.51111114 0.11282713 0.625 0 0.453856736 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.274174333 0.125 0 0 0.4040404 Private 1st-4th Married-spouse-absent Other-service Not-in-family White Male Guatemala 0 +40 0.444444448 0.114513658 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male ? 0 +46 0.51111114 0.08479261 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +43 0.477777779 0.0241287 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +35 0.3888889 0.0451827124 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 +23 0.25555557 0.07260769 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +50 0.5555556 0.0643744 0.5625 0 0 0.121212125 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female ? 0 +43 0.477777779 0.07983808 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Other-relative Black Male United-States 0 +61 0.677777767 0.133412361 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +29 0.322222233 0.0527114831 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Own-child White Male United-States 0 +21 0.233333334 0.157679811 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +36 0.4 0.162994 0.8125 0 0.3838384 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +40 0.444444448 0.0624480955 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +23 0.25555557 0.173558384 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +90 1 0.02720271 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +24 0.266666681 0.0373299755 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +20 0.222222224 0.114231452 0.625 0.0217602178 0 0.121212125 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +40 0.444444448 0.215040028 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.0505487621 0.6875 0 0 0.5555556 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.123186767 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 +22 0.244444445 0.126809031 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +25 0.2777778 0.142450526 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +46 0.51111114 0.0766522661 0.5 0.07298073 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male ? 1 +47 0.5222222 0.116013624 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.148152 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.125826344 0.875 0 0 0.5050505 ? Masters Married-civ-spouse ? Husband White Male United-States 0 +26 0.2888889 0.08941103 0.8125 0 0 0.8080808 ? Bachelors Never-married ? Not-in-family White Female United-States 0 +28 0.311111122 0.1413082 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +20 0.222222224 0.120237358 0.625 0 0 0.4040404 State-gov Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 +51 0.566666663 0.114072494 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Not-in-family White Female Ireland 0 +32 0.355555564 0.110935844 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +55 0.6111111 0.09704554 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband White Male United-States 0 +41 0.455555558 0.0900461748 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Protective-serv Unmarried White Female United-States 0 +46 0.51111114 0.124044172 0.875 0.07688077 0 0.353535354 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +45 0.5 0.0978578255 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +65 0.722222269 0.01671982 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.120103993 1 0.07688077 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.158838958 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +22 0.244444445 0.132201344 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 +42 0.466666669 0.0365069173 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.148337215 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.0398368724 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 +67 0.7444445 0.04320589 0.625 0 0 0.414141417 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 +28 0.311111122 0.13243103 0.5625 0 0 0.373737365 Private HS-grad Married-spouse-absent Tech-support Not-in-family White Female United-States 0 +56 0.622222245 0.131789148 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Other-service Husband White Male Cuba 1 +31 0.344444454 0.177139565 0.6875 0 0 0.3838384 State-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 +33 0.366666675 0.3738022 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Unmarried White Female United-States 0 +52 0.5777778 0.07288384 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +45 0.5 0.146597475 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male Germany 1 +53 0.5888889 0.094073236 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.06921981 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male Portugal 0 +40 0.444444448 0.143475637 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +35 0.3888889 0.153897911 0.625 0 0 0.4848485 Private Some-college Never-married Sales Own-child White Male United-States 0 +65 0.722222269 0.0154286548 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +42 0.466666669 0.016409995 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Other-service Wife Black Female United-States 0 +23 0.25555557 0.0279058814 0.8125 0 0 0.151515156 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +39 0.433333337 0.158455044 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.231342927 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.220169 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +25 0.2777778 0.16724737 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.02040136 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Other-service Unmarried White Female United-States 0 +39 0.433333337 0.126988187 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +39 0.433333337 0.160262823 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +25 0.2777778 0.133945808 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Own-child Black Male United-States 0 +30 0.333333343 0.1575936 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.115235016 0.3125 0 0 0.4848485 Private 9th Married-civ-spouse Machine-op-inspct Wife Black Female United-States 0 +22 0.244444445 0.237783939 0.5625 0 0 0.363636374 Private HS-grad Never-married Craft-repair Unmarried White Female Mexico 0 +46 0.51111114 0.143557146 0.875 0 0.453856736 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.126716077 0.8125 0 0.323232323 0.3838384 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 +33 0.366666675 0.08759788 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 +70 0.7777778 0.232597724 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +36 0.4 0.122633114 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 +53 0.5888889 0.118917227 0.875 0 0 0.5050505 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +55 0.6111111 0.0482452735 0.5625 0 0.371212125 0.4040404 State-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +17 0.188888893 0.107663818 0.4375 0 0 0.3030303 Private 11th Never-married Protective-serv Own-child White Female United-States 0 +36 0.4 0.123543061 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 +36 0.4 0.08482022 0.9375 0 0 0.5555556 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 +40 0.444444448 0.121319056 0.5625 0 0 0.4040404 Local-gov HS-grad Married-spouse-absent Farming-fishing Own-child Black Male United-States 0 +36 0.4 0.3993588 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 +28 0.311111122 0.123796985 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +39 0.433333337 0.05186552 0.875 1 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.05449837 0.1875 0 0 0.454545468 Private 5th-6th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +63 0.7 0.111582436 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +61 0.677777767 0.08351222 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +48 0.533333361 0.122116514 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +55 0.6111111 0.08361055 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Not-in-family White Male Poland 0 +18 0.2 0.09251872 0.625 0 0 0.04040404 ? Some-college Never-married ? Own-child White Female United-States 0 +20 0.222222224 0.196657926 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Sales Other-relative White Male United-States 0 +49 0.544444442 0.0614606962 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 +27 0.3 0.0997861549 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Handlers-cleaners Husband Asian-Pac-Islander Male United-States 0 +37 0.411111116 0.08854487 0.375 0 0 0.333333343 Private 10th Divorced Other-service Unmarried White Female United-States 0 +32 0.355555564 0.08597735 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +33 0.366666675 0.160986871 1 0 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +47 0.5222222 0.185954109 0.6875 0 0 0.262626261 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +34 0.377777785 0.260575 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +61 0.677777767 0.141754761 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Other-relative Black Female United-States 0 +25 0.2777778 0.426235527 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +26 0.2888889 0.165329143 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Sales Own-child White Male United-States 0 +18 0.2 0.133418426 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 +35 0.3888889 0.0184602328 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.163475573 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female ? 0 +56 0.622222245 0.2119795 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.18167448 0.6875 0 0 0.4040404 State-gov Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +24 0.266666681 0.119408906 0.5 0 0 0.3838384 Private 12th Never-married Other-service Own-child White Female United-States 0 +66 0.733333349 0.112959139 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Not-in-family White Female United-States 1 +42 0.466666669 0.0755577758 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +28 0.311111122 0.228329539 0.5625 0 0 0.2020202 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +39 0.433333337 0.0166504458 0.625 0 0 0.353535354 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +65 0.722222269 0.0249827411 0.6875 0 0 0.25252524 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +20 0.222222224 0.145862654 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +52 0.5777778 0.1377021 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +24 0.266666681 0.10180676 0.625 1 0 0.5050505 ? Some-college Never-married ? Not-in-family Asian-Pac-Islander Male South 1 +39 0.433333337 0.1260109 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +18 0.2 0.284940124 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +49 0.544444442 0.113948561 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife White Female Hong 0 +21 0.233333334 0.07070833 0.625 0 0 0.4848485 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +35 0.3888889 0.08087398 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +38 0.422222227 0.181398332 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +55 0.6111111 0.095338136 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.144714266 0.375 0 0 0.5555556 Private 10th Married-civ-spouse Craft-repair Other-relative White Male United-States 0 +34 0.377777785 0.1168744 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +54 0.6 0.2458731 0.625 0 0 0.4040404 Local-gov Some-college Never-married Prof-specialty Not-in-family White Female Mexico 0 +38 0.422222227 0.0406511724 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +32 0.355555564 0.05846818 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Other-relative White Female United-States 0 +33 0.366666675 0.117310174 0.625 0 0 0.121212125 State-gov Some-college Separated Tech-support Not-in-family White Male United-States 0 +32 0.355555564 0.340101928 0.75 0 0 0.5050505 Federal-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 +34 0.377777785 0.198062241 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male France 0 +46 0.51111114 0.080912374 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 +48 0.533333361 0.134072423 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.102598161 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +48 0.533333361 0.05965091 0.25 0 0 0.4040404 Federal-gov 7th-8th Married-spouse-absent Handlers-cleaners Unmarried White Male United-States 0 +67 0.7444445 0.06406189 0.5625 0 0 0.373737365 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.166738853 0.9375 0.05178052 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male ? 1 +25 0.2777778 0.120172694 0.8125 0 0 0.2020202 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +43 0.477777779 0.3265706 0.625 0.0406404063 0 0.3838384 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.151741251 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 +56 0.622222245 0.138569623 0.125 0 0 0.4040404 Private 1st-4th Separated Machine-op-inspct Unmarried White Male United-States 0 +54 0.6 0.0396698341 0.625 0 0.3624885 0.4848485 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.239419952 0.5625 0 0.4331956 0.464646459 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +60 0.6666667 0.124174163 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +27 0.3 0.234061986 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.09346503 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +24 0.266666681 0.020078063 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +31 0.344444454 0.08520278 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.0409394465 0.375 0 0 0.151515156 Private 10th Never-married Craft-repair Own-child White Male United-States 0 +26 0.2888889 0.121082641 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +45 0.5 0.18987678 0.5625 0 0 0.4848485 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.0474484824 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Other-relative Asian-Pac-Islander Male United-States 0 +55 0.6111111 0.302804947 0.1875 0 0 0.4848485 ? 5th-6th Married-civ-spouse ? Husband White Male Mexico 0 +29 0.322222233 0.220895067 0.3125 0 0 0.4040404 Private 9th Divorced Machine-op-inspct Unmarried Black Female United-States 0 +72 0.8 0.334435463 0.5625 0.06360064 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.103095233 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +53 0.5888889 0.05230063 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.0804826543 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +20 0.222222224 0.172586471 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +69 0.7666667 0.119467504 0.5625 0.0184801836 0 0.121212125 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +41 0.455555558 0.0254919324 0.5625 0 0 0.25252524 Local-gov HS-grad Never-married Other-service Unmarried White Female United-States 0 +45 0.5 0.0871122554 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 +27 0.3 0.12360099 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +46 0.51111114 0.080912374 0.9375 1 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.1283137 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 +31 0.344444454 0.244580582 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +45 0.5 0.161888048 0.625 0 0 0.5555556 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +64 0.7111111 0.08969189 0.5625 0 0 0.05050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.0221700612 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +17 0.188888893 0.07912481 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Male United-States 0 +33 0.366666675 0.0234039761 0.5625 0 0.4331956 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +22 0.244444445 0.3094642 0.5 0 0 0.5050505 Private 12th Married-spouse-absent Other-service Unmarried Black Female United-States 0 +23 0.25555557 0.0646519 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 +25 0.2777778 0.07953634 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +33 0.366666675 0.101414084 0.8125 0.03103031 0 0.434343427 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.340429932 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male Mexico 0 +37 0.411111116 0.121055029 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +53 0.5888889 0.08224462 0.5625 0 0.430670351 0.3838384 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.110420592 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 +33 0.366666675 0.07184593 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +41 0.455555558 0.0831161737 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +61 0.677777767 0.08081471 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.0448722132 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +20 0.222222224 0.0269817915 0.625 0 0 0.565656543 ? Some-college Never-married ? Own-child White Male United-States 0 +35 0.3888889 0.175508276 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 1 +64 0.7111111 0.0647105 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.04755423 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +39 0.433333337 0.155134529 0.625 0 0.359045 0.121212125 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family White Male United-States 1 +53 0.5888889 0.0334847681 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Unmarried White Male United-States 0 +28 0.311111122 0.07848765 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.144501433 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Handlers-cleaners Unmarried Black Female United-States 0 +25 0.2777778 0.225637421 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male Italy 0 +19 0.211111113 0.17419824 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +20 0.222222224 0.136889145 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.07035539 0.8125 0 0 0.4040404 Private Bachelors Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male ? 0 +55 0.6111111 0.06676815 0.5625 0 0.515610635 0.4040404 Local-gov HS-grad Married-civ-spouse Prof-specialty Other-relative White Female United-States 1 +52 0.5777778 0.08472794 0.875 0 0.4242424 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Wife Black Female United-States 1 +21 0.233333334 0.322947651 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +30 0.333333343 0.113012351 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +47 0.5222222 0.090090625 0.5625 0 0.453168035 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +22 0.244444445 0.071962446 0.375 0 0 0.3030303 Private 10th Never-married Craft-repair Other-relative White Male United-States 0 +24 0.266666681 0.07944945 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +26 0.2888889 0.117815323 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +27 0.3 0.090356 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +57 0.6333333 0.06692508 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Puerto-Rico 0 +18 0.2 0.105007395 0.875 0 0 0.6060606 Local-gov Masters Never-married Prof-specialty Own-child White Female United-States 0 +30 0.333333343 0.314613342 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +34 0.377777785 0.205173418 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +40 0.444444448 0.133825913 0.625 0.05178052 0 0.6060606 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +60 0.6666667 0.119922817 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 +25 0.2777778 0.1095753 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.0762111 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +48 0.533333361 0.107040793 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +27 0.3 0.09550382 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.0224987455 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 +65 0.722222269 0.120408431 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +52 0.5777778 0.113526255 0.5625 0 0.453856736 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.0745252445 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 +32 0.355555564 0.101739407 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 +45 0.5 0.09622855 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Separated Sales Unmarried White Male United-States 0 +18 0.2 0.231130764 0.4375 0 0 0.161616161 ? 11th Never-married ? Own-child White Male United-States 0 +27 0.3 0.123609066 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +57 0.6333333 0.149670139 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +44 0.4888889 0.08208634 0.625 0 0 0.5555556 Private Some-college Divorced Sales Unmarried White Male United-States 1 +30 0.333333343 0.314613342 0.875 0 0 0.444444448 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.0231648721 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.02829047 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +61 0.677777767 0.121517748 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +49 0.544444442 0.134430751 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 +33 0.366666675 0.0976281539 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.104797922 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +53 0.5888889 0.109500542 0.25 0 0 1 Self-emp-not-inc 7th-8th Married-civ-spouse Tech-support Husband White Male United-States 0 +33 0.366666675 0.156579927 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.181500033 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +45 0.5 0.09472858 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Protective-serv Not-in-family White Male United-States 1 +26 0.2888889 0.0266989078 0.625 0 0 0.6060606 ? Some-college Never-married ? Not-in-family White Male United-States 0 +50 0.5555556 0.233052358 0.25 0 0 0.2020202 ? 7th-8th Separated ? Own-child White Female United-States 0 +47 0.5222222 0.107580967 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +52 0.5777778 0.195901543 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +57 0.6333333 0.146753728 0.5625 0 0 0.363636374 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.134649649 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 +58 0.644444466 0.0717624053 0.5625 0.0217402168 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +50 0.5555556 0.148608655 0.875 0 0 0.5050505 Local-gov Masters Divorced Prof-specialty Not-in-family Amer-Indian-Eskimo Female United-States 1 +33 0.366666675 0.05988597 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +34 0.377777785 0.194305271 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.153169155 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +37 0.411111116 0.06730967 0.875 0.07688077 0 0.5050505 Local-gov Masters Married-civ-spouse Protective-serv Husband White Male United-States 1 +57 0.6333333 0.135455862 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family Black Female United-States 0 +57 0.6333333 0.08336875 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.137802467 0.75 0 0 0.08080808 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.128166884 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Male United-States 0 +23 0.25555557 0.132466719 0.625 0 0 0.4040404 Private Some-college Separated Craft-repair Not-in-family White Male United-States 0 +54 0.6 0.07303471 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +38 0.422222227 0.125519216 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.09232541 0.625 0.1502415 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.177017659 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.115615562 0.5625 0 0 0.424242437 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.12347167 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male El-Salvador 0 +36 0.4 0.0857449844 0.5625 0 0 0.474747479 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.046257 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 +40 0.444444448 0.09436757 0.3125 0 0 0.4040404 State-gov 9th Separated Machine-op-inspct Not-in-family Black Male United-States 0 +26 0.2888889 0.177438617 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +46 0.51111114 0.17885977 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Transport-moving Not-in-family Black Male United-States 0 +28 0.311111122 0.276294619 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Craft-repair Not-in-family White Male United-States 1 +46 0.51111114 0.0138303572 0.8125 0 0 0.454545468 State-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +55 0.6111111 0.127242118 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Female United-States 0 +76 0.844444454 0.06647449 0.625 0 0 0.2020202 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.277462542 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +50 0.5555556 0.1601793 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +75 0.8333334 0.126236528 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.133572668 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.09409479 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family Black Female United-States 0 +51 0.566666663 0.102778666 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +43 0.477777779 0.131154671 0.9375 0.1502415 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.05563462 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.15480718 0.625 0 0 0.2020202 ? Some-college Never-married ? Not-in-family Black Female United-States 0 +60 0.6666667 0.0823571 0.1875 0 0 0.454545468 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Italy 0 +47 0.5222222 0.12688446 0.8125 0 0 0.454545468 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +73 0.811111152 0.0621658862 0.4375 0 0 0.151515156 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.263120949 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +50 0.5555556 0.0599721856 0.5625 0.1502415 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.212094 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Puerto-Rico 0 +31 0.344444454 0.112037748 0.5625 0 0 0.5050505 Private HS-grad Never-married Machine-op-inspct Own-child Black Male ? 0 +45 0.5 0.0597970635 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male Germany 1 +57 0.6333333 0.0281281471 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male South 1 +34 0.377777785 0.572408 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Nicaragua 0 +19 0.211111113 0.207109153 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 +25 0.2777778 0.218475729 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +39 0.433333337 0.06686177 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female Germany 1 +28 0.311111122 0.108257875 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Poland 1 +48 0.533333361 0.0998892039 0.875 0 0 0.4040404 State-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +38 0.422222227 0.174458236 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.151473865 0.1875 0 0 0.1010101 Private 5th-6th Married-civ-spouse Priv-house-serv Wife Black Female Haiti 0 +19 0.211111113 0.174088463 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +41 0.455555558 0.133305266 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +23 0.25555557 0.14394711 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Sales Own-child Black Female United-States 0 +32 0.355555564 0.152579129 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +35 0.3888889 0.09836432 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family Amer-Indian-Eskimo Male United-States 0 +21 0.233333334 0.121464536 0.6875 0 0.3677686 0.3030303 Private Assoc-voc Never-married Farming-fishing Not-in-family White Female United-States 0 +24 0.266666681 0.0673332438 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 +34 0.377777785 0.202523068 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +29 0.322222233 0.148114279 0.8125 0 0 0.25252524 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +24 0.266666681 0.08232881 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family Black Female ? 0 +55 0.6111111 0.106850185 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.161337778 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Own-child Asian-Pac-Islander Male Philippines 0 +46 0.51111114 0.06890797 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Own-child White Male United-States 0 +38 0.422222227 0.1259065 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +29 0.322222233 0.157908142 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 +35 0.3888889 0.08482022 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.09615378 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +41 0.455555558 0.208159879 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.03290822 0.5625 0 0 0.323232323 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.07448887 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +72 0.8 0.287304223 0.4375 0 0 0.353535354 Private 11th Divorced Other-service Not-in-family Black Female United-States 0 +17 0.188888893 0.113852248 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +46 0.51111114 0.08289526 0.5625 0 0 0.7070707 Self-emp-inc HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +38 0.422222227 0.131840333 0.8125 0 0 0.4848485 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +36 0.4 0.05515978 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.115879588 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Never-married Craft-repair Own-child White Male United-States 0 +28 0.311111122 0.170952484 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +28 0.311111122 0.0447718576 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +60 0.6666667 0.03788497 0.5625 0 0.3409091 0.7070707 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +42 0.466666669 0.182878762 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband Other Male United-States 1 +48 0.533333361 0.178685337 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.117402449 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.132243112 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 +55 0.6111111 0.150598273 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male Puerto-Rico 1 +30 0.333333343 0.10088671 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +68 0.75555557 0.08398032 0.25 0 0 0.1010101 Private 7th-8th Widowed Machine-op-inspct Not-in-family White Female United-States 0 +45 0.5 0.03378651 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +26 0.2888889 0.118399955 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Own-child White Female United-States 0 +22 0.244444445 0.146975324 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +22 0.244444445 0.112056606 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +36 0.4 0.114143215 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.0977170542 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Not-in-family Black Female United-States 0 +68 0.75555557 0.144487292 0.9375 0 0 0.161616161 Private Prof-school Widowed Prof-specialty Unmarried White Female United-States 0 +26 0.2888889 0.193461329 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife Black Female United-States 1 +52 0.5777778 0.135589227 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male ? 0 +46 0.51111114 0.133249372 0.5625 0 0.3838384 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +53 0.5888889 0.106616467 0.875 0.07298073 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.0857854 0.4375 0 0 0.08080808 Private 11th Never-married Sales Own-child White Female United-States 0 +29 0.322222233 0.137196958 0.8125 0 0 0.75757575 Private Bachelors Married-civ-spouse Prof-specialty Own-child White Male United-States 0 +41 0.455555558 0.113645472 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.111289449 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family Black Female Trinadad&Tobago 0 +57 0.6333333 0.118503004 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 1 +30 0.333333343 0.240242347 0.8125 0 0 0.3030303 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male Japan 0 +46 0.51111114 0.08952081 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.126103163 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +59 0.655555546 0.17159301 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +40 0.444444448 0.13643451 0.75 0 0 0.5252525 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.06999707 0.5625 0.0203602035 0 0.2020202 State-gov HS-grad Divorced Other-service Unmarried White Female United-States 0 +22 0.244444445 0.0755463243 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female ? 0 +59 0.655555546 0.0475670248 0.25 0 0 0.858585835 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.06919152 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +40 0.444444448 0.376468062 0.25 0 0 0.4040404 Private 7th-8th Never-married Farming-fishing Own-child White Male United-States 0 +18 0.2 0.173076138 0.375 0 0 0.4040404 Private 10th Never-married Sales Other-relative Black Female United-States 0 +62 0.6888889 0.09738164 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +63 0.7 0.06897801 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +29 0.322222233 0.107622728 0.875 0 0 0.8080808 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +27 0.3 0.03754483 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Wife Black Female United-States 1 +47 0.5222222 0.09979828 1 0 0 0.5050505 State-gov Doctorate Divorced Prof-specialty Unmarried White Male France 1 +20 0.222222224 0.182766274 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +48 0.533333361 0.06635931 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.183816314 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male Mexico 0 +22 0.244444445 0.2185249 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Female United-States 0 +42 0.466666669 0.104713731 0.75 0 0 0.24242425 Private Assoc-acdm Widowed Tech-support Unmarried White Female United-States 0 +36 0.4 0.06933701 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 +60 0.6666667 0.196607411 0.375 0 0 0.4040404 Private 10th Divorced Other-service Not-in-family Black Female United-States 0 +41 0.455555558 0.1256822 0.5625 0 0 0.4040404 Federal-gov HS-grad Separated Exec-managerial Not-in-family Black Female United-States 0 +43 0.477777779 0.116118021 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.130184114 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.118706413 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Wife White Female United-States 0 +32 0.355555564 0.07932822 0.5625 0 0 0.353535354 Private HS-grad Never-married Transport-moving Own-child White Female United-States 0 +22 0.244444445 0.02331507 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 +52 0.5777778 0.11394991 0.3125 0 0 0.25252524 Private 9th Widowed Other-service Not-in-family White Female Puerto-Rico 0 +27 0.3 0.121746749 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 +60 0.6666667 0.0953974053 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.113842823 0.8125 0.07688077 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +34 0.377777785 0.06820615 0.8125 0 0 0.6262626 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 +30 0.333333343 0.110587627 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.0958318338 0.625 0 0 0.25252524 Private Some-college Separated Other-service Unmarried White Female United-States 0 +39 0.433333337 0.07003681 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Exec-managerial Unmarried Black Female United-States 0 +64 0.7111111 0.126355737 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +17 0.188888893 0.0243940726 0.4375 0 0 0.2020202 Self-emp-not-inc 11th Never-married Farming-fishing Own-child White Male United-States 0 +29 0.322222233 0.071619615 0.875 0 0 0.4040404 State-gov Masters Never-married Exec-managerial Not-in-family White Male ? 0 +37 0.411111116 0.167974114 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 +43 0.477777779 0.0743279 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.07943935 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +17 0.188888893 0.110349193 0.375 0 0 0.121212125 Private 10th Never-married Sales Own-child White Female United-States 0 +29 0.322222233 0.0980612338 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male Guatemala 0 +24 0.266666681 0.07307512 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male India 0 +27 0.3 0.142816931 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 +69 0.7666667 0.122887038 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Separated Exec-managerial Not-in-family White Male United-States 0 +30 0.333333343 0.0835317448 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Not-in-family White Male United-States 0 +29 0.322222233 0.1341115 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Puerto-Rico 0 +17 0.188888893 0.09706575 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 +61 0.677777767 0.0723632 0.25 0 0.379017442 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +70 0.7777778 0.273025274 0.25 0 0 0.3838384 Private 7th-8th Widowed Other-service Unmarried Black Female United-States 0 +32 0.355555564 0.118445083 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +21 0.233333334 0.176628351 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Other-relative White Male United-States 0 +27 0.3 0.282920867 0.5625 0.09562095 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Unmarried White Male United-States 1 +27 0.3 0.05838264 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +19 0.211111113 0.126059383 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 +44 0.4888889 0.466020525 0.875 0 0 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +36 0.4 0.147829369 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.134072423 0.875 0.07298073 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.12932536 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family White Female Poland 0 +34 0.377777785 0.282676369 0.8125 0.07298073 0 0.545454562 Federal-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +28 0.311111122 0.239838228 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Other-relative White Male United-States 0 +34 0.377777785 0.4607077 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Own-child White Male El-Salvador 0 +18 0.2 0.0248413 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +39 0.433333337 0.136848733 0.625 0 0 0.454545468 Private Some-college Divorced Farming-fishing Unmarried White Female United-States 0 +34 0.377777785 0.123803049 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +35 0.3888889 0.0700246841 0.875 0 0 0.414141417 Local-gov Masters Divorced Adm-clerical Unmarried White Female United-States 0 +24 0.266666681 0.205159947 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +41 0.455555558 0.0385484 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.194790885 1 0 0.43663913 0.454545468 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +68 0.75555557 0.150884524 0.625 0 0 0.3030303 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +35 0.3888889 0.18048434 0.4375 0 0 0.5050505 Private 11th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +47 0.5222222 0.14467521 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +43 0.477777779 0.162677437 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +35 0.3888889 0.132932141 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +34 0.377777785 0.199853852 0.625 0 0 0.171717167 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +26 0.2888889 0.09175291 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +50 0.5555556 0.02736099 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +22 0.244444445 0.178401768 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Female United-States 0 +20 0.222222224 0.0760063455 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child Asian-Pac-Islander Male United-States 0 +18 0.2 0.159014761 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Female United-States 0 +52 0.5777778 0.0599634275 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 0 +71 0.788888931 0.141895533 0.5625 0 0 0.282828271 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +55 0.6111111 0.0405420624 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +17 0.188888893 0.145575717 0.4375 0 0 0.08080808 Private 11th Never-married Sales Own-child White Female United-States 0 +36 0.4 0.09412173 0.625 0 0 0.4040404 Private Some-college Widowed Prof-specialty Own-child White Female United-States 0 +25 0.2777778 0.0217389986 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +39 0.433333337 0.285312563 0.5 0 0.4242424 0.4040404 Local-gov 12th Married-civ-spouse Transport-moving Husband White Male Nicaragua 1 +27 0.3 0.201299921 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family Asian-Pac-Islander Male Philippines 0 +42 0.466666669 0.214355722 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +22 0.244444445 0.23430042 0.5625 0 0.3946281 0.4040404 Private HS-grad Married-spouse-absent Sales Not-in-family White Male United-States 0 +57 0.6333333 0.1883445 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 1 +34 0.377777785 0.273041457 0.625 0 0 0.282828271 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 +31 0.344444454 0.200166374 0.875 0 0 0.6060606 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.122813627 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 +41 0.455555558 0.154339075 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family Black Male Jamaica 0 +30 0.333333343 0.1277156 0.625 0.068490684 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Female England 0 +17 0.188888893 0.2785449 0.4375 0 0 0.323232323 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 +26 0.2888889 0.165706322 0.5625 0 0 0.2020202 Self-emp-inc HS-grad Separated Sales Unmarried White Female Honduras 0 +32 0.355555564 0.26334995 0.125 0 0 0.5050505 Private 1st-4th Never-married Farming-fishing Not-in-family Other Male Mexico 0 +55 0.6111111 0.0687395856 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +19 0.211111113 0.166563734 0.5 0 0 0.2020202 Private 12th Married-spouse-absent Other-service Own-child Other Female United-States 0 +28 0.311111122 0.09436757 0.875 0 0 0.5050505 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +55 0.6111111 0.14611724 0.5625 0.0288502872 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +49 0.544444442 0.0549967848 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.119569883 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +43 0.477777779 0.04353121 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.0741076544 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.137240067 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.1103721 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +59 0.655555546 0.07900492 0.5625 0 0.4331956 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.0341131762 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +21 0.233333334 0.112154946 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +28 0.311111122 0.117060296 0.8125 0 0 0.1010101 ? Bachelors Married-spouse-absent ? Not-in-family Asian-Pac-Islander Female Taiwan 0 +44 0.4888889 0.122422978 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.229594439 0.8125 0 0 0.4848485 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.07729347 0.8125 0.04416044 0 0.454545468 Self-emp-not-inc Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +54 0.6 0.09351824 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +28 0.311111122 0.144819349 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +34 0.377777785 0.123780824 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +46 0.51111114 0.184298575 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.0766953751 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.144106075 0.5625 0 0.459366381 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 +29 0.322222233 0.0774443448 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +35 0.3888889 0.138302222 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.03901381 0.625 0.07688077 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +90 1 0.1515877 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child Asian-Pac-Islander Male South 0 +35 0.3888889 0.136072159 0.875 0.07688077 0 0.5555556 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.189502969 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Other Male United-States 0 +42 0.466666669 0.0207610279 0.875 0.0235402342 0 0.161616161 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +56 0.622222245 0.06655127 0.25 0.0501305 0 0.454545468 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +31 0.344444454 0.025744509 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Own-child White Male United-States 0 +23 0.25555557 0.116004191 0.5625 0 0 0.5050505 Private HS-grad Never-married Tech-support Own-child White Male United-States 0 +60 0.6666667 0.09466123 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +28 0.311111122 0.149097636 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +32 0.355555564 0.121774361 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +36 0.4 0.0750984251 0.875 0.14084141 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 +44 0.4888889 0.105024233 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.1354626 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.06850452 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Asian-Pac-Islander Male United-States 0 +49 0.544444442 0.0943763256 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Unmarried White Male United-States 0 +48 0.533333361 0.116325468 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 +47 0.5222222 0.080912374 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.07910258 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.1729394 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 +31 0.344444454 0.118666671 0.8125 0.0406404063 0 0.4040404 Local-gov Bachelors Married-civ-spouse Machine-op-inspct Husband White Male ? 0 +24 0.266666681 0.150744423 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.135786578 0.5625 0 0 0.3030303 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +25 0.2777778 0.09346301 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +36 0.4 0.09023611 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Unmarried White Female United-States 0 +38 0.422222227 0.0929161 0.5625 0 0 0.454545468 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +57 0.6333333 0.06964549 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.310956061 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +41 0.455555558 0.0477428176 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +56 0.622222245 0.3142025 0.6875 0 0 0.6060606 State-gov Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 1 +19 0.211111113 0.100116864 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +44 0.4888889 0.128469288 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Other-relative Black Male United-States 0 +34 0.377777785 0.2017283 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Female United-States 0 +25 0.2777778 0.142401353 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +27 0.3 0.07188027 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +22 0.244444445 0.129330069 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +59 0.655555546 0.357039958 0.625 0 0.4331956 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.08025365 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.136357054 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +21 0.233333334 0.0339064 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.0942955 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Other-relative White Male Italy 0 +19 0.211111113 0.1485258 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child White Female United-States 0 +82 0.9111111 0.0356441177 0.625 0 0 0.0303030312 ? Some-college Widowed ? Not-in-family Amer-Indian-Eskimo Male United-States 0 +35 0.3888889 0.0215288568 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.09982253 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.102126017 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +30 0.333333343 0.2711239 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.126811728 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.06480681 0.8125 0 0 0.05050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Wife White Female United-States 0 +29 0.322222233 0.2293614 0.5625 0 0 0.444444448 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +60 0.6666667 0.107993849 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Columbia 0 +28 0.311111122 0.08091506 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Sales Not-in-family White Female United-States 0 +38 0.422222227 0.204631224 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Not-in-family Black Female United-States 0 +31 0.344444454 0.121971034 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.135053769 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 1 +42 0.466666669 0.108366981 0.625 0 0 0.232323229 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +40 0.444444448 0.123321474 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Other-service Wife White Female Yugoslavia 1 +24 0.266666681 0.162569 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +37 0.411111116 0.230405375 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.130568027 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.0541589074 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +22 0.244444445 0.3733516 0.3125 0 0 0.353535354 Private 9th Married-spouse-absent Other-service Other-relative White Male Mexico 0 +46 0.51111114 0.057323847 0.625 0 0.373737365 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.07312497 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +34 0.377777785 0.08147006 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +42 0.466666669 0.149532065 0.625 0 0 0.434343427 Private Some-college Divorced Sales Unmarried White Female United-States 0 +43 0.477777779 0.160658181 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.0326017626 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +60 0.6666667 0.05930808 0.9375 0.0378103778 0 0.161616161 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.160557821 0.625 0.0861408561 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 1 +22 0.244444445 0.164290547 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Transport-moving Other-relative White Male United-States 0 +39 0.433333337 0.205830112 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.0955348 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +39 0.433333337 0.0874005258 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.101698995 0.4375 0 0 0.454545468 Self-emp-not-inc 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +63 0.7 0.09910387 0.25 0 0 0.6060606 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 1 +46 0.51111114 0.0203535389 0.625 0.07688077 0 0.3838384 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.113131568 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried Black Female United-States 0 +33 0.366666675 0.08976733 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +65 0.722222269 0.116191432 0.625 0.0184801836 0 0.2020202 Private Some-college Widowed Prof-specialty Not-in-family White Female Hungary 0 +39 0.433333337 0.129487678 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 1 +43 0.477777779 0.1420107 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family Black Female United-States 1 +28 0.311111122 0.177149668 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.104477324 0.5625 1 0 0.353535354 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Female United-States 1 +24 0.266666681 0.156878307 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +48 0.533333361 0.0966804847 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +35 0.3888889 0.030717887 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +62 0.6888889 0.020090187 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.07012706 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +60 0.6666667 0.128945485 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.018511422 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.138739347 0.9375 0 0 0.4040404 Private Prof-school Never-married Exec-managerial Not-in-family White Female Cuba 0 +39 0.433333337 0.0965747461 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.13504906 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +43 0.477777779 0.12594758 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Protective-serv Unmarried White Female United-States 0 +35 0.3888889 0.0364779532 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.07643337 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.158463135 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +32 0.355555564 0.235309377 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 0 +18 0.2 0.1910393 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +37 0.411111116 0.04733735 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Unmarried Black Female United-States 0 +26 0.2888889 0.111841075 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +51 0.566666663 0.1304771 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.08408135 0.625 0 0 0.363636374 ? Some-college Divorced ? Not-in-family Amer-Indian-Eskimo Female United-States 0 +33 0.366666675 0.159209415 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.08218872 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.07714462 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.129206821 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.282920867 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.107795827 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Widowed Other-service Unmarried White Female United-States 0 +34 0.377777785 0.2042069 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 1 +45 0.5 0.128030822 0.5625 0 0 0.3030303 Private HS-grad Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 +53 0.5888889 0.08552339 0.5625 0 0 0.353535354 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 +52 0.5777778 0.0424353667 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Philippines 0 +64 0.7111111 0.2634335 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 1 +42 0.466666669 0.142418861 0.875 0 0 0.454545468 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 +44 0.4888889 0.105349548 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +41 0.455555558 0.0786668062 0.5625 0.07298073 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +53 0.5888889 0.1377021 0.875 0 0 0.434343427 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.04508303 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +20 0.222222224 0.231883109 0.4375 0 0 0.4040404 Private 11th Separated Other-service Own-child White Female United-States 0 +29 0.322222233 0.0731283352 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Priv-house-serv Own-child White Female United-States 0 +56 0.622222245 0.1647499 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.244949 1 0 0.453856736 0.3030303 Private Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 +56 0.622222245 0.148017287 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +38 0.422222227 0.181394964 0.625 0.07298073 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.05245756 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male Philippines 0 +28 0.311111122 0.04721477 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +31 0.344444454 0.143895924 0.5625 0.03908039 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.04690494 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 +65 0.722222269 0.114508942 0.8125 0 0 0.343434334 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +40 0.444444448 0.222215191 0.5625 0 0 0.3030303 Private HS-grad Separated Handlers-cleaners Not-in-family Black Male United-States 0 +31 0.344444454 0.130184114 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +35 0.3888889 0.175954819 0.5625 0 0.3996786 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +42 0.466666669 0.07286498 0.875 0 0.43663913 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male South 1 +20 0.222222224 0.199782446 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +30 0.333333343 0.1736345 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.104613379 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +22 0.244444445 0.102301806 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +65 0.722222269 0.09639491 0.5625 0 0.5064279 0.1010101 ? HS-grad Widowed ? Unmarried White Female United-States 0 +31 0.344444454 0.04464052 0.625 0.03908039 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 0 +56 0.622222245 0.0622642227 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +51 0.566666663 0.1544226 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Other-relative Black Male Haiti 0 +36 0.4 0.139557689 0.375 0 0 0.6060606 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +44 0.4888889 0.103842854 0.625 0 0.365013778 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 +49 0.544444442 0.121841714 0.875 0 0.40289256 0.454545468 Private Masters Divorced Exec-managerial Unmarried White Male United-States 1 +28 0.311111122 0.138301551 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.12176089 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.231036469 0.625 0 0 0.656565666 Self-emp-not-inc Some-college Never-married Sales Not-in-family White Male United-States 0 +49 0.544444442 0.119090326 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +74 0.822222233 0.05970075 1 0 0.845500469 0.2020202 State-gov Doctorate Never-married Prof-specialty Other-relative White Female United-States 1 +48 0.533333361 0.16707629 0.8125 0.0501305 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.275882423 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.124639578 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +46 0.51111114 0.224208847 0.8125 0.07298073 0 0.656565666 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.143371239 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.0447718576 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.192071155 0.4375 0 0 0.4040404 Private 11th Never-married Priv-house-serv Own-child White Female United-States 0 +28 0.311111122 0.118158832 0.3125 0 0 0.4040404 Private 9th Divorced Prof-specialty Not-in-family Black Female United-States 0 +18 0.2 0.102808975 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 +42 0.466666669 0.228561237 0.875 0 0 0.25252524 Private Masters Divorced Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.1935105 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried Black Female United-States 0 +29 0.322222233 0.04755423 0.5625 0.0346403457 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +21 0.233333334 0.05989473 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +36 0.4 0.06147686 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Asian-Pac-Islander Female United-States 0 +56 0.622222245 0.164715558 0.375 0 0 0.4040404 Private 10th Widowed Machine-op-inspct Unmarried Black Female United-States 0 +49 0.544444442 0.156654686 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.08599553 0.625 0 0 0.8080808 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.109236516 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 +40 0.444444448 0.274956316 0.125 0 0 0.454545468 Private 1st-4th Never-married Other-service Not-in-family White Male El-Salvador 0 +43 0.477777779 0.09411567 0.8125 0.1502415 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.132878929 0.5 0 0 0.4848485 Private 12th Married-civ-spouse Farming-fishing Husband White Male Germany 0 +52 0.5777778 0.154901475 0.9375 0.03103031 0 0.3030303 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 +25 0.2777778 0.170271546 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +63 0.7 0.07468824 0.875 0 0 0.7070707 Self-emp-inc Masters Divorced Prof-specialty Not-in-family White Male United-States 1 +51 0.566666663 0.108253159 1 0 0 1 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male South 0 +25 0.2777778 0.0603655279 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +62 0.6888889 0.179185092 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +27 0.3 0.0853570253 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +48 0.533333361 0.06523451 0.625 0 0 0.3030303 Federal-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +32 0.355555564 0.125808164 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.0195298065 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.233828276 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +45 0.5 0.07429826 0.875 0 0 0.4040404 State-gov Masters Divorced Exec-managerial Unmarried White Female United-States 0 +27 0.3 0.2093682 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +41 0.455555558 0.148645014 0.8125 0 0 0.373737365 Private Bachelors Divorced Other-service Not-in-family White Male United-States 0 +61 0.677777767 0.100629419 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +70 0.7777778 0.08870382 0.8125 0 0 0.5555556 Self-emp-inc Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +55 0.6111111 0.03367403 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family Black Female United-States 0 +35 0.3888889 0.126026392 0.8125 0 0 0.454545468 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +36 0.4 0.121814772 0.6875 0 0 0.3838384 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +29 0.322222233 0.125039652 0.625 0 0 0.6060606 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +30 0.333333343 0.213245064 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Wife White Female United-States 0 +45 0.5 0.184990957 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male ? 0 +39 0.433333337 0.130384833 0.8125 0.0545505434 0 0.6060606 Federal-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +18 0.2 0.228217736 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +28 0.311111122 0.146031708 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +27 0.3 0.07202441 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.150489837 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +33 0.366666675 0.117726423 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.0913333 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +25 0.2777778 0.232180133 0.5625 0 0 0.04040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +38 0.422222227 0.2508808 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Own-child Black Female United-States 0 +23 0.25555557 0.122462042 0.625 0 0 0.454545468 Private Some-college Never-married Farming-fishing Unmarried White Male United-States 0 +40 0.444444448 0.158530489 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Male United-States 0 +36 0.4 0.145962328 0.5625 1 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male ? 1 +20 0.222222224 0.201655552 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +41 0.455555558 0.136396125 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +44 0.4888889 0.115864769 0.625 0 0 0.3838384 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 +49 0.544444442 0.1662896 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +22 0.244444445 0.303710163 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family Black Female United-States 0 +26 0.2888889 0.0361001 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.06988392 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.05120007 0.5625 0 0 0.25252524 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +28 0.311111122 0.0539891757 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Never-married Exec-managerial Own-child White Male United-States 0 +37 0.411111116 0.06121149 0.625 0.0861408561 0 0.5555556 Federal-gov Some-college Separated Exec-managerial Not-in-family White Male United-States 1 +44 0.4888889 0.288240433 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +20 0.222222224 0.155556157 0.5 0 0 0.353535354 ? 12th Never-married ? Not-in-family Black Female United-States 0 +53 0.5888889 0.11983256 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +36 0.4 0.2307812 0.875 0 0 0.151515156 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 0 +77 0.8555556 0.170836627 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband Other Male United-States 0 +21 0.233333334 0.147561982 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +24 0.266666681 0.109511994 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 +30 0.333333343 0.0589753538 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 +51 0.566666663 0.09591872 0.6875 0 0 0.5050505 Local-gov Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +22 0.244444445 0.104008541 0.625 0 0 0.3030303 Private Some-college Divorced Sales Own-child Asian-Pac-Islander Female Philippines 0 +23 0.25555557 0.113897376 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Male United-States 0 +47 0.5222222 0.1300238 1 1 0 0.5050505 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.101798676 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Male United-States 0 +48 0.533333361 0.180447966 0.8125 0 0 0.5050505 Private Bachelors Never-married Other-service Not-in-family White Male Mexico 1 +43 0.477777779 0.09235909 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.102682352 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male Guatemala 0 +19 0.211111113 0.240491554 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.13606137 0.625 0 0 0.4040404 State-gov Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +23 0.25555557 0.06619699 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child Asian-Pac-Islander Male United-States 0 +61 0.677777767 0.119192034 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +63 0.7 0.126569927 0.4375 0 0 0.3030303 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 +65 0.722222269 0.1851654 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Unmarried White Female United-States 0 +37 0.411111116 0.07126871 0.6875 0.07298073 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 1 +41 0.455555558 0.130345091 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +35 0.3888889 0.102871619 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband Black Male ? 0 +21 0.233333334 0.177571312 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Other-relative White Female United-States 0 +48 0.533333361 0.06875171 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Adm-clerical Unmarried White Female United-States 0 +51 0.566666663 0.104797922 0.625 0 0.4331956 0.4040404 State-gov Some-college Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.0224495772 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.10559202 0.625 0 0 0.151515156 State-gov Some-college Never-married Prof-specialty Not-in-family White Male ? 0 +56 0.622222245 0.07775215 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.12234889 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.08100464 0.8125 0 0 0.24242425 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +39 0.433333337 0.132220209 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +45 0.5 0.0274061188 0.625 0 0 0.75757575 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 +49 0.544444442 0.153958529 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Male Columbia 0 +23 0.25555557 0.468198061 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +69 0.7666667 0.140927657 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +41 0.455555558 0.1447008 0.875 0 0 0.6060606 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.126918152 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Separated Exec-managerial Other-relative White Male United-States 0 +25 0.2777778 0.119636565 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +52 0.5777778 0.08391634 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 +28 0.311111122 0.155489475 0.625 0.0332503319 0 0.5050505 Private Some-college Never-married Prof-specialty Not-in-family Black Female United-States 0 +50 0.5555556 0.14920944 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.156648636 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Tech-support Own-child White Female United-States 0 +48 0.533333361 0.11329928 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.1446092 0.9375 0 0 0.424242437 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +63 0.7 0.160045266 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.0369682871 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.110813938 1 0.14084141 0 0.454545468 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 +28 0.311111122 0.151212528 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Black Male ? 0 +58 0.644444466 0.123842783 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +41 0.455555558 0.14031744 0.625 0 0 0.5151515 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +67 0.7444445 0.113403 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +62 0.6888889 0.215784281 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +28 0.311111122 0.129577264 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +26 0.2888889 0.112716 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 +46 0.51111114 0.06973641 0.9375 0 0 0.656565666 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.0394165851 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.128875434 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 1 +25 0.2777778 0.130544454 0.875 0 0 0.353535354 Private Masters Never-married Prof-specialty Own-child White Female United-States 0 +20 0.222222224 0.174101934 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +21 0.233333334 0.0380681679 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +25 0.2777778 0.06902112 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +44 0.4888889 0.209709674 0.9375 0 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.112141475 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +50 0.5555556 0.108253159 0.875 0.07298073 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Philippines 1 +29 0.322222233 0.2278365 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +18 0.2 0.1902021 0.625 0 0 0.212121218 Private Some-college Never-married Sales Own-child Black Female United-States 0 +32 0.355555564 0.2581449 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried White Female United-States 0 +58 0.644444466 0.0804105848 0.6875 0 0 0.6060606 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 +50 0.5555556 0.132669449 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.225109369 0.625 0 0 0.181818187 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +58 0.644444466 0.0184447411 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.0901498944 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 +36 0.4 0.243744045 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +21 0.233333334 0.155201882 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +49 0.544444442 0.221441969 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +60 0.6666667 0.164227247 0.875 0 0 0.5050505 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +39 0.433333337 0.206536651 0.625 0.03103031 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.093068324 0.75 0 0.43663913 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.188636124 0.625 0 0 0.4848485 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +55 0.6111111 0.205939233 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male ? 0 +64 0.7111111 0.111049674 0.5625 0 0 0.2020202 Local-gov HS-grad Divorced Transport-moving Unmarried White Male United-States 0 +29 0.322222233 0.09334986 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Never-married Prof-specialty Other-relative Black Female United-States 0 +40 0.444444448 0.0750876442 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.0975129753 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.1151845 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Unmarried White Female United-States 0 +43 0.477777779 0.07576859 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +28 0.311111122 0.275120646 0.5 0 0 0.4040404 Private 12th Never-married Sales Not-in-family Black Male United-States 0 +46 0.51111114 0.0187256057 0.75 0 0 0.3838384 State-gov Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +34 0.377777785 0.159168318 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 +47 0.5222222 0.08206075 0.875 0.07688077 0 0.3838384 Private Masters Married-civ-spouse Adm-clerical Wife White Female United-States 1 +43 0.477777779 0.212817371 0.875 0 0 0.4040404 Self-emp-not-inc Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +24 0.266666681 0.470408618 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +21 0.233333334 0.221949816 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +65 0.722222269 0.130972818 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male England 1 +20 0.222222224 0.1903267 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +31 0.344444454 0.0177819841 0.875 0 0 0.25252524 State-gov Masters Divorced Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.2458118 0.5625 0.0346403457 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +22 0.244444445 0.05657555 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +20 0.222222224 0.06355741 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Not-in-family Other Female United-States 0 +44 0.4888889 0.117322296 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.06867829 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 +41 0.455555558 0.09894761 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.08531998 0.5625 0 0.506198347 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.0212877318 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female Germany 0 +24 0.266666681 0.0891267955 0.625 0 0 0.3030303 Private Some-college Married-spouse-absent Sales Unmarried Other Female Ecuador 0 +24 0.266666681 0.07574502 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.0329317935 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Own-child White Female United-States 0 +39 0.433333337 0.122544885 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +48 0.533333361 0.166824386 0.625 0.0332503319 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +24 0.266666681 0.131883442 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 +50 0.5555556 0.115882955 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male South 1 +50 0.5555556 0.0337966122 0.625 0.0406404063 0 0.5555556 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +68 0.75555557 0.236889482 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +31 0.344444454 0.128176987 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +22 0.244444445 0.312589377 0.125 0 0 0.4040404 Private 1st-4th Never-married Craft-repair Not-in-family White Male Guatemala 0 +18 0.2 0.0244816318 0.625 0 0 0.4848485 ? Some-college Never-married ? Own-child White Male United-States 0 +25 0.2777778 0.080984436 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Not-in-family White Male Poland 0 +28 0.311111122 0.2384952 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +17 0.188888893 0.208055481 0.4375 0 0 0.151515156 Local-gov 11th Never-married Adm-clerical Own-child White Female United-States 0 +24 0.266666681 0.140651509 1 0 0 1 State-gov Doctorate Never-married Prof-specialty Not-in-family White Female England 0 +20 0.222222224 0.248990208 0.375 0 0 0.363636374 Private 10th Separated Sales Not-in-family White Female United-States 0 +45 0.5 0.06635931 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 +44 0.4888889 0.161461711 0.625 0.01506015 0 0.454545468 Private Some-college Married-spouse-absent Craft-repair Unmarried White Female United-States 0 +57 0.6333333 0.15574272 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.159220859 0.8125 0 0.43663913 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.08025567 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Own-child White Male United-States 0 +22 0.244444445 0.2158348 0.625 0 0 0.24242425 Private Some-college Never-married Protective-serv Own-child Asian-Pac-Islander Male India 0 +41 0.455555558 0.0258617029 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +51 0.566666663 0.127421275 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +46 0.51111114 0.134222627 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Unmarried White Male United-States 0 +52 0.5777778 0.192861214 0.5625 0 0 0.3838384 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +50 0.5555556 0.102922805 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +26 0.2888889 0.119202808 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +17 0.188888893 0.0791733041 0.375 0 0 0.121212125 Private 10th Never-married Sales Other-relative Black Female United-States 0 +64 0.7111111 0.171614572 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +51 0.566666663 0.08980639 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +28 0.311111122 0.123139612 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +51 0.566666663 0.09175156 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.09057355 0.8125 0 0.404499531 0.4040404 Self-emp-not-inc Bachelors Divorced Adm-clerical Not-in-family White Male United-States 0 +48 0.533333361 0.183725387 0.625 0 0 0.323232323 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +44 0.4888889 0.188039377 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Own-child White Female United-States 1 +47 0.5222222 0.0742524639 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 +52 0.5777778 0.136101782 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Own-child White Female United-States 0 +58 0.644444466 0.1331187 0.625 0 0 0.3939394 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.08458987 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family White Female United-States 0 +40 0.444444448 0.132997468 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +23 0.25555557 0.160860911 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +31 0.344444454 0.122702494 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male Yugoslavia 0 +40 0.444444448 0.161987737 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.08479261 0.625 0 0 0.3838384 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +46 0.51111114 0.104013927 0.875 0 0 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 1 +32 0.355555564 0.139883012 0.5625 0.03908039 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Wife Black Female United-States 0 +50 0.5555556 0.14953813 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.163830534 0.5625 0 0 0.373737365 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +26 0.2888889 0.106912822 0.875 0 0 0.3030303 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +36 0.4 0.173563778 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +26 0.2888889 0.09731428 0.6875 0.005940059 0 0.353535354 Private Assoc-voc Divorced Sales Own-child White Female United-States 0 +19 0.211111113 0.141325042 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 +53 0.5888889 0.0203703772 0.75 0.1502415 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.0896137655 0.625 0 0 0.414141417 Private Some-college Never-married Sales Not-in-family Black Male United-States 0 +29 0.322222233 0.09317137 0.625 0 0 0.0606060624 Private Some-college Married-civ-spouse Adm-clerical Own-child White Female United-States 0 +81 0.900000036 0.1356485 0.875 0 0 0.6060606 Private Masters Widowed Prof-specialty Unmarried White Male ? 0 +37 0.411111116 0.354931116 0.875 0 0 0.3838384 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 +40 0.444444448 0.05323347 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Transport-moving Not-in-family White Male United-States 1 +36 0.4 0.16186583 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Unmarried Black Female United-States 0 +18 0.2 0.182220712 0.5 0 0 0.3030303 Private 12th Never-married Adm-clerical Own-child White Female United-States 0 +44 0.4888889 0.13440448 0.4375 0 0 0.4040404 State-gov 11th Separated Tech-support Not-in-family Black Male United-States 0 +36 0.4 0.155621484 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 +69 0.7666667 0.136776 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.08538464 0.5 0 0 0.07070707 Private 12th Never-married Prof-specialty Own-child White Male United-States 0 +38 0.422222227 0.0214507263 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.221580043 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Male United-States 0 +52 0.5777778 0.107543252 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 +24 0.266666681 0.303558618 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 +57 0.6333333 0.122602135 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 +19 0.211111113 0.235481128 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Own-child White Female United-States 0 +38 0.422222227 0.108483508 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 +46 0.51111114 0.143874377 0.25 0 0.365932047 0.24242425 Private 7th-8th Married-spouse-absent Priv-house-serv Unmarried White Female Guatemala 0 +21 0.233333334 0.369301 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Own-child White Male Mexico 1 +29 0.322222233 0.101610087 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female Japan 0 +33 0.366666675 0.226055011 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Female United-States 0 +26 0.2888889 0.09009601 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +28 0.311111122 0.135051072 0.5625 0 0 0.5555556 Private HS-grad Separated Farming-fishing Not-in-family White Male United-States 0 +26 0.2888889 0.0337460972 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 +37 0.411111116 0.09986226 0.9375 0 0 0.0606060624 ? Prof-school Married-civ-spouse ? Husband White Male Mexico 0 +49 0.544444442 0.11935772 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 +28 0.311111122 0.0893686 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +57 0.6333333 0.0145658571 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Other-service Not-in-family White Male United-States 0 +60 0.6666667 0.0356299728 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.101086751 0.5625 0 0 0.25252524 ? HS-grad Never-married ? Own-child White Male United-States 0 +38 0.422222227 0.16763331 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +51 0.566666663 0.07965151 0.5625 0.031370312 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +60 0.6666667 0.09799455 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.1478718 0.8125 0.03411034 0 0.474747479 Private Bachelors Married-civ-spouse Exec-managerial Other-relative White Male United-States 0 +44 0.4888889 0.268844664 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Craft-repair Own-child Black Female United-States 0 +19 0.211111113 0.153101131 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Never-married Other-service Own-child White Female United-States 0 +59 0.655555546 0.224468842 0.875 0 0 0.353535354 Private Masters Married-civ-spouse Craft-repair Wife Asian-Pac-Islander Female Philippines 0 +50 0.5555556 0.155919865 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +35 0.3888889 0.09020984 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.0372040235 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Machine-op-inspct Unmarried White Male United-States 0 +18 0.2 0.123279713 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child Black Male United-States 0 +32 0.355555564 0.165343955 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband Amer-Indian-Eskimo Male Mexico 0 +32 0.355555564 0.124927178 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Unmarried White Female United-States 0 +39 0.433333337 0.07695199 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +25 0.2777778 0.122457996 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Female United-States 0 +30 0.333333343 0.229619354 0.875 0.1502415 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.162994 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +38 0.422222227 0.0844100341 0.625 0 0 0.8080808 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.0234012827 0.75 0 0 0.373737365 Private Assoc-acdm Divorced Other-service Unmarried White Female United-States 0 +56 0.622222245 0.08864253 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.152835757 0.8125 0 0 0.4040404 Federal-gov Bachelors Widowed Adm-clerical Not-in-family White Male United-States 1 +56 0.622222245 0.08361055 0.5625 0 0 0.414141417 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +17 0.188888893 0.06484925 0.375 0 0 0.141414136 Private 10th Never-married Other-service Own-child White Male United-States 0 +46 0.51111114 0.2270148 0.875 0 0.453856736 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.154465035 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +61 0.677777767 0.134366766 0.5 0 0 0.4040404 State-gov 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.0752169639 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +27 0.3 0.09376206 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +50 0.5555556 0.0218036585 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +33 0.366666675 0.137255549 0.6875 0 0 0.6262626 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +33 0.366666675 0.110587627 0.6875 0.07298073 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.04369555 0.625 0 0 0.6060606 Private Some-college Never-married Farming-fishing Unmarried White Male United-States 0 +51 0.566666663 0.0281577837 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.140583485 0.75 0 0 0.424242437 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 +49 0.544444442 0.053222023 0.875 0 0 0.161616161 Local-gov Masters Widowed Prof-specialty Unmarried White Female United-States 0 +26 0.2888889 0.09224122 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried Black Female United-States 0 +42 0.466666669 0.137100637 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.170368522 0.8125 0 0.3946281 0.323232323 Private Bachelors Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +38 0.422222227 0.115080774 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +48 0.533333361 0.134430751 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 1 +41 0.455555558 0.356445223 0.8125 0.07430074 0 0.454545468 Private Bachelors Divorced Tech-support Unmarried Black Male ? 1 +33 0.366666675 0.131727174 0.5625 0.04386044 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.122702494 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male Ireland 0 +25 0.2777778 0.123713471 0.8125 0 0 0.5050505 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +50 0.5555556 0.140984237 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.139328688 0.5625 0 0 0.363636374 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.113787591 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Not-in-family White Male United-States 0 +59 0.655555546 0.135557577 0.8125 0.1502415 0 0.5555556 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +17 0.188888893 0.050739374 0.375 0 0 0.24242425 Private 10th Never-married Sales Own-child Black Female United-States 0 +65 0.722222269 0.201719537 0.4375 0.01797018 0 0.4040404 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +56 0.622222245 0.109928913 0.5625 1 0 0.4040404 Self-emp-not-inc HS-grad Widowed Adm-clerical Unmarried White Female United-States 1 +57 0.6333333 0.0938166156 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +33 0.366666675 0.269693971 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child Black Male United-States 0 +41 0.455555558 0.1507121 0.875 0 0 0.656565666 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.05248652 0.8125 0 0 0.4040404 Private Bachelors Widowed Other-service Own-child Asian-Pac-Islander Female Philippines 0 +50 0.5555556 0.118410058 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +18 0.2 0.0616452433 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Other-relative White Male United-States 0 +19 0.211111113 0.1885681 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +26 0.2888889 0.0523322821 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female United-States 0 +61 0.677777767 0.133821875 0.75 0 0 0.02020202 ? Assoc-acdm Married-civ-spouse ? Husband White Male United-States 1 +67 0.7444445 0.128200561 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +41 0.455555558 0.0764401 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.136645332 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +27 0.3 0.07303202 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 +35 0.3888889 0.130995721 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +37 0.411111116 0.0323922932 0.8125 0 0 0.909090936 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 1 +22 0.244444445 0.09215568 0.4375 0 0 0.4040404 Private 11th Never-married Adm-clerical Not-in-family White Male United-States 0 +25 0.2777778 0.09650402 0.375 0 0 0.24242425 Private 10th Never-married Priv-house-serv Own-child White Female United-States 0 +26 0.2888889 0.101071931 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +27 0.3 0.201056778 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Protective-serv Own-child White Male United-States 0 +26 0.2888889 0.119314611 0.8125 0.068490684 0 0.656565666 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +51 0.566666663 0.0774733052 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.236033425 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 +60 0.6666667 0.0564758666 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.0422097333 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.154760033 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +40 0.444444448 0.132170364 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Craft-repair Own-child White Female Puerto-Rico 0 +69 0.7666667 0.110186875 0.5625 0 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +44 0.4888889 0.105912626 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +65 0.722222269 0.053999953 0.5625 0.0184801836 0 0.5050505 Private HS-grad Divorced Exec-managerial Other-relative White Female United-States 0 +52 0.5777778 0.0330496654 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +38 0.422222227 0.08281241 0.5625 0 0 0.353535354 Private HS-grad Separated Craft-repair Unmarried White Female United-States 0 +18 0.2 0.08342129 0.4375 0 0 0.4949495 Private 11th Never-married Sales Own-child White Female United-States 0 +24 0.266666681 0.145605356 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Own-child White Male United-States 0 +52 0.5777778 0.121277966 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +21 0.233333334 0.12698482 0.5625 0 0 0.444444448 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +67 0.7444445 0.07149097 1 0.200512 0 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Sales Husband White Male United-States 1 +64 0.7111111 0.11478442 0.625 0 0 0.08080808 Self-emp-not-inc Some-college Widowed Craft-repair Not-in-family White Female United-States 0 +25 0.2777778 0.190668851 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Black Male United-States 0 +34 0.377777785 0.22970961 0.875 0 0 0.5050505 Federal-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 +39 0.433333337 0.02315477 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +26 0.2888889 0.256397069 0.5625 0 0 0.5252525 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +19 0.211111113 0.205070376 0.375 0 0 0.25252524 Private 10th Never-married Farming-fishing Own-child White Male United-States 0 +35 0.3888889 0.06677825 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.13814798 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.0667849854 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Own-child White Male United-States 0 +45 0.5 0.06589996 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +18 0.2 0.06794279 0.4375 0 0 0.282828271 Private 11th Never-married Other-service Unmarried White Female United-States 0 +51 0.566666663 0.135094851 0.625 0 0 0.6363636 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.239140436 0.5625 0 0 0.282828271 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 +18 0.2 0.07973032 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female ? 0 +37 0.411111116 0.079315424 0.6875 0.046500463 0 0.4040404 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 0 +37 0.411111116 0.0791854262 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.1277237 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +21 0.233333334 0.114573605 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +46 0.51111114 0.0183491 1 0.07688077 0 0.454545468 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.129765168 0.5625 0 0 0.353535354 Private HS-grad Separated Sales Not-in-family White Female United-States 0 +23 0.25555557 0.3543896 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Unmarried Black Female United-States 0 +52 0.5777778 0.09872601 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Sales Unmarried Black Male United-States 0 +28 0.311111122 0.040606048 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.162962347 0.625 0 0 0.4040404 State-gov Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +48 0.533333361 0.143557146 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.146914035 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 +22 0.244444445 0.1884563 0.625 0 0 0.0303030312 Self-emp-not-inc Some-college Never-married Prof-specialty Own-child White Female United-States 0 +26 0.2888889 0.10310331 0.5625 0 0 0.8080808 Private HS-grad Never-married Adm-clerical Own-child Asian-Pac-Islander Male ? 1 +40 0.444444448 0.11309924 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +90 1 0.168944 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.130098581 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Own-child White Female United-States 0 +44 0.4888889 0.115869485 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.026593836 0.8125 0.07298073 0 0.424242437 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 +45 0.5 0.05677761 0.6875 0 0.453856736 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.181190878 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male Germany 1 +17 0.188888893 0.176598042 0.375 0 0 0.08080808 ? 10th Never-married ? Own-child White Male United-States 0 +49 0.544444442 0.08479261 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.0908530653 0.8125 0 0 0.5050505 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 +60 0.6666667 0.175872654 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +33 0.366666675 0.08042608 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Other Female Columbia 0 +53 0.5888889 0.08001118 0.375 0 0 0.5050505 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.124069765 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +28 0.311111122 0.128663272 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +22 0.244444445 0.139948338 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Handlers-cleaners Own-child White Male United-States 0 +48 0.533333361 0.14086704 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +76 0.844444454 0.05350895 0.375 0.0117301168 0 0.4040404 ? 10th Married-civ-spouse ? Husband White Male United-States 0 +19 0.211111113 0.126438588 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.04497661 0.6875 0.031370312 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Other-relative White Female United-States 0 +58 0.644444466 0.106419794 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 0 +19 0.211111113 0.205989748 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Female United-States 0 +37 0.411111116 0.0823496953 0.5625 0 0 0.424242437 ? HS-grad Divorced ? Not-in-family Asian-Pac-Islander Female ? 0 +22 0.244444445 0.142653257 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +52 0.5777778 0.08285215 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.0244506486 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +50 0.5555556 0.119126022 1 0.0378103778 0 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +62 0.6888889 0.113964729 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried White Male United-States 0 +26 0.2888889 0.02575057 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +64 0.7111111 0.18701157 0.5625 0 0 0.24242425 State-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.02173563 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.07868566 0.9375 0.1502415 0 0.8080808 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.152352154 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +19 0.211111113 0.0189566277 0.5625 0 0 0.5252525 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +39 0.433333337 0.09461611 0.5625 0 0 0.1010101 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +50 0.5555556 0.111166865 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.136685073 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +36 0.4 0.21303761 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 +39 0.433333337 0.136774644 0.6875 0 0 0.4949495 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +51 0.566666663 0.07004422 0.75 0 0 0.25252524 Self-emp-inc Assoc-acdm Never-married Sales Not-in-family White Female United-States 0 +28 0.311111122 0.118634343 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +57 0.6333333 0.07001256 0.9375 0 0 0.3030303 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.0266591683 0.9375 0 0 0.4040404 Local-gov Prof-school Separated Prof-specialty Own-child Black Female United-States 0 +27 0.3 0.341102123 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female Peru 0 +32 0.355555564 0.152875483 0.625 0 0.430670351 0.6060606 Private Some-college Never-married Sales Own-child White Male United-States 0 +49 0.544444442 0.104056366 0.5625 0 0 0.444444448 State-gov HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +34 0.377777785 0.09242442 0.375 0 0 0.4040404 Self-emp-not-inc 10th Never-married Other-service Own-child White Female United-States 0 +24 0.266666681 0.06891807 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +54 0.6 0.173613623 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Male Guatemala 0 +52 0.5777778 0.0289107952 0.5 0 0 0.454545468 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.112883709 0.4375 0 0 0.25252524 Private 11th Married-civ-spouse Handlers-cleaners Wife White Female United-States 0 +84 0.933333337 0.248483717 0.1875 0 0 0.151515156 ? 5th-6th Widowed ? Not-in-family White Male United-States 0 +79 0.8777778 0.06794683 0.75 0 0 0.02020202 ? Assoc-acdm Married-civ-spouse ? Wife White Female United-States 1 +35 0.3888889 0.0355208628 0.625 0 0 0.464646459 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +56 0.622222245 0.06628792 0.5625 0 0 0.3030303 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +30 0.333333343 0.256719679 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +54 0.6 0.06984553 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +35 0.3888889 0.20114097 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family Asian-Pac-Islander Male United-States 0 +32 0.355555564 0.08614169 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +44 0.4888889 0.1433012 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.189521834 0.5625 0 0 0.1010101 Private HS-grad Married-AF-spouse Other-service Other-relative White Female United-States 0 +60 0.6666667 0.122044452 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +40 0.444444448 0.173343524 0.625 0 0 0.454545468 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +50 0.5555556 0.190799519 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +58 0.644444466 0.144474491 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +41 0.455555558 0.0466981679 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.128011972 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +53 0.5888889 0.06456771 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 +71 0.788888931 0.09757629 0.625 0.06514065 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +17 0.188888893 0.185746 0.3125 0 0 0.25252524 ? 9th Never-married ? Own-child White Female Mexico 0 +45 0.5 0.0184090454 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +23 0.25555557 0.0164308734 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +25 0.2777778 0.222734481 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.11558862 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 1 +28 0.311111122 0.0783805549 0.8125 0 0 0.6060606 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +27 0.3 0.0259977579 0.5 0 0 0.4040404 Private 12th Never-married Transport-moving Not-in-family White Male United-States 0 +19 0.211111113 0.1361779 0.625 0 0 0.151515156 Local-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 +24 0.266666681 0.212367445 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +38 0.422222227 0.06968118 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Unmarried White Male United-States 0 +24 0.266666681 0.110109419 0.875 0 0 0.4040404 State-gov Masters Never-married Adm-clerical Not-in-family Black Female United-States 0 +18 0.2 0.21379669 0.4375 0 0 0.07070707 Private 11th Never-married Other-service Own-child Black Male United-States 0 +58 0.644444466 0.14611724 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +35 0.3888889 0.0784943849 0.875 0 0 0.444444448 Private Masters Never-married Prof-specialty Own-child White Male United-States 1 +43 0.477777779 0.125544131 0.3125 0 0 0.2020202 Private 9th Never-married Machine-op-inspct Not-in-family White Female United-States 0 +45 0.5 0.184005573 0.5625 0.031370312 0 0.353535354 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +24 0.266666681 0.2596745 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male Mexico 0 +63 0.7 0.135805428 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Farming-fishing Husband Black Male United-States 0 +40 0.444444448 0.29630062 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +21 0.233333334 0.122662082 0.8125 0 0 0.2020202 Private Bachelors Never-married Other-service Other-relative White Male United-States 0 +20 0.222222224 0.225036621 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +42 0.466666669 0.124494091 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 +49 0.544444442 0.153816417 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +47 0.5222222 0.142198622 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.0261459351 0.5625 0 0 0.363636374 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +61 0.677777767 0.109375939 0.25 0 0.379017442 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +23 0.25555557 0.203970492 0.75 0 0 0.4040404 ? Assoc-acdm Married-civ-spouse ? Husband White Male El-Salvador 0 +35 0.3888889 0.05997151 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.17795454 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Farming-fishing Wife White Female United-States 0 +18 0.2 0.0587032437 0.5 0 0 0.25252524 Private 12th Never-married Other-service Own-child White Male United-States 0 +28 0.311111122 0.268685043 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +62 0.6888889 0.083256945 0.8125 0 0 0.04040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +20 0.222222224 0.1049488 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.164113417 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +57 0.6333333 0.09038496 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +56 0.622222245 0.160730928 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.1077177 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.133809745 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +29 0.322222233 0.14514938 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +30 0.333333343 0.106419794 0.625 0 0 0.5555556 Private Some-college Never-married Craft-repair Other-relative White Male Ecuador 0 +53 0.5888889 0.0237791352 0.8125 0 0 0.575757563 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +25 0.2777778 0.132008716 0.125 0 0 0.4040404 Private 1st-4th Never-married Priv-house-serv Not-in-family White Female Guatemala 0 +44 0.4888889 0.216759562 0.5625 0 0 0.3838384 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +22 0.244444445 0.121538624 0.625 0 0 0.282828271 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +40 0.444444448 0.135895014 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +25 0.2777778 0.168409213 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Male ? 0 +30 0.333333343 0.152579129 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +51 0.566666663 0.09168219 0.6875 0 0 0.3838384 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +17 0.188888893 0.0317901559 0.4375 0 0 0.24242425 Private 11th Never-married Priv-house-serv Own-child White Female United-States 0 +46 0.51111114 0.145412728 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +50 0.5555556 0.0166006051 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +34 0.377777785 0.4945043 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +42 0.466666669 0.21626249 0.875 0 0 0.5050505 ? Masters Married-civ-spouse ? Husband White Male United-States 0 +41 0.455555558 0.129715338 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +32 0.355555564 0.219762847 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Unmarried Other Male United-States 0 +32 0.355555564 0.139612928 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.0734752044 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +50 0.5555556 0.184904069 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +77 0.8555556 0.096077 0.25 0 0 0.232323229 Private 7th-8th Widowed Priv-house-serv Unmarried White Female United-States 0 +33 0.366666675 0.121814772 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +47 0.5222222 0.127035335 0.5625 0 0 0.4848485 Self-emp-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +64 0.7111111 0.114234142 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +34 0.377777785 0.175496146 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.1267895 0.5625 0 0 0.353535354 Local-gov HS-grad Never-married Prof-specialty Unmarried Black Female United-States 0 +67 0.7444445 0.06958622 0.875 0.158311576 0 0.727272749 Local-gov Masters Never-married Exec-managerial Other-relative White Female United-States 1 +37 0.411111116 0.0353369862 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Not-in-family White Male United-States 0 +34 0.377777785 0.4966071 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.131435543 0.625 0 0 0.2929293 ? Some-college Never-married ? Own-child White Female United-States 0 +50 0.5555556 0.14778693 1 0 0 0.646464646 Self-emp-not-inc Doctorate Divorced Sales Not-in-family White Male United-States 0 +60 0.6666667 0.133474335 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.123369962 0.8125 0 0 0.434343427 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +44 0.4888889 0.13237983 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.11343129 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Sales Other-relative White Female Poland 0 +48 0.533333361 0.117454983 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male El-Salvador 1 +36 0.4 0.3668648 0.5625 0.02907029 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female Nicaragua 0 +48 0.533333361 0.06443098 0.625 0 0 0.434343427 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.315694362 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +51 0.566666663 0.113902763 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +52 0.5777778 0.049857717 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.0745077357 0.1875 0 0 0.2020202 Private 5th-6th Never-married Sales Own-child Asian-Pac-Islander Female Vietnam 0 +43 0.477777779 0.0224495772 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.122284904 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +66 0.733333349 0.09606218 0.75 0.0555605553 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male Yugoslavia 1 +37 0.411111116 0.129487678 0.375 0.0263502635 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Other-service Wife White Female United-States 0 +35 0.3888889 0.09839733 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.117582284 0.8125 0.05178052 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.135346085 0.375 0 0 0.3838384 Private 10th Never-married Other-service Unmarried White Female Peru 0 +51 0.566666663 0.13575761 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +71 0.788888931 0.100616626 0.5625 0 0 0.09090909 Federal-gov HS-grad Widowed Exec-managerial Not-in-family White Male United-States 0 +50 0.5555556 0.113606408 0.875 0 0.43663913 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +63 0.7 0.0258313939 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +41 0.455555558 0.121419407 0.875 0 0 0.353535354 State-gov Masters Never-married Prof-specialty Own-child White Female United-States 0 +24 0.266666681 0.185505539 0.625 0 0 0.4040404 State-gov Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 +41 0.455555558 0.116555817 0.625 0 0 0.454545468 Local-gov Some-college Divorced Other-service Unmarried White Female United-States 0 +33 0.366666675 0.112799518 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 +42 0.466666669 0.179926649 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 +23 0.25555557 0.0910201 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child Asian-Pac-Islander Male United-States 0 +49 0.544444442 0.147070974 0.6875 0 0 0.3838384 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.07222714 0.5 0 0 0.4040404 Self-emp-not-inc 12th Married-civ-spouse Craft-repair Not-in-family White Male United-States 0 +31 0.344444454 0.09322795 0.1875 0 0 0.565656543 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +28 0.311111122 0.104305573 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Own-child Black Male United-States 0 +37 0.411111116 0.130668387 0.4375 0 0 0.25252524 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.228411034 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +51 0.566666663 0.369340032 0.8125 0 0 0.262626261 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +25 0.2777778 0.06857389 0.6875 0 0 0.414141417 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +49 0.544444442 0.0856136456 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.11571794 0.5625 0 0 0.454545468 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +48 0.533333361 0.0273899529 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +41 0.455555558 0.229461074 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.11790356 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +26 0.2888889 0.216628224 0.5625 0 0 0.161616161 ? HS-grad Never-married ? Unmarried White Female United-States 0 +46 0.51111114 0.103997089 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +17 0.188888893 0.0730124861 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Female United-States 0 +34 0.377777785 0.233228147 0.4375 0 0 0.434343427 Private 11th Divorced Handlers-cleaners Not-in-family White Male United-States 0 +44 0.4888889 0.02860905 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +23 0.25555557 0.108915918 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 +35 0.3888889 0.0474484824 0.625 0.046500463 0 0.2020202 Private Some-college Never-married Prof-specialty Unmarried Asian-Pac-Islander Male United-States 0 +30 0.333333343 0.127809227 0.8125 0.0486504845 0 0.4040404 Private Bachelors Never-married Transport-moving Not-in-family White Male United-States 0 +65 0.722222269 0.09251265 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Husband Asian-Pac-Islander Male United-States 0 +34 0.377777785 0.168871254 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male Jamaica 0 +34 0.377777785 0.1006045 0.9375 0 0 0.4040404 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.104156047 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +28 0.311111122 0.0258024335 0.6875 0.02407024 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +53 0.5888889 0.13654767 0.875 0.07688077 0 0.7070707 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.03781896 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Unmarried White Male United-States 0 +21 0.233333334 0.175290048 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +53 0.5888889 0.0727976263 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +54 0.6 0.0480526462 0.875 0 0 0.5050505 Self-emp-not-inc Masters Divorced Prof-specialty Not-in-family White Male United-States 1 +32 0.355555564 0.117339812 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 +39 0.433333337 0.0770294443 0.8125 0 0 0.353535354 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +39 0.433333337 0.107066385 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried White Female United-States 0 +29 0.322222233 0.12089809 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male Germany 0 +29 0.322222233 0.0215093233 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 +43 0.477777779 0.100968882 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.0395634174 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child White Male United-States 0 +39 0.433333337 0.145855233 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 +45 0.5 0.171985686 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +36 0.4 0.118575744 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +71 0.788888931 0.08425984 0.6875 0 0 0.4040404 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 +62 0.6888889 0.132878929 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +43 0.477777779 0.227297008 0.625 0.005940059 0 0.2020202 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female Mexico 0 +31 0.344444454 0.107588381 0.5625 0 0 0.5858586 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 +39 0.433333337 0.212979019 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.0859497339 0.8125 0 0.43663913 0.323232323 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +45 0.5 0.374924332 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 +19 0.211111113 0.1788746 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +43 0.477777779 0.234156281 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.04201104 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 +43 0.477777779 0.114655778 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Female United-States 0 +34 0.377777785 0.136761844 0.8125 0 0 0.272727281 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +66 0.733333349 0.0780491754 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.112975307 0.6875 0 0.4331956 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.122187912 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 0 +23 0.25555557 0.124977015 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +41 0.455555558 0.235997722 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +63 0.7 0.151613966 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male ? 0 +55 0.6111111 0.07111312 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +35 0.3888889 0.235903427 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.101047009 0.3125 0 0 0.5050505 Private 9th Never-married Craft-repair Not-in-family White Male ? 1 +37 0.411111116 0.07256459 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +63 0.7 0.2254596 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +43 0.477777779 0.07783499 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.08862636 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 +36 0.4 0.06456165 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +54 0.6 0.263362765 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.0344102047 0.8125 0 0 0.5050505 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +78 0.8666667 0.126654118 0.8125 0 0.549127638 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +77 0.8555556 0.07940837 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.0473090634 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Other-service Not-in-family Asian-Pac-Islander Female Philippines 0 +39 0.433333337 0.126417711 0.5625 0 0 0.727272749 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +37 0.411111116 0.230127871 0.8125 0 0 0.4040404 Private Bachelors Separated Tech-support Not-in-family Asian-Pac-Islander Male Philippines 0 +34 0.377777785 0.140124142 0.6875 0.07298073 0 0.454545468 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.195312873 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +54 0.6 0.0514203161 0.8125 0 0 0.5050505 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +21 0.233333334 0.135362253 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +36 0.4 0.07501625 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.0920613855 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Widowed Adm-clerical Other-relative White Female United-States 0 +40 0.444444448 0.119024321 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.112408862 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Prof-specialty Unmarried Black Female United-States 0 +38 0.422222227 0.1642562 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.104816109 0.1875 0 0 0.4040404 Private 5th-6th Never-married Craft-repair Not-in-family White Male Columbia 0 +46 0.51111114 0.0691026151 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +22 0.244444445 0.04063501 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +37 0.411111116 0.05053125 0.5625 0 0 0.25252524 Private HS-grad Divorced Sales Unmarried White Female Canada 0 +69 0.7666667 0.117514253 0.375 0 0 0.282828271 Private 10th Separated Machine-op-inspct Not-in-family White Female Peru 0 +43 0.477777779 0.0979595259 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +53 0.5888889 0.0561956763 0.8125 0 0 0.212121218 Private Bachelors Never-married Other-service Not-in-family Asian-Pac-Islander Female Japan 1 +20 0.222222224 0.465971351 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child Black Female United-States 0 +22 0.244444445 0.127434745 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +48 0.533333361 0.07798452 0.3125 0 0 0.444444448 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.188702136 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +68 0.75555557 0.2743562 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +39 0.433333337 0.03568251 0.625 0 0.395087242 0.5555556 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +57 0.6333333 0.114048921 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband Black Male Trinadad&Tobago 1 +23 0.25555557 0.212207139 0.375 0 0 0.6060606 Private 10th Never-married Other-service Unmarried White Male Mexico 0 +25 0.2777778 0.11304266 0.8125 0 0 0.3838384 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +22 0.244444445 0.0425033942 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Own-child Black Male United-States 0 +23 0.25555557 0.350759923 0.5 0 0 0.3030303 Private 12th Never-married Priv-house-serv Own-child White Male United-States 0 +41 0.455555558 0.0322636478 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.09795482 0.625 0 0 0.25252524 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 +58 0.644444466 0.0379819572 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.109322727 0.5625 0 0 0.454545468 Private HS-grad Divorced Sales Not-in-family Asian-Pac-Islander Male Japan 0 +28 0.311111122 0.137450874 0.875 0 0 0.4848485 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +19 0.211111113 0.0668456 0.4375 0 0 0.25252524 Private 11th Never-married Machine-op-inspct Not-in-family White Female United-States 0 +44 0.4888889 0.068757765 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Other-relative White Female United-States 0 +68 0.75555557 0.113688581 0.0625 0 0 0.1010101 Private Preschool Never-married Machine-op-inspct Not-in-family White Male United-States 0 +33 0.366666675 0.223868713 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.157215744 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +44 0.4888889 0.0385484 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +38 0.422222227 0.1295456 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.2979912 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried White Female Mexico 0 +29 0.322222233 0.248611 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +65 0.722222269 0.176017463 0.3125 0 0 0.4040404 Private 9th Widowed Sales Not-in-family White Female United-States 0 +55 0.6111111 0.1079696 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Other-relative White Female United-States 0 +49 0.544444442 0.03399598 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +27 0.3 0.2165932 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Female United-States 0 +41 0.455555558 0.0199305583 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +33 0.366666675 0.225461632 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.181500033 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +41 0.455555558 0.1935105 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +66 0.733333349 0.0226435568 0.5625 0 0 0.04040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +38 0.422222227 0.100590356 0.625 0 0 0.6060606 Private Some-college Divorced Sales Not-in-family White Male United-States 0 +43 0.477777779 0.06482702 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +40 0.444444448 0.249545872 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +32 0.355555564 0.126790166 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.11285609 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Unmarried White Female Mexico 0 +35 0.3888889 0.196796671 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +41 0.455555558 0.0684263855 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.0472578742 0.8125 0 0 0.6060606 Local-gov Bachelors Never-married Prof-specialty Not-in-family Amer-Indian-Eskimo Male United-States 0 +36 0.4 0.181667075 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.11820665 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +53 0.5888889 0.157044664 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.119452015 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +22 0.244444445 0.14286609 0.8125 0 0 0.151515156 Private Bachelors Never-married Handlers-cleaners Own-child White Female United-States 0 +26 0.2888889 0.194623858 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 +64 0.7111111 0.156003386 0.5625 0 0 0.212121218 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +48 0.533333361 0.09895501 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.261877626 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +26 0.2888889 0.164046064 0.625 0 0 0.4040404 Private Some-college Never-married Sales Unmarried White Female ? 0 +35 0.3888889 0.06624885 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +46 0.51111114 0.248896584 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +65 0.722222269 0.0213779844 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Widowed Exec-managerial Unmarried White Female United-States 0 +53 0.5888889 0.150642723 0.5625 0.068490684 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family White Male United-States 0 +18 0.2 0.224698514 0.1875 0 0 0.545454562 Private 5th-6th Never-married Other-service Other-relative White Male Mexico 0 +34 0.377777785 0.07290809 0.9375 0 0 0.5555556 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.0512755066 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Female Guatemala 0 +37 0.411111116 0.06177052 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +61 0.677777767 0.1123826 0.8125 0 0 0.1010101 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +59 0.655555546 0.122625038 0.8125 0.0501305 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +32 0.355555564 0.170237184 0.875 0.135501355 0 0.6060606 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 +31 0.344444454 0.0296038613 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +25 0.2777778 0.056727767 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +81 0.900000036 0.0678080842 0.125 0 0 0.151515156 Private 1st-4th Married-civ-spouse Prof-specialty Husband White Male Poland 0 +47 0.5222222 0.104740672 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Other-relative Black Female United-States 0 +39 0.433333337 0.0200807564 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.162864 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 +44 0.4888889 0.1447008 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +37 0.411111116 0.162193835 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.1037755 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +27 0.3 0.118240327 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Wife White Female Mexico 0 +55 0.6111111 0.114694171 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male Poland 1 +60 0.6666667 0.0983326659 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.292091042 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Handlers-cleaners Not-in-family White Male ? 0 +23 0.25555557 0.157355174 0.8125 0 0 0.25252524 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +19 0.211111113 0.409373581 0.5625 0 0 0.6060606 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +45 0.5 0.0596078038 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +36 0.4 0.08608377 0.5625 0 0 0.3030303 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 +46 0.51111114 0.164169312 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.11935772 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +39 0.433333337 0.1557077 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +29 0.322222233 0.170980766 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +39 0.433333337 0.119266123 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.102953114 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child Other Female Mexico 0 +37 0.411111116 0.12873736 0.75 0 0 0.25252524 Private Assoc-acdm Divorced Prof-specialty Unmarried White Male United-States 0 +49 0.544444442 0.1721278 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +27 0.3 0.114376262 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 +28 0.311111122 0.148995936 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Other-relative White Male Mexico 0 +35 0.3888889 0.181894049 0.625 0 0 0.3030303 Private Some-college Divorced Sales Unmarried White Female United-States 0 +54 0.6 0.0212756079 0.5625 0.0263502635 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +17 0.188888893 0.232640833 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Male United-States 0 +18 0.2 0.131269857 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 +33 0.366666675 0.261830479 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Unmarried Other Female United-States 0 +33 0.366666675 0.239681289 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband Asian-Pac-Islander Male United-States 0 +51 0.566666663 0.08224462 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +49 0.544444442 0.0509683751 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +49 0.544444442 0.09500743 0.625 0 0.5369605 0.5050505 Self-emp-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +41 0.455555558 0.0322636478 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +64 0.7111111 0.149082139 0.125 0 0 0.121212125 Private 1st-4th Divorced Priv-house-serv Not-in-family White Female United-States 0 +40 0.444444448 0.172205925 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.137067631 0.5625 0 0 0.4040404 Federal-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +23 0.25555557 0.0842632055 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +34 0.377777785 0.09422074 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +38 0.422222227 0.0517799854 0.4375 0.05178052 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.01888254 0.625 0 0 0.868686855 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +30 0.333333343 0.0296038613 0.5625 0 0.453168035 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +36 0.4 0.109945752 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 +23 0.25555557 0.0376438424 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.172380373 0.625 0 0 0.8080808 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +61 0.677777767 0.113594286 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female Canada 0 +47 0.5222222 0.02693195 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +56 0.622222245 0.140398934 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.139206782 0.5 0 0 0.5555556 Private 12th Never-married Sales Not-in-family White Female United-States 0 +33 0.366666675 0.07932822 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 +36 0.4 0.08698698 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +38 0.422222227 0.119399481 0.5625 0 0 0.353535354 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +34 0.377777785 0.15251717 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +56 0.622222245 0.09855561 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.1265578 0.6875 0 0 0.232323229 Private Assoc-voc Never-married Exec-managerial Not-in-family White Female United-States 0 +26 0.2888889 0.0654358938 0.75 0.05178052 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +49 0.544444442 0.127091914 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +71 0.788888931 0.126283 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +19 0.211111113 0.143104523 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 +20 0.222222224 0.05706588 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +42 0.466666669 0.09288512 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +51 0.566666663 0.02314332 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +38 0.422222227 0.171154544 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Prof-specialty Own-child Black Female United-States 0 +38 0.422222227 0.114618056 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +35 0.3888889 0.128574371 0.8125 0 0 0.25252524 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +24 0.266666681 0.2138088 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife Black Female United-States 0 +40 0.444444448 0.252981573 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Male United-States 0 +21 0.233333334 0.136778682 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +49 0.544444442 0.0362987928 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +18 0.2 0.1156782 0.625 0 0 0.24242425 ? Some-college Never-married ? Own-child Black Female United-States 0 +54 0.6 0.11299888 0.5625 0 0.43663913 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.137794375 0.8125 0 0 0.424242437 Private Bachelors Married-spouse-absent Exec-managerial Not-in-family White Female United-States 0 +27 0.3 0.445118725 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +20 0.222222224 0.07118317 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +38 0.422222227 0.04733735 0.875 0.1502415 0 0.02020202 ? Masters Married-civ-spouse ? Wife Black Female United-States 1 +31 0.344444454 0.100091942 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +25 0.2777778 0.172323123 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +19 0.211111113 0.172371626 0.625 0 0 0.2020202 Federal-gov Some-college Never-married Handlers-cleaners Own-child White Male England 0 +33 0.366666675 0.07632897 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.2966623 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +34 0.377777785 0.07105318 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Unmarried White Female United-States 0 +42 0.466666669 0.1749553 0.8125 0 0.14990817 0.5050505 Private Bachelors Divorced Prof-specialty Unmarried White Male United-States 1 +37 0.411111116 0.0602752753 0.875 0 0 0.4040404 Local-gov Masters Divorced Exec-managerial Not-in-family White Female United-States 0 +25 0.2777778 0.115725346 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +40 0.444444448 0.03445196 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.127269059 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Female United-States 0 +31 0.344444454 0.06596126 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.1316403 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +63 0.7 0.0315934829 0.8125 0 0 0.08080808 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +54 0.6 0.258209556 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.1370023 0.5625 0 0 0.444444448 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.09980569 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +26 0.2888889 0.142450526 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +39 0.433333337 0.0323720872 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +57 0.6333333 0.1426573 0.8125 0.03103031 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +54 0.6 0.124878012 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +57 0.6333333 0.15216963 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.211843431 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.1404838 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.150120065 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +31 0.344444454 0.141131073 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.119292386 0.875 0 0 0.6060606 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +50 0.5555556 0.117029309 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.08174688 0.5625 0 0 0.3030303 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +37 0.411111116 0.0452110022 0.5625 0 0 0.6060606 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +26 0.2888889 0.04528846 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.133592874 0.8125 0 0 0.353535354 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.09497038 0.625 0 0 0.25252524 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +24 0.266666681 0.04086199 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 +29 0.322222233 0.07022001 0.5625 0 0 0.343434334 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +47 0.5222222 0.088234365 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.104499549 0.625 0 0.399449021 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.119700551 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 +20 0.222222224 0.02668207 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +25 0.2777778 0.137314156 0.6875 0 0.4331956 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +57 0.6333333 0.0168686714 0.8125 0.0217402168 0 0.373737365 State-gov Bachelors Divorced Adm-clerical Unmarried White Male United-States 0 +36 0.4 0.07561368 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +25 0.2777778 0.113894679 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +46 0.51111114 0.1048417 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male Germany 1 +39 0.433333337 0.196446434 0.5625 0.04508045 0 0.24242425 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +29 0.322222233 0.151016533 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.18219243 0.4375 0 0 0.2020202 Private 11th Never-married Exec-managerial Own-child White Female United-States 0 +46 0.51111114 0.0845198259 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +61 0.677777767 0.03460957 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.0759497657 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +50 0.5555556 0.07336542 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family Black Female United-States 0 +53 0.5888889 0.2471582 0.8125 1 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male India 1 +36 0.4 0.07393119 0.8125 0 0 0.6060606 Local-gov Bachelors Never-married Protective-serv Not-in-family White Male United-States 0 +38 0.422222227 0.1522902 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +75 0.8333334 0.06249861 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.125917271 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 1 +44 0.4888889 0.155234888 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.156016186 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +31 0.344444454 0.08113464 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +49 0.544444442 0.0226799268 0.5 0 0 0.353535354 Private 12th Never-married Transport-moving Not-in-family Asian-Pac-Islander Male United-States 0 +34 0.377777785 0.1289044 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.15487656 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male Columbia 0 +47 0.5222222 0.107853748 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +38 0.422222227 0.128574371 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.08487949 0.5625 0 0 0.2020202 Private HS-grad Never-married Craft-repair Own-child White Female United-States 0 +47 0.5222222 0.018734362 0.3125 0 0.3946281 0.3030303 Private 9th Divorced Other-service Not-in-family White Female United-States 0 +42 0.466666669 0.137092561 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +29 0.322222233 0.0973877 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 +38 0.422222227 0.150200889 0.625 0 0 0.75757575 Local-gov Some-college Divorced Protective-serv Not-in-family White Male United-States 0 +22 0.244444445 0.123429909 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Black Female United-States 0 +32 0.355555564 0.116328835 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +20 0.222222224 0.08864455 0.625 0 0 0.4848485 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +41 0.455555558 0.170444638 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.317901552 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 +44 0.4888889 0.0935983956 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +35 0.3888889 0.259588271 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +18 0.2 0.123998374 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Male United-States 0 +60 0.6666667 0.0696057454 0.5625 0.1502415 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.0914565548 0.3125 0 0 0.25252524 Local-gov 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.153134122 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 +40 0.444444448 0.05853823 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.05592559 0.625 0.0217602178 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +25 0.2777778 0.116239257 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +56 0.622222245 0.184623212 0.875 0 0.383149683 0.4040404 State-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +42 0.466666669 0.1264864 0.625 1 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.3258708 0.25 0 0 0.4040404 Private 7th-8th Never-married Handlers-cleaners Unmarried White Male Guatemala 0 +66 0.733333349 0.148543313 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +48 0.533333361 0.103019118 0.25 0 0 0.323232323 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Dominican-Republic 0 +35 0.3888889 0.161483258 0.625 0 0 0.5050505 Private Some-college Never-married Sales Unmarried White Male United-States 0 +41 0.455555558 0.119825155 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.1347985 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +55 0.6111111 0.07518329 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.226653114 0.8125 0.1502415 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.109728873 0.625 0 0 0.5050505 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 +29 0.322222233 0.07857588 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family White Male United-States 0 +42 0.466666669 0.0166787338 1 0.1502415 0 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +65 0.722222269 0.1519359 0.5625 0 0 0.2020202 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +30 0.333333343 0.113897376 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Other-relative Asian-Pac-Islander Male Vietnam 0 +43 0.477777779 0.143391445 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +61 0.677777767 0.06331022 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male Italy 0 +22 0.244444445 0.127920359 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +23 0.25555557 0.184834033 0.4375 0 0 0.4040404 Private 11th Separated Other-service Unmarried White Female United-States 0 +34 0.377777785 0.126790166 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.1914259 0.5625 0 0 0.353535354 Private HS-grad Widowed Prof-specialty Unmarried White Female United-States 0 +21 0.233333334 0.133534268 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +31 0.344444454 0.24820891 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 0 +34 0.377777785 0.113671072 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +33 0.366666675 0.08231939 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Wife Black Female United-States 1 +32 0.355555564 0.09173809 0.875 0 0.6483012 0.5555556 Private Masters Separated Exec-managerial Not-in-family White Male United-States 1 +44 0.4888889 0.118300274 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Husband White Male United-States 1 +21 0.233333334 0.11673969 0.625 0 0 0.2020202 State-gov Some-college Never-married Other-service Own-child Black Male United-States 0 +75 0.8333334 0.02101091 0.5625 0 0 0.2020202 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +55 0.6111111 0.0598610528 0.875 0 0 0.6060606 Federal-gov Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 +43 0.477777779 0.118588544 0.5625 0 0 0.161616161 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +31 0.344444454 0.14500995 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.133646086 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.121880777 0.875 0 0 0.5050505 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +23 0.25555557 0.138834983 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Unmarried Black Female United-States 0 +42 0.466666669 0.0444195978 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +29 0.322222233 0.133102536 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.124844335 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +28 0.311111122 0.0908530653 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +64 0.7111111 0.130021125 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +35 0.3888889 0.10347712 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Other-service Unmarried Black Female United-States 0 +65 0.722222269 0.07805591 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +34 0.377777785 0.265673667 0.8125 0.0246302467 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male France 0 +58 0.644444466 0.231666908 0.8125 0 0 0.5050505 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 +63 0.7 0.167027116 0.9375 0 0 0.3030303 ? Prof-school Married-civ-spouse ? Husband White Male United-States 1 +50 0.5555556 0.160947129 0.8125 1 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male ? 1 +59 0.655555546 0.107124314 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.285054624 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.0604396164 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.021403579 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 +51 0.566666663 0.10596516 0.1875 0 0 0.08080808 ? 5th-6th Married-civ-spouse ? Husband Black Male United-States 0 +47 0.5222222 0.157277718 0.875 0.2782828 0 0.6060606 Private Masters Divorced Sales Not-in-family White Male United-States 1 +30 0.333333343 0.220321208 0.8125 0 0.359045 0.4040404 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 +34 0.377777785 0.159319863 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +51 0.566666663 0.130985618 0.625 0 0 0.4040404 State-gov Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +41 0.455555558 0.204424456 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +57 0.6333333 0.115337394 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.0265291762 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +62 0.6888889 0.132833123 0.5625 0 0 0.181818187 Local-gov HS-grad Widowed Other-service Not-in-family White Female United-States 0 +22 0.244444445 0.102371179 0.625 0 0 0.2020202 State-gov Some-college Never-married Tech-support Own-child White Male United-States 0 +38 0.422222227 0.252254844 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.180070788 0.4375 0 0 0.3030303 ? 11th Never-married ? Not-in-family White Male United-States 0 +45 0.5 0.24554576 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +37 0.411111116 0.125300989 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.0320205 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Other-relative White Male United-States 0 +49 0.544444442 0.101775773 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 +24 0.266666681 0.337110072 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +47 0.5222222 0.09301983 0.8125 0 0.518365443 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +20 0.222222224 0.151892126 0.625 0 0 0.24242425 Federal-gov Some-college Never-married Tech-support Own-child White Female United-States 0 +27 0.3 0.103246778 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 +40 0.444444448 0.114423409 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +19 0.211111113 0.07596122 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 +31 0.344444454 0.118392542 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +43 0.477777779 0.03718786 0.5625 0 0.453856736 0.5252525 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +48 0.533333361 0.0262341686 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +64 0.7111111 0.0444472134 0.5625 0.07298073 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +39 0.433333337 0.117417268 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried White Male United-States 0 +50 0.5555556 0.0237245783 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.118287474 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Unmarried White Female United-States 0 +44 0.4888889 0.110916309 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 +50 0.5555556 0.05877464 0.5625 0 0 0.5555556 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +54 0.6 0.11023806 0.5625 0 0.4331956 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +17 0.188888893 0.122123249 0.375 0 0 0.353535354 Self-emp-not-inc 10th Never-married Farming-fishing Own-child White Male United-States 0 +33 0.366666675 0.119852096 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +28 0.311111122 0.0317692757 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Own-child White Female United-States 0 +39 0.433333337 0.127987042 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.1136805 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Unmarried White Male United-States 0 +59 0.655555546 0.11806386 0.25 0 0 0.323232323 Private 7th-8th Never-married Other-service Other-relative White Male United-States 0 +74 0.822222233 0.0979743451 0.125 0 0 0.151515156 Private 1st-4th Widowed Priv-house-serv Not-in-family Black Female United-States 0 +54 0.6 0.1076005 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +31 0.344444454 0.07635456 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.328511059 0.625 0 0 0.4040404 Private Some-college Separated Sales Unmarried White Female United-States 0 +20 0.222222224 0.2052327 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Female United-States 0 +54 0.6 0.125173688 0.875 0 0.453856736 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.143391445 0.6875 0.02407024 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +57 0.6333333 0.212473184 0.9375 0 0 0.363636374 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +49 0.544444442 0.09136024 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried Asian-Pac-Islander Female South 0 +40 0.444444448 0.148835629 1 0.03103031 0 0.4040404 Private Doctorate Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male India 1 +19 0.211111113 0.07910258 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Own-child White Male United-States 0 +38 0.422222227 0.136514 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +39 0.433333337 0.111042939 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +43 0.477777779 0.129193351 0.75 0.07688077 0 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.1530001 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Male United-States 0 +57 0.6333333 0.106470309 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 0 +38 0.422222227 0.128714457 0.9375 0 0 1 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.1304643 0.8125 0 0 0.3838384 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +40 0.444444448 0.0963464156 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +34 0.377777785 0.138948143 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.127003685 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Farming-fishing Own-child White Male United-States 0 +53 0.5888889 0.0236424077 0.625 0 0 0.343434334 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.136764541 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Unmarried White Male United-States 0 +43 0.477777779 0.20874989 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.163959846 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.11928767 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Prof-specialty Unmarried Black Female United-States 0 +64 0.7111111 0.07673511 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +19 0.211111113 0.196341366 0.5 0 0 0.282828271 ? 12th Never-married ? Own-child White Male United-States 0 +40 0.444444448 0.149532065 0.875 0.0332503319 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +34 0.377777785 0.125832409 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +46 0.51111114 0.129835889 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +35 0.3888889 0.158255011 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male Mexico 0 +32 0.355555564 0.0560737662 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +26 0.2888889 0.167703345 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +25 0.2777778 0.23315002 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +55 0.6111111 0.183643222 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +22 0.244444445 0.04078386 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +29 0.322222233 0.0227641184 0.625 0 0 0.2020202 State-gov Some-college Divorced Adm-clerical Own-child White Male United-States 0 +38 0.422222227 0.07554228 0.5625 0 0 1 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +55 0.6111111 0.135375038 0.625 0 0 0.353535354 Private Some-college Widowed Other-service Not-in-family White Female United-States 0 +26 0.2888889 0.0661107749 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.0536039174 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Never-married Prof-specialty Not-in-family Other Male United-States 0 +25 0.2777778 0.09635719 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +39 0.433333337 0.06812532 0.5625 0.046500463 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 +18 0.2 0.191586882 0.4375 0 0 0.25252524 ? 11th Never-married ? Own-child White Male United-States 0 +58 0.644444466 0.107106127 0.3125 0 0 0.4040404 State-gov 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +34 0.377777785 0.237939522 0.6875 0 0 0.4040404 Local-gov Assoc-voc Never-married Craft-repair Own-child White Female United-States 0 +29 0.322222233 0.109322727 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Never-married Exec-managerial Own-child Asian-Pac-Islander Male South 0 +49 0.544444442 0.156233728 1 0 0 0.5050505 State-gov Doctorate Divorced Prof-specialty Unmarried White Male United-States 1 +38 0.422222227 0.122544885 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.110186875 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 +28 0.311111122 0.08813603 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.140684515 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female El-Salvador 1 +29 0.322222233 0.03956611 0.75 0 0 0.6060606 Self-emp-not-inc Assoc-acdm Never-married Other-service Own-child White Male United-States 0 +48 0.533333361 0.07856174 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +40 0.444444448 0.0466981679 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +36 0.4 0.216077268 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.133283049 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +57 0.6333333 0.171019837 0.125 0 0 0.353535354 Self-emp-not-inc 1st-4th Married-civ-spouse Sales Husband White Male Mexico 0 +24 0.266666681 0.0600482933 0.3125 0 0 0.4040404 Private 9th Never-married Other-service Not-in-family White Male El-Salvador 0 +32 0.355555564 0.250768334 0.3125 0 0 0.232323229 Private 9th Separated Other-service Unmarried White Female Mexico 0 +18 0.2 0.19942683 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Never-married Sales Own-child White Male ? 0 +39 0.433333337 0.129732177 0.5625 0 0 0.565656543 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +39 0.433333337 0.271763742 0.4375 0 0 0.4040404 Private 11th Divorced Transport-moving Own-child White Male United-States 0 +18 0.2 0.11426647 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Own-child White Female United-States 0 +20 0.222222224 0.14647153 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +27 0.3 0.109182633 0.3125 0 0 0.4040404 ? 9th Never-married ? Own-child White Female United-States 0 +54 0.6 0.1184828 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +40 0.444444448 0.120921664 0.5625 0 0 0.75757575 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +27 0.3 0.100776926 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +27 0.3 0.194750473 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +43 0.477777779 0.234201416 0.8125 0 0 0.5050505 Federal-gov Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +22 0.244444445 0.2741137 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Other-relative White Female United-States 0 +17 0.188888893 0.1301262 0.4375 0 0 0.121212125 Private 11th Never-married Sales Unmarried White Female Poland 0 +37 0.411111116 0.110458307 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +49 0.544444442 0.116598919 0.375 0.04416044 0 1 Private 10th Separated Exec-managerial Not-in-family Black Male United-States 0 +33 0.366666675 0.224759132 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Unmarried Black Male United-States 0 +21 0.233333334 0.0324111544 0.625 0 0.3677686 0.1010101 State-gov Some-college Never-married Exec-managerial Own-child White Male United-States 0 +45 0.5 0.125449836 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.07040119 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +25 0.2777778 0.07011292 0.8125 0.0282902829 0 0.6060606 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +71 0.788888931 0.143332183 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.13696526 0.8125 0 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +41 0.455555558 0.0876443461 0.9375 0 0 0.8080808 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.181883276 0.375 0 0 0.3030303 ? 10th Never-married ? Unmarried White Female United-States 0 +47 0.5222222 0.1471235 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Sales Unmarried White Female Cuba 0 +30 0.333333343 0.103805132 0.8125 0 0 0.656565666 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +40 0.444444448 0.130353838 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female Dominican-Republic 0 +44 0.4888889 0.0569372363 0.625 0 0 0.4848485 Private Some-college Divorced Sales Unmarried White Female United-States 0 +50 0.5555556 0.101703033 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.106198207 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +68 0.75555557 0.146442562 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +45 0.5 0.241722092 0.5 0.02407024 0 0.5050505 Private 12th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +38 0.422222227 0.125406057 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +78 0.8666667 0.143233851 0.4375 0 0 0.1010101 Self-emp-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.0213779844 0.6875 0 0 0.5555556 Self-emp-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +39 0.433333337 0.335948884 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +36 0.4 0.0242101979 0.25 0.07298073 0 0.454545468 Self-emp-not-inc 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +46 0.51111114 0.109493807 0.875 0 0 0.5050505 Local-gov Masters Divorced Prof-specialty Unmarried White Female Canada 0 +30 0.333333343 0.08005698 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male United-States 1 +34 0.377777785 0.1391583 0.625 0 0 0.353535354 Private Some-college Never-married Sales Unmarried White Male United-States 0 +30 0.333333343 0.2849482 0.5625 0 0 0.353535354 Federal-gov HS-grad Separated Adm-clerical Other-relative Black Male United-States 0 +47 0.5222222 0.129289657 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 1 +40 0.444444448 0.150827274 0.625 0 0 0.171717167 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +62 0.6888889 0.08705164 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +44 0.4888889 0.131666556 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband Black Male Jamaica 0 +40 0.444444448 0.07717358 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative White Female Vietnam 0 +20 0.222222224 0.0802954137 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +45 0.5 0.162021413 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.134078488 0.8125 0.1502415 0 0.424242437 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.09704554 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +38 0.422222227 0.2415847 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +49 0.544444442 0.04015074 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.263746 0.8125 0.1502415 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.06825935 0.5625 0 0 0.262626261 Local-gov HS-grad Separated Other-service Unmarried White Female United-States 0 +20 0.222222224 0.07921978 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +34 0.377777785 0.155746773 0.3125 0 0 0.4040404 Private 9th Separated Farming-fishing Unmarried Black Male United-States 0 +42 0.466666669 0.0963464156 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Transport-moving Unmarried White Female United-States 0 +46 0.51111114 0.220149457 0.875 0 0.5544077 0.656565666 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.137159914 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +62 0.6888889 0.0596610121 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.1619965 0.625 0 0 0.7070707 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 +58 0.644444466 0.105508506 0.125 0 0 0.4040404 Local-gov 1st-4th Widowed Handlers-cleaners Unmarried Black Male United-States 0 +30 0.333333343 0.0965794548 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 +37 0.411111116 0.24615328 0.5625 0 0 0.7070707 Private HS-grad Separated Craft-repair Unmarried White Male Philippines 0 +22 0.244444445 0.178291321 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Tech-support Own-child White Female United-States 0 +64 0.7111111 0.150757223 0.3125 0 0 0.3838384 State-gov 9th Never-married Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.103976212 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +43 0.477777779 0.163346261 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.08390152 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.140923619 0.5625 0 0 0.0606060624 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +21 0.233333334 0.109266154 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +45 0.5 0.040591903 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +55 0.6111111 0.0517954752 0.75 0 0 0.5555556 Self-emp-not-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.09286424 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +70 0.7777778 0.234329388 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +27 0.3 0.09356539 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +34 0.377777785 0.3585756 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.02123789 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.0208613835 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +52 0.5777778 0.07900223 0.125 0 0 0.5050505 Private 1st-4th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.19888261 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.128500953 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.1658289 0.8125 0 0 0.4040404 Private Bachelors Never-married Machine-op-inspct Own-child Black Female United-States 0 +50 0.5555556 0.08808484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +36 0.4 0.1254202 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.118222818 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +40 0.444444448 0.13943848 0.5625 0.068490684 0 0.3838384 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.0556487665 0.8125 0 0 0.454545468 Federal-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +51 0.566666663 0.134496748 0.8125 0 0.453856736 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 +38 0.422222227 0.214780718 0.8125 0 0 0.5252525 State-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 0 +18 0.2 0.172428191 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +63 0.7 0.146638557 0.1875 0 0 0.0303030312 Self-emp-not-inc 5th-6th Never-married Sales Not-in-family White Female United-States 0 +50 0.5555556 0.138615415 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +82 0.9111111 0.161978975 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male Cuba 0 +33 0.366666675 0.103805132 0.5625 0 0 0.454545468 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 +37 0.411111116 0.0466429368 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male United-States 0 +24 0.266666681 0.224627122 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Transport-moving Own-child White Male Peru 0 +31 0.344444454 0.113504708 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Unmarried White Female United-States 0 +59 0.655555546 0.13037473 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Female United-States 0 +18 0.2 0.2875285 0.5 0 0 0.5555556 Private 12th Never-married Farming-fishing Own-child White Male United-States 0 +47 0.5222222 0.08878936 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +48 0.533333361 0.05364433 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.112501137 0.8125 0 0 0.333333343 Private Bachelors Never-married Prof-specialty Unmarried Other Female United-States 0 +34 0.377777785 0.0493020527 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Own-child Asian-Pac-Islander Male Philippines 0 +50 0.5555556 0.07682065 0.6875 0 0 0.8484849 Private Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 +57 0.6333333 0.0743696541 0.625 0 0 0.75757575 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +60 0.6666667 0.0224057976 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +39 0.433333337 0.104000457 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +56 0.622222245 0.104086 0.625 0 0 0.5050505 ? Some-college Divorced ? Unmarried White Female United-States 1 +18 0.2 0.0187107883 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child White Female United-States 0 +26 0.2888889 0.09625751 0.75 0 0 0.75757575 Private Assoc-acdm Married-civ-spouse Prof-specialty Wife White Female United-States 0 +37 0.411111116 0.12863633 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 +20 0.222222224 0.211774066 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 +29 0.322222233 0.184394211 0.875 0 0 0.454545468 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +30 0.333333343 0.117924437 0.5625 0 0 0.5252525 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +21 0.233333334 0.0428805724 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Male United-States 0 +24 0.266666681 0.130272344 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Female United-States 0 +51 0.566666663 0.0500267744 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.08258139 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +45 0.5 0.151852384 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.07873079 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.132666767 0.8125 0 0 0.727272749 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +20 0.222222224 0.07093126 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +46 0.51111114 0.07321253 0.625 0 0 0.6060606 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.11558862 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +39 0.433333337 0.261346877 0.5625 0 0 0.3838384 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +39 0.433333337 0.122282207 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +45 0.5 0.115073368 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +28 0.311111122 0.126273572 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +44 0.4888889 0.187054 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +48 0.533333361 0.332633078 0.5625 0.07298073 0 0.3838384 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +27 0.3 0.148685426 0.5625 0 0 0.7070707 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.141285986 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.06279025 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.2301528 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +25 0.2777778 0.159117132 0.9375 0 0 0.3030303 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 +21 0.233333334 0.08209644 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Black Female United-States 0 +18 0.2 0.214311942 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Male United-States 0 +63 0.7 0.07496843 0.25 0 0 0.1010101 Self-emp-not-inc 7th-8th Widowed Farming-fishing Unmarried White Female United-States 0 +18 0.2 0.133773372 0.4375 0 0 0.08080808 Private 11th Never-married Sales Own-child Black Female United-States 0 +32 0.355555564 0.13014774 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.07046114 0.4375 0 0 0.4040404 ? 11th Never-married ? Unmarried White Female United-States 0 +19 0.211111113 0.116095789 0.4375 0 0 0.2020202 Private 11th Never-married Transport-moving Own-child White Male United-States 0 +23 0.25555557 0.04063501 0.625 0 0 0.6060606 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +38 0.422222227 0.104106881 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 0 +36 0.4 0.129951075 0.875 0 0.453856736 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.09307169 0.5625 0 0.404499531 0.353535354 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 +45 0.5 0.1606831 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male England 1 +30 0.333333343 0.14014098 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Other Male Mexico 0 +46 0.51111114 0.122455306 0.5625 0.0406404063 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +24 0.266666681 0.191228569 0.625 0 0 0.25252524 Federal-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +42 0.466666669 0.0722540841 0.625 0 0.5610652 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 1 +23 0.25555557 0.0254481528 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +27 0.3 0.177511364 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +48 0.533333361 0.172046974 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +31 0.344444454 0.231881082 0.5625 0 0 0.444444448 Self-emp-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +31 0.344444454 0.04752998 0.125 0 0 0.25252524 Private 1st-4th Never-married Other-service Other-relative White Female El-Salvador 0 +18 0.2 0.08609589 0.5 0 0 0.25252524 Private 12th Never-married Sales Own-child White Female United-States 0 +36 0.4 0.124740608 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +58 0.644444466 0.08313841 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.0918175653 0.5625 0 0.3624885 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +22 0.244444445 0.12598598 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +72 0.8 0.11973355 0.375 0 0 0.151515156 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 +61 0.677777767 0.0459808521 0.375 0 0 0.5555556 Private 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +42 0.466666669 0.2861545 0.625 0.03908039 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.055130817 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Prof-specialty Unmarried Asian-Pac-Islander Female ? 0 +30 0.333333343 0.103420548 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.182792544 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 +20 0.222222224 0.133459508 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +65 0.722222269 0.31629315 0.8125 0 0 0.151515156 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.109981447 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 +37 0.411111116 0.199331865 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +33 0.366666675 0.0843797252 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +64 0.7111111 0.123166561 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Other-service Unmarried White Female United-States 0 +61 0.677777767 0.07514153 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +38 0.422222227 0.0230166949 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Unmarried White Female United-States 0 +27 0.3 0.123679116 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.13319616 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Female Philippines 0 +39 0.433333337 0.0666401759 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +44 0.4888889 0.138393819 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.13919197 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Other-relative White Female United-States 0 +73 0.811111152 0.128910452 0.9375 0 0 0.4040404 ? Prof-school Married-civ-spouse ? Husband White Male United-States 0 +66 0.733333349 0.16478762 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 0 +53 0.5888889 0.03192284 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +43 0.477777779 0.182339936 0.8125 0 0 0.5555556 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +57 0.6333333 0.0220205374 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.115346819 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Machine-op-inspct Own-child White Female United-States 0 +59 0.655555546 0.114488736 0.8125 0 0.459595948 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +52 0.5777778 0.146298423 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Widowed Other-service Other-relative Black Female United-States 0 +46 0.51111114 0.147052109 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +20 0.222222224 0.2604174 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +37 0.411111116 0.08482022 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +41 0.455555558 0.104914449 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +39 0.433333337 0.2913407 0.5625 0 0.373737365 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +30 0.333333343 0.0369965769 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +59 0.655555546 0.109204188 0.625 0 0 0.565656543 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +22 0.244444445 0.172764286 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.109178595 0.5625 0 0 0.3030303 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +39 0.433333337 0.06944814 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +24 0.266666681 0.153303191 0.375 0 0 0.5858586 Private 10th Divorced Handlers-cleaners Unmarried White Female United-States 0 +63 0.7 0.119010851 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.148190379 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 +34 0.377777785 0.1636581 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +38 0.422222227 0.126521438 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.08933492 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Female United-States 0 +20 0.222222224 0.07333915 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.13194339 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.0755577758 0.8125 0 0 0.121212125 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 +56 0.622222245 0.26397568 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +17 0.188888893 0.131679356 0.375 0 0 0.05050505 Private 10th Never-married Sales Own-child White Male United-States 0 +31 0.344444454 0.0295136068 0.8125 0.07688077 0 0.434343427 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +23 0.25555557 0.09792451 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 +33 0.366666675 0.125832409 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +36 0.4 0.06858804 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Not-in-family White Male United-States 0 +37 0.411111116 0.05542044 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male ? 0 +52 0.5777778 0.0670853853 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Own-child Black Female United-States 0 +28 0.311111122 0.143648744 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +59 0.655555546 0.285893828 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male ? 0 +30 0.333333343 0.118624911 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Other-relative Asian-Pac-Islander Male Vietnam 0 +32 0.355555564 0.0261311177 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.06860555 0.25 0 0 0.5050505 Private 7th-8th Never-married Craft-repair Not-in-family White Male United-States 0 +53 0.5888889 0.058703918 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +54 0.6 0.138119027 0.375 0 0 0.363636374 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.0383436456 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family Black Male ? 0 +34 0.377777785 0.01705524 0.8125 0 0.5369605 0.4040404 Private Bachelors Married-spouse-absent Machine-op-inspct Not-in-family Asian-Pac-Islander Male ? 0 +31 0.344444454 0.0592373572 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Not-in-family Amer-Indian-Eskimo Female United-States 0 +34 0.377777785 0.1011339 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +58 0.644444466 0.09569309 0.5625 0.04787048 0 0.3939394 Private HS-grad Divorced Tech-support Not-in-family White Male United-States 1 +30 0.333333343 0.0755294859 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +53 0.5888889 0.1005028 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Puerto-Rico 0 +27 0.3 0.127954036 0.625 0 0 0.2020202 Private Some-college Divorced Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.07354929 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +24 0.266666681 0.128166884 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.127570122 0.8125 0 0.453856736 0.353535354 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.288455278 0.5625 0 0 0.353535354 Federal-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +22 0.244444445 0.09038294 0.625 0 0 0.1010101 State-gov Some-college Never-married Tech-support Own-child White Female United-States 0 +47 0.5222222 0.113295913 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.186780542 0.75 0 0.43663913 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband Black Male United-States 1 +44 0.4888889 0.212917715 0.9375 0 0 0.4040404 Federal-gov Prof-school Divorced Prof-specialty Unmarried White Male United-States 1 +41 0.455555558 0.0722540841 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 +45 0.5 0.07574097 0.5625 0 0 0.04040404 ? HS-grad Separated ? Not-in-family Asian-Pac-Islander Male United-States 0 +24 0.266666681 0.23365517 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 +65 0.722222269 0.07073257 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +45 0.5 0.21375291 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +23 0.25555557 0.127309471 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +54 0.6 0.093068324 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +40 0.444444448 0.2019344 0.4375 0 0 0.373737365 Private 11th Never-married Machine-op-inspct Not-in-family White Female Dominican-Republic 0 +45 0.5 0.178542539 0.1875 0 0 0.353535354 Private 5th-6th Divorced Priv-house-serv Unmarried White Female Mexico 0 +50 0.5555556 0.125173688 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.124371514 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Other-service Other-relative White Male United-States 0 +24 0.266666681 0.134905592 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +42 0.466666669 0.07901839 0.5625 0 0.3838384 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.0424326733 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +58 0.644444466 0.07202913 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Craft-repair Unmarried White Male United-States 0 +47 0.5222222 0.0355592519 0.625 0 0 0.464646459 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.0345280729 1 0 0 1 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male France 1 +37 0.411111116 0.276768118 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 +22 0.244444445 0.07111985 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Transport-moving Not-in-family White Male United-States 0 +29 0.322222233 0.123358518 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +45 0.5 0.141382977 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male India 1 +49 0.544444442 0.18579112 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +44 0.4888889 0.162895 0.6875 0.04386044 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 +72 0.8 0.0601459555 0.5625 0 0 0.161616161 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +63 0.7 0.07183111 0.5625 0 0 0.121212125 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +26 0.2888889 0.0393519253 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +58 0.644444466 0.08211194 0.6875 0 0 0.424242437 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.114992544 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +56 0.622222245 0.173472181 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +55 0.6111111 0.0346863531 0.625 0 0 0.727272749 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +28 0.311111122 0.131339222 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Other-relative White Female United-States 0 +57 0.6333333 0.07324082 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +37 0.411111116 0.124579631 0.875 0 0 0.454545468 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 1 +44 0.4888889 0.10562031 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.0332220867 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +42 0.466666669 0.08198127 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male Germany 0 +18 0.2 0.115899123 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +57 0.6333333 0.220852628 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.145476714 0.625 0 0 0.353535354 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +38 0.422222227 0.14202553 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.2174661 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +42 0.466666669 0.178956762 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Unmarried White Female United-States 0 +70 0.7777778 0.0181786958 0.5625 0 0 0.6060606 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +50 0.5555556 0.11981909 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.127370089 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.206660584 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male Nicaragua 0 +72 0.8 0.0263419338 0.4375 0 0 0.08080808 Federal-gov 11th Divorced Adm-clerical Not-in-family White Female Canada 0 +33 0.366666675 0.104717776 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +47 0.5222222 0.09146801 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 0 +48 0.533333361 0.0793753639 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +64 0.7111111 0.2285444 0.8125 0 0 0.24242425 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.214737609 0.4375 0 0 0.353535354 Private 11th Never-married Priv-house-serv Not-in-family White Female United-States 0 +48 0.533333361 0.117729791 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +37 0.411111116 0.1375876 0.5625 0 0.4242424 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +55 0.6111111 0.1228931 0.5625 0.1502415 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.1306118 0.875 0 0 0.454545468 Private Masters Never-married Priv-house-serv Not-in-family White Female ? 0 +42 0.466666669 0.0616068542 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.0719065443 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female Canada 1 +34 0.377777785 0.253033429 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Own-child Black Female United-States 0 +55 0.6111111 0.149938881 0.875 0 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +22 0.244444445 0.12862353 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +39 0.433333337 0.0517052226 0.625 0 0 0.6060606 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +50 0.5555556 0.136793509 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.109238535 0.625 0 0.4331956 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +25 0.2777778 0.163486347 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Own-child White Female United-States 0 +52 0.5777778 0.170932278 0.4375 0 0 0.2020202 Private 11th Divorced Other-service Unmarried White Female United-States 0 +30 0.333333343 0.138782457 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.122282207 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +73 0.811111152 0.0545468628 0.5625 0 0 0.2020202 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.135234281 0.25 0 0 0.6060606 Private 7th-8th Divorced Craft-repair Not-in-family White Male United-States 0 +34 0.377777785 0.0286898743 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +24 0.266666681 0.3128581 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family Black Male ? 0 +66 0.733333349 0.1385622 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.300490677 0.5625 0 0 0.5555556 Private HS-grad Never-married Sales Own-child White Male United-States 0 +69 0.7666667 0.0217464082 0.375 0 0 0.25252524 Local-gov 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +23 0.25555557 0.0382392481 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +55 0.6111111 0.2075281 0.8125 0 0 0.4040404 Private Bachelors Widowed Machine-op-inspct Unmarried White Female ? 0 +35 0.3888889 0.118729986 0.625 0 0 0.3030303 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 +20 0.222222224 0.0695606247 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +70 0.7777778 0.152070612 0.625 0 0 0.2020202 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.104214646 0.6875 0.07688077 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +34 0.377777785 0.100991778 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Asian-Pac-Islander Male Japan 0 +38 0.422222227 0.0149827749 1 0 0 0.454545468 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.06267642 0.25 0 0 0.4040404 Private 7th-8th Divorced Handlers-cleaners Own-child White Male United-States 0 +43 0.477777779 0.1822059 0.5625 0 0 0.262626261 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +60 0.6666667 0.08299157 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +81 0.900000036 0.08349066 0.8125 0 0.382920116 0.0303030312 Self-emp-not-inc Bachelors Widowed Prof-specialty Not-in-family White Female Hungary 0 +32 0.355555564 0.069806464 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.106248043 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +46 0.51111114 0.103780217 0.875 0 0 0.25252524 Self-emp-not-inc Masters Never-married Exec-managerial Not-in-family White Male United-States 0 +30 0.333333343 0.0155162141 0.625 0 0 0.8484849 State-gov Some-college Never-married Other-service Own-child Amer-Indian-Eskimo Male United-States 0 +23 0.25555557 0.152818918 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Other-relative Asian-Pac-Islander Female South 0 +29 0.322222233 0.0336955823 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +51 0.566666663 0.09311682 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.2490899 0.25 0 0 0.25252524 Private 7th-8th Never-married Handlers-cleaners Other-relative White Male United-States 0 +36 0.4 0.0298806839 0.5625 0 0 0.363636374 Federal-gov HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +23 0.25555557 0.1553871 0.625 0 0 0.222222224 Private Some-college Never-married Handlers-cleaners Own-child Black Male United-States 0 +35 0.3888889 0.0283180848 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.037946932 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.105081484 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.110078432 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +27 0.3 0.05741949 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +38 0.422222227 0.126227766 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.104481362 0.6875 0 0.383149683 0.4040404 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 +25 0.2777778 0.267146 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 1 +45 0.5 0.122794092 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.03542522 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +66 0.733333349 0.175193727 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +65 0.722222269 0.09669935 0.625 0 0 0.4040404 Local-gov Some-college Never-married Prof-specialty Not-in-family Black Female United-States 0 +30 0.333333343 0.108192541 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 1 +54 0.6 0.0201447438 0.4375 0 0 0.434343427 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 +49 0.544444442 0.06345705 0.5 0 0 0.4040404 Private 12th Divorced Machine-op-inspct Not-in-family White Female United-States 0 +41 0.455555558 0.102370508 0.6875 0 0 0.151515156 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +48 0.533333361 0.126679033 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +23 0.25555557 0.147130236 0.1875 0 0 0.121212125 Private 5th-6th Never-married Priv-house-serv Unmarried White Female Mexico 0 +77 0.8555556 0.1588026 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Husband White Male Cuba 0 +19 0.211111113 0.0664138645 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +30 0.333333343 0.126892552 0.5625 0 0 0.3030303 Private HS-grad Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 +41 0.455555558 0.09454067 0.8125 0 0.43663913 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.13669382 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male Iran 1 +20 0.222222224 0.146975324 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +66 0.733333349 0.1332359 0.8125 0.106051058 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.0990109146 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Female Puerto-Rico 0 +52 0.5777778 0.0932825059 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.03887035 0.875 0 0 0.353535354 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +50 0.5555556 0.11445035 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.04870328 0.4375 0 0 0.656565666 Private 11th Never-married Transport-moving Not-in-family White Male United-States 0 +19 0.211111113 0.115039691 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +39 0.433333337 0.1448739 0.4375 0 0 0.3030303 Private 11th Never-married Prof-specialty Unmarried White Female Puerto-Rico 0 +45 0.5 0.323779464 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male ? 0 +61 0.677777767 0.0233258456 0.8125 0 0 0.3030303 Local-gov Bachelors Divorced Other-service Not-in-family White Male United-States 0 +45 0.5 0.09474205 0.75 0 0 0.5555556 Private Assoc-acdm Divorced Transport-moving Not-in-family White Male United-States 0 +36 0.4 0.1197935 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Own-child White Male United-States 0 +40 0.444444448 0.108014055 0.875 0 0.5544077 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.0869546458 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +52 0.5777778 0.187594175 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 +29 0.322222233 0.08416016 0.6875 0 0 0.424242437 Federal-gov Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +33 0.366666675 0.0425566025 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +40 0.444444448 0.111682124 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 +34 0.377777785 0.1674299 0.5625 0 0 0.5555556 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +46 0.51111114 0.152805448 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Protective-serv Not-in-family Black Male United-States 1 +44 0.4888889 0.180316627 0.875 0.1502415 0 0.454545468 Private Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.0406592563 0.5625 0 0 0.13131313 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +44 0.4888889 0.0903344452 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +40 0.444444448 0.06441616 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 +20 0.222222224 0.08894225 0.625 0 0 0.02020202 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +24 0.266666681 0.09346503 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Handlers-cleaners Own-child White Male United-States 0 +76 0.844444454 0.137340412 0.5625 0 0 0.171717167 Private HS-grad Widowed Other-service Not-in-family White Male United-States 0 +20 0.222222224 0.07405646 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Other-relative White Male United-States 0 +33 0.366666675 0.104923874 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 +31 0.344444454 0.0332712568 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +33 0.366666675 0.107296064 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +19 0.211111113 0.167264879 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +29 0.322222233 0.128334582 0.8125 0 0.365013778 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +30 0.333333343 0.1236744 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +48 0.533333361 0.017153576 0.875 1 0 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 1 +42 0.466666669 0.135713831 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.035172645 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +54 0.6 0.06496914 0.5625 0.07688077 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.219136462 0.75 0.07688077 0 0.424242437 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 +28 0.311111122 0.118560255 0.5625 0 0 0.282828271 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family White Female United-States 0 +42 0.466666669 0.1792511 0.625 0 0 0.5252525 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +60 0.6666667 0.130835414 0.875 0.03103031 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 +76 0.844444454 0.111022055 0.5625 0 0 0.25252524 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +21 0.233333334 0.244622335 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Own-child White Female United-States 0 +29 0.322222233 0.0211220421 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +43 0.477777779 0.0427714624 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.106158465 0.5625 0 0 0.3838384 Private HS-grad Divorced Sales Own-child White Male United-States 0 +45 0.5 0.108201295 0.8125 0.0468704663 0 0.353535354 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 1 +38 0.422222227 0.244759068 0.625 0 0 0.4040404 Private Some-college Never-married Sales Unmarried Black Female United-States 0 +28 0.311111122 0.227907911 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +29 0.322222233 0.0589497574 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +20 0.222222224 0.189070553 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +49 0.544444442 0.08053115 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.115499042 0.625 0 0 0.565656543 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +40 0.444444448 0.0331709 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.2233117 0.5 0 0 0.3030303 Private 12th Never-married Adm-clerical Own-child White Female United-States 0 +45 0.5 0.117481925 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.124001063 0.625 0 0 0.282828271 Private Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 +29 0.322222233 0.0255491845 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried Black Female United-States 0 +57 0.6333333 0.196354836 0.8125 0.04386044 0 0.13131313 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.253529161 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +20 0.222222224 0.177551776 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female Haiti 0 +23 0.25555557 0.153209567 0.5625 0 0 0.24242425 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +39 0.433333337 0.128714457 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +34 0.377777785 0.0240074638 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.15309304 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 +25 0.2777778 0.126293108 0.625 0 0 0.4040404 State-gov Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +40 0.444444448 0.124184944 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male Puerto-Rico 0 +52 0.5777778 0.128195837 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +48 0.533333361 0.104648404 0.5625 0 0 0.363636374 Private HS-grad Widowed Machine-op-inspct Unmarried White Female United-States 0 +37 0.411111116 0.175039485 0.6875 0 0 0.0606060624 Private Assoc-voc Never-married Sales Unmarried Black Female United-States 0 +36 0.4 0.146208853 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.06977548 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.126783431 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +24 0.266666681 0.2377644 0.8125 0 0 0.1010101 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +42 0.466666669 0.04758858 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +35 0.3888889 0.0436948761 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Never-married Sales Own-child White Male United-States 0 +40 0.444444448 0.1476657 0.5625 0 0 0.222222224 Federal-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +50 0.5555556 0.07061942 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 +40 0.444444448 0.116918854 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.277709037 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Other-relative Black Male ? 0 +57 0.6333333 0.131901622 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +51 0.566666663 0.114890836 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +61 0.677777767 0.155280009 0.5625 0 0 0.353535354 Federal-gov HS-grad Never-married Adm-clerical Unmarried White Female Puerto-Rico 0 +71 0.788888931 0.109312624 0.5625 0 0 0.2020202 Private HS-grad Widowed Sales Unmarried White Female United-States 0 +47 0.5222222 0.1141971 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.07915916 0.8125 0 0 0.454545468 Private Bachelors Never-married Other-service Other-relative White Female United-States 0 +25 0.2777778 0.184464931 0.8125 0 0 0.656565666 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +33 0.366666675 0.3563698 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +40 0.444444448 0.307205826 0.4375 0 0 0.5252525 State-gov 11th Divorced Transport-moving Unmarried White Female United-States 0 +39 0.433333337 0.121820837 0.4375 0 0 0.4040404 ? 11th Never-married ? Not-in-family Black Female United-States 0 +29 0.322222233 0.114703596 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +33 0.366666675 0.0375273228 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +46 0.51111114 0.111928634 0.625 0 0 0.363636374 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +24 0.266666681 0.03518679 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 1 +28 0.311111122 0.151295379 0.875 0 0 0.3030303 Private Masters Never-married Exec-managerial Not-in-family Other Male Cuba 0 +20 0.222222224 0.133357808 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +34 0.377777785 0.0310795754 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Unmarried White Female United-States 0 +34 0.377777785 0.121822856 0.8125 0 0 0.5555556 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +25 0.2777778 0.142998785 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +36 0.4 0.156848669 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +61 0.677777767 0.1185414 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.1192971 0.625 0 0 0.5858586 Private Some-college Separated Other-service Not-in-family White Female United-States 0 +57 0.6333333 0.20162794 0.5625 0 0.3946281 0.25252524 Private HS-grad Widowed Other-service Other-relative White Female United-States 0 +20 0.222222224 0.219992533 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Female United-States 0 +56 0.622222245 0.08744902 0.5625 0 0 0.1010101 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +24 0.266666681 0.151892126 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +60 0.6666667 0.09810973 0.625 0 0 0.4848485 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +37 0.411111116 0.102218285 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +27 0.3 0.123609066 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +54 0.6 0.173683658 0.625 0 0 0.282828271 Private Some-college Separated Other-service Not-in-family White Male Columbia 0 +40 0.444444448 0.0491848551 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 +18 0.2 0.111491509 0.5 0 0 0.151515156 Private 12th Never-married Other-service Own-child White Male United-States 0 +51 0.566666663 0.0943184048 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +40 0.444444448 0.2190058 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +64 0.7111111 0.109062746 0.5625 0 0 0.08080808 Federal-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +24 0.266666681 0.110234022 0.5625 0.0217402168 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +33 0.366666675 0.07202643 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Tech-support Wife Black Female United-States 0 +31 0.344444454 0.06563795 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +26 0.2888889 0.16330786 0.5625 0.03103031 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +54 0.6 0.10455478 0.8125 0.14084141 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 1 +31 0.344444454 0.167476371 0.125 0 0 0.373737365 Private 1st-4th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 +39 0.433333337 0.03994935 0.5 0 0 0.454545468 Private 12th Married-spouse-absent Transport-moving Not-in-family Black Male ? 0 +22 0.244444445 0.0951684043 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +31 0.344444454 0.153111234 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +68 0.75555557 0.08328456 0.1875 0 0 0.121212125 Private 5th-6th Separated Other-service Not-in-family White Male Italy 0 +59 0.655555546 0.118755579 0.375 0 0 0.373737365 Federal-gov 10th Divorced Other-service Not-in-family White Female United-States 0 +35 0.3888889 0.05196049 0.5625 0.0282902829 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.113910846 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +23 0.25555557 0.12084084 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +35 0.3888889 0.121328481 0.625 0 0 0.6060606 Private Some-college Divorced Exec-managerial Unmarried White Male United-States 0 +17 0.188888893 0.120777532 0.375 0 0 0.3030303 State-gov 10th Never-married Other-service Own-child White Male United-States 0 +19 0.211111113 0.03082498 0.625 0 0 0.454545468 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +53 0.5888889 0.102922805 0.875 0 0.453856736 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +59 0.655555546 0.1441714 0.1875 0 0 0.4040404 Private 5th-6th Divorced Machine-op-inspct Unmarried White Female United-States 0 +37 0.411111116 0.1354754 0.5625 0 0 0.373737365 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +74 0.822222233 0.02936543 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Widowed Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.197033077 0.625 0 0 0.5050505 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +40 0.444444448 0.0553382672 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +30 0.333333343 0.121678047 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Craft-repair Not-in-family White Male ? 0 +20 0.222222224 0.122158952 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Male United-States 0 +80 0.8888889 0.100102715 0.9375 0 0 0.353535354 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.05684564 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +17 0.188888893 0.09653837 0.375 0 0 0.151515156 Private 10th Never-married Sales Own-child White Male United-States 0 +37 0.411111116 0.0328543372 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +19 0.211111113 0.118201934 0.5625 0 0 0.24242425 ? HS-grad Never-married ? Own-child Black Female United-States 0 +58 0.644444466 0.0562684163 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +57 0.6333333 0.1445533 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.107789092 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +23 0.25555557 0.0266739856 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Craft-repair Unmarried Amer-Indian-Eskimo Male United-States 0 +36 0.4 0.122306451 0.8125 0 0 0.323232323 Private Bachelors Never-married Adm-clerical Not-in-family White Female Columbia 0 +33 0.366666675 0.176136672 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.0198840853 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 +30 0.333333343 0.0244762432 0.5625 0 0 0.24242425 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +41 0.455555558 0.2161938 0.9375 1 0 0.656565666 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +57 0.6333333 0.271855354 0.625 0 0 0.6060606 ? Some-college Married-civ-spouse ? Husband Asian-Pac-Islander Male United-States 1 +23 0.25555557 0.08240425 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +40 0.444444448 0.07125591 0.9375 0.14084141 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 +53 0.5888889 0.102971971 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family Black Female United-States 0 +31 0.344444454 0.0828696638 0.625 0 0 0.13131313 State-gov Some-college Never-married Tech-support Not-in-family White Male United-States 0 +41 0.455555558 0.228787541 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Husband White Male Mexico 0 +36 0.4 0.122633114 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 +30 0.333333343 0.167432591 0.5 0 0 0.4040404 Private 12th Divorced Other-service Not-in-family White Female United-States 0 +44 0.4888889 0.1263443 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male Canada 0 +36 0.4 0.0314581022 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +42 0.466666669 0.128166884 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.166561037 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male Peru 0 +22 0.244444445 0.07932822 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +38 0.422222227 0.08190314 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.304265171 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.0726023 0.5625 0.0217402168 0 0.4040404 Private HS-grad Divorced Other-service Own-child White Male United-States 0 +35 0.3888889 0.228848159 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +21 0.233333334 0.12499588 0.625 0 0 0.434343427 Private Some-college Never-married Sales Own-child White Male United-States 0 +26 0.2888889 0.17553252 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.0358455069 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +43 0.477777779 0.144031316 0.5625 0 0 0.424242437 Private HS-grad Married-AF-spouse Craft-repair Wife Black Female United-States 1 +33 0.366666675 0.143615067 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.0394569971 0.8125 0 0 0.1010101 Private Bachelors Never-married Craft-repair Own-child White Male United-States 0 +52 0.5777778 0.130070284 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +38 0.422222227 0.13565658 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.128325164 0.8125 0 0 0.464646459 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +57 0.6333333 0.0931397155 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Other-service Husband White Male Iran 0 +51 0.566666663 0.07539478 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.07360183 0.3125 0 0 0.4848485 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +32 0.355555564 0.223302945 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male China 1 +32 0.355555564 0.267221451 0.8125 0 0.5544077 0.4848485 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.08531998 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +69 0.7666667 0.23507835 0.5625 0 0 0.333333343 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.06610404 0.625 0 0 0.3030303 ? Some-college Divorced ? Unmarried Amer-Indian-Eskimo Male United-States 0 +37 0.411111116 0.158213928 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male Germany 1 +36 0.4 0.06781212 0.625 0.0246302467 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +47 0.5222222 0.178551972 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +63 0.7 0.159882948 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +21 0.233333334 0.03016963 0.625 0 0 0.656565666 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +17 0.188888893 0.182488784 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Other-relative White Male Mexico 0 +56 0.622222245 0.130411088 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried White Male United-States 0 +90 1 0.126455426 0.75 0 0 0.2020202 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 0 +27 0.3 0.107885405 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.458266139 0.5625 0 0 0.2020202 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +33 0.366666675 0.06482433 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +26 0.2888889 0.02344102 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +20 0.222222224 0.114562154 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 +42 0.466666669 0.156134054 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +55 0.6111111 0.016022712 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +32 0.355555564 0.295487 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Prof-specialty Wife Black Female United-States 0 +66 0.733333349 0.114368849 0.8125 0.200512 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +66 0.733333349 0.253589779 1 0.0327303261 0 0.4040404 Local-gov Doctorate Divorced Prof-specialty Not-in-family White Female United-States 0 +49 0.544444442 0.0193917323 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +34 0.377777785 0.109660842 0.5625 0 0 0.454545468 Private HS-grad Divorced Protective-serv Not-in-family Black Male United-States 0 +38 0.422222227 0.0391377434 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.06885274 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +22 0.244444445 0.140856937 0.75 0 0 0.2020202 Federal-gov Assoc-acdm Never-married Other-service Own-child White Male United-States 0 +46 0.51111114 0.105823718 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.116430536 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.020069981 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 +71 0.788888931 0.154524982 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +37 0.411111116 0.05434076 0.8125 0.0115101151 0 0.353535354 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +52 0.5777778 0.160947129 0.875 0 0 0.323232323 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +27 0.3 0.1276092 0.875 0 0 0.464646459 Private Masters Never-married Adm-clerical Not-in-family White Female United-States 0 +52 0.5777778 0.09385501 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Wife White Female United-States 0 +31 0.344444454 0.126697227 0.5625 0.04101041 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +37 0.411111116 0.07484854 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.0549200028 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +25 0.2777778 0.17347689 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +31 0.344444454 0.04007261 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +29 0.322222233 0.0201885235 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.0691026151 0.5625 0 0 0.353535354 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +69 0.7666667 0.0278971251 0.25 0 0 0.2020202 Private 7th-8th Married-civ-spouse Other-service Husband White Male United-States 0 +50 0.5555556 0.07985762 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +54 0.6 0.210746914 1 0 0 0.464646459 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male England 1 +17 0.188888893 0.112002052 0.3125 0 0 0.2020202 Private 9th Never-married Other-service Own-child White Female United-States 0 +34 0.377777785 0.107941307 0.5625 0.14084141 0 0.353535354 Private HS-grad Never-married Tech-support Own-child Asian-Pac-Islander Male China 1 +32 0.355555564 0.07869173 0.5625 0 0 0.05050505 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female ? 0 +23 0.25555557 0.136778682 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +66 0.733333349 0.135513112 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +61 0.677777767 0.184415758 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.105608188 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Female United-States 0 +24 0.266666681 0.191213742 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +30 0.333333343 0.1006045 0.5625 0.0115101151 0 0.3030303 Private HS-grad Divorced Sales Unmarried White Male United-States 0 +49 0.544444442 0.105695076 0.6875 0 0 0.454545468 Private Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 1 +21 0.233333334 0.110399708 0.625 0 0 0.0303030312 ? Some-college Never-married ? Own-child White Female United-States 0 +56 0.622222245 0.111726575 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +25 0.2777778 0.058511287 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +49 0.544444442 0.112832516 0.8125 0 0 0.4040404 Private Bachelors Divorced Protective-serv Not-in-family White Male United-States 0 +58 0.644444466 0.104364172 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +40 0.444444448 0.115329981 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Adm-clerical Not-in-family White Male Puerto-Rico 0 +62 0.6888889 0.164970815 0.875 0 0 0.454545468 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +54 0.6 0.1730364 0.8125 0 0 0.25252524 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +34 0.377777785 0.02252434 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Never-married Other-service Other-relative White Female United-States 0 +18 0.2 0.08496099 0.375 0 0 0.3030303 Private 10th Never-married Craft-repair Own-child White Male United-States 0 +28 0.311111122 0.180656761 0.4375 0 0 0.4040404 ? 11th Never-married ? Not-in-family Black Female United-States 0 +32 0.355555564 0.112551652 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male Hong 0 +22 0.244444445 0.0337205045 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +34 0.377777785 0.170087 0.8125 0 0 0.4848485 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +53 0.5888889 0.134481266 0.8125 0 0 0.3030303 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +47 0.5222222 0.2314123 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 +19 0.211111113 0.12852183 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +41 0.455555558 0.101763651 0.625 0 0.5544077 0.5555556 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.125829712 0.625 0.0501305 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +56 0.622222245 0.141934589 0.25 0 0 0.2020202 Self-emp-not-inc 7th-8th Divorced Sales Other-relative White Male Mexico 0 +42 0.466666669 0.08339435 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Female United-States 0 +25 0.2777778 0.0519099757 0.8125 0 0.5369605 0.353535354 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +42 0.466666669 0.07751372 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +43 0.477777779 0.11485447 0.8125 0.143441439 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 +17 0.188888893 0.141407892 0.4375 0 0.3677686 0.121212125 Private 11th Never-married Sales Own-child White Female United-States 0 +57 0.6333333 0.0231002122 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.121899642 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.0224724784 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Other-service Not-in-family White Female Canada 0 +20 0.222222224 0.133192793 0.625 0 0 0.161616161 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +47 0.5222222 0.121607326 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +40 0.444444448 0.0525188521 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +44 0.4888889 0.107292026 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female ? 1 +48 0.533333361 0.06354259 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.02302141 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 +46 0.51111114 0.247356221 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 +72 0.8 0.11612206 0.9375 1 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.20439212 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.148358762 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +40 0.444444448 0.03037169 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male Canada 0 +34 0.377777785 0.06850452 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Not-in-family Asian-Pac-Islander Male United-States 0 +41 0.455555558 0.147902116 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +41 0.455555558 0.05160958 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.230752245 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +42 0.466666669 0.08476162 0.125 0 0 0.6060606 Self-emp-inc 1st-4th Married-civ-spouse Sales Husband White Male ? 0 +54 0.6 0.1604743 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +39 0.433333337 0.1389185 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +37 0.411111116 0.116232522 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +59 0.655555546 0.06409691 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Sales Husband White Male United-States 0 +69 0.7666667 0.09509027 0.1875 0.01797018 0 0.4040404 Private 5th-6th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +24 0.266666681 0.1804015 0.8125 0 0 0.353535354 Private Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 +36 0.4 0.122167036 0.6875 0.03103031 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +21 0.233333334 0.139948338 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 +68 0.75555557 0.06948249 0.5625 0 0 0.323232323 ? HS-grad Widowed ? Not-in-family White Male United-States 0 +20 0.222222224 0.08912209 0.625 0 0 0.4040404 Private Some-college Separated Craft-repair Not-in-family White Male United-States 0 +26 0.2888889 0.135473385 0.6875 0 0 0.353535354 Self-emp-not-inc Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 +48 0.533333361 0.161013812 0.5 0 0 0.5050505 Private 12th Widowed Handlers-cleaners Unmarried White Female United-States 0 +39 0.433333337 0.161483258 0.9375 0 0.43663913 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.118718535 0.75 0 0 0.181818187 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 +22 0.244444445 0.178310171 0.5625 0 0 0.424242437 Private HS-grad Never-married Exec-managerial Other-relative White Female Germany 0 +34 0.377777785 0.122730106 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +33 0.366666675 0.214845374 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.145932019 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Guatemala 0 +47 0.5222222 0.184683159 0.4375 0.07298073 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 +65 0.722222269 0.101094157 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.129977345 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +28 0.311111122 0.0458144881 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +34 0.377777785 0.0192415323 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 1 +20 0.222222224 0.07749486 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.09400386 0.4375 0 0 0.4040404 Private 11th Never-married Adm-clerical Not-in-family White Male United-States 0 +52 0.5777778 0.0932825059 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +40 0.444444448 0.1228931 0.875 0 0 0.3838384 State-gov Masters Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female China 1 +22 0.244444445 0.170613021 0.8125 0 0 0.07070707 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +29 0.322222233 0.08813603 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.262520164 0.25 0 0 0.6060606 Self-emp-not-inc 7th-8th Married-civ-spouse Prof-specialty Husband White Male United-States 0 +42 0.466666669 0.0355498232 0.875 0 0.43663913 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.09845592 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried Black Female United-States 0 +22 0.244444445 0.155622169 0.4375 0 0 0.7070707 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +21 0.233333334 0.09831179 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +43 0.477777779 0.325620234 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Exec-managerial Husband White Male Mexico 0 +43 0.477777779 0.133572668 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.10817907 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +17 0.188888893 0.219013885 0.375 0 0 0.353535354 Self-emp-inc 10th Never-married Other-service Own-child Black Male United-States 0 +54 0.6 0.116452768 0.9375 0.05178052 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.125596 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +55 0.6111111 0.193282172 0.375 0 0 0.454545468 Local-gov 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.07539478 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +65 0.722222269 0.218958646 0.375 0 0 0.4040404 Federal-gov 10th Divorced Craft-repair Unmarried White Male United-States 0 +21 0.233333334 0.096707426 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Female United-States 0 +40 0.444444448 0.207466811 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried Black Female United-States 0 +58 0.644444466 0.07076153 0.625 0 0 0.373737365 Private Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 +53 0.5888889 0.0267009269 0.5625 0 0 0.5858586 Federal-gov HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 +39 0.433333337 0.125406057 0.875 0 0.4242424 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +56 0.622222245 0.180347621 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +37 0.411111116 0.0837156251 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +44 0.4888889 0.02442977 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.09662458 0.3125 0 0 0.3838384 Private 9th Separated Handlers-cleaners Own-child White Male United-States 0 +36 0.4 0.12553066 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male United-States 1 +59 0.655555546 0.03557744 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.07039042 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +36 0.4 0.124237478 0.9375 0.2782828 0 0.5050505 Private Prof-school Never-married Exec-managerial Not-in-family White Male United-States 1 +26 0.2888889 0.129522026 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +22 0.244444445 0.105625026 0.375 0 0.404499531 0.25252524 Private 10th Never-married Sales Not-in-family White Female United-States 0 +25 0.2777778 0.144414544 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Own-child White Male United-States 0 +28 0.311111122 0.0731283352 0.625 0 0 0.151515156 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +41 0.455555558 0.150827274 0.75 0 0 0.3838384 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +45 0.5 0.1350834 0.6875 0 0 0.7070707 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +43 0.477777779 0.09276052 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +30 0.333333343 0.176248491 0.3125 0 0 0.4040404 Private 9th Never-married Handlers-cleaners Unmarried Black Male United-States 0 +33 0.366666675 0.09182363 0.5625 0 0 0.5050505 Private HS-grad Married-spouse-absent Craft-repair Unmarried White Male United-States 0 +34 0.377777785 0.222261667 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +21 0.233333334 0.0618432648 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 +31 0.344444454 0.1354626 0.8125 0 0.43663913 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +48 0.533333361 0.212448269 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 0 +22 0.244444445 0.0695606247 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +47 0.5222222 0.159496337 0.625 0 0 0.6060606 Private Some-college Divorced Sales Unmarried White Female United-States 0 +27 0.3 0.0504362844 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family Asian-Pac-Islander Female Philippines 0 +18 0.2 0.07775484 0.4375 0 0 0.25252524 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +43 0.477777779 0.1013858 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.0294341315 0.625 0 0 0.2020202 Private Some-college Widowed Sales Not-in-family White Female United-States 0 +37 0.411111116 0.282246649 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +24 0.266666681 0.123656891 0.6875 0 0 0.2020202 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 +24 0.266666681 0.26291284 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +38 0.422222227 0.0249133669 0.8125 0.03908039 0 0.7070707 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 +48 0.533333361 0.166965827 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +75 0.8333334 0.128945485 0.125 0 0 0.161616161 Private 1st-4th Married-civ-spouse Other-service Other-relative Black Female United-States 0 +43 0.477777779 0.02257755 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 +64 0.7111111 0.0310411844 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +67 0.7444445 0.0870125741 1 0.200512 0 0.05050505 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 +36 0.4 0.240333274 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +53 0.5888889 0.106920905 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +22 0.244444445 0.103268325 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Not-in-family Black Male United-States 0 +73 0.811111152 0.08782283 0.5625 0 0 0.363636374 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.116934344 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.24441421 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.123093143 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.03394412 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 +43 0.477777779 0.06850452 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Handlers-cleaners Not-in-family Asian-Pac-Islander Male United-States 0 +21 0.233333334 0.136437878 0.5 0 0 0.4848485 Private 12th Never-married Adm-clerical Other-relative Black Male ? 0 +40 0.444444448 0.09809963 0.5625 0 0 0.25252524 Private HS-grad Separated Sales Unmarried Black Female United-States 0 +36 0.4 0.0918317139 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +64 0.7111111 0.09575371 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Divorced Sales Not-in-family White Male United-States 0 +19 0.211111113 0.162996024 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +46 0.51111114 0.08559883 0.625 0.05178052 0 0.3838384 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.0835661 0.875 0 0 0.656565666 Local-gov Masters Divorced Exec-managerial Unmarried White Female United-States 1 +41 0.455555558 0.128219411 0.8125 0 0 0.7070707 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +29 0.322222233 0.013331268 0.625 0 0 0.08080808 ? Some-college Divorced ? Unmarried White Female United-States 0 +28 0.311111122 0.0455720164 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative White Female United-States 0 +23 0.25555557 0.04194638 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.198699415 0.8125 0 0 0.6060606 Federal-gov Bachelors Never-married Protective-serv Not-in-family White Female United-States 1 +44 0.4888889 0.137331665 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Adm-clerical Not-in-family White Female Cuba 0 +27 0.3 0.178698123 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +25 0.2777778 0.107498124 0.5625 0 0 0.343434334 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +29 0.322222233 0.09047656 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.08285215 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Poland 1 +27 0.3 0.185197741 0.8125 0 0 0.656565666 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 +34 0.377777785 0.0446614 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.04948525 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.0179638378 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Other-relative Amer-Indian-Eskimo Female United-States 0 +56 0.622222245 0.2405313 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +35 0.3888889 0.124371514 0.5625 0 0 0.6262626 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.0373757742 0.6875 0 0 0.3030303 ? Assoc-voc Never-married ? Not-in-family Amer-Indian-Eskimo Female United-States 0 +23 0.25555557 0.118047692 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +19 0.211111113 0.126629874 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Black Female United-States 0 +42 0.466666669 0.0587887838 0.9375 0.07298073 0 0.353535354 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.222324982 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.03837463 0.5625 0 0 0.8484849 Self-emp-inc HS-grad Divorced Sales Unmarried Asian-Pac-Islander Female ? 0 +27 0.3 0.101047009 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male Puerto-Rico 0 +22 0.244444445 0.127434745 0.75 0 0 0.151515156 ? Assoc-acdm Never-married ? Other-relative White Male United-States 0 +49 0.544444442 0.222855046 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.09215568 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +24 0.266666681 0.135501 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +34 0.377777785 0.218665659 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Asian-Pac-Islander Male China 0 +25 0.2777778 0.24665305 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Transport-moving Own-child White Male United-States 0 +33 0.366666675 0.06995329 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.07186613 0.75 0 0 0.272727281 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 +54 0.6 0.110161282 0.5625 0 0 0.3030303 Local-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.192806661 0.875 0 0 0.4040404 Self-emp-inc Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +25 0.2777778 0.08290064 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +75 0.8333334 0.084324494 0.5625 0 0 0.262626261 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +28 0.311111122 0.187291756 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Machine-op-inspct Other-relative Black Male United-States 0 +50 0.5555556 0.0902287 0.8125 0 0 0.5050505 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 +62 0.6888889 0.04813549 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.0515166335 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +58 0.644444466 0.144974932 0.8125 0 0 0.373737365 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.08566348 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 0 +21 0.233333334 0.121047616 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Other-relative White Female United-States 0 +40 0.444444448 0.0598832779 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.230345428 0.6875 0 0.43663913 0.424242437 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.117153242 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.231881082 0.5625 0 0 0.7070707 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +23 0.25555557 0.101342022 0.5625 0 0 0.4040404 Private HS-grad Never-married Priv-house-serv Unmarried Other Female Guatemala 0 +43 0.477777779 0.141135111 0.875 0.105201051 0 0.5050505 Local-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 1 +42 0.466666669 0.1358674 0.625 0 0 0.4040404 Local-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +39 0.433333337 0.231342927 0.8125 0.1502415 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male Japan 1 +52 0.5777778 0.05212618 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +21 0.233333334 0.115279466 0.625 0 0 0.353535354 ? Some-college Never-married ? Not-in-family White Female United-States 0 +56 0.622222245 0.2405313 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +48 0.533333361 0.112984739 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +37 0.411111116 0.2376782 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family Asian-Pac-Islander Female South 1 +25 0.2777778 0.03448564 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.246504188 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Own-child White Male United-States 1 +34 0.377777785 0.269693971 0.4375 0 0 0.454545468 Private 11th Never-married Machine-op-inspct Own-child Black Male United-States 0 +52 0.5777778 0.0212385636 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +41 0.455555558 0.07200084 0.8125 0 0.43663913 0.424242437 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +36 0.4 0.1295456 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Not-in-family White Male United-States 0 +21 0.233333334 0.07995663 0.6875 0 0.3452709 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 +28 0.311111122 0.203174368 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +31 0.344444454 0.0977716148 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 +20 0.222222224 0.0593559 0.625 0 0 0.09090909 Private Some-college Never-married Adm-clerical Own-child White Male England 0 +68 0.75555557 0.11114464 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male Italy 1 +35 0.3888889 0.160531551 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.577577353 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Male United-States 0 +64 0.7111111 0.0905082151 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.175655767 0.375 0 0 0.232323229 Private 10th Never-married Handlers-cleaners Own-child White Female United-States 0 +25 0.2777778 0.09346301 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +74 0.822222233 0.172878787 0.5625 0 0 0.25252524 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +31 0.344444454 0.166662067 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male Columbia 0 +51 0.566666663 0.305827081 1 0.07298073 0 0.4040404 State-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +67 0.7444445 0.121599242 0.5625 0 0 0.1010101 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.267626226 0.5625 0.0332503319 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +29 0.322222233 0.07217596 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +31 0.344444454 0.1764822 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +21 0.233333334 0.08838793 0.5625 0 0 0.373737365 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +67 0.7444445 0.184852213 0.375 0 0 0.161616161 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +41 0.455555558 0.246504188 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Protective-serv Not-in-family White Male United-States 1 +27 0.3 0.1377479 0.8125 0 0 0.363636374 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +51 0.566666663 0.06689275 0.5 0 0 0.5050505 Private 12th Divorced Transport-moving Unmarried White Male United-States 0 +21 0.233333334 0.139206782 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Wife White Female United-States 0 +28 0.311111122 0.180996224 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.18548803 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +28 0.311111122 0.2581806 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +29 0.322222233 0.08541899 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +39 0.433333337 0.1133929 0.5625 0 0 0.7070707 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +21 0.233333334 0.109561831 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male Columbia 0 +43 0.477777779 0.2514998 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.184926972 0.5625 0.143441439 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 +28 0.311111122 0.167953908 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.0751442239 0.3125 0 0 0.434343427 Private 9th Never-married Sales Not-in-family White Male United-States 1 +18 0.2 0.14582561 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Own-child White Male United-States 0 +27 0.3 0.09819055 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Wife Amer-Indian-Eskimo Female United-States 0 +34 0.377777785 0.140982226 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +25 0.2777778 0.174785569 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 +34 0.377777785 0.232611865 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male England 0 +43 0.477777779 0.133424491 0.5625 0.07688077 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.0223115031 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.138986543 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +25 0.2777778 1 0.625 0 0 0.25252524 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +21 0.233333334 0.0177880451 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.148784444 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Never-married Transport-moving Own-child White Male United-States 0 +49 0.544444442 0.03008746 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.026011901 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +36 0.4 0.05997151 0.4375 0 0 0.474747479 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.24931553 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Unmarried Black Female United-States 0 +23 0.25555557 0.140732333 0.625 0 0 0.323232323 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +21 0.233333334 0.08838793 0.625 0 0 0.1010101 Private Some-college Never-married Sales Own-child White Male United-States 0 +25 0.2777778 0.0406531952 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +26 0.2888889 0.2363116 0.1875 0 0 0.4040404 Private 5th-6th Never-married Transport-moving Not-in-family White Male ? 0 +24 0.266666681 0.141295418 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 +22 0.244444445 0.237051815 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Unmarried White Female United-States 0 +26 0.2888889 0.09569646 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female Mexico 0 +22 0.244444445 0.110981643 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Unmarried White Male Guatemala 0 +41 0.455555558 0.0322340131 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +18 0.2 0.272165179 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +24 0.266666681 0.147287175 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 +38 0.422222227 0.124371514 0.5625 0 0.399449021 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.216716453 0.8125 0 0 0.171717167 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.124872617 0.875 0 0 0.5555556 Local-gov Masters Divorced Prof-specialty Own-child White Female United-States 0 +38 0.422222227 0.2756103 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +38 0.422222227 0.0269932412 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.0213779844 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +53 0.5888889 0.157419831 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Adm-clerical Not-in-family Black Male United-States 0 +32 0.355555564 0.1293449 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +17 0.188888893 0.1499409 0.4375 0 0 0.3030303 Private 11th Never-married Sales Own-child Black Female United-States 0 +45 0.5 0.143897951 0.8125 0.07298073 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.130760655 0.5625 0 0 0.4848485 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +47 0.5222222 0.0540726967 1 0 0 0.454545468 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +27 0.3 0.112042464 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +61 0.677777767 0.0408438034 0.625 0 0 0.3030303 Federal-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +33 0.366666675 0.08407529 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +67 0.7444445 0.07101613 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Other-relative White Female United-States 0 +38 0.422222227 0.0574147739 0.8125 0 0 0.4040404 Private Bachelors Separated Craft-repair Not-in-family White Male United-States 0 +25 0.2777778 0.08118448 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +33 0.366666675 0.181587592 0.1875 0 0 0.4040404 Local-gov 5th-6th Never-married Other-service Unmarried Other Female El-Salvador 0 +27 0.3 0.1668419 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +45 0.5 0.2565641 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.189412042 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Other-relative Asian-Pac-Islander Female Taiwan 0 +23 0.25555557 0.1816435 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 +48 0.533333361 0.122420281 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +61 0.677777767 0.0921307653 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +22 0.244444445 0.07266225 0.5625 0 0 0.2020202 Private HS-grad Never-married Prof-specialty Own-child White Female United-States 0 +34 0.377777785 0.116237909 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Unmarried White Female United-States 0 +32 0.355555564 0.0201609079 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +35 0.3888889 0.02620386 0.625 0 0 0.5050505 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.113710135 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 +24 0.266666681 0.285601526 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Unmarried White Male United-States 0 +60 0.6666667 0.07914636 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.132666767 0.8125 0 0 0.434343427 ? Bachelors Never-married ? Not-in-family White Female United-States 0 +64 0.7111111 0.0468274839 0.5625 0 0 0.2020202 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +22 0.244444445 0.251980036 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Unmarried White Female United-States 0 +27 0.3 0.1912252 0.1875 0 0 0.656565666 Private 5th-6th Never-married Priv-house-serv Not-in-family White Female England 0 +36 0.4 0.09918334 0.625 0 0 0.6060606 State-gov Some-college Divorced Transport-moving Not-in-family White Male United-States 0 +27 0.3 0.0942295 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 +52 0.5777778 0.07608178 0.625 0 0 0.4040404 Private Some-college Widowed Sales Not-in-family White Female United-States 0 +57 0.6333333 0.177912787 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +23 0.25555557 0.17256695 0.625 0 0 0.24242425 Private Some-college Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male Vietnam 0 +29 0.322222233 0.09599146 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.189837039 0.5625 0 0 0.8080808 Private HS-grad Never-married Transport-moving Not-in-family Black Male United-States 0 +38 0.422222227 0.256308824 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +50 0.5555556 0.1376718 0.5625 0 0 0.8484849 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +50 0.5555556 0.129455343 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +51 0.566666663 0.134036735 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +17 0.188888893 0.041650027 0.375 0 0 0.4040404 Self-emp-inc 10th Never-married Craft-repair Own-child White Male United-States 0 +25 0.2777778 0.141506225 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Handlers-cleaners Not-in-family White Female Mexico 0 +19 0.211111113 0.12618804 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.0218568668 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.09467807 0.625 0.14084141 0 0.6060606 Private Some-college Separated Sales Not-in-family White Male United-States 1 +39 0.433333337 0.0589719862 0.875 0.068490684 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +18 0.2 0.0535076 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Own-child White Male Mexico 0 +27 0.3 0.14320825 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Own-child White Female United-States 0 +39 0.433333337 0.0219909 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Farming-fishing Not-in-family White Male United-States 0 +44 0.4888889 0.08450231 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +19 0.211111113 0.148088008 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +32 0.355555564 0.1391583 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Own-child White Male United-States 0 +48 0.533333361 0.06822837 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.019826835 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +65 0.722222269 0.05870796 0.4375 0 0 0.2020202 Private 11th Widowed Sales Other-relative White Female United-States 0 +57 0.6333333 0.0984054059 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.114045553 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Unmarried Black Female Haiti 0 +46 0.51111114 0.0931969658 0.25 0 0.379017442 0.4040404 Private 7th-8th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 +27 0.3 0.01988476 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +29 0.322222233 0.2584655 0.625 0 0.3409091 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +21 0.233333334 0.166413531 0.5625 0 0 0.25252524 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +20 0.222222224 0.1353582 0.625 0 0 0.121212125 ? Some-college Never-married ? Own-child White Female United-States 0 +51 0.566666663 0.118531965 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +35 0.3888889 0.127570122 0.625 0 0.399449021 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.180278912 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +30 0.333333343 0.123206973 0.625 0.1502415 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +65 0.722222269 0.164246768 0.5625 0 0 0.151515156 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +20 0.222222224 0.0293573476 0.5625 0 0 0.353535354 ? HS-grad Married-spouse-absent ? Not-in-family White Female United-States 0 +47 0.5222222 0.0211078972 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +41 0.455555558 0.137860388 0.5625 0.0217402168 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male Japan 0 +17 0.188888893 0.04926568 0.3125 0 0 0.161616161 Private 9th Never-married Craft-repair Own-child White Female United-States 0 +38 0.422222227 0.146954447 0.1875 0 0 0.4040404 Local-gov 5th-6th Married-civ-spouse Handlers-cleaners Other-relative White Male Mexico 0 +38 0.422222227 0.150357813 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.06285357 0.5625 0 0 0.04040404 Self-emp-not-inc HS-grad Never-married Sales Other-relative White Female United-States 0 +24 0.266666681 0.142991379 0.5625 0 0 0.3838384 ? HS-grad Separated ? Not-in-family White Female United-States 0 +52 0.5777778 0.126190722 0.375 0 0 0.414141417 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +46 0.51111114 0.148737967 0.625 0 0 0.5858586 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.142358929 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +56 0.622222245 0.09038496 0.875 0 0 0.5050505 Private Masters Never-married Sales Not-in-family White Male United-States 0 +37 0.411111116 0.146998227 0.4375 0 0 0.3030303 Self-emp-not-inc 11th Divorced Prof-specialty Unmarried Black Female United-States 0 +59 0.655555546 0.04763236 0.8125 0 0 0.5555556 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 +19 0.211111113 0.230607435 0.4375 0 0.488751143 0.5555556 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Own-child White Male United-States 0 +31 0.344444454 0.15984118 0.3125 0 0 0.454545468 Private 9th Never-married Craft-repair Not-in-family Other Male United-States 0 +22 0.244444445 0.242310092 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family Asian-Pac-Islander Male Philippines 0 +48 0.533333361 0.122420281 1 0 0 0.6060606 Self-emp-not-inc Doctorate Never-married Prof-specialty Unmarried White Female United-States 1 +63 0.7 0.179901734 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.1496735 0.5625 0.07298073 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +53 0.5888889 0.03713802 0.5625 0 0 0.1010101 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +38 0.422222227 0.148337215 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male ? 1 +39 0.433333337 0.06807615 0.75 0 0 0.24242425 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +59 0.655555546 0.0470692851 0.9375 0 0 0.5050505 Private Prof-school Married-spouse-absent Prof-specialty Unmarried White Male United-States 0 +45 0.5 0.135465965 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +39 0.433333337 0.110953353 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +60 0.6666667 0.08718702 0.5625 0 0 0.353535354 State-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.0221168511 0.8125 0 0 0.565656543 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +31 0.344444454 0.1347857 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +61 0.677777767 0.147627309 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +66 0.733333349 0.1271916 0.8125 0 0 0.24242425 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +26 0.2888889 0.183651969 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Not-in-family Asian-Pac-Islander Male South 0 +60 0.6666667 0.226434216 0.9375 0 0.5544077 0.8080808 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +68 0.75555557 0.128839061 0.25 0 0 0.151515156 ? 7th-8th Widowed ? Not-in-family White Female United-States 0 +32 0.355555564 0.118666671 0.625 0 0 0.6060606 Private Some-college Divorced Exec-managerial Other-relative White Male United-States 0 +25 0.2777778 0.133176625 0.8125 0 0 0.2020202 Local-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +43 0.477777779 0.0975129753 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male ? 0 +26 0.2888889 0.089831315 0.8125 0 0 0.444444448 ? Bachelors Never-married ? Own-child White Male United-States 0 +55 0.6111111 0.13295503 0.875 1 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +66 0.733333349 0.0579307 0.375 0 0 0.111111112 Private 10th Widowed Transport-moving Not-in-family White Female United-States 0 +31 0.344444454 0.154153854 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.126230463 0.1875 0 0 0.5050505 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male ? 0 +58 0.644444466 0.07607235 0.9375 0.2782828 0 0.4040404 Self-emp-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 +56 0.622222245 0.06624953 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 +22 0.244444445 0.08700179 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Male United-States 0 +46 0.51111114 0.212974966 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +33 0.366666675 0.152642444 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +26 0.2888889 0.121832959 0.875 0 0 0.3030303 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +42 0.466666669 0.0466981679 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +45 0.5 0.143880442 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +43 0.477777779 0.132953689 0.625 0 0 0.0606060624 Private Some-college Married-civ-spouse Prof-specialty Wife Other Female Puerto-Rico 0 +19 0.211111113 0.150634646 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male ? 0 +27 0.3 0.121178955 0.8125 0 0 1 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +51 0.566666663 0.228937745 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.07607976 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +43 0.477777779 0.284121782 0.625 0.07298073 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male Mexico 1 +38 0.422222227 0.126623809 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +44 0.4888889 0.0520729721 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.156224981 0.5625 0 0 0.646464646 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +37 0.411111116 0.02499419 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Philippines 0 +29 0.322222233 0.05346988 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +53 0.5888889 0.0902287 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +42 0.466666669 0.119846709 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-spouse-absent Exec-managerial Not-in-family White Male Poland 0 +80 0.8888889 0.116850153 0.625 0 0 0.2020202 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +61 0.677777767 0.123495914 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +55 0.6111111 0.09967569 0.625 0.0501305 0 0.5252525 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.195287287 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +23 0.25555557 0.04194638 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +48 0.533333361 0.0743965954 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.199206576 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +71 0.788888931 0.06739588 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +49 0.544444442 0.131313637 0.4375 0 0 0.0606060624 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 +39 0.433333337 0.153294429 0.5625 0 0 0.5050505 Federal-gov HS-grad Never-married Armed-Forces Not-in-family White Male United-States 0 +22 0.244444445 0.0792117 0.8125 0 0 0.25252524 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +67 0.7444445 0.0301568322 0.8125 0 0 0.4040404 Federal-gov Bachelors Widowed Adm-clerical Not-in-family White Female United-States 0 +18 0.2 0.119652055 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child White Female United-States 0 +38 0.422222227 0.116232522 0.8125 0 0.4242424 0.545454562 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.137052149 0.25 0 0 0.454545468 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +50 0.5555556 0.103677839 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +56 0.622222245 0.0570982136 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Farming-fishing Wife White Female United-States 0 +23 0.25555557 0.105830453 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +26 0.2888889 0.115030259 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.1892834 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +44 0.4888889 0.137240067 0.8125 0.105201051 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 1 +27 0.3 0.112753041 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Farming-fishing Own-child White Female Mexico 0 +40 0.444444448 0.126918152 0.625 0.07298073 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +43 0.477777779 0.261903226 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +31 0.344444454 0.119214259 0.625 0 0 0.353535354 State-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +57 0.6333333 0.134919733 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +25 0.2777778 0.107967578 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +22 0.244444445 0.159414843 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Other-service Own-child Black Female United-States 0 +20 0.222222224 0.1668978 0.6875 0 0 0.353535354 Local-gov Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +27 0.3 0.180052608 0.5625 0.0346403457 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +39 0.433333337 0.188246161 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female Mexico 0 +27 0.3 0.1890059 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +41 0.455555558 0.167310014 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Transport-moving Own-child White Male United-States 0 +31 0.344444454 0.152551517 0.8125 0 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +41 0.455555558 0.148487419 0.75 0 0 0.2020202 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.0729552358 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +29 0.322222233 0.0991819948 0.75 0 0 0.4040404 State-gov Assoc-acdm Never-married Prof-specialty Not-in-family Black Male United-States 1 +22 0.244444445 0.0743386745 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Own-child White Male United-States 0 +62 0.6888889 0.07682335 0.25 0 0 0.9191919 Private 7th-8th Married-civ-spouse Protective-serv Husband White Male United-States 0 +29 0.322222233 0.020988008 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Exec-managerial Not-in-family Other Female United-States 0 +44 0.4888889 0.0713017061 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +32 0.355555564 0.2708208 0.8125 0 0 0.02020202 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 +19 0.211111113 0.286553234 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +20 0.222222224 0.092476286 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Unmarried White Female United-States 0 +65 0.722222269 0.220037654 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +24 0.266666681 0.185284629 0.5625 0 0 0.363636374 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 +37 0.411111116 0.07577061 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.117525704 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Tech-support Not-in-family Black Female United-States 0 +38 0.422222227 0.077345334 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Wife White Female United-States 1 +28 0.311111122 0.09287906 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 +33 0.366666675 0.103152484 0.5625 0.04416044 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +32 0.355555564 0.0908503756 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +38 0.422222227 0.130541086 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.160188735 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 +42 0.466666669 0.0684263855 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.111082 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +41 0.455555558 0.11733038 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Unmarried White Male United-States 0 +47 0.5222222 0.0243610684 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.09703679 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.121814772 0.625 0 0 0.08080808 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 +54 0.6 0.149467409 0.625 0 0 0.5050505 Private Some-college Widowed Craft-repair Unmarried White Female United-States 0 +40 0.444444448 0.01811269 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +21 0.233333334 0.236467183 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.06553895 0.8125 0 0 0.25252524 Private Bachelors Divorced Craft-repair Unmarried White Female United-States 0 +30 0.333333343 0.124622062 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.122946315 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.145075962 0.5625 0 0 0.373737365 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +37 0.411111116 0.125569731 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 1 +41 0.455555558 0.1467773 0.3125 0 0 0.4040404 ? 9th Married-civ-spouse ? Wife Asian-Pac-Islander Female Hong 0 +52 0.5777778 0.233492851 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Own-child White Female United-States 0 +57 0.6333333 0.278137416 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +48 0.533333361 0.112486318 0.625 0 0 0.4848485 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +58 0.644444466 0.212836891 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.14565587 0.3125 0 0 0.5050505 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.230237663 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +30 0.333333343 0.114393771 0.5625 0 0 0.25252524 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +26 0.2888889 0.135165572 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male Outlying-US(Guam-USVI-etc) 0 +46 0.51111114 0.307775617 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +26 0.2888889 0.185946032 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +50 0.5555556 0.0651018247 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Prof-specialty Unmarried Black Female United-States 0 +22 0.244444445 0.252112716 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +36 0.4 0.07476098 0.875 0 0 0.4040404 Private Masters Widowed Tech-support Unmarried Asian-Pac-Islander Female India 0 +30 0.333333343 0.0358892865 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +58 0.644444466 0.07046046 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.204294458 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child White Male United-States 0 +72 0.8 0.200760424 0.6875 0.06723067 0 0.25252524 Private Assoc-voc Separated Other-service Unmarried White Female United-States 0 +19 0.211111113 0.214737609 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.252627969 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Wife White Female Mexico 0 +20 0.222222224 0.156798154 0.5625 0 0 0.25252524 ? HS-grad Never-married ? Own-child Black Female United-States 0 +30 0.333333343 0.142015427 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.143964633 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Divorced Other-service Unmarried White Female United-States 0 +51 0.566666663 0.1377021 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.214813054 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +24 0.266666681 0.159887657 0.625 0 0 0.424242437 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +44 0.4888889 0.123006932 0.875 0 0 0.24242425 Private Masters Divorced Sales Not-in-family White Male Iran 0 +43 0.477777779 0.0975129753 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.07891534 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +51 0.566666663 0.160052 0.5625 0.07298073 0 0.5050505 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +41 0.455555558 0.115544841 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.1113366 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Other Female United-States 0 +39 0.433333337 0.028413726 0.5625 0.0346403457 0 0.2020202 State-gov HS-grad Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female United-States 0 +54 0.6 0.191925 0.375 0 0 0.434343427 Private 10th Separated Sales Unmarried White Female Italy 0 +62 0.6888889 0.06472599 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +45 0.5 0.133871034 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.153489083 0.5625 0 0 0.353535354 Private HS-grad Never-married Exec-managerial Own-child Black Female Jamaica 0 +32 0.355555564 0.263940662 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.124179557 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Other-service Not-in-family White Female United-States 0 +84 0.933333337 0.09149225 0.6875 0 0 0.141414136 Local-gov Assoc-voc Widowed Adm-clerical Not-in-family White Female United-States 0 +46 0.51111114 0.131135821 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +67 0.7444445 0.230466664 0.875 0.0200902 0 0.4040404 Local-gov Masters Divorced Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.045273643 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.138176948 0.6875 0 0 0.5555556 Private Assoc-voc Never-married Exec-managerial Not-in-family White Male United-States 1 +23 0.25555557 0.2926285 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +63 0.7 0.07418983 0.5625 0 0 0.5555556 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +55 0.6111111 0.08310203 0.5625 0 0.459366381 0.4040404 ? HS-grad Separated ? Not-in-family Black Female United-States 0 +42 0.466666669 0.272493869 0.9375 0 0 0.4040404 State-gov Prof-school Divorced Prof-specialty Unmarried White Female United-States 0 +17 0.188888893 0.06699109 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child Amer-Indian-Eskimo Female United-States 0 +60 0.6666667 0.11470966 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.134628087 0.5 0 0 0.4040404 Private 12th Divorced Transport-moving Own-child White Male United-States 0 +28 0.311111122 0.0471703149 0.25 0 0 0.4040404 Private 7th-8th Never-married Adm-clerical Own-child White Male Portugal 0 +31 0.344444454 0.264939517 0.3125 0 0 0.4848485 Private 9th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +65 0.722222269 0.167739049 0.8125 0.106051058 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +31 0.344444454 0.04891881 0.8125 0.14084141 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +61 0.677777767 0.150287777 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family Black Female United-States 0 +43 0.477777779 0.233022049 0.9375 0 0 0.5050505 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.131689459 0.625 0 0 0.4949495 State-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +39 0.433333337 0.173732832 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +37 0.411111116 0.181382835 0.625 0 0 0.272727281 Local-gov Some-college Married-spouse-absent Adm-clerical Unmarried Black Female United-States 0 +47 0.5222222 0.09251265 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 +45 0.5 0.15693152 0.625 0 0 0.656565666 Federal-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +30 0.333333343 0.0520413145 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.110587627 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Never-married Prof-specialty Own-child White Male United-States 0 +49 0.544444442 0.103411794 0.625 0.14084141 0 0.444444448 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 1 +51 0.566666663 0.0180722773 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.126689136 0.8125 0 0 0.727272749 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +48 0.533333361 0.24888581 0.8125 0 0 0.25252524 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +20 0.222222224 0.07476098 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +32 0.355555564 0.138176948 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.110385567 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried Black Female United-States 0 +19 0.211111113 0.241550341 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +50 0.5555556 0.124842308 0.875 0 0 0.353535354 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 0 +33 0.366666675 0.226348668 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.03166353 0.8125 0 0 0.2020202 ? Bachelors Never-married ? Own-child White Male United-States 0 +49 0.544444442 0.100995824 0.5625 0 0.430670351 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.04007261 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +23 0.25555557 0.02219296 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +44 0.4888889 0.07402952 1 0.1502415 0 0.323232323 Private Doctorate Married-civ-spouse Exec-managerial Wife White Female United-States 1 +24 0.266666681 0.134407178 0.6875 0 0 0.05050505 Private Assoc-voc Never-married Sales Unmarried White Male United-States 0 +28 0.311111122 0.0614930242 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 +56 0.622222245 0.06692171 0.5625 0 0.371212125 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +38 0.422222227 0.163371846 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +20 0.222222224 0.19289422 0.625 0.0217602178 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +82 0.9111111 0.08949253 0.5625 0 1 0.181818187 Private HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 +52 0.5777778 0.0151060317 0.8125 0 0 0.6060606 Federal-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +32 0.355555564 0.161075771 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 +37 0.411111116 0.114880063 0.6875 0 0 0.323232323 Private Assoc-voc Separated Prof-specialty Unmarried White Female United-States 0 +36 0.4 0.116886519 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.192648381 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +30 0.333333343 0.04909191 0.5625 0.03411034 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Own-child Asian-Pac-Islander Male United-States 0 +49 0.544444442 0.109940358 0.5625 0 0 0.565656543 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +40 0.444444448 0.111622177 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Exec-managerial Unmarried White Female United-States 0 +42 0.466666669 0.04718446 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.124371514 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +39 0.433333337 0.0942315161 0.5625 0 0 0.8181818 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +32 0.355555564 0.133501947 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 +22 0.244444445 0.09869974 0.4375 0 0 0.5050505 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 +53 0.5888889 0.0891113058 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.128588513 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +17 0.188888893 0.159810871 0.375 0 0 0.3030303 Never-worked 10th Never-married ? Own-child White Male United-States 0 +44 0.4888889 0.509096444 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +52 0.5777778 0.08575104 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.204957888 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +34 0.377777785 0.124564812 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +27 0.3 0.180499837 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.126878411 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +39 0.433333337 0.148890853 0.875 0.07688077 0 0.3838384 State-gov Masters Married-civ-spouse Prof-specialty Other-relative Other Female United-States 1 +26 0.2888889 0.2295318 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +48 0.533333361 0.0948215351 0.875 0 0.43663913 0.3838384 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 +57 0.6333333 0.113875151 0.5625 0 0 0.282828271 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +36 0.4 0.101767018 0.6875 0 0 0.4848485 Self-emp-not-inc Assoc-voc Separated Exec-managerial Not-in-family White Male United-States 0 +27 0.3 0.08279221 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +17 0.188888893 0.101798676 0.4375 0 0 0.151515156 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +30 0.333333343 0.09203916 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +37 0.411111116 0.119407564 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Adm-clerical Wife Black Female United-States 1 +31 0.344444454 0.08622319 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Sales Own-child White Female United-States 0 +23 0.25555557 0.134921074 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.168622047 0.375 0 0 0.454545468 Private 10th Never-married Craft-repair Other-relative White Male United-States 0 +58 0.644444466 0.128691554 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.0187619776 0.5625 0 0 0.08080808 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +44 0.4888889 0.352584541 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +39 0.433333337 0.173216239 0.8125 0 0.143480256 0.4040404 Federal-gov Bachelors Divorced Tech-support Unmarried Black Female United-States 0 +59 0.655555546 0.117776938 0.5625 0 0.3409091 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.13203229 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 +45 0.5 0.13502413 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +20 0.222222224 0.237889 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +35 0.3888889 0.150109291 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +50 0.5555556 0.149383888 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband Black Male United-States 0 +56 0.622222245 0.132763073 0.5625 0 0 0.282828271 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +48 0.533333361 0.107913695 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +58 0.644444466 0.185166076 0.875 0 0 0.151515156 Self-emp-not-inc Masters Widowed Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.23469983 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.07589588 0.625 0 0 0.121212125 Private Some-college Never-married Sales Own-child White Female United-States 0 +48 0.533333361 0.232929111 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +33 0.366666675 0.07097033 0.5625 0 0 0.7070707 Private HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 +48 0.533333361 0.232373446 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female Mexico 0 +55 0.6111111 0.131560817 0.5625 0.0220202189 0 0.353535354 Private HS-grad Widowed Other-service Not-in-family White Female Italy 0 +40 0.444444448 0.07325698 0.6875 0 0 0.4040404 Local-gov Assoc-voc Never-married Exec-managerial Unmarried Amer-Indian-Eskimo Female United-States 0 +50 0.5555556 0.09296258 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +52 0.5777778 0.117888071 0.375 0 0 0.353535354 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.127684623 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +55 0.6111111 0.09524384 0.375 0.07688077 0 0.5050505 Self-emp-not-inc 10th Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.125300989 0.9375 0 0 0.3030303 Self-emp-not-inc Prof-school Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.111291468 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Unmarried Asian-Pac-Islander Female Philippines 1 +22 0.244444445 0.07075008 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +44 0.4888889 0.155373633 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.232844234 0.5625 0 0.323232323 0.3838384 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.1674299 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +55 0.6111111 0.294240952 0.875 0.14084141 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 1 +35 0.3888889 0.134809941 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.2684877 0.4375 0 0 0.4040404 Private 11th Widowed Machine-op-inspct Not-in-family White Female United-States 0 +43 0.477777779 0.0768118948 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +29 0.322222233 0.11419373 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 +56 0.622222245 0.23159416 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 +33 0.366666675 0.109497845 0.8125 1 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.196387842 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.0917098 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Unmarried White Female United-States 0 +60 0.6666667 0.253338546 0.5625 0.1502415 0 0.151515156 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +48 0.533333361 0.203819618 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Other-service Husband White Male United-States 0 +65 0.722222269 0.161760077 0.4375 0 0 0.353535354 Local-gov 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.130094528 0.5625 0 0.323232323 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +42 0.466666669 0.167099863 0.5625 0 0.399449021 0.434343427 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +44 0.4888889 0.0803398639 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +73 0.811111152 0.202332452 0.625 0 0 0.0606060624 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +21 0.233333334 0.05580031 0.625 0 0 0.5050505 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +32 0.355555564 0.1085421 0.5625 0 0.43663913 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +43 0.477777779 0.193309784 0.875 0 0 0.353535354 Federal-gov Masters Married-civ-spouse Protective-serv Husband White Male United-States 1 +21 0.233333334 0.440586537 0.5625 0 0 0.323232323 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 +30 0.333333343 0.170165792 0.625 0 0 0.2020202 Private Some-college Separated Transport-moving Not-in-family White Male United-States 0 +54 0.6 0.115796745 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +19 0.211111113 0.148003817 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 +55 0.6111111 0.103581525 0.625 0 0 0.373737365 State-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +20 0.222222224 0.04084246 0.625 0 0 0.282828271 Private Some-college Never-married Sales Own-child White Female United-States 0 +53 0.5888889 0.06470107 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Greece 0 +51 0.566666663 0.11154674 0.875 0 0 0.5555556 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +33 0.366666675 0.107690081 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +62 0.6888889 0.074483484 0.625 0 0 0.4040404 Private Some-college Widowed Priv-house-serv Unmarried White Female United-States 0 +24 0.266666681 0.09635719 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Other-service Own-child White Male United-States 0 +17 0.188888893 0.2785449 0.3125 0 0 0.4040404 Self-emp-inc 9th Never-married Sales Own-child White Female United-States 0 +26 0.2888889 0.09271741 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.268693775 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.209983811 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Exec-managerial Wife White Female United-States 0 +58 0.644444466 0.0664946958 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.09487002 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +72 0.8 0.0655376 0.5625 0.0234602336 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Unmarried White Male ? 0 +26 0.2888889 0.237601414 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +45 0.5 0.0183093622 0.5625 0 0 0.3838384 ? HS-grad Widowed ? Unmarried White Female United-States 0 +72 0.8 0.159781918 0.6875 0 0 0.3030303 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 +60 0.6666667 0.0959746242 0.625 0.1502415 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.141653061 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male Guatemala 0 +38 0.422222227 0.131028056 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +37 0.411111116 0.0179820228 0.625 0 0.3409091 0.444444448 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.142137334 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +38 0.422222227 0.0726804361 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +29 0.322222233 0.09165255 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +19 0.211111113 0.124426737 0.5625 0 0.395087242 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.144600451 0.8125 0 0 0.25252524 Private Bachelors Never-married Handlers-cleaners Other-relative White Male United-States 0 +70 0.7777778 0.0993854 0.8125 0 0 0.07070707 ? Bachelors Divorced ? Not-in-family White Female United-States 0 +40 0.444444448 0.06317282 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.166379854 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Own-child White Male United-States 0 +43 0.477777779 0.191555232 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband Black Male United-States 0 +29 0.322222233 0.149509162 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +25 0.2777778 0.228972092 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 0 +29 0.322222233 0.108504385 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +60 0.6666667 0.150666967 0.125 0 0 0.3838384 Private 1st-4th Divorced Craft-repair Not-in-family Other Male Dominican-Republic 0 +31 0.344444454 0.15794383 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 +51 0.566666663 0.06533621 0.25 0 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +18 0.2 0.163409576 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +36 0.4 0.117826775 0.8125 0 0 0.2020202 Private Bachelors Divorced Tech-support Unmarried White Male United-States 0 +35 0.3888889 0.107846342 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 +48 0.533333361 0.130514145 0.8125 0 0 0.3838384 Private Bachelors Divorced Adm-clerical Own-child White Male United-States 1 +78 0.8666667 0.0401312038 0.25 0 0 0.25252524 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +72 0.8 0.106359854 0.8125 0 0 0.171717167 Private Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 +24 0.266666681 0.207586691 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +58 0.644444466 0.106759258 0.4375 0 0 0.161616161 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +36 0.4 0.135898381 0.4375 0.135501355 0 0.4040404 Private 11th Never-married Protective-serv Not-in-family Black Male United-States 1 +48 0.533333361 0.222582936 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +28 0.311111122 0.123982884 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.08310338 0.875 0 0 0.4040404 Private Masters Never-married Other-service Own-child White Female United-States 0 +29 0.322222233 0.222355291 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +47 0.5222222 0.1850334 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband Black Male Jamaica 0 +50 0.5555556 0.08733924 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 +35 0.3888889 0.138467908 0.1875 0 0 0.4040404 Federal-gov 5th-6th Never-married Craft-repair Not-in-family White Male Mexico 0 +17 0.188888893 0.220331311 0.4375 0 0 0.2020202 Private 11th Never-married Transport-moving Own-child White Male United-States 0 +41 0.455555558 0.152146056 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +37 0.411111116 0.151468471 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.0186993387 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband Amer-Indian-Eskimo Male United-States 0 +56 0.622222245 0.049628716 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Portugal 0 +23 0.25555557 0.07237263 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.0160779413 0.75 0 0 0.323232323 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 +79 0.8777778 0.208305359 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.3164696 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 +55 0.6111111 0.19278577 0.4375 0 0 0.2020202 Private 11th Divorced Sales Own-child White Female United-States 0 +59 0.655555546 0.125484869 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +22 0.244444445 0.0761511549 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +19 0.211111113 0.058024995 0.4375 0 0 0.1919192 Private 11th Never-married Sales Own-child Asian-Pac-Islander Female Philippines 0 +41 0.455555558 0.176491633 0.1875 0 0 0.353535354 Private 5th-6th Married-spouse-absent Farming-fishing Not-in-family White Male Mexico 0 +32 0.355555564 0.188071713 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male Italy 0 +67 0.7444445 0.127232686 0.25 0.02414024 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +45 0.5 0.123786211 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +61 0.677777767 0.228569314 0.1875 0 0 0.454545468 Private 5th-6th Married-civ-spouse Farming-fishing Other-relative White Female Mexico 0 +34 0.377777785 0.193800792 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +43 0.477777779 0.06681664 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.200342163 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +35 0.3888889 0.07643337 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +65 0.722222269 0.137429327 0.5625 0 0 0.2020202 Private HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 +24 0.266666681 0.0292226411 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male England 1 +37 0.411111116 0.06683685 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +34 0.377777785 0.2113073 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +42 0.466666669 0.06713724 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +18 0.2 0.114329115 0.25 0 0 0.4040404 Private 7th-8th Never-married Other-service Own-child White Female United-States 0 +43 0.477777779 0.0134127662 0.625 0 0 0.151515156 Federal-gov Some-college Widowed Exec-managerial Unmarried Amer-Indian-Eskimo Female United-States 0 +31 0.344444454 0.07647513 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 1 +19 0.211111113 0.151034042 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +40 0.444444448 0.0925214142 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male China 0 +32 0.355555564 0.177751139 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +47 0.5222222 0.189127132 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.137299329 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +46 0.51111114 0.0421268865 1 0 0 0.353535354 Self-emp-inc Doctorate Separated Prof-specialty Not-in-family White Male United-States 0 +40 0.444444448 0.132917985 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.06279025 0.8125 0 0 0.353535354 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.126328126 0.6875 0 0 0.363636374 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.04158604 0.1875 0 0 0.353535354 State-gov 5th-6th Never-married Transport-moving Not-in-family White Male United-States 0 +21 0.233333334 0.12571387 0.375 0 0 0.4040404 Private 10th Separated Machine-op-inspct Own-child White Male United-States 0 +40 0.444444448 0.116737671 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 +53 0.5888889 0.16624178 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.285601526 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child White Male United-States 0 +53 0.5888889 0.196507052 0.625 0 0 0.727272749 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +58 0.644444466 0.0706840754 0.3125 0 0 0.6060606 Private 9th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +51 0.566666663 0.0575353354 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.144294664 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +35 0.3888889 0.187668264 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.0184649471 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child Amer-Indian-Eskimo Male United-States 0 +31 0.344444454 0.0965794548 0.625 0 0 0.353535354 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.186843857 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Unmarried White Female United-States 0 +39 0.433333337 0.2268417 0.875 0 0 0.5555556 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.12400578 0.9375 0.1502415 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 +51 0.566666663 0.0502860844 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.266063631 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Own-child White Male United-States 0 +32 0.355555564 0.115319207 0.625 0 0 0.4848485 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 +56 0.622222245 0.08174149 0.8125 0 0 0.323232323 Private Bachelors Divorced Other-service Not-in-family White Female United-States 0 +35 0.3888889 0.2756103 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Protective-serv Not-in-family White Male United-States 0 +63 0.7 0.1811572 0.5 0 0 0.4040404 Private 12th Widowed Sales Unmarried White Female United-States 0 +61 0.677777767 0.09177715 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.09518591 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +52 0.5777778 0.0727976263 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.05537127 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +33 0.366666675 0.270048946 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.207777977 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 0 +35 0.3888889 0.125986651 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Female United-States 1 +38 0.422222227 0.0510714278 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 0 +23 0.25555557 0.27840212 0.8125 0 0 0.6060606 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.240160167 0.6875 0 0 0.6060606 Private Assoc-voc Divorced Tech-support Not-in-family White Male United-States 0 +20 0.222222224 0.150744423 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +19 0.211111113 0.1073028 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +47 0.5222222 0.168498129 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +59 0.655555546 0.0913427249 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.126183987 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +36 0.4 0.0728111 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +27 0.3 0.1720719 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Other-relative White Male Mexico 0 +24 0.266666681 0.0461889729 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.10504511 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child Black Female Jamaica 0 +22 0.244444445 0.1778818 0.625 0 0 0.3939394 State-gov Some-college Never-married Other-service Other-relative Black Male Haiti 0 +37 0.411111116 0.1130036 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.151814 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.134705544 0.5625 0 0 0.25252524 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +55 0.6111111 0.134609908 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +29 0.322222233 0.127813265 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Wife White Female United-States 0 +32 0.355555564 0.13002044 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +66 0.733333349 0.15007022 0.625 0 0 0.353535354 ? Some-college Divorced ? Other-relative White Female United-States 0 +47 0.5222222 0.109513342 0.625 0 0 0.454545468 Local-gov Some-college Married-spouse-absent Craft-repair Other-relative White Male United-States 0 +23 0.25555557 0.140651509 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +50 0.5555556 0.08095211 0.875 0 0 0.454545468 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +40 0.444444448 0.0183484256 0.5625 0 0 0.8484849 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +51 0.566666663 0.234456688 0.5625 0 0.365013778 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +34 0.377777785 0.124631494 0.5625 0 0.383149683 0.454545468 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.208254173 0.8125 0 0 0.4040404 Private Bachelors Never-married Protective-serv Not-in-family White Female United-States 0 +52 0.5777778 0.171269715 1 0 0.4331956 0.7070707 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male Germany 1 +39 0.433333337 0.2264598 0.5625 0.03103031 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.1621184 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +36 0.4 0.2773595 0.8125 0 0 0.353535354 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 1 +25 0.2777778 0.120456927 0.8125 0 0 0.151515156 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +42 0.466666669 0.0917199 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +35 0.3888889 0.163944349 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male Germany 0 +43 0.477777779 0.1738049 0.875 0.07688077 0 0.535353541 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.110963456 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.0162894316 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.112800859 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +44 0.4888889 0.07200084 0.875 0 0 0.444444448 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.0360320732 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.226108223 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.1421306 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Not-in-family White Male United-States 1 +30 0.333333343 0.109788142 0.8125 0 0 0.5252525 Private Bachelors Never-married Exec-managerial Own-child Asian-Pac-Islander Female Taiwan 0 +36 0.4 0.05196049 0.8125 0.1502415 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.0454184525 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +25 0.2777778 0.30884856 0.125 0 0 0.969697 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +26 0.2888889 0.128287435 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +20 0.222222224 0.131616041 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child Black Female United-States 0 +20 0.222222224 0.146082222 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Own-child White Male United-States 0 +70 0.7777778 0.22631231 0.1875 0 0 0.2020202 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 0 +26 0.2888889 0.112716 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +24 0.266666681 0.162899032 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 +48 0.533333361 0.08479261 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +62 0.6888889 0.183342144 0.5625 0 0 1 Private HS-grad Divorced Priv-house-serv Unmarried Black Female United-States 0 +48 0.533333361 0.118017383 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +52 0.5777778 0.121367544 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +25 0.2777778 0.0256549288 0.8125 0 0 0.444444448 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +58 0.644444466 0.208852947 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +40 0.444444448 0.07993911 0.8125 0 0 0.454545468 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +29 0.322222233 0.07608448 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +45 0.5 0.080912374 0.25 0 0 0.5252525 Self-emp-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male ? 0 +19 0.211111113 0.029593084 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Other-relative White Female United-States 0 +37 0.411111116 0.141737252 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +23 0.25555557 0.119029708 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male Puerto-Rico 0 +31 0.344444454 0.07635456 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +64 0.7111111 0.0498321243 0.25 0 0 0.2020202 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.133314028 0.625 0 0 0.161616161 Local-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +32 0.355555564 0.130184114 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +49 0.544444442 0.150428534 0.625 0 0 0.444444448 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.0335076675 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 1 +19 0.211111113 0.142488241 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 +45 0.5 0.135963038 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.216974422 0.5 0.1502415 0 0.7070707 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 1 +55 0.6111111 0.106891267 0.625 0 0.5369605 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family Black Female ? 0 +46 0.51111114 0.185642943 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Divorced Other-service Unmarried Asian-Pac-Islander Female South 1 +19 0.211111113 0.139151558 0.625 0 0 0.161616161 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +29 0.322222233 0.0604921542 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female Scotland 0 +25 0.2777778 0.105642535 0.5625 0 0 0.353535354 State-gov HS-grad Married-civ-spouse Protective-serv Own-child White Male United-States 0 +37 0.411111116 0.109445311 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.1383487 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 +28 0.311111122 0.252786249 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Philippines 0 +36 0.4 0.6270256 0.625 0.06497065 0 0.565656543 Federal-gov Some-college Separated Adm-clerical Unmarried Black Female United-States 0 +32 0.355555564 0.08614169 0.625 0 0 0.353535354 Private Some-college Never-married Exec-managerial Unmarried Black Female United-States 0 +34 0.377777785 0.1675444 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +34 0.377777785 0.126689136 0.5625 0 0 0.363636374 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +20 0.222222224 0.146029681 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +27 0.3 0.0766953751 0.875 0 0 0.4040404 Self-emp-inc Masters Never-married Transport-moving Own-child White Male United-States 0 +36 0.4 0.231057346 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +35 0.3888889 0.189240292 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +37 0.411111116 0.0283180848 0.5625 0 0 0.353535354 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +32 0.355555564 0.208467677 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.11019294 0.875 0 0 0.2020202 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +52 0.5777778 0.151005089 0.5625 0 0 0.4848485 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +50 0.5555556 0.227845266 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.163247928 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +25 0.2777778 0.0547489226 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.163916737 0.0625 0 0 0.5050505 Private Preschool Never-married Farming-fishing Not-in-family White Male Mexico 0 +31 0.344444454 0.146697834 0.5625 0 0 0.323232323 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +31 0.344444454 0.2175651 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +41 0.455555558 0.0230874158 0.6875 0 0 0.4040404 Private Assoc-voc Separated Other-service Not-in-family White Male United-States 0 +47 0.5222222 0.124320321 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +20 0.222222224 0.14196828 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Female United-States 0 +20 0.222222224 0.09609519 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.08871392 0.375 0 0 0.25252524 Private 10th Divorced Machine-op-inspct Not-in-family Black Female United-States 0 +51 0.566666663 0.0503696 0.625 0 0 0.4040404 Local-gov Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.1221603 0.8125 0 0 0.333333343 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +23 0.25555557 0.04210062 0.625 0 0 0.121212125 ? Some-college Never-married ? Not-in-family White Female United-States 0 +48 0.533333361 0.104845069 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +39 0.433333337 0.11781735 0.5625 0.143441439 0 0.4040404 Private HS-grad Separated Exec-managerial Not-in-family White Male United-States 1 +62 0.6888889 0.07640575 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.09916246 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +46 0.51111114 0.139436454 0.8125 0.07688077 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.08285215 0.875 0 0.453856736 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.124387 0.5625 0 0 0.323232323 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +40 0.444444448 0.122877613 0.75 0.1502415 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.06643677 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +30 0.333333343 0.11733038 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +52 0.5777778 0.0833701 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +20 0.222222224 0.251980036 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Other-relative White Female United-States 0 +37 0.411111116 0.142792672 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +65 0.722222269 0.0834947 0.8125 0 0 0.4040404 Private Bachelors Widowed Other-service Not-in-family White Female United-States 0 +40 0.444444448 0.163412258 0.8125 0.046500463 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +60 0.6666667 0.09328587 0.8125 0.07298073 0 0.4848485 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +27 0.3 0.076537095 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male Ireland 0 +62 0.6888889 0.4474734 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +53 0.5888889 0.14704 0.5625 0 0 0.353535354 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +38 0.422222227 0.187617749 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +49 0.544444442 0.212010473 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +21 0.233333334 0.1312456 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +18 0.2 0.269828677 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +25 0.2777778 0.140173972 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Other-relative White Male United-States 0 +36 0.4 0.124265768 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.0792574957 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.109530851 0.625 0 0 0.141414136 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +23 0.25555557 0.248358428 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +63 0.7 0.132682249 0.8125 0 0 0.151515156 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +63 0.7 0.283308148 0.6875 0 0 0.454545468 Self-emp-not-inc Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +62 0.6888889 0.165346652 0.8125 1 0 0.4040404 Self-emp-inc Bachelors Divorced Sales Not-in-family White Male United-States 1 +51 0.566666663 0.186202645 0.75 0.03103031 0 0.3030303 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +76 0.844444454 0.113916911 0.625 0 0 0.3030303 Local-gov Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +50 0.5555556 0.0668866858 0.5625 0.0501305 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.080912374 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.307290673 0.625 0 0 0.454545468 Self-emp-inc Some-college Divorced Sales Own-child White Male United-States 1 +51 0.566666663 0.0721510351 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +42 0.466666669 0.08450231 0.8125 0.046500463 0 0.353535354 Local-gov Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +43 0.477777779 0.0248695873 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.11252404 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +29 0.322222233 0.0361297354 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +41 0.455555558 0.104174234 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +44 0.4888889 0.06886082 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +35 0.3888889 0.0367716141 0.375 0 0.454545438 0.4040404 Private 10th Widowed Other-service Not-in-family Black Female United-States 0 +27 0.3 0.10301777 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.173126653 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +60 0.6666667 0.05000522 0.6875 0 0 0.3030303 Private Assoc-voc Widowed Craft-repair Not-in-family White Female United-States 0 +49 0.544444442 0.100389645 0.625 0.143441439 0 0.454545468 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 1 +33 0.366666675 0.07892881 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.120106019 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.193244457 0.625 0 0 0.3838384 State-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +54 0.6 0.13715519 0.5625 0.07298073 0 0.6060606 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +57 0.6333333 0.119398132 1 0 0 0.353535354 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +30 0.333333343 0.100644238 0.3125 0 0 0.454545468 Private 9th Never-married Craft-repair Own-child White Male United-States 0 +45 0.5 0.068468824 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male Vietnam 0 +41 0.455555558 0.184792936 0.625 0.07298073 0 0.424242437 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +25 0.2777778 0.162338644 0.8125 0 0 0.181818187 Private Bachelors Never-married Other-service Own-child White Male United-States 0 +51 0.566666663 0.228217736 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.141801909 0.1875 0 0 0.4040404 Private 5th-6th Separated Adm-clerical Other-relative White Male El-Salvador 0 +28 0.311111122 0.06447409 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Handlers-cleaners Not-in-family White Male United-States 0 +47 0.5222222 0.119897895 0.375 0 0 0.2020202 ? 10th Married-civ-spouse ? Wife White Female Cuba 0 +53 0.5888889 0.112756409 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Tech-support Not-in-family Amer-Indian-Eskimo Male United-States 0 +31 0.344444454 0.106527559 0.8125 0.135501355 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 +46 0.51111114 0.162951559 0.4375 0.07688077 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband Black Male United-States 1 +25 0.2777778 0.274098217 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +47 0.5222222 0.230188489 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +26 0.2888889 0.161178827 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 0 +30 0.333333343 0.0261654686 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +48 0.533333361 0.0368719734 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.223744109 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Male United-States 0 +32 0.355555564 0.104364172 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.132243112 1 0 0 0.454545468 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 +31 0.344444454 0.1355771 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +43 0.477777779 0.228844792 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Other-service Wife White Female England 1 +26 0.2888889 0.168428078 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 +34 0.377777785 0.214780718 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband Black Male United-States 0 +50 0.5555556 0.08356947 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +30 0.333333343 0.163077518 0.5625 0 0 0.4040404 State-gov HS-grad Separated Adm-clerical Unmarried Black Female United-States 0 +17 0.188888893 0.02291297 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 +35 0.3888889 0.15542078 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Own-child Black Female United-States 0 +29 0.322222233 0.14402996 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.13227275 0.75 0.0406404063 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male El-Salvador 0 +32 0.355555564 0.04187027 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Black Male ? 0 +34 0.377777785 0.0907500163 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 1 +32 0.355555564 0.3472939 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Not-in-family White Female United-States 0 +47 0.5222222 0.08028464 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +40 0.444444448 0.06076763 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +26 0.2888889 0.01915734 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.107389688 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female Ireland 0 +54 0.6 0.212704882 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +53 0.5888889 0.09149292 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.0547125526 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 +43 0.477777779 0.07947774 0.25 0 0 0.4040404 Private 7th-8th Separated Farming-fishing Not-in-family Black Male United-States 0 +25 0.2777778 0.140010983 0.625 0 0 0.2020202 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +39 0.433333337 0.111064486 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.114545316 0.5625 0 0 0.25252524 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +47 0.5222222 0.0754318237 0.5625 0 0 0.343434334 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +45 0.5 0.112235092 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Other-relative Black Female United-States 0 +24 0.266666681 0.041582 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +32 0.355555564 0.162917882 0.375 0 0 0.4040404 Self-emp-not-inc 10th Divorced Craft-repair Not-in-family White Male United-States 0 +25 0.2777778 0.157735035 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +57 0.6333333 0.155518442 0.1875 0 0 0.4040404 Private 5th-6th Separated Machine-op-inspct Not-in-family White Female United-States 0 +28 0.311111122 0.07688935 0.8125 0 0.453856736 0.24242425 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +28 0.311111122 0.149822354 0.5625 0 0 0.5151515 Private HS-grad Married-civ-spouse Sales Husband White Male Cuba 0 +27 0.3 0.106157117 0.8125 0 0 0.5555556 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.134641558 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +74 0.822222233 0.197094381 0.125 0 0 0.4040404 ? 1st-4th Married-civ-spouse ? Husband Black Male United-States 0 +44 0.4888889 0.1055341 0.5625 0 0 0.424242437 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male Japan 0 +27 0.3 0.24888581 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +61 0.677777767 0.152418837 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.239789724 0.4375 0 0 1 Private 11th Never-married Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.127471119 0.3125 0 0 0.24242425 Private 9th Never-married Handlers-cleaners Own-child Black Female United-States 0 +20 0.222222224 0.1061093 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +33 0.366666675 0.0466429368 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Sales Own-child Asian-Pac-Islander Male Philippines 0 +38 0.422222227 0.18383719 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Other-service Not-in-family White Male United-States 0 +31 0.344444454 0.07655864 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 +40 0.444444448 0.149532065 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 +43 0.477777779 0.1287771 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.113897376 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.0987933651 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Own-child Black Male United-States 0 +56 0.622222245 0.152882218 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Other-service Husband White Male United-States 0 +38 0.422222227 0.103095233 0.875 0 0 0.454545468 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 1 +30 0.333333343 0.107296064 0.8125 0 0 0.04040404 ? Bachelors Married-civ-spouse ? Wife White Female United-States 0 +22 0.244444445 0.134780318 0.5625 0.04508045 0 0.4040404 Private HS-grad Married-civ-spouse Priv-house-serv Wife White Female United-States 0 +18 0.2 0.07371498 0.5625 0 0 0.25252524 State-gov HS-grad Never-married Other-service Own-child White Male United-States 0 +68 0.75555557 0.06701062 0.625 0 0 0.2020202 Private Some-college Widowed Other-service Not-in-family White Female United-States 0 +35 0.3888889 0.116232522 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Transport-moving Not-in-family White Male United-States 0 +42 0.466666669 0.096707426 0.25 0 0 0.4848485 Private 7th-8th Married-civ-spouse Other-service Other-relative Asian-Pac-Islander Female ? 0 +32 0.355555564 0.139497742 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Unmarried White Male United-States 0 +43 0.477777779 0.129798174 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +30 0.333333343 0.103924349 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Unmarried Black Female United-States 0 +62 0.6888889 0.16091615 0.625 0.0282902829 0 0.24242425 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +38 0.422222227 0.07435955 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.1395651 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +28 0.311111122 0.408236653 1 0 0 0.6060606 Private Doctorate Never-married Prof-specialty Not-in-family White Female Germany 1 +26 0.2888889 0.0229756087 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 +21 0.233333334 0.08025567 0.625 0 0 0.2020202 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +19 0.211111113 0.16824016 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative Black Male United-States 0 +20 0.222222224 0.103398323 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +25 0.2777778 0.175626814 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Protective-serv Not-in-family Black Male United-States 0 +28 0.311111122 0.104816109 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male Columbia 0 +36 0.4 0.0228887219 0.6875 0 0 0.424242437 Private Assoc-voc Never-married Adm-clerical Not-in-family White Male United-States 1 +23 0.25555557 0.206506342 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family Amer-Indian-Eskimo Male Mexico 0 +24 0.266666681 0.181904823 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 +23 0.25555557 0.073704876 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +24 0.266666681 0.1260284 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +25 0.2777778 0.3122957 0.5625 0 0 0.08080808 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family White Male United-States 0 +24 0.266666681 0.03520026 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +30 0.333333343 0.09703207 0.5625 0 0 0.6262626 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.09956254 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Own-child White Female ? 0 +62 0.6888889 0.156744272 0.875 0 0 0.5050505 ? Masters Married-civ-spouse ? Husband White Male United-States 0 +36 0.4 0.180924833 0.625 0 0 0.333333343 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +45 0.5 0.0546452 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 0 +31 0.344444454 0.21759811 0.75 0 0.2020202 0.454545468 Private Assoc-acdm Divorced Sales Unmarried White Female United-States 0 +34 0.377777785 0.1636581 0.5625 0 0 0.4848485 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +65 0.722222269 0.11630863 0.8125 0 0 0.444444448 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Mexico 1 +42 0.466666669 0.07000179 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +27 0.3 0.2907224 0.9375 0 0 0.7070707 State-gov Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 +40 0.444444448 0.127258956 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife Black Female Puerto-Rico 0 +53 0.5888889 0.114739291 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +54 0.6 0.0192078557 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.1302481 0.8125 0 0 0.353535354 State-gov Bachelors Never-married Prof-specialty Other-relative White Male United-States 0 +59 0.655555546 0.118503004 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +42 0.466666669 0.0363412276 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Divorced Exec-managerial Unmarried White Male United-States 0 +23 0.25555557 0.08134478 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.06480681 0.8125 0 0 0.151515156 Private Bachelors Married-civ-spouse Other-service Wife White Female United-States 0 +20 0.222222224 0.07015805 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +22 0.244444445 0.1282605 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +73 0.811111152 0.163689092 0.8125 0 0 0.3030303 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +47 0.5222222 0.1540104 0.625 0 0.453856736 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.248370558 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +40 0.444444448 0.148556784 0.5 0 0 0.4040404 Private 12th Divorced Craft-repair Not-in-family White Male United-States 0 +37 0.411111116 0.15731813 0.6875 0 0 0.373737365 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 +39 0.433333337 0.126521438 0.5625 0 0 0.5050505 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 +49 0.544444442 0.05677761 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +44 0.4888889 0.171281844 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Divorced Other-service Not-in-family White Male United-States 0 +27 0.3 0.07382679 0.3125 0 0 0.373737365 Private 9th Married-civ-spouse Machine-op-inspct Wife White Female Portugal 0 +50 0.5555556 0.127421275 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +39 0.433333337 0.139388636 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.190530777 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 +55 0.6111111 0.2539636 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +53 0.5888889 0.141378924 0.125 0 0 0.353535354 Private 1st-4th Married-civ-spouse Other-service Husband Black Male Puerto-Rico 0 +53 0.5888889 0.118581809 0.875 0 0 0.5050505 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +31 0.344444454 0.187926218 0.875 0 0.5544077 0.7070707 Private Masters Married-civ-spouse Exec-managerial Husband White Male Taiwan 1 +21 0.233333334 0.233913139 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.186780542 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family Black Male United-States 0 +74 0.822222233 0.0201299246 0.5625 0 0 0.1010101 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +53 0.5888889 0.229970947 0.875 0 0 0.6060606 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 +47 0.5222222 0.141078532 0.625 0 0.3409091 0.474747479 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +60 0.6666667 0.07696007 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Female Hungary 1 +59 0.655555546 0.155518442 0.3125 0 0 0.4040404 Private 9th Separated Machine-op-inspct Unmarried White Female Mexico 0 +37 0.411111116 0.183044448 0.8125 0 0 0.4848485 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +47 0.5222222 0.0141145885 0.8125 0 0.399449021 0.4040404 Federal-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.02693195 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +73 0.811111152 0.0308371037 0.625 0 0 0.111111112 Local-gov Some-college Never-married Prof-specialty Other-relative White Female United-States 0 +58 0.644444466 0.08553282 0.5625 0 0 0.2020202 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 +18 0.2 0.158043519 0.4375 0 0 0.151515156 ? 11th Never-married ? Own-child Black Male United-States 0 +35 0.3888889 0.139876947 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Black Male United-States 0 +24 0.266666681 0.27840212 0.625 0 0 0.5050505 State-gov Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 0 +62 0.6888889 0.0821934342 0.5625 0 0 0.3838384 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +58 0.644444466 0.114238858 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +51 0.566666663 0.0608625971 0.625 0.1502415 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +21 0.233333334 0.2509832 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Male United-States 0 +30 0.333333343 0.229619354 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.0230840482 0.6875 0 0.430670351 0.363636374 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female Canada 0 +25 0.2777778 0.108457237 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +31 0.344444454 0.0672483742 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 +31 0.344444454 0.139883012 0.5625 0 0 0.343434334 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +44 0.4888889 0.0502995551 0.625 0.05178052 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +52 0.5777778 0.225144386 1 1 0 0.656565666 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.0242937151 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.06773265 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 +36 0.4 0.117402449 0.4375 0 0 0.4040404 Private 11th Divorced Transport-moving Not-in-family White Male United-States 0 +54 0.6 0.07369343 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +59 0.655555546 0.143193439 0.625 0 0 0.4040404 Local-gov Some-college Separated Protective-serv Not-in-family White Male United-States 1 +55 0.6111111 0.183006048 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +70 0.7777778 0.155462533 0.6875 0 0 0.3030303 ? Assoc-voc Never-married ? Not-in-family White Male United-States 0 +22 0.244444445 0.0695606247 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.2148218 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +36 0.4 0.126063436 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Wife White Female United-States 0 +32 0.355555564 0.1379008 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.18997848 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.190953761 0.5625 0 0 0.454545468 ? HS-grad Never-married ? Unmarried Black Male United-States 0 +25 0.2777778 0.188652292 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Handlers-cleaners Not-in-family White Male Mexico 0 +31 0.344444454 0.136544973 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.138714433 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +54 0.6 0.264218152 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.08029003 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +49 0.544444442 0.131712362 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.11652483 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +54 0.6 0.1298992 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +39 0.433333337 0.110939212 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Unmarried White Male United-States 0 +24 0.266666681 0.131883442 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +21 0.233333334 0.134332418 0.5625 0 0 0.444444448 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.0850983858 0.3125 0 0 0.3030303 Private 9th Never-married Other-service Unmarried Black Female United-States 0 +54 0.6 0.119670242 0.5625 0 0 0.424242437 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.0339064 0.875 0 0 0.2020202 Private Masters Never-married Sales Not-in-family White Female United-States 0 +39 0.433333337 0.160262823 0.5625 0 0.396235079 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 +23 0.25555557 0.0855018348 0.625 0 0 0.25252524 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +67 0.7444445 0.0620062575 0.5625 0 0 0.08080808 ? HS-grad Widowed ? Other-relative White Female United-States 0 +19 0.211111113 0.07404704 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Wife Asian-Pac-Islander Female Laos 0 +41 0.455555558 0.180003434 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +32 0.355555564 0.117669173 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family Black Male United-States 0 +57 0.6333333 0.08403757 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.135113046 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +60 0.6666667 0.1116902 1 0.07688077 0 0.6060606 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.20286791 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 +53 0.5888889 0.145342 0.625 0 0 0.222222224 Private Some-college Widowed Adm-clerical Other-relative White Female United-States 0 +38 0.422222227 0.0589719862 0.8125 0.07688077 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.07507687 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +53 0.5888889 0.05566493 1 0 0 0.5555556 Private Doctorate Divorced Exec-managerial Not-in-family White Female United-States 1 +24 0.266666681 0.109302521 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.161024585 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Other-service Husband White Male United-States 0 +29 0.322222233 0.1447594 0.875 0 0 0.6060606 Private Masters Never-married Exec-managerial Not-in-family Black Male United-States 0 +23 0.25555557 0.130832046 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +44 0.4888889 0.142473429 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.150378019 0.875 0 0 0.4848485 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +25 0.2777778 0.135808125 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +41 0.455555558 0.127121553 0.5625 0 0 0.272727281 Self-emp-not-inc HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +18 0.2 0.08961713 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +57 0.6333333 0.0415981635 0.625 0 0.3838384 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.0696057454 0.8125 0.105201051 0 0.5050505 Private Bachelors Widowed Exec-managerial Not-in-family White Male United-States 1 +29 0.322222233 0.0739635155 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 +19 0.211111113 0.151743278 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 +35 0.3888889 0.0655194148 0.9375 0 0 0.656565666 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.09881492 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.1929353 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Unmarried White Female United-States 0 +38 0.422222227 0.0136781381 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +42 0.466666669 0.151008457 0.625 0 0 0.4040404 Private Some-college Widowed Sales Unmarried Black Female United-States 0 +41 0.455555558 0.152203977 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 +23 0.25555557 0.160112619 0.8125 0 0 0.3838384 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +31 0.344444454 0.105571814 0.875 0 0 0.7676768 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.343074232 0.1875 0 0 0.454545468 Private 5th-6th Never-married Machine-op-inspct Not-in-family White Male Mexico 0 +46 0.51111114 0.0972253755 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.2529223 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 +57 0.6333333 0.06973035 0.875 0 0 0.3838384 Self-emp-not-inc Masters Married-civ-spouse Tech-support Husband White Male United-States 1 +25 0.2777778 0.134351268 0.6875 0 0 0.3838384 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.234492376 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.14896293 0.3125 0 0 0.4040404 Private 9th Never-married Farming-fishing Own-child White Male United-States 0 +46 0.51111114 0.230188489 0.8125 0.07688077 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.427173078 0.375 0 0 0.171717167 ? 10th Never-married ? Own-child White Female United-States 0 +43 0.477777779 0.1073944 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +56 0.622222245 0.0742490962 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-spouse-absent Prof-specialty Not-in-family White Female United-States 1 +19 0.211111113 0.30885464 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 0 +20 0.222222224 0.229147881 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.10446924 0.625 0 0 0.454545468 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +90 1 0.0609703623 0.5625 0 0 1 Private HS-grad Widowed Transport-moving Unmarried White Male United-States 0 +25 0.2777778 0.0826804 0.4375 0 0 0.353535354 Private 11th Separated Machine-op-inspct Not-in-family Black Male United-States 0 +27 0.3 0.19790329 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female Jamaica 0 +48 0.533333361 0.2015828 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +48 0.533333361 0.325492948 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Not-in-family Black Male United-States 0 +27 0.3 0.0821968 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.108201295 0.8125 0 0 0.3838384 Private Bachelors Widowed Tech-support Unmarried White Female United-States 0 +32 0.355555564 0.07175904 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Other-relative White Male United-States 0 +22 0.244444445 0.0855018348 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +24 0.266666681 0.126964614 0.8125 0 0 0.4040404 Private Bachelors Married-AF-spouse Prof-specialty Wife White Female United-States 1 +31 0.344444454 0.254495 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.130386844 0.625 0 0 0.181818187 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.212444231 0.9375 0.0217602178 0 0.4040404 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 +40 0.444444448 0.0385484 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.131509632 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +54 0.6 0.116515405 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.150343 0.625 0 0 0.424242437 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +17 0.188888893 0.06452393 0.4375 0 0 0.181818187 Private 11th Never-married Sales Own-child White Female United-States 0 +25 0.2777778 0.143722162 0.625 0 0 0.8080808 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 +49 0.544444442 0.136368513 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +55 0.6111111 0.09804911 0.5625 0.3409534 0 0.6060606 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +39 0.433333337 0.09937867 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +67 0.7444445 0.07086661 0.625 0 0 0.161616161 Private Some-college Widowed Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.0523740426 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male United-States 0 +35 0.3888889 0.113147058 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Canada 0 +44 0.4888889 0.112483628 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +51 0.566666663 0.07303471 0.875 0 0 0.474747479 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.03815236 0.8125 0 0 0.4040404 Private Bachelors Widowed Farming-fishing Own-child Asian-Pac-Islander Male United-States 0 +45 0.5 0.20540984 0.5625 0 0 0.7878788 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +32 0.355555564 0.0286898743 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.148609325 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +45 0.5 0.06833142 0.875 0.1502415 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male England 1 +35 0.3888889 0.127222583 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +55 0.6111111 0.113685884 0.5625 0 0 0.444444448 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.06624953 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.270600557 0.5625 0 0 0.5555556 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +46 0.51111114 0.10789147 0.875 0 0 0.353535354 Local-gov Masters Widowed Exec-managerial Unmarried Black Female United-States 0 +23 0.25555557 0.137209073 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +47 0.5222222 0.0972253755 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.283388972 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Germany 0 +51 0.566666663 0.07149636 0.4375 0 0 0.4040404 Private 11th Divorced Transport-moving Own-child White Male United-States 0 +40 0.444444448 0.244144127 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.025696015 0.625 0 0 0.121212125 State-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 +20 0.222222224 0.0287639629 0.625 0 0 0.727272749 Private Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 +44 0.4888889 0.084999375 0.625 0.0183101818 0 0.5050505 Private Some-college Divorced Transport-moving Unmarried White Male United-States 0 +26 0.2888889 0.11147669 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +35 0.3888889 0.145529255 0.5625 0 0 0.3838384 Local-gov HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.1452302 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Unmarried Asian-Pac-Islander Male Vietnam 0 +40 0.444444448 0.161451608 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +49 0.544444442 0.134287953 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +32 0.355555564 0.155195817 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +28 0.311111122 0.266060948 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +51 0.566666663 0.228072241 0.875 0.1502415 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.14153789 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.3006375 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +47 0.5222222 0.237497687 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 +36 0.4 0.197701231 0.6875 0 0 0.0303030312 Private Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 +44 0.4888889 0.0373104438 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +18 0.2 0.08657478 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Own-child White Female United-States 0 +46 0.51111114 0.288545549 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.0854297653 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +51 0.566666663 0.0921637639 0.75 0 0 0.3030303 Self-emp-not-inc Assoc-acdm Divorced Transport-moving Unmarried Black Female United-States 0 +48 0.533333361 0.0712855458 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.0942295 0.8125 0 0 0.4040404 Private Bachelors Never-married Machine-op-inspct Unmarried Black Female United-States 0 +57 0.6333333 0.07146403 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +33 0.366666675 0.125832409 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.235997722 0.5625 0 0 0.151515156 Private HS-grad Separated Machine-op-inspct Not-in-family White Male United-States 0 +17 0.188888893 0.09625616 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Male United-States 0 +63 0.7 0.216476008 0.3125 0 0 0.4040404 ? 9th Separated ? Not-in-family Black Male United-States 0 +31 0.344444454 0.0774140358 0.8125 0 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.193094924 0.875 0.046500463 0 0.3030303 ? Masters Never-married ? Not-in-family White Male United-States 0 +35 0.3888889 0.09918334 0.625 0 0.453168035 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +20 0.222222224 0.3044349 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +36 0.4 0.10091769 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +24 0.266666681 0.142767757 0.625 0 0 0.24242425 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +33 0.366666675 0.193915963 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 1 +36 0.4 0.112176493 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +31 0.344444454 0.0169838462 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +29 0.322222233 0.1929353 0.75 0.03418034 0 0.4040404 Private Assoc-acdm Divorced Sales Unmarried White Female United-States 0 +47 0.5222222 0.109135486 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.125905156 1 0.05178052 0 0.75757575 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.0558616035 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +23 0.25555557 0.08220354 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Female United-States 0 +33 0.366666675 0.07995528 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Not-in-family White Male United-States 0 +59 0.655555546 0.1638211 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family White Female United-States 0 +67 0.7444445 0.180853441 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +26 0.2888889 0.246034741 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +27 0.3 0.111379027 0.5625 0.0288502872 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Laos 0 +20 0.222222224 0.147683218 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Prof-specialty Own-child White Female ? 0 +24 0.266666681 0.191120133 0.8125 0 0 0.3939394 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +44 0.4888889 0.139120564 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Divorced Tech-support Not-in-family White Male United-States 0 +31 0.344444454 0.07635456 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.2215585 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +19 0.211111113 0.05652975 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +31 0.344444454 0.219137818 0.8125 0 0.43663913 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +20 0.222222224 0.08880687 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +64 0.7111111 0.08049141 0.5625 0 0 0.151515156 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +47 0.5222222 0.0679044 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +36 0.4 0.109315991 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +48 0.533333361 0.12272539 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.130803764 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Other-service Own-child White Female Mexico 0 +22 0.244444445 0.0949953049 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child Black Female United-States 0 +56 0.622222245 0.233065158 0.3125 0 0 0.4040404 Private 9th Divorced Adm-clerical Not-in-family White Male United-States 0 +22 0.244444445 0.1192998 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +37 0.411111116 0.162439 0.8125 0 0 1 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +57 0.6333333 0.0879178047 0.8125 0 0 0.353535354 Local-gov Bachelors Widowed Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.11348787 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +34 0.377777785 0.244349554 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +22 0.244444445 0.164861709 0.4375 0 0 0.4040404 ? 11th Separated ? Unmarried Black Female United-States 0 +38 0.422222227 0.0324125 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +30 0.333333343 0.11709936 0.625 0 0.43663913 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male South 1 +32 0.355555564 0.139557019 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +29 0.322222233 0.0255491845 0.5 0 0 0.4040404 Private 12th Married-spouse-absent Other-service Not-in-family Black Female United-States 0 +56 0.622222245 0.02244419 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +42 0.466666669 0.118503675 0.6875 0.07298073 0 0.353535354 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 +66 0.733333349 0.206221446 0.375 0.0205002055 0 0.4040404 ? 10th Divorced ? Not-in-family White Male United-States 0 +71 0.788888931 0.15431349 0.5625 0 0 0.333333343 Local-gov HS-grad Widowed Exec-managerial Other-relative White Female United-States 0 +20 0.222222224 0.076453574 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Own-child White Male United-States 0 +25 0.2777778 0.224742964 0.5625 0 0 0.363636374 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +42 0.466666669 0.158968285 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male ? 1 +20 0.222222224 0.249941245 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Female United-States 0 +61 0.677777767 0.07747196 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.0899747759 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 +51 0.566666663 0.0613839142 0.3125 0 0 0.4040404 Private 9th Never-married Other-service Unmarried Black Female United-States 0 +27 0.3 0.0711239 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +41 0.455555558 0.237631053 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +31 0.344444454 0.137959391 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +39 0.433333337 0.166856721 0.5625 0 0 0.161616161 Private HS-grad Divorced Priv-house-serv Unmarried Black Female United-States 0 +36 0.4 0.249601781 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 +51 0.566666663 0.069547154 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +52 0.5777778 0.120505422 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Unmarried White Female United-States 0 +49 0.544444442 0.03654598 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.0373104438 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.157277718 0.8125 0 0.453856736 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.214406908 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +19 0.211111113 0.132002652 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +44 0.4888889 0.026184326 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +67 0.7444445 0.0548344627 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +58 0.644444466 0.116264179 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.117677927 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +67 0.7444445 0.151534483 0.5625 0.158311576 0 0.161616161 Private HS-grad Widowed Adm-clerical Not-in-family White Female Germany 1 +61 0.677777767 0.285105139 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.0598475821 0.25 0 0 0.4040404 Local-gov 7th-8th Never-married Other-service Unmarried Black Female United-States 0 +23 0.25555557 0.113897376 0.75 0 0 0.161616161 ? Assoc-acdm Never-married ? Own-child Asian-Pac-Islander Male Philippines 0 +35 0.3888889 0.026407266 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +35 0.3888889 0.229013845 0.375 0 0 0.3838384 Private 10th Never-married Other-service Unmarried Black Female United-States 0 +20 0.222222224 0.0207421687 0.625 0 0 0.1010101 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +51 0.566666663 0.10466928 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +23 0.25555557 0.160363168 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +39 0.433333337 0.151952744 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +36 0.4 0.194751143 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +47 0.5222222 0.228909448 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.120413147 0.8125 0 0 0.8080808 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +29 0.322222233 0.382897615 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.08711832 0.625 0 0 0.4040404 State-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 0 +18 0.2 0.301663965 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.211600959 0.625 0 0 0.2020202 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +39 0.433333337 0.257868737 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.05556929 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.100828111 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +62 0.6888889 0.141337171 0.625 0 0 0.3030303 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +49 0.544444442 0.0421268865 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.154027909 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 +24 0.266666681 0.2199676 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +25 0.2777778 0.136115253 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 +54 0.6 0.209317014 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.3032562 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +20 0.222222224 0.05682947 0.5625 0 0 0.454545468 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +43 0.477777779 0.09594095 0.625 0 0 0.5555556 Private Some-college Divorced Sales Unmarried White Female United-States 1 +26 0.2888889 0.0553955175 0.8125 0 0.430670351 0.3838384 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +24 0.266666681 0.129834548 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +18 0.2 0.0357707441 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child Amer-Indian-Eskimo Male United-States 0 +45 0.5 0.08206075 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Prof-specialty Wife White Female ? 1 +45 0.5 0.200800836 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.09136158 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +47 0.5222222 0.178671867 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +54 0.6 0.276225924 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +21 0.233333334 0.156744272 0.5625 0 0 0.4040404 Without-pay HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +29 0.322222233 0.112962507 0.5625 0 0 1 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +68 0.75555557 0.0724905 0.625 0 0 0.151515156 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +21 0.233333334 0.08733991 0.625 0 0 0.4848485 Private Some-college Never-married Exec-managerial Not-in-family Black Male Mexico 0 +28 0.311111122 0.07681863 0.625 0 0 0.3030303 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +46 0.51111114 0.136431143 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +35 0.3888889 0.148111582 0.5625 0 0 0.4848485 Private HS-grad Separated Transport-moving Unmarried Black Female United-States 0 +50 0.5555556 0.129759118 0.375 0 0 0.25252524 Self-emp-not-inc 10th Never-married Craft-repair Not-in-family White Male United-States 0 +48 0.533333361 0.160951838 0.625 0 0 0.4040404 Self-emp-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +17 0.188888893 0.07607033 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 +59 0.655555546 0.103376769 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.109027721 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Black Male United-States 0 +53 0.5888889 0.175190359 0.5625 0 0 0.3030303 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +50 0.5555556 0.161900178 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.169469357 0.1875 0 0 0.454545468 ? 5th-6th Never-married ? Unmarried White Female Mexico 0 +53 0.5888889 0.150666967 0.5 0 0 0.565656543 Private 12th Married-spouse-absent Handlers-cleaners Not-in-family Other Male Dominican-Republic 0 +52 0.5777778 0.118632324 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +38 0.422222227 0.125923336 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +43 0.477777779 0.307290673 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.06664489 0.8125 0 0 0.323232323 Private Bachelors Married-civ-spouse Other-service Wife White Female United-States 0 +41 0.455555558 0.112252608 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.3021651 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +39 0.433333337 0.112804905 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +45 0.5 0.127831459 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.268775284 0.3125 0 0 0.424242437 Private 9th Married-civ-spouse Farming-fishing Wife White Female United-States 0 +40 0.444444448 0.0701796 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.102883741 0.1875 0 0 0.2020202 Self-emp-not-inc 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 0 +53 0.5888889 0.180874318 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male Jamaica 0 +53 0.5888889 0.100041427 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.189791247 0.8125 0 0.359045 0.5252525 Local-gov Bachelors Never-married Tech-support Not-in-family Black Male United-States 1 +24 0.266666681 0.1520329 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +34 0.377777785 0.134836212 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.115073368 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +29 0.322222233 0.151449621 0.625 0 0 0.6060606 Federal-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +61 0.677777767 0.107703552 0.4375 0 0 0.323232323 State-gov 11th Widowed Other-service Unmarried White Female United-States 1 +31 0.344444454 0.07778515 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +29 0.322222233 0.854270041 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Tech-support Own-child Black Male United-States 0 +42 0.466666669 0.131847739 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried White Male United-States 0 +50 0.5555556 0.12546061 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.122171074 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.119337514 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +74 0.822222233 0.0616203249 0.125 0 0 0.2020202 Private 1st-4th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +40 0.444444448 0.1555602 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +75 0.8333334 0.208765388 0.9375 0 0.499081731 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.04246096 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +36 0.4 0.0200807564 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +61 0.677777767 0.07828491 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +42 0.466666669 0.112936914 0.4375 0 0 0.222222224 ? 11th Married-civ-spouse ? Husband White Male Ecuador 0 +28 0.311111122 0.128704354 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +19 0.211111113 0.042980928 0.625 0 0 0.181818187 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.19253993 0.75 0 0 0.323232323 Private Assoc-acdm Separated Other-service Unmarried Black Female United-States 0 +33 0.366666675 0.108288184 0.6875 0 0 0.4040404 ? Assoc-voc Divorced ? Not-in-family White Female France 0 +50 0.5555556 0.201946512 0.625 0 0.2020202 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +47 0.5222222 0.109611675 0.75 0.1502415 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Wife Black Female United-States 1 +48 0.533333361 0.138067842 0.5625 0 0 0.333333343 Private HS-grad Never-married Tech-support Unmarried Black Female Jamaica 0 +60 0.6666667 0.115386561 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.199677378 0.875 0 0 0.3030303 Private Masters Never-married Prof-specialty Not-in-family Black Male United-States 0 +32 0.355555564 0.06995329 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.107641585 0.875 0 0.453856736 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +51 0.566666663 0.065054 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +53 0.5888889 0.136538908 0.3125 0 0 0.75757575 Private 9th Married-spouse-absent Machine-op-inspct Unmarried Black Male Haiti 0 +34 0.377777785 0.136607617 0.875 0 0 0.4040404 Private Masters Never-married Tech-support Unmarried Black Female ? 0 +48 0.533333361 0.2558643 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male Mexico 1 +68 0.75555557 0.08315726 0.5625 0 0 0.454545468 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +32 0.355555564 0.198100641 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Machine-op-inspct Not-in-family White Female United-States 0 +63 0.7 0.121223412 0.5625 0 0 0.04040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +31 0.344444454 0.15786773 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried Black Female United-States 0 +58 0.644444466 0.104086 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Divorced Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.0847683549 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.105081484 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +40 0.444444448 0.07855567 0.8125 0 0 0.8080808 Private Bachelors Divorced Sales Own-child White Male United-States 0 +50 0.5555556 0.08416689 0.8125 1 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.07760128 0.375 0 0 0.4040404 Self-emp-not-inc 10th Separated Machine-op-inspct Not-in-family White Male United-States 0 +30 0.333333343 0.1716873 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +21 0.233333334 0.13169755 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.12801668 0.8125 0 0.359045 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 1 +63 0.7 0.122467428 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male ? 0 +32 0.355555564 0.137181461 0.75 0 0.2020202 0.363636374 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 +25 0.2777778 0.217272118 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +59 0.655555546 0.165865943 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +22 0.244444445 0.14220266 0.6875 0 0 0.1010101 Local-gov Assoc-voc Never-married Adm-clerical Own-child White Female ? 0 +49 0.544444442 0.0938018039 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +36 0.4 0.126988187 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +31 0.344444454 0.169169635 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Wife White Female Mexico 0 +46 0.51111114 0.06385713 0.625 0 0 0.3030303 Private Some-college Divorced Priv-house-serv Unmarried White Female United-States 0 +37 0.411111116 0.178512231 0.9375 0 0 0.6060606 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.122964494 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 1 +43 0.477777779 0.148251 0.625 0 0.3838384 0.444444448 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +41 0.455555558 0.140411735 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.01931899 0.5625 0.0346403457 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.15731813 0.625 0 0 0.04040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +29 0.322222233 0.0165433548 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Unmarried Other Female United-States 0 +66 0.733333349 0.0244924072 0.5625 0 0.5204316 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.113537036 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 +62 0.6888889 0.112546265 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.182917818 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family White Male Mexico 0 +28 0.311111122 0.1288842 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.0213234276 0.8125 0 0.4331956 0.6060606 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +42 0.466666669 0.0561801866 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +60 0.6666667 0.0275179241 0.6875 0 0 0.464646459 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +58 0.644444466 0.077863954 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.089126125 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.148321047 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Not-in-family White Female United-States 0 +50 0.5555556 0.11619211 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.105573162 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 +39 0.433333337 0.147447482 0.9375 0 0 0.5050505 Private Prof-school Divorced Exec-managerial Not-in-family White Male United-States 0 +21 0.233333334 0.206178337 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +24 0.266666681 0.132467389 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +59 0.655555546 0.04944484 0.9375 0 0 0.3030303 Self-emp-not-inc Prof-school Married-civ-spouse Farming-fishing Husband White Male United-States 0 +36 0.4 0.1243742 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +72 0.8 0.0511145331 0.625 0 0 0.04040404 ? Some-college Widowed ? Unmarried Asian-Pac-Islander Female United-States 0 +35 0.3888889 0.2158348 0.875 0 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Hong 1 +33 0.366666675 0.116183355 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Own-child White Male United-States 0 +30 0.333333343 0.08862906 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Not-in-family Black Female United-States 0 +40 0.444444448 0.08386851 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Craft-repair Unmarried White Male United-States 1 +26 0.2888889 0.06318158 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +37 0.411111116 0.116650783 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Separated Adm-clerical Not-in-family Black Male United-States 0 +68 0.75555557 0.13373296 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Divorced Transport-moving Not-in-family White Female United-States 0 +45 0.5 0.0178500116 0.8125 0 0 0.727272749 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +56 0.622222245 0.1517251 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +36 0.4 0.101058461 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +50 0.5555556 0.142330632 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.1403363 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.0391424559 0.8125 0 0 0.414141417 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +28 0.311111122 0.147683889 0.5625 0 0 0.282828271 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +39 0.433333337 0.0872718841 0.625 0 0 0.5050505 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +26 0.2888889 0.0187471583 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Protective-serv Not-in-family White Male United-States 0 +52 0.5777778 0.279541731 0.625 0 0 0.656565666 Self-emp-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 1 +52 0.5777778 0.1290014 0.8125 0 0 0.4040404 Private Bachelors Divorced Farming-fishing Not-in-family White Male United-States 0 +84 0.933333337 0.08944942 0.5625 0 0 0.13131313 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +33 0.366666675 0.09231396 0.625 0 0 0.1010101 Federal-gov Some-college Never-married Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.06890797 0.9375 0.1502415 0 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.11066778 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +38 0.422222227 0.0275846049 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male England 1 +66 0.733333349 0.0950256139 0.5625 0 0 0.08080808 Private HS-grad Widowed Priv-house-serv Not-in-family White Female United-States 0 +62 0.6888889 0.173855409 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Adm-clerical Husband White Male Italy 1 +31 0.344444454 0.3149306 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +31 0.344444454 0.097756125 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.155681431 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +60 0.6666667 0.09879 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family Black Male ? 0 +27 0.3 0.163134769 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Female United-States 0 +37 0.411111116 0.0690649 0.6875 0 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Wife Amer-Indian-Eskimo Female United-States 0 +38 0.422222227 0.09120735 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Own-child White Female United-States 0 +25 0.2777778 0.180025 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +48 0.533333361 0.0881063938 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +42 0.466666669 0.123772062 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Male ? 0 +45 0.5 0.1271788 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.13510631 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +50 0.5555556 0.08358159 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Poland 0 +21 0.233333334 0.0339535475 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +44 0.4888889 0.06849105 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +60 0.6666667 0.04922931 0.5625 0 0.430670351 0.5050505 Self-emp-not-inc HS-grad Separated Other-service Not-in-family Black Male United-States 0 +21 0.233333334 0.07260769 0.625 0 0 0.0606060624 ? Some-college Never-married ? Own-child White Female United-States 0 +51 0.566666663 0.119194724 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +30 0.333333343 0.230826333 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Other-relative White Male United-States 0 +46 0.51111114 0.248238549 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 +43 0.477777779 0.01812818 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +57 0.6333333 0.106400937 0.5625 0 0 0.4848485 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 +48 0.533333361 0.07397564 0.875 0 0.43663913 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.07837112 0.8125 0.07688077 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male ? 1 +68 0.75555557 0.131932616 0.5625 0.02414024 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +33 0.366666675 0.12325681 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +22 0.244444445 0.203641132 0.5625 0.04416044 0 0.4040404 Without-pay HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +18 0.2 0.102015555 0.4375 0 0 0.07070707 ? 11th Never-married ? Other-relative White Male United-States 0 +28 0.311111122 0.146291688 0.5625 0 0 0.5050505 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +32 0.355555564 0.0213779844 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 +56 0.622222245 0.0239239447 0.5625 0 0 0.424242437 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.249102011 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +34 0.377777785 0.134186253 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +18 0.2 0.09746785 0.5625 0 0.395087242 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +39 0.433333337 0.257830352 0.375 0 0.365013778 0.4040404 Private 10th Widowed Machine-op-inspct Not-in-family Black Male United-States 0 +25 0.2777778 0.171603784 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +27 0.3 0.0475899279 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +56 0.622222245 0.03420949 0.875 0 0.430670351 0.6060606 Self-emp-not-inc Masters Divorced Sales Not-in-family White Male United-States 0 +33 0.366666675 0.149633765 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.0637204051 1 0 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +44 0.4888889 0.0701796 0.5625 0 0 0.8484849 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.30712837 0.4375 0 0 0.454545468 Self-emp-not-inc 11th Never-married Craft-repair Not-in-family White Male United-States 1 +27 0.3 0.11194817 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +25 0.2777778 0.134023935 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 1 +30 0.333333343 0.19698526 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +38 0.422222227 0.06694125 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Other-service Husband White Male El-Salvador 0 +38 0.422222227 0.470371574 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.104357436 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 +37 0.411111116 0.270759523 0.5625 0 0 0.2020202 Private HS-grad Widowed Machine-op-inspct Unmarried White Female United-States 0 +62 0.6888889 0.109668255 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.1830633 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +47 0.5222222 0.0907055661 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 +45 0.5 0.05899017 0.5625 0 0 0.141414136 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 +50 0.5555556 0.167453468 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.08769419 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 +45 0.5 0.120510139 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +23 0.25555557 0.03501369 0.5625 0 0 0.3838384 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +37 0.411111116 0.08482022 0.75 0.07688077 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.0702361763 1 0 0 0.5555556 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.41615 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Black Male United-States 0 +29 0.322222233 0.08224665 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 0 +45 0.5 0.122420281 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +41 0.455555558 0.150650129 0.5625 0 0.4331956 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.09437363 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Never-married Other-service Not-in-family White Female United-States 0 +27 0.3 0.07237667 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +51 0.566666663 0.145448431 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Handlers-cleaners Husband Other Male ? 0 +44 0.4888889 0.2063979 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.414825171 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Transport-moving Husband Black Male Nicaragua 0 +28 0.311111122 0.1355057 0.5625 1 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband Black Male United-States 1 +32 0.355555564 0.0250622183 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.132069334 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +45 0.5 0.111928634 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Other-service Own-child Black Female United-States 0 +52 0.5777778 0.196063191 0.75 0.07298073 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Other-service Husband White Male United-States 1 +24 0.266666681 0.156826437 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +19 0.211111113 0.08889443 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +47 0.5222222 0.2753328 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.0289107952 1 0.14084141 0 0.5050505 Self-emp-inc Doctorate Divorced Exec-managerial Not-in-family White Male United-States 1 +31 0.344444454 0.121971034 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.134872586 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +56 0.622222245 0.18995221 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +49 0.544444442 0.0868792161 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.07195908 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.09749412 0.625 0 0 0.181818187 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +39 0.433333337 0.07283602 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.0695916042 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.180522054 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +58 0.644444466 0.132763073 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.129068062 0.5625 0.0217402168 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family Black Male United-States 0 +59 0.655555546 0.118621543 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 1 +24 0.266666681 0.0285585355 0.8125 0 0 0.474747479 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +42 0.466666669 0.217137411 0.6875 0.02407024 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +53 0.5888889 0.08285215 0.875 0 0 0.6060606 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.142078727 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +36 0.4 0.0879770741 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female China 1 +26 0.2888889 0.167703345 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 +33 0.366666675 0.0893814 0.3125 0 0 0.4848485 Private 9th Separated Adm-clerical Not-in-family White Male United-States 0 +29 0.322222233 0.06391303 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +43 0.477777779 0.09554625 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +35 0.3888889 0.0547125526 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +48 0.533333361 0.07716078 0.8125 0 0 0.363636374 Private Bachelors Married-spouse-absent Prof-specialty Other-relative Asian-Pac-Islander Female Philippines 1 +45 0.5 0.12916775 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +43 0.477777779 0.086450845 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +27 0.3 0.0249800477 0.3125 0 0 0.3030303 Private 9th Never-married Other-service Own-child White Male United-States 0 +21 0.233333334 0.2793902 0.25 0 0 0.4040404 Private 7th-8th Never-married Craft-repair Own-child White Male United-States 0 +63 0.7 0.105609536 0.5625 0 0 0.04040404 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +39 0.433333337 0.0228887219 0.625 0.1502415 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +52 0.5777778 0.131335855 0.8125 0.1502415 0 0.5555556 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.04945831 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Widowed Prof-specialty Unmarried White Female United-States 0 +48 0.533333361 0.104845069 0.5625 0.07688077 0 0.7070707 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.122843258 0.4375 0 0 0.353535354 ? 11th Divorced ? Unmarried White Female United-States 0 +53 0.5888889 0.189313039 0.5625 0 0.2506887 0.4040404 State-gov HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +33 0.366666675 0.1672696 0.75 0 0 0.5050505 Local-gov Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.112804905 0.375 0 0 0.353535354 Private 10th Never-married Craft-repair Own-child White Male United-States 0 +18 0.2 0.115233667 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +43 0.477777779 0.142629683 1 0 0 0.24242425 Federal-gov Doctorate Separated Prof-specialty Unmarried Black Female United-States 1 +20 0.222222224 0.08228301 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.2492879 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.09358088 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +41 0.455555558 0.117582284 0.5625 0 0.4331956 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +67 0.7444445 0.06811589 0.25 0.01797018 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.19687885 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Craft-repair Not-in-family Black Male Dominican-Republic 0 +47 0.5222222 0.167559221 0.875 0 0 0.25252524 Self-emp-not-inc Masters Never-married Exec-managerial Not-in-family Black Male United-States 0 +39 0.433333337 0.21149455 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +34 0.377777785 0.143615067 0.8125 0 0.3409091 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 0 +36 0.4 0.0517577566 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +24 0.266666681 0.09989864 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +50 0.5555556 0.036546655 0.5625 0 0 0.8484849 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +21 0.233333334 0.150435269 0.5625 0.010550105 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +21 0.233333334 0.142124534 0.3125 0 0 0.5050505 Private 9th Never-married Other-service Own-child White Female Mexico 0 +40 0.444444448 0.141329765 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +19 0.211111113 0.239961475 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.0966777951 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +34 0.377777785 0.163641945 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.177726224 0.625 0 0 0.5050505 Local-gov Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +20 0.222222224 0.101774432 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 +44 0.4888889 0.139883012 0.5625 0 0.359045 0.5555556 Private HS-grad Never-married Exec-managerial Not-in-family White Male England 1 +49 0.544444442 0.0313442759 0.5625 0.005940059 0 0.1010101 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.05679512 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.15135397 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +34 0.377777785 0.1254586 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Male United-States 0 +58 0.644444466 0.0968077853 0.5625 0 0 0.727272749 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.159217492 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.03674804 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +38 0.422222227 0.179379076 0.8125 0 0 0.323232323 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +32 0.355555564 0.02889463 0.9375 0.1502415 0 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.123735018 0.5625 0 0 0.4848485 State-gov HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +23 0.25555557 0.187413663 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +35 0.3888889 0.08081875 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.191505387 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +55 0.6111111 0.248350352 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.238226458 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +22 0.244444445 0.0211402271 0.8125 0.0288502872 0 0.25252524 Private Bachelors Married-civ-spouse Adm-clerical Own-child Amer-Indian-Eskimo Female United-States 0 +27 0.3 0.07471585 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +24 0.266666681 0.114185646 0.75 0 0 0.151515156 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 +21 0.233333334 0.192308918 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +49 0.544444442 0.133881137 0.8125 0 0 0.353535354 Private Bachelors Divorced Sales Other-relative White Female United-States 0 +32 0.355555564 0.0830407441 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +64 0.7111111 0.09841012 0.625 0 0 0.24242425 Private Some-college Widowed Other-service Unmarried White Female United-States 0 +37 0.411111116 0.0200807564 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Farming-fishing Unmarried White Male United-States 0 +61 0.677777767 0.131739974 0.25 0 0 0.4040404 Private 7th-8th Married-spouse-absent Machine-op-inspct Not-in-family White Male Guatemala 0 +44 0.4888889 0.0624022968 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 1 +53 0.5888889 0.1957884 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.287856519 0.875 0 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +60 0.6666667 0.158182263 1 0 0.43663913 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.18627809 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +25 0.2777778 0.168409213 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Machine-op-inspct Not-in-family White Male Mexico 0 +29 0.322222233 0.101610087 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +51 0.566666663 0.0587355755 0.8125 0 0 0.5555556 Private Bachelors Divorced Prof-specialty Unmarried White Female England 0 +47 0.5222222 0.2314123 0.125 0 0 0.121212125 Private 1st-4th Married-spouse-absent Farming-fishing Not-in-family White Male Mexico 0 +20 0.222222224 0.06358233 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Unmarried White Female United-States 0 +25 0.2777778 0.080984436 0.4375 0.05178052 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male Poland 1 +27 0.3 0.138370931 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.13403067 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +18 0.2 0.198189542 0.5625 0 0 0.272727281 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +23 0.25555557 0.1728478 0.25 0 0 0.323232323 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.150286421 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +46 0.51111114 0.139624372 0.5625 0 0 0.373737365 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +66 0.733333349 0.182164133 0.25 0 0 0.4040404 ? 7th-8th Divorced ? Not-in-family White Male United-States 0 +46 0.51111114 0.08449961 0.875 0 0 0.3838384 Local-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +36 0.4 0.14336586 0.4375 0 0 0.232323229 Local-gov 11th Never-married Other-service Unmarried White Female United-States 0 +44 0.4888889 0.1329483 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Unmarried White Female United-States 0 +17 0.188888893 0.049395673 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 +27 0.3 0.0458252653 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +32 0.355555564 0.124622062 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +53 0.5888889 0.0721510351 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Male United-States 0 +22 0.244444445 0.0737399 0.625 0 0 0.989899 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +30 0.333333343 0.117560729 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Own-child White Female United-States 0 +47 0.5222222 0.1403693 0.8125 0 0.459595948 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +68 0.75555557 0.142509118 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.07310543 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.136334151 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +62 0.6888889 0.107869916 0.25 0.06418064 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 1 +20 0.222222224 0.118661962 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Female United-States 0 +21 0.233333334 0.178586319 0.5625 0 0 0.3838384 Private HS-grad Never-married Handlers-cleaners Other-relative White Male Jamaica 0 +34 0.377777785 0.14860259 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Other-service Not-in-family White Male ? 0 +30 0.333333343 0.204547033 0.5625 0 0 0.75757575 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.09149629 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.134649649 0.5625 0 0 0.212121218 State-gov HS-grad Never-married Other-service Own-child White Female United-States 0 +40 0.444444448 0.10138917 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Other-relative White Male United-States 0 +26 0.2888889 0.0575750768 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male United-States 0 +57 0.6333333 0.01648341 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.18383719 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.05528169 0.625 0 0 0.4040404 ? Some-college Divorced ? Unmarried Asian-Pac-Islander Female United-States 0 +49 0.544444442 0.1312685 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +58 0.644444466 0.211592883 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +32 0.355555564 0.118712477 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family Black Male United-States 0 +59 0.655555546 0.0767553151 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +42 0.466666669 0.11287158 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Other-relative White Female United-States 0 +37 0.411111116 0.0536039174 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Iran 0 +40 0.444444448 0.112252608 0.9375 0.1502415 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.04909797 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +56 0.622222245 0.232861072 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.203726 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.0285214912 0.5625 0 0 0.353535354 Private HS-grad Widowed Exec-managerial Not-in-family Black Female United-States 0 +21 0.233333334 0.1642892 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +21 0.233333334 0.08865061 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Own-child White Female Dominican-Republic 0 +47 0.5222222 0.107040793 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Wife White Female United-States 0 +22 0.244444445 0.0221734289 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 +35 0.3888889 0.170334846 0.75 0.143441439 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 1 +41 0.455555558 0.104840361 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Other-relative Black Female United-States 0 +43 0.477777779 0.10446924 0.8125 0 0 0.535353541 Federal-gov Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +60 0.6666667 0.0557518154 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +73 0.811111152 0.0176789332 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Sales Husband White Male United-States 1 +90 1 0.05993851 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female England 1 +62 0.6888889 0.08429621 0.5625 0 0 0.3838384 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +28 0.311111122 0.146856785 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.03605026 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.174682513 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +30 0.333333343 0.199671313 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +19 0.211111113 0.187858865 0.5 0 0 0.5252525 Private 12th Never-married Handlers-cleaners Own-child Black Female United-States 0 +23 0.25555557 0.3807578 0.625 0.0220202189 0 0.8080808 Private Some-college Never-married Other-service Own-child Black Male United-States 0 +22 0.244444445 0.184617817 0.8125 0 0 0.1010101 Federal-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +19 0.211111113 0.182607323 0.5625 0 0 0.282828271 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +45 0.5 0.1394937 0.75 0 0.4775023 0.4040404 Federal-gov Assoc-acdm Divorced Adm-clerical Unmarried Asian-Pac-Islander Male Philippines 0 +26 0.2888889 0.09334986 0.5625 0 0 0.25252524 Local-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 +42 0.466666669 0.121899642 0.375 1 0 0.4040404 Local-gov 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +62 0.6888889 0.107724436 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +61 0.677777767 0.07470845 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.02348076 0.8125 0 0.359045 0.6060606 Private Bachelors Divorced Sales Not-in-family Amer-Indian-Eskimo Male United-States 1 +22 0.244444445 0.1099242 0.5625 0 0 0.535353541 Local-gov HS-grad Never-married Other-service Own-child White Female United-States 0 +56 0.622222245 0.0740908161 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.154273748 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +24 0.266666681 0.0975938 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried White Male United-States 0 +26 0.2888889 0.142517209 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.0326381326 0.5625 0 0.383149683 0.454545468 Private HS-grad Never-married Sales Own-child Black Female United-States 0 +58 0.644444466 0.135645136 0.75 0 0.430670351 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Male United-States 0 +25 0.2777778 0.09190378 0.75 0 0 0.353535354 Self-emp-not-inc Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 +23 0.25555557 0.130386844 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.0614189357 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +54 0.6 0.153452709 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +28 0.311111122 0.183158278 0.625 0 0 0.353535354 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +35 0.3888889 0.0413166247 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.106268927 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.135838434 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.1537814 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +72 0.8 0.0224987455 0.375 0 0 0.2020202 Private 10th Widowed Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.06951213 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.18793565 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +54 0.6 0.143524811 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +58 0.644444466 0.08493539 0.875 0 0.454545438 0.454545468 Private Masters Divorced Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.0802341253 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +65 0.722222269 0.0215019155 0.625 0 0 0.151515156 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.170942381 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male ? 0 +52 0.5777778 0.179253116 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 +65 0.722222269 0.124604553 0.375 0 0 0.2020202 Private 10th Widowed Sales Not-in-family White Female United-States 0 +33 0.366666675 0.0229688734 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family White Female United-States 0 +35 0.3888889 0.0776006058 0.5625 0.06497065 0 0.656565666 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 +27 0.3 0.194977462 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +34 0.377777785 0.193915963 0.5625 0 0 0.424242437 State-gov HS-grad Never-married Other-service Own-child Black Male United-States 0 +53 0.5888889 0.106609732 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.04086199 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male Portugal 0 +43 0.477777779 0.15018338 1 0 0 0.4040404 State-gov Doctorate Separated Prof-specialty Unmarried White Female United-States 1 +58 0.644444466 0.1647499 0.6875 0.03908039 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.101434968 0.375 0 0.8654729 0.4040404 Private 10th Separated Adm-clerical Unmarried White Male United-States 0 +26 0.2888889 0.134129673 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +60 0.6666667 0.0886917 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.233316392 0.5625 0 0.3838384 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.263434142 0.5625 0 0 0.3030303 Federal-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +29 0.322222233 0.188821346 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +54 0.6 0.127169371 1 0 0 0.5050505 State-gov Doctorate Never-married Exec-managerial Not-in-family White Female United-States 1 +41 0.455555558 0.18689774 0.25 0 0 0.363636374 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +63 0.7 0.122287594 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +31 0.344444454 0.106785528 0.5625 0 0 0.272727281 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +23 0.25555557 0.211202234 0.8125 0 0 0.25252524 Private Bachelors Never-married Sales Own-child Black Female United-States 0 +31 0.344444454 0.398537755 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Transport-moving Not-in-family Black Male ? 0 +41 0.455555558 0.1806305 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.264218152 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +59 0.655555546 0.157143682 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.350393534 0.625 0 0 0.454545468 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.125837117 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Never-married Exec-managerial Not-in-family Black Male United-States 0 +67 0.7444445 0.0950256139 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 +65 0.722222269 0.13337262 0.5625 0 0 0.353535354 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +47 0.5222222 0.133804366 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.2756305 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male Guatemala 0 +38 0.422222227 0.2532658 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +55 0.6111111 0.05399524 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +39 0.433333337 0.06692036 0.875 0.01506015 0 0.4040404 Private Masters Divorced Prof-specialty Own-child White Female United-States 0 +24 0.266666681 0.05580031 0.5625 0 0 0.5050505 Private HS-grad Separated Other-service Unmarried White Female Portugal 1 +24 0.266666681 0.0149531392 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband Asian-Pac-Islander Male Thailand 0 +38 0.422222227 0.185372189 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +19 0.211111113 0.07920429 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +32 0.355555564 0.139871553 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +63 0.7 0.121223412 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.129711285 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +36 0.4 0.04465803 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +41 0.455555558 0.135158837 0.8125 0.06497065 0 0.4040404 Private Bachelors Divorced Transport-moving Own-child Black Male United-States 0 +57 0.6333333 0.0217989441 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Not-in-family White Male United-States 0 +48 0.533333361 0.0191937126 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.15018338 0.5625 0 0.3452709 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +25 0.2777778 0.107941307 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Asian-Pac-Islander Male China 0 +48 0.533333361 0.08131178 0.5 0 0 0.5050505 Private 12th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +20 0.222222224 0.06178534 0.625 0 0 0.08080808 Private Some-college Never-married Sales Own-child White Female United-States 0 +74 0.822222233 0.09896175 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.138550088 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +26 0.2888889 0.122358315 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +54 0.6 0.188220561 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +39 0.433333337 0.1398042 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +38 0.422222227 0.0151504846 0.625 0.07443074 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +18 0.2 0.141459748 0.375 0 0 0.4040404 Private 10th Never-married Other-service Other-relative White Female United-States 0 +32 0.355555564 0.128570318 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family Other Female ? 0 +24 0.266666681 0.07400056 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +19 0.211111113 0.19213447 0.3125 0 0 0.353535354 Self-emp-not-inc 9th Never-married Prof-specialty Not-in-family White Male Mexico 0 +28 0.311111122 0.129714653 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.156896487 0.5625 0 0 0.3030303 Private HS-grad Separated Handlers-cleaners Not-in-family Other Male United-States 0 +49 0.544444442 0.0211078972 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.205527022 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +63 0.7 0.127240092 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Other-relative Black Female Haiti 0 +58 0.644444466 0.0950795 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +68 0.75555557 0.09174752 0.5625 0 0 0.151515156 Self-emp-inc HS-grad Widowed Other-service Unmarried White Female United-States 0 +41 0.455555558 0.250138581 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +21 0.233333334 0.134152576 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +27 0.3 0.149097636 0.625 0.03103031 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.271886349 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +50 0.5555556 0.1305788 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +47 0.5222222 0.206224814 0.625 0 0 0.444444448 Private Some-college Divorced Other-service Own-child White Female United-States 0 +64 0.7111111 0.107723758 0.5625 0.0861408561 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Male United-States 1 +54 0.6 0.08364894 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +28 0.311111122 0.0470443629 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +26 0.2888889 0.114044882 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +35 0.3888889 0.116068177 0.8125 0 0 0.424242437 State-gov Bachelors Separated Exec-managerial Not-in-family White Male United-States 0 +48 0.533333361 0.0800758451 0.5625 0.0288502872 0 0.151515156 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.111954905 0.75 0.0394203924 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Wife White Female United-States 0 +39 0.433333337 0.1255603 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +46 0.51111114 0.12984331 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +41 0.455555558 0.07113602 0.625 0 0 0.4848485 Private Some-college Widowed Adm-clerical Unmarried Black Female United-States 0 +24 0.266666681 0.09504447 0.25 0.0258002579 0 0.4040404 Private 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 +57 0.6333333 0.10795074 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.110801138 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male Columbia 0 +41 0.455555558 0.139810935 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband Black Male India 1 +55 0.6111111 0.211888567 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +41 0.455555558 0.171502084 0.6875 0 0 0.8080808 ? Assoc-voc Divorced ? Not-in-family White Male United-States 0 +69 0.7666667 0.107443571 0.25 0.0296402965 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Unmarried Black Female United-States 0 +22 0.244444445 0.07552342 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +45 0.5 0.129881024 0.5625 0.0394203924 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +33 0.366666675 0.1389367 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Male United-States 0 +57 0.6333333 0.20802854 0.625 0 0 0.4040404 Private Some-college Separated Sales Not-in-family White Female United-States 0 +38 0.422222227 0.06277745 0.8125 0 0.43663913 0.656565666 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 +40 0.444444448 0.13879256 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.208724976 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Handlers-cleaners Own-child White Female United-States 0 +38 0.422222227 0.145570338 0.625 0 0 0.353535354 Local-gov Some-college Married-spouse-absent Exec-managerial Unmarried Black Female United-States 0 +26 0.2888889 0.193587288 0.8125 0 0 0.6060606 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.110186875 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +35 0.3888889 0.114562824 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Other-service Unmarried Black Female United-States 0 +37 0.411111116 0.193325281 0.625 0.05178052 0 0.75757575 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.04005779 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +37 0.411111116 0.06678162 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +37 0.411111116 0.1393462 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +28 0.311111122 0.119295754 0.875 0 0 0.8080808 Private Masters Never-married Exec-managerial Not-in-family White Female ? 0 +22 0.244444445 0.117017187 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.122693062 0.4375 0 0 0.4040404 Private 11th Never-married Adm-clerical Not-in-family White Female Germany 0 +45 0.5 0.209523112 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +29 0.322222233 0.262582123 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 +23 0.25555557 0.200142115 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +24 0.266666681 0.08791915 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +25 0.2777778 0.09247696 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Own-child White Female United-States 0 +58 0.644444466 0.212995172 0.5625 0 0 0.323232323 Private HS-grad Divorced Sales Other-relative White Female United-States 0 +28 0.311111122 0.0221741032 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Never-married Sales Not-in-family White Male United-States 0 +58 0.644444466 0.07968115 0.5625 0 0 0.353535354 Private HS-grad Widowed Sales Not-in-family White Female United-States 1 +18 0.2 0.1267868 0.4375 0 0 0.161616161 Private 11th Never-married Other-service Own-child White Male United-States 0 +59 0.655555546 0.1594465 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Protective-serv Husband White Male Puerto-Rico 0 +39 0.433333337 0.141036108 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +53 0.5888889 0.195756063 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.149467409 0.9375 0 0 0.656565666 Private Prof-school Never-married Prof-specialty Other-relative White Female United-States 0 +51 0.566666663 0.118034221 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +59 0.655555546 0.107579619 0.875 0.07298073 0 0.5555556 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.108014055 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Protective-serv Not-in-family White Male United-States 1 +36 0.4 0.310726374 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +37 0.411111116 0.126160413 0.625 0 0 0.6060606 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.0197426435 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +38 0.422222227 0.132932141 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +19 0.211111113 0.203237012 0.5625 0 0 0.3030303 Private HS-grad Separated Adm-clerical Own-child White Female United-States 0 +55 0.6111111 0.09122284 0.8125 0 0 0.4848485 Local-gov Bachelors Widowed Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.229619354 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +27 0.3 0.104436234 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +65 0.722222269 0.135211378 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +44 0.4888889 0.217973948 0.8125 0 0 0.05050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +23 0.25555557 0.104344636 0.1875 0 0 0.5050505 ? 5th-6th Never-married ? Not-in-family White Male United-States 0 +32 0.355555564 0.08851927 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +60 0.6666667 0.124093339 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 +28 0.311111122 0.100874588 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male Cambodia 0 +44 0.4888889 0.08414062 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male Mexico 0 +29 0.322222233 0.170406252 0.5625 0 0 0.161616161 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +57 0.6333333 0.169041 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.0701796 0.625 0 0 0.6060606 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 +34 0.377777785 0.1685062 0.4375 0 0 0.6060606 Self-emp-not-inc 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +44 0.4888889 0.126847416 0.625 0 0 0.424242437 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +44 0.4888889 0.126167834 0.8125 0 0 0.4040404 Private Bachelors Divorced Transport-moving Not-in-family White Male United-States 0 +57 0.6333333 0.08804039 0.125 0 0 0.222222224 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +37 0.411111116 0.0275846049 0.8125 0 0 0.3030303 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +35 0.3888889 0.07215238 0.8125 0 0 0.161616161 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.0981434062 0.875 1 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male ? 1 +27 0.3 0.09021119 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +41 0.455555558 0.197672263 0.625 0.03103031 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +28 0.311111122 0.136902615 0.8125 0 0 0.08080808 ? Bachelors Never-married ? Not-in-family White Male United-States 0 +37 0.411111116 0.0965632945 1 0 0 0.6060606 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +18 0.2 0.0348816775 0.625 0 0 0.08080808 Private Some-college Never-married Other-service Own-child White Male United-States 0 +24 0.266666681 0.142148778 0.25 0 0 0.2020202 State-gov 7th-8th Never-married Tech-support Unmarried White Female United-States 0 +53 0.5888889 0.05509108 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Adm-clerical Wife White Female United-States 0 +40 0.444444448 0.09375129 0.5625 0 0.454545438 0.4848485 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +54 0.6 0.101703033 0.625 0 0 0.6060606 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +22 0.244444445 0.224055961 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +44 0.4888889 0.161677241 0.375 0 0 0.3030303 Private 10th Married-spouse-absent Adm-clerical Unmarried Black Female United-States 0 +43 0.477777779 0.125404045 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Unmarried White Female Iran 0 +58 0.644444466 0.1504676 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +59 0.655555546 0.06899822 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +31 0.344444454 0.159357592 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.190769881 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +17 0.188888893 0.10110157 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Female United-States 0 +45 0.5 0.06875171 0.625 0 0 0.323232323 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +40 0.444444448 0.2524165 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 +35 0.3888889 0.02190873 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +25 0.2777778 0.03371242 0.8125 0 0 0.454545468 Federal-gov Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +58 0.644444466 0.143371239 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +39 0.433333337 0.0206593238 0.625 0 0 0.5050505 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 1 +69 0.7666667 0.16720359 0.125 0 0 0.343434334 ? 1st-4th Married-civ-spouse ? Husband Asian-Pac-Islander Male Philippines 0 +23 0.25555557 0.2825841 0.5625 0 0 0.545454562 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.119361088 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +48 0.533333361 0.07958349 0.75 0 0 0.444444448 Private Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 +41 0.455555558 0.078393355 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male Germany 0 +74 0.822222233 0.130875826 0.3125 0 0 0.1010101 Private 9th Widowed Craft-repair Not-in-family White Male ? 0 +43 0.477777779 0.07536514 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.130187482 0.625 0 0.395087242 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +24 0.266666681 0.193969846 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Armed-Forces Not-in-family White Male United-States 0 +58 0.644444466 0.09944939 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +54 0.6 0.0792574957 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +60 0.6666667 0.126259431 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.276385546 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +41 0.455555558 0.139810935 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +62 0.6888889 0.0374626629 0.625 0 0 0.353535354 ? Some-college Married-civ-spouse ? Husband Black Male United-States 1 +27 0.3 0.182691514 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Unmarried Black Male Jamaica 0 +30 0.333333343 0.127161965 0.625 0 0 0.2020202 Private Some-college Divorced Other-service Own-child White Female United-States 0 +63 0.7 0.113595635 0.8125 0 0 0.353535354 Local-gov Bachelors Divorced Craft-repair Not-in-family Black Male Outlying-US(Guam-USVI-etc) 0 +33 0.366666675 0.310100675 0.5625 0.0332503319 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +34 0.377777785 0.162917882 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.08962117 0.3125 0 0 0.4040404 ? 9th Never-married ? Own-child White Male United-States 0 +51 0.566666663 0.130731016 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +21 0.233333334 0.147596329 0.375 0 0 0.25252524 Private 10th Never-married Other-service Own-child Black Male United-States 0 +50 0.5555556 0.0212978348 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.139883012 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.03842649 0.5625 0.0288502872 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.07399046 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +20 0.222222224 0.248990878 0.5625 0 0 0.434343427 ? HS-grad Never-married ? Not-in-family Other Male United-States 0 +17 0.188888893 0.03610886 0.5 0 0 0.0606060624 Private 12th Never-married Other-service Own-child White Female United-States 0 +47 0.5222222 0.232312828 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Transport-moving Not-in-family Black Male United-States 0 +25 0.2777778 0.133907408 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Adm-clerical Other-relative Black Female United-States 0 +71 0.788888931 0.12172991 0.875 0 0 0.2020202 Private Masters Never-married Other-service Not-in-family White Female United-States 0 +21 0.233333334 0.126673654 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Female United-States 0 +69 0.7666667 0.107143849 0.4375 0 0 0.4848485 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +48 0.533333361 0.117753364 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +57 0.6333333 0.0961746648 0.25 0 0.3677686 0.0303030312 Private 7th-8th Widowed Sales Other-relative White Female United-States 0 +58 0.644444466 0.029110834 0.625 0 0.5544077 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +34 0.377777785 0.127120212 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Machine-op-inspct Other-relative Other Female Columbia 0 +33 0.366666675 0.149965152 0.625 0 0 0.6666667 Local-gov Some-college Married-civ-spouse Handlers-cleaners Husband White Male ? 0 +56 0.622222245 0.169620231 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male ? 0 +40 0.444444448 0.07569719 0.875 0 0 0.4040404 Federal-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +28 0.311111122 0.141200438 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +42 0.466666669 0.211452782 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male Ecuador 0 +19 0.211111113 0.090909645 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 +41 0.455555558 0.102877006 0.6875 0.0332503319 0 0.4040404 Private Assoc-voc Divorced Tech-support Not-in-family White Female United-States 0 +28 0.311111122 0.103246778 0.5625 0 0 0.353535354 Self-emp-inc HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.238048643 0.375 0 0 0.353535354 Private 10th Divorced Machine-op-inspct Not-in-family White Female United-States 0 +23 0.25555557 0.0650870055 0.625 0 0 0.3030303 Private Some-college Never-married Machine-op-inspct Own-child Asian-Pac-Islander Male United-States 0 +46 0.51111114 0.136431143 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 1 +39 0.433333337 0.101068564 0.875 0 0 0.5050505 Private Masters Never-married Sales Not-in-family White Male United-States 1 +39 0.433333337 0.07735139 0.8125 0 0.430670351 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +45 0.5 0.08947703 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 +21 0.233333334 0.0278546922 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 +50 0.5555556 0.06311355 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Sales Not-in-family White Female United-States 0 +33 0.366666675 0.2083579 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +34 0.377777785 0.08290132 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Own-child White Female United-States 0 +55 0.6111111 0.117640883 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +62 0.6888889 0.1194143 0.5625 0 0 0.4040404 Federal-gov HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +31 0.344444454 0.14270848 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.306400955 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.156579927 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 +57 0.6333333 0.1647499 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.10162019 0.5625 0 0.4331956 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +51 0.566666663 0.173325345 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +47 0.5222222 0.221689835 0.5625 0.04386044 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.07877659 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +58 0.644444466 0.180280268 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male Mexico 0 +39 0.433333337 0.03224277 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 1 +34 0.377777785 0.19931367 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male England 1 +45 0.5 0.118289493 0.5625 0 0 0.3838384 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.08728064 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +42 0.466666669 0.12809211 0.8125 1 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.113201618 0.6875 0.0332503319 0 0.4040404 Private Assoc-voc Divorced Tech-support Not-in-family White Male United-States 0 +39 0.433333337 0.136072159 0.9375 0 0.453856736 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.136499852 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +56 0.622222245 0.06832065 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Other-relative Amer-Indian-Eskimo Female United-States 0 +19 0.211111113 0.0803082138 0.625 0 0 0.151515156 ? Some-college Never-married ? Other-relative White Female United-States 0 +37 0.411111116 0.242972851 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 +60 0.6666667 0.06282191 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +56 0.622222245 0.09804911 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.0685132742 0.25 0.03908039 0 0.474747479 Private 7th-8th Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 +34 0.377777785 0.09145588 0.8125 0 0 0.363636374 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.14711003 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Female United-States 0 +19 0.211111113 0.08601642 0.5625 0 0 0.3030303 Private HS-grad Never-married Farming-fishing Own-child Black Male United-States 0 +37 0.411111116 0.301970422 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Exec-managerial Unmarried Black Female United-States 0 +58 0.644444466 0.209011227 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.169408068 0.4375 0 0 0.353535354 Private 11th Never-married Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.172090083 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +36 0.4 0.07853951 0.5625 0.0486504845 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.04782701 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female Philippines 0 +22 0.244444445 0.1178517 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Tech-support Own-child White Female United-States 0 +32 0.355555564 0.0727572143 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family White Male United-States 0 +17 0.188888893 0.137413159 0.4375 0 0 0.151515156 Private 11th Never-married Sales Unmarried White Male United-States 0 +57 0.6333333 0.246892825 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Female United-States 0 +68 0.75555557 0.08206748 0.25 0 0 0.2020202 Private 7th-8th Widowed Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 +70 0.7777778 0.1873362 0.5625 0.0343203433 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.07724834 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +19 0.211111113 0.3615028 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Other-relative White Female Japan 0 +51 0.566666663 0.06360321 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +19 0.211111113 0.192632213 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Other-relative White Male Nicaragua 0 +47 0.5222222 0.06848768 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.237645864 0.8125 0.07688077 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.06677825 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +30 0.333333343 0.155864641 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.106988259 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +41 0.455555558 0.128500953 0.8125 0 0 0.2020202 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +25 0.2777778 0.20644708 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +62 0.6888889 0.102476925 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 +23 0.25555557 0.208512813 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +26 0.2888889 0.0881198645 0.8125 0 0 0.1010101 ? Bachelors Never-married ? Unmarried White Female United-States 0 +25 0.2777778 0.131269857 0.5625 0.068490684 0 0.4040404 Private HS-grad Never-married Sales Own-child Amer-Indian-Eskimo Male United-States 0 +30 0.333333343 0.08761202 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +48 0.533333361 0.02693195 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +20 0.222222224 0.255402923 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative Other Male Mexico 0 +51 0.566666663 0.127811253 0.625 0 0 0.151515156 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +19 0.211111113 0.119988151 0.625 0 0 0.1010101 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +31 0.344444454 0.223868713 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +36 0.4 0.118379749 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.1765078 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +40 0.444444448 0.185522377 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Male United-States 0 +30 0.333333343 0.187594175 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Never-married Farming-fishing Own-child Black Male United-States 0 +28 0.311111122 0.0368308872 0.625 0 0.365013778 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +57 0.6333333 0.0916727558 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband Black Male United-States 1 +18 0.2 0.1386767 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Male United-States 0 +54 0.6 0.141937956 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +32 0.355555564 0.112233743 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +52 0.5777778 0.124794491 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.121608675 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried White Female United-States 0 +45 0.5 0.134072423 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 0 +18 0.2 0.09766587 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +37 0.411111116 0.124371514 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +52 0.5777778 0.241498485 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +59 0.655555546 0.20706 0.3125 0 0 0.5050505 Private 9th Never-married Other-service Not-in-family Black Male United-States 0 +27 0.3 0.317955434 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Not-in-family White Male United-States 0 +43 0.477777779 0.07783499 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +56 0.622222245 0.0218535 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.0223081354 0.625 0 0 0.727272749 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +37 0.411111116 0.123489179 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.080684714 0.6875 0.105201051 0 0.5050505 Private Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 1 +48 0.533333361 0.06592757 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Separated Other-service Other-relative White Female United-States 0 +58 0.644444466 0.0213725958 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.138916492 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.0695916042 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.09122082 0.9375 0 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.253555417 0.6875 0 0 0.3838384 Private Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 +52 0.5777778 0.10823901 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +30 0.333333343 0.08870382 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +22 0.244444445 0.164236 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Own-child White Male United-States 0 +55 0.6111111 0.235676453 0.75 0 0 0.6060606 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +61 0.677777767 0.114677332 0.5625 0.1502415 0 0.3838384 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +33 0.366666675 0.124136448 0.5625 0 0 0.3030303 Private HS-grad Divorced Handlers-cleaners Unmarried White Male United-States 0 +46 0.51111114 0.151007786 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +64 0.7111111 0.102067418 0.4375 0 0 0.161616161 Private 11th Widowed Tech-support Unmarried White Female United-States 0 +28 0.311111122 0.155719146 0.375 0 0 0.4040404 Private 10th Married-spouse-absent Craft-repair Unmarried White Male Mexico 0 +19 0.211111113 0.1885681 0.5625 0 0 0.424242437 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.109551057 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Male Columbia 0 +43 0.477777779 0.0876443461 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.107846342 1 0 0 0.4040404 Self-emp-not-inc Doctorate Divorced Adm-clerical Other-relative Other Male ? 0 +56 0.622222245 0.108884931 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.135827661 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 +40 0.444444448 0.09236987 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +45 0.5 0.0823099539 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.12337064 0.875 0 0 0.4040404 Local-gov Masters Widowed Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.08521087 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Female ? 0 +35 0.3888889 0.124639578 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +36 0.4 0.275089681 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.133751154 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +61 0.677777767 0.134166718 0.25 0 0 0.212121218 Private 7th-8th Widowed Other-service Not-in-family Black Female United-States 0 +31 0.344444454 0.124136448 0.6875 0 0.454545438 0.6060606 Private Assoc-voc Never-married Transport-moving Own-child White Male United-States 0 +63 0.7 0.116346344 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +41 0.455555558 0.138177618 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +48 0.533333361 0.111108944 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +45 0.5 0.109520748 0.5625 0 0 0.353535354 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +24 0.266666681 0.120984979 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.0696488544 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family Black Male Germany 1 +27 0.3 0.0245435964 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +26 0.2888889 0.0387363136 0.6875 0 0 0.4848485 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 +27 0.3 0.12661168 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +55 0.6111111 0.265216321 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.07323071 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.121607326 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +51 0.566666663 0.118703716 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +56 0.622222245 0.04763236 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.0241731536 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +50 0.5555556 0.191065565 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.07108483 0.8125 0 0.4708448 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +44 0.4888889 0.275285 0.5625 0.0367403664 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +21 0.233333334 0.0390084237 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Own-child White Male United-States 0 +37 0.411111116 0.119871624 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.119420357 0.375 0 0 0.4040404 ? 10th Divorced ? Not-in-family White Male Columbia 0 +18 0.2 0.07802156 0.5 0 0 0.3030303 Private 12th Never-married Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.138247 0.5625 0.0288502872 0 0.8080808 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +38 0.422222227 0.07934371 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +19 0.211111113 0.142354876 0.5625 0 0 0.121212125 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +46 0.51111114 0.116685137 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.231157035 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 +22 0.244444445 0.270552069 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female Mexico 0 +38 0.422222227 0.1320956 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.113814533 0.875 0.14084141 0 0.5050505 Private Masters Divorced Exec-managerial Own-child White Female United-States 1 +83 0.922222257 0.144046128 0.5625 0 0 0.08080808 Self-emp-not-inc HS-grad Widowed Exec-managerial Not-in-family White Male United-States 0 +34 0.377777785 0.0371629372 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +38 0.422222227 0.103708148 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.08026914 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 +27 0.3 0.11390613 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 1 +38 0.422222227 0.105441824 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.07382544 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +38 0.422222227 0.0179820228 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +52 0.5777778 0.159288883 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.206309676 0.875 0 0 0.5050505 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +17 0.188888893 0.163515985 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.0839762762 0.8125 0.068490684 0 0.6060606 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +52 0.5777778 0.0295742266 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +34 0.377777785 0.07598816 0.5625 0.0246302467 0 0.4040404 Private HS-grad Separated Handlers-cleaners Not-in-family White Male United-States 0 +25 0.2777778 0.0998851657 0.8125 0 0 0.151515156 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +17 0.188888893 0.0898825 0.3125 0 0 0.262626261 Private 9th Never-married Other-service Own-child Black Male United-States 0 +22 0.244444445 0.177590832 0.5625 0 0 0.8080808 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +22 0.244444445 0.186228245 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +46 0.51111114 0.128049016 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +58 0.644444466 0.213833049 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Female United-States 0 +39 0.433333337 0.101870745 0.625 0 0 0.353535354 Private Some-college Divorced Sales Other-relative White Female United-States 0 +59 0.655555546 0.0879178047 0.625 0 0 0.4040404 Local-gov Some-college Widowed Other-service Not-in-family White Female Poland 0 +61 0.677777767 0.107807279 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +32 0.355555564 0.2018145 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.115325943 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Philippines 1 +51 0.566666663 0.0224313922 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.064412795 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Other-service Wife Asian-Pac-Islander Female ? 0 +20 0.222222224 0.164260238 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +38 0.422222227 0.122395359 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +44 0.4888889 0.135673419 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 1 +28 0.311111122 0.224982068 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Sales Not-in-family White Male United-States 0 +50 0.5555556 0.148190379 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 +53 0.5888889 0.0483409166 1 0 0 0.5050505 Private Doctorate Divorced Prof-specialty Not-in-family White Male United-States 0 +42 0.466666669 0.0186306369 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +47 0.5222222 0.128921911 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 +39 0.433333337 0.08348123 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +38 0.422222227 0.0254447851 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +34 0.377777785 0.115319878 0.8125 0 0 0.5050505 State-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +40 0.444444448 0.06328193 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 0 +63 0.7 0.110331014 0.625 0 0 0.2020202 Private Some-college Widowed Sales Not-in-family White Female United-States 0 +53 0.5888889 0.233550772 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +43 0.477777779 0.126918152 0.6875 0 0 0.4848485 Private Assoc-voc Divorced Prof-specialty Not-in-family White Male United-States 0 +28 0.311111122 0.0487928577 0.625 0 0.383149683 0.6060606 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +68 0.75555557 0.125513151 0.5625 0 0 0.1010101 Private HS-grad Widowed Exec-managerial Not-in-family White Female United-States 1 +22 0.244444445 0.144296676 0.25 0 0 0.4040404 ? 7th-8th Never-married ? Unmarried White Female Mexico 0 +46 0.51111114 0.265951842 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +57 0.6333333 0.17689845 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +38 0.422222227 0.08456226 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +66 0.733333349 0.129658088 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.08844181 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 +54 0.6 0.167926967 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.116356447 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +35 0.3888889 0.141437531 0.4375 0 0 0.08080808 Private 11th Separated Priv-house-serv Unmarried White Female Mexico 0 +30 0.333333343 0.11245399 0.8125 0 0 0.373737365 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +39 0.433333337 0.212359369 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +31 0.344444454 0.191757292 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family Black Male United-States 0 +50 0.5555556 0.112187274 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +30 0.333333343 0.117096663 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.127445519 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 +24 0.266666681 0.14196828 0.8125 0 0 0.4040404 Private Bachelors Never-married Priv-house-serv Not-in-family White Female France 0 +59 0.655555546 0.115395315 0.5625 0 0.5369605 0.4040404 Local-gov HS-grad Separated Protective-serv Other-relative Black Female United-States 0 +45 0.5 0.13459374 0.8125 0 0 0.151515156 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +64 0.7111111 0.169253826 0.1875 0 0 0.2020202 Private 5th-6th Separated Other-service Other-relative White Female Cuba 0 +61 0.677777767 0.0823368952 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Other-service Wife White Female United-States 0 +42 0.466666669 0.128488153 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Unmarried White Female United-States 0 +28 0.311111122 0.187738314 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +53 0.5888889 0.08416689 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +33 0.366666675 0.112800859 0.4375 0 0 0.07070707 Self-emp-not-inc 11th Divorced Handlers-cleaners Not-in-family White Male United-States 0 +34 0.377777785 0.165759534 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 0 +41 0.455555558 0.11558862 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +67 0.7444445 0.177877083 0.625 0.09386094 0 0.24242425 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male Cuba 1 +46 0.51111114 0.119292386 0.75 0 0 0.272727281 Private Assoc-acdm Widowed Prof-specialty Unmarried White Female United-States 0 +32 0.355555564 0.09843976 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +41 0.455555558 0.133491844 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.05368878 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Other Male United-States 0 +54 0.6 0.104253039 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +33 0.366666675 0.12286818 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried Black Male United-States 0 +20 0.222222224 0.233913139 0.5625 0 0 0.323232323 ? HS-grad Never-married ? Own-child White Male United-States 0 +34 0.377777785 0.07987041 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +20 0.222222224 0.148066461 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Male ? 0 +17 0.188888893 0.100201055 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child Black Male United-States 0 +45 0.5 0.13296783 0.625 0 0 0.4848485 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.1705322 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +25 0.2777778 0.12950249 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +38 0.422222227 0.0872718841 0.5625 0 0 0.414141417 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.117065005 0.4375 0 0 0.151515156 Private 11th Never-married Craft-repair Own-child White Female United-States 0 +35 0.3888889 0.146758452 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +38 0.422222227 0.0693322942 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.274461925 0.75 0 0 0.565656543 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 +25 0.2777778 0.03371242 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male Japan 0 +57 0.6333333 0.15719083 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male Cuba 0 +32 0.355555564 0.1825063 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 +39 0.433333337 0.183313191 0.8125 0 0 0.3030303 Local-gov Bachelors Separated Prof-specialty Not-in-family Black Male United-States 0 +23 0.25555557 0.134649649 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +21 0.233333334 0.205954045 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 +47 0.5222222 0.07252754 0.5625 0 0 0.4848485 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +25 0.2777778 0.12696597 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Other-relative White Female Dominican-Republic 0 +18 0.2 0.0190684348 0.4375 0 0 0.353535354 ? 11th Never-married ? Own-child White Female United-States 0 +41 0.455555558 0.132732764 0.625 0.046500463 0 0.4040404 Federal-gov Some-college Married-spouse-absent Adm-clerical Not-in-family Black Male United-States 0 +19 0.211111113 0.1197807 0.5625 0 0 0.151515156 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +24 0.266666681 0.052310057 0.5625 0 0 0.424242437 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +57 0.6333333 0.08602922 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.1159658 1 0 0.6483012 0.4040404 ? Doctorate Never-married ? Not-in-family White Male United-States 1 +32 0.355555564 0.0718944147 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +28 0.311111122 0.129883036 0.6875 0 0 0.454545468 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.0535668731 0.8125 0 0 0.75757575 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.227497056 0.625 0 0 0.2020202 State-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 +45 0.5 0.0223842449 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +17 0.188888893 0.0229594428 0.5 0 0 0.25252524 ? 12th Never-married ? Own-child White Female United-States 0 +55 0.6111111 0.119150944 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.115947612 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +49 0.544444442 0.134072423 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +38 0.422222227 0.0323922932 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +50 0.5555556 0.09676266 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +47 0.5222222 0.113380775 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +43 0.477777779 0.13148202 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife Black Female ? 0 +39 0.433333337 0.155134529 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male Canada 1 +42 0.466666669 0.253297448 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.2897377 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Other-relative Black Female United-States 0 +44 0.4888889 0.162071258 0.75 0.0235402342 0 0.4040404 Federal-gov Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 +50 0.5555556 0.106616467 0.9375 1 0 0.8080808 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.0193540137 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 +37 0.411111116 0.112804905 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +59 0.655555546 0.07624613 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +56 0.622222245 0.07001256 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.2091493 0.5 0 0 0.323232323 Self-emp-not-inc 12th Never-married Craft-repair Not-in-family Black Male United-States 0 +35 0.3888889 0.0708140656 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +44 0.4888889 0.103380136 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male United-States 0 +57 0.6333333 0.171716943 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.07957742 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family Black Female United-States 0 +18 0.2 0.180483669 0.4375 0 0 0.151515156 Private 11th Never-married Sales Not-in-family White Female United-States 0 +43 0.477777779 0.0341118276 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.0994810462 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Other Male United-States 0 +18 0.2 0.3009157 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +47 0.5222222 0.11333026 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +53 0.5888889 0.0788426 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +59 0.655555546 0.0949394 0.6875 0 0 0.353535354 Self-emp-not-inc Assoc-voc Never-married Exec-managerial Not-in-family White Male United-States 1 +35 0.3888889 0.125362277 0.875 0 0 0.3838384 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 0 +49 0.544444442 0.180664852 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.326743037 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 +25 0.2777778 0.0211153068 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male England 0 +36 0.4 0.142001271 0.875 0 0 0.3030303 State-gov Masters Never-married Prof-specialty Own-child White Female United-States 0 +29 0.322222233 0.132295638 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +52 0.5777778 0.115959063 0.375 0 0 0.25252524 Private 10th Divorced Other-service Other-relative White Female United-States 0 +50 0.5555556 0.125657961 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.0803924054 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child Asian-Pac-Islander Female United-States 0 +44 0.4888889 0.0738759562 0.875 0 0 0.4040404 Self-emp-not-inc Masters Divorced Exec-managerial Unmarried White Female United-States 0 +32 0.355555564 0.114224039 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +49 0.544444442 0.08447537 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +31 0.344444454 0.3367686 0.125 0 0 0.454545468 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +33 0.366666675 0.150966689 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +50 0.5555556 0.07630472 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +62 0.6888889 0.08351289 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +26 0.2888889 0.0391310081 0.625 0 0.453168035 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +46 0.51111114 0.0253733918 0.5625 0 0 0.151515156 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +55 0.6111111 0.1334575 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.0238471627 0.5625 0 0 0.2020202 Federal-gov HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 +22 0.244444445 0.13431558 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +43 0.477777779 0.0979595259 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.160596222 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +48 0.533333361 0.143431857 0.875 0.1502415 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.03810993 0.4375 0 0 0.5050505 Private 11th Never-married Other-service Own-child White Male United-States 0 +67 0.7444445 0.119169131 0.25 0 0 0.2020202 Local-gov 7th-8th Widowed Other-service Not-in-family White Female United-States 0 +39 0.433333337 0.127009079 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +52 0.5777778 0.210479528 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Divorced Farming-fishing Not-in-family White Female United-States 0 +25 0.2777778 0.187514693 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.07693448 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 1 +18 0.2 0.123941123 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 +41 0.455555558 0.123262875 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 +59 0.655555546 0.138585776 1 0 0 0.5050505 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 +23 0.25555557 0.311370939 0.75 0 0 0.444444448 Private Assoc-acdm Never-married Other-service Own-child Black Male United-States 0 +42 0.466666669 0.068757765 0.5625 0 0 0.151515156 Private HS-grad Divorced Other-service Own-child White Female United-States 0 +54 0.6 0.0561128333 0.9375 0 0 0.3030303 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.167503983 0.5625 0 0 0.6060606 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +57 0.6333333 0.128474683 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Other-service Husband White Male United-States 0 +51 0.566666663 0.109778039 0.375 0 0 0.25252524 Private 10th Divorced Other-service Unmarried White Female United-States 0 +31 0.344444454 0.105670825 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.209051639 0.625 0 0 0.454545468 Private Some-college Married-spouse-absent Adm-clerical Own-child Black Female United-States 0 +35 0.3888889 0.115973212 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +26 0.2888889 0.209803969 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +42 0.466666669 0.298717946 1 0 0 0.454545468 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.102482311 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.104997292 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 +38 0.422222227 0.2104984 0.8125 0 0 0.373737365 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +51 0.566666663 0.190437838 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male Canada 0 +27 0.3 0.138172239 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.0807689056 0.8125 0 0 0.454545468 ? Bachelors Never-married ? Not-in-family Black Male ? 0 +22 0.244444445 0.2703911 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +72 0.8 0.116809063 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male Cuba 0 +25 0.2777778 0.1273162 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 +58 0.644444466 0.0239448249 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.0287639629 0.625 0 0 0.454545468 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +63 0.7 0.0720075741 0.1875 0 0 0.1919192 Private 5th-6th Widowed Other-service Other-relative Asian-Pac-Islander Female Philippines 0 +23 0.25555557 0.0358623452 0.3125 0 0 0.4040404 Private 9th Separated Other-service Not-in-family White Male United-States 0 +51 0.566666663 0.149303734 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +75 0.8333334 0.0484257825 0.0625 0 0 0.4848485 Private Preschool Never-married Priv-house-serv Not-in-family Asian-Pac-Islander Female Philippines 0 +52 0.5777778 0.149596721 0.625 0 0 0.5050505 Private Some-college Divorced Sales Unmarried White Female United-States 0 +69 0.7666667 0.1869651 0.5625 0 0 0.1010101 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +52 0.5777778 0.120551221 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 +40 0.444444448 0.2638531 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +34 0.377777785 0.281550884 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.0264268 0.625 0 0 0.08080808 State-gov Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.05846818 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Other-relative White Female United-States 0 +46 0.51111114 0.0994406343 0.1875 0 0.43663913 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +21 0.233333334 0.124439538 0.625 0 0 0.161616161 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +44 0.4888889 0.128817514 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.07135627 0.5625 0.03908039 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +40 0.444444448 0.0682101846 0.5625 0 0 0.323232323 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +33 0.366666675 0.117884025 0.5625 0 0 0.373737365 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +22 0.244444445 0.240864009 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.055753164 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +75 0.8333334 0.147181436 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 +55 0.6111111 0.120922342 0.4375 0 0 0.4040404 Private 11th Widowed Handlers-cleaners Unmarried White Female United-States 0 +24 0.266666681 0.0224549659 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 +45 0.5 0.100052871 0.625 0.2782828 0 0.565656543 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 1 +31 0.344444454 0.1334063 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +49 0.544444442 0.159348831 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +26 0.2888889 0.112656049 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +61 0.677777767 0.108399987 0.875 0.03103031 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.07246153 0.875 0.03908039 0 0.5050505 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 +28 0.311111122 0.16963236 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +79 0.8777778 0.109880418 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +51 0.566666663 0.203797385 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Other-relative Black Female United-States 0 +44 0.4888889 0.04353188 1 0 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +24 0.266666681 0.05599833 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +46 0.51111114 0.219604567 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.0562206 0.5625 0 0 0.2020202 Private HS-grad Widowed Other-service Unmarried Asian-Pac-Islander Female United-States 0 +23 0.25555557 0.114548013 0.5 0 0 0.3838384 Private 12th Never-married Other-service Not-in-family White Female United-States 0 +25 0.2777778 0.140010983 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +48 0.533333361 0.0806368962 0.625 0 0 0.08080808 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 0 +18 0.2 0.226081952 0.4375 0 0 0.24242425 Private 11th Never-married Other-service Other-relative Black Female United-States 0 +25 0.2777778 0.1431409 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +19 0.211111113 0.0283349231 0.5625 0.0217602178 0 0.454545468 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +26 0.2888889 0.08875635 0.8125 0 0.459595948 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +33 0.366666675 0.159220859 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +42 0.466666669 0.107705571 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +22 0.244444445 0.09014114 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +36 0.4 0.152856633 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.11733038 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +34 0.377777785 0.0334793776 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.136045888 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +62 0.6888889 0.1093463 0.9375 0 0 0.151515156 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.123144329 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Black Female United-States 0 +22 0.244444445 0.258369863 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +34 0.377777785 0.0474612825 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 +43 0.477777779 0.124500155 0.5625 0 0 0.6060606 Private HS-grad Widowed Machine-op-inspct Unmarried White Female United-States 0 +25 0.2777778 0.119051263 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Own-child White Male United-States 0 +35 0.3888889 0.07578071 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Own-child White Female United-States 0 +28 0.311111122 0.09247359 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Not-in-family Black Female United-States 0 +28 0.311111122 0.0254737474 0.625 0 0 0.454545468 Private Some-college Divorced Sales Unmarried White Female United-States 0 +25 0.2777778 0.198765412 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Unmarried Black Female United-States 0 +40 0.444444448 0.275285 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.172178984 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband Other Male Mexico 0 +48 0.533333361 0.119742982 0.25 0 0 0.5050505 Self-emp-not-inc 7th-8th Never-married Farming-fishing Not-in-family White Male United-States 0 +63 0.7 0.120832086 0.5625 0.02290023 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.161838889 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +36 0.4 0.276172042 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.121685453 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +24 0.266666681 0.132236376 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 +32 0.355555564 0.107217938 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +46 0.51111114 0.151589036 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Machine-op-inspct Wife White Female Mexico 0 +19 0.211111113 0.119988151 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Male United-States 0 +30 0.333333343 0.183651969 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family Asian-Pac-Islander Male United-States 0 +35 0.3888889 0.234047174 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.098604776 0.8125 0 0 0.5555556 ? Bachelors Never-married ? Not-in-family White Male United-States 0 +33 0.366666675 0.0506275669 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +25 0.2777778 0.089831315 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 +64 0.7111111 0.05707329 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male United-States 1 +18 0.2 0.06498463 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child Asian-Pac-Islander Female United-States 0 +59 0.655555546 0.247864053 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.0242687948 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Protective-serv Unmarried Black Female United-States 0 +30 0.333333343 0.117339812 1 0 0 0.151515156 Private Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.15408583 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Other-relative White Female Mexico 0 +22 0.244444445 0.163609609 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +49 0.544444442 0.0583961122 0.625 0 0 0.565656543 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 1 +35 0.3888889 0.112176493 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +48 0.533333361 0.08191661 0.875 0 0.3168044 0.4040404 Local-gov Masters Never-married Prof-specialty Unmarried White Female United-States 0 +18 0.2 0.135793313 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 +35 0.3888889 0.0201211683 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +27 0.3 0.113246739 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 +28 0.311111122 0.109384693 0.8125 0 0 0.6060606 Private Bachelors Never-married Craft-repair Not-in-family Black Male United-States 0 +21 0.233333334 0.109220356 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Male Taiwan 0 +26 0.2888889 0.0936994255 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Own-child Black Female United-States 0 +44 0.4888889 0.129575238 0.8125 0 0.4242424 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.249601781 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family Black Male United-States 0 +40 0.444444448 0.1017293 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Craft-repair Not-in-family White Male United-States 0 +70 0.7777778 0.0244567115 0.8125 0.200512 0 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.183156252 0.875 0 0 0.5050505 Private Masters Never-married Exec-managerial Unmarried White Female United-States 0 +34 0.377777785 0.122853361 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family Black Male United-States 0 +66 0.733333349 0.1581075 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +40 0.444444448 0.122677572 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Unmarried Black Male United-States 0 +61 0.677777767 0.145207971 0.5625 0 0.4331956 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +59 0.655555546 0.06496847 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.1384531 0.875 0 0 0.4040404 ? Masters Never-married ? Not-in-family Black Female United-States 0 +47 0.5222222 0.126679033 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +33 0.366666675 0.08166269 0.8125 0 0 0.6060606 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.08572275 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Other-relative White Male United-States 0 +25 0.2777778 0.0770153 0.3125 0.009140091 0 0.4040404 Private 9th Never-married Craft-repair Unmarried White Male United-States 0 +22 0.244444445 0.229828149 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +40 0.444444448 0.112408191 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 1 +68 0.75555557 0.04427142 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +30 0.333333343 0.0978180841 0.75 0 0.404499531 0.4040404 Private Assoc-acdm Divorced Adm-clerical Own-child White Female United-States 0 +73 0.811111152 0.0690440238 0.25 0.06418064 0 1 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 1 +45 0.5 0.192182958 0.25 0 0 0.1010101 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.1192742 0.4375 0 0 0.353535354 Private 11th Never-married Adm-clerical Unmarried Black Male United-States 0 +40 0.444444448 0.161987737 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.147160545 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.2590757 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +51 0.566666663 0.127669141 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child Black Male United-States 0 +53 0.5888889 0.131198451 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +24 0.266666681 0.131090015 0.8125 0 0 0.353535354 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +53 0.5888889 0.119651385 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Male United-States 0 +49 0.544444442 0.03476785 1 0 0 0.6060606 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +34 0.377777785 0.169340715 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.121557482 0.5625 0 0 0.474747479 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.2638477 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.114562154 0.625 0 0 0.0606060624 State-gov Some-college Never-married Prof-specialty Own-child White Female United-States 0 +36 0.4 0.118111007 0.875 0.135501355 0 0.5050505 Private Masters Never-married Adm-clerical Not-in-family White Male United-States 1 +35 0.3888889 0.185998574 0.8125 0.046500463 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family Asian-Pac-Islander Female United-States 0 +53 0.5888889 0.07125187 0.8125 0 0 0.5050505 Federal-gov Bachelors Divorced Exec-managerial Unmarried Black Female United-States 1 +42 0.466666669 0.167357162 0.625 0 0 0.656565666 Local-gov Some-college Divorced Transport-moving Not-in-family White Male United-States 1 +32 0.355555564 0.113452166 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 0 +33 0.366666675 0.08095952 0.5625 0 0 0.656565666 Private HS-grad Divorced Adm-clerical Own-child Other Female United-States 0 +59 0.655555546 0.07723959 0.5625 0 0 0.6060606 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 +36 0.4 0.112776615 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.1786658 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male Cuba 1 +31 0.344444454 0.142947584 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +46 0.51111114 0.03008746 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 +44 0.4888889 0.0587874353 0.8125 0 0 0.3838384 State-gov Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female United-States 0 +27 0.3 0.07594371 0.8125 0 0.3409091 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.217038408 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +39 0.433333337 0.0440370329 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +62 0.6888889 0.0775750056 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +48 0.533333361 0.109271541 0.875 0 0 0.4040404 Self-emp-not-inc Masters Widowed Exec-managerial Unmarried White Female ? 1 +42 0.466666669 0.276083142 0.5625 0 0 0.25252524 Private HS-grad Never-married Exec-managerial Unmarried Black Female United-States 0 +60 0.6666667 0.1374428 0.875 0 0 0.4848485 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.190815687 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +39 0.433333337 0.293417215 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +34 0.377777785 0.07727663 0.75 0 0 0.363636374 Self-emp-inc Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 +22 0.244444445 0.109343611 0.625 0 0 0.222222224 Private Some-college Never-married Adm-clerical Other-relative Black Male United-States 0 +18 0.2 0.131999969 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Own-child White Male United-States 0 +44 0.4888889 0.0535668731 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.266098648 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +49 0.544444442 0.107523717 0.8125 0 0.143480256 0.4040404 Local-gov Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +21 0.233333334 0.10747388 0.5625 0 0 0.5050505 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +49 0.544444442 0.09019772 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Sales Other-relative Black Male ? 0 +52 0.5777778 0.1326149 0.4375 0 0 0.4040404 Private 11th Separated Handlers-cleaners Unmarried White Male United-States 0 +39 0.433333337 0.08949859 0.8125 0 0.4331956 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.128166884 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +54 0.6 0.0692582056 0.5625 0 0 0.4949495 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.08654447 0.5625 0 0 0.25252524 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.195780978 0.875 0 0 0.2020202 State-gov Masters Never-married Adm-clerical Not-in-family Black Female United-States 0 +21 0.233333334 0.191120133 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +38 0.422222227 0.113897376 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband Asian-Pac-Islander Male Philippines 1 +51 0.566666663 0.115449876 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +34 0.377777785 0.214968637 1 0 0 0.5050505 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.136850089 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Unmarried White Female United-States 0 +20 0.222222224 0.142767757 0.625 0 0 0.454545468 ? Some-college Never-married ? Own-child White Female United-States 0 +26 0.2888889 0.145068556 0.8125 0 0.453168035 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +26 0.2888889 0.1122553 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +41 0.455555558 0.1054526 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.0946747 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.2170182 0.625 0 0 0.4040404 Local-gov Some-college Never-married Transport-moving Own-child White Male United-States 0 +65 0.722222269 0.283071041 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +31 0.344444454 0.08313436 0.4375 0 0 0.656565666 Private 11th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +45 0.5 0.102097049 0.9375 0 0 0.353535354 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.2350366 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 1 +47 0.5222222 0.113310054 0.5625 0 0.4331956 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +47 0.5222222 0.135851234 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.344524354 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +40 0.444444448 0.07947774 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband Black Male United-States 0 +38 0.422222227 0.130639419 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 1 +21 0.233333334 0.02204613 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +40 0.444444448 0.1505673 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male Mexico 0 +33 0.366666675 0.262632638 0.5625 0 0 0.5555556 Private HS-grad Divorced Transport-moving Not-in-family Black Male United-States 0 +29 0.322222233 0.06893288 0.625 0 0 0.5252525 Private Some-college Never-married Tech-support Not-in-family White Male United-States 0 +41 0.455555558 0.07246153 0.625 0 0 0.353535354 Private Some-college Separated Transport-moving Not-in-family White Male United-States 0 +20 0.222222224 0.0231163763 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 +20 0.222222224 0.0265897941 0.625 0 0 0.545454562 State-gov Some-college Never-married Exec-managerial Own-child White Male United-States 0 +34 0.377777785 0.186044365 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +78 0.8666667 0.259473771 0.8125 0.09386094 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.15871571 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.08305085 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +59 0.655555546 0.0259802453 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.146082222 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +23 0.25555557 0.260459155 0.625 0 0 0.24242425 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +47 0.5222222 0.168104112 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.0318420157 0.8125 0 0 0.3838384 Local-gov Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 +42 0.466666669 0.109623127 0.625 0 0 0.565656543 Self-emp-not-inc Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +46 0.51111114 0.09867078 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 +29 0.322222233 0.128486812 0.5625 0 0 0.444444448 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +21 0.233333334 0.1254889 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +55 0.6111111 0.143877074 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.109329462 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Own-child White Female United-States 0 +44 0.4888889 0.0780842 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +61 0.677777767 0.264492959 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 1 +38 0.422222227 0.09666365 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +50 0.5555556 0.08313369 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male Italy 1 +53 0.5888889 0.171269715 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.160510674 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +49 0.544444442 0.189698964 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.0506275669 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +19 0.211111113 0.170311272 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Own-child White Female United-States 0 +59 0.655555546 0.134195015 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Divorced Prof-specialty Not-in-family White Male England 0 +43 0.477777779 0.0981757343 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.09594027 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +49 0.544444442 0.06692306 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +36 0.4 0.0708140656 0.5625 0 0 0.5050505 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +26 0.2888889 0.123371989 0.4375 0.010550105 0 0.323232323 Private 11th Never-married Other-service Own-child Black Male United-States 0 +18 0.2 0.102286987 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +60 0.6666667 0.200215533 0.625 0 0 0.151515156 Private Some-college Widowed Sales Not-in-family White Female United-States 0 +43 0.477777779 0.10035529 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +42 0.466666669 0.0963464156 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +41 0.455555558 0.123829313 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +55 0.6111111 0.167603 0.875 0 0.453856736 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.133664265 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +20 0.222222224 0.108501017 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +37 0.411111116 0.07577061 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.105046459 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.09938675 0.625 0 0.43663913 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.253513664 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Sales Not-in-family White Female United-States 0 +21 0.233333334 0.1022358 0.625 0 0 0.3030303 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +21 0.233333334 0.295101732 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +20 0.222222224 0.110399708 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +35 0.3888889 0.144739866 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.06925349 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Not-in-family White Male Mexico 0 +44 0.4888889 0.0606322475 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.0519194044 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Japan 1 +42 0.466666669 0.106792264 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.01896673 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +32 0.355555564 0.311344683 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +33 0.366666675 0.0976281539 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +27 0.3 0.07826942 0.3125 0 0 0.323232323 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.1261584 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Female United-States 0 +45 0.5 0.127897456 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +41 0.455555558 0.124783717 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +19 0.211111113 0.0427249856 0.625 0 0 0.353535354 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 +45 0.5 0.920128942 0.6875 0 0 0.08080808 Private Assoc-voc Divorced Other-service Not-in-family White Female United-States 0 +41 0.455555558 0.333440661 1 1 0 0.7070707 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.0908503756 0.5625 0 0.399449021 0.353535354 Local-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +33 0.366666675 0.08736214 0.8125 0 0 0.6060606 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 1 +17 0.188888893 0.12213672 0.375 0 0 0.2020202 ? 10th Never-married ? Own-child Other Female United-States 0 +51 0.566666663 0.0503696 0.8125 0 0 0.6060606 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 +33 0.366666675 0.0298995432 0.5625 0 0 0.2020202 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 +23 0.25555557 0.27388674 0.625 0 0 0.181818187 Private Some-college Never-married Handlers-cleaners Other-relative White Female United-States 0 +52 0.5777778 0.0599721856 0.8125 0 0 0.3030303 Private Bachelors Married-spouse-absent Prof-specialty Not-in-family White Male United-States 1 +36 0.4 0.09413992 0.625 0 0 0.323232323 ? Some-college Divorced ? Own-child White Female United-States 0 +25 0.2777778 0.121378995 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +38 0.422222227 0.227797449 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +64 0.7111111 0.120207049 0.3125 0 0 0.454545468 Self-emp-not-inc 9th Separated Transport-moving Not-in-family White Male United-States 0 +42 0.466666669 0.2587962 0.875 0.07688077 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.113470353 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +26 0.2888889 0.0542094223 0.8125 0 0 0.3838384 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.122384585 0.5625 0 0 0.24242425 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +24 0.266666681 0.146067411 0.375 0 0 0.3030303 Private 10th Never-married Other-service Other-relative White Male Mexico 0 +43 0.477777779 0.144500762 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.258124679 0.375 0.03103031 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.0471703149 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.179353476 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Female United-States 0 +44 0.4888889 0.08653908 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 0 +81 0.900000036 0.0599546731 0.5625 0 0 0.181818187 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +55 0.6111111 0.07189307 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.112835214 0.4375 0 0 0.4040404 Private 11th Widowed Other-service Unmarried Black Female United-States 0 +31 0.344444454 0.0130005628 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.141543269 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +39 0.433333337 0.121117666 0.5625 0 0 0.363636374 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +27 0.3 0.2831209 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +23 0.25555557 0.1451083 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +26 0.2888889 0.07815964 0.4375 0.02907029 0 0.5050505 Private 11th Separated Craft-repair Other-relative White Male United-States 0 +33 0.366666675 0.145016015 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Male Cuba 0 +39 0.433333337 0.0727882 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried White Female United-States 0 +44 0.4888889 0.175149947 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +38 0.422222227 0.0209152661 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +18 0.2 0.244022891 0.5 0 0 0.151515156 Private 12th Never-married Other-service Own-child White Male United-States 0 +54 0.6 0.0587355755 0.5625 0 0 0.151515156 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +45 0.5 0.129118577 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +43 0.477777779 0.163647324 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male India 1 +23 0.25555557 0.124991164 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +37 0.411111116 0.1197935 0.625 0.0217402168 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +33 0.366666675 0.049562037 0.4375 0 0 0.5050505 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.203274056 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 +32 0.355555564 0.0730562657 0.8125 0 0 0.5555556 Self-emp-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +47 0.5222222 0.290458381 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.105891071 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.1380308 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +17 0.188888893 0.1866445 0.4375 0 0 0.3030303 Private 11th Never-married Sales Own-child White Male United-States 0 +64 0.7111111 0.0398361981 1 0 0.43663913 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.107612625 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +51 0.566666663 0.08001118 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.102685049 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 +31 0.344444454 0.1265578 0.625 0 0.3452709 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +50 0.5555556 0.179516479 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.172545388 0.625 0.005940059 0 0.1010101 ? Some-college Never-married ? Own-child White Male United-States 0 +63 0.7 0.07661859 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 +48 0.533333361 0.05620241 0.6875 0 0 0.434343427 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.020562334 0.8125 0 0.5544077 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +51 0.566666663 0.09855493 0.5625 0 0 0.282828271 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +29 0.322222233 0.1339155 0.5625 0 0 0.3838384 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +69 0.7666667 0.04815031 0.875 0 0 0.25252524 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +56 0.622222245 0.07490916 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +26 0.2888889 0.149272755 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Wife White Female United-States 0 +39 0.433333337 0.137052149 0.875 0.07298073 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.237216145 0.5625 0 0 0.222222224 Self-emp-not-inc HS-grad Separated Other-service Not-in-family White Female United-States 0 +41 0.455555558 0.239723042 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +45 0.5 0.11333026 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +23 0.25555557 0.1229975 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +29 0.322222233 0.142440423 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +34 0.377777785 0.260233521 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.0573022924 0.8125 0 0.43663913 0.2020202 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 +46 0.51111114 0.12124294 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +46 0.51111114 0.09578334 0.5625 0 0 0.25252524 Without-pay HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +33 0.366666675 0.279992342 0.1875 0 0 0.4040404 Private 5th-6th Separated Other-service Unmarried White Female Mexico 0 +46 0.51111114 0.160120025 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +26 0.2888889 0.231363133 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 +49 0.544444442 0.07823978 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female France 0 +66 0.733333349 0.139125288 0.5625 0 0 0.353535354 ? HS-grad Widowed ? Not-in-family Other Female Puerto-Rico 0 +55 0.6111111 0.103354543 0.5625 0 0.4331956 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Wife White Female United-States 1 +35 0.3888889 0.203314468 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.0225155838 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +31 0.344444454 0.11422 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 +47 0.5222222 0.09867078 0.625 0 0 0.161616161 Private Some-college Separated Adm-clerical Unmarried White Female Germany 0 +48 0.533333361 0.258222342 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.162193164 0.625 0 0 0.565656543 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.137241408 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.147359237 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +23 0.25555557 0.257115722 0.75 0 0.395087242 0.2020202 ? Assoc-acdm Never-married ? Own-child White Male United-States 0 +17 0.188888893 0.164747879 0.5 0 0 0.151515156 Private 12th Never-married Other-service Own-child White Male United-States 0 +44 0.4888889 0.118337318 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.06804517 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +37 0.411111116 0.06686177 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Other-relative White Female United-States 0 +49 0.544444442 0.151136428 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.129575238 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.0886950642 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +73 0.811111152 0.0568395741 0.6875 0 0 0.323232323 ? Assoc-voc Married-spouse-absent ? Not-in-family White Female United-States 0 +44 0.4888889 0.186928049 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.0490871929 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.100791745 0.625 0 0 0.2020202 ? Some-college Divorced ? Own-child White Female ? 0 +49 0.544444442 0.140807092 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Male United-States 0 +17 0.188888893 0.07335397 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 +42 0.466666669 0.0504807346 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 0 +30 0.333333343 0.158710986 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.09255778 0.6875 0 0 0.373737365 State-gov Assoc-voc Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male Hong 0 +53 0.5888889 0.082448706 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.292916119 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +35 0.3888889 0.2559155 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.0645818561 0.4375 0.135501355 0 0.6060606 Private 11th Never-married Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 1 +39 0.433333337 0.151767522 0.8125 0 0 0.5050505 Private Bachelors Widowed Prof-specialty Unmarried White Female Poland 1 +40 0.444444448 0.02197541 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +28 0.311111122 0.0438949168 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +32 0.355555564 0.1302481 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +42 0.466666669 0.124484666 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +35 0.3888889 0.05473074 0.8125 0 0 0.434343427 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.202982411 0.5 0 0 0.4040404 Private 12th Never-married Machine-op-inspct Unmarried Black Female United-States 0 +21 0.233333334 0.12862353 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +71 0.788888931 0.132423609 0.25 0.06097061 0 0.4040404 Private 7th-8th Widowed Exec-managerial Not-in-family White Male United-States 1 +31 0.344444454 0.222747952 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Male United-States 0 +25 0.2777778 0.0523322821 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +35 0.3888889 0.09413992 0.5625 0.068490684 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +24 0.266666681 0.07345095 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 +69 0.7666667 0.210582584 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.130167276 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Sales Husband Asian-Pac-Islander Male ? 1 +35 0.3888889 0.223499626 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.0365069173 0.8125 0.105201051 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +51 0.566666663 0.11042463 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +48 0.533333361 0.0244008079 0.5625 0 0 0.444444448 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +49 0.544444442 0.107878 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +53 0.5888889 0.120128915 0.75 0.02407024 0 1 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.0701796 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +53 0.5888889 0.194215685 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.126417711 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +36 0.4 0.07744838 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +34 0.377777785 0.07906756 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +48 0.533333361 0.08158119 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 1 +53 0.5888889 0.131768942 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.165051654 0.625 0 0.3452709 0.4040404 Private Some-college Divorced Handlers-cleaners Own-child White Male United-States 0 +49 0.544444442 0.145977825 0.9375 0 0 0.4040404 State-gov Prof-school Divorced Exec-managerial Not-in-family White Female United-States 0 +30 0.333333343 0.133243307 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +41 0.455555558 0.03310826 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.0849549249 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +24 0.266666681 0.205066323 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.144330353 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +29 0.322222233 0.185201108 0.5625 0 0 0.424242437 Private HS-grad Never-married Craft-repair Unmarried White Female United-States 0 +23 0.25555557 0.127346516 0.8125 0 0 0.454545468 Private Bachelors Never-married Tech-support Not-in-family Black Female United-States 0 +46 0.51111114 0.08624407 0.625 0 0 0.424242437 Private Some-college Separated Sales Not-in-family White Male United-States 0 +20 0.222222224 0.1416699 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 +63 0.7 0.08246891 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.112534814 0.875 0.03103031 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.169340715 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Male United-States 0 +24 0.266666681 0.147853613 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +36 0.4 0.0224657431 0.625 0 0 0.454545468 Private Some-college Never-married Other-service Own-child White Male United-States 0 +25 0.2777778 0.297170162 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Own-child White Male United-States 0 +54 0.6 0.120128915 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Other-service Husband White Male United-States 0 +50 0.5555556 0.155718476 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Sales Not-in-family White Male United-States 0 +58 0.644444466 0.0275643989 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +17 0.188888893 0.18224968 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male England 0 +40 0.444444448 0.147683218 0.5625 0.07688077 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.07743424 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 +20 0.222222224 0.232027248 0.5625 0 0 0.262626261 Private HS-grad Separated Sales Own-child White Female United-States 0 +22 0.244444445 0.248794883 0.4375 0 0 0.353535354 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +80 0.8888889 0.06854628 0.4375 0 0 0.25252524 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +52 0.5777778 0.0925625 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +40 0.444444448 0.08150575 0.8125 0.07298073 0 0.4848485 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +48 0.533333361 0.0938166156 0.375 0 0 0.4848485 Private 10th Separated Machine-op-inspct Own-child White Female United-States 0 +62 0.6888889 0.13416335 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +32 0.355555564 0.193094924 0.75 0 0 0.424242437 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +21 0.233333334 0.0833344 0.625 0 0 0.282828271 ? Some-college Never-married ? Not-in-family White Female United-States 0 +58 0.644444466 0.140526235 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.080911696 0.875 0 0 0.6060606 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.16261211 1 0 0 0.353535354 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.08112723 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +26 0.2888889 0.102538891 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +50 0.5555556 0.135353491 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.211698622 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.0300167371 0.8125 0 0 0.8080808 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +59 0.655555546 0.0146776633 0.5625 0 0 0.1010101 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +36 0.4 0.122633114 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +37 0.411111116 0.149423629 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male Ecuador 1 +42 0.466666669 0.162071258 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +34 0.377777785 0.2146157 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +27 0.3 0.09487609 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.08698698 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +41 0.455555558 0.0963174552 0.6875 0.07298073 0 0.6060606 Private Assoc-voc Married-civ-spouse Other-service Husband Asian-Pac-Islander Male India 1 +34 0.377777785 0.133807048 0.8125 0.1502415 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male South 1 +41 0.455555558 0.1649789 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +50 0.5555556 0.09329396 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +18 0.2 0.06197056 0.5625 0 0 0.282828271 Private HS-grad Never-married Handlers-cleaners Other-relative White Female United-States 0 +23 0.25555557 0.139701158 0.8125 0 0 0.151515156 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +26 0.2888889 0.127046123 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.173266754 0.625 0.07298073 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +27 0.3 0.0900488645 0.625 0 0 0.8888889 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +21 0.233333334 0.1319582 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family Other Male Dominican-Republic 0 +41 0.455555558 0.08032976 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +42 0.466666669 0.09461408 0.75 0 0 0.353535354 Self-emp-not-inc Assoc-acdm Divorced Craft-repair Own-child Amer-Indian-Eskimo Male United-States 0 +25 0.2777778 0.0469716229 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Own-child White Male United-States 0 +43 0.477777779 0.197464153 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.146804243 0.625 0 0 0.151515156 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +40 0.444444448 0.110274434 0.8125 0.07688077 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.282476336 0.625 0 0 0.09090909 Private Some-college Never-married Sales Own-child Black Male United-States 0 +18 0.2 0.148740664 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Not-in-family White Female United-States 0 +37 0.411111116 0.225156516 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +58 0.644444466 0.201118067 0.3125 0.0378103778 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +36 0.4 0.134949371 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.137052149 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.06676478 0.6875 0.07688077 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +62 0.6888889 0.07354323 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.02347133 0.625 0.0406404063 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +27 0.3 0.0200255271 0.8125 0.0486504845 0 0.363636374 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.0591814555 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Male United-States 0 +55 0.6111111 0.08319161 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.118498288 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +22 0.244444445 0.154546529 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +44 0.4888889 0.124001063 0.75 0.04386044 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.06705305 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +21 0.233333334 0.128124446 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 +25 0.2777778 0.01954597 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Adm-clerical Not-in-family Black Female United-States 0 +31 0.344444454 0.2064107 0.125 0 0 0.353535354 Private 1st-4th Separated Handlers-cleaners Unmarried White Male Honduras 0 +42 0.466666669 0.130662322 0.625 0 0 0.3838384 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +26 0.2888889 0.07076086 0.3125 0 0 0.2020202 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.04832677 0.625 0 0.453856736 0.989899 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.1190021 0.8125 0.05178052 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.230826333 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +51 0.566666663 0.03626175 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +45 0.5 0.141093358 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +44 0.4888889 0.144299373 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +47 0.5222222 0.0232086517 0.25 0 0 0.1010101 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +35 0.3888889 0.0676060244 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Farming-fishing Own-child White Male United-States 0 +46 0.51111114 0.100995824 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +46 0.51111114 0.127811253 0.75 0 0 0.565656543 Private Assoc-acdm Never-married Tech-support Not-in-family White Male United-States 0 +46 0.51111114 0.0537978932 0.8125 0 0 0.535353541 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +66 0.733333349 0.07043554 0.8125 0 0 0.08080808 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.239576221 0.5625 0 0 0.2020202 State-gov HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +26 0.2888889 0.143883809 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.138063788 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.09738837 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male ? 0 +23 0.25555557 0.146270812 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +46 0.51111114 0.124525078 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +44 0.4888889 0.0918829 0.375 0 0 0.4040404 ? 10th Married-civ-spouse ? Husband White Male United-States 0 +54 0.6 0.0389020033 0.875 0 0 0.686868668 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.0208176039 0.25 0 0 0.6060606 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +71 0.788888931 0.146810979 0.3125 0 0 0.13131313 Private 9th Widowed Sales Unmarried White Female United-States 0 +51 0.566666663 0.10823901 0.5 0 0 0.454545468 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.09609653 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +75 0.8333334 0.1675976 0.5625 0.0265302639 0 0.141414136 ? HS-grad Married-AF-spouse ? Wife White Female United-States 0 +57 0.6333333 0.115337394 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Craft-repair Not-in-family White Male Canada 0 +34 0.377777785 0.253908366 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Not-in-family White Male United-States 0 +40 0.444444448 0.118498288 0.8125 0.14084141 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 +21 0.233333334 0.186926022 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 +50 0.5555556 0.070385024 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.06333986 0.6875 0 0 0.444444448 Private Assoc-voc Never-married Craft-repair Not-in-family White Male Ireland 0 +37 0.411111116 0.399571627 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +19 0.211111113 0.08154751 0.25 0 0 1 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +64 0.7111111 0.129720047 0.5625 0 0 0.3030303 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +17 0.188888893 0.0959497 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child Black Male United-States 0 +37 0.411111116 0.09161955 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +32 0.355555564 0.145581111 0.625 0.046500463 0 0.454545468 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +20 0.222222224 0.106347054 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child Black Male United-States 0 +39 0.433333337 0.110859059 1 0.04787048 0 0.4040404 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 +18 0.2 0.170399517 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Own-child White Male Columbia 0 +42 0.466666669 0.09814139 0.875 0 0.43663913 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.241259381 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.147902116 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +53 0.5888889 0.138077945 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +52 0.5777778 0.14948155 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +51 0.566666663 0.08143975 0.375 0 0 0.4040404 Private 10th Never-married Farming-fishing Own-child White Male United-States 0 +77 0.8555556 0.1049104 0.625 0 0 0.08080808 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.131954834 0.625 0.03418034 0 0.3030303 Private Some-college Never-married Sales Own-child Black Female United-States 0 +38 0.422222227 0.159416854 0.625 0 0 0.4040404 Local-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 +20 0.222222224 0.214208215 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +23 0.25555557 0.0359034277 0.5625 0 0 0.3030303 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +27 0.3 0.117629431 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +19 0.211111113 0.216754854 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Own-child White Female United-States 0 +41 0.455555558 0.139386609 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.271417558 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +72 0.8 0.195277855 0.8125 0.009910099 0 0.07070707 ? Bachelors Separated ? Not-in-family White Female United-States 0 +42 0.466666669 0.247220159 0.875 0.046500463 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +36 0.4 0.09664277 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.0183113813 0.875 0 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Farming-fishing Husband White Male United-States 1 +24 0.266666681 0.126433879 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +22 0.244444445 0.2546661 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +29 0.322222233 0.0766953751 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Other-service Husband White Male ? 0 +42 0.466666669 0.170079589 0.9375 0.1502415 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.219797209 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +41 0.455555558 0.188531727 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +29 0.322222233 0.2158348 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Not-in-family Asian-Pac-Islander Male Philippines 0 +36 0.4 0.139996171 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 +78 0.8666667 0.1598257 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Widowed Sales Not-in-family White Male United-States 1 +43 0.477777779 0.0755577758 0.6875 0 0.43663913 0.323232323 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 +34 0.377777785 0.174920276 0.625 0 0 0.4040404 State-gov Some-college Separated Exec-managerial Own-child White Female United-States 0 +20 0.222222224 0.07933495 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +24 0.266666681 0.30270794 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.06000047 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +49 0.544444442 0.04015074 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.08754601 0.3125 0 0 0.4040404 Private 9th Never-married Transport-moving Own-child White Male United-States 0 +51 0.566666663 0.0728986561 0.75 0 0 0.4040404 Private Assoc-acdm Separated Other-service Not-in-family Black Female United-States 0 +30 0.333333343 0.230826333 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +37 0.411111116 0.08531998 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.09504784 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +20 0.222222224 0.184347063 0.625 0.3409534 0 0.1010101 ? Some-college Never-married ? Other-relative Black Male United-States 0 +46 0.51111114 0.116685137 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.108501017 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Own-child White Male United-States 0 +32 0.355555564 0.141234115 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.0602867231 0.625 0 0 0.5050505 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 0 +30 0.333333343 0.269091845 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Handlers-cleaners Unmarried White Female United-States 0 +60 0.6666667 0.09223314 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +56 0.622222245 0.17810677 0.625 0 0 0.4040404 Local-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +57 0.6333333 0.134418622 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +61 0.677777767 0.0190549642 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 +50 0.5555556 0.145476714 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +56 0.622222245 0.120962754 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +61 0.677777767 0.09388465 0.625 0 0.43663913 0.353535354 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.126200154 0.875 0.07430074 0 0.7070707 Private Masters Divorced Exec-managerial Unmarried White Male United-States 1 +31 0.344444454 0.3186714 0.875 0.05178052 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +60 0.6666667 0.138240263 0.5625 0 0.5874656 0.5050505 Self-emp-not-inc HS-grad Never-married Exec-managerial Not-in-family Black Male United-States 1 +26 0.2888889 0.122790724 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +56 0.622222245 0.0347961374 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Other-service Wife White Female United-States 0 +45 0.5 0.194966674 0.4375 0 0 0.4040404 Private 11th Widowed Other-service Unmarried White Female United-States 0 +28 0.311111122 0.136022985 0.75 0 0 0.656565666 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 1 +45 0.5 0.0180379264 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 +58 0.644444466 0.06800004 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +38 0.422222227 0.137240067 0.6875 0.0235402342 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 +23 0.25555557 0.144009084 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +49 0.544444442 0.08397089 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.1477061 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 +22 0.244444445 0.18214798 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +23 0.25555557 0.143206224 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.130386844 0.5625 0.03908039 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +40 0.444444448 0.0566684976 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.178374827 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +34 0.377777785 0.06667655 0.6875 0 0 0.4040404 State-gov Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 +21 0.233333334 0.187413663 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +28 0.311111122 0.113145038 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +43 0.477777779 0.04909191 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-spouse-absent Tech-support Not-in-family Asian-Pac-Islander Male United-States 0 +17 0.188888893 0.118856609 0.3125 0 0 0.2020202 Private 9th Never-married Transport-moving Not-in-family White Male United-States 0 +51 0.566666663 0.05785796 0.375 0 0 0.4040404 Self-emp-not-inc 10th Widowed Transport-moving Other-relative White Female United-States 0 +37 0.411111116 0.150489837 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.07303471 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.116182007 0.8125 0 0 0.3030303 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +35 0.3888889 0.162994 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +48 0.533333361 0.165654466 0.5625 0.0217402168 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Female United-States 0 +23 0.25555557 0.126296476 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Own-child White Male United-States 0 +24 0.266666681 0.2964481 0.5625 0 0 0.454545468 Private HS-grad Never-married Priv-house-serv Not-in-family White Female England 0 +24 0.266666681 0.146975324 0.6875 0 0 0.2020202 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +50 0.5555556 0.10705696 0.25 0.03411034 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.0635904148 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +45 0.5 0.123659588 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.129765853 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +33 0.366666675 0.264572442 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.1049488 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +32 0.355555564 0.131339222 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.207586691 0.1875 0 0 0.4040404 Private 5th-6th Never-married Farming-fishing Other-relative White Male Mexico 0 +53 0.5888889 0.0706396252 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +36 0.4 0.102584019 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +22 0.244444445 0.09831179 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 +47 0.5222222 0.06561506 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Wife Black Female United-States 0 +25 0.2777778 0.008274371 0.625 0 0 0.2020202 ? Some-college Never-married ? Not-in-family Amer-Indian-Eskimo Female United-States 0 +30 0.333333343 0.1772406 0.5625 0 0 0.2020202 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +49 0.544444442 0.127894089 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Not-in-family Black Female United-States 0 +23 0.25555557 0.102301806 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +40 0.444444448 0.171190247 0.375 0 0 0.353535354 Private 10th Separated Transport-moving Own-child White Male United-States 0 +45 0.5 0.22326456 0.75 0 0 0.4040404 Local-gov Assoc-acdm Divorced Tech-support Own-child White Male United-States 0 +61 0.677777767 0.1193429 0.8125 0 0 0.424242437 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +35 0.3888889 0.125874162 0.5625 0 0 0.5555556 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +20 0.222222224 0.0223754887 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +27 0.3 0.126739651 0.375 0 0 0.6060606 Private 10th Never-married Adm-clerical Own-child White Male United-States 0 +23 0.25555557 0.141287327 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +25 0.2777778 0.110788338 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 0 +65 0.722222269 0.121821508 0.625 0 0 0.353535354 Local-gov Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.1282073 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +49 0.544444442 0.092403546 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male South 1 +45 0.5 0.13743943 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Female Germany 0 +46 0.51111114 0.133881137 0.875 0 0.0741506 0.454545468 Private Masters Divorced Exec-managerial Unmarried White Female United-States 0 +67 0.7444445 0.0908638462 0.5625 0 0 0.323232323 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +40 0.444444448 0.117541872 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried White Female United-States 0 +51 0.566666663 0.174689919 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.135880187 0.8125 0 0.5544077 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.141178891 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +28 0.311111122 0.124689423 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +44 0.4888889 0.311737359 0.5625 0 0 0.4848485 Private HS-grad Divorced Handlers-cleaners Not-in-family White Female United-States 0 +37 0.411111116 0.119193375 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +54 0.6 0.191370681 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +33 0.366666675 0.025288526 0.9375 0 0 0.4040404 Federal-gov Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 +46 0.51111114 0.07857858 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +45 0.5 0.08131178 0.875 0.04386044 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +27 0.3 0.211651474 0.75 0.0332503319 0 0.4040404 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 0 +49 0.544444442 0.285054624 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +51 0.566666663 0.135465965 0.5625 0 0 0.454545468 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +27 0.3 0.136214942 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +36 0.4 0.141192362 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +59 0.655555546 0.111754186 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.0899303257 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 +66 0.733333349 0.06727801 0.6875 0 0 0.4040404 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 +31 0.344444454 0.118818216 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +35 0.3888889 0.0695181862 1 0 0 0.6060606 Federal-gov Doctorate Never-married Prof-specialty Not-in-family Amer-Indian-Eskimo Female United-States 1 +34 0.377777785 0.08258341 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Philippines 1 +50 0.5555556 0.152713835 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 1 +43 0.477777779 0.101763651 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.164552554 0.3125 0 0 0.3030303 Private 9th Never-married Craft-repair Own-child White Male El-Salvador 0 +33 0.366666675 0.140982226 0.3125 0 0 0.454545468 Private 9th Never-married Other-service Not-in-family White Male El-Salvador 0 +48 0.533333361 0.06674457 0.625 0 0.365013778 0.3838384 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.251980036 0.5625 0 0 0.363636374 Private HS-grad Never-married Priv-house-serv Own-child White Female United-States 0 +29 0.322222233 0.138242275 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 0 +42 0.466666669 0.21962814 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +28 0.311111122 0.123609066 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male Hungary 0 +36 0.4 0.236264452 0.5625 0 0 0.3838384 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 +66 0.733333349 0.0948666558 0.5625 0 0 0.25252524 Local-gov HS-grad Widowed Other-service Not-in-family White Female United-States 0 +44 0.4888889 0.118503675 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +45 0.5 0.08482022 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +49 0.544444442 0.151628777 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Own-child Black Female United-States 0 +36 0.4 0.183262 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Unmarried White Female El-Salvador 0 +48 0.533333361 0.0273899529 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +19 0.211111113 0.0237387232 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +36 0.4 0.112804905 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +41 0.455555558 0.137846917 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.196097538 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +49 0.544444442 0.121147975 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.13814193 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +20 0.222222224 0.237177759 0.625 0 0 0.2929293 Private Some-college Divorced Other-service Own-child White Female United-States 0 +39 0.433333337 0.0749428347 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +38 0.422222227 0.166437775 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +19 0.211111113 0.182828248 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +29 0.322222233 0.0891840458 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 +52 0.5777778 0.05032111 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male United-States 1 +22 0.244444445 0.06375812 0.6875 0 0 0.444444448 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.0223115031 0.625 0 0 0.8080808 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.08997343 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +41 0.455555558 0.06988526 0.625 0.0394203924 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +63 0.7 0.04340795 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +40 0.444444448 0.252149075 0.6875 0 0 0.444444448 Private Assoc-voc Separated Sales Not-in-family Black Male United-States 0 +40 0.444444448 0.12101125 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Not-in-family White Male Canada 0 +18 0.2 0.06682742 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Female United-States 0 +57 0.6333333 0.121378325 0.9375 0 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 +54 0.6 0.147689953 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Philippines 1 +44 0.4888889 0.101037584 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +20 0.222222224 0.155742049 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +40 0.444444448 0.122729436 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female Scotland 0 +29 0.322222233 0.1867994 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Unmarried White Male United-States 0 +22 0.244444445 0.0942955 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +44 0.4888889 0.0671183839 0.875 0.05178052 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.150413051 0.625 0 0 0.454545468 Private Some-college Divorced Sales Own-child White Male United-States 0 +52 0.5777778 0.15848738 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +57 0.6333333 0.138979122 0.5625 0.0217402168 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family White Male Cuba 0 +51 0.566666663 0.1050734 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 +23 0.25555557 0.356449932 0.8125 0 0 0.1010101 Private Bachelors Never-married Sales Own-child Black Male United-States 0 +22 0.244444445 0.136640608 0.6875 0 0 0.444444448 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +37 0.411111116 0.03929198 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 1 +58 0.644444466 0.201146364 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +61 0.677777767 0.1287717 0.375 0 0 0.2020202 Private 10th Widowed Farming-fishing Unmarried White Male United-States 0 +30 0.333333343 0.06485262 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.07034596 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +30 0.333333343 0.217588 0.375 0 0 0.4040404 Private 10th Divorced Other-service Not-in-family Amer-Indian-Eskimo Male United-States 0 +18 0.2 0.06460341 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Male Canada 0 +34 0.377777785 0.160506636 0.625 0 0.373737365 0.121212125 Private Some-college Married-civ-spouse Other-service Wife White Female ? 0 +23 0.25555557 0.033202555 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative Black Male United-States 0 +23 0.25555557 0.0343186036 0.625 0 0 0.1010101 Private Some-college Never-married Priv-house-serv Own-child White Female United-States 0 +57 0.6333333 0.08385976 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +58 0.644444466 0.161327 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +59 0.655555546 0.20820567 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +27 0.3 0.16176413 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Adm-clerical Not-in-family White Male United-States 0 +50 0.5555556 0.070727855 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +44 0.4888889 0.0909648761 0.875 0 0 0.161616161 Local-gov Masters Divorced Prof-specialty Unmarried White Female ? 0 +25 0.2777778 0.120211087 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Female United-States 0 +33 0.366666675 0.0160779413 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +22 0.244444445 0.2440276 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 +21 0.233333334 0.1736244 0.625 0 0.3946281 0.3030303 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +44 0.4888889 0.118319131 0.4375 0.05178052 0 0.363636374 Private 11th Married-civ-spouse Prof-specialty Wife White Female United-States 1 +50 0.5555556 0.200649962 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband Asian-Pac-Islander Male United-States 1 +44 0.4888889 0.155373633 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +53 0.5888889 0.08285215 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +41 0.455555558 0.115084141 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.122949004 0.625 0 0 0.4040404 Local-gov Some-college Widowed Adm-clerical Unmarried White Female Mexico 0 +60 0.6666667 0.1592707 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +58 0.644444466 0.02271495 0.875 0 0 0.2020202 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.127258286 0.625 0.03908039 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +43 0.477777779 0.139339462 0.5625 0 0 0.6060606 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +33 0.366666675 0.117064334 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +24 0.266666681 0.128449082 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +41 0.455555558 0.10042534 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male Poland 0 +21 0.233333334 0.0170168485 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +39 0.433333337 0.067804046 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Own-child Asian-Pac-Islander Male United-States 0 +27 0.3 0.07688935 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +50 0.5555556 0.153604254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.0363789462 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +46 0.51111114 0.148155361 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.161557347 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.08043416 0.8125 0 0 0.353535354 State-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +56 0.622222245 0.148303539 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 1 +41 0.455555558 0.0222724378 0.875 0 0.453168035 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +41 0.455555558 0.187096432 0.625 0 0.459366381 0.5050505 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +42 0.466666669 0.118215404 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.1830633 0.25 0 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.04718446 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +25 0.2777778 0.237627015 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female Mexico 0 +57 0.6333333 0.179287478 0.5625 0 0 0.424242437 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +49 0.544444442 0.06933701 0.25 0 0 0.4040404 Private 7th-8th Widowed Machine-op-inspct Not-in-family White Female United-States 0 +23 0.25555557 0.117094643 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +59 0.655555546 0.09705093 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.1338185 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +33 0.366666675 0.236956164 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female Mexico 0 +52 0.5777778 0.121331848 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 0 +37 0.411111116 0.118111007 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.151207149 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +39 0.433333337 0.104156047 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +54 0.6 0.102740951 0.625 0 0 0.424242437 Local-gov Some-college Divorced Craft-repair Unmarried White Male United-States 0 +52 0.5777778 0.14660354 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.09333504 0.5625 0 0 0.565656543 Local-gov HS-grad Never-married Protective-serv Unmarried White Male United-States 0 +19 0.211111113 0.02187438 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Male United-States 0 +65 0.722222269 0.06809703 0.5625 0.09386094 0 0.1010101 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.0300915 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +25 0.2777778 0.307547957 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Unmarried White Male El-Salvador 0 +34 0.377777785 0.153082266 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +47 0.5222222 0.0186057165 0.6875 0 0 0.5555556 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 +24 0.266666681 0.189534619 0.5625 0 0 0.989899 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +63 0.7 0.0263897553 1 0 0.5874656 0.6060606 Federal-gov Doctorate Divorced Exec-managerial Not-in-family White Female United-States 1 +48 0.533333361 0.2540168 0.1875 0 0 0.353535354 Private 5th-6th Never-married Priv-house-serv Unmarried White Female Nicaragua 0 +26 0.2888889 0.201932371 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +28 0.311111122 0.1225267 0.625 0 0 0.4040404 Private Some-college Separated Machine-op-inspct Not-in-family White Male United-States 0 +23 0.25555557 0.159657314 0.5625 0 0 0.121212125 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +57 0.6333333 0.08288044 0.9375 0.1502415 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +64 0.7111111 0.181525633 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Tech-support Not-in-family White Male United-States 0 +28 0.311111122 0.0301521178 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 1 +28 0.311111122 0.045273643 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Sales Other-relative White Male United-States 0 +34 0.377777785 0.119210213 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.02944154 0.4375 0 0.4331956 0.454545468 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.255888551 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Farming-fishing Husband White Male United-States 1 +34 0.377777785 0.07039042 0.6875 0.0163901635 0 0.2020202 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 +18 0.2 0.143038526 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.12101125 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband Other Male United-States 0 +73 0.811111152 0.1575276 0.5625 0 0.5640496 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male Vietnam 0 +24 0.266666681 0.132946953 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male Mexico 0 +29 0.322222233 0.148619428 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +33 0.366666675 0.121971034 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +57 0.6333333 0.09094601 0.5625 0 0 0.353535354 Federal-gov HS-grad Separated Adm-clerical Other-relative Black Female United-States 0 +41 0.455555558 0.124642268 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Female ? 0 +55 0.6111111 0.07173008 0.375 0 0 0.353535354 Private 10th Widowed Transport-moving Not-in-family Black Female United-States 0 +21 0.233333334 0.136729524 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.150729612 0.875 0 0 0.454545468 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.123947859 0.625 0 0 0.5050505 Private Some-college Never-married Prof-specialty Not-in-family Other Male United-States 0 +32 0.355555564 0.225921646 0.8125 0 0 0.2020202 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 +40 0.444444448 0.04436302 0.625 0 0.04889807 0.4040404 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 +32 0.355555564 0.2510209 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.030717887 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +59 0.655555546 0.2041995 0.625 0 0.500229537 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.09307573 0.5625 0 0.261248857 0.4040404 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 +29 0.322222233 0.143392131 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +59 0.655555546 0.0211213678 0.875 0.1502415 0 0.8080808 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.09967569 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +47 0.5222222 0.0978578255 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +44 0.4888889 0.176926732 0.5625 0 0.3452709 0.454545468 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.08931135 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +42 0.466666669 0.0207172465 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.215456277 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +66 0.733333349 0.0198227931 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +41 0.455555558 0.0750876442 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +22 0.244444445 0.124439538 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 +31 0.344444454 0.438737661 0.5625 0 0.365932047 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 +30 0.333333343 0.126328126 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +36 0.4 0.0571480542 0.5625 0 0 0.161616161 Self-emp-not-inc HS-grad Separated Other-service Not-in-family White Female United-States 0 +75 0.8333334 0.02441091 1 0 0 0.4040404 ? Doctorate Never-married ? Not-in-family White Male United-States 0 +41 0.455555558 0.05988597 0.75 0 0 0.363636374 State-gov Assoc-acdm Divorced Prof-specialty Unmarried Asian-Pac-Islander Female United-States 0 +19 0.211111113 0.0492959879 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +60 0.6666667 0.08926285 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +24 0.266666681 0.144501433 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Own-child White Male United-States 0 +25 0.2777778 0.14616102 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +52 0.5777778 0.114356056 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +30 0.333333343 0.05090102 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female Germany 0 +37 0.411111116 0.161089912 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +55 0.6111111 0.03607855 1 0 0 0.3030303 Self-emp-not-inc Doctorate Divorced Exec-managerial Not-in-family White Female United-States 0 +20 0.222222224 0.07887695 0.625 0 0 0.24242425 Private Some-college Never-married Adm-clerical Other-relative Black Female United-States 0 +32 0.355555564 0.268079519 0.25 0 0 0.151515156 Private 7th-8th Never-married Priv-house-serv Not-in-family White Female Mexico 0 +18 0.2 0.07678832 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +24 0.266666681 0.137840852 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +33 0.366666675 0.171707511 0.625 0 0 0.454545468 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +76 0.844444454 0.0570854172 0.625 0 0 0.4040404 ? Some-college Widowed ? Unmarried White Female United-States 0 +57 0.6333333 0.1334575 0.875 0 0 0.141414136 Local-gov Masters Married-civ-spouse Protective-serv Husband White Male United-States 1 +53 0.5888889 0.117208473 0.875 0 0.430670351 0.3838384 Private Masters Divorced Prof-specialty Unmarried White Female United-States 0 +19 0.211111113 0.3044046 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +50 0.5555556 0.1159658 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.141086623 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +40 0.444444448 0.226783782 0.6875 0 0 0.6060606 Private Assoc-voc Separated Craft-repair Not-in-family White Female United-States 0 +26 0.2888889 0.2908733 0.375 0 0 0.4040404 ? 10th Separated ? Not-in-family White Male United-States 0 +47 0.5222222 0.105561711 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.1955412 0.6875 0 0 0.5050505 Federal-gov Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +49 0.544444442 0.139136732 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Own-child White Male United-States 0 +28 0.311111122 0.100574866 0.625 0 0 0.07070707 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.0334025957 0.625 0 0 0.3030303 ? Some-college Married-civ-spouse ? Wife Black Female United-States 0 +50 0.5555556 0.06666308 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.1223536 0.4375 0 0 0.5050505 Private 11th Never-married Transport-moving Own-child White Male United-States 0 +30 0.333333343 0.117726423 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +47 0.5222222 0.06890797 0.875 1 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.124469846 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.1185515 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.173004746 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +37 0.411111116 0.161242142 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +26 0.2888889 0.157456875 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +55 0.6111111 0.15930438 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.04765526 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.165270552 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.119033076 0.8125 0 0 0.454545468 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 1 +32 0.355555564 0.103805132 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +43 0.477777779 0.05988597 0.625 0.010550105 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Asian-Pac-Islander Female United-States 0 +19 0.211111113 0.348241568 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female El-Salvador 0 +38 0.422222227 0.2939042 0.5625 0 0 0.75757575 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +38 0.422222227 0.155611381 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Sales Husband White Male Mexico 0 +65 0.722222269 0.141328409 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 +70 0.7777778 0.09687649 0.625 0 0.515610635 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.112736873 0.5625 0 0 0.25252524 ? HS-grad Widowed ? Unmarried White Female United-States 0 +44 0.4888889 0.145125136 0.8125 0 0 0.07070707 Private Bachelors Separated Machine-op-inspct Unmarried Black Female United-States 0 +32 0.355555564 0.135178372 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +30 0.333333343 0.129168421 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Own-child Black Female United-States 0 +49 0.544444442 0.131633565 0.75 0 0 0.6060606 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 +23 0.25555557 0.100623362 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +25 0.2777778 0.07055005 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +19 0.211111113 0.0728407353 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +27 0.3 0.160879776 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +43 0.477777779 0.015597038 0.5625 0 0 0.6060606 State-gov HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +38 0.422222227 0.335277379 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.09534419 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.07945215 0.8125 0 0 0.3838384 Federal-gov Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +30 0.333333343 0.156499773 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.106378712 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +30 0.333333343 0.069806464 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.114316985 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +43 0.477777779 0.1850408 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.108824313 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +38 0.422222227 0.0328543372 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +48 0.533333361 0.0953125358 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +57 0.6333333 0.211592883 0.8125 0 0.4331956 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.113378756 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +42 0.466666669 0.180003434 0.875 0 0 0.454545468 Local-gov Masters Separated Exec-managerial Unmarried Black Male United-States 1 +31 0.344444454 0.2101798 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.140052736 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.156699821 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +63 0.7 0.166255921 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +32 0.355555564 0.103782907 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.134040773 0.625 0 0 0.121212125 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +51 0.566666663 0.13814193 0.875 0 0 0.3030303 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +36 0.4 0.1198265 0.8125 0.0217602178 0 0.2020202 Private Bachelors Never-married Other-service Not-in-family White Male ? 0 +24 0.266666681 0.0339461379 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Amer-Indian-Eskimo Male United-States 0 +41 0.455555558 0.0653759539 0.6875 0 0 0.444444448 Local-gov Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +21 0.233333334 0.0438053347 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +27 0.3 0.196989983 0.625 0 0.430670351 0.454545468 Private Some-college Never-married Craft-repair Not-in-family Asian-Pac-Islander Male Cambodia 0 +17 0.188888893 0.151687369 0.3125 0 0 0.353535354 Private 9th Never-married Other-service Own-child Black Male United-States 0 +45 0.5 0.215660349 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Other-service Wife White Female United-States 0 +39 0.433333337 0.08043416 0.5625 0 0.143480256 0.353535354 State-gov HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +21 0.233333334 0.0562940128 0.625 0 0 0.04040404 Private Some-college Never-married Prof-specialty Own-child Amer-Indian-Eskimo Female United-States 0 +29 0.322222233 0.0900488645 0.8125 0.0861408561 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +39 0.433333337 0.09536171 0.875 0 0.5610652 0.454545468 Private Masters Never-married Sales Not-in-family White Male United-States 1 +42 0.466666669 0.356445223 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Other-relative Black Male United-States 0 +22 0.244444445 0.2632287 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Other-relative White Male Mexico 0 +21 0.233333334 0.05774413 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +59 0.655555546 0.105055213 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.148966968 0.875 0 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.182421431 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +35 0.3888889 0.0556487665 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +58 0.644444466 0.2499244 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +45 0.5 0.0368719734 0.625 0 0.4242424 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.0152494945 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Amer-Indian-Eskimo Male United-States 0 +21 0.233333334 0.1474751 0.4375 0 0 0.454545468 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +51 0.566666663 0.297457755 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +34 0.377777785 0.09678623 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +40 0.444444448 0.123321474 0.8125 0 0 0.353535354 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.06545138 0.4375 0 0 0.161616161 Private 11th Divorced Adm-clerical Unmarried White Female United-States 0 +38 0.422222227 0.08250326 0.375 0 0.4331956 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.209722474 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +37 0.411111116 0.05316073 0.3125 0.031370312 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 +62 0.6888889 0.08323674 0.375 0 0 0.4040404 Private 10th Divorced Other-service Unmarried White Female United-States 0 +32 0.355555564 0.117339812 0.8125 0 0 0.6060606 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +36 0.4 0.123864338 0.8125 0 0 0.04040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +43 0.477777779 0.166955724 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +37 0.411111116 0.1728532 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.102966584 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Wife Asian-Pac-Islander Female China 0 +28 0.311111122 0.0151019907 0.5625 0 0 0.5555556 Private HS-grad Never-married Transport-moving Unmarried White Male United-States 0 +49 0.544444442 0.12003395 0.625 0 0 0.282828271 ? Some-college Widowed ? Unmarried White Female United-States 0 +47 0.5222222 0.130908161 0.5625 0 0 0.07070707 Local-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 +59 0.655555546 0.166488975 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.0430529974 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.1514705 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.120269015 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Prof-specialty Other-relative White Male United-States 0 +57 0.6333333 0.03207304 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Not-in-family Black Female United-States 0 +41 0.455555558 0.0624871626 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.0342404731 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.158882737 0.625 0 0 0.4040404 Local-gov Some-college Never-married Farming-fishing Own-child White Male United-States 0 +44 0.4888889 0.164998442 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +20 0.222222224 0.354773521 0.5625 0 0 0.3030303 Local-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.163994864 0.8125 0 0 0.282828271 Self-emp-not-inc Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +23 0.25555557 0.135827661 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Other-relative White Male United-States 0 +24 0.266666681 0.158038139 0.5625 0 0 0.363636374 Private HS-grad Married-spouse-absent Sales Own-child White Female United-States 0 +46 0.51111114 0.180522054 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.150378019 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +21 0.233333334 0.0668139458 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.09232541 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +41 0.455555558 0.0777332857 0.625 0.0217402168 0 0.454545468 Private Some-college Divorced Sales Own-child White Male United-States 0 +51 0.566666663 0.210914627 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +69 0.7666667 0.0201925635 0.25 0.0184801836 0 0.1010101 Self-emp-not-inc 7th-8th Never-married Farming-fishing Other-relative White Male United-States 0 +39 0.433333337 0.365757525 0.5625 0.05178052 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.18307139 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +51 0.566666663 0.06596193 0.8125 0.05178052 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +43 0.477777779 0.1287771 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +35 0.3888889 0.178235412 0.4375 0 0 0.8484849 Self-emp-not-inc 11th Divorced Exec-managerial Unmarried White Female United-States 0 +32 0.355555564 0.123796314 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 +25 0.2777778 0.1409216 0.8125 0 0 0.212121218 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +64 0.7111111 0.14562355 0.625 0 0 0.4040404 Private Some-college Widowed Sales Not-in-family White Female United-States 0 +28 0.311111122 0.253986478 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 +44 0.4888889 0.213870779 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Protective-serv Other-relative White Male Mexico 0 +40 0.444444448 0.166955724 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +21 0.233333334 0.102542929 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Asian-Pac-Islander Male Philippines 0 +23 0.25555557 0.288474143 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.108915918 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Unmarried White Female United-States 0 +19 0.211111113 0.113058828 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +61 0.677777767 0.0573810972 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +47 0.5222222 0.0804678351 0.25 0 0 0.4040404 Self-emp-inc 7th-8th Never-married Craft-repair Not-in-family Other Male ? 0 +39 0.433333337 0.07926356 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +51 0.566666663 0.09385501 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +25 0.2777778 0.288100332 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.0822493359 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.153519392 0.625 0 0 0.3838384 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +54 0.6 0.152553543 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.05643074 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Female United-States 0 +28 0.311111122 0.1327624 0.5625 0 0 0.5050505 Private HS-grad Never-married Machine-op-inspct Own-child Other Male Puerto-Rico 0 +33 0.366666675 0.1379008 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +63 0.7 0.223294869 0.5625 0 0 0.141414136 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +31 0.344444454 0.1435834 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +70 0.7777778 0.1267996 0.5625 0 0 0.161616161 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.200821713 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female Nicaragua 0 +36 0.4 0.0968367457 0.625 0 0 0.121212125 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +50 0.5555556 0.09382066 0.4375 0 0 0.4040404 Local-gov 11th Never-married Craft-repair Unmarried White Male United-States 0 +21 0.233333334 0.10263925 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family Black Female United-States 0 +31 0.344444454 0.208778173 0.625 0 0 0.4040404 Private Some-college Separated Tech-support Unmarried Black Female United-States 0 +19 0.211111113 0.0249780267 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 +39 0.433333337 0.181894049 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +29 0.322222233 0.08758979 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Wife White Female United-States 0 +39 0.433333337 0.12665008 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 +17 0.188888893 0.113290519 0.25 0 0 0.4040404 Private 7th-8th Never-married Farming-fishing Other-relative Other Male Mexico 0 +46 0.51111114 0.11571794 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 +62 0.6888889 0.125746191 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.11957325 0.375 0 0 0.232323229 Private 10th Divorced Other-service Unmarried Black Female United-States 0 +28 0.311111122 0.07776899 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 +19 0.211111113 0.337537766 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative Black Female United-States 0 +61 0.677777767 0.121289417 1 0.0406404063 0 0.4040404 Local-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 0 +18 0.2 0.1386767 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Male ? 0 +39 0.433333337 0.147160545 0.9375 0 0.5544077 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male ? 1 +24 0.266666681 0.137349844 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 +38 0.422222227 0.0618688576 0.625 0 0 0.414141417 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.154710874 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +17 0.188888893 0.106892616 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Male United-States 0 +28 0.311111122 0.128585145 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.09373984 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +61 0.677777767 0.0806113 0.9375 0.1502415 0 0.2020202 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +69 0.7666667 0.08414467 0.1875 0 0.5204316 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.113620557 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child White Female United-States 0 +26 0.2888889 0.168409213 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +34 0.377777785 0.238382041 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +70 0.7777778 0.145746127 0.3125 0.0265302639 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +21 0.233333334 0.155079976 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.07929387 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.07802965 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.130217791 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.137329638 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +53 0.5888889 0.06742686 0.875 0 0.453856736 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.1061753 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +46 0.51111114 0.158496141 0.875 0 0 0.6060606 Self-emp-inc Masters Divorced Sales Not-in-family White Male United-States 1 +36 0.4 0.08600093 0.5625 0 0 0.373737365 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +39 0.433333337 0.0192442276 0.5625 0 0 0.4848485 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +78 0.8666667 0.0616513044 0.8125 0 0 0.0303030312 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +30 0.333333343 0.124393061 0.5625 0 0 0.3030303 Private HS-grad Never-married Prof-specialty Own-child White Female United-States 0 +22 0.244444445 0.1804702 0.625 0 0 0.161616161 Private Some-college Never-married Sales Own-child White Female United-States 0 +43 0.477777779 0.0888385251 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.129732177 0.5625 0 0 0.565656543 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +36 0.4 0.125821635 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Own-child White Male United-States 1 +50 0.5555556 0.0297136474 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +27 0.3 0.03128029 0.8125 0 0 0.353535354 Federal-gov Bachelors Never-married Protective-serv Not-in-family White Female United-States 0 +46 0.51111114 0.05255051 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +24 0.266666681 0.2813138 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +41 0.455555558 0.1507121 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +68 0.75555557 0.150771365 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +38 0.422222227 0.07788349 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.07709208 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.132748932 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family Black Male United-States 0 +31 0.344444454 0.240549475 1 0 0 0.4848485 Self-emp-not-inc Doctorate Never-married Prof-specialty Own-child White Female United-States 0 +29 0.322222233 0.0398941226 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.196876153 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +51 0.566666663 0.082365185 0.625 0 0 0.363636374 Private Some-college Widowed Machine-op-inspct Unmarried White Female United-States 0 +26 0.2888889 0.0352406725 0.8125 0 0 0.6060606 Federal-gov Bachelors Never-married Tech-support Not-in-family Other Male United-States 0 +27 0.3 0.07128015 0.8125 0 0 0.6060606 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +36 0.4 0.07215238 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +28 0.311111122 0.189842433 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +53 0.5888889 0.19082579 0.8125 0 0 0.4040404 Private Bachelors Divorced Tech-support Not-in-family White Female United-States 0 +40 0.444444448 0.01791467 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +38 0.422222227 0.148704961 0.5625 0 0 0.2020202 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +21 0.233333334 0.0819651037 0.25 0 0 0.4040404 ? 7th-8th Never-married ? Own-child White Male United-States 0 +53 0.5888889 0.140298575 0.375 0 0 0.343434334 Private 10th Married-civ-spouse Other-service Husband White Male United-States 0 +34 0.377777785 0.116295159 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.03678239 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +64 0.7111111 0.4256381 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +21 0.233333334 0.265698582 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +25 0.2777778 0.161055565 0.8125 0 0 0.13131313 ? Bachelors Never-married ? Not-in-family White Male United-States 0 +38 0.422222227 0.0253808 0.9375 1 0 0.575757563 Federal-gov Prof-school Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female Canada 1 +47 0.5222222 0.130000234 0.875 0 0 0.5050505 Local-gov Masters Divorced Protective-serv Not-in-family Black Male United-States 1 +48 0.533333361 0.09638144 1 0 0.43663913 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 1 +57 0.6333333 0.0571749955 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.126963273 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.227505133 0.4375 0 0 0.4040404 Private 11th Divorced Farming-fishing Not-in-family White Male United-States 0 +51 0.566666663 0.06360321 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +32 0.355555564 0.113764018 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +49 0.544444442 0.07822631 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +52 0.5777778 0.0863956138 0.5625 0 0 0.141414136 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +64 0.7111111 0.202991843 0.75 0.09386094 0 0.454545468 Federal-gov Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.117865168 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +24 0.266666681 0.195263714 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +39 0.433333337 0.104156047 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.14079161 0.5625 0.0394203924 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +30 0.333333343 0.137056187 0.625 0 0 0.444444448 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +34 0.377777785 0.09504784 0.875 0 0 0.6060606 Private Masters Divorced Prof-specialty Own-child White Female United-States 1 +30 0.333333343 0.114224039 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +25 0.2777778 0.0927086547 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family Black Female United-States 0 +58 0.644444466 0.329415619 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 0 +32 0.355555564 0.0244506486 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +37 0.411111116 0.170687109 0.5625 0 0 0.25252524 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 +35 0.3888889 0.181382835 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family Black Female United-States 0 +18 0.2 0.190346912 0.1875 0 0 0.3030303 Private 5th-6th Never-married Handlers-cleaners Other-relative White Male Honduras 0 +46 0.51111114 0.233701646 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +71 0.788888931 0.122849323 0.8125 0.116781168 0 0.454545468 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 1 +44 0.4888889 0.138108924 0.375 0 0 0.4040404 Private 10th Divorced Adm-clerical Unmarried White Female United-States 0 +45 0.5 0.0867081359 0.375 0 0 0.4040404 Private 10th Divorced Sales Not-in-family White Female United-States 0 +40 0.444444448 0.159028232 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Prof-specialty Husband White Male Cuba 1 +38 0.422222227 0.210325286 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.08552406 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female China 0 +47 0.5222222 0.137867123 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.131983131 0.8125 0 0 0.353535354 Private Bachelors Divorced Tech-support Unmarried White Female United-States 0 +59 0.655555546 0.136513323 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.156200737 0.6875 0 0 0.373737365 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +44 0.4888889 0.0168262385 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +76 0.844444454 0.187874362 0.8125 0 0 0.2020202 Private Bachelors Widowed Prof-specialty Not-in-family White Female United-States 0 +50 0.5555556 0.0245766 0.375 0 0 0.4040404 Local-gov 10th Never-married Other-service Not-in-family White Male United-States 0 +33 0.366666675 0.104312979 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +43 0.477777779 0.0502328761 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.209769621 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +37 0.411111116 0.109223045 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.161451608 0.4375 0 0 0.5555556 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +49 0.544444442 0.109689131 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Exec-managerial Not-in-family Amer-Indian-Eskimo Female United-States 0 +48 0.533333361 0.057323847 0.625 0 0 0.454545468 Self-emp-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +49 0.544444442 0.113855615 0.5625 0 0.143480256 0.4040404 Private HS-grad Separated Prof-specialty Unmarried White Female Puerto-Rico 0 +22 0.244444445 0.2941985 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +42 0.466666669 0.232613891 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female England 0 +36 0.4 0.0335669369 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +57 0.6333333 0.199713752 0.625 0 0 0.5050505 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +30 0.333333343 0.121426821 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +40 0.444444448 0.06441616 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Other-relative Amer-Indian-Eskimo Male United-States 0 +42 0.466666669 0.0223310366 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +56 0.622222245 0.221632585 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Italy 1 +55 0.6111111 0.01663226 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +25 0.2777778 0.298951656 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 +52 0.5777778 0.198484555 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +33 0.366666675 0.203317836 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Unmarried Asian-Pac-Islander Female United-States 0 +55 0.6111111 0.15280813 0.5625 0.0406404063 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +47 0.5222222 0.24438189 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.121464536 0.75 0 0 0.656565666 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 +55 0.6111111 0.139751 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Divorced Sales Not-in-family White Female Germany 0 +43 0.477777779 0.226740673 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +31 0.344444454 0.09675525 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +62 0.6888889 0.06834691 0.75 0 0 0.4040404 State-gov Assoc-acdm Widowed Prof-specialty Not-in-family White Female United-States 0 +42 0.466666669 0.177726224 0.5625 0 0 0.08080808 Local-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +38 0.422222227 0.0524144545 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.06429897 0.5625 0 0 0.424242437 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 +26 0.2888889 0.173711285 0.625 0 0 0.6060606 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +26 0.2888889 0.164592966 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +37 0.411111116 0.08536241 0.5625 0 0 0.727272749 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +79 0.8777778 0.065388076 0.5 0.184811845 0 0.454545468 Self-emp-inc 12th Widowed Sales Not-in-family White Male United-States 1 +61 0.677777767 0.08969054 0.25 0 0 0.4848485 Private 7th-8th Never-married Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.07046316 0.25 0 0 1 Self-emp-not-inc 7th-8th Never-married Other-service Other-relative White Female Mexico 0 +60 0.6666667 0.07094945 0.8125 0.07298073 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.174266949 0.5625 0 0 0.8181818 Self-emp-inc HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 +34 0.377777785 0.123206973 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.111936718 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 +27 0.3 0.1388323 0.375 0 0 0.6060606 Local-gov 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.233443 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +25 0.2777778 0.0729444548 0.5625 0 0 0.2020202 Private HS-grad Separated Other-service Unmarried White Female United-States 0 +32 0.355555564 0.04950344 0.25 0 0 0.4040404 Private 7th-8th Divorced Other-service Unmarried White Female United-States 0 +36 0.4 0.08698698 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.122098334 0.875 0 0 0.3030303 Private Masters Never-married Handlers-cleaners Unmarried White Male United-States 0 +40 0.444444448 0.09894761 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.123772062 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Male ? 1 +25 0.2777778 0.110788338 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +41 0.455555558 0.2070903 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.06323411 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.188477173 0.8125 0 0.518365443 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +52 0.5777778 0.09271741 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband Other Male Dominican-Republic 0 +32 0.355555564 0.06840551 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.09182363 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +35 0.3888889 0.175015241 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.06649065 0.5625 0 0 0.444444448 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +62 0.6888889 0.113613144 0.25 0 0 0.05050505 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.1340017 0.75 0 0 0.02020202 Self-emp-not-inc Assoc-acdm Never-married Prof-specialty Own-child Black Female United-States 0 +41 0.455555558 0.0196099561 0.625 0 0 0.2020202 ? Some-college Widowed ? Not-in-family White Female United-States 0 +28 0.311111122 0.116974756 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Not-in-family White Female Mexico 0 +23 0.25555557 0.045772057 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +50 0.5555556 0.06666645 0.8125 0.07298073 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.06342944 0.625 0 0 0.353535354 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +63 0.7 0.08246891 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +63 0.7 0.10417895 0.5625 0 0 0.4040404 Federal-gov HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 +40 0.444444448 0.07855567 0.5625 0 0 0.6060606 Private HS-grad Divorced Sales Not-in-family White Male United-States 1 +20 0.222222224 0.160762578 0.4375 0 0 0.4040404 ? 11th Divorced ? Not-in-family White Female United-States 0 +61 0.677777767 0.09388465 0.625 1 0 0.3030303 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +40 0.444444448 0.113848209 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +41 0.455555558 0.1599321 0.8125 0 0 0.151515156 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female Cuba 1 +41 0.455555558 0.146135435 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family Black Male ? 0 +27 0.3 0.145806074 0.8125 0 0 0.24242425 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 +20 0.222222224 0.08541899 0.625 0 0 0.151515156 State-gov Some-college Never-married Prof-specialty Own-child White Female United-States 0 +28 0.311111122 0.0346607566 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +35 0.3888889 0.03701274 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.149965152 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.0253760852 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +57 0.6333333 0.107306838 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.084408015 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +38 0.422222227 0.141178891 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +37 0.411111116 0.151509568 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 +43 0.477777779 0.295295715 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 +26 0.2888889 0.258823127 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.132554948 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 +27 0.3 0.16306068 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.124136448 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +45 0.5 0.1090816 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female Germany 0 +65 0.722222269 0.174149752 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 +57 0.6333333 0.06417437 0.625 1 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +59 0.655555546 0.143316686 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +18 0.2 0.138077259 0.625 0 0 0.262626261 Private Some-college Never-married Other-service Own-child White Male United-States 0 +44 0.4888889 0.2612263 0.5 0 0 0.4040404 Local-gov 12th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +37 0.411111116 0.0564960726 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +27 0.3 0.108543448 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +43 0.477777779 0.178956762 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +59 0.655555546 0.09865731 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.06550864 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +36 0.4 0.294934 0.5625 0 0 0.909090936 State-gov HS-grad Never-married Exec-managerial Unmarried Black Male United-States 0 +68 0.75555557 0.0900758058 0.625 0.200512 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +63 0.7 0.114489414 0.4375 0.0217602178 0 0.3030303 Private 11th Widowed Sales Not-in-family White Female United-States 0 +37 0.411111116 0.08531998 0.625 0 0 0.575757563 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +46 0.51111114 0.118376382 0.875 0 0.430670351 0.6060606 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +31 0.344444454 0.08201495 0.75 0 0 0.353535354 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female Poland 0 +23 0.25555557 0.12127123 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +22 0.244444445 0.08382406 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +49 0.544444442 0.128049016 0.5625 0 0.3838384 0.444444448 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.149918 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +38 0.422222227 0.0149827749 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +46 0.51111114 0.0768907 0.875 0 0.43663913 0.454545468 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.15421246 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 +26 0.2888889 0.08929181 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child Black Female United-States 0 +47 0.5222222 0.0693875253 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife Other Female Puerto-Rico 0 +40 0.444444448 0.126491129 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +31 0.344444454 0.0341138467 0.875 0 0 0.5050505 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +42 0.466666669 0.09274435 0.1875 0 0 0.353535354 Private 5th-6th Married-spouse-absent Farming-fishing Not-in-family White Male Mexico 0 +48 0.533333361 0.0205933172 0.6875 0 0 0.7070707 Self-emp-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +56 0.622222245 0.136202142 0.625 0 0 0.3838384 Private Some-college Separated Tech-support Unmarried Black Female United-States 0 +50 0.5555556 0.0337966122 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +17 0.188888893 0.1399544 0.375 0 0 0.2020202 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 +21 0.233333334 0.3641882 0.5625 0 0.3946281 0.25252524 Private HS-grad Never-married Other-service Other-relative Black Male United-States 0 +50 0.5555556 0.216723189 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +49 0.544444442 0.136089668 0.5625 0 0 0.323232323 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +34 0.377777785 0.09678623 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +32 0.355555564 0.07750092 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.150704011 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +62 0.6888889 0.23848173 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.02204613 0.8125 0 0 0.151515156 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +24 0.266666681 0.2632624 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family Black Female United-States 0 +31 0.344444454 0.0684964359 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 0 +36 0.4 0.188401744 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +58 0.644444466 0.1504676 0.75 0 0 0.353535354 Private Assoc-acdm Married-civ-spouse Priv-house-serv Other-relative White Female Poland 0 +46 0.51111114 0.138988554 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Wife White Female Mexico 0 +39 0.433333337 0.0514694862 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.124389693 0.5625 0 0 0.181818187 ? HS-grad Never-married ? Own-child White Female United-States 0 +21 0.233333334 0.05265019 0.5625 0 0 0.424242437 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +39 0.433333337 0.13565658 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +21 0.233333334 0.127306774 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 +33 0.366666675 0.08076554 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.36988762 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.1446119 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Unmarried White Female United-States 0 +30 0.333333343 0.0227728747 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Wife Other Female Taiwan 1 +43 0.477777779 0.157755241 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Female Cuba 0 +22 0.244444445 0.160112619 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +25 0.2777778 0.125238344 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Own-child White Female United-States 1 +69 0.7666667 0.193292946 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +17 0.188888893 0.09431301 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Own-child White Female United-States 0 +18 0.2 0.07763024 0.4375 0 0 0.121212125 ? 11th Never-married ? Own-child White Male United-States 0 +54 0.6 0.104672648 0.5625 0 0 0.4040404 Private HS-grad Widowed Handlers-cleaners Unmarried White Female United-States 0 +65 0.722222269 0.07945215 0.5625 0 0 0.454545468 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +28 0.311111122 0.106914841 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Other-relative Other Male Ecuador 0 +27 0.3 0.1343506 0.6875 0 0 0.3838384 Local-gov Assoc-voc Never-married Tech-support Own-child White Female United-States 0 +35 0.3888889 0.193776548 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Craft-repair Unmarried White Male United-States 1 +38 0.422222227 0.0927504152 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 +33 0.366666675 0.07281985 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +26 0.2888889 0.2471198 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +56 0.622222245 0.126190051 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Wife White Female Canada 1 +38 0.422222227 0.02229736 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 1 +51 0.566666663 0.180937633 0.625 0 0.4722222 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Wife White Female Canada 0 +26 0.2888889 0.241782039 0.625 0 0 0.5050505 Private Some-college Never-married Priv-house-serv Not-in-family White Female Hungary 0 +33 0.366666675 0.134186253 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.167204261 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +36 0.4 0.3101202 0.3125 0 0 0.4040404 Private 9th Divorced Sales Not-in-family White Female United-States 0 +42 0.466666669 0.126148969 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 +44 0.4888889 0.0780842 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +44 0.4888889 0.122422978 0.8125 0.1502415 0 0.5555556 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 +21 0.233333334 0.0182184335 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +41 0.455555558 0.5432406 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.101538688 1 0.1502415 0 0.5050505 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male Canada 1 +62 0.6888889 0.0470578335 0.6875 0.07298073 0 0.5050505 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.108294919 0.4375 0 0 0.454545468 Private 11th Separated Craft-repair Not-in-family White Male Germany 0 +38 0.422222227 0.1478718 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +60 0.6666667 0.01675215 0.625 0 0 0.3030303 Private Some-college Separated Transport-moving Not-in-family Amer-Indian-Eskimo Female United-States 0 +24 0.266666681 0.0743386745 0.5 0 0 0.4040404 Private 12th Never-married Machine-op-inspct Unmarried White Male Mexico 0 +24 0.266666681 0.253568232 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +22 0.244444445 0.205159947 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +32 0.355555564 0.09678623 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried White Female United-States 0 +22 0.244444445 0.160918832 0.125 0 0 0.24242425 Private 1st-4th Never-married Machine-op-inspct Not-in-family White Male Mexico 0 +51 0.566666663 0.135123149 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +31 0.344444454 0.12328577 0.875 0 0.453856736 0.4848485 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.141275212 0.9375 0 0 0.5555556 Local-gov Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.11830835 0.75 0.14084141 0 0.4040404 ? Assoc-acdm Divorced ? Not-in-family White Female United-States 1 +49 0.544444442 0.132488951 0.5625 0.07298073 0 0.434343427 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +37 0.411111116 0.0664946958 0.8125 0 0 0.424242437 Local-gov Bachelors Never-married Tech-support Own-child White Female United-States 0 +37 0.411111116 0.121337235 0.9375 0 0 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +66 0.733333349 0.1018566 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 +18 0.2 0.0800475553 0.5625 0 0 0.24242425 ? HS-grad Never-married ? Own-child White Female United-States 0 +46 0.51111114 0.1902991 0.6875 0 0 0.4040404 Private Assoc-voc Separated Machine-op-inspct Not-in-family Black Female United-States 0 +52 0.5777778 0.0603042357 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.19600594 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +67 0.7444445 0.111932673 0.5625 0 0 0.3838384 Private HS-grad Widowed Exec-managerial Unmarried White Male United-States 1 +19 0.211111113 0.127075076 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 +37 0.411111116 0.120527647 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +42 0.466666669 0.127121553 0.5625 0 0.453856736 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male Italy 1 +39 0.433333337 0.108309731 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 +54 0.6 0.0630461946 0.5625 0 0.4242424 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +46 0.51111114 0.214406908 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.0740355849 0.5625 0 0 0.323232323 ? HS-grad Separated ? Unmarried Black Female United-States 0 +33 0.366666675 0.05900499 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +69 0.7666667 0.0602658466 0.625 0 0 0.141414136 Self-emp-not-inc Some-college Widowed Farming-fishing Not-in-family White Female United-States 0 +21 0.233333334 0.03253239 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +27 0.3 0.148681387 0.5625 0 0 0.4848485 Private HS-grad Never-married Handlers-cleaners Other-relative Black Male United-States 0 +39 0.433333337 0.260703653 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.168884054 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Black Male United-States 0 +26 0.2888889 0.05270946 0.6875 0 0 0.363636374 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +42 0.466666669 0.0211402271 1 0 0 0.4040404 Private Doctorate Married-spouse-absent Prof-specialty Unmarried Amer-Indian-Eskimo Female United-States 0 +36 0.4 0.194779441 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +24 0.266666681 0.407176524 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Unmarried White Male Mexico 0 +35 0.3888889 0.221233174 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male Mexico 0 +42 0.466666669 0.271560341 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Unmarried Black Female United-States 0 +37 0.411111116 0.1478718 0.6875 0.04386044 0 0.444444448 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +41 0.455555558 0.148535237 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.137837484 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Unmarried Black Female United-States 0 +42 0.466666669 0.135992 0.9375 1 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.07402952 0.8125 0 0 0.161616161 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 +18 0.2 0.246300116 0.5625 0 0 0.161616161 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +41 0.455555558 0.1183225 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +31 0.344444454 0.137056187 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +26 0.2888889 0.07166811 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +67 0.7444445 0.116357125 0.125 0.0206202064 0 0.343434334 Private 1st-4th Widowed Machine-op-inspct Not-in-family White Female Ecuador 0 +37 0.411111116 0.08430429 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.167938411 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.0637513846 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child Amer-Indian-Eskimo Male United-States 0 +40 0.444444448 0.1316046 0.75 0.07688077 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.08776289 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 +38 0.422222227 0.0449153222 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +43 0.477777779 0.226335883 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Not-in-family White Male United-States 0 +23 0.25555557 0.130386844 0.625 0 0 0.4040404 Private Some-college Separated Farming-fishing Other-relative White Female United-States 0 +44 0.4888889 0.219209209 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +60 0.6666667 0.211390153 0.875 0 0 0.25252524 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.0205488633 0.875 0 0.383149683 0.5555556 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +21 0.233333334 0.0219834913 0.625 0 0 0.2020202 Local-gov Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +18 0.2 0.158248946 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +49 0.544444442 0.08124779 0.8125 0.2782828 0 0.6060606 Private Bachelors Divorced Exec-managerial Not-in-family Black Female United-States 1 +43 0.477777779 0.235992342 0.1875 0 0 0.4040404 Private 5th-6th Divorced Priv-house-serv Unmarried White Female Mexico 0 +26 0.2888889 0.119193375 0.4375 0 0 0.656565666 ? 11th Never-married ? Not-in-family White Female United-States 0 +36 0.4 0.0245321468 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +31 0.344444454 0.0831121355 0.5625 0.05178052 0 0.353535354 Private HS-grad Married-civ-spouse Transport-moving Wife White Female United-States 1 +38 0.422222227 0.0881070644 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Other-relative White Female United-States 0 +43 0.477777779 0.02373266 0.625 0 0 0.8484849 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +58 0.644444466 0.0224623755 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +55 0.6111111 0.11947155 0.5625 0 0 0.2929293 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.145570338 0.75 0 0 0.353535354 Private Assoc-acdm Divorced Exec-managerial Unmarried Black Female Jamaica 0 +38 0.422222227 0.2257041 0.8125 0 0 0.353535354 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +54 0.6 0.134532452 0.5625 0 0.459366381 0.353535354 Self-emp-not-inc HS-grad Widowed Craft-repair Not-in-family White Male United-States 0 +57 0.6333333 0.111726575 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +35 0.3888889 0.261181176 0.75 0 0 0.5252525 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 +44 0.4888889 0.100991778 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 +36 0.4 0.127186209 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.1957702 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.104803987 0.625 0 0.506198347 0.4040404 Private Some-college Never-married Other-service Own-child Black Female United-States 0 +25 0.2777778 0.07734735 0.9375 0 0 0.08080808 Private Prof-school Never-married Prof-specialty Not-in-family White Female Italy 0 +54 0.6 0.113526255 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.06941716 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +37 0.411111116 0.08340579 0.625 0 0 0.6060606 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +60 0.6666667 0.0374626629 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Other-service Husband Black Male United-States 0 +66 0.733333349 0.127859741 0.25 0 0 0.2020202 Local-gov 7th-8th Widowed Other-service Not-in-family White Female United-States 0 +36 0.4 0.14678067 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +29 0.322222233 0.230127871 0.5625 0 0.359045 0.5050505 Self-emp-not-inc HS-grad Married-spouse-absent Transport-moving Other-relative Asian-Pac-Islander Male India 1 +29 0.322222233 0.109788142 0.8125 0.0220202189 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Female Taiwan 0 +25 0.2777778 0.130902767 0.8125 0 0 0.444444448 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +62 0.6888889 0.036962226 0.5625 0 0 0.25252524 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +23 0.25555557 0.264866084 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +38 0.422222227 0.1881283 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +33 0.366666675 0.264572442 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +49 0.544444442 0.02357236 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +57 0.6333333 0.0343610346 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +57 0.6333333 0.08938947 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +46 0.51111114 0.125329956 0.625 0 0 0.454545468 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 +37 0.411111116 0.1320956 0.875 0 0 0.7070707 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.2053647 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +26 0.2888889 0.0279658251 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +40 0.444444448 0.233613417 0.6875 0 0 0.4040404 Private Assoc-voc Separated Prof-specialty Other-relative White Female United-States 0 +39 0.433333337 0.07222512 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Other-relative Amer-Indian-Eskimo Male United-States 0 +39 0.433333337 0.101114362 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Other-service Unmarried Black Female United-States 0 +31 0.344444454 0.269774139 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +31 0.344444454 0.275894552 0.8125 0 0 0.363636374 Private Bachelors Married-civ-spouse Machine-op-inspct Husband Other Male Mexico 0 +27 0.3 0.0919024348 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 +36 0.4 0.13669382 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Iran 0 +40 0.444444448 0.132694378 0.8125 0.0861408561 0 0.4040404 Local-gov Bachelors Divorced Tech-support Not-in-family White Female England 1 +57 0.6333333 0.160093084 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 +24 0.266666681 0.114687435 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.108293571 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +28 0.311111122 0.0227641184 0.5 0 0 0.5050505 Private 12th Never-married Transport-moving Not-in-family White Male United-States 0 +22 0.244444445 0.133250713 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +31 0.344444454 0.150340974 0.25 0 0 0.5050505 Private 7th-8th Never-married Handlers-cleaners Own-child White Male United-States 0 +33 0.366666675 0.08470505 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +20 0.222222224 0.191262916 0.625 0 0 0.151515156 Private Some-college Never-married Handlers-cleaners Other-relative White Male United-States 0 +25 0.2777778 0.2520117 0.5 0 0 0.6060606 Private 12th Married-civ-spouse Farming-fishing Husband Other Male Mexico 0 +49 0.544444442 0.0798589662 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +21 0.233333334 0.09945074 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +45 0.5 0.0557666346 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.09602783 0.5625 0 0 0.454545468 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.158393085 0.1875 0 0 0.323232323 Private 5th-6th Married-spouse-absent Priv-house-serv Not-in-family White Female Mexico 0 +23 0.25555557 0.0358623452 0.8125 0 0.3677686 0.121212125 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +47 0.5222222 0.01888254 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.166418254 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +30 0.333333343 0.0831121355 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried White Female United-States 0 +29 0.322222233 0.0898003355 0.625 0 0 0.4040404 Local-gov Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 +31 0.344444454 0.06888237 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Unmarried White Female United-States 0 +64 0.7111111 0.0308593288 0.3125 0 0 0.5050505 ? 9th Married-civ-spouse ? Husband White Male United-States 0 +55 0.6111111 0.16231373 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Other-relative Asian-Pac-Islander Male Philippines 0 +19 0.211111113 0.260238916 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +31 0.344444454 0.236175537 0.5 0 0 0.4040404 State-gov 12th Married-civ-spouse Tech-support Wife White Female United-States 1 +18 0.2 0.05128426 0.4375 0 0 0.08080808 State-gov 11th Never-married Other-service Own-child White Male United-States 0 +68 0.75555557 0.04968866 0.5625 0 0 0.24242425 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +50 0.5555556 0.189602658 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +36 0.4 0.19758673 0.625 0 0 0.4848485 Local-gov Some-college Never-married Exec-managerial Unmarried Black Female United-States 0 +44 0.4888889 0.09894626 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +58 0.644444466 0.223259166 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +20 0.222222224 0.14394711 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child Black Female United-States 0 +18 0.2 0.06856244 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 +32 0.355555564 0.153744355 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +49 0.544444442 0.08769823 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Other-service Not-in-family White Female United-States 0 +34 0.377777785 0.218396246 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +22 0.244444445 0.150210992 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.1277466 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +35 0.3888889 0.09367922 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +26 0.2888889 0.242019132 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male ? 0 +44 0.4888889 0.0505588651 0.5 0 0 0.6060606 Self-emp-not-inc 12th Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Vietnam 0 +55 0.6111111 0.0941890851 0.5625 0 0 0.6060606 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +21 0.233333334 0.0231089685 0.6875 0 0.597566545 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.233052358 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Wife White Female United-States 0 +39 0.433333337 0.109973364 0.625 0.0220202189 0 0.444444448 Local-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +52 0.5777778 0.0211893953 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +57 0.6333333 0.02271495 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +67 0.7444445 0.0428044647 0.25 0 0 0.353535354 ? 7th-8th Widowed ? Not-in-family White Female United-States 0 +58 0.644444466 0.202479959 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +27 0.3 0.119264096 0.625 0 0 0.161616161 Local-gov Some-college Never-married Prof-specialty Other-relative White Male United-States 0 +66 0.733333349 0.0251437165 0.5625 0 0 0.151515156 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +41 0.455555558 0.112968571 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +18 0.2 0.08835425 0.4375 0 0 0.161616161 Private 11th Never-married Prof-specialty Own-child White Female United-States 0 +58 0.644444466 0.185800552 0.5625 0.0861408561 0 0.5252525 Private HS-grad Widowed Craft-repair Unmarried White Male Mexico 1 +50 0.5555556 0.185343891 0.1875 0 0 0.373737365 Private 5th-6th Divorced Other-service Not-in-family White Male Cuba 0 +31 0.344444454 0.2687322 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +32 0.355555564 0.149965152 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family White Male United-States 0 +37 0.411111116 0.07484921 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.0928096846 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.163096383 0.6875 0 0 0.5050505 Local-gov Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +35 0.3888889 0.160215676 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 +44 0.4888889 0.247691631 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female Mexico 0 +26 0.2888889 0.139152229 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Own-child White Male Mexico 0 +48 0.533333361 0.166391984 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +40 0.444444448 0.126423776 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +62 0.6888889 0.0280985124 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 +37 0.411111116 0.10226611 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.0801088437 0.4375 0 0 0.181818187 Private 11th Never-married Sales Own-child White Male United-States 0 +48 0.533333361 0.1514577 0.5625 0 0 0.3838384 Private HS-grad Divorced Machine-op-inspct Other-relative Other Female Ecuador 0 +45 0.5 0.120118812 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +35 0.3888889 0.0413166247 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.0249133669 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +34 0.377777785 0.152418166 0.5625 0 0 0.5151515 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +29 0.322222233 0.1256977 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female Cuba 0 +19 0.211111113 0.116239928 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Male United-States 0 +53 0.5888889 0.153156355 0.625 0 0 0.6060606 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +49 0.544444442 0.126330152 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +71 0.788888931 0.09261032 0.5625 0 0 0.161616161 Private HS-grad Widowed Sales Other-relative White Female United-States 0 +38 0.422222227 0.161242142 0.25 0 0 0.363636374 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +39 0.433333337 0.220356241 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.09483231 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.126254037 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +52 0.5777778 0.131056339 0.1875 0 0 0.4040404 Private 5th-6th Divorced Farming-fishing Unmarried White Male United-States 0 +41 0.455555558 0.251014173 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +20 0.222222224 0.1585783 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +30 0.333333343 0.08625619 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +56 0.622222245 0.061658714 0.375 0 0 0.363636374 Private 10th Divorced Adm-clerical Unmarried Black Female United-States 0 +26 0.2888889 0.104131125 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +36 0.4 0.129419655 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +26 0.2888889 0.145835027 0.8125 0 0 0.424242437 Local-gov Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 +58 0.644444466 0.105098322 0.75 0 0.4242424 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +24 0.266666681 0.139328018 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +41 0.455555558 0.06575852 0.625 0 0 0.323232323 Private Some-college Divorced Sales Not-in-family Asian-Pac-Islander Female United-States 0 +27 0.3 0.127654985 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 +28 0.311111122 0.257148057 0.625 0 0.5369605 0.4040404 State-gov Some-college Separated Exec-managerial Own-child White Male United-States 0 +57 0.6333333 0.2483975 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +21 0.233333334 0.02773817 0.625 0 0 0.2020202 State-gov Some-college Never-married Prof-specialty Own-child White Female United-States 0 +50 0.5555556 0.128686845 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +27 0.3 0.08955517 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +58 0.644444466 0.1034219 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +27 0.3 0.0447718576 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.16186583 0.5625 0 0 0.171717167 Private HS-grad Separated Sales Unmarried Black Female United-States 0 +68 0.75555557 0.163059339 0.8125 0.200512 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.08622319 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Widowed Sales Unmarried White Female United-States 0 +19 0.211111113 0.0198867787 0.625 0 0 0.181818187 Private Some-college Never-married Other-service Own-child White Female United-States 0 +26 0.2888889 0.230990678 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried Black Female United-States 0 +37 0.411111116 0.145130515 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Unmarried Black Female United-States 0 +53 0.5888889 0.156205446 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +32 0.355555564 0.035385482 0.625 0 0 0.3838384 Private Some-college Never-married Tech-support Not-in-family Black Male United-States 0 +18 0.2 0.0188050829 0.4375 0 0 0.25252524 Private 11th Never-married Exec-managerial Own-child White Female United-States 0 +53 0.5888889 0.1030858 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.134237438 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +50 0.5555556 0.157182068 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +43 0.477777779 0.232900813 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +60 0.6666667 0.16091615 0.8125 0 0 0.464646459 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.131748065 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +34 0.377777785 0.165132478 0.5625 0 0.383149683 0.454545468 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +37 0.411111116 0.09324479 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +25 0.2777778 0.04544135 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +46 0.51111114 0.06908376 0.875 0.1502415 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.143692523 0.4375 0 0.404499531 0.4040404 Private 11th Married-spouse-absent Handlers-cleaners Own-child White Male Dominican-Republic 0 +26 0.2888889 0.02505683 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.09444233 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +18 0.2 0.201292515 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 +22 0.244444445 0.0345940776 0.8125 0 0 0.161616161 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +36 0.4 0.1346712 0.625 0 0 0.3030303 Private Some-college Divorced Machine-op-inspct Own-child White Female United-States 0 +59 0.655555546 0.0219248943 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.123825945 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Other-service Wife White Female El-Salvador 0 +33 0.366666675 0.121971034 0.375 0 0 0.353535354 Private 10th Divorced Craft-repair Not-in-family White Male England 0 +53 0.5888889 0.09136024 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female South 0 +44 0.4888889 0.06482702 0.625 0.03411034 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +55 0.6111111 0.122057922 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +56 0.622222245 0.08959693 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +54 0.6 0.08410089 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Divorced Sales Not-in-family White Female United-States 0 +51 0.566666663 0.0307124984 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 +31 0.344444454 0.130863041 0.625 0.0246302467 0 0.3838384 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.06882175 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.0815852359 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +22 0.244444445 0.09346503 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +43 0.477777779 0.0666725039 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Husband Amer-Indian-Eskimo Male United-States 0 +26 0.2888889 0.08508559 0.75 0 0 0.4040404 State-gov Assoc-acdm Never-married Adm-clerical Unmarried Black Female United-States 0 +30 0.333333343 0.07635456 0.8125 0 0 0.181818187 Private Bachelors Never-married Sales Own-child White Male United-States 0 +30 0.333333343 0.219706282 0.3125 0.0258002579 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.2537804 0.5625 0 0 0.151515156 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +27 0.3 0.09231666 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.188013777 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.120438069 0.8125 0.0861408561 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +25 0.2777778 0.165264487 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Separated Craft-repair Own-child White Male United-States 0 +30 0.333333343 0.0334025957 0.9375 0 0 0.4040404 Federal-gov Prof-school Never-married Prof-specialty Not-in-family Black Female United-States 0 +46 0.51111114 0.160737664 0.5625 0.07298073 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Husband Black Male United-States 1 +47 0.5222222 0.111928634 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 1 +66 0.733333349 0.167739049 0.8125 0.0555605553 0 0.262626261 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.105342813 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +71 0.788888931 0.08656871 0.5625 0 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +36 0.4 0.1259065 0.8125 0 0.4242424 0.5555556 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +46 0.51111114 0.100012459 0.5625 0 0 0.4040404 ? HS-grad Married-spouse-absent ? Not-in-family Asian-Pac-Islander Male Philippines 0 +44 0.4888889 0.261176467 0.625 0 0 0.151515156 Local-gov Some-college Widowed Adm-clerical Unmarried White Female United-States 0 +42 0.466666669 0.07780064 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +39 0.433333337 0.13565658 0.8125 0 0.453856736 0.454545468 Private Bachelors Married-civ-spouse Transport-moving Husband White Male Philippines 1 +36 0.4 0.14857161 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +60 0.6666667 0.189981177 0.8125 0 0.453856736 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.189240292 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +26 0.2888889 0.196393222 0.8125 0 0 0.2020202 Private Bachelors Never-married Transport-moving Own-child White Male United-States 0 +24 0.266666681 0.09579479 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +17 0.188888893 0.0700644255 0.4375 0 0 0.181818187 ? 11th Never-married ? Own-child White Male United-States 0 +45 0.5 0.09985418 0.875 0 0 0.353535354 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +54 0.6 0.114879392 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.14985469 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 +63 0.7 0.0388454273 0.875 0 0 0.4848485 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +22 0.244444445 0.157353818 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.0287828222 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +33 0.366666675 0.157005608 0.3125 0 0 0.333333343 Private 9th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +64 0.7111111 0.09638952 0.8125 0 0 0.3030303 Private Bachelors Widowed Prof-specialty Not-in-family White Female United-States 0 +50 0.5555556 0.131907687 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.07805996 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Widowed Prof-specialty Unmarried White Female United-States 0 +31 0.344444454 0.204654127 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +44 0.4888889 0.116167858 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female Vietnam 0 +53 0.5888889 0.0202114228 0.375 0 0 0.353535354 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +33 0.366666675 0.0996298939 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Other-service Unmarried White Female United-States 0 +34 0.377777785 0.116330184 0.5 0 0 0.4040404 Federal-gov 12th Married-civ-spouse Armed-Forces Husband White Male United-States 0 +27 0.3 0.104436234 0.5625 0 0 0.7070707 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +43 0.477777779 0.102760486 0.6875 0 0.5369605 0.363636374 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 +80 0.8888889 0.08939689 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +31 0.344444454 0.13143082 0.75 0 0 0.323232323 Private Assoc-acdm Divorced Other-service Not-in-family White Female United-States 0 +40 0.444444448 0.2541394 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 +53 0.5888889 0.1979794 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +58 0.644444466 0.122666121 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.02190873 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.0944335759 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.2547449 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male Mexico 1 +23 0.25555557 0.142520577 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife Black Female United-States 0 +31 0.344444454 0.08042742 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 +52 0.5777778 0.161657035 0.875 0 0 0.7070707 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.0643575639 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Own-child White Male United-States 0 +45 0.5 0.123735018 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +36 0.4 0.127555311 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +52 0.5777778 0.256369442 0.1875 0 0 0.4040404 Private 5th-6th Widowed Other-service Unmarried White Female Mexico 0 +54 0.6 0.0359714553 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.101353467 0.9375 0 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.1183225 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.252786249 0.5625 0 0 0.5050505 Private HS-grad Never-married Tech-support Not-in-family Asian-Pac-Islander Male United-States 0 +21 0.233333334 0.187505946 0.625 0 0 0.161616161 ? Some-college Never-married ? Own-child White Male United-States 0 +23 0.25555557 0.1433874 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.328068554 0.25 0 0 0.4040404 Self-emp-inc 7th-8th Never-married Craft-repair Unmarried Black Male United-States 0 +22 0.244444445 0.1175055 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +55 0.6111111 0.0897154659 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +71 0.788888931 0.05203256 0.5625 0 0 0.171717167 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +47 0.5222222 0.0953125358 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.122319251 0.375 0 0 0.121212125 Self-emp-inc 10th Never-married Sales Own-child White Male United-States 0 +31 0.344444454 0.0859497339 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +32 0.355555564 0.1041089 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Other-relative Asian-Pac-Islander Male ? 0 +46 0.51111114 0.0227937549 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +27 0.3 0.101084054 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +39 0.433333337 0.0208229925 0.625 0 0.43663913 0.5050505 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.101901725 0.5625 0 0 0.4848485 Private HS-grad Divorced Handlers-cleaners Not-in-family White Female United-States 0 +30 0.333333343 0.0328880139 0.5625 0 0.3677686 0.3030303 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +17 0.188888893 0.1305101 0.3125 0 0 0.2020202 Private 9th Never-married Other-service Unmarried White Male United-States 0 +33 0.366666675 0.1868755 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +72 0.8 0.152070612 1 0 0 0.3030303 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 +34 0.377777785 0.2938907 0.625 0 0 0.4040404 Federal-gov Some-college Married-AF-spouse Adm-clerical Wife White Female United-States 1 +65 0.722222269 0.172011271 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative Asian-Pac-Islander Male Cambodia 0 +36 0.4 0.117826775 0.8125 0 0.4331956 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.117726423 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 +26 0.2888889 0.165438935 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative White Male Mexico 0 +22 0.244444445 0.154072359 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +47 0.5222222 0.238530889 0.9375 1 0 0.4848485 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.1299248 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.128234908 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 +38 0.422222227 0.237934813 0.875 0 0 0.5050505 Private Masters Never-married Adm-clerical Not-in-family White Female Italy 1 +34 0.377777785 0.07624276 0.75 0 0 0.282828271 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 +44 0.4888889 0.139810935 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.06277745 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Asian-Pac-Islander Male United-States 0 +50 0.5555556 0.110458307 0.8125 0 0 0.444444448 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +47 0.5222222 0.07540959 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 +20 0.222222224 0.147586226 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +24 0.266666681 0.07506205 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +29 0.322222233 0.208646163 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +37 0.411111116 0.150211662 0.6875 0 0 0.323232323 Local-gov Assoc-voc Never-married Other-service Unmarried Black Female United-States 0 +42 0.466666669 0.204185352 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Male United-States 0 +20 0.222222224 0.0276384875 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 +68 0.75555557 0.107220627 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.164617211 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female Vietnam 0 +72 0.8 0.319085628 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +45 0.5 0.0483752675 0.625 0 0 0.2020202 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +30 0.333333343 0.0559478141 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +33 0.366666675 0.1011339 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.128500953 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +56 0.622222245 0.119911365 0.625 0.04416044 0 0.6060606 Private Some-college Widowed Exec-managerial Not-in-family White Male United-States 0 +25 0.2777778 0.10770423 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +41 0.455555558 0.128567636 0.5625 0 0 0.4040404 Private HS-grad Divorced Priv-house-serv Not-in-family White Female Guatemala 0 +25 0.2777778 0.164198279 0.8125 0 0 0.373737365 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +31 0.344444454 0.0835317448 0.75 0 0 0.4040404 State-gov Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +36 0.4 0.107102759 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.123795636 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.130284473 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.165035486 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 +55 0.6111111 0.06650884 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Tech-support Husband White Male Canada 1 +46 0.51111114 0.09474205 0.625 0 0 0.4848485 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.232315511 0.8125 0 0.371212125 0.2020202 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.114487395 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Other-service Husband Black Male United-States 0 +28 0.311111122 0.104665242 0.8125 0 0 0.5555556 State-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +42 0.466666669 0.165229455 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +41 0.455555558 0.0499641337 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +39 0.433333337 0.188973576 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +64 0.7111111 0.02065326 0.6875 0 0 0.3030303 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +20 0.222222224 0.07405646 0.625 0 0 0.25252524 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +45 0.5 0.129852727 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +31 0.344444454 0.163966581 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +36 0.4 0.07159469 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.220959723 0.3125 0 0 0.4040404 Private 9th Separated Other-service Unmarried Other Female Mexico 0 +33 0.366666675 0.0328024775 0.6875 0 0 0.656565666 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +51 0.566666663 0.07495294 0.5625 1 0 0.353535354 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Female United-States 1 +36 0.4 0.32600686 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 +40 0.444444448 0.140411735 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.115869485 0.6875 0.07298073 0 0.5151515 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 1 +40 0.444444448 0.0201568659 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried White Female England 0 +46 0.51111114 0.06601446 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.0730569363 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.139624372 0.5625 0 0.454545438 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +26 0.2888889 0.113425225 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +25 0.2777778 0.04508303 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Other-relative White Male United-States 0 +35 0.3888889 0.0283180848 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.124473214 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Other-relative White Male United-States 0 +39 0.433333337 0.980285645 0.75 0 0 0.4040404 Private Assoc-acdm Separated Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.299980134 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Other-service Unmarried White Male United-States 0 +37 0.411111116 0.187630549 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +79 0.8777778 0.0572362877 0.6875 0 0 0.2020202 Self-emp-not-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.4441987 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +44 0.4888889 0.0922647938 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.187314659 0.5625 0 0.3611111 0.3030303 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.06480681 0.8125 0 0 0.454545468 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +46 0.51111114 0.08829431 0.8125 0 0.43663913 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +58 0.644444466 0.138350725 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.28069213 0.75 0 0 0.4848485 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Male United-States 0 +36 0.4 0.121685453 0.5625 0 0.4331956 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.0485746339 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +41 0.455555558 0.07337821 0.5625 0.143441439 0 0.4040404 State-gov HS-grad Never-married Transport-moving Not-in-family White Female United-States 1 +49 0.544444442 0.131978408 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.06825935 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 +29 0.322222233 0.295858771 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Protective-serv Husband White Male Peru 0 +63 0.7 0.143526837 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.04036627 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +65 0.722222269 0.116396859 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +26 0.2888889 0.0275576636 0.8125 0 0 0.25252524 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +42 0.466666669 0.0936293751 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 +44 0.4888889 0.0820237 0.625 0 0 0.373737365 Private Some-college Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 +51 0.566666663 0.08800873 0.5625 0 0 0.0606060624 ? HS-grad Separated ? Not-in-family Black Male United-States 0 +41 0.455555558 0.09908366 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +22 0.244444445 0.160173908 0.75 0 0 0.353535354 Local-gov Assoc-acdm Never-married Adm-clerical Own-child Black Female Haiti 0 +36 0.4 0.08664348 0.625 0 0 0.25252524 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +18 0.2 0.07508293 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +33 0.366666675 0.195133716 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +46 0.51111114 0.09560418 0.8125 0 0 0.3838384 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.21807228 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Priv-house-serv Other-relative White Female United-States 0 +41 0.455555558 0.118988626 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +52 0.5777778 0.10455478 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +40 0.444444448 0.0965356752 0.625 0 0 0.4040404 Private Some-college Separated Handlers-cleaners Not-in-family White Male United-States 0 +53 0.5888889 0.119358391 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Prof-specialty Unmarried White Female United-States 0 +45 0.5 0.08290401 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.03171337 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +56 0.622222245 0.06877191 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +24 0.266666681 0.158882737 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +71 0.788888931 0.115878917 0.25 0 0 0.5050505 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +20 0.222222224 0.132825717 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Female United-States 0 +26 0.2888889 0.102681682 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +34 0.377777785 0.116472974 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.144739866 0.3125 0 0 0.4040404 ? 9th Divorced ? Unmarried White Female Mexico 0 +49 0.544444442 0.07835765 0.5625 0 0.14990817 0.6060606 Private HS-grad Separated Prof-specialty Unmarried White Female United-States 0 +48 0.533333361 0.186342746 1 0 0.43663913 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.04036088 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +30 0.333333343 0.130760655 0.625 0 0.371212125 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +51 0.566666663 0.06407199 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +46 0.51111114 0.19701153 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Sales Unmarried White Female United-States 0 +32 0.355555564 0.0308451857 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +42 0.466666669 0.0803924054 0.9375 0.1502415 0 0.4040404 Private Prof-school Married-civ-spouse Sales Wife Amer-Indian-Eskimo Female South 1 +52 0.5777778 0.0702361763 0.625 0 0 0.5050505 State-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +57 0.6333333 0.116043933 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Other-relative Black Female United-States 0 +35 0.3888889 0.121901661 0.625 0 0 0.3939394 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +52 0.5777778 0.0745926 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +59 0.655555546 0.374948561 0.3125 0 0 0.121212125 ? 9th Divorced ? Not-in-family White Female United-States 0 +36 0.4 0.0151504846 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +33 0.366666675 0.180412278 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Cuba 1 +67 0.7444445 0.1729778 0.5625 0 0 0.2020202 Local-gov HS-grad Divorced Protective-serv Not-in-family Black Male United-States 0 +31 0.344444454 0.07903658 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +31 0.344444454 0.04201104 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +28 0.311111122 0.211933687 0.625 0 0 0.424242437 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +72 0.8 0.07729549 0.25 0 0 0.2020202 ? 7th-8th Widowed ? Unmarried White Female United-States 0 +36 0.4 0.06279025 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +58 0.644444466 0.111345351 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +56 0.622222245 0.08403757 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.0184602328 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +37 0.411111116 0.133926272 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.183061287 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Exec-managerial Unmarried White Female United-States 0 +26 0.2888889 0.04330086 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +51 0.566666663 0.123519488 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.162167579 0.625 0.04386044 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.158226043 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female El-Salvador 0 +20 0.222222224 0.05942662 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.104008541 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +37 0.411111116 0.08021661 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.10209436 0.6875 0.04386044 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +54 0.6 0.08001118 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +32 0.355555564 0.020542128 0.8125 0 0 0.323232323 ? Bachelors Divorced ? Unmarried White Female United-States 0 +34 0.377777785 0.1121738 0.625 0.07688077 0 0.0606060624 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 +30 0.333333343 0.183006048 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.207784042 0.5625 0 0 0.4040404 State-gov HS-grad Married-spouse-absent Exec-managerial Unmarried White Female United-States 0 +48 0.533333361 0.116316035 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Own-child White Female United-States 0 +42 0.466666669 0.02018044 0.8125 0 0 0.4848485 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +62 0.6888889 0.1349305 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.196471363 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.0452844165 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +45 0.5 0.113179386 0.8125 0 0 0.323232323 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.0928224847 0.625 0 0 0.454545468 Private Some-college Separated Sales Not-in-family White Male United-States 0 +64 0.7111111 0.08502228 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +42 0.466666669 0.05323347 0.8125 0 0 0.656565666 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +60 0.6666667 0.220565036 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.0977702662 0.5625 0 0 0.5858586 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +67 0.7444445 0.0249827411 0.25 0 0 0.04040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +45 0.5 0.08714661 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Tech-support Unmarried White Female ? 0 +53 0.5888889 0.0224313922 0.9375 0 0 0.3838384 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.241799548 0.6875 0.1502415 0 0.5050505 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 +32 0.355555564 0.09642454 0.375 0 0 0.4040404 ? 10th Married-civ-spouse ? Wife White Female United-States 0 +23 0.25555557 0.08992696 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +28 0.311111122 0.11376065 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 0 +55 0.6111111 0.505805552 0.25 0 0 0.414141417 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.09626424 0.875 0 0 0.24242425 Private Masters Never-married Adm-clerical Not-in-family White Female United-States 1 +74 0.822222233 0.153616384 0.625 0.200512 0 0.25252524 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.0614189357 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +37 0.411111116 0.195735186 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +22 0.244444445 0.02094827 0.625 0 0 0.04040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Female South 0 +44 0.4888889 0.14610377 0.375 0 0 0.7070707 Self-emp-not-inc 10th Married-civ-spouse Other-service Husband White Male United-States 0 +23 0.25555557 0.08085512 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Own-child White Male United-States 0 +41 0.455555558 0.218648821 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Yugoslavia 0 +45 0.5 0.0546452 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male United-States 1 +29 0.322222233 0.107953437 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 +33 0.366666675 0.154732421 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +61 0.677777767 0.09747593 0.875 0.07298073 0 0.6060606 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.0999733955 0.75 0.07688077 0 0.454545468 Private Assoc-acdm Married-civ-spouse Sales Wife Other Female United-States 1 +22 0.244444445 0.108033583 0.625 0 0 0.3838384 Private Some-college Never-married Sales Other-relative White Male United-States 0 +28 0.311111122 0.08719578 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Not-in-family White Male El-Salvador 0 +30 0.333333343 0.170237184 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +20 0.222222224 0.0392145254 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +28 0.311111122 0.286174029 0.375 0 0 0.3030303 ? 10th Separated ? Not-in-family White Male United-States 0 +45 0.5 0.07709208 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.031252 0.625 0 0 0.24242425 ? Some-college Never-married ? Not-in-family White Female United-States 0 +42 0.466666669 0.150827274 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Unmarried White Female United-States 0 +34 0.377777785 0.0566570461 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +31 0.344444454 0.107174829 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.13169755 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +50 0.5555556 0.128846467 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.133572668 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +57 0.6333333 0.109315321 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.09641781 0.625 0.03908039 0 0.272727281 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +24 0.266666681 0.0623753555 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +27 0.3 0.166914642 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.15438959 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Female United-States 1 +45 0.5 0.09612617 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +80 0.8888889 0.057998728 1 0 0 0.3030303 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +23 0.25555557 0.0240000542 0.625 0 0 0.5050505 State-gov Some-college Never-married Other-service Not-in-family White Male United-States 0 +46 0.51111114 0.110964134 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.4094066 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.116945796 0.5625 0 0 0.6060606 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +90 1 0.209593162 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Sales Husband White Male ? 0 +55 0.6111111 0.0334995836 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +72 0.8 0.12367171 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female England 0 +65 0.722222269 0.08717287 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.306400955 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 +39 0.433333337 0.0374269634 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +38 0.422222227 0.0201211683 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.265180618 0.625 0.1502415 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.09695731 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.0608625971 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.0361869857 0.875 0 0 0.5050505 Private Masters Never-married Sales Not-in-family White Male United-States 1 +30 0.333333343 0.0875736251 0.25 0.0282902829 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.116945796 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +28 0.311111122 0.276385546 0.625 0 0 0.3030303 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +34 0.377777785 0.269000232 0.6875 0 0 0.535353541 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.106372647 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +20 0.222222224 0.08962117 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +19 0.211111113 0.031252 0.625 0 0 0.323232323 ? Some-college Never-married ? Not-in-family White Female United-States 0 +21 0.233333334 0.072671 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +39 0.433333337 0.04244682 0.625 0 0 0.2020202 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +43 0.477777779 0.1253744 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +33 0.366666675 0.01883135 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Unmarried Amer-Indian-Eskimo Male United-States 0 +26 0.2888889 0.120945916 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.06822837 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.07619628 0.625 0 0 0.656565666 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 +32 0.355555564 0.213153452 0.1875 0 0 0.6060606 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +60 0.6666667 0.060539972 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +41 0.455555558 0.0216346011 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +21 0.233333334 0.212367445 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child Black Male United-States 0 +27 0.3 0.171414524 0.625 0 0 0.363636374 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +33 0.366666675 0.282813758 0.1875 0 0 0.4040404 Private 5th-6th Divorced Handlers-cleaners Unmarried White Male Mexico 0 +43 0.477777779 0.107461751 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.108294919 0.4375 0 0.43663913 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.17409116 0.375 0 0 0.4040404 Self-emp-not-inc 10th Never-married Farming-fishing Own-child White Male United-States 0 +48 0.533333361 0.2492879 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.0342404731 0.25 0 0 0.5050505 Private 7th-8th Divorced Exec-managerial Not-in-family White Male United-States 0 +58 0.644444466 0.09261503 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +57 0.6333333 0.3692693 0.5 0.07688077 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband Black Male United-States 1 +42 0.466666669 0.118300945 0.8125 1 0 0.4040404 Local-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 1 +24 0.266666681 0.123656891 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 +26 0.2888889 0.229913011 0.8125 0 0 0.151515156 Private Bachelors Never-married Other-service Other-relative White Male United-States 0 +43 0.477777779 0.167023748 0.5625 0.0545505434 0 0.5050505 Self-emp-inc HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +34 0.377777785 0.1303727 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.0266760066 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 +51 0.566666663 0.08563924 0.4375 0 0 0.454545468 Self-emp-not-inc 11th Married-civ-spouse Farming-fishing Husband White Male United-States 1 +31 0.344444454 0.157183424 0.5625 0 0 0.454545468 ? HS-grad Married-civ-spouse ? Wife Black Female United-States 0 +49 0.544444442 0.123089775 1 0 0 0.353535354 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 +26 0.2888889 0.181221187 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +28 0.311111122 0.121201858 0.5625 0 0 0.2020202 Private HS-grad Divorced Transport-moving Unmarried Black Female United-States 0 +22 0.244444445 0.02219296 0.625 0 0.43663913 0.373737365 Federal-gov Some-college Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.10806524 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +45 0.5 0.150871053 0.3125 0 0.4242424 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 1 +39 0.433333337 0.0548843034 0.625 0 0.143480256 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +23 0.25555557 0.211852863 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +62 0.6888889 0.227466747 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +42 0.466666669 0.06788756 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.172025427 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.0624871626 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.0224340875 0.625 0 0 0.7070707 Self-emp-not-inc Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 +68 0.75555557 0.332297 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.107488692 0.875 0 0 0.464646459 ? Masters Married-civ-spouse ? Husband White Male United-States 1 +32 0.355555564 0.07221502 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male United-States 0 +25 0.2777778 0.0832394361 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Other Male United-States 0 +53 0.5888889 0.106655531 0.1875 0 0 0.24242425 Private 5th-6th Married-civ-spouse Other-service Other-relative White Female Italy 0 +38 0.422222227 0.051402133 0.6875 0 0 0.5555556 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.119049244 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +20 0.222222224 0.08240425 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +26 0.2888889 0.311977118 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.109266154 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +43 0.477777779 0.0774598345 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Tech-support Not-in-family White Female United-States 0 +29 0.322222233 0.123448767 0.625 0 0 0.363636374 State-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 0 +34 0.377777785 0.11423482 0.375 0 0 0.363636374 Private 10th Separated Other-service Unmarried White Female United-States 0 +24 0.266666681 0.303558618 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 +44 0.4888889 0.08398436 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.04305098 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +47 0.5222222 0.06908376 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +40 0.444444448 0.1948596 0.625 0 0 0.4848485 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +45 0.5 0.06858265 0.5625 0 0 0.454545468 Private HS-grad Widowed Sales Unmarried White Female United-States 0 +43 0.477777779 0.139309153 0.5625 0 0 0.454545468 Private HS-grad Separated Handlers-cleaners Unmarried Black Female United-States 0 +22 0.244444445 0.05245015 0.3125 0 0 0.3030303 ? 9th Never-married ? Not-in-family White Male United-States 0 +50 0.5555556 0.0978867859 1 0.105201051 0 0.5050505 Private Doctorate Divorced Prof-specialty Other-relative White Male United-States 1 +72 0.8 0.131034791 0.625 0 0 0.0303030312 ? Some-college Married-spouse-absent ? Not-in-family White Male United-States 0 +29 0.322222233 0.138984516 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +47 0.5222222 0.133494541 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +24 0.266666681 0.0942955 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Male El-Salvador 0 +22 0.244444445 0.193969846 0.625 0 0 0.151515156 ? Some-college Never-married ? Not-in-family White Male United-States 0 +21 0.233333334 0.0967222452 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +30 0.333333343 0.09844448 0.5625 0 0.4331956 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.132369056 0.625 0.0235402342 0 0.4040404 Private Some-college Widowed Other-service Not-in-family White Female ? 0 +74 0.822222233 0.129596785 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Divorced Prof-specialty Other-relative White Male United-States 0 +70 0.7777778 0.0942200646 0.625 0.0265302639 0 0.7070707 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.07066522 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.108761005 0.8125 0 0 0.464646459 Local-gov Bachelors Divorced Adm-clerical Unmarried Asian-Pac-Islander Female United-States 0 +30 0.333333343 0.0240074638 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +29 0.322222233 0.07863583 0.6875 0 0 0.565656543 Local-gov Assoc-voc Divorced Protective-serv Unmarried White Male United-States 0 +18 0.2 0.160885155 0.4375 0 0.3677686 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +31 0.344444454 0.178962156 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.121012591 0.625 0 0 0.7070707 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +21 0.233333334 0.0390319973 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 +31 0.344444454 0.119020954 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.248315334 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +39 0.433333337 0.145583808 0.9375 0 0 0.7070707 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 +29 0.322222233 0.117094643 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.0610929467 0.625 0 0.3409091 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +52 0.5777778 0.145713791 0.8125 0 0 0.5555556 State-gov Bachelors Widowed Exec-managerial Unmarried White Female United-States 0 +35 0.3888889 0.09480133 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +33 0.366666675 0.07847215 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.151114866 0.3125 0 0 0.05050505 ? 9th Divorced ? Unmarried White Female Cuba 0 +43 0.477777779 0.121440291 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 +66 0.733333349 0.132508487 0.125 0 0 0.3030303 ? 1st-4th Never-married ? Not-in-family Black Male United-States 0 +51 0.566666663 0.0743090361 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.125012711 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +17 0.188888893 0.164918959 0.4375 0 0 0.4040404 Local-gov 11th Never-married Prof-specialty Own-child White Female United-States 0 +32 0.355555564 0.133405626 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.06542444 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +19 0.211111113 0.110902838 0.625 0 0 0.6060606 Self-emp-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 +54 0.6 0.15874736 0.4375 0 0 0.4040404 Private 11th Divorced Adm-clerical Not-in-family White Male United-States 1 +45 0.5 0.132711887 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 +47 0.5222222 0.06561506 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family Black Female United-States 0 +49 0.544444442 0.140682489 0.5625 0 0.3838384 0.989899 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +32 0.355555564 0.1384302 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.09836432 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.14995639 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +27 0.3 0.2538794 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Sales Not-in-family White Male United-States 0 +42 0.466666669 0.09299962 0.875 0 0 0.3838384 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +24 0.266666681 0.105012782 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +45 0.5 0.0242512822 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.14459303 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +46 0.51111114 0.248896584 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 +50 0.5555556 0.112187274 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.173127323 0.5625 0 0 0.424242437 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.121997304 0.9375 1 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +69 0.7666667 0.171639487 0.8125 0.106051058 0 0.1010101 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +43 0.477777779 0.026184326 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +29 0.322222233 0.126000121 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +43 0.477777779 0.105742224 0.9375 0 0.5544077 0.5555556 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 1 +90 1 0.211320773 0.8125 0 0 0.1010101 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +41 0.455555558 0.22337839 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Exec-managerial Wife White Female Japan 1 +24 0.266666681 0.163916737 0.0625 0 0 0.363636374 Private Preschool Never-married Farming-fishing Not-in-family White Male Mexico 0 +24 0.266666681 0.0221734289 0.625 0 0 0.5050505 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +24 0.266666681 0.07891601 0.625 0 0 0.535353541 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +35 0.3888889 0.270713717 0.5625 0 0.4331956 0.424242437 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +30 0.333333343 0.07724834 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Other-relative White Male United-States 0 +46 0.51111114 0.06693923 0.8125 0 0 0.4040404 Private Bachelors Separated Exec-managerial Unmarried White Female United-States 0 +19 0.211111113 0.1416497 0.625 0 0.395087242 0.3030303 Local-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +39 0.433333337 0.169950932 0.3125 0 0 0.353535354 Private 9th Separated Craft-repair Own-child White Male Mexico 0 +43 0.477777779 0.0610101 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.128102213 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +65 0.722222269 0.177939728 0.5625 0 0 0.24242425 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +34 0.377777785 0.164191544 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +41 0.455555558 0.04517059 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.1375418 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 +24 0.266666681 0.152668715 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family Amer-Indian-Eskimo Male United-States 0 +34 0.377777785 0.117339812 0.875 0.04787048 0 0.454545468 Self-emp-inc Masters Never-married Exec-managerial Not-in-family White Female France 1 +33 0.366666675 0.21225968 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male Cuba 1 +37 0.411111116 0.0799357444 0.5625 0 0 0.3838384 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male Puerto-Rico 0 +39 0.433333337 0.140168592 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +58 0.644444466 0.07873686 0.5625 0 0 0.25252524 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +36 0.4 0.273215234 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 +33 0.366666675 0.197716042 0.625 0.0406404063 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Wife White Female United-States 0 +42 0.466666669 0.22131063 0.875 0 0 0.5555556 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +31 0.344444454 0.146804929 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Other-relative Black Male ? 0 +57 0.6333333 0.106975459 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried White Male United-States 0 +67 0.7444445 0.04409967 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +23 0.25555557 0.107569516 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +35 0.3888889 0.09461408 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 +43 0.477777779 0.0975129753 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Italy 1 +39 0.433333337 0.0560663566 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +36 0.4 0.0965747461 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +29 0.322222233 0.112846665 0.75 0 0 0.13131313 Local-gov Assoc-acdm Divorced Other-service Unmarried White Female United-States 0 +25 0.2777778 0.08228908 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +54 0.6 0.255099177 0.375 0 0 0.454545468 Private 10th Separated Transport-moving Unmarried Black Male United-States 1 +24 0.266666681 0.155232862 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.08135017 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male South 1 +70 0.7777778 0.138904363 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +61 0.677777767 0.20098269 0.8125 0.04787048 0 0.4848485 Private Bachelors Divorced Sales Not-in-family Black Male United-States 1 +51 0.566666663 0.11023806 0.8125 0 0.43663913 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.0946875 0.875 0 0 0.7070707 Self-emp-not-inc Masters Married-civ-spouse Farming-fishing Husband White Male United-States 0 +51 0.566666663 0.09244463 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried White Female United-States 1 +28 0.311111122 0.1663455 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +66 0.733333349 0.122899838 0.9375 0 0 0.25252524 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +57 0.6333333 0.07248376 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Separated Farming-fishing Not-in-family White Male United-States 1 +44 0.4888889 0.07837112 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male ? 1 +29 0.322222233 0.168935239 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.132354915 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child Black Female United-States 0 +42 0.466666669 0.247546151 0.375 0 0 0.434343427 Private 10th Married-civ-spouse Craft-repair Own-child Other Male United-States 1 +74 0.822222233 0.127102017 0.9375 1 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.1826356 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +65 0.722222269 0.116975427 0.5625 0 0 0.141414136 Private HS-grad Divorced Other-service Other-relative White Female United-States 0 +64 0.7111111 0.173630461 0.5625 0 0 0.3838384 ? HS-grad Divorced ? Unmarried White Female United-States 0 +44 0.4888889 0.217141449 0.4375 0 0 0.3030303 Private 11th Separated Other-service Unmarried Black Female United-States 0 +34 0.377777785 0.141234115 0.6875 0.04386044 0 0.5050505 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.07020385 0.375 0 0 0.1010101 Private 10th Never-married Other-service Own-child White Male United-States 0 +17 0.188888893 0.0584533624 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Female United-States 0 +43 0.477777779 0.05942797 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.162246376 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +54 0.6 0.1143116 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +20 0.222222224 0.0870476 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.108417496 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +34 0.377777785 0.159534052 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +30 0.333333343 0.0736051947 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 +32 0.355555564 0.144841567 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +40 0.444444448 0.0780842 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Ireland 1 +28 0.311111122 0.03728687 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 +44 0.4888889 0.151314914 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.253452361 0.6875 0 0 0.353535354 Local-gov Assoc-voc Married-civ-spouse Tech-support Wife White Female Nicaragua 1 +28 0.311111122 0.12365891 1 0.005940059 0 0.5050505 Private Doctorate Never-married Prof-specialty Not-in-family White Male Germany 0 +37 0.411111116 0.07765112 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +56 0.622222245 0.174366623 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.0465627871 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +34 0.377777785 0.139624372 0.5625 0 0 0.2020202 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +37 0.411111116 0.121014617 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +66 0.733333349 0.09460196 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +19 0.211111113 0.220513165 0.5625 0 0 0.3030303 Private HS-grad Never-married Prof-specialty Own-child White Male United-States 0 +60 0.6666667 0.13486518 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +54 0.6 0.07303471 0.625 0.0282902829 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +47 0.5222222 0.131997943 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.221689835 0.625 0 0 0.4848485 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 1 +48 0.533333361 0.168837577 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.119146228 0.5625 0 0 0.6060606 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +50 0.5555556 0.0893888 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male Germany 1 +62 0.6888889 0.11733038 0.3125 0 0 0.25252524 Private 9th Widowed Other-service Unmarried Black Female United-States 0 +45 0.5 0.112895831 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +55 0.6111111 0.171716943 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +62 0.6888889 0.2152495 0.5625 0 0 0.323232323 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +25 0.2777778 0.167703345 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male Guatemala 0 +49 0.544444442 0.0972556844 0.4375 0 0 0.3838384 Private 11th Divorced Exec-managerial Not-in-family White Female United-States 0 +32 0.355555564 0.135022789 0.625 0.0388703868 0 0.4040404 State-gov Some-college Never-married Protective-serv Unmarried Black Female United-States 0 +25 0.2777778 0.0374727659 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Handlers-cleaners Not-in-family Amer-Indian-Eskimo Male United-States 0 +39 0.433333337 0.12502417 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.08448951 0.625 0 0 0.5050505 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.108400658 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 1 +30 0.333333343 0.164235324 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Other-relative Asian-Pac-Islander Female South 0 +21 0.233333334 0.02331507 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +33 0.366666675 0.158851087 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Wife White Female United-States 1 +33 0.366666675 0.117726423 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +33 0.366666675 0.188664421 0.4375 0 0 0.3838384 Private 11th Never-married Adm-clerical Unmarried Black Female United-States 0 +70 0.7777778 0.158991188 0.25 0 0 0.353535354 Private 7th-8th Widowed Other-service Not-in-family White Female United-States 0 +25 0.2777778 0.160210282 0.625 0 0 0.424242437 Private Some-college Never-married Other-service Own-child Black Male United-States 0 +17 0.188888893 0.1310779 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Own-child White Male United-States 0 +20 0.222222224 0.117094643 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +19 0.211111113 0.250880152 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Other-relative Black Male United-States 0 +71 0.788888931 0.284331918 0.625 0.200512 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.11733038 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.183617622 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +52 0.5777778 0.0502860844 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.1357044 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +38 0.422222227 0.118024796 0.5625 0 0 0.454545468 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +25 0.2777778 0.22660394 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +22 0.244444445 0.0314170159 0.8125 0 0 0.09090909 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +48 0.533333361 0.0209745374 0.625 0 0.43663913 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +53 0.5888889 0.189549446 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.021223072 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.208967447 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +32 0.355555564 0.05549453 0.8125 0 0 0.565656543 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 1 +59 0.655555546 0.128317744 0.4375 0 0 0.2020202 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.111478716 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Unmarried Black Female United-States 0 +65 0.722222269 0.120516196 0.5625 0.03818038 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Amer-Indian-Eskimo Male United-States 0 +31 0.344444454 0.152687579 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 +53 0.5888889 0.13188681 0.1875 0.05178052 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband Other Male Puerto-Rico 1 +44 0.4888889 0.111682124 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +36 0.4 0.08350682 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Japan 1 +36 0.4 0.158530489 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +37 0.411111116 0.09918334 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +63 0.7 0.149719313 0.8125 0.07688077 0 0.545454562 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +67 0.7444445 0.115554273 0.5625 0.200512 0 0.3030303 Self-emp-inc HS-grad Married-civ-spouse Prof-specialty Wife White Female England 1 +29 0.322222233 0.172390476 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Unmarried Black Male United-States 0 +52 0.5777778 0.12546061 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +37 0.411111116 0.190524042 0.5625 0 0.373737365 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.0752176344 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +36 0.4 0.1343708 0.625 0 0 0.3838384 Private Some-college Divorced Exec-managerial Unmarried Black Female United-States 0 +24 0.266666681 0.102002084 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Other-relative Black Female United-States 0 +31 0.344444454 0.0982922539 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child Black Male United-States 0 +54 0.6 0.155173585 0.5625 0 0 0.353535354 Federal-gov HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +44 0.4888889 0.08593761 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +18 0.2 0.14199993 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child Other Male United-States 0 +41 0.455555558 0.200165018 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Wife White Female United-States 0 +37 0.411111116 0.07850314 0.875 0 0 0.7070707 Self-emp-inc Masters Divorced Exec-managerial Not-in-family White Female United-States 0 +30 0.333333343 0.09738837 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male ? 0 +26 0.2888889 0.09949384 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male India 0 +68 0.75555557 0.05995198 1 0 0 0.5050505 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male Canada 0 +31 0.344444454 0.02570073 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +48 0.533333361 0.12035118 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +80 0.8888889 0.116404273 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +26 0.2888889 0.104904346 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +63 0.7 0.067420125 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.156049863 0.625 0 0 0.2020202 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +30 0.333333343 0.09915438 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 +42 0.466666669 0.0337588973 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +64 0.7111111 0.0584877133 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Other-service Husband Asian-Pac-Islander Male United-States 1 +32 0.355555564 0.07635456 0.8125 0 0 0.4040404 Private Bachelors Never-married Transport-moving Not-in-family White Male United-States 0 +50 0.5555556 0.194914147 0.5625 0 0 0.474747479 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +73 0.811111152 0.05245756 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male Philippines 0 +32 0.355555564 0.262784183 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 +53 0.5888889 0.0603399351 0.625 0.07298073 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +58 0.644444466 0.157827988 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 +37 0.411111116 0.2461297 0.625 0.05178052 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.276444823 0.625 0 0 0.151515156 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +53 0.5888889 0.087239556 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.112161681 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Other Female United-States 0 +42 0.466666669 0.07402952 0.75 0 0 0.4040404 ? Assoc-acdm Never-married ? Other-relative White Female United-States 0 +30 0.333333343 0.142052472 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Other-relative White Female United-States 0 +38 0.422222227 0.272972763 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.09312894 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +19 0.211111113 0.017127309 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child White Female United-States 0 +45 0.5 0.156039089 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +26 0.2888889 0.174142346 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +33 0.366666675 0.180606246 0.3125 0 0 0.4040404 Private 9th Never-married Sales Unmarried White Female United-States 0 +29 0.322222233 0.0366476849 0.5625 0 0 0.5050505 Private HS-grad Never-married Farming-fishing Not-in-family White Male ? 0 +54 0.6 0.0251154266 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 +23 0.25555557 0.106385447 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +43 0.477777779 0.151656389 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.160334215 0.3125 0 0 0.3030303 Private 9th Never-married Priv-house-serv Not-in-family White Female El-Salvador 0 +31 0.344444454 0.132856026 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Husband White Male Mexico 0 +56 0.622222245 0.145911813 0.5 0 0.379017442 0.4040404 Self-emp-inc 12th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.123644091 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +17 0.188888893 0.0133036533 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Own-child Black Female United-States 0 +37 0.411111116 0.06999707 0.5625 0 0 0.686868668 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +60 0.6666667 0.0212681983 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +59 0.655555546 0.0412863158 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-spouse-absent Exec-managerial Not-in-family White Female United-States 0 +59 0.655555546 0.128335938 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.246573567 0.9375 0.1502415 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.262582123 0.5625 0 0 0.161616161 ? HS-grad Married-civ-spouse ? Other-relative White Male United-States 0 +33 0.366666675 0.129752383 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 +24 0.266666681 0.145570338 0.5625 0 0.323232323 0.5050505 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +29 0.322222233 0.034986075 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 +33 0.366666675 0.0454514548 0.6875 0 0 1 Self-emp-not-inc Assoc-voc Divorced Other-service Unmarried White Female United-States 0 +29 0.322222233 0.07326371 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male Dominican-Republic 0 +23 0.25555557 0.188079789 0.625 0 0 0.4040404 State-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 0 +20 0.222222224 0.187505946 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Male Nicaragua 0 +60 0.6666667 0.235668376 0.5625 0 0 0.444444448 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +44 0.4888889 0.147801086 0.375 0 0 0.353535354 Private 10th Never-married Sales Unmarried Other Female Dominican-Republic 0 +18 0.2 0.116693221 0.5625 0.010550105 0 0.25252524 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +52 0.5777778 0.0199521128 0.5 0 0 0.4040404 Federal-gov 12th Never-married Other-service Unmarried Black Female United-States 0 +31 0.344444454 0.1464668 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.11019294 0.8125 0 0 0.5555556 Private Bachelors Widowed Prof-specialty Unmarried White Female United-States 1 +33 0.366666675 0.109860212 0.5625 0.0378103778 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +20 0.222222224 0.160762578 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +27 0.3 0.16963236 0.8125 0 0 0.353535354 ? Bachelors Married-civ-spouse ? Wife Black Female ? 1 +33 0.366666675 0.143670291 0.6875 0 0 0.5050505 Private Assoc-voc Separated Adm-clerical Own-child Black Female United-States 0 +25 0.2777778 0.1305128 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +63 0.7 0.07679034 0.5625 0 0 0.2020202 Private HS-grad Separated Craft-repair Not-in-family White Female United-States 0 +63 0.7 0.03512078 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Widowed Exec-managerial Not-in-family White Male United-States 0 +43 0.477777779 0.234345555 0.5625 0 0 0.3030303 Private HS-grad Separated Sales Not-in-family White Female United-States 0 +58 0.644444466 0.197614342 0.4375 0 0 0.4040404 Private 11th Widowed Machine-op-inspct Not-in-family White Female United-States 0 +70 0.7777778 0.0799014 0.6875 0 0 0.353535354 ? Assoc-voc Widowed ? Unmarried White Female United-States 0 +35 0.3888889 0.0857449844 0.6875 0.143441439 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 1 +42 0.466666669 0.246634856 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.127264336 0.625 0 0 0.25252524 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 +35 0.3888889 0.127555311 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +62 0.6888889 0.0165116973 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.190688387 0.5625 0.01506015 0 0.5050505 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +43 0.477777779 0.122729436 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +19 0.211111113 0.372029454 0.5 0 0 0.4040404 Private 12th Never-married Machine-op-inspct Own-child White Male United-States 0 +46 0.51111114 0.109800264 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +47 0.5222222 0.04168168 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.123188108 0.8125 0.07298073 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.123318776 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family Black Female United-States 0 +48 0.533333361 0.0204006862 0.375 0 0 0.3030303 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.0522474162 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 +48 0.533333361 0.07969934 0.8125 0.05178052 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.3159254 0.5625 0 0 0.25252524 Private HS-grad Divorced Sales Unmarried Black Female United-States 0 +58 0.644444466 0.09804911 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.203435034 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 +59 0.655555546 0.0219248943 0.8125 0 0 0.04040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.12488205 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.0178776253 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +23 0.25555557 0.1103721 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Armed-Forces Other-relative White Male United-States 0 +21 0.233333334 0.161690712 0.625 0 0 0.25252524 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +48 0.533333361 0.140598983 0.1875 0 0 0.4040404 Private 5th-6th Divorced Machine-op-inspct Unmarried Other Female Dominican-Republic 0 +32 0.355555564 0.0566570461 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.0566644557 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +66 0.733333349 0.175834253 0.875 0 0 0.4040404 Local-gov Masters Widowed Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.226314321 0.8125 0 0 0.323232323 Local-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +52 0.5777778 0.262186766 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +17 0.188888893 0.0931451 0.4375 0 0 0.151515156 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +35 0.3888889 0.161910281 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.1281716 1 1 0 0.5555556 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.114548013 0.625 0 0 0.1010101 ? Some-college Never-married ? Not-in-family White Female United-States 0 +24 0.266666681 0.100664444 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +45 0.5 0.05491596 0.5625 0 0 0.8484849 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Japan 1 +25 0.2777778 0.254812926 0.5625 0 0.459366381 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +29 0.322222233 0.132627025 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 +56 0.622222245 0.07822631 0.8125 0.05178052 0 0.444444448 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +34 0.377777785 0.0545111671 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +64 0.7111111 0.128416091 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 +27 0.3 0.0809285343 0.5625 0 0 0.3939394 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +47 0.5222222 0.112587348 0.5625 0.046500463 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +36 0.4 0.0392960235 0.8125 0.03103031 0 0.424242437 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +44 0.4888889 0.1086007 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +31 0.344444454 0.08513611 0.5625 0 0 0.6060606 Private HS-grad Never-married Farming-fishing Not-in-family Black Female United-States 0 +23 0.25555557 0.100160643 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 +45 0.5 0.21437256 0.625 0.07688077 0 0.5050505 Local-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.0539218225 0.5625 0 0 0.646464646 Local-gov HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +45 0.5 0.185012519 0.375 0 0 0.6060606 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.1059921 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried Black Female ? 0 +33 0.366666675 0.1464668 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.0227162968 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 +30 0.333333343 0.11245399 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +25 0.2777778 0.09841484 0.625 0 0 0.424242437 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +33 0.366666675 0.107911 0.875 0 0 0.323232323 Private Masters Never-married Exec-managerial Not-in-family White Female ? 0 +70 0.7777778 0.08382069 0.875 0 0.515610635 0.08080808 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.03378651 0.3125 0 0 0.4040404 Private 9th Never-married Transport-moving Own-child White Male United-States 0 +30 0.333333343 0.158463135 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +46 0.51111114 0.08158119 0.75 0.1502415 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.0971358 0.5 0 0 0.6060606 Self-emp-not-inc 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.0635372 0.25 0 0 0.25252524 Private 7th-8th Never-married Machine-op-inspct Own-child White Female United-States 0 +59 0.655555546 0.114488736 0.625 0.1502415 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.0237724 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Never-married Farming-fishing Unmarried White Male United-States 0 +47 0.5222222 0.0902327448 0.8125 0.0288502872 0 0.656565666 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 0 +36 0.4 0.0238626525 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +73 0.811111152 0.138465226 0.1875 0 0 0.0606060624 Local-gov 5th-6th Married-civ-spouse Prof-specialty Husband White Male United-States 0 +32 0.355555564 0.119750388 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +34 0.377777785 0.112799518 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +51 0.566666663 0.023715822 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +20 0.222222224 0.07896788 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Unmarried White Female United-States 0 +57 0.6333333 0.131238192 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband Other Male Mexico 0 +19 0.211111113 0.09760255 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +45 0.5 0.132847935 0.5 0.07688077 0 0.4040404 Private 12th Married-civ-spouse Sales Husband White Male United-States 1 +55 0.6111111 0.0682546347 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +60 0.6666667 0.100034691 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 +19 0.211111113 0.06550864 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +35 0.3888889 0.112214886 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +20 0.222222224 0.154518247 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +34 0.377777785 0.140912175 0.8125 0 0 0.151515156 Local-gov Bachelors Never-married Prof-specialty Other-relative Black Male United-States 0 +26 0.2888889 0.19665052 0.9375 0 0.453856736 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +73 0.811111152 0.0861167759 0.625 0.0327303261 0 0.4040404 Federal-gov Some-college Widowed Tech-support Not-in-family White Female United-States 0 +27 0.3 0.203680873 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.0195688717 0.6875 0 0 0.8484849 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Own-child White Male United-States 0 +73 0.811111152 0.22631231 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.23521845 0.6875 0 0.4242424 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +36 0.4 0.0683509558 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +54 0.6 0.0314567536 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +49 0.544444442 0.157363921 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 +68 0.75555557 0.0213678814 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +34 0.377777785 0.0369433649 0.8125 0 0.365013778 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +30 0.333333343 0.197690457 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family Black Male United-States 0 +28 0.311111122 0.2530166 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Unmarried White Male United-States 0 +28 0.311111122 0.0712714 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.1370023 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +26 0.2888889 0.109315991 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male Philippines 0 +40 0.444444448 0.11009258 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +32 0.355555564 0.06744438 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +60 0.6666667 0.0279631317 0.4375 0 0 0.2020202 ? 11th Married-spouse-absent ? Unmarried Black Female United-States 0 +18 0.2 0.0688231 0.5 0 0 0.3030303 Private 12th Never-married Priv-house-serv Not-in-family White Female United-States 0 +36 0.4 0.2793033 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 0 +26 0.2888889 0.130902767 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +24 0.266666681 0.130730346 0.5625 0 0 0.454545468 Private HS-grad Never-married Prof-specialty Own-child White Female United-States 0 +90 1 0.103456244 0.5625 0.06767067 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +20 0.222222224 0.145143315 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female Mexico 0 +27 0.3 0.110868491 0.8125 0 0 0.5050505 Private Bachelors Separated Tech-support Own-child White Male United-States 0 +58 0.644444466 0.0234915353 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.08524859 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +65 0.722222269 0.2126537 0.5625 0.0232902318 0 0.75757575 ? HS-grad Widowed ? Unmarried White Female United-States 0 +28 0.311111122 0.0151019907 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +36 0.4 0.120038666 0.8125 0 0 0.6060606 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +45 0.5 0.0382843725 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.202245563 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +69 0.7666667 0.13288027 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +58 0.644444466 0.106274314 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +22 0.244444445 0.07454949 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +58 0.644444466 0.09478583 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +53 0.5888889 0.0607036427 0.625 0 0 0.6060606 Federal-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +44 0.4888889 0.02559229 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +31 0.344444454 0.04129305 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Male United-States 0 +46 0.51111114 0.115308434 0.8125 0 0 0.4040404 Private Bachelors Divorced Machine-op-inspct Unmarried Other Female Puerto-Rico 0 +48 0.533333361 0.08650338 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +46 0.51111114 0.131354719 0.625 0 0 0.4040404 Federal-gov Some-college Separated Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.08248979 0.3125 0 0.143480256 0.4040404 Private 9th Never-married Machine-op-inspct Unmarried Black Female United-States 0 +43 0.477777779 0.115772493 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +17 0.188888893 0.123784862 0.375 0 0 0.151515156 Self-emp-inc 10th Never-married Sales Own-child White Male United-States 0 +20 0.222222224 0.147680521 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +22 0.244444445 0.04807622 0.625 0 0 0.353535354 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +19 0.211111113 0.15795663 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Male United-States 0 +35 0.3888889 0.0652143061 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +29 0.322222233 0.163397446 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +18 0.2 0.08580021 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +25 0.2777778 0.137762055 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +54 0.6 0.09685695 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.05434076 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Sales Own-child White Female United-States 0 +36 0.4 0.202886775 0.1875 0 0 0.353535354 Private 5th-6th Separated Priv-house-serv Unmarried Other Female Mexico 0 +26 0.2888889 0.136006817 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.118956968 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Own-child White Male United-States 0 +46 0.51111114 0.237905174 0.3125 0 0 0.4040404 Private 9th Divorced Other-service Unmarried White Female United-States 0 +41 0.455555558 0.08491653 0.625 0 0 0.5050505 Private Some-college Divorced Craft-repair Not-in-family White Female United-States 0 +31 0.344444454 0.105403431 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Own-child White Male United-States 0 +48 0.533333361 0.2933263 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.3781822 0.875 0 0 0.5050505 Self-emp-inc Masters Divorced Exec-managerial Not-in-family Black Female United-States 0 +22 0.244444445 0.06758582 0.5625 0 0 0.434343427 Federal-gov HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +18 0.2 0.0244324636 0.5625 0 0 0.25252524 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +46 0.51111114 0.07462358 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.09683136 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 +30 0.333333343 0.0513994358 0.5625 0 0 0.4848485 Federal-gov HS-grad Married-civ-spouse Armed-Forces Other-relative Amer-Indian-Eskimo Male United-States 0 +31 0.344444454 0.08170512 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family White Male United-States 0 +21 0.233333334 0.145936057 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.06057904 0.5625 0.0367403664 0 0.454545468 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 +45 0.5 0.0696475059 0.8125 0 0.453856736 0.6060606 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.106614448 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +21 0.233333334 0.306701332 0.3125 0 0 0.353535354 Private 9th Never-married Other-service Unmarried White Male Mexico 0 +44 0.4888889 0.1517224 0.625 0 0.323232323 0.464646459 Private Some-college Divorced Sales Unmarried White Female United-States 0 +54 0.6 0.15175204 0.4375 0 0 0.5050505 Private 11th Divorced Craft-repair Own-child White Female United-States 1 +36 0.4 0.192708313 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +50 0.5555556 0.126509979 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +26 0.2888889 0.09598271 0.8125 0 0 0.353535354 Private Bachelors Never-married Prof-specialty Unmarried Black Female United-States 0 +47 0.5222222 0.100071058 0.9375 0 0 0.353535354 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +36 0.4 0.12482278 0.5625 0 0 0.373737365 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +32 0.355555564 0.01881788 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband Amer-Indian-Eskimo Male United-States 0 +21 0.233333334 0.258369863 0.375 0 0 0.353535354 Private 10th Never-married Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.09482692 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.152642444 0.5625 0 0 0.4040404 Private HS-grad Never-married Priv-house-serv Not-in-family White Female Mexico 0 +51 0.566666663 0.153913409 0.5625 0 0 0.454545468 Private HS-grad Married-spouse-absent Craft-repair Not-in-family White Male Columbia 0 +55 0.6111111 0.08066384 0.375 0 0 0.5050505 Self-emp-not-inc 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +43 0.477777779 0.2015195 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +37 0.411111116 0.100556679 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Not-in-family Amer-Indian-Eskimo Male United-States 0 +28 0.311111122 0.1364298 0.625 0 0 0.4040404 Local-gov Some-college Never-married Exec-managerial Own-child White Female United-States 0 +39 0.433333337 0.118024796 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +35 0.3888889 0.106063493 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.27604273 0.875 0 0 0.2020202 ? Masters Married-civ-spouse ? Husband White Male United-States 0 +26 0.2888889 0.07125119 0.5625 0 0 0.363636374 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +68 0.75555557 0.09702668 0.5625 0.03818038 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +46 0.51111114 0.0305535458 0.9375 0 0.6483012 0.4040404 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 +21 0.233333334 0.138638988 0.5625 0 0 0.373737365 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +23 0.25555557 0.0776760355 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +17 0.188888893 0.125876859 0.375 0 0 0.3030303 Private 10th Married-civ-spouse Sales Own-child White Female United-States 0 +23 0.25555557 0.205014467 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Not-in-family White Female United-States 0 +34 0.377777785 0.0165211279 0.5625 0 0 0.151515156 Private HS-grad Widowed Adm-clerical Unmarried White Male United-States 0 +33 0.366666675 0.123631969 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 +31 0.344444454 0.230840474 0.75 0 0 0.454545468 Private Assoc-acdm Separated Transport-moving Not-in-family White Male United-States 0 +31 0.344444454 0.122711919 0.8125 0.0406404063 0 0.3030303 ? Bachelors Married-civ-spouse ? Wife White Female Canada 0 +56 0.622222245 0.0456932522 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.236667216 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +45 0.5 0.197811022 0.5625 0 0.365013778 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female Japan 0 +41 0.455555558 0.148730561 0.8125 0.07688077 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.127989739 0.375 0 0 0.3030303 Private 10th Divorced Handlers-cleaners Not-in-family White Female United-States 0 +41 0.455555558 0.231658146 0.4375 0 0 0.4040404 Private 11th Widowed Other-service Unmarried White Female United-States 0 +46 0.51111114 0.0743965954 0.875 0 0 0.5555556 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.04871877 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Unmarried Asian-Pac-Islander Female United-States 0 +43 0.477777779 0.130324885 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.225633383 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.184792936 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 +58 0.644444466 0.0766522661 0.8125 0.07688077 0 0.3030303 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.0353848077 0.75 0 0.365932047 0.25252524 Private Assoc-acdm Divorced Tech-support Own-child White Female United-States 0 +44 0.4888889 0.126435891 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Unmarried White Male United-States 0 +57 0.6333333 0.07071843 0.625 0 0 0.424242437 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +24 0.266666681 0.1445102 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +38 0.422222227 0.0356724076 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +33 0.366666675 0.128315732 0.25 0.0217602178 0 0.353535354 Private 7th-8th Divorced Handlers-cleaners Not-in-family White Male United-States 0 +25 0.2777778 0.05106806 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +33 0.366666675 0.0830407441 0.5625 0 0 0.8484849 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +50 0.5555556 0.152553543 0.625 0 0 0.5252525 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +35 0.3888889 0.190596119 0.5625 0.05178052 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.112176493 0.8125 0 0 0.5555556 Private Bachelors Divorced Adm-clerical Not-in-family White Male United-States 1 +27 0.3 0.1264534 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +22 0.244444445 0.105842575 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 +30 0.333333343 0.15326345 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +90 1 0.0776625648 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Own-child White Female United-States 0 +39 0.433333337 0.113995038 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Other-relative Black Male United-States 0 +34 0.377777785 0.149501756 0.8125 0 0 0.454545468 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +39 0.433333337 0.15125294 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.018939117 0.625 0 0 0.04040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +19 0.211111113 0.2180972 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 +29 0.322222233 0.141777664 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +66 0.733333349 0.117865168 0.75 0.02290023 0 0.3030303 Self-emp-not-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male Hungary 0 +38 0.422222227 0.108534023 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +44 0.4888889 0.141801909 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +34 0.377777785 0.07587366 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Never-married Craft-repair Own-child White Male United-States 0 +35 0.3888889 0.214784086 0.75 0 0 0.4040404 State-gov Assoc-acdm Widowed Exec-managerial Not-in-family White Female United-States 0 +29 0.322222233 0.2530166 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +22 0.244444445 0.153879061 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +33 0.366666675 0.068788074 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +73 0.811111152 0.123400271 0.6875 0.251242518 0 0.6060606 Private Assoc-voc Widowed Prof-specialty Not-in-family White Male United-States 1 +35 0.3888889 0.119421035 0.625 0 0.5456841 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.0229250938 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +27 0.3 0.07854288 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +25 0.2777778 0.118232243 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +47 0.5222222 0.10154745 0.8125 0 0.359045 0.5151515 Private Bachelors Divorced Handlers-cleaners Not-in-family White Male United-States 1 +36 0.4 0.11896909 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 +36 0.4 0.141437531 0.125 0 0 0.2020202 Private 1st-4th Widowed Other-service Other-relative White Female Mexico 0 +25 0.2777778 0.13874945 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Tech-support Unmarried White Female United-States 0 +37 0.411111116 0.13555488 0.4375 0 0 0.656565666 Private 11th Divorced Transport-moving Not-in-family White Male United-States 0 +26 0.2888889 0.136246592 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Tech-support Own-child White Male United-States 0 +53 0.5888889 0.06470107 0.625 0 0.399449021 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.389556855 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 +30 0.333333343 0.3431658 0.8125 0.04787048 0 0.454545468 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 1 +53 0.5888889 0.218239322 0.625 0 0 0.4040404 Local-gov Some-college Divorced Other-service Not-in-family White Female United-States 0 +37 0.411111116 0.07256459 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.08746856 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +53 0.5888889 0.06976874 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +23 0.25555557 0.126296476 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Own-child White Male United-States 0 +28 0.311111122 0.116448052 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +53 0.5888889 0.139724061 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Other-service Husband White Male United-States 0 +32 0.355555564 0.140838087 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +33 0.366666675 0.275349647 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.140965387 0.5625 0 0 0.323232323 Private HS-grad Never-married Sales Other-relative Black Female Dominican-Republic 0 +52 0.5777778 0.09723211 0.6875 0 0.43663913 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.141131073 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +27 0.3 0.164613172 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Female United-States 1 +44 0.4888889 0.5994221 0.5625 0.031370312 0 0.3030303 Private HS-grad Married-civ-spouse Handlers-cleaners Wife White Female United-States 0 +37 0.411111116 0.201012328 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +39 0.433333337 0.109945752 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.210004687 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child Black Female United-States 0 +42 0.466666669 0.105052523 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +49 0.544444442 0.196525916 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.103411116 0.5625 0 0 0.363636374 Private HS-grad Divorced Handlers-cleaners Unmarried Black Female United-States 0 +43 0.477777779 0.168229386 0.5625 0 0 1 Private HS-grad Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male United-States 0 +43 0.477777779 0.311294168 0.9375 1 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.207812324 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.02337232 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +46 0.51111114 0.0715643838 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +54 0.6 0.09358358 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +37 0.411111116 0.09477506 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male Jamaica 1 +53 0.5888889 0.1461105 0.625 0.04386044 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +26 0.2888889 0.109322727 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male Philippines 0 +59 0.655555546 0.170445979 0.9375 0 0 0.5555556 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.24196659 0.625 0 0 0.4040404 Federal-gov Some-college Separated Adm-clerical Not-in-family Black Male United-States 0 +32 0.355555564 0.155864641 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +53 0.5888889 0.132722661 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.08818655 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +35 0.3888889 0.0205865819 0.5625 0 0 0.4040404 Private HS-grad Married-AF-spouse Other-service Wife White Female United-States 1 +48 0.533333361 0.0708140656 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried Asian-Pac-Islander Female United-States 0 +30 0.333333343 0.1201471 0.625 0 0 0.4040404 Local-gov Some-college Separated Handlers-cleaners Not-in-family Black Male United-States 0 +38 0.422222227 0.162994 0.5 0.07688077 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 1 +58 0.644444466 0.1322842 0.5625 0 0 0.1010101 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +44 0.4888889 0.156543553 0.5625 0 0 0.323232323 Private HS-grad Married-spouse-absent Transport-moving Not-in-family Other Male Canada 0 +30 0.333333343 0.08780802 0.6875 0 0 0.4040404 Private Assoc-voc Separated Prof-specialty Unmarried White Female United-States 0 +68 0.75555557 0.226529181 0.5625 0 0 0.1010101 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.22756508 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 +26 0.2888889 0.07046114 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +41 0.455555558 0.1505673 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +43 0.477777779 0.341030031 0.8125 0.1502415 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 1 +48 0.533333361 0.04342883 0.8125 0 0 0.474747479 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +55 0.6111111 0.191347778 0.5625 0 0 0.373737365 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +50 0.5555556 0.14907743 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Exec-managerial Unmarried Asian-Pac-Islander Female ? 0 +41 0.455555558 0.288608849 0.4375 0 0.3409091 0.5050505 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 +52 0.5777778 0.140298575 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.277601272 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female Mexico 0 +31 0.344444454 0.122702494 0.5625 0 0.43663913 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +54 0.6 0.08754063 0.6875 0 0 0.3838384 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 +31 0.344444454 0.1255603 0.875 0 0 0.25252524 Self-emp-not-inc Masters Separated Tech-support Not-in-family White Female United-States 0 +31 0.344444454 0.137056187 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.08674855 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.0373104438 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.212008446 0.625 0 0 0.4848485 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +45 0.5 0.09095679 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +39 0.433333337 0.215024531 0.375 0 0 0.25252524 Private 10th Never-married Other-service Unmarried White Female Mexico 0 +34 0.377777785 0.15923366 0.625 0 0 0.181818187 Local-gov Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +48 0.533333361 0.102097049 0.625 0.0861408561 0 0.6060606 ? Some-college Never-married ? Not-in-family White Male United-States 1 +19 0.211111113 0.09024217 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 +56 0.622222245 0.0547044724 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female Canada 0 +47 0.5222222 0.1017623 0.5625 0 0 0.4040404 Private HS-grad Separated Prof-specialty Other-relative Other Female Puerto-Rico 0 +35 0.3888889 0.216993272 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 1 +25 0.2777778 0.128394529 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Columbia 0 +43 0.477777779 0.07205607 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Unmarried White Female United-States 0 +59 0.655555546 0.153468877 0.8125 0 0 0.373737365 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +66 0.733333349 0.143784121 0.25 0 0 0.1010101 ? 7th-8th Divorced ? Not-in-family White Male United-States 0 +63 0.7 0.179216072 0.25 0 0 0.6060606 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 1 +32 0.355555564 0.173144162 0.625 0 0 0.373737365 Private Some-college Married-spouse-absent Transport-moving Not-in-family White Female United-States 0 +58 0.644444466 0.0253188349 0.8125 0 0 0.4040404 ? Bachelors Widowed ? Not-in-family White Female United-States 0 +43 0.477777779 0.10138917 0.6875 0 0 0.5050505 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Other-relative White Male United-States 1 +27 0.3 0.1422397 0.5625 0 0 0.5252525 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.09201155 0.5 0 0 0.323232323 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 +44 0.4888889 0.164378792 0.625 0 0 0.6060606 Federal-gov Some-college Divorced Exec-managerial Unmarried White Male United-States 1 +40 0.444444448 0.1621184 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +65 0.722222269 0.116458155 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +50 0.5555556 0.160947129 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +18 0.2 0.109843373 0.5625 0 0 0.2020202 ? HS-grad Separated ? Own-child White Male United-States 0 +51 0.566666663 0.11586275 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +44 0.4888889 0.146872282 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +20 0.222222224 0.135918587 0.625 0 0 0.13131313 Private Some-college Never-married Sales Own-child White Female United-States 0 +29 0.322222233 0.101513095 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Not-in-family White Male United-States 0 +50 0.5555556 0.0635755956 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +50 0.5555556 0.103093885 0.5625 0.05178052 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.105590679 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +23 0.25555557 0.145913839 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +41 0.455555558 0.0553382672 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.107199073 0.625 0 0 0.3030303 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +58 0.644444466 0.208805114 0.8125 0 0 0.25252524 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +50 0.5555556 0.0895895138 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.0243913773 0.8125 0 0 0.656565666 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.268755078 0.5625 0 0 0.24242425 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +33 0.366666675 0.121073209 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +52 0.5777778 0.0329674929 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +47 0.5222222 0.135963038 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +45 0.5 0.214939669 0.8125 0.14084141 0 0.454545468 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 1 +34 0.377777785 0.104499549 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.0162362214 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male Philippines 1 +31 0.344444454 0.17367962 0.625 0 0 0.151515156 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +19 0.211111113 0.0195102729 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 +45 0.5 0.255534261 0.625 0 0 0.454545468 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 +45 0.5 0.102883741 0.6875 0 0 0.0303030312 Self-emp-not-inc Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 +34 0.377777785 0.104312979 0.5625 0.04416044 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +27 0.3 0.10386575 0.4375 0 0 0.353535354 Private 11th Married-spouse-absent Sales Own-child Asian-Pac-Islander Male India 0 +37 0.411111116 0.2261163 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +20 0.222222224 0.06381335 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +32 0.355555564 0.09016 0.8125 0.135501355 0 0.4848485 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +24 0.266666681 0.161740556 0.125 0 0 0.5555556 Private 1st-4th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 +39 0.433333337 0.0538854524 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +18 0.2 0.07388808 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 +62 0.6888889 0.0266787019 0.625 0 0 0.8080808 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +24 0.266666681 0.0606490858 0.8125 0 0 0.4040404 Private Bachelors Separated Exec-managerial Not-in-family White Female United-States 0 +37 0.411111116 0.130568027 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +46 0.51111114 0.139346883 0.8125 0 0 0.25252524 Private Bachelors Widowed Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.05812468 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +53 0.5888889 0.100794435 0.5625 0 0.5874656 0.4848485 Private HS-grad Never-married Sales Not-in-family White Male United-States 1 +25 0.2777778 0.217645258 0.8125 0 0 0.353535354 Private Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 +44 0.4888889 0.1602965 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Machine-op-inspct Husband White Male ? 0 +24 0.266666681 0.0242863074 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +61 0.677777767 0.11005082 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +45 0.5 0.06299905 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +33 0.366666675 0.07607707 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 +48 0.533333361 0.122947656 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.049432043 0.5625 0 0 0.3030303 Local-gov HS-grad Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 +40 0.444444448 0.341539919 0.5625 0 0 0.323232323 ? HS-grad Divorced ? Not-in-family Black Female United-States 0 +68 0.75555557 0.131923854 0.8125 0.200512 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.186468691 0.5625 0 0.404499531 0.4040404 Private HS-grad Divorced Protective-serv Own-child White Female United-States 0 +25 0.2777778 0.0268746987 0.8125 0 0 0.6060606 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +31 0.344444454 0.0223101564 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +55 0.6111111 0.282703966 0.625 0 0 0.3838384 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +46 0.51111114 0.115238383 0.75 0 0 0.3838384 Private Assoc-acdm Divorced Sales Unmarried White Female United-States 0 +58 0.644444466 0.1342206 0.8125 0 0 0.3838384 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +56 0.622222245 0.158418685 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +45 0.5 0.113310054 0.8125 0 0 0.5555556 Federal-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 1 +24 0.266666681 0.09831179 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried White Male United-States 1 +35 0.3888889 0.0487221368 0.5625 0 0 0.565656543 Local-gov HS-grad Divorced Farming-fishing Own-child Asian-Pac-Islander Male United-States 0 +51 0.566666663 0.103636749 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +47 0.5222222 0.218089119 0.9375 0.1502415 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.133918867 0.4375 0 0 0.1010101 Private 11th Never-married Adm-clerical Other-relative White Female United-States 0 +21 0.233333334 0.179860651 0.375 0 0 0.4040404 Private 10th Never-married Prof-specialty Unmarried Black Female United-States 0 +45 0.5 0.112606212 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +42 0.466666669 0.155373633 0.5625 0.05178052 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +56 0.622222245 0.444235057 0.5 0 0 0.4040404 Private 12th Widowed Other-service Unmarried Black Female United-States 0 +39 0.433333337 0.122354947 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +31 0.344444454 0.1253744 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Not-in-family Other Female Mexico 0 +20 0.222222224 0.120237358 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Tech-support Not-in-family White Male United-States 0 +65 0.722222269 0.08851388 0.1875 0.01797018 0 0.212121218 Self-emp-not-inc 5th-6th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +44 0.4888889 0.0385484 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.255807042 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.08228908 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.0722716 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.08597735 0.375 0 0.3996786 0.4040404 Local-gov 10th Never-married Transport-moving Other-relative White Male United-States 0 +33 0.366666675 0.06929592 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Sales Own-child White Male United-States 0 +49 0.544444442 0.162828982 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Other-service Unmarried White Female United-States 0 +28 0.311111122 0.116932996 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 +29 0.322222233 0.156708568 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.237223566 0.6875 0 0 0.2020202 Private Assoc-voc Never-married Other-service Own-child White Male United-States 0 +37 0.411111116 0.162994 0.8125 0 0 0.05050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.188003 0.625 0 0 0.373737365 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 1 +27 0.3 0.119253993 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +47 0.5222222 0.1048417 0.625 0.07688077 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.169463292 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +41 0.455555558 0.0134127662 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female Philippines 1 +61 0.677777767 0.07747196 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +32 0.355555564 0.06850452 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 1 +21 0.233333334 0.211289123 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +63 0.7 0.168429419 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Sales Husband White Male United-States 1 +34 0.377777785 0.153134122 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +21 0.233333334 0.132569775 0.75 0 0 0.1010101 State-gov Assoc-acdm Never-married Tech-support Own-child White Male United-States 0 +44 0.4888889 0.0798475146 0.5625 0 0 0.333333343 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +26 0.2888889 0.191960022 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Not-in-family Asian-Pac-Islander Male South 0 +36 0.4 0.188703477 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.0973984748 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male ? 1 +52 0.5777778 0.05176786 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Asian-Pac-Islander Male Philippines 0 +44 0.4888889 0.11266885 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.2254879 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 +60 0.6666667 0.09535901 0.5625 0 0 0.5050505 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +31 0.344444454 0.15251717 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +30 0.333333343 0.2465574 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried Black Male United-States 0 +23 0.25555557 0.1520329 0.625 0 0 0.25252524 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +81 0.900000036 0.08904395 0.125 0 0 0.2020202 State-gov 1st-4th Widowed Other-service Not-in-family White Female United-States 0 +39 0.433333337 0.1739578 0.8125 0.031370312 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male ? 0 +38 0.422222227 0.133165181 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family Asian-Pac-Islander Female Portugal 0 +21 0.233333334 0.0206229519 0.625 0 0 0.3838384 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +28 0.311111122 0.225644156 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.0412688069 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +47 0.5222222 0.07176106 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +36 0.4 0.09710279 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.0271400716 0.5625 0 0 1 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +56 0.622222245 0.179221466 0.8125 0.02907029 0 0.5252525 Private Bachelors Never-married Prof-specialty Not-in-family White Female Cuba 0 +57 0.6333333 0.0963356346 0.5625 0 0 0.3030303 Private HS-grad Widowed Other-service Unmarried White Female ? 0 +42 0.466666669 0.129586011 0.625 0 0 0.3838384 State-gov Some-college Divorced Adm-clerical Own-child White Female United-States 0 +43 0.477777779 0.07701934 0.5625 0 0 0.353535354 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +48 0.533333361 0.04274654 0.5625 0 0 0.323232323 ? HS-grad Married-spouse-absent ? Unmarried White Female United-States 0 +53 0.5888889 0.0891113058 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female Scotland 0 +58 0.644444466 0.0863215253 0.5625 0 0 0.24242425 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +19 0.211111113 0.084823586 0.5 0 0 0.4040404 Private 12th Never-married Other-service Own-child White Male El-Salvador 0 +37 0.411111116 0.114618056 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.137031272 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +31 0.344444454 0.07403289 0.25 0 0 0.4040404 Private 7th-8th Separated Craft-repair Not-in-family White Female United-States 0 +31 0.344444454 0.0774140358 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +53 0.5888889 0.155718476 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +19 0.211111113 0.160620466 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Male United-States 0 +56 0.622222245 0.211590186 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.0213699024 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +51 0.566666663 0.242560655 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Other-relative White Female United-States 0 +62 0.6888889 0.09517581 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.0561801866 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.0807130039 0.25 0 0 0.4848485 ? 7th-8th Divorced ? Not-in-family Amer-Indian-Eskimo Male United-States 0 +28 0.311111122 0.1997279 0.5625 0 0 0.454545468 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.1300238 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.0266921725 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +57 0.6333333 0.144119546 0.5625 0 0 0.3030303 Local-gov HS-grad Widowed Other-service Unmarried White Female United-States 0 +60 0.6666667 0.174986273 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +23 0.25555557 0.03735759 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +47 0.5222222 0.122116514 0.625 1 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +21 0.233333334 0.142318517 0.625 0 0 0.08080808 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +51 0.566666663 0.135009989 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +61 0.677777767 0.119034424 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +52 0.5777778 0.09495826 0.8125 1 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +76 0.844444454 0.08471986 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +24 0.266666681 0.102495782 0.625 0 0 0.3939394 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +31 0.344444454 0.07504723 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +43 0.477777779 0.0876443461 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.020280797 0.625 0 0 0.4040404 Federal-gov Some-college Widowed Prof-specialty Unmarried Amer-Indian-Eskimo Female United-States 0 +18 0.2 0.144802511 0.625 0 0.3677686 0.24242425 ? Some-college Never-married ? Own-child White Female United-States 0 +19 0.211111113 0.183740214 0.5 0 0 0.25252524 Private 12th Never-married Adm-clerical Own-child White Female United-States 0 +44 0.4888889 0.131932616 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Other-relative White Female United-States 0 +41 0.455555558 0.115123212 0.625 0 0 0.07070707 Local-gov Some-college Never-married Prof-specialty Other-relative White Male United-States 0 +21 0.233333334 0.0885516 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Male Vietnam 0 +40 0.444444448 0.100670509 0.5625 0 0 0.353535354 Private HS-grad Divorced Handlers-cleaners Not-in-family Black Male United-States 0 +25 0.2777778 0.128253087 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male Canada 0 +62 0.6888889 0.113079034 1 0 0 0.4040404 Local-gov Doctorate Widowed Prof-specialty Unmarried White Female Iran 0 +42 0.466666669 0.119881727 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.125300989 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 +19 0.211111113 0.131881416 0.5625 0 0 0.121212125 Private HS-grad Never-married Sales Own-child White Female United-States 0 +60 0.6666667 0.03690969 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +20 0.222222224 0.06776094 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Other Male Puerto-Rico 0 +23 0.25555557 0.1705322 0.75 0 0 0.25252524 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +18 0.2 0.136930227 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.118337318 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.187447339 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 +51 0.566666663 0.0627687 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 +41 0.455555558 0.106881842 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 +18 0.2 0.220657974 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Female United-States 0 +41 0.455555558 0.1420107 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Sales Unmarried Black Female United-States 0 +27 0.3 0.0992385745 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +71 0.788888931 0.08785314 0.125 0 0 0.282828271 Self-emp-not-inc 1st-4th Divorced Craft-repair Not-in-family White Female United-States 0 +25 0.2777778 0.139152229 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male El-Salvador 0 +73 0.811111152 0.1917418 0.5625 0 0 0.2020202 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +45 0.5 0.08603595 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +25 0.2777778 0.143740341 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.193928763 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 +44 0.4888889 0.1679337 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male Ecuador 0 +44 0.4888889 0.195596442 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Protective-serv Own-child White Female Cuba 0 +49 0.544444442 0.03689083 0.5625 0.03103031 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.0381564 0.625 0.07688077 0 0.454545468 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.1202057 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +20 0.222222224 0.0423417464 0.5625 0 0 0.454545468 Private HS-grad Never-married Priv-house-serv Not-in-family White Female United-States 0 +66 0.733333349 0.0722002 0.5625 0 0 0.181818187 Private HS-grad Widowed Tech-support Not-in-family White Female United-States 0 +19 0.211111113 0.0585032068 0.625 0 0 0.151515156 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +60 0.6666667 0.08802018 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.110919006 0.6875 0 0 0.4040404 Private Assoc-voc Separated Prof-specialty Not-in-family White Male United-States 0 +42 0.466666669 0.133572668 0.6875 0 0 0.353535354 Private Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 +59 0.655555546 0.1763421 0.625 0 0 0.5252525 Private Some-college Divorced Exec-managerial Not-in-family White Female Outlying-US(Guam-USVI-etc) 0 +58 0.644444466 0.188797772 0.75 0.05178052 0 0.6060606 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.06545138 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +58 0.644444466 0.06454818 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +69 0.7666667 0.217562422 0.8125 1 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +17 0.188888893 0.189040929 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Female United-States 0 +19 0.211111113 0.09180679 0.4375 0 0 0.24242425 Private 11th Never-married Farming-fishing Own-child White Male United-States 0 +28 0.311111122 0.0438949168 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +37 0.411111116 0.0174202956 0.5625 0 0 0.4040404 Private HS-grad Separated Prof-specialty Unmarried Amer-Indian-Eskimo Female United-States 0 +30 0.333333343 0.100714289 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.0228240639 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 0 +45 0.5 0.116401576 0.4375 0 0.6483012 0.7676768 Private 11th Divorced Transport-moving Not-in-family White Male United-States 1 +59 0.655555546 0.07189846 0.25 0 0 1 Private 7th-8th Married-civ-spouse Other-service Wife White Female United-States 0 +45 0.5 0.08878936 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +53 0.5888889 0.145948857 1 0.105201051 0 0.4040404 Local-gov Doctorate Divorced Prof-specialty Not-in-family White Female United-States 1 +37 0.411111116 0.089801006 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +26 0.2888889 0.11095605 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +53 0.5888889 0.06672302 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.04004836 0.5625 0 0 0.151515156 State-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +27 0.3 0.140583485 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Own-child White Male United-States 0 +22 0.244444445 0.09329328 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +41 0.455555558 0.08153472 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +53 0.5888889 0.100884691 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +58 0.644444466 0.07711633 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.08976733 0.5 0 0 0.535353541 ? 12th Separated ? Unmarried Black Female United-States 0 +32 0.355555564 0.142975211 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.296442062 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +47 0.5222222 0.06601446 0.875 0.07688077 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +27 0.3 0.09785379 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +25 0.2777778 0.119314611 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +40 0.444444448 0.09533005 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family Black Female United-States 0 +36 0.4 0.0323922932 0.625 0 0 0.9292929 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.212041453 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Transport-moving Own-child White Male United-States 0 +44 0.4888889 0.08323 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +19 0.211111113 0.115039691 0.5625 0 0 0.6060606 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +42 0.466666669 0.223883539 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +60 0.6666667 0.130017757 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +41 0.455555558 0.236519039 0.5625 0 0.4242424 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.0720075741 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Transport-moving Unmarried Asian-Pac-Islander Female United-States 0 +67 0.7444445 0.110275105 0.1875 0 0 0.4949495 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 0 +36 0.4 0.410812259 0.8125 0 0 0.4848485 Self-emp-not-inc Bachelors Married-civ-spouse Transport-moving Husband Black Male ? 0 +52 0.5777778 0.21191214 0.875 0 0 0.4040404 State-gov Masters Divorced Prof-specialty Not-in-family Asian-Pac-Islander Female United-States 0 +28 0.311111122 0.0780929551 1 0 0 0.181818187 Private Doctorate Never-married Adm-clerical Own-child White Male United-States 0 +83 0.922222257 0.183368415 0.5625 0 0 0.2020202 Self-emp-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 +17 0.188888893 0.11307162 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 +27 0.3 0.119196743 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +35 0.3888889 0.0209435541 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Not-in-family White Male United-States 0 +40 0.444444448 0.08812121 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +23 0.25555557 0.139701158 0.75 0 0 0.25252524 Private Assoc-acdm Married-civ-spouse Sales Wife White Female United-States 0 +51 0.566666663 0.178120911 0.4375 0 0 0.4040404 Local-gov 11th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +51 0.566666663 0.229397759 0.125 0 0 0.545454562 Private 1st-4th Married-civ-spouse Other-service Husband White Male Mexico 0 +82 0.9111111 0.0285814367 0.375 0 0 0.2020202 ? 10th Widowed ? Not-in-family White Male United-States 0 +28 0.311111122 0.07234501 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +53 0.5888889 0.195756063 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male Germany 1 +29 0.322222233 0.07151522 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Not-in-family White Female Canada 0 +19 0.211111113 0.166820347 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.115577169 0.8125 0 0 0.5050505 Private Bachelors Married-spouse-absent Sales Not-in-family White Female United-States 0 +23 0.25555557 0.157916889 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Own-child Black Female Dominican-Republic 0 +66 0.733333349 0.132466719 0.8125 0 0 0.151515156 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.122946985 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 +35 0.3888889 0.116315365 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +17 0.188888893 0.0199170876 0.5 0 0 0.151515156 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 +27 0.3 0.08785449 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +27 0.3 0.1437464 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 +44 0.4888889 0.127941921 0.8125 0.1502415 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Wife Black Female United-States 1 +64 0.7111111 0.08967707 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +62 0.6888889 0.0161985047 0.5625 0 0 0.151515156 Self-emp-inc HS-grad Widowed Sales Not-in-family White Female United-States 0 +26 0.2888889 0.186546832 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.124507561 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried White Male United-States 0 +40 0.444444448 0.0977702662 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.129487678 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +25 0.2777778 0.128409356 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Male Taiwan 0 +52 0.5777778 0.172375664 0.625 0 0 0.24242425 Local-gov Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +46 0.51111114 0.06673784 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +30 0.333333343 0.146029681 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 +52 0.5777778 0.0744679943 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.081141375 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family Other Male United-States 0 +17 0.188888893 0.123301268 0.375 0 0 0.25252524 Private 10th Never-married Other-service Own-child White Female United-States 0 +46 0.51111114 0.20124267 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Own-child Black Female United-States 0 +45 0.5 0.20063515 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +21 0.233333334 0.170816422 0.625 0.010550105 0 0.323232323 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +18 0.2 0.13971664 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +17 0.188888893 0.100034691 0.4375 0 0.395087242 0.151515156 Private 11th Never-married Other-service Own-child White Male United-States 0 +90 1 0.09406583 0.625 0 0 0.373737365 Private Some-college Divorced Sales Unmarried Black Female United-States 0 +23 0.25555557 0.111452445 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +41 0.455555558 0.08101071 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.0457525253 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 +69 0.7666667 0.154520929 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +23 0.25555557 0.0278546922 0.75 0 0 0.323232323 Federal-gov Assoc-acdm Never-married Exec-managerial Unmarried White Female United-States 0 +28 0.311111122 0.124689423 0.625 0 0 0.545454562 Private Some-college Never-married Tech-support Not-in-family White Male United-States 0 +37 0.411111116 0.07350484 0.75 0 0.453856736 0.454545468 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +57 0.6333333 0.09989527 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.09812859 0.625 0 0.453168035 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family Black Male United-States 0 +48 0.533333361 0.14172782 0.5625 0.009140091 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +73 0.811111152 0.13371411 0.5625 0 0 0.323232323 Private HS-grad Widowed Other-service Other-relative White Female United-States 0 +25 0.2777778 0.351180881 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Other-relative White Male Mexico 0 +33 0.366666675 0.06794751 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 +36 0.4 0.08406923 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.12853463 0.5625 0.03411034 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.048068136 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +31 0.344444454 0.2041025 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 +35 0.3888889 0.0666725039 0.3125 0 0 0.3838384 ? 9th Divorced ? Own-child Amer-Indian-Eskimo Male United-States 0 +40 0.444444448 0.2632045 0.5625 0 0 0.4848485 State-gov HS-grad Divorced Other-service Not-in-family Black Female United-States 0 +32 0.355555564 0.0368975662 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +35 0.3888889 0.136514 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Not-in-family White Male United-States 0 +26 0.2888889 0.1435174 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female Jamaica 0 +27 0.3 0.06042817 0.625 0 0 0.4040404 Self-emp-inc Some-college Separated Sales Own-child White Female United-States 0 +17 0.188888893 0.151616648 0.375 0 0.3677686 0.181818187 Private 10th Never-married Other-service Own-child White Female United-States 0 +29 0.322222233 0.170580685 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Female United-States 0 +18 0.2 0.0526576 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Own-child White Female United-States 0 +20 0.222222224 0.1065572 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +69 0.7666667 0.227466062 0.5625 0 0 0.24242425 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +18 0.2 0.263525069 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Not-in-family White Female United-States 0 +56 0.622222245 0.09076282 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +40 0.444444448 0.12352892 0.625 0 0 0.08080808 Private Some-college Separated Other-service Unmarried White Female United-States 0 +46 0.51111114 0.129852727 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +41 0.455555558 0.137362644 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Protective-serv Husband Black Male ? 0 +53 0.5888889 0.0602139831 0.625 0 0 0.4040404 Private Some-college Widowed Exec-managerial Unmarried White Female United-States 0 +50 0.5555556 0.160212308 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.09374724 0.4375 0 0 0.5050505 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +40 0.444444448 0.08533749 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Exec-managerial Not-in-family White Male United-States 1 +54 0.6 0.1159658 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +45 0.5 0.1106011 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +53 0.5888889 0.4096329 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 +17 0.188888893 0.133896634 0.4375 0 0 0.2020202 ? 11th Never-married ? Own-child White Male Peru 0 +50 0.5555556 0.286793679 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 +22 0.244444445 0.07921978 0.8125 0 0 0.25252524 ? Bachelors Never-married ? Not-in-family White Male United-States 0 +30 0.333333343 0.08026107 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Unmarried White Male ? 0 +40 0.444444448 0.06198942 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.05196049 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +25 0.2777778 0.12918593 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 +29 0.322222233 0.036998596 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +29 0.322222233 0.1695246 0.8125 0 0 0.5050505 Private Bachelors Never-married Farming-fishing Own-child White Male United-States 0 +22 0.244444445 0.1806049 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +56 0.622222245 0.0706147 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Unmarried Black Female Haiti 0 +60 0.6666667 0.153115943 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.143134162 0.5625 0.0346403457 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +53 0.5888889 0.089873746 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Female United-States 0 +23 0.25555557 0.2081592 0.625 0 0 0.2020202 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +18 0.2 0.0398745872 0.5625 0 0 0.1010101 Private HS-grad Never-married Priv-house-serv Other-relative White Female United-States 0 +36 0.4 0.02203064 0.625 0.0332503319 0 0.454545468 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +67 0.7444445 0.0495445244 0.5625 0.09386094 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.07945215 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +26 0.2888889 0.113908827 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.20804739 0.4375 0 0 0.2020202 Private 11th Never-married Adm-clerical Other-relative Asian-Pac-Islander Female United-States 0 +45 0.5 0.09762209 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried Black Female United-States 0 +64 0.7111111 0.068728134 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.226306245 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +53 0.5888889 0.0199076589 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +27 0.3 0.141653061 0.5625 0 0 0.282828271 Private HS-grad Never-married Handlers-cleaners Other-relative White Male Guatemala 0 +32 0.355555564 0.1284996 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried Amer-Indian-Eskimo Male United-States 0 +49 0.544444442 0.07247029 0.5625 0.14084141 0 0.3030303 Self-emp-not-inc HS-grad Divorced Exec-managerial Unmarried White Female United-States 1 +59 0.655555546 0.065446 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.105024233 0.875 0.07688077 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +61 0.677777767 0.12193197 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +41 0.455555558 0.23208113 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried White Female United-States 0 +46 0.51111114 0.114612 0.5625 0 0 0.373737365 State-gov HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +32 0.355555564 0.12045154 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +29 0.322222233 0.0796319842 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +48 0.533333361 0.1007877 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 0 +32 0.355555564 0.0203885622 0.625 0 0 0.3030303 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +21 0.233333334 0.103835441 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +50 0.5555556 0.230212063 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.09782819 0.875 0 0 0.444444448 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.188652292 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Other-relative White Female United-States 0 +42 0.466666669 0.251544237 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.134149209 0.8125 0 0 0.4040404 Private Bachelors Never-married Protective-serv Own-child White Female United-States 0 +70 0.7777778 0.119349636 0.5625 0 0 0.0303030312 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.174399629 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +65 0.722222269 0.09426789 0.5625 0.106051058 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +39 0.433333337 0.173796818 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family White Male ? 0 +32 0.355555564 0.07858598 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.04007261 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +43 0.477777779 0.0230470039 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.134872586 0.3125 0 0 0.4040404 Private 9th Never-married Other-service Own-child White Male United-States 0 +64 0.7111111 0.213002592 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Adm-clerical Not-in-family Black Female United-States 0 +37 0.411111116 0.161083177 0.625 0 0 0.5252525 Local-gov Some-college Separated Protective-serv Own-child Other Male United-States 0 +49 0.544444442 0.116798289 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 +29 0.322222233 0.174597651 0.4375 0 0 0.4848485 Private 11th Never-married Machine-op-inspct Own-child White Male United-States 0 +35 0.3888889 0.131686762 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +37 0.411111116 0.135109678 0.75 0 0.399449021 0.454545468 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +42 0.466666669 0.108014055 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.280131757 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +23 0.25555557 0.0991799757 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 +35 0.3888889 0.134487331 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 +29 0.322222233 0.133691877 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 +23 0.25555557 0.254004 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Unmarried White Female United-States 0 +21 0.233333334 0.2698415 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Female ? 0 +45 0.5 0.3459677 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +24 0.266666681 0.117915012 0.8125 0 0 0.5050505 ? Bachelors Never-married ? Not-in-family White Male United-States 0 +38 0.422222227 0.05560162 0.5625 0.005940059 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +28 0.311111122 0.0527970232 0.375 0 0 0.3838384 ? 10th Never-married ? Own-child White Female United-States 0 +23 0.25555557 0.115649238 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Unmarried White Female United-States 0 +39 0.433333337 0.21259442 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Never-married Sales Own-child Asian-Pac-Islander Male Iran 0 +45 0.5 0.179739416 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +68 0.75555557 0.129876986 0.75 0 0 0.434343427 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 +60 0.6666667 0.15984118 0.6875 0.049340494 0 0.4040404 Federal-gov Assoc-voc Divorced Prof-specialty Unmarried White Male United-States 1 +38 0.422222227 0.07437572 1 0.07688077 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Wife White Female ? 1 +41 0.455555558 0.220653936 0.5 0 0 0.4040404 Private 12th Separated Craft-repair Not-in-family Black Male United-States 0 +48 0.533333361 0.0234693084 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative White Male United-States 0 +33 0.366666675 0.0394569971 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +48 0.533333361 0.1048417 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.141461775 0.625 0 0 0.2020202 Local-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +26 0.2888889 0.257032871 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.2010157 0.8125 0 0.5544077 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.152750209 0.875 0 0 0.75757575 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +52 0.5777778 0.141937956 0.625 0.03103031 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.0748721138 0.5625 0 0 0.3838384 State-gov HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +72 0.8 0.05176786 0.5625 0 0 0.01010101 ? HS-grad Married-civ-spouse ? Husband Asian-Pac-Islander Male United-States 0 +18 0.2 0.06204061 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +62 0.6888889 0.0921307653 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Transport-moving Other-relative White Male United-States 0 +22 0.244444445 0.020078063 0.625 0 0 0.3030303 Private Some-college Never-married Transport-moving Own-child White Female United-States 0 +40 0.444444448 0.243067816 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +26 0.2888889 0.179174989 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.09623057 0.75 0 0 0.363636374 Private Assoc-acdm Married-spouse-absent Sales Own-child Black Female United-States 0 +25 0.2777778 0.0487221368 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Sales Unmarried Asian-Pac-Islander Female United-States 0 +46 0.51111114 0.119421035 0.6875 0 0 0.353535354 ? Assoc-voc Married-civ-spouse ? Wife Black Female United-States 1 +39 0.433333337 0.111204587 0.8125 0 0.359045 0.5050505 Private Bachelors Married-spouse-absent Craft-repair Not-in-family White Male ? 1 +41 0.455555558 0.285900563 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 +59 0.655555546 0.127783641 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male Italy 1 +37 0.411111116 0.02302141 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.123444729 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.0237818286 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family Asian-Pac-Islander Male ? 0 +23 0.25555557 0.174518853 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Other-service Wife White Female Puerto-Rico 0 +67 0.7444445 0.100147843 0.875 0.184811845 0 0.02020202 Self-emp-not-inc Masters Widowed Prof-specialty Not-in-family White Male United-States 1 +60 0.6666667 0.08420461 0.8125 0.0861408561 0 0.4848485 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 +39 0.433333337 0.1162103 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.276563376 0.5625 0 0.4331956 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +26 0.2888889 0.217246532 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +39 0.433333337 0.202572227 0.5625 0 0 0.5050505 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 +28 0.311111122 0.15678671 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.117629431 0.4375 0 0 0.5252525 Private 11th Divorced Craft-repair Unmarried White Female United-States 0 +43 0.477777779 0.110926412 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.139328018 0.625 0 0 0.25252524 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +32 0.355555564 0.1317447 0.8125 0 0.453856736 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.284878135 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +45 0.5 0.07837247 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 +48 0.533333361 0.187599555 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +43 0.477777779 0.126820475 0.9375 0.1502415 0 0.454545468 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.11042463 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +63 0.7 0.04347261 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 1 +55 0.6111111 0.068342194 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.07266225 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +32 0.355555564 0.123048685 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Other-service Unmarried White Male United-States 0 +27 0.3 0.13725017 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 +22 0.244444445 0.135560945 0.8125 0 0 0.151515156 Private Bachelors Never-married Sales Own-child White Female United-States 0 +44 0.4888889 0.0200457331 0.5625 0 0 0.686868668 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +34 0.377777785 0.125510454 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +28 0.311111122 0.132477492 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +40 0.444444448 0.06708673 0.875 0.1502415 0 0.24242425 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +45 0.5 0.131185666 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +17 0.188888893 0.06428617 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Male United-States 0 +53 0.5888889 0.173183233 0.5 0 0 0.454545468 Self-emp-not-inc 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.1311594 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +55 0.6111111 0.06624953 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 +44 0.4888889 0.08414062 0.6875 0 0 0.444444448 Local-gov Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +40 0.444444448 0.07541633 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.08804039 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.1403363 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +62 0.6888889 0.09943187 0.3125 0.010550105 0 0.222222224 Private 9th Never-married Priv-house-serv Not-in-family Black Female United-States 0 +31 0.344444454 0.100698121 0.6875 0.0346403457 0 0.3838384 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.111045629 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +30 0.333333343 0.159534052 0.5625 0 0.430670351 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +37 0.411111116 0.148389071 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female Mexico 0 +38 0.422222227 0.2222529 0.5625 0 0.430670351 0.4040404 Local-gov HS-grad Never-married Craft-repair Not-in-family White Male Canada 0 +58 0.644444466 0.214545652 0.5 0 0 0.4040404 Local-gov 12th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +30 0.333333343 0.123448096 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.225208372 0.6875 0.046500463 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.07356815 0.625 0 0 0.7070707 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +34 0.377777785 0.0798481852 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +39 0.433333337 0.109824516 0.625 0 0 1 Self-emp-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +61 0.677777767 0.170472249 0.625 0 0 0.2020202 Self-emp-inc Some-college Widowed Sales Not-in-family White Female United-States 0 +30 0.333333343 0.0135366963 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Divorced Machine-op-inspct Not-in-family White Female United-States 0 +31 0.344444454 0.132165655 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +21 0.233333334 0.118120439 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +50 0.5555556 0.157632 0.5625 0 0 0.5858586 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.230188489 0.5625 0 0 0.333333343 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +20 0.222222224 0.117675908 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +23 0.25555557 0.150087059 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Own-child White Female United-States 0 +46 0.51111114 0.169586554 0.125 0 0 0.4040404 Private 1st-4th Separated Other-service Not-in-family White Female Mexico 0 +20 0.222222224 0.110607162 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +33 0.366666675 0.169137985 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.159622952 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.07132461 0.625 0 0 0.4040404 Local-gov Some-college Divorced Protective-serv Unmarried White Female United-States 0 +23 0.25555557 0.142470732 0.625 0 0 0.6060606 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +34 0.377777785 0.214055315 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 +25 0.2777778 0.124797188 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +50 0.5555556 0.020889 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 1 +44 0.4888889 0.10236714 0.875 0 0 0.24242425 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 +26 0.2888889 0.0602065735 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +35 0.3888889 0.273489356 1 0 0 0.8080808 Private Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 +48 0.533333361 0.115838505 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 +26 0.2888889 0.113051414 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +41 0.455555558 0.143475637 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +25 0.2777778 0.142401353 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Male United-States 0 +33 0.366666675 0.113814533 0.6875 0 0 0.5555556 Private Assoc-voc Never-married Prof-specialty Unmarried White Female United-States 0 +24 0.266666681 0.0824056 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 +31 0.344444454 0.09412847 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.118661962 0.75 0 0 0.02020202 Local-gov Assoc-acdm Never-married Prof-specialty Own-child White Female United-States 0 +41 0.455555558 0.09781068 0.3125 0 0 0.4040404 Private 9th Never-married Priv-house-serv Unmarried White Female Columbia 0 +38 0.422222227 0.127036691 0.625 0 0 0.454545468 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.3002132 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +19 0.211111113 0.214185312 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +24 0.266666681 0.1587669 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +59 0.655555546 0.247849911 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +67 0.7444445 0.14326416 0.875 0 0 0.5555556 Private Masters Married-spouse-absent Exec-managerial Not-in-family White Male United-States 1 +49 0.544444442 0.277006537 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family Black Male United-States 0 +35 0.3888889 0.0700381547 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +44 0.4888889 0.137240067 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.179693609 0.625 1 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +22 0.244444445 0.0786688253 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Protective-serv Own-child White Male United-States 0 +21 0.233333334 0.0668139458 0.625 0 0 0.1010101 State-gov Some-college Never-married Exec-managerial Own-child White Male United-States 0 +50 0.5555556 0.10933283 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +44 0.4888889 0.0676760748 0.75 0 0 0.4848485 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +36 0.4 0.0219484679 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Husband Amer-Indian-Eskimo Male United-States 0 +30 0.333333343 0.216871366 0.625 0.07298073 0 0.4848485 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male Cuba 1 +52 0.5777778 0.0733573362 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.0413166247 0.5625 0 0 0.909090936 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.05466002 0.6875 0 0 0.4848485 Local-gov Assoc-voc Never-married Protective-serv Unmarried White Male United-States 0 +23 0.25555557 0.109749079 0.5625 0 0.5456841 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +37 0.411111116 0.15188472 0.875 0 0 0.5050505 Private Masters Never-married Sales Not-in-family White Male United-States 0 +44 0.4888889 0.129124641 0.875 0 0.5544077 0.5555556 Self-emp-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.1185845 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +36 0.4 0.133755192 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +26 0.2888889 0.0235501342 0.625 0 0 0.121212125 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.314613342 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +23 0.25555557 0.177745074 0.5625 0 0 0.121212125 ? HS-grad Never-married ? Own-child Black Male England 0 +29 0.322222233 0.138063788 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.146539554 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried Black Female United-States 0 +52 0.5777778 0.0325606763 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +55 0.6111111 0.130079716 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +31 0.344444454 0.170642659 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 +19 0.211111113 0.173789412 0.5625 0 0 0.161616161 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +64 0.7111111 0.142358243 0.5625 0 0 0.3030303 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +55 0.6111111 0.128892273 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +48 0.533333361 0.100353271 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.0834516 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Female United-States 0 +50 0.5555556 0.07913761 0.5625 0.07298073 0 0.3030303 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +45 0.5 0.0217928812 0.8125 0 0 0.5151515 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +17 0.188888893 0.139088914 0.375 0 0 0.1010101 Private 10th Never-married Handlers-cleaners Other-relative White Male El-Salvador 0 +38 0.422222227 0.147321522 0.5625 0 0 0.25252524 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +43 0.477777779 0.035359215 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 1 +22 0.244444445 0.0921172947 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +63 0.7 0.147867754 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 +36 0.4 0.07682267 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +56 0.622222245 0.16659 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.209448352 0.9375 0 0 0.4040404 State-gov Prof-school Married-civ-spouse Prof-specialty Husband Black Male United-States 0 +41 0.455555558 0.115542144 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +41 0.455555558 0.146463439 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.2764785 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +59 0.655555546 0.09859939 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.111459181 0.75 0 0 0.444444448 Local-gov Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.124112874 0.8125 0 0 0.363636374 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.155820176 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Separated Prof-specialty Not-in-family White Male United-States 0 +53 0.5888889 0.06430166 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +47 0.5222222 0.164359257 0.5625 0 0 0.565656543 Private HS-grad Never-married Machine-op-inspct Unmarried Amer-Indian-Eskimo Male Puerto-Rico 0 +46 0.51111114 0.0313442759 0.875 0 0 0.4040404 Federal-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.138566256 0.5625 0 0 0.565656543 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.2584655 0.5625 0 0.4331956 0.3030303 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +32 0.355555564 0.221053347 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Unmarried White Female United-States 0 +90 1 0.0569493622 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +63 0.7 0.148899615 0.8125 0 0 0.4949495 Private Bachelors Married-civ-spouse Craft-repair Husband White Male ? 0 +23 0.25555557 0.08350682 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Own-child Asian-Pac-Islander Male United-States 0 +76 0.844444454 0.128661245 0.8125 0 0 0.3030303 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +23 0.25555557 0.113064885 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.1521373 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Adm-clerical Wife Other Female Mexico 1 +81 0.900000036 0.166519284 0.375 0.0293602925 0 0.282828271 Self-emp-inc 10th Married-civ-spouse Exec-managerial Wife White Female United-States 0 +17 0.188888893 0.0968482 0.375 0 0 0.121212125 Private 10th Never-married Other-service Own-child Black Female United-States 0 +56 0.622222245 0.119398132 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +58 0.644444466 0.087415345 0.375 0 0 0.4040404 Federal-gov 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.0211078972 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +25 0.2777778 0.159133971 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +36 0.4 0.0879770741 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female Philippines 1 +32 0.355555564 0.14021641 0.6875 0 0 0.24242425 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 +25 0.2777778 0.196711138 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 +29 0.322222233 0.09612145 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +23 0.25555557 0.0805985 0.5625 0 0 0.6060606 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +41 0.455555558 0.07868566 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.135499641 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +29 0.322222233 0.07970405 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +27 0.3 0.117060296 0.875 0 0 0.2020202 ? Masters Never-married ? Unmarried Asian-Pac-Islander Male Taiwan 0 +55 0.6111111 0.194824561 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.128585815 0.4375 0 0.379017442 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband Asian-Pac-Islander Male Vietnam 0 +45 0.5 0.09468615 0.625 0 0 0.4040404 Private Some-college Widowed Other-service Unmarried Black Female United-States 0 +50 0.5555556 0.117263705 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male Puerto-Rico 0 +22 0.244444445 0.213179722 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +80 0.8888889 0.0135387164 0.5625 0 0 0.323232323 Local-gov HS-grad Widowed Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 +30 0.333333343 0.126138866 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +20 0.222222224 0.1747795 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +29 0.322222233 0.122223608 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +56 0.622222245 0.120025195 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +63 0.7 0.12728186 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +20 0.222222224 0.136745691 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +38 0.422222227 0.0956567153 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +31 0.344444454 0.08017283 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.145605356 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 +47 0.5222222 0.120118812 0.375 0 0 0.464646459 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +25 0.2777778 0.164617211 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Tech-support Unmarried Asian-Pac-Islander Female Vietnam 0 +31 0.344444454 0.1340017 0.625 0 0 0.3838384 Private Some-college Separated Adm-clerical Unmarried Black Female United-States 0 +28 0.311111122 0.116595551 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +38 0.422222227 0.0446728468 0.5625 0 0 1 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.121971034 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 +39 0.433333337 0.09126392 0.5625 0 0.453856736 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.0902058 0.8125 0 0 0.363636374 Private Bachelors Never-married Prof-specialty Unmarried White Female ? 0 +26 0.2888889 0.0582492836 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +47 0.5222222 0.113010332 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +27 0.3 0.1404838 0.5625 0 0.518365443 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +43 0.477777779 0.1459529 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Protective-serv Husband Other Male United-States 0 +32 0.355555564 0.07978488 0.8125 0 0 0.5555556 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +20 0.222222224 0.20114097 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Male Philippines 0 +21 0.233333334 0.143314674 0.5 0 0 0.2020202 Local-gov 12th Never-married Handlers-cleaners Unmarried Black Female United-States 0 +32 0.355555564 0.107217938 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Male United-States 0 +37 0.411111116 0.160297841 0.6875 0 0 0.4848485 Private Assoc-voc Divorced Machine-op-inspct Not-in-family Black Male United-States 0 +45 0.5 0.108253159 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Vietnam 0 +37 0.411111116 0.123795636 0.75 0 0.4331956 0.4040404 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.1252343 0.3125 0 0 0.151515156 ? 9th Divorced ? Not-in-family White Female United-States 0 +24 0.266666681 0.108572409 0.8125 0 0 0.25252524 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +28 0.311111122 0.076537095 0.4375 0 0 0.3030303 ? 11th Never-married ? Not-in-family White Male United-States 0 +23 0.25555557 0.144501433 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +54 0.6 0.116515405 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +40 0.444444448 0.137240067 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +38 0.422222227 0.108534023 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +71 0.788888931 0.12131501 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.213777155 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +52 0.5777778 0.160212308 0.625 0 0 0.05050505 Self-emp-not-inc Some-college Never-married Adm-clerical Unmarried White Male United-States 0 +30 0.333333343 0.21759811 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +34 0.377777785 0.121971034 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.208204329 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family White Female United-States 0 +43 0.477777779 0.07135155 0.6875 0.135501355 0 0.4040404 Federal-gov Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 1 +43 0.477777779 0.0269575436 0.4375 0 0 0.424242437 Private 11th Never-married Transport-moving Not-in-family White Male United-States 0 +36 0.4 0.129616991 0.625 0.135501355 0 0.4040404 Federal-gov Some-college Never-married Exec-managerial Not-in-family Black Male United-States 1 +24 0.266666681 0.12407583 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +29 0.322222233 0.17256695 0.125 0 0 0.4040404 ? 1st-4th Never-married ? Own-child Asian-Pac-Islander Male Philippines 0 +55 0.6111111 0.1383588 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Wife Black Female United-States 0 +51 0.566666663 0.0149598746 0.875 0 0.43663913 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.132220209 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Exec-managerial Unmarried Amer-Indian-Eskimo Female United-States 0 +28 0.311111122 0.262485147 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 +54 0.6 0.0556110479 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +47 0.5222222 0.134072423 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.108061872 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.05121152 0.625 0 0 0.575757563 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 1 +38 0.422222227 0.126963273 0.625 0.06497065 0 0.353535354 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +60 0.6666667 0.06253431 0.1875 0 0 0.4040404 Self-emp-not-inc 5th-6th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +19 0.211111113 0.0195884034 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child Amer-Indian-Eskimo Female United-States 0 +22 0.244444445 0.157926321 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +55 0.6111111 0.07227564 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.0753624439 0.625 0 0 0.353535354 Private Some-college Separated Sales Other-relative Black Female United-States 0 +53 0.5888889 0.0979447141 0.125 0.07688077 0 0.676767647 Self-emp-not-inc 1st-4th Married-civ-spouse Exec-managerial Husband White Male Italy 1 +44 0.4888889 0.130278409 0.875 0.04386044 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +28 0.311111122 0.126811728 0.8125 0 0 0.5050505 Federal-gov Bachelors Never-married Protective-serv Not-in-family White Male United-States 0 +30 0.333333343 0.204407617 0.625 0 0 0.4040404 Local-gov Some-college Never-married Transport-moving Unmarried Black Female United-States 0 +39 0.433333337 0.0452527627 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Exec-managerial Own-child Amer-Indian-Eskimo Female United-States 0 +43 0.477777779 0.07712509 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +24 0.266666681 0.137516886 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Other-relative White Female United-States 0 +27 0.3 0.109767936 0.6875 0 0 0.565656543 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 0 +64 0.7111111 0.12978673 0.1875 0 0 0.7070707 Self-emp-not-inc 5th-6th Married-civ-spouse Farming-fishing Husband White Male Canada 0 +41 0.455555558 0.0600604154 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +28 0.311111122 0.110001653 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +61 0.677777767 0.086367324 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +27 0.3 0.165985838 0.4375 0 0 0.4040404 Private 11th Divorced Machine-op-inspct Unmarried White Female United-States 0 +49 0.544444442 0.03405862 0.625 0 0 0.323232323 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +20 0.222222224 0.07912414 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.212725088 0.8125 0 0.430670351 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.144729763 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.131686762 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +44 0.4888889 0.147270337 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Craft-repair Own-child White Male United-States 0 +51 0.566666663 0.0587355755 0.8125 0.07688077 0 0.2020202 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +40 0.444444448 0.110895433 0.625 0 0 0.3838384 Private Some-college Divorced Prof-specialty Unmarried Black Female United-States 0 +19 0.211111113 0.08698765 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 +54 0.6 0.21532695 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 0 +55 0.6111111 0.130244061 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +57 0.6333333 0.113062195 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Prof-specialty Not-in-family White Female United-States 0 +29 0.322222233 0.133314028 0.625 0 0 0.3030303 Private Some-college Separated Priv-house-serv Not-in-family White Female Guatemala 0 +51 0.566666663 0.06930939 0.5625 0 0 0.434343427 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +44 0.4888889 0.146094352 0.5625 0 0 0.373737365 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +35 0.3888889 0.223205954 0.6875 0 0 0.424242437 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 +40 0.444444448 0.115459979 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +46 0.51111114 0.0238471627 0.25 0 0 0.323232323 Private 7th-8th Separated Other-service Not-in-family White Female United-States 0 +25 0.2777778 0.1609505 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +33 0.366666675 0.1434642 0.8125 0 0.323232323 0.363636374 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +32 0.355555564 0.0187794883 0.625 0 0.506198347 0.4040404 Private Some-college Never-married Machine-op-inspct Other-relative White Female Holand-Netherlands 0 +22 0.244444445 0.22936745 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Female United-States 0 +39 0.433333337 0.0473090634 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife Asian-Pac-Islander Female Philippines 0 +18 0.2 0.0587113276 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child Asian-Pac-Islander Male United-States 0 +43 0.477777779 0.17091544 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +46 0.51111114 0.130955979 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Other-relative White Male United-States 0 +63 0.7 0.09284201 0.625 0.07298073 0 0.4848485 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.114937983 0.625 0 0 0.08080808 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +59 0.655555546 0.1228931 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.01813761 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.268755078 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +64 0.7111111 0.0337919 0.5625 0 0 0.1010101 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +36 0.4 0.147160545 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +48 0.533333361 0.110744558 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +43 0.477777779 0.08381194 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +18 0.2 0.04107281 0.375 0 0 0.3030303 Private 10th Never-married Other-service Own-child White Female United-States 0 +17 0.188888893 0.04773204 0.4375 0 0 0.161616161 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +36 0.4 0.101434968 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male ? 0 +53 0.5888889 0.153902635 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +36 0.4 0.0517052226 0.625 0 0 0.3939394 State-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +20 0.222222224 0.146950409 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +22 0.244444445 0.4144709 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +34 0.377777785 0.1012484 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.0345280729 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Own-child White Male United-States 0 +57 0.6333333 0.1331187 0.625 0 0 0.4040404 Private Some-college Widowed Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.154842213 0.375 0 0 0.4040404 Private 10th Divorced Other-service Unmarried White Female United-States 0 +37 0.411111116 0.112759776 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.1124358 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +38 0.422222227 0.205830112 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Unmarried White Male United-States 0 +34 0.377777785 0.203131944 0.5625 0 0 0.353535354 Private HS-grad Never-married Exec-managerial Unmarried White Female United-States 0 +47 0.5222222 0.1546745 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-spouse-absent Adm-clerical Not-in-family Black Female Puerto-Rico 0 +28 0.311111122 0.0346607566 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +25 0.2777778 0.139152229 0.375 0 0 0.24242425 Private 10th Never-married Other-service Not-in-family White Male Nicaragua 0 +25 0.2777778 0.119105145 0.625 0 0 0.6060606 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +50 0.5555556 0.1377021 0.875 0.1502415 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.0224313922 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.11722935 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.0262126159 0.5625 0 0.430670351 0.75757575 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +32 0.355555564 0.114512309 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.06632025 0.375 0 0 0.353535354 Private 10th Never-married Farming-fishing Unmarried White Male United-States 0 +19 0.211111113 0.127206415 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 +53 0.5888889 0.0928231552 0.625 0 0 0.4040404 Self-emp-inc Some-college Widowed Exec-managerial Not-in-family White Male United-States 1 +21 0.233333334 0.0292819124 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 +26 0.2888889 0.375317663 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +68 0.75555557 0.0220777877 0.5625 0 0.09618916 0.121212125 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.1089543 0.625 0 0.4708448 0.575757563 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.139871553 0.8125 0 0.5610652 0.5050505 Private Bachelors Never-married Exec-managerial Other-relative White Male United-States 1 +33 0.366666675 0.115319207 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Own-child White Male United-States 0 +49 0.544444442 0.0354211777 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family Black Male United-States 0 +24 0.266666681 0.123762637 0.4375 0 0 0.656565666 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.100698121 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +49 0.544444442 0.0660683438 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.08332565 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +30 0.333333343 0.12823087 0.625 0 0 0.373737365 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +51 0.566666663 0.225144386 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.231318682 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +52 0.5777778 0.140298575 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Other-relative White Male United-States 0 +23 0.25555557 0.18870011 0.5625 0 0 0.323232323 Local-gov HS-grad Never-married Other-service Own-child Black Male United-States 0 +23 0.25555557 0.117675908 0.375 0 0 0.6060606 Self-emp-not-inc 10th Never-married Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.124371514 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.09460398 0.4375 0 0 0.25252524 Private 11th Never-married Craft-repair Other-relative White Male United-States 0 +53 0.5888889 0.07329065 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.102816388 0.4375 0 0 0.25252524 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +69 0.7666667 0.181516871 0.5625 0 0 0.08080808 Private HS-grad Widowed Handlers-cleaners Not-in-family White Female United-States 0 +46 0.51111114 0.0224778671 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +33 0.366666675 0.16412285 0.5625 0 0 0.464646459 Private HS-grad Separated Tech-support Not-in-family White Male United-States 0 +40 0.444444448 0.151836231 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +56 0.622222245 0.145375013 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male ? 0 +29 0.322222233 0.131689459 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +41 0.455555558 0.04720938 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +22 0.244444445 0.127896115 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +28 0.311111122 0.04331298 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.06347052 0.8125 0 0 0.464646459 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.0419834256 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.175790474 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +17 0.188888893 0.09851654 0.375 0 0 0.1010101 Private 10th Never-married Other-service Own-child White Female United-States 0 +39 0.433333337 0.09918334 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.140060157 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Other-service Not-in-family Black Male United-States 0 +50 0.5555556 0.121645041 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +56 0.622222245 0.07071843 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +80 0.8888889 0.378752679 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +38 0.422222227 0.225207031 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Wife White Female United-States 0 +52 0.5777778 0.09615176 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband Black Male United-States 1 +26 0.2888889 0.148619428 0.8125 0 0 0.3838384 Local-gov Bachelors Never-married Prof-specialty Own-child Black Male England 0 +43 0.477777779 0.06498463 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Own-child Asian-Pac-Islander Female South 0 +45 0.5 0.03485137 0.8125 0 0 0.424242437 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +41 0.455555558 0.07743424 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +30 0.333333343 0.265349 0.75 0 0 0.25252524 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.0281793363 0.625 0.02407024 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.0963464156 0.625 0 0 0.2020202 Local-gov Some-college Divorced Other-service Unmarried White Female United-States 0 +44 0.4888889 0.1408859 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.123423845 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family Black Male United-States 0 +23 0.25555557 0.0693349838 0.8125 0 0.518365443 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 1 +33 0.366666675 0.287918478 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.228080332 0.4375 0 0 0.161616161 Private 11th Never-married Other-service Own-child White Male United-States 0 +38 0.422222227 0.060321074 0.625 0 0 0.4040404 Private Some-college Separated Prof-specialty Unmarried White Female Germany 0 +41 0.455555558 0.0219120979 0.6875 0 0 0.454545468 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +22 0.244444445 0.172403947 0.5 0 0 0.4848485 ? 12th Never-married ? Not-in-family White Male United-States 0 +66 0.733333349 0.0756891146 0.25 0 0 0.4040404 Self-emp-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 1 +70 0.7777778 0.233078629 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +58 0.644444466 0.09944939 0.375 0 0.453856736 0.353535354 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Wife White Female ? 1 +60 0.6666667 0.030251801 0.875 0 0 0.1010101 Self-emp-not-inc Masters Divorced Prof-specialty Unmarried White Female United-States 0 +24 0.266666681 0.07506542 0.375 0 0 0.656565666 Local-gov 10th Never-married Craft-repair Unmarried Black Male Haiti 0 +61 0.677777767 0.115463346 0.4375 0 0 0.363636374 Private 11th Divorced Other-service Unmarried White Female United-States 0 +35 0.3888889 0.128620833 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.0734186247 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +52 0.5777778 0.272413045 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +38 0.422222227 0.188703477 0.8125 0.07298073 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.109923519 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.129491046 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.122418262 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +41 0.455555558 0.123327531 0.5625 0 0 0.444444448 Private HS-grad Separated Machine-op-inspct Unmarried White Female Cuba 0 +37 0.411111116 0.225747213 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.05835705 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.121412672 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +38 0.422222227 0.0861214846 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Unmarried White Female United-States 0 +38 0.422222227 0.09836432 0.8125 0.03103031 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 1 +49 0.544444442 0.0687746 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +38 0.422222227 0.102536872 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male ? 1 +22 0.244444445 0.136555746 0.5625 0 0 0.5555556 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 +40 0.444444448 0.134237438 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.179474711 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.232543841 1 0 0 1 Federal-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.1380308 0.875 0 0 0.565656543 Private Masters Never-married Adm-clerical Not-in-family White Male United-States 0 +58 0.644444466 0.16490145 0.8125 0.04787048 0 0.4040404 Federal-gov Bachelors Separated Prof-specialty Not-in-family White Male United-States 1 +24 0.266666681 0.128279358 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +43 0.477777779 0.121329159 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +38 0.422222227 0.112200744 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 +42 0.466666669 0.02018044 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.128731966 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +18 0.2 0.255072236 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Female United-States 0 +37 0.411111116 0.07837112 0.5625 0.2782828 0 0.4848485 Private HS-grad Never-married Craft-repair Other-relative Amer-Indian-Eskimo Male United-States 1 +48 0.533333361 0.162071928 0.5625 0 0 0.656565666 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +40 0.444444448 0.157149062 0.25 0 0 0.25252524 Private 7th-8th Separated Other-service Not-in-family White Female United-States 0 +50 0.5555556 0.203884274 0.8125 0.07688077 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 +57 0.6333333 0.0197850764 0.5625 0 0 0.353535354 Private HS-grad Separated Sales Not-in-family Amer-Indian-Eskimo Female United-States 0 +36 0.4 0.09248571 0.625 0 0 0.6060606 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +41 0.455555558 0.09489158 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +90 1 0.152870774 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +66 0.733333349 0.102237821 0.25 0 0 0.1010101 Private 7th-8th Widowed Other-service Not-in-family Black Female United-States 0 +34 0.377777785 0.0380277559 0.5625 0 0.500229537 0.121212125 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Wife White Female United-States 0 +23 0.25555557 0.04909191 0.5625 0 0 0.01010101 Private HS-grad Never-married Craft-repair Own-child Asian-Pac-Islander Male Vietnam 0 +35 0.3888889 0.1762276 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +32 0.355555564 0.120303363 0.5625 0.02407024 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.199089378 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 1 +32 0.355555564 0.254485577 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.0380614325 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 0 +32 0.355555564 0.227449909 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.123772062 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +27 0.3 0.072638 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 +34 0.377777785 0.0152494945 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Not-in-family Amer-Indian-Eskimo Male United-States 0 +35 0.3888889 0.137798414 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Wife Black Female United-States 1 +29 0.322222233 0.07732243 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.128369614 0.5625 0 0 0.2020202 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 +33 0.366666675 0.148222044 1 0 0 0.4848485 State-gov Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 +22 0.244444445 0.153889164 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Own-child White Female United-States 0 +52 0.5777778 0.08646701 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.106145665 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.102492414 0.4375 0 0 0.1010101 Local-gov 11th Never-married Protective-serv Own-child White Male United-States 0 +63 0.7 0.228836715 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 1 +49 0.544444442 0.162214726 0.25 0 0 0.353535354 Private 7th-8th Divorced Other-service Unmarried White Female United-States 0 +58 0.644444466 0.06354461 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.1947296 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Other-service Unmarried White Female United-States 0 +59 0.655555546 0.118977845 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +49 0.544444442 0.05363153 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.14196828 0.8125 0 0 0.151515156 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +17 0.188888893 0.10909979 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 +20 0.222222224 0.33235088 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +36 0.4 0.05823312 0.6875 0 0.4331956 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +64 0.7111111 0.21030575 0.625 0 0 0.0303030312 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 0 +34 0.377777785 0.124878682 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +63 0.7 0.0680788457 0.75 0 0 0.353535354 Private Assoc-acdm Married-spouse-absent Adm-clerical Other-relative White Female United-States 0 +51 0.566666663 0.09914428 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 +40 0.444444448 0.112026967 0.625 0 0 0.353535354 State-gov Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 +55 0.6111111 0.1203229 0.3125 0 0 0.5555556 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.08531998 0.5625 0 0 0.464646459 Private HS-grad Divorced Craft-repair Not-in-family White Male ? 0 +30 0.333333343 0.106701337 0.8125 0 0 0.25252524 Private Bachelors Never-married Machine-op-inspct Not-in-family White Male United-States 0 +47 0.5222222 0.0559343435 0.8125 0 0 0.181818187 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +29 0.322222233 0.031392768 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family Black Male ? 0 +17 0.188888893 0.114716396 0.4375 0 0 0.08080808 ? 11th Never-married ? Own-child White Female United-States 0 +32 0.355555564 0.0250770357 0.9375 0.07688077 0 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.09555905 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.0549967848 0.625 0 0 0.565656543 Local-gov Some-college Divorced Exec-managerial Not-in-family White Male United-States 1 +50 0.5555556 0.119690448 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Not-in-family White Male United-States 0 +42 0.466666669 0.08405171 0.5625 0.07688077 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 +32 0.355555564 0.0872207 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +60 0.6666667 0.0770611 0.75 0 0 0.3030303 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +53 0.5888889 0.1276422 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.07518329 0.8125 0.0861408561 0 0.4040404 Private Bachelors Widowed Exec-managerial Unmarried White Male United-States 1 +45 0.5 0.165979773 0.8125 0 0 0.3030303 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +31 0.344444454 0.09945006 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 +32 0.355555564 0.298743516 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +37 0.411111116 0.189769015 0.625 0 0 0.3030303 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +28 0.311111122 0.177225783 0.625 0 0 0.6060606 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.19713816 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Not-in-family White Male Mexico 0 +47 0.5222222 0.06519679 0.5625 0 0 0.8080808 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.289992958 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.213562965 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Male United-States 0 +48 0.533333361 0.07311688 0.8125 1 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 +32 0.355555564 0.139691055 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +35 0.3888889 0.1260109 0.6875 0 0 0.424242437 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 +46 0.51111114 0.268730819 1 0 0.43663913 0.5252525 Local-gov Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 +38 0.422222227 0.16096127 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +49 0.544444442 0.274461925 0.5625 0 0 0.7070707 ? HS-grad Married-spouse-absent ? Not-in-family White Male United-States 0 +35 0.3888889 0.123795636 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +61 0.677777767 0.152884915 0.5625 0.0486504845 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Male United-States 0 +45 0.5 0.193432376 0.75 0 0 0.353535354 Private Assoc-acdm Divorced Adm-clerical Unmarried Black Male United-States 0 +31 0.344444454 0.07500682 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +52 0.5777778 0.175750747 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.123656891 0.625 0 0 0.5050505 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +64 0.7111111 0.033133857 0.4375 0 0 0.3030303 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +20 0.222222224 0.07921978 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +24 0.266666681 0.116182007 0.875 0 0 0.5050505 Private Masters Never-married Tech-support Not-in-family White Male United-States 0 +29 0.322222233 0.262485147 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.11747317 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +34 0.377777785 0.1278658 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +54 0.6 0.13372758 0.875 0 0 0.3838384 Private Masters Widowed Adm-clerical Unmarried White Female United-States 0 +21 0.233333334 0.0555645749 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +23 0.25555557 0.130052775 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +79 0.8777778 0.115996107 0.25 0.0296402965 0 0.3030303 Private 7th-8th Widowed Priv-house-serv Not-in-family White Female United-States 0 +55 0.6111111 0.140398934 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.157793641 0.5625 0 0 0.353535354 ? HS-grad Married-spouse-absent ? Not-in-family White Male United-States 0 +60 0.6666667 0.110277131 0.5625 0.02597026 0 0.4040404 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 +37 0.411111116 0.2923793 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Not-in-family Black Male United-States 0 +47 0.5222222 0.129354313 0.5625 0 0.365013778 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +20 0.222222224 0.120312117 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 +53 0.5888889 0.0652163252 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male Canada 0 +34 0.377777785 0.104173556 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +43 0.477777779 0.107931204 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Unmarried Black Female United-States 0 +24 0.266666681 0.111830972 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +23 0.25555557 0.125825 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Own-child Amer-Indian-Eskimo Male United-States 0 +29 0.322222233 0.109322727 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Not-in-family Other Male United-States 0 +58 0.644444466 0.12385828 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +55 0.6111111 0.182007879 0.75 0.07688077 0 0.4040404 ? Assoc-acdm Married-civ-spouse ? Husband Black Male United-States 1 +40 0.444444448 0.07532069 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Own-child White Female United-States 0 +43 0.477777779 0.118319131 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +25 0.2777778 0.07011292 0.875 0 0 0.4040404 State-gov Masters Never-married Exec-managerial Not-in-family White Male United-States 0 +23 0.25555557 0.07921978 0.8125 0 0 0.24242425 Local-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +34 0.377777785 0.136357054 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.07379917 0.625 0 0 0.353535354 Private Some-college Separated Sales Unmarried White Female United-States 0 +60 0.6666667 0.0680916458 1 0 0 0.656565666 Private Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 +39 0.433333337 0.159217492 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +21 0.233333334 0.09225739 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +45 0.5 0.112832516 0.5625 0 0.500229537 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.162307665 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +26 0.2888889 0.167448759 0.8125 0 0 0.7070707 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +39 0.433333337 0.1017192 0.625 0.00114001136 0 0.454545468 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +29 0.322222233 0.1592478 0.75 0.0861408561 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 1 +29 0.322222233 0.103163257 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Black Female United-States 0 +52 0.5777778 0.04158065 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 +34 0.377777785 0.163780019 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 +24 0.266666681 0.261927456 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +77 0.8555556 0.0572362877 1 0.200512 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Farming-fishing Husband White Male United-States 1 +34 0.377777785 0.05873827 0.875 0 0 0.6060606 Self-emp-not-inc Masters Married-civ-spouse Farming-fishing Husband White Male United-States 0 +53 0.5888889 0.11351683 0.3125 0 0 0.7070707 Self-emp-not-inc 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +31 0.344444454 0.120571427 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family Black Male United-States 0 +58 0.644444466 0.132445842 0.5625 0 0 0.151515156 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +50 0.5555556 0.0464051776 0.875 0.07688077 0 0.5555556 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.1053839 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.0241691116 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.123064183 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +77 0.8555556 0.231982112 0.3125 0 0 0.1010101 Private 9th Married-civ-spouse Priv-house-serv Wife Black Female United-States 0 +37 0.411111116 0.11940217 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +51 0.566666663 0.0476640165 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 +33 0.366666675 0.350290477 0.75 0 0 0.6060606 Self-emp-not-inc Assoc-acdm Divorced Sales Unmarried Black Male United-States 0 +53 0.5888889 0.216723189 0.5625 0 0 0.353535354 Local-gov HS-grad Married-spouse-absent Transport-moving Other-relative White Female United-States 0 +32 0.355555564 0.10669864 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +30 0.333333343 0.210592 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.140537009 0.625 0.005940059 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +33 0.366666675 0.0212035384 0.8125 0 0 0.24242425 Private Bachelors Married-spouse-absent Other-service Unmarried White Female United-States 0 +31 0.344444454 0.174803078 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.125438392 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +19 0.211111113 0.109755136 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child White Female United-States 0 +27 0.3 0.167922243 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.207608253 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +24 0.266666681 0.06941716 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.125174358 0.5625 0 0 0.545454562 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +31 0.344444454 0.113504708 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +60 0.6666667 0.133474335 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +21 0.233333334 0.238180652 0.375 0 0 0.3838384 Private 10th Separated Sales Unmarried Black Female United-States 0 +38 0.422222227 0.184066877 0.4375 0 0 0.323232323 ? 11th Never-married ? Not-in-family White Female United-States 0 +31 0.344444454 0.183247849 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Transport-moving Not-in-family White Male United-States 0 +26 0.2888889 0.0150386784 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +46 0.51111114 0.208264947 0.5625 0 0 0.25252524 Private HS-grad Divorced Priv-house-serv Not-in-family White Female United-States 0 +25 0.2777778 0.1002812 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.218654215 0.625 0 0 0.3030303 Local-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +53 0.5888889 0.03713802 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.142928064 0.875 0 0.4331956 0.4848485 ? Masters Married-civ-spouse ? Wife White Female United-States 1 +29 0.322222233 0.0801533 0.5625 0 0.500229537 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +45 0.5 0.1697839 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +70 0.7777778 0.212747991 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Male United-States 0 +55 0.6111111 0.2642444 0.8125 1 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.117385611 1 0 0.4331956 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.08542573 0.375 0 0 0.3030303 Private 10th Never-married Other-service Own-child White Male United-States 0 +18 0.2 0.0849131644 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +34 0.377777785 0.178962156 0.875 0 0 0.6060606 Private Masters Never-married Sales Unmarried White Male United-States 1 +41 0.455555558 0.190586016 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.2212682 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +23 0.25555557 0.190946355 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Protective-serv Own-child White Male United-States 0 +32 0.355555564 0.193085492 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Other-relative White Male United-States 0 +56 0.622222245 0.0919185951 0.25 0 0 0.4848485 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +36 0.4 0.08949859 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Unmarried White Male United-States 0 +26 0.2888889 0.212027311 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +62 0.6888889 0.0969505757 0.8125 0 0 0.07070707 Private Bachelors Widowed Tech-support Unmarried White Female United-States 0 +35 0.3888889 0.09050081 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +25 0.2777778 0.247049749 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.131725162 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +21 0.233333334 0.0226415358 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +31 0.344444454 0.110587627 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +23 0.25555557 0.256132364 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Other-service Own-child White Male Columbia 0 +58 0.644444466 0.128485456 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.141129047 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +54 0.6 0.1050734 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.0375151969 0.5625 0.03908039 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +28 0.311111122 0.123358518 0.4375 0.07688077 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +40 0.444444448 0.133891925 0.4375 0 0 0.3030303 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.183443174 0.8125 0.07298073 0 0.8080808 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.15927811 0.9375 0 0 0.1010101 Private Prof-school Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male India 0 +55 0.6111111 0.09649459 0.5625 0 0 0.25252524 Private HS-grad Divorced Adm-clerical Unmarried White Male United-States 0 +53 0.5888889 0.1295786 0.5625 0 0 0.454545468 Private HS-grad Separated Transport-moving Unmarried White Male United-States 0 +23 0.25555557 0.0670456439 0.5 0 0 0.464646459 Private 12th Never-married Transport-moving Not-in-family White Male United-States 0 +66 0.733333349 0.114120319 0.5625 0 0 0.161616161 Private HS-grad Widowed Craft-repair Not-in-family White Male United-States 0 +34 0.377777785 0.0232854337 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.08033381 0.375 0 0 0.4040404 Private 10th Divorced Transport-moving Not-in-family White Male United-States 0 +21 0.233333334 0.142520577 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +26 0.2888889 0.104253039 0.625 0 0 0.353535354 Private Some-college Married-spouse-absent Adm-clerical Own-child Other Female United-States 0 +21 0.233333334 0.143490463 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female Cuba 0 +59 0.655555546 0.154871851 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +61 0.677777767 0.118091471 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.15251717 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.03136044 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.108648524 0.5625 0 0 0.3030303 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +50 0.5555556 0.06615119 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +67 0.7444445 0.07972156 0.8125 0 0.5064279 0.05050505 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +59 0.655555546 0.122072734 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.239938572 0.75 0 0 0.8080808 Private Assoc-acdm Never-married Other-service Not-in-family White Female United-States 1 +56 0.622222245 0.0265237875 0.625 0.2782828 0 0.2020202 Self-emp-not-inc Some-college Married-spouse-absent Farming-fishing Not-in-family White Female United-States 1 +28 0.311111122 0.212356672 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative Black Male ? 0 +34 0.377777785 0.181667745 0.5625 0.0297702979 0 0.5050505 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +63 0.7 0.0229661781 0.375 0 0 0.565656543 Private 10th Widowed Farming-fishing Unmarried White Female United-States 0 +48 0.533333361 0.0342694335 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Germany 0 +41 0.455555558 0.240407363 0.625 0 0 0.444444448 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.186103642 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child Black Female United-States 0 +47 0.5222222 0.118491553 0.375 0 0.500229537 0.5252525 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.110868491 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +30 0.333333343 0.1511829 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +19 0.211111113 0.06254643 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Male United-States 0 +27 0.3 0.120943218 0.8125 0 0 0.373737365 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +59 0.655555546 0.020971844 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +19 0.211111113 0.134366766 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +45 0.5 0.118045 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband Asian-Pac-Islander Male India 0 +37 0.411111116 0.14857161 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +44 0.4888889 0.156120583 1 0 0 0.3838384 Local-gov Doctorate Married-spouse-absent Prof-specialty Unmarried White Female United-States 0 +34 0.377777785 0.128875434 0.8125 0 0 0.3838384 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male United-States 0 +30 0.333333343 0.1255603 0.8125 0 0 0.353535354 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +30 0.333333343 0.2210823 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Hong 1 +56 0.622222245 0.188145131 0.4375 0 0 0.4040404 Private 11th Separated Other-service Not-in-family Black Female United-States 0 +19 0.211111113 0.11751695 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +37 0.411111116 0.102223 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.09809087 0.875 0 0.453856736 0.434343427 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.08104371 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +34 0.377777785 0.165985167 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.09707855 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Other-relative White Male United-States 0 +44 0.4888889 0.09801409 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.2101798 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +32 0.355555564 0.158851087 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Other-relative White Female United-States 0 +37 0.411111116 0.126454756 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.2670443 0.8125 0 0 0.4848485 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +49 0.544444442 0.1762559 0.5625 0.0501305 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.0265891217 0.625 0 0 0.3030303 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.0963545 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.146067411 0.1875 0 0 0.4848485 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +44 0.4888889 0.155311659 0.8125 0 0 0.353535354 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +30 0.333333343 0.0271690339 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.07776427 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +36 0.4 0.252563983 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +29 0.322222233 0.192239538 0.5 0 0 0.4040404 Private 12th Never-married Tech-support Not-in-family White Male United-States 0 +19 0.211111113 0.259917647 0.625 0 0 0.222222224 ? Some-college Never-married ? Own-child White Male United-States 0 +45 0.5 0.126342267 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 +38 0.422222227 0.201411054 0.8125 0 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.04629135 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Asian-Pac-Islander Male United-States 0 +27 0.3 0.224953786 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Own-child White Female United-States 0 +20 0.222222224 0.07932013 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +43 0.477777779 0.124184944 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +21 0.233333334 0.156658053 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +33 0.366666675 0.09688861 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +36 0.4 0.06036351 0.5625 0 0 0.8080808 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.13638939 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Other-service Husband White Male Dominican-Republic 0 +72 0.8 0.181087151 0.25 0 0 1 Private 7th-8th Widowed Other-service Not-in-family White Female ? 0 +54 0.6 0.231185317 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.310100675 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +63 0.7 0.138240263 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +36 0.4 0.155134529 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.133272946 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +72 0.8 0.135633 0.75 0 0 0.4040404 ? Assoc-acdm Widowed ? Not-in-family White Female United-States 0 +55 0.6111111 0.130861014 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.129193351 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.06409893 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +20 0.222222224 0.09286424 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +47 0.5222222 0.260075927 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +71 0.788888931 0.0730044 0.625 0.0343203433 0 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +41 0.455555558 0.102733545 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +35 0.3888889 0.1447365 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Other Male Dominican-Republic 0 +18 0.2 0.0900205746 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.09937867 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +57 0.6333333 0.0492023677 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +56 0.622222245 0.0405238755 0.125 0 0 0.656565666 Self-emp-not-inc 1st-4th Never-married Exec-managerial Not-in-family Amer-Indian-Eskimo Male United-States 0 +25 0.2777778 0.30641374 0.625 0 0 0.353535354 Self-emp-inc Some-college Never-married Sales Own-child White Female United-States 0 +64 0.7111111 0.227893755 0.6875 0 0 0.151515156 ? Assoc-voc Married-civ-spouse ? Wife White Female United-States 0 +35 0.3888889 0.125022143 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +61 0.677777767 0.06836375 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +36 0.4 0.0245146342 0.8125 0 0 0.5555556 State-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +18 0.2 0.186259225 0.5 0 0 0.151515156 Private 12th Never-married Sales Own-child Black Female United-States 0 +21 0.233333334 0.197997585 0.625 0 0 0.2020202 Private Some-college Married-spouse-absent Sales Own-child Black Female United-States 0 +43 0.477777779 0.0239259657 0.75 0 0 0.353535354 ? Assoc-acdm Divorced ? Not-in-family White Female United-States 0 +32 0.355555564 0.125946239 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +52 0.5777778 0.156348914 0.5 0 0 0.454545468 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +48 0.533333361 0.1191597 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.07135155 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +35 0.3888889 0.0712740943 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.0232409816 0.625 0 0 0.25252524 ? Some-college Separated ? Unmarried White Female United-States 0 +42 0.466666669 0.119938977 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +60 0.6666667 0.07877727 0.25 0 0 0.2020202 ? 7th-8th Widowed ? Unmarried White Female United-States 0 +34 0.377777785 0.129271477 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +27 0.3 0.0881030262 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 +47 0.5222222 0.06337959 0.8125 0 0 0.656565666 Self-emp-not-inc Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 +65 0.722222269 0.0975426137 0.3125 0 0 0.454545468 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +61 0.677777767 0.0688291639 0.875 0 0 1 Self-emp-inc Masters Widowed Exec-managerial Unmarried White Female United-States 0 +18 0.2 0.0612471849 0.625 0 0 0.282828271 Private Some-college Never-married Sales Own-child White Male United-States 0 +49 0.544444442 0.199967 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male Puerto-Rico 0 +48 0.533333361 0.116685137 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.174289167 0.625 0.0217402168 0 0.75757575 Private Some-college Never-married Transport-moving Not-in-family Black Male United-States 0 +30 0.333333343 0.127809227 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +68 0.75555557 0.04664159 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +23 0.25555557 0.08962117 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +65 0.722222269 0.11800459 0.5625 0 0 0.24242425 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.018219782 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +44 0.4888889 0.0406909138 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.21375291 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +24 0.266666681 0.1739726 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 +58 0.644444466 0.117221944 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 +32 0.355555564 0.119596824 0.625 0 0 0.5050505 Local-gov Some-college Married-spouse-absent Prof-specialty Not-in-family White Male Germany 0 +54 0.6 0.10927289 0.875 0 0 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 1 +35 0.3888889 0.0589719862 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +35 0.3888889 0.09720585 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 +24 0.266666681 0.127981663 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +50 0.5555556 0.12337333 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.101920582 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Separated Craft-repair Not-in-family White Male United-States 0 +57 0.6333333 0.0319201462 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.07215238 0.625 0 0 0.6060606 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +49 0.544444442 0.178685337 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +25 0.2777778 0.127445519 0.8125 0 0 0.161616161 Private Bachelors Never-married Tech-support Own-child White Female United-States 0 +56 0.622222245 0.09967569 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Transport-moving Not-in-family White Male United-States 0 +32 0.355555564 0.1250969 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Unmarried White Female United-States 0 +22 0.244444445 0.103398323 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +23 0.25555557 0.129258 0.625 0 0 0.4040404 ? Some-college Never-married ? Other-relative White Male United-States 0 +33 0.366666675 0.145581111 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.1366413 0.625 0 0 0.121212125 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +62 0.6888889 0.0266921725 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.0769796 0.3125 0 0 0.4040404 ? 9th Never-married ? Own-child White Male United-States 0 +26 0.2888889 0.139233723 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Protective-serv Own-child White Male United-States 0 +46 0.51111114 0.241519362 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Male United-States 1 +33 0.366666675 0.2541131 0.8125 0 0 0.5050505 Private Bachelors Separated Sales Not-in-family White Female United-States 1 +65 0.722222269 0.0512175821 0.5625 0 0 0.01010101 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +65 0.722222269 0.116487116 0.5625 0.02414024 0 0.2020202 Without-pay HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +46 0.51111114 0.07420397 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.1507781 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 +43 0.477777779 0.11009258 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.1238576 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.03167094 0.5625 0 0 0.4848485 Private HS-grad Widowed Handlers-cleaners Other-relative White Female United-States 0 +55 0.6111111 0.0979325846 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.260707676 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +56 0.622222245 0.07096561 0.8125 0.04508045 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +59 0.655555546 0.131653771 0.875 0 0 0.4040404 Federal-gov Masters Never-married Exec-managerial Not-in-family White Male United-States 0 +56 0.622222245 0.114647023 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.105614923 0.5625 0 0 0.1010101 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +26 0.2888889 0.171881288 0.4375 0.03411034 0 0.4040404 Private 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.184305981 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +27 0.3 0.1287643 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +48 0.533333361 0.124460414 0.25 0 0 0.5050505 Self-emp-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 1 +37 0.411111116 0.161250219 0.875 0 0 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +63 0.7 0.272476345 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.01598971 0.5625 0 0 0.3838384 State-gov HS-grad Never-married Transport-moving Not-in-family Amer-Indian-Eskimo Male United-States 1 +20 0.222222224 0.2573932 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Male United-States 0 +26 0.2888889 0.110788338 0.875 0 0.4331956 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.153851435 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child Black Male United-States 0 +51 0.566666663 0.11351683 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.127654985 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.06022678 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Not-in-family Amer-Indian-Eskimo Female Columbia 0 +35 0.3888889 0.151216581 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +21 0.233333334 0.211924255 0.625 0 0 0.434343427 ? Some-college Never-married ? Not-in-family White Female United-States 0 +65 0.722222269 0.0577805042 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.188509509 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Transport-moving Husband Black Male United-States 0 +39 0.433333337 0.130858988 0.25 0 0.3677686 0.353535354 Private 7th-8th Never-married Other-service Own-child White Male United-States 0 +24 0.266666681 0.0949953049 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +36 0.4 0.14972268 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family Asian-Pac-Islander Female United-States 0 +70 0.7777778 0.276809216 0.625 0 0 0.1010101 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +52 0.5777778 0.026129771 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 +64 0.7111111 0.123242669 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +43 0.477777779 0.150384754 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.04517059 0.6875 0.005940059 0 0.25252524 Private Assoc-voc Never-married Priv-house-serv Not-in-family White Male United-States 0 +47 0.5222222 0.108201295 0.5625 0 0 0.4040404 Federal-gov HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +32 0.355555564 0.0308451857 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +20 0.222222224 0.0744909 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 +33 0.366666675 0.11245399 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +52 0.5777778 0.214840665 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female Cuba 0 +49 0.544444442 0.205870524 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.0814013556 0.5625 0 0 0.181818187 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +62 0.6888889 0.106898 0.5625 0 0 0.0606060624 Self-emp-not-inc HS-grad Never-married Other-service Unmarried White Female United-States 0 +44 0.4888889 0.205111459 0.625 0 0 0.5555556 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.220604777 0.5625 0.03908039 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +68 0.75555557 0.157576084 0.875 0 0 0.4040404 Local-gov Masters Widowed Prof-specialty Unmarried Black Female United-States 1 +40 0.444444448 0.0181046072 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +46 0.51111114 0.04765526 0.25 0 0 0.5050505 Private 7th-8th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +22 0.244444445 0.124378249 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +37 0.411111116 0.1652665 0.8125 0 0 0.151515156 Self-emp-not-inc Bachelors Divorced Tech-support Not-in-family White Male United-States 0 +62 0.6888889 0.170180619 0.875 0 0 0.7070707 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +37 0.411111116 0.0582950823 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.162994 0.5625 0.04787048 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 1 +44 0.4888889 0.07200084 0.5625 0 0 0.686868668 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +41 0.455555558 0.13755931 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.08605885 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Male United-States 0 +26 0.2888889 0.07894969 0.8125 0 0 0.454545468 Private Bachelors Divorced Other-service Not-in-family White Female United-States 0 +48 0.533333361 0.145071924 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 +21 0.233333334 0.133393511 0.5625 0 0 0.282828271 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +39 0.433333337 0.116842069 0.9375 0.07688077 0 0.4040404 Private Prof-school Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.146392047 0.6875 0.143441439 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 1 +44 0.4888889 0.253934622 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +56 0.622222245 0.06728205 0.375 0 0 0.3030303 Private 10th Married-civ-spouse Sales Wife Asian-Pac-Islander Female Japan 1 +25 0.2777778 0.115030259 0.3125 0 0 0.4040404 Private 9th Never-married Transport-moving Other-relative White Male United-States 0 +32 0.355555564 0.168777645 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.133877769 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 1 +26 0.2888889 0.20644708 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +31 0.344444454 0.120308749 0.8125 0.14084141 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 1 +23 0.25555557 0.07362203 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Own-child White Male United-States 0 +41 0.455555558 0.07205607 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Prof-specialty Unmarried White Female United-States 1 +55 0.6111111 0.267311 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +23 0.25555557 0.231883109 0.625 0 0 0.25252524 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +45 0.5 0.13716732 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +42 0.466666669 0.15349178 0.8125 0 0.3409091 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.0726151 0.625 0 0 0.151515156 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +48 0.533333361 0.124700196 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.0963612348 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 +52 0.5777778 0.07729347 0.8125 0.1502415 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +46 0.51111114 0.179387152 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Unmarried White Male United-States 0 +34 0.377777785 0.216734648 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +27 0.3 0.0143503258 0.75 0 0 0.4040404 State-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Female Germany 0 +18 0.2 0.183157608 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +18 0.2 0.10032431 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Female United-States 0 +42 0.466666669 0.1324344 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +64 0.7111111 0.0727969557 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +36 0.4 0.134329051 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.204805672 0.4375 0 0 0.2020202 ? 11th Never-married ? Own-child Black Female United-States 0 +52 0.5777778 0.0548499562 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Sales Husband White Male United-States 1 +44 0.4888889 0.237738147 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +53 0.5888889 0.2526657 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.139099017 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.222580254 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Other-relative Asian-Pac-Islander Male United-States 0 +52 0.5777778 0.140298575 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +60 0.6666667 0.09111911 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +41 0.455555558 0.11558862 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +64 0.7111111 0.100826763 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.04805736 0.125 0 0 0.25252524 Private 1st-4th Never-married Other-service Other-relative White Male El-Salvador 0 +63 0.7 0.05707329 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male South 0 +54 0.6 0.2526657 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.139491 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +27 0.3 0.134244859 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male Poland 0 +63 0.7 0.195150554 0.875 0.413104117 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Farming-fishing Husband White Male United-States 0 +37 0.411111116 0.162212029 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +22 0.244444445 0.190946355 0.5625 0 0 0.353535354 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +54 0.6 0.06585685 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.0146143511 0.375 0 0 0.4040404 Private 10th Divorced Other-service Unmarried White Female United-States 0 +60 0.6666667 0.156676248 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +19 0.211111113 0.118420832 0.4375 0 0 0.25252524 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +25 0.2777778 0.0431035124 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +51 0.566666663 0.123246707 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +47 0.5222222 0.256028652 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +44 0.4888889 0.0750876442 0.375 0 0 0.5050505 Self-emp-not-inc 10th Never-married Craft-repair Own-child White Male United-States 0 +18 0.2 0.0208849572 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 +57 0.6333333 0.06489235 0.5625 0 0 0.575757563 Private HS-grad Widowed Prof-specialty Not-in-family White Female United-States 0 +22 0.244444445 0.213866055 0.625 0 0 0.343434334 Private Some-college Never-married Sales Own-child White Male United-States 0 +36 0.4 0.150211662 0.625 0 0 0.2020202 State-gov Some-college Divorced Other-service Unmarried Black Female United-States 0 +33 0.366666675 0.117193654 0.5625 0 0.3409091 0.3838384 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +39 0.433333337 0.07750765 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +49 0.544444442 0.0902327448 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband Other Male United-States 1 +41 0.455555558 0.11709936 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 +35 0.3888889 0.130154476 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +40 0.444444448 0.03411048 0.75 0.01506015 0 0.4040404 Self-emp-inc Assoc-acdm Divorced Sales Unmarried White Female United-States 0 +30 0.333333343 0.120455578 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +25 0.2777778 0.119227052 0.5625 0 0.3452709 0.373737365 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +25 0.2777778 0.170584053 0.625 0 0.43663913 0.363636374 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +37 0.411111116 0.136072159 0.875 0.07688077 0 0.5050505 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 +53 0.5888889 0.216787174 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 +34 0.377777785 0.2166821 0.75 0 0 0.25252524 Self-emp-not-inc Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 +22 0.244444445 0.112056606 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Male ? 0 +18 0.2 0.14182885 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 +52 0.5777778 0.06261715 0.875 0.1502415 0 0.4040404 ? Masters Married-civ-spouse ? Wife White Female United-States 1 +45 0.5 0.319670916 0.5625 0.0545505434 0 0.4040404 Private HS-grad Divorced Sales Unmarried Black Male United-States 0 +19 0.211111113 0.17807579 0.625 0 0.459366381 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +33 0.366666675 0.0976281539 0.8125 0 0 0.656565666 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +45 0.5 0.06115895 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +43 0.477777779 0.08533749 0.8125 0 0 0.353535354 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.120170005 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.132804841 0.8125 0 0 0.75757575 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +25 0.2777778 0.122736171 0.5625 0 0.3624885 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.0792117 0.8125 0 0 0.323232323 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +52 0.5777778 0.235401645 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Unmarried White Male United-States 0 +45 0.5 0.0548843034 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male Puerto-Rico 1 +32 0.355555564 0.11422 1 0 0 0.7070707 State-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 +26 0.2888889 0.326743037 0.8125 0 0 0.2020202 Private Bachelors Never-married Transport-moving Own-child White Male United-States 0 +24 0.266666681 0.0239798483 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family Black Male United-States 0 +37 0.411111116 0.118131213 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried Black Female United-States 0 +49 0.544444442 0.12459445 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +43 0.477777779 0.117461048 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +35 0.3888889 0.126429826 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +37 0.411111116 0.12788938 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.1509209 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 +48 0.533333361 0.107580967 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +40 0.444444448 0.0441468172 0.875 0 0 0.5555556 ? Masters Divorced ? Own-child White Female United-States 0 +26 0.2888889 0.307547957 0.625 0.02597026 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +35 0.3888889 0.136321366 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 1 +21 0.233333334 0.139206782 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 +54 0.6 0.14953813 0.375 0 0 0.7070707 Private 10th Divorced Other-service Not-in-family White Male United-States 0 +40 0.444444448 0.0924789757 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family Black Female United-States 0 +51 0.566666663 0.09540279 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Not-in-family Black Female United-States 0 +60 0.6666667 0.146887764 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 +22 0.244444445 0.03542522 0.625 0 0 0.08080808 Private Some-college Never-married Sales Own-child White Male United-States 0 +20 0.222222224 0.133357808 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +21 0.233333334 0.128944144 0.4375 0 0 0.4040404 Private 11th Never-married Farming-fishing Unmarried White Male United-States 0 +21 0.233333334 0.02745798 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +43 0.477777779 0.11623656 0.625 0 0 0.444444448 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.162994 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +65 0.722222269 0.14542149 0.5625 0 0.499081731 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +48 0.533333361 0.142870128 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +37 0.411111116 0.07350484 0.875 0.2782828 0 0.6060606 Private Masters Separated Exec-managerial Not-in-family White Male Iran 1 +20 0.222222224 0.1511573 0.5 0 0 0.4040404 Private 12th Never-married Machine-op-inspct Own-child White Male United-States 0 +41 0.455555558 0.144799814 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +55 0.6111111 0.09907558 0.3125 0 0 0.5050505 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.10091769 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +41 0.455555558 0.170922846 0.625 0.07298073 0 0.4040404 Federal-gov Some-college Married-civ-spouse Transport-moving Wife White Female United-States 1 +80 0.8888889 0.170044556 0.6875 0 0 0.24242425 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.08938947 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +52 0.5777778 0.09358358 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.188973576 0.8125 0.03103031 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.09724491 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-spouse-absent Prof-specialty Not-in-family Black Male United-States 0 +69 0.7666667 0.444843262 0.5625 0 0 0.2020202 Local-gov HS-grad Widowed Adm-clerical Not-in-family Black Female United-States 0 +49 0.544444442 0.11935772 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.132971868 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.0213624928 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.199938044 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.1304771 0.5625 0 0 0.4040404 Local-gov HS-grad Married-spouse-absent Handlers-cleaners Unmarried White Male United-States 0 +42 0.466666669 0.0718647838 0.625 0 0 0.323232323 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +66 0.733333349 0.144452274 0.5625 0 0 0.13131313 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.125141367 0.6875 0 0 0.4848485 Private Assoc-voc Separated Craft-repair Other-relative White Male United-States 1 +26 0.2888889 0.224359721 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +43 0.477777779 0.02371515 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.0948639661 0.375 0 0.0355831049 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family White Female United-States 0 +25 0.2777778 0.2258873 0.8125 0 0 0.3030303 ? Bachelors Never-married ? Own-child White Female United-States 0 +17 0.188888893 0.114807323 0.4375 0 0 0.08080808 Private 11th Never-married Sales Own-child White Female United-States 0 +52 0.5777778 0.200858086 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.06320044 0.5625 0 0 0.08080808 ? HS-grad Separated ? Own-child White Female United-States 0 +24 0.266666681 0.27238813 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +41 0.455555558 0.139365062 0.8125 0 0 0.3030303 ? Bachelors Married-spouse-absent ? Not-in-family White Male United-States 0 +65 0.722222269 0.0964333 0.625 0 0 0.454545468 Private Some-college Widowed Sales Other-relative White Female United-States 0 +36 0.4 0.2756029 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.192462474 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +43 0.477777779 0.158655092 0.625 0 0 0.454545468 Private Some-college Married-spouse-absent Sales Not-in-family White Male Mexico 0 +39 0.433333337 0.114758156 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female England 1 +48 0.533333361 0.131633565 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 1 +50 0.5555556 0.128732651 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 +21 0.233333334 0.155694231 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Male United-States 0 +36 0.4 0.031864915 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +33 0.366666675 0.144564077 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Other-service Husband Black Male Haiti 0 +50 0.5555556 0.0438875072 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +49 0.544444442 0.285054624 0.875 1 0 0.8080808 State-gov Masters Married-civ-spouse Sales Husband White Male United-States 1 +34 0.377777785 0.177346349 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Unmarried Black Male ? 0 +70 0.7777778 0.18380487 1 0 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.1568352 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +44 0.4888889 0.297725827 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +32 0.355555564 0.08612822 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 +40 0.444444448 0.1910979 0.3125 0 0 0.4949495 Private 9th Never-married Craft-repair Other-relative Black Male United-States 0 +46 0.51111114 0.272048 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 +21 0.233333334 0.154003 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 +40 0.444444448 0.119233787 0.8125 0.07688077 0 0.5252525 Private Bachelors Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Japan 1 +47 0.5222222 0.168339849 0.4375 0 0 0.08080808 Private 11th Divorced Craft-repair Own-child White Male United-States 0 +19 0.211111113 0.3590929 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +22 0.244444445 0.09285481 0.625 0 0 0.161616161 Private Some-college Never-married Adm-clerical Other-relative White Female United-States 0 +20 0.222222224 0.168075815 0.625 0 0 0.161616161 Private Some-college Never-married Protective-serv Own-child White Female United-States 0 +46 0.51111114 0.155572325 0.8125 0.04787048 0 0.25252524 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 +41 0.455555558 0.09235909 0.8125 0 0.453856736 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.0992379 0.375 0 0 0.151515156 Private 10th Never-married Prof-specialty Own-child Other Female United-States 0 +41 0.455555558 0.172860608 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +28 0.311111122 0.0752311051 0.5625 0 0.453168035 0.4040404 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 +20 0.222222224 0.101086751 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Male United-States 0 +24 0.266666681 0.192265138 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +33 0.366666675 0.2046649 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +44 0.4888889 0.0765114948 0.625 0 0 0.5555556 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.102125339 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Prof-specialty Own-child Black Female United-States 0 +47 0.5222222 0.017609559 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.118669368 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +58 0.644444466 0.334917039 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +41 0.455555558 0.0276755318 0.5625 0 0.459595948 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.190247223 0.25 0 0 0.353535354 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 1 +21 0.233333334 0.151909634 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +33 0.366666675 0.137056187 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +23 0.25555557 0.199779078 0.625 0 0 0.323232323 ? Some-college Never-married ? Own-child White Female United-States 0 +40 0.444444448 0.06693114 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Unmarried White Female United-States 0 +47 0.5222222 0.0738901 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +41 0.455555558 0.0976268053 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried Black Female United-States 0 +38 0.422222227 0.4161756 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +50 0.5555556 0.0258031059 0.25 0 0 0.4040404 Private 7th-8th Divorced Other-service Other-relative White Female United-States 0 +45 0.5 0.167705372 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Farming-fishing Other-relative Black Male United-States 0 +65 0.722222269 0.100444868 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male Italy 1 +33 0.366666675 0.04668335 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +34 0.377777785 0.09683136 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 +65 0.722222269 0.143784121 0.875 0 0 0.282828271 Private Masters Divorced Sales Not-in-family White Male United-States 0 +24 0.266666681 0.1856874 0.4375 0 0 0.3939394 Private 11th Never-married Transport-moving Own-child White Male United-States 0 +26 0.2888889 0.03998572 0.8125 0 0 0.4040404 Private Bachelors Never-married Machine-op-inspct Other-relative White Male United-States 0 +55 0.6111111 0.0239448249 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +66 0.733333349 0.1594822 0.8125 0 0 0.08080808 Private Bachelors Divorced Prof-specialty Unmarried White Female Cuba 0 +43 0.477777779 0.130500674 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.212359369 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Other-relative Black Female United-States 0 +22 0.244444445 0.195664465 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.172586471 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +69 0.7666667 0.134431422 0.9375 0 0 0.25252524 ? Prof-school Married-civ-spouse ? Wife White Female ? 0 +27 0.3 0.120366678 0.875 0 0 0.4040404 Private Masters Never-married Machine-op-inspct Not-in-family White Female United-States 0 +48 0.533333361 0.302655429 0.5625 0.04386044 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +24 0.266666681 0.126582056 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 +18 0.2 0.10583315 0.4375 0 0 0.1010101 Never-worked 11th Never-married ? Own-child White Female United-States 0 +53 0.5888889 0.127144456 0.5625 0 0 0.3030303 Local-gov HS-grad Widowed Other-service Not-in-family White Female United-States 0 +26 0.2888889 0.106160484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Poland 0 +60 0.6666667 0.06472599 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +21 0.233333334 0.08238809 0.625 0 0 0.6060606 Private Some-college Never-married Other-service Own-child White Female United-States 0 +39 0.433333337 0.2756029 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 +45 0.5 0.118491553 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +76 0.844444454 0.1595455 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.145919219 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +34 0.377777785 0.202519029 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband Black Male Jamaica 1 +54 0.6 0.220763728 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.13115266 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.0210486259 0.25 0 0 0.4040404 Local-gov 7th-8th Divorced Handlers-cleaners Not-in-family White Male United-States 0 +27 0.3 0.143130124 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +23 0.25555557 0.0155162141 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 +37 0.411111116 0.0195688717 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +41 0.455555558 0.0624588728 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.124387 0.625 0 0 0.353535354 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +37 0.411111116 0.02190873 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male England 1 +63 0.7 0.08483436 0.5625 0.0217402168 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +35 0.3888889 0.0496495962 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.14091149 0.3125 0 0 0.565656543 Private 9th Married-civ-spouse Machine-op-inspct Husband Black Male ? 0 +41 0.455555558 0.193329319 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 +50 0.5555556 0.0435554534 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Prof-specialty Not-in-family Asian-Pac-Islander Female Vietnam 0 +26 0.2888889 0.246959507 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Sales Own-child White Male United-States 0 +36 0.4 0.07633638 0.625 0 0 0.424242437 Local-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +47 0.5222222 0.260973066 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male Scotland 1 +51 0.566666663 0.2588043 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Unmarried Black Female United-States 0 +41 0.455555558 0.22408694 0.5625 0 0.143480256 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family Other Female United-States 0 +40 0.444444448 0.133947819 0.9375 0.1502415 0 0.3030303 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 +32 0.355555564 0.214055315 0.8125 0.0406404063 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.108378433 0.8125 0.07298073 0 0.4040404 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +40 0.444444448 0.123006932 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +56 0.622222245 0.180272847 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.2762744 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.2461169 0.3125 0 0 0.424242437 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.138301551 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.06802631 0.4375 0 0 0.3030303 Self-emp-not-inc 11th Never-married Adm-clerical Own-child White Female United-States 0 +44 0.4888889 0.132997468 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +42 0.466666669 0.134129673 0.9375 0.07430074 0 0.444444448 Self-emp-not-inc Prof-school Divorced Prof-specialty Unmarried White Female United-States 1 +47 0.5222222 0.1293038 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.0337966122 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +61 0.677777767 0.0487921871 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 1 +21 0.233333334 0.1673814 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +26 0.2888889 0.119983435 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 +58 0.644444466 0.238447368 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +35 0.3888889 0.09671214 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Prof-specialty Not-in-family Asian-Pac-Islander Female Philippines 0 +35 0.3888889 0.148111582 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family Black Female United-States 0 +29 0.322222233 0.282697231 0.75 0.0367403664 0 0.4040404 Local-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 +40 0.444444448 0.103976212 0.875 0.07688077 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.08931135 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.01982212 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Machine-op-inspct Unmarried White Male United-States 0 +50 0.5555556 0.020698389 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 +66 0.733333349 0.1419979 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +36 0.4 0.169118449 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +33 0.366666675 0.14752695 0.4375 0 0 0.4040404 Private 11th Never-married Sales Not-in-family White Female United-States 0 +55 0.6111111 0.0240606721 0.875 0 0 0.6060606 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.241722092 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +36 0.4 0.167513415 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 +41 0.455555558 0.0524932556 0.5 0 0 0.4040404 ? 12th Divorced ? Not-in-family White Female Canada 0 +30 0.333333343 0.0202484671 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +29 0.322222233 0.170942381 0.5 0 0 0.424242437 Private 12th Never-married Exec-managerial Not-in-family White Male England 0 +60 0.6666667 0.0279873777 0.625 0 0 0.4040404 ? Some-college Widowed ? Not-in-family Black Female United-States 0 +24 0.266666681 0.0398368724 0.5625 0 0 0.4848485 Private HS-grad Separated Sales Unmarried White Female United-States 0 +42 0.466666669 0.231432512 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Separated Other-service Unmarried Black Female United-States 0 +26 0.2888889 0.145490184 0.5625 0 0 0.4040404 Private HS-grad Separated Exec-managerial Own-child White Female United-States 0 +37 0.411111116 0.110813938 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +27 0.3 0.101675421 0.1875 0 0 0.4848485 Private 5th-6th Never-married Farming-fishing Unmarried White Male Guatemala 0 +26 0.2888889 0.164675817 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.134259671 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Craft-repair Unmarried White Male United-States 0 +60 0.6666667 0.10195224 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.0799492151 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +46 0.51111114 0.147915587 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +21 0.233333334 0.124312915 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +48 0.533333361 0.1662896 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Craft-repair Husband White Male United-States 0 +70 0.7777778 0.163962543 0.3125 0 0 0.454545468 Self-emp-inc 9th Divorced Sales Not-in-family White Male United-States 0 +44 0.4888889 0.04601453 0.875 0 0 0.5555556 Local-gov Masters Never-married Prof-specialty Own-child White Female United-States 0 +58 0.644444466 0.03794087 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +41 0.455555558 0.128369614 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family Black Female Jamaica 0 +54 0.6 0.0945366248 0.25 0 0.8953168 0.4040404 Private 7th-8th Divorced Machine-op-inspct Unmarried White Female United-States 0 +42 0.466666669 0.0158347953 0.875 0 0.5052801 0.6060606 Self-emp-inc Masters Divorced Exec-managerial Unmarried Asian-Pac-Islander Male India 1 +28 0.311111122 0.08253492 0.375 0 0 0.4040404 Private 10th Divorced Handlers-cleaners Not-in-family White Male United-States 0 +65 0.722222269 0.143167838 0.4375 0 0 0.2020202 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +35 0.3888889 0.07577061 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Other-relative White Male Ireland 0 +82 0.9111111 0.0995005742 0.1875 0 0 0.2020202 Private 5th-6th Widowed Other-service Unmarried White Male United-States 0 +48 0.533333361 0.199410662 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +44 0.4888889 0.09977605 1 0.1502415 0 0.4040404 Private Doctorate Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 +68 0.75555557 0.0339131355 0.875 0.06360064 0 0.2020202 Private Masters Never-married Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.206435621 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +24 0.266666681 0.141461775 0.5625 0 0.459366381 0.373737365 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +54 0.6 0.110388264 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +22 0.244444445 0.0767398253 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +43 0.477777779 0.2133892 0.625 0 0 0.8484849 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +17 0.188888893 0.035944514 0.3125 0 0 0.353535354 Private 9th Never-married Other-service Own-child White Female United-States 0 +46 0.51111114 0.0641582 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +59 0.655555546 0.08602922 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +37 0.411111116 0.0449153222 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +70 0.7777778 0.139843941 0.5625 0.0222802218 0 0.24242425 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +57 0.6333333 0.134550631 0.5625 0 0.43663913 0.3030303 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.125819609 0.5625 0 0 0.353535354 ? HS-grad Married-civ-spouse ? Not-in-family White Female United-States 0 +31 0.344444454 0.103924349 0.5625 0 0 0.24242425 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 +23 0.25555557 0.06941716 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +17 0.188888893 0.06279699 0.5 0 0.395087242 0.25252524 Private 12th Never-married Other-service Own-child White Female United-States 0 +63 0.7 0.296764016 0.0625 0 0 0.3030303 Private Preschool Married-civ-spouse Prof-specialty Husband Other Male Mexico 0 +44 0.4888889 0.143391445 0.9375 0 0 0.5555556 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 +30 0.333333343 0.113147058 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.25490585 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +44 0.4888889 0.101763651 0.875 0 0.4331956 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.103443444 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +34 0.377777785 0.07721332 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Other-relative White Male United-States 0 +37 0.411111116 0.232019156 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.12682654 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Unmarried White Female United-States 0 +32 0.355555564 0.0713529 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child Black Female United-States 0 +42 0.466666669 0.146713316 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband Black Male Jamaica 0 +20 0.222222224 0.255623162 0.625 0 0 0.1010101 Private Some-college Never-married Other-service Own-child White Female United-States 0 +34 0.377777785 0.119438544 0.625 0.04386044 0 0.4040404 State-gov Some-college Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +37 0.411111116 0.08615719 0.625 0 0 0.2020202 Private Some-college Never-married Transport-moving Unmarried White Female Puerto-Rico 0 +47 0.5222222 0.0182305574 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.168409213 0.3125 0 0 0.454545468 Private 9th Never-married Farming-fishing Other-relative White Male Mexico 0 +36 0.4 0.0244290959 0.5625 0 0.453856736 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +60 0.6666667 0.20785813 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +64 0.7111111 0.143849447 0.5625 0.0263502635 0 0.1010101 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.158354014 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 +33 0.366666675 0.252511442 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Other-service Husband White Male United-States 0 +71 0.788888931 0.08006708 0.8125 0 0 0.141414136 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +55 0.6111111 0.150680438 0.625 0 0 0.4040404 Local-gov Some-college Divorced Exec-managerial Not-in-family Amer-Indian-Eskimo Female United-States 0 +85 0.9444445 0.111824907 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Widowed Sales Not-in-family White Female United-States 0 +57 0.6333333 0.185857132 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Prof-specialty Husband White Male ? 0 +39 0.433333337 0.133800313 0.9375 0 0.5544077 0.676767647 Private Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +25 0.2777778 0.07346914 0.625 0 0 0.5555556 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +58 0.644444466 0.07027187 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +57 0.6333333 0.131929249 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.2632705 0.6875 0 0 0.363636374 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +19 0.211111113 0.1331901 0.4375 0 0 0.2020202 Private 11th Divorced Sales Unmarried White Female United-States 0 +40 0.444444448 0.297732562 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.029781 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Unmarried Amer-Indian-Eskimo Female United-States 0 +43 0.477777779 0.07714462 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +40 0.444444448 0.170653433 0.5625 0 0 0.353535354 ? HS-grad Married-civ-spouse ? Wife White Female United-States 1 +19 0.211111113 0.185107484 0.5625 0 0 0.151515156 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +24 0.266666681 0.21671848 0.5625 0 0 0.3838384 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +34 0.377777785 0.143615067 0.8125 0 0 0.656565666 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +22 0.244444445 0.113010332 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +64 0.7111111 0.2375637 0.6875 0 0 0.5555556 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +55 0.6111111 0.212855086 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male ? 0 +26 0.2888889 0.143740341 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +80 0.8888889 0.136379287 0.5625 0 0 0.161616161 Private HS-grad Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 +79 0.8777778 0.09850038 1 0 0 0.4040404 Local-gov Doctorate Widowed Prof-specialty Unmarried White Female United-States 0 +58 0.644444466 0.303456932 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.0547199622 0.8125 0 0.430670351 0.4040404 Private Bachelors Divorced Tech-support Not-in-family White Male United-States 0 +43 0.477777779 0.131513 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.0390171781 0.5625 0 0 0.25252524 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +35 0.3888889 0.6422744 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +51 0.566666663 0.06672302 0.6875 0.0501305 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.131196439 0.875 0.04787048 0 0.6060606 Local-gov Masters Divorced Exec-managerial Not-in-family White Female United-States 1 +43 0.477777779 0.104595192 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +68 0.75555557 0.137456268 0.625 0 0 0.454545468 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 0 +34 0.377777785 0.145674065 0.8125 0 0 0.454545468 State-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +37 0.411111116 0.239681289 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Cambodia 1 +22 0.244444445 0.200295687 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Female United-States 0 +32 0.355555564 0.2866711 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +65 0.722222269 0.09808548 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.07782624 0.625 0 0 0.6060606 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +37 0.411111116 0.165340587 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male ? 0 +40 0.444444448 0.09594095 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +40 0.444444448 0.09027113 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Other-relative White Male United-States 0 +52 0.5777778 0.119462118 0.5625 0 0 0.2020202 Private HS-grad Separated Other-service Other-relative White Female United-States 0 +35 0.3888889 0.0257593263 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.145445734 0.1875 0 0 0.3030303 Self-emp-not-inc 5th-6th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +49 0.544444442 0.07798452 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +49 0.544444442 0.114612 0.5625 0 0 0.5555556 Private HS-grad Divorced Machine-op-inspct Other-relative White Female United-States 0 +47 0.5222222 0.239320278 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.07823978 0.5625 0 0 0.4040404 Private HS-grad Separated Exec-managerial Not-in-family White Female United-States 0 +37 0.411111116 0.273215234 0.125 0 0 0.7777778 Private 1st-4th Married-spouse-absent Farming-fishing Other-relative White Male Mexico 0 +36 0.4 0.150489837 0.6875 0 0 0.535353541 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 +36 0.4 0.0280352 0.375 0 0 0.7070707 Private 10th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +44 0.4888889 0.101763651 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.192460462 0.875 0 0.453856736 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.07310678 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +28 0.311111122 0.1430035 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +57 0.6333333 0.116582081 0.5625 0 0 0.323232323 Private HS-grad Widowed Sales Unmarried White Female United-States 0 +46 0.51111114 0.0180379264 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 +59 0.655555546 0.0214062724 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 +28 0.311111122 0.127460346 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Own-child White Male United-States 0 +25 0.2777778 0.1106139 0.5625 0.02597026 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +35 0.3888889 0.161962822 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Unmarried Black Female United-States 0 +27 0.3 0.177553117 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.05017832 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.177477688 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +38 0.422222227 0.03213231 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +26 0.2888889 0.156016186 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +55 0.6111111 0.262327552 0.875 0 0 0.5050505 ? Masters Married-civ-spouse ? Husband White Male United-States 1 +36 0.4 0.07484854 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Own-child White Male United-States 0 +37 0.411111116 0.102584019 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +23 0.25555557 0.1886799 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 +34 0.377777785 0.4107139 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband White Male ? 0 +41 0.455555558 0.124244213 0.4375 0 0 0.5555556 Private 11th Married-civ-spouse Protective-serv Husband White Male United-States 0 +44 0.4888889 0.145760268 0.6875 0 0 0.4040404 Private Assoc-voc Separated Prof-specialty Not-in-family White Female Dominican-Republic 0 +48 0.533333361 0.2183417 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 +35 0.3888889 0.202519029 0.5625 0.07298073 0 0.353535354 Local-gov HS-grad Married-civ-spouse Protective-serv Husband Black Male United-States 1 +43 0.477777779 0.403443784 0.8125 0 0 0.424242437 Local-gov Bachelors Divorced Prof-specialty Unmarried Black Female United-States 0 +57 0.6333333 0.09477371 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.176628351 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 +28 0.311111122 0.207540229 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +55 0.6111111 0.10008049 0.375 0 0 0.4040404 Private 10th Widowed Craft-repair Unmarried Black Female United-States 0 +52 0.5777778 0.131766915 0.5625 0 0.4708448 0.3838384 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +30 0.333333343 0.15383932 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried Black Female United-States 0 +31 0.344444454 0.09186876 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Thailand 1 +21 0.233333334 0.205741882 0.625 0 0 0.7070707 ? Some-college Never-married ? Own-child White Male United-States 0 +50 0.5555556 0.117915682 0.9375 0 0 0.454545468 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.0229048878 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +33 0.366666675 0.0816290155 0.5625 0 0 0.5050505 Private HS-grad Never-married Machine-op-inspct Not-in-family Other Male United-States 0 +23 0.25555557 0.146057978 0.6875 0 0 0.25252524 Federal-gov Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +35 0.3888889 0.0547448844 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male Yugoslavia 1 +18 0.2 0.143419743 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Male United-States 0 +21 0.233333334 0.1434999 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried Other Female United-States 0 +33 0.366666675 0.148467213 0.8125 0 0 0.7070707 Local-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 1 +30 0.333333343 0.0495142154 0.8125 0 0 0.454545468 Federal-gov Bachelors Never-married Exec-managerial Other-relative Asian-Pac-Islander Female United-States 0 +21 0.233333334 0.207024962 0.625 0 0 0.151515156 Private Some-college Never-married Protective-serv Own-child White Male United-States 0 +36 0.4 0.256356657 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Adm-clerical Wife White Female Germany 1 +38 0.422222227 0.08081875 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.129319966 0.875 0.07298073 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male Canada 1 +24 0.266666681 0.220594674 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.148395136 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband Black Male United-States 0 +39 0.433333337 0.283984363 0.625 0 0 0.3030303 Private Some-college Divorced Protective-serv Unmarried Black Female United-States 0 +43 0.477777779 0.10386575 0.5625 0.0282902829 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 +43 0.477777779 0.0235966071 0.8125 0 0 0.212121218 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +62 0.6888889 0.254757017 0.875 0 0 0.02020202 ? Masters Married-civ-spouse ? Husband White Male United-States 1 +30 0.333333343 0.182001144 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Own-child Black Female United-States 0 +25 0.2777778 0.17170617 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +45 0.5 0.04159143 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +22 0.244444445 0.09286424 0.625 0 0 0.2020202 Private Some-college Never-married Protective-serv Not-in-family White Male United-States 0 +73 0.811111152 0.22631231 0.8125 0 0.515610635 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.1498877 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.157510087 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Other-relative Black Male United-States 0 +18 0.2 0.133774728 0.5 0.005940059 0 0.2020202 Private 12th Never-married Craft-repair Own-child White Male United-States 0 +35 0.3888889 0.136072159 0.8125 0.07298073 0 0.353535354 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +22 0.244444445 0.136850089 0.625 0 0 0.434343427 Private Some-college Separated Sales Unmarried White Female United-States 0 +28 0.311111122 0.14906463 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +38 0.422222227 0.1259065 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +68 0.75555557 0.236681372 1 0 0 0.7070707 ? Doctorate Married-civ-spouse ? Husband White Male United-States 0 +40 0.444444448 0.120953321 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +32 0.355555564 0.0180527456 0.625 0 0 0.8484849 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +42 0.466666669 0.232116148 0.5625 0 0.43663913 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +31 0.344444454 0.0403911881 0.5625 0 0 0.353535354 State-gov HS-grad Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 +33 0.366666675 0.109738976 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Italy 0 +54 0.6 0.129759118 0.8125 0 0 0.656565666 Self-emp-not-inc Bachelors Divorced Transport-moving Not-in-family White Male United-States 0 +63 0.7 0.07926221 0.5625 0 0 0.25252524 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +67 0.7444445 0.120754629 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +47 0.5222222 0.146265417 0.5625 0 0 0.141414136 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 +67 0.7444445 0.07847822 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Widowed Other-service Unmarried White Female United-States 0 +33 0.366666675 0.114727169 0.5625 0 0 0.1919192 Private HS-grad Married-civ-spouse Adm-clerical Wife Other Female United-States 0 +33 0.366666675 0.172781125 0.5625 0 0 0.8080808 Local-gov HS-grad Separated Other-service Own-child White Female United-States 0 +25 0.2777778 0.153489083 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +25 0.2777778 0.0954438746 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.243744045 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried White Male United-States 0 +54 0.6 0.124878012 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.1186101 0.5625 0 0 0.8080808 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +18 0.2 0.145975128 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Own-child White Male United-States 0 +54 0.6 0.104906365 0.5625 0.04416044 0 0.25252524 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +30 0.333333343 0.4107139 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +29 0.322222233 0.09161214 0.375 0 0 0.4848485 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 +41 0.455555558 0.039657712 0.8125 0.07688077 0 0.1010101 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +40 0.444444448 0.1924874 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +46 0.51111114 0.116685137 0.625 0.05178052 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +39 0.433333337 0.108382478 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Tech-support Wife White Female United-States 0 +42 0.466666669 0.153159723 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +49 0.544444442 0.07480678 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.127920359 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +34 0.377777785 0.0213779844 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.0813878849 0.5625 0 0.4687787 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.116052687 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +72 0.8 0.11197713 0.5625 0 0 0.02020202 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +31 0.344444454 0.0582553446 0.6875 0 0 0.3030303 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 +90 1 0.13919735 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +27 0.3 0.103418529 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +18 0.2 0.127325639 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Other-relative White Male United-States 0 +30 0.333333343 0.0780842 0.5625 1 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 +27 0.3 0.102125339 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Prof-specialty Own-child Black Female United-States 0 +27 0.3 0.0251241829 0.4375 0 0 0.5050505 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.073415935 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +40 0.444444448 0.131667912 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +43 0.477777779 0.145561576 0.875 0 0 0.373737365 Local-gov Masters Separated Prof-specialty Unmarried Black Female United-States 0 +26 0.2888889 0.07981182 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +48 0.533333361 0.0681839138 0.6875 0 0 0.151515156 Self-emp-not-inc Assoc-voc Married-civ-spouse Other-service Wife White Female United-States 0 +41 0.455555558 0.235537037 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male United-States 0 +32 0.355555564 0.152813524 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Germany 0 +23 0.25555557 0.144564077 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +35 0.3888889 0.114279941 0.4375 0 0 0.656565666 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.04812943 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +27 0.3 0.0960601643 0.8125 0.04101041 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +34 0.377777785 0.0843797252 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +25 0.2777778 0.132890373 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +46 0.51111114 0.100353271 0.8125 0.04787048 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 1 +34 0.377777785 0.0466429368 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 0 +39 0.433333337 0.107848361 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +33 0.366666675 0.09248302 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female ? 0 +25 0.2777778 0.217705876 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +45 0.5 0.0933693945 0.6875 0.0217402168 0 0.5050505 Private Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 0 +46 0.51111114 0.0689423159 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +23 0.25555557 0.102301806 0.5625 0.046500463 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male Ireland 0 +37 0.411111116 0.272553146 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family Black Male United-States 0 +39 0.433333337 0.06677825 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 +38 0.422222227 0.12482278 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +35 0.3888889 0.155093446 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +49 0.544444442 0.0261459351 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.256356657 0.75 0 0 0.13131313 Private Assoc-acdm Married-civ-spouse Prof-specialty Wife White Female United-States 1 +45 0.5 0.215286538 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +71 0.788888931 0.10038358 0.5 0 0 0.4040404 Private 12th Never-married Other-service Not-in-family White Female United-States 0 +44 0.4888889 0.2161938 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +19 0.211111113 0.07893892 0.625 0 0 0.222222224 ? Some-college Never-married ? Own-child White Male United-States 0 +38 0.422222227 0.0552062541 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 +42 0.466666669 0.122786686 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.0359896421 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.145627588 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +56 0.622222245 0.0162503663 0.6875 0 0 0.545454562 Self-emp-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.07750092 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +19 0.211111113 0.08101071 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +57 0.6333333 0.09044625 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Separated Sales Not-in-family White Male United-States 0 +55 0.6111111 0.0179941468 0.375 0 0 0.6060606 Private 10th Never-married Transport-moving Not-in-family White Male United-States 0 +48 0.533333361 0.117553994 0.4375 0 0 0.4040404 ? 11th Separated ? Unmarried White Male United-States 0 +46 0.51111114 0.118513778 0.5 0 0 0.454545468 Self-emp-inc 12th Married-civ-spouse Craft-repair Husband White Male ? 0 +36 0.4 0.147469029 0.3125 0 0 0.4040404 Private 9th Separated Other-service Unmarried Black Female ? 0 +66 0.733333349 0.07930599 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +26 0.2888889 0.13888213 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 +58 0.644444466 0.06056557 0.6875 0.1502415 0 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.0470578335 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.07342873 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Unmarried Other Male United-States 0 +77 0.8555556 0.106988929 0.6875 0 0 0.25252524 ? Assoc-voc Married-spouse-absent ? Not-in-family White Female United-States 0 +25 0.2777778 0.08776289 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.105561711 0.8125 0 0 0.565656543 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +33 0.366666675 0.2860629 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +51 0.566666663 0.146592766 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Prof-specialty Not-in-family Black Female United-States 0 +20 0.222222224 0.022285236 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Farming-fishing Own-child White Male United-States 0 +40 0.444444448 0.162924618 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +20 0.222222224 0.0259007681 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Male United-States 0 +41 0.455555558 0.0545926653 0.625 0 0 0.25252524 Local-gov Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +44 0.4888889 0.109930933 0.5 0 0 0.4040404 Private 12th Divorced Machine-op-inspct Unmarried White Female United-States 0 +35 0.3888889 0.105561711 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +35 0.3888889 0.0861652642 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-spouse-absent Farming-fishing Not-in-family White Male United-States 0 +46 0.51111114 0.153101131 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +24 0.266666681 0.06522778 0.625 0 0 0.171717167 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +18 0.2 0.165149987 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +37 0.411111116 0.0312418975 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +58 0.644444466 0.125536725 1 0 0 0.08080808 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 +55 0.6111111 0.1702116 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +68 0.75555557 0.104328468 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +41 0.455555558 0.216032147 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.09352161 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.06876248 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.0219120979 0.625 0 0 0.454545468 ? Some-college Never-married ? Not-in-family White Male United-States 0 +45 0.5 0.1873443 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +43 0.477777779 0.227849975 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.02315477 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.06193756 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.179080024 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +60 0.6666667 0.185901582 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 0 +27 0.3 0.130597 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.09386646 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.206420138 0.75 0 0 0.4040404 State-gov Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.0250770357 0.625 0 0 0.8080808 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +19 0.211111113 0.03800351 0.5 0 0 0.2020202 State-gov 12th Never-married Transport-moving Own-child Black Male United-States 0 +33 0.366666675 0.111291468 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Not-in-family Asian-Pac-Islander Female Thailand 0 +34 0.377777785 0.103270352 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.0720520243 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +57 0.6333333 0.07342536 0.625 0 0 0.4848485 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +59 0.655555546 0.103791662 0.875 0.2782828 0 0.454545468 Private Masters Never-married Sales Not-in-family White Female United-States 1 +36 0.4 0.123754553 0.5625 0 0.459595948 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Own-child White Female United-States 0 +60 0.6666667 0.247655258 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 +33 0.366666675 0.105081484 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +41 0.455555558 0.12469279 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +20 0.222222224 0.126809031 0.625 0 0 0.1010101 Self-emp-not-inc Some-college Never-married Prof-specialty Own-child White Male United-States 0 +28 0.311111122 0.034021575 0.8125 0.0220202189 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.09949384 0.875 0 0 0.2020202 State-gov Masters Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male India 0 +31 0.344444454 0.2791969 0.5 0 0 0.6060606 Private 12th Never-married Farming-fishing Not-in-family Black Male United-States 0 +38 0.422222227 0.194751143 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Unmarried White Female United-States 0 +40 0.444444448 0.118588544 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +55 0.6111111 0.134513587 0.8125 0 0 0.151515156 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +49 0.544444442 0.20063515 0.5625 0.0406404063 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.137959391 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +52 0.5777778 0.104689486 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Not-in-family White Female ? 0 +24 0.266666681 0.02219296 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +46 0.51111114 0.157277718 0.8125 0 0 0.4848485 Private Bachelors Divorced Craft-repair Not-in-family White Male United-States 0 +20 0.222222224 0.14196828 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +50 0.5555556 0.128484786 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +22 0.244444445 0.0561155267 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 +32 0.355555564 0.231609657 0.625 0 0 0.353535354 Self-emp-inc Some-college Married-civ-spouse Transport-moving Husband Black Male Haiti 0 +46 0.51111114 0.124863192 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +62 0.6888889 0.203503057 0.5625 0.0296102948 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +39 0.433333337 0.0541009828 0.625 0 0.453856736 0.6262626 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.241080225 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +20 0.222222224 0.142313123 0.625 0 0 0.141414136 Private Some-college Never-married Sales Own-child Black Female United-States 0 +37 0.411111116 0.134211853 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +40 0.444444448 0.1366413 0.625 0 0 0.24242425 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +22 0.244444445 0.131389737 0.625 0 0 0.3838384 Private Some-college Never-married Other-service Own-child White Female United-States 0 +32 0.355555564 0.213765025 0.8125 0.105201051 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 1 +41 0.455555558 0.126491129 0.625 0 0 0.5050505 Private Some-college Divorced Tech-support Not-in-family White Male United-States 0 +24 0.266666681 0.0654756352 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 +40 0.444444448 0.0322636478 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.0517052226 0.9375 0 0 0.3939394 State-gov Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 +42 0.466666669 0.116047971 0.875 0 0.43663913 0.4040404 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 +56 0.622222245 0.18486838 0.3125 0 0 0.4040404 Private 9th Widowed Sales Unmarried White Female United-States 0 +20 0.222222224 0.0708854645 0.625 0 0 0.5050505 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +55 0.6111111 0.111601293 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Male United-States 0 +29 0.322222233 0.170943722 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +37 0.411111116 0.205830112 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +61 0.677777767 0.237385884 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +26 0.2888889 0.163512617 0.8125 0 0 0.3838384 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +49 0.544444442 0.135434315 0.625 0 0 0.5555556 Self-emp-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +18 0.2 0.10711354 0.25 0 0 0.4040404 Local-gov 7th-8th Never-married Farming-fishing Own-child White Male United-States 0 +30 0.333333343 0.1007392 0.3125 0 0 0.4040404 Private 9th Never-married Farming-fishing Other-relative Black Male United-States 0 +24 0.266666681 0.154611856 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child Black Female ? 0 +24 0.266666681 0.104919836 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +37 0.411111116 0.08087398 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +37 0.411111116 0.1734944 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.1198265 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +40 0.444444448 0.20833163 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +44 0.4888889 0.09360445 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.126474962 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.0241563153 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Not-in-family White Female United-States 0 +50 0.5555556 0.1578583 0.875 0 0.3409091 0.4040404 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 0 +17 0.188888893 0.101798676 0.375 0 0 0.3030303 ? 10th Never-married ? Own-child White Male United-States 0 +39 0.433333337 0.09745236 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +43 0.477777779 0.167099863 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +43 0.477777779 0.167099863 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +40 0.444444448 0.144015819 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +31 0.344444454 0.0376162268 0.625 0 0 0.4040404 State-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +25 0.2777778 0.0819772258 0.8125 0 0 0.4040404 Private Bachelors Divorced Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.110831447 0.8125 0 0.430670351 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +55 0.6111111 0.150283724 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +55 0.6111111 0.128317744 0.25 0 0 0.75757575 Private 7th-8th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +29 0.322222233 0.137264311 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +28 0.311111122 0.25490585 0.8125 0.105201051 0 0.6060606 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 1 +30 0.333333343 0.07133269 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.156499773 0.5625 0 0.3838384 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.141796514 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +71 0.788888931 0.130349129 0.4375 0 0 0.75757575 Private 11th Never-married Priv-house-serv Not-in-family White Female United-States 0 +22 0.244444445 0.0154683935 0.625 0 0 0.0606060624 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +21 0.233333334 0.0293223243 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +62 0.6888889 0.04882182 0.5625 0 0 0.24242425 ? HS-grad Married-civ-spouse ? Husband Asian-Pac-Islander Male China 0 +22 0.244444445 0.1549109 0.625 0 0 0.4040404 ? Some-college Married-spouse-absent ? Unmarried Black Female United-States 0 +49 0.544444442 0.123265564 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +31 0.344444454 0.07635456 0.75 0 0 0.2020202 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.132942244 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.20114097 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Hong 1 +26 0.2888889 0.143722162 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +30 0.333333343 0.07305425 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +17 0.188888893 0.0208842847 0.375 0 0 0.3030303 Private 10th Never-married Other-service Own-child White Female United-States 0 +26 0.2888889 0.0241913386 0.625 0 0 0.5050505 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +45 0.5 0.06693923 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female Canada 0 +50 0.5555556 0.03257078 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.162917882 0.5625 0 0 0.454545468 Private HS-grad Never-married Farming-fishing Unmarried White Male United-States 0 +51 0.566666663 0.0163965244 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +56 0.622222245 0.100818686 0.3125 0 0 0.4040404 Private 9th Widowed Machine-op-inspct Unmarried White Female United-States 0 +24 0.266666681 0.104015276 0.8125 0 0 0.353535354 State-gov Bachelors Never-married Machine-op-inspct Not-in-family White Male United-States 0 +29 0.322222233 0.223529264 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Not-in-family White Male Dominican-Republic 0 +26 0.2888889 0.174839452 0.625 0 0 0.24242425 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +51 0.566666663 0.07055139 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.0976281539 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +47 0.5222222 0.13437821 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.20370242 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +41 0.455555558 0.08699035 0.4375 0 0 0.4040404 ? 11th Widowed ? Other-relative Black Female United-States 0 +49 0.544444442 0.07798452 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.06500214 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 1 +62 0.6888889 0.1527125 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +43 0.477777779 0.1649789 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +76 0.844444454 0.16418615 0.1875 0 0 0.2020202 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +40 0.444444448 0.236519039 0.875 0 0 0.6060606 ? Masters Married-civ-spouse ? Husband White Male United-States 1 +35 0.3888889 0.1259065 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.0604921542 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +54 0.6 0.08717692 0.8125 0.1502415 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.124403164 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.18541798 0.625 0 0 0.121212125 Private Some-college Never-married Sales Own-child White Male United-States 0 +20 0.222222224 0.1739726 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +39 0.433333337 0.09412173 0.5625 0 0 0.2020202 Private HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.06902112 0.8125 0.105201051 0 0.646464646 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 1 +20 0.222222224 0.06993982 0.5625 0 0 0.424242437 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +28 0.311111122 0.184938431 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +56 0.622222245 0.1056385 0.625 0 0 0.4040404 Federal-gov Some-college Separated Other-service Not-in-family Black Male United-States 0 +39 0.433333337 0.06804045 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +44 0.4888889 0.04629135 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 +55 0.6111111 0.09518793 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +54 0.6 0.113640763 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.233828276 0.8125 0.135501355 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +34 0.377777785 0.143949136 0.5625 0 0 0.575757563 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +42 0.466666669 0.132549569 0.5625 0 0 0.3838384 Private HS-grad Never-married Transport-moving Unmarried Black Female United-States 0 +50 0.5555556 0.139587328 0.625 0 0 0.75757575 Self-emp-inc Some-college Separated Exec-managerial Unmarried White Female United-States 0 +34 0.377777785 0.134662449 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +23 0.25555557 0.183325991 0.6875 0 0 0.333333343 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 +27 0.3 0.128409356 0.8125 0 0 0.25252524 ? Bachelors Never-married ? Unmarried Asian-Pac-Islander Male Philippines 0 +81 0.900000036 0.0990749 0.8125 0 0 0.05050505 ? Bachelors Widowed ? Not-in-family White Male United-States 0 +47 0.5222222 0.179349437 0.4375 0.068490684 0 0.4040404 Private 11th Never-married Machine-op-inspct Unmarried Black Female United-States 0 +57 0.6333333 0.065184 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 +65 0.722222269 0.0789126456 0.6875 0 0 0.565656543 ? Assoc-voc Married-civ-spouse ? Wife White Female United-States 1 +33 0.366666675 0.126861572 0.875 0 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family Black Male United-States 0 +37 0.411111116 0.241887107 0.5625 0 0 0.4848485 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +53 0.5888889 0.133914813 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried White Female United-States 0 +27 0.3 0.0460650437 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.07786934 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.0305535458 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +39 0.433333337 0.08189506 0.625 0.04787048 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family Black Male United-States 1 +58 0.644444466 0.196927339 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +20 0.222222224 0.325136662 0.5625 0 0 0.24242425 Private HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 +19 0.211111113 0.133806378 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 +39 0.433333337 0.155134529 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.0201299246 0.5625 0 0 0.444444448 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +52 0.5777778 0.130840138 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female Germany 0 +53 0.5888889 0.085113205 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 1 +50 0.5555556 0.0730421245 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.14864637 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +30 0.333333343 0.0215584915 0.8125 0 0 0.727272749 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +30 0.333333343 0.129168421 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female ? 0 +50 0.5555556 0.125173688 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +76 0.844444454 0.08554966 0.25 0 0 0.4040404 Private 7th-8th Widowed Priv-house-serv Not-in-family White Female United-States 0 +46 0.51111114 0.06890797 0.8125 0 0.5544077 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.106347054 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Black Male United-States 0 +26 0.2888889 0.232642174 0.5625 0.0288502872 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +56 0.622222245 0.0634173155 0.9375 0 0.453856736 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.09793798 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.12862353 0.625 0.02407024 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.143330157 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +51 0.566666663 0.113598324 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +58 0.644444466 0.157931045 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +38 0.422222227 0.08854352 0.3125 0 0 0.24242425 Private 9th Married-civ-spouse Other-service Wife Black Female Haiti 0 +45 0.5 0.2753227 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +55 0.6111111 0.08494415 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Widowed Sales Not-in-family White Male United-States 0 +45 0.5 0.1047272 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.199870691 0.625 0 0 0.454545468 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +44 0.4888889 0.125164255 0.8125 0 0 0.464646459 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +60 0.6666667 0.0291202627 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.143565223 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +25 0.2777778 0.225140348 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +61 0.677777767 0.170472249 0.8125 0 0 0.24242425 ? Bachelors Divorced ? Not-in-family White Female United-States 0 +43 0.477777779 0.04353121 0.5625 0.1502415 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.1305862 0.6875 0 0.307621658 0.4040404 Local-gov Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 +63 0.7 0.0483597778 0.25 0 0 0.414141417 Private 7th-8th Widowed Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.114562824 0.875 0 0 0.434343427 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.133510023 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.242335021 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family Black Male United-States 0 +43 0.477777779 0.07446328 0.5625 0 0 0.4040404 Private HS-grad Separated Exec-managerial Unmarried Black Female United-States 0 +46 0.51111114 0.132590652 0.875 0 0 0.353535354 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.0760151 0.375 0 0 0.353535354 ? 10th Married-civ-spouse ? Wife Black Female United-States 0 +61 0.677777767 0.151399776 0.75 0 0 0.909090936 Self-emp-not-inc Assoc-acdm Married-spouse-absent Exec-managerial Not-in-family White Female United-States 0 +53 0.5888889 0.182894245 0.5625 0 0.453856736 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +79 0.8777778 0.0957570747 0.25 0.01409014 0 0.353535354 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +44 0.4888889 0.148966968 0.5625 0 0 0.3030303 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +54 0.6 0.173041791 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +22 0.244444445 0.105968527 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +47 0.5222222 0.129920766 0.5625 0 0 0.5050505 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 +18 0.2 0.161771536 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +25 0.2777778 0.137628689 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +24 0.266666681 0.08228301 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female Iran 0 +37 0.411111116 0.267983884 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +51 0.566666663 0.07750092 0.625 0 0.5847107 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 1 +35 0.3888889 0.114618056 0.5625 0.07298073 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +59 0.655555546 0.1151845 0.625 0 0 0.343434334 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +46 0.51111114 0.0614681058 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Craft-repair Not-in-family Asian-Pac-Islander Male Philippines 0 +45 0.5 0.08599553 0.6875 0 0 0.6060606 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 +19 0.211111113 0.177367225 0.5625 0 0 0.151515156 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +22 0.244444445 0.0872281045 0.5625 0 0 0.282828271 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +41 0.455555558 0.129390687 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.06326509 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.139783323 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 +22 0.244444445 0.0933128148 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +29 0.322222233 0.07826942 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.133524165 0.5625 0 0 0.3939394 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.0610316545 0.75 0 0.4687787 0.1010101 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 +23 0.25555557 0.142223537 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Handlers-cleaners Own-child White Male United-States 0 +20 0.222222224 0.131090015 0.5625 0.0378103778 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +25 0.2777778 0.108761005 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female United-States 0 +59 0.655555546 0.09703679 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +44 0.4888889 0.112483628 0.625 0.04386044 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.23043029 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +77 0.8555556 0.0482762568 0.625 0 0.446281 0.01010101 Self-emp-not-inc Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.08398436 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.0991685241 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.09778037 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +45 0.5 0.174662977 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.104383029 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Guatemala 0 +60 0.6666667 0.110423282 0.3125 0 0 0.4040404 ? 9th Married-civ-spouse ? Husband White Male United-States 0 +23 0.25555557 0.08605616 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +52 0.5777778 0.06640242 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.129920766 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.131236851 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +20 0.222222224 0.02320057 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +23 0.25555557 0.119394094 0.5625 0 0 0.454545468 Local-gov HS-grad Never-married Other-service Own-child White Female United-States 0 +30 0.333333343 0.09629994 0.625 0 0 0.656565666 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +45 0.5 0.162557542 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +30 0.333333343 0.104318365 0.9375 0 0 0.353535354 Private Prof-school Widowed Other-service Not-in-family White Male United-States 0 +17 0.188888893 0.0407905951 0.3125 0 0 0.2020202 Private 9th Never-married Other-service Own-child White Female United-States 0 +22 0.244444445 0.09602312 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +25 0.2777778 0.118651181 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 +52 0.5777778 0.1254815 0.625 0.1502415 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Canada 1 +40 0.444444448 0.160079613 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 1 +18 0.2 0.124210536 0.375 0 0 0.3030303 ? 10th Never-married ? Own-child Black Male United-States 0 +58 0.644444466 0.04622063 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.154578865 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.229399785 0.375 0.0394203924 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +29 0.322222233 0.176606134 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family Black Female Jamaica 0 +26 0.2888889 0.158959523 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +39 0.433333337 0.14432767 0.8125 0 0 0.1010101 Local-gov Bachelors Widowed Prof-specialty Unmarried Asian-Pac-Islander Female Japan 0 +33 0.366666675 0.1141614 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.1387077 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +22 0.244444445 0.131459787 0.625 0 0 0.24242425 Private Some-college Never-married Sales Own-child White Male United-States 0 +25 0.2777778 0.316357136 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Own-child White Male United-States 0 +19 0.211111113 0.09445782 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 +44 0.4888889 0.1444159 0.625 0 0 0.4040404 Private Some-college Separated Prof-specialty Unmarried Black Female United-States 0 +35 0.3888889 0.3046282 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Own-child White Female United-States 0 +40 0.444444448 0.16445826 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +19 0.211111113 0.156241149 0.4375 0 0 0.2020202 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 +37 0.411111116 0.277695566 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 1 +32 0.355555564 0.0205407813 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +52 0.5777778 0.1274435 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +36 0.4 0.180703908 0.5625 0 0 0.414141417 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.04667998 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Female United-States 0 +57 0.6333333 0.0749131963 0.8125 0 0 0.3939394 State-gov Bachelors Divorced Machine-op-inspct Not-in-family Black Male United-States 0 +22 0.244444445 0.208356544 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +80 0.8888889 0.117865168 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Husband White Male Canada 0 +20 0.222222224 0.14196828 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.193136021 0.4375 0 0 0.363636374 Private 11th Separated Machine-op-inspct Not-in-family Black Male United-States 0 +36 0.4 0.21638912 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.129949048 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +52 0.5777778 0.0489949174 0.5625 0 0 0.5050505 Private HS-grad Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.126530856 0.5625 0 0 0.444444448 Private HS-grad Separated Transport-moving Unmarried White Female United-States 0 +35 0.3888889 0.120952651 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.446818739 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband Black Male United-States 0 +27 0.3 0.203691646 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +24 0.266666681 0.103975542 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +49 0.544444442 0.0251585338 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.07382544 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Separated Craft-repair Not-in-family White Male United-States 0 +47 0.5222222 0.124201104 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +20 0.222222224 0.151302785 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +19 0.211111113 0.273135751 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +34 0.377777785 0.0245065521 0.875 0 0.518365443 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +20 0.222222224 0.09960497 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.110615246 0.4375 0 0 0.353535354 Private 11th Separated Prof-specialty Own-child White Male United-States 0 +25 0.2777778 0.2581698 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +21 0.233333334 0.2813138 0.5625 0 0 0.363636374 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +25 0.2777778 0.108443767 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +63 0.7 0.06723423 0.625 0 0 0.323232323 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +25 0.2777778 0.0251760464 0.8125 0 0 0.5050505 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +28 0.311111122 0.100117534 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +39 0.433333337 0.121557482 0.875 0 0 0.6060606 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +28 0.311111122 0.08294375 0.625 0.0486504845 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +30 0.333333343 0.0750418454 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.07228844 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +52 0.5777778 0.09871658 0.75 0.0486504845 0 0.3030303 Local-gov Assoc-acdm Divorced Other-service Not-in-family White Female United-States 0 +36 0.4 0.180208191 0.5625 0.0406404063 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.191870436 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.131130427 0.3125 0 0 0.5050505 Private 9th Never-married Other-service Own-child White Male Mexico 0 +32 0.355555564 0.09832458 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Wife White Female United-States 0 +52 0.5777778 0.110458307 0.5625 1 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.086534366 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +21 0.233333334 0.1688194 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Other-relative White Male Nicaragua 0 +60 0.6666667 0.152857974 0.5625 0 0 0.373737365 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +47 0.5222222 0.10635177 0.4375 0 0 0.363636374 Private 11th Married-civ-spouse Other-service Husband Amer-Indian-Eskimo Male United-States 0 +54 0.6 0.022807898 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +32 0.355555564 0.02724043 0.875 0 0 0.5050505 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +61 0.677777767 0.0366220921 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.0355309658 0.5625 0 0.3452709 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +29 0.322222233 0.07033249 0.625 0.04386044 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Other-relative White Male United-States 1 +36 0.4 0.205908924 0.5625 0 0 0.7070707 Local-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 +38 0.422222227 0.112776615 0.5625 0 0 0.2020202 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.196354836 0.375 0 0 0.5252525 Private 10th Widowed Machine-op-inspct Not-in-family White Male United-States 0 +43 0.477777779 0.163924828 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +19 0.211111113 0.0260112286 0.4375 0 0 0.1010101 Private 11th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +42 0.466666669 0.155373633 0.8125 0.0501305 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.08931135 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.130184114 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 +51 0.566666663 0.1880212 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.228578746 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +61 0.677777767 0.06820547 0.625 0 0 0.434343427 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.07933495 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +31 0.344444454 0.210592 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.172090083 0.4375 0 0 0.5555556 Self-emp-not-inc 11th Divorced Exec-managerial Not-in-family White Male United-States 0 +21 0.233333334 0.14949435 0.3125 0 0 0.4040404 Private 9th Never-married Handlers-cleaners Other-relative White Male Mexico 0 +22 0.244444445 0.09374926 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +35 0.3888889 0.124978364 0.875 0 0.4331956 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.05676414 0.8125 0 0 0.4848485 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.07717358 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +36 0.4 0.124876663 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +33 0.366666675 0.1343964 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +23 0.25555557 0.233366236 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +51 0.566666663 0.235353827 0.5625 0.04386044 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.147920966 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Other-relative White Male United-States 0 +28 0.311111122 0.08586959 0.5625 0.0572105721 0 0.4040404 Local-gov HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.171009734 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Sales Not-in-family White Male United-States 0 +32 0.355555564 0.1045541 0.8125 0 0 0.6060606 Private Bachelors Divorced Protective-serv Not-in-family Black Male United-States 1 +43 0.477777779 0.122877613 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +19 0.211111113 0.357279062 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.0683166 0.4375 0 0 0.4040404 Private 11th Divorced Handlers-cleaners Unmarried Black Female United-States 0 +49 0.544444442 0.241575271 1 0 0 0.454545468 Local-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.0610680245 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Female United-States 0 +45 0.5 0.08496031 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.160540313 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +22 0.244444445 0.130686566 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 +25 0.2777778 0.07936459 0.8125 0 0.430670351 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.168172136 0.9375 0 0 0.5050505 Private Prof-school Separated Prof-specialty Not-in-family White Male United-States 1 +44 0.4888889 0.147902116 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.149360985 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +30 0.333333343 0.0543037169 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +54 0.6 0.124878012 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.109860212 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.01650429 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 +30 0.333333343 0.107217938 0.8125 0 0.43663913 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.06766462 0.6875 0.0217402168 0 0.6060606 Private Assoc-voc Never-married Exec-managerial Own-child White Female United-States 0 +27 0.3 0.129949048 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +29 0.322222233 0.09766991 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +60 0.6666667 0.122041754 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.0254447851 0.875 0 0 0.7070707 Self-emp-not-inc Masters Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.040606048 0.875 0 0 0.4040404 Private Masters Never-married Sales Own-child White Female United-States 0 +57 0.6333333 0.0567324832 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +24 0.266666681 0.03504265 0.125 0 0 0.05050505 Private 1st-4th Married-civ-spouse Other-service Own-child Asian-Pac-Islander Female Vietnam 0 +63 0.7 0.214697868 0.625 0 0 0.222222224 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 +29 0.322222233 0.113246739 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +34 0.377777785 0.07646637 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +27 0.3 0.216808051 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +31 0.344444454 0.09819527 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Unmarried White Female United-States 0 +31 0.344444454 0.08851927 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.09780664 0.625 0.046500463 0 0.2020202 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +64 0.7111111 0.09575371 0.5625 0 0 1 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.3332541 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Other-relative Black Female United-States 0 +44 0.4888889 0.116170555 0.5625 0.1502415 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +35 0.3888889 0.124371514 0.4375 0 0 0.5050505 Private 11th Divorced Transport-moving Not-in-family White Male United-States 0 +41 0.455555558 0.0179624911 0.625 0 0 0.4040404 Local-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +38 0.422222227 0.128967717 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Own-child Black Female United-States 0 +21 0.233333334 0.0583449267 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male ? 0 +64 0.7111111 0.07529779 0.8125 0 0 0.454545468 State-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.163375214 0.25 0 0.506198347 0.4040404 Private 7th-8th Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +31 0.344444454 0.24560906 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Germany 1 +42 0.466666669 0.2937331 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.183521986 0.75 0 0 0.353535354 Private Assoc-acdm Married-civ-spouse Other-service Wife White Female United-States 1 +36 0.4 0.031864915 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Unmarried Black Female United-States 1 +23 0.25555557 0.191146389 0.5 0 0 0.3030303 Private 12th Never-married Machine-op-inspct Other-relative White Male Mexico 0 +20 0.222222224 0.108501017 0.625 0 0 0.141414136 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +26 0.2888889 0.178641558 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 +56 0.622222245 0.04168168 0.8125 0 0.459366381 0.656565666 Federal-gov Bachelors Never-married Transport-moving Not-in-family Black Male United-States 0 +40 0.444444448 0.101347409 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Other-service Not-in-family White Female United-States 0 +19 0.211111113 0.123284429 0.4375 0 0 0.24242425 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +33 0.366666675 0.118995361 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Female United-States 0 +45 0.5 0.158880726 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Male Columbia 0 +41 0.455555558 0.109979428 0.5625 0.07688077 0 0.434343427 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.1104866 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +46 0.51111114 0.21860303 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +48 0.533333361 0.06676545 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 +38 0.422222227 0.225633383 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.3660505 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +35 0.3888889 0.0443697572 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.0713044 0.8125 0 0 0.3030303 Local-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 0 +27 0.3 0.144714266 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Own-child White Male United-States 0 +43 0.477777779 0.1037755 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +70 0.7777778 0.188796431 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Cuba 0 +30 0.333333343 0.06581981 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +24 0.266666681 0.157269627 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +76 0.844444454 0.174857631 0.5625 0 0 0.151515156 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +25 0.2777778 0.159612179 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Own-child White Male Mexico 0 +39 0.433333337 0.234264731 0.75 0 0 0.565656543 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 +36 0.4 0.1330197 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried Black Female United-States 0 +23 0.25555557 0.1532924 0.5 0 0 0.4040404 Private 12th Never-married Machine-op-inspct Own-child White Female United-States 0 +60 0.6666667 0.11143022 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Unmarried White Female United-States 0 +20 0.222222224 0.227309808 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child Black Male United-States 0 +54 0.6 0.112852052 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Craft-repair Husband Black Male Haiti 1 +20 0.222222224 0.267205954 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +22 0.244444445 0.0986984 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +24 0.266666681 0.0350056067 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +41 0.455555558 0.0975129753 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.114279941 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.161740556 0.1875 0 0 0.5555556 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 +54 0.6 0.06949461 1 0 0.43663913 0.5050505 State-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.115881607 0.4375 0 0 0.161616161 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +43 0.477777779 0.120546505 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +33 0.366666675 0.118666671 0.5 0 0.518365443 0.424242437 Private 12th Divorced Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.106553152 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Own-child Asian-Pac-Islander Female ? 0 +38 0.422222227 0.116232522 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Male United-States 1 +54 0.6 0.152713835 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +39 0.433333337 0.09969321 0.5625 0 0 0.5252525 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Female United-States 0 +32 0.355555564 0.134389669 0.625 0 0.454545438 0.4040404 Private Some-college Separated Tech-support Not-in-family Amer-Indian-Eskimo Male United-States 0 +61 0.677777767 0.02357438 0.25 0.0288502872 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +24 0.266666681 0.0455215 0.6875 0 0 0.353535354 ? Assoc-voc Married-civ-spouse ? Wife Black Female United-States 0 +22 0.244444445 0.0593559 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +34 0.377777785 0.152418166 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +18 0.2 0.304742038 0.375 0 0 0.2020202 Private 10th Never-married Priv-house-serv Own-child Black Female United-States 0 +20 0.222222224 0.2549638 0.5625 0 0 0.25252524 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +53 0.5888889 0.125336 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Tech-support Unmarried White Male United-States 0 +32 0.355555564 0.0187619776 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +68 0.75555557 0.158185631 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +28 0.311111122 0.04831465 0.625 0 0 0.151515156 Private Some-college Separated Other-service Unmarried White Female United-States 0 +28 0.311111122 0.139740214 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male El-Salvador 0 +54 0.6 0.120758675 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Prof-specialty Husband Black Male Haiti 1 +21 0.233333334 0.1705322 0.625 0 0 0.4848485 ? Some-college Never-married ? Own-child White Male United-States 0 +52 0.5777778 0.06261715 0.8125 0 0 0.4040404 Private Bachelors Separated Exec-managerial Unmarried White Female ? 0 +25 0.2777778 0.140961334 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.08276998 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +33 0.366666675 0.0756769851 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +49 0.544444442 0.118771747 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Unmarried Asian-Pac-Islander Female India 0 +58 0.644444466 0.166548908 0.25 0 0 0.3030303 Private 7th-8th Widowed Other-service Not-in-family Other Female United-States 0 +45 0.5 0.185954109 0.6875 0 0 0.24242425 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +67 0.7444445 0.173473522 0.25 0.105661057 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +42 0.466666669 0.119846709 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male ? 0 +69 0.7666667 0.0716607049 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +61 0.677777767 0.112573206 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +34 0.377777785 0.144060269 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.125039652 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.0965579 0.5625 0 0 0.343434334 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +31 0.344444454 0.119122654 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.0657464 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +76 0.844444454 0.151329726 0.9375 0 0.288797051 0.2020202 ? Prof-school Married-civ-spouse ? Husband White Male United-States 0 +53 0.5888889 0.132526666 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Female United-States 0 +46 0.51111114 0.206224814 0.5625 0 0 0.373737365 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.231063411 0.25 0.04508045 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male Cuba 0 +48 0.533333361 0.1300238 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +39 0.433333337 0.234740913 0.625 0 0.5544077 1 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +59 0.655555546 0.131901622 0.25 0 0 0.4040404 Private 7th-8th Divorced Transport-moving Not-in-family White Male United-States 0 +19 0.211111113 0.07157853 0.625 0 0 0.3838384 Private Some-college Never-married Sales Own-child White Female United-States 0 +40 0.444444448 0.150033846 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +63 0.7 0.07449965 0.375 0 0 0.5050505 Self-emp-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +44 0.4888889 0.1293065 0.625 0 0 0.1010101 ? Some-college Divorced ? Unmarried White Female Poland 0 +46 0.51111114 0.166555643 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 +22 0.244444445 0.147532344 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Unmarried White Male United-States 0 +36 0.4 0.15125294 0.75 0 0.383149683 0.454545468 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 0 +57 0.6333333 0.137906864 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +58 0.644444466 0.07637747 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 +25 0.2777778 0.114789136 0.8125 0 0 0.282828271 ? Bachelors Never-married ? Not-in-family Asian-Pac-Islander Male Taiwan 0 +59 0.655555546 0.174161881 0.625 0.03103031 0 0.353535354 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +36 0.4 0.109398164 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.177142933 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male Germany 0 +49 0.544444442 0.0178500116 0.8125 0.06497065 0 0.454545468 Self-emp-inc Bachelors Divorced Prof-specialty Unmarried White Male United-States 0 +42 0.466666669 0.248622462 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.0773614943 0.625 0 0 0.171717167 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +46 0.51111114 0.2729896 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.217973948 0.625 0 0 0.121212125 Local-gov Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +40 0.444444448 0.0718647838 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Transport-moving Unmarried White Female United-States 0 +43 0.477777779 0.0346910655 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 +48 0.533333361 0.07897259 0.5625 0 0 0.323232323 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.0718695 0.5625 0 0 0.282828271 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +30 0.333333343 0.146356344 0.6875 0 0 0.353535354 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 +58 0.644444466 0.0234309174 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.0965632945 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family Black Male United-States 0 +53 0.5888889 0.05832809 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +74 0.822222233 0.07881498 0.625 0 0 0.161616161 State-gov Some-college Separated Sales Not-in-family White Male United-States 0 +64 0.7111111 0.07055678 0.625 0 0 0.08080808 ? Some-college Widowed ? Unmarried White Female United-States 0 +45 0.5 0.0375293419 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.32403475 0.1875 0 0 0.1010101 State-gov 5th-6th Never-married Machine-op-inspct Own-child White Female United-States 0 +23 0.25555557 0.1897131 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child Black Female United-States 0 +38 0.422222227 0.125375077 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 +42 0.466666669 0.06501225 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.126218349 0.625 0.0115101151 0 0.4040404 Local-gov Some-college Never-married Protective-serv Unmarried Other Male United-States 0 +63 0.7 0.122012794 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.252689928 0.625 0 0 0.353535354 Local-gov Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +37 0.411111116 0.242972851 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 +28 0.311111122 0.282920867 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male Italy 0 +31 0.344444454 0.0927329 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +46 0.51111114 0.0191411767 0.9375 1 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.06817112 0.8125 0 0 0.444444448 Private Bachelors Divorced Sales Unmarried White Male United-States 1 +42 0.466666669 0.143475637 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 1 +45 0.5 0.139785349 1 0 0 0.4040404 Private Doctorate Separated Exec-managerial Unmarried White Male United-States 1 +52 0.5777778 0.0978867859 0.8125 0 0 0.6060606 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 +40 0.444444448 0.07227429 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.131559476 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +55 0.6111111 0.132097632 0.8125 0 0 0.4040404 Private Bachelors Separated Craft-repair Not-in-family White Male ? 0 +17 0.188888893 0.118181728 0.375 0 0 0.141414136 Private 10th Never-married Other-service Own-child White Female United-States 0 +27 0.3 0.133295849 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +71 0.788888931 0.07955722 0.625 0.200512 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.116232522 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +17 0.188888893 0.0168727133 0.375 0 0 0.161616161 Private 10th Never-married Other-service Own-child White Male United-States 0 +26 0.2888889 0.141923144 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +22 0.244444445 0.123312712 0.625 0 0 0.353535354 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 +51 0.566666663 0.06680452 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.19123058 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.2670342 0.75 0 0 0.5050505 Local-gov Assoc-acdm Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +50 0.5555556 0.106876455 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.136115253 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +21 0.233333334 0.192042872 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Female United-States 0 +53 0.5888889 0.14725484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +32 0.355555564 0.0668880343 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.111473322 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +22 0.244444445 0.08235441 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +58 0.644444466 0.099485755 0.5625 0.1502415 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.0298086163 0.8125 0 0 0.6060606 Federal-gov Bachelors Married-spouse-absent Exec-managerial Not-in-family White Male United-States 1 +51 0.566666663 0.131335855 0.625 0 0 0.454545468 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.233022049 0.8125 0 0 0.4848485 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.0214466844 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +29 0.322222233 0.096707426 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female Vietnam 0 +50 0.5555556 0.108734064 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.213523224 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +47 0.5222222 0.106722213 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Divorced Other-service Not-in-family White Female United-States 0 +60 0.6666667 0.152139992 0.625 0 0 0.272727281 Private Some-college Widowed Sales Unmarried White Female United-States 0 +46 0.51111114 0.118756928 0.5625 0.07298073 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Own-child White Female United-States 1 +58 0.644444466 0.174366623 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +62 0.6888889 0.0181625318 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.136600882 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 +59 0.655555546 0.02385053 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 +41 0.455555558 0.128567636 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried White Female Mexico 0 +31 0.344444454 0.122692391 0.5625 0 0 0.373737365 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +18 0.2 0.2375152 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +64 0.7111111 0.14409934 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.0909958556 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +47 0.5222222 0.06909319 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 +68 0.75555557 0.151957467 0.8125 0 0 0.353535354 Private Bachelors Widowed Sales Not-in-family White Male United-States 1 +32 0.355555564 0.162861988 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife Other Female United-States 0 +39 0.433333337 0.234008774 0.3125 0 0 0.434343427 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +37 0.411111116 0.205602467 0.75 0 0 0.4848485 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 +29 0.322222233 0.09485386 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +44 0.4888889 0.1963811 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband Other Male United-States 0 +46 0.51111114 0.136772633 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.10446924 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.170237184 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Own-child Black Male United-States 0 +65 0.722222269 0.272512734 0.5625 0.02414024 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +52 0.5777778 0.0675056651 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +40 0.444444448 0.0427714624 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +61 0.677777767 0.06461149 0.3125 0 0 0.4040404 Private 9th Divorced Other-service Not-in-family White Male United-States 0 +30 0.333333343 0.1263672 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +61 0.677777767 0.0620850623 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Other-service Husband White Male United-States 0 +33 0.366666675 0.1484214 0.6875 0 0 0.8484849 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 +32 0.355555564 0.141374886 0.8125 0 0 0.656565666 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.183454633 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.117096663 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Divorced Prof-specialty Other-relative White Male United-States 1 +37 0.411111116 0.187864929 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +53 0.5888889 0.218607739 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.08416689 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +29 0.322222233 0.142317161 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Sales Not-in-family Black Male United-States 0 +48 0.533333361 0.129851386 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +69 0.7666667 0.123163864 0.5625 0.158311576 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 1 +28 0.311111122 0.0315672159 0.875 0 0 0.4040404 Private Masters Never-married Tech-support Not-in-family White Female United-States 0 +55 0.6111111 0.02112541 0.8125 0 0 0.4040404 Local-gov Bachelors Widowed Prof-specialty Not-in-family White Female United-States 1 +45 0.5 0.09979828 0.6875 0.1502415 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.09607767 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +60 0.6666667 0.07828491 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.07335262 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male ? 0 +19 0.211111113 0.334060967 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +18 0.2 0.22497803 0.4375 0 0 0.25252524 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +33 0.366666675 0.180891827 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +33 0.366666675 0.144010425 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 +29 0.322222233 0.162771061 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.108385168 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.07224668 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +19 0.211111113 0.0280250963 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Male United-States 0 +28 0.311111122 0.08719578 0.375 0 0.5137741 0.353535354 Private 10th Widowed Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.07402952 0.8125 0 0 0.07070707 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 +23 0.25555557 0.112765841 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 +47 0.5222222 0.18190752 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.219520375 0.625 0 0 0.353535354 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +19 0.211111113 0.131275237 0.625 0 0 0.121212125 Private Some-college Never-married Other-service Own-child White Female United-States 0 +47 0.5222222 0.123584151 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +36 0.4 0.103095233 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +62 0.6888889 0.03788497 0.8125 0 0.5544077 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +65 0.722222269 0.07089085 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +46 0.51111114 0.113285132 0.9375 0 0.43663913 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.112975307 0.4375 0.068490684 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +50 0.5555556 0.09854483 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +20 0.222222224 0.172764286 0.625 0 0 0.0606060624 Private Some-college Never-married Sales Own-child White Female United-States 0 +17 0.188888893 0.08178393 0.4375 0 0 0.161616161 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 +33 0.366666675 0.09863239 0.625 0 0.399449021 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.104572289 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Female United-States 0 +53 0.5888889 0.06656474 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +47 0.5222222 0.161190942 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +62 0.6888889 0.09077089 0.875 0 0 0.353535354 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.375092715 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Male United-States 0 +27 0.3 0.0322670154 0.8125 0 0 0.434343427 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +23 0.25555557 0.07702339 0.5625 0 0 0.5050505 Private HS-grad Never-married Tech-support Own-child White Male United-States 0 +27 0.3 0.1276092 0.875 0 0.3452709 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +39 0.433333337 0.0610532053 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +25 0.2777778 0.15687561 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +24 0.266666681 0.129454 0.625 0 0 0.2020202 Private Some-college Never-married Exec-managerial Not-in-family Black Female United-States 0 +23 0.25555557 0.0187080931 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +29 0.322222233 0.0925948247 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +30 0.333333343 0.0678478256 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +34 0.377777785 0.07526478 0.5625 0 0 0.454545468 Private HS-grad Separated Craft-repair Not-in-family White Male Portugal 0 +32 0.355555564 0.1244914 0.375 0 0 0.4040404 Private 10th Separated Craft-repair Unmarried White Female United-States 0 +18 0.2 0.279328883 0.4375 0 0.3677686 0.232323229 Private 11th Never-married Other-service Own-child Black Male United-States 0 +20 0.222222224 0.102229066 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Sales Not-in-family Black Female United-States 0 +38 0.422222227 0.137150481 0.8125 0 0 0.454545468 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.09251872 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child White Female United-States 0 +41 0.455555558 0.116054706 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.184146345 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 +36 0.4 0.025547836 0.5625 0 0 0.4848485 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +61 0.677777767 0.06535305 0.625 0 0 0.3030303 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.0367803723 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +26 0.2888889 0.07310678 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +27 0.3 0.170952484 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 +45 0.5 0.2838355 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +47 0.5222222 0.139515936 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.09305081 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +29 0.322222233 0.0316473655 0.5625 0 0 0.5555556 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +51 0.566666663 0.12337333 0.5625 0 0 0.7070707 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.154597044 0.75 0 0 0.6060606 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +42 0.466666669 0.216032147 0.5625 0.03908039 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.173371151 0.1875 0 0 0.4040404 Private 5th-6th Never-married Farming-fishing Other-relative Black Male Mexico 0 +20 0.222222224 0.291001916 0.625 0 0 0.151515156 State-gov Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +43 0.477777779 0.2675818 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 1 +20 0.222222224 0.0255949832 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +27 0.3 0.0684432238 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +46 0.51111114 0.224103108 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.07760128 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +33 0.366666675 0.120191559 0.625 0 0 0.4949495 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +42 0.466666669 0.124783717 0.6875 0 0 0.323232323 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +23 0.25555557 0.276444823 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +29 0.322222233 0.0576356947 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +27 0.3 0.056251578 0.5625 0 0 0.6060606 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +43 0.477777779 0.131154671 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Divorced Craft-repair Own-child White Male United-States 0 +23 0.25555557 0.217332065 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +40 0.444444448 0.023263881 0.875 0 0 0.444444448 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +35 0.3888889 0.142164946 0.625 0 0 0.616161644 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +30 0.333333343 0.131272539 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Other-relative White Male United-States 0 +59 0.655555546 0.07884327 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +65 0.722222269 0.05312503 0.625 0.02290023 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.0346607566 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +79 0.8777778 0.179240331 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +43 0.477777779 0.0622170754 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Wife Black Female United-States 1 +54 0.6 0.118045 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.140262887 0.5625 0 0 0.6262626 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +30 0.333333343 0.132272065 0.8125 0.1502415 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.0745077357 0.8125 0 0 0.151515156 ? Bachelors Never-married ? Own-child Asian-Pac-Islander Female Taiwan 0 +34 0.377777785 0.0989960954 0.5625 0 0 0.656565666 Private HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 +18 0.2 0.0760918856 0.4375 0 0 0.0303030312 Private 11th Never-married Prof-specialty Other-relative White Male United-States 0 +40 0.444444448 0.118503675 0.6875 0 0.453856736 0.151515156 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +28 0.311111122 0.109964609 0.3125 0.04508045 0 0.4040404 Private 9th Married-civ-spouse Sales Husband White Male United-States 0 +18 0.2 0.142069981 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +46 0.51111114 0.0978578255 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.134027973 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +77 0.8555556 0.117792428 0.625 0 0 0.0606060624 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +41 0.455555558 0.0246857125 0.875 0 0.4242424 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.128020048 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 1 +29 0.322222233 0.0330617875 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +41 0.455555558 0.0852842852 0.4375 0 0 0.4040404 Private 11th Divorced Handlers-cleaners Unmarried White Female United-States 0 +41 0.455555558 0.117322296 0.3125 0 0 0.4040404 Private 9th Separated Other-service Not-in-family White Male United-States 0 +34 0.377777785 0.07988456 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +49 0.544444442 0.254341453 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Divorced Sales Not-in-family White Male United-States 0 +49 0.544444442 0.105928116 0.5625 0 0 0.5050505 Private HS-grad Separated Sales Unmarried White Male United-States 0 +30 0.333333343 0.0528926626 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +28 0.311111122 0.128234908 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +62 0.6888889 0.109569244 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.07003412 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +20 0.222222224 0.1978346 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +61 0.677777767 0.06624211 0.0625 0 0 0.4040404 Private Preschool Married-spouse-absent Other-service Not-in-family Asian-Pac-Islander Male China 0 +30 0.333333343 0.139871553 0.8125 0 0 0.6060606 Private Bachelors Never-married Tech-support Not-in-family White Male Hungary 0 +29 0.322222233 0.02762367 0.9375 0 0 0.5555556 Federal-gov Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 +50 0.5555556 0.126749754 0.875 0 0.365013778 0.454545468 Private Masters Divorced Sales Not-in-family White Female United-States 0 +44 0.4888889 0.215578854 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +25 0.2777778 0.206713125 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +62 0.6888889 0.112919405 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Not-in-family White Female United-States 0 +57 0.6333333 0.116912119 0.625 0 0 0.4040404 Private Some-college Widowed Machine-op-inspct Unmarried White Female United-States 0 +35 0.3888889 0.184287116 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +26 0.2888889 0.131713033 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +60 0.6666667 0.1255778 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +22 0.244444445 0.2818102 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.0281490274 0.875 0 0 0.5050505 Local-gov Masters Separated Prof-specialty Not-in-family White Female ? 0 +26 0.2888889 0.123906769 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +26 0.2888889 0.238959253 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +44 0.4888889 0.133424491 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.493095934 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +66 0.733333349 0.06590333 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.132469416 0.0625 0 0 0.3030303 Private Preschool Never-married Machine-op-inspct Own-child White Female United-States 0 +19 0.211111113 0.215540469 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Male United-States 0 +54 0.6 0.200858086 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.198778212 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +38 0.422222227 0.24795498 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.126227766 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Transport-moving Husband White Male ? 0 +22 0.244444445 0.0815448239 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Male United-States 0 +34 0.377777785 0.1428991 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.07287508 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Divorced Craft-repair Own-child Amer-Indian-Eskimo Male United-States 0 +42 0.466666669 0.198309436 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +47 0.5222222 0.136431143 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +29 0.322222233 0.179207325 0.8125 0 0 0.8080808 Self-emp-inc Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +34 0.377777785 0.2331251 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 +38 0.422222227 0.207910672 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +62 0.6888889 0.1590188 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family Black Male United-States 0 +35 0.3888889 0.126429826 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.160947129 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +47 0.5222222 0.06301387 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +37 0.411111116 0.2222529 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.08419855 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Priv-house-serv Not-in-family White Female United-States 0 +60 0.6666667 0.06123439 0.4375 0 0 0.4040404 Self-emp-inc 11th Married-civ-spouse Transport-moving Husband White Male United-States 1 +31 0.344444454 0.195143819 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +74 0.822222233 0.0223034211 0.375 0.01797018 0 0.3030303 ? 10th Married-civ-spouse ? Husband Amer-Indian-Eskimo Male United-States 0 +63 0.7 0.138783127 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.1289044 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +44 0.4888889 0.181048766 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 +40 0.444444448 0.128934041 0.9375 0.1502415 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.134540528 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +50 0.5555556 0.06229251 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.115233667 0.625 0 0 0.1010101 Private Some-college Never-married Sales Own-child White Female United-States 0 +33 0.366666675 0.07598816 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 +59 0.655555546 0.022128975 0.25 0 0 0.7070707 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +17 0.188888893 0.0962911844 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 +47 0.5222222 0.0600429066 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 1 +51 0.566666663 0.09901967 0.625 0 0 0.5050505 ? Some-college Divorced ? Not-in-family Black Male United-States 0 +26 0.2888889 0.19665052 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +32 0.355555564 0.01969078 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Wife White Female France 1 +55 0.6111111 0.160446689 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.21804063 0.625 0 0 0.4040404 State-gov Some-college Never-married Tech-support Unmarried Black Female United-States 0 +54 0.6 0.0954149142 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +19 0.211111113 0.14714776 0.5625 0 0.3677686 0.3030303 ? HS-grad Never-married ? Own-child White Female United-States 0 +32 0.355555564 0.0798481852 0.875 0 0 0.454545468 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 +52 0.5777778 0.0236356724 1 0 0 0.4040404 Local-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.09409479 0.5625 0 0 0.282828271 Private HS-grad Married-spouse-absent Sales Unmarried Black Female Jamaica 0 +39 0.433333337 0.138876081 0.5625 0 0 0.454545468 Federal-gov HS-grad Never-married Exec-managerial Unmarried White Female United-States 0 +59 0.655555546 0.120126896 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.113916911 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Prof-specialty Unmarried White Male United-States 0 +54 0.6 0.06949461 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +31 0.344444454 0.238743722 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +19 0.211111113 0.08395675 0.4375 0 0 0.25252524 ? 11th Never-married ? Own-child Black Male United-States 0 +30 0.333333343 0.040698994 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Own-child Amer-Indian-Eskimo Female United-States 0 +47 0.5222222 0.06649537 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-spouse-absent Exec-managerial Not-in-family White Female United-States 0 +31 0.344444454 0.09016 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Male United-States 0 +32 0.355555564 0.121440291 0.8125 0 0 0.474747479 Self-emp-not-inc Bachelors Divorced Craft-repair Unmarried Asian-Pac-Islander Male Iran 0 +33 0.366666675 0.149069354 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Unmarried Black Female United-States 0 +31 0.344444454 0.219341889 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +32 0.355555564 0.141820773 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +46 0.51111114 0.102544948 0.5625 0 0 0.353535354 Private HS-grad Married-spouse-absent Other-service Not-in-family White Male Mexico 0 +29 0.322222233 0.120326266 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Other-service Not-in-family White Female France 0 +41 0.455555558 0.03300117 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +39 0.433333337 0.163944349 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.109410286 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +23 0.25555557 0.136780038 0.8125 0 0 0.24242425 Private Bachelors Never-married Adm-clerical Own-child Black Male United-States 0 +53 0.5888889 0.105059929 0.875 0 0 0.656565666 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.123039261 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-spouse-absent Craft-repair Not-in-family Asian-Pac-Islander Male Thailand 0 +34 0.377777785 0.114686757 0.8125 0 0 0.1010101 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 +47 0.5222222 0.07097774 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +24 0.266666681 0.172586471 0.25 0 0 0.6060606 ? 7th-8th Married-civ-spouse ? Own-child White Male United-States 0 +42 0.466666669 0.141627461 0.875 0.0468704663 0 0.353535354 Private Masters Divorced Tech-support Unmarried Black Female United-States 1 +53 0.5888889 0.10169024 0.625 0.031370312 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.09536171 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Divorced Sales Unmarried White Male United-States 0 +26 0.2888889 0.076493986 0.5625 0 0 0.7070707 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +18 0.2 0.103784256 0.4375 0 0 0.2020202 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +43 0.477777779 0.0338094123 0.375 0 0 0.4040404 Private 10th Separated Other-service Not-in-family Black Female United-States 0 +26 0.2888889 0.08929181 0.8125 0 0 0.323232323 Private Bachelors Never-married Adm-clerical Own-child Black Female United-States 0 +47 0.5222222 0.160425812 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.07594371 0.6875 0 0 0.656565666 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.240471348 0.625 0.02105021 0 0.2020202 ? Some-college Married-civ-spouse ? Wife Black Female United-States 0 +32 0.355555564 0.143724844 0.625 0 0.396235079 0.3838384 State-gov Some-college Divorced Protective-serv Unmarried White Female United-States 0 +48 0.533333361 0.193740174 1 0.07688077 0 0.5555556 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.101071261 0.875 0.1502015 0 0.6060606 Private Masters Divorced Exec-managerial Unmarried Black Female United-States 1 +58 0.644444466 0.09649459 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +55 0.6111111 0.0458043851 0.25 0 0 0.6060606 Self-emp-not-inc 7th-8th Never-married Other-service Other-relative White Female United-States 0 +40 0.444444448 0.1933576 0.5625 0 0 0.5555556 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +33 0.366666675 0.150340974 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +74 0.822222233 0.117147177 1 0 0 0.25252524 Self-emp-not-inc Doctorate Married-spouse-absent Prof-specialty Not-in-family White Male United-States 1 +49 0.544444442 0.12272539 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Widowed Farming-fishing Not-in-family White Male United-States 0 +56 0.622222245 0.0421221741 0.4375 0 0 0.656565666 Self-emp-not-inc 11th Widowed Other-service Unmarried White Female Greece 1 +29 0.322222233 0.106157117 0.8125 0.143441439 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +25 0.2777778 0.205745921 0.75 0 0 0.4848485 Private Assoc-acdm Never-married Machine-op-inspct Own-child Black Male United-States 0 +57 0.6333333 0.3692693 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +29 0.322222233 0.0271400716 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +28 0.311111122 0.075707294 0.5625 0.0235402342 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +59 0.655555546 0.020971844 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.0782229453 0.8125 0.2782828 0 0.6060606 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +28 0.311111122 0.08609994 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +19 0.211111113 0.135880873 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +40 0.444444448 0.161666468 0.625 0 0 0.454545468 Private Some-college Never-married Sales Unmarried Black Female United-States 0 +28 0.311111122 0.08748001 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +48 0.533333361 0.239704192 0.8125 0 0 0.5555556 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +20 0.222222224 0.072511375 0.625 0 0 0.1010101 Private Some-college Never-married Tech-support Not-in-family White Female Canada 0 +58 0.644444466 0.09216713 0.8125 1 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +19 0.211111113 0.0987933651 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Own-child Black Male United-States 0 +75 0.8333334 0.0240613464 0.5625 0 0 0.08080808 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +24 0.266666681 0.0284575056 0.8125 0 0 0.3030303 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +31 0.344444454 0.07667382 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.1902048 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +41 0.455555558 0.0224495772 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.0276357941 0.625 0 0 0.353535354 Federal-gov Some-college Never-married Sales Not-in-family White Female United-States 0 +46 0.51111114 0.1047272 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +33 0.366666675 0.0357256159 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Own-child Black Male United-States 0 +34 0.377777785 0.117726423 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +47 0.5222222 0.136772633 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +81 0.900000036 0.119490407 0.5625 0 0.5456841 0.262626261 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.145905077 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried Other Male Columbia 0 +35 0.3888889 0.06266161 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male Cambodia 0 +59 0.655555546 0.1266265 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Widowed Prof-specialty Not-in-family White Female United-States 1 +46 0.51111114 0.04414008 0.8125 0 0 0.4848485 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.2470235 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.279210359 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child Black Male United-States 0 +25 0.2777778 0.199311659 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Unmarried White Female United-States 0 +37 0.411111116 0.02315477 0.125 0 0 0.4040404 Private 1st-4th Never-married Other-service Not-in-family White Male United-States 0 +49 0.544444442 0.0393068 0.625 0.1502415 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.320827365 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.172036871 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +34 0.377777785 0.118445083 0.625 0 0 0.4040404 Local-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +40 0.444444448 0.08398436 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.0798481852 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +78 0.8666667 0.196684867 0.25 0 0 0.2020202 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +31 0.344444454 0.194359154 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +61 0.677777767 0.0927679241 0.625 0 0 0.25252524 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +22 0.244444445 0.0265588127 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.09330945 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Laos 0 +37 0.411111116 0.477835685 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Other-relative Black Male United-States 0 +35 0.3888889 0.13121058 0.4375 0 0 0.4040404 Private 11th Divorced Machine-op-inspct Unmarried White Female United-States 0 +52 0.5777778 0.0599721856 0.875 0.1502415 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.201447427 0.5625 0 0 0.3030303 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +18 0.2 0.107469834 0.4375 0 0 0.2020202 Private 11th Never-married Transport-moving Own-child White Male United-States 0 +37 0.411111116 0.159175053 0.375 0 0 0.4848485 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.181211084 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +25 0.2777778 0.132435068 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child White Male United-States 0 +47 0.5222222 0.218089119 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.311894953 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.134474531 0.625 0 0.399449021 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife Other Female ? 0 +25 0.2777778 0.06651557 0.625 0 0 0.5050505 Self-emp-inc Some-college Divorced Adm-clerical Own-child White Female United-States 0 +50 0.5555556 0.108489566 0.5625 0 0 0.4040404 State-gov HS-grad Widowed Tech-support Unmarried Black Female United-States 0 +18 0.2 0.129645288 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child Black Male United-States 0 +25 0.2777778 0.13577041 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Not-in-family White Male Mexico 0 +23 0.25555557 0.0792117 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +51 0.566666663 0.119543612 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +47 0.5222222 0.160120025 0.5625 0.0282902829 0 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +37 0.411111116 0.0406228863 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +37 0.411111116 0.181894049 0.625 0.25236252 0 0.25252524 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 1 +27 0.3 0.114472575 0.1875 0 0 0.4040404 Private 5th-6th Never-married Craft-repair Own-child White Male ? 0 +19 0.211111113 0.162110329 0.4375 0 0 0.25252524 Private 11th Never-married Sales Own-child White Female United-States 0 +52 0.5777778 0.08405239 0.5 0 0 0.4040404 Local-gov 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.07674791 0.6875 0 0 0.454545468 Self-emp-not-inc Assoc-voc Married-civ-spouse Other-service Wife White Female United-States 0 +17 0.188888893 0.162335962 0.5 0 0 0.4040404 ? 12th Never-married ? Own-child Other Female United-States 0 +21 0.233333334 0.09945074 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +41 0.455555558 0.026184326 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +55 0.6111111 0.07900492 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.0773305148 0.375 0 0 0.4040404 ? 10th Separated ? Unmarried White Female United-States 0 +24 0.266666681 0.09180949 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +41 0.455555558 0.103139684 0.8125 0 0 0.3838384 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.133058086 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 +33 0.366666675 0.0469776839 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +29 0.322222233 0.1183656 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 +50 0.5555556 0.0529728122 0.625 0 0 0.4040404 State-gov Some-college Married-spouse-absent Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 +37 0.411111116 0.1271458 0.4375 0 0 0.6060606 Self-emp-inc 11th Married-spouse-absent Sales Not-in-family White Male ? 0 +48 0.533333361 0.1048417 0.6875 0.07688077 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.145410031 0.625 0 0 0.1010101 Federal-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.0976140052 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.02269003 0.5625 0 0.383149683 0.7070707 Private HS-grad Never-married Transport-moving Unmarried White Female United-States 0 +65 0.722222269 0.176766425 0.4375 0 0 0.2020202 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 +44 0.4888889 0.128843784 0.8125 0 0 0.4848485 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +32 0.355555564 0.188032642 0.8125 0 0 0.454545468 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 +41 0.455555558 0.103071652 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.136214942 0.25 0 0 0.5555556 Private 7th-8th Married-civ-spouse Prof-specialty Husband White Male United-States 0 +44 0.4888889 0.316193461 0.6875 0.07298073 0 0.4848485 Federal-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 +39 0.433333337 0.110564724 0.75 0 0 0.5555556 Local-gov Assoc-acdm Divorced Other-service Unmarried White Female United-States 0 +59 0.655555546 0.1323374 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +31 0.344444454 0.118666671 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male France 1 +34 0.377777785 0.193516567 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +20 0.222222224 0.07894497 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +33 0.366666675 0.02802577 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +52 0.5777778 0.10823901 1 0 0 0.656565666 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.0542269349 0.75 0 0 0.444444448 Private Assoc-acdm Divorced Tech-support Not-in-family White Female United-States 0 +39 0.433333337 0.147608444 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.07162837 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.04640585 0.5625 0 0.488751143 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.110449553 0.9375 0 0 0.323232323 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.18245174 0.75 0 0 0.656565666 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 +17 0.188888893 0.138563558 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Female United-States 0 +23 0.25555557 0.147436023 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Own-child White Female United-States 0 +35 0.3888889 0.125400677 0.5625 0.1502415 0 0.8080808 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +19 0.211111113 0.167541027 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 +30 0.333333343 0.133062124 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +27 0.3 0.118888266 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.078682296 0.5625 0 0 0.5050505 ? HS-grad Never-married ? Own-child White Male United-States 0 +27 0.3 0.0867041 0.6875 0.105201051 0 0.656565666 Private Assoc-voc Never-married Exec-managerial Not-in-family White Male Greece 1 +37 0.411111116 0.145148709 0.5625 0.04386044 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.152305678 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.118445083 0.8125 0.03103031 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.189356133 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family White Female United-States 0 +41 0.455555558 0.06604747 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +34 0.377777785 0.175496146 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.195263714 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +51 0.566666663 0.04013592 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +24 0.266666681 0.1594721 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Exec-managerial Own-child White Male United-States 0 +38 0.422222227 0.285319984 0.5625 0 0 0.24242425 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 1 +24 0.266666681 0.196272671 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +53 0.5888889 0.06737298 1 0 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.137733757 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.135838434 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +45 0.5 0.103931762 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +31 0.344444454 0.1012484 0.4375 0 0 0.5050505 Private 11th Divorced Farming-fishing Not-in-family White Male United-States 0 +38 0.422222227 0.2233501 0.625 0 0 0.474747479 Local-gov Some-college Widowed Transport-moving Not-in-family Black Female United-States 0 +28 0.311111122 0.06791181 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +38 0.422222227 0.136841327 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +25 0.2777778 0.0822217241 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +29 0.322222233 0.120413147 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +29 0.322222233 0.186127886 0.5625 0 0 0.5050505 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 +48 0.533333361 0.157277718 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +24 0.266666681 0.1949532 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child Asian-Pac-Islander Female Philippines 0 +31 0.344444454 0.116757207 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +36 0.4 0.0879562 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +62 0.6888889 0.06352643 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.200397387 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 +55 0.6111111 0.0873991847 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +21 0.233333334 0.122996829 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Female Poland 0 +60 0.6666667 0.0808692649 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +41 0.455555558 0.122832485 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Own-child White Male United-States 0 +43 0.477777779 0.0410512537 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.128315732 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +47 0.5222222 0.126755819 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +50 0.5555556 0.0603042357 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +41 0.455555558 0.08475152 0.5625 0 0.4331956 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.123497933 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male Puerto-Rico 0 +38 0.422222227 0.05053125 0.25 0 0 0.4040404 ? 7th-8th Divorced ? Not-in-family White Female United-States 0 +30 0.333333343 0.169137985 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family White Male England 0 +35 0.3888889 0.07337889 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 +25 0.2777778 0.0627889 0.625 0 0 0.353535354 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +61 0.677777767 0.09927427 0.9375 0 0 0.2020202 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 0 +71 0.788888931 0.0308485534 0.5625 0 0 0.7070707 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +35 0.3888889 0.151804566 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 +35 0.3888889 0.0160920862 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 +38 0.422222227 0.121012591 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male Scotland 0 +27 0.3 0.27278012 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 +51 0.566666663 0.046394404 0.125 0 0 0.353535354 Private 1st-4th Widowed Other-service Unmarried White Female Portugal 0 +55 0.6111111 0.130709469 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Divorced Sales Not-in-family White Female United-States 0 +45 0.5 0.24081552 0.8125 0 0.459595948 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.124830186 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +25 0.2777778 0.102716029 0.625 0 0 0.4040404 State-gov Some-college Never-married Tech-support Not-in-family Black Male United-States 0 +52 0.5777778 0.113015048 1 0 0 0.3838384 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.0650311038 0.625 0 0 0.171717167 Private Some-college Divorced Machine-op-inspct Own-child White Female United-States 0 +34 0.377777785 0.114182279 0.625 0.04386044 0 0.2020202 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 +52 0.5777778 0.171269715 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +47 0.5222222 0.021895932 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +46 0.51111114 0.08452319 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family Black Female United-States 0 +36 0.4 0.125300989 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +69 0.7666667 0.113688581 0.25 0 0 0.4848485 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +34 0.377777785 0.129221633 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +36 0.4 0.145148709 0.5625 0 0 0.656565666 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +31 0.344444454 0.126328126 0.5625 0.0217402168 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +31 0.344444454 0.170237184 0.5625 0 0.5544077 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 +38 0.422222227 0.142109722 0.8125 0 0.399449021 0.4040404 Local-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.128475353 0.625 0 0 0.353535354 Local-gov Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +24 0.266666681 0.07932013 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Sales Own-child White Male United-States 0 +37 0.411111116 0.202781022 0.5625 0 0 0.454545468 Private HS-grad Divorced Farming-fishing Unmarried White Male United-States 0 +69 0.7666667 0.137835458 0.625 0.09386094 0 0.727272749 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.125400677 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.08877724 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Unmarried White Male United-States 0 +34 0.377777785 0.105268054 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +21 0.233333334 0.08391499 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +21 0.233333334 0.177017659 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +61 0.677777767 0.0643225461 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.162527919 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +29 0.322222233 0.160759211 0.625 0 0 0.5555556 Private Some-college Never-married Sales Not-in-family Black Male Outlying-US(Guam-USVI-etc) 0 +18 0.2 0.0284857936 0.375 0 0 0.3030303 ? 10th Never-married ? Own-child White Female United-States 0 +41 0.455555558 0.113201618 0.5625 0 0 0.454545468 Local-gov HS-grad Divorced Exec-managerial Own-child White Male United-States 0 +42 0.466666669 0.227404773 0.5 0 0 0.6060606 Private 12th Married-civ-spouse Craft-repair Husband Black Male ? 1 +52 0.5777778 0.113154471 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 1 +38 0.422222227 0.06584406 0.5 0 0 0.171717167 Private 12th Never-married Other-service Unmarried White Female United-States 0 +51 0.566666663 0.07213285 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +55 0.6111111 0.05176786 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Other-relative Asian-Pac-Islander Male Philippines 0 +20 0.222222224 0.0471986 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 +23 0.25555557 0.2101542 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +24 0.266666681 0.117287949 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.08479261 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Other-relative White Male United-States 0 +22 0.244444445 0.1417615 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +22 0.244444445 0.105968527 0.625 0 0 0.151515156 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.02072533 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +28 0.311111122 0.215374783 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Sales Husband White Male France 1 +34 0.377777785 0.140836731 0.8125 0.05178052 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.21863535 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Male United-States 0 +48 0.533333361 0.180664852 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.119962551 0.5625 0 0 0.434343427 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +31 0.344444454 0.0174815878 0.3125 0 0 0.353535354 Private 9th Never-married Craft-repair Own-child Amer-Indian-Eskimo Male United-States 0 +65 0.722222269 0.0831707343 0.5625 0 0 0.25252524 ? HS-grad Widowed ? Other-relative White Female United-States 0 +56 0.622222245 0.0873991847 0.625 0 0 0.353535354 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.07308254 0.6875 0 0 0.75757575 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Not-in-family Amer-Indian-Eskimo Male United-States 0 +27 0.3 0.162730649 0.8125 0 0 0.5050505 Private Bachelors Never-married Tech-support Other-relative White Male United-States 0 +27 0.3 0.1443957 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 +30 0.333333343 0.12325681 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.195838913 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +50 0.5555556 0.115796745 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.0654601455 0.625 0 0 0.222222224 Private Some-college Never-married Sales Own-child White Female United-States 0 +42 0.466666669 0.131403878 0.5625 0.0406404063 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +37 0.411111116 0.22165212 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +26 0.2888889 0.03931488 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +32 0.355555564 0.172674716 0.5 0 0 0.4040404 ? 12th Never-married ? Own-child Black Female United-States 0 +43 0.477777779 0.0241287 0.625 0 0 0.4040404 Private Some-college Separated Prof-specialty Unmarried White Female United-States 0 +47 0.5222222 0.116703995 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +26 0.2888889 0.263587058 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +24 0.266666681 0.0580270179 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.19926855 0.4375 0 0 0.7070707 Private 11th Divorced Other-service Not-in-family White Female United-States 0 +33 0.366666675 0.2208533 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.192026034 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female Taiwan 1 +57 0.6333333 0.120126896 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.018939117 0.5625 0 0 0.07070707 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +42 0.466666669 0.13303788 0.625 0 0 0.4040404 Private Some-college Separated Machine-op-inspct Unmarried Black Female United-States 0 +25 0.2777778 0.07310678 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +56 0.622222245 0.121088706 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.08552137 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +23 0.25555557 0.121276617 0.8125 0 0 0.5050505 Private Bachelors Never-married Machine-op-inspct Own-child White Male United-States 0 +35 0.3888889 0.0262328219 0.625 0 0 0.5050505 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +28 0.311111122 0.18291311 0.3125 0 0 0.5252525 Private 9th Never-married Other-service Other-relative White Male United-States 0 +41 0.455555558 0.119421035 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.160548389 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +37 0.411111116 0.116004191 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 +22 0.244444445 0.103592969 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Unmarried Other Male Puerto-Rico 0 +30 0.333333343 0.0178776253 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Not-in-family White Male United-States 0 +42 0.466666669 0.0734603852 0.8125 0 0 0.4040404 Private Bachelors Separated Tech-support Not-in-family White Male United-States 0 +38 0.422222227 0.1439451 0.6875 0 0 0.3030303 Private Assoc-voc Divorced Other-service Not-in-family White Female United-States 0 +49 0.544444442 0.100901529 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Other-service Husband White Male ? 0 +27 0.3 0.125055149 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.157506719 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +68 0.75555557 0.129353642 0.625 0 0.5640496 0.4040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +41 0.455555558 0.130345091 0.5625 0 0.3409091 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.143722162 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +23 0.25555557 0.0257546119 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Male United-States 0 +68 0.75555557 0.07034259 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Ireland 1 +17 0.188888893 0.136285663 0.375 0 0 0.25252524 Private 10th Never-married Other-service Own-child White Male United-States 0 +45 0.5 0.0292542968 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +45 0.5 0.0687995255 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 1 +30 0.333333343 0.1561428 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +49 0.544444442 0.166617617 0.625 0 0 0.2020202 State-gov Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +42 0.466666669 0.0530509427 0.625 0.03103031 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.123982884 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Female United-States 0 +21 0.233333334 0.0693349838 0.625 0 0.459366381 0.4040404 Local-gov Some-college Never-married Other-service Not-in-family White Female United-States 0 +20 0.222222224 0.174061522 0.625 0 0 0.1919192 Private Some-college Never-married Other-service Own-child White Female United-States 0 +59 0.655555546 0.164715558 0.4375 0 0 0.353535354 Private 11th Divorced Other-service Not-in-family Black Female United-States 0 +26 0.2888889 0.170111239 0.375 0 0 0.5555556 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.176990047 0.875 0 0 0.373737365 Private Masters Never-married Other-service Not-in-family White Female United-States 0 +33 0.366666675 0.109497845 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +35 0.3888889 0.0442552567 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +45 0.5 0.06908376 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +66 0.733333349 0.2360725 0.625 0 0 0.282828271 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +67 0.7444445 0.107457042 0.1875 0 0 0.4040404 ? 5th-6th Widowed ? Unmarried Black Female United-States 0 +33 0.366666675 0.09589986 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Sales Not-in-family Other Male United-States 0 +38 0.422222227 0.154398352 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Other Male Puerto-Rico 0 +72 0.8 0.03809444 0.5625 0 0 0.121212125 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.0182184335 0.625 0 0 0.121212125 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +39 0.433333337 0.0245004911 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +41 0.455555558 0.130908161 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.166339442 0.625 0 0 0.121212125 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +49 0.544444442 0.128831655 0.625 0.1502415 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.180860847 0.8125 0 0 0.323232323 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +25 0.2777778 0.307538539 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +26 0.2888889 0.150510713 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +50 0.5555556 0.230212063 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.1175055 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +41 0.455555558 0.264138 0.375 0 0 0.4848485 Private 10th Divorced Sales Not-in-family White Male United-States 0 +60 0.6666667 0.141485348 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 +67 0.7444445 0.157056123 0.5625 0 0 0.07070707 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +77 0.8555556 0.119586051 0.8125 0.03818038 0 0.141414136 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +62 0.6888889 0.09652557 0.625 0 0 0.6060606 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +22 0.244444445 0.219797209 0.625 0 0 0.353535354 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +37 0.411111116 0.120621942 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +17 0.188888893 0.139850676 0.4375 0 0 0.1010101 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +52 0.5777778 0.0251154266 0.875 0 0 0.4040404 Federal-gov Masters Never-married Adm-clerical Not-in-family White Female United-States 1 +31 0.344444454 0.0242937151 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.0358623452 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.269349128 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Craft-repair Other-relative White Male Mexico 0 +38 0.422222227 0.1342664 0.625 0 0 0.454545468 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +23 0.25555557 0.231035128 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Female United-States 0 +22 0.244444445 0.156759769 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +61 0.677777767 0.262996346 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +55 0.6111111 0.195408523 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +23 0.25555557 0.163609609 0.625 0.046500463 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +39 0.433333337 0.0473090634 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Other-service Unmarried Asian-Pac-Islander Female Philippines 0 +38 0.422222227 0.192903638 1 0 0.4331956 0.5050505 Local-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.103617221 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +25 0.2777778 0.0925214142 0.8125 0 0 0.444444448 Private Bachelors Never-married Sales Unmarried Asian-Pac-Islander Male Philippines 0 +66 0.733333349 0.210988045 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.0678478256 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +32 0.355555564 0.1674299 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +43 0.477777779 0.0404127426 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.225677833 0.25 0 0 0.3030303 Private 7th-8th Never-married Sales Own-child White Male Mexico 0 +20 0.222222224 0.147680521 0.4375 0 0 0.6060606 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 +20 0.222222224 0.125836447 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Other-relative Black Male United-States 0 +34 0.377777785 0.1524781 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Unmarried Black Female United-States 0 +33 0.366666675 0.4107139 0.75 0 0 0.4040404 Private Assoc-acdm Married-spouse-absent Machine-op-inspct Unmarried White Male United-States 0 +40 0.444444448 0.207291692 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.1464668 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.07008261 0.5625 0 0.3996786 0.424242437 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +41 0.455555558 0.108366981 0.0625 0 0 0.3030303 Local-gov Preschool Never-married Handlers-cleaners Own-child White Female United-States 0 +20 0.222222224 0.04604147 0.625 0 0 0.121212125 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.16409725 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +44 0.4888889 0.0480021276 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +50 0.5555556 0.0484257825 0.1875 0 0 0.353535354 Private 5th-6th Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female Philippines 0 +38 0.422222227 0.14282164 0.9375 0 0 0.3030303 ? Prof-school Divorced ? Not-in-family White Female United-States 0 +30 0.333333343 0.07748341 0.5625 0 0 0.25252524 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Other-relative White Male United-States 0 +45 0.5 0.0754318237 0.625 0.046500463 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Male United-States 0 +25 0.2777778 0.141977027 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +22 0.244444445 0.0593559 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +25 0.2777778 0.384467632 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +63 0.7 0.09846805 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +55 0.6111111 0.11415197 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +26 0.2888889 0.042821303 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +22 0.244444445 0.140732333 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +41 0.455555558 0.01791467 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.127434745 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 0 +39 0.433333337 0.1238576 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +82 0.9111111 0.131063074 0.6875 0 0 0.08080808 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 +18 0.2 0.127039388 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Male United-States 0 +60 0.6666667 0.07860619 0.4375 0 0 0.4040404 Private 11th Divorced Protective-serv Not-in-family White Male United-States 0 +22 0.244444445 0.0668139458 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +39 0.433333337 0.1236744 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family Black Female United-States 1 +34 0.377777785 0.0744093955 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +50 0.5555556 0.105773874 0.875 0.0220202189 0 0.3030303 Local-gov Masters Divorced Prof-specialty Not-in-family Black Female ? 0 +53 0.5888889 0.10151916 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.144604489 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Own-child Black Male United-States 0 +37 0.411111116 0.116315365 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +25 0.2777778 0.232237384 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 +33 0.366666675 0.215141729 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male Peru 0 +34 0.377777785 0.2208533 0.8125 0 0 0.5555556 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +35 0.3888889 0.295126647 0.6875 0 0 0.656565666 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 +51 0.566666663 0.133128136 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.148068473 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +57 0.6333333 0.02395156 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +25 0.2777778 0.105642535 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +56 0.622222245 0.128144652 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +34 0.377777785 0.1053839 0.8125 0 0 0.858585835 Private Bachelors Divorced Exec-managerial Not-in-family White Male England 1 +36 0.4 0.0442000255 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +46 0.51111114 0.135851234 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +55 0.6111111 0.235676453 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +88 0.9777778 0.126016289 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 0 +60 0.6666667 0.17802459 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male Columbia 0 +40 0.444444448 0.190393388 0.875 0 0 0.2020202 Self-emp-not-inc Masters Separated Exec-managerial Unmarried White Female United-States 0 +21 0.233333334 0.127246156 0.625 0 0 0.5555556 Private Some-college Never-married Sales Own-child White Female United-States 0 +46 0.51111114 0.07731974 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female United-States 0 +56 0.622222245 0.16516076 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +36 0.4 0.0244290959 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +67 0.7444445 0.07216114 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.0524144545 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.0265891217 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Not-in-family White Female United-States 0 +34 0.377777785 0.0392704271 0.5625 0 0.3611111 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.242310092 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Asian-Pac-Islander Male Philippines 0 +19 0.211111113 0.1678091 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Own-child White Male United-States 0 +19 0.211111113 0.0301723238 0.625 0 0 0.151515156 Private Some-college Never-married Farming-fishing Not-in-family White Female United-States 0 +25 0.2777778 0.110788338 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +53 0.5888889 0.0326078236 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.175978392 0.625 0 0.3677686 0.4040404 ? Some-college Never-married ? Own-child Black Female Cambodia 0 +31 0.344444454 0.0246459749 0.5625 0 0 0.9191919 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +33 0.366666675 0.189211324 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +33 0.366666675 0.01994807 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Other-service Not-in-family Black Male United-States 0 +45 0.5 0.140635341 0.9375 0.25236252 0 0.363636374 Self-emp-inc Prof-school Divorced Prof-specialty Unmarried White Male United-States 1 +35 0.3888889 0.12745966 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 +20 0.222222224 0.02554851 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 +36 0.4 0.122384585 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.09937867 0.5625 0 0 0.858585835 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.2066296 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +45 0.5 0.17576085 0.875 0 0 0.4040404 ? Masters Married-civ-spouse ? Husband White Male United-States 0 +45 0.5 0.128245011 0.9375 0.25236252 0 0.363636374 State-gov Prof-school Divorced Prof-specialty Unmarried Black Male United-States 1 +24 0.266666681 0.155067176 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Other-relative White Male Mexico 0 +28 0.311111122 0.0316473655 0.6875 0.0217402168 0 0.363636374 Private Assoc-voc Never-married Tech-support Own-child White Female United-States 0 +63 0.7 0.202806622 0.4375 0 0 0.222222224 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.177194133 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 +25 0.2777778 0.0254198648 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 +36 0.4 0.0780181959 0.6875 0.07298073 0 0.5555556 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 +44 0.4888889 0.101081364 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +49 0.544444442 0.09985418 0.5625 0 0 0.282828271 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Female United-States 0 +52 0.5777778 0.123668343 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.174289167 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +35 0.3888889 0.19374758 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Male United-States 0 +51 0.566666663 0.06462294 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.0210594032 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.203507766 0.8125 0.07298073 0 0.4040404 Local-gov Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male Philippines 1 +28 0.311111122 0.168474555 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +37 0.411111116 0.118591234 0.625 0 0 0.5050505 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +65 0.722222269 0.0158819426 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.110234022 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Female United-States 0 +30 0.333333343 0.0296038613 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.09756821 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.04140486 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +57 0.6333333 0.09535228 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +40 0.444444448 0.151989788 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +42 0.466666669 0.2269077 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 +31 0.344444454 0.1415527 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.11522828 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 +42 0.466666669 0.09654578 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Female United-States 0 +25 0.2777778 0.1896855 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +40 0.444444448 0.2760966 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +65 0.722222269 0.15118964 0.9375 0.251242518 0 0.8080808 ? Prof-school Never-married ? Not-in-family White Male United-States 1 +29 0.322222233 0.10592138 0.875 0 0 0.454545468 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +31 0.344444454 0.0976281539 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +71 0.788888931 0.204660192 0.875 0.0205002055 0 0.2020202 Local-gov Masters Widowed Exec-managerial Not-in-family White Male United-States 0 +34 0.377777785 0.07024493 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +25 0.2777778 0.131663188 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Other-relative White Male United-States 0 +40 0.444444448 0.130662322 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +67 0.7444445 0.07086661 0.625 0 0 0.25252524 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.09914832 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.116915487 0.5625 0 0 0.181818187 Private HS-grad Never-married Sales Own-child Black Female United-States 0 +38 0.422222227 0.126536921 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.167655528 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male Guatemala 0 +42 0.466666669 0.188865811 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male Haiti 0 +36 0.4 0.115080774 0.5625 0 0 0.323232323 State-gov HS-grad Separated Other-service Own-child White Female United-States 0 +23 0.25555557 0.2756305 0.125 0 0 0.4040404 Self-emp-not-inc 1st-4th Married-civ-spouse Sales Other-relative White Male United-States 0 +56 0.622222245 0.2291169 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +36 0.4 0.0276263636 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.280430138 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 +39 0.433333337 0.176131964 0.5 0 0 0.4040404 Private 12th Divorced Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.138448387 0.9375 0 0 0.4040404 State-gov Prof-school Divorced Prof-specialty Own-child Asian-Pac-Islander Female Philippines 0 +44 0.4888889 0.165229455 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.103512146 0.4375 0 0 0.5252525 Private 11th Divorced Machine-op-inspct Unmarried Black Female United-States 0 +19 0.211111113 0.114337869 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +37 0.411111116 0.066931814 0.375 0 0 0.5555556 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +57 0.6333333 0.09392573 0.5625 0 0 0.161616161 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +54 0.6 0.153452709 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.143479 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 +22 0.244444445 0.0161702167 0.625 0 0 0.727272749 ? Some-college Never-married ? Own-child White Male United-States 0 +63 0.7 0.022554649 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.12658003 0.5625 0 0 0.2020202 Self-emp-inc HS-grad Married-civ-spouse Other-service Wife White Female Poland 0 +26 0.2888889 0.283935875 0.4375 0 0 0.25252524 Private 11th Married-civ-spouse Other-service Other-relative White Male United-States 0 +40 0.444444448 0.07406791 0.4375 0 0 0.2020202 Private 11th Divorced Other-service Other-relative White Female United-States 0 +20 0.222222224 0.07868903 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +39 0.433333337 0.07891534 0.375 0.0263502635 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.072035186 0.5625 0 0 0.424242437 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +30 0.333333343 0.0603655279 0.625 0 0 0.05050505 Private Some-college Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female United-States 1 +42 0.466666669 0.131027386 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +42 0.466666669 0.09699031 0.5625 0 0 0.5050505 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +21 0.233333334 0.1361981 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +40 0.444444448 0.07392849 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 +36 0.4 0.197055981 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Unmarried White Female United-States 0 +67 0.7444445 0.07089085 0.625 0.0797807947 0 0.353535354 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 +65 0.722222269 0.06368403 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +50 0.5555556 0.0312526748 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +18 0.2 0.101804741 0.375 0 0 0.272727281 Private 10th Never-married Farming-fishing Own-child White Male United-States 0 +31 0.344444454 0.133150354 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +36 0.4 0.121557482 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.1224223 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +34 0.377777785 0.256719679 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.111452445 0.5625 0 0 0.3939394 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +38 0.422222227 0.128088742 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 +17 0.188888893 0.199360147 0.375 0 0 0.2020202 Private 10th Never-married Adm-clerical Own-child White Female United-States 0 +52 0.5777778 0.1335363 0.5625 0 0 0.3030303 Without-pay HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +34 0.377777785 0.12823087 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 +30 0.333333343 0.277199864 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 +49 0.544444442 0.17654416 0.9375 0 0 0.4848485 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +45 0.5 0.120510139 0.3125 0 0 0.151515156 Private 9th Never-married Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.129967242 0.8125 0 0.5544077 0.353535354 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 +34 0.377777785 0.141131073 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +21 0.233333334 0.0695606247 0.5 0.04508045 0 0.3030303 Self-emp-not-inc 12th Married-civ-spouse Adm-clerical Wife White Female Portugal 0 +17 0.188888893 0.14554137 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Own-child White Female United-States 0 +23 0.25555557 0.4283794 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Male United-States 0 +32 0.355555564 0.104923874 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +22 0.244444445 0.0921886861 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +48 0.533333361 0.08221566 0.5625 0 0 0.353535354 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +27 0.3 0.233316392 0.8125 0 0 0.5050505 State-gov Bachelors Never-married Prof-specialty Unmarried White Male United-States 0 +43 0.477777779 0.07941982 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family White Male United-States 0 +44 0.4888889 0.0134127662 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Philippines 0 +55 0.6111111 0.171996459 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.4735668 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +34 0.377777785 0.04201104 0.5625 0 0 0.4848485 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +34 0.377777785 0.06482433 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +37 0.411111116 0.234926134 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Not-in-family White Male United-States 0 +21 0.233333334 0.0921886861 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +35 0.3888889 0.2615011 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +28 0.311111122 0.0321835 0.625 0 0 0.3030303 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +62 0.6888889 0.130778164 0.5625 0.0217402168 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +40 0.444444448 0.3669362 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +34 0.377777785 0.2926258 0.8125 0 0 0.3939394 Private Bachelors Never-married Machine-op-inspct Not-in-family White Female United-States 0 +32 0.355555564 0.21365793 0.875 0 0.365013778 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +70 0.7777778 0.149257258 0.625 0 0 0.343434334 Private Some-college Widowed Sales Not-in-family White Female United-States 0 +23 0.25555557 0.157412425 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +30 0.333333343 0.0751442239 0.5625 0 0 0.4848485 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +57 0.6333333 0.05376826 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 0 +34 0.377777785 0.129493073 0.9375 0 0 0.353535354 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.1614213 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband White Male Mexico 0 +41 0.455555558 0.0235649515 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.2756029 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male Mexico 0 +48 0.533333361 0.09128076 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.102484331 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +18 0.2 0.0952128544 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +35 0.3888889 0.144685984 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.0288993437 0.5625 0 0 0.4848485 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 +30 0.333333343 0.10898798 0.625 0 0 0.353535354 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +42 0.466666669 0.08575037 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +48 0.533333361 0.266293973 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Other-relative Black Male United-States 0 +70 0.7777778 0.124048889 0.5625 0 0 0.282828271 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +37 0.411111116 0.07588039 0.3125 0 0 0.353535354 Private 9th Divorced Craft-repair Own-child White Male United-States 0 +51 0.566666663 0.123734348 0.6875 0 0 0.4040404 Private Assoc-voc Separated Prof-specialty Unmarried White Female United-States 0 +35 0.3888889 0.292390764 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +59 0.655555546 0.111345351 0.8125 1 0 0.434343427 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +57 0.6333333 0.128643066 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.225993052 0.5625 0 0 0.2020202 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +26 0.2888889 0.118640408 0.1875 0 0 0.353535354 Private 5th-6th Separated Craft-repair Not-in-family Other Male Mexico 0 +19 0.211111113 0.183243811 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +34 0.377777785 0.1142072 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +56 0.622222245 0.127201036 0.8125 0.0861408561 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 +25 0.2777778 0.0470443629 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +46 0.51111114 0.133871034 0.9375 0 0.5544077 0.8080808 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.118158832 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +32 0.355555564 0.153806314 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Unmarried White Female ? 0 +72 0.8 0.191364616 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.07350484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.112706564 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +76 0.844444454 0.0284292176 0.3125 0 0 0.25252524 ? 9th Widowed ? Not-in-family White Male United-States 0 +37 0.411111116 0.190577254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +42 0.466666669 0.204185352 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.176398009 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.113174 0.625 0.07298073 0 0.212121218 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +53 0.5888889 0.0481018126 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +28 0.311111122 0.1610623 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +69 0.7666667 0.135084078 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +20 0.222222224 0.1061093 0.625 0 0 0.272727281 Private Some-college Never-married Other-service Own-child White Male United-States 0 +33 0.366666675 0.171753988 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +47 0.5222222 0.155004531 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 1 +50 0.5555556 0.08416689 0.5625 0 0.453856736 0.353535354 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.02668207 0.625 0 0 0.454545468 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +20 0.222222224 0.0321127772 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +42 0.466666669 0.189475358 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +23 0.25555557 0.118624911 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Other-relative Asian-Pac-Islander Male Vietnam 0 +24 0.266666681 0.111368924 0.5625 0 0 0.5050505 ? HS-grad Separated ? Not-in-family Black Male Germany 0 +32 0.355555564 0.15886119 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +41 0.455555558 0.0960318744 0.8125 0 0 0.5050505 Private Bachelors Widowed Sales Unmarried Black Male United-States 0 +35 0.3888889 0.02579233 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.0750876442 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.127870515 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child Black Male United-States 0 +34 0.377777785 0.09825117 1 0 0 0.2020202 State-gov Doctorate Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male China 0 +23 0.25555557 0.0936293751 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Transport-moving Own-child Asian-Pac-Islander Male South 0 +30 0.333333343 0.142556265 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.116582081 0.875 0 0 0.454545468 Local-gov Masters Widowed Prof-specialty Unmarried White Female United-States 0 +26 0.2888889 0.0706093162 0.875 0 0.383149683 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +42 0.466666669 0.131422743 0.5625 0 0 0.6060606 ? HS-grad Married-civ-spouse ? Husband White Male Dominican-Republic 0 +39 0.433333337 0.02165144 0.875 0 0 0.6060606 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +52 0.5777778 0.190390691 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 1 +42 0.466666669 0.128242984 0.625 0 0 0.6060606 Private Some-college Separated Exec-managerial Not-in-family White Male Canada 0 +25 0.2777778 0.166379854 0.8125 0.0332503319 0 0.4848485 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +27 0.3 0.1335336 0.8125 0 0 0.353535354 Private Bachelors Never-married Sales Own-child White Male United-States 0 +30 0.333333343 0.116351739 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Never-married Craft-repair Own-child White Male United-States 0 +23 0.25555557 0.193969846 0.8125 0.105201051 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +47 0.5222222 0.0823779851 0.8125 0 0.4331956 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +58 0.644444466 0.117879987 0.8125 0 0 0.25252524 ? Bachelors Divorced ? Not-in-family White Male United-States 0 +18 0.2 0.11462412 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +52 0.5777778 0.101577081 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +24 0.266666681 0.162446409 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +58 0.644444466 0.117776938 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.020562334 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +31 0.344444454 0.203162923 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Farming-fishing Own-child White Male United-States 0 +46 0.51111114 0.285054624 0.625 0.03103031 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.14466241 0.875 0.05178052 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.163609609 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Other-relative White Female United-States 0 +52 0.5777778 0.1290014 0.625 0 0.399449021 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +24 0.266666681 0.07904803 0.8125 0 0 0.353535354 Private Bachelors Never-married Sales Own-child White Female United-States 0 +22 0.244444445 0.2243934 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +39 0.433333337 0.130167276 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Mexico 0 +34 0.377777785 0.187497184 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +58 0.644444466 0.0750277042 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.06902112 0.8125 0 0 0.25252524 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +29 0.322222233 0.01781566 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Amer-Indian-Eskimo Male United-States 0 +67 0.7444445 0.140860975 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +28 0.311111122 0.142078727 0.75 0 0 0.353535354 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife Black Female Haiti 0 +62 0.6888889 0.07747196 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +54 0.6 0.03625838 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 1 +36 0.4 0.101068564 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +18 0.2 0.08627034 0.5 0 0 0.181818187 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 +25 0.2777778 0.0191775467 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.104740672 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Female United-States 0 +56 0.622222245 0.111345351 0.375 0 0 0.7070707 Private 10th Married-civ-spouse Craft-repair Husband White Male ? 0 +30 0.333333343 0.115773171 0.9375 0 0 0.24242425 Private Prof-school Never-married Tech-support Own-child White Female United-States 0 +41 0.455555558 0.124642268 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +59 0.655555546 0.186591953 0.5625 0 0 0.6060606 Private HS-grad Divorced Tech-support Unmarried White Male United-States 1 +36 0.4 0.112214886 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.06563795 0.5625 0 0 0.545454562 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +27 0.3 0.091664 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +19 0.211111113 0.0416614749 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Other-relative White Female United-States 0 +30 0.333333343 0.123102568 0.8125 0 0 0.151515156 Private Bachelors Never-married Other-service Not-in-family Asian-Pac-Islander Male China 0 +47 0.5222222 0.2821847 0.6875 0 0 0.25252524 Private Assoc-voc Divorced Sales Unmarried Black Female United-States 0 +39 0.433333337 0.07204192 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.0551261045 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male United-States 0 +44 0.4888889 0.07135155 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +37 0.411111116 0.0245334934 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +28 0.311111122 0.4008123 0.625 0 0 0.6363636 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.100368761 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.154652268 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +44 0.4888889 0.02257755 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.04751045 0.625 0.04386044 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +53 0.5888889 0.07121146 0.5625 0 0 0.282828271 State-gov HS-grad Married-civ-spouse Other-service Wife Amer-Indian-Eskimo Female United-States 1 +31 0.344444454 0.130136967 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Own-child White Male United-States 0 +18 0.2 0.09251872 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +43 0.477777779 0.07064838 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +30 0.333333343 0.100644238 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +19 0.211111113 0.11896909 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +36 0.4 0.123444729 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.152067244 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +25 0.2777778 0.136115253 0.875 0 0 0.6060606 Private Masters Never-married Prof-specialty Own-child White Female United-States 0 +36 0.4 0.08294644 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.113279745 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Unmarried White Female United-States 0 +42 0.466666669 0.02257755 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.164125532 0.625 0 0 0.4040404 State-gov Some-college Never-married Tech-support Not-in-family White Female United-States 0 +38 0.422222227 0.111064486 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.176654622 0.625 0.0378103778 0 0.4040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +33 0.366666675 0.195738554 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +52 0.5777778 0.134211853 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family Black Male United-States 0 +30 0.333333343 0.139871553 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Male United-States 0 +18 0.2 0.0206687525 0.625 0 0 0.1010101 State-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 +24 0.266666681 0.01881788 0.625 0 0 0.24242425 State-gov Some-college Married-civ-spouse Other-service Husband Asian-Pac-Islander Male ? 0 +17 0.188888893 0.295678943 0.375 0 0 0.4040404 Private 10th Never-married Other-service Other-relative White Male Mexico 0 +48 0.533333361 0.102993526 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +66 0.733333349 0.125297621 0.25 0 0 0.323232323 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +46 0.51111114 0.200550959 0.625 0 0 0.4040404 Local-gov Some-college Divorced Tech-support Not-in-family White Female United-States 0 +55 0.6111111 0.115337394 0.5625 0 0 0.6060606 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 1 +28 0.311111122 0.138807371 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +33 0.366666675 0.123116717 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +44 0.4888889 0.112968571 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +43 0.477777779 0.108219482 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +42 0.466666669 0.1311439 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +39 0.433333337 0.171769485 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Unmarried Black Female United-States 0 +23 0.25555557 0.137832776 0.375 0 0 0.5050505 Private 10th Never-married Handlers-cleaners Unmarried White Male United-States 0 +20 0.222222224 0.119745679 0.625 0 0 0.2020202 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 +29 0.322222233 0.036998596 0.625 0 0 0.353535354 Private Some-college Divorced Craft-repair Unmarried White Male United-States 1 +54 0.6 0.0616324469 0.625 0 0 0.656565666 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.133786842 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.152990669 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +59 0.655555546 0.09136293 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.03738655 0.25 0 0 0.4040404 Private 7th-8th Divorced Farming-fishing Unmarried White Female United-States 0 +37 0.411111116 0.117809266 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Own-child White Male United-States 0 +45 0.5 0.118491553 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.106072254 0.875 0.07298073 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.221689835 0.625 0 0 0.444444448 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +67 0.7444445 0.0550688542 0.875 0 0 0.02020202 ? Masters Married-civ-spouse ? Husband White Male United-States 0 +49 0.544444442 0.068914704 0.75 0 0 0.25252524 Self-emp-not-inc Assoc-acdm Divorced Exec-managerial Not-in-family White Male United-States 0 +30 0.333333343 0.179472014 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +56 0.622222245 0.07227968 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 +29 0.322222233 0.07688935 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.0835533 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.0971917 0.625 0 0 0.424242437 Private Some-college Never-married Sales Own-child White Male United-States 0 +28 0.311111122 0.1190021 0.6875 0 0 0.7070707 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +23 0.25555557 0.158053622 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +39 0.433333337 0.120527647 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Wife White Female United-States 0 +37 0.411111116 0.4094066 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +39 0.433333337 0.136685073 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 +32 0.355555564 0.05618153 0.8125 0 0 0.353535354 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +26 0.2888889 0.143326789 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +57 0.6333333 0.129492387 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Own-child White Male United-States 0 +36 0.4 0.07577061 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Sales Own-child White Male United-States 1 +30 0.333333343 0.06568376 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.108420193 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.217505172 0.625 0 0 0.5555556 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +22 0.244444445 0.271783948 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +43 0.477777779 0.222383574 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.18734698 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +30 0.333333343 0.0263042152 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +57 0.6333333 0.114694171 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 +42 0.466666669 0.226740673 0.6875 0 0 0.4040404 Private Assoc-voc Separated Prof-specialty Unmarried White Female United-States 0 +29 0.322222233 0.177924916 0.6875 0 0 0.454545468 Private Assoc-voc Divorced Other-service Unmarried White Female Columbia 0 +44 0.4888889 0.292115271 0.5625 0 0 0.5252525 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +28 0.311111122 0.0182150658 0.75 0 0 0.434343427 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 +42 0.466666669 0.111536637 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +26 0.2888889 0.1076032 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Male United-States 0 +29 0.322222233 0.259372741 0.625 0 0 0.363636374 Private Some-college Divorced Prof-specialty Own-child White Female United-States 0 +42 0.466666669 0.1271687 0.8125 0 0 0.3030303 Private Bachelors Divorced Adm-clerical Unmarried White Male United-States 0 +30 0.333333343 0.112800859 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +21 0.233333334 0.130730346 0.625 0 0 0.1010101 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 +59 0.655555546 0.1228931 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.06891807 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 +56 0.622222245 0.156353623 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +39 0.433333337 0.230174348 0.0625 0 0 0.121212125 Private Preschool Never-married Other-service Not-in-family White Female United-States 0 +21 0.233333334 0.138753489 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Own-child Black Male United-States 0 +48 0.533333361 0.231975377 0.8125 0 0 0.373737365 Private Bachelors Married-spouse-absent Prof-specialty Not-in-family White Male United-States 1 +35 0.3888889 0.2506424 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband Black Male United-States 0 +43 0.477777779 0.0187013578 0.8125 0 0 0.6060606 Private Bachelors Separated Exec-managerial Unmarried White Male United-States 1 +23 0.25555557 0.0948094055 0.6875 0 0 0.151515156 Private Assoc-voc Never-married Other-service Own-child White Female United-States 0 +17 0.188888893 0.1086135 0.375 0 0 0.121212125 ? 10th Never-married ? Other-relative White Male United-States 0 +41 0.455555558 0.0149531392 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 +35 0.3888889 0.125981927 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 +22 0.244444445 0.09267228 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 +53 0.5888889 0.184734344 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.230185121 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 +36 0.4 0.147195578 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried Black Female United-States 0 +44 0.4888889 0.12798503 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +27 0.3 0.149144784 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female Cuba 1 +39 0.433333337 0.0351497456 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +59 0.655555546 0.106941111 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.0347159877 0.625 0 0 0.4848485 Local-gov Some-college Never-married Other-service Not-in-family White Male United-States 0 +17 0.188888893 0.09855763 0.5 0 0 0.232323229 Private 12th Never-married Sales Own-child White Female United-States 0 +31 0.344444454 0.267707735 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.07111985 0.625 0 0 0.121212125 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +39 0.433333337 0.0526508652 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 +46 0.51111114 0.037298318 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +31 0.344444454 0.174399629 0.5625 0 0 0.8080808 Private HS-grad Married-spouse-absent Other-service Not-in-family White Female Italy 0 +27 0.3 0.0260024723 0.8125 0 0.3452709 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +18 0.2 0.1480705 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +46 0.51111114 0.105695076 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.108009338 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +48 0.533333361 0.12942706 0.8125 0 0 0.434343427 Private Bachelors Divorced Handlers-cleaners Not-in-family White Male United-States 0 +53 0.5888889 0.140479088 0.5625 0 0 0.262626261 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +44 0.4888889 0.123102568 0.8125 0 0 0.4848485 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male South 1 +43 0.477777779 0.101763651 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +50 0.5555556 0.109787472 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Other-relative White Female United-States 0 +56 0.622222245 0.104840361 0.25 0 0 0.2020202 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Female Yugoslavia 0 +27 0.3 0.146513954 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +20 0.222222224 0.16461587 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +18 0.2 0.102499828 0.375 0 0 0.0606060624 Local-gov 10th Never-married Protective-serv Own-child White Female United-States 0 +34 0.377777785 0.0375273228 0.5625 0 0.4242424 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.135686219 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +40 0.444444448 0.0972388461 0.8125 0 0 0.151515156 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.186591953 0.625 0 0 0.4040404 Private Some-college Divorced Protective-serv Not-in-family White Male United-States 0 +35 0.3888889 0.3117333 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Wife Black Female United-States 1 +26 0.2888889 0.135165572 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +54 0.6 0.08053115 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male Puerto-Rico 1 +22 0.244444445 0.129330069 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +52 0.5777778 0.0571211129 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +33 0.366666675 0.06745717 0.375 0 0 0.4040404 Private 10th Separated Handlers-cleaners Not-in-family White Male United-States 0 +42 0.466666669 0.114085294 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.0295594074 0.5625 0 0 0.1010101 Without-pay HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +45 0.5 0.03654598 0.625 0 0 1 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 +53 0.5888889 0.107682 0.5625 0.03103031 0 0.727272749 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +46 0.51111114 0.108084776 0.5625 0 0.365013778 0.434343427 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +25 0.2777778 0.320827365 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +90 1 0.0352837779 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 0 +33 0.366666675 0.056355305 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Female United-States 0 +45 0.5 0.116494521 0.625 0 0 0.7070707 Private Some-college Divorced Protective-serv Not-in-family White Male United-States 0 +47 0.5222222 0.129289657 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 1 +38 0.422222227 0.0275846049 0.875 0 0 0.434343427 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +35 0.3888889 0.06606026 0.9375 0.04787048 0 0.454545468 ? Prof-school Never-married ? Not-in-family Asian-Pac-Islander Male Japan 1 +37 0.411111116 0.118301615 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +53 0.5888889 0.13281022 0.875 0 0 0.7070707 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.126149639 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.0274950247 0.4375 0 0 0.151515156 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +44 0.4888889 0.154056877 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male ? 0 +50 0.5555556 0.161982343 0.625 0 0 0.363636374 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 +26 0.2888889 0.0349975266 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Not-in-family Black Male United-States 0 +36 0.4 0.117792428 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +37 0.411111116 0.06456165 0.4375 0 0 0.4040404 Private 11th Divorced Handlers-cleaners Not-in-family White Female United-States 0 +32 0.355555564 0.243993923 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +38 0.422222227 0.0208229925 0.75 0 0 0.6060606 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +62 0.6888889 0.103150457 0.5625 0 0 0.8484849 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.113096543 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.0304141231 0.5625 0.0217402168 0 0.414141417 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +37 0.411111116 0.06652904 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.1413082 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Female ? 0 +38 0.422222227 0.123795636 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 +35 0.3888889 0.0367716141 0.5 0 0 0.4040404 Private 12th Never-married Sales Not-in-family Black Female United-States 0 +34 0.377777785 0.0536382645 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child Amer-Indian-Eskimo Female United-States 0 +50 0.5555556 0.08524656 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +28 0.311111122 0.157469675 0.625 0.07298073 0 0.323232323 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +67 0.7444445 0.129183918 0.8125 0.06360064 0 0.353535354 Local-gov Bachelors Divorced Adm-clerical Unmarried Black Female United-States 0 +34 0.377777785 0.3550618 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +19 0.211111113 0.09393516 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 +23 0.25555557 0.0434564464 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +50 0.5555556 0.06583194 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +45 0.5 0.107882038 0.875 0.07688077 0 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.236407235 0.5 0 0 0.161616161 Private 12th Never-married Other-service Own-child White Male United-States 0 +59 0.655555546 0.123146355 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 1 +25 0.2777778 0.09649526 0.5625 0 0 0.4848485 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.233272612 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +50 0.5555556 0.1159658 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.103074349 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Female United-States 0 +63 0.7 0.134792432 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.13771759 0.875 0 0 0.434343427 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +45 0.5 0.237765759 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +25 0.2777778 0.130896032 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +20 0.222222224 0.0389962979 0.5 0 0 0.4040404 Private 12th Never-married Farming-fishing Own-child White Male United-States 0 +31 0.344444454 0.110935844 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Female ? 0 +42 0.466666669 0.18119964 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male France 0 +56 0.622222245 0.0565243624 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.108201295 0.5625 0 0 0.464646459 Private HS-grad Never-married Farming-fishing Unmarried White Female United-States 0 +69 0.7666667 0.08448614 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +42 0.466666669 0.165696889 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +19 0.211111113 0.146114558 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Other-relative Other Female Guatemala 0 +56 0.622222245 0.0446930528 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +33 0.366666675 0.104385048 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +61 0.677777767 0.132895768 0.875 0 0 0.4040404 Federal-gov Masters Widowed Prof-specialty Unmarried White Female United-States 0 +38 0.422222227 0.203234315 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +50 0.5555556 0.2701668 0.5625 1 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.06652904 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 1 +35 0.3888889 0.02190873 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +27 0.3 0.119295754 0.625 0 0 0.444444448 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +40 0.444444448 0.130345091 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +59 0.655555546 0.129492387 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.09828013 0.625 0 0 0.151515156 ? Some-college Never-married ? Not-in-family White Female United-States 0 +42 0.466666669 0.1447008 0.5625 0 0 0.3030303 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +59 0.655555546 0.118549481 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried White Male United-States 0 +54 0.6 0.09917054 1 0 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.107212543 0.625 0 0.43663913 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +53 0.5888889 0.105046459 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +20 0.222222224 0.242780223 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +54 0.6 0.07723689 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.06446264 0.875 0 0 0.454545468 Self-emp-not-inc Masters Never-married Exec-managerial Not-in-family Asian-Pac-Islander Male United-States 1 +33 0.366666675 0.0678478256 0.5625 0 0 0.5555556 Local-gov HS-grad Divorced Tech-support Not-in-family White Female United-States 0 +35 0.3888889 0.127279162 0.5625 0 0 0.3030303 Private HS-grad Widowed Exec-managerial Unmarried White Female United-States 0 +22 0.244444445 0.109561831 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Own-child White Male Portugal 0 +45 0.5 0.0191937126 0.8125 0 0.3409091 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +29 0.322222233 0.121746749 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +56 0.622222245 0.233470634 0.875 0 0.5369605 0.6060606 Self-emp-not-inc Masters Divorced Sales Unmarried White Female United-States 0 +23 0.25555557 0.0314170159 0.8125 0 0 0.25252524 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.136901274 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +17 0.188888893 0.09057692 0.4375 0 0 0.25252524 Private 11th Never-married Priv-house-serv Own-child White Female United-States 0 +35 0.3888889 0.057619527 0.625 0 0 0.4040404 Local-gov Some-college Separated Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 +25 0.2777778 0.132008716 0.125 0 0 0.4040404 Private 1st-4th Never-married Priv-house-serv Not-in-family White Female Guatemala 0 +42 0.466666669 0.09989594 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 +42 0.466666669 0.1532062 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative Black Male United-States 0 +19 0.211111113 0.0461721346 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +32 0.355555564 0.169903785 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.0202909 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +53 0.5888889 0.204992235 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.115826376 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Widowed Exec-managerial Unmarried Asian-Pac-Islander Female Thailand 0 +24 0.266666681 0.138639659 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +30 0.333333343 0.147261575 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Prof-specialty Wife Black Female United-States 1 +42 0.466666669 0.101412743 0.5625 0 0 0.454545468 Private HS-grad Separated Sales Unmarried White Female United-States 0 +19 0.211111113 0.257787228 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 +37 0.411111116 0.09358088 0.4375 0 0 0.373737365 Self-emp-not-inc 11th Never-married Farming-fishing Own-child White Male United-States 0 +26 0.2888889 0.173978 0.375 0 0 1 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +25 0.2777778 0.128043622 0.5625 0 0.3946281 0.161616161 Local-gov HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +52 0.5777778 0.102628469 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.0955577046 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +40 0.444444448 0.0536039174 0.9375 1 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 1 +32 0.355555564 0.105939567 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Handlers-cleaners Other-relative White Male United-States 0 +37 0.411111116 0.124265768 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.0738759562 0.875 0 0.3996786 0.353535354 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.13459374 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.0158583689 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +28 0.311111122 0.118346743 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +27 0.3 0.03504265 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female South 0 +61 0.677777767 0.212821409 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +47 0.5222222 0.136270851 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +30 0.333333343 0.169612825 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Machine-op-inspct Unmarried Black Female United-States 0 +54 0.6 0.136131421 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 +56 0.622222245 0.146038443 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 +69 0.7666667 0.09810434 0.625 0 0 0.24242425 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.09232541 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +36 0.4 0.102795504 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Canada 1 +42 0.466666669 0.0183484256 0.4375 0 0 0.6060606 Self-emp-not-inc 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +45 0.5 0.241288349 0.8125 0 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.124009147 0.8125 0.07688077 0 0.2020202 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +26 0.2888889 0.202255666 0.4375 0 0 0.4040404 Private 11th Divorced Adm-clerical Own-child White Female United-States 0 +28 0.311111122 0.101024114 0.8125 0 0 0.424242437 Local-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 1 +31 0.344444454 0.127809227 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.228652835 0.1875 0 0 0.6060606 Private 5th-6th Separated Farming-fishing Other-relative White Male Mexico 0 +51 0.566666663 0.0679818541 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Other-relative White Female United-States 0 +29 0.322222233 0.238807037 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.109525464 0.875 0 0.518365443 0.6060606 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +64 0.7111111 0.191992357 0.625 0 0 0.1010101 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 0 +26 0.2888889 0.117898174 0.625 0 0 0.4040404 State-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 +68 0.75555557 0.030651208 0.1875 0 0 0.222222224 Private 5th-6th Married-spouse-absent Sales Not-in-family White Male United-States 0 +32 0.355555564 0.116757877 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.116932996 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +51 0.566666663 0.122949004 0.125 0 0 0.4040404 ? 1st-4th Separated ? Unmarried White Female Mexico 0 +21 0.233333334 0.09635719 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +26 0.2888889 0.09291475 0.375 0 0 0.4040404 ? 10th Separated ? Other-relative White Female Puerto-Rico 0 +33 0.366666675 0.197388038 0.8125 0 0 0.4040404 Local-gov Bachelors Married-spouse-absent Prof-specialty Other-relative Black Male ? 0 +26 0.2888889 0.254430354 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +52 0.5777778 0.102628469 0.5625 0.02105021 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.130313426 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.1867866 0.5625 0 0 0.454545468 Local-gov HS-grad Never-married Protective-serv Unmarried White Male United-States 0 +19 0.211111113 0.0465964638 0.625 0 0 0.272727281 Private Some-college Never-married Other-service Own-child White Female United-States 0 +51 0.566666663 0.1479075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +45 0.5 0.08713583 0.3125 0 0 0.4040404 Private 9th Separated Other-service Unmarried Other Female Trinadad&Tobago 0 +20 0.222222224 0.317150563 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Sales Own-child Black Male United-States 0 +40 0.444444448 0.135874808 0.625 0 0 0.4848485 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +43 0.477777779 0.03936607 1 1 0 0.5555556 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.0617557019 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +46 0.51111114 0.112174474 0.625 0 0 0.24242425 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.197563827 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +20 0.222222224 0.147680521 0.3125 0 0 0.5050505 Private 9th Never-married Transport-moving Not-in-family White Male United-States 0 +38 0.422222227 0.27169776 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +44 0.4888889 0.247691631 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female Mexico 0 +24 0.266666681 0.08654042 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.07500682 0.9375 0 0 0.75757575 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.162233576 0.25 0 0 0.353535354 Private 7th-8th Never-married Other-service Other-relative White Male United-States 0 +36 0.4 0.109973364 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +31 0.344444454 0.280469865 0.5625 0 0 0.454545468 Private HS-grad Separated Adm-clerical Not-in-family White Male United-States 0 +46 0.51111114 0.188609868 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Husband White Male Mexico 0 +46 0.51111114 0.16922082 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +46 0.51111114 0.112587348 0.625 0 0 0.7070707 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +29 0.322222233 0.109016269 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Other-service Not-in-family Other Female Columbia 0 +37 0.411111116 0.107789092 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.128109634 0.25 0 0 0.25252524 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +28 0.311111122 0.108634375 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Black Female United-States 0 +28 0.311111122 0.075707294 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Protective-serv Own-child White Male United-States 0 +48 0.533333361 0.16079019 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +52 0.5777778 0.110816628 0.4375 0 0 0.2020202 Private 11th Divorced Machine-op-inspct Not-in-family Black Female United-States 0 +19 0.211111113 0.307517 0.5625 0 0 0.353535354 Private HS-grad Never-married Farming-fishing Other-relative White Male United-States 0 +31 0.344444454 0.119670242 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.166187227 0.8125 1 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.0693424 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.151032031 0.625 0 0 0.02020202 ? Some-college Never-married ? Own-child White Male United-States 0 +46 0.51111114 0.1047272 0.75 0 0 0.444444448 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.105611555 0.5625 0.03103031 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +50 0.5555556 0.113296583 0.875 0 0.43663913 0.454545468 Private Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.223205954 0.25 0.0394203924 0 0.8484849 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male Portugal 0 +40 0.444444448 0.176127255 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +58 0.644444466 0.24618426 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family Other Male Mexico 0 +36 0.4 0.126623809 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.1282073 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 +17 0.188888893 0.112317935 0.5 0 0 0.4040404 ? 12th Never-married ? Own-child White Female United-States 0 +49 0.544444442 0.11333026 0.375 0 0 0.4848485 Private 10th Divorced Other-service Not-in-family White Male United-States 0 +39 0.433333337 0.082178615 0.875 0.05178052 0 0.3838384 State-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +46 0.51111114 0.11177507 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +26 0.2888889 0.2532355 0.5625 0 0 0.373737365 Private HS-grad Separated Sales Unmarried Black Female United-States 0 +40 0.444444448 0.273766845 0.875 0 0 0.4040404 Federal-gov Masters Never-married Tech-support Not-in-family White Female United-States 0 +53 0.5888889 0.155904368 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +60 0.6666667 0.0531506278 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.04654595 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +22 0.244444445 0.122843936 0.625 0 0 0.121212125 ? Some-college Never-married ? Not-in-family Asian-Pac-Islander Female Thailand 0 +31 0.344444454 0.113828674 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +45 0.5 0.1548907 0.5625 0.135501355 0 0.5050505 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 1 +34 0.377777785 0.284794629 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried White Male Mexico 0 +27 0.3 0.155533925 0.875 0 0 0.4040404 State-gov Masters Never-married Exec-managerial Not-in-family White Male Scotland 0 +40 0.444444448 0.131940022 0.625 0 0 0.4040404 Private Some-college Divorced Transport-moving Not-in-family Black Female United-States 0 +68 0.75555557 0.110019162 0.5625 0 0 0.323232323 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 +51 0.566666663 0.0556110479 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.0582641 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +43 0.477777779 0.120414495 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.117157958 0.8125 0 0 0.272727281 State-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +48 0.533333361 0.119087629 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +42 0.466666669 0.016038876 0.625 0.0288502872 0 0.3030303 Self-emp-inc Some-college Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 +51 0.566666663 0.141937956 0.5625 0.105201051 0 0.4040404 Self-emp-inc HS-grad Never-married Exec-managerial Not-in-family White Male United-States 1 +32 0.355555564 0.231553748 0.5625 0.0501305 0 0.5555556 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.07667382 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.08153472 0.5625 0 0 0.7070707 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +71 0.788888931 0.03513897 0.25 0 0 0.454545468 ? 7th-8th Divorced ? Unmarried White Male United-States 0 +17 0.188888893 0.3812535 0.375 0 0 0.08080808 Private 10th Never-married Other-service Own-child White Male United-States 0 +37 0.411111116 0.0454184525 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +26 0.2888889 0.0262772739 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Priv-house-serv Wife Other Female Dominican-Republic 0 +17 0.188888893 0.0349827074 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Female United-States 0 +34 0.377777785 0.067804046 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male United-States 1 +46 0.51111114 0.1048417 0.4375 0 0.43663913 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 +33 0.366666675 0.0760063455 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male ? 0 +41 0.455555558 0.0216777083 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +59 0.655555546 0.0931969658 0.375 0 0 0.4040404 Private 10th Married-spouse-absent Protective-serv Not-in-family Asian-Pac-Islander Male India 0 +50 0.5555556 0.1160372 0.5625 0.07688077 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.121576339 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +45 0.5 0.11333026 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.0573353 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +31 0.344444454 0.07667382 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +32 0.355555564 0.1329941 0.5625 0.0147101469 0 0.3838384 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 +28 0.311111122 0.133295849 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.2132336 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.226554781 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Exec-managerial Unmarried White Male United-States 0 +39 0.433333337 0.09639828 0.6875 0 0.5544077 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.14141193 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.141451 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +37 0.411111116 0.1512361 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.185661808 0.25 0.0297702979 0 0.4040404 Private 7th-8th Married-spouse-absent Machine-op-inspct Unmarried White Female Puerto-Rico 0 +45 0.5 0.05931212 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Machine-op-inspct Unmarried Asian-Pac-Islander Female South 0 +43 0.477777779 0.13194339 0.5625 0.07298073 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +49 0.544444442 0.029100731 0.9375 0 0 0.5555556 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 +37 0.411111116 0.13669382 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +26 0.2888889 0.103786953 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 +34 0.377777785 0.07551332 0.9375 0 0.453856736 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.2397473 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.2555511 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +67 0.7444445 0.19288142 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +40 0.444444448 0.03238825 0.5625 0.07298073 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.2608397 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 1 +21 0.233333334 0.181883276 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 +39 0.433333337 0.04427681 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 1 +33 0.366666675 0.107690081 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.187268853 0.5625 0 0 0.6060606 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +21 0.233333334 0.178778946 0.625 0 0 0.3030303 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +68 0.75555557 0.03505882 0.6875 0.251242518 0 0.5050505 Self-emp-inc Assoc-voc Widowed Sales Not-in-family White Female United-States 1 +24 0.266666681 0.140689224 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 +24 0.266666681 0.154504091 0.4375 0.0246302467 0 0.4040404 Private 11th Never-married Farming-fishing Unmarried White Male United-States 0 +23 0.25555557 0.03604285 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +40 0.444444448 0.151675254 0.5625 0 0 0.6363636 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +48 0.533333361 0.112351611 0.8125 0 0 0.5050505 Private Bachelors Married-spouse-absent Exec-managerial Not-in-family White Female United-States 1 +42 0.466666669 0.1183225 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +45 0.5 0.248498529 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Protective-serv Not-in-family Black Female United-States 0 +31 0.344444454 0.131272539 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +53 0.5888889 0.136844024 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.180124 0.8125 0 0 0.5555556 Private Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 +32 0.355555564 0.0753254 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 +34 0.377777785 0.1337727 0.4375 0 0 0.25252524 Private 11th Married-civ-spouse Sales Husband White Male ? 0 +41 0.455555558 0.10042534 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +57 0.6333333 0.0815724358 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +25 0.2777778 0.08782688 0.375 0 0 0.4040404 Private 10th Never-married Farming-fishing Unmarried Amer-Indian-Eskimo Male United-States 0 +40 0.444444448 0.1433598 0.625 0 0.500229537 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +17 0.188888893 0.124063708 0.4375 0 0 0.13131313 Private 11th Never-married Sales Own-child White Female United-States 0 +17 0.188888893 0.0816909745 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Own-child White Male United-States 0 +82 0.9111111 0.0810989439 0.625 0 0 0.2020202 Self-emp-inc Some-college Widowed Sales Not-in-family White Male United-States 0 +40 0.444444448 0.110916309 0.75 0 0 0.323232323 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 +26 0.2888889 0.261878282 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family Black Male United-States 0 +37 0.411111116 0.198638111 0.625 0 0 0.4040404 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 +25 0.2777778 0.06848768 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +65 0.722222269 0.02438801 0.375 0 0 0.222222224 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +39 0.433333337 0.08350682 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family Asian-Pac-Islander Male China 0 +36 0.4 0.2290024 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.137285188 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.12378823 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +34 0.377777785 0.205844939 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +63 0.7 0.117316909 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +59 0.655555546 0.08881832 0.5625 0 0 0.353535354 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +49 0.544444442 0.0292846058 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.136812359 0.3125 0 0 0.4040404 ? 9th Never-married ? Unmarried White Female Dominican-Republic 0 +17 0.188888893 0.08001051 0.4375 0 0 0.09090909 Private 11th Never-married Sales Own-child White Female United-States 0 +28 0.311111122 0.183816314 0.375 0 0 0.3030303 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +45 0.5 0.149532065 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +40 0.444444448 0.2027386 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +45 0.5 0.133178651 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +20 0.222222224 0.117017187 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Own-child White Male United-States 0 +19 0.211111113 0.122980662 0.375 0 0 0.3838384 ? 10th Never-married ? Not-in-family White Female United-States 0 +59 0.655555546 0.06278082 0.8125 0 0 0.222222224 Local-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +41 0.455555558 0.0166787338 0.5625 0.07443074 0 0.4040404 Private HS-grad Divorced Transport-moving Unmarried White Male United-States 0 +49 0.544444442 0.1475182 0.625 0 0 0.4848485 Local-gov Some-college Divorced Exec-managerial Unmarried White Male United-States 1 +37 0.411111116 0.09242846 0.6875 0 0 0.454545468 Private Assoc-voc Divorced Sales Not-in-family White Male United-States 1 +31 0.344444454 0.1892834 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.157679811 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +27 0.3 0.0315672159 0.8125 0 0 0.151515156 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +20 0.222222224 0.109561831 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Other-relative White Male El-Salvador 0 +51 0.566666663 0.116717465 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.205535784 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +48 0.533333361 0.143431857 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.07562715 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +50 0.5555556 0.110593013 0.75 0.1502415 0 0.454545468 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 +41 0.455555558 0.103022486 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.09792451 0.625 0 0 0.25252524 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +54 0.6 0.08053452 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.1834324 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +44 0.4888889 0.126435891 0.5625 0 0 0.414141417 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.09793798 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +42 0.466666669 0.140584156 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +34 0.377777785 0.137056187 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +46 0.51111114 0.222546577 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +35 0.3888889 0.0173792113 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.115275428 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.0556177832 0.9375 0.14084141 0 0.363636374 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 +30 0.333333343 0.2218791 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.124908321 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +21 0.233333334 0.135501 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +40 0.444444448 0.122763783 0.0625 0 0 0.4040404 Private Preschool Married-spouse-absent Adm-clerical Own-child White Male United-States 0 +56 0.622222245 0.06449968 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.08479261 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Poland 0 +21 0.233333334 0.0817718 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Other-service Own-child White Female United-States 0 +52 0.5777778 0.251475543 0.4375 0 0 0.4040404 Private 11th Widowed Craft-repair Not-in-family White Male United-States 0 +60 0.6666667 0.1117946 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.111459181 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.105670825 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.105585285 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +43 0.477777779 0.16445826 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male ? 0 +36 0.4 0.1480523 0.3125 0 0 0.353535354 Private 9th Married-civ-spouse Craft-repair Husband White Male Guatemala 0 +42 0.466666669 0.115740843 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +28 0.311111122 0.113506727 0.875 0.07688077 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +62 0.6888889 0.138507649 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Craft-repair Husband White Male United-States 1 +65 0.722222269 0.117803879 0.5625 0 0 0.4040404 ? HS-grad Separated ? Not-in-family White Female United-States 0 +45 0.5 0.06907702 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Canada 1 +47 0.5222222 0.040591903 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.2618197 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.145289466 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +44 0.4888889 0.11566069 0.5625 0 0 0.3939394 Private HS-grad Separated Other-service Unmarried White Female United-States 0 +25 0.2777778 0.1300265 0.5625 0 0 0.25252524 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 +21 0.233333334 0.205728412 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +29 0.322222233 0.09897522 0.6875 0 0 0.434343427 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +21 0.233333334 0.2169751 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +41 0.455555558 0.0510148481 0.9375 0 0 0.454545468 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male El-Salvador 1 +64 0.7111111 0.25640583 0.8125 0 0 0.08080808 ? Bachelors Married-civ-spouse ? Wife Black Female United-States 0 +55 0.6111111 0.06408613 0.625 0 0 1 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.0461162329 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +63 0.7 0.01862525 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +21 0.233333334 0.276444823 0.625 0 0 0.24242425 Private Some-college Never-married Sales Own-child White Male United-States 0 +28 0.311111122 0.0254737474 0.6875 0 0 0.5555556 Private Assoc-voc Never-married Sales Unmarried White Female ? 0 +45 0.5 0.153949782 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +21 0.233333334 0.09527347 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +34 0.377777785 0.0594158433 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female China 1 +53 0.5888889 0.03276139 0.5 0 0 0.353535354 Private 12th Never-married Other-service Not-in-family Other Female United-States 0 +45 0.5 0.124863192 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.2299925 0.5625 0 0 0.04040404 Private HS-grad Divorced Priv-house-serv Not-in-family White Female United-States 0 +41 0.455555558 0.110003 0.4375 0 0 0.363636374 Private 11th Divorced Exec-managerial Unmarried White Female United-States 0 +35 0.3888889 0.06692036 0.8125 0 0.453856736 0.3030303 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +43 0.477777779 0.405813277 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +53 0.5888889 0.193433717 0.125 0 0 0.323232323 Local-gov 1st-4th Married-civ-spouse Other-service Husband White Male Mexico 0 +34 0.377777785 0.144841567 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +46 0.51111114 0.0659141 0.6875 0.05178052 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 1 +59 0.655555546 0.2075281 0.75 0 0 0.4040404 Private Assoc-acdm Widowed Exec-managerial Not-in-family White Female United-States 1 +53 0.5888889 0.092403546 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Unmarried Asian-Pac-Islander Male United-States 0 +33 0.366666675 0.185470521 0.25 0 0 0.353535354 Private 7th-8th Separated Handlers-cleaners Not-in-family Black Male Haiti 0 +45 0.5 0.0673339143 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +48 0.533333361 0.06985428 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.170922846 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +55 0.6111111 0.109250665 0.5625 0.05178052 0 0.727272749 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +46 0.51111114 0.0210594032 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +17 0.188888893 0.133458167 0.4375 0 0 0.161616161 Private 11th Never-married Sales Own-child White Female United-States 0 +23 0.25555557 0.120028563 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Unmarried Amer-Indian-Eskimo Female United-States 0 +21 0.233333334 0.2136283 0.5625 0 0 0.6060606 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +53 0.5888889 0.149383888 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Craft-repair Not-in-family Black Male United-States 0 +61 0.677777767 0.126034468 0.5625 0 0 0.2020202 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.188939214 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Other-service Own-child Black Male United-States 0 +36 0.4 0.1398042 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.129779324 0.625 0 0 0.3838384 Local-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +39 0.433333337 0.06954917 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Craft-repair Wife White Female United-States 1 +39 0.433333337 0.128797978 0.8125 0.135501355 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 +48 0.533333361 0.257453173 1 0 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Exec-managerial Wife White Female United-States 1 +41 0.455555558 0.07200084 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +30 0.333333343 0.0326798931 0.75 0 0.459595948 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +50 0.5555556 0.0373993479 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Craft-repair Not-in-family Black Male United-States 0 +51 0.566666663 0.16624178 0.5625 0.07298073 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.0228220429 0.625 0 0 0.4040404 Private Some-college Separated Sales Unmarried White Female United-States 0 +41 0.455555558 0.0200457331 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.113227211 0.5625 0 0 0.7070707 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +51 0.566666663 0.139724061 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +60 0.6666667 0.127364025 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +51 0.566666663 0.130840138 0.8125 0 0 0.4040404 Private Bachelors Divorced Tech-support Unmarried White Female United-States 0 +20 0.222222224 0.131090015 0.625 0 0 0.4040404 Local-gov Some-college Never-married Other-service Not-in-family White Male United-States 0 +29 0.322222233 0.121021353 0.5625 0 0 0.373737365 Local-gov HS-grad Never-married Transport-moving Own-child White Female United-States 0 +42 0.466666669 0.09227153 0.625 0 0 0.4848485 State-gov Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 0 +32 0.355555564 0.0967222452 0.5625 0 0 0.161616161 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 +19 0.211111113 0.1639201 0.5 0.010550105 0 0.4040404 Private 12th Never-married Sales Other-relative White Male United-States 0 +34 0.377777785 0.176330656 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +48 0.533333361 0.0965046957 0.5625 0 0 0.4848485 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 +38 0.422222227 0.124978364 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Italy 0 +38 0.422222227 0.0750984251 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 +40 0.444444448 0.1888813 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.0251322649 0.875 0 0 0.5050505 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 +38 0.422222227 0.0696488544 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Black Male ? 0 +26 0.2888889 0.181956008 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +23 0.25555557 0.06516311 0.625 0 0 0.1010101 State-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 +20 0.222222224 0.110981643 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Other-relative White Male Guatemala 0 +49 0.544444442 0.1281864 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Adm-clerical Not-in-family Amer-Indian-Eskimo Male Philippines 0 +23 0.25555557 0.143540308 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +47 0.5222222 0.105695076 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Canada 1 +43 0.477777779 0.07608717 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +56 0.622222245 0.0238249358 0.625 0 0 0.3030303 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +60 0.6666667 0.148407936 0.4375 0 0 0.353535354 Self-emp-not-inc 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +29 0.322222233 0.109898604 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Own-child White Male United-States 0 +25 0.2777778 0.27274847 0.8125 0 0 0.3838384 Private Bachelors Never-married Exec-managerial Not-in-family Black Female United-States 0 +39 0.433333337 0.08219276 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Not-in-family White Male United-States 0 +37 0.411111116 0.096707426 0.6875 0.04101041 0 0.353535354 Private Assoc-voc Never-married Adm-clerical Not-in-family Other Female United-States 0 +38 0.422222227 0.07283602 0.8125 0.0220202189 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +47 0.5222222 0.1693993 0.5625 0 0 0.363636374 Private HS-grad Divorced Tech-support Not-in-family White Female United-States 0 +50 0.5555556 0.132722661 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Divorced Sales Not-in-family White Male United-States 1 +64 0.7111111 0.0248938352 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +35 0.3888889 0.111759581 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.120535731 0.4375 0 0 0.4040404 ? 11th Never-married ? Unmarried White Female United-States 0 +42 0.466666669 0.144475162 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.07439727 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Not-in-family White Male United-States 0 +21 0.233333334 0.136138156 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +53 0.5888889 0.191505387 0.875 0 0 0.5050505 Self-emp-not-inc Masters Divorced Exec-managerial Not-in-family White Male United-States 1 +29 0.322222233 0.129940972 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.229619354 0.9375 0.0282902829 0 0.5050505 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male ? 0 +37 0.411111116 0.229415283 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.132469416 0.5 0 0 0.4040404 Private 12th Never-married Adm-clerical Own-child White Female United-States 0 +18 0.2 0.179489538 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +57 0.6333333 0.04140486 0.625 0.07688077 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.06676545 0.6875 0 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 1 +27 0.3 0.14545314 0.625 0.0282902829 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +23 0.25555557 0.145075962 0.6875 0 0 0.5050505 Self-emp-inc Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.123861648 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Divorced Sales Not-in-family White Male United-States 0 +48 0.533333361 0.06545138 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Other-relative White Female United-States 0 +40 0.444444448 0.0977702662 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.241091 0.8125 0 0 0.161616161 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +59 0.655555546 0.119296432 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 +32 0.355555564 0.194132179 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Other-relative Asian-Pac-Islander Female Greece 0 +39 0.433333337 0.342869461 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +32 0.355555564 0.0322838537 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +38 0.422222227 0.06999707 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +44 0.4888889 0.123815171 0.8125 0 0 0.3838384 State-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +51 0.566666663 0.09352161 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +54 0.6 0.126749754 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Other-relative White Female Hungary 0 +22 0.244444445 0.02331507 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +19 0.211111113 0.1487292 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Female United-States 0 +31 0.344444454 0.1896269 0.75 0 0 0.454545468 Federal-gov Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 +53 0.5888889 0.03192284 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.0952041 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +19 0.211111113 0.223231554 0.5625 0 0 0.323232323 Private HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 +40 0.444444448 0.233401254 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +21 0.233333334 0.162569 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +39 0.433333337 0.14565587 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Italy 1 +40 0.444444448 0.103071652 0.875 0.07298073 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.0782229453 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Cambodia 0 +18 0.2 0.130103961 0.3125 0 0 0.424242437 Private 9th Never-married Sales Own-child White Female United-States 0 +32 0.355555564 0.1852853 0.8125 0.07688077 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male Mexico 1 +50 0.5555556 0.05492539 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +18 0.2 0.113139652 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Male United-States 0 +19 0.211111113 0.0456380248 0.5625 0 0 0.434343427 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +53 0.5888889 0.134834871 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 1 +49 0.544444442 0.271509826 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 +40 0.444444448 0.1447365 0.8125 0 0 0.454545468 Private Bachelors Married-spouse-absent Transport-moving Own-child Other Male ? 0 +31 0.344444454 0.09609653 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +47 0.5222222 0.0596078038 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +35 0.3888889 0.09786995 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +47 0.5222222 0.13765496 0.625 0 0 0.2020202 Local-gov Some-college Never-married Other-service Own-child White Female United-States 0 +43 0.477777779 0.175587744 0.875 0 0 0.2020202 Self-emp-not-inc Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +51 0.566666663 0.155708373 0.625 0 0 0.212121218 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +54 0.6 0.175153986 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +76 0.844444454 0.120337039 0.3125 0 0 0.3030303 Local-gov 9th Married-civ-spouse Other-service Husband White Male United-States 0 +33 0.366666675 0.152398631 0.25 0 0 0.434343427 Private 7th-8th Never-married Sales Not-in-family White Male Mexico 0 +19 0.211111113 0.07491859 0.5 0 0 0.151515156 Private 12th Never-married Transport-moving Own-child White Male United-States 0 +49 0.544444442 0.05922254 0.6875 0.0501305 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.143293113 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +23 0.25555557 0.07454478 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 +49 0.544444442 0.0938018039 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.206626236 0.625 0 0 0.656565666 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +48 0.533333361 0.214406908 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +36 0.4 0.0965747461 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +33 0.366666675 0.1941618 0.5 0.0147101469 0 0.4040404 Private 12th Separated Adm-clerical Unmarried White Female United-States 0 +31 0.344444454 0.112968571 0.8125 0.1502415 0 0.4848485 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 +53 0.5888889 0.0633668 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.13115266 0.8125 0 0 0.1010101 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +43 0.477777779 0.110449553 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.127809227 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male Italy 0 +53 0.5888889 0.131960228 0.875 0 0 0.4040404 State-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +36 0.4 0.0364779532 0.8125 0 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.112387985 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.070385024 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male Germany 1 +39 0.433333337 0.141863868 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +24 0.266666681 0.301760972 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 +17 0.188888893 0.115117818 0.375 0 0.3677686 0.4040404 Local-gov 10th Never-married Protective-serv Own-child White Female United-States 0 +53 0.5888889 0.19101572 0.875 0.1502415 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +21 0.233333334 0.127802491 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +29 0.322222233 0.0612471849 0.8125 0 0 0.646464646 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Male Philippines 1 +34 0.377777785 0.17048572 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +28 0.311111122 0.1224324 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +61 0.677777767 0.109379977 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +20 0.222222224 0.0476242751 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +47 0.5222222 0.0696475059 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +40 0.444444448 0.151314914 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +26 0.2888889 0.143766612 0.625 0 0 0.1010101 Local-gov Some-college Never-married Other-service Own-child Black Female Jamaica 0 +53 0.5888889 0.094073236 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.024382621 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +39 0.433333337 0.160107911 0.9375 0 0.5544077 1 Private Prof-school Married-civ-spouse Sales Husband White Male United-States 1 +17 0.188888893 0.11685621 0.4375 0 0 0.151515156 Local-gov 11th Never-married Prof-specialty Own-child Black Male United-States 0 +46 0.51111114 0.2529836 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 +34 0.377777785 0.137056187 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.0722237751 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Male France 0 +23 0.25555557 0.146029681 0.5625 0 0 0.161616161 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +41 0.455555558 0.194435269 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.07106867 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +28 0.311111122 0.1905914 0.8125 0 0 0.04040404 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +18 0.2 0.07905409 0.4375 0 0 0.151515156 Self-emp-inc 11th Never-married Sales Own-child White Male United-States 0 +38 0.422222227 0.07577061 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 1 +66 0.733333349 0.125298962 0.6875 0.0296402965 0 0.3030303 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 +28 0.311111122 0.129577264 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +49 0.544444442 0.0291963723 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +29 0.322222233 0.12246339 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +43 0.477777779 0.1455306 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Wife Amer-Indian-Eskimo Female United-States 1 +34 0.377777785 0.07547762 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Unmarried White Female United-States 0 +30 0.333333343 0.147201642 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +25 0.2777778 0.272522837 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.114137158 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.161702827 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Male United-States 0 +22 0.244444445 0.09945074 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +26 0.2888889 0.0608046725 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male ? 0 +49 0.544444442 0.040917892 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +44 0.4888889 0.131094053 0.5625 0.031370312 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.104156047 0.75 0.02105021 0 0.5050505 Self-emp-not-inc Assoc-acdm Married-civ-spouse Farming-fishing Husband White Male United-States 0 +39 0.433333337 0.330705434 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Other-relative Black Male United-States 0 +33 0.366666675 0.268799543 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Unmarried White Female United-States 0 +41 0.455555558 0.125889659 0.875 0 0.43663913 0.353535354 Self-emp-not-inc Masters Married-civ-spouse Sales Wife White Female United-States 1 +65 0.722222269 0.07105183 0.8125 1 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.0235649515 0.8125 0 0 0.535353541 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +26 0.2888889 0.11304266 0.8125 0 0 0.2020202 ? Bachelors Married-civ-spouse ? Wife White Female United-States 0 +31 0.344444454 0.194640011 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Not-in-family White Male United-States 0 +28 0.311111122 0.179207325 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +71 0.788888931 0.07434474 0.5625 0 0.5663453 0.5252525 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.0214675646 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.19828856 0.25 0 0 0.6060606 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.1241378 0.625 0 0 0.3030303 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +36 0.4 0.118386485 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Craft-repair Husband White Male United-States 0 +56 0.622222245 0.12276715 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.07175904 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +39 0.433333337 0.09307708 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.132545531 0.9375 0 0 0.454545468 Private Prof-school Divorced Prof-specialty Not-in-family White Female United-States 1 +22 0.244444445 0.150210992 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +44 0.4888889 0.07359914 0.625 0 0 0.3838384 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +60 0.6666667 0.06431581 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +65 0.722222269 0.100444868 0.4375 0 0 0.4040404 Private 11th Divorced Machine-op-inspct Other-relative White Male United-States 0 +44 0.4888889 0.147608444 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male England 1 +53 0.5888889 0.0557572059 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +28 0.311111122 0.144714266 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +41 0.455555558 0.114655778 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +40 0.444444448 0.1410004 0.5625 0 0 0.151515156 Self-emp-inc HS-grad Divorced Adm-clerical Unmarried White Female ? 0 +35 0.3888889 0.0608915575 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Wife White Female United-States 0 +41 0.455555558 0.2019344 0.3125 0 0 0.7070707 Self-emp-inc 9th Married-civ-spouse Sales Wife White Female Dominican-Republic 0 +28 0.311111122 0.126667589 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Canada 0 +53 0.5888889 0.165768281 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 +26 0.2888889 0.08941103 0.625 0 0 0.454545468 Private Some-college Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.135447115 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Transport-moving Own-child Black Female United-States 0 +27 0.3 0.0656628758 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Female United-States 0 +27 0.3 0.149020851 0.5625 0 0 0.08080808 Private HS-grad Never-married Adm-clerical Not-in-family Amer-Indian-Eskimo Female United-States 0 +26 0.2888889 0.0787974745 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +53 0.5888889 0.108904466 0.5625 0 0 0.353535354 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +34 0.377777785 0.0726023 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Germany 1 +50 0.5555556 0.131011888 0.875 0 0 0.5050505 Self-emp-inc Masters Never-married Prof-specialty Not-in-family Black Male Trinadad&Tobago 0 +30 0.333333343 0.1875807 0.5625 0 0 0.6262626 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +47 0.5222222 0.2315221 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Male United-States 0 +27 0.3 0.137450874 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 +55 0.6111111 0.02152953 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +21 0.233333334 0.0967222452 0.625 0 0 0.2929293 Private Some-college Never-married Other-service Own-child White Female ? 0 +35 0.3888889 0.117402449 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +31 0.344444454 0.109483704 0.5 0 0 0.5050505 Self-emp-not-inc 12th Married-civ-spouse Sales Wife Asian-Pac-Islander Female ? 0 +39 0.433333337 0.250908434 0.875 0 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.0506275669 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +39 0.433333337 0.118741438 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 +19 0.211111113 0.0629875958 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +25 0.2777778 0.08540215 0.5625 0 0 0.4040404 ? HS-grad Married-spouse-absent ? Not-in-family White Male United-States 0 +57 0.6333333 0.01692188 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +21 0.233333334 0.07552814 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Other-relative Asian-Pac-Islander Female South 0 +30 0.333333343 0.03960248 0.25 0 0 0.444444448 ? 7th-8th Widowed ? Not-in-family White Female United-States 0 +25 0.2777778 0.0144621329 0.625 0 0 0.222222224 Self-emp-not-inc Some-college Never-married Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.06127076 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 +26 0.2888889 0.100851014 0.5625 0 0.365932047 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Female United-States 0 +42 0.466666669 0.0355956256 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +39 0.433333337 0.07162837 0.625 0 0 0.474747479 Self-emp-not-inc Some-college Divorced Sales Unmarried White Male United-States 0 +48 0.533333361 0.134528413 0.8125 0 0 0.444444448 Private Bachelors Divorced Priv-house-serv Not-in-family White Female Germany 0 +24 0.266666681 0.3290492 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 +46 0.51111114 0.272048 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 1 +53 0.5888889 0.116515405 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.142078727 0.625 0 0 0.7070707 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +34 0.377777785 0.106045313 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +25 0.2777778 0.0736779347 0.5625 0 0 0.7070707 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +33 0.366666675 0.0908503756 0.625 1 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Female United-States 1 +45 0.5 0.09737894 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.137056187 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 +21 0.233333334 0.136640608 0.5625 0 0 0.2020202 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +33 0.366666675 0.118146032 0.3125 0.00114001136 0 0.5555556 Private 9th Divorced Craft-repair Unmarried White Male United-States 0 +44 0.4888889 0.2269178 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.11961703 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female Puerto-Rico 1 +30 0.333333343 0.0535109676 0.625 0 0 0.1010101 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +32 0.355555564 0.129137442 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +46 0.51111114 0.156942964 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family Black Female United-States 0 +29 0.322222233 0.09021119 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.147646174 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +35 0.3888889 0.06366854 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Protective-serv Unmarried White Female United-States 0 +35 0.3888889 0.166731447 0.5625 0 0 0.4040404 Private HS-grad Separated Prof-specialty Other-relative Black Female United-States 0 +29 0.322222233 0.0197756458 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +21 0.233333334 0.1123799 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 +43 0.477777779 0.132732764 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male Philippines 1 +33 0.366666675 0.103446811 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +61 0.677777767 0.10195224 0.9375 0 0 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.11727044 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.350260168 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Adm-clerical Wife White Female United-States 0 +35 0.3888889 0.131223381 0.625 0 0 0.4040404 State-gov Some-college Never-married Prof-specialty Own-child Black Female United-States 0 +32 0.355555564 0.146095023 0.5625 0 0 0.24242425 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +22 0.244444445 0.08527822 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +61 0.677777767 0.0176829752 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +28 0.311111122 0.0363991521 0.6875 0.0246302467 0 0.353535354 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 +24 0.266666681 0.0456683338 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +58 0.644444466 0.0360213 0.875 0 0 0.353535354 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +42 0.466666669 0.277751476 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +56 0.622222245 0.148303539 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +26 0.2888889 0.1725198 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +25 0.2777778 0.180656761 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Unmarried Black Female United-States 0 +59 0.655555546 0.06676815 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +65 0.722222269 0.0777918845 0.8125 0.03818038 0 0.1010101 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +57 0.6333333 0.214080915 0.875 0 0.6483012 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 1 +36 0.4 0.0662683845 0.75 0 0 0.444444448 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.116995633 0.625 0 0.4331956 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.142235 0.5 0 0 0.2020202 ? 12th Never-married ? Other-relative Black Male United-States 0 +18 0.2 0.07775484 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.043832276 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.0167683139 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +19 0.211111113 0.124408558 0.625 0 0 0.3030303 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +28 0.311111122 0.276452243 0.8125 0 0 0.4848485 Private Bachelors Divorced Other-service Unmarried White Female England 1 +37 0.411111116 0.056504827 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +23 0.25555557 0.07631752 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +60 0.6666667 0.108186476 0.625 0 0 0.474747479 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +17 0.188888893 0.229030684 0.5 0 0 0.121212125 Local-gov 12th Never-married Adm-clerical Own-child White Female United-States 0 +37 0.411111116 0.0329870246 0.8125 0.0486504845 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +29 0.322222233 0.164258227 0.6875 0 0 0.4040404 State-gov Assoc-voc Divorced Adm-clerical Own-child White Male United-States 0 +34 0.377777785 0.37327686 0.5625 0 0 0.2020202 Private HS-grad Separated Transport-moving Not-in-family Black Male United-States 0 +36 0.4 0.243744045 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male ? 1 +37 0.411111116 0.138316363 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +47 0.5222222 0.11266952 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 +22 0.244444445 0.02402026 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +61 0.677777767 0.24074614 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +57 0.6333333 0.263255 0.1875 0 0 0.454545468 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +33 0.366666675 0.223354146 1 0 0.4242424 0.4040404 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +54 0.6 0.13633348 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.12125776 0.875 0 0.383149683 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +40 0.444444448 0.05202852 0.5 0 0 0.5050505 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.06856244 0.5625 0 0 0.424242437 Local-gov HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 +35 0.3888889 0.183214173 0.4375 0 0.4722222 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.133405626 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Own-child White Male United-States 0 +49 0.544444442 0.134252936 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +31 0.344444454 0.120455578 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +58 0.644444466 0.09224122 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 0 +26 0.2888889 0.0735769048 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +35 0.3888889 0.08680243 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +25 0.2777778 0.06961518 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male India 0 +43 0.477777779 0.238706008 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +32 0.355555564 0.138782457 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +45 0.5 0.1048417 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.09651682 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +31 0.344444454 0.169872135 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Own-child White Male Mexico 0 +20 0.222222224 0.0870476 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Female United-States 0 +28 0.311111122 0.268685043 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 +50 0.5555556 0.162060484 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +22 0.244444445 0.289179325 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative Black Male United-States 0 +19 0.211111113 0.08332834 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +38 0.422222227 0.306713462 0.8125 0 0 0.6363636 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.253529161 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +24 0.266666681 0.158053622 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +26 0.2888889 0.190032363 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 0 +45 0.5 0.14012818 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Tech-support Unmarried White Female United-States 0 +88 0.9777778 0.04616338 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.08520278 0.4375 0 0 0.151515156 Private 11th Never-married Adm-clerical Own-child Amer-Indian-Eskimo Female South 0 +24 0.266666681 0.125581846 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +84 0.933333337 0.08566281 0.1875 0 0 0.2020202 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 0 +48 0.533333361 0.111313023 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Farming-fishing Husband Black Male United-States 0 +46 0.51111114 0.08401198 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Vietnam 0 +31 0.344444454 0.100845627 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.0278668161 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried Amer-Indian-Eskimo Male United-States 0 +35 0.3888889 0.222104058 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.14308095 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +36 0.4 0.124670558 0.9375 0 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.08537319 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +57 0.6333333 0.08250596 0.3125 0 0 0.5252525 Private 9th Widowed Other-service Unmarried Black Male ? 0 +30 0.333333343 0.07951479 0.625 0 0 0.454545468 Private Some-college Married-spouse-absent Exec-managerial Unmarried White Female United-States 0 +30 0.333333343 0.135307685 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +19 0.211111113 0.13523899 0.5 0.1502415 0 0.4040404 ? 12th Married-civ-spouse ? Other-relative White Female United-States 1 +30 0.333333343 0.0566570461 0.8125 0 0 0.434343427 Self-emp-inc Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +23 0.25555557 0.1333046 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 1 +41 0.455555558 0.10138917 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.29887554 0.625 0 0 0.6060606 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +27 0.3 0.07033249 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 +59 0.655555546 0.113916911 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.124974996 0.5625 0 0 0.363636374 Private HS-grad Never-married Sales Own-child White Female United-States 0 +60 0.6666667 0.117522337 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 +69 0.7666667 0.03399194 0.9375 0 0 0.343434334 State-gov Prof-school Married-civ-spouse Adm-clerical Husband White Male United-States 1 +24 0.266666681 0.1326479 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +19 0.211111113 0.08128955 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child Black Male United-States 0 +60 0.6666667 0.133908764 0.75 0 0 0.2020202 State-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male Mexico 0 +64 0.7111111 0.0149430363 0.625 0 0 0.353535354 Private Some-college Widowed Tech-support Not-in-family White Female United-States 0 +39 0.433333337 0.126670957 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.15703389 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.09318888 0.375 0 0 0.353535354 Private 10th Divorced Craft-repair Not-in-family Black Female United-States 0 +25 0.2777778 0.227663413 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 +17 0.188888893 0.224062026 0.375 0 0 0.04040404 ? 10th Never-married ? Own-child White Female United-States 0 +37 0.411111116 0.112035051 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 +74 0.822222233 0.264622271 0.5625 0 0 0.141414136 Self-emp-not-inc HS-grad Widowed Farming-fishing Not-in-family White Female United-States 0 +26 0.2888889 0.09553278 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +23 0.25555557 0.350749135 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 +57 0.6333333 0.0251531452 0.9375 0 0 0.363636374 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.261182517 0.4375 0 0 0.151515156 Private 11th Never-married Transport-moving Own-child White Male United-States 0 +37 0.411111116 0.135738075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +46 0.51111114 0.08324751 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.256356657 0.625 0 0 0.454545468 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 1 +40 0.444444448 0.0564819276 0.5625 0 0 0.3030303 Private HS-grad Widowed Machine-op-inspct Own-child White Female United-States 0 +50 0.5555556 0.01669692 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +25 0.2777778 0.179712474 0.0625 0 0 0.353535354 Private Preschool Never-married Farming-fishing Not-in-family White Male Mexico 0 +44 0.4888889 0.057546787 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +41 0.455555558 0.284121782 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.272149682 0.5625 0 0.453856736 0.151515156 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.15125294 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +54 0.6 0.198686615 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +40 0.444444448 0.127708867 0.5625 0 0 0.5252525 Federal-gov HS-grad Divorced Adm-clerical Not-in-family Black Female United-States 0 +37 0.411111116 0.147599027 0.4375 0.07688077 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 +46 0.51111114 0.0141145885 0.8125 0.1502415 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.04781758 0.5625 0 0 0.454545468 Private HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 +20 0.222222224 0.14496617 0.625 0 0 0.1010101 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +71 0.788888931 0.120087832 0.75 0 0 0.0303030312 ? Assoc-acdm Married-civ-spouse ? Husband White Male United-States 0 +35 0.3888889 0.03785331 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +62 0.6888889 0.06605757 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.236956164 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female Cuba 0 +56 0.622222245 0.0972253755 0.5625 0 0 0.909090936 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.0926871 0.875 0 0 0.2020202 State-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 0 +17 0.188888893 0.03654396 0.4375 0 0 0.2020202 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 +18 0.2 0.155164167 0.4375 0.005940059 0 0.04040404 Self-emp-not-inc 11th Never-married Other-service Own-child White Female United-States 0 +35 0.3888889 0.0662683845 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +21 0.233333334 0.124021269 0.5625 0 0 0.01010101 Private HS-grad Never-married Machine-op-inspct Own-child Black Male United-States 0 +46 0.51111114 0.0943763256 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Own-child White Male United-States 0 +33 0.366666675 0.01650429 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.0872415751 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +36 0.4 0.279906124 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.06542849 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.135601357 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +25 0.2777778 0.172842413 0.8125 0 0 0.4040404 Private Bachelors Separated Exec-managerial Not-in-family White Male United-States 0 +47 0.5222222 0.06523451 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.09554625 0.9375 0.1502415 0 0.75757575 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.01400615 0.5625 0.07688077 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +53 0.5888889 0.06433534 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.07596863 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +20 0.222222224 0.196272671 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child Black Male United-States 0 +32 0.355555564 0.1614186 0.625 0 0 0.7070707 Private Some-college Separated Machine-op-inspct Unmarried Black Female United-States 0 +28 0.311111122 0.123358518 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.06575987 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 0 +52 0.5777778 0.09685897 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +35 0.3888889 0.1259065 0.875 0 0 0.4040404 Private Masters Separated Prof-specialty Not-in-family White Male United-States 1 +30 0.333333343 0.114544645 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.07296264 0.625 0.068490684 0 0.5050505 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +56 0.622222245 0.0563721433 0.8125 0 0 0.3838384 State-gov Bachelors Separated Prof-specialty Not-in-family White Female ? 0 +21 0.233333334 0.137802467 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +56 0.622222245 0.0219599176 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family Black Female United-States 0 +56 0.622222245 0.130297273 0.8125 0 0.43663913 0.656565666 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.100353271 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.0572780445 0.625 0 0 0.2020202 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +62 0.6888889 0.0948680043 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +24 0.266666681 0.132201344 0.8125 0 0 0.3030303 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +52 0.5777778 0.02624966 0.8125 0 0 0.4040404 Federal-gov Bachelors Separated Adm-clerical Unmarried Black Female United-States 0 +23 0.25555557 0.0263904277 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.133926272 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.467979848 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.166662067 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male Nicaragua 0 +41 0.455555558 0.198201 0.3125 0 0 0.353535354 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.131891519 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +27 0.3 0.221879765 0.875 0 0 0.373737365 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 0 +19 0.211111113 0.117781647 0.625 0 0 0.232323229 ? Some-college Never-married ? Own-child White Male United-States 0 +41 0.455555558 0.07819937 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +27 0.3 0.1393563 0.8125 0 0 0.353535354 Private Bachelors Never-married Handlers-cleaners Unmarried White Male United-States 0 +50 0.5555556 0.146545619 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried White Female United-States 0 +29 0.322222233 0.227447882 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Own-child White Female El-Salvador 0 +38 0.422222227 0.137738481 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.113952607 0.5625 0 0 0.6060606 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +48 0.533333361 0.07369882 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +39 0.433333337 0.180435181 0.75 0.07298073 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Craft-repair Husband Black Male United-States 1 +40 0.444444448 0.135029525 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +27 0.3 0.14906463 0.4375 0 0 0.4040404 Local-gov 11th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +59 0.655555546 0.0895295739 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.1909679 0.5625 0 0 0.2020202 ? HS-grad Divorced ? Unmarried Black Female United-States 0 +34 0.377777785 0.115018807 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +47 0.5222222 0.125553563 0.9375 0 0 0.6060606 Self-emp-inc Prof-school Never-married Other-service Not-in-family White Male United-States 1 +64 0.7111111 0.2073045 0.125 0 0 0.2020202 Self-emp-inc 1st-4th Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.2563203 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +38 0.422222227 0.09918334 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +42 0.466666669 0.143391445 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +49 0.544444442 0.0837580562 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +53 0.5888889 0.066539146 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +35 0.3888889 0.145802036 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +70 0.7777778 0.0911554843 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband Asian-Pac-Islander Male China 0 +38 0.422222227 0.07227227 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.102878354 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Other-relative Asian-Pac-Islander Female South 0 +34 0.377777785 0.0674066544 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male India 0 +24 0.266666681 0.07932822 0.8125 0 0 0.1010101 Private Bachelors Never-married Prof-specialty Not-in-family White Male Hungary 0 +23 0.25555557 0.133099169 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.276868463 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +47 0.5222222 0.129981384 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 +59 0.655555546 0.0446930528 0.25 0.0486504845 0 0.4040404 Private 7th-8th Never-married Farming-fishing Unmarried White Male United-States 0 +33 0.366666675 0.09239815 0.75 0 0 0.5050505 Federal-gov Assoc-acdm Divorced Exec-managerial Unmarried White Male United-States 1 +63 0.7 0.155657187 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +18 0.2 0.09873073 0.5625 0 0 0.6060606 Local-gov HS-grad Never-married Other-service Own-child White Male United-States 0 +32 0.355555564 0.0218265578 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.389775068 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male ? 0 +19 0.211111113 0.139271438 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +27 0.3 0.08991349 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Prof-specialty Own-child White Male United-States 0 +40 0.444444448 0.0233864635 0.625 0 0 0.4848485 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 1 +38 0.422222227 0.08978147 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.0168161355 0.5625 0 0 0.474747479 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +35 0.3888889 0.115826376 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Separated Transport-moving Not-in-family White Male United-States 0 +22 0.244444445 0.277601272 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.0345455855 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.133538321 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +23 0.25555557 0.197726145 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +26 0.2888889 0.152412772 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +53 0.5888889 0.07438852 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +34 0.377777785 0.108192541 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.117358 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.2628913 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +18 0.2 0.201292515 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 +65 0.722222269 0.115567744 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +49 0.544444442 0.156707227 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +64 0.7111111 0.042887982 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband Black Male United-States 0 +68 0.75555557 0.114754111 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.118517824 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Other-service Not-in-family White Female United-States 0 +68 0.75555557 0.2842403 0.5625 0 0.845500469 0.4040404 Federal-gov HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 +35 0.3888889 0.07126871 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.206577748 0.5625 0 0 0.121212125 Federal-gov HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +45 0.5 0.119581334 0.5625 0 0 0.282828271 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.2157176 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +39 0.433333337 0.08721935 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried Black Female United-States 0 +37 0.411111116 0.173126653 0.5625 0.01506015 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +45 0.5 0.18589215 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +20 0.222222224 0.05813815 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Female United-States 0 +36 0.4 0.188886017 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Tech-support Unmarried White Female United-States 0 +26 0.2888889 0.2502558 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.274956316 0.8125 0 0 0.323232323 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.10058362 0.8125 0 0 0.6060606 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +34 0.377777785 0.140968755 0.5625 0 0.459366381 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +53 0.5888889 0.239644915 0.625 0 0 0.3030303 Private Some-college Widowed Sales Unmarried White Female United-States 0 +32 0.355555564 0.111772373 0.8125 0 0.365013778 0.424242437 Private Bachelors Divorced Machine-op-inspct Not-in-family White Female United-States 0 +44 0.4888889 0.0757773444 0.1875 0 0 0.4040404 Self-emp-not-inc 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.31175822 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male Mexico 0 +35 0.3888889 0.2786062 0.1875 0 0 0.363636374 Private 5th-6th Never-married Farming-fishing Unmarried White Male United-States 0 +34 0.377777785 0.01969078 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 +42 0.466666669 0.100910954 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.0266248174 0.5625 0 0 0.04040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +23 0.25555557 0.132946953 0.5625 0 0 0.373737365 Private HS-grad Never-married Craft-repair Own-child White Male Mexico 0 +56 0.622222245 0.172024742 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +50 0.5555556 0.0294765625 1 0.1502415 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.113370672 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +46 0.51111114 0.187459469 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.07800405 0.75 0 0 0.575757563 Private Assoc-acdm Separated Adm-clerical Unmarried White Female United-States 0 +38 0.422222227 0.124237478 0.5625 0.0346403457 0 0.8080808 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male Italy 0 +42 0.466666669 0.195079833 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +48 0.533333361 0.06848768 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +27 0.3 0.08986634 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +40 0.444444448 0.235336319 0.6875 0 0 0.363636374 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 0 +53 0.5888889 0.08356947 1 1 0 0.373737365 Private Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 +75 0.8333334 0.111785173 0.6875 0 0 0.3030303 Self-emp-not-inc Assoc-voc Widowed Exec-managerial Not-in-family White Female United-States 0 +39 0.433333337 0.124670558 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.1806965 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +51 0.566666663 0.104363494 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family Black Female United-States 0 +34 0.377777785 0.119020954 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Own-child White Male United-States 0 +23 0.25555557 0.1111763 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.143968 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 +45 0.5 0.0519510619 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Never-married Sales Not-in-family White Male United-States 0 +21 0.233333334 0.0738645047 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +36 0.4 0.109223045 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.147902116 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.220556945 0.375 0 0 0.4040404 ? 10th Divorced ? Not-in-family White Female United-States 0 +68 0.75555557 0.159589276 0.3125 0 0 0.2020202 Private 9th Divorced Farming-fishing Not-in-family Black Male United-States 0 +40 0.444444448 0.06009679 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +20 0.222222224 0.0840241 0.625 0 0 0.24242425 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +48 0.533333361 0.09707114 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 1 +27 0.3 0.06652433 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +57 0.6333333 0.114545316 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 +54 0.6 0.109408267 0.5625 0 0 0.989899 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.01542394 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.068788074 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.145310357 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child White Male United-States 0 +35 0.3888889 0.2570093 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband Other Male United-States 1 +56 0.622222245 0.1335464 0.5 0 0 0.4040404 Local-gov 12th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +20 0.222222224 0.163788766 0.5625 0 0 0.282828271 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +38 0.422222227 0.119421035 0.8125 0 0 0.3838384 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +19 0.211111113 0.112580612 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 +24 0.266666681 0.182441637 0.5625 0.005940059 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male ? 0 +31 0.344444454 0.257538021 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male Germany 0 +44 0.4888889 0.186666042 0.8125 0 0 0.6060606 Local-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +21 0.233333334 0.0981009752 0.625 0 0.3677686 0.121212125 State-gov Some-college Never-married Sales Own-child Black Female United-States 0 +41 0.455555558 0.115410805 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.178553313 0.4375 0 0 0.161616161 Private 11th Never-married Other-service Own-child White Female United-States 0 +23 0.25555557 0.07113669 0.3125 0 0 0.4040404 Private 9th Never-married Transport-moving Own-child White Male United-States 0 +37 0.411111116 0.146621048 0.625 0 0 0.323232323 Local-gov Some-college Married-civ-spouse Other-service Husband Amer-Indian-Eskimo Male United-States 0 +46 0.51111114 0.0546478927 0.6875 0 0 0.3030303 ? Assoc-voc Divorced ? Unmarried White Male United-States 0 +43 0.477777779 0.04976275 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Divorced Sales Unmarried White Male United-States 0 +31 0.344444454 0.228652835 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +40 0.444444448 0.2197285 0.625 0 0 0.4040404 Private Some-college Divorced Transport-moving Unmarried White Male United-States 1 +27 0.3 0.07160749 0.9375 0 0 0.121212125 Private Prof-school Divorced Prof-specialty Not-in-family White Female United-States 0 +64 0.7111111 0.133850157 0.625 0 0 0.4040404 Local-gov Some-college Never-married Transport-moving Unmarried White Male United-States 0 +31 0.344444454 0.08520278 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Never-married Prof-specialty Own-child White Male United-States 0 +48 0.533333361 0.157473713 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +37 0.411111116 0.137738481 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male Canada 1 +28 0.311111122 0.140262887 0.625 0 0 0.24242425 Private Some-college Divorced Tech-support Not-in-family White Male United-States 0 +42 0.466666669 0.127091244 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +60 0.6666667 0.06282191 0.25 0 0 0.6060606 Self-emp-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 +17 0.188888893 0.107293367 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 +21 0.233333334 0.204476982 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 +46 0.51111114 0.0236653071 0.375 0 0 0.4040404 Private 10th Divorced Adm-clerical Own-child Black Male United-States 0 +18 0.2 0.09400925 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +22 0.244444445 0.1699698 0.5625 0 0 0.272727281 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +44 0.4888889 0.0564502738 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +36 0.4 0.06042817 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +65 0.722222269 0.15007022 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 +26 0.2888889 0.307547957 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male Mexico 0 +21 0.233333334 0.199472621 0.375 0 0 0.25252524 Private 10th Married-civ-spouse Other-service Husband White Male United-States 0 +41 0.455555558 0.109206885 0.5625 0 0.5369605 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.0246520359 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Unmarried White Female United-States 0 +27 0.3 0.131566212 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 +19 0.211111113 0.190422341 0.625 0 0 0.121212125 State-gov Some-college Never-married Other-service Not-in-family Black Male United-States 0 +40 0.444444448 0.1387811 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.15046221 0.5625 0 0 0.151515156 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +40 0.444444448 0.0187384021 0.6875 0.0282902829 0 0.4040404 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.08879003 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +33 0.366666675 0.3700486 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +34 0.377777785 0.0468045846 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +44 0.4888889 0.130500674 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Protective-serv Not-in-family White Male United-States 0 +33 0.366666675 0.4033138 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +72 0.8 0.174958661 0.5625 0.02290023 0 0.1010101 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +19 0.211111113 0.179331928 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +59 0.655555546 0.0221956559 0.6875 0 0 0.363636374 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 +40 0.444444448 0.196542755 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Not-in-family Black Female United-States 0 +35 0.3888889 0.128461882 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 +22 0.244444445 0.0398624651 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 +41 0.455555558 0.1323199 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +59 0.655555546 0.09967569 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +50 0.5555556 0.131867275 0.5 0 0 0.4040404 Private 12th Divorced Handlers-cleaners Unmarried White Male United-States 0 +21 0.233333334 0.1361981 0.75 0 0 0.1010101 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.151656389 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +22 0.244444445 0.0369265266 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +43 0.477777779 0.127234027 0.1875 0 0 0.4040404 Private 5th-6th Separated Machine-op-inspct Not-in-family White Female Mexico 0 +17 0.188888893 0.08933492 0.4375 0 0 0.161616161 Private 11th Never-married Transport-moving Own-child White Female United-States 0 +42 0.466666669 0.1537814 0.25 0 0 0.4040404 Local-gov 7th-8th Divorced Other-service Not-in-family White Male United-States 0 +37 0.411111116 0.279853582 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +19 0.211111113 0.17124413 0.5 0 0 0.3838384 Private 12th Never-married Adm-clerical Own-child White Male ? 0 +43 0.477777779 0.172178984 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband Other Male Mexico 0 +46 0.51111114 0.064713195 0.3125 0 0 0.4040404 Private 9th Separated Craft-repair Unmarried White Female United-States 0 +18 0.2 0.0526576 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Own-child White Female United-States 0 +50 0.5555556 0.228696615 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Laos 1 +47 0.5222222 0.08520211 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male Puerto-Rico 0 +31 0.344444454 0.344370782 0.5625 0.02907029 0 1 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +33 0.366666675 0.107478589 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +27 0.3 0.150942445 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +59 0.655555546 0.08628313 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +39 0.433333337 0.0602867231 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.249370754 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.04529991 0.8125 0 0 0.5555556 Private Bachelors Widowed Exec-managerial Not-in-family White Female United-States 0 +24 0.266666681 0.04240034 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +25 0.2777778 0.07480139 0.625 0 0.454545438 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +30 0.333333343 0.01969078 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Other-relative White Female United-States 0 +52 0.5777778 0.0681071356 0.4375 0 0 0.4040404 State-gov 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +51 0.566666663 0.09464237 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.107690081 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +19 0.211111113 0.0307421349 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Female United-States 0 +23 0.25555557 0.112056606 0.625 0 0 0.6060606 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +37 0.411111116 0.108378433 1 0 0 0.454545468 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +25 0.2777778 0.173141465 0.625 0 0 0.3838384 State-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +49 0.544444442 0.122116514 0.9375 0.1502415 0 0.656565666 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.0560737662 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +40 0.444444448 0.08668389 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +20 0.222222224 0.163675621 0.5625 0 0 0.323232323 Private HS-grad Never-married Machine-op-inspct Other-relative Other Male United-States 0 +35 0.3888889 0.0254447851 0.6875 0.03103031 0 0.5555556 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +24 0.266666681 0.08912209 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +32 0.355555564 0.1581156 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Male United-States 0 +35 0.3888889 0.0960568 0.5625 0 0 0.3030303 Private HS-grad Separated Other-service Own-child Black Female United-States 0 +20 0.222222224 0.10002593 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +29 0.322222233 0.162145346 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +25 0.2777778 0.0217389986 0.5625 0 0 0.282828271 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +50 0.5555556 0.110406443 0.25 0 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.312589377 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +49 0.544444442 0.1827609 0.8125 0.1502415 0 0.6060606 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +30 0.333333343 0.220801443 0.5625 0 0 0.323232323 Local-gov HS-grad Divorced Protective-serv Own-child White Female United-States 0 +37 0.411111116 0.17989096 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +50 0.5555556 0.179796666 0.5625 0.031370312 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female El-Salvador 0 +20 0.222222224 0.158053622 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +49 0.544444442 0.127380863 0.5625 0.0501305 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.07071843 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +61 0.677777767 0.06820547 0.5 0 0 0.4040404 Private 12th Widowed Machine-op-inspct Unmarried White Female Italy 0 +22 0.244444445 0.124587044 0.5625 0 0 0.0303030312 Private HS-grad Married-spouse-absent Other-service Own-child White Female United-States 0 +23 0.25555557 0.166339442 0.75 0 0 0.121212125 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 +43 0.477777779 0.1529361 0.5625 0.046500463 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +39 0.433333337 0.203317836 0.8125 0 0 0.24242425 Private Bachelors Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female Philippines 0 +21 0.233333334 0.1252424 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 +52 0.5777778 0.09082882 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.1892834 0.6875 0.0406404063 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.08533749 0.8125 0.09562095 0 0.454545468 Private Bachelors Divorced Adm-clerical Unmarried White Male United-States 1 +50 0.5555556 0.06462496 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.05962666 0.75 0 0 1 Self-emp-not-inc Assoc-acdm Divorced Exec-managerial Unmarried White Female United-States 0 +47 0.5222222 0.0166517925 0.375 0 0 0.454545468 Private 10th Divorced Exec-managerial Not-in-family Amer-Indian-Eskimo Female United-States 0 +49 0.544444442 0.115451217 0.3125 0 0 0.4040404 ? 9th Divorced ? Not-in-family White Male United-States 0 +45 0.5 0.124321669 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +48 0.533333361 0.06739858 0.625 0 0 0.4040404 Federal-gov Some-college Widowed Other-service Unmarried Black Female United-States 0 +36 0.4 0.123164535 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.311370939 0.625 0 0 0.4040404 Never-worked Some-college Never-married ? Own-child Black Male United-States 0 +61 0.677777767 0.057542745 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +72 0.8 0.106480412 0.8125 0 0 0.3030303 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 +19 0.211111113 0.07061605 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 +54 0.6 0.2051384 0.8125 0.07688077 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male ? 1 +47 0.5222222 0.060487438 0.625 0 0 0.353535354 ? Some-college Divorced ? Not-in-family Amer-Indian-Eskimo Female United-States 0 +39 0.433333337 0.0715179145 0.5625 0.068490684 0 0.4040404 Private HS-grad Divorced Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 +24 0.266666681 0.0601782873 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family White Female United-States 0 +44 0.4888889 0.105903871 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Handlers-cleaners Unmarried White Male Poland 0 +19 0.211111113 0.175966948 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +20 0.222222224 0.192742676 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +23 0.25555557 0.08235441 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Female United-States 0 +58 0.644444466 0.167534292 0.5625 0 0 0.535353541 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +20 0.222222224 0.151032031 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Own-child White Male United-States 0 +62 0.6888889 0.0930535048 0.5625 0 0 0.121212125 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.09999293 0.5625 0.04416044 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female Puerto-Rico 0 +67 0.7444445 0.159376442 0.8125 0 0 0.02020202 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.128890246 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male France 1 +36 0.4 0.2381106 0.5625 0.0183101818 0 0.4040404 Private HS-grad Divorced Exec-managerial Own-child White Female United-States 0 +38 0.422222227 0.263378918 0.6875 0 0 0.2020202 Private Assoc-voc Separated Tech-support Unmarried White Female United-States 0 +23 0.25555557 0.0909251347 0.5625 0 0 0.8080808 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +28 0.311111122 0.264353544 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +25 0.2777778 0.14597109 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Own-child White Male United-States 0 +41 0.455555558 0.117461048 1 0.1502415 0 0.5555556 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +63 0.7 0.2580028 0.8125 0 0.4242424 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +60 0.6666667 0.06470848 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.06966704 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.06514291 0.5625 0 0 0.373737365 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.120527647 0.8125 0.07688077 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +51 0.566666663 0.117186248 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Sales Husband White Male United-States 0 +45 0.5 0.0231823828 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.151443556 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.1682873 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +34 0.377777785 0.2293102 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +66 0.733333349 0.287883461 1 0 0.5456841 0.25252524 Self-emp-not-inc Doctorate Married-civ-spouse Sales Husband White Male United-States 1 +19 0.211111113 0.296636045 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child White Female United-States 0 +36 0.4 0.118301615 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.200366408 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +27 0.3 0.156902552 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.219794512 0.625 0.0183101818 0 0.4040404 Private Some-college Divorced Exec-managerial Own-child White Female United-States 0 +25 0.2777778 0.07369747 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +22 0.244444445 0.08605616 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Own-child White Male United-States 1 +41 0.455555558 0.1703948 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.2563095 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Transport-moving Own-child White Male United-States 0 +52 0.5777778 0.2061743 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.156835869 0.625 0 0 0.373737365 Private Some-college Separated Other-service Unmarried Black Female United-States 0 +44 0.4888889 0.0876443461 0.9375 0 0 0.454545468 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 +50 0.5555556 0.130821273 0.875 0 0 0.4040404 Private Masters Divorced Sales Not-in-family White Female United-States 1 +49 0.544444442 0.132711887 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.113303989 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Own-child White Female United-States 0 +71 0.788888931 0.0175853111 0.9375 0 0 0.282828271 State-gov Prof-school Married-civ-spouse Other-service Husband White Male United-States 0 +20 0.222222224 0.192409277 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Other-relative Black Male United-States 0 +20 0.222222224 0.103443444 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female ? 0 +59 0.655555546 0.07001256 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.29630062 0.1875 0.03411034 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +38 0.422222227 0.0271562375 0.625 0 0 0.424242437 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +55 0.6111111 0.107110843 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +17 0.188888893 0.06646101 0.3125 0 0 0.2020202 Private 9th Never-married Other-service Unmarried White Female United-States 0 +45 0.5 0.0611286424 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.0508080758 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Divorced Craft-repair Unmarried Amer-Indian-Eskimo Male United-States 0 +19 0.211111113 0.147631347 0.5 0 0 0.25252524 Private 12th Never-married Other-service Own-child White Male United-States 0 +33 0.366666675 0.137039348 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Own-child White Female United-States 0 +63 0.7 0.126378641 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +39 0.433333337 0.104156047 0.5625 0.0861408561 0 0.5050505 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 1 +34 0.377777785 0.018288482 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.1012484 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Machine-op-inspct Unmarried White Male United-States 0 +21 0.233333334 0.05637753 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.118718535 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Adm-clerical Other-relative White Female United-States 0 +20 0.222222224 0.120847575 0.625 0 0 0.08080808 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 +45 0.5 0.113179386 0.8125 0 0 0.6060606 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 +59 0.655555546 0.07325698 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +58 0.644444466 0.09865731 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male Greece 1 +66 0.733333349 0.126772657 0.5625 0 0 0.353535354 Local-gov HS-grad Widowed Adm-clerical Unmarried White Female United-States 1 +37 0.411111116 0.197247937 0.6875 0 0.4331956 0.353535354 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +29 0.322222233 0.07736891 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Own-child White Male United-States 0 +32 0.355555564 0.05234912 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Exec-managerial Not-in-family Asian-Pac-Islander Female United-States 0 +39 0.433333337 0.1913956 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +57 0.6333333 0.09018762 0.5625 0 0 0.454545468 Private HS-grad Widowed Exec-managerial Unmarried White Female United-States 0 +57 0.6333333 0.128859267 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.0456616 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-spouse-absent Sales Not-in-family White Male United-States 0 +44 0.4888889 0.240909144 0.8125 0.1502415 0 0.656565666 Self-emp-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +56 0.622222245 0.07939085 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 1 +26 0.2888889 0.03767011 0.875 0 0 0.4848485 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +22 0.244444445 0.111176968 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female Italy 0 +26 0.2888889 0.0231069475 0.6875 0 0 0.656565666 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Own-child White Male United-States 0 +33 0.366666675 0.165715083 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.09918334 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 +45 0.5 0.221689835 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +56 0.622222245 0.0356656723 1 0 0.383149683 0.3838384 Local-gov Doctorate Divorced Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.145605356 0.625 0 0 0.363636374 Private Some-college Never-married Sales Own-child White Male Iran 0 +23 0.25555557 0.263467163 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family Black Male United-States 0 +35 0.3888889 0.15036118 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +39 0.433333337 0.06999707 0.8125 0.07688077 0 0.323232323 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +45 0.5 0.0257559586 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.09998215 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 +56 0.622222245 0.07426189 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +31 0.344444454 0.06825935 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +44 0.4888889 0.180573255 0.5 0 0 0.363636374 Private 12th Never-married Transport-moving Not-in-family Black Male United-States 0 +21 0.233333334 0.2485908 0.625 0 0 0.1010101 ? Some-college Never-married ? Other-relative White Male United-States 0 +31 0.344444454 0.1945336 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +20 0.222222224 0.109575979 0.5625 0 0 0.3838384 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +17 0.188888893 0.03283548 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child Black Female United-States 0 +44 0.4888889 0.123997025 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +19 0.211111113 0.207109153 0.625 0 0 0.232323229 Private Some-college Never-married Other-service Own-child White Female United-States 0 +71 0.788888931 0.119206175 0.5625 0 0 0.24242425 ? HS-grad Widowed ? Unmarried White Male United-States 0 +23 0.25555557 0.180476934 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +21 0.233333334 0.191262916 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male Mexico 0 +29 0.322222233 0.137748584 0.875 0 0 0.151515156 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.112999551 0.625 0 0 0.3030303 Private Some-college Separated Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.232418567 0.5625 0 0 0.4848485 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 1 +21 0.233333334 0.2560906 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Black Female United-States 0 +36 0.4 0.20620662 0.625 0.1502415 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +70 0.7777778 0.025057504 0.875 0.09386094 0 0.3030303 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.124669217 0.5625 0 0 0.373737365 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 +29 0.322222233 0.09753318 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Own-child Black Female United-States 0 +34 0.377777785 0.12608768 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Sales Unmarried White Male United-States 0 +26 0.2888889 0.084251754 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +30 0.333333343 0.194959939 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +34 0.377777785 0.097526446 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.115950309 0.8125 0 0 0.25252524 ? Bachelors Never-married ? Not-in-family Asian-Pac-Islander Male Taiwan 0 +28 0.311111122 0.139767155 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Own-child White Male United-States 0 +24 0.266666681 0.110846266 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +76 0.844444454 0.134672552 0.8125 0.200512 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +19 0.211111113 0.143479 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 +45 0.5 0.143557146 0.375 0.0282902829 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.0561552644 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 1 +37 0.411111116 0.129951075 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.285911351 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +24 0.266666681 0.144973591 0.8125 0 0 0.424242437 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.0206653848 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +20 0.222222224 0.206531942 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +23 0.25555557 0.147287175 0.4375 0 0 0.4040404 Local-gov 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +25 0.2777778 0.1475916 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family Other Female United-States 0 +64 0.7111111 0.121656492 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Prof-specialty Other-relative White Female United-States 0 +53 0.5888889 0.134834871 0.875 0 0.453856736 0.5555556 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.1309836 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Own-child White Female United-States 0 +52 0.5777778 0.13859117 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +28 0.311111122 0.168296069 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family Black Male United-States 0 +31 0.344444454 0.142278776 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +77 0.8555556 0.1009709 0.8125 0 0 0.1010101 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +22 0.244444445 0.0575124361 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Own-child White Male United-States 0 +17 0.188888893 0.543081641 0.4375 0 0 0.2020202 ? 11th Never-married ? Own-child White Female United-States 0 +38 0.422222227 0.2222529 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +45 0.5 0.159366339 0.4375 0 0 0.4040404 ? 11th Divorced ? Own-child Black Male United-States 0 +25 0.2777778 0.16785422 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +50 0.5555556 0.173183233 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +53 0.5888889 0.137668431 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +24 0.266666681 0.196657926 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +33 0.366666675 0.09339701 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +57 0.6333333 0.0284891613 0.875 0.1502415 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +39 0.433333337 0.252879858 0.9375 0.1502415 0 0.4848485 Private Prof-school Married-civ-spouse Exec-managerial Wife White Female United-States 1 +30 0.333333343 0.0635904148 0.625 0 0 0.3030303 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 +31 0.344444454 0.112228356 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +39 0.433333337 0.219953462 0.625 0 0 0.4040404 State-gov Some-college Never-married Transport-moving Own-child Black Male United-States 0 +30 0.333333343 0.111471981 0.8125 0 0 0.656565666 Private Bachelors Never-married Sales Own-child White Female United-States 0 +48 0.533333361 0.0691026151 0.625 0 0 0.444444448 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 +62 0.6888889 0.076267004 0.875 0 0 0.4040404 ? Masters Married-civ-spouse ? Wife White Female United-States 0 +39 0.433333337 0.11940217 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +34 0.377777785 0.1334292 0.5625 0 0.454545438 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +45 0.5 0.175449 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.159949616 0.4375 0 0 0.4040404 Private 11th Divorced Machine-op-inspct Unmarried White Female United-States 0 +40 0.444444448 0.02484332 0.625 0 0 0.5050505 Federal-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +17 0.188888893 0.111969717 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Female United-States 0 +19 0.211111113 0.106824592 0.375 0 0 0.25252524 ? 10th Never-married ? Own-child Black Male United-States 0 +25 0.2777778 0.184702009 0.5625 0 0 0.8484849 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +42 0.466666669 0.124701545 0.625 0 0 0.575757563 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +66 0.733333349 0.0191061534 0.8125 0 0 1 Private Bachelors Married-civ-spouse Priv-house-serv Other-relative White Male United-States 0 +63 0.7 0.0192711689 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Widowed Sales Not-in-family White Male United-States 0 +43 0.477777779 0.128934041 0.25 0 0 0.25252524 Private 7th-8th Married-civ-spouse Other-service Husband White Male United-States 0 +26 0.2888889 0.309521437 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male Mexico 0 +23 0.25555557 0.04410371 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 +39 0.433333337 0.125364974 0.9375 0 0 0.5555556 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.236248285 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.242255539 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Female United-States 0 +35 0.3888889 0.148578346 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.0199359469 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +21 0.233333334 0.201489866 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +46 0.51111114 0.05068751 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Priv-house-serv Wife White Female United-States 0 +43 0.477777779 0.096708104 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +31 0.344444454 0.139761776 1 0 0.453856736 0.7070707 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.207819059 0.5625 0 0 0.6060606 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +50 0.5555556 0.0981454253 0.5625 0 0 0.353535354 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.225207031 0.4375 0 0 0.323232323 Private 11th Separated Exec-managerial Not-in-family White Female United-States 0 +31 0.344444454 0.05132198 0.5625 0 0 0.2020202 ? HS-grad Separated ? Own-child White Female United-States 0 +45 0.5 0.1047272 0.25 0 0 0.656565666 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.132903174 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.130840138 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Exec-managerial Wife White Female United-States 0 +40 0.444444448 0.233170226 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.06624953 0.8125 0.1502415 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +64 0.7111111 0.120263621 0.375 0 0 0.565656543 ? 10th Married-civ-spouse ? Husband White Male United-States 1 +51 0.566666663 0.10974773 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.0130005628 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +56 0.622222245 0.04557269 0.875 0 0 0.3939394 State-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +35 0.3888889 0.08531998 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +55 0.6111111 0.187396154 0.375 0 0 0.353535354 Self-emp-not-inc 10th Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.113929704 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Unmarried White Female United-States 0 +34 0.377777785 0.137436062 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.145073935 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +43 0.477777779 0.05613775 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.132562369 0.625 0 0 0.5050505 Local-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 0 +30 0.333333343 0.364613175 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband Black Male United-States 0 +33 0.366666675 0.0376647227 0.6875 0 0 0.7070707 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 0 +32 0.355555564 0.1695293 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Male ? 0 +29 0.322222233 0.08072176 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +50 0.5555556 0.10815078 0.5625 0.031370312 0 0.474747479 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +18 0.2 0.01740211 0.4375 0 0 0.151515156 Private 11th Never-married Prof-specialty Own-child White Male United-States 0 +20 0.222222224 0.159352869 0.4375 0 0 0.25252524 Private 11th Never-married Sales Own-child White Female United-States 0 +45 0.5 0.134252936 0.875 0 0 0.454545468 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.230086118 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family White Male ? 0 +45 0.5 0.118513778 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.1340098 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +42 0.466666669 0.130353838 0.25 0 0 0.353535354 Local-gov 7th-8th Married-spouse-absent Other-service Not-in-family White Female Puerto-Rico 0 +24 0.266666681 0.2955732 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +22 0.244444445 0.200866163 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 +28 0.311111122 0.182841718 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.226017967 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +21 0.233333334 0.139348224 0.25 0 0 0.3838384 Private 7th-8th Never-married Farming-fishing Own-child White Female United-States 0 +23 0.25555557 0.109483704 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 +45 0.5 0.09809154 0.625 0 0 0.4848485 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +41 0.455555558 0.06822231 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +49 0.544444442 0.154492646 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +38 0.422222227 0.296080381 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Female United-States 0 +37 0.411111116 0.108534023 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +70 0.7777778 0.2051384 0.8125 0 0 0.323232323 Private Bachelors Widowed Machine-op-inspct Other-relative Asian-Pac-Islander Male Philippines 0 +24 0.266666681 0.0695606247 0.5625 0.02597026 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.274581164 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.0497930571 0.6875 0 0 0.2020202 Private Assoc-voc Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +83 0.922222257 0.1617493 0.375 0.200512 0 0.5050505 Self-emp-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 1 +69 0.7666667 0.155193791 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male China 1 +37 0.411111116 0.175181612 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +28 0.311111122 0.06467278 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +54 0.6 0.07033114 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +71 0.788888931 0.102584019 0.5625 0 0.5456841 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.06291822 0.5625 0 0 0.4040404 State-gov HS-grad Widowed Adm-clerical Unmarried Asian-Pac-Islander Female United-States 0 +27 0.3 0.190383956 0.8125 0 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Not-in-family Other Female ? 0 +42 0.466666669 0.18167448 0.875 1 0 0.8080808 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +21 0.233333334 0.136640608 0.5625 0 0 0.444444448 Private HS-grad Never-married Sales Own-child White Male United-States 0 +29 0.322222233 0.114287354 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +27 0.3 0.182933986 0.25 0 0 0.24242425 Private 7th-8th Never-married Other-service Not-in-family White Male ? 0 +32 0.355555564 0.229619354 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +31 0.344444454 0.222181514 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +38 0.422222227 0.0294806045 0.625 0.046500463 0 0.727272749 Private Some-college Separated Other-service Not-in-family White Female United-States 0 +55 0.6111111 0.08135017 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +48 0.533333361 0.0929942355 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +58 0.644444466 0.02243476 0.5625 0 0 0.8080808 Self-emp-not-inc HS-grad Widowed Farming-fishing Not-in-family White Male United-States 0 +23 0.25555557 0.05147959 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.186996743 0.625 0 0 0.5050505 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +49 0.544444442 0.08290401 0.625 0 0 0.464646459 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +51 0.566666663 0.03886159 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 +23 0.25555557 0.122462042 0.5625 0 0 0.535353541 Private HS-grad Separated Craft-repair Own-child White Male United-States 0 +40 0.444444448 0.0666698143 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family Black Male United-States 0 +59 0.655555546 0.06624211 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Asian-Pac-Islander Male China 0 +47 0.5222222 0.08427264 0.8125 0 0 0.5050505 Private Bachelors Divorced Craft-repair Not-in-family White Female United-States 0 +37 0.411111116 0.163944349 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +39 0.433333337 0.0397196747 0.75 0.01506015 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Unmarried White Male United-States 0 +43 0.477777779 0.0423363559 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.190727457 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +48 0.533333361 0.07231942 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 +29 0.322222233 0.13548483 0.3125 0 0 0.4848485 Private 9th Never-married Sales Not-in-family White Female United-States 0 +48 0.533333361 0.126291081 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.0416096151 0.8125 0 0 0.3030303 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 +19 0.211111113 0.150634646 0.5625 0.04101041 0 0.4848485 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +28 0.311111122 0.100795783 0.375 0 0 0.3030303 Private 10th Never-married Other-service Own-child Black Female United-States 0 +56 0.622222245 0.114719085 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband Black Male Trinadad&Tobago 0 +45 0.5 0.111764289 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Own-child White Male United-States 0 +60 0.6666667 0.07682335 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +53 0.5888889 0.0396799371 0.875 0 0 0.424242437 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.255213 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +31 0.344444454 0.162917882 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +29 0.322222233 0.151155278 0.6875 0 0 0.444444448 Private Assoc-voc Married-AF-spouse Farming-fishing Husband White Male United-States 1 +31 0.344444454 0.143982142 0.5625 0 0 0.363636374 ? HS-grad Widowed ? Unmarried White Female United-States 0 +39 0.433333337 0.2125439 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male Cuba 0 +31 0.344444454 0.103054143 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.0661485 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.133767992 0.4375 0 0 0.161616161 Private 11th Never-married Handlers-cleaners Own-child White Female United-States 0 +19 0.211111113 0.17534326 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +24 0.266666681 0.147847548 0.8125 0 0 0.323232323 Private Bachelors Never-married Other-service Not-in-family Asian-Pac-Islander Male United-States 0 +62 0.6888889 0.179580465 0.5625 0.06418064 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +34 0.377777785 0.09218128 0.125 0 0 0.4040404 Private 1st-4th Never-married Other-service Other-relative White Female Guatemala 0 +47 0.5222222 0.1452275 0.875 0.1502415 0 0.5555556 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.125996083 0.8125 0 0 0.6262626 Private Bachelors Never-married Prof-specialty Not-in-family White Female Canada 0 +23 0.25555557 0.219519034 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.180592775 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +76 0.844444454 0.096002236 0.5625 0 0 0.0606060624 Private HS-grad Widowed Adm-clerical Not-in-family White Male United-States 0 +40 0.444444448 0.119271509 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +28 0.311111122 0.05186822 0.25 0 0 0.5050505 Private 7th-8th Divorced Other-service Unmarried White Female United-States 0 +41 0.455555558 0.206374332 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 0 +46 0.51111114 0.204699248 0.5625 0.07688077 0 0.969697 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +22 0.244444445 0.177017659 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.0330617875 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +26 0.2888889 0.03625838 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male United-States 0 +31 0.344444454 0.695910633 0.8125 0.0861408561 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 1 +22 0.244444445 0.0546539575 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +41 0.455555558 0.145132542 0.625 0 0 0.434343427 Private Some-college Never-married Transport-moving Not-in-family Black Male United-States 0 +29 0.322222233 0.07642192 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Other-relative Other Male Dominican-Republic 0 +60 0.6666667 0.07377223 0.6875 0.07298073 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +72 0.8 0.146738917 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +41 0.455555558 0.07928915 0.625 0 0 0.656565666 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +19 0.211111113 0.13435936 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +25 0.2777778 0.167609736 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Male United-States 0 +24 0.266666681 0.0787819847 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +59 0.655555546 0.246929869 0.3125 0 0 0.3030303 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 +17 0.188888893 0.1617446 0.4375 0 0 0.3030303 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +59 0.655555546 0.285893828 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +69 0.7666667 0.215719625 0.625 0.0184801836 0 0.01010101 ? Some-college Never-married ? Not-in-family White Male United-States 0 +25 0.2777778 0.080984436 0.625 0.0288502872 0 0.434343427 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.130790964 0.5625 0 0 0.6060606 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +29 0.322222233 0.166398719 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +43 0.477777779 0.121639654 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.128193825 0.625 0 0 0.1010101 Local-gov Some-college Never-married Other-service Own-child White Female United-States 0 +29 0.322222233 0.134336457 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Unmarried Black Male United-States 0 +32 0.355555564 0.1343964 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +17 0.188888893 0.06355876 0.375 0 0 0.0606060624 ? 10th Never-married ? Other-relative White Male United-States 0 +50 0.5555556 0.0196880866 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.0223115031 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.068757765 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Female United-States 0 +32 0.355555564 0.142832413 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +54 0.6 0.112328038 0.875 0 0 0.454545468 State-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 1 +65 0.722222269 0.06418986 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.255786836 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child Other Female United-States 0 +70 0.7777778 0.166620985 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +53 0.5888889 0.1545526 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.09122082 0.8125 0 0.453856736 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.12127123 0.625 0 0 0.3030303 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +20 0.222222224 0.144397035 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +47 0.5222222 0.10058362 0.5625 0 0 0.3838384 State-gov HS-grad Divorced Adm-clerical Unmarried White Male United-States 0 +26 0.2888889 0.140314743 0.5625 0.0394203924 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.0231520738 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 +45 0.5 0.0395250246 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.2714593 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +55 0.6111111 0.0217989441 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.1047272 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.195248216 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Never-married Other-service Unmarried Asian-Pac-Islander Male Vietnam 0 +30 0.333333343 0.03683156 0.9375 0 0 0.5555556 Federal-gov Prof-school Never-married Exec-managerial Not-in-family White Male ? 0 +19 0.211111113 0.0683967546 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Male United-States 0 +48 0.533333361 0.0347402357 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.0270430837 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 1 +29 0.322222233 0.164828032 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +47 0.5222222 0.153816417 0.875 0 0 0.4848485 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.159542128 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +19 0.211111113 0.168551326 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +71 0.788888931 0.06277476 0.5625 0 0 0.161616161 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +29 0.322222233 0.119029038 0.625 0 0 0.25252524 Private Some-college Never-married Sales Unmarried White Female United-States 0 +43 0.477777779 0.118222818 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +23 0.25555557 0.0618587546 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +52 0.5777778 0.0483382232 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +56 0.622222245 0.122057922 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.137748584 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.0600604154 0.8125 0 0 0.8080808 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.09668385 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.20939447 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.1012484 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.14580135 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 +64 0.7111111 0.14335373 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.1133444 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +40 0.444444448 0.126423776 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 1 +19 0.211111113 0.0408572741 0.5625 0 0 0.5252525 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +54 0.6 0.07764775 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 +61 0.677777767 0.06624211 1 0 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Taiwan 1 +18 0.2 0.131589785 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 +62 0.6888889 0.0549455956 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +33 0.366666675 0.0751442239 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +51 0.566666663 0.164727673 0.5625 0 0 0.373737365 Private HS-grad Separated Other-service Not-in-family Black Female United-States 0 +54 0.6 0.155531913 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.190343544 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Protective-serv Other-relative White Male United-States 0 +54 0.6 0.215663046 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female Germany 0 +42 0.466666669 0.1356943 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.17121987 0.875 0 0 0.5050505 Federal-gov Masters Widowed Sales Unmarried White Male El-Salvador 1 +41 0.455555558 0.403870821 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 1 +47 0.5222222 0.147929728 0.75 0 0.323232323 0.4040404 Local-gov Assoc-acdm Separated Exec-managerial Not-in-family White Male United-States 0 +31 0.344444454 0.108864054 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +21 0.233333334 0.1363052 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child Black Male United-States 0 +52 0.5777778 0.1141971 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +20 0.222222224 0.08566348 0.625 0 0 0.151515156 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +18 0.2 0.124116912 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child White Female United-States 0 +58 0.644444466 0.08065643 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Priv-house-serv Other-relative Asian-Pac-Islander Female Philippines 0 +23 0.25555557 0.19849129 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +21 0.233333334 0.0180790126 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +43 0.477777779 0.07714462 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 +53 0.5888889 0.08512533 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 +18 0.2 0.110316195 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +44 0.4888889 0.0661485 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.118211366 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +48 0.533333361 0.107667185 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Other-service Husband White Male United-States 0 +55 0.6111111 0.08144379 0.875 0 0 0.353535354 Self-emp-inc Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.126322061 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +41 0.455555558 0.0183908585 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.145962328 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.147231951 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 +54 0.6 0.188786328 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.135040969 0.8125 0 0 0.4040404 Private Bachelors Separated Sales Not-in-family White Male United-States 0 +56 0.622222245 0.05259631 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Divorced Sales Unmarried White Female United-States 0 +23 0.25555557 0.07994383 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 +34 0.377777785 0.137056187 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.115909226 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Unmarried Black Male United-States 0 +32 0.355555564 0.07635456 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +72 0.8 0.0942200646 0.625 0 0 0.74747473 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +43 0.477777779 0.2031636 0.5 0 0.3624885 0.4040404 Local-gov 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.07427671 0.75 0 0 0.353535354 Private Assoc-acdm Divorced Prof-specialty Unmarried Black Female United-States 0 +53 0.5888889 0.1635739 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Own-child White Male Cuba 0 +18 0.2 0.08957066 0.5 0 0 0.1010101 Private 12th Never-married Other-service Own-child White Male United-States 0 +38 0.422222227 0.171373442 0.375 0.00114001136 0 0.4040404 Private 10th Widowed Transport-moving Unmarried Black Male United-States 0 +41 0.455555558 0.126262128 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Divorced Adm-clerical Own-child Black Female United-States 0 +29 0.322222233 0.178460374 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +70 0.7777778 0.0997268856 0.625 0 0 0.04040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +46 0.51111114 0.135346085 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Widowed Exec-managerial Not-in-family White Female ? 0 +47 0.5222222 0.031822484 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +56 0.622222245 0.384599656 0.625 0 0 0.151515156 Local-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +28 0.311111122 0.280578971 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +55 0.6111111 0.20003368 0.9375 0.1502415 0 0.4040404 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.0309563186 0.8125 0.068490684 0 0.4040404 State-gov Bachelors Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 +47 0.5222222 0.2038863 0.4375 0 0 0.4040404 Private 11th Divorced Adm-clerical Unmarried White Female United-States 0 +42 0.466666669 0.0339165032 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +22 0.244444445 0.134259671 0.625 0 0 0.25252524 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +42 0.466666669 0.229795143 0.1875 0 0 0.444444448 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 +42 0.466666669 0.0473090634 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Unmarried Asian-Pac-Islander Female United-States 0 +46 0.51111114 0.154504776 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +45 0.5 0.2629263 0.625 0.1502415 0 1 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 1 +55 0.6111111 0.0552958325 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 0 +57 0.6333333 0.114777684 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +25 0.2777778 0.07377358 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Own-child White Male United-States 0 +43 0.477777779 0.09610125 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Transport-moving Husband White Male Dominican-Republic 0 +34 0.377777785 0.08597735 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Divorced Farming-fishing Not-in-family White Male United-States 0 +27 0.3 0.159272045 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Other-relative White Female United-States 0 +25 0.2777778 0.118573725 0.5625 0.0217602178 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +37 0.411111116 0.0750984251 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +48 0.533333361 0.2863862 0.625 0 0 0.454545468 Private Some-college Divorced Sales Unmarried White Male United-States 0 +38 0.422222227 0.154245466 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +17 0.188888893 0.156740233 0.375 0.005940059 0 0.3030303 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 +70 0.7777778 0.0954681262 0.6875 0.09386094 0 0.5050505 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +37 0.411111116 0.158150613 0.5625 0 0 0.373737365 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +45 0.5 0.497615367 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +56 0.622222245 0.137950644 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +64 0.7111111 0.230681524 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.152428269 0.625 0 0 0.3838384 Local-gov Some-college Divorced Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.09635719 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +42 0.466666669 0.08429621 0.5625 0 0 0.909090936 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +23 0.25555557 0.222215861 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +26 0.2888889 0.140764669 0.625 0 0 0.121212125 ? Some-college Never-married ? Own-child White Male United-States 0 +56 0.622222245 0.143371239 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +41 0.455555558 0.144299373 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.12876296 0.1875 0 0.500229537 0.5050505 Self-emp-not-inc 5th-6th Married-civ-spouse Sales Husband White Male Mexico 0 +21 0.233333334 0.07994383 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +29 0.322222233 0.170803636 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +32 0.355555564 0.138782457 0.625 0 0 0.5050505 State-gov Some-college Married-spouse-absent Farming-fishing Own-child White Male United-States 0 +72 0.8 0.334935218 0.3125 0 0 0.2020202 Private 9th Widowed Other-service Unmarried Black Female United-States 0 +69 0.7666667 0.162026808 0.9375 1 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.09495826 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Other-relative White Male United-States 0 +25 0.2777778 0.129265413 0.8125 0 0 0.25252524 Local-gov Bachelors Never-married Craft-repair Own-child White Male United-States 0 +56 0.622222245 0.137434036 0.625 0 0.4242424 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.22337839 0.875 0.0861408561 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 +58 0.644444466 0.09574831 0.8125 0 0 0.353535354 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +24 0.266666681 0.167741075 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 +41 0.455555558 0.143475637 0.6875 0 0 0.3838384 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 +40 0.444444448 0.134436816 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.125406057 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Husband White Male ? 0 +25 0.2777778 0.0188643541 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.0555585138 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Own-child Asian-Pac-Islander Female Philippines 1 +36 0.4 0.0788527057 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +41 0.455555558 0.2194281 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.025288526 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +22 0.244444445 0.13755326 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 +36 0.4 0.08978147 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.0200053211 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +29 0.322222233 0.207322 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.117562078 0.5625 0 0 0.464646459 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.157251447 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +34 0.377777785 0.124029353 0.5625 0 0 0.2020202 Private HS-grad Separated Sales Unmarried Black Female United-States 0 +27 0.3 0.13348645 0.5625 0.0258002579 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +32 0.355555564 0.30111438 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 1 +33 0.366666675 0.134872586 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 +38 0.422222227 0.112200744 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +21 0.233333334 0.226017967 0.625 0 0 0.3030303 Private Some-college Never-married Machine-op-inspct Own-child White Male ? 0 +39 0.433333337 0.03608057 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.11252404 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.07635456 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +40 0.444444448 0.147683218 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.134735182 0.625 0.1502415 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.138731271 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +63 0.7 0.157662973 0.5625 0 0.506198347 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +56 0.622222245 0.04399864 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +30 0.333333343 0.1311641 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 +39 0.433333337 0.0667237 0.625 0 0 0.3939394 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +25 0.2777778 0.143323421 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 1 +33 0.366666675 0.07606966 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +41 0.455555558 0.126167834 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +50 0.5555556 0.191065565 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.116980813 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +27 0.3 0.113470353 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +27 0.3 0.1255832 0.8125 0.135501355 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 1 +58 0.644444466 0.0955119058 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Italy 0 +25 0.2777778 0.165438935 0.625 0 0 0.151515156 Private Some-college Never-married Tech-support Own-child White Male Mexico 0 +31 0.344444454 0.178395033 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Amer-Indian-Eskimo Female United-States 0 +39 0.433333337 0.177032471 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.0252157841 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.115039691 0.6875 0 0 0.121212125 Private Assoc-voc Never-married Other-service Own-child White Female United-States 0 +44 0.4888889 0.102478273 0.75 0 0 0.4040404 Private Assoc-acdm Separated Exec-managerial Not-in-family White Male United-States 0 +41 0.455555558 0.142703772 0.6875 0 0.373737365 0.05050505 ? Assoc-voc Married-civ-spouse ? Wife White Female ? 0 +44 0.4888889 0.107482634 0.5 0 0 0.4040404 Private 12th Divorced Transport-moving Not-in-family White Female United-States 0 +61 0.677777767 0.3214167 0.25 0 0 0.545454562 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +32 0.355555564 0.0478108451 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.162994 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.168074474 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.0911554843 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Philippines 1 +32 0.355555564 0.0300901532 1 0 0 0.656565666 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.167031169 0.25 0 0 0.4040404 State-gov 7th-8th Never-married Other-service Not-in-family Black Female United-States 0 +26 0.2888889 0.149272755 0.5625 0 0.3624885 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +43 0.477777779 0.03238825 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.07681324 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Other-service Not-in-family White Female United-States 0 +60 0.6666667 0.0466429368 0.875 0 0 0.3838384 State-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 1 +67 0.7444445 0.129769892 0.5625 0 0 0.2020202 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +19 0.211111113 0.180771261 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 +55 0.6111111 0.11517036 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +48 0.533333361 0.2906389 0.375 0 0 0.656565666 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.0251443889 0.5625 0 0 0.2020202 State-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.0241563153 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +43 0.477777779 0.123856932 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +31 0.344444454 0.101238295 1 0 0 0.909090936 Private Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 0 +65 0.722222269 0.06285289 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +32 0.355555564 0.115722656 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +36 0.4 0.123751856 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.238122061 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +33 0.366666675 0.10261365 0.625 0.03908039 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +72 0.8 0.182764933 0.375 0 0 0.121212125 ? 10th Divorced ? Not-in-family White Male United-States 0 +34 0.377777785 0.232844234 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.150704011 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +75 0.8333334 0.110843569 0.4375 0 0 0.5050505 Self-emp-inc 11th Never-married Exec-managerial Not-in-family White Male United-States 0 +39 0.433333337 0.189507678 0.375 0 0 0.151515156 ? 10th Widowed ? Unmarried White Female United-States 0 +51 0.566666663 0.07459193 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.0232086517 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +31 0.344444454 0.171275109 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +40 0.444444448 0.181953326 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 +48 0.533333361 0.131669924 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +36 0.4 0.172057077 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Protective-serv Not-in-family Black Male United-States 0 +18 0.2 0.08494954 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +33 0.366666675 0.416372955 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +34 0.377777785 0.109860212 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 +51 0.566666663 0.09793798 0.625 0.03103031 0 0.4848485 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.158535868 0.75 0 0 0.4040404 State-gov Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 +20 0.222222224 0.03735759 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +67 0.7444445 0.122057922 0.625 0 0 0.2020202 Local-gov Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 +42 0.466666669 0.0179645121 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +59 0.655555546 0.06624953 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.148098782 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Not-in-family Black Male United-States 0 +19 0.211111113 0.253709 0.625 0.0203602035 0 0.3030303 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 +47 0.5222222 0.0228092447 0.625 0 0 0.4848485 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +68 0.75555557 0.113688581 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Other-service Husband White Male United-States 0 +30 0.333333343 0.0634772554 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +34 0.377777785 0.0232854337 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +49 0.544444442 0.234895825 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.0440370329 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +60 0.6666667 0.07860619 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +51 0.566666663 0.119925506 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male ? 1 +24 0.266666681 0.0942955 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +18 0.2 0.112405494 0.625 0 0.3677686 0.353535354 Private Some-college Never-married Handlers-cleaners Own-child Black Female United-States 0 +24 0.266666681 0.07933495 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +21 0.233333334 0.160918832 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 +48 0.533333361 0.163617015 0.5625 0 0.4242424 0.4040404 Local-gov HS-grad Married-civ-spouse Tech-support Wife White Female United-States 1 +52 0.5777778 0.222804531 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Other-service Wife White Female United-States 0 +48 0.533333361 0.141078532 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +40 0.444444448 0.0507259034 0.8125 0.07688077 0 0.6666667 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.228395551 0.4375 0.03418034 0 0.4848485 ? 11th Divorced ? Not-in-family White Female United-States 0 +20 0.222222224 0.124455027 0.625 0 0 0.2020202 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +31 0.344444454 0.09362129 0.5625 0 0 0.25252524 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +30 0.333333343 0.243645713 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.175645664 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male ? 0 +51 0.566666663 0.137020484 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +29 0.322222233 0.06774343 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 +56 0.622222245 0.2398234 0.875 0 0 0.161616161 Self-emp-not-inc Masters Never-married Sales Not-in-family White Male United-States 0 +46 0.51111114 0.0587658845 0.8125 0 0 0.4040404 Private Bachelors Separated Tech-support Unmarried White Female United-States 0 +41 0.455555558 0.178259656 0.625 0 0.8953168 0.4040404 Private Some-college Separated Prof-specialty Own-child White Female United-States 0 +29 0.322222233 0.172301576 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Other-relative White Female El-Salvador 0 +48 0.533333361 0.164093882 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male South 0 +34 0.377777785 0.366583258 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Divorced Sales Not-in-family White Female United-States 0 +42 0.466666669 0.06604747 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.06445119 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Unmarried White Female Columbia 0 +47 0.5222222 0.0982471257 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Unmarried Black Female United-States 0 +23 0.25555557 0.0438053347 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +43 0.477777779 0.1533867 0.6875 0 0 0.222222224 Local-gov Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.119101778 0.625 0 0 0.353535354 Local-gov Some-college Never-married Other-service Own-child Black Female United-States 0 +22 0.244444445 0.142572433 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +40 0.444444448 0.105906561 0.8125 0 0 0.7070707 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +41 0.455555558 0.0979595259 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male Yugoslavia 0 +71 0.788888931 0.04487356 0.8125 0 0.549127638 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.0515166335 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +31 0.344444454 0.375733227 0.8125 0 0 0.474747479 State-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +69 0.7666667 0.176703125 0.625 0 0 0.323232323 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +58 0.644444466 0.079647474 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +36 0.4 0.09875699 0.4375 0 0 0.121212125 Private 11th Widowed Other-service Unmarried Black Female United-States 0 +31 0.344444454 0.11733038 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.0449213833 0.625 0.005940059 0 0.353535354 ? Some-college Never-married ? Own-child Other Female United-States 0 +41 0.455555558 0.0815852359 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.259881258 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.056199044 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +28 0.311111122 0.07688935 0.8125 0 0 0.151515156 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +27 0.3 0.257148057 0.5 0 0 0.5555556 Private 12th Married-civ-spouse Farming-fishing Own-child White Male United-States 0 +17 0.188888893 0.0552574433 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male Canada 0 +35 0.3888889 0.07787271 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 1 +45 0.5 0.07146874 0.625 0 0 1 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +44 0.4888889 0.180184618 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 +27 0.3 0.06108419 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family Asian-Pac-Islander Female Philippines 0 +51 0.566666663 0.03845949 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.15956907 0.5625 0 0 0.454545468 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +64 0.7111111 0.261752337 0.375 0 0 0.1010101 Self-emp-not-inc 10th Married-civ-spouse Prof-specialty Husband White Male United-States 1 +54 0.6 0.175931916 0.25 0 0 0.454545468 Self-emp-not-inc 7th-8th Divorced Transport-moving Not-in-family White Male Cuba 0 +43 0.477777779 0.165343955 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Other Male Mexico 0 +32 0.355555564 0.176569089 0.5625 0 0 0.353535354 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +36 0.4 0.1518928 0.75 0.105201051 0 0.434343427 Private Assoc-acdm Never-married Sales Not-in-family Black Male United-States 1 +26 0.2888889 0.04629135 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Sales Other-relative Asian-Pac-Islander Male United-States 1 +37 0.411111116 0.0855079 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.0573002733 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +26 0.2888889 0.2581698 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.08630873 0.8125 0 0.4331956 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.124631494 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.06693114 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +66 0.733333349 0.106379382 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Transport-moving Not-in-family Black Female United-States 0 +43 0.477777779 0.16294685 0.5625 0 0 0.323232323 Private HS-grad Separated Adm-clerical Not-in-family Black Female United-States 0 +37 0.411111116 0.234887749 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.0644262657 0.375 0 0 0.353535354 Private 10th Divorced Exec-managerial Unmarried White Female United-States 0 +25 0.2777778 0.247393265 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +29 0.322222233 0.182137877 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +63 0.7 0.149249852 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +50 0.5555556 0.105711915 0.75 0.03103031 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +42 0.466666669 0.02642882 0.875 0 0 0.7070707 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +32 0.355555564 0.04899559 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +42 0.466666669 0.247383833 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +41 0.455555558 0.275137484 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.243478 0.8125 0.0332503319 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +65 0.722222269 0.106016345 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.155763611 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +32 0.355555564 0.164441422 0.5625 0 0 0.1010101 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +24 0.266666681 0.1488134 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.21149455 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +67 0.7444445 0.135287479 0.375 0 0 0.353535354 ? 10th Never-married ? Not-in-family Black Female United-States 0 +28 0.311111122 0.02247854 0.4375 0 0 0.353535354 Private 11th Married-spouse-absent Other-service Unmarried White Female United-States 0 +32 0.355555564 0.232698753 0.625 0 0 0.5555556 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +77 0.8555556 0.0563081577 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.109315991 0.5625 0 0 0.2020202 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +26 0.2888889 0.0760063455 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +20 0.222222224 0.0992412642 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +57 0.6333333 0.123699322 0.625 0 0 0.353535354 State-gov Some-college Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +40 0.444444448 0.08807137 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +50 0.5555556 0.11042463 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +19 0.211111113 0.2133737 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Handlers-cleaners Own-child White Male Mexico 0 +54 0.6 0.223777115 0.5 0 0 0.4040404 Federal-gov 12th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +51 0.566666663 0.131907687 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +51 0.566666663 0.26082623 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +38 0.422222227 0.126828566 0.625 0.07688077 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +68 0.75555557 0.02758528 0.8125 0 0 0.25252524 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +17 0.188888893 0.120531015 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 +32 0.355555564 0.2687322 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +29 0.322222233 0.360999674 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.200027615 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Male United-States 0 +40 0.444444448 0.156253934 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +27 0.3 0.199230835 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.135763675 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +58 0.644444466 0.13037473 0.4375 0 0 0.4040404 Private 11th Widowed Other-service Not-in-family White Female United-States 0 +61 0.677777767 0.0654190555 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.1369922 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Craft-repair Wife Black Female United-States 1 +49 0.544444442 0.0931969658 0.875 0 0 0.4040404 Private Masters Married-spouse-absent Protective-serv Not-in-family Asian-Pac-Islander Male India 0 +41 0.455555558 0.08101071 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 0 +43 0.477777779 0.0619308241 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Female United-States 0 +46 0.51111114 0.153816417 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Unmarried White Male United-States 1 +28 0.311111122 0.0890352 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +39 0.433333337 0.185008466 0.625 0.07688077 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.132219538 0.625 0.07688077 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +57 0.6333333 0.131901622 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Adm-clerical Not-in-family White Male United-States 0 +47 0.5222222 0.124872617 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +79 0.8777778 0.06983475 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +40 0.444444448 0.09467133 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Priv-house-serv Wife White Female United-States 0 +35 0.3888889 0.07421542 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Vietnam 0 +35 0.3888889 0.4501359 0.8125 0 0.399449021 0.8080808 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.0756769851 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 +26 0.2888889 0.102249272 0.375 0 0 0.4040404 Private 10th Never-married Farming-fishing Not-in-family Black Male United-States 0 +49 0.544444442 0.03241048 0.5625 0.01506015 0 0.4040404 Private HS-grad Never-married Transport-moving Unmarried Black Female United-States 0 +48 0.533333361 0.0975574255 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.138639659 0.625 0 0 0.454545468 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +22 0.244444445 0.07662129 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Own-child White Female United-States 0 +50 0.5555556 0.09318888 0.375 0 0 0.474747479 Private 10th Separated Adm-clerical Not-in-family Black Female Jamaica 0 +47 0.5222222 0.145925954 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +36 0.4 0.187630549 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +44 0.4888889 0.117446229 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +73 0.811111152 0.148190379 0.3125 0 0 0.09090909 Private 9th Widowed Other-service Unmarried White Female United-States 0 +24 0.266666681 0.210108414 0.5625 0 0 0.454545468 ? HS-grad Never-married ? Not-in-family Asian-Pac-Islander Female ? 0 +34 0.377777785 0.2046649 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.10386575 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Hong 0 +28 0.311111122 0.08844181 0.5 0 0 0.2020202 ? 12th Married-civ-spouse ? Wife White Female Germany 0 +46 0.51111114 0.136431143 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +20 0.222222224 0.241652727 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 +29 0.322222233 0.284921259 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +24 0.266666681 0.139200047 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.165224746 0.625 0 0 0.353535354 State-gov Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +18 0.2 0.0215416532 0.5 0 0 0.2020202 Private 12th Never-married Adm-clerical Own-child White Female United-States 0 +41 0.455555558 0.0841621757 0.8125 0 0 0.909090936 Private Bachelors Divorced Exec-managerial Unmarried Black Female United-States 1 +59 0.655555546 0.0797181949 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.330989 0.1875 0 0 0.5050505 Private 5th-6th Never-married Farming-fishing Unmarried White Male United-States 0 +50 0.5555556 0.10209436 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.167703345 0.125 0 0 0.24242425 Private 1st-4th Never-married Machine-op-inspct Not-in-family White Male Mexico 0 +42 0.466666669 0.106031165 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +36 0.4 0.149288923 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Japan 0 +62 0.6888889 0.05930808 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +71 0.788888931 0.145892963 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.459988356 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +44 0.4888889 0.153649375 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Unmarried Black Female United-States 0 +19 0.211111113 0.14628765 0.375 0 0 0.3030303 ? 10th Never-married ? Own-child White Male United-States 0 +49 0.544444442 0.115538105 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +60 0.6666667 0.14199926 0.8125 0.07688077 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.276385546 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male Poland 0 +26 0.2888889 0.110289253 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +18 0.2 0.07334252 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +43 0.477777779 0.121300869 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +65 0.722222269 0.10365022 0.5 0.0200902 0 0.444444448 Local-gov 12th Widowed Exec-managerial Not-in-family White Male United-States 0 +23 0.25555557 0.0791268349 0.375 0 0 0.444444448 Private 10th Never-married Craft-repair Own-child White Male United-States 0 +21 0.233333334 0.110010408 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 +20 0.222222224 0.20657976 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +19 0.211111113 0.10140264 0.625 0 0 0.181818187 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Female Philippines 0 +77 0.8555556 0.08349066 0.5625 0 0 0.323232323 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.0168120936 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +37 0.411111116 0.2203266 0.625 0 0 0.3030303 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.0227641184 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.0551820062 1 0 0.5544077 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.201042637 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +30 0.333333343 0.0684964359 0.8125 0 0 0.2020202 ? Bachelors Married-civ-spouse ? Wife White Female United-States 0 +31 0.344444454 0.09703207 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +59 0.655555546 0.131901622 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.124417312 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Other-service Not-in-family White Female United-States 1 +56 0.622222245 0.178544566 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.15889284 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +37 0.411111116 0.0287228785 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +58 0.644444466 0.188507482 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.07064838 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.09231666 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Unmarried White Male United-States 0 +38 0.422222227 0.0397196747 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.08531998 0.875 0 0.453856736 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.192923844 0.625 0.005940059 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +46 0.51111114 0.128907084 0.5625 0 0 0.282828271 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +42 0.466666669 0.123419136 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +29 0.322222233 0.0616600625 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +42 0.466666669 0.0355498232 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.14208816 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 +47 0.5222222 0.246187627 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Unmarried White Female United-States 0 +37 0.411111116 0.07561839 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.181487232 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +46 0.51111114 0.110714927 0.8125 0 0 0.353535354 Private Bachelors Divorced Sales Unmarried Black Female United-States 1 +28 0.311111122 0.0738335252 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.07062548 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +39 0.433333337 0.06686177 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +44 0.4888889 0.130345091 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +70 0.7777778 0.10038358 0.5625 0.0296402965 0 0.121212125 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +60 0.6666667 0.211453453 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +35 0.3888889 0.109353714 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 +59 0.655555546 0.135178372 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Craft-repair Husband Black Male United-States 1 +21 0.233333334 0.07845936 0.625 0 0 0.6060606 Private Some-college Never-married Sales Own-child White Female United-States 0 +22 0.244444445 0.07968587 0.75 0 0 0.161616161 Private Assoc-acdm Never-married Prof-specialty Own-child White Female United-States 0 +31 0.344444454 0.237397328 0.625 0.1502415 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.07235983 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.199728563 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.13194339 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +31 0.344444454 0.145674065 0.75 0 0 0.353535354 Self-emp-not-inc Assoc-acdm Married-civ-spouse Other-service Wife White Female United-States 1 +62 0.6888889 0.232894748 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Not-in-family White Male United-States 0 +43 0.477777779 0.145944819 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 +28 0.311111122 0.142078727 0.8125 0 0 0.6060606 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 +43 0.477777779 0.124146551 0.375 0 0.4331956 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +55 0.6111111 0.217343524 0.875 0.03103031 0 0.5555556 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.129798174 0.5625 0 0 0.25252524 Private HS-grad Separated Other-service Unmarried White Female United-States 0 +23 0.25555557 0.120072342 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +55 0.6111111 0.216428861 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +44 0.4888889 0.08101071 0.8125 1 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.198038667 0.4375 0 0 0.323232323 Private 11th Never-married Sales Own-child Other Female Nicaragua 0 +23 0.25555557 0.07598749 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +41 0.455555558 0.102805607 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +63 0.7 0.203145415 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +51 0.566666663 0.0907978341 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Unmarried White Female United-States 0 +49 0.544444442 0.04325169 0.5625 0 0 0.909090936 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +29 0.322222233 0.14432767 0.875 0 0 0.2020202 State-gov Masters Never-married Prof-specialty Unmarried Asian-Pac-Islander Female Taiwan 0 +25 0.2777778 0.316272944 0.625 0.0861408561 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 1 +44 0.4888889 0.190423012 0.9375 1 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.15588215 0.4375 0 0 0.3030303 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +42 0.466666669 0.08101071 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.245627925 0.4375 0 0 0.353535354 Private 11th Never-married Tech-support Own-child White Female United-States 0 +26 0.2888889 0.0126806339 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +24 0.266666681 0.113914214 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +30 0.333333343 0.136088312 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.237922013 0.8125 0.2782828 0 0.5050505 ? Bachelors Widowed ? Unmarried White Female United-States 1 +19 0.211111113 0.386791319 0.5625 0 0 0.282828271 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +65 0.722222269 0.0197183955 0.25 0 0 0.24242425 State-gov 7th-8th Widowed Other-service Other-relative White Female United-States 0 +52 0.5777778 0.070385024 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +17 0.188888893 0.265491128 0.375 0 0 0.2020202 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 +27 0.3 0.05767139 0.5625 0 0 0.222222224 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +53 0.5888889 0.229488686 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.100586988 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +37 0.411111116 0.0496495962 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.09637134 0.6875 0 0 0.181818187 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 +40 0.444444448 0.195769534 0.75 0.0861408561 0 0.5050505 Local-gov Assoc-acdm Divorced Exec-managerial Not-in-family White Male United-States 1 +49 0.544444442 0.06650345 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +86 0.955555558 0.1009709 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family White Female United-States 0 +49 0.544444442 0.208144382 0.6875 0.1502415 0 0.6060606 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +43 0.477777779 0.06474619 0.4375 0 0 0.6060606 Self-emp-not-inc 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +47 0.5222222 0.1455481 0.625 0 0 0.353535354 Private Some-college Married-spouse-absent Exec-managerial Unmarried White Female Puerto-Rico 0 +32 0.355555564 0.115235686 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +30 0.333333343 0.0534133054 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +25 0.2777778 0.12283922 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Own-child White Male United-States 0 +42 0.466666669 0.02442977 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +60 0.6666667 0.07960976 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.181619927 0.625 0.04386044 0 0.3838384 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.130541086 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +28 0.311111122 0.0956129357 0.75 0 0.4331956 0.7070707 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +26 0.2888889 0.1499537 0.375 0 0 0.5555556 Private 10th Never-married Craft-repair Not-in-family White Male Puerto-Rico 0 +27 0.3 0.0796319842 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +59 0.655555546 0.117221944 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Unmarried White Male United-States 0 +64 0.7111111 0.07122493 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +90 1 0.05565281 0.5625 0.0296402965 0 0.121212125 Self-emp-not-inc HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +51 0.566666663 0.13814193 0.625 0 0 0.454545468 Private Some-college Divorced Sales Not-in-family White Female United-States 1 +36 0.4 0.0726851448 0.5625 0 0.459595948 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +39 0.433333337 0.0879770741 0.25 0 0 0.4040404 Private 7th-8th Married-spouse-absent Machine-op-inspct Unmarried Other Female Dominican-Republic 0 +30 0.333333343 0.243696228 0.5625 0 0 0.25252524 ? HS-grad Never-married ? Own-child White Male United-States 0 +47 0.5222222 0.15871571 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.0358838961 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.307441562 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 +23 0.25555557 0.1974069 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Male United-States 0 +62 0.6888889 0.142071992 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +48 0.533333361 0.134547263 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +62 0.6888889 0.150499254 0.5 0 0 0.4040404 ? 12th Divorced ? Not-in-family White Male Canada 0 +35 0.3888889 0.15729253 0.8125 0 0 0.656565666 Self-emp-not-inc Bachelors Separated Craft-repair Not-in-family White Male United-States 0 +27 0.3 0.06442155 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Male United-States 0 +49 0.544444442 0.134547263 0.625 0 0 0.353535354 Private Some-college Divorced Machine-op-inspct Not-in-family White Female United-States 0 +18 0.2 0.0502045862 0.375 0 0 0.2020202 Private 10th Never-married Sales Not-in-family White Male United-States 0 +19 0.211111113 0.05698775 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 +63 0.7 0.0652857 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.0778619349 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 +24 0.266666681 0.159857348 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +61 0.677777767 0.09685426 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 +50 0.5555556 0.110406443 0.5625 0 0 0.4848485 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.04598422 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +21 0.233333334 0.0762191862 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +38 0.422222227 0.322507858 0.9375 1 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.232844234 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Other-relative White Male United-States 0 +22 0.244444445 0.259362638 0.5625 0.02907029 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +33 0.366666675 0.129511252 0.625 0 0 0.5252525 Private Some-college Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 +39 0.433333337 0.159217492 0.5625 0 0 0.3838384 Local-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +42 0.466666669 0.07185198 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.20761162 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +42 0.466666669 0.0310458988 0.8125 0 0 0.333333343 Local-gov Bachelors Divorced Transport-moving Not-in-family White Male United-States 0 +29 0.322222233 0.13129881 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.230108336 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +23 0.25555557 0.1417615 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.0513994358 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 +34 0.377777785 0.0780343562 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.03717304 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 +67 0.7444445 0.245747134 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Widowed Other-service Not-in-family White Female United-States 0 +49 0.544444442 0.225490585 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +34 0.377777785 0.138568267 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +60 0.6666667 0.08093392 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +26 0.2888889 0.224742964 0.8125 0.0246302467 0 0.353535354 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +25 0.2777778 0.140493229 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +40 0.444444448 0.229812667 0.625 0.0183101818 0 0.3030303 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +56 0.622222245 0.0777407 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +35 0.3888889 0.07497718 0.75 0 0.4331956 0.454545468 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.550109267 0.5625 0 0.4708448 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.11304266 0.8125 0.0332503319 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +28 0.311111122 0.06214164 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +31 0.344444454 0.0619409271 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +45 0.5 0.07252754 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +52 0.5777778 0.09118849 0.5625 0.0501305 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.40266788 0.875 0 0 0.5050505 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Female Columbia 0 +19 0.211111113 0.262639374 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +23 0.25555557 0.2978868 0.5 0 0 0.4040404 Private 12th Never-married Adm-clerical Unmarried White Male United-States 0 +23 0.25555557 0.401063532 0.25 0 0 0.4040404 Private 7th-8th Never-married Craft-repair Not-in-family White Male Mexico 0 +52 0.5777778 0.191505387 0.6875 0.1502415 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.08614102 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.132618263 0.8125 0 0 0.5050505 Private Bachelors Never-married Handlers-cleaners Not-in-family Asian-Pac-Islander Female Haiti 0 +58 0.644444466 0.143148974 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +61 0.677777767 0.0479617156 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.160262823 0.8125 1 0 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.128482759 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.0675642639 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.232116148 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +27 0.3 0.130681857 0.3125 0 0 0.5050505 ? 9th Separated ? Unmarried White Female United-States 0 +19 0.211111113 0.05893225 0.4375 0 0 0.1010101 Private 11th Never-married Transport-moving Other-relative White Male United-States 0 +22 0.244444445 0.159565032 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +59 0.655555546 0.114257716 0.75 0 0 0.4040404 Private Assoc-acdm Widowed Exec-managerial Unmarried White Female United-States 0 +37 0.411111116 0.07126197 0.5625 0.03103031 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.100698121 0.5 0 0 0.434343427 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.1982798 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +20 0.222222224 0.108915918 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 +28 0.311111122 0.190198734 0.5625 0 0 0.6060606 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +28 0.311111122 0.04373933 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 +49 0.544444442 0.131828889 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.025547836 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +19 0.211111113 0.114985809 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Male United-States 0 +43 0.477777779 0.103022486 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.21039331 0.5625 0.1502415 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +41 0.455555558 0.0266591683 0.625 0 0 0.24242425 Private Some-college Divorced Adm-clerical Not-in-family Black Female El-Salvador 0 +50 0.5555556 0.139328688 0.875 0 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.146112531 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Male Portugal 0 +20 0.222222224 0.09635719 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +45 0.5 0.1632587 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.111153394 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +37 0.411111116 0.134202421 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +46 0.51111114 0.237765759 1 0 0.43663913 0.5050505 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +66 0.733333349 0.117525704 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +35 0.3888889 0.224492416 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Own-child White Female United-States 0 +38 0.422222227 0.13682045 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +25 0.2777778 0.148325771 0.4375 0 0 0.454545468 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +55 0.6111111 0.206000522 0.9375 0.1502415 0 0.4040404 Federal-gov Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.184145674 0.25 0 0.43663913 0.4040404 Local-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +56 0.622222245 0.13561213 0.625 0 0 0.3838384 Private Some-college Widowed Craft-repair Unmarried White Female United-States 0 +47 0.5222222 0.147285834 0.875 0 0 0.454545468 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +55 0.6111111 0.0955119058 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.149816975 0.75 0 0 0.4040404 State-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 +47 0.5222222 0.179739416 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.0229762811 0.5625 0.068490684 0 0.434343427 Private HS-grad Never-married Exec-managerial Not-in-family Amer-Indian-Eskimo Male United-States 0 +41 0.455555558 0.107461751 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.131506264 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Other Female United-States 0 +52 0.5777778 0.07369343 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +62 0.6888889 0.13157025 1 0.1502015 0 0.5050505 Private Doctorate Divorced Prof-specialty Unmarried White Male United-States 1 +46 0.51111114 0.124799877 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +21 0.233333334 0.09430291 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 +35 0.3888889 0.0770294443 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +29 0.322222233 0.114252329 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Own-child White Female United-States 0 +21 0.233333334 0.1103721 0.375 0.03908039 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband White Male United-States 0 +35 0.3888889 0.210299015 0.5625 0 0 0.5050505 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 +46 0.51111114 0.154735789 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male India 1 +70 0.7777778 0.206480756 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +35 0.3888889 0.108868092 1 0 0.43663913 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 +34 0.377777785 0.0714040846 0.625 0 0 0.6060606 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.0170168485 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Machine-op-inspct Not-in-family White Male United-States 0 +29 0.322222233 0.04840019 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +41 0.455555558 0.06338835 0.875 0 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.1400972 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.07647984 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +47 0.5222222 0.0559343435 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +42 0.466666669 0.18689774 0.9375 0.1502415 0 0.656565666 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.138633609 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female El-Salvador 0 +46 0.51111114 0.1842622 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 +23 0.25555557 0.165114954 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Black Male United-States 0 +49 0.544444442 0.1850334 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +58 0.644444466 0.109817781 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +41 0.455555558 0.0322636478 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +50 0.5555556 0.0867499 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +77 0.8555556 0.103862382 0.5625 0 0 0.1010101 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.1190021 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +29 0.322222233 0.07054398 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.235292539 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male India 0 +39 0.433333337 0.146998227 0.625 0 0 0.373737365 State-gov Some-college Separated Prof-specialty Unmarried Black Female United-States 0 +32 0.355555564 0.1896269 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +36 0.4 0.0760063455 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 0 +24 0.266666681 0.08527822 0.8125 0 0 0.2020202 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +50 0.5555556 0.0979447141 0.875 0.07688077 0 0.454545468 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.0232854337 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +26 0.2888889 0.0700778961 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +49 0.544444442 0.0388393663 0.8125 0 0 0.4040404 ? Bachelors Divorced ? Own-child White Female United-States 0 +38 0.422222227 0.241799548 0.6875 0 0 0.424242437 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +47 0.5222222 0.07090499 0.8125 0.06497065 0 0.4040404 Private Bachelors Widowed Craft-repair Unmarried Black Female United-States 0 +31 0.344444454 0.1354626 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.107789092 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.113077007 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.0215928424 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +59 0.655555546 0.135012016 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 +56 0.622222245 0.271482885 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.0250622183 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +32 0.355555564 0.134313554 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +29 0.322222233 0.278322637 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +29 0.322222233 0.127079114 0.625 0 0 0.4040404 ? Some-college Divorced ? Own-child Black Male United-States 0 +42 0.466666669 0.152826324 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +37 0.411111116 0.131466523 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 +36 0.4 0.07853951 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +59 0.655555546 0.06676815 0.875 0 0 0.4040404 Private Masters Widowed Exec-managerial Not-in-family White Female United-States 1 +32 0.355555564 0.372737348 0.8125 1 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +52 0.5777778 0.125356212 0.5625 0 0 0.565656543 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +29 0.322222233 0.0451625064 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Not-in-family Asian-Pac-Islander Male Thailand 0 +39 0.433333337 0.234363064 0.9375 0.14084141 0 0.353535354 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 +39 0.433333337 0.2191506 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +69 0.7666667 0.08783765 0.8125 0.0234602336 0 0.151515156 Private Bachelors Widowed Exec-managerial Not-in-family White Female United-States 0 +43 0.477777779 0.0754015148 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +39 0.433333337 0.187617749 0.6875 0 0.373737365 0.4848485 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.131275237 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 +60 0.6666667 0.131644338 0.6875 0 0 0.6060606 Local-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.1903065 0.5625 0.031370312 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +75 0.8333334 0.212917045 0.625 0 0 0.08080808 Private Some-college Widowed Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.170363143 0.6875 0.0545505434 0 0.4040404 State-gov Assoc-voc Never-married Prof-specialty Unmarried Black Female United-States 0 +24 0.266666681 0.341030031 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Male ? 0 +20 0.222222224 0.212865859 0.4375 0.005940059 0 0.2020202 Private 11th Never-married Other-service Own-child Black Male United-States 0 +58 0.644444466 0.215351209 0.5625 0 0 0.7070707 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +21 0.233333334 0.0668139458 0.875 0 0 0.151515156 State-gov Masters Never-married Transport-moving Own-child White Male United-States 0 +28 0.311111122 0.137805149 0.5625 0 0 0.4040404 Private HS-grad Separated Protective-serv Other-relative White Male United-States 0 +40 0.444444448 0.116728239 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +45 0.5 0.02320057 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +40 0.444444448 0.159825012 0.9375 0.1502415 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 +41 0.455555558 0.118300945 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Female United-States 0 +58 0.644444466 0.137222543 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +44 0.4888889 0.115571111 0.6875 0.07688077 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.1333376 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.278369784 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Sales Not-in-family White Male Mexico 0 +45 0.5 0.162214726 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.102504537 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Not-in-family White Male United-States 0 +39 0.433333337 0.0578391 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +45 0.5 0.119090326 1 0.1502415 0 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.08980639 0.875 0.1502415 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.244239092 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +67 0.7444445 0.025035277 0.25 0 0 0.0303030312 ? 7th-8th Divorced ? Not-in-family White Male United-States 0 +28 0.311111122 0.0208202973 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +23 0.25555557 0.02387545 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Unmarried White Female United-States 0 +33 0.366666675 0.116688505 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +37 0.411111116 0.03342482 0.6875 0 0 0.434343427 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +19 0.211111113 0.0691874847 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +90 1 0.112037748 0.125 0 0 0.4040404 ? 1st-4th Widowed ? Not-in-family Black Female United-States 0 +35 0.3888889 0.113370672 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +62 0.6888889 0.08831182 0.25 0 0 0.3838384 Private 7th-8th Divorced Tech-support Unmarried White Female Columbia 0 +20 0.222222224 0.1417615 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child White Female United-States 0 +25 0.2777778 0.07418174 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +21 0.233333334 0.07237263 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +32 0.355555564 0.1081656 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 +32 0.355555564 0.125805467 0.8125 0.0501305 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +70 0.7777778 0.225409091 0.5625 0 0 0.121212125 Local-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +65 0.722222269 0.128901035 0.375 0.09386094 0 0.5050505 ? 10th Married-civ-spouse ? Husband White Male United-States 1 +57 0.6333333 0.07023079 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.0131278606 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +37 0.411111116 0.0866939947 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.08625485 0.5625 0 0 0.363636374 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +26 0.2888889 0.0249362681 0.625 0 0 0.7878788 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +44 0.4888889 0.0463041477 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +66 0.733333349 0.09468278 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.220538765 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +31 0.344444454 0.136544973 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +53 0.5888889 0.186886281 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +36 0.4 0.127749279 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +61 0.677777767 0.1380126 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.115740843 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.0527020544 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.04640316 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Male Mexico 0 +27 0.3 0.0381611176 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Amer-Indian-Eskimo Male United-States 0 +58 0.644444466 0.174590915 0.3125 0 0 0.4040404 Local-gov 9th Divorced Other-service Not-in-family White Female United-States 0 +37 0.411111116 0.182041556 0.5625 0 0 0.121212125 State-gov HS-grad Divorced Adm-clerical Unmarried White Female Puerto-Rico 0 +56 0.622222245 0.160844073 0.25 0 0 0.262626261 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.07484854 0.625 0 0 0.6060606 Private Some-college Separated Exec-managerial Not-in-family White Male United-States 1 +29 0.322222233 0.08043955 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 +28 0.311111122 0.04919294 0.375 0 0 0.3030303 Private 10th Never-married Transport-moving Unmarried White Male United-States 0 +61 0.677777767 0.0568523742 1 0 0 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +66 0.733333349 0.184852213 0.3125 0 0 0.25252524 Self-emp-not-inc 9th Married-civ-spouse Farming-fishing Husband White Male United-States 1 +31 0.344444454 0.165985167 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +21 0.233333334 0.08368127 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 +67 0.7444445 0.08310944 0.5625 0.06418064 0 0.5858586 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +26 0.2888889 0.107585013 0.5625 0 0 0.4040404 Private HS-grad Widowed Transport-moving Not-in-family White Male United-States 0 +21 0.233333334 0.108718567 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.106127486 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.113174 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +59 0.655555546 0.235676453 0.8125 0.106051058 0 0.5050505 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +82 0.9111111 0.08778108 0.25 0 0 0.5050505 Self-emp-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +34 0.377777785 0.03836722 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 +29 0.322222233 0.2495506 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male France 1 +19 0.211111113 0.07160076 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Own-child White Female United-States 0 +57 0.6333333 0.0380412266 0.5625 0 0 0.01010101 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.0780842 0.625 1 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.104114965 0.375 0.0258002579 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband Black Male United-States 0 +27 0.3 0.2723915 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +33 0.366666675 0.131272539 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +43 0.477777779 0.110991746 0.625 0 0 0.5050505 State-gov Some-college Divorced Adm-clerical Not-in-family Black Male United-States 1 +72 0.8 0.06347524 0.625 0 0 0.161616161 Federal-gov Some-college Widowed Tech-support Not-in-family White Female United-States 0 +68 0.75555557 0.245853558 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.108110368 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Own-child White Female United-States 0 +41 0.455555558 0.1147238 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +30 0.333333343 0.06820615 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +31 0.344444454 0.06752318 0.8125 1 0 0.7070707 Private Bachelors Divorced Other-service Not-in-family Asian-Pac-Islander Male United-States 1 +54 0.6 0.146640584 0.1875 0 0 0.3030303 Private 5th-6th Married-spouse-absent Other-service Unmarried Black Female Haiti 0 +32 0.355555564 0.114604585 0.75 0.25236252 0 0.5050505 Private Assoc-acdm Separated Exec-managerial Unmarried White Female United-States 1 +56 0.622222245 0.07091039 0.5625 0 0.453168035 0.4040404 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +39 0.433333337 0.243710369 0.8125 0 0 0.0606060624 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 +41 0.455555558 0.1912279 0.6875 0 0 0.353535354 State-gov Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.0266248174 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +66 0.733333349 0.142913908 0.25 0 0 0.4848485 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +25 0.2777778 0.0611246 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Never-married Sales Not-in-family White Female United-States 0 +31 0.344444454 0.136357054 0.5625 0 0.3611111 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +32 0.355555564 0.113246739 0.75 0.02597026 0 0.4848485 Private Assoc-acdm Divorced Sales Not-in-family White Male United-States 0 +51 0.566666663 0.1076005 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.129160345 0.5625 0 0.5369605 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative Black Female Trinadad&Tobago 0 +22 0.244444445 0.141982421 0.625 0 0 0.353535354 ? Some-college Never-married ? Not-in-family Black Female United-States 0 +31 0.344444454 0.229594439 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.0762515143 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +42 0.466666669 0.09059645 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Unmarried Black Female United-States 0 +20 0.222222224 0.09919816 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Other-relative Other Male United-States 0 +40 0.444444448 0.0979595259 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +65 0.722222269 0.2680674 0.5625 0 0 0.2020202 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +53 0.5888889 0.0212756079 0.8125 0 0 0.5252525 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +56 0.622222245 0.127954721 0.625 0 0.43663913 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.155919865 1 0.07688077 0 0.5555556 State-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.0815886 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +44 0.4888889 0.125894368 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.143557146 0.5625 0 0.43663913 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.119143538 0.5625 0.0861408561 0 0.444444448 Private HS-grad Divorced Craft-repair Not-in-family Black Male United-States 1 +22 0.244444445 0.07762081 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Wife White Female United-States 0 +53 0.5888889 0.210979968 0.625 0 0.5610652 0.454545468 Private Some-college Separated Craft-repair Not-in-family White Male United-States 1 +41 0.455555558 0.1144975 0.625 0 0 0.2020202 Local-gov Some-college Divorced Protective-serv Not-in-family White Male United-States 0 +19 0.211111113 0.133668974 0.5625 0 0.459366381 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +27 0.3 0.04500827 0.8125 0.0332503319 0 0.434343427 Local-gov Bachelors Never-married Prof-specialty Not-in-family Amer-Indian-Eskimo Female United-States 0 +48 0.533333361 0.03518544 0.6875 0 0 0.25252524 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 +52 0.5777778 0.0237791352 0.25 0 0 0.07070707 Private 7th-8th Never-married Other-service Own-child White Female United-States 0 +61 0.677777767 0.125581175 0.9375 0 0.43663913 0.4040404 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.108253159 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male China 1 +29 0.322222233 0.141754761 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +41 0.455555558 0.139883012 0.625 0 0 0.212121218 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +38 0.422222227 0.157416463 0.625 0 0 0.6060606 Private Some-college Divorced Exec-managerial Unmarried Black Male United-States 0 +32 0.355555564 0.149662733 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +37 0.411111116 0.112893134 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +55 0.6111111 0.100203745 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +62 0.6888889 0.0459808521 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +48 0.533333361 0.117553994 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +43 0.477777779 0.184029832 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.12628907 0.5625 0 0 0.24242425 Private HS-grad Never-married Sales Own-child Black Male United-States 0 +47 0.5222222 0.140984237 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +49 0.544444442 0.0382843725 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +55 0.6111111 0.171500072 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +42 0.466666669 0.0287619438 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +40 0.444444448 0.251994163 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Male United-States 0 +34 0.377777785 0.132272065 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.12994501 0.5625 0 0 0.1010101 Private HS-grad Separated Sales Unmarried White Female United-States 0 +39 0.433333337 0.06703487 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.124898218 0.75 0 0 0.5555556 Private Assoc-acdm Divorced Craft-repair Not-in-family White Female United-States 0 +43 0.477777779 0.166472137 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Own-child White Male United-States 0 +32 0.355555564 0.0885926858 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Exec-managerial Not-in-family Black Female United-States 0 +18 0.2 0.124397106 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female Mexico 0 +27 0.3 0.474241018 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +57 0.6333333 0.148354053 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Tech-support Not-in-family White Female United-States 0 +38 0.422222227 0.0644262657 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +67 0.7444445 0.060177613 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.0635762662 0.4375 0 0 0.2020202 Private 11th Separated Other-service Unmarried White Female United-States 0 +21 0.233333334 0.225036621 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +17 0.188888893 0.02206701 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Male United-States 0 +31 0.344444454 0.09203916 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 +51 0.566666663 0.161807224 0.75 0 0 0.3030303 Self-emp-not-inc Assoc-acdm Separated Sales Not-in-family Black Male United-States 0 +29 0.322222233 0.0358798541 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.0212116223 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Own-child White Male United-States 1 +32 0.355555564 0.131939352 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.140838087 0.625 0.0346403457 0 0.454545468 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +26 0.2888889 0.142401353 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +28 0.311111122 0.05701941 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +40 0.444444448 0.101978511 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +51 0.566666663 0.07194628 0.25 0 0 0.1919192 Private 7th-8th Never-married Handlers-cleaners Own-child White Male United-States 0 +62 0.6888889 0.08952418 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 +54 0.6 0.09889776 0.375 0 0 0.6060606 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +55 0.6111111 0.11068327 0.5625 0 0 0.161616161 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +24 0.266666681 0.0206478741 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +27 0.3 0.07644684 0.875 0 0 0.454545468 Private Masters Never-married Adm-clerical Own-child White Male United-States 0 +18 0.2 0.111346029 0.5625 0 0 0.3030303 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +22 0.244444445 0.157576755 0.8125 0.143441439 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Amer-Indian-Eskimo Female United-States 1 +21 0.233333334 0.08527822 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +44 0.4888889 0.243334547 0.625 0 0 0.8080808 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband Asian-Pac-Islander Male Philippines 1 +50 0.5555556 0.08287438 0.875 0 0 0.6060606 ? Masters Married-civ-spouse ? Husband White Male United-States 1 +38 0.422222227 0.1114511 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.0669843554 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.05723494 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.161956757 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Not-in-family Black Male United-States 0 +51 0.566666663 0.155490831 0.625 0 0.453856736 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +60 0.6666667 0.08299157 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +62 0.6888889 0.12872456 0.625 0.07298073 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +38 0.422222227 0.07765112 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.251831174 0.625 0 0 0.353535354 Private Some-college Separated Handlers-cleaners Not-in-family Black Male United-States 0 +43 0.477777779 0.102792814 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Own-child White Female United-States 0 +49 0.544444442 0.0489114 0.625 0 0 0.5050505 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +17 0.188888893 0.0281975213 0.375 0 0 0.25252524 Private 10th Never-married Other-service Own-child White Female United-States 0 +32 0.355555564 0.128125116 0.5625 0 0 0.6060606 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +23 0.25555557 0.130052775 0.8125 0 0 0.3838384 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.0934138447 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +83 0.922222257 0.103174031 0.8125 0 0.549127638 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.122513227 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.1806305 0.8125 0 0.3409091 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +46 0.51111114 0.143912762 0.4375 0 0 0.4040404 Local-gov 11th Never-married Other-service Not-in-family White Male United-States 0 +29 0.322222233 0.06692845 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family Other Female United-States 0 +44 0.4888889 0.0701796 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +60 0.6666667 0.119107164 0.9375 0 0 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.06701803 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Protective-serv Unmarried Amer-Indian-Eskimo Female United-States 0 +24 0.266666681 0.123532958 0.625 0 0 0.171717167 Private Some-college Never-married Sales Own-child White Female United-States 0 +17 0.188888893 0.0173031017 0.375 0 0 0.1010101 Private 10th Never-married Other-service Own-child White Female United-States 0 +76 0.844444454 0.136044532 0.4375 0 0 0.161616161 ? 11th Widowed ? Other-relative White Female United-States 0 +31 0.344444454 0.127271757 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Own-child White Female United-States 0 +52 0.5777778 0.07743693 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.08181289 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Own-child Asian-Pac-Islander Female United-States 0 +73 0.811111152 0.1290088 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.0986041054 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +48 0.533333361 0.130364627 0.5625 0 0 0.2020202 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 +60 0.6666667 0.08158321 0.375 0 0 0.4040404 Private 10th Widowed Sales Not-in-family White Female United-States 0 +26 0.2888889 0.262581468 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +20 0.222222224 0.195664465 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 +54 0.6 0.0923180059 1 0 0 0.4040404 State-gov Doctorate Never-married Exec-managerial Not-in-family White Female United-States 1 +50 0.5555556 0.143250689 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +20 0.222222224 0.048140876 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.07506542 0.625 0 0 0.222222224 Private Some-college Never-married Adm-clerical Other-relative Black Male United-States 0 +35 0.3888889 0.1521245 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.08746047 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +50 0.5555556 0.0673029348 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +58 0.644444466 0.153431162 0.125 0 0 0.5050505 Private 1st-4th Separated Farming-fishing Not-in-family Black Male United-States 0 +55 0.6111111 0.07484989 0.75 0 0 0.4040404 State-gov Assoc-acdm Divorced Adm-clerical Own-child Asian-Pac-Islander Male United-States 0 +29 0.322222233 0.06786803 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.185285971 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Female United-States 0 +39 0.433333337 0.09934634 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Wife Black Female United-States 0 +63 0.7 0.101083383 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +27 0.3 0.09487609 0.5625 0 0 0.6060606 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +62 0.6888889 0.134166718 0.4375 0 0 0.4040404 ? 11th Divorced ? Not-in-family Black Female United-States 0 +38 0.422222227 0.1302427 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +25 0.2777778 0.13253206 0.5625 0 0 0.656565666 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +31 0.344444454 0.1561428 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 +40 0.444444448 0.1323199 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.0229250938 1 0 0 0.5050505 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 +52 0.5777778 0.117844291 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +46 0.51111114 0.06170115 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +31 0.344444454 0.271749616 0.625 0 0 0.5050505 Private Some-college Separated Other-service Unmarried White Female Mexico 0 +33 0.366666675 0.07604204 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +58 0.644444466 0.16344662 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +52 0.5777778 0.126509979 0.5625 0.049340494 0 0.363636374 Local-gov HS-grad Divorced Tech-support Unmarried White Male United-States 1 +25 0.2777778 0.247938141 0.8125 0.135501355 0 0.353535354 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +54 0.6 0.231185317 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +46 0.51111114 0.07637207 0.875 0 0.399449021 0.6060606 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 +28 0.311111122 0.1352006 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.1594721 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.0151504846 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +60 0.6666667 0.0871412158 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +22 0.244444445 0.161040753 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +27 0.3 0.1128177 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +35 0.3888889 0.05196049 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.0557666346 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.0908503756 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +40 0.444444448 0.147206351 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.1398042 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.132618263 0.75 0 0 0.4040404 Private Assoc-acdm Separated Craft-repair Not-in-family Other Female United-States 0 +54 0.6 0.135353491 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.126670957 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male ? 0 +60 0.6666667 0.156486988 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Male United-States 0 +32 0.355555564 0.06644822 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +19 0.211111113 0.130840808 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +49 0.544444442 0.32463488 0.5625 0 0 0.6060606 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +31 0.344444454 0.158264443 0.4375 0 0 0.4848485 Private 11th Never-married Adm-clerical Unmarried White Female United-States 0 +29 0.322222233 0.235141665 0.5625 0 0 0.25252524 Private HS-grad Separated Sales Unmarried White Female United-States 0 +39 0.433333337 0.118131213 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 +42 0.466666669 0.126435891 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male ? 1 +26 0.2888889 0.144565418 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +27 0.3 0.124689423 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Own-child White Male United-States 0 +52 0.5777778 0.0665128753 0.3125 0 0 0.4040404 Private 9th Widowed Adm-clerical Unmarried White Female United-States 0 +50 0.5555556 0.147087812 0.625 0 0 0.4040404 Local-gov Some-college Divorced Other-service Unmarried Black Female United-States 0 +51 0.566666663 0.103378117 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +51 0.566666663 0.117263705 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +40 0.444444448 0.09236987 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +61 0.677777767 0.162330568 0.25 0 0 0.4040404 Private 7th-8th Widowed Farming-fishing Not-in-family Black Male United-States 0 +35 0.3888889 0.1803712 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +41 0.455555558 0.102969952 0.5625 0 0 0.282828271 ? HS-grad Divorced ? Not-in-family Black Female United-States 0 +31 0.344444454 0.177517429 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.07632762 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.0267824251 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +35 0.3888889 0.115973212 0.625 0 0 0.4040404 Private Some-college Separated Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.310100675 0.625 0 0.3838384 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.124690764 0.9375 0 0.4331956 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.04126746 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +39 0.433333337 0.0839796439 0.875 0 0 1 Self-emp-inc Masters Divorced Exec-managerial Not-in-family Asian-Pac-Islander Male Japan 1 +69 0.7666667 0.0518406034 0.3125 0 0 0.25252524 Self-emp-not-inc 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +63 0.7 0.209062412 0.3125 0.05178052 0 0.4040404 ? 9th Married-civ-spouse ? Husband White Male United-States 1 +29 0.322222233 0.0255491845 0.625 0.0217402168 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +21 0.233333334 0.02611428 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 +24 0.266666681 0.116182007 0.8125 0 0 0.5555556 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +55 0.6111111 0.206212014 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +42 0.466666669 0.0227620974 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.032118164 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 +31 0.344444454 0.130081058 0.8125 0 0 0.424242437 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +52 0.5777778 0.269416481 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.06821759 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +29 0.322222233 0.129577264 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.07667382 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +47 0.5222222 0.187459469 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +56 0.622222245 0.134513587 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.158968285 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.09357954 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +36 0.4 0.0855025053 0.625 0 0 0.4040404 Private Some-college Separated Craft-repair Not-in-family White Male United-States 0 +45 0.5 0.0301682837 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +38 0.422222227 0.0215288568 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +60 0.6666667 0.2371892 0.9375 0 0 0.4040404 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +70 0.7777778 0.138653815 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +21 0.233333334 0.07618079 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 +57 0.6333333 0.0600671545 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +33 0.366666675 0.168910325 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.130568027 0.5625 0 0.43663913 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.0893888 0.9375 1 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +68 0.75555557 0.147259563 0.625 0 0.5456841 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.119858831 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Adm-clerical Wife White Female Mexico 0 +32 0.355555564 0.133804366 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.140052736 0.9375 0.105201051 0 0.5050505 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 +18 0.2 0.113652207 0.4375 0 0 0.3030303 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +45 0.5 0.134454325 0.625 0 0 0.2020202 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +22 0.244444445 0.144070372 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female Mexico 0 +38 0.422222227 0.140350446 0.8125 0 0 0.08080808 Private Bachelors Never-married Machine-op-inspct Not-in-family White Female United-States 0 +37 0.411111116 0.07619022 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.03894848 0.8125 0 0 0.4040404 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 +59 0.655555546 0.347349823 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.0364988334 0.9375 0.1502415 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.09078773 0.625 0.1502415 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.266901523 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +30 0.333333343 0.156004056 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female Mexico 0 +50 0.5555556 0.117636167 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +63 0.7 0.06588716 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +38 0.422222227 0.232019156 0.5625 0.0406404063 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.119035095 0.3125 0 0 0.4040404 Private 9th Divorced Sales Not-in-family White Female United-States 0 +60 0.6666667 0.09694316 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.371765435 0.5625 0 0 0.5050505 Private HS-grad Separated Handlers-cleaners Unmarried White Female Peru 0 +30 0.333333343 0.2011019 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Own-child White Male United-States 0 +39 0.433333337 0.173732832 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +55 0.6111111 0.170445979 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.130495965 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Male United-States 0 +46 0.51111114 0.248238549 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.129967913 0.5625 0 0 0.656565666 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +32 0.355555564 0.146361738 0.8125 0 0 0.3030303 Private Bachelors Never-married Protective-serv Not-in-family Black Male United-States 0 +18 0.2 0.08084367 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +34 0.377777785 0.0418426581 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family Black Male United-States 0 +50 0.5555556 0.0639083162 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 +32 0.355555564 0.129699171 0.4375 0 0 0.5555556 Private 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.14879185 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 +26 0.2888889 0.124011166 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +46 0.51111114 0.0948215351 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 +43 0.477777779 0.115029588 0.625 0 0 0.5555556 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.0610929467 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +37 0.411111116 0.07293907 0.75 0 0 0.3838384 State-gov Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 +48 0.533333361 0.1133444 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +28 0.311111122 0.228578746 0.8125 0 0.323232323 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +43 0.477777779 0.130444765 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.09689804 0.375 0 0 0.24242425 Local-gov 10th Widowed Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.140982226 0.5625 0 0 0.5050505 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male Dominican-Republic 0 +34 0.377777785 0.13771154 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.0923334956 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Other-relative Amer-Indian-Eskimo Male United-States 0 +41 0.455555558 0.10042534 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +53 0.5888889 0.123159148 0.375 0 0 0.4848485 Private 10th Divorced Adm-clerical Unmarried White Female United-States 0 +42 0.466666669 0.385767549 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Craft-repair Husband White Male Nicaragua 0 +18 0.2 0.0562071279 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +81 0.900000036 0.06608451 0.8125 0 0 0.5050505 Private Bachelors Widowed Sales Not-in-family White Male United-States 1 +40 0.444444448 0.08030215 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +26 0.2888889 0.09085172 0.8125 0 0 0.353535354 Private Bachelors Never-married Tech-support Own-child White Female United-States 0 +20 0.222222224 0.502333462 0.625 0 0 0.151515156 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +41 0.455555558 0.059518896 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +49 0.544444442 0.08221566 0.875 0 0 0.454545468 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.244640529 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.056847658 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 +56 0.622222245 0.0233218055 0.625 0 0.454545438 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +35 0.3888889 0.101058461 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +34 0.377777785 0.0323390849 0.8125 0 0 0.353535354 Private Bachelors Separated Exec-managerial Not-in-family White Female United-States 0 +29 0.322222233 0.119483672 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +28 0.311111122 0.2516985 0.5 0 0 0.454545468 Private 12th Married-civ-spouse Prof-specialty Husband White Male ? 0 +35 0.3888889 0.284859955 0.8125 0 0 0.373737365 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +29 0.322222233 0.0882922858 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +21 0.233333334 0.120060891 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Female Columbia 0 +52 0.5777778 0.08709542 0.625 0 0 0.959596 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.318696976 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.159617573 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +35 0.3888889 0.152474061 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Other-relative White Female United-States 0 +21 0.233333334 0.187040523 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 +35 0.3888889 0.1398042 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Male United-States 0 +30 0.333333343 0.0577272922 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +45 0.5 0.06652164 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Female Canada 0 +29 0.322222233 0.129509225 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Other-relative White Female United-States 0 +29 0.322222233 0.182535931 0.375 0 0 0.4040404 State-gov 10th Never-married Other-service Own-child Black Female United-States 0 +33 0.366666675 0.1274765 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +17 0.188888893 0.216797277 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child Black Male United-States 0 +52 0.5777778 0.1195288 0.5625 0 0 0.25252524 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +24 0.266666681 0.085974656 0.625 0 0 0.353535354 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 +32 0.355555564 0.08017283 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +40 0.444444448 0.195155278 0.8125 0.046500463 0 0.4848485 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +32 0.355555564 0.140982226 0.5625 0 0 0.4040404 Private HS-grad Separated Exec-managerial Not-in-family White Male ? 0 +33 0.366666675 0.191641435 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +30 0.333333343 0.169137985 0.25 0 0 0.3838384 Private 7th-8th Never-married Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.0766953751 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +62 0.6888889 0.114577644 0.75 0 0 0.5050505 Without-pay Assoc-acdm Married-civ-spouse Farming-fishing Husband White Male United-States 0 +46 0.51111114 0.08158119 0.8125 0.1502415 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +32 0.355555564 0.221053347 0.6875 0 0 0.646464646 Private Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 +26 0.2888889 0.138954878 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +41 0.455555558 0.158968285 0.8125 0.1502415 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +57 0.6333333 0.114907004 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +52 0.5777778 0.0500267744 0.625 0.07298073 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.07561839 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.07968317 0.5625 0 0 0.161616161 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +49 0.544444442 0.08537319 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +47 0.5222222 0.179971784 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male ? 1 +38 0.422222227 0.138316363 0.4375 0 0 0.323232323 Private 11th Married-civ-spouse Adm-clerical Wife White Female United-States 0 +30 0.333333343 0.2685126 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +32 0.355555564 0.13638939 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male Columbia 0 +32 0.355555564 0.0711589158 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +46 0.51111114 0.128782481 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Own-child White Female United-States 0 +22 0.244444445 0.03810993 0.5625 0 0 0.5050505 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +47 0.5222222 0.0347402357 0.625 0 0 0.5050505 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +57 0.6333333 0.102397449 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Married-civ-spouse Sales Wife White Female United-States 1 +47 0.5222222 0.153101131 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +41 0.455555558 0.0376195945 0.8125 0 0 0.565656543 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.0195298065 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.108192541 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +37 0.411111116 0.149827749 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Other-service Other-relative White Male El-Salvador 0 +36 0.4 0.121518418 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +64 0.7111111 0.07818658 0.5625 0.0263502635 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.136404872 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Male United-States 0 +23 0.25555557 0.125286847 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.059518896 0.625 0.009140091 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +42 0.466666669 0.128001183 0.8125 0.1502415 0 0.5050505 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.0237959735 0.5625 0 0 0.424242437 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +35 0.3888889 0.0571480542 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Handlers-cleaners Unmarried White Female United-States 0 +56 0.622222245 0.118730657 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Other-service Not-in-family White Male United-States 0 +52 0.5777778 0.0978450254 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 0 +37 0.411111116 0.0729572549 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +48 0.533333361 0.0716485754 1 0 0 0.656565666 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.174263582 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Own-child White Female Japan 0 +33 0.366666675 0.0392704271 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.230127871 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male Philippines 0 +34 0.377777785 0.118978523 0.5625 0 0 0.424242437 Private HS-grad Divorced Adm-clerical Not-in-family Black Male United-States 0 +24 0.266666681 0.0219680015 0.8125 0 0 0.4040404 ? Bachelors Divorced ? Not-in-family White Female United-States 0 +23 0.25555557 0.324087948 0.625 0 0 0.24242425 Private Some-college Never-married Exec-managerial Own-child Other Male Peru 0 +49 0.544444442 0.126256734 0.5625 1 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.01740211 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +20 0.222222224 0.259362638 0.5 0 0 0.4040404 Private 12th Never-married Machine-op-inspct Own-child White Male United-States 0 +54 0.6 0.0464637764 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +19 0.211111113 0.122295007 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +53 0.5888889 0.01596142 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.180592775 0.5 0 0 0.4040404 ? 12th Separated ? Unmarried Black Female United-States 0 +28 0.311111122 0.1093133 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +35 0.3888889 0.0973984748 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +20 0.222222224 0.168807954 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +31 0.344444454 0.1013272 0.625 0 0 0.5050505 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.127467081 1 0 0 0.4040404 Private Doctorate Separated Prof-specialty Unmarried White Female United-States 0 +64 0.7111111 0.175174192 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male Columbia 0 +42 0.466666669 0.09370616 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +27 0.3 0.0337656327 0.625 0 0 0.5050505 Private Some-college Divorced Sales Not-in-family White Male United-States 0 +36 0.4 0.112945668 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Other-service Unmarried White Female United-States 0 +36 0.4 0.0524144545 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.1054169 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +46 0.51111114 0.16707629 0.5625 0.0346403457 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.190672219 0.4375 0 0 0.353535354 Private 11th Never-married Craft-repair Not-in-family Black Male Jamaica 0 +22 0.244444445 0.118463263 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +62 0.6888889 0.156467453 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.181848243 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male Puerto-Rico 0 +20 0.222222224 0.205728412 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +47 0.5222222 0.08135017 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 1 +57 0.6333333 0.05301188 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +19 0.211111113 0.236950785 0.5625 0 0 0.353535354 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +37 0.411111116 0.132369056 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +35 0.3888889 0.118386485 0.5625 0 0 0.656565666 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +17 0.188888893 0.103064917 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 +36 0.4 0.223547444 0.625 0 0 0.353535354 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +50 0.5555556 0.188226625 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +35 0.3888889 0.09813667 0.5625 0.0394203924 0 0.353535354 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 +27 0.3 0.138410658 1 0 0 0.7777778 State-gov Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 +28 0.311111122 0.1979693 0.5625 0 0.399449021 0.3030303 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.0465627871 0.9375 1 0 0.6060606 Self-emp-not-inc Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 +25 0.2777778 0.07617608 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family Black Male United-States 0 +47 0.5222222 0.139385939 0.75 0 0 0.676767647 Self-emp-inc Assoc-acdm Widowed Exec-managerial Not-in-family White Female United-States 0 +29 0.322222233 0.10761869 0.875 0 0 0.454545468 State-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +19 0.211111113 0.276514858 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +49 0.544444442 0.02320057 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.140836731 0.9375 0 0 0.25252524 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.06459331 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Prof-specialty Wife Black Female United-States 0 +56 0.622222245 0.144353926 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.159171686 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +45 0.5 0.135465965 0.625 0 0 0.565656543 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.09623865 0.8125 0 0 0.4040404 Private Bachelors Widowed Exec-managerial Unmarried White Female United-States 0 +44 0.4888889 0.0520729721 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +17 0.188888893 0.1428735 0.375 0 0 0.2020202 ? 10th Never-married ? Own-child White Female United-States 0 +36 0.4 0.12601696 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.132589981 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +53 0.5888889 0.104609333 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +72 0.8 0.136922151 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.07884327 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +33 0.366666675 0.120284505 0.625 0 0 0.373737365 Private Some-college Separated Prof-specialty Unmarried White Female United-States 0 +22 0.244444445 0.05549453 0.3125 0 0 0.4040404 Private 9th Never-married Handlers-cleaners Own-child Asian-Pac-Islander Male Philippines 0 +17 0.188888893 0.09783627 0.4375 0 0 0.25252524 ? 11th Never-married ? Other-relative White Female United-States 0 +41 0.455555558 0.124701545 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Tech-support Husband White Male ? 1 +46 0.51111114 0.04909797 0.3125 0 0 0.434343427 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.0908503756 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 +32 0.355555564 0.150340974 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +52 0.5777778 0.1177015 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +27 0.3 0.155292138 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +48 0.533333361 0.238312662 0.5625 0 0 0.727272749 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +22 0.244444445 0.07904803 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.19220452 0.5625 0 0 0.5050505 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +60 0.6666667 0.09388465 0.5625 0 0 0.424242437 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +38 0.422222227 0.133474335 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +37 0.411111116 0.0262328219 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +49 0.544444442 0.126971349 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +40 0.444444448 0.119761169 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.126915455 0.5625 0.03103031 0 0.464646459 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +31 0.344444454 0.120229945 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +40 0.444444448 0.08708666 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +25 0.2777778 0.111345351 0.5625 0 0 0.373737365 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +68 0.75555557 0.07896249 0.8125 0.200512 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.115992069 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Own-child Black Female United-States 0 +19 0.211111113 0.0427249856 0.5 0 0 0.3030303 Private 12th Never-married Farming-fishing Own-child White Female United-States 0 +35 0.3888889 0.09487002 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +28 0.311111122 0.08960905 0.5625 0 0 0.5050505 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +53 0.5888889 0.07622794 0.5625 0.02597026 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +33 0.366666675 0.174648166 0.625 0 0 0.414141417 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.132445842 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +45 0.5 0.2454124 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Female United-States 0 +36 0.4 0.181394964 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.07304751 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.11560344 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +19 0.211111113 0.123653524 0.625 0 0 0.25252524 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +24 0.266666681 0.07260769 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +34 0.377777785 0.121153362 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +32 0.355555564 0.113814533 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +37 0.411111116 0.08122152 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.209316328 0.625 0 0 0.4040404 Private Some-college Separated Sales Unmarried White Female Mexico 0 +21 0.233333334 0.132719964 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 +47 0.5222222 0.107580967 0.5625 0 0 0.858585835 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +23 0.25555557 0.141979054 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.0372403935 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +60 0.6666667 0.09511721 0.8125 0 0.496556461 0.25252524 ? Bachelors Married-civ-spouse ? Husband Asian-Pac-Islander Male South 0 +17 0.188888893 0.18637912 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +67 0.7444445 0.226417378 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +57 0.6333333 0.07600163 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.1117515 0.4375 0 0 0.2020202 Private 11th Never-married Handlers-cleaners Own-child White Male Peru 0 +53 0.5888889 0.111634977 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.174646825 0.625 0.03103031 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.133178651 0.5625 0 0 0.4949495 State-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +48 0.533333361 0.133159116 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +51 0.566666663 0.10927289 0.875 0 0.4331956 0.474747479 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.14363797 0.5625 0 0 0.4040404 Private HS-grad Separated Protective-serv Not-in-family Black Male United-States 0 +51 0.566666663 0.03625838 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.06022678 0.5625 0 0 0.1010101 Private HS-grad Never-married Tech-support Own-child White Female United-States 0 +23 0.25555557 0.0806247741 0.625 0 0 0.4040404 Private Some-college Separated Sales Unmarried White Female United-States 0 +42 0.466666669 0.291754931 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.123064183 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Not-in-family White Female ? 0 +39 0.433333337 0.1162103 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 +20 0.222222224 0.14825505 0.5625 0 0 0.121212125 ? HS-grad Never-married ? Own-child White Male United-States 0 +39 0.433333337 0.107062347 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 +21 0.233333334 0.0172633622 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 +26 0.2888889 0.320978254 0.25 0 0 0.4040404 Private 7th-8th Never-married Craft-repair Not-in-family White Male Mexico 0 +54 0.6 0.0239616632 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.137039348 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +32 0.355555564 0.213946208 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Transport-moving Own-child White Male United-States 0 +59 0.655555546 0.114777684 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.117317587 0.4375 0 0 0.24242425 ? 11th Married-civ-spouse ? Wife Other Female United-States 0 +54 0.6 0.148214638 0.8125 0 0 0.4040404 Private Bachelors Widowed Sales Unmarried White Female United-States 0 +54 0.6 0.1559111 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +67 0.7444445 0.226293445 0.5625 0.009910099 0 0.181818187 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +33 0.366666675 0.188032642 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.060321074 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +47 0.5222222 0.109078906 0.8125 0 0 0.25252524 Private Bachelors Divorced Other-service Not-in-family White Female Germany 0 +51 0.566666663 0.0882788152 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +45 0.5 0.147929728 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.118210018 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +58 0.644444466 0.122625038 1 0 0 0.24242425 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.193625 0.5625 0.0332503319 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 +36 0.4 0.1389185 0.625 0 0.371212125 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +20 0.222222224 0.127434745 0.75 0 0 0.4040404 ? Assoc-acdm Never-married ? Not-in-family White Male United-States 0 +51 0.566666663 0.0146143511 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.220953658 0.875 0 0 0.6060606 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +32 0.355555564 0.240242347 0.5625 0.0388703868 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Male United-States 0 +59 0.655555546 0.08208028 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 +45 0.5 0.2835486 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.147206351 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +54 0.6 0.194646075 0.375 0.143441439 0 0.686868668 Private 10th Divorced Prof-specialty Unmarried White Male United-States 1 +20 0.222222224 0.127796426 0.625 0 0 0.323232323 ? Some-college Never-married ? Own-child White Female United-States 0 +29 0.322222233 0.127236724 0.8125 0 0 0.424242437 Local-gov Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 +28 0.311111122 0.1435174 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family Black Female Jamaica 0 +18 0.2 0.10583315 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Never-married Sales Own-child White Female United-States 0 +49 0.544444442 0.06601311 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.139877617 0.5625 0 0 0.3030303 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +58 0.644444466 0.243731931 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 +56 0.622222245 0.179221466 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female Mexico 0 +41 0.455555558 0.07181696 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Exec-managerial Unmarried Black Female United-States 0 +50 0.5555556 0.11301437 0.9375 0 0.5544077 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +74 0.822222233 0.139207453 0.625 0 0.378328741 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +30 0.333333343 0.163780019 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +62 0.6888889 0.136005476 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried Black Female United-States 0 +19 0.211111113 0.08644546 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +29 0.322222233 0.13288027 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +20 0.222222224 0.113951258 0.625 0 0 0.4040404 ? Some-college Never-married ? Other-relative Black Female United-States 0 +36 0.4 0.165366858 0.25 0 0 0.353535354 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +36 0.4 0.0872840062 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +51 0.566666663 0.031935636 0.75 0 0.373737365 0.3030303 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 +37 0.411111116 0.127003685 0.625 0.04386044 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.124408558 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.0429270454 0.375 0 0 0.2020202 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 +18 0.2 0.07493475 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.0750876442 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +26 0.2888889 0.179590568 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.06321323 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.124069765 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.16030255 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Other-relative White Male Mexico 0 +28 0.311111122 0.0203656629 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried White Female United-States 0 +43 0.477777779 0.13237983 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +47 0.5222222 0.0975574255 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.188926429 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child Black Female United-States 0 +73 0.811111152 0.09133195 0.8125 0 0 0.1010101 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +37 0.411111116 0.2756029 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 +50 0.5555556 0.0159533378 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Other-relative White Female United-States 1 +19 0.211111113 0.154748589 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Own-child White Male United-States 0 +32 0.355555564 0.06434275 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +44 0.4888889 0.0493020527 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Tech-support Unmarried Asian-Pac-Islander Male United-States 0 +20 0.222222224 0.132514536 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 +29 0.322222233 0.0535331927 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +21 0.233333334 0.07875908 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +34 0.377777785 0.0679933056 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Unmarried White Female Germany 0 +44 0.4888889 0.0381564 0.8125 0 0 0.5252525 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +18 0.2 0.125919968 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 +22 0.244444445 0.178401768 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Other-relative White Female United-States 0 +39 0.433333337 0.123318776 1 0 0 0.4040404 State-gov Doctorate Divorced Prof-specialty Not-in-family White Female United-States 1 +26 0.2888889 0.184143662 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family White Male Peru 0 +29 0.322222233 0.09594027 0.8125 0 0 0.25252524 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +21 0.233333334 0.119569883 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +49 0.544444442 0.0210594032 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +24 0.266666681 0.216653138 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Machine-op-inspct Own-child White Male United-States 0 +26 0.2888889 0.223519832 0.8125 0 0 0.6060606 Private Bachelors Never-married Exec-managerial Not-in-family White Male ? 0 +25 0.2777778 0.190957129 0.625 0 0 0.6060606 Private Some-college Never-married Protective-serv Not-in-family White Male United-States 0 +30 0.333333343 0.0367803723 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +52 0.5777778 0.10927289 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.1184956 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.159495667 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +31 0.344444454 0.1136805 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +44 0.4888889 0.1529361 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.192182958 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.174920276 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Female United-States 0 +57 0.6333333 0.0164234657 0.25 0 0 0.1010101 Private 7th-8th Widowed Other-service Not-in-family White Female United-States 0 +58 0.644444466 0.216886863 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.0335399956 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.0354050137 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.1793454 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +72 0.8 0.192232132 0.9375 0 0.515610635 0.282828271 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.1197935 0.8125 0 0.430670351 0.3838384 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +45 0.5 0.123798333 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 +48 0.533333361 0.0722237751 0.9375 1 0 0.5050505 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.116978794 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +20 0.222222224 0.110436082 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 +18 0.2 0.116915487 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Male Peru 0 +27 0.3 0.115853995 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +25 0.2777778 0.02988001 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +45 0.5 0.1659535 0.5625 0 0 0.3030303 Private HS-grad Never-married Priv-house-serv Unmarried Black Female United-States 0 +53 0.5888889 0.112502486 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family Black Female United-States 0 +54 0.6 0.0968690738 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +41 0.455555558 0.0255060773 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.3013986 0.3125 0 0 0.353535354 Private 9th Never-married Machine-op-inspct Other-relative White Male Mexico 0 +17 0.188888893 0.16120778 0.375 0 0 0.181818187 Private 10th Never-married Other-service Own-child White Male United-States 0 +42 0.466666669 0.165672645 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +61 0.677777767 0.0233258456 0.5 0 0 0.4040404 Private 12th Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 +57 0.6333333 0.08174149 0.625 0 0.518365443 0.3838384 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 1 +21 0.233333334 0.0161702167 0.625 0 0 0.353535354 State-gov Some-college Never-married Craft-repair Own-child White Male United-States 0 +44 0.4888889 0.111464567 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +48 0.533333361 0.219604567 0.75 0 0 0.444444448 Private Assoc-acdm Divorced Other-service Not-in-family White Male United-States 0 +46 0.51111114 0.1689366 0.9375 0 0 0.4848485 Private Prof-school Divorced Farming-fishing Unmarried White Male United-States 0 +37 0.411111116 0.104156047 0.5625 0 0 0.868686855 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +35 0.3888889 0.133495882 0.5625 0 0 0.545454562 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +27 0.3 0.114840321 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Transport-moving Not-in-family White Female United-States 0 +28 0.311111122 0.128875434 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family Other Male India 0 +19 0.211111113 0.160953864 0.5625 0 0 0.1010101 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +63 0.7 0.231782079 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +69 0.7666667 0.10015054 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +69 0.7666667 0.121362157 0.75 0 0 0.0606060624 ? Assoc-acdm Widowed ? Not-in-family White Female Italy 0 +36 0.4 0.113755934 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-spouse-absent Protective-serv Own-child White Female Germany 0 +20 0.222222224 0.136904642 0.5 0 0 0.353535354 Private 12th Never-married Other-service Own-child White Male United-States 0 +28 0.311111122 0.06032444 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 +58 0.644444466 0.06571137 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +48 0.533333361 0.2266713 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.09405707 0.625 0 0 0.565656543 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +38 0.422222227 0.107894838 0.5625 0 0.4708448 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.215791017 0.75 0 0 0.4040404 Local-gov Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 +35 0.3888889 0.0216379687 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +45 0.5 0.1855217 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Exec-managerial Unmarried White Male United-States 0 +38 0.422222227 0.03701274 0.625 0 0 0.3838384 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.0697647 0.75 0 0 0.5555556 Private Assoc-acdm Divorced Exec-managerial Unmarried White Female United-States 1 +42 0.466666669 0.1653965 0.8125 0 0 0.121212125 Private Bachelors Never-married Prof-specialty Own-child White Female England 0 +32 0.355555564 0.0264180433 0.375 0 0 0.4040404 Private 10th Separated Craft-repair Unmarried Black Female ? 0 +55 0.6111111 0.0790439844 1 0 0 0.7070707 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 1 +63 0.7 0.139680952 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.239298046 0.3125 0 0 0.4848485 Private 9th Never-married Machine-op-inspct Not-in-family White Male Mexico 0 +62 0.6888889 0.09511519 0.875 0 0 0.3030303 ? Masters Married-civ-spouse ? Husband White Male United-States 1 +46 0.51111114 0.139877617 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +43 0.477777779 0.0687773 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +35 0.3888889 0.04059325 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.187668264 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +51 0.566666663 0.239475861 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Unmarried White Female Mexico 0 +45 0.5 0.1662896 0.8125 0 0 0.727272749 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Canada 1 +19 0.211111113 0.0838456154 0.5 0 0.3677686 0.2020202 Private 12th Never-married Other-service Own-child White Male United-States 0 +61 0.677777767 0.136125356 0.5625 0 0.43663913 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +61 0.677777767 0.128925949 0.3125 0 0 0.656565666 Private 9th Widowed Exec-managerial Not-in-family Black Male United-States 0 +21 0.233333334 0.124296077 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +45 0.5 0.0823099539 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +38 0.422222227 0.1542495 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.08760461 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +40 0.444444448 0.20643495 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +32 0.355555564 0.156835869 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +55 0.6111111 0.115395315 0.625 0 0 0.353535354 Local-gov Some-college Married-spouse-absent Adm-clerical Unmarried Black Female United-States 0 +64 0.7111111 0.09711155 0.5625 0 0 0.232323229 Private HS-grad Widowed Prof-specialty Not-in-family White Female United-States 0 +34 0.377777785 0.06927841 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Male United-States 0 +19 0.211111113 0.134366766 0.625 0 0 0.6060606 ? Some-college Never-married ? Own-child White Male United-States 0 +58 0.644444466 0.14106372 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 +46 0.51111114 0.0504443645 0.75 0 0.3409091 0.5555556 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.124184944 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.300741225 0.625 0 0 0.4040404 Private Some-college Separated Other-service Unmarried Black Female United-States 0 +31 0.344444454 0.07657279 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Machine-op-inspct Unmarried White Female United-States 0 +39 0.433333337 0.224492416 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 +19 0.211111113 0.07983741 0.5 0 0 0.181818187 Private 12th Never-married Sales Own-child White Female United-States 0 +56 0.622222245 0.05128426 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +53 0.5888889 0.026129771 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +68 0.75555557 0.140417129 0.875 0 0 0.181818187 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 0 +69 0.7666667 0.136938319 0.5625 0.009910099 0 0.181818187 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +62 0.6888889 0.166688338 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +62 0.6888889 0.133821875 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +39 0.433333337 0.03779741 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +45 0.5 0.2423431 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 0 +29 0.322222233 0.1559596 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +33 0.366666675 0.02347133 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +34 0.377777785 0.134662449 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +29 0.322222233 0.132176429 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +65 0.722222269 0.04469575 0.4375 0.06418064 0 0.353535354 Self-emp-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.127626032 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 +22 0.244444445 0.131236851 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +30 0.333333343 0.112688385 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +44 0.4888889 0.129909977 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +48 0.533333361 0.0472881831 0.625 0 0 0.2020202 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +52 0.5777778 0.08285215 0.5625 0 0 0.454545468 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +53 0.5888889 0.0911554843 0.8125 0.07688077 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male China 1 +48 0.533333361 0.335073978 0.5625 0.0147101469 0 0.4040404 Federal-gov HS-grad Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 +25 0.2777778 0.120211087 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +41 0.455555558 0.100968882 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.0695916042 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +55 0.6111111 0.161246851 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +67 0.7444445 0.111188419 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.262493223 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 +47 0.5222222 0.252292544 0.5625 0 0 0.5252525 Private HS-grad Separated Sales Not-in-family White Female United-States 0 +36 0.4 0.126613036 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried White Female United-States 0 +25 0.2777778 0.1746475 0.8125 0 0 0.161616161 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +19 0.211111113 0.187037155 0.3125 0 0 0.161616161 Private 9th Never-married Farming-fishing Other-relative White Male Mexico 0 +24 0.266666681 0.155079976 0.25 0 0 0.4040404 Private 7th-8th Separated Machine-op-inspct Own-child White Male United-States 0 +30 0.333333343 0.132243112 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Never-married Sales Own-child White Male United-States 0 +17 0.188888893 0.108417496 0.4375 0 0 0.161616161 Private 11th Never-married Adm-clerical Own-child White Male United-States 0 +28 0.311111122 0.07775147 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +34 0.377777785 0.155615434 0.6875 0.03908039 0 0.454545468 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +35 0.3888889 0.08728805 0.625 0 0 0.464646459 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.2607306 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 0 +43 0.477777779 0.07135155 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +20 0.222222224 0.07223119 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male ? 0 +55 0.6111111 0.0841918141 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Unmarried White Male United-States 1 +22 0.244444445 0.154546529 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +20 0.222222224 0.154989034 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Own-child White Male United-States 0 +44 0.4888889 0.0718647838 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +38 0.422222227 0.08988587 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 +53 0.5888889 0.199042916 0.3125 0 0 0.25252524 Private 9th Widowed Sales Unmarried Black Female United-States 0 +26 0.2888889 0.102074824 0.625 0.02597026 0 0.4848485 Private Some-college Separated Sales Own-child Amer-Indian-Eskimo Male United-States 0 +58 0.644444466 0.0675642639 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +23 0.25555557 0.215729058 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +53 0.5888889 0.1093692 0.125 0 0 0.5050505 Private 1st-4th Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.123861648 0.5625 0.0235402342 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +41 0.455555558 0.02156388 0.5625 0 0 0.6262626 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +31 0.344444454 0.0788224 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +50 0.5555556 0.1887769 0.5625 0 0 0.4040404 Private HS-grad Widowed Prof-specialty Unmarried Black Female United-States 0 +57 0.6333333 0.230959013 0.3125 0 0 0.5555556 Private 9th Married-civ-spouse Sales Husband Black Male United-States 1 +25 0.2777778 0.122312516 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Tech-support Husband White Male United-States 0 +23 0.25555557 0.150911465 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +48 0.533333361 0.100052871 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +34 0.377777785 0.06557195 0.625 0 0 0.6060606 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +37 0.411111116 0.1041089 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male ? 0 +43 0.477777779 0.09496028 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Other-relative Asian-Pac-Islander Male India 0 +20 0.222222224 0.0999585763 0.625 0.010550105 0 0.2020202 Private Some-college Never-married Sales Other-relative White Male United-States 0 +40 0.444444448 0.101538688 0.8125 1 0 0.75757575 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.0586015433 0.625 0 0.3624885 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +35 0.3888889 0.07554228 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.08182636 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +57 0.6333333 0.191037953 0.625 0 0 0.4040404 State-gov Some-college Divorced Craft-repair Not-in-family White Female United-States 0 +43 0.477777779 0.04698442 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male United-States 0 +40 0.444444448 0.134639546 0.75 0 0.4242424 0.5555556 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.05928383 0.625 0 0 0.5555556 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 +28 0.311111122 0.0215093233 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.217588678 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.127633438 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +52 0.5777778 0.0599721856 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.0757773444 0.375 0 0 0.6060606 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.159587264 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +33 0.366666675 0.187588781 0.5625 0 0 0.424242437 Private HS-grad Divorced Craft-repair Own-child White Female United-States 0 +21 0.233333334 0.2918627 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried White Male United-States 0 +25 0.2777778 0.17402716 0.8125 0 0 0.323232323 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +44 0.4888889 0.109131448 0.4375 0 0 0.444444448 Private 11th Divorced Sales Unmarried White Female United-States 0 +20 0.222222224 0.133357808 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +46 0.51111114 0.06624211 0.375 0 0 0.373737365 Private 10th Married-spouse-absent Other-service Not-in-family Asian-Pac-Islander Male China 0 +39 0.433333337 0.11170435 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.120303363 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +19 0.211111113 0.154198319 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +27 0.3 0.141777664 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +53 0.5888889 0.10432443 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +46 0.51111114 0.111764289 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Machine-op-inspct Unmarried White Male United-States 0 +23 0.25555557 0.09346503 0.8125 0.02907029 0 0.4040404 ? Bachelors Never-married ? Own-child White Male United-States 0 +39 0.433333337 0.107846342 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Other-relative Asian-Pac-Islander Male Philippines 0 +30 0.333333343 0.257538021 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +53 0.5888889 0.08285215 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.08017283 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +22 0.244444445 0.334649652 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +44 0.4888889 0.1306987 0.625 0 0 0.353535354 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 +30 0.333333343 0.201537013 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried Amer-Indian-Eskimo Female United-States 0 +66 0.733333349 0.117725745 0.625 0 0 0.2020202 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.1186101 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.0262328219 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.183156252 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Wife White Female United-States 0 +17 0.188888893 0.08219882 0.4375 0 0 0.2020202 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +43 0.477777779 0.0780842 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +46 0.51111114 0.178557366 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.06791113 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Not-in-family White Male United-States 0 +60 0.6666667 0.08171253 0.25 0.031370312 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male Poland 0 +63 0.7 0.207467481 0.875 0.0501305 0 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 0 +42 0.466666669 0.143606976 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.23480624 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband Other Male Mexico 0 +33 0.366666675 0.185647652 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +43 0.477777779 0.161083177 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Amer-Indian-Eskimo Male United-States 0 +20 0.222222224 0.145143315 0.3125 0 0 0.4040404 Private 9th Never-married Exec-managerial Other-relative White Female Mexico 0 +30 0.333333343 0.144178808 0.625 0 0 0.727272749 Private Some-college Never-married Farming-fishing Other-relative Black Male United-States 0 +37 0.411111116 0.08250326 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.142586574 0.625 0 0 0.4040404 ? Some-college Divorced ? Unmarried White Female United-States 0 +49 0.544444442 0.118287474 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +65 0.722222269 0.103402361 0.5625 0 0 0.171717167 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +35 0.3888889 0.174000219 0.9375 0 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.080684714 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.0899188742 0.5625 0 0.453856736 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.109678358 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 +41 0.455555558 0.04557875 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +38 0.422222227 0.127222583 0.8125 0 0.307621658 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +45 0.5 0.09472858 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +18 0.2 0.0849690661 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +33 0.366666675 0.165459812 0.625 0 0 0.3838384 Private Some-college Separated Other-service Unmarried White Female El-Salvador 0 +28 0.311111122 0.08730623 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male ? 0 +47 0.5222222 0.0700933859 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried Amer-Indian-Eskimo Female United-States 0 +30 0.333333343 0.227592692 0.75 0 0 0.2020202 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +36 0.4 0.108534023 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +21 0.233333334 0.109266154 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Male United-States 0 +44 0.4888889 0.078393355 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +33 0.366666675 0.211698622 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Sales Not-in-family White Male United-States 0 +61 0.677777767 0.265732259 0.5625 0 0 0.0606060624 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 +29 0.322222233 0.207540229 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.131135821 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.0456609242 0.5625 0 0 0.6060606 ? HS-grad Never-married ? Own-child White Female United-States 0 +29 0.322222233 0.203691646 0.6875 0 0.359045 0.565656543 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 1 +27 0.3 0.194750473 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +21 0.233333334 0.154795736 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +22 0.244444445 0.103882588 0.625 0.0378103778 0 0.353535354 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +49 0.544444442 0.166187227 0.625 0 0 0.454545468 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.126652092 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.1262473 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +37 0.411111116 0.0709002838 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.167850181 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.137058884 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +18 0.2 0.0478721373 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 +55 0.6111111 0.09865731 0.625 0 0 0.454545468 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.135851234 0.75 0.05178052 0 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +59 0.655555546 0.138713747 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Amer-Indian-Eskimo Female United-States 0 +70 0.7777778 0.060783118 0.5625 0 0 0.05050505 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +53 0.5888889 0.119651385 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male France 1 +39 0.433333337 0.0851980746 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 +38 0.422222227 0.173593417 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +33 0.366666675 0.782218039 0.625 0 0 0.5050505 Private Some-college Separated Tech-support Unmarried White Female Columbia 0 +19 0.211111113 0.173329383 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +28 0.311111122 0.149155557 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +74 0.822222233 0.175569564 0.375 0 0 0.01010101 Private 10th Divorced Other-service Not-in-family White Female United-States 0 +40 0.444444448 0.129550323 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +35 0.3888889 0.05420538 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Not-in-family White Male United-States 0 +35 0.3888889 0.07328594 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +41 0.455555558 0.1183225 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.183841243 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +29 0.322222233 0.108294919 0.375 0 0 0.353535354 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.0823099539 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +46 0.51111114 0.08161083 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 +40 0.444444448 0.141137138 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.16466099 0.8125 0.07688077 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.118741438 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Protective-serv Husband Black Male United-States 0 +31 0.344444454 0.0617402121 0.5625 0 0 0.6060606 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 +50 0.5555556 0.128661931 0.875 0.046500463 0 0.7070707 Local-gov Masters Divorced Exec-managerial Not-in-family White Female United-States 0 +31 0.344444454 0.04290684 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +27 0.3 0.0213234276 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.1288 0.625 0 0 0.25252524 Private Some-college Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +28 0.311111122 0.037946932 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +21 0.233333334 0.148956865 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 +57 0.6333333 0.09692835 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +56 0.622222245 0.293550581 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +22 0.244444445 0.0414216965 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +48 0.533333361 0.140891284 0.0625 0 0 0.4040404 Private Preschool Separated Other-service Unmarried White Female El-Salvador 0 +36 0.4 0.07221502 0.625 0 0 0.5555556 Self-emp-inc Some-college Divorced Sales Unmarried Asian-Pac-Islander Male United-States 0 +51 0.566666663 0.0373811647 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 +39 0.433333337 0.241099745 0.75 0 0 0.4848485 Local-gov Assoc-acdm Never-married Transport-moving Not-in-family White Male United-States 0 +43 0.477777779 0.134946 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +38 0.422222227 0.2158348 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 0 +51 0.566666663 0.1242954 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +43 0.477777779 0.139372468 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +44 0.4888889 0.0365796573 0.875 0.07298073 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.1402063 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +40 0.444444448 0.09894761 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.214464158 0.375 0 0 0.121212125 Private 10th Separated Other-service Own-child Black Female United-States 0 +47 0.5222222 0.139785349 0.25 0 0 0.4040404 Self-emp-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male ? 0 +23 0.25555557 0.04708747 0.0625 0 0 0.151515156 Private Preschool Never-married Other-service Own-child White Female United-States 0 +26 0.2888889 0.205632776 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +25 0.2777778 0.198887318 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Prof-specialty Own-child Black Female United-States 0 +29 0.322222233 0.185296074 0.625 0 0 0.424242437 Private Some-college Separated Handlers-cleaners Not-in-family Black Male United-States 0 +30 0.333333343 0.22884883 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +57 0.6333333 0.268905938 0.8125 0 0.3409091 0.4040404 State-gov Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male China 0 +37 0.411111116 0.0345280729 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.03301666 0.8125 0.03103031 0 0.4848485 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.119956493 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 +45 0.5 0.145445064 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +21 0.233333334 0.118661962 0.625 0 0 0.161616161 Private Some-college Never-married Sales Own-child White Female United-States 0 +25 0.2777778 0.121831611 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +61 0.677777767 0.08787335 0.5625 0 0 0.4040404 State-gov HS-grad Widowed Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 +59 0.655555546 0.221272916 0.5625 0.02414024 0 0.151515156 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +28 0.311111122 0.09612145 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +24 0.266666681 0.118758276 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +47 0.5222222 0.09769011 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Cuba 1 +29 0.322222233 0.06427068 0.5625 0 0 0.8080808 Private HS-grad Married-AF-spouse Transport-moving Husband White Male United-States 0 +49 0.544444442 0.144874573 0.3125 0 0 0.2020202 Self-emp-not-inc 9th Divorced Other-service Not-in-family White Female United-States 0 +41 0.455555558 0.119619049 0.8125 0 0 0.353535354 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +33 0.366666675 0.08346439 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family Black Female United-States 0 +20 0.222222224 0.135710463 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +40 0.444444448 0.0316493846 1 0 0.453856736 0.2020202 Private Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 +32 0.355555564 0.261784 0.625 0 0 0.161616161 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 +48 0.533333361 0.10049808 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family Black Male United-States 1 +24 0.266666681 0.09078369 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +50 0.5555556 0.124878012 0.6875 0 0 0.3838384 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +31 0.344444454 0.0580202825 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Protective-serv Other-relative Asian-Pac-Islander Male United-States 0 +23 0.25555557 0.0281005315 0.6875 0 0 0.5555556 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.131840333 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +50 0.5555556 0.06470107 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +39 0.433333337 0.144910946 0.3125 0 0 0.5050505 Private 9th Divorced Handlers-cleaners Not-in-family White Male United-States 0 +52 0.5777778 0.182344645 0.25 0 0 0.4848485 Private 7th-8th Married-civ-spouse Other-service Husband White Male Cuba 0 +44 0.4888889 0.05052317 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +43 0.477777779 0.138841718 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.0341481976 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.1510455 0.25 0 0 0.4040404 Private 7th-8th Never-married Farming-fishing Not-in-family White Male Mexico 1 +31 0.344444454 0.1619453 0.875 0 0.359045 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 +40 0.444444448 0.274001241 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +28 0.311111122 0.02320461 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +19 0.211111113 0.243375629 0.5 0 0 0.25252524 Private 12th Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female Thailand 0 +35 0.3888889 0.0527020544 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.07200084 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +40 0.444444448 0.111205935 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Adm-clerical Husband White Male England 0 +20 0.222222224 0.27388674 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +55 0.6111111 0.115488939 0.5625 0 0 0.4848485 Private HS-grad Divorced Craft-repair Unmarried Black Male United-States 1 +30 0.333333343 0.229801208 0.25 0 0 0.353535354 Private 7th-8th Separated Transport-moving Not-in-family White Male United-States 0 +38 0.422222227 0.08026982 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +75 0.8333334 0.07065108 0.5625 0.0265302639 0 0.2020202 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +17 0.188888893 0.230855286 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Male United-States 0 +79 0.8777778 0.0516203567 0.875 0.200512 0 0.4040404 ? Masters Married-civ-spouse ? Husband White Male Poland 1 +20 0.222222224 0.0320205 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Male United-States 0 +25 0.2777778 0.157244042 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Tech-support Not-in-family White Male United-States 0 +27 0.3 0.2047235 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +19 0.211111113 0.109796226 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +21 0.233333334 0.051028993 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife Amer-Indian-Eskimo Female United-States 0 +19 0.211111113 0.0289640035 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +42 0.466666669 0.221080288 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.08813603 0.375 0 0 0.363636374 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.128020048 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male Iran 1 +59 0.655555546 0.114600547 0.625 0 0 0.323232323 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +50 0.5555556 0.070385024 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +48 0.533333361 0.143557146 0.5625 0 0 0.8080808 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.118211366 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +27 0.3 0.116932996 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family White Female United-States 0 +45 0.5 0.100353271 1 1 0 0.3030303 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 +24 0.266666681 0.0434564464 0.25 0 0 0.4040404 Private 7th-8th Never-married Sales Own-child White Male United-States 0 +31 0.344444454 0.09417494 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +24 0.266666681 0.174243376 0.1875 0 0 0.4040404 Private 5th-6th Never-married Farming-fishing Other-relative Black Male Mexico 0 +29 0.322222233 0.023436306 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +24 0.266666681 0.08416689 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +24 0.266666681 0.04428018 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.108497649 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family Black Female Jamaica 0 +63 0.7 0.285976678 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +36 0.4 0.137290582 0.625 0 0 0.5050505 Federal-gov Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +58 0.644444466 0.0742228255 0.25 0 0 0.4040404 State-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +51 0.566666663 0.212876633 0.625 0 0 0.363636374 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +42 0.466666669 0.172200546 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.130456224 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +26 0.2888889 0.04089836 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Female United-States 0 +39 0.433333337 0.126521438 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.157118753 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +51 0.566666663 0.145082027 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 1 +45 0.5 0.135963038 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Exec-managerial Unmarried White Male United-States 0 +45 0.5 0.0800758451 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.248358428 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.08340579 0.625 0 0.323232323 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +38 0.422222227 0.115406096 0.4375 0 0 0.363636374 Private 11th Married-spouse-absent Transport-moving Own-child White Male Mexico 0 +39 0.433333337 0.103708148 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +52 0.5777778 0.25249663 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Farming-fishing Not-in-family White Male United-States 0 +17 0.188888893 0.112923443 0.5 0 0 0.0606060624 Private 12th Never-married Sales Own-child White Female United-States 0 +31 0.344444454 0.234729469 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +22 0.244444445 0.174114734 0.5625 0 0 0.24242425 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 +47 0.5222222 0.07334117 0.5625 0.0183101818 0 0.3838384 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.126783431 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.239489332 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +41 0.455555558 0.286285162 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +29 0.322222233 0.09601571 0.875 0 0 0.424242437 Private Masters Never-married Prof-specialty Not-in-family Black Male United-States 0 +42 0.466666669 0.01974803 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Divorced Prof-specialty Unmarried White Male United-States 1 +52 0.5777778 0.13998808 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +35 0.3888889 0.126172543 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.182509661 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 +46 0.51111114 0.132909909 0.875 0.07688077 0 0.464646459 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +21 0.233333334 0.117980339 0.625 0.0217602178 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +45 0.5 0.10789147 0.5625 0 0 0.4040404 Local-gov HS-grad Married-spouse-absent Adm-clerical Unmarried Black Female United-States 0 +21 0.233333334 0.1333046 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +74 0.822222233 0.129513949 0.375 0 0 0.2020202 Private 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +29 0.322222233 0.162924618 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Other-relative White Male United-States 0 +39 0.433333337 0.110806525 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +44 0.4888889 0.09914832 0.625 0.07688077 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.206686184 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 +32 0.355555564 0.114391074 0.75 0 0 0.4040404 Local-gov Assoc-acdm Divorced Exec-managerial Not-in-family Black Female United-States 0 +61 0.677777767 0.08395473 0.375 0 0 0.4040404 ? 10th Divorced ? Not-in-family White Female United-States 0 +43 0.477777779 0.124642268 0.5625 0 0 0.3030303 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 1 +23 0.25555557 0.16168128 0.0625 0 0 0.4040404 Private Preschool Never-married Other-service Not-in-family Asian-Pac-Islander Female Laos 0 +18 0.2 0.110756688 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +38 0.422222227 0.120774165 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +33 0.366666675 0.2154327 0.8125 0.046500463 0 0.353535354 Private Bachelors Separated Prof-specialty Not-in-family White Male United-States 0 +19 0.211111113 0.100326329 0.625 0 0 0.353535354 Self-emp-inc Some-college Never-married Other-service Own-child Asian-Pac-Islander Female South 0 +23 0.25555557 0.02219296 0.625 0.04101041 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +37 0.411111116 0.139218912 0.5625 0 0 0.454545468 Private HS-grad Divorced Tech-support Own-child White Male United-States 0 +25 0.2777778 0.259745866 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +36 0.4 0.021174578 0.5625 0 0 0.434343427 Private HS-grad Divorced Transport-moving Unmarried White Male ? 0 +45 0.5 0.113556564 0.5 0.03103031 0 0.4040404 Private 12th Married-civ-spouse Adm-clerical Wife Black Female United-States 1 +32 0.355555564 0.06553895 0.8125 0 0 0.4848485 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +65 0.722222269 0.0720075741 0.4375 0 0 0.151515156 ? 11th Divorced ? Not-in-family Asian-Pac-Islander Female United-States 0 +18 0.2 0.0199244972 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Never-married Craft-repair Own-child White Male United-States 0 +25 0.2777778 0.148368865 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Unmarried White Male Mexico 0 +29 0.322222233 0.07424101 0.875 0 0 0.656565666 Private Masters Never-married Sales Not-in-family White Male ? 0 +53 0.5888889 0.162263885 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.077790536 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.0712714 0.8125 0 0 0.454545468 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +24 0.266666681 0.222829461 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +54 0.6 0.0244674869 0.25 0 0 0.5050505 Self-emp-not-inc 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.0225115437 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +45 0.5 0.0509683751 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 +36 0.4 0.125105 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +36 0.4 0.125300989 0.4375 0.05178052 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 +44 0.4888889 0.1323199 0.875 0 0.383149683 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.07506542 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Unmarried Black Male United-States 0 +39 0.433333337 0.07765112 0.625 0 0.3168044 0.7070707 Private Some-college Divorced Sales Own-child White Male United-States 0 +50 0.5555556 0.0504335873 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Handlers-cleaners Unmarried White Female United-States 0 +38 0.422222227 0.0790136755 0.5625 0.1502415 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +58 0.644444466 0.183808908 0.8125 0 0 0.4040404 Private Bachelors Widowed Exec-managerial Unmarried White Female United-States 0 +44 0.4888889 0.1483325 0.5625 0 0 0.4848485 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +24 0.266666681 0.0612471849 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Own-child Asian-Pac-Islander Male United-States 0 +52 0.5777778 0.1577997 0.5625 0.1502415 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.245535657 0.8125 0.0861408561 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 +50 0.5555556 0.191065565 1 0.1502415 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.1317447 0.75 0 0 0.444444448 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.0476599745 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family Black Male United-States 0 +53 0.5888889 0.09612482 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 +24 0.266666681 0.08368127 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +58 0.644444466 0.0360213 0.8125 0 0 0.7070707 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +26 0.2888889 0.1938412 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.126809031 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Handlers-cleaners Own-child White Male United-States 0 +36 0.4 0.115826376 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +78 0.8666667 0.05037701 0.75 0 0 0.04040404 ? Assoc-acdm Widowed ? Not-in-family White Female United-States 0 +36 0.4 0.147160545 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Germany 1 +43 0.477777779 0.06394334 0.8125 0 0 0.282828271 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +60 0.6666667 0.07375944 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +49 0.544444442 0.181535736 0.875 0.07298073 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.1358445 0.25 0 0.453856736 0.6363636 Self-emp-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male ? 1 +34 0.377777785 0.08127675 0.25 0 0 0.1010101 Self-emp-not-inc 7th-8th Never-married Handlers-cleaners Unmarried Black Male United-States 0 +46 0.51111114 0.08808417 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +46 0.51111114 0.297393769 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Transport-moving Husband Black Male United-States 0 +69 0.7666667 0.07732243 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +32 0.355555564 0.121427491 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.01848448 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +61 0.677777767 0.121493496 0.1875 0.03411034 0 0.454545468 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +56 0.622222245 0.09649459 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.0938018039 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +29 0.322222233 0.08500544 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +37 0.411111116 0.125406057 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.132796079 0.9375 0 0.5874656 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 +44 0.4888889 0.130345091 0.875 0 0.43663913 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.122171074 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried White Female United-States 0 +51 0.566666663 0.08416689 0.9375 0 0 0.8080808 Self-emp-not-inc Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 +24 0.266666681 0.1272475 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.100511551 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Never-married Other-service Own-child White Female United-States 0 +40 0.444444448 0.2618197 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +34 0.377777785 0.07647513 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Own-child White Male United-States 0 +61 0.677777767 0.126379311 0.8125 0 0 0.4040404 ? Bachelors Divorced ? Unmarried White Female United-States 0 +56 0.622222245 0.180347621 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male ? 0 +69 0.7666667 0.09688726 0.4375 0 0 0.2020202 Federal-gov 11th Widowed Adm-clerical Not-in-family White Female United-States 0 +41 0.455555558 0.0655194148 0.6875 0 0 0.1010101 Self-emp-not-inc Assoc-voc Divorced Other-service Unmarried White Female United-States 0 +40 0.444444448 0.134237438 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.0840921253 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Black Male United-States 0 +26 0.2888889 0.03371242 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +53 0.5888889 0.06533621 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +90 1 0.118167587 0.25 0 0 0.151515156 ? 7th-8th Separated ? Not-in-family White Female United-States 0 +39 0.433333337 0.227585956 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +51 0.566666663 0.08356947 0.8125 0 0 0.4040404 Federal-gov Bachelors Widowed Adm-clerical Not-in-family White Female United-States 0 +56 0.622222245 0.186851934 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male Puerto-Rico 1 +51 0.566666663 0.1887769 0.375 0 0 0.4040404 Private 10th Separated Adm-clerical Unmarried Black Female United-States 0 +17 0.188888893 0.162446409 0.5 0 0 0.2020202 Private 12th Never-married Prof-specialty Own-child White Male United-States 0 +42 0.466666669 0.1361806 0.625 0 0.3996786 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +42 0.466666669 0.133644059 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Own-child White Female United-States 0 +29 0.322222233 0.0553928241 0.9375 0.2782828 0 0.454545468 Private Prof-school Never-married Prof-specialty Unmarried White Male Germany 1 +33 0.366666675 0.120178089 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.125187159 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male ? 1 +43 0.477777779 0.1433598 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +64 0.7111111 0.147949263 0.9375 0 0 0.09090909 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.21678111 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 1 +21 0.233333334 0.2114043 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 +31 0.344444454 0.09703207 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +60 0.6666667 0.0940159857 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Exec-managerial Unmarried Asian-Pac-Islander Female United-States 1 +32 0.355555564 0.282676369 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Sales Husband White Male United-States 1 +66 0.733333349 0.143300518 0.8125 0.06767067 0 0.2020202 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +27 0.3 0.131717756 0.5625 0 0 0.2020202 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +40 0.444444448 0.138550088 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +27 0.3 0.08844181 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 +18 0.2 0.0366672166 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 +43 0.477777779 0.135201275 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family Black Female United-States 0 +52 0.5777778 0.05513486 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +31 0.344444454 0.107488692 0.5625 0 0 0.858585835 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.202676624 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +44 0.4888889 0.124642268 0.875 0 0 0.353535354 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.0283180848 0.625 0 0 0.8484849 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +35 0.3888889 0.112086914 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.1432857 0.3125 0 0 0.4040404 Private 9th Separated Craft-repair Unmarried Black Male United-States 0 +18 0.2 0.1590006 0.375 0 0 0.1010101 Private 10th Never-married Other-service Own-child Black Male United-States 0 +46 0.51111114 0.1457623 0.875 0 0.453856736 0.6060606 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.0184763987 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +54 0.6 0.0979447141 0.5625 0 0.3838384 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +56 0.622222245 0.09914562 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Not-in-family White Female Germany 0 +27 0.3 0.0197082926 0.625 0 0 0.5050505 Private Some-college Never-married Sales Unmarried White Male United-States 0 +26 0.2888889 0.242164612 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female Mexico 0 +41 0.455555558 0.153326079 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.0606322475 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male ? 0 +32 0.355555564 0.1267282 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried White Female United-States 0 +18 0.2 0.07418443 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +36 0.4 0.125556931 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +37 0.411111116 0.118353479 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +31 0.344444454 0.116430536 0.1875 0 0 0.25252524 Private 5th-6th Never-married Farming-fishing Own-child White Male Mexico 0 +46 0.51111114 0.0242263619 0.8125 0 0 0.5151515 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +24 0.266666681 0.2918627 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +25 0.2777778 0.107941307 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Never-married Exec-managerial Own-child Asian-Pac-Islander Male Taiwan 0 +55 0.6111111 0.127653643 0.1875 0 0 0.5050505 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 +64 0.7111111 0.07632762 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Exec-managerial Not-in-family White Male United-States 0 +30 0.333333343 0.07981384 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +65 0.722222269 0.0604032464 0.875 0 0 1 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +46 0.51111114 0.134656385 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +45 0.5 0.06890797 0.875 0.1502415 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.299458146 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 +32 0.355555564 0.119214259 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.06368875 0.8125 0.07688077 0 0.5050505 ? Bachelors Married-civ-spouse ? Wife Other Female ? 1 +34 0.377777785 0.246646985 1 0 0 0.454545468 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male Germany 1 +35 0.3888889 0.121698253 0.5625 0.031370312 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.0727545246 0.5625 0.0332503319 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +24 0.266666681 0.103415832 0.625 0 0 0.353535354 Private Some-college Never-married Sales Other-relative White Male United-States 0 +45 0.5 0.141687408 0.5625 0.1502415 0 0.8080808 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.12486925 0.375 0 0 0.343434334 Private 10th Never-married Handlers-cleaners Not-in-family White Female United-States 0 +44 0.4888889 0.149998158 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband Other Male Nicaragua 0 +23 0.25555557 0.1238933 0.625 0 0 0.6060606 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +57 0.6333333 0.109088339 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.252962053 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male Mexico 1 +20 0.222222224 0.210430354 0.5625 0 0 0.3030303 Local-gov HS-grad Married-civ-spouse Protective-serv Husband Black Male Puerto-Rico 0 +32 0.355555564 0.0359485559 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +60 0.6666667 0.112028994 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 +38 0.422222227 0.08396617 0.8125 0 0 0.2020202 Self-emp-inc Bachelors Never-married Craft-repair Not-in-family White Female United-States 0 +29 0.322222233 0.09882031 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Not-in-family White Female United-States 0 +22 0.244444445 0.206500962 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +21 0.233333334 0.1055341 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Male India 0 +40 0.444444448 0.103380136 0.5625 0.031370312 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Other-relative White Male United-States 0 +59 0.655555546 0.155840382 0.625 0 0.4242424 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.08559883 0.875 0 0 0.454545468 State-gov Masters Divorced Exec-managerial Not-in-family White Male United-States 0 +76 0.844444454 0.221831948 0.5625 0 0 0.13131313 Local-gov HS-grad Widowed Other-service Not-in-family White Female United-States 0 +45 0.5 0.120103993 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +49 0.544444442 0.204920173 0.875 0 0 0.7070707 Local-gov Masters Separated Prof-specialty Unmarried White Female United-States 0 +36 0.4 0.117626064 0.6875 0 0 0.6060606 Local-gov Assoc-voc Never-married Protective-serv Not-in-family Black Female United-States 1 +22 0.244444445 0.09988112 0.4375 0 0 0.353535354 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +47 0.5222222 0.200738192 0.6875 0 0 0.444444448 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +26 0.2888889 0.0661107749 0.5625 0 0 0.5555556 Private HS-grad Married-AF-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.0692164451 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Own-child White Male United-States 0 +27 0.3 0.05289199 0.5625 0 0 0.151515156 Private HS-grad Never-married Transport-moving Own-child White Female United-States 0 +26 0.2888889 0.09180881 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +20 0.222222224 0.18546243 0.6875 0 0 0.25252524 Private Assoc-voc Never-married Tech-support Own-child White Female United-States 0 +31 0.344444454 0.022305442 0.875 0 0 0.454545468 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Male England 0 +57 0.6333333 0.134401113 0.875 0 0 0.4040404 Local-gov Masters Divorced Other-service Unmarried Black Female United-States 0 +39 0.433333337 0.124016561 0.4375 0 0 0.4040404 Private 11th Divorced Sales Other-relative White Female United-States 0 +36 0.4 0.227007389 0.75 0.143441439 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family Black Male England 1 +66 0.733333349 0.08520952 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.219432145 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +80 0.8888889 0.0618984923 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +21 0.233333334 0.08046986 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Female United-States 0 +40 0.444444448 0.103211075 0.8125 0 0.43663913 0.323232323 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.216777742 0.75 0 0 0.3030303 Local-gov Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 +48 0.533333361 0.07311688 0.625 0.0332503319 0 0.6060606 Self-emp-not-inc Some-college Divorced Sales Not-in-family White Female United-States 0 +19 0.211111113 0.04527297 0.625 0.005940059 0 0.24242425 State-gov Some-college Never-married Other-service Not-in-family White Male United-States 0 +42 0.466666669 0.131681383 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +59 0.655555546 0.06883051 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +63 0.7 0.0136882411 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +26 0.2888889 0.0823099539 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +41 0.455555558 0.135146037 0.3125 0 0 0.353535354 Private 9th Divorced Other-service Other-relative White Female United-States 0 +42 0.466666669 0.116918854 0.625 0 0.373737365 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +19 0.211111113 0.124011844 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +45 0.5 0.0357801728 0.4375 0 0 0.25252524 Local-gov 11th Married-civ-spouse Other-service Wife White Female United-States 0 +47 0.5222222 0.118535332 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 +47 0.5222222 0.21290493 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.022954056 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male England 0 +49 0.544444442 0.147987649 0.8125 0.1502415 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.0855079 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +53 0.5888889 0.06680452 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried White Male United-States 1 +21 0.233333334 0.0269764028 0.625 0 0.459366381 0.454545468 ? Some-college Never-married ? Not-in-family White Male United-States 0 +39 0.433333337 0.08087398 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +52 0.5777778 0.05208846 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.04107281 0.625 0.0217602178 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 +59 0.655555546 0.05245756 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family Asian-Pac-Islander Male United-States 0 +50 0.5555556 0.0440545455 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.116709381 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male United-States 1 +52 0.5777778 0.214420378 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 +41 0.455555558 0.106206961 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.186861366 0.75 0 0 0.4040404 Private Assoc-acdm Widowed Tech-support Unmarried White Male United-States 1 +54 0.6 0.12434794 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +22 0.244444445 0.0231985487 0.5625 0 0 0.25252524 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +50 0.5555556 0.180879712 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +20 0.222222224 0.0278546922 0.75 0 0 0.323232323 ? Assoc-acdm Never-married ? Not-in-family White Female United-States 0 +43 0.477777779 0.309382677 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +48 0.533333361 0.100052871 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +24 0.266666681 0.171275109 0.8125 0.0217402168 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +54 0.6 0.070385024 0.625 0.1502415 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +26 0.2888889 0.160548389 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +53 0.5888889 0.121531889 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.06737298 1 0.1502415 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +54 0.6 0.145476714 0.875 0 0.4331956 0.444444448 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.0751442239 0.5625 0 0 0.4949495 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.214967281 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +60 0.6666667 0.107869916 0.8125 0 0 0.121212125 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +52 0.5777778 0.254626334 0.5625 0 0 0.454545468 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.119271509 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +56 0.622222245 0.0807507262 0.625 0 0.3838384 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +57 0.6333333 0.0860635638 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.201624572 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +30 0.333333343 0.0430125855 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 +29 0.322222233 0.075707294 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +49 0.544444442 0.05631422 0.8125 0.07688077 0 0.6666667 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.3049818 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +30 0.333333343 0.119128719 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried Black Female United-States 0 +45 0.5 0.06779192 0.5625 0 0.454545438 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +17 0.188888893 0.179250434 0.375 0 0 0.121212125 Private 10th Never-married Other-service Own-child White Male United-States 0 +54 0.6 0.132219538 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +31 0.344444454 0.05919762 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +54 0.6 0.12279477 1 0 0.453856736 0.5050505 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.09215231 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +26 0.2888889 0.122358315 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Own-child White Female ? 0 +37 0.411111116 0.121014617 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +34 0.377777785 0.0185181573 0.5625 0 0 0.4848485 Private HS-grad Divorced Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 1 +38 0.422222227 0.227870181 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Canada 0 +51 0.566666663 0.134496748 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.0650870055 0.5625 0 0 0.6060606 Private HS-grad Never-married Exec-managerial Not-in-family Asian-Pac-Islander Male United-States 0 +24 0.266666681 0.1111763 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +56 0.622222245 0.0739918053 0.8125 0.1502415 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.05549453 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Asian-Pac-Islander Male United-States 0 +31 0.344444454 0.141131073 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.141368821 0.625 0 0 0.5050505 Private Some-college Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +32 0.355555564 0.0377354436 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Sales Other-relative White Male United-States 0 +35 0.3888889 0.1420107 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male Puerto-Rico 0 +43 0.477777779 0.0789099559 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.130089149 0.5625 0 0 0.363636374 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +19 0.211111113 0.09266353 0.5625 0 0 0.535353541 Self-emp-not-inc HS-grad Never-married Other-service Own-child White Male United-States 0 +23 0.25555557 0.157679811 0.75 0 0 0.323232323 Private Assoc-acdm Never-married Handlers-cleaners Own-child White Male United-States 0 +40 0.444444448 0.104914449 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried White Male United-States 0 +59 0.655555546 0.07464109 0.5625 0 0 0.3838384 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 +43 0.477777779 0.2716203 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.09919075 0.375 0 0 0.6060606 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male ? 0 +53 0.5888889 0.08290671 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 +26 0.2888889 0.111586481 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +68 0.75555557 0.122671507 0.625 0.106051058 0 0.2020202 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.137680545 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.0623228177 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +25 0.2777778 0.105763771 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +20 0.222222224 0.154003 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +22 0.244444445 0.0991799757 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +33 0.366666675 0.108293571 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.109913416 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Other-relative White Male United-States 0 +29 0.322222233 0.09856706 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +20 0.222222224 0.1520915 0.5625 0 0 0.232323229 Private HS-grad Never-married Sales Own-child White Female United-States 0 +68 0.75555557 0.136524767 0.875 0 0.5456841 0.424242437 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 +58 0.644444466 0.251974642 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +32 0.355555564 0.06326509 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +23 0.25555557 0.277663231 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.287918478 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male Mexico 0 +67 0.7444445 0.107871935 0.625 0 0 0.08080808 State-gov Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +26 0.2888889 0.107498124 0.75 0 0 0.323232323 Private Assoc-acdm Never-married Adm-clerical Unmarried White Female United-States 0 +53 0.5888889 0.0680384338 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +27 0.3 0.11036671 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.143185347 0.625 0 0 0.656565666 Without-pay Some-college Married-civ-spouse Farming-fishing Own-child White Male United-States 0 +38 0.422222227 0.216839716 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.213983253 0.3125 0 0 0.4040404 Private 9th Never-married Other-service Own-child Black Female United-States 0 +48 0.533333361 0.1936277 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 +52 0.5777778 0.09133599 0.625 0 0 0.4040404 Private Some-college Widowed Other-service Unmarried Black Female ? 0 +28 0.311111122 0.113499992 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 0 +18 0.2 0.0597034432 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Male United-States 0 +28 0.311111122 0.152962372 0.625 0 0 0.3030303 Private Some-college Divorced Sales Not-in-family White Male United-States 0 +34 0.377777785 0.105939567 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.143679053 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.198630035 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +30 0.333333343 0.169333979 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +20 0.222222224 0.123656891 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +29 0.322222233 0.127678558 0.5625 0.0217402168 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +55 0.6111111 0.146697164 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +20 0.222222224 0.261436462 0.625 0 0 0.24242425 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +54 0.6 0.301443726 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +27 0.3 0.137467042 0.375 0 0 0.3030303 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 +43 0.477777779 0.1305862 0.625 0 0 0.5555556 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +17 0.188888893 0.0605305433 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 +48 0.533333361 0.0334039442 0.875 0 0 0.727272749 State-gov Masters Divorced Protective-serv Not-in-family White Male United-States 0 +34 0.377777785 0.154153854 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +66 0.733333349 0.07286633 0.3125 0 0 0.4040404 ? 9th Married-civ-spouse ? Husband Black Male United-States 0 +29 0.322222233 0.118560255 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +43 0.477777779 0.273033381 0.625 0 0 0.4040404 ? Some-college Separated ? Not-in-family Black Male United-States 0 +37 0.411111116 0.0266760066 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Unmarried White Female United-States 0 +56 0.622222245 0.120126896 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +58 0.644444466 0.1082114 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +54 0.6 0.132233679 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband Black Male Jamaica 0 +45 0.5 0.0138303572 0.625 0 0 0.414141417 Private Some-college Separated Craft-repair Not-in-family White Male United-States 0 +29 0.322222233 0.10562031 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +26 0.2888889 0.242642149 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 +43 0.477777779 0.165053666 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +33 0.366666675 0.284715146 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +45 0.5 0.0795316249 0.625 0.03103031 0 0.424242437 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +25 0.2777778 0.177124754 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +25 0.2777778 0.126339585 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +69 0.7666667 0.174662977 0.9375 0 0 0.05050505 ? Prof-school Divorced ? Not-in-family White Male United-States 0 +37 0.411111116 0.108385168 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 +20 0.222222224 0.130832046 0.5625 0 0 0.25252524 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +39 0.433333337 0.09050081 0.875 0 0.453856736 0.24242425 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +17 0.188888893 0.083070375 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Female United-States 0 +27 0.3 0.223781154 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +26 0.2888889 0.241208866 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative Black Female United-States 0 +55 0.6111111 0.140107974 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +39 0.433333337 0.2144884 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Prof-specialty Husband White Male United-States 0 +41 0.455555558 0.139946327 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +34 0.377777785 0.160554454 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +51 0.566666663 0.4538033 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +67 0.7444445 0.161449581 1 0 0 0.121212125 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Black Male ? 0 +40 0.444444448 0.09023611 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Own-child White Male United-States 0 +58 0.644444466 0.0931397155 0.75 0 0.399449021 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.102471538 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +45 0.5 0.193924055 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.195036724 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.0530509427 0.625 0 0 0.4040404 State-gov Some-college Divorced Exec-managerial Unmarried White Male United-States 0 +25 0.2777778 0.0667311 0.8125 0.02597026 0 0.5050505 State-gov Bachelors Never-married Other-service Not-in-family White Female United-States 0 +36 0.4 0.151468471 0.8125 0.02407024 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +58 0.644444466 0.139106423 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.0872422457 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +60 0.6666667 0.136372551 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +24 0.266666681 0.109322727 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Asian-Pac-Islander Male South 0 +45 0.5 0.0490629449 0.5625 0 0 0.464646459 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +49 0.544444442 0.139385939 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.0431816429 0.5 0 0 0.4040404 Private 12th Never-married Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.0135090807 0.625 0 0 0.3838384 State-gov Some-college Married-spouse-absent Adm-clerical Unmarried Asian-Pac-Islander Female Philippines 0 +42 0.466666669 0.150120065 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Adm-clerical Not-in-family White Male United-States 0 +25 0.2777778 0.08936658 0.5625 0 0 0.5050505 Private HS-grad Never-married Priv-house-serv Not-in-family White Female United-States 0 +73 0.811111152 0.119736247 0.5625 0 0 0.151515156 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +59 0.655555546 0.09703679 0.1875 0.0258002579 0 0.151515156 Self-emp-not-inc 5th-6th Married-civ-spouse Other-service Husband White Male El-Salvador 0 +28 0.311111122 0.09997205 0.5625 0.0288502872 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.11355859 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Other-relative White Male United-States 0 +31 0.344444454 0.05273169 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +58 0.644444466 0.1642946 0.8125 0 0 0.4848485 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +21 0.233333334 0.144836187 0.5625 0 0 0.13131313 Private HS-grad Never-married Craft-repair Own-child White Male ? 0 +47 0.5222222 0.125057176 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.08159331 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +41 0.455555558 0.11709936 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male China 0 +59 0.655555546 0.05876386 0.375 0 0 0.4040404 ? 10th Divorced ? Not-in-family White Female England 0 +43 0.477777779 0.225627989 0.625 0.049340494 0 0.5151515 Private Some-college Separated Transport-moving Unmarried White Male United-States 1 +48 0.533333361 0.06295931 0.5625 0 0.459366381 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 +44 0.4888889 0.117385611 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +44 0.4888889 0.086667724 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 +24 0.266666681 0.138643026 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child Black Female United-States 0 +28 0.311111122 0.04211948 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.162060484 0.5625 0 0 0.1010101 Private HS-grad Married-spouse-absent Exec-managerial Unmarried White Female United-States 0 +33 0.366666675 0.119210213 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.1711633 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Other-relative White Female United-States 0 +30 0.333333343 0.09344887 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 +46 0.51111114 0.08652224 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +21 0.233333334 0.03810993 0.625 0 0 0.1010101 State-gov Some-college Never-married Tech-support Own-child White Male United-States 0 +52 0.5777778 0.1035566 0.3125 0 0 0.3030303 Private 9th Separated Other-service Not-in-family Black Female United-States 0 +26 0.2888889 0.19151482 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.21060884 0.8125 0 0 0.121212125 State-gov Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +28 0.311111122 0.07511257 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Unmarried White Female Nicaragua 0 +50 0.5555556 0.20539771 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.1943807 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +61 0.677777767 0.07906419 0.4375 0 0 0.2020202 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.155238926 0.25 0 0 0.353535354 Private 7th-8th Separated Sales Unmarried White Female United-States 0 +30 0.333333343 0.2150461 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +51 0.566666663 0.1255576 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.09926012 0.625 0 0.5610652 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 1 +36 0.4 0.0982909054 0.5625 0 0.518365443 0.7070707 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +28 0.311111122 0.07419925 0.625 0 0 0.24242425 Private Some-college Divorced Other-service Other-relative Black Male United-States 0 +49 0.544444442 0.151851043 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +61 0.677777767 0.148407936 0.25 0 0 0.3030303 Self-emp-not-inc 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +41 0.455555558 0.09699031 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.1517911 0.5625 0 0 0.3030303 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +36 0.4 0.126613036 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +21 0.233333334 0.06061204 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +57 0.6333333 0.1521602 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +49 0.544444442 0.154735789 0.9375 1 0 0.373737365 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +59 0.655555546 0.09804911 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +41 0.455555558 0.184792936 0.625 0 0 0.8080808 Private Some-college Separated Sales Not-in-family White Male United-States 1 +59 0.655555546 0.246102765 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.179474711 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +42 0.466666669 0.123515449 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 +41 0.455555558 0.07597267 0.875 0 0 0.6060606 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +45 0.5 0.05119401 0.8125 0 0 0.5050505 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.105596736 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Other-relative Asian-Pac-Islander Female ? 0 +42 0.466666669 0.125889659 0.75 0 0 0.454545468 Local-gov Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 +25 0.2777778 0.01717311 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +45 0.5 0.06921981 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +58 0.644444466 0.167603 0.5625 0.1502415 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.0208229925 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.0830265954 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.141553372 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.149926081 0.5625 0 0 0.5050505 Private HS-grad Divorced Tech-support Not-in-family White Male United-States 1 +53 0.5888889 0.126669616 0.625 0 0 0.4040404 Self-emp-inc Some-college Widowed Sales Unmarried White Female United-States 0 +22 0.244444445 0.08054934 0.75 0 0.6483012 0.4040404 Private Assoc-acdm Never-married Handlers-cleaners Not-in-family Black Male ? 1 +27 0.3 0.1685951 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Protective-serv Husband White Male Guatemala 0 +60 0.6666667 0.138703644 0.5625 0 0 0.25252524 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.125393257 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +56 0.622222245 0.06628792 0.9375 1 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.2222529 0.8125 0.2782828 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +56 0.622222245 0.09944939 0.5625 0 0 0.323232323 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +35 0.3888889 0.1319764 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband Asian-Pac-Islander Male Philippines 1 +29 0.322222233 0.113302648 0.8125 0 0.399449021 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +19 0.211111113 0.102243207 0.375 0 0 0.3939394 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 +38 0.422222227 0.119319327 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +40 0.444444448 0.04976275 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +52 0.5777778 0.11834944 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.0293223243 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +32 0.355555564 0.07039042 0.5625 0 0 0.25252524 State-gov HS-grad Divorced Other-service Not-in-family White Female United-States 0 +27 0.3 0.0796319842 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +25 0.2777778 0.102408223 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female Guatemala 0 +36 0.4 0.03524404 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Other Male Iran 1 +22 0.244444445 0.147427276 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 +32 0.355555564 0.0566570461 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.127751976 0.8125 0 0 0.4040404 Private Bachelors Separated Exec-managerial Unmarried Black Female United-States 0 +22 0.244444445 0.150193483 0.5625 0 0 0.545454562 Private HS-grad Never-married Prof-specialty Own-child White Male United-States 0 +29 0.322222233 0.03194507 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +42 0.466666669 0.09765913 0.0625 0 0 0.25252524 Private Preschool Never-married Handlers-cleaners Not-in-family White Male United-States 0 +45 0.5 0.1266036 0.6875 0 0 0.3838384 Private Assoc-voc Never-married Sales Not-in-family White Female United-States 0 +33 0.366666675 0.194246 0.8125 0 0 0.454545468 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.07718099 0.625 0 0 0.4040404 Private Some-college Separated Prof-specialty Unmarried White Female United-States 0 +27 0.3 0.112976655 0.5 0 0 0.454545468 Private 12th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +53 0.5888889 0.167598277 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +30 0.333333343 0.111595236 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +52 0.5777778 0.027076086 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Widowed Craft-repair Not-in-family Black Male United-States 0 +43 0.477777779 0.0789099559 0.8125 0.1502415 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.145925954 0.875 0 0 0.353535354 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +61 0.677777767 0.08368127 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband Black Male India 0 +39 0.433333337 0.1610549 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family Black Male Dominican-Republic 0 +47 0.5222222 0.128020048 0.625 0 0 0.5050505 Private Some-college Divorced Sales Unmarried White Male United-States 0 +19 0.211111113 0.254672825 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.159620941 0.625 0.0346403457 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.0685395449 0.5625 0 0 0.5151515 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +69 0.7666667 0.02542256 0.6875 0 0 0.08080808 Self-emp-not-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.285911351 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Male United-States 0 +29 0.322222233 0.08785449 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +24 0.266666681 0.06776094 0.625 0 0 0.141414136 Private Some-college Never-married Machine-op-inspct Own-child Other Male United-States 0 +42 0.466666669 0.148700252 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Unmarried White Male Poland 0 +30 0.333333343 0.104364172 0.8125 0 0 0.727272749 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +28 0.311111122 0.129509225 0.875 0 0 0.8080808 Private Masters Married-spouse-absent Sales Not-in-family White Female United-States 1 +27 0.3 0.141957492 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Handlers-cleaners Not-in-family White Male United-States 0 +53 0.5888889 0.09933017 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family Black Female United-States 0 +35 0.3888889 0.130154476 0.5625 0 0.379017442 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.07345095 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 +25 0.2777778 0.178902879 0.5625 0 0 0.4040404 Private HS-grad Separated Protective-serv Own-child Black Male United-States 0 +38 0.422222227 0.1164238 0.8125 0 0.4331956 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife Black Female United-States 1 +27 0.3 0.0463715 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Unmarried White Female United-States 0 +30 0.333333343 0.154273748 0.3125 0 0 0.373737365 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 +27 0.3 0.07142092 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Own-child White Female United-States 0 +25 0.2777778 0.07599826 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +36 0.4 0.1383413 0.5625 0 0 0.04040404 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +32 0.355555564 0.190879673 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +70 0.7777778 0.131836966 0.375 0 0 0.454545468 Private 10th Widowed Craft-repair Unmarried White Male United-States 0 +50 0.5555556 0.0245705377 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +40 0.444444448 0.204276949 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +34 0.377777785 0.197951779 0.4375 0 0 0.5555556 Private 11th Married-spouse-absent Craft-repair Not-in-family Black Male United-States 0 +57 0.6333333 0.111754186 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.04427681 0.875 0 0 0.323232323 Private Masters Never-married Other-service Not-in-family White Female United-States 0 +49 0.544444442 0.117915682 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +43 0.477777779 0.228876442 0.625 0.05178052 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.101119079 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.2541744 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female Japan 0 +60 0.6666667 0.111909777 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.07420397 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.06363352 0.625 0.07298073 0 0.5555556 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +27 0.3 0.130829364 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Own-child White Female United-States 0 +31 0.344444454 0.07162837 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +59 0.655555546 0.14471899 0.5625 0 0 0.5050505 Private HS-grad Widowed Exec-managerial Unmarried White Female United-States 0 +19 0.211111113 0.1250208 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 +18 0.2 0.0649590343 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Female United-States 0 +22 0.244444445 0.06912619 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +24 0.266666681 0.14079161 0.75 0 0 0.2020202 Private Assoc-acdm Married-civ-spouse Sales Own-child White Female United-States 0 +53 0.5888889 0.103378117 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 +43 0.477777779 0.0972388461 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +24 0.266666681 0.125420883 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +60 0.6666667 0.126783431 0.375 0 0 0.4040404 Private 10th Widowed Tech-support Unmarried White Female United-States 0 +24 0.266666681 0.2818102 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.08472794 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family Black Male United-States 0 +32 0.355555564 0.123461567 0.6875 0 0 1 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 +34 0.377777785 0.221988216 0.375 0 0 0.353535354 Private 10th Separated Other-service Not-in-family White Female United-States 0 +35 0.3888889 0.122967191 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 +38 0.422222227 0.300836861 0.3125 0 0 0.4040404 Private 9th Married-spouse-absent Handlers-cleaners Not-in-family White Male Mexico 0 +34 0.377777785 0.171282515 0.5625 0.04508045 0 0.909090936 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +53 0.5888889 0.08840679 0.9375 0 0 0.5050505 Local-gov Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 +23 0.25555557 0.06979973 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.162924618 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +40 0.444444448 0.1649789 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.01400615 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +17 0.188888893 0.233933344 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Female United-States 0 +53 0.5888889 0.07004422 0.8125 0 0.430670351 0.545454562 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +32 0.355555564 0.0358360745 0.8125 0 0 0.5050505 Private Bachelors Divorced Craft-repair Not-in-family White Male United-States 1 +43 0.477777779 0.261222929 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Other-relative White Female United-States 0 +18 0.2 0.0384642072 0.4375 0 0 0.161616161 Private 11th Never-married Sales Own-child White Male United-States 0 +62 0.6888889 0.119748369 0.375 0 0 0.4040404 Private 10th Divorced Other-service Own-child White Female United-States 0 +45 0.5 0.022761425 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Other-service Husband White Male United-States 0 +46 0.51111114 0.168339849 1 0 0 0.7070707 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +73 0.811111152 0.162403315 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +64 0.7111111 0.06640107 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.122529395 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +23 0.25555557 0.2926285 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +30 0.333333343 0.07635456 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male Vietnam 0 +51 0.566666663 0.1681856 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +35 0.3888889 0.06429224 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +39 0.433333337 0.141352668 0.625 0.135501355 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 1 +35 0.3888889 0.0536039174 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +41 0.455555558 0.195102066 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 +31 0.344444454 0.233828276 0.625 0.046500463 0 0.4040404 Private Some-college Divorced Craft-repair Own-child White Male United-States 0 +40 0.444444448 0.03625973 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +46 0.51111114 0.0100208465 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 +31 0.344444454 0.17924504 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +41 0.455555558 0.0987798944 0.625 0 0 0.4040404 Self-emp-inc Some-college Divorced Machine-op-inspct Not-in-family White Female Honduras 0 +42 0.466666669 0.0843804 0.8125 0.031370312 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.11688181 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +21 0.233333334 0.052310057 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Male United-States 0 +49 0.544444442 0.188943267 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +53 0.5888889 0.3230413 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Not-in-family Black Male United-States 0 +38 0.422222227 0.131090015 0.8125 0.04787048 0 0.434343427 Local-gov Bachelors Never-married Protective-serv Not-in-family White Female United-States 1 +36 0.4 0.166767135 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Unmarried Asian-Pac-Islander Female Taiwan 0 +32 0.355555564 0.174045354 0.625 0 0 0.727272749 Private Some-college Never-married Craft-repair Unmarried White Male Mexico 0 +20 0.222222224 0.0725706443 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Other-relative White Male Guatemala 0 +17 0.188888893 0.03193025 0.4375 0 0 0.1010101 ? 11th Never-married ? Own-child White Male United-States 0 +22 0.244444445 0.154904172 0.625 0 0 0.323232323 Private Some-college Never-married Tech-support Other-relative Asian-Pac-Islander Female United-States 0 +25 0.2777778 0.210370421 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Unmarried Amer-Indian-Eskimo Male United-States 0 +58 0.644444466 0.151810631 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.251711965 0.625 0 0 0.2020202 Private Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 +48 0.533333361 0.080912374 0.5625 0.0861408561 0 0.4040404 State-gov HS-grad Divorced Craft-repair Own-child White Male United-States 1 +20 0.222222224 0.3184397 0.125 0 0 0.3030303 Private 1st-4th Never-married Farming-fishing Not-in-family White Male El-Salvador 0 +60 0.6666667 0.0187821835 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.09318484 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 +52 0.5777778 0.08285215 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.206483454 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Wife White Female United-States 1 +46 0.51111114 0.126455426 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 +22 0.244444445 0.175519049 0.4375 0 0 0.25252524 Private 11th Never-married Sales Unmarried White Female United-States 0 +19 0.211111113 0.159546182 0.625 0 0 0.353535354 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +37 0.411111116 0.125821635 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Male United-States 0 +30 0.333333343 0.251371831 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Not-in-family White Female United-States 1 +44 0.4888889 0.1263746 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 +63 0.7 0.07183111 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +22 0.244444445 0.205954045 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Male Canada 0 +31 0.344444454 0.172668651 0.8125 0.03908039 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +17 0.188888893 0.161612585 0.4375 0 0 0.4040404 Private 11th Never-married Adm-clerical Own-child White Male United-States 0 +21 0.233333334 0.23509115 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +67 0.7444445 0.07089085 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.123064853 0.25 0 0 0.4040404 Private 7th-8th Divorced Exec-managerial Not-in-family White Male United-States 0 +29 0.322222233 0.11194817 0.5625 0 0 0.5050505 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 +20 0.222222224 0.0762441 0.625 0 0 0.0606060624 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 +27 0.3 0.09569241 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Male United-States 0 +35 0.3888889 0.306352437 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.0957894 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +36 0.4 0.07578071 0.5 0 0 0.4040404 Private 12th Separated Other-service Unmarried White Female Mexico 0 +43 0.477777779 0.143391445 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.178622022 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +28 0.311111122 0.169666708 0.9375 0 0.5369605 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Male Canada 0 +18 0.2 0.114923172 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Female United-States 0 +59 0.655555546 0.23845613 0.9375 0.1502415 0 0.5050505 Private Prof-school Married-civ-spouse Transport-moving Husband Black Male United-States 1 +37 0.411111116 0.174505383 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +27 0.3 0.01472077 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 +46 0.51111114 0.1400588 0.875 0 0 0.434343427 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +29 0.322222233 0.05186822 0.4375 0 0.6322314 0.424242437 Private 11th Separated Sales Not-in-family White Female United-States 0 +33 0.366666675 0.0246102773 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +62 0.6888889 0.119088307 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.3071735 1 0 0.5544077 0.5555556 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.1870715 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +22 0.244444445 0.194066837 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 +46 0.51111114 0.231975377 0.875 0 0.4331956 0.4040404 Federal-gov Masters Married-civ-spouse Armed-Forces Husband White Male United-States 1 +54 0.6 0.1393974 0.625 0 0.453856736 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +34 0.377777785 0.133421123 0.5625 0 0 0.727272749 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +67 0.7444445 0.101207986 1 0 0 0.2020202 ? Doctorate Married-civ-spouse ? Husband White Male Canada 1 +62 0.6888889 0.396364272 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.07635456 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male Poland 0 +19 0.211111113 0.182225436 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +49 0.544444442 0.02120152 0.25 0 0 1 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +27 0.3 0.128325164 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Machine-op-inspct Unmarried White Male United-States 0 +36 0.4 0.103095233 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +52 0.5777778 0.101294875 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +47 0.5222222 0.0672935 0.5 0 0 0.5555556 Private 12th Married-spouse-absent Exec-managerial Not-in-family White Female United-States 0 +57 0.6333333 0.2313234 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Protective-serv Not-in-family White Female United-States 0 +64 0.7111111 0.11415197 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Exec-managerial Unmarried White Female United-States 0 +56 0.622222245 0.022128975 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Male United-States 0 +53 0.5888889 0.131003127 0.4375 0 0 0.474747479 Private 11th Widowed Other-service Own-child White Female United-States 0 +53 0.5888889 0.119690448 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.08350682 0.625 0 0 0.4040404 Private Some-college Separated Sales Unmarried Asian-Pac-Islander Male South 0 +41 0.455555558 0.09360445 0.8125 0.07688077 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.1585709 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Other-service Unmarried Black Female United-States 0 +63 0.7 0.0559323244 0.8125 0 0.500229537 0.454545468 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +45 0.5 0.08769823 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Other-relative White Female United-States 0 +23 0.25555557 0.141477942 0.625 0 0 0.282828271 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +39 0.433333337 0.167974114 0.875 0 0 0.727272749 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +31 0.344444454 0.0588790365 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.128232211 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +54 0.6 0.118703716 0.875 0.07688077 0 0.6060606 Private Masters Married-civ-spouse Transport-moving Husband White Male United-States 1 +22 0.244444445 0.142124534 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female Mexico 0 +40 0.444444448 0.0713017061 0.8125 0.0545505434 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +55 0.6111111 0.124735221 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.116854869 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.05296271 0.4375 0 0 0.6060606 Self-emp-inc 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.09920085 1 0 0.453856736 1 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.05561509 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Widowed Other-service Other-relative White Female United-States 0 +38 0.422222227 0.104156047 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.0264268 0.625 0.005940059 0 0.25252524 Local-gov Some-college Never-married Prof-specialty Own-child White Female United-States 0 +17 0.188888893 0.0436349325 0.375 0 0 0.3030303 ? 10th Never-married ? Own-child White Male United-States 0 +48 0.533333361 0.120789655 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male England 0 +73 0.811111152 0.11655312 0.8125 0 0 0.151515156 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +25 0.2777778 0.177821189 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +53 0.5888889 0.1534554 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Farming-fishing Not-in-family White Male United-States 0 +46 0.51111114 0.216424823 0.625 0.07298073 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +45 0.5 0.07280908 0.8125 1 0 0.25252524 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female ? 1 +37 0.411111116 0.0986041054 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 +30 0.333333343 0.218306 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +29 0.322222233 0.247408748 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +29 0.322222233 0.203125879 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +75 0.8333334 0.150056079 0.8125 0 0 0.0606060624 ? Bachelors Widowed ? Not-in-family White Female United-States 0 +58 0.644444466 0.114573605 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.05542987 0.25 0 0 0.5050505 Self-emp-not-inc 7th-8th Married-civ-spouse Other-service Wife Black Female United-States 0 +62 0.6888889 0.121345319 0.3125 0 0 0.24242425 Local-gov 9th Divorced Protective-serv Not-in-family Black Male United-States 0 +45 0.5 0.234505847 0.8125 0.07298073 0 0.4040404 Local-gov Bachelors Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male United-States 1 +38 0.422222227 0.545283437 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.0456171446 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +70 0.7777778 0.109824516 0.5625 0.0200902 0 0.4040404 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +42 0.466666669 0.06874699 0.25 0 0 0.3030303 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 +47 0.5222222 0.100828111 0.875 0.1502415 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.07359914 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Unmarried White Male United-States 0 +43 0.477777779 0.2649375 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 1 +37 0.411111116 0.152856633 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.0584661625 0.625 0.07298073 0 0.3939394 State-gov Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +27 0.3 0.332516581 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family Black Female France 0 +54 0.6 0.201605037 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Machine-op-inspct Unmarried White Male Mexico 0 +48 0.533333361 0.237765759 0.5625 0 0.43663913 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.117477208 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +29 0.322222233 0.141086623 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.198778212 0.625 0 0 0.474747479 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +55 0.6111111 0.12276715 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +67 0.7444445 0.153700575 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Priv-house-serv Wife Black Female United-States 0 +51 0.566666663 0.17770265 0.5625 0 0 0.3030303 Private HS-grad Widowed Handlers-cleaners Not-in-family White Male United-States 0 +35 0.3888889 0.120527647 0.875 0 0 0.323232323 Private Masters Never-married Prof-specialty Unmarried White Female United-States 0 +41 0.455555558 0.0295984726 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male ? 0 +64 0.7111111 0.170603588 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Widowed Other-service Other-relative White Female United-States 0 +23 0.25555557 0.161740556 0.1875 0 0 0.5555556 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 +49 0.544444442 0.0166443847 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Not-in-family Asian-Pac-Islander Female Philippines 0 +38 0.422222227 0.230776489 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +62 0.6888889 0.0777171254 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative Black Female United-States 0 +62 0.6888889 0.123255461 0.25 0 0 0.1010101 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +70 0.7777778 0.08974712 0.5625 0 0 0.141414136 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +45 0.5 0.1662896 0.875 0 0 0.4040404 Self-emp-not-inc Masters Divorced Craft-repair Not-in-family White Male United-States 0 +20 0.222222224 0.0202296078 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 +38 0.422222227 0.118024796 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +50 0.5555556 0.09464237 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +40 0.444444448 0.04376627 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +30 0.333333343 0.104923874 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.1293624 0.625 0 0 0.4040404 Federal-gov Some-college Separated Exec-managerial Not-in-family White Female United-States 0 +28 0.311111122 0.15349178 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 1 +62 0.6888889 0.109280296 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.111772373 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +40 0.444444448 0.299980134 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.142754287 0.5625 0 0.365013778 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +53 0.5888889 0.110242777 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.0602227375 0.5 0 0 0.4040404 Private 12th Never-married Farming-fishing Own-child White Male United-States 0 +26 0.2888889 0.195122942 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +51 0.566666663 0.110342458 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +49 0.544444442 0.124863192 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.113848209 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +42 0.466666669 0.03678239 0.625 0 0 0.4040404 Private Some-college Divorced Farming-fishing Not-in-family White Male United-States 0 +31 0.344444454 0.0879770741 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Sales Own-child Asian-Pac-Islander Female India 0 +26 0.2888889 0.221365869 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Other Male United-States 0 +50 0.5555556 0.114262432 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Unmarried Asian-Pac-Islander Female Philippines 0 +35 0.3888889 0.125826344 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.06999707 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Other-relative White Female United-States 0 +53 0.5888889 0.101294875 0.5625 0 0.3452709 0.353535354 ? HS-grad Never-married ? Not-in-family White Male United-States 0 +20 0.222222224 0.055753164 0.625 0 0 0.161616161 Private Some-college Never-married Sales Own-child White Male United-States 0 +31 0.344444454 0.120191559 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.0348028727 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +46 0.51111114 0.256052226 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband Black Male United-States 1 +21 0.233333334 0.14286609 0.625 0 0 0.08080808 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +41 0.455555558 0.0678922758 0.875 0.07298073 0 0.7070707 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.109497845 0.8125 0 0 0.7070707 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +66 0.733333349 0.121203206 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.128482759 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +74 0.822222233 0.15896222 0.25 0 0 0.2020202 State-gov 7th-8th Widowed Handlers-cleaners Not-in-family White Female United-States 0 +46 0.51111114 0.110475145 0.625 0 0 0.7070707 State-gov Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 1 +51 0.566666663 0.115878917 0.875 0 0.453856736 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.123206973 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.101704381 0.1875 0.0346403457 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +47 0.5222222 0.24438189 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.06592757 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +53 0.5888889 0.0619052276 0.5625 0 0 0.4848485 Private HS-grad Divorced Craft-repair Unmarried Black Female United-States 0 +24 0.266666681 0.187330142 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Not-in-family White Male United-States 0 +54 0.6 0.09854483 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.255547076 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +45 0.5 0.0255855545 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.173037067 0.5625 0.0332503319 0 0.454545468 Self-emp-inc HS-grad Married-spouse-absent Farming-fishing Not-in-family White Male United-States 0 +37 0.411111116 0.325268 0.625 0 0 0.656565666 State-gov Some-college Divorced Other-service Not-in-family White Male United-States 0 +48 0.533333361 0.0299278311 0.875 0 0 0.616161644 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.172070548 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.204534918 0.5625 0.03103031 0 0.2020202 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +44 0.4888889 0.131667912 0.5 0 0 0.363636374 ? 12th Separated ? Not-in-family White Female Puerto-Rico 0 +58 0.644444466 0.0770267546 0.625 0 0 0.3030303 ? Some-college Married-civ-spouse ? Husband Black Male United-States 0 +27 0.3 0.230014727 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +69 0.7666667 0.13274017 0.5625 0 0 0.08080808 Private HS-grad Widowed Adm-clerical Unmarried White Male United-States 0 +38 0.422222227 0.06933701 0.8125 0 0 0.5252525 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.339093626 0.5 0 0 0.4040404 Private 12th Never-married Adm-clerical Other-relative Black Female United-States 0 +30 0.333333343 0.0589753538 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +46 0.51111114 0.182321072 0.5625 0.0367403664 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +27 0.3 0.170278281 0.9375 0 0 0.454545468 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 +19 0.211111113 0.386791319 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 +18 0.2 0.123941123 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Priv-house-serv Not-in-family White Female United-States 0 +24 0.266666681 0.158328429 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 +32 0.355555564 0.106581442 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.201932371 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +19 0.211111113 0.187037155 0.0625 0 0 0.363636374 Private Preschool Never-married Farming-fishing Not-in-family White Male Hong 0 +28 0.311111122 0.0157095175 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +39 0.433333337 0.2132289 0.875 0 0 0.5555556 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.11898458 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Separated Sales Not-in-family Asian-Pac-Islander Male Japan 0 +42 0.466666669 0.06315733 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 +31 0.344444454 0.08390152 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +46 0.51111114 0.07901435 0.3125 0 0 0.4040404 Private 9th Separated Machine-op-inspct Not-in-family White Female Ireland 0 +53 0.5888889 0.03624424 0.625 0 0 0.545454562 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 0 +21 0.233333334 0.114807993 0.75 0 0 0.151515156 Private Assoc-acdm Never-married Handlers-cleaners Own-child White Male United-States 0 +48 0.533333361 0.07811047 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.0211705361 0.5625 0.03103031 0 0.5252525 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +30 0.333333343 0.07569382 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.190672219 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative Black Male Jamaica 0 +32 0.355555564 0.018324852 0.375 0 0 0.5050505 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.0314621441 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +57 0.6333333 0.0131473932 1 0 0 0.5050505 State-gov Doctorate Divorced Prof-specialty Unmarried White Female United-States 0 +56 0.622222245 0.0664307 0.25 0 0 0.4040404 Private 7th-8th Never-married Adm-clerical Not-in-family White Male United-States 0 +27 0.3 0.107696146 0.5625 0 0 0.373737365 Private HS-grad Never-married Exec-managerial Not-in-family Black Female United-States 0 +38 0.422222227 0.09202434 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male Iran 0 +19 0.211111113 0.274639755 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +61 0.677777767 0.149446532 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +49 0.544444442 0.100003034 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Unmarried White Female United-States 0 +28 0.311111122 0.185197741 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.107837588 0.875 0 0 0.5555556 Self-emp-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.112658747 0.8125 0 0 0.8484849 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.09983532 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +28 0.311111122 0.103636079 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.140688553 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.1730667 0.5625 0 0 0.444444448 Private HS-grad Widowed Machine-op-inspct Unmarried Black Female United-States 0 +26 0.2888889 0.06745246 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +51 0.566666663 0.112117223 1 0 0 0.4040404 Local-gov Doctorate Married-civ-spouse Prof-specialty Wife Black Female United-States 1 +35 0.3888889 0.115394644 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.200265378 0.75 0 0 0.3131313 Private Assoc-acdm Married-spouse-absent Exec-managerial Unmarried Asian-Pac-Islander Female Laos 0 +63 0.7 0.08969189 1 0 0 0.121212125 ? Doctorate Married-civ-spouse ? Husband White Male United-States 0 +31 0.344444454 0.114224039 0.875 0 0 0.3030303 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +22 0.244444445 0.1843693 0.5625 0 0 0.2020202 Local-gov HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +67 0.7444445 0.106621183 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +50 0.5555556 0.173177168 0.3125 0 0 0.5050505 ? 9th Married-civ-spouse ? Husband White Male United-States 0 +63 0.7 0.132501066 0.5625 0 0 0.24242425 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +31 0.344444454 0.09257328 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +17 0.188888893 0.193277463 0.4375 0 0 0.4040404 Private 11th Never-married Prof-specialty Own-child White Male United-States 0 +41 0.455555558 0.135673419 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +53 0.5888889 0.1461105 0.25 0 0 0.3838384 Local-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +44 0.4888889 0.143237218 0.625 0 0 1 Local-gov Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 0 +24 0.266666681 0.311725229 0.8125 0 0 0.4040404 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 +35 0.3888889 0.133926272 0.6875 0 0 0.353535354 Private Assoc-voc Divorced Tech-support Own-child White Male United-States 0 +61 0.677777767 0.148100808 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 1 +31 0.344444454 0.109788142 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Other-relative Asian-Pac-Islander Female Philippines 0 +44 0.4888889 0.07561233 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +56 0.622222245 0.143533573 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +66 0.733333349 0.20345591 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +45 0.5 0.227725372 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Vietnam 0 +69 0.7666667 0.0392084643 0.8125 0.200512 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +64 0.7111111 0.0846525058 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.14509213 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +43 0.477777779 0.278681636 0.625 0 0 0.4040404 Local-gov Some-college Separated Craft-repair Not-in-family Black Male United-States 0 +37 0.411111116 0.138302892 0.5625 0 0 0.4949495 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +19 0.211111113 0.159338057 0.5625 0 0 0.161616161 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +59 0.655555546 0.166734815 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +50 0.5555556 0.123935059 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +33 0.366666675 0.229801208 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.148303539 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +28 0.311111122 0.1335336 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +27 0.3 0.11842151 0.5625 0 0 0.343434334 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +42 0.466666669 0.06215915 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband Asian-Pac-Islander Male ? 0 +34 0.377777785 0.176074043 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +19 0.211111113 0.136942357 0.4375 0 0 0.3030303 Private 11th Never-married Sales Own-child White Male United-States 0 +68 0.75555557 0.11186263 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.073415935 0.875 0 0 0.3838384 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +81 0.900000036 0.07190991 0.625 0 0 0.04040404 ? Some-college Widowed ? Unmarried White Female United-States 0 +22 0.244444445 0.132946953 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +58 0.644444466 0.191845521 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.05895784 0.625 0 0 0.25252524 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 +17 0.188888893 0.1182639 0.4375 0 0 0.3030303 Local-gov 11th Never-married Protective-serv Own-child White Male United-States 0 +25 0.2777778 0.163466826 0.625 0.105201051 0 0.5050505 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 1 +23 0.25555557 0.108761005 0.625 0 0 0.232323229 Private Some-college Never-married Other-service Own-child Asian-Pac-Islander Female United-States 0 +25 0.2777778 0.03468568 0.5 0 0 0.4040404 Private 12th Never-married Other-service Other-relative White Male United-States 0 +47 0.5222222 0.1482611 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +39 0.433333337 0.126963273 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +44 0.4888889 0.07632762 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.140682489 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.02302141 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +23 0.25555557 0.196687564 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +34 0.377777785 0.09504784 0.8125 0 0 0.353535354 Private Bachelors Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.234788731 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 +38 0.422222227 0.124740608 0.5625 0 0 0.2020202 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 +52 0.5777778 0.111320436 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +50 0.5555556 0.07875841 0.5625 0 0 0.333333343 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +38 0.422222227 0.16003719 0.8125 0 0.5610652 0.454545468 Private Bachelors Never-married Sales Not-in-family White Female United-States 1 +35 0.3888889 0.057106968 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 +67 0.7444445 0.146757782 1 0.106051058 0 0.353535354 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +60 0.6666667 0.219552711 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +44 0.4888889 0.139339462 0.5625 0 0 0.151515156 Private HS-grad Never-married Sales Other-relative White Female United-States 0 +38 0.422222227 0.08605885 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Farming-fishing Own-child White Male United-States 0 +29 0.322222233 0.1404838 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +65 0.722222269 0.231798247 0.875 0.0555605553 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.0274000559 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.06405852 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 +18 0.2 0.1889958 0.4375 0 0 0.3030303 Private 11th Never-married Sales Own-child White Female United-States 0 +43 0.477777779 0.126918152 0.9375 0 0 0.4040404 Private Prof-school Divorced Exec-managerial Not-in-family White Male United-States 0 +42 0.466666669 0.0904018 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Own-child Amer-Indian-Eskimo Female United-States 0 +42 0.466666669 0.119881727 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.110587627 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +36 0.4 0.0612222627 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 +41 0.455555558 0.0223115031 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +30 0.333333343 0.182451069 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +21 0.233333334 0.145570338 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +33 0.366666675 0.127545878 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 1 +19 0.211111113 0.0952499 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child White Male United-States 0 +19 0.211111113 0.2062531 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +35 0.3888889 0.2227136 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +43 0.477777779 0.129160345 0.5625 0 0 0.353535354 Private HS-grad Divorced Tech-support Unmarried Black Female United-States 0 +45 0.5 0.194889218 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +25 0.2777778 0.0357963368 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Own-child Black Male United-States 0 +39 0.433333337 0.0824089646 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.127141088 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +60 0.6666667 0.1613627 0.875 0 0 0.1010101 Private Masters Married-civ-spouse Transport-moving Husband White Male United-States 0 +52 0.5777778 0.104492813 1 0 0 0.4040404 Local-gov Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 +22 0.244444445 0.0434564464 0.5 0 0 0.3030303 Private 12th Never-married Transport-moving Unmarried White Male United-States 0 +23 0.25555557 0.322619 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +46 0.51111114 0.104838334 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +34 0.377777785 0.0835533 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.165051654 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.123650827 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 +56 0.622222245 0.217982024 0.875 0 0 0.25252524 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +55 0.6111111 0.125810176 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +40 0.444444448 0.191487879 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +23 0.25555557 0.125725985 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +39 0.433333337 0.134809941 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Male United-States 0 +24 0.266666681 0.121863268 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 0 +51 0.566666663 0.12337333 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.080912374 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Cuba 1 +25 0.2777778 0.177341625 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +34 0.377777785 0.15251717 0.9375 0 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.272692561 0.4375 0 0.3677686 0.2020202 Private 11th Never-married Sales Own-child Black Female United-States 0 +19 0.211111113 0.140435979 0.625 0 0 0.282828271 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +32 0.355555564 0.0314850435 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 +49 0.544444442 0.165812746 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.111341313 0.25 0 0 0.08080808 ? 7th-8th Separated ? Not-in-family White Female United-States 0 +43 0.477777779 0.08267569 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +71 0.788888931 0.026147956 0.875 1 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +59 0.655555546 0.113128871 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 +32 0.355555564 0.184037238 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +25 0.2777778 0.080984436 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +32 0.355555564 0.113147058 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male Ireland 0 +17 0.188888893 0.151886746 0.4375 0 0 0.151515156 Private 11th Never-married Handlers-cleaners Not-in-family Black Female United-States 0 +57 0.6333333 0.0841918141 0.9375 0 0 0.353535354 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.117275827 0.5 0 0 0.151515156 Self-emp-not-inc 12th Never-married Handlers-cleaners Own-child White Male United-States 0 +27 0.3 0.155558854 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child Asian-Pac-Islander Female Philippines 0 +41 0.455555558 0.08899074 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +62 0.6888889 0.0461108461 1 0 0 0.4040404 ? Doctorate Married-civ-spouse ? Husband Amer-Indian-Eskimo Male United-States 1 +19 0.211111113 0.153012216 0.4375 0 0 0.25252524 Private 11th Never-married Sales Not-in-family White Female United-States 0 +41 0.455555558 0.111670673 0.1875 0 0 0.4040404 Private 5th-6th Divorced Other-service Unmarried White Female Puerto-Rico 0 +39 0.433333337 0.0872718841 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +30 0.333333343 0.151125655 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +37 0.411111116 0.120886646 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +18 0.2 0.292494476 0.4375 0 0 0.151515156 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.117003717 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.164883256 0.625 0 0.3409091 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male Cuba 1 +24 0.266666681 0.07693785 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Other-relative White Male United-States 0 +33 0.366666675 0.1270697 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.1455461 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +51 0.566666663 0.08416689 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +48 0.533333361 0.057480108 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.130322188 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.0539218225 0.9375 0 0 0.5050505 Private Prof-school Never-married Exec-managerial Own-child White Male United-States 0 +41 0.455555558 0.09423219 0.6875 0 0 0.3030303 Private Assoc-voc Separated Craft-repair Not-in-family White Male United-States 0 +51 0.566666663 0.0366012119 0.9375 0.2782828 0 0.6060606 Self-emp-inc Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 +25 0.2777778 0.127141088 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +20 0.222222224 0.07895306 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +61 0.677777767 0.115734108 0.5625 0.0282902829 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.1260311 0.625 0 0 0.7070707 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +42 0.466666669 0.0655194148 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +26 0.2888889 0.148015946 0.5625 0 0 0.161616161 Local-gov HS-grad Never-married Other-service Other-relative White Male United-States 0 +46 0.51111114 0.04263406 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +39 0.433333337 0.115499042 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +18 0.2 0.232195631 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 +29 0.322222233 0.142027542 0.625 0 0 0.8080808 Private Some-college Never-married Sales Own-child Black Male United-States 0 +39 0.433333337 0.0258044526 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Craft-repair Unmarried White Male United-States 1 +47 0.5222222 0.0807830542 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +40 0.444444448 0.05654524 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +43 0.477777779 0.06828494 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +32 0.355555564 0.137652934 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +31 0.344444454 0.119101778 0.375 0 0 0.4040404 Private 10th Divorced Sales Other-relative White Female United-States 0 +19 0.211111113 0.04087546 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Male United-States 0 +44 0.4888889 0.169262588 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 +46 0.51111114 0.135344729 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +53 0.5888889 0.0314567536 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.0806362256 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.03969139 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +35 0.3888889 0.166868165 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried Black Male United-States 0 +48 0.533333361 0.04561512 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +28 0.311111122 0.135228887 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Wife White Female United-States 0 +44 0.4888889 0.123621866 0.8125 0 0 0.323232323 Private Bachelors Widowed Prof-specialty Unmarried White Female United-States 0 +20 0.222222224 0.0169319827 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +51 0.566666663 0.08306364 0.9375 0 0 0.4040404 Local-gov Prof-school Widowed Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.181710169 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Unmarried White Male United-States 0 +36 0.4 0.0344102047 0.8125 0 0 0.6060606 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.09226412 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +21 0.233333334 0.08712169 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +34 0.377777785 0.02397446 0.8125 0 0 0.3030303 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +36 0.4 0.04128699 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.129534826 0.75 0 0 0.8080808 ? Assoc-acdm Never-married ? Own-child White Female United-States 0 +31 0.344444454 0.173532113 0.5625 0 0 0.434343427 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +44 0.4888889 0.0477428176 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +49 0.544444442 0.107580967 0.4375 0 0 0.4040404 Local-gov 11th Divorced Handlers-cleaners Unmarried White Male United-States 0 +40 0.444444448 0.117461048 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +64 0.7111111 0.118228205 1 0 0 0.4040404 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 1 +54 0.6 0.116555139 0.875 0.07688077 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.0219026674 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband Asian-Pac-Islander Male South 0 +18 0.2 0.217550963 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +68 0.75555557 0.100271776 0.3125 0 0 0.444444448 Private 9th Married-civ-spouse Craft-repair Husband Black Male United-States 0 +64 0.7111111 0.0294590518 1 0 0 0.8080808 Private Doctorate Widowed Prof-specialty Not-in-family White Male United-States 1 +36 0.4 0.131598532 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +21 0.233333334 0.100901529 0.5625 0 0 0.24242425 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +22 0.244444445 0.03501369 0.625 0 0 0.3030303 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +61 0.677777767 0.07097976 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +24 0.266666681 0.09267228 0.625 0 0 0.1010101 Private Some-college Never-married Sales Own-child White Male Greece 0 +49 0.544444442 0.218757942 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.124134429 0.625 0 0 0.3030303 Private Some-college Separated Priv-house-serv Other-relative White Female El-Salvador 0 +66 0.733333349 0.211723551 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 +29 0.322222233 0.184555188 0.625 0 0 0.454545468 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +22 0.244444445 0.216225445 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Female United-States 0 +57 0.6333333 0.211442009 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 +41 0.455555558 0.2658232 0.8125 0 0.3996786 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +29 0.322222233 0.10301777 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.166440472 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +47 0.5222222 0.118513778 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.07344153 0.5625 0 0 0.5555556 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +59 0.655555546 0.09518793 0.6875 0 0 0.5050505 Self-emp-inc Assoc-voc Divorced Prof-specialty Not-in-family White Male United-States 1 +42 0.466666669 0.0500665121 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Adm-clerical Husband Amer-Indian-Eskimo Male United-States 1 +64 0.7111111 0.0319672935 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +29 0.322222233 0.122814976 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-spouse-absent Other-service Unmarried Black Male United-States 0 +25 0.2777778 0.199306935 0.625 0 0 0.2020202 State-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +62 0.6888889 0.209802628 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +44 0.4888889 0.1594566 0.875 0.105201051 0 0.454545468 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 1 +21 0.233333334 0.126384035 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 +60 0.6666667 0.1905584 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.3378927 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Unmarried Black Male United-States 0 +44 0.4888889 0.0199305583 0.8125 0 0.518365443 0.4040404 Federal-gov Bachelors Divorced Tech-support Not-in-family White Male United-States 1 +21 0.233333334 0.20310837 0.5625 0 0 0.1919192 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +18 0.2 0.1261126 0.4375 0 0 0.181818187 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +39 0.433333337 0.147829369 0.8125 0.0501305 0 0.323232323 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +33 0.366666675 0.400205433 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +63 0.7 0.135026157 0.125 0 0 0.4040404 Private 1st-4th Divorced Transport-moving Not-in-family White Male United-States 0 +52 0.5777778 0.1029127 0.5625 0 0 0.5252525 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +17 0.188888893 0.155444354 0.3125 0 0 0.222222224 Private 9th Never-married Sales Own-child Black Male United-States 0 +45 0.5 0.209624812 0.9375 0 0.3409091 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.07724834 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +35 0.3888889 0.131063744 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +31 0.344444454 0.07724834 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +51 0.566666663 0.0282998979 0.625 0 0 0.4040404 State-gov Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +48 0.533333361 0.258222342 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.01983155 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Amer-Indian-Eskimo Male United-States 0 +42 0.466666669 0.0361869857 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male ? 0 +38 0.422222227 0.186583877 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female Columbia 0 +43 0.477777779 0.07632762 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.230826333 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +24 0.266666681 0.1206994 0.5 0 0 0.5555556 Private 12th Never-married Sales Other-relative White Male United-States 0 +46 0.51111114 0.169376418 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.0631303862 0.375 0 0 0.6060606 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +22 0.244444445 0.0255229156 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Other-relative White Male United-States 0 +18 0.2 0.183819681 0.5625 0 0 0.151515156 State-gov HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 +53 0.5888889 0.10198053 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.1418787 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.234047174 1 0 0 0.353535354 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +32 0.355555564 0.172347367 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.2403427 0.5625 0 0 0.121212125 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +46 0.51111114 0.145593911 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +26 0.2888889 0.194503963 0.8125 0 0 0.424242437 Local-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +19 0.211111113 0.296206325 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Male United-States 0 +24 0.266666681 0.10886877 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Not-in-family White Female Ecuador 0 +28 0.311111122 0.128325164 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Own-child White Male United-States 0 +25 0.2777778 0.18606323 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Own-child White Female United-States 0 +44 0.4888889 0.09918806 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.165076569 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Nicaragua 0 +42 0.466666669 0.1479634 0.875 0 0 0.454545468 State-gov Masters Divorced Exec-managerial Not-in-family White Male United-States 0 +28 0.311111122 0.264092863 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Own-child White Male United-States 0 +36 0.4 0.2415847 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Other-relative White Male ? 0 +47 0.5222222 0.176630378 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Not-in-family Black Male United-States 1 +46 0.51111114 0.115327962 0.5625 0.03411034 0 0.353535354 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Guatemala 0 +21 0.233333334 0.147130236 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Own-child White Female Mexico 0 +19 0.211111113 0.122993462 0.5625 0 0 0.25252524 ? HS-grad Never-married ? Own-child Black Female United-States 0 +35 0.3888889 0.3431402 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +26 0.2888889 0.143636614 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.0797471553 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +67 0.7444445 0.03085731 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +54 0.6 0.222086549 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Unmarried White Male United-States 1 +26 0.2888889 0.0201770719 0.875 0 0 0.25252524 Private Masters Never-married Tech-support Other-relative White Male United-States 0 +51 0.566666663 0.145385116 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +27 0.3 0.2207617 0.625 0 0 0.454545468 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +27 0.3 0.2732967 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male ? 1 +39 0.433333337 0.05434076 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Own-child White Female United-States 0 +32 0.355555564 0.119749047 0.8125 0 0 0.4848485 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 +52 0.5777778 0.184221119 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.1363052 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +27 0.3 0.224142179 0.5625 0 0 0.3838384 Local-gov HS-grad Never-married Protective-serv Own-child White Male United-States 0 +46 0.51111114 0.1007877 0.25 0 0 0.454545468 Private 7th-8th Married-spouse-absent Transport-moving Not-in-family White Male United-States 0 +42 0.466666669 0.0270430837 0.6875 0 0 0.3030303 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +79 0.8777778 0.123718858 0.8125 0 0 0.2020202 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.022092605 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Wife Amer-Indian-Eskimo Female United-States 1 +19 0.211111113 0.131529167 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Own-child Black Female United-States 0 +43 0.477777779 0.09027113 0.625 0.0217402168 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Other-relative White Male United-States 0 +51 0.566666663 0.0651159659 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +45 0.5 0.117553994 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +65 0.722222269 0.121779747 0.5625 0.009910099 0 0.2020202 Private HS-grad Separated Protective-serv Not-in-family White Male United-States 0 +66 0.733333349 0.125495642 0.8125 0 0 0.05050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.173266754 0.6875 0 0 1 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +26 0.2888889 0.143328145 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Prof-specialty Own-child White Female United-States 0 +28 0.311111122 0.03728687 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family Black Male United-States 0 +39 0.433333337 0.131509632 0.9375 0 0 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.0304141231 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.2933034 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female Mexico 0 +29 0.322222233 0.155779764 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Unmarried White Male United-States 0 +32 0.355555564 0.113728993 0.8125 0 0.4242424 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +44 0.4888889 0.124642268 0.8125 0.0332503319 0 0.4040404 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +18 0.2 0.0617429055 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Female United-States 0 +60 0.6666667 0.111481406 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +34 0.377777785 0.0492764562 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +60 0.6666667 0.120422579 0.5625 0 0 0.4040404 Private HS-grad Widowed Handlers-cleaners Not-in-family White Female United-States 0 +38 0.422222227 0.0221572649 0.4375 0 0 0.4040404 Private 11th Divorced Sales Unmarried White Female United-States 0 +29 0.322222233 0.169034928 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +41 0.455555558 0.02822177 0.625 0 0.323232323 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +49 0.544444442 0.255794257 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +37 0.411111116 0.146721408 0.1875 0 0 0.4040404 Private 5th-6th Separated Other-service Unmarried White Female Mexico 0 +37 0.411111116 0.09262918 1 0 0.5874656 0.6060606 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 +43 0.477777779 0.1340098 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.047581844 0.875 0.046500463 0 0.5555556 Private Masters Widowed Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.148611337 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried Black Female ? 0 +19 0.211111113 0.117923088 0.3125 0 0 0.6060606 Private 9th Never-married Craft-repair Other-relative White Male United-States 0 +29 0.322222233 0.121437594 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +40 0.444444448 0.369544119 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.187319368 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.265996963 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.08586352 0.5625 0.07298073 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male England 1 +29 0.322222233 0.159585908 0.75 0 0 0.3838384 Private Assoc-acdm Divorced Craft-repair Unmarried White Female United-States 0 +25 0.2777778 0.156927466 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband Other Male Mexico 0 +38 0.422222227 0.02315477 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +48 0.533333361 0.054901816 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.0719200149 0.625 0 0 0.121212125 Private Some-college Never-married Other-service Own-child White Female United-States 0 +50 0.5555556 0.120290563 0.5625 0 0.323232323 0.5050505 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +37 0.411111116 0.221610352 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +48 0.533333361 0.0178419277 0.8125 0 0 0.2020202 Private Bachelors Widowed Other-service Unmarried White Female United-States 0 +50 0.5555556 0.227676883 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +74 0.822222233 0.114031412 0.5625 0.06767067 0 0.0606060624 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +24 0.266666681 0.0142479483 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +34 0.377777785 0.141071126 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband Black Male United-States 1 +19 0.211111113 0.262101233 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +39 0.433333337 0.0682021 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +40 0.444444448 0.133541688 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +30 0.333333343 0.0308350828 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +27 0.3 0.0906348452 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +23 0.25555557 0.191153124 0.3125 0 0 0.353535354 ? 9th Divorced ? Not-in-family White Female United-States 0 +68 0.75555557 0.19321616 0.25 0 0.382920116 0.4040404 ? 7th-8th Widowed ? Not-in-family White Female ? 0 +46 0.51111114 0.284779131 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +24 0.266666681 0.0695606247 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +18 0.2 0.135967076 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child White Male United-States 0 +50 0.5555556 0.112970591 1 0 0 0.6060606 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.142464 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +42 0.466666669 0.07961986 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.175015241 0.6875 0.0347103477 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +57 0.6333333 0.06663007 0.625 0 0 0.161616161 Private Some-college Widowed Tech-support Not-in-family White Female United-States 0 +27 0.3 0.139658719 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male India 1 +31 0.344444454 0.1391583 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.07039042 0.875 0 0 0.4040404 Local-gov Masters Separated Prof-specialty Unmarried White Female United-States 0 +55 0.6111111 0.1147366 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Other-service Other-relative White Female United-States 0 +56 0.622222245 0.123852216 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +36 0.4 0.07473808 0.8125 0 0.3838384 0.3838384 State-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +35 0.3888889 0.104000457 0.625 0 0 0.4040404 State-gov Some-college Never-married Farming-fishing Own-child White Male United-States 0 +63 0.7 0.173542216 0.875 0 0 0.0303030312 ? Masters Never-married ? Not-in-family White Female United-States 0 +28 0.311111122 0.185005784 0.875 0 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +38 0.422222227 0.170176566 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +30 0.333333343 0.240242347 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +18 0.2 0.1382214 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +35 0.3888889 0.162527919 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +53 0.5888889 0.09370683 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.118289493 0.9375 0 0 0.4040404 Private Prof-school Divorced Prof-specialty Unmarried White Female United-States 0 +45 0.5 0.139057264 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +35 0.3888889 0.118624911 0.375 0 0 0.6060606 Private 10th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male India 0 +41 0.455555558 0.0750876442 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +60 0.6666667 0.0714741349 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.0524312928 0.625 0 0.3677686 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +19 0.211111113 0.1091759 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +24 0.266666681 0.145799339 0.5625 0 0.3624885 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +56 0.622222245 0.2572666 0.8125 0.1502415 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.09785379 0.5625 0 0 0.7070707 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +29 0.322222233 0.16331999 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +35 0.3888889 0.107894838 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 +27 0.3 0.18906045 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried White Female United-States 0 +55 0.6111111 0.118503004 1 0 0.453856736 0.5555556 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 +18 0.2 0.105711237 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +53 0.5888889 0.145195171 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +26 0.2888889 0.116920874 0.875 0 0 0.2020202 Private Masters Married-civ-spouse Machine-op-inspct Husband White Male Canada 0 +55 0.6111111 0.130244061 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +45 0.5 0.224986792 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.227428347 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +32 0.355555564 0.07644886 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.119264096 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +35 0.3888889 0.117533788 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 +36 0.4 0.144679919 0.5625 0 0 0.373737365 Private HS-grad Divorced Handlers-cleaners Unmarried White Female United-States 0 +41 0.455555558 0.149926081 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.06758582 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Own-child White Male United-States 0 +22 0.244444445 0.2756305 0.5 0 0 0.4040404 Private 12th Never-married Transport-moving Other-relative White Male United-States 0 +36 0.4 0.07577061 0.9375 0.25236252 0 0.4040404 Self-emp-not-inc Prof-school Divorced Prof-specialty Unmarried White Male United-States 1 +65 0.722222269 0.0780774653 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +59 0.655555546 0.252608448 0.5625 0 0 0.414141417 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +25 0.2777778 0.164046064 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female Columbia 0 +33 0.366666675 0.123237282 0.625 0 0.4331956 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +31 0.344444454 0.08568369 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.186057836 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.117941953 0.625 0 0 0.5050505 State-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.3354734 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +23 0.25555557 0.231961235 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 +34 0.377777785 0.06726724 0.875 0.03103031 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male India 1 +23 0.25555557 0.165219352 0.625 0 0 0.4040404 Private Some-college Divorced Sales Own-child Black Female United-States 0 +63 0.7 0.0291727986 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.126939029 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +51 0.566666663 0.236597851 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Divorced Farming-fishing Unmarried White Male United-States 0 +31 0.344444454 0.122748964 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.0537952 0.625 0.02597026 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Own-child White Female Japan 0 +48 0.533333361 0.238312662 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male ? 1 +31 0.344444454 0.260736 0.625 0 0 0.363636374 Private Some-college Never-married Adm-clerical Not-in-family Black Female Jamaica 0 +47 0.5222222 0.02306721 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.133858919 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +23 0.25555557 0.02219296 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +34 0.377777785 0.256719679 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.06739858 0.4375 0 0 0.353535354 Private 11th Married-civ-spouse Other-service Wife Black Female United-States 1 +34 0.377777785 0.1406239 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Sales Not-in-family White Male United-States 1 +31 0.344444454 0.04146211 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +41 0.455555558 0.118846506 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male Peru 0 +41 0.455555558 0.08668389 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Female United-States 0 +27 0.3 0.2212682 0.6875 0 0 0.3030303 Self-emp-not-inc Assoc-voc Never-married Prof-specialty Other-relative White Male United-States 0 +30 0.333333343 0.135512441 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child Black Female United-States 0 +23 0.25555557 0.2549638 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +24 0.266666681 0.142930746 0.75 0 0 0.2020202 Local-gov Assoc-acdm Never-married Adm-clerical Own-child White Female ? 0 +59 0.655555546 0.120333672 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 +56 0.622222245 0.158836946 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.0152494945 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +59 0.655555546 0.212855086 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Husband White Male Cuba 0 +47 0.5222222 0.290640235 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.100875258 0.5625 0 0 0.444444448 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Female United-States 0 +42 0.466666669 0.111750148 0.8125 0 0 0.454545468 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 +29 0.322222233 0.07234501 0.625 0 0 0.4040404 Federal-gov Some-college Married-spouse-absent Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.146804243 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Unmarried White Male Outlying-US(Guam-USVI-etc) 0 +43 0.477777779 0.235997722 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.219149262 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.105554976 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Not-in-family White Female United-States 0 +23 0.25555557 0.14580135 0.625 0 0 0.2020202 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +29 0.322222233 0.0720493346 0.875 0 0 0.353535354 State-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.0888621 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +33 0.366666675 0.246451661 0.5625 0.02105021 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +46 0.51111114 0.241928875 0.625 0 0 0.454545468 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +35 0.3888889 0.175800577 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Adm-clerical Not-in-family Black Female United-States 0 +36 0.4 0.18383719 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.07654989 0.5625 0 0 0.373737365 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 +35 0.3888889 0.147473738 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.07810508 0.25 0 0 0.424242437 Private 7th-8th Never-married Machine-op-inspct Unmarried White Male United-States 0 +39 0.433333337 0.054312475 0.625 0 0 0.8484849 Private Some-college Married-civ-spouse Other-service Husband Asian-Pac-Islander Male United-States 1 +37 0.411111116 0.09918334 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.144564077 0.5625 0 0 0.424242437 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +25 0.2777778 0.134921074 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +50 0.5555556 0.09312961 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife Black Female United-States 0 +64 0.7111111 0.261731446 0.9375 0.1502415 0 0.454545468 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male ? 1 +33 0.366666675 0.06966704 0.6875 0 0 0.454545468 Private Assoc-voc Separated Prof-specialty Not-in-family White Male United-States 0 +59 0.655555546 0.0897154659 0.1875 0 0 0.4040404 Self-emp-inc 5th-6th Married-civ-spouse Farming-fishing Husband White Male Italy 0 +24 0.266666681 0.11799179 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +41 0.455555558 0.06726589 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.07239081 0.3125 0 0 0.121212125 ? 9th Never-married ? Own-child White Female United-States 0 +60 0.6666667 0.07640575 0.8125 0 0 0.6060606 Private Bachelors Divorced Exec-managerial Own-child White Male United-States 0 +19 0.211111113 0.05771517 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 +23 0.25555557 0.0307892822 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Other-relative White Male United-States 0 +57 0.6333333 0.253403872 0.875 1 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.09805045 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Adm-clerical Husband White Male Japan 1 +17 0.188888893 0.0456710272 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 +24 0.266666681 0.0767398253 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +32 0.355555564 0.106614448 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.130597 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.1293065 0.6875 0 0 0.5555556 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +21 0.233333334 0.049136363 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +54 0.6 0.1826356 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Exec-managerial Not-in-family White Female United-States 0 +22 0.244444445 0.022285236 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +29 0.322222233 0.07149771 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +22 0.244444445 0.01983155 0.5 0 0 0.5050505 Private 12th Never-married Farming-fishing Not-in-family Amer-Indian-Eskimo Male United-States 0 +37 0.411111116 0.07073527 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.16100505 1 0 0 0.5050505 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.0635904148 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +45 0.5 0.0138303572 0.625 0 0 0.8484849 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +28 0.311111122 0.235908151 0.125 0 0 0.4040404 Private 1st-4th Never-married Priv-house-serv Not-in-family White Female Mexico 0 +68 0.75555557 0.131168142 1 0 0 0.4040404 Private Doctorate Divorced Prof-specialty Not-in-family White Female Cuba 0 +36 0.4 0.181209072 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Laos 0 +20 0.222222224 0.3013986 0.3125 0 0 0.3030303 Private 9th Never-married Other-service Unmarried White Male Mexico 0 +24 0.266666681 0.180309221 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Own-child White Female United-States 0 +38 0.422222227 0.133505315 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +32 0.355555564 0.153519392 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +34 0.377777785 0.170165792 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.150428534 0.5625 0.0217402168 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female England 0 +28 0.311111122 0.1224324 0.8125 0 0 0.5050505 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.08931135 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +58 0.644444466 0.138350725 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +64 0.7111111 0.125218138 0.9375 1 0 0.353535354 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.197055981 0.625 0 0 0.5050505 Private Some-college Never-married Sales Own-child White Female United-States 0 +43 0.477777779 0.0514984466 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.198802456 0.5 0 0 0.4040404 Private 12th Divorced Farming-fishing Not-in-family White Male United-States 0 +21 0.233333334 0.0183571819 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male ? 0 +23 0.25555557 0.0470443629 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Female United-States 0 +25 0.2777778 0.0707164 0.3125 0.02907029 0 0.4040404 Private 9th Never-married Handlers-cleaners Own-child Black Male United-States 0 +41 0.455555558 0.217538163 0.5625 0.0235402342 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family Black Male United-States 0 +24 0.266666681 0.263087958 0.5625 0 0 0.363636374 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +41 0.455555558 0.213873461 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 +27 0.3 0.131795883 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +54 0.6 0.3142052 0.25 0 0 0.3030303 Private 7th-8th Widowed Other-service Unmarried White Male United-States 0 +28 0.311111122 0.148685426 0.5625 0 0 0.25252524 Local-gov HS-grad Separated Transport-moving Own-child White Female United-States 0 +29 0.322222233 0.136645332 0.25 0 0.4687787 0.4040404 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +36 0.4 0.231342927 0.5625 0 0 0.3030303 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +41 0.455555558 0.0627916 0.8125 0 0.453856736 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Taiwan 1 +60 0.6666667 0.02601325 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.117013149 0.875 0 0 0.3838384 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.120308749 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female ? 0 +27 0.3 0.202587724 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 +60 0.6666667 0.151305482 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.1289832 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.04168168 0.5 0 0 0.353535354 Private 12th Divorced Transport-moving Other-relative Black Male United-States 0 +34 0.377777785 0.144060269 1 0 0 0.323232323 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male Canada 1 +36 0.4 0.223205954 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +54 0.6 0.0977285057 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +48 0.533333361 0.08289526 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +19 0.211111113 0.146024972 0.25 0 0 0.333333343 Private 7th-8th Never-married Other-service Own-child White Male United-States 0 +40 0.444444448 0.126820475 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.0226374939 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +39 0.433333337 0.158213928 0.75 0 0 0.4040404 Private Assoc-acdm Separated Adm-clerical Unmarried White Male United-States 0 +34 0.377777785 0.235163212 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.113452166 0.5625 0 0 0.3030303 Private HS-grad Separated Other-service Unmarried White Female United-States 0 +43 0.477777779 0.14269501 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +35 0.3888889 0.130639419 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 +36 0.4 0.0353821144 1 0 0.4331956 0.5050505 Local-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +59 0.655555546 0.05105661 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +33 0.366666675 0.118666671 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.206626236 0.625 0 0 0.5050505 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +48 0.533333361 0.178615957 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.09385501 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +49 0.544444442 0.07252754 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.0230166949 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +45 0.5 0.08646701 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +51 0.566666663 0.131768942 0.625 0 0 0.4040404 Self-emp-inc Some-college Separated Sales Not-in-family White Female United-States 0 +46 0.51111114 0.0399318375 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.109410286 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +29 0.322222233 0.236143216 0.375 0 0 0.3838384 ? 10th Never-married ? Own-child White Female United-States 0 +39 0.433333337 0.2321963 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Own-child Black Female United-States 1 +35 0.3888889 0.0754877254 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +26 0.2888889 0.119077526 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 1 +51 0.566666663 0.0928231552 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +31 0.344444454 0.208539754 0.875 0 0 0.0606060624 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male South 0 +39 0.433333337 0.2269003 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +26 0.2888889 0.139152229 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Other-relative White Male Mexico 0 +25 0.2777778 0.1300265 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +61 0.677777767 0.154281154 0.625 0 0.4331956 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +49 0.544444442 0.04229325 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Own-child White Female United-States 0 +53 0.5888889 0.178445548 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female Mexico 0 +52 0.5777778 0.249579549 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Machine-op-inspct Husband White Male El-Salvador 0 +52 0.5777778 0.110242777 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +74 0.822222233 0.0603938177 0.8125 0 0 0.353535354 ? Bachelors Widowed ? Not-in-family Other Female United-States 0 +50 0.5555556 0.376162261 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family Black Male United-States 0 +29 0.322222233 0.0839762762 0.8125 0.135501355 0 0.353535354 Private Bachelors Never-married Sales Not-in-family White Female United-States 1 +76 0.844444454 0.140662968 0.25 0 0 0.3030303 Private 7th-8th Widowed Protective-serv Not-in-family White Male United-States 0 +19 0.211111113 0.0640383139 0.5625 0 0 0.151515156 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +25 0.2777778 0.114284657 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +45 0.5 0.06824251 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.113764018 0.75 0 0 0.353535354 Private Assoc-acdm Divorced Adm-clerical Own-child White Female United-States 0 +20 0.222222224 0.143181309 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 +66 0.733333349 0.114916436 0.875 0 0 0.0606060624 ? Masters Widowed ? Not-in-family White Male United-States 0 +63 0.7 0.11485716 0.8125 0 0 0.454545468 ? Bachelors Married-civ-spouse ? Wife Black Female United-States 0 +27 0.3 0.06728408 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +41 0.455555558 0.07064838 0.625 0.0282902829 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +43 0.477777779 0.118019409 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband White Male Nicaragua 0 +23 0.25555557 0.100830808 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +37 0.411111116 0.144501433 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +31 0.344444454 0.11269512 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.0294442344 0.625 0 0 0.04040404 State-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.129274845 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Sales Own-child White Male United-States 0 +70 0.7777778 0.106850855 0.5625 0.0299303 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +35 0.3888889 0.228066191 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +41 0.455555558 0.0918829 0.75 0 0 0.75757575 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +17 0.188888893 0.04871069 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Other-relative White Female United-States 0 +41 0.455555558 0.127941921 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife Black Female United-States 1 +44 0.4888889 0.2719611 0.6875 0 0 0.454545468 Private Assoc-voc Divorced Sales Not-in-family White Male United-States 0 +47 0.5222222 0.307576925 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +24 0.266666681 0.187943742 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +38 0.422222227 0.044261992 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Divorced Other-service Unmarried White Female United-States 0 +34 0.377777785 0.1278429 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male Jamaica 0 +62 0.6888889 0.150627226 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Other-service Not-in-family Black Female United-States 0 +27 0.3 0.13426438 0.5625 0 0 0.3838384 Local-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +59 0.655555546 0.09385299 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +35 0.3888889 0.08021661 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.131356061 0.5625 0 0 0.323232323 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 +28 0.311111122 0.125762358 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.221540987 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +59 0.655555546 0.107409894 0.3125 0 0 0.4040404 State-gov 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.09339364 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Own-child White Female United-States 0 +54 0.6 0.192861214 0.875 0 0 0.323232323 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 1 +39 0.433333337 0.122384585 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +41 0.455555558 0.1305862 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +43 0.477777779 0.145818189 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Female Germany 0 +32 0.355555564 0.08413725 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Iran 1 +62 0.6888889 0.07372711 0.625 0 0.371212125 0.333333343 Private Some-college Separated Sales Unmarried White Female United-States 0 +58 0.644444466 0.172609374 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.219827518 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +67 0.7444445 0.117865168 0.625 0 0.5640496 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +31 0.344444454 0.163764521 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +51 0.566666663 0.104477324 0.875 0 0 0.7070707 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +54 0.6 0.127706856 0.8125 0 0 0.363636374 Private Bachelors Never-married Other-service Own-child Black Female United-States 0 +20 0.222222224 0.0265897941 0.625 0 0 0.7070707 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +35 0.3888889 0.139388636 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.085974656 0.5625 0 0 0.363636374 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +38 0.422222227 0.157807782 0.8125 0.068490684 0 0.6060606 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +42 0.466666669 0.122786686 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +44 0.4888889 0.112208828 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 +28 0.311111122 0.0224711318 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +74 0.822222233 0.112841949 0.625 0 0 0.353535354 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.120817266 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife Black Female United-States 0 +50 0.5555556 0.200410858 0.5625 0 0 0.5252525 State-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +50 0.5555556 0.133603647 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Exec-managerial Unmarried White Female United-States 0 +43 0.477777779 0.161987737 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +29 0.322222233 0.114273205 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.111092776 0.5625 0 0 0.25252524 ? HS-grad Separated ? Unmarried Black Female United-States 0 +61 0.677777767 0.141770929 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.104286715 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female Vietnam 0 +27 0.3 0.224486351 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Not-in-family White Male ? 0 +47 0.5222222 0.129852727 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male Iran 1 +39 0.433333337 0.03329685 0.75 0 0.3168044 0.4040404 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 +33 0.366666675 0.09182363 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.342861384 0.5625 0 0 0.373737365 Private HS-grad Never-married Sales Other-relative Black Female United-States 0 +38 0.422222227 0.214594826 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +45 0.5 0.0703984946 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.166831121 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +35 0.3888889 0.1478718 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Not-in-family White Male Germany 0 +21 0.233333334 0.114298128 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +49 0.544444442 0.0884364247 0.6875 0 0 0.444444448 State-gov Assoc-voc Divorced Adm-clerical Not-in-family Black Female United-States 0 +50 0.5555556 0.115748249 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Own-child Other Female United-States 0 +36 0.4 0.229063019 1 0 0 0.363636374 State-gov Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 +20 0.222222224 0.137832776 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +49 0.544444442 0.143753141 0.5625 0 0 0.4040404 Private HS-grad Separated Prof-specialty Unmarried Black Female United-States 0 +40 0.444444448 0.253934622 0.8125 0 0 0.6060606 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.124296077 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +60 0.6666667 0.126783431 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +67 0.7444445 0.156948358 0.4375 0 0 0.2020202 Private 11th Widowed Adm-clerical Unmarried White Female United-States 0 +21 0.233333334 0.119498491 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Other Female United-States 0 +60 0.6666667 0.0142122516 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband Amer-Indian-Eskimo Male United-States 0 +17 0.188888893 0.03535113 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Own-child White Female United-States 0 +43 0.477777779 0.123440683 0.875 0.1502415 0 0.323232323 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 +49 0.544444442 0.024366457 0.8125 0 0 0.454545468 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.0841621757 0.8125 1 0 0.6060606 Private Bachelors Separated Prof-specialty Not-in-family Black Female United-States 1 +38 0.422222227 0.06893625 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 +38 0.422222227 0.111759581 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.200426355 0.75 0 0 1 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.08101071 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +23 0.25555557 0.05898074 0.625 0 0 0.4040404 ? Some-college Separated ? Not-in-family White Female United-States 0 +19 0.211111113 0.18739076 0.625 0 0.3677686 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +40 0.444444448 0.105052523 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +46 0.51111114 0.109686442 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +25 0.2777778 0.0436854474 0.625 0 0 0.222222224 Private Some-college Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.152227551 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +24 0.266666681 0.217332065 0.75 0 0 0.4848485 Private Assoc-acdm Never-married Handlers-cleaners Not-in-family White Male United-States 0 +62 0.6888889 0.136216968 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +54 0.6 0.118045 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male China 0 +23 0.25555557 0.135839775 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 +60 0.6666667 0.112028994 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +18 0.2 0.09942177 0.5625 0 0 0.08080808 Self-emp-inc HS-grad Never-married Farming-fishing Own-child White Female United-States 0 +41 0.455555558 0.143566564 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +45 0.5 0.0227641184 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +62 0.6888889 0.134166718 0.6875 0 0 0.4040404 State-gov Assoc-voc Widowed Exec-managerial Unmarried Black Female United-States 0 +28 0.311111122 0.06123439 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Tech-support Unmarried Black Female United-States 0 +36 0.4 0.227505133 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male Yugoslavia 1 +31 0.344444454 0.12608768 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Other-relative White Male United-States 0 +44 0.4888889 0.176127255 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male ? 0 +33 0.366666675 0.243696228 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Separated Craft-repair Unmarried White Male United-States 0 +62 0.6888889 0.15258655 0.9375 0 0 0.161616161 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +27 0.3 0.0674666 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Wife White Female United-States 0 +42 0.466666669 0.183622345 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Divorced Adm-clerical Unmarried Black Female United-States 1 +55 0.6111111 0.1714253 0.3125 0 0 0.373737365 Private 9th Never-married Handlers-cleaners Other-relative Black Male United-States 0 +41 0.455555558 0.139674217 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +26 0.2888889 0.02632981 0.625 0.0406404063 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +45 0.5 0.0325121842 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +67 0.7444445 0.102445945 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Widowed Farming-fishing Not-in-family White Male United-States 0 +25 0.2777778 0.158054978 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.08597735 0.5625 0 0.4331956 0.4848485 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.121276617 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried White Male United-States 0 +19 0.211111113 0.02187438 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +26 0.2888889 0.09271741 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +61 0.677777767 0.153759167 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.107389688 0.9375 0.135501355 0 0.5050505 Private Prof-school Never-married Sales Not-in-family White Female United-States 1 +43 0.477777779 0.0224354342 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +53 0.5888889 0.182222068 0.5625 0 0 0.2020202 Private HS-grad Divorced Priv-house-serv Not-in-family White Female United-States 0 +53 0.5888889 0.195520326 0.625 0 0 0.454545468 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 +42 0.466666669 0.193329319 0.5 0 0 0.1010101 Self-emp-inc 12th Divorced Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.08655996 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +55 0.6111111 0.124735221 0.8125 0 0 1 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.0334457 0.8125 0.07298073 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.066009745 0.4375 0 0 0.161616161 Private 11th Never-married Sales Own-child White Female United-States 0 +55 0.6111111 0.191037953 0.9375 0 0 0.353535354 Self-emp-not-inc Prof-school Divorced Prof-specialty Not-in-family White Female United-States 0 +36 0.4 0.06624885 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +40 0.444444448 0.1366413 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +54 0.6 0.07972291 0.375 0 0 0.1010101 Self-emp-not-inc 10th Divorced Other-service Not-in-family Black Female United-States 0 +45 0.5 0.1241223 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +48 0.533333361 0.232929111 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +40 0.444444448 0.06713724 0.9375 0 0 0.6060606 Local-gov Prof-school Never-married Exec-managerial Not-in-family White Male United-States 1 +31 0.344444454 0.170642659 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +26 0.2888889 0.128409356 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Male Taiwan 0 +34 0.377777785 0.193800792 0.625 0 0.3409091 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +19 0.211111113 0.137663037 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Own-child Other Female Puerto-Rico 0 +31 0.344444454 0.19860512 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.107389688 0.5625 0 0 0.3030303 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 +55 0.6111111 0.108884931 0.875 0 0 0.5555556 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.0355208628 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.169746861 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Other-relative White Male Mexico 0 +27 0.3 0.127770841 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.274743468 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family Black Male United-States 0 +20 0.222222224 0.112161681 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Other Female United-States 0 +24 0.266666681 0.0235184766 0.6875 0 0 0.3838384 Self-emp-not-inc Assoc-voc Never-married Other-service Unmarried White Female United-States 0 +27 0.3 0.09612145 0.875 0 0 0.4040404 Private Masters Never-married Tech-support Not-in-family White Male ? 0 +18 0.2 0.135842472 0.4375 0 0 0.04040404 Federal-gov 11th Never-married Machine-op-inspct Own-child White Male United-States 0 +28 0.311111122 0.121073887 0.625 0 0 0.4040404 Local-gov Some-college Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.06395479 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Female United-States 0 +66 0.733333349 0.2360725 0.625 0 0.288797051 0.2020202 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.135880873 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 +59 0.655555546 0.0803823 0.375 0 0 0.363636374 Self-emp-not-inc 10th Married-civ-spouse Exec-managerial Wife White Female United-States 0 +33 0.366666675 0.100845627 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +28 0.311111122 0.2823093 0.25 0 0 0.4040404 Private 7th-8th Separated Handlers-cleaners Not-in-family White Male Mexico 0 +34 0.377777785 0.117726423 0.8125 0 0.459366381 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +41 0.455555558 0.115332007 0.625 0 0 0.5555556 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.138967 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.136513323 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.08153472 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +47 0.5222222 0.10789147 0.5625 0.14084141 0 0.3838384 Private HS-grad Separated Prof-specialty Other-relative Black Female United-States 1 +29 0.322222233 0.05682341 0.375 0 0 0.4040404 Private 10th Married-spouse-absent Adm-clerical Unmarried White Female Mexico 0 +60 0.6666667 0.09388465 0.625 0 0 0.5050505 Private Some-college Married-spouse-absent Machine-op-inspct Not-in-family White Male United-States 1 +53 0.5888889 0.08358159 0.5625 0.0501305 0 0.353535354 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.0207172465 0.25 0 0 0.6060606 Private 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.09286357 0.625 0 0 0.3030303 Private Some-college Divorced Sales Unmarried White Female United-States 0 +73 0.811111152 0.0936543 0.5625 0 0 0.222222224 ? HS-grad Widowed ? Not-in-family White Female United-States 1 +20 0.222222224 0.160559848 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +49 0.544444442 0.229510248 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.151509568 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Unmarried White Male United-States 0 +33 0.366666675 0.0754318237 0.625 0 0 0.454545468 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +25 0.2777778 0.0845225155 0.625 0 0 0.343434334 Private Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Female United-States 0 +34 0.377777785 0.2091493 0.5625 0 0 0.1010101 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 +19 0.211111113 0.04821968 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Female United-States 0 +40 0.444444448 0.06680452 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 +48 0.533333361 0.168339849 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +51 0.566666663 0.1392701 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +22 0.244444445 0.1553871 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Handlers-cleaners Own-child Black Male Jamaica 0 +34 0.377777785 0.1632385 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband Black Male United-States 0 +22 0.244444445 0.09075608 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Sales Wife White Female United-States 0 +34 0.377777785 0.1337727 0.5625 0 0.459595948 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +56 0.622222245 0.117221944 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +49 0.544444442 0.11177507 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +36 0.4 0.184281737 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +18 0.2 0.1295941 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +26 0.2888889 0.06902112 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 +48 0.533333361 0.157946527 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.315694362 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.0569540747 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +47 0.5222222 0.100353271 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.0234497767 0.6875 0 0 0.121212125 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 +28 0.311111122 0.1422397 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +53 0.5888889 0.0224313922 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +65 0.722222269 0.1212261 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.14805299 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 +50 0.5555556 0.09076955 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.0717637539 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +70 0.7777778 0.06047464 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +55 0.6111111 0.111036874 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Own-child White Male United-States 0 +27 0.3 0.173181877 0.8125 0 0 0.353535354 Federal-gov Bachelors Never-married Transport-moving Other-relative White Male United-States 0 +31 0.344444454 0.153192729 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Cuba 1 +43 0.477777779 0.08450231 0.8125 0 0.43663913 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.127802491 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.118758276 0.25 0 0 0.4040404 Private 7th-8th Never-married Other-service Unmarried White Female Mexico 0 +26 0.2888889 0.191452175 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried Black Female United-States 0 +23 0.25555557 0.06862306 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family White Female United-States 0 +41 0.455555558 0.09034118 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +52 0.5777778 0.175750747 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 +41 0.455555558 0.160425141 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Wife White Female United-States 0 +59 0.655555546 0.100104734 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +56 0.622222245 0.0323983543 0.625 0 0.453856736 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +58 0.644444466 0.157750532 0.5625 0.143441439 0 0.4848485 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 +65 0.722222269 0.07632695 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.0230658613 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 0 +51 0.566666663 0.117915682 0.75 0.05178052 0 0.454545468 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.188374132 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +84 0.933333337 0.1268454 0.5625 0 0 0.161616161 Private HS-grad Widowed Prof-specialty Not-in-family White Female United-States 0 +51 0.566666663 0.0650695 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.0567499958 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +30 0.333333343 0.185647652 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +22 0.244444445 0.2596745 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Male Mexico 0 +30 0.333333343 0.132243112 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male Ireland 0 +47 0.5222222 0.06545138 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +19 0.211111113 0.133167192 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Female United-States 0 +43 0.477777779 0.09907625 0.625 0 0 0.363636374 Self-emp-not-inc Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +30 0.333333343 0.125510454 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +46 0.51111114 0.0494603328 0.875 0 0 0.454545468 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 0 +49 0.544444442 0.185271829 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.140912846 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Unmarried White Female Mexico 0 +42 0.466666669 0.141795844 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 0 +57 0.6333333 0.2505683 0.625 0.0501305 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.119002767 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +23 0.25555557 0.1417615 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +26 0.2888889 0.197810337 0.8125 0 0 0.5858586 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +64 0.7111111 0.100878626 0.875 0 0 0.08080808 Private Masters Never-married Prof-specialty Other-relative White Female United-States 0 +20 0.222222224 0.2175577 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female Germany 0 +31 0.344444454 0.0855052 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +38 0.422222227 0.1162103 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +44 0.4888889 0.0777332857 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 +42 0.466666669 0.06850452 0.6875 0.0288502872 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 0 +23 0.25555557 0.17872642 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried White Male United-States 0 +31 0.344444454 0.129699171 0.875 0 0 0.909090936 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.2349093 0.4375 0 0 0.363636374 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.100329027 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +35 0.3888889 0.08524859 0.5625 0 0 0.2020202 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 +40 0.444444448 0.07135155 0.5625 0 0 0.3838384 Private HS-grad Married-spouse-absent Adm-clerical Own-child White Female United-States 0 +18 0.2 0.126675665 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 +23 0.25555557 0.124199763 0.375 0 0 0.3030303 Private 10th Never-married Transport-moving Own-child Asian-Pac-Islander Male ? 0 +63 0.7 0.08368127 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +20 0.222222224 0.135258526 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Transport-moving Own-child White Male United-States 0 +50 0.5555556 0.0676767454 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.08723147 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 +53 0.5888889 0.200575873 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +34 0.377777785 0.131667912 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Own-child White Female United-States 0 +54 0.6 0.103378117 0.5625 0 0 0.565656543 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 1 +40 0.444444448 0.08543448 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +22 0.244444445 0.139404133 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +28 0.311111122 0.277596563 0.375 0 0 0.353535354 Private 10th Never-married Farming-fishing Other-relative White Male Mexico 0 +24 0.266666681 0.44020462 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male El-Salvador 0 +37 0.411111116 0.04752594 0.125 0 0 0.4848485 Private 1st-4th Never-married Other-service Unmarried White Female El-Salvador 0 +62 0.6888889 0.133032486 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +19 0.211111113 0.208313435 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 +51 0.566666663 0.225417852 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Prof-specialty Unmarried Asian-Pac-Islander Female United-States 0 +65 0.722222269 0.0707992539 0.625 0.0234602336 0 0.4040404 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.102029696 0.5625 0 0 0.08080808 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.0530509427 0.625 0 0 0.909090936 Self-emp-inc Some-college Divorced Exec-managerial Unmarried White Male United-States 1 +42 0.466666669 0.06629398 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 +54 0.6 0.155429527 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male Cuba 0 +23 0.25555557 0.0792117 0.8125 0 0 0.6060606 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +28 0.311111122 0.0462327525 0.5625 0 0 0.464646459 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +42 0.466666669 0.230104968 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Not-in-family White Male United-States 0 +30 0.333333343 0.04439939 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family Black Male United-States 0 +33 0.366666675 0.126790166 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.133849487 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Not-in-family White Female United-States 0 +39 0.433333337 0.108255848 0.5625 0.0297702979 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 +27 0.3 0.47553286 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +20 0.222222224 0.234489679 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child Black Male United-States 0 +62 0.6888889 0.05245756 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male Philippines 0 +17 0.188888893 0.108276054 0.375 0 0 0.3030303 Private 10th Never-married Sales Other-relative White Male United-States 0 +58 0.644444466 0.135455862 0.625 0 0 0.5555556 Private Some-college Divorced Adm-clerical Not-in-family Black Female United-States 1 +69 0.7666667 0.0726406947 0.875 0.06514065 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.15507862 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.1367504 0.8125 0 0.6483012 0.5050505 Private Bachelors Separated Sales Not-in-family White Male United-States 1 +20 0.222222224 0.251858115 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +64 0.7111111 0.230143368 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +27 0.3 0.080684714 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male ? 0 +41 0.455555558 0.119890489 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +40 0.444444448 0.15702109 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male El-Salvador 0 +53 0.5888889 0.129980028 0.875 0 0 0.3838384 Local-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 +44 0.4888889 0.0223310366 1 0 0 0.454545468 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 +37 0.411111116 0.126183987 0.1875 0 0 0.4040404 Private 5th-6th Never-married Adm-clerical Other-relative White Female Mexico 0 +46 0.51111114 0.05289199 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +17 0.188888893 0.06844862 0.3125 0 0 0.2020202 Private 9th Never-married Machine-op-inspct Own-child White Male United-States 0 +35 0.3888889 0.0791854262 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.07462156 0.75 0 0 0.4040404 Local-gov Assoc-acdm Separated Adm-clerical Unmarried White Female United-States 0 +49 0.544444442 0.139502466 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +48 0.533333361 0.029100731 0.9375 0 0 0.25252524 Private Prof-school Divorced Prof-specialty Unmarried White Female United-States 0 +26 0.2888889 0.080984436 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Other-relative White Male United-States 0 +26 0.2888889 0.127445519 0.75 0 0 0.08080808 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.128574371 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.056251578 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +54 0.6 0.023948865 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.03994935 0.625 0 0 0.4040404 Local-gov Some-college Separated Adm-clerical Own-child Black Male United-States 0 +25 0.2777778 0.1360762 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +18 0.2 0.03748758 0.375 0 0 0.25252524 Local-gov 10th Never-married Other-service Own-child White Male United-States 0 +21 0.233333334 0.0796023458 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Black Female United-States 0 +22 0.244444445 0.18852298 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Own-child Black Male United-States 0 +52 0.5777778 0.07473134 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male El-Salvador 1 +36 0.4 0.0607251972 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +25 0.2777778 0.08250056 0.8125 0 0.396235079 0.6060606 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +49 0.544444442 0.0291963723 1 1 0 0.7070707 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 +42 0.466666669 0.0230874158 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.0254447851 0.6875 0 0 0.545454562 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.108185127 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Own-child White Male United-States 0 +32 0.355555564 0.230657279 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +53 0.5888889 0.0433230847 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.251844 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.138669968 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 1 +62 0.6888889 0.140274331 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Adm-clerical Not-in-family Black Female United-States 0 +38 0.422222227 0.149827749 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +23 0.25555557 0.234672889 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +39 0.433333337 0.09165525 0.5625 0 0.4708448 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.132877573 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 +27 0.3 0.137921676 0.75 0 0 0.4040404 ? Assoc-acdm Married-civ-spouse ? Wife White Female United-States 0 +41 0.455555558 0.13879256 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.04168168 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +25 0.2777778 0.201998383 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife Black Female United-States 1 +35 0.3888889 0.0310014449 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Other-service Unmarried White Female United-States 0 +47 0.5222222 0.161557347 0.5625 0 0.453856736 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.104119673 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male Puerto-Rico 0 +29 0.322222233 0.16466099 0.6875 0 0.4708448 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +36 0.4 0.0217780638 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 +42 0.466666669 0.215253547 0.8125 0 0 0.6060606 Private Bachelors Married-spouse-absent Transport-moving Not-in-family White Male United-States 0 +51 0.566666663 0.152713835 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +34 0.377777785 0.15251717 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Male United-States 0 +44 0.4888889 0.241973326 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Divorced Craft-repair Not-in-family White Male Portugal 0 +27 0.3 0.024820419 0.8125 0 0 0.414141417 Private Bachelors Never-married Machine-op-inspct Not-in-family White Male United-States 0 +39 0.433333337 0.265022337 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Not-in-family Black Male United-States 0 +46 0.51111114 0.0223000534 0.5625 0 0.3996786 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.126790166 0.5625 0 0.365013778 0.6262626 Self-emp-not-inc HS-grad Divorced Sales Own-child White Male United-States 0 +31 0.344444454 0.155969709 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family Black Female United-States 0 +23 0.25555557 0.2377644 0.4375 0 0 0.353535354 Private 11th Never-married Craft-repair Unmarried White Male United-States 0 +47 0.5222222 0.0691235 0.875 0.1502415 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +66 0.733333349 0.17665799 0.8125 0 0 1 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +26 0.2888889 0.107967578 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +52 0.5777778 0.105713256 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +53 0.5888889 0.09215501 0.4375 0 0 0.3030303 Self-emp-inc 11th Widowed Exec-managerial Not-in-family White Female United-States 0 +48 0.533333361 0.108253159 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 0 +37 0.411111116 0.05823312 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Separated Exec-managerial Unmarried White Male United-States 0 +17 0.188888893 0.1607242 0.4375 0 0 0.05050505 Private 11th Never-married Other-service Own-child White Female United-States 0 +50 0.5555556 0.228970736 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.149528027 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Other-relative White Female Mexico 0 +17 0.188888893 0.06728138 0.4375 0 0.3677686 0.4040404 Federal-gov 11th Never-married Adm-clerical Not-in-family Black Female United-States 0 +39 0.433333337 0.144215181 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried Black Male United-States 0 +28 0.311111122 0.201158479 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Tech-support Not-in-family Black Female United-States 0 +38 0.422222227 0.120891355 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 +53 0.5888889 0.0325606763 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +28 0.311111122 0.0675353 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +42 0.466666669 0.1529361 0.625 0.1502415 0 0.323232323 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.08533749 0.3125 0 0 0.454545468 Private 9th Never-married Transport-moving Not-in-family White Male United-States 0 +20 0.222222224 0.140856937 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +32 0.355555564 0.2695027 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +23 0.25555557 0.18734698 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +25 0.2777778 0.0936293751 0.8125 0.0217402168 0 0.4040404 Private Bachelors Never-married Sales Own-child Asian-Pac-Islander Male Vietnam 0 +41 0.455555558 0.12017943 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Taiwan 0 +42 0.466666669 0.34422192 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.134059638 0.5 0.005940059 0 0.141414136 Private 12th Never-married Sales Own-child White Male United-States 0 +29 0.322222233 0.128325164 0.8125 0 0.4242424 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male Germany 1 +36 0.4 0.07792794 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.113040641 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.146940976 0.5625 0 0 0.444444448 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +48 0.533333361 0.115798093 0.9375 0.1502415 0 0.5050505 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.163049236 0.9375 0 0 0.8080808 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +67 0.7444445 0.150371283 0.5625 0 0 0.4040404 Federal-gov HS-grad Widowed Other-service Unmarried White Male United-States 0 +53 0.5888889 0.260504961 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +53 0.5888889 0.0710430741 0.8125 0 0.5544077 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.09472858 1 0 0 0.454545468 Private Doctorate Divorced Prof-specialty Not-in-family White Male United-States 1 +22 0.244444445 0.1387279 0.375 0 0 0.353535354 Private 10th Separated Other-service Unmarried White Female United-States 0 +25 0.2777778 0.145876125 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +61 0.677777767 0.109403551 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +31 0.344444454 0.056355305 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 +47 0.5222222 0.13814193 0.5625 0 0 0.3838384 Self-emp-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male Germany 0 +31 0.344444454 0.131844372 0.125 0 0 0.454545468 Private 1st-4th Married-civ-spouse Prof-specialty Husband White Male United-States 0 +17 0.188888893 0.148556113 0.3125 0 0 0.323232323 Private 9th Never-married Sales Other-relative Other Female Mexico 0 +38 0.422222227 0.210299015 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.2602113 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male ? 0 +42 0.466666669 0.05804857 0.625 0 0 0.4040404 Private Some-college Widowed Exec-managerial Not-in-family Amer-Indian-Eskimo Female United-States 0 +78 0.8666667 0.0711158141 0.1875 0 0 0.363636374 Private 5th-6th Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male United-States 0 +54 0.6 0.06960642 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.10140264 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +30 0.333333343 0.0175179578 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.100617968 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.102125339 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 +30 0.333333343 0.11422 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Female United-States 0 +66 0.733333349 0.117522337 1 0.200512 0 0.353535354 Local-gov Doctorate Married-civ-spouse Prof-specialty Husband Black Male Jamaica 1 +23 0.25555557 0.108406052 0.5625 0.02597026 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +25 0.2777778 0.1437208 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +32 0.355555564 0.06942659 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.07376954 0.5625 0 0 0.3838384 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.0962042958 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +24 0.266666681 0.0292819124 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +22 0.244444445 0.128588513 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +28 0.311111122 0.118533313 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +29 0.322222233 0.1443957 0.4375 0 0 0.2020202 Local-gov 11th Divorced Other-service Unmarried Black Female United-States 0 +26 0.2888889 0.129757762 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Male United-States 0 +41 0.455555558 0.139883012 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +19 0.211111113 0.09689265 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 +39 0.433333337 0.110050149 0.5625 0 0 0.262626261 Private HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male ? 0 +51 0.566666663 0.209317014 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.2882492 0.5625 0 0 0.2020202 ? HS-grad Separated ? Unmarried Black Female United-States 0 +27 0.3 0.188325629 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +33 0.366666675 0.210736141 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +19 0.211111113 0.117924437 0.5625 0 0 0.08080808 Private HS-grad Never-married Sales Own-child White Female United-States 0 +67 0.7444445 0.08894494 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 +41 0.455555558 0.0221444666 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.242827371 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.0670018643 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +25 0.2777778 0.07613297 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +21 0.233333334 0.0668139458 0.5625 0 0 0.363636374 Federal-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +24 0.266666681 0.304868639 0.625 0.143441439 0 0.5050505 Local-gov Some-college Never-married Tech-support Not-in-family White Male United-States 1 +48 0.533333361 0.159532025 0.4375 0 0 0.3131313 Private 11th Divorced Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.135963038 0.9375 0 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.180952445 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.3201471 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.07900223 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.0442539081 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female ? 0 +45 0.5 0.129881024 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +62 0.6888889 0.0516735651 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +39 0.433333337 0.121698253 0.875 0 0.453856736 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.0901701 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +22 0.244444445 0.0833344 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Not-in-family White Female United-States 0 +50 0.5555556 0.0875298455 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +25 0.2777778 0.06483982 0.4375 0 0 0.4040404 Private 11th Divorced Exec-managerial Unmarried White Female United-States 0 +44 0.4888889 0.213725969 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 +26 0.2888889 0.058511287 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +31 0.344444454 0.06793471 0.875 0 0 0.5050505 State-gov Masters Divorced Exec-managerial Unmarried White Female United-States 1 +56 0.622222245 0.11068327 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +49 0.544444442 0.0825645551 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 +49 0.544444442 0.0231540948 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.1091328 0.5625 0 0 0.434343427 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +33 0.366666675 0.134147868 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 +25 0.2777778 0.316697925 0.8125 0 0 0.3030303 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +40 0.444444448 0.179701015 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 1 +72 0.8 0.126630545 0.25 0 0 0.3030303 ? 7th-8th Divorced ? Not-in-family White Male United-States 0 +32 0.355555564 0.34580338 0.875 0 0 0.1010101 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +44 0.4888889 0.0661485 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +48 0.533333361 0.132084832 0.5625 0 0 0.3030303 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +17 0.188888893 0.0729256 0.375 0 0 0.121212125 Private 10th Never-married Sales Own-child White Female United-States 0 +50 0.5555556 0.143658176 0.6875 0 0.4331956 0.363636374 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +61 0.677777767 0.0651038438 0.625 0.1502415 0 0.343434334 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +22 0.244444445 0.277709037 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +17 0.188888893 0.0808699355 0.4375 0 0 0.171717167 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +49 0.544444442 0.0685132742 0.9375 0 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +26 0.2888889 0.08100464 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +19 0.211111113 0.09727791 0.625 0 0 0.1010101 State-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 +17 0.188888893 0.18261002 0.5 0 0 0.161616161 Private 12th Never-married Other-service Own-child White Female United-States 0 +38 0.422222227 0.172169566 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +34 0.377777785 0.0612471849 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Protective-serv Own-child Asian-Pac-Islander Male United-States 0 +51 0.566666663 0.109614372 0.5625 0.07298073 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +48 0.533333361 0.08652224 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +63 0.7 0.0207536183 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.110853672 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +73 0.811111152 0.0996851251 0.625 0.200512 0 0.363636374 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +51 0.566666663 0.145245686 0.5625 0 0 0.434343427 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.202717036 0.875 0 0.3409091 0.4040404 Private Masters Married-civ-spouse Other-service Husband Black Male ? 0 +54 0.6 0.283935875 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.100968882 0.5625 0 0.4242424 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +65 0.722222269 0.1622255 0.8125 0 0.5456841 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +36 0.4 0.09358088 0.8125 0.04386044 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.0449617952 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband Other Male United-States 0 +38 0.422222227 0.0695916042 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.07895306 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +37 0.411111116 0.019630162 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.1243742 0.5625 0 0.3409091 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.01400615 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.209722474 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.08261574 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 +19 0.211111113 0.09266353 0.625 0 0 0.161616161 ? Some-college Never-married ? Own-child White Male United-States 0 +37 0.411111116 0.130456224 0.6875 0 0 0.424242437 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +29 0.322222233 0.09736345 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.154034644 0.125 0 0.597566545 0.323232323 Private 1st-4th Married-civ-spouse Craft-repair Not-in-family White Male Mexico 0 +60 0.6666667 0.124053605 0.5625 0.046500463 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +22 0.244444445 0.163788766 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +22 0.244444445 0.159176409 0.625 0 0.395087242 0.2020202 ? Some-college Never-married ? Own-child Black Male United-States 0 +60 0.6666667 0.1284309 0.6875 0 0 0.373737365 State-gov Assoc-voc Widowed Other-service Not-in-family Black Female United-States 0 +35 0.3888889 0.15746294 0.4375 0 0 0.2020202 Private 11th Separated Other-service Unmarried White Male United-States 0 +45 0.5 0.06883657 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.06418716 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Vietnam 1 +43 0.477777779 0.161987737 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.114482678 0.875 0 0 0.3838384 State-gov Masters Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.09762007 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.1426216 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Unmarried Black Female United-States 0 +61 0.677777767 0.05697226 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 1 +40 0.444444448 0.101618841 0.875 0.01506015 0 0.4040404 State-gov Masters Divorced Exec-managerial Unmarried White Female United-States 0 +20 0.222222224 0.126174569 0.375 0 0 0.3030303 ? 10th Never-married ? Not-in-family White Female United-States 0 +42 0.466666669 0.1270387 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +21 0.233333334 0.0806247741 0.625 0 0 0.353535354 Private Some-college Never-married Sales Unmarried White Female United-States 0 +21 0.233333334 0.185349956 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +26 0.2888889 0.2814977 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +36 0.4 0.13224715 0.5625 0 0 0.6060606 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.14949435 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Other-relative White Male United-States 0 +47 0.5222222 0.117153242 0.8125 0 0 0.575757563 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.08313369 0.75 0 0 0.3030303 Private Assoc-acdm Divorced Tech-support Not-in-family White Male United-States 0 +65 0.722222269 0.0968084559 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Not-in-family Black Female United-States 0 +61 0.677777767 0.136812359 0.8125 0 0 0.121212125 Private Bachelors Divorced Priv-house-serv Not-in-family White Female ? 0 +67 0.7444445 0.117661759 0.625 0 0 0.25252524 Private Some-college Widowed Sales Not-in-family White Female Nicaragua 0 +49 0.544444442 0.24081552 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +63 0.7 0.0201110654 0.5625 0 0.3409091 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +58 0.644444466 0.2115518 0.6875 0 0.4331956 0.4848485 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +61 0.677777767 0.188648924 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Unmarried White Female United-States 0 +36 0.4 0.173354313 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +19 0.211111113 0.111339293 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Other-relative Asian-Pac-Islander Male Vietnam 0 +29 0.322222233 0.073415935 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.179455861 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +60 0.6666667 0.103290558 0.5625 0.02597026 0 0.5555556 Self-emp-not-inc HS-grad Divorced Sales Not-in-family Black Male United-States 0 +21 0.233333334 0.02219296 0.625 0 0 0.4040404 Private Some-college Never-married Sales Unmarried White Male United-States 0 +22 0.244444445 0.122693062 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Unmarried White Female United-States 0 +33 0.366666675 0.126790166 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.200265378 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family Asian-Pac-Islander Female China 0 +37 0.411111116 0.07298824 0.8125 0 0 0.464646459 Private Bachelors Never-married Transport-moving Not-in-family White Male United-States 0 +35 0.3888889 0.221122041 0.75 0 0 0.4040404 Private Assoc-acdm Married-AF-spouse Adm-clerical Wife White Female United-States 0 +17 0.188888893 0.122689694 0.375 0 0 0.3030303 Private 10th Never-married Priv-house-serv Own-child White Male United-States 0 +37 0.411111116 0.114114255 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.222650975 0.5625 0 0 0.454545468 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +28 0.311111122 0.360999674 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.0197971985 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Female United-States 0 +57 0.6333333 0.174366623 0.5625 0.05178052 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Transport-moving Husband White Male Hungary 1 +26 0.2888889 0.248646036 0.625 0 0 0.656565666 Private Some-college Never-married Farming-fishing Other-relative White Female United-States 0 +45 0.5 0.173674241 0.4375 0 0 0.5050505 Local-gov 11th Married-civ-spouse Other-service Husband Black Male United-States 0 +32 0.355555564 0.110592343 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +63 0.7 0.0737634748 0.625 0 0 0.434343427 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 +22 0.244444445 0.07552814 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Other-relative Asian-Pac-Islander Female South 0 +36 0.4 0.107789092 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.03405862 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +34 0.377777785 0.09430224 0.9375 0 0 0.5555556 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.182748765 0.8125 0 0 0.6060606 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +20 0.222222224 0.123312712 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 +47 0.5222222 0.107677288 0.5625 0 0 0.565656543 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +46 0.51111114 0.06906557 0.25 0 0 0.5252525 Private 7th-8th Never-married Other-service Own-child White Male United-States 0 +28 0.311111122 0.2005395 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 +45 0.5 0.1191597 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +26 0.2888889 0.111291468 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Female Thailand 0 +32 0.355555564 0.03545957 0.375 0 0 0.454545468 Self-emp-not-inc 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.0326947123 0.5 0 0 0.4040404 Local-gov 12th Married-civ-spouse Adm-clerical Wife White Female United-States 0 +59 0.655555546 0.188072383 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male Puerto-Rico 0 +58 0.644444466 0.17507115 1 0 0 0.434343427 State-gov Doctorate Never-married Exec-managerial Not-in-family White Female United-States 1 +45 0.5 0.149376482 0.625 0 0 0.3030303 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 +76 0.844444454 0.170679033 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Widowed Transport-moving Not-in-family White Male United-States 0 +38 0.422222227 0.201279715 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +32 0.355555564 0.21641539 0.875 0 0 0.4040404 Private Masters Never-married Sales Own-child Black Male United-States 0 +38 0.422222227 0.04369555 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +30 0.333333343 0.185378239 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Prof-specialty Unmarried Black Female United-States 0 +53 0.5888889 0.09082882 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male Greece 1 +41 0.455555558 0.0453551374 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male ? 0 +27 0.3 0.129557729 0.8125 0 0 0.5050505 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +44 0.4888889 0.1404508 0.75 0 0 0.3030303 Local-gov Assoc-acdm Married-civ-spouse Farming-fishing Husband White Male United-States 0 +35 0.3888889 0.107846342 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 +36 0.4 0.16854392 0.125 0 0 0.4040404 Private 1st-4th Never-married Other-service Other-relative Other Female El-Salvador 0 +51 0.566666663 0.01685924 0.625 0 0 0.1010101 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +42 0.466666669 0.172321782 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +40 0.444444448 0.01811269 0.8125 0.07298073 0 0.5050505 Self-emp-not-inc Bachelors Married-AF-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.07542172 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +55 0.6111111 0.27516377 0.3125 1 0 0.373737365 Private 9th Divorced Craft-repair Unmarried White Female United-States 1 +36 0.4 0.155611381 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +57 0.6333333 0.02022624 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 +27 0.3 0.196752891 0.5625 0 0 0.454545468 Private HS-grad Divorced Tech-support Not-in-family White Female United-States 0 +62 0.6888889 0.09311816 0.875 0.046500463 0 0.4040404 Private Masters Never-married Handlers-cleaners Not-in-family White Male United-States 0 +29 0.322222233 0.128494889 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.0280129723 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Never-married Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 +29 0.322222233 0.12577112 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.0529175848 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 +19 0.211111113 0.0946922153 0.5 0 0 0.3030303 ? 12th Never-married ? Own-child Black Male United-States 0 +32 0.355555564 0.155527189 0.875 0.0486504845 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +34 0.377777785 0.118666671 0.8125 0 0.3996786 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +25 0.2777778 0.122736171 0.75 0 0 0.5555556 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 0 +34 0.377777785 0.138548732 0.875 0 0 0.353535354 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +37 0.411111116 0.0163951758 0.625 0 0 0.3838384 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.09307708 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.225415826 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +24 0.266666681 0.119569883 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 +17 0.188888893 0.102846019 0.5 0 0 0.3030303 Private 12th Never-married Other-service Own-child White Female United-States 0 +35 0.3888889 0.07729819 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 +31 0.344444454 0.178829461 0.6875 0 0 0.323232323 Private Assoc-voc Separated Tech-support Unmarried Black Female United-States 0 +29 0.322222233 0.121746749 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 +49 0.544444442 0.08615921 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +71 0.788888931 0.119825825 0.8125 0 0 0.1010101 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +35 0.3888889 0.123188108 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +55 0.6111111 0.284399271 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.149827749 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +33 0.366666675 0.127989739 0.625 0 0 0.181818187 Local-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +49 0.544444442 0.189698964 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.07945215 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +63 0.7 0.214939 0.4375 0 0 0.4040404 ? 11th Separated ? Not-in-family Black Male United-States 0 +39 0.433333337 0.15188472 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +42 0.466666669 0.07027255 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male El-Salvador 0 +30 0.333333343 0.03247379 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +30 0.333333343 0.0981434062 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Male United-States 0 +48 0.533333361 0.0257559586 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +57 0.6333333 0.0184447411 0.8125 0 0 0.1010101 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +56 0.622222245 0.13757211 0.375 0 0 0.454545468 Private 10th Divorced Other-service Unmarried Black Female United-States 0 +28 0.311111122 0.277218044 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Own-child White Male Honduras 0 +43 0.477777779 0.148966968 0.8125 0 0 0.24242425 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +46 0.51111114 0.0364988334 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +60 0.6666667 0.06331022 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.0162584484 0.875 0 0 0.656565666 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +37 0.411111116 0.07577061 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.0935586542 0.5625 0 0 0.4040404 Private HS-grad Divorced Priv-house-serv Other-relative Black Female United-States 0 +38 0.422222227 0.125496313 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +23 0.25555557 0.1343378 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +59 0.655555546 0.08532133 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +72 0.8 0.07261645 0.875 0.0232902318 0 0.6060606 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +47 0.5222222 0.06305495 0.625 0 0 0.333333343 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.23799476 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Other-relative White Male United-States 0 +35 0.3888889 0.0963545 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +24 0.266666681 0.1614213 0.625 0 0 0.151515156 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +22 0.244444445 0.112894483 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Female United-States 0 +24 0.266666681 0.2978868 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 +42 0.466666669 0.10049808 0.8125 0.07298073 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.117553994 0.8125 0 0 0.727272749 Federal-gov Bachelors Separated Other-service Unmarried White Female ? 0 +40 0.444444448 0.0337393619 0.875 0 0 0.2020202 State-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +61 0.677777767 0.181892022 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female Japan 0 +58 0.644444466 0.08890049 0.8125 0 0 0.727272749 Self-emp-not-inc Bachelors Never-married Farming-fishing Own-child White Male United-States 0 +39 0.433333337 0.08509165 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 +45 0.5 0.229754061 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +25 0.2777778 0.07308186 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +69 0.7666667 0.071775876 1 0 0 0.5050505 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 +36 0.4 0.0503743179 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Wife White Male ? 0 +34 0.377777785 0.0163439885 0.6875 0.07688077 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.18048501 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.122101024 0.5 0 0 0.454545468 ? 12th Married-civ-spouse ? Husband Black Male United-States 0 +28 0.311111122 0.06905951 0.625 0 0 0.4040404 Private Some-college Separated Handlers-cleaners Not-in-family Black Male United-States 0 +27 0.3 0.0469837449 0.625 0 0 0.6060606 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +41 0.455555558 0.141505554 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Not-in-family White Female United-States 0 +18 0.2 0.262103915 0.5625 0 0 0.3030303 State-gov HS-grad Never-married Sales Not-in-family Black Female United-States 0 +44 0.4888889 0.1418787 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +47 0.5222222 0.06385713 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 +36 0.4 0.201196209 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +66 0.733333349 0.159546182 0.0625 0 0 0.4040404 Private Preschool Widowed Priv-house-serv Other-relative White Female Guatemala 0 +33 0.366666675 0.114600547 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +39 0.433333337 0.112141475 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 1 +30 0.333333343 0.166468084 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 +34 0.377777785 0.137436062 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +62 0.6888889 0.0823368952 0.875 0 0 0.323232323 Self-emp-not-inc Masters Divorced Prof-specialty Unmarried White Female United-States 0 +21 0.233333334 0.121464536 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +50 0.5555556 0.104784451 0.875 0.07298073 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.0773972 0.8125 0.03103031 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.1305862 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.0756170452 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Other-relative White Female United-States 0 +26 0.2888889 0.115799434 0.6875 0 0 0.5050505 Federal-gov Assoc-voc Never-married Craft-repair Own-child White Male Japan 0 +50 0.5555556 0.06427877 0.25 0 0.3624885 0.656565666 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male Canada 0 +45 0.5 0.120992385 0.875 0 0 0.4040404 Federal-gov Masters Divorced Exec-managerial Not-in-family White Male United-States 1 +46 0.51111114 0.08479261 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +17 0.188888893 0.486097932 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Male United-States 0 +56 0.622222245 0.132934824 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.238293141 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 1 +47 0.5222222 0.225417852 0.875 0 0 0.424242437 Private Masters Separated Machine-op-inspct Unmarried Asian-Pac-Islander Female India 0 +23 0.25555557 0.158855125 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +51 0.566666663 0.237946942 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Separated Other-service Unmarried White Female United-States 0 +19 0.211111113 0.136768579 0.625 0 0 0.25252524 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +33 0.366666675 0.04238687 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.0798481852 0.5625 0 0 0.8080808 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +52 0.5777778 0.06680384 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +36 0.4 0.127751976 0.625 0 0 0.4040404 Private Some-college Separated Other-service Other-relative Black Female United-States 0 +34 0.377777785 0.152813524 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +26 0.2888889 0.07379513 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Female United-States 0 +26 0.2888889 0.0450406 0.5 0 0 0.989899 Self-emp-inc 12th Married-civ-spouse Sales Husband Other Male Dominican-Republic 0 +35 0.3888889 0.180703908 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.0938166156 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +32 0.355555564 0.139112487 0.4375 0 0 0.5050505 Private 11th Divorced Craft-repair Own-child White Male United-States 0 +23 0.25555557 0.136821121 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Other-relative White Female United-States 0 +28 0.311111122 0.1982872 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +20 0.222222224 0.260566235 0.375 0 0 0.353535354 Private 10th Never-married Other-service Other-relative White Male Mexico 0 +17 0.188888893 0.249146461 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Male United-States 0 +56 0.622222245 0.06056557 0.5625 0.03103031 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +26 0.2888889 0.118547454 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +43 0.477777779 0.162662625 0.8125 0.01506015 0 0.363636374 State-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +45 0.5 0.117481925 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +34 0.377777785 0.112815008 0.625 0.07688077 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +54 0.6 0.19712536 0.125 0 0 0.353535354 Private 1st-4th Married-civ-spouse Other-service Husband White Male Mexico 0 +51 0.566666663 0.0907978341 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Other-service Unmarried White Female United-States 0 +58 0.644444466 0.06449968 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +49 0.544444442 0.0563223027 0.75 0.02597026 0 0.4040404 Private Assoc-acdm Separated Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.14985469 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +44 0.4888889 0.0196099561 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +26 0.2888889 0.04488299 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +39 0.433333337 0.03632102 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +19 0.211111113 0.0294597242 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 +37 0.411111116 0.07028939 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +49 0.544444442 0.08392509 0.5625 0 0 0.323232323 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +45 0.5 0.07731974 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried Black Female United-States 0 +60 0.6666667 0.04534234 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 +28 0.311111122 0.0357963368 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family Black Male United-States 0 +23 0.25555557 0.009273896 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Machine-op-inspct Husband Amer-Indian-Eskimo Male United-States 0 +44 0.4888889 0.1366413 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +19 0.211111113 0.100712262 0.625 0 0 0.121212125 State-gov Some-college Never-married Farming-fishing Own-child White Male United-States 0 +37 0.411111116 0.08949859 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.07567968 0.5625 0 0 0.3838384 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +56 0.622222245 0.105225623 0.8125 0.07688077 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.08867081 0.75 0 0 0.545454562 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.104106881 0.8125 0 0 0.363636374 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Vietnam 1 +23 0.25555557 0.0891086161 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +44 0.4888889 0.0840214044 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +38 0.422222227 0.186272025 0.5625 0.07688077 0 0.7070707 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.0714040846 0.625 0.05178052 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +57 0.6333333 0.09101741 0.875 0 0 0.2020202 Self-emp-not-inc Masters Never-married Farming-fishing Not-in-family White Male United-States 0 +35 0.3888889 0.0583604164 0.9375 0.07688077 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.0722237751 0.8125 1 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.07667382 0.625 0 0 1 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +76 0.844444454 0.01705322 0.875 0 0 0.151515156 Federal-gov Masters Widowed Prof-specialty Not-in-family White Female United-States 0 +57 0.6333333 0.128349409 0.5625 0 0 0.3030303 Local-gov HS-grad Divorced Handlers-cleaners Not-in-family Black Female United-States 0 +58 0.644444466 0.101051055 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Female United-States 0 +51 0.566666663 0.0325606763 0.875 0.07298073 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.142193913 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband Black Male United-States 0 +38 0.422222227 0.152428269 0.5625 0 0 0.25252524 Private HS-grad Married-AF-spouse Other-service Wife White Female United-States 0 +53 0.5888889 0.1911107 0.5625 0 0.459595948 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.0431749076 0.25 0 0 0.2020202 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.158053622 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +44 0.4888889 0.166955724 0.6875 0.0861408561 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 1 +23 0.25555557 0.4144709 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +23 0.25555557 0.109846741 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Sales Own-child White Male United-States 0 +44 0.4888889 0.12947017 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.249331012 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +28 0.311111122 0.16331999 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.114469208 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +34 0.377777785 0.09711155 0.0625 0 0 0.25252524 Local-gov Preschool Never-married Adm-clerical Own-child Black Female United-States 0 +38 0.422222227 0.08482022 0.8125 0.2782828 0 0.454545468 Private Bachelors Separated Exec-managerial Not-in-family White Male United-States 1 +26 0.2888889 0.137250841 0.625 0 0 0.373737365 Private Some-college Never-married Sales Not-in-family Black Female United-States 0 +39 0.433333337 0.142109722 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.318298936 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child Black Male United-States 0 +33 0.366666675 0.134901553 0.875 0 0 0.1919192 State-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 +43 0.477777779 0.195102066 0.875 0 0.5847107 0.4040404 Private Masters Divorced Prof-specialty Unmarried White Female United-States 1 +30 0.333333343 0.0745077357 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family Asian-Pac-Islander Female China 0 +59 0.655555546 0.09403619 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.0264106337 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.0349975266 0.625 0 0 0.24242425 Private Some-college Never-married Tech-support Own-child Black Male United-States 0 +48 0.533333361 0.0793753639 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Other-service Not-in-family White Male United-States 0 +49 0.544444442 0.03418053 0.8125 0.01506015 0 0.353535354 Private Bachelors Widowed Prof-specialty Unmarried White Female United-States 0 +41 0.455555558 0.114645 0.5625 0 0.500229537 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +20 0.222222224 0.1022358 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +49 0.544444442 0.113295913 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +37 0.411111116 0.0792420059 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Other-relative White Male United-States 0 +18 0.2 0.10583315 0.5 0 0 0.08080808 Private 12th Never-married Sales Own-child White Female United-States 0 +61 0.677777767 0.152198583 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +26 0.2888889 0.119856134 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +66 0.733333349 0.09034118 0.8125 0 0 0.121212125 Private Bachelors Widowed Other-service Not-in-family White Male United-States 0 +68 0.75555557 0.129036412 0.875 0.0327303261 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +27 0.3 0.134149209 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Wife White Female United-States 0 +66 0.733333349 0.176837832 0.625 0 0 0.07070707 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +28 0.311111122 0.04474559 0.375 0 0 0.151515156 Private 10th Never-married Other-service Unmarried White Female United-States 0 +26 0.2888889 0.0523073636 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +25 0.2777778 0.155489475 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +46 0.51111114 0.129881024 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +62 0.6888889 0.12191917 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +35 0.3888889 0.135006621 0.5625 0 0.453168035 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +26 0.2888889 0.0255390815 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +40 0.444444448 0.0747758 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family White Female United-States 0 +31 0.344444454 0.164790317 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male Honduras 0 +52 0.5777778 0.210464031 0.5625 0 0 0.4040404 Private HS-grad Widowed Transport-moving Not-in-family White Male United-States 0 +61 0.677777767 0.164000928 0.5625 0 0 0.121212125 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +39 0.433333337 0.102392733 0.4375 0 0 0.4040404 State-gov 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.07017758 0.5625 0.00114001136 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +47 0.5222222 0.115073368 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +33 0.366666675 0.0923334956 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband Other Male Ecuador 0 +17 0.188888893 0.229376882 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Own-child White Male United-States 0 +26 0.2888889 0.200864822 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +25 0.2777778 0.0768839642 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +39 0.433333337 0.131115615 0.5625 0 0 0.161616161 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.126790166 0.875 0.07298073 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.222873241 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +27 0.3 0.0539938919 0.625 0 0 0.2020202 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 +48 0.533333361 0.05620241 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.0576356947 0.4375 0 0 0.05050505 Self-emp-not-inc 11th Married-civ-spouse Other-service Wife White Female United-States 0 +40 0.444444448 0.07855567 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 +24 0.266666681 0.09428742 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child Black Male United-States 0 +55 0.6111111 0.09146801 0.8125 0 0.3624885 0.353535354 Private Bachelors Married-civ-spouse Exec-managerial Husband Other Male India 0 +56 0.622222245 0.0510438122 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.167448759 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.0192442276 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.0209758841 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.1461058 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +36 0.4 0.36988762 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.07496169 0.4375 0 0 0.5050505 Self-emp-not-inc 11th Never-married Craft-repair Own-child White Male Mexico 0 +25 0.2777778 0.140688553 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +36 0.4 0.164117455 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Own-child Black Female United-States 0 +37 0.411111116 0.220356241 0.625 0 0 0.7070707 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male ? 0 +39 0.433333337 0.08842699 0.75 0.05178052 0 0.4848485 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.173378557 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child Black Male United-States 0 +33 0.366666675 0.1450039 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child Black Male United-States 0 +31 0.344444454 0.0394569971 0.625 0 0 0.464646459 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +49 0.544444442 0.134287953 0.625 0 0 0.222222224 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +34 0.377777785 0.07690754 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Transport-moving Not-in-family White Male ? 0 +40 0.444444448 0.09255778 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male Trinadad&Tobago 0 +27 0.3 0.145807415 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 +50 0.5555556 0.132352218 1 0 0 0.232323229 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +38 0.422222227 0.241037786 0.5 0 0 0.5050505 Private 12th Never-married Machine-op-inspct Not-in-family Black Female United-States 0 +55 0.6111111 0.172650456 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Exec-managerial Unmarried Black Male United-States 0 +49 0.544444442 0.113282442 0.25 0 0 0.7070707 Self-emp-not-inc 7th-8th Married-civ-spouse Other-service Husband White Male Italy 0 +40 0.444444448 0.145211339 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Other-service Not-in-family Other Male Mexico 0 +42 0.466666669 0.124389693 0.6875 0 0 0.3030303 Private Assoc-voc Divorced Tech-support Not-in-family White Female United-States 0 +51 0.566666663 0.115790009 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.194132179 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Female Laos 0 +30 0.333333343 0.09703207 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +70 0.7777778 0.0369426943 1 0 0 0.2020202 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 +40 0.444444448 0.09536103 0.375 0 0 0.4040404 Private 10th Never-married Other-service Unmarried Black Female United-States 0 +43 0.477777779 0.121899642 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Separated Craft-repair Unmarried White Male United-States 0 +24 0.266666681 0.100160643 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +22 0.244444445 0.117616631 0.25 0 0 0.4040404 ? 7th-8th Never-married ? Own-child White Male United-States 0 +38 0.422222227 0.124469846 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +52 0.5777778 0.05998094 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.09920085 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +33 0.366666675 0.114482678 0.6875 0 0 0.4040404 Private Assoc-voc Separated Protective-serv Not-in-family White Female United-States 0 +21 0.233333334 0.150193483 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +27 0.3 0.0276815947 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +31 0.344444454 0.022305442 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +29 0.322222233 0.109483704 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female Hong 1 +49 0.544444442 0.08221566 0.1875 0 0.597566545 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Greece 0 +61 0.677777767 0.0289202239 0.8125 0 0 0.07070707 ? Bachelors Never-married ? Not-in-family White Male United-States 1 +46 0.51111114 0.2625727 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male Germany 1 +37 0.411111116 0.09358088 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +56 0.622222245 0.09555905 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +37 0.411111116 0.116334222 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.07982933 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +31 0.344444454 0.153489083 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +36 0.4 0.0543831959 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife Asian-Pac-Islander Female South 0 +52 0.5777778 0.134496748 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +40 0.444444448 0.15209958 0.625 0 0 0.6060606 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.118869409 0.5625 0 0 0.6060606 Private HS-grad Married-spouse-absent Exec-managerial Other-relative White Female United-States 0 +63 0.7 0.118391871 0.375 0 0 0.4040404 Private 10th Separated Machine-op-inspct Not-in-family Black Male United-States 0 +30 0.333333343 0.198699415 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.294890225 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Sales Husband White Male Peru 0 +50 0.5555556 0.181984976 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.163055286 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +39 0.433333337 0.07917735 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.09867213 0.5625 0 0 0.4848485 Private HS-grad Separated Machine-op-inspct Unmarried White Female United-States 0 +52 0.5777778 0.14979744 0.5625 0 0.5456841 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 +17 0.188888893 0.1458842 0.4375 0 0 0.2020202 ? 11th Never-married ? Own-child Black Female United-States 0 +46 0.51111114 0.106412388 0.6875 0 0.143480256 0.4040404 Private Assoc-voc Divorced Tech-support Unmarried Black Female United-States 0 +26 0.2888889 0.251600832 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +30 0.333333343 0.13122271 0.625 0 0.399449021 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.04063501 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +21 0.233333334 0.06498463 0.625 0 0 0.121212125 State-gov Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 +39 0.433333337 0.1422195 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.166868165 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband Black Male United-States 0 +40 0.444444448 0.13755931 0.875 1 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.1327624 0.625 0 0 0.2020202 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +47 0.5222222 0.120118812 0.8125 0.0406404063 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +20 0.222222224 0.197545648 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 +35 0.3888889 0.0237959735 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.136091679 0.8125 0.14084141 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 +32 0.355555564 0.04169044 0.4375 0 0 0.151515156 Private 11th Divorced Other-service Unmarried White Female United-States 0 +42 0.466666669 0.739172459 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.119210213 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Unmarried White Male United-States 0 +27 0.3 0.198887318 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child Black Female United-States 0 +53 0.5888889 0.200858086 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.141397789 0.1875 0 0 0.25252524 Self-emp-not-inc 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +26 0.2888889 0.111091428 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +47 0.5222222 0.285054624 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.08369272 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Own-child Black Female United-States 0 +70 0.7777778 0.156846642 0.625 0 0 0.3030303 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.0493020527 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 0 +43 0.477777779 0.0186306369 0.875 0 0 0.454545468 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +65 0.722222269 0.310980976 0.5625 0 0 0.25252524 Private HS-grad Divorced Sales Unmarried White Female ? 0 +40 0.444444448 0.0602227375 0.5625 0 0.3838384 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +64 0.7111111 0.021435909 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.188373446 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +43 0.477777779 0.148966968 0.8125 0 0 0.353535354 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +50 0.5555556 0.14953813 0.5625 0 0 0.4848485 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +19 0.211111113 0.122088231 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 +32 0.355555564 0.175830215 0.8125 0.0217402168 0 0.6060606 Self-emp-not-inc Bachelors Never-married Prof-specialty Own-child Black Female ? 0 +32 0.355555564 0.137934476 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +42 0.466666669 0.2589794 0.4375 0.01506015 0 0.5050505 Private 11th Divorced Sales Unmarried White Male Mexico 0 +41 0.455555558 0.1943605 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.123064183 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female England 0 +20 0.222222224 0.3175392 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 +45 0.5 0.17784813 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.0987798944 1 0 0.43663913 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.136745691 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Machine-op-inspct Own-child White Male United-States 0 +43 0.477777779 0.147038639 0.8125 0 0 0.5050505 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 +28 0.311111122 0.09000105 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +35 0.3888889 0.0309401546 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +36 0.4 0.2625774 0.5625 0 0 0.5050505 ? HS-grad Married-spouse-absent ? Unmarried Black Male United-States 0 +38 0.422222227 0.135796 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +32 0.355555564 0.07727663 0.8125 0 0 0.353535354 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +50 0.5555556 0.06585685 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +34 0.377777785 0.100698121 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.0556487665 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +30 0.333333343 0.0323390849 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family White Female France 0 +61 0.677777767 0.109569244 0.1875 0 0 0.4040404 State-gov 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 0 +27 0.3 0.14402996 0.8125 0 0 0.3838384 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +61 0.677777767 0.149152189 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Female United-States 0 +18 0.2 0.287488759 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Other-relative White Male Mexico 0 +31 0.344444454 0.1391583 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +31 0.344444454 0.03386262 0.8125 0 0 0.6060606 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +20 0.222222224 0.121570952 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +35 0.3888889 0.14857161 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 +51 0.566666663 0.13656047 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 +43 0.477777779 0.0511839055 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.114867263 0.4375 0 0 0.2020202 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +55 0.6111111 0.07775215 0.9375 1 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +59 0.655555546 0.0164234657 0.5625 0 0 0.4040404 Private HS-grad Widowed Priv-house-serv Not-in-family White Female United-States 0 +21 0.233333334 0.140813828 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +22 0.244444445 0.0439312868 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Female United-States 0 +60 0.6666667 0.018499298 0.625 0 0 0.4040404 Federal-gov Some-college Widowed Exec-managerial Not-in-family White Female England 0 +49 0.544444442 0.121147975 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.297790468 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +61 0.677777767 0.163859487 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +64 0.7111111 0.2132592 0.1875 0 0 0.4040404 Private 5th-6th Divorced Craft-repair Not-in-family White Male United-States 0 +63 0.7 0.140675753 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +27 0.3 0.0260287412 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +23 0.25555557 0.095151566 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Own-child Black Female United-States 0 +41 0.455555558 0.0197507255 0.5625 0 0 0.454545468 State-gov HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +18 0.2 0.234786034 0.5 0 0 0.25252524 ? 12th Never-married ? Own-child Black Male United-States 0 +40 0.444444448 0.0840214044 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 1 +55 0.6111111 0.3218599 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.147073671 0.375 0 0.3677686 0.121212125 Private 10th Never-married Other-service Own-child White Female United-States 0 +34 0.377777785 0.105616271 0.625 0 0.3452709 0.6060606 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +24 0.266666681 0.1804702 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +30 0.333333343 0.0240613464 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 +29 0.322222233 0.126077577 0.875 0 0 0.6060606 Private Masters Never-married Exec-managerial Not-in-family Asian-Pac-Islander Male United-States 0 +52 0.5777778 0.105059929 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +57 0.6333333 0.279512763 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.0696933046 0.8125 0 0 0.454545468 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +43 0.477777779 0.14220199 0.875 0 0 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 1 +61 0.677777767 0.137027219 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Other-relative White Female United-States 0 +38 0.422222227 0.0258044526 0.8125 0.1502415 0 0.656565666 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.120051458 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 +40 0.444444448 0.175631523 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male Mexico 0 +41 0.455555558 0.0248695873 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +19 0.211111113 0.197069451 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +28 0.311111122 0.3111251 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +59 0.655555546 0.127745241 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.128360182 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +31 0.344444454 0.231830567 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.227313846 0.75 0 0 0.4848485 Private Assoc-acdm Never-married Machine-op-inspct Not-in-family White Male United-States 0 +54 0.6 0.0354508124 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.131272539 0.6875 0 0.5610652 0.424242437 Private Assoc-voc Separated Craft-repair Not-in-family White Male United-States 1 +20 0.222222224 0.114562154 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +27 0.3 0.127566755 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Female United-States 0 +32 0.355555564 0.138123065 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.208991021 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Wife Black Female United-States 0 +27 0.3 0.09028595 0.4375 0 0 0.454545468 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 +40 0.444444448 0.06193756 0.8125 0 0 0.464646459 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.103685245 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.157671735 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.124826148 0.625 0 0 0.25252524 Private Some-college Never-married Craft-repair Own-child White Female United-States 0 +28 0.311111122 0.110306092 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Other Male United-States 0 +65 0.722222269 0.05644219 0.625 0 0 0.272727281 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +61 0.677777767 0.09388465 0.625 0 0 0.161616161 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +18 0.2 0.322205424 0.4375 0 0 0.25252524 Private 11th Never-married Sales Own-child White Female United-States 0 +35 0.3888889 0.12584655 0.8125 0.05178052 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Own-child White Male United-States 1 +45 0.5 0.177006215 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +68 0.75555557 0.102482989 0.5625 0 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +25 0.2777778 0.07710825 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +48 0.533333361 0.07949256 0.9375 0 0 0.13131313 Private Prof-school Divorced Sales Not-in-family White Male United-States 0 +19 0.211111113 0.148245618 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.147789627 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family Black Female United-States 1 +54 0.6 0.125356212 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.323034555 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Sales Not-in-family White Male United-States 0 +25 0.2777778 0.0540929027 0.6875 0.0486504845 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.07300171 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +67 0.7444445 0.0848155 0.625 0 0 0.08080808 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +35 0.3888889 0.1192843 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Unmarried White Female United-States 0 +26 0.2888889 0.128484786 0.625 0 0 0.181818187 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +61 0.677777767 0.121661879 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +54 0.6 0.05928383 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Unmarried White Male United-States 0 +50 0.5555556 0.0911554843 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Sales Husband Asian-Pac-Islander Male Cambodia 1 +32 0.355555564 0.06779933 0.3125 0 0 0.4040404 Private 9th Separated Machine-op-inspct Unmarried White Female Columbia 0 +34 0.377777785 0.123631969 0.5625 0 0 0.25252524 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +36 0.4 0.107789092 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +50 0.5555556 0.206633642 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.181346461 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +22 0.244444445 0.207673579 0.5625 0 0 0.1919192 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +58 0.644444466 0.144937888 0.4375 0 0 0.2020202 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 +27 0.3 0.2823093 0.1875 0 0 0.75757575 Private 5th-6th Never-married Other-service Not-in-family White Male Mexico 0 +62 0.6888889 0.119107164 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +36 0.4 0.124237478 0.8125 0.2782828 0 0.5555556 Self-emp-inc Bachelors Never-married Tech-support Not-in-family White Male United-States 1 +21 0.233333334 0.208356544 0.625 0.005940059 0 0.04040404 Local-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +41 0.455555558 0.038253393 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Wife White Female England 0 +28 0.311111122 0.13596034 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.1209055 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +54 0.6 0.196507052 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.164302677 0.625 0 0.395087242 0.25252524 Private Some-college Never-married Sales Own-child Amer-Indian-Eskimo Female United-States 0 +76 0.844444454 0.07891736 0.25 0 0 0.3030303 Self-emp-not-inc 7th-8th Never-married Farming-fishing Not-in-family White Male United-States 0 +25 0.2777778 0.06796165 0.8125 0 0 0.25252524 ? Bachelors Married-civ-spouse ? Wife White Female United-States 0 +34 0.377777785 0.107308865 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.177053362 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.12598598 0.4375 0 0 0.3030303 Private 11th Never-married Sales Unmarried White Female United-States 0 +17 0.188888893 0.186961725 0.4375 0 0 0.151515156 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +55 0.6111111 0.113875151 0.625 0 0 0.2020202 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +51 0.566666663 0.06478728 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +26 0.2888889 0.0414917432 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband Other Male Mexico 0 +44 0.4888889 0.0294408668 0.8125 0 0 0.4848485 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +65 0.722222269 0.133281022 0.375 0 0 0.7070707 ? 10th Married-civ-spouse ? Husband White Male United-States 0 +54 0.6 0.0669722259 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.11964599 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 +42 0.466666669 0.1358674 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Male United-States 0 +26 0.2888889 0.149691686 0.5625 0 0 0.7070707 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +39 0.433333337 0.0580202825 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 0 +46 0.51111114 0.153983459 0.4375 0 0 0.4040404 ? 11th Widowed ? Unmarried Black Female United-States 0 +34 0.377777785 0.233065829 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male El-Salvador 0 +59 0.655555546 0.0589410029 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +20 0.222222224 0.02554851 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +34 0.377777785 0.124646313 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +62 0.6888889 0.0845238641 0.5625 0.05178052 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female Scotland 1 +51 0.566666663 0.1076005 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.07330547 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +47 0.5222222 0.0745393857 0.8125 0 0 0.5050505 Private Bachelors Separated Prof-specialty Unmarried White Female United-States 0 +21 0.233333334 0.14825505 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 +30 0.333333343 0.0305966511 0.6875 0 0 0.4949495 Self-emp-not-inc Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 +38 0.422222227 0.104174905 0.5625 0 0 0.6060606 Private HS-grad Separated Sales Not-in-family White Male United-States 0 +45 0.5 0.175979748 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female Philippines 1 +23 0.25555557 0.0484028831 0.625 0 0 0.353535354 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +34 0.377777785 0.116854869 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.171275109 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +31 0.344444454 0.07535706 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +50 0.5555556 0.09862498 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.318451822 0.125 0 0 0.5252525 Private 1st-4th Never-married Handlers-cleaners Other-relative White Male Mexico 0 +28 0.311111122 0.192155346 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Sales Wife Black Female United-States 1 +23 0.25555557 0.124378249 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.138648421 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +28 0.311111122 0.0564954 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +27 0.3 0.120269015 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +46 0.51111114 0.113689929 0.8125 0 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +27 0.3 0.181479827 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +25 0.2777778 0.03189388 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Wife White Female United-States 0 +34 0.377777785 0.0197035782 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.104628868 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 +36 0.4 0.1577896 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Female United-States 0 +30 0.333333343 0.173670188 0.25 0 0 0.4848485 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.153720781 0.625 0 0 0.474747479 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 +36 0.4 0.153306559 0.1875 0 0 0.323232323 Private 5th-6th Married-spouse-absent Craft-repair Other-relative White Male Mexico 0 +29 0.322222233 0.274011344 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +50 0.5555556 0.0185484663 0.625 0.07688077 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +19 0.211111113 0.06550864 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +20 0.222222224 0.156274825 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +52 0.5777778 0.11351683 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +20 0.222222224 0.347407073 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.236667216 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.108451173 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +60 0.6666667 0.0179975145 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.1105425 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family Black Male United-States 0 +59 0.655555546 0.06628792 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +36 0.4 0.0200807564 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Other-relative White Male United-States 0 +25 0.2777778 0.171490639 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male Cuba 0 +49 0.544444442 0.139877617 0.25 0 0 0.7070707 Private 7th-8th Divorced Craft-repair Not-in-family White Male United-States 0 +25 0.2777778 0.146177188 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Other-service Unmarried White Female United-States 0 +50 0.5555556 0.115308434 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Unmarried White Female United-States 0 +44 0.4888889 0.133541688 0.75 0 0 0.434343427 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.08844181 0.5625 0 0 0.4040404 ? HS-grad Separated ? Unmarried White Female United-States 0 +33 0.366666675 0.0538308956 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.320145756 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Separated Craft-repair Own-child White Male United-States 0 +56 0.622222245 0.09044625 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +56 0.622222245 0.0496704727 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.08454542 0.8125 0 0 0.424242437 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +38 0.422222227 0.104853153 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried Black Female United-States 0 +21 0.233333334 0.205393672 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +67 0.7444445 0.101377718 0.25 0 0 0.24242425 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.167774752 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 +50 0.5555556 0.110545196 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +59 0.655555546 0.205279171 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.105773874 0.4375 0 0 0.4040404 Private 11th Widowed Handlers-cleaners Unmarried Black Female United-States 0 +30 0.333333343 0.267082 0.5625 0 0 0.2929293 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 +42 0.466666669 0.343551069 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +64 0.7111111 0.134718344 0.5625 0 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +61 0.677777767 0.0408438034 0.8125 0 0 0.454545468 ? Bachelors Never-married ? Not-in-family White Female United-States 0 +26 0.2888889 0.0601641424 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +47 0.5222222 0.13502413 0.6875 0.0406404063 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +78 0.8666667 0.0557787567 0.625 0 0 0.0303030312 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.07894497 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +27 0.3 0.136192709 0.4375 0 0 0.4040404 Private 11th Separated Farming-fishing Other-relative White Male Puerto-Rico 0 +51 0.566666663 0.08313369 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.238102525 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +55 0.6111111 0.01797192 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +20 0.222222224 0.137832776 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 +30 0.333333343 0.15158096 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.06652904 0.625 0 0 0.3030303 ? Some-college Never-married ? Not-in-family White Male United-States 0 +19 0.211111113 0.1777673 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +30 0.333333343 0.07290809 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.248970672 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Married-civ-spouse Craft-repair Not-in-family White Male United-States 1 +26 0.2888889 0.228546411 0.5625 0 0 0.969697 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +59 0.655555546 0.09804911 0.75 0 0 0.353535354 ? Assoc-acdm Married-civ-spouse ? Husband White Male United-States 1 +53 0.5888889 0.213721246 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +24 0.266666681 0.109731562 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.1254889 0.625 0 0 0.545454562 Private Some-college Separated Prof-specialty Own-child White Male United-States 0 +36 0.4 0.171213821 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +39 0.433333337 0.07283602 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +53 0.5888889 0.193517908 0.5625 0 0 0.323232323 Private HS-grad Divorced Machine-op-inspct Unmarried Black Male United-States 0 +75 0.8333334 0.05491596 0.5625 0 0 0.353535354 Self-emp-inc HS-grad Widowed Sales Other-relative Asian-Pac-Islander Male United-States 1 +36 0.4 0.0242101979 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.138026074 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +56 0.622222245 0.140640065 0.5625 0 0.43663913 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +29 0.322222233 0.09000105 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +60 0.6666667 0.048280973 0.3125 0 0 0.4949495 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +58 0.644444466 0.3842932 0.5625 0 0 0.3838384 Private HS-grad Widowed Sales Not-in-family White Male United-States 0 +67 0.7444445 0.0248372573 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +35 0.3888889 0.170408264 0.625 0.07688077 0 0.3838384 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.0337413847 0.625 0 0 0.8080808 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +37 0.411111116 0.2269003 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +54 0.6 0.09149292 0.625 0 0 0.5050505 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +63 0.7 0.113186121 0.9375 0 0 0.3030303 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +47 0.5222222 0.1266036 0.4375 0 0 0.3838384 Private 11th Divorced Other-service Not-in-family White Female United-States 0 +23 0.25555557 0.07904803 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +55 0.6111111 0.172779113 0.5625 0.0486504845 0 0.454545468 Private HS-grad Separated Machine-op-inspct Not-in-family White Male United-States 0 +49 0.544444442 0.205034673 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Wife White Female United-States 0 +39 0.433333337 0.167043969 0.6875 0.05178052 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +23 0.25555557 0.154795736 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +19 0.211111113 0.107628115 0.625 0 0 0.121212125 Private Some-college Never-married Other-service Own-child White Female United-States 0 +44 0.4888889 0.111366235 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.0170983467 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 +35 0.3888889 0.330705434 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Own-child Black Male United-States 0 +23 0.25555557 0.166855365 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Own-child White Female Cuba 0 +48 0.533333361 0.121594526 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.1276092 0.625 0.0217602178 0 0.4040404 Private Some-college Divorced Handlers-cleaners Own-child White Male United-States 0 +44 0.4888889 0.282301217 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +55 0.6111111 0.114612669 0.8125 0 0 0.25252524 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 +33 0.366666675 0.116854869 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.284921259 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 +24 0.266666681 0.0485746339 0.8125 0.0220202189 0 0.3030303 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +32 0.355555564 0.0130005628 0.75 0 0 0.565656543 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male England 1 +24 0.266666681 0.173516631 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +44 0.4888889 0.07961986 0.8125 1 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.1750112 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +39 0.433333337 0.07765112 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male France 1 +26 0.2888889 0.107537866 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Other-service Husband White Male United-States 0 +34 0.377777785 0.255807042 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.153528824 0.875 1 0 0.656565666 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.0249201022 0.875 0 0 0.75757575 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +73 0.811111152 0.08889443 0.8125 0 0 0.05050505 ? Bachelors Married-civ-spouse ? Husband Asian-Pac-Islander Male Vietnam 0 +32 0.355555564 0.0835533 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +56 0.622222245 0.183931485 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +59 0.655555546 0.114570908 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.06482702 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.09491111 0.8125 0 0.365013778 0.4040404 Private Bachelors Never-married Sales Own-child Asian-Pac-Islander Male South 0 +52 0.5777778 0.155355439 0.5625 0.0378103778 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Other Male Columbia 0 +30 0.333333343 0.131727174 0.625 0.0332503319 0 0.5050505 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +23 0.25555557 0.07932013 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +43 0.477777779 0.0759497657 0.5625 0.0861408561 0 0.434343427 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 1 +61 0.677777767 0.0537662357 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.06999707 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +68 0.75555557 0.108940162 0.375 0 0 0.161616161 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 +41 0.455555558 0.07185198 0.875 0.2782828 0 0.5050505 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 +42 0.466666669 0.132358953 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +48 0.533333361 0.0417490341 0.3125 0 0 0.2020202 ? 9th Separated ? Not-in-family Amer-Indian-Eskimo Female United-States 0 +19 0.211111113 0.1061524 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +31 0.344444454 0.0925214142 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Handlers-cleaners Not-in-family Asian-Pac-Islander Male India 0 +40 0.444444448 0.07466938 0.75 0 0.5456841 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.0504362844 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family Asian-Pac-Islander Female Philippines 0 +51 0.566666663 0.06643879 0.5625 0.14084141 0 0.4040404 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 1 +44 0.4888889 0.0975129753 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.119745679 0.8125 0 0 0.3030303 Private Bachelors Never-married Sales Own-child White Female England 0 +30 0.333333343 0.06981252 0.4375 0 0 0.353535354 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +44 0.4888889 0.109185331 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.146562457 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +34 0.377777785 0.3186714 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +17 0.188888893 0.07631213 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male ? 0 +61 0.677777767 0.0544862449 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +30 0.333333343 0.113414451 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +45 0.5 0.0262341686 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 +22 0.244444445 0.07260769 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +49 0.544444442 0.128831655 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +39 0.433333337 0.138316363 0.75 0 0 0.454545468 Private Assoc-acdm Widowed Adm-clerical Unmarried White Female United-States 0 +39 0.433333337 0.161800489 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 +34 0.377777785 0.136967957 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative White Female United-States 0 +52 0.5777778 0.103093885 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.136699885 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.07082215 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.160620466 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Own-child White Male United-States 0 +24 0.266666681 0.7311318 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +25 0.2777778 0.055607006 0.75 0 0 0.434343427 Private Assoc-acdm Never-married Other-service Own-child White Male United-States 0 +71 0.788888931 0.0376943573 0.25 0 0 0.1010101 Private 7th-8th Widowed Transport-moving Not-in-family White Male United-States 0 +27 0.3 0.108497649 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Wife Black Female United-States 0 +28 0.311111122 0.175979748 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family Black Female United-States 0 +54 0.6 0.12270923 0.6875 0.1502415 0 0.3838384 Private Assoc-voc Married-civ-spouse Protective-serv Husband Black Male Jamaica 1 +18 0.2 0.09356539 0.4375 0 0 0.1010101 Private 11th Never-married Sales Own-child Black Female United-States 0 +49 0.544444442 0.13484025 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +36 0.4 0.138316363 0.5625 0 0 0.25252524 Private HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 +57 0.6333333 0.168519 0.5625 0 0 0.5050505 Private HS-grad Widowed Transport-moving Unmarried White Male United-States 0 +56 0.622222245 0.04522986 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male Portugal 1 +17 0.188888893 0.164694667 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Male United-States 0 +30 0.333333343 0.159357592 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.07322195 0.375 0 0 0.4040404 Private 10th Never-married Sales Own-child White Female United-States 0 +26 0.2888889 0.119314611 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +61 0.677777767 0.08705164 0.375 0 0 0.4848485 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.149781272 0.625 0 0 0.4040404 ? Some-college Divorced ? Unmarried White Male United-States 0 +24 0.266666681 0.09773726 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +44 0.4888889 0.04193291 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family White Female United-States 0 +38 0.422222227 0.07293907 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Other-relative White Female United-States 0 +61 0.677777767 0.112671547 0.25 0 0 0.4040404 ? 7th-8th Widowed ? Not-in-family Black Female United-States 0 +25 0.2777778 0.065864265 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Own-child White Male United-States 0 +34 0.377777785 0.0750418454 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.252254844 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +42 0.466666669 0.193468735 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.229941308 0.375 0 0 0.2020202 ? 10th Never-married ? Own-child Black Male United-States 0 +48 0.533333361 0.187268853 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.06624885 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.213531986 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +55 0.6111111 0.198285192 0.6875 0.068490684 0 0.4040404 State-gov Assoc-voc Widowed Prof-specialty Unmarried White Female United-States 0 +41 0.455555558 0.162254453 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Divorced Farming-fishing Other-relative White Male United-States 0 +45 0.5 0.02215659 0.1875 0 0 0.353535354 Private 5th-6th Never-married Machine-op-inspct Own-child White Female United-States 0 +49 0.544444442 0.06560967 0.25 0 0 0.454545468 Private 7th-8th Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male Laos 0 +19 0.211111113 0.04873359 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +39 0.433333337 0.230650544 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +43 0.477777779 0.126423776 0.625 0.0217402168 0 0.454545468 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +42 0.466666669 0.204342276 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +17 0.188888893 0.0756318644 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +30 0.333333343 0.1405451 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Prof-specialty Not-in-family Black Female United-States 0 +61 0.677777767 0.01911154 0.875 0 0 0.7070707 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +48 0.533333361 0.1396082 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +60 0.6666667 0.059725672 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +57 0.6333333 0.03223334 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +27 0.3 0.2508916 0.1875 0 0 0.454545468 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +24 0.266666681 0.12862353 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +41 0.455555558 0.02559229 0.5 0 0 0.8484849 Private 12th Divorced Transport-moving Not-in-family White Male United-States 1 +42 0.466666669 0.17331928 0.5625 0 0 0.4040404 Private HS-grad Widowed Transport-moving Unmarried White Male United-States 0 +34 0.377777785 0.0859497339 0.8125 0 0 0.151515156 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +22 0.244444445 0.09383952 0.3125 0 0 0.363636374 ? 9th Never-married ? Unmarried Black Female United-States 0 +47 0.5222222 0.110744558 0.5625 0 0 0.434343427 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +50 0.5555556 0.070385024 0.5625 0 0.454545438 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +30 0.333333343 0.03779943 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +38 0.422222227 0.199509 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.106175974 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.149864122 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +34 0.377777785 0.175808 0.625 0 0.379017442 0.3838384 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.09871793 0.5625 0.143441439 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Male United-States 1 +34 0.377777785 0.0787429139 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.08931135 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +68 0.75555557 0.124965571 0.625 0 0 0.2020202 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +22 0.244444445 0.3372522 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female Mexico 0 +42 0.466666669 0.122656018 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +37 0.411111116 0.155917168 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.161254257 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +38 0.422222227 0.12073914 0.625 0 0 0.3030303 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +72 0.8 0.08150037 0.5625 0 0 0.5555556 Without-pay HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +40 0.444444448 0.169994712 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 +19 0.211111113 0.110175423 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Male United-States 0 +55 0.6111111 0.09649459 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Hungary 1 +30 0.333333343 0.19256486 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.07617271 0.8125 0 0.2506887 0.4040404 Private Bachelors Separated Adm-clerical Unmarried White Female United-States 0 +29 0.322222233 0.187671632 0.8125 0.03103031 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.11755871 0.625 0 0 0.04040404 Private Some-college Married-civ-spouse Prof-specialty Husband Black Male United-States 0 +29 0.322222233 0.127115488 0.8125 0 0 0.454545468 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.0485907979 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +46 0.51111114 0.221064791 0.9375 0 0 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.111682124 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.213983253 0.375 0 0 0.151515156 Private 10th Never-married Sales Own-child Black Female United-States 0 +35 0.3888889 0.145027474 0.6875 0 0 0.353535354 Private Assoc-voc Divorced Other-service Unmarried White Female United-States 0 +38 0.422222227 0.129951075 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +36 0.4 0.105308466 0.3125 0 0 0.4040404 Private 9th Never-married Handlers-cleaners Own-child White Male United-States 0 +24 0.266666681 0.1044423 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.102795504 0.8125 0 0 1 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +19 0.211111113 0.201313391 0.4375 0 0 0.4040404 Private 11th Never-married Sales Not-in-family White Female Honduras 0 +30 0.333333343 0.130192876 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.101238295 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +27 0.3 0.2588447 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +27 0.3 0.205863789 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 +66 0.733333349 0.122837871 0.25 0 0 0.3030303 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +65 0.722222269 0.01582402 0.625 0 0.499081731 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +37 0.411111116 0.283984363 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family Black Female United-States 1 +17 0.188888893 0.03887843 0.4375 0 0 0.3030303 Private 11th Never-married Sales Own-child White Male United-States 0 +19 0.211111113 0.20733884 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +57 0.6333333 0.06973776 0.1875 0 0 0.5050505 Private 5th-6th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +54 0.6 0.09175156 0.875 0 0 0.3030303 Self-emp-not-inc Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +21 0.233333334 0.1559724 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +43 0.477777779 0.163536862 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Not-in-family White Male United-States 0 +50 0.5555556 0.11023806 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.193776548 0.4375 0 0 0.4848485 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +31 0.344444454 0.126328126 0.5625 0.1502415 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.149864122 0.9375 0 0 0.3838384 Private Prof-school Divorced Prof-specialty Unmarried White Female United-States 0 +20 0.222222224 0.0278546922 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.03996417 0.8125 0 0 0.151515156 Private Bachelors Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 +62 0.6888889 0.0570860878 0.3125 0 0 0.353535354 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 +41 0.455555558 0.274414778 0.5 0 0 0.4040404 Private 12th Divorced Machine-op-inspct Not-in-family Black Female United-States 0 +37 0.411111116 0.109398164 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.118175671 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +28 0.311111122 0.0354299359 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.168807954 0.875 0 0 0.3030303 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.157589555 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +28 0.311111122 0.253452361 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +50 0.5555556 0.131768942 0.375 0 0 0.4040404 Private 10th Separated Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.152067244 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Not-in-family White Male Mexico 0 +84 0.933333337 0.26159 0.25 0 0 0.1010101 Private 7th-8th Married-civ-spouse Prof-specialty Husband Black Male United-States 0 +48 0.533333361 0.1475182 0.9375 0 0 0.353535354 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +61 0.677777767 0.113594286 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +44 0.4888889 0.121646389 0.625 0 0 0.424242437 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.07728539 0.5625 0 0 0.6060606 Private HS-grad Separated Handlers-cleaners Unmarried Asian-Pac-Islander Female South 0 +25 0.2777778 0.119914062 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +47 0.5222222 0.107795827 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.180860177 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 +37 0.411111116 0.117763467 0.625 0 0 0.171717167 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +28 0.311111122 0.0555585138 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Own-child Asian-Pac-Islander Female United-States 0 +34 0.377777785 0.1489636 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 +32 0.355555564 0.0323390849 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Divorced Other-service Not-in-family White Female United-States 0 +24 0.266666681 0.1463092 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +22 0.244444445 0.119823135 0.625 0 0 0.25252524 ? Some-college Never-married ? Not-in-family Asian-Pac-Islander Female United-States 0 +30 0.333333343 0.02652783 0.625 0 0 1 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +56 0.622222245 0.02518615 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.07774339 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.07688935 0.625 0 0 0.262626261 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +40 0.444444448 0.08021863 0.625 0 0.4331956 0.686868668 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.242827371 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +39 0.433333337 0.151911661 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +33 0.366666675 0.07303673 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.1551251 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Male Dominican-Republic 0 +32 0.355555564 0.106419794 0.625 0 0 0.5555556 Private Some-college Never-married Machine-op-inspct Other-relative White Male Ecuador 0 +37 0.411111116 0.120877884 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +71 0.788888931 0.06728205 0.1875 0 0 0.75757575 Private 5th-6th Widowed Priv-house-serv Not-in-family Asian-Pac-Islander Female United-States 0 +30 0.333333343 0.182453081 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +20 0.222222224 0.0284763649 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +53 0.5888889 0.1127362 0.5625 0 0.399449021 0.5050505 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.1851634 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +44 0.4888889 0.0241866242 0.8125 0 0.43663913 0.565656543 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.0458010174 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +21 0.233333334 0.018294543 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 +37 0.411111116 0.1927292 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-spouse-absent Other-service Unmarried Black Female United-States 0 +36 0.4 0.0642969459 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +25 0.2777778 0.0337460972 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Female United-States 0 +54 0.6 0.344626039 1 0 0.453856736 0.434343427 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.127755344 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.0774995759 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +20 0.222222224 0.1451083 0.625 0 0 0.3838384 State-gov Some-college Never-married Craft-repair Own-child White Male United-States 0 +32 0.355555564 0.117726423 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +24 0.266666681 0.0619645 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 0 +59 0.655555546 0.06798051 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +56 0.622222245 0.08019708 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +40 0.444444448 0.18689774 0.5625 0 0 0.8484849 Self-emp-not-inc HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +35 0.3888889 0.178932518 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +38 0.422222227 0.07718099 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +24 0.266666681 0.1532924 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +30 0.333333343 0.08736214 0.625 0 0.4242424 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +61 0.677777767 0.11789009 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +36 0.4 0.0899633244 0.125 0 0 0.4040404 Private 1st-4th Never-married Farming-fishing Not-in-family White Male Mexico 0 +20 0.222222224 0.20788911 0.625 0 0 0.2020202 Local-gov Some-college Never-married Protective-serv Own-child Asian-Pac-Islander Female United-States 0 +36 0.4 0.10512796 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +45 0.5 0.256028652 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +22 0.244444445 0.14196828 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +31 0.344444454 0.127809227 0.5625 0 0.459366381 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +34 0.377777785 0.174226537 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +24 0.266666681 0.150445372 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Unmarried White Male United-States 0 +42 0.466666669 0.137951314 0.3125 0 0 0.353535354 ? 9th Never-married ? Own-child Black Male United-States 0 +23 0.25555557 0.2756305 0.8125 0 0 0.25252524 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +46 0.51111114 0.207500488 0.9375 0 0 0.4040404 Federal-gov Prof-school Separated Prof-specialty Unmarried White Female Germany 1 +60 0.6666667 0.107124984 0.9375 0 0 0.7070707 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male Germany 1 +40 0.444444448 0.237853318 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried Black Female United-States 0 +55 0.6111111 0.0963356346 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +47 0.5222222 0.2053317 0.875 0.2782828 0 0.4040404 Private Masters Separated Tech-support Not-in-family White Male United-States 1 +28 0.311111122 0.0208202973 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +55 0.6111111 0.0841918141 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.122154236 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +54 0.6 0.228072241 0.875 0 0 0.5252525 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.07812259 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 +38 0.422222227 0.07484854 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +61 0.677777767 0.135564312 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Widowed Machine-op-inspct Not-in-family White Female United-States 0 +62 0.6888889 0.09251265 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male South 0 +29 0.322222233 0.08986297 0.625 0.0501305 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.129458711 0.5625 0 0 0.323232323 Private HS-grad Never-married Protective-serv Not-in-family Black Female United-States 0 +19 0.211111113 0.148178264 0.625 0 0 0.5050505 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +40 0.444444448 0.237496346 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.114114255 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +42 0.466666669 0.214868277 0.5625 0.0288502872 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +55 0.6111111 0.08065643 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Other-relative Asian-Pac-Islander Female Thailand 0 +55 0.6111111 0.136202142 0.5625 0.02407024 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 +43 0.477777779 0.0668280944 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.07494755 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.175954819 0.625 0 0 0.454545468 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +28 0.311111122 0.176280811 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female Mexico 0 +36 0.4 0.122592032 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 +49 0.544444442 0.0273899529 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +41 0.455555558 0.145793945 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Own-child Black Female United-States 0 +60 0.6666667 0.215784281 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +35 0.3888889 0.190577254 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.112276182 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +51 0.566666663 0.195901543 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +23 0.25555557 0.306701332 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male Guatemala 0 +51 0.566666663 0.0557572059 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.0380789451 0.4375 0.010550105 0 0.181818187 Private 11th Never-married Sales Own-child White Female India 0 +33 0.366666675 0.07406118 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.119839974 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 +38 0.422222227 0.1295456 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.159137338 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +26 0.2888889 0.0226374939 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +21 0.233333334 0.141094029 0.625 0 0 0.474747479 Private Some-college Never-married Sales Own-child White Female United-States 0 +26 0.2888889 0.166367054 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.210084155 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +39 0.433333337 0.137910232 0.625 0 0 0.2020202 ? Some-college Divorced ? Not-in-family White Female United-States 0 +33 0.366666675 0.202519029 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Not-in-family Black Male United-States 0 +42 0.466666669 0.01634264 0.625 0 0 0.3838384 State-gov Some-college Divorced Transport-moving Unmarried White Male United-States 0 +28 0.311111122 0.179207325 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 +20 0.222222224 0.15287751 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +66 0.733333349 0.243930623 0.8125 0 0.5064279 0.25252524 Local-gov Bachelors Widowed Prof-specialty Not-in-family Black Female United-States 0 +31 0.344444454 0.230127871 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male India 0 +36 0.4 0.120891355 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Male Canada 0 +39 0.433333337 0.1642562 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 1 +52 0.5777778 0.1748381 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +61 0.677777767 0.107645631 0.25 0.07688077 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Poland 1 +27 0.3 0.148085311 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +45 0.5 0.139385939 0.5625 0 0 0.5050505 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.1654012 0.3125 0 0 0.4040404 Private 9th Never-married Other-service Own-child Amer-Indian-Eskimo Male United-States 0 +25 0.2777778 0.0259229951 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +24 0.266666681 0.122922741 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +38 0.422222227 0.130541086 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male Italy 0 +51 0.566666663 0.351359367 0.625 0 0 0.24242425 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +29 0.322222233 0.03128029 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +45 0.5 0.040591903 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +59 0.655555546 0.178053558 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +41 0.455555558 0.129193351 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Own-child White Male United-States 0 +23 0.25555557 0.07266225 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +43 0.477777779 0.117582284 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 +17 0.188888893 0.09653837 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 +32 0.355555564 0.0849542543 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.133776739 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +68 0.75555557 0.142309085 0.875 0 0.549127638 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.160430521 0.5625 0 0.4331956 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +43 0.477777779 0.173623726 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +61 0.677777767 0.123495914 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +28 0.311111122 0.09997205 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +47 0.5222222 0.0479698 0.5625 0 0 0.6060606 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +21 0.233333334 0.1594721 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Never-married Craft-repair Not-in-family White Male United-States 0 +39 0.433333337 0.02165144 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +39 0.433333337 0.234047174 0.4375 0 0.430670351 0.464646459 Private 11th Divorced Craft-repair Not-in-family White Male United-States 0 +34 0.377777785 0.12171711 0.625 0 0.500229537 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 +57 0.6333333 0.127215177 0.3125 0 0 0.4040404 ? 9th Divorced ? Not-in-family White Male United-States 0 +27 0.3 0.206604689 0.8125 0 0 0.4040404 Private Bachelors Divorced Handlers-cleaners Own-child Black Male United-States 0 +21 0.233333334 0.32225728 0.625 0 0 0.121212125 State-gov Some-college Never-married Other-service Own-child Black Female United-States 0 +25 0.2777778 0.167703345 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Not-in-family White Male Mexico 0 +51 0.566666663 0.031171849 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.09969321 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child Black Female United-States 0 +19 0.211111113 0.187320039 0.625 0 0 0.121212125 Private Some-college Never-married Other-service Own-child White Male United-States 0 +27 0.3 0.128325164 0.8125 0.07298073 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.118995361 0.625 0 0 0.353535354 Private Some-college Never-married Sales Other-relative Black Female United-States 0 +33 0.366666675 0.136300474 0.5625 0 0 0.323232323 ? HS-grad Divorced ? Unmarried White Female United-States 0 +36 0.4 0.160580724 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +33 0.366666675 0.0255532246 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +60 0.6666667 0.0240108315 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.258295774 0.625 0.1502415 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.138007224 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Prof-specialty Wife Black Female United-States 0 +42 0.466666669 0.01401558 0.5625 0 0 0.75757575 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 +34 0.377777785 0.09982253 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.134809941 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +30 0.333333343 0.1141614 0.875 0 0 0.151515156 Private Masters Married-civ-spouse Other-service Husband White Male United-States 1 +53 0.5888889 0.0154764755 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 +34 0.377777785 0.247118458 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Germany 0 +37 0.411111116 0.21886301 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +27 0.3 0.2165932 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 +31 0.344444454 0.162564278 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +30 0.333333343 0.139801517 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +33 0.366666675 0.148756832 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +41 0.455555558 0.22669217 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.0379886925 0.625 0 0 0.3030303 State-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +65 0.722222269 0.121424794 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +30 0.333333343 0.05474623 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +51 0.566666663 0.05814758 0.6875 0.0406404063 0 0.5555556 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +30 0.333333343 0.018219782 0.625 0 0 0.4040404 Local-gov Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +49 0.544444442 0.193740174 0.875 0.04787048 0 0.454545468 Private Masters Divorced Sales Not-in-family White Male United-States 1 +37 0.411111116 0.123751856 0.5625 0.031370312 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +42 0.466666669 0.0678922758 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +62 0.6888889 0.104461156 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 +67 0.7444445 0.06916728 0.5625 0.0108601088 0 0.353535354 ? HS-grad Widowed ? Not-in-family White Male United-States 0 +31 0.344444454 0.101739407 0.625 0.05178052 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +50 0.5555556 0.369340032 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +33 0.366666675 0.11709936 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Other-relative Asian-Pac-Islander Male India 0 +27 0.3 0.233819515 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Other-relative White Male United-States 0 +31 0.344444454 0.214955837 0.6875 0.04386044 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Mexico 1 +35 0.3888889 0.13317056 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Other-relative Amer-Indian-Eskimo Male United-States 0 +55 0.6111111 0.132763073 0.625 0 0 0.0606060624 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +54 0.6 0.0736968 0.8125 0 0.453856736 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +56 0.622222245 0.122625038 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +21 0.233333334 0.124296077 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +66 0.733333349 0.118244365 0.25 0 0 0.2020202 Private 7th-8th Widowed Other-service Not-in-family White Female Germany 0 +46 0.51111114 0.08218872 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.22936745 0.8125 0 0 0.3838384 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +43 0.477777779 0.06866684 0.875 0 0 0.454545468 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +40 0.444444448 0.120904826 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +52 0.5777778 0.151758775 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +59 0.655555546 0.0359020829 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.190342188 0.6875 0 0 0.4040404 Local-gov Assoc-voc Separated Adm-clerical Own-child Black Female United-States 0 +33 0.366666675 0.123941123 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +20 0.222222224 0.168494761 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.1323273 0.5625 0 0 0.353535354 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +59 0.655555546 0.148704961 0.375 0 0 0.4040404 ? 10th Widowed ? Unmarried White Female United-States 0 +42 0.466666669 0.120414495 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.04436437 0.5625 0 0 0.434343427 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +54 0.6 0.0238828585 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +35 0.3888889 0.0666704848 0.25 0 0 0.3030303 Private 7th-8th Never-married Machine-op-inspct Own-child White Female United-States 0 +36 0.4 0.189998686 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 +21 0.233333334 0.0948094055 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +30 0.333333343 0.0223101564 0.5625 0 0 0.141414136 Private HS-grad Separated Farming-fishing Unmarried White Female United-States 0 +46 0.51111114 0.0606463924 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +32 0.355555564 0.06936462 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female Laos 1 +21 0.233333334 0.144397035 0.625 0 0 0.646464646 Private Some-college Never-married Sales Other-relative White Male United-States 0 +39 0.433333337 0.121685453 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +54 0.6 0.187464178 0.5625 0 0 0.434343427 Private HS-grad Married-spouse-absent Exec-managerial Not-in-family White Female United-States 0 +32 0.355555564 0.124226704 0.625 0.0346403457 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.0946060047 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +42 0.466666669 0.13643451 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Italy 0 +62 0.6888889 0.121952176 0.375 0 0 0.3030303 ? 10th Widowed ? Not-in-family White Female United-States 0 +28 0.311111122 0.1934849 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.14545314 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.05560162 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 +19 0.211111113 0.0281166974 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +27 0.3 0.04956338 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +54 0.6 0.177762583 0.125 0 0 0.5050505 Private 1st-4th Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.132092908 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Female United-States 0 +27 0.3 0.191782877 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +30 0.333333343 0.197976038 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Not-in-family White Male ? 0 +35 0.3888889 0.22929 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +66 0.733333349 0.118468657 0.3125 0 0 0.4040404 ? 9th Married-civ-spouse ? Husband White Male United-States 0 +19 0.211111113 0.186550871 0.625 0 0 0.2020202 Local-gov Some-college Never-married Prof-specialty Own-child White Female United-States 0 +30 0.333333343 0.1088425 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +32 0.355555564 0.09703207 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +31 0.344444454 0.159217492 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +26 0.2888889 0.151506871 0.6875 0 0 0.656565666 Private Assoc-voc Never-married Sales Other-relative Black Male United-States 0 +44 0.4888889 0.101901725 0.625 0 0 0.25252524 Private Some-college Widowed Sales Not-in-family White Female United-States 0 +52 0.5777778 0.0464617573 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.162917882 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +32 0.355555564 0.127608523 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family White Female United-States 0 +19 0.211111113 0.0242553242 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 +33 0.366666675 0.0574895367 0.5625 0 0 0.3030303 Private HS-grad Separated Machine-op-inspct Not-in-family White Male United-States 0 +20 0.222222224 0.106145665 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +61 0.677777767 0.132878929 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.244322613 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family Black Female United-States 0 +24 0.266666681 0.26624617 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 +31 0.344444454 0.0976281539 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Divorced Craft-repair Not-in-family White Male United-States 0 +20 0.222222224 0.110234022 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Own-child White Female United-States 0 +32 0.355555564 0.0952983946 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Exec-managerial Unmarried White Female United-States 0 +29 0.322222233 0.09960834 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Wife White Female United-States 0 +61 0.677777767 0.156804219 0.375 0 0 0.24242425 Private 10th Divorced Other-service Not-in-family White Male United-States 0 +48 0.533333361 0.0475973338 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +29 0.322222233 0.0224388018 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 +61 0.677777767 0.0427869521 0.5 0 0 0.5252525 ? 12th Never-married ? Not-in-family Black Male United-States 0 +34 0.377777785 0.398537755 0.625 0 0 0.4848485 Private Some-college Never-married Handlers-cleaners Not-in-family Black Male ? 0 +22 0.244444445 0.134921074 0.75 0 0 0.151515156 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +32 0.355555564 0.06581981 0.5625 0 0.3838384 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.07357085 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.06929929 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried White Female United-States 0 +26 0.2888889 0.112551652 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative Asian-Pac-Islander Male Hong 0 +35 0.3888889 0.123188108 0.5625 0.0861408561 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 1 +62 0.6888889 0.1333046 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.045386795 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +50 0.5555556 0.08526408 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family Black Male United-States 0 +34 0.377777785 0.03331908 0.8125 1 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +37 0.411111116 0.08077632 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +63 0.7 0.106552482 0.125 0 0 0.444444448 Private 1st-4th Widowed Machine-op-inspct Unmarried White Female Portugal 0 +35 0.3888889 0.229743958 0.3125 0 0 0.4040404 Private 9th Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +55 0.6111111 0.0683799163 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.1366413 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 1 +25 0.2777778 0.1314746 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband Other Male United-States 0 +51 0.566666663 0.0863956138 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.17720288 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.240853235 0.8125 0.07298073 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.0691235 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 1 +26 0.2888889 0.115251184 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +46 0.51111114 0.1457623 0.6875 0 0 0.4040404 Private Assoc-voc Married-spouse-absent Craft-repair Unmarried White Male United-States 0 +24 0.266666681 0.086046055 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Other-relative White Male United-States 0 +19 0.211111113 0.190406859 0.25 0 0 0.8080808 Private 7th-8th Never-married Adm-clerical Own-child White Male United-States 0 +35 0.3888889 0.09386646 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.210671484 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Own-child Black Male United-States 0 +18 0.2 0.06254711 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child White Female United-States 0 +46 0.51111114 0.118156806 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.07019778 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +29 0.322222233 0.09751701 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +65 0.722222269 0.120518222 0.5625 0 0 0.2020202 Private HS-grad Widowed Other-service Unmarried Black Female Jamaica 0 +41 0.455555558 0.142286181 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 +34 0.377777785 0.08966226 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +58 0.644444466 0.06973776 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +39 0.433333337 0.1163194 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 +21 0.233333334 0.19026272 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +31 0.344444454 0.217588678 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +33 0.366666675 0.196331263 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.1446092 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.07816704 0.5625 0.0297702979 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +32 0.355555564 0.152687579 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +31 0.344444454 0.146040469 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 +41 0.455555558 0.103139684 0.9375 0.1502415 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.207071438 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male Philippines 1 +27 0.3 0.187324762 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +45 0.5 0.08230255 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried Black Female United-States 0 +34 0.377777785 0.105670825 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +17 0.188888893 0.0248379316 0.375 0 0 0.1010101 Private 10th Never-married Sales Own-child White Female United-States 0 +25 0.2777778 0.0883529 0.5625 0 0 0.232323229 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +34 0.377777785 0.0420258567 0.8125 0 0 0.6262626 Self-emp-inc Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +33 0.366666675 0.0492043868 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +21 0.233333334 0.06522778 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.218846172 0.5625 0 0 0.5050505 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +61 0.677777767 0.08802018 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +40 0.444444448 0.120551221 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +58 0.644444466 0.054581888 0.625 0 0 0.121212125 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.102355018 0.625 0 0 0.5858586 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.187314659 0.5625 0 0 0.6060606 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +52 0.5777778 0.12335515 0.5 0 0 0.5050505 Self-emp-not-inc 12th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.12368653 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Unmarried White Female United-States 0 +49 0.544444442 0.166963816 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 +22 0.244444445 0.149174422 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +32 0.355555564 0.0798481852 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female ? 1 +21 0.233333334 0.349247843 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +25 0.2777778 0.130522221 0.625 0 0 0.5050505 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 +34 0.377777785 0.106058784 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +48 0.533333361 0.0953125358 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 1 +61 0.677777767 0.106898 0.5625 0 0 1 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +21 0.233333334 0.169901088 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +20 0.222222224 0.135009989 0.25 0 0 0.5252525 Private 7th-8th Never-married Machine-op-inspct Own-child White Female United-States 0 +30 0.333333343 0.231553748 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +44 0.4888889 0.187004834 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +44 0.4888889 0.196379751 0.5625 0 0 0.6060606 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 +29 0.322222233 0.101960994 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.1489636 0.9375 0 0 0.353535354 Private Prof-school Divorced Tech-support Not-in-family White Female United-States 0 +35 0.3888889 0.132132649 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.203691646 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +26 0.2888889 0.0251760464 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +37 0.411111116 0.0555935353 0.3125 0 0 0.7070707 Self-emp-not-inc 9th Married-civ-spouse Transport-moving Husband White Male United-States 1 +33 0.366666675 0.123206973 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Transport-moving Not-in-family White Male ? 0 +44 0.4888889 0.107705571 0.25 0 0 0.5555556 Private 7th-8th Married-civ-spouse Other-service Wife White Female United-States 0 +34 0.377777785 0.143315345 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.1395651 0.75 0 0 0.05050505 Local-gov Assoc-acdm Never-married Craft-repair Own-child White Male United-States 0 +30 0.333333343 0.134836212 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +41 0.455555558 0.121300869 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +23 0.25555557 0.129865527 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Female United-States 0 +19 0.211111113 0.07133269 0.5625 0 0 0.7070707 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +48 0.533333361 0.2514749 0.125 0.0378103778 0 0.5050505 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +26 0.2888889 0.157735035 0.625 0 0 0.2020202 State-gov Some-college Never-married Other-service Not-in-family White Male United-States 0 +32 0.355555564 0.1757036 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 1 +26 0.2888889 0.07348059 0.5625 0 0 0.4848485 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.115439095 0.875 0.07298073 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.14086704 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.194682449 0.5625 0 0.3996786 0.4040404 ? HS-grad Divorced ? Not-in-family Black Male United-States 0 +54 0.6 0.1160372 0.875 0 0 0.4040404 Private Masters Divorced Tech-support Not-in-family White Male United-States 1 +36 0.4 0.04918351 0.5625 0 0 0.5555556 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +41 0.455555558 0.08259284 0.5625 0 0 0.4848485 Private HS-grad Divorced Handlers-cleaners Unmarried White Male United-States 0 +27 0.3 0.076537095 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +68 0.75555557 0.173279539 0.8125 0 0.5456841 0.353535354 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +21 0.233333334 0.129187956 0.625 0 0 0.75757575 ? Some-college Never-married ? Own-child White Male United-States 0 +56 0.622222245 0.0240606721 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Own-child White Male United-States 0 +40 0.444444448 0.0207172465 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +46 0.51111114 0.0709413663 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +55 0.6111111 0.253288031 0.3125 0 0 0.454545468 ? 9th Never-married ? Own-child White Female United-States 0 +43 0.477777779 0.14771083 0.3125 0 0 0.4040404 Private 9th Divorced Transport-moving Not-in-family Black Male United-States 0 +46 0.51111114 0.1401403 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative White Male United-States 0 +51 0.566666663 0.05296069 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 +19 0.211111113 0.1416497 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +67 0.7444445 0.128416762 1 0.07896079 0 0.5050505 Local-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 +31 0.344444454 0.400205433 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.153886467 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +21 0.233333334 0.08527822 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +36 0.4 0.0203858688 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +23 0.25555557 0.146029681 0.5625 0 0 0.161616161 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +62 0.6888889 0.07797037 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +31 0.344444454 0.134281218 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 1 +52 0.5777778 0.1076005 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.126850113 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +24 0.266666681 0.2813138 0.8125 0 0 0.3030303 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +55 0.6111111 0.0955119058 0.5625 0.135501355 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 1 +38 0.422222227 0.199579716 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +36 0.4 0.111064486 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +17 0.188888893 0.304711044 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child Black Female United-States 0 +27 0.3 0.0287572276 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 +30 0.333333343 0.177135527 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family Black Male United-States 0 +43 0.477777779 0.112680972 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +51 0.566666663 0.06973035 0.4375 0 0 0.3030303 Private 11th Divorced Other-service Unmarried Black Female United-States 0 +47 0.5222222 0.06592757 0.8125 0.25236252 0 0.353535354 Private Bachelors Widowed Priv-house-serv Unmarried White Female United-States 1 +49 0.544444442 0.181461647 1 0 0.518365443 0.5050505 State-gov Doctorate Never-married Exec-managerial Not-in-family White Female United-States 1 +34 0.377777785 0.1343964 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.02657767 0.5625 0 0 0.6060606 ? HS-grad Never-married ? Own-child White Male United-States 0 +79 0.8777778 0.04187768 1 0 0 0.0606060624 Federal-gov Doctorate Widowed Exec-managerial Not-in-family White Male United-States 1 +28 0.311111122 0.1610623 0.625 0 0 0.4040404 State-gov Some-college Divorced Other-service Unmarried White Male United-States 0 +41 0.455555558 0.101763651 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +21 0.233333334 0.223351449 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +31 0.344444454 0.137039348 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +45 0.5 0.1020526 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.0268363077 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +32 0.355555564 0.2018145 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Germany 0 +67 0.7444445 0.08310944 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.141131073 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.160841376 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +29 0.322222233 0.3362264 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +38 0.422222227 0.134855077 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.07682267 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +18 0.2 0.292603582 0.5625 0 0 0.3030303 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +47 0.5222222 0.124863192 0.5625 0.0501305 0 0.24242425 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +22 0.244444445 0.151650324 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.254549563 0.625 0 0.5456841 0.4848485 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +27 0.3 0.08982188 0.8125 0 0 0.5050505 ? Bachelors Married-spouse-absent ? Not-in-family White Male ? 0 +28 0.311111122 0.152818918 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Unmarried Asian-Pac-Islander Female ? 0 +32 0.355555564 0.136045888 0.9375 0.04508045 0 0.4040404 Private Prof-school Married-civ-spouse Sales Husband White Male ? 0 +40 0.444444448 0.193309784 0.9375 0.1502415 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male Germany 1 +23 0.25555557 0.102316625 0.8125 0 0.3946281 0.4040404 Private Bachelors Never-married Machine-op-inspct Own-child White Female United-States 0 +25 0.2777778 0.156067371 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +44 0.4888889 0.120232642 0.625 0 0.518365443 0.6060606 Self-emp-inc Some-college Never-married Sales Not-in-family White Male United-States 0 +43 0.477777779 0.120472416 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +31 0.344444454 0.07452188 0.8125 0 0.453856736 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.0998588949 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.146764517 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.0520015769 0.875 0 0 0.3030303 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.253933966 0.75 0 0 0.4040404 ? Assoc-acdm Never-married ? Own-child White Male United-States 0 +78 0.8666667 0.124441557 0.25 0.01797018 0 0.151515156 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +64 0.7111111 0.0541070476 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.178544566 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.0687395856 0.5 0 0 0.3030303 ? 12th Widowed ? Not-in-family White Male United-States 0 +20 0.222222224 0.224854767 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +35 0.3888889 0.199688151 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +27 0.3 0.07857588 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.237958387 0.5625 1 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.09592748 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.13525112 0.5 0 0 0.353535354 Local-gov 12th Married-civ-spouse Adm-clerical Husband White Male Puerto-Rico 0 +29 0.322222233 0.08018563 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Female United-States 0 +33 0.366666675 0.113814533 0.125 0 0 0.24242425 Private 1st-4th Never-married Sales Own-child White Female United-States 0 +44 0.4888889 0.102229066 0.625 0 0 0.4040404 Private Some-college Widowed Exec-managerial Not-in-family Black Female United-States 0 +70 0.7777778 0.159671456 0.1875 0.0234602336 0 0.4040404 Private 5th-6th Widowed Other-service Other-relative White Female ? 0 +25 0.2777778 0.34341234 0.5625 0 0 0.7878788 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +24 0.266666681 0.167969391 0.8125 0 0 0.1010101 State-gov Bachelors Never-married Adm-clerical Other-relative White Female United-States 0 +42 0.466666669 0.07372643 0.8125 0.0297702979 0 0.4040404 State-gov Bachelors Divorced Adm-clerical Unmarried Black Female United-States 0 +53 0.5888889 0.168406516 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +39 0.433333337 0.168195039 0.8125 0 0 0.6060606 Private Bachelors Divorced Exec-managerial Unmarried Black Female United-States 0 +72 0.8 0.174284458 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +43 0.477777779 0.0431385376 0.3125 0 0 0.444444448 Self-emp-inc 9th Never-married Sales Own-child White Female Portugal 0 +25 0.2777778 0.103410445 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +37 0.411111116 0.130541086 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.1721433 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +39 0.433333337 0.13775599 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +64 0.7111111 0.107723758 0.5625 0.0263502635 0 0.24242425 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male Italy 0 +29 0.322222233 0.154469073 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 +50 0.5555556 0.08630873 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.11819116 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Unmarried White Female Mexico 0 +18 0.2 0.203282133 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +20 0.222222224 0.160918832 0.4375 0 0 0.323232323 Private 11th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 +32 0.355555564 0.1384659 0.625 0 0 0.5050505 Private Some-college Separated Tech-support Unmarried White Female United-States 0 +45 0.5 0.2292314 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +48 0.533333361 0.09958881 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Wife Black Female United-States 0 +20 0.222222224 0.08151317 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +23 0.25555557 0.1747795 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +34 0.377777785 0.128125116 0.8125 0 0.43663913 0.4848485 Federal-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +43 0.477777779 0.121639654 0.8125 0.0861408561 0 0.4040404 Private Bachelors Separated Exec-managerial Unmarried White Male United-States 1 +44 0.4888889 0.07837112 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male United-States 1 +47 0.5222222 0.121536605 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Tech-support Husband Black Male United-States 1 +47 0.5222222 0.177977443 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Not-in-family Black Female United-States 0 +46 0.51111114 0.133351743 0.125 0 0 0.2020202 Local-gov 1st-4th Never-married Other-service Not-in-family Amer-Indian-Eskimo Female United-States 0 +19 0.211111113 0.139151558 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +51 0.566666663 0.210914627 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +41 0.455555558 0.0668227 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Separated Exec-managerial Unmarried White Male United-States 0 +37 0.411111116 0.22940518 0.4375 0 0 0.4040404 Private 11th Separated Other-service Unmarried Black Female United-States 0 +31 0.344444454 0.04238687 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +25 0.2777778 0.030215431 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +46 0.51111114 0.0362987928 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +53 0.5888889 0.102922805 0.5625 0.05178052 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.0864825 1 0 0 0.4040404 Local-gov Doctorate Never-married Prof-specialty Unmarried White Female United-States 0 +28 0.311111122 0.226948112 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +60 0.6666667 0.0642855 0.625 0.031370312 0 0.464646459 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +43 0.477777779 0.03678239 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +45 0.5 0.212826118 0.5625 0.07688077 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.141653061 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Other-relative White Male Mexico 0 +19 0.211111113 0.121923216 0.4375 0 0 0.3030303 Private 11th Never-married Handlers-cleaners Other-relative White Male United-States 0 +51 0.566666663 0.08135017 0.9375 1 0 0.7070707 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband Other Male India 1 +19 0.211111113 0.173084214 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +64 0.7111111 0.0318568349 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.08450231 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.14141193 0.5625 0 0 0.4848485 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.122748964 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +63 0.7 0.05176786 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Protective-serv Husband Asian-Pac-Islander Male Philippines 1 +44 0.4888889 0.0619308241 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +44 0.4888889 0.0922647938 0.875 0.1502415 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.123556532 0.5625 0 0 0.7070707 Federal-gov HS-grad Never-married Exec-managerial Unmarried White Female Puerto-Rico 0 +24 0.266666681 0.088058576 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 +20 0.222222224 0.129236445 0.625 0 0 0.2020202 Federal-gov Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +21 0.233333334 0.157555208 0.625 0 0 0.24242425 ? Some-college Never-married ? Own-child White Female United-States 0 +20 0.222222224 0.0324111544 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +21 0.233333334 0.204957888 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 +34 0.377777785 0.191757292 0.625 0 0 0.5252525 Federal-gov Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +17 0.188888893 0.2702207 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Female United-States 0 +35 0.3888889 0.163909331 0.4375 0 0 0.4040404 Private 11th Separated Other-service Unmarried Black Female United-States 0 +26 0.2888889 0.0217389986 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +35 0.3888889 0.074451156 0.5625 0 0 0.7070707 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +25 0.2777778 0.173307166 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +27 0.3 0.277462542 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +52 0.5777778 0.264475435 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 +43 0.477777779 0.035359215 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 +36 0.4 0.150489837 0.875 0.07688077 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +37 0.411111116 0.05864869 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +58 0.644444466 0.151446924 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.130247429 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 +54 0.6 0.06630004 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Other-service Husband White Male United-States 0 +42 0.466666669 0.07855567 0.625 0 0 0.6060606 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +65 0.722222269 0.141698852 0.8125 1 0 0.656565666 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.0610814951 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Female Laos 0 +61 0.677777767 0.154740512 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male El-Salvador 0 +29 0.322222233 0.0402315632 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 +34 0.377777785 0.1299248 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.0606490858 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Not-in-family White Female Canada 0 +40 0.444444448 0.183847979 0.75 0 0 0.424242437 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +42 0.466666669 0.102425061 0.9375 0 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male Cuba 1 +50 0.5555556 0.20312655 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +18 0.2 0.115823686 0.5625 0 0.3677686 0.2020202 ? HS-grad Never-married ? Own-child White Female United-States 0 +49 0.544444442 0.212826118 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.162969753 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +41 0.455555558 0.08863108 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +70 0.7777778 0.140053421 0.625 0 0 0.05050505 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +51 0.566666663 0.0358300135 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.08151317 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +57 0.6333333 0.193458632 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.110399708 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +31 0.344444454 0.129206821 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.1378954 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 0 +45 0.5 0.1488363 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +39 0.433333337 0.246337831 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.0337460972 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +38 0.422222227 0.190807611 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +38 0.422222227 0.131025359 0.875 1 0 0.6060606 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +19 0.211111113 0.177367225 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +36 0.4 0.340048015 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +30 0.333333343 0.234788731 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.11715728 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.152309716 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Not-in-family Black Male Jamaica 0 +32 0.355555564 0.116100505 0.8125 0 0 0.3838384 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +57 0.6333333 0.08602922 0.9375 0.1502415 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.233733311 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +36 0.4 0.128870726 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.1668877 0.4375 0 0 0.3838384 Private 11th Never-married Sales Own-child White Female United-States 0 +25 0.2777778 0.176913261 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +37 0.411111116 0.06456165 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Unmarried White Female United-States 0 +31 0.344444454 0.0501789935 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +43 0.477777779 0.165229455 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +61 0.677777767 0.01957224 0.5625 0 0.6322314 0.25252524 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +56 0.622222245 0.134919733 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +35 0.3888889 0.1335895 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 0 +59 0.655555546 0.06765856 0.25 0 0 0.3838384 Private 7th-8th Separated Other-service Own-child Black Female United-States 0 +44 0.4888889 0.2311503 0.625 0 0.4331956 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.158740625 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Unmarried White Female United-States 0 +44 0.4888889 0.05606299 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +64 0.7111111 0.0595875978 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +26 0.2888889 0.133899331 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.113225862 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.132142752 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male ? 0 +30 0.333333343 0.1383561 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +46 0.51111114 0.468383282 0.5625 0 0 0.444444448 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.0938018039 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +44 0.4888889 0.129837915 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +59 0.655555546 0.08243389 0.625 0 0.453856736 0.4848485 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +65 0.722222269 0.124580309 1 1 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.121799953 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Female United-States 0 +33 0.366666675 0.10746108 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +34 0.377777785 0.07446193 0.5625 0 0 0.353535354 Private HS-grad Divorced Sales Own-child White Female United-States 0 +38 0.422222227 0.0696933046 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +62 0.6888889 0.120056845 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.09346503 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Male United-States 0 +41 0.455555558 0.216759562 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.164883256 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male Peru 0 +62 0.6888889 0.138790533 0.625 0 0 0.454545468 Local-gov Some-college Divorced Other-service Not-in-family White Male United-States 0 +53 0.5888889 0.112918727 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +69 0.7666667 0.11025019 0.625 0 0 0.161616161 State-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.0306768026 0.625 0 0 0.161616161 Self-emp-not-inc Some-college Never-married Sales Own-child White Female United-States 0 +47 0.5222222 0.2835486 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.04581045 0.625 0 0 0.909090936 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.118268616 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.100136392 0.5625 0 0 0.1010101 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +30 0.333333343 0.138964981 0.5625 0 0 0.7373737 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +39 0.433333337 0.183429033 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +73 0.811111152 0.0713178739 0.8125 0.0117301168 0 0.75757575 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +64 0.7111111 0.210478187 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.119670242 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +51 0.566666663 0.102922805 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +57 0.6333333 0.214939669 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +25 0.2777778 0.142994061 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 +53 0.5888889 0.140311375 0.5625 0 0.399449021 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +39 0.433333337 0.162214726 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +49 0.544444442 0.1407539 0.5625 0 0 0.161616161 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.297944039 0.8125 0 0.2506887 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.133492514 0.8125 0 0 0.5555556 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +46 0.51111114 0.175832242 0.875 0 0.453856736 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.04902725 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child Black Male United-States 0 +24 0.266666681 0.18548803 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +20 0.222222224 0.131855831 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 +50 0.5555556 0.311823577 0.375 0 0 0.08080808 Private 10th Married-civ-spouse Other-service Husband White Male El-Salvador 0 +24 0.266666681 0.178778946 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Not-in-family White Female United-States 0 +35 0.3888889 0.02106075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.165885478 0.8125 0 0 0.464646459 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +54 0.6 0.08646701 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +35 0.3888889 0.1557077 0.5625 0 0 0.454545468 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.138948143 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +47 0.5222222 0.2270148 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +48 0.533333361 0.130042672 0.5625 0 0 0.2020202 Private HS-grad Divorced Sales Own-child White Female United-States 0 +33 0.366666675 0.11426647 0.6875 0 0.383149683 0.5555556 Local-gov Assoc-voc Never-married Adm-clerical Own-child White Male United-States 0 +35 0.3888889 0.0242101979 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.09527347 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Female United-States 0 +36 0.4 0.169886276 0.0625 0 0 0.4040404 Private Preschool Never-married Machine-op-inspct Not-in-family Black Male Puerto-Rico 0 +30 0.333333343 0.08622319 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +39 0.433333337 0.101068564 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +25 0.2777778 0.1739578 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family Amer-Indian-Eskimo Male United-States 0 +40 0.444444448 0.126937672 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +25 0.2777778 0.108443767 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.271749616 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female Mexico 0 +53 0.5888889 0.122365728 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 +18 0.2 0.0809878 0.4375 0 0 0.1010101 Private 11th Never-married Other-service Own-child White Male United-States 0 +41 0.455555558 0.105761752 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Male United-States 0 +25 0.2777778 0.206713125 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +66 0.733333349 0.0189000517 0.25 0 0 0.5050505 Self-emp-not-inc 7th-8th Widowed Farming-fishing Unmarried White Male United-States 0 +53 0.5888889 0.06434949 0.625 0.0147101469 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +27 0.3 0.09092783 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.197613671 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Unmarried Black Female United-States 0 +23 0.25555557 0.124675274 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +29 0.322222233 0.165548041 0.375 0 0 0.8080808 Self-emp-not-inc 10th Divorced Craft-repair Not-in-family White Male United-States 0 +26 0.2888889 0.09025632 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +26 0.2888889 0.138098821 0.5625 0 0 0.424242437 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +26 0.2888889 0.164675817 0.3125 0 0 0.353535354 Private 9th Never-married Other-service Not-in-family White Male United-States 0 +38 0.422222227 0.107212543 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.272885859 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +34 0.377777785 0.119509935 0.625 0.1502415 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +32 0.355555564 0.271004021 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +57 0.6333333 0.124302812 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.20382905 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +38 0.422222227 0.06677286 0.8125 0 0 0.3838384 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +39 0.433333337 0.07592822 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Other Female Dominican-Republic 0 +35 0.3888889 0.1299403 0.5625 0 0.5456841 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.512563765 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 +75 0.8333334 0.08471986 0.625 0 0 0.08080808 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +28 0.311111122 0.122814976 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 +41 0.455555558 0.0788116157 0.875 0 0 0.5555556 Self-emp-not-inc Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +39 0.433333337 0.0206593238 0.3125 0 0 0.4040404 Federal-gov 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +31 0.344444454 0.3264413 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Tech-support Not-in-family White Male United-States 0 +38 0.422222227 0.211524859 0.5625 0 0 0.3838384 State-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.025956 0.625 0 0 0.3838384 State-gov Some-college Divorced Exec-managerial Unmarried Black Female ? 0 +27 0.3 0.111410685 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.1335895 0.875 0 0.43663913 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +46 0.51111114 0.07855769 0.8125 0 0 0.363636374 Private Bachelors Separated Prof-specialty Unmarried Black Female United-States 0 +20 0.222222224 0.124908321 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.07993911 0.625 0 0 0.2020202 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +69 0.7666667 0.05182107 0.5625 0 0 0.4040404 Private HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 +47 0.5222222 0.108200625 0.6875 0 0 0.353535354 Federal-gov Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 +49 0.544444442 0.08537319 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male Portugal 0 +20 0.222222224 0.142148778 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 +52 0.5777778 0.210096285 0.1875 0 0 0.151515156 Private 5th-6th Married-civ-spouse Sales Wife White Female El-Salvador 0 +33 0.366666675 0.19101572 0.1875 0 0 0.5959596 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 +18 0.2 0.104411989 0.4375 0 0 0.0606060624 Private 11th Never-married Other-service Own-child White Female United-States 0 +55 0.6111111 0.06773669 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Separated Farming-fishing Unmarried White Female United-States 0 +61 0.677777767 0.2562543 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Farming-fishing Husband Black Male United-States 0 +61 0.677777767 0.149486259 0.625 0.09386094 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +39 0.433333337 0.07714933 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +30 0.333333343 0.1674299 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +61 0.677777767 0.153207541 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +36 0.4 0.0445697978 0.75 0 0 0.151515156 Private Assoc-acdm Married-civ-spouse Sales Wife White Female United-States 0 +34 0.377777785 0.07248848 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.04740807 0.875 0.04386044 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +38 0.422222227 0.285319984 0.6875 0 0 0.363636374 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 +46 0.51111114 0.06643542 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.145492211 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +32 0.355555564 0.142065942 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Separated Handlers-cleaners Unmarried White Female Nicaragua 0 +60 0.6666667 0.172230184 0.8125 0 0 0.6060606 Local-gov Bachelors Widowed Prof-specialty Unmarried White Female United-States 1 +23 0.25555557 0.0522534773 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +29 0.322222233 0.102687739 0.8125 0.143441439 0 0.5050505 Private Bachelors Never-married Prof-specialty Unmarried White Female United-States 1 +22 0.244444445 0.136904642 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +25 0.2777778 0.176142067 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Male United-States 0 +29 0.322222233 0.0614189357 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +90 1 0.131630868 0.5625 0 0 0.3030303 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.183518618 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +32 0.355555564 0.209822163 0.5625 0 0 0.3838384 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +18 0.2 0.101963691 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Other-service Own-child Black Male Jamaica 0 +35 0.3888889 0.1263719 0.625 0 0 0.656565666 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +50 0.5555556 0.07337013 0.3125 0.0288502872 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.09118849 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +43 0.477777779 0.114085294 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.128731966 0.5625 0 0 0.656565666 Self-emp-inc HS-grad Never-married Exec-managerial Not-in-family White Male United-States 1 +51 0.566666663 0.314952135 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +31 0.344444454 0.251352966 0.625 0 0 0.424242437 Private Some-college Never-married Craft-repair Unmarried White Male Mexico 0 +69 0.7666667 0.0875998959 0.5625 0.023870239 0 0.4040404 Private HS-grad Separated Transport-moving Unmarried Black Female United-States 0 +57 0.6333333 0.134662449 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +71 0.788888931 0.07824113 0.625 0 0 0.141414136 ? Some-college Widowed ? Not-in-family White Female Canada 0 +28 0.311111122 0.028881833 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Own-child White Female United-States 0 +28 0.311111122 0.117643572 0.375 0 0 0.8080808 ? 10th Separated ? Not-in-family White Male United-States 0 +25 0.2777778 0.11433854 0.5625 0 0 0.959596 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +49 0.544444442 0.122278169 0.75 0 0 0.3030303 Self-emp-not-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male Columbia 0 +52 0.5777778 0.06445994 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +23 0.25555557 0.159918636 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male ? 0 +32 0.355555564 0.152398631 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Craft-repair Other-relative White Male El-Salvador 0 +31 0.344444454 0.107751377 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family Asian-Pac-Islander Female United-States 0 +30 0.333333343 0.137056187 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +24 0.266666681 0.271886349 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.129536167 0.75 0 0 0.6666667 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male Yugoslavia 0 +30 0.333333343 0.113040641 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +52 0.5777778 0.0977743044 0.8125 0.1502415 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.104840361 0.5625 0 0 0.25252524 State-gov HS-grad Divorced Adm-clerical Not-in-family Black Female United-States 0 +49 0.544444442 0.07866142 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +20 0.222222224 0.0264254529 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +25 0.2777778 0.08359304 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +41 0.455555558 0.116405621 0.3125 0 0 0.5555556 Private 9th Married-civ-spouse Other-service Husband White Male Outlying-US(Guam-USVI-etc) 0 +55 0.6111111 0.0965659842 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried Black Female United-States 0 +31 0.344444454 0.17903018 0.6875 0.031370312 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.146954447 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Protective-serv Not-in-family Black Female United-States 0 +32 0.355555564 0.103782907 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.296790957 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Other-relative White Male United-States 0 +37 0.411111116 0.130633354 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Female ? 0 +52 0.5777778 0.08481955 0.25 0 0 0.4040404 Private 7th-8th Widowed Other-service Not-in-family White Female United-States 0 +19 0.211111113 0.191722944 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +21 0.233333334 0.144564077 0.625 0 0 0.24242425 ? Some-college Never-married ? Own-child White Male United-States 0 +43 0.477777779 0.1167343 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 +39 0.433333337 0.04404242 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband White Male ? 0 +40 0.444444448 0.0303454231 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +54 0.6 0.124632165 0.125 0 0 0.4040404 Private 1st-4th Separated Priv-house-serv Other-relative White Female Mexico 0 +35 0.3888889 0.07906015 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 +34 0.377777785 0.174220473 0.6875 0 0.453168035 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 +35 0.3888889 0.121012591 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +57 0.6333333 0.08572545 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 +26 0.2888889 0.129333436 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Other-relative White Female United-States 0 +55 0.6111111 0.06705103 0.8125 0 0 0.151515156 Self-emp-not-inc Bachelors Widowed Sales Unmarried White Female United-States 0 +51 0.566666663 0.140700683 0.8125 0 0 0.4040404 Private Bachelors Separated Adm-clerical Unmarried White Female United-States 0 +35 0.3888889 0.19374758 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Transport-moving Not-in-family Black Male Jamaica 0 +31 0.344444454 0.132096946 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +17 0.188888893 0.185256332 0.4375 0 0 0.08080808 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 +38 0.422222227 0.0160920862 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +39 0.433333337 0.253555417 0.9375 0 0.4331956 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.180499837 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.0203872155 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Unmarried White Female United-States 0 +42 0.466666669 0.13755931 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.140807092 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +73 0.811111152 0.235297248 0.25 0 0 0.25252524 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +47 0.5222222 0.103746541 0.625 0 0.430670351 0.4040404 Local-gov Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.0839762762 0.5625 0 0 0.7070707 Private HS-grad Never-married Sales Unmarried White Female United-States 0 +27 0.3 0.08944875 0.375 0 0.454545438 0.4040404 Private 10th Never-married Sales Other-relative White Male United-States 0 +38 0.422222227 0.06683685 0.9375 0 0 0.4040404 Private Prof-school Never-married Exec-managerial Not-in-family White Male United-States 1 +19 0.211111113 0.151443556 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +60 0.6666667 0.06810107 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Prof-specialty Unmarried White Male United-States 1 +24 0.266666681 0.124495439 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +52 0.5777778 0.2039779 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +36 0.4 0.122126617 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +26 0.2888889 0.129462078 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female Canada 0 +28 0.311111122 0.02508916 0.8125 0 0 0.161616161 State-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +38 0.422222227 0.09487002 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +47 0.5222222 0.10661108 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.181244761 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 1 +27 0.3 0.188562721 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +47 0.5222222 0.118703045 0.625 0 0 0.4040404 Private Some-college Widowed Prof-specialty Unmarried White Female United-States 0 +36 0.4 0.07769894 0.375 0.0346403457 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Own-child White Female United-States 0 +49 0.544444442 0.2274297 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Male United-States 0 +68 0.75555557 0.171937183 0.625 0 0 0.4848485 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +63 0.7 0.09780529 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +36 0.4 0.124670558 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +42 0.466666669 0.09615109 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.10527344 0.875 0 0 0.454545468 Private Masters Never-married Exec-managerial Not-in-family Black Female United-States 0 +68 0.75555557 0.125456572 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +38 0.422222227 0.147596329 0.5625 0 0 0.222222224 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +43 0.477777779 0.07474212 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.136772633 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +59 0.655555546 0.10025157 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +25 0.2777778 0.104358107 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +26 0.2888889 0.08359304 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 +59 0.655555546 0.105948992 0.625 0 0 0.4848485 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +34 0.377777785 0.07667382 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.111629583 0.875 0 0 0.434343427 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +67 0.7444445 0.0948666558 0.5625 0 0 0.24242425 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +45 0.5 0.1349514 0.6875 0 0 0.444444448 Private Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 +64 0.7111111 0.121402569 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband Black Male United-States 0 +51 0.566666663 0.05561913 0.875 0 0 0.3838384 Private Masters Married-civ-spouse Prof-specialty Husband White Male Canada 1 +31 0.344444454 0.152990669 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.234986752 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +65 0.722222269 0.061228998 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male United-States 0 +23 0.25555557 0.09615783 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +31 0.344444454 0.165985167 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.124458395 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family White Female United-States 0 +17 0.188888893 0.1315157 0.4375 0 0 0.353535354 Local-gov 11th Never-married Craft-repair Own-child White Male United-States 0 +63 0.7 0.113131568 0.875 0 0 0.464646459 Private Masters Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +48 0.533333361 0.09809087 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +45 0.5 0.114567541 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +17 0.188888893 0.153736264 0.375 0 0 0.1010101 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 +26 0.2888889 0.13845849 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.341367483 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Tech-support Unmarried Black Female United-States 0 +29 0.322222233 0.2777892 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female Outlying-US(Guam-USVI-etc) 0 +44 0.4888889 0.110009059 0.625 0 0 0.323232323 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 +43 0.477777779 0.150033846 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.214802265 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +43 0.477777779 0.07084774 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male Haiti 0 +23 0.25555557 0.134628773 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.06498463 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Asian-Pac-Islander Female United-States 0 +49 0.544444442 0.129455343 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male Canada 0 +52 0.5777778 0.136991531 0.625 0.0501305 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.06711502 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +38 0.422222227 0.112776615 0.8125 0.04508045 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +25 0.2777778 0.141506225 0.1875 0 0 0.25252524 ? 5th-6th Never-married ? Unmarried White Female El-Salvador 0 +44 0.4888889 0.147902116 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Own-child White Male United-States 0 +63 0.7 0.02038789 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.15223226 0.5625 0 0 0.6060606 Local-gov HS-grad Separated Other-service Not-in-family Black Female ? 0 +21 0.233333334 0.211600959 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male Columbia 0 +32 0.355555564 0.222747952 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.02387545 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Separated Other-service Unmarried White Female United-States 0 +50 0.5555556 0.116501257 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Transport-moving Husband White Male Puerto-Rico 0 +26 0.2888889 0.127636135 0.8125 0 0 0.8080808 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.0414344929 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +31 0.344444454 0.386612177 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.189502969 0.125 0 0 0.6666667 Private 1st-4th Never-married Farming-fishing Not-in-family Other Male Mexico 0 +40 0.444444448 0.09360445 0.5625 0 0 0.565656543 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.119194724 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +43 0.477777779 0.08917125 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male Poland 0 +44 0.4888889 0.131288037 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.322087556 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Other-relative White Female United-States 0 +75 0.8333334 0.0863632858 0.1875 0 0 0.25252524 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 0 +52 0.5777778 0.0202855114 0.625 0.031370312 0 0.424242437 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +51 0.566666663 0.1957884 0.1875 0 0 0.4040404 Self-emp-not-inc 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.0576316528 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +40 0.444444448 0.08208634 0.75 0.07688077 0 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.0195567477 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 +33 0.366666675 0.234492376 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.0496495962 0.625 0 0 0.6060606 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +29 0.322222233 0.101960994 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Handlers-cleaners Unmarried White Male United-States 0 +37 0.411111116 0.159195945 0.625 0 0 0.373737365 Private Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 +37 0.411111116 0.0134026632 0.5625 0.1502415 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.09345964 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +46 0.51111114 0.239079148 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +46 0.51111114 0.122154236 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.2649415 0.625 0 0 0.3030303 Private Some-college Never-married Protective-serv Own-child Black Male United-States 0 +34 0.377777785 0.141937956 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried Black Female ? 0 +38 0.422222227 0.07409755 0.625 0 0 0.434343427 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +26 0.2888889 0.130196914 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.0798481852 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +57 0.6333333 0.1360479 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.106045313 0.4375 0 0 0.656565666 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 +26 0.2888889 0.19075641 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 +20 0.222222224 0.1668978 0.5625 0 0 0.8484849 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +38 0.422222227 0.02944154 0.8125 0.07298073 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +61 0.677777767 0.0240108315 0.625 0 0 0.0606060624 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +36 0.4 0.230833068 1 0 0 0.454545468 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 +61 0.677777767 0.04813549 0.5625 0.03103031 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +17 0.188888893 0.1830916 0.625 0 0 0.161616161 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +40 0.444444448 0.269454867 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Other Male United-States 1 +18 0.2 0.0424138121 0.4375 0 0 0.161616161 Private 11th Never-married Other-service Own-child White Male United-States 0 +21 0.233333334 0.1178059 0.75 0 0 0.323232323 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 +41 0.455555558 0.118846506 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male Peru 0 +46 0.51111114 0.180748373 0.4375 0 0 0.4040404 Private 11th Separated Machine-op-inspct Not-in-family White Female United-States 0 +55 0.6111111 0.119150944 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +27 0.3 0.1190021 0.75 0 0 0.5252525 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 +39 0.433333337 0.06605824 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +36 0.4 0.179470673 0.5625 0 0 0.4848485 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 +51 0.566666663 0.210464031 0.625 0.03908039 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +27 0.3 0.406845152 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +30 0.333333343 0.08861559 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.06579623 0.5625 0 0 0.474747479 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +23 0.25555557 0.251651347 0.8125 0 0 0.2020202 Private Bachelors Never-married Other-service Own-child White Female United-States 0 +56 0.622222245 0.247849911 0.6875 0.1502415 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.130301312 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.168877319 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.134521678 0.6875 0 0 0.6060606 Federal-gov Assoc-voc Divorced Craft-repair Not-in-family Amer-Indian-Eskimo Female United-States 0 +54 0.6 0.10566207 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Greece 0 +38 0.422222227 0.0822223946 0.625 0.07298073 0 0.434343427 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +45 0.5 0.1457542 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +50 0.5555556 0.02855921 0.9375 0 0.5544077 0.3030303 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.212819383 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +31 0.344444454 0.04272701 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male Ireland 0 +27 0.3 0.108294919 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +34 0.377777785 0.0575023331 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.313849568 0.4375 0 0 0.3030303 Private 11th Never-married Transport-moving Own-child White Male United-States 0 +47 0.5222222 0.05289199 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +36 0.4 0.0660313 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Other-service Husband Asian-Pac-Islander Male United-States 0 +22 0.244444445 0.120151818 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +51 0.566666663 0.14207536 0.5625 0 0.459595948 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +43 0.477777779 0.0434470139 0.625 0 0 0.3030303 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 +54 0.6 0.08646701 0.625 0 0 0.5050505 Private Some-college Widowed Prof-specialty Not-in-family White Male United-States 0 +24 0.266666681 0.157916889 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Own-child Black Female Dominican-Republic 0 +29 0.322222233 0.119053952 0.9375 0 0 0.5555556 Private Prof-school Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 0 +40 0.444444448 0.04004836 0.625 0 0 0.3838384 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +18 0.2 0.157895342 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 +31 0.344444454 0.144841567 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +57 0.6333333 0.09458175 1 0 0.453856736 0.4040404 Private Doctorate Married-civ-spouse Tech-support Husband White Male Germany 1 +32 0.355555564 0.129168421 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family Black Female United-States 0 +48 0.533333361 0.100353271 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.154760033 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.1175055 0.75 0 0 0.222222224 Private Assoc-acdm Divorced Other-service Not-in-family White Female United-States 0 +24 0.266666681 0.1688194 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Guatemala 0 +49 0.544444442 0.08075948 0.8125 0.07688077 0 0.3030303 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +27 0.3 0.101974465 0.5625 0 0.3611111 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +37 0.411111116 0.124304831 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 +33 0.366666675 0.177517429 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.119852096 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Male United-States 0 +45 0.5 0.206700325 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +54 0.6 0.0366247855 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.0972253755 0.5625 0 0.143480256 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +22 0.244444445 0.064367 0.625 0 0 0.222222224 Private Some-college Married-spouse-absent Sales Own-child Other Female Dominican-Republic 0 +20 0.222222224 0.122364379 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +36 0.4 0.115934819 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +49 0.544444442 0.236248285 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +58 0.644444466 0.07111985 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 1 +20 0.222222224 0.134747982 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female ? 0 +34 0.377777785 0.135170966 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Divorced Sales Unmarried White Female United-States 0 +36 0.4 0.2604733 0.875 0 0.453856736 0.444444448 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +28 0.311111122 0.09130905 0.8125 0.04101041 0 0.6060606 Local-gov Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 +38 0.422222227 0.1904439 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Exec-managerial Own-child White Male United-States 0 +32 0.355555564 0.0925214142 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family Asian-Pac-Islander Male India 0 +35 0.3888889 0.103708148 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +51 0.566666663 0.06470107 0.75 0 0 0.6060606 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.103005648 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +71 0.788888931 0.06591882 0.875 0 0 0.151515156 Private Masters Divorced Prof-specialty Not-in-family White Female Germany 0 +48 0.533333361 0.171273753 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.06831795 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.08471447 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 1 +64 0.7111111 0.111455813 0.5625 0 0 0.05050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.116054706 0.5625 0 0 0.4848485 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +25 0.2777778 0.119033076 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +66 0.733333349 0.117380895 0.625 0 0 0.5050505 Private Some-college Widowed Sales Unmarried White Female United-States 1 +59 0.655555546 0.0323983543 0.875 0 0 0.4040404 Federal-gov Masters Never-married Prof-specialty Not-in-family White Female ? 1 +42 0.466666669 0.0535668731 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.206411377 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Unmarried White Male United-States 0 +19 0.211111113 0.03723568 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +26 0.2888889 0.115890361 0.625 0 0 0.24242425 Private Some-college Never-married Sales Own-child White Female United-States 0 +22 0.244444445 0.09498722 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +33 0.366666675 0.0251053236 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +63 0.7 0.0211415738 0.4375 0 0 0.121212125 Private 11th Never-married Farming-fishing Not-in-family White Male United-States 0 +20 0.222222224 0.280131757 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +33 0.366666675 0.199090734 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Craft-repair Not-in-family White Male Mexico 0 +57 0.6333333 0.13666217 0.25 0.0117301168 0 0.454545468 ? 7th-8th Married-civ-spouse ? Wife White Female Puerto-Rico 0 +56 0.622222245 0.107610606 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +70 0.7777778 0.181067616 0.6875 0 0 0.24242425 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 +42 0.466666669 0.0848673657 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +25 0.2777778 0.151675254 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 +28 0.311111122 0.200534791 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +80 0.8888889 0.152146056 0.5625 0.01409014 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +36 0.4 0.407826483 0.375 0 0 0.4040404 Private 10th Never-married Transport-moving Not-in-family Black Female United-States 0 +37 0.411111116 0.117296033 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.111447059 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +52 0.5777778 0.12778835 0.5625 0 0 0.353535354 State-gov HS-grad Separated Other-service Not-in-family White Female United-States 0 +49 0.544444442 0.242803127 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +30 0.333333343 0.07748341 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.176929429 0.625 0.07688077 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 1 +70 0.7777778 0.106712781 0.9375 0 0 0.353535354 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.0276876558 0.625 0 0.518365443 0.6262626 Private Some-college Widowed Farming-fishing Not-in-family White Male United-States 1 +25 0.2777778 0.100945979 0.8125 0 0 0.4040404 Private Bachelors Widowed Exec-managerial Not-in-family White Female United-States 0 +59 0.655555546 0.08884998 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female Italy 1 +22 0.244444445 0.04086199 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +41 0.455555558 0.103139684 0.75 0 0 0.5050505 Local-gov Assoc-acdm Separated Craft-repair Not-in-family White Male United-States 0 +62 0.6888889 0.10457027 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.164861038 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +38 0.422222227 0.210215509 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +52 0.5777778 0.0692582056 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.06279025 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +74 0.822222233 0.1555878 0.5625 0 0 0.3030303 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.173092976 0.1875 0 0 0.151515156 Self-emp-not-inc 5th-6th Married-civ-spouse Other-service Wife White Female Mexico 0 +41 0.455555558 0.0799626857 0.5 0 0 0.4040404 Private 12th Divorced Adm-clerical Not-in-family Amer-Indian-Eskimo Male United-States 0 +30 0.333333343 0.10236983 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 0 +25 0.2777778 0.0734906942 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.3972567 0.625 0.135501355 0 0.6060606 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 1 +38 0.422222227 0.1162103 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.214845374 0.875 0 0.4242424 0.4040404 State-gov Masters Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +48 0.533333361 0.137824684 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.06728205 0.1875 0 0 0.151515156 Self-emp-not-inc 5th-6th Never-married Tech-support Not-in-family Asian-Pac-Islander Female United-States 0 +19 0.211111113 0.248846069 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +51 0.566666663 0.05342745 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.0412054919 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Male United-States 0 +20 0.222222224 0.13755326 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Own-child White Female United-States 0 +17 0.188888893 0.1233309 0.4375 0 0 0.161616161 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +42 0.466666669 0.06487551 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +25 0.2777778 0.112501137 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Other-relative Other Female Ecuador 0 +36 0.4 0.07341324 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +65 0.722222269 0.119078204 1 0 0 0.4040404 Private Doctorate Widowed Prof-specialty Not-in-family White Female United-States 0 +32 0.355555564 0.0907500163 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +33 0.366666675 0.03353865 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +32 0.355555564 0.08862906 0.625 0 0 0.2020202 State-gov Some-college Never-married Tech-support Unmarried Black Female United-States 0 +25 0.2777778 0.207208171 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +41 0.455555558 0.236646339 0.625 0 0 0.4040404 Local-gov Some-college Divorced Protective-serv Unmarried White Female United-States 0 +44 0.4888889 0.175631523 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +72 0.8 0.105280176 0.375 0.02414024 0 0.121212125 Private 10th Married-civ-spouse Other-service Husband White Male United-States 0 +36 0.4 0.139953062 0.5625 0 0 0.5252525 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +67 0.7444445 0.1702978 0.5625 0.01797018 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +28 0.311111122 0.19864957 0.5625 0.0406404063 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.132193938 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband Other Male United-States 0 +17 0.188888893 0.03125335 0.25 0 0 0.08080808 Private 7th-8th Never-married Sales Own-child White Male United-States 0 +32 0.355555564 0.179942146 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Divorced Exec-managerial Unmarried Black Female United-States 0 +67 0.7444445 0.108072646 0.4375 0 0 0.4040404 Private 11th Widowed Other-service Not-in-family White Female United-States 0 +21 0.233333334 0.08350682 0.625 0 0 0.1010101 ? Some-college Never-married ? Other-relative Asian-Pac-Islander Male Vietnam 0 +51 0.566666663 0.08288044 0.875 0.0501305 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 +32 0.355555564 0.287240237 0.125 0.0367403664 0 0.4040404 Private 1st-4th Never-married Craft-repair Not-in-family White Male Guatemala 0 +39 0.433333337 0.181398332 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.0288656671 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Female United-States 0 +50 0.5555556 0.123873092 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.142379135 0.375 0 0 0.151515156 Private 10th Never-married Sales Not-in-family White Female United-States 0 +21 0.233333334 0.130079716 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.05842575 0.8125 0 0 0.161616161 Private Bachelors Never-married Adm-clerical Other-relative Asian-Pac-Islander Female United-States 0 +34 0.377777785 0.1525724 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Own-child White Male United-States 0 +68 0.75555557 0.182082638 0.375 0 0 0.353535354 ? 10th Married-civ-spouse ? Husband White Male United-States 0 +49 0.544444442 0.2315221 0.375 0 0 0.323232323 Self-emp-not-inc 10th Never-married Craft-repair Not-in-family Black Male United-States 0 +50 0.5555556 0.101686873 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Amer-Indian-Eskimo Female United-States 0 +33 0.366666675 0.139624372 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Own-child White Female United-States 0 +18 0.2 0.0915495 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +45 0.5 0.124116912 0.6875 0 0 0.5555556 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 1 +20 0.222222224 0.09579883 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +46 0.51111114 0.0814316645 0.8125 0.03103031 0 0.373737365 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +64 0.7111111 0.106695943 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.08497378 1 0 0 0.454545468 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 +35 0.3888889 0.100590356 0.5625 0 0 0.7070707 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.217332065 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +29 0.322222233 0.0373070762 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Tech-support Not-in-family White Male United-States 0 +38 0.422222227 0.135315776 0.8125 0 0 0.3030303 State-gov Bachelors Married-civ-spouse Exec-managerial Wife Black Female United-States 1 +45 0.5 0.111844443 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +30 0.333333343 0.07857858 0.875 0 0 0.5050505 Self-emp-not-inc Masters Divorced Prof-specialty Not-in-family Asian-Pac-Islander Male India 1 +41 0.455555558 0.11337202 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +37 0.411111116 0.0820176452 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Asian-Pac-Islander Male Hong 0 +45 0.5 0.08546412 0.8125 0 0.4331956 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +20 0.222222224 0.270552069 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +45 0.5 0.07921103 0.5625 0 0 0.4848485 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.276449531 0.5625 0 0 0.2020202 Federal-gov HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 +63 0.7 0.02591222 0.625 0.14084141 0 0.6060606 Self-emp-inc Some-college Widowed Sales Not-in-family White Female United-States 1 +35 0.3888889 0.226108223 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +24 0.266666681 0.04732321 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +19 0.211111113 0.03204475 0.625 0 0 0.5050505 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +23 0.25555557 0.07932013 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +34 0.377777785 0.120994411 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.2313948 0.4375 0 0 0.4040404 ? 11th Never-married ? Not-in-family Black Male United-States 0 +36 0.4 0.221233174 0.1875 0 0 0.5050505 Self-emp-not-inc 5th-6th Married-civ-spouse Transport-moving Husband White Male Mexico 1 +46 0.51111114 0.178551972 0.5625 0 0 0.05050505 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +38 0.422222227 0.27937603 0.8125 0 0 0.424242437 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.0323667 0.5 0 0 0.4040404 Local-gov 12th Widowed Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.230127871 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative Asian-Pac-Islander Male India 0 +48 0.533333361 0.17967476 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.15731813 0.5625 0 0 0.5050505 Private HS-grad Divorced Other-service Own-child White Female United-States 0 +53 0.5888889 0.08526408 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 +47 0.5222222 0.04765526 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.09352161 0.625 0.046500463 0 0.222222224 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.118445083 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.130324885 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +41 0.455555558 0.07027255 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.132909909 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +21 0.233333334 0.138643026 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child Black Female United-States 0 +45 0.5 0.139057264 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 +33 0.366666675 0.136607617 0.25 0 0 0.141414136 Private 7th-8th Never-married Other-service Unmarried Black Female Trinadad&Tobago 0 +68 0.75555557 0.117663108 0.625 0 0 0.25252524 Without-pay Some-college Married-spouse-absent Farming-fishing Unmarried White Female United-States 0 +44 0.4888889 0.12348716 0.9375 0 0 0.5555556 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.07113467 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +45 0.5 0.22199899 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male Poland 1 +41 0.455555558 0.052113384 0.625 0 0.4242424 0.656565666 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +29 0.322222233 0.139740214 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male Mexico 0 +46 0.51111114 0.100465074 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 0 +19 0.211111113 0.210125253 0.5625 0 0 0.25252524 Private HS-grad Never-married Craft-repair Other-relative White Male Mexico 0 +56 0.622222245 0.117954075 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +55 0.6111111 0.07518329 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.0329324678 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.0182184335 0.5625 0 0 0.25252524 Private HS-grad Never-married Priv-house-serv Not-in-family White Female United-States 0 +38 0.422222227 0.07335262 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male ? 0 +52 0.5777778 0.063977696 0.1875 0 0 0.5050505 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +22 0.244444445 0.147061542 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +20 0.222222224 0.153313965 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +31 0.344444454 0.183777928 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Own-child Black Male England 0 +39 0.433333337 0.0208229925 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.186049759 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 +35 0.3888889 0.194722861 0.75 0 0 0.4040404 Private Assoc-acdm Separated Sales Unmarried White Male United-States 0 +67 0.7444445 0.0263351984 0.5625 0 0 0.05050505 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +45 0.5 0.129841283 0.8125 0.07298073 0 0.5555556 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +61 0.677777767 0.09919816 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.126469567 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +51 0.566666663 0.143662214 0.8125 0 0 0.4040404 State-gov Bachelors Widowed Adm-clerical Not-in-family White Male United-States 0 +37 0.411111116 0.07234434 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +21 0.233333334 0.114684068 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Female United-States 0 +32 0.355555564 0.05846818 0.625 0 0 0.3838384 Private Some-college Never-married Other-service Own-child White Female United-States 0 +48 0.533333361 0.10049808 0.5625 0 0 0.454545468 Private HS-grad Separated Craft-repair Unmarried Black Male United-States 0 +62 0.6888889 0.08312157 0.25 0 0 0.535353541 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +21 0.233333334 0.206626236 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +28 0.311111122 0.328245 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +19 0.211111113 0.191246748 0.375 0 0.3677686 0.454545468 Private 10th Never-married Handlers-cleaners Other-relative White Male United-States 0 +20 0.222222224 0.253045559 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +41 0.455555558 0.183035016 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +29 0.322222233 0.16963236 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 +47 0.5222222 0.17784813 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.01916273 0.8125 0 0 0.373737365 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.190343544 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Other-relative White Male United-States 0 +29 0.322222233 0.125215456 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +51 0.566666663 0.133485109 0.8125 0 0 0.4040404 Federal-gov Bachelors Widowed Prof-specialty Not-in-family Black Female United-States 0 +40 0.444444448 0.163346261 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.227614239 0.1875 0 0 0.4040404 Private 5th-6th Never-married Transport-moving Not-in-family White Male Mexico 0 +30 0.333333343 0.142832413 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +36 0.4 0.08706309 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 +68 0.75555557 0.0975015238 0.5625 0 0.382920116 0.2020202 Local-gov HS-grad Widowed Protective-serv Not-in-family White Male United-States 0 +42 0.466666669 0.07402952 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 1 +41 0.455555558 0.07632762 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +43 0.477777779 0.1264864 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.1170091 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +43 0.477777779 0.124690764 0.8125 0 0 0.4040404 Private Bachelors Divorced Tech-support Own-child White Male United-States 0 +53 0.5888889 0.04925827 0.5625 0.1502415 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.158981085 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.0499722175 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Unmarried White Male United-States 0 +31 0.344444454 0.068788074 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +23 0.25555557 0.09491111 0.625 0 0 0.25252524 Private Some-college Never-married Sales Other-relative Asian-Pac-Islander Male Philippines 0 +69 0.7666667 0.07245547 0.5625 0.0296402965 0 0.353535354 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +38 0.422222227 0.0231453385 0.875 0 0 0.4040404 State-gov Masters Divorced Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.173796818 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male Cuba 1 +18 0.2 0.263746 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Female United-States 0 +41 0.455555558 0.15702109 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male Mexico 0 +30 0.333333343 0.06825935 0.8125 0.03103031 0 0.5555556 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 +23 0.25555557 0.0221572649 0.75 0 0 0.2020202 ? Assoc-acdm Married-civ-spouse ? Husband White Male United-States 0 +26 0.2888889 0.167448759 0.8125 0 0 0.3030303 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +37 0.411111116 0.143102512 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.133755192 0.625 0.0217402168 0 0.5050505 Private Some-college Never-married Tech-support Not-in-family Black Female United-States 0 +33 0.366666675 0.2733964 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male Peru 1 +37 0.411111116 0.3960403 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.03152613 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +27 0.3 0.141777664 0.625 0 0 0.8080808 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.139388636 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +28 0.311111122 0.159941539 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +59 0.655555546 0.1883445 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Male Guatemala 0 +42 0.466666669 0.01974803 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +50 0.5555556 0.182704315 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +27 0.3 0.0197756458 0.75 0 0 0.454545468 ? Assoc-acdm Never-married ? Not-in-family White Female United-States 0 +32 0.355555564 0.0517092645 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried White Female United-States 0 +27 0.3 0.0734179541 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Male United-States 0 +43 0.477777779 0.152826324 0.8125 0 0 0.4040404 Private Bachelors Divorced Machine-op-inspct Other-relative White Male United-States 0 +46 0.51111114 0.118913859 0.4375 0 0 0.4040404 Private 11th Divorced Prof-specialty Unmarried Amer-Indian-Eskimo Male United-States 1 +41 0.455555558 0.122787356 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +59 0.655555546 0.1995366 0.875 0.0861408561 0 0.6060606 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 1 +20 0.222222224 0.146975324 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 +57 0.6333333 0.111601293 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 +46 0.51111114 0.0345327854 0.5625 0.04386044 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +45 0.5 0.0647266656 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +29 0.322222233 0.05549453 0.5625 0 0.365013778 0.454545468 Local-gov HS-grad Never-married Handlers-cleaners Unmarried Asian-Pac-Islander Male United-States 0 +23 0.25555557 0.167695269 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +46 0.51111114 0.171324953 0.5625 0 0.365013778 0.4848485 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +55 0.6111111 0.13486518 0.5625 0 0 0.5050505 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +58 0.644444466 0.06360119 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.0587874353 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Other-relative Asian-Pac-Islander Female United-States 0 +29 0.322222233 0.080684714 0.625 0 0 0.5050505 Private Some-college Never-married Sales Other-relative White Male United-States 0 +57 0.6333333 0.05779936 0.5625 0 0 0.2020202 ? HS-grad Divorced ? Own-child Asian-Pac-Islander Male United-States 0 +26 0.2888889 0.133200869 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +42 0.466666669 0.206762969 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 +61 0.677777767 0.0544862449 0.5625 0 0 0.454545468 Private HS-grad Separated Transport-moving Unmarried Asian-Pac-Islander Male United-States 1 +31 0.344444454 0.133283049 0.625 0.1502415 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.23959507 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 +47 0.5222222 0.08158119 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.1304771 0.5625 0 0 0.565656543 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.233913139 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +24 0.266666681 0.0232409816 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Female United-States 0 +25 0.2777778 0.219821453 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Not-in-family White Male ? 0 +22 0.244444445 0.181329623 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +38 0.422222227 0.0427755 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.09985418 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Handlers-cleaners Wife White Female United-States 1 +33 0.366666675 0.128315732 0.5625 0 0 0.3030303 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +46 0.51111114 0.180522054 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male ? 1 +18 0.2 0.0135090807 0.25 0 0 0.4040404 Private 7th-8th Never-married Other-service Other-relative Asian-Pac-Islander Female Philippines 0 +52 0.5777778 0.139328688 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.127633438 0.8125 0 0.4242424 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.112022258 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +37 0.411111116 0.195248216 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Other-relative Asian-Pac-Islander Male Vietnam 0 +23 0.25555557 0.0581509471 0.625 0 0 0.151515156 ? Some-college Never-married ? Not-in-family White Female United-States 0 +45 0.5 0.0364988334 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.09905604 0.375 0 0 0.161616161 Private 10th Never-married Sales Own-child White Female United-States 0 +56 0.622222245 0.18995221 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.25559622 0.75 0 0 0.454545468 Self-emp-inc Assoc-acdm Divorced Exec-managerial Unmarried White Male United-States 0 +81 0.900000036 0.0871136039 0.25 0 0 0.1010101 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +22 0.244444445 0.06723827 0.625 0 0 0.3030303 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 +43 0.477777779 0.122754358 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +31 0.344444454 0.0737035349 0.75 0 0.399449021 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 +42 0.466666669 0.236519039 0.8125 0 0.4331956 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +66 0.733333349 0.141947389 0.625 0 0 0.5050505 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +50 0.5555556 0.0893888 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +31 0.344444454 0.1636581 0.625 0 0 0.4040404 Private Some-college Separated Handlers-cleaners Not-in-family White Male United-States 0 +35 0.3888889 0.06836981 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +21 0.233333334 0.343252718 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 +36 0.4 0.08079518 0.8125 0 0 0.353535354 Private Bachelors Separated Other-service Unmarried Black Female United-States 0 +33 0.366666675 0.04696354 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +36 0.4 0.137798414 0.8125 0 0.04889807 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried Black Female United-States 0 +37 0.411111116 0.03425731 0.5625 0 0 0.5555556 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +50 0.5555556 0.123194173 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +55 0.6111111 0.139076114 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.113163896 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +24 0.266666681 0.100623362 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Other-relative Black Female Haiti 0 +39 0.433333337 0.124579631 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Male United-States 1 +34 0.377777785 0.2687322 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +29 0.322222233 0.08673575 0.25 0 0 0.5555556 Private 7th-8th Divorced Craft-repair Unmarried White Female United-States 0 +60 0.6666667 0.170008853 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Craft-repair Husband Other Male United-States 1 +33 0.366666675 0.1221603 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 +58 0.644444466 0.146056622 0.3125 0 0 0.4040404 Private 9th Never-married Handlers-cleaners Own-child White Male El-Salvador 0 +27 0.3 0.07202441 0.625 0 0 0.4040404 Private Some-college Separated Sales Not-in-family White Male United-States 0 +46 0.51111114 0.245082363 0.625 0 0 0.4040404 State-gov Some-college Divorced Protective-serv Unmarried Amer-Indian-Eskimo Female United-States 0 +63 0.7 0.193490967 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 +38 0.422222227 0.11607828 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Other-service Unmarried White Female United-States 0 +23 0.25555557 0.207784042 0.625 0 0 0.151515156 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +29 0.322222233 0.08225675 0.8125 0.0861408561 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +31 0.344444454 0.07168899 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 +49 0.544444442 0.2062962 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.135851234 1 0 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.18997848 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +48 0.533333361 0.158353344 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.228652835 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.122462042 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +49 0.544444442 0.06690555 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.247546151 0.625 0.0258002579 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +57 0.6333333 0.0437528 0.6875 0 0.43663913 0.454545468 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +50 0.5555556 0.181244761 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +46 0.51111114 0.0395250246 0.8125 0.1502415 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.0602867231 0.625 0.03908039 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +19 0.211111113 0.06802631 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +18 0.2 0.022984365 0.375 0 0 0.282828271 Private 10th Never-married Other-service Own-child White Female United-States 0 +20 0.222222224 0.07749486 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +42 0.466666669 0.09370616 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +46 0.51111114 0.07047326 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Cambodia 1 +40 0.444444448 0.120472416 0.5625 0 0 0.2020202 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +54 0.6 0.0941938 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 +28 0.311111122 0.04137859 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.208277076 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.0307219289 0.625 0 0 0.4040404 Private Some-college Never-married Priv-house-serv Not-in-family White Female United-States 0 +22 0.244444445 0.18361561 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +31 0.344444454 0.0365850478 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.111482754 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.0326630548 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.09639828 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +67 0.7444445 0.2905803 0.75 0.200512 0 0.04040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 +75 0.8333334 0.17274408 0.875 0 0 0.161616161 Private Masters Never-married Protective-serv Not-in-family White Male United-States 0 +41 0.455555558 0.128948852 0.875 0 0 0.6060606 Private Masters Divorced Exec-managerial Unmarried Black Female United-States 1 +37 0.411111116 0.06677825 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.158944711 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Own-child White Female Cuba 0 +34 0.377777785 0.289550453 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male Mexico 1 +25 0.2777778 0.12790218 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Own-child White Male United-States 0 +52 0.5777778 0.0977669 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.129491717 0.5625 0.0217402168 0 0.4040404 State-gov HS-grad Never-married Protective-serv Own-child White Male United-States 0 +35 0.3888889 0.131312281 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family Other Male Puerto-Rico 0 +44 0.4888889 0.241000071 0.5 0 0 0.353535354 Local-gov 12th Married-civ-spouse Other-service Other-relative White Female Mexico 0 +27 0.3 0.09269788 0.5625 0 0 0.8080808 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.105425656 0.625 0 0 0.333333343 Private Some-college Never-married Tech-support Not-in-family White Male United-States 0 +26 0.2888889 0.127458319 0.3125 0 0 0.3838384 Private 9th Never-married Other-service Own-child White Female El-Salvador 0 +23 0.25555557 0.136720091 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male Canada 0 +28 0.311111122 0.01729906 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family Amer-Indian-Eskimo Female United-States 0 +38 0.422222227 0.129951075 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.0934138447 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +29 0.322222233 0.149692371 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 +56 0.622222245 0.135594621 0.3125 0.03411034 0 0.5050505 Self-emp-not-inc 9th Married-civ-spouse Exec-managerial Other-relative White Male Columbia 0 +23 0.25555557 0.128409356 0.8125 0 0 0.353535354 ? Bachelors Never-married ? Not-in-family Asian-Pac-Islander Male United-States 0 +30 0.333333343 0.0377206244 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Black Female United-States 0 +48 0.533333361 0.122794092 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +45 0.5 0.0935957 0.625 0 0 0.727272749 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 0 +38 0.422222227 0.186736092 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male Cuba 1 +24 0.266666681 0.08421269 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +47 0.5222222 0.1457623 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.115292937 0.5625 0 0 0.4848485 Private HS-grad Never-married Other-service Not-in-family White Female ? 0 +29 0.322222233 0.239867851 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Other-relative White Female United-States 0 +45 0.5 0.124871276 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 +24 0.266666681 0.207640573 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +40 0.444444448 0.0381564 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.104305573 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Craft-repair Husband Black Male Trinadad&Tobago 1 +46 0.51111114 0.0301110335 0.8125 0 0 0.5050505 Federal-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 1 +34 0.377777785 0.149893746 0.625 0 0 0.04040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +32 0.355555564 0.1675444 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +20 0.222222224 0.07070833 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +23 0.25555557 0.212207139 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Unmarried White Male Mexico 0 +46 0.51111114 0.126843378 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +21 0.233333334 0.149296328 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Female United-States 0 +59 0.655555546 0.05521164 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 +31 0.344444454 0.1139095 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +48 0.533333361 0.145977825 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +34 0.377777785 0.06607441 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +19 0.211111113 0.197016239 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Male United-States 0 +20 0.222222224 0.0828252062 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 +29 0.322222233 0.08416016 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +54 0.6 0.08285215 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.0514694862 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.236798555 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +46 0.51111114 0.022761425 0.8125 0.03103031 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +33 0.366666675 0.0538308956 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.07946562 0.375 0 0 0.454545468 Private 10th Divorced Other-service Unmarried White Female United-States 0 +36 0.4 0.1253515 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.126347661 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +37 0.411111116 0.215318874 0.6875 0 0 0.545454562 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 1 +64 0.7111111 0.0431742333 0.5 0 0 0.24242425 ? 12th Married-civ-spouse ? Husband White Male United-States 0 +45 0.5 0.10973426 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.1943275 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.0227641184 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +26 0.2888889 0.1318336 0.5625 0.0235402342 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.144217208 0.5625 0 0 0.4040404 Private HS-grad Never-married Priv-house-serv Own-child White Male United-States 0 +24 0.266666681 0.07645626 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +58 0.644444466 0.175947413 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +36 0.4 0.06635325 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Unmarried White Female United-States 0 +46 0.51111114 0.126432523 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.144296676 0.25 0 0 0.4040404 ? 7th-8th Never-married ? Not-in-family White Female Mexico 0 +32 0.355555564 0.08349403 0.625 0.04386044 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.04646782 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Male United-States 0 +52 0.5777778 0.196746156 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Female United-States 0 +19 0.211111113 0.133575365 0.5625 0 0 0.454545468 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +33 0.366666675 0.478073418 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +60 0.6666667 0.251119256 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.10803628 0.625 0 0 0.3838384 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +45 0.5 0.0663263053 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +37 0.411111116 0.06542444 0.625 0 0 0.4040404 Local-gov Some-college Married-spouse-absent Adm-clerical Unmarried Black Female United-States 0 +29 0.322222233 0.09226412 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Own-child White Male United-States 0 +53 0.5888889 0.126190722 0.625 0 0 0.6666667 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.0722237751 0.625 0 0.399449021 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +20 0.222222224 0.20601669 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +39 0.433333337 0.195946 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Own-child White Female United-States 0 +48 0.533333361 0.167207628 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +38 0.422222227 0.108309731 0.5625 0.04386044 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +36 0.4 0.166579217 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.166801482 0.25 0 0 0.565656543 Private 7th-8th Divorced Machine-op-inspct Unmarried Black Female United-States 0 +29 0.322222233 0.1446092 0.5625 0 0.453168035 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +64 0.7111111 0.0509037152 0.25 0.0258002579 0 0.5050505 Private 7th-8th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +34 0.377777785 0.3780778 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.151468471 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +41 0.455555558 0.270177573 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +34 0.377777785 0.1738864 0.5625 0 0 0.3838384 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +68 0.75555557 0.09509027 0.3125 0 0 0.02020202 ? 9th Married-civ-spouse ? Husband White Male United-States 0 +37 0.411111116 0.196921274 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband Other Male ? 1 +22 0.244444445 0.202647 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +43 0.477777779 0.09208631 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.0945635661 0.625 0 0 0.3030303 ? Some-college Never-married ? Other-relative White Female United-States 0 +36 0.4 0.07350484 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +47 0.5222222 0.125637084 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +25 0.2777778 0.152818918 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Other-relative Asian-Pac-Islander Female ? 0 +33 0.366666675 0.162917882 0.625 0 0 0.4040404 Private Some-college Separated Machine-op-inspct Not-in-family White Male United-States 0 +27 0.3 0.06544398 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Other-relative White Female United-States 0 +33 0.366666675 0.143407613 0.625 0 0 0.7070707 Private Some-college Never-married Tech-support Not-in-family White Male United-States 0 +24 0.266666681 0.142509788 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Own-child White Female United-States 0 +47 0.5222222 0.120097257 0.625 0 0 0.4040404 Local-gov Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +48 0.533333361 0.32463488 0.375 0 0 0.4040404 Self-emp-inc 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +28 0.311111122 0.144952029 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +33 0.366666675 0.131272539 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.2295978 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +33 0.366666675 0.128166884 0.6875 0 0 0.565656543 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 0 +26 0.2888889 0.127007723 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.109302521 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Own-child White Male United-States 0 +34 0.377777785 0.193516567 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.20489727 0.625 0 0 0.454545468 Self-emp-inc Some-college Never-married Exec-managerial Own-child White Male United-States 0 +73 0.811111152 0.135298267 0.5625 0 0 0.151515156 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +38 0.422222227 0.173006758 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +51 0.566666663 0.0312526748 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +36 0.4 0.0254447851 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.129131377 0.625 0.07688077 0 0.545454562 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +64 0.7111111 0.0698071346 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.09683136 0.625 0 0 0.5555556 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +21 0.233333334 0.137687281 0.625 0 0 0.2020202 State-gov Some-college Never-married Exec-managerial Own-child White Female United-States 0 +28 0.311111122 0.10524448 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.076234 0.4375 0 0 0.25252524 ? 11th Never-married ? Own-child White Male United-States 0 +41 0.455555558 0.07561233 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +17 0.188888893 0.0188798457 0.3125 0 0 0.161616161 Private 9th Never-married Other-service Own-child White Male United-States 0 +58 0.644444466 0.215599731 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +50 0.5555556 0.225144386 0.8125 0 0 0.08080808 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.239788383 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Handlers-cleaners Not-in-family Amer-Indian-Eskimo Male Mexico 0 +47 0.5222222 0.187848762 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.09599752 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 +50 0.5555556 0.231031761 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +29 0.322222233 0.135391876 0.875 0 0 0.5555556 Private Masters Never-married Prof-specialty Not-in-family White Male Scotland 0 +31 0.344444454 0.0545765 1 0 0 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.0229048878 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +31 0.344444454 0.01997838 0.625 0 0 0.6060606 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +53 0.5888889 0.234016865 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +33 0.366666675 0.0610680245 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +43 0.477777779 0.128242984 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 +56 0.622222245 0.07342536 0.625 0.07688077 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +38 0.422222227 0.158150613 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +18 0.2 0.10583315 0.4375 0 0 0.3030303 Private 11th Never-married Sales Own-child White Female United-States 0 +50 0.5555556 0.0633668 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +78 0.8666667 0.09130838 0.5625 0.0232902318 0 0.121212125 Private HS-grad Widowed Sales Unmarried White Female United-States 0 +27 0.3 0.06948451 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.383916 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 +24 0.266666681 0.145346716 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +20 0.222222224 0.19492425 0.625 0 0.3677686 0.151515156 Private Some-college Never-married Sales Own-child White Male United-States 0 +25 0.2777778 0.161285236 0.875 0 0 0.353535354 Private Masters Never-married Prof-specialty Own-child White Male United-States 0 +34 0.377777785 0.0683704838 0.8125 0 0 0.5050505 Private Bachelors Divorced Sales Not-in-family White Female United-States 1 +30 0.333333343 0.298743516 0.6875 0 0 0.353535354 Self-emp-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +37 0.411111116 0.09498789 0.875 0 0 0.4040404 Federal-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +38 0.422222227 0.139557689 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +67 0.7444445 0.092403546 0.5625 0 0 0.121212125 Without-pay HS-grad Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 0 +35 0.3888889 0.150190786 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +75 0.8333334 0.02446614 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +47 0.5222222 0.04943339 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +23 0.25555557 0.167741075 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +51 0.566666663 0.067793265 0.5625 0 0 0.08080808 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +42 0.466666669 0.7581392 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Other-service Not-in-family Black Male United-States 0 +32 0.355555564 0.06826407 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 1 +54 0.6 0.229322329 0.5625 0 0 0.353535354 Private HS-grad Separated Sales Unmarried White Female United-States 0 +20 0.222222224 0.1297975 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 +39 0.433333337 0.184118733 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +41 0.455555558 0.06765721 0.5625 0.07688077 0 0.3838384 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +35 0.3888889 0.05751917 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +45 0.5 0.113282442 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +27 0.3 0.103370704 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +61 0.677777767 0.1325334 0.25 0 0 0.3030303 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.121329159 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +22 0.244444445 0.0325633734 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +55 0.6111111 0.117916353 0.625 0.1502415 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 +66 0.733333349 0.08720655 0.8125 0 0 0.0606060624 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 +25 0.2777778 0.122429714 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.191497311 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 +20 0.222222224 0.1598331 0.625 0 0 0.353535354 Private Some-college Never-married Machine-op-inspct Other-relative Black Female United-States 0 +67 0.7444445 0.07497853 0.8125 0 0 0.161616161 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +44 0.4888889 0.1875632 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.0263082571 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +29 0.322222233 0.138251036 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Not-in-family Other Male Ecuador 0 +48 0.533333361 0.133359835 0.625 0 0 0.3838384 Private Some-college Never-married Craft-repair Unmarried White Female United-States 1 +25 0.2777778 0.268041134 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative Black Female United-States 0 +31 0.344444454 0.120138347 0.5625 0 0 1 Private HS-grad Divorced Other-service Unmarried White Female United-States 1 +48 0.533333361 0.08166808 0.8125 0 0.5674931 0.7070707 Private Bachelors Married-spouse-absent Sales Unmarried White Female United-States 1 +40 0.444444448 0.0377664268 0.875 0 0 0.2020202 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +26 0.2888889 0.119051263 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +28 0.311111122 0.0406639725 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Own-child White Female United-States 0 +52 0.5777778 0.111591868 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +41 0.455555558 0.193329319 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +39 0.433333337 0.0374269634 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Wife White Female United-States 0 +48 0.533333361 0.104740672 0.5625 0 0 0.161616161 Private HS-grad Never-married Adm-clerical Not-in-family Black Female Trinadad&Tobago 0 +19 0.211111113 0.135500327 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +27 0.3 0.02508916 0.625 0 0.379017442 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +59 0.655555546 0.211590186 0.6875 0 0.399449021 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +19 0.211111113 0.178212509 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Male United-States 0 +32 0.355555564 0.107488692 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +39 0.433333337 0.306400955 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +33 0.366666675 0.192045555 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.101068564 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +27 0.3 0.0373070762 0.625 0 0 0.454545468 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +23 0.25555557 0.212091967 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 +59 0.655555546 0.124568857 0.6875 0 0 0.4848485 ? Assoc-voc Divorced ? Not-in-family White Male United-States 0 +25 0.2777778 0.0838436 0.8125 0 0 0.2020202 Local-gov Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male India 0 +37 0.411111116 0.06599695 0.75 0 0 0.686868668 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 +31 0.344444454 0.141820773 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.15712212 0.75 0 0 0.373737365 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 +53 0.5888889 0.110661715 0.8125 0 0 0.3838384 Local-gov Bachelors Divorced Adm-clerical Unmarried White Female Dominican-Republic 0 +26 0.2888889 0.153221682 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Other-relative Black Male ? 0 +25 0.2777778 0.177660212 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +59 0.655555546 0.06496847 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +39 0.433333337 0.07853951 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.121240921 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +22 0.244444445 0.205741882 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +20 0.222222224 0.160918832 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male El-Salvador 0 +25 0.2777778 0.087414 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +27 0.3 0.24744983 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 +20 0.222222224 0.158746019 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Male United-States 0 +63 0.7 0.112092979 0.625 0 0 0.24242425 ? Some-college Widowed ? Not-in-family Black Female United-States 0 +43 0.477777779 0.108014055 0.375 0 0 0.25252524 Self-emp-not-inc 10th Divorced Farming-fishing Unmarried White Male United-States 0 +39 0.433333337 0.138948813 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.123609066 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +17 0.188888893 0.146387339 0.375 0 0 0.05050505 Private 10th Never-married Sales Own-child White Female United-States 0 +40 0.444444448 0.09554625 0.9375 0 0 0.727272749 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +50 0.5555556 0.143662214 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.135839775 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +60 0.6666667 0.120099284 0.5625 0.07298073 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.181667745 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +24 0.266666681 0.13510631 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +23 0.25555557 0.0219680015 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +24 0.266666681 0.174788937 0.8125 0.0501305 0 0.3030303 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +45 0.5 0.183085531 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +58 0.644444466 0.052605737 0.625 0.07298073 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.0765828937 0.625 0 0 0.2020202 Private Some-college Never-married Sales Other-relative White Male United-States 0 +41 0.455555558 0.126491129 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +48 0.533333361 0.296830684 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +31 0.344444454 0.129206821 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Other-relative White Male United-States 0 +33 0.366666675 0.100480571 0.9375 0 0.453856736 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.21283555 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.107488692 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.0406228863 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +58 0.644444466 0.022128975 0.5625 0 0 0.4848485 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +58 0.644444466 0.09586147 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +61 0.677777767 0.136030391 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +58 0.644444466 0.116072215 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +32 0.355555564 0.139112487 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +33 0.366666675 0.119773291 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.204377308 0.8125 0 0 0.5050505 Private Bachelors Separated Exec-managerial Not-in-family White Female United-States 1 +22 0.244444445 0.06061204 0.625 0 0 0.111111112 Private Some-college Never-married Other-service Own-child White Female United-States 0 +35 0.3888889 0.12528348 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +59 0.655555546 0.115166314 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +45 0.5 0.121397182 0.9375 0.07688077 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 1 +50 0.5555556 0.14390333 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 +56 0.622222245 0.02176594 0.5 0 0 0.4040404 Self-emp-inc 12th Widowed Exec-managerial Not-in-family White Female United-States 0 +36 0.4 0.101280056 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +18 0.2 0.2612445 0.375 0 0 0.3030303 ? 10th Never-married ? Own-child White Male United-States 0 +28 0.311111122 0.211926952 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband Amer-Indian-Eskimo Male United-States 0 +42 0.466666669 0.161820024 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +60 0.6666667 0.13897644 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +41 0.455555558 0.1550261 0.625 0 0 0.9191919 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.115459979 0.8125 0.07298073 0 0.454545468 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +36 0.4 0.100074425 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +52 0.5777778 0.06041941 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.167310014 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +26 0.2888889 0.04889456 0.625 0 0 0.5555556 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +31 0.344444454 0.0926359147 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 +47 0.5222222 0.151589036 0.1875 0 0 0.4040404 Private 5th-6th Separated Sales Unmarried White Female Mexico 0 +35 0.3888889 0.146341532 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.0465755835 0.3125 0 0 0.25252524 Private 9th Never-married Handlers-cleaners Own-child White Male United-States 0 +59 0.655555546 0.05462836 0.625 0 0 0.8080808 Self-emp-not-inc Some-college Married-civ-spouse Sales Wife White Female United-States 1 +38 0.422222227 0.138648421 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.135459229 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.26759997 0.875 0 0 0.5555556 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +39 0.433333337 0.0777407 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +64 0.7111111 0.07745242 0.625 0 0 0.4040404 Private Some-college Separated Other-service Not-in-family White Male United-States 0 +17 0.188888893 0.026816776 0.375 0 0 0.25252524 Local-gov 10th Never-married Other-service Own-child White Female United-States 0 +49 0.544444442 0.102097049 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +19 0.211111113 0.111091428 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +36 0.4 0.121166162 0.5625 0.031370312 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 +26 0.2888889 0.170970663 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +27 0.3 0.119858831 0.1875 0.0217602178 0 0.4040404 Private 5th-6th Never-married Priv-house-serv Other-relative White Female El-Salvador 0 +66 0.733333349 0.07632695 0.8125 0.200512 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.215736464 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Adm-clerical Husband White Male United-States 0 +25 0.2777778 0.1544327 0.8125 0 0 0.25252524 Private Bachelors Never-married Exec-managerial Other-relative White Female United-States 0 +19 0.211111113 0.06788554 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.223222122 0.75 0.04787048 0 0.5050505 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 1 +22 0.244444445 0.115456611 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Unmarried Asian-Pac-Islander Male South 0 +60 0.6666667 0.13620618 0.625 0 0 0.444444448 Private Some-college Divorced Craft-repair Own-child White Male United-States 1 +54 0.6 0.207507223 0.625 0 0.453856736 0.181818187 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +46 0.51111114 0.1482611 0.5625 0 0 0.373737365 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.0213530641 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Own-child White Male United-States 0 +51 0.566666663 0.103662349 0.875 0 0 0.4040404 Local-gov Masters Divorced Exec-managerial Not-in-family White Female United-States 0 +43 0.477777779 0.121639654 0.9375 0.1502415 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.169761673 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Own-child White Female United-States 0 +60 0.6666667 0.107807279 0.5625 0 0 0.25252524 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +39 0.433333337 0.09998148 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +23 0.25555557 0.06178534 0.8125 0.0332503319 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Female United-States 0 +39 0.433333337 0.11896909 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 +40 0.444444448 0.0504807346 0.625 0 0 0.4040404 Local-gov Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +48 0.533333361 0.111459181 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.0301325861 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +32 0.355555564 0.0875864252 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +31 0.344444454 0.15796876 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.120573446 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +27 0.3 0.225917608 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Own-child White Female United-States 0 +45 0.5 0.210599422 0.875 0 0 0.3838384 State-gov Masters Never-married Adm-clerical Not-in-family Black Male United-States 0 +22 0.244444445 0.211345688 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Other-relative Black Female United-States 0 +31 0.344444454 0.133865654 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family Asian-Pac-Islander Male Vietnam 0 +63 0.7 0.08858258 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +45 0.5 0.191997737 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.127813265 0.625 0 0 0.5050505 State-gov Some-college Separated Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.08816903 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 +50 0.5555556 0.09855493 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +33 0.366666675 0.06925349 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Protective-serv Husband White Male United-States 0 +22 0.244444445 0.09286424 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +27 0.3 0.262003571 0.8125 0.135501355 0 0.464646459 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +29 0.322222233 0.055842746 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.208204329 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +60 0.6666667 0.3588895 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male Mexico 1 +46 0.51111114 0.131900281 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Transport-moving Husband White Male ? 0 +67 0.7444445 0.0666004345 0.875 0 0 0.4040404 ? Masters Widowed ? Not-in-family White Female United-States 0 +20 0.222222224 0.08992696 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child White Female France 0 +23 0.25555557 0.037189208 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Own-child White Male United-States 0 +38 0.422222227 0.11878252 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +60 0.6666667 0.125166953 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.03647324 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Female United-States 0 +37 0.411111116 0.143083647 0.625 0 0 0.4848485 Private Some-college Widowed Machine-op-inspct Unmarried Black Female United-States 0 +37 0.411111116 0.15125294 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +58 0.644444466 0.134733841 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.0279691927 0.8125 0 0 0.3030303 Private Bachelors Never-married Craft-repair Own-child White Male Canada 0 +27 0.3 0.0603473447 0.625 0 0 0.6060606 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +33 0.366666675 0.21809788 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +43 0.477777779 0.0207610279 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.1219744 0.625 0 0 0.2020202 Federal-gov Some-college Never-married Tech-support Own-child Black Male United-States 0 +45 0.5 0.146798864 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Other Male Mexico 0 +44 0.4888889 0.149952352 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +52 0.5777778 0.0821321458 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +53 0.5888889 0.233629584 0.5625 0.04787048 0 0.464646459 Private HS-grad Divorced Prof-specialty Not-in-family White Male United-States 1 +31 0.344444454 0.124529116 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 +18 0.2 0.06850452 0.4375 0 0 0.151515156 Federal-gov 11th Never-married Other-service Own-child Asian-Pac-Islander Male Philippines 0 +20 0.222222224 0.08419855 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +32 0.355555564 0.0357882567 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +48 0.533333361 0.3356411 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +46 0.51111114 0.4070708 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +28 0.311111122 0.117415249 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +27 0.3 0.240642428 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Sales Not-in-family Black Male United-States 0 +18 0.2 0.189079985 0.625 0 0 0.323232323 Federal-gov Some-college Never-married Sales Own-child White Female United-States 0 +69 0.7666667 0.124630146 0.5625 0.09386094 0 0.121212125 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.169218808 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.0963464156 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female Greece 0 +32 0.355555564 0.141806617 0.8125 0 0 0.3030303 Private Bachelors Divorced Sales Unmarried White Female United-States 0 +43 0.477777779 0.1160931 0.5625 0 0 0.4848485 Private HS-grad Separated Exec-managerial Not-in-family White Female United-States 0 +52 0.5777778 0.09335929 0.5625 0.07688077 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.118694961 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 +35 0.3888889 0.09405707 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 1 +20 0.222222224 0.1175055 0.5625 0 0 0.05050505 ? HS-grad Never-married ? Own-child White Female United-States 0 +73 0.811111152 0.08307711 0.5625 0 0 0.656565666 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +46 0.51111114 0.110747255 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +58 0.644444466 0.138232857 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +46 0.51111114 0.12984331 0.9375 0.1502415 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.110078432 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +25 0.2777778 0.177850142 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +22 0.244444445 0.2264524 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +33 0.366666675 0.0527424663 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +49 0.544444442 0.156973273 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.06158328 0.375 0 0 0.4040404 Private 10th Divorced Prof-specialty Unmarried White Female United-States 0 +56 0.622222245 0.106098518 0.625 0 0 0.4848485 Local-gov Some-college Divorced Protective-serv Not-in-family Black Male United-States 0 +24 0.266666681 0.0579677448 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Unmarried White Female Mexico 0 +42 0.466666669 0.0153774656 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +41 0.455555558 0.121358119 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Unmarried White Female United-States 0 +23 0.25555557 0.143204883 0.8125 0 0 0.6666667 Private Bachelors Never-married Other-service Not-in-family White Male Ecuador 0 +22 0.244444445 0.08480136 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +35 0.3888889 0.2268417 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Other-relative White Male United-States 0 +42 0.466666669 0.211926952 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Handlers-cleaners Other-relative Asian-Pac-Islander Male ? 0 +22 0.244444445 0.191262916 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male Mexico 0 +32 0.355555564 0.02397446 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.2763108 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +66 0.733333349 0.119969964 0.1875 0 0 0.151515156 Private 5th-6th Divorced Priv-house-serv Not-in-family Black Female United-States 0 +26 0.2888889 0.19828856 0.5625 0 0 0.3838384 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +46 0.51111114 0.0440175 0.625 0.0332503319 0 0.5555556 Private Some-college Divorced Transport-moving Own-child White Male United-States 0 +55 0.6111111 0.127782285 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.0157863013 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.119914062 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Male United-States 0 +22 0.244444445 0.073964186 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.13326554 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +30 0.333333343 0.183156252 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +54 0.6 0.0954149142 0.5625 0 0 0.151515156 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +19 0.211111113 0.134443551 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +56 0.622222245 0.0621099845 0.3125 0 0 0.4040404 Private 9th Divorced Craft-repair Not-in-family White Female United-States 1 +47 0.5222222 0.06294113 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Japan 0 +29 0.322222233 0.1585453 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +53 0.5888889 0.102285638 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.12748459 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +50 0.5555556 0.137789667 0.8125 0 0.43663913 0.6060606 ? Bachelors Married-civ-spouse ? Husband Black Male United-States 1 +42 0.466666669 0.23208113 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 1 +21 0.233333334 0.17872642 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Male United-States 0 +36 0.4 0.112399437 0.5625 0 0 0.7070707 Self-emp-inc HS-grad Never-married Other-service Not-in-family White Female United-States 0 +60 0.6666667 0.127062276 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Sales Husband White Male ? 1 +69 0.7666667 0.143630549 0.6875 0 0 0.25252524 Private Assoc-voc Widowed Sales Not-in-family White Female United-States 0 +31 0.344444454 0.07585817 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +48 0.533333361 0.08427264 0.625 0 0 0.5555556 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.0406875461 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +24 0.266666681 0.163796857 0.75 0.0861408561 0 0.4040404 Private Assoc-acdm Separated Craft-repair Unmarried Asian-Pac-Islander Male United-States 1 +47 0.5222222 0.393179119 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +36 0.4 0.04586029 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Amer-Indian-Eskimo Female United-States 0 +39 0.433333337 0.206536651 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.125663355 0.5625 0 0 0.464646459 Private HS-grad Never-married Transport-moving Not-in-family White Female United-States 0 +27 0.3 0.188306779 0.8125 0.105201051 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +36 0.4 0.29494682 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +54 0.6 0.2833499 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Other-service Husband White Male Mexico 0 +33 0.366666675 0.06344223 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +42 0.466666669 0.1037755 0.5625 0.07688077 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.09825454 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +23 0.25555557 0.140732333 0.8125 0 0 0.323232323 Private Bachelors Never-married Sales Own-child White Male United-States 0 +33 0.366666675 0.1561428 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +30 0.333333343 0.120284505 0.6875 0 0 0.3838384 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.143602937 0.6875 0 0 0.3838384 Private Assoc-voc Married-civ-spouse Tech-support Husband Black Male Jamaica 0 +35 0.3888889 0.09413992 0.6875 0 0 0.2020202 ? Assoc-voc Married-civ-spouse ? Wife White Female United-States 1 +27 0.3 0.103636079 0.5625 0 0 0.373737365 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +24 0.266666681 0.0597263426 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +44 0.4888889 0.101763651 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +62 0.6888889 0.09336603 0.6875 0 0 0.2020202 Private Assoc-voc Separated Priv-house-serv Not-in-family Black Female United-States 0 +45 0.5 0.02051384 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +75 0.8333334 0.1436979 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +47 0.5222222 0.129841283 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +64 0.7111111 0.12991403 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 0 +54 0.6 0.069390215 0.5625 0 0 0.424242437 Private HS-grad Divorced Tech-support Not-in-family White Male United-States 1 +41 0.455555558 0.343551069 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.120303363 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.16835399 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +51 0.566666663 0.119690448 0.8125 0 0 0.5050505 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 +45 0.5 0.08158119 0.9375 0 0 0.5050505 Self-emp-inc Prof-school Never-married Craft-repair Not-in-family White Male United-States 1 +18 0.2 0.01740211 0.4375 0 0 0.727272749 ? 11th Never-married ? Own-child White Male United-States 0 +43 0.477777779 0.375393778 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male Yugoslavia 0 +30 0.333333343 0.0604396164 0.5625 0 0.3452709 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +32 0.355555564 0.149893746 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +45 0.5 0.0318676122 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male ? 1 +61 0.677777767 0.2130787 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +21 0.233333334 0.134766847 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Other-service Other-relative White Male England 0 +56 0.622222245 0.1830633 0.4375 0 0 0.4949495 Private 11th Divorced Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.02141907 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +23 0.25555557 0.132354915 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Black Female United-States 0 +55 0.6111111 0.127926424 0.625 0 0 0.8484849 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +27 0.3 0.33755663 0.625 0 0.09618916 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male Mexico 0 +33 0.366666675 0.2434807 0.5625 0 0 0.7070707 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +22 0.244444445 0.101148039 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +43 0.477777779 0.10446924 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.04194234 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +38 0.422222227 0.12791498 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 +18 0.2 0.218232587 0.3125 0 0 0.2020202 Private 9th Never-married Farming-fishing Own-child White Male United-States 0 +35 0.3888889 0.07126197 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +67 0.7444445 0.0360933654 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +29 0.322222233 0.072740376 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Female United-States 0 +19 0.211111113 0.229383618 0.125 0 0 0.5555556 Private 1st-4th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 +39 0.433333337 0.1130036 0.4375 0 0 0.353535354 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.1541451 0.625 0 0.4331956 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.0273899529 0.9375 0 0 0.5555556 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.18689774 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +42 0.466666669 0.13194339 0.25 0 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.1636581 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +52 0.5777778 0.159288883 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +18 0.2 0.210569784 0.4375 0 0 0.25252524 ? 11th Never-married ? Own-child White Male United-States 0 +64 0.7111111 0.0402968936 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male France 0 +30 0.333333343 0.0163615 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.121510334 0.8125 0 0 0.424242437 Local-gov Bachelors Divorced Exec-managerial Unmarried White Male Germany 0 +49 0.544444442 0.0816579759 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Unmarried White Male United-States 0 +35 0.3888889 0.1899246 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.234887749 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.13079299 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +19 0.211111113 0.2216804 0.4375 0 0 0.4040404 Private 11th Separated Other-service Own-child White Female United-States 0 +22 0.244444445 0.138707012 0.8125 0.0220202189 0 0.04040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +31 0.344444454 0.04187027 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +26 0.2888889 0.151114866 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.0233864635 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +38 0.422222227 0.11852321 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +33 0.366666675 0.242087156 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.09328722 0.5625 0 0 0.373737365 ? HS-grad Separated ? Unmarried Black Female United-States 0 +18 0.2 0.181148455 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child White Male United-States 0 +32 0.355555564 0.173757076 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Tech-support Unmarried Black Female United-States 0 +27 0.3 0.08001523 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.05277547 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Husband Black Male Jamaica 0 +30 0.333333343 0.4107139 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +33 0.366666675 0.08295049 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 +74 0.822222233 0.0567095838 0.875 0 0 0.1010101 Private Masters Divorced Sales Not-in-family White Female United-States 0 +36 0.4 0.109322727 0.5625 0 0 0.7070707 Private HS-grad Never-married Craft-repair Not-in-family Asian-Pac-Islander Male South 0 +36 0.4 0.09324479 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 +29 0.322222233 0.161481917 0.5625 0 0.4722222 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +39 0.433333337 0.176572457 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 +25 0.2777778 0.089831315 0.8125 0 0 0.8080808 Self-emp-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 +21 0.233333334 0.0390084237 0.5625 0 0 0.4040404 Private HS-grad Separated Farming-fishing Own-child White Male United-States 0 +39 0.433333337 0.0962460563 0.6875 0 0 0.5050505 State-gov Assoc-voc Never-married Exec-managerial Unmarried White Female United-States 0 +38 0.422222227 0.108449832 0.625 0 0 0.323232323 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +20 0.222222224 0.153223038 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Not-in-family Asian-Pac-Islander Female United-States 0 +51 0.566666663 0.206633642 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.0227863453 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.127279162 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +50 0.5555556 0.21118404 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 +38 0.422222227 0.14857161 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.321005851 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.110234022 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 +36 0.4 0.206536651 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.13906467 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Germany 0 +34 0.377777785 0.11422 0.875 0 0 0.5050505 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +19 0.211111113 0.08559613 0.625 0 0 0.1010101 State-gov Some-college Never-married Other-service Own-child White Male United-States 0 +18 0.2 0.102406874 0.375 0 0 0.0303030312 Private 10th Never-married Other-service Own-child White Female United-States 0 +36 0.4 0.07502299 0.375 0 0 0.4040404 Private 10th Divorced Sales Own-child White Male United-States 0 +46 0.51111114 0.068914704 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +29 0.322222233 0.14392893 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +23 0.25555557 0.110234022 0.5625 0 0 0.323232323 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +35 0.3888889 0.020562334 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +35 0.3888889 0.195477217 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +40 0.444444448 0.122674875 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +22 0.244444445 0.0493471771 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child Asian-Pac-Islander Male United-States 0 +19 0.211111113 0.0406895652 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +70 0.7777778 0.126551062 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +38 0.422222227 0.130870447 0.625 0 0 0.5555556 Private Some-college Divorced Transport-moving Not-in-family Black Male United-States 0 +35 0.3888889 0.108378433 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.0998851657 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 +39 0.433333337 0.111633629 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +50 0.5555556 0.08296194 1 0 0 0.373737365 Private Doctorate Married-civ-spouse Prof-specialty Husband Black Male ? 1 +43 0.477777779 0.123942472 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.126670957 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male Philippines 1 +51 0.566666663 0.09352161 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male El-Salvador 1 +29 0.322222233 0.05289199 0.375 0 0 0.121212125 ? 10th Separated ? Unmarried White Female United-States 0 +20 0.222222224 0.110756688 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +21 0.233333334 0.13431558 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.122140095 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Wife Black Female United-States 0 +44 0.4888889 0.116778754 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Tech-support Unmarried White Female United-States 0 +17 0.188888893 0.124552689 0.3125 0 0.3946281 0.151515156 Private 9th Never-married Handlers-cleaners Own-child White Male United-States 0 +25 0.2777778 0.145068556 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family White Male United-States 0 +43 0.477777779 0.285641938 1 0 0 0.4040404 State-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 +46 0.51111114 0.142870128 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 1 +42 0.466666669 0.125118464 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +46 0.51111114 0.0902327448 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family Amer-Indian-Eskimo Male United-States 0 +22 0.244444445 0.0219680015 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +49 0.544444442 0.10049808 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +21 0.233333334 0.108580492 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +53 0.5888889 0.1923756 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Adm-clerical Wife White Female United-States 1 +43 0.477777779 0.1899832 0.625 0 0 0.424242437 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 +22 0.244444445 0.065675 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +33 0.366666675 0.2403326 0.8125 0.105201051 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +28 0.311111122 0.115263976 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +25 0.2777778 0.156016186 0.625 0 0 0.24242425 Private Some-college Never-married Tech-support Unmarried White Female United-States 0 +40 0.444444448 0.128875434 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male China 1 +50 0.5555556 0.152553543 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +48 0.533333361 0.251636535 0.625 0 0 0.656565666 Self-emp-not-inc Some-college Divorced Sales Unmarried White Male United-States 1 +30 0.333333343 0.0263688751 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.1945437 0.5625 0 0 0.3838384 Private HS-grad Married-spouse-absent Other-service Unmarried Black Female United-States 0 +34 0.377777785 0.1978191 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 0 +42 0.466666669 0.0536039174 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male United-States 1 +48 0.533333361 0.0552958325 0.625 0 0 0.656565666 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 0 +38 0.422222227 0.1652665 0.8125 0.07688077 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.0527114831 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.239775583 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 +64 0.7111111 0.147160545 0.8125 0.2782828 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 +44 0.4888889 0.07470036 0.6875 0 0 0.25252524 Private Assoc-voc Married-civ-spouse Transport-moving Wife White Female United-States 0 +42 0.466666669 0.0230470039 0.8125 0.07298073 0 0.5050505 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.16763936 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +25 0.2777778 0.2449692 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +33 0.366666675 0.1834782 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +38 0.422222227 0.0862346441 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +20 0.222222224 0.119408906 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +44 0.4888889 0.132917985 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +45 0.5 0.192535222 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 +27 0.3 0.130576789 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Sales Not-in-family White Male United-States 0 +18 0.2 0.156315237 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +38 0.422222227 0.0184602328 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +45 0.5 0.166391984 0.4375 0 0 0.424242437 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.109384693 0.5625 0.0217402168 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Not-in-family Black Male United-States 0 +64 0.7111111 0.159183815 0.1875 0 0 0.161616161 Private 5th-6th Widowed Other-service Not-in-family Black Female United-States 0 +66 0.733333349 0.120754629 0.5625 0.0343203433 0 0.2020202 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +34 0.377777785 0.0204976741 0.8125 0 0 0.353535354 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +45 0.5 0.06921981 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 +42 0.466666669 0.148966968 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +32 0.355555564 0.07281985 0.8125 0 0.43663913 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.252911538 0.375 0 0 0.2020202 Private 10th Never-married Adm-clerical Not-in-family Black Male United-States 0 +27 0.3 0.120352529 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Other-relative White Male United-States 0 +21 0.233333334 0.186373055 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Female United-States 0 +23 0.25555557 0.1603598 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 +47 0.5222222 0.05710899 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.0252454188 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +46 0.51111114 0.12035118 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +35 0.3888889 0.103674471 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife Black Female United-States 0 +55 0.6111111 0.0745926 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.07854288 0.625 0 0 0.24242425 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +21 0.233333334 0.07320444 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +36 0.4 0.246337831 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +29 0.322222233 0.131530508 1 0 0 0.6060606 Private Doctorate Divorced Prof-specialty Not-in-family White Female United-States 1 +38 0.422222227 0.08482022 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 +37 0.411111116 0.09487002 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +81 0.900000036 0.130151778 0.125 0 0 0.454545468 Self-emp-not-inc 1st-4th Widowed Sales Other-relative White Male Mexico 0 +41 0.455555558 0.03156856 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +29 0.322222233 0.23662883 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 +30 0.333333343 0.1274765 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.159334019 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +42 0.466666669 0.37559247 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +30 0.333333343 0.2522077 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Own-child Black Male United-States 0 +65 0.722222269 0.108206011 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +18 0.2 0.0826932 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +26 0.2888889 0.144414544 0.4375 0.06497065 0 0.4848485 Private 11th Never-married Machine-op-inspct Unmarried White Male United-States 0 +30 0.333333343 0.2218791 0.625 0 0 0.4848485 Private Some-college Never-married Protective-serv Own-child White Male United-States 0 +61 0.677777767 0.120099284 0.75 0 0 0.424242437 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 +21 0.233333334 0.162962347 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +53 0.5888889 0.0876558 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +41 0.455555558 0.07717358 0.9375 0 0.5544077 0.5555556 Self-emp-inc Prof-school Married-civ-spouse Exec-managerial Wife White Female United-States 1 +43 0.477777779 0.0876443461 0.625 0.1502415 0 0.454545468 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +60 0.6666667 0.269000918 0.25 0 0 0.151515156 Private 7th-8th Separated Priv-house-serv Unmarried Black Female United-States 0 +47 0.5222222 0.110334381 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.04686857 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Black Male United-States 0 +32 0.355555564 0.160235882 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 +25 0.2777778 0.148108214 0.875 0 0 0.353535354 ? Masters Never-married ? Not-in-family White Female Canada 0 +31 0.344444454 0.163780019 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Unmarried White Male United-States 0 +33 0.366666675 0.117064334 0.875 0 0 0.3030303 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.04398719 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +44 0.4888889 0.275159717 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 1 +44 0.4888889 0.15881 0.625 0.07298073 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.212138444 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +34 0.377777785 0.05469504 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family Black Male United-States 0 +51 0.566666663 0.197477624 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.06420737 0.875 0 0 0.4040404 Private Masters Divorced Protective-serv Unmarried White Male United-States 0 +25 0.2777778 0.0306283068 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +25 0.2777778 0.251045167 0.8125 0 0 0.24242425 Private Bachelors Never-married Other-service Not-in-family Black Female Jamaica 0 +29 0.322222233 0.0783953741 0.8125 0 0 0.5050505 Federal-gov Bachelors Married-AF-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.02302141 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 1 +55 0.6111111 0.220642492 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +39 0.433333337 0.475636572 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Unmarried White Female United-States 0 +31 0.344444454 0.0219235476 0.375 0 0 0.4040404 Private 10th Divorced Handlers-cleaners Not-in-family White Male United-States 0 +31 0.344444454 0.11709936 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male India 0 +51 0.566666663 0.154976919 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +30 0.333333343 0.0936293751 0.6875 0.0246302467 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Other-relative Asian-Pac-Islander Male Vietnam 0 +62 0.6888889 0.117673881 0.5625 0 0 0.323232323 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +37 0.411111116 0.115275428 0.8125 1 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.05232622 0.8125 0.07688077 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.130597 0.8125 0 0 0.5252525 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +32 0.355555564 0.131339222 0.8125 0.07298073 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.204162449 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +35 0.3888889 0.126988187 0.3125 0 0 0.5050505 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.106860287 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Prof-specialty Unmarried White Female United-States 0 +45 0.5 0.137533054 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 +27 0.3 0.123796985 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +46 0.51111114 0.100353271 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.128579751 0.4375 0 0 0.2020202 Private 11th Married-civ-spouse Adm-clerical Wife White Female United-States 0 +37 0.411111116 0.117046826 0.625 0 0 0.3030303 State-gov Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +42 0.466666669 0.169218138 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Puerto-Rico 0 +45 0.5 0.0759484246 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 +33 0.366666675 0.2867809 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +46 0.51111114 0.133178651 0.6875 0 0 0.4040404 Private Assoc-voc Married-spouse-absent Machine-op-inspct Unmarried White Male United-States 0 +24 0.266666681 0.08025567 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +56 0.622222245 0.0901317149 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family White Female United-States 0 +34 0.377777785 0.124978364 0.625 0 0 0.121212125 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 1 +50 0.5555556 0.07360183 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +48 0.533333361 0.0242607128 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.03088627 0.4375 0 0 0.363636374 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 +55 0.6111111 0.1245244 0.6875 0.05178052 0 0.5050505 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 +41 0.455555558 0.230910525 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +66 0.733333349 0.1581075 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.07151522 0.625 0 0.323232323 0.4040404 Federal-gov Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.119818419 0.625 0.0501305 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 0 +63 0.7 0.173688382 0.9375 0 0 0.4040404 ? Prof-school Married-civ-spouse ? Husband White Male United-States 0 +61 0.677777767 0.0579690933 0.75 0.1502415 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +64 0.7111111 0.044880297 0.8125 0.2782828 0 0.5050505 Private Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 +35 0.3888889 0.09324479 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +22 0.244444445 0.1884563 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +58 0.644444466 0.27422148 0.25 0.0293602925 0 0.5050505 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +58 0.644444466 0.0213725958 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.137516886 0.5625 0 0 0.4848485 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +34 0.377777785 0.06775285 0.625 0 0 0.0606060624 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +33 0.366666675 0.1095322 0.875 0 0 0.5050505 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.0545111671 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +17 0.188888893 0.03194237 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Female United-States 0 +27 0.3 0.0726151 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Other-relative White Male United-States 1 +20 0.222222224 0.07034596 0.625 0 0 0.2020202 Self-emp-inc Some-college Never-married Adm-clerical Own-child White Female United-States 0 +52 0.5777778 0.07913761 0.8125 0 0.40289256 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 1 +30 0.333333343 0.141234115 0.25 0 0 0.4040404 Private 7th-8th Divorced Transport-moving Not-in-family White Male United-States 0 +22 0.244444445 0.211843431 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +20 0.222222224 0.128491521 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Not-in-family White Female United-States 0 +64 0.7111111 0.134234071 0.1875 0 0 0.454545468 Local-gov 5th-6th Divorced Other-service Not-in-family White Female ? 0 +49 0.544444442 0.126200154 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.145570338 0.8125 0 0 0.6060606 Private Bachelors Divorced Other-service Not-in-family Black Female ? 0 +46 0.51111114 0.1477014 0.5625 0 0 0.8080808 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +17 0.188888893 0.0918451846 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Male United-States 0 +45 0.5 0.157471687 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +27 0.3 0.139833167 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +45 0.5 0.120120831 0.6875 0 0 0.3030303 Self-emp-inc Assoc-voc Divorced Sales Unmarried White Female United-States 0 +26 0.2888889 0.1263901 0.5625 0 0 0.7878788 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 1 +23 0.25555557 0.126991555 0.75 0 0.453168035 0.2020202 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 +44 0.4888889 0.039148517 0.8125 0 0 0.454545468 Local-gov Bachelors Divorced Prof-specialty Unmarried White Male United-States 0 +36 0.4 0.216698274 0.8125 0 0.3996786 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +35 0.3888889 0.1389185 0.3125 0 0 0.4040404 Private 9th Never-married Exec-managerial Not-in-family White Female United-States 0 +24 0.266666681 0.102471538 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +56 0.622222245 0.051377885 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Prof-specialty Unmarried White Female United-States 0 +47 0.5222222 0.4086684 0.875 0 0 0.4040404 Private Masters Divorced Tech-support Not-in-family White Male United-States 0 +32 0.355555564 0.0201609079 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +29 0.322222233 0.07688935 0.8125 0.0332503319 0 0.1010101 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +55 0.6111111 0.153029054 0.75 0 0 0.05050505 ? Assoc-acdm Married-spouse-absent ? Not-in-family White Female United-States 0 +35 0.3888889 0.0442000255 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.0229985081 0.5625 0 0 0.686868668 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.02315477 0.6875 0.03908039 0 0.75757575 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +33 0.366666675 0.0952983946 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +34 0.377777785 0.134186253 0.5625 0 0 0.5050505 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +24 0.266666681 0.151514277 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +25 0.2777778 0.155826911 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.07646637 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +38 0.422222227 0.0149827749 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.0245052055 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male Mexico 1 +35 0.3888889 0.215736464 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +67 0.7444445 0.135822937 0.8125 0 0 0.6060606 ? Bachelors Divorced ? Not-in-family White Female United-States 0 +34 0.377777785 0.03295941 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +46 0.51111114 0.06833344 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +19 0.211111113 0.164315477 0.625 0 0 0.161616161 Local-gov Some-college Never-married Sales Own-child White Female United-States 0 +26 0.2888889 0.06123439 0.75 0 0 0.151515156 Private Assoc-acdm Never-married Other-service Own-child Black Female United-States 0 +28 0.311111122 0.212356672 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family Black Male United-States 0 +47 0.5222222 0.07156641 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.145412728 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Adm-clerical Husband White Male Italy 1 +33 0.366666675 0.115160257 0.9375 0 0.4331956 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.141795844 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.131667912 0.5625 0 0 0.4040404 Private HS-grad Never-married Priv-house-serv Own-child White Female Guatemala 0 +18 0.2 0.102542929 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child Asian-Pac-Islander Male United-States 0 +60 0.6666667 0.126485735 0.5625 0.03103031 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +44 0.4888889 0.07435551 0.875 0.14084141 0 0.565656543 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 +81 0.900000036 0.060207922 0.9375 0 0 0.24242425 ? Prof-school Married-civ-spouse ? Husband White Male United-States 1 +43 0.477777779 0.171628043 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Not-in-family White Female United-States 0 +35 0.3888889 0.02813825 0.5 0 0 0.2020202 Private 12th Never-married Farming-fishing Not-in-family White Male United-States 0 +58 0.644444466 0.158173516 0.5625 0 0 0.727272749 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +32 0.355555564 0.0536039174 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 +40 0.444444448 0.0776794 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.0428125449 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 +21 0.233333334 0.08894225 0.625 0 0.395087242 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +44 0.4888889 0.249545872 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 +33 0.366666675 0.0397944376 0.8125 0 0.43663913 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +25 0.2777778 0.04675205 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +42 0.466666669 0.02221384 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +27 0.3 0.1190021 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +62 0.6888889 0.0970670953 0.375 0 0 0.4040404 ? 10th Married-civ-spouse ? Husband White Male United-States 0 +31 0.344444454 0.140912175 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Sales Not-in-family Black Male ? 0 +33 0.366666675 0.101472683 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Other-relative Black Female United-States 0 +50 0.5555556 0.08405239 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.0149598746 0.875 0.07688077 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.182234854 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +22 0.244444445 0.0257633682 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Other-service Unmarried White Female United-States 0 +66 0.733333349 0.109749079 0.9375 0.200512 0 0.5555556 State-gov Prof-school Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +52 0.5777778 0.131768942 0.5625 0 0 0.454545468 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +57 0.6333333 0.080019936 0.125 0 0.3677686 0.454545468 Self-emp-not-inc 1st-4th Widowed Craft-repair Other-relative White Female Columbia 0 +41 0.455555558 0.0296395589 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Divorced Farming-fishing Not-in-family White Male United-States 0 +42 0.466666669 0.0806079358 0.5625 0 0.3624885 0.424242437 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +19 0.211111113 0.224928856 0.5 0 0 0.3030303 Private 12th Never-married Other-service Other-relative White Female United-States 0 +45 0.5 0.1159227 0.8125 0 0 0.6060606 Local-gov Bachelors Divorced Exec-managerial Unmarried Black Female United-States 0 +51 0.566666663 0.0218036585 0.5 0 0 1 Self-emp-not-inc 12th Married-civ-spouse Other-service Husband White Male United-States 0 +69 0.7666667 0.0791571438 0.75 0 0 0.01010101 ? Assoc-acdm Divorced ? Unmarried White Female United-States 0 +45 0.5 0.08330342 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +48 0.533333361 0.21375291 0.625 0 0 0.5050505 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +60 0.6666667 0.0807109848 0.625 0.07298073 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +42 0.466666669 0.0909648761 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +19 0.211111113 0.09103627 0.625 0 0 0.1010101 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +39 0.433333337 0.130668387 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.119641952 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +58 0.644444466 0.143371239 0.5625 0.03908039 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +36 0.4 0.0205488633 0.625 0 0 0.454545468 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +21 0.233333334 0.07995663 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +41 0.455555558 0.134045482 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.102241859 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 +29 0.322222233 0.122098334 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +52 0.5777778 0.156276166 0.625 0 0 0.6060606 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +33 0.366666675 0.152398631 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male Mexico 0 +38 0.422222227 0.161962822 0.875 0 0 0.353535354 Private Masters Never-married Exec-managerial Unmarried Black Female United-States 0 +42 0.466666669 0.103976212 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.155905053 0.75 0 0 0.3030303 State-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 +59 0.655555546 0.106966034 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.23336488 0.8125 0 0.5544077 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +54 0.6 0.145476714 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +39 0.433333337 0.119319327 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.160427839 0.5625 0 0 0.969697 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +54 0.6 0.105610207 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.0879770741 0.75 0 0 0.4040404 Private Assoc-acdm Married-spouse-absent Craft-repair Other-relative Asian-Pac-Islander Female ? 0 +50 0.5555556 0.118096866 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +42 0.466666669 0.0255518779 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +48 0.533333361 0.112233743 0.8125 0.07688077 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +31 0.344444454 0.1489636 0.8125 0 0 0.3030303 Private Bachelors Widowed Other-service Not-in-family White Female United-States 0 +56 0.622222245 0.120994411 0.5625 0 0 0.454545468 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.14359419 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 +34 0.377777785 0.106248043 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +28 0.311111122 0.1534581 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Female United-States 0 +41 0.455555558 0.113897376 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male ? 1 +44 0.4888889 0.125894368 0.625 0 0.4331956 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +34 0.377777785 0.02535588 0.75 0 0 0.656565666 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.105763771 0.875 0 0 0.5555556 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +37 0.411111116 0.1271458 0.8125 0 0.6483012 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +64 0.7111111 0.0985192358 0.625 0.03411034 0 0.151515156 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +25 0.2777778 0.123025112 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +48 0.533333361 0.13502413 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.241438538 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +17 0.188888893 0.05294116 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Other-relative White Female United-States 0 +44 0.4888889 0.143743038 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +46 0.51111114 0.232983 0.625 0 0 0.4040404 Local-gov Some-college Divorced Transport-moving Not-in-family White Female United-States 0 +32 0.355555564 0.08050219 0.8125 0 0 0.5050505 ? Bachelors Divorced ? Not-in-family White Male United-States 0 +42 0.466666669 0.08508088 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 +33 0.366666675 0.158463135 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Sales Not-in-family White Male United-States 1 +61 0.677777767 0.0954701453 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 +47 0.5222222 0.242109373 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.07365167 0.8125 0.0861408561 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Female United-States 1 +62 0.6888889 0.09975921 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband Black Male United-States 0 +62 0.6888889 0.0508370362 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.0676060244 0.9375 1 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.0191654246 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +33 0.366666675 0.155864641 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +39 0.433333337 0.08043416 0.8125 0 0 0.424242437 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +17 0.188888893 0.139420286 0.4375 0 0 0.1010101 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +58 0.644444466 0.123802371 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.125986651 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Separated Prof-specialty Not-in-family White Female United-States 0 +34 0.377777785 0.104923874 0.5625 0.0406404063 0 0.5050505 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +55 0.6111111 0.130594969 0.25 0 0 0.4040404 ? 7th-8th Divorced ? Unmarried White Female United-States 0 +32 0.355555564 0.0326798931 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.114585057 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Never-married Sales Own-child White Male United-States 0 +41 0.455555558 0.07246153 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +24 0.266666681 0.132512525 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +52 0.5777778 0.164486557 0.5625 0 0 0.353535354 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +48 0.533333361 0.08615921 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +32 0.355555564 0.02870402 0.625 0 0 0.3030303 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +47 0.5222222 0.128907084 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +38 0.422222227 0.126613036 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Sales Wife White Female United-States 0 +18 0.2 0.144884 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +25 0.2777778 0.1551096 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.0607251972 0.8125 0 0 0.323232323 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +40 0.444444448 0.1181366 0.6875 0 0 0.2020202 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 +56 0.622222245 0.03594384 0.4375 0 0 0.2020202 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.031086985 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 1 +55 0.6111111 0.0415624678 0.5625 0.06418064 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +32 0.355555564 0.07587366 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +41 0.455555558 0.116980813 0.6875 0 0 0.434343427 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +28 0.311111122 0.108426258 0.625 0 0 0.5252525 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +53 0.5888889 0.04866758 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.122806892 0.6875 0 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Wife White Female United-States 0 +60 0.6666667 0.032860402 0.8125 0.0545505434 0 0.5555556 Local-gov Bachelors Separated Prof-specialty Unmarried White Female United-States 0 +21 0.233333334 0.2813138 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 +29 0.322222233 0.07237667 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +73 0.811111152 0.09938069 0.625 0 0.499081731 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.0227176454 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.068685025 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.252384156 0.3125 0 0 0.353535354 ? 9th Married-civ-spouse ? Wife White Female United-States 0 +36 0.4 0.14439097 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Own-child White Female United-States 1 +25 0.2777778 0.074926 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Other-relative White Female United-States 0 +38 0.422222227 0.170368522 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +30 0.333333343 0.07981384 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +49 0.544444442 0.131751433 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.117582284 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.128234908 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +64 0.7111111 0.1122883 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.09613021 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.04948525 0.8125 0 0.4331956 0.474747479 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.162823588 0.1875 0 0 0.4040404 Private 5th-6th Separated Machine-op-inspct Unmarried White Female Mexico 0 +35 0.3888889 0.212931871 0.625 0.07443074 0 0.4040404 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 +61 0.677777767 0.1674373 0.125 0 0 0.4040404 Local-gov 1st-4th Married-civ-spouse Other-service Husband White Male Mexico 0 +52 0.5777778 0.0607454032 0.25 0 0 0.161616161 Private 7th-8th Divorced Priv-house-serv Own-child Black Female United-States 0 +40 0.444444448 0.138205916 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +20 0.222222224 0.100316226 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +52 0.5777778 0.200736851 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +50 0.5555556 0.104214646 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +49 0.544444442 0.112351611 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 1 +36 0.4 0.06542444 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Unmarried Black Female United-States 0 +33 0.366666675 0.234136075 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Unmarried White Male United-States 0 +40 0.444444448 0.07942116 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 +45 0.5 0.179739416 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.0484028831 0.625 0 0 0.353535354 Private Some-college Never-married Craft-repair Own-child White Female United-States 0 +47 0.5222222 0.106722213 0.875 0 0 0.02020202 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +24 0.266666681 0.154795736 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 +19 0.211111113 0.08202842 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +40 0.444444448 0.10194955 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 +40 0.444444448 0.243067816 0.625 0 0 0.5050505 Private Some-college Never-married Tech-support Not-in-family White Female United-States 1 +54 0.6 0.0245705377 0.5625 0.1502415 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.07857858 0.9375 0 0 0.353535354 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband Other Male United-States 1 +63 0.7 0.14423269 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Transport-moving Husband White Male Cuba 0 +18 0.2 0.0305218883 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 +19 0.211111113 0.210125253 0.125 0 0 0.4040404 Private 1st-4th Never-married Machine-op-inspct Other-relative White Male Mexico 0 +49 0.544444442 0.0326630548 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +27 0.3 0.0780929551 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.115070671 0.875 0 0 0.4040404 Local-gov Masters Divorced Exec-managerial Not-in-family White Female United-States 0 +60 0.6666667 0.0962628946 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +71 0.788888931 0.122112475 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +34 0.377777785 0.193085492 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.157046691 0.8125 0 0 0.464646459 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +30 0.333333343 0.119420357 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.226970345 0.5625 0 0 0.171717167 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +32 0.355555564 0.255547076 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.121760219 0.5625 0 0 0.75757575 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +25 0.2777778 0.09555838 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Unmarried White Male ? 0 +22 0.244444445 0.153771967 0.625 0 0 0.4040404 Private Some-college Married-AF-spouse Other-service Wife White Female United-States 1 +32 0.355555564 0.222261667 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +40 0.444444448 0.1666789 1 0 0 0.3030303 Private Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 +51 0.566666663 0.4538033 0.875 0.2782828 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +20 0.222222224 0.104919836 0.5625 0 0 0.3030303 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +34 0.377777785 0.05470649 0.5625 0 0 0.4848485 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +40 0.444444448 0.158968285 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +34 0.377777785 0.06962393 0.6875 0 0 0.4040404 State-gov Assoc-voc Never-married Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.134356663 0.375 0 0 0.25252524 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 +53 0.5888889 0.102819756 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband Black Male United-States 0 +42 0.466666669 0.30997 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +38 0.422222227 0.0613179058 0.875 0 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.13293685 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +64 0.7111111 0.179967061 0.9375 0 0 0.161616161 ? Prof-school Married-civ-spouse ? Husband White Male United-States 0 +30 0.333333343 0.07535706 0.625 0 0 0.4040404 State-gov Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +20 0.222222224 0.04507091 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Farming-fishing Own-child White Male Mexico 0 +19 0.211111113 0.197064742 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +20 0.222222224 0.263809323 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Other-relative White Male United-States 0 +35 0.3888889 0.3201471 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +33 0.366666675 0.146940976 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.06838665 0.625 0 0.43663913 0.151515156 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.0442552567 0.625 0 0 0.3838384 Federal-gov Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +50 0.5555556 0.105479538 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 +23 0.25555557 0.1353582 0.5625 0 0 0.1010101 Private HS-grad Divorced Other-service Own-child White Female United-States 0 +30 0.333333343 0.110791706 0.625 0 0 0.1010101 Local-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 +33 0.366666675 0.3690201 0.8125 0 0 0.4040404 Private Bachelors Separated Exec-managerial Unmarried Black Female United-States 0 +48 0.533333361 0.156357661 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +43 0.477777779 0.06494287 0.8125 0 0 0.24242425 Private Bachelors Divorced Prof-specialty Unmarried White Female Outlying-US(Guam-USVI-etc) 0 +33 0.366666675 0.37327686 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family Black Male Philippines 0 +50 0.5555556 0.157703385 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +23 0.25555557 0.2563095 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +36 0.4 0.0699708 0.625 0 0 0.5050505 Local-gov Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 +50 0.5555556 0.0368484 0.5625 0 0 0.464646459 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +26 0.2888889 0.186264619 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +55 0.6111111 0.118573055 0.875 0 0.5204316 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 +37 0.411111116 0.07719042 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +43 0.477777779 0.218031868 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +38 0.422222227 0.176049784 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.1505673 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 +47 0.5222222 0.239763454 1 0 0.459595948 0.454545468 Self-emp-not-inc Doctorate Married-civ-spouse Transport-moving Husband White Male United-States 0 +44 0.4888889 0.07221502 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 0 +28 0.311111122 0.0213624928 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.221557155 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +51 0.566666663 0.0999733955 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.08190314 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +62 0.6888889 0.16440101 1 0.1502415 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.0561896153 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 +29 0.322222233 0.10595236 0.4375 0.0282902829 0 0.141414136 Private 11th Married-civ-spouse Handlers-cleaners Wife Asian-Pac-Islander Female Philippines 0 +23 0.25555557 0.0389962979 0.625 0 0 0.3030303 Private Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 +40 0.444444448 0.118073292 0.625 0 0 0.4040404 State-gov Some-college Divorced Sales Not-in-family White Female United-States 0 +66 0.733333349 0.06914707 0.25 0 0 0.5050505 Self-emp-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +17 0.188888893 0.0667977855 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Not-in-family White Female United-States 0 +37 0.411111116 0.1403363 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +69 0.7666667 0.2435238 0.9375 0 0 0.0303030312 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 +23 0.25555557 0.144887373 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.139466092 0.5625 0 0 0.424242437 Federal-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.108378433 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.0436982438 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +38 0.422222227 0.2896434 0.3125 0 0 0.545454562 Private 9th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +37 0.411111116 0.0499513373 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.0662683845 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.2599971 0.3125 0 0 0.7070707 Private 9th Never-married Farming-fishing Unmarried White Male United-States 0 +17 0.188888893 0.07597132 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Female United-States 0 +48 0.533333361 0.223926648 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +17 0.188888893 0.02600584 0.4375 0 0 0.232323229 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 +55 0.6111111 0.2483975 0.875 0 0.453856736 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.0162362214 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +68 0.75555557 0.0732017457 0.625 0 0 0.121212125 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 +35 0.3888889 0.162994 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +53 0.5888889 0.210443154 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.0466981679 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +36 0.4 0.1162103 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Own-child White Male United-States 0 +24 0.266666681 0.185817391 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 +45 0.5 0.0292846058 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +34 0.377777785 0.1346153 0.625 0 0.4722222 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +56 0.622222245 0.158413291 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.114754111 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.219019264 0.625 0 0 0.5050505 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +19 0.211111113 0.236541942 0.3125 0 0.3946281 0.353535354 ? 9th Never-married ? Other-relative White Male El-Salvador 0 +33 0.366666675 0.0955348 0.5625 0 0 0.363636374 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +48 0.533333361 0.139971912 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Not-in-family White Female Columbia 0 +20 0.222222224 0.09293025 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 +64 0.7111111 0.108657949 0.75 0 0.4331956 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.197765216 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male Dominican-Republic 0 +20 0.222222224 0.0254481528 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +44 0.4888889 0.207466811 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Exec-managerial Not-in-family Black Female United-States 0 +45 0.5 0.100503467 0.8125 0 0 0.7777778 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +45 0.5 0.252204984 0.5625 0.05178052 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Wife White Female United-States 1 +45 0.5 0.04168168 0.875 0 0 0.373737365 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.196130544 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 +41 0.455555558 0.0305555649 0.5625 0 0 0.727272749 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.136745691 0.5625 0 0 0.5555556 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +54 0.6 0.150704682 0.8125 0.07688077 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 +17 0.188888893 0.08936456 0.375 0 0.3677686 0.1010101 Private 10th Never-married Other-service Own-child White Female United-States 0 +50 0.5555556 0.104784451 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.1303727 0.875 0 0 0.4040404 State-gov Masters Never-married Tech-support Not-in-family White Male United-States 0 +49 0.544444442 0.08324751 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.307290673 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 +49 0.544444442 0.109940358 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.28270936 0.8125 0 0 0.5252525 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +43 0.477777779 0.08005159 0.625 0.04386044 0 1 Local-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +33 0.366666675 0.0211819857 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Machine-op-inspct Unmarried Amer-Indian-Eskimo Female United-States 0 +35 0.3888889 0.137510821 0.625 0 0 0.5555556 Private Some-college Divorced Machine-op-inspct Unmarried Black Female United-States 0 +17 0.188888893 0.119639255 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 +25 0.2777778 0.125526622 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +41 0.455555558 0.126831263 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 +30 0.333333343 0.03736837 0.875 0 0 0.454545468 Private Masters Never-married Tech-support Unmarried White Male Nicaragua 0 +48 0.533333361 0.0804678351 0.6875 0 0 0.565656543 Private Assoc-voc Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 1 +61 0.677777767 0.112713978 0.625 0 0 0.353535354 Local-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +41 0.455555558 0.124184944 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.2350366 0.5625 0 0 0.5050505 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 +24 0.266666681 0.04690494 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 0 +27 0.3 0.200347543 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 +18 0.2 0.188315526 0.4375 0 0 0.02020202 Private 11th Never-married Prof-specialty Own-child White Female United-States 0 +20 0.222222224 0.142767757 0.625 0 0 0.151515156 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 +18 0.2 0.131043538 0.625 0 0 0.121212125 Private Some-college Never-married Other-service Own-child White Male United-States 0 +23 0.25555557 0.09457367 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.0166787338 0.875 0 0.4331956 0.454545468 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +38 0.422222227 0.3117333 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Wife Black Female Trinadad&Tobago 0 +36 0.4 0.03298433 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.02359526 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +47 0.5222222 0.153958529 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male ? 0 +51 0.566666663 0.264475435 1 0.1502415 0 0.8484849 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.07283602 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.07577061 0.8125 0 0 0.6060606 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 +47 0.5222222 0.09603322 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +26 0.2888889 0.0996709839 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Not-in-family White Female United-States 0 +31 0.344444454 0.296442062 0.625 0 0 0.4040404 State-gov Some-college Divorced Protective-serv Not-in-family White Male United-States 1 +46 0.51111114 0.135201275 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Unmarried Black Female Trinadad&Tobago 0 +49 0.544444442 0.02142311 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Unmarried White Female United-States 0 +19 0.211111113 0.111909777 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 +45 0.5 0.143431857 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +46 0.51111114 0.0352197923 0.8125 0.07688077 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +70 0.7777778 0.204476982 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +19 0.211111113 0.06477785 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +46 0.51111114 0.124356017 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.09269047 0.625 0 0 0.353535354 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +17 0.188888893 0.107785054 0.4375 0 0 0.222222224 Private 11th Never-married Other-service Other-relative White Female United-States 0 +43 0.477777779 0.120414495 0.625 0 0 0.4949495 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.0267770365 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 +37 0.411111116 0.0237818286 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.07897394 0.5625 0 0 0.4040404 Private HS-grad Widowed Prof-specialty Unmarried White Female United-States 0 +40 0.444444448 0.204223737 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.144501433 0.625 0 0 0.6060606 Private Some-college Never-married Craft-repair Own-child White Male Canada 0 +31 0.344444454 0.2303616 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +59 0.655555546 0.0853152648 0.6875 0.05178052 0 0.5050505 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.2704295 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +40 0.444444448 0.01684173 0.8125 0.1502415 0 1 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +30 0.333333343 0.0577272922 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.07791245 0.75 0 0 0.323232323 Private Assoc-acdm Never-married Adm-clerical Own-child White Male United-States 0 +25 0.2777778 0.09716341 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +22 0.244444445 0.133078963 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +21 0.233333334 0.09615783 0.625 0 0 0.4040404 State-gov Some-college Never-married Exec-managerial Own-child White Male United-States 0 +67 0.7444445 0.0893281847 0.625 0 0 0.0606060624 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +35 0.3888889 0.125022143 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 +54 0.6 0.0201299246 0.5625 0 0 0.565656543 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.07906015 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +29 0.322222233 0.142440423 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.06105792 0.5625 0 0.3168044 0.4040404 Federal-gov HS-grad Never-married Exec-managerial Unmarried White Female United-States 0 +55 0.6111111 0.141129047 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +56 0.622222245 0.126538947 0.875 0 0 0.4040404 Federal-gov Masters Divorced Adm-clerical Unmarried White Female United-States 0 +19 0.211111113 0.11768803 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child Black Male United-States 0 +36 0.4 0.20061022 0.5625 0 0.459366381 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 +58 0.644444466 0.07423226 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 1 +35 0.3888889 0.109517381 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +44 0.4888889 0.07303673 0.375 0 0 0.4040404 Private 10th Separated Machine-op-inspct Unmarried Black Female United-States 0 +40 0.444444448 0.0890560746 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +18 0.2 0.11746037 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +71 0.788888931 0.217409521 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband Amer-Indian-Eskimo Male United-States 0 +51 0.566666663 0.0487881452 0.5625 0 0 0.575757563 Federal-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.0409010537 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child Black Male United-States 0 +20 0.222222224 0.128155425 0.5 0 0 0.353535354 Private 12th Never-married Other-service Own-child White Male United-States 0 +33 0.366666675 0.2649523 0.4375 0 0 0.4040404 ? 11th Never-married ? Not-in-family White Female United-States 0 +34 0.377777785 0.0946794152 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Unmarried Black Female United-States 0 +28 0.311111122 0.393876225 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 1 +23 0.25555557 0.133134872 0.625 0 0 0.24242425 Private Some-college Never-married Adm-clerical Not-in-family White Female Greece 0 +36 0.4 0.165076569 0.625 0.031370312 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male El-Salvador 0 +42 0.466666669 0.129701868 0.9375 0 0 0.3939394 Private Prof-school Divorced Prof-specialty Not-in-family White Female United-States 1 +31 0.344444454 0.106614448 0.8125 0.0861408561 0 0.4040404 Local-gov Bachelors Never-married Craft-repair Not-in-family White Male United-States 1 +19 0.211111113 0.0767256841 0.5625 0 0 0.1010101 ? HS-grad Never-married ? Own-child Black Male United-States 0 +38 0.422222227 0.19374758 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family Black Male Jamaica 0 +22 0.244444445 0.129625082 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.21353738 0.6875 0 0 0.545454562 Private Assoc-voc Divorced Adm-clerical Unmarried Black Female United-States 0 +36 0.4 0.147294581 0.875 0 0.453856736 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +17 0.188888893 0.0785516351 0.4375 0 0.3946281 0.181818187 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +30 0.333333343 0.0326381326 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +35 0.3888889 0.1626377 0.3125 0.0263502635 0 0.3030303 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.113147058 0.875 0.14084141 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 +42 0.466666669 0.176418215 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.286793679 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 1 +36 0.4 0.02249201 0.8125 0 0.4331956 0.353535354 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +58 0.644444466 0.0490413941 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Male United-States 0 +39 0.433333337 0.05997151 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 +62 0.6888889 0.110808544 0.5625 0 0 0.3838384 Local-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +51 0.566666663 0.123081692 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried White Male United-States 0 +52 0.5777778 0.2437353 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +25 0.2777778 0.132773846 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 +26 0.2888889 0.229227364 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.198008358 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Own-child Black Male United-States 0 +59 0.655555546 0.176185846 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Exec-managerial Not-in-family Black Female Outlying-US(Guam-USVI-etc) 0 +21 0.233333334 0.114704274 0.5625 0 0 0.5050505 Private HS-grad Never-married Farming-fishing Other-relative White Male United-States 0 +45 0.5 0.32463488 0.875 0 0 0.181818187 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 +26 0.2888889 0.0595734529 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +68 0.75555557 0.176396668 0.375 0 0 0.2020202 Self-emp-not-inc 10th Widowed Farming-fishing Unmarried White Male United-States 0 +60 0.6666667 0.168755412 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +65 0.722222269 0.05961656 0.5625 0 0 0.181818187 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +41 0.455555558 0.113351136 0.875 0 0 0.454545468 Private Masters Divorced Exec-managerial Unmarried White Female United-States 0 +34 0.377777785 0.19123058 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +28 0.311111122 0.2741575 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +40 0.444444448 0.042934455 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 +57 0.6333333 0.0336046554 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +37 0.411111116 0.162969753 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.227934852 0.375 0 0 0.6060606 Private 10th Divorced Machine-op-inspct Not-in-family Black Male United-States 0 +21 0.233333334 0.1433874 0.4375 0 0 0.565656543 ? 11th Married-civ-spouse ? Wife White Female United-States 0 +57 0.6333333 0.209011227 0.8125 0 0 0.4848485 Federal-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +55 0.6111111 0.24245356 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.04353929 0.5625 0 0 0.6060606 Private HS-grad Never-married Farming-fishing Not-in-family White Male ? 0 +56 0.622222245 0.0841918141 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +32 0.355555564 0.193085492 0.625 0 0 0.6060606 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +18 0.2 0.111491509 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Male United-States 0 +48 0.533333361 0.235727638 0.6875 0 0 0.4040404 Private Assoc-voc Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 +46 0.51111114 0.143557146 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 1 +41 0.455555558 0.147608444 0.9375 0 0 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male India 1 +33 0.366666675 0.123669013 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +33 0.366666675 0.263428777 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +47 0.5222222 0.147929728 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Machine-op-inspct Other-relative White Male Mexico 0 +46 0.51111114 0.215614557 0.5625 0.1502415 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Wife Amer-Indian-Eskimo Female United-States 1 +40 0.444444448 0.5383433 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +42 0.466666669 0.442779541 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +31 0.344444454 0.251519322 0.8125 0.07298073 0 0.5555556 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +51 0.566666663 0.113598324 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +44 0.4888889 0.128745437 0.625 0 0 0.575757563 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +37 0.411111116 0.240333274 0.5625 0 0 0.4040404 Private HS-grad Separated Tech-support Unmarried White Female United-States 0 +25 0.2777778 0.129171789 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Own-child Black Female United-States 0 +63 0.7 0.0201110654 0.25 0.07688077 0 0.6060606 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 1 +52 0.5777778 0.13755326 0.5625 0 0 0.454545468 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +42 0.466666669 0.166270077 0.625 0.0332503319 0 0.4040404 Local-gov Some-college Divorced Tech-support Not-in-family White Female United-States 0 +28 0.311111122 0.3344274 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.287215978 0.875 0.105201051 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 +34 0.377777785 0.05668062 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +37 0.411111116 0.0309401546 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 +31 0.344444454 0.0875736251 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.04244682 0.625 0 0 0.353535354 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +25 0.2777778 0.247393265 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +38 0.422222227 0.0442000255 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +43 0.477777779 0.0976140052 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 +22 0.244444445 0.07930666 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Other-relative Asian-Pac-Islander Female Vietnam 0 +18 0.2 0.17961885 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 +26 0.2888889 0.102400817 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.127987042 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +43 0.477777779 0.15702109 0.5625 0 0 0.2020202 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +21 0.233333334 0.10078568 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +62 0.6888889 0.1510583 0.625 0 0 0.4040404 Federal-gov Some-college Widowed Protective-serv Not-in-family White Female United-States 0 +26 0.2888889 0.08187418 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.15555346 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.23256135 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 +65 0.722222269 0.0191061534 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +41 0.455555558 0.216032147 0.5625 0.0332503319 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +31 0.344444454 0.164189517 0.3125 0 0 0.2020202 Private 9th Never-married Other-service Unmarried White Female United-States 0 +56 0.622222245 0.102022961 0.3125 0 0 0.4040404 Private 9th Divorced Sales Unmarried White Female United-States 0 +50 0.5555556 0.09124035 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.14196828 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +36 0.4 0.241799548 0.625 0 0 0.4848485 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +48 0.533333361 0.0804678351 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +30 0.333333343 0.15248552 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +35 0.3888889 0.190692425 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 +37 0.411111116 0.219841659 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.113952607 0.5625 0 0 0.05050505 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +56 0.622222245 0.106924944 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 0 +29 0.322222233 0.140368626 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Not-in-family White Male United-States 0 +41 0.455555558 0.0651584 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Sales Unmarried White Male United-States 0 +38 0.422222227 0.171879932 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Not-in-family White Male United-States 0 +34 0.377777785 0.119709305 0.3125 0 0 0.353535354 Private 9th Separated Machine-op-inspct Unmarried White Female Dominican-Republic 0 +54 0.6 0.0928231552 0.5 0.04101041 0 0.4040404 State-gov 12th Never-married Other-service Own-child White Male United-States 0 +36 0.4 0.12608768 0.6875 0 0 0.5050505 ? Assoc-voc Divorced ? Own-child White Male United-States 0 +42 0.466666669 0.113500662 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 +33 0.366666675 0.0826238245 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +21 0.233333334 0.131473258 0.5625 0 0 0.3030303 Private HS-grad Never-married Prof-specialty Own-child White Female United-States 0 +69 0.7666667 0.121110253 0.375 0 0 0.1010101 Local-gov 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +32 0.355555564 0.120308749 0.75 0 0 0.464646459 Private Assoc-acdm Never-married Sales Not-in-family Black Female Trinadad&Tobago 0 +50 0.5555556 0.02821436 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.251262039 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Other-service Husband White Male ? 0 +45 0.5 0.054172378 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +31 0.344444454 0.1337727 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +24 0.266666681 0.222650975 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +28 0.311111122 0.140906781 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 +21 0.233333334 0.08907022 0.75 0 0 0.05050505 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 +43 0.477777779 0.160078943 0.6875 0 0 0.25252524 Self-emp-not-inc Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 0 +22 0.244444445 0.130386844 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +62 0.6888889 0.13292405 0.5625 0 0.399449021 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.050203912 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Never-married Tech-support Not-in-family White Male United-States 0 +37 0.411111116 0.06042817 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +34 0.377777785 0.06275254 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 +74 0.822222233 0.197288349 0.8125 0 0.418962359 0.121212125 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.221303225 0.625 0 0 0.3838384 Private Some-college Divorced Machine-op-inspct Unmarried Black Female United-States 0 +25 0.2777778 0.2102485 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 +43 0.477777779 0.130301312 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +23 0.25555557 0.159495667 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 +33 0.366666675 0.08501554 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried Black Female United-States 0 +51 0.566666663 0.1160372 0.8125 0 0 0.353535354 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +64 0.7111111 0.103652917 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Unmarried White Female Peru 0 +35 0.3888889 0.223205954 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +69 0.7666667 0.06228308 0.375 0.0327303261 0 0.454545468 Self-emp-not-inc 10th Married-spouse-absent Farming-fishing Not-in-family White Male United-States 0 +32 0.355555564 0.214619741 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.224240512 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 +66 0.733333349 0.051331412 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +31 0.344444454 0.202847034 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male Italy 0 +22 0.244444445 0.297007829 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Female United-States 0 +32 0.355555564 0.104364172 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 +23 0.25555557 0.147061542 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 +21 0.233333334 0.161363378 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +36 0.4 0.166993439 0.5625 0 0 0.02020202 Private HS-grad Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Taiwan 0 +62 0.6888889 0.1370811 0.25 0.0282902829 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.122813627 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +45 0.5 0.0172754861 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +27 0.3 0.164052129 0.4375 0.0394203924 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +38 0.422222227 0.126536921 0.9375 0 0.5544077 0.909090936 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.1947296 0.625 0 0 0.05050505 ? Some-college Never-married ? Own-child White Female United-States 0 +30 0.333333343 0.32823357 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +17 0.188888893 0.02291297 0.375 0 0 0.2020202 ? 10th Never-married ? Own-child White Male United-States 0 +17 0.188888893 0.168748 0.4375 0 0 0.08080808 ? 11th Never-married ? Own-child Black Male United-States 0 +21 0.233333334 0.214848742 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +56 0.622222245 0.09467066 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +59 0.655555546 0.204387411 0.875 0.04787048 0 0.6060606 Local-gov Masters Widowed Prof-specialty Unmarried White Female United-States 1 +37 0.411111116 0.0517644919 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +52 0.5777778 0.2079632 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +50 0.5555556 0.228937745 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.153468877 0.8125 0.07298073 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +55 0.6111111 0.105361 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.06618486 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 0 +72 0.8 0.07856106 0.625 0.0347103477 0 0.2020202 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +39 0.433333337 0.126063436 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +28 0.311111122 0.123982884 0.5 0 0 0.4040404 Private 12th Divorced Machine-op-inspct Not-in-family White Female United-States 0 +38 0.422222227 0.07283602 0.8125 0 0 0.4040404 Private Bachelors Divorced Tech-support Other-relative White Male United-States 0 +44 0.4888889 0.10138917 0.625 0 0.430670351 0.5555556 Private Some-college Separated Craft-repair Not-in-family White Male United-States 0 +51 0.566666663 0.211289123 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Sales Not-in-family White Male United-States 0 +20 0.222222224 0.026808694 0.625 0 0.3946281 0.363636374 Private Some-college Never-married Other-service Own-child White Male United-States 0 +25 0.2777778 0.170237184 0.625 0 0 0.454545468 Private Some-college Never-married Transport-moving Not-in-family White Female United-States 0 +52 0.5777778 0.0752338 0.625 0 0 0.2020202 Private Some-college Divorced Sales Other-relative White Female United-States 1 +45 0.5 0.243713066 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Not-in-family White Female United-States 0 +17 0.188888893 0.155881479 0.4375 0 0 0.121212125 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 +20 0.222222224 0.12020503 0.5625 0 0 0.151515156 Private HS-grad Never-married Other-service Own-child Asian-Pac-Islander Female ? 0 +64 0.7111111 0.07854759 0.875 0 0 0.25252524 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +34 0.377777785 0.07557865 0.5625 0 0.3409091 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +74 0.822222233 0.07348329 0.625 0 0 0.04040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +58 0.644444466 0.0491666719 0.4375 0.14084141 0 0.4040404 Federal-gov 11th Divorced Craft-repair Not-in-family Black Female United-States 1 +44 0.4888889 0.09918806 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +23 0.25555557 0.211924255 0.75 0 0 0.25252524 State-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +23 0.25555557 0.299422443 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +27 0.3 0.0873096 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Tech-support Other-relative White Female United-States 0 +34 0.377777785 0.0719072148 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.127920359 0.5625 0 0 0.24242425 Private HS-grad Never-married Sales Own-child White Female United-States 0 +33 0.366666675 0.2095999 0.4375 0 0 0.171717167 Private 11th Never-married Sales Unmarried Black Female United-States 0 +50 0.5555556 0.060440965 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.0332039036 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +50 0.5555556 0.128195837 0.9375 1 0 0.5555556 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.169678822 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Female United-States 0 +49 0.544444442 0.201013 0.9375 0 0.453856736 0.6060606 Local-gov Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 +34 0.377777785 0.121427491 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +51 0.566666663 0.103954658 0.875 0.07688077 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +56 0.622222245 0.04624353 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +64 0.7111111 0.137254879 0.5625 0 0 0.08080808 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.168408543 0.625 0 0 0.5050505 Private Some-college Never-married Farming-fishing Not-in-family White Female United-States 0 +33 0.366666675 0.106881842 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +43 0.477777779 0.14466241 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +60 0.6666667 0.272123426 0.5625 0.105201051 0 0.4040404 Federal-gov HS-grad Divorced Exec-managerial Not-in-family White Male United-States 1 +57 0.6333333 0.07342536 0.5 0 0 0.4040404 State-gov 12th Divorced Other-service Unmarried White Female United-States 0 +22 0.244444445 0.131090015 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +23 0.25555557 0.161227316 0.8125 0 0 0.4040404 Private Bachelors Never-married Machine-op-inspct Own-child White Male United-States 0 +54 0.6 0.0239616632 0.625 0 0.5544077 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.244917348 0.5625 0.07688077 0 0.5252525 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 +32 0.355555564 0.123206973 0.875 0 0 0.4040404 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +20 0.222222224 0.07895306 0.625 0 0 0.151515156 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +30 0.333333343 0.07452188 0.625 0 0 0.5252525 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +56 0.622222245 0.114647023 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +34 0.377777785 0.130184114 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +32 0.355555564 0.108489566 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +59 0.655555546 0.217343524 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.154529691 0.625 0 0 0.111111112 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +60 0.6666667 0.07158459 0.3125 0 0 0.4040404 ? 9th Widowed ? Not-in-family White Female United-States 0 +29 0.322222233 0.0711885542 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +24 0.266666681 0.134628087 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.0678922758 0.875 0 0 0.353535354 State-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +23 0.25555557 0.172612071 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Handlers-cleaners Other-relative Other Female El-Salvador 0 +32 0.355555564 0.1053839 0.5625 0 0.43663913 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +51 0.566666663 0.087239556 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Never-married Sales Other-relative White Male ? 0 +18 0.2 0.191966087 0.5625 0 0 0.1010101 Private HS-grad Never-married Sales Own-child White Male United-States 0 +28 0.311111122 0.167650148 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female ? 0 +33 0.366666675 0.248794213 0.625 0.05178052 0 0.4040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 +38 0.422222227 0.148111582 0.5625 0 0 0.3030303 Private HS-grad Separated Transport-moving Unmarried Black Female United-States 0 +29 0.322222233 0.252900064 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male England 0 +25 0.2777778 0.113910846 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +31 0.344444454 0.12325681 0.9375 0 0 0.5555556 Private Prof-school Never-married Tech-support Not-in-family White Male United-States 0 +34 0.377777785 0.0188946631 0.8125 0 0 0.25252524 Private Bachelors Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.1636581 0.5625 0 0.4331956 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +66 0.733333349 0.08894359 0.5625 0 0.418962359 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.143391445 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Guatemala 0 +62 0.6888889 0.150854886 0.25 0 0 0.2020202 Private 7th-8th Married-civ-spouse Prof-specialty Husband White Male United-States 0 +58 0.644444466 0.240982562 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +40 0.444444448 0.274001241 0.5625 0 0 0.4040404 Private HS-grad Separated Exec-managerial Unmarried White Female Canada 0 +24 0.266666681 0.104008541 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child Asian-Pac-Islander Female Philippines 0 +47 0.5222222 0.09472858 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +19 0.211111113 0.239426017 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 +32 0.355555564 0.10222435 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.23004435 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.345368952 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +60 0.6666667 0.09535901 0.875 0 0 0.4040404 ? Masters Married-civ-spouse ? Husband White Male United-States 0 +22 0.244444445 0.03299511 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +29 0.322222233 0.135395244 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +20 0.222222224 0.055753164 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Own-child White Male United-States 0 +42 0.466666669 0.102832548 0.25 0 0 0.4040404 Private 7th-8th Divorced Craft-repair Unmarried White Male Puerto-Rico 0 +18 0.2 0.0780053958 0.5625 0 0 0.2020202 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +23 0.25555557 0.113159858 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Own-child Asian-Pac-Islander Female Vietnam 0 +28 0.311111122 0.143565223 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male ? 1 +55 0.6111111 0.0604093075 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 +40 0.444444448 0.08544997 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Male United-States 0 +52 0.5777778 0.06407199 0.625 0 0 0.5050505 Private Some-college Divorced Sales Not-in-family White Male United-States 0 +37 0.411111116 0.124985777 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 1 +21 0.233333334 0.203008682 0.625 0 0.3677686 0.222222224 Private Some-college Never-married Sales Own-child White Female United-States 0 +35 0.3888889 0.14565587 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 +45 0.5 0.122947656 0.625 0 0 0.4848485 Private Some-college Divorced Machine-op-inspct Unmarried White Male United-States 0 +39 0.433333337 0.1164238 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +54 0.6 0.0462610424 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.245726928 0.25 0 0 0.4040404 Private 7th-8th Divorced Sales Not-in-family White Female United-States 0 +26 0.2888889 0.178015158 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +59 0.655555546 0.235676453 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.186042354 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 1 +22 0.244444445 0.16918917 0.625 0 0 0.2020202 Private Some-college Never-married Protective-serv Own-child Black Female United-States 0 +33 0.366666675 0.1326176 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +39 0.433333337 0.0392960235 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +18 0.2 0.06806807 0.4375 0 0 0.7070707 Self-emp-inc 11th Never-married Farming-fishing Own-child White Male United-States 0 +46 0.51111114 0.279551148 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 1 +24 0.266666681 0.117223963 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.08719578 0.6875 0 0 0.3030303 Private Assoc-voc Married-civ-spouse Handlers-cleaners Wife White Female Ecuador 0 +21 0.233333334 0.0747259557 0.5625 0 0 0.434343427 State-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +22 0.244444445 0.2114043 0.4375 0 0 0.3030303 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +61 0.677777767 0.0546452 0.1875 0.07298073 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband Asian-Pac-Islander Male Philippines 1 +56 0.622222245 0.172011271 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Laos 0 +21 0.233333334 0.128979832 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +17 0.188888893 0.08662798 0.375 0 0 0.262626261 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 +29 0.322222233 0.24849987 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male ? 1 +28 0.311111122 0.177543685 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +62 0.6888889 0.173284933 0.5625 0 0 0.3838384 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.2286259 0.5625 0.0217602178 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family Black Male United-States 0 +30 0.333333343 0.194949165 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 +20 0.222222224 0.109561831 0.4375 0 0 0.4040404 ? 11th Never-married ? Unmarried White Male El-Salvador 0 +18 0.2 0.31408596 0.4375 0 0 0.121212125 Local-gov 11th Never-married Adm-clerical Own-child White Male United-States 0 +54 0.6 0.0957557261 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +49 0.544444442 0.1697839 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +33 0.366666675 0.08057358 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Hong 0 +50 0.5555556 0.118410058 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +57 0.6333333 0.04763236 0.5625 0 0 0.7878788 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +50 0.5555556 0.13572596 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +45 0.5 0.17350854 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.08398436 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Own-child White Male United-States 1 +23 0.25555557 0.180860847 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.168807954 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +47 0.5222222 0.121422775 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female Hungary 0 +39 0.433333337 0.128875434 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male South 0 +29 0.322222233 0.169034928 0.6875 0 0.4331956 0.4848485 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +46 0.51111114 0.103221856 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +18 0.2 0.24422361 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Own-child White Male United-States 0 +68 0.75555557 0.1158028 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.142390579 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 +43 0.477777779 0.0324596465 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 +35 0.3888889 0.0151296053 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.297007829 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +21 0.233333334 0.111080654 0.625 0 0 0.4040404 State-gov Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +41 0.455555558 0.0906065553 0.6875 0 0 0.454545468 Local-gov Assoc-voc Divorced Craft-repair Unmarried White Female United-States 0 +61 0.677777767 0.119006135 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.1488464 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.345407337 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Own-child Black Male United-States 0 +36 0.4 0.284416765 0.1875 0 0 0.4040404 State-gov 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 +37 0.411111116 0.04397574 0.6875 0 0 0.4040404 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Female United-States 0 +69 0.7666667 0.13274017 0.5 0.09386094 0 0.6060606 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 1 +49 0.544444442 0.122352257 0.625 0 0 0.5050505 Federal-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +55 0.6111111 0.128144652 0.5625 0 0 0.535353541 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +21 0.233333334 0.160347015 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +18 0.2 0.2270121 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Male United-States 0 +26 0.2888889 0.126117989 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Not-in-family Black Male United-States 0 +20 0.222222224 0.168408543 0.625 0 0 0.181818187 ? Some-college Never-married ? Own-child White Female ? 0 +46 0.51111114 0.192462474 0.5625 0.0406404063 0 0.5555556 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +23 0.25555557 0.175534531 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 +48 0.533333361 0.146156311 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.357683867 0.5625 0 0.43663913 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.08167616 0.875 0 0 0.4040404 State-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +41 0.455555558 0.124244213 0.875 0 0 0.3838384 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +45 0.5 0.200495049 0.75 0 0 0.4040404 Private Assoc-acdm Widowed Sales Unmarried White Female Cuba 0 +52 0.5777778 0.0769365 0.5625 0.0332503319 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +22 0.244444445 0.08159466 0.8125 0 0 0.181818187 Local-gov Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 +20 0.222222224 0.0180790126 0.625 0.0217602178 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 +27 0.3 0.07614577 0.5625 0 0 0.434343427 Private HS-grad Separated Machine-op-inspct Not-in-family White Male United-States 0 +36 0.4 0.1728532 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +34 0.377777785 0.102542929 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 +38 0.422222227 0.07283602 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.13696526 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +47 0.5222222 0.139561057 0.5625 0 0 0.454545468 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +21 0.233333334 0.07773935 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.0539218225 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +31 0.344444454 0.0326798931 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Protective-serv Unmarried White Male United-States 0 +61 0.677777767 0.277261823 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +46 0.51111114 0.103997089 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +55 0.6111111 0.07066522 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +19 0.211111113 0.17607674 0.625 0 0 0.4040404 State-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 +39 0.433333337 0.03294594 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +61 0.677777767 0.115872853 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +28 0.311111122 0.09755002 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +28 0.311111122 0.185300112 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +61 0.677777767 0.0490912348 0.5625 0 0 0.3838384 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +61 0.677777767 0.0697613358 0.5625 0 0 0.373737365 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.135234281 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +50 0.5555556 0.102922805 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male Germany 0 +37 0.411111116 0.03010295 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +17 0.188888893 0.03280315 0.4375 0 0 0.3030303 ? 11th Never-married ? Own-child White Female United-States 0 +56 0.622222245 0.0619011857 0.5625 0 0 0.04040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +31 0.344444454 0.113764018 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 +32 0.355555564 0.09915438 0.8125 0 0 0.5555556 State-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +28 0.311111122 0.103418529 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Unmarried White Female United-States 0 +34 0.377777785 0.02397446 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 +33 0.366666675 0.151886746 0.375 0 0 0.25252524 Private 10th Never-married Other-service Own-child White Female United-States 0 +42 0.466666669 0.232708856 0.6875 0 0 0.353535354 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 +64 0.7111111 0.0924123 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.220770463 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +41 0.455555558 0.143743038 0.1875 0 0 0.323232323 ? 5th-6th Married-civ-spouse ? Husband White Male Mexico 0 +45 0.5 0.24441421 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +48 0.533333361 0.08844114 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.126847416 0.625 0 0 0.3838384 Private Some-college Separated Tech-support Not-in-family White Female United-States 0 +34 0.377777785 0.1311641 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 +40 0.444444448 0.0294408668 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +45 0.5 0.12597318 0.5625 0 0.4708448 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.157555208 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 +51 0.566666663 0.05676414 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.294783145 0.5625 0.0288502872 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.1255374 0.8125 0.105201051 0 0.4040404 Private Bachelors Widowed Prof-specialty Unmarried White Male United-States 1 +23 0.25555557 0.08740255 0.625 0 0.395087242 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +34 0.377777785 0.121427491 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +36 0.4 0.0729572549 0.5625 0.04101041 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +56 0.622222245 0.0506592244 0.9375 0 0 0.323232323 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.191794336 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +45 0.5 0.126846746 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.224725455 0.8125 0.1502415 0 0.7070707 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.0776618943 0.6875 0.07688077 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 +54 0.6 0.11649587 0.8125 0 0.307621658 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +40 0.444444448 0.133424491 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +29 0.322222233 0.109964609 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +35 0.3888889 0.0866219252 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +47 0.5222222 0.07237802 0.5625 0 0 0.373737365 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 +51 0.566666663 0.1696236 0.6875 0 0 0.434343427 Private Assoc-voc Never-married Exec-managerial Not-in-family White Female United-States 0 +28 0.311111122 0.271886349 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Male Mexico 0 +58 0.644444466 0.107346579 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +24 0.266666681 0.114548013 0.5625 0 0 0.25252524 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 +46 0.51111114 0.129536167 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +57 0.6333333 0.09146329 0.375 0 0 0.4848485 Private 10th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +22 0.244444445 0.156923428 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 +28 0.311111122 0.0232584924 0.8125 0 0 0.3030303 Private Bachelors Never-married Tech-support Not-in-family Black Male Jamaica 0 +17 0.188888893 0.250094146 0.375 0 0 0.25252524 ? 10th Never-married ? Own-child White Male United-States 0 +23 0.25555557 0.159623638 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Own-child White Male United-States 0 +19 0.211111113 0.140341684 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +66 0.733333349 0.06913158 0.5625 0 0 0.353535354 State-gov HS-grad Widowed Prof-specialty Unmarried Black Female United-States 0 +38 0.422222227 0.07501625 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +39 0.433333337 0.318020076 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Unmarried Black Female United-States 0 +39 0.433333337 0.0582950823 0.5 0 0 0.4040404 ? 12th Married-civ-spouse ? Husband White Male United-States 0 +47 0.5222222 0.04778256 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +39 0.433333337 0.198638111 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Own-child White Male United-States 0 +22 0.244444445 0.275060028 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +36 0.4 0.172057077 0.5625 0 0 0.3030303 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 +32 0.355555564 0.130167276 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Philippines 0 +29 0.322222233 0.129274845 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 +43 0.477777779 0.08450231 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +51 0.566666663 0.06533621 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.12347167 0.1875 0 0 0.6060606 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.112513259 0.5 0 0 0.4040404 State-gov 12th Never-married Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.124749362 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +51 0.566666663 0.109003477 0.6875 0 0 0.575757563 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.11170435 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.0934973657 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +33 0.366666675 0.06719247 0.8125 0 0 0.151515156 Self-emp-not-inc Bachelors Never-married Other-service Not-in-family White Female United-States 0 +34 0.377777785 0.0755294859 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.08689942 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +38 0.422222227 0.24615328 0.6875 0 0 0.151515156 ? Assoc-voc Never-married ? Own-child White Male United-States 0 +27 0.3 0.17503342 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband Black Male United-States 1 +35 0.3888889 0.06036351 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +29 0.322222233 0.135754913 0.8125 0 0 0.5050505 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +40 0.444444448 0.1187347 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.129920766 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Farming-fishing Husband Black Male United-States 0 +37 0.411111116 0.116004191 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +38 0.422222227 0.109923519 0.5625 0.03411034 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.178983033 0.625 0 0.4331956 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male Cuba 1 +44 0.4888889 0.145014673 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.125245079 0.875 0 0 0.3030303 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +38 0.422222227 0.146052584 0.5625 0 0 0.424242437 Private HS-grad Never-married Sales Unmarried White Male United-States 0 +34 0.377777785 0.02403373 0.75 0 0 0.1010101 Local-gov Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +50 0.5555556 0.250086725 0.5625 0 0.43663913 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +46 0.51111114 0.0689423159 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.134766847 0.1875 0 0 0.3030303 Private 5th-6th Never-married Handlers-cleaners Unmarried White Male Guatemala 0 +47 0.5222222 0.139502466 0.6875 0 0 0.3838384 State-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.198917627 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.15796876 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Sales Not-in-family White Male United-States 0 +61 0.677777767 0.0962628946 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +55 0.6111111 0.122341476 0.625 0 0 0.373737365 State-gov Some-college Divorced Prof-specialty Not-in-family Black Female United-States 0 +36 0.4 0.12482278 0.5625 0 0 0.353535354 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +28 0.311111122 0.112706564 0.625 0.105201051 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 1 +22 0.244444445 0.255793571 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +34 0.377777785 0.118620872 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child Black Female United-States 0 +33 0.366666675 0.06750701 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family Black Male United-States 0 +27 0.3 0.101229541 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +43 0.477777779 0.01684173 0.875 0.0501305 0 0.121212125 Federal-gov Masters Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +55 0.6111111 0.0903344452 0.375 1 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +39 0.433333337 0.169535369 0.375 0 0.395087242 0.151515156 Self-emp-not-inc 10th Married-spouse-absent Other-service Not-in-family White Female United-States 0 +20 0.222222224 0.44020462 0.625 0 0 0.333333343 Private Some-college Never-married Other-service Own-child White Male El-Salvador 0 +38 0.422222227 0.118165568 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +30 0.333333343 0.224367142 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.0600482933 0.4375 0 0 0.424242437 Private 11th Never-married Other-service Own-child White Male El-Salvador 0 +60 0.6666667 0.133849487 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +43 0.477777779 0.0587887838 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +36 0.4 0.121698253 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.152939469 0.625 0 0 0.4848485 Private Some-college Never-married Other-service Unmarried White Female El-Salvador 0 +57 0.6333333 0.127853 0.625 0.07298073 0 0.4040404 Local-gov Some-college Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 +25 0.2777778 0.2350541 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Handlers-cleaners Other-relative Black Male United-States 0 +38 0.422222227 0.0647839159 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 +22 0.244444445 0.07590262 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.281271368 0.1875 0 0 0.4040404 Private 5th-6th Never-married Craft-repair Not-in-family White Male Mexico 0 +61 0.677777767 0.09449689 0.5625 0 0 0.444444448 Self-emp-not-inc HS-grad Never-married Sales Not-in-family White Female United-States 0 +28 0.311111122 0.229276523 0.625 0 0 0.464646459 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +17 0.188888893 0.126313984 0.4375 0 0 0.1010101 ? 11th Never-married ? Own-child White Female United-States 0 +21 0.233333334 0.159662023 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +49 0.544444442 0.118287474 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +37 0.411111116 0.262493223 0.5 0 0 0.353535354 Private 12th Divorced Craft-repair Own-child White Male United-States 0 +23 0.25555557 0.123130187 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female Dominican-Republic 0 +38 0.422222227 0.1652665 0.625 0.031370312 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +34 0.377777785 0.06323546 0.8125 0 0 0.464646459 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +21 0.233333334 0.338678062 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female Peru 0 +27 0.3 0.142945573 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +57 0.6333333 0.202130392 0.5625 0 0 0.8484849 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.105699785 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +20 0.222222224 0.193125233 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family Other Female United-States 0 +49 0.544444442 0.09664007 0.625 0 0 0.656565666 Self-emp-inc Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 +38 0.422222227 0.152459249 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.07064838 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +44 0.4888889 0.15032886 0.5625 0 0.3409091 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male Haiti 0 +37 0.411111116 0.183262 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +57 0.6333333 0.137950644 0.875 0 0 0.3030303 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 +56 0.622222245 0.1549392 0.25 0 0 0.3030303 Private 7th-8th Never-married Other-service Own-child White Female United-States 0 +41 0.455555558 0.163412258 0.75 0 0 0.8080808 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Male United-States 0 +50 0.5555556 0.08889443 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male South 0 +33 0.366666675 0.0588062964 0.3125 0 0 0.5050505 Private 9th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +29 0.322222233 0.0906348452 0.875 0 0 0.2020202 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 +28 0.311111122 0.11036671 0.8125 0.05178052 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.161250219 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +36 0.4 0.137210429 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +45 0.5 0.116032481 1 0 0.6896235 0.353535354 Private Doctorate Divorced Prof-specialty Unmarried Black Female United-States 1 +30 0.333333343 0.0439669825 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Never-married Craft-repair Own-child White Male United-States 0 +35 0.3888889 0.09112181 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +27 0.3 0.1663455 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.121276617 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male Yugoslavia 0 +24 0.266666681 0.07949256 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +47 0.5222222 0.06890797 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +47 0.5222222 0.0306889247 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.0927093253 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Female United-States 0 +18 0.2 0.160062775 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +31 0.344444454 0.1278658 0.5625 0 0 0.474747479 Local-gov HS-grad Divorced Protective-serv Not-in-family White Male United-States 1 +43 0.477777779 0.07965286 0.875 0 0 0.3030303 Self-emp-not-inc Masters Divorced Other-service Unmarried White Female United-States 0 +45 0.5 0.194272265 0.5625 0.0406404063 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Other Male United-States 0 +39 0.433333337 0.07162837 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +30 0.333333343 0.213154137 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +22 0.244444445 0.03371579 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +30 0.333333343 0.122643225 0.5625 0 0 0.858585835 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +36 0.4 0.125860021 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.1065572 0.75 0 0 0.3030303 State-gov Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 0 +61 0.677777767 0.154740512 0.125 0.0394203924 0 0.2020202 ? 1st-4th Married-civ-spouse ? Husband White Male Mexico 0 +27 0.3 0.09533544 0.5625 0 0.43663913 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +59 0.655555546 0.03430244 0.625 0 0 0.6060606 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +60 0.6666667 0.08926285 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.175587744 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +35 0.3888889 0.1557077 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +40 0.444444448 0.150384754 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +20 0.222222224 0.188278481 0.4375 0.0296102948 0 0.353535354 Private 11th Married-civ-spouse Handlers-cleaners Other-relative White Male United-States 0 +47 0.5222222 0.0310122222 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 +40 0.444444448 0.113201618 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Male United-States 0 +20 0.222222224 0.05367464 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +75 0.8333334 0.07692033 0.625 0 0 0.13131313 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +25 0.2777778 0.08359304 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +47 0.5222222 0.0703984946 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.08655996 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Widowed Sales Unmarried White Female United-States 1 +34 0.377777785 0.07581574 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +45 0.5 0.02167838 0.8125 0 0 0.4040404 State-gov Bachelors Separated Prof-specialty Not-in-family White Female United-States 0 +23 0.25555557 0.1614213 0.625 0.02597026 0 0.5050505 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +46 0.51111114 0.181372061 0.75 0 0 0.4040404 Private Assoc-acdm Widowed Adm-clerical Unmarried White Female United-States 0 +41 0.455555558 0.118230224 0.625 0 0 0.3838384 State-gov Some-college Divorced Machine-op-inspct Not-in-family Black Female United-States 0 +29 0.322222233 0.29925406 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.0184649471 0.4375 0 0 0.2020202 Private 11th Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 +39 0.433333337 0.117426023 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.09977942 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +34 0.377777785 0.140912175 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male ? 0 +20 0.222222224 0.111198522 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +18 0.2 0.034736868 0.5625 0 0.3677686 0.3838384 ? HS-grad Never-married ? Own-child Asian-Pac-Islander Female United-States 0 +52 0.5777778 0.112918727 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.0195830148 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Wife Amer-Indian-Eskimo Female United-States 0 +22 0.244444445 0.267322481 0.1875 0 0 0.353535354 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Mexico 0 +66 0.733333349 0.047871463 0.625 0 0 0.5555556 State-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +35 0.3888889 0.0872718841 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +40 0.444444448 0.123772062 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 1 +21 0.233333334 0.111127131 0.5625 0 0 0.3838384 Private HS-grad Divorced Sales Unmarried Amer-Indian-Eskimo Female United-States 0 +51 0.566666663 0.10432443 0.5625 0 0 0.5252525 Local-gov HS-grad Divorced Protective-serv Unmarried White Male United-States 0 +34 0.377777785 0.1347857 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.118804075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.230730683 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.120455578 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +42 0.466666669 0.128745437 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Unmarried White Female United-States 0 +41 0.455555558 0.0200053211 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.106346384 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Female United-States 0 +64 0.7111111 0.0215483885 0.25 0 0 0.1010101 Local-gov 7th-8th Married-civ-spouse Protective-serv Husband White Male United-States 0 +24 0.266666681 0.141937956 0.5625 0 0.453168035 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +23 0.25555557 0.02668207 0.625 0 0 0.1010101 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +29 0.322222233 0.135051072 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.03220707 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +28 0.311111122 0.123361208 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.252511442 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.08680243 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.1366413 0.375 0 0 0.4040404 Private 10th Married-spouse-absent Craft-repair Not-in-family White Female United-States 0 +42 0.466666669 0.103329621 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 1 +51 0.566666663 0.01669692 0.625 0 0 1 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +32 0.355555564 0.213354841 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Unmarried Black Female Jamaica 0 +37 0.411111116 0.08524859 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +18 0.2 0.08657478 0.4375 0 0 0.25252524 Private 11th Never-married Sales Own-child White Female United-States 0 +24 0.266666681 0.158038139 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Other-service Own-child White Female United-States 0 +29 0.322222233 0.0440302975 0.625 0 0 0.4040404 ? Some-college Divorced ? Unmarried White Female United-States 0 +45 0.5 0.231276259 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +52 0.5777778 0.020698389 0.8125 0 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.277751476 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +46 0.51111114 0.07565139 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 +63 0.7 0.122535452 0.5625 0 0 0.5050505 Private HS-grad Widowed Exec-managerial Unmarried White Male United-States 1 +32 0.355555564 0.06744438 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +24 0.266666681 0.0862535 0.5625 0.005940059 0 0.151515156 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +72 0.8 0.270966977 0.625 0 0 0.323232323 ? Some-college Married-civ-spouse ? Husband White Male Canada 0 +35 0.3888889 0.0662683845 0.625 0 0 0.1010101 ? Some-college Never-married ? Unmarried White Male United-States 0 +29 0.322222233 0.120943218 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.0437272042 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +70 0.7777778 0.06911138 0.375 0 0 0.323232323 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +65 0.722222269 0.07780199 0.8125 0.0555605553 0 0.4848485 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 +36 0.4 0.101399273 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +53 0.5888889 0.08972759 0.5625 0.04386044 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 1 +49 0.544444442 0.0451274849 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +60 0.6666667 0.1093463 0.9375 0 0.43663913 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.09332292 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +21 0.233333334 0.114807993 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male Italy 0 +42 0.466666669 0.0444573164 0.375 0 0 0.4040404 Private 10th Never-married Transport-moving Not-in-family Black Male United-States 0 +25 0.2777778 0.118593931 0.875 0 0 0.373737365 State-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +32 0.355555564 0.1470474 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +25 0.2777778 0.122375153 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male ? 0 +47 0.5222222 0.113310054 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +30 0.333333343 0.108903788 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 +21 0.233333334 0.16349107 0.75 0 0 0.4040404 ? Assoc-acdm Never-married ? Own-child White Female United-States 0 +38 0.422222227 0.045340322 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +34 0.377777785 0.17903018 0.5625 0 0.4708448 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.06692036 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Other-service Not-in-family White Female United-States 0 +56 0.622222245 0.114548013 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +52 0.5777778 0.15569827 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.0419874676 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +29 0.322222233 0.07982731 0.5625 0 0 0.424242437 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +45 0.5 0.1048417 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.105967857 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +45 0.5 0.230188489 0.875 0 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +30 0.333333343 0.110587627 0.8125 0 0 0.424242437 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +45 0.5 0.05594647 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.204945087 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +23 0.25555557 0.2941985 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +24 0.266666681 0.0197359081 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female ? 0 +43 0.477777779 0.07049212 0.875 0.049340494 0 0.4040404 Private Masters Widowed Exec-managerial Unmarried White Male United-States 1 +42 0.466666669 0.05323347 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Unmarried White Male United-States 0 +72 0.8 0.111552127 0.625 0 0 0.25252524 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.119408906 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +57 0.6333333 0.134603843 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.0154683935 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +27 0.3 0.0397843346 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +54 0.6 0.05208846 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +42 0.466666669 0.06501225 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.09690006 0.3125 0 0 0.4040404 Private 9th Never-married Other-service Own-child Black Male United-States 0 +48 0.533333361 0.08178325 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.118729986 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 +41 0.455555558 0.119825155 0.8125 0.07688077 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.13814193 0.25 0 0 0.353535354 Private 7th-8th Married-civ-spouse Other-service Wife White Female ? 0 +57 0.6333333 0.238351062 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +44 0.4888889 0.119846709 1 0 0 0.363636374 Local-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.08233555 0.5625 0 0 0.282828271 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +49 0.544444442 0.08479261 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +44 0.4888889 0.104715757 0.75 0.0115101151 0 0.5050505 Private Assoc-acdm Never-married Prof-specialty Unmarried Black Female United-States 0 +42 0.466666669 0.23959507 0.6875 0 0 0.444444448 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +18 0.2 0.1652005 0.625 0 0 0.161616161 ? Some-college Never-married ? Own-child White Male United-States 0 +18 0.2 0.161870539 0.5 0 0 0.181818187 Private 12th Never-married Other-service Own-child White Male United-States 0 +51 0.566666663 0.123219095 0.5625 0 0 0.4040404 Private HS-grad Widowed Tech-support Unmarried Black Female United-States 0 +28 0.311111122 0.178148523 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +39 0.433333337 0.07437572 0.75 0.1502415 0 0.454545468 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 +25 0.2777778 0.112460725 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +41 0.455555558 0.234156281 0.9375 0 0.453856736 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.0228833333 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +42 0.466666669 0.144957423 0.4375 0 0 0.3030303 Self-emp-not-inc 11th Separated Other-service Unmarried White Female United-States 0 +33 0.366666675 0.128491521 0.5625 0 0.371212125 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +63 0.7 0.223294869 0.375 0 0 0.4040404 ? 10th Married-civ-spouse ? Husband White Male United-States 0 +47 0.5222222 0.109445311 0.625 0 0 0.454545468 Private Some-college Divorced Sales Unmarried White Female United-States 1 +27 0.3 0.0578687377 0.8125 0 0 0.686868668 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 +39 0.433333337 0.0615388267 0.875 0 0.4242424 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.122813627 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 +49 0.544444442 0.08731701 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +70 0.7777778 0.0899411 0.5625 0 0 0.282828271 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +46 0.51111114 0.100180171 0.5625 0 0.399449021 0.353535354 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +47 0.5222222 0.06909319 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +35 0.3888889 0.07502299 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Not-in-family White Male United-States 0 +24 0.266666681 0.162828311 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +22 0.244444445 0.225359932 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 +43 0.477777779 0.06866684 0.8125 0 0 0.353535354 Private Bachelors Divorced Other-service Not-in-family White Female United-States 0 +60 0.6666667 0.14336586 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 +53 0.5888889 0.123912163 0.4375 0 0 0.4848485 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +47 0.5222222 0.0956829861 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +34 0.377777785 0.106832676 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +37 0.411111116 0.019630162 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 +35 0.3888889 0.0270323064 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +23 0.25555557 0.151302785 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +27 0.3 0.09877451 0.5625 0 0 0.151515156 ? HS-grad Married-civ-spouse ? Own-child White Female United-States 0 +29 0.322222233 0.112976655 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Other-relative White Male United-States 0 +23 0.25555557 0.04063501 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +35 0.3888889 0.126063436 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +18 0.2 0.10583315 0.5625 0 0 0.121212125 ? HS-grad Never-married ? Own-child White Female United-States 0 +27 0.3 0.171910927 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +56 0.622222245 0.129537523 0.625 0 0 0.2020202 ? Some-college Divorced ? Not-in-family White Female United-States 0 +40 0.444444448 0.110016473 0.5625 0 0 0.7070707 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.08740794 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +18 0.2 0.138753489 0.625 0.0217602178 0 0.4040404 Private Some-college Never-married Sales Unmarried White Male United-States 0 +25 0.2777778 0.2676067 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 +36 0.4 0.502300441 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Unmarried Black Female United-States 0 +38 0.422222227 0.09533881 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 +52 0.5777778 0.0239616632 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Not-in-family White Male United-States 0 +23 0.25555557 0.253506929 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried White Male Mexico 0 +48 0.533333361 0.135262564 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.244349554 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Unmarried Black Female United-States 0 +46 0.51111114 0.07866142 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +26 0.2888889 0.107967578 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Protective-serv Not-in-family White Male United-States 0 +47 0.5222222 0.244259968 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +21 0.233333334 0.07260769 0.625 0 0 0.0303030312 ? Some-college Never-married ? Own-child White Female United-States 0 +65 0.722222269 0.115133315 0.8125 0.06723067 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +31 0.344444454 0.151029333 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 +38 0.422222227 0.322182536 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +68 0.75555557 0.1422249 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.0994392857 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Other-relative Asian-Pac-Islander Female Hong 0 +42 0.466666669 0.0704833642 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 +49 0.544444442 0.04537265 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.155558854 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female Philippines 1 +39 0.433333337 0.1187677 0.875 0.07688077 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.180831879 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.194470286 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +36 0.4 0.15564169 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 +42 0.466666669 0.224643961 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 +62 0.6888889 0.144330353 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +21 0.233333334 0.07949256 0.5625 0 0 0.24242425 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +21 0.233333334 0.126010224 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Other Female Cuba 0 +60 0.6666667 0.117244169 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +22 0.244444445 0.09014114 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 +30 0.333333343 0.154759362 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +64 0.7111111 0.141497478 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.08034391 0.8125 0.1502415 0 0.282828271 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +41 0.455555558 0.0752823 0.75 0 0.4331956 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +25 0.2777778 0.08284407 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 +27 0.3 0.0301521178 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +40 0.444444448 0.13509351 0.75 0 0 0.444444448 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 +58 0.644444466 0.159355566 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.0223101564 0.9375 0 0 1 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 +50 0.5555556 0.2079632 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Transport-moving Unmarried White Female United-States 0 +27 0.3 0.06972698 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Unmarried White Male United-States 0 +31 0.344444454 0.06700523 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child Amer-Indian-Eskimo Male United-States 0 +50 0.5555556 0.15555346 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +45 0.5 0.06691902 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband Black Male United-States 1 +33 0.366666675 0.577577353 0.5 0 0 0.4040404 Private 12th Never-married Protective-serv Own-child Black Male United-States 0 +62 0.6888889 0.0546344221 0.625 0 0.453168035 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 +38 0.422222227 0.104000457 0.5625 0 0.4708448 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Poland 0 +19 0.211111113 0.133994967 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 +30 0.333333343 0.209938 0.4375 0 0 0.3030303 Private 11th Married-civ-spouse Other-service Wife Black Female United-States 0 +38 0.422222227 0.170334846 0.625 0 0 0.25252524 Private Some-college Divorced Sales Own-child White Female United-States 0 +42 0.466666669 0.02663088 0.5625 0 0 1 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +49 0.544444442 0.08221566 0.625 0 0 0.25252524 Self-emp-inc Some-college Divorced Sales Not-in-family White Male United-States 0 +53 0.5888889 0.07474684 0.875 0 0.43663913 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.134430751 0.625 0 0.4331956 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male Mexico 1 +24 0.266666681 0.136539578 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 +29 0.322222233 0.133066848 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 +24 0.266666681 0.139305115 0.625 0.0506005064 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 +38 0.422222227 0.128574371 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 1 +25 0.2777778 0.106924273 0.6875 0 0 0.5555556 Self-emp-inc Assoc-voc Never-married Transport-moving Unmarried White Male United-States 0 +51 0.566666663 0.164093882 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 +17 0.188888893 0.147690624 0.4375 0 0 0.2020202 ? 11th Never-married ? Own-child White Female United-States 0 +19 0.211111113 0.0305656679 0.625 0 0 0.08080808 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +38 0.422222227 0.112804905 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +60 0.6666667 0.151554689 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +29 0.322222233 0.272837371 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Sales Not-in-family White Male United-States 0 +66 0.733333349 0.1253185 0.625 0 1 0.4040404 ? Some-college Widowed ? Unmarried Black Female United-States 0 +28 0.311111122 0.0162678789 0.375 0 0 0.4040404 Federal-gov 10th Married-civ-spouse Other-service Wife Amer-Indian-Eskimo Female United-States 0 +36 0.4 0.08524859 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male Ecuador 1 +57 0.6333333 0.09271741 0.5625 0 0 0.05050505 ? HS-grad Married-civ-spouse ? Husband Other Male Columbia 0 +24 0.266666681 0.212483972 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Own-child White Male United-States 0 +43 0.477777779 0.167161837 0.75 0 0 0.3838384 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.1393563 0.9375 0 0 0.5555556 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +67 0.7444445 0.128901035 0.9375 0.200512 0 0.25252524 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.129258 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Own-child White Male United-States 0 +21 0.233333334 0.0977426544 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child Asian-Pac-Islander Male United-States 0 +20 0.222222224 0.08812525 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 +42 0.466666669 0.0223115031 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +20 0.222222224 0.225031242 0.625 0 0 0.1010101 Private Some-college Never-married Other-service Own-child White Female United-States 0 +19 0.211111113 0.238501251 0.5625 0 0 0.353535354 Local-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +34 0.377777785 0.07542576 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.216330528 0.8125 0 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 +33 0.366666675 0.0930434 0.625 0 0 0.25252524 Private Some-college Separated Other-service Unmarried Black Female United-States 0 +36 0.4 0.200039074 0.625 0 0 0.373737365 Private Some-college Divorced Craft-repair Not-in-family White Female United-States 0 +43 0.477777779 0.10446924 0.75 0 0.5610652 0.7070707 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 1 +41 0.455555558 0.117525704 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Other-service Unmarried Black Female United-States 0 +34 0.377777785 0.116700627 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 +33 0.366666675 0.01724922 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband Other Male Japan 1 +47 0.5222222 0.126330152 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +41 0.455555558 0.132244453 0.125 0 0 0.5050505 Private 1st-4th Married-civ-spouse Sales Husband White Male Mexico 0 +40 0.444444448 0.138106227 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Not-in-family White Male United-States 1 +28 0.311111122 0.482208937 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Own-child Black Male United-States 0 +62 0.6888889 0.151221961 0.5625 0 0 0.909090936 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +29 0.322222233 0.154681236 0.5625 0 0 0.5050505 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +46 0.51111114 0.06592757 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.08843373 0.5625 0 0 0.6060606 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +57 0.6333333 0.133275643 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.116363861 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +28 0.311111122 0.118404672 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.0350056067 0.8125 0 0 0.454545468 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +54 0.6 0.0189842433 0.8125 0.2782828 0 0.5050505 Self-emp-not-inc Bachelors Divorced Farming-fishing Not-in-family White Male United-States 1 +22 0.244444445 0.196657926 0.4375 0 0 0.4040404 Private 11th Separated Craft-repair Not-in-family White Male United-States 0 +36 0.4 0.1217427 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Protective-serv Unmarried Black Female United-States 0 +50 0.5555556 0.158049583 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +18 0.2 0.0265446678 0.4375 0 0 0.24242425 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +52 0.5777778 0.225144386 0.75 0 0 0.4040404 State-gov Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 +41 0.455555558 0.12984331 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Husband White Male ? 0 +21 0.233333334 0.07093126 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Not-in-family White Female United-States 0 +36 0.4 0.11562971 0.8125 0 0.3996786 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +34 0.377777785 0.123064183 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 +21 0.233333334 0.156169742 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 +46 0.51111114 0.06876922 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +57 0.6333333 0.03384376 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +61 0.677777767 0.131688789 0.875 0 0 0.25252524 Local-gov Masters Never-married Prof-specialty Unmarried White Female United-States 0 +22 0.244444445 0.0231089685 0.625 0 0 0.25252524 State-gov Some-college Never-married Transport-moving Own-child White Male United-States 0 +33 0.366666675 0.212104768 0.4375 0 0 0.535353541 ? 11th Divorced ? Own-child White Male United-States 0 +36 0.4 0.503614545 0.9375 0.1502415 0 0.5050505 State-gov Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 +43 0.477777779 0.126813069 0.875 0.009140091 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +25 0.2777778 0.07474751 0.75 0 0 0.373737365 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female India 1 +17 0.188888893 0.0536685735 0.375 0 0 0.3030303 Private 10th Never-married Priv-house-serv Other-relative White Male United-States 0 +45 0.5 0.198471084 0.6875 0.04386044 0 0.3838384 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +30 0.333333343 0.229607239 0.9375 0 0.365013778 0.8080808 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 +40 0.444444448 0.129493073 0.875 0 0 0.353535354 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 +31 0.344444454 0.128125116 0.875 0 0 0.454545468 Local-gov Masters Never-married Exec-managerial Not-in-family White Male United-States 0 +42 0.466666669 0.08011491 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +53 0.5888889 0.03762431 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +37 0.411111116 0.160592854 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Transport-moving Husband White Male Cuba 0 +37 0.411111116 0.112307832 0.5625 0 0 0.2020202 State-gov HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 +54 0.6 0.0973836556 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 +36 0.4 0.09050081 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Own-child White Female United-States 0 +46 0.51111114 0.08999498 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +46 0.51111114 0.136753768 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.1464668 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 +17 0.188888893 0.07188836 0.4375 0.005940059 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +42 0.466666669 0.1428075 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family Black Male United-States 0 +37 0.411111116 0.08524859 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +29 0.322222233 0.195298061 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +54 0.6 0.117263705 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.122391991 0.5 0 0 0.4848485 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.116401576 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +24 0.266666681 0.1974069 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +57 0.6333333 0.0723665655 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male Portugal 0 +59 0.655555546 0.06417639 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +33 0.366666675 0.0439669825 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.148812726 0.5625 0 0.365932047 0.4040404 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 +53 0.5888889 0.173731491 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +26 0.2888889 0.09089011 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 +55 0.6111111 0.07111312 0.875 0.0222802218 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.114045553 0.5625 0 0 0.454545468 Private HS-grad Separated Other-service Not-in-family Black Female Jamaica 0 +44 0.4888889 0.0666725039 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 1 +30 0.333333343 0.07667382 0.6875 0.031370312 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Sales Husband White Male Germany 0 +24 0.266666681 0.09660909 0.625 0 0 0.24242425 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +32 0.355555564 0.0967222452 0.375 0 0 0.373737365 Private 10th Married-spouse-absent Other-service Not-in-family Black Female United-States 0 +35 0.3888889 0.152428269 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +67 0.7444445 0.0637230948 0.875 0 0 0.3030303 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 +56 0.622222245 0.0179941468 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +26 0.2888889 0.107941307 0.875 0 0 0.2020202 Private Masters Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male India 0 +46 0.51111114 0.0790123343 0.75 0.06497065 0 0.4040404 Private Assoc-acdm Widowed Tech-support Unmarried White Female United-States 0 +52 0.5777778 0.103954658 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.0600806251 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +31 0.344444454 0.117669173 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Unmarried Black Male United-States 0 +53 0.5888889 0.103378117 0.5625 0 0 0.3030303 Private HS-grad Separated Transport-moving Not-in-family White Male United-States 0 +27 0.3 0.242537752 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +39 0.433333337 0.155152708 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +22 0.244444445 0.1103721 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +37 0.411111116 0.134540528 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.224627122 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Own-child White Male Nicaragua 0 +60 0.6666667 0.1005459 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +51 0.566666663 0.09329396 0.6875 0 0 0.4848485 Private Assoc-voc Divorced Tech-support Unmarried Black Female United-States 0 +57 0.6333333 0.0447927378 0.9375 0 0 0.5050505 Federal-gov Prof-school Divorced Prof-specialty Not-in-family White Female United-States 1 +59 0.655555546 0.139076114 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +37 0.411111116 0.114514336 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +35 0.3888889 0.146564469 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Wife White Female United-States 0 +43 0.477777779 0.09814139 0.625 0 0 0.727272749 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +17 0.188888893 0.113931723 0.5 0 0 0.353535354 Private 12th Never-married Other-service Own-child White Male United-States 0 +45 0.5 0.0229857117 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +18 0.2 0.07418443 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 +52 0.5777778 0.149959758 0.5 0 0 0.4040404 Private 12th Separated Machine-op-inspct Other-relative White Female Cuba 0 +18 0.2 0.123016357 0.625 0 0 0.09090909 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +20 0.222222224 0.2044615 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Black Male Germany 0 +34 0.377777785 0.09435679 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 +19 0.211111113 0.120435372 0.5625 0 0 0.2020202 Private HS-grad Never-married Machine-op-inspct Own-child Black Female United-States 0 +18 0.2 0.180102453 0.5 0 0 0.121212125 ? 12th Never-married ? Own-child White Female United-States 0 +17 0.188888893 0.129579276 0.3125 0 0 0.454545468 Local-gov 9th Never-married Other-service Own-child White Male United-States 0 +30 0.333333343 0.0859497339 0.8125 0 0 0.353535354 Federal-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.174352482 0.8125 0 0 0.454545468 Private Bachelors Never-married Craft-repair Not-in-family White Female United-States 0 +30 0.333333343 0.151700839 0.625 0.0861408561 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 1 +18 0.2 0.117818691 0.3125 0 0 0.151515156 Private 9th Never-married Other-service Own-child White Male ? 0 +50 0.5555556 0.160427153 0.8125 0 0 0.373737365 State-gov Bachelors Divorced Adm-clerical Not-in-family Black Female United-States 0 +22 0.244444445 0.128944144 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Other-relative White Male United-States 0 +21 0.233333334 0.133913472 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +39 0.433333337 0.1692747 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Farming-fishing Other-relative White Male Cuba 0 +20 0.222222224 0.113279745 0.625 0.04416044 0 0.25252524 Private Some-college Never-married Other-service Other-relative White Female United-States 0 +62 0.6888889 0.249801144 0.75 0 0 0.07070707 Private Assoc-acdm Widowed Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.133483082 0.625 0 0 0.3838384 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +38 0.422222227 0.1418531 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 +32 0.355555564 0.181303367 0.625 0.0388703868 0 0.4040404 Private Some-college Separated Tech-support Unmarried Black Female United-States 0 +55 0.6111111 0.09545802 0.8125 0.0346403457 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 +38 0.422222227 0.125175044 0.875 1 0 0.7070707 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +34 0.377777785 0.0314850435 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.0811440647 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +26 0.2888889 0.09149629 0.625 0 0 0.373737365 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +41 0.455555558 0.208967447 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +61 0.677777767 0.255865663 1 0 0.43663913 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +75 0.8333334 0.0211678427 0.5625 0.0345603451 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +21 0.233333334 0.142124534 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Other-service Other-relative White Female Mexico 0 +50 0.5555556 0.117888071 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +49 0.544444442 0.08051364 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male ? 1 +26 0.2888889 0.166379854 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +39 0.433333337 0.169950932 0.25 0 0 0.4040404 Private 7th-8th Never-married Other-service Own-child White Male Mexico 0 +24 0.266666681 0.252786249 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 0 +56 0.622222245 0.0721793249 0.5625 0 0 0.181818187 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +17 0.188888893 0.0730582848 0.4375 0 0 0.171717167 Private 11th Never-married Other-service Own-child Black Male United-States 0 +37 0.411111116 0.101068564 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.127613232 0.6875 0 0 0.3030303 Private Assoc-voc Married-civ-spouse Machine-op-inspct Own-child White Female United-States 0 +28 0.311111122 0.133624524 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family Black Female United-States 0 +57 0.6333333 0.121930622 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +42 0.466666669 0.3838675 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +25 0.2777778 0.0184622537 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 +22 0.244444445 0.09927696 0.8125 0 0 0.2020202 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 +39 0.433333337 0.163616344 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +54 0.6 0.104363494 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Wife Black Female United-States 1 +41 0.455555558 0.285051256 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 +43 0.477777779 0.131598532 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 +19 0.211111113 0.06735951 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 +35 0.3888889 0.129068062 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +34 0.377777785 0.229594439 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male Philippines 1 +19 0.211111113 0.139538154 0.5625 0 0 0.3030303 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +33 0.366666675 0.03233639 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +33 0.366666675 0.154273748 0.625 0 0 0.5252525 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +49 0.544444442 0.130238667 0.875 0 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.0389174968 0.5625 0 0 0.5050505 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +69 0.7666667 0.0815892741 0.5625 0 0 0.13131313 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +41 0.455555558 0.292306572 0.6875 0.04386044 0 0.6060606 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.09206341 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried Other Female United-States 0 +45 0.5 0.103803113 0.5625 0 0 0.3838384 State-gov HS-grad Divorced Exec-managerial Unmarried White Female United-States 1 +63 0.7 0.1980252 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +75 0.8333334 0.161000341 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +34 0.377777785 0.164385527 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Male United-States 0 +69 0.7666667 0.08644681 0.8125 0.09386094 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 +33 0.366666675 0.04464052 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +44 0.4888889 0.10954567 0.5625 0 0 0.434343427 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.121006534 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +18 0.2 0.1382214 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 +48 0.533333361 0.103746541 0.5625 0 0 0.5252525 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 +43 0.477777779 0.106774077 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.246661127 0.5625 0 0.4242424 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 +35 0.3888889 0.203314468 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +34 0.377777785 0.15383932 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +48 0.533333361 0.080912374 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +54 0.6 0.0861740261 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Other-service Unmarried Black Female United-States 0 +57 0.6333333 0.203080073 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +21 0.233333334 0.105731443 0.5625 0 0 0.6060606 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +28 0.311111122 0.0839796439 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 +51 0.566666663 0.205881312 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Canada 1 +34 0.377777785 0.02114292 0.5625 0 0 0.535353541 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +41 0.455555558 0.0226698238 0.625 0 0 0.454545468 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +21 0.233333334 0.142379135 0.625 0 0 0.272727281 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.271433055 0.8125 0 0 0.5858586 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +66 0.733333349 0.05311156 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 +40 0.444444448 0.2158348 1 0 0.453856736 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Hong 1 +48 0.533333361 0.0331904329 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +44 0.4888889 0.167626575 0.8125 0 0 0.5050505 ? Bachelors Divorced ? Not-in-family White Male United-States 0 +41 0.455555558 0.16339004 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +41 0.455555558 0.242267653 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +55 0.6111111 0.199423462 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 1 +43 0.477777779 0.15702109 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 +51 0.566666663 0.1276422 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Other-service Husband White Male Germany 1 +31 0.344444454 0.08380116 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.0451753065 0.8125 0.068490684 0 0.6060606 Self-emp-not-inc Bachelors Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 +51 0.566666663 0.131277263 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 +31 0.344444454 0.0639797151 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Other-service Unmarried Amer-Indian-Eskimo Male United-States 0 +18 0.2 0.131043538 0.625 0 0 0.373737365 Private Some-college Never-married Other-service Own-child White Male United-States 0 +60 0.6666667 0.05100407 0.5625 0 0.2506887 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 +29 0.322222233 0.04089836 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family Asian-Pac-Islander Female United-States 0 +33 0.366666675 0.04037435 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 +34 0.377777785 0.148743361 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 +40 0.444444448 0.07020587 0.875 0 0 1 Self-emp-inc Masters Never-married Other-service Own-child White Male United-States 0 +57 0.6333333 0.0961228 0.625 0 0 0.3838384 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +55 0.6111111 0.07441883 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +40 0.444444448 0.1037755 0.75 0 0 0.6060606 Self-emp-not-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.08793464 0.8125 0 0 0.353535354 State-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +29 0.322222233 0.07214093 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband Amer-Indian-Eskimo Male United-States 0 +30 0.333333343 0.139537483 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female Mexico 0 +29 0.322222233 0.205155239 0.875 0 0 0.5050505 Private Masters Never-married Sales Not-in-family White Male United-States 1 +43 0.477777779 0.320145756 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +65 0.722222269 0.07248578 0.4375 0 0 0.08080808 Private 11th Widowed Adm-clerical Not-in-family White Female United-States 0 +19 0.211111113 0.203347474 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Male Laos 0 +35 0.3888889 0.180416986 0.5625 0 0.4331956 0.5050505 Private HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male Iran 1 +28 0.311111122 0.181710169 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +34 0.377777785 0.112799518 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +61 0.677777767 0.07747196 0.6875 0 0.4331956 0.6060606 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +63 0.7 0.058321353 0.5625 0 0 0.323232323 Local-gov HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 +47 0.5222222 0.126009554 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.124137118 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +18 0.2 0.152123824 0.625 0.02907029 0 0.3030303 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +29 0.322222233 0.0389902368 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +59 0.655555546 0.106372647 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.126509979 0.875 0 0 0.6262626 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 1 +49 0.544444442 0.1691784 0.25 0.02407024 0 0.5050505 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +60 0.6666667 0.213566333 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.128574371 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +48 0.533333361 0.221327469 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +21 0.233333334 0.272013634 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +41 0.455555558 0.145132542 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Not-in-family Black Male United-States 0 +56 0.622222245 0.1061753 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.102464125 0.5 0 0 0.4040404 Private 12th Never-married Other-service Unmarried Black Male United-States 0 +53 0.5888889 0.161166027 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +23 0.25555557 0.157810479 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 +58 0.644444466 0.147318155 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +61 0.677777767 0.0716169253 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.02359526 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +22 0.244444445 0.15803881 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +43 0.477777779 0.114992544 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.1470474 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +90 1 0.0322818346 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +53 0.5888889 0.09591872 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +22 0.244444445 0.147586226 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +55 0.6111111 0.08950397 0.5625 0.03411034 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male Jamaica 0 +34 0.377777785 0.0299480371 1 0 0 0.6060606 State-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.121861249 0.625 0.0501305 0 0.5555556 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +22 0.244444445 0.134320289 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Female United-States 0 +36 0.4 0.09409479 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 +33 0.366666675 0.136486381 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Other-relative Black Female Jamaica 0 +17 0.188888893 0.107798524 0.375 0 0 0.121212125 Private 10th Never-married Other-service Own-child White Female United-States 0 +38 0.422222227 0.161483258 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Not-in-family White Male United-States 0 +60 0.6666667 0.10262578 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +34 0.377777785 0.02889463 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +72 0.8 0.07881498 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +57 0.6333333 0.117879987 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Italy 0 +39 0.433333337 0.2307812 0.5625 0 0 0.6060606 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 +50 0.5555556 0.0968071148 0.8125 0 0 0.8080808 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +45 0.5 0.128711089 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 0 +37 0.411111116 0.140166566 0.8125 0 0 0.353535354 Private Bachelors Separated Exec-managerial Not-in-family White Male United-States 0 +27 0.3 0.112976655 0.625 0 0 0.4848485 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +43 0.477777779 0.212817371 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 +41 0.455555558 0.09612482 0.625 0 0 0.363636374 Private Some-college Divorced Tech-support Unmarried Black Female United-States 0 +20 0.222222224 0.128124446 0.875 0 0 0.25252524 Private Masters Never-married Exec-managerial Own-child White Male United-States 0 +44 0.4888889 0.0537911579 0.875 0 0 0.2020202 Private Masters Separated Exec-managerial Unmarried White Female United-States 0 +50 0.5555556 0.0229453 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +54 0.6 0.150118709 0.5625 0 0 0.454545468 Private HS-grad Widowed Exec-managerial Unmarried White Female United-States 0 +31 0.344444454 0.0299480371 0.8125 0 0.359045 0.6060606 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 +33 0.366666675 0.172466591 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Unmarried White Female Puerto-Rico 0 +22 0.244444445 0.16910632 0.3125 0 0 0.5050505 Private 9th Never-married Other-service Own-child White Male United-States 0 +46 0.51111114 0.100995824 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.111291468 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female Philippines 1 +22 0.244444445 0.163796857 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Male China 0 +59 0.655555546 0.1082114 0.5625 0.02407024 0 0.6060606 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +57 0.6333333 0.118503004 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Widowed Exec-managerial Other-relative White Male United-States 0 +26 0.2888889 0.143323421 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +52 0.5777778 0.103260919 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 +55 0.6111111 0.116720833 0.875 0 0 0.454545468 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +47 0.5222222 0.080912374 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +19 0.211111113 0.07910258 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +26 0.2888889 0.152350813 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 +44 0.4888889 0.1366413 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 1 +42 0.466666669 0.119024321 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 +39 0.433333337 0.0555935353 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +17 0.188888893 0.0280479975 0.4375 0 0 0.151515156 ? 11th Never-married ? Own-child White Female United-States 0 +26 0.2888889 0.132882968 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +26 0.2888889 0.0515193269 0.875 0 0 0.2020202 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +50 0.5555556 0.0680903 0.875 0 0 0.5555556 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.08078642 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +18 0.2 0.09538999 0.625 0.0217602178 0 0.2020202 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +26 0.2888889 0.08255849 0.8125 0 0 0.6060606 Private Bachelors Never-married Exec-managerial Unmarried Asian-Pac-Islander Male Vietnam 0 +32 0.355555564 0.1311641 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.177274272 0.1875 0 0 0.343434334 Private 5th-6th Married-spouse-absent Other-service Unmarried White Female Mexico 0 +47 0.5222222 0.09472858 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +52 0.5777778 0.136131421 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +25 0.2777778 0.0182810724 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.214214951 0.4375 0 0 0.4040404 Local-gov 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +53 0.5888889 0.186144054 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +30 0.333333343 0.0452527627 0.5625 0 0 0.08080808 Private HS-grad Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Female United-States 0 +23 0.25555557 0.0899720863 0.125 0 0 0.363636374 Private 1st-4th Never-married Farming-fishing Not-in-family White Male Mexico 0 +23 0.25555557 0.145936057 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Own-child White Male ? 0 +32 0.355555564 0.0308451857 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +29 0.322222233 0.021403579 0.5625 0 0 0.25252524 Self-emp-inc HS-grad Separated Prof-specialty Other-relative White Male United-States 0 +40 0.444444448 0.128001183 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Other-service Husband White Male United-States 0 +45 0.5 0.0972253755 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +17 0.188888893 0.115945593 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child Black Female United-States 0 +55 0.6111111 0.130079716 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +59 0.655555546 0.09461678 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +56 0.622222245 0.08243389 0.6875 0.1502415 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +23 0.25555557 0.07868903 0.5 0 0 0.5050505 Private 12th Never-married Craft-repair Not-in-family White Male United-States 0 +37 0.411111116 0.07926356 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +25 0.2777778 0.07172536 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +22 0.244444445 0.026808694 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +27 0.3 0.244528711 0.3125 0 0 0.24242425 Private 9th Never-married Priv-house-serv Unmarried White Female Mexico 0 +21 0.233333334 0.03668877 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +47 0.5222222 0.13502413 0.5625 0.05178052 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +38 0.422222227 0.0365843736 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +62 0.6888889 0.0764077753 0.875 0.105201051 0 0.333333343 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 1 +27 0.3 0.107511595 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.108597331 0.6875 0 0 0.909090936 ? Assoc-voc Never-married ? Own-child White Male United-States 0 +27 0.3 0.167021737 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 +40 0.444444448 0.205997825 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 +22 0.244444445 0.144145817 0.625 1 0 0.5555556 Self-emp-not-inc Some-college Never-married Sales Own-child Black Male United-States 1 +33 0.366666675 0.1525724 0.5625 0 0 0.6060606 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 +28 0.311111122 0.166914642 0.6875 0 0 0.05050505 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 0 +28 0.311111122 0.13129881 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +29 0.322222233 0.195318937 0.5625 0 0 0.5555556 Private HS-grad Never-married Transport-moving Unmarried White Male United-States 0 +46 0.51111114 0.394260824 0.3125 0 0 0.4040404 Private 9th Divorced Exec-managerial Unmarried White Female United-States 0 +30 0.333333343 0.0613893 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +65 0.722222269 0.155993283 0.5625 0 0 0.454545468 ? HS-grad Married-civ-spouse ? Husband White Male Germany 0 +28 0.311111122 0.184056088 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 +39 0.433333337 0.136514 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +35 0.3888889 0.107212543 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 +50 0.5555556 0.01950017 0.625 0 0 0.3939394 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 +25 0.2777778 0.1447594 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child Black Male United-States 0 +63 0.7 0.110262983 0.3125 0 0 0.2020202 Private 9th Widowed Other-service Not-in-family White Female United-States 0 +56 0.622222245 0.13486518 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.07355603 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +19 0.211111113 0.111909777 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 +56 0.622222245 0.180650711 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 +31 0.344444454 0.0465115979 0.5625 0 0 0.151515156 Private HS-grad Divorced Other-service Own-child White Female United-States 0 +51 0.566666663 0.159722641 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +17 0.188888893 0.186933428 0.4375 0 0 0.05050505 Private 11th Never-married Sales Own-child White Male United-States 0 +27 0.3 0.19467774 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Unmarried Asian-Pac-Islander Female United-States 0 +30 0.333333343 0.0907500163 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +18 0.2 0.03813081 0.625 0 0 0.2020202 Private Some-college Never-married Protective-serv Own-child White Female United-States 0 +41 0.455555558 0.0247180425 0.625 0.046500463 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +40 0.444444448 0.224643961 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +35 0.3888889 0.124850392 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +29 0.322222233 0.10373576 0.5625 0 0 0.1010101 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +27 0.3 0.14514938 0.8125 0 0.4242424 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +25 0.2777778 0.1498877 0.375 0.02597026 0 0.5050505 Private 10th Never-married Transport-moving Not-in-family White Male United-States 0 +53 0.5888889 0.129025638 0.125 0 0 0.4040404 Private 1st-4th Divorced Other-service Unmarried Black Female Dominican-Republic 0 +53 0.5888889 0.07539478 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 +26 0.2888889 0.0363055281 0.5625 0 0 0.5050505 State-gov HS-grad Never-married Craft-repair Unmarried White Male United-States 0 +41 0.455555558 0.0987798944 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +28 0.311111122 0.1308004 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +48 0.533333361 0.05289199 0.875 0 0 0.6060606 State-gov Masters Separated Prof-specialty Not-in-family White Male United-States 0 +22 0.244444445 0.131224051 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +40 0.444444448 0.222383574 0.9375 0.07688077 0 0.4040404 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +52 0.5777778 0.155429527 0.8125 0 0.43663913 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Cuba 1 +53 0.5888889 0.09244261 0.875 0 0.383149683 0.353535354 Local-gov Masters Widowed Prof-specialty Unmarried Black Female United-States 0 +40 0.444444448 0.171399713 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +57 0.6333333 0.202671915 0.75 0 0 0.75757575 Private Assoc-acdm Divorced Machine-op-inspct Not-in-family White Male United-States 0 +53 0.5888889 0.126509979 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Separated Craft-repair Not-in-family White Male Poland 0 +23 0.25555557 0.135473385 0.625 0 0 0.08080808 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +31 0.344444454 0.029974306 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +20 0.222222224 0.2568571 0.3125 0 0 0.282828271 Private 9th Never-married Handlers-cleaners Own-child White Male United-States 0 +25 0.2777778 0.20955275 0.9375 0 0 0.2020202 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 +37 0.411111116 0.06488158 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Unmarried Black Female United-States 0 +50 0.5555556 0.153726161 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +34 0.377777785 0.03836722 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.08605885 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.2602517 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.27278012 0.6875 0 0 0.909090936 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +49 0.544444442 0.0232672486 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.106341667 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +47 0.5222222 0.06822837 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.09055469 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +27 0.3 0.12919873 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +23 0.25555557 0.04776639 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +55 0.6111111 0.17939119 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +28 0.311111122 0.0587584749 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.159282148 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female Germany 0 +30 0.333333343 0.150970727 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 +23 0.25555557 0.132821 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +19 0.211111113 0.08369676 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Own-child White Male United-States 0 +22 0.244444445 0.05386929 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Male United-States 0 +50 0.5555556 0.08676067 0.5625 0 0 0.25252524 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +64 0.7111111 0.140675753 0.5625 0 0 0.5050505 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +21 0.233333334 0.0345267244 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +75 0.8333334 0.06608451 0.625 0 0 0.4040404 Self-emp-inc Some-college Widowed Sales Not-in-family White Male United-States 1 +29 0.322222233 0.05549453 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Asian-Pac-Islander Male Germany 0 +47 0.5222222 0.0387511328 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.147478461 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +33 0.366666675 0.137907535 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +45 0.5 0.164093882 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 1 +41 0.455555558 0.114702247 0.6875 0 0 0.434343427 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 +23 0.25555557 0.04063501 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +38 0.422222227 0.181394964 0.8125 0.05178052 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 +67 0.7444445 0.089458175 0.625 0 0 0.414141417 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +21 0.233333334 0.0805985 0.625 0 0 0.353535354 Private Some-college Never-married Tech-support Own-child White Male United-States 0 +38 0.422222227 0.101068564 0.625 0 0 0.454545468 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 +31 0.344444454 0.0865943059 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +19 0.211111113 0.1555016 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +59 0.655555546 0.100037381 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.107894838 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +50 0.5555556 0.0502860844 0.625 0 0 0.4040404 Local-gov Some-college Widowed Prof-specialty Unmarried White Male United-States 0 +60 0.6666667 0.0959746242 0.375 0 0 0.4040404 Self-emp-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.0821995 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.0249800477 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 +36 0.4 0.0416096151 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.11878185 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Female Germany 0 +27 0.3 0.08304815 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Poland 0 +18 0.2 0.0604564548 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child White Female United-States 0 +44 0.4888889 0.111337945 0.625 0 0.3409091 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +56 0.622222245 0.0706840754 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Husband Black Male United-States 0 +51 0.566666663 0.129973978 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 1 +48 0.533333361 0.0659141 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Italy 1 +31 0.344444454 0.049562037 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +35 0.3888889 0.019630162 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Transport-moving Not-in-family White Male United-States 0 +35 0.3888889 0.118024796 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Other-relative White Male United-States 0 +36 0.4 0.2191506 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.0722237751 0.75 0 0.3838384 0.656565666 Self-emp-not-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.08711832 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +21 0.233333334 0.153831914 0.625 0 0 0.2020202 Private Some-college Never-married Sales Other-relative Black Female United-States 0 +49 0.544444442 0.304708362 0.625 0 0 0.6060606 Private Some-college Separated Exec-managerial Unmarried Black Female United-States 0 +51 0.566666663 0.227829769 0.9375 0.1502415 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.111226141 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.0734523 0.5625 0.031370312 0 0.454545468 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +27 0.3 0.130074322 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +56 0.622222245 0.2865869 0.75 0 0 0.2020202 ? Assoc-acdm Married-civ-spouse ? Husband White Male United-States 0 +48 0.533333361 0.129222974 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.200144142 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +29 0.322222233 0.122099675 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 +50 0.5555556 0.0752338 0.875 0 0 0.5050505 Federal-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +18 0.2 0.0236174874 0.5625 0 0 0.353535354 Private HS-grad Never-married Transport-moving Not-in-family Black Male United-States 0 +37 0.411111116 0.201076314 0.5625 0 0.43663913 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +51 0.566666663 0.06427877 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +31 0.344444454 0.109220356 0.5625 0 0 0.474747479 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.11856699 0.6875 0.143441439 0 0.4040404 Private Assoc-voc Divorced Tech-support Not-in-family Black Male United-States 1 +39 0.433333337 0.21149455 0.375 0 0.4708448 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.133146316 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 1 +44 0.4888889 0.163346261 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.1955412 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +22 0.244444445 0.0296786241 0.4375 0 0 0.353535354 Local-gov 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +27 0.3 0.117304787 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 +42 0.466666669 0.252434 0.3125 0 0 0.4040404 Private 9th Divorced Craft-repair Not-in-family White Male United-States 0 +18 0.2 0.155964985 0.5625 0 0 0.333333343 Private HS-grad Never-married Sales Own-child White Female United-States 0 +27 0.3 0.25335 0.625 0 0 0.25252524 Private Some-college Married-spouse-absent Sales Not-in-family White Female United-States 0 +51 0.566666663 0.0673446953 0.375 0 0 0.4040404 Private 10th Separated Machine-op-inspct Unmarried Black Female United-States 0 +27 0.3 0.08090901 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +60 0.6666667 0.0227095615 0.4375 0 0 0.5050505 Self-emp-not-inc 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +36 0.4 0.08949859 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male Italy 0 +45 0.5 0.2051384 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male China 1 +40 0.444444448 0.06755012 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +63 0.7 0.07912212 0.625 0.04386044 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.1615358 0.5625 0 0 0.5050505 Private HS-grad Married-spouse-absent Transport-moving Unmarried Black Male United-States 0 +53 0.5888889 0.10455478 0.5 0 0 0.4040404 ? 12th Married-civ-spouse ? Wife White Female Italy 0 +34 0.377777785 0.08780802 0.5625 0.0115101151 0 0.4848485 Private HS-grad Divorced Transport-moving Unmarried White Female Germany 0 +34 0.377777785 0.233828276 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +31 0.344444454 0.3386208 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +22 0.244444445 0.172138572 0.75 0 0 0.151515156 State-gov Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 +49 0.544444442 0.187206224 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +43 0.477777779 0.144500762 0.5625 0 0 0.353535354 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +36 0.4 0.09639828 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +27 0.3 0.0465627871 0.8125 0 0 0.373737365 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +52 0.5777778 0.02355552 0.5625 0 0.4331956 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +29 0.322222233 0.159622282 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 +27 0.3 0.3315561 0.375 0 0 0.353535354 Private 10th Separated Machine-op-inspct Own-child White Male Mexico 0 +42 0.466666669 0.121249005 0.5625 0 0 0.656565666 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +49 0.544444442 0.0317140445 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Widowed Sales Unmarried White Female United-States 0 +24 0.266666681 0.150099188 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 +22 0.244444445 0.2318144 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Unmarried White Male United-States 0 +30 0.333333343 0.150340974 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Sales Unmarried White Male United-States 0 +28 0.311111122 0.07474953 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +20 0.222222224 0.109575979 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Own-child White Male United-States 0 +45 0.5 0.122116514 0.9375 0.1502415 0 0.434343427 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.100291304 0.5625 0.0468704663 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Female United-States 1 +43 0.477777779 0.2063979 0.9375 0 0 0.6666667 Private Prof-school Never-married Prof-specialty Not-in-family White Male France 0 +18 0.2 0.1416517 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 +53 0.5888889 0.0856176838 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +74 0.822222233 0.03686389 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.182878762 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 +33 0.366666675 0.146095023 0.375 0 0 0.4040404 ? 10th Never-married ? Other-relative White Male United-States 0 +49 0.544444442 0.366350234 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +21 0.233333334 0.51600486 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +65 0.722222269 0.0355141275 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 +39 0.433333337 0.1913956 0.5625 0 0.359045 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 +49 0.544444442 0.0823099539 0.6875 0 0 0.25252524 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +20 0.222222224 0.0646519 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +47 0.5222222 0.224986792 0.8125 0.07298073 0 0.444444448 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.151852384 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.0760063455 0.6875 0.07298073 0 0.323232323 Private Assoc-voc Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 1 +61 0.677777767 0.115740165 0.5625 0 0 0.161616161 Self-emp-not-inc HS-grad Widowed Prof-specialty Unmarried White Female United-States 0 +48 0.533333361 0.121704318 0.625 0 0 0.3838384 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +44 0.4888889 0.08150575 0.3125 0 0 0.4040404 Private 9th Divorced Craft-repair Not-in-family White Male United-States 0 +37 0.411111116 0.08524859 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.1534251 0.625 0 0.399449021 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +51 0.566666663 0.195520326 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +33 0.366666675 0.169408068 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +55 0.6111111 0.02824669 0.8125 0 0 0.08080808 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +25 0.2777778 0.0186420884 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +26 0.2888889 0.09008928 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family Asian-Pac-Islander Male Philippines 0 +54 0.6 0.145476714 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.310726374 0.5625 0 0 0.333333343 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +39 0.433333337 0.232271731 0.875 0 0.453856736 0.2020202 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +20 0.222222224 0.144501433 0.625 0 0 0.4040404 State-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 +30 0.333333343 0.1738864 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.163094357 0.5625 0 0 0.454545468 Federal-gov HS-grad Divorced Adm-clerical Not-in-family Other Male United-States 0 +42 0.466666669 0.158752084 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Female United-States 0 +24 0.266666681 0.187330142 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 +36 0.4 0.175954819 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +60 0.6666667 0.0579205975 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male South 1 +42 0.466666669 0.2295978 0.5625 0 0 0.444444448 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 +42 0.466666669 0.102976017 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.131354719 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Not-in-family White Female Columbia 0 +52 0.5777778 0.07381938 0.875 0.04787048 0 0.444444448 State-gov Masters Married-spouse-absent Exec-managerial Unmarried White Female United-States 1 +27 0.3 0.168021932 0.6875 0 0 0.2020202 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 0 +43 0.477777779 0.106537662 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +43 0.477777779 0.03220707 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +27 0.3 0.2636672 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Own-child White Male United-States 0 +52 0.5777778 0.134703532 0.875 0.07298073 0 0.6060606 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +31 0.344444454 0.155615434 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 +38 0.422222227 0.189780459 0.25 0 0 0.3030303 ? 7th-8th Divorced ? Unmarried Black Female United-States 0 +44 0.4888889 0.1803658 0.3125 0 0 0.4040404 Private 9th Never-married Other-service Unmarried Black Female United-States 0 +27 0.3 0.146412253 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Own-child White Female United-States 0 +50 0.5555556 0.283935875 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 +23 0.25555557 0.0343186036 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +22 0.244444445 0.09328722 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 +36 0.4 0.119258709 0.625 0 0 0.4040404 State-gov Some-college Never-married Exec-managerial Unmarried White Female United-States 0 +24 0.266666681 0.06941716 0.8125 0.0367403664 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +59 0.655555546 0.1242624 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.0701075345 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +23 0.25555557 0.100494042 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +37 0.411111116 0.272972763 0.8125 0 0.307621658 0.424242437 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +25 0.2777778 0.09247359 0.75 0 0 0.3838384 Local-gov Assoc-acdm Never-married Adm-clerical Own-child Black Female United-States 0 +40 0.444444448 0.0591167957 0.5625 0 0.373737365 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 0 +38 0.422222227 0.0845279 0.8125 0.07688077 0 0.6060606 State-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +31 0.344444454 0.0397944376 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +28 0.311111122 0.09317137 1 0 0 0.4040404 Local-gov Doctorate Divorced Prof-specialty Not-in-family White Female United-States 0 +24 0.266666681 0.133975446 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Unmarried Black Male United-States 0 +46 0.51111114 0.160410315 0.75 0 0.4331956 0.5050505 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 +29 0.322222233 0.0833007246 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female Laos 0 +38 0.422222227 0.219261065 0.9375 0 0 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.169099584 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Unmarried Black Female United-States 0 +33 0.366666675 0.0346674919 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Tech-support Wife White Female United-States 1 +39 0.433333337 0.118327215 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband Black Male ? 0 +44 0.4888889 0.111536637 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +46 0.51111114 0.1007877 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Not-in-family White Male England 1 +30 0.333333343 0.09666971 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 +24 0.266666681 0.142223537 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.231014922 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 +62 0.6888889 0.116946466 0.625 0 0 0.7070707 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +25 0.2777778 0.09555838 0.5625 0 0 0.454545468 Private HS-grad Married-spouse-absent Exec-managerial Not-in-family White Male United-States 0 +45 0.5 0.09268104 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +21 0.233333334 0.08704221 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 +64 0.7111111 0.182898283 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +39 0.433333337 0.307752728 0.8125 0 0 0.4040404 Private Bachelors Divorced Tech-support Not-in-family White Male United-States 0 +60 0.6666667 0.156423 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.237210765 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 +27 0.3 0.07743424 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +41 0.455555558 0.136041164 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 +32 0.355555564 0.10725835 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +24 0.266666681 0.08480136 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.125832409 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.08150575 0.625 0 0 0.454545468 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.0746572539 0.875 0 0 0.272727281 Private Masters Widowed Sales Not-in-family White Female United-States 0 +23 0.25555557 0.0963174552 0.875 0 0.4331956 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 +31 0.344444454 0.0402315632 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Farming-fishing Husband Amer-Indian-Eskimo Male United-States 0 +28 0.311111122 0.1202185 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Unmarried Black Female ? 0 +41 0.455555558 0.169816226 0.625 0 0 0.2020202 ? Some-college Widowed ? Unmarried Black Female United-States 0 +37 0.411111116 0.07384161 0.8125 0 0 0.161616161 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +19 0.211111113 0.108311757 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Own-child White Male United-States 0 +27 0.3 0.245914176 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +61 0.677777767 0.07616328 0.3125 0 0 0.5858586 Self-emp-not-inc 9th Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.138797939 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +25 0.2777778 0.116563223 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Unmarried Black Male United-States 0 +58 0.644444466 0.07898741 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.103592969 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Other-relative Other Male Ecuador 1 +51 0.566666663 0.197885782 0.1875 0 0 0.5252525 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 +43 0.477777779 0.103139684 0.875 0.1502415 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +46 0.51111114 0.112351611 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +67 0.7444445 0.022982344 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 0 +50 0.5555556 0.156074777 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +20 0.222222224 0.0425741151 0.5625 0 0 0.151515156 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +35 0.3888889 0.07293907 0.8125 0 0 0.323232323 Private Bachelors Widowed Prof-specialty Unmarried White Female United-States 1 +57 0.6333333 0.07872137 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male Italy 0 +40 0.444444448 0.0745077357 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Adm-clerical Other-relative Asian-Pac-Islander Female Philippines 0 +42 0.466666669 0.121450394 0.375 0 0 0.353535354 Local-gov 10th Never-married Farming-fishing Unmarried White Male United-States 0 +67 0.7444445 0.0756500438 0.375 0 0 0.4040404 Self-emp-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.1697839 0.8125 0.07688077 0 0.444444448 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +30 0.333333343 0.018288482 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +26 0.2888889 0.04937816 0.4375 0 0 0.151515156 Private 11th Never-married Machine-op-inspct Unmarried White Female United-States 0 +51 0.566666663 0.09793798 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +38 0.422222227 0.113074318 0.625 0 0 0.454545468 Private Some-college Widowed Other-service Other-relative Black Female Haiti 0 +24 0.266666681 0.159422919 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Handlers-cleaners Own-child White Male United-States 0 +48 0.533333361 0.0193917323 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +34 0.377777785 0.0798481852 0.8125 0.05178052 0 0.25252524 State-gov Bachelors Married-civ-spouse Tech-support Own-child White Female ? 1 +70 0.7777778 0.126147628 0.8125 0.06418064 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +35 0.3888889 0.127919018 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +61 0.677777767 0.3935186 0.875 0 0 0.02020202 ? Masters Married-civ-spouse ? Husband White Male United-States 1 +26 0.2888889 0.117189616 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +64 0.7111111 0.17091544 0.5625 0 0 0.0303030312 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +26 0.2888889 0.074926 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 +39 0.433333337 0.0995820761 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +55 0.6111111 0.1151845 0.625 0 0 0.363636374 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.07949256 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male ? 0 +33 0.366666675 0.2434807 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +31 0.344444454 0.09246955 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.2706841 0.5625 0 0 0.2020202 Local-gov HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 +50 0.5555556 0.1359745 0.875 0 0 0.3030303 Private Masters Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +26 0.2888889 0.0207401477 0.8125 0 0 0.5555556 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +44 0.4888889 0.0937297344 0.75 0 0.3996786 0.4040404 Federal-gov Assoc-acdm Divorced Adm-clerical Not-in-family Black Female United-States 0 +51 0.566666663 0.141937956 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 +34 0.377777785 0.113006286 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +37 0.411111116 0.0700381547 0.8125 0.07688077 0 0.3939394 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.0973877 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.332075417 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 +27 0.3 0.123982884 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +44 0.4888889 0.129193351 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.2221667 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +54 0.6 0.150642723 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +47 0.5222222 0.1192742 0.625 0 0 0.5050505 Private Some-college Separated Adm-clerical Unmarried White Female United-States 1 +30 0.333333343 0.09683136 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +35 0.3888889 0.1577896 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.212043479 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +42 0.466666669 0.131732568 0.75 0 0 0.4040404 Private Assoc-acdm Separated Adm-clerical Unmarried Black Female United-States 0 +70 0.7777778 0.140053421 0.8125 0 0.5456841 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.08543785 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 0 +36 0.4 0.1882428 0.5625 0 0 0.3838384 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +44 0.4888889 0.180316627 0.875 0 0 0.424242437 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.118498288 0.5625 0 0 0.4040404 ? HS-grad Separated ? Unmarried White Male United-States 0 +20 0.222222224 0.110234022 0.625 0 0 0.171717167 Private Some-college Never-married Transport-moving Own-child White Female United-States 0 +29 0.322222233 0.135022119 0.375 0 0 0.4040404 Private 10th Never-married Prof-specialty Not-in-family White Male United-States 0 +27 0.3 0.06162908 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Wife White Female United-States 0 +30 0.333333343 0.123102568 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 1 +59 0.655555546 0.0379819572 0.625 0 0.3624885 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +31 0.344444454 0.0138148656 0.8125 0 0 0.25252524 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +21 0.233333334 0.3629152 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Male Mexico 0 +26 0.2888889 0.223618835 0.625 0 0 0.373737365 Private Some-college Never-married Craft-repair Unmarried Asian-Pac-Islander Male Taiwan 0 +57 0.6333333 0.148709 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +59 0.655555546 0.07729482 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +87 0.9666667 0.06084576 0.5625 0 0 0.02020202 ? HS-grad Widowed ? Not-in-family White Male United-States 0 +25 0.2777778 0.1222977 0.625 0 0 0.5555556 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 +39 0.433333337 0.133926272 0.875 0.07688077 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +53 0.5888889 0.0358300135 0.875 0.03103031 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.365234166 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.130009666 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.0171784963 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Adm-clerical Unmarried Black Female United-States 0 +17 0.188888893 0.253017932 0.4375 0 0 0.3030303 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 +44 0.4888889 0.135783881 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Unmarried Black Female United-States 0 +23 0.25555557 0.122462042 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +57 0.6333333 0.2251114 0.625 0.09386094 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Wife White Female United-States 1 +30 0.333333343 0.0365850478 0.4375 0 0 0.4040404 State-gov 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +51 0.566666663 0.09522969 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +54 0.6 0.03845949 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.113500662 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female Germany 0 +60 0.6666667 0.110234022 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +28 0.311111122 0.139767155 0.8125 0.07298073 0 0.424242437 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +39 0.433333337 0.197541609 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +55 0.6111111 0.0472066849 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.1342664 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +55 0.6111111 0.0969546139 0.875 0.03103031 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +33 0.366666675 0.139557019 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +30 0.333333343 0.289810449 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 +40 0.444444448 0.19789049 0.8125 0 0 0.2020202 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +30 0.333333343 0.2546021 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +40 0.444444448 0.1526283 0.625 0 0 0.3030303 Private Some-college Divorced Tech-support Not-in-family White Male Guatemala 1 +24 0.266666681 0.211612418 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Not-in-family White Female United-States 0 +18 0.2 0.114867263 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 +18 0.2 0.06344426 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +49 0.544444442 0.1300238 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.0758447 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.09897522 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +32 0.355555564 0.208467677 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +48 0.533333361 0.128907084 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Separated Sales Unmarried White Female United-States 0 +24 0.266666681 0.144070372 0.25 0 0 0.323232323 Private 7th-8th Never-married Priv-house-serv Own-child White Female El-Salvador 0 +73 0.811111152 0.0313287824 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 +35 0.3888889 0.05109096 0.875 0.07298073 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Black Male ? 1 +23 0.25555557 0.0260705 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +19 0.211111113 0.127007052 0.625 0 0 0.4040404 Private Some-college Never-married Priv-house-serv Not-in-family White Female United-States 0 +27 0.3 0.144819349 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Husband White Male Mexico 0 +27 0.3 0.124251619 0.5 0 0 0.4040404 Private 12th Never-married Other-service Not-in-family White Male United-States 0 +41 0.455555558 0.13755931 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.0263042152 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +64 0.7111111 0.18355903 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +45 0.5 0.241597489 0.5 0 0 0.1010101 Private 12th Never-married Other-service Own-child White Male Mexico 0 +47 0.5222222 0.146662131 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +22 0.244444445 0.1349588 0.5625 0 0 0.353535354 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 +24 0.266666681 0.335655242 0.8125 0 0 0.4040404 Private Bachelors Never-married Transport-moving Unmarried Black Female United-States 0 +69 0.7666667 0.114809342 0.5625 0 0 0.2020202 State-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +40 0.444444448 0.0385484 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +45 0.5 0.126915455 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +47 0.5222222 0.0224286988 0.75 0.105201051 0 0.454545468 Self-emp-not-inc Assoc-acdm Never-married Farming-fishing Other-relative White Male United-States 1 +31 0.344444454 0.152069941 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +48 0.533333361 0.03143857 0.75 0 0 0.424242437 Private Assoc-acdm Divorced Exec-managerial Unmarried White Female United-States 0 +41 0.455555558 0.1535443 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Wife Black Female Haiti 1 +34 0.377777785 0.0574895367 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 +48 0.533333361 0.139502466 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +28 0.311111122 0.15438959 0.6875 0.07688077 0 0.363636374 Local-gov Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +20 0.222222224 0.151302785 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Exec-managerial Own-child White Female United-States 0 +39 0.433333337 0.0936293751 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 +40 0.444444448 0.08806396 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Not-in-family Black Female United-States 0 +28 0.311111122 0.137748584 0.375 0 0 0.454545468 Private 10th Never-married Transport-moving Not-in-family White Male United-States 0 +20 0.222222224 0.0710437447 0.625 0 0 0.25252524 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +41 0.455555558 0.132748932 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family Black Male United-States 0 +49 0.544444442 0.290458381 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.104498878 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +35 0.3888889 0.145507023 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +22 0.244444445 0.261497736 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 +23 0.25555557 0.140706748 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 +23 0.25555557 0.174648166 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 +42 0.466666669 0.0466981679 0.6875 0.04386044 0 0.8080808 Self-emp-not-inc Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 +34 0.377777785 0.113081723 0.625 0 0 0.646464646 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.260575 0.6875 0.046500463 0 0.4040404 Federal-gov Assoc-voc Never-married Tech-support Own-child Black Male United-States 0 +54 0.6 0.0987071544 0.5625 0 0 0.545454562 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +48 0.533333361 0.16054368 0.8125 0 0 0.4040404 Private Bachelors Separated Adm-clerical Unmarried Asian-Pac-Islander Female Philippines 0 +38 0.422222227 0.126454756 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.03418053 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 +22 0.244444445 0.033768326 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male El-Salvador 0 +42 0.466666669 0.0750876442 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +31 0.344444454 0.201299921 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 0 +27 0.3 0.0992385745 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Not-in-family White Female United-States 1 +57 0.6333333 0.08938072 0.875 0.105201051 0 0.323232323 Private Masters Separated Prof-specialty Not-in-family White Male United-States 1 +46 0.51111114 0.220775172 0.6875 0.0332503319 0 0.424242437 State-gov Assoc-voc Divorced Tech-support Not-in-family White Female United-States 0 +44 0.4888889 0.16409725 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +42 0.466666669 0.130946562 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +24 0.266666681 0.159422919 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +38 0.422222227 0.227068678 0.125 0 0 0.4040404 Private 1st-4th Married-spouse-absent Craft-repair Not-in-family White Male Mexico 0 +29 0.322222233 0.183909267 0.8125 0 0 0.5252525 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Yugoslavia 1 +38 0.422222227 0.125406057 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.180811 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 +61 0.677777767 0.104128435 0.5625 0 0 0.04040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +49 0.544444442 0.2729896 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.06680452 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +42 0.466666669 0.129160345 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Other-relative Black Female United-States 0 +21 0.233333334 0.1707969 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 +29 0.322222233 0.200076118 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Male United-States 0 +54 0.6 0.137668431 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +23 0.25555557 0.194497228 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +52 0.5777778 0.117186248 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +28 0.311111122 0.0226725172 0.875 0.07298073 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +23 0.25555557 0.0617348254 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Own-child White Male United-States 0 +43 0.477777779 0.152826324 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.156654686 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +51 0.566666663 0.196507052 0.25 0 0 0.424242437 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +29 0.322222233 0.139443189 0.5625 0 0 0.424242437 ? HS-grad Married-spouse-absent ? Unmarried Black Female Haiti 0 +23 0.25555557 0.108761005 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Female United-States 0 +73 0.811111152 0.0739763156 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +47 0.5222222 0.154504776 0.4375 0 0 0.5555556 Self-emp-not-inc 11th Divorced Exec-managerial Unmarried White Female United-States 0 +61 0.677777767 0.0466658361 0.5625 0 0 0.373737365 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +26 0.2888889 0.331286 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Not-in-family Black Female United-States 0 +40 0.444444448 0.2098289 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +32 0.355555564 0.2834873 0.8125 0 0 0.474747479 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +39 0.433333337 0.1524707 0.375 0 0 0.4040404 Private 10th Divorced Other-service Unmarried Black Female United-States 0 +33 0.366666675 0.06825935 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +35 0.3888889 0.0328543372 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +42 0.466666669 0.102832548 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Own-child White Male United-States 0 +46 0.51111114 0.111050345 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +33 0.366666675 0.06568376 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +47 0.5222222 0.05965091 0.1875 0 0 0.2020202 Private 5th-6th Never-married Machine-op-inspct Own-child White Male United-States 0 +33 0.366666675 0.126790166 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +26 0.2888889 0.127422616 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 +42 0.466666669 0.109832592 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +28 0.311111122 0.169666708 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +29 0.322222233 0.075707294 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male ? 0 +18 0.2 0.0248413 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 +33 0.366666675 0.131939352 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +36 0.4 0.131275237 0.8125 0 0 0.444444448 Private Bachelors Widowed Prof-specialty Unmarried White Female United-States 0 +33 0.366666675 0.0899188742 0.5625 0.07688077 0 0.4848485 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +40 0.444444448 0.0212978348 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 +57 0.6333333 0.278420985 1 0 0.43663913 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Sales Husband White Male United-States 1 +40 0.444444448 0.13203229 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Unmarried White Male United-States 0 +36 0.4 0.0722716 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 +45 0.5 0.101883538 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 1 +52 0.5777778 0.173004746 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +24 0.266666681 0.055753164 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family White Male United-States 0 +30 0.333333343 0.09929919 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.0409010537 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child Black Male United-States 0 +46 0.51111114 0.111641034 1 0 0 0.454545468 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 +36 0.4 0.301970422 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Unmarried Black Female United-States 0 +48 0.533333361 0.124657087 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 +36 0.4 0.282010227 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +48 0.533333361 0.0279543754 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +21 0.233333334 0.26088348 0.625 0 0.3946281 0.09090909 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +18 0.2 0.176277444 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +38 0.422222227 0.0902287 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 +66 0.733333349 0.240956962 0.4375 0 0 0.4040404 ? 11th Widowed ? Not-in-family Black Female United-States 0 +36 0.4 0.120891355 0.8125 0.07298073 0 0.5555556 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +38 0.422222227 0.0405029953 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Female United-States 0 +55 0.6111111 0.207951084 0.9375 0 0 0.5555556 Self-emp-not-inc Prof-school Widowed Prof-specialty Not-in-family White Male United-States 1 +27 0.3 0.187727526 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.321616083 0.75 0 0 0.4040404 State-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 +29 0.322222233 0.110938542 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Other-relative White Male United-States 0 +40 0.444444448 0.140281737 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Unmarried White Female United-States 0 +21 0.233333334 0.0269029886 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +49 0.544444442 0.07041264 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +29 0.322222233 0.19305788 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 +28 0.311111122 0.09612145 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 +26 0.2888889 0.2265797 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +33 0.366666675 0.07946562 0.5625 0 0 0.414141417 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +72 0.8 0.07327786 0.9375 0 0 0.4040404 ? Prof-school Married-civ-spouse ? Husband White Male United-States 1 +59 0.655555546 0.0400544219 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male Iran 0 +37 0.411111116 0.115826376 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 +56 0.622222245 0.0803216845 0.375 0 0 0.4040404 ? 10th Divorced ? Not-in-family White Female United-States 0 +27 0.3 0.187658161 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +39 0.433333337 0.0487221368 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 +49 0.544444442 0.231177911 0.875 0 0 0.8080808 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +30 0.333333343 0.0430455878 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Own-child Asian-Pac-Islander Female United-States 0 +28 0.311111122 0.1282073 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Protective-serv Wife Black Female United-States 0 +25 0.2777778 0.118651181 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Protective-serv Own-child White Male United-States 0 +18 0.2 0.0254057217 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Own-child White Male United-States 0 +25 0.2777778 0.283872545 0.75 0 0 0.262626261 Private Assoc-acdm Never-married Handlers-cleaners Own-child White Male United-States 0 +36 0.4 0.09324479 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 +52 0.5777778 0.0988526344 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +20 0.222222224 0.248990878 0.5 0 0.3677686 0.4040404 ? 12th Never-married ? Not-in-family Other Male United-States 0 +25 0.2777778 0.10806524 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +26 0.2888889 0.142583877 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +50 0.5555556 0.06893356 0.8125 0 0.5544077 0.2020202 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +48 0.533333361 0.08674855 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.07484921 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +30 0.333333343 0.0300167371 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +26 0.2888889 0.07981182 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.225156516 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +49 0.544444442 0.160247326 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Sales Husband White Male United-States 0 +34 0.377777785 0.09182363 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +28 0.311111122 0.126218349 0.5625 0 0 0.4848485 Private HS-grad Never-married Other-service Other-relative Other Male Mexico 0 +28 0.311111122 0.080684714 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family White Male United-States 0 +42 0.466666669 0.0168262385 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.156067371 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +54 0.6 0.1544226 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 +66 0.733333349 0.04594785 0.3125 0 0 0.4040404 ? 9th Married-civ-spouse ? Husband White Male United-States 0 +61 0.677777767 0.181066945 0.5625 0 0 0.535353541 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +45 0.5 0.1007877 0.9375 0 0 0.3030303 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 +29 0.322222233 0.176280811 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +74 0.822222233 0.108699709 0.5625 0 0 0.161616161 Private HS-grad Divorced Handlers-cleaners Not-in-family White Female United-States 0 +61 0.677777767 0.175231442 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Prof-specialty Not-in-family White Female United-States 0 +27 0.3 0.135331944 0.625 0 0 0.222222224 Private Some-college Never-married Sales Own-child White Male United-States 0 +53 0.5888889 0.104797922 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +57 0.6333333 0.05357226 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male United-States 0 +41 0.455555558 0.316193461 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.22326456 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +43 0.477777779 0.151675254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +26 0.2888889 0.249697417 0.8125 0 0.453856736 0.4040404 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 +29 0.322222233 0.05549453 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Own-child Asian-Pac-Islander Male Philippines 0 +65 0.722222269 0.025035277 0.25 0 0 0.2020202 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +41 0.455555558 0.0393909924 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 +31 0.344444454 0.1053839 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Other-relative White Male ? 0 +50 0.5555556 0.232114121 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 +52 0.5777778 0.1177015 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +18 0.2 0.117331058 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Never-married Transport-moving Own-child White Male United-States 0 +26 0.2888889 0.175929233 0.25 0 0 0.3030303 Private 7th-8th Never-married Other-service Unmarried Other Female ? 0 +57 0.6333333 0.212836891 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +63 0.7 0.1460701 0.625 0 0.399449021 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +29 0.322222233 0.1663179 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Male Mexico 0 +32 0.355555564 0.07551332 0.8125 0.07688077 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +34 0.377777785 0.178251579 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +43 0.477777779 0.06680452 0.5625 0 0 0.5858586 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +39 0.433333337 0.118667349 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +28 0.311111122 0.06750096 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +32 0.355555564 0.031448 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +28 0.311111122 0.200534791 0.9375 0 0 0.909090936 State-gov Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 +40 0.444444448 0.0890560746 0.625 0.04386044 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +25 0.2777778 0.127739862 0.8125 0 0 0.6060606 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 1 +54 0.6 0.1515008 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +48 0.533333361 0.100503467 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 +51 0.566666663 0.106760606 0.625 0 0 0.363636374 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +67 0.7444445 0.175929233 0.25 0 0 0.353535354 State-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 +17 0.188888893 0.208461612 0.375 0 0 0.24242425 Private 10th Never-married Sales Unmarried White Female United-States 0 +24 0.266666681 0.218654215 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Not-in-family White Male United-States 0 +25 0.2777778 0.180120632 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +68 0.75555557 0.154250175 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +54 0.6 0.0312526748 0.625 0 0 0.474747479 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 +32 0.355555564 0.07697691 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Own-child White Female United-States 0 +61 0.677777767 0.137299329 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Female United-States 0 +41 0.455555558 0.1305862 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +53 0.5888889 0.209650412 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +45 0.5 0.105150186 0.6875 0 0 0.323232323 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 +64 0.7111111 0.114444956 0.25 0 0 0.04040404 ? 7th-8th Widowed ? Not-in-family White Female United-States 0 +51 0.566666663 0.149938881 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +41 0.455555558 0.07200084 0.875 0.07298073 0 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +40 0.444444448 0.05255994 0.6875 0 0 0.656565666 Federal-gov Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 +27 0.3 0.2563203 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Other-relative White Male Mexico 0 +41 0.455555558 0.112551652 0.8125 0.03103031 0 0.353535354 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 +51 0.566666663 0.194945127 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.5049057 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.103805132 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +43 0.477777779 0.07080127 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +61 0.677777767 0.1219643 0.5625 0 0 0.2020202 Federal-gov HS-grad Divorced Adm-clerical Own-child Black Female United-States 0 +31 0.344444454 0.122742906 0.375 0 0 0.4040404 Private 10th Separated Transport-moving Unmarried White Male United-States 0 +34 0.377777785 0.068788074 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +43 0.477777779 0.1793784 0.5625 0 0.43663913 1 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +52 0.5777778 0.114879392 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.162014008 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 +37 0.411111116 0.125981927 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +60 0.6666667 0.262176 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 +47 0.5222222 0.121205896 0.625 0 0 0.25252524 Private Some-college Widowed Transport-moving Unmarried White Female Outlying-US(Guam-USVI-etc) 0 +21 0.233333334 0.133357808 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +34 0.377777785 0.231553748 0.8125 0.07688077 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.128704354 0.5625 0 0.3996786 0.5252525 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +40 0.444444448 0.09540549 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 +26 0.2888889 0.292250663 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Not-in-family White Male United-States 0 +48 0.533333361 0.140083045 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 +46 0.51111114 0.118491553 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +58 0.644444466 0.0577670336 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.1892834 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +90 1 0.2114804 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +38 0.422222227 0.267120421 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 1 +20 0.222222224 0.127434745 0.75 0 0 0.2020202 ? Assoc-acdm Never-married ? Not-in-family White Male United-States 0 +43 0.477777779 0.109858863 0.625 0 0 1 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 +17 0.188888893 0.09536575 0.4375 0 0 0.121212125 Private 11th Never-married Priv-house-serv Own-child White Female United-States 0 +36 0.4 0.09255778 0.5 0 0 0.454545468 Private 12th Never-married Transport-moving Not-in-family Asian-Pac-Islander Male ? 0 +36 0.4 0.0456171446 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Italy 0 +30 0.333333343 0.232720986 0.5625 0.03103031 0 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 +45 0.5 0.222324982 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +51 0.566666663 0.137617916 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +29 0.322222233 0.033875417 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.09918334 0.6875 0 0 0.656565666 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Own-child White Male United-States 0 +19 0.211111113 0.130840808 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 +56 0.622222245 0.294824243 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Sales Husband White Male United-States 0 +64 0.7111111 0.0229675267 0.625 0 0 0.04040404 ? Some-college Widowed ? Not-in-family White Male United-States 0 +62 0.6888889 0.12568894 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 +24 0.266666681 0.189236253 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +33 0.366666675 0.022305442 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 +43 0.477777779 0.11425031 0.8125 0 0 0.353535354 Private Bachelors Never-married Sales Unmarried Black Female United-States 1 +22 0.244444445 0.08415274 0.625 0 0 0.454545468 State-gov Some-college Never-married Other-service Own-child White Male United-States 0 +44 0.4888889 0.0965632945 0.625 0 0 0.5555556 Private Some-college Never-married Other-service Not-in-family Black Male United-States 0 +37 0.411111116 0.172169566 0.5625 0 0 0.5050505 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 +34 0.377777785 0.1038772 0.625 0 0 0.75757575 Self-emp-inc Some-college Never-married Sales Not-in-family White Male United-States 0 +43 0.477777779 0.1154694 0.6875 0 0 0.454545468 Private Assoc-voc Separated Sales Unmarried White Female United-States 0 +39 0.433333337 0.128998026 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +30 0.333333343 0.253933966 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +58 0.644444466 0.129861489 0.25 0 0 0.333333343 Private 7th-8th Never-married Handlers-cleaners Not-in-family White Female United-States 0 +31 0.344444454 0.174526259 0.625 0 0 0.1010101 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 +45 0.5 0.1577384 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +30 0.333333343 0.0994109958 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 +42 0.466666669 0.09917863 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 0 +50 0.5555556 0.118647814 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +25 0.2777778 0.118651181 0.6875 0 0 0.3030303 Local-gov Assoc-voc Never-married Protective-serv Own-child White Male United-States 0 +34 0.377777785 0.258738279 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +50 0.5555556 0.07251609 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +72 0.8 0.05565752 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Husband White Male United-States 0 +60 0.6666667 0.1116902 1 0 0 0.5555556 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +41 0.455555558 0.1935105 0.75 0.1502415 0 0.6060606 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 +71 0.788888931 0.0530650876 0.25 0 0 0.1010101 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +40 0.444444448 0.0224354342 0.9375 0 0.5369605 0.353535354 Self-emp-not-inc Prof-school Divorced Other-service Not-in-family White Female United-States 0 +22 0.244444445 0.2353114 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 +52 0.5777778 0.0792574957 0.8125 0 0 0.3838384 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +30 0.333333343 0.20939447 0.625 0 0 0.5555556 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 +36 0.4 0.126063436 0.5625 0 0 0.3030303 ? HS-grad Separated ? Not-in-family White Female United-States 0 +40 0.444444448 0.255888551 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.02348076 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Sales Husband Asian-Pac-Islander Male United-States 0 +44 0.4888889 0.1358674 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +38 0.422222227 0.1087509 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +46 0.51111114 0.125553563 0.9375 0 0 0.5050505 Private Prof-school Never-married Exec-managerial Not-in-family White Male United-States 1 +57 0.6333333 0.0417726077 0.9375 0 0 0.5555556 Federal-gov Prof-school Divorced Exec-managerial Not-in-family Black Male United-States 1 +39 0.433333337 0.0283180848 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +42 0.466666669 0.114655778 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 +43 0.477777779 0.229916379 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.134320289 0.625 0 0 0.171717167 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +44 0.4888889 0.0600604154 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.100326329 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child Asian-Pac-Islander Female South 0 +37 0.411111116 0.09474812 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 +20 0.222222224 0.0483516939 0.625 0 0 0.181818187 ? Some-college Never-married ? Own-child White Female United-States 0 +26 0.2888889 0.219594464 0.8125 0 0 0.8080808 State-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +35 0.3888889 0.08709138 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +28 0.311111122 0.115219526 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 +34 0.377777785 0.096707426 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female Japan 0 +17 0.188888893 0.115484893 0.375 0 0 0.2020202 ? 10th Never-married ? Own-child White Female United-States 0 +18 0.2 0.173758432 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +25 0.2777778 0.123166561 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +44 0.4888889 0.0466981679 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +61 0.677777767 0.450164855 0.125 0 0 0.4040404 Private 1st-4th Widowed Handlers-cleaners Not-in-family White Female United-States 0 +39 0.433333337 0.08949859 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +61 0.677777767 0.122057244 0.8125 0 0.4242424 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.11181885 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +22 0.244444445 0.08117303 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Own-child White Female United-States 0 +19 0.211111113 0.123615131 0.625 0 0 0.25252524 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 +45 0.5 0.0332039036 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 +20 0.222222224 0.105968527 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +37 0.411111116 0.143951833 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Asian-Pac-Islander Female Philippines 0 +26 0.2888889 0.0209758841 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +17 0.188888893 0.17254135 0.375 0 0 0.151515156 ? 10th Never-married ? Own-child White Female United-States 0 +26 0.2888889 0.124517664 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +58 0.644444466 0.136493117 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried White Female Dominican-Republic 0 +61 0.677777767 0.06843245 1 0 0 0.25252524 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 +64 0.7111111 0.0410451926 0.5625 0.0861408561 0 0.5050505 Private HS-grad Widowed Sales Not-in-family White Female France 1 +19 0.211111113 0.197069451 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Sales Other-relative White Female United-States 0 +36 0.4 0.09525125 0.8125 0 0 0.3030303 Private Bachelors Divorced Handlers-cleaners Not-in-family White Male United-States 0 +47 0.5222222 0.107353985 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 +62 0.6888889 0.171437427 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +36 0.4 0.0602867231 0.9375 0 0 0.4040404 State-gov Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 +38 0.422222227 0.16096127 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Never-married Sales Not-in-family White Male United-States 0 +54 0.6 0.1205263 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +31 0.344444454 0.137907535 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +26 0.2888889 0.19546847 0.625 0 0 0.4040404 Private Some-college Separated Farming-fishing Own-child White Male United-States 0 +50 0.5555556 0.0691147447 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +41 0.455555558 0.1966485 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Unmarried Asian-Pac-Islander Female Philippines 0 +52 0.5777778 0.118096866 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +28 0.311111122 0.0609865263 0.5625 0 0 0.232323229 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 +23 0.25555557 0.302485019 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Own-child White Female United-States 0 +46 0.51111114 0.0685132742 0.625 0.031370312 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +32 0.355555564 0.6611603 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried Black Male United-States 0 +59 0.655555546 0.09967569 0.5625 0 0 0.353535354 ? HS-grad Widowed ? Not-in-family White Female United-States 0 +30 0.333333343 0.13771759 0.625 0 0 0.363636374 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.2097447 0.875 0.07688077 0 0.3030303 Local-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 +31 0.344444454 0.127989739 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative Black Female ? 0 +36 0.4 0.146840617 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +31 0.344444454 0.0522891767 0.0625 0 0 0.24242425 State-gov Preschool Never-married Other-service Not-in-family White Male United-States 0 +52 0.5777778 0.0289512072 0.9375 0 0 0.7070707 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +29 0.322222233 0.278369784 0.625 0.03411034 0 0.7070707 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Mexico 0 +48 0.533333361 0.147392914 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male England 0 +30 0.333333343 0.22970961 0.875 0.1502415 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +58 0.644444466 0.1700129 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +20 0.222222224 0.234346226 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Protective-serv Own-child Black Male United-States 0 +19 0.211111113 0.160198838 0.625 0 0 0.0303030312 Private Some-college Never-married Other-service Own-child White Male United-States 0 +63 0.7 0.117751338 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +51 0.566666663 0.114558786 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 +53 0.5888889 0.316809058 0.75 0 0 0.4848485 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 +54 0.6 0.0506733656 0.5625 0.05178052 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.0241489056 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 +26 0.2888889 0.5027477 0.5625 0 0 0.4848485 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 +47 0.5222222 0.174107313 0.625 0 0 0.5252525 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 0 +44 0.4888889 0.1185845 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +80 0.8888889 0.0180945043 0.25 0 0 0.2020202 Self-emp-not-inc 7th-8th Never-married Farming-fishing Unmarried White Male United-States 0 +55 0.6111111 0.07053523 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +43 0.477777779 0.233259141 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.27107203 0.8125 0 0 0.3030303 Private Bachelors Married-spouse-absent Transport-moving Unmarried White Male Columbia 0 +27 0.3 0.10310331 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Own-child Asian-Pac-Islander Male United-States 0 +42 0.466666669 0.1185845 0.6875 0.1502415 0 0.5555556 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.3038038 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +36 0.4 0.154598385 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +32 0.355555564 0.07168899 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +58 0.644444466 0.198229954 0.625 0 0 0.5555556 Local-gov Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 0 +63 0.7 0.0457350127 0.3125 0 0 0.4040404 Private 9th Separated Farming-fishing Not-in-family Black Male United-States 0 +49 0.544444442 0.09003068 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +36 0.4 0.169548839 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +46 0.51111114 0.04909797 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +47 0.5222222 0.104845069 0.875 1 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +39 0.433333337 0.139098346 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 +33 0.366666675 0.0487221368 0.9375 0 0 0.656565666 Private Prof-school Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 +43 0.477777779 0.0233312342 0.5625 0 0.4331956 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband Other Male United-States 1 +30 0.333333343 0.159319863 0.625 0 0 0.686868668 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +39 0.433333337 0.0294348039 0.6875 0 0 0.373737365 Local-gov Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 +44 0.4888889 0.2258011 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +27 0.3 0.133492514 0.8125 0 0 0.454545468 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 +80 0.8888889 0.189780459 0.75 0 0 0.04040404 ? Assoc-acdm Married-civ-spouse ? Husband White Male United-States 0 +31 0.344444454 0.1081656 0.75 0 0 0.0303030312 Private Assoc-acdm Never-married Prof-specialty Own-child White Male United-States 0 +34 0.377777785 0.1561428 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male El-Salvador 0 +28 0.311111122 0.126739651 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Transport-moving Own-child White Male United-States 0 +55 0.6111111 0.0841918141 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +36 0.4 0.112149552 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 +42 0.466666669 0.271008044 0.625 0.07688077 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 1 +67 0.7444445 0.13748388 0.8125 0 0 0.1010101 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +53 0.5888889 0.148706988 0.625 0 0 0.6060606 Self-emp-inc Some-college Widowed Sales Not-in-family White Female United-States 0 +43 0.477777779 0.171176091 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +29 0.322222233 0.102687739 0.8125 0 0 0.424242437 Local-gov Bachelors Never-married Tech-support Not-in-family White Female United-States 0 +19 0.211111113 0.150648788 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 +51 0.566666663 0.08100599 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 +21 0.233333334 0.205159947 0.6875 0 0 0.989899 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Own-child White Male United-States 0 +54 0.6 0.01623757 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Not-in-family White Female United-States 0 +42 0.466666669 0.0219208542 0.9375 0.07430074 0 0.4040404 Self-emp-not-inc Prof-school Divorced Prof-specialty Unmarried White Male United-States 1 +41 0.455555558 0.06323478 0.625 0 0 0.4848485 Private Some-college Divorced Sales Unmarried White Female United-States 0 +28 0.311111122 0.141957492 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +31 0.344444454 0.128830984 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Handlers-cleaners Unmarried White Female United-States 0 +82 0.9111111 0.0481159575 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +23 0.25555557 0.222650975 0.8125 0 0 0.161616161 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +40 0.444444448 0.09337478 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +35 0.3888889 0.07561368 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +24 0.266666681 0.138657182 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Unmarried White Male United-States 0 +21 0.233333334 0.151302785 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 +27 0.3 0.121746749 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +29 0.322222233 0.336723477 0.6875 0 0 0.4040404 ? Assoc-voc Never-married ? Unmarried White Female United-States 0 +40 0.444444448 0.0725814253 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +17 0.188888893 0.144666448 0.5 0 0 0.25252524 Private 12th Never-married Adm-clerical Own-child White Female United-States 0 +27 0.3 0.142137334 0.125 0 0 0.4040404 Private 1st-4th Never-married Craft-repair Not-in-family White Male Mexico 0 +34 0.377777785 0.140332937 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +18 0.2 0.105928786 0.375 0 0 0.151515156 Private 10th Never-married Other-service Other-relative Black Male United-States 0 +39 0.433333337 0.0511152074 0.8125 0 0 0.4040404 Private Bachelors Divorced Tech-support Unmarried White Female United-States 0 +34 0.377777785 0.119670242 0.625 0 0 0.656565666 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +44 0.4888889 0.122832485 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +18 0.2 0.1350605 0.4375 0 0 0.25252524 ? 11th Never-married ? Own-child White Female United-States 0 +39 0.433333337 0.117358 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +28 0.311111122 0.064367 0.125 0 0 0.353535354 Private 1st-4th Married-spouse-absent Other-service Own-child Other Female Dominican-Republic 0 +30 0.333333343 0.02040136 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 +60 0.6666667 0.162288815 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Other-relative White Female United-States 0 +58 0.644444466 0.123802371 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +49 0.544444442 0.06354259 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 +61 0.677777767 0.100071736 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +27 0.3 0.06980107 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 +59 0.655555546 0.0562684163 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Divorced Tech-support Not-in-family White Male United-States 0 +52 0.5777778 0.0512768552 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female United-States 1 +42 0.466666669 0.1767368 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +27 0.3 0.133552462 0.625 0 0 0.343434334 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +41 0.455555558 0.0979595259 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +35 0.3888889 0.184250742 0.625 0 0 0.3030303 ? Some-college Never-married ? Not-in-family Black Male United-States 0 +50 0.5555556 0.07913761 0.8125 0 0 0.24242425 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 +36 0.4 0.08680243 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.134503484 0.5625 0 0 0.454545468 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 +38 0.422222227 0.04404242 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 +46 0.51111114 0.08664685 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 +59 0.655555546 0.0360213 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +55 0.6111111 0.0621099845 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +49 0.544444442 0.0531142578 0.875 0 0.0741506 0.2020202 Local-gov Masters Widowed Prof-specialty Unmarried White Female United-States 0 +59 0.655555546 0.12628907 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +38 0.422222227 0.163049236 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +22 0.244444445 0.0281786621 0.625 0 0 0.25252524 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 +28 0.311111122 0.196250439 0.5 0 0 0.4040404 Private 12th Never-married Sales Unmarried Black Female United-States 0 +47 0.5222222 0.100353271 0.8125 0 0.5544077 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +59 0.655555546 0.107097372 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 +37 0.411111116 0.1825366 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 +33 0.366666675 0.134064347 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 +34 0.377777785 0.110648245 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male Portugal 0 +35 0.3888889 0.07877659 0.875 0 0.4331956 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.067389816 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Male United-States 0 +18 0.2 0.123811804 0.5 0 0 0.3030303 Private 12th Never-married Other-service Own-child White Male United-States 0 +48 0.533333361 0.211439312 0.75 0 0 0.3030303 Private Assoc-acdm Married-civ-spouse Prof-specialty Wife White Female United-States 1 +48 0.533333361 0.2558643 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male Cuba 1 +70 0.7777778 0.06236458 0.625 0 0 0.25252524 ? Some-college Widowed ? Not-in-family White Female United-States 0 +27 0.3 0.127821356 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.1335821 0.875 0 0 0.373737365 Private Masters Widowed Prof-specialty Unmarried Black Female United-States 0 +32 0.355555564 0.08584265 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 +62 0.6888889 0.0212681983 0.5625 0 0 0.181818187 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +18 0.2 0.060773015 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Own-child White Male United-States 0 +50 0.5555556 0.202750042 0.8125 0 0 0.4040404 Private Bachelors Separated Sales Not-in-family White Male United-States 1 +38 0.422222227 0.118361562 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 +18 0.2 0.147429287 0.3125 0 0 0.353535354 Private 9th Never-married Other-service Own-child Black Male United-States 0 +46 0.51111114 0.07921103 0.3125 0 0 0.353535354 Private 9th Divorced Sales Not-in-family White Male United-States 0 +26 0.2888889 0.1041089 0.625 0 0 0.454545468 Private Some-college Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male United-States 1 +44 0.4888889 0.153604254 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife White Female Dominican-Republic 0 +32 0.355555564 0.117193654 0.625 0 0 0.6060606 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 +25 0.2777778 0.0611246 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 +55 0.6111111 0.0343556479 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +55 0.6111111 0.07637747 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Unmarried White Male United-States 0 +25 0.2777778 0.0504995957 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +40 0.444444448 0.0684263855 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +29 0.322222233 0.153798908 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 +60 0.6666667 0.121517748 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +45 0.5 0.0299648754 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +43 0.477777779 0.18689774 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +24 0.266666681 0.06941716 0.5625 0 0 0.5555556 Private HS-grad Never-married Sales Own-child White Female United-States 0 +34 0.377777785 0.152806118 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 +47 0.5222222 0.222546577 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 +24 0.266666681 0.125610813 0.5625 0 0 0.323232323 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +47 0.5222222 0.138554126 0.625 0 0 0.3838384 State-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 +18 0.2 0.146657422 0.4375 0 0 0.4040404 Private 11th Never-married Sales Own-child White Female United-States 0 +50 0.5555556 0.03540434 0.625 0 0.3409091 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.1616173 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative White Male United-States 0 +49 0.544444442 0.235727638 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +41 0.455555558 0.0791975558 0.5625 0 0.3409091 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +68 0.75555557 0.08223452 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +62 0.6888889 0.0180891156 0.25 0 0 0.353535354 Self-emp-not-inc 7th-8th Widowed Farming-fishing Other-relative White Female United-States 0 +25 0.2777778 0.129534826 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +24 0.266666681 0.05933502 0.625 0 0 0.24242425 Private Some-college Never-married Machine-op-inspct Not-in-family White Female Mexico 0 +44 0.4888889 0.09703409 0.8125 0 0 0.121212125 Private Bachelors Divorced Adm-clerical Not-in-family White Male ? 0 +32 0.355555564 0.0836442262 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Farming-fishing Husband Black Male United-States 0 +49 0.544444442 0.08330342 0.875 0 0 0.434343427 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +68 0.75555557 0.09809221 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 +25 0.2777778 0.0879050046 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Own-child White Female Peru 0 +47 0.5222222 0.132711887 0.8125 0 0 0.5050505 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +35 0.3888889 0.127359986 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +37 0.411111116 0.133926272 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 +57 0.6333333 0.21416308 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +37 0.411111116 0.06945555 0.8125 0 0.4242424 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 +34 0.377777785 0.07515904 0.375 0 0 0.4040404 Private 10th Never-married Other-service Unmarried Black Female Jamaica 0 +46 0.51111114 0.1804749 0.6875 0 0 0.363636374 Local-gov Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 +21 0.233333334 0.043038182 0.4375 0 0 0.4040404 Private 11th Never-married Adm-clerical Other-relative White Female United-States 0 +26 0.2888889 0.319002777 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 +45 0.5 0.1265578 0.5625 0 0.518365443 0.444444448 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 1 +17 0.188888893 0.016225446 0.5625 0 0 0.353535354 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 +36 0.4 0.06919152 0.75 0 0 0.7070707 Self-emp-inc Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 +33 0.366666675 0.0617402121 0.5 0 0 0.4040404 Private 12th Divorced Exec-managerial Not-in-family White Male United-States 0 +27 0.3 0.145397916 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Male United-States 0 +32 0.355555564 0.102450654 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +24 0.266666681 0.11826323 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 +37 0.411111116 0.156673551 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 +53 0.5888889 0.1545526 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.09908366 0.625 0.143441439 0 0.4040404 Private Some-college Divorced Adm-clerical Own-child White Male United-States 1 +43 0.477777779 0.1086007 0.5625 0 0 0.454545468 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +29 0.322222233 0.241208866 0.5625 0 0 0.5252525 Private HS-grad Never-married Other-service Other-relative Black Female United-States 0 +47 0.5222222 0.149880961 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 +37 0.411111116 0.227870181 0.875 0 0 0.6060606 Self-emp-not-inc Masters Never-married Exec-managerial Not-in-family White Male United-States 0 +43 0.477777779 0.04177665 0.9375 1 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.177736327 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family Black Female United-States 0 +50 0.5555556 0.209317014 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +25 0.2777778 0.0661107749 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 +40 0.444444448 0.1746522 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +39 0.433333337 0.241632521 0.6875 0.07688077 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +41 0.455555558 0.0200457331 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +32 0.355555564 0.136544973 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Own-child White Male United-States 0 +19 0.211111113 0.019391058 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +26 0.2888889 0.0358380973 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 +30 0.333333343 0.113840796 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +34 0.377777785 0.08567022 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +41 0.455555558 0.142608136 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female Mexico 0 +42 0.466666669 0.0852789 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family Other Male Iran 0 +45 0.5 0.174757272 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 +22 0.244444445 0.153842688 0.625 0 0 0.353535354 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 +25 0.2777778 0.0793605447 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +22 0.244444445 0.03853695 0.625 0 0 0.2020202 Federal-gov Some-college Never-married Adm-clerical Own-child Black Male United-States 0 +46 0.51111114 0.1689366 0.9375 0.1502415 0 0.4040404 State-gov Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.05965091 0.625 0 0 0.454545468 Self-emp-inc Some-college Divorced Farming-fishing Not-in-family White Male United-States 0 +45 0.5 0.116401576 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +19 0.211111113 0.169447139 0.625 0 0 0.141414136 Private Some-college Never-married Other-service Own-child White Male United-States 0 +31 0.344444454 0.07974581 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +30 0.333333343 0.1201471 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 +40 0.444444448 0.115084141 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Married-civ-spouse Farming-fishing Husband White Male United-States 1 +60 0.6666667 0.1811498 0.625 0 0 0.121212125 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 +52 0.5777778 0.0605851 0.5 0 0 0.4040404 ? 12th Married-civ-spouse ? Wife Black Female United-States 1 +22 0.244444445 0.137329638 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 +25 0.2777778 0.159671456 0.625 0 0 0.3838384 Private Some-college Divorced Other-service Own-child Black Male United-States 0 +51 0.566666663 0.07303471 0.875 0 0 0.8080808 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +32 0.355555564 0.06278217 0.75 0 0 0.6262626 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +51 0.566666663 0.155741379 0.8125 0 0 0.25252524 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +42 0.466666669 0.260102183 0.625 0 0 0.5050505 Private Some-college Divorced Sales Not-in-family White Male United-States 1 +39 0.433333337 0.08647644 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +24 0.266666681 0.150545061 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +52 0.5777778 0.1405195 0.5625 0 0.3996786 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +58 0.644444466 0.0659855 0.125 0 0 0.4040404 ? 1st-4th Married-spouse-absent ? Unmarried Amer-Indian-Eskimo Male United-States 0 +43 0.477777779 0.117393695 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +31 0.344444454 0.04056631 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +28 0.311111122 0.0445172638 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +31 0.344444454 0.08759788 0.875 0.07688077 0 0.6060606 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +61 0.677777767 0.121063106 0.5625 0 0.4708448 0.2020202 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +26 0.2888889 0.129333436 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 +46 0.51111114 0.030503029 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 +62 0.6888889 0.120403722 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 +50 0.5555556 0.0670005158 0.875 0 0 0.353535354 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 +18 0.2 0.0282702632 0.4375 0 0 0.05050505 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 +23 0.25555557 0.109266154 0.8125 0 0 0.4848485 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +21 0.233333334 0.142767757 0.625 0 0.404499531 0.282828271 Private Some-college Never-married Sales Own-child White Female United-States 0 +46 0.51111114 0.142268 0.75 0 0 0.363636374 Private Assoc-acdm Married-civ-spouse Transport-moving Husband Other Male United-States 0 +38 0.422222227 0.0224940311 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 +53 0.5888889 0.08138923 0.5 0 0 0.4040404 Private 12th Divorced Farming-fishing Own-child White Male United-States 0 +53 0.5888889 0.0244674869 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.09409479 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +26 0.2888889 0.0726252049 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Unmarried White Male United-States 0 +46 0.51111114 0.09444233 0.875 0.0861408561 0 0.5555556 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 1 +44 0.4888889 0.137240067 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +36 0.4 0.0772672 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +20 0.222222224 0.231961235 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +35 0.3888889 0.131686762 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Tech-support Husband White Male Mexico 0 +40 0.444444448 0.0213018749 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 +70 0.7777778 0.117216557 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +57 0.6333333 0.15280813 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 +40 0.444444448 0.3815822 0.0625 0 0.3838384 0.4040404 Private Preschool Married-civ-spouse Other-service Husband White Male Mexico 0 +18 0.2 0.024356354 0.4375 0 0 0.05050505 Private 11th Never-married Craft-repair Own-child White Male United-States 0 +45 0.5 0.02120152 0.8125 0.0282902829 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +52 0.5777778 0.198686615 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +24 0.266666681 0.07307512 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 +42 0.466666669 0.108797371 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband Black Male United-States 0 +28 0.311111122 0.223781154 0.5625 0 0 0.454545468 Local-gov HS-grad Separated Transport-moving Own-child White Male United-States 0 +32 0.355555564 0.180606246 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Tech-support Unmarried White Female United-States 0 +56 0.622222245 0.214080915 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Adm-clerical Not-in-family White Male United-States 0 +44 0.4888889 0.03504265 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Vietnam 0 +20 0.222222224 0.123960651 0.625 0 0 0.3030303 Private Some-college Never-married Sales Unmarried Black Female United-States 0 +32 0.355555564 0.1391583 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +59 0.655555546 0.103029221 0.625 0.0332503319 0 0.4040404 Private Some-college Separated Adm-clerical Other-relative White Male United-States 0 +21 0.233333334 0.143472955 0.5625 0.0217602178 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative Black Male United-States 0 +32 0.355555564 0.2113787 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +49 0.544444442 0.04471259 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +22 0.244444445 0.1387077 0.8125 0.010550105 0 0.3030303 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 +51 0.566666663 0.175750747 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.0407939628 0.5625 0.03411034 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.225679174 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +34 0.377777785 0.223024786 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Unmarried Black Male United-States 0 +53 0.5888889 0.105483584 0.5 0 0 0.4040404 Private 12th Divorced Transport-moving Not-in-family White Female United-States 0 +44 0.4888889 0.126918152 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +60 0.6666667 0.153207541 0.625 0 0 0.4040404 Private Some-college Widowed Protective-serv Not-in-family Black Female United-States 0 +55 0.6111111 0.123647459 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.034343522 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +59 0.655555546 0.258802921 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 +26 0.2888889 0.252786249 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Male Philippines 0 +30 0.333333343 0.118818216 0.6875 0.07298073 0 0.161616161 Private Assoc-voc Married-civ-spouse Prof-specialty Own-child White Female United-States 1 +49 0.544444442 0.0630691 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 +45 0.5 0.0204006862 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.08415814 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Sales Own-child White Female United-States 0 +37 0.411111116 0.08531998 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 +21 0.233333334 0.09831179 0.5 0 0 0.4040404 Private 12th Never-married Farming-fishing Not-in-family White Male United-States 0 +36 0.4 0.232848957 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 +18 0.2 0.0656521 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Own-child White Female United-States 0 +37 0.411111116 0.121466555 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +19 0.211111113 0.112538859 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 +65 0.722222269 0.129874289 0.25 0 0 0.25252524 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 +30 0.333333343 0.21468845 0.6875 0 0 0.353535354 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female Germany 0 +27 0.3 0.0994392857 0.875 0 0 0.4040404 ? Masters Never-married ? Not-in-family Other Female Japan 0 +59 0.655555546 0.197999611 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 +32 0.355555564 0.154620618 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 1 +25 0.2777778 0.16330786 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +40 0.444444448 0.07480746 0.8125 0 0 0.8080808 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +21 0.233333334 0.1048673 0.3125 0 0 0.424242437 ? 9th Never-married ? Own-child White Male United-States 0 +49 0.544444442 0.07176779 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 1 +49 0.544444442 0.0160139557 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 +51 0.566666663 0.0295742266 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried Black Female United-States 0 +48 0.533333361 0.07126534 0.3125 0 0 0.4040404 Private 9th Widowed Transport-moving Unmarried White Male United-States 1 +42 0.466666669 0.1144975 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +53 0.5888889 0.09522969 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +29 0.322222233 0.16261211 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +21 0.233333334 0.05278759 0.5625 0 0 0.24242425 ? HS-grad Never-married ? Other-relative Asian-Pac-Islander Female United-States 0 +54 0.6 0.10705696 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +66 0.733333349 0.0777918845 0.8125 1 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 +34 0.377777785 0.1834782 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 +39 0.433333337 0.020562334 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +62 0.6888889 0.177391469 0.6875 0 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Husband White Male Canada 0 +30 0.333333343 0.128125116 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +27 0.3 0.08490576 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +25 0.2777778 0.2634813 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 +26 0.2888889 0.144182861 0.5625 0 0 0.4040404 Private HS-grad Separated Farming-fishing Not-in-family White Male United-States 0 +45 0.5 0.115087509 0.5625 0.07298073 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +55 0.6111111 0.08014589 0.625 0 0 0.1010101 Private Some-college Separated Exec-managerial Unmarried White Female United-States 0 +26 0.2888889 0.165608659 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 +45 0.5 0.117729791 0.8125 0 0 0.565656543 Private Bachelors Separated Prof-specialty Unmarried White Female Germany 0 +61 0.677777767 0.103325576 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 1 +34 0.377777785 0.222469121 0.25 0 0 0.4040404 ? 7th-8th Separated ? Unmarried Black Female United-States 0 +26 0.2888889 0.25949803 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 0 +44 0.4888889 0.0258866251 0.875 0 0 0.4040404 Federal-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +45 0.5 0.07521966 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +55 0.6111111 0.113797694 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +20 0.222222224 0.0580202825 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Other-relative Asian-Pac-Islander Male United-States 0 +48 0.533333361 0.06724232 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 +33 0.366666675 0.177517429 0.5625 0 0 0.6060606 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +44 0.4888889 0.07983808 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +32 0.355555564 0.141234115 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male Canada 0 +54 0.6 0.0830966458 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +40 0.444444448 0.09242577 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +29 0.322222233 0.0803924054 0.5625 0 0 0.1010101 Private HS-grad Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female China 1 +56 0.622222245 0.09035667 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Adm-clerical Husband Black Male United-States 0 +47 0.5222222 0.08158119 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.09945074 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 +46 0.51111114 0.111226141 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +24 0.266666681 0.2101542 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Exec-managerial Own-child White Male United-States 0 +37 0.411111116 0.183841243 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 +49 0.544444442 0.174662977 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 +44 0.4888889 0.189760938 0.625 0.135501355 0 0.5050505 Federal-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 1 +21 0.233333334 0.08025567 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +55 0.6111111 0.111726575 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.09165121 0.8125 0 0 0.323232323 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +50 0.5555556 0.12626414 0.4375 0 0 0.4040404 Private 11th Divorced Sales Not-in-family White Female United-States 0 +44 0.4888889 0.22129716 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 +48 0.533333361 0.236033425 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Other-relative Asian-Pac-Islander Male Cambodia 1 +38 0.422222227 0.07350484 0.875 0 0 0.7070707 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +48 0.533333361 0.0739635155 0.9375 0 0.453856736 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +39 0.433333337 0.05835705 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +52 0.5777778 0.104075223 0.5625 0 0 0.444444448 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 +63 0.7 0.0309233163 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Other-relative White Female United-States 0 +48 0.533333361 0.117915682 0.5625 0 0.518365443 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 1 +37 0.411111116 0.227676883 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +26 0.2888889 0.107067063 0.875 0 0 0.4040404 State-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 0 +50 0.5555556 0.0817947 0.4375 0 0.5610652 0.4040404 Self-emp-inc 11th Never-married Exec-managerial Other-relative White Male United-States 1 +47 0.5222222 0.1632587 0.9375 0.1502415 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.08079989 0.5625 0 0 0.151515156 Private HS-grad Never-married Craft-repair Other-relative White Female United-States 0 +34 0.377777785 0.130223855 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Female Germany 0 +29 0.322222233 0.03068219 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +33 0.366666675 0.168192342 0.5625 0 0 0.454545468 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 +53 0.5888889 0.0397284329 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 0 +24 0.266666681 0.307378918 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.07906015 0.625 0 0 0.656565666 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 +50 0.5555556 0.162269279 0.75 0 0.323232323 0.05050505 Self-emp-not-inc Assoc-acdm Never-married Sales Not-in-family White Female United-States 0 +31 0.344444454 0.15251717 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +22 0.244444445 0.2453969 0.6875 0 0 0.25252524 Private Assoc-voc Never-married Sales Not-in-family Black Female United-States 0 +42 0.466666669 0.0684263855 0.8125 0 0 0.424242437 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 +23 0.25555557 0.180150941 0.5 0 0 0.25252524 Private 12th Never-married Sales Own-child White Female United-States 0 +22 0.244444445 0.125849247 0.4375 0 0 0.5050505 Private 11th Divorced Sales Own-child White Male United-States 0 +65 0.722222269 0.117601141 0.1875 0 0 0.1010101 Private 5th-6th Widowed Machine-op-inspct Not-in-family White Female Italy 0 +34 0.377777785 0.07748341 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.09615783 0.625 0.010550105 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +38 0.422222227 0.0401830673 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +45 0.5 0.0334039442 0.625 0 0 0.8080808 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 +19 0.211111113 0.08586959 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 +46 0.51111114 0.105026253 0.8125 0 0.3677686 0.08080808 Private Bachelors Never-married Machine-op-inspct Not-in-family White Female United-States 0 +23 0.25555557 0.08235441 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +37 0.411111116 0.09683473 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 +59 0.655555546 0.0615502745 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 +36 0.4 0.0915158242 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +35 0.3888889 0.139466092 0.8125 0.105201051 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 +51 0.566666663 0.116179988 0.625 0 0 0.121212125 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 +42 0.466666669 0.127941921 0.8125 0 0 0.3030303 Local-gov Bachelors Divorced Prof-specialty Unmarried Black Female United-States 0 +35 0.3888889 0.07204597 0.875 0 0 0.4040404 Private Masters Never-married Sales Not-in-family White Female United-States 0 +20 0.222222224 0.134809941 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +25 0.2777778 0.100991778 0.5625 0.04101041 0 0.6060606 Private HS-grad Never-married Other-service Other-relative Asian-Pac-Islander Male ? 0 +41 0.455555558 0.102199428 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family White Male United-States 0 +40 0.444444448 0.04570066 0.5625 0 0 0.353535354 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +36 0.4 0.0365251 0.75 0 0 0.373737365 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 0 +34 0.377777785 0.103805132 0.875 0 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 +44 0.4888889 0.105891071 0.8125 0 0 0.424242437 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 +31 0.344444454 0.25705108 0.8125 0 0 0.4040404 Federal-gov Bachelors Separated Prof-specialty Not-in-family White Male United-States 0 +41 0.455555558 0.108294241 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +43 0.477777779 0.08997343 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +43 0.477777779 0.114655778 0.875 0 0 0.4040404 Private Masters Never-married Tech-support Not-in-family White Female United-States 0 +58 0.644444466 0.168522373 0.375 0.05178052 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 +19 0.211111113 0.08645691 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 +43 0.477777779 0.110078432 0.8125 0 0 0.5555556 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 +50 0.5555556 0.13180396 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 +44 0.4888889 0.0936152339 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.07975928 0.5625 0 0 0.3838384 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 +52 0.5777778 0.124878012 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.190663472 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 +18 0.2 0.08059177 0.5 0 0 0.121212125 Private 12th Never-married Adm-clerical Own-child White Female United-States 0 +29 0.322222233 0.10333097 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +19 0.211111113 0.137985662 0.5625 0 0 0.363636374 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +34 0.377777785 0.1484214 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 +23 0.25555557 0.136780038 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 0 +64 0.7111111 0.07029073 0.625 0 0 0.656565666 State-gov Some-college Separated Adm-clerical Not-in-family White Female United-States 0 +68 0.75555557 0.184613109 0.375 0 0 0.2020202 Private 10th Divorced Transport-moving Not-in-family White Male United-States 0 +42 0.466666669 0.306830645 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 +41 0.455555558 0.07562647 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +41 0.455555558 0.0434470139 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 +22 0.244444445 0.0164308734 0.625 0 0 0.2020202 State-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +67 0.7444445 0.1229746 0.625 0.200512 0 0.2020202 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.067804046 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 1 +25 0.2777778 0.119905978 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +49 0.544444442 0.0767243356 0.5625 0 0 0.6060606 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 +28 0.311111122 0.03717304 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Handlers-cleaners Not-in-family White Male United-States 0 +51 0.566666663 0.150336936 1 0.1502415 0 0.4040404 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Vietnam 1 +23 0.25555557 0.109483704 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Female China 0 +19 0.211111113 0.466803849 0.5 0 0 0.151515156 Private 12th Never-married Other-service Own-child White Female United-States 0 +72 0.8 0.06524327 0.1875 0 0 0.4040404 ? 5th-6th Widowed ? Not-in-family White Female United-States 0 +33 0.366666675 0.172668651 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 +53 0.5888889 0.363617033 0.625 0 0 0.2020202 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 +35 0.3888889 0.162424862 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 +31 0.344444454 0.191549838 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 +18 0.2 0.121262476 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 +45 0.5 0.120169327 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Handlers-cleaners Not-in-family White Female United-States 0 +28 0.311111122 0.118346743 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Not-in-family White Female ? 0 +22 0.244444445 0.110981643 0.1875 0 0 0.4040404 Local-gov 5th-6th Never-married Handlers-cleaners Other-relative White Male Guatemala 1 +55 0.6111111 0.119146228 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Male United-States 0 +45 0.5 0.178551972 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 +22 0.244444445 0.130052775 0.5625 0 0 0.373737365 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +37 0.411111116 0.12528348 0.5625 0 0.3838384 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +28 0.311111122 0.118045 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Own-child White Male United-States 0 +19 0.211111113 0.0740403 0.4375 0 0 0.353535354 Private 11th Never-married Sales Own-child Black Female United-States 0 +37 0.411111116 0.109674312 0.5625 0 0.43663913 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.11981909 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.1221603 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +40 0.444444448 0.047581844 0.0625 0 0 0.2020202 Private Preschool Never-married Other-service Not-in-family White Female United-States 0 +51 0.566666663 0.0863956138 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +56 0.622222245 0.07188162 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.0824056 0.625 0 0 0.353535354 Private Some-college Never-married Tech-support Own-child White Female United-States 0 +40 0.444444448 0.119825155 0.6875 0.07688077 0 0.444444448 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.171446189 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Unmarried Black Female Jamaica 0 +47 0.5222222 0.06890797 0.9375 0 0.5544077 0.454545468 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +44 0.4888889 0.02229736 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 +30 0.333333343 0.145106941 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Other Male ? 0 +44 0.4888889 0.133305266 0.625 0 0 0.4040404 Local-gov Some-college Divorced Other-service Unmarried White Female United-States 0 +41 0.455555558 0.138841718 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 +47 0.5222222 0.0793753639 0.75 0 0 0.444444448 Private Assoc-acdm Divorced Sales Own-child White Male United-States 0 +26 0.2888889 0.217581272 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Germany 1 +34 0.377777785 0.0608976223 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family Black Male United-States 0 +47 0.5222222 0.198634073 0.9375 1 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 +36 0.4 0.08592481 0.5625 0 0 0.3838384 Private HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 +21 0.233333334 0.121364176 0.6875 0 0 0.464646459 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 +45 0.5 0.155595228 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Protective-serv Not-in-family White Male United-States 0 +33 0.366666675 0.239788383 0.5625 0 0 0.353535354 Private HS-grad Separated Craft-repair Not-in-family Amer-Indian-Eskimo Male Hong 0 +33 0.366666675 0.1334063 0.5625 0 0 0.656565666 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 +58 0.644444466 0.06677488 0.5625 0 0 0.1010101 Self-emp-not-inc HS-grad Divorced Farming-fishing Unmarried White Female United-States 0 +31 0.344444454 0.126790166 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 1 +32 0.355555564 0.07847215 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 +44 0.4888889 0.0258866251 0.8125 0 0 0.4040404 Federal-gov Bachelors Widowed Exec-managerial Unmarried White Female United-States 1 +24 0.266666681 0.08653369 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +35 0.3888889 0.0618567355 0.8125 0.07688077 0 0.2020202 Private Bachelors Married-civ-spouse Other-service Husband Amer-Indian-Eskimo Male United-States 1 +43 0.477777779 0.2760966 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +49 0.544444442 0.124631494 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +37 0.411111116 0.06999707 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Wife White Female United-States 0 +42 0.466666669 0.0229250938 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Never-married Farming-fishing Own-child White Male United-States 0 +31 0.344444454 0.169501022 0.625 0 0.3409091 0.5555556 Private Some-college Married-civ-spouse Other-service Husband Asian-Pac-Islander Male ? 1 +19 0.211111113 0.03848913 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Female United-States 0 +41 0.455555558 0.122656018 1 0 0 0.4040404 Private Doctorate Never-married Machine-op-inspct Not-in-family White Female United-States 1 +51 0.566666663 0.143662214 0.5625 0 0 0.3030303 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +51 0.566666663 0.01937422 0.9375 0 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +63 0.7 0.0254542157 0.375 0 0 0.3131313 Private 10th Widowed Other-service Not-in-family White Female United-States 0 +39 0.433333337 0.156284243 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 +30 0.333333343 0.0226832945 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +62 0.6888889 0.107703552 0.625 0 0 0.161616161 Without-pay Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 +27 0.3 0.11905463 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative Other Male Nicaragua 0 +32 0.355555564 0.175761521 0.4375 0 0.4687787 0.3030303 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 +37 0.411111116 0.121466555 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 +47 0.5222222 0.218757942 0.875 0 0.4331956 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +31 0.344444454 0.123796314 0.875 0 0.43663913 0.434343427 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.13755931 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 +37 0.411111116 0.168195039 0.6875 0 0 0.323232323 Private Assoc-voc Married-spouse-absent Sales Unmarried Black Female United-States 0 +60 0.6666667 0.08559546 0.5625 0 0.4687787 0.343434334 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 +42 0.466666669 0.135713831 0.625 0 0 0.727272749 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +38 0.422222227 0.301302969 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +24 0.266666681 0.138753489 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Prof-specialty Own-child Black Male United-States 0 +34 0.377777785 0.192644328 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +20 0.222222224 0.06728003 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 +29 0.322222233 0.11419373 0.625 0 0 0.4848485 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 +90 1 0.211320773 0.5625 0 0 0.25252524 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +55 0.6111111 0.0600671545 0.5 0 0 0.4040404 Private 12th Divorced Machine-op-inspct Not-in-family White Female Italy 0 +36 0.4 0.1738406 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 +49 0.544444442 0.172065169 0.625 0 0 0.6060606 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +50 0.5555556 0.026129771 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +17 0.188888893 0.210080117 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Own-child White Male United-States 0 +54 0.6 0.115796745 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +26 0.2888889 0.110788338 0.8125 0 0 0.1010101 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 +44 0.4888889 0.200707212 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Exec-managerial Not-in-family Asian-Pac-Islander Female United-States 0 +28 0.311111122 0.322161645 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 +54 0.6 0.023460554 1 0 0 0.6060606 Local-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 +21 0.233333334 0.0456683338 0.3125 0 0 0.2020202 Private 9th Never-married Machine-op-inspct Own-child Black Male United-States 0 +24 0.266666681 0.02328274 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Transport-moving Not-in-family White Male United-States 0 +31 0.344444454 0.0317578241 0.5625 0 0 0.565656543 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +59 0.655555546 0.08123971 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family Black Female United-States 0 +41 0.455555558 0.214214951 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +29 0.322222233 0.245141625 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +50 0.5555556 0.06251141 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 +32 0.355555564 0.0226832945 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +42 0.466666669 0.0445327535 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Female United-States 0 +47 0.5222222 0.108084776 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 +44 0.4888889 0.107738577 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +49 0.544444442 0.163660124 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Columbia 0 +61 0.677777767 0.156744272 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +65 0.722222269 0.0694771 0.25 0 0.323921025 0.4040404 Local-gov 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 0 +45 0.5 0.109238535 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 +59 0.655555546 0.13968499 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 +30 0.333333343 0.118995361 0.5625 0 0 0.4040404 Never-worked HS-grad Married-civ-spouse ? Wife Black Female United-States 0 +34 0.377777785 0.24037233 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +24 0.266666681 0.288061261 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Other-relative White Male Mexico 0 +42 0.466666669 0.1287771 0.8125 0 0.453856736 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 +37 0.411111116 0.254459977 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +36 0.4 0.02944154 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +21 0.233333334 0.138707012 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 +54 0.6 0.108904466 0.875 0 0.5874656 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 1 +34 0.377777785 0.233065829 0.5 0 0 0.353535354 Private 12th Married-spouse-absent Handlers-cleaners Unmarried White Male Mexico 0 +41 0.455555558 0.09729879 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Own-child White Male Italy 0 +18 0.2 0.103497326 0.625 0 0 0.04040404 Never-worked Some-college Never-married ? Own-child White Male United-States 0 +26 0.2888889 0.176881611 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +23 0.25555557 0.117094643 0.5625 0 0 0.08080808 Federal-gov HS-grad Never-married Armed-Forces Not-in-family White Male United-States 0 +63 0.7 0.0852290541 0.625 0 0 0.05050505 ? Some-college Divorced ? Not-in-family White Female United-States 0 +34 0.377777785 0.07945215 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 +54 0.6 0.148000449 0.5625 0 0 0.373737365 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 +37 0.411111116 0.221233174 0.5625 0 0 0.727272749 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 +54 0.6 0.09352161 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 +22 0.244444445 0.13169755 0.625 0 0 0.434343427 Local-gov Some-college Never-married Protective-serv Other-relative White Female United-States 0 +32 0.355555564 0.126790166 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +42 0.466666669 0.09305687 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Own-child White Male United-States 0 +31 0.344444454 0.0745696947 0.625 0 0 0.373737365 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 +48 0.533333361 0.08289526 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +28 0.311111122 0.222580254 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male Hong 0 +31 0.344444454 0.171282515 0.375 0 0 0.3838384 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 +28 0.311111122 0.2935546 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +24 0.266666681 0.0799195841 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 +50 0.5555556 0.187369213 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 +26 0.2888889 0.157456875 0.5625 0 0 0.727272749 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 +37 0.411111116 0.221233174 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +24 0.266666681 0.118932717 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Farming-fishing Not-in-family White Male Mexico 0 +18 0.2 0.105480887 0.4375 0 0 0.25252524 ? 11th Never-married ? Own-child White Female United-States 0 +32 0.355555564 0.116127446 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 +23 0.25555557 0.131306216 0.8125 0 0 0.5555556 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male Ireland 0 +33 0.366666675 0.214804292 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Transport-moving Not-in-family White Female United-States 0 +49 0.544444442 0.1276092 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +75 0.8333334 0.1298662 0.875 0 0 0.454545468 Self-emp-not-inc Masters Widowed Sales Not-in-family White Male United-States 0 +74 0.822222233 0.134124964 0.8125 0.158311576 0 0.08080808 Self-emp-not-inc Bachelors Widowed Craft-repair Not-in-family White Male Germany 1 +26 0.2888889 0.105613574 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 +66 0.733333349 0.06285289 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Unmarried White Female United-States 0 +34 0.377777785 0.0821483061 0.8125 0 0 0.454545468 Private Bachelors Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 +18 0.2 0.233942777 0.5 0 0 0.121212125 Private 12th Never-married Other-service Own-child White Male United-States 0 +33 0.366666675 0.138714433 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +36 0.4 0.142885625 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 +44 0.4888889 0.126503915 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 +36 0.4 0.168927163 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family Black Female United-States 0 +53 0.5888889 0.196507052 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +60 0.6666667 0.0242991038 0.25 0 0 0.4040404 Private 7th-8th Married-spouse-absent Machine-op-inspct Not-in-family White Male United-States 0 +28 0.311111122 0.080684714 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Portugal 0 +36 0.4 0.124371514 0.375 0 0 0.4848485 Private 10th Divorced Transport-moving Unmarried White Male United-States 0 +35 0.3888889 0.109285012 0.6875 0.068490684 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 +45 0.5 0.13767381 0.6875 0 0 0.2020202 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 +23 0.25555557 0.08981919 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +35 0.3888889 0.060321074 0.625 0 0 0.5555556 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +34 0.377777785 0.07750092 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +46 0.51111114 0.09396749 0.0625 0 0 0.75757575 Private Preschool Married-civ-spouse Machine-op-inspct Other-relative Black Male Dominican-Republic 0 +58 0.644444466 0.134919733 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +55 0.6111111 0.112144843 0.875 0 0 0.454545468 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 +63 0.7 0.152503029 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.169262588 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 +45 0.5 0.1282962 0.6875 0 0 0.7676768 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 +41 0.455555558 0.08231602 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 +42 0.466666669 0.167276338 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Female United-States 0 +90 1 0.144536465 0.25 0.0265302639 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Protective-serv Husband White Male United-States 0 +41 0.455555558 0.148487419 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 +22 0.244444445 0.117223963 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +53 0.5888889 0.09264265 0.9375 0.2782828 0 0.4040404 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male Philippines 1 +49 0.544444442 0.07540825 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Scotland 1 +51 0.566666663 0.0273731146 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.1387077 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +23 0.25555557 0.1785385 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 +59 0.655555546 0.266541839 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 +40 0.444444448 0.2062531 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family Asian-Pac-Islander Female Japan 0 +28 0.311111122 0.121437594 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +39 0.433333337 0.144739866 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female El-Salvador 0 +25 0.2777778 0.184408352 0.5625 0 0 0.373737365 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +48 0.533333361 0.151190981 0.625 0 0 0.4040404 State-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +62 0.6888889 0.182818145 0.3125 0 0 0.424242437 Private 9th Married-civ-spouse Other-service Husband Black Male United-States 0 +44 0.4888889 0.101145349 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 +28 0.311111122 0.257148057 0.8125 0 0 0.5050505 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 +62 0.6888889 0.115163624 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.0729141459 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +59 0.655555546 0.016022712 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Sales Wife White Female United-States 1 +20 0.222222224 0.118758276 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Other-relative White Female United-States 0 +40 0.444444448 0.175405219 0.75 0.0147101469 0 0.323232323 Private Assoc-acdm Separated Tech-support Unmarried White Female United-States 0 +47 0.5222222 0.16707629 0.625 0 0 0.474747479 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 1 +60 0.6666667 0.03788497 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +55 0.6111111 0.134547263 0.5625 0 0 0.8181818 Private HS-grad Separated Protective-serv Not-in-family White Male United-States 0 +18 0.2 0.13473855 0.5 0 0 0.353535354 Private 12th Never-married Adm-clerical Own-child White Male United-States 0 +43 0.477777779 0.129124641 0.8125 0 0.3996786 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 +31 0.344444454 0.105093606 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Divorced Other-service Not-in-family White Male United-States 0 +22 0.244444445 0.117017187 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +56 0.622222245 0.09123564 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Not-in-family Black Female United-States 0 +41 0.455555558 0.125048414 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 +24 0.266666681 0.149528027 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 +42 0.466666669 0.108782552 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +53 0.5888889 0.1254815 0.625 0 0.4331956 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 +52 0.5777778 0.09667443 0.25 0 0 0.4040404 Local-gov 7th-8th Never-married Other-service Other-relative Black Female United-States 0 +42 0.466666669 0.194081649 0.625 0 0 0.8989899 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 +48 0.533333361 0.219149262 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Portugal 0 +35 0.3888889 0.2559155 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 +33 0.366666675 0.113414451 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 +20 0.222222224 0.158038139 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 +33 0.366666675 0.156579927 0.625 0 0 0.454545468 Private Some-college Never-married Sales Own-child White Male United-States 0 +30 0.333333343 0.138176948 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 +31 0.344444454 0.07551332 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +29 0.322222233 0.12383201 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 +26 0.2888889 0.110719644 0.5625 0 0 0.4848485 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 +61 0.677777767 0.100774229 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family Black Male United-States 0 +45 0.5 0.134430751 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male ? 0 +29 0.322222233 0.0564031266 0.5625 0 0 0.454545468 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +57 0.6333333 0.0438336246 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +33 0.366666675 0.128870726 0.75 0 0.43663913 0.5050505 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +20 0.222222224 0.153416336 0.625 0 0 0.565656543 Private Some-college Never-married Sales Not-in-family White Female United-States 0 +26 0.2888889 0.0325182453 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 +36 0.4 0.04465803 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.03087078 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 +31 0.344444454 0.201383442 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 +47 0.5222222 0.109078906 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +61 0.677777767 0.06652904 0.4375 0 0 0.3030303 Private 11th Widowed Handlers-cleaners Not-in-family White Female United-States 0 +35 0.3888889 0.06888103 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 +23 0.25555557 0.1217555 0.125 0 0 0.353535354 Private 1st-4th Married-civ-spouse Machine-op-inspct Wife Amer-Indian-Eskimo Female Mexico 0 +20 0.222222224 0.13739565 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 +41 0.455555558 0.139339462 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 +39 0.433333337 0.0745077357 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female Philippines 0 +51 0.566666663 0.13695246 1 0 0 0.454545468 Local-gov Doctorate Divorced Exec-managerial Not-in-family White Female United-States 1 +61 0.677777767 0.0340020433 0.25 0 0 0.565656543 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 +51 0.566666663 0.18488656 0.25 0 0 0.4848485 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Female United-States 0 +36 0.4 0.14014098 0.0625 0 0 0.727272749 Private Preschool Divorced Other-service Not-in-family Other Male Mexico 0 +41 0.455555558 0.1132198 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +34 0.377777785 0.14366962 0.5625 0.07443074 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Unmarried White Female United-States 0 +25 0.2777778 0.117954746 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +37 0.411111116 0.0275846049 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +19 0.211111113 0.041011516 0.5625 0 0 0.4949495 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 +66 0.733333349 0.06916256 0.875 0 0 0.2020202 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +23 0.25555557 0.128155425 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 +30 0.333333343 0.118666671 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-spouse-absent Craft-repair Own-child White Male United-States 1 +53 0.5888889 0.20509395 0.625 0 0.4331956 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 +25 0.2777778 0.263120949 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family Black Male United-States 0 +18 0.2 0.02787153 0.5625 0 0.3677686 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 +51 0.566666663 0.06831795 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +61 0.677777767 0.1284309 0.5625 0 0.383149683 0.5050505 Private HS-grad Widowed Craft-repair Not-in-family Black Female United-States 0 +53 0.5888889 0.107087269 0.5625 0 0 0.3838384 Private HS-grad Widowed Machine-op-inspct Unmarried Black Female United-States 0 +17 0.188888893 0.07934102 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Male United-States 0 +61 0.677777767 0.0926473662 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +44 0.4888889 0.0481954329 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male ? 1 +38 0.422222227 0.173378557 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband Black Male United-States 0 +40 0.444444448 0.1317548 0.625 0 0 0.2020202 Private Some-college Separated Exec-managerial Unmarried White Female United-States 0 +32 0.355555564 0.159168318 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +46 0.51111114 0.0284575056 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 +50 0.5555556 0.173726767 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 +36 0.4 0.07350484 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 +30 0.333333343 0.176427647 0.4375 0 0 0.3030303 Self-emp-not-inc 11th Married-spouse-absent Craft-repair Not-in-family White Male Honduras 0 +33 0.366666675 0.0936596841 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male United-States 1 +36 0.4 0.160262823 0.8125 0 0.453856736 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 +85 0.9444445 0.06641791 0.8125 0 0 0.0303030312 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Poland 0 +62 0.6888889 0.08627438 0.5625 0 0 0.323232323 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 +24 0.266666681 0.191497311 0.8125 0 0 0.323232323 Private Bachelors Never-married Machine-op-inspct Not-in-family White Female United-States 0 +48 0.533333361 0.124631494 0.5625 0.07298073 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +58 0.644444466 0.15034233 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 +45 0.5 0.116968691 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 +66 0.733333349 0.181628674 0.5625 0 0 0.25252524 Private HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 +37 0.411111116 0.0818485841 0.9375 0.1502415 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 +55 0.6111111 0.134513587 0.3125 0 0 0.4848485 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 +39 0.433333337 0.130456224 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 +58 0.644444466 0.122565761 1 0 0 1 Self-emp-inc Doctorate Never-married Prof-specialty Not-in-family White Female ? 0 +50 0.5555556 0.327142447 1 0 0 0.5050505 Private Doctorate Divorced Prof-specialty Not-in-family White Female United-States 0 +28 0.311111122 0.125039652 0.625 0 0 0.5050505 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 +34 0.377777785 0.0206593238 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 +41 0.455555558 0.108080059 0.875 0.01506015 0 0.4040404 Federal-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 +36 0.4 0.125829041 0.75 0 0 0.5252525 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 +22 0.244444445 0.0452844165 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 +35 0.3888889 0.0206593238 0.5 0 0 0.8484849 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 +49 0.544444442 0.07721938 0.5 0 0 0.4040404 ? 12th Divorced ? Other-relative Black Male United-States 0 +21 0.233333334 0.122662082 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Own-child White Male United-States 0 +64 0.7111111 0.150175288 0.25 0 0 0.4040404 State-gov 7th-8th Married-civ-spouse Other-service Wife Black Female United-States 0 +41 0.455555558 0.135713831 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +52 0.5777778 0.202888116 0.6875 0 0 0.4040404 Private Assoc-voc Separated Sales Unmarried White Female United-States 0 +32 0.355555564 0.106248043 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 +27 0.3 0.104655139 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 +48 0.533333361 0.180563152 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 +28 0.311111122 0.07677417 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +24 0.266666681 0.146146208 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Other-service Own-child Asian-Pac-Islander Female United-States 0 +51 0.566666663 0.1196662 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.110587627 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 +61 0.677777767 0.239539176 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 +60 0.6666667 0.090356 0.3125 0 0 0.353535354 ? 9th Divorced ? Not-in-family Black Male United-States 0 +33 0.366666675 0.04248588 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 +42 0.466666669 0.146559089 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Sales Own-child White Male ? 0 +24 0.266666681 0.257219464 0.4375 0 0 0.4040404 Private 11th Divorced Machine-op-inspct Unmarried White Female United-States 0 +82 0.9111111 0.2720473 0.5625 0 0 0.0303030312 ? HS-grad Never-married ? Not-in-family White Male United-States 0 +26 0.2888889 0.120569408 0.625 0 0 0.656565666 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 +18 0.2 0.29377082 0.4375 0 0 0.2020202 Private 11th Never-married Prof-specialty Own-child White Male United-States 0 +34 0.377777785 0.2166821 0.5625 0 0 0.282828271 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 +57 0.6333333 0.103669085 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 +25 0.2777778 0.271965146 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative Black Male United-States 0 +34 0.377777785 0.0407939628 0.4375 0 0.2020202 0.6060606 Private 11th Divorced Transport-moving Unmarried White Male United-States 0 +71 0.788888931 0.09304542 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 +35 0.3888889 0.05364635 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +47 0.5222222 0.210202038 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 +50 0.5555556 0.1405195 0.875 0 0 0.5050505 Private Masters Divorced Sales Not-in-family White Female United-States 1 +33 0.366666675 0.122853361 0.375 0 0 0.4040404 Private 10th Never-married Adm-clerical Not-in-family Black Male United-States 0 +38 0.422222227 0.0221700612 0.6875 0 0 0.5555556 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 +50 0.5555556 0.20365797 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 +45 0.5 0.104460485 0.375 0 0 0.3838384 Private 10th Divorced Other-service Not-in-family Black Female Dominican-Republic 0 +32 0.355555564 0.129968584 0.5625 0 0 0.454545468 Private HS-grad Separated Sales Not-in-family White Female United-States 0 +39 0.433333337 0.0722716 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male ? 1 +25 0.2777778 0.346678972 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Adm-clerical Own-child Black Female United-States 0 +20 0.222222224 0.18214798 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 +46 0.51111114 0.0289431233 0.875 0 0 0.222222224 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 +40 0.444444448 0.09608441 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 0 +66 0.733333349 0.0318972468 0.375 0.0347103477 0 0.4040404 Federal-gov 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 +30 0.333333343 0.118659936 0.6875 0 0 0.24242425 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 +36 0.4 0.08854217 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 +57 0.6333333 0.0743696541 0.5625 1 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 +46 0.51111114 0.245535657 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 +27 0.3 0.119483672 0.5625 0 0 0.646464646 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 +33 0.366666675 0.184038579 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 +58 0.644444466 0.099485755 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 +30 0.333333343 0.0520413145 0.5625 0 0 0.5555556 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 +26 0.2888889 0.129081532 0.75 0 0 0.151515156 Private Assoc-acdm Never-married Machine-op-inspct Other-relative White Female United-States 0 +81 0.900000036 0.08114609 0.6875 0 0 0.01010101 ? Assoc-voc Divorced ? Unmarried White Female ? 0 +32 0.355555564 0.142350838 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 +22 0.244444445 0.137209073 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 +31 0.344444454 0.1970708 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 +29 0.322222233 0.08484918 0.5625 0 0 0.353535354 Private HS-grad Separated Sales Unmarried White Female United-States 0 +35 0.3888889 0.215587616 0.8125 0 0 0.5555556 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 +30 0.333333343 0.0227728747 0.8125 0 0 1 ? Bachelors Never-married ? Not-in-family Asian-Pac-Islander Female United-States 0 +34 0.377777785 0.13771154 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 +54 0.6 0.227649271 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 +37 0.411111116 0.120654948 0.625 0 0 0.3939394 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 +22 0.244444445 0.218920931 0.5 0 0 0.353535354 Private 12th Never-married Protective-serv Own-child Black Male United-States 0 +34 0.377777785 0.107911 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 +30 0.333333343 0.232974231 0.5625 0 0 0.464646459 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 +38 0.422222227 0.09374253 0.8125 0.1502015 0 0.454545468 Private Bachelors Divorced Prof-specialty Unmarried Black Female United-States 1 +71 0.788888931 0.193554953 1 0 0 0.1010101 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 +45 0.5 0.169870779 0.5625 0 0 0.4040404 State-gov HS-grad Separated Adm-clerical Own-child White Female United-States 0 +41 0.455555558 0.136607617 0.5625 0 0 0.323232323 ? HS-grad Separated ? Not-in-family Black Female United-States 0 +72 0.8 0.0875002146 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 +45 0.5 0.08028464 0.75 0 0 0.4848485 Local-gov Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 +31 0.344444454 0.134474531 0.875 0 0 0.3030303 Private Masters Divorced Other-service Not-in-family Other Female United-States 0 +39 0.433333337 0.0750984251 0.75 0 0 0.2020202 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 +37 0.411111116 0.133505315 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Tech-support Not-in-family White Female United-States 0 +43 0.477777779 0.175631523 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 +65 0.722222269 0.06692171 0.9375 0.0108601088 0 0.6060606 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 +43 0.477777779 0.17231369 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Other-relative White Female United-States 0 +43 0.477777779 0.0183484256 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 +32 0.355555564 0.0229446255 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband Amer-Indian-Eskimo Male United-States 0 +43 0.477777779 0.0570221022 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 +32 0.355555564 0.0782229453 0.875 0 0 0.111111112 Private Masters Never-married Tech-support Not-in-family Asian-Pac-Islander Male Taiwan 0 +53 0.5888889 0.216787174 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 +22 0.244444445 0.208898067 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Not-in-family White Male United-States 0 +27 0.3 0.173301771 0.75 0 0 0.3838384 Private Assoc-acdm Married-civ-spouse Tech-support Wife White Female United-States 0 +40 0.444444448 0.103976212 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 +58 0.644444466 0.102316625 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 +22 0.244444445 0.135710463 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 +52 0.5777778 0.193928763 0.5625 0.1502415 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Schema.txt new file mode 100644 index 0000000000..5ef68276e1 --- /dev/null +++ b/test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Schema.txt @@ -0,0 +1,163 @@ +---- BoundLoader ---- +3 columns: + One: Text + Num: 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' + Cat: Vec + Metadata 'SlotNames': Vec: Length=9, Count=9 + [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' +---- RowToRowMapperTransform ---- +4 columns: + One: Text + Num: 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' + Num: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + Cat: Vec + Metadata 'SlotNames': Vec: Length=9, Count=9 + [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' +---- RowToRowMapperTransform ---- +5 columns: + One: Text + Num: 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' + Num: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + Cat: Vec + Metadata 'SlotNames': Vec: Length=9, Count=9 + [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' + temp_IsMissing_000: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' +---- RowToRowMapperTransform ---- +6 columns: + One: Text + Num: 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' + Num: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + Cat: Vec + Metadata 'SlotNames': Vec: Length=9, Count=9 + [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' + temp_IsMissing_000: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + temp_IsMissing_000: 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' +---- RowToRowMapperTransform ---- +7 columns: + One: Text + Num: 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' + Num: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + Cat: Vec + Metadata 'SlotNames': Vec: Length=9, Count=9 + [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' + temp_IsMissing_000: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + temp_IsMissing_000: 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' + temp_Replace_000: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' +---- RowToRowMapperTransform ---- +8 columns: + One: Text + Num: 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' + Num: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + Cat: Vec + Metadata 'SlotNames': Vec: Length=9, Count=9 + [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' + temp_IsMissing_000: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + temp_IsMissing_000: 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' + temp_Replace_000: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + NumSparse: Vec + Metadata 'SlotNames': Vec: Length=12, Count=12 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week', [6] 'IsMissing.age', [7] 'IsMissing.fnlwgt', [8] 'IsMissing.education-num', [9] 'IsMissing.capital-gain' + [10] 'IsMissing.capital-loss', [11] 'IsMissing.hours-per-week' +---- SelectColumnsDataTransform ---- +5 columns: + One: Text + Num: 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' + Num: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + Cat: Vec + Metadata 'SlotNames': Vec: Length=9, Count=9 + [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' + NumSparse: Vec + Metadata 'SlotNames': Vec: Length=12, Count=12 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week', [6] 'IsMissing.age', [7] 'IsMissing.fnlwgt', [8] 'IsMissing.education-num', [9] 'IsMissing.capital-gain' + [10] 'IsMissing.capital-loss', [11] 'IsMissing.hours-per-week' +---- RowToRowMapperTransform ---- +6 columns: + One: Text + Num: 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' + Num: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + Cat: Vec + Metadata 'SlotNames': Vec: Length=9, Count=9 + [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' + NumSparse: Vec + Metadata 'SlotNames': Vec: Length=12, Count=12 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week', [6] 'IsMissing.age', [7] 'IsMissing.fnlwgt', [8] 'IsMissing.education-num', [9] 'IsMissing.capital-gain' + [10] 'IsMissing.capital-loss', [11] 'IsMissing.hours-per-week' + NumSparse: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=12, Count=12 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week', [6] 'IsMissing.age', [7] 'IsMissing.fnlwgt', [8] 'IsMissing.education-num', [9] 'IsMissing.capital-gain' + [10] 'IsMissing.capital-loss', [11] 'IsMissing.hours-per-week' +---- SelectColumnsDataTransform ---- +4 columns: + One: Text + Num: 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' + Num: Vec + Metadata 'IsNormalized': Bool: '1' + Metadata 'SlotNames': Vec: Length=6, Count=6 + [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' + Cat: Vec + Metadata 'SlotNames': Vec: Length=9, Count=9 + [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers-Schema.txt index 6bfec04297..6402981be7 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers-Schema.txt @@ -34,7 +34,7 @@ StringLabel: Key Metadata 'KeyValues': Vec: Length=7, Count=7 [0] 'Wirtschaft', [1] 'Gesundheit', [2] 'Deutschland', [3] 'Ausland', [4] 'Unterhaltung', [5] 'Sport', [6] 'Technik & Wissen' ----- TermLookupTransform ---- +---- TermLookupTransformer ---- 6 columns: RawLabel: Text Names: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers1-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers1-Schema.txt index 2f805fd103..1e8446cc3e 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers1-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers1-Schema.txt @@ -7,7 +7,7 @@ Features: Vec Metadata 'SlotNames': Vec: Length=2, Count=2 [0] 'weg fuer milliardenhilfe frei', [1] 'vor dem parlamentsgebaeude toben strassenkaempfe zwischen demonstranten drinnen haben die griechischen abgeordneten das drastische sparpaket am abend endgueltig beschlossen die entscheidung ist eine wichtige voraussetzung fuer die auszahlung von weiteren acht milliarden euro hilfsgeldern athen das griechische parlament hat einem umfassenden sparpaket endgueltig zugestimmt' ----- TermLookupTransform ---- +---- TermLookupTransformer ---- 4 columns: RawLabel: Text Names: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers2-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers2-Schema.txt index 7f097005cb..f40e727ef0 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers2-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers2-Schema.txt @@ -7,7 +7,7 @@ Features: Vec Metadata 'SlotNames': Vec: Length=2, Count=2 [0] 'weg fuer milliardenhilfe frei', [1] 'vor dem parlamentsgebaeude toben strassenkaempfe zwischen demonstranten drinnen haben die griechischen abgeordneten das drastische sparpaket am abend endgueltig beschlossen die entscheidung ist eine wichtige voraussetzung fuer die auszahlung von weiteren acht milliarden euro hilfsgeldern athen das griechische parlament hat einem umfassenden sparpaket endgueltig zugestimmt' ----- TermLookupTransform ---- +---- TermLookupTransformer ---- 4 columns: RawLabel: Text Names: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers3-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers3-Schema.txt index 9c8630237b..eb6fccd5db 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers3-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers3-Schema.txt @@ -7,7 +7,7 @@ Features: Vec Metadata 'SlotNames': Vec: Length=2, Count=2 [0] 'weg fuer milliardenhilfe frei', [1] 'vor dem parlamentsgebaeude toben strassenkaempfe zwischen demonstranten drinnen haben die griechischen abgeordneten das drastische sparpaket am abend endgueltig beschlossen die entscheidung ist eine wichtige voraussetzung fuer die auszahlung von weiteren acht milliarden euro hilfsgeldern athen das griechische parlament hat einem umfassenden sparpaket endgueltig zugestimmt' ----- TermLookupTransform ---- +---- TermLookupTransformer ---- 4 columns: RawLabel: Text Names: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers4-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers4-Schema.txt index e54b1a5652..750b267e78 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers4-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers4-Schema.txt @@ -7,7 +7,7 @@ Features: Vec Metadata 'SlotNames': Vec: Length=2, Count=2 [0] 'weg fuer milliardenhilfe frei', [1] 'vor dem parlamentsgebaeude toben strassenkaempfe zwischen demonstranten drinnen haben die griechischen abgeordneten das drastische sparpaket am abend endgueltig beschlossen die entscheidung ist eine wichtige voraussetzung fuer die auszahlung von weiteren acht milliarden euro hilfsgeldern athen das griechische parlament hat einem umfassenden sparpaket endgueltig zugestimmt' ----- TermLookupTransform ---- +---- TermLookupTransformer ---- 4 columns: RawLabel: Text Names: Vec @@ -17,7 +17,7 @@ Metadata 'SlotNames': Vec: Length=2, Count=2 [0] 'weg fuer milliardenhilfe frei', [1] 'vor dem parlamentsgebaeude toben strassenkaempfe zwischen demonstranten drinnen haben die griechischen abgeordneten das drastische sparpaket am abend endgueltig beschlossen die entscheidung ist eine wichtige voraussetzung fuer die auszahlung von weiteren acht milliarden euro hilfsgeldern athen das griechische parlament hat einem umfassenden sparpaket endgueltig zugestimmt' FileLabelNum: R4 ----- TermLookupTransform ---- +---- TermLookupTransformer ---- 5 columns: RawLabel: Text Names: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers5-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers5-Schema.txt index 76739e7fda..68614d1599 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers5-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers5-Schema.txt @@ -7,7 +7,7 @@ Features: Vec Metadata 'SlotNames': Vec: Length=2, Count=2 [0] 'weg fuer milliardenhilfe frei', [1] 'vor dem parlamentsgebaeude toben strassenkaempfe zwischen demonstranten drinnen haben die griechischen abgeordneten das drastische sparpaket am abend endgueltig beschlossen die entscheidung ist eine wichtige voraussetzung fuer die auszahlung von weiteren acht milliarden euro hilfsgeldern athen das griechische parlament hat einem umfassenden sparpaket endgueltig zugestimmt' ----- TermLookupTransform ---- +---- TermLookupTransformer ---- 4 columns: RawLabel: Text Names: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeNgram-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeNgram-Schema.txt index 2ebab1ef83..e373916802 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeNgram-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeNgram-Schema.txt @@ -9,7 +9,7 @@ Key: Vec, 9> Metadata 'KeyValues': Vec: Length=5, Count=5 [0] '5', [1] '1', [2] '2', [3] '3', [4] '4' ----- NgramTransform ---- +---- RowToRowMapperTransform ---- 4 columns: Label: R4 Text: Vec @@ -21,7 +21,7 @@ [0] '5', [1] '5|1', [2] '5|1|1', [3] '1', [4] '1|1', [5] '1|1|1', [6] '1|1|2', [7] '1|2', [8] '1|2|1', [9] '1|2|3' [10] '1|1|3', [11] '2', [12] '2|1', [13] '2|1|3', [14] '2|1|1', [15] '2|3', [16] '2|3|1', [17] '1|3', [18] '1|3|1', [19] '3' [20] '3|1', [21] '5|4', [22] '4', [23] '4|4', [24] '4|5', [25] '*' ----- NgramTransform ---- +---- RowToRowMapperTransform ---- 6 columns: Label: R4 Text: Vec @@ -50,7 +50,7 @@ [10] '1|1|3', [11] '1|2|3', [12] '1|3', [13] '1|3|1', [14] '2', [15] '2|1', [16] '2|1|3', [17] '2|1|1', [18] '2|3', [19] '2|3|1' [20] '3', [21] '3|1', [22] '3|1|1', [23] '5|4', [24] '5|4|4', [25] '5|4|5', [26] '5|4|*', [27] '5|5', [28] '4', [29] '4|4' [30] '4|5', [31] '4|*', [32] '5|*', [33] '5|3', [34] '*', [35] '*|*' ----- NgramTransform ---- +---- RowToRowMapperTransform ---- 7 columns: Label: R4 Text: Vec @@ -119,7 +119,7 @@ KeyU4: Vec, 9> Metadata 'KeyValues': Vec: Length=5, Count=5 [0] '5', [1] '1', [2] '2', [3] '3', [4] '4' ----- NgramTransform ---- +---- RowToRowMapperTransform ---- 9 columns: Label: R4 Text: Vec @@ -160,7 +160,7 @@ [0] '5', [1] '5|1', [2] '5|1|1', [3] '1', [4] '1|1', [5] '1|1|1', [6] '1|1|2', [7] '1|2', [8] '1|2|1', [9] '2' [10] '2|1', [11] '2|1|3', [12] '1|3', [13] '1|3|1', [14] '3', [15] '3|1', [16] '3|1|1', [17] '5|4', [18] '5|4|4', [19] '4' [20] '4|4', [21] '*' ----- NgramTransform ---- +---- RowToRowMapperTransform ---- 10 columns: Label: R4 Text: Vec @@ -208,7 +208,7 @@ [20] '2|3', [21] '*|1', [22] '3|4', [23] '4|3', [24] '3|*', [25] '4|1', [26] '2|*', [27] '1|5', [28] '4|2', [29] '5|3' [30] '3|3', [31] '*|5', [32] '5|5', [33] '*|4', [34] '4|*', [35] '1|4', [36] '5|2', [37] '1|*', [38] '*|2', [39] '2|5' [40] '2|4', [41] '3|5' ----- NgramTransform ---- +---- RowToRowMapperTransform ---- 11 columns: Label: R4 Text: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Convert-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Convert-Schema.txt index ba08514d74..857b3b6773 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Convert-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Convert-Schema.txt @@ -2,7 +2,7 @@ 2 columns: CatU8: Vec, 9> CatU2: Vec, 3> ----- NgramHashTransform ---- +---- NgramHashingTransformer ---- 4 columns: CatU8: Vec, 9> CatU2: Vec, 3> diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Schema.txt index e0f2dafe79..215b737a64 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Schema.txt @@ -45,7 +45,7 @@ [0] 'versicherer', [1] 'lediglich', [2] 'air', [3] 'worldwide', [4] 'ein', [5] 'spezialist', [6] 'fuer', [7] 'risikomodelle', [8] 'wagte', [9] 'sich' Hash: Vec> HashBig: Vec> ----- NgramHashTransform ---- +---- NgramHashingTransformer ---- 8 columns: Label: Text Attrs: Vec @@ -61,7 +61,7 @@ Hash: Vec> HashBig: Vec> NgramHashOne: Vec ----- NgramHashTransform ---- +---- NgramHashingTransformer ---- 9 columns: Label: Text Attrs: Vec @@ -78,7 +78,7 @@ HashBig: Vec> NgramHashOne: Vec HashNgram1: Vec ----- NgramHashTransform ---- +---- NgramHashingTransformer ---- 11 columns: Label: Text Attrs: Vec @@ -97,7 +97,7 @@ HashNgram1: Vec HashNgram2: Vec HashNgram3: Vec ----- NgramHashTransform ---- +---- NgramHashingTransformer ---- 12 columns: Label: Text Attrs: Vec @@ -117,7 +117,7 @@ HashNgram2: Vec HashNgram3: Vec HashNgram4: Vec ----- NgramHashTransform ---- +---- NgramHashingTransformer ---- 14 columns: Label: Text Attrs: Vec @@ -139,7 +139,7 @@ HashNgram4: Vec HashNgram5: Vec HashNgram6: Vec ----- NgramHashTransform ---- +---- NgramHashingTransformer ---- 16 columns: Label: Text Attrs: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeNgramSparse-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeNgramSparse-Schema.txt index bff6ef8ecd..ba12e36ba1 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeNgramSparse-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeNgramSparse-Schema.txt @@ -7,7 +7,7 @@ Key: Vec, 21> Metadata 'KeyValues': Vec: Length=4, Count=4 [0] 'a', [1] 'b', [2] 'c', [3] 'd' ----- NgramTransform ---- +---- RowToRowMapperTransform ---- 3 columns: Text: Vec Key: Vec, 21> diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgram-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgram-Schema.txt index 83f4220b1c..00b722a0ae 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgram-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgram-Schema.txt @@ -39,7 +39,7 @@ Metadata 'KeyValues': Vec: Length=11, Count=11 [0] 'sport', [1] 'baseball', [2] 'fred', [3] 'mcgriff', [4] 'padres', [5] 'free', [6] 'agent', [7] 'med', [8] 'erythromycin', [9] 'treating' [10] 'pneumonia' ----- NgramTransform ---- +---- RowToRowMapperTransform ---- 7 columns: T1: Text T2: Text diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgramTerms-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgramTerms-Schema.txt index 7f049f63b6..4cef44e36d 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgramTerms-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgramTerms-Schema.txt @@ -38,7 +38,7 @@ Features_WordExtractor: Vec> Metadata 'KeyValues': Vec: Length=8, Count=8 [0] 'sport', [1] 'baseball', [2] 'mcgriff', [3] 'padres', [4] 'agent', [5] 'med', [6] 'erythromycin', [7] 'pneumonia' ----- NgramTransform ---- +---- RowToRowMapperTransform ---- 7 columns: T1: Text T2: Text diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Data.txt b/test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Data.txt new file mode 100644 index 0000000000..a200d4f3a6 --- /dev/null +++ b/test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Data.txt @@ -0,0 +1,16 @@ +#@ TextLoader{ +#@ header+ +#@ sep=tab +#@ col=Source:TX:0 +#@ col=Lang:TX:1 +#@ col=SourceTokens:TX:2-** +#@ col={name=Output type=TX src={ min=-1 var=+}} +#@ } +Source Lang +"1 ""Oh, no,"" she's saying, ""our $400 blender can't handle something this hard!""" English 1 """Oh," "no,""" she's saying, """our" $400 blender can't handle something this "hard!""" 1 """Oh," "no,""" she's saying, """our" $400 blender can't handle "hard!""" +2 Vous êtes au volant d'une voiture et vous roulez à grande vitesse French 2 Vous êtes au volant d'une voiture et vous roulez à grande vitesse 2 êtes volant d'une voiture roulez grande vitesse +3 Lange nichts voneinander gehört! Es freut mich, dich kennen zu lernen German 3 Lange nichts voneinander gehört! Es freut mich, dich kennen zu lernen 3 voneinander gehört! freut mich, kennen lernen +4 Goedemorgen, Waar kom je vandaan? Ik kom uit Nederlands Dutch 4 Goedemorgen, Waar kom je vandaan? Ik kom uit Nederlands 4 Goedemorgen, Waar kom vandaan? kom Nederlands +5 Ciao, Come va? Bene grazie. E tu? Quanto tempo! Italian 5 Ciao, Come va? Bene grazie. E tu? Quanto tempo! 5 Ciao, Come va? Bene grazie. tu? Quanto tempo! +六 初めまして 良い一日を ごきげんよう! さようなら Japanese 六 初めまして 良い一日を ごきげんよう! さようなら 六 初めまして 良い一日を ごきげんよう! さようなら +6 ¡Hola! ¿Cómo te llamas? Mi nombre es ABELE Spanish 6 ¡Hola! ¿Cómo te llamas? Mi nombre es ABELE 6 ¡Hola! ¿Cómo te llamas? Mi nombre ABELE diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Schema.txt new file mode 100644 index 0000000000..a28688666c --- /dev/null +++ b/test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Schema.txt @@ -0,0 +1,15 @@ +---- BoundLoader ---- +2 columns: + Source: Text + Lang: Text +---- RowToRowMapperTransform ---- +3 columns: + Source: Text + Lang: Text + SourceTokens: Vec +---- StopWordsRemovingTransformer ---- +4 columns: + Source: Text + Lang: Text + SourceTokens: Vec + Output: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeWordHash-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeWordHash-Schema.txt index cfbea3a96d..83ee4402b3 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeWordHash-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeWordHash-Schema.txt @@ -55,7 +55,7 @@ temp__tmp012_000: Vec> temp__tmp013_000: Vec> temp__tmp014_000: Vec> ----- NgramHashTransform ---- +---- NgramHashingTransformer ---- 41 columns: One: Text Two: Text diff --git a/test/BaselineOutput/README.md b/test/BaselineOutput/README.md new file mode 100644 index 0000000000..1e516fab56 --- /dev/null +++ b/test/BaselineOutput/README.md @@ -0,0 +1,3 @@ +## Baseline Output + +This folder mirrors the `TestOutput` directory that is produced by running tests. This is so that any differences between the expected output (this folder) and the actual output of the tests can be reviewed. \ No newline at end of file diff --git a/test/BaselineOutput/SingleDebug/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleDebug/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt index 81c7282f03..f8b3b2adfe 100644 --- a/test/BaselineOutput/SingleDebug/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleDebug/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt @@ -5,6 +5,8 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects +Changing data from row-wise to column-wise +Warning: Skipped 16 instances with missing features during training Reserved memory for tree learner: 3852 bytes Starting to train ... Training calibrator. @@ -48,7 +50,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt index 5a21f19b1c..bed22fbab6 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,6 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects +Changing data from row-wise to column-wise Reserved memory for tree learner: 4980 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -50,7 +51,11 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree training' started. -[5] 'FastTree training' finished in %Time%. -[6] 'Saving model' started. -[6] 'Saving model' finished in %Time%. +[5] 'FastTree data preparation #2' started. +[5] 'FastTree data preparation #2' finished in %Time%. +[6] 'FastTree feature conversion #2' started. +[6] 'FastTree feature conversion #2' finished in %Time%. +[7] 'FastTree training' started. +[7] 'FastTree training' finished in %Time%. +[8] 'Saving model' started. +[8] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt index f210a6d8e9..0650a38d87 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt @@ -4,6 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects +Changing data from row-wise to column-wise Reserved memory for tree learner: 28728 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -50,7 +51,11 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree training' started. -[5] 'FastTree training' finished in %Time%. -[6] 'Saving model' started. -[6] 'Saving model' finished in %Time%. +[5] 'FastTree data preparation #2' started. +[5] 'FastTree data preparation #2' finished in %Time%. +[6] 'FastTree feature conversion #2' started. +[6] 'FastTree feature conversion #2' finished in %Time%. +[7] 'FastTree training' started. +[7] 'FastTree training' finished in %Time%. +[8] 'Saving model' started. +[8] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt index cc2cb57518..2c97041dbe 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt @@ -6,6 +6,9 @@ Warning: This is not ranking problem, Group Id 'GroupId' column will be ignored Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects +Changing data from row-wise to column-wise +Warning: This is not ranking problem, Group Id 'GroupId' column will be ignored +Warning: Skipped 16 instances with missing features during training Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -49,7 +52,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt index 272c5910e8..c71f54ec07 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt @@ -5,6 +5,8 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects +Changing data from row-wise to column-wise +Warning: Skipped 16 instances with missing features during training Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -48,7 +50,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt index 961910669b..7331706461 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt @@ -5,6 +5,8 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects +Changing data from row-wise to column-wise +Warning: Skipped 16 instances with missing features during training Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -48,7 +50,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt index 56dbf90c87..99262943b6 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,6 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects +Changing data from row-wise to column-wise Reserved memory for tree learner: 4980 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -50,7 +51,11 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree training' started. -[5] 'FastTree training' finished in %Time%. -[6] 'Saving model' started. -[6] 'Saving model' finished in %Time%. +[5] 'FastTree data preparation #2' started. +[5] 'FastTree data preparation #2' finished in %Time%. +[6] 'FastTree feature conversion #2' started. +[6] 'FastTree feature conversion #2' finished in %Time%. +[7] 'FastTree training' started. +[7] 'FastTree training' finished in %Time%. +[8] 'Saving model' started. +[8] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt index 016be19407..a348f6068d 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt @@ -4,6 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects +Changing data from row-wise to column-wise Reserved memory for tree learner: 28728 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -50,7 +51,11 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree training' started. -[5] 'FastTree training' finished in %Time%. -[6] 'Saving model' started. -[6] 'Saving model' finished in %Time%. +[5] 'FastTree data preparation #2' started. +[5] 'FastTree data preparation #2' finished in %Time%. +[6] 'FastTree feature conversion #2' started. +[6] 'FastTree feature conversion #2' finished in %Time%. +[7] 'FastTree training' started. +[7] 'FastTree training' finished in %Time%. +[8] 'Saving model' started. +[8] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt index 6f8744f870..7da23f1a22 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,6 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects +Changing data from row-wise to column-wise on disk Reserved memory for tree learner: 5016 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -46,7 +47,9 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree training' started. -[3] 'FastTree training' finished in %Time%. -[4] 'Saving model' started. -[4] 'Saving model' finished in %Time%. +[3] 'FastTree disk-based bins initialization #2' started. +[3] 'FastTree disk-based bins initialization #2' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt index 58e8aed7b1..2648aef201 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt @@ -4,6 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects +Changing data from row-wise to column-wise on disk Reserved memory for tree learner: 28812 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -46,7 +47,9 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree training' started. -[3] 'FastTree training' finished in %Time%. -[4] 'Saving model' started. -[4] 'Saving model' finished in %Time%. +[3] 'FastTree disk-based bins initialization #2' started. +[3] 'FastTree disk-based bins initialization #2' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt index 743d238d0f..4a67de0680 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,6 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects +Changing data from row-wise to column-wise on disk Reserved memory for tree learner: 14688 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -46,7 +47,9 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree training' started. -[3] 'FastTree training' finished in %Time%. -[4] 'Saving model' started. -[4] 'Saving model' finished in %Time%. +[3] 'FastTree disk-based bins initialization #2' started. +[3] 'FastTree disk-based bins initialization #2' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt index 3bfe5092e9..d17f9694d5 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt @@ -4,6 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects +Changing data from row-wise to column-wise on disk Reserved memory for tree learner: 38484 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -46,7 +47,9 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree training' started. -[3] 'FastTree training' finished in %Time%. -[4] 'Saving model' started. -[4] 'Saving model' finished in %Time%. +[3] 'FastTree disk-based bins initialization #2' started. +[3] 'FastTree disk-based bins initialization #2' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt index f3d444d231..afcb06feba 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt @@ -5,6 +5,8 @@ Changing data from row-wise to column-wise on disk Warning: 16 of 699 examples will be skipped due to missing feature values Processed 683 instances Binning and forming Feature objects +Changing data from row-wise to column-wise on disk +Warning: 16 of 699 examples will be skipped due to missing feature values Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -44,7 +46,9 @@ Virtual memory usage(MB): %Number% --- Progress log --- [1] 'FastTree disk-based bins initialization' started. [1] 'FastTree disk-based bins initialization' finished in %Time%. -[2] 'FastTree training' started. -[2] 'FastTree training' finished in %Time%. -[3] 'Saving model' started. -[3] 'Saving model' finished in %Time%. +[2] 'FastTree disk-based bins initialization #2' started. +[2] 'FastTree disk-based bins initialization #2' finished in %Time%. +[3] 'FastTree training' started. +[3] 'FastTree training' finished in %Time%. +[4] 'Saving model' started. +[4] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt index 942e432cbf..e964468ca2 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt @@ -5,6 +5,8 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects +Changing data from row-wise to column-wise +Warning: Skipped 16 instances with missing features during training Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -48,7 +50,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt index 7e76faa1d9..c0be8c4763 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt @@ -5,6 +5,8 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects +Changing data from row-wise to column-wise +Warning: Skipped 16 instances with missing features during training Reserved memory for tree learner: 468 bytes Starting to train ... Warning: 5 of the boosting iterations failed to grow a tree. This is commonly because the minimum documents in leaf hyperparameter was set too high for this dataset. @@ -49,7 +51,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/PCA/pca.tsv b/test/BaselineOutput/SingleDebug/PCA/pca.tsv index ece1e59164..328ff1bf86 100644 --- a/test/BaselineOutput/SingleDebug/PCA/pca.tsv +++ b/test/BaselineOutput/SingleDebug/PCA/pca.tsv @@ -2,7 +2,7 @@ #@ sep=tab #@ col=pca:R4:0-4 #@ } -2.085487 0.09400085 2.58366132 -1.721405 -0.732070744 -0.9069792 0.7748574 0.6097196 1.07868779 0.453838825 --0.167718172 -0.92723 -0.19140324 0.243479848 -1.060547 -0.548309 0.5576686 -0.587472439 -1.38610959 0.9422219 +-2.085465 -0.09400512 -2.58367229 1.72141707 0.732049346 +-0.906982958 -0.774861753 -0.609727442 -1.07867944 -0.453824759 +0.167715371 0.927231133 0.191398591 -0.243467987 1.06056178 +-0.54830873 -0.5576661 0.587476134 1.38609958 -0.9422357 diff --git a/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-CV-breast-cancer-out.txt b/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-CV-breast-cancer-out.txt index 92c6aa4480..e90417c232 100644 --- a/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-CV-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-CV-breast-cancer-out.txt @@ -5,7 +5,7 @@ Changing data from row-wise to column-wise Warning: Skipped 8 instances with missing features during training Processed 329 instances Binning and forming Feature objects -Reserved memory for tree learner: 3852 bytes +Reserved memory for tree learner: %Number% bytes Starting to train ... Training calibrator. Not adding a normalizer. @@ -14,7 +14,7 @@ Changing data from row-wise to column-wise Warning: Skipped 8 instances with missing features during training Processed 354 instances Binning and forming Feature objects -Reserved memory for tree learner: 3816 bytes +Reserved memory for tree learner: %Number% bytes Starting to train ... Training calibrator. TEST POSITIVE RATIO: 0.3702 (134.0/(134.0+228.0)) diff --git a/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt index 81c7282f03..52c5c46466 100644 --- a/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt @@ -5,7 +5,9 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Reserved memory for tree learner: 3852 bytes +Changing data from row-wise to column-wise +Warning: Skipped 16 instances with missing features during training +Reserved memory for tree learner: %Number% bytes Starting to train ... Training calibrator. TEST POSITIVE RATIO: 0.3448 (241.0/(241.0+458.0)) @@ -48,7 +50,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt index 5a21f19b1c..6ded5fda02 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,7 +4,8 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects -Reserved memory for tree learner: 4980 bytes +Changing data from row-wise to column-wise +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -50,7 +51,11 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree training' started. -[5] 'FastTree training' finished in %Time%. -[6] 'Saving model' started. -[6] 'Saving model' finished in %Time%. +[5] 'FastTree data preparation #2' started. +[5] 'FastTree data preparation #2' finished in %Time%. +[6] 'FastTree feature conversion #2' started. +[6] 'FastTree feature conversion #2' finished in %Time%. +[7] 'FastTree training' started. +[7] 'FastTree training' finished in %Time%. +[8] 'Saving model' started. +[8] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt index f210a6d8e9..812e00820d 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt @@ -4,7 +4,8 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects -Reserved memory for tree learner: 28728 bytes +Changing data from row-wise to column-wise +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -50,7 +51,11 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree training' started. -[5] 'FastTree training' finished in %Time%. -[6] 'Saving model' started. -[6] 'Saving model' finished in %Time%. +[5] 'FastTree data preparation #2' started. +[5] 'FastTree data preparation #2' finished in %Time%. +[6] 'FastTree feature conversion #2' started. +[6] 'FastTree feature conversion #2' finished in %Time%. +[7] 'FastTree training' started. +[7] 'FastTree training' finished in %Time%. +[8] 'Saving model' started. +[8] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt index cc2cb57518..b1828d67c2 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt @@ -6,7 +6,10 @@ Warning: This is not ranking problem, Group Id 'GroupId' column will be ignored Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Reserved memory for tree learner: 3852 bytes +Changing data from row-wise to column-wise +Warning: This is not ranking problem, Group Id 'GroupId' column will be ignored +Warning: Skipped 16 instances with missing features during training +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.3448 (241.0/(241.0+458.0)) @@ -49,7 +52,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt index 272c5910e8..e2b27ff59a 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt @@ -5,7 +5,9 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Reserved memory for tree learner: 3852 bytes +Changing data from row-wise to column-wise +Warning: Skipped 16 instances with missing features during training +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.3448 (241.0/(241.0+458.0)) @@ -48,7 +50,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt index 961910669b..b19ff0b896 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt @@ -5,7 +5,9 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Reserved memory for tree learner: 3852 bytes +Changing data from row-wise to column-wise +Warning: Skipped 16 instances with missing features during training +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.3448 (241.0/(241.0+458.0)) @@ -48,7 +50,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt index 56dbf90c87..a64a06ef87 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,7 +4,8 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects -Reserved memory for tree learner: 4980 bytes +Changing data from row-wise to column-wise +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -50,7 +51,11 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree training' started. -[5] 'FastTree training' finished in %Time%. -[6] 'Saving model' started. -[6] 'Saving model' finished in %Time%. +[5] 'FastTree data preparation #2' started. +[5] 'FastTree data preparation #2' finished in %Time%. +[6] 'FastTree feature conversion #2' started. +[6] 'FastTree feature conversion #2' finished in %Time%. +[7] 'FastTree training' started. +[7] 'FastTree training' finished in %Time%. +[8] 'Saving model' started. +[8] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt index 016be19407..ce5239bec1 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt @@ -4,7 +4,8 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects -Reserved memory for tree learner: 28728 bytes +Changing data from row-wise to column-wise +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -50,7 +51,11 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree training' started. -[5] 'FastTree training' finished in %Time%. -[6] 'Saving model' started. -[6] 'Saving model' finished in %Time%. +[5] 'FastTree data preparation #2' started. +[5] 'FastTree data preparation #2' finished in %Time%. +[6] 'FastTree feature conversion #2' started. +[6] 'FastTree feature conversion #2' finished in %Time%. +[7] 'FastTree training' started. +[7] 'FastTree training' finished in %Time%. +[8] 'Saving model' started. +[8] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt index 6f8744f870..d08fd2b758 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,7 +4,8 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects -Reserved memory for tree learner: 5016 bytes +Changing data from row-wise to column-wise on disk +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -46,7 +47,9 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree training' started. -[3] 'FastTree training' finished in %Time%. -[4] 'Saving model' started. -[4] 'Saving model' finished in %Time%. +[3] 'FastTree disk-based bins initialization #2' started. +[3] 'FastTree disk-based bins initialization #2' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt index 58e8aed7b1..ef974fde35 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt @@ -4,7 +4,8 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects -Reserved memory for tree learner: 28812 bytes +Changing data from row-wise to column-wise on disk +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -46,7 +47,9 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree training' started. -[3] 'FastTree training' finished in %Time%. -[4] 'Saving model' started. -[4] 'Saving model' finished in %Time%. +[3] 'FastTree disk-based bins initialization #2' started. +[3] 'FastTree disk-based bins initialization #2' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt index 743d238d0f..532e974ba9 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,7 +4,8 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects -Reserved memory for tree learner: 14688 bytes +Changing data from row-wise to column-wise on disk +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -46,7 +47,9 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree training' started. -[3] 'FastTree training' finished in %Time%. -[4] 'Saving model' started. -[4] 'Saving model' finished in %Time%. +[3] 'FastTree disk-based bins initialization #2' started. +[3] 'FastTree disk-based bins initialization #2' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt index 3bfe5092e9..95d79a778a 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt @@ -4,7 +4,8 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects -Reserved memory for tree learner: 38484 bytes +Changing data from row-wise to column-wise on disk +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -46,7 +47,9 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree training' started. -[3] 'FastTree training' finished in %Time%. -[4] 'Saving model' started. -[4] 'Saving model' finished in %Time%. +[3] 'FastTree disk-based bins initialization #2' started. +[3] 'FastTree disk-based bins initialization #2' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt index f3d444d231..add50cace0 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt @@ -5,7 +5,9 @@ Changing data from row-wise to column-wise on disk Warning: 16 of 699 examples will be skipped due to missing feature values Processed 683 instances Binning and forming Feature objects -Reserved memory for tree learner: 3852 bytes +Changing data from row-wise to column-wise on disk +Warning: 16 of 699 examples will be skipped due to missing feature values +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.3448 (241.0/(241.0+458.0)) @@ -44,7 +46,9 @@ Virtual memory usage(MB): %Number% --- Progress log --- [1] 'FastTree disk-based bins initialization' started. [1] 'FastTree disk-based bins initialization' finished in %Time%. -[2] 'FastTree training' started. -[2] 'FastTree training' finished in %Time%. -[3] 'Saving model' started. -[3] 'Saving model' finished in %Time%. +[2] 'FastTree disk-based bins initialization #2' started. +[2] 'FastTree disk-based bins initialization #2' finished in %Time%. +[3] 'FastTree training' started. +[3] 'FastTree training' finished in %Time%. +[4] 'Saving model' started. +[4] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt index 942e432cbf..74278aadad 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt @@ -5,7 +5,9 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Reserved memory for tree learner: 3852 bytes +Changing data from row-wise to column-wise +Warning: Skipped 16 instances with missing features during training +Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.3448 (241.0/(241.0+458.0)) @@ -48,7 +50,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt index 7e76faa1d9..58eac554cd 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt @@ -5,7 +5,9 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Reserved memory for tree learner: 468 bytes +Changing data from row-wise to column-wise +Warning: Skipped 16 instances with missing features during training +Reserved memory for tree learner: %Number% bytes Starting to train ... Warning: 5 of the boosting iterations failed to grow a tree. This is commonly because the minimum documents in leaf hyperparameter was set too high for this dataset. Not training a calibrator because it is not needed. @@ -49,7 +51,11 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[4] 'FastTree data preparation #2' started. +[4] 'FastTree data preparation #2' finished in %Time%. +[5] 'FastTree feature conversion #2' started. +[5] 'FastTree feature conversion #2' finished in %Time%. +[6] 'FastTree training' started. +[6] 'FastTree training' finished in %Time%. +[7] 'Saving model' started. +[7] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/NormalizerEstimator/normalized.tsv b/test/BaselineOutput/SingleRelease/NormalizerEstimator/normalized.tsv deleted file mode 100644 index b231f8e23d..0000000000 --- a/test/BaselineOutput/SingleRelease/NormalizerEstimator/normalized.tsv +++ /dev/null @@ -1,175 +0,0 @@ -#@ TextLoader{ -#@ header+ -#@ sep=tab -#@ col=float1:R4:0 -#@ col=float1:R4:1 -#@ col=float4:R4:2-5 -#@ col=float4:R4:6-9 -#@ col=double1:R8:10 -#@ col=double1:R8:11 -#@ col=double4:R8:12-15 -#@ col=double4:R8:16-19 -#@ col=int1:I4:20 -#@ col=float1bin:R4:21 -#@ col=float4bin:R4:22-25 -#@ col=double1bin:R8:26 -#@ col=double4bin:R8:27-30 -#@ col=float1mv:R4:31 -#@ col=float4mv:R4:32-35 -#@ col=double1mv:R8:36 -#@ col=double4mv:R8:37-40 -#@ col=float1lmv:R4:41 -#@ col=float4lmv:R4:42-45 -#@ col=double1lmv:R8:46 -#@ col=double4lmv:R8:47-50 -#@ } -float1 float1 5.1 3.5 1.4 0.2 5.1 3.5 1.4 0.2 double1 double1 5.1 3.5 1.4 0.2 5.1 3.5 1.4 0.2 int1 float1bin 5.1 3.5 1.4 0.2 double1bin 5.1 3.5 1.4 0.2 float1mv 5.1 3.5 1.4 0.2 double1mv 5.1 3.5 1.4 0.2 float1lmv 5.1 3.5 1.4 0.2 double1lmv 5.1 3.5 1.4 0.2 -4.9 0.6202532 4.9 3 1.4 0.2 0.6202532 0.6818181 0.202898547 0.0800000057 4.9000000000000004 0.620253164556962 4.9000000000000004 3 1.3999999999999999 0.20000000000000001 0.620253164556962 0.68181818181818177 0.20289855072463767 0.080000000000000016 0 0.1764706 0.1764706 0.4090909 0.0952381 0.04761905 0.17647058823529413 0.17647058823529413 0.40909090909090912 0.095238095238095233 0.047619047619047616 0.829617262 0.829617262 0.9735693 0.336375058 0.140421242 0.82961722543499561 0.82961722543499561 0.97356928368104678 0.33637507090625185 0.14042123582229432 0.117838435 0.117838435 0.480745673 0.07455328 0.07146728 0.11783846996167147 0.11783846996167147 0.4807456731235793 0.074553292690365869 0.071467286508792471 -4.7 0.594936669 4.7 3.2 1.3 0.2 0.594936669 0.7272727 0.188405782 0.0800000057 4.7000000000000002 0.59493670886075944 4.7000000000000002 3.2000000000000002 1.3 0.20000000000000001 0.59493670886075944 0.72727272727272729 0.18840579710144928 0.080000000000000016 0 0.117647059 0.117647059 0.5 0.0714285746 0.04761905 0.11764705882352941 0.11764705882352941 0.5 0.071428571428571425 0.047619047619047616 0.7957553 0.7957553 1.038474 0.312348276 0.140421242 0.79575529786622023 0.79575529786622023 1.0384739025931167 0.31234828012723387 0.14042123582229432 0.06917418 0.06917418 0.6578964 0.0582755022 0.07146728 0.069174201507542998 0.069174201507542998 0.65789648182451921 0.058275496366795021 0.071467286508792471 -4.6 0.5822785 4.6 3.1 1.5 0.2 0.5822785 0.7045454 0.2173913 0.0800000057 4.5999999999999996 0.58227848101265811 4.5999999999999996 3.1000000000000001 1.5 0.20000000000000001 0.58227848101265811 0.70454545454545459 0.21739130434782611 0.080000000000000016 0 0.0882353 0.0882353 0.454545468 0.119047619 0.04761905 0.088235294117647065 0.088235294117647065 0.45454545454545453 0.11904761904761904 0.047619047619047616 0.7788243 0.7788243 1.0060215 0.360401869 0.140421242 0.77882433408183249 0.77882433408183249 1.0060215931370817 0.36040186168526983 0.14042123582229432 0.0510348342 0.0510348342 0.5725629 0.0926237255 0.07146728 0.05103484272829939 0.05103484272829939 0.5725628341629212 0.092623715229236292 0.071467286508792471 -5 0.6329114 5 3.6 1.4 0.2 0.6329114 0.818181753 0.202898547 0.0800000057 5 0.63291139240506322 5 3.6000000000000001 1.3999999999999999 0.20000000000000001 0.63291139240506322 0.81818181818181812 0.20289855072463767 0.080000000000000016 0 0.205882356 0.205882356 0.6818182 0.0952381 0.04761905 0.20588235294117646 0.20588235294117646 0.68181818181818177 0.095238095238095233 0.047619047619047616 0.8465482 0.8465482 1.1682831 0.336375058 0.140421242 0.84654818921938324 0.84654818921938324 1.1682831404172562 0.33637507090625185 0.14042123582229432 0.14861621 0.14861621 0.8919594 0.07455328 0.07146728 0.14861616399327332 0.14861616399327332 0.89195941323598249 0.074553292690365869 0.071467286508792471 -5.4 0.683544338 5.4 3.9 1.7 0.4 0.683544338 0.8863636 0.246376812 0.160000011 5.4000000000000004 0.68354430379746833 5.4000000000000004 3.8999999999999999 1.7 0.40000000000000002 0.68354430379746833 0.88636363636363635 0.24637681159420291 0.16000000000000003 0 0.323529422 0.323529422 0.8181818 0.166666672 0.142857149 0.3235294117647059 0.3235294117647059 0.81818181818181823 0.16666666666666666 0.14285714285714285 0.9142721 0.9142721 1.26564014 0.408455431 0.280842483 0.91427204435693399 0.91427204435693399 1.2656400687853608 0.40845544324330579 0.28084247164458864 0.3099612 0.3099612 0.9642299 0.13329801 0.223406911 0.30996111189240849 0.30996111189240849 0.96422985148785167 0.1332979854433643 0.22340689032507804 -4.6 0.5822785 4.6 3.4 1.4 0.3 0.5822785 0.772727251 0.202898547 0.120000005 4.5999999999999996 0.58227848101265811 4.5999999999999996 3.3999999999999999 1.3999999999999999 0.29999999999999999 0.58227848101265811 0.77272727272727271 0.20289855072463767 0.12 0 0.0882353 0.0882353 0.590909064 0.0952381 0.0952381 0.088235294117647065 0.088235294117647065 0.59090909090909094 0.095238095238095233 0.095238095238095233 0.7788243 0.7788243 1.10337853 0.336375058 0.210631862 0.77882433408183249 0.77882433408183249 1.1033785215051863 0.33637507090625185 0.21063185373344145 0.0510348342 0.0510348342 0.797875941 0.07455328 0.146190211 0.05103484272829939 0.05103484272829939 0.79787580879856601 0.074553292690365869 0.14619023377705653 -5 0.6329114 5 3.4 1.5 0.2 0.6329114 0.772727251 0.2173913 0.0800000057 5 0.63291139240506322 5 3.3999999999999999 1.5 0.20000000000000001 0.63291139240506322 0.77272727272727271 0.21739130434782611 0.080000000000000016 0 0.205882356 0.205882356 0.590909064 0.119047619 0.04761905 0.20588235294117646 0.20588235294117646 0.59090909090909094 0.11904761904761904 0.047619047619047616 0.8465482 0.8465482 1.10337853 0.360401869 0.140421242 0.84654818921938324 0.84654818921938324 1.1033785215051863 0.36040186168526983 0.14042123582229432 0.14861621 0.14861621 0.797875941 0.0926237255 0.07146728 0.14861616399327332 0.14861616399327332 0.79787580879856601 0.092623715229236292 0.071467286508792471 -4.4 0.5569621 4.4 2.9 1.4 0.2 0.5569621 0.659090936 0.202898547 0.0800000057 4.4000000000000004 0.55696202531645567 4.4000000000000004 2.8999999999999999 1.3999999999999999 0.20000000000000001 0.55696202531645567 0.65909090909090906 0.20289855072463767 0.080000000000000016 0 0.0294117648 0.0294117648 0.363636374 0.0952381 0.04761905 0.029411764705882353 0.029411764705882353 0.36363636363636365 0.095238095238095233 0.047619047619047616 0.744962454 0.744962454 0.941117 0.336375058 0.140421242 0.74496240651305734 0.74496240651305734 0.94111697422501195 0.33637507090625185 0.14042123582229432 0.0255098473 0.0255098473 0.386941522 0.07455328 0.07146728 0.025509830781751675 0.025509830781751675 0.38694155923435009 0.074553292690365869 0.071467286508792471 -4.9 0.6202532 4.9 3.1 1.5 0.1 0.6202532 0.7045454 0.2173913 0.0400000028 4.9000000000000004 0.620253164556962 4.9000000000000004 3.1000000000000001 1.5 0.10000000000000001 0.620253164556962 0.70454545454545459 0.21739130434782611 0.040000000000000008 0 0.1764706 0.1764706 0.454545468 0.119047619 0 0.17647058823529413 0.17647058823529413 0.45454545454545453 0.11904761904761904 0 0.829617262 0.829617262 1.0060215 0.360401869 0.07021062 0.82961722543499561 0.82961722543499561 1.0060215931370817 0.36040186168526983 0.070210617911147161 0.117838435 0.117838435 0.5725629 0.0926237255 0.0149739943 0.11783846996167147 0.11783846996167147 0.5725628341629212 0.092623715229236292 0.014973996264087019 -5.4 0.683544338 5.4 3.7 1.5 0.2 0.683544338 0.840909064 0.2173913 0.0800000057 5.4000000000000004 0.68354430379746833 5.4000000000000004 3.7000000000000002 1.5 0.20000000000000001 0.68354430379746833 0.84090909090909094 0.21739130434782611 0.080000000000000016 0 0.323529422 0.323529422 0.727272749 0.119047619 0.04761905 0.3235294117647059 0.3235294117647059 0.72727272727272729 0.11904761904761904 0.047619047619047616 0.9142721 0.9142721 1.20073545 0.360401869 0.140421242 0.91427204435693399 0.91427204435693399 1.2007354498732912 0.36040186168526983 0.14042123582229432 0.3099612 0.3099612 0.9236834 0.0926237255 0.07146728 0.30996111189240849 0.30996111189240849 0.92368343544686704 0.092623715229236292 0.071467286508792471 -4.8 0.607594967 4.8 3.4 1.6 0.2 0.607594967 0.772727251 0.231884047 0.0800000057 4.7999999999999998 0.60759493670886067 4.7999999999999998 3.3999999999999999 1.6000000000000001 0.20000000000000001 0.60759493670886067 0.77272727272727271 0.23188405797101452 0.080000000000000016 0 0.14705883 0.14705883 0.590909064 0.142857149 0.04761905 0.14705882352941177 0.14705882352941177 0.59090909090909094 0.14285714285714285 0.047619047619047616 0.8126863 0.8126863 1.10337853 0.38442865 0.140421242 0.81268626165060787 0.81268626165060787 1.1033785215051863 0.38442865246428787 0.14042123582229432 0.09137413 0.09137413 0.797875941 0.112279132 0.07146728 0.091374136005250073 0.091374136005250073 0.79787580879856601 0.11227913256984562 0.071467286508792471 -4.8 0.607594967 4.8 3 1.4 0.1 0.607594967 0.6818181 0.202898547 0.0400000028 4.7999999999999998 0.60759493670886067 4.7999999999999998 3 1.3999999999999999 0.10000000000000001 0.60759493670886067 0.68181818181818177 0.20289855072463767 0.040000000000000008 0 0.14705883 0.14705883 0.4090909 0.0952381 0 0.14705882352941177 0.14705882352941177 0.40909090909090912 0.095238095238095233 0 0.8126863 0.8126863 0.9735693 0.336375058 0.07021062 0.81268626165060787 0.81268626165060787 0.97356928368104678 0.33637507090625185 0.070210617911147161 0.09137413 0.09137413 0.480745673 0.07455328 0.0149739943 0.091374136005250073 0.091374136005250073 0.4807456731235793 0.074553292690365869 0.014973996264087019 -4.3 0.544303834 4.3 3 1.1 0.1 0.544303834 0.6818181 0.159420282 0.0400000028 4.2999999999999998 0.54430379746835433 4.2999999999999998 3 1.1000000000000001 0.10000000000000001 0.54430379746835433 0.68181818181818177 0.15942028985507248 0.040000000000000008 0 0 0 0.4090909 0.0238095243 0 0 0 0.40909090909090912 0.023809523809523808 0 0.7280315 0.7280315 0.9735693 0.264294684 0.07021062 0.7280314427286696 0.7280314427286696 0.97356928368104678 0.26429469856919791 0.070210617911147161 0.01720981 0.01720981 0.480745673 0.0317756645 0.0149739943 0.017209798931850762 0.017209798931850762 0.4807456731235793 0.031775654639957629 0.014973996264087019 -5.8 0.734177232 5.8 4 1.2 0.2 0.734177232 0.9090909 0.173913047 0.0800000057 5.7999999999999998 0.73417721518987333 5.7999999999999998 4 1.2 0.20000000000000001 0.73417721518987333 0.90909090909090906 0.17391304347826086 0.080000000000000016 0 0.441176474 0.441176474 0.8636364 0.04761905 0.04761905 0.44117647058823528 0.44117647058823528 0.86363636363636365 0.047619047619047616 0.047619047619047616 0.981996 0.981996 1.29809237 0.2883215 0.140421242 0.98199589949448451 0.98199589949448451 1.2980923782413958 0.28832148934821589 0.14042123582229432 0.504585147 0.504585147 0.9762056 0.0439706929 0.07146728 0.50458515122771275 0.50458515122771275 0.9762055888000436 0.043970678884132197 0.071467286508792471 -5.7 0.721519 5.7 4.4 1.5 0.4 0.721519 1 0.2173913 0.160000011 5.7000000000000002 0.72151898734177211 5.7000000000000002 4.4000000000000004 1.5 0.40000000000000002 0.72151898734177211 1 0.21739130434782611 0.16000000000000003 0 0.4117647 0.4117647 1 0.119047619 0.142857149 0.41176470588235292 0.41176470588235292 1 0.11904761904761904 0.14285714285714285 0.965064943 0.965064943 1.42790163 0.360401869 0.280842483 0.96506493571009688 0.96506493571009688 1.4279016160655356 0.36040186168526983 0.28084247164458864 0.455403626 0.455403626 0.996043563 0.0926237255 0.223406911 0.45540375842690767 0.45540375842690767 0.99604355189588412 0.092623715229236292 0.22340689032507804 -5.4 0.683544338 5.4 3.9 1.3 0.4 0.683544338 0.8863636 0.188405782 0.160000011 5.4000000000000004 0.68354430379746833 5.4000000000000004 3.8999999999999999 1.3 0.40000000000000002 0.68354430379746833 0.88636363636363635 0.18840579710144928 0.16000000000000003 0 0.323529422 0.323529422 0.8181818 0.0714285746 0.142857149 0.3235294117647059 0.3235294117647059 0.81818181818181823 0.071428571428571425 0.14285714285714285 0.9142721 0.9142721 1.26564014 0.312348276 0.280842483 0.91427204435693399 0.91427204435693399 1.2656400687853608 0.31234828012723387 0.28084247164458864 0.3099612 0.3099612 0.9642299 0.0582755022 0.223406911 0.30996111189240849 0.30996111189240849 0.96422985148785167 0.058275496366795021 0.22340689032507804 -5.1 0.6455696 5.1 3.5 1.4 0.3 0.6455696 0.7954545 0.202898547 0.120000005 5.0999999999999996 0.64556962025316444 5.0999999999999996 3.5 1.3999999999999999 0.29999999999999999 0.64556962025316444 0.79545454545454541 0.20289855072463767 0.12 0 0.235294119 0.235294119 0.6363636 0.0952381 0.0952381 0.23529411764705882 0.23529411764705882 0.63636363636363635 0.095238095238095233 0.095238095238095233 0.8634792 0.8634792 1.13583088 0.336375058 0.210631862 0.86347915300377087 0.86347915300377087 1.1358308309612213 0.33637507090625185 0.21063185373344145 0.183586776 0.183586776 0.8504554 0.07455328 0.146190211 0.18358681923369741 0.18358681923369741 0.8504555107896975 0.074553292690365869 0.14619023377705653 -5.7 0.721519 5.7 3.8 1.7 0.3 0.721519 0.8636363 0.246376812 0.120000005 5.7000000000000002 0.72151898734177211 5.7000000000000002 3.7999999999999998 1.7 0.29999999999999999 0.72151898734177211 0.86363636363636354 0.24637681159420291 0.12 0 0.4117647 0.4117647 0.772727251 0.166666672 0.0952381 0.41176470588235292 0.41176470588235292 0.77272727272727271 0.16666666666666666 0.095238095238095233 0.965064943 0.965064943 1.23318768 0.408455431 0.210631862 0.96506493571009688 0.96506493571009688 1.2331877593293259 0.40845544324330579 0.21063185373344145 0.455403626 0.455403626 0.9472266 0.13329801 0.146190211 0.45540375842690767 0.45540375842690767 0.94722658326235554 0.1332979854433643 0.14619023377705653 -5.1 0.6455696 5.1 3.8 1.5 0.3 0.6455696 0.8636363 0.2173913 0.120000005 5.0999999999999996 0.64556962025316444 5.0999999999999996 3.7999999999999998 1.5 0.29999999999999999 0.64556962025316444 0.86363636363636354 0.21739130434782611 0.12 0 0.235294119 0.235294119 0.772727251 0.119047619 0.0952381 0.23529411764705882 0.23529411764705882 0.77272727272727271 0.11904761904761904 0.095238095238095233 0.8634792 0.8634792 1.23318768 0.360401869 0.210631862 0.86347915300377087 0.86347915300377087 1.2331877593293259 0.36040186168526983 0.21063185373344145 0.183586776 0.183586776 0.9472266 0.0926237255 0.146190211 0.18358681923369741 0.18358681923369741 0.94722658326235554 0.092623715229236292 0.14619023377705653 -5.4 0.683544338 5.4 3.4 1.7 0.2 0.683544338 0.772727251 0.246376812 0.0800000057 5.4000000000000004 0.68354430379746833 5.4000000000000004 3.3999999999999999 1.7 0.20000000000000001 0.68354430379746833 0.77272727272727271 0.24637681159420291 0.080000000000000016 0 0.323529422 0.323529422 0.590909064 0.166666672 0.04761905 0.3235294117647059 0.3235294117647059 0.59090909090909094 0.16666666666666666 0.047619047619047616 0.9142721 0.9142721 1.10337853 0.408455431 0.140421242 0.91427204435693399 0.91427204435693399 1.1033785215051863 0.40845544324330579 0.14042123582229432 0.3099612 0.3099612 0.797875941 0.13329801 0.07146728 0.30996111189240849 0.30996111189240849 0.79787580879856601 0.1332979854433643 0.071467286508792471 -5.1 0.6455696 5.1 3.7 1.5 0.4 0.6455696 0.840909064 0.2173913 0.160000011 5.0999999999999996 0.64556962025316444 5.0999999999999996 3.7000000000000002 1.5 0.40000000000000002 0.64556962025316444 0.84090909090909094 0.21739130434782611 0.16000000000000003 0 0.235294119 0.235294119 0.727272749 0.119047619 0.142857149 0.23529411764705882 0.23529411764705882 0.72727272727272729 0.11904761904761904 0.14285714285714285 0.8634792 0.8634792 1.20073545 0.360401869 0.280842483 0.86347915300377087 0.86347915300377087 1.2007354498732912 0.36040186168526983 0.28084247164458864 0.183586776 0.183586776 0.9236834 0.0926237255 0.223406911 0.18358681923369741 0.18358681923369741 0.92368343544686704 0.092623715229236292 0.22340689032507804 -4.6 0.5822785 4.6 3.6 1 0.2 0.5822785 0.818181753 0.144927531 0.0800000057 4.5999999999999996 0.58227848101265811 4.5999999999999996 3.6000000000000001 1 0.20000000000000001 0.58227848101265811 0.81818181818181812 0.14492753623188406 0.080000000000000016 0 0.0882353 0.0882353 0.6818182 0 0.04761905 0.088235294117647065 0.088235294117647065 0.68181818181818177 0 0.047619047619047616 0.7788243 0.7788243 1.1682831 0.2402679 0.140421242 0.77882433408183249 0.77882433408183249 1.1682831404172562 0.2402679077901799 0.14042123582229432 0.0510348342 0.0510348342 0.8919594 0.0217650775 0.07146728 0.05103484272829939 0.05103484272829939 0.89195941323598249 0.021765071971117544 0.071467286508792471 -5.1 0.6455696 5.1 3.3 1.7 0.5 0.6455696 0.74999994 0.246376812 0.2 5.0999999999999996 0.64556962025316444 5.0999999999999996 3.2999999999999998 1.7 0.5 0.64556962025316444 0.74999999999999989 0.24637681159420291 0.20000000000000001 0 0.235294119 0.235294119 0.545454562 0.166666672 0.1904762 0.23529411764705882 0.23529411764705882 0.54545454545454541 0.16666666666666666 0.19047619047619047 0.8634792 0.8634792 1.07092619 0.408455431 0.3510531 0.86347915300377087 0.86347915300377087 1.0709262120491514 0.40845544324330579 0.35105308955573578 0.183586776 0.183586776 0.733567655 0.13329801 0.29663077 0.18358681923369741 0.18358681923369741 0.73356785053506501 0.1332979854433643 0.29663078722186503 -4.8 0.607594967 4.8 3.4 1.9 0.2 0.607594967 0.772727251 0.2753623 0.0800000057 4.7999999999999998 0.60759493670886067 4.7999999999999998 3.3999999999999999 1.8999999999999999 0.20000000000000001 0.60759493670886067 0.77272727272727271 0.27536231884057971 0.080000000000000016 0 0.14705883 0.14705883 0.590909064 0.1904762 0.04761905 0.14705882352941177 0.14705882352941177 0.59090909090909094 0.19047619047619047 0.047619047619047616 0.8126863 0.8126863 1.10337853 0.456509024 0.140421242 0.81268626165060787 0.81268626165060787 1.1033785215051863 0.45650902480134176 0.14042123582229432 0.09137413 0.09137413 0.797875941 0.1785302 0.07146728 0.091374136005250073 0.091374136005250073 0.79787580879856601 0.17853019682812199 0.071467286508792471 -5 0.6329114 5 3 1.6 0.2 0.6329114 0.6818181 0.231884047 0.0800000057 5 0.63291139240506322 5 3 1.6000000000000001 0.20000000000000001 0.63291139240506322 0.68181818181818177 0.23188405797101452 0.080000000000000016 0 0.205882356 0.205882356 0.4090909 0.142857149 0.04761905 0.20588235294117646 0.20588235294117646 0.40909090909090912 0.14285714285714285 0.047619047619047616 0.8465482 0.8465482 0.9735693 0.38442865 0.140421242 0.84654818921938324 0.84654818921938324 0.97356928368104678 0.38442865246428787 0.14042123582229432 0.14861621 0.14861621 0.480745673 0.112279132 0.07146728 0.14861616399327332 0.14861616399327332 0.4807456731235793 0.11227913256984562 0.071467286508792471 -5 0.6329114 5 3.4 1.6 0.4 0.6329114 0.772727251 0.231884047 0.160000011 5 0.63291139240506322 5 3.3999999999999999 1.6000000000000001 0.40000000000000002 0.63291139240506322 0.77272727272727271 0.23188405797101452 0.16000000000000003 0 0.205882356 0.205882356 0.590909064 0.142857149 0.142857149 0.20588235294117646 0.20588235294117646 0.59090909090909094 0.14285714285714285 0.14285714285714285 0.8465482 0.8465482 1.10337853 0.38442865 0.280842483 0.84654818921938324 0.84654818921938324 1.1033785215051863 0.38442865246428787 0.28084247164458864 0.14861621 0.14861621 0.797875941 0.112279132 0.223406911 0.14861616399327332 0.14861616399327332 0.79787580879856601 0.11227913256984562 0.22340689032507804 -5.2 0.6582278 5.2 3.5 1.5 0.2 0.6582278 0.7954545 0.2173913 0.0800000057 5.2000000000000002 0.65822784810126578 5.2000000000000002 3.5 1.5 0.20000000000000001 0.65822784810126578 0.79545454545454541 0.21739130434782611 0.080000000000000016 0 0.2647059 0.2647059 0.6363636 0.119047619 0.04761905 0.26470588235294118 0.26470588235294118 0.63636363636363635 0.11904761904761904 0.047619047619047616 0.880410135 0.880410135 1.13583088 0.360401869 0.140421242 0.88041011678815861 0.88041011678815861 1.1358308309612213 0.36040186168526983 0.14042123582229432 0.222458825 0.222458825 0.8504554 0.0926237255 0.07146728 0.22245879972342997 0.22245879972342997 0.8504555107896975 0.092623715229236292 0.071467286508792471 -5.2 0.6582278 5.2 3.4 1.4 0.2 0.6582278 0.772727251 0.202898547 0.0800000057 5.2000000000000002 0.65822784810126578 5.2000000000000002 3.3999999999999999 1.3999999999999999 0.20000000000000001 0.65822784810126578 0.77272727272727271 0.20289855072463767 0.080000000000000016 0 0.2647059 0.2647059 0.590909064 0.0952381 0.04761905 0.26470588235294118 0.26470588235294118 0.59090909090909094 0.095238095238095233 0.047619047619047616 0.880410135 0.880410135 1.10337853 0.336375058 0.140421242 0.88041011678815861 0.88041011678815861 1.1033785215051863 0.33637507090625185 0.14042123582229432 0.222458825 0.222458825 0.797875941 0.07455328 0.07146728 0.22245879972342997 0.22245879972342997 0.79787580879856601 0.074553292690365869 0.071467286508792471 -4.7 0.594936669 4.7 3.2 1.6 0.2 0.594936669 0.7272727 0.231884047 0.0800000057 4.7000000000000002 0.59493670886075944 4.7000000000000002 3.2000000000000002 1.6000000000000001 0.20000000000000001 0.59493670886075944 0.72727272727272729 0.23188405797101452 0.080000000000000016 0 0.117647059 0.117647059 0.5 0.142857149 0.04761905 0.11764705882352941 0.11764705882352941 0.5 0.14285714285714285 0.047619047619047616 0.7957553 0.7957553 1.038474 0.38442865 0.140421242 0.79575529786622023 0.79575529786622023 1.0384739025931167 0.38442865246428787 0.14042123582229432 0.06917418 0.06917418 0.6578964 0.112279132 0.07146728 0.069174201507542998 0.069174201507542998 0.65789648182451921 0.11227913256984562 0.071467286508792471 -4.8 0.607594967 4.8 3.1 1.6 0.2 0.607594967 0.7045454 0.231884047 0.0800000057 4.7999999999999998 0.60759493670886067 4.7999999999999998 3.1000000000000001 1.6000000000000001 0.20000000000000001 0.60759493670886067 0.70454545454545459 0.23188405797101452 0.080000000000000016 0 0.14705883 0.14705883 0.454545468 0.142857149 0.04761905 0.14705882352941177 0.14705882352941177 0.45454545454545453 0.14285714285714285 0.047619047619047616 0.8126863 0.8126863 1.0060215 0.38442865 0.140421242 0.81268626165060787 0.81268626165060787 1.0060215931370817 0.38442865246428787 0.14042123582229432 0.09137413 0.09137413 0.5725629 0.112279132 0.07146728 0.091374136005250073 0.091374136005250073 0.5725628341629212 0.11227913256984562 0.071467286508792471 -5.4 0.683544338 5.4 3.4 1.5 0.4 0.683544338 0.772727251 0.2173913 0.160000011 5.4000000000000004 0.68354430379746833 5.4000000000000004 3.3999999999999999 1.5 0.40000000000000002 0.68354430379746833 0.77272727272727271 0.21739130434782611 0.16000000000000003 0 0.323529422 0.323529422 0.590909064 0.119047619 0.142857149 0.3235294117647059 0.3235294117647059 0.59090909090909094 0.11904761904761904 0.14285714285714285 0.9142721 0.9142721 1.10337853 0.360401869 0.280842483 0.91427204435693399 0.91427204435693399 1.1033785215051863 0.36040186168526983 0.28084247164458864 0.3099612 0.3099612 0.797875941 0.0926237255 0.223406911 0.30996111189240849 0.30996111189240849 0.79787580879856601 0.092623715229236292 0.22340689032507804 -5.2 0.6582278 5.2 4.1 1.5 0.1 0.6582278 0.9318181 0.2173913 0.0400000028 5.2000000000000002 0.65822784810126578 5.2000000000000002 4.0999999999999996 1.5 0.10000000000000001 0.65822784810126578 0.93181818181818166 0.21739130434782611 0.040000000000000008 0 0.2647059 0.2647059 0.909090936 0.119047619 0 0.26470588235294118 0.26470588235294118 0.90909090909090906 0.11904761904761904 0 0.880410135 0.880410135 1.33054459 0.360401869 0.07021062 0.88041011678815861 0.88041011678815861 1.3305446876974305 0.36040186168526983 0.070210617911147161 0.222458825 0.222458825 0.984447062 0.0926237255 0.0149739943 0.22245879972342997 0.22245879972342997 0.98444709277532771 0.092623715229236292 0.014973996264087019 -5.5 0.6962025 5.5 4.2 1.4 0.2 0.6962025 0.9545454 0.202898547 0.0800000057 5.5 0.69620253164556956 5.5 4.2000000000000002 1.3999999999999999 0.20000000000000001 0.69620253164556956 0.95454545454545459 0.20289855072463767 0.080000000000000016 0 0.3529412 0.3529412 0.954545438 0.0952381 0.04761905 0.35294117647058826 0.35294117647058826 0.95454545454545459 0.095238095238095233 0.047619047619047616 0.931203067 0.931203067 1.36299694 0.336375058 0.140421242 0.93120300814132162 0.93120300814132162 1.3629969971534657 0.33637507090625185 0.14042123582229432 0.3573058 0.3573058 0.9899987 0.07455328 0.07146728 0.35730592590256216 0.35730592590256216 0.98999870773555454 0.074553292690365869 0.071467286508792471 -4.9 0.6202532 4.9 3.1 1.5 0.1 0.6202532 0.7045454 0.2173913 0.0400000028 4.9000000000000004 0.620253164556962 4.9000000000000004 3.1000000000000001 1.5 0.10000000000000001 0.620253164556962 0.70454545454545459 0.21739130434782611 0.040000000000000008 0 0.1764706 0.1764706 0.454545468 0.119047619 0 0.17647058823529413 0.17647058823529413 0.45454545454545453 0.11904761904761904 0 0.829617262 0.829617262 1.0060215 0.360401869 0.07021062 0.82961722543499561 0.82961722543499561 1.0060215931370817 0.36040186168526983 0.070210617911147161 0.117838435 0.117838435 0.5725629 0.0926237255 0.0149739943 0.11783846996167147 0.11783846996167147 0.5725628341629212 0.092623715229236292 0.014973996264087019 -5 0.6329114 5 3.2 1.2 0.2 0.6329114 0.7272727 0.173913047 0.0800000057 5 0.63291139240506322 5 3.2000000000000002 1.2 0.20000000000000001 0.63291139240506322 0.72727272727272729 0.17391304347826086 0.080000000000000016 0 0.205882356 0.205882356 0.5 0.04761905 0.04761905 0.20588235294117646 0.20588235294117646 0.5 0.047619047619047616 0.047619047619047616 0.8465482 0.8465482 1.038474 0.2883215 0.140421242 0.84654818921938324 0.84654818921938324 1.0384739025931167 0.28832148934821589 0.14042123582229432 0.14861621 0.14861621 0.6578964 0.0439706929 0.07146728 0.14861616399327332 0.14861616399327332 0.65789648182451921 0.043970678884132197 0.071467286508792471 -5.5 0.6962025 5.5 3.5 1.3 0.2 0.6962025 0.7954545 0.188405782 0.0800000057 5.5 0.69620253164556956 5.5 3.5 1.3 0.20000000000000001 0.69620253164556956 0.79545454545454541 0.18840579710144928 0.080000000000000016 0 0.3529412 0.3529412 0.6363636 0.0714285746 0.04761905 0.35294117647058826 0.35294117647058826 0.63636363636363635 0.071428571428571425 0.047619047619047616 0.931203067 0.931203067 1.13583088 0.312348276 0.140421242 0.93120300814132162 0.93120300814132162 1.1358308309612213 0.31234828012723387 0.14042123582229432 0.3573058 0.3573058 0.8504554 0.0582755022 0.07146728 0.35730592590256216 0.35730592590256216 0.8504555107896975 0.058275496366795021 0.071467286508792471 -4.9 0.6202532 4.9 3.1 1.5 0.1 0.6202532 0.7045454 0.2173913 0.0400000028 4.9000000000000004 0.620253164556962 4.9000000000000004 3.1000000000000001 1.5 0.10000000000000001 0.620253164556962 0.70454545454545459 0.21739130434782611 0.040000000000000008 0 0.1764706 0.1764706 0.454545468 0.119047619 0 0.17647058823529413 0.17647058823529413 0.45454545454545453 0.11904761904761904 0 0.829617262 0.829617262 1.0060215 0.360401869 0.07021062 0.82961722543499561 0.82961722543499561 1.0060215931370817 0.36040186168526983 0.070210617911147161 0.117838435 0.117838435 0.5725629 0.0926237255 0.0149739943 0.11783846996167147 0.11783846996167147 0.5725628341629212 0.092623715229236292 0.014973996264087019 -4.4 0.5569621 4.4 3 1.3 0.2 0.5569621 0.6818181 0.188405782 0.0800000057 4.4000000000000004 0.55696202531645567 4.4000000000000004 3 1.3 0.20000000000000001 0.55696202531645567 0.68181818181818177 0.18840579710144928 0.080000000000000016 0 0.0294117648 0.0294117648 0.4090909 0.0714285746 0.04761905 0.029411764705882353 0.029411764705882353 0.40909090909090912 0.071428571428571425 0.047619047619047616 0.744962454 0.744962454 0.9735693 0.312348276 0.140421242 0.74496240651305734 0.74496240651305734 0.97356928368104678 0.31234828012723387 0.14042123582229432 0.0255098473 0.0255098473 0.480745673 0.0582755022 0.07146728 0.025509830781751675 0.025509830781751675 0.4807456731235793 0.058275496366795021 0.071467286508792471 -5.1 0.6455696 5.1 3.4 1.5 0.2 0.6455696 0.772727251 0.2173913 0.0800000057 5.0999999999999996 0.64556962025316444 5.0999999999999996 3.3999999999999999 1.5 0.20000000000000001 0.64556962025316444 0.77272727272727271 0.21739130434782611 0.080000000000000016 0 0.235294119 0.235294119 0.590909064 0.119047619 0.04761905 0.23529411764705882 0.23529411764705882 0.59090909090909094 0.11904761904761904 0.047619047619047616 0.8634792 0.8634792 1.10337853 0.360401869 0.140421242 0.86347915300377087 0.86347915300377087 1.1033785215051863 0.36040186168526983 0.14042123582229432 0.183586776 0.183586776 0.797875941 0.0926237255 0.07146728 0.18358681923369741 0.18358681923369741 0.79787580879856601 0.092623715229236292 0.071467286508792471 -5 0.6329114 5 3.5 1.3 0.3 0.6329114 0.7954545 0.188405782 0.120000005 5 0.63291139240506322 5 3.5 1.3 0.29999999999999999 0.63291139240506322 0.79545454545454541 0.18840579710144928 0.12 0 0.205882356 0.205882356 0.6363636 0.0714285746 0.0952381 0.20588235294117646 0.20588235294117646 0.63636363636363635 0.071428571428571425 0.095238095238095233 0.8465482 0.8465482 1.13583088 0.312348276 0.210631862 0.84654818921938324 0.84654818921938324 1.1358308309612213 0.31234828012723387 0.21063185373344145 0.14861621 0.14861621 0.8504554 0.0582755022 0.146190211 0.14861616399327332 0.14861616399327332 0.8504555107896975 0.058275496366795021 0.14619023377705653 -4.5 0.569620252 4.5 2.3 1.3 0.3 0.569620252 0.522727251 0.188405782 0.120000005 4.5 0.56962025316455689 4.5 2.2999999999999998 1.3 0.29999999999999999 0.56962025316455689 0.52272727272727271 0.18840579710144928 0.12 0 0.05882353 0.05882353 0.09090909 0.0714285746 0.0952381 0.058823529411764705 0.058823529411764705 0.090909090909090912 0.071428571428571425 0.095238095238095233 0.7618934 0.7618934 0.7464031 0.312348276 0.210631862 0.76189337029744486 0.76189337029744486 0.7464031174888025 0.31234828012723387 0.21063185373344145 0.0366229452 0.0366229452 0.02727463 0.0582755022 0.146190211 0.036622927317243759 0.036622927317243759 0.027274649605582402 0.058275496366795021 0.14619023377705653 -4.4 0.5569621 4.4 3.2 1.3 0.2 0.5569621 0.7272727 0.188405782 0.0800000057 4.4000000000000004 0.55696202531645567 4.4000000000000004 3.2000000000000002 1.3 0.20000000000000001 0.55696202531645567 0.72727272727272729 0.18840579710144928 0.080000000000000016 0 0.0294117648 0.0294117648 0.5 0.0714285746 0.04761905 0.029411764705882353 0.029411764705882353 0.5 0.071428571428571425 0.047619047619047616 0.744962454 0.744962454 1.038474 0.312348276 0.140421242 0.74496240651305734 0.74496240651305734 1.0384739025931167 0.31234828012723387 0.14042123582229432 0.0255098473 0.0255098473 0.6578964 0.0582755022 0.07146728 0.025509830781751675 0.025509830781751675 0.65789648182451921 0.058275496366795021 0.071467286508792471 -5 0.6329114 5 3.5 1.6 0.6 0.6329114 0.7954545 0.231884047 0.24000001 5 0.63291139240506322 5 3.5 1.6000000000000001 0.59999999999999998 0.63291139240506322 0.79545454545454541 0.23188405797101452 0.23999999999999999 0 0.205882356 0.205882356 0.6363636 0.142857149 0.238095239 0.20588235294117646 0.20588235294117646 0.63636363636363635 0.14285714285714285 0.23809523809523808 0.8465482 0.8465482 1.13583088 0.38442865 0.421263725 0.84654818921938324 0.84654818921938324 1.1358308309612213 0.38442865246428787 0.42126370746688291 0.14861621 0.14861621 0.8504554 0.112279132 0.363569826 0.14861616399327332 0.14861616399327332 0.8504555107896975 0.11227913256984562 0.36356980977329256 -5.1 0.6455696 5.1 3.8 1.9 0.4 0.6455696 0.8636363 0.2753623 0.160000011 5.0999999999999996 0.64556962025316444 5.0999999999999996 3.7999999999999998 1.8999999999999999 0.40000000000000002 0.64556962025316444 0.86363636363636354 0.27536231884057971 0.16000000000000003 0 0.235294119 0.235294119 0.772727251 0.1904762 0.142857149 0.23529411764705882 0.23529411764705882 0.77272727272727271 0.19047619047619047 0.14285714285714285 0.8634792 0.8634792 1.23318768 0.456509024 0.280842483 0.86347915300377087 0.86347915300377087 1.2331877593293259 0.45650902480134176 0.28084247164458864 0.183586776 0.183586776 0.9472266 0.1785302 0.223406911 0.18358681923369741 0.18358681923369741 0.94722658326235554 0.17853019682812199 0.22340689032507804 -4.8 0.607594967 4.8 3 1.4 0.3 0.607594967 0.6818181 0.202898547 0.120000005 4.7999999999999998 0.60759493670886067 4.7999999999999998 3 1.3999999999999999 0.29999999999999999 0.60759493670886067 0.68181818181818177 0.20289855072463767 0.12 0 0.14705883 0.14705883 0.4090909 0.0952381 0.0952381 0.14705882352941177 0.14705882352941177 0.40909090909090912 0.095238095238095233 0.095238095238095233 0.8126863 0.8126863 0.9735693 0.336375058 0.210631862 0.81268626165060787 0.81268626165060787 0.97356928368104678 0.33637507090625185 0.21063185373344145 0.09137413 0.09137413 0.480745673 0.07455328 0.146190211 0.091374136005250073 0.091374136005250073 0.4807456731235793 0.074553292690365869 0.14619023377705653 -5.1 0.6455696 5.1 3.8 1.6 0.2 0.6455696 0.8636363 0.231884047 0.0800000057 5.0999999999999996 0.64556962025316444 5.0999999999999996 3.7999999999999998 1.6000000000000001 0.20000000000000001 0.64556962025316444 0.86363636363636354 0.23188405797101452 0.080000000000000016 0 0.235294119 0.235294119 0.772727251 0.142857149 0.04761905 0.23529411764705882 0.23529411764705882 0.77272727272727271 0.14285714285714285 0.047619047619047616 0.8634792 0.8634792 1.23318768 0.38442865 0.140421242 0.86347915300377087 0.86347915300377087 1.2331877593293259 0.38442865246428787 0.14042123582229432 0.183586776 0.183586776 0.9472266 0.112279132 0.07146728 0.18358681923369741 0.18358681923369741 0.94722658326235554 0.11227913256984562 0.071467286508792471 -4.6 0.5822785 4.6 3.2 1.4 0.2 0.5822785 0.7272727 0.202898547 0.0800000057 4.5999999999999996 0.58227848101265811 4.5999999999999996 3.2000000000000002 1.3999999999999999 0.20000000000000001 0.58227848101265811 0.72727272727272729 0.20289855072463767 0.080000000000000016 0 0.0882353 0.0882353 0.5 0.0952381 0.04761905 0.088235294117647065 0.088235294117647065 0.5 0.095238095238095233 0.047619047619047616 0.7788243 0.7788243 1.038474 0.336375058 0.140421242 0.77882433408183249 0.77882433408183249 1.0384739025931167 0.33637507090625185 0.14042123582229432 0.0510348342 0.0510348342 0.6578964 0.07455328 0.07146728 0.05103484272829939 0.05103484272829939 0.65789648182451921 0.074553292690365869 0.071467286508792471 -5.3 0.6708861 5.3 3.7 1.5 0.2 0.6708861 0.840909064 0.2173913 0.0800000057 5.2999999999999998 0.670886075949367 5.2999999999999998 3.7000000000000002 1.5 0.20000000000000001 0.670886075949367 0.84090909090909094 0.21739130434782611 0.080000000000000016 0 0.294117659 0.294117659 0.727272749 0.119047619 0.04761905 0.29411764705882354 0.29411764705882354 0.72727272727272729 0.11904761904761904 0.047619047619047616 0.897341132 0.897341132 1.20073545 0.360401869 0.140421242 0.89734108057254625 0.89734108057254625 1.2007354498732912 0.36040186168526983 0.14042123582229432 0.264780223 0.264780223 0.9236834 0.0926237255 0.07146728 0.26478014840942388 0.26478014840942388 0.92368343544686704 0.092623715229236292 0.071467286508792471 -5 0.6329114 5 3.3 1.4 0.2 0.6329114 0.74999994 0.202898547 0.0800000057 5 0.63291139240506322 5 3.2999999999999998 1.3999999999999999 0.20000000000000001 0.63291139240506322 0.74999999999999989 0.20289855072463767 0.080000000000000016 0 0.205882356 0.205882356 0.545454562 0.0952381 0.04761905 0.20588235294117646 0.20588235294117646 0.54545454545454541 0.095238095238095233 0.047619047619047616 0.8465482 0.8465482 1.07092619 0.336375058 0.140421242 0.84654818921938324 0.84654818921938324 1.0709262120491514 0.33637507090625185 0.14042123582229432 0.14861621 0.14861621 0.733567655 0.07455328 0.07146728 0.14861616399327332 0.14861616399327332 0.73356785053506501 0.074553292690365869 0.071467286508792471 -7 0.886076 7 3.2 4.7 1.4 0.886076 0.7272727 0.6811594 0.56 7 0.88607594936708844 7 3.2000000000000002 4.7000000000000002 1.3999999999999999 0.88607594936708844 0.72727272727272729 0.6811594202898551 0.55999999999999994 1 0.7941176 0.7941176 0.5 0.547619045 0.476190478 0.79411764705882348 0.79411764705882348 0.5 0.54761904761904767 0.47619047619047616 1.18516755 1.18516755 1.038474 1.12925911 0.982948661 1.1851674649071366 1.1851674649071366 1.0384739025931167 1.1292591666138456 0.98294865075606008 0.91099143 0.91099143 0.6578964 0.734288335 0.6955889 0.9109914626370752 0.9109914626370752 0.65789648182451921 0.73428833770009005 0.69558889835906823 -6.4 0.8101266 6.4 3.2 4.5 1.5 0.8101266 0.7272727 0.6521739 0.6 6.4000000000000004 0.81012658227848089 6.4000000000000004 3.2000000000000002 4.5 1.5 0.81012658227848089 0.72727272727272729 0.65217391304347827 0.60000000000000009 1 0.617647052 0.617647052 0.5 0.5 0.523809552 0.61764705882352944 0.61764705882352944 0.5 0.5 0.52380952380952384 1.08358181 1.08358181 1.038474 1.08120561 1.05315924 1.0835816822008106 1.0835816822008106 1.0384739025931167 1.0812055850558095 1.0531592686672073 0.7613054 0.7613054 0.6578964 0.7093809 0.719658256 0.76130542616799635 0.76130542616799635 0.65789648182451921 0.70938088629442786 0.71965826470413374 -6.9 0.873417735 6.9 3.1 4.9 1.5 0.873417735 0.7045454 0.710144937 0.6 6.9000000000000004 0.87341772151898722 6.9000000000000004 3.1000000000000001 4.9000000000000004 1.5 0.87341772151898722 0.70454545454545459 0.71014492753623193 0.60000000000000009 1 0.7647059 0.7647059 0.454545468 0.5952381 0.523809552 0.76470588235294112 0.76470588235294112 0.45454545454545453 0.59523809523809523 0.52380952380952384 1.16823661 1.16823661 1.0060215 1.17731273 1.05315924 1.1682365011227489 1.1682365011227489 1.0060215931370817 1.1773127481718815 1.0531592686672073 0.8933714 0.8933714 0.5725629 0.757097244 0.719658256 0.89337135404275458 0.89337135404275458 0.5725628341629212 0.75709721026728072 0.71965826470413374 -5.5 0.6962025 5.5 2.3 4 1.3 0.6962025 0.522727251 0.5797101 0.52 5.5 0.69620253164556956 5.5 2.2999999999999998 4 1.3 0.69620253164556956 0.52272727272727271 0.57971014492753625 0.52000000000000002 1 0.3529412 0.3529412 0.09090909 0.3809524 0.428571433 0.35294117647058826 0.35294117647058826 0.090909090909090912 0.38095238095238093 0.42857142857142855 0.931203067 0.931203067 0.7464031 0.9610716 0.912738 0.93120300814132162 0.93120300814132162 0.7464031174888025 0.96107163116071959 0.91273803284491306 0.3573058 0.3573058 0.02727463 0.636991262 0.6687579 0.35730592590256216 0.35730592590256216 0.027274649605582402 0.63699126114775995 0.66875793094202918 -6.5 0.822784841 6.5 2.8 4.6 1.5 0.822784841 0.6363636 0.6666666 0.6 6.5 0.82278481012658211 6.5 2.7999999999999998 4.5999999999999996 1.5 0.82278481012658211 0.63636363636363635 0.66666666666666663 0.60000000000000009 1 0.647058845 0.647058845 0.3181818 0.523809552 0.523809552 0.6470588235294118 0.6470588235294118 0.31818181818181818 0.52380952380952384 0.52380952380952384 1.10051274 1.10051274 0.908664644 1.10523236 1.05315924 1.1005126459851982 1.1005126459851982 0.908664664768977 1.1052323758348275 1.0531592686672073 0.7940583 0.7940583 0.296437562 0.7221062 0.719658256 0.79405825408863862 0.79405825408863862 0.29643751019242903 0.72210618745756316 0.71965826470413374 -5.7 0.721519 5.7 2.8 4.5 1.3 0.721519 0.6363636 0.6521739 0.52 5.7000000000000002 0.72151898734177211 5.7000000000000002 2.7999999999999998 4.5 1.3 0.72151898734177211 0.63636363636363635 0.65217391304347827 0.52000000000000002 1 0.4117647 0.4117647 0.3181818 0.5 0.428571433 0.41176470588235292 0.41176470588235292 0.31818181818181818 0.5 0.42857142857142855 0.965064943 0.965064943 0.908664644 1.08120561 0.912738 0.96506493571009688 0.96506493571009688 0.908664664768977 1.0812055850558095 0.91273803284491306 0.455403626 0.455403626 0.296437562 0.7093809 0.6687579 0.45540375842690767 0.45540375842690767 0.29643751019242903 0.70938088629442786 0.66875793094202918 -6.3 0.797468364 6.3 3.3 4.7 1.6 0.797468364 0.74999994 0.6811594 0.640000045 6.2999999999999998 0.79746835443037956 6.2999999999999998 3.2999999999999998 4.7000000000000002 1.6000000000000001 0.79746835443037956 0.74999999999999989 0.6811594202898551 0.64000000000000012 1 0.5882353 0.5882353 0.545454562 0.547619045 0.5714286 0.58823529411764708 0.58823529411764708 0.54545454545454541 0.54761904761904767 0.5714285714285714 1.06665075 1.06665075 1.07092619 1.12925911 1.12336993 1.0666507184164229 1.0666507184164229 1.0709262120491514 1.1292591666138456 1.1233698865783546 0.72531265 0.72531265 0.733567655 0.734288335 0.7413043 0.72531248018388961 0.72531248018388961 0.73356785053506501 0.73428833770009005 0.74130430666213609 -4.9 0.6202532 4.9 2.4 3.3 1 0.6202532 0.545454562 0.478260845 0.4 4.9000000000000004 0.620253164556962 4.9000000000000004 2.3999999999999999 3.2999999999999998 1 0.620253164556962 0.54545454545454541 0.47826086956521741 0.40000000000000002 1 0.1764706 0.1764706 0.13636364 0.238095239 0.2857143 0.17647058823529413 0.17647058823529413 0.13636363636363635 0.23809523809523808 0.2857142857142857 0.829617262 0.829617262 0.778855443 0.792884052 0.7021062 0.82961722543499561 0.82961722543499561 0.77885542694483745 0.79288409570759366 0.70210617911147155 0.117838435 0.117838435 0.052431643 0.508717 0.567488432 0.11783846996167147 0.11783846996167147 0.052431629740293029 0.50871703350008446 0.56748843907683133 -6.6 0.835443 6.6 2.9 4.6 1.3 0.835443 0.659090936 0.6666666 0.52 6.5999999999999996 0.83544303797468333 6.5999999999999996 2.8999999999999999 4.5999999999999996 1.3 0.83544303797468333 0.65909090909090906 0.66666666666666663 0.52000000000000002 1 0.6764706 0.6764706 0.363636374 0.523809552 0.428571433 0.67647058823529416 0.67647058823529416 0.36363636363636365 0.52380952380952384 0.42857142857142855 1.11744368 1.11744368 0.941117 1.10523236 0.912738 1.1174436097695859 1.1174436097695859 0.94111697422501195 1.1052323758348275 0.91273803284491306 0.8235505 0.8235505 0.386941522 0.7221062 0.6687579 0.82355060799945012 0.82355060799945012 0.38694155923435009 0.72210618745756316 0.66875793094202918 -5.2 0.6582278 5.2 2.7 3.9 1.4 0.6582278 0.6136364 0.5652174 0.56 5.2000000000000002 0.65822784810126578 5.2000000000000002 2.7000000000000002 3.8999999999999999 1.3999999999999999 0.65822784810126578 0.61363636363636365 0.56521739130434778 0.55999999999999994 1 0.2647059 0.2647059 0.272727281 0.357142866 0.476190478 0.26470588235294118 0.26470588235294118 0.27272727272727271 0.35714285714285715 0.47619047619047616 0.880410135 0.880410135 0.876212358 0.937044859 0.982948661 0.88041011678815861 0.88041011678815861 0.87621235531294217 0.93704484038170155 0.98294865075606008 0.222458825 0.222458825 0.214467555 0.620649636 0.6955889 0.22245879972342997 0.22245879972342997 0.21446754872116464 0.62064960460061858 0.69558889835906823 -5 0.6329114 5 2 3.5 1 0.6329114 0.454545438 0.5072464 0.4 5 0.63291139240506322 5 2 3.5 1 0.63291139240506322 0.45454545454545453 0.50724637681159424 0.40000000000000002 1 0.205882356 0.205882356 0 0.261904776 0.2857143 0.20588235294117646 0.20588235294117646 0 0.26190476190476192 0.2857142857142857 0.8465482 0.8465482 0.6490462 0.8409377 0.7021062 0.84654818921938324 0.84654818921938324 0.64904618912069789 0.84093767726562962 0.70210617911147155 0.14861621 0.14861621 0.00179608515 0.548691869 0.567488432 0.14861616399327332 0.14861616399327332 0.0017960868928680873 0.54869186015931659 0.56748843907683133 -5.9 0.7468355 5.9 3 4.2 1.5 0.7468355 0.6818181 0.6086956 0.6 5.9000000000000004 0.74683544303797467 5.9000000000000004 3 4.2000000000000002 1.5 0.74683544303797467 0.68181818181818177 0.60869565217391308 0.60000000000000009 1 0.470588237 0.470588237 0.4090909 0.428571433 0.523809552 0.47058823529411764 0.47058823529411764 0.40909090909090912 0.42857142857142855 0.52380952380952384 0.998926938 0.998926938 0.9735693 1.00912511 1.05315924 0.99892686327887226 0.99892686327887226 0.97356928368104678 1.0091252127187555 1.0531592686672073 0.5528621 0.5528621 0.480745673 0.667766631 0.719658256 0.55286190159866166 0.55286190159866166 0.4807456731235793 0.66776662351076677 0.71965826470413374 -6 0.7594937 6 2.2 4 1 0.7594937 0.5 0.5797101 0.4 6 0.75949367088607578 6 2.2000000000000002 4 1 0.75949367088607578 0.5 0.57971014492753625 0.40000000000000002 1 0.5 0.5 0.0454545468 0.3809524 0.2857143 0.5 0.5 0.045454545454545456 0.38095238095238093 0.2857142857142857 1.01585793 1.01585793 0.7139508 0.9610716 0.7021062 1.0158578270632599 1.0158578270632599 0.71395080803276778 0.96107163116071959 0.70210617911147155 0.5995771 0.5995771 0.0126449876 0.636991262 0.567488432 0.59957706030964308 0.59957706030964308 0.012644988485085273 0.63699126114775995 0.56748843907683133 -6.1 0.7721519 6.1 2.9 4.7 1.4 0.7721519 0.659090936 0.6811594 0.56 6.0999999999999996 0.772151898734177 6.0999999999999996 2.8999999999999999 4.7000000000000002 1.3999999999999999 0.772151898734177 0.65909090909090906 0.6811594202898551 0.55999999999999994 1 0.5294118 0.5294118 0.363636374 0.547619045 0.476190478 0.52941176470588236 0.52941176470588236 0.36363636363636365 0.54761904761904767 0.47619047619047616 1.03278887 1.03278887 0.941117 1.12925911 0.982948661 1.0327887908476474 1.0327887908476474 0.94111697422501195 1.1292591666138456 0.98294865075606008 0.644171059 0.644171059 0.386941522 0.734288335 0.6955889 0.64417093822767468 0.64417093822767468 0.38694155923435009 0.73428833770009005 0.69558889835906823 -5.6 0.708860755 5.6 2.9 3.6 1.3 0.708860755 0.659090936 0.5217391 0.52 5.5999999999999996 0.70886075949367078 5.5999999999999996 2.8999999999999999 3.6000000000000001 1.3 0.70886075949367078 0.65909090909090906 0.52173913043478259 0.52000000000000002 1 0.382352948 0.382352948 0.363636374 0.2857143 0.428571433 0.38235294117647056 0.38235294117647056 0.36363636363636365 0.2857142857142857 0.42857142857142855 0.948134 0.948134 0.941117 0.8649644 0.912738 0.94813397192570914 0.94813397192570914 0.94111697422501195 0.86496446804464766 0.91273803284491306 0.4060508 0.4060508 0.386941522 0.5676816 0.6687579 0.40605068921232229 0.40605068921232229 0.38694155923435009 0.56768154970207829 0.66875793094202918 -6.7 0.848101258 6.7 3.1 4.4 1.4 0.848101258 0.7045454 0.6376811 0.56 6.7000000000000002 0.84810126582278467 6.7000000000000002 3.1000000000000001 4.4000000000000004 1.3999999999999999 0.84810126582278467 0.70454545454545459 0.63768115942028991 0.55999999999999994 1 0.7058824 0.7058824 0.454545468 0.476190478 0.476190478 0.70588235294117652 0.70588235294117652 0.45454545454545453 0.47619047619047616 0.47619047619047616 1.13437462 1.13437462 1.0060215 1.05717874 0.982948661 1.1343745735539736 1.1343745735539736 1.0060215931370817 1.0571787942767916 0.98294865075606008 0.84984225 0.84984225 0.5725629 0.6960943 0.6955889 0.84984228863096656 0.84984228863096656 0.5725628341629212 0.69609423458217601 0.69558889835906823 -5.6 0.708860755 5.6 3 4.5 1.5 0.708860755 0.6818181 0.6521739 0.6 5.5999999999999996 0.70886075949367078 5.5999999999999996 3 4.5 1.5 0.70886075949367078 0.68181818181818177 0.65217391304347827 0.60000000000000009 1 0.382352948 0.382352948 0.4090909 0.5 0.523809552 0.38235294117647056 0.38235294117647056 0.40909090909090912 0.5 0.52380952380952384 0.948134 0.948134 0.9735693 1.08120561 1.05315924 0.94813397192570914 0.94813397192570914 0.97356928368104678 1.0812055850558095 1.0531592686672073 0.4060508 0.4060508 0.480745673 0.7093809 0.719658256 0.40605068921232229 0.40605068921232229 0.4807456731235793 0.70938088629442786 0.71965826470413374 -5.8 0.734177232 5.8 2.7 4.1 1 0.734177232 0.6136364 0.5942029 0.4 5.7999999999999998 0.73417721518987333 5.7999999999999998 2.7000000000000002 4.0999999999999996 1 0.73417721518987333 0.61363636363636365 0.59420289855072461 0.40000000000000002 1 0.441176474 0.441176474 0.272727281 0.4047619 0.2857143 0.44117647058823528 0.44117647058823528 0.27272727272727271 0.40476190476190477 0.2857142857142857 0.981996 0.981996 0.876212358 0.985098362 0.7021062 0.98199589949448451 0.98199589949448451 0.87621235531294217 0.98509842193973751 0.70210617911147155 0.504585147 0.504585147 0.214467555 0.6526925 0.567488432 0.50458515122771275 0.50458515122771275 0.21446754872116464 0.65269250269310186 0.56748843907683133 -6.2 0.7848101 6.2 2.2 4.5 1.5 0.7848101 0.5 0.6521739 0.6 6.2000000000000002 0.78481012658227833 6.2000000000000002 2.2000000000000002 4.5 1.5 0.78481012658227833 0.5 0.65217391304347827 0.60000000000000009 1 0.5588235 0.5588235 0.0454545468 0.5 0.523809552 0.55882352941176472 0.55882352941176472 0.045454545454545456 0.5 0.52380952380952384 1.04971981 1.04971981 0.7139508 1.08120561 1.05315924 1.0497197546320352 1.0497197546320352 0.71395080803276778 1.0812055850558095 1.0531592686672073 0.6861942 0.6861942 0.0126449876 0.7093809 0.719658256 0.6861941068147408 0.6861941068147408 0.012644988485085273 0.70938088629442786 0.71965826470413374 -5.6 0.708860755 5.6 2.5 3.9 1.1 0.708860755 0.5681818 0.5652174 0.440000027 5.5999999999999996 0.70886075949367078 5.5999999999999996 2.5 3.8999999999999999 1.1000000000000001 0.70886075949367078 0.56818181818181812 0.56521739130434778 0.44000000000000006 1 0.382352948 0.382352948 0.181818187 0.357142866 0.333333343 0.38235294117647056 0.38235294117647056 0.18181818181818182 0.35714285714285715 0.33333333333333331 0.948134 0.948134 0.8113077 0.937044859 0.7723168 0.94813397192570914 0.94813397192570914 0.81130773640087239 0.93704484038170155 0.7723167970226188 0.4060508 0.4060508 0.09116498 0.620649636 0.605188966 0.40605068921232229 0.40605068921232229 0.091164973250557446 0.62064960460061858 0.60518894407556645 -5.9 0.7468355 5.9 3.2 4.8 1.8 0.7468355 0.7272727 0.6956522 0.719999969 5.9000000000000004 0.74683544303797467 5.9000000000000004 3.2000000000000002 4.7999999999999998 1.8 0.74683544303797467 0.72727272727272729 0.69565217391304346 0.72000000000000008 1 0.470588237 0.470588237 0.5 0.5714286 0.6666667 0.47058823529411764 0.47058823529411764 0.5 0.5714285714285714 0.66666666666666663 0.998926938 0.998926938 1.038474 1.153286 1.26379108 0.99892686327887226 0.99892686327887226 1.0384739025931167 1.1532859573928635 1.2637911224006488 0.5528621 0.5528621 0.6578964 0.7459458 0.778455853 0.55286190159866166 0.55286190159866166 0.65789648182451921 0.74594581373449664 0.77845583371698512 -6.1 0.7721519 6.1 2.8 4 1.3 0.7721519 0.6363636 0.5797101 0.52 6.0999999999999996 0.772151898734177 6.0999999999999996 2.7999999999999998 4 1.3 0.772151898734177 0.63636363636363635 0.57971014492753625 0.52000000000000002 1 0.5294118 0.5294118 0.3181818 0.3809524 0.428571433 0.52941176470588236 0.52941176470588236 0.31818181818181818 0.38095238095238093 0.42857142857142855 1.03278887 1.03278887 0.908664644 0.9610716 0.912738 1.0327887908476474 1.0327887908476474 0.908664664768977 0.96107163116071959 0.91273803284491306 0.644171059 0.644171059 0.296437562 0.636991262 0.6687579 0.64417093822767468 0.64417093822767468 0.29643751019242903 0.63699126114775995 0.66875793094202918 -6.3 0.797468364 6.3 2.5 4.9 1.5 0.797468364 0.5681818 0.710144937 0.6 6.2999999999999998 0.79746835443037956 6.2999999999999998 2.5 4.9000000000000004 1.5 0.79746835443037956 0.56818181818181812 0.71014492753623193 0.60000000000000009 1 0.5882353 0.5882353 0.181818187 0.5952381 0.523809552 0.58823529411764708 0.58823529411764708 0.18181818181818182 0.59523809523809523 0.52380952380952384 1.06665075 1.06665075 0.8113077 1.17731273 1.05315924 1.0666507184164229 1.0666507184164229 0.81130773640087239 1.1773127481718815 1.0531592686672073 0.72531265 0.72531265 0.09116498 0.757097244 0.719658256 0.72531248018388961 0.72531248018388961 0.091164973250557446 0.75709721026728072 0.71965826470413374 -6.1 0.7721519 6.1 2.8 4.7 1.2 0.7721519 0.6363636 0.6811594 0.480000019 6.0999999999999996 0.772151898734177 6.0999999999999996 2.7999999999999998 4.7000000000000002 1.2 0.772151898734177 0.63636363636363635 0.6811594202898551 0.47999999999999998 1 0.5294118 0.5294118 0.3181818 0.547619045 0.3809524 0.52941176470588236 0.52941176470588236 0.31818181818181818 0.54761904761904767 0.38095238095238093 1.03278887 1.03278887 0.908664644 1.12925911 0.842527449 1.0327887908476474 1.0327887908476474 0.908664664768977 1.1292591666138456 0.84252741493376582 0.644171059 0.644171059 0.296437562 0.734288335 0.6387745 0.64417093822767468 0.64417093822767468 0.29643751019242903 0.73428833770009005 0.63877450359674082 -6.4 0.8101266 6.4 2.9 4.3 1.3 0.8101266 0.659090936 0.623188436 0.52 6.4000000000000004 0.81012658227848089 6.4000000000000004 2.8999999999999999 4.2999999999999998 1.3 0.81012658227848089 0.65909090909090906 0.62318840579710144 0.52000000000000002 1 0.617647052 0.617647052 0.363636374 0.452380955 0.428571433 0.61764705882352944 0.61764705882352944 0.36363636363636365 0.45238095238095238 0.42857142857142855 1.08358181 1.08358181 0.941117 1.033152 0.912738 1.0835816822008106 1.0835816822008106 0.94111697422501195 1.0331520034977735 0.91273803284491306 0.7613054 0.7613054 0.386941522 0.682228565 0.6687579 0.76130542616799635 0.76130542616799635 0.38694155923435009 0.68222849726345214 0.66875793094202918 -6.6 0.835443 6.6 3 4.4 1.4 0.835443 0.6818181 0.6376811 0.56 6.5999999999999996 0.83544303797468333 6.5999999999999996 3 4.4000000000000004 1.3999999999999999 0.83544303797468333 0.68181818181818177 0.63768115942028991 0.55999999999999994 1 0.6764706 0.6764706 0.4090909 0.476190478 0.476190478 0.67647058823529416 0.67647058823529416 0.40909090909090912 0.47619047619047616 0.47619047619047616 1.11744368 1.11744368 0.9735693 1.05717874 0.982948661 1.1174436097695859 1.1174436097695859 0.97356928368104678 1.0571787942767916 0.98294865075606008 0.8235505 0.8235505 0.480745673 0.6960943 0.6955889 0.82355060799945012 0.82355060799945012 0.4807456731235793 0.69609423458217601 0.69558889835906823 -6.8 0.860759556 6.8 2.8 4.8 1.4 0.860759556 0.6363636 0.6956522 0.56 6.7999999999999998 0.86075949367088589 6.7999999999999998 2.7999999999999998 4.7999999999999998 1.3999999999999999 0.86075949367088589 0.63636363636363635 0.69565217391304346 0.55999999999999994 1 0.7352941 0.7352941 0.3181818 0.5714286 0.476190478 0.73529411764705888 0.73529411764705888 0.31818181818181818 0.5714285714285714 0.47619047619047616 1.15130568 1.15130568 0.908664644 1.153286 0.982948661 1.1513055373383612 1.1513055373383612 0.908664664768977 1.1532859573928635 0.98294865075606008 0.873058 0.873058 0.296437562 0.7459458 0.6955889 0.87305788341059976 0.87305788341059976 0.29643751019242903 0.74594581373449664 0.69558889835906823 -6.7 0.848101258 6.7 3 5 1.7 0.848101258 0.6818181 0.7246376 0.68 6.7000000000000002 0.84810126582278467 6.7000000000000002 3 5 1.7 0.84810126582278467 0.68181818181818177 0.72463768115942029 0.68000000000000005 1 0.7058824 0.7058824 0.4090909 0.619047642 0.619047642 0.70588235294117652 0.70588235294117652 0.40909090909090912 0.61904761904761907 0.61904761904761907 1.13437462 1.13437462 0.9735693 1.20133948 1.19358051 1.1343745735539736 1.1343745735539736 0.97356928368104678 1.2013395389508994 1.1935805044895016 0.84984225 0.84984225 0.480745673 0.7677612 0.7608193 0.84984228863096656 0.84984228863096656 0.4807456731235793 0.76776110588492996 0.76081931222191046 -6 0.7594937 6 2.9 4.5 1.5 0.7594937 0.659090936 0.6521739 0.6 6 0.75949367088607578 6 2.8999999999999999 4.5 1.5 0.75949367088607578 0.65909090909090906 0.65217391304347827 0.60000000000000009 1 0.5 0.5 0.363636374 0.5 0.523809552 0.5 0.5 0.36363636363636365 0.5 0.52380952380952384 1.01585793 1.01585793 0.941117 1.08120561 1.05315924 1.0158578270632599 1.0158578270632599 0.94111697422501195 1.0812055850558095 1.0531592686672073 0.5995771 0.5995771 0.386941522 0.7093809 0.719658256 0.59957706030964308 0.59957706030964308 0.38694155923435009 0.70938088629442786 0.71965826470413374 -5.7 0.721519 5.7 2.6 3.5 1 0.721519 0.590909064 0.5072464 0.4 5.7000000000000002 0.72151898734177211 5.7000000000000002 2.6000000000000001 3.5 1 0.72151898734177211 0.59090909090909094 0.50724637681159424 0.40000000000000002 1 0.4117647 0.4117647 0.227272734 0.261904776 0.2857143 0.41176470588235292 0.41176470588235292 0.22727272727272727 0.26190476190476192 0.2857142857142857 0.965064943 0.965064943 0.84376 0.8409377 0.7021062 0.96506493571009688 0.96506493571009688 0.84376004585690734 0.84093767726562962 0.70210617911147155 0.455403626 0.455403626 0.145245746 0.548691869 0.567488432 0.45540375842690767 0.45540375842690767 0.14524588521591403 0.54869186015931659 0.56748843907683133 -5.5 0.6962025 5.5 2.4 3.8 1.1 0.6962025 0.545454562 0.5507246 0.440000027 5.5 0.69620253164556956 5.5 2.3999999999999999 3.7999999999999998 1.1000000000000001 0.69620253164556956 0.54545454545454541 0.55072463768115942 0.44000000000000006 1 0.3529412 0.3529412 0.13636364 0.333333343 0.333333343 0.35294117647058826 0.35294117647058826 0.13636363636363635 0.33333333333333331 0.33333333333333331 0.931203067 0.931203067 0.778855443 0.913018048 0.7723168 0.93120300814132162 0.93120300814132162 0.77885542694483745 0.91301804960268351 0.7723167970226188 0.3573058 0.3573058 0.052431643 0.6036563 0.605188966 0.35730592590256216 0.35730592590256216 0.052431629740293029 0.60365621138880055 0.60518894407556645 -5.5 0.6962025 5.5 2.4 3.7 1 0.6962025 0.545454562 0.5362319 0.4 5.5 0.69620253164556956 5.5 2.3999999999999999 3.7000000000000002 1 0.69620253164556956 0.54545454545454541 0.53623188405797106 0.40000000000000002 1 0.3529412 0.3529412 0.13636364 0.309523821 0.2857143 0.35294117647058826 0.35294117647058826 0.13636363636363635 0.30952380952380953 0.2857142857142857 0.931203067 0.931203067 0.778855443 0.888991237 0.7021062 0.93120300814132162 0.93120300814132162 0.77885542694483745 0.8889912588236657 0.70210617911147155 0.3573058 0.3573058 0.052431643 0.5860022 0.567488432 0.35730592590256216 0.35730592590256216 0.052431629740293029 0.58600218188861053 0.56748843907683133 -5.8 0.734177232 5.8 2.7 3.9 1.2 0.734177232 0.6136364 0.5652174 0.480000019 5.7999999999999998 0.73417721518987333 5.7999999999999998 2.7000000000000002 3.8999999999999999 1.2 0.73417721518987333 0.61363636363636365 0.56521739130434778 0.47999999999999998 1 0.441176474 0.441176474 0.272727281 0.357142866 0.3809524 0.44117647058823528 0.44117647058823528 0.27272727272727271 0.35714285714285715 0.38095238095238093 0.981996 0.981996 0.876212358 0.937044859 0.842527449 0.98199589949448451 0.98199589949448451 0.87621235531294217 0.93704484038170155 0.84252741493376582 0.504585147 0.504585147 0.214467555 0.620649636 0.6387745 0.50458515122771275 0.50458515122771275 0.21446754872116464 0.62064960460061858 0.63877450359674082 -6 0.7594937 6 2.7 5.1 1.6 0.7594937 0.6136364 0.7391304 0.640000045 6 0.75949367088607578 6 2.7000000000000002 5.0999999999999996 1.6000000000000001 0.75949367088607578 0.61363636363636365 0.73913043478260865 0.64000000000000012 1 0.5 0.5 0.272727281 0.642857134 0.5714286 0.5 0.5 0.27272727272727271 0.6428571428571429 0.5714285714285714 1.01585793 1.01585793 0.876212358 1.22536623 1.12336993 1.0158578270632599 1.0158578270632599 0.87621235531294217 1.2253663297299173 1.1233698865783546 0.5995771 0.5995771 0.214467555 0.777955949 0.7413043 0.59957706030964308 0.59957706030964308 0.21446754872116464 0.77795595083214475 0.74130430666213609 -5.4 0.683544338 5.4 3 4.5 1.5 0.683544338 0.6818181 0.6521739 0.6 5.4000000000000004 0.68354430379746833 5.4000000000000004 3 4.5 1.5 0.68354430379746833 0.68181818181818177 0.65217391304347827 0.60000000000000009 1 0.323529422 0.323529422 0.4090909 0.5 0.523809552 0.3235294117647059 0.3235294117647059 0.40909090909090912 0.5 0.52380952380952384 0.9142721 0.9142721 0.9735693 1.08120561 1.05315924 0.91427204435693399 0.91427204435693399 0.97356928368104678 1.0812055850558095 1.0531592686672073 0.3099612 0.3099612 0.480745673 0.7093809 0.719658256 0.30996111189240849 0.30996111189240849 0.4807456731235793 0.70938088629442786 0.71965826470413374 -6 0.7594937 6 3.4 4.5 1.6 0.7594937 0.772727251 0.6521739 0.640000045 6 0.75949367088607578 6 3.3999999999999999 4.5 1.6000000000000001 0.75949367088607578 0.77272727272727271 0.65217391304347827 0.64000000000000012 1 0.5 0.5 0.590909064 0.5 0.5714286 0.5 0.5 0.59090909090909094 0.5 0.5714285714285714 1.01585793 1.01585793 1.10337853 1.08120561 1.12336993 1.0158578270632599 1.0158578270632599 1.1033785215051863 1.0812055850558095 1.1233698865783546 0.5995771 0.5995771 0.797875941 0.7093809 0.7413043 0.59957706030964308 0.59957706030964308 0.79787580879856601 0.70938088629442786 0.74130430666213609 -6.7 0.848101258 6.7 3.1 4.7 1.5 0.848101258 0.7045454 0.6811594 0.6 6.7000000000000002 0.84810126582278467 6.7000000000000002 3.1000000000000001 4.7000000000000002 1.5 0.84810126582278467 0.70454545454545459 0.6811594202898551 0.60000000000000009 1 0.7058824 0.7058824 0.454545468 0.547619045 0.523809552 0.70588235294117652 0.70588235294117652 0.45454545454545453 0.54761904761904767 0.52380952380952384 1.13437462 1.13437462 1.0060215 1.12925911 1.05315924 1.1343745735539736 1.1343745735539736 1.0060215931370817 1.1292591666138456 1.0531592686672073 0.84984225 0.84984225 0.5725629 0.734288335 0.719658256 0.84984228863096656 0.84984228863096656 0.5725628341629212 0.73428833770009005 0.71965826470413374 -6.3 0.797468364 6.3 2.3 4.4 1.3 0.797468364 0.522727251 0.6376811 0.52 6.2999999999999998 0.79746835443037956 6.2999999999999998 2.2999999999999998 4.4000000000000004 1.3 0.79746835443037956 0.52272727272727271 0.63768115942028991 0.52000000000000002 1 0.5882353 0.5882353 0.09090909 0.476190478 0.428571433 0.58823529411764708 0.58823529411764708 0.090909090909090912 0.47619047619047616 0.42857142857142855 1.06665075 1.06665075 0.7464031 1.05717874 0.912738 1.0666507184164229 1.0666507184164229 0.7464031174888025 1.0571787942767916 0.91273803284491306 0.72531265 0.72531265 0.02727463 0.6960943 0.6687579 0.72531248018388961 0.72531248018388961 0.027274649605582402 0.69609423458217601 0.66875793094202918 -5.6 0.708860755 5.6 3 4.1 1.3 0.708860755 0.6818181 0.5942029 0.52 5.5999999999999996 0.70886075949367078 5.5999999999999996 3 4.0999999999999996 1.3 0.70886075949367078 0.68181818181818177 0.59420289855072461 0.52000000000000002 1 0.382352948 0.382352948 0.4090909 0.4047619 0.428571433 0.38235294117647056 0.38235294117647056 0.40909090909090912 0.40476190476190477 0.42857142857142855 0.948134 0.948134 0.9735693 0.985098362 0.912738 0.94813397192570914 0.94813397192570914 0.97356928368104678 0.98509842193973751 0.91273803284491306 0.4060508 0.4060508 0.480745673 0.6526925 0.6687579 0.40605068921232229 0.40605068921232229 0.4807456731235793 0.65269250269310186 0.66875793094202918 -5.5 0.6962025 5.5 2.5 4 1.3 0.6962025 0.5681818 0.5797101 0.52 5.5 0.69620253164556956 5.5 2.5 4 1.3 0.69620253164556956 0.56818181818181812 0.57971014492753625 0.52000000000000002 1 0.3529412 0.3529412 0.181818187 0.3809524 0.428571433 0.35294117647058826 0.35294117647058826 0.18181818181818182 0.38095238095238093 0.42857142857142855 0.931203067 0.931203067 0.8113077 0.9610716 0.912738 0.93120300814132162 0.93120300814132162 0.81130773640087239 0.96107163116071959 0.91273803284491306 0.3573058 0.3573058 0.09116498 0.636991262 0.6687579 0.35730592590256216 0.35730592590256216 0.091164973250557446 0.63699126114775995 0.66875793094202918 -5.5 0.6962025 5.5 2.6 4.4 1.2 0.6962025 0.590909064 0.6376811 0.480000019 5.5 0.69620253164556956 5.5 2.6000000000000001 4.4000000000000004 1.2 0.69620253164556956 0.59090909090909094 0.63768115942028991 0.47999999999999998 1 0.3529412 0.3529412 0.227272734 0.476190478 0.3809524 0.35294117647058826 0.35294117647058826 0.22727272727272727 0.47619047619047616 0.38095238095238093 0.931203067 0.931203067 0.84376 1.05717874 0.842527449 0.93120300814132162 0.93120300814132162 0.84376004585690734 1.0571787942767916 0.84252741493376582 0.3573058 0.3573058 0.145245746 0.6960943 0.6387745 0.35730592590256216 0.35730592590256216 0.14524588521591403 0.69609423458217601 0.63877450359674082 -6.1 0.7721519 6.1 3 4.6 1.4 0.7721519 0.6818181 0.6666666 0.56 6.0999999999999996 0.772151898734177 6.0999999999999996 3 4.5999999999999996 1.3999999999999999 0.772151898734177 0.68181818181818177 0.66666666666666663 0.55999999999999994 1 0.5294118 0.5294118 0.4090909 0.523809552 0.476190478 0.52941176470588236 0.52941176470588236 0.40909090909090912 0.52380952380952384 0.47619047619047616 1.03278887 1.03278887 0.9735693 1.10523236 0.982948661 1.0327887908476474 1.0327887908476474 0.97356928368104678 1.1052323758348275 0.98294865075606008 0.644171059 0.644171059 0.480745673 0.7221062 0.6955889 0.64417093822767468 0.64417093822767468 0.4807456731235793 0.72210618745756316 0.69558889835906823 -5.8 0.734177232 5.8 2.6 4 1.2 0.734177232 0.590909064 0.5797101 0.480000019 5.7999999999999998 0.73417721518987333 5.7999999999999998 2.6000000000000001 4 1.2 0.73417721518987333 0.59090909090909094 0.57971014492753625 0.47999999999999998 1 0.441176474 0.441176474 0.227272734 0.3809524 0.3809524 0.44117647058823528 0.44117647058823528 0.22727272727272727 0.38095238095238093 0.38095238095238093 0.981996 0.981996 0.84376 0.9610716 0.842527449 0.98199589949448451 0.98199589949448451 0.84376004585690734 0.96107163116071959 0.84252741493376582 0.504585147 0.504585147 0.145245746 0.636991262 0.6387745 0.50458515122771275 0.50458515122771275 0.14524588521591403 0.63699126114775995 0.63877450359674082 -5 0.6329114 5 2.3 3.3 1 0.6329114 0.522727251 0.478260845 0.4 5 0.63291139240506322 5 2.2999999999999998 3.2999999999999998 1 0.63291139240506322 0.52272727272727271 0.47826086956521741 0.40000000000000002 1 0.205882356 0.205882356 0.09090909 0.238095239 0.2857143 0.20588235294117646 0.20588235294117646 0.090909090909090912 0.23809523809523808 0.2857142857142857 0.8465482 0.8465482 0.7464031 0.792884052 0.7021062 0.84654818921938324 0.84654818921938324 0.7464031174888025 0.79288409570759366 0.70210617911147155 0.14861621 0.14861621 0.02727463 0.508717 0.567488432 0.14861616399327332 0.14861616399327332 0.027274649605582402 0.50871703350008446 0.56748843907683133 -5.6 0.708860755 5.6 2.7 4.2 1.3 0.708860755 0.6136364 0.6086956 0.52 5.5999999999999996 0.70886075949367078 5.5999999999999996 2.7000000000000002 4.2000000000000002 1.3 0.70886075949367078 0.61363636363636365 0.60869565217391308 0.52000000000000002 1 0.382352948 0.382352948 0.272727281 0.428571433 0.428571433 0.38235294117647056 0.38235294117647056 0.27272727272727271 0.42857142857142855 0.42857142857142855 0.948134 0.948134 0.876212358 1.00912511 0.912738 0.94813397192570914 0.94813397192570914 0.87621235531294217 1.0091252127187555 0.91273803284491306 0.4060508 0.4060508 0.214467555 0.667766631 0.6687579 0.40605068921232229 0.40605068921232229 0.21446754872116464 0.66776662351076677 0.66875793094202918 -5.7 0.721519 5.7 3 4.2 1.2 0.721519 0.6818181 0.6086956 0.480000019 5.7000000000000002 0.72151898734177211 5.7000000000000002 3 4.2000000000000002 1.2 0.72151898734177211 0.68181818181818177 0.60869565217391308 0.47999999999999998 1 0.4117647 0.4117647 0.4090909 0.428571433 0.3809524 0.41176470588235292 0.41176470588235292 0.40909090909090912 0.42857142857142855 0.38095238095238093 0.965064943 0.965064943 0.9735693 1.00912511 0.842527449 0.96506493571009688 0.96506493571009688 0.97356928368104678 1.0091252127187555 0.84252741493376582 0.455403626 0.455403626 0.480745673 0.667766631 0.6387745 0.45540375842690767 0.45540375842690767 0.4807456731235793 0.66776662351076677 0.63877450359674082 -5.7 0.721519 5.7 2.9 4.2 1.3 0.721519 0.659090936 0.6086956 0.52 5.7000000000000002 0.72151898734177211 5.7000000000000002 2.8999999999999999 4.2000000000000002 1.3 0.72151898734177211 0.65909090909090906 0.60869565217391308 0.52000000000000002 1 0.4117647 0.4117647 0.363636374 0.428571433 0.428571433 0.41176470588235292 0.41176470588235292 0.36363636363636365 0.42857142857142855 0.42857142857142855 0.965064943 0.965064943 0.941117 1.00912511 0.912738 0.96506493571009688 0.96506493571009688 0.94111697422501195 1.0091252127187555 0.91273803284491306 0.455403626 0.455403626 0.386941522 0.667766631 0.6687579 0.45540375842690767 0.45540375842690767 0.38694155923435009 0.66776662351076677 0.66875793094202918 -6.2 0.7848101 6.2 2.9 4.3 1.3 0.7848101 0.659090936 0.623188436 0.52 6.2000000000000002 0.78481012658227833 6.2000000000000002 2.8999999999999999 4.2999999999999998 1.3 0.78481012658227833 0.65909090909090906 0.62318840579710144 0.52000000000000002 1 0.5588235 0.5588235 0.363636374 0.452380955 0.428571433 0.55882352941176472 0.55882352941176472 0.36363636363636365 0.45238095238095238 0.42857142857142855 1.04971981 1.04971981 0.941117 1.033152 0.912738 1.0497197546320352 1.0497197546320352 0.94111697422501195 1.0331520034977735 0.91273803284491306 0.6861942 0.6861942 0.386941522 0.682228565 0.6687579 0.6861941068147408 0.6861941068147408 0.38694155923435009 0.68222849726345214 0.66875793094202918 -5.1 0.6455696 5.1 2.5 3 1.1 0.6455696 0.5681818 0.4347826 0.440000027 5.0999999999999996 0.64556962025316444 5.0999999999999996 2.5 3 1.1000000000000001 0.64556962025316444 0.56818181818181812 0.43478260869565222 0.44000000000000006 1 0.235294119 0.235294119 0.181818187 0.214285716 0.333333343 0.23529411764705882 0.23529411764705882 0.18181818181818182 0.21428571428571427 0.33333333333333331 0.8634792 0.8634792 0.8113077 0.720803738 0.7723168 0.86347915300377087 0.86347915300377087 0.81130773640087239 0.72080372337053966 0.7723167970226188 0.183586776 0.183586776 0.09116498 0.4439562 0.605188966 0.18358681923369741 0.18358681923369741 0.091164973250557446 0.44395614729152527 0.60518894407556645 -5.7 0.721519 5.7 2.8 4.1 1.3 0.721519 0.6363636 0.5942029 0.52 5.7000000000000002 0.72151898734177211 5.7000000000000002 2.7999999999999998 4.0999999999999996 1.3 0.72151898734177211 0.63636363636363635 0.59420289855072461 0.52000000000000002 1 0.4117647 0.4117647 0.3181818 0.4047619 0.428571433 0.41176470588235292 0.41176470588235292 0.31818181818181818 0.40476190476190477 0.42857142857142855 0.965064943 0.965064943 0.908664644 0.985098362 0.912738 0.96506493571009688 0.96506493571009688 0.908664664768977 0.98509842193973751 0.91273803284491306 0.455403626 0.455403626 0.296437562 0.6526925 0.6687579 0.45540375842690767 0.45540375842690767 0.29643751019242903 0.65269250269310186 0.66875793094202918 -6.3 0.797468364 6.3 3.3 6 2.5 0.797468364 0.74999994 0.8695652 1 6.2999999999999998 0.79746835443037956 6.2999999999999998 3.2999999999999998 6 2.5 0.79746835443037956 0.74999999999999989 0.86956521739130443 1 2 0.5882353 0.5882353 0.545454562 0.857142866 1 0.58823529411764708 0.58823529411764708 0.54545454545454541 0.8571428571428571 1 1.06665075 1.06665075 1.07092619 1.44160748 1.75526547 1.0666507184164229 1.0666507184164229 1.0709262120491514 1.4416074467410793 1.7552654477786789 0.72531265 0.72531265 0.733567655 0.851488352 0.8644717 0.72531248018388961 0.72531248018388961 0.73356785053506501 0.85148833619462083 0.86447170475057145 -5.8 0.734177232 5.8 2.7 5.1 1.9 0.734177232 0.6136364 0.7391304 0.76 5.7999999999999998 0.73417721518987333 5.7999999999999998 2.7000000000000002 5.0999999999999996 1.8999999999999999 0.73417721518987333 0.61363636363636365 0.73913043478260865 0.76000000000000001 2 0.441176474 0.441176474 0.272727281 0.642857134 0.714285731 0.44117647058823528 0.44117647058823528 0.27272727272727271 0.6428571428571429 0.7142857142857143 0.981996 0.981996 0.876212358 1.22536623 1.33400178 0.98199589949448451 0.98199589949448451 0.87621235531294217 1.2253663297299173 1.3340017403117959 0.504585147 0.504585147 0.214467555 0.777955949 0.794432342 0.50458515122771275 0.50458515122771275 0.21446754872116464 0.77795595083214475 0.7944323164067586 -7.1 0.898734152 7.1 3 5.9 2.1 0.898734152 0.6818181 0.855072439 0.84 7.0999999999999996 0.89873417721518967 7.0999999999999996 3 5.9000000000000004 2.1000000000000001 0.89873417721518967 0.68181818181818177 0.85507246376811608 0.84000000000000008 2 0.8235294 0.8235294 0.4090909 0.8333333 0.8095238 0.82352941176470584 0.82352941176470584 0.40909090909090912 0.83333333333333337 0.80952380952380953 1.20209849 1.20209849 0.9735693 1.4175806 1.47442293 1.2020984286915242 1.2020984286915242 0.97356928368104678 1.4175806559620614 1.4744229761340903 0.9261487 0.9261487 0.480745673 0.8447406 0.8221373 0.92614864776751638 0.92614864776751638 0.4807456731235793 0.8447405985468005 0.82213728509573358 -6.3 0.797468364 6.3 2.9 5.6 1.8 0.797468364 0.659090936 0.8115942 0.719999969 6.2999999999999998 0.79746835443037956 6.2999999999999998 2.8999999999999999 5.5999999999999996 1.8 0.79746835443037956 0.65909090909090906 0.81159420289855067 0.72000000000000008 2 0.5882353 0.5882353 0.363636374 0.7619048 0.6666667 0.58823529411764708 0.58823529411764708 0.36363636363636365 0.76190476190476186 0.66666666666666663 1.06665075 1.06665075 0.941117 1.34550023 1.26379108 1.0666507184164229 1.0666507184164229 0.94111697422501195 1.3455002836250074 1.2637911224006488 0.72531265 0.72531265 0.386941522 0.8225208 0.778455853 0.72531248018388961 0.72531248018388961 0.38694155923435009 0.82252078229590153 0.77845583371698512 -6.5 0.822784841 6.5 3 5.8 2.2 0.822784841 0.6818181 0.8405797 0.880000055 6.5 0.82278481012658211 6.5 3 5.7999999999999998 2.2000000000000002 0.82278481012658211 0.68181818181818177 0.84057971014492749 0.88000000000000012 2 0.647058845 0.647058845 0.4090909 0.8095238 0.857142866 0.6470588235294118 0.6470588235294118 0.40909090909090912 0.80952380952380953 0.8571428571428571 1.10051274 1.10051274 0.9735693 1.39355385 1.54463363 1.1005126459851982 1.1005126459851982 0.97356928368104678 1.3935538651830432 1.5446335940452376 0.7940583 0.7940583 0.480745673 0.837673366 0.834173143 0.79405825408863862 0.79405825408863862 0.4807456731235793 0.83767331479677276 0.83417310863648386 -7.6 0.9620253 7.6 3 6.6 2.1 0.9620253 0.6818181 0.9565217 0.84 7.5999999999999996 0.962025316455696 7.5999999999999996 3 6.5999999999999996 2.1000000000000001 0.962025316455696 0.68181818181818177 0.95652173913043481 0.84000000000000008 2 0.9411765 0.9411765 0.4090909 0.952380955 0.8095238 0.94117647058823528 0.94117647058823528 0.40909090909090912 0.95238095238095233 0.80952380952380953 1.2867533 1.2867533 0.9735693 1.5857681 1.47442293 1.2867532476134624 1.2867532476134624 0.97356928368104678 1.5857681914151873 1.4744229761340903 0.9733138 0.9733138 0.480745673 0.8860214 0.8221373 0.97331382055990801 0.97331382055990801 0.4807456731235793 0.88602142043286447 0.82213728509573358 -4.9 0.6202532 4.9 2.5 4.5 1.7 0.6202532 0.5681818 0.6521739 0.68 4.9000000000000004 0.620253164556962 4.9000000000000004 2.5 4.5 1.7 0.620253164556962 0.56818181818181812 0.65217391304347827 0.68000000000000005 2 0.1764706 0.1764706 0.181818187 0.5 0.619047642 0.17647058823529413 0.17647058823529413 0.18181818181818182 0.5 0.61904761904761907 0.829617262 0.829617262 0.8113077 1.08120561 1.19358051 0.82961722543499561 0.82961722543499561 0.81130773640087239 1.0812055850558095 1.1935805044895016 0.117838435 0.117838435 0.09116498 0.7093809 0.7608193 0.11783846996167147 0.11783846996167147 0.091164973250557446 0.70938088629442786 0.76081931222191046 -7.3 0.9240507 7.3 2.9 6.3 1.8 0.9240507 0.659090936 0.9130435 0.719999969 7.2999999999999998 0.92405063291139222 7.2999999999999998 2.8999999999999999 6.2999999999999998 1.8 0.92405063291139222 0.65909090909090906 0.91304347826086962 0.72000000000000008 2 0.882352948 0.882352948 0.363636374 0.9047619 0.6666667 0.88235294117647056 0.88235294117647056 0.36363636363636365 0.90476190476190477 0.66666666666666663 1.23596048 1.23596048 0.941117 1.51368785 1.26379108 1.2359603562602994 1.2359603562602994 0.94111697422501195 1.5136878190781333 1.2637911224006488 0.950038552 0.950038552 0.386941522 0.869953454 0.778455853 0.95003851659070837 0.95003851659070837 0.38694155923435009 0.86995338291407664 0.77845583371698512 -6.7 0.848101258 6.7 2.5 5.8 1.8 0.848101258 0.5681818 0.8405797 0.719999969 6.7000000000000002 0.84810126582278467 6.7000000000000002 2.5 5.7999999999999998 1.8 0.84810126582278467 0.56818181818181812 0.84057971014492749 0.72000000000000008 2 0.7058824 0.7058824 0.181818187 0.8095238 0.6666667 0.70588235294117652 0.70588235294117652 0.18181818181818182 0.80952380952380953 0.66666666666666663 1.13437462 1.13437462 0.8113077 1.39355385 1.26379108 1.1343745735539736 1.1343745735539736 0.81130773640087239 1.3935538651830432 1.2637911224006488 0.84984225 0.84984225 0.09116498 0.837673366 0.778455853 0.84984228863096656 0.84984228863096656 0.091164973250557446 0.83767331479677276 0.77845583371698512 -7.2 0.9113924 7.2 3.6 6.1 2.5 0.9113924 0.818181753 0.884057939 1 7.2000000000000002 0.911392405063291 7.2000000000000002 3.6000000000000001 6.0999999999999996 2.5 0.911392405063291 0.81818181818181812 0.88405797101449268 1 2 0.852941155 0.852941155 0.6818182 0.880952358 1 0.8529411764705882 0.8529411764705882 0.68181818181818177 0.88095238095238093 1 1.21902943 1.21902943 1.1682831 1.46563423 1.75526547 1.2190293924759119 1.2190293924759119 1.1682831404172562 1.4656342375200972 1.7552654477786789 0.939083755 0.939083755 0.8919594 0.8579307 0.8644717 0.93908371694631576 0.93908371694631576 0.89195941323598249 0.85793070191741871 0.86447170475057145 -6.5 0.822784841 6.5 3.2 5.1 2 0.822784841 0.7272727 0.7391304 0.8 6.5 0.82278481012658211 6.5 3.2000000000000002 5.0999999999999996 2 0.82278481012658211 0.72727272727272729 0.73913043478260865 0.80000000000000004 2 0.647058845 0.647058845 0.5 0.642857134 0.7619048 0.6470588235294118 0.6470588235294118 0.5 0.6428571428571429 0.76190476190476186 1.10051274 1.10051274 1.038474 1.22536623 1.40421236 1.1005126459851982 1.1005126459851982 1.0384739025931167 1.2253663297299173 1.4042123582229431 0.7940583 0.7940583 0.6578964 0.777955949 0.808938 0.79405825408863862 0.79405825408863862 0.65789648182451921 0.77795595083214475 0.80893802463851161 -6.4 0.8101266 6.4 2.7 5.3 1.9 0.8101266 0.6136364 0.768115938 0.76 6.4000000000000004 0.81012658227848089 6.4000000000000004 2.7000000000000002 5.2999999999999998 1.8999999999999999 0.81012658227848089 0.61363636363636365 0.76811594202898548 0.76000000000000001 2 0.617647052 0.617647052 0.272727281 0.6904762 0.714285731 0.61764705882352944 0.61764705882352944 0.27272727272727271 0.69047619047619047 0.7142857142857143 1.08358181 1.08358181 0.876212358 1.27342 1.33400178 1.0835816822008106 1.0835816822008106 0.87621235531294217 1.2734199112879534 1.3340017403117959 0.7613054 0.7613054 0.214467555 0.797011137 0.794432342 0.76130542616799635 0.76130542616799635 0.21446754872116464 0.79701110606800918 0.7944323164067586 -6.8 0.860759556 6.8 3 5.5 2.1 0.860759556 0.6818181 0.797101438 0.84 6.7999999999999998 0.86075949367088589 6.7999999999999998 3 5.5 2.1000000000000001 0.86075949367088589 0.68181818181818177 0.79710144927536231 0.84000000000000008 2 0.7352941 0.7352941 0.4090909 0.7380952 0.8095238 0.73529411764705888 0.73529411764705888 0.40909090909090912 0.73809523809523814 0.80952380952380953 1.15130568 1.15130568 0.9735693 1.32147348 1.47442293 1.1513055373383612 1.1513055373383612 0.97356928368104678 1.3214734928459895 1.4744229761340903 0.873058 0.873058 0.480745673 0.814404547 0.8221373 0.87305788341059976 0.87305788341059976 0.4807456731235793 0.81440457252843534 0.82213728509573358 -5.7 0.721519 5.7 2.5 5 2 0.721519 0.5681818 0.7246376 0.8 5.7000000000000002 0.72151898734177211 5.7000000000000002 2.5 5 2 0.72151898734177211 0.56818181818181812 0.72463768115942029 0.80000000000000004 2 0.4117647 0.4117647 0.181818187 0.619047642 0.7619048 0.41176470588235292 0.41176470588235292 0.18181818181818182 0.61904761904761907 0.76190476190476186 0.965064943 0.965064943 0.8113077 1.20133948 1.40421236 0.96506493571009688 0.96506493571009688 0.81130773640087239 1.2013395389508994 1.4042123582229431 0.455403626 0.455403626 0.09116498 0.7677612 0.808938 0.45540375842690767 0.45540375842690767 0.091164973250557446 0.76776110588492996 0.80893802463851161 -5.8 0.734177232 5.8 2.8 5.1 2.4 0.734177232 0.6363636 0.7391304 0.960000038 5.7999999999999998 0.73417721518987333 5.7999999999999998 2.7999999999999998 5.0999999999999996 2.3999999999999999 0.73417721518987333 0.63636363636363635 0.73913043478260865 0.95999999999999996 2 0.441176474 0.441176474 0.3181818 0.642857134 0.952380955 0.44117647058823528 0.44117647058823528 0.31818181818181818 0.6428571428571429 0.95238095238095233 0.981996 0.981996 0.908664644 1.22536623 1.6850549 0.98199589949448451 0.98199589949448451 0.908664664768977 1.2253663297299173 1.6850548298675316 0.504585147 0.504585147 0.296437562 0.777955949 0.8552379 0.50458515122771275 0.50458515122771275 0.29643751019242903 0.77795595083214475 0.85523789511433224 -6.4 0.8101266 6.4 3.2 5.3 2.3 0.8101266 0.7272727 0.768115938 0.92 6.4000000000000004 0.81012658227848089 6.4000000000000004 3.2000000000000002 5.2999999999999998 2.2999999999999998 0.81012658227848089 0.72727272727272729 0.76811594202898548 0.91999999999999993 2 0.617647052 0.617647052 0.5 0.6904762 0.9047619 0.61764705882352944 0.61764705882352944 0.5 0.69047619047619047 0.90476190476190477 1.08358181 1.08358181 1.038474 1.27342 1.6148442 1.0835816822008106 1.0835816822008106 1.0384739025931167 1.2734199112879534 1.6148442119563844 0.7613054 0.7613054 0.6578964 0.797011137 0.845170259 0.76130542616799635 0.76130542616799635 0.65789648182451921 0.79701110606800918 0.84517026625737923 -6.5 0.822784841 6.5 3 5.5 1.8 0.822784841 0.6818181 0.797101438 0.719999969 6.5 0.82278481012658211 6.5 3 5.5 1.8 0.82278481012658211 0.68181818181818177 0.79710144927536231 0.72000000000000008 2 0.647058845 0.647058845 0.4090909 0.7380952 0.6666667 0.6470588235294118 0.6470588235294118 0.40909090909090912 0.73809523809523814 0.66666666666666663 1.10051274 1.10051274 0.9735693 1.32147348 1.26379108 1.1005126459851982 1.1005126459851982 0.97356928368104678 1.3214734928459895 1.2637911224006488 0.7940583 0.7940583 0.480745673 0.814404547 0.778455853 0.79405825408863862 0.79405825408863862 0.4807456731235793 0.81440457252843534 0.77845583371698512 -7.7 0.9746835 7.7 3.8 6.7 2.2 0.9746835 0.8636363 0.97101444 0.880000055 7.7000000000000002 0.97468354430379733 7.7000000000000002 3.7999999999999998 6.7000000000000002 2.2000000000000002 0.97468354430379733 0.86363636363636354 0.97101449275362328 0.88000000000000012 2 0.9705882 0.9705882 0.772727251 0.976190448 0.857142866 0.97058823529411764 0.97058823529411764 0.77272727272727271 0.97619047619047616 0.8571428571428571 1.30368423 1.30368423 1.23318768 1.60979486 1.54463363 1.3036842113978502 1.3036842113978502 1.2331877593293259 1.6097949821942052 1.5446335940452376 0.9785672 0.9785672 0.9472266 0.8909001 0.834173143 0.97856725002805034 0.97856725002805034 0.94722658326235554 0.89090007639933866 0.83417310863648386 -7.7 0.9746835 7.7 2.6 6.9 2.3 0.9746835 0.590909064 1 0.92 7.7000000000000002 0.97468354430379733 7.7000000000000002 2.6000000000000001 6.9000000000000004 2.2999999999999998 0.97468354430379733 0.59090909090909094 1 0.91999999999999993 2 0.9705882 0.9705882 0.227272734 1 0.9047619 0.97058823529411764 0.97058823529411764 0.22727272727272727 1 0.90476190476190477 1.30368423 1.30368423 0.84376 1.6578486 1.6148442 1.3036842113978502 1.3036842113978502 0.84376004585690734 1.6578485637522413 1.6148442119563844 0.9785672 0.9785672 0.145245746 0.900005937 0.845170259 0.97856725002805034 0.97856725002805034 0.14524588521591403 0.90000590086073773 0.84517026625737923 -6 0.7594937 6 2.2 5 1.5 0.7594937 0.5 0.7246376 0.6 6 0.75949367088607578 6 2.2000000000000002 5 1.5 0.75949367088607578 0.5 0.72463768115942029 0.60000000000000009 2 0.5 0.5 0.0454545468 0.619047642 0.523809552 0.5 0.5 0.045454545454545456 0.61904761904761907 0.52380952380952384 1.01585793 1.01585793 0.7139508 1.20133948 1.05315924 1.0158578270632599 1.0158578270632599 0.71395080803276778 1.2013395389508994 1.0531592686672073 0.5995771 0.5995771 0.0126449876 0.7677612 0.719658256 0.59957706030964308 0.59957706030964308 0.012644988485085273 0.76776110588492996 0.71965826470413374 -6.9 0.873417735 6.9 3.2 5.7 2.3 0.873417735 0.7272727 0.8260869 0.92 6.9000000000000004 0.87341772151898722 6.9000000000000004 3.2000000000000002 5.7000000000000002 2.2999999999999998 0.87341772151898722 0.72727272727272729 0.82608695652173914 0.91999999999999993 2 0.7647059 0.7647059 0.5 0.785714269 0.9047619 0.76470588235294112 0.76470588235294112 0.5 0.7857142857142857 0.90476190476190477 1.16823661 1.16823661 1.038474 1.369527 1.6148442 1.1682365011227489 1.1682365011227489 1.0384739025931167 1.3695270744040255 1.6148442119563844 0.8933714 0.8933714 0.6578964 0.8302718 0.845170259 0.89337135404275458 0.89337135404275458 0.65789648182451921 0.83027178393794032 0.84517026625737923 -5.6 0.708860755 5.6 2.8 4.9 2 0.708860755 0.6363636 0.710144937 0.8 5.5999999999999996 0.70886075949367078 5.5999999999999996 2.7999999999999998 4.9000000000000004 2 0.70886075949367078 0.63636363636363635 0.71014492753623193 0.80000000000000004 2 0.382352948 0.382352948 0.3181818 0.5952381 0.7619048 0.38235294117647056 0.38235294117647056 0.31818181818181818 0.59523809523809523 0.76190476190476186 0.948134 0.948134 0.908664644 1.17731273 1.40421236 0.94813397192570914 0.94813397192570914 0.908664664768977 1.1773127481718815 1.4042123582229431 0.4060508 0.4060508 0.296437562 0.757097244 0.808938 0.40605068921232229 0.40605068921232229 0.29643751019242903 0.75709721026728072 0.80893802463851161 -7.7 0.9746835 7.7 2.8 6.7 2 0.9746835 0.6363636 0.97101444 0.8 7.7000000000000002 0.97468354430379733 7.7000000000000002 2.7999999999999998 6.7000000000000002 2 0.97468354430379733 0.63636363636363635 0.97101449275362328 0.80000000000000004 2 0.9705882 0.9705882 0.3181818 0.976190448 0.7619048 0.97058823529411764 0.97058823529411764 0.31818181818181818 0.97619047619047616 0.76190476190476186 1.30368423 1.30368423 0.908664644 1.60979486 1.40421236 1.3036842113978502 1.3036842113978502 0.908664664768977 1.6097949821942052 1.4042123582229431 0.9785672 0.9785672 0.296437562 0.8909001 0.808938 0.97856725002805034 0.97856725002805034 0.29643751019242903 0.89090007639933866 0.80893802463851161 -6.3 0.797468364 6.3 2.7 4.9 1.8 0.797468364 0.6136364 0.710144937 0.719999969 6.2999999999999998 0.79746835443037956 6.2999999999999998 2.7000000000000002 4.9000000000000004 1.8 0.79746835443037956 0.61363636363636365 0.71014492753623193 0.72000000000000008 2 0.5882353 0.5882353 0.272727281 0.5952381 0.6666667 0.58823529411764708 0.58823529411764708 0.27272727272727271 0.59523809523809523 0.66666666666666663 1.06665075 1.06665075 0.876212358 1.17731273 1.26379108 1.0666507184164229 1.0666507184164229 0.87621235531294217 1.1773127481718815 1.2637911224006488 0.72531265 0.72531265 0.214467555 0.757097244 0.778455853 0.72531248018388961 0.72531248018388961 0.21446754872116464 0.75709721026728072 0.77845583371698512 -6.7 0.848101258 6.7 3.3 5.7 2.1 0.848101258 0.74999994 0.8260869 0.84 6.7000000000000002 0.84810126582278467 6.7000000000000002 3.2999999999999998 5.7000000000000002 2.1000000000000001 0.84810126582278467 0.74999999999999989 0.82608695652173914 0.84000000000000008 2 0.7058824 0.7058824 0.545454562 0.785714269 0.8095238 0.70588235294117652 0.70588235294117652 0.54545454545454541 0.7857142857142857 0.80952380952380953 1.13437462 1.13437462 1.07092619 1.369527 1.47442293 1.1343745735539736 1.1343745735539736 1.0709262120491514 1.3695270744040255 1.4744229761340903 0.84984225 0.84984225 0.733567655 0.8302718 0.8221373 0.84984228863096656 0.84984228863096656 0.73356785053506501 0.83027178393794032 0.82213728509573358 -7.2 0.9113924 7.2 3.2 6 1.8 0.9113924 0.7272727 0.8695652 0.719999969 7.2000000000000002 0.911392405063291 7.2000000000000002 3.2000000000000002 6 1.8 0.911392405063291 0.72727272727272729 0.86956521739130443 0.72000000000000008 2 0.852941155 0.852941155 0.5 0.857142866 0.6666667 0.8529411764705882 0.8529411764705882 0.5 0.8571428571428571 0.66666666666666663 1.21902943 1.21902943 1.038474 1.44160748 1.26379108 1.2190293924759119 1.2190293924759119 1.0384739025931167 1.4416074467410793 1.2637911224006488 0.939083755 0.939083755 0.6578964 0.851488352 0.778455853 0.93908371694631576 0.93908371694631576 0.65789648182451921 0.85148833619462083 0.77845583371698512 -6.2 0.7848101 6.2 2.8 4.8 1.8 0.7848101 0.6363636 0.6956522 0.719999969 6.2000000000000002 0.78481012658227833 6.2000000000000002 2.7999999999999998 4.7999999999999998 1.8 0.78481012658227833 0.63636363636363635 0.69565217391304346 0.72000000000000008 2 0.5588235 0.5588235 0.3181818 0.5714286 0.6666667 0.55882352941176472 0.55882352941176472 0.31818181818181818 0.5714285714285714 0.66666666666666663 1.04971981 1.04971981 0.908664644 1.153286 1.26379108 1.0497197546320352 1.0497197546320352 0.908664664768977 1.1532859573928635 1.2637911224006488 0.6861942 0.6861942 0.296437562 0.7459458 0.778455853 0.6861941068147408 0.6861941068147408 0.29643751019242903 0.74594581373449664 0.77845583371698512 -6.1 0.7721519 6.1 3 4.9 1.8 0.7721519 0.6818181 0.710144937 0.719999969 6.0999999999999996 0.772151898734177 6.0999999999999996 3 4.9000000000000004 1.8 0.772151898734177 0.68181818181818177 0.71014492753623193 0.72000000000000008 2 0.5294118 0.5294118 0.4090909 0.5952381 0.6666667 0.52941176470588236 0.52941176470588236 0.40909090909090912 0.59523809523809523 0.66666666666666663 1.03278887 1.03278887 0.9735693 1.17731273 1.26379108 1.0327887908476474 1.0327887908476474 0.97356928368104678 1.1773127481718815 1.2637911224006488 0.644171059 0.644171059 0.480745673 0.757097244 0.778455853 0.64417093822767468 0.64417093822767468 0.4807456731235793 0.75709721026728072 0.77845583371698512 -6.4 0.8101266 6.4 2.8 5.6 2.1 0.8101266 0.6363636 0.8115942 0.84 6.4000000000000004 0.81012658227848089 6.4000000000000004 2.7999999999999998 5.5999999999999996 2.1000000000000001 0.81012658227848089 0.63636363636363635 0.81159420289855067 0.84000000000000008 2 0.617647052 0.617647052 0.3181818 0.7619048 0.8095238 0.61764705882352944 0.61764705882352944 0.31818181818181818 0.76190476190476186 0.80952380952380953 1.08358181 1.08358181 0.908664644 1.34550023 1.47442293 1.0835816822008106 1.0835816822008106 0.908664664768977 1.3455002836250074 1.4744229761340903 0.7613054 0.7613054 0.296437562 0.8225208 0.8221373 0.76130542616799635 0.76130542616799635 0.29643751019242903 0.82252078229590153 0.82213728509573358 -7.2 0.9113924 7.2 3 5.8 1.6 0.9113924 0.6818181 0.8405797 0.640000045 7.2000000000000002 0.911392405063291 7.2000000000000002 3 5.7999999999999998 1.6000000000000001 0.911392405063291 0.68181818181818177 0.84057971014492749 0.64000000000000012 2 0.852941155 0.852941155 0.4090909 0.8095238 0.5714286 0.8529411764705882 0.8529411764705882 0.40909090909090912 0.80952380952380953 0.5714285714285714 1.21902943 1.21902943 0.9735693 1.39355385 1.12336993 1.2190293924759119 1.2190293924759119 0.97356928368104678 1.3935538651830432 1.1233698865783546 0.939083755 0.939083755 0.480745673 0.837673366 0.7413043 0.93908371694631576 0.93908371694631576 0.4807456731235793 0.83767331479677276 0.74130430666213609 -7.4 0.936708868 7.4 2.8 6.1 1.9 0.936708868 0.6363636 0.884057939 0.76 7.4000000000000004 0.93670886075949356 7.4000000000000004 2.7999999999999998 6.0999999999999996 1.8999999999999999 0.93670886075949356 0.63636363636363635 0.88405797101449268 0.76000000000000001 2 0.9117647 0.9117647 0.3181818 0.880952358 0.714285731 0.91176470588235292 0.91176470588235292 0.31818181818181818 0.88095238095238093 0.7142857142857143 1.25289142 1.25289142 0.908664644 1.46563423 1.33400178 1.2528913200446872 1.2528913200446872 0.908664664768977 1.4656342375200972 1.3340017403117959 0.959248662 0.959248662 0.296437562 0.8579307 0.794432342 0.95924858044400851 0.95924858044400851 0.29643751019242903 0.85793070191741871 0.7944323164067586 -7.9 1 7.9 3.8 6.4 2 1 0.8636363 0.9275362 0.8 7.9000000000000004 0.99999999999999989 7.9000000000000004 3.7999999999999998 6.4000000000000004 2 0.99999999999999989 0.86363636363636354 0.92753623188405809 0.80000000000000004 2 1 1 0.772727251 0.9285714 0.7619048 1 1 0.77272727272727271 0.9285714285714286 0.76190476190476186 1.33754623 1.33754623 1.23318768 1.5377146 1.40421236 1.3375461389666257 1.3375461389666257 1.2331877593293259 1.5377146098571515 1.4042123582229431 0.9863704 0.9863704 0.9472266 0.875559449 0.808938 0.98637034929396195 0.98637034929396195 0.94722658326235554 0.87555942778912454 0.80893802463851161 -6.4 0.8101266 6.4 2.8 5.6 2.2 0.8101266 0.6363636 0.8115942 0.880000055 6.4000000000000004 0.81012658227848089 6.4000000000000004 2.7999999999999998 5.5999999999999996 2.2000000000000002 0.81012658227848089 0.63636363636363635 0.81159420289855067 0.88000000000000012 2 0.617647052 0.617647052 0.3181818 0.7619048 0.857142866 0.61764705882352944 0.61764705882352944 0.31818181818181818 0.76190476190476186 0.8571428571428571 1.08358181 1.08358181 0.908664644 1.34550023 1.54463363 1.0835816822008106 1.0835816822008106 0.908664664768977 1.3455002836250074 1.5446335940452376 0.7613054 0.7613054 0.296437562 0.8225208 0.834173143 0.76130542616799635 0.76130542616799635 0.29643751019242903 0.82252078229590153 0.83417310863648386 -6.3 0.797468364 6.3 2.8 5.1 1.5 0.797468364 0.6363636 0.7391304 0.6 6.2999999999999998 0.79746835443037956 6.2999999999999998 2.7999999999999998 5.0999999999999996 1.5 0.79746835443037956 0.63636363636363635 0.73913043478260865 0.60000000000000009 2 0.5882353 0.5882353 0.3181818 0.642857134 0.523809552 0.58823529411764708 0.58823529411764708 0.31818181818181818 0.6428571428571429 0.52380952380952384 1.06665075 1.06665075 0.908664644 1.22536623 1.05315924 1.0666507184164229 1.0666507184164229 0.908664664768977 1.2253663297299173 1.0531592686672073 0.72531265 0.72531265 0.296437562 0.777955949 0.719658256 0.72531248018388961 0.72531248018388961 0.29643751019242903 0.77795595083214475 0.71965826470413374 -6.1 0.7721519 6.1 2.6 5.6 1.4 0.7721519 0.590909064 0.8115942 0.56 6.0999999999999996 0.772151898734177 6.0999999999999996 2.6000000000000001 5.5999999999999996 1.3999999999999999 0.772151898734177 0.59090909090909094 0.81159420289855067 0.55999999999999994 2 0.5294118 0.5294118 0.227272734 0.7619048 0.476190478 0.52941176470588236 0.52941176470588236 0.22727272727272727 0.76190476190476186 0.47619047619047616 1.03278887 1.03278887 0.84376 1.34550023 0.982948661 1.0327887908476474 1.0327887908476474 0.84376004585690734 1.3455002836250074 0.98294865075606008 0.644171059 0.644171059 0.145245746 0.8225208 0.6955889 0.64417093822767468 0.64417093822767468 0.14524588521591403 0.82252078229590153 0.69558889835906823 -7.7 0.9746835 7.7 3 6.1 2.3 0.9746835 0.6818181 0.884057939 0.92 7.7000000000000002 0.97468354430379733 7.7000000000000002 3 6.0999999999999996 2.2999999999999998 0.97468354430379733 0.68181818181818177 0.88405797101449268 0.91999999999999993 2 0.9705882 0.9705882 0.4090909 0.880952358 0.9047619 0.97058823529411764 0.97058823529411764 0.40909090909090912 0.88095238095238093 0.90476190476190477 1.30368423 1.30368423 0.9735693 1.46563423 1.6148442 1.3036842113978502 1.3036842113978502 0.97356928368104678 1.4656342375200972 1.6148442119563844 0.9785672 0.9785672 0.480745673 0.8579307 0.845170259 0.97856725002805034 0.97856725002805034 0.4807456731235793 0.85793070191741871 0.84517026625737923 -6.3 0.797468364 6.3 3.4 5.6 2.4 0.797468364 0.772727251 0.8115942 0.960000038 6.2999999999999998 0.79746835443037956 6.2999999999999998 3.3999999999999999 5.5999999999999996 2.3999999999999999 0.79746835443037956 0.77272727272727271 0.81159420289855067 0.95999999999999996 2 0.5882353 0.5882353 0.590909064 0.7619048 0.952380955 0.58823529411764708 0.58823529411764708 0.59090909090909094 0.76190476190476186 0.95238095238095233 1.06665075 1.06665075 1.10337853 1.34550023 1.6850549 1.0666507184164229 1.0666507184164229 1.1033785215051863 1.3455002836250074 1.6850548298675316 0.72531265 0.72531265 0.797875941 0.8225208 0.8552379 0.72531248018388961 0.72531248018388961 0.79787580879856601 0.82252078229590153 0.85523789511433224 -6.4 0.8101266 6.4 3.1 5.5 1.8 0.8101266 0.7045454 0.797101438 0.719999969 6.4000000000000004 0.81012658227848089 6.4000000000000004 3.1000000000000001 5.5 1.8 0.81012658227848089 0.70454545454545459 0.79710144927536231 0.72000000000000008 2 0.617647052 0.617647052 0.454545468 0.7380952 0.6666667 0.61764705882352944 0.61764705882352944 0.45454545454545453 0.73809523809523814 0.66666666666666663 1.08358181 1.08358181 1.0060215 1.32147348 1.26379108 1.0835816822008106 1.0835816822008106 1.0060215931370817 1.3214734928459895 1.2637911224006488 0.7613054 0.7613054 0.5725629 0.814404547 0.778455853 0.76130542616799635 0.76130542616799635 0.5725628341629212 0.81440457252843534 0.77845583371698512 -6 0.7594937 6 3 4.8 1.8 0.7594937 0.6818181 0.6956522 0.719999969 6 0.75949367088607578 6 3 4.7999999999999998 1.8 0.75949367088607578 0.68181818181818177 0.69565217391304346 0.72000000000000008 2 0.5 0.5 0.4090909 0.5714286 0.6666667 0.5 0.5 0.40909090909090912 0.5714285714285714 0.66666666666666663 1.01585793 1.01585793 0.9735693 1.153286 1.26379108 1.0158578270632599 1.0158578270632599 0.97356928368104678 1.1532859573928635 1.2637911224006488 0.5995771 0.5995771 0.480745673 0.7459458 0.778455853 0.59957706030964308 0.59957706030964308 0.4807456731235793 0.74594581373449664 0.77845583371698512 -6.9 0.873417735 6.9 3.1 5.4 2.1 0.873417735 0.7045454 0.7826087 0.84 6.9000000000000004 0.87341772151898722 6.9000000000000004 3.1000000000000001 5.4000000000000004 2.1000000000000001 0.87341772151898722 0.70454545454545459 0.78260869565217395 0.84000000000000008 2 0.7647059 0.7647059 0.454545468 0.714285731 0.8095238 0.76470588235294112 0.76470588235294112 0.45454545454545453 0.7142857142857143 0.80952380952380953 1.16823661 1.16823661 1.0060215 1.29744673 1.47442293 1.1682365011227489 1.1682365011227489 1.0060215931370817 1.2974467020669715 1.4744229761340903 0.8933714 0.8933714 0.5725629 0.805906951 0.8221373 0.89337135404275458 0.89337135404275458 0.5725628341629212 0.80590691835886541 0.82213728509573358 -6.7 0.848101258 6.7 3.1 5.6 2.4 0.848101258 0.7045454 0.8115942 0.960000038 6.7000000000000002 0.84810126582278467 6.7000000000000002 3.1000000000000001 5.5999999999999996 2.3999999999999999 0.84810126582278467 0.70454545454545459 0.81159420289855067 0.95999999999999996 2 0.7058824 0.7058824 0.454545468 0.7619048 0.952380955 0.70588235294117652 0.70588235294117652 0.45454545454545453 0.76190476190476186 0.95238095238095233 1.13437462 1.13437462 1.0060215 1.34550023 1.6850549 1.1343745735539736 1.1343745735539736 1.0060215931370817 1.3455002836250074 1.6850548298675316 0.84984225 0.84984225 0.5725629 0.8225208 0.8552379 0.84984228863096656 0.84984228863096656 0.5725628341629212 0.82252078229590153 0.85523789511433224 -6.9 0.873417735 6.9 3.1 5.1 2.3 0.873417735 0.7045454 0.7391304 0.92 6.9000000000000004 0.87341772151898722 6.9000000000000004 3.1000000000000001 5.0999999999999996 2.2999999999999998 0.87341772151898722 0.70454545454545459 0.73913043478260865 0.91999999999999993 2 0.7647059 0.7647059 0.454545468 0.642857134 0.9047619 0.76470588235294112 0.76470588235294112 0.45454545454545453 0.6428571428571429 0.90476190476190477 1.16823661 1.16823661 1.0060215 1.22536623 1.6148442 1.1682365011227489 1.1682365011227489 1.0060215931370817 1.2253663297299173 1.6148442119563844 0.8933714 0.8933714 0.5725629 0.777955949 0.845170259 0.89337135404275458 0.89337135404275458 0.5725628341629212 0.77795595083214475 0.84517026625737923 -5.8 0.734177232 5.8 2.7 5.1 1.9 0.734177232 0.6136364 0.7391304 0.76 5.7999999999999998 0.73417721518987333 5.7999999999999998 2.7000000000000002 5.0999999999999996 1.8999999999999999 0.73417721518987333 0.61363636363636365 0.73913043478260865 0.76000000000000001 2 0.441176474 0.441176474 0.272727281 0.642857134 0.714285731 0.44117647058823528 0.44117647058823528 0.27272727272727271 0.6428571428571429 0.7142857142857143 0.981996 0.981996 0.876212358 1.22536623 1.33400178 0.98199589949448451 0.98199589949448451 0.87621235531294217 1.2253663297299173 1.3340017403117959 0.504585147 0.504585147 0.214467555 0.777955949 0.794432342 0.50458515122771275 0.50458515122771275 0.21446754872116464 0.77795595083214475 0.7944323164067586 -6.8 0.860759556 6.8 3.2 5.9 2.3 0.860759556 0.7272727 0.855072439 0.92 6.7999999999999998 0.86075949367088589 6.7999999999999998 3.2000000000000002 5.9000000000000004 2.2999999999999998 0.86075949367088589 0.72727272727272729 0.85507246376811608 0.91999999999999993 2 0.7352941 0.7352941 0.5 0.8333333 0.9047619 0.73529411764705888 0.73529411764705888 0.5 0.83333333333333337 0.90476190476190477 1.15130568 1.15130568 1.038474 1.4175806 1.6148442 1.1513055373383612 1.1513055373383612 1.0384739025931167 1.4175806559620614 1.6148442119563844 0.873058 0.873058 0.6578964 0.8447406 0.845170259 0.87305788341059976 0.87305788341059976 0.65789648182451921 0.8447405985468005 0.84517026625737923 -6.7 0.848101258 6.7 3.3 5.7 2.5 0.848101258 0.74999994 0.8260869 1 6.7000000000000002 0.84810126582278467 6.7000000000000002 3.2999999999999998 5.7000000000000002 2.5 0.84810126582278467 0.74999999999999989 0.82608695652173914 1 2 0.7058824 0.7058824 0.545454562 0.785714269 1 0.70588235294117652 0.70588235294117652 0.54545454545454541 0.7857142857142857 1 1.13437462 1.13437462 1.07092619 1.369527 1.75526547 1.1343745735539736 1.1343745735539736 1.0709262120491514 1.3695270744040255 1.7552654477786789 0.84984225 0.84984225 0.733567655 0.8302718 0.8644717 0.84984228863096656 0.84984228863096656 0.73356785053506501 0.83027178393794032 0.86447170475057145 -6.7 0.848101258 6.7 3 5.2 2.3 0.848101258 0.6818181 0.7536231 0.92 6.7000000000000002 0.84810126582278467 6.7000000000000002 3 5.2000000000000002 2.2999999999999998 0.84810126582278467 0.68181818181818177 0.75362318840579712 0.91999999999999993 2 0.7058824 0.7058824 0.4090909 0.6666667 0.9047619 0.70588235294117652 0.70588235294117652 0.40909090909090912 0.66666666666666663 0.90476190476190477 1.13437462 1.13437462 0.9735693 1.24939311 1.6148442 1.1343745735539736 1.1343745735539736 0.97356928368104678 1.2493931205089355 1.6148442119563844 0.84984225 0.84984225 0.480745673 0.7877 0.845170259 0.84984228863096656 0.84984228863096656 0.4807456731235793 0.78769997391633806 0.84517026625737923 -6.3 0.797468364 6.3 2.5 5 1.9 0.797468364 0.5681818 0.7246376 0.76 6.2999999999999998 0.79746835443037956 6.2999999999999998 2.5 5 1.8999999999999999 0.79746835443037956 0.56818181818181812 0.72463768115942029 0.76000000000000001 2 0.5882353 0.5882353 0.181818187 0.619047642 0.714285731 0.58823529411764708 0.58823529411764708 0.18181818181818182 0.61904761904761907 0.7142857142857143 1.06665075 1.06665075 0.8113077 1.20133948 1.33400178 1.0666507184164229 1.0666507184164229 0.81130773640087239 1.2013395389508994 1.3340017403117959 0.72531265 0.72531265 0.09116498 0.7677612 0.794432342 0.72531248018388961 0.72531248018388961 0.091164973250557446 0.76776110588492996 0.7944323164067586 -6.5 0.822784841 6.5 3 5.2 2 0.822784841 0.6818181 0.7536231 0.8 6.5 0.82278481012658211 6.5 3 5.2000000000000002 2 0.82278481012658211 0.68181818181818177 0.75362318840579712 0.80000000000000004 2 0.647058845 0.647058845 0.4090909 0.6666667 0.7619048 0.6470588235294118 0.6470588235294118 0.40909090909090912 0.66666666666666663 0.76190476190476186 1.10051274 1.10051274 0.9735693 1.24939311 1.40421236 1.1005126459851982 1.1005126459851982 0.97356928368104678 1.2493931205089355 1.4042123582229431 0.7940583 0.7940583 0.480745673 0.7877 0.808938 0.79405825408863862 0.79405825408863862 0.4807456731235793 0.78769997391633806 0.80893802463851161 -6.2 0.7848101 6.2 3.4 5.4 2.3 0.7848101 0.772727251 0.7826087 0.92 6.2000000000000002 0.78481012658227833 6.2000000000000002 3.3999999999999999 5.4000000000000004 2.2999999999999998 0.78481012658227833 0.77272727272727271 0.78260869565217395 0.91999999999999993 2 0.5588235 0.5588235 0.590909064 0.714285731 0.9047619 0.55882352941176472 0.55882352941176472 0.59090909090909094 0.7142857142857143 0.90476190476190477 1.04971981 1.04971981 1.10337853 1.29744673 1.6148442 1.0497197546320352 1.0497197546320352 1.1033785215051863 1.2974467020669715 1.6148442119563844 0.6861942 0.6861942 0.797875941 0.805906951 0.845170259 0.6861941068147408 0.6861941068147408 0.79787580879856601 0.80590691835886541 0.84517026625737923 -5.9 0.7468355 5.9 3 5.1 1.8 0.7468355 0.6818181 0.7391304 0.719999969 5.9000000000000004 0.74683544303797467 5.9000000000000004 3 5.0999999999999996 1.8 0.74683544303797467 0.68181818181818177 0.73913043478260865 0.72000000000000008 2 0.470588237 0.470588237 0.4090909 0.642857134 0.6666667 0.47058823529411764 0.47058823529411764 0.40909090909090912 0.6428571428571429 0.66666666666666663 0.998926938 0.998926938 0.9735693 1.22536623 1.26379108 0.99892686327887226 0.99892686327887226 0.97356928368104678 1.2253663297299173 1.2637911224006488 0.5528621 0.5528621 0.480745673 0.777955949 0.778455853 0.55286190159866166 0.55286190159866166 0.4807456731235793 0.77795595083214475 0.77845583371698512 diff --git a/test/BaselineOutput/SingleRelease/PCA/pca.tsv b/test/BaselineOutput/SingleRelease/PCA/pca.tsv index ece1e59164..328ff1bf86 100644 --- a/test/BaselineOutput/SingleRelease/PCA/pca.tsv +++ b/test/BaselineOutput/SingleRelease/PCA/pca.tsv @@ -2,7 +2,7 @@ #@ sep=tab #@ col=pca:R4:0-4 #@ } -2.085487 0.09400085 2.58366132 -1.721405 -0.732070744 -0.9069792 0.7748574 0.6097196 1.07868779 0.453838825 --0.167718172 -0.92723 -0.19140324 0.243479848 -1.060547 -0.548309 0.5576686 -0.587472439 -1.38610959 0.9422219 +-2.085465 -0.09400512 -2.58367229 1.72141707 0.732049346 +-0.906982958 -0.774861753 -0.609727442 -1.07867944 -0.453824759 +0.167715371 0.927231133 0.191398591 -0.243467987 1.06056178 +-0.54830873 -0.5576661 0.587476134 1.38609958 -0.9422357 diff --git a/test/BaselineOutput/SingleRelease/Text/lpnorm_gcnorm_whitened.tsv b/test/BaselineOutput/SingleRelease/Text/lpnorm_gcnorm_whitened.tsv deleted file mode 100644 index fad6d5db4d..0000000000 --- a/test/BaselineOutput/SingleRelease/Text/lpnorm_gcnorm_whitened.tsv +++ /dev/null @@ -1,10 +0,0 @@ -#@ TextLoader{ -#@ sep=tab -#@ col=lpnorm:R4:0-10 -#@ col=gcnorm:R4:11-21 -#@ col=whitened:R4:22-32 -#@ } --0.686319232 0.192169383 -0.152238086 0.03493989 0.346903175 0.09483684 -0.132272437 -0.124785319 -0.5315855 -0.0973325446 0.114802495 -0.626524031 0.289601743 -0.0695612058 0.125636056 0.4509648 0.188099176 -0.0487401523 -0.04093227 -0.465160966 -0.0123033375 0.208920211 -2.604605 0.829638362 -0.5992434 0.19860521 1.33247662 0.369197041 -0.5760094 -0.5490271 -1.94509208 -0.393351972 0.507488966 --0.20306389 -0.1231699 -0.039946992 0.183090389 -0.3328916 0.279628932 -0.0066578323 0.432759076 -0.0798939839 -0.1664458 -0.7057302 -0.137441739 -0.055349838 0.0301625486 0.259335726 -0.270841062 0.3585301 0.0643675 0.5158729 -0.0108833946 -0.09981628 -0.653936446 -0.5923902 -0.324390084 -0.114805378 0.6855182 -1.055579 0.8767955 -0.0392023772 1.21807373 -0.160801888 -0.47570774 -2.22817 --0.268398017 -0.28734377 0.571529865 0.006315247 -0.246294647 -0.445224941 -0.344181 -0.20524554 0.284186125 -0.116832078 -0.06946772 -0.176903129 -0.19703348 0.715542555 0.114987023 -0.153417692 -0.3647864 -0.257424533 -0.109801926 0.410232216 -0.0158602837 0.0344656035 -0.9132714 -0.911281645 1.814283 0.07471426 -0.8969923 -1.44387519 -1.19571114 -0.6542767 0.887983143 -0.4604767 -0.17543222 -0.117021732 0.438831449 -0.100304335 0.125380427 -0.413755417 0.0794076 0.133739114 -0.397038 -0.497342378 -0.2632989 0.313451052 0.160775661 0.485780418 -0.0587080531 0.169217348 -0.3752711 0.122788094 0.17765902 -0.358387738 -0.459687948 -0.223320842 0.3591552 0.236966148 1.004758 -0.233154371 0.3862052 -1.02724624 0.240614042 0.299898773 -1.03102541 -1.13852251 -0.6675951 0.766793966 diff --git a/test/Microsoft.ML.Benchmarks/Harness/Configs.cs b/test/Microsoft.ML.Benchmarks/Harness/Configs.cs index b0fdf95155..96cc22ec74 100644 --- a/test/Microsoft.ML.Benchmarks/Harness/Configs.cs +++ b/test/Microsoft.ML.Benchmarks/Harness/Configs.cs @@ -18,22 +18,21 @@ public RecommendedConfig() .With(CreateToolchain())); // toolchain is responsible for generating, building and running dedicated executable per benchmark Add(new ExtraMetricColumn()); // an extra colum that can display additional metric reported by the benchmarks - - UnionRule = ConfigUnionRule.AlwaysUseLocal; // global config can be overwritten with local (the one set via [ConfigAttribute]) } protected virtual Job GetJobDefinition() => Job.Default .WithWarmupCount(1) // ML.NET benchmarks are typically CPU-heavy benchmarks, 1 warmup is usually enough - .WithMaxIterationCount(20); + .WithMaxIterationCount(20) + .AsDefault(); // this way we tell BDN that it's a default config which can be overwritten /// /// we need our own toolchain because MSBuild by default does not copy recursive native dependencies to the output /// private IToolchain CreateToolchain() { - var tfm = GetTargetFrameworkMoniker(); - var csProj = CsProjCoreToolchain.From(new NetCoreAppSettings(targetFrameworkMoniker: tfm, runtimeFrameworkVersion: null, name: tfm)); + var tfm = NetCoreAppSettings.Current.Value.TargetFrameworkMoniker; + var csProj = CsProjCoreToolchain.Current.Value; return new Toolchain( tfm, @@ -42,15 +41,6 @@ private IToolchain CreateToolchain() csProj.Executor); } - private static string GetTargetFrameworkMoniker() - { -#if NETCOREAPP3_0 // todo: remove the #IF DEFINES when BDN 0.11.2 gets released (BDN gains the 3.0 support) - return "netcoreapp3.0"; -#else - return NetCoreAppSettings.Current.Value.TargetFrameworkMoniker; -#endif - } - private static string GetBuildConfigurationName() { #if NETCOREAPP3_0 diff --git a/test/Microsoft.ML.Benchmarks/Harness/ProjectGenerator.cs b/test/Microsoft.ML.Benchmarks/Harness/ProjectGenerator.cs index 2c77ce6d79..563933914b 100644 --- a/test/Microsoft.ML.Benchmarks/Harness/ProjectGenerator.cs +++ b/test/Microsoft.ML.Benchmarks/Harness/ProjectGenerator.cs @@ -27,7 +27,7 @@ namespace Microsoft.ML.Benchmarks.Harness /// public class ProjectGenerator : CsProjGenerator { - public ProjectGenerator(string targetFrameworkMoniker) : base(targetFrameworkMoniker, platform => platform.ToConfig(), null) + public ProjectGenerator(string targetFrameworkMoniker) : base(targetFrameworkMoniker, null, null, null) { } diff --git a/test/Microsoft.ML.Benchmarks/HashBench.cs b/test/Microsoft.ML.Benchmarks/HashBench.cs index 74a056ea77..c4e0a66166 100644 --- a/test/Microsoft.ML.Benchmarks/HashBench.cs +++ b/test/Microsoft.ML.Benchmarks/HashBench.cs @@ -41,8 +41,8 @@ private void InitMap(T val, ColumnType type, int hashBits = 20) _counted = new Counted(); var inRow = RowColumnUtils.GetRow(_counted, col); // One million features is a nice, typical number. - var info = new HashTransformer.ColumnInfo("Foo", "Bar", hashBits: hashBits); - var xf = new HashTransformer(_env, new[] { info }); + var info = new HashingTransformer.ColumnInfo("Foo", "Bar", hashBits: hashBits); + var xf = new HashingTransformer(_env, new[] { info }); var mapper = xf.GetRowToRowMapper(inRow.Schema); mapper.Schema.TryGetColumnIndex("Bar", out int outCol); var outRow = mapper.GetRow(inRow, c => c == outCol, out var _); diff --git a/test/Microsoft.ML.Benchmarks/Helpers/EnvironmentFactory.cs b/test/Microsoft.ML.Benchmarks/Helpers/EnvironmentFactory.cs index f707df9e59..3b0b055d30 100644 --- a/test/Microsoft.ML.Benchmarks/Helpers/EnvironmentFactory.cs +++ b/test/Microsoft.ML.Benchmarks/Helpers/EnvironmentFactory.cs @@ -5,42 +5,45 @@ using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Training; using Microsoft.ML.Transforms; namespace Microsoft.ML.Benchmarks { internal static class EnvironmentFactory { - internal static ConsoleEnvironment CreateClassificationEnvironment() + internal static MLContext CreateClassificationEnvironment() where TLoader : IDataReader where TTransformer : ITransformer - where TTrainer : ITrainer + where TTrainer : ITrainerEstimator, IPredictor> { - var environment = new ConsoleEnvironment(verbose: false, sensitivity: MessageSensitivity.None, outWriter: EmptyWriter.Instance); + var ctx = new MLContext(); + IHostEnvironment environment = ctx; environment.ComponentCatalog.RegisterAssembly(typeof(TLoader).Assembly); environment.ComponentCatalog.RegisterAssembly(typeof(TTransformer).Assembly); environment.ComponentCatalog.RegisterAssembly(typeof(TTrainer).Assembly); - return environment; + return ctx; } - internal static ConsoleEnvironment CreateRankingEnvironment() + internal static MLContext CreateRankingEnvironment() where TEvaluator : IEvaluator where TLoader : IDataReader where TTransformer : ITransformer - where TTrainer : ITrainer + where TTrainer : ITrainerEstimator, IPredictor> { - var environment = new ConsoleEnvironment(verbose: false, sensitivity: MessageSensitivity.None, outWriter: EmptyWriter.Instance); + var ctx = new MLContext(); + IHostEnvironment environment = ctx; environment.ComponentCatalog.RegisterAssembly(typeof(TEvaluator).Assembly); environment.ComponentCatalog.RegisterAssembly(typeof(TLoader).Assembly); environment.ComponentCatalog.RegisterAssembly(typeof(TTransformer).Assembly); environment.ComponentCatalog.RegisterAssembly(typeof(TTrainer).Assembly); - environment.ComponentCatalog.RegisterAssembly(typeof(NAHandleTransform).Assembly); + environment.ComponentCatalog.RegisterAssembly(typeof(MissingValueHandlingTransformer).Assembly); - return environment; + return ctx; } } } diff --git a/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs b/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs index c56eae60aa..89dabd1279 100644 --- a/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs +++ b/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs @@ -3,14 +3,8 @@ // See the LICENSE file in the project root for more information. using BenchmarkDotNet.Attributes; -using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Internal.Calibration; -using Microsoft.ML.Runtime.Learners; -using Microsoft.ML.Trainers.KMeans; -using Microsoft.ML.Transforms; -using Microsoft.ML.Transforms.Categorical; -using Microsoft.ML.Transforms.Normalizers; namespace Microsoft.ML.Benchmarks { @@ -21,15 +15,10 @@ public class KMeansAndLogisticRegressionBench [Benchmark] public ParameterMixingCalibratedPredictor TrainKMeansAndLR() { - using (var env = new ConsoleEnvironment(seed: 1)) - { - // Pipeline - var loader = TextLoader.ReadFile(env, - new TextLoader.Arguments() - { - HasHeader = true, - Separator = ",", - Column = new[] { + var ml = new MLContext(seed: 1); + // Pipeline + + var input = ml.Data.ReadFromTextFile(new[] { new TextLoader.Column("Label", DataKind.R4, 14), new TextLoader.Column("CatFeatures", DataKind.TX, new [] { @@ -44,30 +33,23 @@ public ParameterMixingCalibratedPredictor TrainKMeansAndLR() new TextLoader.Range() { Min = 2, Max = 2 }, new TextLoader.Range() { Min = 4, Max = 4 }, new TextLoader.Range() { Min = 10, Max = 12 } - }) - } - }, new MultiFileSource(_dataPath)); - - IDataView trans = new OneHotEncodingEstimator(env, "CatFeatures").Fit(loader).Transform(loader); + }), + }, _dataPath, s => + { + s.HasHeader = true; + s.Separator = ","; + }); - trans = NormalizeTransform.CreateMinMaxNormalizer(env, trans, "NumFeatures"); - trans = new ConcatTransform(env, "Features", "NumFeatures", "CatFeatures").Transform(trans); - trans = TrainAndScoreTransform.Create(env, new TrainAndScoreTransform.Arguments - { - Trainer = ComponentFactoryUtils.CreateFromFunction(host => - new KMeansPlusPlusTrainer(host, "Features", advancedSettings: s=> - { - s.K = 100; - })), - FeatureColumn = "Features" - }, trans); - trans = new ConcatTransform(env, "Features", "Features", "Score").Transform(trans); + var estimatorPipeline = ml.Transforms.Categorical.OneHotEncoding("CatFeatures") + .Append(ml.Transforms.Normalize("NumFeatures")) + .Append(ml.Transforms.Concatenate("Features", "NumFeatures", "CatFeatures")) + .Append(ml.Clustering.Trainers.KMeans("Features")) + .Append(ml.Transforms.Concatenate("Features", "Features", "Score")) + .Append(ml.BinaryClassification.Trainers.LogisticRegression(advancedSettings: args => { args.EnforceNonNegativity = true; args.OptTol = 1e-3f; })); - // Train - var trainer = new LogisticRegression(env, "Features", "Label", advancedSettings: args => { args.EnforceNonNegativity = true; args.OptTol = 1e-3f; }); - var trainRoles = new RoleMappedData(trans, label: "Label", feature: "Features"); - return trainer.Train(trainRoles); - } + var model = estimatorPipeline.Fit(input); + // Return the last model in the chain. + return model.LastTransformer.Model; } } } \ No newline at end of file diff --git a/test/Microsoft.ML.Benchmarks/Microsoft.ML.Benchmarks.csproj b/test/Microsoft.ML.Benchmarks/Microsoft.ML.Benchmarks.csproj index 346ff6ecea..e0ef8157dc 100644 --- a/test/Microsoft.ML.Benchmarks/Microsoft.ML.Benchmarks.csproj +++ b/test/Microsoft.ML.Benchmarks/Microsoft.ML.Benchmarks.csproj @@ -12,6 +12,7 @@ + diff --git a/test/Microsoft.ML.Benchmarks/Numeric/Ranking.cs b/test/Microsoft.ML.Benchmarks/Numeric/Ranking.cs index 5c8328fda4..adc1bccdce 100644 --- a/test/Microsoft.ML.Benchmarks/Numeric/Ranking.cs +++ b/test/Microsoft.ML.Benchmarks/Numeric/Ranking.cs @@ -24,7 +24,7 @@ public void SetupTrainingSpeedTests() { _mslrWeb10k_Validate = Path.GetFullPath(TestDatasets.MSLRWeb.validFilename); _mslrWeb10k_Train = Path.GetFullPath(TestDatasets.MSLRWeb.trainFilename); - + if (!File.Exists(_mslrWeb10k_Validate)) throw new FileNotFoundException(string.Format(Errors.DatasetNotFound, _mslrWeb10k_Validate)); @@ -42,10 +42,8 @@ public void TrainTest_Ranking_MSLRWeb10K_RawNumericFeatures_FastTreeRanking() " xf=HashTransform{col=GroupId} xf=NAHandleTransform{col=Features}" + " tr=FastTreeRanking{}"; - using (var environment = EnvironmentFactory.CreateRankingEnvironment()) - { - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); - } + var environment = EnvironmentFactory.CreateRankingEnvironment(); + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); } [Benchmark] @@ -59,10 +57,8 @@ public void TrainTest_Ranking_MSLRWeb10K_RawNumericFeatures_LightGBMRanking() " xf=NAHandleTransform{col=Features}" + " tr=LightGBMRanking{}"; - using (var environment = EnvironmentFactory.CreateRankingEnvironment()) - { - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); - } + var environment = EnvironmentFactory.CreateRankingEnvironment(); + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); } } @@ -100,10 +96,8 @@ public void SetupScoringSpeedTests() " tr=FastTreeRanking{}" + " out={" + _modelPath_MSLR + "}"; - using (var environment = EnvironmentFactory.CreateRankingEnvironment()) - { - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); - } + var environment = EnvironmentFactory.CreateRankingEnvironment(); + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); } [Benchmark] @@ -112,10 +106,8 @@ public void Test_Ranking_MSLRWeb10K_RawNumericFeatures_FastTreeRanking() // This benchmark is profiling bulk scoring speed and not training speed. string cmd = @"Test data=" + _mslrWeb10k_Test + " in=" + _modelPath_MSLR; - using (var environment = EnvironmentFactory.CreateRankingEnvironment()) - { - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); - } + var environment = EnvironmentFactory.CreateRankingEnvironment(); + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); } } } diff --git a/test/Microsoft.ML.Benchmarks/PredictionEngineBench.cs b/test/Microsoft.ML.Benchmarks/PredictionEngineBench.cs index fac87ca362..39342cf224 100644 --- a/test/Microsoft.ML.Benchmarks/PredictionEngineBench.cs +++ b/test/Microsoft.ML.Benchmarks/PredictionEngineBench.cs @@ -36,32 +36,30 @@ public void SetupIrisPipeline() string _irisDataPath = Program.GetInvariantCultureDataPath("iris.txt"); - using (var env = new ConsoleEnvironment(seed: 1, conc: 1, verbose: false, sensitivity: MessageSensitivity.None, outWriter: EmptyWriter.Instance)) - { - var reader = new TextLoader(env, - new TextLoader.Arguments() + var env = new MLContext(seed: 1, conc: 1); + var reader = new TextLoader(env, + new TextLoader.Arguments() + { + Separator = "\t", + HasHeader = true, + Column = new[] { - Separator = "\t", - HasHeader = true, - Column = new[] - { new TextLoader.Column("Label", DataKind.R4, 0), new TextLoader.Column("SepalLength", DataKind.R4, 1), new TextLoader.Column("SepalWidth", DataKind.R4, 2), new TextLoader.Column("PetalLength", DataKind.R4, 3), new TextLoader.Column("PetalWidth", DataKind.R4, 4), - } - }); + } + }); - IDataView data = reader.Read(_irisDataPath); + IDataView data = reader.Read(_irisDataPath); - var pipeline = new ColumnConcatenatingEstimator (env, "Features", new[] { "SepalLength", "SepalWidth", "PetalLength", "PetalWidth" }) - .Append(new SdcaMultiClassTrainer(env, "Features", "Label", advancedSettings: (s) => { s.NumThreads = 1; s.ConvergenceTolerance = 1e-2f; })); + var pipeline = new ColumnConcatenatingEstimator(env, "Features", new[] { "SepalLength", "SepalWidth", "PetalLength", "PetalWidth" }) + .Append(new SdcaMultiClassTrainer(env, "Label", "Features", advancedSettings: (s) => { s.NumThreads = 1; s.ConvergenceTolerance = 1e-2f; })); - var model = pipeline.Fit(data); + var model = pipeline.Fit(data); - _irisModel = model.MakePredictionFunction(env); - } + _irisModel = model.MakePredictionFunction(env); } [GlobalSetup(Target = nameof(MakeSentimentPredictions))] @@ -74,9 +72,8 @@ public void SetupSentimentPipeline() string _sentimentDataPath = Program.GetInvariantCultureDataPath("wikipedia-detox-250-line-data.tsv"); - using (var env = new ConsoleEnvironment(seed: 1, conc: 1, verbose: false, sensitivity: MessageSensitivity.None, outWriter: EmptyWriter.Instance)) - { - var reader = new TextLoader(env, + var env = new MLContext(seed: 1, conc: 1); + var reader = new TextLoader(env, new TextLoader.Arguments() { Separator = "\t", @@ -88,15 +85,14 @@ public void SetupSentimentPipeline() } }); - IDataView data = reader.Read(_sentimentDataPath); + IDataView data = reader.Read(_sentimentDataPath); - var pipeline = new TextFeaturizingEstimator(env, "SentimentText", "Features") - .Append(new SdcaBinaryTrainer(env, "Features", "Label", advancedSettings: (s) => { s.NumThreads = 1; s.ConvergenceTolerance = 1e-2f; })); + var pipeline = new TextFeaturizingEstimator(env, "SentimentText", "Features") + .Append(new SdcaBinaryTrainer(env, "Label", "Features", advancedSettings: (s) => { s.NumThreads = 1; s.ConvergenceTolerance = 1e-2f; })); - var model = pipeline.Fit(data); + var model = pipeline.Fit(data); - _sentimentModel = model.MakePredictionFunction(env); - } + _sentimentModel = model.MakePredictionFunction(env); } [GlobalSetup(Target = nameof(MakeBreastCancerPredictions))] @@ -109,9 +105,8 @@ public void SetupBreastCancerPipeline() string _breastCancerDataPath = Program.GetInvariantCultureDataPath("breast-cancer.txt"); - using (var env = new ConsoleEnvironment(seed: 1, conc: 1, verbose: false, sensitivity: MessageSensitivity.None, outWriter: EmptyWriter.Instance)) - { - var reader = new TextLoader(env, + var env = new MLContext(seed: 1, conc: 1); + var reader = new TextLoader(env, new TextLoader.Arguments() { Separator = "\t", @@ -123,14 +118,13 @@ public void SetupBreastCancerPipeline() } }); - IDataView data = reader.Read(_breastCancerDataPath); + IDataView data = reader.Read(_breastCancerDataPath); - var pipeline = new SdcaBinaryTrainer(env, "Features", "Label", advancedSettings: (s) => { s.NumThreads = 1; s.ConvergenceTolerance = 1e-2f; }); + var pipeline = new SdcaBinaryTrainer(env, "Label", "Features", advancedSettings: (s) => { s.NumThreads = 1; s.ConvergenceTolerance = 1e-2f; }); - var model = pipeline.Fit(data); + var model = pipeline.Fit(data); - _breastCancerModel = model.MakePredictionFunction(env); - } + _breastCancerModel = model.MakePredictionFunction(env); } [Benchmark] diff --git a/test/Microsoft.ML.Benchmarks/README.md b/test/Microsoft.ML.Benchmarks/README.md index d999a3b261..244f6c2bb8 100644 --- a/test/Microsoft.ML.Benchmarks/README.md +++ b/test/Microsoft.ML.Benchmarks/README.md @@ -4,7 +4,11 @@ This project contains performance benchmarks. ## Run the Performance Tests -**Pre-requisite:** On a clean repo, `build.cmd` at the root installs the right version of dotnet.exe and builds the solution. You need to build the solution in `Release` with native dependencies. +**Pre-requisite:** In order to fetch dependencies which come through Git submodules the following command needs to be run before building: + + git submodule update --init + +**Pre-requisite:** On a clean repo with initalized submodules, `build.cmd` at the root installs the right version of dotnet.exe and builds the solution. You need to build the solution in `Release` with native dependencies. build.cmd -release -buildNative diff --git a/test/Microsoft.ML.Benchmarks/StochasticDualCoordinateAscentClassifierBench.cs b/test/Microsoft.ML.Benchmarks/StochasticDualCoordinateAscentClassifierBench.cs index 7db3814b98..7e2e5f8702 100644 --- a/test/Microsoft.ML.Benchmarks/StochasticDualCoordinateAscentClassifierBench.cs +++ b/test/Microsoft.ML.Benchmarks/StochasticDualCoordinateAscentClassifierBench.cs @@ -63,18 +63,17 @@ private Legacy.PredictionModel Train(string dataPath) [Benchmark] public void TrainSentiment() { - using (var env = new ConsoleEnvironment(seed: 1)) - { - // Pipeline - var loader = TextLoader.ReadFile(env, - new TextLoader.Arguments() + var env = new MLContext(seed: 1); + // Pipeline + var loader = TextLoader.ReadFile(env, + new TextLoader.Arguments() + { + AllowQuoting = false, + AllowSparse = false, + Separator = "tab", + HasHeader = true, + Column = new[] { - AllowQuoting = false, - AllowSparse = false, - Separator = "tab", - HasHeader = true, - Column = new[] - { new TextLoader.Column() { Name = "Label", @@ -88,14 +87,14 @@ public void TrainSentiment() Source = new [] { new TextLoader.Range() { Min=1, Max=1} }, Type = DataKind.Text } - } - }, new MultiFileSource(_sentimentDataPath)); + } + }, new MultiFileSource(_sentimentDataPath)); - var text = TextFeaturizingEstimator.Create(env, - new TextFeaturizingEstimator.Arguments() + var text = TextFeaturizingEstimator.Create(env, + new TextFeaturizingEstimator.Arguments() + { + Column = new TextFeaturizingEstimator.Column { - Column = new TextFeaturizingEstimator.Column - { Name = "WordEmbeddings", Source = new[] { "SentimentText" } }, @@ -107,27 +106,24 @@ public void TrainSentiment() WordFeatureExtractor = null, }, loader); - var trans = WordEmbeddingsTransform.Create(env, - new WordEmbeddingsTransform.Arguments() + var trans = WordEmbeddingsExtractingTransformer.Create(env, + new WordEmbeddingsExtractingTransformer.Arguments() { - Column = new WordEmbeddingsTransform.Column[1] + Column = new WordEmbeddingsExtractingTransformer.Column[1] { - new WordEmbeddingsTransform.Column + new WordEmbeddingsExtractingTransformer.Column { Name = "Features", Source = "WordEmbeddings_TransformedText" } }, - ModelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe, + ModelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe, }, text); - // Train - var trainer = new SdcaMultiClassTrainer(env, "Features", "Label", maxIterations: 20); - var trainRoles = new RoleMappedData(trans, label: "Label", feature: "Features"); - - var predicted = trainer.Train(trainRoles); - _consumer.Consume(predicted); - } + // Train + var trainer = new SdcaMultiClassTrainer(env, "Label", "Features", maxIterations: 20); + var predicted = trainer.Fit(trans); + _consumer.Consume(predicted); } [GlobalSetup(Targets = new string[] { nameof(PredictIris), nameof(PredictIrisBatchOf1), nameof(PredictIrisBatchOf2), nameof(PredictIrisBatchOf5) })] diff --git a/test/Microsoft.ML.Benchmarks/Text/MultiClassClassification.cs b/test/Microsoft.ML.Benchmarks/Text/MultiClassClassification.cs index 50524107e7..d7705aaadb 100644 --- a/test/Microsoft.ML.Benchmarks/Text/MultiClassClassification.cs +++ b/test/Microsoft.ML.Benchmarks/Text/MultiClassClassification.cs @@ -25,13 +25,13 @@ public void SetupTrainingSpeedTests() _dataPath_Wiki = Path.GetFullPath(TestDatasets.WikiDetox.trainFilename); if (!File.Exists(_dataPath_Wiki)) - throw new FileNotFoundException(string.Format(Errors.DatasetNotFound, _dataPath_Wiki)); + throw new FileNotFoundException(string.Format(Errors.DatasetNotFound, _dataPath_Wiki)); } [Benchmark] public void CV_Multiclass_WikiDetox_BigramsAndTrichar_OVAAveragedPerceptron() { - string cmd = @"CV k=5 data=" + _dataPath_Wiki + + string cmd = @"CV k=5 data=" + _dataPath_Wiki + " loader=TextLoader{quote=- sparse=- col=Label:R4:0 col=rev_id:TX:1 col=comment:TX:2 col=logged_in:BL:4 col=ns:TX:5 col=sample:TX:6 col=split:TX:7 col=year:R4:3 header=+}" + " xf=Convert{col=logged_in type=R4}" + " xf=CategoricalTransform{col=ns}" + @@ -39,10 +39,8 @@ public void CV_Multiclass_WikiDetox_BigramsAndTrichar_OVAAveragedPerceptron() " xf=Concat{col=Features:FeaturesText,logged_in,ns}" + " tr=OVA{p=AveragedPerceptron{iter=10}}"; - using (var environment = EnvironmentFactory.CreateClassificationEnvironment()) - { - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); - } + var environment = EnvironmentFactory.CreateClassificationEnvironment(); + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); } [Benchmark] @@ -56,10 +54,8 @@ public void CV_Multiclass_WikiDetox_BigramsAndTrichar_LightGBMMulticlass() " xf=Concat{col=Features:FeaturesText,logged_in,ns}" + " tr=LightGBMMulticlass{iter=10}"; - using (var environment = EnvironmentFactory.CreateClassificationEnvironment()) - { - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); - } + var environment = EnvironmentFactory.CreateClassificationEnvironment(); + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); } [Benchmark] @@ -74,10 +70,8 @@ public void CV_Multiclass_WikiDetox_WordEmbeddings_OVAAveragedPerceptron() " xf=WordEmbeddingsTransform{col=FeaturesWordEmbedding:FeaturesText_TransformedText model=FastTextWikipedia300D}" + " xf=Concat{col=Features:FeaturesText,FeaturesWordEmbedding,logged_in,ns}"; - using (var environment = EnvironmentFactory.CreateClassificationEnvironment()) - { - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); - } + var environment = EnvironmentFactory.CreateClassificationEnvironment(); + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); } [Benchmark] @@ -92,10 +86,8 @@ public void CV_Multiclass_WikiDetox_WordEmbeddings_SDCAMC() " xf=WordEmbeddingsTransform{col=FeaturesWordEmbedding:FeaturesText_TransformedText model=FastTextWikipedia300D}" + " xf=Concat{col=Features:FeaturesWordEmbedding,logged_in,ns}"; - using (var environment = EnvironmentFactory.CreateClassificationEnvironment()) - { - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); - } + var environment = EnvironmentFactory.CreateClassificationEnvironment(); + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); } } @@ -122,10 +114,8 @@ public void SetupScoringSpeedTests() " tr=OVA{p=AveragedPerceptron{iter=10}}" + " out={" + _modelPath_Wiki + "}"; - using (var environment = EnvironmentFactory.CreateClassificationEnvironment()) - { - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); - } + var environment = EnvironmentFactory.CreateClassificationEnvironment(); + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); } [Benchmark] @@ -135,10 +125,8 @@ public void Test_Multiclass_WikiDetox_BigramsAndTrichar_OVAAveragedPerceptron() string modelpath = Path.Combine(Directory.GetCurrentDirectory(), @"WikiModel.fold000.zip"); string cmd = @"Test data=" + _dataPath_Wiki + " in=" + modelpath; - using (var environment = EnvironmentFactory.CreateClassificationEnvironment()) - { - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); - } + var environment = EnvironmentFactory.CreateClassificationEnvironment(); + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); } } } diff --git a/test/Microsoft.ML.CodeAnalyzer.Tests/Code/ContractsCheckTest.cs b/test/Microsoft.ML.CodeAnalyzer.Tests/Code/ContractsCheckTest.cs index ff528bfcce..da5994ec7a 100644 --- a/test/Microsoft.ML.CodeAnalyzer.Tests/Code/ContractsCheckTest.cs +++ b/test/Microsoft.ML.CodeAnalyzer.Tests/Code/ContractsCheckTest.cs @@ -2,15 +2,19 @@ // 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.CodeAnalysis; using Microsoft.ML.CodeAnalyzer.Tests.Helpers; +using System; +using System.Linq; using Xunit; namespace Microsoft.ML.InternalCodeAnalyzer.Tests { public sealed class ContractsCheckTest : DiagnosticVerifier { - private static string _contractsSource; - internal static string Source => TestUtils.EnsureSourceLoaded(ref _contractsSource, "ContractsCheckResource.cs"); + private readonly Lazy Source = TestUtils.LazySource("ContractsCheckResource.cs"); + private readonly Lazy SourceContracts = TestUtils.LazySource("Contracts.cs"); + private readonly Lazy SourceFriend = TestUtils.LazySource("BestFriendAttribute.cs"); [Fact] public void ContractsCheck() @@ -37,7 +41,7 @@ public void ContractsCheck() diagDecode.CreateDiagnosticResult(basis + 39, 41, "CheckDecode", "\"This message is suspicious\""), }; - VerifyCSharpDiagnostic(Source, expected); + VerifyCSharpDiagnostic(Source.Value + SourceContracts.Value + SourceFriend.Value, expected); } [Fact] @@ -68,16 +72,27 @@ public TypeName() public sealed class ContractsCheckFixTest : CodeFixVerifier { - private static string _preFix; - private static string _postFix; + private readonly Lazy SourcePreFix = TestUtils.LazySource("ContractsCheckBeforeFix.cs"); + private readonly Lazy SourcePostFix = TestUtils.LazySource("ContractsCheckAfterFix.cs"); + + private readonly Lazy SourceArgAttr = TestUtils.LazySource("ArgumentAttribute.cs"); + private readonly Lazy SourceArgType = TestUtils.LazySource("ArgumentType.cs"); + private readonly Lazy SourceBestAttr = TestUtils.LazySource("BestFriendAttribute.cs"); + private readonly Lazy SourceDefArgAttr = TestUtils.LazySource("DefaultArgumentAttribute.cs"); [Fact] public void ContractsCheckFix() { - string test = TestUtils.EnsureSourceLoaded(ref _preFix, "ContractsCheckBeforeFix.cs"); - string expected = TestUtils.EnsureSourceLoaded(ref _postFix, "ContractsCheckAfterFix.cs"); + //VerifyCSharpFix(SourcePreFix.Value, SourcePostFix.Value); + + Solution solution = null; + var proj = CreateProject(TestProjectName, ref solution, SourcePostFix.Value, SourceArgAttr.Value, + SourceArgType.Value, SourceBestAttr.Value, SourceDefArgAttr.Value); + var document = proj.Documents.First(); + var analyzer = GetCSharpDiagnosticAnalyzer(); + var comp = proj.GetCompilationAsync().Result; - VerifyCSharpFix(test, expected); + CycleAndVerifyFix(analyzer, GetCSharpCodeFixProvider(), SourcePostFix.Value, document); } } } diff --git a/test/Microsoft.ML.CodeAnalyzer.Tests/Helpers/CodeFixVerifier.cs b/test/Microsoft.ML.CodeAnalyzer.Tests/Helpers/CodeFixVerifier.cs index 489ec5c446..483e7ace65 100644 --- a/test/Microsoft.ML.CodeAnalyzer.Tests/Helpers/CodeFixVerifier.cs +++ b/test/Microsoft.ML.CodeAnalyzer.Tests/Helpers/CodeFixVerifier.cs @@ -76,6 +76,11 @@ protected void VerifyBasicFix(string oldSource, string newSource, int? codeFixIn private void VerifyFix(string language, DiagnosticAnalyzer analyzer, CodeFixProvider codeFixProvider, string oldSource, string newSource, int? codeFixIndex, bool allowNewCompilerDiagnostics) { var document = CreateDocument(oldSource); + CycleAndVerifyFix(analyzer, codeFixProvider, newSource, document, codeFixIndex, allowNewCompilerDiagnostics); + } + + internal static void CycleAndVerifyFix(DiagnosticAnalyzer analyzer, CodeFixProvider codeFixProvider, string newSource, Document document, int? codeFixIndex = null, bool allowNewCompilerDiagnostics = false) + { var analyzerDiagnostics = GetSortedDiagnosticsFromDocuments(analyzer, new[] { document }); var compilerDiagnostics = GetCompilerDiagnostics(document); int attempts = analyzerDiagnostics.Length; diff --git a/test/Microsoft.ML.CodeAnalyzer.Tests/Microsoft.ML.CodeAnalyzer.Tests.csproj b/test/Microsoft.ML.CodeAnalyzer.Tests/Microsoft.ML.CodeAnalyzer.Tests.csproj index 386ef06c8b..7851f01ecb 100644 --- a/test/Microsoft.ML.CodeAnalyzer.Tests/Microsoft.ML.CodeAnalyzer.Tests.csproj +++ b/test/Microsoft.ML.CodeAnalyzer.Tests/Microsoft.ML.CodeAnalyzer.Tests.csproj @@ -8,7 +8,19 @@ - + + %(Filename)%(Extension) + + + %(Filename)%(Extension) + + + %(Filename)%(Extension) + + + %(Filename)%(Extension) + + %(Filename)%(Extension) diff --git a/test/Microsoft.ML.CodeAnalyzer.Tests/Resources/ContractsCheckResource.cs b/test/Microsoft.ML.CodeAnalyzer.Tests/Resources/ContractsCheckResource.cs index 0c8ca4f332..cd6690942f 100644 --- a/test/Microsoft.ML.CodeAnalyzer.Tests/Resources/ContractsCheckResource.cs +++ b/test/Microsoft.ML.CodeAnalyzer.Tests/Resources/ContractsCheckResource.cs @@ -57,3 +57,15 @@ public static class Messages public const string CoolMessage = "This is super cool"; } } + +// Dummy declarations so that the independent compilation of contracts works as expected. +namespace Microsoft.ML.Runtime +{ + [Flags] + internal enum MessageSensitivity + { + None = 0, + Unknown = ~None + } + internal interface IHostEnvironment : IExceptionContext { } +} \ No newline at end of file diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestCSharpApi.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestCSharpApi.cs index 5a38ecb6d0..ade016eeff 100644 --- a/test/Microsoft.ML.Core.Tests/UnitTests/TestCSharpApi.cs +++ b/test/Microsoft.ML.Core.Tests/UnitTests/TestCSharpApi.cs @@ -25,99 +25,95 @@ public TestCSharpApi(ITestOutputHelper output) : base(output) public void TestSimpleExperiment() { var dataPath = GetDataPath("adult.tiny.with-schema.txt"); - using (var env = new ConsoleEnvironment()) - { - var experiment = env.CreateExperiment(); + var env = new MLContext(); + var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - var importOutput = experiment.Add(importInput); + var importInput = new Legacy.Data.TextLoader(dataPath); + var importOutput = experiment.Add(importInput); - var normalizeInput = new Legacy.Transforms.MinMaxNormalizer - { - Data = importOutput.Data - }; - normalizeInput.AddColumn("NumericFeatures"); - var normalizeOutput = experiment.Add(normalizeInput); - - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - var data = experiment.GetOutput(normalizeOutput.OutputData); - - var schema = data.Schema; - Assert.Equal(5, schema.ColumnCount); - var expected = new[] { "Label", "Workclass", "Categories", "NumericFeatures", "NumericFeatures" }; - for (int i = 0; i < schema.ColumnCount; i++) - Assert.Equal(expected[i], schema.GetColumnName(i)); - } + var normalizeInput = new Legacy.Transforms.MinMaxNormalizer + { + Data = importOutput.Data + }; + normalizeInput.AddColumn("NumericFeatures"); + var normalizeOutput = experiment.Add(normalizeInput); + + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + var data = experiment.GetOutput(normalizeOutput.OutputData); + + var schema = data.Schema; + Assert.Equal(5, schema.ColumnCount); + var expected = new[] { "Label", "Workclass", "Categories", "NumericFeatures", "NumericFeatures" }; + for (int i = 0; i < schema.ColumnCount; i++) + Assert.Equal(expected[i], schema.GetColumnName(i)); } [Fact] public void TestSimpleTrainExperiment() { var dataPath = GetDataPath("adult.tiny.with-schema.txt"); - using (var env = new ConsoleEnvironment()) - { - var experiment = env.CreateExperiment(); - - var importInput = new Legacy.Data.TextLoader(dataPath); - var importOutput = experiment.Add(importInput); - - var catInput = new Legacy.Transforms.CategoricalOneHotVectorizer - { - Data = importOutput.Data - }; - catInput.AddColumn("Categories"); - var catOutput = experiment.Add(catInput); + var env = new MLContext(); + var experiment = env.CreateExperiment(); - var concatInput = new Legacy.Transforms.ColumnConcatenator - { - Data = catOutput.OutputData - }; - concatInput.AddColumn("Features", "Categories", "NumericFeatures"); - var concatOutput = experiment.Add(concatInput); - - var sdcaInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier - { - TrainingData = concatOutput.OutputData, - LossFunction = new HingeLossSDCAClassificationLossFunction() { Margin = 1.1f }, - NumThreads = 1, - Shuffle = false - }; - var sdcaOutput = experiment.Add(sdcaInput); + var importInput = new Legacy.Data.TextLoader(dataPath); + var importOutput = experiment.Add(importInput); - var scoreInput = new Legacy.Transforms.DatasetScorer - { - Data = concatOutput.OutputData, - PredictorModel = sdcaOutput.PredictorModel - }; - var scoreOutput = experiment.Add(scoreInput); + var catInput = new Legacy.Transforms.CategoricalOneHotVectorizer + { + Data = importOutput.Data + }; + catInput.AddColumn("Categories"); + var catOutput = experiment.Add(catInput); - var evalInput = new Legacy.Models.BinaryClassificationEvaluator - { - Data = scoreOutput.ScoredData - }; - var evalOutput = experiment.Add(evalInput); + var concatInput = new Legacy.Transforms.ColumnConcatenator + { + Data = catOutput.OutputData + }; + concatInput.AddColumn("Features", "Categories", "NumericFeatures"); + var concatOutput = experiment.Add(concatInput); - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - var data = experiment.GetOutput(evalOutput.OverallMetrics); + var sdcaInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier + { + TrainingData = concatOutput.OutputData, + LossFunction = new HingeLossSDCAClassificationLossFunction() { Margin = 1.1f }, + NumThreads = 1, + Shuffle = false + }; + var sdcaOutput = experiment.Add(sdcaInput); + + var scoreInput = new Legacy.Transforms.DatasetScorer + { + Data = concatOutput.OutputData, + PredictorModel = sdcaOutput.PredictorModel + }; + var scoreOutput = experiment.Add(scoreInput); - var schema = data.Schema; - var b = schema.TryGetColumnIndex("AUC", out int aucCol); + var evalInput = new Legacy.Models.BinaryClassificationEvaluator + { + Data = scoreOutput.ScoredData + }; + var evalOutput = experiment.Add(evalInput); + + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + var data = experiment.GetOutput(evalOutput.OverallMetrics); + + var schema = data.Schema; + var b = schema.TryGetColumnIndex("AUC", out int aucCol); + Assert.True(b); + using (var cursor = data.GetRowCursor(col => col == aucCol)) + { + var getter = cursor.GetGetter(aucCol); + b = cursor.MoveNext(); Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == aucCol)) - { - var getter = cursor.GetGetter(aucCol); - b = cursor.MoveNext(); - Assert.True(b); - double auc = 0; - getter(ref auc); - Assert.Equal(0.93, auc, 2); - b = cursor.MoveNext(); - Assert.False(b); - } + double auc = 0; + getter(ref auc); + Assert.Equal(0.93, auc, 2); + b = cursor.MoveNext(); + Assert.False(b); } } @@ -125,71 +121,69 @@ public void TestSimpleTrainExperiment() public void TestTrainTestMacro() { var dataPath = GetDataPath("adult.tiny.with-schema.txt"); - using (var env = new ConsoleEnvironment()) - { - var subGraph = env.CreateExperiment(); - - var catInput = new Legacy.Transforms.CategoricalOneHotVectorizer(); - catInput.AddColumn("Categories"); - var catOutput = subGraph.Add(catInput); - - var concatInput = new Legacy.Transforms.ColumnConcatenator - { - Data = catOutput.OutputData - }; - concatInput.AddColumn("Features", "Categories", "NumericFeatures"); - var concatOutput = subGraph.Add(concatInput); + var env = new MLContext(); + var subGraph = env.CreateExperiment(); - var sdcaInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier - { - TrainingData = concatOutput.OutputData, - LossFunction = new HingeLossSDCAClassificationLossFunction() { Margin = 1.1f }, - NumThreads = 1, - Shuffle = false - }; - var sdcaOutput = subGraph.Add(sdcaInput); - - var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner - { - TransformModels = new ArrayVar(catOutput.Model, concatOutput.Model), - PredictorModel = sdcaOutput.PredictorModel - }; - var modelCombineOutput = subGraph.Add(modelCombine); + var catInput = new Legacy.Transforms.CategoricalOneHotVectorizer(); + catInput.AddColumn("Categories"); + var catOutput = subGraph.Add(catInput); - var experiment = env.CreateExperiment(); + var concatInput = new Legacy.Transforms.ColumnConcatenator + { + Data = catOutput.OutputData + }; + concatInput.AddColumn("Features", "Categories", "NumericFeatures"); + var concatOutput = subGraph.Add(concatInput); - var importInput = new Legacy.Data.TextLoader(dataPath); - var importOutput = experiment.Add(importInput); + var sdcaInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier + { + TrainingData = concatOutput.OutputData, + LossFunction = new HingeLossSDCAClassificationLossFunction() { Margin = 1.1f }, + NumThreads = 1, + Shuffle = false + }; + var sdcaOutput = subGraph.Add(sdcaInput); + + var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner + { + TransformModels = new ArrayVar(catOutput.Model, concatOutput.Model), + PredictorModel = sdcaOutput.PredictorModel + }; + var modelCombineOutput = subGraph.Add(modelCombine); - var trainTestInput = new Legacy.Models.TrainTestBinaryEvaluator - { - TrainingData = importOutput.Data, - TestingData = importOutput.Data, - Nodes = subGraph - }; - trainTestInput.Inputs.Data = catInput.Data; - trainTestInput.Outputs.Model = modelCombineOutput.PredictorModel; - var trainTestOutput = experiment.Add(trainTestInput); + var experiment = env.CreateExperiment(); - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - var data = experiment.GetOutput(trainTestOutput.OverallMetrics); + var importInput = new Legacy.Data.TextLoader(dataPath); + var importOutput = experiment.Add(importInput); - var schema = data.Schema; - var b = schema.TryGetColumnIndex("AUC", out int aucCol); + var trainTestInput = new Legacy.Models.TrainTestBinaryEvaluator + { + TrainingData = importOutput.Data, + TestingData = importOutput.Data, + Nodes = subGraph + }; + trainTestInput.Inputs.Data = catInput.Data; + trainTestInput.Outputs.Model = modelCombineOutput.PredictorModel; + var trainTestOutput = experiment.Add(trainTestInput); + + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + var data = experiment.GetOutput(trainTestOutput.OverallMetrics); + + var schema = data.Schema; + var b = schema.TryGetColumnIndex("AUC", out int aucCol); + Assert.True(b); + using (var cursor = data.GetRowCursor(col => col == aucCol)) + { + var getter = cursor.GetGetter(aucCol); + b = cursor.MoveNext(); Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == aucCol)) - { - var getter = cursor.GetGetter(aucCol); - b = cursor.MoveNext(); - Assert.True(b); - double auc = 0; - getter(ref auc); - Assert.Equal(0.93, auc, 2); - b = cursor.MoveNext(); - Assert.False(b); - } + double auc = 0; + getter(ref auc); + Assert.Equal(0.93, auc, 2); + b = cursor.MoveNext(); + Assert.False(b); } } @@ -197,68 +191,66 @@ public void TestTrainTestMacro() public void TestCrossValidationBinaryMacro() { var dataPath = GetDataPath("adult.tiny.with-schema.txt"); - using (var env = new ConsoleEnvironment()) - { - var subGraph = env.CreateExperiment(); - - var catInput = new Legacy.Transforms.CategoricalOneHotVectorizer(); - catInput.AddColumn("Categories"); - var catOutput = subGraph.Add(catInput); + var env = new MLContext(); + var subGraph = env.CreateExperiment(); - var concatInput = new Legacy.Transforms.ColumnConcatenator - { - Data = catOutput.OutputData - }; - concatInput.AddColumn("Features", "Categories", "NumericFeatures"); - var concatOutput = subGraph.Add(concatInput); - - var lrInput = new Legacy.Trainers.LogisticRegressionBinaryClassifier - { - TrainingData = concatOutput.OutputData, - NumThreads = 1 - }; - var lrOutput = subGraph.Add(lrInput); + var catInput = new Legacy.Transforms.CategoricalOneHotVectorizer(); + catInput.AddColumn("Categories"); + var catOutput = subGraph.Add(catInput); - var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner - { - TransformModels = new ArrayVar(catOutput.Model, concatOutput.Model), - PredictorModel = lrOutput.PredictorModel - }; - var modelCombineOutput = subGraph.Add(modelCombine); + var concatInput = new Legacy.Transforms.ColumnConcatenator + { + Data = catOutput.OutputData + }; + concatInput.AddColumn("Features", "Categories", "NumericFeatures"); + var concatOutput = subGraph.Add(concatInput); - var experiment = env.CreateExperiment(); + var lrInput = new Legacy.Trainers.LogisticRegressionBinaryClassifier + { + TrainingData = concatOutput.OutputData, + NumThreads = 1 + }; + var lrOutput = subGraph.Add(lrInput); - var importInput = new Legacy.Data.TextLoader(dataPath); - var importOutput = experiment.Add(importInput); + var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner + { + TransformModels = new ArrayVar(catOutput.Model, concatOutput.Model), + PredictorModel = lrOutput.PredictorModel + }; + var modelCombineOutput = subGraph.Add(modelCombine); - var crossValidateBinary = new Legacy.Models.BinaryCrossValidator - { - Data = importOutput.Data, - Nodes = subGraph - }; - crossValidateBinary.Inputs.Data = catInput.Data; - crossValidateBinary.Outputs.Model = modelCombineOutput.PredictorModel; - var crossValidateOutput = experiment.Add(crossValidateBinary); + var experiment = env.CreateExperiment(); - experiment.Compile(); - importInput.SetInput(env, experiment); - experiment.Run(); - var data = experiment.GetOutput(crossValidateOutput.OverallMetrics[0]); + var importInput = new Legacy.Data.TextLoader(dataPath); + var importOutput = experiment.Add(importInput); - var schema = data.Schema; - var b = schema.TryGetColumnIndex("AUC", out int aucCol); + var crossValidateBinary = new Legacy.Models.BinaryCrossValidator + { + Data = importOutput.Data, + Nodes = subGraph + }; + crossValidateBinary.Inputs.Data = catInput.Data; + crossValidateBinary.Outputs.Model = modelCombineOutput.PredictorModel; + var crossValidateOutput = experiment.Add(crossValidateBinary); + + experiment.Compile(); + importInput.SetInput(env, experiment); + experiment.Run(); + var data = experiment.GetOutput(crossValidateOutput.OverallMetrics[0]); + + var schema = data.Schema; + var b = schema.TryGetColumnIndex("AUC", out int aucCol); + Assert.True(b); + using (var cursor = data.GetRowCursor(col => col == aucCol)) + { + var getter = cursor.GetGetter(aucCol); + b = cursor.MoveNext(); Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == aucCol)) - { - var getter = cursor.GetGetter(aucCol); - b = cursor.MoveNext(); - Assert.True(b); - double auc = 0; - getter(ref auc); - Assert.Equal(0.87, auc, 1); - b = cursor.MoveNext(); - Assert.False(b); - } + double auc = 0; + getter(ref auc); + Assert.Equal(0.87, auc, 1); + b = cursor.MoveNext(); + Assert.False(b); } } @@ -266,42 +258,41 @@ public void TestCrossValidationBinaryMacro() public void TestCrossValidationMacro() { var dataPath = GetDataPath(TestDatasets.generatedRegressionDatasetmacro.trainFilename); - using (var env = new ConsoleEnvironment(42)) - { - var subGraph = env.CreateExperiment(); + var env = new MLContext(42); + var subGraph = env.CreateExperiment(); - var nop = new Legacy.Transforms.NoOperation(); - var nopOutput = subGraph.Add(nop); + var nop = new Legacy.Transforms.NoOperation(); + var nopOutput = subGraph.Add(nop); - var generate = new Legacy.Transforms.RandomNumberGenerator(); - generate.Column = new[] { new Legacy.Transforms.GenerateNumberTransformColumn() { Name = "Weight1" } }; - generate.Data = nopOutput.OutputData; - var generateOutput = subGraph.Add(generate); + var generate = new Legacy.Transforms.RandomNumberGenerator(); + generate.Column = new[] { new Legacy.Transforms.GenerateNumberTransformColumn() { Name = "Weight1" } }; + generate.Data = nopOutput.OutputData; + var generateOutput = subGraph.Add(generate); - var learnerInput = new Legacy.Trainers.PoissonRegressor - { - TrainingData = generateOutput.OutputData, - NumThreads = 1, - WeightColumn = "Weight1" - }; - var learnerOutput = subGraph.Add(learnerInput); + var learnerInput = new Legacy.Trainers.PoissonRegressor + { + TrainingData = generateOutput.OutputData, + NumThreads = 1, + WeightColumn = "Weight1" + }; + var learnerOutput = subGraph.Add(learnerInput); - var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner - { - TransformModels = new ArrayVar(nopOutput.Model, generateOutput.Model), - PredictorModel = learnerOutput.PredictorModel - }; - var modelCombineOutput = subGraph.Add(modelCombine); + var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner + { + TransformModels = new ArrayVar(nopOutput.Model, generateOutput.Model), + PredictorModel = learnerOutput.PredictorModel + }; + var modelCombineOutput = subGraph.Add(modelCombine); - var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath) + var experiment = env.CreateExperiment(); + var importInput = new Legacy.Data.TextLoader(dataPath) + { + Arguments = new Legacy.Data.TextLoaderArguments + { + Separator = new[] { ';' }, + HasHeader = true, + Column = new[] { - Arguments = new Legacy.Data.TextLoaderArguments - { - Separator = new[] { ';' }, - HasHeader = true, - Column = new[] - { new TextLoaderColumn() { Name = "Label", @@ -316,95 +307,94 @@ public void TestCrossValidationMacro() Type = Legacy.Data.DataKind.Num } } - } - }; - var importOutput = experiment.Add(importInput); + } + }; + var importOutput = experiment.Add(importInput); - var crossValidate = new Legacy.Models.CrossValidator + var crossValidate = new Legacy.Models.CrossValidator + { + Data = importOutput.Data, + Nodes = subGraph, + Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureRegressorTrainer, + TransformModel = null, + WeightColumn = "Weight1" + }; + crossValidate.Inputs.Data = nop.Data; + crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; + var crossValidateOutput = experiment.Add(crossValidate); + + experiment.Compile(); + importInput.SetInput(env, experiment); + experiment.Run(); + var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); + + var schema = data.Schema; + var b = schema.TryGetColumnIndex("L1(avg)", out int metricCol); + Assert.True(b); + b = schema.TryGetColumnIndex("Fold Index", out int foldCol); + Assert.True(b); + b = schema.TryGetColumnIndex("IsWeighted", out int isWeightedCol); + using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol || col == isWeightedCol)) + { + var getter = cursor.GetGetter(metricCol); + var foldGetter = cursor.GetGetter>(foldCol); + ReadOnlyMemory fold = default; + var isWeightedGetter = cursor.GetGetter(isWeightedCol); + bool isWeighted = default; + double avg = 0; + double weightedAvg = 0; + for (int w = 0; w < 2; w++) { - Data = importOutput.Data, - Nodes = subGraph, - Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureRegressorTrainer, - TransformModel = null, - WeightColumn = "Weight1" - }; - crossValidate.Inputs.Data = nop.Data; - crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; - var crossValidateOutput = experiment.Add(crossValidate); - - experiment.Compile(); - importInput.SetInput(env, experiment); - experiment.Run(); - var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); + // Get the average. + b = cursor.MoveNext(); + Assert.True(b); + if (w == 1) + getter(ref weightedAvg); + else + getter(ref avg); + foldGetter(ref fold); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); + isWeightedGetter(ref isWeighted); + Assert.True(isWeighted == (w == 1)); - var schema = data.Schema; - var b = schema.TryGetColumnIndex("L1(avg)", out int metricCol); - Assert.True(b); - b = schema.TryGetColumnIndex("Fold Index", out int foldCol); - Assert.True(b); - b = schema.TryGetColumnIndex("IsWeighted", out int isWeightedCol); - using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol || col == isWeightedCol)) + // Get the standard deviation. + b = cursor.MoveNext(); + Assert.True(b); + double stdev = 0; + getter(ref stdev); + foldGetter(ref fold); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); + if (w == 1) + Assert.Equal(1.585, stdev, 3); + else + Assert.Equal(1.39, stdev, 2); + isWeightedGetter(ref isWeighted); + Assert.True(isWeighted == (w == 1)); + } + double sum = 0; + double weightedSum = 0; + for (int f = 0; f < 2; f++) { - var getter = cursor.GetGetter(metricCol); - var foldGetter = cursor.GetGetter>(foldCol); - ReadOnlyMemory fold = default; - var isWeightedGetter = cursor.GetGetter(isWeightedCol); - bool isWeighted = default; - double avg = 0; - double weightedAvg = 0; for (int w = 0; w < 2; w++) { - // Get the average. b = cursor.MoveNext(); Assert.True(b); - if (w == 1) - getter(ref weightedAvg); - else - getter(ref avg); - foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); - isWeightedGetter(ref isWeighted); - Assert.True(isWeighted == (w == 1)); - - // Get the standard deviation. - b = cursor.MoveNext(); - Assert.True(b); - double stdev = 0; - getter(ref stdev); + double val = 0; + getter(ref val); foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); if (w == 1) - Assert.Equal(1.585, stdev, 3); + weightedSum += val; else - Assert.Equal(1.39, stdev, 2); + sum += val; + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); isWeightedGetter(ref isWeighted); Assert.True(isWeighted == (w == 1)); } - double sum = 0; - double weightedSum = 0; - for (int f = 0; f < 2; f++) - { - for (int w = 0; w < 2; w++) - { - b = cursor.MoveNext(); - Assert.True(b); - double val = 0; - getter(ref val); - foldGetter(ref fold); - if (w == 1) - weightedSum += val; - else - sum += val; - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); - isWeightedGetter(ref isWeighted); - Assert.True(isWeighted == (w == 1)); - } - } - Assert.Equal(weightedAvg, weightedSum / 2); - Assert.Equal(avg, sum / 2); - b = cursor.MoveNext(); - Assert.False(b); } + Assert.Equal(weightedAvg, weightedSum / 2); + Assert.Equal(avg, sum / 2); + b = cursor.MoveNext(); + Assert.False(b); } } @@ -412,207 +402,207 @@ public void TestCrossValidationMacro() public void TestCrossValidationMacroWithMultiClass() { var dataPath = GetDataPath(@"Train-Tiny-28x28.txt"); - using (var env = new ConsoleEnvironment(42)) - { - var subGraph = env.CreateExperiment(); + var env = new MLContext(42); + var subGraph = env.CreateExperiment(); - var nop = new Legacy.Transforms.NoOperation(); - var nopOutput = subGraph.Add(nop); + var nop = new Legacy.Transforms.NoOperation(); + var nopOutput = subGraph.Add(nop); - var learnerInput = new Legacy.Trainers.StochasticDualCoordinateAscentClassifier - { - TrainingData = nopOutput.OutputData, - NumThreads = 1 - }; - var learnerOutput = subGraph.Add(learnerInput); - - var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner - { - TransformModels = new ArrayVar(nopOutput.Model), - PredictorModel = learnerOutput.PredictorModel - }; - var modelCombineOutput = subGraph.Add(modelCombine); + var learnerInput = new Legacy.Trainers.StochasticDualCoordinateAscentClassifier + { + TrainingData = nopOutput.OutputData, + NumThreads = 1 + }; + var learnerOutput = subGraph.Add(learnerInput); - var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - var importOutput = experiment.Add(importInput); + var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner + { + TransformModels = new ArrayVar(nopOutput.Model), + PredictorModel = learnerOutput.PredictorModel + }; + var modelCombineOutput = subGraph.Add(modelCombine); - var crossValidate = new Legacy.Models.CrossValidator - { - Data = importOutput.Data, - Nodes = subGraph, - Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureMultiClassClassifierTrainer, - TransformModel = null - }; - crossValidate.Inputs.Data = nop.Data; - crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; - var crossValidateOutput = experiment.Add(crossValidate); + var experiment = env.CreateExperiment(); + var importInput = new Legacy.Data.TextLoader(dataPath); + var importOutput = experiment.Add(importInput); - experiment.Compile(); - importInput.SetInput(env, experiment); - experiment.Run(); - var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); + var crossValidate = new Legacy.Models.CrossValidator + { + Data = importOutput.Data, + Nodes = subGraph, + Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureMultiClassClassifierTrainer, + TransformModel = null + }; + crossValidate.Inputs.Data = nop.Data; + crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; + var crossValidateOutput = experiment.Add(crossValidate); + + experiment.Compile(); + importInput.SetInput(env, experiment); + experiment.Run(); + var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); + + var schema = data.Schema; + var b = schema.TryGetColumnIndex("Accuracy(micro-avg)", out int metricCol); + Assert.True(b); + b = schema.TryGetColumnIndex("Fold Index", out int foldCol); + Assert.True(b); + using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol)) + { + var getter = cursor.GetGetter(metricCol); + var foldGetter = cursor.GetGetter>(foldCol); + ReadOnlyMemory fold = default; - var schema = data.Schema; - var b = schema.TryGetColumnIndex("Accuracy(micro-avg)", out int metricCol); - Assert.True(b); - b = schema.TryGetColumnIndex("Fold Index", out int foldCol); + // Get the average. + b = cursor.MoveNext(); Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol)) - { - var getter = cursor.GetGetter(metricCol); - var foldGetter = cursor.GetGetter>(foldCol); - ReadOnlyMemory fold = default; + double avg = 0; + getter(ref avg); + foldGetter(ref fold); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); - // Get the average. - b = cursor.MoveNext(); - Assert.True(b); - double avg = 0; - getter(ref avg); - foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); + // Get the standard deviation. + b = cursor.MoveNext(); + Assert.True(b); + double stdev = 0; + getter(ref stdev); + foldGetter(ref fold); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); + Assert.Equal(0.015, stdev, 3); - // Get the standard deviation. + double sum = 0; + double val = 0; + for (int f = 0; f < 2; f++) + { b = cursor.MoveNext(); Assert.True(b); - double stdev = 0; - getter(ref stdev); + getter(ref val); foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); - Assert.Equal(0.025, stdev, 3); - - double sum = 0; - double val = 0; - for (int f = 0; f < 2; f++) - { - b = cursor.MoveNext(); - Assert.True(b); - getter(ref val); - foldGetter(ref fold); - sum += val; - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); - } - Assert.Equal(avg, sum / 2); - b = cursor.MoveNext(); - Assert.False(b); + sum += val; + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); } + Assert.Equal(avg, sum / 2); + b = cursor.MoveNext(); + Assert.False(b); + } - var confusion = experiment.GetOutput(crossValidateOutput.ConfusionMatrix); - schema = confusion.Schema; - b = schema.TryGetColumnIndex("Count", out int countCol); - Assert.True(b); - b = schema.TryGetColumnIndex("Fold Index", out foldCol); - Assert.True(b); - var type = schema.GetMetadataTypeOrNull(MetadataUtils.Kinds.SlotNames, countCol); - Assert.True(type is VectorType vecType && vecType.ItemType is TextType && vecType.Size == 10); - var slotNames = default(VBuffer>); - schema.GetMetadata(MetadataUtils.Kinds.SlotNames, countCol, ref slotNames); - Assert.True(slotNames.Values.Select((s, i) => ReadOnlyMemoryUtils.EqualsStr(i.ToString(), s)).All(x => x)); - using (var curs = confusion.GetRowCursor(col => true)) - { - var countGetter = curs.GetGetter>(countCol); - var foldGetter = curs.GetGetter>(foldCol); - var confCount = default(VBuffer); - var foldIndex = default(ReadOnlyMemory); - int rowCount = 0; - var foldCur = "Fold 0"; - while (curs.MoveNext()) + var confusion = experiment.GetOutput(crossValidateOutput.ConfusionMatrix); + schema = confusion.Schema; + b = schema.TryGetColumnIndex("Count", out int countCol); + Assert.True(b); + b = schema.TryGetColumnIndex("Fold Index", out foldCol); + Assert.True(b); + var type = schema.GetMetadataTypeOrNull(MetadataUtils.Kinds.SlotNames, countCol); + Assert.True(type is VectorType vecType && vecType.ItemType is TextType && vecType.Size == 10); + var slotNames = default(VBuffer>); + schema.GetMetadata(MetadataUtils.Kinds.SlotNames, countCol, ref slotNames); + var slotNameValues = slotNames.GetValues(); + for (int i = 0; i < slotNameValues.Length; i++) + { + Assert.True(ReadOnlyMemoryUtils.EqualsStr(i.ToString(), slotNameValues[i])); + } + using (var curs = confusion.GetRowCursor(col => true)) + { + var countGetter = curs.GetGetter>(countCol); + var foldGetter = curs.GetGetter>(foldCol); + var confCount = default(VBuffer); + var foldIndex = default(ReadOnlyMemory); + int rowCount = 0; + var foldCur = "Fold 0"; + while (curs.MoveNext()) + { + countGetter(ref confCount); + foldGetter(ref foldIndex); + rowCount++; + Assert.True(ReadOnlyMemoryUtils.EqualsStr(foldCur, foldIndex)); + if (rowCount == 10) { - countGetter(ref confCount); - foldGetter(ref foldIndex); - rowCount++; - Assert.True(ReadOnlyMemoryUtils.EqualsStr(foldCur, foldIndex)); - if (rowCount == 10) - { - rowCount = 0; - foldCur = "Fold 1"; - } + rowCount = 0; + foldCur = "Fold 1"; } - Assert.Equal(0, rowCount); } - - var warnings = experiment.GetOutput(crossValidateOutput.Warnings); - using (var cursor = warnings.GetRowCursor(col => true)) - Assert.False(cursor.MoveNext()); + Assert.Equal(0, rowCount); } + + var warnings = experiment.GetOutput(crossValidateOutput.Warnings); + using (var cursor = warnings.GetRowCursor(col => true)) + Assert.False(cursor.MoveNext()); } [Fact] public void TestCrossValidationMacroMultiClassWithWarnings() { var dataPath = GetDataPath(@"Train-Tiny-28x28.txt"); - using (var env = new ConsoleEnvironment(42)) - { - var subGraph = env.CreateExperiment(); - - var nop = new Legacy.Transforms.NoOperation(); - var nopOutput = subGraph.Add(nop); - - var learnerInput = new Legacy.Trainers.LogisticRegressionClassifier - { - TrainingData = nopOutput.OutputData, - NumThreads = 1 - }; - var learnerOutput = subGraph.Add(learnerInput); + var env = new MLContext(42); + var subGraph = env.CreateExperiment(); - var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - var importOutput = experiment.Add(importInput); + var nop = new Legacy.Transforms.NoOperation(); + var nopOutput = subGraph.Add(nop); - var filter = new Legacy.Transforms.RowRangeFilter(); - filter.Data = importOutput.Data; - filter.Column = "Label"; - filter.Min = 0; - filter.Max = 5; - var filterOutput = experiment.Add(filter); - - var term = new Legacy.Transforms.TextToKeyConverter(); - term.Column = new[] - { - new Legacy.Transforms.TermTransformColumn() + var learnerInput = new Legacy.Trainers.LogisticRegressionClassifier + { + TrainingData = nopOutput.OutputData, + NumThreads = 1 + }; + var learnerOutput = subGraph.Add(learnerInput); + + var experiment = env.CreateExperiment(); + var importInput = new Legacy.Data.TextLoader(dataPath); + var importOutput = experiment.Add(importInput); + + var filter = new Legacy.Transforms.RowRangeFilter(); + filter.Data = importOutput.Data; + filter.Column = "Label"; + filter.Min = 0; + filter.Max = 5; + var filterOutput = experiment.Add(filter); + + var term = new Legacy.Transforms.TextToKeyConverter(); + term.Column = new[] + { + new Legacy.Transforms.ValueToKeyMappingTransformerColumn() { - Source = "Label", Name = "Strat", Sort = Legacy.Transforms.TermTransformSortOrder.Value + Source = "Label", Name = "Strat", Sort = Legacy.Transforms.ValueToKeyMappingTransformerSortOrder.Value } }; - term.Data = filterOutput.OutputData; - var termOutput = experiment.Add(term); + term.Data = filterOutput.OutputData; + var termOutput = experiment.Add(term); - var crossValidate = new Legacy.Models.CrossValidator - { - Data = termOutput.OutputData, - Nodes = subGraph, - Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureMultiClassClassifierTrainer, - TransformModel = null, - StratificationColumn = "Strat" - }; - crossValidate.Inputs.Data = nop.Data; - crossValidate.Outputs.PredictorModel = learnerOutput.PredictorModel; - var crossValidateOutput = experiment.Add(crossValidate); - - experiment.Compile(); - importInput.SetInput(env, experiment); - experiment.Run(); - var warnings = experiment.GetOutput(crossValidateOutput.Warnings); + var crossValidate = new Legacy.Models.CrossValidator + { + Data = termOutput.OutputData, + Nodes = subGraph, + Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureMultiClassClassifierTrainer, + TransformModel = null, + StratificationColumn = "Strat" + }; + crossValidate.Inputs.Data = nop.Data; + crossValidate.Outputs.PredictorModel = learnerOutput.PredictorModel; + var crossValidateOutput = experiment.Add(crossValidate); + + experiment.Compile(); + importInput.SetInput(env, experiment); + experiment.Run(); + var warnings = experiment.GetOutput(crossValidateOutput.Warnings); + + var schema = warnings.Schema; + var b = schema.TryGetColumnIndex("WarningText", out int warningCol); + Assert.True(b); + using (var cursor = warnings.GetRowCursor(col => col == warningCol)) + { + var getter = cursor.GetGetter>(warningCol); - var schema = warnings.Schema; - var b = schema.TryGetColumnIndex("WarningText", out int warningCol); + b = cursor.MoveNext(); Assert.True(b); - using (var cursor = warnings.GetRowCursor(col => col == warningCol)) - { - var getter = cursor.GetGetter>(warningCol); - - b = cursor.MoveNext(); - Assert.True(b); - var warning = default(ReadOnlyMemory); - getter(ref warning); - Assert.Contains("test instances with class values not seen in the training set.", warning.ToString()); - b = cursor.MoveNext(); - Assert.True(b); - getter(ref warning); - Assert.Contains("Detected columns of variable length: SortedScores, SortedClasses", warning.ToString()); - b = cursor.MoveNext(); - Assert.False(b); - } + var warning = default(ReadOnlyMemory); + getter(ref warning); + Assert.Contains("test instances with class values not seen in the training set.", warning.ToString()); + b = cursor.MoveNext(); + Assert.True(b); + getter(ref warning); + Assert.Contains("Detected columns of variable length: SortedScores, SortedClasses", warning.ToString()); + b = cursor.MoveNext(); + Assert.False(b); } } @@ -620,95 +610,93 @@ public void TestCrossValidationMacroMultiClassWithWarnings() public void TestCrossValidationMacroWithStratification() { var dataPath = GetDataPath(@"breast-cancer.txt"); - using (var env = new ConsoleEnvironment(42)) - { - var subGraph = env.CreateExperiment(); + var env = new MLContext(42); + var subGraph = env.CreateExperiment(); - var nop = new Legacy.Transforms.NoOperation(); - var nopOutput = subGraph.Add(nop); + var nop = new Legacy.Transforms.NoOperation(); + var nopOutput = subGraph.Add(nop); - var learnerInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier - { - TrainingData = nopOutput.OutputData, - NumThreads = 1 - }; - var learnerOutput = subGraph.Add(learnerInput); - - var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner - { - TransformModels = new ArrayVar(nopOutput.Model), - PredictorModel = learnerOutput.PredictorModel - }; - var modelCombineOutput = subGraph.Add(modelCombine); + var learnerInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier + { + TrainingData = nopOutput.OutputData, + NumThreads = 1 + }; + var learnerOutput = subGraph.Add(learnerInput); - var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - importInput.Arguments.Column = new Legacy.Data.TextLoaderColumn[] - { + var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner + { + TransformModels = new ArrayVar(nopOutput.Model), + PredictorModel = learnerOutput.PredictorModel + }; + var modelCombineOutput = subGraph.Add(modelCombine); + + var experiment = env.CreateExperiment(); + var importInput = new Legacy.Data.TextLoader(dataPath); + importInput.Arguments.Column = new Legacy.Data.TextLoaderColumn[] + { new Legacy.Data.TextLoaderColumn { Name = "Label", Source = new[] { new Legacy.Data.TextLoaderRange(0) } }, new Legacy.Data.TextLoaderColumn { Name = "Strat", Source = new[] { new Legacy.Data.TextLoaderRange(1) } }, new Legacy.Data.TextLoaderColumn { Name = "Features", Source = new[] { new Legacy.Data.TextLoaderRange(2, 9) } } - }; - var importOutput = experiment.Add(importInput); + }; + var importOutput = experiment.Add(importInput); - var crossValidate = new Legacy.Models.CrossValidator - { - Data = importOutput.Data, - Nodes = subGraph, - TransformModel = null, - StratificationColumn = "Strat" - }; - crossValidate.Inputs.Data = nop.Data; - crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; - var crossValidateOutput = experiment.Add(crossValidate); - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); - - var schema = data.Schema; - var b = schema.TryGetColumnIndex("AUC", out int metricCol); + var crossValidate = new Legacy.Models.CrossValidator + { + Data = importOutput.Data, + Nodes = subGraph, + TransformModel = null, + StratificationColumn = "Strat" + }; + crossValidate.Inputs.Data = nop.Data; + crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; + var crossValidateOutput = experiment.Add(crossValidate); + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); + + var schema = data.Schema; + var b = schema.TryGetColumnIndex("AUC", out int metricCol); + Assert.True(b); + b = schema.TryGetColumnIndex("Fold Index", out int foldCol); + Assert.True(b); + using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol)) + { + var getter = cursor.GetGetter(metricCol); + var foldGetter = cursor.GetGetter>(foldCol); + ReadOnlyMemory fold = default; + + // Get the verage. + b = cursor.MoveNext(); Assert.True(b); - b = schema.TryGetColumnIndex("Fold Index", out int foldCol); + double avg = 0; + getter(ref avg); + foldGetter(ref fold); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); + + // Get the standard deviation. + b = cursor.MoveNext(); Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol)) - { - var getter = cursor.GetGetter(metricCol); - var foldGetter = cursor.GetGetter>(foldCol); - ReadOnlyMemory fold = default; + double stdev = 0; + getter(ref stdev); + foldGetter(ref fold); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); + Assert.Equal(0.00488, stdev, 5); - // Get the verage. + double sum = 0; + double val = 0; + for (int f = 0; f < 2; f++) + { b = cursor.MoveNext(); Assert.True(b); - double avg = 0; - getter(ref avg); + getter(ref val); foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); - - // Get the standard deviation. - b = cursor.MoveNext(); - Assert.True(b); - double stdev = 0; - getter(ref stdev); - foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); - Assert.Equal(0.00485, stdev, 5); - - double sum = 0; - double val = 0; - for (int f = 0; f < 2; f++) - { - b = cursor.MoveNext(); - Assert.True(b); - getter(ref val); - foldGetter(ref fold); - sum += val; - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); - } - Assert.Equal(avg, sum / 2); - b = cursor.MoveNext(); - Assert.False(b); + sum += val; + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); } + Assert.Equal(avg, sum / 2); + b = cursor.MoveNext(); + Assert.False(b); } } @@ -716,127 +704,129 @@ public void TestCrossValidationMacroWithStratification() public void TestCrossValidationMacroWithNonDefaultNames() { string dataPath = GetDataPath(@"adult.tiny.with-schema.txt"); - using (var env = new ConsoleEnvironment(42)) - { - var subGraph = env.CreateExperiment(); - - var textToKey = new Legacy.Transforms.TextToKeyConverter(); - textToKey.Column = new[] { new Legacy.Transforms.TermTransformColumn() { Name = "Label1", Source = "Label" } }; - var textToKeyOutput = subGraph.Add(textToKey); + var env = new MLContext(42); + var subGraph = env.CreateExperiment(); - var hash = new Legacy.Transforms.HashConverter(); - hash.Column = new[] { new Legacy.Transforms.HashJoinTransformColumn() { Name = "GroupId1", Source = "Workclass" } }; - hash.Data = textToKeyOutput.OutputData; - var hashOutput = subGraph.Add(hash); + var textToKey = new Legacy.Transforms.TextToKeyConverter(); + textToKey.Column = new[] { new Legacy.Transforms.ValueToKeyMappingTransformerColumn() { Name = "Label1", Source = "Label" } }; + var textToKeyOutput = subGraph.Add(textToKey); - var learnerInput = new Legacy.Trainers.FastTreeRanker - { - TrainingData = hashOutput.OutputData, - NumThreads = 1, - LabelColumn = "Label1", - GroupIdColumn = "GroupId1" - }; - var learnerOutput = subGraph.Add(learnerInput); + var hash = new Legacy.Transforms.HashConverter(); + hash.Column = new[] { new Legacy.Transforms.HashJoiningTransformColumn() { Name = "GroupId1", Source = "Workclass" } }; + hash.Data = textToKeyOutput.OutputData; + var hashOutput = subGraph.Add(hash); - var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner - { - TransformModels = new ArrayVar(textToKeyOutput.Model, hashOutput.Model), - PredictorModel = learnerOutput.PredictorModel - }; - var modelCombineOutput = subGraph.Add(modelCombine); - - var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - importInput.Arguments.HasHeader = true; - importInput.Arguments.Column = new TextLoaderColumn[] - { + var learnerInput = new Legacy.Trainers.FastTreeRanker + { + TrainingData = hashOutput.OutputData, + NumThreads = 1, + LabelColumn = "Label1", + GroupIdColumn = "GroupId1" + }; + var learnerOutput = subGraph.Add(learnerInput); + + var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner + { + TransformModels = new ArrayVar(textToKeyOutput.Model, hashOutput.Model), + PredictorModel = learnerOutput.PredictorModel + }; + var modelCombineOutput = subGraph.Add(modelCombine); + + var experiment = env.CreateExperiment(); + var importInput = new Legacy.Data.TextLoader(dataPath); + importInput.Arguments.HasHeader = true; + importInput.Arguments.Column = new TextLoaderColumn[] + { new TextLoaderColumn { Name = "Label", Source = new[] { new TextLoaderRange(0) } }, new TextLoaderColumn { Name = "Workclass", Source = new[] { new TextLoaderRange(1) }, Type = Legacy.Data.DataKind.Text }, new TextLoaderColumn { Name = "Features", Source = new[] { new TextLoaderRange(9, 14) } } - }; - var importOutput = experiment.Add(importInput); + }; + var importOutput = experiment.Add(importInput); - var crossValidate = new Legacy.Models.CrossValidator - { - Data = importOutput.Data, - Nodes = subGraph, - TransformModel = null, - LabelColumn = "Label1", - GroupColumn = "GroupId1", - NameColumn = "Workclass", - Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureRankerTrainer - }; - crossValidate.Inputs.Data = textToKey.Data; - crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; - var crossValidateOutput = experiment.Add(crossValidate); - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); - - var schema = data.Schema; - var b = schema.TryGetColumnIndex("NDCG", out int metricCol); + var crossValidate = new Legacy.Models.CrossValidator + { + Data = importOutput.Data, + Nodes = subGraph, + TransformModel = null, + LabelColumn = "Label1", + GroupColumn = "GroupId1", + NameColumn = "Workclass", + Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureRankerTrainer + }; + crossValidate.Inputs.Data = textToKey.Data; + crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; + var crossValidateOutput = experiment.Add(crossValidate); + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); + + var schema = data.Schema; + var b = schema.TryGetColumnIndex("NDCG", out int metricCol); + Assert.True(b); + b = schema.TryGetColumnIndex("Fold Index", out int foldCol); + Assert.True(b); + using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol)) + { + var getter = cursor.GetGetter>(metricCol); + var foldGetter = cursor.GetGetter>(foldCol); + ReadOnlyMemory fold = default; + + // Get the verage. + b = cursor.MoveNext(); Assert.True(b); - b = schema.TryGetColumnIndex("Fold Index", out int foldCol); + var avg = default(VBuffer); + getter(ref avg); + foldGetter(ref fold); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); + + // Get the standard deviation. + b = cursor.MoveNext(); Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol)) + var stdev = default(VBuffer); + getter(ref stdev); + foldGetter(ref fold); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); + var stdevValues = stdev.GetValues(); + Assert.Equal(2.462, stdevValues[0], 3); + Assert.Equal(2.763, stdevValues[1], 3); + Assert.Equal(3.273, stdevValues[2], 3); + + var sumBldr = new BufferBuilder(R8Adder.Instance); + sumBldr.Reset(avg.Length, true); + var val = default(VBuffer); + for (int f = 0; f < 2; f++) { - var getter = cursor.GetGetter>(metricCol); - var foldGetter = cursor.GetGetter>(foldCol); - ReadOnlyMemory fold = default; - - // Get the verage. - b = cursor.MoveNext(); - Assert.True(b); - var avg = default(VBuffer); - getter(ref avg); - foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); - - // Get the standard deviation. b = cursor.MoveNext(); Assert.True(b); - var stdev = default(VBuffer); - getter(ref stdev); + getter(ref val); foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); - Assert.Equal(2.462, stdev.Values[0], 3); - Assert.Equal(2.763, stdev.Values[1], 3); - Assert.Equal(3.273, stdev.Values[2], 3); - - var sumBldr = new BufferBuilder(R8Adder.Instance); - sumBldr.Reset(avg.Length, true); - var val = default(VBuffer); - for (int f = 0; f < 2; f++) - { - b = cursor.MoveNext(); - Assert.True(b); - getter(ref val); - foldGetter(ref fold); - sumBldr.AddFeatures(0, in val); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); - } - var sum = default(VBuffer); - sumBldr.GetResult(ref sum); - for (int i = 0; i < avg.Length; i++) - Assert.Equal(avg.Values[i], sum.Values[i] / 2); - b = cursor.MoveNext(); - Assert.False(b); + sumBldr.AddFeatures(0, in val); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); } + var sum = default(VBuffer); + sumBldr.GetResult(ref sum); + + var avgValues = avg.GetValues(); + var sumValues = sum.GetValues(); + for (int i = 0; i < avgValues.Length; i++) + Assert.Equal(avgValues[i], sumValues[i] / 2); + b = cursor.MoveNext(); + Assert.False(b); + } - data = experiment.GetOutput(crossValidateOutput.PerInstanceMetrics); - Assert.True(data.Schema.TryGetColumnIndex("Instance", out int nameCol)); - using (var cursor = data.GetRowCursor(col => col == nameCol)) - { - var getter = cursor.GetGetter>(nameCol); - while (cursor.MoveNext()) - { - ReadOnlyMemory name = default; - getter(ref name); - Assert.Subset(new HashSet() { "Private", "?", "Federal-gov" }, new HashSet() { name.ToString() }); - if (cursor.Position > 4) - break; - } + data = experiment.GetOutput(crossValidateOutput.PerInstanceMetrics); + Assert.True(data.Schema.TryGetColumnIndex("Instance", out int nameCol)); + using (var cursor = data.GetRowCursor(col => col == nameCol)) + { + var getter = cursor.GetGetter>(nameCol); + while (cursor.MoveNext()) + { + ReadOnlyMemory name = default; + getter(ref name); + Assert.Subset(new HashSet() { "Private", "?", "Federal-gov" }, new HashSet() { name.ToString() }); + if (cursor.Position > 4) + break; } } } @@ -845,58 +835,56 @@ public void TestCrossValidationMacroWithNonDefaultNames() public void TestOvaMacro() { var dataPath = GetDataPath(@"iris.txt"); - using (var env = new ConsoleEnvironment(42)) - { - // Specify subgraph for OVA - var subGraph = env.CreateExperiment(); - var learnerInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier { NumThreads = 1 }; - var learnerOutput = subGraph.Add(learnerInput); - // Create pipeline with OVA and multiclass scoring. - var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - importInput.Arguments.Column = new TextLoaderColumn[] - { + var env = new MLContext(42); + // Specify subgraph for OVA + var subGraph = env.CreateExperiment(); + var learnerInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier { NumThreads = 1 }; + var learnerOutput = subGraph.Add(learnerInput); + // Create pipeline with OVA and multiclass scoring. + var experiment = env.CreateExperiment(); + var importInput = new Legacy.Data.TextLoader(dataPath); + importInput.Arguments.Column = new TextLoaderColumn[] + { new TextLoaderColumn { Name = "Label", Source = new[] { new TextLoaderRange(0) } }, new TextLoaderColumn { Name = "Features", Source = new[] { new TextLoaderRange(1,4) } } - }; - var importOutput = experiment.Add(importInput); - var oneVersusAll = new Legacy.Models.OneVersusAll - { - TrainingData = importOutput.Data, - Nodes = subGraph, - UseProbabilities = true, - }; - var ovaOutput = experiment.Add(oneVersusAll); - var scoreInput = new Legacy.Transforms.DatasetScorer - { - Data = importOutput.Data, - PredictorModel = ovaOutput.PredictorModel - }; - var scoreOutput = experiment.Add(scoreInput); - var evalInput = new Legacy.Models.ClassificationEvaluator - { - Data = scoreOutput.ScoredData - }; - var evalOutput = experiment.Add(evalInput); - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - - var data = experiment.GetOutput(evalOutput.OverallMetrics); - var schema = data.Schema; - var b = schema.TryGetColumnIndex(MultiClassClassifierEvaluator.AccuracyMacro, out int accCol); + }; + var importOutput = experiment.Add(importInput); + var oneVersusAll = new Legacy.Models.OneVersusAll + { + TrainingData = importOutput.Data, + Nodes = subGraph, + UseProbabilities = true, + }; + var ovaOutput = experiment.Add(oneVersusAll); + var scoreInput = new Legacy.Transforms.DatasetScorer + { + Data = importOutput.Data, + PredictorModel = ovaOutput.PredictorModel + }; + var scoreOutput = experiment.Add(scoreInput); + var evalInput = new Legacy.Models.ClassificationEvaluator + { + Data = scoreOutput.ScoredData + }; + var evalOutput = experiment.Add(evalInput); + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + + var data = experiment.GetOutput(evalOutput.OverallMetrics); + var schema = data.Schema; + var b = schema.TryGetColumnIndex(MultiClassClassifierEvaluator.AccuracyMacro, out int accCol); + Assert.True(b); + using (var cursor = data.GetRowCursor(col => col == accCol)) + { + var getter = cursor.GetGetter(accCol); + b = cursor.MoveNext(); Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == accCol)) - { - var getter = cursor.GetGetter(accCol); - b = cursor.MoveNext(); - Assert.True(b); - double acc = 0; - getter(ref acc); - Assert.Equal(0.96, acc, 2); - b = cursor.MoveNext(); - Assert.False(b); - } + double acc = 0; + getter(ref acc); + Assert.Equal(0.96, acc, 2); + b = cursor.MoveNext(); + Assert.False(b); } } @@ -904,58 +892,56 @@ public void TestOvaMacro() public void TestOvaMacroWithUncalibratedLearner() { var dataPath = GetDataPath(@"iris.txt"); - using (var env = new ConsoleEnvironment(42)) - { - // Specify subgraph for OVA - var subGraph = env.CreateExperiment(); - var learnerInput = new Legacy.Trainers.AveragedPerceptronBinaryClassifier { Shuffle = false }; - var learnerOutput = subGraph.Add(learnerInput); - // Create pipeline with OVA and multiclass scoring. - var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - importInput.Arguments.Column = new TextLoaderColumn[] - { + var env = new MLContext(42); + // Specify subgraph for OVA + var subGraph = env.CreateExperiment(); + var learnerInput = new Legacy.Trainers.AveragedPerceptronBinaryClassifier { Shuffle = false }; + var learnerOutput = subGraph.Add(learnerInput); + // Create pipeline with OVA and multiclass scoring. + var experiment = env.CreateExperiment(); + var importInput = new Legacy.Data.TextLoader(dataPath); + importInput.Arguments.Column = new TextLoaderColumn[] + { new TextLoaderColumn { Name = "Label", Source = new[] { new TextLoaderRange(0) } }, new TextLoaderColumn { Name = "Features", Source = new[] { new TextLoaderRange(1,4) } } - }; - var importOutput = experiment.Add(importInput); - var oneVersusAll = new Legacy.Models.OneVersusAll - { - TrainingData = importOutput.Data, - Nodes = subGraph, - UseProbabilities = true, - }; - var ovaOutput = experiment.Add(oneVersusAll); - var scoreInput = new Legacy.Transforms.DatasetScorer - { - Data = importOutput.Data, - PredictorModel = ovaOutput.PredictorModel - }; - var scoreOutput = experiment.Add(scoreInput); - var evalInput = new Legacy.Models.ClassificationEvaluator - { - Data = scoreOutput.ScoredData - }; - var evalOutput = experiment.Add(evalInput); - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - - var data = experiment.GetOutput(evalOutput.OverallMetrics); - var schema = data.Schema; - var b = schema.TryGetColumnIndex(MultiClassClassifierEvaluator.AccuracyMacro, out int accCol); + }; + var importOutput = experiment.Add(importInput); + var oneVersusAll = new Legacy.Models.OneVersusAll + { + TrainingData = importOutput.Data, + Nodes = subGraph, + UseProbabilities = true, + }; + var ovaOutput = experiment.Add(oneVersusAll); + var scoreInput = new Legacy.Transforms.DatasetScorer + { + Data = importOutput.Data, + PredictorModel = ovaOutput.PredictorModel + }; + var scoreOutput = experiment.Add(scoreInput); + var evalInput = new Legacy.Models.ClassificationEvaluator + { + Data = scoreOutput.ScoredData + }; + var evalOutput = experiment.Add(evalInput); + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + + var data = experiment.GetOutput(evalOutput.OverallMetrics); + var schema = data.Schema; + var b = schema.TryGetColumnIndex(MultiClassClassifierEvaluator.AccuracyMacro, out int accCol); + Assert.True(b); + using (var cursor = data.GetRowCursor(col => col == accCol)) + { + var getter = cursor.GetGetter(accCol); + b = cursor.MoveNext(); Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == accCol)) - { - var getter = cursor.GetGetter(accCol); - b = cursor.MoveNext(); - Assert.True(b); - double acc = 0; - getter(ref acc); - Assert.Equal(0.71, acc, 2); - b = cursor.MoveNext(); - Assert.False(b); - } + double acc = 0; + getter(ref acc); + Assert.Equal(0.71, acc, 2); + b = cursor.MoveNext(); + Assert.False(b); } } @@ -963,37 +949,35 @@ public void TestOvaMacroWithUncalibratedLearner() public void TestTensorFlowEntryPoint() { var dataPath = GetDataPath("Train-Tiny-28x28.txt"); - using (var env = new ConsoleEnvironment(42)) - { - var experiment = env.CreateExperiment(); + var env = new MLContext(42); + var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - importInput.Arguments.Column = new TextLoaderColumn[] - { + var importInput = new Legacy.Data.TextLoader(dataPath); + importInput.Arguments.Column = new TextLoaderColumn[] + { new TextLoaderColumn { Name = "Label", Source = new[] { new TextLoaderRange(0) } }, new TextLoaderColumn { Name = "Placeholder", Source = new[] { new TextLoaderRange(1, 784) } } - }; - var importOutput = experiment.Add(importInput); + }; + var importOutput = experiment.Add(importInput); - var tfTransformInput = new Legacy.Transforms.TensorFlowScorer - { - Data = importOutput.Data, - ModelLocation = "mnist_model/frozen_saved_model.pb", - InputColumns = new[] { "Placeholder" }, - OutputColumns = new[] { "Softmax" }, - }; - var tfTransformOutput = experiment.Add(tfTransformInput); - - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - var data = experiment.GetOutput(tfTransformOutput.OutputData); - - var schema = data.Schema; - Assert.Equal(3, schema.ColumnCount); - Assert.Equal("Softmax", schema.GetColumnName(2)); - Assert.Equal(10, (schema.GetColumnType(2) as VectorType)?.Size); - } + var tfTransformInput = new Legacy.Transforms.TensorFlowScorer + { + Data = importOutput.Data, + ModelLocation = "mnist_model/frozen_saved_model.pb", + InputColumns = new[] { "Placeholder" }, + OutputColumns = new[] { "Softmax" }, + }; + var tfTransformOutput = experiment.Add(tfTransformInput); + + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + var data = experiment.GetOutput(tfTransformOutput.OutputData); + + var schema = data.Schema; + Assert.Equal(3, schema.ColumnCount); + Assert.Equal("Softmax", schema.GetColumnName(2)); + Assert.Equal(10, (schema.GetColumnType(2) as VectorType)?.Size); } } } diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestContracts.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestContracts.cs index 6b4fd5297f..ca1315b83b 100644 --- a/test/Microsoft.ML.Core.Tests/UnitTests/TestContracts.cs +++ b/test/Microsoft.ML.Core.Tests/UnitTests/TestContracts.cs @@ -3,8 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using Microsoft.ML.Runtime; -using Microsoft.ML.Runtime.Data; using Xunit; namespace Microsoft.ML.Runtime.RunTests { @@ -42,7 +40,7 @@ private void Helper(IExceptionContext ectx, MessageSensitivity expected) [Fact] public void ExceptionSensitivity() { - var env = new ConsoleEnvironment(); + var env = new MLContext(); // Default sensitivity should be unknown, that is, all bits set. Helper(null, MessageSensitivity.Unknown); // If we set it to be not sensitive, then the messages should be marked insensitive, diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestEarlyStoppingCriteria.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestEarlyStoppingCriteria.cs index 3798246fa8..688287dda2 100644 --- a/test/Microsoft.ML.Core.Tests/UnitTests/TestEarlyStoppingCriteria.cs +++ b/test/Microsoft.ML.Core.Tests/UnitTests/TestEarlyStoppingCriteria.cs @@ -13,7 +13,7 @@ public sealed class TestEarlyStoppingCriteria { private IEarlyStoppingCriterion CreateEarlyStoppingCriterion(string name, string args, bool lowerIsBetter) { - var env = new ConsoleEnvironment() + var env = new MLContext() .AddStandardComponents(); var sub = new SubComponent(name, args); return sub.CreateInstance(env, lowerIsBetter); diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs index 0a38664fa6..386f9f8a97 100644 --- a/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs +++ b/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs @@ -461,19 +461,19 @@ public void EntryPointCreateEnsemble() new ScoreModel.Input { Data = splitOutput.TestData[nModels], PredictorModel = predictorModels[i] }) .ScoredData; - individualScores[i] = CopyColumnsTransform.Create(Env, - new CopyColumnsTransform.Arguments() + individualScores[i] = ColumnsCopyingTransformer.Create(Env, + new ColumnsCopyingTransformer.Arguments() { Column = new[] { - new CopyColumnsTransform.Column() + new ColumnsCopyingTransformer.Column() { Name = MetadataUtils.Const.ScoreValueKind.Score + i, Source = MetadataUtils.Const.ScoreValueKind.Score }, } }, individualScores[i]); - individualScores[i] = SelectColumnsTransform.CreateDrop(Env, individualScores[i], MetadataUtils.Const.ScoreValueKind.Score); + individualScores[i] = ColumnSelectingTransformer.CreateDrop(Env, individualScores[i], MetadataUtils.Const.ScoreValueKind.Score); } var avgEnsembleInput = new EnsembleCreator.ClassifierInput { Models = predictorModels, ModelCombiner = EnsembleCreator.ClassifierCombiner.Average }; @@ -754,24 +754,24 @@ public void EntryPointPipelineEnsemble() { var data = splitOutput.TrainData[i]; data = new RandomFourierFeaturizingEstimator(Env, new[] { - new RffTransform.ColumnInfo("Features", "Features1", 10, false), - new RffTransform.ColumnInfo("Features", "Features2", 10, false), + new RandomFourierFeaturizingTransformer.ColumnInfo("Features", "Features1", 10, false), + new RandomFourierFeaturizingTransformer.ColumnInfo("Features", "Features2", 10, false), }).Fit(data).Transform(data); - data = ConcatTransform.Create(Env, new ConcatTransform.Arguments() + data = ColumnConcatenatingTransformer.Create(Env, new ColumnConcatenatingTransformer.Arguments() { - Column = new[] { new ConcatTransform.Column() { Name = "Features", Source = new[] { "Features1", "Features2" } } } + Column = new[] { new ColumnConcatenatingTransformer.Column() { Name = "Features", Source = new[] { "Features1", "Features2" } } } }, data); - data = TermTransform.Create(Env, new TermTransform.Arguments() + data = ValueToKeyMappingTransformer.Create(Env, new ValueToKeyMappingTransformer.Arguments() { Column = new[] { - new TermTransform.Column() + new ValueToKeyMappingTransformer.Column() { Name = "Label", Source = "Label", - Sort = TermTransform.SortOrder.Value + Sort = ValueToKeyMappingTransformer.SortOrder.Value } } }, data); @@ -1031,11 +1031,11 @@ public void EntryPointPipelineEnsembleText() } else { - data = WordHashBagTransform.Create(Env, - new WordHashBagTransform.Arguments() + data = WordHashBagProducingTransformer.Create(Env, + new WordHashBagProducingTransformer.Arguments() { Column = - new[] { new WordHashBagTransform.Column() { Name = "Features", Source = new[] { "Text" } }, } + new[] { new WordHashBagProducingTransformer.Column() { Name = "Features", Source = new[] { "Text" } }, } }, data); } @@ -1223,15 +1223,15 @@ public void EntryPointMulticlassPipelineEnsemble() { var data = splitOutput.TrainData[i]; data = new RandomFourierFeaturizingEstimator(Env, new[] { - new RffTransform.ColumnInfo("Features", "Features1", 10, false), - new RffTransform.ColumnInfo("Features", "Features2", 10, false), + new RandomFourierFeaturizingTransformer.ColumnInfo("Features", "Features1", 10, false), + new RandomFourierFeaturizingTransformer.ColumnInfo("Features", "Features2", 10, false), }).Fit(data).Transform(data); - data = ConcatTransform.Create(Env, new ConcatTransform.Arguments() + data = ColumnConcatenatingTransformer.Create(Env, new ColumnConcatenatingTransformer.Arguments() { - Column = new[] { new ConcatTransform.Column() { Name = "Features", Source = new[] { "Features1", "Features2" } } } + Column = new[] { new ColumnConcatenatingTransformer.Column() { Name = "Features", Source = new[] { "Features1", "Features2" } } } }, data); - var mlr = new MulticlassLogisticRegression(Env, "Features", "Label"); + var mlr = new MulticlassLogisticRegression(Env, "Label", "Features"); var rmd = new RoleMappedData(data, "Label", "Features"); predictorModels[i] = new PredictorModel(Env, rmd, data, mlr.Train(rmd)); @@ -1371,12 +1371,12 @@ public void EntryPointPipelineEnsembleGetSummary() for (int i = 0; i < nModels; i++) { var data = splitOutput.TrainData[i]; - data = CategoricalTransform.Create(Env, - new CategoricalTransform.Arguments() + data = OneHotEncodingTransformer.Create(Env, + new OneHotEncodingTransformer.Arguments() { - Column = new[] { new CategoricalTransform.Column() { Name = "Cat", Source = "Cat" } } + Column = new[] { new OneHotEncodingTransformer.Column() { Name = "Cat", Source = "Cat" } } }, data); - data = new ConcatTransform(Env, new ConcatTransform.ColumnInfo("Features", i % 2 == 0 ? new[] { "Features", "Cat" } : new[] { "Cat", "Features" })).Transform(data); + data = new ColumnConcatenatingTransformer(Env, new ColumnConcatenatingTransformer.ColumnInfo("Features", i % 2 == 0 ? new[] { "Features", "Cat" } : new[] { "Cat", "Features" })).Transform(data); if (i % 2 == 0) { var lrInput = new LogisticRegression.Arguments @@ -1483,9 +1483,11 @@ private static bool CompareVBuffers(in VBuffer v1, in VBuffer v2 return false; v1.CopyToDense(ref dense1); v2.CopyToDense(ref dense2); + var dense1Values = dense1.GetValues(); + var dense2Values = dense2.GetValues(); for (int i = 0; i < dense1.Length; i++) { - if (!Single.IsNaN(dense1.Values[i]) && !Single.IsNaN(dense2.Values[i]) && dense1.Values[i] != dense2.Values[i]) + if (!Single.IsNaN(dense1Values[i]) && !Single.IsNaN(dense2Values[i]) && dense1Values[i] != dense2Values[i]) return false; } return true; @@ -2018,7 +2020,7 @@ public void EntryPointPcaTransform() } [Fact] - public void EntryPointLightLdaTransform() + public void EntryPointLightLdaTransformer() { string dataFile = DeleteOutputPath("SavePipe", "SavePipeTextLightLda-SampleText.txt"); File.WriteAllLines(dataFile, new[] { @@ -3767,15 +3769,15 @@ public void EntryPointTreeLeafFeaturizer() #pragma warning disable 0618 var dataView = ImportTextData.ImportText(Env, new ImportTextData.Input { InputFile = inputFile }).Data; #pragma warning restore 0618 - var cat = Categorical.CatTransformDict(Env, new CategoricalTransform.Arguments() + var cat = Categorical.CatTransformDict(Env, new OneHotEncodingTransformer.Arguments() { Data = dataView, - Column = new[] { new CategoricalTransform.Column { Name = "Categories", Source = "Categories" } } + Column = new[] { new OneHotEncodingTransformer.Column { Name = "Categories", Source = "Categories" } } }); - var concat = SchemaManipulation.ConcatColumns(Env, new ConcatTransform.Arguments() + var concat = SchemaManipulation.ConcatColumns(Env, new ColumnConcatenatingTransformer.Arguments() { Data = cat.OutputData, - Column = new[] { new ConcatTransform.Column { Name = "Features", Source = new[] { "Categories", "NumericFeatures" } } } + Column = new[] { new ColumnConcatenatingTransformer.Column { Name = "Features", Source = new[] { "Categories", "NumericFeatures" } } } }); var fastTree = FastTree.TrainBinary(Env, new FastTreeBinaryClassificationTrainer.Arguments @@ -3848,11 +3850,11 @@ public void EntryPointWordEmbeddings() }, InputFile = inputFile, }).Data; - var embedding = Transforms.Text.TextAnalytics.WordEmbeddings(Env, new WordEmbeddingsTransform.Arguments() + var embedding = Transforms.Text.TextAnalytics.WordEmbeddings(Env, new WordEmbeddingsExtractingTransformer.Arguments() { Data = dataView, - Column = new[] { new WordEmbeddingsTransform.Column { Name = "Features", Source = "Text" } }, - ModelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe + Column = new[] { new WordEmbeddingsExtractingTransformer.Column { Name = "Features", Source = "Text" } }, + ModelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe }); var result = embedding.OutputData; using (var cursor = result.GetRowCursor((x => true))) diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestHosts.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestHosts.cs index ce01945bcb..2f1df54285 100644 --- a/test/Microsoft.ML.Core.Tests/UnitTests/TestHosts.cs +++ b/test/Microsoft.ML.Core.Tests/UnitTests/TestHosts.cs @@ -20,7 +20,7 @@ public class TestHosts [Fact] public void TestCancellation() { - var env = new ConsoleEnvironment(seed: 42); + IHostEnvironment env = new MLContext(seed: 42); for (int z = 0; z < 1000; z++) { var mainHost = env.Register("Main"); diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestVectorUtils.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestVectorUtils.cs new file mode 100644 index 0000000000..ee3e531e4d --- /dev/null +++ b/test/Microsoft.ML.Core.Tests/UnitTests/TestVectorUtils.cs @@ -0,0 +1,62 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Data; +using Microsoft.ML.Runtime.Numeric; +using System.Linq; +using Xunit; + +namespace Microsoft.ML.Runtime.RunTests +{ + public class TestVectorUtils + { + /// + /// Tests SparsifyNormalize works correctly. + /// + [Theory] + [InlineData(1, true, new[] { 0.8f, 0.9f, 1f }, new[] { 7, 8, 9 })] + [InlineData(1, false, new[] { 8f, 9f, 10f }, new[] { 7, 8, 9 })] + [InlineData(-4, true, new[] { -0.8f, -0.6f, -0.4f, 0.6f, 0.8f, 1f }, new[] { 0, 1, 2, 7, 8, 9 })] + [InlineData(-4, false, new[] { -4f, -3f, -2f, 3f, 4f, 5f }, new[] { 0, 1, 2, 7, 8, 9 })] + [InlineData(-10, true, new[] { -1f, -0.9f, -0.8f }, new[] { 0, 1, 2 })] + [InlineData(-10, false, new[] { -10f, -9f, -8f }, new[] { 0, 1, 2 })] + public void TestSparsifyNormalize(int startRange, bool normalize, float[] expectedValues, int[] expectedIndices) + { + float[] values = Enumerable.Range(startRange, 10).Select(i => (float)i).ToArray(); + var a = new VBuffer(10, values); + + VectorUtils.SparsifyNormalize(ref a, 3, 3, normalize); + + Assert.False(a.IsDense); + Assert.Equal(10, a.Length); + Assert.Equal(expectedIndices, a.GetIndices().ToArray()); + + var actualValues = a.GetValues().ToArray(); + Assert.Equal(expectedValues.Length, actualValues.Length); + for (int i = 0; i < expectedValues.Length; i++) + Assert.Equal(expectedValues[i], actualValues[i], precision: 6); + } + + /// + /// Tests SparsifyNormalize works when asked for all values. + /// + [Theory] + [InlineData(10, 0)] + [InlineData(10, 10)] + [InlineData(20, 20)] + public void TestSparsifyNormalizeReturnsDense(int top, int bottom) + { + float[] values = Enumerable.Range(1, 10).Select(i => (float)i).ToArray(); + var a = new VBuffer(10, values); + + VectorUtils.SparsifyNormalize(ref a, top, bottom, false); + + Assert.True(a.IsDense); + Assert.Equal(10, a.Length); + Assert.True(a.GetIndices().IsEmpty); + + Assert.Equal(values, a.GetValues().ToArray()); + } + } +} diff --git a/test/Microsoft.ML.CpuMath.UnitTests.netcoreapp/UnitTests.cs b/test/Microsoft.ML.CpuMath.UnitTests.netcoreapp/UnitTests.cs index 1d2b53bb79..25996ec42c 100644 --- a/test/Microsoft.ML.CpuMath.UnitTests.netcoreapp/UnitTests.cs +++ b/test/Microsoft.ML.CpuMath.UnitTests.netcoreapp/UnitTests.cs @@ -52,8 +52,8 @@ public CpuMathUtilsUnitTests() AlignedArray testMatrixAligned1 = new AlignedArray(8 * 8, _vectorAlignment); AlignedArray testMatrixAligned2 = new AlignedArray(8 * 16, _vectorAlignment); - testMatrixAligned1.CopyFrom(testMatrix1, 0, testMatrix1.Length); - testMatrixAligned2.CopyFrom(testMatrix2, 0, testMatrix2.Length); + testMatrixAligned1.CopyFrom(testMatrix1); + testMatrixAligned2.CopyFrom(testMatrix2); _testMatrices = new AlignedArray[] { testMatrixAligned1, testMatrixAligned2 }; @@ -63,8 +63,8 @@ public CpuMathUtilsUnitTests() AlignedArray testSrcVectorAligned1 = new AlignedArray(8, _vectorAlignment); AlignedArray testSrcVectorAligned2 = new AlignedArray(16, _vectorAlignment); - testSrcVectorAligned1.CopyFrom(testSrcVector1, 0, testSrcVector1.Length); - testSrcVectorAligned2.CopyFrom(testSrcVector2, 0, testSrcVector2.Length); + testSrcVectorAligned1.CopyFrom(testSrcVector1); + testSrcVectorAligned2.CopyFrom(testSrcVector2); _testSrcVectors = new AlignedArray[] { testSrcVectorAligned1, testSrcVectorAligned2 }; @@ -74,8 +74,8 @@ public CpuMathUtilsUnitTests() AlignedArray testDstVectorAligned1 = new AlignedArray(8, _vectorAlignment); AlignedArray testDstVectorAligned2 = new AlignedArray(16, _vectorAlignment); - testDstVectorAligned1.CopyFrom(testDstVector1, 0, testDstVector1.Length); - testDstVectorAligned2.CopyFrom(testDstVector2, 0, testDstVector2.Length); + testDstVectorAligned1.CopyFrom(testDstVector1); + testDstVectorAligned2.CopyFrom(testDstVector2); _testDstVectors = new AlignedArray[] { testDstVectorAligned1, testDstVectorAligned2 }; } diff --git a/test/Microsoft.ML.InferenceTesting/Microsoft.ML.InferenceTesting.csproj b/test/Microsoft.ML.InferenceTesting/Microsoft.ML.InferenceTesting.csproj deleted file mode 100644 index 60b52497a0..0000000000 --- a/test/Microsoft.ML.InferenceTesting/Microsoft.ML.InferenceTesting.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - true - CORECLR - - - - - - - - - - - - - - - - - diff --git a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj index 20974dea70..82f31a0d41 100644 --- a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj +++ b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj @@ -10,7 +10,7 @@ - + @@ -33,4 +33,4 @@ DestinationFolder="$(OutDir)\DnnImageModels\ResNet18Onnx" /> - \ No newline at end of file + diff --git a/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs b/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs index a95d5c15c8..af6a26d440 100644 --- a/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs +++ b/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs @@ -29,6 +29,16 @@ private class TestData [VectorType(inputSize)] public float[] data_0; } + + private class TestDataMulti + { + [VectorType(5)] + public float[] ina; + + [VectorType(5)] + public float[] inb; + } + private class TestDataSize { [VectorType(2)] @@ -45,7 +55,7 @@ private class TestDataDifferntType public string[] data_0; } - private float[] getSampleArrayData() + private float[] GetSampleArrayData() { var samplevector = new float[inputSize]; for (int i = 0; i < inputSize; i++) @@ -56,7 +66,7 @@ private float[] getSampleArrayData() public OnnxTransformTests(ITestOutputHelper output) : base(output) { } - + [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 fails with "An attempt was made to load a program with an incorrect format." void TestSimpleCase() { @@ -65,7 +75,7 @@ void TestSimpleCase() var modelFile = "squeezenet/00000001/model.onnx"; - var samplevector = getSampleArrayData(); + var samplevector = GetSampleArrayData(); var dataView = ComponentCreation.CreateDataView(Env, new TestData[] { @@ -82,7 +92,7 @@ void TestSimpleCase() var xyData = new List { new TestDataXY() { A = new float[inputSize] } }; var stringData = new List { new TestDataDifferntType() { data_0 = new string[inputSize] } }; var sizeData = new List { new TestDataSize() { data_0 = new float[2] } }; - var pipe = new OnnxScoringEstimator(Env, modelFile, "data_0", "softmaxout_1"); + var pipe = new OnnxScoringEstimator(Env, modelFile, new[] { "data_0" }, new[] { "softmaxout_1" }); var invalidDataWrongNames = ComponentCreation.CreateDataView(Env, xyData); var invalidDataWrongTypes = ComponentCreation.CreateDataView(Env, stringData); @@ -108,7 +118,7 @@ void TestOldSavingAndLoading() var modelFile = "squeezenet/00000001/model.onnx"; - var samplevector = getSampleArrayData(); + var samplevector = GetSampleArrayData(); var dataView = ComponentCreation.CreateDataView(Env, new TestData[] { @@ -118,8 +128,8 @@ void TestOldSavingAndLoading() } }); - var inputNames = "data_0"; - var outputNames = "softmaxout_1"; + var inputNames = new[] { "data_0" }; + var outputNames = new[] { "softmaxout_1" }; var est = new OnnxScoringEstimator(Env, modelFile, inputNames, outputNames); var transformer = est.Fit(dataView); var result = transformer.Transform(dataView); @@ -130,7 +140,7 @@ void TestOldSavingAndLoading() ms.Position = 0; var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms); - loadedView.Schema.TryGetColumnIndex(outputNames, out int softMaxOut1); + loadedView.Schema.TryGetColumnIndex(outputNames[0], out int softMaxOut1); using (var cursor = loadedView.GetRowCursor(col => col == softMaxOut1)) { VBuffer softMaxValue = default; @@ -166,55 +176,132 @@ public void OnnxStatic() var modelFile = "squeezenet/00000001/model.onnx"; - using (var env = new ConsoleEnvironment(null, false, 0, 1, null, null)) + var env = new MLContext(conc: 1); + var imageHeight = 224; + var imageWidth = 224; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + + var data = TextLoader.CreateReader(env, ctx => ( + imagePath: ctx.LoadText(0), + name: ctx.LoadText(1))) + .Read(dataFile); + + // Note that CamelCase column names are there to match the TF graph node names. + var pipe = data.MakeNewEstimator() + .Append(row => ( + row.name, + data_0: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) + .Append(row => (row.name, softmaxout_1: row.data_0.ApplyOnnxModel(modelFile))); + + TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); + + var result = pipe.Fit(data).Transform(data).AsDynamic; + result.Schema.TryGetColumnIndex("softmaxout_1", out int output); + using (var cursor = result.GetRowCursor(col => col == output)) + { + var buffer = default(VBuffer); + var getter = cursor.GetGetter>(output); + var numRows = 0; + while (cursor.MoveNext()) + { + getter(ref buffer); + Assert.Equal(1000, buffer.Length); + numRows += 1; + } + Assert.Equal(3, numRows); + } + } + + [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 output differs from Baseline + void TestCommandLine() + { + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + return; + + var env = new MLContext(); + var x = Maml.Main(new[] { @"showschema loader=Text{col=data_0:R4:0-150527} xf=Onnx{InputColumns={data_0} OutputColumns={softmaxout_1} model={squeezenet/00000001/model.onnx}}" }); + Assert.Equal(0, x); + } + + [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 output differs from Baseline + public void OnnxModelScenario() + { + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + return; + + var modelFile = "squeezenet/00000001/model.onnx"; + using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) { - var imageHeight = 224; - var imageWidth = 224; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - - var data = TextLoader.CreateReader(env, ctx => ( - imagePath: ctx.LoadText(0), - name: ctx.LoadText(1))) - .Read(dataFile); - - // Note that CamelCase column names are there to match the TF graph node names. - var pipe = data.MakeNewEstimator() - .Append(row => ( - row.name, - data_0: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) - .Append(row => (row.name, softmaxout_1: row.data_0.ApplyOnnxModel(modelFile))); - - TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); - - var result = pipe.Fit(data).Transform(data).AsDynamic; - result.Schema.TryGetColumnIndex("softmaxout_1", out int output); - using (var cursor = result.GetRowCursor(col => col == output)) + var samplevector = GetSampleArrayData(); + + var dataView = ComponentCreation.CreateDataView(Env, + new TestData[] { + new TestData() + { + data_0 = samplevector + } + }); + + var onnx = OnnxTransform.Create(env, dataView, modelFile, + new[] { "data_0" }, + new[] { "softmaxout_1" }); + + onnx.Schema.TryGetColumnIndex("softmaxout_1", out int scores); + using (var curs = onnx.GetRowCursor(col => col == scores)) { + var getScores = curs.GetGetter>(scores); var buffer = default(VBuffer); - var getter = cursor.GetGetter>(output); - var numRows = 0; - while (cursor.MoveNext()) + while (curs.MoveNext()) { - getter(ref buffer); + getScores(ref buffer); Assert.Equal(1000, buffer.Length); - numRows += 1; } - Assert.Equal(3, numRows); } } } [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 output differs from Baseline - void TestCommandLine() + public void OnnxModelMultiInput() { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return; - using (var env = new ConsoleEnvironment()) + var modelFile = @"twoinput\twoinput.onnx"; + using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) { - var x = Maml.Main(new[] { @"showschema loader=Text{col=data_0:R4:0-150527} xf=Onnx{InputColumn=data_0 OutputColumn=softmaxout_1 model={squeezenet/00000001/model.onnx}}" }); - Assert.Equal(0, x); + var samplevector = GetSampleArrayData(); + + var dataView = ComponentCreation.CreateDataView(Env, + new TestDataMulti[] { + new TestDataMulti() + { + ina = new float[] {1,2,3,4,5}, + inb = new float[] {1,2,3,4,5} + } + }); + + var onnx = OnnxTransform.Create(env, dataView, modelFile, + new[] { "ina", "inb" }, + new[] { "outa", "outb" }); + + onnx.Schema.TryGetColumnIndex("outa", out int scoresa); + onnx.Schema.TryGetColumnIndex("outb", out int scoresb); + using (var curs = onnx.GetRowCursor(col => col == scoresa || col == scoresb)) + { + var getScoresa = curs.GetGetter>(scoresa); + var getScoresb = curs.GetGetter>(scoresb); + var buffera = default(VBuffer); + var bufferb = default(VBuffer); + + while (curs.MoveNext()) + { + getScoresa(ref buffera); + getScoresb(ref bufferb); + Console.WriteLine(buffera.GetValues().ToArray()); + Assert.Equal(5, buffera.Length); + } + } } } } diff --git a/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdIndenterTest.cs b/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdIndenterTest.cs index d77d455eac..76fa11fa5f 100644 --- a/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdIndenterTest.cs +++ b/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdIndenterTest.cs @@ -4,6 +4,7 @@ using Microsoft.ML.Runtime.Internal.Utilities; using System; +using System.CodeDom.Compiler; using System.IO; using Xunit; using Xunit.Abstractions; @@ -45,7 +46,7 @@ internal void Run() using (var writer = File.CreateText(outPath)) { - var wrt = IndentingTextWriter.Wrap(writer); + var wrt = new IndentedTextWriter(writer, " "); // Individual scripts are separated by $ int count = 0; diff --git a/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLine.cs b/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLine.cs index 0839a57ed3..0f11af8ae0 100644 --- a/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLine.cs +++ b/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLine.cs @@ -5,6 +5,7 @@ #pragma warning disable 649 // field is never assigned using System; +using System.CodeDom.Compiler; using System.Collections.Generic; using System.IO; using System.Linq; @@ -81,8 +82,8 @@ public void CmdParsingSingle() new ArgsSingle(), new ArgsSingle() { value = "3" }, }; - Action init = null; - Action action = null; + Action init = null; + Action action = null; foreach (var def in defaults) { init += def.CallInit; @@ -95,9 +96,9 @@ public void CmdParsingSingle() /// /// Called at the beginning of a test - it dumps the usage of the Arguments class(es). /// - private static void Init(IndentingTextWriter wrt, object defaults) + private static void Init(IndentedTextWriter wrt, object defaults) { - var env = new ConsoleEnvironment(seed: 42); + var env = new MLContext(seed: 42); wrt.WriteLine("Usage:"); wrt.WriteLine(CmdParser.ArgumentsUsage(env, defaults.GetType(), defaults, false, 200)); } @@ -105,9 +106,9 @@ private static void Init(IndentingTextWriter wrt, object defaults) /// /// Process a script to be parsed (from the input resource). /// - private static void Process(IndentingTextWriter wrt, string text, ArgsBase defaults) + private static void Process(IndentedTextWriter wrt, string text, ArgsBase defaults) { - var env = new ConsoleEnvironment(seed: 42); + var env = new MLContext(seed: 42); using (wrt.Nest()) { var args1 = defaults.Clone(); @@ -138,7 +139,7 @@ private static void Process(IndentingTextWriter wrt, string text, ArgsBase defau private abstract class ArgsBase { - public void CallInit(IndentingTextWriter wrt) + public void CallInit(IndentedTextWriter wrt) { Init(wrt, this); } @@ -146,7 +147,7 @@ public void CallInit(IndentingTextWriter wrt) /// /// Call the Process method passing "this" as the defaults. /// - public void CallProcess(IndentingTextWriter wrt, string text) + public void CallProcess(IndentedTextWriter wrt, string text) { Process(wrt, text, this); } @@ -336,8 +337,8 @@ private string GetResText(string resName) // Run the test. The init delegate is called once at the beginning of the test. // The action delegate is called on script in the input resource. - private void Run(string dir, string name, Action init, - Action action) + private void Run(string dir, string name, Action init, + Action action) { string text = GetResText(InResName(name)); @@ -346,7 +347,7 @@ private void Run(string dir, string name, Action init, using (var writer = File.CreateText(outPath)) { - var wrt = IndentingTextWriter.Wrap(writer); + var wrt = new IndentedTextWriter(writer, " "); init(wrt); @@ -404,4 +405,4 @@ private void Run(string dir, string name, Action init, Done(); } } -} +} \ No newline at end of file diff --git a/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLineReverseTest.cs b/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLineReverseTest.cs index 6d95829454..51330648ee 100644 --- a/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLineReverseTest.cs +++ b/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLineReverseTest.cs @@ -19,7 +19,7 @@ public class CmdLineReverseTests [TestCategory("Cmd Parsing")] public void ArgumentParseTest() { - var env = new ConsoleEnvironment(seed: 42); + var env = new MLContext(seed: 42); var innerArg1 = new SimpleArg() { required = -2, diff --git a/test/Microsoft.ML.InferenceTesting/InferRecipesCommand.cs b/test/Microsoft.ML.Predictor.Tests/Commands/InferRecipesCommand.cs similarity index 96% rename from test/Microsoft.ML.InferenceTesting/InferRecipesCommand.cs rename to test/Microsoft.ML.Predictor.Tests/Commands/InferRecipesCommand.cs index a6dbae8248..d84b6f9a7d 100644 --- a/test/Microsoft.ML.InferenceTesting/InferRecipesCommand.cs +++ b/test/Microsoft.ML.Predictor.Tests/Commands/InferRecipesCommand.cs @@ -22,8 +22,9 @@ namespace Microsoft.ML.Runtime.MLTesting.Inference /// This command generates a suggested RSP to load the text file and recipes it prior to training. /// The results are output to the console and also to the RSP file, if it's specified. /// - public sealed class InferRecipesCommand : ICommand + internal sealed class InferRecipesCommand : ICommand { +#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. public sealed class Arguments { [Argument(ArgumentType.Required, HelpText = "Text file with data to analyze", ShortName = "data")] @@ -35,6 +36,7 @@ public sealed class Arguments [Argument(ArgumentType.AtMostOnce, HelpText = "Optional path to the schema definition file generated by the InferSchema command", ShortName = "schema")] public string SchemaDefinitionFile; } +#pragma warning restore CS0649 private readonly IHost _host; private readonly string _dataFile; diff --git a/test/Microsoft.ML.InferenceTesting/InferSchemaCommand.cs b/test/Microsoft.ML.Predictor.Tests/Commands/InferSchemaCommand.cs similarity index 95% rename from test/Microsoft.ML.InferenceTesting/InferSchemaCommand.cs rename to test/Microsoft.ML.Predictor.Tests/Commands/InferSchemaCommand.cs index 7a96008bd0..269da88b19 100644 --- a/test/Microsoft.ML.InferenceTesting/InferSchemaCommand.cs +++ b/test/Microsoft.ML.Predictor.Tests/Commands/InferSchemaCommand.cs @@ -22,8 +22,9 @@ namespace Microsoft.ML.Runtime.MLTesting.Inference /// This command generates a suggested RSP to load the text file and recipes it prior to training. /// The results are output to the console and also to the RSP file, if it's specified. /// - public sealed class InferSchemaCommand : ICommand + internal sealed class InferSchemaCommand : ICommand { +#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. public sealed class Arguments { [Argument(ArgumentType.Required, HelpText = "Text file with data to analyze", ShortName = "data")] @@ -32,6 +33,7 @@ public sealed class Arguments [Argument(ArgumentType.AtMostOnce, HelpText = "Path to the output json file describing the columns", ShortName = "out")] public string OutputFile; } +#pragma warning restore CS0649 private readonly IHost _host; private readonly string _dataFile; diff --git a/test/Microsoft.ML.Predictor.Tests/Microsoft.ML.Predictor.Tests.csproj b/test/Microsoft.ML.Predictor.Tests/Microsoft.ML.Predictor.Tests.csproj index d089946b87..9cc27b17e2 100644 --- a/test/Microsoft.ML.Predictor.Tests/Microsoft.ML.Predictor.Tests.csproj +++ b/test/Microsoft.ML.Predictor.Tests/Microsoft.ML.Predictor.Tests.csproj @@ -16,7 +16,6 @@ - diff --git a/test/Microsoft.ML.Predictor.Tests/TestAutoInference.cs b/test/Microsoft.ML.Predictor.Tests/TestAutoInference.cs index 48f6336ecb..84cbea24ba 100644 --- a/test/Microsoft.ML.Predictor.Tests/TestAutoInference.cs +++ b/test/Microsoft.ML.Predictor.Tests/TestAutoInference.cs @@ -28,111 +28,102 @@ public TestAutoInference(ITestOutputHelper helper) [TestCategory("EntryPoints")] public void TestLearn() { - using (var env = new ConsoleEnvironment() - .AddStandardComponents()) // AutoInference.InferPipelines uses ComponentCatalog to read text data - { - string pathData = GetDataPath("adult.train"); - string pathDataTest = GetDataPath("adult.test"); - int numOfSampleRows = 1000; - int batchSize = 5; - int numIterations = 10; - int numTransformLevels = 3; - SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); - - // Using the simple, uniform random sampling (with replacement) engine - PipelineOptimizerBase autoMlEngine = new UniformRandomEngine(env); - - // Test initial learning - var amls = AutoInference.InferPipelines(env, autoMlEngine, pathData, "", out var schema, numTransformLevels, batchSize, - metric, out var bestPipeline, numOfSampleRows, new IterationTerminator(numIterations / 2), MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer); - env.Check(amls.GetAllEvaluatedPipelines().Length == numIterations / 2); - - // Resume learning - amls.UpdateTerminator(new IterationTerminator(numIterations)); - bestPipeline = amls.InferPipelines(numTransformLevels, batchSize, numOfSampleRows); - env.Check(amls.GetAllEvaluatedPipelines().Length == numIterations); - - // Use best pipeline for another task - var inputFileTrain = new SimpleFileHandle(env, pathData, false, false); + var env = new MLContext().AddStandardComponents(); // AutoInference uses ComponentCatalog to find all learners + string pathData = GetDataPath("adult.train"); + string pathDataTest = GetDataPath("adult.test"); + int numOfSampleRows = 1000; + int batchSize = 5; + int numIterations = 10; + int numTransformLevels = 3; + SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); + + // Using the simple, uniform random sampling (with replacement) engine + PipelineOptimizerBase autoMlEngine = new UniformRandomEngine(env); + + // Test initial learning + var amls = AutoInference.InferPipelines(env, autoMlEngine, pathData, "", out var schema, numTransformLevels, batchSize, + metric, out var bestPipeline, numOfSampleRows, new IterationTerminator(numIterations / 2), MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer); + env.Check(amls.GetAllEvaluatedPipelines().Length == numIterations / 2); + + // Resume learning + amls.UpdateTerminator(new IterationTerminator(numIterations)); + bestPipeline = amls.InferPipelines(numTransformLevels, batchSize, numOfSampleRows); + env.Check(amls.GetAllEvaluatedPipelines().Length == numIterations); + + // Use best pipeline for another task + var inputFileTrain = new SimpleFileHandle(env, pathData, false, false); #pragma warning disable 0618 - var datasetTrain = ImportTextData.ImportText(env, - new ImportTextData.Input { InputFile = inputFileTrain, CustomSchema = schema }).Data; - var inputFileTest = new SimpleFileHandle(env, pathDataTest, false, false); - var datasetTest = ImportTextData.ImportText(env, - new ImportTextData.Input { InputFile = inputFileTest, CustomSchema = schema }).Data; + var datasetTrain = ImportTextData.ImportText(env, + new ImportTextData.Input { InputFile = inputFileTrain, CustomSchema = schema }).Data; + var inputFileTest = new SimpleFileHandle(env, pathDataTest, false, false); + var datasetTest = ImportTextData.ImportText(env, + new ImportTextData.Input { InputFile = inputFileTest, CustomSchema = schema }).Data; #pragma warning restore 0618 - // REVIEW: Theoretically, it could be the case that a new, very bad learner is introduced and - // we get unlucky and only select it every time, such that this test fails. Not - // likely at all, but a non-zero probability. Should be ok, since all current learners are returning d > .80. - bestPipeline.RunTrainTestExperiment(datasetTrain, datasetTest, metric, MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer, - out var testMetricValue, out var trainMtericValue); - env.Check(testMetricValue > 0.2); - } + // REVIEW: Theoretically, it could be the case that a new, very bad learner is introduced and + // we get unlucky and only select it every time, such that this test fails. Not + // likely at all, but a non-zero probability. Should be ok, since all current learners are returning d > .80. + bestPipeline.RunTrainTestExperiment(datasetTrain, datasetTest, metric, MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer, + out var testMetricValue, out var trainMtericValue); + env.Check(testMetricValue > 0.2); Done(); } [Fact(Skip = "Need CoreTLC specific baseline update")] public void TestTextDatasetLearn() { - using (var env = new ConsoleEnvironment() - .AddStandardComponents()) // AutoInference uses ComponentCatalog to find all learners - { - string pathData = GetDataPath(@"../UnitTest/tweets_labeled_10k_test_validation.tsv"); - int batchSize = 5; - int numIterations = 35; - int numTransformLevels = 1; - int numSampleRows = 100; - SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.AccuracyMicro); - - // Using the simple, uniform random sampling (with replacement) engine - PipelineOptimizerBase autoMlEngine = new UniformRandomEngine(env); - - // Test initial learning - var amls = AutoInference.InferPipelines(env, autoMlEngine, pathData, "", out var _, numTransformLevels, batchSize, - metric, out var _, numSampleRows, new IterationTerminator(numIterations), - MacroUtils.TrainerKinds.SignatureMultiClassClassifierTrainer); - env.Check(amls.GetAllEvaluatedPipelines().Length == numIterations); - } + var env = new MLContext().AddStandardComponents(); // AutoInference uses ComponentCatalog to find all learners + string pathData = GetDataPath(@"../UnitTest/tweets_labeled_10k_test_validation.tsv"); + int batchSize = 5; + int numIterations = 35; + int numTransformLevels = 1; + int numSampleRows = 100; + SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.AccuracyMicro); + + // Using the simple, uniform random sampling (with replacement) engine + PipelineOptimizerBase autoMlEngine = new UniformRandomEngine(env); + + // Test initial learning + var amls = AutoInference.InferPipelines(env, autoMlEngine, pathData, "", out var _, numTransformLevels, batchSize, + metric, out var _, numSampleRows, new IterationTerminator(numIterations), + MacroUtils.TrainerKinds.SignatureMultiClassClassifierTrainer); + env.Check(amls.GetAllEvaluatedPipelines().Length == numIterations); Done(); } [Fact] public void TestPipelineNodeCloning() { - using (var env = new ConsoleEnvironment() - .AddStandardComponents()) // RecipeInference.AllowedLearners uses ComponentCatalog to find all learners - { - var lr1 = RecipeInference + var env = new MLContext().AddStandardComponents(); // AutoInference uses ComponentCatalog to find all learners + var lr1 = RecipeInference .AllowedLearners(env, MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer) .First(learner => learner.PipelineNode != null && learner.LearnerName.Contains("LogisticRegression")); - var sdca1 = RecipeInference - .AllowedLearners(env, MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer) - .First(learner => learner.PipelineNode != null && learner.LearnerName.Contains("StochasticDualCoordinateAscent")); - - // Clone and change hyperparam values - var lr2 = lr1.Clone(); - lr1.PipelineNode.SweepParams[0].RawValue = 1.2f; - lr2.PipelineNode.SweepParams[0].RawValue = 3.5f; - var sdca2 = sdca1.Clone(); - sdca1.PipelineNode.SweepParams[0].RawValue = 3; - sdca2.PipelineNode.SweepParams[0].RawValue = 0; - - // Make sure the changes are propagated to entry point objects - env.Check(lr1.PipelineNode.UpdateProperties()); - env.Check(lr2.PipelineNode.UpdateProperties()); - env.Check(sdca1.PipelineNode.UpdateProperties()); - env.Check(sdca2.PipelineNode.UpdateProperties()); - env.Check(lr1.PipelineNode.CheckEntryPointStateMatchesParamValues()); - env.Check(lr2.PipelineNode.CheckEntryPointStateMatchesParamValues()); - env.Check(sdca1.PipelineNode.CheckEntryPointStateMatchesParamValues()); - env.Check(sdca2.PipelineNode.CheckEntryPointStateMatchesParamValues()); - - // Make sure second object's set of changes didn't overwrite first object's - env.Check(!lr1.PipelineNode.SweepParams[0].RawValue.Equals(lr2.PipelineNode.SweepParams[0].RawValue)); - env.Check(!sdca2.PipelineNode.SweepParams[0].RawValue.Equals(sdca1.PipelineNode.SweepParams[0].RawValue)); - } + var sdca1 = RecipeInference + .AllowedLearners(env, MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer) + .First(learner => learner.PipelineNode != null && learner.LearnerName.Contains("StochasticDualCoordinateAscent")); + + // Clone and change hyperparam values + var lr2 = lr1.Clone(); + lr1.PipelineNode.SweepParams[0].RawValue = 1.2f; + lr2.PipelineNode.SweepParams[0].RawValue = 3.5f; + var sdca2 = sdca1.Clone(); + sdca1.PipelineNode.SweepParams[0].RawValue = 3; + sdca2.PipelineNode.SweepParams[0].RawValue = 0; + + // Make sure the changes are propagated to entry point objects + env.Check(lr1.PipelineNode.UpdateProperties()); + env.Check(lr2.PipelineNode.UpdateProperties()); + env.Check(sdca1.PipelineNode.UpdateProperties()); + env.Check(sdca2.PipelineNode.UpdateProperties()); + env.Check(lr1.PipelineNode.CheckEntryPointStateMatchesParamValues()); + env.Check(lr2.PipelineNode.CheckEntryPointStateMatchesParamValues()); + env.Check(sdca1.PipelineNode.CheckEntryPointStateMatchesParamValues()); + env.Check(sdca2.PipelineNode.CheckEntryPointStateMatchesParamValues()); + + // Make sure second object's set of changes didn't overwrite first object's + env.Check(!lr1.PipelineNode.SweepParams[0].RawValue.Equals(lr2.PipelineNode.SweepParams[0].RawValue)); + env.Check(!sdca2.PipelineNode.SweepParams[0].RawValue.Equals(sdca1.PipelineNode.SweepParams[0].RawValue)); } [Fact] @@ -143,45 +134,42 @@ public void TestHyperparameterFreezing() int batchSize = 1; int numIterations = 10; int numTransformLevels = 3; - using (var env = new ConsoleEnvironment() - .AddStandardComponents()) // AutoInference uses ComponentCatalog to find all learners - { - SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); - - // Using the simple, uniform random sampling (with replacement) brain - PipelineOptimizerBase autoMlBrain = new UniformRandomEngine(env); - - // Run initial experiments - var amls = AutoInference.InferPipelines(env, autoMlBrain, pathData, "", out var _, numTransformLevels, batchSize, - metric, out var bestPipeline, numOfSampleRows, new IterationTerminator(numIterations), - MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer); - - // Clear results - amls.ClearEvaluatedPipelines(); - - // Get space, remove transforms and all but one learner, freeze hyperparameters on learner. - var space = amls.GetSearchSpace(); - var transforms = space.Item1.Where(t => - t.ExpertType != typeof(TransformInference.Experts.Categorical)).ToArray(); - var learners = new[] { space.Item2.First() }; - var hyperParam = learners[0].PipelineNode.SweepParams.First(); - var frozenParamValue = hyperParam.RawValue; - hyperParam.Frozen = true; - amls.UpdateSearchSpace(learners, transforms); - - // Allow for one more iteration - amls.UpdateTerminator(new IterationTerminator(numIterations + 1)); - - // Do learning. Only retained learner should be left in all pipelines. - bestPipeline = amls.InferPipelines(numTransformLevels, batchSize, numOfSampleRows); - - // Make sure all pipelines have retained learner - Assert.True(amls.GetAllEvaluatedPipelines().All(p => p.Learner.LearnerName == learners[0].LearnerName)); - - // Make sure hyperparameter value did not change - Assert.NotNull(bestPipeline); - Assert.Equal(bestPipeline.Learner.PipelineNode.SweepParams.First().RawValue, frozenParamValue); - } + var env = new MLContext().AddStandardComponents(); // AutoInference uses ComponentCatalog to find all learners + SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); + + // Using the simple, uniform random sampling (with replacement) brain + PipelineOptimizerBase autoMlBrain = new UniformRandomEngine(env); + + // Run initial experiments + var amls = AutoInference.InferPipelines(env, autoMlBrain, pathData, "", out var _, numTransformLevels, batchSize, + metric, out var bestPipeline, numOfSampleRows, new IterationTerminator(numIterations), + MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer); + + // Clear results + amls.ClearEvaluatedPipelines(); + + // Get space, remove transforms and all but one learner, freeze hyperparameters on learner. + var space = amls.GetSearchSpace(); + var transforms = space.Item1.Where(t => + t.ExpertType != typeof(TransformInference.Experts.Categorical)).ToArray(); + var learners = new[] { space.Item2.First() }; + var hyperParam = learners[0].PipelineNode.SweepParams.First(); + var frozenParamValue = hyperParam.RawValue; + hyperParam.Frozen = true; + amls.UpdateSearchSpace(learners, transforms); + + // Allow for one more iteration + amls.UpdateTerminator(new IterationTerminator(numIterations + 1)); + + // Do learning. Only retained learner should be left in all pipelines. + bestPipeline = amls.InferPipelines(numTransformLevels, batchSize, numOfSampleRows); + + // Make sure all pipelines have retained learner + Assert.True(amls.GetAllEvaluatedPipelines().All(p => p.Learner.LearnerName == learners[0].LearnerName)); + + // Make sure hyperparameter value did not change + Assert.NotNull(bestPipeline); + Assert.Equal(bestPipeline.Learner.PipelineNode.SweepParams.First().RawValue, frozenParamValue); } [Fact(Skip = "Dataset not available.")] @@ -192,30 +180,27 @@ public void TestRegressionPipelineWithMinimizingMetric() int batchSize = 5; int numIterations = 10; int numTransformLevels = 1; - using (var env = new ConsoleEnvironment() - .AddStandardComponents()) // AutoInference uses ComponentCatalog to find all learners - { - SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.AccuracyMicro); + var env = new MLContext().AddStandardComponents(); // AutoInference uses ComponentCatalog to find all learners + SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.AccuracyMicro); - // Using the simple, uniform random sampling (with replacement) brain - PipelineOptimizerBase autoMlBrain = new UniformRandomEngine(env); + // Using the simple, uniform random sampling (with replacement) brain + PipelineOptimizerBase autoMlBrain = new UniformRandomEngine(env); - // Run initial experiments - var amls = AutoInference.InferPipelines(env, autoMlBrain, pathData, "", out var _, numTransformLevels, batchSize, - metric, out var bestPipeline, numOfSampleRows, new IterationTerminator(numIterations), - MacroUtils.TrainerKinds.SignatureRegressorTrainer); + // Run initial experiments + var amls = AutoInference.InferPipelines(env, autoMlBrain, pathData, "", out var _, numTransformLevels, batchSize, + metric, out var bestPipeline, numOfSampleRows, new IterationTerminator(numIterations), + MacroUtils.TrainerKinds.SignatureRegressorTrainer); - // Allow for one more iteration - amls.UpdateTerminator(new IterationTerminator(numIterations + 1)); + // Allow for one more iteration + amls.UpdateTerminator(new IterationTerminator(numIterations + 1)); - // Do learning. Only retained learner should be left in all pipelines. - bestPipeline = amls.InferPipelines(numTransformLevels, batchSize, numOfSampleRows); + // Do learning. Only retained learner should be left in all pipelines. + bestPipeline = amls.InferPipelines(numTransformLevels, batchSize, numOfSampleRows); - // Make sure hyperparameter value did not change - Assert.NotNull(bestPipeline); - Assert.True(amls.GetAllEvaluatedPipelines().All( - p => p.PerformanceSummary.MetricValue >= bestPipeline.PerformanceSummary.MetricValue)); - } + // Make sure hyperparameter value did not change + Assert.NotNull(bestPipeline); + Assert.True(amls.GetAllEvaluatedPipelines().All( + p => p.PerformanceSummary.MetricValue >= bestPipeline.PerformanceSummary.MetricValue)); } [Fact] @@ -227,27 +212,24 @@ public void TestLearnerConstrainingByName() int numIterations = 1; int numTransformLevels = 2; var retainedLearnerNames = new[] { $"LogisticRegressionBinaryClassifier", $"FastTreeBinaryClassifier" }; - using (var env = new ConsoleEnvironment() - .AddStandardComponents()) // AutoInference uses ComponentCatalog to find all learners - { - SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); - - // Using the simple, uniform random sampling (with replacement) brain. - PipelineOptimizerBase autoMlBrain = new UniformRandomEngine(env); - - // Run initial experiment. - var amls = AutoInference.InferPipelines(env, autoMlBrain, pathData, "", out var _, - numTransformLevels, batchSize, metric, out var _, numOfSampleRows, - new IterationTerminator(numIterations), MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer); - - // Keep only logistic regression and FastTree. - amls.KeepSelectedLearners(retainedLearnerNames); - var space = amls.GetSearchSpace(); - - // Make sure only learners left are those retained. - Assert.Equal(retainedLearnerNames.Length, space.Item2.Length); - Assert.True(space.Item2.All(l => retainedLearnerNames.Any(r => r == l.LearnerName))); - } + var env = new MLContext().AddStandardComponents(); // AutoInference uses ComponentCatalog to find all learners + SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); + + // Using the simple, uniform random sampling (with replacement) brain. + PipelineOptimizerBase autoMlBrain = new UniformRandomEngine(env); + + // Run initial experiment. + var amls = AutoInference.InferPipelines(env, autoMlBrain, pathData, "", out var _, + numTransformLevels, batchSize, metric, out var _, numOfSampleRows, + new IterationTerminator(numIterations), MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer); + + // Keep only logistic regression and FastTree. + amls.KeepSelectedLearners(retainedLearnerNames); + var space = amls.GetSearchSpace(); + + // Make sure only learners left are those retained. + Assert.Equal(retainedLearnerNames.Length, space.Item2.Length); + Assert.True(space.Item2.All(l => retainedLearnerNames.Any(r => r == l.LearnerName))); } [Fact] diff --git a/test/Microsoft.ML.Predictor.Tests/TestDatasetInference.cs b/test/Microsoft.ML.Predictor.Tests/TestDatasetInference.cs index 0b92eb7b30..5cf5a86ceb 100644 --- a/test/Microsoft.ML.Predictor.Tests/TestDatasetInference.cs +++ b/test/Microsoft.ML.Predictor.Tests/TestDatasetInference.cs @@ -25,7 +25,7 @@ public TestDatasetInference(ITestOutputHelper helper) { } - [Fact(Skip="Disabled")] + [Fact(Skip = "Disabled")] public void DatasetInferenceTest() { var datasets = new[] @@ -35,51 +35,49 @@ public void DatasetInferenceTest() GetDataPath(@"..\UnitTest\breast-cancer.txt"), }; - using (var env = new ConsoleEnvironment()) + IHostEnvironment env = new MLContext(); + var h = env.Register("InferDatasetFeatures", seed: 0, verbose: false); + + using (var ch = h.Start("InferDatasetFeatures")) { - var h = env.Register("InferDatasetFeatures", seed: 0, verbose: false); - using (var ch = h.Start("InferDatasetFeatures")) + for (int i = 0; i < datasets.Length; i++) { + var sample = TextFileSample.CreateFromFullFile(h, datasets[i]); + var splitResult = TextFileContents.TrySplitColumns(h, sample, TextFileContents.DefaultSeparators); + if (!splitResult.IsSuccess) + throw ch.ExceptDecode("Couldn't detect separator."); - for (int i = 0; i < datasets.Length; i++) - { - var sample = TextFileSample.CreateFromFullFile(h, datasets[i]); - var splitResult = TextFileContents.TrySplitColumns(h, sample, TextFileContents.DefaultSeparators); - if (!splitResult.IsSuccess) - throw ch.ExceptDecode("Couldn't detect separator."); - - var typeInfResult = ColumnTypeInference.InferTextFileColumnTypes(Env, sample, - new ColumnTypeInference.Arguments - { - Separator = splitResult.Separator, - AllowSparse = splitResult.AllowSparse, - AllowQuote = splitResult.AllowQuote, - ColumnCount = splitResult.ColumnCount - }); - - if (!typeInfResult.IsSuccess) - return; - - ColumnGroupingInference.GroupingColumn[] columns = null; - bool hasHeader = false; - columns = InferenceUtils.InferColumnPurposes(ch, h, sample, splitResult, out hasHeader); - Guid id = new Guid("60C77F4E-DB62-4351-8311-9B392A12968E"); - var commandArgs = new DatasetFeatureInference.Arguments(typeInfResult.Data, - columns.Select( - col => - new DatasetFeatureInference.Column(col.SuggestedName, col.Purpose, col.ItemKind, - col.ColumnRangeSelector)).ToArray(), sample.FullFileSize, sample.ApproximateRowCount, - false, id, true); - - string jsonString = DatasetFeatureInference.InferDatasetFeatures(env, commandArgs); - var outFile = string.Format("dataset-inference-result-{0:00}.txt", i); - string dataPath = GetOutputPath(@"..\Common\Inference", outFile); - using (var sw = new StreamWriter(File.Create(dataPath))) - sw.WriteLine(jsonString); - - CheckEquality(@"..\Common\Inference", outFile); - } + var typeInfResult = ColumnTypeInference.InferTextFileColumnTypes(Env, sample, + new ColumnTypeInference.Arguments + { + Separator = splitResult.Separator, + AllowSparse = splitResult.AllowSparse, + AllowQuote = splitResult.AllowQuote, + ColumnCount = splitResult.ColumnCount + }); + + if (!typeInfResult.IsSuccess) + return; + + ColumnGroupingInference.GroupingColumn[] columns = null; + bool hasHeader = false; + columns = InferenceUtils.InferColumnPurposes(ch, h, sample, splitResult, out hasHeader); + Guid id = new Guid("60C77F4E-DB62-4351-8311-9B392A12968E"); + var commandArgs = new DatasetFeatureInference.Arguments(typeInfResult.Data, + columns.Select( + col => + new DatasetFeatureInference.Column(col.SuggestedName, col.Purpose, col.ItemKind, + col.ColumnRangeSelector)).ToArray(), sample.FullFileSize, sample.ApproximateRowCount, + false, id, true); + + string jsonString = DatasetFeatureInference.InferDatasetFeatures(env, commandArgs); + var outFile = string.Format("dataset-inference-result-{0:00}.txt", i); + string dataPath = GetOutputPath(@"..\Common\Inference", outFile); + using (var sw = new StreamWriter(File.Create(dataPath))) + sw.WriteLine(jsonString); + + CheckEquality(@"..\Common\Inference", outFile); } } Done(); @@ -93,26 +91,24 @@ public void InferSchemaCommandTest() GetDataPath(Path.Combine("..", "data", "wikipedia-detox-250-line-data.tsv")) }; - using (var env = new ConsoleEnvironment()) + IHostEnvironment env = new MLContext(); + var h = env.Register("InferSchemaCommandTest", seed: 0, verbose: false); + using (var ch = h.Start("InferSchemaCommandTest")) { - var h = env.Register("InferSchemaCommandTest", seed: 0, verbose: false); - using (var ch = h.Start("InferSchemaCommandTest")) + for (int i = 0; i < datasets.Length; i++) { - for (int i = 0; i < datasets.Length; i++) + var outFile = string.Format("dataset-infer-schema-result-{0:00}.txt", i); + string dataPath = GetOutputPath(Path.Combine("..", "Common", "Inference"), outFile); + var args = new InferSchemaCommand.Arguments() { - var outFile = string.Format("dataset-infer-schema-result-{0:00}.txt", i); - string dataPath = GetOutputPath(Path.Combine("..", "Common", "Inference"), outFile); - var args = new InferSchemaCommand.Arguments() - { - DataFile = datasets[i], - OutputFile = dataPath, - }; + DataFile = datasets[i], + OutputFile = dataPath, + }; - var cmd = new InferSchemaCommand(Env, args); - cmd.Run(); + var cmd = new InferSchemaCommand(Env, args); + cmd.Run(); - CheckEquality(Path.Combine("..", "Common", "Inference"), outFile); - } + CheckEquality(Path.Combine("..", "Common", "Inference"), outFile); } } Done(); @@ -128,26 +124,24 @@ public void InferRecipesCommandTest() GetDataPath(Path.Combine("..", "data", "wikipedia-detox-250-line-data-schema.txt"))) }; - using (var env = new ConsoleEnvironment()) + IHostEnvironment env = new MLContext(); + var h = env.Register("InferRecipesCommandTest", seed: 0, verbose: false); + using (var ch = h.Start("InferRecipesCommandTest")) { - var h = env.Register("InferRecipesCommandTest", seed: 0, verbose: false); - using (var ch = h.Start("InferRecipesCommandTest")) + for (int i = 0; i < datasets.Length; i++) { - for (int i = 0; i < datasets.Length; i++) + var outFile = string.Format("dataset-infer-recipe-result-{0:00}.txt", i); + string dataPath = GetOutputPath(Path.Combine("..", "Common", "Inference"), outFile); + var args = new InferRecipesCommand.Arguments() { - var outFile = string.Format("dataset-infer-recipe-result-{0:00}.txt", i); - string dataPath = GetOutputPath(Path.Combine("..", "Common", "Inference"), outFile); - var args = new InferRecipesCommand.Arguments() - { - DataFile = datasets[i].Item1, - SchemaDefinitionFile = datasets[i].Item2, - RspOutputFile = dataPath - }; - var cmd = new InferRecipesCommand(Env, args); - cmd.Run(); - - CheckEquality(Path.Combine("..", "Common", "Inference"), outFile); - } + DataFile = datasets[i].Item1, + SchemaDefinitionFile = datasets[i].Item2, + RspOutputFile = dataPath + }; + var cmd = new InferRecipesCommand(Env, args); + cmd.Run(); + + CheckEquality(Path.Combine("..", "Common", "Inference"), outFile); } } Done(); diff --git a/test/Microsoft.ML.Predictor.Tests/TestPipelineSweeper.cs b/test/Microsoft.ML.Predictor.Tests/TestPipelineSweeper.cs index b72c9773d3..5e277daa05 100644 --- a/test/Microsoft.ML.Predictor.Tests/TestPipelineSweeper.cs +++ b/test/Microsoft.ML.Predictor.Tests/TestPipelineSweeper.cs @@ -123,42 +123,40 @@ public void PipelineSweeperNoTransforms() const int batchSize = 5; const int numIterations = 20; const int numTransformLevels = 2; - using (var env = new ConsoleEnvironment()) - { - SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); + var env = new MLContext(); + SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); - // Using the simple, uniform random sampling (with replacement) engine - PipelineOptimizerBase autoMlEngine = new UniformRandomEngine(Env); + // Using the simple, uniform random sampling (with replacement) engine + PipelineOptimizerBase autoMlEngine = new UniformRandomEngine(Env); - // Create search object - var amls = new AutoInference.AutoMlMlState(Env, metric, autoMlEngine, new IterationTerminator(numIterations), - MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer, datasetTrain, datasetTest); + // Create search object + var amls = new AutoInference.AutoMlMlState(Env, metric, autoMlEngine, new IterationTerminator(numIterations), + MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer, datasetTrain, datasetTest); - // Infer search space - amls.InferSearchSpace(numTransformLevels); + // Infer search space + amls.InferSearchSpace(numTransformLevels); - // Create macro object - var pipelineSweepInput = new Microsoft.ML.Legacy.Models.PipelineSweeper() - { - BatchSize = batchSize, - }; - - var exp = new Experiment(Env); - var output = exp.Add(pipelineSweepInput); - exp.Compile(); - exp.SetInput(pipelineSweepInput.TrainingData, datasetTrain); - exp.SetInput(pipelineSweepInput.TestingData, datasetTest); - exp.SetInput(pipelineSweepInput.State, amls); - exp.SetInput(pipelineSweepInput.CandidateOutputs, new IDataView[0]); - exp.Run(); - - // Make sure you get back an AutoMlState, and that it ran for correct number of iterations - // with at least minimal performance values (i.e., best should have AUC better than 0.1 on this dataset). - AutoInference.AutoMlMlState amlsOut = (AutoInference.AutoMlMlState)exp.GetOutput(output.State); - Assert.NotNull(amlsOut); - Assert.Equal(amlsOut.GetAllEvaluatedPipelines().Length, numIterations); - Assert.True(amlsOut.GetBestPipeline().PerformanceSummary.MetricValue > 0.8); - } + // Create macro object + var pipelineSweepInput = new Microsoft.ML.Legacy.Models.PipelineSweeper() + { + BatchSize = batchSize, + }; + + var exp = new Experiment(Env); + var output = exp.Add(pipelineSweepInput); + exp.Compile(); + exp.SetInput(pipelineSweepInput.TrainingData, datasetTrain); + exp.SetInput(pipelineSweepInput.TestingData, datasetTest); + exp.SetInput(pipelineSweepInput.State, amls); + exp.SetInput(pipelineSweepInput.CandidateOutputs, new IDataView[0]); + exp.Run(); + + // Make sure you get back an AutoMlState, and that it ran for correct number of iterations + // with at least minimal performance values (i.e., best should have AUC better than 0.1 on this dataset). + AutoInference.AutoMlMlState amlsOut = (AutoInference.AutoMlMlState)exp.GetOutput(output.State); + Assert.NotNull(amlsOut); + Assert.Equal(amlsOut.GetAllEvaluatedPipelines().Length, numIterations); + Assert.True(amlsOut.GetBestPipeline().PerformanceSummary.MetricValue > 0.8); } [Fact] diff --git a/test/Microsoft.ML.Predictor.Tests/TestTransposer.cs b/test/Microsoft.ML.Predictor.Tests/TestTransposer.cs index 9517e82a55..a9f969a7f1 100644 --- a/test/Microsoft.ML.Predictor.Tests/TestTransposer.cs +++ b/test/Microsoft.ML.Predictor.Tests/TestTransposer.cs @@ -143,7 +143,7 @@ private static T[] GenerateHelper(int rowCount, Double density, Random rgen, return values; } - [Fact(Skip = "Need CoreTLC specific baseline update")] + [Fact] [TestCategory("Transposer")] public void TransposerTest() { diff --git a/test/Microsoft.ML.StaticPipelineTesting/ImageAnalyticsTests.cs b/test/Microsoft.ML.StaticPipelineTesting/ImageAnalyticsTests.cs index 3b28fc1cfa..bdb9677495 100644 --- a/test/Microsoft.ML.StaticPipelineTesting/ImageAnalyticsTests.cs +++ b/test/Microsoft.ML.StaticPipelineTesting/ImageAnalyticsTests.cs @@ -2,7 +2,6 @@ // 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; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.ImageAnalytics; using Xunit; @@ -20,7 +19,7 @@ public ImageAnalyticsTests(ITestOutputHelper output) [Fact] public void SimpleImageSmokeTest() { - var env = new ConsoleEnvironment(0, verbose: true); + var env = new MLContext(0); var reader = TextLoader.CreateReader(env, ctx => ctx.LoadText(0).LoadAsImage().AsGrayscale().Resize(10, 8).ExtractPixels()); diff --git a/test/Microsoft.ML.StaticPipelineTesting/Microsoft.ML.StaticPipelineTesting.csproj b/test/Microsoft.ML.StaticPipelineTesting/Microsoft.ML.StaticPipelineTesting.csproj index 532cff72cc..ae02e94492 100644 --- a/test/Microsoft.ML.StaticPipelineTesting/Microsoft.ML.StaticPipelineTesting.csproj +++ b/test/Microsoft.ML.StaticPipelineTesting/Microsoft.ML.StaticPipelineTesting.csproj @@ -4,6 +4,7 @@ + diff --git a/test/Microsoft.ML.StaticPipelineTesting/StaticPipeTests.cs b/test/Microsoft.ML.StaticPipelineTesting/StaticPipeTests.cs index de118ca2f5..4de9cfc660 100644 --- a/test/Microsoft.ML.StaticPipelineTesting/StaticPipeTests.cs +++ b/test/Microsoft.ML.StaticPipelineTesting/StaticPipeTests.cs @@ -22,6 +22,7 @@ using System.Text; using Xunit; using Xunit.Abstractions; +using static Microsoft.ML.Transforms.Text.LatentDirichletAllocationTransformer; namespace Microsoft.ML.StaticPipelineTesting { @@ -58,7 +59,7 @@ private void CheckSchemaHasColumn(ISchema schema, string name, out int idx) [Fact] public void SimpleTextLoaderCopyColumnsTest() { - var env = new ConsoleEnvironment(0, verbose: true); + var env = new MLContext(0); const string data = "0 hello 3.14159 -0 2\n" + "1 1 2 4 15"; @@ -159,7 +160,7 @@ private static Obnoxious3 MakeObnoxious3(Scalar hi, Obnoxious1 my, T [Fact] public void SimpleTextLoaderObnoxiousTypeTest() { - var env = new ConsoleEnvironment(0, verbose: true); + var env = new MLContext(0); const string data = "0 hello 3.14159 -0 2\n" + "1 1 2 4 15"; @@ -206,7 +207,7 @@ private static KeyValuePair P(string name, ColumnType type) [Fact] public void AssertStaticSimple() { - var env = new ConsoleEnvironment(0, verbose: true); + var env = new MLContext(0); var schema = SimpleSchemaUtils.Create(env, P("hello", TextType.Instance), P("my", new VectorType(NumberType.I8, 5)), @@ -230,7 +231,7 @@ public void AssertStaticSimple() [Fact] public void AssertStaticSimpleFailure() { - var env = new ConsoleEnvironment(0, verbose: true); + var env = new MLContext(0); var schema = SimpleSchemaUtils.Create(env, P("hello", TextType.Instance), P("my", new VectorType(NumberType.I8, 5)), @@ -262,7 +263,7 @@ private sealed class MetaCounted : ICounted [Fact] public void AssertStaticKeys() { - var env = new ConsoleEnvironment(0, verbose: true); + var env = new MLContext(0); var counted = new MetaCounted(); // We'll test a few things here. First, the case where the key-value metadata is text. @@ -369,7 +370,7 @@ public void AssertStaticKeys() [Fact] public void Normalizer() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); var dataPath = GetDataPath("generated_regression_dataset.csv"); var dataSource = new MultiFileSource(dataPath); @@ -394,7 +395,7 @@ public void Normalizer() [Fact] public void NormalizerWithOnFit() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); var dataPath = GetDataPath("generated_regression_dataset.csv"); var dataSource = new MultiFileSource(dataPath); @@ -422,7 +423,7 @@ public void NormalizerWithOnFit() // Just for fun, let's also write out some of the lines of the data to the console. using (var stream = new MemoryStream()) { - IDataView v = SelectColumnsTransform.CreateKeep(env, tdata.AsDynamic, "r", "ncdf", "n", "b"); + IDataView v = ColumnSelectingTransformer.CreateKeep(env, tdata.AsDynamic, new[] { "r", "ncdf", "n", "b" }); v = TakeFilter.Create(env, v, 10); var saver = new TextSaver(env, new TextSaver.Arguments() { @@ -438,7 +439,7 @@ public void NormalizerWithOnFit() [Fact] public void ToKey() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); var dataPath = GetDataPath("iris.data"); var reader = TextLoader.CreateReader(env, c => (label: c.LoadText(4), values: c.LoadFloat(0, 3)), @@ -476,7 +477,7 @@ public void ToKey() [Fact] public void ConcatWith() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); var dataPath = GetDataPath("iris.data"); var reader = TextLoader.CreateReader(env, c => (label: c.LoadText(4), values: c.LoadFloat(0, 3), value: c.LoadFloat(2)), @@ -514,7 +515,7 @@ public void ConcatWith() [Fact] public void Tokenize() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); var dataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var reader = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -543,7 +544,7 @@ public void Tokenize() [Fact] public void NormalizeTextAndRemoveStopWords() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); var dataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var reader = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -572,7 +573,7 @@ public void NormalizeTextAndRemoveStopWords() [Fact] public void ConvertToWordBag() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); var dataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var reader = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -601,7 +602,7 @@ public void ConvertToWordBag() [Fact] public void Ngrams() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); var dataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var reader = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -631,7 +632,7 @@ public void Ngrams() [Fact] public void LpGcNormAndWhitening() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); var dataPath = GetDataPath("generated_regression_dataset.csv"); var dataSource = new MultiFileSource(dataPath); @@ -669,7 +670,7 @@ public void LpGcNormAndWhitening() [Fact] public void LdaTopicModel() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); var dataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var reader = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -677,26 +678,27 @@ public void LdaTopicModel() var dataSource = new MultiFileSource(dataPath); var data = reader.Read(dataSource); + // This will be populated once we call fit. + LdaSummary ldaSummary; + var est = data.MakeNewEstimator() .Append(r => ( r.label, - topics: r.text.ToBagofWords().ToLdaTopicVector(numTopic: 10, advancedSettings: s => - { - s.AlphaSum = 10; - }))); + topics: r.text.ToBagofWords().ToLdaTopicVector(numTopic: 3, numSummaryTermPerTopic:5, alphaSum: 10, onFit: m => ldaSummary = m.LdaTopicSummary))); - var tdata = est.Fit(data).Transform(data); - var schema = tdata.AsDynamic.Schema; + var transformer = est.Fit(data); + var tdata = transformer.Transform(data); + var schema = tdata.AsDynamic.Schema; Assert.True(schema.TryGetColumnIndex("topics", out int topicsCol)); var type = schema.GetColumnType(topicsCol); Assert.True(type is VectorType vecType && vecType.Size > 0 && vecType.ItemType is NumberType); -} + } - [Fact] + [Fact(Skip = "FeatureSeclection transform cannot be trained on empty data, schema propagation fails")] public void FeatureSelection() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); var dataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var reader = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -725,7 +727,7 @@ public void FeatureSelection() [Fact] public void TrainTestSplit() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); var dataPath = GetDataPath(TestDatasets.iris.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -755,7 +757,7 @@ public void TrainTestSplit() [Fact] public void PrincipalComponentAnalysis() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); var dataPath = GetDataPath("generated_regression_dataset.csv"); var dataSource = new MultiFileSource(dataPath); @@ -778,10 +780,10 @@ public void PrincipalComponentAnalysis() [Fact] public void NAIndicatorStatic() { - var Env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); string dataPath = GetDataPath("breast-cancer.txt"); - var reader = TextLoader.CreateReader(Env, ctx => ( + var reader = TextLoader.CreateReader(env, ctx => ( ScalarFloat: ctx.LoadFloat(1), ScalarDouble: ctx.LoadDouble(1), VectorFloat: ctx.LoadFloat(1, 4), @@ -798,12 +800,12 @@ public void NAIndicatorStatic() D: row.VectorDoulbe.IsMissingValue() )); - IDataView newData = TakeFilter.Create(Env, est.Fit(data).Transform(data).AsDynamic, 4); + IDataView newData = TakeFilter.Create(env, est.Fit(data).Transform(data).AsDynamic, 4); Assert.NotNull(newData); - bool[] ScalarFloat = newData.GetColumn(Env, "A").ToArray(); - bool[] ScalarDouble = newData.GetColumn(Env, "B").ToArray(); - bool[][] VectorFloat = newData.GetColumn(Env, "C").ToArray(); - bool[][] VectorDoulbe = newData.GetColumn(Env, "D").ToArray(); + bool[] ScalarFloat = newData.GetColumn(env, "A").ToArray(); + bool[] ScalarDouble = newData.GetColumn(env, "B").ToArray(); + bool[][] VectorFloat = newData.GetColumn(env, "C").ToArray(); + bool[][] VectorDoulbe = newData.GetColumn(env, "D").ToArray(); Assert.NotNull(ScalarFloat); Assert.NotNull(ScalarDouble); @@ -822,7 +824,7 @@ public void NAIndicatorStatic() [Fact] public void TextNormalizeStatic() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(0); var dataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var reader = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -862,7 +864,7 @@ public void TextNormalizeStatic() [Fact] public void TestPcaStatic() { - var env = new ConsoleEnvironment(seed: 1); + var env = new MLContext(0); var dataSource = GetDataPath("generated_regression_dataset.csv"); var reader = TextLoader.CreateReader(env, c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), diff --git a/test/Microsoft.ML.StaticPipelineTesting/Training.cs b/test/Microsoft.ML.StaticPipelineTesting/Training.cs index c689cba935..b59c2118b5 100644 --- a/test/Microsoft.ML.StaticPipelineTesting/Training.cs +++ b/test/Microsoft.ML.StaticPipelineTesting/Training.cs @@ -32,7 +32,7 @@ public Training(ITestOutputHelper output) : base(output) [Fact] public void SdcaRegression() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0, conc: 1); var dataPath = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -45,7 +45,8 @@ public void SdcaRegression() LinearRegressionPredictor pred = null; var est = reader.MakeNewEstimator() - .Append(r => (r.label, score: ctx.Trainers.Sdca(r.label, r.features, maxIterations: 2, onFit: p => pred = p))); + .Append(r => (r.label, score: ctx.Trainers.Sdca(r.label, r.features, maxIterations: 2, + onFit: p => pred = p, advancedSettings: s => s.NumThreads = 1))); var pipe = reader.Append(est); @@ -74,7 +75,7 @@ public void SdcaRegression() [Fact] public void SdcaRegressionNameCollision() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new RegressionContext(env); @@ -85,7 +86,7 @@ public void SdcaRegressionNameCollision() separator: ';', hasHeader: true); var est = reader.MakeNewEstimator() - .Append(r => (r.label, r.Score, score: ctx.Trainers.Sdca(r.label, r.features, maxIterations: 2))); + .Append(r => (r.label, r.Score, score: ctx.Trainers.Sdca(r.label, r.features, maxIterations: 2, advancedSettings: s => s.NumThreads = 1))); var pipe = reader.Append(est); @@ -104,7 +105,7 @@ public void SdcaRegressionNameCollision() [Fact] public void SdcaBinaryClassification() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -118,7 +119,8 @@ public void SdcaBinaryClassification() var est = reader.MakeNewEstimator() .Append(r => (r.label, preds: ctx.Trainers.Sdca(r.label, r.features, maxIterations: 2, - onFit: (p, c) => { pred = p; cali = c; }))); + onFit: (p, c) => { pred = p; cali = c; }, + advancedSettings: s => s.NumThreads = 1))); var pipe = reader.Append(est); @@ -149,7 +151,7 @@ public void SdcaBinaryClassification() [Fact] public void SdcaBinaryClassificationNoCalibration() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -165,7 +167,8 @@ public void SdcaBinaryClassificationNoCalibration() var est = reader.MakeNewEstimator() .Append(r => (r.label, preds: ctx.Trainers.Sdca(r.label, r.features, maxIterations: 2, - loss: loss, onFit: p => pred = p))); + loss: loss, onFit: p => pred = p, + advancedSettings: s => s.NumThreads = 1))); var pipe = reader.Append(est); @@ -192,7 +195,7 @@ public void SdcaBinaryClassificationNoCalibration() [Fact] public void AveragePerceptronNoCalibration() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -228,7 +231,7 @@ public void AveragePerceptronNoCalibration() [Fact] public void FfmBinaryClassification() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -260,7 +263,7 @@ public void FfmBinaryClassification() [Fact] public void SdcaMulticlass() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.iris.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -310,7 +313,7 @@ public void SdcaMulticlass() [Fact] public void CrossValidate() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.iris.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -334,7 +337,7 @@ public void CrossValidate() [Fact] public void FastTreeBinaryClassification() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -373,7 +376,7 @@ public void FastTreeBinaryClassification() [Fact] public void FastTreeRegression() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -415,7 +418,7 @@ public void FastTreeRegression() [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // LightGBM is 64-bit only public void LightGbmBinaryClassification() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -455,7 +458,7 @@ public void LightGbmBinaryClassification() [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // LightGBM is 64-bit only public void LightGbmRegression() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -497,7 +500,7 @@ public void LightGbmRegression() [Fact] public void PoissonRegression() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -513,7 +516,8 @@ public void PoissonRegression() .Append(r => (r.label, score: ctx.Trainers.PoissonRegression(r.label, r.features, l1Weight: 2, enoforceNoNegativity: true, - onFit: (p) => { pred = p; }))); + onFit: (p) => { pred = p; }, + advancedSettings: s => s.NumThreads = 1))); var pipe = reader.Append(est); @@ -539,7 +543,7 @@ public void PoissonRegression() [Fact] public void LogisticRegressionBinaryClassification() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -552,7 +556,8 @@ public void LogisticRegressionBinaryClassification() var est = reader.MakeNewEstimator() .Append(r => (r.label, preds: ctx.Trainers.LogisticRegressionBinaryClassifier(r.label, r.features, l1Weight: 10, - onFit: (p) => { pred = p; }))); + onFit: (p) => { pred = p; }, + advancedSettings: s => s.NumThreads = 1))); var pipe = reader.Append(est); @@ -577,7 +582,7 @@ public void LogisticRegressionBinaryClassification() [Fact] public void MulticlassLogisticRegression() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.iris.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -592,7 +597,8 @@ public void MulticlassLogisticRegression() .Append(r => (label: r.label.ToKey(), r.features)) .Append(r => (r.label, preds: ctx.Trainers.MultiClassLogisticRegression( r.label, - r.features, onFit: p => pred = p))); + r.features, onFit: p => pred = p, + advancedSettings: s => s.NumThreads = 1))); var pipe = reader.Append(est); @@ -620,7 +626,7 @@ public void MulticlassLogisticRegression() [Fact] public void OnlineGradientDescent() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -663,11 +669,10 @@ public void OnlineGradientDescent() [Fact] public void KMeans() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0, conc: 1); var dataPath = GetDataPath(TestDatasets.iris.trainFilename); var dataSource = new MultiFileSource(dataPath); - var ctx = new ClusteringContext(env); var reader = TextLoader.CreateReader(env, c => (label: c.LoadText(0), features: c.LoadFloat(1, 4))); @@ -675,7 +680,7 @@ public void KMeans() var est = reader.MakeNewEstimator() .Append(r => (label: r.label.ToKey(), r.features)) - .Append(r => (r.label, r.features, preds: ctx.Trainers.KMeans(r.features, clustersCount: 3, onFit: p => pred = p))); + .Append(r => (r.label, r.features, preds: env.Clustering.Trainers.KMeans(r.features, clustersCount: 3, onFit: p => pred = p, advancedSettings: s => s.NumThreads = 1))); var pipe = reader.Append(est); @@ -691,23 +696,23 @@ public void KMeans() var data = model.Read(dataSource); - var metrics = ctx.Evaluate(data, r => r.preds.score, r => r.label, r => r.features); + var metrics = env.Clustering.Evaluate(data, r => r.preds.score, r => r.label, r => r.features); Assert.NotNull(metrics); Assert.InRange(metrics.AvgMinScore, 0.5262, 0.5264); Assert.InRange(metrics.Nmi, 0.73, 0.77); Assert.InRange(metrics.Dbi, 0.662, 0.667); - metrics = ctx.Evaluate(data, r => r.preds.score, label: r => r.label); + metrics = env.Clustering.Evaluate(data, r => r.preds.score, label: r => r.label); Assert.NotNull(metrics); Assert.InRange(metrics.AvgMinScore, 0.5262, 0.5264); Assert.True(metrics.Dbi == 0.0); - metrics = ctx.Evaluate(data, r => r.preds.score, features: r => r.features); + metrics = env.Clustering.Evaluate(data, r => r.preds.score, features: r => r.features); Assert.True(double.IsNaN(metrics.Nmi)); - metrics = ctx.Evaluate(data, r => r.preds.score); + metrics = env.Clustering.Evaluate(data, r => r.preds.score); Assert.NotNull(metrics); Assert.InRange(metrics.AvgMinScore, 0.5262, 0.5264); Assert.True(double.IsNaN(metrics.Nmi)); @@ -718,7 +723,7 @@ public void KMeans() [Fact] public void FastTreeRanking() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.adultRanking.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -759,7 +764,7 @@ public void FastTreeRanking() [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // LightGBM is 64-bit only public void LightGBMRanking() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.adultRanking.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -800,7 +805,7 @@ public void LightGBMRanking() [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // LightGBM is 64-bit only public void MultiClassLightGBM() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.iris.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -838,7 +843,7 @@ public void MultiClassLightGBM() [Fact] public void MultiClassNaiveBayesTrainer() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.iris.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -883,7 +888,7 @@ public void MultiClassNaiveBayesTrainer() [Fact] public void HogwildSGDBinaryClassification() { - var env = new ConsoleEnvironment(seed: 0); + var env = new MLContext(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -896,7 +901,8 @@ public void HogwildSGDBinaryClassification() var est = reader.MakeNewEstimator() .Append(r => (r.label, preds: ctx.Trainers.StochasticGradientDescentClassificationTrainer(r.label, r.features, l2Weight: 0, - onFit: (p) => { pred = p; }))); + onFit: (p) => { pred = p; }, + advancedSettings: s => s.NumThreads = 1))); var pipe = reader.Append(est); diff --git a/test/Microsoft.ML.Sweeper.Tests/SweeperTest.cs b/test/Microsoft.ML.Sweeper.Tests/SweeperTest.cs index 2f19a5c4f3..1cd0065703 100644 --- a/test/Microsoft.ML.Sweeper.Tests/SweeperTest.cs +++ b/test/Microsoft.ML.Sweeper.Tests/SweeperTest.cs @@ -20,19 +20,16 @@ public void UniformRandomSweeperReturnsDistinctValuesWhenProposeSweep() { DiscreteValueGenerator valueGenerator = CreateDiscreteValueGenerator(); - using (var writer = new StreamWriter(new MemoryStream())) - using (var env = new ConsoleEnvironment(42, outWriter: writer, errWriter: writer)) - { - var sweeper = new UniformRandomSweeper(env, + var env = new MLContext(42); + var sweeper = new UniformRandomSweeper(env, new SweeperBase.ArgumentsBase(), new[] { valueGenerator }); - var results = sweeper.ProposeSweeps(3); - Assert.NotNull(results); + var results = sweeper.ProposeSweeps(3); + Assert.NotNull(results); - int length = results.Length; - Assert.Equal(2, length); - } + int length = results.Length; + Assert.Equal(2, length); } [Fact] @@ -40,19 +37,16 @@ public void RandomGridSweeperReturnsDistinctValuesWhenProposeSweep() { DiscreteValueGenerator valueGenerator = CreateDiscreteValueGenerator(); - using (var writer = new StreamWriter(new MemoryStream())) - using (var env = new ConsoleEnvironment(42, outWriter: writer, errWriter: writer)) - { - var sweeper = new RandomGridSweeper(env, - new RandomGridSweeper.Arguments(), - new[] { valueGenerator }); + var env = new MLContext(42); + var sweeper = new RandomGridSweeper(env, + new RandomGridSweeper.Arguments(), + new[] { valueGenerator }); - var results = sweeper.ProposeSweeps(3); - Assert.NotNull(results); + var results = sweeper.ProposeSweeps(3); + Assert.NotNull(results); - int length = results.Length; - Assert.Equal(2, length); - } + int length = results.Length; + Assert.Equal(2, length); } private static DiscreteValueGenerator CreateDiscreteValueGenerator() diff --git a/test/Microsoft.ML.Sweeper.Tests/TestSweeper.cs b/test/Microsoft.ML.Sweeper.Tests/TestSweeper.cs index 9aa18dc30a..0718a7edde 100644 --- a/test/Microsoft.ML.Sweeper.Tests/TestSweeper.cs +++ b/test/Microsoft.ML.Sweeper.Tests/TestSweeper.cs @@ -94,39 +94,37 @@ public void TestDiscreteValueSweep(double normalizedValue, string expected) [Fact] public void TestRandomSweeper() { - using (var env = new ConsoleEnvironment(42)) + var env = new MLContext(42); + var args = new SweeperBase.ArgumentsBase() { - var args = new SweeperBase.ArgumentsBase() - { - SweptParameters = new[] { + SweptParameters = new[] { ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "foo", Min = 10, Max = 20 })), ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 100, Max = 200 })) } - }; + }; - var sweeper = new UniformRandomSweeper(env, args); - var initialList = sweeper.ProposeSweeps(5, new List()); - Assert.Equal(5, initialList.Length); - foreach (var parameterSet in initialList) + var sweeper = new UniformRandomSweeper(env, args); + var initialList = sweeper.ProposeSweeps(5, new List()); + Assert.Equal(5, initialList.Length); + foreach (var parameterSet in initialList) + { + foreach (var parameterValue in parameterSet) { - foreach (var parameterValue in parameterSet) + if (parameterValue.Name == "foo") { - if (parameterValue.Name == "foo") - { - var val = long.Parse(parameterValue.ValueText); - Assert.InRange(val, 10, 20); - } - else if (parameterValue.Name == "bar") - { - var val = long.Parse(parameterValue.ValueText); - Assert.InRange(val, 100, 200); - } - else - { - Assert.True(false, "Wrong parameter"); - } + var val = long.Parse(parameterValue.ValueText); + Assert.InRange(val, 10, 20); + } + else if (parameterValue.Name == "bar") + { + var val = long.Parse(parameterValue.ValueText); + Assert.InRange(val, 100, 200); + } + else + { + Assert.True(false, "Wrong parameter"); } } } @@ -136,282 +134,273 @@ public void TestRandomSweeper() public void TestSimpleSweeperAsync() { var random = new Random(42); - using (var env = new ConsoleEnvironment(42)) + var env = new MLContext(42); + const int sweeps = 100; + var sweeper = new SimpleAsyncSweeper(env, new SweeperBase.ArgumentsBase { - int sweeps = 100; - var sweeper = new SimpleAsyncSweeper(env, new SweeperBase.ArgumentsBase - { - SweptParameters = new IComponentFactory[] { + SweptParameters = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( environ => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5 })), ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 1000, LogBase = true })) } - }); + }); - var paramSets = new List(); - for (int i = 0; i < sweeps; i++) - { - var task = sweeper.Propose(); - Assert.True(task.IsCompleted); - paramSets.Add(task.Result.ParameterSet); - var result = new RunResult(task.Result.ParameterSet, random.NextDouble(), true); - sweeper.Update(task.Result.Id, result); - } - Assert.Equal(sweeps, paramSets.Count); - CheckAsyncSweeperResult(paramSets); + var paramSets = new List(); + for (int i = 0; i < sweeps; i++) + { + var task = sweeper.Propose(); + Assert.True(task.IsCompleted); + paramSets.Add(task.Result.ParameterSet); + var result = new RunResult(task.Result.ParameterSet, random.NextDouble(), true); + sweeper.Update(task.Result.Id, result); + } + Assert.Equal(sweeps, paramSets.Count); + CheckAsyncSweeperResult(paramSets); - // Test consumption without ever calling Update. - var gridArgs = new RandomGridSweeper.Arguments(); - gridArgs.SweptParameters = new IComponentFactory[] { + // Test consumption without ever calling Update. + var gridArgs = new RandomGridSweeper.Arguments(); + gridArgs.SweptParameters = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( environ => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 100, LogBase = true })) }; - var gridSweeper = new SimpleAsyncSweeper(env, gridArgs); - paramSets.Clear(); - for (int i = 0; i < sweeps; i++) - { - var task = gridSweeper.Propose(); - Assert.True(task.IsCompleted); - paramSets.Add(task.Result.ParameterSet); - } - Assert.Equal(sweeps, paramSets.Count); - CheckAsyncSweeperResult(paramSets); + var gridSweeper = new SimpleAsyncSweeper(env, gridArgs); + paramSets.Clear(); + for (int i = 0; i < sweeps; i++) + { + var task = gridSweeper.Propose(); + Assert.True(task.IsCompleted); + paramSets.Add(task.Result.ParameterSet); } + Assert.Equal(sweeps, paramSets.Count); + CheckAsyncSweeperResult(paramSets); } [Fact] public void TestDeterministicSweeperAsyncCancellation() { var random = new Random(42); - using (var env = new ConsoleEnvironment(42)) - { - var args = new DeterministicSweeperAsync.Arguments(); - args.BatchSize = 5; - args.Relaxation = 1; - - args.Sweeper = ComponentFactoryUtils.CreateFromFunction( - environ => new KdoSweeper(environ, - new KdoSweeper.Arguments() - { - SweptParameters = new IComponentFactory[] { + var env = new MLContext(42); + var args = new DeterministicSweeperAsync.Arguments(); + args.BatchSize = 5; + args.Relaxation = 1; + + args.Sweeper = ComponentFactoryUtils.CreateFromFunction( + environ => new KdoSweeper(environ, + new KdoSweeper.Arguments() + { + SweptParameters = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( t => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( t => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 1000, LogBase = true })) - } - })); + } + })); - var sweeper = new DeterministicSweeperAsync(env, args); + var sweeper = new DeterministicSweeperAsync(env, args); - int sweeps = 20; - var tasks = new List>(); - int numCompleted = 0; - for (int i = 0; i < sweeps; i++) - { - var task = sweeper.Propose(); - if (i < args.BatchSize - args.Relaxation) - { - Assert.True(task.IsCompleted); - sweeper.Update(task.Result.Id, new RunResult(task.Result.ParameterSet, random.NextDouble(), true)); - numCompleted++; - } - else - tasks.Add(task); - } - // Cancel after the first barrier and check if the number of registered actions - // is indeed 2 * batchSize. - sweeper.Cancel(); - Task.WaitAll(tasks.ToArray()); - foreach (var task in tasks) + int sweeps = 20; + var tasks = new List>(); + int numCompleted = 0; + for (int i = 0; i < sweeps; i++) + { + var task = sweeper.Propose(); + if (i < args.BatchSize - args.Relaxation) { - if (task.Result != null) - numCompleted++; + Assert.True(task.IsCompleted); + sweeper.Update(task.Result.Id, new RunResult(task.Result.ParameterSet, random.NextDouble(), true)); + numCompleted++; } - Assert.Equal(args.BatchSize + args.BatchSize, numCompleted); + else + tasks.Add(task); } + // Cancel after the first barrier and check if the number of registered actions + // is indeed 2 * batchSize. + sweeper.Cancel(); + Task.WaitAll(tasks.ToArray()); + foreach (var task in tasks) + { + if (task.Result != null) + numCompleted++; + } + Assert.Equal(args.BatchSize + args.BatchSize, numCompleted); } [Fact] public void TestDeterministicSweeperAsync() { var random = new Random(42); - using (var env = new ConsoleEnvironment(42)) - { - var args = new DeterministicSweeperAsync.Arguments(); - args.BatchSize = 5; - args.Relaxation = args.BatchSize - 1; - - args.Sweeper = ComponentFactoryUtils.CreateFromFunction( - environ => new SmacSweeper(environ, - new SmacSweeper.Arguments() - { - SweptParameters = new IComponentFactory[] { + var env = new MLContext(42); + var args = new DeterministicSweeperAsync.Arguments(); + args.BatchSize = 5; + args.Relaxation = args.BatchSize - 1; + + args.Sweeper = ComponentFactoryUtils.CreateFromFunction( + environ => new SmacSweeper(environ, + new SmacSweeper.Arguments() + { + SweptParameters = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( t => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( t => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 1000, LogBase = true })) - } - })); - - var sweeper = new DeterministicSweeperAsync(env, args); + } + })); - // Test single-threaded consumption. - int sweeps = 10; - var paramSets = new List(); - for (int i = 0; i < sweeps; i++) - { - var task = sweeper.Propose(); - Assert.True(task.IsCompleted); - paramSets.Add(task.Result.ParameterSet); - var result = new RunResult(task.Result.ParameterSet, random.NextDouble(), true); - sweeper.Update(task.Result.Id, result); - } - Assert.Equal(sweeps, paramSets.Count); - CheckAsyncSweeperResult(paramSets); - - // Create two batches and test if the 2nd batch is executed after the synchronization barrier is reached. - object mlock = new object(); - var tasks = new Task[sweeps]; - args.Relaxation = args.Relaxation - 1; - sweeper = new DeterministicSweeperAsync(env, args); - paramSets.Clear(); - var results = new List>(); - for (int i = 0; i < args.BatchSize; i++) - { - var task = sweeper.Propose(); - Assert.True(task.IsCompleted); - tasks[i] = task; - if (task.Result == null) - continue; - results.Add(new KeyValuePair(task.Result.Id, new RunResult(task.Result.ParameterSet, 0.42, true))); - } - // Register consumers for the 2nd batch. Those consumers will await until at least one run - // in the previous batch has been posted to the sweeper. - for (int i = args.BatchSize; i < 2 * args.BatchSize; i++) - { - var task = sweeper.Propose(); - Assert.False(task.IsCompleted); - tasks[i] = task; - } - // Call update to unblock the 2nd batch. - foreach (var run in results) - sweeper.Update(run.Key, run.Value); + var sweeper = new DeterministicSweeperAsync(env, args); - Task.WaitAll(tasks); - tasks.All(t => t.IsCompleted); + // Test single-threaded consumption. + int sweeps = 10; + var paramSets = new List(); + for (int i = 0; i < sweeps; i++) + { + var task = sweeper.Propose(); + Assert.True(task.IsCompleted); + paramSets.Add(task.Result.ParameterSet); + var result = new RunResult(task.Result.ParameterSet, random.NextDouble(), true); + sweeper.Update(task.Result.Id, result); + } + Assert.Equal(sweeps, paramSets.Count); + CheckAsyncSweeperResult(paramSets); + + // Create two batches and test if the 2nd batch is executed after the synchronization barrier is reached. + object mlock = new object(); + var tasks = new Task[sweeps]; + args.Relaxation = args.Relaxation - 1; + sweeper = new DeterministicSweeperAsync(env, args); + paramSets.Clear(); + var results = new List>(); + for (int i = 0; i < args.BatchSize; i++) + { + var task = sweeper.Propose(); + Assert.True(task.IsCompleted); + tasks[i] = task; + if (task.Result == null) + continue; + results.Add(new KeyValuePair(task.Result.Id, new RunResult(task.Result.ParameterSet, 0.42, true))); + } + // Register consumers for the 2nd batch. Those consumers will await until at least one run + // in the previous batch has been posted to the sweeper. + for (int i = args.BatchSize; i < 2 * args.BatchSize; i++) + { + var task = sweeper.Propose(); + Assert.False(task.IsCompleted); + tasks[i] = task; } + // Call update to unblock the 2nd batch. + foreach (var run in results) + sweeper.Update(run.Key, run.Value); + + Task.WaitAll(tasks); + tasks.All(t => t.IsCompleted); } [Fact] public void TestDeterministicSweeperAsyncParallel() { var random = new Random(42); - using (var env = new ConsoleEnvironment(42)) - { - int batchSize = 5; - int sweeps = 20; - var paramSets = new List(); - var args = new DeterministicSweeperAsync.Arguments(); - args.BatchSize = batchSize; - args.Relaxation = batchSize - 2; - - args.Sweeper = ComponentFactoryUtils.CreateFromFunction( - environ => new SmacSweeper(environ, - new SmacSweeper.Arguments() - { - SweptParameters = new IComponentFactory[] { + var env = new MLContext(42); + const int batchSize = 5; + const int sweeps = 20; + var paramSets = new List(); + var args = new DeterministicSweeperAsync.Arguments(); + args.BatchSize = batchSize; + args.Relaxation = batchSize - 2; + + args.Sweeper = ComponentFactoryUtils.CreateFromFunction( + environ => new SmacSweeper(environ, + new SmacSweeper.Arguments() + { + SweptParameters = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( t => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( t => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 1000, LogBase = true })) - } - })); + } + })); - var sweeper = new DeterministicSweeperAsync(env, args); + var sweeper = new DeterministicSweeperAsync(env, args); - var mlock = new object(); - var options = new ParallelOptions(); - options.MaxDegreeOfParallelism = 4; + var mlock = new object(); + var options = new ParallelOptions(); + options.MaxDegreeOfParallelism = 4; - // Sleep randomly to simulate doing work. - int[] sleeps = new int[sweeps]; - for (int i = 0; i < sleeps.Length; i++) - sleeps[i] = random.Next(10, 100); - var r = Parallel.For(0, sweeps, options, (int i) => - { - var task = sweeper.Propose(); - task.Wait(); - Assert.Equal(TaskStatus.RanToCompletion, task.Status); - var paramWithId = task.Result; - if (paramWithId == null) - return; - Thread.Sleep(sleeps[i]); - var result = new RunResult(paramWithId.ParameterSet, 0.42, true); - sweeper.Update(paramWithId.Id, result); - lock (mlock) - paramSets.Add(paramWithId.ParameterSet); - }); - Assert.True(paramSets.Count <= sweeps); - CheckAsyncSweeperResult(paramSets); - } + // Sleep randomly to simulate doing work. + int[] sleeps = new int[sweeps]; + for (int i = 0; i < sleeps.Length; i++) + sleeps[i] = random.Next(10, 100); + var r = Parallel.For(0, sweeps, options, (int i) => + { + var task = sweeper.Propose(); + task.Wait(); + Assert.Equal(TaskStatus.RanToCompletion, task.Status); + var paramWithId = task.Result; + if (paramWithId == null) + return; + Thread.Sleep(sleeps[i]); + var result = new RunResult(paramWithId.ParameterSet, 0.42, true); + sweeper.Update(paramWithId.Id, result); + lock (mlock) + paramSets.Add(paramWithId.ParameterSet); + }); + Assert.True(paramSets.Count <= sweeps); + CheckAsyncSweeperResult(paramSets); } [Fact] public async Task TestNelderMeadSweeperAsync() { var random = new Random(42); - using (var env = new ConsoleEnvironment(42)) - { - int batchSize = 5; - int sweeps = 40; - var paramSets = new List(); - var args = new DeterministicSweeperAsync.Arguments(); - args.BatchSize = batchSize; - args.Relaxation = 0; - - args.Sweeper = ComponentFactoryUtils.CreateFromFunction( - environ => { - var param = new IComponentFactory[] { + var env = new MLContext(42); + const int batchSize = 5; + const int sweeps = 40; + var paramSets = new List(); + var args = new DeterministicSweeperAsync.Arguments(); + args.BatchSize = batchSize; + args.Relaxation = 0; + + args.Sweeper = ComponentFactoryUtils.CreateFromFunction( + environ => + { + var param = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( innerEnviron => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( innerEnviron => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 1000, LogBase = true })) - }; + }; - var nelderMeadSweeperArgs = new NelderMeadSweeper.Arguments() - { - SweptParameters = param, - FirstBatchSweeper = ComponentFactoryUtils.CreateFromFunction( - (firstBatchSweeperEnviron, firstBatchSweeperArgs) => - new RandomGridSweeper(environ, new RandomGridSweeper.Arguments() { SweptParameters = param })) - }; + var nelderMeadSweeperArgs = new NelderMeadSweeper.Arguments() + { + SweptParameters = param, + FirstBatchSweeper = ComponentFactoryUtils.CreateFromFunction( + (firstBatchSweeperEnviron, firstBatchSweeperArgs) => + new RandomGridSweeper(environ, new RandomGridSweeper.Arguments() { SweptParameters = param })) + }; - return new NelderMeadSweeper(environ, nelderMeadSweeperArgs); - } - ); + return new NelderMeadSweeper(environ, nelderMeadSweeperArgs); + } + ); - var sweeper = new DeterministicSweeperAsync(env, args); - var mlock = new object(); - double[] metrics = new double[sweeps]; - for (int i = 0; i < metrics.Length; i++) - metrics[i] = random.NextDouble(); + var sweeper = new DeterministicSweeperAsync(env, args); + var mlock = new object(); + double[] metrics = new double[sweeps]; + for (int i = 0; i < metrics.Length; i++) + metrics[i] = random.NextDouble(); - for (int i = 0; i < sweeps; i++) - { - var paramWithId = await sweeper.Propose(); - if (paramWithId == null) - return; - var result = new RunResult(paramWithId.ParameterSet, metrics[i], true); - sweeper.Update(paramWithId.Id, result); - lock (mlock) - paramSets.Add(paramWithId.ParameterSet); - } - Assert.True(paramSets.Count <= sweeps); - CheckAsyncSweeperResult(paramSets); + for (int i = 0; i < sweeps; i++) + { + var paramWithId = await sweeper.Propose(); + if (paramWithId == null) + return; + var result = new RunResult(paramWithId.ParameterSet, metrics[i], true); + sweeper.Update(paramWithId.Id, result); + lock (mlock) + paramSets.Add(paramWithId.ParameterSet); } + Assert.True(paramSets.Count <= sweeps); + CheckAsyncSweeperResult(paramSets); } private void CheckAsyncSweeperResult(List paramSets) @@ -442,275 +431,266 @@ private void CheckAsyncSweeperResult(List paramSets) [Fact] public void TestRandomGridSweeper() { - using (var env = new ConsoleEnvironment(42)) + var env = new MLContext(42); + var args = new RandomGridSweeper.Arguments() { - var args = new RandomGridSweeper.Arguments() - { - SweptParameters = new[] { + SweptParameters = new[] { ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "foo", Min = 10, Max = 20, NumSteps = 3 })), ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 100, Max = 10000, LogBase = true, StepSize = 10 })) } - }; - var sweeper = new RandomGridSweeper(env, args); - var initialList = sweeper.ProposeSweeps(5, new List()); - Assert.Equal(5, initialList.Length); - var gridPoint = new bool[3][] { + }; + var sweeper = new RandomGridSweeper(env, args); + var initialList = sweeper.ProposeSweeps(5, new List()); + Assert.Equal(5, initialList.Length); + var gridPoint = new bool[3][] { new bool[3], new bool[3], new bool[3] }; - int i = 0; - int j = 0; - foreach (var parameterSet in initialList) + int i = 0; + int j = 0; + foreach (var parameterSet in initialList) + { + foreach (var parameterValue in parameterSet) { - foreach (var parameterValue in parameterSet) + if (parameterValue.Name == "foo") { - if (parameterValue.Name == "foo") - { - var val = long.Parse(parameterValue.ValueText); - Assert.True(val == 10 || val == 15 || val == 20); - i = (val == 10) ? 0 : (val == 15) ? 1 : 2; - } - else if (parameterValue.Name == "bar") - { - var val = long.Parse(parameterValue.ValueText); - Assert.True(val == 100 || val == 1000 || val == 10000); - j = (val == 100) ? 0 : (val == 1000) ? 1 : 2; - } - else - { - Assert.True(false, "Wrong parameter"); - } + var val = long.Parse(parameterValue.ValueText); + Assert.True(val == 10 || val == 15 || val == 20); + i = (val == 10) ? 0 : (val == 15) ? 1 : 2; + } + else if (parameterValue.Name == "bar") + { + var val = long.Parse(parameterValue.ValueText); + Assert.True(val == 100 || val == 1000 || val == 10000); + j = (val == 100) ? 0 : (val == 1000) ? 1 : 2; + } + else + { + Assert.True(false, "Wrong parameter"); } - Assert.False(gridPoint[i][j]); - gridPoint[i][j] = true; } + Assert.False(gridPoint[i][j]); + gridPoint[i][j] = true; + } - var nextList = sweeper.ProposeSweeps(5, initialList.Select(p => new RunResult(p))); - Assert.Equal(4, nextList.Length); - foreach (var parameterSet in nextList) + var nextList = sweeper.ProposeSweeps(5, initialList.Select(p => new RunResult(p))); + Assert.Equal(4, nextList.Length); + foreach (var parameterSet in nextList) + { + foreach (var parameterValue in parameterSet) { - foreach (var parameterValue in parameterSet) + if (parameterValue.Name == "foo") { - if (parameterValue.Name == "foo") - { - var val = long.Parse(parameterValue.ValueText); - Assert.True(val == 10 || val == 15 || val == 20); - i = (val == 10) ? 0 : (val == 15) ? 1 : 2; - } - else if (parameterValue.Name == "bar") - { - var val = long.Parse(parameterValue.ValueText); - Assert.True(val == 100 || val == 1000 || val == 10000); - j = (val == 100) ? 0 : (val == 1000) ? 1 : 2; - } - else - { - Assert.True(false, "Wrong parameter"); - } + var val = long.Parse(parameterValue.ValueText); + Assert.True(val == 10 || val == 15 || val == 20); + i = (val == 10) ? 0 : (val == 15) ? 1 : 2; + } + else if (parameterValue.Name == "bar") + { + var val = long.Parse(parameterValue.ValueText); + Assert.True(val == 100 || val == 1000 || val == 10000); + j = (val == 100) ? 0 : (val == 1000) ? 1 : 2; + } + else + { + Assert.True(false, "Wrong parameter"); } - Assert.False(gridPoint[i][j]); - gridPoint[i][j] = true; } + Assert.False(gridPoint[i][j]); + gridPoint[i][j] = true; + } - gridPoint = new bool[3][] { + gridPoint = new bool[3][] { new bool[3], new bool[3], new bool[3] }; - var lastList = sweeper.ProposeSweeps(10, null); - Assert.Equal(9, lastList.Length); - foreach (var parameterSet in lastList) + var lastList = sweeper.ProposeSweeps(10, null); + Assert.Equal(9, lastList.Length); + foreach (var parameterSet in lastList) + { + foreach (var parameterValue in parameterSet) { - foreach (var parameterValue in parameterSet) + if (parameterValue.Name == "foo") { - if (parameterValue.Name == "foo") - { - var val = long.Parse(parameterValue.ValueText); - Assert.True(val == 10 || val == 15 || val == 20); - i = (val == 10) ? 0 : (val == 15) ? 1 : 2; - } - else if (parameterValue.Name == "bar") - { - var val = long.Parse(parameterValue.ValueText); - Assert.True(val == 100 || val == 1000 || val == 10000); - j = (val == 100) ? 0 : (val == 1000) ? 1 : 2; - } - else - { - Assert.True(false, "Wrong parameter"); - } + var val = long.Parse(parameterValue.ValueText); + Assert.True(val == 10 || val == 15 || val == 20); + i = (val == 10) ? 0 : (val == 15) ? 1 : 2; + } + else if (parameterValue.Name == "bar") + { + var val = long.Parse(parameterValue.ValueText); + Assert.True(val == 100 || val == 1000 || val == 10000); + j = (val == 100) ? 0 : (val == 1000) ? 1 : 2; + } + else + { + Assert.True(false, "Wrong parameter"); } - Assert.False(gridPoint[i][j]); - gridPoint[i][j] = true; } - Assert.True(gridPoint.All(bArray => bArray.All(b => b))); + Assert.False(gridPoint[i][j]); + gridPoint[i][j] = true; } + Assert.True(gridPoint.All(bArray => bArray.All(b => b))); } [Fact] public void TestNelderMeadSweeper() { var random = new Random(42); - using (var env = new ConsoleEnvironment(42)) - { - var param = new IComponentFactory[] { + var env = new MLContext(42); + var param = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( environ => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 1000, LogBase = true })) }; - var args = new NelderMeadSweeper.Arguments() - { - SweptParameters = param, - FirstBatchSweeper = ComponentFactoryUtils.CreateFromFunction( - (environ, firstBatchArgs) => { - return new RandomGridSweeper(environ, new RandomGridSweeper.Arguments() { SweptParameters = param }); - } - ) - }; - var sweeper = new NelderMeadSweeper(env, args); - var sweeps = sweeper.ProposeSweeps(5, new List()); - Assert.Equal(3, sweeps.Length); - - var results = new List(); - for (int i = 1; i < 10; i++) + var args = new NelderMeadSweeper.Arguments() + { + SweptParameters = param, + FirstBatchSweeper = ComponentFactoryUtils.CreateFromFunction( + (environ, firstBatchArgs) => + { + return new RandomGridSweeper(environ, new RandomGridSweeper.Arguments() { SweptParameters = param }); + } + ) + }; + var sweeper = new NelderMeadSweeper(env, args); + var sweeps = sweeper.ProposeSweeps(5, new List()); + Assert.Equal(3, sweeps.Length); + + var results = new List(); + for (int i = 1; i < 10; i++) + { + foreach (var parameterSet in sweeps) { - foreach (var parameterSet in sweeps) + foreach (var parameterValue in parameterSet) { - foreach (var parameterValue in parameterSet) + if (parameterValue.Name == "foo") + { + var val = float.Parse(parameterValue.ValueText, CultureInfo.InvariantCulture); + Assert.InRange(val, 1, 5); + } + else if (parameterValue.Name == "bar") { - if (parameterValue.Name == "foo") - { - var val = float.Parse(parameterValue.ValueText, CultureInfo.InvariantCulture); - Assert.InRange(val, 1, 5); - } - else if (parameterValue.Name == "bar") - { - var val = long.Parse(parameterValue.ValueText); - Assert.InRange(val, 1, 1000); - } - else - { - Assert.True(false, "Wrong parameter"); - } + var val = long.Parse(parameterValue.ValueText); + Assert.InRange(val, 1, 1000); + } + else + { + Assert.True(false, "Wrong parameter"); } - results.Add(new RunResult(parameterSet, random.NextDouble(), true)); } - - sweeps = sweeper.ProposeSweeps(5, results); + results.Add(new RunResult(parameterSet, random.NextDouble(), true)); } - Assert.True(sweeps.Length <= 5); + + sweeps = sweeper.ProposeSweeps(5, results); } + Assert.True(sweeps.Length <= 5); } [Fact] public void TestNelderMeadSweeperWithDefaultFirstBatchSweeper() { var random = new Random(42); - using (var env = new ConsoleEnvironment(42)) - { - var param = new IComponentFactory[] { + var env = new MLContext(42); + var param = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( environ => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 1000, LogBase = true })) }; - var args = new NelderMeadSweeper.Arguments(); - args.SweptParameters = param; - var sweeper = new NelderMeadSweeper(env, args); - var sweeps = sweeper.ProposeSweeps(5, new List()); - Assert.Equal(3, sweeps.Length); + var args = new NelderMeadSweeper.Arguments(); + args.SweptParameters = param; + var sweeper = new NelderMeadSweeper(env, args); + var sweeps = sweeper.ProposeSweeps(5, new List()); + Assert.Equal(3, sweeps.Length); - var results = new List(); - for (int i = 1; i < 10; i++) + var results = new List(); + for (int i = 1; i < 10; i++) + { + foreach (var parameterSet in sweeps) { - foreach (var parameterSet in sweeps) + foreach (var parameterValue in parameterSet) { - foreach (var parameterValue in parameterSet) + if (parameterValue.Name == "foo") + { + var val = float.Parse(parameterValue.ValueText, CultureInfo.InvariantCulture); + Assert.InRange(val, 1, 5); + } + else if (parameterValue.Name == "bar") { - if (parameterValue.Name == "foo") - { - var val = float.Parse(parameterValue.ValueText, CultureInfo.InvariantCulture); - Assert.InRange(val, 1, 5); - } - else if (parameterValue.Name == "bar") - { - var val = long.Parse(parameterValue.ValueText); - Assert.InRange(val, 1, 1000); - } - else - { - Assert.True(false, "Wrong parameter"); - } + var val = long.Parse(parameterValue.ValueText); + Assert.InRange(val, 1, 1000); + } + else + { + Assert.True(false, "Wrong parameter"); } - results.Add(new RunResult(parameterSet, random.NextDouble(), true)); } - - sweeps = sweeper.ProposeSweeps(5, results); + results.Add(new RunResult(parameterSet, random.NextDouble(), true)); } - Assert.True(Utils.Size(sweeps) <= 5); + + sweeps = sweeper.ProposeSweeps(5, results); } + Assert.True(sweeps == null || sweeps.Length <= 5); } [Fact] public void TestSmacSweeper() { - RunMTAThread(() => + var random = new Random(42); + var env = new MLContext(42); + const int maxInitSweeps = 5; + var args = new SmacSweeper.Arguments() { - var random = new Random(42); - using (var env = new ConsoleEnvironment(42)) - { - int maxInitSweeps = 5; - var args = new SmacSweeper.Arguments() - { - NumberInitialPopulation = 20, - SweptParameters = new IComponentFactory[] { + NumberInitialPopulation = 20, + SweptParameters = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( environ => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 100, LogBase = true })) } - }; + }; - var sweeper = new SmacSweeper(env, args); - var results = new List(); - var sweeps = sweeper.ProposeSweeps(maxInitSweeps, results); - Assert.Equal(Math.Min(args.NumberInitialPopulation, maxInitSweeps), sweeps.Length); + var sweeper = new SmacSweeper(env, args); + var results = new List(); + var sweeps = sweeper.ProposeSweeps(maxInitSweeps, results); + Assert.Equal(Math.Min(args.NumberInitialPopulation, maxInitSweeps), sweeps.Length); - for (int i = 1; i < 10; i++) + for (int i = 1; i < 10; i++) + { + foreach (var parameterSet in sweeps) + { + foreach (var parameterValue in parameterSet) { - foreach (var parameterSet in sweeps) + if (parameterValue.Name == "foo") { - foreach (var parameterValue in parameterSet) - { - if (parameterValue.Name == "foo") - { - var val = float.Parse(parameterValue.ValueText, CultureInfo.InvariantCulture); - Assert.InRange(val, 1, 5); - } - else if (parameterValue.Name == "bar") - { - var val = long.Parse(parameterValue.ValueText); - Assert.InRange(val, 1, 1000); - } - else - { - Assert.True(false, "Wrong parameter"); - } - } - results.Add(new RunResult(parameterSet, random.NextDouble(), true)); + var val = float.Parse(parameterValue.ValueText, CultureInfo.InvariantCulture); + Assert.InRange(val, 1, 5); + } + else if (parameterValue.Name == "bar") + { + var val = long.Parse(parameterValue.ValueText); + Assert.InRange(val, 1, 1000); + } + else + { + Assert.True(false, "Wrong parameter"); } - - sweeps = sweeper.ProposeSweeps(5, results); } - Assert.Equal(5, sweeps.Length); + results.Add(new RunResult(parameterSet, random.NextDouble(), true)); } - }); + + sweeps = sweeper.ProposeSweeps(5, results); + } + // Because only unique configurations are considered, the number asked for may exceed the number actually returned. + Assert.True(sweeps.Length <= 5); } } } diff --git a/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs b/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs index 614166c904..0a1e7ada2f 100644 --- a/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs +++ b/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs @@ -74,7 +74,8 @@ protected BaseTestBaseline(ITestOutputHelper output) : base(output) // The writer to write to test log files. protected StreamWriter LogWriter; - protected ConsoleEnvironment Env; + private protected ConsoleEnvironment _env; + protected IHostEnvironment Env => _env; protected MLContext ML; private bool _normal; private bool _passed; @@ -96,7 +97,7 @@ protected override void Initialize() string logPath = Path.Combine(logDir, FullTestName + LogSuffix); LogWriter = OpenWriter(logPath); _passed = true; - Env = new ConsoleEnvironment(42, outWriter: LogWriter, errWriter: LogWriter) + _env = new ConsoleEnvironment(42, outWriter: LogWriter, errWriter: LogWriter) .AddStandardComponents(); ML = new MLContext(42); } @@ -106,9 +107,8 @@ protected override void Initialize() // It is called as a first step in test clean up. protected override void Cleanup() { - if (Env != null) - Env.Dispose(); - Env = null; + _env?.Dispose(); + _env = null; Contracts.Assert(IsActive); Log("Test {0}: {1}: {2}", TestName, @@ -535,41 +535,52 @@ private bool MatchNumberWithTolerance(MatchCollection firstCollection, MatchColl double f1 = double.Parse(firstCollection[i].ToString()); double f2 = double.Parse(secondCollection[i].ToString()); - // this follows the IEEE recommendations for how to compare floating point numbers - double allowedVariance = Math.Pow(10, -digitsOfPrecision); - double delta = Round(f1, digitsOfPrecision) - Round(f2, digitsOfPrecision); - // limitting to the digits we care about. - delta = Math.Round(delta, digitsOfPrecision); + if (!CompareNumbersWithTolerance(f1, f2, i, digitsOfPrecision)) + { + return false; + } + } - bool inRange = delta > -allowedVariance && delta < allowedVariance; + return true; + } - // for some cases, rounding up is not beneficial - // so checking on whether the difference is significant prior to rounding, and failing only then. - // example, for 5 digits of precision. - // F1 = 1.82844949 Rounds to 1.8284 - // F2 = 1.8284502 Rounds to 1.8285 - // would fail the inRange == true check, but would suceed the following, and we doconsider those two numbers - // (1.82844949 - 1.8284502) = -0.00000071 + public bool CompareNumbersWithTolerance(double expected, double actual, int? iterationOnCollection = null, int digitsOfPrecision = DigitsOfPrecision) + { + // this follows the IEEE recommendations for how to compare floating point numbers + double allowedVariance = Math.Pow(10, -digitsOfPrecision); + double delta = Round(expected, digitsOfPrecision) - Round(actual, digitsOfPrecision); + // limitting to the digits we care about. + delta = Math.Round(delta, digitsOfPrecision); - double delta2 = 0; - if (!inRange) - { - delta2 = Math.Round(f1 - f2, digitsOfPrecision); - inRange = delta2 >= -allowedVariance && delta2 <= allowedVariance; - } + bool inRange = delta > -allowedVariance && delta < allowedVariance; - if (!inRange) - { - Fail(_allowMismatch, $"Output and baseline mismatch at line {i}." + Environment.NewLine + - $"Values to compare are {firstCollection[i]} and {secondCollection[i]}" + Environment.NewLine + + // for some cases, rounding up is not beneficial + // so checking on whether the difference is significant prior to rounding, and failing only then. + // example, for 5 digits of precision. + // F1 = 1.82844949 Rounds to 1.8284 + // F2 = 1.8284502 Rounds to 1.8285 + // would fail the inRange == true check, but would suceed the following, and we doconsider those two numbers + // (1.82844949 - 1.8284502) = -0.00000071 + + double delta2 = 0; + if (!inRange) + { + delta2 = Math.Round(expected - actual, digitsOfPrecision); + inRange = delta2 >= -allowedVariance && delta2 <= allowedVariance; + } + + if (!inRange) + { + var message = iterationOnCollection != null ? "" : $"Output and baseline mismatch at line {iterationOnCollection}." + Environment.NewLine; + + Fail(_allowMismatch, message + + $"Values to compare are {expected} and {actual}" + Environment.NewLine + $"\t AllowedVariance: {allowedVariance}" + Environment.NewLine + $"\t delta: {delta}" + Environment.NewLine + $"\t delta2: {delta2}" + Environment.NewLine); - return false; - } } - return true; + return inRange; } private static double Round(double value, int digitsOfPrecision) @@ -806,11 +817,8 @@ protected static StreamReader OpenReader(string path) /// protected static int MainForTest(string args) { - using (var env = new ConsoleEnvironment()) - { - int result = Maml.MainCore(env, args, false); - return result; - } + var env = new MLContext(); + return Maml.MainCore(env, args, false); } } diff --git a/test/Microsoft.ML.TestFramework/BaseTestPredictorsMaml.cs b/test/Microsoft.ML.TestFramework/BaseTestPredictorsMaml.cs index 8eb4edb1b5..cf0303bc05 100644 --- a/test/Microsoft.ML.TestFramework/BaseTestPredictorsMaml.cs +++ b/test/Microsoft.ML.TestFramework/BaseTestPredictorsMaml.cs @@ -158,7 +158,7 @@ protected void Run(RunContext ctx, int digitsOfPrecision = DigitsOfPrecision) { // Not capturing into a specific log. Log("*** Start raw predictor output"); - res = MainForTest(Env, LogWriter, string.Join(" ", ctx.Command, runcmd), ctx.BaselineProgress); + res = MainForTest(_env, LogWriter, string.Join(" ", ctx.Command, runcmd), ctx.BaselineProgress); Log("*** End raw predictor output, return={0}", res); return; } @@ -189,7 +189,7 @@ protected void Run(RunContext ctx, int digitsOfPrecision = DigitsOfPrecision) Log(" Saving ini file: {0}", str); } - MainForTest(Env, LogWriter, str); + MainForTest(_env, LogWriter, str); files.ForEach(file => CheckEqualityNormalized(dir, file, digitsOfPrecision: digitsOfPrecision)); } diff --git a/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipe.cs b/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipe.cs index c8b2bb0645..d2b575a98b 100644 --- a/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipe.cs +++ b/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipe.cs @@ -123,7 +123,7 @@ public void SavePipeLabelParsers() string name = TestName + "4-out.txt"; string pathOut = DeleteOutputPath("SavePipe", name); using (var writer = OpenWriter(pathOut)) - using (Env.RedirectChannelOutput(writer, writer)) + using (_env.RedirectChannelOutput(writer, writer)) { TestCore(pathData, true, new[] { @@ -133,7 +133,7 @@ public void SavePipeLabelParsers() "xf=SelectColumns{keepcol=RawLabel keepcol=FileLabelNum keepcol=FileLabelKey hidden=-}" }, suffix: "4"); writer.WriteLine(ProgressLogLine); - Env.PrintProgress(); + _env.PrintProgress(); } CheckEqualityNormalized("SavePipe", name); @@ -638,7 +638,7 @@ public void SavePipeWithKey() Check(tmp, "Parsing argsText failed!"); IDataView view2 = TextLoader.Create(Env, argsText, new MultiFileSource(dataPath)); - var argsConv = new ConvertingTransform.Arguments(); + var argsConv = new TypeConvertingTransformer.Arguments(); tmp = CmdParser.ParseArguments(Env, " col=Label:U1[0-1]:Label" + " col=Features:U2:Features" + @@ -651,19 +651,19 @@ public void SavePipeWithKey() " key={min=3}", argsConv); Check(tmp, "Parsing argsConv failed!"); - view2 = ConvertingTransform.Create(Env, argsConv, view2); + view2 = TypeConvertingTransformer.Create(Env, argsConv, view2); - argsConv = new ConvertingTransform.Arguments(); + argsConv = new TypeConvertingTransformer.Arguments(); tmp = CmdParser.ParseArguments(Env, " col=Label2:U2:Label col=Features2:Num:Features", argsConv); Check(tmp, "Parsing argsConv(2) failed!"); - view2 = ConvertingTransform.Create(Env, argsConv, view2); + view2 = TypeConvertingTransformer.Create(Env, argsConv, view2); var colsChoose = new[] { "Label", "Features", "Label2", "Features2", "A", "B", "C", "D", "E", "F" }; - IDataView view1 = SelectColumnsTransform.CreateKeep(Env, pipe, colsChoose); - view2 = SelectColumnsTransform.CreateKeep(Env, view2, colsChoose); + IDataView view1 = ColumnSelectingTransformer.CreateKeep(Env, pipe, colsChoose); + view2 = ColumnSelectingTransformer.CreateKeep(Env, view2, colsChoose); CheckSameValues(view1, view2); }, @@ -673,6 +673,118 @@ public void SavePipeWithKey() Done(); } + [Fact] + public void SavePipeDropColumns() + { + string pathData = GetDataPath("adult.train"); + TestCore(pathData, false, + new[] { + "loader=Text{header+ sep=, col=One:TX:0 col=Num:R4:0,2,4,10-12 col=Cat:TX:0~*}", + "xf=MinMax{col=Num}", + "xf=NAHandle{col=NumSparse:Num}", + "xf=MinMax{col=NumSparse}", + "xf=SelectColumns{dropcol=NumSparse hidden=+}", + }); + + Done(); + } + + [Fact] + public void SavePipeCustomStopwordsRemover() + { + string dataFile = DeleteOutputPath("SavePipe", "CustomStopwordsRemover-dataFile.txt"); + File.WriteAllLines(dataFile, new[] { + "When does Fred McGriff of the Padres become a free agent?", + "Is erythromycin effective in treating pneumonia?" + }); + + var stopwordsList = new[] + { + "When", + "does", + "of", + "the", + "Padres", + "become", + "a", + "Is", + "effective", + "in" + }; + string stopwordsFile = DeleteOutputPath("SavePipe", "CustomStopwordsRemover-stopwordsFile.txt"); + File.WriteAllLines(stopwordsFile, stopwordsList); + + Action action + = pipe => + { + VBuffer>[] expected = new VBuffer>[2]; + ReadOnlyMemory[] values = { "Fred".AsMemory(), "McGriff".AsMemory(), "free".AsMemory(), "agent".AsMemory() }; + expected[0] = new VBuffer>(values.Length, values); + ReadOnlyMemory[] values1 = { "erythromycin".AsMemory(), "treating".AsMemory(), "pneumonia".AsMemory() }; + expected[1] = new VBuffer>(values1.Length, values1); + + using (var c = pipe.GetRowCursor(col => true)) + { + int col; + bool res = c.Schema.TryGetColumnIndex("T", out col); + if (!Check(res, "Column T not found!")) + return; + var getter = c.GetGetter>>(col); + var buffer = default(VBuffer>); + int index = 0; + while (c.MoveNext()) + { + getter(ref buffer); + CompareVec(in buffer, in expected[index++], buffer.GetValues().Length, (s1, s2) => s1.Span.SequenceEqual(s2.Span)); + } + } + }; + + TestCore(dataFile, true, + new[] { + "loader=Text{col=T:TX:0}", + "xf=WordToken{col=T}", + "xf=TextNorm{col=T case=None punc=-}", + string.Format("xf=CustomStopWords{{data={0} col=T}}", stopwordsFile), + "xf=SelectColumns{keepcol=T}" + }, action, baselineSchema: false); + + TestCore(dataFile, true, + new[] { + "loader=Text{col=T:TX:0}", + "xf=WordToken{col=T}", + "xf=TextNorm{col=T case=None punc=-}", + string.Format("xf=CustomStopWords{{stopwords={0} col=T}}", string.Join(",", stopwordsList)), + "xf=SelectColumns{keepcol=T}" + }, action, baselineSchema: false); + + Done(); + } + + [Fact] + public void SavePipeTokenizerAndStopWords() + { + string dataFile = DeleteOutputPath("SavePipe", "Multi-Languages.txt"); + File.WriteAllLines(dataFile, new[] { + "1 \"Oh, no,\" she's saying, \"our $400 blender can't handle something this hard!\" English", + "2 Vous êtes au volant d'une voiture et vous roulez à grande vitesse French", + "3 Lange nichts voneinander gehört! Es freut mich, dich kennen zu lernen German", + "4 Goedemorgen, Waar kom je vandaan? Ik kom uit Nederlands Dutch", + "5 Ciao, Come va? Bene grazie. E tu? Quanto tempo! Italian", + "六 初めまして 良い一日を ごきげんよう! さようなら Japanese", + "6 ¡Hola! ¿Cómo te llamas? Mi nombre es ABELE Spanish" + }); + + TestCore(dataFile, true, + new[] { + "Loader=Text{col=Source:TXT:0 col=Lang:TXT:1 sep=tab}", + "xf=Token{col=SourceTokens:Source}", + "xf=StopWords{langscol=Lang col=Output:SourceTokens}" + }, roundTripText: false); + + Done(); + } + [Fact] public void TestHashTransformFloat() { @@ -722,14 +834,14 @@ private void TestHashTransformHelper(T[] data, uint[] results, NumberType typ builder.AddColumn("F1", type, data); var srcView = builder.GetDataView(); - var col = new HashTransformer.Column(); + var col = new HashingTransformer.Column(); col.Name = "F1"; col.HashBits = 5; col.Seed = 42; - var args = new HashTransformer.Arguments(); - args.Column = new HashTransformer.Column[] { col }; + var args = new HashingTransformer.Arguments(); + args.Column = new HashingTransformer.Column[] { col }; - var hashTransform = HashTransformer.Create(Env, args, srcView); + var hashTransform = HashingTransformer.Create(Env, args, srcView); using (var cursor = hashTransform.GetRowCursor(c => true)) { var resultGetter = cursor.GetGetter(1); @@ -760,14 +872,14 @@ private void TestHashTransformVectorHelper(VBuffer data, uint[][] results, private void TestHashTransformVectorHelper(ArrayDataViewBuilder builder, uint[][] results) { var srcView = builder.GetDataView(); - var col = new HashTransformer.Column(); + var col = new HashingTransformer.Column(); col.Name = "F1V"; col.HashBits = 5; col.Seed = 42; - var args = new HashTransformer.Arguments(); - args.Column = new HashTransformer.Column[] { col }; + var args = new HashingTransformer.Arguments(); + args.Column = new HashingTransformer.Column[] { col }; - var hashTransform = HashTransformer.Create(Env, args, srcView); + var hashTransform = HashingTransformer.Create(Env, args, srcView); using (var cursor = hashTransform.GetRowCursor(c => true)) { var resultGetter = cursor.GetGetter>(1); @@ -801,23 +913,13 @@ public void TestLDATransform() }; builder.AddColumn("F1V", NumberType.Float, data); - var srcView = builder.GetDataView(); - LdaTransform.Column col = new LdaTransform.Column(); - col.Source = "F1V"; - col.NumTopic = 20; - col.NumTopic = 3; - col.NumSummaryTermPerTopic = 3; - col.AlphaSum = 3; - col.NumThreads = 1; - col.ResetRandomGenerator = true; - LdaTransform.Arguments args = new LdaTransform.Arguments(); - args.Column = new LdaTransform.Column[] { col }; - - LdaTransform ldaTransform = new LdaTransform(Env, args, srcView); + var est = new LatentDirichletAllocationEstimator(Env, "F1V", numTopic: 3, numSummaryTermPerTopic: 3, alphaSum: 3, numThreads: 1, resetRandomGenerator: true); + var ldaTransformer = est.Fit(srcView); + var transformedData = ldaTransformer.Transform(srcView); - using (var cursor = ldaTransform.GetRowCursor(c => true)) + using (var cursor = transformedData.GetRowCursor(c => true)) { var resultGetter = cursor.GetGetter>(1); VBuffer resultFirstRow = new VBuffer(); @@ -848,7 +950,7 @@ public void TestLDATransform() } [Fact] - public void TestLdaTransformEmptyDocumentException() + public void TestLdaTransformerEmptyDocumentException() { var builder = new ArrayDataViewBuilder(Env); var data = new[] @@ -861,18 +963,18 @@ public void TestLdaTransformEmptyDocumentException() builder.AddColumn("Zeros", NumberType.Float, data); var srcView = builder.GetDataView(); - var col = new LdaTransform.Column() + var col = new LatentDirichletAllocationTransformer.Column() { - Source = "Zeros" + Source = "Zeros", }; - var args = new LdaTransform.Arguments() + var args = new LatentDirichletAllocationTransformer.Arguments() { Column = new[] { col } }; try { - var lda = new LdaTransform(Env, args, srcView); + var lda = new LatentDirichletAllocationEstimator(Env, "Zeros").Fit(srcView).Transform(srcView); } catch (InvalidOperationException ex) { diff --git a/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs b/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs index 93bccb69f5..03ca7d8600 100644 --- a/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs +++ b/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs @@ -8,6 +8,7 @@ using System.Linq; using System.Reflection; using Microsoft.ML.Core.Data; +using Microsoft.ML.Data; using Microsoft.ML.Runtime.Api; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; @@ -171,19 +172,16 @@ private void CheckSameSchemaShape(SchemaShape promised, SchemaShape delivered) /// protected IDataLoader TestCore(string pathData, bool keepHidden, string[] argsPipe, Action actLoader = null, string suffix = "", string suffixBase = null, bool checkBaseline = true, - bool forceDense = false, bool logCurs = false, ConsoleEnvironment env = null, bool roundTripText = true, + bool forceDense = false, bool logCurs = false, bool roundTripText = true, bool checkTranspose = false, bool checkId = true, bool baselineSchema = true) { Contracts.AssertValue(Env); - if (env == null) - env = Env; MultiFileSource files; IDataLoader compositeLoader; - var pipe1 = compositeLoader = CreatePipeDataLoader(env, pathData, argsPipe, out files); + var pipe1 = compositeLoader = CreatePipeDataLoader(_env, pathData, argsPipe, out files); - if (actLoader != null) - actLoader(compositeLoader); + actLoader?.Invoke(compositeLoader); // Re-apply pipe to the loader and check equality. var comp = compositeLoader as CompositeDataLoader; @@ -193,7 +191,7 @@ protected IDataLoader TestCore(string pathData, bool keepHidden, string[] argsPi srcLoader = comp.View; while (srcLoader is IDataTransform) srcLoader = ((IDataTransform)srcLoader).Source; - var reappliedPipe = ApplyTransformUtils.ApplyAllTransformsToData(env, comp.View, srcLoader); + var reappliedPipe = ApplyTransformUtils.ApplyAllTransformsToData(_env, comp.View, srcLoader); if (!CheckMetadataTypes(reappliedPipe.Schema)) Failed(); @@ -209,12 +207,12 @@ protected IDataLoader TestCore(string pathData, bool keepHidden, string[] argsPi string pathLog = DeleteOutputPath("SavePipe", name); using (var writer = OpenWriter(pathLog)) - using (env.RedirectChannelOutput(writer, writer)) + using (_env.RedirectChannelOutput(writer, writer)) { long count = 0; // Set the concurrency to 1 for this; restore later. - int conc = env.ConcurrencyFactor; - env.ConcurrencyFactor = 1; + int conc = _env.ConcurrencyFactor; + _env.ConcurrencyFactor = 1; using (var curs = pipe1.GetRowCursor(c => true, null)) { while (curs.MoveNext()) @@ -223,14 +221,14 @@ protected IDataLoader TestCore(string pathData, bool keepHidden, string[] argsPi } } writer.WriteLine("Cursored through {0} rows", count); - env.ConcurrencyFactor = conc; + _env.ConcurrencyFactor = conc; } CheckEqualityNormalized("SavePipe", name); } var pathModel = SavePipe(pipe1, suffix); - var pipe2 = LoadPipe(pathModel, env, files); + var pipe2 = LoadPipe(pathModel, _env, files); if (!CheckMetadataTypes(pipe2.Schema)) Failed(); @@ -242,21 +240,21 @@ protected IDataLoader TestCore(string pathData, bool keepHidden, string[] argsPi if (pipe1.Schema.ColumnCount > 0) { // The text saver fails if there are no columns, so we cannot check in that case. - if (!SaveLoadText(pipe1, env, keepHidden, suffix, suffixBase, checkBaseline, forceDense, roundTripText)) + if (!SaveLoadText(pipe1, _env, keepHidden, suffix, suffixBase, checkBaseline, forceDense, roundTripText)) Failed(); // The transpose saver likewise fails for the same reason. - if (checkTranspose && !SaveLoadTransposed(pipe1, env, suffix)) + if (checkTranspose && !SaveLoadTransposed(pipe1, _env, suffix)) Failed(); } - if (!SaveLoad(pipe1, env, suffix)) + if (!SaveLoad(pipe1, _env, suffix)) Failed(); // Check that the pipe doesn't shuffle when it cannot :). if (srcLoader != null) { // First we need to cache the data so it can be shuffled. - var cachedData = new CacheDataView(env, srcLoader, null); - var newPipe = ApplyTransformUtils.ApplyAllTransformsToData(env, comp.View, cachedData); + var cachedData = new CacheDataView(_env, srcLoader, null); + var newPipe = ApplyTransformUtils.ApplyAllTransformsToData(_env, comp.View, cachedData); if (!newPipe.CanShuffle) { using (var c1 = newPipe.GetRowCursor(col => true, new SysRandom(123))) diff --git a/test/Microsoft.ML.TestFramework/EnvironmentExtensions.cs b/test/Microsoft.ML.TestFramework/EnvironmentExtensions.cs index 180a192b5d..13a78fdf3f 100644 --- a/test/Microsoft.ML.TestFramework/EnvironmentExtensions.cs +++ b/test/Microsoft.ML.TestFramework/EnvironmentExtensions.cs @@ -20,7 +20,7 @@ public static TEnvironment AddStandardComponents(this TEnvironment { env.ComponentCatalog.RegisterAssembly(typeof(TextLoader).Assembly); // ML.Data env.ComponentCatalog.RegisterAssembly(typeof(LinearPredictor).Assembly); // ML.StandardLearners - env.ComponentCatalog.RegisterAssembly(typeof(CategoricalTransform).Assembly); // ML.Transforms + env.ComponentCatalog.RegisterAssembly(typeof(OneHotEncodingTransformer).Assembly); // ML.Transforms env.ComponentCatalog.RegisterAssembly(typeof(FastTreeBinaryPredictor).Assembly); // ML.FastTree env.ComponentCatalog.RegisterAssembly(typeof(EnsemblePredictor).Assembly); // ML.Ensemble env.ComponentCatalog.RegisterAssembly(typeof(KMeansPredictor).Assembly); // ML.KMeansClustering diff --git a/test/Microsoft.ML.TestFramework/ModelHelper.cs b/test/Microsoft.ML.TestFramework/ModelHelper.cs index 94341e4a85..3fe189183b 100644 --- a/test/Microsoft.ML.TestFramework/ModelHelper.cs +++ b/test/Microsoft.ML.TestFramework/ModelHelper.cs @@ -13,7 +13,7 @@ namespace Microsoft.ML.TestFramework { public static class ModelHelper { - private static ConsoleEnvironment s_environment = new ConsoleEnvironment(seed: 1); + private static IHostEnvironment s_environment = new MLContext(seed: 1); private static ITransformModel s_housePriceModel; public static void WriteKcHousePriceModel(string dataPath, string outputModelPath) @@ -35,7 +35,6 @@ public static void WriteKcHousePriceModel(string dataPath, Stream stream) { s_housePriceModel = CreateKcHousePricePredictorModel(dataPath); } - s_housePriceModel.Save(s_environment, stream); } diff --git a/test/Microsoft.ML.TestFramework/TestCommandBase.cs b/test/Microsoft.ML.TestFramework/TestCommandBase.cs index 75f8d5d1e0..4e5c04395f 100644 --- a/test/Microsoft.ML.TestFramework/TestCommandBase.cs +++ b/test/Microsoft.ML.TestFramework/TestCommandBase.cs @@ -292,10 +292,10 @@ protected bool TestCore(RunContextBase ctx, string cmdName, string args, int dig Contracts.AssertValueOrNull(args); OutputPath outputPath = ctx.StdoutPath(); using (var newWriter = OpenWriter(outputPath.Path)) - using (Env.RedirectChannelOutput(newWriter, newWriter)) + using (_env.RedirectChannelOutput(newWriter, newWriter)) { - Env.ResetProgressChannel(); - int res = MainForTest(Env, newWriter, string.Format("{0} {1}", cmdName, args), ctx.BaselineProgress); + _env.ResetProgressChannel(); + int res = MainForTest(_env, newWriter, string.Format("{0} {1}", cmdName, args), ctx.BaselineProgress); if (res != 0) Log("*** Predictor returned {0}", res); } @@ -322,7 +322,7 @@ protected bool TestCore(RunContextBase ctx, string cmdName, string args, int dig /// /// The arguments for MAML. /// Whether to print the progress summary. If true, progress summary will appear in the end of baseline output file. - protected static int MainForTest(ConsoleEnvironment env, TextWriter writer, string args, bool printProgress = false) + private protected static int MainForTest(ConsoleEnvironment env, TextWriter writer, string args, bool printProgress = false) { Contracts.AssertValue(env); Contracts.AssertValue(writer); @@ -364,7 +364,7 @@ private bool TestCoreCore(RunContextBase ctx, string cmdName, string dataPath, P return TestCoreCore(ctx, cmdName, dataPath, situation, inModelPath, outModelPath, loaderArgs, extraArgs, DigitsOfPrecision, toCompare); } - private bool TestCoreCore(RunContextBase ctx, string cmdName, string dataPath, PathArgument.Usage situation, + private bool TestCoreCore(RunContextBase ctx, string cmdName, string dataPath, PathArgument.Usage situation, OutputPath inModelPath, OutputPath outModelPath, string loaderArgs, string extraArgs, int digitsOfPrecision, params PathArgument[] toCompare) { Contracts.AssertNonEmpty(cmdName); @@ -503,24 +503,22 @@ private string DataArg(string dataPath) protected void TestPipeFromModel(string dataPath, OutputPath model) { - using (var env = new ConsoleEnvironment(42)) - { - var files = new MultiFileSource(dataPath); + var env = new MLContext(seed: 42); + var files = new MultiFileSource(dataPath); - bool tmp; - IDataView pipe; - using (var file = Env.OpenInputFile(model.Path)) - using (var strm = file.OpenReadStream()) - using (var rep = RepositoryReader.Open(strm, env)) - { - ModelLoadContext.LoadModel(env, - out pipe, rep, ModelFileUtils.DirDataLoaderModel, files); - } - - using (var c = pipe.GetRowCursor(col => true)) - tmp = CheckSameValues(c, pipe, true, true, true); - Check(tmp, "Single value same failed"); + bool tmp; + IDataView pipe; + using (var file = Env.OpenInputFile(model.Path)) + using (var strm = file.OpenReadStream()) + using (var rep = RepositoryReader.Open(strm, env)) + { + ModelLoadContext.LoadModel(env, + out pipe, rep, ModelFileUtils.DirDataLoaderModel, files); } + + using (var c = pipe.GetRowCursor(col => true)) + tmp = CheckSameValues(c, pipe, true, true, true); + Check(tmp, "Single value same failed"); } } @@ -1969,7 +1967,7 @@ public void CommandTrainingBinaryFieldAwareFactorizationMachineWithInitializatio string data = GetDataPath("breast-cancer.txt"); OutputPath model = ModelPath(); - TestCore("traintest", data, loaderArgs, extraArgs + " test=" + data, digitsOfPrecision:5); + TestCore("traintest", data, loaderArgs, extraArgs + " test=" + data, digitsOfPrecision: 5); _step++; TestInOutCore("traintest", data, model, extraArgs + " " + loaderArgs + " " + "cont+" + " " + "test=" + data); @@ -1988,17 +1986,17 @@ public void CommandTrainingBinaryFactorizationMachineWithValidation() string args = $"{loaderArgs} data={trainData} valid={validData} test={validData} {extraArgs} out={model}"; OutputPath outputPath = StdoutPath(); using (var newWriter = OpenWriter(outputPath.Path)) - using (Env.RedirectChannelOutput(newWriter, newWriter)) + using (_env.RedirectChannelOutput(newWriter, newWriter)) { - Env.ResetProgressChannel(); - int res = MainForTest(Env, newWriter, string.Format("{0} {1}", "traintest", args), true); + _env.ResetProgressChannel(); + int res = MainForTest(_env, newWriter, string.Format("{0} {1}", "traintest", args), true); Assert.True(res == 0); } // see https://github.com/dotnet/machinelearning/issues/404 // in Linux, the clang sqrt() results vary highly from the ones in mac and Windows. if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - Assert.True(outputPath.CheckEqualityNormalized(digitsOfPrecision:4)); + Assert.True(outputPath.CheckEqualityNormalized(digitsOfPrecision: 4)); else Assert.True(outputPath.CheckEqualityNormalized()); @@ -2017,10 +2015,10 @@ public void CommandTrainingBinaryFieldAwareFactorizationMachineWithValidation() string args = $"{loaderArgs} data={trainData} valid={validData} test={validData} {extraArgs} out={model}"; OutputPath outputPath = StdoutPath(); using (var newWriter = OpenWriter(outputPath.Path)) - using (Env.RedirectChannelOutput(newWriter, newWriter)) + using (_env.RedirectChannelOutput(newWriter, newWriter)) { - Env.ResetProgressChannel(); - int res = MainForTest(Env, newWriter, string.Format("{0} {1}", "traintest", args), true); + _env.ResetProgressChannel(); + int res = MainForTest(_env, newWriter, string.Format("{0} {1}", "traintest", args), true); Assert.Equal(0, res); } @@ -2044,15 +2042,15 @@ public void CommandTrainingBinaryFactorizationMachineWithValidationAndInitializa OutputPath outputPath = StdoutPath(); string args = $"data={data} test={data} valid={data} in={model.Path} cont+" + " " + loaderArgs + " " + extraArgs; using (var newWriter = OpenWriter(outputPath.Path)) - using (Env.RedirectChannelOutput(newWriter, newWriter)) + using (_env.RedirectChannelOutput(newWriter, newWriter)) { - Env.ResetProgressChannel(); - int res = MainForTest(Env, newWriter, string.Format("{0} {1}", "traintest", args), true); + _env.ResetProgressChannel(); + int res = MainForTest(_env, newWriter, string.Format("{0} {1}", "traintest", args), true); Assert.True(res == 0); } if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - Assert.True(outputPath.CheckEqualityNormalized(digitsOfPrecision:4)); + Assert.True(outputPath.CheckEqualityNormalized(digitsOfPrecision: 4)); else Assert.True(outputPath.CheckEqualityNormalized()); @@ -2074,10 +2072,10 @@ public void CommandTrainingBinaryFieldAwareFactorizationMachineWithValidationAnd OutputPath outputPath = StdoutPath(); string args = $"data={data} test={data} valid={data} in={model.Path} cont+" + " " + loaderArgs + " " + extraArgs; using (var newWriter = OpenWriter(outputPath.Path)) - using (Env.RedirectChannelOutput(newWriter, newWriter)) + using (_env.RedirectChannelOutput(newWriter, newWriter)) { - Env.ResetProgressChannel(); - int res = MainForTest(Env, newWriter, string.Format("{0} {1}", "traintest", args), true); + _env.ResetProgressChannel(); + int res = MainForTest(_env, newWriter, string.Format("{0} {1}", "traintest", args), true); Assert.True(res == 0); } diff --git a/test/Microsoft.ML.TestFramework/TestSparseDataView.cs b/test/Microsoft.ML.TestFramework/TestSparseDataView.cs index a674618dd8..75cd3ca516 100644 --- a/test/Microsoft.ML.TestFramework/TestSparseDataView.cs +++ b/test/Microsoft.ML.TestFramework/TestSparseDataView.cs @@ -48,28 +48,26 @@ private void GenericSparseDataView(T[] v1, T[] v2) new SparseExample() { X = new VBuffer (5, 3, v1, new int[] { 0, 2, 4 }) }, new SparseExample() { X = new VBuffer (5, 3, v2, new int[] { 0, 1, 3 }) } }; - using (var host = new ConsoleEnvironment()) + var env = new MLContext(); + var data = env.CreateStreamingDataView(inputs); + var value = new VBuffer(); + int n = 0; + using (var cur = data.GetRowCursor(i => true)) { - var data = host.CreateStreamingDataView(inputs); - var value = new VBuffer(); - int n = 0; - using (var cur = data.GetRowCursor(i => true)) + var getter = cur.GetGetter>(0); + while (cur.MoveNext()) { - var getter = cur.GetGetter>(0); - while (cur.MoveNext()) - { - getter(ref value); - Assert.True(value.GetValues().Length == 3); - ++n; - } - } - Assert.True(n == 2); - var iter = data.AsEnumerable>(host, false).GetEnumerator(); - n = 0; - while (iter.MoveNext()) + getter(ref value); + Assert.True(value.GetValues().Length == 3); ++n; - Assert.True(n == 2); + } } + Assert.True(n == 2); + var iter = data.AsEnumerable>(env, false).GetEnumerator(); + n = 0; + while (iter.MoveNext()) + ++n; + Assert.True(n == 2); } [Fact] @@ -90,28 +88,26 @@ private void GenericDenseDataView(T[] v1, T[] v2) new DenseExample() { X = v1 }, new DenseExample() { X = v2 } }; - using (var host = new ConsoleEnvironment()) + var env = new MLContext(); + var data = env.CreateStreamingDataView(inputs); + var value = new VBuffer(); + int n = 0; + using (var cur = data.GetRowCursor(i => true)) { - var data = host.CreateStreamingDataView(inputs); - var value = new VBuffer(); - int n = 0; - using (var cur = data.GetRowCursor(i => true)) + var getter = cur.GetGetter>(0); + while (cur.MoveNext()) { - var getter = cur.GetGetter>(0); - while (cur.MoveNext()) - { - getter(ref value); - Assert.True(value.GetValues().Length == 3); - ++n; - } - } - Assert.True(n == 2); - var iter = data.AsEnumerable>(host, false).GetEnumerator(); - n = 0; - while (iter.MoveNext()) + getter(ref value); + Assert.True(value.GetValues().Length == 3); ++n; - Assert.True(n == 2); + } } + Assert.True(n == 2); + var iter = data.AsEnumerable>(env, false).GetEnumerator(); + n = 0; + while (iter.MoveNext()) + ++n; + Assert.True(n == 2); } } } diff --git a/test/Microsoft.ML.Tests/CachingTests.cs b/test/Microsoft.ML.Tests/CachingTests.cs new file mode 100644 index 0000000000..ef77eab19f --- /dev/null +++ b/test/Microsoft.ML.Tests/CachingTests.cs @@ -0,0 +1,82 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Data; +using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.RunTests; +using System.Linq; +using System.Threading; +using Xunit; +using Xunit.Abstractions; + +namespace Microsoft.ML.Tests +{ + public class CachingTests : TestDataPipeBase + { + public CachingTests(ITestOutputHelper helper) : base(helper) + { + } + + private class MyData + { + [NoColumn] + public int AccessCount; + private float[] _features; + + [VectorType(3)] + public float[] Features + { + get { Interlocked.Increment(ref AccessCount); return _features; } + set { _features = value; } + } + + public MyData() + { + Features = new float[] { 1, 2, 3 }; + } + } + + [Fact] + public void CacheCheckpointTest() + { + var trainData = Enumerable.Range(0, 100).Select(c => new MyData()).ToArray(); + + var pipe = ML.Transforms.CopyColumns("Features", "F1") + .Append(ML.Transforms.Normalize("F1", "Norm1")) + .Append(ML.Transforms.Normalize("F1", "Norm2", Transforms.Normalizers.NormalizingEstimator.NormalizerMode.MeanVariance)); + + pipe.Fit(ML.CreateDataView(trainData)); + + Assert.True(trainData.All(x => x.AccessCount == 2)); + + trainData = Enumerable.Range(0, 100).Select(c => new MyData()).ToArray(); + pipe = ML.Transforms.CopyColumns("Features", "F1") + .AppendCacheCheckpoint(ML) + .Append(ML.Transforms.Normalize("F1", "Norm1")) + .Append(ML.Transforms.Normalize("F1", "Norm2", Transforms.Normalizers.NormalizingEstimator.NormalizerMode.MeanVariance)); + + pipe.Fit(ML.CreateDataView(trainData)); + + Assert.True(trainData.All(x => x.AccessCount == 1)); + } + + [Fact] + public void CacheTest() + { + var src = Enumerable.Range(0, 100).Select(c => new MyData()).ToArray(); + var data = ML.CreateDataView(src); + data.GetColumn(ML, "Features").ToArray(); + data.GetColumn(ML, "Features").ToArray(); + Assert.True(src.All(x => x.AccessCount == 2)); + + src = Enumerable.Range(0, 100).Select(c => new MyData()).ToArray(); + data = ML.CreateDataView(src); + data = ML.Data.Cache(data); + data.GetColumn(ML, "Features").ToArray(); + data.GetColumn(ML, "Features").ToArray(); + Assert.True(src.All(x => x.AccessCount == 1)); + } + } +} diff --git a/test/Microsoft.ML.Tests/CollectionDataSourceTests.cs b/test/Microsoft.ML.Tests/CollectionDataSourceTests.cs index 2e3b71ab01..8862864885 100644 --- a/test/Microsoft.ML.Tests/CollectionDataSourceTests.cs +++ b/test/Microsoft.ML.Tests/CollectionDataSourceTests.cs @@ -59,15 +59,13 @@ public void CheckConstructor() public void CanSuccessfullyApplyATransform() { var collection = CollectionDataSource.Create(new List() { new Input { Number1 = 1, String1 = "1" } }); - using (var environment = new ConsoleEnvironment()) - { + var environment = new MLContext(); Experiment experiment = environment.CreateExperiment(); Legacy.ILearningPipelineDataStep output = (Legacy.ILearningPipelineDataStep)collection.ApplyStep(null, experiment); Assert.NotNull(output.Data); Assert.NotNull(output.Data.VarName); Assert.Null(output.Model); - } } [Fact] @@ -79,9 +77,8 @@ public void CanSuccessfullyEnumerated() new Input { Number1 = 3, String1 = "3" } }); - using (var environment = new ConsoleEnvironment()) - { - Experiment experiment = environment.CreateExperiment(); + var environment = new MLContext(); + Experiment experiment = environment.CreateExperiment(); Legacy.ILearningPipelineDataStep output = collection.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; experiment.Compile(); @@ -128,7 +125,6 @@ public void CanSuccessfullyEnumerated() Assert.False(cursor.MoveNext()); } - } } [Fact] @@ -294,7 +290,7 @@ public class ConversionSimpleClass public float fFloat; public double fDouble; public bool fBool; - public string fString=""; + public string fString = ""; } public bool CompareObjectValues(object x, object y, Type type) @@ -418,17 +414,15 @@ public void RoundTripConversionWithBasicTypes() new ConversionSimpleClass() }; - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) { - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) - { - Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); - } - Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); + Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); } + Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); } public class ConversionNotSupportedMinValueClass @@ -442,27 +436,25 @@ public class ConversionNotSupportedMinValueClass [Fact] public void ConversionExceptionsBehavior() { - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var data = new ConversionNotSupportedMinValueClass[1]; + foreach (var field in typeof(ConversionNotSupportedMinValueClass).GetFields()) { - var data = new ConversionNotSupportedMinValueClass[1]; - foreach (var field in typeof(ConversionNotSupportedMinValueClass).GetFields()) + data[0] = new ConversionNotSupportedMinValueClass(); + FieldInfo fi; + if ((fi = field.FieldType.GetField("MinValue")) != null) + { + field.SetValue(data[0], fi.GetValue(null)); + } + var dataView = ComponentCreation.CreateDataView(env, data); + var enumerator = dataView.AsEnumerable(env, false).GetEnumerator(); + try + { + enumerator.MoveNext(); + Assert.True(false); + } + catch { - data[0] = new ConversionNotSupportedMinValueClass(); - FieldInfo fi; - if ((fi = field.FieldType.GetField("MinValue")) != null) - { - field.SetValue(data[0], fi.GetValue(null)); - } - var dataView = ComponentCreation.CreateDataView(env, data); - var enumerator = dataView.AsEnumerable(env, false).GetEnumerator(); - try - { - enumerator.MoveNext(); - Assert.True(false); - } - catch - { - } } } } @@ -496,15 +488,13 @@ public void ClassWithConstFieldsConversion() new ClassWithConstField(){ fInt=-1, fString ="" }, }; - using (var env = new ConsoleEnvironment()) - { - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) - Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); - Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); - } + var env = new MLContext(); + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); + Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); } @@ -524,15 +514,13 @@ public void ClassWithMixOfFieldsAndPropertiesConversion() new ClassWithMixOfFieldsAndProperties(){ IntProp=-1, fString ="" }, }; - using (var env = new ConsoleEnvironment()) - { - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) - Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); - Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); - } + var env = new MLContext(); + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); + Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); } public abstract class BaseClassWithInheritedProperties @@ -580,28 +568,25 @@ public void ClassWithPrivateFieldsAndPropertiesConversion() new ClassWithPrivateFieldsAndProperties(){ StringProp ="baba" } }; - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) { - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) - { - Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); - Assert.True(enumeratorSimple.Current.UnusedPropertyWithPrivateSetter == 100); - } - Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); + Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); + Assert.True(enumeratorSimple.Current.UnusedPropertyWithPrivateSetter == 100); } + Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); } public class ClassWithInheritedProperties : BaseClassWithInheritedProperties { - private int _fInt; private long _fLong; private byte _fByte2; - public int IntProp { get { return _fInt; } set { _fInt = value; } } - public override long LongProp { get { return _fLong; } set { _fLong = value; } } - public override byte ByteProp { get { return _fByte2; } set { _fByte2 = value; } } + public int IntProp { get; set; } + public override long LongProp { get => _fLong; set => _fLong = value; } + public override byte ByteProp { get => _fByte2; set => _fByte2 = value; } } [Fact] @@ -613,15 +598,13 @@ public void ClassWithInheritedPropertiesConversion() new ClassWithInheritedProperties(){ IntProp=-1, StringProp ="", LongProp=2, ByteProp=4 }, }; - using (var env = new ConsoleEnvironment()) - { - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) - Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); - Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); - } + var env = new MLContext(); + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); + Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); } public class ClassWithArrays @@ -666,44 +649,30 @@ public void RoundTripConversionWithArrays() }; - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) { - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) - { - Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); - } - Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); + Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); } + Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); } public class ClassWithArrayProperties { - private string[] _fString; - private int[] _fInt; - private uint[] _fuInt; - private short[] _fShort; - private ushort[] _fuShort; - private sbyte[] _fsByte; - private byte[] _fByte; - private long[] _fLong; - private ulong[] _fuLong; - private float[] _fFloat; - private double[] _fDouble; - private bool[] _fBool; - public string[] StringProp { get { return _fString; } set { _fString = value; } } - public int[] IntProp { get { return _fInt; } set { _fInt = value; } } - public uint[] UIntProp { get { return _fuInt; } set { _fuInt = value; } } - public short[] ShortProp { get { return _fShort; } set { _fShort = value; } } - public ushort[] UShortProp { get { return _fuShort; } set { _fuShort = value; } } - public sbyte[] SByteProp { get { return _fsByte; } set { _fsByte = value; } } - public byte[] ByteProp { get { return _fByte; } set { _fByte = value; } } - public long[] LongProp { get { return _fLong; } set { _fLong = value; } } - public ulong[] ULongProp { get { return _fuLong; } set { _fuLong = value; } } - public float[] FloatProp { get { return _fFloat; } set { _fFloat = value; } } - public double[] DobuleProp { get { return _fDouble; } set { _fDouble = value; } } - public bool[] BoolProp { get { return _fBool; } set { _fBool = value; } } + public string[] StringProp { get; set; } + public int[] IntProp { get; set; } + public uint[] UIntProp { get; set; } + public short[] ShortProp { get; set; } + public ushort[] UShortProp { get; set; } + public sbyte[] SByteProp { get; set; } + public byte[] ByteProp { get; set; } + public long[] LongProp { get; set; } + public ulong[] ULongProp { get; set; } + public float[] FloatProp { get; set; } + public double[] DobuleProp { get; set; } + public bool[] BoolProp { get; set; } } [Fact] @@ -731,27 +700,23 @@ public void RoundTripConversionWithArrayPropertiess() new ClassWithArrayProperties() }; - using (var env = new ConsoleEnvironment()) - { - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) - { - Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); - } - Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); - } + var env = new MLContext(); + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); + Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); } - class ClassWithGetter + private sealed class ClassWithGetter { private DateTime _dateTime = DateTime.Now; - public float Day { get { return _dateTime.Day; } } - public int Hour { get { return _dateTime.Hour; } } + public float Day => _dateTime.Day; + public int Hour => _dateTime.Hour; } - class ClassWithSetter + private sealed class ClassWithSetter { public float Day { private get; set; } public int Hour { private get; set; } @@ -772,16 +737,14 @@ public void PrivateGetSetProperties() new ClassWithGetter() }; - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) { - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) - { - Assert.True(enumeratorSimple.Current.GetDay == originalEnumerator.Current.Day && - enumeratorSimple.Current.GetHour == originalEnumerator.Current.Hour); - } + Assert.True(enumeratorSimple.Current.GetDay == originalEnumerator.Current.Day && + enumeratorSimple.Current.GetHour == originalEnumerator.Current.Hour); } } } diff --git a/test/Microsoft.ML.Tests/ImagesTests.cs b/test/Microsoft.ML.Tests/ImagesTests.cs index 3c4522bf1d..cde998e2b4 100644 --- a/test/Microsoft.ML.Tests/ImagesTests.cs +++ b/test/Microsoft.ML.Tests/ImagesTests.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; using Microsoft.ML.Runtime.Api; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.ImageAnalytics; @@ -25,72 +26,69 @@ public ImageTests(ITestOutputHelper output) : base(output) [Fact] public void TestEstimatorChain() { - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var invalidData = TextLoader.Create(env, new TextLoader.Arguments() + }, new MultiFileSource(dataFile)); + var invalidData = TextLoader.Create(env, new TextLoader.Arguments() + { + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.R4, 0), } - }, new MultiFileSource(dataFile)); + }, new MultiFileSource(dataFile)); - var pipe = new ImageLoadingEstimator(env, imageFolder, ("ImagePath", "ImageReal")) - .Append(new ImageResizingEstimator(env, "ImageReal", "ImageReal", 100, 100)) - .Append(new ImagePixelExtractingEstimator(env, "ImageReal", "ImagePixels")) - .Append(new ImageGrayscalingEstimator(env, ("ImageReal", "ImageGray"))); + var pipe = new ImageLoadingEstimator(env, imageFolder, ("ImagePath", "ImageReal")) + .Append(new ImageResizingEstimator(env, "ImageReal", "ImageReal", 100, 100)) + .Append(new ImagePixelExtractingEstimator(env, "ImageReal", "ImagePixels")) + .Append(new ImageGrayscalingEstimator(env, ("ImageReal", "ImageGray"))); - TestEstimatorCore(pipe, data, null, invalidData); - } + TestEstimatorCore(pipe, data, null, invalidData); Done(); } [Fact] public void TestEstimatorSaveLoad() { - using (var env = new ConsoleEnvironment()) + IHostEnvironment env = new MLContext(); + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); + }, new MultiFileSource(dataFile)); - var pipe = new ImageLoadingEstimator(env, imageFolder, ("ImagePath", "ImageReal")) - .Append(new ImageResizingEstimator(env, "ImageReal", "ImageReal", 100, 100)) - .Append(new ImagePixelExtractingEstimator(env, "ImageReal", "ImagePixels")) - .Append(new ImageGrayscalingEstimator(env, ("ImageReal", "ImageGray"))); + var pipe = new ImageLoadingEstimator(env, imageFolder, ("ImagePath", "ImageReal")) + .Append(new ImageResizingEstimator(env, "ImageReal", "ImageReal", 100, 100)) + .Append(new ImagePixelExtractingEstimator(env, "ImageReal", "ImagePixels")) + .Append(new ImageGrayscalingEstimator(env, ("ImageReal", "ImageGray"))); - pipe.GetOutputSchema(Core.Data.SchemaShape.Create(data.Schema)); - var model = pipe.Fit(data); - - using (var file = env.CreateTempFile()) - { - using (var fs = file.CreateWriteStream()) - model.SaveTo(env, fs); - var model2 = TransformerChain.LoadFrom(env, file.OpenReadStream()); + pipe.GetOutputSchema(Core.Data.SchemaShape.Create(data.Schema)); + var model = pipe.Fit(data); - var newCols = ((ImageLoaderTransform)model2.First()).Columns; - var oldCols = ((ImageLoaderTransform)model.First()).Columns; - Assert.True(newCols - .Zip(oldCols, (x, y) => x == y) - .All(x => x)); - } + var tempPath = Path.GetTempFileName(); + using (var file = new SimpleFileHandle(env, tempPath, true, true)) + { + using (var fs = file.CreateWriteStream()) + model.SaveTo(env, fs); + var model2 = TransformerChain.LoadFrom(env, file.OpenReadStream()); + + var newCols = ((ImageLoaderTransform)model2.First()).Columns; + var oldCols = ((ImageLoaderTransform)model.First()).Columns; + Assert.True(newCols + .Zip(oldCols, (x, y) => x == y) + .All(x => x)); } Done(); } @@ -98,50 +96,48 @@ public void TestEstimatorSaveLoad() [Fact] public void TestSaveImages() { - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + { + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); + }, + ImageFolder = imageFolder + }, data); - IDataView cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + IDataView cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Name= "ImageCropped", Source = "ImageReal", ImageHeight =100, ImageWidth = 100, Resizing = ImageResizerTransform.ResizingKind.IsoPad} } - }, images); + }, images); - cropped.Schema.TryGetColumnIndex("ImagePath", out int pathColumn); - cropped.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = cropped.GetRowCursor((x) => true)) - { - var pathGetter = cursor.GetGetter>(pathColumn); - ReadOnlyMemory path = default; - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap bitmap = default; - while (cursor.MoveNext()) - { - pathGetter(ref path); - bitmapCropGetter(ref bitmap); - Assert.NotNull(bitmap); - var fileToSave = GetOutputPath(Path.GetFileNameWithoutExtension(path.ToString()) + ".cropped.jpg"); - bitmap.Save(fileToSave, System.Drawing.Imaging.ImageFormat.Jpeg); - } + cropped.Schema.TryGetColumnIndex("ImagePath", out int pathColumn); + cropped.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = cropped.GetRowCursor((x) => true)) + { + var pathGetter = cursor.GetGetter>(pathColumn); + ReadOnlyMemory path = default; + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap bitmap = default; + while (cursor.MoveNext()) + { + pathGetter(ref path); + bitmapCropGetter(ref bitmap); + Assert.NotNull(bitmap); + var fileToSave = GetOutputPath(Path.GetFileNameWithoutExtension(path.ToString()) + ".cropped.jpg"); + bitmap.Save(fileToSave, System.Drawing.Imaging.ImageFormat.Jpeg); } } Done(); @@ -150,68 +146,66 @@ public void TestSaveImages() [Fact] public void TestGreyscaleTransformImages() { - using (var env = new ConsoleEnvironment()) + IHostEnvironment env = new MLContext(); + var imageHeight = 150; + var imageWidth = 100; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var imageHeight = 150; - var imageWidth = 100; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + { + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Name= "ImageCropped", Source = "ImageReal", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - IDataView grey = ImageGrayscaleTransform.Create(env, new ImageGrayscaleTransform.Arguments() - { - Column = new ImageGrayscaleTransform.Column[1]{ + IDataView grey = ImageGrayscaleTransform.Create(env, new ImageGrayscaleTransform.Arguments() + { + Column = new ImageGrayscaleTransform.Column[1]{ new ImageGrayscaleTransform.Column() { Name= "ImageGrey", Source = "ImageCropped"} } - }, cropped); + }, cropped); - var fname = nameof(TestGreyscaleTransformImages) + "_model.zip"; + var fname = nameof(TestGreyscaleTransformImages) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(grey)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(grey)); - grey = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + grey = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - grey.Schema.TryGetColumnIndex("ImageGrey", out int greyColumn); - using (var cursor = grey.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(greyColumn); - Bitmap bitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref bitmap); - Assert.NotNull(bitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var pixel = bitmap.GetPixel(x, y); - // greyscale image has same values for R,G and B - Assert.True(pixel.R == pixel.G && pixel.G == pixel.B); - } - } + grey.Schema.TryGetColumnIndex("ImageGrey", out int greyColumn); + using (var cursor = grey.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(greyColumn); + Bitmap bitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref bitmap); + Assert.NotNull(bitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var pixel = bitmap.GetPixel(x, y); + // greyscale image has same values for R,G and B + Assert.True(pixel.R == pixel.G && pixel.G == pixel.B); + } } } Done(); @@ -220,88 +214,86 @@ public void TestGreyscaleTransformImages() [Fact] public void TestBackAndForthConversionWithAlphaInterleave() { - using (var env = new ConsoleEnvironment()) + IHostEnvironment env = new MLContext(); + const int imageHeight = 100; + const int imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var imageHeight = 100; - var imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + { + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = true, - Offset = 127.5f, - Scale = 2f / 255, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = true, + Offset = 127.5f, + Scale = 2f / 255, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=true} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = true, - Offset = -1f, - Scale = 255f / 2, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = true, + Offset = -1f, + Scale = 255f / 2, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=true} } - }, pixels); + }, pixels); - var fname = nameof(TestBackAndForthConversionWithAlphaInterleave) + "_model.zip"; + var fname = nameof(TestBackAndForthConversionWithAlphaInterleave) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c == r); - } - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c == r); + } } } Done(); @@ -310,88 +302,86 @@ public void TestBackAndForthConversionWithAlphaInterleave() [Fact] public void TestBackAndForthConversionWithoutAlphaInterleave() { - using (var env = new ConsoleEnvironment()) + IHostEnvironment env = new MLContext(); + const int imageHeight = 100; + const int imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var imageHeight = 100; - var imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + { + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = true, - Offset = 127.5f, - Scale = 2f / 255, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = true, + Offset = 127.5f, + Scale = 2f / 255, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=false} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = true, - Offset = -1f, - Scale = 255f / 2, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = true, + Offset = -1f, + Scale = 255f / 2, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=false} } - }, pixels); + }, pixels); - var fname = nameof(TestBackAndForthConversionWithoutAlphaInterleave) + "_model.zip"; + var fname = nameof(TestBackAndForthConversionWithoutAlphaInterleave) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); - } - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); + } } } Done(); @@ -400,88 +390,86 @@ public void TestBackAndForthConversionWithoutAlphaInterleave() [Fact] public void TestBackAndForthConversionWithAlphaNoInterleave() { - using (var env = new ConsoleEnvironment()) + IHostEnvironment env = new MLContext(); + const int imageHeight = 100; + const int imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var imageHeight = 100; - var imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + { + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = false, - Offset = 127.5f, - Scale = 2f / 255, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = false, + Offset = 127.5f, + Scale = 2f / 255, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=true} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = false, - Offset = -1f, - Scale = 255f / 2, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = false, + Offset = -1f, + Scale = 255f / 2, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=true} } - }, pixels); + }, pixels); - var fname = nameof(TestBackAndForthConversionWithAlphaNoInterleave) + "_model.zip"; + var fname = nameof(TestBackAndForthConversionWithAlphaNoInterleave) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c == r); - } - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c == r); + } } } Done(); @@ -490,88 +478,86 @@ public void TestBackAndForthConversionWithAlphaNoInterleave() [Fact] public void TestBackAndForthConversionWithoutAlphaNoInterleave() { - using (var env = new ConsoleEnvironment()) + IHostEnvironment env = new MLContext(); + const int imageHeight = 100; + const int imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var imageHeight = 100; - var imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + { + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = false, - Offset = 127.5f, - Scale = 2f / 255, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = false, + Offset = 127.5f, + Scale = 2f / 255, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=false} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = false, - Offset = -1f, - Scale = 255f / 2, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = false, + Offset = -1f, + Scale = 255f / 2, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=false} } - }, pixels); - - var fname = nameof(TestBackAndForthConversionWithoutAlphaNoInterleave) + "_model.zip"; + }, pixels); - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fname = nameof(TestBackAndForthConversionWithoutAlphaNoInterleave) + "_model.zip"; - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); - } - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); + } } } Done(); @@ -580,84 +566,82 @@ public void TestBackAndForthConversionWithoutAlphaNoInterleave() [Fact] public void TestBackAndForthConversionWithAlphaInterleaveNoOffset() { - using (var env = new ConsoleEnvironment()) + IHostEnvironment env = new MLContext(); + const int imageHeight = 100; + const int imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var imageHeight = 100; - var imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + { + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = true, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = true, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=true} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = true, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = true, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=true} } - }, pixels); + }, pixels); - var fname = nameof(TestBackAndForthConversionWithAlphaInterleaveNoOffset) + "_model.zip"; + var fname = nameof(TestBackAndForthConversionWithAlphaInterleaveNoOffset) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c == r); - } - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c == r); + } } } Done(); @@ -666,84 +650,82 @@ public void TestBackAndForthConversionWithAlphaInterleaveNoOffset() [Fact] public void TestBackAndForthConversionWithoutAlphaInterleaveNoOffset() { - using (var env = new ConsoleEnvironment()) + IHostEnvironment env = new MLContext(); + const int imageHeight = 100; + const int imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var imageHeight = 100; - var imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + { + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = true, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = true, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=false} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = true, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = true, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=false} } - }, pixels); + }, pixels); - var fname = nameof(TestBackAndForthConversionWithoutAlphaInterleaveNoOffset) + "_model.zip"; + var fname = nameof(TestBackAndForthConversionWithoutAlphaInterleaveNoOffset) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); - } - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); + } } } Done(); @@ -752,84 +734,82 @@ public void TestBackAndForthConversionWithoutAlphaInterleaveNoOffset() [Fact] public void TestBackAndForthConversionWithAlphaNoInterleaveNoOffset() { - using (var env = new ConsoleEnvironment()) + IHostEnvironment env = new MLContext(); + const int imageHeight = 100; + var imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var imageHeight = 100; - var imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + { + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = false, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = false, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=true} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = false, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = false, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=true} } - }, pixels); + }, pixels); - var fname = nameof(TestBackAndForthConversionWithAlphaNoInterleaveNoOffset) + "_model.zip"; + var fname = nameof(TestBackAndForthConversionWithAlphaNoInterleaveNoOffset) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c == r); - } - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c == r); + } } } Done(); @@ -838,87 +818,85 @@ public void TestBackAndForthConversionWithAlphaNoInterleaveNoOffset() [Fact] public void TestBackAndForthConversionWithoutAlphaNoInterleaveNoOffset() { - using (var env = new ConsoleEnvironment()) + IHostEnvironment env = new MLContext(); + const int imageHeight = 100; + const int imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var imageHeight = 100; - var imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + { + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = false, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = false, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=false} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = false, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = false, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=false} } - }, pixels); - - var fname = nameof(TestBackAndForthConversionWithoutAlphaNoInterleaveNoOffset) + "_model.zip"; + }, pixels); - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fname = nameof(TestBackAndForthConversionWithoutAlphaNoInterleaveNoOffset) + "_model.zip"; - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); - } - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); + } } + Done(); } - Done(); } } } diff --git a/test/Microsoft.ML.Tests/LearningPipelineTests.cs b/test/Microsoft.ML.Tests/LearningPipelineTests.cs index a459456a03..785fb38603 100644 --- a/test/Microsoft.ML.Tests/LearningPipelineTests.cs +++ b/test/Microsoft.ML.Tests/LearningPipelineTests.cs @@ -66,7 +66,7 @@ public void TransformOnlyPipeline() const string _dataPath = @"..\..\Data\breast-cancer.txt"; var pipeline = new Legacy.LearningPipeline(seed: 1, conc: 1); pipeline.Add(new ML.Legacy.Data.TextLoader(_dataPath).CreateFrom(useHeader: false)); - pipeline.Add(new CategoricalHashOneHotVectorizer("F1") { HashBits = 10, Seed = 314489979, OutputKind = CategoricalTransformOutputKind.Bag }); + pipeline.Add(new CategoricalHashOneHotVectorizer("F1") { HashBits = 10, Seed = 314489979, OutputKind = OneHotEncodingTransformerOutputKind.Bag }); var model = pipeline.Train(); var predictionModel = model.Predict(new InputData() { F1 = "5" }); diff --git a/test/Microsoft.ML.Tests/OnnxTests.cs b/test/Microsoft.ML.Tests/OnnxTests.cs index d6a88f83b4..8e513a5a93 100644 --- a/test/Microsoft.ML.Tests/OnnxTests.cs +++ b/test/Microsoft.ML.Tests/OnnxTests.cs @@ -82,70 +82,68 @@ public class BreastCancerClusterPrediction [Fact] public void InitializerCreationTest() { - using (var env = new ConsoleEnvironment()) - { - // Create the actual implementation - var ctxImpl = new OnnxContextImpl(env, "model", "ML.NET", "0", 0, "com.test", Runtime.Model.Onnx.OnnxVersion.Stable); - - // Use implementation as in the actual conversion code - var ctx = ctxImpl as OnnxContext; - ctx.AddInitializer(9.4f, "float"); - ctx.AddInitializer(17L, "int64"); - ctx.AddInitializer("36", "string"); - ctx.AddInitializer(new List { 9.4f, 1.7f, 3.6f }, new List { 1, 3 }, "floats"); - ctx.AddInitializer(new List { 94L, 17L, 36L }, new List { 1, 3 }, "int64s"); - ctx.AddInitializer(new List { "94" , "17", "36" }, new List { 1, 3 }, "strings"); - - var model = ctxImpl.MakeModel(); - - var floatScalar = model.Graph.Initializer[0]; - Assert.True(floatScalar.Name == "float"); - Assert.True(floatScalar.Dims.Count == 0); - Assert.True(floatScalar.FloatData.Count == 1); - Assert.True(floatScalar.FloatData[0] == 9.4f); - - var int64Scalar = model.Graph.Initializer[1]; - Assert.True(int64Scalar.Name == "int64"); - Assert.True(int64Scalar.Dims.Count == 0); - Assert.True(int64Scalar.Int64Data.Count == 1); - Assert.True(int64Scalar.Int64Data[0] == 17L); - - var stringScalar = model.Graph.Initializer[2]; - Assert.True(stringScalar.Name == "string"); - Assert.True(stringScalar.Dims.Count == 0); - Assert.True(stringScalar.StringData.Count == 1); - Assert.True(stringScalar.StringData[0].ToStringUtf8() == "36"); - - var floatsTensor = model.Graph.Initializer[3]; - Assert.True(floatsTensor.Name == "floats"); - Assert.True(floatsTensor.Dims.Count == 2); - Assert.True(floatsTensor.Dims[0] == 1); - Assert.True(floatsTensor.Dims[1] == 3); - Assert.True(floatsTensor.FloatData.Count == 3); - Assert.True(floatsTensor.FloatData[0] == 9.4f); - Assert.True(floatsTensor.FloatData[1] == 1.7f); - Assert.True(floatsTensor.FloatData[2] == 3.6f); - - var int64sTensor = model.Graph.Initializer[4]; - Assert.True(int64sTensor.Name == "int64s"); - Assert.True(int64sTensor.Dims.Count == 2); - Assert.True(int64sTensor.Dims[0] == 1); - Assert.True(int64sTensor.Dims[1] == 3); - Assert.True(int64sTensor.Int64Data.Count == 3); - Assert.True(int64sTensor.Int64Data[0] == 94L); - Assert.True(int64sTensor.Int64Data[1] == 17L); - Assert.True(int64sTensor.Int64Data[2] == 36L); - - var stringsTensor = model.Graph.Initializer[5]; - Assert.True(stringsTensor.Name == "strings"); - Assert.True(stringsTensor.Dims.Count == 2); - Assert.True(stringsTensor.Dims[0] == 1); - Assert.True(stringsTensor.Dims[1] == 3); - Assert.True(stringsTensor.StringData.Count == 3); - Assert.True(stringsTensor.StringData[0].ToStringUtf8() == "94"); - Assert.True(stringsTensor.StringData[1].ToStringUtf8() == "17"); - Assert.True(stringsTensor.StringData[2].ToStringUtf8() == "36"); - } + var env = new MLContext(); + // Create the actual implementation + var ctxImpl = new OnnxContextImpl(env, "model", "ML.NET", "0", 0, "com.test", Runtime.Model.Onnx.OnnxVersion.Stable); + + // Use implementation as in the actual conversion code + var ctx = ctxImpl as OnnxContext; + ctx.AddInitializer(9.4f, "float"); + ctx.AddInitializer(17L, "int64"); + ctx.AddInitializer("36", "string"); + ctx.AddInitializer(new List { 9.4f, 1.7f, 3.6f }, new List { 1, 3 }, "floats"); + ctx.AddInitializer(new List { 94L, 17L, 36L }, new List { 1, 3 }, "int64s"); + ctx.AddInitializer(new List { "94", "17", "36" }, new List { 1, 3 }, "strings"); + + var model = ctxImpl.MakeModel(); + + var floatScalar = model.Graph.Initializer[0]; + Assert.True(floatScalar.Name == "float"); + Assert.True(floatScalar.Dims.Count == 0); + Assert.True(floatScalar.FloatData.Count == 1); + Assert.True(floatScalar.FloatData[0] == 9.4f); + + var int64Scalar = model.Graph.Initializer[1]; + Assert.True(int64Scalar.Name == "int64"); + Assert.True(int64Scalar.Dims.Count == 0); + Assert.True(int64Scalar.Int64Data.Count == 1); + Assert.True(int64Scalar.Int64Data[0] == 17L); + + var stringScalar = model.Graph.Initializer[2]; + Assert.True(stringScalar.Name == "string"); + Assert.True(stringScalar.Dims.Count == 0); + Assert.True(stringScalar.StringData.Count == 1); + Assert.True(stringScalar.StringData[0].ToStringUtf8() == "36"); + + var floatsTensor = model.Graph.Initializer[3]; + Assert.True(floatsTensor.Name == "floats"); + Assert.True(floatsTensor.Dims.Count == 2); + Assert.True(floatsTensor.Dims[0] == 1); + Assert.True(floatsTensor.Dims[1] == 3); + Assert.True(floatsTensor.FloatData.Count == 3); + Assert.True(floatsTensor.FloatData[0] == 9.4f); + Assert.True(floatsTensor.FloatData[1] == 1.7f); + Assert.True(floatsTensor.FloatData[2] == 3.6f); + + var int64sTensor = model.Graph.Initializer[4]; + Assert.True(int64sTensor.Name == "int64s"); + Assert.True(int64sTensor.Dims.Count == 2); + Assert.True(int64sTensor.Dims[0] == 1); + Assert.True(int64sTensor.Dims[1] == 3); + Assert.True(int64sTensor.Int64Data.Count == 3); + Assert.True(int64sTensor.Int64Data[0] == 94L); + Assert.True(int64sTensor.Int64Data[1] == 17L); + Assert.True(int64sTensor.Int64Data[2] == 36L); + + var stringsTensor = model.Graph.Initializer[5]; + Assert.True(stringsTensor.Name == "strings"); + Assert.True(stringsTensor.Dims.Count == 2); + Assert.True(stringsTensor.Dims[0] == 1); + Assert.True(stringsTensor.Dims[1] == 3); + Assert.True(stringsTensor.StringData.Count == 3); + Assert.True(stringsTensor.StringData[0].ToStringUtf8() == "94"); + Assert.True(stringsTensor.StringData[1].ToStringUtf8() == "17"); + Assert.True(stringsTensor.StringData[2].ToStringUtf8() == "36"); } [Fact] @@ -259,9 +257,13 @@ public void KeyToVectorWithBagTest() }); var vectorizer = new CategoricalOneHotVectorizer(); - var categoricalColumn = new CategoricalTransformColumn() { - OutputKind = CategoricalTransformOutputKind.Bag, Name = "F2", Source = "F2" }; - vectorizer.Column = new CategoricalTransformColumn[1] { categoricalColumn }; + var categoricalColumn = new OneHotEncodingTransformerColumn() + { + OutputKind = OneHotEncodingTransformerOutputKind.Bag, + Name = "F2", + Source = "F2" + }; + vectorizer.Column = new OneHotEncodingTransformerColumn[1] { categoricalColumn }; pipeline.Add(vectorizer); pipeline.Add(new ColumnConcatenator("Features", "F1", "F2")); pipeline.Add(new FastTreeBinaryClassifier() { NumLeaves = 2, NumTrees = 1, MinDocumentsInLeafs = 2 }); @@ -306,7 +308,7 @@ public void WordEmbeddingsTest() { Separator = new[] { '\t' }, HasHeader = false, - Column = new [] + Column = new[] { new TextLoaderColumn() { @@ -317,7 +319,7 @@ public void WordEmbeddingsTest() } } }); - + var modelPath = GetDataPath(@"shortsentiment.emd"); var embed = new WordEmbeddings() { CustomLookupTable = modelPath }; embed.AddColumn("Cat", "Cat"); diff --git a/test/Microsoft.ML.Tests/RangeFilterTests.cs b/test/Microsoft.ML.Tests/RangeFilterTests.cs new file mode 100644 index 0000000000..5518eee472 --- /dev/null +++ b/test/Microsoft.ML.Tests/RangeFilterTests.cs @@ -0,0 +1,40 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Data; +using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.RunTests; +using System.Linq; +using System.Threading; +using Xunit; +using Xunit.Abstractions; + +namespace Microsoft.ML.Tests +{ + public class RangeFilterTests : TestDataPipeBase + { + public RangeFilterTests(ITestOutputHelper helper) : base(helper) + { + } + + [Fact] + public void RangeFilterTest() + { + var builder = new ArrayDataViewBuilder(ML); + builder.AddColumn("Strings", new[] { "foo", "bar", "baz" }); + builder.AddColumn("Floats", NumberType.R4, new float[] { 1, 2, 3 }); + var data = builder.GetDataView(); + + var data1 = ML.Data.FilterByColumn(data, "Floats", upperBound: 2.8); + var cnt = data1.GetColumn(ML, "Floats").Count(); + Assert.Equal(2L, cnt); + + data = ML.Transforms.Conversion.Hash("Strings", "Key", hashBits: 20).Fit(data).Transform(data); + var data2 = ML.Data.FilterByKeyColumnFraction(data, "Key", upperBound: 0.5); + cnt = data2.GetColumn(ML, "Floats").Count(); + Assert.Equal(1L, cnt); + } + } +} diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamples.cs b/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamples.cs index eaf42e4e96..870ce2cc34 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamples.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamples.cs @@ -153,7 +153,7 @@ private void TrainRegression(string trainDataPath, string testDataPath, string m [Fact] public void TrainRegressionModel() => TrainRegression(GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename), GetDataPath(TestDatasets.generatedRegressionDataset.testFilename), - DeleteOutputPath("cook_model.zip")); + DeleteOutputPath("cook_model_static.zip")); private ITransformer TrainOnIris(string irisDataPath) { @@ -442,10 +442,10 @@ private void TextFeaturizationOn(string dataPath) BagOfBigrams: r.Message.NormalizeText().ToBagofHashedWords(ngramLength: 2, allLengths: false), // NLP pipeline 3: bag of tri-character sequences with TF-IDF weighting. - BagOfTrichar: r.Message.TokenizeIntoCharacters().ToNgrams(ngramLength: 3, weighting: NgramTransform.WeightingCriteria.TfIdf), + BagOfTrichar: r.Message.TokenizeIntoCharacters().ToNgrams(ngramLength: 3, weighting: NgramCountingEstimator.WeightingCriteria.TfIdf), // NLP pipeline 4: word embeddings. - Embeddings: r.Message.NormalizeText().TokenizeText().WordEmbeddings(WordEmbeddingsTransform.PretrainedModelKind.GloVeTwitter25D) + Embeddings: r.Message.NormalizeText().TokenizeText().WordEmbeddings(WordEmbeddingsExtractingTransformer.PretrainedModelKind.GloVeTwitter25D) )); // Let's train our pipeline, and then apply it to the same data. @@ -624,7 +624,7 @@ private void MixMatch(string dataPath) IEstimator dynamicPipe = learningPipeline.AsDynamic; // Create a binary classification trainer. - var binaryTrainer = mlContext.BinaryClassification.Trainers.AveragedPerceptron(); + var binaryTrainer = mlContext.BinaryClassification.Trainers.AveragedPerceptron("Label", "Features"); // Append the OVA learner to the pipeline. dynamicPipe = dynamicPipe.Append(new Ova(mlContext, binaryTrainer)); @@ -654,7 +654,7 @@ private void MixMatch(string dataPath) var model = staticFinalPipe.Fit(data); // And here is how we could've stayed in the dynamic pipeline and train that way. - dynamicPipe = dynamicPipe.Append(new KeyToValueEstimator(mlContext, "PredictedLabel")); + dynamicPipe = dynamicPipe.Append(new KeyToValueMappingEstimator(mlContext, "PredictedLabel")); var dynamicModel = dynamicPipe.Fit(data.AsDynamic); // Now 'dynamicModel', and 'model.AsDynamic' are equivalent. diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs b/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs index 5d6bf62eeb..926b9c2d48 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs @@ -14,6 +14,8 @@ using Microsoft.ML.Transforms.Text; using System; using System.Collections.Generic; +using System.ComponentModel.Composition; +using System.ComponentModel.Composition.Hosting; using System.IO; using System.Linq; using Xunit; @@ -117,7 +119,7 @@ private void TrainRegression(string trainDataPath, string testDataPath, string m // between -1 and 1 for all examples), and then train the model. mlContext.Transforms.Normalize("FeatureVector") // Add the SDCA regression trainer. - .Append(mlContext.Regression.Trainers.StochasticDualCoordinateAscent(label: "Target", features: "FeatureVector")); + .Append(mlContext.Regression.Trainers.StochasticDualCoordinateAscent(labelColumn: "Target", featureColumn: "FeatureVector")); // Step three. Fit the pipeline to the training data. var model = dynamicPipeline.Fit(trainData); @@ -316,13 +318,13 @@ private void TextFeaturizationOn(string dataPath) // NLP pipeline 3: bag of tri-character sequences with TF-IDF weighting. .Append(mlContext.Transforms.Text.TokenizeCharacters("Message", "MessageChars")) - .Append(new NgramEstimator(mlContext, "MessageChars", "BagOfTrichar", - ngramLength: 3, weighting: NgramTransform.WeightingCriteria.TfIdf)) + .Append(new NgramCountingEstimator(mlContext, "MessageChars", "BagOfTrichar", + ngramLength: 3, weighting: NgramCountingEstimator.WeightingCriteria.TfIdf)) // NLP pipeline 4: word embeddings. .Append(mlContext.Transforms.Text.TokenizeWords("NormalizedMessage", "TokenizedMessage")) - .Append(mlContext.Transforms.Text.ExtractWordEmbeedings("TokenizedMessage", "Embeddings", - WordEmbeddingsTransform.PretrainedModelKind.GloVeTwitter25D)); + .Append(mlContext.Transforms.Text.ExtractWordEmbeddings("TokenizedMessage", "Embeddings", + WordEmbeddingsExtractingTransformer.PretrainedModelKind.GloVeTwitter25D)); // Let's train our pipeline, and then apply it to the same data. // Note that even on a small dataset of 70KB the pipeline above can take up to a minute to completely train. @@ -333,7 +335,7 @@ private void TextFeaturizationOn(string dataPath) var unigrams = transformedData.GetColumn(mlContext, "BagOfWords").Take(10).ToArray(); } - [Fact (Skip = "This test is running for one minute")] + [Fact(Skip = "This test is running for one minute")] public void TextFeaturization() => TextFeaturizationOn(GetDataPath("wikipedia-detox-250-line-data.tsv")); @@ -377,7 +379,7 @@ private void CategoricalFeaturizationOn(params string[] dataPath) // Convert each categorical feature into one-hot encoding independently. mlContext.Transforms.Categorical.OneHotEncoding("CategoricalFeatures", "CategoricalOneHot") // Convert all categorical features into indices, and build a 'word bag' of these. - .Append(mlContext.Transforms.Categorical.OneHotEncoding("CategoricalFeatures", "CategoricalBag", CategoricalTransform.OutputKind.Bag)) + .Append(mlContext.Transforms.Categorical.OneHotEncoding("CategoricalFeatures", "CategoricalBag", OneHotEncodingTransformer.OutputKind.Bag)) // One-hot encode the workclass column, then drop all the categories that have fewer than 10 instances in the train set. .Append(mlContext.Transforms.Categorical.OneHotEncoding("Workclass", "WorkclassOneHot")) .Append(new CountFeatureSelector(mlContext, "WorkclassOneHot", "WorkclassOneHotTrimmed", count: 10)); @@ -458,7 +460,7 @@ private void CrossValidationOn(string dataPath) var microAccuracies = cvResults.Select(r => r.metrics.AccuracyMicro); Console.WriteLine(microAccuracies.Average()); } - + [Fact] public void ReadData() { @@ -485,6 +487,99 @@ private void ReadDataDynamic(string dataPath) var data = reader.Read(dataPath); } + // Define a class for all the input columns that we intend to consume. + public class InputRow + { + public float Income { get; set; } + } + + // Define a class for all output columns that we intend to produce. + public class OutputRow + { + public bool Label { get; set; } + } + + [Fact] + public void CustomTransformer() + { + var mlContext = new MLContext(); + var data = mlContext.Data.ReadFromTextFile(new[] + { + new TextLoader.Column("Income", DataKind.R4, 2), + new TextLoader.Column("Features", DataKind.R4, 10, 12) + }, GetDataPath("adult.train"), s => { s.Separator = ","; s.HasHeader = true; }); + + PrepareData(mlContext, data); + TrainModel(mlContext, data); + + RunEndToEnd(mlContext, data, DeleteOutputPath("custom-model.zip")); + } + + /// + /// One class that contains all custom mappings that we need for our model. + /// + public class CustomMappings + { + // This is the custom mapping. We now separate it into a method, so that we can use it both in training and in loading. + public static void IncomeMapping(InputRow input, OutputRow output) => output.Label = input.Income > 50000; + + // MLContext is needed to create a new transformer. We are using 'Import' to have ML.NET populate + // this property. + [Import] + public MLContext MLContext { get; set; } + + // We are exporting the custom transformer by the name 'IncomeMapping'. + [Export(nameof(IncomeMapping))] + public ITransformer MyCustomTransformer + => MLContext.Transforms.CustomMappingTransformer(IncomeMapping, nameof(IncomeMapping)); + } + + private static void RunEndToEnd(MLContext mlContext, IDataView trainData, string modelPath) + { + // Construct the learning pipeline. Note that we are now providing a contract name for the custom mapping: + // otherwise we will not be able to save the model. + var estimator = mlContext.Transforms.CustomMapping(CustomMappings.IncomeMapping, nameof(CustomMappings.IncomeMapping)) + .Append(mlContext.BinaryClassification.Trainers.FastTree(labelColumn: "Label")); + + // Train the model. + var model = estimator.Fit(trainData); + + // Save the model. + using (var fs = File.Create(modelPath)) + mlContext.Model.Save(model, fs); + + // Now pretend we are in a different process. + var newContext = new MLContext(); + + // Create a custom composition container for all our custom mapping actions. + newContext.CompositionContainer = new CompositionContainer(new TypeCatalog(typeof(CustomMappings))); + + // Now we can load the model. + ITransformer loadedModel; + using (var fs = File.OpenRead(modelPath)) + loadedModel = newContext.Model.Load(fs); + } + + public static IDataView PrepareData(MLContext mlContext, IDataView data) + { + // Define the operation code. + Action mapping = (input, output) => output.Label = input.Income > 50000; + // Make a custom transformer and transform the data. + var transformer = mlContext.Transforms.CustomMappingTransformer(mapping, null); + return transformer.Transform(data); + } + + public static ITransformer TrainModel(MLContext mlContext, IDataView trainData) + { + // Define the custom operation. + Action mapping = (input, output) => output.Label = input.Income > 50000; + // Construct the learning pipeline. + var estimator = mlContext.Transforms.CustomMapping(mapping, null) + .Append(mlContext.BinaryClassification.Trainers.FastTree(labelColumn: "Label")); + + return estimator.Fit(trainData); + } + private class CustomerChurnInfo { public string CustomerID { get; set; } diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/CrossValidation.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/CrossValidation.cs index 55a88e28cb..1eeaf9c13c 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/CrossValidation.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/CrossValidation.cs @@ -4,7 +4,11 @@ using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.RunTests; +using Microsoft.ML.Transforms.Categorical; +using Microsoft.ML.Transforms.Conversions; using Xunit; +using System; +using System.Linq; namespace Microsoft.ML.Tests.Scenarios.Api { @@ -26,7 +30,7 @@ void New_CrossValidation() var data = ml.Data.TextReader(MakeSentimentTextLoaderArgs()).Read(GetDataPath(TestDatasets.Sentiment.trainFilename)); // Pipeline. var pipeline = ml.Transforms.Text.FeaturizeText("SentimentText", "Features") - .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: (s) => { s.ConvergenceTolerance = 1f; s.NumThreads = 1; })); + .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: (s) => { s.ConvergenceTolerance = 1f; s.NumThreads = 1; })); var cvResult = ml.BinaryClassification.CrossValidate(data, pipeline); } diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/DecomposableTrainAndPredict.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/DecomposableTrainAndPredict.cs index d316cf6ae9..a6a1bb6e6e 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/DecomposableTrainAndPredict.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/DecomposableTrainAndPredict.cs @@ -34,8 +34,8 @@ void New_DecomposableTrainAndPredict() var pipeline = new ColumnConcatenatingEstimator (ml, "Features", "SepalLength", "SepalWidth", "PetalLength", "PetalWidth") .Append(new ValueToKeyMappingEstimator(ml, "Label"), TransformerScope.TrainTest) - .Append(ml.MulticlassClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; })) - .Append(new KeyToValueEstimator(ml, "PredictedLabel")); + .Append(ml.MulticlassClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features",advancedSettings: s => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; })) + .Append(new KeyToValueMappingEstimator(ml, "PredictedLabel")); var model = pipeline.Fit(data).GetModelFor(TransformerScope.Scoring); var engine = model.MakePredictionFunction(ml); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Evaluation.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Evaluation.cs index 434264cbe7..ad249fa6e9 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Evaluation.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Evaluation.cs @@ -24,7 +24,7 @@ public void New_Evaluation() // Pipeline. var pipeline = ml.Data.TextReader(MakeSentimentTextLoaderArgs()) .Append(ml.Transforms.Text.FeaturizeText("SentimentText", "Features")) - .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => s.NumThreads = 1)); + .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: s => s.NumThreads = 1)); // Train. var readerModel = pipeline.Fit(new MultiFileSource(GetDataPath(TestDatasets.Sentiment.trainFilename))); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Extensibility.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Extensibility.cs index a6e81fbc96..5ab9cf377d 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Extensibility.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Extensibility.cs @@ -42,8 +42,8 @@ void New_Extensibility() var pipeline = new ColumnConcatenatingEstimator (ml, "Features", "SepalLength", "SepalWidth", "PetalLength", "PetalWidth") .Append(new CustomMappingEstimator(ml, action, null), TransformerScope.TrainTest) .Append(new ValueToKeyMappingEstimator(ml, "Label"), TransformerScope.TrainTest) - .Append(ml.MulticlassClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; })) - .Append(new KeyToValueEstimator(ml, "PredictedLabel")); + .Append(ml.MulticlassClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; })) + .Append(new KeyToValueMappingEstimator(ml, "PredictedLabel")); var model = pipeline.Fit(data).GetModelFor(TransformerScope.Scoring); var engine = model.MakePredictionFunction(ml); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/FileBasedSavingOfData.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/FileBasedSavingOfData.cs index d304c8bda8..667581c9b3 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/FileBasedSavingOfData.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/FileBasedSavingOfData.cs @@ -39,7 +39,7 @@ void New_FileBasedSavingOfData() DataSaverUtils.SaveDataView(ch, saver, trainData, file); } - var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => s.NumThreads = 1); + var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: s => s.NumThreads = 1); var loadedTrainData = new BinaryLoader(ml, new BinaryLoader.Arguments(), new MultiFileSource(path)); // Train. diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/IntrospectiveTraining.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/IntrospectiveTraining.cs index 60552a2863..d0ba9a82db 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/IntrospectiveTraining.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/IntrospectiveTraining.cs @@ -38,7 +38,7 @@ public void New_IntrospectiveTraining() .Read(GetDataPath(TestDatasets.Sentiment.trainFilename)); var pipeline = ml.Transforms.Text.FeaturizeText("SentimentText", "Features") - .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => s.NumThreads = 1)); + .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: s => s.NumThreads = 1)); // Train. var model = pipeline.Fit(data); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Metacomponents.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Metacomponents.cs index 6b8abd8d39..94206fefc4 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Metacomponents.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Metacomponents.cs @@ -27,12 +27,12 @@ public void New_Metacomponents() var data = ml.Data.TextReader(MakeIrisTextLoaderArgs()) .Read(GetDataPath(TestDatasets.irisData.trainFilename)); - var sdcaTrainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; }); + var sdcaTrainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; }); var pipeline = new ColumnConcatenatingEstimator (ml, "Features", "SepalLength", "SepalWidth", "PetalLength", "PetalWidth") .Append(new ValueToKeyMappingEstimator(ml, "Label"), TransformerScope.TrainTest) .Append(new Ova(ml, sdcaTrainer)) - .Append(new KeyToValueEstimator(ml, "PredictedLabel")); + .Append(new KeyToValueMappingEstimator(ml, "PredictedLabel")); var model = pipeline.Fit(data); } diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/MultithreadedPrediction.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/MultithreadedPrediction.cs index 784d14c770..4f52662d34 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/MultithreadedPrediction.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/MultithreadedPrediction.cs @@ -31,7 +31,7 @@ void New_MultithreadedPrediction() // Pipeline. var pipeline = ml.Transforms.Text.FeaturizeText("SentimentText", "Features") - .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => s.NumThreads = 1)); + .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: s => s.NumThreads = 1)); // Train. var model = pipeline.Fit(data); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/ReconfigurablePrediction.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/ReconfigurablePrediction.cs index 343d1ee6a9..5755efe56e 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/ReconfigurablePrediction.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/ReconfigurablePrediction.cs @@ -31,7 +31,7 @@ public void New_ReconfigurablePrediction() var pipeline = ml.Transforms.Text.FeaturizeText("SentimentText", "Features") .Fit(data); - var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: (s) => s.NumThreads = 1); + var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: (s) => s.NumThreads = 1); var trainData = pipeline.Transform(data); var model = trainer.Fit(trainData); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs index 907736ec43..ad1f37e161 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs @@ -26,7 +26,7 @@ public void New_SimpleTrainAndPredict() var data = reader.Read(GetDataPath(TestDatasets.Sentiment.trainFilename)); // Pipeline. var pipeline = ml.Transforms.Text.FeaturizeText("SentimentText", "Features") - .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => s.NumThreads = 1)); + .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: s => s.NumThreads = 1)); // Train. var model = pipeline.Fit(data); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainSaveModelAndPredict.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainSaveModelAndPredict.cs index 38902d75cf..630d9e71aa 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainSaveModelAndPredict.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainSaveModelAndPredict.cs @@ -30,7 +30,7 @@ public void New_TrainSaveModelAndPredict() // Pipeline. var pipeline = ml.Transforms.Text.FeaturizeText("SentimentText", "Features") - .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => s.NumThreads = 1)); + .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: s => s.NumThreads = 1)); // Train. var model = pipeline.Fit(data); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithInitialPredictor.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithInitialPredictor.cs index 4b29dd16d3..32486abb27 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithInitialPredictor.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithInitialPredictor.cs @@ -31,14 +31,14 @@ public void New_TrainWithInitialPredictor() var trainData = pipeline.Fit(data).Transform(data); // Train the first predictor. - var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => s.NumThreads = 1); + var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features",advancedSettings: s => s.NumThreads = 1); var firstModel = trainer.Fit(trainData); // Train the second predictor on the same data. - var secondTrainer = ml.BinaryClassification.Trainers.AveragedPerceptron(); + var secondTrainer = ml.BinaryClassification.Trainers.AveragedPerceptron("Label","Features"); var trainRoles = new RoleMappedData(trainData, label: "Label", feature: "Features"); - var finalModel = secondTrainer.Train(new TrainContext(trainRoles, initialPredictor: firstModel.Model)); + var finalModel = ((ITrainer)secondTrainer).Train(new TrainContext(trainRoles, initialPredictor: firstModel.Model)); } } diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithValidationSet.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithValidationSet.cs index 4a977a6b2b..07c9ebeb8a 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithValidationSet.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithValidationSet.cs @@ -30,7 +30,7 @@ public void New_TrainWithValidationSet() var validData = preprocess.Transform(reader.Read(GetDataPath(TestDatasets.Sentiment.testFilename))); // Train model with validation set. - var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(); + var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label","Features"); var model = trainer.Train(trainData, validData); } } diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs b/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs index 5115a25be9..b3086a68a1 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs @@ -62,80 +62,78 @@ private class TwoIChannelsOnlyOneWithAttribute [Fact] public void CursorChannelExposedInMapTransform() { - using (var env = new ConsoleEnvironment(0)) - { - // Correct use of CursorChannel attribute. - var data1 = Utils.CreateArray(10, new OneIChannelWithAttribute()); - var idv1 = env.CreateDataView(data1); - Assert.Null(data1[0].Channel); - - var filter1 = LambdaTransform.CreateFilter(env, idv1, - (input, state) => - { - Assert.NotNull(input.Channel); - return false; - }, null); - filter1.GetRowCursor(col => true).MoveNext(); - - // Error case: non-IChannel field marked with attribute. - var data2 = Utils.CreateArray(10, new OneStringWithAttribute()); - var idv2 = env.CreateDataView(data2); - Assert.Null(data2[0].Channel); - - var filter2 = LambdaTransform.CreateFilter(env, idv2, - (input, state) => - { - Assert.Null(input.Channel); - return false; - }, null); - try + var env = new MLContext(seed: 0); + // Correct use of CursorChannel attribute. + var data1 = Utils.CreateArray(10, new OneIChannelWithAttribute()); + var idv1 = env.CreateDataView(data1); + Assert.Null(data1[0].Channel); + + var filter1 = LambdaTransform.CreateFilter(env, idv1, + (input, state) => { - filter2.GetRowCursor(col => true).MoveNext(); - Assert.True(false, "Throw an error if attribute is applied to a field that is not an IChannel."); - } - catch (InvalidOperationException ex) + Assert.NotNull(input.Channel); + return false; + }, null); + filter1.GetRowCursor(col => true).MoveNext(); + + // Error case: non-IChannel field marked with attribute. + var data2 = Utils.CreateArray(10, new OneStringWithAttribute()); + var idv2 = env.CreateDataView(data2); + Assert.Null(data2[0].Channel); + + var filter2 = LambdaTransform.CreateFilter(env, idv2, + (input, state) => { - Assert.True(ex.IsMarked()); - } + Assert.Null(input.Channel); + return false; + }, null); + try + { + filter2.GetRowCursor(col => true).MoveNext(); + Assert.True(false, "Throw an error if attribute is applied to a field that is not an IChannel."); + } + catch (InvalidOperationException ex) + { + Assert.True(ex.IsMarked()); + } - // Error case: multiple fields marked with attributes. - var data3 = Utils.CreateArray(10, new TwoIChannelsWithAttributes()); - var idv3 = env.CreateDataView(data3); - Assert.Null(data3[0].ChannelOne); - Assert.Null(data3[2].ChannelTwo); + // Error case: multiple fields marked with attributes. + var data3 = Utils.CreateArray(10, new TwoIChannelsWithAttributes()); + var idv3 = env.CreateDataView(data3); + Assert.Null(data3[0].ChannelOne); + Assert.Null(data3[2].ChannelTwo); - var filter3 = LambdaTransform.CreateFilter(env, idv3, - (input, state) => - { - Assert.Null(input.ChannelOne); - Assert.Null(input.ChannelTwo); - return false; - }, null); - try + var filter3 = LambdaTransform.CreateFilter(env, idv3, + (input, state) => { - filter3.GetRowCursor(col => true).MoveNext(); - Assert.True(false, "Throw an error if attribute is applied to a field that is not an IChannel."); - } - catch (InvalidOperationException ex) - { - Assert.True(ex.IsMarked()); - } + Assert.Null(input.ChannelOne); + Assert.Null(input.ChannelTwo); + return false; + }, null); + try + { + filter3.GetRowCursor(col => true).MoveNext(); + Assert.True(false, "Throw an error if attribute is applied to a field that is not an IChannel."); + } + catch (InvalidOperationException ex) + { + Assert.True(ex.IsMarked()); + } - // Correct case: non-marked IChannel field is not touched. - var example4 = new TwoIChannelsOnlyOneWithAttribute(); - Assert.Null(example4.ChannelTwo); - Assert.Null(example4.ChannelOne); - var idv4 = env.CreateDataView(Utils.CreateArray(10, example4)); + // Correct case: non-marked IChannel field is not touched. + var example4 = new TwoIChannelsOnlyOneWithAttribute(); + Assert.Null(example4.ChannelTwo); + Assert.Null(example4.ChannelOne); + var idv4 = env.CreateDataView(Utils.CreateArray(10, example4)); - var filter4 = LambdaTransform.CreateFilter(env, idv4, - (input, state) => - { - Assert.Null(input.ChannelOne); - Assert.NotNull(input.ChannelTwo); - return false; - }, null); - filter1.GetRowCursor(col => true).MoveNext(); - } + var filter4 = LambdaTransform.CreateFilter(env, idv4, + (input, state) => + { + Assert.Null(input.ChannelOne); + Assert.NotNull(input.ChannelTwo); + return false; + }, null); + filter1.GetRowCursor(col => true).MoveNext(); } public class BreastCancerExample @@ -149,44 +147,40 @@ public class BreastCancerExample [Fact] public void LambdaTransformCreate() { - using (var env = new ConsoleEnvironment(42)) - { - var data = ReadBreastCancerExamples(); - var idv = env.CreateDataView(data); + var env = new MLContext(seed: 42); + var data = ReadBreastCancerExamples(); + var idv = env.CreateDataView(data); - var filter = LambdaTransform.CreateFilter(env, idv, - (input, state) => input.Label == 0, null); + var filter = LambdaTransform.CreateFilter(env, idv, + (input, state) => input.Label == 0, null); - Assert.Null(filter.GetRowCount(false)); + Assert.Null(filter.GetRowCount()); - // test re-apply - var applied = env.CreateDataView(data); - applied = ApplyTransformUtils.ApplyAllTransformsToData(env, filter, applied); + // test re-apply + var applied = env.CreateDataView(data); + applied = ApplyTransformUtils.ApplyAllTransformsToData(env, filter, applied); - var saver = new TextSaver(env, new TextSaver.Arguments()); - Assert.True(applied.Schema.TryGetColumnIndex("Label", out int label)); - using (var fs = File.Create(GetOutputPath(OutputRelativePath, "lambda-output.tsv"))) - saver.SaveData(fs, applied, label); - } + var saver = new TextSaver(env, new TextSaver.Arguments()); + Assert.True(applied.Schema.TryGetColumnIndex("Label", out int label)); + using (var fs = File.Create(GetOutputPath(OutputRelativePath, "lambda-output.tsv"))) + saver.SaveData(fs, applied, label); } [Fact] public void TrainAveragedPerceptronWithCache() { - using (var env = new ConsoleEnvironment(0)) - { - var dataFile = GetDataPath("breast-cancer.txt"); - var loader = TextLoader.Create(env, new TextLoader.Arguments(), new MultiFileSource(dataFile)); - var globalCounter = 0; - var xf = LambdaTransform.CreateFilter(env, loader, - (i, s) => true, - s => { globalCounter++; }); + var env = new MLContext(0); + var dataFile = GetDataPath("breast-cancer.txt"); + var loader = TextLoader.Create(env, new TextLoader.Arguments(), new MultiFileSource(dataFile)); + var globalCounter = 0; + var xf = LambdaTransform.CreateFilter(env, loader, + (i, s) => true, + s => { globalCounter++; }); - new AveragedPerceptronTrainer(env, "Label", "Features", numIterations: 2).Fit(xf).Transform(xf); + new AveragedPerceptronTrainer(env, "Label", "Features", numIterations: 2).Fit(xf).Transform(xf); - // Make sure there were 2 cursoring events. - Assert.Equal(1, globalCounter); - } + // Make sure there were 2 cursoring events. + Assert.Equal(1, globalCounter); } private List ReadBreastCancerExamples() diff --git a/test/Microsoft.ML.Tests/Scenarios/OvaTest.cs b/test/Microsoft.ML.Tests/Scenarios/OvaTest.cs new file mode 100644 index 0000000000..4e22905a4a --- /dev/null +++ b/test/Microsoft.ML.Tests/Scenarios/OvaTest.cs @@ -0,0 +1,148 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Data; +using Microsoft.ML.Runtime.Learners; +using Microsoft.ML.Trainers.FastTree; +using Microsoft.ML.Trainers.Online; +using Xunit; + +namespace Microsoft.ML.Scenarios +{ + public partial class ScenariosTests + { + [Fact] + public void OvaLogisticRegression() + { + string dataPath = GetDataPath("iris.txt"); + + // Create a new context for ML.NET operations. It can be used for exception tracking and logging, + // as a catalog of available operations and as the source of randomness. + var mlContext = new MLContext(seed: 1); + var reader = new TextLoader(mlContext, new TextLoader.Arguments() + { + Column = new[] + { + new TextLoader.Column("Label", DataKind.R4, 0), + new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(1, 4) }), + } + }); + + // Data + var data = reader.Read(GetDataPath(dataPath)); + + // Pipeline + var pipeline = new Ova( + mlContext, + new LogisticRegression(mlContext, "Label", "Features"), + useProbabilities: false); + + var model = pipeline.Fit(data); + var predictions = model.Transform(data); + + // Metrics + var metrics = mlContext.MulticlassClassification.Evaluate(predictions); + Assert.True(metrics.AccuracyMicro > 0.94); + } + + [Fact] + public void OvaAveragedPerceptron() + { + string dataPath = GetDataPath("iris.txt"); + + // Create a new context for ML.NET operations. It can be used for exception tracking and logging, + // as a catalog of available operations and as the source of randomness. + var mlContext = new MLContext(seed: 1); + var reader = new TextLoader(mlContext, new TextLoader.Arguments() + { + Column = new[] + { + new TextLoader.Column("Label", DataKind.R4, 0), + new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(1, 4) }), + } + }); + + // Data + var data = reader.Read(GetDataPath(dataPath)); + + // Pipeline + var pipeline = new Ova( + mlContext, + new AveragedPerceptronTrainer(mlContext, "Label", "Features", advancedSettings: s => { s.Shuffle = true; s.Calibrator = null; }), + useProbabilities: false); + + var model = pipeline.Fit(data); + var predictions = model.Transform(data); + + // Metrics + var metrics = mlContext.MulticlassClassification.Evaluate(predictions); + Assert.True(metrics.AccuracyMicro > 0.71); + } + + [Fact] + public void OvaFastTree() + { + string dataPath = GetDataPath("iris.txt"); + + // Create a new context for ML.NET operations. It can be used for exception tracking and logging, + // as a catalog of available operations and as the source of randomness. + var mlContext = new MLContext(seed: 1); + var reader = new TextLoader(mlContext, new TextLoader.Arguments() + { + Column = new[] + { + new TextLoader.Column("Label", DataKind.R4, 0), + new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(1, 4) }), + } + }); + + // Data + var data = reader.Read(GetDataPath(dataPath)); + + // Pipeline + var pipeline = new Ova( + mlContext, + new FastTreeBinaryClassificationTrainer(mlContext, "Label", "Features", advancedSettings: s => { s.NumThreads = 1; }), + useProbabilities: false); + + var model = pipeline.Fit(data); + var predictions = model.Transform(data); + + // Metrics + var metrics = mlContext.MulticlassClassification.Evaluate(predictions); + Assert.True(metrics.AccuracyMicro > 0.99); + } + + [Fact] + public void OvaLinearSvm() + { + string dataPath = GetDataPath("iris.txt"); + + // Create a new context for ML.NET operations. It can be used for exception tracking and logging, + // as a catalog of available operations and as the source of randomness. + var mlContext = new MLContext(seed: 1); + var reader = new TextLoader(mlContext, new TextLoader.Arguments() + { + Column = new[] + { + new TextLoader.Column("Label", DataKind.R4, 0), + new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(1, 4) }), + } + }); + + // Data + var data = reader.Read(GetDataPath(dataPath)); + + // Pipeline + var pipeline = new Ova(mlContext, new LinearSvm(mlContext, new LinearSvm.Arguments()), useProbabilities: false); + + var model = pipeline.Fit(data); + var predictions = model.Transform(data); + + // Metrics + var metrics = mlContext.MulticlassClassification.Evaluate(predictions); + Assert.True(metrics.AccuracyMicro > 0.83); + } + } +} diff --git a/test/Microsoft.ML.Tests/Scenarios/SentimentPredictionTests.cs b/test/Microsoft.ML.Tests/Scenarios/SentimentPredictionTests.cs index 089edc4407..a67834cda0 100644 --- a/test/Microsoft.ML.Tests/Scenarios/SentimentPredictionTests.cs +++ b/test/Microsoft.ML.Tests/Scenarios/SentimentPredictionTests.cs @@ -420,8 +420,7 @@ private LearningPipeline PreparePipelineSymSGD() WordFeatureExtractor = new NGramNgramExtractor() { NgramLength = 2, AllLengths = true } }); - - pipeline.Add(new SymSgdBinaryClassifier() { NumberOfThreads = 1}); + pipeline.Add(new SymSgdBinaryClassifier() { NumberOfThreads = 1 }); pipeline.Add(new PredictedLabelColumnOriginalValueConverter() { PredictedLabelColumn = "PredictedLabel" }); return pipeline; diff --git a/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs b/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs index e0abab35b4..7d4b248dcb 100644 --- a/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs +++ b/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs @@ -5,7 +5,6 @@ using Microsoft.ML.Legacy.Trainers; using Microsoft.ML.Legacy.Transforms; using Microsoft.ML.Runtime.Api; -using Microsoft.ML.Transforms.TensorFlow; using System; using System.IO; using Xunit; diff --git a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs index 8ed4aa335e..f4f95243d5 100644 --- a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs +++ b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs @@ -2,12 +2,14 @@ // 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.Data; using Microsoft.ML.Legacy.Models; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Api; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Learners; using Microsoft.ML.Runtime.Model; +using Microsoft.ML.Runtime.RunTests; using Microsoft.ML.Trainers; using Microsoft.ML.Transforms.Normalizers; using System; @@ -21,56 +23,43 @@ public partial class ScenariosTests [Fact] public void TrainAndPredictIrisModelUsingDirectInstantiationTest() { - string dataPath = GetDataPath("iris.txt"); - string testDataPath = dataPath; + var mlContext = new MLContext(seed: 1, conc: 1); - using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) + var reader = mlContext.Data.TextReader(new TextLoader.Arguments() { - // Pipeline - var loader = TextLoader.ReadFile(env, - new TextLoader.Arguments() - { - HasHeader = false, - Column = new[] - { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("SepalLength", DataKind.R4, 1), - new TextLoader.Column("SepalWidth", DataKind.R4, 2), - new TextLoader.Column("PetalLength", DataKind.R4, 3), - new TextLoader.Column("PetalWidth", DataKind.R4, 4) - } - }, new MultiFileSource(dataPath)); - - IDataView pipeline = new ConcatTransform(env, "Features", - "SepalLength", "SepalWidth", "PetalLength", "PetalWidth").Transform(loader); - - // NormalizingEstimator is not automatically added though the trainer has 'NormalizeFeatures' On/Auto - pipeline = NormalizeTransform.CreateMinMaxNormalizer(env, pipeline, "Features"); - - // Train - var trainer = new SdcaMultiClassTrainer(env, "Features", "Label", advancedSettings: (s) => s.NumThreads = 1); - - // Explicity adding CacheDataView since caching is not working though trainer has 'Caching' On/Auto - var cached = new CacheDataView(env, pipeline, prefetch: null); - var trainRoles = new RoleMappedData(cached, label: "Label", feature: "Features"); - var pred = trainer.Train(trainRoles); - - // Get scorer and evaluate the predictions from test data - IDataScorerTransform testDataScorer = GetScorer(env, pipeline, pred, testDataPath); - var metrics = Evaluate(env, testDataScorer); - CompareMatrics(metrics); - - // Create prediction engine and test predictions - var model = env.CreatePredictionEngine(testDataScorer); - ComparePredictions(model); - - // Get feature importance i.e. weight vector - var summary = ((MulticlassLogisticRegressionPredictor)pred).GetSummaryInKeyValuePairs(trainRoles.Schema); - Assert.Equal(7.757864, Convert.ToDouble(summary[0].Value), 5); - } + HasHeader = false, + Column = new[] + { + new TextLoader.Column("Label", DataKind.R4, 0), + new TextLoader.Column("SepalLength", DataKind.R4, 1), + new TextLoader.Column("SepalWidth", DataKind.R4, 2), + new TextLoader.Column("PetalLength", DataKind.R4, 3), + new TextLoader.Column("PetalWidth", DataKind.R4, 4) + } + }); + + var pipe = mlContext.Transforms.Concatenate("Features", "SepalLength", "SepalWidth", "PetalLength", "PetalWidth") + .Append(mlContext.Transforms.Normalize("Features")) + .Append(mlContext.MulticlassClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: s => s.NumThreads = 1)); + + // Read training and test data sets + string dataPath = GetDataPath(TestDatasets.iris.trainFilename); + string testDataPath = dataPath; + var trainData = reader.Read(dataPath); + var testData = reader.Read(testDataPath); + + // Train the pipeline + var trainedModel = pipe.Fit(trainData); + + // Make prediction and then evaluate the trained pipeline + var predicted = trainedModel.Transform(testData); + var metrics = mlContext.MulticlassClassification.Evaluate(predicted); + CompareMatrics(metrics); + var predictFunction = trainedModel.MakePredictionFunction(mlContext); + ComparePredictions(predictFunction); } - private void ComparePredictions(PredictionEngine model) + private void ComparePredictions(PredictionFunction model) { IrisPrediction prediction = model.Predict(new IrisData() { @@ -109,46 +98,17 @@ private void ComparePredictions(PredictionEngine model Assert.Equal(0, prediction.PredictedLabels[2], 2); } - private void CompareMatrics(ClassificationMetrics metrics) + private void CompareMatrics(MultiClassClassifierEvaluator.Result metrics) { Assert.Equal(.98, metrics.AccuracyMacro); Assert.Equal(.98, metrics.AccuracyMicro, 2); - Assert.Equal(.06, metrics.LogLoss, 2); + Assert.InRange(metrics.LogLoss, .05, .06); Assert.InRange(metrics.LogLossReduction, 94, 96); - Assert.Equal(1, metrics.TopKAccuracy); Assert.Equal(3, metrics.PerClassLogLoss.Length); Assert.Equal(0, metrics.PerClassLogLoss[0], 1); Assert.Equal(.1, metrics.PerClassLogLoss[1], 1); Assert.Equal(.1, metrics.PerClassLogLoss[2], 1); - - ConfusionMatrix matrix = metrics.ConfusionMatrix; - Assert.Equal(3, matrix.Order); - Assert.Equal(3, matrix.ClassNames.Count); - Assert.Equal("0", matrix.ClassNames[0]); - Assert.Equal("1", matrix.ClassNames[1]); - Assert.Equal("2", matrix.ClassNames[2]); - - Assert.Equal(50, matrix[0, 0]); - Assert.Equal(50, matrix["0", "0"]); - Assert.Equal(0, matrix[0, 1]); - Assert.Equal(0, matrix["0", "1"]); - Assert.Equal(0, matrix[0, 2]); - Assert.Equal(0, matrix["0", "2"]); - - Assert.Equal(0, matrix[1, 0]); - Assert.Equal(0, matrix["1", "0"]); - Assert.Equal(48, matrix[1, 1]); - Assert.Equal(48, matrix["1", "1"]); - Assert.Equal(2, matrix[1, 2]); - Assert.Equal(2, matrix["1", "2"]); - - Assert.Equal(0, matrix[2, 0]); - Assert.Equal(0, matrix["2", "0"]); - Assert.Equal(1, matrix[2, 1]); - Assert.Equal(1, matrix["2", "1"]); - Assert.Equal(49, matrix[2, 2]); - Assert.Equal(49, matrix["2", "2"]); } private ClassificationMetrics Evaluate(IHostEnvironment env, IDataView scoredData) diff --git a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/SentimentPredictionTests.cs b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/SentimentPredictionTests.cs index 60892e9325..820d146cc1 100644 --- a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/SentimentPredictionTests.cs +++ b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/SentimentPredictionTests.cs @@ -22,10 +22,9 @@ public void TrainAndPredictSentimentModelWithDirectionInstantiationTest() var dataPath = GetDataPath(SentimentDataPath); var testDataPath = GetDataPath(SentimentTestPath); - using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) - { - // Pipeline - var loader = TextLoader.ReadFile(env, + var env = new MLContext(seed: 1, conc: 1); + // Pipeline + var loader = TextLoader.ReadFile(env, new TextLoader.Arguments() { Separator = "tab", @@ -37,46 +36,45 @@ public void TrainAndPredictSentimentModelWithDirectionInstantiationTest() } }, new MultiFileSource(dataPath)); - var trans = TextFeaturizingEstimator.Create(env, new TextFeaturizingEstimator.Arguments() + var trans = TextFeaturizingEstimator.Create(env, new TextFeaturizingEstimator.Arguments() + { + Column = new TextFeaturizingEstimator.Column { - Column = new TextFeaturizingEstimator.Column - { - Name = "Features", - Source = new[] { "SentimentText" } - }, - OutputTokens = true, - KeepPunctuations = false, - StopWordsRemover = new PredefinedStopWordsRemoverFactory(), - VectorNormalizer = TextFeaturizingEstimator.TextNormKind.L2, - CharFeatureExtractor = new NgramExtractorTransform.NgramExtractorArguments() { NgramLength = 3, AllLengths = false }, - WordFeatureExtractor = new NgramExtractorTransform.NgramExtractorArguments() { NgramLength = 2, AllLengths = true }, + Name = "Features", + Source = new[] { "SentimentText" } }, - loader); - - // Train - var trainer = new FastTreeBinaryClassificationTrainer(env, DefaultColumnNames.Label, DefaultColumnNames.Features, - numLeaves:5, numTrees:5, minDocumentsInLeafs: 2); - - var trainRoles = new RoleMappedData(trans, label: "Label", feature: "Features"); - var pred = trainer.Train(trainRoles); - - // Get scorer and evaluate the predictions from test data - IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); - var metrics = EvaluateBinary(env, testDataScorer); - ValidateBinaryMetrics(metrics); - - // Create prediction engine and test predictions - var model = env.CreateBatchPredictionEngine(testDataScorer); - var sentiments = GetTestData(); - var predictions = model.Predict(sentiments, false); - Assert.Equal(2, predictions.Count()); - Assert.True(predictions.ElementAt(0).Sentiment); - Assert.True(predictions.ElementAt(1).Sentiment); - - // Get feature importance based on feature gain during training - var summary = ((FeatureWeightsCalibratedPredictor)pred).GetSummaryInKeyValuePairs(trainRoles.Schema); - Assert.Equal(1.0, (double)summary[0].Value, 1); - } + OutputTokens = true, + KeepPunctuations = false, + StopWordsRemover = new PredefinedStopWordsRemoverFactory(), + VectorNormalizer = TextFeaturizingEstimator.TextNormKind.L2, + CharFeatureExtractor = new NgramExtractingTransformer.NgramExtractorArguments() { NgramLength = 3, AllLengths = false }, + WordFeatureExtractor = new NgramExtractingTransformer.NgramExtractorArguments() { NgramLength = 2, AllLengths = true }, + }, + loader); + + // Train + var trainer = new FastTreeBinaryClassificationTrainer(env, DefaultColumnNames.Label, DefaultColumnNames.Features, + numLeaves: 5, numTrees: 5, minDatapointsInLeaves: 2); + + var trainRoles = new RoleMappedData(trans, label: "Label", feature: "Features"); + var pred = trainer.Train(trainRoles); + + // Get scorer and evaluate the predictions from test data + IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); + var metrics = EvaluateBinary(env, testDataScorer); + ValidateBinaryMetrics(metrics); + + // Create prediction engine and test predictions + var model = env.CreateBatchPredictionEngine(testDataScorer); + var sentiments = GetTestData(); + var predictions = model.Predict(sentiments, false); + Assert.Equal(2, predictions.Count()); + Assert.True(predictions.ElementAt(0).Sentiment); + Assert.True(predictions.ElementAt(1).Sentiment); + + // Get feature importance based on feature gain during training + var summary = ((FeatureWeightsCalibratedPredictor)pred).GetSummaryInKeyValuePairs(trainRoles.Schema); + Assert.Equal(1.0, (double)summary[0].Value, 1); } [Fact] @@ -85,10 +83,9 @@ public void TrainAndPredictSentimentModelWithDirectionInstantiationTestWithWordE var dataPath = GetDataPath(SentimentDataPath); var testDataPath = GetDataPath(SentimentTestPath); - using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) - { - // Pipeline - var loader = TextLoader.ReadFile(env, + var env = new MLContext(seed: 1, conc: 1); + // Pipeline + var loader = TextLoader.ReadFile(env, new TextLoader.Arguments() { Separator = "tab", @@ -100,60 +97,60 @@ public void TrainAndPredictSentimentModelWithDirectionInstantiationTestWithWordE } }, new MultiFileSource(dataPath)); - var text = TextFeaturizingEstimator.Create(env, new TextFeaturizingEstimator.Arguments() + var text = TextFeaturizingEstimator.Create(env, new TextFeaturizingEstimator.Arguments() + { + Column = new TextFeaturizingEstimator.Column { - Column = new TextFeaturizingEstimator.Column - { - Name = "WordEmbeddings", - Source = new[] { "SentimentText" } - }, - OutputTokens = true, - KeepPunctuations= false, - StopWordsRemover = new PredefinedStopWordsRemoverFactory(), - VectorNormalizer = TextFeaturizingEstimator.TextNormKind.None, - CharFeatureExtractor = null, - WordFeatureExtractor = null, + Name = "WordEmbeddings", + Source = new[] { "SentimentText" } }, - loader); - - var trans = WordEmbeddingsTransform.Create(env, new WordEmbeddingsTransform.Arguments() + OutputTokens = true, + KeepPunctuations = false, + StopWordsRemover = new PredefinedStopWordsRemoverFactory(), + VectorNormalizer = TextFeaturizingEstimator.TextNormKind.None, + CharFeatureExtractor = null, + WordFeatureExtractor = null, + }, + loader); + + var trans = WordEmbeddingsExtractingTransformer.Create(env, new WordEmbeddingsExtractingTransformer.Arguments() + { + Column = new WordEmbeddingsExtractingTransformer.Column[1] { - Column = new WordEmbeddingsTransform.Column[1] - { - new WordEmbeddingsTransform.Column + new WordEmbeddingsExtractingTransformer.Column { Name = "Features", Source = "WordEmbeddings_TransformedText" } - }, - ModelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe, - }, text); - // Train - var trainer = new FastTreeBinaryClassificationTrainer(env, DefaultColumnNames.Label, DefaultColumnNames.Features, numLeaves: 5, numTrees:5, minDocumentsInLeafs:2); - - var trainRoles = new RoleMappedData(trans, label: "Label", feature: "Features"); - var pred = trainer.Train(trainRoles); - // Get scorer and evaluate the predictions from test data - IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); - var metrics = EvaluateBinary(env, testDataScorer); - - // SSWE is a simple word embedding model + we train on a really small dataset, so metrics are not great. - Assert.Equal(.6667, metrics.Accuracy, 4); - Assert.Equal(.71, metrics.Auc, 1); - Assert.Equal(.58, metrics.Auprc, 2); - // Create prediction engine and test predictions - var model = env.CreateBatchPredictionEngine(testDataScorer); - var sentiments = GetTestData(); - var predictions = model.Predict(sentiments, false); - Assert.Equal(2, predictions.Count()); - Assert.True(predictions.ElementAt(0).Sentiment); - Assert.True(predictions.ElementAt(1).Sentiment); - - // Get feature importance based on feature gain during training - var summary = ((FeatureWeightsCalibratedPredictor)pred).GetSummaryInKeyValuePairs(trainRoles.Schema); - Assert.Equal(1.0, (double)summary[0].Value, 1); - } + }, + ModelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe, + }, text); + // Train + var trainer = new FastTreeBinaryClassificationTrainer(env, DefaultColumnNames.Label, DefaultColumnNames.Features, numLeaves: 5, numTrees: 5, minDatapointsInLeaves: 2); + + var trainRoles = new RoleMappedData(trans, label: "Label", feature: "Features"); + var pred = trainer.Train(trainRoles); + // Get scorer and evaluate the predictions from test data + IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); + var metrics = EvaluateBinary(env, testDataScorer); + + // SSWE is a simple word embedding model + we train on a really small dataset, so metrics are not great. + Assert.Equal(.6667, metrics.Accuracy, 4); + Assert.Equal(.71, metrics.Auc, 1); + Assert.Equal(.58, metrics.Auprc, 2); + // Create prediction engine and test predictions + var model = env.CreateBatchPredictionEngine(testDataScorer); + var sentiments = GetTestData(); + var predictions = model.Predict(sentiments, false); + Assert.Equal(2, predictions.Count()); + Assert.True(predictions.ElementAt(0).Sentiment); + Assert.True(predictions.ElementAt(1).Sentiment); + + // Get feature importance based on feature gain during training + var summary = ((FeatureWeightsCalibratedPredictor)pred).GetSummaryInKeyValuePairs(trainRoles.Schema); + Assert.Equal(1.0, (double)summary[0].Value, 1); } + private BinaryClassificationMetrics EvaluateBinary(IHostEnvironment env, IDataView scoredData) { var dataEval = new RoleMappedData(scoredData, label: "Label", feature: "Features", opt: true); diff --git a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs index 4cbbafb346..150cc8b3e8 100644 --- a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs +++ b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs @@ -17,6 +17,8 @@ using System.Collections.Generic; using System.IO; using Xunit; +using Microsoft.ML.Data; +using Microsoft.ML.Runtime.RunTests; namespace Microsoft.ML.Scenarios { @@ -34,10 +36,9 @@ private class TestData public void TensorFlowTransformMatrixMultiplicationTest() { var model_location = "model_matmul/frozen_saved_model.pb"; - using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) - { - // Pipeline - var loader = ComponentCreation.CreateDataView(env, + var env = new MLContext(seed: 1, conc: 1); + // Pipeline + var loader = ComponentCreation.CreateDataView(env, new List(new TestData[] { new TestData() { a = new[] { 1.0f, 2.0f, 3.0f, 4.0f }, b = new[] { 1.0f, 2.0f, @@ -47,32 +48,32 @@ public void TensorFlowTransformMatrixMultiplicationTest() b = new[] { 3.0f, 3.0f, 3.0f, 3.0f } } })); - var trans = TensorFlowTransform.Create(env, loader, model_location, new[] { "c" }, new[] { "a", "b" }); - - using (var cursor = trans.GetRowCursor(a => true)) - { - var cgetter = cursor.GetGetter>(2); - Assert.True(cursor.MoveNext()); - VBuffer c = default; - cgetter(ref c); - - Assert.Equal(1.0 * 1.0 + 2.0 * 3.0, c.Values[0]); - Assert.Equal(1.0 * 2.0 + 2.0 * 4.0, c.Values[1]); - Assert.Equal(3.0 * 1.0 + 4.0 * 3.0, c.Values[2]); - Assert.Equal(3.0 * 2.0 + 4.0 * 4.0, c.Values[3]); - - Assert.True(cursor.MoveNext()); - c = default; - cgetter(ref c); - - Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, c.Values[0]); - Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, c.Values[1]); - Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, c.Values[2]); - Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, c.Values[3]); + var trans = TensorFlowTransform.Create(env, loader, model_location, new[] { "c" }, new[] { "a", "b" }); - Assert.False(cursor.MoveNext()); - - } + using (var cursor = trans.GetRowCursor(a => true)) + { + var cgetter = cursor.GetGetter>(2); + Assert.True(cursor.MoveNext()); + VBuffer c = default; + cgetter(ref c); + + var cValues = c.GetValues(); + Assert.Equal(1.0 * 1.0 + 2.0 * 3.0, cValues[0]); + Assert.Equal(1.0 * 2.0 + 2.0 * 4.0, cValues[1]); + Assert.Equal(3.0 * 1.0 + 4.0 * 3.0, cValues[2]); + Assert.Equal(3.0 * 2.0 + 4.0 * 4.0, cValues[3]); + + Assert.True(cursor.MoveNext()); + c = default; + cgetter(ref c); + + cValues = c.GetValues(); + Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, cValues[0]); + Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, cValues[1]); + Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, cValues[2]); + Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, cValues[3]); + + Assert.False(cursor.MoveNext()); } } @@ -80,58 +81,56 @@ public void TensorFlowTransformMatrixMultiplicationTest() public void TensorFlowTransformObjectDetectionTest() { var model_location = @"C:\models\TensorFlow\ssd_mobilenet_v1_coco_2018_01_28\frozen_inference_graph.pb"; - using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) + var env = new MLContext(seed: 1, conc: 1); + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = env.CreateLoader("Text{col=ImagePath:TX:0 col=Name:TX:1}", new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = env.CreateLoader("Text{col=ImagePath:TX:0 col=Name:TX:1}", new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =32, ImageWidth = 32, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - Column = new ImagePixelExtractorTransform.Column[1]{ + }, images); + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "image_tensor", UseAlpha=false, InterleaveArgb=true, Convert = false} } - }, cropped); - - var tf = TensorFlowTransform.Create(env, pixels, model_location, - new[] { "detection_boxes", "detection_scores", "num_detections", "detection_classes" }, - new[] { "image_tensor" }); - - tf.Schema.TryGetColumnIndex("image_tensor", out int input); - tf.Schema.TryGetColumnIndex("detection_boxes", out int boxes); - tf.Schema.TryGetColumnIndex("detection_scores", out int scores); - tf.Schema.TryGetColumnIndex("num_detections", out int num); - tf.Schema.TryGetColumnIndex("detection_classes", out int classes); - using (var curs = tf.GetRowCursor(col => col == classes || col == num || col == scores || col == boxes || col == input)) - { - var getInput = curs.GetGetter>(input); - var getBoxes = curs.GetGetter>(boxes); - var getScores = curs.GetGetter>(scores); - var getNum = curs.GetGetter>(num); - var getClasses = curs.GetGetter>(classes); - var buffer = default(VBuffer); - var inputBuffer = default(VBuffer); - while (curs.MoveNext()) - { - getInput(ref inputBuffer); - getBoxes(ref buffer); - getScores(ref buffer); - getNum(ref buffer); - getClasses(ref buffer); - } + }, cropped); + + var tf = TensorFlowTransform.Create(env, pixels, model_location, + new[] { "detection_boxes", "detection_scores", "num_detections", "detection_classes" }, + new[] { "image_tensor" }); + + tf.Schema.TryGetColumnIndex("image_tensor", out int input); + tf.Schema.TryGetColumnIndex("detection_boxes", out int boxes); + tf.Schema.TryGetColumnIndex("detection_scores", out int scores); + tf.Schema.TryGetColumnIndex("num_detections", out int num); + tf.Schema.TryGetColumnIndex("detection_classes", out int classes); + using (var curs = tf.GetRowCursor(col => col == classes || col == num || col == scores || col == boxes || col == input)) + { + var getInput = curs.GetGetter>(input); + var getBoxes = curs.GetGetter>(boxes); + var getScores = curs.GetGetter>(scores); + var getNum = curs.GetGetter>(num); + var getClasses = curs.GetGetter>(classes); + var buffer = default(VBuffer); + var inputBuffer = default(VBuffer); + while (curs.MoveNext()) + { + getInput(ref inputBuffer); + getBoxes(ref buffer); + getScores(ref buffer); + getNum(ref buffer); + getClasses(ref buffer); } } } @@ -140,47 +139,45 @@ public void TensorFlowTransformObjectDetectionTest() public void TensorFlowTransformInceptionTest() { var model_location = @"C:\models\TensorFlow\tensorflow_inception_graph.pb"; - using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) + var env = new MLContext(seed: 1, conc: 1); + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = env.CreateLoader("Text{col=ImagePath:TX:0 col=Name:TX:1}", new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = env.CreateLoader("Text{col=ImagePath:TX:0 col=Name:TX:1}", new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =224, ImageWidth = 224, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - Column = new ImagePixelExtractorTransform.Column[1]{ + }, images); + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "input", UseAlpha=false, InterleaveArgb=true, Convert = true} } - }, cropped); + }, cropped); - var tf = TensorFlowTransform.Create(env, pixels, model_location, new[] { "softmax2_pre_activation" }, new[] { "input" }); + var tf = TensorFlowTransform.Create(env, pixels, model_location, new[] { "softmax2_pre_activation" }, new[] { "input" }); - tf.Schema.TryGetColumnIndex("input", out int input); - tf.Schema.TryGetColumnIndex("softmax2_pre_activation", out int b); - using (var curs = tf.GetRowCursor(col => col == b || col == input)) - { - var get = curs.GetGetter>(b); - var getInput = curs.GetGetter>(input); - var buffer = default(VBuffer); - var inputBuffer = default(VBuffer); - while (curs.MoveNext()) - { - getInput(ref inputBuffer); - get(ref buffer); - } + tf.Schema.TryGetColumnIndex("input", out int input); + tf.Schema.TryGetColumnIndex("softmax2_pre_activation", out int b); + using (var curs = tf.GetRowCursor(col => col == b || col == input)) + { + var get = curs.GetGetter>(b); + var getInput = curs.GetGetter>(input); + var buffer = default(VBuffer); + var inputBuffer = default(VBuffer); + while (curs.MoveNext()) + { + getInput(ref inputBuffer); + get(ref buffer); } } } @@ -188,202 +185,148 @@ public void TensorFlowTransformInceptionTest() [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only public void TensorFlowInputsOutputsSchemaTest() { - using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) - { - var model_location = "mnist_model/frozen_saved_model.pb"; - var schema = TensorFlowUtils.GetModelSchema(env, model_location); - Assert.Equal(86, schema.ColumnCount); - Assert.True(schema.TryGetColumnIndex("Placeholder", out int col)); - var type = (VectorType)schema.GetColumnType(col); - Assert.Equal(2, type.Dimensions.Length); - Assert.Equal(28, type.Dimensions[0]); - Assert.Equal(28, type.Dimensions[1]); - var metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); - Assert.NotNull(metadataType); - Assert.True(metadataType is TextType); - ReadOnlyMemory opType = default; - schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); - Assert.Equal("Placeholder", opType.ToString()); - metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); - Assert.Null(metadataType); - - Assert.True(schema.TryGetColumnIndex("conv2d/Conv2D/ReadVariableOp", out col)); - type = (VectorType)schema.GetColumnType(col); - Assert.Equal(new[] { 5, 5, 1, 32 }, type.Dimensions); - metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); - Assert.NotNull(metadataType); - Assert.True(metadataType is TextType); - schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); - Assert.Equal("Identity", opType.ToString()); - metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); - Assert.NotNull(metadataType); - VBuffer> inputOps = default; - schema.GetMetadata(TensorFlowUtils.InputOps, col, ref inputOps); - Assert.Equal(1, inputOps.Length); - Assert.Equal("conv2d/kernel", inputOps.Values[0].ToString()); - - Assert.True(schema.TryGetColumnIndex("conv2d/Conv2D", out col)); - type = (VectorType)schema.GetColumnType(col); - Assert.Equal(new[] { 28, 28, 32 }, type.Dimensions); - metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); - Assert.NotNull(metadataType); - Assert.True(metadataType is TextType); - schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); - Assert.Equal("Conv2D", opType.ToString()); - metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); - Assert.NotNull(metadataType); - schema.GetMetadata(TensorFlowUtils.InputOps, col, ref inputOps); - Assert.Equal(2, inputOps.Length); - Assert.Equal("reshape/Reshape", inputOps.Values[0].ToString()); - Assert.Equal("conv2d/Conv2D/ReadVariableOp", inputOps.Values[1].ToString()); - - Assert.True(schema.TryGetColumnIndex("Softmax", out col)); - type = (VectorType)schema.GetColumnType(col); - Assert.Equal(new[] { 10 }, type.Dimensions); - metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); - Assert.NotNull(metadataType); - Assert.True(metadataType is TextType); - schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); - Assert.Equal("Softmax", opType.ToString()); - metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); - Assert.NotNull(metadataType); - schema.GetMetadata(TensorFlowUtils.InputOps, col, ref inputOps); - Assert.Equal(1, inputOps.Length); - Assert.Equal("sequential/dense_1/BiasAdd", inputOps.Values[0].ToString()); - - model_location = "model_matmul/frozen_saved_model.pb"; - schema = TensorFlowUtils.GetModelSchema(env, model_location); - char name = 'a'; - for (int i = 0; i < schema.ColumnCount; i++) - { - Assert.Equal(name.ToString(), schema.GetColumnName(i)); - type = (VectorType)schema.GetColumnType(i); - Assert.Equal(new[] { 2, 2 }, type.Dimensions); - name++; - } + var env = new MLContext(seed: 1, conc: 1); + var model_location = "mnist_model/frozen_saved_model.pb"; + var schema = TensorFlowUtils.GetModelSchema(env, model_location); + Assert.Equal(86, schema.ColumnCount); + Assert.True(schema.TryGetColumnIndex("Placeholder", out int col)); + var type = (VectorType)schema.GetColumnType(col); + Assert.Equal(2, type.Dimensions.Length); + Assert.Equal(28, type.Dimensions[0]); + Assert.Equal(28, type.Dimensions[1]); + var metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); + Assert.NotNull(metadataType); + Assert.True(metadataType is TextType); + ReadOnlyMemory opType = default; + schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); + Assert.Equal("Placeholder", opType.ToString()); + metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); + Assert.Null(metadataType); + + Assert.True(schema.TryGetColumnIndex("conv2d/Conv2D/ReadVariableOp", out col)); + type = (VectorType)schema.GetColumnType(col); + Assert.Equal(new[] { 5, 5, 1, 32 }, type.Dimensions); + metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); + Assert.NotNull(metadataType); + Assert.True(metadataType is TextType); + schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); + Assert.Equal("Identity", opType.ToString()); + metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); + Assert.NotNull(metadataType); + VBuffer> inputOps = default; + schema.GetMetadata(TensorFlowUtils.InputOps, col, ref inputOps); + Assert.Equal(1, inputOps.Length); + Assert.Equal("conv2d/kernel", inputOps.GetValues()[0].ToString()); + + Assert.True(schema.TryGetColumnIndex("conv2d/Conv2D", out col)); + type = (VectorType)schema.GetColumnType(col); + Assert.Equal(new[] { 28, 28, 32 }, type.Dimensions); + metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); + Assert.NotNull(metadataType); + Assert.True(metadataType is TextType); + schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); + Assert.Equal("Conv2D", opType.ToString()); + metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); + Assert.NotNull(metadataType); + schema.GetMetadata(TensorFlowUtils.InputOps, col, ref inputOps); + Assert.Equal(2, inputOps.Length); + Assert.Equal("reshape/Reshape", inputOps.GetValues()[0].ToString()); + Assert.Equal("conv2d/Conv2D/ReadVariableOp", inputOps.GetValues()[1].ToString()); + + Assert.True(schema.TryGetColumnIndex("Softmax", out col)); + type = (VectorType)schema.GetColumnType(col); + Assert.Equal(new[] { 10 }, type.Dimensions); + metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); + Assert.NotNull(metadataType); + Assert.True(metadataType is TextType); + schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); + Assert.Equal("Softmax", opType.ToString()); + metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); + Assert.NotNull(metadataType); + schema.GetMetadata(TensorFlowUtils.InputOps, col, ref inputOps); + Assert.Equal(1, inputOps.Length); + Assert.Equal("sequential/dense_1/BiasAdd", inputOps.GetValues()[0].ToString()); + + model_location = "model_matmul/frozen_saved_model.pb"; + schema = TensorFlowUtils.GetModelSchema(env, model_location); + char name = 'a'; + for (int i = 0; i < schema.ColumnCount; i++) + { + Assert.Equal(name.ToString(), schema.GetColumnName(i)); + type = (VectorType)schema.GetColumnType(i); + Assert.Equal(new[] { 2, 2 }, type.Dimensions); + name++; } } [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only public void TensorFlowTransformMNISTConvTest() { - var model_location = "mnist_model/frozen_saved_model.pb"; - using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) - { - var dataPath = GetDataPath("Train-Tiny-28x28.txt"); - var testDataPath = GetDataPath("MNIST.Test.tiny.txt"); - - // Pipeline - var loader = TextLoader.ReadFile(env, + var mlContext = new MLContext(seed: 1, conc: 1); + var reader = mlContext.Data.TextReader( new TextLoader.Arguments() { Separator = "tab", HasHeader = true, Column = new[] { - new TextLoader.Column("Label", DataKind.Num,0), - new TextLoader.Column("Placeholder", DataKind.Num,new []{new TextLoader.Range(1, 784) }) + new TextLoader.Column("Label", DataKind.U4 , new [] { new TextLoader.Range(0) }, new KeyRange(0, 9)), + new TextLoader.Column("Placeholder", DataKind.R4, new []{ new TextLoader.Range(1, 784) }) } - }, new MultiFileSource(dataPath)); + }); - IDataView trans = CopyColumnsTransform.Create(env, new CopyColumnsTransform.Arguments() - { - Column = new[] { new CopyColumnsTransform.Column() - { Name = "reshape_input", Source = "Placeholder" } - } - }, loader); - trans = TensorFlowTransform.Create(env, trans, model_location, new[] { "Softmax", "dense/Relu" }, new[] { "Placeholder", "reshape_input" }); - trans = new ConcatTransform(env, "Features", "Softmax", "dense/Relu").Transform(trans); + var trainData = reader.Read(GetDataPath(TestDatasets.mnistTiny28.trainFilename)); + var testData = reader.Read(GetDataPath(TestDatasets.mnistOneClass.testFilename)); - var trainer = new LightGbmMulticlassTrainer(env, "Label", "Features"); + var pipe = mlContext.Transforms.CopyColumns(("Placeholder", "reshape_input")) + .Append(new TensorFlowEstimator(mlContext, "mnist_model/frozen_saved_model.pb", new[] { "Placeholder", "reshape_input" }, new[] { "Softmax", "dense/Relu" })) + .Append(mlContext.Transforms.Concatenate("Features", "Softmax", "dense/Relu")) + .Append(mlContext.MulticlassClassification.Trainers.LightGbm("Label", "Features")); - var cached = new CacheDataView(env, trans, prefetch: null); - var trainRoles = new RoleMappedData(cached, label: "Label", feature: "Features"); - var pred = trainer.Train(trainRoles); + var trainedModel = pipe.Fit(trainData); + var predicted = trainedModel.Transform(testData); + var metrics = mlContext.MulticlassClassification.Evaluate(predicted); - // Get scorer and evaluate the predictions from test data - IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); - var metrics = Evaluate(env, testDataScorer); + Assert.Equal(0.99, metrics.AccuracyMicro, 2); + Assert.Equal(1.0, metrics.AccuracyMacro, 2); - Assert.Equal(0.99, metrics.AccuracyMicro, 2); - Assert.Equal(1.0, metrics.AccuracyMacro, 2); + var oneSample = GetOneMNISTExample(); - // Create prediction engine and test predictions - var model = env.CreatePredictionEngine(testDataScorer); + var predictFunction = trainedModel.MakePredictionFunction(mlContext); - var sample1 = new MNISTData() - { - Placeholder = new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 18, 18, 18, 126, 136, 175, 26, - 166, 255, 247, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 36, 94, 154, 170, 253, 253, 253, 253, 253, - 225, 172, 253, 242, 195, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 238, 253, 253, 253, 253, 253, 253, 253, - 253, 251, 93, 82, 82, 56, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 219, 253, 253, 253, 253, 253, 198, - 182, 247, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 156, 107, 253, 253, 205, 11, 0, - 43, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 1, 154, 253, 90, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 253, 190, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 190, 253, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 241, 225, 160, 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 240, 253, 253, 119, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 186, 253, 253, 150, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 93, 252, 253, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 253, 249, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 130, 183, 253, 253, 207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 148, 229, 253, 253, 253, 250, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 114, 221, 253, 253, 253, 253, 201, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 66, 213, 253, 253, 253, 253, 198, 81, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 171, 219, 253, 253, 253, 253, 195, 80, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 172, 226, 253, 253, 253, 253, 244, 133, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 253, 253, 253, 212, 135, 132, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } - }; - - var prediction = model.Predict(sample1); - - float max = -1; - int maxIndex = -1; - for (int i = 0; i < prediction.PredictedLabels.Length; i++) - { - if (prediction.PredictedLabels[i] > max) - { - max = prediction.PredictedLabels[i]; - maxIndex = i; - } - } + var onePrediction = predictFunction.Predict(oneSample); - Assert.Equal(5, maxIndex); - } + Assert.Equal(5, GetMaxIndexForOnePrediction(onePrediction)); } [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only public void TensorFlowTransformMNISTLRTrainingTest() { - // Without shuffling - ExecuteTFTransformMNISTLRTrainingTest(false, null, 0.72173913043478266, 0.67482993197278918); - - // With shuffling - ExecuteTFTransformMNISTLRTrainingTest(true, 5, 0.8, 0.691156462585034); - } - - private void ExecuteTFTransformMNISTLRTrainingTest(bool shuffle, int? shuffleSeed, double expectedMicroAccuracy, double expectedMacroAccruacy) - { + const double expectedMicroAccuracy = 0.72173913043478266; + const double expectedMacroAccruacy = 0.67482993197278918; var model_location = "mnist_lr_model"; try { - using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) - { - var dataPath = GetDataPath("Train-Tiny-28x28.txt"); - var testDataPath = GetDataPath("MNIST.Test.tiny.txt"); - - // Pipeline - var loader = TextLoader.ReadFile(env, - new TextLoader.Arguments() + var mlContext = new MLContext(seed: 1, conc: 1); + var reader = mlContext.Data.TextReader( + new TextLoader.Arguments { Separator = "tab", HasHeader = false, Column = new[] { - new TextLoader.Column("Label", DataKind.Num,0), - new TextLoader.Column("Placeholder", DataKind.Num,new []{new TextLoader.Range(1, 784) }) - + new TextLoader.Column("Label", DataKind.I8, 0), + new TextLoader.Column("Placeholder", DataKind.R4, new []{ new TextLoader.Range(1, 784) }) } - }, new MultiFileSource(dataPath)); + }); - IDataView trans = new OneHotEncodingEstimator(env, "Label", "OneHotLabel").Fit(loader).Transform(loader); - trans = NormalizeTransform.CreateMinMaxNormalizer(env, trans, "Features", "Placeholder"); + var trainData = reader.Read(GetDataPath(TestDatasets.mnistTiny28.trainFilename)); + var testData = reader.Read(GetDataPath(TestDatasets.mnistOneClass.testFilename)); - var args = new TensorFlowTransform.Arguments() + var pipe = mlContext.Transforms.Categorical.OneHotEncoding("Label", "OneHotLabel") + .Append(mlContext.Transforms.Normalize(new NormalizingEstimator.MinMaxColumn("Placeholder", "Features"))) + .Append(new TensorFlowEstimator(mlContext, new TensorFlowTransform.Arguments() { ModelLocation = model_location, InputColumns = new[] { "Features" }, @@ -397,85 +340,33 @@ private void ExecuteTFTransformMNISTLRTrainingTest(bool shuffle, int? shuffleSee LearningRate = 0.001f, BatchSize = 20, ReTrain = true - }; - - IDataView trainedTfDataView = null; - if (shuffle) - { - var shuffledView = new ShuffleTransform(env, new ShuffleTransform.Arguments() - { - ForceShuffle = shuffle, - ForceShuffleSeed = shuffleSeed - }, trans); - trainedTfDataView = new TensorFlowEstimator(env, args).Fit(shuffledView).Transform(trans); - } - else - { - trainedTfDataView = new TensorFlowEstimator(env, args).Fit(trans).Transform(trans); - } - - trans = new ConcatTransform(env, "Features", "Prediction").Transform(trainedTfDataView); + })) + .Append(mlContext.Transforms.Concatenate("Features", "Prediction")) + .Append(mlContext.Transforms.Categorical.MapValueToKey("Label", "KeyLabel", maxNumTerms: 10)) + .Append(mlContext.MulticlassClassification.Trainers.LightGbm("KeyLabel", "Features")); - var trainer = new LightGbmMulticlassTrainer(env, "Label", "Features"); + var trainedModel = pipe.Fit(trainData); + var predicted = trainedModel.Transform(testData); + var metrics = mlContext.MulticlassClassification.Evaluate(predicted, label: "KeyLabel"); + Assert.InRange(metrics.AccuracyMicro, expectedMicroAccuracy, 1); + Assert.InRange(metrics.AccuracyMacro, expectedMacroAccruacy, 1); + var predictionFunction = trainedModel.MakePredictionFunction(mlContext); - var cached = new CacheDataView(env, trans, prefetch: null); - var trainRoles = new RoleMappedData(cached, label: "Label", feature: "Features"); + var oneSample = GetOneMNISTExample(); + var onePrediction = predictionFunction.Predict(oneSample); + Assert.Equal(0, GetMaxIndexForOnePrediction(onePrediction)); - var pred = trainer.Train(trainRoles); - // Get scorer and evaluate the predictions from test data - IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); - var metrics = Evaluate(env, testDataScorer); - - Assert.Equal(expectedMicroAccuracy, metrics.AccuracyMicro, 2); - Assert.Equal(expectedMacroAccruacy, metrics.AccuracyMacro, 2); - - // Create prediction engine and test predictions - var model = env.CreatePredictionEngine(testDataScorer); - - var sample1 = new MNISTData() - { - Placeholder = new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 18, 18, 18, 126, 136, 175, 26, - 166, 255, 247, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 36, 94, 154, 170, 253, 253, 253, 253, 253, - 225, 172, 253, 242, 195, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 238, 253, 253, 253, 253, 253, 253, 253, - 253, 251, 93, 82, 82, 56, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 219, 253, 253, 253, 253, 253, 198, - 182, 247, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 156, 107, 253, 253, 205, 11, 0, - 43, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 1, 154, 253, 90, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 253, 190, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 190, 253, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 241, 225, 160, 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 240, 253, 253, 119, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 186, 253, 253, 150, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 93, 252, 253, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 253, 249, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 130, 183, 253, 253, 207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 148, 229, 253, 253, 253, 250, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 114, 221, 253, 253, 253, 253, 201, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 66, 213, 253, 253, 253, 253, 198, 81, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 171, 219, 253, 253, 253, 253, 195, 80, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 172, 226, 253, 253, 253, 253, 244, 133, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 253, 253, 253, 212, 135, 132, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } - }; - - var prediction = model.Predict(sample1); - - float max = -1; - int maxIndex = -1; - for (int i = 0; i < prediction.PredictedLabels.Length; i++) - { - if (prediction.PredictedLabels[i] > max) - { - max = prediction.PredictedLabels[i]; - maxIndex = i; - } - } - - Assert.Equal(5, maxIndex); - - // Check if the bias actually got changed after the training. - using (var cursor = trainedTfDataView.GetRowCursor(a => true)) + var trainDataTransformed = trainedModel.Transform(trainData); + using (var cursor = trainDataTransformed.GetRowCursor(a => true)) + { + trainDataTransformed.Schema.TryGetColumnIndex("b", out int bias); + var getter = cursor.GetGetter>(bias); + if (cursor.MoveNext()) { - trainedTfDataView.Schema.TryGetColumnIndex("b", out int bias); - var getter = cursor.GetGetter>(bias); - if (cursor.MoveNext()) - { - var trainedBias = default(VBuffer); - getter(ref trainedBias); - Assert.NotEqual(trainedBias.Values, new float[] { 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f }); - } + var trainedBias = default(VBuffer); + getter(ref trainedBias); + Assert.NotEqual(trainedBias.GetValues().ToArray(), new float[] { 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f }); } } } @@ -502,46 +393,63 @@ private void CleanUp(string model_location) [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only public void TensorFlowTransformMNISTConvTrainingTest() { - // Without shuffling ExecuteTFTransformMNISTConvTrainingTest(false, null, 0.74782608695652175, 0.608843537414966); - - // With shuffling ExecuteTFTransformMNISTConvTrainingTest(true, 5, 0.75652173913043474, 0.610204081632653); } private void ExecuteTFTransformMNISTConvTrainingTest(bool shuffle, int? shuffleSeed, double expectedMicroAccuracy, double expectedMacroAccruacy) { - var model_location = "mnist_conv_model"; + const string modelLocation = "mnist_conv_model"; try { - using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) - { - var dataPath = GetDataPath("Train-Tiny-28x28.txt"); - var testDataPath = GetDataPath("MNIST.Test.tiny.txt"); + var mlContext = new MLContext(seed: 1, conc: 1); - // Pipeline - var loader = TextLoader.ReadFile(env, - new TextLoader.Arguments() + var reader = mlContext.Data.TextReader(new TextLoader.Arguments + { + Separator = "tab", + HasHeader = false, + Column = new[] { - Separator = "tab", - HasHeader = false, - Column = new[] - { - new TextLoader.Column("Label", DataKind.I8,0), - new TextLoader.Column("Placeholder", DataKind.Num,new []{new TextLoader.Range(1, 784) }) + new TextLoader.Column("Label", DataKind.U4, new []{ new TextLoader.Range(0) }, new KeyRange(0, 9)), + new TextLoader.Column("TfLabel", DataKind.I8, 0), + new TextLoader.Column("Placeholder", DataKind.R4, new []{ new TextLoader.Range(1, 784) }) + } + }); - } - }, new MultiFileSource(dataPath)); + var trainData = reader.Read(GetDataPath(TestDatasets.mnistTiny28.trainFilename)); + var testData = reader.Read(GetDataPath(TestDatasets.mnistOneClass.testFilename)); - IDataView trans = new CopyColumnsTransform(env, - ("Placeholder", "Features")).Transform(loader); + IDataView preprocessedTrainData = null; + IDataView preprocessedTestData = null; + if (shuffle) + { + // Shuffle training data set + preprocessedTrainData = new RowShufflingTransformer(mlContext, new RowShufflingTransformer.Arguments() + { + ForceShuffle = shuffle, + ForceShuffleSeed = shuffleSeed + }, trainData); - var args = new TensorFlowTransform.Arguments() + // Shuffle test data set + preprocessedTestData = new RowShufflingTransformer(mlContext, new RowShufflingTransformer.Arguments() { - ModelLocation = model_location, + ForceShuffle = shuffle, + ForceShuffleSeed = shuffleSeed + }, testData); + } + else + { + preprocessedTrainData = trainData; + preprocessedTestData = testData; + } + + var pipe = mlContext.Transforms.CopyColumns(("Placeholder", "Features")) + .Append(new TensorFlowEstimator(mlContext, new TensorFlowTransform.Arguments() + { + ModelLocation = modelLocation, InputColumns = new[] { "Features" }, OutputColumns = new[] { "Prediction" }, - LabelColumn = "Label", + LabelColumn = "TfLabel", TensorFlowLabel = "Label", OptimizationOperation = "MomentumOp", LossOperation = "Loss", @@ -551,210 +459,176 @@ private void ExecuteTFTransformMNISTConvTrainingTest(bool shuffle, int? shuffleS LearningRate = 0.01f, BatchSize = 20, ReTrain = true - }; - - IDataView trainedTfDataView = null; - if (shuffle) - { - var shuffledView = new ShuffleTransform(env, new ShuffleTransform.Arguments() - { - ForceShuffle = shuffle, - ForceShuffleSeed = shuffleSeed - }, trans); - trainedTfDataView = new TensorFlowEstimator(env, args).Fit(shuffledView).Transform(trans); - } - else - { - trainedTfDataView = new TensorFlowEstimator(env, args).Fit(trans).Transform(trans); - } - - trans = new ConcatTransform(env, "Features", "Prediction").Transform(trainedTfDataView); - trans = new ConvertingTransform(env, new ConvertingTransform.ColumnInfo("Label", "Label", DataKind.R4)).Transform(trans); + })) + .Append(mlContext.Transforms.Concatenate("Features", "Prediction")) + .Append(mlContext.MulticlassClassification.Trainers.LightGbm("Label", "Features")); - var trainer = new LightGbmMulticlassTrainer(env, "Label", "Features"); + var trainedModel = pipe.Fit(preprocessedTrainData); + var predicted = trainedModel.Transform(preprocessedTestData); + var metrics = mlContext.MulticlassClassification.Evaluate(predicted); - var cached = new CacheDataView(env, trans, prefetch: null); - var trainRoles = new RoleMappedData(cached, label: "Label", feature: "Features"); + // First group of checks. They check if the overall prediction quality is ok using a test set. + Assert.InRange(metrics.AccuracyMicro, expectedMicroAccuracy-.01, expectedMicroAccuracy+.01); + Assert.InRange(metrics.AccuracyMacro, expectedMacroAccruacy-.01, expectedMicroAccuracy+.01); - var pred = trainer.Train(trainRoles); + // Create prediction function and test prediction + var predictFunction = trainedModel.MakePredictionFunction(mlContext); - // Get scorer and evaluate the predictions from test data - IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); - var metrics = Evaluate(env, testDataScorer); + var oneSample = GetOneMNISTExample(); - Assert.Equal(expectedMicroAccuracy, metrics.AccuracyMicro, 2); - Assert.Equal(expectedMacroAccruacy, metrics.AccuracyMacro, 2); - - // Create prediction engine and test predictions - var model = env.CreatePredictionEngine(testDataScorer); - - var sample1 = new MNISTData() - { - Placeholder = new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 18, 18, 18, 126, 136, 175, 26, - 166, 255, 247, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 36, 94, 154, 170, 253, 253, 253, 253, 253, - 225, 172, 253, 242, 195, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 238, 253, 253, 253, 253, 253, 253, 253, - 253, 251, 93, 82, 82, 56, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 219, 253, 253, 253, 253, 253, 198, - 182, 247, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 156, 107, 253, 253, 205, 11, 0, - 43, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 1, 154, 253, 90, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 253, 190, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 190, 253, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 241, 225, 160, 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 240, 253, 253, 119, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 186, 253, 253, 150, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 93, 252, 253, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 253, 249, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 130, 183, 253, 253, 207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 148, 229, 253, 253, 253, 250, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 114, 221, 253, 253, 253, 253, 201, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 66, 213, 253, 253, 253, 253, 198, 81, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 171, 219, 253, 253, 253, 253, 195, 80, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 172, 226, 253, 253, 253, 253, 244, 133, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 253, 253, 253, 212, 135, 132, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } - }; - - var prediction = model.Predict(sample1); - - float max = -1; - int maxIndex = -1; - for (int i = 0; i < prediction.PredictedLabels.Length; i++) - { - if (prediction.PredictedLabels[i] > max) - { - max = prediction.PredictedLabels[i]; - maxIndex = i; - } - } + var prediction = predictFunction.Predict(oneSample); - Assert.Equal(5, maxIndex); - } + Assert.Equal(5, GetMaxIndexForOnePrediction(prediction)); } finally { // This test changes the state of the model. // Cleanup folder so that other test can also use the same model. - CleanUp(model_location); + CleanUp(modelLocation); } } [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only public void TensorFlowTransformMNISTConvSavedModelTest() { - var model_location = "mnist_model"; - using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) - { - var dataPath = GetDataPath("Train-Tiny-28x28.txt"); - var testDataPath = GetDataPath("MNIST.Test.tiny.txt"); + // This test trains a multi-class classifier pipeline where a pre-trained Tenroflow model is used for featurization. + // Two group of test criteria are checked. One group contains micro and macro accuracies. The other group is the range + // of predicted label of a single in-memory example. - // Pipeline - var loader = TextLoader.ReadFile(env, - new TextLoader.Arguments() + var mlContext = new MLContext(seed: 1, conc: 1); + var reader = mlContext.Data.TextReader(new TextLoader.Arguments + { + Separator = "tab", + HasHeader = true, + Column = new[] { - Separator = "tab", - HasHeader = true, - Column = new[] - { - new TextLoader.Column("Label", DataKind.Num,0), - new TextLoader.Column("Placeholder", DataKind.Num,new []{new TextLoader.Range(1, 784) }) + new TextLoader.Column("Label", DataKind.U4 , new [] { new TextLoader.Range(0) }, new KeyRange(0, 9)), + new TextLoader.Column("Placeholder", DataKind.R4, new []{ new TextLoader.Range(1, 784) }) + } + }); - } - }, new MultiFileSource(dataPath)); + var trainData = reader.Read(GetDataPath(TestDatasets.mnistTiny28.trainFilename)); + var testData = reader.Read(GetDataPath(TestDatasets.mnistOneClass.testFilename)); - IDataView trans = CopyColumnsTransform.Create(env, new CopyColumnsTransform.Arguments() - { - Column = new[] { new CopyColumnsTransform.Column() - { Name = "reshape_input", Source = "Placeholder" } - } - }, loader); - trans = TensorFlowTransform.Create(env, trans, model_location, new[] { "Softmax", "dense/Relu" }, new[] { "Placeholder", "reshape_input" }); - trans = new ConcatTransform(env, "Features", "Softmax", "dense/Relu").Transform(trans); + var pipe = mlContext.Transforms.CopyColumns(("Placeholder", "reshape_input")) + .Append(new TensorFlowEstimator(mlContext, "mnist_model", new[] { "Placeholder", "reshape_input" }, new[] { "Softmax", "dense/Relu" })) + .Append(mlContext.Transforms.Concatenate("Features", new[] { "Softmax", "dense/Relu" })) + .Append(mlContext.MulticlassClassification.Trainers.LightGbm("Label", "Features")); - var trainer = new LightGbmMulticlassTrainer(env, "Label", "Features"); + var trainedModel = pipe.Fit(trainData); + var predicted = trainedModel.Transform(testData); + var metrics = mlContext.MulticlassClassification.Evaluate(predicted); - var cached = new CacheDataView(env, trans, prefetch: null); - var trainRoles = new RoleMappedData(cached, label: "Label", feature: "Features"); - var pred = trainer.Train(trainRoles); + // First group of checks + Assert.Equal(0.99, metrics.AccuracyMicro, 2); + Assert.Equal(1.0, metrics.AccuracyMacro, 2); - // Get scorer and evaluate the predictions from test data - IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); - var metrics = Evaluate(env, testDataScorer); + // An in-memory example. Its label is predicted below. + var oneSample = GetOneMNISTExample(); - Assert.Equal(0.99, metrics.AccuracyMicro, 2); - Assert.Equal(1.0, metrics.AccuracyMacro, 2); + var predictFunction = trainedModel.MakePredictionFunction(mlContext); - // Create prediction engine and test predictions - var model = env.CreatePredictionEngine(testDataScorer); + var onePrediction = predictFunction.Predict(oneSample); - var sample1 = new MNISTData() - { - Placeholder = new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 18, 18, 18, 126, 136, 175, 26, - 166, 255, 247, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 36, 94, 154, 170, 253, 253, 253, 253, 253, - 225, 172, 253, 242, 195, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 238, 253, 253, 253, 253, 253, 253, 253, - 253, 251, 93, 82, 82, 56, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 219, 253, 253, 253, 253, 253, 198, - 182, 247, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 156, 107, 253, 253, 205, 11, 0, - 43, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 1, 154, 253, 90, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 253, 190, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 190, 253, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 241, 225, 160, 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 240, 253, 253, 119, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 186, 253, 253, 150, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 93, 252, 253, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 253, 249, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 130, 183, 253, 253, 207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 148, 229, 253, 253, 253, 250, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 114, 221, 253, 253, 253, 253, 201, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 66, 213, 253, 253, 253, 253, 198, 81, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 171, 219, 253, 253, 253, 253, 195, 80, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 172, 226, 253, 253, 253, 253, 244, 133, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 253, 253, 253, 212, 135, 132, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } - }; - - var prediction = model.Predict(sample1); - - float max = -1; - int maxIndex = -1; - for (int i = 0; i < prediction.PredictedLabels.Length; i++) - { - if (prediction.PredictedLabels[i] > max) - { - max = prediction.PredictedLabels[i]; - maxIndex = i; - } - } - - Assert.Equal(5, maxIndex); - } + // Second group of checks + Assert.Equal(5, GetMaxIndexForOnePrediction(onePrediction)); } [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only public void TensorFlowTransformMNISTConvPipelineTest() { var model_location = "mnist_model/frozen_saved_model.pb"; - var dataPath = GetDataPath("Train-Tiny-28x28.txt"); + var dataPath = GetDataPath(TestDatasets.mnistTiny28.trainFilename); var pipeline = new Legacy.LearningPipeline(seed: 1); pipeline.Add(new Microsoft.ML.Legacy.Data.TextLoader(dataPath).CreateFrom(useHeader: false)); - pipeline.Add(new Legacy.Transforms.ColumnCopier() { Column = new[] { new CopyColumnsTransformColumn() { Name = "reshape_input", Source = "Placeholder" } } }); + pipeline.Add(new Legacy.Transforms.ColumnCopier() { Column = new[] { new ColumnsCopyingTransformerColumn() { Name = "reshape_input", Source = "Placeholder" } } }); pipeline.Add(new TensorFlowScorer() { ModelLocation = model_location, OutputColumns = new[] { "Softmax", "dense/Relu" }, InputColumns = new[] { "Placeholder", "reshape_input" } }); - pipeline.Add(new Legacy.Transforms.ColumnConcatenator() { Column = new[] { new ConcatTransformColumn() { Name = "Features", Source = new[] { "Placeholder", "dense/Relu" } } } }); + pipeline.Add(new Legacy.Transforms.ColumnConcatenator() { Column = new[] { new ColumnConcatenatingTransformerColumn() { Name = "Features", Source = new[] { "Placeholder", "dense/Relu" } } } }); + pipeline.Add(new Legacy.Transforms.LabelToFloatConverter() { LabelColumn = "Label" }); pipeline.Add(new Legacy.Trainers.LogisticRegressionClassifier()); var model = pipeline.Train(); - var sample1 = new MNISTData() - { - Placeholder = new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 18, 18, 18, 126, 136, 175, 26, - 166, 255, 247, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 36, 94, 154, 170, 253, 253, 253, 253, 253, - 225, 172, 253, 242, 195, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 238, 253, 253, 253, 253, 253, 253, 253, - 253, 251, 93, 82, 82, 56, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 219, 253, 253, 253, 253, 253, 198, - 182, 247, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 156, 107, 253, 253, 205, 11, 0, - 43, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 1, 154, 253, 90, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 253, 190, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 190, 253, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 241, 225, 160, 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 240, 253, 253, 119, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 186, 253, 253, 150, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 93, 252, 253, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 253, 249, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 130, 183, 253, 253, 207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 148, 229, 253, 253, 253, 250, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 114, 221, 253, 253, 253, 253, 201, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 66, 213, 253, 253, 253, 253, 198, 81, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 171, 219, 253, 253, 253, 253, 195, 80, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 172, 226, 253, 253, 253, 253, 244, 133, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 253, 253, 253, 212, 135, 132, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } - }; + var sample1 = GetOneMNISTExample();; MNISTPrediction prediction = model.Predict(sample1); } + private MNISTData GetOneMNISTExample() + { + return new MNISTData() + { + Placeholder = new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 18, 18, 18, 126, + 136, 175, 26, 166, 255, 247, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 30, 36, 94, 154, 170, 253, 253, 253, 253, 253, 225, 172, + 253, 242, 195, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 238, + 253, 253, 253, 253, 253, 253, 253, 253, 251, 93, 82, 82, 56, + 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 219, 253, 253, 253, + 253, 253, 198, 182, 247, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 80, 156, 107, 253, 253, 205, 11, 0, 43, + 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 14, 1, 154, 253, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 253, 190, 2, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, + 190, 253, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 241, 225, 160, 108, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, + 240, 253, 253, 119, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 186, 253, 253, 150, 27, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 16, 93, 252, 253, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 253, 249, 64, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 130, + 183, 253, 253, 207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 39, 148, 229, 253, 253, 253, 250, 182, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 114, 221, + 253, 253, 253, 253, 201, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 23, 66, 213, 253, 253, 253, 253, 198, 81, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 171, 219, + 253, 253, 253, 253, 195, 80, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 55, 172, 226, 253, 253, 253, 253, 244, 133, + 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, + 253, 253, 253, 212, 135, 132, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0 } + }; + } + + private int GetMaxIndexForOnePrediction(MNISTPrediction onePrediction) + { + float maxLabel = -1; + int maxIndex = -1; + for (int i = 0; i < onePrediction.PredictedLabels.Length; i++) + { + if (onePrediction.PredictedLabels[i] > maxLabel) + { + maxLabel = onePrediction.PredictedLabels[i]; + maxIndex = i; + } + } + return maxIndex; + } + public class MNISTData { [Column("0")] - public float Label; + public long Label; [Column(ordinal: "1-784")] [VectorType(784)] @@ -772,64 +646,62 @@ public void TensorFlowTransformCifar() { var model_location = "cifar_model/frozen_model.pb"; - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var tensorFlowModel = TensorFlowUtils.LoadTensorFlowModel(env, model_location); + var schema = tensorFlowModel.GetInputSchema(); + Assert.True(schema.TryGetColumnIndex("Input", out int column)); + var type = (VectorType)schema.GetColumnType(column); + var imageHeight = type.Dimensions[0]; + var imageWidth = type.Dimensions[1]; + + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var tensorFlowModel = TensorFlowUtils.LoadTensorFlowModel(env, model_location); - var schema = tensorFlowModel.GetInputSchema(); - Assert.True(schema.TryGetColumnIndex("Input", out int column)); - var type = (VectorType)schema.GetColumnType(column); - var imageHeight = type.Dimensions[0]; - var imageWidth = type.Dimensions[1]; - - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + { + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "Input", UseAlpha=false, InterleaveArgb=true} } - }, cropped); + }, cropped); - IDataView trans = TensorFlowTransform.Create(env, pixels, tensorFlowModel, new[] { "Output" }, new[] { "Input" }); + IDataView trans = TensorFlowTransform.Create(env, pixels, tensorFlowModel, new[] { "Output" }, new[] { "Input" }); - trans.Schema.TryGetColumnIndex("Output", out int output); - using (var cursor = trans.GetRowCursor(col => col == output)) - { - var buffer = default(VBuffer); - var getter = cursor.GetGetter>(output); - var numRows = 0; - while (cursor.MoveNext()) - { - getter(ref buffer); - Assert.Equal(10, buffer.Length); - numRows += 1; - } - Assert.Equal(3, numRows); + trans.Schema.TryGetColumnIndex("Output", out int output); + using (var cursor = trans.GetRowCursor(col => col == output)) + { + var buffer = default(VBuffer); + var getter = cursor.GetGetter>(output); + var numRows = 0; + while (cursor.MoveNext()) + { + getter(ref buffer); + Assert.Equal(10, buffer.Length); + numRows += 1; } + Assert.Equal(3, numRows); } } @@ -838,64 +710,62 @@ public void TensorFlowTransformCifarSavedModel() { var model_location = "cifar_saved_model"; - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var tensorFlowModel = TensorFlowUtils.LoadTensorFlowModel(env, model_location); + var schema = tensorFlowModel.GetInputSchema(); + Assert.True(schema.TryGetColumnIndex("Input", out int column)); + var type = (VectorType)schema.GetColumnType(column); + var imageHeight = type.Dimensions[0]; + var imageWidth = type.Dimensions[1]; + + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var tensorFlowModel = TensorFlowUtils.LoadTensorFlowModel(env, model_location); - var schema = tensorFlowModel.GetInputSchema(); - Assert.True(schema.TryGetColumnIndex("Input", out int column)); - var type = (VectorType)schema.GetColumnType(column); - var imageHeight = type.Dimensions[0]; - var imageWidth = type.Dimensions[1]; - - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + { + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "Input", UseAlpha=false, InterleaveArgb=true} } - }, cropped); + }, cropped); - IDataView trans = TensorFlowTransform.Create(env, pixels, tensorFlowModel, new[] { "Output" }, new[] { "Input" }); + IDataView trans = TensorFlowTransform.Create(env, pixels, tensorFlowModel, new[] { "Output" }, new[] { "Input" }); - trans.Schema.TryGetColumnIndex("Output", out int output); - using (var cursor = trans.GetRowCursor(col => col == output)) - { - var buffer = default(VBuffer); - var getter = cursor.GetGetter>(output); - var numRows = 0; - while (cursor.MoveNext()) - { - getter(ref buffer); - Assert.Equal(10, buffer.Length); - numRows += 1; - } - Assert.Equal(3, numRows); + trans.Schema.TryGetColumnIndex("Output", out int output); + using (var cursor = trans.GetRowCursor(col => col == output)) + { + var buffer = default(VBuffer); + var getter = cursor.GetGetter>(output); + var numRows = 0; + while (cursor.MoveNext()) + { + getter(ref buffer); + Assert.Equal(10, buffer.Length); + numRows += 1; } + Assert.Equal(3, numRows); } } @@ -904,53 +774,51 @@ public void TensorFlowTransformCifarInvalidShape() { var model_location = "cifar_model/frozen_model.pb"; - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var imageHeight = 28; + var imageWidth = 28; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { - var imageHeight = 28; - var imageWidth = 28; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + Column = new[] { - Column = new[] - { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + { + Column = new ImageLoaderTransform.Column[1] { - Column = new ImageLoaderTransform.Column[1] - { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "Input", UseAlpha=false, InterleaveArgb=true} } - }, cropped); + }, cropped); - var thrown = false; - try - { - IDataView trans = TensorFlowTransform.Create(env, pixels, model_location, new[] { "Output" }, new[] { "Input" }); - } - catch - { - thrown = true; - } - Assert.True(thrown); + var thrown = false; + try + { + IDataView trans = TensorFlowTransform.Create(env, pixels, model_location, new[] { "Output" }, new[] { "Input" }); + } + catch + { + thrown = true; } + Assert.True(thrown); } } } diff --git a/test/Microsoft.ML.Tests/TensorFlowEstimatorTests.cs b/test/Microsoft.ML.Tests/TensorFlowEstimatorTests.cs index 2f2820692f..89320fecf8 100644 --- a/test/Microsoft.ML.Tests/TensorFlowEstimatorTests.cs +++ b/test/Microsoft.ML.Tests/TensorFlowEstimatorTests.cs @@ -133,10 +133,8 @@ void TestOldSavingAndLoading() [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 output differs from Baseline void TestCommandLine() { - using (var env = new ConsoleEnvironment()) - { - Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=a:R4:0-3 col=b:R4:0-3} xf=TFTransform{inputs=a inputs=b outputs=c modellocation={model_matmul/frozen_saved_model.pb}}"}), (int)0); - } + var env = new MLContext(); + Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=a:R4:0-3 col=b:R4:0-3} xf=TFTransform{inputs=a inputs=b outputs=c modellocation={model_matmul/frozen_saved_model.pb}}" }), (int)0); } [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only @@ -144,91 +142,87 @@ public void TestTensorFlowStatic() { var modelLocation = "cifar_model/frozen_model.pb"; - using (var env = new ConsoleEnvironment()) - { - var imageHeight = 32; - var imageWidth = 32; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); + var env = new MLContext(); + var imageHeight = 32; + var imageWidth = 32; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.CreateReader(env, ctx => ( - imagePath: ctx.LoadText(0), - name: ctx.LoadText(1))) - .Read(dataFile); + var data = TextLoader.CreateReader(env, ctx => ( + imagePath: ctx.LoadText(0), + name: ctx.LoadText(1))) + .Read(dataFile); - // Note that CamelCase column names are there to match the TF graph node names. - var pipe = data.MakeNewEstimator() - .Append(row => ( - row.name, - Input: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) - .Append(row => (row.name, Output: row.Input.ApplyTensorFlowGraph(modelLocation))); + // Note that CamelCase column names are there to match the TF graph node names. + var pipe = data.MakeNewEstimator() + .Append(row => ( + row.name, + Input: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) + .Append(row => (row.name, Output: row.Input.ApplyTensorFlowGraph(modelLocation))); - TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); + TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); - var result = pipe.Fit(data).Transform(data).AsDynamic; - result.Schema.TryGetColumnIndex("Output", out int output); - using (var cursor = result.GetRowCursor(col => col == output)) + var result = pipe.Fit(data).Transform(data).AsDynamic; + result.Schema.TryGetColumnIndex("Output", out int output); + using (var cursor = result.GetRowCursor(col => col == output)) + { + var buffer = default(VBuffer); + var getter = cursor.GetGetter>(output); + var numRows = 0; + while (cursor.MoveNext()) { - var buffer = default(VBuffer); - var getter = cursor.GetGetter>(output); - var numRows = 0; - while (cursor.MoveNext()) - { - getter(ref buffer); - Assert.Equal(10, buffer.Length); - numRows += 1; - } - Assert.Equal(3, numRows); + getter(ref buffer); + Assert.Equal(10, buffer.Length); + numRows += 1; } + Assert.Equal(3, numRows); } } [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] public void TestTensorFlowStaticWithSchema() { - var modelLocation = "cifar_model/frozen_model.pb"; + const string modelLocation = "cifar_model/frozen_model.pb"; - using (var env = new ConsoleEnvironment()) - { - var tensorFlowModel = TensorFlowUtils.LoadTensorFlowModel(env, modelLocation); - var schema = tensorFlowModel.GetInputSchema(); - Assert.True(schema.TryGetColumnIndex("Input", out int column)); - var type = (VectorType)schema.GetColumnType(column); - var imageHeight = type.Dimensions[0]; - var imageWidth = type.Dimensions[1]; + var env = new MLContext(); + var tensorFlowModel = TensorFlowUtils.LoadTensorFlowModel(env, modelLocation); + var schema = tensorFlowModel.GetInputSchema(); + Assert.True(schema.TryGetColumnIndex("Input", out int column)); + var type = (VectorType)schema.GetColumnType(column); + var imageHeight = type.Dimensions[0]; + var imageWidth = type.Dimensions[1]; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.CreateReader(env, ctx => ( - imagePath: ctx.LoadText(0), - name: ctx.LoadText(1))) - .Read(dataFile); + var data = TextLoader.CreateReader(env, ctx => ( + imagePath: ctx.LoadText(0), + name: ctx.LoadText(1))) + .Read(dataFile); - // Note that CamelCase column names are there to match the TF graph node names. - var pipe = data.MakeNewEstimator() - .Append(row => ( - row.name, - Input: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) - .Append(row => (row.name, Output: row.Input.ApplyTensorFlowGraph(tensorFlowModel))); + // Note that CamelCase column names are there to match the TF graph node names. + var pipe = data.MakeNewEstimator() + .Append(row => ( + row.name, + Input: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) + .Append(row => (row.name, Output: row.Input.ApplyTensorFlowGraph(tensorFlowModel))); - TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); + TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); - var result = pipe.Fit(data).Transform(data).AsDynamic; - result.Schema.TryGetColumnIndex("Output", out int output); - using (var cursor = result.GetRowCursor(col => col == output)) + var result = pipe.Fit(data).Transform(data).AsDynamic; + result.Schema.TryGetColumnIndex("Output", out int output); + using (var cursor = result.GetRowCursor(col => col == output)) + { + var buffer = default(VBuffer); + var getter = cursor.GetGetter>(output); + var numRows = 0; + while (cursor.MoveNext()) { - var buffer = default(VBuffer); - var getter = cursor.GetGetter>(output); - var numRows = 0; - while (cursor.MoveNext()) - { - getter(ref buffer); - Assert.Equal(10, buffer.Length); - numRows += 1; - } - Assert.Equal(3, numRows); + getter(ref buffer); + Assert.Equal(10, buffer.Length); + numRows += 1; } + Assert.Equal(3, numRows); } } @@ -251,10 +245,13 @@ private void ValidateTensorFlowTransformer(IDataView result) aGetter(ref avalue); bGetter(ref bvalue); cGetter(ref cvalue); - Assert.Equal(avalue.Values[0] * bvalue.Values[0] + avalue.Values[1] * bvalue.Values[2], cvalue.Values[0]); - Assert.Equal(avalue.Values[0] * bvalue.Values[1] + avalue.Values[1] * bvalue.Values[3], cvalue.Values[1]); - Assert.Equal(avalue.Values[2] * bvalue.Values[0] + avalue.Values[3] * bvalue.Values[2], cvalue.Values[2]); - Assert.Equal(avalue.Values[2] * bvalue.Values[1] + avalue.Values[3] * bvalue.Values[3], cvalue.Values[3]); + var aValues = avalue.GetValues(); + var bValues = bvalue.GetValues(); + var cValues = cvalue.GetValues(); + Assert.Equal(aValues[0] * bValues[0] + aValues[1] * bValues[2], cValues[0]); + Assert.Equal(aValues[0] * bValues[1] + aValues[1] * bValues[3], cValues[1]); + Assert.Equal(aValues[2] * bValues[0] + aValues[3] * bValues[2], cValues[2]); + Assert.Equal(aValues[2] * bValues[1] + aValues[3] * bValues[3], cValues[3]); } } } diff --git a/test/Microsoft.ML.Tests/TermEstimatorTests.cs b/test/Microsoft.ML.Tests/TermEstimatorTests.cs index 84309d80de..4caeaa27ae 100644 --- a/test/Microsoft.ML.Tests/TermEstimatorTests.cs +++ b/test/Microsoft.ML.Tests/TermEstimatorTests.cs @@ -71,13 +71,13 @@ void TestDifferentTypes() }, new MultiFileSource(dataPath)); var pipe = new ValueToKeyMappingEstimator(Env, new[]{ - new TermTransform.ColumnInfo("float1", "TermFloat1"), - new TermTransform.ColumnInfo("float4", "TermFloat4"), - new TermTransform.ColumnInfo("double1", "TermDouble1"), - new TermTransform.ColumnInfo("double4", "TermDouble4"), - new TermTransform.ColumnInfo("int1", "TermInt1"), - new TermTransform.ColumnInfo("text1", "TermText1"), - new TermTransform.ColumnInfo("text2", "TermText2") + new ValueToKeyMappingTransformer.ColumnInfo("float1", "TermFloat1"), + new ValueToKeyMappingTransformer.ColumnInfo("float4", "TermFloat4"), + new ValueToKeyMappingTransformer.ColumnInfo("double1", "TermDouble1"), + new ValueToKeyMappingTransformer.ColumnInfo("double4", "TermDouble4"), + new ValueToKeyMappingTransformer.ColumnInfo("int1", "TermInt1"), + new ValueToKeyMappingTransformer.ColumnInfo("text1", "TermText1"), + new ValueToKeyMappingTransformer.ColumnInfo("text2", "TermText2") }); var data = loader.Read(dataPath); data = TakeFilter.Create(Env, data, 10); @@ -102,9 +102,9 @@ void TestSimpleCase() var stringData = new[] { new TestClassDifferentTypes { A = "1", B = "c", C = "b" } }; var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new ValueToKeyMappingEstimator(Env, new[]{ - new TermTransform.ColumnInfo("A", "TermA"), - new TermTransform.ColumnInfo("B", "TermB"), - new TermTransform.ColumnInfo("C", "TermC") + new ValueToKeyMappingTransformer.ColumnInfo("A", "TermA"), + new ValueToKeyMappingTransformer.ColumnInfo("B", "TermB"), + new ValueToKeyMappingTransformer.ColumnInfo("C", "TermC") }); var invalidData = ComponentCreation.CreateDataView(Env, xydata); var validFitNotValidTransformData = ComponentCreation.CreateDataView(Env, stringData); @@ -117,9 +117,9 @@ void TestOldSavingAndLoading() var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); var est = new ValueToKeyMappingEstimator(Env, new[]{ - new TermTransform.ColumnInfo("A", "TermA"), - new TermTransform.ColumnInfo("B", "TermB"), - new TermTransform.ColumnInfo("C", "TermC") + new ValueToKeyMappingTransformer.ColumnInfo("A", "TermA"), + new ValueToKeyMappingTransformer.ColumnInfo("B", "TermB"), + new ValueToKeyMappingTransformer.ColumnInfo("C", "TermC") }); var transformer = est.Fit(dataView); var result = transformer.Transform(dataView); @@ -139,8 +139,8 @@ void TestMetadataCopy() var data = new[] { new TestMetaClass() { Term = "A", NotUsed = 1 }, new TestMetaClass() { Term = "B" }, new TestMetaClass() { Term = "C" } }; var dataView = ComponentCreation.CreateDataView(Env, data); var termEst = new ValueToKeyMappingEstimator(Env, new[] { - new TermTransform.ColumnInfo("Term" ,"T") }); - + new ValueToKeyMappingTransformer.ColumnInfo("Term" ,"T") }); + var termTransformer = termEst.Fit(dataView); var result = termTransformer.Transform(dataView); result.Schema.TryGetColumnIndex("T", out int termIndex); @@ -155,10 +155,8 @@ void TestMetadataCopy() [Fact] void TestCommandLine() { - using (var env = new ConsoleEnvironment()) - { - Assert.Equal(0, Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0} xf=Term{col=B:A} in=f:\2.txt" })); - } + var env = new MLContext(); + Assert.Equal(0, Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0} xf=Term{col=B:A} in=f:\2.txt" })); } private void ValidateTermTransformer(IDataView result) diff --git a/test/Microsoft.ML.Tests/TextLoaderTests.cs b/test/Microsoft.ML.Tests/TextLoaderTests.cs index 575146fbf7..fb83ffab24 100644 --- a/test/Microsoft.ML.Tests/TextLoaderTests.cs +++ b/test/Microsoft.ML.Tests/TextLoaderTests.cs @@ -46,7 +46,7 @@ public void TestTextLoaderDataTypes() Assert.True(cursor.MoveNext()); - sbyte[] sByteTargets = new sbyte[] { sbyte.MinValue, sbyte.MaxValue, default}; + sbyte[] sByteTargets = new sbyte[] { sbyte.MinValue, sbyte.MaxValue, default }; short[] shortTargets = new short[] { short.MinValue, short.MaxValue, default }; int[] intTargets = new int[] { int.MinValue, int.MaxValue, default }; long[] longTargets = new long[] { long.MinValue, long.MaxValue, default }; @@ -96,7 +96,7 @@ public void TestTextLoaderInvalidLongMin() "loader=Text{col=DvInt8:I8:0 sep=comma}", }, logCurs: true); } - catch(Exception ex) + catch (Exception ex) { Assert.Equal("Could not parse value -9223372036854775809 in line 1, column DvInt8", ex.Message); return; @@ -142,7 +142,7 @@ public TextLoaderTests(ITestOutputHelper output) public void ConstructorDoesntThrow() { Assert.NotNull(new Legacy.Data.TextLoader("fakeFile.txt").CreateFrom()); - Assert.NotNull(new Legacy.Data.TextLoader("fakeFile.txt").CreateFrom(useHeader:true)); + Assert.NotNull(new Legacy.Data.TextLoader("fakeFile.txt").CreateFrom(useHeader: true)); Assert.NotNull(new Legacy.Data.TextLoader("fakeFile.txt").CreateFrom()); Assert.NotNull(new Legacy.Data.TextLoader("fakeFile.txt").CreateFrom(useHeader: false)); Assert.NotNull(new Legacy.Data.TextLoader("fakeFile.txt").CreateFrom(useHeader: false, supportSparse: false, trimWhitespace: false)); @@ -158,15 +158,13 @@ public void CanSuccessfullyApplyATransform() { var loader = new Legacy.Data.TextLoader("fakeFile.txt").CreateFrom(); - using (var environment = new ConsoleEnvironment()) - { - Experiment experiment = environment.CreateExperiment(); - Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; + var environment = new MLContext(); + Experiment experiment = environment.CreateExperiment(); + Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; - Assert.NotNull(output.Data); - Assert.NotNull(output.Data.VarName); - Assert.Null(output.Model); - } + Assert.NotNull(output.Data); + Assert.NotNull(output.Data.VarName); + Assert.Null(output.Model); } [Fact] @@ -174,56 +172,54 @@ public void CanSuccessfullyRetrieveQuotedData() { string dataPath = GetDataPath("QuotingData.csv"); var loader = new Legacy.Data.TextLoader(dataPath).CreateFrom(useHeader: true, separator: ',', allowQuotedStrings: true, supportSparse: false); - - using (var environment = new ConsoleEnvironment()) - { - Experiment experiment = environment.CreateExperiment(); - Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; - experiment.Compile(); - loader.SetInput(environment, experiment); - experiment.Run(); + var environment = new MLContext(); + Experiment experiment = environment.CreateExperiment(); + Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; - IDataView data = experiment.GetOutput(output.Data); - Assert.NotNull(data); + experiment.Compile(); + loader.SetInput(environment, experiment); + experiment.Run(); - using (var cursor = data.GetRowCursor((a => true))) - { - var IDGetter = cursor.GetGetter(0); - var TextGetter = cursor.GetGetter>(1); + IDataView data = experiment.GetOutput(output.Data); + Assert.NotNull(data); - Assert.True(cursor.MoveNext()); + using (var cursor = data.GetRowCursor((a => true))) + { + var IDGetter = cursor.GetGetter(0); + var TextGetter = cursor.GetGetter>(1); + + Assert.True(cursor.MoveNext()); - float ID = 0; - IDGetter(ref ID); - Assert.Equal(1, ID); + float ID = 0; + IDGetter(ref ID); + Assert.Equal(1, ID); - ReadOnlyMemory Text = new ReadOnlyMemory(); - TextGetter(ref Text); - Assert.Equal("This text contains comma, within quotes.", Text.ToString()); + ReadOnlyMemory Text = new ReadOnlyMemory(); + TextGetter(ref Text); + Assert.Equal("This text contains comma, within quotes.", Text.ToString()); - Assert.True(cursor.MoveNext()); + Assert.True(cursor.MoveNext()); - ID = 0; - IDGetter(ref ID); - Assert.Equal(2, ID); + ID = 0; + IDGetter(ref ID); + Assert.Equal(2, ID); - Text = new ReadOnlyMemory(); - TextGetter(ref Text); - Assert.Equal("This text contains extra punctuations and special characters.;*<>?!@#$%^&*()_+=-{}|[]:;'", Text.ToString()); + Text = new ReadOnlyMemory(); + TextGetter(ref Text); + Assert.Equal("This text contains extra punctuations and special characters.;*<>?!@#$%^&*()_+=-{}|[]:;'", Text.ToString()); - Assert.True(cursor.MoveNext()); + Assert.True(cursor.MoveNext()); - ID = 0; - IDGetter(ref ID); - Assert.Equal(3, ID); + ID = 0; + IDGetter(ref ID); + Assert.Equal(3, ID); - Text = new ReadOnlyMemory(); - TextGetter(ref Text); - Assert.Equal("This text has no quotes", Text.ToString()); + Text = new ReadOnlyMemory(); + TextGetter(ref Text); + Assert.Equal("This text has no quotes", Text.ToString()); - Assert.False(cursor.MoveNext()); - } + Assert.False(cursor.MoveNext()); } } @@ -233,21 +229,20 @@ public void CanSuccessfullyRetrieveSparseData() string dataPath = GetDataPath("SparseData.txt"); var loader = new Legacy.Data.TextLoader(dataPath).CreateFrom(useHeader: true, allowQuotedStrings: false, supportSparse: true); - using (var environment = new ConsoleEnvironment()) - { - Experiment experiment = environment.CreateExperiment(); - Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; + var environment = new MLContext(); + Experiment experiment = environment.CreateExperiment(); + Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; - experiment.Compile(); - loader.SetInput(environment, experiment); - experiment.Run(); + experiment.Compile(); + loader.SetInput(environment, experiment); + experiment.Run(); - IDataView data = experiment.GetOutput(output.Data); - Assert.NotNull(data); + IDataView data = experiment.GetOutput(output.Data); + Assert.NotNull(data); - using (var cursor = data.GetRowCursor((a => true))) - { - var getters = new ValueGetter[]{ + using (var cursor = data.GetRowCursor((a => true))) + { + var getters = new ValueGetter[]{ cursor.GetGetter(0), cursor.GetGetter(1), cursor.GetGetter(2), @@ -256,38 +251,37 @@ public void CanSuccessfullyRetrieveSparseData() }; - Assert.True(cursor.MoveNext()); - - float[] targets = new float[] { 1, 2, 3, 4, 5 }; - for (int i = 0; i < getters.Length; i++) - { - float value = 0; - getters[i](ref value); - Assert.Equal(targets[i], value); - } + Assert.True(cursor.MoveNext()); - Assert.True(cursor.MoveNext()); + float[] targets = new float[] { 1, 2, 3, 4, 5 }; + for (int i = 0; i < getters.Length; i++) + { + float value = 0; + getters[i](ref value); + Assert.Equal(targets[i], value); + } - targets = new float[] { 0, 0, 0, 4, 5 }; - for (int i = 0; i < getters.Length; i++) - { - float value = 0; - getters[i](ref value); - Assert.Equal(targets[i], value); - } + Assert.True(cursor.MoveNext()); - Assert.True(cursor.MoveNext()); + targets = new float[] { 0, 0, 0, 4, 5 }; + for (int i = 0; i < getters.Length; i++) + { + float value = 0; + getters[i](ref value); + Assert.Equal(targets[i], value); + } - targets = new float[] { 0, 2, 0, 0, 0 }; - for (int i = 0; i < getters.Length; i++) - { - float value = 0; - getters[i](ref value); - Assert.Equal(targets[i], value); - } + Assert.True(cursor.MoveNext()); - Assert.False(cursor.MoveNext()); + targets = new float[] { 0, 2, 0, 0, 0 }; + for (int i = 0; i < getters.Length; i++) + { + float value = 0; + getters[i](ref value); + Assert.Equal(targets[i], value); } + + Assert.False(cursor.MoveNext()); } } @@ -298,52 +292,50 @@ public void CanSuccessfullyTrimSpaces() string dataPath = GetDataPath("TrimData.csv"); var loader = new Legacy.Data.TextLoader(dataPath).CreateFrom(useHeader: true, separator: ',', allowQuotedStrings: false, supportSparse: false, trimWhitespace: true); - using (var environment = new ConsoleEnvironment()) - { - Experiment experiment = environment.CreateExperiment(); - Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; + var environment = new MLContext(); + Experiment experiment = environment.CreateExperiment(); + Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; - experiment.Compile(); - loader.SetInput(environment, experiment); - experiment.Run(); + experiment.Compile(); + loader.SetInput(environment, experiment); + experiment.Run(); - IDataView data = experiment.GetOutput(output.Data); - Assert.NotNull(data); + IDataView data = experiment.GetOutput(output.Data); + Assert.NotNull(data); - using (var cursor = data.GetRowCursor((a => true))) - { - var IDGetter = cursor.GetGetter(0); - var TextGetter = cursor.GetGetter>(1); + using (var cursor = data.GetRowCursor((a => true))) + { + var IDGetter = cursor.GetGetter(0); + var TextGetter = cursor.GetGetter>(1); + + Assert.True(cursor.MoveNext()); - Assert.True(cursor.MoveNext()); + float ID = 0; + IDGetter(ref ID); + Assert.Equal(1, ID); - float ID = 0; - IDGetter(ref ID); - Assert.Equal(1, ID); + ReadOnlyMemory Text = new ReadOnlyMemory(); + TextGetter(ref Text); + Assert.Equal("There is a space at the end", Text.ToString()); - ReadOnlyMemory Text = new ReadOnlyMemory(); - TextGetter(ref Text); - Assert.Equal("There is a space at the end", Text.ToString()); + Assert.True(cursor.MoveNext()); - Assert.True(cursor.MoveNext()); + ID = 0; + IDGetter(ref ID); + Assert.Equal(2, ID); - ID = 0; - IDGetter(ref ID); - Assert.Equal(2, ID); + Text = new ReadOnlyMemory(); + TextGetter(ref Text); + Assert.Equal("There is no space at the end", Text.ToString()); - Text = new ReadOnlyMemory(); - TextGetter(ref Text); - Assert.Equal("There is no space at the end", Text.ToString()); - - Assert.False(cursor.MoveNext()); - } + Assert.False(cursor.MoveNext()); } } [Fact] public void ThrowsExceptionWithPropertyName() { - Exception ex = Assert.Throws( () => new Legacy.Data.TextLoader("fakefile.txt").CreateFrom() ); + Exception ex = Assert.Throws(() => new Legacy.Data.TextLoader("fakefile.txt").CreateFrom()); Assert.StartsWith("Field or property String1 is missing ColumnAttribute", ex.Message); } @@ -351,9 +343,9 @@ public void ThrowsExceptionWithPropertyName() public void CanSuccessfullyColumnNameProperty() { var loader = new Legacy.Data.TextLoader("fakefile.txt").CreateFrom(); - Assert.Equal("Col1",loader.Arguments.Column[0].Name); - Assert.Equal("Col2",loader.Arguments.Column[1].Name); - Assert.Equal("String_3",loader.Arguments.Column[2].Name); + Assert.Equal("Col1", loader.Arguments.Column[0].Name); + Assert.Equal("Col2", loader.Arguments.Column[1].Name); + Assert.Equal("String_3", loader.Arguments.Column[2].Name); } public class QuoteInput @@ -413,7 +405,7 @@ public class ModelWithColumnNameAttribute [Column("1")] [ColumnName("Col2")] public string String_2; - [Column("3")] + [Column("3")] public string String_3; } } diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs b/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs index 6d4a20cd15..7ccd12667c 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs @@ -20,7 +20,7 @@ public void FieldAwareFactorizationMachine_Estimator() var data = new TextLoader(Env, GetFafmBCLoaderArgs()) .Read(GetDataPath(TestDatasets.breastCancer.trainFilename)); - var est = new FieldAwareFactorizationMachineTrainer(Env, "Label", new[] { "Feature1", "Feature2", "Feature3", "Feature4" }, + var est = new FieldAwareFactorizationMachineTrainer(Env, new[] { "Feature1", "Feature2", "Feature3", "Feature4" }, "Label", advancedSettings:s=> { s.Shuffle = false; diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs index fc3b458145..30906c8940 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs @@ -4,6 +4,7 @@ using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Internal.Calibration; using Microsoft.ML.Runtime.Learners; using Microsoft.ML.Trainers; using Xunit; @@ -16,7 +17,7 @@ public partial class TrainerEstimators public void TestEstimatorLogisticRegression() { (IEstimator pipe, IDataView dataView) = GetBinaryClassificationPipeline(); - pipe = pipe.Append(new LogisticRegression(Env, "Features", "Label")); + pipe = pipe.Append(new LogisticRegression(Env, "Label", "Features")); TestEstimatorCore(pipe, dataView); Done(); } @@ -25,7 +26,7 @@ public void TestEstimatorLogisticRegression() public void TestEstimatorMulticlassLogisticRegression() { (IEstimator pipe, IDataView dataView) = GetMultiClassPipeline(); - pipe = pipe.Append(new MulticlassLogisticRegression(Env, "Features", "Label")); + pipe = pipe.Append(new MulticlassLogisticRegression(Env, "Label", "Features")); TestEstimatorCore(pipe, dataView); Done(); } @@ -34,9 +35,45 @@ public void TestEstimatorMulticlassLogisticRegression() public void TestEstimatorPoissonRegression() { var dataView = GetRegressionPipeline(); - var pipe = new PoissonRegression(Env, "Features", "Label"); + var pipe = new PoissonRegression(Env, "Label", "Features"); TestEstimatorCore(pipe, dataView); Done(); } + + [Fact] + public void TestLogisticRegressionStats() + { + (IEstimator pipe, IDataView dataView) = GetBinaryClassificationPipeline(); + + pipe = pipe.Append(new LogisticRegression(Env, "Label", "Features", advancedSettings: s => { s.ShowTrainingStats = true; })); + var transformerChain = pipe.Fit(dataView) as TransformerChain>; + + var linearModel = transformerChain.LastTransformer.Model.SubPredictor as LinearBinaryPredictor; + var stats = linearModel.Statistics; + LinearModelStatistics.TryGetBiasStatistics(stats, 2, out float stdError, out float zScore, out float pValue); + + CompareNumbersWithTolerance(stdError, 0.250672936); + CompareNumbersWithTolerance(zScore, 7.97852373); + } + + [Fact] + public void TestLogisticRegressionStats_MKL() + { + (IEstimator pipe, IDataView dataView) = GetBinaryClassificationPipeline(); + + pipe = pipe.Append(new LogisticRegression(Env, "Label", "Features", advancedSettings: s => { + s.ShowTrainingStats = true; + s.StdComputer = new ComputeLRTrainingStdThroughHal(); + })); + + var transformerChain = pipe.Fit(dataView) as TransformerChain>; + + var linearModel = transformerChain.LastTransformer.Model.SubPredictor as LinearBinaryPredictor; + var stats = linearModel.Statistics; + LinearModelStatistics.TryGetBiasStatistics(stats, 2, out float stdError, out float zScore, out float pValue); + + CompareNumbersWithTolerance(stdError, 0.250672936); + CompareNumbersWithTolerance(zScore, 7.97852373); + } } } diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs index cb5a8b2748..4b1e8cf92e 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs @@ -31,7 +31,7 @@ public void MatrixFactorization_Estimator() var invalidData = new TextLoader(Env, GetLoaderArgs(labelColumnName, matrixColumnIndexColumnName + "Renamed", matrixRowIndexColumnName + "Renamed")) .Read(new MultiFileSource(GetDataPath(TestDatasets.trivialMatrixFactorization.testFilename))); - var est = new MatrixFactorizationTrainer(Env, labelColumnName, matrixColumnIndexColumnName, matrixRowIndexColumnName, + var est = new MatrixFactorizationTrainer(Env, matrixColumnIndexColumnName, matrixRowIndexColumnName, labelColumnName, advancedSettings: s => { s.NumIterations = 3; @@ -62,7 +62,7 @@ public void MatrixFactorizationSimpleTrainAndPredict() var data = reader.Read(new MultiFileSource(GetDataPath(TestDatasets.trivialMatrixFactorization.trainFilename))); // Create a pipeline with a single operator. - var pipeline = new MatrixFactorizationTrainer(mlContext, labelColumnName, userColumnName, itemColumnName, + var pipeline = new MatrixFactorizationTrainer(mlContext, userColumnName, itemColumnName, labelColumnName, advancedSettings: s => { s.NumIterations = 3; @@ -179,8 +179,10 @@ public void MatrixFactorizationInMemoryData() // Create a matrix factorization trainer which may consume "Value" as the training label, "MatrixColumnIndex" as the // matrix's column index, and "MatrixRowIndex" as the matrix's row index. var mlContext = new MLContext(seed: 1, conc: 1); - var pipeline = new MatrixFactorizationTrainer(mlContext, nameof(MatrixElement.Value), - nameof(MatrixElement.MatrixColumnIndex), nameof(MatrixElement.MatrixRowIndex), + var pipeline = new MatrixFactorizationTrainer(mlContext, + nameof(MatrixElement.MatrixColumnIndex), + nameof(MatrixElement.MatrixRowIndex), + nameof(MatrixElement.Value), advancedSettings: s => { s.NumIterations = 10; @@ -269,8 +271,10 @@ public void MatrixFactorizationInMemoryDataZeroBaseIndex() // Create a matrix factorization trainer which may consume "Value" as the training label, "MatrixColumnIndex" as the // matrix's column index, and "MatrixRowIndex" as the matrix's row index. var mlContext = new MLContext(seed: 1, conc: 1); - var pipeline = new MatrixFactorizationTrainer(mlContext, nameof(MatrixElementZeroBased.Value), - nameof(MatrixElementZeroBased.MatrixColumnIndex), nameof(MatrixElementZeroBased.MatrixRowIndex), + var pipeline = new MatrixFactorizationTrainer(mlContext, + nameof(MatrixElementZeroBased.MatrixColumnIndex), + nameof(MatrixElementZeroBased.MatrixRowIndex), + nameof(MatrixElementZeroBased.Value), advancedSettings: s => { s.NumIterations = 100; @@ -327,5 +331,112 @@ public void MatrixFactorizationInMemoryDataZeroBaseIndex() // The presence of out-of-range indexes may lead to NaN Assert.True(float.IsNaN(pred.Score)); } + + // The following ingredients are used to define a 3-by-2 one-class + // matrix used in a test, OneClassMatrixFactorizationInMemoryDataZeroBaseIndex, + // for one-class matrix factorization. One-class matrix means that all + // the available elements in the training matrix are 1. Such a matrix + // is common. Let's use online game store as an example. Assume that + // user IDs are row indexes and game IDs are column indexes. By + // encoding all users' purchase history as a matrix (i.e., if the value + // at the u-th row and the v-th column is 1, then the u-th user owns + // the v-th game), a one-class matrix gets created because all matrix + // elements are 1. If you train a prediction model from that matrix + // using standard collaborative filtering, all your predictions would + // be 1! One-class matrix factorization assumes unspecified matrix + // entries are all 0 (or a small constant value selected by the user) + // so that the trainined model can assign purchased itemas higher + // scores than those not purchased. + private const int _oneClassMatrixColumnCount = 2; + private const int _oneClassMatrixRowCount = 3; + + private class OneClassMatrixElementZeroBased + { + [KeyType(Contiguous = true, Count = _oneClassMatrixColumnCount, Min = 0)] + public uint MatrixColumnIndex; + [KeyType(Contiguous = true, Count = _oneClassMatrixRowCount, Min = 0)] + public uint MatrixRowIndex; + public float Value; + } + + private class OneClassMatrixElementZeroBasedForScore + { + [KeyType(Contiguous = true, Count = _oneClassMatrixColumnCount, Min = 0)] + public uint MatrixColumnIndex; + [KeyType(Contiguous = true, Count = _oneClassMatrixRowCount, Min = 0)] + public uint MatrixRowIndex; + public float Value; + public float Score; + } + + [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // This test is being fixed as part of issue #1441. + public void OneClassMatrixFactorizationInMemoryDataZeroBaseIndex() + { + // Create an in-memory matrix as a list of tuples (column index, row index, value). For one-class matrix + // factorization problem, unspecified matrix elements are all a constant provided by user. If that constant is 0.15, + // the following list means a 3-by-2 training matrix with elements: + // (0, 0, 1), (1, 1, 1), (0, 2, 1), (0, 1, 0.15), (1, 0, 0.15), (1, 2, 0.15). + // because matrix elements at (0, 1), (1, 0), and (1, 2) are not specified. + var dataMatrix = new List(); + dataMatrix.Add(new OneClassMatrixElementZeroBased() { MatrixColumnIndex = 0, MatrixRowIndex = 0, Value = 1 }); + dataMatrix.Add(new OneClassMatrixElementZeroBased() { MatrixColumnIndex = 1, MatrixRowIndex = 1, Value = 1 }); + dataMatrix.Add(new OneClassMatrixElementZeroBased() { MatrixColumnIndex = 0, MatrixRowIndex = 2, Value = 1 }); + + // Convert the in-memory matrix into an IDataView so that ML.NET components can consume it. + var dataView = ComponentCreation.CreateDataView(Env, dataMatrix); + + // Create a matrix factorization trainer which may consume "Value" as the training label, "MatrixColumnIndex" as the + // matrix's column index, and "MatrixRowIndex" as the matrix's row index. + var mlContext = new MLContext(seed: 1, conc: 1); + var pipeline = new MatrixFactorizationTrainer(mlContext, + nameof(OneClassMatrixElementZeroBased.MatrixColumnIndex), + nameof(OneClassMatrixElementZeroBased.MatrixRowIndex), + nameof(OneClassMatrixElementZeroBased.Value), + advancedSettings: s => + { + s.LossFunction = MatrixFactorizationTrainer.LossFunctionType.SquareLossOneClass; + s.NumIterations = 100; + s.NumThreads = 1; // To eliminate randomness, # of threads must be 1. + // Let's test non-default regularization coefficient. + s.Lambda = 0.025; + s.K = 16; + // Importance coefficient of loss function over matrix elements not specified in the input matrix. + s.Alpha = 0.01; + // Desired value for matrix elements not specified in the input matrix. + s.C = 0.15; + }); + + // Train a matrix factorization model. + var model = pipeline.Fit(dataView); + + // Apply the trained model to the training set. + var prediction = model.Transform(dataView); + + // Calculate regression matrices for the prediction result. + var metrics = mlContext.Regression.Evaluate(prediction, label: "Value", score: "Score"); + + // Make sure the prediction error is not too large. + Assert.InRange(metrics.L2, 0, 0.0016); + + // Create data for testing. Note that the 2nd element is not specified in the training data so it should + // be close to the constant specified by s.C = 0.15. Comparing with the data structure used in training phase, + // one extra float is added into OneClassMatrixElementZeroBasedForScore for storing the prediction result. Note + // that the prediction engine may ignore Value and assign the predicted value to Score. + var testDataMatrix = new List(); + testDataMatrix.Add(new OneClassMatrixElementZeroBasedForScore() { MatrixColumnIndex = 0, MatrixRowIndex = 0, Value = 0, Score = 0 }); + testDataMatrix.Add(new OneClassMatrixElementZeroBasedForScore() { MatrixColumnIndex = 1, MatrixRowIndex = 2, Value = 0, Score = 0 }); + + // Convert the in-memory matrix into an IDataView so that ML.NET components can consume it. + var testDataView = ComponentCreation.CreateDataView(Env, testDataMatrix); + + // Apply the trained model to the test data. + var testPrediction = model.Transform(testDataView); + + var testResults = new List(testPrediction.AsEnumerable(mlContext, false)); + // Positive example (i.e., examples can be found in dataMatrix) is close to 1. + CompareNumbersWithTolerance(0.982391, testResults[0].Score, digitsOfPrecision: 5); + // Negative example (i.e., examples can not be found in dataMatrix) is close to 0.15 (specified by s.C = 0.15 in the trainer). + CompareNumbersWithTolerance(0.141411, testResults[1].Score, digitsOfPrecision: 5); + } } } \ No newline at end of file diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/MetalinearEstimators.cs b/test/Microsoft.ML.Tests/TrainerEstimators/MetalinearEstimators.cs index 0ef6f379db..08796a4ff3 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/MetalinearEstimators.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/MetalinearEstimators.cs @@ -31,7 +31,7 @@ public void OVAWithAllConstructorArgs() }); pipeline.Append(new Ova(Env, averagePerceptron, "Label", true, calibrator: calibrator, 10000, true)) - .Append(new KeyToValueEstimator(Env, "PredictedLabel")); + .Append(new KeyToValueMappingEstimator(Env, "PredictedLabel")); TestEstimatorCore(pipeline, data); Done(); @@ -44,10 +44,10 @@ public void OVAWithAllConstructorArgs() public void OVAUncalibrated() { var (pipeline, data) = GetMultiClassPipeline(); - var sdcaTrainer = new SdcaBinaryTrainer(Env, "Features", "Label", advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; s.Calibrator = null; }); + var sdcaTrainer = new SdcaBinaryTrainer(Env, "Label", "Features", advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; s.Calibrator = null; }); pipeline.Append(new Ova(Env, sdcaTrainer, useProbabilities: false)) - .Append(new KeyToValueEstimator(Env, "PredictedLabel")); + .Append(new KeyToValueMappingEstimator(Env, "PredictedLabel")); TestEstimatorCore(pipeline, data); Done(); @@ -61,9 +61,9 @@ public void Pkpd() { var (pipeline, data) = GetMultiClassPipeline(); - var sdcaTrainer = new SdcaBinaryTrainer(Env, "Features", "Label", advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; }); + var sdcaTrainer = new SdcaBinaryTrainer(Env, "Label", "Features", advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; }); pipeline.Append(new Pkpd(Env, sdcaTrainer)) - .Append(new KeyToValueEstimator(Env, "PredictedLabel")); + .Append(new KeyToValueMappingEstimator(Env, "PredictedLabel")); TestEstimatorCore(pipeline, data); Done(); diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs index 87bdddc6e8..edd5d19bec 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs @@ -13,7 +13,7 @@ public partial class TrainerEstimators public void TestEstimatorOlsLinearRegression() { var dataView = GetRegressionPipeline(); - var pipe = new OlsLinearRegressionTrainer(Env, "Features", "Label"); + var pipe = new OlsLinearRegressionTrainer(Env, "Label", "Features"); TestEstimatorCore(pipe, dataView); Done(); } diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/OnlineLinearTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/OnlineLinearTests.cs index 10ae3c7a8a..afb6826001 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/OnlineLinearTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/OnlineLinearTests.cs @@ -5,6 +5,7 @@ using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Data; +using Microsoft.ML.StaticPipe; using Microsoft.ML.Trainers.Online; using Xunit; diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/SdcaTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/SdcaTests.cs index 6f5917015f..a1a3d37703 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/SdcaTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/SdcaTests.cs @@ -19,13 +19,13 @@ public void SdcaWorkout() var data = TextLoader.CreateReader(Env, ctx => (Label: ctx.LoadFloat(0), Features: ctx.LoadFloat(1, 10))) .Read(dataPath); - IEstimator est = new SdcaBinaryTrainer(Env, "Features", "Label", advancedSettings: (s) => s.ConvergenceTolerance = 1e-2f); + IEstimator est = new SdcaBinaryTrainer(Env, "Label", "Features", advancedSettings: (s) => s.ConvergenceTolerance = 1e-2f); TestEstimatorCore(est, data.AsDynamic); - est = new SdcaRegressionTrainer(Env, "Features", "Label", advancedSettings: (s) => s.ConvergenceTolerance = 1e-2f); + est = new SdcaRegressionTrainer(Env, "Label", "Features", advancedSettings: (s) => s.ConvergenceTolerance = 1e-2f); TestEstimatorCore(est, data.AsDynamic); - est = new SdcaMultiClassTrainer(Env, "Features", "Label", advancedSettings: (s) => s.ConvergenceTolerance = 1e-2f); + est = new SdcaMultiClassTrainer(Env, "Label", "Features", advancedSettings: (s) => s.ConvergenceTolerance = 1e-2f); TestEstimatorCore(est, data.AsDynamic); Done(); diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs index fc4694c9c1..bf139bee79 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs @@ -18,7 +18,7 @@ public partial class TrainerEstimators public void TestEstimatorSymSgdClassificationTrainer() { (var pipe, var dataView) = GetBinaryClassificationPipeline(); - pipe = pipe.Append(new SymSgdClassificationTrainer(Env, "Features", "Label")); + pipe = pipe.Append(new SymSgdClassificationTrainer(Env, "Label", "Features")); TestEstimatorCore(pipe, dataView); Done(); } @@ -29,13 +29,13 @@ public void TestEstimatorSymSgdInitPredictor() (var pipe, var dataView) = GetBinaryClassificationPipeline(); var transformedData = pipe.Fit(dataView).Transform(dataView); - var initPredictor = new SdcaBinaryTrainer(Env, "Features", "Label").Fit(transformedData); + var initPredictor = new SdcaBinaryTrainer(Env, "Label", "Features").Fit(transformedData); var data = initPredictor.Transform(transformedData); - var withInitPredictor = new SymSgdClassificationTrainer(Env, "Features", "Label").Train(transformedData, initialPredictor: initPredictor.Model); + var withInitPredictor = new SymSgdClassificationTrainer(Env, "Label", "Features").Train(transformedData, initialPredictor: initPredictor.Model); var outInitData = withInitPredictor.Transform(transformedData); - var notInitPredictor = new SymSgdClassificationTrainer(Env, "Features", "Label").Train(transformedData); + var notInitPredictor = new SymSgdClassificationTrainer(Env, "Label", "Features").Train(transformedData); var outNoInitData = notInitPredictor.Transform(transformedData); int numExamples = 10; diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs b/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs index 744b186aed..1ac7c28622 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs @@ -71,7 +71,7 @@ public void KMeansEstimator() // Pipeline. - var pipeline = new KMeansPlusPlusTrainer(Env, featureColumn, weightColumn: weights, + var pipeline = new KMeansPlusPlusTrainer(Env, featureColumn, weights: weights, advancedSettings: s => { s.InitAlgorithm = KMeansPlusPlusTrainer.InitAlgorithm.KMeansParallel; }); TestEstimatorCore(pipeline, data); @@ -86,7 +86,7 @@ public void KMeansEstimator() public void TestEstimatorHogwildSGD() { (IEstimator pipe, IDataView dataView) = GetBinaryClassificationPipeline(); - pipe = pipe.Append(new StochasticGradientDescentClassificationTrainer(Env, "Features", "Label")); + pipe = pipe.Append(new StochasticGradientDescentClassificationTrainer(Env, "Label", "Features")); TestEstimatorCore(pipe, dataView); Done(); } @@ -140,8 +140,8 @@ public void TestEstimatorMultiClassNaiveBayesTrainer() // Pipeline. var pipeline = new ValueToKeyMappingEstimator(Env, new[]{ - new TermTransform.ColumnInfo("Workclass", "Group"), - new TermTransform.ColumnInfo("Label", "Label0") }); + new ValueToKeyMappingTransformer.ColumnInfo("Workclass", "Group"), + new ValueToKeyMappingTransformer.ColumnInfo("Label", "Label0") }); return (pipeline, data); } diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs b/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs index 8dff39c0dc..9c583c9533 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs @@ -204,7 +204,7 @@ public void LightGbmMultiClassEstimator() var (pipeline, data) = GetMultiClassPipeline(); pipeline.Append(new LightGbmMulticlassTrainer(Env, "Label", "Features", advancedSettings: s => { s.LearningRate = 0.4; })) - .Append(new KeyToValueEstimator(Env, "PredictedLabel")); + .Append(new KeyToValueMappingEstimator(Env, "PredictedLabel")); TestEstimatorCore(pipeline, data); Done(); diff --git a/test/Microsoft.ML.Tests/Transformers/CategoricalHashTests.cs b/test/Microsoft.ML.Tests/Transformers/CategoricalHashTests.cs index 53700b1962..43646f5ef1 100644 --- a/test/Microsoft.ML.Tests/Transformers/CategoricalHashTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/CategoricalHashTests.cs @@ -51,10 +51,10 @@ public void CategoricalHashWorkout() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new OneHotHashEncodingEstimator(Env, new[]{ - new OneHotHashEncodingEstimator.ColumnInfo("A", "CatA", CategoricalTransform.OutputKind.Bag), - new OneHotHashEncodingEstimator.ColumnInfo("A", "CatB", CategoricalTransform.OutputKind.Bin), - new OneHotHashEncodingEstimator.ColumnInfo("A", "CatC", CategoricalTransform.OutputKind.Ind), - new OneHotHashEncodingEstimator.ColumnInfo("A", "CatD", CategoricalTransform.OutputKind.Key), + new OneHotHashEncodingEstimator.ColumnInfo("A", "CatA", OneHotEncodingTransformer.OutputKind.Bag), + new OneHotHashEncodingEstimator.ColumnInfo("A", "CatB", OneHotEncodingTransformer.OutputKind.Bin), + new OneHotHashEncodingEstimator.ColumnInfo("A", "CatC", OneHotEncodingTransformer.OutputKind.Ind), + new OneHotHashEncodingEstimator.ColumnInfo("A", "CatD", OneHotEncodingTransformer.OutputKind.Key), }); TestEstimatorCore(pipe, dataView); @@ -88,7 +88,7 @@ public void CategoricalHashStatic() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); var savedData = TakeFilter.Create(Env, est.Fit(data).Transform(data).AsDynamic, 4); - var view = SelectColumnsTransform.CreateKeep(Env, savedData, false, "A", "B", "C", "D", "E"); + var view = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "A", "B", "C", "D", "E" }); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, view, fs, keepHidden: true); } @@ -107,16 +107,16 @@ public void TestMetadataPropagation() var dataView = ComponentCreation.CreateDataView(Env, data); var bagPipe = new OneHotHashEncodingEstimator(Env, - new OneHotHashEncodingEstimator.ColumnInfo("A", "CatA", CategoricalTransform.OutputKind.Bag, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("B", "CatB", CategoricalTransform.OutputKind.Bag, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("C", "CatC", CategoricalTransform.OutputKind.Bag, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("D", "CatD", CategoricalTransform.OutputKind.Bag, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("E", "CatE", CategoricalTransform.OutputKind.Ind, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("F", "CatF", CategoricalTransform.OutputKind.Ind, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("A", "CatG", CategoricalTransform.OutputKind.Key, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("B", "CatH", CategoricalTransform.OutputKind.Key, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("A", "CatI", CategoricalTransform.OutputKind.Bin, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("B", "CatJ", CategoricalTransform.OutputKind.Bin, invertHash: -1)); + new OneHotHashEncodingEstimator.ColumnInfo("A", "CatA", OneHotEncodingTransformer.OutputKind.Bag, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("B", "CatB", OneHotEncodingTransformer.OutputKind.Bag, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("C", "CatC", OneHotEncodingTransformer.OutputKind.Bag, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("D", "CatD", OneHotEncodingTransformer.OutputKind.Bag, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("E", "CatE", OneHotEncodingTransformer.OutputKind.Ind, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("F", "CatF", OneHotEncodingTransformer.OutputKind.Ind, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("A", "CatG", OneHotEncodingTransformer.OutputKind.Key, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("B", "CatH", OneHotEncodingTransformer.OutputKind.Key, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("A", "CatI", OneHotEncodingTransformer.OutputKind.Bin, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("B", "CatJ", OneHotEncodingTransformer.OutputKind.Bin, invertHash: -1)); var bagResult = bagPipe.Fit(dataView).Transform(dataView); ValidateMetadata(bagResult); diff --git a/test/Microsoft.ML.Tests/Transformers/CategoricalTests.cs b/test/Microsoft.ML.Tests/Transformers/CategoricalTests.cs index 3caf54f6f3..f9d7f58876 100644 --- a/test/Microsoft.ML.Tests/Transformers/CategoricalTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/CategoricalTests.cs @@ -54,16 +54,30 @@ public void CategoricalWorkout() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new OneHotEncodingEstimator(Env, new[]{ - new OneHotEncodingEstimator.ColumnInfo("A", "CatA", CategoricalTransform.OutputKind.Bag), - new OneHotEncodingEstimator.ColumnInfo("A", "CatB", CategoricalTransform.OutputKind.Bin), - new OneHotEncodingEstimator.ColumnInfo("A", "CatC", CategoricalTransform.OutputKind.Ind), - new OneHotEncodingEstimator.ColumnInfo("A", "CatD", CategoricalTransform.OutputKind.Key), + new OneHotEncodingEstimator.ColumnInfo("A", "CatA", OneHotEncodingTransformer.OutputKind.Bag), + new OneHotEncodingEstimator.ColumnInfo("A", "CatB", OneHotEncodingTransformer.OutputKind.Bin), + new OneHotEncodingEstimator.ColumnInfo("A", "CatC", OneHotEncodingTransformer.OutputKind.Ind), + new OneHotEncodingEstimator.ColumnInfo("A", "CatD", OneHotEncodingTransformer.OutputKind.Key), }); TestEstimatorCore(pipe, dataView); Done(); } + [Fact] + public void CategoricalOneHotHashEncoding() + { + var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; + + var mlContext = new MLContext(); + var dataView = ComponentCreation.CreateDataView(mlContext, data); + + var pipe = mlContext.Transforms.Categorical.OneHotHashEncoding("A", "CatA", 16, 0, OneHotEncodingTransformer.OutputKind.Bag); + + TestEstimatorCore(pipe, dataView); + Done(); + } + [Fact] public void CategoricalStatic() { @@ -91,7 +105,7 @@ public void CategoricalStatic() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); var savedData = TakeFilter.Create(Env, est.Fit(data).Transform(data).AsDynamic, 4); - var view = new SelectColumnsTransform(Env, new string[]{"A", "B", "C", "D", "E" }, null, false).Transform(savedData); + var view = new ColumnSelectingTransformer(Env, new string[]{"A", "B", "C", "D", "E" }, null, false).Transform(savedData); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, view, fs, keepHidden: true); } @@ -111,18 +125,18 @@ public void TestMetadataPropagation() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new OneHotEncodingEstimator(Env, new[] { - new OneHotEncodingEstimator.ColumnInfo("A", "CatA", CategoricalTransform.OutputKind.Bag), - new OneHotEncodingEstimator.ColumnInfo("B", "CatB", CategoricalTransform.OutputKind.Bag), - new OneHotEncodingEstimator.ColumnInfo("C", "CatC", CategoricalTransform.OutputKind.Bag), - new OneHotEncodingEstimator.ColumnInfo("D", "CatD", CategoricalTransform.OutputKind.Bag), - new OneHotEncodingEstimator.ColumnInfo("E", "CatE", CategoricalTransform.OutputKind.Ind), - new OneHotEncodingEstimator.ColumnInfo("F", "CatF", CategoricalTransform.OutputKind.Ind), - new OneHotEncodingEstimator.ColumnInfo("G", "CatG", CategoricalTransform.OutputKind.Key), - new OneHotEncodingEstimator.ColumnInfo("H", "CatH", CategoricalTransform.OutputKind.Key), - new OneHotEncodingEstimator.ColumnInfo("A", "CatI", CategoricalTransform.OutputKind.Bin), - new OneHotEncodingEstimator.ColumnInfo("B", "CatJ", CategoricalTransform.OutputKind.Bin), - new OneHotEncodingEstimator.ColumnInfo("C", "CatK", CategoricalTransform.OutputKind.Bin), - new OneHotEncodingEstimator.ColumnInfo("D", "CatL", CategoricalTransform.OutputKind.Bin) }); + new OneHotEncodingEstimator.ColumnInfo("A", "CatA", OneHotEncodingTransformer.OutputKind.Bag), + new OneHotEncodingEstimator.ColumnInfo("B", "CatB", OneHotEncodingTransformer.OutputKind.Bag), + new OneHotEncodingEstimator.ColumnInfo("C", "CatC", OneHotEncodingTransformer.OutputKind.Bag), + new OneHotEncodingEstimator.ColumnInfo("D", "CatD", OneHotEncodingTransformer.OutputKind.Bag), + new OneHotEncodingEstimator.ColumnInfo("E", "CatE", OneHotEncodingTransformer.OutputKind.Ind), + new OneHotEncodingEstimator.ColumnInfo("F", "CatF", OneHotEncodingTransformer.OutputKind.Ind), + new OneHotEncodingEstimator.ColumnInfo("G", "CatG", OneHotEncodingTransformer.OutputKind.Key), + new OneHotEncodingEstimator.ColumnInfo("H", "CatH", OneHotEncodingTransformer.OutputKind.Key), + new OneHotEncodingEstimator.ColumnInfo("A", "CatI", OneHotEncodingTransformer.OutputKind.Bin), + new OneHotEncodingEstimator.ColumnInfo("B", "CatJ", OneHotEncodingTransformer.OutputKind.Bin), + new OneHotEncodingEstimator.ColumnInfo("C", "CatK", OneHotEncodingTransformer.OutputKind.Bin), + new OneHotEncodingEstimator.ColumnInfo("D", "CatL", OneHotEncodingTransformer.OutputKind.Bin) }); var result = pipe.Fit(dataView).Transform(dataView); diff --git a/test/Microsoft.ML.Tests/Transformers/CharTokenizeTests.cs b/test/Microsoft.ML.Tests/Transformers/CharTokenizeTests.cs index f01c8101dc..58d663b871 100644 --- a/test/Microsoft.ML.Tests/Transformers/CharTokenizeTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/CharTokenizeTests.cs @@ -42,7 +42,7 @@ public void CharTokenizeWorkout() var dataView = ComponentCreation.CreateDataView(Env, data); var invalidData = new[] { new TestWrong() { A = 1, B = new float[2] { 2,3} } }; var invalidDataView = ComponentCreation.CreateDataView(Env, invalidData); - var pipe = new CharacterTokenizingEstimator(Env, columns: new[] { ("A", "TokenizeA"), ("B", "TokenizeB") }); + var pipe = new TokenizingByCharactersEstimator(Env, columns: new[] { ("A", "TokenizeA"), ("B", "TokenizeB") }); TestEstimatorCore(pipe, dataView, invalidInput:invalidDataView); Done(); @@ -60,7 +60,7 @@ public void TestOldSavingAndLoading() var data = new[] { new TestClass() { A = "This is a good sentence.", B = new string[2] { "Much words", "Wow So Cool" } } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var pipe = new CharacterTokenizingEstimator(Env, columns: new[] { ("A", "TokenizeA"), ("B", "TokenizeB") }); + var pipe = new TokenizingByCharactersEstimator(Env, columns: new[] { ("A", "TokenizeA"), ("B", "TokenizeB") }); var result = pipe.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); using (var ms = new MemoryStream()) diff --git a/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs b/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs index efb3833be3..24098ac6d0 100644 --- a/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs @@ -63,7 +63,7 @@ ColumnType GetType(Schema schema, string name) t = GetType(data.Schema, "f4"); Assert.True(t is VectorType vt4 && vt4.ItemType == NumberType.R4 && vt4.Size == 0); - data = SelectColumnsTransform.CreateKeep(Env, data, "f1", "f2", "f3", "f4"); + data = ColumnSelectingTransformer.CreateKeep(Env, data, new[] { "f1", "f2", "f3", "f4" }); var subdir = Path.Combine("Transform", "Concat"); var outputPath = GetOutputPath(subdir, "Concat1.tsv"); @@ -104,9 +104,9 @@ ColumnType GetType(Schema schema, string name) data = TakeFilter.Create(Env, data, 10); - var concater = new ConcatTransform(Env, - new ConcatTransform.ColumnInfo("f2", new[] { ("float1", "FLOAT1"), ("float1", "FLOAT2") }), - new ConcatTransform.ColumnInfo("f3", new[] { ("float4", "FLOAT4"), ("float1", "FLOAT1") })); + var concater = new ColumnConcatenatingTransformer(Env, + new ColumnConcatenatingTransformer.ColumnInfo("f2", new[] { ("float1", "FLOAT1"), ("float1", "FLOAT2") }), + new ColumnConcatenatingTransformer.ColumnInfo("f3", new[] { ("float4", "FLOAT4"), ("float1", "FLOAT1") })); data = concater.Transform(data); ColumnType t; @@ -115,7 +115,7 @@ ColumnType GetType(Schema schema, string name) t = GetType(data.Schema, "f3"); Assert.True(t is VectorType vt3 && vt3.ItemType == NumberType.R4 && vt3.Size == 5); - data = SelectColumnsTransform.CreateKeep(Env, data, "f2", "f3"); + data = ColumnSelectingTransformer.CreateKeep(Env, data, new[] { "f2", "f3" }); var subdir = Path.Combine("Transform", "Concat"); var outputPath = GetOutputPath(subdir, "Concat2.tsv"); diff --git a/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs b/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs index 8e72219609..c7b274a4d9 100644 --- a/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs @@ -74,8 +74,8 @@ public void TestConvertWorkout() var data = new[] { new TestClass() { A = 1, B = new int[2] { 1,4 } }, new TestClass() { A = 2, B = new int[2] { 3,4 } }}; var dataView = ComponentCreation.CreateDataView(Env, data); - var pipe = new ConvertingEstimator(Env, columns: new[] {new ConvertingTransform.ColumnInfo("A", "ConvA", DataKind.R4), - new ConvertingTransform.ColumnInfo("B", "ConvB", DataKind.R4)}); + var pipe = new TypeConvertingEstimator(Env, columns: new[] {new TypeConvertingTransformer.ColumnInfo("A", "ConvA", DataKind.R4), + new TypeConvertingTransformer.ColumnInfo("B", "ConvB", DataKind.R4)}); TestEstimatorCore(pipe, dataView); var allTypesData = new[] @@ -113,19 +113,19 @@ public void TestConvertWorkout() }; var allTypesDataView = ComponentCreation.CreateDataView(Env, allTypesData); - var allTypesPipe = new ConvertingEstimator(Env, columns: new[] { - new ConvertingTransform.ColumnInfo("AA", "ConvA", DataKind.R4), - new ConvertingTransform.ColumnInfo("AB", "ConvB", DataKind.R4), - new ConvertingTransform.ColumnInfo("AC", "ConvC", DataKind.R4), - new ConvertingTransform.ColumnInfo("AD", "ConvD", DataKind.R4), - new ConvertingTransform.ColumnInfo("AE", "ConvE", DataKind.R4), - new ConvertingTransform.ColumnInfo("AF", "ConvF", DataKind.R4), - new ConvertingTransform.ColumnInfo("AG", "ConvG", DataKind.R4), - new ConvertingTransform.ColumnInfo("AH", "ConvH", DataKind.R4), - new ConvertingTransform.ColumnInfo("AK", "ConvK", DataKind.R4), - new ConvertingTransform.ColumnInfo("AL", "ConvL", DataKind.R4), - new ConvertingTransform.ColumnInfo("AM", "ConvM", DataKind.R4), - new ConvertingTransform.ColumnInfo("AN", "ConvN", DataKind.R4)} + var allTypesPipe = new TypeConvertingEstimator(Env, columns: new[] { + new TypeConvertingTransformer.ColumnInfo("AA", "ConvA", DataKind.R4), + new TypeConvertingTransformer.ColumnInfo("AB", "ConvB", DataKind.R4), + new TypeConvertingTransformer.ColumnInfo("AC", "ConvC", DataKind.R4), + new TypeConvertingTransformer.ColumnInfo("AD", "ConvD", DataKind.R4), + new TypeConvertingTransformer.ColumnInfo("AE", "ConvE", DataKind.R4), + new TypeConvertingTransformer.ColumnInfo("AF", "ConvF", DataKind.R4), + new TypeConvertingTransformer.ColumnInfo("AG", "ConvG", DataKind.R4), + new TypeConvertingTransformer.ColumnInfo("AH", "ConvH", DataKind.R4), + new TypeConvertingTransformer.ColumnInfo("AK", "ConvK", DataKind.R4), + new TypeConvertingTransformer.ColumnInfo("AL", "ConvL", DataKind.R4), + new TypeConvertingTransformer.ColumnInfo("AM", "ConvM", DataKind.R4), + new TypeConvertingTransformer.ColumnInfo("AN", "ConvN", DataKind.R4)} ); TestEstimatorCore(allTypesPipe, allTypesDataView); @@ -154,8 +154,8 @@ public void TestOldSavingAndLoading() var data = new[] { new TestClass() { A = 1, B = new int[2] { 1,4 } }, new TestClass() { A = 2, B = new int[2] { 3,4 } }}; var dataView = ComponentCreation.CreateDataView(Env, data); - var pipe = new ConvertingEstimator(Env, columns: new[] {new ConvertingTransform.ColumnInfo("A", "ConvA", DataKind.R8), - new ConvertingTransform.ColumnInfo("B", "ConvB", DataKind.R8)}); + var pipe = new TypeConvertingEstimator(Env, columns: new[] {new TypeConvertingTransformer.ColumnInfo("A", "ConvA", DataKind.R8), + new TypeConvertingTransformer.ColumnInfo("B", "ConvB", DataKind.R8)}); var result = pipe.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); @@ -173,11 +173,11 @@ public void TestMetadata() var data = new[] { new MetaClass() { A = 1, B = "A" }, new MetaClass() { A = 2, B = "B" }}; var pipe = new OneHotEncodingEstimator(Env, new[] { - new OneHotEncodingEstimator.ColumnInfo("A", "CatA", CategoricalTransform.OutputKind.Ind), - new OneHotEncodingEstimator.ColumnInfo("B", "CatB", CategoricalTransform.OutputKind.Key) - }).Append(new ConvertingEstimator(Env, new[] { - new ConvertingTransform.ColumnInfo("CatA", "ConvA", DataKind.R8), - new ConvertingTransform.ColumnInfo("CatB", "ConvB", DataKind.U2) + new OneHotEncodingEstimator.ColumnInfo("A", "CatA", OneHotEncodingTransformer.OutputKind.Ind), + new OneHotEncodingEstimator.ColumnInfo("B", "CatB", OneHotEncodingTransformer.OutputKind.Key) + }).Append(new TypeConvertingEstimator(Env, new[] { + new TypeConvertingTransformer.ColumnInfo("CatA", "ConvA", DataKind.R8), + new TypeConvertingTransformer.ColumnInfo("CatB", "ConvB", DataKind.U2) })); var dataView = ComponentCreation.CreateDataView(Env, data); dataView = pipe.Fit(dataView).Transform(dataView); diff --git a/test/Microsoft.ML.Tests/Transformers/CopyColumnEstimatorTests.cs b/test/Microsoft.ML.Tests/Transformers/CopyColumnEstimatorTests.cs index 50f57673f8..09714ffd22 100644 --- a/test/Microsoft.ML.Tests/Transformers/CopyColumnEstimatorTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/CopyColumnEstimatorTests.cs @@ -40,32 +40,28 @@ class TestMetaClass void TestWorking() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; - using (var env = new ConsoleEnvironment()) - { - var dataView = ComponentCreation.CreateDataView(env, data); - var est = new CopyColumnsEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); - var transformer = est.Fit(dataView); - var result = transformer.Transform(dataView); - ValidateCopyColumnTransformer(result); - } + var env = new MLContext(); + var dataView = ComponentCreation.CreateDataView(env, data); + var est = new ColumnsCopyingEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); + var transformer = est.Fit(dataView); + var result = transformer.Transform(dataView); + ValidateCopyColumnTransformer(result); } [Fact] void TestBadOriginalSchema() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var dataView = ComponentCreation.CreateDataView(env, data); + var est = new ColumnsCopyingEstimator(env, new[] { ("D", "A"), ("B", "E") }); + try + { + var transformer = est.Fit(dataView); + Assert.False(true); + } + catch { - var dataView = ComponentCreation.CreateDataView(env, data); - var est = new CopyColumnsEstimator(env, new[] { ("D", "A"), ("B", "E") }); - try - { - var transformer = est.Fit(dataView); - Assert.False(true); - } - catch - { - } } } @@ -74,20 +70,18 @@ void TestBadTransformSchema() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var xydata = new[] { new TestClassXY() { X = 10, Y = 100 }, new TestClassXY() { X = -1, Y = -100 } }; - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var dataView = ComponentCreation.CreateDataView(env, data); + var xyDataView = ComponentCreation.CreateDataView(env, xydata); + var est = new ColumnsCopyingEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); + var transformer = est.Fit(dataView); + try + { + var result = transformer.Transform(xyDataView); + Assert.False(true); + } + catch { - var dataView = ComponentCreation.CreateDataView(env, data); - var xyDataView = ComponentCreation.CreateDataView(env, xydata); - var est = new CopyColumnsEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); - var transformer = est.Fit(dataView); - try - { - var result = transformer.Transform(xyDataView); - Assert.False(true); - } - catch - { - } } } @@ -95,20 +89,17 @@ void TestBadTransformSchema() void TestSavingAndLoading() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var dataView = ComponentCreation.CreateDataView(env, data); + var est = new ColumnsCopyingEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); + var transformer = est.Fit(dataView); + using (var ms = new MemoryStream()) { - var dataView = ComponentCreation.CreateDataView(env, data); - var est = new CopyColumnsEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); - var transformer = est.Fit(dataView); - using (var ms = new MemoryStream()) - { - transformer.SaveTo(env, ms); - ms.Position = 0; - var loadedTransformer = TransformerChain.LoadFrom(env, ms); - var result = loadedTransformer.Transform(dataView); - ValidateCopyColumnTransformer(result); - } - + transformer.SaveTo(env, ms); + ms.Position = 0; + var loadedTransformer = TransformerChain.LoadFrom(env, ms); + var result = loadedTransformer.Transform(dataView); + ValidateCopyColumnTransformer(result); } } @@ -116,20 +107,18 @@ void TestSavingAndLoading() void TestOldSavingAndLoading() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; - using (var env = new ConsoleEnvironment()) + IHostEnvironment env = new MLContext(); + var dataView = ComponentCreation.CreateDataView(env, data); + var est = new ColumnsCopyingEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); + var transformer = est.Fit(dataView); + var result = transformer.Transform(dataView); + var resultRoles = new RoleMappedData(result); + using (var ms = new MemoryStream()) { - var dataView = ComponentCreation.CreateDataView(env, data); - var est = new CopyColumnsEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); - var transformer = est.Fit(dataView); - var result = transformer.Transform(dataView); - var resultRoles = new RoleMappedData(result); - using (var ms = new MemoryStream()) - { - TrainUtils.SaveModel(env, env.Start("saving"), ms, null, resultRoles); - ms.Position = 0; - var loadedView = ModelFileUtils.LoadTransforms(env, dataView, ms); - ValidateCopyColumnTransformer(loadedView); - } + TrainUtils.SaveModel(env, env.Start("saving"), ms, null, resultRoles); + ms.Position = 0; + var loadedView = ModelFileUtils.LoadTransforms(env, dataView, ms); + ValidateCopyColumnTransformer(loadedView); } } @@ -137,37 +126,33 @@ void TestOldSavingAndLoading() void TestMetadataCopy() { var data = new[] { new TestMetaClass() { Term = "A", NotUsed = 1 }, new TestMetaClass() { Term = "B" }, new TestMetaClass() { Term = "C" } }; - using (var env = new ConsoleEnvironment()) + var env = new MLContext(); + var dataView = ComponentCreation.CreateDataView(env, data); + var term = ValueToKeyMappingTransformer.Create(env, new ValueToKeyMappingTransformer.Arguments() { - var dataView = ComponentCreation.CreateDataView(env, data); - var term = TermTransform.Create(env, new TermTransform.Arguments() - { - Column = new[] { new TermTransform.Column() { Source = "Term", Name = "T" } } - }, dataView); - var est = new CopyColumnsEstimator(env, "T", "T1"); - var transformer = est.Fit(term); - var result = transformer.Transform(term); - result.Schema.TryGetColumnIndex("T", out int termIndex); - result.Schema.TryGetColumnIndex("T1", out int copyIndex); - var names1 = default(VBuffer>); - var names2 = default(VBuffer>); - var type1 = result.Schema.GetColumnType(termIndex); - var itemType1 = (type1 as VectorType)?.ItemType ?? type1; - int size = (itemType1 as KeyType)?.Count ?? -1; - var type2 = result.Schema.GetColumnType(copyIndex); - result.Schema.GetMetadata(MetadataUtils.Kinds.KeyValues, termIndex, ref names1); - result.Schema.GetMetadata(MetadataUtils.Kinds.KeyValues, copyIndex, ref names2); - Assert.True(CompareVec(in names1, in names2, size, (a, b) => a.Span.SequenceEqual(b.Span))); - } + Column = new[] { new ValueToKeyMappingTransformer.Column() { Source = "Term", Name = "T" } } + }, dataView); + var est = new ColumnsCopyingEstimator(env, "T", "T1"); + var transformer = est.Fit(term); + var result = transformer.Transform(term); + result.Schema.TryGetColumnIndex("T", out int termIndex); + result.Schema.TryGetColumnIndex("T1", out int copyIndex); + var names1 = default(VBuffer>); + var names2 = default(VBuffer>); + var type1 = result.Schema.GetColumnType(termIndex); + var itemType1 = (type1 as VectorType)?.ItemType ?? type1; + int size = (itemType1 as KeyType)?.Count ?? -1; + var type2 = result.Schema.GetColumnType(copyIndex); + result.Schema.GetMetadata(MetadataUtils.Kinds.KeyValues, termIndex, ref names1); + result.Schema.GetMetadata(MetadataUtils.Kinds.KeyValues, copyIndex, ref names2); + Assert.True(CompareVec(in names1, in names2, size, (a, b) => a.Span.SequenceEqual(b.Span))); } [Fact] void TestCommandLine() { - using (var env = new ConsoleEnvironment()) - { - Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0} xf=copy{col=B:A} in=f:\1.txt" }), (int)0); - } + var env = new MLContext(); + Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0} xf=copy{col=B:A} in=f:\1.txt" }), (int)0); } private void ValidateCopyColumnTransformer(IDataView result) diff --git a/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs b/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs index 1a78122eb2..1e5e053c96 100644 --- a/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs @@ -66,23 +66,21 @@ public void TestCustomTransformer() IDataView transformedData; // We create a temporary environment to instantiate the custom transformer. This is to ensure that we don't need the same // environment for saving and loading. - using (var tempoEnv = new ConsoleEnvironment()) + var tempoEnv = new MLContext(); + var customEst = new CustomMappingEstimator(tempoEnv, MyLambda.MyAction, "MyLambda"); + + try { - var customEst = new CustomMappingEstimator(tempoEnv, MyLambda.MyAction, "MyLambda"); - - try - { - TestEstimatorCore(customEst, data); - Assert.True(false, "Cannot work without MEF injection"); - } - catch (Exception) - { - // REVIEW: we should have a common mechanism that will make sure this is 'our' exception thrown. - } - ML.CompositionContainer = new CompositionContainer(new TypeCatalog(typeof(MyLambda))); TestEstimatorCore(customEst, data); - transformedData = customEst.Fit(data).Transform(data); + Assert.True(false, "Cannot work without MEF injection"); + } + catch (Exception) + { + // REVIEW: we should have a common mechanism that will make sure this is 'our' exception thrown. } + ML.CompositionContainer = new CompositionContainer(new TypeCatalog(typeof(MyLambda))); + TestEstimatorCore(customEst, data); + transformedData = customEst.Fit(data).Transform(data); var inputs = transformedData.AsEnumerable(ML, true); var outputs = transformedData.AsEnumerable(ML, true); @@ -91,5 +89,43 @@ public void TestCustomTransformer() Done(); } + + [Fact] + public void TestSchemaPropagation() + { + string dataPath = GetDataPath("adult.test"); + var source = new MultiFileSource(dataPath); + var loader = ML.Data.TextReader(new[] { + new TextLoader.Column("Float1", DataKind.R4, 0), + new TextLoader.Column("Float4", DataKind.R4, new[]{new TextLoader.Range(0), new TextLoader.Range(2), new TextLoader.Range(4), new TextLoader.Range(10) }), + new TextLoader.Column("Text1", DataKind.Text, 0) + }, s => { s.Separator = ","; s.HasHeader = true; }); + + var data = loader.Read(source); + + Action mapping = (input, output) => output.Together = input.Float1.ToString(); + var est = ML.Transforms.CustomMapping(mapping, null); + + // Make sure schema propagation works for valid data. + est.GetOutputSchema(SchemaShape.Create(data.Schema)); + + var badData1 = ML.Transforms.CopyColumns("Text1", "Float1").Fit(data).Transform(data); + try + { + est.GetOutputSchema(SchemaShape.Create(badData1.Schema)); + Assert.True(false); + } + catch (Exception) { } + + var badData2 = ML.Transforms.KeepColumns(new[] { "Float1" }).Fit(data).Transform(data); + try + { + est.GetOutputSchema(SchemaShape.Create(badData2.Schema)); + Assert.True(false); + } + catch (Exception) { } + + Done(); + } } } diff --git a/test/Microsoft.ML.Tests/Transformers/FeatureSelectionTests.cs b/test/Microsoft.ML.Tests/Transformers/FeatureSelectionTests.cs index ccbb809982..406d623a29 100644 --- a/test/Microsoft.ML.Tests/Transformers/FeatureSelectionTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/FeatureSelectionTests.cs @@ -20,7 +20,7 @@ public FeatureSelectionTests(ITestOutputHelper helper) { } - [Fact] + [Fact(Skip = "FeatureSeclection transform cannot be trained on empty data, schema propagation fails")] public void FeatureSelectionWorkout() { string sentimentDataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); @@ -43,7 +43,7 @@ public void FeatureSelectionWorkout() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); IDataView savedData = TakeFilter.Create(Env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = SelectColumnsTransform.CreateKeep(Env, savedData, "bag_of_words_count", "bag_of_words_mi"); + savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "bag_of_words_count", "bag_of_words_mi" }); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); diff --git a/test/Microsoft.ML.Tests/Transformers/HashTests.cs b/test/Microsoft.ML.Tests/Transformers/HashTests.cs index a8812b1337..4863c5dd46 100644 --- a/test/Microsoft.ML.Tests/Transformers/HashTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/HashTests.cs @@ -48,10 +48,10 @@ public void HashWorkout() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new HashingEstimator(Env, new[]{ - new HashTransformer.ColumnInfo("A", "HashA", hashBits:4, invertHash:-1), - new HashTransformer.ColumnInfo("B", "HashB", hashBits:3, ordered:true), - new HashTransformer.ColumnInfo("C", "HashC", seed:42), - new HashTransformer.ColumnInfo("A", "HashD"), + new HashingTransformer.ColumnInfo("A", "HashA", hashBits:4, invertHash:-1), + new HashingTransformer.ColumnInfo("B", "HashB", hashBits:3, ordered:true), + new HashingTransformer.ColumnInfo("C", "HashC", seed:42), + new HashingTransformer.ColumnInfo("A", "HashD"), }); TestEstimatorCore(pipe, dataView); @@ -70,9 +70,9 @@ public void TestMetadata() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new HashingEstimator(Env, new[] { - new HashTransformer.ColumnInfo("A", "HashA", invertHash:1, hashBits:10), - new HashTransformer.ColumnInfo("A", "HashAUnlim", invertHash:-1, hashBits:10), - new HashTransformer.ColumnInfo("A", "HashAUnlimOrdered", invertHash:-1, hashBits:10, ordered:true) + new HashingTransformer.ColumnInfo("A", "HashA", invertHash:1, hashBits:10), + new HashingTransformer.ColumnInfo("A", "HashAUnlim", invertHash:-1, hashBits:10), + new HashingTransformer.ColumnInfo("A", "HashAUnlimOrdered", invertHash:-1, hashBits:10, ordered:true) }); var result = pipe.Fit(dataView).Transform(dataView); ValidateMetadata(result); @@ -118,10 +118,10 @@ public void TestOldSavingAndLoading() var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new HashingEstimator(Env, new[]{ - new HashTransformer.ColumnInfo("A", "HashA", hashBits:4, invertHash:-1), - new HashTransformer.ColumnInfo("B", "HashB", hashBits:3, ordered:true), - new HashTransformer.ColumnInfo("C", "HashC", seed:42), - new HashTransformer.ColumnInfo("A", "HashD"), + new HashingTransformer.ColumnInfo("A", "HashA", hashBits:4, invertHash:-1), + new HashingTransformer.ColumnInfo("B", "HashB", hashBits:3, ordered:true), + new HashingTransformer.ColumnInfo("C", "HashC", seed:42), + new HashingTransformer.ColumnInfo("A", "HashD"), }); var result = pipe.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); @@ -148,8 +148,8 @@ private void HashTestCore(T val, PrimitiveType type, uint expected, uint expe var inRow = RowColumnUtils.GetRow(new Counted(), col); // First do an unordered hash. - var info = new HashTransformer.ColumnInfo("Foo", "Bar", hashBits: bits); - var xf = new HashTransformer(Env, new[] { info }); + var info = new HashingTransformer.ColumnInfo("Foo", "Bar", hashBits: bits); + var xf = new HashingTransformer(Env, new[] { info }); var mapper = xf.GetRowToRowMapper(inRow.Schema); mapper.Schema.TryGetColumnIndex("Bar", out int outCol); var outRow = mapper.GetRow(inRow, c => c == outCol, out var _); @@ -160,8 +160,8 @@ private void HashTestCore(T val, PrimitiveType type, uint expected, uint expe Assert.Equal(expected, result); // Next do an ordered hash. - info = new HashTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: true); - xf = new HashTransformer(Env, new[] { info }); + info = new HashingTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: true); + xf = new HashingTransformer(Env, new[] { info }); mapper = xf.GetRowToRowMapper(inRow.Schema); mapper.Schema.TryGetColumnIndex("Bar", out outCol); outRow = mapper.GetRow(inRow, c => c == outCol, out var _); @@ -177,8 +177,8 @@ private void HashTestCore(T val, PrimitiveType type, uint expected, uint expe col = RowColumnUtils.GetColumn("Foo", new VectorType(type, vecLen), ref denseVec); inRow = RowColumnUtils.GetRow(new Counted(), col); - info = new HashTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: false); - xf = new HashTransformer(Env, new[] { info }); + info = new HashingTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: false); + xf = new HashingTransformer(Env, new[] { info }); mapper = xf.GetRowToRowMapper(inRow.Schema); mapper.Schema.TryGetColumnIndex("Bar", out outCol); outRow = mapper.GetRow(inRow, c => c == outCol, out var _); @@ -192,8 +192,8 @@ private void HashTestCore(T val, PrimitiveType type, uint expected, uint expe Assert.All(vecResult.DenseValues(), v => Assert.Equal(expected, v)); // Now do ordered with the dense vector. - info = new HashTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: true); - xf = new HashTransformer(Env, new[] { info }); + info = new HashingTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: true); + xf = new HashingTransformer(Env, new[] { info }); mapper = xf.GetRowToRowMapper(inRow.Schema); mapper.Schema.TryGetColumnIndex("Bar", out outCol); outRow = mapper.GetRow(inRow, c => c == outCol, out var _); @@ -210,8 +210,8 @@ private void HashTestCore(T val, PrimitiveType type, uint expected, uint expe col = RowColumnUtils.GetColumn("Foo", new VectorType(type, vecLen), ref sparseVec); inRow = RowColumnUtils.GetRow(new Counted(), col); - info = new HashTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: false); - xf = new HashTransformer(Env, new[] { info }); + info = new HashingTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: false); + xf = new HashingTransformer(Env, new[] { info }); mapper = xf.GetRowToRowMapper(inRow.Schema); mapper.Schema.TryGetColumnIndex("Bar", out outCol); outRow = mapper.GetRow(inRow, c => c == outCol, out var _); @@ -223,8 +223,8 @@ private void HashTestCore(T val, PrimitiveType type, uint expected, uint expe Assert.Equal(expected, vecResult.GetItemOrDefault(3)); Assert.Equal(expected, vecResult.GetItemOrDefault(7)); - info = new HashTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: true); - xf = new HashTransformer(Env, new[] { info }); + info = new HashingTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: true); + xf = new HashingTransformer(Env, new[] { info }); mapper = xf.GetRowToRowMapper(inRow.Schema); mapper.Schema.TryGetColumnIndex("Bar", out outCol); outRow = mapper.GetRow(inRow, c => c == outCol, out var _); diff --git a/test/Microsoft.ML.Tests/Transformers/KeyToBinaryVectorEstimatorTest.cs b/test/Microsoft.ML.Tests/Transformers/KeyToBinaryVectorEstimatorTest.cs index 285289a1f1..34605089fe 100644 --- a/test/Microsoft.ML.Tests/Transformers/KeyToBinaryVectorEstimatorTest.cs +++ b/test/Microsoft.ML.Tests/Transformers/KeyToBinaryVectorEstimatorTest.cs @@ -48,13 +48,13 @@ public void KeyToBinaryVectorWorkout() var dataView = ComponentCreation.CreateDataView(Env, data); dataView = new ValueToKeyMappingEstimator(Env, new[]{ - new TermTransform.ColumnInfo("A", "TermA"), - new TermTransform.ColumnInfo("B", "TermB"), - new TermTransform.ColumnInfo("C", "TermC", textKeyValues:true) + new ValueToKeyMappingTransformer.ColumnInfo("A", "TermA"), + new ValueToKeyMappingTransformer.ColumnInfo("B", "TermB"), + new ValueToKeyMappingTransformer.ColumnInfo("C", "TermC", textKeyValues:true) }).Fit(dataView).Transform(dataView); - var pipe = new KeyToBinaryVectorMappingEstimator(Env, new KeyToBinaryVectorTransform.ColumnInfo("TermA", "CatA"), - new KeyToBinaryVectorTransform.ColumnInfo("TermC", "CatC")); + var pipe = new KeyToBinaryVectorMappingEstimator(Env, new KeyToBinaryVectorMappingTransformer.ColumnInfo("TermA", "CatA"), + new KeyToBinaryVectorMappingTransformer.ColumnInfo("TermC", "CatC")); TestEstimatorCore(pipe, dataView); Done(); } @@ -72,8 +72,8 @@ public void KeyToBinaryVectorStatic() // Non-pigsty Term. var dynamicData = new ValueToKeyMappingEstimator(Env, new[] { - new TermTransform.ColumnInfo("ScalarString", "A"), - new TermTransform.ColumnInfo("VectorString", "B") }) + new ValueToKeyMappingTransformer.ColumnInfo("ScalarString", "A"), + new ValueToKeyMappingTransformer.ColumnInfo("VectorString", "B") }) .Fit(data.AsDynamic).Transform(data.AsDynamic); var data2 = dynamicData.AssertStatic(Env, ctx => ( @@ -101,18 +101,18 @@ public void TestMetadataPropagation() var dataView = ComponentCreation.CreateDataView(Env, data); var termEst = new ValueToKeyMappingEstimator(Env, new[] { - new TermTransform.ColumnInfo("A", "TA", textKeyValues: true), - new TermTransform.ColumnInfo("B", "TB", textKeyValues: true), - new TermTransform.ColumnInfo("C", "TC"), - new TermTransform.ColumnInfo("D", "TD") }); + new ValueToKeyMappingTransformer.ColumnInfo("A", "TA", textKeyValues: true), + new ValueToKeyMappingTransformer.ColumnInfo("B", "TB", textKeyValues: true), + new ValueToKeyMappingTransformer.ColumnInfo("C", "TC"), + new ValueToKeyMappingTransformer.ColumnInfo("D", "TD") }); var termTransformer = termEst.Fit(dataView); dataView = termTransformer.Transform(dataView); var pipe = new KeyToBinaryVectorMappingEstimator(Env, - new KeyToBinaryVectorTransform.ColumnInfo("TA", "CatA"), - new KeyToBinaryVectorTransform.ColumnInfo("TB", "CatB"), - new KeyToBinaryVectorTransform.ColumnInfo("TC", "CatC"), - new KeyToBinaryVectorTransform.ColumnInfo("TD", "CatD")); + new KeyToBinaryVectorMappingTransformer.ColumnInfo("TA", "CatA"), + new KeyToBinaryVectorMappingTransformer.ColumnInfo("TB", "CatB"), + new KeyToBinaryVectorMappingTransformer.ColumnInfo("TC", "CatC"), + new KeyToBinaryVectorMappingTransformer.ColumnInfo("TD", "CatD")); var result = pipe.Fit(dataView).Transform(dataView); ValidateMetadata(result); @@ -162,16 +162,16 @@ public void TestOldSavingAndLoading() var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); var est = new ValueToKeyMappingEstimator(Env, new[]{ - new TermTransform.ColumnInfo("A", "TermA"), - new TermTransform.ColumnInfo("B", "TermB", textKeyValues:true), - new TermTransform.ColumnInfo("C", "TermC") + new ValueToKeyMappingTransformer.ColumnInfo("A", "TermA"), + new ValueToKeyMappingTransformer.ColumnInfo("B", "TermB", textKeyValues:true), + new ValueToKeyMappingTransformer.ColumnInfo("C", "TermC") }); var transformer = est.Fit(dataView); dataView = transformer.Transform(dataView); var pipe = new KeyToBinaryVectorMappingEstimator(Env, - new KeyToBinaryVectorTransform.ColumnInfo("TermA", "CatA"), - new KeyToBinaryVectorTransform.ColumnInfo("TermB", "CatB"), - new KeyToBinaryVectorTransform.ColumnInfo("TermC", "CatC") + new KeyToBinaryVectorMappingTransformer.ColumnInfo("TermA", "CatA"), + new KeyToBinaryVectorMappingTransformer.ColumnInfo("TermB", "CatB"), + new KeyToBinaryVectorMappingTransformer.ColumnInfo("TermC", "CatC") ); var result = pipe.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); diff --git a/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs b/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs index 1f4fff6edc..611857ef4b 100644 --- a/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs @@ -45,13 +45,13 @@ public void KeyToValueWorkout() var data = reader.Read(dataPath); data = new ValueToKeyMappingEstimator(Env, new[] { - new TermTransform.ColumnInfo("ScalarString", "A"), - new TermTransform.ColumnInfo("VectorString", "B") }).Fit(data).Transform(data); + new ValueToKeyMappingTransformer.ColumnInfo("ScalarString", "A"), + new ValueToKeyMappingTransformer.ColumnInfo("VectorString", "B") }).Fit(data).Transform(data); - var badData1 = new CopyColumnsTransform(Env, ("BareKey", "A")).Transform(data); - var badData2 = new CopyColumnsTransform(Env, ("VectorString", "B")).Transform(data); + var badData1 = new ColumnsCopyingTransformer(Env, ("BareKey", "A")).Transform(data); + var badData2 = new ColumnsCopyingTransformer(Env, ("VectorString", "B")).Transform(data); - var est = new KeyToValueEstimator(Env, ("A", "A_back"), ("B", "B_back")); + var est = new KeyToValueMappingEstimator(Env, ("A", "A_back"), ("B", "B_back")); TestEstimatorCore(est, data, invalidInput: badData1); TestEstimatorCore(est, data, invalidInput: badData2); @@ -82,8 +82,8 @@ public void KeyToValuePigsty() // Non-pigsty Term. var dynamicData = new ValueToKeyMappingEstimator(Env, new[] { - new TermTransform.ColumnInfo("ScalarString", "A"), - new TermTransform.ColumnInfo("VectorString", "B") }) + new ValueToKeyMappingTransformer.ColumnInfo("ScalarString", "A"), + new ValueToKeyMappingTransformer.ColumnInfo("VectorString", "B") }) .Fit(data.AsDynamic).Transform(data.AsDynamic); var data2 = dynamicData.AssertStatic(Env, ctx => ( @@ -98,8 +98,8 @@ public void KeyToValuePigsty() TestEstimatorCore(est.AsDynamic, data2.AsDynamic, invalidInput: data.AsDynamic); // Check that term and ToValue are round-trippable. - var dataLeft = SelectColumnsTransform.CreateKeep(Env, data.AsDynamic, "ScalarString", "VectorString"); - var dataRight = SelectColumnsTransform.CreateKeep(Env, est.Fit(data2).Transform(data2).AsDynamic, "ScalarString", "VectorString"); + var dataLeft = ColumnSelectingTransformer.CreateKeep(Env, data.AsDynamic, new[] { "ScalarString", "VectorString" }); + var dataRight = ColumnSelectingTransformer.CreateKeep(Env, est.Fit(data2).Transform(data2).AsDynamic, new[] { "ScalarString", "VectorString" }); CheckSameSchemas(dataLeft.Schema, dataRight.Schema); CheckSameValues(dataLeft, dataRight); diff --git a/test/Microsoft.ML.Tests/Transformers/KeyToVectorEstimatorTests.cs b/test/Microsoft.ML.Tests/Transformers/KeyToVectorEstimatorTests.cs index 31ad714099..4468a1f3ea 100644 --- a/test/Microsoft.ML.Tests/Transformers/KeyToVectorEstimatorTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/KeyToVectorEstimatorTests.cs @@ -54,15 +54,15 @@ public void KeyToVectorWorkout() var dataView = ComponentCreation.CreateDataView(Env, data); dataView = new ValueToKeyMappingEstimator(Env, new[]{ - new TermTransform.ColumnInfo("A", "TermA"), - new TermTransform.ColumnInfo("B", "TermB"), - new TermTransform.ColumnInfo("C", "TermC", textKeyValues:true) + new ValueToKeyMappingTransformer.ColumnInfo("A", "TermA"), + new ValueToKeyMappingTransformer.ColumnInfo("B", "TermB"), + new ValueToKeyMappingTransformer.ColumnInfo("C", "TermC", textKeyValues:true) }).Fit(dataView).Transform(dataView); - var pipe = new KeyToVectorMappingEstimator(Env, new KeyToVectorTransform.ColumnInfo("TermA", "CatA", false), - new KeyToVectorTransform.ColumnInfo("TermB", "CatB", true), - new KeyToVectorTransform.ColumnInfo("TermC", "CatC", true), - new KeyToVectorTransform.ColumnInfo("TermC", "CatCNonBag", false)); + var pipe = new KeyToVectorMappingEstimator(Env, new KeyToVectorMappingTransformer.ColumnInfo("TermA", "CatA", false), + new KeyToVectorMappingTransformer.ColumnInfo("TermB", "CatB", true), + new KeyToVectorMappingTransformer.ColumnInfo("TermC", "CatC", true), + new KeyToVectorMappingTransformer.ColumnInfo("TermC", "CatCNonBag", false)); TestEstimatorCore(pipe, dataView); Done(); } @@ -80,8 +80,8 @@ public void KeyToVectorStatic() // Non-pigsty Term. var dynamicData = new ValueToKeyMappingEstimator(Env, new[] { - new TermTransform.ColumnInfo("ScalarString", "A"), - new TermTransform.ColumnInfo("VectorString", "B") }) + new ValueToKeyMappingTransformer.ColumnInfo("ScalarString", "A"), + new ValueToKeyMappingTransformer.ColumnInfo("VectorString", "B") }) .Fit(data.AsDynamic).Transform(data.AsDynamic); var data2 = dynamicData.AssertStatic(Env, ctx => ( @@ -111,26 +111,26 @@ public void TestMetadataPropagation() var dataView = ComponentCreation.CreateDataView(Env, data); var termEst = new ValueToKeyMappingEstimator(Env, new[] { - new TermTransform.ColumnInfo("A", "TA", textKeyValues: true), - new TermTransform.ColumnInfo("B", "TB"), - new TermTransform.ColumnInfo("C", "TC", textKeyValues: true), - new TermTransform.ColumnInfo("D", "TD", textKeyValues: true), - new TermTransform.ColumnInfo("E", "TE"), - new TermTransform.ColumnInfo("F", "TF"), - new TermTransform.ColumnInfo("G", "TG"), - new TermTransform.ColumnInfo("H", "TH", textKeyValues: true) }); + new ValueToKeyMappingTransformer.ColumnInfo("A", "TA", textKeyValues: true), + new ValueToKeyMappingTransformer.ColumnInfo("B", "TB"), + new ValueToKeyMappingTransformer.ColumnInfo("C", "TC", textKeyValues: true), + new ValueToKeyMappingTransformer.ColumnInfo("D", "TD", textKeyValues: true), + new ValueToKeyMappingTransformer.ColumnInfo("E", "TE"), + new ValueToKeyMappingTransformer.ColumnInfo("F", "TF"), + new ValueToKeyMappingTransformer.ColumnInfo("G", "TG"), + new ValueToKeyMappingTransformer.ColumnInfo("H", "TH", textKeyValues: true) }); var termTransformer = termEst.Fit(dataView); dataView = termTransformer.Transform(dataView); var pipe = new KeyToVectorMappingEstimator(Env, - new KeyToVectorTransform.ColumnInfo("TA", "CatA", true), - new KeyToVectorTransform.ColumnInfo("TB", "CatB", false), - new KeyToVectorTransform.ColumnInfo("TC", "CatC", false), - new KeyToVectorTransform.ColumnInfo("TD", "CatD", true), - new KeyToVectorTransform.ColumnInfo("TE", "CatE", false), - new KeyToVectorTransform.ColumnInfo("TF", "CatF", true), - new KeyToVectorTransform.ColumnInfo("TG", "CatG", true), - new KeyToVectorTransform.ColumnInfo("TH", "CatH", false) + new KeyToVectorMappingTransformer.ColumnInfo("TA", "CatA", true), + new KeyToVectorMappingTransformer.ColumnInfo("TB", "CatB", false), + new KeyToVectorMappingTransformer.ColumnInfo("TC", "CatC", false), + new KeyToVectorMappingTransformer.ColumnInfo("TD", "CatD", true), + new KeyToVectorMappingTransformer.ColumnInfo("TE", "CatE", false), + new KeyToVectorMappingTransformer.ColumnInfo("TF", "CatF", true), + new KeyToVectorMappingTransformer.ColumnInfo("TG", "CatG", true), + new KeyToVectorMappingTransformer.ColumnInfo("TH", "CatH", false) ); var result = pipe.Fit(dataView).Transform(dataView); @@ -227,15 +227,15 @@ public void TestOldSavingAndLoading() var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); var est = new ValueToKeyMappingEstimator(Env, new[]{ - new TermTransform.ColumnInfo("A", "TermA"), - new TermTransform.ColumnInfo("B", "TermB"), - new TermTransform.ColumnInfo("C", "TermC") + new ValueToKeyMappingTransformer.ColumnInfo("A", "TermA"), + new ValueToKeyMappingTransformer.ColumnInfo("B", "TermB"), + new ValueToKeyMappingTransformer.ColumnInfo("C", "TermC") }); var transformer = est.Fit(dataView); dataView = transformer.Transform(dataView); var pipe = new KeyToVectorMappingEstimator(Env, - new KeyToVectorTransform.ColumnInfo("TermA", "CatA", false), - new KeyToVectorTransform.ColumnInfo("TermB", "CatB", true) + new KeyToVectorMappingTransformer.ColumnInfo("TermA", "CatA", false), + new KeyToVectorMappingTransformer.ColumnInfo("TermB", "CatB", true) ); var result = pipe.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); diff --git a/test/Microsoft.ML.Tests/Transformers/LineParserTests.cs b/test/Microsoft.ML.Tests/Transformers/LineParserTests.cs new file mode 100644 index 0000000000..1beeaea68e --- /dev/null +++ b/test/Microsoft.ML.Tests/Transformers/LineParserTests.cs @@ -0,0 +1,40 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Internal.Utilities; +using System.Collections.Generic; +using Xunit; + +namespace Microsoft.ML.Tests.Transformers +{ + public class LineParserTests + { + public static IEnumerable ValidInputs() + { + yield return new object[] { "key 0.1 0.2 0.3", "key", new float[] { 0.1f, 0.2f, 0.3f } }; + yield return new object[] { "key 0.1 0.2 0.3 ", "key", new float[] { 0.1f, 0.2f, 0.3f } }; + yield return new object[] { "key\t0.1\t0.2\t0.3", "key", new float[] { 0.1f, 0.2f, 0.3f } }; // tab can also be a separator + yield return new object[] { "key\t0.1\t0.2\t0.3\t", "key", new float[] { 0.1f, 0.2f, 0.3f } }; + } + + [Theory] + [MemberData(nameof(ValidInputs))] + public void WhenProvidedAValidInputParserParsesKeyAndValues(string input, string expectedKey, float[] expectedValues) + { + var result = LineParser.ParseKeyThenNumbers(input); + + Assert.True(result.isSuccess); + Assert.Equal(expectedKey, result.key); + Assert.Equal(expectedValues, result.values); + } + + [Theory] + [InlineData("")] + [InlineData("key 0.1 NOT_A_NUMBER")] // invalid number + public void WhenProvidedAnInvalidInputParserReturnsFailure(string input) + { + Assert.False(LineParser.ParseKeyThenNumbers(input).isSuccess); + } + } +} diff --git a/test/Microsoft.ML.Tests/Transformers/NAReplaceTests.cs b/test/Microsoft.ML.Tests/Transformers/NAReplaceTests.cs index 200ee73e06..977ceec40d 100644 --- a/test/Microsoft.ML.Tests/Transformers/NAReplaceTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/NAReplaceTests.cs @@ -44,10 +44,10 @@ public void NAReplaceWorkout() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new MissingValueReplacingEstimator(Env, - new NAReplaceTransform.ColumnInfo("A", "NAA", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), - new NAReplaceTransform.ColumnInfo("B", "NAB", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), - new NAReplaceTransform.ColumnInfo("C", "NAC", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), - new NAReplaceTransform.ColumnInfo("D", "NAD", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean)); + new MissingValueReplacingTransformer.ColumnInfo("A", "NAA", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), + new MissingValueReplacingTransformer.ColumnInfo("B", "NAB", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), + new MissingValueReplacingTransformer.ColumnInfo("C", "NAC", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), + new MissingValueReplacingTransformer.ColumnInfo("D", "NAD", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean)); TestEstimatorCore(pipe, dataView); Done(); } @@ -69,10 +69,10 @@ public void NAReplaceStatic() var est = data.MakeNewEstimator(). Append(row => ( - A: row.ScalarFloat.ReplaceNaNValues(NAReplaceTransform.ColumnInfo.ReplacementMode.Maximum), - B: row.ScalarDouble.ReplaceNaNValues(NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), - C: row.VectorFloat.ReplaceNaNValues(NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), - D: row.VectorDoulbe.ReplaceNaNValues(NAReplaceTransform.ColumnInfo.ReplacementMode.Minimum) + A: row.ScalarFloat.ReplaceNaNValues(MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Maximum), + B: row.ScalarDouble.ReplaceNaNValues(MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), + C: row.VectorFloat.ReplaceNaNValues(MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), + D: row.VectorDoulbe.ReplaceNaNValues(MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Minimum) )); TestEstimatorCore(est.AsDynamic, data.AsDynamic, invalidInput: invalidData); @@ -81,7 +81,7 @@ public void NAReplaceStatic() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); var savedData = TakeFilter.Create(Env, est.Fit(data).Transform(data).AsDynamic, 4); - var view = SelectColumnsTransform.CreateKeep(Env, savedData, "A", "B", "C", "D"); + var view = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "A", "B", "C", "D" }); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, view, fs, keepHidden: true); } @@ -109,10 +109,10 @@ public void TestOldSavingAndLoading() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new MissingValueReplacingEstimator(Env, - new NAReplaceTransform.ColumnInfo("A", "NAA", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), - new NAReplaceTransform.ColumnInfo("B", "NAB", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), - new NAReplaceTransform.ColumnInfo("C", "NAC", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), - new NAReplaceTransform.ColumnInfo("D", "NAD", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean)); + new MissingValueReplacingTransformer.ColumnInfo("A", "NAA", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), + new MissingValueReplacingTransformer.ColumnInfo("B", "NAB", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), + new MissingValueReplacingTransformer.ColumnInfo("C", "NAC", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), + new MissingValueReplacingTransformer.ColumnInfo("D", "NAD", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean)); var result = pipe.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); diff --git a/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs b/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs index 56fbb2d976..b546ee5d28 100644 --- a/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs @@ -2,13 +2,16 @@ // 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; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Data.IO; +using Microsoft.ML.Runtime.Model; using Microsoft.ML.Runtime.RunTests; +using Microsoft.ML.Runtime.Tools; using Microsoft.ML.Transforms; using Microsoft.ML.Transforms.Normalizers; +using Microsoft.ML.Transforms.Projections; using System; +using System.Collections.Immutable; using System.IO; using Xunit; using Xunit.Abstractions; @@ -24,7 +27,7 @@ public NormalizerTests(ITestOutputHelper output) : base(output) [Fact] public void NormalizerWorkout() { - string dataPath = GetDataPath("iris.txt"); + string dataPath = GetDataPath(TestDatasets.iris.trainFilename); var loader = new TextLoader(Env, new TextLoader.Arguments { @@ -59,8 +62,8 @@ public void NormalizerWorkout() var data = loader.Read(dataPath); - var badData1 = new CopyColumnsTransform(Env, ("int1", "float1")).Transform(data); - var badData2 = new CopyColumnsTransform(Env, ("float0", "float4")).Transform(data); + var badData1 = new ColumnsCopyingTransformer(Env, ("int1", "float1")).Transform(data); + var badData2 = new ColumnsCopyingTransformer(Env, ("float0", "float4")).Transform(data); TestEstimatorCore(est, data, null, badData1); TestEstimatorCore(est, data, null, badData2); @@ -71,7 +74,7 @@ public void NormalizerWorkout() var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); using (var fs = File.Create(outputPath)) { - var dataView = SelectColumnsTransform.CreateDrop(Env, est.Fit(data).Transform(data), true, "float0"); + var dataView = ColumnSelectingTransformer.CreateDrop(Env, est.Fit(data).Transform(data), "float0"); DataSaverUtils.SaveDataView(ch, saver, dataView, fs, keepHidden: true); } } @@ -82,10 +85,127 @@ public void NormalizerWorkout() } [Fact] - public void SimpleConstructorsAndExtensions() + public void NormalizerParameters() { string dataPath = GetDataPath("iris.txt"); + var loader = new TextLoader(Env, new TextLoader.Arguments + { + Column = new[] { + new TextLoader.Column("float1", DataKind.R4, 1), + new TextLoader.Column("float4", DataKind.R4, new[]{new TextLoader.Range(1, 4) }), + new TextLoader.Column("double1", DataKind.R8, 1), + new TextLoader.Column("double4", DataKind.R8, new[]{new TextLoader.Range(1, 4) }), + new TextLoader.Column("int1", DataKind.I4, 0), + new TextLoader.Column("float0", DataKind.R4, new[]{ new TextLoader.Range { Min = 1, VariableEnd = true } }) + }, + HasHeader = true + }, new MultiFileSource(dataPath)); + + var est = new NormalizingEstimator(Env, + new NormalizingEstimator.MinMaxColumn("float1"), + new NormalizingEstimator.MinMaxColumn("float4"), + new NormalizingEstimator.MinMaxColumn("double1"), + new NormalizingEstimator.MinMaxColumn("double4"), + new NormalizingEstimator.BinningColumn("float1", "float1bin"), + new NormalizingEstimator.BinningColumn("float4", "float4bin"), + new NormalizingEstimator.BinningColumn("double1", "double1bin"), + new NormalizingEstimator.BinningColumn("double4", "double4bin"), + new NormalizingEstimator.MeanVarColumn("float1", "float1mv"), + new NormalizingEstimator.MeanVarColumn("float4", "float4mv"), + new NormalizingEstimator.MeanVarColumn("double1", "double1mv"), + new NormalizingEstimator.MeanVarColumn("double4", "double4mv"), + new NormalizingEstimator.LogMeanVarColumn("float1", "float1lmv"), + new NormalizingEstimator.LogMeanVarColumn("float4", "float4lmv"), + new NormalizingEstimator.LogMeanVarColumn("double1", "double1lmv"), + new NormalizingEstimator.LogMeanVarColumn("double4", "double4lmv")); + + var data = loader.Read(dataPath); + + var transformer = est.Fit(data); + + var floatAffineData = transformer.Columns[0].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters; + Assert.Equal(0.12658228f, floatAffineData.Scale); + Assert.Equal(0, floatAffineData.Offset); + + var floatAffineDataVec = transformer.Columns[1].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters>; + Assert.Equal(4, floatAffineDataVec.Scale.Length); + Assert.Empty(floatAffineDataVec.Offset); + + var doubleAffineData = transformer.Columns[2].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters; + Assert.Equal(0.12658227848101264, doubleAffineData.Scale); + Assert.Equal(0, doubleAffineData.Offset); + + var doubleAffineDataVec = transformer.Columns[3].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters>; + Assert.Equal(4, doubleAffineDataVec.Scale.Length); + Assert.Empty(doubleAffineDataVec.Offset); + + var floatBinData = transformer.Columns[4].ModelParameters as NormalizingTransformer.BinNormalizerModelParameters; + Assert.True(35 == floatBinData.UpperBounds.Length); + Assert.True(34 == floatBinData.Density); + Assert.True(0 == floatBinData.Offset); + + var floatBinDataVec = transformer.Columns[5].ModelParameters as NormalizingTransformer.BinNormalizerModelParameters>; + Assert.True(4 == floatBinDataVec.UpperBounds.Length); + Assert.True(35 == floatBinDataVec.UpperBounds[0].Length); + Assert.True(4 == floatBinDataVec.Density.Length); + Assert.True(0 == floatBinDataVec.Offset.Length); + + var doubleBinData = transformer.Columns[6].ModelParameters as NormalizingTransformer.BinNormalizerModelParameters; + Assert.Equal(35, doubleBinData.UpperBounds.Length); + Assert.Equal(34, doubleBinData.Density); + Assert.Equal(0, doubleBinData.Offset); + + var doubleBinDataVec = transformer.Columns[7].ModelParameters as NormalizingTransformer.BinNormalizerModelParameters>; + Assert.Equal(35, doubleBinDataVec.UpperBounds[0].Length); + Assert.Equal(4, doubleBinDataVec.Density.Length); + Assert.Empty(doubleBinDataVec.Offset); + + var floatCdfMeanData = transformer.Columns[8].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters; + Assert.Equal(0.169309646f, floatCdfMeanData.Scale); + Assert.Equal(0, floatCdfMeanData.Offset); + + var floatCdfMeanDataVec = transformer.Columns[9].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters>; + Assert.Equal(0.16930964589119f, floatCdfMeanDataVec.Scale[0]); + Assert.Equal(4, floatCdfMeanDataVec.Scale.Length); + Assert.Empty(floatCdfMeanDataVec.Offset); + + var doubleCdfMeanData = transformer.Columns[10].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters; + Assert.Equal(0.16930963784387665, doubleCdfMeanData.Scale); + Assert.Equal(0, doubleCdfMeanData.Offset); + + var doubleCdfMeanDataVec = transformer.Columns[11].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters>; + Assert.Equal(4, doubleCdfMeanDataVec.Scale.Length); + Assert.Empty(doubleCdfMeanDataVec.Offset); + + var floatCdfLogMeanData = transformer.Columns[12].ModelParameters as NormalizingTransformer.CdfNormalizerModelParameters; + Assert.Equal(1.75623953f, floatCdfLogMeanData.Mean); + Assert.True(true == floatCdfLogMeanData.UseLog); + Assert.Equal(0.140807763f, floatCdfLogMeanData.Stddev); + + var floatCdfLogMeanDataVec = transformer.Columns[13].ModelParameters as NormalizingTransformer.CdfNormalizerModelParameters>; + Assert.Equal(4, floatCdfLogMeanDataVec.Mean.Length); + Assert.True(true == floatCdfLogMeanDataVec.UseLog); + Assert.Equal(4, floatCdfLogMeanDataVec.Stddev.Length); + + var doubleCdfLogMeanData = transformer.Columns[14].ModelParameters as NormalizingTransformer.CdfNormalizerModelParameters; + Assert.Equal(1.7562395401953814, doubleCdfLogMeanData.Mean); + Assert.True(doubleCdfLogMeanData.UseLog); + Assert.Equal(0.14080776721611848, doubleCdfLogMeanData.Stddev); + + var doubleCdfLogMeanDataVec = transformer.Columns[15].ModelParameters as NormalizingTransformer.CdfNormalizerModelParameters>; + Assert.Equal(4, doubleCdfLogMeanDataVec.Mean.Length); + Assert.True(doubleCdfLogMeanDataVec.UseLog); + Assert.Equal(4, doubleCdfLogMeanDataVec.Stddev.Length); + + Done(); + } + + [Fact] + public void SimpleConstructorsAndExtensions() + { + string dataPath = GetDataPath(TestDatasets.iris.trainFilename); + var loader = new TextLoader(Env, new TextLoader.Arguments { Column = new[] { @@ -122,36 +242,213 @@ public void SimpleConstructorsAndExtensions() [Fact] public void LpGcNormAndWhiteningWorkout() { - var env = new ConsoleEnvironment(seed: 0); - string dataSource = GetDataPath("generated_regression_dataset.csv"); - var data = TextLoader.CreateReader(env, + string dataSource = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); + var data = TextLoader.CreateReader(ML, + c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), + separator: ';', hasHeader: true) + .Read(dataSource); + + var invalidData = TextLoader.CreateReader(ML, + c => (label: c.LoadFloat(11), features: c.LoadText(0, 10)), + separator: ';', hasHeader: true) + .Read(dataSource); + + var est = new LpNormalizingEstimator(ML, "features", "lpnorm") + .Append(new GlobalContrastNormalizingEstimator(ML, "features", "gcnorm")) + .Append(new VectorWhiteningEstimator(ML, "features", "whitened")); + TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); + + var outputPath = GetOutputPath("NormalizerEstimator", "lpnorm_gcnorm_whitened.tsv"); + using (var ch = Env.Start("save")) + { + var saver = new TextSaver(ML, new TextSaver.Arguments { Silent = true, OutputHeader = false }); + IDataView savedData = TakeFilter.Create(ML, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); + savedData = ColumnSelectingTransformer.CreateKeep(ML, savedData, new[] { "lpnorm", "gcnorm", "whitened" }); + + using (var fs = File.Create(outputPath)) + DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); + } + + CheckEquality("NormalizerEstimator", "lpnorm_gcnorm_whitened.tsv", digitsOfPrecision: 4); + Done(); + } + + [Fact] + public void WhiteningWorkout() + { + string dataSource = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); + var data = TextLoader.CreateReader(ML, c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), separator: ';', hasHeader: true) .Read(dataSource); - var invalidData = TextLoader.CreateReader(env, + var invalidData = TextLoader.CreateReader(ML, c => (label: c.LoadFloat(11), features: c.LoadText(0, 10)), separator: ';', hasHeader: true) .Read(dataSource); - var est = new LpNormalizer(env, "features", "lpnorm") - .Append(new GlobalContrastNormalizer(env, "features", "gcnorm")) - .Append(new Whitening(env, "features", "whitened")); + var est = new VectorWhiteningEstimator(ML, "features", "whitened1") + .Append(new VectorWhiteningEstimator(ML, "features", "whitened2", kind: WhiteningKind.Pca, pcaNum: 5)); TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); - var outputPath = GetOutputPath("Text", "lpnorm_gcnorm_whitened.tsv"); + var outputPath = GetOutputPath("NormalizerEstimator", "whitened.tsv"); using (var ch = Env.Start("save")) { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true, OutputHeader = false }); IDataView savedData = TakeFilter.Create(Env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = SelectColumnsTransform.CreateKeep(Env, savedData, "lpnorm", "gcnorm", "whitened"); + savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "whitened1", "whitened2" }); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); } - CheckEquality("Text", "lpnorm_gcnorm_whitened.tsv", digitsOfPrecision: 4); + CheckEquality("NormalizerEstimator", "whitened.tsv", digitsOfPrecision: 4); Done(); } + + [Fact] + public void TestWhiteningCommandLine() + { + Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0-10} xf=whitening{col=B:A} in=f:\2.txt" }), (int)0); + } + + [Fact] + public void TestWhiteningOldSavingAndLoading() + { + string dataSource = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); + var dataView = TextLoader.CreateReader(ML, + c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), + separator: ';', hasHeader: true) + .Read(dataSource).AsDynamic; + var pipe = new VectorWhiteningEstimator(ML, "features", "whitened"); + + var result = pipe.Fit(dataView).Transform(dataView); + var resultRoles = new RoleMappedData(result); + using (var ms = new MemoryStream()) + { + TrainUtils.SaveModel(ML, Env.Start("saving"), ms, null, resultRoles); + ms.Position = 0; + var loadedView = ModelFileUtils.LoadTransforms(ML, dataView, ms); + } + Done(); + } + + [Fact] + public void LpNormWorkout() + { + string dataSource = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); + var data = TextLoader.CreateReader(ML, + c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), + separator: ';', hasHeader: true) + .Read(dataSource); + + var invalidData = TextLoader.CreateReader(ML, + c => (label: c.LoadFloat(11), features: c.LoadText(0, 10)), + separator: ';', hasHeader: true) + .Read(dataSource); + + var est = new LpNormalizingEstimator(ML, "features", "lpNorm1") + .Append(new LpNormalizingEstimator(ML, "features", "lpNorm2", normKind: LpNormalizingEstimatorBase.NormalizerKind.L1Norm, substractMean: true)); + TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); + + var outputPath = GetOutputPath("NormalizerEstimator", "lpNorm.tsv"); + using (var ch = Env.Start("save")) + { + var saver = new TextSaver(ML, new TextSaver.Arguments { Silent = true, OutputHeader = false }); + IDataView savedData = TakeFilter.Create(ML, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); + savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "lpNorm1", "lpNorm2" }); + + using (var fs = File.Create(outputPath)) + DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); + } + + CheckEquality("NormalizerEstimator", "lpNorm.tsv"); + Done(); + } + + [Fact] + public void TestLpNormCommandLine() + { + Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0-10} xf=LpNormNormalizer{col=B:A} in=f:\2.txt" }), (int)0); + } + + [Fact] + public void TestLpNormOldSavingAndLoading() + { + string dataSource = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); + var dataView = TextLoader.CreateReader(ML, + c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), + separator: ';', hasHeader: true) + .Read(dataSource).AsDynamic; + var pipe = new LpNormalizingEstimator(ML, "features", "whitened"); + + var result = pipe.Fit(dataView).Transform(dataView); + var resultRoles = new RoleMappedData(result); + using (var ms = new MemoryStream()) + { + TrainUtils.SaveModel(ML, Env.Start("saving"), ms, null, resultRoles); + ms.Position = 0; + var loadedView = ModelFileUtils.LoadTransforms(ML, dataView, ms); + } + } + + [Fact] + public void GcnWorkout() + { + string dataSource = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); + var data = TextLoader.CreateReader(ML, + c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), + separator: ';', hasHeader: true) + .Read(dataSource); + + var invalidData = TextLoader.CreateReader(ML, + c => (label: c.LoadFloat(11), features: c.LoadText(0, 10)), + separator: ';', hasHeader: true) + .Read(dataSource); + + var est = new GlobalContrastNormalizingEstimator(ML, "features", "gcnNorm1") + .Append(new GlobalContrastNormalizingEstimator(ML, "features", "gcnNorm2", substractMean: false, useStdDev: true, scale: 3)); + TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); + + var outputPath = GetOutputPath("NormalizerEstimator", "gcnNorm.tsv"); + using (var ch = Env.Start("save")) + { + var saver = new TextSaver(ML, new TextSaver.Arguments { Silent = true, OutputHeader = false }); + IDataView savedData = TakeFilter.Create(ML, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); + savedData = ColumnSelectingTransformer.CreateKeep(ML, savedData, new[] { "gcnNorm1", "gcnNorm2" }); + + using (var fs = File.Create(outputPath)) + DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); + } + + CheckEquality("NormalizerEstimator", "gcnNorm.tsv", digitsOfPrecision: 4); + Done(); + } + + [Fact] + public void TestGcnNormCommandLine() + { + Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0-10} xf=GcnTransform{col=B:A} in=f:\2.txt" }), (int)0); + } + + [Fact] + public void TestGcnNormOldSavingAndLoading() + { + string dataSource = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); + var dataView = TextLoader.CreateReader(ML, + c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), + separator: ';', hasHeader: true) + .Read(dataSource).AsDynamic; + var pipe = new GlobalContrastNormalizingEstimator(ML, "features", "whitened"); + + var result = pipe.Fit(dataView).Transform(dataView); + var resultRoles = new RoleMappedData(result); + using (var ms = new MemoryStream()) + { + TrainUtils.SaveModel(ML, Env.Start("saving"), ms, null, resultRoles); + ms.Position = 0; + var loadedView = ModelFileUtils.LoadTransforms(ML, dataView, ms); + } + } } } diff --git a/test/Microsoft.ML.Tests/Transformers/PcaTests.cs b/test/Microsoft.ML.Tests/Transformers/PcaTests.cs index fa53e88170..43ad1f7d70 100644 --- a/test/Microsoft.ML.Tests/Transformers/PcaTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/PcaTests.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; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Data.IO; using Microsoft.ML.Runtime.RunTests; @@ -15,14 +16,14 @@ namespace Microsoft.ML.Tests.Transformers { public sealed class PcaTests : TestDataPipeBase { - private readonly ConsoleEnvironment _env; + private readonly IHostEnvironment _env; private readonly string _dataSource; private readonly TextSaver _saver; public PcaTests(ITestOutputHelper helper) : base(helper) { - _env = new ConsoleEnvironment(seed: 1); + _env = new MLContext(seed: 1); _dataSource = GetDataPath("generated_regression_dataset.csv"); _saver = new TextSaver(_env, new TextSaver.Arguments { Silent = true, OutputHeader = false }); } @@ -62,7 +63,7 @@ public void TestPcaEstimator() using (var ch = _env.Start("save")) { IDataView savedData = TakeFilter.Create(_env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = SelectColumnsTransform.CreateKeep(_env, savedData, "pca"); + savedData = ColumnSelectingTransformer.CreateKeep(_env, savedData, new[] { "pca" }); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, _saver, savedData, fs, keepHidden: true); diff --git a/test/Microsoft.ML.Tests/Transformers/RffTests.cs b/test/Microsoft.ML.Tests/Transformers/RffTests.cs index 80d404cf9c..d647eddbca 100644 --- a/test/Microsoft.ML.Tests/Transformers/RffTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/RffTests.cs @@ -51,8 +51,8 @@ public void RffWorkout() var generator = new GaussianFourierSampler.Arguments(); var pipe = new RandomFourierFeaturizingEstimator(Env, new[]{ - new RffTransform.ColumnInfo("A", "RffA", 5, false), - new RffTransform.ColumnInfo("A", "RffB", 10, true, new LaplacianFourierSampler.Arguments()) + new RandomFourierFeaturizingTransformer.ColumnInfo("A", "RffA", 5, false), + new RandomFourierFeaturizingTransformer.ColumnInfo("A", "RffB", 10, true, new LaplacianFourierSampler.Arguments()) }); TestEstimatorCore(pipe, dataView, invalidInput: invalidData, validForFitNotValidForTransformInput: validFitInvalidData); @@ -107,8 +107,8 @@ public void TestOldSavingAndLoading() var dataView = ComponentCreation.CreateDataView(Env, data); var est = new RandomFourierFeaturizingEstimator(Env, new[]{ - new RffTransform.ColumnInfo("A", "RffA", 5, false), - new RffTransform.ColumnInfo("A", "RffB", 10, true,new LaplacianFourierSampler.Arguments()) + new RandomFourierFeaturizingTransformer.ColumnInfo("A", "RffA", 5, false), + new RandomFourierFeaturizingTransformer.ColumnInfo("A", "RffB", 10, true,new LaplacianFourierSampler.Arguments()) }); var result = est.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); diff --git a/test/Microsoft.ML.Tests/Transformers/SelectColumnsTests.cs b/test/Microsoft.ML.Tests/Transformers/SelectColumnsTests.cs index bcf09807e6..e60fe7ada1 100644 --- a/test/Microsoft.ML.Tests/Transformers/SelectColumnsTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/SelectColumnsTests.cs @@ -47,7 +47,7 @@ void TestSelectKeep() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = new ColumnSelectingEstimator(Env, "A", "C"); + var est = ColumnSelectingEstimator.KeepColumns(Env, "A", "C"); var transformer = est.Fit(dataView); var result = transformer.Transform(dataView); var foundColumnA = result.Schema.TryGetColumnIndex("A", out int aIdx); @@ -69,7 +69,7 @@ void TestSelectKeepWithOrder() var dataView = ComponentCreation.CreateDataView(Env, data); // Expected output will be CA - var est = new ColumnSelectingEstimator(Env, "C", "A"); + var est = ColumnSelectingEstimator.KeepColumns(Env, "C", "A"); var transformer = est.Fit(dataView); var result = transformer.Transform(dataView); var foundColumnA = result.Schema.TryGetColumnIndex("A", out int aIdx); @@ -89,7 +89,7 @@ void TestSelectDrop() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = new ColumnSelectingEstimator(Env, null, new string[] { "A", "C" }); + var est = ColumnSelectingEstimator.DropColumns(Env, "A", "C"); var transformer = est.Fit(dataView); var result = transformer.Transform(dataView); var foundColumnA = result.Schema.TryGetColumnIndex("A", out int aIdx); @@ -113,15 +113,15 @@ void TestSelectWorkout() var invalidDataView = ComponentCreation.CreateDataView(Env, invalidData); // Workout on keep columns - var est = new ColumnSelectingEstimator(Env, new[] {"A", "B"}, null, true, false); + var est = ML.Transforms.SelectColumns(new[] {"A", "B"}, null, true, false); TestEstimatorCore(est, validFitInput: dataView, invalidInput: invalidDataView); // Workout on drop columns - est = new ColumnSelectingEstimator(Env, null, new[] {"A", "B"}, true, false); + est = ML.Transforms.SelectColumns(null, new[] {"A", "B"}, true, false); TestEstimatorCore(est, validFitInput: dataView, invalidInput: invalidDataView); // Workout on keep columns with ignore mismatch -- using invalid data set - est = new ColumnSelectingEstimator(Env, new[] {"A", "B"}, null, true, true); + est = ML.Transforms.SelectColumns(new[] {"A", "B"}, null, true, true); TestEstimatorCore(est, validFitInput: invalidDataView); } @@ -130,7 +130,7 @@ void TestSelectColumnsWithMissing() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = new ColumnSelectingEstimator(Env, new[] {"D", "G"}); + var est = ColumnSelectingEstimator.KeepColumns(Env, "D", "G"); Assert.Throws(() => est.Fit(dataView)); } @@ -139,8 +139,8 @@ void TestSelectColumnsWithSameName() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = new CopyColumnsEstimator(Env, new[] {("A", "A"), ("B", "B")}); - var chain = est.Append(new ColumnSelectingEstimator(Env, new[]{"C", "A" })); + var est = new ColumnsCopyingEstimator(Env, new[] {("A", "A"), ("B", "B")}); + var chain = est.Append(ColumnSelectingEstimator.KeepColumns(Env, "C", "A")); var transformer = chain.Fit(dataView); var result = transformer.Transform(dataView); @@ -163,8 +163,8 @@ void TestSelectColumnsWithKeepHidden() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = new CopyColumnsEstimator(Env, new[] {("A", "A"), ("B", "B")}); - var chain = est.Append(new ColumnSelectingEstimator(Env, new[] {"B", "A" }, null, true)); + var est = new ColumnsCopyingEstimator(Env, new[] {("A", "A"), ("B", "B")}); + var chain = est.Append(ML.Transforms.SelectColumns(new[] {"B", "A" }, null, true)); var transformer = chain.Fit(dataView); var result = transformer.Transform(dataView); @@ -187,8 +187,8 @@ void TestSelectColumnsDropWithKeepHidden() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = new CopyColumnsEstimator(Env, new[] {("A", "A"), ("B", "B")}); - var chain = est.Append(new ColumnSelectingEstimator(Env, null, new[] { "A" }, true)); + var est = new ColumnsCopyingEstimator(Env, new[] {("A", "A"), ("B", "B")}); + var chain = est.Append(ML.Transforms.SelectColumns(null, new[] { "A" }, true)); var transformer = chain.Fit(dataView); var result = transformer.Transform(dataView); @@ -211,14 +211,14 @@ void TestSelectWithKeepAndDropSet() { // Setting both keep and drop is not allowed. var test = new string[]{ "D", "G"}; - Assert.Throws(() => new ColumnSelectingEstimator(Env, test, test)); + Assert.Throws(() => ML.Transforms.SelectColumns(test, test)); } [Fact] void TestSelectNoKeepAndDropSet() { // Passing null to both keep and drop is not allowed. - Assert.Throws(() => new ColumnSelectingEstimator(Env, null, null)); + Assert.Throws(() => ML.Transforms.SelectColumns(null, null)); } [Fact] @@ -226,7 +226,7 @@ void TestSelectSavingAndLoading() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = new ColumnSelectingEstimator(Env, new[] { "A", "B" }); + var est = ColumnSelectingEstimator.KeepColumns(Env, "A", "B"); var transformer = est.Fit(dataView); using (var ms = new MemoryStream()) { @@ -245,8 +245,8 @@ void TestSelectSavingAndLoadingWithNoKeepHidden() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = new CopyColumnsEstimator(Env, new[] {("A", "A"), ("B", "B")}).Append( - new ColumnSelectingEstimator(Env, new[] { "A", "B" }, null, false)); + var est = new ColumnsCopyingEstimator(Env, new[] {("A", "A"), ("B", "B")}).Append( + ML.Transforms.SelectColumns(new[] { "A", "B" }, null, false)); var transformer = est.Fit(dataView); using (var ms = new MemoryStream()) { diff --git a/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs b/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs index b436c96149..d3d66d5751 100644 --- a/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs @@ -2,16 +2,18 @@ // 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; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Data.IO; using Microsoft.ML.Runtime.RunTests; +using Microsoft.ML.Runtime.Tools; using Microsoft.ML.Transforms; -using Microsoft.ML.Transforms.Text; using Microsoft.ML.Transforms.Categorical; +using Microsoft.ML.Transforms.Conversions; +using Microsoft.ML.Transforms.Text; using System.IO; using Xunit; using Xunit.Abstractions; -using Microsoft.ML.Transforms.Conversions; namespace Microsoft.ML.Tests.Transformers { @@ -47,7 +49,7 @@ public void TextFeaturizerWorkout() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); IDataView savedData = TakeFilter.Create(Env, feat.Fit(data).Transform(data).AsDynamic, 4); - savedData = SelectColumnsTransform.CreateKeep(Env, savedData, "Data", "Data_TransformedText"); + savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "Data", "Data_TransformedText" }); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); @@ -72,8 +74,8 @@ public void TextTokenizationWorkout() .Read(sentimentDataPath); var est = new WordTokenizingEstimator(Env, "text", "words") - .Append(new CharacterTokenizingEstimator(Env, "text", "chars")) - .Append(new KeyToValueEstimator(Env, "chars")); + .Append(new TokenizingByCharactersEstimator(Env, "text", "chars")) + .Append(new KeyToValueMappingEstimator(Env, "chars")); TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); var outputPath = GetOutputPath("Text", "tokenized.tsv"); @@ -81,7 +83,7 @@ public void TextTokenizationWorkout() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); IDataView savedData = TakeFilter.Create(Env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = SelectColumnsTransform.CreateKeep(Env, savedData, "text", "words", "chars"); + savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "text", "words", "chars" }); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); @@ -100,9 +102,9 @@ public void TokenizeWithSeparators() text: ctx.LoadText(1)), hasHeader: true) .Read(dataPath).AsDynamic; - var est = new WordTokenizingEstimator(Env, "text", "words", separators: new[] { ' ', '?', '!', '.', ','}); + var est = new WordTokenizingEstimator(Env, "text", "words", separators: new[] { ' ', '?', '!', '.', ',' }); var outdata = TakeFilter.Create(Env, est.Fit(data).Transform(data), 4); - var savedData = SelectColumnsTransform.CreateKeep(Env, outdata, "words"); + var savedData = ColumnSelectingTransformer.CreateKeep(Env, outdata, new[] { "words" }); var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); var outputPath = GetOutputPath("Text", "tokenizedWithSeparators.tsv"); @@ -142,7 +144,7 @@ public void TextNormalizationAndStopwordRemoverWorkout() text: ctx.LoadFloat(1)), hasHeader: true) .Read(sentimentDataPath); - var est = new TextNormalizingEstimator(Env,"text") + var est = new TextNormalizingEstimator(Env, "text") .Append(new WordTokenizingEstimator(Env, "text", "words")) .Append(new StopwordRemover(Env, "words", "words_without_stopwords")); TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); @@ -152,7 +154,7 @@ public void TextNormalizationAndStopwordRemoverWorkout() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); IDataView savedData = TakeFilter.Create(Env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = SelectColumnsTransform.CreateKeep(Env, savedData, "text", "words_without_stopwords"); + savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "text", "words_without_stopwords" }); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); @@ -178,7 +180,7 @@ public void WordBagWorkout() var est = new WordBagEstimator(Env, "text", "bag_of_words"). Append(new WordHashBagEstimator(Env, "text", "bag_of_wordshash")); - + // The following call fails because of the following issue // https://github.com/dotnet/machinelearning/issues/969 // TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); @@ -188,7 +190,7 @@ public void WordBagWorkout() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); IDataView savedData = TakeFilter.Create(Env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = SelectColumnsTransform.CreateKeep(Env, savedData, "text", "bag_of_words", "bag_of_wordshash"); + savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "text", "bag_of_words", "bag_of_wordshash" }); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); @@ -214,19 +216,17 @@ public void NgramWorkout() var est = new WordTokenizingEstimator(Env, "text", "text") .Append(new ValueToKeyMappingEstimator(Env, "text", "terms")) - .Append(new NgramEstimator(Env, "terms", "ngrams")) + .Append(new NgramCountingEstimator(Env, "terms", "ngrams")) .Append(new NgramHashEstimator(Env, "terms", "ngramshash")); - - // The following call fails because of the following issue - // https://github.com/dotnet/machinelearning/issues/969 - // TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); + + TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); var outputPath = GetOutputPath("Text", "ngrams.tsv"); using (var ch = Env.Start("save")) { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); IDataView savedData = TakeFilter.Create(Env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = SelectColumnsTransform.CreateKeep(Env, savedData, "text", "terms", "ngrams", "ngramshash"); + savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "text", "terms", "ngrams", "ngramshash" }); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); @@ -239,7 +239,7 @@ public void NgramWorkout() [Fact] public void LdaWorkout() { - var env = new ConsoleEnvironment(seed: 42, conc: 1); + IHostEnvironment env = new MLContext(seed: 42, conc: 1); string sentimentDataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var data = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -252,21 +252,22 @@ public void LdaWorkout() .Read(sentimentDataPath); var est = new WordBagEstimator(env, "text", "bag_of_words"). - Append(new LdaEstimator(env, "bag_of_words", "topics", 10, advancedSettings: s => { - s.NumIterations = 10; - s.ResetRandomGenerator = true; - })); + Append(new LatentDirichletAllocationEstimator(env, "bag_of_words", "topics", 10, numIterations: 10, + resetRandomGenerator: true)); // The following call fails because of the following issue // https://github.com/dotnet/machinelearning/issues/969 + // In this test it manifests because of the WordBagEstimator in the estimator chain // TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); var outputPath = GetOutputPath("Text", "ldatopics.tsv"); using (var ch = env.Start("save")) { - var saver = new TextSaver(env, new TextSaver.Arguments { Silent = true, OutputHeader = false, Dense = true }); - IDataView savedData = TakeFilter.Create(env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = SelectColumnsTransform.CreateKeep(env, savedData, "topics"); + var saver = new TextSaver(env, new TextSaver.Arguments { Silent = true, OutputHeader = false, Dense = true }); + var transformer = est.Fit(data.AsDynamic); + var transformedData = transformer.Transform(data.AsDynamic); + IDataView savedData = TakeFilter.Create(env, transformedData, 4); + savedData = ColumnSelectingTransformer.CreateKeep(env, savedData, new[] { "topics" }); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); @@ -281,5 +282,30 @@ public void LdaWorkout() // CheckEquality("Text", "ldatopics.tsv"); Done(); } + + [Fact] + public void LdaWorkoutEstimatorCore() + { + var ml = new MLContext(); + + var builder = new ArrayDataViewBuilder(Env); + var data = new[] + { + new[] { (float)1.0, (float)0.0, (float)0.0 }, + new[] { (float)0.0, (float)1.0, (float)0.0 }, + new[] { (float)0.0, (float)0.0, (float)1.0 }, + }; + builder.AddColumn("F1V", NumberType.Float, data); + var srcView = builder.GetDataView(); + + var est = ml.Transforms.Text.LatentDirichletAllocation("F1V"); + TestEstimatorCore(est, srcView); + } + + [Fact] + public void TestLdaCommandLine() + { + Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0-10} xf=lda{col=B:A} in=f:\2.txt" }), (int)0); + } } } diff --git a/test/Microsoft.ML.Tests/Transformers/WordTokenizeTests.cs b/test/Microsoft.ML.Tests/Transformers/WordTokenizeTests.cs index 4ceb263fc2..83ff4c2226 100644 --- a/test/Microsoft.ML.Tests/Transformers/WordTokenizeTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/WordTokenizeTests.cs @@ -40,8 +40,8 @@ public void WordTokenizeWorkout() var invalidData = new[] { new TestWrong() { A =1, B = new float[2] { 2,3 } } }; var invalidDataView = ComponentCreation.CreateDataView(Env, invalidData); var pipe = new WordTokenizingEstimator(Env, new[]{ - new WordTokenizeTransform.ColumnInfo("A", "TokenizeA"), - new WordTokenizeTransform.ColumnInfo("B", "TokenizeB"), + new WordTokenizingTransformer.ColumnInfo("A", "TokenizeA"), + new WordTokenizingTransformer.ColumnInfo("B", "TokenizeB"), }); TestEstimatorCore(pipe, dataView, invalidInput: invalidDataView); @@ -61,8 +61,8 @@ public void TestOldSavingAndLoading() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new WordTokenizingEstimator(Env, new[]{ - new WordTokenizeTransform.ColumnInfo("A", "TokenizeA"), - new WordTokenizeTransform.ColumnInfo("B", "TokenizeB"), + new WordTokenizingTransformer.ColumnInfo("A", "TokenizeA"), + new WordTokenizingTransformer.ColumnInfo("B", "TokenizeB"), }); var result = pipe.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); diff --git a/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesDirectApi.cs b/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesDirectApi.cs index a72e131bc4..834e3f669f 100644 --- a/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesDirectApi.cs +++ b/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesDirectApi.cs @@ -13,114 +13,109 @@ namespace Microsoft.ML.Tests public sealed class TimeSeries { - public class Prediction + private sealed class Prediction { +#pragma warning disable CS0649 [VectorType(4)] public double[] Change; +#pragma warning restore CS0649 } - sealed class Data + private sealed class Data { public float Value; - public Data(float value) - { - Value = value; - } + public Data(float value) => Value = value; } [Fact] public void ChangeDetection() { - using (var env = new ConsoleEnvironment(conc: 1)) + var env = new MLContext(conc: 1); + const int size = 10; + List data = new List(size); + var dataView = env.CreateStreamingDataView(data); + for (int i = 0; i < size / 2; i++) + data.Add(new Data(5)); + + for (int i = 0; i < size / 2; i++) + data.Add(new Data((float)(5 + i * 1.1))); + + var args = new IidChangePointDetector.Arguments() { - const int size = 10; - List data = new List(size); - var dataView = env.CreateStreamingDataView(data); - for (int i = 0; i < size / 2; i++) - data.Add(new Data(5)); - - for (int i = 0; i < size / 2; i++) - data.Add(new Data((float)(5 + i * 1.1))); - - var args = new IidChangePointDetector.Arguments() - { - Confidence = 80, - Source = "Value", - Name = "Change", - ChangeHistoryLength = size - }; - // Train - var detector = new IidChangePointEstimator(env, args).Fit(dataView); - // Transform - var output = detector.Transform(dataView); - // Get predictions - var enumerator = output.AsEnumerable(env, true).GetEnumerator(); - Prediction row = null; - List expectedValues = new List() { 0, 5, 0.5, 5.1200000000000114E-08, 0, 5, 0.4999999995, 5.1200000046080209E-08, 0, 5, 0.4999999995, 5.1200000092160303E-08, + Confidence = 80, + Source = "Value", + Name = "Change", + ChangeHistoryLength = size + }; + // Train + var detector = new IidChangePointEstimator(env, args).Fit(dataView); + // Transform + var output = detector.Transform(dataView); + // Get predictions + var enumerator = output.AsEnumerable(env, true).GetEnumerator(); + Prediction row = null; + List expectedValues = new List() { 0, 5, 0.5, 5.1200000000000114E-08, 0, 5, 0.4999999995, 5.1200000046080209E-08, 0, 5, 0.4999999995, 5.1200000092160303E-08, 0, 5, 0.4999999995, 5.12000001382404E-08}; - int index = 0; - while (enumerator.MoveNext() && index < expectedValues.Count) - { - row = enumerator.Current; - - Assert.Equal(expectedValues[index++], row.Change[0]); - Assert.Equal(expectedValues[index++], row.Change[1]); - Assert.Equal(expectedValues[index++], row.Change[2]); - Assert.Equal(expectedValues[index++], row.Change[3]); - } + int index = 0; + while (enumerator.MoveNext() && index < expectedValues.Count) + { + row = enumerator.Current; + + Assert.Equal(expectedValues[index++], row.Change[0]); + Assert.Equal(expectedValues[index++], row.Change[1]); + Assert.Equal(expectedValues[index++], row.Change[2]); + Assert.Equal(expectedValues[index++], row.Change[3]); } } [Fact] public void ChangePointDetectionWithSeasonality() { - using (var env = new ConsoleEnvironment(conc: 1)) + var env = new MLContext(conc: 1); + const int ChangeHistorySize = 10; + const int SeasonalitySize = 10; + const int NumberOfSeasonsInTraining = 5; + const int MaxTrainingSize = NumberOfSeasonsInTraining * SeasonalitySize; + + List data = new List(); + var dataView = env.CreateStreamingDataView(data); + + var args = new SsaChangePointDetector.Arguments() { - const int ChangeHistorySize = 10; - const int SeasonalitySize = 10; - const int NumberOfSeasonsInTraining = 5; - const int MaxTrainingSize = NumberOfSeasonsInTraining * SeasonalitySize; - - List data = new List(); - var dataView = env.CreateStreamingDataView(data); - - var args = new SsaChangePointDetector.Arguments() - { - Confidence = 95, - Source = "Value", - Name = "Change", - ChangeHistoryLength = ChangeHistorySize, - TrainingWindowSize = MaxTrainingSize, - SeasonalWindowSize = SeasonalitySize - }; - - for (int j = 0; j < NumberOfSeasonsInTraining; j++) - for (int i = 0; i < SeasonalitySize; i++) - data.Add(new Data(i)); - - for (int i = 0; i < ChangeHistorySize; i++) - data.Add(new Data(i * 100)); - - // Train - var detector = new SsaChangePointEstimator(env, args).Fit(dataView); - // Transform - var output = detector.Transform(dataView); - // Get predictions - var enumerator = output.AsEnumerable(env, true).GetEnumerator(); - Prediction row = null; - List expectedValues = new List() { 0, -3.31410598754883, 0.5, 5.12000000000001E-08, 0, 1.5700820684432983, 5.2001145245395008E-07, + Confidence = 95, + Source = "Value", + Name = "Change", + ChangeHistoryLength = ChangeHistorySize, + TrainingWindowSize = MaxTrainingSize, + SeasonalWindowSize = SeasonalitySize + }; + + for (int j = 0; j < NumberOfSeasonsInTraining; j++) + for (int i = 0; i < SeasonalitySize; i++) + data.Add(new Data(i)); + + for (int i = 0; i < ChangeHistorySize; i++) + data.Add(new Data(i * 100)); + + // Train + var detector = new SsaChangePointEstimator(env, args).Fit(dataView); + // Transform + var output = detector.Transform(dataView); + // Get predictions + var enumerator = output.AsEnumerable(env, true).GetEnumerator(); + Prediction row = null; + List expectedValues = new List() { 0, -3.31410598754883, 0.5, 5.12000000000001E-08, 0, 1.5700820684432983, 5.2001145245395008E-07, 0.012414560443710681, 0, 1.2854313254356384, 0.28810801662678009, 0.02038940454467935, 0, -1.0950627326965332, 0.36663890634019225, 0.026956459625565483}; - int index = 0; - while (enumerator.MoveNext() && index < expectedValues.Count) - { - row = enumerator.Current; - Assert.Equal(expectedValues[index++], row.Change[0], precision: 7); // Alert - Assert.Equal(expectedValues[index++], row.Change[1], precision: 7); // Raw score - Assert.Equal(expectedValues[index++], row.Change[2], precision: 7); // P-Value score - Assert.Equal(expectedValues[index++], row.Change[3], precision: 7); // Martingale score - } + int index = 0; + while (enumerator.MoveNext() && index < expectedValues.Count) + { + row = enumerator.Current; + Assert.Equal(expectedValues[index++], row.Change[0], precision: 7); // Alert + Assert.Equal(expectedValues[index++], row.Change[1], precision: 7); // Raw score + Assert.Equal(expectedValues[index++], row.Change[2], precision: 7); // P-Value score + Assert.Equal(expectedValues[index++], row.Change[3], precision: 7); // Martingale score } } } diff --git a/tools-local/Microsoft.ML.InternalCodeAnalyzer/InstanceInitializerAnalyzer.cs b/tools-local/Microsoft.ML.InternalCodeAnalyzer/InstanceInitializerAnalyzer.cs index c7ee67537a..c4bd2fe38c 100644 --- a/tools-local/Microsoft.ML.InternalCodeAnalyzer/InstanceInitializerAnalyzer.cs +++ b/tools-local/Microsoft.ML.InternalCodeAnalyzer/InstanceInitializerAnalyzer.cs @@ -18,7 +18,7 @@ public sealed class InstanceInitializerAnalyzer : DiagnosticAnalyzer internal const string DiagnosticId = "MSML_NoInstanceInitializers"; private const string Title = "No initializers on instance fields or properties"; - private const string Format = "Member {0} has a {1} initialier outside the constructor"; + private const string Format = "Member {0} has a {1} initializer outside the constructor"; private static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, Format, Category, From 8f9e80858e387f5482aef8e99f9a4f55ed47069a Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Wed, 21 Nov 2018 10:37:15 -0800 Subject: [PATCH 41/54] Revert "Merge remote-tracking branch 'upstream/master' into dnn-image-feat" This reverts commit 22e385b4b56632d9e05d0b7a1bd4ba2d23bbf233. --- Directory.Build.props | 1 - Microsoft.ML.sln | 11 + README.md | 41 +- ROADMAP.md | 2 +- build/Dependencies.props | 3 +- build/ci/phase-template.yml | 2 +- docs/building/unix-instructions.md | 9 +- docs/code/MlNetCookBook.md | 144 +- docs/code/MlNetHighLevelConcepts.md | 52 +- .../Dynamic/ConcatTransform.cs | 23 +- .../IidChangePointDetectorTransform.cs | 92 - .../Dynamic/IidSpikeDetectorTransform.cs | 87 - .../Dynamic/KeyToValue_Term.cs | 33 +- .../Dynamic/MatrixFactorization.cs | 12 +- .../{Normalizer.cs => MinMaxNormalizer.cs} | 44 +- .../Dynamic/NgramExtraction.cs | 76 - .../Dynamic/ProjectionTransforms.cs | 114 - .../Microsoft.ML.Samples/Dynamic/SDCA.cs | 19 +- .../SsaChangePointDetectorTransform.cs | 88 - .../Dynamic/SsaSpikeDetectorTransform.cs | 95 - .../Dynamic/TextTransform.cs | 21 +- .../Dynamic/Timeseries.cs | 295 + .../Microsoft.ML.Samples.csproj | 1 - docs/samples/Microsoft.ML.Samples/Program.cs | 8 +- .../AveragedPerceptronBinaryClassification.cs | 20 +- .../Static/FastTreeBinaryClassification.cs | 22 +- .../Static/FastTreeRegression.cs | 22 +- .../Static/LightGBMBinaryClassification.cs | 20 +- .../Static/LightGBMRegression.cs | 23 +- .../Static/SDCABinaryClassification.cs | 20 +- .../Static/SDCARegression.cs | 23 +- pkg/Microsoft.ML/Microsoft.ML.nupkgproj | 1 - .../AssemblyLoadingUtils.cs | 4 +- src/Microsoft.ML.Api/ComponentCreation.cs | 59 +- .../CustomMappingTransformer.cs | 36 +- .../DataViewConstructionUtils.cs | 31 +- src/Microsoft.ML.Api/GenerateCodeCommand.cs | 2 +- src/Microsoft.ML.Api/PredictionEngine.cs | 106 +- .../StatefulFilterTransform.cs | 2 +- src/Microsoft.ML.Api/TypedCursor.cs | 55 +- .../CommandLine/ArgumentAttribute.cs | 80 +- .../CommandLine/ArgumentType.cs | 54 - .../CommandLine/CharCursor.cs | 2 +- src/Microsoft.ML.Core/CommandLine/CmdLexer.cs | 5 +- .../CommandLine/CmdParser.cs | 362 +- .../CommandLine/DefaultArgumentAttribute.cs | 29 - .../CommandLine/EnumValueDisplayAttribute.cs | 23 - .../CommandLine/HideEnumValueAttribute.cs | 20 - .../{SpecialPurpose.cs => Utils.cs} | 3 +- src/Microsoft.ML.Core/Data/ICommand.cs | 6 +- src/Microsoft.ML.Core/Data/IDataView.cs | 16 +- src/Microsoft.ML.Core/Data/IEstimator.cs | 15 +- src/Microsoft.ML.Core/Data/IFileHandle.cs | 12 +- .../Data/IHostEnvironment.cs | 8 +- .../{EntryPoints => Data}/IMlState.cs | 2 +- .../{EntryPoints => Data}/IPredictorModel.cs | 0 .../Data/ITrainerArguments.cs | 15 + .../Data/LinkedRootCursorBase.cs | 3 +- .../Data/LinkedRowFilterCursorBase.cs | 3 +- .../Data/LinkedRowRootCursorBase.cs | 3 +- src/Microsoft.ML.Core/Data/MetadataUtils.cs | 34 +- .../Data/ProgressReporter.cs | 3 +- .../Data/ReadOnlyMemoryUtils.cs | 28 +- src/Microsoft.ML.Core/Data/RootCursorBase.cs | 3 +- src/Microsoft.ML.Core/Data/ServerChannel.cs | 6 +- .../Data/SynchronizedCursorBase.cs | 3 +- src/Microsoft.ML.Core/Data/VBuffer.cs | 362 +- src/Microsoft.ML.Core/Data/VBufferEditor.cs | 160 - .../EntryPoints/EntryPointModuleAttribute.cs | 6 +- .../EntryPoints/EntryPointUtils.cs | 3 +- .../EntryPoints/ModuleArgs.cs | 3 +- .../Environment/ConsoleEnvironment.cs | 9 +- .../Environment/HostEnvironmentBase.cs | 31 +- .../Environment/TelemetryMessage.cs | 12 +- .../Prediction/IPredictor.cs | 90 + .../Prediction}/ISweeper.cs | 0 src/Microsoft.ML.Core/Prediction/ITrainer.cs | 42 +- src/Microsoft.ML.Core/Prediction/ITree.cs | 20 +- .../Prediction/TrainContext.cs | 15 +- .../Prediction/TrainerInfo.cs | 15 +- .../Properties/AssemblyInfo.cs | 12 +- src/Microsoft.ML.Core/Utilities/BigArray.cs | 19 +- src/Microsoft.ML.Core/Utilities/BinFinder.cs | 9 +- src/Microsoft.ML.Core/Utilities/BitUtils.cs | 2 +- src/Microsoft.ML.Core/Utilities/CharUtils.cs | 3 +- .../Utilities/CmdIndenter.cs | 8 +- src/Microsoft.ML.Core/Utilities/Contracts.cs | 999 +- .../Utilities/DoubleParser.cs | 3 +- .../Utilities/FixedSizeQueue.cs | 3 +- src/Microsoft.ML.Core/Utilities/FloatUtils.cs | 3 +- src/Microsoft.ML.Core/Utilities/HashArray.cs | 12 +- src/Microsoft.ML.Core/Utilities/Hashing.cs | 3 +- src/Microsoft.ML.Core/Utilities/Heap.cs | 8 +- .../Utilities/HybridMemoryStream.cs | 3 +- .../Utilities/IndentedTextWriterExtensions.cs | 50 - .../Utilities/IndentingTextWriter.cs | 281 + src/Microsoft.ML.Core/Utilities/LineParser.cs | 58 - .../Utilities/ListExtensions.cs | 42 + src/Microsoft.ML.Core/Utilities/LruCache.cs | 3 +- src/Microsoft.ML.Core/Utilities/MathUtils.cs | 71 +- .../Utilities/MatrixTransposeOps.cs | 3 +- src/Microsoft.ML.Core/Utilities/MemUtils.cs | 27 + src/Microsoft.ML.Core/Utilities/MinWaiter.cs | 3 +- src/Microsoft.ML.Core/Utilities/NormStr.cs | 3 +- src/Microsoft.ML.Core/Utilities/ObjectPool.cs | 8 +- .../Utilities/OrderedWaiter.cs | 3 +- src/Microsoft.ML.Core/Utilities/PathUtils.cs | 2 +- .../Utilities/PlatformUtils.cs | 3 +- .../Utilities/ReservoirSampler.cs | 9 +- .../Utilities/ResourceManagerUtils.cs | 5 +- src/Microsoft.ML.Core/Utilities/Stats.cs | 3 +- src/Microsoft.ML.Core/Utilities/Stream.cs | 5 +- .../Utilities/SubsetStream.cs | 3 +- .../Utilities/SummaryStatistics.cs | 8 +- .../Utilities/SupervisedBinFinder.cs | 3 +- .../Utilities/TextReaderStream.cs | 3 +- .../Utilities/ThreadUtils.cs | 8 +- src/Microsoft.ML.Core/Utilities/Tree.cs | 3 +- src/Microsoft.ML.Core/Utilities/Utils.cs | 80 +- .../Utilities/VBufferUtils.cs | 653 +- src/Microsoft.ML.CpuMath/AlignedArray.cs | 26 +- src/Microsoft.ML.CpuMath/AlignedMatrix.cs | 23 +- src/Microsoft.ML.CpuMath/AssemblyInfo.cs | 18 +- src/Microsoft.ML.CpuMath/AvxIntrinsics.cs | 18 - .../CpuAligenedMathUtils.cs | 3 +- .../CpuMathUtils.netcoreapp.cs | 5 +- .../CpuMathUtils.netstandard.cs | 5 +- src/Microsoft.ML.CpuMath/EigenUtils.cs | 3 +- src/Microsoft.ML.CpuMath/ICpuBuffer.cs | 12 +- src/Microsoft.ML.CpuMath/IntUtils.cs | 3 +- .../Microsoft.ML.CpuMath.csproj | 14 +- .../ProbabilityFunctions.cs | 3 +- src/Microsoft.ML.CpuMath/Sse.cs | 6 +- src/Microsoft.ML.CpuMath/SseIntrinsics.cs | 23 +- src/Microsoft.ML.CpuMath/Thunk.cs | 2 +- .../Commands/CrossValidationCommand.cs | 3 +- src/Microsoft.ML.Data/Commands/DataCommand.cs | 6 +- .../Commands/EvaluateCommand.cs | 2 +- .../Commands/SaveDataCommand.cs | 6 +- .../Commands/SavePredictorCommand.cs | 2 +- .../Commands/ScoreCommand.cs | 5 +- .../Commands/ShowSchemaCommand.cs | 23 +- src/Microsoft.ML.Data/Commands/TestCommand.cs | 8 +- .../Commands/TrainCommand.cs | 38 +- .../Commands/TrainTestCommand.cs | 31 +- .../Commands/TypeInfoCommand.cs | 2 +- src/Microsoft.ML.Data/Data/BufferBuilder.cs | 77 +- src/Microsoft.ML.Data/Data/DataViewUtils.cs | 2 +- src/Microsoft.ML.Data/Data/IColumn.cs | 12 +- src/Microsoft.ML.Data/Data/RowCursorUtils.cs | 25 +- .../DataLoadSave/Binary/BinaryLoader.cs | 8 +- .../Binary/BinaryLoaderSaverCatalog.cs | 65 - .../DataLoadSave/Binary/Codecs.cs | 20 +- .../DataLoadSave/Binary/Zlib/Zlib.cs | 2 - .../DataLoadSave/CompositeDataLoader.cs | 4 +- .../DataLoadSave/DataLoadSaveCatalog.cs | 20 + .../DataLoadSave/DataOperations.cs | 93 - .../DataLoadSave/EstimatorChain.cs | 47 +- .../DataLoadSave/EstimatorExtensions.cs | 17 - .../DataLoadSave/PartitionedFileLoader.cs | 2 +- .../DataLoadSave/Text/TextLoader.cs | 2 +- .../DataLoadSave/Text/TextLoaderParser.cs | 18 +- .../Text/TextLoaderSaverCatalog.cs | 8 +- .../DataLoadSave/Text/TextSaver.cs | 25 +- .../DataLoadSave/Transpose/TransposeLoader.cs | 2 +- .../DataView/AppendRowsDataView.cs | 6 +- .../DataView/ArrayDataViewBuilder.cs | 2 +- .../DataView/CacheDataView.cs | 40 +- .../DataView/CompositeSchema.cs | 2 +- .../DataView/EmptyDataView.cs | 2 +- .../DataView/OpaqueDataView.cs | 4 +- .../DataView/RowToRowMapperTransform.cs | 8 +- src/Microsoft.ML.Data/DataView/Transposer.cs | 88 +- src/Microsoft.ML.Data/DataView/ZipDataView.cs | 4 +- .../Depricated/Instances/HeaderSchema.cs | 18 +- .../Vector/GenericSpanSortHelper.cs | 269 - .../Depricated/Vector/VBufferMathUtils.cs | 221 +- .../Depricated/Vector/VectorUtils.cs | 181 +- src/Microsoft.ML.Data/Dirty/IniFileUtils.cs | 3 +- .../Dirty/PredictorInterfaces.cs | 5 + src/Microsoft.ML.Data/EntryPoints/Cache.cs | 3 - .../EntryPoints/InputBase.cs | 3 +- .../EntryPoints/PredictorModel.cs | 2 +- .../EntryPoints/SchemaManipulation.cs | 16 +- .../EntryPoints/ScoreColumnSelector.cs | 4 +- .../Evaluators/AnomalyDetectionEvaluator.cs | 8 +- .../Evaluators/AucAggregator.cs | 16 +- .../Evaluators/BinaryClassifierEvaluator.cs | 8 +- .../Evaluators/ClusteringEvaluator.cs | 24 +- .../Evaluators/EvaluatorBase.cs | 8 +- .../Evaluators/EvaluatorUtils.cs | 111 +- .../Evaluators/MamlEvaluator.cs | 4 +- .../MultiOutputRegressionEvaluator.cs | 31 +- .../MulticlassClassifierEvaluator.cs | 49 +- .../Evaluators/QuantileRegressionEvaluator.cs | 62 +- .../Evaluators/RankerEvaluator.cs | 42 +- src/Microsoft.ML.Data/MLContext.cs | 4 +- src/Microsoft.ML.Data/Model/ModelHeader.cs | 2 +- .../Model/ModelLoadContext.cs | 7 +- .../Model/ModelSaveContext.cs | 22 +- .../Model/Onnx/ICanSaveOnnx.cs | 18 +- .../Model/Onnx/OnnxContext.cs | 6 +- .../Model/Pfa/BoundPfaContext.cs | 3 +- .../Model/Pfa/ICanSavePfa.cs | 19 +- src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs | 2 +- src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs | 3 +- src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs | 3 +- .../Model/Pfa/SavePfaCommand.cs | 2 +- src/Microsoft.ML.Data/Model/Repository.cs | 45 +- .../Prediction/Calibrator.cs | 38 +- .../Properties/AssemblyInfo.cs | 34 +- .../Scorers/BinaryClassifierScorer.cs | 4 +- .../Scorers/GenericScorer.cs | 8 +- .../Scorers/MultiClassClassifierScorer.cs | 12 +- .../Scorers/PredictedLabelScorerBase.cs | 13 +- .../Scorers/RowToRowScorerBase.cs | 2 +- .../Scorers/SchemaBindablePredictorWrapper.cs | 40 +- .../DataLoadSaveOperationsExtensions.cs | 2 +- .../StaticPipe/Reconciler.cs | 2 +- .../StaticPipe/StaticPipeUtils.cs | 4 +- .../StaticPipe/TrainerEstimatorReconciler.cs | 6 +- src/Microsoft.ML.Data/TrainContext.cs | 26 +- src/Microsoft.ML.Data/Training/TrainerBase.cs | 8 +- .../Training/TrainerEstimatorBase.cs | 13 +- .../Transforms/BindingsWrappedRowCursor.cs | 2 +- .../Transforms/CatalogUtils.cs | 2 +- .../Transforms/CategoricalCatalog.cs | 6 +- .../Transforms/ColumnBindingsBase.cs | 8 +- .../ColumnConcatenatingEstimator.cs | 2 +- ...atingTransformer.cs => ConcatTransform.cs} | 162 +- .../Transforms/ConversionsCatalog.cs | 22 +- ...{TypeConverting.cs => ConvertTransform.cs} | 72 +- ...umnsCopying.cs => CopyColumnsTransform.cs} | 48 +- .../Transforms/DropSlotsTransform.cs | 2 +- .../Transforms/ExtensionsCatalog.cs | 12 +- .../Transforms/GenerateNumberTransform.cs | 2 +- .../{Hashing.cs => HashTransform.cs} | 170 +- .../Transforms/InvertHashUtils.cs | 4 +- .../{KeyToValue.cs => KeyToValueTransform.cs} | 135 +- ...KeyToVector.cs => KeyToVectorTransform.cs} | 107 +- .../Transforms/LabelConvertTransform.cs | 2 +- .../Transforms/LabelIndicatorTransform.cs | 2 +- src/Microsoft.ML.Data/Transforms/NAFilter.cs | 2 +- .../Transforms/NopTransform.cs | 4 +- .../Transforms/NormalizeColumn.cs | 82 +- .../Transforms/NormalizeColumnDbl.cs | 26 +- .../Transforms/NormalizeColumnSng.cs | 99 +- .../Transforms/NormalizeUtils.cs | 2 - .../Transforms/Normalizer.cs | 204 +- .../Transforms/NormalizerCatalog.cs | 18 +- .../Transforms/NormalizerStaticExtensions.cs | 11 +- .../Transforms/OneToOneTransformerBase.cs | 95 +- .../Transforms/PerGroupTransformBase.cs | 4 +- .../Transforms/RangeFilter.cs | 11 +- .../Transforms/RowToRowTransformerBase.cs | 114 - ...Selecting.cs => SelectColumnsTransform.cs} | 103 +- ...lingTransformer.cs => ShuffleTransform.cs} | 24 +- .../Transforms/SkipTakeFilter.cs | 4 +- ...MappingTransformer.cs => TermTransform.cs} | 54 +- ...ransformerImpl.cs => TermTransformImpl.cs} | 113 +- ...ansformer.cs => TrainAndScoreTransform.cs} | 25 +- .../Transforms/TransformBase.cs | 64 +- .../Transforms/ValueToKeyMappingEstimator.cs | 34 +- src/Microsoft.ML.Data/Transforms/doc.xml | 2 + .../Utilities/SlotDropper.cs | 42 +- .../Utilities/StreamUtils.cs | 3 +- src/Microsoft.ML.Data/Utilities/TimerScope.cs | 7 +- .../{SequencePool.cs => IntSequencePool.cs} | 9 +- .../Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs | 6 +- src/Microsoft.ML.Ensemble/EnsembleUtils.cs | 38 +- .../EntryPoints/Ensemble.cs | 2 +- .../OutputCombiners/BaseMultiAverager.cs | 11 +- .../OutputCombiners/BaseMultiCombiner.cs | 8 +- .../OutputCombiners/BaseScalarStacking.cs | 10 +- .../OutputCombiners/BaseStacking.cs | 12 +- .../OutputCombiners/MultiMedian.cs | 8 +- .../OutputCombiners/MultiStacking.cs | 13 +- .../OutputCombiners/MultiVoting.cs | 16 +- .../OutputCombiners/RegressionStacking.cs | 5 +- .../OutputCombiners/Stacking.cs | 5 +- .../SubsetSelector/BootstrapSelector.cs | 2 +- .../Trainer/Binary/EnsembleTrainer.cs | 3 +- .../Trainer/EnsembleTrainerBase.cs | 2 +- .../Trainer/IModelCombiner.cs | 2 - .../MulticlassDataPartitionEnsembleTrainer.cs | 5 +- .../Regression/RegressionEnsembleTrainer.cs | 3 +- .../BinFile/BinFinder.cs | 38 +- src/Microsoft.ML.FastTree/BoostingFastTree.cs | 4 +- src/Microsoft.ML.FastTree/Dataset/Dataset.cs | 6 +- src/Microsoft.ML.FastTree/FastTree.cs | 106 +- .../FastTreeArguments.cs | 14 +- .../FastTreeClassification.cs | 13 +- src/Microsoft.ML.FastTree/FastTreeRanking.cs | 20 +- .../FastTreeRegression.cs | 13 +- src/Microsoft.ML.FastTree/FastTreeTweedie.cs | 13 +- .../GamClassification.cs | 18 +- src/Microsoft.ML.FastTree/GamRegression.cs | 18 +- src/Microsoft.ML.FastTree/GamTrainer.cs | 24 +- .../Properties/AssemblyInfo.cs | 10 - src/Microsoft.ML.FastTree/RandomForest.cs | 4 +- .../RandomForestClassification.cs | 13 +- .../RandomForestRegression.cs | 25 +- .../SumupPerformanceCommand.cs | 2 +- .../TreeEnsemble/RegressionTree.cs | 9 +- .../TreeEnsembleFeaturizer.cs | 77 +- .../TreeTrainersCatalog.cs | 158 +- .../TreeTrainersStatic.cs | 32 +- .../ComputeLRTrainingStdThroughHal.cs | 92 - .../HalLearnersCatalog.cs | 20 +- .../OlsLinearRegression.cs | 50 +- .../ProjectionCatalog.cs | 47 - .../SymSgdClassificationTrainer.cs | 23 +- .../TransformsStatic.cs | 80 - .../VectorWhitening.cs | 821 - .../ImageGrayscaleTransform.cs | 6 +- .../ImageLoaderTransform.cs | 6 +- .../ImagePixelExtractorTransform.cs | 32 +- .../ImageResizerTransform.cs | 6 +- .../KMeansCatalog.cs | 2 +- .../KMeansPlusPlusTrainer.cs | 44 +- .../KMeansPredictor.cs | 18 +- .../AssemblyRegistration.cs | 4 +- src/Microsoft.ML.Legacy/CSharpApi.cs | 300 +- src/Microsoft.ML.Legacy/LearningPipeline.cs | 120 +- .../LearningPipelineDebugProxy.cs | 5 +- .../Microsoft.ML.Legacy.csproj | 6 +- .../Models/BinaryClassificationEvaluator.cs | 70 +- .../Models/ClassificationEvaluator.cs | 70 +- .../Models/ClusterEvaluator.cs | 58 +- .../Models/ConfusionMatrix.cs | 5 +- .../Models/CrossValidator.cs | 2 +- .../Models/OneVersusAll.cs | 30 +- .../Models/OnnxConverter.cs | 16 +- .../Models/RegressionEvaluator.cs | 60 +- .../Models/TrainTestEvaluator.cs | 2 +- src/Microsoft.ML.Legacy/PredictionModel.cs | 30 +- .../Properties/AssemblyInfo.cs | 6 +- .../Runtime/EntryPoints/CVSplit.cs | 4 +- .../CodeGen/EntryPointGeneratorBase.cs | 29 +- .../EntryPoints/CodeGen/GeneratorBase.cs | 15 +- .../EntryPoints/CodeGen/ImplGeneratorBase.cs | 23 +- .../EntryPoints/CodeGen/LearnerGenerators.cs | 17 +- .../EntryPoints/CodeGen/ModuleGenerator.cs | 5 +- .../CodeGen/TransformGenerators.cs | 37 +- .../Runtime/EntryPoints/FeatureCombiner.cs | 55 +- .../JsonUtils/ExecuteGraphCommand.cs | 2 +- .../EntryPoints/JsonUtils/GraphRunner.cs | 2 +- .../Runtime/EntryPoints/TrainTestSplit.cs | 10 +- .../Internal/Tools/CSharpApiGenerator.cs | 91 +- .../Internal/Tools/CSharpGeneratorUtils.cs | 19 +- .../LightGbmBinaryTrainer.cs | 12 +- src/Microsoft.ML.LightGBM/LightGbmCatalog.cs | 46 +- .../LightGbmMulticlassTrainer.cs | 26 +- .../LightGbmRankingTrainer.cs | 16 +- .../LightGbmRegressionTrainer.cs | 10 +- src/Microsoft.ML.LightGBM/LightGbmStatic.cs | 4 +- .../LightGbmTrainerBase.cs | 6 +- src/Microsoft.ML.Maml/ChainCommand.cs | 3 +- src/Microsoft.ML.Maml/HelpCommand.cs | 26 +- src/Microsoft.ML.Maml/MAML.cs | 4 +- .../Microsoft.ML.Maml.csproj | 4 + .../Properties/AssemblyInfo.cs | 10 +- src/Microsoft.ML.Maml/VersionCommand.cs | 2 +- src/Microsoft.ML.Onnx/AssemblyInfo.cs | 10 +- src/Microsoft.ML.Onnx/SaveOnnxCommand.cs | 2 +- src/Microsoft.ML.OnnxTransform/OnnxCatalog.cs | 10 +- .../OnnxTransform.cs | 439 +- src/Microsoft.ML.OnnxTransform/OnnxUtils.cs | 158 +- src/Microsoft.ML.PCA/PcaTrainer.cs | 58 +- src/Microsoft.ML.PCA/PcaTransform.cs | 15 +- src/Microsoft.ML.Parquet/ParquetLoader.cs | 2 +- .../AutoInference.cs | 2 +- .../AutoMlUtils.cs | 10 +- .../DatasetFeaturesInference.cs | 28 +- .../InferenceUtils.cs | 5 +- .../Interfaces/IPipelineNode.cs | 11 +- .../Microsoft.ML.PipelineInference.csproj | 2 +- .../Properties/AssemblyInfo.cs | 10 - .../RecipeInference.cs | 3 +- .../TextFileContents.cs | 2 +- .../TransformInference.cs | 34 +- .../MatrixFactorizationStatic.cs | 2 +- .../MatrixFactorizationTrainer.cs | 68 +- .../SafeTrainingAndModelBuffer.cs | 141 +- .../Microsoft.ML.ResultProcessor.csproj | 4 + .../ResultProcessor.cs | 6 - .../Microsoft.ML.SamplesUtils.csproj | 4 - .../SamplesDatasetUtils.cs | 107 +- .../AssemblyInfo.cs | 1 - .../FactorizationMachineCatalog.cs | 13 +- .../FactorizationMachineInterface.cs | 1 + .../FactorizationMachineStatic.cs | 2 +- .../FactorizationMachineTrainer.cs | 16 +- .../Microsoft.ML.StandardLearners.csproj | 6 +- .../Optimizer/DifferentiableFunction.cs | 10 +- .../Optimizer/LineSearch.cs | 2 +- .../Optimizer/OptimizationMonitor.cs | 2 +- .../Optimizer/Optimizer.cs | 2 +- .../Optimizer/SgdOptimizer.cs | 60 +- .../Standard/LinearPredictor.cs | 42 +- .../Standard/LinearPredictorUtils.cs | 4 +- .../LogisticRegression/LbfgsCatalog.cs | 123 + .../LogisticRegression/LbfgsPredictorBase.cs | 16 +- .../LogisticRegression/LbfgsStatic.cs | 6 +- .../LogisticRegression/LogisticRegression.cs | 184 +- .../MulticlassLogisticRegression.cs | 107 +- .../Standard/ModelStatistics.cs | 92 +- .../MultiClass/MetaMulticlassTrainer.cs | 24 +- .../MultiClass/MultiClassNaiveBayesTrainer.cs | 37 +- .../Standard/MultiClass/Ova.cs | 46 +- .../Standard/MultiClass/Pkpd.cs | 25 +- .../Standard/Online/AveragedPerceptron.cs | 12 +- .../Standard/Online/LinearSvm.cs | 6 +- .../Standard/Online/OnlineGradientDescent.cs | 4 +- .../Standard/Online/OnlineLearnerCatalog.cs | 97 + .../Standard/Online/OnlineLearnerStatic.cs | 2 +- .../Standard/Online/OnlineLinear.cs | 12 +- .../PoissonRegression/PoissonRegression.cs | 19 +- .../Standard/SdcaBinary.cs | 41 +- .../Standard/SdcaCatalog.cs | 126 + .../Standard/SdcaMultiClass.cs | 42 +- .../Standard/SdcaRegression.cs | 12 +- .../Standard/SdcaStatic.cs | 12 +- .../Standard/SgdCatalog.cs | 46 + .../Standard/SgdStatic.cs | 2 +- .../Standard/Simple/SimpleTrainers.cs | 16 +- .../Standard/StochasticTrainerBase.cs | 6 +- .../StandardLearnersCatalog.cs | 314 - .../Algorithms/SmacSweeper.cs | 13 +- .../Algorithms/SweeperProbabilityUtils.cs | 10 +- src/Microsoft.ML.Sweeper/AsyncSweeper.cs | 1 + src/Microsoft.ML.Sweeper/ConfigRunner.cs | 5 +- .../Microsoft.ML.Sweeper.csproj | 5 + src/Microsoft.ML.Sweeper/Parameters.cs | 1 + .../Properties/AssemblyInfo.cs | 9 - src/Microsoft.ML.Sweeper/SweepCommand.cs | 8 +- .../SweepResultEvaluator.cs | 1 + src/Microsoft.ML.Sweeper/SynthConfigRunner.cs | 3 + .../TensorFlow/TensorflowUtils.cs | 20 +- .../TensorflowTransform.cs | 194 +- ...AdaptiveSingularSpectrumSequenceModeler.cs | 83 +- .../ExponentialAverageTransform.cs | 8 +- ...enceModelerBase.cs => ISequenceModeler.cs} | 25 +- .../IidAnomalyDetectionBase.cs | 6 +- .../IidChangePointDetector.cs | 14 +- .../IidSpikeDetector.cs | 14 +- .../MovingAverageTransform.cs | 12 +- .../PValueTransform.cs | 8 +- .../PercentileThresholdTransform.cs | 12 +- ...SequentialAnomalyDetectionTransformBase.cs | 91 +- .../SequentialTransformBase.cs | 41 +- .../SequentialTransformerBase.cs | 42 +- .../SlidingWindowTransformBase.cs | 30 +- .../SsaAnomalyDetectionBase.cs | 14 +- .../SsaChangePointDetector.cs | 14 +- .../SsaSpikeDetector.cs | 14 +- ...sformer.cs => BootstrapSampleTransform.cs} | 36 +- .../CategoricalCatalog.cs | 10 +- ...sformer.cs => CategoricalHashTransform.cs} | 64 +- ...Transformer.cs => CategoricalTransform.cs} | 86 +- ...teTransformer.cs => CompositeTransform.cs} | 8 +- ...ransformer.cs => CountFeatureSelection.cs} | 14 +- .../EntryPoints/SelectFeatures.cs | 8 +- .../EntryPoints/TextAnalytics.cs | 74 +- .../ExtensionsCatalog.cs | 8 +- src/Microsoft.ML.Transforms/GcnTransform.cs | 988 +- src/Microsoft.ML.Transforms/GroupTransform.cs | 12 +- ...iningTransform.cs => HashJoinTransform.cs} | 65 +- ...pping.cs => KeyToBinaryVectorTransform.cs} | 68 +- .../LearnerFeatureSelection.cs | 40 +- .../Microsoft.ML.Transforms.csproj | 1 - .../MissingValueDroppingTransformer.cs | 390 - .../MissingValueIndicatorTransform.cs | 72 +- .../MutualInformationFeatureSelection.cs | 120 +- .../NADropTransform.cs | 339 + ...ingTransformer.cs => NAHandleTransform.cs} | 38 +- src/Microsoft.ML.Transforms/NAHandling.cs | 43 +- ...Transformer.cs => NAIndicatorTransform.cs} | 101 +- ...alueReplacing.cs => NAReplaceTransform.cs} | 161 +- ...lueReplacingUtils.cs => NAReplaceUtils.cs} | 15 +- .../OptionalColumnTransform.cs | 8 +- .../ProjectionCatalog.cs | 70 +- ...mFourierFeaturizing.cs => RffTransform.cs} | 88 +- ...pTransformer.cs => TermLookupTransform.cs} | 30 +- ...Characters.cs => CharTokenizeTransform.cs} | 134 +- .../Text/LdaSingleBox.cs | 29 +- .../Text/LdaStaticExtensions.cs | 174 - .../Text/LdaTransform.cs | 1103 +- ...ngTransformer.cs => NgramHashTransform.cs} | 30 +- .../Text/NgramTransform.cs | 1044 +- .../Text/NgramUtils.cs | 8 +- ...sform.cs => SentimentAnalyzerTransform.cs} | 28 +- ...former.cs => StopWordsRemoverTransform.cs} | 74 +- ...malizing.cs => TextNormalizerTransform.cs} | 15 +- .../Text/TextStaticExtensions.cs | 77 +- ...aturizingEstimator.cs => TextTransform.cs} | 62 +- .../Text/WordBagTransform.cs | 147 +- ...xtractor.cs => WordEmbeddingsTransform.cs} | 249 +- ...ngTransform.cs => WordHashBagTransform.cs} | 71 +- ...Tokenizing.cs => WordTokenizeTransform.cs} | 74 +- .../Text/WrappedTextTransformers.cs | 168 +- src/Microsoft.ML.Transforms/TextCatalog.cs | 147 +- .../TransformsStatic.cs | 120 - .../UngroupTransform.cs | 17 +- .../WhiteningTransform.cs | 640 + .../WrappedFeatureSelectionTransformers.cs | 16 +- .../WrappedGcnTransformers.cs | 223 + .../WrappedWhiteningTransformer.cs | 167 + src/Microsoft.ML.Transforms/doc.xml | 9 +- .../CommandTrainingLrWithStats-summary.txt | 12 - .../Common/EntryPoints/core_ep-list.tsv | 48 +- .../Common/EntryPoints/core_manifest.json | 22 +- .../EntryPoints/ensemble-model0-stats.txt | 12 +- .../EntryPoints/ensemble-model2-stats.txt | 12 +- .../ensemble-summary-key-value-pairs.txt | 20 - .../Common/EntryPoints/ensemble-summary.txt | 30 - .../Common/EntryPoints/lr-stats.txt | 12 +- ...ForestRegression-TrainTest-housing-out.txt | 13 +- ...eRegressorTester-TrainTest-housing-out.txt | 13 +- .../FastRank-TrainTest-breast-cancer-out.txt | 14 +- .../Common/NormalizerEstimator/gcnNorm.tsv | 9 - .../Common/NormalizerEstimator/lpNorm.tsv | 9 - .../Common/NormalizerEstimator/whitened.tsv | 9 - .../Onnx/Cluster/BreastCancer/Kmeans.json | 40 +- .../Onnx/Cluster/BreastCancer/Kmeans.onnx | Bin 0 -> 867 bytes .../SavePipeCustomStopwordsRemover-Data.txt | 6 - .../SavePipe/SavePipeDropColumns-Data.txt | 32569 ---------------- .../SavePipe/SavePipeDropColumns-Schema.txt | 163 - .../SavePipe/SavePipeLabelParsers-Schema.txt | 2 +- .../SavePipe/SavePipeLabelParsers1-Schema.txt | 2 +- .../SavePipe/SavePipeLabelParsers2-Schema.txt | 2 +- .../SavePipe/SavePipeLabelParsers3-Schema.txt | 2 +- .../SavePipe/SavePipeLabelParsers4-Schema.txt | 4 +- .../SavePipe/SavePipeLabelParsers5-Schema.txt | 2 +- .../Common/SavePipe/SavePipeNgram-Schema.txt | 12 +- .../SavePipeNgramHash-Convert-Schema.txt | 2 +- .../SavePipe/SavePipeNgramHash-Schema.txt | 12 +- .../SavePipe/SavePipeNgramSparse-Schema.txt | 2 +- .../SavePipeTermDictionaryNgram-Schema.txt | 2 +- ...avePipeTermDictionaryNgramTerms-Schema.txt | 2 +- .../SavePipeTokenizerAndStopWords-Data.txt | 16 - .../SavePipeTokenizerAndStopWords-Schema.txt | 15 - .../SavePipe/SavePipeWordHash-Schema.txt | 2 +- test/BaselineOutput/README.md | 3 - ...sification-TrainTest-breast-cancer-out.txt | 14 +- ...Tree-TrainTest-Census-Cat-Only.Cat-out.txt | 13 +- .../FastTree-TrainTest-Census.Cat-out.txt | 13 +- ...Tree-TrainTest-breast-cancer-group-out.txt | 15 +- .../FastTree-TrainTest-breast-cancer-out.txt | 14 +- ...astTreeBsr-TrainTest-breast-cancer-out.txt | 14 +- ...ical-TrainTest-Census-Cat-Only.Cat-out.txt | 13 +- ...eeCategorical-TrainTest-Census.Cat-out.txt | 13 +- ...Disk-TrainTest-Census-Cat-Only.Cat-out.txt | 11 +- ...tegoricalDisk-TrainTest-Census.Cat-out.txt | 11 +- ...Disk-TrainTest-Census-Cat-Only.Cat-out.txt | 11 +- .../FastTreeDisk-TrainTest-Census.Cat-out.txt | 11 +- ...stTreeDisk-TrainTest-breast-cancer-out.txt | 12 +- ...stTreeDrop-TrainTest-breast-cancer-out.txt | 14 +- ...ighMinDocs-TrainTest-breast-cancer-out.txt | 14 +- .../NormalizerEstimator/normalized.tsv | 0 test/BaselineOutput/SingleDebug/PCA/pca.tsv | 8 +- .../Text}/lpnorm_gcnorm_whitened.tsv | 0 ...estClassification-CV-breast-cancer-out.txt | 4 +- ...sification-TrainTest-breast-cancer-out.txt | 16 +- ...Tree-TrainTest-Census-Cat-Only.Cat-out.txt | 15 +- .../FastTree-TrainTest-Census.Cat-out.txt | 15 +- ...Tree-TrainTest-breast-cancer-group-out.txt | 17 +- .../FastTree-TrainTest-breast-cancer-out.txt | 16 +- ...astTreeBsr-TrainTest-breast-cancer-out.txt | 16 +- ...ical-TrainTest-Census-Cat-Only.Cat-out.txt | 15 +- ...eeCategorical-TrainTest-Census.Cat-out.txt | 15 +- ...Disk-TrainTest-Census-Cat-Only.Cat-out.txt | 13 +- ...tegoricalDisk-TrainTest-Census.Cat-out.txt | 13 +- ...Disk-TrainTest-Census-Cat-Only.Cat-out.txt | 13 +- .../FastTreeDisk-TrainTest-Census.Cat-out.txt | 13 +- ...stTreeDisk-TrainTest-breast-cancer-out.txt | 14 +- ...stTreeDrop-TrainTest-breast-cancer-out.txt | 16 +- ...ighMinDocs-TrainTest-breast-cancer-out.txt | 16 +- .../NormalizerEstimator/normalized.tsv | 175 + test/BaselineOutput/SingleRelease/PCA/pca.tsv | 8 +- .../Text/lpnorm_gcnorm_whitened.tsv | 10 + .../Harness/Configs.cs | 18 +- .../Harness/ProjectGenerator.cs | 2 +- test/Microsoft.ML.Benchmarks/HashBench.cs | 4 +- .../Helpers/EnvironmentFactory.cs | 21 +- .../KMeansAndLogisticRegressionBench.cs | 56 +- .../Microsoft.ML.Benchmarks.csproj | 1 - .../Numeric/Ranking.cs | 26 +- .../PredictionEngineBench.cs | 60 +- test/Microsoft.ML.Benchmarks/README.md | 6 +- ...sticDualCoordinateAscentClassifierBench.cs | 54 +- .../Text/MultiClassClassification.cs | 40 +- .../Code/ContractsCheckTest.cs | 31 +- .../Helpers/CodeFixVerifier.cs | 5 - .../Microsoft.ML.CodeAnalyzer.Tests.csproj | 14 +- .../Resources/ContractsCheckResource.cs | 12 - .../UnitTests/TestCSharpApi.cs | 1524 +- .../UnitTests/TestContracts.cs | 4 +- .../UnitTests/TestEarlyStoppingCriteria.cs | 2 +- .../UnitTests/TestEntryPoints.cs | 66 +- .../UnitTests/TestHosts.cs | 2 +- .../UnitTests/TestVectorUtils.cs | 62 - .../UnitTests.cs | 12 +- .../GenerateSweepCandidatesCommand.cs | 11 +- .../InferRecipesCommand.cs | 4 +- .../InferSchemaCommand.cs | 4 +- .../Microsoft.ML.InferenceTesting.csproj | 22 + .../Microsoft.ML.OnnxTransformTest.csproj | 4 +- .../OnnxTransformTests.cs | 169 +- .../CmdLine/CmdIndenterTest.cs | 3 +- .../CmdLine/CmdLine.cs | 25 +- .../CmdLine/CmdLineReverseTest.cs | 2 +- .../Microsoft.ML.Predictor.Tests.csproj | 1 + .../TestAutoInference.cs | 314 +- .../TestDatasetInference.cs | 142 +- .../TestPipelineSweeper.cs | 62 +- .../TestTransposer.cs | 2 +- .../ImageAnalyticsTests.cs | 3 +- .../Microsoft.ML.StaticPipelineTesting.csproj | 1 - .../StaticPipeTests.cs | 74 +- .../Training.cs | 78 +- .../Microsoft.ML.Sweeper.Tests/SweeperTest.cs | 34 +- .../Microsoft.ML.Sweeper.Tests/TestSweeper.cs | 806 +- .../BaseTestBaseline.cs | 80 +- .../BaseTestPredictorsMaml.cs | 4 +- .../DataPipe/TestDataPipe.cs | 172 +- .../DataPipe/TestDataPipeBase.cs | 32 +- .../EnvironmentExtensions.cs | 2 +- .../Microsoft.ML.TestFramework/ModelHelper.cs | 3 +- .../TestCommandBase.cs | 70 +- .../TestSparseDataView.cs | 68 +- test/Microsoft.ML.Tests/CachingTests.cs | 82 - .../CollectionDataSourceTests.cs | 231 +- test/Microsoft.ML.Tests/ImagesTests.cs | 1182 +- .../LearningPipelineTests.cs | 2 +- test/Microsoft.ML.Tests/OnnxTests.cs | 140 +- test/Microsoft.ML.Tests/RangeFilterTests.cs | 40 - .../Api/CookbookSamples/CookbookSamples.cs | 10 +- .../CookbookSamplesDynamicApi.cs | 111 +- .../Api/Estimators/CrossValidation.cs | 6 +- .../Estimators/DecomposableTrainAndPredict.cs | 4 +- .../Scenarios/Api/Estimators/Evaluation.cs | 2 +- .../Scenarios/Api/Estimators/Extensibility.cs | 4 +- .../Api/Estimators/FileBasedSavingOfData.cs | 2 +- .../Api/Estimators/IntrospectiveTraining.cs | 2 +- .../Api/Estimators/Metacomponents.cs | 4 +- .../Api/Estimators/MultithreadedPrediction.cs | 2 +- .../Estimators/ReconfigurablePrediction.cs | 2 +- .../Api/Estimators/SimpleTrainAndPredict.cs | 2 +- .../Estimators/TrainSaveModelAndPredict.cs | 2 +- .../Estimators/TrainWithInitialPredictor.cs | 6 +- .../Api/Estimators/TrainWithValidationSet.cs | 2 +- .../Scenarios/Api/TestApi.cs | 182 +- test/Microsoft.ML.Tests/Scenarios/OvaTest.cs | 148 - .../Scenarios/SentimentPredictionTests.cs | 3 +- .../Scenarios/TensorflowTests.cs | 1 + .../IrisPlantClassificationTests.cs | 114 +- .../SentimentPredictionTests.cs | 181 +- .../TensorflowTests.cs | 1128 +- .../TensorFlowEstimatorTests.cs | 143 +- test/Microsoft.ML.Tests/TermEstimatorTests.cs | 36 +- test/Microsoft.ML.Tests/TextLoaderTests.cs | 234 +- .../TrainerEstimators/FAFMEstimator.cs | 2 +- .../TrainerEstimators/LbfgsTests.cs | 43 +- .../MatrixFactorizationTests.cs | 123 +- .../TrainerEstimators/MetalinearEstimators.cs | 10 +- .../OlsLinearRegressionTests.cs | 2 +- .../TrainerEstimators/OnlineLinearTests.cs | 1 - .../TrainerEstimators/SdcaTests.cs | 6 +- .../SymSgdClassificationTests.cs | 8 +- .../TrainerEstimators/TrainerEstimators.cs | 8 +- .../TrainerEstimators/TreeEstimators.cs | 2 +- .../Transformers/CategoricalHashTests.cs | 30 +- .../Transformers/CategoricalTests.cs | 48 +- .../Transformers/CharTokenizeTests.cs | 4 +- .../Transformers/ConcatTests.cs | 10 +- .../Transformers/ConvertTests.cs | 44 +- .../Transformers/CopyColumnEstimatorTests.cs | 151 +- .../Transformers/CustomMappingTests.cs | 64 +- .../Transformers/FeatureSelectionTests.cs | 4 +- .../Transformers/HashTests.cs | 46 +- .../KeyToBinaryVectorEstimatorTest.cs | 42 +- .../Transformers/KeyToValueTests.cs | 18 +- .../Transformers/KeyToVectorEstimatorTests.cs | 60 +- .../Transformers/LineParserTests.cs | 40 - .../Transformers/NAReplaceTests.cs | 26 +- .../Transformers/NormalizerTests.cs | 329 +- .../Transformers/PcaTests.cs | 7 +- .../Transformers/RffTests.cs | 8 +- .../Transformers/SelectColumnsTests.cs | 36 +- .../Transformers/TextFeaturizerTests.cs | 78 +- .../Transformers/WordTokenizeTests.cs | 8 +- .../TimeSeriesDirectApi.cs | 163 +- .../InstanceInitializerAnalyzer.cs | 2 +- 694 files changed, 16071 insertions(+), 51670 deletions(-) delete mode 100644 docs/samples/Microsoft.ML.Samples/Dynamic/IidChangePointDetectorTransform.cs delete mode 100644 docs/samples/Microsoft.ML.Samples/Dynamic/IidSpikeDetectorTransform.cs rename docs/samples/Microsoft.ML.Samples/Dynamic/{Normalizer.cs => MinMaxNormalizer.cs} (68%) delete mode 100644 docs/samples/Microsoft.ML.Samples/Dynamic/NgramExtraction.cs delete mode 100644 docs/samples/Microsoft.ML.Samples/Dynamic/ProjectionTransforms.cs delete mode 100644 docs/samples/Microsoft.ML.Samples/Dynamic/SsaChangePointDetectorTransform.cs delete mode 100644 docs/samples/Microsoft.ML.Samples/Dynamic/SsaSpikeDetectorTransform.cs create mode 100644 docs/samples/Microsoft.ML.Samples/Dynamic/Timeseries.cs rename src/{Microsoft.ML.Core/ComponentModel => Common}/AssemblyLoadingUtils.cs (97%) delete mode 100644 src/Microsoft.ML.Core/CommandLine/ArgumentType.cs delete mode 100644 src/Microsoft.ML.Core/CommandLine/DefaultArgumentAttribute.cs delete mode 100644 src/Microsoft.ML.Core/CommandLine/EnumValueDisplayAttribute.cs delete mode 100644 src/Microsoft.ML.Core/CommandLine/HideEnumValueAttribute.cs rename src/Microsoft.ML.Core/CommandLine/{SpecialPurpose.cs => Utils.cs} (93%) rename src/Microsoft.ML.Core/{EntryPoints => Data}/IMlState.cs (98%) rename src/Microsoft.ML.Core/{EntryPoints => Data}/IPredictorModel.cs (100%) create mode 100644 src/Microsoft.ML.Core/Data/ITrainerArguments.cs delete mode 100644 src/Microsoft.ML.Core/Data/VBufferEditor.cs rename src/{Microsoft.ML.Sweeper => Microsoft.ML.Core/Prediction}/ISweeper.cs (100%) delete mode 100644 src/Microsoft.ML.Core/Utilities/IndentedTextWriterExtensions.cs create mode 100644 src/Microsoft.ML.Core/Utilities/IndentingTextWriter.cs delete mode 100644 src/Microsoft.ML.Core/Utilities/LineParser.cs create mode 100644 src/Microsoft.ML.Core/Utilities/ListExtensions.cs create mode 100644 src/Microsoft.ML.Core/Utilities/MemUtils.cs delete mode 100644 src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoaderSaverCatalog.cs create mode 100644 src/Microsoft.ML.Data/DataLoadSave/DataLoadSaveCatalog.cs delete mode 100644 src/Microsoft.ML.Data/DataLoadSave/DataOperations.cs delete mode 100644 src/Microsoft.ML.Data/Depricated/Vector/GenericSpanSortHelper.cs rename src/Microsoft.ML.Data/Transforms/{ColumnConcatenatingTransformer.cs => ConcatTransform.cs} (84%) rename src/Microsoft.ML.Data/Transforms/{TypeConverting.cs => ConvertTransform.cs} (88%) rename src/Microsoft.ML.Data/Transforms/{ColumnsCopying.cs => CopyColumnsTransform.cs} (75%) rename src/Microsoft.ML.Data/Transforms/{Hashing.cs => HashTransform.cs} (89%) rename src/Microsoft.ML.Data/Transforms/{KeyToValue.cs => KeyToValueTransform.cs} (83%) rename src/Microsoft.ML.Data/Transforms/{KeyToVector.cs => KeyToVectorTransform.cs} (91%) delete mode 100644 src/Microsoft.ML.Data/Transforms/RowToRowTransformerBase.cs rename src/Microsoft.ML.Data/Transforms/{ColumnSelecting.cs => SelectColumnsTransform.cs} (85%) rename src/Microsoft.ML.Data/Transforms/{RowShufflingTransformer.cs => ShuffleTransform.cs} (96%) rename src/Microsoft.ML.Data/Transforms/{ValueToKeyMappingTransformer.cs => TermTransform.cs} (93%) rename src/Microsoft.ML.Data/Transforms/{ValueToKeyMappingTransformerImpl.cs => TermTransformImpl.cs} (93%) rename src/Microsoft.ML.Data/Transforms/{TrainAndScoreTransformer.cs => TrainAndScoreTransform.cs} (90%) rename src/Microsoft.ML.Data/Utils/{SequencePool.cs => IntSequencePool.cs} (98%) delete mode 100644 src/Microsoft.ML.FastTree/Properties/AssemblyInfo.cs delete mode 100644 src/Microsoft.ML.HalLearners/ComputeLRTrainingStdThroughHal.cs delete mode 100644 src/Microsoft.ML.HalLearners/ProjectionCatalog.cs delete mode 100644 src/Microsoft.ML.HalLearners/TransformsStatic.cs delete mode 100644 src/Microsoft.ML.HalLearners/VectorWhitening.cs delete mode 100644 src/Microsoft.ML.PipelineInference/Properties/AssemblyInfo.cs create mode 100644 src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsCatalog.cs create mode 100644 src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerCatalog.cs create mode 100644 src/Microsoft.ML.StandardLearners/Standard/SdcaCatalog.cs create mode 100644 src/Microsoft.ML.StandardLearners/Standard/SgdCatalog.cs delete mode 100644 src/Microsoft.ML.StandardLearners/StandardLearnersCatalog.cs delete mode 100644 src/Microsoft.ML.Sweeper/Properties/AssemblyInfo.cs rename src/Microsoft.ML.TimeSeries/{SequenceModelerBase.cs => ISequenceModeler.cs} (75%) rename src/Microsoft.ML.Transforms/{BootstrapSamplingTransformer.cs => BootstrapSampleTransform.cs} (84%) rename src/Microsoft.ML.Transforms/{OneHotHashEncodingTransformer.cs => CategoricalHashTransform.cs} (85%) rename src/Microsoft.ML.Transforms/{OneHotEncodingTransformer.cs => CategoricalTransform.cs} (83%) rename src/Microsoft.ML.Transforms/{CompositeTransformer.cs => CompositeTransform.cs} (89%) rename src/Microsoft.ML.Transforms/{CountFeatureSelectingTransformer.cs => CountFeatureSelection.cs} (94%) rename src/Microsoft.ML.Transforms/{HashJoiningTransform.cs => HashJoinTransform.cs} (92%) rename src/Microsoft.ML.Transforms/{KeyToVectorMapping.cs => KeyToBinaryVectorTransform.cs} (89%) delete mode 100644 src/Microsoft.ML.Transforms/MissingValueDroppingTransformer.cs create mode 100644 src/Microsoft.ML.Transforms/NADropTransform.cs rename src/Microsoft.ML.Transforms/{MissingValueHandlingTransformer.cs => NAHandleTransform.cs} (79%) rename src/Microsoft.ML.Transforms/{MissingValueIndicatorTransformer.cs => NAIndicatorTransform.cs} (85%) rename src/Microsoft.ML.Transforms/{MissingValueReplacing.cs => NAReplaceTransform.cs} (86%) rename src/Microsoft.ML.Transforms/{MissingValueReplacingUtils.cs => NAReplaceUtils.cs} (98%) rename src/Microsoft.ML.Transforms/{RandomFourierFeaturizing.cs => RffTransform.cs} (89%) rename src/Microsoft.ML.Transforms/{TermLookupTransformer.cs => TermLookupTransform.cs} (95%) rename src/Microsoft.ML.Transforms/Text/{TokenizingByCharacters.cs => CharTokenizeTransform.cs} (80%) delete mode 100644 src/Microsoft.ML.Transforms/Text/LdaStaticExtensions.cs rename src/Microsoft.ML.Transforms/Text/{NgramHashingTransformer.cs => NgramHashTransform.cs} (97%) rename src/Microsoft.ML.Transforms/Text/{SentimentAnalyzingTransform.cs => SentimentAnalyzerTransform.cs} (82%) rename src/Microsoft.ML.Transforms/Text/{StopWordsRemovingTransformer.cs => StopWordsRemoverTransform.cs} (91%) rename src/Microsoft.ML.Transforms/Text/{TextNormalizing.cs => TextNormalizerTransform.cs} (97%) rename src/Microsoft.ML.Transforms/Text/{TextFeaturizingEstimator.cs => TextTransform.cs} (91%) rename src/Microsoft.ML.Transforms/Text/{WordEmbeddingsExtractor.cs => WordEmbeddingsTransform.cs} (78%) rename src/Microsoft.ML.Transforms/Text/{WordHashBagProducingTransform.cs => WordHashBagTransform.cs} (87%) rename src/Microsoft.ML.Transforms/Text/{WordTokenizing.cs => WordTokenizeTransform.cs} (86%) delete mode 100644 src/Microsoft.ML.Transforms/TransformsStatic.cs create mode 100644 src/Microsoft.ML.Transforms/WhiteningTransform.cs create mode 100644 src/Microsoft.ML.Transforms/WrappedGcnTransformers.cs create mode 100644 src/Microsoft.ML.Transforms/WrappedWhiteningTransformer.cs delete mode 100644 test/BaselineOutput/Common/NormalizerEstimator/gcnNorm.tsv delete mode 100644 test/BaselineOutput/Common/NormalizerEstimator/lpNorm.tsv delete mode 100644 test/BaselineOutput/Common/NormalizerEstimator/whitened.tsv create mode 100644 test/BaselineOutput/Common/Onnx/Cluster/BreastCancer/Kmeans.onnx delete mode 100644 test/BaselineOutput/Common/SavePipe/SavePipeCustomStopwordsRemover-Data.txt delete mode 100644 test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Data.txt delete mode 100644 test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Schema.txt delete mode 100644 test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Data.txt delete mode 100644 test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Schema.txt delete mode 100644 test/BaselineOutput/README.md rename test/BaselineOutput/{Common => SingleDebug}/NormalizerEstimator/normalized.tsv (100%) rename test/BaselineOutput/{Common/NormalizerEstimator => SingleDebug/Text}/lpnorm_gcnorm_whitened.tsv (100%) create mode 100644 test/BaselineOutput/SingleRelease/NormalizerEstimator/normalized.tsv create mode 100644 test/BaselineOutput/SingleRelease/Text/lpnorm_gcnorm_whitened.tsv delete mode 100644 test/Microsoft.ML.Core.Tests/UnitTests/TestVectorUtils.cs rename {src/Microsoft.ML.PipelineInference => test/Microsoft.ML.InferenceTesting}/GenerateSweepCandidatesCommand.cs (96%) rename test/{Microsoft.ML.Predictor.Tests/Commands => Microsoft.ML.InferenceTesting}/InferRecipesCommand.cs (96%) rename test/{Microsoft.ML.Predictor.Tests/Commands => Microsoft.ML.InferenceTesting}/InferSchemaCommand.cs (95%) create mode 100644 test/Microsoft.ML.InferenceTesting/Microsoft.ML.InferenceTesting.csproj delete mode 100644 test/Microsoft.ML.Tests/CachingTests.cs delete mode 100644 test/Microsoft.ML.Tests/RangeFilterTests.cs delete mode 100644 test/Microsoft.ML.Tests/Scenarios/OvaTest.cs delete mode 100644 test/Microsoft.ML.Tests/Transformers/LineParserTests.cs diff --git a/Directory.Build.props b/Directory.Build.props index 497572b99f..22492ad639 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -113,7 +113,6 @@ true - $(DefineContants);DEBUG false diff --git a/Microsoft.ML.sln b/Microsoft.ML.sln index 6b76249bd5..0635bfb168 100644 --- a/Microsoft.ML.sln +++ b/Microsoft.ML.sln @@ -17,6 +17,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.CpuMath", "src EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.PipelineInference", "src\Microsoft.ML.PipelineInference\Microsoft.ML.PipelineInference.csproj", "{2D7391C9-8254-4B8F-BF26-FADAF8F02F44}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.InferenceTesting", "test\Microsoft.ML.InferenceTesting\Microsoft.ML.InferenceTesting.csproj", "{E278EC99-E6EE-49FE-92E6-0A309A478D98}" +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Data", "src\Microsoft.ML.Data\Microsoft.ML.Data.csproj", "{AD92D96B-0E96-4F22-8DCE-892E13B1F282}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Onnx", "src\Microsoft.ML.Onnx\Microsoft.ML.Onnx.csproj", "{65D0603E-B96C-4DFC-BDD1-705891B88C18}" @@ -181,6 +183,14 @@ Global {2D7391C9-8254-4B8F-BF26-FADAF8F02F44}.Release|Any CPU.Build.0 = Release|Any CPU {2D7391C9-8254-4B8F-BF26-FADAF8F02F44}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU {2D7391C9-8254-4B8F-BF26-FADAF8F02F44}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU + {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU + {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU + {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Release|Any CPU.Build.0 = Release|Any CPU + {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU + {E278EC99-E6EE-49FE-92E6-0A309A478D98}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU {AD92D96B-0E96-4F22-8DCE-892E13B1F282}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AD92D96B-0E96-4F22-8DCE-892E13B1F282}.Debug|Any CPU.Build.0 = Debug|Any CPU {AD92D96B-0E96-4F22-8DCE-892E13B1F282}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU @@ -550,6 +560,7 @@ Global {EC743D1D-7691-43B7-B9B0-5F2F7018A8F6} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} {46F2F967-C23F-4076-858D-33F7DA9BD2DA} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {2D7391C9-8254-4B8F-BF26-FADAF8F02F44} = {09EADF06-BE25-4228-AB53-95AE3E15B530} + {E278EC99-E6EE-49FE-92E6-0A309A478D98} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4} {AD92D96B-0E96-4F22-8DCE-892E13B1F282} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {65D0603E-B96C-4DFC-BDD1-705891B88C18} = {09EADF06-BE25-4228-AB53-95AE3E15B530} {707BB22C-7E5F-497A-8C2F-74578F675705} = {09EADF06-BE25-4228-AB53-95AE3E15B530} diff --git a/README.md b/README.md index 15dd419948..6de6080e50 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,11 @@ Along with these ML capabilities, this first release of ML.NET also brings the f [![NuGet Status](https://img.shields.io/nuget/v/Microsoft.ML.svg?style=flat)](https://www.nuget.org/packages/Microsoft.ML/) -ML.NET runs on Windows, Linux, and macOS using [.NET Core](https://github.com/dotnet/core), or Windows using .NET Framework. 64 bit is supported on all platforms. 32 bit is supported on Windows, except for TensorFlow, LightGBM, and ONNX related functionality. +ML.NET runs on Windows, Linux, and macOS - any platform where x64 [.NET Core](https://github.com/dotnet/core) or later is available. In addition, .NET Framework on Windows x64 is also supported. -The current release is 0.7. Check out the [release notes](docs/release-notes/0.7/release-0.7.md) and [blog post](https://blogs.msdn.microsoft.com/dotnet/2018/11/08/announcing-ml-net-0-7-machine-learning-net/) to see what's new. +The current release is 0.6. Check out the [release notes](docs/release-notes/0.6/release-0.6.md) to see what's new. -First, ensure you have installed [.NET Core 2.1](https://www.microsoft.com/net/learn/get-started) or later. ML.NET also works on the .NET Framework 4.6.1 or later, but 4.7.2 or later is recommended. +First, ensure you have installed [.NET Core 2.0](https://www.microsoft.com/net/learn/get-started) or later. ML.NET also works on the .NET Framework. Note that ML.NET currently must run in a 64-bit process. Once you have an app, you can install the ML.NET NuGet package from the .NET Core CLI using: ``` @@ -44,9 +44,9 @@ To build ML.NET from source please visit our [developers guide](docs/project-doc | | x64 Debug | x64 Release | |:---|----------------:|------------------:| -|**Linux**|[![x64-debug](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobname=Linux&configuration=Build_Debug)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)|[![x64-release](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobname=Linux&configuration=Build_Release)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)| -|**macOS**|[![x64-debug](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobname=macOS&configuration=Build_Debug)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)|[![x64-release](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobname=macOS&configuration=Build_Release)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)| -|**Windows**|[![x64-debug](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobname=Windows_x64&configuration=Build_Debug)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)|[![x64-release](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master&jobname=Windows_x64&configuration=Build_Release)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)| +|**Linux**|[![x64-debug](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)|[![x64-release](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)| +|**macOS**|[![x64-debug](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)|[![x64-release](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)| +|**Windows**|[![x64-debug](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)|[![x64-release](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/machinelearning/MachineLearning-CI?branchName=master)](https://dnceng.visualstudio.com/DotNet-Public/_build/latest?definitionId=104&branch=master)| ## Contributing @@ -65,19 +65,18 @@ Here's an example of code to train a model to predict sentiment from text sample (You can find a sample of the legacy API [here](test/Microsoft.ML.Tests/Scenarios/SentimentPredictionTests.cs)): ```C# -var mlContext = new MLContext(); -var reader = mlContext.Data.TextReader(new TextLoader.Arguments - { - Column = new[] { - new TextLoader.Column("SentimentText", DataKind.Text, 1), - new TextLoader.Column("Label", DataKind.Bool, 0), - }, - HasHeader = true, - Separator = "," -}); -var data = reader.Read(dataPath); -var learningPipeline = mlContext.Transforms.Text.FeaturizeText("SentimentText", "Features") - .Append(mlContext.BinaryClassification.Trainers.FastTree()); +var env = new LocalEnvironment(); +var reader = TextLoader.CreateReader(env, ctx => ( + Target: ctx.LoadFloat(2), + FeatureVector: ctx.LoadFloat(3, 6)), + separator: ',', + hasHeader: true); +var data = reader.Read(new MultiFileSource(dataPath)); +var classification = new MulticlassClassificationContext(env); +var learningPipeline = reader.MakeNewEstimator() + .Append(r => ( + r.Target, + Prediction: classification.Trainers.Sdca(r.Target.ToKey(), r.FeatureVector))); var model = learningPipeline.Fit(data); ``` @@ -85,12 +84,12 @@ var model = learningPipeline.Fit(data); Now from the model we can make inferences (predictions): ```C# -var predictionFunc = model.MakePredictionFunction(mlContext); +var predictionFunc = model.MakePredictionFunction(env); var prediction = predictionFunc.Predict(new SentimentData { SentimentText = "Today is a great day!" }); -Console.WriteLine("prediction: " + prediction.Prediction); +Console.WriteLine("prediction: " + prediction.Sentiment); ``` A cookbook that shows how to use these APIs for a variety of existing and new scenarios can be found [here](docs/code/MlNetCookBook.md). diff --git a/ROADMAP.md b/ROADMAP.md index 8547729599..113d4c339c 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -18,7 +18,7 @@ In the meanwhile, we are looking for contributions. An easy place to start is t * _Ranking_ - problem where the goal is to automatically sort (rank) instances within a group based on ranked examples in training data * _Anomaly Detection_ - is also known as _outlier detection_. It is a task to identify items, events or observations which do not conform to an expected pattern in the dataset. * _Quantile Regression_ is a type of regression analysis. Whereas regression results in estimates that approximate the conditional mean of the response variable given certain values of the predictor variables, quantile regression aims at estimating either the conditional median or other quantiles of the response variable -* Additional Data Source support (*) +* Additional Data source support (*) * Apache Parquet * Native Binary high-performance format diff --git a/build/Dependencies.props b/build/Dependencies.props index c221bf4f80..7a79b3a087 100644 --- a/build/Dependencies.props +++ b/build/Dependencies.props @@ -9,7 +9,6 @@ 4.3.0 4.8.0 4.5.0 - 4.6.0 @@ -39,7 +38,7 @@ - 0.11.3 + 0.11.1 0.0.3-test diff --git a/build/ci/phase-template.yml b/build/ci/phase-template.yml index 9929ba182d..e327231d64 100644 --- a/build/ci/phase-template.yml +++ b/build/ci/phase-template.yml @@ -11,7 +11,7 @@ phases: _phaseName: ${{ parameters.name }} _arch: ${{ parameters.architecture }} queue: - timeoutInMinutes: 45 + timeoutInMinutes: 40 parallel: 99 matrix: Build_Debug: diff --git a/docs/building/unix-instructions.md b/docs/building/unix-instructions.md index 7efa1c414c..7919e97d63 100644 --- a/docs/building/unix-instructions.md +++ b/docs/building/unix-instructions.md @@ -42,12 +42,11 @@ macOS 10.12 (Sierra) or higher is needed to build dotnet/machinelearning. On macOS a few components are needed which are not provided by a default developer setup: * cmake 3.10.3 -* libomp -* libgdiplus -* gettext +* gcc * All the requirements necessary to run .NET Core 2.0 applications. To view macOS prerequisites click [here](https://docs.microsoft.com/en-us/dotnet/core/macos-prerequisites?tabs=netcore2x). -One way of obtaining CMake and other required libraries is via [Homebrew](https://brew.sh): +One way of obtaining CMake and gcc is via [Homebrew](https://brew.sh): ```sh -$ brew install cmake libomp mono-libgdiplus gettext && brew link gettext --force +$ brew install cmake +$ brew install gcc ``` diff --git a/docs/code/MlNetCookBook.md b/docs/code/MlNetCookBook.md index f2358d05ac..92c589d3a8 100644 --- a/docs/code/MlNetCookBook.md +++ b/docs/code/MlNetCookBook.md @@ -21,7 +21,6 @@ Please feel free to search this page and use any code that suits your needs. - [How do I load data from a text file?](#how-do-i-load-data-from-a-text-file) - [How do I load data with many columns from a CSV?](#how-do-i-load-data-with-many-columns-from-a-csv) -- [How do I debug my experiment or preview my pipeline?](#how-do-i-debug-my-experiment-or-preview-my-pipeline) - [How do I look at the intermediate data?](#how-do-i-look-at-the-intermediate-data) - [How do I train a regression model?](#how-do-i-train-a-regression-model) - [How do I verify the model quality?](#how-do-i-verify-the-model-quality) @@ -34,7 +33,6 @@ Please feel free to search this page and use any code that suits your needs. - [How do I train my model on textual data?](#how-do-i-train-my-model-on-textual-data) - [How do I train using cross-validation?](#how-do-i-train-using-cross-validation) - [Can I mix and match static and dynamic pipelines?](#can-i-mix-and-match-static-and-dynamic-pipelines) -- [How can I define my own transformation of data?](#how-can-i-define-my-own-transformation-of-data) ### General questions about the samples @@ -246,36 +244,6 @@ var reader = mlContext.Data.TextReader(new[] { var data = reader.Read(dataPath); ``` -## How do I debug my experiment or preview my pipeline? - -Most ML.NET operations are 'lazy': they are not actually processing data, they just validate that the operation is possible, and then defer execution until the output data is actually requested. This provides good efficiency, but makes it hard to step through and debug the experiment. - -In order to improve debug-ability, we have added a `Preview()` extension method to all data views, transformers, estimators and readers: - -- `Preview` of a data view contains first 100 rows (configurable) of the data view, encoded as objects, in a single in-memory structure. -- `Preview` of a transformer takes data as input, and outputs the preview of the transformed data. -- `Preview` of an estimator also takes data as input, fits an 'approximated model' on the first 100 rows (configurable) of data, and then outputs the preview of the resulting transformer. - -We tried to make `Preview` debugger-friendly: our expectation is that, if you enter, say `data.Preview()` in your Watch window, you will be able to easily inspect the data there. - -Here is the code sample: -```csharp -var mlContext = new MLContext(); -var estimator = mlContext.Transforms.Categorical.MapValueToKey("Label") - .Append(mlContext.MulticlassClassification.Trainers.StochasticDualCoordinateAscent()) - .Append(mlContext.Transforms.Conversion.MapKeyToValue("PredictedLabel")); - -var data = mlContext.Data.ReadFromTextFile(new TextLoader.Column[] { - new TextLoader.Column("Label", DataKind.Text, 0), - new TextLoader.Column("Features", DataKind.R4, 1, 4) }, filePath); - -// Preview the data. -var dataPreview = data.Preview(); - -// Preview the result of training and transformation. -var transformationPreview = estimator.Preview(data); -``` - ## How do I look at the intermediate data? Oftentimes, when we construct the experiment, we want to make sure that the data processing 'up to a certain moment' produces the results that we want. With ML.NET it is not very easy to do: since all ML.NET operations are lazy, the objects we construct are just 'promises' of data. @@ -1132,10 +1100,10 @@ var learningPipeline = reader.MakeNewEstimator() BagOfBigrams: r.Message.NormalizeText().ToBagofHashedWords(ngramLength: 2, allLengths: false), // NLP pipeline 3: bag of tri-character sequences with TF-IDF weighting. - BagOfTrichar: r.Message.TokenizeIntoCharacters().ToNgrams(ngramLength: 3, weighting: NgramCountingEstimator.WeightingCriteria.TfIdf), + BagOfTrichar: r.Message.TokenizeIntoCharacters().ToNgrams(ngramLength: 3, weighting: NgramTransform.WeightingCriteria.TfIdf), // NLP pipeline 4: word embeddings. - Embeddings: r.Message.NormalizeText().TokenizeText().WordEmbeddings(WordEmbeddingsExtractorTransformer.PretrainedModelKind.GloVeTwitter25D) + Embeddings: r.Message.NormalizeText().TokenizeText().WordEmbeddings(WordEmbeddingsTransform.PretrainedModelKind.GloVeTwitter25D) )); // Let's train our pipeline, and then apply it to the same data. @@ -1186,13 +1154,13 @@ var dynamicPipeline = // NLP pipeline 3: bag of tri-character sequences with TF-IDF weighting. .Append(mlContext.Transforms.Text.TokenizeCharacters("Message", "MessageChars")) - .Append(new NgramCountingEstimator(mlContext, "MessageChars", "BagOfTrichar", - ngramLength: 3, weighting: NgramTokenizingTransformer.WeightingCriteria.TfIdf)) + .Append(new NgramEstimator(mlContext, "MessageChars", "BagOfTrichar", + ngramLength: 3, weighting: NgramTransform.WeightingCriteria.TfIdf)) // NLP pipeline 4: word embeddings. .Append(mlContext.Transforms.Text.TokenizeWords("NormalizedMessage", "TokenizedMessage")) .Append(mlContext.Transforms.Text.ExtractWordEmbeedings("TokenizedMessage", "Embeddings", - WordEmbeddingsExtractorTransformer.PretrainedModelKind.GloVeTwitter25D)); + WordEmbeddingsTransform.PretrainedModelKind.GloVeTwitter25D)); // Let's train our pipeline, and then apply it to the same data. // Note that even on a small dataset of 70KB the pipeline above can take up to a minute to completely train. @@ -1363,7 +1331,7 @@ var learningPipeline = reader.MakeNewEstimator() IEstimator dynamicPipe = learningPipeline.AsDynamic; // Create a binary classification trainer. -var binaryTrainer = mlContext.BinaryClassification.Trainers.AveragedPerceptron("Label", "Features"); +var binaryTrainer = mlContext.BinaryClassification.Trainers.AveragedPerceptron(); // Append the OVA learner to the pipeline. dynamicPipe = dynamicPipe.Append(new Ova(mlContext, binaryTrainer)); @@ -1398,103 +1366,3 @@ var dynamicModel = dynamicPipe.Fit(data.AsDynamic); // Now 'dynamicModel', and 'model.AsDynamic' are equivalent. ``` - -## How can I define my own transformation of data? - -ML.NET has quite a lot of built-in transformers, but we can not possibly cover everything. Inevitably, you will need to perform custom user-defined operations. -We added `MLContext.Transforms.CustomMapping` for this very purpose: it is a user-defined arbitrary *mapping* of the data. - -Suppose that we have the dataset with float 'Income' column, and we want to compute 'Label', that is equal to `true` if the income is more than 50000, and `false` otherwise. - -Here's how we can do this via a custom transformer: - -```csharp -// Define a class for all the input columns that we intend to consume. -class InputRow -{ - public float Income { get; set; } -} - -// Define a class for all output columns that we intend to produce. -class OutputRow -{ - public bool Label { get; set; } -} - -public static IDataView PrepareData(MLContext mlContext, IDataView data) -{ - // Define the operation code. - Action mapping = (input, output) => output.Label = input.Income > 50000; - // Make a custom transformer and transform the data. - var transformer = mlContext.Transforms.CustomMappingTransformer(mapping, null); - return transformer.Transform(data); -} -``` - -You can also insert a custom mapping inside an estimator pipeline: -```csharp -public static ITransformer TrainModel(MLContext mlContext, IDataView trainData) -{ - // Define the custom operation. - Action mapping = (input, output) => output.Label = input.Income > 50000; - // Construct the learning pipeline. - var estimator = mlContext.Transforms.CustomMapping(mapping, null) - .Append(mlContext.BinaryClassification.Trainers.FastTree(label: "Label")); - - return estimator.Fit(trainData); -} -``` - -Please note that you need to make your `mapping` operation into a 'pure function': -- It should be reentrant (we will call it simultaneously from multiple threads) -- It should not have side effects (we may call it arbitrarily at any time, or omit the call) - -One important caveat is: if you want your custom transformation to be part of your saved model, you will need to provide a `contractName` for it. -At loading time, you will need to reconstruct the custom transformer and inject it into MLContext. - -Here is a complete example that saves and loads a model with a custom mapping. -```csharp -/// -/// One class that contains all custom mappings that we need for our model. -/// -public class CustomMappings -{ - // This is the custom mapping. We now separate it into a method, so that we can use it both in training and in loading. - public static void IncomeMapping(InputRow input, OutputRow output) => output.Label = input.Income > 50000; - - // MLContext is needed to create a new transformer. We are using 'Import' to have ML.NET populate - // this property. - [Import] - public MLContext MLContext { get; set; } - - // We are exporting the custom transformer by the name 'IncomeMapping'. - [Export(nameof(IncomeMapping))] - public ITransformer MyCustomTransformer - => MLContext.Transforms.CustomMappingTransformer(IncomeMapping, nameof(IncomeMapping)); -} -``` - -```csharp -// Construct the learning pipeline. Note that we are now providing a contract name for the custom mapping: -// otherwise we will not be able to save the model. -var estimator = mlContext.Transforms.CustomMapping(CustomMappings.IncomeMapping, nameof(CustomMappings.IncomeMapping)) - .Append(mlContext.BinaryClassification.Trainers.FastTree(label: "Label")); - -// Train the model. -var model = estimator.Fit(trainData); - -// Save the model. -using (var fs = File.Create(modelPath)) - mlContext.Model.Save(model, fs); - -// Now pretend we are in a different process. -var newContext = new MLContext(); - -// Create a custom composition container for all our custom mapping actions. -newContext.CompositionContainer = new CompositionContainer(new TypeCatalog(typeof(CustomMappings))); - -// Now we can load the model. -ITransformer loadedModel; -using (var fs = File.OpenRead(modelPath)) - loadedModel = newContext.Model.Load(fs); -``` \ No newline at end of file diff --git a/docs/code/MlNetHighLevelConcepts.md b/docs/code/MlNetHighLevelConcepts.md index 42a49b38c8..3f47f5f287 100644 --- a/docs/code/MlNetHighLevelConcepts.md +++ b/docs/code/MlNetHighLevelConcepts.md @@ -21,8 +21,6 @@ This document is going to cover the following ML.NET concepts: - You can think of a machine learning *algorithm* as an estimator that learns on data and produces a machine learning *model* (which is a transformer). - [*Prediction function*](#prediction-function), represented as a `PredictionFunction` class. - The prediction function can be seen as a machine that applies a transformer to one 'row', such as at prediction time. -- [*MLContext*](#mlcontext) object - - This is a 'catalog of everything' available in ML.NET. Use this object to read data, create estimators, save/load models, evaluate and perform all other tasks. ## Data @@ -110,11 +108,11 @@ public interface IEstimator You can easily imagine how *a sequence of estimators can be phrased as an estimator* of its own. In ML.NET, we rely on this property to create 'learning pipelines' that chain together different estimators: ```c# -var mlContext = new MLContext(); -var estimator = mlContext.Transforms.Concatenate("Features", "SepalLength", "SepalWidth", "PetalLength", "PetalWidth") - .Append(mlContext.Transforms.Categorical.MapValueToKey("Label")) - .Append(mlContext.MulticlassClassification.Trainers.StochasticDualCoordinateAscent()) - .Append(mlContext.Transforms.Conversion.MapKeyToValue("PredictedLabel")); +var env = new LocalEnvironment(); // Initialize the ML.NET environment. +var estimator = new ConcatEstimator(env, "Features", "SepalLength", "SepalWidth", "PetalLength", "PetalWidth") + .Append(new ToKeyEstimator(env, "Label")) + .Append(new SdcaMultiClassTrainer(env, "Features", "Label")) // This is the actual 'machine learning algorithm'. + .Append(new ToValueEstimator(env, "PredictedLabel")); var endToEndModel = estimator.Fit(data); // This now contains all the transformers that were used at training. ``` @@ -137,51 +135,19 @@ Of course, we can reduce this to the batch prediction: The above algorithm can be implemented using the [schema comprehension](SchemaComprehension.md), with two user-defined objects `InputExample` and `OutputPrediction` as follows: ```c# -var inputData = mlContext.CreateDataView(new InputExample[] { example }); +var inputData = env.CreateDataView(new InputExample[] { example }); var outputData = model.Transform(inputData); -var output = outputData.AsDynamic.AsEnumerable(mlContext, reuseRowObject: false).Single(); +var output = outputData.AsDynamic.AsEnumerable(env, reuseRowObject: false).Single(); ``` + But this would be cumbersome, and would incur performance costs. Instead, we have a 'prediction function' object that performs the same work, but faster and more convenient, via an extension method `MakePredictionFunction`: ```c# -var predictionFunc = model.MakePredictionFunction(mlContext); +var predictionFunc = model.MakePredictionFunction(env); var output = predictionFunc.Predict(example); ``` The same `predictionFunc` can (and should!) be used multiple times, thus amortizing the initial cost of `MakePredictionFunction` call. The prediction function is *not re-entrant / thread-safe*: if you want to conduct predictions simultaneously with multiple threads, you need to have a prediction function per thread. - -## MLContext - -With a vast variety of components in ML.NET, it is important to have a consistent way to discover them. You can use the `MLContext` object for this purpose. - -Create one `MLContext` for your entire application. All ML.NET components and operations are available as methods of various sub-objects of `MLContext`. - -- `MLContext.Data` contains operations related to creating `IDataView`s (other than transformers): - - Loading / saving data to a file - - Caching the data in memory - - Filtering (removing rows from data) - -Remember that `IDataView`s are immutable, so each of the above operations create a new `IDataView`. -On the other hand, `IDataView`s are also lazy, so there is no data replication from the above. - -- `MLContext.Model` contains operations related to models (transformers): saving and loading, creating prediction functions. - -- `MLContext.Transforms` contains estimators for non-prediction operations: - - `Categorical` for handling categorical values - - `Text` for natural language processing - - `Conversion` for various type conversions - - `Projection` for vector operations (like Principal Component Analysis, Random Fourier features, Vector Whitening etc.) - - Normalization/rescaling - - Column-related operations (rename, delete, clone, concatenate, etc.) - - etc. - -- `MLContext.BinaryClassification`, `MulticlassClassification`, `Ranking`, etc. are catalogs of learning algorithms for specific machine learning tasks. - - `TrainTestSplit` and `CrossValidate` to facilitate the respective operations - - `Trainers` containing various task-specific trainers. - -- `MLContext.Log` is a providing a stream of text messages about the long-running processes ML.NET is running. - -We are continuously adding new extensions to `MLContext` catalog, so if certain operations are not yet available, they will in the future. diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/ConcatTransform.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/ConcatTransform.cs index ba945f38fa..16dc0278b9 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/ConcatTransform.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/ConcatTransform.cs @@ -1,17 +1,22 @@ -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Api; -using System; -using System.Linq; -using System.Collections.Generic; -using Microsoft.ML.Transforms; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + + // the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. + using Microsoft.ML.Runtime.Data; + using Microsoft.ML.Runtime.Api; + using System; + using System.Linq; + using System.Collections.Generic; + using Microsoft.ML.Transforms; namespace Microsoft.ML.Samples.Dynamic { - public class ConcatTransformExample + public partial class TransformSamples { class SampleInfertDataWithFeatures { - public VBuffer Features { get; set; } + public VBuffer Features { get; set; } } public static void ConcatTransform() @@ -46,7 +51,7 @@ public static void ConcatTransform() Console.WriteLine($"{outputColumnName} column obtained post-transformation."); foreach (var featureRow in featuresColumn) { - foreach (var value in featureRow.Features.GetValues()) + foreach (var value in featureRow.Features.Values) Console.Write($"{value} "); Console.WriteLine(""); } diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/IidChangePointDetectorTransform.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/IidChangePointDetectorTransform.cs deleted file mode 100644 index 179dda7444..0000000000 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/IidChangePointDetectorTransform.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Api; -using Microsoft.ML.Runtime.TimeSeriesProcessing; - -namespace Microsoft.ML.Samples.Dynamic -{ - public partial class TransformSamples - { - class ChangePointPrediction - { - [VectorType(4)] - public double[] Prediction { get; set; } - } - - class IidChangePointData - { - public float Value; - - public IidChangePointData(float value) - { - Value = value; - } - } - - // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). - // IidChangePointDetector is applied then to identify points where data distribution changed. - public static void IidChangePointDetectorTransform() - { - // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, - // as well as the source of randomness. - var ml = new MLContext(); - - // Generate sample series data with a change - const int size = 16; - var data = new List(size); - for (int i = 0; i < size / 2; i++) - data.Add(new IidChangePointData(5)); - // This is a change point - for (int i = 0; i < size / 2; i++) - data.Add(new IidChangePointData(7)); - - // Convert data to IDataView. - var dataView = ml.CreateStreamingDataView(data); - - // Setup IidSpikeDetector arguments - string outputColumnName = "Prediction"; - string inputColumnName = "Value"; - var args = new IidChangePointDetector.Arguments() - { - Source = inputColumnName, - Name = outputColumnName, - Confidence = 95, // The confidence for spike detection in the range [0, 100] - ChangeHistoryLength = size / 4, // The length of the sliding window on p-values for computing the martingale score. - }; - - // The transformed data. - var transformedData = new IidChangePointEstimator(ml, args).Fit(dataView).Transform(dataView); - - // Getting the data of the newly created column as an IEnumerable of ChangePointPrediction. - var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); - - Console.WriteLine($"{outputColumnName} column obtained post-transformation."); - Console.WriteLine("Data\tAlert\tScore\tP-Value\tMartingale value"); - int k = 0; - foreach (var prediction in predictionColumn) - Console.WriteLine("{0}\t{1}\t{2:0.00}\t{3:0.00}\t{4:0.00}", data[k++].Value, prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2], prediction.Prediction[3]); - Console.WriteLine(""); - - // Prediction column obtained post-transformation. - // Data Alert Score P-Value Martingale value - // 5 0 5.00 0.50 0.00 - // 5 0 5.00 0.50 0.00 - // 5 0 5.00 0.50 0.00 - // 5 0 5.00 0.50 0.00 - // 5 0 5.00 0.50 0.00 - // 5 0 5.00 0.50 0.00 - // 5 0 5.00 0.50 0.00 - // 5 0 5.00 0.50 0.00 - // 7 1 7.00 0.00 10298.67 <-- alert is on, predicted changepoint - // 7 0 7.00 0.13 33950.16 - // 7 0 7.00 0.26 60866.34 - // 7 0 7.00 0.38 78362.04 - // 7 0 7.00 0.50 0.01 - // 7 0 7.00 0.50 0.00 - // 7 0 7.00 0.50 0.00 - // 7 0 7.00 0.50 0.00 - } - } -} diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/IidSpikeDetectorTransform.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/IidSpikeDetectorTransform.cs deleted file mode 100644 index 3c6ae7a9c9..0000000000 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/IidSpikeDetectorTransform.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Api; -using Microsoft.ML.Runtime.TimeSeriesProcessing; - -namespace Microsoft.ML.Samples.Dynamic -{ - public partial class TransformSamples - { - class IidSpikeData - { - public float Value; - - public IidSpikeData(float value) - { - Value = value; - } - } - - class IidSpikePrediction - { - [VectorType(3)] - public double[] Prediction { get; set; } - } - - // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). - // IidSpikeDetector is applied then to identify spiking points in the series. - public static void IidSpikeDetectorTransform() - { - // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, - // as well as the source of randomness. - var ml = new MLContext(); - - // Generate sample series data with a spike - const int size = 10; - var data = new List(size); - for (int i = 0; i < size / 2; i++) - data.Add(new IidSpikeData(5)); - // This is a spike - data.Add(new IidSpikeData(10)); - for (int i = 0; i < size / 2; i++) - data.Add(new IidSpikeData(5)); - - // Convert data to IDataView. - var dataView = ml.CreateStreamingDataView(data); - - // Setup IidSpikeDetector arguments - string outputColumnName = "Prediction"; - string inputColumnName = "Value"; - var args = new IidSpikeDetector.Arguments() - { - Source = inputColumnName, - Name = outputColumnName, - Confidence = 95, // The confidence for spike detection in the range [0, 100] - PvalueHistoryLength = size / 4 // The size of the sliding window for computing the p-value - }; - - // The transformed data. - var transformedData = new IidSpikeEstimator(ml, args).Fit(dataView).Transform(dataView); - - // Getting the data of the newly created column as an IEnumerable of IidSpikePrediction. - var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); - - Console.WriteLine($"{outputColumnName} column obtained post-transformation."); - Console.WriteLine("Alert\tScore\tP-Value"); - foreach (var prediction in predictionColumn) - Console.WriteLine("{0}\t{1:0.00}\t{2:0.00}", prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2]); - Console.WriteLine(""); - - // Prediction column obtained post-transformation. - // Alert Score P-Value - // 0 5.00 0.50 - // 0 5.00 0.50 - // 0 5.00 0.50 - // 0 5.00 0.50 - // 0 5.00 0.50 - // 1 10.00 0.00 <-- alert is on, predicted spike - // 0 5.00 0.26 - // 0 5.00 0.26 - // 0 5.00 0.50 - // 0 5.00 0.50 - // 0 5.00 0.50 - } - } -} diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/KeyToValue_Term.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/KeyToValue_Term.cs index d6e15eeb50..b51a16bea6 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/KeyToValue_Term.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/KeyToValue_Term.cs @@ -1,16 +1,21 @@ -using Microsoft.ML.Data; -using Microsoft.ML.Runtime.Api; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Transforms.Categorical; -using Microsoft.ML.Transforms.Conversions; -using Microsoft.ML.Transforms.Text; -using System; -using System.Collections.Generic; -using System.Linq; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + + // the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. + using Microsoft.ML.Data; + using Microsoft.ML.Runtime.Api; + using Microsoft.ML.Runtime.Data; + using Microsoft.ML.Transforms.Categorical; + using Microsoft.ML.Transforms.Conversions; + using Microsoft.ML.Transforms.Text; + using System; + using System.Collections.Generic; + using System.Linq; namespace Microsoft.ML.Samples.Dynamic { - public class KeyToValue_TermExample + public partial class TransformSamples { public static void KeyToValue_Term() { @@ -44,7 +49,7 @@ public static void KeyToValue_Term() // to value/alphabetically. string customizedColumnName = "CustomizedKeys"; var customized_pipeline = new WordTokenizingEstimator(ml, "Review") - .Append(new ValueToKeyMappingEstimator(ml, "Review", customizedColumnName, maxNumTerms: 10, sort: ValueToKeyMappingTransformer.SortOrder.Value)); + .Append(new ValueToKeyMappingEstimator(ml, "Review", customizedColumnName, maxNumTerms: 10, sort: TermTransform.SortOrder.Value)); // The transformed data. var transformedData_default = default_pipeline.Fit(trainData).Transform(trainData); @@ -56,7 +61,7 @@ public static void KeyToValue_Term() Console.WriteLine($"{columnName} column obtained post-transformation."); foreach (var row in column) { - foreach (var value in row.GetValues()) + foreach (var value in row.Values) Console.Write($"{value} "); Console.WriteLine(""); } @@ -88,7 +93,7 @@ public static void KeyToValue_Term() // Retrieve the original values, by appending the KeyToValue etimator to the existing pipelines // to convert the keys back to the strings. - var pipeline = default_pipeline.Append(new KeyToValueMappingEstimator(ml, defaultColumnName)); + var pipeline = default_pipeline.Append(new KeyToValueEstimator(ml, defaultColumnName)); transformedData_default = pipeline.Fit(trainData).Transform(trainData); // Preview of the DefaultColumnName column obtained. @@ -96,7 +101,7 @@ public static void KeyToValue_Term() foreach (var row in originalColumnBack) { - foreach (var value in row.GetValues()) + foreach (var value in row.Values) Console.Write($"{value} "); Console.WriteLine(""); } diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/MatrixFactorization.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/MatrixFactorization.cs index 4c9169c9c6..71366a8035 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/MatrixFactorization.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/MatrixFactorization.cs @@ -1,3 +1,7 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Trainers; @@ -9,7 +13,7 @@ // line by line. namespace Microsoft.ML.Samples.Dynamic { - public class MatrixFactorizationExample + public partial class TrainerSamples { // The following variables defines the shape of a matrix. Its shape is _synthesizedMatrixRowCount-by-_synthesizedMatrixColumnCount. // The variable _synthesizedMatrixFirstRowIndex indicates the integer that would be mapped to the first row index. If user data uses @@ -67,10 +71,8 @@ public static void MatrixFactorizationInMemoryData() // Create a matrix factorization trainer which may consume "Value" as the training label, "MatrixColumnIndex" as the // matrix's column index, and "MatrixRowIndex" as the matrix's row index. Here nameof(...) is used to extract field // names' in MatrixElement class. - var pipeline = new MatrixFactorizationTrainer(mlContext, - nameof(MatrixElement.MatrixColumnIndex), - nameof(MatrixElement.MatrixRowIndex), - nameof(MatrixElement.Value), + var pipeline = new MatrixFactorizationTrainer(mlContext, nameof(MatrixElement.Value), + nameof(MatrixElement.MatrixColumnIndex), nameof(MatrixElement.MatrixRowIndex), advancedSettings: s => { s.NumIterations = 10; diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Normalizer.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/MinMaxNormalizer.cs similarity index 68% rename from docs/samples/Microsoft.ML.Samples/Dynamic/Normalizer.cs rename to docs/samples/Microsoft.ML.Samples/Dynamic/MinMaxNormalizer.cs index 121eede6e6..67a1bd859f 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/Normalizer.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/MinMaxNormalizer.cs @@ -1,15 +1,19 @@ -using Microsoft.ML.Data; -using Microsoft.ML.Runtime.Api; -using Microsoft.ML.Transforms.Normalizers; -using System; -using System.Collections.Generic; -using System.Linq; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + + // the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. + using Microsoft.ML.Runtime.Api; + using Microsoft.ML.Data; + using Microsoft.ML.Transforms.Normalizers; + using System; + using System.Collections.Generic; namespace Microsoft.ML.Samples.Dynamic { - public class NormalizerExample + public partial class TransformSamples { - public static void Normalizer() + public static void MinMaxNormalizer() { // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, // as well as the source of randomness. @@ -31,19 +35,7 @@ public static void Normalizer() // A pipeline for normalizing the Induced column. var pipeline = ml.Transforms.Normalize("Induced"); // The transformed (normalized according to Normalizer.NormalizerMode.MinMax) data. - var transformer = pipeline.Fit(trainData); - - var modelParams = transformer.Columns - .First(x => x.Output == "Induced") - .ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters; - - Console.WriteLine($"The normalization parameters are: Scale = {modelParams.Scale} and Offset = {modelParams.Offset}"); - //Preview - // - //The normalization parameters are: Scale = 0.5 and Offset = 0" - - var transformedData = transformer.Transform(trainData); - + var transformedData = pipeline.Fit(trainData).Transform(trainData); // Getting the data of the newly created column, so we can preview it. var normalizedColumn = transformedData.GetColumn(ml, "Induced"); @@ -69,8 +61,7 @@ public static void Normalizer() // Using log scale as the normalization mode. var multiColPipeline = ml.Transforms.Normalize(NormalizingEstimator.NormalizerMode.LogMeanVariance, new[] { ("Induced", "LogInduced"), ("Spontaneous", "LogSpontaneous") }); // The transformed data. - var multiColtransformer = multiColPipeline.Fit(trainData); - var multiColtransformedData = multiColtransformer.Transform(trainData); + var multiColtransformedData = multiColPipeline.Fit(trainData).Transform(trainData); // Getting the newly created columns. var normalizedInduced = multiColtransformedData.GetColumn(ml, "LogInduced"); @@ -95,13 +86,6 @@ public static void Normalizer() // 0 // 0 // 0.1586974 - - // Inspect the weights of normalizing the columns - var multiColModelParams = multiColtransformer.Columns - .First(x=> x.Output == "LogInduced") - .ModelParameters as NormalizingTransformer.CdfNormalizerModelParameters; - - Console.WriteLine($"The normalization parameters are: Mean = {multiColModelParams.Mean} and Stddev = {multiColModelParams.Stddev}"); } } } diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/NgramExtraction.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/NgramExtraction.cs deleted file mode 100644 index 3c9147f32a..0000000000 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/NgramExtraction.cs +++ /dev/null @@ -1,76 +0,0 @@ -using Microsoft.ML.Data; -using Microsoft.ML.Runtime.Api; -using Microsoft.ML.Runtime.Data; -using System; -using System.Collections.Generic; - -namespace Microsoft.ML.Samples.Dynamic -{ - public partial class NgramTransformSamples - { - public static void NgramTransform() - { - // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, - // as well as the source of randomness. - var ml = new MLContext(); - - // Get a small dataset as an IEnumerable and convert to IDataView. - IEnumerable data = SamplesUtils.DatasetUtils.GetSentimentData(); - var trainData = ml.CreateStreamingDataView(data); - - // Preview of the data. - // - // Sentiment SentimentText - // true Best game I've ever played. - // false ==RUDE== Dude, 2. - // true Until the next game, this is the best Xbox game! - - // A pipeline to tokenize text as characters and then combine them together into ngrams - // The pipeline uses the default settings to featurize. - - var charsPipeline = ml.Transforms.Text.TokenizeCharacters("SentimentText", "Chars", useMarkerCharacters:false); - var ngramOnePipeline = ml.Transforms.Text.ProduceNgrams("Chars", "CharsUnigrams", ngramLength:1); - var ngramTwpPipeline = ml.Transforms.Text.ProduceNgrams("Chars", "CharsTwograms"); - var oneCharsPipeline = charsPipeline.Append(ngramOnePipeline); - var twoCharsPipeline = charsPipeline.Append(ngramTwpPipeline); - - // The transformed data for pipelines. - var transformedData_onechars = oneCharsPipeline.Fit(trainData).Transform(trainData); - var transformedData_twochars = twoCharsPipeline.Fit(trainData).Transform(trainData); - - // Small helper to print the text inside the columns, in the console. - Action>, VBuffer>> printHelper = (columnName, column, names) => - { - Console.WriteLine($"{columnName} column obtained post-transformation."); - var slots = names.GetValues(); - foreach (var featureRow in column) - { - foreach (var item in featureRow.Items()) - Console.Write($"'{slots[item.Key]}' - {item.Value} "); - Console.WriteLine(""); - } - - Console.WriteLine("==================================================="); - }; - // Preview of the CharsUnigrams column obtained after processing the input. - VBuffer> slotNames = default; - transformedData_onechars.Schema["CharsUnigrams"].Metadata.GetValue(MetadataUtils.Kinds.SlotNames, ref slotNames); - var charsOneGramColumn = transformedData_onechars.GetColumn>(ml, "CharsUnigrams"); - printHelper("CharsUnigrams", charsOneGramColumn, slotNames); - - // CharsUnigrams column obtained post-transformation. - // 'B' - 1 'e' - 6 's' - 1 't' - 1 '' - 4 'g' - 1 'a' - 2 'm' - 1 'I' - 1 ''' - 1 'v' - 2 ... - // 'e' - 1 '' - 2 'd' - 1 '=' - 4 'R' - 1 'U' - 1 'D' - 2 'E' - 1 'u' - 1 ',' - 1 '2' - 1 - // 'B' - 0 'e' - 6 's' - 3 't' - 6 '' - 9 'g' - 2 'a' - 2 'm' - 2 'I' - 0 ''' - 0 'v' - 0 ... - // Preview of the CharsTwoGrams column obtained after processing the input. - var charsTwoGramColumn = transformedData_twochars.GetColumn>(ml, "CharsTwograms"); - transformedData_twochars.Schema["CharsTwograms"].Metadata.GetValue(MetadataUtils.Kinds.SlotNames, ref slotNames); - printHelper("CharsTwograms", charsTwoGramColumn, slotNames); - - // CharsTwograms column obtained post-transformation. - // 'B' - 1 'B|e' - 1 'e' - 6 'e|s' - 1 's' - 1 's|t' - 1 't' - 1 't|' - 1 '' - 4 '|g' - 1 ... - // 'e' - 1 '' - 2 'd' - 1 '=' - 4 '=|=' - 2 '=|R' - 1 'R' - 1 'R|U' - 1 'U' - 1 'U|D' - 1 'D' - 2 ... - // 'B' - 0 'B|e' - 0 'e' - 6 'e|s' - 1 's' - 3 's|t' - 1 't' - 6 't|' - 2 '' - 9 '|g' - 2 ... - } - } -} diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/ProjectionTransforms.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/ProjectionTransforms.cs deleted file mode 100644 index 0f7761cfba..0000000000 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/ProjectionTransforms.cs +++ /dev/null @@ -1,114 +0,0 @@ -using Microsoft.ML.Runtime.Api; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Data; -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Microsoft.ML.Samples.Dynamic -{ - public class ProjectionTransformsExample - { - public static void ProjectionTransforms() - { - // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, - // as well as the source of randomness. - var ml = new MLContext(); - - // Get a small dataset as an IEnumerable and convert it to an IDataView. - IEnumerable data = SamplesUtils.DatasetUtils.GetVectorOfNumbersData(); - var trainData = ml.CreateStreamingDataView(data); - - // Preview of the data. - // - // Features - // 0 1 2 3 4 5 6 7 8 9 - // 1 2 3 4 5 6 7 8 9 0 - // 2 3 4 5 6 7 8 9 0 1 - // 3 4 5 6 7 8 9 0 1 2 - // 4 5 6 7 8 9 0 1 2 3 - // 5 6 7 8 9 0 1 2 3 4 - // 6 7 8 9 0 1 2 3 4 5 - - // A small printing utility. - Action>> printHelper = (colName, column) => - { - Console.WriteLine($"{colName} column obtained post-transformation."); - foreach (var row in column) - Console.WriteLine($"{string.Join(" ",row.DenseValues().Select(x=>x.ToString("f3")))} "); - }; - - // A pipeline to project Features column into Random fourier space. - var rffPipeline = ml.Transforms.Projection.CreateRandomFourierFeatures(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), newDim: 4); - // The transformed (projected) data. - var transformedData = rffPipeline.Fit(trainData).Transform(trainData); - // Getting the data of the newly created column, so we can preview it. - var randomFourier = transformedData.GetColumn>(ml, nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features)); - - printHelper(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), randomFourier); - - // Features column obtained post-transformation. - // - //0.634 0.628 -0.705 -0.337 - //0.704 0.683 -0.555 -0.422 - //0.407 0.542 -0.707 -0.616 - //0.473 0.331 -0.400 -0.699 - //0.181 0.361 -0.335 -0.157 - //0.165 0.117 -0.547 0.014 - - // A pipeline to project Features column into white noise vector. - var whiteningPipeline = ml.Transforms.Projection.VectorWhiten(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), kind: Transforms.Projections.WhiteningKind.Zca); - // The transformed (projected) data. - transformedData = whiteningPipeline.Fit(trainData).Transform(trainData); - // Getting the data of the newly created column, so we can preview it. - var whitening = transformedData.GetColumn>(ml, nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features)); - - printHelper(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), whitening); - - // Features column obtained post-transformation. - // - //-0.394 -0.318 -0.243 -0.168 0.209 0.358 0.433 0.589 0.873 2.047 - //-0.034 0.030 0.094 0.159 0.298 0.427 0.492 0.760 1.855 -1.197 - // 0.099 0.161 0.223 0.286 0.412 0.603 0.665 1.797 -1.265 -0.172 - // 0.211 0.277 0.344 0.410 0.606 1.267 1.333 -1.340 -0.205 0.065 - // 0.454 0.523 0.593 0.664 1.886 -0.757 -0.687 -0.022 0.176 0.310 - // 0.863 0.938 1.016 1.093 -1.326 -0.096 -0.019 0.189 0.330 0.483 - - // A pipeline to project Features column into L-p normalized vector. - var lpNormalizePipeline = ml.Transforms.Projection.LpNormalize(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), normKind: Transforms.Projections.LpNormalizingEstimatorBase.NormalizerKind.L1Norm); - // The transformed (projected) data. - transformedData = lpNormalizePipeline.Fit(trainData).Transform(trainData); - // Getting the data of the newly created column, so we can preview it. - var lpNormalize= transformedData.GetColumn>(ml, nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features)); - - printHelper(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), lpNormalize); - - // Features column obtained post-transformation. - // - // 0.000 0.022 0.044 0.067 0.089 0.111 0.133 0.156 0.178 0.200 - // 0.022 0.044 0.067 0.089 0.111 0.133 0.156 0.178 0.200 0.000 - // 0.044 0.067 0.089 0.111 0.133 0.156 0.178 0.200 0.000 0.022 - // 0.067 0.089 0.111 0.133 0.156 0.178 0.200 0.000 0.022 0.044 - // 0.111 0.133 0.156 0.178 0.200 0.000 0.022 0.044 0.067 0.089 - // 0.133 0.156 0.178 0.200 0.000 0.022 0.044 0.067 0.089 0.111 - - // A pipeline to project Features column into L-p normalized vector. - var gcNormalizePipeline = ml.Transforms.Projection.GlobalContrastNormalize(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), substractMean:false); - // The transformed (projected) data. - transformedData = gcNormalizePipeline.Fit(trainData).Transform(trainData); - // Getting the data of the newly created column, so we can preview it. - var gcNormalize = transformedData.GetColumn>(ml, nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features)); - - printHelper(nameof(SamplesUtils.DatasetUtils.SampleVectorOfNumbersData.Features), gcNormalize); - - // Features column obtained post-transformation. - // - // 0.000 0.059 0.118 0.178 0.237 0.296 0.355 0.415 0.474 0.533 - // 0.059 0.118 0.178 0.237 0.296 0.355 0.415 0.474 0.533 0.000 - // 0.118 0.178 0.237 0.296 0.355 0.415 0.474 0.533 0.000 0.059 - // 0.178 0.237 0.296 0.355 0.415 0.474 0.533 0.000 0.059 0.118 - // 0.296 0.355 0.415 0.474 0.533 0.000 0.059 0.118 0.178 0.237 - // 0.355 0.415 0.474 0.533 0.000 0.059 0.118 0.178 0.237 0.296 - } - } -} diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/SDCA.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/SDCA.cs index 32a33cdc43..d018b3df4b 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/SDCA.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/SDCA.cs @@ -1,10 +1,15 @@ -using Microsoft.ML.Runtime.Data; -using System; -using System.Linq; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +// the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. + using Microsoft.ML.Runtime.Data; + using System; + using System.Linq; namespace Microsoft.ML.Samples.Dynamic { - public class SDCA_BinaryClassificationExample + public partial class TrainerSamples { public static void SDCA_BinaryClassification() { @@ -43,7 +48,7 @@ public static void SDCA_BinaryClassification() // Then append a binary classifier, setting the "Label" column as the label of the dataset, and // the "Features" column produced by FeaturizeText as the features column. var pipeline = mlContext.Transforms.Text.FeaturizeText("SentimentText", "Features") - .Append(mlContext.BinaryClassification.Trainers.StochasticDualCoordinateAscent(labelColumn: "Sentiment", featureColumn: "Features", l2Const: 0.001f)); + .Append(mlContext.BinaryClassification.Trainers.StochasticDualCoordinateAscent(label: "Sentiment", features: "Features", l2Const: 0.001f)); // Step 3: Run Cross-Validation on this pipeline. var cvResults = mlContext.BinaryClassification.CrossValidate(data, pipeline, labelColumn: "Sentiment"); @@ -55,8 +60,8 @@ public static void SDCA_BinaryClassification() // we could do so by tweaking the 'advancedSetting'. var advancedPipeline = mlContext.Transforms.Text.FeaturizeText("SentimentText", "Features") .Append(mlContext.BinaryClassification.Trainers.StochasticDualCoordinateAscent - (labelColumn: "Sentiment", - featureColumn: "Features", + (label: "Sentiment", + features: "Features", advancedSettings: s=> { s.ConvergenceTolerance = 0.01f; // The learning rate for adjusting bias from being regularized diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/SsaChangePointDetectorTransform.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/SsaChangePointDetectorTransform.cs deleted file mode 100644 index 42bc17e54f..0000000000 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/SsaChangePointDetectorTransform.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Api; -using Microsoft.ML.Runtime.TimeSeriesProcessing; - -namespace Microsoft.ML.Samples.Dynamic -{ - public partial class TransformSamples - { - class SsaChangePointData - { - public float Value; - - public SsaChangePointData(float value) - { - Value = value; - } - } - - // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). - // SsaChangePointDetector is applied then to identify points where data distribution changed. - public static void SsaChangePointDetectorTransform() - { - // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, - // as well as the source of randomness. - var ml = new MLContext(); - - // Generate sample series data with a change - const int size = 16; - var data = new List(size); - for (int i = 0; i < size / 2; i++) - data.Add(new SsaChangePointData(5)); - // This is a change point - for (int i = 0; i < size / 2; i++) - data.Add(new SsaChangePointData(7)); - - // Convert data to IDataView. - var dataView = ml.CreateStreamingDataView(data); - - // Setup IidSpikeDetector arguments - string outputColumnName = "Prediction"; - string inputColumnName = "Value"; - var args = new SsaChangePointDetector.Arguments() - { - Source = inputColumnName, - Name = outputColumnName, - Confidence = 95, // The confidence for spike detection in the range [0, 100] - ChangeHistoryLength = size / 4, // The length of the sliding window on p-values for computing the martingale score. - TrainingWindowSize = size / 2, // The number of points from the beginning of the sequence used for training. - SeasonalWindowSize = size / 8, // An upper bound on the largest relevant seasonality in the input time - series." - }; - - // The transformed data. - var transformedData = new SsaChangePointEstimator(ml, args).Fit(dataView).Transform(dataView); - - // Getting the data of the newly created column as an IEnumerable of ChangePointPrediction. - var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); - - Console.WriteLine($"{outputColumnName} column obtained post-transformation."); - Console.WriteLine("Data\tAlert\tScore\tP-Value\tMartingale value"); - int k = 0; - foreach (var prediction in predictionColumn) - Console.WriteLine("{0}\t{1}\t{2:0.00}\t{3:0.00}\t{4:0.00}", data[k++].Value, prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2], prediction.Prediction[3]); - Console.WriteLine(""); - - // Prediction column obtained post-transformation. - // Data Alert Score P-Value Martingale value - // 5 0 0.00 0.50 0.00 - // 5 0 0.00 0.50 0.00 - // 5 0 0.00 0.50 0.00 - // 5 0 0.00 0.50 0.00 - // 5 0 0.00 0.50 0.00 - // 5 0 0.00 0.50 0.00 - // 5 0 0.00 0.50 0.00 - // 5 0 0.00 0.50 0.00 - // 7 1 2.00 0.00 10298.67 <-- alert is on, predicted changepoint - // 7 0 1.00 0.31 15741.58 - // 7 0 0.00 0.28 26487.48 - // 7 0 0.00 0.28 44569.02 - // 7 0 0.00 0.28 0.01 - // 7 0 0.00 0.38 0.01 - // 7 0 0.00 0.50 0.00 - // 7 0 0.00 0.50 0.00 - } - } -} diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/SsaSpikeDetectorTransform.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/SsaSpikeDetectorTransform.cs deleted file mode 100644 index 82ff8a891f..0000000000 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/SsaSpikeDetectorTransform.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Api; -using Microsoft.ML.Runtime.TimeSeriesProcessing; - -namespace Microsoft.ML.Samples.Dynamic -{ - public partial class TransformSamples - { - class SsaSpikeData - { - public float Value; - - public SsaSpikeData(float value) - { - Value = value; - } - } - - class SsaSpikePrediction - { - [VectorType(3)] - public double[] Prediction { get; set; } - } - - // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). - // SsaSpikeDetector is applied then to identify spiking points in the series. - public static void SsaSpikeDetectorTransform() - { - // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, - // as well as the source of randomness. - var ml = new MLContext(); - - // Generate sample series data with a spike - const int size = 16; - var data = new List(size); - for (int i = 0; i < size / 2; i++) - data.Add(new SsaSpikeData(5)); - // This is a spike - data.Add(new SsaSpikeData(10)); - for (int i = 0; i < size / 2; i++) - data.Add(new SsaSpikeData(5)); - - // Convert data to IDataView. - var dataView = ml.CreateStreamingDataView(data); - - // Setup IidSpikeDetector arguments - string outputColumnName = "Prediction"; - string inputColumnName = "Value"; - var args = new SsaSpikeDetector.Arguments() - { - Source = inputColumnName, - Name = outputColumnName, - Confidence = 95, // The confidence for spike detection in the range [0, 100] - PvalueHistoryLength = size / 4, // The size of the sliding window for computing the p-value - TrainingWindowSize = size / 2, // The number of points from the beginning of the sequence used for training. - SeasonalWindowSize = size / 8, // An upper bound on the largest relevant seasonality in the input time - series." - }; - - // The transformed data. - var transformedData = new SsaSpikeEstimator(ml, args).Fit(dataView).Transform(dataView); - - // Getting the data of the newly created column as an IEnumerable of SsaSpikePrediction. - var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); - - Console.WriteLine($"{outputColumnName} column obtained post-transformation."); - Console.WriteLine("Alert\tScore\tP-Value"); - foreach (var prediction in predictionColumn) - Console.WriteLine("{0}\t{1:0.00}\t{2:0.00}", prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2]); - Console.WriteLine(""); - - // Prediction column obtained post-transformation. - // Alert Score P-Value - // 0 0.00 0.50 - // 0 0.00 0.50 - // 0 0.00 0.50 - // 0 0.00 0.50 - // 0 0.00 0.50 - // 0 0.00 0.50 - // 0 0.00 0.50 - // 0 0.00 0.50 - // 1 5.00 0.00 <-- alert is on, predicted spike - // 0 -2.50 0.09 - // 0 -2.50 0.22 - // 0 0.00 0.47 - // 0 0.00 0.47 - // 0 0.00 0.26 - // 0 0.00 0.38 - // 0 0.00 0.50 - // 0 0.00 0.50 - } - } -} diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/TextTransform.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/TextTransform.cs index 57fbc7e493..a77bb703e0 100644 --- a/docs/samples/Microsoft.ML.Samples/Dynamic/TextTransform.cs +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/TextTransform.cs @@ -1,13 +1,18 @@ -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Api; -using Microsoft.ML.Data; -using Microsoft.ML.Transforms.Text; -using System; -using System.Collections.Generic; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + + // the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. + using Microsoft.ML.Runtime.Data; + using Microsoft.ML.Runtime.Api; + using Microsoft.ML.Data; + using Microsoft.ML.Transforms.Text; + using System; + using System.Collections.Generic; namespace Microsoft.ML.Samples.Dynamic { - public class TextTransformExample + public partial class TransformSamples { public static void TextTransform() { @@ -51,7 +56,7 @@ public static void TextTransform() Console.WriteLine($"{columnName} column obtained post-transformation."); foreach (var featureRow in column) { - foreach (var value in featureRow.GetValues()) + foreach (var value in featureRow.Values) Console.Write($"{value} "); Console.WriteLine(""); } diff --git a/docs/samples/Microsoft.ML.Samples/Dynamic/Timeseries.cs b/docs/samples/Microsoft.ML.Samples/Dynamic/Timeseries.cs new file mode 100644 index 0000000000..bebabfc331 --- /dev/null +++ b/docs/samples/Microsoft.ML.Samples/Dynamic/Timeseries.cs @@ -0,0 +1,295 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + + // the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. + using System; + using System.Linq; + using System.Collections.Generic; + using Microsoft.ML.Runtime.Data; + using Microsoft.ML.Runtime.Api; + using Microsoft.ML.Runtime.TimeSeriesProcessing; + +namespace Microsoft.ML.Samples.Dynamic +{ + public partial class TransformSamples + { + class SpikePrediction + { + [VectorType(3)] + public double[] Prediction { get; set; } + } + + class ChangePointPrediction + { + [VectorType(4)] + public double[] Prediction { get; set; } + } + + class Data + { + public float Value; + + public Data(float value) + { + Value = value; + } + } + + // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). + // IidSpikeDetector is applied then to identify spiking points in the series. + public static void IidSpikeDetectorTransform() + { + // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, + // as well as the source of randomness. + var ml = new MLContext(); + + // Generate sample series data with a spike + const int size = 10; + var data = new List(size); + for (int i = 0; i < size / 2; i++) + data.Add(new Data(5)); + // This is a spike + data.Add(new Data(10)); + for (int i = 0; i < size / 2; i++) + data.Add(new Data(5)); + + // Convert data to IDataView. + var dataView = ml.CreateStreamingDataView(data); + + // Setup IidSpikeDetector arguments + string outputColumnName = "Prediction"; + string inputColumnName = "Value"; + var args = new IidSpikeDetector.Arguments() + { + Source = inputColumnName, + Name = outputColumnName, + Confidence = 95, // The confidence for spike detection in the range [0, 100] + PvalueHistoryLength = size / 4 // The size of the sliding window for computing the p-value + }; + + // The transformed data. + var transformedData = new IidSpikeEstimator(ml, args).Fit(dataView).Transform(dataView); + + // Getting the data of the newly created column as an IEnumerable of SpikePrediction. + var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); + + Console.WriteLine($"{outputColumnName} column obtained post-transformation."); + Console.WriteLine("Alert\tScore\tP-Value"); + foreach (var prediction in predictionColumn) + Console.WriteLine("{0}\t{1:0.00}\t{2:0.00}", prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2]); + Console.WriteLine(""); + + // Prediction column obtained post-transformation. + // Alert Score P-Value + // 0 5.00 0.50 + // 0 5.00 0.50 + // 0 5.00 0.50 + // 0 5.00 0.50 + // 0 5.00 0.50 + // 1 10.00 0.00 <-- alert is on, predicted spike + // 0 5.00 0.26 + // 0 5.00 0.26 + // 0 5.00 0.50 + // 0 5.00 0.50 + // 0 5.00 0.50 + } + + // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). + // SsaSpikeDetector is applied then to identify spiking points in the series. + public static void SsaSpikeDetectorTransform() + { + // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, + // as well as the source of randomness. + var ml = new MLContext(); + + // Generate sample series data with a spike + const int size = 16; + var data = new List(size); + for (int i = 0; i < size / 2; i++) + data.Add(new Data(5)); + // This is a spike + data.Add(new Data(10)); + for (int i = 0; i < size / 2; i++) + data.Add(new Data(5)); + + // Convert data to IDataView. + var dataView = ml.CreateStreamingDataView(data); + + // Setup IidSpikeDetector arguments + string outputColumnName = "Prediction"; + string inputColumnName = "Value"; + var args = new SsaSpikeDetector.Arguments() + { + Source = inputColumnName, + Name = outputColumnName, + Confidence = 95, // The confidence for spike detection in the range [0, 100] + PvalueHistoryLength = size / 4, // The size of the sliding window for computing the p-value + TrainingWindowSize = size / 2, // The number of points from the beginning of the sequence used for training. + SeasonalWindowSize = size / 8, // An upper bound on the largest relevant seasonality in the input time - series." + }; + + // The transformed data. + var transformedData = new SsaSpikeEstimator(ml, args).Fit(dataView).Transform(dataView); + + // Getting the data of the newly created column as an IEnumerable of SpikePrediction. + var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); + + Console.WriteLine($"{outputColumnName} column obtained post-transformation."); + Console.WriteLine("Alert\tScore\tP-Value"); + foreach (var prediction in predictionColumn) + Console.WriteLine("{0}\t{1:0.00}\t{2:0.00}", prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2]); + Console.WriteLine(""); + + // Prediction column obtained post-transformation. + // Alert Score P-Value + // 0 0.00 0.50 + // 0 0.00 0.50 + // 0 0.00 0.50 + // 0 0.00 0.50 + // 0 0.00 0.50 + // 0 0.00 0.50 + // 0 0.00 0.50 + // 0 0.00 0.50 + // 1 5.00 0.00 <-- alert is on, predicted spike + // 0 -2.50 0.09 + // 0 -2.50 0.22 + // 0 0.00 0.47 + // 0 0.00 0.47 + // 0 0.00 0.26 + // 0 0.00 0.38 + // 0 0.00 0.50 + // 0 0.00 0.50 + } + + // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). + // SsaChangePointDetector is applied then to identify points where data distribution changed. + public static void SsaChangePointDetectorTransform() + { + // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, + // as well as the source of randomness. + var ml = new MLContext(); + + // Generate sample series data with a change + const int size = 16; + var data = new List(size); + for (int i = 0; i < size / 2; i++) + data.Add(new Data(5)); + // This is a change point + for (int i = 0; i < size / 2; i++) + data.Add(new Data(7)); + + // Convert data to IDataView. + var dataView = ml.CreateStreamingDataView(data); + + // Setup IidSpikeDetector arguments + string outputColumnName = "Prediction"; + string inputColumnName = "Value"; + var args = new SsaChangePointDetector.Arguments() + { + Source = inputColumnName, + Name = outputColumnName, + Confidence = 95, // The confidence for spike detection in the range [0, 100] + ChangeHistoryLength = size / 4, // The length of the sliding window on p-values for computing the martingale score. + TrainingWindowSize = size / 2, // The number of points from the beginning of the sequence used for training. + SeasonalWindowSize = size / 8, // An upper bound on the largest relevant seasonality in the input time - series." + }; + + // The transformed data. + var transformedData = new SsaChangePointEstimator(ml, args).Fit(dataView).Transform(dataView); + + // Getting the data of the newly created column as an IEnumerable of ChangePointPrediction. + var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); + + Console.WriteLine($"{outputColumnName} column obtained post-transformation."); + Console.WriteLine("Data\tAlert\tScore\tP-Value\tMartingale value"); + int k = 0; + foreach (var prediction in predictionColumn) + Console.WriteLine("{0}\t{1}\t{2:0.00}\t{3:0.00}\t{4:0.00}", data[k++].Value, prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2], prediction.Prediction[3]); + Console.WriteLine(""); + + // Prediction column obtained post-transformation. + // Data Alert Score P-Value Martingale value + // 5 0 0.00 0.50 0.00 + // 5 0 0.00 0.50 0.00 + // 5 0 0.00 0.50 0.00 + // 5 0 0.00 0.50 0.00 + // 5 0 0.00 0.50 0.00 + // 5 0 0.00 0.50 0.00 + // 5 0 0.00 0.50 0.00 + // 5 0 0.00 0.50 0.00 + // 7 1 2.00 0.00 10298.67 <-- alert is on, predicted changepoint + // 7 0 1.00 0.31 15741.58 + // 7 0 0.00 0.28 26487.48 + // 7 0 0.00 0.28 44569.02 + // 7 0 0.00 0.28 0.01 + // 7 0 0.00 0.38 0.01 + // 7 0 0.00 0.50 0.00 + // 7 0 0.00 0.50 0.00 + } + + // This example creates a time series (list of Data with the i-th element corresponding to the i-th time slot). + // IidChangePointDetector is applied then to identify points where data distribution changed. + public static void IidChangePointDetectorTransform() + { + // Create a new ML context, for ML.NET operations. It can be used for exception tracking and logging, + // as well as the source of randomness. + var ml = new MLContext(); + + // Generate sample series data with a change + const int size = 16; + var data = new List(size); + for (int i = 0; i < size / 2; i++) + data.Add(new Data(5)); + // This is a change point + for (int i = 0; i < size / 2; i++) + data.Add(new Data(7)); + + // Convert data to IDataView. + var dataView = ml.CreateStreamingDataView(data); + + // Setup IidSpikeDetector arguments + string outputColumnName = "Prediction"; + string inputColumnName = "Value"; + var args = new IidChangePointDetector.Arguments() + { + Source = inputColumnName, + Name = outputColumnName, + Confidence = 95, // The confidence for spike detection in the range [0, 100] + ChangeHistoryLength = size / 4, // The length of the sliding window on p-values for computing the martingale score. + }; + + // The transformed data. + var transformedData = new IidChangePointEstimator(ml, args).Fit(dataView).Transform(dataView); + + // Getting the data of the newly created column as an IEnumerable of ChangePointPrediction. + var predictionColumn = transformedData.AsEnumerable(ml, reuseRowObject: false); + + Console.WriteLine($"{outputColumnName} column obtained post-transformation."); + Console.WriteLine("Data\tAlert\tScore\tP-Value\tMartingale value"); + int k = 0; + foreach (var prediction in predictionColumn) + Console.WriteLine("{0}\t{1}\t{2:0.00}\t{3:0.00}\t{4:0.00}", data[k++].Value, prediction.Prediction[0], prediction.Prediction[1], prediction.Prediction[2], prediction.Prediction[3]); + Console.WriteLine(""); + + // Prediction column obtained post-transformation. + // Data Alert Score P-Value Martingale value + // 5 0 5.00 0.50 0.00 + // 5 0 5.00 0.50 0.00 + // 5 0 5.00 0.50 0.00 + // 5 0 5.00 0.50 0.00 + // 5 0 5.00 0.50 0.00 + // 5 0 5.00 0.50 0.00 + // 5 0 5.00 0.50 0.00 + // 5 0 5.00 0.50 0.00 + // 7 1 7.00 0.00 10298.67 <-- alert is on, predicted changepoint + // 7 0 7.00 0.13 33950.16 + // 7 0 7.00 0.26 60866.34 + // 7 0 7.00 0.38 78362.04 + // 7 0 7.00 0.50 0.01 + // 7 0 7.00 0.50 0.00 + // 7 0 7.00 0.50 0.00 + // 7 0 7.00 0.50 0.00 + } + } +} diff --git a/docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj b/docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj index 6b3d9f957b..e1e2b6ea3f 100644 --- a/docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj +++ b/docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj @@ -6,7 +6,6 @@ - diff --git a/docs/samples/Microsoft.ML.Samples/Program.cs b/docs/samples/Microsoft.ML.Samples/Program.cs index 8dc2be6cd2..c2c9ef37a6 100644 --- a/docs/samples/Microsoft.ML.Samples/Program.cs +++ b/docs/samples/Microsoft.ML.Samples/Program.cs @@ -1,4 +1,8 @@ -using Microsoft.ML.Samples.Dynamic; +// Licensed to the .NET Foundation under one or more agreements. +// 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.Samples.Dynamic; namespace Microsoft.ML.Samples { @@ -6,7 +10,7 @@ internal static class Program { static void Main(string[] args) { - NormalizerExample.Normalizer(); + TransformSamples.KeyToValue_Term(); } } } diff --git a/docs/samples/Microsoft.ML.Samples/Static/AveragedPerceptronBinaryClassification.cs b/docs/samples/Microsoft.ML.Samples/Static/AveragedPerceptronBinaryClassification.cs index d2359526e9..b05e80cc3d 100644 --- a/docs/samples/Microsoft.ML.Samples/Static/AveragedPerceptronBinaryClassification.cs +++ b/docs/samples/Microsoft.ML.Samples/Static/AveragedPerceptronBinaryClassification.cs @@ -1,12 +1,20 @@ -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.StaticPipe; -using Microsoft.ML.Transforms; -using Microsoft.ML.Transforms.Categorical; -using System; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. + using Microsoft.ML.Runtime.Data; + using Microsoft.ML.StaticPipe; + using Microsoft.ML.Transforms; + using Microsoft.ML.Transforms.Categorical; + using System; + +// NOTE: WHEN ADDING TO THE FILE, ALWAYS APPEND TO THE END OF IT. +// If you change the existing content, check that the files referencing it in the XML documentation are still correct, as they reference +// line by line. namespace Microsoft.ML.Samples.Static { - public class AveragedPerceptronBinaryClassificationExample + public partial class TrainersSamples { public static void AveragedPerceptronBinaryClassification() { diff --git a/docs/samples/Microsoft.ML.Samples/Static/FastTreeBinaryClassification.cs b/docs/samples/Microsoft.ML.Samples/Static/FastTreeBinaryClassification.cs index 939bf3d4f2..7abde9de23 100644 --- a/docs/samples/Microsoft.ML.Samples/Static/FastTreeBinaryClassification.cs +++ b/docs/samples/Microsoft.ML.Samples/Static/FastTreeBinaryClassification.cs @@ -1,12 +1,20 @@ -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.StaticPipe; -using Microsoft.ML.Transforms; -using Microsoft.ML.Transforms.Categorical; -using System; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. + using Microsoft.ML.Runtime.Data; + using Microsoft.ML.StaticPipe; + using Microsoft.ML.Transforms; + using Microsoft.ML.Transforms.Categorical; + using System; + +// NOTE: WHEN ADDING TO THE FILE, ALWAYS APPEND TO THE END OF IT. +// If you change the existing content, check that the files referencing it in the XML documentation are still correct, as they reference +// line by line. namespace Microsoft.ML.Samples.Static { - public class FastTreeBinaryClassificationExample + public partial class TrainersSamples { public static void FastTreeBinaryClassification() { @@ -81,7 +89,7 @@ public static void FastTreeBinaryClassification() row.Features, numTrees: 100, // try: (int) 20-2000 numLeaves: 20, // try: (int) 2-128 - minDatapointsInLeaves: 10, // try: (int) 1-100 + minDatapointsInLeafs: 10, // try: (int) 1-100 learningRate: 0.2))) // try: (float) 0.025-0.4 .Append(row => ( Label: row.Label, diff --git a/docs/samples/Microsoft.ML.Samples/Static/FastTreeRegression.cs b/docs/samples/Microsoft.ML.Samples/Static/FastTreeRegression.cs index 66ddc6772c..639fec5990 100644 --- a/docs/samples/Microsoft.ML.Samples/Static/FastTreeRegression.cs +++ b/docs/samples/Microsoft.ML.Samples/Static/FastTreeRegression.cs @@ -1,12 +1,20 @@ -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Trainers.FastTree; -using Microsoft.ML.StaticPipe; -using System; -using System.Linq; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + // the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. + using Microsoft.ML.Runtime.Data; + using Microsoft.ML.Trainers.FastTree; + using Microsoft.ML.StaticPipe; + using System; + using System.Linq; + +// NOTE: WHEN ADDING TO THE FILE, ALWAYS APPEND TO THE END OF IT. +// If you change the existinc content, check that the files referencing it in the XML documentation are still correct, as they reference +// line by line. namespace Microsoft.ML.Samples.Static { - public class FastTreeRegressionExample + public partial class TrainersSamples { public static void FastTreeRegression() { @@ -39,7 +47,7 @@ public static void FastTreeRegression() r.features, numTrees: 100, // try: (int) 20-2000 numLeaves: 20, // try: (int) 2-128 - minDatapointsInLeaves: 10, // try: (int) 1-100 + minDatapointsInLeafs: 10, // try: (int) 1-100 learningRate: 0.2, // try: (float) 0.025-0.4 onFit: p => pred = p) ) diff --git a/docs/samples/Microsoft.ML.Samples/Static/LightGBMBinaryClassification.cs b/docs/samples/Microsoft.ML.Samples/Static/LightGBMBinaryClassification.cs index 7d0dd18d47..3ac05caed0 100644 --- a/docs/samples/Microsoft.ML.Samples/Static/LightGBMBinaryClassification.cs +++ b/docs/samples/Microsoft.ML.Samples/Static/LightGBMBinaryClassification.cs @@ -1,12 +1,20 @@ -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.StaticPipe; -using Microsoft.ML.Transforms; -using Microsoft.ML.Transforms.Categorical; -using System; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. + using Microsoft.ML.Runtime.Data; + using Microsoft.ML.StaticPipe; + using Microsoft.ML.Transforms; + using Microsoft.ML.Transforms.Categorical; + using System; + +// NOTE: WHEN ADDING TO THE FILE, ALWAYS APPEND TO THE END OF IT. +// If you change the existing content, check that the files referencing it in the XML documentation are still correct, as they reference +// line by line. namespace Microsoft.ML.Samples.Static { - public class LightGbmBinaryClassificationExample + public partial class TrainersSamples { public static void LightGbmBinaryClassification() { diff --git a/docs/samples/Microsoft.ML.Samples/Static/LightGBMRegression.cs b/docs/samples/Microsoft.ML.Samples/Static/LightGBMRegression.cs index ca257d864f..c9548b03c5 100644 --- a/docs/samples/Microsoft.ML.Samples/Static/LightGBMRegression.cs +++ b/docs/samples/Microsoft.ML.Samples/Static/LightGBMRegression.cs @@ -1,11 +1,19 @@ -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.LightGBM; -using Microsoft.ML.StaticPipe; -using System; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + // the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. + using Microsoft.ML.Runtime.Data; + using Microsoft.ML.Runtime.LightGBM; + using Microsoft.ML.StaticPipe; + using System; + +// NOTE: WHEN ADDING TO THE FILE, ALWAYS APPEND TO THE END OF IT. +// If you change the existinc content, check that the files referencing it in the XML documentation are still correct, as they reference +// line by line. namespace Microsoft.ML.Samples.Static { - public class LightGbmRegressionExample + public partial class TrainersSamples { public static void LightGbmRegression() { @@ -51,9 +59,8 @@ public static void LightGbmRegression() VBuffer weights = default; pred.GetFeatureWeights(ref weights); - var weightsValues = weights.GetValues(); - Console.WriteLine($"weight 0 - {weightsValues[0]}"); - Console.WriteLine($"weight 1 - {weightsValues[1]}"); + Console.WriteLine($"weight 0 - {weights.Values[0]}"); + Console.WriteLine($"weight 1 - {weights.Values[1]}"); // Evaluate how the model is doing on the test data var dataWithPredictions = model.Transform(testData); diff --git a/docs/samples/Microsoft.ML.Samples/Static/SDCABinaryClassification.cs b/docs/samples/Microsoft.ML.Samples/Static/SDCABinaryClassification.cs index a475090551..630d982ba4 100644 --- a/docs/samples/Microsoft.ML.Samples/Static/SDCABinaryClassification.cs +++ b/docs/samples/Microsoft.ML.Samples/Static/SDCABinaryClassification.cs @@ -1,12 +1,20 @@ -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.StaticPipe; -using Microsoft.ML.Transforms; -using Microsoft.ML.Transforms.Categorical; -using System; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. + using Microsoft.ML.Runtime.Data; + using Microsoft.ML.StaticPipe; + using Microsoft.ML.Transforms; + using Microsoft.ML.Transforms.Categorical; + using System; + +// NOTE: WHEN ADDING TO THE FILE, ALWAYS APPEND TO THE END OF IT. +// If you change the existing content, check that the files referencing it in the XML documentation are still correct, as they reference +// line by line. namespace Microsoft.ML.Samples.Static { - public class SdcaBinaryClassificationExample + public partial class TrainersSamples { public static void SdcaBinaryClassification() { diff --git a/docs/samples/Microsoft.ML.Samples/Static/SDCARegression.cs b/docs/samples/Microsoft.ML.Samples/Static/SDCARegression.cs index 4d35a28257..60f1049165 100644 --- a/docs/samples/Microsoft.ML.Samples/Static/SDCARegression.cs +++ b/docs/samples/Microsoft.ML.Samples/Static/SDCARegression.cs @@ -1,11 +1,19 @@ -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Learners; -using Microsoft.ML.StaticPipe; -using System; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +// the alignment of the usings with the methods is intentional so they can display on the same level in the docs site. + using Microsoft.ML.Runtime.Data; + using Microsoft.ML.Runtime.Learners; + using Microsoft.ML.StaticPipe; + using System; + +// NOTE: WHEN ADDING TO THE FILE, ALWAYS APPEND TO THE END OF IT. +// If you change the existing content, check that the files referencing it in the XML documentation are still correct, as they reference +// line by line. namespace Microsoft.ML.Samples.Static { - public class SdcaRegressionExample + public partial class TrainersSamples { public static void SdcaRegression() { @@ -49,9 +57,8 @@ public static void SdcaRegression() VBuffer weights = default; pred.GetFeatureWeights(ref weights); - var weightsValues = weights.GetValues(); - Console.WriteLine($"weight 0 - {weightsValues[0]}"); - Console.WriteLine($"weight 1 - {weightsValues[1]}"); + Console.WriteLine($"weight 0 - {weights.Values[0]}"); + Console.WriteLine($"weight 1 - {weights.Values[1]}"); // Evaluate how the model is doing on the test data var dataWithPredictions = model.Transform(testData); diff --git a/pkg/Microsoft.ML/Microsoft.ML.nupkgproj b/pkg/Microsoft.ML/Microsoft.ML.nupkgproj index f479d0e970..75517c587e 100644 --- a/pkg/Microsoft.ML/Microsoft.ML.nupkgproj +++ b/pkg/Microsoft.ML/Microsoft.ML.nupkgproj @@ -8,7 +8,6 @@ - diff --git a/src/Microsoft.ML.Core/ComponentModel/AssemblyLoadingUtils.cs b/src/Common/AssemblyLoadingUtils.cs similarity index 97% rename from src/Microsoft.ML.Core/ComponentModel/AssemblyLoadingUtils.cs rename to src/Common/AssemblyLoadingUtils.cs index e947776bc9..ab2f2c563a 100644 --- a/src/Microsoft.ML.Core/ComponentModel/AssemblyLoadingUtils.cs +++ b/src/Common/AssemblyLoadingUtils.cs @@ -6,13 +6,11 @@ using System; using System.IO; using System.IO.Compression; +using System.Linq; using System.Reflection; namespace Microsoft.ML.Runtime { - [Obsolete("The usage for this is intended for the internal command line utilities and is not intended for anything related to the API. " + - "Please consider another way of doing whatever it is you're attempting to accomplish.")] - [BestFriend] internal static class AssemblyLoadingUtils { /// diff --git a/src/Microsoft.ML.Api/ComponentCreation.cs b/src/Microsoft.ML.Api/ComponentCreation.cs index e83cfe10b6..a6e97af41d 100644 --- a/src/Microsoft.ML.Api/ComponentCreation.cs +++ b/src/Microsoft.ML.Api/ComponentCreation.cs @@ -150,6 +150,46 @@ public static BatchPredictionEngine CreateBatchPredictionEngine(env, dataPipe, ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition); } + /// + /// Create an on-demand prediction engine. + /// + /// The host environment to use. + /// The stream to deserialize the pipeline (transforms and predictor) from. + /// Whether to ignore missing columns in the data view. + /// The optional input schema. If null, the schema is inferred from the type. + /// The optional output schema. If null, the schema is inferred from the type. + public static PredictionEngine CreatePredictionEngine(this IHostEnvironment env, Stream modelStream, + bool ignoreMissingColumns = false, SchemaDefinition inputSchemaDefinition = null, SchemaDefinition outputSchemaDefinition = null) + where TSrc : class + where TDst : class, new() + { + Contracts.CheckValue(env, nameof(env)); + env.CheckValue(modelStream, nameof(modelStream)); + env.CheckValueOrNull(inputSchemaDefinition); + env.CheckValueOrNull(outputSchemaDefinition); + return new PredictionEngine(env, modelStream, ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition); + } + + /// + /// Create an on-demand prediction engine. + /// + /// The host environment to use. + /// The transformation pipe that may or may not include a scorer. + /// Whether to ignore missing columns in the data view. + /// The optional input schema. If null, the schema is inferred from the type. + /// The optional output schema. If null, the schema is inferred from the type. + public static PredictionEngine CreatePredictionEngine(this IHostEnvironment env, IDataView dataPipe, + bool ignoreMissingColumns = false, SchemaDefinition inputSchemaDefinition = null, SchemaDefinition outputSchemaDefinition = null) + where TSrc : class + where TDst : class, new() + { + Contracts.CheckValue(env, nameof(env)); + env.CheckValue(dataPipe, nameof(dataPipe)); + env.CheckValueOrNull(inputSchemaDefinition); + env.CheckValueOrNull(outputSchemaDefinition); + return new PredictionEngine(env, dataPipe, ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition); + } + /// /// Create an on-demand prediction engine. /// @@ -158,7 +198,7 @@ public static BatchPredictionEngine CreateBatchPredictionEngineWhether to ignore missing columns in the data view. /// The optional input schema. If null, the schema is inferred from the type. /// The optional output schema. If null, the schema is inferred from the type. - internal static PredictionEngine CreatePredictionEngine(this IHostEnvironment env, ITransformer transformer, + public static PredictionEngine CreatePredictionEngine(this IHostEnvironment env, ITransformer transformer, bool ignoreMissingColumns = false, SchemaDefinition inputSchemaDefinition = null, SchemaDefinition outputSchemaDefinition = null) where TSrc : class where TDst : class, new() @@ -170,6 +210,23 @@ internal static PredictionEngine CreatePredictionEngine( return new PredictionEngine(env, transformer, ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition); } + /// + /// Create a prediction engine. + /// This encapsulates the 'classic' prediction problem, where the input is denoted by the float array of features, + /// and the output is a float score. For binary classification predictors that can output probability, there are output + /// fields that report the predicted label and probability. + /// + /// The host environment to use. + /// The model stream to load pipeline from. + /// Number of features. + public static SimplePredictionEngine CreateSimplePredictionEngine(this IHostEnvironment env, Stream modelStream, int nFeatures) + { + Contracts.CheckValue(env, nameof(env)); + env.CheckValue(modelStream, nameof(modelStream)); + env.CheckParam(nFeatures > 0, nameof(nFeatures), "Number of features must be positive."); + return new SimplePredictionEngine(env, modelStream, nFeatures); + } + /// /// Load the transforms (but not loader) from the model steram and apply them to the specified data. /// It is acceptable to have no transforms in the model stream: in this case the original diff --git a/src/Microsoft.ML.Api/CustomMappingTransformer.cs b/src/Microsoft.ML.Api/CustomMappingTransformer.cs index e6b8734a1a..e39d3da3a9 100644 --- a/src/Microsoft.ML.Api/CustomMappingTransformer.cs +++ b/src/Microsoft.ML.Api/CustomMappingTransformer.cs @@ -26,12 +26,13 @@ public sealed class CustomMappingTransformer : ITransformer, ICanSav { private readonly IHost _host; private readonly Action _mapAction; + private readonly InternalSchemaDefinition _addedSchema; private readonly string _contractName; - internal InternalSchemaDefinition AddedSchema { get; } - internal SchemaDefinition InputSchemaDefinition { get; } + internal InternalSchemaDefinition AddedSchema => _addedSchema; public bool IsRowToRowMapper => true; + private readonly SchemaDefinition _inputSchemaDefinition; /// /// Create a custom mapping of input columns to output columns. /// @@ -51,14 +52,14 @@ public CustomMappingTransformer(IHostEnvironment env, Action mapActi _host.CheckValueOrNull(outputSchemaDefinition); _mapAction = mapAction; - InputSchemaDefinition = inputSchemaDefinition; + _inputSchemaDefinition = inputSchemaDefinition; var outSchema = outputSchemaDefinition == null ? InternalSchemaDefinition.Create(typeof(TDst), SchemaDefinition.Direction.Write) : InternalSchemaDefinition.Create(typeof(TDst), outputSchemaDefinition); _contractName = contractName; - AddedSchema = outSchema; + _addedSchema = outSchema; } public void Save(ModelSaveContext ctx) @@ -107,18 +108,18 @@ public Mapper(CustomMappingTransformer parent, Schema inputSchema) _inputSchema = inputSchema; var emptyDataView = new EmptyDataView(_host, inputSchema); - _typedSrc = TypedCursorable.Create(_host, emptyDataView, false, _parent.InputSchemaDefinition); + _typedSrc = TypedCursorable.Create(_host, emptyDataView, false, _parent._inputSchemaDefinition); } public Delegate[] CreateGetters(IRow input, Func activeOutput, out Action disposer) { disposer = null; // If no outputs are active, we short-circuit to empty array of getters. - var result = new Delegate[_parent.AddedSchema.Columns.Length]; + var result = new Delegate[_parent._addedSchema.Columns.Length]; if (!Enumerable.Range(0, result.Length).Any(activeOutput)) return result; - var dstRow = new DataViewConstructionUtils.InputRow(_host, _parent.AddedSchema); + var dstRow = new DataViewConstructionUtils.InputRow(_host, _parent._addedSchema); IRowReadableAs inputRow = _typedSrc.GetRow(input); TSrc src = new TSrc(); @@ -159,7 +160,7 @@ private Delegate GetDstGetter(IRow input, int colIndex, Action refreshAction) public Func GetDependencies(Func activeOutput) { - if (Enumerable.Range(0, _parent.AddedSchema.Columns.Length).Any(activeOutput)) + if (Enumerable.Range(0, _parent._addedSchema.Columns.Length).Any(activeOutput)) { // If any output column is requested, then we activate all input columns that we need. return _typedSrc.GetDependencies(col => false); @@ -170,7 +171,7 @@ public Func GetDependencies(Func activeOutput) public Schema.Column[] GetOutputColumns() { - var dstRow = new DataViewConstructionUtils.InputRow(_host, _parent.AddedSchema); + var dstRow = new DataViewConstructionUtils.InputRow(_host, _parent._addedSchema); // All the output columns of dstRow are our outputs. return Enumerable.Range(0, dstRow.Schema.ColumnCount).Select(x => dstRow.Schema[x]).ToArray(); } @@ -205,23 +206,6 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) var addedSchemaShape = SchemaShape.Create(new Schema(addedCols)); var result = inputSchema.Columns.ToDictionary(x => x.Name); - var inputDef = InternalSchemaDefinition.Create(typeof(TSrc), Transformer.InputSchemaDefinition); - foreach (var col in inputDef.Columns) - { - if (!result.TryGetValue(col.ColumnName, out var column)) - throw Contracts.ExceptSchemaMismatch(nameof(inputSchema), "input", col.ColumnName); - - SchemaShape.GetColumnTypeShape(col.ColumnType, out var vecKind, out var itemType, out var isKey); - // Special treatment for vectors: if we expect variable vector, we also allow fixed-size vector. - if (itemType != column.ItemType || isKey != column.IsKey - || vecKind == SchemaShape.Column.VectorKind.Scalar && column.Kind != SchemaShape.Column.VectorKind.Scalar - || vecKind == SchemaShape.Column.VectorKind.Vector && column.Kind != SchemaShape.Column.VectorKind.Vector - || vecKind == SchemaShape.Column.VectorKind.VariableVector && column.Kind == SchemaShape.Column.VectorKind.Scalar) - { - throw Contracts.ExceptSchemaMismatch(nameof(inputSchema), "input", col.ColumnName, col.ColumnType.ToString(), column.GetTypeString()); - } - } - foreach (var addedCol in addedSchemaShape.Columns) result[addedCol.Name] = addedCol; diff --git a/src/Microsoft.ML.Api/DataViewConstructionUtils.cs b/src/Microsoft.ML.Api/DataViewConstructionUtils.cs index 97844696c3..a4bc8cfda5 100644 --- a/src/Microsoft.ML.Api/DataViewConstructionUtils.cs +++ b/src/Microsoft.ML.Api/DataViewConstructionUtils.cs @@ -238,10 +238,11 @@ private Delegate CreateConvertingArrayGetterDelegate(Delegate peekDe { peek(GetCurrentRowObject(), Position, ref buf); var n = Utils.Size(buf); - var dstEditor = VBufferEditor.Create(ref dst, n); + dst = new VBuffer(n, Utils.Size(dst.Values) < n + ? new TDst[n] + : dst.Values, dst.Indices); for (int i = 0; i < n; i++) - dstEditor.Values[i] = convert(buf[i]); - dst = dstEditor.Commit(); + dst.Values[i] = convert(buf[i]); }); } @@ -266,10 +267,10 @@ private Delegate CreateDirectArrayGetterDelegate(Delegate peekDel) { peek(GetCurrentRowObject(), Position, ref buf); var n = Utils.Size(buf); - var dstEditor = VBufferEditor.Create(ref dst, n); + dst = new VBuffer(n, Utils.Size(dst.Values) < n ? new TDst[n] : dst.Values, + dst.Indices); if (buf != null) - buf.AsSpan(0, n).CopyTo(dstEditor.Values); - dst = dstEditor.Commit(); + Array.Copy(buf, dst.Values, n); }); } @@ -396,7 +397,7 @@ protected DataViewBase(IHostEnvironment env, string name, InternalSchemaDefiniti } } - public abstract long? GetRowCount(); + public abstract long? GetRowCount(bool lazy = true); public abstract IRowCursor GetRowCursor(Func predicate, IRandom rand = null); @@ -554,7 +555,7 @@ public override bool CanShuffle get { return true; } } - public override long? GetRowCount() + public override long? GetRowCount(bool lazy = true) { return _data.Count; } @@ -653,7 +654,7 @@ public override bool CanShuffle get { return false; } } - public override long? GetRowCount() + public override long? GetRowCount(bool lazy = true) { return (_data as ICollection)?.Count; } @@ -734,7 +735,7 @@ public override bool CanShuffle get { return false; } } - public override long? GetRowCount() + public override long? GetRowCount(bool lazy = true) { return null; } @@ -954,12 +955,11 @@ private void GetStringArray(ref VBuffer> dst) { var value = (string[])(object)Value; var n = Utils.Size(value); - var dstEditor = VBufferEditor.Create(ref dst, n); + dst = new VBuffer>(n, Utils.Size(dst.Values) < n ? new ReadOnlyMemory[n] : dst.Values, dst.Indices); for (int i = 0; i < n; i++) - dstEditor.Values[i] = value[i].AsMemory(); + dst.Values[i] = value[i].AsMemory(); - dst = dstEditor.Commit(); } private ValueGetter> GetArrayGetter() @@ -968,10 +968,9 @@ private ValueGetter> GetArrayGetter() var n = Utils.Size(value); return (ref VBuffer dst) => { - var dstEditor = VBufferEditor.Create(ref dst, n); + dst = new VBuffer(n, Utils.Size(dst.Values) < n ? new TDst[n] : dst.Values, dst.Indices); if (value != null) - value.AsSpan(0, n).CopyTo(dstEditor.Values); - dst = dstEditor.Commit(); + Array.Copy(value, dst.Values, n); }; } diff --git a/src/Microsoft.ML.Api/GenerateCodeCommand.cs b/src/Microsoft.ML.Api/GenerateCodeCommand.cs index 4855a94219..26136971af 100644 --- a/src/Microsoft.ML.Api/GenerateCodeCommand.cs +++ b/src/Microsoft.ML.Api/GenerateCodeCommand.cs @@ -24,7 +24,7 @@ namespace Microsoft.ML.Runtime.Api /// /// REVIEW: Consider adding support for generating VBuffers instead of arrays, maybe for high dimensionality vectors. /// - internal sealed class GenerateCodeCommand : ICommand + public sealed class GenerateCodeCommand : ICommand { public const string LoadName = "GenerateSamplePredictionCode"; private const string CodeTemplatePath = "Microsoft.ML.Api.GeneratedCodeTemplate.csresource"; diff --git a/src/Microsoft.ML.Api/PredictionEngine.cs b/src/Microsoft.ML.Api/PredictionEngine.cs index 14fb436893..2d05b3d89d 100644 --- a/src/Microsoft.ML.Api/PredictionEngine.cs +++ b/src/Microsoft.ML.Api/PredictionEngine.cs @@ -140,6 +140,12 @@ public sealed class PredictionEngine private readonly IRowReadableAs _outputRow; private readonly Action _disposer; + internal PredictionEngine(IHostEnvironment env, Stream modelStream, bool ignoreMissingColumns, + SchemaDefinition inputSchemaDefinition = null, SchemaDefinition outputSchemaDefinition = null) + : this(env, StreamChecker(env, modelStream), ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition) + { + } + private static Func StreamChecker(IHostEnvironment env, Stream modelStream) { env.CheckValue(modelStream, nameof(modelStream)); @@ -152,12 +158,29 @@ private static Func StreamChecker(IHostEnvironment env, }; } + internal PredictionEngine(IHostEnvironment env, IDataView dataPipe, bool ignoreMissingColumns, + SchemaDefinition inputSchemaDefinition = null, SchemaDefinition outputSchemaDefinition = null) + : this(env, new TransformWrapper(env, env.CheckRef(dataPipe, nameof(dataPipe))), ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition) + { + } + internal PredictionEngine(IHostEnvironment env, ITransformer transformer, bool ignoreMissingColumns, SchemaDefinition inputSchemaDefinition = null, SchemaDefinition outputSchemaDefinition = null) + : this(env, TransformerChecker(env, transformer), ignoreMissingColumns, inputSchemaDefinition, outputSchemaDefinition) + { + } + + private static Func TransformerChecker(IExceptionContext ectx, ITransformer transformer) + { + ectx.CheckValue(transformer, nameof(transformer)); + ectx.CheckParam(transformer.IsRowToRowMapper, nameof(transformer), "Must be a row to row mapper"); + return transformer.GetRowToRowMapper; + } + + private PredictionEngine(IHostEnvironment env, Func makeMapper, bool ignoreMissingColumns, + SchemaDefinition inputSchemaDefinition, SchemaDefinition outputSchemaDefinition) { Contracts.CheckValue(env, nameof(env)); - env.AssertValue(transformer); - var makeMapper = TransformerChecker(env, transformer); env.AssertValue(makeMapper); _inputRow = DataViewConstructionUtils.CreateInputRow(env, inputSchemaDefinition); @@ -167,13 +190,6 @@ internal PredictionEngine(IHostEnvironment env, ITransformer transformer, bool i _outputRow = cursorable.GetRow(outputRow); } - private static Func TransformerChecker(IExceptionContext ectx, ITransformer transformer) - { - ectx.CheckValue(transformer, nameof(transformer)); - ectx.CheckParam(transformer.IsRowToRowMapper, nameof(transformer), "Must be a row to row mapper"); - return transformer.GetRowToRowMapper; - } - ~PredictionEngine() { _disposer?.Invoke(); @@ -206,4 +222,76 @@ public void Predict(TSrc example, ref TDst prediction) _outputRow.FillValues(prediction); } } + + /// + /// This class encapsulates the 'classic' prediction problem, where the input is denoted by the float array of features, + /// and the output is a float score. For binary classification predictors that can output probability, there are output + /// fields that report the predicted label and probability. + /// + public sealed class SimplePredictionEngine + { + private class Example + { + // REVIEW: convert to VBuffer once we have support for them. + public Float[] Features; + } + + /// + /// The prediction output. For every field, if there are no column with the matched name in the scoring pipeline, + /// the field will be left intact by the engine (and keep 0 as value unless the user code changes it). + /// + public class Prediction + { + public Float Score; + public Float Probability; + } + + private readonly PredictionEngine _engine; + private readonly int _nFeatures; + + /// + /// Create a prediction engine. + /// + /// The host environment to use. + /// The model stream to load pipeline from. + /// Number of features. + /// Name of the features column. + internal SimplePredictionEngine(IHostEnvironment env, Stream modelStream, int nFeatures, string featureColumnName = "Features") + { + Contracts.AssertValue(env); + Contracts.AssertValue(modelStream); + Contracts.Assert(nFeatures > 0); + + _nFeatures = nFeatures; + var schema = + new SchemaDefinition + { + new SchemaDefinition.Column + { + MemberName = featureColumnName, + ColumnType = new VectorType(NumberType.Float, nFeatures) + } + }; + _engine = new PredictionEngine(env, modelStream, true, schema); + } + + /// + /// Score an example. + /// + /// The feature array of the example. + /// The prediction object. New object is created on every call. + public Prediction Predict(Float[] features) + { + Contracts.CheckValue(features, nameof(features)); + if (features.Length != _nFeatures) + throw Contracts.ExceptParam(nameof(features), "Number of features should be {0}, but it is {1}", _nFeatures, features.Length); + + var example = new Example { Features = features }; + return _engine.Predict(example); + } + public Prediction Predict(VBuffer features) + { + throw Contracts.ExceptNotImpl("VBuffers aren't supported yet."); + } + } } \ No newline at end of file diff --git a/src/Microsoft.ML.Api/StatefulFilterTransform.cs b/src/Microsoft.ML.Api/StatefulFilterTransform.cs index 9b93425f63..eb67085bc2 100644 --- a/src/Microsoft.ML.Api/StatefulFilterTransform.cs +++ b/src/Microsoft.ML.Api/StatefulFilterTransform.cs @@ -99,7 +99,7 @@ private StatefulFilterTransform(IHostEnvironment env, StatefulFilterTransform _bindings.Schema; - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { // REVIEW: currently stateful map is implemented via filter, and this is sub-optimal. return null; diff --git a/src/Microsoft.ML.Api/TypedCursor.cs b/src/Microsoft.ML.Api/TypedCursor.cs index a4a2e8b399..3450dd2bbf 100644 --- a/src/Microsoft.ML.Api/TypedCursor.cs +++ b/src/Microsoft.ML.Api/TypedCursor.cs @@ -2,12 +2,12 @@ // 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.Data; -using Microsoft.ML.Runtime.Internal.Utilities; using System; using System.Collections.Generic; using System.Linq; using System.Reflection; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Internal.Utilities; namespace Microsoft.ML.Runtime.Api { @@ -381,21 +381,21 @@ private Action CreateDirectVBufferSetter(IRow input, int col, Delega return row => { typedPeek(row, Position, ref buf); + value = new VBuffer(0, buf, value.Indices); getter(ref value); if (value.Length == Utils.Size(buf) && value.IsDense) { - // In this case, buf (which came from the input object) is the - // right size to represent the vector. - // Otherwise, we are either sparse (and need densifying), or value.GetValues() - // is a different length than buf. - value.CopyTo(buf); + // In this case, value.Values alone is enough to represent the vector. + // Otherwise, we are either sparse (and need densifying), or value.Values is too large, + // and we need to truncate. + buf = value.Values; } else { buf = new TDst[value.Length]; if (value.IsDense) - value.GetValues().CopyTo(buf); + Array.Copy(value.Values, buf, value.Length); else { foreach (var pair in value.Items(true)) @@ -528,6 +528,8 @@ public ICursor GetRootCursor() /// public static class CursoringUtils { + private const string NeedEnvObsoleteMessage = "This method is obsolete. Please use the overload that takes an additional 'env' argument. An environment can be created via new LocalEnvironment()."; + /// /// Generate a strongly-typed cursorable wrapper of the . /// @@ -548,6 +550,24 @@ public static ICursorable AsCursorable(this IDataView data, IHostEnv return TypedCursorable.Create(env, data, ignoreMissingColumns, schemaDefinition); } + /// + /// Generate a strongly-typed cursorable wrapper of the . + /// + /// The user-defined row type. + /// The underlying data view. + /// Whether to ignore the case when a requested column is not present in the data view. + /// Optional user-provided schema definition. If it is not present, the schema is inferred from the definition of T. + /// The cursorable wrapper of . + [Obsolete(NeedEnvObsoleteMessage)] + public static ICursorable AsCursorable(this IDataView data, bool ignoreMissingColumns = false, + SchemaDefinition schemaDefinition = null) + where TRow : class, new() + { + // REVIEW: Take an env as a parameter. + var env = new ConsoleEnvironment(); + return data.AsCursorable(env, ignoreMissingColumns, schemaDefinition); + } + /// /// Convert an into a strongly-typed . /// @@ -569,5 +589,24 @@ public static IEnumerable AsEnumerable(this IDataView data, IHostEnv var engine = new PipeEngine(env, data, ignoreMissingColumns, schemaDefinition); return engine.RunPipe(reuseRowObject); } + + /// + /// Convert an into a strongly-typed . + /// + /// The user-defined row type. + /// The underlying data view. + /// Whether to return the same object on every row, or allocate a new one per row. + /// Whether to ignore the case when a requested column is not present in the data view. + /// Optional user-provided schema definition. If it is not present, the schema is inferred from the definition of T. + /// The that holds the data in . It can be enumerated multiple times. + [Obsolete(NeedEnvObsoleteMessage)] + public static IEnumerable AsEnumerable(this IDataView data, bool reuseRowObject, + bool ignoreMissingColumns = false, SchemaDefinition schemaDefinition = null) + where TRow : class, new() + { + // REVIEW: Take an env as a parameter. + var env = new ConsoleEnvironment(); + return data.AsEnumerable(env, reuseRowObject, ignoreMissingColumns, schemaDefinition); + } } } diff --git a/src/Microsoft.ML.Core/CommandLine/ArgumentAttribute.cs b/src/Microsoft.ML.Core/CommandLine/ArgumentAttribute.cs index 70f9ec8d98..64fe3b5b80 100644 --- a/src/Microsoft.ML.Core/CommandLine/ArgumentAttribute.cs +++ b/src/Microsoft.ML.Core/CommandLine/ArgumentAttribute.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +// This is separated from CmdParser.cs + using System; using System.Linq; @@ -13,8 +15,7 @@ namespace Microsoft.ML.Runtime.CommandLine /// as the destination of command line argument parsing. ///
[AttributeUsage(AttributeTargets.Field)] - [BestFriend] - internal class ArgumentAttribute : Attribute + public class ArgumentAttribute : Attribute { public enum VisibilityType { @@ -23,8 +24,17 @@ public enum VisibilityType EntryPointsOnly } + private ArgumentType _type; private string _shortName; + private string _helpText; + private bool _hide; + private double _sortOrder; + private string _nullName; + private bool _isInputFileName; + private string _specialPurpose; + private VisibilityType _visibility; private string _name; + private Type _signatureType; /// /// Allows control of command line parsing. @@ -32,14 +42,17 @@ public enum VisibilityType /// Specifies the error checking to be done on the argument. public ArgumentAttribute(ArgumentType type) { - Type = type; - SortOrder = 150; + _type = type; + _sortOrder = 150; } /// /// The error checking to be done on the argument. /// - public ArgumentType Type { get; } + public ArgumentType Type + { + get { return _type; } + } /// /// The short name(s) of the argument. @@ -51,7 +64,7 @@ public ArgumentAttribute(ArgumentType type) /// public string ShortName { - get => _shortName; + get { return _shortName; } set { Contracts.Check(value == null || !(this is DefaultArgumentAttribute)); @@ -62,26 +75,54 @@ public string ShortName /// /// The help text for the argument. /// - public string HelpText { get; set; } + public string HelpText + { + get { return _helpText; } + set { _helpText = value; } + } - public bool Hide { get; set; } + public bool Hide + { + get { return _hide; } + set { _hide = value; } + } - public double SortOrder { get; set; } + public double SortOrder + { + get { return _sortOrder; } + set { _sortOrder = value; } + } - public string NullName { get; set; } + public string NullName + { + get { return _nullName; } + set { _nullName = value; } + } - public bool IsInputFileName { get; set; } + public bool IsInputFileName + { + get { return _isInputFileName; } + set { _isInputFileName = value; } + } /// /// Allows the GUI or other tools to inspect the intended purpose of the argument and pick a correct custom control. /// - public string Purpose { get; set; } + public string Purpose + { + get { return _specialPurpose; } + set { _specialPurpose = value; } + } - public VisibilityType Visibility { get; set; } + public VisibilityType Visibility + { + get { return _visibility; } + set { _visibility = value; } + } public string Name { - get => _name; + get { return _name; } set { _name = string.IsNullOrWhiteSpace(value) ? null : value; } } @@ -95,8 +136,15 @@ public string[] Aliases } } - public bool IsRequired => ArgumentType.Required == (Type & ArgumentType.Required); + public bool IsRequired + { + get { return ArgumentType.Required == (_type & ArgumentType.Required); } + } - public Type SignatureType { get; set; } + public Type SignatureType + { + get { return _signatureType; } + set { _signatureType = value; } + } } } \ No newline at end of file diff --git a/src/Microsoft.ML.Core/CommandLine/ArgumentType.cs b/src/Microsoft.ML.Core/CommandLine/ArgumentType.cs deleted file mode 100644 index 5840615fd5..0000000000 --- a/src/Microsoft.ML.Core/CommandLine/ArgumentType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace Microsoft.ML.Runtime.CommandLine -{ - /// - /// Used to control parsing of command line arguments. - /// - [Flags] - [BestFriend] - internal enum ArgumentType - { - /// - /// Indicates that this field is required. An error will be displayed - /// if it is not present when parsing arguments. - /// - Required = 0x01, - - /// - /// Only valid in conjunction with Multiple. - /// Duplicate values will result in an error. - /// - Unique = 0x02, - - /// - /// Inidicates that the argument may be specified more than once. - /// Only valid if the argument is a collection - /// - Multiple = 0x04, - - /// - /// The default type for non-collection arguments. - /// The argument is not required, but an error will be reported if it is specified more than once. - /// - AtMostOnce = 0x00, - - /// - /// For non-collection arguments, when the argument is specified more than - /// once no error is reported and the value of the argument is the last - /// value which occurs in the argument list. - /// - LastOccurenceWins = Multiple, - - /// - /// The default type for collection arguments. - /// The argument is permitted to occur multiple times, but duplicate - /// values will cause an error to be reported. - /// - MultipleUnique = Multiple | Unique, - } -} diff --git a/src/Microsoft.ML.Core/CommandLine/CharCursor.cs b/src/Microsoft.ML.Core/CommandLine/CharCursor.cs index d8a591331c..2ea5dbe8d5 100644 --- a/src/Microsoft.ML.Core/CommandLine/CharCursor.cs +++ b/src/Microsoft.ML.Core/CommandLine/CharCursor.cs @@ -6,7 +6,7 @@ namespace Microsoft.ML.Runtime.CommandLine { - internal sealed class CharCursor + public sealed class CharCursor { private readonly string _text; private readonly int _ichLim; diff --git a/src/Microsoft.ML.Core/CommandLine/CmdLexer.cs b/src/Microsoft.ML.Core/CommandLine/CmdLexer.cs index a5c14259a8..e7e6ae19cd 100644 --- a/src/Microsoft.ML.Core/CommandLine/CmdLexer.cs +++ b/src/Microsoft.ML.Core/CommandLine/CmdLexer.cs @@ -2,12 +2,13 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; using System.Text; +using Microsoft.ML.Runtime.Internal.Utilities; namespace Microsoft.ML.Runtime.CommandLine { - [BestFriend] - internal sealed class CmdLexer + public sealed class CmdLexer { private CharCursor _curs; diff --git a/src/Microsoft.ML.Core/CommandLine/CmdParser.cs b/src/Microsoft.ML.Core/CommandLine/CmdParser.cs index 81018dad3e..37fd791358 100644 --- a/src/Microsoft.ML.Core/CommandLine/CmdParser.cs +++ b/src/Microsoft.ML.Core/CommandLine/CmdParser.cs @@ -1,6 +1,132 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. +////////////////////////////////////////////////////////////////////////////// +// Command Line Argument Parser +// ---------------------------- +// Usage +// ----- +// +// Parsing command line arguments to a console application is a common problem. +// This library handles the common task of reading arguments from a command line +// and filling in the values in a type. +// +// To use this library, define a class whose fields represent the data that your +// application wants to receive from arguments on the command line. Then call +// CommandLine.ParseArguments() to fill the object with the data +// from the command line. Each field in the class defines a command line argument. +// The type of the field is used to validate the data read from the command line. +// The name of the field defines the name of the command line option. +// +// The parser can handle fields of the following types: +// +// - string +// - int +// - uint +// - bool +// - enum +// - array of the above type +// +// For example, suppose you want to read in the argument list for wc (word count). +// wc takes three optional boolean arguments: -l, -w, and -c and a list of files. +// +// You could parse these arguments using the following code: +// +// class WCArguments +// { +// public bool lines; +// public bool words; +// public bool chars; +// public string[] files; +// } +// +// class WC +// { +// static void Main(string[] args) +// { +// if (CommandLine.ParseArgumentsWithUsage(args, parsedArgs)) +// { +// // insert application code here +// } +// } +// } +// +// So you could call this aplication with the following command line to count +// lines in the foo and bar files: +// +// wc.exe /lines /files:foo /files:bar +// +// The program will display the following usage message when bad command line +// arguments are used: +// +// wc.exe -x +// +// Unrecognized command line argument '-x' +// /lines[+|-] short form /l +// /words[+|-] short form /w +// /chars[+|-] short form /c +// /files= short form /f +// @ Read response file for more options +// +// That was pretty easy. However, you realy want to omit the "/files:" for the +// list of files. The details of field parsing can be controled using custom +// attributes. The attributes which control parsing behaviour are: +// +// ArgumentAttribute +// - controls short name, long name, required, allow duplicates, default value +// and help text +// DefaultArgumentAttribute +// - allows omition of the "/name". +// - This attribute is allowed on only one field in the argument class. +// +// So for the wc.exe program we want this: +// +// using System; +// using Utilities; +// +// class WCArguments +// { +// [Argument(ArgumentType.AtMostOnce, HelpText="Count number of lines in the input text.")] +// public bool lines; +// [Argument(ArgumentType.AtMostOnce, HelpText="Count number of words in the input text.")] +// public bool words; +// [Argument(ArgumentType.AtMostOnce, HelpText="Count number of chars in the input text.")] +// public bool chars; +// [DefaultArgument(ArgumentType.MultipleUnique, HelpText="Input files to count.")] +// public string[] files; +// } +// +// class WC +// { +// static void Main(string[] args) +// { +// WCArguments parsedArgs = new WCArguments(); +// if (CommandLine.ParseArgumentsWithUsage(args, parsedArgs)) +// { +// // insert application code here +// } +// } +// } +// +// +// +// So now we have the command line we want: +// +// wc.exe /lines foo bar +// +// This will set lines to true and will set files to an array containing the +// strings "foo" and "bar". +// +// The new usage message becomes: +// +// wc.exe -x +// +// Unrecognized command line argument '-x' +// /lines[+|-] Count number of lines in the input text. (short form /l) +// /words[+|-] Count number of words in the input text. (short form /w) +// /chars[+|-] Count number of chars in the input text. (short form /c) +// @ Read response file for more options +// Input files to count. (short form /f) +// +// If you want more control over how error messages are reported, how /help is +// dealt with, etc you can instantiate the CommandLine.Parser class. using System; using System.Collections; @@ -16,15 +142,103 @@ namespace Microsoft.ML.Runtime.CommandLine { + /// + /// Used to control parsing of command line arguments. + /// + [Flags] + public enum ArgumentType + { + /// + /// Indicates that this field is required. An error will be displayed + /// if it is not present when parsing arguments. + /// + Required = 0x01, + + /// + /// Only valid in conjunction with Multiple. + /// Duplicate values will result in an error. + /// + Unique = 0x02, + + /// + /// Inidicates that the argument may be specified more than once. + /// Only valid if the argument is a collection + /// + Multiple = 0x04, + + /// + /// The default type for non-collection arguments. + /// The argument is not required, but an error will be reported if it is specified more than once. + /// + AtMostOnce = 0x00, + + /// + /// For non-collection arguments, when the argument is specified more than + /// once no error is reported and the value of the argument is the last + /// value which occurs in the argument list. + /// + LastOccurenceWins = Multiple, + + /// + /// The default type for collection arguments. + /// The argument is permitted to occur multiple times, but duplicate + /// values will cause an error to be reported. + /// + MultipleUnique = Multiple | Unique, + } + + /// + /// Indicates that this argument is the default argument. + /// '/' or '-' prefix only the argument value is specified. + /// The ShortName property should not be set for DefaultArgumentAttribute + /// instances. The LongName property is used for usage text only and + /// does not affect the usage of the argument. + /// + [AttributeUsage(AttributeTargets.Field)] + public class DefaultArgumentAttribute : ArgumentAttribute + { + /// + /// Indicates that this argument is the default argument. + /// + /// Specifies the error checking to be done on the argument. + public DefaultArgumentAttribute(ArgumentType type) + : base(type) + { + } + } + + /// + /// On an enum value - indicates that the value should not be shown in help or UI. + /// + [AttributeUsage(AttributeTargets.Field)] + public class HideEnumValueAttribute : Attribute + { + public HideEnumValueAttribute() + { + } + } + + /// + /// On an enum value - specifies the display name. + /// + [AttributeUsage(AttributeTargets.Field)] + public class EnumValueDisplayAttribute : Attribute + { + public readonly string Name; + + public EnumValueDisplayAttribute(string name) + { + Name = name; + } + } /// /// A delegate used in error reporting. /// - internal delegate void ErrorReporter(string message); + public delegate void ErrorReporter(string message); [Flags] - [BestFriend] - internal enum SettingsFlags + public enum SettingsFlags { None = 0x00, @@ -40,144 +254,13 @@ internal enum SettingsFlags /// /// This allows components to be created by name, signature type, and a settings string. /// - [BestFriend] - internal interface ICommandLineComponentFactory : IComponentFactory + public interface ICommandLineComponentFactory : IComponentFactory { Type SignatureType { get; } string Name { get; } string GetSettingsString(); } - ////////////////////////////////////////////////////////////////////////////// - // Command Line Argument Parser - // ---------------------------- - // Usage - // ----- - // - // Parsing command line arguments to a console application is a common problem. - // This library handles the common task of reading arguments from a command line - // and filling in the values in a type. - // - // To use this library, define a class whose fields represent the data that your - // application wants to receive from arguments on the command line. Then call - // CommandLine.ParseArguments() to fill the object with the data - // from the command line. Each field in the class defines a command line argument. - // The type of the field is used to validate the data read from the command line. - // The name of the field defines the name of the command line option. - // - // The parser can handle fields of the following types: - // - // - string - // - int - // - uint - // - bool - // - enum - // - array of the above type - // - // For example, suppose you want to read in the argument list for wc (word count). - // wc takes three optional boolean arguments: -l, -w, and -c and a list of files. - // - // You could parse these arguments using the following code: - // - // class WCArguments - // { - // public bool lines; - // public bool words; - // public bool chars; - // public string[] files; - // } - // - // class WC - // { - // static void Main(string[] args) - // { - // if (CommandLine.ParseArgumentsWithUsage(args, parsedArgs)) - // { - // // insert application code here - // } - // } - // } - // - // So you could call this aplication with the following command line to count - // lines in the foo and bar files: - // - // wc.exe /lines /files:foo /files:bar - // - // The program will display the following usage message when bad command line - // arguments are used: - // - // wc.exe -x - // - // Unrecognized command line argument '-x' - // /lines[+|-] short form /l - // /words[+|-] short form /w - // /chars[+|-] short form /c - // /files= short form /f - // @ Read response file for more options - // - // That was pretty easy. However, you realy want to omit the "/files:" for the - // list of files. The details of field parsing can be controled using custom - // attributes. The attributes which control parsing behaviour are: - // - // ArgumentAttribute - // - controls short name, long name, required, allow duplicates, default value - // and help text - // DefaultArgumentAttribute - // - allows omition of the "/name". - // - This attribute is allowed on only one field in the argument class. - // - // So for the wc.exe program we want this: - // - // using System; - // using Utilities; - // - // class WCArguments - // { - // [Argument(ArgumentType.AtMostOnce, HelpText="Count number of lines in the input text.")] - // public bool lines; - // [Argument(ArgumentType.AtMostOnce, HelpText="Count number of words in the input text.")] - // public bool words; - // [Argument(ArgumentType.AtMostOnce, HelpText="Count number of chars in the input text.")] - // public bool chars; - // [DefaultArgument(ArgumentType.MultipleUnique, HelpText="Input files to count.")] - // public string[] files; - // } - // - // class WC - // { - // static void Main(string[] args) - // { - // WCArguments parsedArgs = new WCArguments(); - // if (CommandLine.ParseArgumentsWithUsage(args, parsedArgs)) - // { - // // insert application code here - // } - // } - // } - // - // - // - // So now we have the command line we want: - // - // wc.exe /lines foo bar - // - // This will set lines to true and will set files to an array containing the - // strings "foo" and "bar". - // - // The new usage message becomes: - // - // wc.exe -x - // - // Unrecognized command line argument '-x' - // /lines[+|-] Count number of lines in the input text. (short form /l) - // /words[+|-] Count number of words in the input text. (short form /w) - // /chars[+|-] Count number of chars in the input text. (short form /c) - // @ Read response file for more options - // Input files to count. (short form /f) - // - // If you want more control over how error messages are reported, how /help is - // dealt with, etc you can instantiate the CommandLine.Parser class. - /// /// Parser for command line arguments. /// @@ -202,8 +285,7 @@ internal interface ICommandLineComponentFactory : IComponentFactory /// Arguments which are array types are collection arguments. Collection /// arguments can be specified multiple times. /// - [BestFriend] - internal sealed class CmdParser + public sealed class CmdParser { private const int SpaceBeforeParam = 2; private readonly ErrorReporter _reporter; diff --git a/src/Microsoft.ML.Core/CommandLine/DefaultArgumentAttribute.cs b/src/Microsoft.ML.Core/CommandLine/DefaultArgumentAttribute.cs deleted file mode 100644 index 2d676f1ece..0000000000 --- a/src/Microsoft.ML.Core/CommandLine/DefaultArgumentAttribute.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace Microsoft.ML.Runtime.CommandLine -{ - /// - /// Indicates that this argument is the default argument. - /// '/' or '-' prefix only the argument value is specified. - /// The ShortName property should not be set for DefaultArgumentAttribute - /// instances. The LongName property is used for usage text only and - /// does not affect the usage of the argument. - /// - [AttributeUsage(AttributeTargets.Field)] - [BestFriend] - internal class DefaultArgumentAttribute : ArgumentAttribute - { - /// - /// Indicates that this argument is the default argument. - /// - /// Specifies the error checking to be done on the argument. - public DefaultArgumentAttribute(ArgumentType type) - : base(type) - { - } - } -} diff --git a/src/Microsoft.ML.Core/CommandLine/EnumValueDisplayAttribute.cs b/src/Microsoft.ML.Core/CommandLine/EnumValueDisplayAttribute.cs deleted file mode 100644 index b6cf4254ca..0000000000 --- a/src/Microsoft.ML.Core/CommandLine/EnumValueDisplayAttribute.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace Microsoft.ML.Runtime.CommandLine -{ - /// - /// On an enum value - specifies the display name. - /// - [AttributeUsage(AttributeTargets.Field)] - [BestFriend] - internal class EnumValueDisplayAttribute : Attribute - { - public readonly string Name; - - public EnumValueDisplayAttribute(string name) - { - Name = name; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.ML.Core/CommandLine/HideEnumValueAttribute.cs b/src/Microsoft.ML.Core/CommandLine/HideEnumValueAttribute.cs deleted file mode 100644 index 964a5cc3f3..0000000000 --- a/src/Microsoft.ML.Core/CommandLine/HideEnumValueAttribute.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace Microsoft.ML.Runtime.CommandLine -{ - /// - /// On an enum value - indicates that the value should not be shown in help or UI. - /// - [AttributeUsage(AttributeTargets.Field)] - [BestFriend] - internal class HideEnumValueAttribute : Attribute - { - public HideEnumValueAttribute() - { - } - } -} \ No newline at end of file diff --git a/src/Microsoft.ML.Core/CommandLine/SpecialPurpose.cs b/src/Microsoft.ML.Core/CommandLine/Utils.cs similarity index 93% rename from src/Microsoft.ML.Core/CommandLine/SpecialPurpose.cs rename to src/Microsoft.ML.Core/CommandLine/Utils.cs index 46423d43d9..7006fbf6d2 100644 --- a/src/Microsoft.ML.Core/CommandLine/SpecialPurpose.cs +++ b/src/Microsoft.ML.Core/CommandLine/Utils.cs @@ -4,8 +4,7 @@ namespace Microsoft.ML.Runtime.CommandLine { - [BestFriend] - internal static class SpecialPurpose + public static class SpecialPurpose { /// /// This is used to specify a column mapping of a data transform. diff --git a/src/Microsoft.ML.Core/Data/ICommand.cs b/src/Microsoft.ML.Core/Data/ICommand.cs index 44d4c7340b..c300b4f3a5 100644 --- a/src/Microsoft.ML.Core/Data/ICommand.cs +++ b/src/Microsoft.ML.Core/Data/ICommand.cs @@ -11,11 +11,9 @@ namespace Microsoft.ML.Runtime.Command /// /// The signature for commands. /// - [BestFriend] - internal delegate void SignatureCommand(); + public delegate void SignatureCommand(); - [BestFriend] - internal interface ICommand + public interface ICommand { void Run(); } diff --git a/src/Microsoft.ML.Core/Data/IDataView.cs b/src/Microsoft.ML.Core/Data/IDataView.cs index 3f0b89aed7..32cfbd2285 100644 --- a/src/Microsoft.ML.Core/Data/IDataView.cs +++ b/src/Microsoft.ML.Core/Data/IDataView.cs @@ -82,15 +82,17 @@ public interface IDataView : ISchematized bool CanShuffle { get; } /// - /// Returns the number of rows if known. Returning null means that the row count is unknown but - /// it might return a non-null value on a subsequent call. This indicates, that the transform does - /// not YET know the number of rows, but may in the future. Its implementation's computation - /// complexity should be O(1). + /// Returns the number of rows if known. Null means unknown. If lazy is true, then + /// this is permitted to return null when it might return a non-null value on a subsequent + /// call. This indicates, that the transform does not YET know the number of rows, but + /// may in the future. If lazy is false, then this is permitted to do some work (no more + /// that it would normally do for cursoring) to determine the number of rows. /// - /// Most implementation will return the same answer every time. Some, like a cache, might - /// return null until the cache is fully populated. + /// Most components will return the same answer whether lazy is true or false. Some, like + /// a cache, might return null until the cache is fully populated (when lazy is true). When + /// lazy is false, such a cache would block until the cache was populated. /// - long? GetRowCount(); + long? GetRowCount(bool lazy = true); /// /// Get a row cursor. The active column indices are those for which needCol(col) returns true. diff --git a/src/Microsoft.ML.Core/Data/IEstimator.cs b/src/Microsoft.ML.Core/Data/IEstimator.cs index db0c4447a8..46a8a01313 100644 --- a/src/Microsoft.ML.Core/Data/IEstimator.cs +++ b/src/Microsoft.ML.Core/Data/IEstimator.cs @@ -120,16 +120,7 @@ public SchemaShape(IEnumerable columns) Contracts.CheckParam(columns.All(c => c != null), nameof(columns), "No items should be null."); } - /// - /// Given a , extract the type parameters that describe this type - /// as a 's column type. - /// - /// The actual column type to process. - /// The vector kind of . - /// The item type of . - /// Whether (or its item type) is a key. - [BestFriend] - internal static void GetColumnTypeShape(ColumnType type, + private static void GetColumnArgs(ColumnType type, out Column.VectorKind vecKind, out ColumnType itemType, out bool isKey) @@ -163,12 +154,12 @@ public static SchemaShape Create(Schema schema) var mCols = new List(); foreach (var metaNameType in schema.GetMetadataTypes(iCol)) { - GetColumnTypeShape(metaNameType.Value, out var mVecKind, out var mItemType, out var mIsKey); + GetColumnArgs(metaNameType.Value, out var mVecKind, out var mItemType, out var mIsKey); mCols.Add(new Column(metaNameType.Key, mVecKind, mItemType, mIsKey)); } var metadata = mCols.Count > 0 ? new SchemaShape(mCols) : _empty; // Next create the single column. - GetColumnTypeShape(schema.GetColumnType(iCol), out var vecKind, out var itemType, out var isKey); + GetColumnArgs(schema.GetColumnType(iCol), out var vecKind, out var itemType, out var isKey); cols.Add(new Column(schema.GetColumnName(iCol), vecKind, itemType, isKey, metadata)); } } diff --git a/src/Microsoft.ML.Core/Data/IFileHandle.cs b/src/Microsoft.ML.Core/Data/IFileHandle.cs index 37b871b7b6..2b57187250 100644 --- a/src/Microsoft.ML.Core/Data/IFileHandle.cs +++ b/src/Microsoft.ML.Core/Data/IFileHandle.cs @@ -61,7 +61,7 @@ public sealed class SimpleFileHandle : IFileHandle // handle has been disposed. private List _streams; - private bool IsDisposed => _streams == null; + private bool IsDisposed { get { return _streams == null; } } public SimpleFileHandle(IExceptionContext ectx, string path, bool needsWrite, bool autoDelete) { @@ -84,9 +84,15 @@ public SimpleFileHandle(IExceptionContext ectx, string path, bool needsWrite, bo _streams = new List(); } - public bool CanWrite => !_wrote && !IsDisposed; + public bool CanWrite + { + get { return !_wrote && !IsDisposed; } + } - public bool CanRead => _wrote && !IsDisposed; + public bool CanRead + { + get { return _wrote && !IsDisposed; } + } public void Dispose() { diff --git a/src/Microsoft.ML.Core/Data/IHostEnvironment.cs b/src/Microsoft.ML.Core/Data/IHostEnvironment.cs index eb0d57845c..0b8c097e7d 100644 --- a/src/Microsoft.ML.Core/Data/IHostEnvironment.cs +++ b/src/Microsoft.ML.Core/Data/IHostEnvironment.cs @@ -72,8 +72,6 @@ public interface IHostEnvironment : IChannelProvider, IProgressChannelProvider /// The suffix and prefix are optional. A common use for suffix is to specify an extension, eg, ".txt". /// The use of suffix and prefix, including whether they have any affect, is up to the host environment. /// - [Obsolete("The host environment is not disposable, so it is inappropriate to use this method. " + - "Please handle your own temporary files within the component yourself, including their proper disposal and deletion.")] IFileHandle CreateTempFile(string suffix = null, string prefix = null); /// @@ -190,8 +188,7 @@ public readonly struct ChannelMessage /// public string Message => _args != null ? string.Format(_message, _args) : _message; - [BestFriend] - internal ChannelMessage(ChannelMessageKind kind, MessageSensitivity sensitivity, string message) + public ChannelMessage(ChannelMessageKind kind, MessageSensitivity sensitivity, string message) { Contracts.CheckNonEmpty(message, nameof(message)); Kind = kind; @@ -200,8 +197,7 @@ internal ChannelMessage(ChannelMessageKind kind, MessageSensitivity sensitivity, _args = null; } - [BestFriend] - internal ChannelMessage(ChannelMessageKind kind, MessageSensitivity sensitivity, string fmt, params object[] args) + public ChannelMessage(ChannelMessageKind kind, MessageSensitivity sensitivity, string fmt, params object[] args) { Contracts.CheckNonEmpty(fmt, nameof(fmt)); Contracts.CheckNonEmpty(args, nameof(args)); diff --git a/src/Microsoft.ML.Core/EntryPoints/IMlState.cs b/src/Microsoft.ML.Core/Data/IMlState.cs similarity index 98% rename from src/Microsoft.ML.Core/EntryPoints/IMlState.cs rename to src/Microsoft.ML.Core/Data/IMlState.cs index 41ea062861..52b0828256 100644 --- a/src/Microsoft.ML.Core/EntryPoints/IMlState.cs +++ b/src/Microsoft.ML.Core/Data/IMlState.cs @@ -10,5 +10,5 @@ namespace Microsoft.ML.Runtime.EntryPoints /// black box to the graph. The macro itself will then case to the concrete type. /// public interface IMlState - { } + {} } \ No newline at end of file diff --git a/src/Microsoft.ML.Core/EntryPoints/IPredictorModel.cs b/src/Microsoft.ML.Core/Data/IPredictorModel.cs similarity index 100% rename from src/Microsoft.ML.Core/EntryPoints/IPredictorModel.cs rename to src/Microsoft.ML.Core/Data/IPredictorModel.cs diff --git a/src/Microsoft.ML.Core/Data/ITrainerArguments.cs b/src/Microsoft.ML.Core/Data/ITrainerArguments.cs new file mode 100644 index 0000000000..e4fdbbdc59 --- /dev/null +++ b/src/Microsoft.ML.Core/Data/ITrainerArguments.cs @@ -0,0 +1,15 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ML.Runtime +{ + // This is basically a no-op interface put in primarily + // for backward binary compat support for AFx. + // REVIEW: This interface was removed in TLC 3.0 as part of the + // deprecation of the *Factory interfaces, but added back as a temporary + // hack. Remove it asap. + public interface ITrainerArguments + { + } +} diff --git a/src/Microsoft.ML.Core/Data/LinkedRootCursorBase.cs b/src/Microsoft.ML.Core/Data/LinkedRootCursorBase.cs index ecec0b1a0d..20f84c6e24 100644 --- a/src/Microsoft.ML.Core/Data/LinkedRootCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/LinkedRootCursorBase.cs @@ -8,8 +8,7 @@ namespace Microsoft.ML.Runtime.Data /// Base class for a cursor has an input cursor, but still needs to do work on /// MoveNext/MoveMany. ///
- [BestFriend] - internal abstract class LinkedRootCursorBase : RootCursorBase + public abstract class LinkedRootCursorBase : RootCursorBase where TInput : class, ICursor { private readonly ICursor _root; diff --git a/src/Microsoft.ML.Core/Data/LinkedRowFilterCursorBase.cs b/src/Microsoft.ML.Core/Data/LinkedRowFilterCursorBase.cs index 22ade4a983..4a07bbd47b 100644 --- a/src/Microsoft.ML.Core/Data/LinkedRowFilterCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/LinkedRowFilterCursorBase.cs @@ -7,8 +7,7 @@ namespace Microsoft.ML.Runtime.Data /// /// Base class for creating a cursor of rows that filters out some input rows. /// - [BestFriend] - internal abstract class LinkedRowFilterCursorBase : LinkedRowRootCursorBase + public abstract class LinkedRowFilterCursorBase : LinkedRowRootCursorBase { public override long Batch => Input.Batch; diff --git a/src/Microsoft.ML.Core/Data/LinkedRowRootCursorBase.cs b/src/Microsoft.ML.Core/Data/LinkedRowRootCursorBase.cs index 7874686797..f4b7a4da67 100644 --- a/src/Microsoft.ML.Core/Data/LinkedRowRootCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/LinkedRowRootCursorBase.cs @@ -10,8 +10,7 @@ namespace Microsoft.ML.Runtime.Data /// that the default assumes /// that each input column is exposed as an output column with the same column index. ///
- [BestFriend] - internal abstract class LinkedRowRootCursorBase : LinkedRootCursorBase, IRowCursor + public abstract class LinkedRowRootCursorBase : LinkedRootCursorBase, IRowCursor { private readonly bool[] _active; diff --git a/src/Microsoft.ML.Core/Data/MetadataUtils.cs b/src/Microsoft.ML.Core/Data/MetadataUtils.cs index 72fc34e085..ee70bc732a 100644 --- a/src/Microsoft.ML.Core/Data/MetadataUtils.cs +++ b/src/Microsoft.ML.Core/Data/MetadataUtils.cs @@ -63,6 +63,11 @@ public static class Kinds ///
public const string IsUserVisible = "IsUserVisible"; + /// + /// Metadata kind that indicates if a column has missing values. The value is typically a Bool to allow for unknown status. + /// + public const string HasMissingValues = "HasMissingValues"; + /// /// Metadata kind for the label values used in training to be used for the predicted label. /// The value is typically a fixed-sized vector of Text. @@ -313,14 +318,12 @@ public static void GetSlotNames(RoleMappedSchema schema, RoleMappedSchema.Column IReadOnlyList list; if ((list = schema?.GetColumns(role)) == null || list.Count != 1 || !schema.Schema.HasSlotNames(list[0].Index, vectorSize)) - { - VBufferUtils.Resize(ref slotNames, vectorSize, 0); - } + slotNames = new VBuffer>(vectorSize, 0, slotNames.Values, slotNames.Indices); else schema.Schema.GetMetadata(Kinds.SlotNames, list[0].Index, ref slotNames); } - public static bool HasKeyValues(this Schema schema, int col, int keyCount) + public static bool HasKeyNames(this Schema schema, int col, int keyCount) { if (keyCount == 0) return false; @@ -333,14 +336,6 @@ public static bool HasKeyValues(this Schema schema, int col, int keyCount) && type.ItemType.IsText; } - [BestFriend] - internal static bool HasKeyValues(this SchemaShape.Column col) - { - return col.Metadata.TryFindColumn(Kinds.KeyValues, out var metaCol) - && metaCol.Kind == SchemaShape.Column.VectorKind.Vector - && metaCol.ItemType.IsText; - } - /// /// Returns whether a column has the metadata set to true. /// That metadata should be set when the data has undergone transforms that would render it @@ -452,22 +447,21 @@ public static bool TryGetCategoricalFeatureIndices(Schema schema, int colIndex, { int previousEndIndex = -1; isValid = true; - var catIndicesValues = catIndices.GetValues(); - for (int i = 0; i < catIndicesValues.Length; i += 2) + for (int i = 0; i < catIndices.Values.Length; i += 2) { - if (catIndicesValues[i] > catIndicesValues[i + 1] || - catIndicesValues[i] <= previousEndIndex || - catIndicesValues[i] >= columnSlotsCount || - catIndicesValues[i + 1] >= columnSlotsCount) + if (catIndices.Values[i] > catIndices.Values[i + 1] || + catIndices.Values[i] <= previousEndIndex || + catIndices.Values[i] >= columnSlotsCount || + catIndices.Values[i + 1] >= columnSlotsCount) { isValid = false; break; } - previousEndIndex = catIndicesValues[i + 1]; + previousEndIndex = catIndices.Values[i + 1]; } if (isValid) - categoricalFeatures = catIndicesValues.ToArray(); + categoricalFeatures = catIndices.Values.Select(val => val).ToArray(); } } diff --git a/src/Microsoft.ML.Core/Data/ProgressReporter.cs b/src/Microsoft.ML.Core/Data/ProgressReporter.cs index 191364e2a3..f7741b462c 100644 --- a/src/Microsoft.ML.Core/Data/ProgressReporter.cs +++ b/src/Microsoft.ML.Core/Data/ProgressReporter.cs @@ -14,8 +14,7 @@ namespace Microsoft.ML.Runtime.Data /// /// The progress reporting classes used by descendants. /// - [BestFriend] - internal static class ProgressReporting + public static class ProgressReporting { /// /// The progress channel for . diff --git a/src/Microsoft.ML.Core/Data/ReadOnlyMemoryUtils.cs b/src/Microsoft.ML.Core/Data/ReadOnlyMemoryUtils.cs index 20ebb85b04..4b207ab507 100644 --- a/src/Microsoft.ML.Core/Data/ReadOnlyMemoryUtils.cs +++ b/src/Microsoft.ML.Core/Data/ReadOnlyMemoryUtils.cs @@ -10,8 +10,7 @@ namespace Microsoft.ML.Runtime.Data { - [BestFriend] - internal static class ReadOnlyMemoryUtils + public static class ReadOnlyMemoryUtils { /// @@ -209,6 +208,18 @@ public static ReadOnlyMemory TrimEndWhiteSpace(ReadOnlyMemory memory return memory.Slice(0, ichLim); } + public static NormStr AddToPool(ReadOnlyMemory memory, NormStr.Pool pool) + { + Contracts.CheckValue(pool, nameof(pool)); + return pool.Add(memory); + } + + public static NormStr FindInPool(ReadOnlyMemory memory, NormStr.Pool pool) + { + Contracts.CheckValue(pool, nameof(pool)); + return pool.Get(memory); + } + public static void AddLowerCaseToStringBuilder(ReadOnlySpan span, StringBuilder sb) { Contracts.CheckValue(sb, nameof(sb)); @@ -254,18 +265,5 @@ public static StringBuilder AppendSpan(this StringBuilder sb, ReadOnlySpan return sb; } - - public sealed class ReadonlyMemoryCharComparer : IEqualityComparer> - { - public bool Equals(ReadOnlyMemory x, ReadOnlyMemory y) - { - return x.Span.SequenceEqual(y.Span); - } - - public int GetHashCode(ReadOnlyMemory obj) - { - return (int)Hashing.HashString(obj.Span); - } - } } } diff --git a/src/Microsoft.ML.Core/Data/RootCursorBase.cs b/src/Microsoft.ML.Core/Data/RootCursorBase.cs index 5b64a40d6a..73be098e0f 100644 --- a/src/Microsoft.ML.Core/Data/RootCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/RootCursorBase.cs @@ -17,8 +17,7 @@ namespace Microsoft.ML.Runtime.Data /// that has an input cursor and does NOT need notification on /, /// use . /// - [BestFriend] - internal abstract class RootCursorBase : ICursor + public abstract class RootCursorBase : ICursor { protected readonly IChannel Ch; diff --git a/src/Microsoft.ML.Core/Data/ServerChannel.cs b/src/Microsoft.ML.Core/Data/ServerChannel.cs index a9b33d1986..b11e962ab2 100644 --- a/src/Microsoft.ML.Core/Data/ServerChannel.cs +++ b/src/Microsoft.ML.Core/Data/ServerChannel.cs @@ -19,8 +19,7 @@ namespace Microsoft.ML.Runtime /// delegates will be published in some fashion, with the target scenario being /// that the library will publish some sort of restful API. /// - [BestFriend] - internal sealed class ServerChannel : ServerChannel.IPendingBundleNotification, IDisposable + public sealed class ServerChannel : ServerChannel.IPendingBundleNotification, IDisposable { // See ServerChannel.md for a more elaborate discussion of high level usage and design. private readonly IChannelProvider _chp; @@ -251,8 +250,7 @@ public void AddDoneAction(Action onDone) } } - [BestFriend] - internal static class ServerChannelUtilities + public static class ServerChannelUtilities { /// /// Convenience method for that looks more idiomatic to typical diff --git a/src/Microsoft.ML.Core/Data/SynchronizedCursorBase.cs b/src/Microsoft.ML.Core/Data/SynchronizedCursorBase.cs index da60c84ccf..202c3d8cfd 100644 --- a/src/Microsoft.ML.Core/Data/SynchronizedCursorBase.cs +++ b/src/Microsoft.ML.Core/Data/SynchronizedCursorBase.cs @@ -10,8 +10,7 @@ namespace Microsoft.ML.Runtime.Data /// It delegates all ICursor functionality except Dispose() to the root cursor. /// Dispose is virtual with the default implementation delegating to the input cursor. /// - [BestFriend] - internal abstract class SynchronizedCursorBase : ICursor + public abstract class SynchronizedCursorBase : ICursor where TBase : class, ICursor { protected readonly IChannel Ch; diff --git a/src/Microsoft.ML.Core/Data/VBuffer.cs b/src/Microsoft.ML.Core/Data/VBuffer.cs index a86f0bdae4..b5ef6de0ea 100644 --- a/src/Microsoft.ML.Core/Data/VBuffer.cs +++ b/src/Microsoft.ML.Core/Data/VBuffer.cs @@ -16,24 +16,32 @@ namespace Microsoft.ML.Runtime.Data /// public readonly struct VBuffer { - private readonly T[] _values; - private readonly int[] _indices; + /// + /// The logical length of the buffer. + /// + public readonly int Length; /// /// The number of items explicitly represented. This is == Length when the representation /// is dense and < Length when sparse. /// - private readonly int _count; + public readonly int Count; /// - /// The logical length of the buffer. + /// The values. Only the first Count of these are valid. /// - public readonly int Length; + public readonly T[] Values; + + /// + /// The indices. For a dense representation, this array is not used. For a sparse representation + /// it is parallel to values and specifies the logical indices for the corresponding values. + /// + public readonly int[] Indices; /// /// The explicitly represented values. /// - public ReadOnlySpan GetValues() => _values.AsSpan(0, _count); + public ReadOnlySpan GetValues() => Values.AsSpan(0, Count); /// /// The indices. For a dense representation, this array is not used. For a sparse representation @@ -45,18 +53,17 @@ public readonly struct VBuffer /// - non-zeros values 98 and 76 respectively at the 4th and 6th coordinates /// - zeros at all other coordinates /// - public ReadOnlySpan GetIndices() => IsDense ? default : _indices.AsSpan(0, _count); + public ReadOnlySpan GetIndices() => IsDense ? default : Indices.AsSpan(0, Count); /// - /// Gets a value indicating whether every logical element is explicitly - /// represented in the buffer. + /// Equivalent to Count == Length. /// public bool IsDense { get { - Contracts.Assert(_count <= Length); - return _count == Length; + Contracts.Assert(Count <= Length); + return Count == Length; } } @@ -70,9 +77,9 @@ public VBuffer(int length, T[] values, int[] indices = null) Contracts.CheckValueOrNull(indices); Length = length; - _count = length; - _values = values; - _indices = indices; + Count = length; + Values = values; + Indices = indices; } /// @@ -102,9 +109,9 @@ public VBuffer(int length, int count, T[] values, int[] indices) #endif Length = length; - _count = count; - _values = values; - _indices = indices; + Count = count; + Values = values; + Indices = indices; } /// @@ -112,14 +119,15 @@ public VBuffer(int length, int count, T[] values, int[] indices) /// public void CopyToDense(ref VBuffer dst) { - // create a dense editor - var editor = VBufferEditor.Create(ref dst, Length); + var values = dst.Values; + if (Utils.Size(values) < Length) + values = new T[Length]; if (!IsDense) - CopyTo(editor.Values); + CopyTo(values); else if (Length > 0) - _values.AsSpan(0, Length).CopyTo(editor.Values); - dst = editor.Commit(); + Array.Copy(Values, values, Length); + dst = new VBuffer(Length, values, dst.Indices); } /// @@ -127,24 +135,31 @@ public void CopyToDense(ref VBuffer dst) /// public void CopyTo(ref VBuffer dst) { - var editor = VBufferEditor.Create(ref dst, Length, _count); + var values = dst.Values; + var indices = dst.Indices; if (IsDense) { if (Length > 0) { - _values.AsSpan(0, Length).CopyTo(editor.Values); + if (Utils.Size(values) < Length) + values = new T[Length]; + Array.Copy(Values, values, Length); } - dst = editor.Commit(); + dst = new VBuffer(Length, values, indices); Contracts.Assert(dst.IsDense); } else { - if (_count > 0) + if (Count > 0) { - _values.AsSpan(0, _count).CopyTo(editor.Values); - _indices.AsSpan(0, _count).CopyTo(editor.Indices); + if (Utils.Size(values) < Count) + values = new T[Count]; + if (Utils.Size(indices) < Count) + indices = new int[Count]; + Array.Copy(Values, values, Count); + Array.Copy(Indices, indices, Count); } - dst = editor.Commit(); + dst = new VBuffer(Length, Count, values, indices); } } @@ -155,81 +170,255 @@ public void CopyTo(ref VBuffer dst, int srcMin, int length) { Contracts.Check(0 <= srcMin && srcMin <= Length, "srcMin"); Contracts.Check(0 <= length && srcMin <= Length - length, "length"); - + var values = dst.Values; + var indices = dst.Indices; if (IsDense) { - var editor = VBufferEditor.Create(ref dst, length, length); if (length > 0) { - _values.AsSpan(srcMin, length).CopyTo(editor.Values); + if (Utils.Size(values) < length) + values = new T[length]; + Array.Copy(Values, srcMin, values, 0, length); } - dst = editor.Commit(); + dst = new VBuffer(length, values, indices); Contracts.Assert(dst.IsDense); } else { int copyCount = 0; - if (_count > 0) + if (Count > 0) { - int copyMin = _indices.FindIndexSorted(0, _count, srcMin); - int copyLim = _indices.FindIndexSorted(copyMin, _count, srcMin + length); + int copyMin = Indices.FindIndexSorted(0, Count, srcMin); + int copyLim = Indices.FindIndexSorted(copyMin, Count, srcMin + length); Contracts.Assert(copyMin <= copyLim); copyCount = copyLim - copyMin; - var editor = VBufferEditor.Create(ref dst, length, copyCount); if (copyCount > 0) { - _values.AsSpan(copyMin, copyCount).CopyTo(editor.Values); + if (Utils.Size(values) < copyCount) + values = new T[copyCount]; + Array.Copy(Values, copyMin, values, 0, copyCount); if (copyCount < length) { + if (Utils.Size(indices) < copyCount) + indices = new int[copyCount]; for (int i = 0; i < copyCount; ++i) - editor.Indices[i] = _indices[i + copyMin] - srcMin; + indices[i] = Indices[i + copyMin] - srcMin; + } + } + } + dst = new VBuffer(length, copyCount, values, indices); + } + } + + /// + /// Copy from this buffer to the given destination, making sure to explicitly include the + /// first count indices in indicesInclude. Note that indicesInclude should be sorted + /// with each index less than this.Length. Note that this can make the destination be + /// dense even if "this" is sparse. + /// + public void CopyTo(ref VBuffer dst, int[] indicesInclude, int count) + { + Contracts.CheckParam(count >= 0, nameof(count)); + Contracts.CheckParam(Utils.Size(indicesInclude) >= count, nameof(indicesInclude)); + Contracts.CheckParam(Utils.Size(indicesInclude) <= Length, nameof(indicesInclude)); + + // REVIEW: Ideally we should Check that indicesInclude is sorted and in range. Would that + // check be too expensive? +#if DEBUG + int prev = -1; + for (int i = 0; i < count; i++) + { + Contracts.Assert(prev < indicesInclude[i]); + prev = indicesInclude[i]; + } + Contracts.Assert(prev < Length); +#endif + + if (IsDense || count == 0) + { + CopyTo(ref dst); + return; + } + + if (count >= Length / 2 || Count >= Length / 2) + { + CopyToDense(ref dst); + return; + } + + var indices = dst.Indices; + var values = dst.Values; + if (Count == 0) + { + // No values in "this". + if (Utils.Size(indices) < count) + indices = new int[count]; + Array.Copy(indicesInclude, indices, count); + if (Utils.Size(values) < count) + values = new T[count]; + else + Array.Clear(values, 0, count); + dst = new VBuffer(Length, count, values, indices); + return; + } + + int size = 0; + int max = count + Count; + Contracts.Assert(max < Length); + int ii1; + int ii2; + if (max >= Length / 2 || Utils.Size(values) < max || Utils.Size(indices) < max) + { + // Compute the needed size. + ii1 = 0; + ii2 = 0; + for (; ; ) + { + Contracts.Assert(ii1 < Count); + Contracts.Assert(ii2 < count); + size++; + int diff = Indices[ii1] - indicesInclude[ii2]; + if (diff == 0) + { + ii1++; + ii2++; + if (ii1 >= Count) + { + size += count - ii2; + break; + } + if (ii2 >= count) + { + size += Count - ii1; + break; + } + } + else if (diff < 0) + { + if (++ii1 >= Count) + { + size += count - ii2; + break; } } - dst = editor.Commit(); + else + { + if (++ii2 >= count) + { + size += Count - ii1; + break; + } + } + } + Contracts.Assert(size >= count && size >= Count); + + if (size == Count) + { + CopyTo(ref dst); + return; + } + + if (size >= Length / 2) + { + CopyToDense(ref dst); + return; + } + + if (Utils.Size(values) < size) + values = new T[size]; + if (Utils.Size(indices) < size) + indices = new int[size]; + max = size; + } + + int ii = 0; + ii1 = 0; + ii2 = 0; + for (; ; ) + { + Contracts.Assert(ii < max); + Contracts.Assert(ii1 < Count); + Contracts.Assert(ii2 < count); + int i1 = Indices[ii1]; + int i2 = indicesInclude[ii2]; + if (i1 <= i2) + { + indices[ii] = i1; + values[ii] = Values[ii1]; + ii++; + if (i1 == i2) + ii2++; + if (++ii1 >= Count) + { + if (ii2 >= count) + break; + Array.Clear(values, ii, count - ii2); + Array.Copy(indicesInclude, ii2, indices, ii, count - ii2); + ii += count - ii2; + break; + } + if (ii2 >= count) + { + Array.Copy(Values, ii1, values, ii, Count - ii1); + Array.Copy(Indices, ii1, indices, ii, Count - ii1); + ii += Count - ii1; + break; + } } else { - var editor = VBufferEditor.Create(ref dst, length, copyCount); - dst = editor.Commit(); + indices[ii] = i2; + values[ii] = default(T); + ii++; + if (++ii2 >= count) + { + Array.Copy(Values, ii1, values, ii, Count - ii1); + Array.Copy(Indices, ii1, indices, ii, Count - ii1); + ii += Count - ii1; + break; + } } } + Contracts.Assert(size == ii || size == 0); + + dst = new VBuffer(Length, ii, values, indices); } /// /// Copy from this buffer to the given destination array. This "densifies". /// - public void CopyTo(Span dst) + public void CopyTo(T[] dst) { CopyTo(dst, 0); } - public void CopyTo(Span dst, int ivDst, T defaultValue = default(T)) + public void CopyTo(T[] dst, int ivDst, T defaultValue = default(T)) { - Contracts.CheckParam(0 <= ivDst && ivDst <= dst.Length - Length, nameof(dst), "dst is not large enough"); + Contracts.CheckParam(0 <= ivDst && ivDst <= Utils.Size(dst) - Length, nameof(dst), "dst is not large enough"); if (Length == 0) return; if (IsDense) { - _values.AsSpan(0, Length).CopyTo(dst.Slice(ivDst)); + Array.Copy(Values, 0, dst, ivDst, Length); return; } - if (_count == 0) + if (Count == 0) { - dst.Slice(ivDst, Length).Clear(); + Array.Clear(dst, ivDst, Length); return; } int iv = 0; - for (int islot = 0; islot < _count; islot++) + for (int islot = 0; islot < Count; islot++) { - int slot = _indices[islot]; + int slot = Indices[islot]; Contracts.Assert(slot >= iv); while (iv < slot) dst[ivDst + iv++] = defaultValue; Contracts.Assert(iv == slot); - dst[ivDst + iv++] = _values[islot]; + dst[ivDst + iv++] = Values[islot]; } while (iv < Length) dst[ivDst + iv++] = defaultValue; @@ -242,22 +431,24 @@ public static void Copy(T[] src, int srcIndex, ref VBuffer dst, int length) { Contracts.CheckParam(0 <= length && length <= Utils.Size(src), nameof(length)); Contracts.CheckParam(0 <= srcIndex && srcIndex <= Utils.Size(src) - length, nameof(srcIndex)); - var editor = VBufferEditor.Create(ref dst, length, length); + var values = dst.Values; if (length > 0) { - src.AsSpan(srcIndex, length).CopyTo(editor.Values); + if (Utils.Size(values) < length) + values = new T[length]; + Array.Copy(src, srcIndex, values, 0, length); } - dst = editor.Commit(); + dst = new VBuffer(length, values, dst.Indices); } public IEnumerable> Items(bool all = false) { - return VBufferUtils.Items(_values, _indices, Length, _count, all); + return VBufferUtils.Items(Values, Indices, Length, Count, all); } public IEnumerable DenseValues() { - return VBufferUtils.DenseValues(_values, _indices, Length, _count); + return VBufferUtils.DenseValues(Values, Indices, Length, Count); } public void GetItemOrDefault(int slot, ref T dst) @@ -266,9 +457,9 @@ public void GetItemOrDefault(int slot, ref T dst) int index; if (IsDense) - dst = _values[slot]; - else if (_count > 0 && _indices.TryFindIndexSorted(0, _count, slot, out index)) - dst = _values[index]; + dst = Values[slot]; + else if (Count > 0 && Indices.TryFindIndexSorted(0, Count, slot, out index)) + dst = Values[index]; else dst = default(T); } @@ -279,56 +470,13 @@ public T GetItemOrDefault(int slot) int index; if (IsDense) - return _values[slot]; - if (_count > 0 && _indices.TryFindIndexSorted(0, _count, slot, out index)) - return _values[index]; + return Values[slot]; + if (Count > 0 && Indices.TryFindIndexSorted(0, Count, slot, out index)) + return Values[index]; return default(T); } public override string ToString() - => IsDense ? $"Dense vector of size {Length}" : $"Sparse vector of size {Length}, {_count} explicit values"; - - internal VBufferEditor GetEditor() - { - return GetEditor(Length, _count); - } - - internal VBufferEditor GetEditor( - int newLogicalLength, - int? valuesCount, - int maxCapacity = Utils.ArrayMaxSize, - bool keepOldOnResize = false, - bool requireIndicesOnDense = false) - { - Contracts.CheckParam(newLogicalLength >= 0, nameof(newLogicalLength)); - Contracts.CheckParam(valuesCount == null || valuesCount.Value <= newLogicalLength, nameof(valuesCount)); - - valuesCount = valuesCount ?? newLogicalLength; - - T[] values = _values; - bool createdNewValues; - Utils.EnsureSize(ref values, valuesCount.Value, maxCapacity, keepOldOnResize, out createdNewValues); - - int[] indices = _indices; - bool isDense = newLogicalLength == valuesCount.Value; - bool createdNewIndices; - if (isDense && !requireIndicesOnDense) - { - createdNewIndices = false; - } - else - { - Utils.EnsureSize(ref indices, valuesCount.Value, maxCapacity, keepOldOnResize, out createdNewIndices); - } - - return new VBufferEditor( - newLogicalLength, - valuesCount.Value, - values, - indices, - requireIndicesOnDense, - createdNewValues, - createdNewIndices); - } + => IsDense ? $"Dense vector of size {Length}" : $"Sparse vector of size {Length}, {Count} explicit values"; } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Core/Data/VBufferEditor.cs b/src/Microsoft.ML.Core/Data/VBufferEditor.cs deleted file mode 100644 index 8da19b641f..0000000000 --- a/src/Microsoft.ML.Core/Data/VBufferEditor.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; - -namespace Microsoft.ML.Runtime.Data -{ - /// - /// Various methods for creating instances. - /// - public static class VBufferEditor - { - /// - /// Creates a with the same shape - /// (length and density) as the . - /// - public static VBufferEditor CreateFromBuffer( - ref VBuffer destination) - { - return destination.GetEditor(); - } - - /// - /// Creates a using - /// 's values and indices buffers. - /// - /// - /// The destination buffer. - /// - /// - /// The logical length of the new buffer being edited. - /// - /// - /// The optional number of physical values to be represented in the buffer. - /// The buffer will be dense if is omitted. - /// - /// - /// True means that the old buffer values and indices are preserved, if possible (Array.Resize is called). - /// False means that a new array will be allocated, if necessary. - /// - /// - /// True means to ensure the Indices buffer is available, even if the buffer will be dense. - /// - public static VBufferEditor Create( - ref VBuffer destination, - int newLogicalLength, - int? valuesCount = null, - bool keepOldOnResize = false, - bool requireIndicesOnDense = false) - { - return destination.GetEditor( - newLogicalLength, - valuesCount, - keepOldOnResize: keepOldOnResize, - requireIndicesOnDense: requireIndicesOnDense); - } - - internal static VBufferEditor Create( - ref VBuffer destination, - int newLogicalLength, - int valuesCount, - int maxValuesCapacity) - { - return destination.GetEditor( - newLogicalLength, - valuesCount, - maxValuesCapacity); - } - } - - /// - /// An object capable of editing a by filling out - /// (and if the buffer is not dense). - /// - public readonly ref struct VBufferEditor - { - private readonly int _logicalLength; - private readonly T[] _values; - private readonly int[] _indices; - - /// - /// The mutable span of values. - /// - public readonly Span Values; - - /// - /// The mutable span of indices. - /// - public readonly Span Indices; - - /// - /// Gets a value indicating whether a new Values array was allocated. - /// - public bool CreatedNewValues { get; } - - /// - /// Gets a value indicating whether a new Indices array was allocated. - /// - public bool CreatedNewIndices { get; } - - internal VBufferEditor(int logicalLength, - int physicalValuesCount, - T[] values, - int[] indices, - bool requireIndicesOnDense, - bool createdNewValues, - bool createdNewIndices) - { - _logicalLength = logicalLength; - _values = values; - _indices = indices; - - bool isDense = logicalLength == physicalValuesCount; - - Values = _values.AsSpan(0, physicalValuesCount); - Indices = !isDense || requireIndicesOnDense ? _indices.AsSpan(0, physicalValuesCount) : default; - - CreatedNewValues = createdNewValues; - CreatedNewIndices = createdNewIndices; - } - - /// - /// Commits the edits and creates a new using - /// the current Values and Indices. - /// - /// - /// The newly created . - /// - public VBuffer Commit() - { - return new VBuffer(_logicalLength, Values.Length, _values, _indices); - } - - /// - /// Commits the edits and creates a new using - /// the current Values and Indices, while allowing to truncate the length - /// of Values and Indices. - /// - /// - /// The new number of physical values to be represented in the created buffer. - /// - /// - /// The newly created . - /// - /// - /// CommitTruncated allows to modify the length of the explicitly - /// defined values. - /// This is useful in sparse situations where the - /// was created with a larger physical value count than was needed - /// because the final value count was not known at creation time. - /// - public VBuffer CommitTruncated(int physicalValuesCount) - { - Contracts.CheckParam(physicalValuesCount <= Values.Length, nameof(physicalValuesCount), "Updating physicalValuesCount during CommitTruncated cannot be greater than the original physicalValuesCount value used in Create."); - - return new VBuffer(_logicalLength, physicalValuesCount, _values, _indices); - } - } -} diff --git a/src/Microsoft.ML.Core/EntryPoints/EntryPointModuleAttribute.cs b/src/Microsoft.ML.Core/EntryPoints/EntryPointModuleAttribute.cs index 0163222fc1..79a8c028ef 100644 --- a/src/Microsoft.ML.Core/EntryPoints/EntryPointModuleAttribute.cs +++ b/src/Microsoft.ML.Core/EntryPoints/EntryPointModuleAttribute.cs @@ -9,15 +9,13 @@ namespace Microsoft.ML.Runtime.EntryPoints /// /// This is a signature for classes that are 'holders' of entry points and components. /// - [BestFriend] - internal delegate void SignatureEntryPointModule(); + public delegate void SignatureEntryPointModule(); /// /// A simplified assembly attribute for marking EntryPoint modules. /// [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] - [BestFriend] - internal sealed class EntryPointModuleAttribute : LoadableClassAttributeBase + public sealed class EntryPointModuleAttribute : LoadableClassAttributeBase { public EntryPointModuleAttribute(Type loaderType) : base(null, typeof(void), loaderType, null, new[] { typeof(SignatureEntryPointModule) }, loaderType.FullName) diff --git a/src/Microsoft.ML.Core/EntryPoints/EntryPointUtils.cs b/src/Microsoft.ML.Core/EntryPoints/EntryPointUtils.cs index c4d4325f79..f64c8d0758 100644 --- a/src/Microsoft.ML.Core/EntryPoints/EntryPointUtils.cs +++ b/src/Microsoft.ML.Core/EntryPoints/EntryPointUtils.cs @@ -12,8 +12,7 @@ namespace Microsoft.ML.Runtime.EntryPoints { - [BestFriend] - internal static class EntryPointUtils + public static class EntryPointUtils { private static bool IsValueWithinRange(TlcModule.RangeAttribute range, object obj) { diff --git a/src/Microsoft.ML.Core/EntryPoints/ModuleArgs.cs b/src/Microsoft.ML.Core/EntryPoints/ModuleArgs.cs index d538f636ce..4dc02993d2 100644 --- a/src/Microsoft.ML.Core/EntryPoints/ModuleArgs.cs +++ b/src/Microsoft.ML.Core/EntryPoints/ModuleArgs.cs @@ -18,8 +18,7 @@ namespace Microsoft.ML.Runtime.EntryPoints /// This class defines attributes to annotate module inputs, outputs, entry points etc. when defining /// the module interface. /// - [BestFriend] - internal static class TlcModule + public static class TlcModule { /// /// An attribute used to annotate the component. diff --git a/src/Microsoft.ML.Core/Environment/ConsoleEnvironment.cs b/src/Microsoft.ML.Core/Environment/ConsoleEnvironment.cs index 3e27ce2516..e683a42413 100644 --- a/src/Microsoft.ML.Core/Environment/ConsoleEnvironment.cs +++ b/src/Microsoft.ML.Core/Environment/ConsoleEnvironment.cs @@ -5,6 +5,8 @@ #pragma warning disable 420 // volatile with Interlocked.CompareExchange using System; +using System.Collections.Concurrent; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading; @@ -13,12 +15,7 @@ namespace Microsoft.ML.Runtime.Data { using Stopwatch = System.Diagnostics.Stopwatch; - /// - /// The console environment. As its name suggests, should be limited to those applications that deliberately want - /// console functionality. - /// - [BestFriend] - internal sealed class ConsoleEnvironment : HostEnvironmentBase + public sealed class ConsoleEnvironment : HostEnvironmentBase { public const string ComponentHistoryKey = "ComponentHistory"; diff --git a/src/Microsoft.ML.Core/Environment/HostEnvironmentBase.cs b/src/Microsoft.ML.Core/Environment/HostEnvironmentBase.cs index 31ab23e28f..6cfb4157be 100644 --- a/src/Microsoft.ML.Core/Environment/HostEnvironmentBase.cs +++ b/src/Microsoft.ML.Core/Environment/HostEnvironmentBase.cs @@ -15,8 +15,7 @@ namespace Microsoft.ML.Runtime.Data /// Base class for channel providers. This is a common base class for. /// The ParentFullName, ShortName, and FullName may be null or empty. /// - [BestFriend] - internal abstract class ChannelProviderBase : IExceptionContext + public abstract class ChannelProviderBase : IExceptionContext { /// /// Data keys that are attached to the exception thrown via the exception context. @@ -80,22 +79,42 @@ public virtual TException Process(TException ex) /// /// Message source (a channel) that generated the message being dispatched. /// - [BestFriend] - internal interface IMessageSource + public interface IMessageSource { string ShortName { get; } string FullName { get; } bool Verbose { get; } } + /// + /// A that is also a channel listener can attach + /// listeners for messages, as sent through . + /// + public interface IMessageDispatcher : IHostEnvironment + { + /// + /// Listen on this environment to messages of a particular type. + /// + /// The message type + /// The action to perform when a message of the + /// appropriate type is received. + void AddListener(Action listenerFunc); + + /// + /// Removes a previously added listener. + /// + /// The message type + /// The previous listener function that is now being removed. + void RemoveListener(Action listenerFunc); + } + /// /// A basic host environment suited for many environments. /// This also supports modifying the concurrency factor, provides the ability to subscribe to pipes via the /// AddListener/RemoveListener methods, and exposes the to /// query progress. /// - [BestFriend] - internal abstract class HostEnvironmentBase : ChannelProviderBase, IHostEnvironment, IDisposable, IChannelProvider + public abstract class HostEnvironmentBase : ChannelProviderBase, IHostEnvironment, IDisposable, IChannelProvider, IMessageDispatcher where TEnv : HostEnvironmentBase { /// diff --git a/src/Microsoft.ML.Core/Environment/TelemetryMessage.cs b/src/Microsoft.ML.Core/Environment/TelemetryMessage.cs index 72b08e2715..ebd7d41486 100644 --- a/src/Microsoft.ML.Core/Environment/TelemetryMessage.cs +++ b/src/Microsoft.ML.Core/Environment/TelemetryMessage.cs @@ -13,8 +13,7 @@ namespace Microsoft.ML.Runtime /// /// A telemetry message. /// - [BestFriend] - internal abstract class TelemetryMessage + public abstract class TelemetryMessage { public static TelemetryMessage CreateCommand(string commandName, string commandText) { @@ -41,8 +40,7 @@ public static TelemetryMessage CreateException(Exception exception) /// /// Message with one long text and bunch of small properties (limit on value is ~1020 chars) /// - [BestFriend] - internal sealed class TelemetryTrace : TelemetryMessage + public sealed class TelemetryTrace : TelemetryMessage { public readonly string Text; public readonly string Name; @@ -59,8 +57,7 @@ public TelemetryTrace(string text, string name, string type) /// /// Message with exception /// - [BestFriend] - internal sealed class TelemetryException : TelemetryMessage + public sealed class TelemetryException : TelemetryMessage { public readonly Exception Exception; public TelemetryException(Exception exception) @@ -73,8 +70,7 @@ public TelemetryException(Exception exception) /// /// Message with metric value and it properites /// - [BestFriend] - internal sealed class TelemetryMetric : TelemetryMessage + public sealed class TelemetryMetric : TelemetryMessage { public readonly string Name; public readonly double Value; diff --git a/src/Microsoft.ML.Core/Prediction/IPredictor.cs b/src/Microsoft.ML.Core/Prediction/IPredictor.cs index 6bd1ac2056..d88b81d558 100644 --- a/src/Microsoft.ML.Core/Prediction/IPredictor.cs +++ b/src/Microsoft.ML.Core/Prediction/IPredictor.cs @@ -69,4 +69,94 @@ public interface IPredictor : IPredictorProducing : IPredictorProducing { } + + /// + /// Predictor that returns a probability distribution associated with a prediction result + /// + /// Type of features container (instance) on which to make predictions + /// Type of prediction result + /// Type of probability distribution associated with the predicton + public interface IDistributionPredictor + : IDistPredictorProducing, IPredictor + { + /// + /// Return a probability distribution associated wtih the prediction. + /// + /// Data instance + /// Distribution associated with the prediction + TResultDistribution PredictDistribution(TFeatures features); + + /// + /// Return a probability distribution associated wtih the prediction, as well as the prediction. + /// + /// Data instance + /// Prediction + /// Distribution associated with the prediction + TResultDistribution PredictDistribution(TFeatures features, out TResult result); + } + + /// + /// Predictor that produces predictions for sets of instances at a time + /// for cases where this is more efficient than serial calls to Predict for each instance. + /// + /// Type of features container (instance) on which to make predictions + /// Type of collection of instances + /// Type of prediction result + /// Type of the collection of prediction results + public interface IBulkPredictor + : IPredictor + { + /// + /// Produce predictions for a set of instances + /// + /// Collection of instances + /// Collection of predictions + TResultCollection BulkPredict(TFeaturesCollection featuresCollection); + } + + /// + /// Predictor that can score sets of instances (presumably more efficiently) + /// and returns a distribution associated with a prediction result. + /// + /// Type of features container (instance) on which to make predictions + /// Type of collection of instances + /// Type of prediction result + /// Type of probability distribution associated with the predicton + /// Type of the collection of prediction results + /// Type of the collection of distributions for prediction results + public interface IBulkDistributionPredictor + : IBulkPredictor, + IDistributionPredictor + { + /// + /// Produce distributions over predictions for a set of instances + /// + /// Collection of instances + /// Collection of prediction distributions + TResultDistributionCollection BulkPredictDistribution(TFeaturesCollection featuresCollection); + + /// + /// Produce distributions over predictions for a set of instances, along with actual prediction results + /// + /// Collection of instances + /// Collection of prediction results + /// Collection of distributions associated with prediction results + TResultDistributionCollection BulkPredictDistribution(TFeaturesCollection featuresCollection, + out TResultCollection resultCollection); + } + +#if FUTURE + public interface IBulkPredictor : + IPredictor + { + // REVIEW: Should we also have versions where the caller supplies the "memory" to be filled in. + TResultSet BulkPredict(TTestDataSet dataset); + } + + public interface IBulkPredictor + : IBulkPredictor, IPredictor + { + } +#endif } diff --git a/src/Microsoft.ML.Sweeper/ISweeper.cs b/src/Microsoft.ML.Core/Prediction/ISweeper.cs similarity index 100% rename from src/Microsoft.ML.Sweeper/ISweeper.cs rename to src/Microsoft.ML.Core/Prediction/ISweeper.cs diff --git a/src/Microsoft.ML.Core/Prediction/ITrainer.cs b/src/Microsoft.ML.Core/Prediction/ITrainer.cs index 5e796aa602..7eca991b5c 100644 --- a/src/Microsoft.ML.Core/Prediction/ITrainer.cs +++ b/src/Microsoft.ML.Core/Prediction/ITrainer.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Runtime.Data; -using System; namespace Microsoft.ML.Runtime { @@ -14,34 +13,25 @@ namespace Microsoft.ML.Runtime /// Loadable class signatures for trainers. Typically each trainer should register with /// both SignatureTrainer and SignatureXxxTrainer where Xxx is the prediction kind. /// - [BestFriend] - internal delegate void SignatureTrainer(); + public delegate void SignatureTrainer(); - [BestFriend] - internal delegate void SignatureBinaryClassifierTrainer(); - [BestFriend] - internal delegate void SignatureMultiClassClassifierTrainer(); - [BestFriend] - internal delegate void SignatureRegressorTrainer(); - [BestFriend] - internal delegate void SignatureMultiOutputRegressorTrainer(); - [BestFriend] - internal delegate void SignatureRankerTrainer(); - [BestFriend] - internal delegate void SignatureAnomalyDetectorTrainer(); - [BestFriend] - internal delegate void SignatureClusteringTrainer(); - [BestFriend] - internal delegate void SignatureSequenceTrainer(); - [BestFriend] - internal delegate void SignatureMatrixRecommendingTrainer(); + public delegate void SignatureBinaryClassifierTrainer(); + public delegate void SignatureMultiClassClassifierTrainer(); + public delegate void SignatureRegressorTrainer(); + public delegate void SignatureMultiOutputRegressorTrainer(); + public delegate void SignatureRankerTrainer(); + public delegate void SignatureAnomalyDetectorTrainer(); + public delegate void SignatureClusteringTrainer(); + public delegate void SignatureSequenceTrainer(); + public delegate void SignatureMatrixRecommendingTrainer(); + + public delegate void SignatureModelCombiner(PredictionKind kind); /// /// The base interface for a trainers. Implementors should not implement this interface directly, /// but rather implement the more specific . /// - [BestFriend] - internal interface ITrainer + public interface ITrainer { /// /// Auxiliary information about the trainer in terms of its capabilities @@ -68,8 +58,7 @@ internal interface ITrainer /// and produces a predictor. /// /// Type of predictor produced - [BestFriend] - internal interface ITrainer : ITrainer + public interface ITrainer : ITrainer where TPredictor : IPredictor { /// @@ -80,8 +69,7 @@ internal interface ITrainer : ITrainer new TPredictor Train(TrainContext context); } - [BestFriend] - internal static class TrainerExtensions + public static class TrainerExtensions { /// /// Convenience train extension for the case where one has only a training set with no auxiliary information. diff --git a/src/Microsoft.ML.Core/Prediction/ITree.cs b/src/Microsoft.ML.Core/Prediction/ITree.cs index 67642ecfc5..9014eadd68 100644 --- a/src/Microsoft.ML.Core/Prediction/ITree.cs +++ b/src/Microsoft.ML.Core/Prediction/ITree.cs @@ -7,16 +7,10 @@ namespace Microsoft.ML.Runtime.TreePredictor { - // The interfaces contained herein are meant to allow tree visualizer to run without an explicit dependency - // on FastTree, so as to allow it greater generality. These should probably be moved somewhere else, but where? - // FastTree itself is not a good candidate since their entire purpose was to avoid tying the tree visualizer - // to FastTree itself. They are semi-tolerable though as a set of internal types here. - /// /// Predictor that has ensemble tree structures and returns collection of trees. /// - [BestFriend] - internal interface ITreeEnsemble + public interface ITreeEnsemble { /// /// Returns the number of trees in the ensemble. @@ -33,8 +27,7 @@ internal interface ITreeEnsemble /// /// Type of tree used in ensemble of tree based predictors /// - [BestFriend] - internal interface ITree + public interface ITree { /// /// Returns the array of right(Greater than) child nodes of every interior nodes @@ -70,8 +63,7 @@ internal interface ITree /// Type of tree used in ensemble of tree based predictors /// /// Type of features container (instance) on which to make predictions - [BestFriend] - internal interface ITree : ITree + public interface ITree : ITree { /// /// Returns the leaf node for the given instance. @@ -85,8 +77,7 @@ internal interface ITree : ITree /// /// Type to represent the structure of node /// - [BestFriend] - internal interface INode + public interface INode { /// /// Returns Key value pairs representing the properties of the node. @@ -97,8 +88,7 @@ internal interface INode /// /// Keys to represent the properties of node. /// - [BestFriend] - internal static class NodeKeys + public static class NodeKeys { /// /// Name of the the interior node. It is Feature name if it is fasttree. Type is string for default trees. diff --git a/src/Microsoft.ML.Core/Prediction/TrainContext.cs b/src/Microsoft.ML.Core/Prediction/TrainContext.cs index e5e4bbad1c..be93ce68aa 100644 --- a/src/Microsoft.ML.Core/Prediction/TrainContext.cs +++ b/src/Microsoft.ML.Core/Prediction/TrainContext.cs @@ -11,8 +11,7 @@ namespace Microsoft.ML.Runtime /// into or . /// This holds at least a training set, as well as optioonally a predictor. /// - [BestFriend] - internal sealed class TrainContext + public sealed class TrainContext { /// /// The training set. Cannot be null. @@ -26,14 +25,6 @@ internal sealed class TrainContext /// public RoleMappedData ValidationSet { get; } - /// - /// The test set, whose uses are very similar to validation set but it should not directly and indirectly - /// affect the training process. One major difference between validation set and test test is that validation - /// can affect the training process by, for example, early stopping. Note that early stopping is a technique - /// which terminates the training process once the scores computed on validation set starts getting worse. - /// - public RoleMappedData TestSet { get; } - /// /// The initial predictor, for incremental training. Note that if a implementor /// does not support incremental training, then it can ignore it similarly to how one would ignore @@ -47,9 +38,8 @@ internal sealed class TrainContext /// /// Will set to this value. This must be specified /// Will set to this value if specified - /// Will set to this value if specified /// Will set to this value if specified - public TrainContext(RoleMappedData trainingSet, RoleMappedData validationSet = null, RoleMappedData testSet = null, IPredictor initialPredictor = null) + public TrainContext(RoleMappedData trainingSet, RoleMappedData validationSet = null, IPredictor initialPredictor = null) { Contracts.CheckValue(trainingSet, nameof(trainingSet)); Contracts.CheckValueOrNull(validationSet); @@ -60,7 +50,6 @@ public TrainContext(RoleMappedData trainingSet, RoleMappedData validationSet = n TrainingSet = trainingSet; ValidationSet = validationSet; - TestSet = testSet; InitialPredictor = initialPredictor; } } diff --git a/src/Microsoft.ML.Core/Prediction/TrainerInfo.cs b/src/Microsoft.ML.Core/Prediction/TrainerInfo.cs index 4f97c0c893..abeb5917d5 100644 --- a/src/Microsoft.ML.Core/Prediction/TrainerInfo.cs +++ b/src/Microsoft.ML.Core/Prediction/TrainerInfo.cs @@ -36,19 +36,12 @@ public sealed class TrainerInfo public bool WantCaching { get; } /// - /// Whether the trainer supports validation set via . Not implementing - /// this interface and returning false from this property is an indication the trainer does not support + /// Whether the trainer supports validation sets via . Not implementing + /// this interface and returning true from this property is an indication the trainer does not support /// that. /// public bool SupportsValidation { get; } - /// - /// Whether the trainer can use test set via . Not implementing - /// this interface and returning false from this property is an indication the trainer does not support - /// that. - /// - public bool SupportsTest { get; } - /// /// Whether the trainer can support incremental trainers via . Not /// implementing this interface and returning true from this property is an indication the trainer does @@ -65,16 +58,14 @@ public sealed class TrainerInfo /// The value for the property /// The value for the property /// The value for the property - /// The value for the property public TrainerInfo(bool normalization = true, bool calibration = false, bool caching = true, - bool supportValid = false, bool supportIncrementalTrain = false, bool supportTest = false) + bool supportValid = false, bool supportIncrementalTrain = false) { NeedNormalization = normalization; NeedCalibration = calibration; WantCaching = caching; SupportsValidation = supportValid; SupportsIncrementalTraining = supportIncrementalTrain; - SupportsTest = supportTest; } } } diff --git a/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs index aaa44a6bc7..838e12384c 100644 --- a/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Core/Properties/AssemblyInfo.cs @@ -6,17 +6,11 @@ using Microsoft.ML; [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TestFramework" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.InferenceTesting" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.StaticPipelineTesting" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformTest" + PublicKey.TestValue)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Legacy" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.ResultProcessor" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.CpuMath" + PublicKey.Value)] +[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PipelineInference" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Data" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Api" + PublicKey.Value)] @@ -27,16 +21,12 @@ [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.LightGBM" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Onnx" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransform" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Parquet" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PCA" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PipelineInference" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Recommender" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Runtime.ImageAnalytics" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Scoring" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.StandardLearners" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Sweeper" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries" + PublicKey.Value)] [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Transforms" + PublicKey.Value)] [assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.Core/Utilities/BigArray.cs b/src/Microsoft.ML.Core/Utilities/BigArray.cs index 3bfb4f688f..b005c4cefe 100644 --- a/src/Microsoft.ML.Core/Utilities/BigArray.cs +++ b/src/Microsoft.ML.Core/Utilities/BigArray.cs @@ -19,8 +19,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// than the total capacity. /// /// The type of entries. - [BestFriend] - internal sealed class BigArray : IEnumerable + public sealed class BigArray : IEnumerable { // REVIEW: This class merges and replaces the original private BigArray implementation in CacheDataView. // There the block size was 25 bits. Need to understand the performance implication of this 32x change. @@ -380,12 +379,12 @@ public void AddRange(ReadOnlySpan src) /// Concurrent calls to this method is valid even with one single concurrent call /// to . /// - public void CopyTo(long idx, Span dst, int length) + public void CopyTo(long idx, T[] dst, int length) { // Accesses on the internal arrays of this class should be valid even if // some other thread is utilizing AddRange, since Utils.EnsureSize(...) will // not replace the array until any allocation or copying has already happened. - Contracts.Assert(0 <= length && length <= dst.Length); + Contracts.Assert(0 <= length && length <= Utils.Size(dst)); Contracts.Assert(idx <= Length && length <= Length - idx); if (length == 0) return; @@ -404,15 +403,15 @@ public void CopyTo(long idx, Span dst, int length) // Spans only one subarray, most common case and simplest implementation. Contracts.Assert(miLim - miMin == length); Contracts.Assert(miLim <= Utils.Size(_entries[maMax])); - _entries[maMax].AsSpan(miMin, length).CopyTo(dst); + Array.Copy(_entries[maMax], miMin, dst, 0, length); break; case 1: // Spans two subarrays. Contracts.Assert((BlockSize - miMin) + miLim == length); Contracts.Assert(BlockSize <= Utils.Size(_entries[maMin])); - _entries[maMin].AsSpan(miMin, BlockSize - miMin).CopyTo(dst); + Array.Copy(_entries[maMin], miMin, dst, 0, BlockSize - miMin); Contracts.Assert(miLim <= Utils.Size(_entries[maMax])); - _entries[maMax].AsSpan(0, miLim).CopyTo(dst.Slice(BlockSize - miMin)); + Array.Copy(_entries[maMax], 0, dst, BlockSize - miMin, miLim); break; default: // Spans three or more subarrays. Very rare. @@ -421,19 +420,19 @@ public void CopyTo(long idx, Span dst, int length) // Copy the first segment. Contracts.Assert(BlockSize <= Utils.Size(_entries[maMin])); int dstSoFar = BlockSize - miMin; - _entries[maMin].AsSpan(miMin, dstSoFar).CopyTo(dst); + Array.Copy(_entries[maMin], miMin, dst, 0, dstSoFar); // Copy the internal segments. for (int major = maMin + 1; major < maMax; ++major) { Contracts.Assert(BlockSize <= Utils.Size(_entries[major])); - _entries[major].AsSpan(0, BlockSize).CopyTo(dst.Slice(dstSoFar)); + Array.Copy(_entries[major], 0, dst, dstSoFar, BlockSize); dstSoFar += BlockSize; Contracts.Assert(dstSoFar < length); } // Copy the last segment. Contracts.Assert(length - dstSoFar == miLim); Contracts.Assert(miLim <= Utils.Size(_entries[maMax])); - _entries[maMax].AsSpan(0, miLim).CopyTo(dst.Slice(dstSoFar)); + Array.Copy(_entries[maMax], 0, dst, dstSoFar, miLim); break; } } diff --git a/src/Microsoft.ML.Core/Utilities/BinFinder.cs b/src/Microsoft.ML.Core/Utilities/BinFinder.cs index cdfd0ad08b..5cd7fd2a61 100644 --- a/src/Microsoft.ML.Core/Utilities/BinFinder.cs +++ b/src/Microsoft.ML.Core/Utilities/BinFinder.cs @@ -9,8 +9,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - [BestFriend] - internal abstract class BinFinderBase + public abstract class BinFinderBase { private Single[] _valuesSng; // distinct values private Double[] _valuesDbl; // distinct values @@ -279,8 +278,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities using EnergyType = System.Int64; // Uses the energy function: sum(1,N) dx^2 where dx is the difference in accum values. - [BestFriend] - internal sealed class GreedyBinFinder : BinFinderBase + public sealed class GreedyBinFinder : BinFinderBase { // Potential drop location for another peg, together with its energy improvement. // PlacePegs uses a heap of these. Note that this is a struct so size matters. @@ -531,8 +529,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities using EnergyType = System.Double; // Uses dynamic programming. - [BestFriend] - internal sealed class DynamicBinFinder : BinFinderBase + public sealed class DynamicBinFinder : BinFinderBase { private int[] _accum; // integral of counts diff --git a/src/Microsoft.ML.Core/Utilities/BitUtils.cs b/src/Microsoft.ML.Core/Utilities/BitUtils.cs index 376b0ac8ef..9af79139ef 100644 --- a/src/Microsoft.ML.Core/Utilities/BitUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/BitUtils.cs @@ -7,7 +7,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - internal static partial class Utils + public static partial class Utils { private const int CbitUint = 32; private const int CbitUlong = 64; diff --git a/src/Microsoft.ML.Core/Utilities/CharUtils.cs b/src/Microsoft.ML.Core/Utilities/CharUtils.cs index d88197c8e7..bf7ae4677e 100644 --- a/src/Microsoft.ML.Core/Utilities/CharUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/CharUtils.cs @@ -10,8 +10,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - [BestFriend] - internal static class CharUtils + public static class CharUtils { private const int CharsCount = 0x10000; private static volatile char[] _lowerInvariantChars; diff --git a/src/Microsoft.ML.Core/Utilities/CmdIndenter.cs b/src/Microsoft.ML.Core/Utilities/CmdIndenter.cs index 6b4dbc48db..d82fffe682 100644 --- a/src/Microsoft.ML.Core/Utilities/CmdIndenter.cs +++ b/src/Microsoft.ML.Core/Utilities/CmdIndenter.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.CodeDom.Compiler; using System.Collections.Generic; using System.Linq; using System.Text; @@ -12,8 +11,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - [BestFriend] - internal static class CmdIndenter + public static class CmdIndenter { /// /// Get indented version of command line or same string if we unable to produce it. @@ -24,7 +22,7 @@ public static string GetIndentedCommandLine(string commandLine) { using (var sw = new System.IO.StringWriter()) { - var itw = new IndentedTextWriter(sw, " "); + var itw = IndentingTextWriter.Wrap(sw); if (TryProduceIndentString(commandLine, itw)) return sw.ToString().Trim(); return commandLine; @@ -37,7 +35,7 @@ public static string GetIndentedCommandLine(string commandLine) /// command line /// indenting text writer /// true if we was able to produce indented string without any problem - private static bool TryProduceIndentString(string text, IndentedTextWriter itw) + private static bool TryProduceIndentString(string text, IndentingTextWriter itw) { string[] tokens; if (!CmdParser.LexString(text, out tokens)) diff --git a/src/Microsoft.ML.Core/Utilities/Contracts.cs b/src/Microsoft.ML.Core/Utilities/Contracts.cs index 67f559d2fb..671bf41db8 100644 --- a/src/Microsoft.ML.Core/Utilities/Contracts.cs +++ b/src/Microsoft.ML.Core/Utilities/Contracts.cs @@ -16,7 +16,11 @@ using System.IO; using System.Threading; +#if PRIVATE_CONTRACTS +namespace Microsoft.ML.Runtime.Internal +#else namespace Microsoft.ML.Runtime +#endif { using Conditional = System.Diagnostics.ConditionalAttribute; using Debug = System.Diagnostics.Debug; @@ -27,7 +31,11 @@ namespace Microsoft.ML.Runtime /// totally replace the exception, etc. It is not legal to return null from /// Process (unless null was passed in, which really shouldn't happen). /// +#if PRIVATE_CONTRACTS + internal interface IExceptionContext +#else public interface IExceptionContext +#endif { TException Process(TException ex) where TException : Exception; @@ -38,8 +46,20 @@ TException Process(TException ex) string ContextDescription { get; } } - [BestFriend] +#if PRIVATE_CONTRACTS + [Flags] + internal enum MessageSensitivity + { + None = 0, + Unknown = ~None + } +#endif + +#if PRIVATE_CONTRACTS internal static partial class Contracts +#else + public static partial class Contracts +#endif { public const string IsMarkedKey = "ML_IsMarked"; public const string SensitivityKey = "ML_Sensitivity"; @@ -137,6 +157,7 @@ public static MessageSensitivity Sensitivity(this Exception ex) return (ex.Data[SensitivityKey] as MessageSensitivity?) ?? MessageSensitivity.Unknown; } +#if !PRIVATE_CONTRACTS /// /// This is an internal convenience implementation of an exception context to make marking /// exceptions with a specific sensitivity flag a bit less onorous. The alternative to a scheme @@ -213,6 +234,7 @@ public static IExceptionContext UserSensitive(this IExceptionContext ctx) /// public static IExceptionContext SchemaSensitive(this IExceptionContext ctx) => new SensitiveExceptionContext(ctx, MessageSensitivity.Schema); +#endif /// /// Sets the assert handler to the given function, returning the previous handler. @@ -445,282 +467,283 @@ private static string MakeSchemaMismatchMsg(string columnRole, string columnName return $"Schema mismatch for {columnRole} column '{columnName}': expected {expectedType}, got {actualType}"; } - // Check - these check a condition and if it fails, throw the corresponding exception. - // NOTE: The ordering of arguments to these is standardized to be: - // * boolean condition - // * parameter name - // * parameter value - // * message string - // - // Note that these do NOT support a params array of arguments since that would - // involve memory allocation whenever the condition is checked. When message string - // args are need, the condition test should be inlined, eg: - // if (!condition) - // throw Contracts.ExceptXxx(fmt, arg1, arg2); - - public static void Check(bool f) - { - if (!f) - throw Except(); - } - public static void Check(this IExceptionContext ctx, bool f) - { - if (!f) - throw Except(ctx); - } - public static void Check(bool f, string msg) - { - if (!f) - throw Except(msg); - } - public static void Check(this IExceptionContext ctx, bool f, string msg) - { - if (!f) - throw Except(ctx, msg); - } + // Check - these check a condition and if it fails, throw the corresponding exception. + // NOTE: The ordering of arguments to these is standardized to be: + // * boolean condition + // * parameter name + // * parameter value + // * message string + // + // Note that these do NOT support a params array of arguments since that would + // involve memory allocation whenever the condition is checked. When message string + // args are need, the condition test should be inlined, eg: + // if (!condition) + // throw Contracts.ExceptXxx(fmt, arg1, arg2); + + public static void Check(bool f) + { + if (!f) + throw Except(); + } + public static void Check(this IExceptionContext ctx, bool f) + { + if (!f) + throw Except(ctx); + } + public static void Check(bool f, string msg) + { + if (!f) + throw Except(msg); + } + public static void Check(this IExceptionContext ctx, bool f, string msg) + { + if (!f) + throw Except(ctx, msg); + } - /// - /// CheckUserArg / ExceptUserArg should be used when the validation of user-provided arguments failed. - /// Typically, this is shortly after the arguments are parsed using CmdParser. - /// - public static void CheckUserArg(bool f, string name) - { - if (!f) - throw ExceptUserArg(name); - } - public static void CheckUserArg(this IExceptionContext ctx, bool f, string name) - { - if (!f) - throw ExceptUserArg(ctx, name); - } - public static void CheckUserArg(bool f, string name, string msg) - { - if (!f) - throw ExceptUserArg(name, msg); - } - public static void CheckUserArg(this IExceptionContext ctx, bool f, string name, string msg) - { - if (!f) - throw ExceptUserArg(ctx, name, msg); - } + /// + /// CheckUserArg / ExceptUserArg should be used when the validation of user-provided arguments failed. + /// Typically, this is shortly after the arguments are parsed using CmdParser. + /// + public static void CheckUserArg(bool f, string name) + { + if (!f) + throw ExceptUserArg(name); + } + public static void CheckUserArg(this IExceptionContext ctx, bool f, string name) + { + if (!f) + throw ExceptUserArg(ctx, name); + } + public static void CheckUserArg(bool f, string name, string msg) + { + if (!f) + throw ExceptUserArg(name, msg); + } + public static void CheckUserArg(this IExceptionContext ctx, bool f, string name, string msg) + { + if (!f) + throw ExceptUserArg(ctx, name, msg); + } - public static void CheckParam(bool f, string paramName) - { - if (!f) - throw ExceptParam(paramName); - } - public static void CheckParam(this IExceptionContext ctx, bool f, string paramName) - { - if (!f) - throw ExceptParam(ctx, paramName); - } - public static void CheckParam(bool f, string paramName, string msg) - { - if (!f) - throw ExceptParam(paramName, msg); - } - public static void CheckParam(this IExceptionContext ctx, bool f, string paramName, string msg) - { - if (!f) - throw ExceptParam(ctx, paramName, msg); - } - public static void CheckParamValue(bool f, T value, string paramName, string msg) - { - if (!f) - throw ExceptParamValue(value, paramName, msg); - } - public static void CheckParamValue(this IExceptionContext ctx, bool f, T value, string paramName, string msg) - { - if (!f) - throw ExceptParamValue(ctx, value, paramName, msg); - } + public static void CheckParam(bool f, string paramName) + { + if (!f) + throw ExceptParam(paramName); + } + public static void CheckParam(this IExceptionContext ctx, bool f, string paramName) + { + if (!f) + throw ExceptParam(ctx, paramName); + } + public static void CheckParam(bool f, string paramName, string msg) + { + if (!f) + throw ExceptParam(paramName, msg); + } + public static void CheckParam(this IExceptionContext ctx, bool f, string paramName, string msg) + { + if (!f) + throw ExceptParam(ctx, paramName, msg); + } + public static void CheckParamValue(bool f, T value, string paramName, string msg) + { + if (!f) + throw ExceptParamValue(value, paramName, msg); + } + public static void CheckParamValue(this IExceptionContext ctx, bool f, T value, string paramName, string msg) + { + if (!f) + throw ExceptParamValue(ctx, value, paramName, msg); + } - public static T CheckRef(T val, string paramName) where T : class - { - if (object.ReferenceEquals(val, null)) - throw ExceptValue(paramName); - return val; - } - public static T CheckRef(this IExceptionContext ctx, T val, string paramName) where T : class - { - if (object.ReferenceEquals(val, null)) - throw ExceptValue(ctx, paramName); - return val; - } + public static T CheckRef(T val, string paramName) where T : class + { + if (object.ReferenceEquals(val, null)) + throw ExceptValue(paramName); + return val; + } + public static T CheckRef(this IExceptionContext ctx, T val, string paramName) where T : class + { + if (object.ReferenceEquals(val, null)) + throw ExceptValue(ctx, paramName); + return val; + } - public static T CheckRef(this IExceptionContext ctx, T val, string paramName, string msg) where T : class - { - if (object.ReferenceEquals(val, null)) - throw ExceptValue(ctx, paramName, msg); - return val; - } + public static T CheckRef(this IExceptionContext ctx, T val, string paramName, string msg) where T : class + { + if (object.ReferenceEquals(val, null)) + throw ExceptValue(ctx, paramName, msg); + return val; + } public static void CheckValue(T val, string paramName) where T : class - { - if (object.ReferenceEquals(val, null)) - throw ExceptValue(paramName); - } - public static void CheckValue(this IExceptionContext ctx, T val, string paramName) where T : class - { - if (object.ReferenceEquals(val, null)) - throw ExceptValue(ctx, paramName); - } - public static T CheckValue(T val, string paramName, string msg) where T : class - { - if (object.ReferenceEquals(val, null)) - throw ExceptValue(paramName, msg); - return val; - } - public static T CheckValue(this IExceptionContext ctx, T val, string paramName, string msg) where T : class - { - if (object.ReferenceEquals(val, null)) - throw ExceptValue(ctx, paramName, msg); - return val; - } + { + if (object.ReferenceEquals(val, null)) + throw ExceptValue(paramName); + } + public static void CheckValue(this IExceptionContext ctx, T val, string paramName) where T : class + { + if (object.ReferenceEquals(val, null)) + throw ExceptValue(ctx, paramName); + } + public static T CheckValue(T val, string paramName, string msg) where T : class + { + if (object.ReferenceEquals(val, null)) + throw ExceptValue(paramName, msg); + return val; + } + public static T CheckValue(this IExceptionContext ctx, T val, string paramName, string msg) where T : class + { + if (object.ReferenceEquals(val, null)) + throw ExceptValue(ctx, paramName, msg); + return val; + } - public static string CheckNonEmpty(string s, string paramName) - { - if (string.IsNullOrEmpty(s)) - throw ExceptEmpty(paramName); - return s; - } - public static string CheckNonEmpty(this IExceptionContext ctx, string s, string paramName) - { - if (string.IsNullOrEmpty(s)) - throw ExceptEmpty(ctx, paramName); - return s; - } + public static string CheckNonEmpty(string s, string paramName) + { + if (string.IsNullOrEmpty(s)) + throw ExceptEmpty(paramName); + return s; + } + public static string CheckNonEmpty(this IExceptionContext ctx, string s, string paramName) + { + if (string.IsNullOrEmpty(s)) + throw ExceptEmpty(ctx, paramName); + return s; + } - public static string CheckNonWhiteSpace(string s, string paramName) - { - if (string.IsNullOrWhiteSpace(s)) - throw ExceptWhiteSpace(paramName); - return s; - } - public static string CheckNonWhiteSpace(this IExceptionContext ctx, string s, string paramName) - { - if (string.IsNullOrWhiteSpace(s)) - throw ExceptWhiteSpace(ctx, paramName); - return s; - } + public static string CheckNonWhiteSpace(string s, string paramName) + { + if (string.IsNullOrWhiteSpace(s)) + throw ExceptWhiteSpace(paramName); + return s; + } + public static string CheckNonWhiteSpace(this IExceptionContext ctx, string s, string paramName) + { + if (string.IsNullOrWhiteSpace(s)) + throw ExceptWhiteSpace(ctx, paramName); + return s; + } - public static string CheckNonEmpty(string s, string paramName, string msg) - { - if (string.IsNullOrEmpty(s)) - throw ExceptEmpty(paramName, msg); - return s; - } - public static string CheckNonEmpty(this IExceptionContext ctx, string s, string paramName, string msg) - { - if (string.IsNullOrEmpty(s)) - throw ExceptEmpty(ctx, paramName, msg); - return s; - } + public static string CheckNonEmpty(string s, string paramName, string msg) + { + if (string.IsNullOrEmpty(s)) + throw ExceptEmpty(paramName, msg); + return s; + } + public static string CheckNonEmpty(this IExceptionContext ctx, string s, string paramName, string msg) + { + if (string.IsNullOrEmpty(s)) + throw ExceptEmpty(ctx, paramName, msg); + return s; + } - public static string CheckNonWhiteSpace(string s, string paramName, string msg) - { - if (string.IsNullOrWhiteSpace(s)) - throw ExceptWhiteSpace(paramName, msg); - return s; - } - public static string CheckNonWhiteSpace(this IExceptionContext ctx, string s, string paramName, string msg) - { - if (string.IsNullOrWhiteSpace(s)) - throw ExceptWhiteSpace(ctx, paramName, msg); - return s; - } + public static string CheckNonWhiteSpace(string s, string paramName, string msg) + { + if (string.IsNullOrWhiteSpace(s)) + throw ExceptWhiteSpace(paramName, msg); + return s; + } + public static string CheckNonWhiteSpace(this IExceptionContext ctx, string s, string paramName, string msg) + { + if (string.IsNullOrWhiteSpace(s)) + throw ExceptWhiteSpace(ctx, paramName, msg); + return s; + } - public static T[] CheckNonEmpty(T[] args, string paramName) - { - if (Size(args) == 0) - throw ExceptEmpty(paramName); - return args; - } - public static T[] CheckNonEmpty(this IExceptionContext ctx, T[] args, string paramName) - { - if (Size(args) == 0) - throw ExceptEmpty(ctx, paramName); - return args; - } - public static T[] CheckNonEmpty(T[] args, string paramName, string msg) - { - if (Size(args) == 0) - throw ExceptEmpty(paramName, msg); - return args; - } - public static T[] CheckNonEmpty(this IExceptionContext ctx, T[] args, string paramName, string msg) - { - if (Size(args) == 0) - throw ExceptEmpty(ctx, paramName, msg); - return args; - } - public static ICollection CheckNonEmpty(ICollection args, string paramName) - { - if (Size(args) == 0) - throw ExceptEmpty(paramName); - return args; - } - public static ICollection CheckNonEmpty(this IExceptionContext ctx, ICollection args, string paramName) - { - if (Size(args) == 0) - throw ExceptEmpty(ctx, paramName); - return args; - } - public static ICollection CheckNonEmpty(ICollection args, string paramName, string msg) - { - if (Size(args) == 0) - throw ExceptEmpty(paramName, msg); - return args; - } - public static ICollection CheckNonEmpty(this IExceptionContext ctx, ICollection args, string paramName, string msg) - { - if (Size(args) == 0) - throw ExceptEmpty(ctx, paramName, msg); - return args; - } + public static T[] CheckNonEmpty(T[] args, string paramName) + { + if (Size(args) == 0) + throw ExceptEmpty(paramName); + return args; + } + public static T[] CheckNonEmpty(this IExceptionContext ctx, T[] args, string paramName) + { + if (Size(args) == 0) + throw ExceptEmpty(ctx, paramName); + return args; + } + public static T[] CheckNonEmpty(T[] args, string paramName, string msg) + { + if (Size(args) == 0) + throw ExceptEmpty(paramName, msg); + return args; + } + public static T[] CheckNonEmpty(this IExceptionContext ctx, T[] args, string paramName, string msg) + { + if (Size(args) == 0) + throw ExceptEmpty(ctx, paramName, msg); + return args; + } + public static ICollection CheckNonEmpty(ICollection args, string paramName) + { + if (Size(args) == 0) + throw ExceptEmpty(paramName); + return args; + } + public static ICollection CheckNonEmpty(this IExceptionContext ctx, ICollection args, string paramName) + { + if (Size(args) == 0) + throw ExceptEmpty(ctx, paramName); + return args; + } + public static ICollection CheckNonEmpty(ICollection args, string paramName, string msg) + { + if (Size(args) == 0) + throw ExceptEmpty(paramName, msg); + return args; + } + public static ICollection CheckNonEmpty(this IExceptionContext ctx, ICollection args, string paramName, string msg) + { + if (Size(args) == 0) + throw ExceptEmpty(ctx, paramName, msg); + return args; + } - public static void CheckDecode(bool f) - { - if (!f) - throw ExceptDecode(); - } - public static void CheckDecode(this IExceptionContext ctx, bool f) - { - if (!f) - throw ExceptDecode(ctx); - } - public static void CheckDecode(bool f, string msg) - { - if (!f) - throw ExceptDecode(msg); - } - public static void CheckDecode(this IExceptionContext ctx, bool f, string msg) - { - if (!f) - throw ExceptDecode(ctx, msg); - } + public static void CheckDecode(bool f) + { + if (!f) + throw ExceptDecode(); + } + public static void CheckDecode(this IExceptionContext ctx, bool f) + { + if (!f) + throw ExceptDecode(ctx); + } + public static void CheckDecode(bool f, string msg) + { + if (!f) + throw ExceptDecode(msg); + } + public static void CheckDecode(this IExceptionContext ctx, bool f, string msg) + { + if (!f) + throw ExceptDecode(ctx, msg); + } - public static void CheckIO(bool f) - { - if (!f) - throw ExceptIO(); - } - public static void CheckIO(this IExceptionContext ctx, bool f) - { - if (!f) - throw ExceptIO(ctx); - } - public static void CheckIO(bool f, string msg) - { - if (!f) - throw ExceptIO(msg); - } - public static void CheckIO(this IExceptionContext ctx, bool f, string msg) - { - if (!f) - throw ExceptIO(ctx, msg); - } + public static void CheckIO(bool f) + { + if (!f) + throw ExceptIO(); + } + public static void CheckIO(this IExceptionContext ctx, bool f) + { + if (!f) + throw ExceptIO(ctx); + } + public static void CheckIO(bool f, string msg) + { + if (!f) + throw ExceptIO(msg); + } + public static void CheckIO(this IExceptionContext ctx, bool f, string msg) + { + if (!f) + throw ExceptIO(ctx, msg); + } +#if !PRIVATE_CONTRACTS /// /// Check state of the host and throw exception if host marked to stop all exection. /// @@ -729,248 +752,248 @@ public static void CheckAlive(this IHostEnvironment env) if (env.IsCancelled) throw Process(new OperationCanceledException("Operation was cancelled."), env); } +#endif + /// + /// This documents that the parameter can legally be null. + /// + [Conditional("INVARIANT_CHECKS")] + public static void CheckValueOrNull(T val) where T : class + { + } + [Conditional("INVARIANT_CHECKS")] + public static void CheckValueOrNull(this IExceptionContext ctx, T val) where T : class + { + } - /// - /// This documents that the parameter can legally be null. - /// - [Conditional("INVARIANT_CHECKS")] - public static void CheckValueOrNull(T val) where T : class - { - } - [Conditional("INVARIANT_CHECKS")] - public static void CheckValueOrNull(this IExceptionContext ctx, T val) where T : class - { - } - - // Assert - - #region Private assert handling + // Assert - private static void DbgFailCore(string msg, IExceptionContext ctx = null) - { - var handler = _handler; + #region Private assert handling - if (handler != null) - handler(msg, ctx); - else if (ctx != null) - Debug.Fail(msg, ctx.ContextDescription); - else - Debug.Fail(msg); - } + private static void DbgFailCore(string msg, IExceptionContext ctx = null) + { + var handler = _handler; + + if (handler != null) + handler(msg, ctx); + else if (ctx != null) + Debug.Fail(msg, ctx.ContextDescription); + else + Debug.Fail(msg); + } - private static void DbgFail(IExceptionContext ctx = null) - { - DbgFailCore("Assertion Failed", ctx); - } - private static void DbgFail(string msg) - { - DbgFailCore(msg); - } - private static void DbgFail(IExceptionContext ctx, string msg) - { - DbgFailCore(msg, ctx); - } - private static void DbgFailValue(IExceptionContext ctx = null) - { - DbgFailCore("Non-null assertion failure", ctx); - } - private static void DbgFailValue(string paramName) - { - DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}", paramName)); - } - private static void DbgFailValue(IExceptionContext ctx, string paramName) - { - DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}", paramName), ctx); - } - private static void DbgFailValue(string paramName, string msg) - { - DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}: {1}", paramName, msg)); - } - private static void DbgFailValue(IExceptionContext ctx, string paramName, string msg) - { - DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}: {1}", paramName, msg), ctx); - } - private static void DbgFailEmpty(IExceptionContext ctx = null) - { - DbgFailCore("Non-empty assertion failure", ctx); - } - private static void DbgFailEmpty(string msg) - { - DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-empty assertion failure: {0}", msg)); - } - private static void DbgFailEmpty(IExceptionContext ctx, string msg) - { - DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-empty assertion failure: {0}", msg), ctx); - } + private static void DbgFail(IExceptionContext ctx = null) + { + DbgFailCore("Assertion Failed", ctx); + } + private static void DbgFail(string msg) + { + DbgFailCore(msg); + } + private static void DbgFail(IExceptionContext ctx, string msg) + { + DbgFailCore(msg, ctx); + } + private static void DbgFailValue(IExceptionContext ctx = null) + { + DbgFailCore("Non-null assertion failure", ctx); + } + private static void DbgFailValue(string paramName) + { + DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}", paramName)); + } + private static void DbgFailValue(IExceptionContext ctx, string paramName) + { + DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}", paramName), ctx); + } + private static void DbgFailValue(string paramName, string msg) + { + DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}: {1}", paramName, msg)); + } + private static void DbgFailValue(IExceptionContext ctx, string paramName, string msg) + { + DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-null assertion failure: {0}: {1}", paramName, msg), ctx); + } + private static void DbgFailEmpty(IExceptionContext ctx = null) + { + DbgFailCore("Non-empty assertion failure", ctx); + } + private static void DbgFailEmpty(string msg) + { + DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-empty assertion failure: {0}", msg)); + } + private static void DbgFailEmpty(IExceptionContext ctx, string msg) + { + DbgFailCore(string.Format(CultureInfo.InvariantCulture, "Non-empty assertion failure: {0}", msg), ctx); + } - #endregion Private assert handling + #endregion Private assert handling - [Conditional("DEBUG")] - public static void Assert(bool f) - { - if (!f) - DbgFail(); - } - [Conditional("DEBUG")] - public static void Assert(this IExceptionContext ctx, bool f) - { - if (!f) - DbgFail(ctx); - } + [Conditional("DEBUG")] + public static void Assert(bool f) + { + if (!f) + DbgFail(); + } + [Conditional("DEBUG")] + public static void Assert(this IExceptionContext ctx, bool f) + { + if (!f) + DbgFail(ctx); + } - [Conditional("DEBUG")] - public static void Assert(bool f, string msg) - { - if (!f) - DbgFail(msg); - } - [Conditional("DEBUG")] - public static void Assert(this IExceptionContext ctx, bool f, string msg) - { - if (!f) - DbgFail(ctx, msg); - } + [Conditional("DEBUG")] + public static void Assert(bool f, string msg) + { + if (!f) + DbgFail(msg); + } + [Conditional("DEBUG")] + public static void Assert(this IExceptionContext ctx, bool f, string msg) + { + if (!f) + DbgFail(ctx, msg); + } - [Conditional("DEBUG")] - public static void AssertValue(T val) where T : class - { - if (object.ReferenceEquals(val, null)) - DbgFailValue(); - } - [Conditional("DEBUG")] - public static void AssertValue(this IExceptionContext ctx, T val) where T : class - { - if (object.ReferenceEquals(val, null)) - DbgFailValue(ctx); - } + [Conditional("DEBUG")] + public static void AssertValue(T val) where T : class + { + if (object.ReferenceEquals(val, null)) + DbgFailValue(); + } + [Conditional("DEBUG")] + public static void AssertValue(this IExceptionContext ctx, T val) where T : class + { + if (object.ReferenceEquals(val, null)) + DbgFailValue(ctx); + } - [Conditional("DEBUG")] - public static void AssertValue(T val, string paramName) where T : class - { - if (object.ReferenceEquals(val, null)) - DbgFailValue(paramName); - } - [Conditional("DEBUG")] - public static void AssertValue(this IExceptionContext ctx, T val, string paramName) where T : class - { - if (object.ReferenceEquals(val, null)) - DbgFailValue(ctx, paramName); - } + [Conditional("DEBUG")] + public static void AssertValue(T val, string paramName) where T : class + { + if (object.ReferenceEquals(val, null)) + DbgFailValue(paramName); + } + [Conditional("DEBUG")] + public static void AssertValue(this IExceptionContext ctx, T val, string paramName) where T : class + { + if (object.ReferenceEquals(val, null)) + DbgFailValue(ctx, paramName); + } - [Conditional("DEBUG")] - public static void AssertValue(T val, string name, string msg) where T : class - { - if (object.ReferenceEquals(val, null)) - DbgFailValue(name, msg); - } - [Conditional("DEBUG")] - public static void AssertValue(this IExceptionContext ctx, T val, string name, string msg) where T : class - { - if (object.ReferenceEquals(val, null)) - DbgFailValue(ctx, name, msg); - } + [Conditional("DEBUG")] + public static void AssertValue(T val, string name, string msg) where T : class + { + if (object.ReferenceEquals(val, null)) + DbgFailValue(name, msg); + } + [Conditional("DEBUG")] + public static void AssertValue(this IExceptionContext ctx, T val, string name, string msg) where T : class + { + if (object.ReferenceEquals(val, null)) + DbgFailValue(ctx, name, msg); + } - [Conditional("DEBUG")] - public static void AssertNonEmpty(string s) - { - if (string.IsNullOrEmpty(s)) - DbgFailEmpty(); - } - [Conditional("DEBUG")] - public static void AssertNonEmpty(this IExceptionContext ctx, string s) - { - if (string.IsNullOrEmpty(s)) - DbgFailEmpty(ctx); - } + [Conditional("DEBUG")] + public static void AssertNonEmpty(string s) + { + if (string.IsNullOrEmpty(s)) + DbgFailEmpty(); + } + [Conditional("DEBUG")] + public static void AssertNonEmpty(this IExceptionContext ctx, string s) + { + if (string.IsNullOrEmpty(s)) + DbgFailEmpty(ctx); + } - [Conditional("DEBUG")] - public static void AssertNonWhiteSpace(string s) - { - if (string.IsNullOrWhiteSpace(s)) - DbgFailEmpty(); - } - [Conditional("DEBUG")] - public static void AssertNonWhiteSpace(this IExceptionContext ctx, string s) - { - if (string.IsNullOrWhiteSpace(s)) - DbgFailEmpty(ctx); - } + [Conditional("DEBUG")] + public static void AssertNonWhiteSpace(string s) + { + if (string.IsNullOrWhiteSpace(s)) + DbgFailEmpty(); + } + [Conditional("DEBUG")] + public static void AssertNonWhiteSpace(this IExceptionContext ctx, string s) + { + if (string.IsNullOrWhiteSpace(s)) + DbgFailEmpty(ctx); + } - [Conditional("DEBUG")] - public static void AssertNonEmpty(string s, string msg) - { - if (string.IsNullOrEmpty(s)) - DbgFailEmpty(msg); - } - [Conditional("DEBUG")] - public static void AssertNonEmpty(this IExceptionContext ctx, string s, string msg) - { - if (string.IsNullOrEmpty(s)) - DbgFailEmpty(ctx, msg); - } + [Conditional("DEBUG")] + public static void AssertNonEmpty(string s, string msg) + { + if (string.IsNullOrEmpty(s)) + DbgFailEmpty(msg); + } + [Conditional("DEBUG")] + public static void AssertNonEmpty(this IExceptionContext ctx, string s, string msg) + { + if (string.IsNullOrEmpty(s)) + DbgFailEmpty(ctx, msg); + } - [Conditional("DEBUG")] - public static void AssertNonWhiteSpace(string s, string msg) - { - if (string.IsNullOrWhiteSpace(s)) - DbgFailEmpty(msg); - } - [Conditional("DEBUG")] - public static void AssertNonWhiteSpace(this IExceptionContext ctx, string s, string msg) - { - if (string.IsNullOrWhiteSpace(s)) - DbgFailEmpty(ctx, msg); - } + [Conditional("DEBUG")] + public static void AssertNonWhiteSpace(string s, string msg) + { + if (string.IsNullOrWhiteSpace(s)) + DbgFailEmpty(msg); + } + [Conditional("DEBUG")] + public static void AssertNonWhiteSpace(this IExceptionContext ctx, string s, string msg) + { + if (string.IsNullOrWhiteSpace(s)) + DbgFailEmpty(ctx, msg); + } - [Conditional("DEBUG")] - public static void AssertNonEmpty(ReadOnlySpan args) - { - if (args.IsEmpty) - DbgFail(); - } - [Conditional("DEBUG")] - public static void AssertNonEmpty(Span args) - { - if (args.IsEmpty) - DbgFail(); - } + [Conditional("DEBUG")] + public static void AssertNonEmpty(ReadOnlySpan args) + { + if (args.IsEmpty) + DbgFail(); + } + [Conditional("DEBUG")] + public static void AssertNonEmpty(Span args) + { + if (args.IsEmpty) + DbgFail(); + } - [Conditional("DEBUG")] - public static void AssertNonEmpty(ICollection args) - { - if (Size(args) == 0) - DbgFail(); - } - [Conditional("DEBUG")] - public static void AssertNonEmpty(this IExceptionContext ctx, ICollection args) - { - if (Size(args) == 0) - DbgFail(ctx); - } + [Conditional("DEBUG")] + public static void AssertNonEmpty(ICollection args) + { + if (Size(args) == 0) + DbgFail(); + } + [Conditional("DEBUG")] + public static void AssertNonEmpty(this IExceptionContext ctx, ICollection args) + { + if (Size(args) == 0) + DbgFail(ctx); + } - [Conditional("DEBUG")] - public static void AssertNonEmpty(ICollection args, string msg) - { - if (Size(args) == 0) - DbgFail(msg); - } - [Conditional("DEBUG")] - public static void AssertNonEmpty(this IExceptionContext ctx, ICollection args, string msg) - { - if (Size(args) == 0) - DbgFail(ctx, msg); - } + [Conditional("DEBUG")] + public static void AssertNonEmpty(ICollection args, string msg) + { + if (Size(args) == 0) + DbgFail(msg); + } + [Conditional("DEBUG")] + public static void AssertNonEmpty(this IExceptionContext ctx, ICollection args, string msg) + { + if (Size(args) == 0) + DbgFail(ctx, msg); + } - /// - /// This documents that the parameter can legally be null. - /// - [Conditional("INVARIANT_CHECKS")] - public static void AssertValueOrNull(T val) where T : class - { - } - [Conditional("INVARIANT_CHECKS")] - public static void AssertValueOrNull(this IExceptionContext ctx, T val) where T : class - { - } + /// + /// This documents that the parameter can legally be null. + /// + [Conditional("INVARIANT_CHECKS")] + public static void AssertValueOrNull(T val) where T : class + { } + [Conditional("INVARIANT_CHECKS")] + public static void AssertValueOrNull(this IExceptionContext ctx, T val) where T : class + { + } +} } diff --git a/src/Microsoft.ML.Core/Utilities/DoubleParser.cs b/src/Microsoft.ML.Core/Utilities/DoubleParser.cs index 4f2ef9ad80..a1a82d5218 100644 --- a/src/Microsoft.ML.Core/Utilities/DoubleParser.cs +++ b/src/Microsoft.ML.Core/Utilities/DoubleParser.cs @@ -13,8 +13,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - [BestFriend] - internal static class DoubleParser + public class DoubleParser { private const ulong TopBit = 0x8000000000000000UL; private const ulong TopTwoBits = 0xC000000000000000UL; diff --git a/src/Microsoft.ML.Core/Utilities/FixedSizeQueue.cs b/src/Microsoft.ML.Core/Utilities/FixedSizeQueue.cs index bdcea0c0ae..1c375bd625 100644 --- a/src/Microsoft.ML.Core/Utilities/FixedSizeQueue.cs +++ b/src/Microsoft.ML.Core/Utilities/FixedSizeQueue.cs @@ -12,8 +12,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// A fixed-length circular array. Items are added at the end. If the array is full, adding /// an item will result in discarding the least recently added item. /// - [BestFriend] - internal sealed class FixedSizeQueue + public sealed class FixedSizeQueue { private readonly T[] _array; private int _startIndex; diff --git a/src/Microsoft.ML.Core/Utilities/FloatUtils.cs b/src/Microsoft.ML.Core/Utilities/FloatUtils.cs index 06d403da9a..fdbc59aa89 100644 --- a/src/Microsoft.ML.Core/Utilities/FloatUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/FloatUtils.cs @@ -8,8 +8,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - [BestFriend] - internal static class FloatUtils + public static class FloatUtils { // This is used to read and write the bits of a Double. // Thanks to Vance Morrison for educating me about this excellent aliasing mechanism. diff --git a/src/Microsoft.ML.Core/Utilities/HashArray.cs b/src/Microsoft.ML.Core/Utilities/HashArray.cs index 64dced9792..27f0ec9b5d 100644 --- a/src/Microsoft.ML.Core/Utilities/HashArray.cs +++ b/src/Microsoft.ML.Core/Utilities/HashArray.cs @@ -17,8 +17,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// Also implements memory efficient sorting. /// Note: Supports adding and looking up of items but does not support removal of items. /// - [BestFriend] - internal sealed class HashArray + public sealed class HashArray // REVIEW: May want to not consider not making TItem have to be IComparable but instead // could support user specified sort order. where TItem : IEquatable, IComparable @@ -228,15 +227,16 @@ private void DumpStats() } /// - /// Copies all items to the passed in span. Requires the passed in span to be at least the + /// Copies all items to the passed in array. Requires the passed in array to be at least the /// same length as Count. /// - public void CopyTo(Span destination) + public void CopyTo(TItem[] array) { - Contracts.Check(destination.Length >= _ct); + Contracts.Check(array != null); + Contracts.Check(array.Length >= _ct); for (int i = 0; i < _ct; i++) - destination[i] = _entries[i].Value; + array[i] = _entries[i].Value; } private static class HashHelpers diff --git a/src/Microsoft.ML.Core/Utilities/Hashing.cs b/src/Microsoft.ML.Core/Utilities/Hashing.cs index ae36fae95d..a15677451b 100644 --- a/src/Microsoft.ML.Core/Utilities/Hashing.cs +++ b/src/Microsoft.ML.Core/Utilities/Hashing.cs @@ -9,8 +9,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - [BestFriend] - internal static class Hashing + public static class Hashing { private const uint _defaultSeed = (5381 << 16) + 5381; diff --git a/src/Microsoft.ML.Core/Utilities/Heap.cs b/src/Microsoft.ML.Core/Utilities/Heap.cs index 7652163f10..241acd0209 100644 --- a/src/Microsoft.ML.Core/Utilities/Heap.cs +++ b/src/Microsoft.ML.Core/Utilities/Heap.cs @@ -12,8 +12,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// Implements a heap. /// - [BestFriend] - internal sealed class Heap + public sealed class Heap { private readonly List _rgv; // The heap elements. The 0th element is a dummy. private readonly Func _fnReverse; @@ -197,7 +196,7 @@ private void BubbleDown(int iv) /// /// For the heap to allow deletion, the heap node has to derive from this class. /// - internal abstract class HeapNode + public abstract partial class HeapNode { // Where this node lives in the heap. Zero means it isn't in the heap. private int _index; @@ -208,7 +207,10 @@ protected HeapNode() } public bool InHeap { get { return _index > 0; } } + } + public abstract partial class HeapNode + { /// /// Implements a heap. /// diff --git a/src/Microsoft.ML.Core/Utilities/HybridMemoryStream.cs b/src/Microsoft.ML.Core/Utilities/HybridMemoryStream.cs index 02f713dd6e..73b4c4a828 100644 --- a/src/Microsoft.ML.Core/Utilities/HybridMemoryStream.cs +++ b/src/Microsoft.ML.Core/Utilities/HybridMemoryStream.cs @@ -15,8 +15,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// file system. This can be useful if we have intermediate operations that require streams. /// The temporary file will be destroyed if the object is properly disposed. /// - [BestFriend] - internal sealed class HybridMemoryStream : Stream + public sealed class HybridMemoryStream : Stream { private MemoryStream _memStream; private Stream _overflowStream; diff --git a/src/Microsoft.ML.Core/Utilities/IndentedTextWriterExtensions.cs b/src/Microsoft.ML.Core/Utilities/IndentedTextWriterExtensions.cs deleted file mode 100644 index fe8fd12e96..0000000000 --- a/src/Microsoft.ML.Core/Utilities/IndentedTextWriterExtensions.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.CodeDom.Compiler; -using System.IO; -using System.Text; - -namespace Microsoft.ML.Runtime.Internal.Utilities -{ - [BestFriend] - internal static class IndentedTextWriterExtensions - { - public struct Scope : IDisposable - { - private IndentedTextWriter _writer; - - public Scope(IndentedTextWriter writer) - { - _writer = writer; - _writer.Indent(); - } - public void Dispose() - { - _writer.Outdent(); - _writer = null; - } - } - - public static Scope Nest(this IndentedTextWriter writer) - { - return new Scope(writer); - } - - public static void Indent(this IndentedTextWriter writer) - { - writer.Indent++; - } - public static void Outdent(this IndentedTextWriter writer) - { - writer.Indent--; - } - - public static void WriteLineNoTabs(this IndentedTextWriter writer) - { - writer.WriteLineNoTabs(string.Empty); - } - } -} \ No newline at end of file diff --git a/src/Microsoft.ML.Core/Utilities/IndentingTextWriter.cs b/src/Microsoft.ML.Core/Utilities/IndentingTextWriter.cs new file mode 100644 index 0000000000..e42bdf6519 --- /dev/null +++ b/src/Microsoft.ML.Core/Utilities/IndentingTextWriter.cs @@ -0,0 +1,281 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.IO; +using System.Text; + +namespace Microsoft.ML.Runtime.Internal.Utilities +{ + public sealed class IndentingTextWriter : TextWriter + { + public struct Scope : IDisposable + { + private IndentingTextWriter _wrt; + + public Scope(IndentingTextWriter wrt) + { + _wrt = wrt; + _wrt.Indent(); + } + public void Dispose() + { + _wrt.Outdent(); + _wrt = null; + } + } + + private readonly TextWriter _wrt; + private readonly string _str; + + private bool _bol; + private int _indent; + private bool _skipLine; + + public static IndentingTextWriter Wrap(TextWriter wrt, string indentString = " ") + { + Contracts.AssertValue(wrt); + Contracts.AssertNonEmpty(indentString); + + IndentingTextWriter itw = wrt as IndentingTextWriter; + if (itw != null) + return itw; + return new IndentingTextWriter(wrt, indentString); + } + + private IndentingTextWriter(TextWriter wrt, string indentString) + { + Contracts.AssertValue(wrt); + _wrt = wrt; + _str = indentString; + _bol = true; + } + + public Scope Nest() + { + return new Scope(this); + } + + public void Indent() + { + _indent++; + } + + public void Outdent() + { + Contracts.Assert(_indent > 0); + --_indent; + _skipLine = false; + } + + public void Skip() + { + _skipLine = true; + } + + private void Adjust() + { + if (_bol) + { + if (_skipLine) + { + _wrt.WriteLine(); + _skipLine = false; + } + for (int i = 0; i < _indent; i++) + _wrt.Write(_str); + _bol = false; + } + } + + private void AdjustLine() + { + Adjust(); + _bol = true; + } + + public override System.Text.Encoding Encoding + { + get { return _wrt.Encoding; } + } + + public override void Write(bool value) + { + Adjust(); + _wrt.Write(value); + } + public override void Write(char value) + { + Adjust(); + _wrt.Write(value); + } + public override void Write(char[] buffer) + { + Adjust(); + _wrt.Write(buffer); + } + public override void Write(decimal value) + { + Adjust(); + _wrt.Write(value); + } + public override void Write(double value) + { + Adjust(); + _wrt.Write(value); + } + public override void Write(float value) + { + Adjust(); + _wrt.Write(value); + } + public override void Write(int value) + { + Adjust(); + _wrt.Write(value); + } + public override void Write(long value) + { + Adjust(); + _wrt.Write(value); + } + public override void Write(object value) + { + Adjust(); + _wrt.Write(value); + } + public override void Write(string value) + { + Adjust(); + _wrt.Write(value); + } + public override void Write(uint value) + { + Adjust(); + _wrt.Write(value); + } + public override void Write(ulong value) + { + Adjust(); + _wrt.Write(value); + } + public override void Write(string format, object arg0) + { + Adjust(); + _wrt.Write(format, arg0); + } + public override void Write(string format, params object[] arg) + { + Adjust(); + _wrt.Write(format, arg); + } + public override void Write(char[] buffer, int index, int count) + { + Adjust(); + _wrt.Write(buffer, index, count); + } + public override void Write(string format, object arg0, object arg1) + { + Adjust(); + _wrt.Write(format, arg0, arg1); + } + public override void Write(string format, object arg0, object arg1, object arg2) + { + Adjust(); + _wrt.Write(format, arg0, arg1, arg2); + } + + public override void WriteLine() + { + _bol = true; + _skipLine = false; + _wrt.WriteLine(); + } + public override void WriteLine(bool value) + { + AdjustLine(); + _wrt.WriteLine(value); + } + public override void WriteLine(char value) + { + AdjustLine(); + _wrt.WriteLine(value); + } + public override void WriteLine(char[] buffer) + { + AdjustLine(); + _wrt.WriteLine(buffer); + } + public override void WriteLine(decimal value) + { + AdjustLine(); + _wrt.WriteLine(value); + } + public override void WriteLine(double value) + { + AdjustLine(); + _wrt.WriteLine(value); + } + public override void WriteLine(float value) + { + AdjustLine(); + _wrt.WriteLine(value); + } + public override void WriteLine(int value) + { + AdjustLine(); + _wrt.WriteLine(value); + } + public override void WriteLine(long value) + { + AdjustLine(); + _wrt.WriteLine(value); + } + public override void WriteLine(object value) + { + AdjustLine(); + _wrt.WriteLine(value); + } + public override void WriteLine(string value) + { + AdjustLine(); + _wrt.WriteLine(value); + } + public override void WriteLine(uint value) + { + AdjustLine(); + _wrt.WriteLine(value); + } + public override void WriteLine(ulong value) + { + AdjustLine(); + _wrt.WriteLine(value); + } + public override void WriteLine(string format, object arg0) + { + AdjustLine(); + _wrt.WriteLine(format, arg0); + } + public override void WriteLine(string format, params object[] arg) + { + AdjustLine(); + _wrt.WriteLine(format, arg); + } + public override void WriteLine(char[] buffer, int index, int count) + { + AdjustLine(); + _wrt.WriteLine(buffer, index, count); + } + public override void WriteLine(string format, object arg0, object arg1) + { + AdjustLine(); + _wrt.WriteLine(format, arg0, arg1); + } + public override void WriteLine(string format, object arg0, object arg1, object arg2) + { + AdjustLine(); + _wrt.WriteLine(format, arg0, arg1, arg2); + } + } +} diff --git a/src/Microsoft.ML.Core/Utilities/LineParser.cs b/src/Microsoft.ML.Core/Utilities/LineParser.cs deleted file mode 100644 index 73d9bb6158..0000000000 --- a/src/Microsoft.ML.Core/Utilities/LineParser.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.CompilerServices; - -namespace Microsoft.ML.Runtime.Internal.Utilities -{ - [BestFriend] - internal static class LineParser - { - public static (bool isSuccess, string key, float[] values) ParseKeyThenNumbers(string line) - { - if (string.IsNullOrWhiteSpace(line)) - return (false, null, null); - - ReadOnlySpan trimmedLine = line.AsSpan().TrimEnd(); // TrimEnd creates a Span, no allocations - - int firstSeparatorIndex = trimmedLine.IndexOfAny(' ', '\t'); // the first word is the key, we just skip it - ReadOnlySpan valuesToParse = trimmedLine.Slice(start: firstSeparatorIndex + 1); - - float[] values = AllocateFixedSizeArrayToStoreParsedValues(valuesToParse); - - int toParseStartIndex = 0; - int valueIndex = 0; - for (int i = 0; i <= valuesToParse.Length; i++) - { - if (i == valuesToParse.Length || valuesToParse[i] == ' ' || valuesToParse[i] == '\t') - { - if (DoubleParser.TryParse(valuesToParse.Slice(toParseStartIndex, i - toParseStartIndex), out float parsed)) - values[valueIndex++] = parsed; - else - return (false, null, null); - - toParseStartIndex = i + 1; - } - } - - return (true, trimmedLine.Slice(0, firstSeparatorIndex).ToString(), values); - } - - /// - /// we count the number of values first to allocate a single array with of proper size - /// - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static float[] AllocateFixedSizeArrayToStoreParsedValues(ReadOnlySpan valuesToParse) - { - int valuesCount = 0; - - for (int i = 0; i < valuesToParse.Length; i++) - if (valuesToParse[i] == ' ' || valuesToParse[i] == '\t') - valuesCount++; - - return new float[valuesCount + 1]; // + 1 because the line is trimmed and there is no whitespace at the end - } - } -} \ No newline at end of file diff --git a/src/Microsoft.ML.Core/Utilities/ListExtensions.cs b/src/Microsoft.ML.Core/Utilities/ListExtensions.cs new file mode 100644 index 0000000000..22c45a3bca --- /dev/null +++ b/src/Microsoft.ML.Core/Utilities/ListExtensions.cs @@ -0,0 +1,42 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; + +namespace Microsoft.ML.Runtime.Internal.Utilities +{ + public static class ListExtensions + { + public static void Push(this List list, T item) + { + Contracts.AssertValue(list); + list.Add(item); + } + + public static T Pop(this List list) + { + Contracts.AssertValue(list); + Contracts.Assert(list.Count > 0); + int index = list.Count - 1; + T item = list[index]; + list.RemoveAt(index); + return item; + } + + public static void PopTo(this List list, int depth) + { + Contracts.AssertValue(list); + Contracts.Assert(0 <= depth && depth <= list.Count); + list.RemoveRange(depth, list.Count - depth); + } + + public static T Peek(this List list) + { + Contracts.AssertValue(list); + Contracts.Assert(list.Count > 0); + return list[list.Count - 1]; + } + } +} diff --git a/src/Microsoft.ML.Core/Utilities/LruCache.cs b/src/Microsoft.ML.Core/Utilities/LruCache.cs index e041efde02..21897f4e27 100644 --- a/src/Microsoft.ML.Core/Utilities/LruCache.cs +++ b/src/Microsoft.ML.Core/Utilities/LruCache.cs @@ -10,8 +10,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// Implements a least recently used cache. /// - [BestFriend] - internal sealed class LruCache + public sealed class LruCache { private readonly int _size; private readonly Dictionary>> _cache; diff --git a/src/Microsoft.ML.Core/Utilities/MathUtils.cs b/src/Microsoft.ML.Core/Utilities/MathUtils.cs index 4ce1bb4cf0..fb68ee82d6 100644 --- a/src/Microsoft.ML.Core/Utilities/MathUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/MathUtils.cs @@ -13,8 +13,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// Some useful math methods. /// - [BestFriend] - internal static class MathUtils + public static class MathUtils { public static Float ToFloat(this Double dbl) { @@ -133,23 +132,40 @@ public static Float Min(Float[] a) } /// - /// Finds the first index of the max element of the span. + /// Finds the first index of the max element of the array. /// NaNs are ignored. If all the elements to consider are NaNs, -1 is /// returned. The caller should distinguish in this case between two /// possibilities: /// 1) The number of the element to consider is zero. /// 2) All the elements to consider are NaNs. /// - /// The span of floats. + /// an array /// the first index of the max element - public static int ArgMax(ReadOnlySpan a) + public static int ArgMax(Float[] a) { - if (a.IsEmpty) + return ArgMax(a, Utils.Size(a)); + } + + /// + /// Finds the first index of the max element of the array. + /// NaNs are ignored. If all the elements to consider are NaNs, -1 is + /// returned. The caller should distinguish in this case between two + /// possibilities: + /// 1) The number of the element to consider is zero. + /// 2) All the elements to consider are NaNs. + /// + /// an array + /// number of the element in the array to consider + /// the first index of the max element + public static int ArgMax(Float[] a, int count) + { + Contracts.Assert(0 <= count && count <= Utils.Size(a)); + if (count == 0) return -1; int amax = -1; Float max = Float.NegativeInfinity; - for (int i = a.Length - 1; i >= 0; i--) + for (int i = count - 1; i >= 0; i--) { if (max <= a[i]) { @@ -162,23 +178,40 @@ public static int ArgMax(ReadOnlySpan a) } /// - /// Finds the first index of the minimum element of the span. + /// Finds the first index of the minimum element of the array. /// NaNs are ignored. If all the elements to consider are NaNs, -1 is /// returned. The caller should distinguish in this case between two /// possibilities: /// 1) The number of the element to consider is zero. /// 2) All the elements to consider are NaNs. /// - /// The span of floats. + /// an array /// the first index of the minimum element - public static int ArgMin(ReadOnlySpan a) + public static int ArgMin(Float[] a) { - if (a.IsEmpty) + return ArgMin(a, Utils.Size(a)); + } + + /// + /// Finds the first index of the minimum element of the array. + /// NaNs are ignored. If all the elements to consider are NaNs, -1 is + /// returned. The caller should distinguish in this case between two + /// possibilities: + /// 1) The number of the element to consider is zero. + /// 2) All the elements to consider are NaNs. + /// + /// an array + /// number of the element in the array to consider + /// the first index of the minimum element + public static int ArgMin(Float[] a, int count) + { + Contracts.Assert(0 <= count && count <= Utils.Size(a)); + if (count == 0) return -1; int amin = -1; Float min = Float.PositiveInfinity; - for (int i = a.Length - 1; i >= 0; i--) + for (int i = count - 1; i >= 0; i--) { if (min >= a[i]) { @@ -199,14 +232,18 @@ public static int ArgMin(ReadOnlySpan a) /// /// computes the "softmax" function: log sum_i exp x_i /// - /// Span of numbers to softmax + /// Array of numbers to softmax + /// the number of input array elements to process /// the softmax of the numbers /// may have slightly lower roundoff error if inputs are sorted, smallest first - public static Float SoftMax(ReadOnlySpan inputs) + public static Float SoftMax(Float[] inputs, int count) { + Contracts.AssertValue(inputs); + Contracts.Assert(0 < count & count <= inputs.Length); + int maxIdx = 0; Float max = Float.NegativeInfinity; - for (int i = 0; i < inputs.Length; i++) + for (int i = 0; i < count; i++) { if (inputs[i] > max) { @@ -218,13 +255,13 @@ public static Float SoftMax(ReadOnlySpan inputs) if (Float.IsNegativeInfinity(max)) return Float.NegativeInfinity; - if (inputs.Length == 1) + if (count == 1) return max; double intermediate = 0.0; Float cutoff = max - LogTolerance; - for (int i = 0; i < inputs.Length; i++) + for (int i = 0; i < count; i++) { if (i == maxIdx) continue; diff --git a/src/Microsoft.ML.Core/Utilities/MatrixTransposeOps.cs b/src/Microsoft.ML.Core/Utilities/MatrixTransposeOps.cs index cb945e56a2..0afdd9a6a5 100644 --- a/src/Microsoft.ML.Core/Utilities/MatrixTransposeOps.cs +++ b/src/Microsoft.ML.Core/Utilities/MatrixTransposeOps.cs @@ -9,8 +9,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - [BestFriend] - internal static class MatrixTransposeOps + public static class MatrixTransposeOps { private const int _block = 32; diff --git a/src/Microsoft.ML.Core/Utilities/MemUtils.cs b/src/Microsoft.ML.Core/Utilities/MemUtils.cs new file mode 100644 index 0000000000..1dba9205e9 --- /dev/null +++ b/src/Microsoft.ML.Core/Utilities/MemUtils.cs @@ -0,0 +1,27 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ML.Runtime.Internal.CpuMath +{ + public static class MemUtils + { + // The signature of this method is intentionally identical to + // .Net 4.6's Buffer.MemoryCopy. + // REVIEW: Remove once we're on a version of .NET which includes + // Buffer.MemoryCopy. + public static unsafe void MemoryCopy(void* source, void* destination, long destinationSizeInBytes, long sourceBytesToCopy) + { + // MemCpy has undefined behavior when handed overlapping source and + // destination buffers. + // Do not pass it overlapping source and destination buffers. + Contracts.Check((byte*)destination + sourceBytesToCopy <= source || destination >= (byte*)source + sourceBytesToCopy); + Contracts.Check(destinationSizeInBytes >= sourceBytesToCopy); +#if CORECLR + System.Buffer.MemoryCopy(source, destination, destinationSizeInBytes, sourceBytesToCopy); +#else + Thunk.MemCpy(destination, source, sourceBytesToCopy); +#endif + } + } +} diff --git a/src/Microsoft.ML.Core/Utilities/MinWaiter.cs b/src/Microsoft.ML.Core/Utilities/MinWaiter.cs index fbaf8fb6d6..42ddf0c69c 100644 --- a/src/Microsoft.ML.Core/Utilities/MinWaiter.cs +++ b/src/Microsoft.ML.Core/Utilities/MinWaiter.cs @@ -21,8 +21,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// registering itself for a new event (or, finally, retiring itself through /// ). /// - [BestFriend] - internal sealed class MinWaiter + public sealed class MinWaiter { /// /// This is an event-line pair. The intended usage is, when the line diff --git a/src/Microsoft.ML.Core/Utilities/NormStr.cs b/src/Microsoft.ML.Core/Utilities/NormStr.cs index c79e2425d1..fea018ac58 100644 --- a/src/Microsoft.ML.Core/Utilities/NormStr.cs +++ b/src/Microsoft.ML.Core/Utilities/NormStr.cs @@ -17,8 +17,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// Normalized string type. For string pooling. /// - [BestFriend] - internal sealed class NormStr + public sealed class NormStr { public readonly ReadOnlyMemory Value; public readonly int Id; diff --git a/src/Microsoft.ML.Core/Utilities/ObjectPool.cs b/src/Microsoft.ML.Core/Utilities/ObjectPool.cs index a06202af76..4a65286551 100644 --- a/src/Microsoft.ML.Core/Utilities/ObjectPool.cs +++ b/src/Microsoft.ML.Core/Utilities/ObjectPool.cs @@ -8,8 +8,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - [BestFriend] - internal sealed class ObjectPool : ObjectPoolBase where T : class, new() + public sealed class ObjectPool : ObjectPoolBase where T : class, new() { protected override T Create() { @@ -17,8 +16,7 @@ protected override T Create() } } - [BestFriend] - internal sealed class MadeObjectPool : ObjectPoolBase + public sealed class MadeObjectPool : ObjectPoolBase { private readonly Func _maker; @@ -33,7 +31,7 @@ protected override T Create() } } - internal abstract class ObjectPoolBase + public abstract class ObjectPoolBase { private readonly ConcurrentBag _pool; private int _numCreated; diff --git a/src/Microsoft.ML.Core/Utilities/OrderedWaiter.cs b/src/Microsoft.ML.Core/Utilities/OrderedWaiter.cs index ca0ef23445..e3e118d8bf 100644 --- a/src/Microsoft.ML.Core/Utilities/OrderedWaiter.cs +++ b/src/Microsoft.ML.Core/Utilities/OrderedWaiter.cs @@ -17,8 +17,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// any order), the first thread to clear the wait will be 0, then 1 will /// be cleared once incremented, then 2 will be cleared once incremented. /// - [BestFriend] - internal sealed class OrderedWaiter + public sealed class OrderedWaiter { /// /// This is an event-line pair. The intended usage is, when the line diff --git a/src/Microsoft.ML.Core/Utilities/PathUtils.cs b/src/Microsoft.ML.Core/Utilities/PathUtils.cs index 98407e24a1..6698c11f7f 100644 --- a/src/Microsoft.ML.Core/Utilities/PathUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/PathUtils.cs @@ -8,7 +8,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - internal static partial class Utils + public static partial class Utils { /// /// Environment variable containing optional resources path. diff --git a/src/Microsoft.ML.Core/Utilities/PlatformUtils.cs b/src/Microsoft.ML.Core/Utilities/PlatformUtils.cs index 2bd8acab3e..8f46f93017 100644 --- a/src/Microsoft.ML.Core/Utilities/PlatformUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/PlatformUtils.cs @@ -11,8 +11,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// Contains extension methods that aid in building cross platform. /// - [BestFriend] - internal static class PlatformUtils + public static class PlatformUtils { public static ReadOnlyCollection AsReadOnly(this T[] items) { diff --git a/src/Microsoft.ML.Core/Utilities/ReservoirSampler.cs b/src/Microsoft.ML.Core/Utilities/ReservoirSampler.cs index 8438a2e742..acc7d4f3a2 100644 --- a/src/Microsoft.ML.Core/Utilities/ReservoirSampler.cs +++ b/src/Microsoft.ML.Core/Utilities/ReservoirSampler.cs @@ -13,8 +13,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// The sample is created in one pass by calling for every data point in the stream. Implementations should have /// a delegate for getting the next data point, which is invoked if the current data point should go into the reservoir. /// - [BestFriend] - internal interface IReservoirSampler + public interface IReservoirSampler { /// /// If the number of elements sampled is less than the reservoir size, this should return the number of elements sampled. @@ -50,8 +49,7 @@ internal interface IReservoirSampler /// for every data point in the stream. In case the next data point does not get 'picked' into the reservoir, the delegate is not invoked. /// Sampling is done according to the algorithm in this paper: https://epubs.siam.org/doi/pdf/10.1137/1.9781611972740.53. /// - [BestFriend] - internal sealed class ReservoirSamplerWithoutReplacement : IReservoirSampler + public sealed class ReservoirSamplerWithoutReplacement : IReservoirSampler { // This array contains a cache of the elements composing the reservoir. private readonly T[] _cache; @@ -124,8 +122,7 @@ public IEnumerable GetSample() /// for every data point in the stream. In case the next data point does not get 'picked' into the reservoir, the delegate is not invoked. /// Sampling is done according to the algorithm in this paper: https://epubs.siam.org/doi/pdf/10.1137/1.9781611972740.53. /// - [BestFriend] - internal sealed class ReservoirSamplerWithReplacement : IReservoirSampler + public sealed class ReservoirSamplerWithReplacement : IReservoirSampler { // This array contains pointers to the elements in the _cache array that are currently in the reservoir (may contain duplicates). private readonly int[] _reservoir; diff --git a/src/Microsoft.ML.Core/Utilities/ResourceManagerUtils.cs b/src/Microsoft.ML.Core/Utilities/ResourceManagerUtils.cs index 9e9c6f80bb..4ea8f0d5b7 100644 --- a/src/Microsoft.ML.Core/Utilities/ResourceManagerUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/ResourceManagerUtils.cs @@ -16,8 +16,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// This class takes care of downloading resources needed by ML.NET components. Resources are located in /// a pre-defined location, that can be overridden by defining Environment variable . /// - [BestFriend] - internal sealed class ResourceManagerUtils + public sealed class ResourceManagerUtils { private static volatile ResourceManagerUtils _instance; public static ResourceManagerUtils Instance @@ -302,9 +301,7 @@ public static ResourceDownloadResults GetErrorMessage(out string errorMessage, p return errorResult; } -#pragma warning disable IDE1006 [DllImport("libc", SetLastError = true)] private static extern int chmod(string pathname, int mode); -#pragma warning restore IDE1006 } } diff --git a/src/Microsoft.ML.Core/Utilities/Stats.cs b/src/Microsoft.ML.Core/Utilities/Stats.cs index 182239adde..119ac22946 100644 --- a/src/Microsoft.ML.Core/Utilities/Stats.cs +++ b/src/Microsoft.ML.Core/Utilities/Stats.cs @@ -11,8 +11,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// A class containing common statistical functions /// - [BestFriend] - internal static class Stats + public static class Stats { /// /// Returns a number uniformly sampled from 0...(rangeSize-1) diff --git a/src/Microsoft.ML.Core/Utilities/Stream.cs b/src/Microsoft.ML.Core/Utilities/Stream.cs index 4fe21e7df7..926a425f5b 100644 --- a/src/Microsoft.ML.Core/Utilities/Stream.cs +++ b/src/Microsoft.ML.Core/Utilities/Stream.cs @@ -8,10 +8,11 @@ using System.IO; using System.Text; using System.Threading; +using Microsoft.ML.Runtime.Internal.CpuMath; namespace Microsoft.ML.Runtime.Internal.Utilities { - internal static partial class Utils + public static partial class Utils { private const int _bulkReadThresholdInBytes = 4096; @@ -852,7 +853,7 @@ public static unsafe void ReadBytes(this BinaryReader reader, void* destination, int toRead = (int)Math.Min(bytesToRead - offset, blockSize); int read = reader.Read(work, 0, toRead); Contracts.CheckDecode(read == toRead); - Buffer.MemoryCopy(src, (byte*)destination + offset, destinationSizeInBytes - offset, read); + MemUtils.MemoryCopy(src, (byte*)destination + offset, destinationSizeInBytes - offset, read); offset += read; } Contracts.Assert(offset == bytesToRead); diff --git a/src/Microsoft.ML.Core/Utilities/SubsetStream.cs b/src/Microsoft.ML.Core/Utilities/SubsetStream.cs index 3bf9ad2c9e..84cf4826e6 100644 --- a/src/Microsoft.ML.Core/Utilities/SubsetStream.cs +++ b/src/Microsoft.ML.Core/Utilities/SubsetStream.cs @@ -22,8 +22,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// subset stream, the underlying stream will always remain open and /// undisposed. /// - [BestFriend] - internal sealed class SubsetStream : Stream + public sealed class SubsetStream : Stream { private readonly Stream _stream; // The position of the stream. diff --git a/src/Microsoft.ML.Core/Utilities/SummaryStatistics.cs b/src/Microsoft.ML.Core/Utilities/SummaryStatistics.cs index 3e36191564..3843342a2c 100644 --- a/src/Microsoft.ML.Core/Utilities/SummaryStatistics.cs +++ b/src/Microsoft.ML.Core/Utilities/SummaryStatistics.cs @@ -6,7 +6,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - internal abstract class SummaryStatisticsBase + public abstract class SummaryStatisticsBase { // Sum of squared difference from the current mean. protected double M2; @@ -152,8 +152,7 @@ public void Add(SummaryStatisticsBase s) } } - [BestFriend] - internal sealed class SummaryStatisticsUpToSecondOrderMoments : SummaryStatisticsBase + public sealed class SummaryStatisticsUpToSecondOrderMoments : SummaryStatisticsBase { /// /// A convenient way to combine the observations of two Stats objects @@ -178,8 +177,7 @@ internal sealed class SummaryStatisticsUpToSecondOrderMoments : SummaryStatistic /// https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance /// All quantities are weighted, except for RawCount. /// - [BestFriend] - internal sealed class SummaryStatistics : SummaryStatisticsBase + public sealed class SummaryStatistics : SummaryStatisticsBase { // Sum of cubed difference from the current mean. private double _m3; diff --git a/src/Microsoft.ML.Core/Utilities/SupervisedBinFinder.cs b/src/Microsoft.ML.Core/Utilities/SupervisedBinFinder.cs index 63257823a2..bb76952c25 100644 --- a/src/Microsoft.ML.Core/Utilities/SupervisedBinFinder.cs +++ b/src/Microsoft.ML.Core/Utilities/SupervisedBinFinder.cs @@ -20,8 +20,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// The class can be used several times sequentially, it is stateful and not thread-safe. /// Both Single and Double precision processing is implemented, and is identical. /// - [BestFriend] - internal sealed class SupervisedBinFinder + public sealed class SupervisedBinFinder { private readonly struct ValuePair : IComparable> where T : IComparable diff --git a/src/Microsoft.ML.Core/Utilities/TextReaderStream.cs b/src/Microsoft.ML.Core/Utilities/TextReaderStream.cs index 682a0336cb..5c05275ba7 100644 --- a/src/Microsoft.ML.Core/Utilities/TextReaderStream.cs +++ b/src/Microsoft.ML.Core/Utilities/TextReaderStream.cs @@ -14,8 +14,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// compensates by inserting \n line feed characters at the end of every /// input line, including the last one. /// - [BestFriend] - internal sealed class TextReaderStream : Stream + public sealed class TextReaderStream : Stream { private readonly TextReader _baseReader; private readonly Encoding _encoding; diff --git a/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs b/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs index 46a82a4e7c..859ae7b28d 100644 --- a/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/ThreadUtils.cs @@ -10,7 +10,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - internal static partial class Utils + public static partial class Utils { public static Thread CreateBackgroundThread(ParameterizedThreadStart start) { @@ -59,8 +59,7 @@ public static Thread CreateForegroundThread(ThreadStart start) /// that the workers have finished by its own means, will call to throw /// the set exception as an inner exception, in the wrapping thread. /// - [BestFriend] - internal sealed class ExceptionMarshaller : IDisposable + public sealed class ExceptionMarshaller : IDisposable { private readonly CancellationTokenSource _ctSource; private readonly object _lock; @@ -131,8 +130,7 @@ public void ThrowIfSet(IExceptionContext ectx) /// Provides a task scheduler that ensures a maximum concurrency level while /// running on top of the ThreadPool. ///
- [BestFriend] - internal sealed class LimitedConcurrencyLevelTaskScheduler : TaskScheduler + public sealed class LimitedConcurrencyLevelTaskScheduler : TaskScheduler { // Whether the current thread is processing work items. [ThreadStatic] diff --git a/src/Microsoft.ML.Core/Utilities/Tree.cs b/src/Microsoft.ML.Core/Utilities/Tree.cs index 8d4c0f7585..7d030cf46c 100644 --- a/src/Microsoft.ML.Core/Utilities/Tree.cs +++ b/src/Microsoft.ML.Core/Utilities/Tree.cs @@ -17,8 +17,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities ///
/// Children are keyed with values of this type /// The type of the node value - [BestFriend] - internal sealed class Tree : IDictionary> + public sealed class Tree : IDictionary> { // The key of this node in the parent, assuming this is a child node at all. // This back reference is necessary to complete any "remove" operations. diff --git a/src/Microsoft.ML.Core/Utilities/Utils.cs b/src/Microsoft.ML.Core/Utilities/Utils.cs index d0f6f6256e..9a6ecb9b0b 100644 --- a/src/Microsoft.ML.Core/Utilities/Utils.cs +++ b/src/Microsoft.ML.Core/Utilities/Utils.cs @@ -16,8 +16,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - [BestFriend] - internal static partial class Utils + public static partial class Utils { // Maximum size of one-dimensional array. // See: https://msdn.microsoft.com/en-us/library/hh285054(v=vs.110).aspx @@ -182,22 +181,15 @@ public static void Push(ref Stack stack, T item) } /// - /// Copies the values from src to dst. + /// Assumes input is sorted and finds value using BinarySearch. + /// If value is not found, returns the logical index of 'value' in the sorted list i.e index of the first element greater than value. + /// In case of duplicates it returns the index of the first one. + /// It guarantees that items before the returned index are < value, while those at and after the returned index are >= value. /// - /// - /// This can be removed once we have the APIs from https://github.com/dotnet/corefx/issues/33006. - /// - public static void CopyTo(this List src, Span dst, int? count = null) + public static int FindIndexSorted(this int[] input, int value) { - Contracts.Assert(src != null); - Contracts.Assert(!count.HasValue || (0 <= count && count <= src.Count)); - Contracts.Assert(src.Count <= dst.Length); - - count = count ?? src.Count; - for (int i = 0; i < count; i++) - { - dst[i] = src[i]; - } + Contracts.AssertValue(input); + return FindIndexSorted(input, 0, input.Length, value); } /// @@ -247,17 +239,6 @@ public static bool TryFindIndexSorted(this int[] input, int min, int lim, int va return index < lim && input[index] == value; } - /// - /// Akin to FindIndexSorted, except stores the found index in the output - /// index parameter, and returns whether that index is a valid index - /// pointing to a value equal to the input parameter value. - /// - public static bool TryFindIndexSorted(ReadOnlySpan input, int min, int lim, int value, out int index) - { - index = FindIndexSorted(input, min, lim, value); - return index < lim && input[index] == value; - } - /// /// Assumes input is sorted and finds value using BinarySearch. /// If value is not found, returns the logical index of 'value' in the sorted list i.e index of the first element greater than value. @@ -484,8 +465,9 @@ public static int[] GetIdentityPermutation(int size) return res; } - public static void FillIdentity(Span a, int lim) + public static void FillIdentity(int[] a, int lim) { + Contracts.AssertValue(a); Contracts.Assert(0 <= lim & lim <= a.Length); for (int i = 0; i < lim; ++i) @@ -694,9 +676,9 @@ public static bool IsSorted(int[] values) /// and between an inclusive lower and exclusive upper bound for /// the first and last items, respectively. /// - public static bool IsIncreasing(int min, ReadOnlySpan values, int lim) + public static bool IsIncreasing(int min, int[] values, int lim) { - if (values.Length < 1) + if (Utils.Size(values) < 1) return true; var prev = values[0]; @@ -716,9 +698,9 @@ public static bool IsIncreasing(int min, ReadOnlySpan values, int lim) /// is sorted and unique, and between an inclusive lower and exclusive /// upper bound for the first and last items, respectively. /// - public static bool IsIncreasing(int min, ReadOnlySpan values, int len, int lim) + public static bool IsIncreasing(int min, int[] values, int len, int lim) { - Contracts.Check(values.Length >= len); + Contracts.Check(Utils.Size(values) >= len); if (len < 1) return true; @@ -874,19 +856,12 @@ public static int EnsureSize(ref T[] array, int min, bool keepOld = true) /// /// The new size, that is no less than and no more that . public static int EnsureSize(ref T[] array, int min, int max, bool keepOld = true) - => EnsureSize(ref array, min, max, keepOld, out bool _); - - public static int EnsureSize(ref T[] array, int min, int max, bool keepOld, out bool resized) { Contracts.CheckParam(min <= max, nameof(max), "min must not exceed max"); // This code adapted from the private method EnsureCapacity code of List. int size = Utils.Size(array); if (size >= min) - { - resized = false; return size; - } - int newSize = size == 0 ? 4 : size * 2; // This constant taken from the internal code of system\array.cs of mscorlib. if ((uint)newSize > max) @@ -897,8 +872,6 @@ public static int EnsureSize(ref T[] array, int min, int max, bool keepOld, o Array.Resize(ref array, newSize); else array = new T[newSize]; - - resized = true; return newSize; } @@ -1124,30 +1097,5 @@ public static string GetDescription(this Enum value) } return null; } - - public static int Count(this ReadOnlySpan source, Func predicate) - { - Contracts.CheckValue(predicate, nameof(predicate)); - - int result = 0; - for (int i = 0; i < source.Length; i++) - { - if (predicate(source[i])) - result++; - } - return result; - } - - public static bool All(this ReadOnlySpan source, Func predicate) - { - Contracts.CheckValue(predicate, nameof(predicate)); - - for (int i = 0; i < source.Length; i++) - { - if (!predicate(source[i])) - return false; - } - return true; - } } } diff --git a/src/Microsoft.ML.Core/Utilities/VBufferUtils.cs b/src/Microsoft.ML.Core/Utilities/VBufferUtils.cs index f730d61724..19a7819325 100644 --- a/src/Microsoft.ML.Core/Utilities/VBufferUtils.cs +++ b/src/Microsoft.ML.Core/Utilities/VBufferUtils.cs @@ -14,8 +14,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// /// Convenience utilities for vector operations on . /// - [BestFriend] - internal static class VBufferUtils + public static class VBufferUtils { private const float SparsityThreshold = 0.25f; @@ -176,7 +175,7 @@ public static void ForEachDefined(in VBuffer a, Action visitor) /// Applies the to each corresponding pair of elements /// where the item is emplicitly defined in the vector. By explicitly defined, /// we mean that for a given index i, both vectors have an entry in - /// corresponding to that index. + /// corresponding to that index. ///
/// The first vector /// The second vector @@ -314,8 +313,9 @@ public static void ForEachEitherDefined(in VBuffer a, in VBuffer b, Act ///
public static void Clear(ref VBuffer dst) { - var editor = VBufferEditor.CreateFromBuffer(ref dst); - editor.Values.Clear(); + if (dst.Count == 0) + return; + Array.Clear(dst.Values, 0, dst.Count); } // REVIEW: Look into removing slot in this and other manipulators, so that we @@ -343,17 +343,15 @@ public static void Apply(ref VBuffer dst, SlotValueManipulator manip) { Contracts.CheckValue(manip, nameof(manip)); - var editor = VBufferEditor.CreateFromBuffer(ref dst); if (dst.IsDense) { - for (int i = 0; i < editor.Values.Length; i++) - manip(i, ref editor.Values[i]); + for (int i = 0; i < dst.Length; i++) + manip(i, ref dst.Values[i]); } else { - var dstIndices = dst.GetIndices(); - for (int i = 0; i < editor.Values.Length; i++) - manip(dstIndices[i], ref editor.Values[i]); + for (int i = 0; i < dst.Count; i++) + manip(dst.Indices[i], ref dst.Values[i]); } } @@ -377,19 +375,17 @@ public static void ApplyAt(ref VBuffer dst, int slot, SlotValueManipulator Contracts.CheckValue(manip, nameof(manip)); Contracts.CheckValueOrNull(pred); - var editor = VBufferEditor.CreateFromBuffer(ref dst); - int dstValuesCount = editor.Values.Length; if (dst.IsDense) { // The vector is dense, so we can just do a direct access. - manip(slot, ref editor.Values[slot]); + manip(slot, ref dst.Values[slot]); return; } int idx = 0; - if (dstValuesCount > 0 && Utils.TryFindIndexSorted(editor.Indices, 0, dstValuesCount, slot, out idx)) + if (dst.Count > 0 && Utils.TryFindIndexSorted(dst.Indices, 0, dst.Count, slot, out idx)) { // Vector is sparse, but the item exists so we can access it. - manip(slot, ref editor.Values[idx]); + manip(slot, ref dst.Values[idx]); return; } // The vector is sparse and there is no corresponding item, yet. @@ -400,24 +396,26 @@ public static void ApplyAt(ref VBuffer dst, int slot, SlotValueManipulator if (pred(ref value)) return; // We have to insert this value, somehow. - + int[] indices = dst.Indices; + T[] values = dst.Values; // There is a modest special case where there is exactly one free slot // we are modifying in the sparse vector, in which case the vector becomes // dense. Then there is no need to do anything with indices. - bool needIndices = dstValuesCount + 1 < dst.Length; - editor = VBufferEditor.Create(ref dst, dst.Length, dstValuesCount + 1); - if (idx != dstValuesCount) + bool needIndices = dst.Count + 1 < dst.Length; + if (needIndices) + Utils.EnsureSize(ref indices, dst.Count + 1, dst.Length - 1); + Utils.EnsureSize(ref values, dst.Count + 1, dst.Length); + if (idx != dst.Count) { // We have to do some sort of shift copy. - int sliceLength = dstValuesCount - idx; if (needIndices) - editor.Indices.Slice(idx, sliceLength).CopyTo(editor.Indices.Slice(idx + 1)); - editor.Values.Slice(idx, sliceLength).CopyTo(editor.Values.Slice(idx + 1)); + Array.Copy(indices, idx, indices, idx + 1, dst.Count - idx); + Array.Copy(values, idx, values, idx + 1, dst.Count - idx); } if (needIndices) - editor.Indices[idx] = slot; - editor.Values[idx] = value; - dst = editor.Commit(); + indices[idx] = slot; + values[idx] = value; + dst = new VBuffer(dst.Length, dst.Count + 1, values, indices); } /// @@ -427,41 +425,37 @@ public static void Densify(ref VBuffer dst) { if (dst.IsDense) return; - - var indices = dst.GetIndices(); - var values = dst.GetValues(); - var editor = VBufferEditor.Create( - ref dst, - dst.Length); - - if (!editor.CreatedNewValues) + var indices = dst.Indices; + var values = dst.Values; + if (Utils.Size(values) >= dst.Length) { // Densify in place. - for (int i = values.Length; --i >= 0; ) + for (int i = dst.Count; --i >= 0; ) { Contracts.Assert(i <= indices[i]); - editor.Values[indices[i]] = values[i]; + values[indices[i]] = values[i]; } - if (values.Length == 0) - editor.Values.Clear(); + if (dst.Count == 0) + Array.Clear(values, 0, dst.Length); else { int min = 0; - for (int ii = 0; ii < values.Length; ++ii) + for (int ii = 0; ii < dst.Count; ++ii) { - editor.Values.Slice(min, indices[ii] - min).Clear(); + Array.Clear(values, min, indices[ii] - min); min = indices[ii] + 1; } - editor.Values.Slice(min, dst.Length - min).Clear(); + Array.Clear(values, min, dst.Length - min); } } else { - // createdNewValues is true, keepOldOnResize is false, so Values is already cleared - for (int i = 0; i < values.Length; ++i) - editor.Values[indices[i]] = values[i]; + T[] newValues = new T[dst.Length]; + for (int i = 0; i < dst.Count; ++i) + newValues[indices[i]] = values[i]; + values = newValues; } - dst = editor.Commit(); + dst = new VBuffer(dst.Length, values, indices); } /// @@ -471,9 +465,7 @@ public static void Densify(ref VBuffer dst) public static void DensifyFirst(ref VBuffer dst, int denseCount) { Contracts.Check(0 <= denseCount && denseCount <= dst.Length); - var dstValues = dst.GetValues(); - var dstIndices = dst.GetIndices(); - if (dst.IsDense || denseCount == 0 || (dstValues.Length >= denseCount && dstIndices[denseCount - 1] == denseCount - 1)) + if (dst.IsDense || denseCount == 0 || (dst.Count >= denseCount && dst.Indices[denseCount - 1] == denseCount - 1)) return; if (denseCount == dst.Length) { @@ -481,36 +473,37 @@ public static void DensifyFirst(ref VBuffer dst, int denseCount) return; } - // Densify the first denseCount entries. - if (dstIndices.IsEmpty) + // Densify the first BiasCount entries. + int[] indices = dst.Indices; + T[] values = dst.Values; + if (indices == null) { - // no previous values - var newIndicesEditor = VBufferEditor.Create(ref dst, dst.Length, denseCount); - Utils.FillIdentity(newIndicesEditor.Indices, denseCount); - newIndicesEditor.Values.Clear(); - dst = newIndicesEditor.Commit(); + Contracts.Assert(dst.Count == 0); + indices = Utils.GetIdentityPermutation(denseCount); + Utils.EnsureSize(ref values, denseCount, dst.Length, keepOld: false); + Array.Clear(values, 0, denseCount); + dst = new VBuffer(dst.Length, denseCount, values, indices); return; } - int lim = Utils.FindIndexSorted(dstIndices, 0, dstValues.Length, denseCount); + int lim = Utils.FindIndexSorted(indices, 0, dst.Count, denseCount); Contracts.Assert(lim < denseCount); - int newLen = dstValues.Length + denseCount - lim; + int newLen = dst.Count + denseCount - lim; if (newLen == dst.Length) { Densify(ref dst); return; } - - var editor = VBufferEditor.Create(ref dst, dst.Length, newLen, keepOldOnResize: true); - int sliceLength = dstValues.Length - lim; - editor.Values.Slice(lim, sliceLength).CopyTo(editor.Values.Slice(denseCount)); - editor.Indices.Slice(lim, sliceLength).CopyTo(editor.Indices.Slice(denseCount)); + Utils.EnsureSize(ref values, newLen, dst.Length); + Utils.EnsureSize(ref indices, newLen, dst.Length); + Array.Copy(values, lim, values, denseCount, dst.Count - lim); + Array.Copy(indices, lim, indices, denseCount, dst.Count - lim); int i = lim - 1; for (int ii = denseCount; --ii >= 0; ) { - editor.Values[ii] = i >= 0 && dstIndices[i] == ii ? dstValues[i--] : default(T); - editor.Indices[ii] = ii; + values[ii] = i >= 0 && indices[i] == ii ? values[i--] : default(T); + indices[ii] = ii; } - dst = editor.Commit(); + dst = new VBuffer(dst.Length, newLen, values, indices); } /// @@ -528,10 +521,9 @@ public static void CreateMaybeSparseCopy(in VBuffer src, ref VBuffer ds int sparseCount = 0; var sparseCountThreshold = (int)(src.Length * sparsityThreshold); - var srcValues = src.GetValues(); for (int i = 0; i < src.Length; i++) { - if (!isDefaultPredicate(in srcValues[i])) + if (!isDefaultPredicate(in src.Values[i])) sparseCount++; if (sparseCount > sparseCountThreshold) @@ -541,17 +533,23 @@ public static void CreateMaybeSparseCopy(in VBuffer src, ref VBuffer ds } } - var editor = VBufferEditor.Create(ref dst, src.Length, sparseCount); + var indices = dst.Indices; + var values = dst.Values; + if (sparseCount > 0) { + if (Utils.Size(values) < sparseCount) + values = new T[sparseCount]; + if (Utils.Size(indices) < sparseCount) + indices = new int[sparseCount]; int j = 0; for (int i = 0; i < src.Length; i++) { - if (!isDefaultPredicate(in srcValues[i])) + if (!isDefaultPredicate(in src.Values[i])) { Contracts.Assert(j < sparseCount); - editor.Indices[j] = i; - editor.Values[j] = srcValues[i]; + indices[j] = i; + values[j] = src.Values[i]; j++; } } @@ -559,7 +557,7 @@ public static void CreateMaybeSparseCopy(in VBuffer src, ref VBuffer ds Contracts.Assert(j == sparseCount); } - dst = editor.Commit(); + dst = new VBuffer(src.Length, sparseCount, values, indices); } /// @@ -668,10 +666,10 @@ private static void ApplyWithCore(in VBuffer src, ref VBuffer< // of the "outer" parameter. There are nine, top level cases. Each case is // considered in this order. - // 1. srcValues.Length == 0. + // 1. src.Count == 0. // 2. src.Dense. // 3. dst.Dense. - // 4. dstValues.Length == 0. + // 4. dst.Count == 0. // Beyond this point the cases can assume both src/dst are sparse non-empty vectors. // We then calculate the size of the resulting output array, then use that to fall @@ -689,24 +687,20 @@ private static void ApplyWithCore(in VBuffer src, ref VBuffer< // Case 5 does not require special handling, because it falls through to other cases // that do the special handling for them. - var srcValues = src.GetValues(); - var dstValues = dst.GetValues(); - var dstIndices = dst.GetIndices(); - var editor = VBufferEditor.CreateFromBuffer(ref dst); - if (srcValues.Length == 0) + if (src.Count == 0) { - // Major case 1, with srcValues.Length == 0. + // Major case 1, with src.Count == 0. if (!outer) return; if (dst.IsDense) { for (int i = 0; i < dst.Length; i++) - manip(i, default(TSrc), ref editor.Values[i]); + manip(i, default(TSrc), ref dst.Values[i]); } else { - for (int i = 0; i < dstValues.Length; i++) - manip(dstIndices[i], default(TSrc), ref editor.Values[i]); + for (int i = 0; i < dst.Count; i++) + manip(dst.Indices[i], default(TSrc), ref dst.Values[i]); } return; } @@ -715,81 +709,76 @@ private static void ApplyWithCore(in VBuffer src, ref VBuffer< { // Major case 2, with src.Dense. if (!dst.IsDense) - { Densify(ref dst); - editor = VBufferEditor.CreateFromBuffer(ref dst); - } - // Both are now dense. Both cases of outer are covered. - for (int i = 0; i < srcValues.Length; i++) - manip(i, srcValues[i], ref editor.Values[i]); + for (int i = 0; i < src.Length; i++) + manip(i, src.Values[i], ref dst.Values[i]); return; } - var srcIndices = src.GetIndices(); if (dst.IsDense) { - // Major case 3, with dst.Dense. Note that !src.Dense. + // Major case 3, with dst.Dense. Note that !a.Dense. if (outer) { int sI = 0; - int sIndex = srcIndices[sI]; + int sIndex = src.Indices[sI]; for (int i = 0; i < dst.Length; ++i) { if (i == sIndex) { - manip(i, srcValues[sI], ref editor.Values[i]); - sIndex = ++sI == srcValues.Length ? src.Length : srcIndices[sI]; + manip(i, src.Values[sI], ref dst.Values[i]); + sIndex = ++sI == src.Count ? src.Length : src.Indices[sI]; } else - manip(i, default(TSrc), ref editor.Values[i]); + manip(i, default(TSrc), ref dst.Values[i]); } } else { - for (int i = 0; i < srcValues.Length; i++) - manip(srcIndices[i], srcValues[i], ref editor.Values[srcIndices[i]]); + for (int i = 0; i < src.Count; i++) + manip(src.Indices[i], src.Values[i], ref dst.Values[src.Indices[i]]); } return; } - if (dstValues.Length == 0) + if (dst.Count == 0) { // Major case 4, with dst empty. Note that !src.Dense. // Neither is dense, and dst is empty. Both cases of outer are covered. - editor = VBufferEditor.Create(ref dst, - src.Length, - srcValues.Length, - maxValuesCapacity: src.Length); - editor.Values.Clear(); - for (int i = 0; i < srcValues.Length; i++) - manip(editor.Indices[i] = srcIndices[i], srcValues[i], ref editor.Values[i]); - dst = editor.Commit(); + var values = dst.Values; + var indices = dst.Indices; + Utils.EnsureSize(ref values, src.Count, src.Length); + Array.Clear(values, 0, src.Count); + Utils.EnsureSize(ref indices, src.Count, src.Length); + for (int i = 0; i < src.Count; i++) + manip(indices[i] = src.Indices[i], src.Values[i], ref values[i]); + dst = new VBuffer(src.Length, src.Count, values, indices); return; } // Beyond this point, we can assume both a and b are sparse with positive count. int dI = 0; - int newCount = dstValues.Length; + int newCount = dst.Count; // Try to find each src index in dst indices, counting how many more we'll add. - for (int sI = 0; sI < srcValues.Length; sI++) + for (int sI = 0; sI < src.Count; sI++) { - int sIndex = srcIndices[sI]; - while (dI < dstValues.Length && dstIndices[dI] < sIndex) + int sIndex = src.Indices[sI]; + while (dI < dst.Count && dst.Indices[dI] < sIndex) dI++; - if (dI == dstValues.Length) + if (dI == dst.Count) { - newCount += srcValues.Length - sI; + newCount += src.Count - sI; break; } - if (dstIndices[dI] == sIndex) + if (dst.Indices[dI] == sIndex) dI++; else newCount++; } Contracts.Assert(newCount > 0); - Contracts.Assert(0 < srcValues.Length && srcValues.Length <= newCount); - Contracts.Assert(0 < dstValues.Length && dstValues.Length <= newCount); + Contracts.Assert(0 < src.Count && src.Count <= newCount); + Contracts.Assert(0 < dst.Count && dst.Count <= newCount); // REVIEW: Densify above a certain threshold, not just if // the output will necessarily become dense? But then we get into @@ -808,23 +797,21 @@ private static void ApplyWithCore(in VBuffer src, ref VBuffer< return; } - if (newCount != srcValues.Length && newCount != dstValues.Length) + if (newCount != src.Count && newCount != dst.Count) { // Major case 6, neither set of indices is a subset of the other. // This subcase used to fall through to another subcase, but this // proved to be inefficient so we go to the little bit of extra work // to handle it here. - editor = VBufferEditor.Create(ref dst, - src.Length, - newCount, - maxValuesCapacity: dst.Length); - var indices = editor.Indices; - var values = editor.Values; - int sI = srcValues.Length - 1; - dI = dstValues.Length - 1; - int sIndex = srcIndices[sI]; - int dIndex = dstIndices[dI]; + var indices = dst.Indices; + var values = dst.Values; + Utils.EnsureSize(ref indices, newCount, dst.Length, keepOld: false); + Utils.EnsureSize(ref values, newCount, dst.Length, keepOld: false); + int sI = src.Count - 1; + dI = dst.Count - 1; + int sIndex = src.Indices[sI]; + int dIndex = dst.Indices[dI]; // Go from the end, so that even if we're writing over dst's vectors in // place, we do not corrupt the data as we are reorganizing it. @@ -833,17 +820,17 @@ private static void ApplyWithCore(in VBuffer src, ref VBuffer< if (sIndex < dIndex) { indices[i] = dIndex; - values[i] = dstValues[dI]; + values[i] = dst.Values[dI]; if (outer) manip(dIndex, default(TSrc), ref values[i]); - dIndex = --dI >= 0 ? dstIndices[dI] : -1; + dIndex = --dI >= 0 ? dst.Indices[dI] : -1; } else if (sIndex > dIndex) { indices[i] = sIndex; values[i] = default(TDst); - manip(sIndex, srcValues[sI], ref values[i]); - sIndex = --sI >= 0 ? srcIndices[sI] : -1; + manip(sIndex, src.Values[sI], ref values[i]); + sIndex = --sI >= 0 ? src.Indices[sI] : -1; } else { @@ -851,88 +838,84 @@ private static void ApplyWithCore(in VBuffer src, ref VBuffer< Contracts.Assert(sIndex >= 0); Contracts.Assert(sIndex == dIndex); indices[i] = dIndex; - values[i] = dstValues[dI]; - manip(sIndex, srcValues[sI], ref values[i]); - sIndex = --sI >= 0 ? srcIndices[sI] : -1; - dIndex = --dI >= 0 ? dstIndices[dI] : -1; + values[i] = dst.Values[dI]; + manip(sIndex, src.Values[sI], ref values[i]); + sIndex = --sI >= 0 ? src.Indices[sI] : -1; + dIndex = --dI >= 0 ? dst.Indices[dI] : -1; } } - dst = editor.Commit(); + dst = new VBuffer(dst.Length, newCount, values, indices); return; } - if (newCount == dstValues.Length) + if (newCount == dst.Count) { - if (newCount == srcValues.Length) + if (newCount == src.Count) { // Major case 7, the set of indices is the same for src and dst. - Contracts.Assert(srcValues.Length == dstValues.Length); - for (int i = 0; i < srcValues.Length; i++) + Contracts.Assert(src.Count == dst.Count); + for (int i = 0; i < src.Count; i++) { - Contracts.Assert(srcIndices[i] == dstIndices[i]); - manip(srcIndices[i], srcValues[i], ref editor.Values[i]); + Contracts.Assert(src.Indices[i] == dst.Indices[i]); + manip(src.Indices[i], src.Values[i], ref dst.Values[i]); } return; } // Major case 8, the indices of src must be a subset of dst's indices. - Contracts.Assert(newCount > srcValues.Length); + Contracts.Assert(newCount > src.Count); dI = 0; if (outer) { int sI = 0; - int sIndex = srcIndices[sI]; - for (int i = 0; i < dstValues.Length; ++i) + int sIndex = src.Indices[sI]; + for (int i = 0; i < dst.Count; ++i) { - if (dstIndices[i] == sIndex) + if (dst.Indices[i] == sIndex) { - manip(sIndex, srcValues[sI], ref editor.Values[i]); - sIndex = ++sI == srcValues.Length ? src.Length : srcIndices[sI]; + manip(sIndex, src.Values[sI], ref dst.Values[i]); + sIndex = ++sI == src.Count ? src.Length : src.Indices[sI]; } else - manip(dstIndices[i], default(TSrc), ref editor.Values[i]); + manip(dst.Indices[i], default(TSrc), ref dst.Values[i]); } } else { - for (int sI = 0; sI < srcValues.Length; sI++) + for (int sI = 0; sI < src.Count; sI++) { - int sIndex = srcIndices[sI]; - while (dstIndices[dI] < sIndex) + int sIndex = src.Indices[sI]; + while (dst.Indices[dI] < sIndex) dI++; - Contracts.Assert(dstIndices[dI] == sIndex); - manip(sIndex, srcValues[sI], ref editor.Values[dI++]); + Contracts.Assert(dst.Indices[dI] == sIndex); + manip(sIndex, src.Values[sI], ref dst.Values[dI++]); } } return; } - if (newCount == srcValues.Length) + if (newCount == src.Count) { // Major case 9, the indices of dst must be a subset of src's indices. Both cases of outer are covered. // First do a "quasi" densification of dst, by making the indices // of dst correspond to those in src. - editor = VBufferEditor.Create(ref dst, newCount, dstValues.Length); int sI = 0; - for (dI = 0; dI < dstValues.Length; ++dI) + for (dI = 0; dI < dst.Count; ++dI) { - int bIndex = dstIndices[dI]; - while (srcIndices[sI] < bIndex) + int bIndex = dst.Indices[dI]; + while (src.Indices[sI] < bIndex) sI++; - Contracts.Assert(srcIndices[sI] == bIndex); - editor.Indices[dI] = sI++; + Contracts.Assert(src.Indices[sI] == bIndex); + dst.Indices[dI] = sI++; } - dst = editor.Commit(); + dst = new VBuffer(newCount, dst.Count, dst.Values, dst.Indices); Densify(ref dst); - - editor = VBufferEditor.Create(ref dst, - src.Length, - newCount, - maxValuesCapacity: src.Length); - srcIndices.CopyTo(editor.Indices); - for (sI = 0; sI < srcValues.Length; sI++) - manip(srcIndices[sI], srcValues[sI], ref editor.Values[sI]); - dst = editor.Commit(); + int[] indices = dst.Indices; + Utils.EnsureSize(ref indices, src.Count, src.Length, keepOld: false); + Array.Copy(src.Indices, indices, newCount); + dst = new VBuffer(src.Length, newCount, dst.Values, indices); + for (sI = 0; sI < src.Count; sI++) + manip(src.Indices[sI], src.Values[sI], ref dst.Values[sI]); return; } @@ -949,78 +932,73 @@ private static void ApplyWithCoreCopy(in VBuffer src, ref VBuf { Contracts.Check(src.Length == dst.Length, "Vectors must have the same dimensionality."); Contracts.CheckValue(manip, nameof(manip)); - + Contracts.Assert(Utils.Size(src.Values) >= src.Count); + Contracts.Assert(Utils.Size(dst.Values) >= dst.Count); int length = src.Length; - var srcValues = src.GetValues(); - var dstValues = dst.GetValues(); - - if (dstValues.Length == 0) + if (dst.Count == 0) { - if (srcValues.Length == 0) - { - Resize(ref res, length, 0); - } + if (src.Count == 0) + res = new VBuffer(length, 0, res.Values, res.Indices); else if (src.IsDense) { - Contracts.Assert(srcValues.Length == src.Length); - var editor = VBufferEditor.Create(ref res, length); + Contracts.Assert(src.Count == src.Length); + TDst[] resValues = Utils.Size(res.Values) >= length ? res.Values : new TDst[length]; for (int i = 0; i < length; i++) - manip(i, srcValues[i], default(TDst), ref editor.Values[i]); - res = editor.Commit(); + manip(i, src.Values[i], default(TDst), ref resValues[i]); + res = new VBuffer(length, resValues, res.Indices); } else { // src is non-empty sparse. - int count = srcValues.Length; + int count = src.Count; Contracts.Assert(0 < count && count < length); - var editor = VBufferEditor.Create(ref res, length, count); - var srcIndices = src.GetIndices(); - srcIndices.CopyTo(editor.Indices); + int[] resIndices = Utils.Size(res.Indices) >= count ? res.Indices : new int[count]; + TDst[] resValues = Utils.Size(res.Values) >= count ? res.Values : new TDst[count]; + Array.Copy(src.Indices, resIndices, count); for (int ii = 0; ii < count; ii++) { - int i = srcIndices[ii]; - editor.Indices[ii] = i; - manip(i, srcValues[ii], default(TDst), ref editor.Values[ii]); + int i = src.Indices[ii]; + resIndices[ii] = i; + manip(i, src.Values[ii], default(TDst), ref resValues[ii]); } - res = editor.Commit(); + res = new VBuffer(length, count, resValues, resIndices); } } else if (dst.IsDense) { - var editor = VBufferEditor.Create(ref res, length); - if (srcValues.Length == 0) + TDst[] resValues = Utils.Size(res.Values) >= length ? res.Values : new TDst[length]; + if (src.Count == 0) { if (outer) { // Apply manip to all slots, as all slots of dst are defined. for (int j = 0; j < length; j++) - manip(j, default(TSrc), dstValues[j], ref editor.Values[j]); + manip(j, default(TSrc), dst.Values[j], ref resValues[j]); } else { // Copy only. No slot of src is defined. for (int j = 0; j < length; j++) - editor.Values[j] = dstValues[j]; + resValues[j] = dst.Values[j]; } - res = editor.Commit(); + res = new VBuffer(length, resValues, res.Indices); } else if (src.IsDense) { - Contracts.Assert(srcValues.Length == src.Length); + Contracts.Assert(src.Count == src.Length); for (int i = 0; i < length; i++) - manip(i, srcValues[i], dstValues[i], ref editor.Values[i]); - res = editor.Commit(); + manip(i, src.Values[i], dst.Values[i], ref resValues[i]); + res = new VBuffer(length, resValues, res.Indices); } else { // src is sparse and non-empty. - int count = srcValues.Length; + int count = src.Count; Contracts.Assert(0 < count && count < length); int ii = 0; - var srcIndices = src.GetIndices(); - int i = srcIndices[ii]; + int i = src.Indices[ii]; if (outer) { // All slots of dst are defined. Always apply manip. @@ -1028,11 +1006,11 @@ private static void ApplyWithCoreCopy(in VBuffer src, ref VBuf { if (j == i) { - manip(j, srcValues[ii], dstValues[j], ref editor.Values[j]); - i = ++ii == count ? length : srcIndices[ii]; + manip(j, src.Values[ii], dst.Values[j], ref resValues[j]); + i = ++ii == count ? length : src.Indices[ii]; } else - manip(j, default(TSrc), dstValues[j], ref editor.Values[j]); + manip(j, default(TSrc), dst.Values[j], ref resValues[j]); } } else @@ -1042,89 +1020,88 @@ private static void ApplyWithCoreCopy(in VBuffer src, ref VBuf { if (j == i) { - manip(j, srcValues[ii], dstValues[j], ref editor.Values[j]); - i = ++ii == count ? length : srcIndices[ii]; + manip(j, src.Values[ii], dst.Values[j], ref resValues[j]); + i = ++ii == count ? length : src.Indices[ii]; } else - editor.Values[j] = dstValues[j]; + resValues[j] = dst.Values[j]; } } - res = editor.Commit(); + res = new VBuffer(length, resValues, res.Indices); } } else { // dst is non-empty sparse - int dstCount = dstValues.Length; - var dstIndices = dst.GetIndices(); + int dstCount = dst.Count; Contracts.Assert(dstCount > 0); - if (srcValues.Length == 0) + if (src.Count == 0) { - var editor = VBufferEditor.Create(ref res, length, dstCount); + int[] resIndices = Utils.Size(res.Indices) >= dstCount ? res.Indices : new int[dstCount]; + TDst[] resValues = Utils.Size(res.Values) >= dstCount ? res.Values : new TDst[dstCount]; if (outer) { for (int jj = 0; jj < dstCount; jj++) { - int j = dstIndices[jj]; - editor.Indices[jj] = j; - manip(j, default(TSrc), dstValues[jj], ref editor.Values[jj]); + int j = dst.Indices[jj]; + resIndices[jj] = j; + manip(j, default(TSrc), dst.Values[jj], ref resValues[jj]); } } else { for (int jj = 0; jj < dstCount; jj++) { - editor.Indices[jj] = dstIndices[jj]; - editor.Values[jj] = dstValues[jj]; + resIndices[jj] = dst.Indices[jj]; + resValues[jj] = dst.Values[jj]; } } - res = editor.Commit(); + res = new VBuffer(length, dstCount, resValues, resIndices); } else if (src.IsDense) { // res will be dense. - var editor = VBufferEditor.Create(ref res, length); + TDst[] resValues = Utils.Size(res.Values) >= length ? res.Values : new TDst[length]; int jj = 0; - int j = dstIndices[jj]; + int j = dst.Indices[jj]; for (int i = 0; i < length; i++) { if (i == j) { - manip(i, srcValues[i], dstValues[jj], ref editor.Values[i]); - j = ++jj == dstCount ? length : dstIndices[jj]; + manip(i, src.Values[i], dst.Values[jj], ref resValues[i]); + j = ++jj == dstCount ? length : dst.Indices[jj]; } else - manip(i, srcValues[i], default(TDst), ref editor.Values[i]); + manip(i, src.Values[i], default(TDst), ref resValues[i]); } - res = editor.Commit(); + res = new VBuffer(length, resValues, res.Indices); } else { // Both src and dst are non-empty sparse. - Contracts.Assert(srcValues.Length > 0); + Contracts.Assert(src.Count > 0); // Find the count of result, which is the size of the union of the indices set of src and dst. int resCount = dstCount; - var srcIndices = src.GetIndices(); - for (int ii = 0, jj = 0; ii < srcValues.Length; ii++) + for (int ii = 0, jj = 0; ii < src.Count; ii++) { - int i = srcIndices[ii]; - while (jj < dstValues.Length && dstIndices[jj] < i) + int i = src.Indices[ii]; + while (jj < dst.Count && dst.Indices[jj] < i) jj++; - if (jj == dstValues.Length) + if (jj == dst.Count) { - resCount += srcValues.Length - ii; + resCount += src.Count - ii; break; } - if (dstIndices[jj] == i) + if (dst.Indices[jj] == i) jj++; else resCount++; } Contracts.Assert(0 < resCount && resCount <= length); - Contracts.Assert(resCount <= srcValues.Length + dstCount); - Contracts.Assert(srcValues.Length <= resCount); + Contracts.Assert(resCount <= src.Count + dstCount); + Contracts.Assert(src.Count <= resCount); Contracts.Assert(dstCount <= resCount); if (resCount == length) @@ -1137,12 +1114,13 @@ private static void ApplyWithCoreCopy(in VBuffer src, ref VBuf } else { - var editor = VBufferEditor.Create(ref res, length, resCount); + int[] resIndices = Utils.Size(res.Indices) >= resCount ? res.Indices : new int[resCount]; + TDst[] resValues = Utils.Size(res.Values) >= resCount ? res.Values : new TDst[resCount]; int ii = 0; - int i = srcIndices[ii]; + int i = src.Indices[ii]; int jj = 0; - int j = dstIndices[jj]; + int j = dst.Indices[jj]; for (int kk = 0; kk < resCount; kk++) { @@ -1150,35 +1128,35 @@ private static void ApplyWithCoreCopy(in VBuffer src, ref VBuf if (i == j) { // Slot (i == j) both defined in src and dst. Apply manip. - editor.Indices[kk] = i; - manip(i, srcValues[ii], dstValues[jj], ref editor.Values[kk]); - i = ++ii == srcValues.Length ? length : srcIndices[ii]; - j = ++jj == dstCount ? length : dstIndices[jj]; + resIndices[kk] = i; + manip(i, src.Values[ii], dst.Values[jj], ref resValues[kk]); + i = ++ii == src.Count ? length : src.Indices[ii]; + j = ++jj == dstCount ? length : dst.Indices[jj]; } else if (i < j) { // Slot i defined only in src, but not in dst. Apply manip. - editor.Indices[kk] = i; - manip(i, srcValues[ii], default(TDst), ref editor.Values[kk]); - i = ++ii == srcValues.Length ? length : srcIndices[ii]; + resIndices[kk] = i; + manip(i, src.Values[ii], default(TDst), ref resValues[kk]); + i = ++ii == src.Count ? length : src.Indices[ii]; } else { // Slot j defined only in dst, but not in src. Apply manip if outer. // Otherwise just copy. - editor.Indices[kk] = j; + resIndices[kk] = j; // REVIEW: Should we move checking of outer outside the loop? if (outer) - manip(j, default(TSrc), dstValues[jj], ref editor.Values[kk]); + manip(j, default(TSrc), dst.Values[jj], ref resValues[kk]); else - editor.Values[kk] = dstValues[jj]; - j = ++jj == dstCount ? length : dstIndices[jj]; + resValues[kk] = dst.Values[jj]; + j = ++jj == dstCount ? length : dst.Indices[jj]; } } - Contracts.Assert(ii == srcValues.Length && jj == dstCount); + Contracts.Assert(ii == src.Count && jj == dstCount); Contracts.Assert(i == length && j == length); - res = editor.Commit(); + res = new VBuffer(length, resCount, resValues, resIndices); } } } @@ -1198,34 +1176,29 @@ public static void ApplyIntoEitherDefined(in VBuffer src, ref { Contracts.CheckValue(func, nameof(func)); - var srcValues = src.GetValues(); - // REVIEW: The analogous WritableVector method insisted on // equal lengths, but I don't care here. - if (srcValues.Length == 0) + if (src.Count == 0) { - Resize(ref dst, src.Length, 0); + dst = new VBuffer(src.Length, src.Count, dst.Values, dst.Indices); return; } - var editor = VBufferEditor.Create(ref dst, - src.Length, - srcValues.Length, - maxValuesCapacity: src.Length); - Span values = editor.Values; + int[] indices = dst.Indices; + TDst[] values = dst.Values; + Utils.EnsureSize(ref values, src.Count, src.Length, keepOld: false); if (src.IsDense) { for (int i = 0; i < src.Length; ++i) - values[i] = func(i, srcValues[i]); + values[i] = func(i, src.Values[i]); } else { - Span indices = editor.Indices; - var srcIndices = src.GetIndices(); - srcIndices.CopyTo(indices); - for (int i = 0; i < srcValues.Length; ++i) - values[i] = func(srcIndices[i], srcValues[i]); + Utils.EnsureSize(ref indices, src.Count, src.Length, keepOld: false); + Array.Copy(src.Indices, indices, src.Count); + for (int i = 0; i < src.Count; ++i) + values[i] = func(src.Indices[i], src.Values[i]); } - dst = editor.Commit(); + dst = new VBuffer(src.Length, src.Count, values, indices); } /// @@ -1252,61 +1225,54 @@ public static void ApplyInto(in VBuffer a, in VBuffer // 5. b's indices are a subset of a's. // 6. Neither a nor b's indices are a subset of the other. - var aValues = a.GetValues(); - var bValues = b.GetValues(); - if (aValues.Length == 0 && bValues.Length == 0) + if (a.Count == 0 && b.Count == 0) { // Case 1. Output will be empty. - Resize(ref dst, a.Length, 0); + dst = new VBuffer(a.Length, 0, dst.Values, dst.Indices); return; } int aI = 0; int bI = 0; - ReadOnlySpan aIndices; - ReadOnlySpan bIndices; - VBufferEditor editor; + TDst[] values = dst.Values; if (a.IsDense || b.IsDense) { // Case 2. One of the two inputs is dense. The output will be dense. - editor = VBufferEditor.Create(ref dst, a.Length); + Utils.EnsureSize(ref values, a.Length, a.Length, keepOld: false); + if (!a.IsDense) { // a is sparse, b is dense - aIndices = a.GetIndices(); for (int i = 0; i < b.Length; i++) { - TSrc1 aVal = (aI < aIndices.Length && i == aIndices[aI]) ? aValues[aI++] : default(TSrc1); - editor.Values[i] = func(i, aVal, bValues[i]); + TSrc1 aVal = (aI < a.Count && i == a.Indices[aI]) ? a.Values[aI++] : default(TSrc1); + values[i] = func(i, aVal, b.Values[i]); } } else if (!b.IsDense) { // b is sparse, a is dense - bIndices = b.GetIndices(); for (int i = 0; i < a.Length; i++) { - TSrc2 bVal = (bI < bIndices.Length && i == bIndices[bI]) ? bValues[bI++] : default(TSrc2); - editor.Values[i] = func(i, aValues[i], bVal); + TSrc2 bVal = (bI < b.Count && i == b.Indices[bI]) ? b.Values[bI++] : default(TSrc2); + values[i] = func(i, a.Values[i], bVal); } } else { // both dense for (int i = 0; i < a.Length; i++) - editor.Values[i] = func(i, aValues[i], bValues[i]); + values[i] = func(i, a.Values[i], b.Values[i]); } - dst = editor.Commit(); + dst = new VBuffer(a.Length, values, dst.Indices); return; } // a, b both sparse. int newCount = 0; - aIndices = a.GetIndices(); - bIndices = b.GetIndices(); - while (aI < aIndices.Length && bI < bIndices.Length) + while (aI < a.Count && bI < b.Count) { - int aCompB = aIndices[aI] - bIndices[bI]; + int aCompB = a.Indices[aI] - b.Indices[bI]; if (aCompB <= 0) // a is no larger than b. aI++; if (aCompB >= 0) // b is no larger than a. @@ -1314,57 +1280,58 @@ public static void ApplyInto(in VBuffer a, in VBuffer newCount++; } - if (aI < aIndices.Length) - newCount += aIndices.Length - aI; - if (bI < bIndices.Length) - newCount += bIndices.Length - bI; + if (aI < a.Count) + newCount += a.Count - aI; + if (bI < b.Count) + newCount += b.Count - bI; // REVIEW: Worth optimizing the newCount == a.Length case? // Probably not... - editor = VBufferEditor.Create(ref dst, a.Length, newCount); - Span indices = editor.Indices; + int[] indices = dst.Indices; + Utils.EnsureSize(ref indices, newCount, a.Length, keepOld: false); + Utils.EnsureSize(ref values, newCount, a.Length, keepOld: false); - if (newCount == bValues.Length) + if (newCount == b.Count) { - if (newCount == aValues.Length) + if (newCount == a.Count) { // Case 3, a and b actually have the same indices! - aIndices.CopyTo(indices); - for (aI = 0; aI < aValues.Length; aI++) + Array.Copy(a.Indices, indices, a.Count); + for (aI = 0; aI < a.Count; aI++) { - Contracts.Assert(aIndices[aI] == bIndices[aI]); - editor.Values[aI] = func(aIndices[aI], aValues[aI], bValues[aI]); + Contracts.Assert(a.Indices[aI] == b.Indices[aI]); + values[aI] = func(a.Indices[aI], a.Values[aI], b.Values[aI]); } } else { // Case 4, a's indices are a subset of b's. - bIndices.CopyTo(indices); + Array.Copy(b.Indices, indices, b.Count); aI = 0; - for (bI = 0; aI < aValues.Length && bI < bValues.Length; bI++) + for (bI = 0; aI < a.Count && bI < b.Count; bI++) { - Contracts.Assert(aIndices[aI] >= bIndices[bI]); - TSrc1 aVal = aIndices[aI] == bIndices[bI] ? aValues[aI++] : default(TSrc1); - editor.Values[bI] = func(bIndices[bI], aVal, bValues[bI]); + Contracts.Assert(a.Indices[aI] >= b.Indices[bI]); + TSrc1 aVal = a.Indices[aI] == b.Indices[bI] ? a.Values[aI++] : default(TSrc1); + values[bI] = func(b.Indices[bI], aVal, b.Values[bI]); } - for (; bI < bValues.Length; bI++) - editor.Values[bI] = func(bIndices[bI], default(TSrc1), bValues[bI]); + for (; bI < b.Count; bI++) + values[bI] = func(b.Indices[bI], default(TSrc1), b.Values[bI]); } } - else if (newCount == aValues.Length) + else if (newCount == a.Count) { // Case 5, b's indices are a subset of a's. - aIndices.CopyTo(indices); + Array.Copy(a.Indices, indices, a.Count); bI = 0; - for (aI = 0; bI < bValues.Length && aI < aValues.Length; aI++) + for (aI = 0; bI < b.Count && aI < a.Count; aI++) { - Contracts.Assert(bIndices[bI] >= aIndices[aI]); - TSrc2 bVal = aIndices[aI] == bIndices[bI] ? bValues[bI++] : default(TSrc2); - editor.Values[aI] = func(aIndices[aI], aValues[aI], bVal); + Contracts.Assert(b.Indices[bI] >= a.Indices[aI]); + TSrc2 bVal = a.Indices[aI] == b.Indices[bI] ? b.Values[bI++] : default(TSrc2); + values[aI] = func(a.Indices[aI], a.Values[aI], bVal); } - for (; aI < aValues.Length; aI++) - editor.Values[aI] = func(aIndices[aI], aValues[aI], default(TSrc2)); + for (; aI < a.Count; aI++) + values[aI] = func(a.Indices[aI], a.Values[aI], default(TSrc2)); } else { @@ -1372,49 +1339,49 @@ public static void ApplyInto(in VBuffer a, in VBuffer int newI = aI = bI = 0; TSrc1 aVal = default(TSrc1); TSrc2 bVal = default(TSrc2); - while (aI < aIndices.Length && bI < bIndices.Length) + while (aI < a.Count && bI < b.Count) { - int aCompB = aIndices[aI] - bIndices[bI]; + int aCompB = a.Indices[aI] - b.Indices[bI]; int index = 0; if (aCompB < 0) { - index = aIndices[aI]; - aVal = aValues[aI++]; + index = a.Indices[aI]; + aVal = a.Values[aI++]; bVal = default(TSrc2); } else if (aCompB > 0) { - index = bIndices[bI]; + index = b.Indices[bI]; aVal = default(TSrc1); - bVal = bValues[bI++]; + bVal = b.Values[bI++]; } else { - index = aIndices[aI]; - Contracts.Assert(index == bIndices[bI]); - aVal = aValues[aI++]; - bVal = bValues[bI++]; + index = a.Indices[aI]; + Contracts.Assert(index == b.Indices[bI]); + aVal = a.Values[aI++]; + bVal = b.Values[bI++]; } - editor.Values[newI] = func(index, aVal, bVal); + values[newI] = func(index, aVal, bVal); indices[newI++] = index; } - for (; aI < aIndices.Length; aI++) + for (; aI < a.Count; aI++) { - int index = aIndices[aI]; - editor.Values[newI] = func(index, aValues[aI], default(TSrc2)); + int index = a.Indices[aI]; + values[newI] = func(index, a.Values[aI], default(TSrc2)); indices[newI++] = index; } - for (; bI < bIndices.Length; bI++) + for (; bI < b.Count; bI++) { - int index = bIndices[bI]; - editor.Values[newI] = func(index, default(TSrc1), bValues[bI]); + int index = b.Indices[bI]; + values[newI] = func(index, default(TSrc1), b.Values[bI]); indices[newI++] = index; } } - dst = editor.Commit(); + dst = new VBuffer(a.Length, newCount, values, indices); } /// @@ -1423,26 +1390,14 @@ public static void ApplyInto(in VBuffer a, in VBuffer public static void Copy(List src, ref VBuffer dst, int length) { Contracts.CheckParam(0 <= length && length <= Utils.Size(src), nameof(length)); - var editor = VBufferEditor.Create(ref dst, length); + var values = dst.Values; if (length > 0) { - // List.CopyTo should have an overload for Span - https://github.com/dotnet/corefx/issues/33006 - for (int i = 0; i < length; i++) - { - editor.Values[i] = src[i]; - } + if (Utils.Size(values) < length) + values = new T[length]; + src.CopyTo(values); } - dst = editor.Commit(); - } - - /// - /// Updates the logical length and number of physical values to be represented in - /// , while preserving the underlying buffers. - /// - public static void Resize(ref VBuffer dst, int newLogicalLength, int? valuesCount = null) - { - dst = VBufferEditor.Create(ref dst, newLogicalLength, valuesCount) - .Commit(); + dst = new VBuffer(length, values, dst.Indices); } } } diff --git a/src/Microsoft.ML.CpuMath/AlignedArray.cs b/src/Microsoft.ML.CpuMath/AlignedArray.cs index cfbee22eab..87583a8ef6 100644 --- a/src/Microsoft.ML.CpuMath/AlignedArray.cs +++ b/src/Microsoft.ML.CpuMath/AlignedArray.cs @@ -16,14 +16,13 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath /// /// The ctor takes an alignment value, which must be a power of two at least sizeof(Float). /// - [BestFriend] - internal sealed class AlignedArray + public sealed class AlignedArray { // Items includes "head" items filled with NaN, followed by _size entries, followed by "tail" // items, also filled with NaN. Note that _size * sizeof(Float) is divisible by _cbAlign. // It is illegal to access any slot outsize [_base, _base + _size). This is internal so clients // can easily pin it. - public Float[] Items; + internal Float[] Items; private readonly int _size; // Must be divisible by (_cbAlign / sizeof(Float)). private readonly int _cbAlign; // The alignment in bytes, a power of two, divisible by sizeof(Float). @@ -50,7 +49,7 @@ public AlignedArray(int size, int cbAlign) _lock = new object(); } - public unsafe int GetBase(long addr) + internal unsafe int GetBase(long addr) { #if DEBUG fixed (Float* pv = Items) @@ -126,23 +125,28 @@ public void CopyTo(int start, Float[] dst, int index, int count) Array.Copy(Items, start + _base, dst, index, count); } - public void CopyFrom(ReadOnlySpan src) + public void CopyFrom(Float[] src, int index, int count) { - Contracts.Assert(src.Length <= _size); - src.CopyTo(Items.AsSpan(_base)); + Contracts.Assert(0 <= count && count <= _size); + Contracts.Assert(src != null); + Contracts.Assert(0 <= index && index <= src.Length - count); + Array.Copy(src, index, Items, _base, count); } - public void CopyFrom(int start, ReadOnlySpan src) + public void CopyFrom(int start, Float[] src, int index, int count) { - Contracts.Assert(0 <= start && start <= _size - src.Length); - src.CopyTo(Items.AsSpan(start + _base)); + Contracts.Assert(0 <= count); + Contracts.Assert(0 <= start && start <= _size - count); + Contracts.Assert(src != null); + Contracts.Assert(0 <= index && index <= src.Length - count); + Array.Copy(src, index, Items, start + _base, count); } // Copies values from a sparse vector. // valuesSrc contains only the non-zero entries. Those are copied into their logical positions in the dense array. // rgposSrc contains the logical positions + offset of the non-zero entries in the dense array. // rgposSrc runs parallel to the valuesSrc array. - public void CopyFrom(ReadOnlySpan rgposSrc, ReadOnlySpan valuesSrc, int posMin, int iposMin, int iposLim, bool zeroItems) + public void CopyFrom(int[] rgposSrc, Float[] valuesSrc, int posMin, int iposMin, int iposLim, bool zeroItems) { Contracts.Assert(rgposSrc != null); Contracts.Assert(valuesSrc != null); diff --git a/src/Microsoft.ML.CpuMath/AlignedMatrix.cs b/src/Microsoft.ML.CpuMath/AlignedMatrix.cs index 5412e5fd77..f76ec7815d 100644 --- a/src/Microsoft.ML.CpuMath/AlignedMatrix.cs +++ b/src/Microsoft.ML.CpuMath/AlignedMatrix.cs @@ -18,8 +18,7 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath /// the AlignedArray with a logical size, which does not include padding, while the AlignedArray /// size does include padding. /// - [BestFriend] - internal sealed class CpuAlignedVector : ICpuVector + public sealed class CpuAlignedVector : ICpuVector { private readonly AlignedArray _items; private readonly int _size; // The logical size. @@ -181,7 +180,7 @@ public void CopyFrom(Float[] src, ref int index) { Contracts.AssertValue(src); Contracts.Assert(0 <= index && index <= src.Length - _size); - _items.CopyFrom(src.AsSpan(index, _size)); + _items.CopyFrom(src, index, _size); index += _size; } @@ -199,7 +198,7 @@ public void CopyFrom(int ivDst, Float[] src, int ivSrc, int count) Contracts.Assert(0 <= count && count <= src.Length); Contracts.Assert(0 <= ivDst && ivDst <= _size - count); Contracts.Assert(0 <= ivSrc && ivSrc <= src.Length - count); - _items.CopyFrom(ivDst, src.AsSpan(ivSrc, _size)); + _items.CopyFrom(ivDst, src, ivSrc, _size); } /// @@ -232,8 +231,7 @@ IEnumerator IEnumerable.GetEnumerator() /// This implements a logical matrix of Floats that is automatically aligned for SSE/AVX operations. /// The ctor takes an alignment value, which must be a power of two at least sizeof(Float). /// - [BestFriend] - internal abstract class CpuAlignedMatrixBase + public abstract class CpuAlignedMatrixBase { // _items includes "head" items filled with NaN, followed by RunLenPhy * RunCntPhy entries, followed by // "tail" items, also filled with NaN. Note that RunLenPhy and RunCntPhy are divisible by the alignment @@ -395,8 +393,7 @@ public void CopyFrom(CpuAlignedMatrixBase src) /// This implements a logical row-major matrix of Floats that is automatically aligned for SSE/AVX operations. /// The ctor takes an alignment value, which must be a power of two at least sizeof(Float). /// - [BestFriend] - internal abstract class CpuAlignedMatrixRowBase : CpuAlignedMatrixBase, ICpuBuffer + public abstract class CpuAlignedMatrixRowBase : CpuAlignedMatrixBase, ICpuBuffer { protected CpuAlignedMatrixRowBase(int crow, int ccol, int cbAlign) : base(ccol, crow, cbAlign) @@ -464,14 +461,14 @@ public void CopyFrom(Float[] src, ref int ivSrc) if (ColCount == ColCountPhy) { - Items.CopyFrom(src.AsSpan(ivSrc, ValueCount)); + Items.CopyFrom(src, ivSrc, ValueCount); ivSrc += ValueCount; } else { for (int row = 0; row < RowCount; row++) { - Items.CopyFrom(row * ColCountPhy, src.AsSpan(ivSrc, ColCount)); + Items.CopyFrom(row * ColCountPhy, src, ivSrc, ColCount); ivSrc += ColCount; } } @@ -500,8 +497,7 @@ IEnumerator IEnumerable.GetEnumerator() /// This implements a row-major matrix of Floats that is automatically aligned for SSE/AVX operations. /// The ctor takes an alignment value, which must be a power of two at least sizeof(Float). /// - [BestFriend] - internal sealed class CpuAlignedMatrixRow : CpuAlignedMatrixRowBase, ICpuFullMatrix + public sealed class CpuAlignedMatrixRow : CpuAlignedMatrixRowBase, ICpuFullMatrix { public CpuAlignedMatrixRow(int crow, int ccol, int cbAlign) : base(crow, ccol, cbAlign) @@ -562,8 +558,7 @@ public void ZeroItems(int[] indices) /// This implements a logical matrix of Floats that is automatically aligned for SSE/AVX operations. /// The ctor takes an alignment value, which must be a power of two at least sizeof(Float). /// - [BestFriend] - internal sealed class CpuAlignedMatrixCol : CpuAlignedMatrixBase, ICpuFullMatrix + public sealed class CpuAlignedMatrixCol : CpuAlignedMatrixBase, ICpuFullMatrix { /// /// Allocate an aligned matrix with the given alignment (in bytes). diff --git a/src/Microsoft.ML.CpuMath/AssemblyInfo.cs b/src/Microsoft.ML.CpuMath/AssemblyInfo.cs index 17bdf84324..cb45bf5608 100644 --- a/src/Microsoft.ML.CpuMath/AssemblyInfo.cs +++ b/src/Microsoft.ML.CpuMath/AssemblyInfo.cs @@ -2,20 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Reflection; using System.Runtime.CompilerServices; -using Microsoft.ML; +using System.Runtime.InteropServices; -[assembly: InternalsVisibleTo("Microsoft.ML.CpuMath.UnitTests.netstandard" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo("Microsoft.ML.CpuMath.UnitTests.netcoreapp" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo("Microsoft.ML.Data" + PublicKey.Value)] -[assembly: InternalsVisibleTo("Microsoft.ML.FastTree" + PublicKey.Value)] -[assembly: InternalsVisibleTo("Microsoft.ML.HalLearners" + PublicKey.Value)] -[assembly: InternalsVisibleTo("Microsoft.ML.KMeansClustering" + PublicKey.Value)] -[assembly: InternalsVisibleTo("Microsoft.ML.PCA" + PublicKey.Value)] -[assembly: InternalsVisibleTo("Microsoft.ML.StandardLearners" + PublicKey.Value)] -[assembly: InternalsVisibleTo("Microsoft.ML.Sweeper" + PublicKey.Value)] -[assembly: InternalsVisibleTo("Microsoft.ML.TimeSeries" + PublicKey.Value)] -[assembly: InternalsVisibleTo("Microsoft.ML.Transforms" + PublicKey.Value)] -[assembly: InternalsVisibleTo("Microsoft.ML.Benchmarks.Tests" + PublicKey.TestValue)] - -[assembly: WantsToBeBestFriends] +[assembly: InternalsVisibleTo("Microsoft.ML.StandardLearners, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] \ No newline at end of file diff --git a/src/Microsoft.ML.CpuMath/AvxIntrinsics.cs b/src/Microsoft.ML.CpuMath/AvxIntrinsics.cs index 55e692eb63..a3f0582800 100644 --- a/src/Microsoft.ML.CpuMath/AvxIntrinsics.cs +++ b/src/Microsoft.ML.CpuMath/AvxIntrinsics.cs @@ -951,8 +951,6 @@ public static unsafe void Scale(float scale, Span dst) public static unsafe void ScaleSrcU(float scale, ReadOnlySpan src, Span dst, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -1046,8 +1044,6 @@ public static unsafe void ScaleAddU(float a, float b, Span dst) public static unsafe void AddScaleU(float scale, ReadOnlySpan src, Span dst, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -1100,8 +1096,6 @@ public static unsafe void AddScaleU(float scale, ReadOnlySpan src, Span src, ReadOnlySpan dst, Span result, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) fixed (float* pres = &MemoryMarshal.GetReference(result)) @@ -1156,8 +1150,6 @@ public static unsafe void AddScaleCopyU(float scale, ReadOnlySpan src, Re public static unsafe void AddScaleSU(float scale, ReadOnlySpan src, ReadOnlySpan idx, Span dst, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (int* pidx = &MemoryMarshal.GetReference(idx)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) @@ -1206,8 +1198,6 @@ public static unsafe void AddScaleSU(float scale, ReadOnlySpan src, ReadO public static unsafe void AddU(ReadOnlySpan src, Span dst, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -1255,8 +1245,6 @@ public static unsafe void AddU(ReadOnlySpan src, Span dst, int cou public static unsafe void AddSU(ReadOnlySpan src, ReadOnlySpan idx, Span dst, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (int* pidx = &MemoryMarshal.GetReference(idx)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) @@ -1738,8 +1726,6 @@ public static unsafe float MaxAbsDiffU(float mean, ReadOnlySpan src) public static unsafe float DotU(ReadOnlySpan src, ReadOnlySpan dst, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -1792,8 +1778,6 @@ public static unsafe float DotU(ReadOnlySpan src, ReadOnlySpan dst public static unsafe float DotSU(ReadOnlySpan src, ReadOnlySpan dst, ReadOnlySpan idx, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) fixed (int* pidx = &MemoryMarshal.GetReference(idx)) @@ -1848,8 +1832,6 @@ public static unsafe float DotSU(ReadOnlySpan src, ReadOnlySpan ds public static unsafe float Dist2(ReadOnlySpan src, ReadOnlySpan dst, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { diff --git a/src/Microsoft.ML.CpuMath/CpuAligenedMathUtils.cs b/src/Microsoft.ML.CpuMath/CpuAligenedMathUtils.cs index d4c8e8e087..eacdd85213 100644 --- a/src/Microsoft.ML.CpuMath/CpuAligenedMathUtils.cs +++ b/src/Microsoft.ML.CpuMath/CpuAligenedMathUtils.cs @@ -4,8 +4,7 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath { - [BestFriend] - internal static class CpuAligenedMathUtils + public static class CpuAligenedMathUtils where TMatrix : CpuAlignedMatrixBase, ICpuFullMatrix { /// diff --git a/src/Microsoft.ML.CpuMath/CpuMathUtils.netcoreapp.cs b/src/Microsoft.ML.CpuMath/CpuMathUtils.netcoreapp.cs index ed5be5390a..e9d95ccc1d 100644 --- a/src/Microsoft.ML.CpuMath/CpuMathUtils.netcoreapp.cs +++ b/src/Microsoft.ML.CpuMath/CpuMathUtils.netcoreapp.cs @@ -8,7 +8,7 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath { - internal static partial class CpuMathUtils + public static partial class CpuMathUtils { // The count of bytes in Vector128, corresponding to _cbAlign in AlignedArray private const int Vector128Alignment = 16; @@ -88,9 +88,10 @@ public static void MatrixTimesSource(bool transpose, AlignedArray matrix, Aligne } } - public static void MatrixTimesSource(AlignedArray matrix, ReadOnlySpan rgposSrc, AlignedArray sourceValues, + public static void MatrixTimesSource(AlignedArray matrix, int[] rgposSrc, AlignedArray sourceValues, int posMin, int iposMin, int iposLimit, AlignedArray destination, int stride) { + Contracts.AssertValue(rgposSrc); Contracts.Assert(iposMin >= 0); Contracts.Assert(iposMin <= iposLimit); Contracts.Assert(iposLimit <= rgposSrc.Length); diff --git a/src/Microsoft.ML.CpuMath/CpuMathUtils.netstandard.cs b/src/Microsoft.ML.CpuMath/CpuMathUtils.netstandard.cs index b3f46f0a5a..bc9569d390 100644 --- a/src/Microsoft.ML.CpuMath/CpuMathUtils.netstandard.cs +++ b/src/Microsoft.ML.CpuMath/CpuMathUtils.netstandard.cs @@ -7,8 +7,7 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath { - [BestFriend] - internal static partial class CpuMathUtils + public static partial class CpuMathUtils { // The count of bytes in Vector128, corresponding to _cbAlign in AlignedArray private const int Vector128Alignment = 16; @@ -19,7 +18,7 @@ public static int GetVectorAlignment() public static void MatrixTimesSource(bool transpose, AlignedArray matrix, AlignedArray source, AlignedArray destination, int stride) => SseUtils.MatTimesSrc(transpose, matrix, source, destination, stride); - public static void MatrixTimesSource(AlignedArray matrix, ReadOnlySpan rgposSrc, AlignedArray sourceValues, + public static void MatrixTimesSource(AlignedArray matrix, int[] rgposSrc, AlignedArray sourceValues, int posMin, int iposMin, int iposLimit, AlignedArray destination, int stride) => SseUtils.MatTimesSrc(matrix, rgposSrc, sourceValues, posMin, iposMin, iposLimit, destination, stride); public static void Add(float value, Span destination) => SseUtils.Add(value, destination); diff --git a/src/Microsoft.ML.CpuMath/EigenUtils.cs b/src/Microsoft.ML.CpuMath/EigenUtils.cs index fc20b8bfe7..622849d368 100644 --- a/src/Microsoft.ML.CpuMath/EigenUtils.cs +++ b/src/Microsoft.ML.CpuMath/EigenUtils.cs @@ -7,9 +7,8 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath { - [BestFriend] // REVIEW: improve perf with SSE and Multithreading - internal static class EigenUtils + public static class EigenUtils { //Compute the Eigen-decomposition of a symmetric matrix // REVIEW: use matrix/vector operations, not Array Math diff --git a/src/Microsoft.ML.CpuMath/ICpuBuffer.cs b/src/Microsoft.ML.CpuMath/ICpuBuffer.cs index 7f0c0e8126..ad55f5c8c6 100644 --- a/src/Microsoft.ML.CpuMath/ICpuBuffer.cs +++ b/src/Microsoft.ML.CpuMath/ICpuBuffer.cs @@ -10,8 +10,7 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath { using Conditional = System.Diagnostics.ConditionalAttribute; - [BestFriend] - internal interface ICpuBuffer : IEnumerable, IDisposable + public interface ICpuBuffer : IEnumerable, IDisposable where T : struct { int ValueCount { get; } @@ -40,8 +39,7 @@ internal interface ICpuBuffer : IEnumerable, IDisposable /// /// A logical math vector. /// - [BestFriend] - internal interface ICpuVector : ICpuBuffer + public interface ICpuVector : ICpuBuffer { /// /// The vector size @@ -54,8 +52,7 @@ internal interface ICpuVector : ICpuBuffer Float GetValue(int i); } - [BestFriend] - internal interface ICpuMatrix : ICpuBuffer + public interface ICpuMatrix : ICpuBuffer { /// /// The row count @@ -71,8 +68,7 @@ internal interface ICpuMatrix : ICpuBuffer /// /// A 2-dimensional matrix. /// - [BestFriend] - internal interface ICpuFullMatrix : ICpuMatrix + public interface ICpuFullMatrix : ICpuMatrix { /// /// Copy the values for the given row into dst, starting at slot ivDst. diff --git a/src/Microsoft.ML.CpuMath/IntUtils.cs b/src/Microsoft.ML.CpuMath/IntUtils.cs index cec2b71dfb..2492dddaff 100644 --- a/src/Microsoft.ML.CpuMath/IntUtils.cs +++ b/src/Microsoft.ML.CpuMath/IntUtils.cs @@ -9,8 +9,7 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath { - [BestFriend] - internal static class IntUtils + public static class IntUtils { /// /// Add src to the 128 bits contained in dst. Ignores overflow, that is, the addition is done modulo 2^128. diff --git a/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj b/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj index 8fa97116ba..f9d3d90b59 100644 --- a/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj +++ b/src/Microsoft.ML.CpuMath/Microsoft.ML.CpuMath.csproj @@ -5,6 +5,7 @@ netstandard2.0;netcoreapp3.0 Microsoft.ML.CpuMath true + $(DefineConstants);CORECLR;PRIVATE_CONTRACTS 7.3 @@ -12,6 +13,13 @@ + + + + + + + @@ -24,8 +32,4 @@ - - - - - + \ No newline at end of file diff --git a/src/Microsoft.ML.CpuMath/ProbabilityFunctions.cs b/src/Microsoft.ML.CpuMath/ProbabilityFunctions.cs index ed1208c80c..6b9659e753 100644 --- a/src/Microsoft.ML.CpuMath/ProbabilityFunctions.cs +++ b/src/Microsoft.ML.CpuMath/ProbabilityFunctions.cs @@ -9,8 +9,7 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath /// /// Probability Functions. /// - [BestFriend] - internal sealed class ProbabilityFunctions + public sealed class ProbabilityFunctions { /// /// The approximate complimentary error function (i.e., 1-erf). diff --git a/src/Microsoft.ML.CpuMath/Sse.cs b/src/Microsoft.ML.CpuMath/Sse.cs index b3f00d1136..3ff59f2840 100644 --- a/src/Microsoft.ML.CpuMath/Sse.cs +++ b/src/Microsoft.ML.CpuMath/Sse.cs @@ -11,8 +11,7 @@ namespace Microsoft.ML.Runtime.Internal.CpuMath /// Keep Sse.cs in sync with Avx.cs. When making changes to one, use BeyondCompare or a similar tool /// to view diffs and propagate appropriate changes to the other. /// - [BestFriend] - internal static class SseUtils + public static class SseUtils { public const int CbAlign = 16; @@ -58,12 +57,13 @@ public static void MatTimesSrc(bool tran, AlignedArray mat, AlignedArray src, Al } } - public static void MatTimesSrc(AlignedArray mat, ReadOnlySpan rgposSrc, AlignedArray srcValues, + public static void MatTimesSrc(AlignedArray mat, int[] rgposSrc, AlignedArray srcValues, int posMin, int iposMin, int iposLim, AlignedArray dst, int crun) { Contracts.Assert(Compat(mat)); Contracts.Assert(Compat(srcValues)); Contracts.Assert(Compat(dst)); + Contracts.AssertValue(rgposSrc); Contracts.Assert(0 <= iposMin && iposMin <= iposLim && iposLim <= rgposSrc.Length); Contracts.Assert(mat.Size == dst.Size * srcValues.Size); diff --git a/src/Microsoft.ML.CpuMath/SseIntrinsics.cs b/src/Microsoft.ML.CpuMath/SseIntrinsics.cs index 5d6f2ed134..cf85a98132 100644 --- a/src/Microsoft.ML.CpuMath/SseIntrinsics.cs +++ b/src/Microsoft.ML.CpuMath/SseIntrinsics.cs @@ -276,7 +276,7 @@ public static unsafe void MatMul(ReadOnlySpan mat, ReadOnlySpan sr } // Partial sparse source vector. - public static unsafe void MatMulP(AlignedArray mat, ReadOnlySpan rgposSrc, AlignedArray src, + public static unsafe void MatMulP(AlignedArray mat, int[] rgposSrc, AlignedArray src, int posMin, int iposMin, int iposEnd, AlignedArray dst, int crow, int ccol) { MatMulP(mat.Items, rgposSrc, src.Items, posMin, iposMin, iposEnd, dst.Items, crow, ccol); @@ -893,8 +893,6 @@ public static unsafe void Scale(float scale, Span dst) public static unsafe void ScaleSrcU(float scale, ReadOnlySpan src, Span dst, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -963,8 +961,6 @@ public static unsafe void ScaleAddU(float a, float b, Span dst) public static unsafe void AddScaleU(float scale, ReadOnlySpan src, Span dst, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -1004,8 +1000,6 @@ public static unsafe void AddScaleU(float scale, ReadOnlySpan src, Span src, ReadOnlySpan dst, Span result, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) fixed (float* pres = &MemoryMarshal.GetReference(result)) @@ -1047,8 +1041,6 @@ public static unsafe void AddScaleCopyU(float scale, ReadOnlySpan src, Re public static unsafe void AddScaleSU(float scale, ReadOnlySpan src, ReadOnlySpan idx, Span dst, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (int* pidx = &MemoryMarshal.GetReference(idx)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) @@ -1085,8 +1077,6 @@ public static unsafe void AddScaleSU(float scale, ReadOnlySpan src, ReadO public static unsafe void AddU(ReadOnlySpan src, Span dst, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -1122,8 +1112,6 @@ public static unsafe void AddU(ReadOnlySpan src, Span dst, int cou public static unsafe void AddSU(ReadOnlySpan src, ReadOnlySpan idx, Span dst, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (int* pidx = &MemoryMarshal.GetReference(idx)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) @@ -1157,9 +1145,6 @@ public static unsafe void AddSU(ReadOnlySpan src, ReadOnlySpan idx, public static unsafe void MulElementWiseU(ReadOnlySpan src1, ReadOnlySpan src2, Span dst, int count) { - Contracts.Assert(src1.Length == dst.Length); - Contracts.Assert(src2.Length == dst.Length); - fixed (float* psrc1 = &MemoryMarshal.GetReference(src1)) fixed (float* psrc2 = &MemoryMarshal.GetReference(src2)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) @@ -1494,8 +1479,6 @@ public static unsafe float MaxAbsDiffU(float mean, ReadOnlySpan src) public static unsafe float DotU(ReadOnlySpan src, ReadOnlySpan dst, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { @@ -1535,8 +1518,6 @@ public static unsafe float DotU(ReadOnlySpan src, ReadOnlySpan dst public static unsafe float DotSU(ReadOnlySpan src, ReadOnlySpan dst, ReadOnlySpan idx, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) fixed (int* pidx = &MemoryMarshal.GetReference(idx)) @@ -1578,8 +1559,6 @@ public static unsafe float DotSU(ReadOnlySpan src, ReadOnlySpan ds public static unsafe float Dist2(ReadOnlySpan src, ReadOnlySpan dst, int count) { - Contracts.Assert(src.Length == dst.Length); - fixed (float* psrc = &MemoryMarshal.GetReference(src)) fixed (float* pdst = &MemoryMarshal.GetReference(dst)) { diff --git a/src/Microsoft.ML.CpuMath/Thunk.cs b/src/Microsoft.ML.CpuMath/Thunk.cs index faf0b82c66..86e3992f62 100644 --- a/src/Microsoft.ML.CpuMath/Thunk.cs +++ b/src/Microsoft.ML.CpuMath/Thunk.cs @@ -3,11 +3,11 @@ // See the LICENSE file in the project root for more information. using System.Runtime.InteropServices; +using System.Runtime.CompilerServices; using System.Security; namespace Microsoft.ML.Runtime.Internal.CpuMath { - [BestFriend] internal static unsafe class Thunk { internal const string NativePath = "CpuMathNative"; diff --git a/src/Microsoft.ML.Data/Commands/CrossValidationCommand.cs b/src/Microsoft.ML.Data/Commands/CrossValidationCommand.cs index 2f20462290..24b84d38c1 100644 --- a/src/Microsoft.ML.Data/Commands/CrossValidationCommand.cs +++ b/src/Microsoft.ML.Data/Commands/CrossValidationCommand.cs @@ -21,8 +21,7 @@ namespace Microsoft.ML.Runtime.Data { - [BestFriend] - internal sealed class CrossValidationCommand : DataCommand.ImplBase + public sealed class CrossValidationCommand : DataCommand.ImplBase { // REVIEW: We need a way to specify different data sets, not just LabeledExamples. public sealed class Arguments : DataCommand.ArgumentsBase diff --git a/src/Microsoft.ML.Data/Commands/DataCommand.cs b/src/Microsoft.ML.Data/Commands/DataCommand.cs index 5c5ceef6f7..f617fb206f 100644 --- a/src/Microsoft.ML.Data/Commands/DataCommand.cs +++ b/src/Microsoft.ML.Data/Commands/DataCommand.cs @@ -17,8 +17,7 @@ namespace Microsoft.ML.Runtime.Data /// /// This holds useful base classes for commands that ingest a primary dataset and deal with associated model files. /// - [BestFriend] - internal static class DataCommand + public static class DataCommand { public abstract class ArgumentsBase { @@ -57,8 +56,7 @@ public abstract class ArgumentsBase public KeyValuePair>[] Transform; } - [BestFriend] - internal abstract class ImplBase : ICommand + public abstract class ImplBase : ICommand where TArgs : ArgumentsBase { protected readonly IHost Host; diff --git a/src/Microsoft.ML.Data/Commands/EvaluateCommand.cs b/src/Microsoft.ML.Data/Commands/EvaluateCommand.cs index 7ed4144262..937f019c37 100644 --- a/src/Microsoft.ML.Data/Commands/EvaluateCommand.cs +++ b/src/Microsoft.ML.Data/Commands/EvaluateCommand.cs @@ -162,7 +162,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV } } - internal sealed class EvaluateCommand : DataCommand.ImplBase + public sealed class EvaluateCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { diff --git a/src/Microsoft.ML.Data/Commands/SaveDataCommand.cs b/src/Microsoft.ML.Data/Commands/SaveDataCommand.cs index a721aee15a..f4e535816e 100644 --- a/src/Microsoft.ML.Data/Commands/SaveDataCommand.cs +++ b/src/Microsoft.ML.Data/Commands/SaveDataCommand.cs @@ -22,7 +22,7 @@ namespace Microsoft.ML.Runtime.Data { - internal sealed class SaveDataCommand : DataCommand.ImplBase + public sealed class SaveDataCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { @@ -87,7 +87,7 @@ private void RunCore(IChannel ch) } } - internal sealed class ShowDataCommand : DataCommand.ImplBase + public sealed class ShowDataCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { @@ -133,7 +133,7 @@ private void RunCore(IChannel ch) var keepColumns = Args.Columns .Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToArray(); if (Utils.Size(keepColumns) > 0) - data = ColumnSelectingTransformer.CreateKeep(Host, data, keepColumns); + data = SelectColumnsTransform.CreateKeep(Host, data, keepColumns); } IDataSaver saver; diff --git a/src/Microsoft.ML.Data/Commands/SavePredictorCommand.cs b/src/Microsoft.ML.Data/Commands/SavePredictorCommand.cs index 633f871dd0..e1057d18b4 100644 --- a/src/Microsoft.ML.Data/Commands/SavePredictorCommand.cs +++ b/src/Microsoft.ML.Data/Commands/SavePredictorCommand.cs @@ -20,7 +20,7 @@ namespace Microsoft.ML.Runtime.Tools { - internal sealed class SavePredictorCommand : ICommand + public sealed class SavePredictorCommand : ICommand { public sealed class Arguments { diff --git a/src/Microsoft.ML.Data/Commands/ScoreCommand.cs b/src/Microsoft.ML.Data/Commands/ScoreCommand.cs index c0b2d7ecc5..d4c737f7b1 100644 --- a/src/Microsoft.ML.Data/Commands/ScoreCommand.cs +++ b/src/Microsoft.ML.Data/Commands/ScoreCommand.cs @@ -37,7 +37,7 @@ public interface IDataScorerTransform : IDataTransform, ITransformTemplate public delegate void SignatureBindableMapper(IPredictor predictor); - internal sealed class ScoreCommand : DataCommand.ImplBase + public sealed class ScoreCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { @@ -232,8 +232,7 @@ private bool ShouldAddColumn(Schema schema, int i, uint scoreSet, bool outputNam } } - [BestFriend] - internal static class ScoreUtils + public static class ScoreUtils { public static IDataScorerTransform GetScorer(IPredictor predictor, RoleMappedData data, IHostEnvironment env, RoleMappedSchema trainSchema) { diff --git a/src/Microsoft.ML.Data/Commands/ShowSchemaCommand.cs b/src/Microsoft.ML.Data/Commands/ShowSchemaCommand.cs index 4082eab1df..4fb0738e58 100644 --- a/src/Microsoft.ML.Data/Commands/ShowSchemaCommand.cs +++ b/src/Microsoft.ML.Data/Commands/ShowSchemaCommand.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.CodeDom.Compiler; using System.Collections.Generic; using System.IO; using System.Linq; @@ -21,7 +20,7 @@ namespace Microsoft.ML.Runtime.Data { - internal sealed class ShowSchemaCommand : DataCommand.ImplBase + public sealed class ShowSchemaCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { @@ -127,9 +126,9 @@ private static void PrintSchema(TextWriter writer, Arguments args, ISchema schem } #endif int colLim = schema.ColumnCount; + writer.WriteLine("{0} columns:", colLim); - var itw = new IndentedTextWriter(writer, " "); - itw.WriteLine("{0} columns:", colLim); + var itw = IndentingTextWriter.Wrap(writer); using (itw.Nest()) { var names = default(VBuffer>); @@ -179,7 +178,7 @@ private static void PrintSchema(TextWriter writer, Arguments args, ISchema schem } } - private static void ShowMetadata(IndentedTextWriter itw, ISchema schema, int col, bool showVals) + private static void ShowMetadata(IndentingTextWriter itw, ISchema schema, int col, bool showVals) { Contracts.AssertValue(itw); Contracts.AssertValue(schema); @@ -205,7 +204,7 @@ private static void ShowMetadata(IndentedTextWriter itw, ISchema schema, int col } } - private static void ShowMetadataValue(IndentedTextWriter itw, ISchema schema, int col, string kind, ColumnType type) + private static void ShowMetadataValue(IndentingTextWriter itw, ISchema schema, int col, string kind, ColumnType type) { Contracts.AssertValue(itw); Contracts.AssertValue(schema); @@ -220,12 +219,12 @@ private static void ShowMetadataValue(IndentedTextWriter itw, ISchema schema, in return; } - Action del = ShowMetadataValue; + Action del = ShowMetadataValue; var meth = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(type.RawType); meth.Invoke(null, new object[] { itw, schema, col, kind, type }); } - private static void ShowMetadataValue(IndentedTextWriter itw, ISchema schema, int col, string kind, ColumnType type) + private static void ShowMetadataValue(IndentingTextWriter itw, ISchema schema, int col, string kind, ColumnType type) { Contracts.AssertValue(itw); Contracts.AssertValue(schema); @@ -245,7 +244,7 @@ private static void ShowMetadataValue(IndentedTextWriter itw, ISchema schema, itw.Write(": '{0}'", sb); } - private static void ShowMetadataValueVec(IndentedTextWriter itw, ISchema schema, int col, string kind, ColumnType type) + private static void ShowMetadataValueVec(IndentingTextWriter itw, ISchema schema, int col, string kind, ColumnType type) { Contracts.AssertValue(itw); Contracts.AssertValue(schema); @@ -260,12 +259,12 @@ private static void ShowMetadataValueVec(IndentedTextWriter itw, ISchema schema, return; } - Action del = ShowMetadataValueVec; + Action del = ShowMetadataValueVec; var meth = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(type.ItemType.RawType); meth.Invoke(null, new object[] { itw, schema, col, kind, type }); } - private static void ShowMetadataValueVec(IndentedTextWriter itw, ISchema schema, int col, string kind, ColumnType type) + private static void ShowMetadataValueVec(IndentingTextWriter itw, ISchema schema, int col, string kind, ColumnType type) { Contracts.AssertValue(itw); Contracts.AssertValue(schema); @@ -280,7 +279,7 @@ private static void ShowMetadataValueVec(IndentedTextWriter itw, ISchema sche var value = default(VBuffer); schema.GetMetadata(kind, col, ref value); - itw.Write(": Length={0}, Count={0}", value.Length, value.GetValues().Length); + itw.Write(": Length={0}, Count={0}", value.Length, value.Count); using (itw.Nest()) { diff --git a/src/Microsoft.ML.Data/Commands/TestCommand.cs b/src/Microsoft.ML.Data/Commands/TestCommand.cs index 407f7e713d..574bd4e00a 100644 --- a/src/Microsoft.ML.Data/Commands/TestCommand.cs +++ b/src/Microsoft.ML.Data/Commands/TestCommand.cs @@ -14,12 +14,8 @@ namespace Microsoft.ML.Runtime.Data { - /// - /// This command is essentially chaining together and - /// , without the need to save the intermediary scored data. - /// - [BestFriend] - internal sealed class TestCommand : DataCommand.ImplBase + // This command is essentially chaining together Score and Evaluate, without the need to save the intermediary scored data. + public sealed class TestCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { diff --git a/src/Microsoft.ML.Data/Commands/TrainCommand.cs b/src/Microsoft.ML.Data/Commands/TrainCommand.cs index ff709de143..e95758fdaf 100644 --- a/src/Microsoft.ML.Data/Commands/TrainCommand.cs +++ b/src/Microsoft.ML.Data/Commands/TrainCommand.cs @@ -2,7 +2,6 @@ // 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.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Command; using Microsoft.ML.Runtime.CommandLine; @@ -32,8 +31,7 @@ public enum NormalizeOption Yes } - [BestFriend] - internal sealed class TrainCommand : DataCommand.ImplBase + public sealed class TrainCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { @@ -66,9 +64,6 @@ public sealed class Arguments : DataCommand.ArgumentsBase [Argument(ArgumentType.AtMostOnce, IsInputFileName = true, HelpText = "The validation data file", ShortName = "valid")] public string ValidationFile; - [Argument(ArgumentType.AtMostOnce, IsInputFileName = true, HelpText = "The test data file", ShortName = "test")] - public string TestFile; - [Argument(ArgumentType.LastOccurenceWins, HelpText = "Whether we should cache input training data", ShortName = "cache")] public bool? CacheData; @@ -177,34 +172,15 @@ private void RunCore(IChannel ch, string cmd) } } - // In addition to the training set, some trainers can accept two extra data sets, validation set and test set, - // in training phase. The major difference between validation set and test set is that training process may - // indirectly use validation set to improve the model but the learned model should totally independent of test set. - // Similar to validation set, the trainer can report the scores computed using test set. - RoleMappedData testDataUsedInTrainer = null; - if (!string.IsNullOrWhiteSpace(Args.TestFile)) - { - // In contrast to the if-else block for validation above, we do not throw a warning if test file is provided - // because this is TrainTest command. - if (trainer.Info.SupportsTest) - { - ch.Trace("Constructing the test pipeline"); - IDataView testPipeUsedInTrainer = CreateRawLoader(dataFile: Args.TestFile); - testPipeUsedInTrainer = ApplyTransformUtils.ApplyAllTransformsToData(Host, view, testPipeUsedInTrainer); - testDataUsedInTrainer = new RoleMappedData(testPipeUsedInTrainer, data.Schema.GetColumnRoleNames()); - } - } - var predictor = TrainUtils.Train(Host, ch, data, trainer, validData, - Args.Calibrator, Args.MaxCalibrationExamples, Args.CacheData, inputPredictor, testDataUsedInTrainer); + Args.Calibrator, Args.MaxCalibrationExamples, Args.CacheData, inputPredictor); using (var file = Host.CreateOutputFile(Args.OutputModelFile)) TrainUtils.SaveModel(Host, ch, file, predictor, data, cmd); } } - [BestFriend] - internal static class TrainUtils + public static class TrainUtils { public static void CheckTrainer(IExceptionContext ectx, IComponentFactory trainer, string dataFile) { @@ -248,13 +224,13 @@ public static IPredictor Train(IHostEnvironment env, IChannel ch, RoleMappedData } public static IPredictor Train(IHostEnvironment env, IChannel ch, RoleMappedData data, ITrainer trainer, RoleMappedData validData, - IComponentFactory calibrator, int maxCalibrationExamples, bool? cacheData, IPredictor inputPredictor = null, RoleMappedData testData = null) + IComponentFactory calibrator, int maxCalibrationExamples, bool? cacheData, IPredictor inputPredictor = null) { - return TrainCore(env, ch, data, trainer, validData, calibrator, maxCalibrationExamples, cacheData, inputPredictor, testData); + return TrainCore(env, ch, data, trainer, validData, calibrator, maxCalibrationExamples, cacheData, inputPredictor); } private static IPredictor TrainCore(IHostEnvironment env, IChannel ch, RoleMappedData data, ITrainer trainer, RoleMappedData validData, - IComponentFactory calibrator, int maxCalibrationExamples, bool? cacheData, IPredictor inputPredictor = null, RoleMappedData testData = null) + IComponentFactory calibrator, int maxCalibrationExamples, bool? cacheData, IPredictor inputPredictor = null) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(ch, nameof(ch)); @@ -275,7 +251,7 @@ private static IPredictor TrainCore(IHostEnvironment env, IChannel ch, RoleMappe inputPredictor = null; } ch.Assert(validData == null || trainer.Info.SupportsValidation); - var predictor = trainer.Train(new TrainContext(data, validData, testData, inputPredictor)); + var predictor = trainer.Train(new TrainContext(data, validData, inputPredictor)); var caliTrainer = calibrator?.CreateComponent(env); return CalibratorUtils.TrainCalibratorIfNeeded(env, ch, caliTrainer, maxCalibrationExamples, trainer, predictor, data); } diff --git a/src/Microsoft.ML.Data/Commands/TrainTestCommand.cs b/src/Microsoft.ML.Data/Commands/TrainTestCommand.cs index 49f25375f5..ebc349e8a5 100644 --- a/src/Microsoft.ML.Data/Commands/TrainTestCommand.cs +++ b/src/Microsoft.ML.Data/Commands/TrainTestCommand.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System.Collections.Generic; -using System.IO; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Command; using Microsoft.ML.Runtime.CommandLine; @@ -17,8 +16,7 @@ namespace Microsoft.ML.Runtime.Data { - [BestFriend] - internal sealed class TrainTestCommand : DataCommand.ImplBase + public sealed class TrainTestCommand : DataCommand.ImplBase { public sealed class Arguments : DataCommand.ArgumentsBase { @@ -164,34 +162,15 @@ private void RunCore(IChannel ch, string cmd) } } - // In addition to the training set, some trainers can accept two data sets, validation set and test set, - // in training phase. The major difference between validation set and test set is that training process may - // indirectly use validation set to improve the model but the learned model should totally independent of test set. - // Similar to validation set, the trainer can report the scores computed using test set. - RoleMappedData testDataUsedInTrainer = null; - if (!string.IsNullOrWhiteSpace(Args.TestFile)) - { - // In contrast to the if-else block for validation above, we do not throw a warning if test file is provided - // because this is TrainTest command. - if (trainer.Info.SupportsTest) - { - ch.Trace("Constructing the test pipeline"); - IDataView testPipeUsedInTrainer = CreateRawLoader(dataFile: Args.TestFile); - testPipeUsedInTrainer = ApplyTransformUtils.ApplyAllTransformsToData(Host, trainPipe, testPipeUsedInTrainer); - testDataUsedInTrainer = new RoleMappedData(testPipeUsedInTrainer, data.Schema.GetColumnRoleNames()); - } - } - var predictor = TrainUtils.Train(Host, ch, data, trainer, validData, - Args.Calibrator, Args.MaxCalibrationExamples, Args.CacheData, inputPredictor, testDataUsedInTrainer); + Args.Calibrator, Args.MaxCalibrationExamples, Args.CacheData, inputPredictor); IDataLoader testPipe; - bool hasOutfile = !string.IsNullOrEmpty(Args.OutputModelFile); - var tempFilePath = hasOutfile ? null : Path.GetTempFileName(); - - using (var file = new SimpleFileHandle(ch, hasOutfile ? Args.OutputModelFile : tempFilePath, true, !hasOutfile)) + using (var file = !string.IsNullOrEmpty(Args.OutputModelFile) ? + Host.CreateOutputFile(Args.OutputModelFile) : Host.CreateTempFile(".zip")) { TrainUtils.SaveModel(Host, ch, file, predictor, data, cmd); + ch.Trace("Constructing the testing pipeline"); using (var stream = file.OpenReadStream()) using (var rep = RepositoryReader.Open(stream, ch)) diff --git a/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs b/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs index e9db784f1f..79c3295017 100644 --- a/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs +++ b/src/Microsoft.ML.Data/Commands/TypeInfoCommand.cs @@ -17,7 +17,7 @@ namespace Microsoft.ML.Data.Commands { - internal sealed class TypeInfoCommand : ICommand + public sealed class TypeInfoCommand : ICommand { internal const string LoadName = "TypeInfo"; internal const string Summary = "Displays information about the standard primitive " + diff --git a/src/Microsoft.ML.Data/Data/BufferBuilder.cs b/src/Microsoft.ML.Data/Data/BufferBuilder.cs index 2f37f4ea81..5020ae0418 100644 --- a/src/Microsoft.ML.Data/Data/BufferBuilder.cs +++ b/src/Microsoft.ML.Data/Data/BufferBuilder.cs @@ -382,6 +382,45 @@ public bool TryGetFeature(int index, out T v) return false; } + private void GetResult(ref T[] values, ref int[] indices, out int count, out int length) + { + if (_count == 0) + { + count = 0; + length = _length; + return; + } + + if (!_dense) + { + if (!_sorted) + SortAndSumDups(); + if (!_dense && _count >= _length / 2) + MakeDense(); + } + + if (_dense) + { + if (Utils.Size(values) < _length) + values = new T[_length]; + Array.Copy(_values, values, _length); + count = _length; + length = _length; + } + else + { + Contracts.Assert(_count < _length); + if (Utils.Size(values) < _count) + values = new T[_count]; + if (Utils.Size(indices) < _count) + indices = new int[_count]; + Array.Copy(_values, values, _count); + Array.Copy(_indices, indices, _count); + count = _count; + length = _length; + } + } + public void Reset(int length, bool dense) { ResetImpl(length, dense); @@ -392,11 +431,11 @@ public void AddFeatures(int index, in VBuffer buffer) { Contracts.Check(0 <= index && index <= _length - buffer.Length); - var values = buffer.GetValues(); - int count = values.Length; + int count = buffer.Count; if (count == 0) return; + var values = buffer.Values; if (buffer.IsDense) { Contracts.Assert(count == buffer.Length); @@ -415,7 +454,7 @@ public void AddFeatures(int index, in VBuffer buffer) else { // REVIEW: Validate indices! - var indices = buffer.GetIndices(); + var indices = buffer.Indices; if (_dense) { for (int i = 0; i < count; i++) @@ -432,34 +471,24 @@ public void AddFeatures(int index, in VBuffer buffer) public void GetResult(ref VBuffer buffer) { + var values = buffer.Values; + var indices = buffer.Indices; + if (IsEmpty) { - VBufferUtils.Resize(ref buffer, _length, 0); + buffer = new VBuffer(_length, 0, values, indices); return; } - if (!_dense) - { - if (!_sorted) - SortAndSumDups(); - if (!_dense && _count >= _length / 2) - MakeDense(); - } + int count; + int length; + GetResult(ref values, ref indices, out count, out length); + Contracts.Assert(0 <= count && count <= length); - if (_dense) - { - var editor = VBufferEditor.Create(ref buffer, _length); - _values.AsSpan(0, _length).CopyTo(editor.Values); - buffer = editor.Commit(); - } + if (count == length) + buffer = new VBuffer(length, values, indices); else - { - Contracts.Assert(_count < _length); - var editor = VBufferEditor.Create(ref buffer, _length, _count); - _values.AsSpan(0, _count).CopyTo(editor.Values); - _indices.AsSpan(0, _count).CopyTo(editor.Indices); - buffer = editor.Commit(); - } + buffer = new VBuffer(length, count, values, indices); } } } diff --git a/src/Microsoft.ML.Data/Data/DataViewUtils.cs b/src/Microsoft.ML.Data/Data/DataViewUtils.cs index b6ebaef135..0e33390c7e 100644 --- a/src/Microsoft.ML.Data/Data/DataViewUtils.cs +++ b/src/Microsoft.ML.Data/Data/DataViewUtils.cs @@ -77,7 +77,7 @@ public static string[] GetTempColumnNames(this ISchema schema, int n, string tag /// public static long ComputeRowCount(IDataView view) { - long? countNullable = view.GetRowCount(); + long? countNullable = view.GetRowCount(lazy: false); if (countNullable != null) return countNullable.Value; long count = 0; diff --git a/src/Microsoft.ML.Data/Data/IColumn.cs b/src/Microsoft.ML.Data/Data/IColumn.cs index 14638081d8..948d056677 100644 --- a/src/Microsoft.ML.Data/Data/IColumn.cs +++ b/src/Microsoft.ML.Data/Data/IColumn.cs @@ -274,7 +274,7 @@ public ValueGetter GetGetter() /// /// The base class for a few implementations that do not "go" anywhere. /// - private abstract class DefaultCounted : ICounted + public abstract class DefaultCounted : ICounted { public long Position => 0; public long Batch => 0; @@ -331,7 +331,7 @@ public ValueGetter GetGetter() /// column as an . This class will cease to be necessary at the point when all /// metadata implementations are just simple s. /// - public sealed class MetadataRow : IRow + public sealed class MetadataRow : DefaultCounted, IRow { public Schema Schema => _schemaImpl.AsSchema; @@ -341,14 +341,6 @@ public sealed class MetadataRow : IRow private readonly KeyValuePair[] _map; - long ICounted.Position => 0; - long ICounted.Batch => 0; - ValueGetter ICounted.GetIdGetter() - => IdGetter; - - private static void IdGetter(ref UInt128 id) - => id = default; - private sealed class SchemaImpl : ISchema { private readonly MetadataRow _parent; diff --git a/src/Microsoft.ML.Data/Data/RowCursorUtils.cs b/src/Microsoft.ML.Data/Data/RowCursorUtils.cs index 77bd656392..e26e61fff6 100644 --- a/src/Microsoft.ML.Data/Data/RowCursorUtils.cs +++ b/src/Microsoft.ML.Data/Data/RowCursorUtils.cs @@ -267,23 +267,29 @@ private static ValueGetter> GetVecGetterAsCore(VectorT if (size > 0) Contracts.Check(src.Length == size); + var values = dst.Values; + var indices = dst.Indices; var srcValues = src.GetValues(); int count = srcValues.Length; - var editor = VBufferEditor.Create(ref dst, src.Length, count); if (count > 0) { + if (Utils.Size(values) < count) + values = new TDst[count]; + // REVIEW: This would be faster if there were loops for each std conversion. // Consider adding those to the Conversions class. for (int i = 0; i < count; i++) - conv(in srcValues[i], ref editor.Values[i]); + conv(in srcValues[i], ref values[i]); if (!src.IsDense) { var srcIndices = src.GetIndices(); - srcIndices.CopyTo(editor.Indices); + if (Utils.Size(indices) < count) + indices = new int[count]; + srcIndices.CopyTo(indices); } } - dst = editor.Commit(); + dst = new VBuffer(src.Length, count, values, indices); }; } @@ -441,15 +447,16 @@ public static ValueGetter> GetLabelGetter(ISlotCursor cursor) getSrc(ref src); // Unfortunately defaults in one to not translate to defaults of the other, // so this will not be sparsity preserving. Assume a dense output. - var editor = VBufferEditor.Create(ref dst, src.Length); + Single[] vals = dst.Values; + Utils.EnsureSize(ref vals, src.Length); foreach (var kv in src.Items(all: true)) { if (0 < kv.Value && kv.Value <= keyMax) - editor.Values[kv.Key] = kv.Value - 1; + vals[kv.Key] = kv.Value - 1; else - editor.Values[kv.Key] = Single.NaN; + vals[kv.Key] = Single.NaN; } - dst = editor.Commit(); + dst = new VBuffer(src.Length, vals, dst.Indices); }; } @@ -534,7 +541,7 @@ public IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolidator, Fun return new IRowCursor[] { GetRowCursor(needCol, rand) }; } - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { return 1; } diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoader.cs index 73dd62152b..39816d3f24 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoader.cs @@ -761,7 +761,7 @@ public void GetMetadata(string kind, int col, ref TValue value) private long RowCount { get { return _header.RowCount; } } - public long? GetRowCount() { return RowCount; } + public long? GetRowCount(bool lazy = true) { return RowCount; } public bool CanShuffle { get { return true; } } @@ -1192,7 +1192,7 @@ public void Dispose() private void CalculateShufflePoolRows(IChannel ch, out int poolRows) { - if (!RowShufflingTransformer.CanShuffleAll(Schema)) + if (!ShuffleTransform.CanShuffleAll(Schema)) { // This will only happen if we expand the set of types we can serialize, // without expanding the set of types we can cache. That is entirely @@ -1241,7 +1241,7 @@ private IRowCursor GetRowCursorCore(Func predicate, IRandom rand = nu // the entire dataset in memory anyway. var ourRand = _randomShufflePoolRows == _header.RowCount ? null : rand; var cursor = new Cursor(this, predicate, ourRand); - return RowShufflingTransformer.GetShuffledCursor(_host, _randomShufflePoolRows, cursor, rand); + return ShuffleTransform.GetShuffledCursor(_host, _randomShufflePoolRows, cursor, rand); } return new Cursor(this, predicate, rand); } @@ -2137,7 +2137,7 @@ public override ValueGetter GetIdGetter() } } - internal sealed class InfoCommand : ICommand + public sealed class InfoCommand : ICommand { public const string LoadName = "IdvInfo"; diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoaderSaverCatalog.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoaderSaverCatalog.cs deleted file mode 100644 index d697112719..0000000000 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/BinaryLoaderSaverCatalog.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.IO; -using Microsoft.ML.Runtime; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Data.IO; - -namespace Microsoft.ML -{ - public static class BinaryLoaderSaverCatalog - { - /// - /// Read a data view from a Stream on a binary file using . - /// - /// The catalog. - /// The stream to read from. - public static IDataView ReadFromBinary(this DataOperations catalog, Stream stream) - { - Contracts.CheckValue(stream, nameof(stream)); - - var env = catalog.GetEnvironment(); - - var reader = new BinaryLoader(env, new BinaryLoader.Arguments(), stream); - return reader; - } - - /// - /// Read a data view from a binary file using . - /// - /// The catalog. - /// The path to the file to read from. - public static IDataView ReadFromBinary(this DataOperations catalog, string path) - { - Contracts.CheckNonEmpty(path, nameof(path)); - - var env = catalog.GetEnvironment(); - - var reader = new BinaryLoader(env, new BinaryLoader.Arguments(), path); - return reader; - } - - /// - /// Save the data view into a binary stream. - /// - /// The catalog. - /// The data view to save. - /// The stream to write to. - /// Whether to keep hidden columns in the dataset. - public static void SaveAsBinary(this DataOperations catalog, IDataView data, Stream stream, - bool keepHidden = false) - { - Contracts.CheckValue(catalog, nameof(catalog)); - Contracts.CheckValue(data, nameof(data)); - Contracts.CheckValue(stream, nameof(stream)); - - var env = catalog.GetEnvironment(); - var saver = new BinarySaver(env, new BinarySaver.Arguments()); - - using (var ch = env.Start("Saving data")) - DataSaverUtils.SaveDataView(ch, saver, data, stream, keepHidden); - } - } -} diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/Codecs.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/Codecs.cs index 29fa46c1a0..792ec4f9f3 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/Codecs.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/Codecs.cs @@ -1109,29 +1109,29 @@ public override void Get(ref VBuffer value) int length = FixedLength ? _size : _lengths[_vectorIndex]; int count = _counts[_vectorIndex]; + int[] indices = value.Indices; + T[] values = value.Values; if (count < 0) { // dense - var editor = VBufferEditor.Create(ref value, length); if (length > 0) { - _values.AsSpan(_valuesOffset, length) - .CopyTo(editor.Values); + Utils.EnsureSize(ref values, length); + Array.Copy(_values, _valuesOffset, values, 0, length); } - value = editor.Commit(); + value = new VBuffer(length, values, indices); } else { // sparse - var editor = VBufferEditor.Create(ref value, length, count); if (count > 0) { - _values.AsSpan(_valuesOffset, count) - .CopyTo(editor.Values); - _indices.AsSpan(_indicesOffset, count) - .CopyTo(editor.Indices); + Utils.EnsureSize(ref values, count); + Utils.EnsureSize(ref indices, count); + Array.Copy(_values, _valuesOffset, values, 0, count); + Array.Copy(_indices, _indicesOffset, indices, 0, count); } - value = editor.Commit(); + value = new VBuffer(length, count, values, indices); } } } diff --git a/src/Microsoft.ML.Data/DataLoadSave/Binary/Zlib/Zlib.cs b/src/Microsoft.ML.Data/DataLoadSave/Binary/Zlib/Zlib.cs index 7b2ae812a8..024eaef4a2 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Binary/Zlib/Zlib.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Binary/Zlib/Zlib.cs @@ -12,7 +12,6 @@ internal static class Zlib { public const string DllPath = "zlib.dll"; -#pragma warning disable IDE1006 [DllImport(DllPath), SuppressUnmanagedCodeSecurity] private static extern unsafe Constants.RetCode deflateInit2_(ZStream* strm, int level, int method, int windowBits, int memLevel, Constants.Strategy strategy, byte* version, int streamSize); @@ -45,7 +44,6 @@ public static unsafe Constants.RetCode InflateInit2(ZStream* strm, int windowBit [DllImport(DllPath), SuppressUnmanagedCodeSecurity] public static extern unsafe Constants.RetCode inflateEnd(ZStream* strm); -#pragma warning restore IDE1006 } [StructLayout(LayoutKind.Sequential)] diff --git a/src/Microsoft.ML.Data/DataLoadSave/CompositeDataLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/CompositeDataLoader.cs index 7206745e03..0009ad4768 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/CompositeDataLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/CompositeDataLoader.cs @@ -557,9 +557,9 @@ private static string GenerateTag(int index) return string.Format("xf{0:00}", index); } - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { - return View.GetRowCount(); + return View.GetRowCount(lazy); } public bool CanShuffle => View.CanShuffle; diff --git a/src/Microsoft.ML.Data/DataLoadSave/DataLoadSaveCatalog.cs b/src/Microsoft.ML.Data/DataLoadSave/DataLoadSaveCatalog.cs new file mode 100644 index 0000000000..5adfc1ad60 --- /dev/null +++ b/src/Microsoft.ML.Data/DataLoadSave/DataLoadSaveCatalog.cs @@ -0,0 +1,20 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.ML.Runtime +{ + /// + /// A catalog of operations to load and save data. + /// + public sealed class DataLoadSaveOperations + { + internal IHostEnvironment Environment { get; } + + internal DataLoadSaveOperations(IHostEnvironment env) + { + Contracts.AssertValue(env); + Environment = env; + } + } +} diff --git a/src/Microsoft.ML.Data/DataLoadSave/DataOperations.cs b/src/Microsoft.ML.Data/DataLoadSave/DataOperations.cs deleted file mode 100644 index cc0998da03..0000000000 --- a/src/Microsoft.ML.Data/DataLoadSave/DataOperations.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Internal.Utilities; -using Microsoft.ML.Transforms; - -namespace Microsoft.ML.Runtime -{ - /// - /// A catalog of operations over data that are not transformers or estimators. - /// This includes data readers, saving, caching, filtering etc. - /// - public sealed class DataOperations - { - internal IHostEnvironment Environment { get; } - - internal DataOperations(IHostEnvironment env) - { - Contracts.AssertValue(env); - Environment = env; - } - - /// - /// Creates a lazy in-memory cache of . - /// Caching happens per-column. A column is only cached when it is first accessed. - /// In addition, are considered 'always needed', so all of them - /// will be cached whenever any data is requested. - /// - /// The data view to cache. - /// The columns that must be cached whenever anything is cached. Empty array or null - /// is acceptable, it means that all columns are only cached at the first access. - public IDataView Cache(IDataView input, params string[] columnsToPrefetch) - { - Environment.CheckValue(input, nameof(input)); - Environment.CheckValueOrNull(columnsToPrefetch); - - int[] prefetch = new int[Utils.Size(columnsToPrefetch)]; - for (int i = 0; i < prefetch.Length; i++) - { - if (!input.Schema.TryGetColumnIndex(columnsToPrefetch[i], out prefetch[i])) - throw Environment.ExceptSchemaMismatch(nameof(columnsToPrefetch), "prefetch", columnsToPrefetch[i]); - } - return new CacheDataView(Environment, input, prefetch); - } - - /// - /// Keep only those rows that satisfy the range condition: the value of column - /// must be between and , inclusive. - /// - /// The input data. - /// The name of a column to use for filtering. - /// The inclusive lower bound. - /// The exclusive upper bound. - public IDataView FilterByColumn(IDataView input, string columnName, double lowerBound = double.NegativeInfinity, double upperBound = double.PositiveInfinity) - { - Environment.CheckValue(input, nameof(input)); - Environment.CheckNonEmpty(columnName, nameof(columnName)); - Environment.CheckParam(lowerBound <= upperBound, nameof(upperBound), "Must be no less than lowerBound"); - - var type = input.Schema[columnName].Type; - if (!type.IsNumber) - throw Environment.ExceptSchemaMismatch(nameof(columnName), "filter", columnName, "number", type.ToString()); - return new RangeFilter(Environment, input, columnName, lowerBound, upperBound, false); - } - - /// - /// Keep only those rows that satisfy the range condition: the value of a key column - /// (treated as a fraction of the entire key range) must be between and , inclusive. - /// This filtering is useful if the is a key column obtained by some 'stable randomization' - /// (for example, hashing). - /// - /// The input data. - /// The name of a column to use for filtering. - /// The inclusive lower bound. - /// The exclusive upper bound. - public IDataView FilterByKeyColumnFraction(IDataView input, string columnName, double lowerBound = 0, double upperBound = 1) - { - Environment.CheckValue(input, nameof(input)); - Environment.CheckNonEmpty(columnName, nameof(columnName)); - Environment.CheckParam(0 <= lowerBound && lowerBound <= 1, nameof(lowerBound), "Must be in [0, 1]"); - Environment.CheckParam(0 <= upperBound && upperBound <= 2, nameof(upperBound), "Must be in [0, 2]"); - Environment.CheckParam(lowerBound <= upperBound, nameof(upperBound), "Must be no less than lowerBound"); - - var type = input.Schema[columnName].Type; - if (type.KeyCount == 0) - throw Environment.ExceptSchemaMismatch(nameof(columnName), "filter", columnName, "a known cardinality key", type.ToString()); - return new RangeFilter(Environment, input, columnName, lowerBound, upperBound, false); - } - } -} diff --git a/src/Microsoft.ML.Data/DataLoadSave/EstimatorChain.cs b/src/Microsoft.ML.Data/DataLoadSave/EstimatorChain.cs index 7d20d22761..30331a2ea7 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/EstimatorChain.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/EstimatorChain.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Core.Data; -using Microsoft.ML.Data; using Microsoft.ML.Runtime.Internal.Utilities; using System.Linq; @@ -16,30 +15,20 @@ namespace Microsoft.ML.Runtime.Data public sealed class EstimatorChain : IEstimator> where TLastTransformer : class, ITransformer { - // Host is not null iff there is any 'true' values in _needCacheAfter (in this case, we need to create an instance of - // CacheDataView. - private readonly IHost _host; private readonly TransformerScope[] _scopes; private readonly IEstimator[] _estimators; - private readonly bool[] _needCacheAfter; public readonly IEstimator LastEstimator; - private EstimatorChain(IHostEnvironment env, IEstimator[] estimators, TransformerScope[] scopes, bool[] needCacheAfter) + private EstimatorChain(IEstimator[] estimators, TransformerScope[] scopes) { - Contracts.AssertValueOrNull(env); Contracts.AssertValueOrNull(estimators); Contracts.AssertValueOrNull(scopes); - Contracts.AssertValueOrNull(needCacheAfter); Contracts.Assert(Utils.Size(estimators) == Utils.Size(scopes)); - Contracts.Assert(Utils.Size(estimators) == Utils.Size(needCacheAfter)); - _host = env?.Register(nameof(EstimatorChain)); _estimators = estimators ?? new IEstimator[0]; _scopes = scopes ?? new TransformerScope[0]; LastEstimator = estimators.LastOrDefault() as IEstimator; - _needCacheAfter = needCacheAfter ?? new bool[0]; - Contracts.Assert((_host != null) == _needCacheAfter.Any(x => x)); Contracts.Assert((_estimators.Length > 0) == (LastEstimator != null)); } @@ -48,17 +37,16 @@ private EstimatorChain(IHostEnvironment env, IEstimator[] estimato /// public EstimatorChain() { - _host = null; _estimators = new IEstimator[0]; _scopes = new TransformerScope[0]; - _needCacheAfter = new bool[0]; LastEstimator = null; } public TransformerChain Fit(IDataView input) { - // Before fitting, run schema propagation. - GetOutputSchema(SchemaShape.Create(input.Schema)); + // REVIEW: before fitting, run schema propagation. + // Currently, it throws. + // GetOutputSchema(SchemaShape.Create(input.Schema); IDataView current = input; var xfs = new ITransformer[_estimators.Length]; @@ -67,11 +55,6 @@ public TransformerChain Fit(IDataView input) var est = _estimators[i]; xfs[i] = est.Fit(current); current = xfs[i].Transform(current); - if (_needCacheAfter[i] && i < _estimators.Length - 1) - { - Contracts.AssertValue(_host); - current = new CacheDataView(_host, current, null); - } } return new TransformerChain(xfs, _scopes); @@ -89,27 +72,7 @@ public EstimatorChain Append(IEstimator estimat where TNewTrans : class, ITransformer { Contracts.CheckValue(estimator, nameof(estimator)); - return new EstimatorChain(_host, _estimators.AppendElement(estimator), _scopes.AppendElement(scope), _needCacheAfter.AppendElement(false)); - } - - /// - /// Append a 'caching checkpoint' to the estimator chain. This will ensure that the downstream estimators will be trained against - /// cached data. It is helpful to have a caching checkpoint before trainers that take multiple data passes. - /// - /// The host environment to use for caching. - public EstimatorChain AppendCacheCheckpoint(IHostEnvironment env) - { - Contracts.CheckValue(env, nameof(env)); - - if (_estimators.Length == 0 || _needCacheAfter.Last()) - { - // If there are no estimators, or if we already need to cache after this, we don't need to do anything else. - return this; - } - - bool[] newNeedCache = _needCacheAfter.ToArray(); - newNeedCache[newNeedCache.Length - 1] = true; - return new EstimatorChain(env, _estimators, _scopes, newNeedCache); + return new EstimatorChain(_estimators.AppendElement(estimator), _scopes.AppendElement(scope)); } } } diff --git a/src/Microsoft.ML.Data/DataLoadSave/EstimatorExtensions.cs b/src/Microsoft.ML.Data/DataLoadSave/EstimatorExtensions.cs index 2d0c5eced4..5bf90bb221 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/EstimatorExtensions.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/EstimatorExtensions.cs @@ -50,26 +50,9 @@ public static EstimatorChain Append( Contracts.CheckValue(start, nameof(start)); Contracts.CheckValue(estimator, nameof(estimator)); - if (start is EstimatorChain est) - return est.Append(estimator, scope); - return new EstimatorChain().Append(start).Append(estimator, scope); } - /// - /// Append a 'caching checkpoint' to the estimator chain. This will ensure that the downstream estimators will be trained against - /// cached data. It is helpful to have a caching checkpoint before trainers that take multiple data passes. - /// - /// The starting estimator - /// The host environment to use for caching. - - public static EstimatorChain AppendCacheCheckpoint(this IEstimator start, IHostEnvironment env) - where TTrans : class, ITransformer - { - Contracts.CheckValue(start, nameof(start)); - return new EstimatorChain().Append(start).AppendCacheCheckpoint(env); - } - /// /// Create a new composite reader, by appending a transformer to this data reader. /// diff --git a/src/Microsoft.ML.Data/DataLoadSave/PartitionedFileLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/PartitionedFileLoader.cs index eb2fd269e7..5998cd0f22 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/PartitionedFileLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/PartitionedFileLoader.cs @@ -287,7 +287,7 @@ public void Save(ModelSaveContext ctx) public Schema Schema { get; } - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { return null; } diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs index a808374573..282b3feea3 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoader.cs @@ -1352,7 +1352,7 @@ public BoundLoader(TextLoader reader, IMultiStreamSource files) _files = files; } - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { // We don't know how many rows there are. // REVIEW: Should we try to support RowCount? diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs index cdcb507f51..130f158d4e 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderParser.cs @@ -401,22 +401,28 @@ public void Get(ref VBuffer dst) { AssertValid(); + var values = dst.Values; + var indices = dst.Indices; + if (_count == 0) { - VBufferUtils.Resize(ref dst, _size, 0); + dst = new VBuffer(_size, 0, values, indices); return; } - var editor = VBufferEditor.Create(ref dst, _size, _count); - _values.AsSpan(0, _count).CopyTo(editor.Values); + if (Utils.Size(values) < _count) + values = new TItem[_count]; + Array.Copy(_values, values, _count); if (_count == _size) { - dst = editor.Commit(); + dst = new VBuffer(_size, values, indices); return; } - _indices.AsSpan(0, _count).CopyTo(editor.Indices); - dst = editor.Commit(); + if (Utils.Size(indices) < _count) + indices = new int[_count]; + Array.Copy(_indices, indices, _count); + dst = new VBuffer(_size, _count, values, indices); } } diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderSaverCatalog.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderSaverCatalog.cs index e5de3573ee..ef95a7a7de 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderSaverCatalog.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextLoaderSaverCatalog.cs @@ -24,7 +24,7 @@ public static class TextLoaderSaverCatalog /// The catalog. /// The arguments to text reader, describing the data schema. /// The optional location of a data sample. - public static TextLoader TextReader(this DataOperations catalog, + public static TextLoader TextReader(this DataLoadSaveOperations catalog, TextLoader.Arguments args, IMultiStreamSource dataSample = null) => new TextLoader(CatalogUtils.GetEnvironment(catalog), args, dataSample); @@ -35,7 +35,7 @@ public static TextLoader TextReader(this DataOperations catalog, /// The columns of the schema. /// The delegate to set additional settings. /// The optional location of a data sample. - public static TextLoader TextReader(this DataOperations catalog, + public static TextLoader TextReader(this DataLoadSaveOperations catalog, TextLoader.Column[] columns, Action advancedSettings = null, IMultiStreamSource dataSample = null) => new TextLoader(CatalogUtils.GetEnvironment(catalog), columns, advancedSettings, dataSample); @@ -47,7 +47,7 @@ public static TextLoader TextReader(this DataOperations catalog, /// The delegate to set additional settings /// The path to the file /// The data view. - public static IDataView ReadFromTextFile(this DataOperations catalog, + public static IDataView ReadFromTextFile(this DataLoadSaveOperations catalog, TextLoader.Column[] columns, string path, Action advancedSettings = null) { Contracts.CheckNonEmpty(path, nameof(path)); @@ -70,7 +70,7 @@ public static IDataView ReadFromTextFile(this DataOperations catalog, /// Whether to write the header row. /// Whether to write the header comment with the schema. /// Whether to keep hidden columns in the dataset. - public static void SaveAsText(this DataOperations catalog, IDataView data, Stream stream, + public static void SaveAsText(this DataLoadSaveOperations catalog, IDataView data, Stream stream, char separator = '\t', bool headerRow = true, bool schema = true, bool keepHidden = false) { Contracts.CheckValue(catalog, nameof(catalog)); diff --git a/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs b/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs index 9474605079..db84057b79 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Text/TextSaver.cs @@ -166,22 +166,20 @@ public VecValueWriter(IRowCursor cursor, VectorType type, int source, char sep) public override void WriteData(Action appendItem, out int length) { _getSrc(ref _src); - var srcValues = _src.GetValues(); if (_src.IsDense) { - for (int i = 0; i < srcValues.Length; i++) + for (int i = 0; i < _src.Length; i++) { - Conv(in srcValues[i], ref Sb); + Conv(in _src.Values[i], ref Sb); appendItem(Sb, i); } } else { - var srcIndices = _src.GetIndices(); - for (int i = 0; i < srcValues.Length; i++) + for (int i = 0; i < _src.Count; i++) { - Conv(in srcValues[i], ref Sb); - appendItem(Sb, srcIndices[i]); + Conv(in _src.Values[i], ref Sb); + appendItem(Sb, _src.Indices[i]); } } length = _src.Length; @@ -190,18 +188,15 @@ public override void WriteData(Action appendItem, out int le public override void WriteHeader(Action appendItem, out int length) { length = _slotCount; - var slotNamesValues = _slotNames.GetValues(); - if (slotNamesValues.Length == 0) + if (_slotNames.Count == 0) return; - - var slotNamesIndices = _slotNames.GetIndices(); - for (int i = 0; i < slotNamesValues.Length; i++) + for (int i = 0; i < _slotNames.Count; i++) { - var name = slotNamesValues[i]; + var name = _slotNames.Values[i]; if (name.IsEmpty) continue; MapText(in name, ref Sb); - int index = _slotNames.IsDense ? i : slotNamesIndices[i]; + int index = _slotNames.IsDense ? i : _slotNames.Indices[i]; appendItem(Sb, index); } } @@ -425,7 +420,7 @@ private void WriteDataCore(IChannel ch, TextWriter writer, IDataView data, if (_outputSchema) WriteSchemaAsComment(writer, header); - double rowCount = data.GetRowCount() ?? double.NaN; + double rowCount = data.GetRowCount(true) ?? double.NaN; using (var pch = !_silent ? _host.StartProgressChannel("TextSaver: saving data") : null) { long stateCount = 0; diff --git a/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeLoader.cs b/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeLoader.cs index b12f3ad1e7..de1964c27b 100644 --- a/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeLoader.cs +++ b/src/Microsoft.ML.Data/DataLoadSave/Transpose/TransposeLoader.cs @@ -662,7 +662,7 @@ public VectorType GetSlotType(int col) } } - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { return _header.RowCount; } diff --git a/src/Microsoft.ML.Data/DataView/AppendRowsDataView.cs b/src/Microsoft.ML.Data/DataView/AppendRowsDataView.cs index 89f863ca18..4ea44a6957 100644 --- a/src/Microsoft.ML.Data/DataView/AppendRowsDataView.cs +++ b/src/Microsoft.ML.Data/DataView/AppendRowsDataView.cs @@ -91,7 +91,7 @@ private AppendRowsDataView(IHostEnvironment env, Schema schema, IDataView[] sour _counts = null; break; } - long? count = dv.GetRowCount(); + long? count = dv.GetRowCount(true); if (count == null || count < 0 || count > int.MaxValue) { _canShuffle = false; @@ -127,12 +127,12 @@ private void CheckSchemaConsistency() } } - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { long sum = 0; foreach (var source in _sources) { - var cur = source.GetRowCount(); + var cur = source.GetRowCount(lazy); if (cur == null) return null; _host.Check(cur.Value >= 0, "One of the sources returned a negative row count"); diff --git a/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs b/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs index ef6c06d9ad..b7f9b494e9 100644 --- a/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs +++ b/src/Microsoft.ML.Data/DataView/ArrayDataViewBuilder.cs @@ -197,7 +197,7 @@ private sealed class DataView : IDataView public Schema Schema { get { return _schema; } } - public long? GetRowCount() { return _rowCount; } + public long? GetRowCount(bool lazy = true) { return _rowCount; } public bool CanShuffle { get { return true; } } diff --git a/src/Microsoft.ML.Data/DataView/CacheDataView.cs b/src/Microsoft.ML.Data/DataView/CacheDataView.cs index 3674ec40ca..5db0021c60 100644 --- a/src/Microsoft.ML.Data/DataView/CacheDataView.cs +++ b/src/Microsoft.ML.Data/DataView/CacheDataView.cs @@ -4,17 +4,16 @@ #pragma warning disable 420 // volatile with Interlocked.CompareExchange -using Microsoft.ML.Runtime; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Internal.Utilities; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; +using System.Reflection; using System.Runtime.CompilerServices; using System.Threading; +using Microsoft.ML.Runtime.Internal.Utilities; -namespace Microsoft.ML.Data +namespace Microsoft.ML.Runtime.Data { /// /// This is a dataview that wraps another dataview, and does on-demand caching of the @@ -193,13 +192,18 @@ public int MapInputToCacheColumnIndex(int inputIndex) public Schema Schema => _subsetInput.Schema; - /// - /// Return the number of rows if available. - /// - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { if (_rowCount < 0) - return null; + { + if (lazy) + return null; + if (_cacheDefaultWaiter == null) + KickoffFiller(new int[0]); + _host.Assert(_cacheDefaultWaiter != null); + _cacheDefaultWaiter.Wait(long.MaxValue); + _host.Assert(_rowCount >= 0); + } return _rowCount; } @@ -312,7 +316,7 @@ public IRowSeeker GetSeeker(Func predicate) _host.CheckValue(predicate, nameof(predicate)); // The seeker needs to know the row count when it validates the row index to move to. // Calling GetRowCount here to force a wait indirectly so that _rowCount will have a valid value. - GetRowCount(); + GetRowCount(false); _host.Assert(_rowCount >= 0); var waiter = WaiterWaiter.Create(this, predicate); if (waiter.IsTrivial) @@ -1471,13 +1475,19 @@ public override void Fetch(int idx, ref VBuffer value) Ctx.Assert(valueCount <= len); Ctx.Assert(valueCount == len || indexCount == valueCount); - var editor = VBufferEditor.Create(ref value, len, valueCount); - _values.CopyTo(_valueBoundaries[idx], editor.Values, valueCount); + T[] values = value.Values; + Utils.EnsureSize(ref values, valueCount); + _values.CopyTo(_valueBoundaries[idx], values, valueCount); + int[] indices = value.Indices; if (valueCount < len) - _indices.CopyTo(_indexBoundaries[idx], editor.Indices, indexCount); - - value = editor.Commit(); + { + Utils.EnsureSize(ref indices, indexCount); + _indices.CopyTo(_indexBoundaries[idx], indices, indexCount); + value = new VBuffer(len, indexCount, values, indices); + } + else + value = new VBuffer(len, values, indices); } public override void Freeze() diff --git a/src/Microsoft.ML.Data/DataView/CompositeSchema.cs b/src/Microsoft.ML.Data/DataView/CompositeSchema.cs index d61289b55c..2a526f152a 100644 --- a/src/Microsoft.ML.Data/DataView/CompositeSchema.cs +++ b/src/Microsoft.ML.Data/DataView/CompositeSchema.cs @@ -67,7 +67,7 @@ public void CheckColumnInRange(int col) public void GetColumnSource(int col, out int srcIndex, out int srcCol) { CheckColumnInRange(col); - if (!Utils.TryFindIndexSorted(_cumulativeColCounts, 0, _cumulativeColCounts.Length, col, out srcIndex)) + if (!_cumulativeColCounts.TryFindIndexSorted(0, _cumulativeColCounts.Length, col, out srcIndex)) srcIndex--; Contracts.Assert(0 <= srcIndex && srcIndex < _cumulativeColCounts.Length); srcCol = col - _cumulativeColCounts[srcIndex]; diff --git a/src/Microsoft.ML.Data/DataView/EmptyDataView.cs b/src/Microsoft.ML.Data/DataView/EmptyDataView.cs index 8c6f385f88..543ac42952 100644 --- a/src/Microsoft.ML.Data/DataView/EmptyDataView.cs +++ b/src/Microsoft.ML.Data/DataView/EmptyDataView.cs @@ -25,7 +25,7 @@ public EmptyDataView(IHostEnvironment env, Schema schema) Schema = schema; } - public long? GetRowCount() => 0; + public long? GetRowCount(bool lazy = true) => 0; public IRowCursor GetRowCursor(Func needCol, IRandom rand = null) { diff --git a/src/Microsoft.ML.Data/DataView/OpaqueDataView.cs b/src/Microsoft.ML.Data/DataView/OpaqueDataView.cs index cc8b08a87a..44d8d0dcad 100644 --- a/src/Microsoft.ML.Data/DataView/OpaqueDataView.cs +++ b/src/Microsoft.ML.Data/DataView/OpaqueDataView.cs @@ -21,9 +21,9 @@ public OpaqueDataView(IDataView source) _source = source; } - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { - return _source.GetRowCount(); + return _source.GetRowCount(lazy); } public IRowCursor GetRowCursor(Func predicate, IRandom rand = null) diff --git a/src/Microsoft.ML.Data/DataView/RowToRowMapperTransform.cs b/src/Microsoft.ML.Data/DataView/RowToRowMapperTransform.cs index 308c08ba24..e968348618 100644 --- a/src/Microsoft.ML.Data/DataView/RowToRowMapperTransform.cs +++ b/src/Microsoft.ML.Data/DataView/RowToRowMapperTransform.cs @@ -76,9 +76,9 @@ private static VersionInfo GetVersionInfo() public override Schema Schema => _bindings.Schema; - bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => _mapper is ICanSaveOnnx onnxMapper ? onnxMapper.CanSaveOnnx(ctx) : false; + public bool CanSaveOnnx(OnnxContext ctx) => _mapper is ICanSaveOnnx onnxMapper ? onnxMapper.CanSaveOnnx(ctx) : false; - bool ICanSavePfa.CanSavePfa => _mapper is ICanSavePfa pfaMapper ? pfaMapper.CanSavePfa : false; + public bool CanSavePfa => _mapper is ICanSavePfa pfaMapper ? pfaMapper.CanSavePfa : false; public RowToRowMapperTransform(IHostEnvironment env, IDataView input, IRowMapper mapper, Func mapperFactory) : base(env, RegistrationName, input) @@ -205,7 +205,7 @@ public override IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolid return cursors; } - void ISaveAsOnnx.SaveAsOnnx(OnnxContext ctx) + public void SaveAsOnnx(OnnxContext ctx) { Host.CheckValue(ctx, nameof(ctx)); if (_mapper is ISaveAsOnnx onnx) @@ -215,7 +215,7 @@ void ISaveAsOnnx.SaveAsOnnx(OnnxContext ctx) } } - void ISaveAsPfa.SaveAsPfa(BoundPfaContext ctx) + public void SaveAsPfa(BoundPfaContext ctx) { Host.CheckValue(ctx, nameof(ctx)); if (_mapper is ISaveAsPfa pfa) diff --git a/src/Microsoft.ML.Data/DataView/Transposer.cs b/src/Microsoft.ML.Data/DataView/Transposer.cs index df0d772a07..5424f5a04b 100644 --- a/src/Microsoft.ML.Data/DataView/Transposer.cs +++ b/src/Microsoft.ML.Data/DataView/Transposer.cs @@ -274,7 +274,7 @@ public IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolidator, Fun return _view.GetRowCursorSet(out consolidator, predicate, n, rand); } - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { // Not a passthrough. return RowCount; @@ -504,25 +504,8 @@ private sealed class SlotCursorVec : SlotCursor private T[][] _values; // Working intermediate value buffers. private int[] _counts; // Working intermediate count buffers. - private struct ColumnBufferStorage - { - // The transposed contents of _colStored. - public VBuffer Buffer; - - // These two arrays are the "cached" arrays inside of the Buffer - // to be swapped between the _cbuff and _values/_indices. - public readonly T[] Values; - public readonly int[] Indices; - - public ColumnBufferStorage(VBuffer buffer, T[] values, int[] indices) - { - Buffer = buffer; - Values = values; - Indices = indices; - } - } - - private ColumnBufferStorage[] _cbuff; // Working intermediate column-wise buffer. + // The transposed contents of _colStored. + private VBuffer[] _cbuff; // Working intermediate column-wise buffer. // Variables to track current cursor position. private int _colStored; // The current column of the source data view actually stored in the intermediate buffers. @@ -721,24 +704,20 @@ private void EnsureValid() Utils.EnsureSize(ref _cbuff, vecLen); for (int s = 0; s < vecLen; ++s) { - int count = _counts[s]; - T[] values = _values[s]; - int[] indices = _indices[s]; - var temp = new VBuffer(_len, count, values, indices); - if (count < _len / 2) + var temp = new VBuffer(_len, _counts[s], _values[s], _indices[s]); + if (temp.Count < _len / 2) { // Already sparse enough, I guess. Swap out the arrays. - ColumnBufferStorage existingBuffer = _cbuff[s]; - _cbuff[s] = new ColumnBufferStorage(temp, values, indices); - _indices[s] = existingBuffer.Indices ?? new int[_len]; - _values[s] = existingBuffer.Values ?? new T[_len]; + Utils.Swap(ref temp, ref _cbuff[s]); + _indices[s] = temp.Indices ?? new int[_len]; + _values[s] = temp.Values ?? new T[_len]; Ch.Assert(_indices[s].Length == _len); Ch.Assert(_values[s].Length == _len); } else { // Not dense enough. Densify temp into _cbuff[s]. Don't swap the arrays. - temp.CopyToDense(ref _cbuff[s].Buffer); + temp.CopyToDense(ref _cbuff[s]); } } _colStored = _colCurr; @@ -761,8 +740,8 @@ private void Getter(ref VBuffer dst) { Ch.Check(IsGood, "Cannot get values in the cursor's current state"); EnsureValid(); - Ch.Assert(0 <= _slotCurr && _slotCurr < Utils.Size(_cbuff) && _cbuff[_slotCurr].Buffer.Length == _len); - _cbuff[_slotCurr].Buffer.CopyTo(ref dst); + Ch.Assert(0 <= _slotCurr && _slotCurr < Utils.Size(_cbuff) && _cbuff[_slotCurr].Length == _len); + _cbuff[_slotCurr].CopyTo(ref dst); } protected override ValueGetter> GetGetterCore() @@ -839,9 +818,9 @@ public DataViewSlicer(IHost host, IDataView input, int[] toSlice) _schema = new SchemaImpl(this, nameToCol); } - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { - return _input.GetRowCount(); + return _input.GetRowCount(lazy); } /// @@ -1294,12 +1273,12 @@ private ValueGetter> CreateGetter(int col) (ref VBuffer value) => { EnsureValid(); - VBufferEditor editor; + var values = value.Values; if (_inputValue.IsDense) { - editor = VBufferEditor.Create(ref value, len); - _inputValue.GetValues().Slice(min, len).CopyTo(editor.Values); - value = editor.Commit(); + Utils.EnsureSize(ref values, len); + Array.Copy(_inputValue.Values, min, values, 0, len); + value = new VBuffer(len, values, value.Indices); return; } // In the sparse case we have ranges on Indices/Values to consider. @@ -1308,24 +1287,20 @@ private ValueGetter> CreateGetter(int col) int scount = slim - smin; if (scount == 0) { - VBufferUtils.Resize(ref value, len, 0); + value = new VBuffer(len, 0, value.Values, value.Indices); return; } - - editor = VBufferEditor.Create(ref value, len, scount); - bool isDense = len == scount; - if (!isDense) + var indices = value.Indices; + Utils.EnsureSize(ref indices, scount); + Utils.EnsureSize(ref values, scount); + Array.Copy(_inputValue.Indices, smin, indices, 0, scount); + if (min != 0) { - _inputValue.GetIndices().Slice(smin, scount).CopyTo(editor.Indices); - - if (min != 0) - { - for (int i = 0; i < scount; ++i) - editor.Indices[i] -= min; - } + for (int i = 0; i < scount; ++i) + indices[i] -= min; } - _inputValue.GetValues().Slice(smin, scount).CopyTo(editor.Values); - value = editor.Commit(); + Array.Copy(_inputValue.Values, smin, values, 0, scount); + value = new VBuffer(len, scount, values, indices); }; } @@ -1339,14 +1314,15 @@ private void EnsureValid() // and end of each slice. if (_inputValue.IsDense) return; - var indices = _inputValue.GetIndices(); - if (indices.Length == 0) + if (_inputValue.Count == 0) { // Handle this separately, since _inputValue.Indices might be null // in this case, and then we may as well short circuit it anyway. Array.Clear(_srcIndicesLims, 0, _srcIndicesLims.Length); return; } + var indices = _inputValue.Indices; + Contracts.AssertValue(indices); int ii = 0; for (int i = 0; i < Lims.Length; ++i) @@ -1355,7 +1331,7 @@ private void EnsureValid() // REVIEW: Would some form of bisection search be better // than this scan? Possibly if the search were to happen across // all lims at the same time, somehow. - while (ii < indices.Length && indices[ii] < lim) + while (ii < _inputValue.Count && indices[ii] < lim) ii++; _srcIndicesLims[i] = ii; } @@ -1527,7 +1503,7 @@ public SlotDataView(IHostEnvironment env, ITransposeDataView data, int col) _schemaImpl = new SchemaImpl(this); } - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { var type = _data.Schema.GetColumnType(_col); int valueCount = type.ValueCount; diff --git a/src/Microsoft.ML.Data/DataView/ZipDataView.cs b/src/Microsoft.ML.Data/DataView/ZipDataView.cs index 5489491b3f..b87efd9195 100644 --- a/src/Microsoft.ML.Data/DataView/ZipDataView.cs +++ b/src/Microsoft.ML.Data/DataView/ZipDataView.cs @@ -54,12 +54,12 @@ private ZipDataView(IHost host, IDataView[] sources) public Schema Schema => _compositeSchema.AsSchema; - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { long min = -1; foreach (var source in _sources) { - var cur = source.GetRowCount(); + var cur = source.GetRowCount(lazy); if (cur == null) return null; _host.Check(cur.Value >= 0, "One of the sources returned a negative row count"); diff --git a/src/Microsoft.ML.Data/Depricated/Instances/HeaderSchema.cs b/src/Microsoft.ML.Data/Depricated/Instances/HeaderSchema.cs index 293d7db3b4..8631462504 100644 --- a/src/Microsoft.ML.Data/Depricated/Instances/HeaderSchema.cs +++ b/src/Microsoft.ML.Data/Depricated/Instances/HeaderSchema.cs @@ -98,16 +98,20 @@ private void GetSlotNames(int col, ref VBuffer> dst) indexList.Add(kvp.Key); } - Contracts.Assert(nameList.Count == indexList.Count); - - var editor = VBufferEditor.Create(ref dst, _collection.Count, nameList.Count); - nameList.CopyTo(editor.Values); + var vals = dst.Values; + if (Utils.Size(vals) < nameList.Count) + vals = new ReadOnlyMemory[nameList.Count]; + Array.Copy(nameList.ToArray(), vals, nameList.Count); if (nameList.Count < _collection.Count) { - indexList.CopyTo(editor.Indices); + var indices = dst.Indices; + if (Utils.Size(indices) < indexList.Count) + indices = new int[indexList.Count]; + Array.Copy(indexList.ToArray(), indices, indexList.Count); + dst = new VBuffer>(_collection.Count, nameList.Count, vals, indices); } - - dst = editor.Commit(); + else + dst = new VBuffer>(_collection.Count, vals, dst.Indices); } } diff --git a/src/Microsoft.ML.Data/Depricated/Vector/GenericSpanSortHelper.cs b/src/Microsoft.ML.Data/Depricated/Vector/GenericSpanSortHelper.cs deleted file mode 100644 index f94993e419..0000000000 --- a/src/Microsoft.ML.Data/Depricated/Vector/GenericSpanSortHelper.cs +++ /dev/null @@ -1,269 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -* Purpose: class to sort Spans -* -* Taken from https://github.com/dotnet/coreclr/blob/480defd204b58fae05b692937295c6533673d3a2/src/System.Private.CoreLib/shared/System/Collections/Generic/ArraySortHelper.cs#L871-L1112 -* and changed to support Span instead of arrays. -* -* Code changes from coreclr: -* 1. Name changed from GenericArraySortHelper => GenericSpanSortHelper -* 2. Changed Array usages to Span -* 3. Change Sort method to static -* 4. Changed single-line, multi-variable declarations to be multi-line. -* 5. Contracts.Assert => Contracts.Assert -* -*This can be removed once https://github.com/dotnet/corefx/issues/15329 is fixed. -===========================================================*/ - -using System; - -namespace Microsoft.ML.Runtime.Numeric -{ - internal static class IntrospectiveSortUtilities - { - // This is the threshold where Introspective sort switches to Insertion sort. - // Empirically, 16 seems to speed up most cases without slowing down others, at least for integers. - // Large value types may benefit from a smaller number. - internal const int IntrosortSizeThreshold = 16; - - internal static int FloorLog2PlusOne(int n) - { - int result = 0; - while (n >= 1) - { - result++; - n = n / 2; - } - return result; - } - } - - internal partial class GenericSpanSortHelper - where TKey : IComparable - { - public static void Sort(Span keys, Span values, int index, int length) - { - Contracts.Assert(keys != null, "Check the arguments in the caller!"); - Contracts.Assert(index >= 0 && length >= 0 && (keys.Length - index >= length), "Check the arguments in the caller!"); - - IntrospectiveSort(keys, values, index, length); - } - - private static void SwapIfGreaterWithItems(Span keys, Span values, int a, int b) - { - if (a != b) - { - if (keys[a] != null && keys[a].CompareTo(keys[b]) > 0) - { - TKey key = keys[a]; - keys[a] = keys[b]; - keys[b] = key; - - TValue value = values[a]; - values[a] = values[b]; - values[b] = value; - } - } - } - - private static void Swap(Span keys, Span values, int i, int j) - { - if (i != j) - { - TKey k = keys[i]; - keys[i] = keys[j]; - keys[j] = k; - - TValue v = values[i]; - values[i] = values[j]; - values[j] = v; - } - } - - internal static void IntrospectiveSort(Span keys, Span values, int left, int length) - { - Contracts.Assert(keys != null); - Contracts.Assert(values != null); - Contracts.Assert(left >= 0); - Contracts.Assert(length >= 0); - Contracts.Assert(length <= keys.Length); - Contracts.Assert(length + left <= keys.Length); - Contracts.Assert(length + left <= values.Length); - - if (length < 2) - return; - - IntroSort(keys, values, left, length + left - 1, 2 * IntrospectiveSortUtilities.FloorLog2PlusOne(length)); - } - - private static void IntroSort(Span keys, Span values, int lo, int hi, int depthLimit) - { - Contracts.Assert(keys != null); - Contracts.Assert(values != null); - Contracts.Assert(lo >= 0); - Contracts.Assert(hi < keys.Length); - - while (hi > lo) - { - int partitionSize = hi - lo + 1; - if (partitionSize <= IntrospectiveSortUtilities.IntrosortSizeThreshold) - { - if (partitionSize == 1) - { - return; - } - if (partitionSize == 2) - { - SwapIfGreaterWithItems(keys, values, lo, hi); - return; - } - if (partitionSize == 3) - { - SwapIfGreaterWithItems(keys, values, lo, hi - 1); - SwapIfGreaterWithItems(keys, values, lo, hi); - SwapIfGreaterWithItems(keys, values, hi - 1, hi); - return; - } - - InsertionSort(keys, values, lo, hi); - return; - } - - if (depthLimit == 0) - { - Heapsort(keys, values, lo, hi); - return; - } - depthLimit--; - - int p = PickPivotAndPartition(keys, values, lo, hi); - // Note we've already partitioned around the pivot and do not have to move the pivot again. - IntroSort(keys, values, p + 1, hi, depthLimit); - hi = p - 1; - } - } - - private static int PickPivotAndPartition(Span keys, Span values, int lo, int hi) - { - Contracts.Assert(keys != null); - Contracts.Assert(values != null); - Contracts.Assert(lo >= 0); - Contracts.Assert(hi > lo); - Contracts.Assert(hi < keys.Length); - - // Compute median-of-three. But also partition them, since we've done the comparison. - int middle = lo + ((hi - lo) / 2); - - // Sort lo, mid and hi appropriately, then pick mid as the pivot. - SwapIfGreaterWithItems(keys, values, lo, middle); // swap the low with the mid point - SwapIfGreaterWithItems(keys, values, lo, hi); // swap the low with the high - SwapIfGreaterWithItems(keys, values, middle, hi); // swap the middle with the high - - TKey pivot = keys[middle]; - Swap(keys, values, middle, hi - 1); - int left = lo; - int right = hi - 1; // We already partitioned lo and hi and put the pivot in hi - 1. And we pre-increment & decrement below. - - while (left < right) - { - if (pivot == null) - { - while (left < (hi - 1) && keys[++left] == null) ; - while (right > lo && keys[--right] != null) ; - } - else - { - while (pivot.CompareTo(keys[++left]) > 0) ; - while (pivot.CompareTo(keys[--right]) < 0) ; - } - - if (left >= right) - break; - - Swap(keys, values, left, right); - } - - // Put pivot in the right location. - Swap(keys, values, left, (hi - 1)); - return left; - } - - private static void Heapsort(Span keys, Span values, int lo, int hi) - { - Contracts.Assert(keys != null); - Contracts.Assert(values != null); - Contracts.Assert(lo >= 0); - Contracts.Assert(hi > lo); - Contracts.Assert(hi < keys.Length); - - int n = hi - lo + 1; - for (int i = n / 2; i >= 1; i = i - 1) - { - DownHeap(keys, values, i, n, lo); - } - for (int i = n; i > 1; i = i - 1) - { - Swap(keys, values, lo, lo + i - 1); - DownHeap(keys, values, 1, i - 1, lo); - } - } - - private static void DownHeap(Span keys, Span values, int i, int n, int lo) - { - Contracts.Assert(keys != null); - Contracts.Assert(lo >= 0); - Contracts.Assert(lo < keys.Length); - - TKey d = keys[lo + i - 1]; - TValue dValue = values[lo + i - 1]; - int child; - while (i <= n / 2) - { - child = 2 * i; - if (child < n && (keys[lo + child - 1] == null || keys[lo + child - 1].CompareTo(keys[lo + child]) < 0)) - { - child++; - } - if (keys[lo + child - 1] == null || keys[lo + child - 1].CompareTo(d) < 0) - break; - keys[lo + i - 1] = keys[lo + child - 1]; - values[lo + i - 1] = values[lo + child - 1]; - i = child; - } - keys[lo + i - 1] = d; - values[lo + i - 1] = dValue; - } - - private static void InsertionSort(Span keys, Span values, int lo, int hi) - { - Contracts.Assert(keys != null); - Contracts.Assert(values != null); - Contracts.Assert(lo >= 0); - Contracts.Assert(hi >= lo); - Contracts.Assert(hi <= keys.Length); - - int i; - int j; - TKey t; - TValue tValue; - for (i = lo; i < hi; i++) - { - j = i; - t = keys[i + 1]; - tValue = values[i + 1]; - while (j >= lo && (t == null || t.CompareTo(keys[j]) < 0)) - { - keys[j + 1] = keys[j]; - values[j + 1] = values[j]; - j--; - } - keys[j + 1] = t; - values[j + 1] = tValue; - } - } - } - -} diff --git a/src/Microsoft.ML.Data/Depricated/Vector/VBufferMathUtils.cs b/src/Microsoft.ML.Data/Depricated/Vector/VBufferMathUtils.cs index 9be89b4f83..1438cce601 100644 --- a/src/Microsoft.ML.Data/Depricated/Vector/VBufferMathUtils.cs +++ b/src/Microsoft.ML.Data/Depricated/Vector/VBufferMathUtils.cs @@ -20,18 +20,17 @@ public static partial class VectorUtils /// public static Float NormSquared(in VBuffer a) { - var aValues = a.GetValues(); - if (aValues.Length == 0) + if (a.Count == 0) return 0; - return CpuMathUtils.SumSq(aValues); + return CpuMathUtils.SumSq(a.Values.AsSpan(0, a.Count)); } /// /// Returns the L2 norm squared of the vector (sum of squares of the components). /// - public static Float NormSquared(ReadOnlySpan a) + public static Float NormSquared(Float[] a, int offset, int count) { - return CpuMathUtils.SumSq(a); + return CpuMathUtils.SumSq(a.AsSpan(offset, count)); } /// @@ -49,10 +48,9 @@ public static Float Norm(in VBuffer a) /// L1 norm of the vector public static Float L1Norm(in VBuffer a) { - var aValues = a.GetValues(); - if (aValues.Length == 0) + if (a.Count == 0) return 0; - return CpuMathUtils.SumAbs(aValues); + return CpuMathUtils.SumAbs(a.Values.AsSpan(0, a.Count)); } /// @@ -61,10 +59,9 @@ public static Float L1Norm(in VBuffer a) /// L-infinity norm of the vector public static Float MaxNorm(in VBuffer a) { - var aValues = a.GetValues(); - if (aValues.Length == 0) + if (a.Count == 0) return 0; - return CpuMathUtils.MaxAbs(aValues); + return CpuMathUtils.MaxAbs(a.Values.AsSpan(0, a.Count)); } /// @@ -72,10 +69,9 @@ public static Float MaxNorm(in VBuffer a) /// public static Float Sum(in VBuffer a) { - var aValues = a.GetValues(); - if (aValues.Length == 0) + if (a.Count == 0) return 0; - return CpuMathUtils.Sum(aValues); + return CpuMathUtils.Sum(a.Values.AsSpan(0, a.Count)); } /// @@ -85,13 +81,12 @@ public static Float Sum(in VBuffer a) /// Value to multiply vector with public static void ScaleBy(ref VBuffer dst, Float c) { - if (c == 1 || dst.GetValues().Length == 0) + if (c == 1 || dst.Count == 0) return; - var editor = VBufferEditor.CreateFromBuffer(ref dst); if (c != 0) - CpuMathUtils.Scale(c, editor.Values); + CpuMathUtils.Scale(c, dst.Values.AsSpan(0, dst.Count)); else // Maintain density of dst. - editor.Values.Clear(); + Array.Clear(dst.Values, 0, dst.Count); // REVIEW: Any benefit in sparsifying? } @@ -102,36 +97,35 @@ public static void ScaleBy(ref VBuffer dst, Float c) public static void ScaleBy(in VBuffer src, ref VBuffer dst, Float c) { int length = src.Length; - var srcValues = src.GetValues(); - int count = srcValues.Length; + int count = src.Count; if (count == 0) { // dst is a zero vector. - VBufferUtils.Resize(ref dst, length, 0); + dst = new VBuffer(length, 0, dst.Values, dst.Indices); return; } + var dstValues = Utils.Size(dst.Values) >= count ? dst.Values : new Float[count]; if (src.IsDense) { // Maintain the density of src to dst in order to avoid slow down of L-BFGS. - var editor = VBufferEditor.Create(ref dst, length); Contracts.Assert(length == count); if (c == 0) - editor.Values.Clear(); + Array.Clear(dstValues, 0, length); else - CpuMathUtils.Scale(c, srcValues, editor.Values, length); - dst = editor.Commit(); + CpuMathUtils.Scale(c, src.Values, dstValues, length); + dst = new VBuffer(length, dstValues, dst.Indices); } else { - var editor = VBufferEditor.Create(ref dst, length, count); - src.GetIndices().CopyTo(editor.Indices); + var dstIndices = Utils.Size(dst.Indices) >= count ? dst.Indices : new int[count]; + Array.Copy(src.Indices, dstIndices, count); if (c == 0) - editor.Values.Clear(); + Array.Clear(dstValues, 0, count); else - CpuMathUtils.Scale(c, srcValues, editor.Values, count); - dst = editor.Commit(); + CpuMathUtils.Scale(c, src.Values, dstValues, count); + dst = new VBuffer(length, count, dstValues, dstIndices); } } @@ -142,17 +136,15 @@ public static void Add(in VBuffer src, ref VBuffer dst) { Contracts.Check(src.Length == dst.Length, "Vectors must have the same dimensionality."); - var srcValues = src.GetValues(); - if (srcValues.Length == 0) + if (src.Count == 0) return; if (dst.IsDense) { - var editor = VBufferEditor.Create(ref dst, dst.Length); if (src.IsDense) - CpuMathUtils.Add(srcValues, editor.Values, src.Length); + CpuMathUtils.Add(src.Values, dst.Values, src.Length); else - CpuMathUtils.Add(srcValues, src.GetIndices(), editor.Values, srcValues.Length); + CpuMathUtils.Add(src.Values, src.Indices, dst.Values, src.Count); return; } // REVIEW: Should we use SSE for any of these possibilities? @@ -170,17 +162,15 @@ public static void AddMult(in VBuffer src, Float c, ref VBuffer ds { Contracts.Check(src.Length == dst.Length, "Vectors must have the same dimensionality."); - var srcValues = src.GetValues(); - if (srcValues.Length == 0 || c == 0) + if (src.Count == 0 || c == 0) return; if (dst.IsDense) { - var editor = VBufferEditor.Create(ref dst, dst.Length); if (src.IsDense) - CpuMathUtils.AddScale(c, srcValues, editor.Values, src.Length); + CpuMathUtils.AddScale(c, src.Values, dst.Values, src.Length); else - CpuMathUtils.AddScale(c, srcValues, src.GetIndices(), editor.Values, srcValues.Length); + CpuMathUtils.AddScale(c, src.Values, src.Indices, dst.Values, src.Count); return; } // REVIEW: Should we use SSE for any of these possibilities? @@ -196,8 +186,7 @@ public static void AddMult(in VBuffer src, Float c, ref VBuffer ds Contracts.Check(src.Length == dst.Length, "Vectors must have the same dimensionality."); int length = src.Length; - var srcValues = src.GetValues(); - if (srcValues.Length == 0 || c == 0) + if (src.Count == 0 || c == 0) { // src is zero vector, res = dst dst.CopyTo(ref res); @@ -207,9 +196,9 @@ public static void AddMult(in VBuffer src, Float c, ref VBuffer ds Contracts.Assert(length > 0); if (dst.IsDense && src.IsDense) { - var editor = VBufferEditor.Create(ref res, length); - CpuMathUtils.AddScaleCopy(c, srcValues, dst.GetValues(), editor.Values, length); - res = editor.Commit(); + Float[] resValues = Utils.Size(res.Values) >= length ? res.Values : new Float[length]; + CpuMathUtils.AddScaleCopy(c, src.Values, dst.Values, resValues, length); + res = new VBuffer(length, resValues, res.Indices); return; } @@ -225,9 +214,9 @@ public static void AddMultInto(in VBuffer a, Float c, in VBuffer b { Contracts.Check(a.Length == b.Length, "Vectors must have the same dimensionality."); - if (c == 0 || b.GetValues().Length == 0) + if (c == 0 || b.Count == 0) a.CopyTo(ref dst); - else if (a.GetValues().Length == 0) + else if (a.Count == 0) ScaleInto(in b, c, ref dst); else VBufferUtils.ApplyInto(in a, in b, ref dst, (ind, v1, v2) => v1 + c * v2); @@ -244,20 +233,15 @@ public static void AddMultWithOffset(in VBuffer src, Float c, ref VBuffer Contracts.CheckParam(0 <= offset && offset <= dst.Length, nameof(offset)); Contracts.CheckParam(src.Length <= dst.Length - offset, nameof(offset)); - var srcValues = src.GetValues(); - if (srcValues.Length == 0 || c == 0) + if (src.Count == 0 || c == 0) return; - VBufferEditor editor; - Span values; if (dst.IsDense) { // This is by far the most common case. - editor = VBufferEditor.Create(ref dst, dst.Length); - values = editor.Values.Slice(offset); if (src.IsDense) - CpuMathUtils.AddScale(c, srcValues, values, srcValues.Length); + CpuMathUtils.AddScale(c, src.Values, dst.Values.AsSpan(offset), src.Count); else - CpuMathUtils.AddScale(c, srcValues, src.GetIndices(), values, srcValues.Length); + CpuMathUtils.AddScale(c, src.Values, src.Indices, dst.Values.AsSpan(offset), src.Count); return; } // REVIEW: Perhaps implementing an ApplyInto with an offset would be more @@ -266,9 +250,8 @@ public static void AddMultWithOffset(in VBuffer src, Float c, ref VBuffer // dst is sparse. I expect this will see limited practical use, since accumulants // are often better off going into a dense vector in all applications of interest to us. // Correspondingly, this implementation will be functional, but not optimized. - var dstIndices = dst.GetIndices(); - int dMin = dstIndices.Length == 0 ? 0 : dstIndices.FindIndexSorted(0, dstIndices.Length, offset); - int dLim = dstIndices.Length == 0 ? 0 : dstIndices.FindIndexSorted(dMin, dstIndices.Length, offset + src.Length); + int dMin = dst.Count == 0 ? 0 : Utils.FindIndexSorted(dst.Indices, 0, dst.Count, offset); + int dLim = dst.Count == 0 ? 0 : Utils.FindIndexSorted(dst.Indices, dMin, dst.Count, offset + src.Length); Contracts.Assert(dMin - dLim <= src.Length); // First get the number of extra values that we will need to accomodate. int gapCount; @@ -276,11 +259,10 @@ public static void AddMultWithOffset(in VBuffer src, Float c, ref VBuffer gapCount = src.Length - (dLim - dMin); else { - gapCount = srcValues.Length; - var srcIndices = src.GetIndices(); - for (int iS = 0, iD = dMin; iS < srcIndices.Length && iD < dLim; ) + gapCount = src.Count; + for (int iS = 0, iD = dMin; iS < src.Count && iD < dLim; ) { - var comp = srcIndices[iS] - dstIndices[iD] + offset; + var comp = src.Indices[iS] - dst.Indices[iD] + offset; if (comp < 0) // dst index is larger. iS++; else if (comp > 0) // src index is larger. @@ -294,23 +276,18 @@ public static void AddMultWithOffset(in VBuffer src, Float c, ref VBuffer } } // Extend dst so that it has room for this additional stuff. Shift things over as well. - var dstValues = dst.GetValues(); - editor = VBufferEditor.Create(ref dst, - dst.Length, - dstValues.Length + gapCount, - keepOldOnResize: true); - var indices = editor.Indices; - values = editor.Values; + var indices = dst.Indices; + var values = dst.Values; if (gapCount > 0) { + Utils.EnsureSize(ref indices, dst.Count + gapCount, dst.Length); + Utils.EnsureSize(ref values, dst.Count + gapCount, dst.Length); // Shift things over, unless there's nothing to shift over, or no new elements are being introduced anyway. - if (dstValues.Length != dLim) + if (dst.Count != dLim) { - Contracts.Assert(dLim < dstValues.Length); - indices.Slice(dLim, dstValues.Length - dLim) - .CopyTo(indices.Slice(dLim + gapCount)); - values.Slice(dLim, dstValues.Length - dLim) - .CopyTo(values.Slice(dLim + gapCount)); + Contracts.Assert(dLim < dst.Count); + Array.Copy(indices, dLim, indices, dLim + gapCount, dst.Count - dLim); + Array.Copy(values, dLim, values, dLim + gapCount, dst.Count - dLim); } } // Now, fill in the stuff in this "gap." Both of these implementations work @@ -326,10 +303,10 @@ public static void AddMultWithOffset(in VBuffer src, Float c, ref VBuffer Contracts.Assert(iDD == iS + dMin); // iDD and iD are the points in where we are writing and reading from. Contracts.Assert(iDD >= iD); - if (iD >= 0 && offset + iS == dstIndices[iD]) // Collision. - values[iDD] = dstValues[iD--] + c * srcValues[iS]; + if (iD >= 0 && offset + iS == dst.Indices[iD]) // Collision. + values[iDD] = dst.Values[iD--] + c * src.Values[iS]; else // Miss. - values[iDD] = c * srcValues[iS]; + values[iDD] = c * src.Values[iS]; indices[iDD] = offset + iS; } } @@ -337,10 +314,9 @@ public static void AddMultWithOffset(in VBuffer src, Float c, ref VBuffer { // Both dst and src are sparse. int iD = dLim - 1; - var srcIndices = src.GetIndices(); - int iS = srcIndices.Length - 1; - int sIndex = iS < 0 ? -1 : srcIndices[iS]; - int dIndex = iD < 0 ? -1 : dstIndices[iD] - offset; + int iS = src.Count - 1; + int sIndex = iS < 0 ? -1 : src.Indices[iS]; + int dIndex = iD < 0 ? -1 : dst.Indices[iD] - offset; for (int iDD = dLim + gapCount; --iDD >= dMin; ) { @@ -348,26 +324,26 @@ public static void AddMultWithOffset(in VBuffer src, Float c, ref VBuffer int comp = sIndex - dIndex; if (comp == 0) // Collision on both. { - indices[iDD] = dstIndices[iD]; - values[iDD] = dstValues[iD--] + c * srcValues[iS--]; - sIndex = iS < 0 ? -1 : srcIndices[iS]; - dIndex = iD < 0 ? -1 : dstIndices[iD] - offset; + indices[iDD] = dst.Indices[iD]; + values[iDD] = dst.Values[iD--] + c * src.Values[iS--]; + sIndex = iS < 0 ? -1 : src.Indices[iS]; + dIndex = iD < 0 ? -1 : dst.Indices[iD] - offset; } else if (comp < 0) // Collision on dst. { - indices[iDD] = dstIndices[iD]; - values[iDD] = dstValues[iD--]; - dIndex = iD < 0 ? -1 : dstIndices[iD] - offset; + indices[iDD] = dst.Indices[iD]; + values[iDD] = dst.Values[iD--]; + dIndex = iD < 0 ? -1 : dst.Indices[iD] - offset; } else // Collision on src. { indices[iDD] = sIndex + offset; - values[iDD] = c * srcValues[iS--]; - sIndex = iS < 0 ? -1 : srcIndices[iS]; + values[iDD] = c * src.Values[iS--]; + sIndex = iS < 0 ? -1 : src.Indices[iS]; } } } - dst = editor.Commit(); + dst = new VBuffer(dst.Length, dst.Count + gapCount, values, indices); } /// @@ -385,20 +361,19 @@ public static void ScaleInto(in VBuffer src, Float c, ref VBuffer // equal lengths, but I assume I don't care here. if (c == 1) src.CopyTo(ref dst); - else if (src.GetValues().Length == 0 || c == 0) + else if (src.Count == 0 || c == 0) { if (src.Length > 0 && src.IsDense) { + var values = dst.Values; // Due to sparsity preservation from src, dst must be dense, in the same way. - var editor = VBufferEditor.Create(ref dst, src.Length); - if (!editor.CreatedNewValues) // We need to clear it. - editor.Values.Clear(); - dst = editor.Commit(); + Utils.EnsureSize(ref values, src.Length, src.Length, keepOld: false); + if (values == dst.Values) // We need to clear it. + Array.Clear(values, 0, src.Length); + dst = new VBuffer(src.Length, values, dst.Indices); } else - { - VBufferUtils.Resize(ref dst, src.Length, 0); - } + dst = new VBuffer(src.Length, 0, dst.Values, dst.Indices); } else if (c == -1) VBufferUtils.ApplyIntoEitherDefined(in src, ref dst, (i, v) => -v); @@ -410,35 +385,33 @@ public static int ArgMax(in VBuffer src) { if (src.Length == 0) return -1; - var srcValues = src.GetValues(); - if (srcValues.Length == 0) + if (src.Count == 0) return 0; - int ind = MathUtils.ArgMax(srcValues); + int ind = MathUtils.ArgMax(src.Values, src.Count); // ind < 0 iff all explicit values are NaN. - Contracts.Assert(-1 <= ind && ind < srcValues.Length); + Contracts.Assert(-1 <= ind && ind < src.Count); if (src.IsDense) return ind; - var srcIndices = src.GetIndices(); if (ind >= 0) { - Contracts.Assert(srcIndices[ind] >= ind); - if (srcValues[ind] > 0) - return srcIndices[ind]; + Contracts.Assert(src.Indices[ind] >= ind); + if (src.Values[ind] > 0) + return src.Indices[ind]; // This covers the case where there is an explicit zero, and zero is the max, // and the first explicit zero is before any implicit entries. - if (srcValues[ind] == 0 && srcIndices[ind] == ind) + if (src.Values[ind] == 0 && src.Indices[ind] == ind) return ind; } // All explicit values are non-positive or NaN, so return the first index not in src.Indices. ind = 0; - while (ind < srcIndices.Length && srcIndices[ind] == ind) + while (ind < src.Count && src.Indices[ind] == ind) ind++; - Contracts.Assert(ind <= srcIndices.Length); - Contracts.Assert(ind == srcIndices.Length || ind < srcIndices[ind]); + Contracts.Assert(ind <= src.Count); + Contracts.Assert(ind == src.Count || ind < src.Indices[ind]); return ind; } @@ -446,35 +419,33 @@ public static int ArgMin(in VBuffer src) { if (src.Length == 0) return -1; - var srcValues = src.GetValues(); - if (srcValues.Length == 0) + if (src.Count == 0) return 0; - int ind = MathUtils.ArgMin(srcValues); + int ind = MathUtils.ArgMin(src.Values, src.Count); // ind < 0 iff all explicit values are NaN. - Contracts.Assert(-1 <= ind && ind < srcValues.Length); + Contracts.Assert(-1 <= ind && ind < src.Count); if (src.IsDense) return ind; - var srcIndices = src.GetIndices(); if (ind >= 0) { - Contracts.Assert(srcIndices[ind] >= ind); - if (srcValues[ind] < 0) - return srcIndices[ind]; + Contracts.Assert(src.Indices[ind] >= ind); + if (src.Values[ind] < 0) + return src.Indices[ind]; // This covers the case where there is an explicit zero, and zero is the min, // and the first explicit zero is before any implicit entries. - if (srcValues[ind] == 0 && srcIndices[ind] == ind) + if (src.Values[ind] == 0 && src.Indices[ind] == ind) return ind; } - // All explicit values are non-negative or NaN, so return the first index not in srcIndices. + // All explicit values are non-negative or NaN, so return the first index not in src.Indices. ind = 0; - while (ind < srcIndices.Length && srcIndices[ind] == ind) + while (ind < src.Count && src.Indices[ind] == ind) ind++; - Contracts.Assert(ind <= srcIndices.Length); - Contracts.Assert(ind == srcIndices.Length || ind < srcIndices[ind]); + Contracts.Assert(ind <= src.Count); + Contracts.Assert(ind == src.Count || ind < src.Indices[ind]); return ind; } } diff --git a/src/Microsoft.ML.Data/Depricated/Vector/VectorUtils.cs b/src/Microsoft.ML.Data/Depricated/Vector/VectorUtils.cs index 58655063d2..79af700bcc 100644 --- a/src/Microsoft.ML.Data/Depricated/Vector/VectorUtils.cs +++ b/src/Microsoft.ML.Data/Depricated/Vector/VectorUtils.cs @@ -30,33 +30,30 @@ public static Float DotProduct(Float[] a, Float[] b) public static Float DotProduct(Float[] a, in VBuffer b) { Contracts.Check(Utils.Size(a) == b.Length, "Vectors must have the same dimensionality."); - var bValues = b.GetValues(); - if (bValues.Length == 0) + if (b.Count == 0) return 0; if (b.IsDense) - return CpuMathUtils.DotProductDense(a, bValues, b.Length); - return CpuMathUtils.DotProductSparse(a, bValues, b.GetIndices(), bValues.Length); + return CpuMathUtils.DotProductDense(a, b.Values, b.Length); + return CpuMathUtils.DotProductSparse(a, b.Values, b.Indices, b.Count); } public static Float DotProduct(in VBuffer a, in VBuffer b) { Contracts.Check(a.Length == b.Length, "Vectors must have the same dimensionality."); - var aValues = a.GetValues(); - var bValues = b.GetValues(); - if (aValues.Length == 0 || bValues.Length == 0) + if (a.Count == 0 || b.Count == 0) return 0; if (a.IsDense) { if (b.IsDense) - return CpuMathUtils.DotProductDense(aValues, bValues, a.Length); - return CpuMathUtils.DotProductSparse(aValues, bValues, b.GetIndices(), bValues.Length); + return CpuMathUtils.DotProductDense(a.Values, b.Values, a.Length); + return CpuMathUtils.DotProductSparse(a.Values, b.Values, b.Indices, b.Count); } if (b.IsDense) - return CpuMathUtils.DotProductSparse(bValues, aValues, a.GetIndices(), aValues.Length); - return DotProductSparse(aValues, a.GetIndices(), 0, aValues.Length, bValues, b.GetIndices(), 0, bValues.Length); + return CpuMathUtils.DotProductSparse(b.Values, a.Values, a.Indices, a.Count); + return DotProductSparse(a.Values, a.Indices, 0, a.Count, b.Values, b.Indices, 0, b.Count, 0); } /// @@ -78,12 +75,10 @@ public static void SparsifyNormalize(ref VBuffer a, int top, int bottom, var bottomHeap = new Heap>((left, right) => right.Value > left.Value, bottom + 1); bool isDense = a.IsDense; - var aValues = a.GetValues(); - var aIndices = a.GetIndices(); - for (int i = 0; i < aValues.Length; i++) + for (int i = 0; i < a.Count; i++) { - int idx = isDense ? i : aIndices[i]; - var value = aValues[i]; + int idx = isDense ? i : a.Indices[i]; + var value = a.Values[i]; if (value < 0 && bottom > 0) { @@ -113,20 +108,22 @@ public static void SparsifyNormalize(ref VBuffer a, int top, int bottom, } var newCount = topHeap.Count + bottomHeap.Count; - var aEditor = VBufferEditor.Create(ref a, a.Length, newCount, requireIndicesOnDense: true); + var indices = a.Indices; + Utils.EnsureSize(ref indices, newCount); + Contracts.Assert(Utils.Size(a.Values) >= newCount); int count = 0; while (topHeap.Count > 0) { var pair = topHeap.Pop(); - aEditor.Indices[count] = pair.Key; - aEditor.Values[count++] = pair.Value; + indices[count] = pair.Key; + a.Values[count++] = pair.Value; } while (bottomHeap.Count > 0) { var pair = bottomHeap.Pop(); - aEditor.Indices[count] = pair.Key; - aEditor.Values[count++] = pair.Value; + indices[count] = pair.Key; + a.Values[count++] = pair.Value; } Contracts.Assert(count == newCount); @@ -135,7 +132,7 @@ public static void SparsifyNormalize(ref VBuffer a, int top, int bottom, { for (var i = 0; i < newCount; i++) { - var value = aEditor.Values[i]; + var value = a.Values[i]; var absValue = Math.Abs(value); if (absValue > absMax) absMax = absValue; @@ -145,13 +142,13 @@ public static void SparsifyNormalize(ref VBuffer a, int top, int bottom, { var ratio = 1 / absMax; for (var i = 0; i < newCount; i++) - aEditor.Values[i] = ratio * aEditor.Values[i]; + a.Values[i] = ratio * a.Values[i]; } } - if (!aEditor.Indices.IsEmpty) - GenericSpanSortHelper.Sort(aEditor.Indices, aEditor.Values, 0, newCount); - a = aEditor.Commit(); + if (indices != null) + Array.Sort(indices, a.Values, 0, newCount); + a = new VBuffer(a.Length, newCount, a.Values, indices); } /// @@ -162,24 +159,27 @@ public static void MulElementWise(in VBuffer a, ref VBuffer dst) Contracts.Check(a.Length == dst.Length, "Vectors must have the same dimensionality."); if (a.IsDense && dst.IsDense) - { - var editor = VBufferEditor.CreateFromBuffer(ref dst); - CpuMathUtils.MulElementWise(a.GetValues(), dst.GetValues(), editor.Values, a.Length); - } + CpuMathUtils.MulElementWise(a.Values, dst.Values, dst.Values, a.Length); else VBufferUtils.ApplyWithEitherDefined(in a, ref dst, (int ind, Float v1, ref Float v2) => { v2 *= v1; }); } - private static Float L2DistSquaredSparse(ReadOnlySpan valuesA, ReadOnlySpan indicesA, ReadOnlySpan valuesB, ReadOnlySpan indicesB) + private static Float L2DistSquaredSparse(Float[] valuesA, int[] indicesA, int countA, Float[] valuesB, int[] indicesB, int countB, int length) { - Contracts.Assert(valuesA.Length == indicesA.Length); - Contracts.Assert(valuesB.Length == indicesB.Length); + Contracts.AssertValueOrNull(valuesA); + Contracts.AssertValueOrNull(indicesA); + Contracts.AssertValueOrNull(valuesB); + Contracts.AssertValueOrNull(indicesB); + Contracts.Assert(0 <= countA && countA <= Utils.Size(indicesA)); + Contracts.Assert(0 <= countB && countB <= Utils.Size(indicesB)); + Contracts.Assert(countA <= Utils.Size(valuesA)); + Contracts.Assert(countB <= Utils.Size(valuesB)); Float res = 0; int ia = 0; int ib = 0; - while (ia < indicesA.Length && ib < indicesB.Length) + while (ia < countA && ib < countB) { int diff = indicesA[ia] - indicesB[ib]; Float d; @@ -202,14 +202,14 @@ private static Float L2DistSquaredSparse(ReadOnlySpan valuesA, ReadOnlySp res += d * d; } - while (ia < indicesA.Length) + while (ia < countA) { var d = valuesA[ia]; res += d * d; ia++; } - while (ib < indicesB.Length) + while (ib < countB) { var d = valuesB[ib]; res += d * d; @@ -219,21 +219,30 @@ private static Float L2DistSquaredSparse(ReadOnlySpan valuesA, ReadOnlySp return res; } - private static Float L2DistSquaredHalfSparse(ReadOnlySpan valuesA, ReadOnlySpan valuesB, ReadOnlySpan indicesB) + private static Float L2DistSquaredHalfSparse(Float[] valuesA, int lengthA, Float[] valuesB, int[] indicesB, int countB) { - var normA = CpuMathUtils.SumSq(valuesA); - if (valuesB.Length == 0) + Contracts.AssertValueOrNull(valuesA); + Contracts.AssertValueOrNull(valuesB); + Contracts.AssertValueOrNull(indicesB); + Contracts.Assert(0 <= lengthA && lengthA <= Utils.Size(valuesA)); + Contracts.Assert(0 <= countB && countB <= Utils.Size(indicesB)); + Contracts.Assert(countB <= Utils.Size(valuesB)); + + var normA = CpuMathUtils.SumSq(valuesA.AsSpan(0, lengthA)); + if (countB == 0) return normA; - var normB = CpuMathUtils.SumSq(valuesB); - var dotP = CpuMathUtils.DotProductSparse(valuesA, valuesB, indicesB, valuesB.Length); + var normB = CpuMathUtils.SumSq(valuesB.AsSpan(0, countB)); + var dotP = CpuMathUtils.DotProductSparse(valuesA, valuesB, indicesB, countB); var res = normA + normB - 2 * dotP; return res < 0 ? 0 : res; } - private static Float L2DiffSquaredDense(ReadOnlySpan valuesA, ReadOnlySpan valuesB, int length) + private static Float L2DiffSquaredDense(Float[] valuesA, Float[] valuesB, int length) { - Contracts.Assert(0 <= length && length <= valuesA.Length); - Contracts.Assert(0 <= length && length <= valuesB.Length); + Contracts.AssertValueOrNull(valuesA); + Contracts.AssertValueOrNull(valuesB); + Contracts.Assert(0 <= length && length <= Utils.Size(valuesA)); + Contracts.Assert(0 <= length && length <= Utils.Size(valuesB)); if (length == 0) return 0; @@ -253,36 +262,32 @@ public static Float DotProductWithOffset(in VBuffer a, int offset, in VBu Contracts.Check(0 <= offset && offset <= a.Length); Contracts.Check(b.Length <= a.Length - offset, "VBuffer b must be no longer than a.Length - offset."); - var aValues = a.GetValues(); - var bValues = b.GetValues(); - if (aValues.Length == 0 || bValues.Length == 0) + if (a.Count == 0 || b.Count == 0) return 0; if (a.IsDense) { if (b.IsDense) - return CpuMathUtils.DotProductDense(aValues.Slice(offset), bValues, b.Length); - return CpuMathUtils.DotProductSparse(aValues.Slice(offset), bValues, b.GetIndices(), bValues.Length); + return CpuMathUtils.DotProductDense(a.Values.AsSpan(offset), b.Values, b.Length); + return CpuMathUtils.DotProductSparse(a.Values.AsSpan(offset), b.Values, b.Indices, b.Count); } else { Float result = 0; - var aIndices = a.GetIndices(); - int aMin = Utils.FindIndexSorted(aIndices, 0, aIndices.Length, offset); - int aLim = Utils.FindIndexSorted(aIndices, 0, aIndices.Length, offset + b.Length); + int aMin = Utils.FindIndexSorted(a.Indices, 0, a.Count, offset); + int aLim = Utils.FindIndexSorted(a.Indices, 0, a.Count, offset + b.Length); if (b.IsDense) { for (int iA = aMin; iA < aLim; ++iA) - result += aValues[iA] * bValues[aIndices[iA] - offset]; + result += a.Values[iA] * b.Values[a.Indices[iA] - offset]; return result; } - var bIndices = b.GetIndices(); - for (int iA = aMin, iB = 0; iA < aLim && iB < bIndices.Length; ) + for (int iA = aMin, iB = 0; iA < aLim && iB < b.Count; ) { - int aIndex = aIndices[iA]; - int bIndex = bIndices[iB]; + int aIndex = a.Indices[iA]; + int bIndex = b.Indices[iB]; int comp = (aIndex - offset) - bIndex; if (comp == 0) - result += aValues[iA++] * bValues[iB++]; + result += a.Values[iA++] * b.Values[iB++]; else if (comp < 0) iA++; else @@ -305,21 +310,20 @@ public static Float DotProductWithOffset(Float[] a, int offset, in VBuffer aValues, ReadOnlySpan aIndices, int ia, int iaLim, ReadOnlySpan bValues, ReadOnlySpan bIndices, int ib, int ibLim) + private static Float DotProductSparse(Float[] aValues, int[] aIndices, int ia, int iaLim, Float[] bValues, int[] bIndices, int ib, int ibLim, int offset) { - Contracts.AssertNonEmpty(aValues); - Contracts.AssertNonEmpty(aIndices); - Contracts.AssertNonEmpty(bValues); - Contracts.AssertNonEmpty(bIndices); + Contracts.AssertValue(aValues); + Contracts.AssertValue(aIndices); + Contracts.AssertValue(bValues); + Contracts.AssertValue(bIndices); Contracts.Assert(0 <= ia && ia < iaLim && iaLim <= aIndices.Length); Contracts.Assert(0 <= ib && ib < ibLim && ibLim <= bIndices.Length); @@ -330,7 +334,7 @@ private static Float DotProductSparse(ReadOnlySpan aValues, ReadOnlySpan< for (; ; ) { - int d = aIndices[ia] - bIndices[ib]; + int d = aIndices[ia] - offset - bIndices[ib]; if (d == 0) { res += aValues[ia] * bValues[ib]; @@ -343,7 +347,7 @@ private static Float DotProductSparse(ReadOnlySpan aValues, ReadOnlySpan< { ia++; if (d < -thresh) - ia = Utils.FindIndexSorted(aIndices, ia, iaLim, bIndices[ib]); + ia = Utils.FindIndexSorted(aIndices, ia, iaLim, bIndices[ib] + offset); if (ia >= iaLim) break; } @@ -351,7 +355,7 @@ private static Float DotProductSparse(ReadOnlySpan aValues, ReadOnlySpan< { ib++; if (d > thresh) - ib = Utils.FindIndexSorted(bIndices, ib, ibLim, aIndices[ia]); + ib = Utils.FindIndexSorted(bIndices, ib, ibLim, aIndices[ia] - offset); if (ib >= ibLim) break; } @@ -397,12 +401,12 @@ public static Float L2DistSquared(in VBuffer a, in VBuffer b) if (a.IsDense) { if (b.IsDense) - return L2DiffSquaredDense(a.GetValues(), b.GetValues(), b.Length); - return L2DistSquaredHalfSparse(a.GetValues(), b.GetValues(), b.GetIndices()); + return L2DiffSquaredDense(a.Values, b.Values, b.Length); + return L2DistSquaredHalfSparse(a.Values, a.Length, b.Values, b.Indices, b.Count); } if (b.IsDense) - return L2DistSquaredHalfSparse(b.GetValues(), a.GetValues(), a.GetIndices()); - return L2DistSquaredSparse(a.GetValues(), a.GetIndices(), b.GetValues(), b.GetIndices()); + return L2DistSquaredHalfSparse(b.Values, b.Length, a.Values, a.Indices, a.Count); + return L2DistSquaredSparse(a.Values, a.Indices, a.Count, b.Values, b.Indices, b.Count, a.Length); } /// @@ -416,8 +420,8 @@ public static Float L2DistSquared(Float[] a, in VBuffer b) Contracts.CheckValue(a, nameof(a)); Contracts.Check(Utils.Size(a) == b.Length, "Vectors must have the same dimensionality."); if (b.IsDense) - return L2DiffSquaredDense(a, b.GetValues(), b.Length); - return L2DistSquaredHalfSparse(a.AsSpan(0, a.Length), b.GetValues(), b.GetIndices()); + return L2DiffSquaredDense(a, b.Values, b.Length); + return L2DistSquaredHalfSparse(a, a.Length, b.Values, b.Indices, b.Count); } /// @@ -437,23 +441,22 @@ public static void Add(Float[] src, Float[] dst) /// Adds a multiple of a to a array. /// /// Buffer to add - /// Span to add to + /// Array to add to /// Coefficient - public static void AddMult(in VBuffer src, Span dst, Float c) + public static void AddMult(in VBuffer src, Float[] dst, Float c) { + Contracts.CheckValue(dst, nameof(dst)); Contracts.CheckParam(src.Length == dst.Length, nameof(dst), "Arrays must have the same dimensionality."); - var srcValues = src.GetValues(); - if (srcValues.Length == 0 || c == 0) + if (src.Count == 0 || c == 0) return; if (src.IsDense) - CpuMathUtils.AddScale(c, srcValues, dst, srcValues.Length); + CpuMathUtils.AddScale(c, src.Values, dst, src.Count); else { - var srcIndices = src.GetIndices(); - for (int i = 0; i < srcValues.Length; i++) - dst[srcIndices[i]] += c * srcValues[i]; + for (int i = 0; i < src.Count; i++) + dst[src.Indices[i]] += c * src.Values[i]; } } @@ -471,20 +474,18 @@ public static void AddMultWithOffset(in VBuffer src, Float[] dst, int off Contracts.Check(0 <= offset && offset <= dst.Length); Contracts.Check(src.Length <= dst.Length - offset, "Vector src must be no longer than dst.Length - offset."); - var srcValues = src.GetValues(); - if (srcValues.Length == 0 || c == 0) + if (src.Count == 0 || c == 0) return; if (src.IsDense) { for (int i = 0; i < src.Length; i++) - dst[i + offset] += c * srcValues[i]; + dst[i + offset] += c * src.Values[i]; } else { - var srcIndices = src.GetIndices(); - for (int i = 0; i < srcValues.Length; i++) - dst[srcIndices[i] + offset] += c * srcValues[i]; + for (int i = 0; i < src.Count; i++) + dst[src.Indices[i] + offset] += c * src.Values[i]; } } diff --git a/src/Microsoft.ML.Data/Dirty/IniFileUtils.cs b/src/Microsoft.ML.Data/Dirty/IniFileUtils.cs index 782c07af01..a54ab2eb4f 100644 --- a/src/Microsoft.ML.Data/Dirty/IniFileUtils.cs +++ b/src/Microsoft.ML.Data/Dirty/IniFileUtils.cs @@ -8,8 +8,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { - [BestFriend] - internal static class IniFileUtils + public static class IniFileUtils { // This could be done better by having something that actually parses the .ini file and provides more // functionality. For now, we'll just provide the minimum needed. If we went the nicer route, probably would diff --git a/src/Microsoft.ML.Data/Dirty/PredictorInterfaces.cs b/src/Microsoft.ML.Data/Dirty/PredictorInterfaces.cs index f866ca4817..6db939a877 100644 --- a/src/Microsoft.ML.Data/Dirty/PredictorInterfaces.cs +++ b/src/Microsoft.ML.Data/Dirty/PredictorInterfaces.cs @@ -173,6 +173,11 @@ public interface IPredictorWithFeatureWeights : IHaveFeatureWeights { } + public interface IHasLabelGains : ITrainer + { + Double[] GetLabelGains(); + } + /// /// Interface for mapping input values to corresponding feature contributions. /// This interface is commonly implemented by predictors. diff --git a/src/Microsoft.ML.Data/EntryPoints/Cache.cs b/src/Microsoft.ML.Data/EntryPoints/Cache.cs index aa2693f4aa..610621c6d1 100644 --- a/src/Microsoft.ML.Data/EntryPoints/Cache.cs +++ b/src/Microsoft.ML.Data/EntryPoints/Cache.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using Microsoft.ML.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; @@ -68,11 +67,9 @@ public static CacheOutput CacheData(IHostEnvironment env, CacheInput input) cols.Add(i); } -#pragma warning disable CS0618 // This ought to be addressed. See #1287. // We are not disposing the fileHandle because we want it to stay around for the execution of the graph. // It will be disposed when the environment is disposed. var fileHandle = host.CreateTempFile(); -#pragma warning restore CS0618 using (var stream = fileHandle.CreateWriteStream()) saver.SaveData(stream, input.Data, cols.ToArray()); diff --git a/src/Microsoft.ML.Data/EntryPoints/InputBase.cs b/src/Microsoft.ML.Data/EntryPoints/InputBase.cs index 3254289f12..550191b157 100644 --- a/src/Microsoft.ML.Data/EntryPoints/InputBase.cs +++ b/src/Microsoft.ML.Data/EntryPoints/InputBase.cs @@ -99,8 +99,7 @@ public abstract class LearnerInputBaseWithGroupId : LearnerInputBaseWithWeight public Optional GroupIdColumn = Optional.Implicit(DefaultColumnNames.GroupId); } - [BestFriend] - internal static class LearnerEntryPointsUtils + public static class LearnerEntryPointsUtils { public static string FindColumn(IExceptionContext ectx, ISchema schema, Optional value) { diff --git a/src/Microsoft.ML.Data/EntryPoints/PredictorModel.cs b/src/Microsoft.ML.Data/EntryPoints/PredictorModel.cs index f450c5e39a..65e8428f1b 100644 --- a/src/Microsoft.ML.Data/EntryPoints/PredictorModel.cs +++ b/src/Microsoft.ML.Data/EntryPoints/PredictorModel.cs @@ -124,7 +124,7 @@ public string[] GetLabelInfo(IHostEnvironment env, out ColumnType labelType) { labelType = trainRms.Label.Type; if (labelType.IsKey && - trainRms.Schema.HasKeyValues(trainRms.Label.Index, labelType.KeyCount)) + trainRms.Schema.HasKeyNames(trainRms.Label.Index, labelType.KeyCount)) { VBuffer> keyValues = default; trainRms.Schema.GetMetadata(MetadataUtils.Kinds.KeyValues, trainRms.Label.Index, diff --git a/src/Microsoft.ML.Data/EntryPoints/SchemaManipulation.cs b/src/Microsoft.ML.Data/EntryPoints/SchemaManipulation.cs index 8b9c034ae2..1750d885ee 100644 --- a/src/Microsoft.ML.Data/EntryPoints/SchemaManipulation.cs +++ b/src/Microsoft.ML.Data/EntryPoints/SchemaManipulation.cs @@ -13,38 +13,38 @@ namespace Microsoft.ML.Runtime.EntryPoints { public static class SchemaManipulation { - [TlcModule.EntryPoint(Name = "Transforms.ColumnConcatenator", Desc = ColumnConcatenatingTransformer.Summary, UserName = ColumnConcatenatingTransformer.UserName, ShortName = ColumnConcatenatingTransformer.LoadName)] - public static CommonOutputs.TransformOutput ConcatColumns(IHostEnvironment env, ColumnConcatenatingTransformer.Arguments input) + [TlcModule.EntryPoint(Name = "Transforms.ColumnConcatenator", Desc = ConcatTransform.Summary, UserName = ConcatTransform.UserName, ShortName = ConcatTransform.LoadName)] + public static CommonOutputs.TransformOutput ConcatColumns(IHostEnvironment env, ConcatTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("ConcatColumns"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = ColumnConcatenatingTransformer.Create(env, input, input.Data); + var xf = ConcatTransform.Create(env, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } [TlcModule.EntryPoint(Name = "Transforms.ColumnSelector", Desc = "Selects a set of columns, dropping all others", UserName = "Select Columns")] - public static CommonOutputs.TransformOutput SelectColumns(IHostEnvironment env, ColumnSelectingTransformer.Arguments input) + public static CommonOutputs.TransformOutput SelectColumns(IHostEnvironment env, SelectColumnsTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("SelectColumns"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = new ColumnSelectingTransformer(env, input.KeepColumns, input.DropColumns, input.KeepHidden, input.IgnoreMissing).Transform(input.Data); + var xf = new SelectColumnsTransform(env, input.KeepColumns, input.DropColumns, input.KeepHidden, input.IgnoreMissing).Transform(input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } - [TlcModule.EntryPoint(Name = "Transforms.ColumnCopier", Desc = "Duplicates columns from the dataset", UserName = ColumnsCopyingTransformer.UserName, ShortName = ColumnsCopyingTransformer.ShortName)] - public static CommonOutputs.TransformOutput CopyColumns(IHostEnvironment env, ColumnsCopyingTransformer.Arguments input) + [TlcModule.EntryPoint(Name = "Transforms.ColumnCopier", Desc = "Duplicates columns from the dataset", UserName = CopyColumnsTransform.UserName, ShortName = CopyColumnsTransform.ShortName)] + public static CommonOutputs.TransformOutput CopyColumns(IHostEnvironment env, CopyColumnsTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("CopyColumns"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = ColumnsCopyingTransformer.Create(env, input, input.Data); + var xf = CopyColumnsTransform.Create(env, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } } diff --git a/src/Microsoft.ML.Data/EntryPoints/ScoreColumnSelector.cs b/src/Microsoft.ML.Data/EntryPoints/ScoreColumnSelector.cs index ab9fb55b0b..96ce1d8c61 100644 --- a/src/Microsoft.ML.Data/EntryPoints/ScoreColumnSelector.cs +++ b/src/Microsoft.ML.Data/EntryPoints/ScoreColumnSelector.cs @@ -100,8 +100,8 @@ public static CommonOutputs.TransformOutput RenameBinaryPredictionScoreColumns(I copyCols.Add((source, name)); } - var copyColumn = new ColumnsCopyingTransformer(env, copyCols.ToArray()).Transform(input.Data); - var dropColumn = ColumnSelectingTransformer.CreateDrop(env, copyColumn, copyCols.Select(c => c.Source).ToArray()); + var copyColumn = new CopyColumnsTransform(env, copyCols.ToArray()).Transform(input.Data); + var dropColumn = SelectColumnsTransform.CreateDrop(env, copyColumn, copyCols.Select(c => c.Source).ToArray()); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, dropColumn, input.Data), OutputData = dropColumn }; } } diff --git a/src/Microsoft.ML.Data/Evaluators/AnomalyDetectionEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/AnomalyDetectionEvaluator.cs index 59614a7559..128dafc81e 100644 --- a/src/Microsoft.ML.Data/Evaluators/AnomalyDetectionEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/AnomalyDetectionEvaluator.cs @@ -293,7 +293,7 @@ public virtual void FinishFirstPass() { } - private protected Info[] ReverseHeap(Heap heap) + protected IEnumerable ReverseHeap(Heap heap) { var res = new Info[heap.Count]; while (heap.Count > 0) @@ -724,8 +724,8 @@ protected override void PrintFoldResultsCore(IChannel ch, Dictionary { - internal abstract class AucAggregatorBase + protected abstract class AucAggregatorBase { protected Single Score; protected Single Label; @@ -30,7 +30,7 @@ public void ProcessRow(Single label, Single score, Single weight = 1) public abstract Double ComputeWeightedAuc(out Double unweighted); } - internal abstract class AucAggregatorBase : AucAggregatorBase + protected abstract class AucAggregatorBase : AucAggregatorBase { private readonly ReservoirSamplerWithoutReplacement _posReservoir; private readonly ReservoirSamplerWithoutReplacement _negReservoir; @@ -117,7 +117,7 @@ public override Double ComputeWeightedAuc(out Double unweighted) protected abstract Double ComputeWeightedAucCore(out double unweighted); } - internal sealed class UnweightedAucAggregator : AucAggregatorBase + protected sealed class UnweightedAucAggregator : AucAggregatorBase { public UnweightedAucAggregator(IRandom rand, int reservoirSize) : base(rand, reservoirSize) @@ -210,7 +210,7 @@ protected override void AddExample(List examples) } } - internal sealed class WeightedAucAggregator : AucAggregatorBase + protected sealed class WeightedAucAggregator : AucAggregatorBase { public struct AucInfo { @@ -345,7 +345,7 @@ protected override void AddExample(List examples) } } - internal abstract class AuPrcAggregatorBase + public abstract class AuPrcAggregatorBase { protected Single Score; protected Single Label; @@ -364,7 +364,7 @@ public void ProcessRow(Single label, Single score, Single weight = 1) public abstract Double ComputeWeightedAuPrc(out Double unweighted); } - private protected abstract class AuPrcAggregatorBase : AuPrcAggregatorBase + protected abstract class AuPrcAggregatorBase : AuPrcAggregatorBase { protected readonly ReservoirSamplerWithoutReplacement Reservoir; @@ -393,7 +393,7 @@ public override Double ComputeWeightedAuPrc(out Double unweighted) protected abstract Double ComputeWeightedAuPrcCore(out Double unweighted); } - private protected sealed class UnweightedAuPrcAggregator : AuPrcAggregatorBase + protected sealed class UnweightedAuPrcAggregator : AuPrcAggregatorBase { public struct Info { @@ -466,7 +466,7 @@ protected override ValueGetter GetSampleGetter() } } - private protected sealed class WeightedAuPrcAggregator : AuPrcAggregatorBase + protected sealed class WeightedAuPrcAggregator : AuPrcAggregatorBase { public struct Info { diff --git a/src/Microsoft.ML.Data/Evaluators/BinaryClassifierEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/BinaryClassifierEvaluator.cs index 47e6dda091..bee170ecef 100644 --- a/src/Microsoft.ML.Data/Evaluators/BinaryClassifierEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/BinaryClassifierEvaluator.cs @@ -535,7 +535,7 @@ private struct RocInfo public readonly List WeightedRecall; public readonly List WeightedFalsePositiveRate; - internal readonly AuPrcAggregatorBase AuPrcAggregator; + public readonly AuPrcAggregatorBase AuPrcAggregator; public double WeightedAuPrc; public double UnweightedAuPrc; @@ -1355,10 +1355,10 @@ protected override void PrintFoldResultsCore(IChannel ch, Dictionary[] metrics) diff --git a/src/Microsoft.ML.Data/Evaluators/ClusteringEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/ClusteringEvaluator.cs index d83de51f06..34113e36fd 100644 --- a/src/Microsoft.ML.Data/Evaluators/ClusteringEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/ClusteringEvaluator.cs @@ -731,10 +731,12 @@ public override Delegate[] CreateGetters(IRow input, Func activeOutpu (ref VBuffer dst) => { updateCacheIfNeeded(); - var editor = VBufferEditor.Create(ref dst, _numClusters); + var values = dst.Values; + if (Utils.Size(values) < _numClusters) + values = new Single[_numClusters]; for (int i = 0; i < _numClusters; i++) - editor.Values[i] = scores.GetItemOrDefault(sortedIndices[i]); - dst = editor.Commit(); + values[i] = scores.GetItemOrDefault(sortedIndices[i]); + dst = new VBuffer(_numClusters, values); }; getters[SortedClusterScoreCol] = topKScoresFn; } @@ -745,10 +747,12 @@ public override Delegate[] CreateGetters(IRow input, Func activeOutpu (ref VBuffer dst) => { updateCacheIfNeeded(); - var editor = VBufferEditor.Create(ref dst, _numClusters); + var values = dst.Values; + if (Utils.Size(values) < _numClusters) + values = new uint[_numClusters]; for (int i = 0; i < _numClusters; i++) - editor.Values[i] = (uint)sortedIndices[i] + 1; - dst = editor.Commit(); + values[i] = (uint)sortedIndices[i] + 1; + dst = new VBuffer(_numClusters, values); }; getters[SortedClusterCol] = topKClassesFn; } @@ -779,10 +783,12 @@ private ValueGetter>> CreateSlotNamesGetter(int num return (ref VBuffer> dst) => { - var editor = VBufferEditor.Create(ref dst, numTopClusters); + var values = dst.Values; + if (Utils.Size(values) < numTopClusters) + values = new ReadOnlyMemory[numTopClusters]; for (int i = 1; i <= numTopClusters; i++) - editor.Values[i - 1] = $"#{i} {suffix}".AsMemory(); - dst = editor.Commit(); + values[i - 1] = $"#{i} {suffix}".AsMemory(); + dst = new VBuffer>(numTopClusters, values); }; } diff --git a/src/Microsoft.ML.Data/Evaluators/EvaluatorBase.cs b/src/Microsoft.ML.Data/Evaluators/EvaluatorBase.cs index 03c1e804e1..391bd73f85 100644 --- a/src/Microsoft.ML.Data/Evaluators/EvaluatorBase.cs +++ b/src/Microsoft.ML.Data/Evaluators/EvaluatorBase.cs @@ -201,10 +201,12 @@ protected ValueGetter>> GetKeyValueGetter(Aggregato return (ref VBuffer> dst) => { - var editor = VBufferEditor.Create(ref dst, dictionaries.Length); + var values = dst.Values; + if (Utils.Size(values) < dictionaries.Length) + values = new ReadOnlyMemory[dictionaries.Length]; for (int i = 0; i < dictionaries.Length; i++) - editor.Values[i] = dictionaries[i].ColName.AsMemory(); - dst = editor.Commit(); + values[i] = dictionaries[i].ColName.AsMemory(); + dst = new VBuffer>(dictionaries.Length, values, dst.Indices); }; } diff --git a/src/Microsoft.ML.Data/Evaluators/EvaluatorUtils.cs b/src/Microsoft.ML.Data/Evaluators/EvaluatorUtils.cs index f42b97074c..646b7b3547 100644 --- a/src/Microsoft.ML.Data/Evaluators/EvaluatorUtils.cs +++ b/src/Microsoft.ML.Data/Evaluators/EvaluatorUtils.cs @@ -490,7 +490,12 @@ public static IDataView AddFoldIndex(IHostEnvironment env, IDataView input, int ValueGetter>> slotNamesGetter = (ref VBuffer> dst) => { - reconciledSlotNames.CopyTo(ref dst); + var values = dst.Values; + if (Utils.Size(values) < reconciledSlotNames.Length) + values = new ReadOnlyMemory[reconciledSlotNames.Length]; + + Array.Copy(reconciledSlotNames.Values, values, reconciledSlotNames.Length); + dst = new VBuffer>(reconciledSlotNames.Length, values, dst.Indices); }; // For each input data view, create the reconciled key column by wrapping it in a LambdaColumnMapper. @@ -505,11 +510,13 @@ public static IDataView AddFoldIndex(IHostEnvironment env, IDataView input, int (in VBuffer src, ref VBuffer dst) => { Contracts.Assert(src.Length == Utils.Size(map)); - var editor = VBufferEditor.Create(ref dst, slotNames.Count); + var values = dst.Values; + if (Utils.Size(values) < slotNames.Count) + values = new T[slotNames.Count]; foreach (var kvp in src.Items()) - editor.Values[map[kvp.Key]] = kvp.Value; - dst = editor.Commit(); + values[map[kvp.Key]] = kvp.Value; + dst = new VBuffer(slotNames.Count, values, dst.Indices); }; } else @@ -529,13 +536,15 @@ public static IDataView AddFoldIndex(IHostEnvironment env, IDataView input, int (in VBuffer src, ref VBuffer dst) => { Contracts.Assert(src.Length == Utils.Size(map)); - var editor = VBufferEditor.Create(ref dst, slotNames.Count); + var values = dst.Values; + if (Utils.Size(values) < slotNames.Count) + values = new T[slotNames.Count]; foreach (var kvp in src.Items(true)) - editor.Values[map[kvp.Key]] = kvp.Value; + values[map[kvp.Key]] = kvp.Value; foreach (var j in naIndices) - editor.Values[j] = def; - dst = editor.Commit(); + values[j] = def; + dst = new VBuffer(slotNames.Count, values, dst.Indices); }; } @@ -606,7 +615,7 @@ public static void ReconcileKeyValues(IHostEnvironment env, IDataView[] views, s var keyNamesVBuffer = new VBuffer>(keyNames.Count, keyNames.Keys.ToArray()); ValueGetter>> keyValueGetter = (ref VBuffer> dst) => - keyNamesVBuffer.CopyTo(ref dst); + dst = new VBuffer>(keyNamesVBuffer.Length, keyNamesVBuffer.Count, keyNamesVBuffer.Values, keyNamesVBuffer.Indices); // For each input data view, create the reconciled key column by wrapping it in a LambdaColumnMapper. for (int i = 0; i < dvCount; i++) @@ -674,7 +683,7 @@ public static void ReconcileVectorKeyValues(IHostEnvironment env, IDataView[] vi var keyNamesVBuffer = new VBuffer>(keyNames.Count, keyNames.Keys.ToArray()); ValueGetter>> keyValueGetter = (ref VBuffer> dst) => - keyNamesVBuffer.CopyTo(ref dst); + dst = new VBuffer>(keyNamesVBuffer.Length, keyNamesVBuffer.Count, keyNamesVBuffer.Values, keyNamesVBuffer.Indices); for (int i = 0; i < dvCount; i++) { @@ -682,34 +691,35 @@ public static void ReconcileVectorKeyValues(IHostEnvironment env, IDataView[] vi ValueMapper, VBuffer> mapper = (in VBuffer src, ref VBuffer dst) => { - var srcValues = src.GetValues(); - var editor = VBufferEditor.Create( - ref dst, - src.Length, - srcValues.Length); + var values = dst.Values; + if (Utils.Size(values) < src.Count) + values = new uint[src.Count]; if (src.IsDense) { for (int j = 0; j < src.Length; j++) { - if (srcValues[j] == 0 || srcValues[j] > keyMapperCur.Length) - editor.Values[j] = 0; + if (src.Values[j] == 0 || src.Values[j] > keyMapperCur.Length) + values[j] = 0; else - editor.Values[j] = (uint)keyMapperCur[srcValues[j] - 1] + 1; + values[j] = (uint)keyMapperCur[src.Values[j] - 1] + 1; } + dst = new VBuffer(src.Length, values, dst.Indices); } else { - var srcIndices = src.GetIndices(); - for (int j = 0; j < srcValues.Length; j++) + var indices = dst.Indices; + if (Utils.Size(indices) < src.Count) + indices = new int[src.Count]; + for (int j = 0; j < src.Count; j++) { - if (srcValues[j] == 0 || srcValues[j] > keyMapperCur.Length) - editor.Values[j] = 0; + if (src.Values[j] == 0 || src.Values[j] > keyMapperCur.Length) + values[j] = 0; else - editor.Values[j] = (uint)keyMapperCur[srcValues[j] - 1] + 1; - editor.Indices[j] = srcIndices[j]; + values[j] = (uint)keyMapperCur[src.Values[j] - 1] + 1; + indices[j] = src.Indices[j]; } + dst = new VBuffer(src.Length, src.Count, values, indices); } - dst = editor.Commit(); }; ValueGetter>> slotNamesGetter = null; @@ -827,7 +837,7 @@ private static IDataView AppendPerInstanceDataViews(IHostEnvironment env, string { if (dvNumber == 0) { - if (dv.Schema.HasKeyValues(i, type.ItemType.KeyCount)) + if (dv.Schema.HasKeyNames(i, type.ItemType.KeyCount)) firstDvVectorKeyColumns.Add(name); // Store the slot names of the 1st idv and use them as baseline. if (dv.Schema.HasSlotNames(i, type.VectorSize)) @@ -856,9 +866,9 @@ private static IDataView AppendPerInstanceDataViews(IHostEnvironment env, string // The label column can be a key. Reconcile the key values, and wrap with a KeyToValue transform. labelColKeyValuesType = dv.Schema.GetMetadataTypeOrNull(MetadataUtils.Kinds.KeyValues, i); } - else if (dvNumber == 0 && dv.Schema.HasKeyValues(i, type.KeyCount)) + else if (dvNumber == 0 && dv.Schema.HasKeyNames(i, type.KeyCount)) firstDvKeyWithNamesColumns.Add(name); - else if (type.KeyCount > 0 && name != labelColName && !dv.Schema.HasKeyValues(i, type.KeyCount)) + else if (type.KeyCount > 0 && name != labelColName && !dv.Schema.HasKeyNames(i, type.KeyCount)) { // For any other key column (such as GroupId) we do not reconcile the key values, we only convert to U4. if (!firstDvKeyNoNamesColumns.ContainsKey(name)) @@ -898,7 +908,7 @@ private static IDataView AppendPerInstanceDataViews(IHostEnvironment env, string if (keyCol == labelColName && labelColKeyValuesType == null) continue; - idv = new KeyToValueMappingTransformer(env, keyCol).Transform(idv); + idv = new KeyToValueTransform(env, keyCol).Transform(idv); var hidden = FindHiddenColumns(idv.Schema, keyCol); idv = new ChooseColumnsByIndexTransform(env, new ChooseColumnsByIndexTransform.Arguments() { Drop = true, Index = hidden.ToArray() }, idv); } @@ -923,7 +933,7 @@ private static IDataView AppendPerInstanceDataViews(IHostEnvironment env, string variableSizeVectorColumnName, type); // Drop the old column that does not have variable length. - idv = ColumnSelectingTransformer.CreateDrop(env, idv, variableSizeVectorColumnName); + idv = SelectColumnsTransform.CreateDrop(env, idv, variableSizeVectorColumnName); } return idv; }; @@ -1018,10 +1028,12 @@ private static List GetMetricNames(IChannel ch, Schema schema, IRow row, schema.GetMetadata(MetadataUtils.Kinds.SlotNames, i, ref names); else { - var editor = VBufferEditor.Create(ref names, type.VectorSize); + var namesArray = names.Values; + if (Utils.Size(namesArray) < type.VectorSize) + namesArray = new ReadOnlyMemory[type.VectorSize]; for (int j = 0; j < type.VectorSize; j++) - editor.Values[j] = string.Format("Label_{0}", j).AsMemory(); - names = editor.Commit(); + namesArray[j] = string.Format("Label_{0}", j).AsMemory(); + names = new VBuffer>(type.VectorSize, namesArray); } foreach (var name in names.Items(all: true)) metricNames.Add(string.Format("{0}{1}", metricName, name.Value)); @@ -1047,7 +1059,7 @@ internal static IDataView GetOverallMetricsData(IHostEnvironment env, IDataView { if (Utils.Size(nonAveragedCols) > 0) { - data = ColumnSelectingTransformer.CreateDrop(env, data, nonAveragedCols.ToArray()); + data = SelectColumnsTransform.CreateDrop(env, data, nonAveragedCols.ToArray()); } idvList.Add(data); } @@ -1057,7 +1069,7 @@ internal static IDataView GetOverallMetricsData(IHostEnvironment env, IDataView // If there are stratified results, apply a KeyToValue transform to get the stratification column // names from the key column. if (hasStrat) - overall = new KeyToValueMappingTransformer(env, MetricKinds.ColumnNames.StratCol).Transform(overall); + overall = new KeyToValueTransform(env, MetricKinds.ColumnNames.StratCol).Transform(overall); return overall; } @@ -1376,10 +1388,9 @@ public static string GetConfusionTable(IHost host, IDataView confusionDataView, var confusionTable = GetConfusionTableAsArray(confusionDataView, countCol, labelNames.Length, labelIndexToConfIndexMap, numConfusionTableLabels, out precisionSums, out recallSums); - var predictedLabelNames = GetPredictedLabelNames(in labelNames, labelIndexToConfIndexMap); var confusionTableString = GetConfusionTableAsString(confusionTable, recallSums, precisionSums, - predictedLabelNames, - sampled: numConfusionTableLabels < labelNames.Length, binary: binary); + labelNames.Values.Where((t, i) => labelIndexToConfIndexMap[i] >= 0).ToArray(), + sampled: numConfusionTableLabels < labelNames.Count, binary: binary); int weightIndex; if (confusionDataView.Schema.TryGetColumnIndex(MetricKinds.ColumnNames.Weight, out weightIndex)) @@ -1387,8 +1398,8 @@ public static string GetConfusionTable(IHost host, IDataView confusionDataView, confusionTable = GetConfusionTableAsArray(confusionDataView, weightIndex, labelNames.Length, labelIndexToConfIndexMap, numConfusionTableLabels, out precisionSums, out recallSums); weightedConfusionTable = GetConfusionTableAsString(confusionTable, recallSums, precisionSums, - predictedLabelNames, - sampled: numConfusionTableLabels < labelNames.Length, prefix: "Weighted ", binary: binary); + labelNames.Values.Where((t, i) => labelIndexToConfIndexMap[i] >= 0).ToArray(), + sampled: numConfusionTableLabels < labelNames.Count, prefix: "Weighted ", binary: binary); } else weightedConfusionTable = null; @@ -1396,20 +1407,6 @@ public static string GetConfusionTable(IHost host, IDataView confusionDataView, return confusionTableString; } - private static List> GetPredictedLabelNames(in VBuffer> labelNames, int[] labelIndexToConfIndexMap) - { - List> result = new List>(); - var values = labelNames.GetValues(); - for (int i = 0; i < values.Length; i++) - { - if (labelIndexToConfIndexMap[i] >= 0) - { - result.Add(values[i]); - } - } - return result; - } - // This methods is given a data view and a column index of the counts, and computes three arrays: the confusion table, // the per class recall and the per class precision. private static double[][] GetConfusionTableAsArray(IDataView confusionDataView, int countIndex, int numClasses, @@ -1540,7 +1537,7 @@ private static string GetFoldMetricsAsString(IHostEnvironment env, IDataView dat // Get a string representation of a confusion table. private static string GetConfusionTableAsString(double[][] confusionTable, double[] rowSums, double[] columnSums, - List> predictedLabelNames, string prefix = "", bool sampled = false, bool binary = true) + ReadOnlyMemory[] predictedLabelNames, string prefix = "", bool sampled = false, bool binary = true) { int numLabels = Utils.Size(confusionTable); @@ -1558,7 +1555,7 @@ private static string GetConfusionTableAsString(double[][] confusionTable, doubl { // The row label will also include the index, so a user can easily match against the header. // In such a case, a label like "Foo" would be presented as something like "5. Foo". - rowDigitLen = Math.Max(predictedLabelNames.Count - 1, 0).ToString().Length; + rowDigitLen = Math.Max(predictedLabelNames.Length - 1, 0).ToString().Length; Contracts.Assert(rowDigitLen >= 1); rowLabelLen += rowDigitLen + 2; } @@ -1736,7 +1733,7 @@ public static IDataView GetNonStratifiedMetrics(IHostEnvironment env, IDataView var found = data.Schema.TryGetColumnIndex(MetricKinds.ColumnNames.StratVal, out stratVal); env.Check(found, "If stratification column exist, data view must also contain a StratVal column"); - data = ColumnSelectingTransformer.CreateDrop(env, data, data.Schema.GetColumnName(stratCol), data.Schema.GetColumnName(stratVal)); + data = SelectColumnsTransform.CreateDrop(env, data, data.Schema.GetColumnName(stratCol), data.Schema.GetColumnName(stratVal)); return data; } } diff --git a/src/Microsoft.ML.Data/Evaluators/MamlEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/MamlEvaluator.cs index 4ada846423..5e3c77a9e8 100644 --- a/src/Microsoft.ML.Data/Evaluators/MamlEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/MamlEvaluator.cs @@ -245,8 +245,8 @@ private IDataView WrapPerInstance(RoleMappedData perInst) foreach (var col in GetPerInstanceColumnsToSave(perInst.Schema)) colsToKeep.Add(col); - idv = new ColumnsCopyingTransformer(Host, cols.ToArray()).Transform(idv); - idv = ColumnSelectingTransformer.CreateKeep(Host, idv, colsToKeep.ToArray()); + idv = new CopyColumnsTransform(Host, cols.ToArray()).Transform(idv); + idv = SelectColumnsTransform.CreateKeep(Host, idv, colsToKeep.ToArray()); return GetPerInstanceMetricsCore(idv, perInst.Schema); } diff --git a/src/Microsoft.ML.Data/Evaluators/MultiOutputRegressionEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/MultiOutputRegressionEvaluator.cs index 48d4f67a36..bb9dd9f8f8 100644 --- a/src/Microsoft.ML.Data/Evaluators/MultiOutputRegressionEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/MultiOutputRegressionEvaluator.cs @@ -246,11 +246,11 @@ public Counters(IRegressionLoss lossFunction, int size) _fnLoss = new double[size]; } - public void Update(ReadOnlySpan score, ReadOnlySpan label, int length, Float weight) + public void Update(Float[] score, Float[] label, int length, Float weight) { Contracts.Assert(length == _l1Loss.Length); - Contracts.Assert(score.Length >= length); - Contracts.Assert(label.Length >= length); + Contracts.Assert(Utils.Size(score) >= length); + Contracts.Assert(Utils.Size(label) >= length); Double wht = weight; Double l1 = 0; @@ -340,22 +340,22 @@ public override void ProcessRow() } } - ReadOnlySpan label; + Float[] label; if (!_label.IsDense) { _label.CopyTo(_labelArr); label = _labelArr; } else - label = _label.GetValues(); - ReadOnlySpan score; + label = _label.Values; + Float[] score; if (!_score.IsDense) { _score.CopyTo(_scoreArr); score = _scoreArr; } else - score = _score.GetValues(); + score = _score.Values; UnweightedCounters.Update(score, label, _size, 1); if (WeightedCounters != null) WeightedCounters.Update(score, label, _size, weight); @@ -363,10 +363,13 @@ public override void ProcessRow() public void GetSlotNames(ref VBuffer> slotNames) { - var editor = VBufferEditor.Create(ref slotNames, _size); + var values = slotNames.Values; + if (Utils.Size(values) < _size) + values = new ReadOnlyMemory[_size]; + for (int i = 0; i < _size; i++) - editor.Values[i] = string.Format("(Label_{0})", i).AsMemory(); - slotNames = editor.Commit(); + values[i] = string.Format("(Label_{0})", i).AsMemory(); + slotNames = new VBuffer>(_size, values); } } } @@ -602,10 +605,12 @@ private ValueGetter>> CreateSlotNamesGetter(ISchema return (ref VBuffer> dst) => { - var editor = VBufferEditor.Create(ref dst, length); + var values = dst.Values; + if (Utils.Size(values) < length) + values = new ReadOnlyMemory[length]; for (int i = 0; i < length; i++) - editor.Values[i] = string.Format("{0}_{1}", prefix, i).AsMemory(); - dst = editor.Commit(); + values[i] = string.Format("{0}_{1}", prefix, i).AsMemory(); + dst = new VBuffer>(length, values); }; } } diff --git a/src/Microsoft.ML.Data/Evaluators/MulticlassClassifierEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/MulticlassClassifierEvaluator.cs index a94fc32e82..b2e479fcf0 100644 --- a/src/Microsoft.ML.Data/Evaluators/MulticlassClassifierEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/MulticlassClassifierEvaluator.cs @@ -487,10 +487,13 @@ protected override List GetWarningsCore() public void GetSlotNames(ref VBuffer> slotNames) { - var editor = VBufferEditor.Create(ref slotNames, ClassNames.Length); + var values = slotNames.Values; + if (Utils.Size(values) < ClassNames.Length) + values = new ReadOnlyMemory[ClassNames.Length]; + for (int i = 0; i < ClassNames.Length; i++) - editor.Values[i] = string.Format("(class {0})", ClassNames[i]).AsMemory(); - slotNames = editor.Commit(); + values[i] = string.Format("(class {0})", ClassNames[i]).AsMemory(); + slotNames = new VBuffer>(ClassNames.Length, values); } } @@ -801,10 +804,12 @@ public override Delegate[] CreateGetters(IRow input, Func activeOutpu (ref VBuffer dst) => { updateCacheIfNeeded(); - var editor = VBufferEditor.Create(ref dst, _numClasses); + var values = dst.Values; + if (Utils.Size(values) < _numClasses) + values = new float[_numClasses]; for (int i = 0; i < _numClasses; i++) - editor.Values[i] = scores.GetItemOrDefault(sortedIndices[i]); - dst = editor.Commit(); + values[i] = scores.GetItemOrDefault(sortedIndices[i]); + dst = new VBuffer(_numClasses, values); }; getters[SortedScoresCol] = topKScoresFn; } @@ -815,10 +820,12 @@ public override Delegate[] CreateGetters(IRow input, Func activeOutpu (ref VBuffer dst) => { updateCacheIfNeeded(); - var editor = VBufferEditor.Create(ref dst, _numClasses); + var values = dst.Values; + if (Utils.Size(values) < _numClasses) + values = new uint[_numClasses]; for (int i = 0; i < _numClasses; i++) - editor.Values[i] = (uint)sortedIndices[i] + 1; - dst = editor.Commit(); + values[i] = (uint)sortedIndices[i] + 1; + dst = new VBuffer(_numClasses, values); }; getters[SortedClassesCol] = topKClassesFn; } @@ -878,10 +885,12 @@ private ValueGetter>> CreateSlotNamesGetter(int num return (ref VBuffer> dst) => { - var editor = VBufferEditor.Create(ref dst, numTopClasses); + var values = dst.Values; + if (Utils.Size(values) < numTopClasses) + values = new ReadOnlyMemory[numTopClasses]; for (int i = 1; i <= numTopClasses; i++) - editor.Values[i - 1] = string.Format("#{0} {1}", i, suffix).AsMemory(); - dst = editor.Commit(); + values[i - 1] = string.Format("#{0} {1}", i, suffix).AsMemory(); + dst = new VBuffer>(numTopClasses, values); }; } @@ -890,10 +899,12 @@ private ValueGetter>> CreateKeyValueGetter() return (ref VBuffer> dst) => { - var editor = VBufferEditor.Create(ref dst, _numClasses); + var values = dst.Values; + if (Utils.Size(values) < _numClasses) + values = new ReadOnlyMemory[_numClasses]; for (int i = 0; i < _numClasses; i++) - editor.Values[i] = _classNames[i]; - dst = editor.Commit(); + values[i] = _classNames[i]; + dst = new VBuffer>(_numClasses, values); }; } @@ -1039,15 +1050,15 @@ protected override IDataView GetOverallResultsCore(IDataView overall) private IDataView ChangeTopKAccColumnName(IDataView input) { - input = new ColumnsCopyingTransformer(Host, (MultiClassClassifierEvaluator.TopKAccuracy, string.Format(TopKAccuracyFormat, _outputTopKAcc))).Transform(input); - return ColumnSelectingTransformer.CreateDrop(Host, input, MultiClassClassifierEvaluator.TopKAccuracy); + input = new CopyColumnsTransform(Host, (MultiClassClassifierEvaluator.TopKAccuracy, string.Format(TopKAccuracyFormat, _outputTopKAcc))).Transform(input); + return SelectColumnsTransform.CreateDrop(Host, input, MultiClassClassifierEvaluator.TopKAccuracy ); } private IDataView DropPerClassColumn(IDataView input) { if (input.Schema.TryGetColumnIndex(MultiClassClassifierEvaluator.PerClassLogLoss, out int perClassCol)) { - input = ColumnSelectingTransformer.CreateDrop(Host, input, MultiClassClassifierEvaluator.PerClassLogLoss); + input = SelectColumnsTransform.CreateDrop(Host, input, MultiClassClassifierEvaluator.PerClassLogLoss); } return input; } @@ -1090,7 +1101,7 @@ protected override IDataView GetPerInstanceMetricsCore(IDataView perInst, RoleMa if (!perInst.Schema.TryGetColumnIndex(schema.Label.Name, out int labelCol)) throw Host.Except("Could not find column '{0}'", schema.Label.Name); var labelType = perInst.Schema.GetColumnType(labelCol); - if (labelType.IsKey && (!perInst.Schema.HasKeyValues(labelCol, labelType.KeyCount) || labelType.RawKind != DataKind.U4)) + if (labelType.IsKey && (!perInst.Schema.HasKeyNames(labelCol, labelType.KeyCount) || labelType.RawKind != DataKind.U4)) { perInst = LambdaColumnMapper.Create(Host, "ConvertToDouble", perInst, schema.Label.Name, schema.Label.Name, perInst.Schema.GetColumnType(labelCol), NumberType.R8, diff --git a/src/Microsoft.ML.Data/Evaluators/QuantileRegressionEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/QuantileRegressionEvaluator.cs index fe3e88dc42..b95f7f25fb 100644 --- a/src/Microsoft.ML.Data/Evaluators/QuantileRegressionEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/QuantileRegressionEvaluator.cs @@ -50,7 +50,7 @@ protected override IRowMapper CreatePerInstanceRowMapper(RoleMappedSchema schema schema.Schema.GetMetadata(MetadataUtils.Kinds.SlotNames, scoreInfo.Index, ref quantiles); Host.Assert(quantiles.IsDense && quantiles.Length == scoreSize); - return new QuantileRegressionPerInstanceEvaluator(Host, schema.Schema, scoreInfo.Name, schema.Label.Name, scoreSize, quantiles); + return new QuantileRegressionPerInstanceEvaluator(Host, schema.Schema, scoreInfo.Name, schema.Label.Name, scoreSize, quantiles.Values); } protected override void CheckScoreAndLabelTypes(RoleMappedSchema schema) @@ -142,9 +142,6 @@ private void AddL1AndL2Loss(Float label, in VBuffer score, Float weight) { Contracts.Check(score.Length == TotalL1Loss.Length, "Vectors must have the same dimensionality."); - var totalL1LossEditor = VBufferEditor.CreateFromBuffer(ref TotalL1Loss); - var totalL2LossEditor = VBufferEditor.CreateFromBuffer(ref TotalL2Loss); - var scoreValues = score.GetValues(); if (score.IsDense) { @@ -153,8 +150,8 @@ private void AddL1AndL2Loss(Float label, in VBuffer score, Float weight) { var diff = Math.Abs((Double)label - scoreValues[i]); var weightedDiff = diff * weight; - totalL1LossEditor.Values[i] += weightedDiff; - totalL2LossEditor.Values[i] += diff * weightedDiff; + TotalL1Loss.Values[i] += weightedDiff; + TotalL2Loss.Values[i] += diff * weightedDiff; } return; } @@ -165,8 +162,8 @@ private void AddL1AndL2Loss(Float label, in VBuffer score, Float weight) { var diff = Math.Abs((Double)label - scoreValues[i]); var weightedDiff = diff * weight; - totalL1LossEditor.Values[scoreIndices[i]] += weightedDiff; - totalL2LossEditor.Values[scoreIndices[i]] += diff * weightedDiff; + TotalL1Loss.Values[scoreIndices[i]] += weightedDiff; + TotalL2Loss.Values[scoreIndices[i]] += diff * weightedDiff; } } @@ -174,21 +171,19 @@ private void AddCustomLoss(Float weight, in VBuffer loss) { Contracts.Check(loss.Length == TotalL1Loss.Length, "Vectors must have the same dimensionality."); - var totalLossEditor = VBufferEditor.CreateFromBuffer(ref TotalLoss); - var lossValues = loss.GetValues(); if (loss.IsDense) { // Both are dense. for (int i = 0; i < lossValues.Length; i++) - totalLossEditor.Values[i] += lossValues[i] * weight; + TotalLoss.Values[i] += lossValues[i] * weight; return; } // loss is sparse, and _totalL1Loss is dense. var lossIndices = loss.GetIndices(); for (int i = 0; i < lossValues.Length; i++) - totalLossEditor.Values[lossIndices[i]] += lossValues[i] * weight; + TotalLoss.Values[lossIndices[i]] += lossValues[i] * weight; } protected override void Normalize(in VBuffer src, ref VBuffer dst) @@ -196,12 +191,13 @@ protected override void Normalize(in VBuffer src, ref VBuffer ds Contracts.Assert(SumWeights > 0); Contracts.Assert(src.IsDense); - var editor = VBufferEditor.Create(ref dst, src.Length); + var values = dst.Values; + if (Utils.Size(values) < src.Length) + values = new Double[src.Length]; var inv = 1 / SumWeights; - var srcValues = src.GetValues(); - for (int i = 0; i < srcValues.Length; i++) - editor.Values[i] = srcValues[i] * inv; - dst = editor.Commit(); + for (int i = 0; i < src.Length; i++) + values[i] = src.Values[i] * inv; + dst = new VBuffer(src.Length, values); } protected override VBuffer Zero() @@ -281,17 +277,15 @@ private static VersionInfo GetVersionInfo() public const string L2 = "L2-loss"; private readonly int _scoreSize; - private readonly VBuffer> _quantiles; + private readonly ReadOnlyMemory[] _quantiles; private readonly ColumnType _outputType; - public QuantileRegressionPerInstanceEvaluator(IHostEnvironment env, ISchema schema, string scoreCol, string labelCol, int scoreSize, VBuffer> quantiles) + public QuantileRegressionPerInstanceEvaluator(IHostEnvironment env, ISchema schema, string scoreCol, string labelCol, int scoreSize, ReadOnlyMemory[] quantiles) : base(env, schema, scoreCol, labelCol) { Host.CheckParam(scoreSize > 0, nameof(scoreSize), "must be greater than 0"); - if (!quantiles.IsDense) - throw Host.ExceptParam(nameof(quantiles), "buffer must be dense"); - if (quantiles.Length != scoreSize) - throw Host.ExceptParam(nameof(quantiles), "buffer must be of length '{0}'", scoreSize); + if (Utils.Size(quantiles) != scoreSize) + throw Host.ExceptParam(nameof(quantiles), "array must be of length '{0}'", scoreSize); CheckInputColumnTypes(schema); _scoreSize = scoreSize; _quantiles = quantiles; @@ -310,10 +304,9 @@ private QuantileRegressionPerInstanceEvaluator(IHostEnvironment env, ModelLoadCo _scoreSize = ctx.Reader.ReadInt32(); Host.CheckDecode(_scoreSize > 0); - ReadOnlyMemory[] quantiles = new ReadOnlyMemory[_scoreSize]; + _quantiles = new ReadOnlyMemory[_scoreSize]; for (int i = 0; i < _scoreSize; i++) - quantiles[i] = ctx.LoadNonEmptyString().AsMemory(); - _quantiles = new VBuffer>(quantiles.Length, quantiles); + _quantiles[i] = ctx.LoadNonEmptyString().AsMemory(); _outputType = new VectorType(NumberType.R8, _scoreSize); } @@ -340,9 +333,8 @@ public override void Save(ModelSaveContext ctx) base.Save(ctx); Host.Assert(_scoreSize > 0); ctx.Writer.Write(_scoreSize); - var quantiles = _quantiles.GetValues(); for (int i = 0; i < _scoreSize; i++) - ctx.SaveNonEmptyString(quantiles[i].ToString()); + ctx.SaveNonEmptyString(_quantiles[i].ToString()); } public override Func GetDependencies(Func activeOutput) @@ -372,11 +364,12 @@ private ValueGetter>> CreateSlotNamesGetter(string return (ref VBuffer> dst) => { - var editor = VBufferEditor.Create(ref dst, _scoreSize); - var quantiles = _quantiles.GetValues(); + var values = dst.Values; + if (Utils.Size(values) < _scoreSize) + values = new ReadOnlyMemory[_scoreSize]; for (int i = 0; i < _scoreSize; i++) - editor.Values[i] = string.Format("{0} ({1})", prefix, quantiles[i]).AsMemory(); - dst = editor.Commit(); + values[i] = string.Format("{0} ({1})", prefix, _quantiles[i]).AsMemory(); + dst = new VBuffer>(_scoreSize, values); }; } @@ -407,9 +400,8 @@ public override Delegate[] CreateGetters(IRow input, Func activeCols, labelGetter(ref label); scoreGetter(ref score); var lab = (Double)label; - var l1Editor = VBufferEditor.CreateFromBuffer(ref l1); foreach (var s in score.Items(all: true)) - l1Editor.Values[s.Key] = Math.Abs(lab - s.Value); + l1.Values[s.Key] = Math.Abs(lab - s.Value); cachedPosition = input.Position; } }; @@ -434,7 +426,7 @@ public override Delegate[] CreateGetters(IRow input, Func activeCols, (ref VBuffer dst) => { updateCacheIfNeeded(); - VBufferUtils.Resize(ref dst, _scoreSize, 0); + dst = new VBuffer(_scoreSize, 0, dst.Values, dst.Indices); VBufferUtils.ApplyWith(in l1, ref dst, sqr); }; getters[L2Col] = l2Fn; diff --git a/src/Microsoft.ML.Data/Evaluators/RankerEvaluator.cs b/src/Microsoft.ML.Data/Evaluators/RankerEvaluator.cs index 4c43ba274f..46278662f2 100644 --- a/src/Microsoft.ML.Data/Evaluators/RankerEvaluator.cs +++ b/src/Microsoft.ML.Data/Evaluators/RankerEvaluator.cs @@ -522,19 +522,25 @@ public ValueGetter>> GetGroupSummarySlotNames(strin return (ref VBuffer> dst) => { - var editor = VBufferEditor.Create(ref dst, UnweightedCounters.TruncationLevel); + var values = dst.Values; + if (Utils.Size(values) < UnweightedCounters.TruncationLevel) + values = new ReadOnlyMemory[UnweightedCounters.TruncationLevel]; + for (int i = 0; i < UnweightedCounters.TruncationLevel; i++) - editor.Values[i] = string.Format("{0}@{1}", prefix, i + 1).AsMemory(); - dst = editor.Commit(); + values[i] = string.Format("{0}@{1}", prefix, i + 1).AsMemory(); + dst = new VBuffer>(UnweightedCounters.TruncationLevel, values); }; } public void GetSlotNames(ref VBuffer> slotNames) { - var editor = VBufferEditor.Create(ref slotNames, UnweightedCounters.TruncationLevel); + var values = slotNames.Values; + if (Utils.Size(values) < UnweightedCounters.TruncationLevel) + values = new ReadOnlyMemory[UnweightedCounters.TruncationLevel]; + for (int i = 0; i < UnweightedCounters.TruncationLevel; i++) - editor.Values[i] = string.Format("@{0}", i + 1).AsMemory(); - slotNames = editor.Commit(); + values[i] = string.Format("@{0}", i + 1).AsMemory(); + slotNames = new VBuffer>(UnweightedCounters.TruncationLevel, values); } } @@ -567,8 +573,8 @@ internal Result(IExceptionContext ectx, IRow overallResult) { VBuffer Fetch(string name) => Fetch>(ectx, overallResult, name); - Dcg = Fetch(RankerEvaluator.Dcg).GetValues().ToArray(); - Ndcg = Fetch(RankerEvaluator.Ndcg).GetValues().ToArray(); + Dcg = Fetch(RankerEvaluator.Dcg).Values; + Ndcg = Fetch(RankerEvaluator.Ndcg).Values; } } } @@ -629,9 +635,9 @@ public void Save(ModelSaveContext ctx) _transform.Save(ctx); } - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { - return _transform.GetRowCount(); + return _transform.GetRowCount(lazy); } public IRowCursor GetRowCursor(Func needCol, IRandom rand = null) @@ -699,12 +705,14 @@ protected override void GetMetadataCore(string kind, int iinfo, ref TVal private void SlotNamesGetter(int iinfo, ref VBuffer> dst) { Contracts.Assert(0 <= iinfo && iinfo < InfoCount); - var editor = VBufferEditor.Create(ref dst, _truncationLevel); + var values = dst.Values; + if (Utils.Size(values) < _truncationLevel) + values = new ReadOnlyMemory[_truncationLevel]; for (int i = 0; i < _truncationLevel; i++) - editor.Values[i] = + values[i] = string.Format("{0}@{1}", iinfo == NdcgCol ? Ndcg : iinfo == DcgCol ? Dcg : MaxDcg, i + 1).AsMemory(); - dst = editor.Commit(); + dst = new VBuffer>(_truncationLevel, values); } } @@ -794,9 +802,11 @@ protected override Delegate[] CreateGetters(RowCursorState state, Func dst) { Host.AssertValue(src); - var editor = VBufferEditor.Create(ref dst, src.Length); - src.CopyTo(editor.Values); - dst = editor.Commit(); + var values = dst.Values; + if (Utils.Size(values) < src.Length) + values = new Double[src.Length]; + src.CopyTo(values, 0); + dst = new VBuffer(src.Length, values); } protected override ValueGetter GetLabelGetter(IRow row) diff --git a/src/Microsoft.ML.Data/MLContext.cs b/src/Microsoft.ML.Data/MLContext.cs index 528a3fac70..658185e052 100644 --- a/src/Microsoft.ML.Data/MLContext.cs +++ b/src/Microsoft.ML.Data/MLContext.cs @@ -53,7 +53,7 @@ public sealed class MLContext : IHostEnvironment /// /// Data loading and saving. /// - public DataOperations Data { get; } + public DataLoadSaveOperations Data { get; } // REVIEW: I think it's valuable to have the simplest possible interface for logging interception here, // and expand if and when necessary. Exposing classes like ChannelMessage, MessageSensitivity and so on @@ -85,7 +85,7 @@ public MLContext(int? seed = null, int conc = 0) Ranking = new RankingContext(_env); Transforms = new TransformsCatalog(_env); Model = new ModelOperationsCatalog(_env); - Data = new DataOperations(_env); + Data = new DataLoadSaveOperations(_env); } private CompositionContainer MakeCompositionContainer() diff --git a/src/Microsoft.ML.Data/Model/ModelHeader.cs b/src/Microsoft.ML.Data/Model/ModelHeader.cs index b74d0fdca6..9acaaccfee 100644 --- a/src/Microsoft.ML.Data/Model/ModelHeader.cs +++ b/src/Microsoft.ML.Data/Model/ModelHeader.cs @@ -12,7 +12,7 @@ namespace Microsoft.ML.Runtime.Model { [StructLayout(LayoutKind.Explicit, Size = ModelHeader.Size)] - internal struct ModelHeader + public struct ModelHeader { /// /// This spells 'ML MODEL' with zero replacing space (assuming little endian). diff --git a/src/Microsoft.ML.Data/Model/ModelLoadContext.cs b/src/Microsoft.ML.Data/Model/ModelLoadContext.cs index 749a226012..7efd9f4b47 100644 --- a/src/Microsoft.ML.Data/Model/ModelLoadContext.cs +++ b/src/Microsoft.ML.Data/Model/ModelLoadContext.cs @@ -50,8 +50,7 @@ public sealed partial class ModelLoadContext : IDisposable /// /// The main stream's model header. /// - [BestFriend] - internal ModelHeader Header; + public ModelHeader Header; /// /// The min file position of the main stream. @@ -71,7 +70,7 @@ public sealed partial class ModelLoadContext : IDisposable /// /// Create a ModelLoadContext supporting loading from a repository, for implementors of ICanSaveModel. /// - internal ModelLoadContext(RepositoryReader rep, Repository.Entry ent, string dir) + public ModelLoadContext(RepositoryReader rep, Repository.Entry ent, string dir) { Contracts.CheckValue(rep, nameof(rep)); Repository = rep; @@ -97,7 +96,7 @@ internal ModelLoadContext(RepositoryReader rep, Repository.Entry ent, string dir /// /// Create a ModelLoadContext supporting loading from a single-stream, for implementors of ICanSaveInBinaryFormat. /// - internal ModelLoadContext(BinaryReader reader, IExceptionContext ectx = null) + public ModelLoadContext(BinaryReader reader, IExceptionContext ectx = null) { Contracts.AssertValueOrNull(ectx); _ectx = ectx; diff --git a/src/Microsoft.ML.Data/Model/ModelSaveContext.cs b/src/Microsoft.ML.Data/Model/ModelSaveContext.cs index eee8d23df7..c5a9199758 100644 --- a/src/Microsoft.ML.Data/Model/ModelSaveContext.cs +++ b/src/Microsoft.ML.Data/Model/ModelSaveContext.cs @@ -11,9 +11,9 @@ namespace Microsoft.ML.Runtime.Model { /// /// This is a convenience context object for saving models to a repository, for - /// implementors of . It is not mandated but designed to reduce the + /// implementors of ICanSaveModel. It is not mandated but designed to reduce the /// amount of boiler plate code. It can also be used when saving to a single stream, - /// for implementors of . + /// for implementors of ICanSaveInBinaryFormat. /// public sealed partial class ModelSaveContext : IDisposable { @@ -37,14 +37,12 @@ public sealed partial class ModelSaveContext : IDisposable /// /// The strings that will be saved in the main stream's string table. /// - [BestFriend] - internal readonly NormStr.Pool Strings; + public readonly NormStr.Pool Strings; /// /// The main stream's model header. /// - [BestFriend] - internal ModelHeader Header; + public ModelHeader Header; /// /// The min file position of the main stream. @@ -72,9 +70,9 @@ public sealed partial class ModelSaveContext : IDisposable public bool InRepository { get { return Repository != null; } } /// - /// Create a supporting saving to a repository, for implementors of . + /// Create a ModelSaveContext supporting saving to a repository, for implementors of ICanSaveModel. /// - internal ModelSaveContext(RepositoryWriter rep, string dir, string name) + public ModelSaveContext(RepositoryWriter rep, string dir, string name) { Contracts.CheckValue(rep, nameof(rep)); Repository = rep; @@ -108,9 +106,9 @@ internal ModelSaveContext(RepositoryWriter rep, string dir, string name) } /// - /// Create a supporting saving to a single-stream, for implementors of . + /// Create a ModelSaveContext supporting saving to a single-stream, for implementors of ICanSaveInBinaryFormat. /// - internal ModelSaveContext(BinaryWriter writer, IExceptionContext ectx = null) + public ModelSaveContext(BinaryWriter writer, IExceptionContext ectx = null) { Contracts.AssertValueOrNull(ectx); _ectx = ectx; @@ -132,7 +130,7 @@ public void CheckAtModel() /// /// Set the version information in the main stream's header. This should be called before - /// is called. + /// Done is called. /// /// public void SetVersionInfo(VersionInfo ver) @@ -215,7 +213,7 @@ public void SaveNonEmptyString(ReadOnlyMemory str) /// /// Commit the save operation. This completes writing of the main stream. When in repository - /// mode, it disposes (but not ). + /// mode, it disposes the Writer (but not the repository). /// public void Done() { diff --git a/src/Microsoft.ML.Data/Model/Onnx/ICanSaveOnnx.cs b/src/Microsoft.ML.Data/Model/Onnx/ICanSaveOnnx.cs index dfc8756303..37d938e234 100644 --- a/src/Microsoft.ML.Data/Model/Onnx/ICanSaveOnnx.cs +++ b/src/Microsoft.ML.Data/Model/Onnx/ICanSaveOnnx.cs @@ -6,8 +6,7 @@ namespace Microsoft.ML.Runtime.Model.Onnx { - [BestFriend] - internal interface ICanSaveOnnx + public interface ICanSaveOnnx { /// /// Whether this object really is capable of saving itself as part of an ONNX @@ -22,8 +21,7 @@ internal interface ICanSaveOnnx /// /// This component know how to save himself in ONNX format. /// - [BestFriend] - internal interface ISaveAsOnnx : ICanSaveOnnx + public interface ISaveAsOnnx : ICanSaveOnnx { /// /// Save as ONNX. @@ -35,8 +33,7 @@ internal interface ISaveAsOnnx : ICanSaveOnnx /// /// This data model component is savable as ONNX. /// - [BestFriend] - internal interface ITransformCanSaveOnnx : ISaveAsOnnx, IDataTransform + public interface ITransformCanSaveOnnx : ISaveAsOnnx, IDataTransform { } @@ -45,8 +42,7 @@ internal interface ITransformCanSaveOnnx : ISaveAsOnnx, IDataTransform /// typically called within an that is wrapping /// this mapper, and has already been bound to it. /// - [BestFriend] - internal interface IBindableCanSaveOnnx : ICanSaveOnnx, ISchemaBindableMapper + public interface IBindableCanSaveOnnx : ICanSaveOnnx, ISchemaBindableMapper { /// /// Save as ONNX. If is @@ -70,8 +66,7 @@ internal interface IBindableCanSaveOnnx : ICanSaveOnnx, ISchemaBindableMapper /// For simple mappers. Intended to be used for and /// instances. /// - [BestFriend] - internal interface ISingleCanSaveOnnx : ICanSaveOnnx + public interface ISingleCanSaveOnnx : ICanSaveOnnx { bool SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumn); } @@ -80,8 +75,7 @@ internal interface ISingleCanSaveOnnx : ICanSaveOnnx /// For simple mappers. Intended to be used for /// instances. /// - [BestFriend] - internal interface IDistCanSaveOnnx : ISingleCanSaveOnnx, IValueMapperDist + public interface IDistCanSaveOnnx : ISingleCanSaveOnnx, IValueMapperDist { new bool SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumn); } diff --git a/src/Microsoft.ML.Data/Model/Onnx/OnnxContext.cs b/src/Microsoft.ML.Data/Model/Onnx/OnnxContext.cs index 38d9f77915..850d2f6b64 100644 --- a/src/Microsoft.ML.Data/Model/Onnx/OnnxContext.cs +++ b/src/Microsoft.ML.Data/Model/Onnx/OnnxContext.cs @@ -7,8 +7,7 @@ namespace Microsoft.ML.Runtime.Model.Onnx { - [BestFriend] - internal enum OnnxVersion { Stable = 0, Experimental = 1 } + public enum OnnxVersion { Stable=0, Experimental=1 } /// /// A context for defining a ONNX output. The context internally contains the model-in-progress being built. This @@ -17,8 +16,7 @@ internal enum OnnxVersion { Stable = 0, Experimental = 1 } /// given to a component, all other components up to that component have already attempted to express themselves in /// this context, with their outputs possibly available in the ONNX graph. /// - [BestFriend] - internal abstract class OnnxContext + public abstract class OnnxContext { /// /// Generates a unique name for the node based on a prefix. diff --git a/src/Microsoft.ML.Data/Model/Pfa/BoundPfaContext.cs b/src/Microsoft.ML.Data/Model/Pfa/BoundPfaContext.cs index 5090ea542c..c75b760f3a 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/BoundPfaContext.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/BoundPfaContext.cs @@ -20,8 +20,7 @@ namespace Microsoft.ML.Runtime.Model.Pfa /// has facilities to remember what column name in maps to /// what token in the PFA being built up. /// - [BestFriend] - internal sealed class BoundPfaContext + public sealed class BoundPfaContext { /// /// The internal PFA context, for an escape hatch. diff --git a/src/Microsoft.ML.Data/Model/Pfa/ICanSavePfa.cs b/src/Microsoft.ML.Data/Model/Pfa/ICanSavePfa.cs index bcda835fe8..bc0266f96e 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/ICanSavePfa.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/ICanSavePfa.cs @@ -7,8 +7,7 @@ namespace Microsoft.ML.Runtime.Model.Pfa { - [BestFriend] - internal interface ICanSavePfa + public interface ICanSavePfa { /// /// Whether this object really is capable of saving itself as part of a PFA @@ -23,8 +22,7 @@ internal interface ICanSavePfa /// /// This component know how to save himself in Pfa format. /// - [BestFriend] - internal interface ISaveAsPfa : ICanSavePfa + public interface ISaveAsPfa : ICanSavePfa { /// /// Save as PFA. For any columns that are output, this interface should use @@ -39,9 +37,9 @@ internal interface ISaveAsPfa : ICanSavePfa /// /// This data model component is savable as PFA. See https://dmg.org/pfa/ . /// - [BestFriend] - internal interface ITransformCanSavePfa : ISaveAsPfa, IDataTransform + public interface ITransformCanSavePfa : ISaveAsPfa, IDataTransform { + } /// @@ -49,8 +47,7 @@ internal interface ITransformCanSavePfa : ISaveAsPfa, IDataTransform /// typically called within an that is wrapping /// this mapper, and has already been bound to it. /// - [BestFriend] - internal interface IBindableCanSavePfa : ICanSavePfa, ISchemaBindableMapper + public interface IBindableCanSavePfa : ICanSavePfa, ISchemaBindableMapper { /// /// Save as PFA. If is @@ -74,8 +71,7 @@ internal interface IBindableCanSavePfa : ICanSavePfa, ISchemaBindableMapper /// For simple mappers. Intended to be used for and /// instances. /// - [BestFriend] - internal interface ISingleCanSavePfa : ICanSavePfa + public interface ISingleCanSavePfa : ICanSavePfa { /// /// Implementors of this method are responsible for providing the PFA expression that @@ -96,8 +92,7 @@ internal interface ISingleCanSavePfa : ICanSavePfa /// For simple mappers. Intended to be used for /// instances. /// - [BestFriend] - internal interface IDistCanSavePfa : ISingleCanSavePfa, IValueMapperDist + public interface IDistCanSavePfa : ISingleCanSavePfa, IValueMapperDist { /// /// The call for distribution predictors. Unlike , diff --git a/src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs b/src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs index 110296e1d0..e772a65334 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/ModelUtils.cs @@ -6,7 +6,7 @@ namespace Microsoft.ML.Runtime.Model { - internal static class ModelUtils + public static class ModelUtils { private static string ArgCase(string name) { diff --git a/src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs b/src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs index 2d89916028..b21ceaa3f0 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/PfaContext.cs @@ -11,8 +11,7 @@ namespace Microsoft.ML.Runtime.Model.Pfa /// /// A context for defining a restricted sort of PFA output. /// - [BestFriend] - internal sealed class PfaContext + public sealed class PfaContext { public JToken InputType { get; set; } public JToken OutputType { get; set; } diff --git a/src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs b/src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs index 9b4f6bcf3f..dbfbb99732 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/PfaUtils.cs @@ -8,8 +8,7 @@ namespace Microsoft.ML.Runtime.Model.Pfa { - [BestFriend] - internal static class PfaUtils + public static class PfaUtils { public static JObject AddReturn(this JObject toEdit, string name, JToken value) { diff --git a/src/Microsoft.ML.Data/Model/Pfa/SavePfaCommand.cs b/src/Microsoft.ML.Data/Model/Pfa/SavePfaCommand.cs index 57a1f782c7..2f789b7851 100644 --- a/src/Microsoft.ML.Data/Model/Pfa/SavePfaCommand.cs +++ b/src/Microsoft.ML.Data/Model/Pfa/SavePfaCommand.cs @@ -19,7 +19,7 @@ namespace Microsoft.ML.Runtime.Model.Pfa { - internal sealed class SavePfaCommand : DataCommand.ImplBase + public sealed class SavePfaCommand : DataCommand.ImplBase { public const string Summary = "Given a data model, write out the corresponding PFA."; public const string LoadName = "SavePfa"; diff --git a/src/Microsoft.ML.Data/Model/Repository.cs b/src/Microsoft.ML.Data/Model/Repository.cs index c93e6d00b6..eb665f1bfc 100644 --- a/src/Microsoft.ML.Data/Model/Repository.cs +++ b/src/Microsoft.ML.Data/Model/Repository.cs @@ -226,7 +226,7 @@ protected void RemoveEntry(Entry ent) /// When we load those entries into our look-up dictionary, we normalize them to always use /// backward slashes. /// - protected static string NormalizeForArchiveEntry(string path) => path?.Replace('/', Path.DirectorySeparatorChar); + protected static string NormalizeForArchiveEntry(string path) => path?.Replace('/', '\\'); /// /// When building paths to our local file system, we want to force both forward and backward slashes @@ -497,38 +497,25 @@ public Entry OpenEntryOrNull(string dir, string name) string pathAbs; string pathLower = pathEnt.ToLowerInvariant(); if (PathMap.TryGetValue(pathLower, out pathAbs)) - { stream = new FileStream(pathAbs, FileMode.Open, FileAccess.Read); + else if (!_entries.TryGetValue(pathEnt, out entry)) + return null; + else if (pathTemp != null) + { + // Extract to a temporary file. + Directory.CreateDirectory(Path.GetDirectoryName(pathTemp)); + entry.ExtractToFile(pathTemp); + PathMap.Add(pathLower, pathTemp); + stream = new FileStream(pathTemp, FileMode.Open, FileAccess.Read); } else { - if (!_entries.TryGetValue(pathEnt, out entry)) - { - //Read old zip file that use backslash in filename - var pathEntTmp = pathEnt.Replace("/","\\"); - if (!_entries.TryGetValue(pathEntTmp, out entry)) - { - return null; - } - } - - if (pathTemp != null) - { - // Extract to a temporary file. - Directory.CreateDirectory(Path.GetDirectoryName(pathTemp)); - entry.ExtractToFile(pathTemp); - PathMap.Add(pathLower, pathTemp); - stream = new FileStream(pathTemp, FileMode.Open, FileAccess.Read); - } - else - { - // Extract to a memory stream. - ExceptionContext.CheckDecode(entry.Length < int.MaxValue, "Repository stream too large to read into memory"); - stream = new MemoryStream((int)entry.Length); - using (var src = entry.Open()) - src.CopyTo(stream); - stream.Position = 0; - } + // Extract to a memory stream. + ExceptionContext.CheckDecode(entry.Length < int.MaxValue, "Repository stream too large to read into memory"); + stream = new MemoryStream((int)entry.Length); + using (var src = entry.Open()) + src.CopyTo(stream); + stream.Position = 0; } return AddEntry(pathEnt, stream); diff --git a/src/Microsoft.ML.Data/Prediction/Calibrator.cs b/src/Microsoft.ML.Data/Prediction/Calibrator.cs index 20d87fcbf6..c05a87dbaf 100644 --- a/src/Microsoft.ML.Data/Prediction/Calibrator.cs +++ b/src/Microsoft.ML.Data/Prediction/Calibrator.cs @@ -224,8 +224,8 @@ public abstract class ValueMapperCalibratedPredictorBase : CalibratedPredictorBa public ColumnType InputType => _mapper.InputType; public ColumnType OutputType => _mapper.OutputType; public ColumnType DistType => NumberType.Float; - bool ICanSavePfa.CanSavePfa => (_mapper as ICanSavePfa)?.CanSavePfa == true; - bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => (_mapper as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; + public bool CanSavePfa => (_mapper as ICanSavePfa)?.CanSavePfa == true; + public bool CanSaveOnnx(OnnxContext ctx) => (_mapper as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; protected ValueMapperCalibratedPredictorBase(IHostEnvironment env, string name, IPredictorProducing predictor, ICalibrator calibrator) : base(env, name, predictor, calibrator) @@ -265,7 +265,7 @@ public ValueMapper> GetWhatTheFeatureMapper(int return _whatTheFeature.GetWhatTheFeatureMapper(top, bottom, normalize); } - JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) + public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckValue(input, nameof(input)); @@ -275,7 +275,7 @@ JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) return mapper.SaveAsPfa(ctx, input); } - void IDistCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input, + public void SaveAsPfa(BoundPfaContext ctx, JToken input, string score, out JToken scoreToken, string prob, out JToken probToken) { Host.CheckValue(ctx, nameof(ctx)); @@ -283,7 +283,7 @@ void IDistCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input, Host.CheckValueOrNull(score); Host.CheckValueOrNull(prob); - JToken scoreExpression = ((ISingleCanSavePfa)this).SaveAsPfa(ctx, input); + JToken scoreExpression = SaveAsPfa(ctx, input); scoreToken = ctx.DeclareVar(score, scoreExpression); var calibrator = Calibrator as ISingleCanSavePfa; if (calibrator?.CanSavePfa != true) @@ -296,10 +296,7 @@ void IDistCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input, probToken = ctx.DeclareVar(prob, probExpression); } - bool IDistCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumnName) - => ((ISingleCanSaveOnnx)this).SaveAsOnnx(ctx, outputNames, featureColumnName); - - bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumnName) + public bool SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumnName) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckValue(outputNames, nameof(outputNames)); @@ -623,9 +620,9 @@ private static VersionInfo GetVersionInfo() /// Whether we can save as PFA. Note that this depends on whether the underlying predictor /// can save as PFA, since in the event that this in particular does not get saved, /// - bool ICanSavePfa.CanSavePfa => (_bindable as ICanSavePfa)?.CanSavePfa == true; + public bool CanSavePfa => (_bindable as ICanSavePfa)?.CanSavePfa == true; - bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => (_bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; + public bool CanSaveOnnx(OnnxContext ctx) => (_bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; public SchemaBindableCalibratedPredictor(IHostEnvironment env, IPredictorProducing predictor, ICalibrator calibrator) : base(env, LoaderSignature, predictor, calibrator) @@ -656,22 +653,22 @@ public void Save(ModelSaveContext ctx) SaveCore(ctx); } - void IBindableCanSavePfa.SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputs) + public void SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputs) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckValue(schema, nameof(schema)); Host.CheckParam(Utils.Size(outputs) == 2, nameof(outputs), "Expected this to have two outputs"); - Host.Check(((ICanSavePfa)this).CanSavePfa, "Called despite not being savable"); + Host.Check(CanSavePfa, "Called despite not being savable"); ctx.Hide(outputs); } - bool IBindableCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputs) + public bool SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputs) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckParam(Utils.Size(outputs) == 2, nameof(outputs), "Expected this to have two outputs"); Host.CheckValue(schema, nameof(schema)); - Host.Check(((ICanSaveOnnx)this).CanSaveOnnx(ctx), "Called despite not being savable"); + Host.Check(CanSaveOnnx(ctx), "Called despite not being savable"); return false; } @@ -690,8 +687,7 @@ public ValueMapper> GetWhatTheFeatureMapper(int } } - [BestFriend] - internal static class CalibratorUtils + public static class CalibratorUtils { private static bool NeedCalibration(IHostEnvironment env, IChannel ch, ICalibratorTrainer calibrator, ITrainer trainer, IPredictor predictor, RoleMappedSchema schema) @@ -1352,8 +1348,8 @@ private static VersionInfo GetVersionInfo() public Double ParamA { get; } public Double ParamB { get; } - bool ICanSavePfa.CanSavePfa => true; - bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => true; + public bool CanSavePfa => true; + public bool CanSaveOnnx(OnnxContext ctx) => true; public PlattCalibrator(IHostEnvironment env, Double paramA, Double paramB) { @@ -1430,7 +1426,7 @@ public static Float PredictProbability(Float output, Double a, Double b) return (Float)(1 / (1 + Math.Exp(a * output + b))); } - JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) + public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) { _host.CheckValue(ctx, nameof(ctx)); _host.CheckValue(input, nameof(input)); @@ -1439,7 +1435,7 @@ JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) PfaUtils.Call("+", -ParamB, PfaUtils.Call("*", -ParamA, input))); } - bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] scoreProbablityColumnNames, string featureColumnName) + public bool SaveAsOnnx(OnnxContext ctx, string[] scoreProbablityColumnNames, string featureColumnName) { _host.CheckValue(ctx, nameof(ctx)); _host.CheckValue(scoreProbablityColumnNames, nameof(scoreProbablityColumnNames)); diff --git a/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs index 849318c1e0..97db2a8a07 100644 --- a/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Data/Properties/AssemblyInfo.cs @@ -2,36 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Reflection; using System.Runtime.CompilerServices; -using Microsoft.ML; +using System.Runtime.InteropServices; -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TestFramework" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.InferenceTesting" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransformTest" + PublicKey.TestValue)] - -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Legacy" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Maml" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.ResultProcessor" + PublicKey.Value)] - -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Api" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Ensemble" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.FastTree" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.HalLearners" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.KMeansClustering" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.LightGBM" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Onnx" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.OnnxTransform" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Parquet" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PCA" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PipelineInference" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Recommender" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Runtime.ImageAnalytics" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Scoring" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.StandardLearners" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Sweeper" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TensorFlow" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.TimeSeries" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Transforms" + PublicKey.Value)] - -[assembly: WantsToBeBestFriends] +[assembly: InternalsVisibleTo("Microsoft.ML.TestFramework, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")] diff --git a/src/Microsoft.ML.Data/Scorers/BinaryClassifierScorer.cs b/src/Microsoft.ML.Data/Scorers/BinaryClassifierScorer.cs index 56a72d3f92..958aba0da1 100644 --- a/src/Microsoft.ML.Data/Scorers/BinaryClassifierScorer.cs +++ b/src/Microsoft.ML.Data/Scorers/BinaryClassifierScorer.cs @@ -185,7 +185,7 @@ protected override void SaveCore(ModelSaveContext ctx) ctx.Writer.Write(_threshold); } - private protected override void SaveAsOnnxCore(OnnxContext ctx) + public override void SaveAsOnnx(OnnxContext ctx) { Host.CheckValue(ctx, nameof(ctx)); Host.Assert(Bindable is IBindableCanSaveOnnx); @@ -193,7 +193,7 @@ private protected override void SaveAsOnnxCore(OnnxContext ctx) if (!ctx.ContainsColumn(DefaultColumnNames.Features)) return; - base.SaveAsOnnxCore(ctx); + base.SaveAsOnnx(ctx); int delta = Bindings.DerivedColumnCount; Host.Assert(delta == 1); diff --git a/src/Microsoft.ML.Data/Scorers/GenericScorer.cs b/src/Microsoft.ML.Data/Scorers/GenericScorer.cs index ab3a74b26b..18fe6f2fda 100644 --- a/src/Microsoft.ML.Data/Scorers/GenericScorer.cs +++ b/src/Microsoft.ML.Data/Scorers/GenericScorer.cs @@ -141,9 +141,9 @@ private static VersionInfo GetVersionInfo() public override Schema Schema { get; } - bool ICanSavePfa.CanSavePfa => (Bindable as ICanSavePfa)?.CanSavePfa == true; + public bool CanSavePfa => (Bindable as ICanSavePfa)?.CanSavePfa == true; - bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => (Bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; + public bool CanSaveOnnx(OnnxContext ctx) => (Bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; /// /// The entry point for creating a . @@ -205,7 +205,7 @@ protected override void SaveCore(ModelSaveContext ctx) _bindings.Save(ctx); } - void ISaveAsPfa.SaveAsPfa(BoundPfaContext ctx) + public void SaveAsPfa(BoundPfaContext ctx) { Host.CheckValue(ctx, nameof(ctx)); Host.Assert(Bindable is IBindableCanSavePfa); @@ -220,7 +220,7 @@ void ISaveAsPfa.SaveAsPfa(BoundPfaContext ctx) pfaBindable.SaveAsPfa(ctx, schema, outColNames); } - void ISaveAsOnnx.SaveAsOnnx(OnnxContext ctx) + public void SaveAsOnnx(OnnxContext ctx) { Host.CheckValue(ctx, nameof(ctx)); Host.Assert(Bindable is IBindableCanSaveOnnx); diff --git a/src/Microsoft.ML.Data/Scorers/MultiClassClassifierScorer.cs b/src/Microsoft.ML.Data/Scorers/MultiClassClassifierScorer.cs index ddde2f9396..e4c2b80c83 100644 --- a/src/Microsoft.ML.Data/Scorers/MultiClassClassifierScorer.cs +++ b/src/Microsoft.ML.Data/Scorers/MultiClassClassifierScorer.cs @@ -77,8 +77,8 @@ public sealed class LabelNameBindableMapper : ISchemaBindableMapper, ICanSaveMod private readonly Func _canWrap; public VectorType Type => _type; - bool ICanSavePfa.CanSavePfa => (_bindable as ICanSavePfa)?.CanSavePfa == true; - bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => (_bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; + public bool CanSavePfa => (_bindable as ICanSavePfa)?.CanSavePfa == true; + public bool CanSaveOnnx(OnnxContext ctx) => (_bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; public ISchemaBindableMapper InnerBindable => _bindable; private static VersionInfo GetVersionInfo() @@ -196,20 +196,20 @@ private void SaveCore(ModelSaveContext ctx) throw _host.Except("We do not know how to serialize label names of type '{0}'", _type.ItemType); } - void IBindableCanSavePfa.SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) + public void SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) { Contracts.CheckValue(ctx, nameof(ctx)); Contracts.CheckValue(schema, nameof(schema)); - Contracts.Check(((ICanSavePfa)this).CanSavePfa, "Cannot be saved as PFA"); + Contracts.Check(CanSavePfa, "Cannot be saved as PFA"); Contracts.Assert(_bindable is IBindableCanSavePfa); ((IBindableCanSavePfa)_bindable).SaveAsPfa(ctx, schema, outputNames); } - bool IBindableCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) + public bool SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) { Contracts.CheckValue(ctx, nameof(ctx)); Contracts.CheckValue(schema, nameof(schema)); - Contracts.Check(((ICanSaveOnnx)this).CanSaveOnnx(ctx), "Cannot be saved as ONNX."); + Contracts.Check(CanSaveOnnx(ctx), "Cannot be saved as ONNX."); Contracts.Assert(_bindable is IBindableCanSaveOnnx); return ((IBindableCanSaveOnnx)_bindable).SaveAsOnnx(ctx, schema, outputNames); } diff --git a/src/Microsoft.ML.Data/Scorers/PredictedLabelScorerBase.cs b/src/Microsoft.ML.Data/Scorers/PredictedLabelScorerBase.cs index 3a6ef6d1e8..508cab37b9 100644 --- a/src/Microsoft.ML.Data/Scorers/PredictedLabelScorerBase.cs +++ b/src/Microsoft.ML.Data/Scorers/PredictedLabelScorerBase.cs @@ -194,7 +194,7 @@ protected override IEnumerable> GetMetadataType yield return TextType.Instance.GetPair(MetadataUtils.Kinds.ScoreValueKind); if (_predColMetadata != null) { - var sch = _predColMetadata.Schema; + ISchema sch = _predColMetadata.Schema; for (int i = 0; i < sch.ColumnCount; ++i) yield return new KeyValuePair(sch.GetColumnName(i), sch.GetColumnType(i)); } @@ -279,9 +279,9 @@ public override Func GetActiveMapperColumns(bool[] active) protected override BindingsBase GetBindings() => Bindings; public override Schema Schema { get; } - bool ICanSavePfa.CanSavePfa => (Bindable as ICanSavePfa)?.CanSavePfa == true; + public bool CanSavePfa => (Bindable as ICanSavePfa)?.CanSavePfa == true; - bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => (Bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; + public bool CanSaveOnnx(OnnxContext ctx) => (Bindable as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; protected PredictedLabelScorerBase(ScorerArgumentsBase args, IHostEnvironment env, IDataView data, ISchemaBoundMapper mapper, RoleMappedSchema trainSchema, string registrationName, string scoreColKind, string scoreColName, @@ -336,7 +336,7 @@ protected override void SaveCore(ModelSaveContext ctx) Bindings.Save(ctx); } - void ISaveAsPfa.SaveAsPfa(BoundPfaContext ctx) + public void SaveAsPfa(BoundPfaContext ctx) { Host.CheckValue(ctx, nameof(ctx)); Host.Assert(Bindable is IBindableCanSavePfa); @@ -365,10 +365,7 @@ void ISaveAsPfa.SaveAsPfa(BoundPfaContext ctx) protected abstract JToken PredictedLabelPfa(string[] mapperOutputs); - void ISaveAsOnnx.SaveAsOnnx(OnnxContext ctx) => SaveAsOnnxCore(ctx); - - [BestFriend] - private protected virtual void SaveAsOnnxCore(OnnxContext ctx) + public virtual void SaveAsOnnx(OnnxContext ctx) { Host.CheckValue(ctx, nameof(ctx)); Host.Assert(Bindable is IBindableCanSaveOnnx); diff --git a/src/Microsoft.ML.Data/Scorers/RowToRowScorerBase.cs b/src/Microsoft.ML.Data/Scorers/RowToRowScorerBase.cs index 066e459a54..c05baf50c6 100644 --- a/src/Microsoft.ML.Data/Scorers/RowToRowScorerBase.cs +++ b/src/Microsoft.ML.Data/Scorers/RowToRowScorerBase.cs @@ -214,7 +214,7 @@ protected override int MapColumnIndex(out bool isSrc, int col) return bindings.MapColumnIndex(out isSrc, col); } - private sealed class RowCursor : SynchronizedCursorBase, IRowCursor + protected sealed class RowCursor : SynchronizedCursorBase, IRowCursor { private readonly BindingsBase _bindings; private readonly bool[] _active; diff --git a/src/Microsoft.ML.Data/Scorers/SchemaBindablePredictorWrapper.cs b/src/Microsoft.ML.Data/Scorers/SchemaBindablePredictorWrapper.cs index eef238a29a..5a43f069c4 100644 --- a/src/Microsoft.ML.Data/Scorers/SchemaBindablePredictorWrapper.cs +++ b/src/Microsoft.ML.Data/Scorers/SchemaBindablePredictorWrapper.cs @@ -44,9 +44,9 @@ public abstract class SchemaBindablePredictorWrapperBase : ISchemaBindableMapper protected readonly IValueMapper ValueMapper; protected readonly ColumnType ScoreType; - bool ICanSavePfa.CanSavePfa => (ValueMapper as ICanSavePfa)?.CanSavePfa == true; + public bool CanSavePfa => (ValueMapper as ICanSavePfa)?.CanSavePfa == true; - bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => (ValueMapper as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; + public bool CanSaveOnnx(OnnxContext ctx) => (ValueMapper as ICanSaveOnnx)?.CanSaveOnnx(ctx) == true; public SchemaBindablePredictorWrapperBase(IPredictor predictor) { @@ -89,31 +89,17 @@ public virtual void Save(ModelSaveContext ctx) ctx.SaveModel(Predictor, ModelFileUtils.DirPredictor); } - void IBindableCanSavePfa.SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) + public virtual void SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) { Contracts.CheckValue(ctx, nameof(ctx)); Contracts.CheckValue(schema, nameof(schema)); Contracts.Assert(ValueMapper is ISingleCanSavePfa); - SaveAsPfaCore(ctx, schema, outputNames); - } + var mapper = (ISingleCanSavePfa)ValueMapper; - [BestFriend] - private protected virtual void SaveAsPfaCore(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) - { ctx.Hide(outputNames); } - bool IBindableCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) - { - Contracts.CheckValue(ctx, nameof(ctx)); - Contracts.CheckValue(schema, nameof(schema)); - Contracts.Assert(ValueMapper is ISingleCanSaveOnnx); - var mapper = (ISingleCanSaveOnnx)ValueMapper; - return SaveAsOnnxCore(ctx, schema, outputNames); - } - - [BestFriend] - private protected virtual bool SaveAsOnnxCore(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) => false; + public virtual bool SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) => false; public ISchemaBoundMapper Bind(IHostEnvironment env, RoleMappedSchema schema) { @@ -285,7 +271,7 @@ public override void Save(ModelSaveContext ctx) base.Save(ctx); } - private protected override void SaveAsPfaCore(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) + public override void SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) { Contracts.CheckValue(ctx, nameof(ctx)); Contracts.CheckValue(schema, nameof(schema)); @@ -301,7 +287,7 @@ private protected override void SaveAsPfaCore(BoundPfaContext ctx, RoleMappedSch ctx.DeclareVar(outputNames[0], scoreToken); } - private protected override bool SaveAsOnnxCore(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) + public override bool SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) { Contracts.CheckValue(ctx, nameof(ctx)); Contracts.CheckValue(schema, nameof(schema)); @@ -396,7 +382,7 @@ public override void Save(ModelSaveContext ctx) base.Save(ctx); } - private protected override void SaveAsPfaCore(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) + public override void SaveAsPfa(BoundPfaContext ctx, RoleMappedSchema schema, string[] outputNames) { Contracts.CheckValue(ctx, nameof(ctx)); Contracts.CheckValue(schema, nameof(schema)); @@ -416,7 +402,7 @@ private protected override void SaveAsPfaCore(BoundPfaContext ctx, RoleMappedSch Contracts.Assert(ctx.TokenOrNullForName(outputNames[1]) == probToken.ToString()); } - private protected override bool SaveAsOnnxCore(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) + public override bool SaveAsOnnx(OnnxContext ctx, RoleMappedSchema schema, string[] outputNames) { Contracts.CheckValue(ctx, nameof(ctx)); Contracts.CheckValue(schema, nameof(schema)); @@ -754,10 +740,12 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) Contracts.Assert(Utils.Size(_slotNames) > 0); int size = Utils.Size(_slotNames); - var editor = VBufferEditor.Create(ref dst, size); + var values = dst.Values; + if (Utils.Size(values) < size) + values = new ReadOnlyMemory[size]; for (int i = 0; i < _slotNames.Length; i++) - editor.Values[i] = _slotNames[i].AsMemory(); - dst = editor.Commit(); + values[i] = _slotNames[i].AsMemory(); + dst = new VBuffer>(size, values, dst.Indices); } } } diff --git a/src/Microsoft.ML.Data/StaticPipe/DataLoadSaveOperationsExtensions.cs b/src/Microsoft.ML.Data/StaticPipe/DataLoadSaveOperationsExtensions.cs index 57adb1be4d..4449c5a388 100644 --- a/src/Microsoft.ML.Data/StaticPipe/DataLoadSaveOperationsExtensions.cs +++ b/src/Microsoft.ML.Data/StaticPipe/DataLoadSaveOperationsExtensions.cs @@ -41,7 +41,7 @@ public static class DataLoadSaveOperationsExtensions /// Remove trailing whitespace from lines. /// A configured statically-typed reader for text files. public static DataReader TextReader<[IsShape] TShape>( - this DataOperations catalog, Func func, IMultiStreamSource files = null, + this DataLoadSaveOperations catalog, Func func, IMultiStreamSource files = null, bool hasHeader = false, char separator = '\t', bool allowQuoting = true, bool allowSparse = true, bool trimWhitspace = false) => TextLoader.CreateReader(catalog.Environment, func, files, hasHeader, separator, allowQuoting, allowSparse, trimWhitspace); diff --git a/src/Microsoft.ML.Data/StaticPipe/Reconciler.cs b/src/Microsoft.ML.Data/StaticPipe/Reconciler.cs index dd9318b6c4..4eb2b6de2e 100644 --- a/src/Microsoft.ML.Data/StaticPipe/Reconciler.cs +++ b/src/Microsoft.ML.Data/StaticPipe/Reconciler.cs @@ -64,7 +64,7 @@ public EstimatorReconciler() : base() { } /// subset of estimator transforms do not allow this: they produce columns whose names are unconfigurable. For /// these, there is this collection which provides the names used by the analysis tool. If the estimator under /// construction must use one of the names here, then they are responsible for "saving" the column they will - /// overwrite using applications of the . Note that if the estimator under + /// overwrite using applications of the . Note that if the estimator under /// construction has complete control over what columns it produces, there is no need for it to pay this argument /// any attention. /// Returns an estimator. diff --git a/src/Microsoft.ML.Data/StaticPipe/StaticPipeUtils.cs b/src/Microsoft.ML.Data/StaticPipe/StaticPipeUtils.cs index 4e66b91762..dfbacbacf1 100644 --- a/src/Microsoft.ML.Data/StaticPipe/StaticPipeUtils.cs +++ b/src/Microsoft.ML.Data/StaticPipe/StaticPipeUtils.cs @@ -162,7 +162,7 @@ internal static IDataReaderEstimator> // If any renamings were necessary, create the CopyColumns estimator. if (toCopy.Count > 0) - estimator = new ColumnsCopyingEstimator(env, toCopy.ToArray()); + estimator = new CopyColumnsEstimator(env, toCopy.ToArray()); // First clear the inputs from zero-dependencies yet to be resolved. foreach (var col in baseInputs) @@ -281,7 +281,7 @@ internal static IDataReaderEstimator> // If any final renamings were necessary, insert the appropriate CopyColumns transform. if (toCopy.Count > 0) { - var copyEstimator = new ColumnsCopyingEstimator(env, toCopy.ToArray()); + var copyEstimator = new CopyColumnsEstimator(env, toCopy.ToArray()); if (estimator == null) estimator = copyEstimator; else diff --git a/src/Microsoft.ML.Data/StaticPipe/TrainerEstimatorReconciler.cs b/src/Microsoft.ML.Data/StaticPipe/TrainerEstimatorReconciler.cs index f2d87db6de..ce458ba9da 100644 --- a/src/Microsoft.ML.Data/StaticPipe/TrainerEstimatorReconciler.cs +++ b/src/Microsoft.ML.Data/StaticPipe/TrainerEstimatorReconciler.cs @@ -55,7 +55,7 @@ protected TrainerEstimatorReconciler(PipelineColumn[] inputs, string[] outputNam /// /// Produces the estimator. Note that this is made out of 's - /// return value, plus whatever usages of are necessary to avoid collisions with + /// return value, plus whatever usages of are necessary to avoid collisions with /// the output names fed to the constructor. This class provides the implementation, and subclasses should instead /// override . /// @@ -102,7 +102,7 @@ public sealed override IEstimator Reconcile(IHostEnvironment env, newInputNames[p.Key] = old2New.ContainsKey(p.Value) ? old2New[p.Value] : p.Value; inputNames = newInputNames; } - result = new ColumnsCopyingEstimator(env, old2New.Select(p => (p.Key, p.Value)).ToArray()); + result = new CopyColumnsEstimator(env, old2New.Select(p => (p.Key, p.Value)).ToArray()); } // Map the inputs to the names. @@ -128,7 +128,7 @@ public sealed override IEstimator Reconcile(IHostEnvironment env, foreach (var p in old2New) toRename.Add((p.Value, p.Key)); if (toRename.Count > 0) - result = result.Append(new ColumnsCopyingEstimator(env, toRename.ToArray())); + result = result.Append(new CopyColumnsEstimator(env, toRename.ToArray())); return result; } diff --git a/src/Microsoft.ML.Data/TrainContext.cs b/src/Microsoft.ML.Data/TrainContext.cs index ff4648156c..33e66a5c67 100644 --- a/src/Microsoft.ML.Data/TrainContext.cs +++ b/src/Microsoft.ML.Data/TrainContext.cs @@ -328,36 +328,14 @@ public ClusteringEvaluator.Result Evaluate(IDataView data, Host.CheckNonEmpty(score, nameof(score)); if(features != null) - Host.CheckNonEmpty(features, nameof(features), "The features column name should be non-empty if you want to calculate the Dbi metric."); + Host.CheckNonEmpty(features, nameof(features), "The features column name should be non-empty, if provided, if you want to calculate the Dbi metric."); if (label != null) - Host.CheckNonEmpty(label, nameof(label), "The label column name should be non-empty if you want to calculate the Nmi metric."); + Host.CheckNonEmpty(label, nameof(label), "The features column name should be non-empty, if provided, if you want to calculate the Nmi metric."); var eval = new ClusteringEvaluator(Host, new ClusteringEvaluator.Arguments() { CalculateDbi = !string.IsNullOrEmpty(features) }); return eval.Evaluate(data, score, label, features); } - - /// - /// Run cross-validation over folds of , by fitting , - /// and respecting if provided. - /// Then evaluate each sub-model against and return metrics. - /// - /// The data to run cross-validation on. - /// The estimator to fit. - /// Number of cross-validation folds. - /// Optional label column for evaluation (clustering tasks may not always have a label). - /// Optional features column for evaluation (needed for calculating Dbi metric) - /// Optional stratification column. - /// If two examples share the same value of the (if provided), - /// they are guaranteed to appear in the same subset (train or test). Use this to make sure there is no label leakage from - /// train to the test set. - /// Per-fold results: metrics, models, scored datasets. - public (ClusteringEvaluator.Result metrics, ITransformer model, IDataView scoredTestData)[] CrossValidate( - IDataView data, IEstimator estimator, int numFolds = 5, string labelColumn = null, string featuresColumn = null, string stratificationColumn = null) - { - var result = CrossValidateTrain(data, estimator, numFolds, stratificationColumn); - return result.Select(x => (Evaluate(x.scoredTestSet, label: labelColumn, features: featuresColumn), x.model, x.scoredTestSet)).ToArray(); - } } /// diff --git a/src/Microsoft.ML.Data/Training/TrainerBase.cs b/src/Microsoft.ML.Data/Training/TrainerBase.cs index d82dfb7ba6..ca2f2c7b64 100644 --- a/src/Microsoft.ML.Data/Training/TrainerBase.cs +++ b/src/Microsoft.ML.Data/Training/TrainerBase.cs @@ -19,8 +19,7 @@ public abstract class TrainerBase : ITrainer public abstract PredictionKind PredictionKind { get; } public abstract TrainerInfo Info { get; } - [BestFriend] - private protected TrainerBase(IHostEnvironment env, string name) + protected TrainerBase(IHostEnvironment env, string name) { Contracts.CheckValue(env, nameof(env)); env.CheckNonEmpty(name, nameof(name)); @@ -31,9 +30,6 @@ private protected TrainerBase(IHostEnvironment env, string name) IPredictor ITrainer.Train(TrainContext context) => Train(context); - TPredictor ITrainer.Train(TrainContext context) => Train(context); - - [BestFriend] - private protected abstract TPredictor Train(TrainContext context); + public abstract TPredictor Train(TrainContext context); } } diff --git a/src/Microsoft.ML.Data/Training/TrainerEstimatorBase.cs b/src/Microsoft.ML.Data/Training/TrainerEstimatorBase.cs index 1e49c32ed3..ad2916368d 100644 --- a/src/Microsoft.ML.Data/Training/TrainerEstimatorBase.cs +++ b/src/Microsoft.ML.Data/Training/TrainerEstimatorBase.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Linq; using Microsoft.ML.Core.Data; -using Microsoft.ML.Data; using Microsoft.ML.Runtime.Data; namespace Microsoft.ML.Runtime.Training @@ -51,8 +50,7 @@ public abstract class TrainerEstimatorBase : ITrainerEstim public abstract PredictionKind PredictionKind { get; } - [BestFriend] - private protected TrainerEstimatorBase(IHost host, + public TrainerEstimatorBase(IHost host, SchemaShape.Column feature, SchemaShape.Column label, SchemaShape.Column weight = null) @@ -88,7 +86,7 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) /// protected abstract SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema); - TModel ITrainer.Train(TrainContext context) + public TModel Train(TrainContext context) { Host.CheckValue(context, nameof(context)); return TrainModelCore(context); @@ -146,19 +144,18 @@ protected TTransformer TrainTransformer(IDataView trainSet, validRoles = MakeRoles(cachedValid); } - var pred = TrainModelCore(new TrainContext(trainRoles, validRoles, null, initPredictor)); + var pred = TrainModelCore(new TrainContext(trainRoles, validRoles, initPredictor)); return MakeTransformer(pred, trainSet.Schema); } - [BestFriend] - private protected abstract TModel TrainModelCore(TrainContext trainContext); + protected abstract TModel TrainModelCore(TrainContext trainContext); protected abstract TTransformer MakeTransformer(TModel model, Schema trainSchema); protected virtual RoleMappedData MakeRoles(IDataView data) => new RoleMappedData(data, label: LabelColumn?.Name, feature: FeatureColumn.Name, weight: WeightColumn?.Name); - IPredictor ITrainer.Train(TrainContext context) => ((ITrainer)this).Train(context); + IPredictor ITrainer.Train(TrainContext context) => Train(context); } /// diff --git a/src/Microsoft.ML.Data/Transforms/BindingsWrappedRowCursor.cs b/src/Microsoft.ML.Data/Transforms/BindingsWrappedRowCursor.cs index 409d0dbeaa..4959b7c7b2 100644 --- a/src/Microsoft.ML.Data/Transforms/BindingsWrappedRowCursor.cs +++ b/src/Microsoft.ML.Data/Transforms/BindingsWrappedRowCursor.cs @@ -11,7 +11,7 @@ namespace Microsoft.ML.Runtime.Data /// inconvenient or inefficient to handle the "no output selected" case in their /// own implementation. /// - internal sealed class BindingsWrappedRowCursor : SynchronizedCursorBase, IRowCursor + public sealed class BindingsWrappedRowCursor : SynchronizedCursorBase, IRowCursor { private readonly ColumnBindingsBase _bindings; diff --git a/src/Microsoft.ML.Data/Transforms/CatalogUtils.cs b/src/Microsoft.ML.Data/Transforms/CatalogUtils.cs index 3f7c3356c3..98d3a3afc0 100644 --- a/src/Microsoft.ML.Data/Transforms/CatalogUtils.cs +++ b/src/Microsoft.ML.Data/Transforms/CatalogUtils.cs @@ -16,7 +16,7 @@ public static class CatalogUtils public static IHostEnvironment GetEnvironment(this TransformsCatalog catalog) => Contracts.CheckRef(catalog, nameof(catalog)).Environment; public static IHostEnvironment GetEnvironment(this TransformsCatalog.SubCatalogBase subCatalog) => Contracts.CheckRef(subCatalog, nameof(subCatalog)).Environment; public static IHostEnvironment GetEnvironment(this ModelOperationsCatalog catalog) => Contracts.CheckRef(catalog, nameof(catalog)).Environment; - public static IHostEnvironment GetEnvironment(this DataOperations catalog) => Contracts.CheckRef(catalog, nameof(catalog)).Environment; + public static IHostEnvironment GetEnvironment(this DataLoadSaveOperations catalog) => Contracts.CheckRef(catalog, nameof(catalog)).Environment; public static IHostEnvironment GetEnvironment(TrainContextBase.ContextInstantiatorBase obj) => Contracts.CheckRef(obj, nameof(obj)).Owner.Environment; public static IHostEnvironment GetEnvironment(TrainContextBase ctx) => Contracts.CheckRef(ctx, nameof(ctx)).Environment; diff --git a/src/Microsoft.ML.Data/Transforms/CategoricalCatalog.cs b/src/Microsoft.ML.Data/Transforms/CategoricalCatalog.cs index 8d2910d3e9..c2657da11b 100644 --- a/src/Microsoft.ML.Data/Transforms/CategoricalCatalog.cs +++ b/src/Microsoft.ML.Data/Transforms/CategoricalCatalog.cs @@ -9,7 +9,7 @@ namespace Microsoft.ML { /// - /// Extensions for the ValueToKey transformation's catalog + /// Extensions for the ValueToKeyMappingEstimator /// public static class ValueToKeyCatalog { @@ -26,7 +26,7 @@ public static ValueToKeyMappingEstimator MapValueToKey(this TransformsCatalog.Ca string inputColumn, string outputColumn = null, int maxNumTerms = ValueToKeyMappingEstimator.Defaults.MaxNumTerms, - ValueToKeyMappingTransformer.SortOrder sort = ValueToKeyMappingEstimator.Defaults.Sort) + TermTransform.SortOrder sort = ValueToKeyMappingEstimator.Defaults.Sort) => new ValueToKeyMappingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, maxNumTerms, sort); /// @@ -38,7 +38,7 @@ public static ValueToKeyMappingEstimator MapValueToKey(this TransformsCatalog.Ca /// /// public static ValueToKeyMappingEstimator MapValueToKey(this TransformsCatalog.CategoricalTransforms catalog, - ValueToKeyMappingTransformer.ColumnInfo[] columns, + TermTransform.ColumnInfo[] columns, string file = null, string termsColumn = null, IComponentFactory loaderFactory = null) diff --git a/src/Microsoft.ML.Data/Transforms/ColumnBindingsBase.cs b/src/Microsoft.ML.Data/Transforms/ColumnBindingsBase.cs index 8107404271..f9909aed7a 100644 --- a/src/Microsoft.ML.Data/Transforms/ColumnBindingsBase.cs +++ b/src/Microsoft.ML.Data/Transforms/ColumnBindingsBase.cs @@ -323,8 +323,8 @@ protected ColumnBindingsBase(ISchema input, bool user, params string[] names) // warning if we decide to rename this argument, and so know to change the below hard-coded // standard column name. const string standardColumnArgName = "Column"; - Contracts.Assert(nameof(ValueToKeyMappingTransformer.Arguments.Column) == standardColumnArgName); - Contracts.Assert(nameof(ColumnConcatenatingTransformer.Arguments.Column) == standardColumnArgName); + Contracts.Assert(nameof(TermTransform.Arguments.Column) == standardColumnArgName); + Contracts.Assert(nameof(ConcatTransform.Arguments.Column) == standardColumnArgName); for (int iinfo = 0; iinfo < names.Length; iinfo++) { @@ -817,8 +817,8 @@ protected ManyToOneColumnBindingsBase(ManyToOneColumn[] column, ISchema input, F // warning if we decide to rename this argument, and so know to change the below hard-coded // standard column name. const string standardColumnArgName = "Column"; - Contracts.Assert(nameof(ValueToKeyMappingTransformer.Arguments.Column) == standardColumnArgName); - Contracts.Assert(nameof(ColumnConcatenatingTransformer.Arguments.Column) == standardColumnArgName); + Contracts.Assert(nameof(TermTransform.Arguments.Column) == standardColumnArgName); + Contracts.Assert(nameof(ConcatTransform.Arguments.Column) == standardColumnArgName); Infos = new ColInfo[InfoCount]; for (int i = 0; i < Infos.Length; i++) diff --git a/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingEstimator.cs b/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingEstimator.cs index 09b20ceddc..7cf61df705 100644 --- a/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingEstimator.cs +++ b/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingEstimator.cs @@ -43,7 +43,7 @@ public ColumnConcatenatingEstimator (IHostEnvironment env, string outputColumn, public ITransformer Fit(IDataView input) { _host.CheckValue(input, nameof(input)); - return new ColumnConcatenatingTransformer(_host, _name, _source); + return new ConcatTransform(_host, _name, _source); } private bool HasCategoricals(SchemaShape.Column col) diff --git a/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingTransformer.cs b/src/Microsoft.ML.Data/Transforms/ConcatTransform.cs similarity index 84% rename from src/Microsoft.ML.Data/Transforms/ColumnConcatenatingTransformer.cs rename to src/Microsoft.ML.Data/Transforms/ConcatTransform.cs index 9c01ec4ed4..0348fbe40f 100644 --- a/src/Microsoft.ML.Data/Transforms/ColumnConcatenatingTransformer.cs +++ b/src/Microsoft.ML.Data/Transforms/ConcatTransform.cs @@ -1,7 +1,8 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // 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.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; @@ -16,23 +17,23 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(ColumnConcatenatingTransformer.Summary, typeof(IDataTransform), typeof(ColumnConcatenatingTransformer), typeof(ColumnConcatenatingTransformer.TaggedArguments), typeof(SignatureDataTransform), - ColumnConcatenatingTransformer.UserName, ColumnConcatenatingTransformer.LoadName, "ConcatTransform", DocName = "transform/ConcatTransform.md")] +[assembly: LoadableClass(ConcatTransform.Summary, typeof(IDataTransform), typeof(ConcatTransform), typeof(ConcatTransform.TaggedArguments), typeof(SignatureDataTransform), + ConcatTransform.UserName, ConcatTransform.LoadName, "ConcatTransform", DocName = "transform/ConcatTransform.md")] -[assembly: LoadableClass(ColumnConcatenatingTransformer.Summary, typeof(IDataTransform), typeof(ColumnConcatenatingTransformer), null, typeof(SignatureLoadDataTransform), - ColumnConcatenatingTransformer.UserName, ColumnConcatenatingTransformer.LoaderSignature, ColumnConcatenatingTransformer.LoaderSignatureOld)] +[assembly: LoadableClass(ConcatTransform.Summary, typeof(IDataTransform), typeof(ConcatTransform), null, typeof(SignatureLoadDataTransform), + ConcatTransform.UserName, ConcatTransform.LoaderSignature, ConcatTransform.LoaderSignatureOld)] -[assembly: LoadableClass(typeof(ColumnConcatenatingTransformer), null, typeof(SignatureLoadModel), - ColumnConcatenatingTransformer.UserName, ColumnConcatenatingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(ConcatTransform), null, typeof(SignatureLoadModel), + ConcatTransform.UserName, ConcatTransform.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(ColumnConcatenatingTransformer), null, typeof(SignatureLoadRowMapper), - ColumnConcatenatingTransformer.UserName, ColumnConcatenatingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(ConcatTransform), null, typeof(SignatureLoadRowMapper), + ConcatTransform.UserName, ConcatTransform.LoaderSignature)] namespace Microsoft.ML.Runtime.Data { using PfaType = PfaUtils.Type; - public sealed class ColumnConcatenatingTransformer : RowToRowTransformerBase + public sealed class ConcatTransform : ITransformer, ICanSaveModel { internal const string Summary = "Concatenates one or more columns of the same item type."; internal const string UserName = "Concat Transform"; @@ -207,6 +208,7 @@ public ColumnInfo(ModelLoadContext ctx) } } + private readonly IHost _host; private readonly ColumnInfo[] _columns; public IReadOnlyCollection Columns => _columns.AsReadOnly(); @@ -216,7 +218,7 @@ public ColumnInfo(ModelLoadContext ctx) /// Original columns are also preserved. /// The column types must match, and the output column type is always a vector. /// - public ColumnConcatenatingTransformer(IHostEnvironment env, string outputName, params string[] inputNames) + public ConcatTransform(IHostEnvironment env, string outputName, params string[] inputNames) : this(env, new ColumnInfo(outputName, inputNames)) { } @@ -224,9 +226,10 @@ public ColumnConcatenatingTransformer(IHostEnvironment env, string outputName, p /// /// Concatenates multiple groups of columns, each group is denoted by one of . /// - public ColumnConcatenatingTransformer(IHostEnvironment env, params ColumnInfo[] columns) : - base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ColumnConcatenatingTransformer))) + public ConcatTransform(IHostEnvironment env, params ColumnInfo[] columns) { + Contracts.CheckValue(env, nameof(env)); + _host = env.Register(nameof(ConcatTransform)); Contracts.CheckValue(columns, nameof(columns)); _columns = columns.ToArray(); } @@ -242,15 +245,15 @@ private static VersionInfo GetVersionInfo() verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, loaderSignatureAlt: LoaderSignatureOld, - loaderAssemblyName: typeof(ColumnConcatenatingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(ConcatTransform).Assembly.FullName); } private const int VersionAddedAliases = 0x00010002; private const int VersionTransformer = 0x00010003; - public override void Save(ModelSaveContext ctx) + public void Save(ModelSaveContext ctx) { - Host.CheckValue(ctx, nameof(ctx)); + _host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(); ctx.SetVersionInfo(GetVersionInfo()); @@ -268,10 +271,11 @@ public override void Save(ModelSaveContext ctx) /// /// Constructor for SignatureLoadModel. /// - public ColumnConcatenatingTransformer(IHostEnvironment env, ModelLoadContext ctx) : - base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ColumnConcatenatingTransformer))) + public ConcatTransform(IHostEnvironment env, ModelLoadContext ctx) { - Host.CheckValue(ctx, nameof(ctx)); + Contracts.CheckValue(env, nameof(env)); + _host = env.Register(nameof(ConcatTransform)); + _host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); if (ctx.Header.ModelVerReadable >= VersionTransformer) { @@ -367,7 +371,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV var cols = args.Column .Select(c => new ColumnInfo(c.Name, c.Source)) .ToArray(); - var transformer = new ColumnConcatenatingTransformer(env, cols); + var transformer = new ConcatTransform(env, cols); return transformer.MakeDataTransform(input); } @@ -387,36 +391,61 @@ public static IDataTransform Create(IHostEnvironment env, TaggedArguments args, var cols = args.Column .Select(c => new ColumnInfo(c.Name, c.Source.Select(kvp => (kvp.Value, kvp.Key != "" ? kvp.Key : null)))) .ToArray(); - var transformer = new ColumnConcatenatingTransformer(env, cols); + var transformer = new ConcatTransform(env, cols); return transformer.MakeDataTransform(input); } - protected override IRowMapper MakeRowMapper(Schema inputSchema) => new Mapper(this, inputSchema); + public IDataView Transform(IDataView input) => MakeDataTransform(input); + + private IDataTransform MakeDataTransform(IDataView input) + => new RowToRowMapperTransform(_host, input, MakeRowMapper(input.Schema), MakeRowMapper); + + public IRowMapper MakeRowMapper(Schema inputSchema) => new Mapper(this, inputSchema); /// /// Factory method for SignatureLoadDataTransform. /// public static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) - => new ColumnConcatenatingTransformer(env, ctx).MakeDataTransform(input); + => new ConcatTransform(env, ctx).MakeDataTransform(input); /// /// Factory method for SignatureLoadRowMapper. /// public static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) - => new ColumnConcatenatingTransformer(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); + => new ConcatTransform(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); + + public Schema GetOutputSchema(Schema inputSchema) + { + _host.CheckValue(inputSchema, nameof(inputSchema)); + var mapper = MakeRowMapper(inputSchema); + return RowToRowMapperTransform.GetOutputSchema(inputSchema, mapper); + } + + public bool IsRowToRowMapper => true; - private sealed class Mapper : MapperBase, ISaveAsOnnx, ISaveAsPfa + public IRowToRowMapper GetRowToRowMapper(Schema inputSchema) { - private readonly ColumnConcatenatingTransformer _parent; + _host.CheckValue(inputSchema, nameof(inputSchema)); + return new RowToRowMapperTransform(_host, new EmptyDataView(_host, inputSchema), MakeRowMapper(inputSchema), MakeRowMapper); + } + + private sealed class Mapper : IRowMapper, ISaveAsOnnx, ISaveAsPfa + { + private readonly IHost _host; + private readonly Schema _inputSchema; + private readonly ConcatTransform _parent; private readonly BoundColumn[] _columns; public bool CanSaveOnnx(OnnxContext ctx) => true; public bool CanSavePfa => true; - public Mapper(ColumnConcatenatingTransformer parent, Schema inputSchema) : - base(Contracts.CheckRef(parent, nameof(parent)).Host.Register(nameof(Mapper)), inputSchema) + public Mapper(ConcatTransform parent, Schema inputSchema) { + Contracts.AssertValue(parent); + Contracts.AssertValue(inputSchema); + _host = parent._host.Register(nameof(Mapper)); _parent = parent; + _inputSchema = inputSchema; _columns = new BoundColumn[_parent._columns.Length]; for (int i = 0; i < _parent._columns.Length; i++) @@ -452,7 +481,7 @@ private BoundColumn MakeColumn(Schema inputSchema, int iinfo) { var (srcName, srcAlias) = _parent._columns[iinfo].Inputs[i]; if (!inputSchema.TryGetColumnIndex(srcName, out int srcCol)) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", srcName); + throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", srcName); sources[i] = srcCol; var curType = inputSchema.GetColumnType(srcCol); @@ -470,7 +499,7 @@ private BoundColumn MakeColumn(Schema inputSchema, int iinfo) totalSize += curType.ValueCount; } else - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", srcName, itemType.ToString(), curType.ToString()); + throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", srcName, itemType.ToString(), curType.ToString()); if (isNormalized && !inputSchema.IsNormalized(srcCol)) isNormalized = false; @@ -494,7 +523,7 @@ private BoundColumn MakeColumn(Schema inputSchema, int iinfo) hasSlotNames = false; } - return new BoundColumn(InputSchema, _parent._columns[iinfo], sources, new VectorType(itemType.AsPrimitive, totalSize), + return new BoundColumn(_inputSchema, _parent._columns[iinfo], sources, new VectorType(itemType.AsPrimitive, totalSize), isNormalized, hasSlotNames, hasCategoricals, totalSize, catCount); } @@ -693,7 +722,7 @@ private Delegate MakeGetter(IRow input) .MarkSensitive(MessageSensitivity.Schema); } dstLength = checked(dstLength + tmpBufs[i].Length); - dstCount = checked(dstCount + tmpBufs[i].GetValues().Length); + dstCount = checked(dstCount + tmpBufs[i].Count); } else { @@ -702,10 +731,15 @@ private Delegate MakeGetter(IRow input) } } + var values = dst.Values; + var indices = dst.Indices; if (dstCount <= dstLength / 2) { // Concatenate into a sparse representation. - var editor = VBufferEditor.Create(ref dst, dstLength, dstCount); + if (Utils.Size(values) < dstCount) + values = new T[dstCount]; + if (Utils.Size(indices) < dstCount) + indices = new int[dstCount]; int offset = 0; int count = 0; @@ -715,24 +749,22 @@ private Delegate MakeGetter(IRow input) if (_srcTypes[j].IsVector) { var buffer = tmpBufs[j]; - var bufferValues = buffer.GetValues(); - Contracts.Assert(bufferValues.Length <= dstCount - count); + Contracts.Assert(buffer.Count <= dstCount - count); Contracts.Assert(buffer.Length <= dstLength - offset); if (buffer.IsDense) { - for (int i = 0; i < bufferValues.Length; i++) + for (int i = 0; i < buffer.Length; i++) { - editor.Values[count] = bufferValues[i]; - editor.Indices[count++] = offset + i; + values[count] = buffer.Values[i]; + indices[count++] = offset + i; } } else { - var bufferIndices = buffer.GetIndices(); - for (int i = 0; i < bufferValues.Length; i++) + for (int i = 0; i < buffer.Count; i++) { - editor.Values[count] = bufferValues[i]; - editor.Indices[count++] = offset + bufferIndices[i]; + values[count] = buffer.Values[i]; + indices[count++] = offset + buffer.Indices[i]; } } offset += buffer.Length; @@ -741,19 +773,20 @@ private Delegate MakeGetter(IRow input) { Contracts.Assert(count < dstCount); srcGetterOnes[j](ref tmp); - editor.Values[count] = tmp; - editor.Indices[count++] = offset; + values[count] = tmp; + indices[count++] = offset; offset++; } } Contracts.Assert(count <= dstCount); Contracts.Assert(offset == dstLength); - dst = editor.CommitTruncated(count); + dst = new VBuffer(dstLength, count, values, indices); } else { // Concatenate into a dense representation. - var editor = VBufferEditor.Create(ref dst, dstLength); + if (Utils.Size(values) < dstLength) + values = new T[dstLength]; int offset = 0; for (int j = 0; j < SrcIndices.Length; j++) @@ -761,17 +794,17 @@ private Delegate MakeGetter(IRow input) Contracts.Assert(tmpBufs[j].Length <= dstLength - offset); if (_srcTypes[j].IsVector) { - tmpBufs[j].CopyTo(editor.Values, offset); + tmpBufs[j].CopyTo(values, offset); offset += tmpBufs[j].Length; } else { srcGetterOnes[j](ref tmp); - editor.Values[offset++] = tmp; + values[offset++] = tmp; } } Contracts.Assert(offset == dstLength); - dst = editor.Commit(); + dst = new VBuffer(dstLength, values, indices); } }; return result; @@ -827,9 +860,9 @@ public KeyValuePair SavePfaInfo(BoundPfaContext ctx) } } - public override Func GetDependencies(Func activeOutput) + public Func GetDependencies(Func activeOutput) { - var active = new bool[InputSchema.ColumnCount]; + var active = new bool[_inputSchema.ColumnCount]; for (int i = 0; i < _columns.Length; i++) { if (activeOutput(i)) @@ -841,19 +874,32 @@ public override Func GetDependencies(Func activeOutput) return col => active[col]; } - protected override Schema.Column[] GetOutputColumnsCore() => _columns.Select(x => x.MakeColumnInfo()).ToArray(); + public Schema.Column[] GetOutputColumns() => _columns.Select(x => x.MakeColumnInfo()).ToArray(); - public override void Save(ModelSaveContext ctx) => _parent.Save(ctx); + public void Save(ModelSaveContext ctx) => _parent.Save(ctx); - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + public Delegate[] CreateGetters(IRow input, Func activeOutput, out Action disposer) { + // REVIEW: it used to be that the mapper's input schema in the constructor was required to be reference-equal to the schema + // of the input row. + // It still has to be the same schema, but because we may make a transition from lazy to eager schema, the reference-equality + // is no longer always possible. So, we relax the assert as below. + if (input.Schema is Schema s) + Contracts.Assert(s == _inputSchema); + var result = new Delegate[_columns.Length]; + for (int i = 0; i < _columns.Length; i++) + { + if (!activeOutput(i)) + continue; + result[i] = _columns[i].MakeGetter(input); + } disposer = null; - return _columns[iinfo].MakeGetter(input); + return result; } public void SaveAsPfa(BoundPfaContext ctx) { - Host.CheckValue(ctx, nameof(ctx)); + _host.CheckValue(ctx, nameof(ctx)); var toHide = new List(); var toDeclare = new List>(); @@ -872,7 +918,7 @@ public void SaveAsPfa(BoundPfaContext ctx) public void SaveAsOnnx(OnnxContext ctx) { - Host.CheckValue(ctx, nameof(ctx)); + _host.CheckValue(ctx, nameof(ctx)); Contracts.Assert(CanSaveOnnx(ctx)); string opType = "FeatureVectorizer"; @@ -901,7 +947,7 @@ public void SaveAsOnnx(OnnxContext ctx) var srcIndex = boundCol.SrcIndices[i]; inputList.Add(new KeyValuePair(ctx.GetVariableName(srcName), - InputSchema[srcIndex].Type.ValueCount)); + _inputSchema[srcIndex].Type.ValueCount)); } var node = ctx.CreateNode(opType, inputList.Select(t => t.Key), diff --git a/src/Microsoft.ML.Data/Transforms/ConversionsCatalog.cs b/src/Microsoft.ML.Data/Transforms/ConversionsCatalog.cs index b5185393c2..2d589f8e58 100644 --- a/src/Microsoft.ML.Data/Transforms/ConversionsCatalog.cs +++ b/src/Microsoft.ML.Data/Transforms/ConversionsCatalog.cs @@ -9,7 +9,7 @@ namespace Microsoft.ML { using HashDefaults = HashingEstimator.Defaults; - using ConvertDefaults = TypeConvertingEstimator.Defaults; + using ConvertDefaults = ConvertingEstimator.Defaults; /// /// Extensions for the HashEstimator. @@ -33,7 +33,7 @@ public static HashingEstimator Hash(this TransformsCatalog.ConversionTransforms /// /// The transform's catalog. /// Description of dataset columns and how to process them. - public static HashingEstimator Hash(this TransformsCatalog.ConversionTransforms catalog, params HashingTransformer.ColumnInfo[] columns) + public static HashingEstimator Hash(this TransformsCatalog.ConversionTransforms catalog, params HashTransformer.ColumnInfo[] columns) => new HashingEstimator(CatalogUtils.GetEnvironment(catalog), columns); /// @@ -43,17 +43,17 @@ public static HashingEstimator Hash(this TransformsCatalog.ConversionTransforms /// Name of the input column. /// Name of the column to be transformed. If this is null '' will be used. /// Number of bits to hash into. Must be between 1 and 31, inclusive. - public static TypeConvertingEstimator ConvertType(this TransformsCatalog.ConversionTransforms catalog, string inputColumn, string outputColumn = null, + public static ConvertingEstimator ConvertTo(this TransformsCatalog.ConversionTransforms catalog, string inputColumn, string outputColumn = null, DataKind outputKind = ConvertDefaults.DefaultOutputKind) - => new TypeConvertingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, outputKind); + => new ConvertingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, outputKind); /// /// Changes column type of the input column. /// /// The transform's catalog. /// Description of dataset columns and how to process them. - public static TypeConvertingEstimator ConvertType(this TransformsCatalog.ConversionTransforms catalog, params TypeConvertingTransformer.ColumnInfo[] columns) - => new TypeConvertingEstimator(CatalogUtils.GetEnvironment(catalog), columns); + public static ConvertingEstimator ConvertTo(this TransformsCatalog.ConversionTransforms catalog, params ConvertingTransform.ColumnInfo[] columns) + => new ConvertingEstimator(CatalogUtils.GetEnvironment(catalog), columns); } public static class ToValueCatalog @@ -63,8 +63,8 @@ public static class ToValueCatalog /// /// The categorical transform's catalog. /// Name of the input column. - public static KeyToValueMappingEstimator MapKeyToValue(this TransformsCatalog.ConversionTransforms catalog, string inputColumn) - => new KeyToValueMappingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn); + public static KeyToValueEstimator MapKeyToValue(this TransformsCatalog.ConversionTransforms catalog, string inputColumn) + => new KeyToValueEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn); /// /// Convert the key types (name of the column specified in the first item of the tuple) back to their original values @@ -72,8 +72,8 @@ public static KeyToValueMappingEstimator MapKeyToValue(this TransformsCatalog.Co /// /// The categorical transform's catalog /// The pairs of input and output columns. - public static KeyToValueMappingEstimator MapKeyToValue(this TransformsCatalog.ConversionTransforms catalog, params (string input, string output)[] columns) - => new KeyToValueMappingEstimator(CatalogUtils.GetEnvironment(catalog), columns); + public static KeyToValueEstimator MapKeyToValue(this TransformsCatalog.ConversionTransforms catalog, params (string input, string output)[] columns) + => new KeyToValueEstimator(CatalogUtils.GetEnvironment(catalog), columns); } /// @@ -87,7 +87,7 @@ public static class ToVectorCatalog /// The categorical transform's catalog. /// The input column to map back to vectors. public static KeyToVectorMappingEstimator MapKeyToVector(this TransformsCatalog.ConversionTransforms catalog, - params KeyToVectorMappingTransformer.ColumnInfo[] columns) + params KeyToVectorTransform.ColumnInfo[] columns) => new KeyToVectorMappingEstimator(CatalogUtils.GetEnvironment(catalog), columns); /// diff --git a/src/Microsoft.ML.Data/Transforms/TypeConverting.cs b/src/Microsoft.ML.Data/Transforms/ConvertTransform.cs similarity index 88% rename from src/Microsoft.ML.Data/Transforms/TypeConverting.cs rename to src/Microsoft.ML.Data/Transforms/ConvertTransform.cs index 28723b4517..a8758e0c43 100644 --- a/src/Microsoft.ML.Data/Transforms/TypeConverting.cs +++ b/src/Microsoft.ML.Data/Transforms/ConvertTransform.cs @@ -20,17 +20,17 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(TypeConvertingTransformer.Summary, typeof(IDataTransform), typeof(TypeConvertingTransformer), typeof(TypeConvertingTransformer.Arguments), typeof(SignatureDataTransform), - TypeConvertingTransformer.UserName, TypeConvertingTransformer.ShortName, "ConvertTransform", DocName = "transform/ConvertTransform.md")] +[assembly: LoadableClass(ConvertingTransform.Summary, typeof(IDataTransform), typeof(ConvertingTransform), typeof(ConvertingTransform.Arguments), typeof(SignatureDataTransform), + ConvertingTransform.UserName, ConvertingTransform.ShortName, "ConvertTransform", DocName = "transform/ConvertTransform.md")] -[assembly: LoadableClass(TypeConvertingTransformer.Summary, typeof(IDataTransform), typeof(TypeConvertingTransformer), null, typeof(SignatureLoadDataTransform), - TypeConvertingTransformer.UserName, TypeConvertingTransformer.LoaderSignature, TypeConvertingTransformer.LoaderSignatureOld)] +[assembly: LoadableClass(ConvertingTransform.Summary, typeof(IDataTransform), typeof(ConvertingTransform), null, typeof(SignatureLoadDataTransform), + ConvertingTransform.UserName, ConvertingTransform.LoaderSignature, ConvertingTransform.LoaderSignatureOld)] -[assembly: LoadableClass(TypeConvertingTransformer.Summary, typeof(TypeConvertingTransformer), null, typeof(SignatureLoadModel), - TypeConvertingTransformer.UserName, TypeConvertingTransformer.LoaderSignature)] +[assembly: LoadableClass(ConvertingTransform.Summary, typeof(ConvertingTransform), null, typeof(SignatureLoadModel), + ConvertingTransform.UserName, ConvertingTransform.LoaderSignature)] -[assembly: LoadableClass(TypeConvertingTransformer.Summary, typeof(IRowMapper), typeof(TypeConvertingTransformer), null, typeof(SignatureLoadRowMapper), - TypeConvertingTransformer.UserName, TypeConvertingTransformer.LoaderSignature)] +[assembly: LoadableClass(ConvertingTransform.Summary, typeof(IRowMapper), typeof(ConvertingTransform), null, typeof(SignatureLoadRowMapper), + ConvertingTransform.UserName, ConvertingTransform.LoaderSignature)] [assembly: EntryPointModule(typeof(TypeConversion))] @@ -38,14 +38,14 @@ namespace Microsoft.ML.Transforms.Conversions { public static class TypeConversion { - [TlcModule.EntryPoint(Name = "Transforms.ColumnTypeConverter", Desc = TypeConvertingTransformer.Summary, UserName = TypeConvertingTransformer.UserName, ShortName = TypeConvertingTransformer.ShortName)] - public static CommonOutputs.TransformOutput Convert(IHostEnvironment env, TypeConvertingTransformer.Arguments input) + [TlcModule.EntryPoint(Name = "Transforms.ColumnTypeConverter", Desc = ConvertingTransform.Summary, UserName = ConvertingTransform.UserName, ShortName = ConvertingTransform.ShortName)] + public static CommonOutputs.TransformOutput Convert(IHostEnvironment env, ConvertingTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(input, nameof(input)); var h = EntryPointUtils.CheckArgsAndCreateHost(env, "Convert", input); - var view = TypeConvertingTransformer.Create(h, input, input.Data); + var view = ConvertingTransform.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { @@ -58,7 +58,7 @@ public static CommonOutputs.TransformOutput Convert(IHostEnvironment env, TypeCo /// /// ConvertTransform allow to change underlying column type as long as we know how to convert types. /// - public sealed class TypeConvertingTransformer : OneToOneTransformerBase + public sealed class ConvertingTransform : OneToOneTransformerBase { public class Column : OneToOneColumn { @@ -163,7 +163,7 @@ private static VersionInfo GetVersionInfo() verWeCanReadBack: 0x00010003, loaderSignature: LoaderSignature, loaderSignatureAlt: LoaderSignatureOld, - loaderAssemblyName: typeof(TypeConvertingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(ConvertingTransform).Assembly.FullName); } private const string RegistrationName = "Convert"; @@ -212,16 +212,16 @@ private static (string input, string output)[] GetColumnPairs(ColumnInfo[] colum /// Name of the column to be transformed. If this is null '' will be used. /// The expected type of the converted column. /// New key range if we work with key type. - public TypeConvertingTransformer(IHostEnvironment env, string inputColumn, string outputColumn, DataKind outputKind, KeyRange outputKeyRange = null) + public ConvertingTransform(IHostEnvironment env, string inputColumn, string outputColumn, DataKind outputKind, KeyRange outputKeyRange = null) : this(env, new ColumnInfo(inputColumn, outputColumn, outputKind, outputKeyRange)) { } /// - /// Create a that takes multiple pairs of columns. + /// Create a that takes multiple pairs of columns. /// - public TypeConvertingTransformer(IHostEnvironment env, params ColumnInfo[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(TypeConvertingTransformer)), GetColumnPairs(columns)) + public ConvertingTransform(IHostEnvironment env, params ColumnInfo[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ConvertingTransform)), GetColumnPairs(columns)) { _columns = columns.ToArray(); } @@ -260,16 +260,16 @@ public override void Save(ModelSaveContext ctx) } // Factory method for SignatureLoadModel. - private static TypeConvertingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + private static ConvertingTransform Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(RegistrationName); host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new TypeConvertingTransformer(host, ctx); + return new ConvertingTransform(host, ctx); } - private TypeConvertingTransformer(IHost host, ModelLoadContext ctx) + private ConvertingTransform(IHost host, ModelLoadContext ctx) : base(host, ctx) { var columnsLength = ColumnPairs.Length; @@ -348,7 +348,7 @@ internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDat } cols[i] = new ColumnInfo(item.Source ?? item.Name, item.Name, kind, range); }; - return new TypeConvertingTransformer(env, cols).MakeDataTransform(input); + return new ConvertingTransform(env, cols).MakeDataTransform(input); } // Factory method for SignatureLoadDataTransform. @@ -392,15 +392,15 @@ internal static bool GetNewType(IExceptionContext ectx, ColumnType srcType, Data return true; } - private sealed class Mapper : OneToOneMapperBase, ICanSaveOnnx + private sealed class Mapper : MapperBase, ICanSaveOnnx { - private readonly TypeConvertingTransformer _parent; + private readonly ConvertingTransform _parent; private readonly ColumnType[] _types; private readonly int[] _srcCols; public bool CanSaveOnnx(OnnxContext ctx) => ctx.GetOnnxVersion() == OnnxVersion.Experimental; - public Mapper(TypeConvertingTransformer parent, Schema inputSchema) + public Mapper(ConvertingTransform parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -441,7 +441,7 @@ private static bool CanConvertToType(IExceptionContext ectx, ColumnType srcType, return true; } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { var result = new Schema.Column[_parent._columns.Length]; for (int i = 0; i < _parent._columns.Length; i++) @@ -467,7 +467,7 @@ protected override Schema.Column[] GetOutputColumnsCore() return result; } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); @@ -519,7 +519,7 @@ private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, string srcVariableName, /// /// Convert estimator allow you take column and change it type as long as we know how to do conversion between types. /// - public sealed class TypeConvertingEstimator : TrivialEstimator + public sealed class ConvertingEstimator : TrivialEstimator { internal sealed class Defaults { @@ -533,18 +533,18 @@ internal sealed class Defaults /// Name of the input column. /// Name of the output column. /// The expected type of the converted column. - public TypeConvertingEstimator(IHostEnvironment env, + public ConvertingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, DataKind outputKind = Defaults.DefaultOutputKind) - : this(env, new TypeConvertingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn, outputKind)) + : this(env, new ConvertingTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn, outputKind)) { } /// - /// Create a that takes multiple pairs of columns. + /// Create a that takes multiple pairs of columns. /// - public TypeConvertingEstimator(IHostEnvironment env, params TypeConvertingTransformer.ColumnInfo[] columns) : - base(Contracts.CheckRef(env, nameof(env)).Register(nameof(TypeConvertingEstimator)), new TypeConvertingTransformer(env, columns)) + public ConvertingEstimator(IHostEnvironment env, params ConvertingTransform.ColumnInfo[] columns) : + base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ConvertingEstimator)), new ConvertingTransform(env, columns)) { } @@ -556,7 +556,7 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) { if (!inputSchema.TryFindColumn(colInfo.Input, out var col)) throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.Input); - if (!TypeConvertingTransformer.GetNewType(Host, col.ItemType, colInfo.OutputKind, colInfo.OutputKeyRange, out PrimitiveType newType)) + if (!ConvertingTransform.GetNewType(Host, col.ItemType, colInfo.OutputKind, colInfo.OutputKeyRange, out PrimitiveType newType)) throw Host.ExceptParam(nameof(inputSchema), $"Can't convert {colInfo.Input} into {newType.ToString()}"); if (!Runtime.Data.Conversion.Conversions.Instance.TryGetStandardConversion(col.ItemType, newType, out Delegate del, out bool identity)) throw Host.ExceptParam(nameof(inputSchema), $"Don't know how to convert {colInfo.Input} into {newType.ToString()}"); @@ -627,13 +627,13 @@ private sealed class Rec : EstimatorReconciler public override IEstimator Reconcile(IHostEnvironment env, PipelineColumn[] toOutput, IReadOnlyDictionary inputNames, IReadOnlyDictionary outputNames, IReadOnlyCollection usedNames) { - var infos = new TypeConvertingTransformer.ColumnInfo[toOutput.Length]; + var infos = new ConvertingTransform.ColumnInfo[toOutput.Length]; for (int i = 0; i < toOutput.Length; ++i) { var tcol = (IConvertCol)toOutput[i]; - infos[i] = new TypeConvertingTransformer.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], tcol.Kind); + infos[i] = new ConvertingTransform.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], tcol.Kind); } - return new TypeConvertingEstimator(env, infos); + return new ConvertingEstimator(env, infos); } } } diff --git a/src/Microsoft.ML.Data/Transforms/ColumnsCopying.cs b/src/Microsoft.ML.Data/Transforms/CopyColumnsTransform.cs similarity index 75% rename from src/Microsoft.ML.Data/Transforms/ColumnsCopying.cs rename to src/Microsoft.ML.Data/Transforms/CopyColumnsTransform.cs index 232e4978b0..302e2d8502 100644 --- a/src/Microsoft.ML.Data/Transforms/ColumnsCopying.cs +++ b/src/Microsoft.ML.Data/Transforms/CopyColumnsTransform.cs @@ -16,31 +16,31 @@ using Microsoft.ML.Runtime.Model.Onnx; using Microsoft.ML.Transforms; -[assembly: LoadableClass(ColumnsCopyingTransformer.Summary, typeof(IDataTransform), typeof(ColumnsCopyingTransformer), - typeof(ColumnsCopyingTransformer.Arguments), typeof(SignatureDataTransform), - ColumnsCopyingTransformer.UserName, "CopyColumns", "CopyColumnsTransform", ColumnsCopyingTransformer.ShortName, +[assembly: LoadableClass(CopyColumnsTransform.Summary, typeof(IDataTransform), typeof(CopyColumnsTransform), + typeof(CopyColumnsTransform.Arguments), typeof(SignatureDataTransform), + CopyColumnsTransform.UserName, "CopyColumns", "CopyColumnsTransform", CopyColumnsTransform.ShortName, DocName = "transform/CopyColumnsTransformer.md")] -[assembly: LoadableClass(ColumnsCopyingTransformer.Summary, typeof(IDataTransform), typeof(ColumnsCopyingTransformer), null, typeof(SignatureLoadDataTransform), - ColumnsCopyingTransformer.UserName, ColumnsCopyingTransformer.LoaderSignature)] +[assembly: LoadableClass(CopyColumnsTransform.Summary, typeof(IDataTransform), typeof(CopyColumnsTransform), null, typeof(SignatureLoadDataTransform), + CopyColumnsTransform.UserName, CopyColumnsTransform.LoaderSignature)] -[assembly: LoadableClass(ColumnsCopyingTransformer.Summary, typeof(ColumnsCopyingTransformer), null, typeof(SignatureLoadModel), - ColumnsCopyingTransformer.UserName, ColumnsCopyingTransformer.LoaderSignature)] +[assembly: LoadableClass(CopyColumnsTransform.Summary, typeof(CopyColumnsTransform), null, typeof(SignatureLoadModel), + CopyColumnsTransform.UserName, CopyColumnsTransform.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(ColumnsCopyingTransformer), null, typeof(SignatureLoadRowMapper), - ColumnsCopyingTransformer.UserName, ColumnsCopyingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(CopyColumnsTransform), null, typeof(SignatureLoadRowMapper), + CopyColumnsTransform.UserName, CopyColumnsTransform.LoaderSignature)] namespace Microsoft.ML.Transforms { - public sealed class ColumnsCopyingEstimator : TrivialEstimator + public sealed class CopyColumnsEstimator : TrivialEstimator { - public ColumnsCopyingEstimator(IHostEnvironment env, string input, string output) : + public CopyColumnsEstimator(IHostEnvironment env, string input, string output) : this(env, (input, output)) { } - public ColumnsCopyingEstimator(IHostEnvironment env, params (string source, string name)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ColumnsCopyingEstimator)), new ColumnsCopyingTransformer(env, columns)) + public CopyColumnsEstimator(IHostEnvironment env, params (string source, string name)[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(CopyColumnsEstimator)), new CopyColumnsTransform(env, columns)) { } @@ -60,7 +60,7 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) } } - public sealed class ColumnsCopyingTransformer : OneToOneTransformerBase + public sealed class CopyColumnsTransform : OneToOneTransformerBase { public const string LoaderSignature = "CopyTransform"; internal const string Summary = "Copy a source column to a new column."; @@ -77,11 +77,11 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(ColumnsCopyingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(CopyColumnsTransform).Assembly.FullName); } - public ColumnsCopyingTransformer(IHostEnvironment env, params (string source, string name)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ColumnsCopyingTransformer)), columns) + public CopyColumnsTransform(IHostEnvironment env, params (string source, string name)[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(CopyColumnsTransform)), columns) { } @@ -116,12 +116,12 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV Contracts.CheckValue(env, nameof(env)); env.CheckValue(args, nameof(args)); - var transformer = new ColumnsCopyingTransformer(env, args.Column.Select(x => (x.Source, x.Name)).ToArray()); + var transformer = new CopyColumnsTransform(env, args.Column.Select(x => (x.Source, x.Name)).ToArray()); return transformer.MakeDataTransform(input); } // Factory method for SignatureLoadModel. - private static ColumnsCopyingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + private static CopyColumnsTransform Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(ctx, nameof(ctx)); @@ -140,7 +140,7 @@ private static ColumnsCopyingTransformer Create(IHostEnvironment env, ModelLoadC columns[i].Name = ctx.LoadNonEmptyString(); columns[i].Source = ctx.LoadNonEmptyString(); } - return new ColumnsCopyingTransformer(env, columns); + return new CopyColumnsTransform(env, columns); } // Factory method for SignatureLoadDataTransform. @@ -160,21 +160,21 @@ public override void Save(ModelSaveContext ctx) protected override IRowMapper MakeRowMapper(Schema inputSchema) => new Mapper(this, inputSchema, ColumnPairs); - private sealed class Mapper : OneToOneMapperBase, ISaveAsOnnx + private sealed class Mapper : MapperBase, ISaveAsOnnx { private readonly Schema _schema; private readonly (string Source, string Name)[] _columns; public bool CanSaveOnnx(OnnxContext ctx) => ctx.GetOnnxVersion() == OnnxVersion.Experimental; - internal Mapper(ColumnsCopyingTransformer parent, Schema inputSchema, (string Source, string Name)[] columns) + internal Mapper(CopyColumnsTransform parent, Schema inputSchema, (string Source, string Name)[] columns) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _schema = inputSchema; _columns = columns; } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _columns.Length); @@ -188,7 +188,7 @@ Delegate MakeGetter(IRow row, int index) return Utils.MarshalInvoke(MakeGetter, type.RawType, input, colIndex); } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { var result = new Schema.Column[_columns.Length]; for (int i = 0; i < _columns.Length; i++) diff --git a/src/Microsoft.ML.Data/Transforms/DropSlotsTransform.cs b/src/Microsoft.ML.Data/Transforms/DropSlotsTransform.cs index 27a73824b2..d644725618 100644 --- a/src/Microsoft.ML.Data/Transforms/DropSlotsTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/DropSlotsTransform.cs @@ -701,7 +701,7 @@ private ValueGetter> MakeVecTrivialGetter() // Delegates onto instance methods are more efficient than delegates onto static methods. private void VecTrivialGetter(ref VBuffer value) { - VBufferUtils.Resize(ref value, 1, 0); + value = new VBuffer(1, 0, value.Values, value.Indices); } private Delegate MakeVecGetter(IRow input, int iinfo) diff --git a/src/Microsoft.ML.Data/Transforms/ExtensionsCatalog.cs b/src/Microsoft.ML.Data/Transforms/ExtensionsCatalog.cs index 96393fdbaa..b15b86f6bd 100644 --- a/src/Microsoft.ML.Data/Transforms/ExtensionsCatalog.cs +++ b/src/Microsoft.ML.Data/Transforms/ExtensionsCatalog.cs @@ -19,8 +19,8 @@ public static class ColumnCopyingCatalog /// The transform's catalog. /// Name of the input column. /// Name of the new column, resulting from copying. - public static ColumnsCopyingEstimator CopyColumns(this TransformsCatalog catalog, string inputColumn, string outputColumn) - => new ColumnsCopyingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn); + public static CopyColumnsEstimator CopyColumns(this TransformsCatalog catalog, string inputColumn, string outputColumn) + => new CopyColumnsEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn); /// /// Copies the input column, name specified in the first item of the tuple, @@ -28,8 +28,8 @@ public static ColumnsCopyingEstimator CopyColumns(this TransformsCatalog catalog /// /// The transform's catalog /// The pairs of input and output columns. - public static ColumnsCopyingEstimator CopyColumns(this TransformsCatalog catalog, params (string source, string name)[] columns) - => new ColumnsCopyingEstimator(CatalogUtils.GetEnvironment(catalog), columns); + public static CopyColumnsEstimator CopyColumns(this TransformsCatalog catalog, params (string source, string name)[] columns) + => new CopyColumnsEstimator(CatalogUtils.GetEnvironment(catalog), columns); } @@ -85,8 +85,8 @@ public static ColumnSelectingEstimator DropColumns(this TransformsCatalog catalo public static ColumnSelectingEstimator SelectColumns(this TransformsCatalog catalog, string[] keepColumns, string[] dropColumns, - bool keepHidden = ColumnSelectingTransformer.Defaults.KeepHidden, - bool ignoreMissing = ColumnSelectingTransformer.Defaults.IgnoreMissing) + bool keepHidden = SelectColumnsTransform.Defaults.KeepHidden, + bool ignoreMissing = SelectColumnsTransform.Defaults.IgnoreMissing) => new ColumnSelectingEstimator(CatalogUtils.GetEnvironment(catalog), keepColumns, dropColumns, keepHidden, ignoreMissing); } diff --git a/src/Microsoft.ML.Data/Transforms/GenerateNumberTransform.cs b/src/Microsoft.ML.Data/Transforms/GenerateNumberTransform.cs index f7f3e200ca..36d94fb8e8 100644 --- a/src/Microsoft.ML.Data/Transforms/GenerateNumberTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/GenerateNumberTransform.cs @@ -258,7 +258,7 @@ private static VersionInfo GetVersionInfo() private const string RegistrationName = "GenerateNumber"; /// - /// Initializes a new instance of . + /// Convenience constructor for public facing API. /// /// Host Environment. /// Input . This is the output from previous transform or loader. diff --git a/src/Microsoft.ML.Data/Transforms/Hashing.cs b/src/Microsoft.ML.Data/Transforms/HashTransform.cs similarity index 89% rename from src/Microsoft.ML.Data/Transforms/Hashing.cs rename to src/Microsoft.ML.Data/Transforms/HashTransform.cs index 89ceceeb4e..869684d5af 100644 --- a/src/Microsoft.ML.Data/Transforms/Hashing.cs +++ b/src/Microsoft.ML.Data/Transforms/HashTransform.cs @@ -15,17 +15,17 @@ using System.Runtime.CompilerServices; using System.Text; -[assembly: LoadableClass(HashingTransformer.Summary, typeof(IDataTransform), typeof(HashingTransformer), typeof(HashingTransformer.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(HashTransformer.Summary, typeof(IDataTransform), typeof(HashTransformer), typeof(HashTransformer.Arguments), typeof(SignatureDataTransform), "Hash Transform", "HashTransform", "Hash", DocName = "transform/HashTransform.md")] -[assembly: LoadableClass(HashingTransformer.Summary, typeof(IDataTransform), typeof(HashingTransformer), null, typeof(SignatureLoadDataTransform), - "Hash Transform", HashingTransformer.LoaderSignature)] +[assembly: LoadableClass(HashTransformer.Summary, typeof(IDataTransform), typeof(HashTransformer), null, typeof(SignatureLoadDataTransform), + "Hash Transform", HashTransformer.LoaderSignature)] -[assembly: LoadableClass(HashingTransformer.Summary, typeof(HashingTransformer), null, typeof(SignatureLoadModel), - "Hash Transform", HashingTransformer.LoaderSignature)] +[assembly: LoadableClass(HashTransformer.Summary, typeof(HashTransformer), null, typeof(SignatureLoadModel), + "Hash Transform", HashTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(HashingTransformer), null, typeof(SignatureLoadRowMapper), - "Hash Transform", HashingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(HashTransformer), null, typeof(SignatureLoadRowMapper), + "Hash Transform", HashTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Conversions { @@ -34,7 +34,7 @@ namespace Microsoft.ML.Transforms.Conversions /// it hashes each slot separately. /// It can hash either text values or key values. /// - public sealed class HashingTransformer : OneToOneTransformerBase + public sealed class HashTransformer : OneToOneTransformerBase { public sealed class Arguments { @@ -195,7 +195,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010002, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(HashingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(HashTransformer).Assembly.FullName); } private readonly ColumnInfo[] _columns; @@ -232,7 +232,7 @@ private ColumnType GetOutputType(ISchema inputSchema, ColumnInfo column) /// /// Host Environment. /// Description of dataset columns and how to process them. - public HashingTransformer(IHostEnvironment env, ColumnInfo[] columns) : + public HashTransformer(IHostEnvironment env, ColumnInfo[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), GetColumnPairs(columns)) { _columns = columns.ToArray(); @@ -243,7 +243,7 @@ public HashingTransformer(IHostEnvironment env, ColumnInfo[] columns) : } } - internal HashingTransformer(IHostEnvironment env, IDataView input, ColumnInfo[] columns) : + internal HashTransformer(IHostEnvironment env, IDataView input, ColumnInfo[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), GetColumnPairs(columns)) { _columns = columns.ToArray(); @@ -321,7 +321,7 @@ private Delegate GetGetterCore(IRow input, int iinfo, out Action disposer) protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); // Factory method for SignatureLoadModel. - private static HashingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + private static HashTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(RegistrationName); @@ -329,10 +329,10 @@ private static HashingTransformer Create(IHostEnvironment env, ModelLoadContext host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new HashingTransformer(host, ctx); + return new HashTransformer(host, ctx); } - private HashingTransformer(IHost host, ModelLoadContext ctx) + private HashTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) { var columnsLength = ColumnPairs.Length; @@ -389,7 +389,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV item.Ordered ?? args.Ordered, item.InvertHash ?? args.InvertHash); }; - return new HashingTransformer(env, input, cols).MakeDataTransform(input); + return new HashTransformer(env, input, cols).MakeDataTransform(input); } #region Getters @@ -743,33 +743,36 @@ private static ValueGetter> MakeVectorHashGetter(uint se return (ref VBuffer dst) => { srcGetter(ref src); - var srcValues = src.GetValues(); - if (srcValues.Length == 0) + int[] indices = dst.Indices; + if (src.Count == 0) { - VBufferUtils.Resize(ref dst, src.Length, 0); + dst = new VBuffer(src.Length, 0, dst.Values, dst.Indices); return; } - var editor = VBufferEditor.Create(ref dst, src.Length, srcValues.Length); - - for (int i = 0; i < srcValues.Length; ++i) - editor.Values[i] = hasher.HashCore(seed, mask, srcValues[i]); if (!src.IsDense) - src.GetIndices().CopyTo(editor.Indices); - - dst = editor.Commit(); + { + Utils.EnsureSize(ref indices, src.Count, keepOld: false); + Array.Copy(src.Indices, 0, indices, 0, src.Count); + } + var values = dst.Values; + Utils.EnsureSize(ref values, src.Count, keepOld: false); + var srcValuesSpan = src.Values.AsSpan(0, src.Count); + for (int i = 0; i < srcValuesSpan.Length; ++i) + values[i] = hasher.HashCore(seed, mask, srcValuesSpan[i]); + dst = new VBuffer(src.Length, src.Count, values, indices); }; } // It is not sparsity preserving. return (ref VBuffer dst) => { srcGetter(ref src); - var editor = VBufferEditor.Create(ref dst, src.Length); - - var srcValues = src.GetValues(); + uint[] values = dst.Values; + Utils.EnsureSize(ref values, src.Length, keepOld: false); + var srcValuesSpan = src.Values.AsSpan(0, src.Count); if (src.IsDense) { - for (int i = 0; i < srcValues.Length; ++i) - editor.Values[i] = hasher.HashCore(seed, mask, srcValues[i]); + for (int i = 0; i < srcValuesSpan.Length; ++i) + values[i] = hasher.HashCore(seed, mask, srcValuesSpan[i]); } else { @@ -778,13 +781,12 @@ private static ValueGetter> MakeVectorHashGetter(uint se // values, rather than having complicated logic to do a simultaneous traversal of the // sparse vs. dense array. for (int i = 0; i < src.Length; ++i) - editor.Values[i] = defaultHash; + values[i] = defaultHash; // Next overwrite the values in the explicit entries. - var srcIndices = src.GetIndices(); - for (int i = 0; i < srcValues.Length; ++i) - editor.Values[srcIndices[i]] = hasher.HashCore(seed, mask, srcValues[i]); + for (int i = 0; i < srcValuesSpan.Length; ++i) + values[src.Indices[i]] = hasher.HashCore(seed, mask, srcValuesSpan[i]); } - dst = editor.Commit(); + dst = new VBuffer(src.Length, values, dst.Indices); }; } @@ -805,62 +807,64 @@ private static ValueGetter> MakeVectorOrderedHashGetter( return (ref VBuffer dst) => { srcGetter(ref src); - var srcValues = src.GetValues(); - if (srcValues.Length == 0) + int[] indices = dst.Indices; + if (src.Count == 0) { - VBufferUtils.Resize(ref dst, src.Length, 0); + dst = new VBuffer(src.Length, 0, dst.Values, dst.Indices); return; } - var editor = VBufferEditor.Create(ref dst, src.Length, srcValues.Length); - + if (!src.IsDense) + { + Utils.EnsureSize(ref indices, src.Count, keepOld: false); + Array.Copy(src.Indices, 0, indices, 0, src.Count); + } + var values = dst.Values; + Utils.EnsureSize(ref values, src.Count, keepOld: false); + var srcValuesSpan = src.Values.AsSpan(0, src.Count); if (src.IsDense) { - for (int i = 0; i < srcValues.Length; ++i) - editor.Values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)i), mask, srcValues[i]); + for (int i = 0; i < srcValuesSpan.Length; ++i) + values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)i), mask, srcValuesSpan[i]); } else { - var srcIndices = src.GetIndices(); - for (int i = 0; i < srcValues.Length; ++i) - editor.Values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)srcIndices[i]), mask, srcValues[i]); - srcIndices.CopyTo(editor.Indices); - + for (int i = 0; i < srcValuesSpan.Length; ++i) + values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)src.Indices[i]), mask, srcValuesSpan[i]); } - dst = editor.Commit(); + dst = new VBuffer(src.Length, src.Count, values, indices); }; } // It is not sparsity preserving. return (ref VBuffer dst) => { srcGetter(ref src); - var editor = VBufferEditor.Create(ref dst, src.Length); - - var srcValues = src.GetValues(); + uint[] values = dst.Values; + Utils.EnsureSize(ref values, src.Length, keepOld: false); + var srcValuesSpan = src.Values.AsSpan(0, src.Count); if (src.IsDense) { - for (int i = 0; i < srcValues.Length; ++i) - editor.Values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)i), mask, srcValues[i]); + for (int i = 0; i < srcValuesSpan.Length; ++i) + values[i] = hasher.HashCore(Hashing.MurmurRound(seed, (uint)i), mask, srcValuesSpan[i]); } else { - var srcIndices = src.GetIndices(); int j = 0; for (int i = 0; i < src.Length; i++) { uint indexSeed = Hashing.MurmurRound(seed, (uint)i); - if (srcIndices.Length <= j || srcIndices[j] > i) - editor.Values[i] = hasher.HashCore(indexSeed, mask, default); - else if (srcIndices[j] == i) - editor.Values[i] = hasher.HashCore(indexSeed, mask, srcValues[j++]); + if (src.Count <= j || src.Indices[j] > i) + values[i] = hasher.HashCore(indexSeed, mask, default); + else if (src.Indices[j] == i) + values[i] = hasher.HashCore(indexSeed, mask, srcValuesSpan[j++]); else Contracts.Assert(false, "this should have never happened."); } } - dst = editor.Commit(); + dst = new VBuffer(src.Length, values, dst.Indices); }; } - private sealed class Mapper : OneToOneMapperBase + private sealed class Mapper : MapperBase { private sealed class ColInfo { @@ -877,9 +881,9 @@ public ColInfo(string name, string source, ColumnType type) } private readonly ColumnType[] _types; - private readonly HashingTransformer _parent; + private readonly HashTransformer _parent; - public Mapper(HashingTransformer parent, Schema inputSchema) + public Mapper(HashTransformer parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -888,7 +892,7 @@ public Mapper(HashingTransformer parent, Schema inputSchema) _types[i] = _parent.GetOutputType(inputSchema, _parent._columns[i]); } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -913,7 +917,7 @@ private void AddMetaKeyValues(int i, Schema.Metadata.Builder builder) builder.AddKeyValues(_parent._kvTypes[i].VectorSize, _parent._kvTypes[i].ItemType.AsPrimitive, getter); } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) => _parent.GetGetterCore(input, iinfo, out disposer); + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) => _parent.GetGetterCore(input, iinfo, out disposer); } private abstract class InvertHashHelper @@ -1107,17 +1111,12 @@ public override void Process() { _srcGetter(ref _value); _dstGetter(ref _hash); - - var valueValues = _value.GetValues(); - var hashValues = _hash.GetValues(); - // The two arrays should be consistent in their density, length, count, etc. Contracts.Assert(_value.IsDense == _hash.IsDense); Contracts.Assert(_value.Length == _hash.Length); - Contracts.Assert(valueValues.Length == hashValues.Length); - - for (int i = 0; i < valueValues.Length; ++i) - Collector.Add(hashValues[i], valueValues[i]); + Contracts.Assert(_value.Count == _hash.Count); + for (int i = 0; i < _value.Count; ++i) + Collector.Add(_hash.Values[i], _value.Values[i]); } } @@ -1152,24 +1151,19 @@ public override void Process() { _srcGetter(ref _value); _dstGetter(ref _hash); - - var valueValues = _value.GetValues(); - var hashValues = _hash.GetValues(); - // The two arrays should be consistent in their density, length, count, etc. Contracts.Assert(_value.IsDense == _hash.IsDense); Contracts.Assert(_value.Length == _hash.Length); - Contracts.Assert(valueValues.Length == hashValues.Length); + Contracts.Assert(_value.Count == _hash.Count); if (_hash.IsDense) { - for (int i = 0; i < valueValues.Length; ++i) - Collector.Add(hashValues[i], new KeyValuePair(i, valueValues[i])); + for (int i = 0; i < _value.Count; ++i) + Collector.Add(_hash.Values[i], new KeyValuePair(i, _value.Values[i])); } else { - var hashIndices = _hash.GetIndices(); - for (int i = 0; i < valueValues.Length; ++i) - Collector.Add(hashValues[i], new KeyValuePair(hashIndices[i], valueValues[i])); + for (int i = 0; i < _value.Count; ++i) + Collector.Add(_hash.Values[i], new KeyValuePair(_hash.Indices[i], _value.Values[i])); } } } @@ -1177,9 +1171,9 @@ public override void Process() } /// - /// Estimator for + /// Estimator for /// - public sealed class HashingEstimator : IEstimator + public sealed class HashingEstimator : IEstimator { internal const int NumBitsMin = 1; internal const int NumBitsLim = 32; @@ -1193,7 +1187,7 @@ internal static class Defaults } private readonly IHost _host; - private readonly HashingTransformer.ColumnInfo[] _columns; + private readonly HashTransformer.ColumnInfo[] _columns; internal static bool IsColumnTypeValid(ColumnType type) { @@ -1213,7 +1207,7 @@ internal static bool IsColumnTypeValid(ColumnType type) /// Limit the number of keys used to generate the slot name to this many. 0 means no invert hashing, -1 means no limit. public HashingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, int hashBits = Defaults.HashBits, int invertHash = Defaults.InvertHash) - : this(env, new HashingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn, hashBits: hashBits, invertHash: invertHash)) + : this(env, new HashTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn, hashBits: hashBits, invertHash: invertHash)) { } @@ -1222,14 +1216,14 @@ public HashingEstimator(IHostEnvironment env, string inputColumn, string outputC /// /// Host Environment. /// Description of dataset columns and how to process them. - public HashingEstimator(IHostEnvironment env, params HashingTransformer.ColumnInfo[] columns) + public HashingEstimator(IHostEnvironment env, params HashTransformer.ColumnInfo[] columns) { Contracts.CheckValue(env, nameof(env)); _host = env.Register(nameof(HashingEstimator)); _columns = columns.ToArray(); } - public HashingTransformer Fit(IDataView input) => new HashingTransformer(_host, input, _columns); + public HashTransformer Fit(IDataView input) => new HashTransformer(_host, input, _columns); public SchemaShape GetOutputSchema(SchemaShape inputSchema) { diff --git a/src/Microsoft.ML.Data/Transforms/InvertHashUtils.cs b/src/Microsoft.ML.Data/Transforms/InvertHashUtils.cs index 4175916e58..2a5f0a3fc1 100644 --- a/src/Microsoft.ML.Data/Transforms/InvertHashUtils.cs +++ b/src/Microsoft.ML.Data/Transforms/InvertHashUtils.cs @@ -45,7 +45,7 @@ public static ValueMapper GetSimpleMapper(Schema schema, in bool identity; // Second choice: if key, utilize the KeyValues metadata for that key, if it has one and is text. - if (schema.HasKeyValues(col, type.KeyCount)) + if (schema.HasKeyNames(col, type.KeyCount)) { // REVIEW: Non-textual KeyValues are certainly possible. Should we handle them? // Get the key names. @@ -412,7 +412,7 @@ private static void Save(IChannel ch, ModelSaveContext ctx, CodecFactory factory ctx.SaveTextStream("Terms.txt", writer => { - writer.WriteLine("# Number of terms = {0} of length {1}", v.GetValues().Length, v.Length); + writer.WriteLine("# Number of terms = {0} of length {1}", v.Count, v.Length); foreach (var pair in v.Items()) { var text = pair.Value; diff --git a/src/Microsoft.ML.Data/Transforms/KeyToValue.cs b/src/Microsoft.ML.Data/Transforms/KeyToValueTransform.cs similarity index 83% rename from src/Microsoft.ML.Data/Transforms/KeyToValue.cs rename to src/Microsoft.ML.Data/Transforms/KeyToValueTransform.cs index d8f55403d3..c437c17942 100644 --- a/src/Microsoft.ML.Data/Transforms/KeyToValue.cs +++ b/src/Microsoft.ML.Data/Transforms/KeyToValueTransform.cs @@ -20,17 +20,17 @@ using System.Reflection; using System.Text; -[assembly: LoadableClass(typeof(IDataTransform), typeof(KeyToValueMappingTransformer), typeof(KeyToValueMappingTransformer.Arguments), typeof(SignatureDataTransform), - KeyToValueMappingTransformer.UserName, KeyToValueMappingTransformer.LoaderSignature, "KeyToValue", "KeyToVal", "Unterm")] +[assembly: LoadableClass(typeof(IDataTransform), typeof(KeyToValueTransform), typeof(KeyToValueTransform.Arguments), typeof(SignatureDataTransform), + KeyToValueTransform.UserName, KeyToValueTransform.LoaderSignature, "KeyToValue", "KeyToVal", "Unterm")] -[assembly: LoadableClass(typeof(IDataTransform), typeof(KeyToValueMappingTransformer), null, typeof(SignatureLoadDataTransform), - KeyToValueMappingTransformer.UserName, KeyToValueMappingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IDataTransform), typeof(KeyToValueTransform), null, typeof(SignatureLoadDataTransform), + KeyToValueTransform.UserName, KeyToValueTransform.LoaderSignature)] -[assembly: LoadableClass(typeof(KeyToValueMappingTransformer), null, typeof(SignatureLoadModel), - KeyToValueMappingTransformer.UserName, KeyToValueMappingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(KeyToValueTransform), null, typeof(SignatureLoadModel), + KeyToValueTransform.UserName, KeyToValueTransform.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(KeyToValueMappingTransformer), null, typeof(SignatureLoadRowMapper), - KeyToValueMappingTransformer.UserName, KeyToValueMappingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(KeyToValueTransform), null, typeof(SignatureLoadRowMapper), + KeyToValueTransform.UserName, KeyToValueTransform.LoaderSignature)] namespace Microsoft.ML.Transforms.Conversions { @@ -40,7 +40,7 @@ namespace Microsoft.ML.Transforms.Conversions /// * Output columns utilize the KeyValues metadata. /// * Maps zero values of the key type to the NA of the output type. /// - public sealed class KeyToValueMappingTransformer : OneToOneTransformerBase + public sealed class KeyToValueTransform : OneToOneTransformerBase { public sealed class Column : OneToOneColumn { @@ -78,22 +78,22 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(KeyToValueMappingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(KeyToValueTransform).Assembly.FullName); } /// - /// Create a that takes and transforms one column. + /// Create a that takes and transforms one column. /// - public KeyToValueMappingTransformer(IHostEnvironment env, string columnName) + public KeyToValueTransform(IHostEnvironment env, string columnName) : this(env, (columnName, columnName)) { } /// - /// Create a that takes multiple pairs of columns. + /// Create a that takes multiple pairs of columns. /// - public KeyToValueMappingTransformer(IHostEnvironment env, params (string input, string output)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToValueMappingTransformer)), columns) + public KeyToValueTransform(IHostEnvironment env, params (string input, string output)[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToValueTransform)), columns) { } @@ -107,23 +107,23 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV env.CheckValue(input, nameof(input)); env.CheckNonEmpty(args.Column, nameof(args.Column)); - var transformer = new KeyToValueMappingTransformer(env, args.Column.Select(c => (c.Source ?? c.Name, c.Name)).ToArray()); + var transformer = new KeyToValueTransform(env, args.Column.Select(c => (c.Source ?? c.Name, c.Name)).ToArray()); return transformer.MakeDataTransform(input); } /// /// Factory method for SignatureLoadModel. /// - private static KeyToValueMappingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + private static KeyToValueTransform Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); - var host = env.Register(nameof(KeyToValueMappingTransformer)); + var host = env.Register(nameof(KeyToValueTransform)); host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new KeyToValueMappingTransformer(host, ctx); + return new KeyToValueTransform(host, ctx); } - private KeyToValueMappingTransformer(IHost host, ModelLoadContext ctx) + private KeyToValueTransform(IHost host, ModelLoadContext ctx) : base(host, ctx) { } @@ -154,13 +154,13 @@ public override void Save(ModelSaveContext ctx) protected override IRowMapper MakeRowMapper(Schema inputSchema) => new Mapper(this, inputSchema); - private sealed class Mapper : OneToOneMapperBase, ISaveAsPfa + private sealed class Mapper : MapperBase, ISaveAsPfa { - private readonly KeyToValueMappingTransformer _parent; + private readonly KeyToValueTransform _parent; private readonly ColumnType[] _types; private readonly KeyToValueMap[] _kvMaps; - public Mapper(KeyToValueMappingTransformer parent, Schema inputSchema) + public Mapper(KeyToValueTransform parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -169,7 +169,7 @@ public Mapper(KeyToValueMappingTransformer parent, Schema inputSchema) public bool CanSavePfa => true; - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -210,7 +210,7 @@ public void SaveAsPfa(BoundPfaContext ctx) ctx.DeclareVar(toDeclare.ToArray()); } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _types.Length); @@ -257,7 +257,7 @@ private KeyToValueMap GetKeyMetadata(int iinfo, ColumnType typeKey Host.Check(keyMetadata.Length == typeKey.ItemType.KeyCount); VBufferUtils.Densify(ref keyMetadata); - return new KeyToValueMap(this, typeKey.ItemType.AsKey, typeVal.ItemType.AsPrimitive, keyMetadata, iinfo); + return new KeyToValueMap(this, typeKey.ItemType.AsKey, typeVal.ItemType.AsPrimitive, keyMetadata.Values, iinfo); } /// /// A map is an object capable of creating the association from an input type, to an output @@ -300,7 +300,7 @@ protected KeyToValueMap(Mapper mapper, PrimitiveType typeVal, int iinfo) private class KeyToValueMap : KeyToValueMap { - private readonly VBuffer _values; + private readonly TValue[] _values; private readonly TValue _na; private readonly bool _naMapsToDefault; @@ -308,10 +308,10 @@ private class KeyToValueMap : KeyToValueMap private readonly ValueMapper _convertToUInt; - public KeyToValueMap(Mapper parent, KeyType typeKey, PrimitiveType typeVal, VBuffer values, int iinfo) + public KeyToValueMap(Mapper parent, KeyType typeKey, PrimitiveType typeVal, TValue[] values, int iinfo) : base(parent, typeVal, iinfo) { - Parent.Host.Assert(values.IsDense); + Parent.Host.AssertValue(values); Parent.Host.Assert(typeKey.RawType == typeof(TKey)); Parent.Host.Assert(TypeOutput.RawType == typeof(TValue)); _values = values; @@ -329,18 +329,13 @@ public KeyToValueMap(Mapper parent, KeyType typeKey, PrimitiveType typeVal, VBuf _convertToUInt = Runtime.Data.Conversion.Conversions.Instance.GetStandardConversion(typeKey, NumberType.U4, out identity); } - private void MapKey(in TKey src, ref TValue dst) - { - MapKey(in src, _values.GetValues(), ref dst); - } - - private void MapKey(in TKey src, ReadOnlySpan values, ref TValue dst) + private void MapKey(ref TKey src, ref TValue dst) { uint uintSrc = 0; _convertToUInt(in src, ref uintSrc); // Assign to NA if key value is not in valid range. - if (0 < uintSrc && uintSrc <= values.Length) - dst = values[(int)(uintSrc - 1)]; + if (0 < uintSrc && uintSrc <= _values.Length) + dst = _values[uintSrc - 1]; else dst = _na; } @@ -366,7 +361,7 @@ public override Delegate GetMappingGetter(IRow input) (ref TValue dst) => { getSrc(ref src); - MapKey(in src, ref dst); + MapKey(ref src, ref dst); }; return retVal; } @@ -374,22 +369,27 @@ public override Delegate GetMappingGetter(IRow input) { var src = default(VBuffer); var dstItem = default(TValue); + int maxSize = TypeOutput.IsKnownSizeVector ? TypeOutput.VectorSize : Utils.ArrayMaxSize; ValueGetter> getSrc = input.GetGetter>(Parent.ColMapNewToOld[InfoIndex]); ValueGetter> retVal = (ref VBuffer dst) => { getSrc(ref src); int srcSize = src.Length; - var srcValues = src.GetValues(); - int srcCount = srcValues.Length; + int srcCount = src.Count; + var srcValues = src.Values; + var dstValues = dst.Values; + var dstIndices = dst.Indices; + + int islotDst = 0; - var keyValues = _values.GetValues(); if (src.IsDense) { - var editor = VBufferEditor.Create(ref dst, srcSize); + Utils.EnsureSize(ref dstValues, srcSize, maxSize, keepOld: false); + for (int slot = 0; slot < srcSize; ++slot) { - MapKey(in srcValues[slot], keyValues, ref editor.Values[slot]); + MapKey(ref srcValues[slot], ref dstValues[slot]); // REVIEW: // The current implementation always maps dense to dense, even if the resulting columns could benefit from @@ -400,54 +400,54 @@ public override Delegate GetMappingGetter(IRow input) // defaults is hit. We assume that if the user was willing to densify the data into key values that they will // be fine with this output being dense. } - dst = editor.Commit(); + islotDst = srcSize; } else if (!_naMapsToDefault) { // Sparse input will always result in dense output unless the key metadata maps back to key types. // Currently this always maps sparse to dense, as long as the output type's NA does not equal its default value. - var editor = VBufferEditor.Create(ref dst, srcSize); + Utils.EnsureSize(ref dstValues, srcSize, maxSize, keepOld: false); - var srcIndices = src.GetIndices(); - int nextExplicitSlot = srcCount == 0 ? srcSize : srcIndices[0]; + var srcIndices = src.Indices; + int nextExplicitSlot = src.Count == 0 ? srcSize : srcIndices[0]; int islot = 0; for (int slot = 0; slot < srcSize; ++slot) { if (nextExplicitSlot == slot) { // Current slot has an explicitly defined value. - Parent.Host.Assert(islot < srcCount); - MapKey(in srcValues[islot], keyValues, ref editor.Values[slot]); - nextExplicitSlot = ++islot == srcCount ? srcSize : srcIndices[islot]; + Parent.Host.Assert(islot < src.Count); + MapKey(ref srcValues[islot], ref dstValues[slot]); + nextExplicitSlot = ++islot == src.Count ? srcSize : srcIndices[islot]; Parent.Host.Assert(slot < nextExplicitSlot); } else { Parent.Host.Assert(slot < nextExplicitSlot); - editor.Values[slot] = _na; + dstValues[slot] = _na; } } - dst = editor.Commit(); + islotDst = srcSize; } else { // As the default value equals the NA value for the output type, we produce sparse output. - var editor = VBufferEditor.Create(ref dst, srcSize, srcCount); - var srcIndices = src.GetIndices(); - var islotDst = 0; + Utils.EnsureSize(ref dstValues, srcCount, maxSize, keepOld: false); + Utils.EnsureSize(ref dstIndices, srcCount, maxSize, keepOld: false); + var srcIndices = src.Indices; for (int islotSrc = 0; islotSrc < srcCount; ++islotSrc) { // Current slot has an explicitly defined value. Parent.Host.Assert(islotSrc < srcCount); - MapKey(in srcValues[islotSrc], keyValues, ref dstItem); + MapKey(ref srcValues[islotSrc], ref dstItem); if (!_isDefault(in dstItem)) { - editor.Values[islotDst] = dstItem; - editor.Indices[islotDst++] = srcIndices[islotSrc]; + dstValues[islotDst] = dstItem; + dstIndices[islotDst++] = srcIndices[islotSrc]; } } - dst = editor.CommitTruncated(islotDst); } + dst = new VBuffer(srcSize, islotDst, dstValues, dstIndices); }; return retVal; } @@ -469,9 +469,8 @@ public override JToken SavePfa(BoundPfaContext ctx, JToken srcToken) if (TypeOutput.IsText) { jsonValues = new JArray(); - var keyValues = _values.GetValues(); - for (int i = 0; i < keyValues.Length; ++i) - jsonValues.Add(keyValues[i].ToString()); + for (int i = 0; i < _values.Length; ++i) + jsonValues.Add(_values[i].ToString()); } else jsonValues = new JArray(_values); @@ -496,15 +495,15 @@ public override JToken SavePfa(BoundPfaContext ctx, JToken srcToken) } } - public sealed class KeyToValueMappingEstimator : TrivialEstimator + public sealed class KeyToValueEstimator : TrivialEstimator { - public KeyToValueMappingEstimator(IHostEnvironment env, string columnName) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToValueMappingEstimator)), new KeyToValueMappingTransformer(env, columnName)) + public KeyToValueEstimator(IHostEnvironment env, string columnName) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToValueEstimator)), new KeyToValueTransform(env, columnName)) { } - public KeyToValueMappingEstimator(IHostEnvironment env, params (string input, string output)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToValueMappingEstimator)), new KeyToValueMappingTransformer(env, columns)) + public KeyToValueEstimator(IHostEnvironment env, params (string input, string output)[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToValueEstimator)), new KeyToValueTransform(env, columns)) { } @@ -605,7 +604,7 @@ public override IEstimator Reconcile(IHostEnvironment env, var outCol = (IColInput)toOutput[i]; cols[i] = (inputNames[outCol.Input], outputNames[toOutput[i]]); } - return new KeyToValueMappingEstimator(env, cols); + return new KeyToValueEstimator(env, cols); } } diff --git a/src/Microsoft.ML.Data/Transforms/KeyToVector.cs b/src/Microsoft.ML.Data/Transforms/KeyToVectorTransform.cs similarity index 91% rename from src/Microsoft.ML.Data/Transforms/KeyToVector.cs rename to src/Microsoft.ML.Data/Transforms/KeyToVectorTransform.cs index 55d0c4ca54..a076dc452b 100644 --- a/src/Microsoft.ML.Data/Transforms/KeyToVector.cs +++ b/src/Microsoft.ML.Data/Transforms/KeyToVectorTransform.cs @@ -19,21 +19,21 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(KeyToVectorMappingTransformer.Summary, typeof(IDataTransform), typeof(KeyToVectorMappingTransformer), typeof(KeyToVectorMappingTransformer.Arguments), typeof(SignatureDataTransform), - "Key To Vector Transform", KeyToVectorMappingTransformer.UserName, "KeyToVector", "ToVector", DocName = "transform/KeyToVectorTransform.md")] +[assembly: LoadableClass(KeyToVectorTransform.Summary, typeof(IDataTransform), typeof(KeyToVectorTransform), typeof(KeyToVectorTransform.Arguments), typeof(SignatureDataTransform), + "Key To Vector Transform", KeyToVectorTransform.UserName, "KeyToVector", "ToVector", DocName = "transform/KeyToVectorTransform.md")] -[assembly: LoadableClass(KeyToVectorMappingTransformer.Summary, typeof(IDataTransform), typeof(KeyToVectorMappingTransformer), null, typeof(SignatureLoadDataTransform), - "Key To Vector Transform", KeyToVectorMappingTransformer.LoaderSignature)] +[assembly: LoadableClass(KeyToVectorTransform.Summary, typeof(IDataTransform), typeof(KeyToVectorTransform), null, typeof(SignatureLoadDataTransform), + "Key To Vector Transform", KeyToVectorTransform.LoaderSignature)] -[assembly: LoadableClass(KeyToVectorMappingTransformer.Summary, typeof(KeyToVectorMappingTransformer), null, typeof(SignatureLoadModel), - KeyToVectorMappingTransformer.UserName, KeyToVectorMappingTransformer.LoaderSignature)] +[assembly: LoadableClass(KeyToVectorTransform.Summary, typeof(KeyToVectorTransform), null, typeof(SignatureLoadModel), + KeyToVectorTransform.UserName, KeyToVectorTransform.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(KeyToVectorMappingTransformer), null, typeof(SignatureLoadRowMapper), - KeyToVectorMappingTransformer.UserName, KeyToVectorMappingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(KeyToVectorTransform), null, typeof(SignatureLoadRowMapper), + KeyToVectorTransform.UserName, KeyToVectorTransform.LoaderSignature)] namespace Microsoft.ML.Transforms.Conversions { - public sealed class KeyToVectorMappingTransformer : OneToOneTransformerBase + public sealed class KeyToVectorTransform : OneToOneTransformerBase { public abstract class ColumnBase : OneToOneColumn { @@ -127,7 +127,7 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].input, reason, type.ToString()); } - public KeyToVectorMappingTransformer(IHostEnvironment env, params ColumnInfo[] columns) : + public KeyToVectorTransform(IHostEnvironment env, params ColumnInfo[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), GetColumnPairs(columns)) { _columns = columns.ToArray(); @@ -146,7 +146,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(KeyToVectorMappingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(KeyToVectorTransform).Assembly.FullName); } public override void Save(ModelSaveContext ctx) @@ -166,7 +166,7 @@ public override void Save(ModelSaveContext ctx) } // Factory method for SignatureLoadModel. - private static KeyToVectorMappingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + private static KeyToVectorTransform Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(RegistrationName); @@ -178,10 +178,10 @@ private static KeyToVectorMappingTransformer Create(IHostEnvironment env, ModelL int cbFloat = ctx.Reader.ReadInt32(); env.CheckDecode(cbFloat == sizeof(float)); } - return new KeyToVectorMappingTransformer(host, ctx); + return new KeyToVectorTransform(host, ctx); } - private KeyToVectorMappingTransformer(IHost host, ModelLoadContext ctx) + private KeyToVectorTransform(IHost host, ModelLoadContext ctx) : base(host, ctx) { var columnsLength = ColumnPairs.Length; @@ -198,7 +198,7 @@ private KeyToVectorMappingTransformer(IHost host, ModelLoadContext ctx) } public static IDataTransform Create(IHostEnvironment env, IDataView input, params ColumnInfo[] columns) => - new KeyToVectorMappingTransformer(env, columns).MakeDataTransform(input); + new KeyToVectorTransform(env, columns).MakeDataTransform(input); // Factory method for SignatureDataTransform. private static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) @@ -217,7 +217,7 @@ private static IDataTransform Create(IHostEnvironment env, Arguments args, IData item.Name, item.Bag ?? args.Bag); }; - return new KeyToVectorMappingTransformer(env, cols).MakeDataTransform(input); + return new KeyToVectorTransform(env, cols).MakeDataTransform(input); } // Factory method for SignatureLoadDataTransform. @@ -230,7 +230,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : OneToOneMapperBase, ISaveAsOnnx, ISaveAsPfa + private sealed class Mapper : MapperBase, ISaveAsOnnx, ISaveAsPfa { private sealed class ColInfo { @@ -246,11 +246,11 @@ public ColInfo(string name, string source, ColumnType type) } } - private readonly KeyToVectorMappingTransformer _parent; + private readonly KeyToVectorTransform _parent; private readonly ColInfo[] _infos; private readonly VectorType[] _types; - public Mapper(KeyToVectorMappingTransformer parent, Schema inputSchema) + public Mapper(KeyToVectorTransform parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -280,7 +280,7 @@ private ColInfo[] CreateInfos(ISchema inputSchema) return infos; } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -388,7 +388,9 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) var keys = new ReadOnlyMemory[keyCount]; namesKeySrc.CopyTo(keys); - var editor = VBufferEditor.Create(ref dst, slotLim); + var values = dst.Values; + if (Utils.Size(values) < slotLim) + values = new ReadOnlyMemory[slotLim]; var sb = new StringBuilder(); int slot = 0; @@ -407,12 +409,12 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) { sb.Length = len; sb.AppendMemory(key); - editor.Values[slot++] = sb.ToString().AsMemory(); + values[slot++] = sb.ToString().AsMemory(); } } Host.Assert(slot == slotLim); - dst = editor.Commit(); + dst = new VBuffer>(slotLim, values, dst.Indices); } private void GetCategoricalSlotRanges(int iinfo, ref VBuffer dst) @@ -437,7 +439,7 @@ private void GetCategoricalSlotRanges(int iinfo, ref VBuffer dst) dst = new VBuffer(ranges.Length, ranges); } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _infos.Length); @@ -473,15 +475,20 @@ private ValueGetter> MakeGetterOne(IRow input, int iinfo) getSrc(ref src); if (src == 0 || src > size) { - VBufferUtils.Resize(ref dst, size, 0); + dst = new VBuffer(size, 0, dst.Values, dst.Indices); return; } - var editor = VBufferEditor.Create(ref dst, size, 1); - editor.Values[0] = 1; - editor.Indices[0] = (int)src - 1; + var values = dst.Values; + var indices = dst.Indices; + if (Utils.Size(values) < 1) + values = new float[1]; + if (Utils.Size(indices) < 1) + indices = new int[1]; + values[0] = 1; + indices[0] = (int)src - 1; - dst = editor.Commit(); + dst = new VBuffer(size, 1, values, indices); }; } @@ -516,8 +523,8 @@ private ValueGetter> MakeGetterBag(IRow input, int iinfo) Host.Check(cv == 0 || src.Length == cv); // The indices are irrelevant in the bagging case. - var values = src.GetValues(); - int count = values.Length; + var values = src.Values; + int count = src.Count; for (int slot = 0; slot < count; slot++) { uint key = values[slot] - 1; @@ -557,11 +564,17 @@ private ValueGetter> MakeGetterInd(IRow input, int iinfo) Host.Check(lenSrc == cv || cv == 0); // Since we generate values in order, no need for a builder. + var valuesDst = dst.Values; + var indicesDst = dst.Indices; + int lenDst = checked(size * lenSrc); - var values = src.GetValues(); - int cntSrc = values.Length; - var editor = VBufferEditor.Create(ref dst, lenDst, cntSrc); + int cntSrc = src.Count; + if (Utils.Size(valuesDst) < cntSrc) + valuesDst = new float[cntSrc]; + if (Utils.Size(indicesDst) < cntSrc) + indicesDst = new int[cntSrc]; + var values = src.Values; int count = 0; if (src.IsDense) { @@ -572,24 +585,24 @@ private ValueGetter> MakeGetterInd(IRow input, int iinfo) uint key = values[slot] - 1; if (key >= (uint)size) continue; - editor.Values[count] = 1; - editor.Indices[count++] = slot * size + (int)key; + valuesDst[count] = 1; + indicesDst[count++] = slot * size + (int)key; } } else { - var indices = src.GetIndices(); + var indices = src.Indices; for (int islot = 0; islot < cntSrc; islot++) { Host.Assert(count < cntSrc); uint key = values[islot] - 1; if (key >= (uint)size) continue; - editor.Values[count] = 1; - editor.Indices[count++] = indices[islot] * size + (int)key; + valuesDst[count] = 1; + indicesDst[count++] = indices[islot] * size + (int)key; } } - dst = editor.CommitTruncated(count); + dst = new VBuffer(lenDst, count, valuesDst, indicesDst); }; } @@ -720,24 +733,24 @@ private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColInfo info, string src } } - public sealed class KeyToVectorMappingEstimator : TrivialEstimator + public sealed class KeyToVectorMappingEstimator : TrivialEstimator { internal static class Defaults { public const bool Bag = false; } - public KeyToVectorMappingEstimator(IHostEnvironment env, params KeyToVectorMappingTransformer.ColumnInfo[] columns) - : this(env, new KeyToVectorMappingTransformer(env, columns)) + public KeyToVectorMappingEstimator(IHostEnvironment env, params KeyToVectorTransform.ColumnInfo[] columns) + : this(env, new KeyToVectorTransform(env, columns)) { } public KeyToVectorMappingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, bool bag = Defaults.Bag) - : this(env, new KeyToVectorMappingTransformer(env, new KeyToVectorMappingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn, bag))) + : this(env, new KeyToVectorTransform(env, new KeyToVectorTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn, bag))) { } - private KeyToVectorMappingEstimator(IHostEnvironment env, KeyToVectorMappingTransformer transformer) + private KeyToVectorMappingEstimator(IHostEnvironment env, KeyToVectorTransform transformer) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToVectorMappingEstimator)), transformer) { } @@ -872,11 +885,11 @@ public override IEstimator Reconcile(IHostEnvironment env, IReadOnlyDictionary outputNames, IReadOnlyCollection usedNames) { - var infos = new KeyToVectorMappingTransformer.ColumnInfo[toOutput.Length]; + var infos = new KeyToVectorTransform.ColumnInfo[toOutput.Length]; for (int i = 0; i < toOutput.Length; ++i) { var col = (IColInput)toOutput[i]; - infos[i] = new KeyToVectorMappingTransformer.ColumnInfo(inputNames[col.Input], outputNames[toOutput[i]], col.Bag); + infos[i] = new KeyToVectorTransform.ColumnInfo(inputNames[col.Input], outputNames[toOutput[i]], col.Bag); } return new KeyToVectorMappingEstimator(env, infos); } diff --git a/src/Microsoft.ML.Data/Transforms/LabelConvertTransform.cs b/src/Microsoft.ML.Data/Transforms/LabelConvertTransform.cs index f63b97333b..50bbe23a89 100644 --- a/src/Microsoft.ML.Data/Transforms/LabelConvertTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/LabelConvertTransform.cs @@ -66,7 +66,7 @@ private static VersionInfo GetVersionInfo() private VectorType _slotType; /// - /// Initializes a new instance of . + /// Convenience constructor for public facing API. /// /// Host Environment. /// Input . This is the output from previous transform or loader. diff --git a/src/Microsoft.ML.Data/Transforms/LabelIndicatorTransform.cs b/src/Microsoft.ML.Data/Transforms/LabelIndicatorTransform.cs index 3734245258..49af19d26a 100644 --- a/src/Microsoft.ML.Data/Transforms/LabelIndicatorTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/LabelIndicatorTransform.cs @@ -113,7 +113,7 @@ private static string TestIsMulticlassLabel(ColumnType type) } /// - /// Initializes a new instance of . + /// Convenience constructor for public facing API. /// /// Host Environment. /// Input . This is the output from previous transform or loader. diff --git a/src/Microsoft.ML.Data/Transforms/NAFilter.cs b/src/Microsoft.ML.Data/Transforms/NAFilter.cs index 280546f785..cd49e30b78 100644 --- a/src/Microsoft.ML.Data/Transforms/NAFilter.cs +++ b/src/Microsoft.ML.Data/Transforms/NAFilter.cs @@ -79,7 +79,7 @@ private static VersionInfo GetVersionInfo() private const string RegistrationName = "MissingValueFilter"; /// - /// Initializes a new instance of . + /// Convenience constructor for public facing API. /// /// Host Environment. /// Input . This is the output from previous transform or loader. diff --git a/src/Microsoft.ML.Data/Transforms/NopTransform.cs b/src/Microsoft.ML.Data/Transforms/NopTransform.cs index 1ba9ed4c38..bf48e357f7 100644 --- a/src/Microsoft.ML.Data/Transforms/NopTransform.cs +++ b/src/Microsoft.ML.Data/Transforms/NopTransform.cs @@ -103,9 +103,9 @@ public bool CanShuffle public Schema Schema => Source.Schema; - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { - return Source.GetRowCount(); + return Source.GetRowCount(lazy); } public IRowCursor GetRowCursor(Func predicate, IRandom rand = null) diff --git a/src/Microsoft.ML.Data/Transforms/NormalizeColumn.cs b/src/Microsoft.ML.Data/Transforms/NormalizeColumn.cs index 7c3bdd363c..fb001367c3 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizeColumn.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizeColumn.cs @@ -263,6 +263,33 @@ public static IDataTransform CreateMinMaxNormalizer(IHostEnvironment env, IDataV return normalizer.Fit(input).MakeDataTransform(input); } + /// + /// Potentially apply a min-max normalizer to the data's feature column, keeping all existing role + /// mappings except for the feature role mapping. + /// + /// The host environment to use to potentially instantiate the transform + /// The role-mapped data that is potentially going to be modified by this method. + /// The trainer to query as to whether it wants normalization. If the + /// 's is true + /// True if the normalizer was applied and was modified + public static bool CreateIfNeeded(IHostEnvironment env, ref RoleMappedData data, ITrainer trainer) + { + Contracts.CheckValue(env, nameof(env)); + env.CheckValue(data, nameof(data)); + env.CheckValue(trainer, nameof(trainer)); + + // If the trainer does not need normalization, or if the features either don't exist + // or are not normalized, return false. + if (!trainer.Info.NeedNormalization || data.Schema.FeaturesAreNormalized() != false) + return false; + var featInfo = data.Schema.Feature; + env.AssertValue(featInfo); // Should be defined, if FeaturesAreNormalized returned a definite value. + + var view = CreateMinMaxNormalizer(env, data.Data, name: featInfo.Name); + data = new RoleMappedData(view, data.Schema.GetColumnRoleNames()); + return true; + } + /// /// Public create method corresponding to SignatureDataTransform. /// @@ -365,8 +392,6 @@ private AffineColumnFunction(IHost host) public abstract void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc); - public abstract NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams(); - public static AffineColumnFunction Create(ModelLoadContext ctx, IHost host, ColumnType typeSrc) { Contracts.CheckValue(host, nameof(host)); @@ -387,10 +412,14 @@ public static AffineColumnFunction Create(ModelLoadContext ctx, IHost host, Colu throw host.ExceptUserArg(nameof(AffineArgumentsBase.Column), "Wrong column type. Expected: R4, R8, Vec or Vec. Got: {0}.", typeSrc.ToString()); } - private abstract class ImplOne : AffineColumnFunction + private abstract class ImplOne : AffineColumnFunction, NormalizerTransformer.IAffineData { protected readonly TFloat Scale; protected readonly TFloat Offset; + + TFloat NormalizerTransformer.IAffineData.Scale => Scale; + TFloat NormalizerTransformer.IAffineData.Offset => Offset; + protected ImplOne(IHost host, TFloat scale, TFloat offset) : base(host) { @@ -406,18 +435,18 @@ public override void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType bldr.AddPrimitive("AffineScale", typeSrc, Scale); bldr.AddPrimitive("AffineOffset", typeSrc, Offset); } - - public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() - => new NormalizingTransformer.AffineNormalizerModelParameters(Scale, Offset); - } - private abstract class ImplVec : AffineColumnFunction + private abstract class ImplVec : AffineColumnFunction, NormalizerTransformer.IAffineData> { protected readonly TFloat[] Scale; protected readonly TFloat[] Offset; protected readonly int[] IndicesNonZeroOffset; + ImmutableArray NormalizerTransformer.IAffineData>.Scale => ImmutableArray.Create(Scale); + ImmutableArray NormalizerTransformer.IAffineData>.Offset + => Offset == null ? ImmutableArray.Create() : ImmutableArray.Create(Offset); + protected ImplVec(IHost host, TFloat[] scale, TFloat[] offset, int[] indicesNonZeroOffset) : base(host) { @@ -454,9 +483,6 @@ private void OffsetMetadataGetter(int col, ref VBuffer dst) var src = new VBuffer(Offset.Length, Offset); src.CopyTo(ref dst); } - - public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() - => new NormalizingTransformer.AffineNormalizerModelParameters> (ImmutableArray.Create(Scale), ImmutableArray.Create(Offset)); } } @@ -473,7 +499,10 @@ private CdfColumnFunction(IHost host) public abstract void Save(ModelSaveContext ctx); - public JToken PfaInfo(BoundPfaContext ctx, JToken srcToken) => null; + public JToken PfaInfo(BoundPfaContext ctx, JToken srcToken) + { + return null; + } public bool CanSaveOnnx(OnnxContext ctx) => false; @@ -481,8 +510,6 @@ public bool OnnxInfo(OnnxContext ctx, OnnxNode nodeProtoWrapper, int featureCoun => throw Host.ExceptNotSupp(); public abstract Delegate GetGetter(IRow input, int icol); - public abstract void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc); - public abstract NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams(); public static CdfColumnFunction Create(ModelLoadContext ctx, IHost host, ColumnType typeSrc) { @@ -504,7 +531,9 @@ public static CdfColumnFunction Create(ModelLoadContext ctx, IHost host, ColumnT throw host.ExceptUserArg(nameof(AffineArgumentsBase.Column), "Wrong column type. Expected: R4, R8, Vec or Vec. Got: {0}.", typeSrc); } - private abstract class ImplOne : CdfColumnFunction + public abstract void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc); + + private abstract class ImplOne : CdfColumnFunction, NormalizerTransformer.ICdfData { protected readonly TFloat Mean; protected readonly TFloat Stddev; @@ -518,6 +547,10 @@ protected ImplOne(IHost host, TFloat mean, TFloat stddev, bool useLog) UseLog = useLog; } + TFloat NormalizerTransformer.ICdfData.Mean => Mean; + TFloat NormalizerTransformer.ICdfData.Stddev => Stddev; + bool NormalizerTransformer.ICdfData.UseLog => UseLog; + public override void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc) { Host.CheckValue(bldr, nameof(bldr)); @@ -527,17 +560,18 @@ public override void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType bldr.AddPrimitive("CdfStdDev", typeSrc, Stddev); bldr.AddPrimitive("CdfUseLog", BoolType.Instance, UseLog); } - - public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() - => new NormalizingTransformer.CdfNormalizerModelParameters(Mean, Stddev, UseLog); } - private abstract class ImplVec : CdfColumnFunction + private abstract class ImplVec : CdfColumnFunction, NormalizerTransformer.ICdfData> { protected readonly TFloat[] Mean; protected readonly TFloat[] Stddev; protected readonly bool UseLog; + ImmutableArray NormalizerTransformer.ICdfData>.Mean => ImmutableArray.Create(Mean); + ImmutableArray NormalizerTransformer.ICdfData>.Stddev => ImmutableArray.Create(Stddev); + bool NormalizerTransformer.ICdfData>.UseLog => UseLog; + protected ImplVec(IHost host, TFloat[] mean, TFloat[] stddev, bool useLog) : base(host) { @@ -571,9 +605,6 @@ private void StddevMetadataGetter(int col, ref VBuffer dst) var src = new VBuffer(Stddev.Length, Stddev); src.CopyTo(ref dst); } - - public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() - => new NormalizingTransformer.CdfNormalizerModelParameters>(ImmutableArray.Create(Mean), ImmutableArray.Create(Stddev), UseLog); } public const string LoaderSignature = "CdfNormalizeFunction"; @@ -602,7 +633,10 @@ protected BinColumnFunction(IHost host) public abstract void Save(ModelSaveContext ctx); - public JToken PfaInfo(BoundPfaContext ctx, JToken srcToken) => null; + public JToken PfaInfo(BoundPfaContext ctx, JToken srcToken) + { + return null; + } public bool CanSaveOnnx(OnnxContext ctx) => false; @@ -616,8 +650,6 @@ public void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc) // REVIEW: How to attach information on the bins, to metadata? } - public abstract NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams(); - public static BinColumnFunction Create(ModelLoadContext ctx, IHost host, ColumnType typeSrc) { Contracts.CheckValue(host, nameof(host)); diff --git a/src/Microsoft.ML.Data/Transforms/NormalizeColumnDbl.cs b/src/Microsoft.ML.Data/Transforms/NormalizeColumnDbl.cs index 5792486012..5f33651ba5 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizeColumnDbl.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizeColumnDbl.cs @@ -594,7 +594,6 @@ public override Delegate GetGetter(IRow input, int icol) }; return del; } - } // REVIEW: Does it make sense to have 3 separate classes for the 3 cases in GetResult? @@ -1033,12 +1032,14 @@ public static IColumnFunction Create(IHost host, TFloat[][] binUpperBounds, bool private static class Dbl { - public sealed class ImplOne : BinColumnFunction + public sealed class ImplOne : BinColumnFunction, NormalizerTransformer.IBinData { private readonly TFloat[] _binUpperBounds; private readonly TFloat _den; private readonly TFloat _offset; + ImmutableArray NormalizerTransformer.IBinData.UpperBounds => ImmutableArray.Create(_binUpperBounds); + public ImplOne(IHost host, TFloat[] binUpperBounds, bool fixZero) : base(host) { @@ -1101,17 +1102,17 @@ private void GetResult(ref TFloat input, ref TFloat value) { value = BinUtils.GetValue(in input, _binUpperBounds, _den, _offset); } - - public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() - => new NormalizingTransformer.BinNormalizerModelParameters(ImmutableArray.Create(_binUpperBounds), _den,_offset); } - public sealed class ImplVec : BinColumnFunction + public sealed class ImplVec : BinColumnFunction, NormalizerTransformer.IBinData> { private readonly TFloat[][] _binUpperBounds; private readonly TFloat[] _den; private readonly TFloat[] _offset; + ImmutableArray> NormalizerTransformer.IBinData>.UpperBounds + => _binUpperBounds.Select(b => ImmutableArray.Create(b)).ToImmutableArray(); + public ImplVec(IHost host, TFloat[][] binUpperBounds, bool fixZero) : base(host) { @@ -1240,7 +1241,7 @@ private void GetResult(in VBuffer input, ref VBuffer value, Buff } else { - var indices = input.GetIndices(); + var indices = input.Indices; for (int ii = 0; ii < values.Length; ii++) { int i = indices[ii]; @@ -1251,11 +1252,6 @@ private void GetResult(in VBuffer input, ref VBuffer value, Buff bldr.GetResult(ref value); } - - public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() - => new NormalizingTransformer.BinNormalizerModelParameters>(_binUpperBounds.Select(b => ImmutableArray.Create(b)).ToImmutableArray(), - ImmutableArray.Create(_den), - ImmutableArray.Create(_offset)); } } } @@ -1414,7 +1410,7 @@ protected override bool ProcessValue(in TFloat val) { if (!base.ProcessValue(in val)) return false; - VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = val; + _buffer.Values[0] = val; Aggregator.ProcessValue(in _buffer); return true; } @@ -1558,7 +1554,7 @@ protected override bool ProcessValue(in TFloat origVal) { if (!base.ProcessValue(in origVal)) return false; - VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = origVal; + _buffer.Values[0] = origVal; _aggregator.ProcessValue(in _buffer); return true; } @@ -1890,7 +1886,7 @@ private SupervisedBinVecColumnFunctionBuilder(IHost host, long lim, bool fix, in protected override bool AcceptColumnValue(in VBuffer colValuesBuffer) { - return !VBufferUtils.HasNaNs(in colValuesBuffer); + return !colValuesBuffer.Values.Any(TFloat.IsNaN); } public override IColumnFunction CreateColumnFunction() diff --git a/src/Microsoft.ML.Data/Transforms/NormalizeColumnSng.cs b/src/Microsoft.ML.Data/Transforms/NormalizeColumnSng.cs index 54e6693f76..7015814e70 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizeColumnSng.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizeColumnSng.cs @@ -356,14 +356,14 @@ public void ProcessValue(in VBuffer value) var size = _min.Length; Contracts.Check(value.Length == size); _trainCount++; - var values = value.GetValues(); - var count = values.Length; + var count = value.Count; Contracts.Assert(0 <= count & count <= size); if (count == 0) return; if (count == size) { + var values = value.Values; for (int j = 0; j < count; j++) { var val = values[j]; @@ -373,7 +373,8 @@ public void ProcessValue(in VBuffer value) } else { - var indices = value.GetIndices(); + var indices = value.Indices; + var values = value.Values; for (int k = 0; k < count; k++) { var val = values[k]; @@ -458,14 +459,14 @@ public void ProcessValue(in VBuffer value) { _trainCount++; var size = _mean.Length; - var values = value.GetValues(); - var count = values.Length; + var count = value.Count; Contracts.Assert(0 <= count & count <= size); if (count == 0) return; if (count == size) { + var values = value.Values; for (int j = 0; j < count; j++) { var origVal = values[j]; @@ -474,7 +475,8 @@ public void ProcessValue(in VBuffer value) } else { - var indices = value.GetIndices(); + var indices = value.Indices; + var values = value.Values; for (int k = 0; k < count; k++) { var origVal = values[k]; @@ -704,8 +706,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b { Contracts.Assert(input.Length == scale.Length); int size = scale.Length; - var values = input.GetValues(); - int count = values.Length; + int count = input.Count; Contracts.Assert(0 <= count & count <= size); // We always start with sparse, since we may make things sparser than the source. @@ -713,6 +714,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b if (count == 0) return; + var values = input.Values; if (count >= size) { for (int i = 0; i < size; i++) @@ -721,7 +723,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b } // The input is sparse. - var indices = input.GetIndices(); + var indices = input.Indices; for (int ii = 0; ii < count; ii++) { int i = indices[ii]; @@ -735,8 +737,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b { Contracts.Assert(input.Length == scale.Length); int size = scale.Length; - var values = input.GetValues(); - int count = values.Length; + int count = input.Count; Contracts.Assert(0 <= count & count <= size); // We always start with sparse, since we may make things sparser than the source. @@ -749,6 +750,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b return; } + var values = input.Values; if (count >= size) { for (int i = 0; i < size; i++) @@ -757,7 +759,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b } // The input is sparse. - var indices = input.GetIndices(); + var indices = input.Indices; int ii = 0; int ivSrc = indices[ii]; Contracts.Assert(ivSrc < size); @@ -781,8 +783,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b Contracts.Assert(input.Length == scale.Length); int size = scale.Length; - var values = input.GetValues(); - int count = values.Length; + int count = input.Count; Contracts.Assert(0 <= count & count <= size); // We always start with sparse, since we may make things sparser than the source. @@ -795,6 +796,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b return; } + var values = input.Values; if (count >= size) { for (int i = 0; i < size; i++) @@ -803,7 +805,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b } // The input is sparse. - var indices = input.GetIndices(); + var indices = input.Indices; int ii = 0; int ivSrc = indices[ii]; int inz = 0; @@ -981,8 +983,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b { Contracts.Assert(input.Length == mean.Length); int size = mean.Length; - var values = input.GetValues(); - int count = values.Length; + int count = input.Count; Contracts.Assert(0 <= count & count <= size); // We always start with sparse, since we may make things sparser than the source. @@ -991,6 +992,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b if (count == 0) return; + var values = input.Values; if (count >= size) { for (int i = 0; i < size; i++) @@ -1007,7 +1009,7 @@ private static void FillValues(in VBuffer input, BufferBuilder b } // The input is sparse. - var indices = input.GetIndices(); + var indices = input.Indices; for (int ii = 0; ii < indices.Length; ii++) { var ivDst = indices[ii]; @@ -1038,12 +1040,14 @@ public static IColumnFunction Create(IHost host, TFloat[][] binUpperBounds, bool private static class Sng { - public sealed class ImplOne : BinColumnFunction + public sealed class ImplOne : BinColumnFunction, NormalizerTransformer.IBinData { private readonly TFloat[] _binUpperBounds; private readonly TFloat _den; private readonly TFloat _offset; + ImmutableArray NormalizerTransformer.IBinData.UpperBounds => ImmutableArray.Create(_binUpperBounds); + public ImplOne(IHost host, TFloat[] binUpperBounds, bool fixZero) : base(host) { @@ -1097,26 +1101,26 @@ public override Delegate GetGetter(IRow input, int icol) (ref TFloat dst) => { getSrc(ref dst); - GetResult(dst, ref dst); + GetResult(ref dst, ref dst); }; return del; } - private void GetResult(TFloat input, ref TFloat value) + private void GetResult(ref TFloat input, ref TFloat value) { - value = BinUtils.GetValue(input, _binUpperBounds, _den, _offset); + value = BinUtils.GetValue(ref input, _binUpperBounds, _den, _offset); } - - public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() - => new NormalizingTransformer.BinNormalizerModelParameters(ImmutableArray.Create(_binUpperBounds), _den, _offset); } - public sealed class ImplVec : BinColumnFunction + public sealed class ImplVec : BinColumnFunction, NormalizerTransformer.IBinData> { private readonly TFloat[][] _binUpperBounds; private readonly TFloat[] _den; private readonly TFloat[] _offset; + ImmutableArray> NormalizerTransformer.IBinData>.UpperBounds + => _binUpperBounds.Select(b => ImmutableArray.Create(b)).ToImmutableArray(); + public ImplVec(IHost host, TFloat[][] binUpperBounds, bool fixZero) : base(host) { @@ -1193,8 +1197,7 @@ private void GetResult(in VBuffer input, ref VBuffer value, Buff { Contracts.Assert(input.Length == _binUpperBounds.Length); int size = _binUpperBounds.Length; - var values = input.GetValues(); - int count = values.Length; + int count = input.Count; Contracts.Assert(0 <= count & count <= size); // We always start with sparse, since we may make things sparser than the source. @@ -1205,17 +1208,18 @@ private void GetResult(in VBuffer input, ref VBuffer value, Buff return; } + var values = input.Values; if (count >= size) { if (_offset != null) { for (int i = 0; i < size; i++) - bldr.AddFeature(i, BinUtils.GetValue(values[i], _binUpperBounds[i], _den[i], _offset[i])); + bldr.AddFeature(i, BinUtils.GetValue(ref values[i], _binUpperBounds[i], _den[i], _offset[i])); } else { for (int i = 0; i < size; i++) - bldr.AddFeature(i, BinUtils.GetValue(values[i], _binUpperBounds[i], _den[i])); + bldr.AddFeature(i, BinUtils.GetValue(ref values[i], _binUpperBounds[i], _den[i])); } bldr.GetResult(ref value); return; @@ -1224,7 +1228,7 @@ private void GetResult(in VBuffer input, ref VBuffer value, Buff // The input is sparse. if (_offset != null) { - var indices = input.GetIndices(); + var indices = input.Indices; int ii = 0; int ivSrc = indices[ii]; Contracts.Assert(ivSrc < size); @@ -1235,35 +1239,29 @@ private void GetResult(in VBuffer input, ref VBuffer value, Buff if (ivDst == ivSrc) { bldr.AddFeature(ivDst, - BinUtils.GetValue(values[ii], _binUpperBounds[ivDst], _den[ivDst], _offset[ivDst])); + BinUtils.GetValue(ref values[ii], _binUpperBounds[ivDst], _den[ivDst], _offset[ivDst])); ivSrc = ++ii < count ? indices[ii] : size; Contracts.Assert(ii == count || ivSrc < size); } else bldr.AddFeature(ivDst, - BinUtils.GetValue(zero, _binUpperBounds[ivDst], _den[ivDst], _offset[ivDst])); + BinUtils.GetValue(ref zero, _binUpperBounds[ivDst], _den[ivDst], _offset[ivDst])); } } else { - var indices = input.GetIndices(); + var indices = input.Indices; for (int ii = 0; ii < count; ii++) { int i = indices[ii]; Contracts.Assert(0 <= i & i < size); - bldr.AddFeature(i, BinUtils.GetValue(values[ii], _binUpperBounds[i], _den[i])); + bldr.AddFeature(i, BinUtils.GetValue(ref values[ii], _binUpperBounds[i], _den[i])); } } bldr.GetResult(ref value); } - - public override NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams() - => new NormalizingTransformer.BinNormalizerModelParameters>( - _binUpperBounds.Select(b => ImmutableArray.Create(b)).ToImmutableArray(), - ImmutableArray.Create(_den), - ImmutableArray.Create(_offset)); - } + } } } @@ -1378,7 +1376,7 @@ public static TFloat Cdf(TFloat input, TFloat mean, TFloat stddev) internal static partial class BinUtils { - public static TFloat GetValue(TFloat input, TFloat[] binUpperBounds, TFloat den, TFloat offset) + public static TFloat GetValue(ref TFloat input, TFloat[] binUpperBounds, TFloat den, TFloat offset) { if (TFloat.IsNaN(input)) return input; @@ -1389,7 +1387,7 @@ public static TFloat GetValue(TFloat input, TFloat[] binUpperBounds, TFloat den, return value; } - public static TFloat GetValue(TFloat input, TFloat[] binUpperBounds, TFloat den) + public static TFloat GetValue(ref TFloat input, TFloat[] binUpperBounds, TFloat den) { if (TFloat.IsNaN(input)) return input; @@ -1421,7 +1419,7 @@ protected override bool ProcessValue(in TFloat val) { if (!base.ProcessValue(in val)) return false; - VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = val; + _buffer.Values[0] = val; Aggregator.ProcessValue(in _buffer); return true; } @@ -1565,7 +1563,7 @@ protected override bool ProcessValue(in TFloat origVal) { if (!base.ProcessValue(in origVal)) return false; - VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = origVal; + _buffer.Values[0] = origVal; _aggregator.ProcessValue(in _buffer); return true; } @@ -1805,20 +1803,21 @@ protected override bool ProcessValue(in VBuffer buffer) int size = _values.Length; Host.Check(buffer.Length == size); - var values = buffer.GetValues(); - int count = values.Length; + int count = buffer.Count; Host.Assert(0 <= count & count <= size); if (count == 0) return true; if (count == size) { + var values = buffer.Values; for (int j = 0; j < count; j++) _values[j].Add(values[j]); } else { - var indices = buffer.GetIndices(); + var indices = buffer.Indices; + var values = buffer.Values; for (int k = 0; k < count; k++) { var val = values[k]; @@ -1898,7 +1897,7 @@ private SupervisedBinVecColumnFunctionBuilder(IHost host, long lim, bool fix, in protected override bool AcceptColumnValue(in VBuffer colValuesBuffer) { - return !VBufferUtils.HasNaNs(in colValuesBuffer); + return !colValuesBuffer.Values.Any(TFloat.IsNaN); } public override IColumnFunction CreateColumnFunction() diff --git a/src/Microsoft.ML.Data/Transforms/NormalizeUtils.cs b/src/Microsoft.ML.Data/Transforms/NormalizeUtils.cs index 5c06f78b53..8c01d69c74 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizeUtils.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizeUtils.cs @@ -63,8 +63,6 @@ internal interface IColumnFunction : ICanSaveModel bool CanSaveOnnx(OnnxContext ctx); bool OnnxInfo(OnnxContext ctx, OnnxNode nodeProtoWrapper, int featureCount); - - NormalizingTransformer.NormalizerModelParametersBase GetNormalizerModelParams(); } public static class NormalizeUtils diff --git a/src/Microsoft.ML.Data/Transforms/Normalizer.cs b/src/Microsoft.ML.Data/Transforms/Normalizer.cs index bf570b06a7..eee7c2bb29 100644 --- a/src/Microsoft.ML.Data/Transforms/Normalizer.cs +++ b/src/Microsoft.ML.Data/Transforms/Normalizer.cs @@ -16,15 +16,15 @@ using System.Collections.Immutable; using System.Linq; -[assembly: LoadableClass(typeof(NormalizingTransformer), null, typeof(SignatureLoadModel), - "", NormalizingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(NormalizerTransformer), null, typeof(SignatureLoadModel), + "", NormalizerTransformer.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(NormalizingTransformer), null, typeof(SignatureLoadRowMapper), - "", NormalizingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(NormalizerTransformer), null, typeof(SignatureLoadRowMapper), + "", NormalizerTransformer.LoaderSignature)] namespace Microsoft.ML.Transforms.Normalizers { - public sealed class NormalizingEstimator : IEstimator + public sealed class NormalizingEstimator : IEstimator { internal static class Defaults { @@ -203,10 +203,10 @@ public NormalizingEstimator(IHostEnvironment env, params ColumnBase[] columns) _columns = columns.ToArray(); } - public NormalizingTransformer Fit(IDataView input) + public NormalizerTransformer Fit(IDataView input) { _host.CheckValue(input, nameof(input)); - return NormalizingTransformer.Train(_host, input, _columns); + return NormalizerTransformer.Train(_host, input, _columns); } public SchemaShape GetOutputSchema(SchemaShape inputSchema) @@ -237,7 +237,7 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) } } - public sealed partial class NormalizingTransformer : OneToOneTransformerBase + public sealed partial class NormalizerTransformer : OneToOneTransformerBase { public const string LoaderSignature = "Normalizer"; private static VersionInfo GetVersionInfo() @@ -248,24 +248,22 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(NormalizingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(NormalizerTransformer).Assembly.FullName); } - public sealed class ColumnInfo + private class ColumnInfo { public readonly string Input; public readonly string Output; - public readonly NormalizerModelParametersBase ModelParameters; - internal readonly ColumnType InputType; - internal readonly IColumnFunction ColumnFunction; + public readonly ColumnType InputType; + public readonly IColumnFunction ColumnFunction; - internal ColumnInfo(string input, string output, ColumnType inputType, IColumnFunction columnFunction) + public ColumnInfo(string input, string output, ColumnType inputType, IColumnFunction columnFunction) { Input = input; Output = output; InputType = inputType; ColumnFunction = columnFunction; - ModelParameters = columnFunction.GetNormalizerModelParams(); } internal static ColumnType LoadType(ModelLoadContext ctx) @@ -307,9 +305,9 @@ internal static void SaveType(ModelSaveContext ctx, ColumnType type) private sealed class ColumnFunctionAccessor : IReadOnlyList { - private readonly ImmutableArray _infos; + private readonly ColumnInfo[] _infos; - public ColumnFunctionAccessor(ImmutableArray infos) + public ColumnFunctionAccessor(ColumnInfo[] infos) { _infos = infos; } @@ -320,18 +318,21 @@ public ColumnFunctionAccessor(ImmutableArray infos) IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); } - /// An accessor of the column functions within . + /// An accessor of the column functions within . internal readonly IReadOnlyList ColumnFunctions; - public readonly ImmutableArray Columns; - private NormalizingTransformer(IHostEnvironment env, ColumnInfo[] columns) - : base(env.Register(nameof(NormalizingTransformer)), columns.Select(x => (x.Input, x.Output)).ToArray()) + private readonly ColumnInfo[] _columns; + + public (string input, string output)[] Columns => ColumnPairs; + + private NormalizerTransformer(IHostEnvironment env, ColumnInfo[] columns) + : base(env.Register(nameof(NormalizerTransformer)), columns.Select(x => (x.Input, x.Output)).ToArray()) { - Columns = ImmutableArray.Create(columns); - ColumnFunctions = new ColumnFunctionAccessor(Columns); + _columns = columns; + ColumnFunctions = new ColumnFunctionAccessor(_columns); } - public static NormalizingTransformer Train(IHostEnvironment env, IDataView data, NormalizingEstimator.ColumnBase[] columns) + public static NormalizerTransformer Train(IHostEnvironment env, IDataView data, NormalizingEstimator.ColumnBase[] columns) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(data, nameof(data)); @@ -403,11 +404,11 @@ public static NormalizingTransformer Train(IHostEnvironment env, IDataView data, result[i] = new ColumnInfo(columns[i].Input, columns[i].Output, srcTypes[i], func); } - return new NormalizingTransformer(env, result); + return new NormalizerTransformer(env, result); } } - private NormalizingTransformer(IHost host, ModelLoadContext ctx) + private NormalizerTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) { // *** Binary format *** @@ -415,25 +416,24 @@ private NormalizingTransformer(IHost host, ModelLoadContext ctx) // for each added column: // - source type // - separate model for column function - var cols = new ColumnInfo[ColumnPairs.Length]; - ColumnFunctions = new ColumnFunctionAccessor(Columns); + + _columns = new ColumnInfo[ColumnPairs.Length]; + ColumnFunctions = new ColumnFunctionAccessor(_columns); for (int iinfo = 0; iinfo < ColumnPairs.Length; iinfo++) { var dir = string.Format("Normalizer_{0:000}", iinfo); var typeSrc = ColumnInfo.LoadType(ctx); ctx.LoadModel(Host, out var function, dir, Host, typeSrc); - cols[iinfo] = new ColumnInfo(ColumnPairs[iinfo].input, ColumnPairs[iinfo].output, typeSrc, function); + _columns[iinfo] = new ColumnInfo(ColumnPairs[iinfo].input, ColumnPairs[iinfo].output, typeSrc, function); } - - Columns = ImmutableArray.Create(cols); } - public static NormalizingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + public static NormalizerTransformer Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new NormalizingTransformer(env.Register(nameof(NormalizingTransformer)), ctx); + return new NormalizerTransformer(env.Register(nameof(NormalizerTransformer)), ctx); } // Factory method for SignatureLoadRowMapper. @@ -454,11 +454,11 @@ public override void Save(ModelSaveContext ctx) base.SaveColumns(ctx); // Individual normalization models. - for (int iinfo = 0; iinfo < Columns.Length; iinfo++) + for (int iinfo = 0; iinfo < _columns.Length; iinfo++) { - ColumnInfo.SaveType(ctx, Columns[iinfo].InputType); + ColumnInfo.SaveType(ctx, _columns[iinfo].InputType); var dir = string.Format("Normalizer_{0:000}", iinfo); - ctx.SaveSubModel(dir, Columns[iinfo].ColumnFunction.Save); + ctx.SaveSubModel(dir, _columns[iinfo].ColumnFunction.Save); } } @@ -479,30 +479,30 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : OneToOneMapperBase, ISaveAsOnnx, ISaveAsPfa + private sealed class Mapper : MapperBase, ISaveAsOnnx, ISaveAsPfa { - private NormalizingTransformer _parent; + private NormalizerTransformer _parent; public bool CanSaveOnnx(OnnxContext ctx) => true; public bool CanSavePfa => true; - public Mapper(NormalizingTransformer parent, Schema schema) + public Mapper(NormalizerTransformer parent, Schema schema) : base(parent.Host.Register(nameof(Mapper)), parent, schema) { _parent = parent; } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { - var result = new Schema.Column[_parent.Columns.Length]; + var result = new Schema.Column[_parent._columns.Length]; for (int i = 0; i < _parent.Columns.Length; i++) - result[i] = new Schema.Column(_parent.Columns[i].Output, _parent.Columns[i].InputType, MakeMetadata(i)); + result[i] = new Schema.Column(_parent._columns[i].Output, _parent._columns[i].InputType, MakeMetadata(i)); return result; } private Schema.Metadata MakeMetadata(int iinfo) { - var colInfo = _parent.Columns[iinfo]; + var colInfo = _parent._columns[iinfo]; var builder = new Schema.Metadata.Builder(); builder.Add(new Schema.Column(MetadataUtils.Kinds.IsNormalized, BoolType.Instance, null), (ValueGetter)IsNormalizedGetter); @@ -515,19 +515,19 @@ private void IsNormalizedGetter(ref bool dst) dst = true; } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { disposer = null; - return _parent.Columns[iinfo].ColumnFunction.GetGetter(input, ColMapNewToOld[iinfo]); + return _parent._columns[iinfo].ColumnFunction.GetGetter(input, ColMapNewToOld[iinfo]); } public void SaveAsOnnx(OnnxContext ctx) { Host.CheckValue(ctx, nameof(ctx)); - for (int iinfo = 0; iinfo < _parent.Columns.Length; ++iinfo) + for (int iinfo = 0; iinfo < _parent._columns.Length; ++iinfo) { - var info = _parent.Columns[iinfo]; + var info = _parent._columns[iinfo]; string sourceColumnName = info.Input; if (!ctx.ContainsColumn(sourceColumnName)) { @@ -550,9 +550,9 @@ public void SaveAsPfa(BoundPfaContext ctx) var toHide = new List(); var toDeclare = new List>(); - for (int iinfo = 0; iinfo < _parent.Columns.Length; ++iinfo) + for (int iinfo = 0; iinfo < _parent._columns.Length; ++iinfo) { - var info = _parent.Columns[iinfo]; + var info = _parent._columns[iinfo]; var srcName = info.Input; string srcToken = ctx.TokenOrNullForName(srcName); if (srcToken == null) @@ -575,8 +575,8 @@ public void SaveAsPfa(BoundPfaContext ctx) private JToken SaveAsPfaCore(BoundPfaContext ctx, int iinfo, ColumnInfo info, JToken srcToken) { Contracts.AssertValue(ctx); - Contracts.Assert(0 <= iinfo && iinfo < _parent.Columns.Length); - Contracts.Assert(_parent.Columns[iinfo] == info); + Contracts.Assert(0 <= iinfo && iinfo < _parent._columns.Length); + Contracts.Assert(_parent._columns[iinfo] == info); Contracts.AssertValue(srcToken); Contracts.Assert(CanSavePfa); return info.ColumnFunction.PfaInfo(ctx, srcToken); @@ -585,8 +585,8 @@ private JToken SaveAsPfaCore(BoundPfaContext ctx, int iinfo, ColumnInfo info, JT private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColumnInfo info, string srcVariableName, string dstVariableName) { Contracts.AssertValue(ctx); - Contracts.Assert(0 <= iinfo && iinfo < _parent.Columns.Length); - Contracts.Assert(_parent.Columns[iinfo] == info); + Contracts.Assert(0 <= iinfo && iinfo < _parent._columns.Length); + Contracts.Assert(_parent._columns[iinfo] == info); Contracts.Assert(CanSaveOnnx(ctx)); if (info.InputType.ValueCount == 0) @@ -605,123 +605,61 @@ private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColumnInfo info, string } /// - /// Base class for all the NormalizerData classes: , - /// , . - /// - public abstract class NormalizerModelParametersBase - { - private protected NormalizerModelParametersBase() { } - } - - /// - /// The model parameters generated by affine normalization transformations. + /// An interface implemented by items of corresponding to the + /// items. /// - /// - /// - /// - /// - /// - public sealed class AffineNormalizerModelParameters : NormalizerModelParametersBase + internal interface IAffineData { /// /// The scales. In the scalar case, this is a single value. In the vector case this is of length equal /// to the number of slots. Function is (input - offset) * scale. /// - public TData Scale { get; } + TData Scale { get; } /// /// The offsets. In the scalar case, this is a single value. In the vector case this is of length equal /// to the number of slots, or of length zero if all the offsets are zero. /// - public TData Offset { get; } - - /// - /// Initializes a new instance of - /// - internal AffineNormalizerModelParameters(TData scale, TData offset) - { - Scale = scale; - Offset = offset; - } + TData Offset { get; } } /// - /// The model parameters generated by cumulative distribution normalization transformations. - /// The cumulative density function is parameterized by and - /// the as observed during fitting. + /// An interface implemented by items of corresponding to the + /// items. The function is the value of the + /// cumulative density function of the normal distribution parameterized with mean + /// and standard deviation . /// - /// - /// - /// - /// - /// - public sealed class CdfNormalizerModelParameters : NormalizerModelParametersBase + internal interface ICdfData { /// /// The mean(s). In the scalar case, this is a single value. In the vector case this is of length equal /// to the number of slots. /// - public TData Mean { get; } + TData Mean { get; } /// /// The standard deviation(s). In the scalar case, this is a single value. In the vector case this is of /// length equal to the number of slots. /// - public TData Stddev { get; } + TData Stddev { get; } /// /// Whether the we ought to apply a logarithm to the input first. /// - public bool UseLog { get; } - - /// - /// Initializes a new instance of - /// - internal CdfNormalizerModelParameters(TData mean, TData stddev, bool useLog) - { - Mean = mean; - Stddev = stddev; - UseLog = useLog; - } + bool UseLog { get; } } /// - /// The model parameters generated by buckettizing the data into bins with monotonically - /// increasing . - /// The value is constant from bin to bin, for most cases. - /// /// - public sealed class BinNormalizerModelParameters : NormalizerModelParametersBase + /// An interface implemented by items of corresponding to the + /// items. + /// + internal interface IBinData { /// /// The standard deviation(s). In the scalar case, these are the bin upper bounds for that single value. /// In the vector case it is a jagged array of the bin upper bounds for all slots. /// - public ImmutableArray UpperBounds { get; } - - /// - /// The frequency of the datapoints per each bin. - /// - public TData Density { get; } - - /// - /// If normalization is performed with set to true, - /// the offset indicates the displacement of zero, if any. - /// - public TData Offset { get; } - - /// - /// Initializes a new instance of - /// - internal BinNormalizerModelParameters(ImmutableArray upperBounds, TData density, TData offset) - { - UpperBounds = upperBounds; - Density = density; - Offset = offset; - } + ImmutableArray UpperBounds { get; } } } } \ No newline at end of file diff --git a/src/Microsoft.ML.Data/Transforms/NormalizerCatalog.cs b/src/Microsoft.ML.Data/Transforms/NormalizerCatalog.cs index df9c435def..f02c9136c4 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizerCatalog.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizerCatalog.cs @@ -23,7 +23,14 @@ public static class NormalizerCatalog /// /// /// + /// + /// + /// + /// + /// /// /// @@ -42,7 +49,14 @@ public static NormalizingEstimator Normalize(this TransformsCatalog catalog, /// /// /// + /// + /// + /// + /// + /// /// /// diff --git a/src/Microsoft.ML.Data/Transforms/NormalizerStaticExtensions.cs b/src/Microsoft.ML.Data/Transforms/NormalizerStaticExtensions.cs index 1493ba78f3..67b42c8c40 100644 --- a/src/Microsoft.ML.Data/Transforms/NormalizerStaticExtensions.cs +++ b/src/Microsoft.ML.Data/Transforms/NormalizerStaticExtensions.cs @@ -3,16 +3,15 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Core.Data; -using Microsoft.ML.Runtime; -using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Internal.Utilities; +using Microsoft.ML.StaticPipe; using Microsoft.ML.StaticPipe.Runtime; using Microsoft.ML.Transforms.Normalizers; using System; using System.Collections.Generic; using System.Collections.Immutable; -namespace Microsoft.ML.StaticPipe +namespace Microsoft.ML.Runtime.Data { /// /// Extension methods for static pipelines for normalization of data. @@ -311,7 +310,7 @@ private static Action AffineMapper(OnFitAffine on return null; return col => { - var aCol = (NormalizingTransformer.AffineNormalizerModelParameters)col?.GetNormalizerModelParams(); + var aCol = (NormalizerTransformer.IAffineData)col; onFit(aCol.Scale, aCol.Offset); }; } @@ -323,7 +322,7 @@ private static Action CdfMapper(OnFitCumulativeDistribut return null; return col => { - var aCol = (NormalizingTransformer.CdfNormalizerModelParameters)col?.GetNormalizerModelParams(); + var aCol = (NormalizerTransformer.ICdfData)col; onFit(aCol.Mean, aCol.Stddev); }; } @@ -335,7 +334,7 @@ private static Action BinMapper(OnFitBinned onFit return null; return col => { - var aCol = (NormalizingTransformer.BinNormalizerModelParameters)col?.GetNormalizerModelParams(); + var aCol = (NormalizerTransformer.IBinData)col; onFit(aCol.UpperBounds); }; } diff --git a/src/Microsoft.ML.Data/Transforms/OneToOneTransformerBase.cs b/src/Microsoft.ML.Data/Transforms/OneToOneTransformerBase.cs index 8c7dc59095..d33b5d6b6c 100644 --- a/src/Microsoft.ML.Data/Transforms/OneToOneTransformerBase.cs +++ b/src/Microsoft.ML.Data/Transforms/OneToOneTransformerBase.cs @@ -2,23 +2,24 @@ // 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.Model; using System; using System.Collections.Generic; using System.Linq; +using Microsoft.ML.Core.Data; +using Microsoft.ML.Runtime.Model; namespace Microsoft.ML.Runtime.Data { - /// - /// Base class for transformer which operates on pairs input and output columns. - /// - public abstract class OneToOneTransformerBase : RowToRowTransformerBase + public abstract class OneToOneTransformerBase : ITransformer, ICanSaveModel { + protected readonly IHost Host; protected readonly (string input, string output)[] ColumnPairs; - protected OneToOneTransformerBase(IHost host, (string input, string output)[] columns) : base(host) + protected OneToOneTransformerBase(IHost host, (string input, string output)[] columns) { + Contracts.AssertValue(host); host.CheckValue(columns, nameof(columns)); + var newNames = new HashSet(); foreach (var column in columns) { @@ -29,11 +30,13 @@ protected OneToOneTransformerBase(IHost host, (string input, string output)[] co throw Contracts.ExceptParam(nameof(columns), $"Output column '{column.output}' specified multiple times"); } + Host = host; ColumnPairs = columns; } - protected OneToOneTransformerBase(IHost host, ModelLoadContext ctx) : base(host) + protected OneToOneTransformerBase(IHost host, ModelLoadContext ctx) { + Host = host; // *** Binary format *** // int: number of added columns // for each added column @@ -50,6 +53,8 @@ protected OneToOneTransformerBase(IHost host, ModelLoadContext ctx) : base(host) } } + public abstract void Save(ModelSaveContext ctx); + protected void SaveColumns(ModelSaveContext ctx) { Host.CheckValue(ctx, nameof(ctx)); @@ -83,14 +88,46 @@ protected virtual void CheckInputColumn(ISchema inputSchema, int col, int srcCol // By default, there are no extra checks. } - protected abstract class OneToOneMapperBase : MapperBase + public bool IsRowToRowMapper => true; + + public IRowToRowMapper GetRowToRowMapper(Schema inputSchema) + { + Host.CheckValue(inputSchema, nameof(inputSchema)); + var simplerMapper = MakeRowMapper(inputSchema); + return new RowToRowMapperTransform(Host, new EmptyDataView(Host, inputSchema), simplerMapper, MakeRowMapper); + } + + protected abstract IRowMapper MakeRowMapper(Schema schema); + + public Schema GetOutputSchema(Schema inputSchema) + { + Host.CheckValue(inputSchema, nameof(inputSchema)); + var mapper = MakeRowMapper(inputSchema); + return RowToRowMapperTransform.GetOutputSchema(inputSchema, mapper); + } + + public IDataView Transform(IDataView input) => MakeDataTransform(input); + + protected RowToRowMapperTransform MakeDataTransform(IDataView input) + { + Host.CheckValue(input, nameof(input)); + return new RowToRowMapperTransform(Host, input, MakeRowMapper(input.Schema), MakeRowMapper); + } + + protected abstract class MapperBase : IRowMapper { + protected readonly IHost Host; protected readonly Dictionary ColMapNewToOld; + protected readonly Schema InputSchema; private readonly OneToOneTransformerBase _parent; - protected OneToOneMapperBase(IHost host, OneToOneTransformerBase parent, Schema inputSchema) : base(host, inputSchema) + protected MapperBase(IHost host, OneToOneTransformerBase parent, Schema inputSchema) { + Contracts.AssertValue(host); Contracts.AssertValue(parent); + Contracts.AssertValue(inputSchema); + + Host = host; _parent = parent; ColMapNewToOld = new Dictionary(); @@ -99,9 +136,9 @@ protected OneToOneMapperBase(IHost host, OneToOneTransformerBase parent, Schema _parent.CheckInput(inputSchema, i, out int srcCol); ColMapNewToOld.Add(i, srcCol); } + InputSchema = inputSchema; } - - public override Func GetDependencies(Func activeOutput) + public Func GetDependencies(Func activeOutput) { var active = new bool[InputSchema.ColumnCount]; foreach (var pair in ColMapNewToOld) @@ -110,7 +147,41 @@ public override Func GetDependencies(Func activeOutput) return col => active[col]; } - public override void Save(ModelSaveContext ctx) => _parent.Save(ctx); + public abstract Schema.Column[] GetOutputColumns(); + + public void Save(ModelSaveContext ctx) => _parent.Save(ctx); + + public Delegate[] CreateGetters(IRow input, Func activeOutput, out Action disposer) + { + // REVIEW: it used to be that the mapper's input schema in the constructor was required to be reference-equal to the schema + // of the input row. + // It still has to be the same schema, but because we may make a transition from lazy to eager schema, the reference-equality + // is no longer always possible. So, we relax the assert as below. + if (input.Schema is Schema s) + Contracts.Assert(s == InputSchema); + var result = new Delegate[_parent.ColumnPairs.Length]; + var disposers = new Action[_parent.ColumnPairs.Length]; + for (int i = 0; i < _parent.ColumnPairs.Length; i++) + { + if (!activeOutput(i)) + continue; + int srcCol = ColMapNewToOld[i]; + result[i] = MakeGetter(input, i, out disposers[i]); + } + if (disposers.Any(x => x != null)) + { + disposer = () => + { + foreach (var act in disposers) + act(); + }; + } + else + disposer = null; + return result; + } + + protected abstract Delegate MakeGetter(IRow input, int iinfo, out Action disposer); } } } diff --git a/src/Microsoft.ML.Data/Transforms/PerGroupTransformBase.cs b/src/Microsoft.ML.Data/Transforms/PerGroupTransformBase.cs index 1276ab8e22..5d870f898a 100644 --- a/src/Microsoft.ML.Data/Transforms/PerGroupTransformBase.cs +++ b/src/Microsoft.ML.Data/Transforms/PerGroupTransformBase.cs @@ -144,9 +144,9 @@ public virtual void Save(ModelSaveContext ctx) protected abstract BindingsBase GetBindings(); - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { - return Source.GetRowCount(); + return Source.GetRowCount(lazy); } public IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolidator, Func predicate, int n, IRandom rand = null) diff --git a/src/Microsoft.ML.Data/Transforms/RangeFilter.cs b/src/Microsoft.ML.Data/Transforms/RangeFilter.cs index 59542b13aa..66cd67b06b 100644 --- a/src/Microsoft.ML.Data/Transforms/RangeFilter.cs +++ b/src/Microsoft.ML.Data/Transforms/RangeFilter.cs @@ -78,16 +78,15 @@ private static VersionInfo GetVersionInfo() private readonly bool _includeMax; /// - /// Initializes a new instance of . + /// Convenience constructor for public facing API. /// /// Host Environment. /// Input . This is the output from previous transform or loader. /// Name of the input column. - /// Minimum value (0 to 1 for key types). - /// Maximum value (0 to 1 for key types). - /// Whether to include the upper bound. - public RangeFilter(IHostEnvironment env, IDataView input, string column, Double lowerBound, Double upperBound, bool includeUpperBound) - : this(env, new Arguments() { Column = column, Min = lowerBound, Max = upperBound, IncludeMax = includeUpperBound }, input) + /// Minimum value (0 to 1 for key types). + /// Maximum value (0 to 1 for key types). + public RangeFilter(IHostEnvironment env, IDataView input, string column, Double? minimum = null, Double? maximum = null) + : this(env, new Arguments() { Column = column, Min = minimum, Max = maximum }, input) { } diff --git a/src/Microsoft.ML.Data/Transforms/RowToRowTransformerBase.cs b/src/Microsoft.ML.Data/Transforms/RowToRowTransformerBase.cs deleted file mode 100644 index 31005ea5bd..0000000000 --- a/src/Microsoft.ML.Data/Transforms/RowToRowTransformerBase.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Core.Data; -using Microsoft.ML.Runtime.Model; -using System; -using System.Linq; - -namespace Microsoft.ML.Runtime.Data -{ - /// - /// Base class for transformer which produce new columns, but doesn't affect existing ones. - /// - public abstract class RowToRowTransformerBase : ITransformer, ICanSaveModel - { - protected readonly IHost Host; - - protected RowToRowTransformerBase(IHost host) - { - Contracts.AssertValue(host); - Host = host; - } - - public abstract void Save(ModelSaveContext ctx); - - public bool IsRowToRowMapper => true; - - public IRowToRowMapper GetRowToRowMapper(Schema inputSchema) - { - Host.CheckValue(inputSchema, nameof(inputSchema)); - return new RowToRowMapperTransform(Host, new EmptyDataView(Host, inputSchema), MakeRowMapper(inputSchema), MakeRowMapper); - } - - protected abstract IRowMapper MakeRowMapper(Schema schema); - - public Schema GetOutputSchema(Schema inputSchema) - { - Host.CheckValue(inputSchema, nameof(inputSchema)); - var mapper = MakeRowMapper(inputSchema); - return RowToRowMapperTransform.GetOutputSchema(inputSchema, mapper); - } - - public IDataView Transform(IDataView input) => MakeDataTransform(input); - - protected RowToRowMapperTransform MakeDataTransform(IDataView input) - { - Host.CheckValue(input, nameof(input)); - return new RowToRowMapperTransform(Host, input, MakeRowMapper(input.Schema), MakeRowMapper); - } - - protected abstract class MapperBase : IRowMapper - { - protected readonly IHost Host; - protected readonly Schema InputSchema; - private Schema.Column[] _outputColumns; - - protected MapperBase(IHost host, Schema inputSchema) - { - Contracts.CheckValue(host, nameof(host)); - Contracts.CheckValue(inputSchema, nameof(inputSchema)); - Host = host; - InputSchema = inputSchema; - _outputColumns = null; - } - - protected abstract Schema.Column[] GetOutputColumnsCore(); - - public Schema.Column[] GetOutputColumns() - { - if (_outputColumns == null) - _outputColumns = GetOutputColumnsCore(); - return _outputColumns; - } - - public Delegate[] CreateGetters(IRow input, Func activeOutput, out Action disposer) - { - // make sure _outputColumns populated. - GetOutputColumns(); - // REVIEW: it used to be that the mapper's input schema in the constructor was required to be reference-equal to the schema - // of the input row. - // It still has to be the same schema, but because we may make a transition from lazy to eager schema, the reference-equality - // is no longer always possible. So, we relax the assert as below. - if (input.Schema is Schema s) - Contracts.Assert(s == InputSchema); - var result = new Delegate[_outputColumns.Length]; - var disposers = new Action[_outputColumns.Length]; - for (int i = 0; i < _outputColumns.Length; i++) - { - if (!activeOutput(i)) - continue; - result[i] = MakeGetter(input, i, activeOutput, out disposers[i]); - } - if (disposers.Any(x => x != null)) - { - disposer = () => - { - foreach (var act in disposers) - act(); - }; - } - else - disposer = null; - return result; - } - - protected abstract Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer); - - public abstract Func GetDependencies(Func activeOutput); - - public abstract void Save(ModelSaveContext ctx); - } - } -} diff --git a/src/Microsoft.ML.Data/Transforms/ColumnSelecting.cs b/src/Microsoft.ML.Data/Transforms/SelectColumnsTransform.cs similarity index 85% rename from src/Microsoft.ML.Data/Transforms/ColumnSelecting.cs rename to src/Microsoft.ML.Data/Transforms/SelectColumnsTransform.cs index 35370aa611..ceec14882f 100644 --- a/src/Microsoft.ML.Data/Transforms/ColumnSelecting.cs +++ b/src/Microsoft.ML.Data/Transforms/SelectColumnsTransform.cs @@ -14,30 +14,30 @@ using System.Collections.Generic; using System.Linq; -[assembly: LoadableClass(ColumnSelectingTransformer.Summary, typeof(IDataTransform), typeof(ColumnSelectingTransformer), - typeof(ColumnSelectingTransformer.Arguments), typeof(SignatureDataTransform), - ColumnSelectingTransformer.UserName, "SelectColumns", "SelectColumnsTransform", ColumnSelectingTransformer.ShortName, DocName = "transform/SelectTransforms.md")] +[assembly: LoadableClass(SelectColumnsTransform.Summary, typeof(IDataTransform), typeof(SelectColumnsTransform), + typeof(SelectColumnsTransform.Arguments), typeof(SignatureDataTransform), + SelectColumnsTransform.UserName, "SelectColumns", "SelectColumnsTransform", SelectColumnsTransform.ShortName, DocName = "transform/SelectTransforms.md")] -[assembly: LoadableClass(ColumnSelectingTransformer.Summary, typeof(IDataView), typeof(ColumnSelectingTransformer), null, typeof(SignatureLoadDataTransform), - ColumnSelectingTransformer.UserName, ColumnSelectingTransformer.LoaderSignature)] +[assembly: LoadableClass(SelectColumnsTransform.Summary, typeof(IDataView), typeof(SelectColumnsTransform), null, typeof(SignatureLoadDataTransform), + SelectColumnsTransform.UserName, SelectColumnsTransform.LoaderSignature)] -[assembly: LoadableClass(ColumnSelectingTransformer.Summary, typeof(ColumnSelectingTransformer), null, typeof(SignatureLoadModel), - ColumnSelectingTransformer.UserName, ColumnSelectingTransformer.LoaderSignature)] +[assembly: LoadableClass(SelectColumnsTransform.Summary, typeof(SelectColumnsTransform), null, typeof(SignatureLoadModel), + SelectColumnsTransform.UserName, SelectColumnsTransform.LoaderSignature)] // Back-compat to handle loading of the Drop and Keep Transformer -[assembly: LoadableClass("", typeof(IDataView), typeof(ColumnSelectingTransformer), null, typeof(SignatureLoadDataTransform), - "", ColumnSelectingTransformer.DropLoaderSignature)] +[assembly: LoadableClass("", typeof(IDataView), typeof(SelectColumnsTransform), null, typeof(SignatureLoadDataTransform), + "", SelectColumnsTransform.DropLoaderSignature)] // Back-compat to handle loading of the Choose Columns Transformer -[assembly: LoadableClass("", typeof(IDataView), typeof(ColumnSelectingTransformer), null, typeof(SignatureLoadDataTransform), - "", ColumnSelectingTransformer.ChooseLoaderSignature, ColumnSelectingTransformer.ChooseLoaderSignatureOld)] +[assembly: LoadableClass("", typeof(IDataView), typeof(SelectColumnsTransform), null, typeof(SignatureLoadDataTransform), + "", SelectColumnsTransform.ChooseLoaderSignature, SelectColumnsTransform.ChooseLoaderSignatureOld)] namespace Microsoft.ML.Transforms { /// /// The ColumnSelectingEstimator supports selection of specified columns to keep from a given input. /// - public sealed class ColumnSelectingEstimator : TrivialEstimator + public sealed class ColumnSelectingEstimator : TrivialEstimator { private readonly Func _selectPredicate; @@ -46,8 +46,8 @@ public sealed class ColumnSelectingEstimator : TrivialEstimator /// Instance of the host environment. /// The array of column names to keep. - private ColumnSelectingEstimator(IHostEnvironment env, params string[] keepColumns) - : this(env, keepColumns, null, ColumnSelectingTransformer.Defaults.KeepHidden, ColumnSelectingTransformer.Defaults.IgnoreMissing) + public ColumnSelectingEstimator(IHostEnvironment env, params string[] keepColumns) + : this(env, keepColumns, null, SelectColumnsTransform.Defaults.KeepHidden, SelectColumnsTransform.Defaults.IgnoreMissing) { } /// @@ -56,16 +56,15 @@ private ColumnSelectingEstimator(IHostEnvironment env, params string[] keepColum /// Instance of the host environment. /// The array of column names to keep, cannot be set with . /// The array of column names to drop, cannot be set with . - /// If true will keep hidden columns and false will remove hidden columns. The argument is - /// ignored if the Estimator is in "drop mode". + /// If true will keep hidden columns and false will remove hidden columns. /// If false will check for any columns given in /// or that are missing from the input. If a missing colums exists a /// SchemaMistmatch exception is thrown. If true, the check is not made. - internal ColumnSelectingEstimator(IHostEnvironment env, string[] keepColumns, - string[] dropColumns, bool keepHidden = ColumnSelectingTransformer.Defaults.KeepHidden, - bool ignoreMissing = ColumnSelectingTransformer.Defaults.IgnoreMissing) + public ColumnSelectingEstimator(IHostEnvironment env, string[] keepColumns, + string[] dropColumns, bool keepHidden = SelectColumnsTransform.Defaults.KeepHidden, + bool ignoreMissing = SelectColumnsTransform.Defaults.IgnoreMissing) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ColumnSelectingEstimator)), - new ColumnSelectingTransformer(env, keepColumns, dropColumns, keepHidden, ignoreMissing)) + new SelectColumnsTransform(env, keepColumns, dropColumns, keepHidden, ignoreMissing)) { _selectPredicate = (name) => (keepColumns != null) ? keepColumns.Contains(name) : !dropColumns.Contains(name); @@ -97,7 +96,7 @@ public static ColumnSelectingEstimator DropColumns(IHostEnvironment env, params public override SchemaShape GetOutputSchema(SchemaShape inputSchema) { Host.CheckValue(inputSchema, nameof(inputSchema)); - if (!Transformer.IgnoreMissing && !ColumnSelectingTransformer.IsSchemaValid(inputSchema.Columns.Select(x => x.Name), + if (!Transformer.IgnoreMissing && !SelectColumnsTransform.IsSchemaValid(inputSchema.Columns.Select(x => x.Name), Transformer.SelectColumns, out IEnumerable invalidColumns)) { @@ -112,7 +111,7 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) /// /// The SelectColumns Transforms allows the user to specify columns to drop or keep from a given input. /// - public sealed class ColumnSelectingTransformer : ITransformer, ICanSaveModel + public sealed class SelectColumnsTransform : ITransformer, ICanSaveModel { internal const string Summary = "Selects which columns from the dataset to keep."; internal const string UserName = "Select Columns Transform"; @@ -150,7 +149,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(ColumnSelectingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(SelectColumnsTransform).Assembly.FullName); } private static VersionInfo GetDropVersionInfo() @@ -162,7 +161,7 @@ private static VersionInfo GetDropVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010002, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(ColumnSelectingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(SelectColumnsTransform).Assembly.FullName); } private static VersionInfo GetChooseVersionInfo() @@ -174,7 +173,7 @@ private static VersionInfo GetChooseVersionInfo() verWeCanReadBack: 0x00010001, loaderSignature: ChooseLoaderSignature, loaderSignatureAlt: ChooseLoaderSignatureOld, - loaderAssemblyName: typeof(ColumnSelectingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(SelectColumnsTransform).Assembly.FullName); } public sealed class Arguments : TransformInputBase @@ -192,10 +191,10 @@ public sealed class Arguments : TransformInputBase public bool IgnoreMissing = Defaults.IgnoreMissing; } - public ColumnSelectingTransformer(IHostEnvironment env, string[] keepColumns, string[] dropColumns, + public SelectColumnsTransform(IHostEnvironment env, string[] keepColumns, string[] dropColumns, bool keepHidden = Defaults.KeepHidden, bool ignoreMissing = Defaults.IgnoreMissing) { - _host = Contracts.CheckRef(env, nameof(env)).Register(nameof(ColumnSelectingTransformer)); + _host = Contracts.CheckRef(env, nameof(env)).Register(nameof(SelectColumnsTransform)); _host.CheckValueOrNull(keepColumns); _host.CheckValueOrNull(dropColumns); @@ -233,7 +232,7 @@ private static bool CheckModelVersion(ModelLoadContext ctx, VersionInfo versionI /// /// Back-compatibilty function that handles loading the DropColumns Transform. /// - private static ColumnSelectingTransformer LoadDropColumnsTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + private static SelectColumnsTransform LoadDropColumnsTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { // *** Binary format *** // int: sizeof(Float) @@ -265,7 +264,7 @@ private static ColumnSelectingTransformer LoadDropColumnsTransform(IHostEnvironm // Note for backward compatibility, Drop/Keep Columns always preserves // hidden columns - return new ColumnSelectingTransformer(env, keepColumns, dropColumns, true); + return new SelectColumnsTransform(env, keepColumns, dropColumns, true); } /// @@ -297,7 +296,7 @@ private static bool GetHiddenOption(IHostEnvironment env, HiddenColumnOption opt /// /// Backwards compatibility helper function that loads a Choose Column Transform. /// - private static ColumnSelectingTransformer LoadChooseColumnsTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + private static SelectColumnsTransform LoadChooseColumnsTransform(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { // *** Binary format *** // int: sizeof(Float) @@ -335,11 +334,11 @@ private static ColumnSelectingTransformer LoadChooseColumnsTransform(IHostEnviro env.Check(colKeepHidden == keepHidden, differentHideColumnNotSupportedMsg); } - return new ColumnSelectingTransformer(env, names.ToArray(), null, keepHidden); + return new SelectColumnsTransform(env, names.ToArray(), null, keepHidden); } // Factory method for SignatureLoadModelTransform. - private static ColumnSelectingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + private static SelectColumnsTransform Create(IHostEnvironment env, ModelLoadContext ctx) { ctx.CheckAtModel(GetVersionInfo()); // *** Binary format *** @@ -366,7 +365,7 @@ private static ColumnSelectingTransformer Create(IHostEnvironment env, ModelLoad else columnsToDrop = columns; - return new ColumnSelectingTransformer(env, columnsToKeep, columnsToDrop, keepHidden, ignoreMissing); + return new SelectColumnsTransform(env, columnsToKeep, columnsToDrop, keepHidden, ignoreMissing); } // Factory method for SignatureLoadDataTransform. @@ -374,7 +373,7 @@ public static IDataView Create(IHostEnvironment env, ModelLoadContext ctx, IData { Contracts.CheckValue(env, nameof(env)); env.CheckValue(ctx, nameof(ctx)); - ColumnSelectingTransformer transform; + SelectColumnsTransform transform; // Determine which version of the transform is being loaded. if (CheckModelVersion(ctx, GetDropVersionInfo())) @@ -393,15 +392,27 @@ public static IDataView Create(IHostEnvironment env, ModelLoadContext ctx, IData return transform.Transform(input); } - public static IDataTransform CreateKeep(IHostEnvironment env, IDataView input, string[] keepColumns, bool keepHidden = false) + public static IDataTransform CreateKeep(IHostEnvironment env, IDataView input, params string[] keepColumns) { - var transform = new ColumnSelectingTransformer(env, keepColumns, null, keepHidden); + var transform = new SelectColumnsTransform(env, keepColumns, null); + return new SelectColumnsDataTransform(env, transform, new Mapper(transform, input.Schema), input); + } + + public static IDataTransform CreateKeep(IHostEnvironment env, IDataView input, bool keepHidden, params string[] keepColumns) + { + var transform = new SelectColumnsTransform(env, keepColumns, null, keepHidden); return new SelectColumnsDataTransform(env, transform, new Mapper(transform, input.Schema), input); } public static IDataTransform CreateDrop(IHostEnvironment env, IDataView input, params string[] dropColumns) { - var transform = new ColumnSelectingTransformer(env, null, dropColumns); + var transform = new SelectColumnsTransform(env, null, dropColumns); + return new SelectColumnsDataTransform(env, transform, new Mapper(transform, input.Schema), input); + } + + public static IDataTransform CreateDrop(IHostEnvironment env, IDataView input, bool keepHidden, params string[] dropColumns) + { + var transform = new SelectColumnsTransform(env, null, dropColumns, keepHidden); return new SelectColumnsDataTransform(env, transform, new Mapper(transform, input.Schema), input); } @@ -410,7 +421,7 @@ private static IDataTransform Create(IHostEnvironment env, Arguments args, IData { Contracts.CheckValue(env, nameof(env)); env.CheckValue(args, nameof(args)); - var transform = new ColumnSelectingTransformer(env, args.KeepColumns, args.DropColumns, + var transform = new SelectColumnsTransform(env, args.KeepColumns, args.DropColumns, args.KeepHidden, args.IgnoreMissing); return new SelectColumnsDataTransform(env, transform, new Mapper(transform, input.Schema), input); } @@ -486,7 +497,7 @@ private sealed class Mapper public Schema Schema { get; } - public Mapper(ColumnSelectingTransformer transform, Schema inputSchema) + public Mapper(SelectColumnsTransform transform, Schema inputSchema) { _host = transform._host.Register(nameof(Mapper)); _inputSchema = inputSchema; @@ -556,15 +567,17 @@ private static int[] BuildOutputToInputMap(IEnumerable selectedColumns, // Handles the drop case, removing any columns specified from the input // In the case of drop, the order of the output is modeled after the input // given an input of ABC and dropping column B will result in AC. - // In drop mode, we drop all columns with the specified names and keep all the rest, - // ignoring the keepHidden argument. - for(int colIdx = 0; colIdx < inputSchema.ColumnCount; colIdx++) + for (int colIdx = 0; colIdx < inputSchema.ColumnCount; colIdx++) { + if (!keepHidden && inputSchema.IsHidden(colIdx)) + continue; + if (selectedColumns.Contains(inputSchema[colIdx].Name)) continue; outputToInputMapping.Add(colIdx); } + } return outputToInputMapping.ToArray(); @@ -609,10 +622,10 @@ public ValueGetter GetIdGetter() private sealed class SelectColumnsDataTransform : IDataTransform, IRowToRowMapper, ITransformTemplate { private readonly IHost _host; - private readonly ColumnSelectingTransformer _transform; + private readonly SelectColumnsTransform _transform; private readonly Mapper _mapper; - public SelectColumnsDataTransform(IHostEnvironment env, ColumnSelectingTransformer transform, Mapper mapper, IDataView input) + public SelectColumnsDataTransform(IHostEnvironment env, SelectColumnsTransform transform, Mapper mapper, IDataView input) { _host = Contracts.CheckRef(env, nameof(env)).Register(nameof(SelectColumnsDataTransform)); _transform = transform; @@ -628,7 +641,7 @@ public SelectColumnsDataTransform(IHostEnvironment env, ColumnSelectingTransform Schema ISchematized.Schema => _mapper.Schema; - public long? GetRowCount() => Source.GetRowCount(); + public long? GetRowCount(bool lazy = true) => Source.GetRowCount(lazy); public IRowCursor GetRowCursor(Func needCol, IRandom rand = null) { diff --git a/src/Microsoft.ML.Data/Transforms/RowShufflingTransformer.cs b/src/Microsoft.ML.Data/Transforms/ShuffleTransform.cs similarity index 96% rename from src/Microsoft.ML.Data/Transforms/RowShufflingTransformer.cs rename to src/Microsoft.ML.Data/Transforms/ShuffleTransform.cs index 909e289de4..e3ecc922cf 100644 --- a/src/Microsoft.ML.Data/Transforms/RowShufflingTransformer.cs +++ b/src/Microsoft.ML.Data/Transforms/ShuffleTransform.cs @@ -16,22 +16,22 @@ using System.Threading.Tasks; using System.Threading.Tasks.Dataflow; -[assembly: LoadableClass(RowShufflingTransformer.Summary, typeof(RowShufflingTransformer), typeof(RowShufflingTransformer.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(ShuffleTransform.Summary, typeof(ShuffleTransform), typeof(ShuffleTransform.Arguments), typeof(SignatureDataTransform), "Shuffle Transform", "ShuffleTransform", "Shuffle", "shuf")] -[assembly: LoadableClass(RowShufflingTransformer.Summary, typeof(RowShufflingTransformer), null, typeof(SignatureLoadDataTransform), - "Shuffle Transform", RowShufflingTransformer.LoaderSignature)] +[assembly: LoadableClass(ShuffleTransform.Summary, typeof(ShuffleTransform), null, typeof(SignatureLoadDataTransform), + "Shuffle Transform", ShuffleTransform.LoaderSignature)] namespace Microsoft.ML.Transforms { /// - /// This is a transformer that, given any input dataview (even an unshufflable one) will, + /// This is a transform that, given any input dataview (even an unshufflable one) will, /// when we construct a randomized cursor attempt to perform a rude version of shuffling /// using a pool. A pool of a given number of rows will be constructed from the first /// rows in the input cursor, and then, successively, the output cursor will yield one /// of these rows and replace it with another row from the input. /// - public sealed class RowShufflingTransformer : RowToRowTransformBase + public sealed class ShuffleTransform : RowToRowTransformBase { private static class Defaults { @@ -72,7 +72,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010002, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(RowShufflingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(ShuffleTransform).Assembly.FullName); } private const string RegistrationName = "Shuffle"; @@ -88,14 +88,14 @@ private static VersionInfo GetVersionInfo() private readonly IDataView _subsetInput; /// - /// Initializes a new instance of . + /// Convenience constructor for public facing API. /// /// Host Environment. /// Input . This is the output from previous transform or loader. /// The pool will have this many rows /// If true, the transform will not attempt to shuffle the input cursor but only shuffle based on the pool. This parameter has no effect if the input data was not itself shufflable. /// If true, the transform will always provide a shuffled view. - public RowShufflingTransformer(IHostEnvironment env, + public ShuffleTransform(IHostEnvironment env, IDataView input, int poolRows = Defaults.PoolRows, bool poolOnly = Defaults.PoolOnly, @@ -107,7 +107,7 @@ public RowShufflingTransformer(IHostEnvironment env, /// /// Public constructor corresponding to SignatureDataTransform. /// - public RowShufflingTransformer(IHostEnvironment env, Arguments args, IDataView input) + public ShuffleTransform(IHostEnvironment env, Arguments args, IDataView input) : base(env, RegistrationName, input) { Host.CheckValue(args, nameof(args)); @@ -126,7 +126,7 @@ public RowShufflingTransformer(IHostEnvironment env, Arguments args, IDataView i _subsetInput = SelectCachableColumns(input, env); } - private RowShufflingTransformer(IHost host, ModelLoadContext ctx, IDataView input) + private ShuffleTransform(IHost host, ModelLoadContext ctx, IDataView input) : base(host, input) { Host.AssertValue(ctx); @@ -149,14 +149,14 @@ private RowShufflingTransformer(IHost host, ModelLoadContext ctx, IDataView inpu _subsetInput = SelectCachableColumns(input, host); } - public static RowShufflingTransformer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + public static ShuffleTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { Contracts.CheckValue(env, nameof(env)); var h = env.Register(RegistrationName); h.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); h.CheckValue(input, nameof(input)); - return h.Apply("Loading Model", ch => new RowShufflingTransformer(h, ctx, input)); + return h.Apply("Loading Model", ch => new ShuffleTransform(h, ctx, input)); } public override void Save(ModelSaveContext ctx) diff --git a/src/Microsoft.ML.Data/Transforms/SkipTakeFilter.cs b/src/Microsoft.ML.Data/Transforms/SkipTakeFilter.cs index 353cf2ed47..69f184607d 100644 --- a/src/Microsoft.ML.Data/Transforms/SkipTakeFilter.cs +++ b/src/Microsoft.ML.Data/Transforms/SkipTakeFilter.cs @@ -169,11 +169,11 @@ public override void Save(ModelSaveContext ctx) /// Returns the computed count of rows remaining after skip and take operation. /// Returns null if count is unknown. /// - public override long? GetRowCount() + public override long? GetRowCount(bool lazy = true) { if (_take == 0) return 0; - long? count = Source.GetRowCount(); + long? count = Source.GetRowCount(lazy); if (count == null) return null; diff --git a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs b/src/Microsoft.ML.Data/Transforms/TermTransform.cs similarity index 93% rename from src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs rename to src/Microsoft.ML.Data/Transforms/TermTransform.cs index e57b12bac6..6c082d50df 100644 --- a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformer.cs +++ b/src/Microsoft.ML.Data/Transforms/TermTransform.cs @@ -20,18 +20,18 @@ using System.Text; using System.Threading; -[assembly: LoadableClass(ValueToKeyMappingTransformer.Summary, typeof(IDataTransform), typeof(ValueToKeyMappingTransformer), - typeof(ValueToKeyMappingTransformer.Arguments), typeof(SignatureDataTransform), - ValueToKeyMappingTransformer.UserName, "Term", "AutoLabel", "TermTransform", "AutoLabelTransform", DocName = "transform/TermTransform.md")] +[assembly: LoadableClass(TermTransform.Summary, typeof(IDataTransform), typeof(TermTransform), + typeof(TermTransform.Arguments), typeof(SignatureDataTransform), + TermTransform.UserName, "Term", "AutoLabel", "TermTransform", "AutoLabelTransform", DocName = "transform/TermTransform.md")] -[assembly: LoadableClass(ValueToKeyMappingTransformer.Summary, typeof(IDataTransform), typeof(ValueToKeyMappingTransformer), null, typeof(SignatureLoadDataTransform), - ValueToKeyMappingTransformer.UserName, ValueToKeyMappingTransformer.LoaderSignature)] +[assembly: LoadableClass(TermTransform.Summary, typeof(IDataTransform), typeof(TermTransform), null, typeof(SignatureLoadDataTransform), + TermTransform.UserName, TermTransform.LoaderSignature)] -[assembly: LoadableClass(ValueToKeyMappingTransformer.Summary, typeof(ValueToKeyMappingTransformer), null, typeof(SignatureLoadModel), - ValueToKeyMappingTransformer.UserName, ValueToKeyMappingTransformer.LoaderSignature)] +[assembly: LoadableClass(TermTransform.Summary, typeof(TermTransform), null, typeof(SignatureLoadModel), + TermTransform.UserName, TermTransform.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(ValueToKeyMappingTransformer), null, typeof(SignatureLoadRowMapper), - ValueToKeyMappingTransformer.UserName, ValueToKeyMappingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(TermTransform), null, typeof(SignatureLoadRowMapper), + TermTransform.UserName, TermTransform.LoaderSignature)] namespace Microsoft.ML.Transforms.Categorical { @@ -42,7 +42,7 @@ namespace Microsoft.ML.Transforms.Categorical // * The Key value is the one-based index of the item in the dictionary. // * Not found is assigned the value zero. /// - public sealed partial class ValueToKeyMappingTransformer : OneToOneTransformerBase + public sealed partial class TermTransform : OneToOneTransformerBase { public abstract class ColumnBase : OneToOneColumn { @@ -195,7 +195,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010003, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(ValueToKeyMappingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(TermTransform).Assembly.FullName); } private const uint VerNonTextTypesSupported = 0x00010003; @@ -227,7 +227,7 @@ private static VersionInfo GetTermManagerVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010001, loaderSignature: TermManagerLoaderSignature, - loaderAssemblyName: typeof(ValueToKeyMappingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(TermTransform).Assembly.FullName); } private readonly TermMap[] _unboundMaps; @@ -264,12 +264,12 @@ private ColInfo[] CreateInfos(ISchema inputSchema) return infos; } - public ValueToKeyMappingTransformer(IHostEnvironment env, IDataView input, + public TermTransform(IHostEnvironment env, IDataView input, params ColumnInfo[] columns) : this(env, input, columns, null, null, null) { } - internal ValueToKeyMappingTransformer(IHostEnvironment env, IDataView input, + internal TermTransform(IHostEnvironment env, IDataView input, ColumnInfo[] columns, string file = null, string termsColumn = null, IComponentFactory loaderFactory = null) @@ -324,11 +324,11 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV cols[i].Terms = item.Terms ?? args.Terms; }; } - return new ValueToKeyMappingTransformer(env, input, cols, args.DataFile, args.TermsColumn, args.Loader).MakeDataTransform(input); + return new TermTransform(env, input, cols, args.DataFile, args.TermsColumn, args.Loader).MakeDataTransform(input); } // Factory method for SignatureLoadModel. - private static ValueToKeyMappingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + private static TermTransform Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(RegistrationName); @@ -336,10 +336,10 @@ private static ValueToKeyMappingTransformer Create(IHostEnvironment env, ModelLo host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new ValueToKeyMappingTransformer(host, ctx); + return new TermTransform(host, ctx); } - private ValueToKeyMappingTransformer(IHost host, ModelLoadContext ctx) + private TermTransform(IHost host, ModelLoadContext ctx) : base(host, ctx) { var columnsLength = ColumnPairs.Length; @@ -391,7 +391,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); /// - /// Initializes a new instance of . + /// Convenience constructor for public facing API. /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -403,7 +403,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc public static IDataView Create(IHostEnvironment env, IDataView input, string name, string source = null, int maxNumTerms = ValueToKeyMappingEstimator.Defaults.MaxNumTerms, SortOrder sort = ValueToKeyMappingEstimator.Defaults.Sort) => - new ValueToKeyMappingTransformer(env, input, new[] { new ColumnInfo(source ?? name, name, maxNumTerms, sort) }).MakeDataTransform(input); + new TermTransform(env, input, new[] { new ColumnInfo(source ?? name, name, maxNumTerms, sort) }).MakeDataTransform(input); public static IDataTransform Create(IHostEnvironment env, ArgumentsBase args, ColumnBase[] column, IDataView input) { @@ -507,7 +507,7 @@ private static TermMap CreateFileTermMap(IHostEnvironment env, IChannel ch, stri { var header = new ProgressHeader(new[] { "Total Terms" }, new[] { "examples" }); var trainer = Trainer.Create(cursor, colSrc, autoConvert, int.MaxValue, bldr); - double rowCount = termData.GetRowCount() ?? double.NaN; + double rowCount = termData.GetRowCount(true) ?? double.NaN; long rowCur = 0; pch.SetHeader(header, e => @@ -606,7 +606,7 @@ private static TermMap[] Train(IHostEnvironment env, IChannel ch, ColInfo[] info using (var pch = env.StartProgressChannel("Building term dictionary")) { long rowCur = 0; - double rowCount = trainingData.GetRowCount() ?? double.NaN; + double rowCount = trainingData.GetRowCount(true) ?? double.NaN; var header = new ProgressHeader(new[] { "Total Terms" }, new[] { "examples" }); itrainer = 0; @@ -715,10 +715,10 @@ public TermMap GetTermMap(int iinfo) protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : OneToOneMapperBase, ISaveAsOnnx, ISaveAsPfa + private sealed class Mapper : MapperBase, ISaveAsOnnx, ISaveAsPfa { private readonly ColumnType[] _types; - private readonly ValueToKeyMappingTransformer _parent; + private readonly TermTransform _parent; private readonly ColInfo[] _infos; private readonly BoundTermMap[] _termMap; @@ -727,7 +727,7 @@ private sealed class Mapper : OneToOneMapperBase, ISaveAsOnnx, ISaveAsPfa public bool CanSavePfa => true; - public Mapper(ValueToKeyMappingTransformer parent, Schema inputSchema) + public Mapper(TermTransform parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -751,7 +751,7 @@ public Mapper(ValueToKeyMappingTransformer parent, Schema inputSchema) } } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -767,7 +767,7 @@ protected override Schema.Column[] GetOutputColumnsCore() return result; } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); diff --git a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformerImpl.cs b/src/Microsoft.ML.Data/Transforms/TermTransformImpl.cs similarity index 93% rename from src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformerImpl.cs rename to src/Microsoft.ML.Data/Transforms/TermTransformImpl.cs index 6aaf18c825..8ddc1f89ce 100644 --- a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingTransformerImpl.cs +++ b/src/Microsoft.ML.Data/Transforms/TermTransformImpl.cs @@ -13,7 +13,7 @@ namespace Microsoft.ML.Transforms.Categorical { - public sealed partial class ValueToKeyMappingTransformer + public sealed partial class TermTransform { /// /// These are objects shared by both the scalar and vector implementations of @@ -106,12 +106,12 @@ public TextImpl(bool sorted) _sorted = sorted; } - public override bool TryAdd(in ReadOnlyMemory val) + public override bool TryAdd(ref ReadOnlyMemory val) { if (val.IsEmpty) return false; int count = _pool.Count; - return _pool.Add(val).Id == count; + return ReadOnlyMemoryUtils.AddToPool(val, _pool).Id == count; } public override TermMap Finish() @@ -170,7 +170,7 @@ public Impl(PrimitiveType type, InPredicate mapsToMissing, bool sort) _sort = sort; } - public override bool TryAdd(in T val) + public override bool TryAdd(ref T val) { return !_mapsToMissing(in val) && _values.TryAdd(val); } @@ -195,7 +195,7 @@ protected Builder(PrimitiveType type) /// Ensures that the item is in the set. Returns true iff it added the item. /// /// The value to consider - public abstract bool TryAdd(in T val); + public abstract bool TryAdd(ref T val); /// /// Handling for the "terms" arg. @@ -215,7 +215,7 @@ public override void ParseAddTermArg(ref ReadOnlyMemory terms, IChannel ch ch.Warning("Empty strings ignored in 'terms' specification"); else if (!tryParse(in term, out val)) throw ch.Except($"Item '{term}' in 'terms' specification could not be parsed as '{ItemType}'"); - else if (!TryAdd(in val)) + else if (!TryAdd(ref val)) ch.Warning($"Duplicate item '{term}' ignored in 'terms' specification", term); } @@ -240,7 +240,7 @@ public override void ParseAddTermArg(string[] terms, IChannel ch) ch.Warning("Empty strings ignored in 'term' specification"); else if (!tryParse(in term, out val)) ch.Warning("Item '{0}' ignored in 'term' specification since it could not be parsed as '{1}'", term, ItemType); - else if (!TryAdd(in val)) + else if (!TryAdd(ref val)) ch.Warning("Duplicate item '{0}' ignored in 'term' specification", term); } @@ -361,7 +361,7 @@ public sealed override bool ProcessRow() if (_remaining <= 0) return false; _getter(ref _val); - return !_bldr.TryAdd(in _val) || --_remaining > 0; + return !_bldr.TryAdd(ref _val) || --_remaining > 0; } } @@ -381,10 +381,10 @@ public ImplVec(ValueGetter> getter, int max, Builder bldr) _bldr = bldr; } - private bool AccumAndDecrement(in T val) + private bool AccumAndDecrement(ref T val) { Contracts.Assert(_remaining > 0); - return !_bldr.TryAdd(in val) || --_remaining > 0; + return !_bldr.TryAdd(ref val) || --_remaining > 0; } public sealed override bool ProcessRow() @@ -393,12 +393,11 @@ public sealed override bool ProcessRow() if (_remaining <= 0) return false; _getter(ref _val); - var values = _val.GetValues(); if (_val.IsDense || _addedDefaultFromSparse) { - for (int i = 0; i < values.Length; ++i) + for (int i = 0; i < _val.Count; ++i) { - if (!AccumAndDecrement(in values[i])) + if (!AccumAndDecrement(ref _val.Values[i])) return false; } return true; @@ -413,22 +412,21 @@ public sealed override bool ProcessRow() // excited about the slight inefficiency of that first if check. Contracts.Assert(!_val.IsDense && !_addedDefaultFromSparse); T def = default(T); - var valIndices = _val.GetIndices(); - for (int i = 0; i < values.Length; ++i) + for (int i = 0; i < _val.Count; ++i) { - if (!_addedDefaultFromSparse && valIndices[i] != i) + if (!_addedDefaultFromSparse && _val.Indices[i] != i) { _addedDefaultFromSparse = true; - if (!AccumAndDecrement(in def)) + if (!AccumAndDecrement(ref def)) return false; } - if (!AccumAndDecrement(in values[i])) + if (!AccumAndDecrement(ref _val.Values[i])) return false; } if (!_addedDefaultFromSparse) { _addedDefaultFromSparse = true; - if (!AccumAndDecrement(in def)) + if (!AccumAndDecrement(ref def)) return false; } return true; @@ -467,7 +465,7 @@ private static BoundTermMap Bind(IHostEnvironment env, Schema schema, TermMap un /// type, and will produce either , or a vector type with that output /// type if the input was a vector. /// - /// Note that instances of this class can be shared among multiple + /// Note that instances of this class can be shared among multiple /// instances. To associate this with a particular transform, use the method. /// /// These are the immutable and serializable analogs to the used in @@ -570,9 +568,9 @@ private static TermMap LoadCodecCore(ModelLoadContext ctx, IExceptionContext return new HashArrayImpl(codec.Type.AsPrimitive, values); } - internal abstract void WriteTextTerms(TextWriter writer); + public abstract void WriteTextTerms(TextWriter writer); - internal sealed class TextImpl : TermMap> + public sealed class TextImpl : TermMap> { private readonly NormStr.Pool _pool; @@ -636,7 +634,7 @@ internal override void Save(ModelSaveContext ctx, IHostEnvironment host, CodecFa private void KeyMapper(in ReadOnlyMemory src, ref uint dst) { - var nstr = _pool.Get(src); + var nstr = ReadOnlyMemoryUtils.FindInPool(src, _pool); if (nstr == null) dst = 0; else @@ -650,20 +648,22 @@ public override ValueMapper, uint> GetKeyMapper() public override void GetTerms(ref VBuffer> dst) { - var editor = VBufferEditor.Create(ref dst, _pool.Count); + ReadOnlyMemory[] values = dst.Values; + if (Utils.Size(values) < _pool.Count) + values = new ReadOnlyMemory[_pool.Count]; int slot = 0; foreach (var nstr in _pool) { - Contracts.Assert(0 <= nstr.Id & nstr.Id < editor.Values.Length); + Contracts.Assert(0 <= nstr.Id & nstr.Id < values.Length); Contracts.Assert(nstr.Id == slot); - editor.Values[nstr.Id] = nstr.Value; + values[nstr.Id] = nstr.Value; slot++; } - dst = editor.Commit(); + dst = new VBuffer>(_pool.Count, values, dst.Indices); } - internal override void WriteTextTerms(TextWriter writer) + public override void WriteTextTerms(TextWriter writer) { writer.WriteLine("# Number of terms = {0}", Count); foreach (var nstr in _pool) @@ -671,7 +671,7 @@ internal override void WriteTextTerms(TextWriter writer) } } - internal sealed class HashArrayImpl : TermMap + public sealed class HashArrayImpl : TermMap where T : IEquatable, IComparable { // One of the two must exist. If we need one we can initialize it @@ -731,17 +731,19 @@ public override void GetTerms(ref VBuffer dst) { if (Count == 0) { - VBufferUtils.Resize(ref dst, 0); + dst = new VBuffer(0, dst.Values, dst.Indices); return; } - var editor = VBufferEditor.Create(ref dst, Count); + T[] values = dst.Values; + if (Utils.Size(values) < Count) + values = new T[Count]; Contracts.AssertValue(_values); Contracts.Assert(_values.Count == Count); - _values.CopyTo(editor.Values); - dst = editor.Commit(); + _values.CopyTo(values); + dst = new VBuffer(Count, values, dst.Indices); } - internal override void WriteTextTerms(TextWriter writer) + public override void WriteTextTerms(TextWriter writer) { writer.WriteLine("# Number of terms of type '{0}' = {1}", ItemType, Count); StringBuilder sb = null; @@ -780,19 +782,20 @@ private static void GetTextTerms(in VBuffer src, ValueMapper)); StringBuilder sb = null; + ReadOnlyMemory[] values = dst.Values; // We'd obviously have to adjust this a bit, if we ever had sparse metadata vectors. // The way the term map metadata getters are structured right now, this is impossible. Contracts.Assert(src.IsDense); - var editor = VBufferEditor.Create(ref dst, src.Length); - var srcValues = src.GetValues(); - for (int i = 0; i < srcValues.Length; ++i) + if (Utils.Size(values) < src.Length) + values = new ReadOnlyMemory[src.Length]; + for (int i = 0; i < src.Length; ++i) { - stringMapper(in srcValues[i], ref sb); - editor.Values[i] = sb.ToString().AsMemory(); + stringMapper(in src.Values[i], ref sb); + values[i] = sb.ToString().AsMemory(); } - dst = editor.Commit(); + dst = new VBuffer>(src.Length, values, dst.Indices); } /// @@ -951,21 +954,21 @@ public override Delegate GetMappingGetter(IRow input) { // REVIEW: Should the VBufferBuilder be changed so that it can // build vectors of length zero? - VBufferUtils.Resize(ref dst, cval); + dst = new VBuffer(cval, dst.Values, dst.Indices); return; } bldr.Reset(cval, dense: false); - var values = src.GetValues(); - var indices = src.GetIndices(); - int count = values.Length; + var values = src.Values; + var indices = !src.IsDense ? src.Indices : null; + int count = src.Count; for (int islot = 0; islot < count; islot++) { map(in values[islot], ref dstItem); if (dstItem != 0) { - int slot = !src.IsDense ? indices[islot] : islot; + int slot = indices != null ? indices[islot] : islot; bldr.AddFeature(slot, dstItem); } } @@ -986,7 +989,7 @@ public override Delegate GetMappingGetter(IRow input) { // REVIEW: Should the VBufferBuilder be changed so that it can // build vectors of length zero? - VBufferUtils.Resize(ref dst, cval); + dst = new VBuffer(cval, dst.Values, dst.Indices); return; } @@ -995,7 +998,7 @@ public override Delegate GetMappingGetter(IRow input) // unrecognized items. bldr.Reset(cval, dense: false); - var values = src.GetValues(); + var values = src.Values; if (src.IsDense) { for (int slot = 0; slot < src.Length; ++slot) @@ -1007,19 +1010,19 @@ public override Delegate GetMappingGetter(IRow input) } else { - var indices = src.GetIndices(); - int nextExplicitSlot = indices.Length == 0 ? src.Length : indices[0]; + var indices = src.Indices; + int nextExplicitSlot = src.Count == 0 ? src.Length : indices[0]; int islot = 0; for (int slot = 0; slot < src.Length; ++slot) { if (nextExplicitSlot == slot) { // This was an explicitly defined value. - _host.Assert(islot < values.Length); + _host.Assert(islot < src.Count); map(in values[islot], ref dstItem); if (dstItem != 0) bldr.AddFeature(slot, dstItem); - nextExplicitSlot = ++islot == indices.Length ? src.Length : indices[islot]; + nextExplicitSlot = ++islot == src.Count ? src.Length : indices[islot]; } else { @@ -1120,7 +1123,9 @@ private bool AddMetadataCore(ColumnType srcMetaType, Schema.Metadata.Buil VBuffer keyVals = default(VBuffer); TypedMap.GetTerms(ref keyVals); - var editor = VBufferEditor.Create(ref dst, TypedMap.OutputType.KeyCount); + TMeta[] values = dst.Values; + if (Utils.Size(values) < TypedMap.OutputType.KeyCount) + values = new TMeta[TypedMap.OutputType.KeyCount]; uint convKeyVal = 0; foreach (var pair in keyVals.Items(all: true)) { @@ -1128,9 +1133,9 @@ private bool AddMetadataCore(ColumnType srcMetaType, Schema.Metadata.Buil conv(in keyVal, ref convKeyVal); // The builder for the key values should not have any missings. _host.Assert(0 < convKeyVal && convKeyVal <= srcMeta.Length); - srcMeta.GetItemOrDefault((int)(convKeyVal - 1), ref editor.Values[pair.Key]); + srcMeta.GetItemOrDefault((int)(convKeyVal - 1), ref values[pair.Key]); } - dst = editor.Commit(); + dst = new VBuffer(TypedMap.OutputType.KeyCount, values, dst.Indices); }; if (IsTextMetadata && !srcMetaType.IsText) diff --git a/src/Microsoft.ML.Data/Transforms/TrainAndScoreTransformer.cs b/src/Microsoft.ML.Data/Transforms/TrainAndScoreTransform.cs similarity index 90% rename from src/Microsoft.ML.Data/Transforms/TrainAndScoreTransformer.cs rename to src/Microsoft.ML.Data/Transforms/TrainAndScoreTransform.cs index e8ec5f4e53..84cd605bd8 100644 --- a/src/Microsoft.ML.Data/Transforms/TrainAndScoreTransformer.cs +++ b/src/Microsoft.ML.Data/Transforms/TrainAndScoreTransform.cs @@ -9,18 +9,17 @@ using Microsoft.ML.Runtime.Internal.Calibration; using Microsoft.ML.Runtime.Model; using Microsoft.ML.Transforms; -using System; using System.Collections.Generic; -[assembly: LoadableClass(ScoringTransformer.Summary, typeof(IDataTransform), typeof(ScoringTransformer), typeof(ScoringTransformer.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(ScoreTransform.Summary, typeof(IDataTransform), typeof(ScoreTransform), typeof(ScoreTransform.Arguments), typeof(SignatureDataTransform), "Score Predictor", "Score")] -[assembly: LoadableClass(TrainAndScoreTransformer.Summary, typeof(IDataTransform), typeof(TrainAndScoreTransformer), - typeof(TrainAndScoreTransformer.Arguments), typeof(SignatureDataTransform), "Train and Score Predictor", "TrainScore")] +[assembly: LoadableClass(TrainAndScoreTransform.Summary, typeof(IDataTransform), typeof(TrainAndScoreTransform), + typeof(TrainAndScoreTransform.Arguments), typeof(SignatureDataTransform), "Train and Score Predictor", "TrainScore")] namespace Microsoft.ML.Transforms { - public static class ScoringTransformer + public static class ScoreTransform { public sealed class Arguments : TransformInputBase { @@ -49,8 +48,8 @@ public sealed class Arguments : TransformInputBase internal const string Summary = "Runs a previously trained predictor on the data."; /// - /// Convenience method for creating . - /// The allows for model stacking (i.e. to combine information from multiple predictive models to generate a new model) + /// Convenience method for creating . + /// The allows for model stacking (i.e. to combine information from multiple predictive models to generate a new model) /// in the pipeline by using the scores from an already trained model. /// /// Host Environment. @@ -99,11 +98,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV } } - // Essentially, all trainer estimators when fitted return a transformer that produces scores -- which is to say, all machine - // learning algorithms actually behave more or less as this transform used to, so its presence is no longer necessary or helpful, - // from an API perspective, but this is still how things are invoked from the command line for now. - [BestFriend] - internal static class TrainAndScoreTransformer + public static class TrainAndScoreTransform { public abstract class ArgumentsBase : TransformInputBase { @@ -161,11 +156,11 @@ public sealed class Arguments : ArgumentsBase internal const string Summary = "Trains a predictor, or loads it from a file, and runs it on the data."; /// - /// Convenience method for creating . - /// The allows for model stacking (i.e. to combine information from multiple predictive models to generate a new model) + /// Convenience method for creating . + /// The allows for model stacking (i.e. to combine information from multiple predictive models to generate a new model) /// in the pipeline by training a model first and then using the scores from the trained model. /// - /// Unlike , the trains the model on the fly as name indicates. + /// Unlike , the trains the model on the fly as name indicates. /// /// Host Environment. /// Input . diff --git a/src/Microsoft.ML.Data/Transforms/TransformBase.cs b/src/Microsoft.ML.Data/Transforms/TransformBase.cs index 102dfa6998..ca74ec9838 100644 --- a/src/Microsoft.ML.Data/Transforms/TransformBase.cs +++ b/src/Microsoft.ML.Data/Transforms/TransformBase.cs @@ -44,7 +44,7 @@ protected TransformBase(IHost host, IDataView input) public abstract void Save(ModelSaveContext ctx); - public abstract long? GetRowCount(); + public abstract long? GetRowCount(bool lazy = true); public virtual bool CanShuffle { get { return Source.CanShuffle; } } @@ -104,7 +104,7 @@ protected RowToRowTransformBase(IHost host, IDataView input) { } - public sealed override long? GetRowCount() { return Source.GetRowCount(); } + public sealed override long? GetRowCount(bool lazy = true) { return Source.GetRowCount(lazy); } } /// @@ -112,25 +112,23 @@ protected RowToRowTransformBase(IHost host, IDataView input) /// public abstract class FilterBase : TransformBase, ITransformCanSavePfa { - [BestFriend] - private protected FilterBase(IHostEnvironment env, string name, IDataView input) + protected FilterBase(IHostEnvironment env, string name, IDataView input) : base(env, name, input) { } - [BestFriend] - private protected FilterBase(IHost host, IDataView input) + protected FilterBase(IHost host, IDataView input) : base(host, input) { } - public override long? GetRowCount() => null; + public override long? GetRowCount(bool lazy = true) { return null; } - public sealed override Schema Schema => Source.Schema; + public sealed override Schema Schema { get { return Source.Schema; } } - bool ICanSavePfa.CanSavePfa => true; + public virtual bool CanSavePfa => true; - void ISaveAsPfa.SaveAsPfa(BoundPfaContext ctx) + public virtual void SaveAsPfa(BoundPfaContext ctx) { Host.CheckValue(ctx, nameof(ctx)); // Because filters do not modify the schema, this is a no-op. @@ -470,16 +468,11 @@ private sealed class ColumnTmp : OneToOneColumn // The InputTranspose transpose schema, null iff InputTranspose is null. protected ITransposeSchema InputTransposeSchema => InputTranspose?.TransposeSchema; - bool ICanSavePfa.CanSavePfa => CanSavePfaCore; + public virtual bool CanSavePfa => false; - private protected virtual bool CanSavePfaCore => false; + public virtual bool CanSaveOnnx(OnnxContext ctx) => false; - bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => CanSaveOnnxCore; - - private protected virtual bool CanSaveOnnxCore => false; - - [BestFriend] - private protected OneToOneTransformBase(IHostEnvironment env, string name, OneToOneColumn[] column, + protected OneToOneTransformBase(IHostEnvironment env, string name, OneToOneColumn[] column, IDataView input, Func testType) : base(env, name, input) { @@ -492,8 +485,7 @@ private protected OneToOneTransformBase(IHostEnvironment env, string name, OneTo Metadata = new MetadataDispatcher(Infos.Length); } - [BestFriend] - private protected OneToOneTransformBase(IHost host, OneToOneColumn[] column, + protected OneToOneTransformBase(IHost host, OneToOneColumn[] column, IDataView input, Func testType) : base(host, input) { @@ -506,8 +498,7 @@ private protected OneToOneTransformBase(IHost host, OneToOneColumn[] column, Metadata = new MetadataDispatcher(Infos.Length); } - [BestFriend] - private protected OneToOneTransformBase(IHost host, ModelLoadContext ctx, + protected OneToOneTransformBase(IHost host, ModelLoadContext ctx, IDataView input, Func testType) : base(host, input) { @@ -523,8 +514,7 @@ private protected OneToOneTransformBase(IHost host, ModelLoadContext ctx, /// /// Re-applying constructor. /// - [BestFriend] - private protected OneToOneTransformBase(IHostEnvironment env, string name, OneToOneTransformBase transform, + protected OneToOneTransformBase(IHostEnvironment env, string name, OneToOneTransformBase transform, IDataView newInput, Func checkType) : base(env, name, newInput) { @@ -544,20 +534,18 @@ private protected OneToOneTransformBase(IHostEnvironment env, string name, OneTo Metadata = new MetadataDispatcher(Infos.Length); } - [BestFriend] - private protected MetadataDispatcher Metadata { get; } + protected MetadataDispatcher Metadata { get; } - [BestFriend] - private protected void SaveBase(ModelSaveContext ctx) + protected void SaveBase(ModelSaveContext ctx) { Host.CheckValue(ctx, nameof(ctx)); _bindings.Save(ctx); } - void ISaveAsPfa.SaveAsPfa(BoundPfaContext ctx) + public void SaveAsPfa(BoundPfaContext ctx) { Host.CheckValue(ctx, nameof(ctx)); - Host.Assert(((ICanSavePfa)this).CanSavePfa); + Host.Assert(CanSavePfa); var toHide = new List(); var toDeclare = new List>(); @@ -584,10 +572,10 @@ void ISaveAsPfa.SaveAsPfa(BoundPfaContext ctx) ctx.DeclareVar(toDeclare.ToArray()); } - void ISaveAsOnnx.SaveAsOnnx(OnnxContext ctx) + public void SaveAsOnnx(OnnxContext ctx) { Host.CheckValue(ctx, nameof(ctx)); - Host.Assert(((ICanSaveOnnx)this).CanSaveOnnx(ctx)); + Host.Assert(CanSaveOnnx(ctx)); for (int iinfo = 0; iinfo < Infos.Length; ++iinfo) { @@ -608,8 +596,8 @@ void ISaveAsOnnx.SaveAsOnnx(OnnxContext ctx) } /// - /// Called by . Should be implemented by subclasses that return - /// true from . Will be called + /// Called by . Should be implemented by subclasses that return + /// true from . Will be called /// /// The context. Can be used to declare cells, access other information, /// and whatnot. This method should not actually, however, declare the variable corresponding @@ -619,19 +607,17 @@ void ISaveAsOnnx.SaveAsOnnx(OnnxContext ctx) /// The token in the PFA corresponding to the source col /// Shuold return the declaration corresponding to the value of this column. Will /// return null in the event that we do not know how to express this column as PFA - [BestFriend] - private protected virtual JToken SaveAsPfaCore(BoundPfaContext ctx, int iinfo, ColInfo info, JToken srcToken) + protected virtual JToken SaveAsPfaCore(BoundPfaContext ctx, int iinfo, ColInfo info, JToken srcToken) { Host.AssertValue(ctx); Host.Assert(0 <= iinfo && iinfo < _bindings.InfoCount); Host.Assert(Infos[iinfo] == info); Host.AssertValue(srcToken); - Host.Assert(((ICanSavePfa)this).CanSavePfa); + Host.Assert(CanSavePfa); return null; } - [BestFriend] - private protected virtual bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColInfo info, string srcVariableName, + protected virtual bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColInfo info, string srcVariableName, string dstVariableName) => false; public sealed override Schema Schema => _bindings.AsSchema; diff --git a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingEstimator.cs b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingEstimator.cs index 4688cd09cc..96ae753d25 100644 --- a/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingEstimator.cs +++ b/src/Microsoft.ML.Data/Transforms/ValueToKeyMappingEstimator.cs @@ -14,16 +14,16 @@ namespace Microsoft.ML.Transforms.Categorical { /// - public sealed class ValueToKeyMappingEstimator: IEstimator + public sealed class ValueToKeyMappingEstimator: IEstimator { public static class Defaults { public const int MaxNumTerms = 1000000; - public const ValueToKeyMappingTransformer.SortOrder Sort = ValueToKeyMappingTransformer.SortOrder.Occurrence; + public const TermTransform.SortOrder Sort = TermTransform.SortOrder.Occurrence; } private readonly IHost _host; - private readonly ValueToKeyMappingTransformer.ColumnInfo[] _columns; + private readonly TermTransform.ColumnInfo[] _columns; private readonly string _file; private readonly string _termsColumn; private readonly IComponentFactory _loaderFactory; @@ -37,12 +37,12 @@ public static class Defaults /// Maximum number of keys to keep per column when auto-training. /// How items should be ordered when vectorized. By default, they will be in the order encountered. /// If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a'). - public ValueToKeyMappingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, int maxNumTerms = Defaults.MaxNumTerms, ValueToKeyMappingTransformer.SortOrder sort = Defaults.Sort) : - this(env, new [] { new ValueToKeyMappingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn, maxNumTerms, sort) }) + public ValueToKeyMappingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, int maxNumTerms = Defaults.MaxNumTerms, TermTransform.SortOrder sort = Defaults.Sort) : + this(env, new [] { new TermTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn, maxNumTerms, sort) }) { } - public ValueToKeyMappingEstimator(IHostEnvironment env, ValueToKeyMappingTransformer.ColumnInfo[] columns, + public ValueToKeyMappingEstimator(IHostEnvironment env, TermTransform.ColumnInfo[] columns, string file = null, string termsColumn = null, IComponentFactory loaderFactory = null) { @@ -54,7 +54,7 @@ public ValueToKeyMappingEstimator(IHostEnvironment env, ValueToKeyMappingTransfo _loaderFactory = loaderFactory; } - public ValueToKeyMappingTransformer Fit(IDataView input) => new ValueToKeyMappingTransformer(_host, input, _columns, _file, _termsColumn, _loaderFactory); + public TermTransform Fit(IDataView input) => new TermTransform(_host, input, _columns, _file, _termsColumn, _loaderFactory); public SchemaShape GetOutputSchema(SchemaShape inputSchema) { @@ -94,12 +94,12 @@ public enum KeyValueOrder : byte /// /// Terms will be assigned ID in the order in which they appear. /// - Occurence = ValueToKeyMappingTransformer.SortOrder.Occurrence, + Occurence = TermTransform.SortOrder.Occurrence, /// /// Terms will be assigned ID according to their sort via an ordinal comparison for the type. /// - Value = ValueToKeyMappingTransformer.SortOrder.Value + Value = TermTransform.SortOrder.Value } /// @@ -117,7 +117,7 @@ public sealed class ToKeyFitResult // At the moment this is empty. Once PR #863 clears, we can change this class to hold the output // key-values metadata. - public ToKeyFitResult(ValueToKeyMappingTransformer.TermMap map) + public ToKeyFitResult(TermTransform.TermMap map) { } } @@ -135,9 +135,9 @@ private readonly struct Config { public readonly KeyValueOrder Order; public readonly int Max; - public readonly Action OnFit; + public readonly Action OnFit; - public Config(KeyValueOrder order, int max, Action onFit) + public Config(KeyValueOrder order, int max, Action onFit) { Order = order; Max = max; @@ -145,7 +145,7 @@ public Config(KeyValueOrder order, int max, Action Wrap(ToKeyFitResult.OnFit onFit) + private static Action Wrap(ToKeyFitResult.OnFit onFit) { if (onFit == null) return null; @@ -201,13 +201,13 @@ private sealed class Rec : EstimatorReconciler public override IEstimator Reconcile(IHostEnvironment env, PipelineColumn[] toOutput, IReadOnlyDictionary inputNames, IReadOnlyDictionary outputNames, IReadOnlyCollection usedNames) { - var infos = new ValueToKeyMappingTransformer.ColumnInfo[toOutput.Length]; - Action onFit = null; + var infos = new TermTransform.ColumnInfo[toOutput.Length]; + Action onFit = null; for (int i = 0; i < toOutput.Length; ++i) { var tcol = (ITermCol)toOutput[i]; - infos[i] = new ValueToKeyMappingTransformer.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], - tcol.Config.Max, (ValueToKeyMappingTransformer.SortOrder)tcol.Config.Order); + infos[i] = new TermTransform.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], + tcol.Config.Max, (TermTransform.SortOrder)tcol.Config.Order); if (tcol.Config.OnFit != null) { int ii = i; // Necessary because if we capture i that will change to toOutput.Length on call. diff --git a/src/Microsoft.ML.Data/Transforms/doc.xml b/src/Microsoft.ML.Data/Transforms/doc.xml index a743ee06a4..70ad394ce5 100644 --- a/src/Microsoft.ML.Data/Transforms/doc.xml +++ b/src/Microsoft.ML.Data/Transforms/doc.xml @@ -12,6 +12,7 @@ If the is set to true, this transform would do the exact opposite, it will keep only the rows that have missing values. + @@ -96,6 +97,7 @@ It can be changed to true for known length vectors, but it results in an error if changed to false for variable length vectors. + diff --git a/src/Microsoft.ML.Data/Utilities/SlotDropper.cs b/src/Microsoft.ML.Data/Utilities/SlotDropper.cs index 188f8e72b5..64b510a655 100644 --- a/src/Microsoft.ML.Data/Utilities/SlotDropper.cs +++ b/src/Microsoft.ML.Data/Utilities/SlotDropper.cs @@ -104,10 +104,11 @@ public void DropSlots(ref VBuffer src, ref VBuffer dst) } int newLength = DstLength == 0 ? ComputeLength(src.Length) : DstLength; + var values = dst.Values; if (newLength == 0) { // All slots dropped. - VBufferUtils.Resize(ref dst, 1, 0); + dst = new VBuffer(1, 0, dst.Values, dst.Indices); return; } @@ -115,11 +116,12 @@ public void DropSlots(ref VBuffer src, ref VBuffer dst) // End of the trivial cases // At this point, we need to drop some slots and keep some slots. - VBufferEditor editor; - var srcValues = src.GetValues(); if (src.IsDense) { - editor = VBufferEditor.Create(ref dst, newLength); + Contracts.Assert(Utils.Size(values) == Utils.Size(src.Values) || src.Values != dst.Values); + + if (Utils.Size(values) < newLength) + values = new TDst[newLength]; int iDst = 0; int iSrc = 0; @@ -129,33 +131,33 @@ public void DropSlots(ref VBuffer src, ref VBuffer dst) while (iSrc < lim) { Contracts.Assert(iDst <= iSrc); - editor.Values[iDst++] = srcValues[iSrc++]; + values[iDst++] = src.Values[iSrc++]; } iSrc = SlotsMax[i] + 1; } while (iSrc < src.Length) { Contracts.Assert(iDst <= iSrc); - editor.Values[iDst++] = srcValues[iSrc++]; + values[iDst++] = src.Values[iSrc++]; } Contracts.Assert(iDst == newLength); - dst = editor.Commit(); + dst = new VBuffer(newLength, values, dst.Indices); return; } // Sparse case. // Approximate new count is min(#indices, newLength). - var newCount = Math.Min(srcValues.Length, newLength); - var indices = dst.GetIndices(); - var srcIndices = src.GetIndices(); + var newCount = Math.Min(src.Count, newLength); + var indices = dst.Indices; Contracts.Assert(newCount <= src.Length); + Contracts.Assert(Utils.Size(values) == Utils.Size(src.Values) || src.Values != dst.Values); + Contracts.Assert(Utils.Size(indices) == Utils.Size(src.Indices) || src.Indices != dst.Indices); - editor = VBufferEditor.Create( - ref dst, - newLength, - newCount, - requireIndicesOnDense: true); + if (Utils.Size(indices) < newCount) + indices = new int[newCount]; + if (Utils.Size(values) < newCount) + values = new TDst[newCount]; int iiDst = 0; int iiSrc = 0; @@ -165,15 +167,15 @@ public void DropSlots(ref VBuffer src, ref VBuffer dst) // REVIEW: Consider using a BitArray with the slots to keep instead of SlotsMax. It would // only make sense when the number of ranges is greater than the number of slots divided by 32. int max = SlotsMax[iRange]; - while (iiSrc < srcValues.Length) + while (iiSrc < src.Count) { // Copy (with offset) the elements before the current range. - var index = srcIndices[iiSrc]; + var index = src.Indices[iiSrc]; if (index < min) { Contracts.Assert(iiDst <= iiSrc); - editor.Indices[iiDst] = index - iOffset; - editor.Values[iiDst++] = srcValues[iiSrc++]; + indices[iiDst] = index - iOffset; + values[iiDst++] = src.Values[iiSrc++]; continue; } if (index <= max) @@ -209,7 +211,7 @@ public void DropSlots(ref VBuffer src, ref VBuffer dst) Contracts.Assert(index <= max); } - dst = editor.CommitTruncated(iiDst); + dst = new VBuffer(newLength, iiDst, values, indices); } } } diff --git a/src/Microsoft.ML.Data/Utilities/StreamUtils.cs b/src/Microsoft.ML.Data/Utilities/StreamUtils.cs index 5d52b45b3b..ac05684a8e 100644 --- a/src/Microsoft.ML.Data/Utilities/StreamUtils.cs +++ b/src/Microsoft.ML.Data/Utilities/StreamUtils.cs @@ -9,8 +9,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities { // REVIEW: Implement properly on CoreCLR. - [BestFriend] - internal static class StreamUtils + public static class StreamUtils { public static Stream OpenInStream(string fileName) { diff --git a/src/Microsoft.ML.Data/Utilities/TimerScope.cs b/src/Microsoft.ML.Data/Utilities/TimerScope.cs index c2a590ffe8..403d8da81d 100644 --- a/src/Microsoft.ML.Data/Utilities/TimerScope.cs +++ b/src/Microsoft.ML.Data/Utilities/TimerScope.cs @@ -3,16 +3,17 @@ // See the LICENSE file in the project root for more information. using System; +using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.Data; namespace Microsoft.ML.Runtime.Internal.Utilities { using Stopwatch = System.Diagnostics.Stopwatch; /// - /// A timer scope class that starts a when created, calculates and prints elapsed time, physical and virtual memory usages before sending these to the telemetry when disposed. + /// A timer scope class that starts a Stopwatch when created, calculates and prints elapsed time, physical and virtual memory usages before sending these to the telemetry when disposed. /// - [BestFriend] - internal sealed class TimerScope : IDisposable + public sealed class TimerScope : IDisposable { // Note that this class does not own nor dispose of this channel. private readonly IChannel _ch; diff --git a/src/Microsoft.ML.Data/Utils/SequencePool.cs b/src/Microsoft.ML.Data/Utils/IntSequencePool.cs similarity index 98% rename from src/Microsoft.ML.Data/Utils/SequencePool.cs rename to src/Microsoft.ML.Data/Utils/IntSequencePool.cs index 6b9ebe01e3..9a83d17168 100644 --- a/src/Microsoft.ML.Data/Utils/SequencePool.cs +++ b/src/Microsoft.ML.Data/Utils/IntSequencePool.cs @@ -3,7 +3,13 @@ // See the LICENSE file in the project root for more information. using System; +using System.Collections.Generic; +using System.Collections; using System.IO; +using System.Linq; +using System.Threading; +using System.Text; +using Microsoft.ML.Runtime.Model; namespace Microsoft.ML.Runtime.Internal.Utilities { @@ -13,8 +19,7 @@ namespace Microsoft.ML.Runtime.Internal.Utilities /// A dictionary of uint sequences of variable length. Stores the sequences as /// byte sequences encoded with LEB128. Empty sequences (or null) are also valid. /// - [BestFriend] - internal sealed class SequencePool + public sealed class SequencePool { // uint sequences are hashed into _mask+1 buckets. _buckets contains the ID of the first // sequence that falls in it (or -1 if it is empty). diff --git a/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs b/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs index 5179c60e56..48fd32fc31 100644 --- a/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs +++ b/src/Microsoft.ML.DnnAnalyzer/Microsoft.ML.DnnAnalyzer/DnnAnalyzer.cs @@ -2,8 +2,12 @@ // 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; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Transforms.TensorFlow; using System; +using System.Linq; namespace Microsoft.ML.DnnAnalyzer { @@ -11,7 +15,7 @@ public static class DnnAnalyzer { public static void Main(string[] args) { - if (args == null || args.Length != 1) + if (Utils.Size(args) != 1) { Console.Error.WriteLine("Usage: dotnet DnnAnalyzer.dll "); return; diff --git a/src/Microsoft.ML.Ensemble/EnsembleUtils.cs b/src/Microsoft.ML.Ensemble/EnsembleUtils.cs index 66a6ff165e..275594e17b 100644 --- a/src/Microsoft.ML.Ensemble/EnsembleUtils.cs +++ b/src/Microsoft.ML.Ensemble/EnsembleUtils.cs @@ -47,20 +47,27 @@ public static void SelectFeatures(in VBuffer src, BitArray includedIndices Contracts.Assert(cardinality == Utils.GetCardinality(includedIndices)); Contracts.Assert(cardinality < src.Length); + var values = dst.Values; + var indices = dst.Indices; + var srcValues = src.GetValues(); if (src.IsDense) { if (cardinality >= src.Length / 2) { T defaultValue = default; - var editor = VBufferEditor.Create(ref dst, src.Length); + if (Utils.Size(values) < src.Length) + values = new T[src.Length]; for (int i = 0; i < srcValues.Length; i++) - editor.Values[i] = !includedIndices[i] ? defaultValue : srcValues[i]; - dst = editor.Commit(); + values[i] = !includedIndices[i] ? defaultValue : srcValues[i]; + dst = new VBuffer(src.Length, values, indices); } else { - var editor = VBufferEditor.Create(ref dst, src.Length, cardinality); + if (Utils.Size(values) < cardinality) + values = new T[cardinality]; + if (Utils.Size(indices) < cardinality) + indices = new int[cardinality]; int count = 0; for (int i = 0; i < srcValues.Length; i++) @@ -68,19 +75,28 @@ public static void SelectFeatures(in VBuffer src, BitArray includedIndices if (includedIndices[i]) { Contracts.Assert(count < cardinality); - editor.Values[count] = srcValues[i]; - editor.Indices[count] = i; + values[count] = srcValues[i]; + indices[count] = i; count++; } } Contracts.Assert(count == cardinality); - dst = editor.Commit(); + dst = new VBuffer(src.Length, count, values, indices); } } else { - var editor = VBufferEditor.Create(ref dst, src.Length, cardinality); + int valuesSize = Utils.Size(values); + int indicesSize = Utils.Size(indices); + + if (valuesSize < srcValues.Length || indicesSize < srcValues.Length) + { + if (valuesSize < cardinality) + values = new T[cardinality]; + if (indicesSize < cardinality) + indices = new int[cardinality]; + } int count = 0; var srcIndices = src.GetIndices(); @@ -88,13 +104,13 @@ public static void SelectFeatures(in VBuffer src, BitArray includedIndices { if (includedIndices[srcIndices[i]]) { - editor.Values[count] = srcValues[i]; - editor.Indices[count] = srcIndices[i]; + values[count] = srcValues[i]; + indices[count] = srcIndices[i]; count++; } } - dst = editor.CommitTruncated(count); + dst = new VBuffer(src.Length, count, values, indices); } } } diff --git a/src/Microsoft.ML.Ensemble/EntryPoints/Ensemble.cs b/src/Microsoft.ML.Ensemble/EntryPoints/Ensemble.cs index e5e9b79afc..728cccb1f6 100644 --- a/src/Microsoft.ML.Ensemble/EntryPoints/Ensemble.cs +++ b/src/Microsoft.ML.Ensemble/EntryPoints/Ensemble.cs @@ -11,7 +11,7 @@ namespace Microsoft.ML.Ensemble.EntryPoints { - internal static class Ensemble + public static class Ensemble { [TlcModule.EntryPoint(Name = "Trainers.EnsembleBinaryClassifier", Desc = "Train binary ensemble.", UserName = EnsembleTrainer.UserNameValue)] public static CommonOutputs.BinaryClassificationOutput CreateBinaryEnsemble(IHostEnvironment env, EnsembleTrainer.Arguments input) diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiAverager.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiAverager.cs index e7a50c11c3..15985316fc 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiAverager.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiAverager.cs @@ -35,11 +35,14 @@ protected void CombineCore(ref VBuffer dst, VBuffer[] src, Singl return; } - var editor = VBufferEditor.Create(ref dst, len); - if (!editor.CreatedNewValues) - editor.Values.Clear(); + var values = dst.Values; + if (Utils.Size(values) < len) + values = new Single[len]; + else + Array.Clear(values, 0, len); + // Set the output to values. - dst = editor.Commit(); + dst = new VBuffer(len, values, dst.Indices); Single weightTotal; if (weights == null) diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiCombiner.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiCombiner.cs index 350833aebb..cea9c698ae 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiCombiner.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseMultiCombiner.cs @@ -98,10 +98,12 @@ protected bool TryNormalize(VBuffer[] values) protected void GetNaNOutput(ref VBuffer dst, int len) { Contracts.Assert(len >= 0); - var editor = VBufferEditor.Create(ref dst, len); + var values = dst.Values; + if (Utils.Size(values) < len) + values = new Single[len]; for (int i = 0; i < len; i++) - editor.Values[i] = Single.NaN; - dst = editor.Commit(); + values[i] = Single.NaN; + dst = new VBuffer(len, values, dst.Indices); } } } diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseScalarStacking.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseScalarStacking.cs index 257499cd13..9b9900a65f 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseScalarStacking.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseScalarStacking.cs @@ -9,7 +9,7 @@ namespace Microsoft.ML.Runtime.Ensemble.OutputCombiners { - internal abstract class BaseScalarStacking : BaseStacking + public abstract class BaseScalarStacking : BaseStacking { internal BaseScalarStacking(IHostEnvironment env, string name, ArgumentsBase args) : base(env, name, args) @@ -25,9 +25,11 @@ protected override void FillFeatureBuffer(Single[] src, ref VBuffer dst) { Contracts.AssertNonEmpty(src); int len = src.Length; - var editor = VBufferEditor.Create(ref dst, len); - src.CopyTo(editor.Values); - dst = editor.Commit(); + var values = dst.Values; + if (Utils.Size(values) < len) + values = new Single[len]; + Array.Copy(src, values, len); + dst = new VBuffer(len, values, dst.Indices); } } } diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs index d62650b7c2..eb6dc3a650 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/BaseStacking.cs @@ -16,7 +16,7 @@ namespace Microsoft.ML.Runtime.Ensemble.OutputCombiners { using ColumnRole = RoleMappedSchema.ColumnRole; - internal abstract class BaseStacking : IStackingTrainer + public abstract class BaseStacking : IStackingTrainer { public abstract class ArgumentsBase { @@ -28,13 +28,13 @@ public abstract class ArgumentsBase internal abstract IComponentFactory>> GetPredictorFactory(); } - private protected readonly IComponentFactory>> BasePredictorType; - private protected readonly IHost Host; - private protected IPredictorProducing Meta; + protected readonly IComponentFactory>> BasePredictorType; + protected readonly IHost Host; + protected IPredictorProducing Meta; public Single ValidationDatasetProportion { get; } - private protected BaseStacking(IHostEnvironment env, string name, ArgumentsBase args) + internal BaseStacking(IHostEnvironment env, string name, ArgumentsBase args) { Contracts.AssertValue(env); env.AssertNonWhiteSpace(name); @@ -49,7 +49,7 @@ private protected BaseStacking(IHostEnvironment env, string name, ArgumentsBase Host.CheckValue(BasePredictorType, nameof(BasePredictorType)); } - private protected BaseStacking(IHostEnvironment env, string name, ModelLoadContext ctx) + internal BaseStacking(IHostEnvironment env, string name, ModelLoadContext ctx) { Contracts.AssertValue(env); env.AssertNonWhiteSpace(name); diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/MultiMedian.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/MultiMedian.cs index 3b11146203..86312393de 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/MultiMedian.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/MultiMedian.cs @@ -81,7 +81,9 @@ public override Combiner> GetCombiner() return; } - var editor = VBufferEditor.Create(ref dst, len); + var values = dst.Values; + if (Utils.Size(values) < len) + values = new Single[len]; int count = src.Length; if (Utils.Size(raw) < count) @@ -90,11 +92,11 @@ public override Combiner> GetCombiner() { for (int j = 0; j < count; j++) raw[j] = i < src[j].Length ? src[j].GetItemOrDefault(i) : 0; - editor.Values[i] = MathUtils.GetMedianInPlace(raw, count); + values[i] = MathUtils.GetMedianInPlace(raw, count); } // Set the output to values. - dst = editor.Commit(); + dst = new VBuffer(len, values, dst.Indices); }; } } diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/MultiStacking.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/MultiStacking.cs index f9e3b246f7..f02d692f54 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/MultiStacking.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/MultiStacking.cs @@ -21,7 +21,7 @@ namespace Microsoft.ML.Runtime.Ensemble.OutputCombiners { using TVectorPredictor = IPredictorProducing>; - internal sealed class MultiStacking : BaseStacking>, ICanSaveModel, IMultiClassOutputCombiner + public sealed class MultiStacking : BaseStacking>, ICanSaveModel, IMultiClassOutputCombiner { public const string LoadName = "MultiStacking"; public const string LoaderSignature = "MultiStackingCombiner"; @@ -37,11 +37,9 @@ private static VersionInfo GetVersionInfo() loaderAssemblyName: typeof(MultiStacking).Assembly.FullName); } -#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. [TlcModule.Component(Name = LoadName, FriendlyName = Stacking.UserName)] public sealed class Arguments : ArgumentsBase, ISupportMulticlassOutputCombinerFactory { - // REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer. [Argument(ArgumentType.Multiple, HelpText = "Base predictor for meta learning", ShortName = "bp", SortOrder = 50, Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureMultiClassClassifierTrainer))] [TGUI(Label = "Base predictor")] @@ -51,7 +49,6 @@ public sealed class Arguments : ArgumentsBase, ISupportMulticlassOutputCombinerF public IMultiClassOutputCombiner CreateComponent(IHostEnvironment env) => new MultiStacking(env, this); } -#pragma warning restore CS0649 public MultiStacking(IHostEnvironment env, Arguments args) : base(env, LoaderSignature, args) @@ -86,17 +83,19 @@ protected override void FillFeatureBuffer(VBuffer[] src, ref VBuffer(len, values, dst.Indices); int iv = 0; for (int i = 0; i < src.Length; i++) { - src[i].CopyTo(editor.Values, iv); + src[i].CopyTo(values, iv); iv += src[i].Length; Contracts.Assert(iv <= len); } Contracts.Assert(iv == len); - dst = editor.Commit(); } } } diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/MultiVoting.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/MultiVoting.cs index ffa1b9c647..75fd4f5222 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/MultiVoting.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/MultiVoting.cs @@ -77,14 +77,16 @@ private void CombineCore(ref VBuffer dst, VBuffer[] src, Single[ int count = Utils.Size(src); if (count == 0) { - VBufferUtils.Resize(ref dst, 0); + dst = new VBuffer(0, dst.Values, dst.Indices); return; } int len = GetClassCount(src); - var editor = VBufferEditor.Create(ref dst, len); - if (!editor.CreatedNewValues) - editor.Values.Clear(); + var values = dst.Values; + if (Utils.Size(values) < len) + values = new Single[len]; + else + Array.Clear(values, 0, len); int voteCount = 0; for (int i = 0; i < count; i++) @@ -92,17 +94,17 @@ private void CombineCore(ref VBuffer dst, VBuffer[] src, Single[ int index = VectorUtils.ArgMax(in src[i]); if (index >= 0) { - editor.Values[index]++; + values[index]++; voteCount++; } } // Normalize by dividing by the number of votes. for (int i = 0; i < len; i++) - editor.Values[i] /= voteCount; + values[i] /= voteCount; // Set the output to values. - dst = editor.Commit(); + dst = new VBuffer(len, values, dst.Indices); } } } diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/RegressionStacking.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/RegressionStacking.cs index 8c984613db..9adb9ba799 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/RegressionStacking.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/RegressionStacking.cs @@ -19,7 +19,7 @@ namespace Microsoft.ML.Runtime.Ensemble.OutputCombiners { using TScalarPredictor = IPredictorProducing; - internal sealed class RegressionStacking : BaseScalarStacking, IRegressionOutputCombiner, ICanSaveModel + public sealed class RegressionStacking : BaseScalarStacking, IRegressionOutputCombiner, ICanSaveModel { public const string LoadName = "RegressionStacking"; public const string LoaderSignature = "RegressionStacking"; @@ -35,11 +35,9 @@ private static VersionInfo GetVersionInfo() loaderAssemblyName: typeof(RegressionStacking).Assembly.FullName); } -#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. [TlcModule.Component(Name = LoadName, FriendlyName = Stacking.UserName)] public sealed class Arguments : ArgumentsBase, ISupportRegressionOutputCombinerFactory { - // REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer. [Argument(ArgumentType.Multiple, HelpText = "Base predictor for meta learning", ShortName = "bp", SortOrder = 50, Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureRegressorTrainer))] [TGUI(Label = "Base predictor")] @@ -49,7 +47,6 @@ public sealed class Arguments : ArgumentsBase, ISupportRegressionOutputCombinerF public IRegressionOutputCombiner CreateComponent(IHostEnvironment env) => new RegressionStacking(env, this); } -#pragma warning restore CS0649 public RegressionStacking(IHostEnvironment env, Arguments args) : base(env, LoaderSignature, args) diff --git a/src/Microsoft.ML.Ensemble/OutputCombiners/Stacking.cs b/src/Microsoft.ML.Ensemble/OutputCombiners/Stacking.cs index f44f987b05..8c36cc866e 100644 --- a/src/Microsoft.ML.Ensemble/OutputCombiners/Stacking.cs +++ b/src/Microsoft.ML.Ensemble/OutputCombiners/Stacking.cs @@ -16,7 +16,7 @@ namespace Microsoft.ML.Runtime.Ensemble.OutputCombiners { using TScalarPredictor = IPredictorProducing; - internal sealed class Stacking : BaseScalarStacking, IBinaryOutputCombiner, ICanSaveModel + public sealed class Stacking : BaseScalarStacking, IBinaryOutputCombiner, ICanSaveModel { public const string UserName = "Stacking"; public const string LoadName = "Stacking"; @@ -33,11 +33,9 @@ private static VersionInfo GetVersionInfo() loaderAssemblyName: typeof(Stacking).Assembly.FullName); } -#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. [TlcModule.Component(Name = LoadName, FriendlyName = UserName)] public sealed class Arguments : ArgumentsBase, ISupportBinaryOutputCombinerFactory { - // REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer. [Argument(ArgumentType.Multiple, HelpText = "Base predictor for meta learning", ShortName = "bp", SortOrder = 50, Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureBinaryClassifierTrainer))] [TGUI(Label = "Base predictor")] @@ -47,7 +45,6 @@ public sealed class Arguments : ArgumentsBase, ISupportBinaryOutputCombinerFacto public IBinaryOutputCombiner CreateComponent(IHostEnvironment env) => new Stacking(env, this); } -#pragma warning restore CS0649 public Stacking(IHostEnvironment env, Arguments args) : base(env, LoaderSignature, args) diff --git a/src/Microsoft.ML.Ensemble/Selector/SubsetSelector/BootstrapSelector.cs b/src/Microsoft.ML.Ensemble/Selector/SubsetSelector/BootstrapSelector.cs index fd045f71a8..102b9d10d5 100644 --- a/src/Microsoft.ML.Ensemble/Selector/SubsetSelector/BootstrapSelector.cs +++ b/src/Microsoft.ML.Ensemble/Selector/SubsetSelector/BootstrapSelector.cs @@ -46,7 +46,7 @@ public override IEnumerable GetSubsets(Batch batch, IRandom rand) for (int i = 0; i < Size; i++) { // REVIEW: Consider ways to reintroduce "balanced" samples. - var viewTrain = new BootstrapSamplingTransformer(Host, new BootstrapSamplingTransformer.Arguments(), Data.Data); + var viewTrain = new BootstrapSampleTransform(Host, new BootstrapSampleTransform.Arguments(), Data.Data); var dataTrain = new RoleMappedData(viewTrain, Data.Schema.GetColumnRoleNames()); yield return FeatureSelector.SelectFeatures(dataTrain, rand); } diff --git a/src/Microsoft.ML.Ensemble/Trainer/Binary/EnsembleTrainer.cs b/src/Microsoft.ML.Ensemble/Trainer/Binary/EnsembleTrainer.cs index a1befc112b..cc03de02d4 100644 --- a/src/Microsoft.ML.Ensemble/Trainer/Binary/EnsembleTrainer.cs +++ b/src/Microsoft.ML.Ensemble/Trainer/Binary/EnsembleTrainer.cs @@ -29,7 +29,7 @@ namespace Microsoft.ML.Runtime.Ensemble /// /// A generic ensemble trainer for binary classification. /// - internal sealed class EnsembleTrainer : EnsembleTrainerBase, IModelCombiner { @@ -48,7 +48,6 @@ public sealed class Arguments : ArgumentsBase [TGUI(Label = "Output combiner", Description = "Output combiner type")] public ISupportBinaryOutputCombinerFactory OutputCombiner = new MedianFactory(); - // REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer. [Argument(ArgumentType.Multiple, HelpText = "Base predictor type", ShortName = "bp,basePredictorTypes", SortOrder = 1, Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureBinaryClassifierTrainer))] public IComponentFactory>[] BasePredictors; diff --git a/src/Microsoft.ML.Ensemble/Trainer/EnsembleTrainerBase.cs b/src/Microsoft.ML.Ensemble/Trainer/EnsembleTrainerBase.cs index a8fc896c5b..9d7c6fab40 100644 --- a/src/Microsoft.ML.Ensemble/Trainer/EnsembleTrainerBase.cs +++ b/src/Microsoft.ML.Ensemble/Trainer/EnsembleTrainerBase.cs @@ -101,7 +101,7 @@ private protected EnsembleTrainerBase(ArgumentsBase args, IHostEnvironment env, } } - private protected sealed override TPredictor Train(TrainContext context) + public sealed override TPredictor Train(TrainContext context) { Host.CheckValue(context, nameof(context)); diff --git a/src/Microsoft.ML.Ensemble/Trainer/IModelCombiner.cs b/src/Microsoft.ML.Ensemble/Trainer/IModelCombiner.cs index 196df4dc54..0a392585a7 100644 --- a/src/Microsoft.ML.Ensemble/Trainer/IModelCombiner.cs +++ b/src/Microsoft.ML.Ensemble/Trainer/IModelCombiner.cs @@ -7,8 +7,6 @@ namespace Microsoft.ML.Runtime.Ensemble { - public delegate void SignatureModelCombiner(PredictionKind kind); - /// /// An interface that combines multiple predictors into a single predictor. /// diff --git a/src/Microsoft.ML.Ensemble/Trainer/Multiclass/MulticlassDataPartitionEnsembleTrainer.cs b/src/Microsoft.ML.Ensemble/Trainer/Multiclass/MulticlassDataPartitionEnsembleTrainer.cs index 1961e6a785..f207c9e0ad 100644 --- a/src/Microsoft.ML.Ensemble/Trainer/Multiclass/MulticlassDataPartitionEnsembleTrainer.cs +++ b/src/Microsoft.ML.Ensemble/Trainer/Multiclass/MulticlassDataPartitionEnsembleTrainer.cs @@ -30,7 +30,7 @@ namespace Microsoft.ML.Runtime.Ensemble /// /// A generic ensemble classifier for multi-class classification /// - internal sealed class MulticlassDataPartitionEnsembleTrainer : + public sealed class MulticlassDataPartitionEnsembleTrainer : EnsembleTrainerBase, EnsembleMultiClassPredictor, IMulticlassSubModelSelector, IMultiClassOutputCombiner>, IModelCombiner @@ -49,7 +49,6 @@ public sealed class Arguments : ArgumentsBase [TGUI(Label = "Output combiner", Description = "Output combiner type")] public ISupportMulticlassOutputCombinerFactory OutputCombiner = new MultiMedian.Arguments(); - // REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer. [Argument(ArgumentType.Multiple, HelpText = "Base predictor type", ShortName = "bp,basePredictorTypes", SortOrder = 1, Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureMultiClassClassifierTrainer))] public IComponentFactory>[] BasePredictors; @@ -60,7 +59,7 @@ public Arguments() BasePredictors = new[] { ComponentFactoryUtils.CreateFromFunction( - env => new MulticlassLogisticRegression(env, LabelColumn, FeatureColumn)) + env => new MulticlassLogisticRegression(env, FeatureColumn, LabelColumn)) }; } } diff --git a/src/Microsoft.ML.Ensemble/Trainer/Regression/RegressionEnsembleTrainer.cs b/src/Microsoft.ML.Ensemble/Trainer/Regression/RegressionEnsembleTrainer.cs index 09d394d596..b7e63b8862 100644 --- a/src/Microsoft.ML.Ensemble/Trainer/Regression/RegressionEnsembleTrainer.cs +++ b/src/Microsoft.ML.Ensemble/Trainer/Regression/RegressionEnsembleTrainer.cs @@ -26,7 +26,7 @@ namespace Microsoft.ML.Runtime.Ensemble { using TScalarPredictor = IPredictorProducing; - internal sealed class RegressionEnsembleTrainer : EnsembleTrainerBase, IModelCombiner { @@ -43,7 +43,6 @@ public sealed class Arguments : ArgumentsBase [TGUI(Label = "Output combiner", Description = "Output combiner type")] public ISupportRegressionOutputCombinerFactory OutputCombiner = new MedianFactory(); - // REVIEW: If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer. [Argument(ArgumentType.Multiple, HelpText = "Base predictor type", ShortName = "bp,basePredictorTypes", SortOrder = 1, Visibility = ArgumentAttribute.VisibilityType.CmdLineOnly, SignatureType = typeof(SignatureRegressorTrainer))] public IComponentFactory>[] BasePredictors; diff --git a/src/Microsoft.ML.FastTree/BinFile/BinFinder.cs b/src/Microsoft.ML.FastTree/BinFile/BinFinder.cs index eaae7d5448..782d85f24a 100644 --- a/src/Microsoft.ML.FastTree/BinFile/BinFinder.cs +++ b/src/Microsoft.ML.FastTree/BinFile/BinFinder.cs @@ -17,7 +17,6 @@ internal sealed class BinFinder { private readonly GreedyBinFinder _finder; private double[] _distinctValues; - private double[] _distinctCountsBuffer; private int[] _counts; private static double[] _trivialBinUpperBounds; // Will be initialized to a single element positive infinity array. @@ -44,19 +43,15 @@ public BinFinder() /// The scheme is destructive, because it modifies the arrays within . /// /// The values we are binning - /// A buffer space to work over the values, so the original - /// values aren't modified. /// This working array will be filled with a sorted list of the /// distinct values detected within /// This working array will be filled with a sorted list of the distinct /// values detected within /// The logical length of both and /// - private int FindDistinctCounts(in VBuffer values, double[] valueBuffer, double[] distinctValues, int[] counts) + private int FindDistinctCounts(in VBuffer values, double[] distinctValues, int[] counts) { - var explicitValues = values.GetValues(); - var explicitValuesCount = explicitValues.Length; - if (explicitValuesCount == 0) + if (values.Count == 0) { if (values.Length == 0) return 0; @@ -64,31 +59,30 @@ private int FindDistinctCounts(in VBuffer values, double[] valueBuffer, counts[0] = values.Length; return 1; } + var valArray = values.Values; // Get histogram of values - Contracts.Assert(valueBuffer.Length >= explicitValuesCount); - explicitValues.CopyTo(valueBuffer); - Array.Sort(valueBuffer, 0, explicitValuesCount); + Array.Sort(valArray, 0, values.Count); // Note that Array.Sort will, by MSDN documentation, make NaN be the first item of a sorted // list (that is, NaN is considered to be ordered "below" any other value for the purpose of // a sort, including negative infinity). So when checking if values contains no NaN values, it // suffices to check only the first item. - if (double.IsNaN(valueBuffer[0])) + if (double.IsNaN(valArray[0])) return -1; int idist = 0; // Index into the "distinct" arrays. - if (!values.IsDense && valueBuffer[0] > 0) + if (!values.IsDense && valArray[0] > 0) { // Implicit zeros at the head. distinctValues[0] = 0; - counts[0] = values.Length - explicitValuesCount; + counts[0] = values.Length - values.Count; idist = 1; } - double last = distinctValues[idist] = valueBuffer[0]; + double last = distinctValues[idist] = valArray[0]; counts[idist] = 1; - for (int i = 1; i < explicitValuesCount; ++i) + for (int i = 1; i < values.Count; ++i) { - double curr = valueBuffer[i]; + double curr = valArray[i]; if (curr != last) { Contracts.Assert(curr > last); @@ -98,7 +92,7 @@ private int FindDistinctCounts(in VBuffer values, double[] valueBuffer, { // This boundary is going from negative, to non-negative, and there are "implicit" zeros. distinctValues[idist] = 0; - counts[idist] = values.Length - explicitValuesCount; + counts[idist] = values.Length - values.Count; if (curr == 0) { // No need to do any more work. @@ -123,7 +117,7 @@ private int FindDistinctCounts(in VBuffer values, double[] valueBuffer, { // Implicit zeros at the tail. distinctValues[++idist] = 0; - counts[idist] = values.Length - explicitValuesCount; + counts[idist] = values.Length - values.Count; } return idist + 1; @@ -230,19 +224,17 @@ public bool FindBins(in VBuffer values, int maxBins, int minPerLeaf, out Contracts.Assert(maxBins > 0); Contracts.Assert(minPerLeaf >= 0); - var valuesCount = values.GetValues().Length; - if (valuesCount == 0) + if (values.Count == 0) { binUpperBounds = TrivialBinUpperBounds; return true; } - int arraySize = values.IsDense ? valuesCount : valuesCount + 1; - Utils.EnsureSize(ref _distinctCountsBuffer, arraySize, arraySize, keepOld: false); + int arraySize = values.IsDense ? values.Count : values.Count + 1; Utils.EnsureSize(ref _distinctValues, arraySize, arraySize, keepOld: false); Utils.EnsureSize(ref _counts, arraySize, arraySize, keepOld: false); - int numValues = FindDistinctCounts(in values, _distinctCountsBuffer, _distinctValues, _counts); + int numValues = FindDistinctCounts(in values, _distinctValues, _counts); if (numValues < 0) { binUpperBounds = null; diff --git a/src/Microsoft.ML.FastTree/BoostingFastTree.cs b/src/Microsoft.ML.FastTree/BoostingFastTree.cs index 4ae0bf16b6..99658d2a89 100644 --- a/src/Microsoft.ML.FastTree/BoostingFastTree.cs +++ b/src/Microsoft.ML.FastTree/BoostingFastTree.cs @@ -28,10 +28,10 @@ protected BoostingFastTreeTrainerBase(IHostEnvironment env, string groupIdColumn, int numLeaves, int numTrees, - int minDatapointsInLeaves, + int minDocumentsInLeafs, double learningRate, Action advancedSettings) - : base(env, label, featureColumn, weightColumn, groupIdColumn, numLeaves, numTrees, minDatapointsInLeaves, advancedSettings) + : base(env, label, featureColumn, weightColumn, groupIdColumn, numLeaves, numTrees, minDocumentsInLeafs, advancedSettings) { if (Args.LearningRates != learningRate) diff --git a/src/Microsoft.ML.FastTree/Dataset/Dataset.cs b/src/Microsoft.ML.FastTree/Dataset/Dataset.cs index a1e70ab5b9..68283ca33c 100644 --- a/src/Microsoft.ML.FastTree/Dataset/Dataset.cs +++ b/src/Microsoft.ML.FastTree/Dataset/Dataset.cs @@ -388,11 +388,7 @@ private void SplitThreadWorker(FeatureFlockBase[][] features, int f, int[][] doc /// Row forward indexer public RowForwardIndexer GetFeatureBinRowwiseIndexer(bool[] activeFeatures = null) { - Contracts.Assert(activeFeatures == null || activeFeatures.Length >= NumFeatures); - var truncatedActiveFeatures = Enumerable.Repeat(true, NumFeatures).ToArray(); - if (activeFeatures != null) - Array.Copy(activeFeatures, 0, truncatedActiveFeatures, 0, NumFeatures); - return new RowForwardIndexer(this, truncatedActiveFeatures); + return new RowForwardIndexer(this, activeFeatures); } public struct DatasetSkeletonQueryDocData diff --git a/src/Microsoft.ML.FastTree/FastTree.cs b/src/Microsoft.ML.FastTree/FastTree.cs index 9245dc3e19..32ada36a09 100644 --- a/src/Microsoft.ML.FastTree/FastTree.cs +++ b/src/Microsoft.ML.FastTree/FastTree.cs @@ -58,24 +58,12 @@ public abstract class FastTreeTrainerBase : protected TreeEnsemble TrainedEnsemble; protected int FeatureCount; protected RoleMappedData ValidData; - /// - /// If not null, it's a test data set passed in from training context. It will be converted to one element in - /// by calling in . - /// - protected RoleMappedData TestData; protected IParallelTraining ParallelTraining; protected OptimizationAlgorithm OptimizationAlgorithm; protected Dataset TrainSet; protected Dataset ValidSet; - /// - /// Data sets used to evaluate the prediction scores produced the trained model during the triaining process. - /// protected Dataset[] TestSets; protected int[] FeatureMap; - /// - /// In the training process, , , would be - /// converted into for efficient model evaluation. - /// protected List Tests; protected TestHistory PruningTest; protected int[] CategoricalFeatures; @@ -114,7 +102,7 @@ private protected FastTreeTrainerBase(IHostEnvironment env, string groupIdColumn, int numLeaves, int numTrees, - int minDatapointsInLeaves, + int minDocumentsInLeafs, Action advancedSettings) : base(Contracts.CheckRef(env, nameof(env)).Register(RegisterName), TrainerUtils.MakeR4VecFeature(featureColumn), label, TrainerUtils.MakeR4ScalarWeightColumn(weightColumn), TrainerUtils.MakeU4ScalarColumn(groupIdColumn)) { @@ -124,7 +112,7 @@ private protected FastTreeTrainerBase(IHostEnvironment env, // override with the directly provided values. Args.NumLeaves = numLeaves; Args.NumTrees = numTrees; - Args.MinDocumentsInLeafs = minDatapointsInLeaves; + Args.MinDocumentsInLeafs = minDocumentsInLeafs; //apply the advanced args, if the user supplied any advancedSettings?.Invoke(Args); @@ -133,15 +121,15 @@ private protected FastTreeTrainerBase(IHostEnvironment env, Args.FeatureColumn = featureColumn; if (weightColumn != null) - Args.WeightColumn = Optional.Explicit(weightColumn); + Args.WeightColumn = Optional.Explicit(weightColumn); ; if (groupIdColumn != null) - Args.GroupIdColumn = Optional.Explicit(groupIdColumn); + Args.GroupIdColumn = Optional.Explicit(groupIdColumn); ; // The discretization step renders this trainer non-parametric, and therefore it does not need normalization. // Also since it builds its own internal discretized columnar structures, it cannot benefit from caching. // Finally, even the binary classifiers, being logitboost, tend to not benefit from external calibration. - Info = new TrainerInfo(normalization: false, caching: false, calibration: NeedCalibration, supportValid: true, supportTest: true); + Info = new TrainerInfo(normalization: false, caching: false, calibration: NeedCalibration, supportValid: true); // REVIEW: CLR 4.6 has a bug that is only exposed in Scope, and if we trigger GC.Collect in scope environment // with memory consumption more than 5GB, GC get stuck in infinite loop. // Before, we could check a specific type of the environment here, but now it is internal, so we will need another @@ -162,7 +150,7 @@ private protected FastTreeTrainerBase(IHostEnvironment env, TArgs args, SchemaSh // The discretization step renders this trainer non-parametric, and therefore it does not need normalization. // Also since it builds its own internal discretized columnar structures, it cannot benefit from caching. // Finally, even the binary classifiers, being logitboost, tend to not benefit from external calibration. - Info = new TrainerInfo(normalization: false, caching: false, calibration: NeedCalibration, supportValid: true, supportTest: true); + Info = new TrainerInfo(normalization: false, caching: false, calibration: NeedCalibration, supportValid: true); // REVIEW: CLR 4.6 has a bug that is only exposed in Scope, and if we trigger GC.Collect in scope environment // with memory consumption more than 5GB, GC get stuck in infinite loop. // Before, we could check a specific type of the environment here, but now it is internal, so we will need another @@ -219,8 +207,6 @@ protected void ConvertData(RoleMappedData trainData) FeatureMap = instanceConverter.FeatureMap; if (ValidData != null) ValidSet = instanceConverter.GetCompatibleDataset(ValidData, PredictionKind, CategoricalFeatures, Args.CategoricalSplit); - if (TestData != null) - TestSets = new[] { instanceConverter.GetCompatibleDataset(TestData, PredictionKind, CategoricalFeatures, Args.CategoricalSplit) }; } private bool UseTranspose(bool? useTranspose, RoleMappedData data) @@ -1003,6 +989,22 @@ public static DataConverter Create(RoleMappedData data, IHost host, Double[][] b return conv; } + protected void GetFeatureNames(RoleMappedData data, ref VBuffer> names) + { + // The existing implementations will have verified this by the time this utility + // function is called. + Host.AssertValue(data); + var feat = data.Schema.Feature; + Host.AssertValue(feat); + Host.Assert(feat.Type.ValueCount > 0); + + var sch = data.Schema.Schema; + if (sch.HasSlotNames(feat.Index, feat.Type.ValueCount)) + sch.GetMetadata(MetadataUtils.Kinds.SlotNames, feat.Index, ref names); + else + names = new VBuffer>(feat.Type.ValueCount, 0, names.Values, names.Indices); + } + #if !CORECLR protected void GetFeatureIniContent(RoleMappedData data, ref VBuffer> content) { @@ -1341,18 +1343,20 @@ private ValueMapper, VBuffer> GetCopier(ColumnType itemT return (in VBuffer src, ref VBuffer dst) => { - var srcValues = src.GetValues(); - var editor = VBufferEditor.Create(ref dst, src.Length, srcValues.Length); - if (srcValues.Length > 0) + var indices = dst.Indices; + var values = dst.Values; + if (src.Count > 0) { if (!src.IsDense) { - src.GetIndices().CopyTo(editor.Indices); + Utils.EnsureSize(ref indices, src.Count); + Array.Copy(src.Indices, indices, src.Count); } - for (int i = 0; i < srcValues.Length; ++i) - conv(in srcValues[i], ref editor.Values[i]); + Utils.EnsureSize(ref values, src.Count); + for (int i = 0; i < src.Count; ++i) + conv(in src.Values[i], ref values[i]); } - dst = editor.Commit(); + dst = new VBuffer(src.Length, src.Count, values, indices); }; } @@ -1388,7 +1392,7 @@ private Dataset Construct(RoleMappedData examples, ref int numExamples, int maxB } // Convert the group column, if one exists. if (examples.Schema.Group != null) - data = new TypeConvertingTransformer(Host, new TypeConvertingTransformer.ColumnInfo(examples.Schema.Group.Name, examples.Schema.Group.Name, DataKind.U8)).Transform(data); + data = new ConvertingTransform(Host, new ConvertingTransform.ColumnInfo(examples.Schema.Group.Name, examples.Schema.Group.Name, DataKind.U8)).Transform(data); // Since we've passed it through a few transforms, reconstitute the mapping on the // newly transformed data. @@ -1844,7 +1848,7 @@ private void MakeBoundariesAndCheckLabels(out long missingInstances, out long to ch.Info("Changing data from row-wise to column-wise"); long pos = 0; - double rowCountDbl = (double?)_data.Data.GetRowCount() ?? Double.NaN; + double rowCountDbl = (double?)_data.Data.GetRowCount(lazy: true) ?? Double.NaN; pch.SetHeader(new ProgressHeader("examples"), e => e.SetProgress(0, pos, rowCountDbl)); // REVIEW: Should we ignore rows with bad label, weight, or group? The previous code seemed to let @@ -2534,7 +2538,8 @@ public IEnumerable AllIndicesGT(int lim, Double gtValue) public void CopyTo(int length, ref VBuffer dst) { Contracts.Assert(0 <= length); - VBufferEditor editor; + int[] indices = dst.Indices; + Double[] values = dst.Values; if (!_isSparse) { Contracts.Assert(_dense.Count <= length); @@ -2542,28 +2547,29 @@ public void CopyTo(int length, ref VBuffer dst) Sparsify(); else { - editor = VBufferEditor.Create(ref dst, length); + Utils.EnsureSize(ref values, length, keepOld: false); if (_dense.Count < length) { - _dense.CopyTo(editor.Values); - editor.Values.Slice(_dense.Count, length - _dense.Count).Clear(); + _dense.CopyTo(values, 0); + Array.Clear(values, _dense.Count, length - _dense.Count); } else - _dense.CopyTo(editor.Values, length); - dst = editor.Commit(); + _dense.CopyTo(0, values, 0, length); + dst = new VBuffer(length, values, indices); return; } } int count = _sparse.Count; Contracts.Assert(count <= length); - editor = VBufferEditor.Create(ref dst, length, count); + Utils.EnsureSize(ref indices, count); + Utils.EnsureSize(ref values, count); for (int i = 0; i < _sparse.Count; ++i) { - editor.Indices[i] = _sparse[i].Key; - editor.Values[i] = _sparse[i].Value; + indices[i] = _sparse[i].Key; + values[i] = _sparse[i].Value; } - Contracts.Assert(Utils.IsIncreasing(0, editor.Indices, count, length)); - dst = editor.Commit(); + Contracts.Assert(Utils.IsIncreasing(0, indices, count, length)); + dst = new VBuffer(length, count, values, indices); } /// @@ -2812,7 +2818,7 @@ public abstract class FastTreePredictionWrapper : { //The below two properties are necessary for tree Visualizer public TreeEnsemble TrainedEnsemble { get; } - int ITreeEnsemble.NumTrees => TrainedEnsemble.NumTrees; + public int NumTrees => TrainedEnsemble.NumTrees; // Inner args is used only for documentation purposes when saving comments to INI files. protected readonly string InnerArgs; @@ -2832,8 +2838,8 @@ public abstract class FastTreePredictionWrapper : public ColumnType InputType { get; } public ColumnType OutputType => NumberType.Float; - bool ICanSavePfa.CanSavePfa => true; - bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => true; + public bool CanSavePfa => true; + public bool CanSaveOnnx(OnnxContext ctx) => true; protected FastTreePredictionWrapper(IHostEnvironment env, string name, TreeEnsemble trainedEnsemble, int numFeatures, string innerArgs) : base(env, name) @@ -3013,7 +3019,7 @@ private string AddCalibrationToIni(string ini, ICalibrator calibrator) } } - JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) + public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckValue(input, nameof(input)); @@ -3062,7 +3068,7 @@ private enum AggregateFunction Max } - bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumn) + public virtual bool SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumn) { Host.CheckValue(ctx, nameof(ctx)); @@ -3252,7 +3258,7 @@ public void GetFeatureWeights(ref VBuffer weights) // If there are no trees or no splits, there are no gains. if (gainMap.Count == 0) { - VBufferUtils.Resize(ref weights, numFeatures, 0); + weights = new VBuffer(numFeatures, 0, weights.Values, weights.Indices); return; } @@ -3282,7 +3288,7 @@ private static int FindMaxFeatureIndex(TreeEnsemble ensemble) return ifeatMax; } - ITree[] ITreeEnsemble.GetTrees() + public ITree[] GetTrees() { return TrainedEnsemble.Trees.Select(k => new Tree(k)).ToArray(); } @@ -3386,12 +3392,14 @@ public double GetLeafValue(int leafId) private sealed class TreeNode : INode { + private readonly Dictionary _keyValues; + public TreeNode(Dictionary keyValues) { - KeyValues = keyValues; + _keyValues = keyValues; } - public Dictionary KeyValues { get; } + public Dictionary KeyValues { get { return _keyValues; } } } } } diff --git a/src/Microsoft.ML.FastTree/FastTreeArguments.cs b/src/Microsoft.ML.FastTree/FastTreeArguments.cs index f68108d2e8..989ee2171d 100644 --- a/src/Microsoft.ML.FastTree/FastTreeArguments.cs +++ b/src/Microsoft.ML.FastTree/FastTreeArguments.cs @@ -17,7 +17,7 @@ namespace Microsoft.ML.Trainers.FastTree { [TlcModule.ComponentKind("FastTreeTrainer")] - internal interface IFastTreeTrainerFactory : IComponentFactory + public interface IFastTreeTrainerFactory : IComponentFactory { } @@ -31,7 +31,7 @@ public sealed class Arguments : BoostedTreeArgs, IFastTreeTrainerFactory [TGUI(Label = "Optimize for unbalanced")] public bool UnbalancedSets = false; - ITrainer IComponentFactory.CreateComponent(IHostEnvironment env) => new FastTreeBinaryClassificationTrainer(env, this); + public ITrainer CreateComponent(IHostEnvironment env) => new FastTreeBinaryClassificationTrainer(env, this); } } @@ -45,7 +45,7 @@ public Arguments() EarlyStoppingMetrics = 1; // Use L1 by default. } - ITrainer IComponentFactory.CreateComponent(IHostEnvironment env) => new FastTreeRegressionTrainer(env, this); + public ITrainer CreateComponent(IHostEnvironment env) => new FastTreeRegressionTrainer(env, this); } } @@ -62,7 +62,7 @@ public sealed class Arguments : BoostedTreeArgs, IFastTreeTrainerFactory "and intermediate values are compound Poisson loss.")] public Double Index = 1.5; - ITrainer IComponentFactory.CreateComponent(IHostEnvironment env) => new FastTreeTweedieTrainer(env, this); + public ITrainer CreateComponent(IHostEnvironment env) => new FastTreeTweedieTrainer(env, this); } } @@ -111,7 +111,7 @@ public Arguments() EarlyStoppingMetrics = 1; } - ITrainer IComponentFactory.CreateComponent(IHostEnvironment env) => new FastTreeRankingTrainer(env, this); + public ITrainer CreateComponent(IHostEnvironment env) => new FastTreeRankingTrainer(env, this); internal override void Check(IExceptionContext ectx) { @@ -143,7 +143,7 @@ internal static class Defaults { internal const int NumTrees = 100; internal const int NumLeaves = 20; - internal const int MinDocumentsInLeaves = 10; + internal const int MinDocumentsInLeafs = 10; internal const double LearningRates = 0.2; } @@ -245,7 +245,7 @@ public abstract class TreeArgs : LearnerInputBaseWithGroupId [Argument(ArgumentType.LastOccurenceWins, HelpText = "The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data", ShortName = "mil", SortOrder = 3)] [TGUI(Description = "Minimum number of training instances required to form a leaf", SuggestedSweeps = "1,10,50")] [TlcModule.SweepableDiscreteParamAttribute("MinDocumentsInLeafs", new object[] { 1, 10, 50 })] - public int MinDocumentsInLeafs = Defaults.MinDocumentsInLeaves; + public int MinDocumentsInLeafs = Defaults.MinDocumentsInLeafs; // REVIEW: Different shortname than FastRank module. Same as the TLC FRWrapper. [Argument(ArgumentType.LastOccurenceWins, HelpText = "Total number of decision trees to create in the ensemble", ShortName = "iter", SortOrder = 1)] diff --git a/src/Microsoft.ML.FastTree/FastTreeClassification.cs b/src/Microsoft.ML.FastTree/FastTreeClassification.cs index 433cafa908..da406e80ab 100644 --- a/src/Microsoft.ML.FastTree/FastTreeClassification.cs +++ b/src/Microsoft.ML.FastTree/FastTreeClassification.cs @@ -123,20 +123,20 @@ public sealed partial class FastTreeBinaryClassificationTrainer : /// The name of the feature column. /// The name for the column containing the initial weight. /// The learning rate. - /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. /// The max number of leaves in each regression tree. /// Total number of decision trees to create in the ensemble. /// A delegate to apply all the advanced arguments to the algorithm. public FastTreeBinaryClassificationTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string labelColumn, + string featureColumn, string weightColumn = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, Action advancedSettings = null) - : base(env, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings) + : base(env, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDocumentsInLeafs, learningRate, advancedSettings) { // Set the sigmoid parameter to the 2 * learning rate, for traditional FastTreeClassification loss _sigmoidParameter = 2.0 * Args.LearningRates; @@ -154,12 +154,11 @@ internal FastTreeBinaryClassificationTrainer(IHostEnvironment env, Arguments arg public override PredictionKind PredictionKind => PredictionKind.BinaryClassification; - private protected override IPredictorWithFeatureWeights TrainModelCore(TrainContext context) + protected override IPredictorWithFeatureWeights TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var trainData = context.TrainingSet; ValidData = context.ValidationSet; - TestData = context.TestSet; using (var ch = Host.Start("Training")) { diff --git a/src/Microsoft.ML.FastTree/FastTreeRanking.cs b/src/Microsoft.ML.FastTree/FastTreeRanking.cs index 2663c9df51..21b21edce2 100644 --- a/src/Microsoft.ML.FastTree/FastTreeRanking.cs +++ b/src/Microsoft.ML.FastTree/FastTreeRanking.cs @@ -42,7 +42,8 @@ namespace Microsoft.ML.Trainers.FastTree { /// public sealed partial class FastTreeRankingTrainer - : BoostingFastTreeTrainerBase, FastTreeRankingPredictor> + : BoostingFastTreeTrainerBase, FastTreeRankingPredictor>, + IHasLabelGains { internal const string LoadNameValue = "FastTreeRanking"; internal const string UserNameValue = "FastTree (Boosted Trees) Ranking"; @@ -68,20 +69,20 @@ public sealed partial class FastTreeRankingTrainer /// The name for the column containing the initial weight. /// The max number of leaves in each regression tree. /// Total number of decision trees to create in the ensemble. - /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. /// The learning rate. /// A delegate to apply all the advanced arguments to the algorithm. public FastTreeRankingTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string groupIdColumn = DefaultColumnNames.GroupId, + string labelColumn, + string featureColumn, + string groupIdColumn, string weightColumn = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, Action advancedSettings = null) - : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, groupIdColumn, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings) + : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, groupIdColumn, numLeaves, numTrees, minDocumentsInLeafs, learningRate, advancedSettings) { Host.CheckNonEmpty(groupIdColumn, nameof(groupIdColumn)); } @@ -99,12 +100,11 @@ protected override float GetMaxLabel() return GetLabelGains().Length - 1; } - private protected override FastTreeRankingPredictor TrainModelCore(TrainContext context) + protected override FastTreeRankingPredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var trainData = context.TrainingSet; ValidData = context.ValidationSet; - TestData = context.TestSet; using (var ch = Host.Start("Training")) { @@ -116,7 +116,7 @@ private protected override FastTreeRankingPredictor TrainModelCore(TrainContext return new FastTreeRankingPredictor(Host, TrainedEnsemble, FeatureCount, InnerArgs); } - private Double[] GetLabelGains() + public Double[] GetLabelGains() { try { diff --git a/src/Microsoft.ML.FastTree/FastTreeRegression.cs b/src/Microsoft.ML.FastTree/FastTreeRegression.cs index 133f9c2bd4..7b887da594 100644 --- a/src/Microsoft.ML.FastTree/FastTreeRegression.cs +++ b/src/Microsoft.ML.FastTree/FastTreeRegression.cs @@ -59,20 +59,20 @@ public sealed partial class FastTreeRegressionTrainer /// The name of the feature column. /// The name for the column containing the initial weight. /// The learning rate. - /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. /// The max number of leaves in each regression tree. /// Total number of decision trees to create in the ensemble. /// A delegate to apply all the advanced arguments to the algorithm. public FastTreeRegressionTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string labelColumn, + string featureColumn, string weightColumn = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, Action advancedSettings = null) - : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings) + : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDocumentsInLeafs, learningRate, advancedSettings) { } @@ -84,12 +84,11 @@ internal FastTreeRegressionTrainer(IHostEnvironment env, Arguments args) { } - private protected override FastTreeRegressionPredictor TrainModelCore(TrainContext context) + protected override FastTreeRegressionPredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var trainData = context.TrainingSet; ValidData = context.ValidationSet; - TestData = context.TestSet; using (var ch = Host.Start("Training")) { diff --git a/src/Microsoft.ML.FastTree/FastTreeTweedie.cs b/src/Microsoft.ML.FastTree/FastTreeTweedie.cs index f49798aa22..3e7850a547 100644 --- a/src/Microsoft.ML.FastTree/FastTreeTweedie.cs +++ b/src/Microsoft.ML.FastTree/FastTreeTweedie.cs @@ -56,20 +56,20 @@ public sealed partial class FastTreeTweedieTrainer /// The name of the feature column. /// The name for the column containing the initial weight. /// The learning rate. - /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. /// The max number of leaves in each regression tree. /// Total number of decision trees to create in the ensemble. /// A delegate to apply all the advanced arguments to the algorithm. public FastTreeTweedieTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string labelColumn, + string featureColumn, string weightColumn = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, Action advancedSettings = null) - : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings) + : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDocumentsInLeafs, learningRate, advancedSettings) { Host.CheckNonEmpty(labelColumn, nameof(labelColumn)); Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); @@ -86,12 +86,11 @@ internal FastTreeTweedieTrainer(IHostEnvironment env, Arguments args) Initialize(); } - private protected override FastTreeTweediePredictor TrainModelCore(TrainContext context) + protected override FastTreeTweediePredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var trainData = context.TrainingSet; ValidData = context.ValidationSet; - TestData = context.TestSet; using (var ch = Host.Start("Training")) { diff --git a/src/Microsoft.ML.FastTree/GamClassification.cs b/src/Microsoft.ML.FastTree/GamClassification.cs index f6965c7526..57c3f37eeb 100644 --- a/src/Microsoft.ML.FastTree/GamClassification.cs +++ b/src/Microsoft.ML.FastTree/GamClassification.cs @@ -62,19 +62,17 @@ internal BinaryClassificationGamTrainer(IHostEnvironment env, Arguments args) /// The name of the label column. /// The name of the feature column. /// The name for the column containing the initial weight. - /// The number of iterations to use in learning the features. - /// The learning rate. GAMs work best with a small learning rate. - /// The maximum number of bins to use to approximate features + /// The learning rate. + /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. /// A delegate to apply all the advanced arguments to the algorithm. public BinaryClassificationGamTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string labelColumn, + string featureColumn, string weightColumn = null, - int numIterations = GamDefaults.NumIterations, - double learningRate = GamDefaults.LearningRates, - int maxBins = GamDefaults.MaxBins, + int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, + double learningRate = Defaults.LearningRates, Action advancedSettings = null) - : base(env, LoadNameValue, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weightColumn, numIterations, learningRate, maxBins, advancedSettings) + : base(env, LoadNameValue, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weightColumn, minDocumentsInLeafs, learningRate, advancedSettings) { _sigmoidParameter = 1; } @@ -104,7 +102,7 @@ private static bool[] ConvertTargetsToBool(double[] targets) return boolArray; } - private protected override IPredictorProducing TrainModelCore(TrainContext context) + protected override IPredictorProducing TrainModelCore(TrainContext context) { TrainBase(context); var predictor = new BinaryClassGamPredictor(Host, InputLength, TrainSet, diff --git a/src/Microsoft.ML.FastTree/GamRegression.cs b/src/Microsoft.ML.FastTree/GamRegression.cs index 27ff31ca79..481a991a8e 100644 --- a/src/Microsoft.ML.FastTree/GamRegression.cs +++ b/src/Microsoft.ML.FastTree/GamRegression.cs @@ -51,19 +51,17 @@ internal RegressionGamTrainer(IHostEnvironment env, Arguments args) /// The name of the label column. /// The name of the feature column. /// The name for the column containing the initial weight. - /// The number of iterations to use in learning the features. - /// The learning rate. GAMs work best with a small learning rate. - /// The maximum number of bins to use to approximate features + /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. + /// The learning rate. /// A delegate to apply all the advanced arguments to the algorithm. public RegressionGamTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string labelColumn, + string featureColumn, string weightColumn = null, - int numIterations = GamDefaults.NumIterations, - double learningRate = GamDefaults.LearningRates, - int maxBins = GamDefaults.MaxBins, + int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, + double learningRate = Defaults.LearningRates, Action advancedSettings = null) - : base(env, LoadNameValue, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, numIterations, learningRate, maxBins, advancedSettings) + : base(env, LoadNameValue, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, minDocumentsInLeafs, learningRate, advancedSettings) { } @@ -72,7 +70,7 @@ internal override void CheckLabel(RoleMappedData data) data.CheckRegressionLabel(); } - private protected override RegressionGamPredictor TrainModelCore(TrainContext context) + protected override RegressionGamPredictor TrainModelCore(TrainContext context) { TrainBase(context); return new RegressionGamPredictor(Host, InputLength, TrainSet, MeanEffect, BinEffects, FeatureMap); diff --git a/src/Microsoft.ML.FastTree/GamTrainer.cs b/src/Microsoft.ML.FastTree/GamTrainer.cs index c0b7edeaca..94b6864a8b 100644 --- a/src/Microsoft.ML.FastTree/GamTrainer.cs +++ b/src/Microsoft.ML.FastTree/GamTrainer.cs @@ -54,7 +54,7 @@ public abstract class ArgumentsBase : LearnerInputBaseWithWeight [Argument(ArgumentType.LastOccurenceWins, HelpText = "Total number of iterations over all features", ShortName = "iter", SortOrder = 1)] [TGUI(SuggestedSweeps = "200,1500,9500")] [TlcModule.SweepableDiscreteParamAttribute("NumIterations", new object[] { 200, 1500, 9500 })] - public int NumIterations = GamDefaults.NumIterations; + public int NumIterations = 9500; [Argument(ArgumentType.LastOccurenceWins, HelpText = "The number of threads to use", ShortName = "t", NullName = "")] public int? NumThreads = null; @@ -62,13 +62,13 @@ public abstract class ArgumentsBase : LearnerInputBaseWithWeight [Argument(ArgumentType.LastOccurenceWins, HelpText = "The learning rate", ShortName = "lr", SortOrder = 4)] [TGUI(SuggestedSweeps = "0.001,0.1;log")] [TlcModule.SweepableFloatParamAttribute("LearningRates", 0.001f, 0.1f, isLogScale: true)] - public double LearningRates = GamDefaults.LearningRates; + public double LearningRates = 0.002; // Small learning rate. [Argument(ArgumentType.LastOccurenceWins, HelpText = "Whether to utilize the disk or the data's native transposition facilities (where applicable) when performing the transpose", ShortName = "dt")] public bool? DiskTranspose; [Argument(ArgumentType.LastOccurenceWins, HelpText = "Maximum number of distinct values (bins) per feature", ShortName = "mb")] - public int MaxBins = GamDefaults.MaxBins; + public int MaxBins = 255; // Save one for undefs. [Argument(ArgumentType.AtMostOnce, HelpText = "Upper bound on absolute value of single output", ShortName = "mo")] public double MaxOutput = Double.PositiveInfinity; @@ -137,16 +137,15 @@ private protected GamTrainerBase(IHostEnvironment env, SchemaShape.Column label, string featureColumn, string weightColumn, - int numIterations, + int minDocumentsInLeafs, double learningRate, - int maxBins, Action advancedSettings) : base(Contracts.CheckRef(env, nameof(env)).Register(name), TrainerUtils.MakeR4VecFeature(featureColumn), label, TrainerUtils.MakeR4ScalarWeightColumn(weightColumn)) { Args = new TArgs(); - Args.NumIterations = numIterations; + + Args.MinDocuments = minDocumentsInLeafs; Args.LearningRates = learningRate; - Args.MaxBins = maxBins; //apply the advanced args, if the user supplied any advancedSettings?.Invoke(Args); @@ -188,7 +187,7 @@ private protected GamTrainerBase(IHostEnvironment env, TArgs args, string name, InitializeThreads(); } - private protected void TrainBase(TrainContext context) + protected void TrainBase(TrainContext context) { using (var ch = Host.Start("Training")) { @@ -982,7 +981,7 @@ public void SaveSummary(TextWriter writer, RoleMappedSchema schema) /// , it is convenient to have the command itself nested within the base /// predictor class. /// - internal sealed class VisualizationCommand : DataCommand.ImplBase + public sealed class VisualizationCommand : DataCommand.ImplBase { public const string Summary = "Loads a model trained with a GAM learner, and starts an interactive web session to visualize it."; public const string LoadName = "GamVisualization"; @@ -1424,11 +1423,4 @@ public static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnvironm () => LearnerEntryPointsUtils.FindColumn(host, input.TrainingData.Schema, input.WeightColumn)); } } - - internal static class GamDefaults - { - internal const int NumIterations = 9500; - internal const int MaxBins = 255; - internal const double LearningRates = 0.002; // A small value - } } diff --git a/src/Microsoft.ML.FastTree/Properties/AssemblyInfo.cs b/src/Microsoft.ML.FastTree/Properties/AssemblyInfo.cs deleted file mode 100644 index a03d7bdab6..0000000000 --- a/src/Microsoft.ML.FastTree/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Runtime.CompilerServices; -using Microsoft.ML; - -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Core.Tests" + PublicKey.TestValue)] - -[assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.FastTree/RandomForest.cs b/src/Microsoft.ML.FastTree/RandomForest.cs index ab91a02e21..f29383473c 100644 --- a/src/Microsoft.ML.FastTree/RandomForest.cs +++ b/src/Microsoft.ML.FastTree/RandomForest.cs @@ -35,11 +35,11 @@ protected RandomForestTrainerBase(IHostEnvironment env, string groupIdColumn, int numLeaves, int numTrees, - int minDatapointsInLeaves, + int minDocumentsInLeafs, double learningRate, Action advancedSettings, bool quantileEnabled = false) - : base(env, label, featureColumn, weightColumn, null, numLeaves, numTrees, minDatapointsInLeaves, advancedSettings) + : base(env, label, featureColumn, weightColumn, null, numLeaves, numTrees, minDocumentsInLeafs, advancedSettings) { _quantileEnabled = quantileEnabled; } diff --git a/src/Microsoft.ML.FastTree/RandomForestClassification.cs b/src/Microsoft.ML.FastTree/RandomForestClassification.cs index a7aedc692a..ad4f82b0c6 100644 --- a/src/Microsoft.ML.FastTree/RandomForestClassification.cs +++ b/src/Microsoft.ML.FastTree/RandomForestClassification.cs @@ -142,19 +142,19 @@ public sealed class Arguments : FastForestArgumentsBase /// The name for the column containing the initial weight. /// The max number of leaves in each regression tree. /// Total number of decision trees to create in the ensemble. - /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. /// The learning rate. /// A delegate to apply all the advanced arguments to the algorithm. public FastForestClassification(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string labelColumn, + string featureColumn, string weightColumn = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, Action advancedSettings = null) - : base(env, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings) + : base(env, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDocumentsInLeafs, learningRate, advancedSettings) { Host.CheckNonEmpty(labelColumn, nameof(labelColumn)); Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); @@ -168,12 +168,11 @@ public FastForestClassification(IHostEnvironment env, Arguments args) { } - private protected override IPredictorWithFeatureWeights TrainModelCore(TrainContext context) + protected override IPredictorWithFeatureWeights TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var trainData = context.TrainingSet; ValidData = context.ValidationSet; - TestData = context.TestSet; using (var ch = Host.Start("Training")) { diff --git a/src/Microsoft.ML.FastTree/RandomForestRegression.cs b/src/Microsoft.ML.FastTree/RandomForestRegression.cs index 9817cc032b..99eabbc562 100644 --- a/src/Microsoft.ML.FastTree/RandomForestRegression.cs +++ b/src/Microsoft.ML.FastTree/RandomForestRegression.cs @@ -120,10 +120,12 @@ public ValueMapper, VBuffer> GetMapper(float[] quantiles) var distribution = TrainedEnsemble.GetDistribution(in src, _quantileSampleCount, out weights); var qdist = new QuantileStatistics(distribution, weights); - var editor = VBufferEditor.Create(ref dst, quantiles.Length); + var values = dst.Values; + if (Utils.Size(values) < quantiles.Length) + values = new float[quantiles.Length]; for (int i = 0; i < quantiles.Length; i++) - editor.Values[i] = qdist.GetQuantile((float)quantiles[i]); - dst = editor.Commit(); + values[i] = qdist.GetQuantile((float)quantiles[i]); + dst = new VBuffer(quantiles.Length, values, dst.Indices); }; } @@ -158,22 +160,22 @@ public sealed class Arguments : FastForestArgumentsBase /// The private instance of . /// The name of the label column. /// The name of the feature column. - /// The optional name for the column containing the initial weight. + /// The name for the column containing the initial weight. + /// The learning rate. + /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. /// The max number of leaves in each regression tree. /// Total number of decision trees to create in the ensemble. - /// The minimal number of documents allowed in a leaf of a regression tree, out of the subsampled data. - /// The learning rate. /// A delegate to apply all the advanced arguments to the algorithm. public FastForestRegression(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string labelColumn, + string featureColumn, string weightColumn = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDocumentsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, Action advancedSettings = null) - : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings) + : base(env, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, numTrees, minDocumentsInLeafs, learningRate, advancedSettings) { Host.CheckNonEmpty(labelColumn, nameof(labelColumn)); Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); @@ -187,12 +189,11 @@ public FastForestRegression(IHostEnvironment env, Arguments args) { } - private protected override FastForestRegressionPredictor TrainModelCore(TrainContext context) + protected override FastForestRegressionPredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var trainData = context.TrainingSet; ValidData = context.ValidationSet; - TestData = context.TestSet; using (var ch = Host.Start("Training")) { diff --git a/src/Microsoft.ML.FastTree/SumupPerformanceCommand.cs b/src/Microsoft.ML.FastTree/SumupPerformanceCommand.cs index 14fcad759e..4d02097941 100644 --- a/src/Microsoft.ML.FastTree/SumupPerformanceCommand.cs +++ b/src/Microsoft.ML.FastTree/SumupPerformanceCommand.cs @@ -29,7 +29,7 @@ namespace Microsoft.ML.Trainers.FastTree /// /// This is an internal utility command to measure the performance of the IntArray sumup operation. /// - internal sealed class SumupPerformanceCommand : ICommand + public sealed class SumupPerformanceCommand : ICommand { public sealed class Arguments { diff --git a/src/Microsoft.ML.FastTree/TreeEnsemble/RegressionTree.cs b/src/Microsoft.ML.FastTree/TreeEnsemble/RegressionTree.cs index 834a4188f1..05d809f8b4 100644 --- a/src/Microsoft.ML.FastTree/TreeEnsemble/RegressionTree.cs +++ b/src/Microsoft.ML.FastTree/TreeEnsemble/RegressionTree.cs @@ -762,7 +762,7 @@ public int GetLeaf(in VBuffer feat) { // REVIEW: This really should validate feat.Length! if (feat.IsDense) - return GetLeafCore(feat.GetValues()); + return GetLeafCore(feat.Values); return GetLeafCore(feat.GetIndices(), feat.GetValues()); } @@ -778,7 +778,7 @@ private int GetLeafFrom(in VBuffer feat, int root) } if (feat.IsDense) - return GetLeafCore(feat.GetValues(), root: root); + return GetLeafCore(feat.Values, root: root); return GetLeafCore(feat.GetIndices(), feat.GetValues(), root: root); } @@ -796,7 +796,7 @@ public int GetLeaf(in VBuffer feat, ref List path) path.Clear(); if (feat.IsDense) - return GetLeafCore(feat.GetValues(), path); + return GetLeafCore(feat.Values, path); return GetLeafCore(feat.GetIndices(), feat.GetValues(), path); } @@ -816,8 +816,9 @@ private Float GetFeatureValue(Float x, int node) } } - private int GetLeafCore(ReadOnlySpan nonBinnedInstance, List path = null, int root = 0) + private int GetLeafCore(Float[] nonBinnedInstance, List path = null, int root = 0) { + Contracts.AssertValue(nonBinnedInstance); Contracts.Assert(path == null || path.Count == 0); Contracts.Assert(root >= 0); diff --git a/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizer.cs b/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizer.cs index 648b8f7ef5..f2821ed611 100644 --- a/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizer.cs +++ b/src/Microsoft.ML.FastTree/TreeEnsembleFeaturizer.cs @@ -11,7 +11,6 @@ using Microsoft.ML.Runtime.Internal.Calibration; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Model; -using Microsoft.ML.Runtime.TreePredictor; using Microsoft.ML.Transforms; using System; using System.Collections.Generic; @@ -192,7 +191,7 @@ public BoundMapper(IExceptionContext ectx, TreeEnsembleFeaturizerBindableMapper InputRoleMappedSchema = schema; // A vector containing the output of each tree on a given example. - var treeValueType = new VectorType(NumberType.Float, _owner._ensemble.TrainedEnsemble.NumTrees); + var treeValueType = new VectorType(NumberType.Float, _owner._ensemble.NumTrees); // An indicator vector with length = the total number of leaves in the ensemble, indicating which leaf the example // ends up in all the trees in the ensemble. var leafIdType = new VectorType(NumberType.Float, _owner._totalLeafCount); @@ -203,7 +202,7 @@ public BoundMapper(IExceptionContext ectx, TreeEnsembleFeaturizerBindableMapper // plus one (since the root node is not a child of any node). So we have #internal + #leaf = 2*(#internal) + 1, // which means that #internal = #leaf - 1. // Therefore, the number of internal nodes in the ensemble is #leaf - #trees. - var pathIdType = new VectorType(NumberType.Float, _owner._totalLeafCount - _owner._ensemble.TrainedEnsemble.NumTrees); + var pathIdType = new VectorType(NumberType.Float, _owner._totalLeafCount - _owner._ensemble.NumTrees); Schema = Schema.Create(new SchemaImpl(ectx, owner, treeValueType, leafIdType, pathIdType)); } @@ -281,10 +280,10 @@ public State(IExceptionContext ectx, IRow input, FastTreePredictionWrapper ensem _ectx = ectx; _ectx.AssertValue(input); _ectx.AssertValue(ensemble); - _ectx.Assert(ensemble.TrainedEnsemble.NumTrees > 0); + _ectx.Assert(ensemble.NumTrees > 0); _input = input; _ensemble = ensemble; - _numTrees = _ensemble.TrainedEnsemble.NumTrees; + _numTrees = _ensemble.NumTrees; _numLeaves = numLeaves; _src = default(VBuffer); @@ -303,11 +302,14 @@ public State(IExceptionContext ectx, IRow input, FastTreePredictionWrapper ensem public void GetTreeValues(ref VBuffer dst) { EnsureCachedPosition(); - var editor = VBufferEditor.Create(ref dst, _numTrees); + var vals = dst.Values; + if (Utils.Size(vals) < _numTrees) + vals = new float[_numTrees]; + for (int i = 0; i < _numTrees; i++) - editor.Values[i] = _ensemble.GetLeafValue(i, _leafIds[i]); + vals[i] = _ensemble.GetLeafValue(i, _leafIds[i]); - dst = editor.Commit(); + dst = new VBuffer(_numTrees, vals, dst.Indices); } public void GetLeafIds(ref VBuffer dst) @@ -324,7 +326,7 @@ public void GetLeafIds(ref VBuffer dst) _leafIdBuilder.Reset(_numLeaves, false); var offset = 0; - var trees = ((ITreeEnsemble)_ensemble).GetTrees(); + var trees = _ensemble.GetTrees(); for (int i = 0; i < trees.Length; i++) { _leafIdBuilder.AddFeature(offset + _leafIds[i], 1); @@ -348,7 +350,7 @@ public void GetPathIds(ref VBuffer dst) if (_pathIdBuilder == null) _pathIdBuilder = BufferBuilder.CreateDefault(); - var trees = ((ITreeEnsemble)_ensemble).GetTrees(); + var trees = _ensemble.GetTrees(); _pathIdBuilder.Reset(_numLeaves - _numTrees, dense: false); var offset = 0; for (int i = 0; i < _numTrees; i++) @@ -469,7 +471,7 @@ private static int CountLeaves(FastTreePredictionWrapper ensemble) { Contracts.AssertValue(ensemble); - var trees = ((ITreeEnsemble)ensemble).GetTrees(); + var trees = ensemble.GetTrees(); var numTrees = trees.Length; var totalLeafCount = 0; for (int i = 0; i < numTrees; i++) @@ -479,50 +481,58 @@ private static int CountLeaves(FastTreePredictionWrapper ensemble) private void GetTreeSlotNames(int col, ref VBuffer> dst) { - var numTrees = _ensemble.TrainedEnsemble.NumTrees; + var numTrees = _ensemble.NumTrees; + + var names = dst.Values; + if (Utils.Size(names) < numTrees) + names = new ReadOnlyMemory[numTrees]; - var editor = VBufferEditor.Create(ref dst, numTrees); for (int t = 0; t < numTrees; t++) - editor.Values[t] = string.Format("Tree{0:000}", t).AsMemory(); + names[t] = string.Format("Tree{0:000}", t).AsMemory(); - dst = editor.Commit(); + dst = new VBuffer>(numTrees, names, dst.Indices); } private void GetLeafSlotNames(int col, ref VBuffer> dst) { - var numTrees = _ensemble.TrainedEnsemble.NumTrees; + var numTrees = _ensemble.NumTrees; + + var names = dst.Values; + if (Utils.Size(names) < _totalLeafCount) + names = new ReadOnlyMemory[_totalLeafCount]; - var editor = VBufferEditor.Create(ref dst, _totalLeafCount); int i = 0; int t = 0; - foreach (var tree in ((ITreeEnsemble)_ensemble).GetTrees()) + foreach (var tree in _ensemble.GetTrees()) { for (int l = 0; l < tree.NumLeaves; l++) - editor.Values[i++] = string.Format("Tree{0:000}Leaf{1:000}", t, l).AsMemory(); + names[i++] = string.Format("Tree{0:000}Leaf{1:000}", t, l).AsMemory(); t++; } _host.Assert(i == _totalLeafCount); - dst = editor.Commit(); + dst = new VBuffer>(_totalLeafCount, names, dst.Indices); } private void GetPathSlotNames(int col, ref VBuffer> dst) { - var numTrees = _ensemble.TrainedEnsemble.NumTrees; + var numTrees = _ensemble.NumTrees; var totalNodeCount = _totalLeafCount - numTrees; - var editor = VBufferEditor.Create(ref dst, totalNodeCount); + var names = dst.Values; + if (Utils.Size(names) < totalNodeCount) + names = new ReadOnlyMemory[totalNodeCount]; int i = 0; int t = 0; - foreach (var tree in ((ITreeEnsemble)_ensemble).GetTrees()) + foreach (var tree in _ensemble.GetTrees()) { var numLeaves = tree.NumLeaves; for (int l = 0; l < tree.NumLeaves - 1; l++) - editor.Values[i++] = string.Format("Tree{0:000}Node{1:000}", t, l).AsMemory(); + names[i++] = string.Format("Tree{0:000}Node{1:000}", t, l).AsMemory(); t++; } _host.Assert(i == totalNodeCount); - dst = editor.Commit(); + dst = new VBuffer>(totalNodeCount, names, dst.Indices); } public ISchemaBoundMapper Bind(IHostEnvironment env, RoleMappedSchema schema) @@ -536,11 +546,9 @@ public ISchemaBoundMapper Bind(IHostEnvironment env, RoleMappedSchema schema) } /// - [BestFriend] - internal static class TreeEnsembleFeaturizerTransform + public static class TreeEnsembleFeaturizerTransform { -#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. - public sealed class Arguments : TrainAndScoreTransformer.ArgumentsBase + public sealed class Arguments : TrainAndScoreTransform.ArgumentsBase { [Argument(ArgumentType.Multiple, HelpText = "Trainer to use", ShortName = "tr", NullName = "", SortOrder = 1, SignatureType = typeof(SignatureTreeEnsembleTrainer))] public IComponentFactory Trainer; @@ -577,7 +585,6 @@ public sealed class ArgumentsForEntryPoint : TransformInputBase [Argument(ArgumentType.Required, HelpText = "Trainer to use", SortOrder = 10, Visibility = ArgumentAttribute.VisibilityType.EntryPointsOnly)] public IPredictorModel PredictorModel; } -#pragma warning restore CS0649 internal const string TreeEnsembleSummary = "Trains a tree ensemble, or loads it from a file, then maps a numeric feature vector " + @@ -638,7 +645,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV ModelLoadContext.LoadModel(host, out predictor, rep, ModelFileUtils.DirPredictor); ch.Trace("Creating scorer"); - var data = TrainAndScoreTransformer.CreateDataFromArgs(ch, input, args); + var data = TrainAndScoreTransform.CreateDataFromArgs(ch, input, args); // Make sure that the given predictor has the correct number of input features. if (predictor is CalibratedPredictorBase) @@ -664,7 +671,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV ch.Trace("Creating TrainAndScoreTransform"); - var trainScoreArgs = new TrainAndScoreTransformer.Arguments(); + var trainScoreArgs = new TrainAndScoreTransform.Arguments(); args.CopyTo(trainScoreArgs); trainScoreArgs.Trainer = args.Trainer; @@ -675,7 +682,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV (e, predictor) => new TreeEnsembleFeaturizerBindableMapper(e, scorerArgs, predictor)); var labelInput = AppendLabelTransform(host, ch, input, trainScoreArgs.LabelColumn, args.LabelPermutationSeed); - var scoreXf = TrainAndScoreTransformer.Create(host, trainScoreArgs, labelInput, mapperFactory); + var scoreXf = TrainAndScoreTransform.Create(host, trainScoreArgs, labelInput, mapperFactory); if (input == labelInput) return scoreXf; @@ -793,9 +800,8 @@ private static IDataView AppendLabelTransform(IHostEnvironment env, IChannel ch, } } - internal static partial class TreeFeaturize + public static partial class TreeFeaturize { -#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. [TlcModule.EntryPoint(Name = "Transforms.TreeLeafFeaturizer", Desc = TreeEnsembleFeaturizerTransform.TreeEnsembleSummary, UserName = TreeEnsembleFeaturizerTransform.UserName, @@ -811,6 +817,5 @@ public static CommonOutputs.TransformOutput Featurizer(IHostEnvironment env, Tre var xf = TreeEnsembleFeaturizerTransform.CreateForEntryPoint(env, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } -#pragma warning restore CS0649 } } diff --git a/src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs b/src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs index bb6055053a..2d6d1c25ef 100644 --- a/src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs +++ b/src/Microsoft.ML.FastTree/TreeTrainersCatalog.cs @@ -10,7 +10,7 @@ namespace Microsoft.ML { /// - /// Tree extension methods. + /// FastTree extension methods. /// public static class TreeExtensions { @@ -18,214 +18,164 @@ public static class TreeExtensions /// Predict a target using a decision tree regression model trained with the . /// /// The . - /// The label column. - /// The feature column. + /// The label column. + /// The features column. /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of a regression tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. public static FastTreeRegressionTrainer FastTree(this RegressionContext.RegressionTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, string weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new FastTreeRegressionTrainer(env, labelColumn, featureColumn, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings); + return new FastTreeRegressionTrainer(env, label, features, weights, numLeaves, numTrees, minDatapointsInLeafs, learningRate, advancedSettings); } /// /// Predict a target using a decision tree binary classification model trained with the . /// /// The . - /// The labelColumn column. - /// The featureColumn column. + /// The label column. + /// The features column. /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. public static FastTreeBinaryClassificationTrainer FastTree(this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, string weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new FastTreeBinaryClassificationTrainer(env, labelColumn, featureColumn, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings); + return new FastTreeBinaryClassificationTrainer(env, label, features, weights, numLeaves, numTrees, minDatapointsInLeafs, learningRate, advancedSettings); } /// /// Ranks a series of inputs based on their relevance, training a decision tree ranking model through the . /// - /// The . - /// The labelColumn column. - /// The featureColumn column. + /// The . + /// The label column. + /// The features column. /// The groupId column. /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. public static FastTreeRankingTrainer FastTree(this RankingContext.RankingTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string label = DefaultColumnNames.Label, string groupId = DefaultColumnNames.GroupId, + string features = DefaultColumnNames.Features, string weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new FastTreeRankingTrainer(env, labelColumn, featureColumn, groupId, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings); + return new FastTreeRankingTrainer(env, label, features, groupId, weights, numLeaves, numTrees, minDatapointsInLeafs, learningRate, advancedSettings); } /// /// Predict a target using a decision tree regression model trained with the . /// - /// The . - /// The labelColumn column. - /// The featureColumn column. - /// The optional weights column. - /// The number of iterations to use in learning the features. - /// The learning rate. GAMs work best with a small learning rate. - /// The maximum number of bins to use to approximate features. - /// Algorithm advanced settings. - public static BinaryClassificationGamTrainer GeneralizedAdditiveModels(this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, - int numIterations = GamDefaults.NumIterations, - double learningRate = GamDefaults.LearningRates, - int maxBins = GamDefaults.MaxBins, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new BinaryClassificationGamTrainer(env, labelColumn, featureColumn, weights, numIterations, learningRate, maxBins, advancedSettings); - } - - /// - /// Predict a target using a decision tree binary classification model trained with the . - /// - /// The . - /// The labelColumn column. - /// The featureColumn column. - /// The optional weights column. - /// The number of iterations to use in learning the features. - /// The learning rate. GAMs work best with a small learning rate. - /// The maximum number of bins to use to approximate features. - /// Algorithm advanced settings. - public static RegressionGamTrainer GeneralizedAdditiveModels(this RegressionContext.RegressionTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, - int numIterations = GamDefaults.NumIterations, - double learningRate = GamDefaults.LearningRates, - int maxBins = GamDefaults.MaxBins, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new RegressionGamTrainer(env, labelColumn, featureColumn, weights, numIterations, learningRate, maxBins, advancedSettings); - } - - /// - /// Predict a target using a decision tree regression model trained with the . - /// /// The . - /// The labelColumn column. - /// The featureColumn column. + /// The label column. + /// The features column. /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. - public static FastTreeTweedieTrainer FastTreeTweedie(this RegressionContext.RegressionTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + public static BinaryClassificationGamTrainer GeneralizedAdditiveMethods(this RegressionContext.RegressionTrainers ctx, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, string weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, - Action advancedSettings = null) + Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new FastTreeTweedieTrainer(env, labelColumn, featureColumn, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings); + return new BinaryClassificationGamTrainer(env, label, features, weights, minDatapointsInLeafs, learningRate, advancedSettings); } /// - /// Predict a target using a decision tree regression model trained with the . + /// Predict a target using a decision tree binary classification model trained with the . /// - /// The . - /// The labelColumn column. - /// The featureColumn column. + /// The . + /// The label column. + /// The features column. /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. - public static FastForestRegression FastForest(this RegressionContext.RegressionTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + public static RegressionGamTrainer GeneralizedAdditiveMethods(this BinaryClassificationContext.BinaryClassificationTrainers ctx, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, string weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, - Action advancedSettings = null) + Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new FastForestRegression(env, labelColumn, featureColumn, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings); + return new RegressionGamTrainer(env, label, features, weights, minDatapointsInLeafs, learningRate, advancedSettings); } /// - /// Predict a target using a decision tree regression model trained with the . + /// Predict a target using a decision tree regression model trained with the . /// - /// The . - /// The labelColumn column. - /// The featureColumn column. + /// The . + /// The label column. + /// The features column. /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. - public static FastForestClassification FastForest(this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + public static FastTreeTweedieTrainer FastTreeTweedie(this RegressionContext.RegressionTrainers ctx, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, string weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, - Action advancedSettings = null) + Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new FastForestClassification(env, labelColumn, featureColumn, weights,numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings); + return new FastTreeTweedieTrainer(env, label, features, weights, numLeaves, numTrees, minDatapointsInLeafs, learningRate, advancedSettings); } } } diff --git a/src/Microsoft.ML.FastTree/TreeTrainersStatic.cs b/src/Microsoft.ML.FastTree/TreeTrainersStatic.cs index 176f0cead8..b919957303 100644 --- a/src/Microsoft.ML.FastTree/TreeTrainersStatic.cs +++ b/src/Microsoft.ML.FastTree/TreeTrainersStatic.cs @@ -26,7 +26,7 @@ public static class TreeRegressionExtensions /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of a regression tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. /// A delegate that is called every time the @@ -38,25 +38,25 @@ public static class TreeRegressionExtensions /// /// /// /// public static Scalar FastTree(this RegressionContext.RegressionTrainers ctx, Scalar label, Vector features, Scalar weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, Action advancedSettings = null, Action onFit = null) { - CheckUserValues(label, features, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings, onFit); + CheckUserValues(label, features, weights, numLeaves, numTrees, minDatapointsInLeafs, learningRate, advancedSettings, onFit); var rec = new TrainerEstimatorReconciler.Regression( (env, labelName, featuresName, weightsName) => { var trainer = new FastTreeRegressionTrainer(env, labelName, featuresName, weightsName, numLeaves, - numTrees, minDatapointsInLeaves, learningRate, advancedSettings); + numTrees, minDatapointsInLeafs, learningRate, advancedSettings); if (onFit != null) return trainer.WithOnFitDelegate(trans => onFit(trans.Model)); return trainer; @@ -75,7 +75,7 @@ public static Scalar FastTree(this RegressionContext.RegressionTrainers c /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of the tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. /// A delegate that is called every time the @@ -88,25 +88,25 @@ public static Scalar FastTree(this RegressionContext.RegressionTrainers c /// /// /// /// public static (Scalar score, Scalar probability, Scalar predictedLabel) FastTree(this BinaryClassificationContext.BinaryClassificationTrainers ctx, Scalar label, Vector features, Scalar weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, Action advancedSettings = null, Action> onFit = null) { - CheckUserValues(label, features, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings, onFit); + CheckUserValues(label, features, weights, numLeaves, numTrees, minDatapointsInLeafs, learningRate, advancedSettings, onFit); var rec = new TrainerEstimatorReconciler.BinaryClassifier( (env, labelName, featuresName, weightsName) => { var trainer = new FastTreeBinaryClassificationTrainer(env, labelName, featuresName, weightsName, numLeaves, - numTrees, minDatapointsInLeaves, learningRate, advancedSettings); + numTrees, minDatapointsInLeafs, learningRate, advancedSettings); if (onFit != null) return trainer.WithOnFitDelegate(trans => onFit(trans.Model)); @@ -128,7 +128,7 @@ public static (Scalar score, Scalar probability, Scalar pred /// The optional weights column. /// Total number of decision trees to create in the ensemble. /// The maximum number of leaves per decision tree. - /// The minimal number of datapoints allowed in a leaf of a regression tree, out of the subsampled data. + /// The minimal number of datapoints allowed in a leaf of a regression tree, out of the subsampled data. /// The learning rate. /// Algorithm advanced settings. /// A delegate that is called every time the @@ -141,18 +141,18 @@ public static Scalar FastTree(this RankingContext.RankingTrainers c Scalar label, Vector features, Key groupId, Scalar weights = null, int numLeaves = Defaults.NumLeaves, int numTrees = Defaults.NumTrees, - int minDatapointsInLeaves = Defaults.MinDocumentsInLeaves, + int minDatapointsInLeafs = Defaults.MinDocumentsInLeafs, double learningRate = Defaults.LearningRates, Action advancedSettings = null, Action onFit = null) { - CheckUserValues(label, features, weights, numLeaves, numTrees, minDatapointsInLeaves, learningRate, advancedSettings, onFit); + CheckUserValues(label, features, weights, numLeaves, numTrees, minDatapointsInLeafs, learningRate, advancedSettings, onFit); var rec = new TrainerEstimatorReconciler.Ranker( (env, labelName, featuresName, groupIdName, weightsName) => { var trainer = new FastTreeRankingTrainer(env, labelName, featuresName, groupIdName, weightsName, numLeaves, - numTrees, minDatapointsInLeaves, learningRate, advancedSettings); + numTrees, minDatapointsInLeafs, learningRate, advancedSettings); if (onFit != null) return trainer.WithOnFitDelegate(trans => onFit(trans.Model)); return trainer; @@ -164,7 +164,7 @@ public static Scalar FastTree(this RankingContext.RankingTrainers c internal static void CheckUserValues(PipelineColumn label, Vector features, Scalar weights, int numLeaves, int numTrees, - int minDatapointsInLeaves, + int minDatapointsInLeafs, double learningRate, Delegate advancedSettings, Delegate onFit) @@ -174,7 +174,7 @@ internal static void CheckUserValues(PipelineColumn label, Vector feature Contracts.CheckValueOrNull(weights); Contracts.CheckParam(numLeaves >= 2, nameof(numLeaves), "Must be at least 2."); Contracts.CheckParam(numTrees > 0, nameof(numTrees), "Must be positive"); - Contracts.CheckParam(minDatapointsInLeaves > 0, nameof(minDatapointsInLeaves), "Must be positive"); + Contracts.CheckParam(minDatapointsInLeafs > 0, nameof(minDatapointsInLeafs), "Must be positive"); Contracts.CheckParam(learningRate > 0, nameof(learningRate), "Must be positive"); Contracts.CheckValueOrNull(advancedSettings); Contracts.CheckValueOrNull(onFit); diff --git a/src/Microsoft.ML.HalLearners/ComputeLRTrainingStdThroughHal.cs b/src/Microsoft.ML.HalLearners/ComputeLRTrainingStdThroughHal.cs deleted file mode 100644 index 66868c1c9a..0000000000 --- a/src/Microsoft.ML.HalLearners/ComputeLRTrainingStdThroughHal.cs +++ /dev/null @@ -1,92 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; -using Microsoft.ML.Runtime.Internal.Utilities; -using Microsoft.ML.Trainers.HalLearners; -using System; - -namespace Microsoft.ML.Runtime.Learners -{ - using Mkl = OlsLinearRegressionTrainer.Mkl; - - public sealed class ComputeLRTrainingStdThroughHal : ComputeLRTrainingStd - { - /// - /// Computes the standart deviation matrix of each of the non-zero training weights, needed to calculate further the standart deviation, - /// p-value and z-Score. - /// If you need faster calculations, use the ComputeStd method from the Microsoft.ML.HALLearners package, which makes use of hardware acceleration. - /// Due to the existence of regularization, an approximation is used to compute the variances of the trained linear coefficients. - /// - /// - /// - /// - /// - /// The used for messaging. - /// The L2Weight used for training. (Supply the same one that got used during training.) - public override VBuffer ComputeStd(double[] hessian, int[] weightIndices, int numSelectedParams, int currentWeightsCount, IChannel ch, float l2Weight) - { - Contracts.AssertValue(ch); - Contracts.AssertValue(hessian, nameof(hessian)); - Contracts.Assert(numSelectedParams > 0); - Contracts.Assert(currentWeightsCount > 0); - Contracts.Assert(l2Weight > 0); - - // Apply Cholesky Decomposition to find the inverse of the Hessian. - Double[] invHessian = null; - try - { - // First, find the Cholesky decomposition LL' of the Hessian. - Mkl.Pptrf(Mkl.Layout.RowMajor, Mkl.UpLo.Lo, numSelectedParams, hessian); - // Note that hessian is already modified at this point. It is no longer the original Hessian, - // but instead represents the Cholesky decomposition L. - // Also note that the following routine is supposed to consume the Cholesky decomposition L instead - // of the original information matrix. - Mkl.Pptri(Mkl.Layout.RowMajor, Mkl.UpLo.Lo, numSelectedParams, hessian); - // At this point, hessian should contain the inverse of the original Hessian matrix. - // Swap hessian with invHessian to avoid confusion in the following context. - Utils.Swap(ref hessian, ref invHessian); - Contracts.Assert(hessian == null); - } - catch (DllNotFoundException) - { - throw ch.ExceptNotSupp("The MKL library (MklImports.dll) or one of its dependencies is missing."); - } - - float[] stdErrorValues = new float[numSelectedParams]; - stdErrorValues[0] = (float)Math.Sqrt(invHessian[0]); - - for (int i = 1; i < numSelectedParams; i++) - { - // Initialize with inverse Hessian. - stdErrorValues[i] = (float)invHessian[i * (i + 1) / 2 + i]; - } - - if (l2Weight > 0) - { - // Iterate through all entries of inverse Hessian to make adjustment to variance. - // A discussion on ridge regularized LR coefficient covariance matrix can be found here: - // http://www.aloki.hu/pdf/0402_171179.pdf (Equations 11 and 25) - // http://www.inf.unibz.it/dis/teaching/DWDM/project2010/LogisticRegression.pdf (Section "Significance testing in ridge logistic regression") - int ioffset = 1; - for (int iRow = 1; iRow < numSelectedParams; iRow++) - { - for (int iCol = 0; iCol <= iRow; iCol++) - { - var entry = (float)invHessian[ioffset++]; - AdjustVariance(entry, iRow, iCol, l2Weight, stdErrorValues); - } - } - - Contracts.Assert(ioffset == invHessian.Length); - } - - for (int i = 1; i < numSelectedParams; i++) - stdErrorValues[i] = (float)Math.Sqrt(stdErrorValues[i]); - - // currentWeights vector size is Weights2 + the bias - return new VBuffer(currentWeightsCount, numSelectedParams, stdErrorValues, weightIndices); - } - } -} diff --git a/src/Microsoft.ML.HalLearners/HalLearnersCatalog.cs b/src/Microsoft.ML.HalLearners/HalLearnersCatalog.cs index 6dab814ab1..acb83d11e7 100644 --- a/src/Microsoft.ML.HalLearners/HalLearnersCatalog.cs +++ b/src/Microsoft.ML.HalLearners/HalLearnersCatalog.cs @@ -19,36 +19,36 @@ public static class HalLearnersCatalog /// Predict a target using a linear regression model trained with the . /// /// The . - /// The labelColumn column. - /// The features column. + /// The label column. + /// The features column. /// The weights column. /// Algorithm advanced settings. public static OlsLinearRegressionTrainer OrdinaryLeastSquares(this RegressionContext.RegressionTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string label, + string features, string weights = null, Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new OlsLinearRegressionTrainer(env, labelColumn, featureColumn, weights, advancedSettings); + return new OlsLinearRegressionTrainer(env, label, features, weights, advancedSettings); } /// /// Predict a target using a linear regression model trained with the . /// /// The . - /// The labelColumn column. - /// The features column. + /// The label column. + /// The features column. /// Algorithm advanced settings. public static SymSgdClassificationTrainer SymbolicStochasticGradientDescent(this RegressionContext.RegressionTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string label, + string features, Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new SymSgdClassificationTrainer(env, labelColumn, featureColumn, advancedSettings); + return new SymSgdClassificationTrainer(env, label, features, advancedSettings); } } } diff --git a/src/Microsoft.ML.HalLearners/OlsLinearRegression.cs b/src/Microsoft.ML.HalLearners/OlsLinearRegression.cs index c1dfab7957..626b069f14 100644 --- a/src/Microsoft.ML.HalLearners/OlsLinearRegression.cs +++ b/src/Microsoft.ML.HalLearners/OlsLinearRegression.cs @@ -68,16 +68,13 @@ public sealed class Arguments : LearnerInputBaseWithWeight /// Initializes a new instance of /// /// The environment to use. - /// The name of the labelColumn column. + /// The name of the label column. /// The name of the feature column. - /// The name for the optional example weight column. + /// The name for the example weight column. /// A delegate to apply all the advanced arguments to the algorithm. - public OlsLinearRegressionTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, - Action advancedSettings = null) - : this(env, ArgsInit(featureColumn, labelColumn, weights, advancedSettings)) + public OlsLinearRegressionTrainer(IHostEnvironment env, string featureColumn, string labelColumn, + string weightColumn = null, Action advancedSettings = null) + : this(env, ArgsInit(featureColumn, labelColumn, weightColumn, advancedSettings)) { } @@ -94,10 +91,8 @@ internal OlsLinearRegressionTrainer(IHostEnvironment env, Arguments args) _perParameterSignificance = args.PerParameterSignificance; } - private static Arguments ArgsInit(string featureColumn, - string labelColumn, - string weightColumn, - Action advancedSettings) + private static Arguments ArgsInit(string featureColumn, string labelColumn, + string weightColumn, Action advancedSettings) { var args = new Arguments(); @@ -130,19 +125,19 @@ protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSc private static Double ProbClamp(Double p) => Math.Max(0, Math.Min(p, 1)); - private protected override OlsLinearRegressionPredictor TrainModelCore(TrainContext context) + protected override OlsLinearRegressionPredictor TrainModelCore(TrainContext context) { using (var ch = Host.Start("Training")) { ch.CheckValue(context, nameof(context)); var examples = context.TrainingSet; ch.CheckParam(examples.Schema.Feature != null, nameof(examples), "Need a feature column"); - ch.CheckParam(examples.Schema.Label != null, nameof(examples), "Need a labelColumn column"); + ch.CheckParam(examples.Schema.Label != null, nameof(examples), "Need a label column"); - // The labelColumn type must be either Float or a key type based on int (if allowKeyLabels is true). + // The label type must be either Float or a key type based on int (if allowKeyLabels is true). var typeLab = examples.Schema.Label.Type; if (typeLab != NumberType.Float) - throw ch.Except("Incompatible labelColumn column type {0}, must be {1}", typeLab, NumberType.Float); + throw ch.Except("Incompatible label column type {0}, must be {1}", typeLab, NumberType.Float); // The feature type must be a vector of Float. var typeFeat = examples.Schema.Feature.Type; @@ -227,7 +222,7 @@ private OlsLinearRegressionPredictor TrainCore(IChannel ch, FloatLabelCursor.Fac } ch.Check(n > 0, "No training examples in dataset."); if (cursor.BadFeaturesRowCount > 0) - ch.Warning("Skipped {0} instances with missing features/labelColumn during training", cursor.SkippedRowCount); + ch.Warning("Skipped {0} instances with missing features/label during training", cursor.SkippedRowCount); if (_l2Weight > 0) { @@ -278,11 +273,9 @@ private OlsLinearRegressionPredictor TrainCore(IChannel ch, FloatLabelCursor.Fac for (int i = 0; i < beta.Length; ++i) ch.Check(FloatUtils.IsFinite(beta[i]), "Non-finite values detected in OLS solution"); - var weightsValues = new float[beta.Length - 1]; + var weights = VBufferUtils.CreateDense(beta.Length - 1); for (int i = 1; i < beta.Length; ++i) - weightsValues[i - 1] = (float)beta[i]; - var weights = new VBuffer(weightsValues.Length, weightsValues); - + weights.Values[i - 1] = (float)beta[i]; var bias = (float)beta[0]; if (!(_l2Weight > 0) && m == n) { @@ -672,9 +665,8 @@ private OlsLinearRegressionPredictor(IHostEnvironment env, ModelLoadContext ctx) _tValues = ctx.Reader.ReadDoubleArray(m); TValueCheckDecode(Bias, _tValues[0]); - var weightValues = Weight.GetValues(); for (int i = 1; i < m; ++i) - TValueCheckDecode(weightValues[i - 1], _tValues[i]); + TValueCheckDecode(Weight.Values[i - 1], _tValues[i]); _pValues = ctx.Reader.ReadDoubleArray(m); for (int i = 0; i < m; ++i) @@ -750,7 +742,7 @@ public override void SaveSummary(TextWriter writer, RoleMappedSchema schema) const string format = "{0}\t{1}\t{2}\t{3:g4}\t{4:g4}\t{5:e4}"; writer.WriteLine(format, "", "Bias", Bias, _standardErrors[0], _tValues[0], _pValues[0]); Contracts.Assert(Weight.IsDense); - var coeffs = Weight.GetValues(); + var coeffs = Weight.Values; for (int i = 0; i < coeffs.Length; i++) { var name = names.GetItemOrDefault(i); @@ -765,7 +757,7 @@ public override void SaveSummary(TextWriter writer, RoleMappedSchema schema) const string format = "{0}\t{1}\t{2}"; writer.WriteLine(format, "", "Bias", Bias); Contracts.Assert(Weight.IsDense); - var coeffs = Weight.GetValues(); + var coeffs = Weight.Values; for (int i = 0; i < coeffs.Length; i++) { var name = names.GetItemOrDefault(i); @@ -782,16 +774,18 @@ public override void GetFeatureWeights(ref VBuffer weights) return; } + var values = weights.Values; var size = _pValues.Length - 1; - var editor = VBufferEditor.Create(ref weights, size); + if (Utils.Size(values) < size) + values = new float[size]; for (int i = 0; i < size; i++) { var score = -(float)Math.Log(_pValues[i + 1]); if (score > float.MaxValue) score = float.MaxValue; - editor.Values[i] = score; + values[i] = score; } - weights = editor.Commit(); + weights = new VBuffer(size, values, weights.Indices); } } } diff --git a/src/Microsoft.ML.HalLearners/ProjectionCatalog.cs b/src/Microsoft.ML.HalLearners/ProjectionCatalog.cs deleted file mode 100644 index 4485029fa4..0000000000 --- a/src/Microsoft.ML.HalLearners/ProjectionCatalog.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Transforms.Projections; - -namespace Microsoft.ML -{ - public static class ProjectionCatalog - { - /// - /// Takes column filled with a vector of random variables with a known covariance matrix into a set of new variables whose covariance is the identity matrix, - /// meaning that they are uncorrelated and each have variance 1. - /// - /// The transform's catalog. - /// Name of the input column. - /// Name of the column resulting from the transformation of . Null means is replaced. - /// Whitening kind (PCA/ZCA). - /// Whitening constant, prevents division by zero. - /// Maximum number of rows used to train the transform. - /// In case of PCA whitening, indicates the number of components to retain. - /// - /// - /// - /// - /// - public static VectorWhiteningEstimator VectorWhiten(this TransformsCatalog.ProjectionTransforms catalog, string inputColumn, string outputColumn = null, - WhiteningKind kind = VectorWhiteningTransformer.Defaults.Kind, - float eps = VectorWhiteningTransformer.Defaults.Eps, - int maxRows = VectorWhiteningTransformer.Defaults.MaxRows, - int pcaNum = VectorWhiteningTransformer.Defaults.PcaNum) - => new VectorWhiteningEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, kind, eps, maxRows, pcaNum); - - /// - /// Takes columns filled with a vector of random variables with a known covariance matrix into a set of new variables whose covariance is the identity matrix, - /// meaning that they are uncorrelated and each have variance 1. - /// - /// The transform's catalog. - /// Describes the parameters of the whitening process for each column pair. - public static VectorWhiteningEstimator VectorWhiten(this TransformsCatalog.ProjectionTransforms catalog, params VectorWhiteningTransformer.ColumnInfo[] columns) - => new VectorWhiteningEstimator(CatalogUtils.GetEnvironment(catalog), columns); - } -} diff --git a/src/Microsoft.ML.HalLearners/SymSgdClassificationTrainer.cs b/src/Microsoft.ML.HalLearners/SymSgdClassificationTrainer.cs index 590aa06e27..214ca4d98c 100644 --- a/src/Microsoft.ML.HalLearners/SymSgdClassificationTrainer.cs +++ b/src/Microsoft.ML.HalLearners/SymSgdClassificationTrainer.cs @@ -110,12 +110,12 @@ private RoleMappedData PrepareDataFromTrainingExamples(IChannel ch, RoleMappedDa idvToFeedTrain = idvToShuffle; else { - var shuffleArgs = new RowShufflingTransformer.Arguments + var shuffleArgs = new ShuffleTransform.Arguments { PoolOnly = false, ForceShuffle = _args.Shuffle }; - idvToFeedTrain = new RowShufflingTransformer(Host, shuffleArgs, idvToShuffle); + idvToFeedTrain = new ShuffleTransform(Host, shuffleArgs, idvToShuffle); } ch.Assert(idvToFeedTrain.CanShuffle); @@ -133,7 +133,7 @@ private RoleMappedData PrepareDataFromTrainingExamples(IChannel ch, RoleMappedDa return examplesToFeedTrain; } - private protected override TPredictor TrainModelCore(TrainContext context) + protected override TPredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); using (var ch = Host.Start("Training")) @@ -157,10 +157,7 @@ private protected override TPredictor TrainModelCore(TrainContext context) /// The name of the label column. /// The name of the feature column. /// A delegate to apply all the advanced arguments to the algorithm. - public SymSgdClassificationTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - Action advancedSettings = null) + public SymSgdClassificationTrainer(IHostEnvironment env, string featureColumn, string labelColumn, Action advancedSettings = null) : base(Contracts.CheckRef(env, nameof(env)).Register(LoadNameValue), TrainerUtils.MakeR4VecFeature(featureColumn), TrainerUtils.MakeBoolScalarLabel(labelColumn)) { @@ -654,8 +651,6 @@ private TPredictor TrainCore(IChannel ch, RoleMappedData data, LinearPredictor p else weights = VBufferUtils.CreateDense(numFeatures); - var weightsEditor = VBufferEditor.CreateFromBuffer(ref weights); - // Reference: Parasail. SymSGD. bool tuneLR = _args.LearningRate == null; var lr = _args.LearningRate ?? 1.0f; @@ -690,7 +685,7 @@ private TPredictor TrainCore(IChannel ch, RoleMappedData data, LinearPredictor p pch.SetHeader(new ProgressHeader(new[] { "iterations" }), entry => entry.SetProgress(0, state.PassIteration, _args.NumberOfIterations)); // If fully loaded, call the SymSGDNative and do not come back until learned for all iterations. - Native.LearnAll(inputDataManager, tuneLR, ref lr, l2Const, piw, weightsEditor.Values, ref bias, numFeatures, + Native.LearnAll(inputDataManager, tuneLR, ref lr, l2Const, piw, weights.Values, ref bias, numFeatures, _args.NumberOfIterations, numThreads, tuneNumLocIter, ref numLocIter, _args.Tolerance, _args.Shuffle, shouldInitialize, stateGCHandle); shouldInitialize = false; } @@ -711,7 +706,7 @@ private TPredictor TrainCore(IChannel ch, RoleMappedData data, LinearPredictor p // If all of this leaves us with 0 passes, then set numPassesForThisBatch to 1 numPassesForThisBatch = Math.Max(1, numPassesForThisBatch); state.PassIteration = iter; - Native.LearnAll(inputDataManager, tuneLR, ref lr, l2Const, piw, weightsEditor.Values, ref bias, numFeatures, + Native.LearnAll(inputDataManager, tuneLR, ref lr, l2Const, piw, weights.Values, ref bias, numFeatures, numPassesForThisBatch, numThreads, tuneNumLocIter, ref numLocIter, _args.Tolerance, _args.Shuffle, shouldInitialize, stateGCHandle); shouldInitialize = false; @@ -732,7 +727,7 @@ private TPredictor TrainCore(IChannel ch, RoleMappedData data, LinearPredictor p // Maps back the dense features that are mislocated if (numThreads > 1) - Native.MapBackWeightVector(weightsEditor.Values, stateGCHandle); + Native.MapBackWeightVector(weights.Values, stateGCHandle); Native.DeallocateSequentially(stateGCHandle); } } @@ -786,7 +781,7 @@ private static extern void LearnAll(int totalNumInstances, int* instSizes, int** /// Specifies if this is the first time to run SymSGD /// public static void LearnAll(InputDataManager inputDataManager, bool tuneLR, - ref float lr, float l2Const, float piw, Span weightVector, ref float bias, int numFeatres, int numPasses, + ref float lr, float l2Const, float piw, float[] weightVector, ref float bias, int numFeatres, int numPasses, int numThreads, bool tuneNumLocIter, ref int numLocIter, float tolerance, bool needShuffle, bool shouldInitialize, GCHandle stateGCHandle) { inputDataManager.PrepareCursoring(); @@ -840,7 +835,7 @@ public static void LearnAll(InputDataManager inputDataManager, bool tuneLR, /// /// The weight vector /// - public static void MapBackWeightVector(Span weightVector, GCHandle stateGCHandle) + public static void MapBackWeightVector(float[] weightVector, GCHandle stateGCHandle) { fixed (float* pweightVector = &weightVector[0]) MapBackWeightVector(pweightVector, (State*)stateGCHandle.AddrOfPinnedObject()); diff --git a/src/Microsoft.ML.HalLearners/TransformsStatic.cs b/src/Microsoft.ML.HalLearners/TransformsStatic.cs deleted file mode 100644 index 87ea5a2c0f..0000000000 --- a/src/Microsoft.ML.HalLearners/TransformsStatic.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Core.Data; -using Microsoft.ML.Runtime; -using Microsoft.ML.StaticPipe.Runtime; -using Microsoft.ML.Transforms.Projections; -using System.Collections.Generic; - -namespace Microsoft.ML.StaticPipe -{ - /// - /// Extensions for statically typed Whitening estimator. - /// - public static class VectorWhiteningExtensions - { - private sealed class OutPipelineColumn : Vector - { - public readonly Vector Input; - - public OutPipelineColumn(Vector input, WhiteningKind kind, float eps, int maxRows, int pcaNum) - : base(new Reconciler(kind, eps, maxRows, pcaNum), input) - { - Input = input; - } - } - - private sealed class Reconciler : EstimatorReconciler - { - private readonly WhiteningKind _kind; - private readonly float _eps; - private readonly int _maxRows; - private readonly int _pcaNum; - - public Reconciler(WhiteningKind kind, float eps, int maxRows, int pcaNum) - { - _kind = kind; - _eps = eps; - _maxRows = maxRows; - _pcaNum = pcaNum; - } - - public override IEstimator Reconcile(IHostEnvironment env, - PipelineColumn[] toOutput, - IReadOnlyDictionary inputNames, - IReadOnlyDictionary outputNames, - IReadOnlyCollection usedNames) - { - Contracts.Assert(toOutput.Length == 1); - - var infos = new VectorWhiteningTransformer.ColumnInfo[toOutput.Length]; - for (int i = 0; i < toOutput.Length; i++) - infos[i] = new VectorWhiteningTransformer.ColumnInfo(inputNames[((OutPipelineColumn)toOutput[i]).Input], outputNames[toOutput[i]], _kind, _eps, _maxRows, _pcaNum); - - return new VectorWhiteningEstimator(env, infos); - } - } - - /// - /// The column to which the transform will be applied. - /// Whitening constant, prevents division by zero when scaling the data by inverse of eigenvalues. - /// Maximum number of rows used to train the transform. - /// In case of PCA whitening, indicates the number of components to retain. - public static Vector PcaWhitening(this Vector input, - float eps = VectorWhiteningTransformer.Defaults.Eps, - int maxRows = VectorWhiteningTransformer.Defaults.MaxRows, - int pcaNum = VectorWhiteningTransformer.Defaults.PcaNum) - => new OutPipelineColumn(input, WhiteningKind.Pca, eps, maxRows, pcaNum); - - /// - /// The column to which the transform will be applied. - /// Whitening constant, prevents division by zero. - /// Maximum number of rows used to train the transform. - public static Vector ZcaWhitening(this Vector input, - float eps = VectorWhiteningTransformer.Defaults.Eps, - int maxRows = VectorWhiteningTransformer.Defaults.MaxRows) - => new OutPipelineColumn(input, WhiteningKind.Zca, eps, maxRows, VectorWhiteningTransformer.Defaults.PcaNum); - } -} diff --git a/src/Microsoft.ML.HalLearners/VectorWhitening.cs b/src/Microsoft.ML.HalLearners/VectorWhitening.cs deleted file mode 100644 index 0d10a89c48..0000000000 --- a/src/Microsoft.ML.HalLearners/VectorWhitening.cs +++ /dev/null @@ -1,821 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Core.Data; -using Microsoft.ML.Runtime; -using Microsoft.ML.Runtime.CommandLine; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Internal.CpuMath; -using Microsoft.ML.Runtime.Internal.Internallearn; -using Microsoft.ML.Runtime.Internal.Utilities; -using Microsoft.ML.Runtime.Model; -using Microsoft.ML.StaticPipe; -using Microsoft.ML.StaticPipe.Runtime; -using Microsoft.ML.Transforms.Projections; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; - -[assembly: LoadableClass(VectorWhiteningTransformer.Summary, typeof(IDataTransform), typeof(VectorWhiteningTransformer), typeof(VectorWhiteningTransformer.Arguments), typeof(SignatureDataTransform), - VectorWhiteningTransformer.FriendlyName, VectorWhiteningTransformer.LoaderSignature, "Whitening")] - -[assembly: LoadableClass(VectorWhiteningTransformer.Summary, typeof(IDataTransform), typeof(VectorWhiteningTransformer), null, typeof(SignatureLoadDataTransform), - VectorWhiteningTransformer.FriendlyName, VectorWhiteningTransformer.LoaderSignature, VectorWhiteningTransformer.LoaderSignatureOld)] - -[assembly: LoadableClass(VectorWhiteningTransformer.Summary, typeof(VectorWhiteningTransformer), null, typeof(SignatureLoadModel), - VectorWhiteningTransformer.FriendlyName, VectorWhiteningTransformer.LoaderSignature)] - -[assembly: LoadableClass(typeof(IRowMapper), typeof(VectorWhiteningTransformer), null, typeof(SignatureLoadRowMapper), - VectorWhiteningTransformer.FriendlyName, VectorWhiteningTransformer.LoaderSignature)] - -namespace Microsoft.ML.Transforms.Projections -{ - public enum WhiteningKind - { - [TGUI(Label = "PCA whitening")] - Pca, - - [TGUI(Label = "ZCA whitening")] - Zca - } - - /// - public sealed class VectorWhiteningTransformer : OneToOneTransformerBase - { - internal static class Defaults - { - public const WhiteningKind Kind = WhiteningKind.Zca; - public const float Eps = 1e-5f; - public const int MaxRows = 100 * 1000; - public const bool SaveInverse = false; - public const int PcaNum = 0; - } - - public sealed class Arguments - { - [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "New column definition(s) (optional form: name:src)", ShortName = "col", SortOrder = 1)] - public Column[] Column; - - [Argument(ArgumentType.AtMostOnce, HelpText = "Whitening kind (PCA/ZCA)")] - public WhiteningKind Kind = Defaults.Kind; - - [Argument(ArgumentType.AtMostOnce, HelpText = "Scaling regularizer")] - public float Eps = Defaults.Eps; - - [Argument(ArgumentType.AtMostOnce, HelpText = "Max number of rows", ShortName = "rows")] - public int MaxRows = Defaults.MaxRows; - - [Argument(ArgumentType.AtMostOnce, HelpText = "Whether to save inverse (recovery) matrix", ShortName = "saveInv")] - public bool SaveInverse = Defaults.SaveInverse; - - [Argument(ArgumentType.AtMostOnce, HelpText = "PCA components to retain")] - public int PcaNum = Defaults.PcaNum; - - // REVIEW: add the following options: - // 1. Currently there is no way to apply an inverse transform AFTER the the transform is trained. - // 2. How many PCA components to retain/drop. Options: retain-first, drop-first, variance-threshold. - } - - public sealed class Column : OneToOneColumn - { - [Argument(ArgumentType.AtMostOnce, HelpText = "Whitening kind (PCA/ZCA)")] - public WhiteningKind? Kind; - - [Argument(ArgumentType.AtMostOnce, HelpText = "Scaling regularizer")] - public float? Eps; - - [Argument(ArgumentType.AtMostOnce, HelpText = "Max number of rows", ShortName = "rows")] - public int? MaxRows; - - [Argument(ArgumentType.AtMostOnce, HelpText = "Whether to save inverse (recovery) matrix", ShortName = "saveInv")] - public bool? SaveInverse; - - [Argument(ArgumentType.AtMostOnce, HelpText = "PCA components to keep/drop")] - public int? PcaNum; - - public static Column Parse(string str) - { - Contracts.AssertNonEmpty(str); - - var res = new Column(); - if (res.TryParse(str)) - return res; - return null; - } - - public bool TryUnparse(StringBuilder sb) - { - Contracts.AssertValue(sb); - if (Kind != null || Eps != null || MaxRows != null || SaveInverse != null || PcaNum != null) - return false; - return TryUnparseCore(sb); - } - } - - public sealed class ColumnInfo - { - public readonly string Input; - public readonly string Output; - public readonly WhiteningKind Kind; - public readonly float Epsilon; - public readonly int MaxRow; - public readonly int PcaNum; - internal readonly bool SaveInv; - - /// - /// Describes how the transformer handles one input-output column pair. - /// - /// Name of the input column. - /// Name of the column resulting from the transformation of . Null means is replaced. - /// Whitening kind (PCA/ZCA). - /// Whitening constant, prevents division by zero. - /// Maximum number of rows used to train the transform. - /// In case of PCA whitening, indicates the number of components to retain. - public ColumnInfo(string input, string output = null, WhiteningKind kind = Defaults.Kind, float eps = Defaults.Eps, - int maxRows = Defaults.MaxRows, int pcaNum = Defaults.PcaNum) - { - Input = input; - Contracts.CheckValue(Input, nameof(Input)); - Output = output ?? input; - Contracts.CheckValue(Output, nameof(Output)); - Kind = kind; - Contracts.CheckUserArg(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca, nameof(Kind)); - Epsilon = eps; - Contracts.CheckUserArg(0 <= Epsilon && Epsilon < float.PositiveInfinity, nameof(Epsilon)); - MaxRow = maxRows; - Contracts.CheckUserArg(MaxRow > 0, nameof(MaxRow)); - SaveInv = Defaults.SaveInverse; - PcaNum = pcaNum; // REVIEW: make it work with pcaNum == 1. - Contracts.CheckUserArg(PcaNum >= 0, nameof(PcaNum)); - } - - internal ColumnInfo(Column item, Arguments args) - { - Input = item.Source ?? item.Name; - Contracts.CheckValue(Input, nameof(Input)); - Output = item.Name; - Contracts.CheckValue(Output, nameof(Output)); - Kind = item.Kind ?? args.Kind; - Contracts.CheckUserArg(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca, nameof(item.Kind)); - Epsilon = item.Eps ?? args.Eps; - Contracts.CheckUserArg(0 <= Epsilon && Epsilon < float.PositiveInfinity, nameof(item.Eps)); - MaxRow = item.MaxRows ?? args.MaxRows; - Contracts.CheckUserArg(MaxRow > 0, nameof(item.MaxRows)); - SaveInv = item.SaveInverse ?? args.SaveInverse; - PcaNum = item.PcaNum ?? args.PcaNum; - Contracts.CheckUserArg(PcaNum >= 0, nameof(item.PcaNum)); - } - - internal ColumnInfo(ModelLoadContext ctx) - { - Contracts.AssertValue(ctx); - - // *** Binary format *** - // int: kind - // float: epsilon - // int: maxrow - // byte: saveInv - // int: pcaNum - Kind = (WhiteningKind)ctx.Reader.ReadInt32(); - Contracts.CheckDecode(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca); - Epsilon = ctx.Reader.ReadFloat(); - Contracts.CheckDecode(0 <= Epsilon && Epsilon < float.PositiveInfinity); - MaxRow = ctx.Reader.ReadInt32(); - Contracts.CheckDecode(MaxRow > 0); - SaveInv = ctx.Reader.ReadBoolByte(); - PcaNum = ctx.Reader.ReadInt32(); - Contracts.CheckDecode(PcaNum >= 0); - } - - internal void Save(ModelSaveContext ctx) - { - Contracts.AssertValue(ctx); - - // *** Binary format *** - // int: kind - // float: epsilon - // int: maxrow - // byte: saveInv - // int: pcaNum - Contracts.Assert(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca); - ctx.Writer.Write((int)Kind); - Contracts.Assert(0 <= Epsilon && Epsilon < float.PositiveInfinity); - ctx.Writer.Write(Epsilon); - Contracts.Assert(MaxRow > 0); - ctx.Writer.Write(MaxRow); - ctx.Writer.WriteBoolByte(SaveInv); - Contracts.Assert(PcaNum >= 0); - ctx.Writer.Write(PcaNum); - } - } - - private const Mkl.Layout Layout = Mkl.Layout.RowMajor; - - // Stores whitening matrix as float[] for each column. _models[i] is the whitening matrix of the i-th input column. - private readonly float[][] _models; - // Stores inverse ("recover") matrix as float[] for each column. Temporarily internal as it's used in unit test. - // REVIEW: It doesn't look like this is used by non-test code. Should it be saved at all? - private readonly float[][] _invModels; - - internal const string Summary = "Apply PCA or ZCA whitening algorithm to the input."; - - internal const string FriendlyName = "Whitening Transform"; - internal const string LoaderSignature = "WhiteningTransform"; - internal const string LoaderSignatureOld = "WhiteningFunction"; - private static VersionInfo GetVersionInfo() - { - return new VersionInfo( - modelSignature: "WHITENTF", - verWrittenCur: 0x00010001, // Initial - verReadableCur: 0x00010001, - verWeCanReadBack: 0x00010001, - loaderSignature: LoaderSignature, - loaderSignatureAlt: LoaderSignatureOld, - loaderAssemblyName: typeof(VectorWhiteningTransformer).Assembly.FullName); - } - - private readonly ColumnInfo[] _columns; - - /// - /// Initializes a new object. - /// - /// Host Environment. - /// An array of whitening matrices where models[i] is learned from the i-th element of . - /// An array of inverse whitening matrices, the i-th element being the inverse matrix of models[i]. - /// Describes the parameters of the whitening process for each column pair. - internal VectorWhiteningTransformer(IHostEnvironment env, float[][] models, float[][] invModels, params ColumnInfo[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(VectorWhiteningTransformer)), GetColumnPairs(columns)) - { - Host.AssertNonEmpty(ColumnPairs); - _columns = columns; - _models = models; - _invModels = invModels; - } - - private VectorWhiteningTransformer(IHostEnvironment env, ModelLoadContext ctx) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(VectorWhiteningTransformer)), ctx) - { - Host.AssertValue(ctx); - - // *** Binary format *** - // - // foreach column pair - // ColumnInfo - // foreach model - // whitening matrix - // recovery matrix - - Host.AssertNonEmpty(ColumnPairs); - _columns = new ColumnInfo[ColumnPairs.Length]; - for (int i = 0; i < _columns.Length; i++) - _columns[i] = new ColumnInfo(ctx); - - _models = new float[ColumnPairs.Length][]; - _invModels = new float[ColumnPairs.Length][]; - for (int i = 0; i < ColumnPairs.Length; i++) - { - _models[i] = ctx.Reader.ReadFloatArray(); - if (_columns[i].SaveInv) - _invModels[i] = ctx.Reader.ReadFloatArray(); - } - } - - // Factory method for SignatureLoadModel - internal static VectorWhiteningTransformer Create(IHostEnvironment env, ModelLoadContext ctx) - { - Contracts.CheckValue(env, nameof(env)); - ctx.CheckAtModel(GetVersionInfo()); - return new VectorWhiteningTransformer(env, ctx); - } - - // Factory method for SignatureDataTransform. - internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) - { - var infos = args.Column.Select(colPair => new ColumnInfo(colPair, args)).ToArray(); - (var models, var invModels) = TrainVectorWhiteningTransform(env, input, infos); - return new VectorWhiteningTransformer(env, models, invModels, infos).MakeDataTransform(input); - } - - // Factory method for SignatureLoadDataTransform. - internal static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) - => Create(env, ctx).MakeDataTransform(input); - - // Factory method for SignatureLoadRowMapper. - internal static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) - => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); - - private static (string input, string output)[] GetColumnPairs(ColumnInfo[] columns) - => columns.Select(c => (c.Input, c.Output ?? c.Input)).ToArray(); - - protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCol) - { - var inType = inputSchema.GetColumnType(srcCol); - var reason = TestColumn(inType); - if (reason != null) - throw Host.ExceptParam(nameof(inputSchema), reason); - } - - // Check if the input column's type is supported. Note that only float vector with a known shape is allowed. - internal static string TestColumn(ColumnType type) - { - if ((type.IsVector && !type.IsKnownSizeVector && (type.AsVector.Dimensions.Length > 1)) || type.ItemType != NumberType.R4) - return "Expected float or float vector of known size"; - - if ((long)type.ValueCount * type.ValueCount > Utils.ArrayMaxSize) - return "Vector size exceeds maximum size for one dimensional array (2 146 435 071 elements)"; - - return null; - } - - private static void ValidateModel(IExceptionContext ectx, float[] model, ColumnType col) - { - ectx.CheckDecode(Utils.Size(model) == (long)col.ValueCount * col.ValueCount, "Invalid model size."); - for (int i = 0; i < model.Length; i++) - ectx.CheckDecode(FloatUtils.IsFinite(model[i]), "Found NaN or infinity in the model."); - } - - // Sometime GetRowCount doesn't really return the number of rows in the associated IDataView. - // A more reliable solution is to turely iterate through all rows via a RowCursor. - private static long GetRowCount(IDataView inputData, params ColumnInfo[] columns) - { - long? rows = inputData.GetRowCount(); - if (rows != null) - return rows.GetValueOrDefault(); - - int maxRows = columns.Max(i => i.MaxRow); - long r = 0; - using (var cursor = inputData.GetRowCursor(col => false)) - { - while (r < maxRows && cursor.MoveNext()) - r++; - } - return r; - } - - // Computes the transformation matrices needed for whitening process from training data. - internal static (float[][] models, float[][] invModels) TrainVectorWhiteningTransform(IHostEnvironment env, IDataView inputData, params ColumnInfo[] columns) - { - var models = new float[columns.Length][]; - var invModels = new float[columns.Length][]; - // The training process will load all data into memory and perform whitening process - // for each resulting column separately. - using (var ch = env.Start("Training")) - { - GetColTypesAndIndex(env, inputData, columns, out ColumnType[] srcTypes, out int[] cols); - var columnData = LoadDataAsDense(env, ch, inputData, out int[] rowCounts, srcTypes, cols, columns); - TrainModels(env, ch, columnData, rowCounts, ref models, ref invModels, srcTypes, columns); - } - return (models, invModels); - } - - // Extracts the indices and types of the input columns to the whitening transform. - private static void GetColTypesAndIndex(IHostEnvironment env, IDataView inputData, ColumnInfo[] columns, out ColumnType[] srcTypes, out int[] cols) - { - cols = new int[columns.Length]; - srcTypes = new ColumnType[columns.Length]; - var inputSchema = inputData.Schema; - - for (int i = 0; i < columns.Length; i++) - { - if (!inputSchema.TryGetColumnIndex(columns[i].Input, out cols[i])) - throw env.ExceptSchemaMismatch(nameof(inputSchema), "input", columns[i].Input); - srcTypes[i] = inputSchema.GetColumnType(cols[i]); - var reason = TestColumn(srcTypes[i]); - if (reason != null) - throw env.ExceptParam(nameof(inputData.Schema), reason); - } - } - - // Loads all relevant data for whitening training into memory. - private static float[][] LoadDataAsDense(IHostEnvironment env, IChannel ch, IDataView inputData, out int[] actualRowCounts, - ColumnType[] srcTypes, int[] cols, params ColumnInfo[] columns) - { - long crowData = GetRowCount(inputData, columns); - - var columnData = new float[columns.Length][]; - actualRowCounts = new int[columns.Length]; - int maxActualRowCount = 0; - - for (int i = 0; i < columns.Length; i++) - { - ch.Assert(srcTypes[i].IsVector && srcTypes[i].IsKnownSizeVector); - // Use not more than MaxRow number of rows. - var ex = columns[i]; - if (crowData <= ex.MaxRow) - actualRowCounts[i] = (int)crowData; - else - { - ch.Info(MessageSensitivity.Schema, "Only {0:N0} rows of column '{1}' will be used for whitening transform.", ex.MaxRow, columns[i].Output); - actualRowCounts[i] = ex.MaxRow; - } - - int cslot = srcTypes[i].ValueCount; - // Check that total number of values in matrix does not exceed int.MaxValue and adjust row count if necessary. - if ((long)cslot * actualRowCounts[i] > int.MaxValue) - { - actualRowCounts[i] = int.MaxValue / cslot; - ch.Info(MessageSensitivity.Schema, "Only {0:N0} rows of column '{1}' will be used for whitening transform.", actualRowCounts[i], columns[i].Output); - } - columnData[i] = new float[cslot * actualRowCounts[i]]; - if (actualRowCounts[i] > maxActualRowCount) - maxActualRowCount = actualRowCounts[i]; - } - var idxDst = new int[columns.Length]; - - var colsSet = new HashSet(cols); - using (var cursor = inputData.GetRowCursor(colsSet.Contains)) - { - var getters = new ValueGetter>[columns.Length]; - for (int i = 0; i < columns.Length; i++) - getters[i] = cursor.GetGetter>(cols[i]); - var val = default(VBuffer); - int irow = 0; - while (irow < maxActualRowCount && cursor.MoveNext()) - { - for (int i = 0; i < columns.Length; i++) - { - if (irow >= actualRowCounts[i] || columnData[i].Length == 0) - continue; - - getters[i](ref val); - val.CopyTo(columnData[i], idxDst[i]); - idxDst[i] += srcTypes[i].ValueCount; - } - irow++; - } -#if DEBUG - for (int i = 0; i < columns.Length; i++) - ch.Assert(idxDst[i] == columnData[i].Length); -#endif - } - return columnData; - } - - // Performs whitening training for each column separately. Notice that for both PCA and ZCA, _models and _invModels - // will have dimension input_vec_size x input_vec_size. In the getter, the matrix will be truncated to only keep - // PcaNum columns, and thus produce the desired output size. - private static void TrainModels(IHostEnvironment env, IChannel ch, float[][] columnData, int[] rowCounts, - ref float[][] models, ref float[][] invModels, ColumnType[] srcTypes, params ColumnInfo[] columns) - { - ch.Assert(columnData.Length == rowCounts.Length); - - for (int iinfo = 0; iinfo < columns.Length; iinfo++) - { - var ex = columns[iinfo]; - var data = columnData[iinfo]; - int crow = rowCounts[iinfo]; - int ccol = srcTypes[iinfo].ValueCount; - - // If there is no training data, simply initialize the model matrices to identity matrices. - if (crow == 0) - { - var matrixSize = ccol * ccol; - models[iinfo] = new float[matrixSize]; - invModels[iinfo] = new float[matrixSize]; - for (int i = 0; i < ccol; i++) - { - models[iinfo][i * ccol + i] = 1; - invModels[iinfo][i * ccol + i] = 1; - } - continue; - } - - // Compute covariance matrix. - var u = new float[ccol * ccol]; - ch.Info("Computing covariance matrix..."); - Mkl.Gemm(Layout, Mkl.Transpose.Trans, Mkl.Transpose.NoTrans, - ccol, ccol, crow, 1 / (float)crow, data, ccol, data, ccol, 0, u, ccol); - - ch.Info("Computing SVD..."); - var eigValues = new float[ccol]; // Eigenvalues. - var unconv = new float[ccol]; // Superdiagonal unconverged values (if any). Not used but seems to be required by MKL. - // After the next call, values in U will be ovewritten by left eigenvectors. - // Each column in U will be an eigenvector. - int r = Mkl.Svd(Layout, Mkl.SvdJob.MinOvr, Mkl.SvdJob.None, - ccol, ccol, u, ccol, eigValues, null, ccol, null, ccol, unconv); - ch.Assert(r == 0); - if (r > 0) - throw ch.Except("SVD did not converge."); - if (r < 0) - throw ch.Except("Invalid arguments to LAPACK gesvd, error: {0}", r); - - ch.Info("Scaling eigenvectors..."); - // Scale eigenvalues first so we don't have to compute sqrt for every matrix element. - // Scaled eigenvalues are used to compute inverse transformation matrix - // while reciprocal (eigValuesRcp) values are used to compute whitening matrix. - for (int i = 0; i < eigValues.Length; i++) - eigValues[i] = MathUtils.Sqrt(Math.Max(0, eigValues[i]) + ex.Epsilon); - var eigValuesRcp = new float[eigValues.Length]; - for (int i = 0; i < eigValuesRcp.Length; i++) - eigValuesRcp[i] = 1 / eigValues[i]; - - // Scale eigenvectors. Note that resulting matrix is transposed, so the scaled - // eigenvectors are stored row-wise. - var uScaled = new float[u.Length]; - var uInvScaled = new float[u.Length]; - int isrc = 0; - for (int irowSrc = 0; irowSrc < ccol; irowSrc++) - { - int idst = irowSrc; - for (int icolSrc = 0; icolSrc < ccol; icolSrc++) - { - uScaled[idst] = u[isrc] * eigValuesRcp[icolSrc]; - uInvScaled[idst] = u[isrc] * eigValues[icolSrc]; - isrc++; - idst += ccol; - } - } - - // For ZCA need to do additional multiply by U. - if (ex.Kind == WhiteningKind.Pca) - { - // Save all components for PCA. Retained components will be selected during evaluation. - models[iinfo] = uScaled; - if (ex.SaveInv) - invModels[iinfo] = uInvScaled; - } - else if (ex.Kind == WhiteningKind.Zca) - { - models[iinfo] = new float[u.Length]; - Mkl.Gemm(Layout, Mkl.Transpose.NoTrans, Mkl.Transpose.NoTrans, - ccol, ccol, ccol, 1, u, ccol, uScaled, ccol, 0, models[iinfo], ccol); - - if (ex.SaveInv) - { - invModels[iinfo] = new float[u.Length]; - Mkl.Gemm(Layout, Mkl.Transpose.NoTrans, Mkl.Transpose.NoTrans, - ccol, ccol, ccol, 1, u, ccol, uInvScaled, ccol, 0, invModels[iinfo], ccol); - } - } - else - ch.Assert(false); - } - } - - public override void Save(ModelSaveContext ctx) - { - Host.CheckValue(ctx, nameof(ctx)); - ctx.CheckAtModel(); - ctx.SetVersionInfo(GetVersionInfo()); - - // *** Binary format *** - // - // foreach column pair - // ColumnInfo - // foreach model - // whitening matrix - // recovery matrix - - SaveColumns(ctx); - - Host.Assert(_columns.Length == ColumnPairs.Length); - for (int i = 0; i < _columns.Length; i++) - _columns[i].Save(ctx); - for (int i = 0; i < _models.Length; i++) - { - ctx.Writer.WriteSingleArray(_models[i]); - if (_columns[i].SaveInv) - ctx.Writer.WriteSingleArray(_invModels[i]); - } - } - - private static class Mkl - { - private const string DllName = "MklImports"; - - // The allowed value of Layout is specified in Intel's MLK library. See Layout parameter in this - // [doc](https://software.intel.com/en-us/mkl-developer-reference-c-cblas-gemm) for details. - public enum Layout - { - RowMajor = 101, - ColMajor = 102 - } - - // The allowed value of Transpose is specified in Intel's MLK library. See transa parameter in this - // [doc](https://software.intel.com/en-us/mkl-developer-reference-c-cblas-gemm) for details. - public enum Transpose - { - NoTrans = 111, - Trans = 112, - ConjTrans = 113 - } - - // The allowed value of SvdJob is specified in Intel's MLK library. See jobvt parameter in this - // [doc](https://software.intel.com/en-us/node/521150) for details. - public enum SvdJob : byte - { - None = (byte)'N', - All = (byte)'A', - Min = (byte)'S', - MinOvr = (byte)'O', - } - - public static unsafe void Gemv(Layout layout, Transpose trans, int m, int n, float alpha, - float[] a, int lda, ReadOnlySpan x, int incx, float beta, Span y, int incy) - { - fixed (float* pA = a) - fixed (float* pX = x) - fixed (float* pY = y) - Gemv(layout, trans, m, n, alpha, pA, lda, pX, incx, beta, pY, incy); - } - - // See: https://software.intel.com/en-us/node/520750 - [DllImport(DllName, EntryPoint = "cblas_sgemv")] - private static unsafe extern void Gemv(Layout layout, Transpose trans, int m, int n, float alpha, - float* a, int lda, float* x, int incx, float beta, float* y, int incy); - - // See: https://software.intel.com/en-us/node/520775 - [DllImport(DllName, EntryPoint = "cblas_sgemm")] - public static extern void Gemm(Layout layout, Transpose transA, Transpose transB, int m, int n, int k, float alpha, - float[] a, int lda, float[] b, int ldb, float beta, float[] c, int ldc); - - // See: https://software.intel.com/en-us/node/521150 - [DllImport(DllName, EntryPoint = "LAPACKE_sgesvd")] - public static extern int Svd(Layout layout, SvdJob jobu, SvdJob jobvt, - int m, int n, float[] a, int lda, float[] s, float[] u, int ldu, float[] vt, int ldvt, float[] superb); - } - - protected override IRowMapper MakeRowMapper(Schema schema) - => new Mapper(this, schema); - - private sealed class Mapper : OneToOneMapperBase - { - private readonly VectorWhiteningTransformer _parent; - private readonly int[] _cols; - private readonly ColumnType[] _srcTypes; - - public Mapper(VectorWhiteningTransformer parent, Schema inputSchema) - : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) - { - _parent = parent; - _cols = new int[_parent.ColumnPairs.Length]; - _srcTypes = new ColumnType[_parent.ColumnPairs.Length]; - - for (int i = 0; i < _parent.ColumnPairs.Length; i++) - { - if (!InputSchema.TryGetColumnIndex(_parent.ColumnPairs[i].input, out _cols[i])) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.ColumnPairs[i].input); - _srcTypes[i] = inputSchema.GetColumnType(_cols[i]); - ValidateModel(Host, _parent._models[i], _srcTypes[i]); - if (_parent._columns[i].SaveInv) - ValidateModel(Host, _parent._invModels[i], _srcTypes[i]); - } - } - - /// - /// For PCA, the transform equation is y=U^Tx, where "^T" denotes matrix transpose, x is an 1-D vector (i.e., the input column), and U=[u_1, ..., u_PcaNum] - /// is a n-by-PcaNum matrix. The symbol u_k is the k-th largest (in terms of the associated eigenvalue) eigenvector of (1/m)*\sum_{i=1}^m x_ix_i^T, - /// where x_i is the whitened column at the i-th row and we have m rows in the training data. - /// For ZCA, the transform equation is y = US^{-1/2}U^Tx, where U=[u_1, ..., u_n] (we retain all eigenvectors) and S is a diagonal matrix whose i-th - /// diagonal element is the eigenvalues of u_i. The first U^Tx rotates x to another linear space (bases are u_1, ..., u_n), then S^{-1/2} is applied - /// to ensure unit variance, and finally we rotate the scaled result back to the original space using U (note that UU^T is identity matrix so U is - /// the inverse rotation of U^T). - /// - protected override Schema.Column[] GetOutputColumnsCore() - { - var result = new Schema.Column[_parent.ColumnPairs.Length]; - for (int iinfo = 0; iinfo < _parent.ColumnPairs.Length; iinfo++) - { - InputSchema.TryGetColumnIndex(_parent.ColumnPairs[iinfo].input, out int colIndex); - Host.Assert(colIndex >= 0); - var info = _parent._columns[iinfo]; - ColumnType outType = (info.Kind == WhiteningKind.Pca && info.PcaNum > 0) ? new VectorType(NumberType.Float, info.PcaNum) : _srcTypes[iinfo]; - result[iinfo] = new Schema.Column(_parent.ColumnPairs[iinfo].output, outType, null); - } - return result; - } - - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) - { - Host.AssertValue(input); - Host.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); - disposer = null; - - var ex = _parent._columns[iinfo]; - Host.Assert(ex.Kind == WhiteningKind.Pca || ex.Kind == WhiteningKind.Zca); - var getSrc = GetSrcGetter>(input, iinfo); - var src = default(VBuffer); - int cslotSrc = _srcTypes[iinfo].ValueCount; - // Notice that here that the learned matrices in _models will have the same size for both PCA and ZCA, - // so we perform a truncation of the matrix in FillValues, that only keeps PcaNum columns. - int cslotDst = (ex.Kind == WhiteningKind.Pca && ex.PcaNum > 0) ? ex.PcaNum : _srcTypes[iinfo].ValueCount; - var model = _parent._models[iinfo]; - ValueGetter> del = - (ref VBuffer dst) => - { - getSrc(ref src); - Host.Check(src.Length == cslotSrc, "Invalid column size."); - FillValues(model, ref src, ref dst, cslotDst); - }; - return del; - } - - private ValueGetter GetSrcGetter(IRow input, int iinfo) - { - Host.AssertValue(input); - Host.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); - int src = _cols[iinfo]; - Host.Assert(input.IsColumnActive(src)); - return input.GetGetter(src); - } - - private static void FillValues(float[] model, ref VBuffer src, ref VBuffer dst, int cdst) - { - var values = src.GetValues(); - int count = values.Length; - int length = src.Length; - - // Since the whitening process produces dense vector, always use dense representation of dst. - var editor = VBufferEditor.Create(ref dst, cdst); - if (src.IsDense) - { - Mkl.Gemv(Mkl.Layout.RowMajor, Mkl.Transpose.NoTrans, cdst, length, - 1, model, length, values, 1, 0, editor.Values, 1); - } - else - { - var indices = src.GetIndices(); - - int offs = 0; - for (int i = 0; i < cdst; i++) - { - // Returns a dot product of dense vector 'model' starting from offset 'offs' and sparse vector 'values' - // with first 'count' valid elements and their corresponding 'indices'. - editor.Values[i] = CpuMathUtils.DotProductSparse(model.AsSpan(offs), values, indices, count); - offs += length; - } - } - dst = editor.Commit(); - } - - private static float DotProduct(float[] a, int aOffset, ReadOnlySpan b, ReadOnlySpan indices, int count) - { - Contracts.Assert(count <= indices.Length); - return CpuMathUtils.DotProductSparse(a.AsSpan(aOffset), b, indices, count); - - } - } - } - - /// - public sealed class VectorWhiteningEstimator : IEstimator - { - private readonly IHost _host; - private readonly VectorWhiteningTransformer.ColumnInfo[] _infos; - - /// - /// The environment. - /// Describes the parameters of the whitening process for each column pair. - public VectorWhiteningEstimator(IHostEnvironment env, params VectorWhiteningTransformer.ColumnInfo[] columns) - { - _host = Contracts.CheckRef(env, nameof(env)).Register(nameof(VectorWhiteningTransformer)); - _infos = columns; - } - - /// - /// The environment. - /// Name of the input column. - /// Name of the column resulting from the transformation of . Null means is replaced. - /// Whitening kind (PCA/ZCA). - /// Whitening constant, prevents division by zero when scaling the data by inverse of eigenvalues. - /// Maximum number of rows used to train the transform. - /// In case of PCA whitening, indicates the number of components to retain. - public VectorWhiteningEstimator(IHostEnvironment env, string inputColumn, string outputColumn, - WhiteningKind kind = VectorWhiteningTransformer.Defaults.Kind, - float eps = VectorWhiteningTransformer.Defaults.Eps, - int maxRows = VectorWhiteningTransformer.Defaults.MaxRows, - int pcaNum = VectorWhiteningTransformer.Defaults.PcaNum) - : this(env, new VectorWhiteningTransformer.ColumnInfo(inputColumn, outputColumn, kind, eps, maxRows, pcaNum)) - { - } - - public VectorWhiteningTransformer Fit(IDataView input) - { - // Build transformation matrices for whitening process, then construct a trained transform. - (var models, var invModels) = VectorWhiteningTransformer.TrainVectorWhiteningTransform(_host, input, _infos); - return new VectorWhiteningTransformer(_host, models, invModels, _infos); - } - - /// - /// Returns the schema that would be produced by the transformation. - /// - public SchemaShape GetOutputSchema(SchemaShape inputSchema) - { - _host.CheckValue(inputSchema, nameof(inputSchema)); - var result = inputSchema.Columns.ToDictionary(x => x.Name); - foreach (var colPair in _infos) - { - if (!inputSchema.TryFindColumn(colPair.Input, out var col)) - throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colPair.Input); - var reason = VectorWhiteningTransformer.TestColumn(col.ItemType); - if (reason != null) - throw _host.ExceptUserArg(nameof(inputSchema), reason); - result[colPair.Output] = new SchemaShape.Column(colPair.Output, col.Kind, col.ItemType, col.IsKey, null); - } - return new SchemaShape(result.Values); - } - } -} diff --git a/src/Microsoft.ML.ImageAnalytics/ImageGrayscaleTransform.cs b/src/Microsoft.ML.ImageAnalytics/ImageGrayscaleTransform.cs index f6b8ae0f15..67c446bd6e 100644 --- a/src/Microsoft.ML.ImageAnalytics/ImageGrayscaleTransform.cs +++ b/src/Microsoft.ML.ImageAnalytics/ImageGrayscaleTransform.cs @@ -159,7 +159,7 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].input, "image", inputSchema.GetColumnType(srcCol).ToString()); } - private sealed class Mapper : OneToOneMapperBase + private sealed class Mapper : MapperBase { private ImageGrayscaleTransform _parent; @@ -169,10 +169,10 @@ public Mapper(ImageGrayscaleTransform parent, Schema inputSchema) _parent = parent; } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() => _parent.ColumnPairs.Select((x, idx) => new Schema.Column(x.output, InputSchema[ColMapNewToOld[idx]].Type, null)).ToArray(); - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); diff --git a/src/Microsoft.ML.ImageAnalytics/ImageLoaderTransform.cs b/src/Microsoft.ML.ImageAnalytics/ImageLoaderTransform.cs index 862c0fc21b..206477c350 100644 --- a/src/Microsoft.ML.ImageAnalytics/ImageLoaderTransform.cs +++ b/src/Microsoft.ML.ImageAnalytics/ImageLoaderTransform.cs @@ -148,7 +148,7 @@ private static VersionInfo GetVersionInfo() protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : OneToOneMapperBase + private sealed class Mapper : MapperBase { private readonly ImageLoaderTransform _parent; private readonly ImageType _imageType; @@ -160,7 +160,7 @@ public Mapper(ImageLoaderTransform parent, Schema inputSchema) _parent = parent; } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); @@ -206,7 +206,7 @@ protected override Delegate MakeGetter(IRow input, int iinfo, Func ac return del; } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() => _parent.ColumnPairs.Select(x => new Schema.Column(x.output, _imageType, null)).ToArray(); } } diff --git a/src/Microsoft.ML.ImageAnalytics/ImagePixelExtractorTransform.cs b/src/Microsoft.ML.ImageAnalytics/ImagePixelExtractorTransform.cs index 663af17553..2bb9b912ae 100644 --- a/src/Microsoft.ML.ImageAnalytics/ImagePixelExtractorTransform.cs +++ b/src/Microsoft.ML.ImageAnalytics/ImagePixelExtractorTransform.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.Drawing; using System.Linq; -using System.Runtime.InteropServices; using System.Text; using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime; @@ -413,7 +412,7 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.Except("Image dimensions are too large"); } - private sealed class Mapper : OneToOneMapperBase + private sealed class Mapper : MapperBase { private readonly ImagePixelExtractorTransform _parent; private readonly VectorType[] _types; @@ -425,10 +424,10 @@ public Mapper(ImagePixelExtractorTransform parent, Schema inputSchema) _types = ConstructTypes(); } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() => _parent._columns.Select((x, idx) => new Schema.Column(x.Output, _types[idx], null)).ToArray(); - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _parent._columns.Length); @@ -440,7 +439,6 @@ protected override Delegate MakeGetter(IRow input, int iinfo, Func ac //REVIEW Rewrite it to where TValue : IConvertible private ValueGetter> GetGetterCore(IRow input, int iinfo, out Action disposer) - where TValue : struct { var type = _types[iinfo]; var dims = type.Dimensions; @@ -478,26 +476,26 @@ private ValueGetter> GetGetterCore(IRow input, int iinfo if (src == null) { - VBufferUtils.Resize(ref dst, size, 0); + dst = new VBuffer(size, 0, dst.Values, dst.Indices); return; } Host.Check(src.PixelFormat == System.Drawing.Imaging.PixelFormat.Format32bppArgb); Host.Check(src.Height == height && src.Width == width); - var editor = VBufferEditor.Create(ref dst, size); - var values = editor.Values; + var values = dst.Values; + if (Utils.Size(values) < size) + values = new TValue[size]; float offset = ex.Offset; float scale = ex.Scale; Contracts.Assert(scale != 0); - // REVIEW: split the getter into 2 specialized getters, one for float case and one for byte case. - Span vf = typeof(TValue) == typeof(float) ? MemoryMarshal.Cast(editor.Values) : default; - Span vb = typeof(TValue) == typeof(byte) ? MemoryMarshal.Cast(editor.Values) : default; - Contracts.Assert(!vf.IsEmpty || !vb.IsEmpty); + var vf = values as float[]; + var vb = values as byte[]; + Contracts.Assert(vf != null || vb != null); bool needScale = offset != 0 || scale != 1; - Contracts.Assert(!needScale || !vf.IsEmpty); + Contracts.Assert(!needScale || vf != null); bool a = ex.Alpha; bool r = ex.Red; @@ -514,7 +512,7 @@ private ValueGetter> GetGetterCore(IRow input, int iinfo for (int y = 0; y < h; ++y) { var pb = src.GetPixel(x, y); - if (!vb.IsEmpty) + if (vb != null) { if (a) { vb[idst++] = pb.A; } if (r) { vb[idst++] = pb.R; } @@ -545,7 +543,7 @@ private ValueGetter> GetGetterCore(IRow input, int iinfo { // The image only has rgb but we need to supply alpha as well, so fake it up, // assuming that it is 0xFF. - if (!vf.IsEmpty) + if (vf != null) { Single v = (0xFF - offset) * scale; for (int i = 0; i < cpix; i++) @@ -568,7 +566,7 @@ private ValueGetter> GetGetterCore(IRow input, int iinfo int idstBase = idstMin + y * w; // Note that the bytes are in order BGR[A]. We arrange the layers in order ARGB. - if (!vb.IsEmpty) + if (vb != null) { for (int x = 0; x < w; x++, idstBase++) { @@ -607,7 +605,7 @@ private ValueGetter> GetGetterCore(IRow input, int iinfo } } - dst = editor.Commit(); + dst = new VBuffer(size, values, dst.Indices); }; } diff --git a/src/Microsoft.ML.ImageAnalytics/ImageResizerTransform.cs b/src/Microsoft.ML.ImageAnalytics/ImageResizerTransform.cs index de093e5dc6..200898a91d 100644 --- a/src/Microsoft.ML.ImageAnalytics/ImageResizerTransform.cs +++ b/src/Microsoft.ML.ImageAnalytics/ImageResizerTransform.cs @@ -292,7 +292,7 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _columns[col].Input, "image", inputSchema.GetColumnType(srcCol).ToString()); } - private sealed class Mapper : OneToOneMapperBase + private sealed class Mapper : MapperBase { private readonly ImageResizerTransform _parent; @@ -302,10 +302,10 @@ public Mapper(ImageResizerTransform parent, Schema inputSchema) _parent = parent; } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() => _parent._columns.Select(x => new Schema.Column(x.Output, x.Type, null)).ToArray(); - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _parent._columns.Length); diff --git a/src/Microsoft.ML.KMeansClustering/KMeansCatalog.cs b/src/Microsoft.ML.KMeansClustering/KMeansCatalog.cs index c096750ae0..7ba14181a0 100644 --- a/src/Microsoft.ML.KMeansClustering/KMeansCatalog.cs +++ b/src/Microsoft.ML.KMeansClustering/KMeansCatalog.cs @@ -23,7 +23,7 @@ public static class KMeansClusteringExtensions /// The number of clusters to use for KMeans. /// Algorithm advanced settings. public static KMeansPlusPlusTrainer KMeans(this ClusteringContext.ClusteringTrainers ctx, - string features, + string features = DefaultColumnNames.Features, string weights = null, int clustersCount = KMeansPlusPlusTrainer.Defaults.K, Action advancedSettings = null) diff --git a/src/Microsoft.ML.KMeansClustering/KMeansPlusPlusTrainer.cs b/src/Microsoft.ML.KMeansClustering/KMeansPlusPlusTrainer.cs index 7e2bb4f807..c0bcb5318d 100644 --- a/src/Microsoft.ML.KMeansClustering/KMeansPlusPlusTrainer.cs +++ b/src/Microsoft.ML.KMeansClustering/KMeansPlusPlusTrainer.cs @@ -94,42 +94,35 @@ public class Arguments : UnsupervisedLearnerInputBaseWithWeight /// /// Initializes a new instance of /// - /// The to use. + /// The private instance of . /// The name of the feature column. - /// The name for the optional column containing the example weights. + /// The name for the column containing the example weights. /// A delegate to apply all the advanced arguments to the algorithm. /// The number of clusters. - public KMeansPlusPlusTrainer(IHostEnvironment env, - string featureColumn = DefaultColumnNames.Features, - int clustersCount = Defaults.K, - string weights = null, - Action advancedSettings = null) - : this(env, new Arguments - { - FeatureColumn = featureColumn, - WeightColumn = weights, - K = clustersCount - }, advancedSettings) + public KMeansPlusPlusTrainer(IHostEnvironment env, string featureColumn, int clustersCount = Defaults.K, string weightColumn = null, Action advancedSettings = null) + : this(env, new Arguments(), featureColumn, weightColumn, advancedSettings) { + _k = clustersCount; } internal KMeansPlusPlusTrainer(IHostEnvironment env, Arguments args) - : this(env, args, null) + : this(env, args, args.FeatureColumn, args.WeightColumn, null) { } - private KMeansPlusPlusTrainer(IHostEnvironment env, Arguments args, Action advancedSettings = null) - : base(Contracts.CheckRef(env, nameof(env)).Register(LoadNameValue), TrainerUtils.MakeR4VecFeature(args.FeatureColumn), null, TrainerUtils.MakeR4ScalarWeightColumn(args.WeightColumn)) + private KMeansPlusPlusTrainer(IHostEnvironment env, Arguments args, string featureColumn, string weightColumn, Action advancedSettings = null) + : base(Contracts.CheckRef(env, nameof(env)).Register(LoadNameValue), TrainerUtils.MakeR4VecFeature(featureColumn), null, TrainerUtils.MakeR4ScalarWeightColumn(weightColumn)) { Host.CheckValue(args, nameof(args)); - // override with the advanced settings. - advancedSettings?.Invoke(args); + if (advancedSettings != null) + advancedSettings.Invoke(args); Host.CheckUserArg(args.K > 0, nameof(args.K), "Must be positive"); - _featureColumn = args.FeatureColumn; + Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); + _featureColumn = featureColumn; _k = args.K; @@ -150,7 +143,7 @@ private KMeansPlusPlusTrainer(IHostEnvironment env, Arguments args, Action point, int pointRowIndex, if (pointRowIndex != -1) // if the space was available for cur in initializationState. { // pointNorm is necessary for using triangle inequality. - float pointNorm = VectorUtils.NormSquared(in point); + float pointNorm = VectorUtils.NormSquared(point); // We have cached distance information for this point. bestCluster = initializationState.GetBestCluster(pointRowIndex); float bestWeight = initializationState.GetBestWeight(pointRowIndex); @@ -788,7 +781,6 @@ public static void Initialize(IHost host, int numThreads, IChannel ch, FeatureFl // The final chosen points, to be approximately clustered to determine starting // centroids. VBuffer[] clusters = new VBuffer[totalSamples]; - // L2s, kept for distance trick. float[] clustersL2s = new float[totalSamples]; @@ -1319,7 +1311,7 @@ public static void Train(IHost host, int numThreads, IChannel ch, FeatureFloatVe float[] centroidL2s = new float[k]; for (int i = 0; i < k; i++) - centroidL2s[i] = VectorUtils.NormSquared(in centroids[i]); + centroidL2s[i] = VectorUtils.NormSquared(centroids[i]); using (var pch = host.StartProgressChannel("KMeansTrain")) { @@ -1389,10 +1381,8 @@ public static void Train(IHost host, int numThreads, IChannel ch, FeatureFloatVe for (int i = 0; i < k; i++) { - var reducedStateCacheValues = reducedState.CachedSumDebug[i].GetValues(); - var cachedSumCopyValues = cachedSumCopy[i].GetValues(); for (int j = 0; j < dimensionality; j++) - Contracts.Assert(AlmostEq(reducedStateCacheValues[j], cachedSumCopyValues[j])); + Contracts.Assert(AlmostEq(reducedState.CachedSumDebug[i].Values[j], cachedSumCopy[i].Values[j])); } } #endif diff --git a/src/Microsoft.ML.KMeansClustering/KMeansPredictor.cs b/src/Microsoft.ML.KMeansClustering/KMeansPredictor.cs index 38b5116da4..326b549a98 100644 --- a/src/Microsoft.ML.KMeansClustering/KMeansPredictor.cs +++ b/src/Microsoft.ML.KMeansClustering/KMeansPredictor.cs @@ -49,7 +49,7 @@ private static VersionInfo GetVersionInfo() public ColumnType InputType { get; } public ColumnType OutputType { get; } - bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => true; + public bool CanSaveOnnx(OnnxContext ctx) => true; private readonly int _dimensionality; private readonly int _k; @@ -148,19 +148,21 @@ public ValueMapper GetMapper() { if (src.Length != _dimensionality) throw Host.Except($"Incorrect number of features: expected {_dimensionality}, got {src.Length}"); - var editor = VBufferEditor.Create(ref dst, _k); - Map(in src, editor.Values); - dst = editor.Commit(); + var values = dst.Values; + if (Utils.Size(values) < _k) + values = new Float[_k]; + Map(in src, values); + dst = new VBuffer(_k, values, dst.Indices); }; return (ValueMapper)(Delegate)del; } - private void Map(in VBuffer src, Span distances) + private void Map(in VBuffer src, Float[] distances) { - Host.Assert(distances.Length >= _k); + Host.Assert(Utils.Size(distances) >= _k); - Float instanceL2 = VectorUtils.NormSquared(in src); + Float instanceL2 = VectorUtils.NormSquared(src); for (int i = 0; i < _k; i++) { Float distance = Math.Max(0, @@ -280,7 +282,7 @@ public void GetClusterCentroids(ref VBuffer[] centroids, out int k) k = _k; } - bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumn) + public bool SaveAsOnnx(OnnxContext ctx, string[] outputNames, string featureColumn) { // Computation graph of distances to all centriods for a batch of examples. Note that a centriod is just // the center of a cluster. We use [] to denote the dimension of a variable; for example, X [3, 2] means diff --git a/src/Microsoft.ML.Legacy/AssemblyRegistration.cs b/src/Microsoft.ML.Legacy/AssemblyRegistration.cs index 448395769a..df272e76a6 100644 --- a/src/Microsoft.ML.Legacy/AssemblyRegistration.cs +++ b/src/Microsoft.ML.Legacy/AssemblyRegistration.cs @@ -28,9 +28,7 @@ public static void RegisterAssemblies(IHostEnvironment environment) Contracts.Assert(_assemblyInitializer.Value); } -#pragma warning disable CS0618 // The legacy API that internally uses dependency injection for all calls will be deleted anyway. AssemblyLoadingUtils.RegisterCurrentLoadedAssemblies(environment); -#pragma warning restore CS0618 } /// @@ -48,7 +46,7 @@ private static bool LoadStandardAssemblies() _ = typeof(Maml).Assembly; // ML.Maml _ = typeof(PcaPredictor).Assembly; // ML.PCA _ = typeof(SweepCommand).Assembly; // ML.Sweeper - _ = typeof(OneHotEncodingTransformer).Assembly; // ML.Transforms + _ = typeof(CategoricalTransform).Assembly; // ML.Transforms // The following assemblies reference this assembly, so we can't directly reference them diff --git a/src/Microsoft.ML.Legacy/CSharpApi.cs b/src/Microsoft.ML.Legacy/CSharpApi.cs index c891b2039c..455ab1a512 100644 --- a/src/Microsoft.ML.Legacy/CSharpApi.cs +++ b/src/Microsoft.ML.Legacy/CSharpApi.cs @@ -11061,7 +11061,7 @@ public BinNormalizerPipelineStep(Output output) namespace Legacy.Transforms { - public enum OneHotEncodingTransformerOutputKind : byte + public enum CategoricalTransformOutputKind : byte { Bag = 1, Ind = 2, @@ -11070,7 +11070,7 @@ public enum OneHotEncodingTransformerOutputKind : byte } - public sealed partial class OneHotHashEncodingTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class CategoricalHashTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// The number of bits to hash into. Must be between 1 and 30, inclusive. @@ -11095,7 +11095,7 @@ public sealed partial class OneHotHashEncodingTransformerColumn : OneToOneColumn /// /// Output kind: Bag (multi-set vector), Ind (indicator vector), or Key (index) /// - public OneHotEncodingTransformerOutputKind? OutputKind { get; set; } + public CategoricalTransformOutputKind? OutputKind { get; set; } /// /// Name of the new column @@ -11142,15 +11142,15 @@ public CategoricalHashOneHotVectorizer(params (string inputColumn, string output public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -11158,7 +11158,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:hashBits:src) /// - public OneHotHashEncodingTransformerColumn[] Column { get; set; } + public CategoricalHashTransformColumn[] Column { get; set; } /// /// Number of bits to hash into. Must be between 1 and 30, inclusive. @@ -11183,7 +11183,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// Output kind: Bag (multi-set vector), Ind (indicator vector), or Key (index) /// - public OneHotEncodingTransformerOutputKind OutputKind { get; set; } = OneHotEncodingTransformerOutputKind.Bag; + public CategoricalTransformOutputKind OutputKind { get; set; } = CategoricalTransformOutputKind.Bag; /// /// Input dataset @@ -11237,19 +11237,19 @@ public CategoricalHashOneHotVectorizerPipelineStep(Output output) namespace Legacy.Transforms { - public enum ValueToKeyMappingTransformerSortOrder : byte + public enum TermTransformSortOrder : byte { Occurrence = 0, Value = 1 } - public sealed partial class OneHotEncodingTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class CategoricalTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// Output kind: Bag (multi-set vector), Ind (indicator vector), Key (index), or Binary encoded indicator vector /// - public OneHotEncodingTransformerOutputKind? OutputKind { get; set; } + public CategoricalTransformOutputKind? OutputKind { get; set; } /// /// Maximum number of terms to keep when auto-training @@ -11264,7 +11264,7 @@ public sealed partial class OneHotEncodingTransformerColumn : OneToOneColumn /// How items should be ordered when vectorized. By default, they will be in the order encountered. If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a'). /// - public ValueToKeyMappingTransformerSortOrder? Sort { get; set; } + public TermTransformSortOrder? Sort { get; set; } /// /// Whether key value metadata should be text, regardless of the actual input type @@ -11316,15 +11316,15 @@ public CategoricalOneHotVectorizer(params (string inputColumn, string outputColu public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -11332,12 +11332,12 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public OneHotEncodingTransformerColumn[] Column { get; set; } + public CategoricalTransformColumn[] Column { get; set; } /// /// Output kind: Bag (multi-set vector), Ind (indicator vector), or Key (index) /// - public OneHotEncodingTransformerOutputKind OutputKind { get; set; } = OneHotEncodingTransformerOutputKind.Ind; + public CategoricalTransformOutputKind OutputKind { get; set; } = CategoricalTransformOutputKind.Ind; /// /// Maximum number of terms to keep per column when auto-training @@ -11352,7 +11352,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// How items should be ordered when vectorized. By default, they will be in the order encountered. If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a'). /// - public ValueToKeyMappingTransformerSortOrder Sort { get; set; } = ValueToKeyMappingTransformerSortOrder.Occurrence; + public TermTransformSortOrder Sort { get; set; } = TermTransformSortOrder.Occurrence; /// /// Whether key value metadata should be text, regardless of the actual input type @@ -11412,7 +11412,7 @@ public CategoricalOneHotVectorizerPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class TokenizingByCharactersTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class CharTokenizeTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// Name of the new column @@ -11458,15 +11458,15 @@ public CharacterTokenizer(params (string inputColumn, string outputColumn)[] inp public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -11474,7 +11474,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public TokenizingByCharactersTransformerColumn[] Column { get; set; } + public CharTokenizeTransformColumn[] Column { get; set; } /// /// Whether to mark the beginning/end of each row/slot with start of text character (0x02)/end of text character (0x03) @@ -11534,7 +11534,7 @@ public CharacterTokenizerPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class ColumnConcatenatingTransformerColumn : ManyToOneColumn, IManyToOneColumn + public sealed partial class ConcatTransformColumn : ManyToOneColumn, IManyToOneColumn { /// /// Name of the new column @@ -11565,8 +11565,8 @@ public ColumnConcatenator(string outputColumn, params string[] inputColumns) public void AddColumn(string name, params string[] source) { - var list = Column == null ? new List() : new List(Column); - list.Add(ManyToOneColumn.Create(name, source)); + var list = Column == null ? new List() : new List(Column); + list.Add(ManyToOneColumn.Create(name, source)); Column = list.ToArray(); } @@ -11574,7 +11574,7 @@ public void AddColumn(string name, params string[] source) /// /// New column definition(s) (optional form: name:srcs) /// - public ColumnConcatenatingTransformerColumn[] Column { get; set; } + public ConcatTransformColumn[] Column { get; set; } /// /// Input dataset @@ -11629,7 +11629,7 @@ public ColumnConcatenatorPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class ColumnsCopyingTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class CopyColumnsTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// Name of the new column @@ -11677,15 +11677,15 @@ public ColumnCopier(params (string inputColumn, string outputColumn)[] inputOutp public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -11693,7 +11693,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public ColumnsCopyingTransformerColumn[] Column { get; set; } + public CopyColumnsTransformColumn[] Column { get; set; } /// /// Input dataset @@ -11828,7 +11828,7 @@ public ColumnSelectorPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class TypeConvertingTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class ConvertingTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// The result type @@ -11886,15 +11886,15 @@ public ColumnTypeConverter(params (string inputColumn, string outputColumn)[] in public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -11902,7 +11902,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:type:src) /// - public TypeConvertingTransformerColumn[] Column { get; set; } + public ConvertingTransformColumn[] Column { get; set; } /// /// The result type @@ -12318,7 +12318,7 @@ public sealed class Output namespace Legacy.Transforms { - public sealed partial class ValueToKeyMappingTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class TermTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// Maximum number of terms to keep when auto-training @@ -12333,7 +12333,7 @@ public sealed partial class ValueToKeyMappingTransformerColumn : OneToOneColumn< /// /// How items should be ordered when vectorized. By default, they will be in the order encountered. If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a'). /// - public ValueToKeyMappingTransformerSortOrder? Sort { get; set; } + public TermTransformSortOrder? Sort { get; set; } /// /// Whether key value metadata should be text, regardless of the actual input type @@ -12386,15 +12386,15 @@ public Dictionarizer(params (string inputColumn, string outputColumn)[] inputOut public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -12402,7 +12402,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public ValueToKeyMappingTransformerColumn[] Column { get; set; } + public TermTransformColumn[] Column { get; set; } /// /// Maximum number of terms to keep per column when auto-training @@ -12417,7 +12417,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// How items should be ordered when vectorized. By default, they will be in the order encountered. If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a'). /// - public ValueToKeyMappingTransformerSortOrder Sort { get; set; } = ValueToKeyMappingTransformerSortOrder.Occurrence; + public TermTransformSortOrder Sort { get; set; } = TermTransformSortOrder.Occurrence; /// /// Whether key value metadata should be text, regardless of the actual input type @@ -12690,7 +12690,7 @@ public FeatureSelectorByMutualInformationPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class LpNormalizingTransformerGcnColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class LpNormNormalizerTransformGcnColumn : OneToOneColumn, IOneToOneColumn { /// /// Normalize by standard deviation rather than L2 norm @@ -12751,15 +12751,15 @@ public GlobalContrastNormalizer(params (string inputColumn, string outputColumn) public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -12767,7 +12767,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public LpNormalizingTransformerGcnColumn[] Column { get; set; } + public LpNormNormalizerTransformGcnColumn[] Column { get; set; } /// /// Subtract mean from each value before normalizing @@ -12837,7 +12837,7 @@ public GlobalContrastNormalizerPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class HashJoiningTransformColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class HashJoinTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// Whether the values need to be combined for a single hash @@ -12909,15 +12909,15 @@ public HashConverter(params (string inputColumn, string outputColumn)[] inputOut public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -12925,7 +12925,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public HashJoiningTransformColumn[] Column { get; set; } + public HashJoinTransformColumn[] Column { get; set; } /// /// Whether the values need to be combined for a single hash @@ -13616,7 +13616,7 @@ public ImageResizerPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class KeyToValueMappingTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class KeyToValueTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// Name of the new column @@ -13662,15 +13662,15 @@ public KeyToTextConverter(params (string inputColumn, string outputColumn)[] inp public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -13678,7 +13678,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public KeyToValueMappingTransformerColumn[] Column { get; set; } + public KeyToValueTransformColumn[] Column { get; set; } /// /// Input dataset @@ -13997,10 +13997,10 @@ public LabelToFloatConverterPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class LatentDirichletAllocationTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class LdaTransformColumn : OneToOneColumn, IOneToOneColumn { /// - /// The number of topics + /// The number of topics in the LDA /// public int? NumTopic { get; set; } @@ -14099,15 +14099,15 @@ public LightLda(params (string inputColumn, string outputColumn)[] inputOutputCo public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -14115,10 +14115,10 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:srcs) /// - public LatentDirichletAllocationTransformerColumn[] Column { get; set; } + public LdaTransformColumn[] Column { get; set; } /// - /// The number of topics + /// The number of topics in the LDA /// [TlcModule.SweepableDiscreteParamAttribute("NumTopic", new object[]{20, 40, 100, 200})] public int NumTopic { get; set; } = 100; @@ -14153,14 +14153,14 @@ public void AddColumn(string outputColumn, string inputColumn) public int LikelihoodInterval { get; set; } = 5; /// - /// The number of training threads. Default value depends on number of logical processors. + /// The threshold of maximum count of tokens per doc /// - public int NumThreads { get; set; } + public int NumMaxDocToken { get; set; } = 512; /// - /// The threshold of maximum count of tokens per doc + /// The number of training threads. Default value depends on number of logical processors. /// - public int NumMaxDocToken { get; set; } = 512; + public int? NumThreads { get; set; } /// /// The number of words to summarize the topic @@ -14369,7 +14369,7 @@ public LogMeanVarianceNormalizerPipelineStep(Output output) namespace Legacy.Transforms { - public enum LpNormalizingEstimatorBaseNormalizerKind : byte + public enum LpNormNormalizerTransformNormalizerKind : byte { L2Norm = 0, StdDev = 1, @@ -14378,12 +14378,12 @@ public enum LpNormalizingEstimatorBaseNormalizerKind : byte } - public sealed partial class LpNormalizingTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class LpNormNormalizerTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// The norm to use to normalize each sample /// - public LpNormalizingEstimatorBaseNormalizerKind? NormKind { get; set; } + public LpNormNormalizerTransformNormalizerKind? NormKind { get; set; } /// /// Subtract mean from each value before normalizing @@ -14434,15 +14434,15 @@ public LpNormalizer(params (string inputColumn, string outputColumn)[] inputOutp public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -14450,12 +14450,12 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public LpNormalizingTransformerColumn[] Column { get; set; } + public LpNormNormalizerTransformColumn[] Column { get; set; } /// /// The norm to use to normalize each sample /// - public LpNormalizingEstimatorBaseNormalizerKind NormKind { get; set; } = LpNormalizingEstimatorBaseNormalizerKind.L2Norm; + public LpNormNormalizerTransformNormalizerKind NormKind { get; set; } = LpNormNormalizerTransformNormalizerKind.L2Norm; /// /// Subtract mean from each value before normalizing @@ -14781,7 +14781,7 @@ public MinMaxNormalizerPipelineStep(Output output) namespace Legacy.Transforms { - public enum MissingValueHandlingTransformerReplacementKind : byte + public enum NAHandleTransformReplacementKind : byte { DefaultValue = 0, Mean = 1, @@ -14790,12 +14790,12 @@ public enum MissingValueHandlingTransformerReplacementKind : byte } - public sealed partial class MissingValueHandlingTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class NAHandleTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// The replacement method to utilize /// - public MissingValueHandlingTransformerReplacementKind? Kind { get; set; } + public NAHandleTransformReplacementKind? Kind { get; set; } /// /// Whether to impute values by slot @@ -14852,15 +14852,15 @@ public MissingValueHandler(params (string inputColumn, string outputColumn)[] in public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -14868,12 +14868,12 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:rep:src) /// - public MissingValueHandlingTransformerColumn[] Column { get; set; } + public NAHandleTransformColumn[] Column { get; set; } /// /// The replacement method to utilize /// - public MissingValueHandlingTransformerReplacementKind ReplaceWith { get; set; } = MissingValueHandlingTransformerReplacementKind.DefaultValue; + public NAHandleTransformReplacementKind ReplaceWith { get; set; } = NAHandleTransformReplacementKind.DefaultValue; /// /// Whether to impute values by slot @@ -14938,7 +14938,7 @@ public MissingValueHandlerPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class MissingValueIndicatorTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class NAIndicatorTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// Name of the new column @@ -14985,15 +14985,15 @@ public MissingValueIndicator(params (string inputColumn, string outputColumn)[] public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -15001,7 +15001,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public MissingValueIndicatorTransformerColumn[] Column { get; set; } + public NAIndicatorTransformColumn[] Column { get; set; } /// /// Input dataset @@ -15056,7 +15056,7 @@ public MissingValueIndicatorPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class MissingValueDroppingTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class NADropTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// Name of the new column @@ -15103,15 +15103,15 @@ public MissingValuesDropper(params (string inputColumn, string outputColumn)[] i public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -15119,7 +15119,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// Columns to drop the NAs for /// - public MissingValueDroppingTransformerColumn[] Column { get; set; } + public NADropTransformColumn[] Column { get; set; } /// /// Input dataset @@ -15242,7 +15242,7 @@ public MissingValuesRowDropperPipelineStep(Output output) namespace Legacy.Transforms { - public enum MissingValueReplacingTransformerReplacementKind : byte + public enum NAReplaceTransformReplacementKind : byte { DefaultValue = 0, Mean = 1, @@ -15252,7 +15252,7 @@ public enum MissingValueReplacingTransformerReplacementKind : byte } - public sealed partial class MissingValueReplacingTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class NAReplaceTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// Replacement value for NAs (uses default value if not given) @@ -15262,7 +15262,7 @@ public sealed partial class MissingValueReplacingTransformerColumn : OneToOneCol /// /// The replacement method to utilize /// - public MissingValueReplacingTransformerReplacementKind? Kind { get; set; } + public NAReplaceTransformReplacementKind? Kind { get; set; } /// /// Whether to impute values by slot @@ -15314,15 +15314,15 @@ public MissingValueSubstitutor(params (string inputColumn, string outputColumn)[ public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -15330,12 +15330,12 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:rep:src) /// - public MissingValueReplacingTransformerColumn[] Column { get; set; } + public NAReplaceTransformColumn[] Column { get; set; } /// /// The replacement method to utilize /// - public MissingValueReplacingTransformerReplacementKind ReplacementKind { get; set; } = MissingValueReplacingTransformerReplacementKind.DefaultValue; + public NAReplaceTransformReplacementKind ReplacementKind { get; set; } = NAReplaceTransformReplacementKind.DefaultValue; /// /// Whether to impute values by slot @@ -15421,7 +15421,7 @@ public sealed class Output namespace Legacy.Transforms { - public enum NgramCountingEstimatorWeightingCriteria + public enum NgramTransformWeightingCriteria { Tf = 0, Idf = 1, @@ -15429,7 +15429,7 @@ public enum NgramCountingEstimatorWeightingCriteria } - public sealed partial class NgramCountingTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class NgramTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// Maximum ngram length @@ -15454,7 +15454,7 @@ public sealed partial class NgramCountingTransformerColumn : OneToOneColumn /// Statistical measure used to evaluate how important a word is to a document in a corpus /// - public NgramCountingEstimatorWeightingCriteria? Weighting { get; set; } + public NgramTransformWeightingCriteria? Weighting { get; set; } /// /// Name of the new column @@ -15500,15 +15500,15 @@ public NGramTranslator(params (string inputColumn, string outputColumn)[] inputO public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -15516,7 +15516,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public NgramCountingTransformerColumn[] Column { get; set; } + public NgramTransformColumn[] Column { get; set; } /// /// Maximum ngram length @@ -15541,7 +15541,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// The weighting criteria /// - public NgramCountingEstimatorWeightingCriteria Weighting { get; set; } = NgramCountingEstimatorWeightingCriteria.Tf; + public NgramTransformWeightingCriteria Weighting { get; set; } = NgramTransformWeightingCriteria.Tf; /// /// Input dataset @@ -16762,7 +16762,7 @@ public sealed partial class TermLoaderArguments /// /// How items should be ordered when vectorized. By default, they will be in the order encountered. If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a'). /// - public ValueToKeyMappingTransformerSortOrder Sort { get; set; } = ValueToKeyMappingTransformerSortOrder.Occurrence; + public TermTransformSortOrder Sort { get; set; } = TermTransformSortOrder.Occurrence; /// /// Drop unknown terms instead of mapping them to NA term. @@ -16940,15 +16940,15 @@ public TextToKeyConverter(params (string inputColumn, string outputColumn)[] inp public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -16956,7 +16956,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public ValueToKeyMappingTransformerColumn[] Column { get; set; } + public TermTransformColumn[] Column { get; set; } /// /// Maximum number of terms to keep per column when auto-training @@ -16971,7 +16971,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// How items should be ordered when vectorized. By default, they will be in the order encountered. If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a'). /// - public ValueToKeyMappingTransformerSortOrder Sort { get; set; } = ValueToKeyMappingTransformerSortOrder.Occurrence; + public TermTransformSortOrder Sort { get; set; } = TermTransformSortOrder.Occurrence; /// /// Whether key value metadata should be text, regardless of the actual input type @@ -17386,7 +17386,7 @@ public VectorToImagePipelineStep(Output output) namespace Legacy.Transforms { - public enum WordEmbeddingsExtractingTransformerPretrainedModelKind + public enum WordEmbeddingsTransformPretrainedModelKind { GloVe50D = 0, GloVe100D = 1, @@ -17401,7 +17401,7 @@ public enum WordEmbeddingsExtractingTransformerPretrainedModelKind } - public sealed partial class WordEmbeddingsExtractingTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class WordEmbeddingsTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// Name of the new column @@ -17448,15 +17448,15 @@ public WordEmbeddings(params (string inputColumn, string outputColumn)[] inputOu public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -17464,12 +17464,12 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) (optional form: name:src) /// - public WordEmbeddingsExtractingTransformerColumn[] Column { get; set; } + public WordEmbeddingsTransformColumn[] Column { get; set; } /// /// Pre-trained model used to create the vocabulary /// - public WordEmbeddingsExtractingTransformerPretrainedModelKind? ModelKind { get; set; } = WordEmbeddingsExtractingTransformerPretrainedModelKind.Sswe; + public WordEmbeddingsTransformPretrainedModelKind? ModelKind { get; set; } = WordEmbeddingsTransformPretrainedModelKind.Sswe; /// /// Filename for custom word embedding model @@ -17529,7 +17529,7 @@ public WordEmbeddingsPipelineStep(Output output) namespace Legacy.Transforms { - public sealed partial class WordTokenizingTransformerColumn : OneToOneColumn, IOneToOneColumn + public sealed partial class WordTokenizeTransformColumn : OneToOneColumn, IOneToOneColumn { /// /// Comma separated set of term separator(s). Commonly: 'space', 'comma', 'semicolon' or other single character. @@ -17581,15 +17581,15 @@ public WordTokenizer(params (string inputColumn, string outputColumn)[] inputOut public void AddColumn(string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(inputColumn)); Column = list.ToArray(); } public void AddColumn(string outputColumn, string inputColumn) { - var list = Column == null ? new List() : new List(Column); - list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); + var list = Column == null ? new List() : new List(Column); + list.Add(OneToOneColumn.Create(outputColumn, inputColumn)); Column = list.ToArray(); } @@ -17597,7 +17597,7 @@ public void AddColumn(string outputColumn, string inputColumn) /// /// New column definition(s) /// - public WordTokenizingTransformerColumn[] Column { get; set; } + public WordTokenizeTransformColumn[] Column { get; set; } /// /// Array of single character term separator(s). By default uses space character separator. @@ -20137,7 +20137,7 @@ public sealed class NGramNgramExtractor : NgramExtractor /// /// The weighting criteria /// - public Microsoft.ML.Legacy.Transforms.NgramCountingEstimatorWeightingCriteria Weighting { get; set; } = Microsoft.ML.Legacy.Transforms.NgramCountingEstimatorWeightingCriteria.Tf; + public Microsoft.ML.Legacy.Transforms.NgramTransformWeightingCriteria Weighting { get; set; } = Microsoft.ML.Legacy.Transforms.NgramTransformWeightingCriteria.Tf; internal override string ComponentName => "NGram"; } diff --git a/src/Microsoft.ML.Legacy/LearningPipeline.cs b/src/Microsoft.ML.Legacy/LearningPipeline.cs index 7544d2f112..e56e49f6a3 100644 --- a/src/Microsoft.ML.Legacy/LearningPipeline.cs +++ b/src/Microsoft.ML.Legacy/LearningPipeline.cs @@ -161,84 +161,86 @@ public PredictionModel Train() where TInput : class where TOutput : class, new() { - var environment = new MLContext(seed: _seed, conc: _conc); - Experiment experiment = environment.CreateExperiment(); - ILearningPipelineStep step = null; - List loaders = new List(); - List> transformModels = new List>(); - Var lastTransformModel = null; - - foreach (ILearningPipelineItem currentItem in this) + using (var environment = new ConsoleEnvironment(seed: _seed, conc: _conc)) { - if (currentItem is ILearningPipelineLoader loader) - loaders.Add(loader); + Experiment experiment = environment.CreateExperiment(); + ILearningPipelineStep step = null; + List loaders = new List(); + List> transformModels = new List>(); + Var lastTransformModel = null; - step = currentItem.ApplyStep(step, experiment); - if (step is ILearningPipelineDataStep dataStep && dataStep.Model != null) - transformModels.Add(dataStep.Model); - else if (step is ILearningPipelinePredictorStep predictorDataStep) + foreach (ILearningPipelineItem currentItem in this) { - if (lastTransformModel != null) - transformModels.Insert(0, lastTransformModel); + if (currentItem is ILearningPipelineLoader loader) + loaders.Add(loader); - Var predictorModel; - if (transformModels.Count != 0) + step = currentItem.ApplyStep(step, experiment); + if (step is ILearningPipelineDataStep dataStep && dataStep.Model != null) + transformModels.Add(dataStep.Model); + else if (step is ILearningPipelinePredictorStep predictorDataStep) { - var localModelInput = new Transforms.ManyHeterogeneousModelCombiner + if (lastTransformModel != null) + transformModels.Insert(0, lastTransformModel); + + Var predictorModel; + if (transformModels.Count != 0) { - PredictorModel = predictorDataStep.Model, - TransformModels = new ArrayVar(transformModels.ToArray()) + var localModelInput = new Transforms.ManyHeterogeneousModelCombiner + { + PredictorModel = predictorDataStep.Model, + TransformModels = new ArrayVar(transformModels.ToArray()) + }; + var localModelOutput = experiment.Add(localModelInput); + predictorModel = localModelOutput.PredictorModel; + } + else + predictorModel = predictorDataStep.Model; + + var scorer = new Transforms.Scorer + { + PredictorModel = predictorModel }; - var localModelOutput = experiment.Add(localModelInput); - predictorModel = localModelOutput.PredictorModel; + + var scorerOutput = experiment.Add(scorer); + lastTransformModel = scorerOutput.ScoringTransform; + step = new ScorerPipelineStep(scorerOutput.ScoredData, scorerOutput.ScoringTransform); + transformModels.Clear(); } - else - predictorModel = predictorDataStep.Model; + } - var scorer = new Transforms.Scorer + if (transformModels.Count > 0) + { + if (lastTransformModel != null) + transformModels.Insert(0, lastTransformModel); + + var modelInput = new Transforms.ModelCombiner { - PredictorModel = predictorModel + Models = new ArrayVar(transformModels.ToArray()) }; - var scorerOutput = experiment.Add(scorer); - lastTransformModel = scorerOutput.ScoringTransform; - step = new ScorerPipelineStep(scorerOutput.ScoredData, scorerOutput.ScoringTransform); - transformModels.Clear(); + var modelOutput = experiment.Add(modelInput); + lastTransformModel = modelOutput.OutputModel; } - } - if (transformModels.Count > 0) - { - if (lastTransformModel != null) - transformModels.Insert(0, lastTransformModel); - - var modelInput = new Transforms.ModelCombiner + experiment.Compile(); + foreach (ILearningPipelineLoader loader in loaders) { - Models = new ArrayVar(transformModels.ToArray()) - }; - - var modelOutput = experiment.Add(modelInput); - lastTransformModel = modelOutput.OutputModel; - } - - experiment.Compile(); - foreach (ILearningPipelineLoader loader in loaders) - { - loader.SetInput(environment, experiment); - } - experiment.Run(); + loader.SetInput(environment, experiment); + } + experiment.Run(); - ITransformModel model = experiment.GetOutput(lastTransformModel); - BatchPredictionEngine predictor; - using (var memoryStream = new MemoryStream()) - { - model.Save(environment, memoryStream); + ITransformModel model = experiment.GetOutput(lastTransformModel); + BatchPredictionEngine predictor; + using (var memoryStream = new MemoryStream()) + { + model.Save(environment, memoryStream); - memoryStream.Position = 0; + memoryStream.Position = 0; - predictor = environment.CreateBatchPredictionEngine(memoryStream); + predictor = environment.CreateBatchPredictionEngine(memoryStream); - return new PredictionModel(predictor, memoryStream); + return new PredictionModel(predictor, memoryStream); + } } } diff --git a/src/Microsoft.ML.Legacy/LearningPipelineDebugProxy.cs b/src/Microsoft.ML.Legacy/LearningPipelineDebugProxy.cs index 586dbf99e3..af99d8ff3c 100644 --- a/src/Microsoft.ML.Legacy/LearningPipelineDebugProxy.cs +++ b/src/Microsoft.ML.Legacy/LearningPipelineDebugProxy.cs @@ -2,7 +2,6 @@ // 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; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Legacy.Transforms; using System; @@ -26,7 +25,7 @@ internal sealed class LearningPipelineDebugProxy private const int MaxSlotNamesToDisplay = 100; private readonly LearningPipeline _pipeline; - private readonly IHostEnvironment _environment; + private readonly ConsoleEnvironment _environment; private IDataView _preview; private Exception _pipelineExecutionException; private PipelineItemDebugColumn[] _columns; @@ -40,7 +39,7 @@ public LearningPipelineDebugProxy(LearningPipeline pipeline) _pipeline = new LearningPipeline(); // use a ConcurrencyFactor of 1 so other threads don't need to run in the debugger - _environment = new MLContext(conc: 1); + _environment = new ConsoleEnvironment(conc: 1); foreach (ILearningPipelineItem item in pipeline) { diff --git a/src/Microsoft.ML.Legacy/Microsoft.ML.Legacy.csproj b/src/Microsoft.ML.Legacy/Microsoft.ML.Legacy.csproj index ec7d25d104..6e4034aa24 100644 --- a/src/Microsoft.ML.Legacy/Microsoft.ML.Legacy.csproj +++ b/src/Microsoft.ML.Legacy/Microsoft.ML.Legacy.csproj @@ -6,6 +6,10 @@ CORECLR + + + + @@ -24,4 +28,4 @@ - \ No newline at end of file + diff --git a/src/Microsoft.ML.Legacy/Models/BinaryClassificationEvaluator.cs b/src/Microsoft.ML.Legacy/Models/BinaryClassificationEvaluator.cs index 2f2bce8016..71b32a323a 100644 --- a/src/Microsoft.ML.Legacy/Models/BinaryClassificationEvaluator.cs +++ b/src/Microsoft.ML.Legacy/Models/BinaryClassificationEvaluator.cs @@ -24,52 +24,54 @@ public sealed partial class BinaryClassificationEvaluator /// public BinaryClassificationMetrics Evaluate(PredictionModel model, ILearningPipelineLoader testData) { - var environment = new MLContext(); - environment.CheckValue(model, nameof(model)); - environment.CheckValue(testData, nameof(testData)); + using (var environment = new ConsoleEnvironment()) + { + environment.CheckValue(model, nameof(model)); + environment.CheckValue(testData, nameof(testData)); - Experiment experiment = environment.CreateExperiment(); + Experiment experiment = environment.CreateExperiment(); - ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); - if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) - { - throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); - } + ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); + if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) + { + throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); + } - var datasetScorer = new DatasetTransformScorer - { - Data = testDataOutput.Data - }; - DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); + var datasetScorer = new DatasetTransformScorer + { + Data = testDataOutput.Data + }; + DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); - Data = scoreOutput.ScoredData; - Output evaluteOutput = experiment.Add(this); + Data = scoreOutput.ScoredData; + Output evaluteOutput = experiment.Add(this); - experiment.Compile(); + experiment.Compile(); - experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); - testData.SetInput(environment, experiment); + experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); + testData.SetInput(environment, experiment); - experiment.Run(); + experiment.Run(); - IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); - if (overallMetrics == null) - { - throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(BinaryClassificationEvaluator)} Evaluate."); - } + IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); + if (overallMetrics == null) + { + throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(BinaryClassificationEvaluator)} Evaluate."); + } - IDataView confusionMatrix = experiment.GetOutput(evaluteOutput.ConfusionMatrix); - if (confusionMatrix == null) - { - throw environment.Except($"Could not find ConfusionMatrix in the results returned in {nameof(BinaryClassificationEvaluator)} Evaluate."); - } + IDataView confusionMatrix = experiment.GetOutput(evaluteOutput.ConfusionMatrix); + if (confusionMatrix == null) + { + throw environment.Except($"Could not find ConfusionMatrix in the results returned in {nameof(BinaryClassificationEvaluator)} Evaluate."); + } - var metric = BinaryClassificationMetrics.FromMetrics(environment, overallMetrics, confusionMatrix); + var metric = BinaryClassificationMetrics.FromMetrics(environment, overallMetrics, confusionMatrix); - if (metric.Count != 1) - throw environment.Except($"Exactly one metric set was expected but found {metric.Count} metrics"); + if (metric.Count != 1) + throw environment.Except($"Exactly one metric set was expected but found {metric.Count} metrics"); - return metric[0]; + return metric[0]; + } } } } diff --git a/src/Microsoft.ML.Legacy/Models/ClassificationEvaluator.cs b/src/Microsoft.ML.Legacy/Models/ClassificationEvaluator.cs index 5d644baf32..63e7f8055e 100644 --- a/src/Microsoft.ML.Legacy/Models/ClassificationEvaluator.cs +++ b/src/Microsoft.ML.Legacy/Models/ClassificationEvaluator.cs @@ -25,52 +25,54 @@ public sealed partial class ClassificationEvaluator /// public ClassificationMetrics Evaluate(PredictionModel model, ILearningPipelineLoader testData) { - var environment = new MLContext(); - environment.CheckValue(model, nameof(model)); - environment.CheckValue(testData, nameof(testData)); + using (var environment = new ConsoleEnvironment()) + { + environment.CheckValue(model, nameof(model)); + environment.CheckValue(testData, nameof(testData)); - Experiment experiment = environment.CreateExperiment(); + Experiment experiment = environment.CreateExperiment(); - ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); - if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) - { - throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); - } + ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); + if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) + { + throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); + } - var datasetScorer = new DatasetTransformScorer - { - Data = testDataOutput.Data, - }; - DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); + var datasetScorer = new DatasetTransformScorer + { + Data = testDataOutput.Data, + }; + DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); - Data = scoreOutput.ScoredData; - Output evaluteOutput = experiment.Add(this); + Data = scoreOutput.ScoredData; + Output evaluteOutput = experiment.Add(this); - experiment.Compile(); + experiment.Compile(); - experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); - testData.SetInput(environment, experiment); + experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); + testData.SetInput(environment, experiment); - experiment.Run(); + experiment.Run(); - IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); - if (overallMetrics == null) - { - throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(ClassificationEvaluator)} Evaluate."); - } + IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); + if (overallMetrics == null) + { + throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(ClassificationEvaluator)} Evaluate."); + } - IDataView confusionMatrix = experiment.GetOutput(evaluteOutput.ConfusionMatrix); - if (confusionMatrix == null) - { - throw environment.Except($"Could not find ConfusionMatrix in the results returned in {nameof(ClassificationEvaluator)} Evaluate."); - } + IDataView confusionMatrix = experiment.GetOutput(evaluteOutput.ConfusionMatrix); + if (confusionMatrix == null) + { + throw environment.Except($"Could not find ConfusionMatrix in the results returned in {nameof(ClassificationEvaluator)} Evaluate."); + } - var metric = ClassificationMetrics.FromMetrics(environment, overallMetrics, confusionMatrix); + var metric = ClassificationMetrics.FromMetrics(environment, overallMetrics, confusionMatrix); - if (metric.Count != 1) - throw environment.Except($"Exactly one metric set was expected but found {metric.Count} metrics"); + if (metric.Count != 1) + throw environment.Except($"Exactly one metric set was expected but found {metric.Count} metrics"); - return metric[0]; + return metric[0]; + } } } } diff --git a/src/Microsoft.ML.Legacy/Models/ClusterEvaluator.cs b/src/Microsoft.ML.Legacy/Models/ClusterEvaluator.cs index 5d12ad85f9..411c85b176 100644 --- a/src/Microsoft.ML.Legacy/Models/ClusterEvaluator.cs +++ b/src/Microsoft.ML.Legacy/Models/ClusterEvaluator.cs @@ -24,46 +24,48 @@ public sealed partial class ClusterEvaluator /// public ClusterMetrics Evaluate(PredictionModel model, ILearningPipelineLoader testData) { - var environment = new MLContext(); - environment.CheckValue(model, nameof(model)); - environment.CheckValue(testData, nameof(testData)); + using (var environment = new ConsoleEnvironment()) + { + environment.CheckValue(model, nameof(model)); + environment.CheckValue(testData, nameof(testData)); - Experiment experiment = environment.CreateExperiment(); + Experiment experiment = environment.CreateExperiment(); - ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); - if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) - { - throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); - } + ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); + if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) + { + throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); + } - var datasetScorer = new DatasetTransformScorer - { - Data = testDataOutput.Data, - }; - DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); + var datasetScorer = new DatasetTransformScorer + { + Data = testDataOutput.Data, + }; + DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); - Data = scoreOutput.ScoredData; - Output evaluteOutput = experiment.Add(this); + Data = scoreOutput.ScoredData; + Output evaluteOutput = experiment.Add(this); - experiment.Compile(); + experiment.Compile(); - experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); - testData.SetInput(environment, experiment); + experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); + testData.SetInput(environment, experiment); - experiment.Run(); + experiment.Run(); - IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); + IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); - if (overallMetrics == null) - { - throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(ClusterEvaluator)} Evaluate."); - } + if (overallMetrics == null) + { + throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(ClusterEvaluator)} Evaluate."); + } - var metric = ClusterMetrics.FromOverallMetrics(environment, overallMetrics); + var metric = ClusterMetrics.FromOverallMetrics(environment, overallMetrics); - Contracts.Assert(metric.Count == 1, $"Exactly one metric set was expected but found {metric.Count} metrics"); + Contracts.Assert(metric.Count == 1, $"Exactly one metric set was expected but found {metric.Count} metrics"); - return metric[0]; + return metric[0]; + } } } } diff --git a/src/Microsoft.ML.Legacy/Models/ConfusionMatrix.cs b/src/Microsoft.ML.Legacy/Models/ConfusionMatrix.cs index 04c978ea44..d8bb404d49 100644 --- a/src/Microsoft.ML.Legacy/Models/ConfusionMatrix.cs +++ b/src/Microsoft.ML.Legacy/Models/ConfusionMatrix.cs @@ -75,10 +75,9 @@ internal static List Create(IHostEnvironment env, IDataView con elements = new double[type.VectorSize, type.VectorSize]; countGetter(ref countValues); - ReadOnlySpan values = countValues.GetValues(); - for (int i = 0; i < values.Length; i++) + for (int i = 0; i < countValues.Length; i++) { - elements[valuesRowIndex, i] = values[i]; + elements[valuesRowIndex, i] = countValues.Values[i]; } valuesRowIndex++; diff --git a/src/Microsoft.ML.Legacy/Models/CrossValidator.cs b/src/Microsoft.ML.Legacy/Models/CrossValidator.cs index 96be9db419..d9d133a779 100644 --- a/src/Microsoft.ML.Legacy/Models/CrossValidator.cs +++ b/src/Microsoft.ML.Legacy/Models/CrossValidator.cs @@ -27,7 +27,7 @@ public CrossValidationOutput CrossValidate(Lea where TInput : class where TOutput : class, new() { - var environment = new MLContext(); + using (var environment = new ConsoleEnvironment()) { Experiment subGraph = environment.CreateExperiment(); ILearningPipelineStep step = null; diff --git a/src/Microsoft.ML.Legacy/Models/OneVersusAll.cs b/src/Microsoft.ML.Legacy/Models/OneVersusAll.cs index 3269556f1f..acd756556a 100644 --- a/src/Microsoft.ML.Legacy/Models/OneVersusAll.cs +++ b/src/Microsoft.ML.Legacy/Models/OneVersusAll.cs @@ -52,24 +52,26 @@ public OvaPipelineItem(ITrainerInputWithLabel trainer, bool useProbabilities) public ILearningPipelineStep ApplyStep(ILearningPipelineStep previousStep, Experiment experiment) { - var env = new MLContext(); - var subgraph = env.CreateExperiment(); - subgraph.Add(_trainer); - var ova = new OneVersusAll(); - if (previousStep != null) + using (var env = new ConsoleEnvironment()) { - if (!(previousStep is ILearningPipelineDataStep dataStep)) + var subgraph = env.CreateExperiment(); + subgraph.Add(_trainer); + var ova = new OneVersusAll(); + if (previousStep != null) { - throw new InvalidOperationException($"{ nameof(OneVersusAll)} only supports an { nameof(ILearningPipelineDataStep)} as an input."); - } + if (!(previousStep is ILearningPipelineDataStep dataStep)) + { + throw new InvalidOperationException($"{ nameof(OneVersusAll)} only supports an { nameof(ILearningPipelineDataStep)} as an input."); + } - _data = dataStep.Data; - ova.TrainingData = dataStep.Data; - ova.UseProbabilities = _useProbabilities; - ova.Nodes = subgraph; + _data = dataStep.Data; + ova.TrainingData = dataStep.Data; + ova.UseProbabilities = _useProbabilities; + ova.Nodes = subgraph; + } + Output output = experiment.Add(ova); + return new OvaPipelineStep(output); } - Output output = experiment.Add(ova); - return new OvaPipelineStep(output); } public Var GetInputData() => _data; diff --git a/src/Microsoft.ML.Legacy/Models/OnnxConverter.cs b/src/Microsoft.ML.Legacy/Models/OnnxConverter.cs index 0c9eca3ee8..c49c71cf71 100644 --- a/src/Microsoft.ML.Legacy/Models/OnnxConverter.cs +++ b/src/Microsoft.ML.Legacy/Models/OnnxConverter.cs @@ -70,14 +70,16 @@ public sealed partial class OnnxConverter /// Model that needs to be converted to ONNX format. public void Convert(PredictionModel model) { - var environment = new MLContext(); - environment.CheckValue(model, nameof(model)); + using (var environment = new ConsoleEnvironment()) + { + environment.CheckValue(model, nameof(model)); - Experiment experiment = environment.CreateExperiment(); - experiment.Add(this); - experiment.Compile(); - experiment.SetInput(Model, model.PredictorModel); - experiment.Run(); + Experiment experiment = environment.CreateExperiment(); + experiment.Add(this); + experiment.Compile(); + experiment.SetInput(Model, model.PredictorModel); + experiment.Run(); + } } } } diff --git a/src/Microsoft.ML.Legacy/Models/RegressionEvaluator.cs b/src/Microsoft.ML.Legacy/Models/RegressionEvaluator.cs index ffee6108c6..35a7fd7500 100644 --- a/src/Microsoft.ML.Legacy/Models/RegressionEvaluator.cs +++ b/src/Microsoft.ML.Legacy/Models/RegressionEvaluator.cs @@ -24,47 +24,49 @@ public sealed partial class RegressionEvaluator /// public RegressionMetrics Evaluate(PredictionModel model, ILearningPipelineLoader testData) { - var environment = new MLContext(); - environment.CheckValue(model, nameof(model)); - environment.CheckValue(testData, nameof(testData)); + using (var environment = new ConsoleEnvironment()) + { + environment.CheckValue(model, nameof(model)); + environment.CheckValue(testData, nameof(testData)); - Experiment experiment = environment.CreateExperiment(); + Experiment experiment = environment.CreateExperiment(); - ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); - if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) - { - throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); - } + ILearningPipelineStep testDataStep = testData.ApplyStep(previousStep: null, experiment); + if (!(testDataStep is ILearningPipelineDataStep testDataOutput)) + { + throw environment.Except($"The {nameof(ILearningPipelineLoader)} did not return a {nameof(ILearningPipelineDataStep)} from ApplyStep."); + } - var datasetScorer = new DatasetTransformScorer - { - Data = testDataOutput.Data, - }; - DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); + var datasetScorer = new DatasetTransformScorer + { + Data = testDataOutput.Data, + }; + DatasetTransformScorer.Output scoreOutput = experiment.Add(datasetScorer); - Data = scoreOutput.ScoredData; - Output evaluteOutput = experiment.Add(this); + Data = scoreOutput.ScoredData; + Output evaluteOutput = experiment.Add(this); - experiment.Compile(); + experiment.Compile(); - experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); - testData.SetInput(environment, experiment); + experiment.SetInput(datasetScorer.TransformModel, model.PredictorModel); + testData.SetInput(environment, experiment); - experiment.Run(); + experiment.Run(); - IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); + IDataView overallMetrics = experiment.GetOutput(evaluteOutput.OverallMetrics); - if (overallMetrics == null) - { - throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(RegressionEvaluator)} Evaluate."); - } + if (overallMetrics == null) + { + throw environment.Except($"Could not find OverallMetrics in the results returned in {nameof(RegressionEvaluator)} Evaluate."); + } - var metric = RegressionMetrics.FromOverallMetrics(environment, overallMetrics); + var metric = RegressionMetrics.FromOverallMetrics(environment, overallMetrics); - if (metric.Count != 1) - throw environment.Except($"Exactly one metric set was expected but found {metric.Count} metrics"); + if (metric.Count != 1) + throw environment.Except($"Exactly one metric set was expected but found {metric.Count} metrics"); - return metric[0]; + return metric[0]; + } } } } diff --git a/src/Microsoft.ML.Legacy/Models/TrainTestEvaluator.cs b/src/Microsoft.ML.Legacy/Models/TrainTestEvaluator.cs index dbf5df1b50..6972b8cf3e 100644 --- a/src/Microsoft.ML.Legacy/Models/TrainTestEvaluator.cs +++ b/src/Microsoft.ML.Legacy/Models/TrainTestEvaluator.cs @@ -30,7 +30,7 @@ public TrainTestEvaluatorOutput TrainTestEvaluate /// Returns labels that correspond to indices of the score array in the case of @@ -36,7 +40,7 @@ internal PredictionModel(Stream stream) public bool TryGetScoreLabelNames(out string[] names, string scoreColumnName = DefaultColumnNames.Score) { names = null; - var schema = PredictorModel.OutputSchema; + var schema = _predictorModel.OutputSchema; int colIndex = -1; if (!schema.TryGetColumnIndex(scoreColumnName, out colIndex)) return false; @@ -121,13 +125,15 @@ public static Task> ReadAsync( if (stream == null) throw new ArgumentNullException(nameof(stream)); - var environment = new MLContext(); - AssemblyRegistration.RegisterAssemblies(environment); + using (var environment = new ConsoleEnvironment()) + { + AssemblyRegistration.RegisterAssemblies(environment); - BatchPredictionEngine predictor = - environment.CreateBatchPredictionEngine(stream); + BatchPredictionEngine predictor = + environment.CreateBatchPredictionEngine(stream); - return Task.FromResult(new PredictionModel(predictor, stream)); + return Task.FromResult(new PredictionModel(predictor, stream)); + } } /// @@ -135,7 +141,7 @@ public static Task> ReadAsync( /// /// Incoming IDataView /// IDataView which contains predictions - public IDataView Predict(IDataView input) => PredictorModel.Apply(_env, input); + public IDataView Predict(IDataView input) => _predictorModel.Apply(_env, input); /// /// Save model to file. @@ -162,7 +168,7 @@ public Task WriteAsync(Stream stream) { if (stream == null) throw new ArgumentNullException(nameof(stream)); - PredictorModel.Save(_env, stream); + _predictorModel.Save(_env, stream); return Task.CompletedTask; } } diff --git a/src/Microsoft.ML.Legacy/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Legacy/Properties/AssemblyInfo.cs index 70fe21adb6..52835b2f81 100644 --- a/src/Microsoft.ML.Legacy/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Legacy/Properties/AssemblyInfo.cs @@ -2,8 +2,8 @@ // 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; +using System.Reflection; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; -[assembly: InternalsVisibleTo("Microsoft.ML.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo("Microsoft.ML.Core.Tests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo("Microsoft.ML.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")] diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CVSplit.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CVSplit.cs index 0b7f0fe94a..a99d3a9f6e 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CVSplit.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CVSplit.cs @@ -68,11 +68,11 @@ public static Output Split(IHostEnvironment env, Input input) { var trainData = new RangeFilter(host, new RangeFilter.Arguments { Column = stratCol, Min = i * fraction, Max = (i + 1) * fraction, Complement = true }, data); - output.TrainData[i] = ColumnSelectingTransformer.CreateDrop(host, trainData, stratCol); + output.TrainData[i] = SelectColumnsTransform.CreateDrop(host, trainData, stratCol); var testData = new RangeFilter(host, new RangeFilter.Arguments { Column = stratCol, Min = i * fraction, Max = (i + 1) * fraction, Complement = false }, data); - output.TestData[i] = ColumnSelectingTransformer.CreateDrop(host, testData, stratCol); + output.TestData[i] = SelectColumnsTransform.CreateDrop(host, testData, stratCol); } return output; diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/EntryPointGeneratorBase.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/EntryPointGeneratorBase.cs index e5bc4f4cd6..3018e08fb8 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/EntryPointGeneratorBase.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/EntryPointGeneratorBase.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.CodeDom.Compiler; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Internal.Utilities; @@ -11,7 +10,7 @@ namespace Microsoft.ML.Runtime.EntryPoints.CodeGen { internal abstract class EntryPointGeneratorBase : GeneratorBase { - protected override void GenerateContent(IndentedTextWriter writer, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) + protected override void GenerateContent(IndentingTextWriter writer, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) { GenerateSummaryComment(writer, component); GenerateReturnComment(writer); @@ -22,9 +21,9 @@ protected override void GenerateContent(IndentedTextWriter writer, string prefix GenerateImplCall(writer, prefix, component); } - protected abstract void GenerateSummaryComment(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component); + protected abstract void GenerateSummaryComment(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component); - protected void GenerateSummaryComment(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) + protected void GenerateSummaryComment(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) { if (Exclude.Contains(arg.LongName)) return; @@ -32,18 +31,18 @@ protected void GenerateSummaryComment(IndentedTextWriter w, CmdParser.ArgInfo.Ar GenerateParameterComment(w, arg.LongName + argSuffix, arg.HelpText); } - protected void GenerateParameterComment(IndentedTextWriter w, string name, string description) + protected void GenerateParameterComment(IndentingTextWriter w, string name, string description) { w.WriteLine("/// {1}", name, description); } - protected abstract void GenerateReturnComment(IndentedTextWriter w); + protected abstract void GenerateReturnComment(IndentingTextWriter w); - protected abstract void GenerateModuleAttribute(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId); + protected abstract void GenerateModuleAttribute(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId); - protected abstract void GenerateOutputPort(IndentedTextWriter w); + protected abstract void GenerateOutputPort(IndentingTextWriter w); - protected void GenerateModuleType(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component) + protected void GenerateModuleType(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component) { string cat; if (component.IsOfType(typeof(SignatureBinaryClassifierTrainer))) @@ -59,9 +58,9 @@ protected void GenerateModuleType(IndentedTextWriter w, ComponentCatalog.Loadabl w.WriteLine("[DataLabModuleType(Type = ModuleType.{0})]", cat); } - protected abstract void GenerateMethodSignature(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component); + protected abstract void GenerateMethodSignature(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component); - protected void GenerateMethodSignature(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string parent, string parentType, string parentValue, ref string linePrefix, string argSuffix) + protected void GenerateMethodSignature(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string parent, string parentType, string parentValue, ref string linePrefix, string argSuffix) { if (Exclude.Contains(arg.LongName)) return; @@ -80,7 +79,7 @@ protected void GenerateMethodSignature(IndentedTextWriter w, CmdParser.ArgInfo.A } } - protected void GenerateDataLabParameterAttribute(IndentedTextWriter w, string friendlyName, + protected void GenerateDataLabParameterAttribute(IndentingTextWriter w, string friendlyName, bool isOptional, string displayName, object defaultValue, string description, string parent = null, string parentType = null, string parentValue = null) { @@ -94,9 +93,9 @@ protected void GenerateDataLabParameterAttribute(IndentedTextWriter w, string fr friendlyName, isOptional ? "true" : "false", displayName, p, pv, dv, description); } - protected abstract void GenerateImplCall(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component); + protected abstract void GenerateImplCall(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component); - protected void GenerateImplCall(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) + protected void GenerateImplCall(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) { if (Exclude.Contains(arg.LongName)) return; @@ -120,7 +119,7 @@ protected override string GetCSharpTypeName(Type type) return base.GetCSharpTypeName(type); } - protected override void GenerateUsings(IndentedTextWriter w) + protected override void GenerateUsings(IndentingTextWriter w) { w.WriteLine("using System;"); w.WriteLine("using System.Diagnostics.CodeAnalysis;"); diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/GeneratorBase.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/GeneratorBase.cs index 4bad797a57..562d4dacde 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/GeneratorBase.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/GeneratorBase.cs @@ -9,7 +9,6 @@ using Microsoft.ML.Transforms; using System; using System.CodeDom; -using System.CodeDom.Compiler; using System.Collections.Generic; using System.Reflection; @@ -44,7 +43,7 @@ internal abstract class GeneratorBase /// /// The set of parameters to exclude /// The set of extra namespaces - public void Generate(IndentedTextWriter writer, string prefix, string regenerate, ComponentCatalog.LoadableClassInfo component, + public void Generate(IndentingTextWriter writer, string prefix, string regenerate, ComponentCatalog.LoadableClassInfo component, string moduleId, string moduleName, string moduleOwner, string moduleVersion, string moduleState, string moduleType, string moduleDeterminism, string moduleCategory, HashSet exclude, HashSet namespaces) { @@ -70,7 +69,7 @@ public void Generate(IndentedTextWriter writer, string prefix, string regenerate GenerateFooter(writer); } - private void GenerateHeader(IndentedTextWriter w, string regenerate) + private void GenerateHeader(IndentingTextWriter w, string regenerate) { w.WriteLine("//------------------------------------------------------------------------------"); w.WriteLine("// "); @@ -93,9 +92,9 @@ private void GenerateHeader(IndentedTextWriter w, string regenerate) GenerateUsings(w); } - protected abstract void GenerateUsings(IndentedTextWriter w); + protected abstract void GenerateUsings(IndentingTextWriter w); - protected virtual void GenerateClassName(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) + protected virtual void GenerateClassName(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.WriteLine(); var className = prefix + component.LoadNames[0]; @@ -104,9 +103,9 @@ protected virtual void GenerateClassName(IndentedTextWriter w, string prefix, Co w.WriteLine("{"); } - protected abstract void GenerateContent(IndentedTextWriter writer, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId); + protected abstract void GenerateContent(IndentingTextWriter writer, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId); - private void GenerateFooter(IndentedTextWriter w) + private void GenerateFooter(IndentingTextWriter w) { w.WriteLine("}"); } @@ -150,7 +149,7 @@ protected bool IsTrainer(Type sigType) sigType == typeof(SignatureSequenceTrainer); } - protected virtual void GenerateParameter(IndentedTextWriter w, string type, string name) + protected virtual void GenerateParameter(IndentingTextWriter w, string type, string name) { w.Write("{0} {1}", type, name); } diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ImplGeneratorBase.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ImplGeneratorBase.cs index 287481245f..910115d3ea 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ImplGeneratorBase.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ImplGeneratorBase.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.CodeDom.Compiler; using System.Linq; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; @@ -13,7 +12,7 @@ namespace Microsoft.ML.Runtime.EntryPoints.CodeGen { internal abstract class ImplGeneratorBase : GeneratorBase { - protected override void GenerateContent(IndentedTextWriter writer, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) + protected override void GenerateContent(IndentingTextWriter writer, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) { GenerateImplFields(writer, component, (w, a) => GenerateFieldsOrProperties(w, a, "", GenerateField)); GenerateImplFields(writer, component, (w, a) => GenerateFieldsOrProperties(w, a, "", GenerateProperty)); @@ -21,8 +20,8 @@ protected override void GenerateContent(IndentedTextWriter writer, string prefix GenerateImplBody(writer, component); } - protected void GenerateImplFields(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component, - Action fieldGenerator) + protected void GenerateImplFields(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component, + Action fieldGenerator) { var argumentInfo = CmdParser.GetArgInfo(component.ArgType, component.CreateArguments()); var arguments = argumentInfo.Args.Where(a => !a.IsHidden).ToArray(); @@ -34,8 +33,8 @@ protected void GenerateImplFields(IndentedTextWriter w, ComponentCatalog.Loadabl /// Generates private fields and public properties for all the fields in the arguments. /// Recursively generate fields and properties for subcomponents. /// - protected void GenerateFieldsOrProperties(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix, - Action oneFieldGenerator) + protected void GenerateFieldsOrProperties(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix, + Action oneFieldGenerator) { if (Exclude.Contains(arg.LongName)) return; @@ -46,14 +45,14 @@ protected void GenerateFieldsOrProperties(IndentedTextWriter w, CmdParser.ArgInf oneFieldGenerator(w, typeName, arg.LongName + argSuffix, defVal, arg.ItemType == typeof(bool), arg.HelpText); } - protected static void GenerateField(IndentedTextWriter w, string typeName, string argName, string defVal, + protected static void GenerateField(IndentingTextWriter w, string typeName, string argName, string defVal, bool isBool, string helpText) { w.WriteLine("private {0} {1}{2};", typeName, argName, defVal); w.WriteLine(); } - protected static void GenerateProperty(IndentedTextWriter w, string typeName, string argName, string defVal, + protected static void GenerateProperty(IndentingTextWriter w, string typeName, string argName, string defVal, bool isBool, string helpText) { var help = helpText ?? argName; @@ -70,12 +69,12 @@ protected static void GenerateProperty(IndentedTextWriter w, string typeName, st w.WriteLine(); } - protected abstract void GenerateMethodSignature(IndentedTextWriter w, string prefix, + protected abstract void GenerateMethodSignature(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component); - protected abstract void GenerateImplBody(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component); + protected abstract void GenerateImplBody(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component); - protected void GenerateImplBody(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) + protected void GenerateImplBody(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) { if (Exclude.Contains(arg.LongName)) return; @@ -93,7 +92,7 @@ protected void GenerateImplBody(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, w.WriteLine("args{0}.{1} = {2};", argSuffix, arg.LongName, arg.LongName + argSuffix); } - protected override void GenerateUsings(IndentedTextWriter w) + protected override void GenerateUsings(IndentingTextWriter w) { w.WriteLine("using System;"); w.WriteLine("using System.Linq;"); diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/LearnerGenerators.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/LearnerGenerators.cs index 396abc1380..1cafa36ac3 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/LearnerGenerators.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/LearnerGenerators.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.CodeDom.Compiler; using System.IO; using System.Linq; using Microsoft.ML.Runtime.CommandLine; @@ -13,7 +12,7 @@ namespace Microsoft.ML.Runtime.EntryPoints.CodeGen { internal class LearnerImplGenerator : ImplGeneratorBase { - protected override void GenerateMethodSignature(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateMethodSignature(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("/// "); w.WriteLine("/// Creates a {0}", component.LoadNames[0]); @@ -22,7 +21,7 @@ protected override void GenerateMethodSignature(IndentedTextWriter w, string pre w.WriteLine("public Tuple GetTlcSettings()"); } - protected override void GenerateImplBody(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateImplBody(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("{"); using (w.Nest()) @@ -41,7 +40,7 @@ protected override void GenerateImplBody(IndentedTextWriter w, ComponentCatalog. internal sealed class LearnerEntryPointGenerator : EntryPointGeneratorBase { - protected override void GenerateSummaryComment(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateSummaryComment(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("/// "); var desc = component.Summary ?? component.LoadNames[0]; @@ -58,12 +57,12 @@ protected override void GenerateSummaryComment(IndentedTextWriter w, ComponentCa GenerateSummaryComment(w, arg, ""); } - protected override void GenerateReturnComment(IndentedTextWriter w) + protected override void GenerateReturnComment(IndentingTextWriter w) { w.WriteLine("/// An untrained model."); } - protected override void GenerateModuleAttribute(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) + protected override void GenerateModuleAttribute(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) { if (!string.IsNullOrEmpty(prefix)) prefix += " "; @@ -95,13 +94,13 @@ protected override void GenerateModuleAttribute(IndentedTextWriter w, string pre } } - protected override void GenerateOutputPort(IndentedTextWriter w) + protected override void GenerateOutputPort(IndentingTextWriter w) { w.WriteLine( "[DataLabOutputPort(FriendlyName = \"Untrained model\", DisplayName = \"Untrained model\", Position = 0, DataType = WellKnownDataTypeIds.ITrainerDotNet, Description = \"An untrained model.\")]"); } - protected override void GenerateMethodSignature(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateMethodSignature(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.Write("public static Tuple Create{0}{1}(", prefix, component.LoadNames[0]); using (w.Nest()) @@ -115,7 +114,7 @@ protected override void GenerateMethodSignature(IndentedTextWriter w, string pre } } - protected override void GenerateImplCall(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateImplCall(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("{"); using (w.Nest()) diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ModuleGenerator.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ModuleGenerator.cs index d1377ce1f0..c612197f31 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ModuleGenerator.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/ModuleGenerator.cs @@ -5,7 +5,6 @@ #pragma warning disable 420 // volatile with Interlocked.CompareExchange using System; -using System.CodeDom.Compiler; using System.Collections.Generic; using System.IO; using System.Linq; @@ -22,7 +21,7 @@ namespace Microsoft.ML.Runtime.EntryPoints.CodeGen { - internal sealed class ModuleGenerator : IGenerator + public class ModuleGenerator : IGenerator { private readonly string _modulePrefix; private readonly bool _generateModule; @@ -206,7 +205,7 @@ private void GenerateFile(ComponentCatalog.LoadableClassInfo info, string filena { using (var sw = new StreamWriter(filename)) { - var writer = new IndentedTextWriter(sw, " "); + var writer = IndentingTextWriter.Wrap(sw, " "); foreach (var kvp in mapping) { if (info.IsOfType(kvp.Key)) diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/TransformGenerators.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/TransformGenerators.cs index facb3cfc5a..b17efbbbe8 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/TransformGenerators.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/CodeGen/TransformGenerators.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.CodeDom.Compiler; using System.Collections.Generic; using System.IO; using System.Linq; @@ -16,7 +15,7 @@ namespace Microsoft.ML.Runtime.EntryPoints.CodeGen { internal sealed class TransformImplGenerator : ImplGeneratorBase { - protected override void GenerateMethodSignature(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateMethodSignature(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("/// "); w.WriteLine("/// Creates a {0}", component.LoadNames[0]); @@ -32,7 +31,7 @@ protected override void GenerateMethodSignature(IndentedTextWriter w, string pre } } - protected override void GenerateImplBody(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateImplBody(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("{"); using (w.Nest()) @@ -77,7 +76,7 @@ private string GenerateCall(ComponentCatalog.LoadableClassInfo component) internal sealed class TransformEntryPointGenerator : EntryPointGeneratorBase { - protected override void GenerateSummaryComment(IndentedTextWriter w, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateSummaryComment(IndentingTextWriter w, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("/// "); var desc = component.Summary ?? component.LoadNames[0]; @@ -94,12 +93,12 @@ protected override void GenerateSummaryComment(IndentedTextWriter w, ComponentCa GenerateSummaryComment(w, arg, ""); } - protected override void GenerateReturnComment(IndentedTextWriter w) + protected override void GenerateReturnComment(IndentingTextWriter w) { w.WriteLine("/// A Tuple of transformed data and trained transform."); } - protected override void GenerateModuleAttribute(IndentedTextWriter w, string prefix, + protected override void GenerateModuleAttribute(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) { if (!string.IsNullOrEmpty(prefix)) @@ -118,7 +117,7 @@ protected override void GenerateModuleAttribute(IndentedTextWriter w, string pre } } - protected override void GenerateOutputPort(IndentedTextWriter w) + protected override void GenerateOutputPort(IndentingTextWriter w) { w.WriteLine( "[DataLabOutputPort(FriendlyName = \"Transformed IDataView\", DisplayName = \"Transformed IDataView\", Position = 0, DataType = WellKnownDataTypeIds.IDataViewDotNet, Description = \"Transformed data (IDataView)\")]"); @@ -126,7 +125,7 @@ protected override void GenerateOutputPort(IndentedTextWriter w) "[DataLabOutputPort(FriendlyName = \"Transformed data model\", DisplayName = \"Transformed data model\", Position = 1, DataType = WellKnownDataTypeIds.ITransformDotNet, Description = \"Transformed data model (ITransform)\")]"); } - protected override void GenerateMethodSignature(IndentedTextWriter w, string prefix, + protected override void GenerateMethodSignature(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("public static Tuple Create{0}{1}(", prefix, component.LoadNames[0]); @@ -142,7 +141,7 @@ protected override void GenerateMethodSignature(IndentedTextWriter w, string pre } } - protected override void GenerateImplCall(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateImplCall(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.WriteLine("{"); using (w.Nest()) @@ -164,7 +163,7 @@ internal sealed class TransformModuleInstanceEntryPointGenerator : GeneratorBase { private string _compName; - protected override void GenerateUsings(IndentedTextWriter w) + protected override void GenerateUsings(IndentingTextWriter w) { var allNamespaces = new HashSet(); foreach (var ns in Namespaces) @@ -186,7 +185,7 @@ protected override void GenerateUsings(IndentedTextWriter w) w.WriteLine("using {0};", ns); } - protected override void GenerateClassName(IndentedTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) + protected override void GenerateClassName(IndentingTextWriter w, string prefix, ComponentCatalog.LoadableClassInfo component) { w.WriteLine(); var className = prefix + component.LoadNames[0]; @@ -195,7 +194,7 @@ protected override void GenerateClassName(IndentedTextWriter w, string prefix, C w.WriteLine("{"); } - protected override void GenerateContent(IndentedTextWriter writer, string prefix, + protected override void GenerateContent(IndentingTextWriter writer, string prefix, ComponentCatalog.LoadableClassInfo component, string moduleId) { writer.WriteLine("[Module("); @@ -311,7 +310,7 @@ protected override string EnumName(CmdParser.ArgInfo.Arg arg, Type sigType) return _compName + "." + base.EnumName(arg, sigType); } - private void GenerateMethodSignature(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string parent, string parentType, string parentValue, string argSuffix) + private void GenerateMethodSignature(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string parent, string parentType, string parentValue, string argSuffix) { if (Exclude.Contains(arg.LongName)) return; @@ -328,7 +327,7 @@ private void GenerateMethodSignature(IndentedTextWriter w, CmdParser.ArgInfo.Arg } } - private void GenerateDictionaryEntry(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) + private void GenerateDictionaryEntry(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string argSuffix) { if (Exclude.Contains(arg.LongName)) return; @@ -339,12 +338,12 @@ private void GenerateDictionaryEntry(IndentedTextWriter w, CmdParser.ArgInfo.Arg GenerateDictionaryEntry(w, GetCSharpTypeName(arg.ItemType), arg.LongName + argSuffix); } - private void GenerateDictionaryEntry(IndentedTextWriter w, string type, string name) + private void GenerateDictionaryEntry(IndentingTextWriter w, string type, string name) { w.WriteLine("{{ \"{0}\", {0} }},", name); } - private void GenerateImplCall(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, string parent, string parentType, string parentValue, string argSuffix) + private void GenerateImplCall(IndentingTextWriter w, CmdParser.ArgInfo.Arg arg, string parent, string parentType, string parentValue, string argSuffix) { if (Exclude.Contains(arg.LongName)) return; @@ -361,17 +360,17 @@ private void GenerateImplCall(IndentedTextWriter w, CmdParser.ArgInfo.Arg arg, s GenerateImplCall(w, GetCSharpTypeName(arg.ItemType), arg.LongName + argSuffix); } - private void GenerateImplCall(IndentedTextWriter w, string type, string name) + private void GenerateImplCall(IndentingTextWriter w, string type, string name) { w.WriteLine("builder.{0} = ({1})parameters[\"{2}\"];", Capitalize(name), type, name); } - protected override void GenerateParameter(IndentedTextWriter w, string type, string name) + protected override void GenerateParameter(IndentingTextWriter w, string type, string name) { w.WriteLine("{0} {1},", type, name); } - private void GenerateParameterAttribute(IndentedTextWriter w, string displayName, object defaultValue, string description, + private void GenerateParameterAttribute(IndentingTextWriter w, string displayName, object defaultValue, string description, string parent = null, string parentType = null, string parentValue = null) { w.WriteLine("[Help(Display = @\"{0}\", ToolTip = \"{1}\")]", PrettyPrintDisplayName(displayName), description); diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/FeatureCombiner.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/FeatureCombiner.cs index ecf324f62a..f560671fae 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/FeatureCombiner.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/FeatureCombiner.cs @@ -58,7 +58,7 @@ public static CommonOutputs.TransformOutput PrepareFeatures(IHostEnvironment env throw ch.Except("No feature columns specified"); var featNames = new HashSet(); var concatNames = new List>(); - List cvt; + List cvt; int errCount; var ktv = ConvertFeatures(feats.ToArray(), featNames, concatNames, ch, out cvt, out errCount); Contracts.Assert(featNames.Count > 0); @@ -73,18 +73,18 @@ public static CommonOutputs.TransformOutput PrepareFeatures(IHostEnvironment env // (a key type) as a feature column. We convert that column to a vector so it is no longer valid // as a group id. That's just one example - you get the idea. string nameFeat = DefaultColumnNames.Features; - viewTrain = ColumnConcatenatingTransformer.Create(host, - new ColumnConcatenatingTransformer.TaggedArguments() + viewTrain = ConcatTransform.Create(host, + new ConcatTransform.TaggedArguments() { Column = - new[] { new ColumnConcatenatingTransformer.TaggedColumn() { Name = nameFeat, Source = concatNames.ToArray() } } + new[] { new ConcatTransform.TaggedColumn() { Name = nameFeat, Source = concatNames.ToArray() } } }, viewTrain); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, viewTrain, input.Data), OutputData = viewTrain }; } } - private static IDataView ApplyKeyToVec(List ktv, IDataView viewTrain, IHost host) + private static IDataView ApplyKeyToVec(List ktv, IDataView viewTrain, IHost host) { Contracts.AssertValueOrNull(ktv); Contracts.AssertValue(viewTrain); @@ -95,19 +95,19 @@ private static IDataView ApplyKeyToVec(List (x.Input, x.Output)).ToArray()) + viewTrain = new KeyToValueTransform(host, ktv.Select(x => (x.Input, x.Output)).ToArray()) .Transform(viewTrain); - viewTrain = ValueToKeyMappingTransformer.Create(host, - new ValueToKeyMappingTransformer.Arguments() + viewTrain = TermTransform.Create(host, + new TermTransform.Arguments() { Column = ktv - .Select(c => new ValueToKeyMappingTransformer.Column() { Name = c.Output, Source = c.Output, Terms = GetTerms(viewTrain, c.Input) }) + .Select(c => new TermTransform.Column() { Name = c.Output, Source = c.Output, Terms = GetTerms(viewTrain, c.Input) }) .ToArray(), TextKeyValues = true }, viewTrain); - viewTrain = KeyToVectorMappingTransformer.Create(host, viewTrain, ktv.Select(c => new KeyToVectorMappingTransformer.ColumnInfo(c.Output, c.Output)).ToArray()); + viewTrain = KeyToVectorTransform.Create(host, viewTrain, ktv.Select(c => new KeyToVectorTransform.ColumnInfo(c.Output, c.Output)).ToArray()); } return viewTrain; } @@ -129,34 +129,33 @@ private static string GetTerms(IDataView data, string colName) return null; var sb = new StringBuilder(); var pre = ""; - var metadataValues = metadata.GetValues(); - for (int i = 0; i < metadataValues.Length; i++) + for (int i = 0; i < metadata.Length; i++) { sb.Append(pre); - sb.AppendMemory(metadataValues[i]); + sb.AppendMemory(metadata.Values[i]); pre = ","; } return sb.ToString(); } - private static IDataView ApplyConvert(List cvt, IDataView viewTrain, IHostEnvironment env) + private static IDataView ApplyConvert(List cvt, IDataView viewTrain, IHostEnvironment env) { Contracts.AssertValueOrNull(cvt); Contracts.AssertValue(viewTrain); Contracts.AssertValue(env); if (Utils.Size(cvt) > 0) - viewTrain = new TypeConvertingTransformer(env,cvt.ToArray()).Transform(viewTrain); + viewTrain = new ConvertingTransform(env,cvt.ToArray()).Transform(viewTrain); return viewTrain; } - private static List ConvertFeatures(ColumnInfo[] feats, HashSet featNames, List> concatNames, IChannel ch, - out List cvt, out int errCount) + private static List ConvertFeatures(ColumnInfo[] feats, HashSet featNames, List> concatNames, IChannel ch, + out List cvt, out int errCount) { Contracts.AssertValue(feats); Contracts.AssertValue(featNames); Contracts.AssertValue(concatNames); Contracts.AssertValue(ch); - List ktv = null; + List ktv = null; cvt = null; errCount = 0; foreach (var col in feats) @@ -174,7 +173,7 @@ private static IDataView ApplyConvert(List { var colName = GetUniqueName(); concatNames.Add(new KeyValuePair(col.Name, colName)); - Utils.Add(ref ktv, new KeyToVectorMappingTransformer.ColumnInfo(col.Name, colName)); + Utils.Add(ref ktv, new KeyToVectorTransform.ColumnInfo(col.Name, colName)); continue; } } @@ -185,7 +184,7 @@ private static IDataView ApplyConvert(List // This happens when the training is done on an XDF and the scoring is done on a data frame. var colName = GetUniqueName(); concatNames.Add(new KeyValuePair(col.Name, colName)); - Utils.Add(ref cvt, new TypeConvertingTransformer.ColumnInfo(col.Name, colName, DataKind.R4)); + Utils.Add(ref cvt, new ConvertingTransform.ColumnInfo(col.Name, colName, DataKind.R4)); continue; } } @@ -242,20 +241,20 @@ public static CommonOutputs.TransformOutput PrepareClassificationLabel(IHostEnvi return new CommonOutputs.TransformOutput { Model = new TransformModel(env, nop, input.Data), OutputData = nop }; } - var args = new ValueToKeyMappingTransformer.Arguments() + var args = new TermTransform.Arguments() { Column = new[] { - new ValueToKeyMappingTransformer.Column() + new TermTransform.Column() { Name = input.LabelColumn, Source = input.LabelColumn, TextKeyValues = input.TextKeyValues, - Sort = ValueToKeyMappingTransformer.SortOrder.Value + Sort = TermTransform.SortOrder.Value } } }; - var xf = ValueToKeyMappingTransformer.Create(host, args, input.Data); + var xf = TermTransform.Create(host, args, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } @@ -277,7 +276,7 @@ public static CommonOutputs.TransformOutput ConvertPredictedLabel(IHostEnvironme return new CommonOutputs.TransformOutput { Model = new TransformModel(env, nop, input.Data), OutputData = nop }; } - var xf = new KeyToValueMappingTransformer(host, input.PredictedLabelColumn).Transform(input.Data); + var xf = new KeyToValueTransform(host, input.PredictedLabelColumn).Transform(input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } @@ -299,11 +298,11 @@ public static CommonOutputs.TransformOutput PrepareRegressionLabel(IHostEnvironm return new CommonOutputs.TransformOutput { Model = new TransformModel(env, nop, input.Data), OutputData = nop }; } - var args = new TypeConvertingTransformer.Arguments() + var args = new ConvertingTransform.Arguments() { Column = new[] { - new TypeConvertingTransformer.Column() + new ConvertingTransform.Column() { Name = input.LabelColumn, Source = input.LabelColumn, @@ -311,7 +310,7 @@ public static CommonOutputs.TransformOutput PrepareRegressionLabel(IHostEnvironm } } }; - var xf = new TypeConvertingTransformer(host, new TypeConvertingTransformer.ColumnInfo(input.LabelColumn, input.LabelColumn, DataKind.R4)).Transform(input.Data); + var xf = new ConvertingTransform(host, new ConvertingTransform.ColumnInfo(input.LabelColumn, input.LabelColumn, DataKind.R4)).Transform(input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } } diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/ExecuteGraphCommand.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/ExecuteGraphCommand.cs index d6e95961ec..a3d02d10e4 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/ExecuteGraphCommand.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/ExecuteGraphCommand.cs @@ -21,7 +21,7 @@ namespace Microsoft.ML.Runtime.EntryPoints.JsonUtils { - internal sealed class ExecuteGraphCommand : ICommand + public sealed class ExecuteGraphCommand : ICommand { public sealed class Arguments { diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/GraphRunner.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/GraphRunner.cs index af6e2b818d..9ebb25e301 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/GraphRunner.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/JsonUtils/GraphRunner.cs @@ -140,7 +140,7 @@ public void SetInput(string name, TInput input) /// /// Get the data kind of a particular port. /// - internal TlcModule.DataKind GetPortDataKind(string name) + public TlcModule.DataKind GetPortDataKind(string name) { _host.CheckNonEmpty(name, nameof(name)); EntryPointVariable variable; diff --git a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/TrainTestSplit.cs b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/TrainTestSplit.cs index 928e557e37..3d4094ba85 100644 --- a/src/Microsoft.ML.Legacy/Runtime/EntryPoints/TrainTestSplit.cs +++ b/src/Microsoft.ML.Legacy/Runtime/EntryPoints/TrainTestSplit.cs @@ -54,11 +54,11 @@ public static Output Split(IHostEnvironment env, Input input) IDataView trainData = new RangeFilter(host, new RangeFilter.Arguments { Column = stratCol, Min = 0, Max = input.Fraction, Complement = false }, data); - trainData = ColumnSelectingTransformer.CreateDrop(host, trainData, stratCol); + trainData = SelectColumnsTransform.CreateDrop(host, trainData, stratCol); IDataView testData = new RangeFilter(host, new RangeFilter.Arguments { Column = stratCol, Min = 0, Max = input.Fraction, Complement = true }, data); - testData = ColumnSelectingTransformer.CreateDrop(host, testData, stratCol); + testData = SelectColumnsTransform.CreateDrop(host, testData, stratCol); return new Output() { TrainData = trainData, TestData = testData }; } @@ -91,10 +91,10 @@ public static string CreateStratificationColumn(IHost host, ref IDataView data, } else { - data = new HashJoiningTransform(host, - new HashJoiningTransform.Arguments + data = new HashJoinTransform(host, + new HashJoinTransform.Arguments { - Column = new[] { new HashJoiningTransform.Column { Name = stratCol, Source = stratificationColumn } }, + Column = new[] { new HashJoinTransform.Column { Name = stratCol, Source = stratificationColumn } }, Join = true, HashBits = 30 }, data); diff --git a/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpApiGenerator.cs b/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpApiGenerator.cs index d341e2f223..0bcf5a6776 100644 --- a/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpApiGenerator.cs +++ b/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpApiGenerator.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.CodeDom.Compiler; using System.Collections.Generic; using System.IO; using System.Linq; @@ -23,7 +22,7 @@ namespace Microsoft.ML.Runtime.Internal.Tools { - internal sealed class CSharpApiGenerator : IGenerator + public sealed class CSharpApiGenerator : IGenerator { public sealed class Arguments { @@ -64,7 +63,7 @@ public void Generate(IEnumerable infos) using (var sw = new StreamWriter(_csFilename)) { - var writer = new IndentedTextWriter(sw, " "); + var writer = IndentingTextWriter.Wrap(sw, " "); // Generate header CSharpGeneratorUtils.GenerateHeader(writer); @@ -107,7 +106,7 @@ public void Generate(IEnumerable infos) } } - private void GenerateInputOutput(IndentedTextWriter writer, ComponentCatalog.EntryPointInfo entryPointInfo, ComponentCatalog catalog) + private void GenerateInputOutput(IndentingTextWriter writer, ComponentCatalog.EntryPointInfo entryPointInfo, ComponentCatalog catalog) { var classAndMethod = CSharpGeneratorUtils.GetEntryPointMetadata(entryPointInfo); writer.WriteLine($"namespace Legacy.{classAndMethod.Namespace}"); @@ -116,10 +115,10 @@ private void GenerateInputOutput(IndentedTextWriter writer, ComponentCatalog.Ent GenerateInput(writer, entryPointInfo, catalog); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLineNoTabs(); + writer.WriteLine(); } - private void GenerateEnums(IndentedTextWriter writer, Type inputType, string currentNamespace) + private void GenerateEnums(IndentingTextWriter writer, Type inputType, string currentNamespace) { foreach (var fieldInfo in inputType.GetFields()) { @@ -150,37 +149,35 @@ private void GenerateEnums(IndentedTextWriter writer, Type inputType, string cur } _generatedClasses.MarkAsGenerated(type.FullName); - writer.WriteLine("{"); + writer.Write("{"); writer.Indent(); var names = Enum.GetNames(type); var values = Enum.GetValues(type); - var lines = new List(); + string prefix = ""; for (int i = 0; i < names.Length; i++) { var name = names[i]; if (type.GetField(name).GetCustomAttribute() != null) continue; var value = values.GetValue(i); + writer.WriteLine(prefix); if (enumType == typeof(int)) - lines.Add($"{name} = {(int)value}"); + writer.Write($"{name} = {(int)value}"); else { Contracts.Assert(enumType == typeof(byte)); - lines.Add($"{name} = {(byte)value}"); + writer.Write($"{name} = {(byte)value}"); } + prefix = ","; } - for (int i = 0; i < lines.Count - 1; i++) - { - writer.WriteLine($"{lines[i]},"); - } - writer.WriteLine($"{lines[lines.Count-1]}"); + writer.WriteLine(); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLineNoTabs(); + writer.WriteLine(); } } - private void GenerateClasses(IndentedTextWriter writer, Type inputType, ComponentCatalog catalog, string currentNamespace) + private void GenerateClasses(IndentingTextWriter writer, Type inputType, ComponentCatalog catalog, string currentNamespace) { foreach (var fieldInfo in inputType.GetFields()) { @@ -224,11 +221,11 @@ private void GenerateClasses(IndentedTextWriter writer, Type inputType, Componen GenerateInputFields(writer, type, catalog, currentNamespace); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLineNoTabs(); + writer.WriteLine(); } } - private void GenerateColumnAddMethods(IndentedTextWriter writer, Type inputType, ComponentCatalog catalog, + private void GenerateColumnAddMethods(IndentingTextWriter writer, Type inputType, ComponentCatalog catalog, string className, out Type columnType) { columnType = null; @@ -256,7 +253,7 @@ private void GenerateColumnAddMethods(IndentedTextWriter writer, Type inputType, } } - private Type GenerateManyToOneColumn(IndentedTextWriter writer, string className, Type columnType, + private Type GenerateManyToOneColumn(IndentingTextWriter writer, string className, Type columnType, System.Reflection.FieldInfo fieldInfo, ArgumentAttribute inputAttr, Type type, bool isArray) { var fieldName = CSharpGeneratorUtils.Capitalize(inputAttr.Name ?? fieldInfo.Name); @@ -285,7 +282,7 @@ private Type GenerateManyToOneColumn(IndentedTextWriter writer, string className writer.WriteLine($"{fieldName} = ManyToOneColumn<{apiName}>.Create(name, source);"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLineNoTabs(); + writer.WriteLine(); Contracts.Assert(columnType == null); @@ -293,7 +290,7 @@ private Type GenerateManyToOneColumn(IndentedTextWriter writer, string className return columnType; } - private Type GenerateOneToOneColumn(IndentedTextWriter writer, string className, Type columnType, + private Type GenerateOneToOneColumn(IndentingTextWriter writer, string className, Type columnType, System.Reflection.FieldInfo fieldInfo, ArgumentAttribute inputAttr, Type type, bool isArray) { var fieldName = CSharpGeneratorUtils.Capitalize(inputAttr.Name ?? fieldInfo.Name); @@ -349,7 +346,7 @@ private Type GenerateOneToOneColumn(IndentedTextWriter writer, string className, writer.WriteLine($"{fieldName} = OneToOneColumn<{generatedType}>.Create(inputColumn);"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLineNoTabs(); + writer.WriteLine(); writer.WriteLine($"public void Add{fieldName}(string outputColumn, string inputColumn)"); writer.WriteLine("{"); writer.Indent(); @@ -363,7 +360,7 @@ private Type GenerateOneToOneColumn(IndentedTextWriter writer, string className, writer.WriteLine($"{fieldName} = OneToOneColumn<{generatedType}>.Create(outputColumn, inputColumn);"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLineNoTabs(); + writer.WriteLine(); Contracts.Assert(columnType == null); @@ -371,7 +368,7 @@ private Type GenerateOneToOneColumn(IndentedTextWriter writer, string className, return columnType; } - private void GenerateInput(IndentedTextWriter writer, ComponentCatalog.EntryPointInfo entryPointInfo, ComponentCatalog catalog) + private void GenerateInput(IndentingTextWriter writer, ComponentCatalog.EntryPointInfo entryPointInfo, ComponentCatalog catalog) { var entryPointMetadata = CSharpGeneratorUtils.GetEntryPointMetadata(entryPointInfo); string classBase = ""; @@ -383,7 +380,7 @@ private void GenerateInput(IndentedTextWriter writer, ComponentCatalog.EntryPoin } GenerateEnums(writer, entryPointInfo.InputType, _defaultNamespace + entryPointMetadata.Namespace); - writer.WriteLineNoTabs(); + writer.WriteLine(); GenerateClasses(writer, entryPointInfo.InputType, catalog, _defaultNamespace + entryPointMetadata.Namespace); CSharpGeneratorUtils.GenerateSummary(writer, entryPointInfo.Description, entryPointInfo.XmlInclude); @@ -393,14 +390,14 @@ private void GenerateInput(IndentedTextWriter writer, ComponentCatalog.EntryPoin writer.WriteLine($"public sealed partial class {entryPointMetadata.ClassName}{classBase}"); writer.WriteLine("{"); writer.Indent(); - writer.WriteLineNoTabs(); + writer.WriteLine(); if (entryPointInfo.InputKinds != null && entryPointInfo.InputKinds.Any(t => typeof(Legacy.ILearningPipelineLoader).IsAssignableFrom(t))) CSharpGeneratorUtils.GenerateLoaderAddInputMethod(writer, entryPointMetadata.ClassName); GenerateColumnAddMethods(writer, entryPointInfo.InputType, catalog, entryPointMetadata.ClassName, out Type transformType); - writer.WriteLineNoTabs(); + writer.WriteLine(); GenerateInputFields(writer, entryPointInfo.InputType, catalog, _defaultNamespace + entryPointMetadata.Namespace); - writer.WriteLineNoTabs(); + writer.WriteLine(); GenerateOutput(writer, entryPointInfo, out HashSet outputVariableNames); GenerateApplyFunction(writer, entryPointMetadata.ClassName, transformType, outputVariableNames, entryPointInfo.InputKinds); @@ -408,7 +405,7 @@ private void GenerateInput(IndentedTextWriter writer, ComponentCatalog.EntryPoin writer.WriteLine("}"); } - private static void GenerateApplyFunction(IndentedTextWriter writer, string className, Type type, + private static void GenerateApplyFunction(IndentingTextWriter writer, string className, Type type, HashSet outputVariableNames, Type[] inputKinds) { if (inputKinds == null) @@ -444,7 +441,7 @@ private static void GenerateApplyFunction(IndentedTextWriter writer, string clas writer.WriteLine("throw new InvalidOperationException($\"{ nameof(" + className + ")} only supports an { nameof(ILearningPipelineDataStep)} as an input.\");"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLineNoTabs(); + writer.WriteLine(); if (isTransform) { @@ -463,7 +460,7 @@ private static void GenerateApplyFunction(IndentedTextWriter writer, string clas writer.WriteLine("}"); //Pipeline step. - writer.WriteLineNoTabs(); + writer.WriteLine(); if (isTransform && !isCalibrator) writer.WriteLine($"private class {pipelineStep} : ILearningPipelineDataStep"); else @@ -486,7 +483,7 @@ private static void GenerateApplyFunction(IndentedTextWriter writer, string clas writer.Outdent(); writer.WriteLine("}"); - writer.WriteLineNoTabs(); + writer.WriteLine(); if (isTransform && !isCalibrator) { @@ -500,7 +497,7 @@ private static void GenerateApplyFunction(IndentedTextWriter writer, string clas writer.WriteLine("}"); } - private void GenerateInputFields(IndentedTextWriter writer, Type inputType, ComponentCatalog catalog, string rootNameSpace) + private void GenerateInputFields(IndentingTextWriter writer, Type inputType, ComponentCatalog catalog, string rootNameSpace) { var defaults = Activator.CreateInstance(inputType); foreach (var fieldInfo in inputType.GetFields()) @@ -516,7 +513,7 @@ private void GenerateInputFields(IndentedTextWriter writer, Type inputType, Comp if (fieldInfo.FieldType == typeof(JArray)) { writer.WriteLine($"public Experiment {CSharpGeneratorUtils.Capitalize(inputAttr.Name ?? fieldInfo.Name)} {{ get; set; }}"); - writer.WriteLineNoTabs(); + writer.WriteLine(); continue; } @@ -545,16 +542,16 @@ private void GenerateInputFields(IndentedTextWriter writer, Type inputType, Comp writer.WriteLine(sweepableParamAttr.ToString()); } - var line = $"public {inputTypeString} {CSharpGeneratorUtils.Capitalize(inputAttr.Name ?? fieldInfo.Name)} {{ get; set; }}"; + writer.Write($"public {inputTypeString} {CSharpGeneratorUtils.Capitalize(inputAttr.Name ?? fieldInfo.Name)} {{ get; set; }}"); var defaultValue = CSharpGeneratorUtils.GetValue(catalog, fieldInfo.FieldType, fieldInfo.GetValue(defaults), _generatedClasses, rootNameSpace); if (defaultValue != null) - line += $" = {defaultValue};"; - writer.WriteLine(line); - writer.WriteLineNoTabs(); + writer.Write($" = {defaultValue};"); + writer.WriteLine(); + writer.WriteLine(); } } - private void GenerateOutput(IndentedTextWriter writer, ComponentCatalog.EntryPointInfo entryPointInfo, out HashSet outputVariableNames) + private void GenerateOutput(IndentingTextWriter writer, ComponentCatalog.EntryPointInfo entryPointInfo, out HashSet outputVariableNames) { outputVariableNames = new HashSet(); string classBase = ""; @@ -578,25 +575,25 @@ private void GenerateOutput(IndentedTextWriter writer, ComponentCatalog.EntryPoi var outputTypeString = CSharpGeneratorUtils.GetOutputType(fieldInfo.FieldType); outputVariableNames.Add(CSharpGeneratorUtils.Capitalize(outputAttr.Name ?? fieldInfo.Name)); writer.WriteLine($"public {outputTypeString} {CSharpGeneratorUtils.Capitalize(outputAttr.Name ?? fieldInfo.Name)} {{ get; set; }} = new {outputTypeString}();"); - writer.WriteLineNoTabs(); + writer.WriteLine(); } writer.Outdent(); writer.WriteLine("}"); } - private void GenerateComponentKind(IndentedTextWriter writer, string kind) + private void GenerateComponentKind(IndentingTextWriter writer, string kind) { writer.WriteLine($"public abstract class {kind} : ComponentKind {{}}"); - writer.WriteLineNoTabs(); + writer.WriteLine(); } - private void GenerateComponent(IndentedTextWriter writer, ComponentCatalog.ComponentInfo component, ComponentCatalog catalog) + private void GenerateComponent(IndentingTextWriter writer, ComponentCatalog.ComponentInfo component, ComponentCatalog catalog) { GenerateEnums(writer, component.ArgumentType, "Runtime"); - writer.WriteLineNoTabs(); + writer.WriteLine(); GenerateClasses(writer, component.ArgumentType, catalog, "Runtime"); - writer.WriteLineNoTabs(); + writer.WriteLine(); CSharpGeneratorUtils.GenerateSummary(writer, component.Description); writer.WriteLine($"public sealed class {CSharpGeneratorUtils.GetComponentName(component)} : {component.Kind}"); writer.WriteLine("{"); @@ -605,7 +602,7 @@ private void GenerateComponent(IndentedTextWriter writer, ComponentCatalog.Compo writer.WriteLine($"internal override string ComponentName => \"{component.Name}\";"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLineNoTabs(); + writer.WriteLine(); } } } diff --git a/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpGeneratorUtils.cs b/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpGeneratorUtils.cs index 5c96a652ba..b918aa8147 100644 --- a/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpGeneratorUtils.cs +++ b/src/Microsoft.ML.Legacy/Runtime/Internal/Tools/CSharpGeneratorUtils.cs @@ -4,7 +4,6 @@ using System; using System.CodeDom; -using System.CodeDom.Compiler; using System.Collections.Generic; using System.Linq; using System.Reflection; @@ -350,7 +349,7 @@ public static string GetComponentName(ComponentCatalog.ComponentInfo component) return $"{Capitalize(component.Name)}{component.Kind}"; } - public static void GenerateSummary(IndentedTextWriter writer, string summary, string[] xmlInclude = null) + public static void GenerateSummary(IndentingTextWriter writer, string summary, string[] xmlInclude = null) { // if the class has an XML it should contain the summary and everything else if (xmlInclude != null) @@ -369,7 +368,7 @@ public static void GenerateSummary(IndentedTextWriter writer, string summary, st writer.WriteLine("/// "); } - public static void GenerateHeader(IndentedTextWriter writer) + public static void GenerateHeader(IndentingTextWriter writer) { writer.WriteLine("//------------------------------------------------------------------------------"); writer.WriteLine("// "); @@ -388,7 +387,7 @@ public static void GenerateHeader(IndentedTextWriter writer) writer.WriteLine("using System;"); writer.WriteLine("using System.Linq;"); writer.WriteLine("using Microsoft.ML.Runtime.CommandLine;"); - writer.WriteLineNoTabs(); + writer.WriteLine(); writer.WriteLine("namespace Microsoft.ML"); writer.WriteLine("{"); writer.Indent(); @@ -400,13 +399,13 @@ public static void GenerateHeader(IndentedTextWriter writer) writer.Indent(); } - public static void GenerateFooter(IndentedTextWriter writer) + public static void GenerateFooter(IndentingTextWriter writer) { writer.Outdent(); writer.WriteLine("}"); } - public static void GenerateMethod(IndentedTextWriter writer, string className, string defaultNamespace) + public static void GenerateMethod(IndentingTextWriter writer, string className, string defaultNamespace) { var inputOuputClassName = defaultNamespace + className; writer.WriteLine($"public {inputOuputClassName}.Output Add({inputOuputClassName} input)"); @@ -417,17 +416,17 @@ public static void GenerateMethod(IndentedTextWriter writer, string className, s writer.WriteLine("return output;"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLineNoTabs(); + writer.WriteLine(); writer.WriteLine($"public void Add({inputOuputClassName} input, {inputOuputClassName}.Output output)"); writer.WriteLine("{"); writer.Indent(); writer.WriteLine($"_jsonNodes.Add(Serialize(\"{className}\", input, output));"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLineNoTabs(); + writer.WriteLine(); } - public static void GenerateLoaderAddInputMethod(IndentedTextWriter writer, string className) + public static void GenerateLoaderAddInputMethod(IndentingTextWriter writer, string className) { //Constructor. writer.WriteLine("[JsonIgnore]"); @@ -476,7 +475,7 @@ public static void GenerateLoaderAddInputMethod(IndentedTextWriter writer, strin writer.WriteLine("Model = null;"); writer.Outdent(); writer.WriteLine("}"); - writer.WriteLineNoTabs(); + writer.WriteLine(); writer.WriteLine("public Var Data { get; }"); writer.WriteLine("public Var Model { get; }"); writer.Outdent(); diff --git a/src/Microsoft.ML.LightGBM/LightGbmBinaryTrainer.cs b/src/Microsoft.ML.LightGBM/LightGbmBinaryTrainer.cs index 5ecf507771..2100be29c9 100644 --- a/src/Microsoft.ML.LightGBM/LightGbmBinaryTrainer.cs +++ b/src/Microsoft.ML.LightGBM/LightGbmBinaryTrainer.cs @@ -103,9 +103,9 @@ internal LightGbmBinaryTrainer(IHostEnvironment env, LightGbmArguments args) /// Initializes a new instance of /// /// The private instance of . - /// The name of the labelColumn column. + /// The name of the label column. /// The name of the feature column. - /// The name for the column containing the initial weight. + /// The name for the column containing the initial weight. /// The number of leaves to use. /// Number of iterations. /// The minimal number of documents allowed in a leaf of the tree, out of the subsampled data. @@ -114,16 +114,14 @@ internal LightGbmBinaryTrainer(IHostEnvironment env, LightGbmArguments args) /// The settings here will override the ones provided in the direct signature, /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . - public LightGbmBinaryTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, + public LightGbmBinaryTrainer(IHostEnvironment env, string labelColumn, string featureColumn, + string weightColumn = null, int? numLeaves = null, int? minDataPerLeaf = null, double? learningRate = null, int numBoostRound = LightGbmArguments.Defaults.NumBoostRound, Action advancedSettings = null) - : base(env, LoadNameValue, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weights, null, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) + : base(env, LoadNameValue, TrainerUtils.MakeBoolScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) { } diff --git a/src/Microsoft.ML.LightGBM/LightGbmCatalog.cs b/src/Microsoft.ML.LightGBM/LightGbmCatalog.cs index de4b84c3f1..56a892be4a 100644 --- a/src/Microsoft.ML.LightGBM/LightGbmCatalog.cs +++ b/src/Microsoft.ML.LightGBM/LightGbmCatalog.cs @@ -10,7 +10,7 @@ namespace Microsoft.ML { /// - /// LightGBM extension methods. + /// Regression trainer estimators. /// public static class LightGbmExtensions { @@ -18,8 +18,8 @@ public static class LightGbmExtensions /// Predict a target using a decision tree regression model trained with the . /// /// The . - /// The labelColumn column. - /// The features column. + /// The label column. + /// The features column. /// The weights column. /// The number of leaves to use. /// Number of iterations. @@ -30,8 +30,8 @@ public static class LightGbmExtensions /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public static LightGbmRegressorTrainer LightGbm(this RegressionContext.RegressionTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, string weights = null, int? numLeaves = null, int? minDataPerLeaf = null, @@ -41,15 +41,15 @@ public static LightGbmRegressorTrainer LightGbm(this RegressionContext.Regressio { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new LightGbmRegressorTrainer(env, labelColumn, featureColumn, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); + return new LightGbmRegressorTrainer(env, label, features, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); } /// /// Predict a target using a decision tree binary classification model trained with the . /// /// The . - /// The labelColumn column. - /// The features column. + /// The label column. + /// The features column. /// The weights column. /// The number of leaves to use. /// Number of iterations. @@ -60,8 +60,8 @@ public static LightGbmRegressorTrainer LightGbm(this RegressionContext.Regressio /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public static LightGbmBinaryTrainer LightGbm(this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, string weights = null, int? numLeaves = null, int? minDataPerLeaf = null, @@ -71,7 +71,7 @@ public static LightGbmBinaryTrainer LightGbm(this BinaryClassificationContext.Bi { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new LightGbmBinaryTrainer(env, labelColumn, featureColumn, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); + return new LightGbmBinaryTrainer(env, label, features, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); } @@ -79,10 +79,10 @@ public static LightGbmBinaryTrainer LightGbm(this BinaryClassificationContext.Bi /// Predict a target using a decision tree binary classification model trained with the . /// /// The . - /// The labelColumn column. - /// The features column. + /// The label column. + /// The features column. /// The weights column. - /// The groupId column. + /// The groupId column. /// The number of leaves to use. /// Number of iterations. /// The minimal number of documents allowed in a leaf of the tree, out of the subsampled data. @@ -92,9 +92,9 @@ public static LightGbmBinaryTrainer LightGbm(this BinaryClassificationContext.Bi /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public static LightGbmRankingTrainer LightGbm(this RankingContext.RankingTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string groupIdColumn = DefaultColumnNames.GroupId, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, + string groupId = DefaultColumnNames.GroupId, string weights = null, int? numLeaves = null, int? minDataPerLeaf = null, @@ -104,7 +104,7 @@ public static LightGbmRankingTrainer LightGbm(this RankingContext.RankingTrainer { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new LightGbmRankingTrainer(env, labelColumn, featureColumn, groupIdColumn, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); + return new LightGbmRankingTrainer(env, label, features, groupId, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); } @@ -112,8 +112,8 @@ public static LightGbmRankingTrainer LightGbm(this RankingContext.RankingTrainer /// Predict a target using a decision tree binary classification model trained with the . /// /// The . - /// The labelColumn column. - /// The features column. + /// The label column. + /// The features column. /// The weights column. /// The number of leaves to use. /// Number of iterations. @@ -124,8 +124,8 @@ public static LightGbmRankingTrainer LightGbm(this RankingContext.RankingTrainer /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public static LightGbmMulticlassTrainer LightGbm(this MulticlassClassificationContext.MulticlassClassificationTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, string weights = null, int? numLeaves = null, int? minDataPerLeaf = null, @@ -135,7 +135,7 @@ public static LightGbmMulticlassTrainer LightGbm(this MulticlassClassificationCo { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new LightGbmMulticlassTrainer(env, labelColumn, featureColumn, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); + return new LightGbmMulticlassTrainer(env, label, features, weights, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings); } } diff --git a/src/Microsoft.ML.LightGBM/LightGbmMulticlassTrainer.cs b/src/Microsoft.ML.LightGBM/LightGbmMulticlassTrainer.cs index c3222cfde5..c589edc933 100644 --- a/src/Microsoft.ML.LightGBM/LightGbmMulticlassTrainer.cs +++ b/src/Microsoft.ML.LightGBM/LightGbmMulticlassTrainer.cs @@ -44,9 +44,9 @@ internal LightGbmMulticlassTrainer(IHostEnvironment env, LightGbmArguments args) /// Initializes a new instance of /// /// The private instance of . - /// The name of the labelColumn column. + /// The name of the label column. /// The name of the feature column. - /// The name for the column containing the initial weight. + /// The name for the column containing the initial weight. /// The number of leaves to use. /// Number of iterations. /// The minimal number of documents allowed in a leaf of the tree, out of the subsampled data. @@ -56,15 +56,15 @@ internal LightGbmMulticlassTrainer(IHostEnvironment env, LightGbmArguments args) /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public LightGbmMulticlassTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, + string labelColumn, + string featureColumn, + string weightColumn = null, int? numLeaves = null, int? minDataPerLeaf = null, double? learningRate = null, int numBoostRound = LightGbmArguments.Defaults.NumBoostRound, Action advancedSettings = null) - : base(env, LoadNameValue, TrainerUtils.MakeU4ScalarColumn(labelColumn), featureColumn, weights, null, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) + : base(env, LoadNameValue, TrainerUtils.MakeU4ScalarColumn(labelColumn), featureColumn, weightColumn, null, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) { _numClass = -1; } @@ -124,23 +124,23 @@ protected override void ConvertNaNLabels(IChannel ch, RoleMappedData data, float float minLabel = float.MaxValue; float maxLabel = float.MinValue; bool hasNaNLabel = false; - foreach (var labelColumn in labels) + foreach (var label in labels) { - if (float.IsNaN(labelColumn)) + if (float.IsNaN(label)) hasNaNLabel = true; else { - minLabel = Math.Min(minLabel, labelColumn); - maxLabel = Math.Max(maxLabel, labelColumn); + minLabel = Math.Min(minLabel, label); + maxLabel = Math.Max(maxLabel, label); } } - ch.CheckParam(minLabel >= 0, nameof(data), "min labelColumn cannot be negative"); + ch.CheckParam(minLabel >= 0, nameof(data), "min label cannot be negative"); if (maxLabel >= _maxNumClass) - throw ch.ExceptParam(nameof(data), $"max labelColumn cannot exceed {_maxNumClass}"); + throw ch.ExceptParam(nameof(data), $"max label cannot exceed {_maxNumClass}"); if (data.Schema.Label.Type.IsKey) { - ch.Check(data.Schema.Label.Type.AsKey.Contiguous, "labelColumn value should be contiguous"); + ch.Check(data.Schema.Label.Type.AsKey.Contiguous, "label value should be contiguous"); if (hasNaNLabel) _numClass = data.Schema.Label.Type.AsKey.Count + 1; else diff --git a/src/Microsoft.ML.LightGBM/LightGbmRankingTrainer.cs b/src/Microsoft.ML.LightGBM/LightGbmRankingTrainer.cs index 43ded6e8c0..aa75030f6c 100644 --- a/src/Microsoft.ML.LightGBM/LightGbmRankingTrainer.cs +++ b/src/Microsoft.ML.LightGBM/LightGbmRankingTrainer.cs @@ -92,8 +92,8 @@ internal LightGbmRankingTrainer(IHostEnvironment env, LightGbmArguments args) /// The private instance of . /// The name of the label column. /// The name of the feature column. - /// The name of the column containing the group ID. - /// The name of the optional column containing the initial weights. + /// The name of the column containing the group ID. + /// The name of the column containing the initial weight. /// The number of leaves to use. /// Number of iterations. /// The minimal number of documents allowed in a leaf of the tree, out of the subsampled data. @@ -103,18 +103,18 @@ internal LightGbmRankingTrainer(IHostEnvironment env, LightGbmArguments args) /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public LightGbmRankingTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string groupId = DefaultColumnNames.GroupId, - string weights = null, + string labelColumn, + string featureColumn, + string groupIdColumn, + string weightColumn = null, int? numLeaves = null, int? minDataPerLeaf = null, double? learningRate = null, int numBoostRound = LightGbmArguments.Defaults.NumBoostRound, Action advancedSettings = null) - : base(env, LoadNameValue, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weights, groupId, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) + : base(env, LoadNameValue, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, groupIdColumn, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) { - Host.CheckNonEmpty(groupId, nameof(groupId)); + Host.CheckNonEmpty(groupIdColumn, nameof(groupIdColumn)); } protected override void CheckDataValid(IChannel ch, RoleMappedData data) diff --git a/src/Microsoft.ML.LightGBM/LightGbmRegressionTrainer.cs b/src/Microsoft.ML.LightGBM/LightGbmRegressionTrainer.cs index 85f5c01c60..adbff18ddf 100644 --- a/src/Microsoft.ML.LightGBM/LightGbmRegressionTrainer.cs +++ b/src/Microsoft.ML.LightGBM/LightGbmRegressionTrainer.cs @@ -91,7 +91,7 @@ public sealed class LightGbmRegressorTrainer : LightGbmTrainerBaseThe private instance of . /// The name of the label column. /// The name of the feature column. - /// The name for the column containing the initial weight. + /// The name for the column containing the initial weight. /// The number of leaves to use. /// Number of iterations. /// The minimal number of documents allowed in a leaf of the tree, out of the subsampled data. @@ -100,16 +100,14 @@ public sealed class LightGbmRegressorTrainer : LightGbmTrainerBase. - public LightGbmRegressorTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, + public LightGbmRegressorTrainer(IHostEnvironment env, string labelColumn, string featureColumn, + string weightColumn = null, int? numLeaves = null, int? minDataPerLeaf = null, double? learningRate = null, int numBoostRound = LightGbmArguments.Defaults.NumBoostRound, Action advancedSettings = null) - : base(env, LoadNameValue, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weights, null, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) + : base(env, LoadNameValue, TrainerUtils.MakeR4ScalarLabel(labelColumn), featureColumn, weightColumn, null, numLeaves, minDataPerLeaf, learningRate, numBoostRound, advancedSettings) { } diff --git a/src/Microsoft.ML.LightGBM/LightGbmStatic.cs b/src/Microsoft.ML.LightGBM/LightGbmStatic.cs index 1a66544111..604c3cd71d 100644 --- a/src/Microsoft.ML.LightGBM/LightGbmStatic.cs +++ b/src/Microsoft.ML.LightGBM/LightGbmStatic.cs @@ -38,7 +38,7 @@ public static class LightGbmTrainers /// /// /// /// public static Scalar LightGbm(this RegressionContext.RegressionTrainers ctx, @@ -87,7 +87,7 @@ public static Scalar LightGbm(this RegressionContext.RegressionTrainers c /// /// /// /// public static (Scalar score, Scalar probability, Scalar predictedLabel) LightGbm(this BinaryClassificationContext.BinaryClassificationTrainers ctx, diff --git a/src/Microsoft.ML.LightGBM/LightGbmTrainerBase.cs b/src/Microsoft.ML.LightGBM/LightGbmTrainerBase.cs index 53e6ba543b..c6a68a8a51 100644 --- a/src/Microsoft.ML.LightGBM/LightGbmTrainerBase.cs +++ b/src/Microsoft.ML.LightGBM/LightGbmTrainerBase.cs @@ -102,7 +102,7 @@ private protected LightGbmTrainerBase(IHostEnvironment env, string name, LightGb InitParallelTraining(); } - private protected override TModel TrainModelCore(TrainContext context) + protected override TModel TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); @@ -540,8 +540,8 @@ private void GetFeatureValueSparse(IChannel ch, FloatLabelCursor cursor, fv = catMetaData.OnehotBias[colIdx] + 1; if (newColIdx != lastIdx) { - featureIndices.Add(newColIdx); - values.Add(fv); + featureIndices.Push(newColIdx); + values.Push(fv); nhot = 1; } else diff --git a/src/Microsoft.ML.Maml/ChainCommand.cs b/src/Microsoft.ML.Maml/ChainCommand.cs index c51a78952b..e49162b45b 100644 --- a/src/Microsoft.ML.Maml/ChainCommand.cs +++ b/src/Microsoft.ML.Maml/ChainCommand.cs @@ -15,8 +15,7 @@ namespace Microsoft.ML.Runtime.Tools { using Stopwatch = System.Diagnostics.Stopwatch; - [BestFriend] - internal sealed class ChainCommand : ICommand + public sealed class ChainCommand : ICommand { public sealed class Arguments { diff --git a/src/Microsoft.ML.Maml/HelpCommand.cs b/src/Microsoft.ML.Maml/HelpCommand.cs index 65487fbfc3..ee2adbb495 100644 --- a/src/Microsoft.ML.Maml/HelpCommand.cs +++ b/src/Microsoft.ML.Maml/HelpCommand.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.CodeDom.Compiler; using System.Collections.Generic; using System.Globalization; using System.IO; @@ -24,15 +23,14 @@ namespace Microsoft.ML.Runtime.Tools { - [BestFriend] - internal interface IGenerator + public interface IGenerator { void Generate(IEnumerable infos); } public delegate void SignatureModuleGenerator(string regenerate); - internal sealed class HelpCommand : ICommand + public sealed class HelpCommand : ICommand { public sealed class Arguments { @@ -102,13 +100,11 @@ public void Run() public void Run(int? columns) { -#pragma warning disable CS0618 // The help command should be entirely within the command line anyway. AssemblyLoadingUtils.LoadAndRegister(_env, _extraAssemblies); -#pragma warning restore CCS0618 using (var ch = _env.Start("Help")) using (var sw = new StringWriter(CultureInfo.InvariantCulture)) - using (var writer = new IndentedTextWriter(sw, " ")) + using (var writer = IndentingTextWriter.Wrap(sw)) { if (_listKinds) { @@ -129,7 +125,7 @@ public void Run(int? columns) } } - private void ShowHelp(IndentedTextWriter writer, int? columns = null) + private void ShowHelp(IndentingTextWriter writer, int? columns = null) { _env.AssertValue(_component); @@ -187,7 +183,7 @@ private void ShowHelp(IndentedTextWriter writer, int? columns = null) Serialize(components); } - private void ShowAllHelp(IndentedTextWriter writer, int? columns = null) + private void ShowAllHelp(IndentingTextWriter writer, int? columns = null) { string sig = _kind?.ToLowerInvariant(); @@ -221,7 +217,7 @@ private void ShowAllHelp(IndentedTextWriter writer, int? columns = null) Serialize(components); } - private void ShowUsage(IndentedTextWriter writer, string kind, string summary, string loadName, + private void ShowUsage(IndentingTextWriter writer, string kind, string summary, string loadName, IReadOnlyList loadNames, object args, int? columns) { _env.Assert(loadName == loadNames[0]); @@ -242,7 +238,7 @@ private void ShowUsage(IndentedTextWriter writer, string kind, string summary, s writer.WriteLine(CmdParser.ArgumentsUsage(_env, args.GetType(), args, false, columns)); } - private void ShowComponents(IndentedTextWriter writer) + private void ShowComponents(IndentingTextWriter writer) { Type typeSig; Type typeRes; @@ -308,7 +304,7 @@ private void Serialize(List components) GenerateModule(components); } - private void ShowAliases(IndentedTextWriter writer, IReadOnlyList names) + private void ShowAliases(IndentingTextWriter writer, IReadOnlyList names) { if (names.Count <= 1) return; @@ -323,7 +319,7 @@ private void ShowAliases(IndentedTextWriter writer, IReadOnlyList names) writer.WriteLine(); } - private void ListKinds(IndentedTextWriter writer) + private void ListKinds(IndentingTextWriter writer) { var sigs = _env.ComponentCatalog.GetAllSignatureTypes() .Select(ComponentCatalog.SignatureToString) @@ -337,7 +333,7 @@ private void ListKinds(IndentedTextWriter writer) } } - private void ShowFormattedSummary(IndentedTextWriter writer, string summary, int? columns) + private void ShowFormattedSummary(IndentingTextWriter writer, string summary, int? columns) { _env.AssertValue(writer); @@ -427,7 +423,7 @@ private void GenerateModule(List components) } } - internal sealed class XmlGenerator : IGenerator + public sealed class XmlGenerator : IGenerator { public sealed class Arguments { diff --git a/src/Microsoft.ML.Maml/MAML.cs b/src/Microsoft.ML.Maml/MAML.cs index a4eaa43491..ff207b38e4 100644 --- a/src/Microsoft.ML.Maml/MAML.cs +++ b/src/Microsoft.ML.Maml/MAML.cs @@ -58,9 +58,7 @@ private static int MainWithProgress(string args) string currentDirectory = Path.GetDirectoryName(typeof(Maml).Module.FullyQualifiedName); using (var env = CreateEnvironment()) -#pragma warning disable CS0618 // This is the command line project, so the usage here is OK. using (AssemblyLoadingUtils.CreateAssemblyRegistrar(env, currentDirectory)) -#pragma warning restore CS0618 using (var progressCancel = new CancellationTokenSource()) { var progressTrackerTask = Task.Run(() => TrackProgress(env, progressCancel.Token)); @@ -109,7 +107,7 @@ private static ConsoleEnvironment CreateEnvironment() /// so we always write . If set to true though, this executable will also print stack traces from the /// marked exceptions as well. /// - internal static int MainCore(IHostEnvironment env, string args, bool alwaysPrintStacktrace) + internal static int MainCore(ConsoleEnvironment env, string args, bool alwaysPrintStacktrace) { // REVIEW: How should extra dlls, tracking, etc be handled? Should the args objects for // all commands derive from a common base? diff --git a/src/Microsoft.ML.Maml/Microsoft.ML.Maml.csproj b/src/Microsoft.ML.Maml/Microsoft.ML.Maml.csproj index a366fb6f9c..219b6bf0b8 100644 --- a/src/Microsoft.ML.Maml/Microsoft.ML.Maml.csproj +++ b/src/Microsoft.ML.Maml/Microsoft.ML.Maml.csproj @@ -7,6 +7,10 @@ netstandard2.0 + + + + diff --git a/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs index 2226c6d7fc..2ddc9c4ffa 100644 --- a/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs +++ b/src/Microsoft.ML.Maml/Properties/AssemblyInfo.cs @@ -2,11 +2,9 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System.Reflection; using System.Runtime.CompilerServices; -using Microsoft.ML; +using System.Runtime.InteropServices; -[assembly: InternalsVisibleTo("Microsoft.ML.TestFramework" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo("Microsoft.ML.Benchmarks" + PublicKey.TestValue)] - -[assembly: InternalsVisibleTo("Microsoft.ML.Legacy" + PublicKey.Value)] -[assembly: InternalsVisibleTo("Microsoft.ML.ResultProcessor" + PublicKey.Value)] +[assembly: InternalsVisibleTo("Microsoft.ML.TestFramework, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")] +[assembly: InternalsVisibleTo("Microsoft.ML.Benchmarks, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")] \ No newline at end of file diff --git a/src/Microsoft.ML.Maml/VersionCommand.cs b/src/Microsoft.ML.Maml/VersionCommand.cs index 7e20db2260..a59f01e58b 100644 --- a/src/Microsoft.ML.Maml/VersionCommand.cs +++ b/src/Microsoft.ML.Maml/VersionCommand.cs @@ -12,7 +12,7 @@ namespace Microsoft.ML.Runtime.Tools { - internal sealed class VersionCommand : ICommand + public sealed class VersionCommand : ICommand { internal const string Summary = "Prints the TLC version."; diff --git a/src/Microsoft.ML.Onnx/AssemblyInfo.cs b/src/Microsoft.ML.Onnx/AssemblyInfo.cs index 2cfc638423..a540e9aff2 100644 --- a/src/Microsoft.ML.Onnx/AssemblyInfo.cs +++ b/src/Microsoft.ML.Onnx/AssemblyInfo.cs @@ -1,9 +1,3 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. +using System.Runtime.CompilerServices; -using System.Runtime.CompilerServices; -using Microsoft.ML; - -[assembly: InternalsVisibleTo("Microsoft.ML.Core.Tests" + PublicKey.TestValue)] -[assembly: InternalsVisibleTo("Microsoft.ML.Tests" + PublicKey.TestValue)] +[assembly: InternalsVisibleTo("Microsoft.ML.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")] diff --git a/src/Microsoft.ML.Onnx/SaveOnnxCommand.cs b/src/Microsoft.ML.Onnx/SaveOnnxCommand.cs index 3c3dd97dcd..241abc6fbb 100644 --- a/src/Microsoft.ML.Onnx/SaveOnnxCommand.cs +++ b/src/Microsoft.ML.Onnx/SaveOnnxCommand.cs @@ -21,7 +21,7 @@ namespace Microsoft.ML.Runtime.Model.Onnx { - internal sealed class SaveOnnxCommand : DataCommand.ImplBase + public sealed class SaveOnnxCommand : DataCommand.ImplBase { public const string Summary = "Given a data model, write out the corresponding ONNX."; public const string LoadName = "SaveOnnx"; diff --git a/src/Microsoft.ML.OnnxTransform/OnnxCatalog.cs b/src/Microsoft.ML.OnnxTransform/OnnxCatalog.cs index 4618c57ca1..054900776d 100644 --- a/src/Microsoft.ML.OnnxTransform/OnnxCatalog.cs +++ b/src/Microsoft.ML.OnnxTransform/OnnxCatalog.cs @@ -15,13 +15,13 @@ public static class OnnxCatalog /// /// The transform's catalog. /// The path of the file containing the ONNX model. - /// The input columns. - /// The output columns resulting from the transformation. + /// The input column. + /// The output column resulting from the transformation. public static OnnxScoringEstimator ApplyOnnxModel(this TransformsCatalog catalog, string modelFile, - string[] inputColumns, - string[] outputColumns) - => new OnnxScoringEstimator(CatalogUtils.GetEnvironment(catalog), modelFile, inputColumns, outputColumns); + string inputColumn, + string outputColumn) + => new OnnxScoringEstimator(CatalogUtils.GetEnvironment(catalog), modelFile, inputColumn, outputColumn); /// /// Initializes a new instance of . diff --git a/src/Microsoft.ML.OnnxTransform/OnnxTransform.cs b/src/Microsoft.ML.OnnxTransform/OnnxTransform.cs index be35d87e52..834889b946 100644 --- a/src/Microsoft.ML.OnnxTransform/OnnxTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/OnnxTransform.cs @@ -17,7 +17,6 @@ using Microsoft.ML.StaticPipe; using Microsoft.ML.StaticPipe.Runtime; using Microsoft.ML.Core.Data; -using OnnxShape = System.Collections.Generic.List; [assembly: LoadableClass(OnnxTransform.Summary, typeof(IDataTransform), typeof(OnnxTransform), typeof(OnnxTransform.Arguments), typeof(SignatureDataTransform), OnnxTransform.UserName, OnnxTransform.ShortName, "OnnxTransform", "OnnxScorer")] @@ -35,7 +34,7 @@ namespace Microsoft.ML.Transforms { - public sealed class OnnxTransform : RowToRowTransformerBase + public sealed class OnnxTransform : ITransformer, ICanSaveModel { public sealed class Arguments : TransformInputBase { @@ -43,40 +42,40 @@ public sealed class Arguments : TransformInputBase public string ModelFile; [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "Name of the input column.", SortOrder = 1)] - public string[] InputColumns; + public string InputColumn; [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "Name of the output column.", SortOrder = 2)] - public string[] OutputColumns; + public string OutputColumn; } + private readonly IHost _host; private readonly Arguments _args; internal readonly OnnxModel Model; + private const string RegistrationName = "OnnxTransform"; internal const string Summary = "Transforms the data using the Onnx model."; internal const string UserName = "ONNX Scoring Transform"; internal const string ShortName = "Onnx"; internal const string LoaderSignature = "OnnxTransform"; - public readonly string[] Inputs; - public readonly string[] Outputs; - public readonly ColumnType[] OutputTypes; + public readonly string Input; + public readonly string Output; + public readonly ColumnType OutputType; private static VersionInfo GetVersionInfo() { return new VersionInfo( modelSignature: "ONNXSCOR", - // version 10001 is single input & output. - // version 10002 = multiple inputs & outputs - verWrittenCur: 0x00010002, - verReadableCur: 0x00010002, + verWrittenCur: 0x00010001, // Initial + verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(OnnxTransform).Assembly.FullName); + loaderAssemblyName: typeof(OnnxTransform).Assembly.FullName); } - public static IDataTransform Create(IHostEnvironment env, IDataView input, string modelFile, string[] inputColumns, string[] outputColumns) + public static IDataTransform Create(IHostEnvironment env, IDataView input, string modelFile, string inputColumn, string outputColumn) { - var args = new Arguments { ModelFile = modelFile, InputColumns = inputColumns, OutputColumns = outputColumns }; + var args = new Arguments { ModelFile = modelFile, InputColumn = inputColumn, OutputColumn = outputColumn }; return Create(env, args, input); } @@ -101,23 +100,9 @@ private static OnnxTransform Create(IHostEnvironment env, ModelLoadContext ctx) if (!ctx.TryLoadBinaryStream("OnnxModel", r => modelBytes = r.ReadByteArray())) throw env.ExceptDecode(); - bool supportsMultiInputOutput = ctx.Header.ModelVerWritten > 0x00010001; - - var numInputs = (supportsMultiInputOutput) ? ctx.Reader.ReadInt32() : 1; - - env.CheckDecode(numInputs > 0); - var inputs = new string[numInputs]; - for (int j = 0; j < inputs.Length; j++) - inputs[j] = ctx.LoadNonEmptyString(); - - var numOutputs = (supportsMultiInputOutput) ? ctx.Reader.ReadInt32() : 1; - - env.CheckDecode(numOutputs > 0); - var outputs = new string[numOutputs]; - for (int j = 0; j < outputs.Length; j++) - outputs[j] = ctx.LoadNonEmptyString(); - - var args = new Arguments() { InputColumns = inputs, OutputColumns = outputs }; + var inputColumn = ctx.LoadNonEmptyString(); + var outputColumn = ctx.LoadNonEmptyString(); + var args = new Arguments() { InputColumn = inputColumn, OutputColumn = outputColumn }; return new OnnxTransform(env, args, modelBytes); } @@ -126,301 +111,193 @@ private static OnnxTransform Create(IHostEnvironment env, ModelLoadContext ctx) private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); - private OnnxTransform(IHostEnvironment env, Arguments args, byte[] modelBytes = null) : - base(Contracts.CheckRef(env, nameof(env)).Register(nameof(OnnxTransform))) + private OnnxTransform(IHostEnvironment env, Arguments args, byte[] modelBytes = null) { - Host.CheckValue(args, nameof(args)); - - foreach (var col in args.InputColumns) - Host.CheckNonWhiteSpace(col, nameof(args.InputColumns)); - foreach (var col in args.OutputColumns) - Host.CheckNonWhiteSpace(col, nameof(args.OutputColumns)); + Contracts.CheckValue(env, nameof(env)); + _host = env.Register(RegistrationName); + _host.CheckValue(args, nameof(args)); + _host.CheckNonWhiteSpace(args.InputColumn, nameof(args.InputColumn)); + _host.CheckNonWhiteSpace(args.OutputColumn, nameof(args.OutputColumn)); if (modelBytes == null) { - Host.CheckNonWhiteSpace(args.ModelFile, nameof(args.ModelFile)); - Host.CheckUserArg(File.Exists(args.ModelFile), nameof(args.ModelFile)); + _host.CheckNonWhiteSpace(args.ModelFile, nameof(args.ModelFile)); + _host.CheckUserArg(File.Exists(args.ModelFile), nameof(args.ModelFile)); Model = new OnnxModel(args.ModelFile); } else Model = OnnxModel.CreateFromBytes(modelBytes); var modelInfo = Model.ModelInfo; - Inputs = args.InputColumns; - Outputs = args.OutputColumns; - OutputTypes = new ColumnType[args.OutputColumns.Length]; - var numModelOutputs = Model.ModelInfo.OutputsInfo.Length; - for (int i=0; i < args.OutputColumns.Length; i++) - { - var idx = Model.OutputNames.IndexOf(args.OutputColumns[i]); - if (idx < 0) - throw Host.Except($"Column {args.OutputColumns[i]} doesn't match output node names of model"); - - var outputNodeInfo = Model.ModelInfo.OutputsInfo[idx]; - var shape = outputNodeInfo.Shape; - var dims = AdjustDimensions(shape); - OutputTypes[i] = new VectorType(OnnxUtils.OnnxToMlNetType(outputNodeInfo.Type), dims); - } + if (modelInfo.InputsInfo.Length != 1) + throw env.Except($"OnnxTransform supports Onnx models with one input. The provided model has ${modelInfo.InputsInfo.Length} input(s)."); + if (modelInfo.OutputsInfo.Length != 1) + throw env.Except($"OnnxTransform supports Onnx models with one output. The provided model has ${modelInfo.OutputsInfo.Length} output(s)."); + + Input = args.InputColumn; + Output = args.OutputColumn; + + var outputNodeInfo = Model.ModelInfo.OutputsInfo[0]; + var type = OnnxUtils.OnnxToMlNetType(outputNodeInfo.Type); + var shape = outputNodeInfo.Shape; + var dims = shape.Count > 0 ? shape.Skip(shape[0] < 0 ? 1 : 0).Select( x => (int) x ).ToArray() : new[] { 0 }; + OutputType = new VectorType(type, dims); _args = args; } public OnnxTransform(IHostEnvironment env, string modelFile, string inputColumn, string outputColumn) - : this(env, new Arguments() { ModelFile = modelFile, InputColumns = new[] { inputColumn }, OutputColumns = new[] { outputColumn } }) + : this(env, new Arguments() { ModelFile = modelFile, InputColumn = inputColumn, OutputColumn = outputColumn }) { } - public OnnxTransform(IHostEnvironment env, string modelFile, string[] inputColumns, string[] outputColumns) - : this(env, new Arguments() { ModelFile = modelFile, InputColumns = inputColumns, OutputColumns = outputColumns }) + public Schema GetOutputSchema(Schema inputSchema) { + _host.CheckValue(inputSchema, nameof(inputSchema)); + if (!inputSchema.TryGetColumnIndex(Input, out int srcCol)) + throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", Input); + + var transform = Transform(new EmptyDataView(_host, inputSchema)); + return transform.Schema; } - public override void Save(ModelSaveContext ctx) + private IRowMapper MakeRowMapper(Schema schema) => new Mapper(_host, this, schema); + + private RowToRowMapperTransform MakeDataTransform(IDataView input) { - Host.AssertValue(ctx); + _host.CheckValue(input, nameof(input)); + return new RowToRowMapperTransform(_host, input, MakeRowMapper(input.Schema), MakeRowMapper); + } + + public IDataView Transform(IDataView input) => MakeDataTransform(input); + public void Save(ModelSaveContext ctx) + { + _host.AssertValue(ctx); ctx.CheckAtModel(); ctx.SetVersionInfo(GetVersionInfo()); ctx.SaveBinaryStream("OnnxModel", w => { w.WriteByteArray(Model.ToByteArray()); }); - - Host.CheckNonEmpty(Inputs, nameof(Inputs)); - ctx.Writer.Write(Inputs.Length); - foreach (var colName in Inputs) - ctx.SaveNonEmptyString(colName); - - Host.CheckNonEmpty(Outputs, nameof(Outputs)); - ctx.Writer.Write(Outputs.Length); - foreach (var colName in Outputs) - ctx.SaveNonEmptyString(colName); + ctx.SaveNonEmptyString(_args.InputColumn); + ctx.SaveNonEmptyString(_args.OutputColumn); } - protected override IRowMapper MakeRowMapper(Schema inputSchema) => new Mapper(this, inputSchema); - private static int[] AdjustDimensions(OnnxShape shape) + public bool IsRowToRowMapper => true; + + public IRowToRowMapper GetRowToRowMapper(Schema inputSchema) { - // if the model output is of type Map or Sequence, the shape property - // will not be filled (so count=0). Don't throw an exception here - // it will be runtime exception, util Maps and Sequences become supported. - if (shape.Count > 0) - { - // some models may have -1 in first position. - // skip this dimension when setting output column dimensions. - if (shape[0] < 0) - { - return shape.Skip(1).Select(x => (int)x).ToArray(); - } - else - { - return shape.Select(x => (int)x).ToArray(); - } - } - return new[] { 0 }; + _host.CheckValue(inputSchema, nameof(inputSchema)); + return MakeDataTransform(new EmptyDataView(_host, inputSchema)); } - private sealed class Mapper : MapperBase + private sealed class Mapper : IRowMapper { + private readonly IHost _host; private readonly OnnxTransform _parent; - private readonly int[] _inputColIndices; - private readonly bool[] _isInputVector; - private readonly OnnxShape[] _inputTensorShapes; - private readonly DataType[] _inputOnnxTypes; - public Mapper(OnnxTransform parent, Schema inputSchema) : - base(Contracts.CheckRef(parent, nameof(parent)).Host.Register(nameof(Mapper)), inputSchema) + private readonly Type _outputItemRawType; + private readonly ColumnType _outputColType; + private readonly string _outputColName; + + private readonly IdvToTensorAdapter _idvToTensorAdapter; + + public Mapper(IHostEnvironment env, OnnxTransform parent, Schema inputSchema) { + Contracts.CheckValue(env, nameof(env)); + _host = env.Register(nameof(Mapper)); + _host.CheckValue(inputSchema, nameof(inputSchema)); + _host.CheckValue(parent, nameof(parent)); _parent = parent; - _inputColIndices = new int[_parent.Inputs.Length]; - _isInputVector = new bool[_parent.Inputs.Length]; - _inputTensorShapes = new OnnxShape[_parent.Inputs.Length]; - _inputOnnxTypes = new DataType[_parent.Inputs.Length]; - var model = _parent.Model; - for (int i = 0; i < _parent.Inputs.Length; i++) - { - var idx = model.InputNames.IndexOf(_parent.Inputs[i]); - if (idx < 0) - throw Host.Except($"Column {_parent.Inputs[i]} doesn't match input node names of model"); - - var inputNodeInfo = model.ModelInfo.InputsInfo[idx]; - - var shape = inputNodeInfo.Shape; - var inputType = OnnxUtils.OnnxToMlNetType(inputNodeInfo.Type); - - var inputShape = inputNodeInfo.Shape; - _inputTensorShapes[i] = inputShape; - _inputOnnxTypes[i] = inputNodeInfo.Type; - - if (!inputSchema.TryGetColumnIndex(_parent.Inputs[i], out _inputColIndices[i])) - throw Host.Except($"Column {_parent.Inputs[i]} doesn't exist"); - - var type = inputSchema.GetColumnType(_inputColIndices[i]); - _isInputVector[i] = type.IsVector; - - if (type.IsVector && type.VectorSize == 0) - throw Host.Except($"Variable length input columns not supported"); - - if (type.ItemType != inputType) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.Inputs[i], inputType.ToString(), type.ToString()); - - // If the column is one dimension we make sure that the total size of the Onnx shape matches. - // Compute the total size of the known dimensions of the shape. - int valCount = inputShape.Select(x => (int)x).Where(x => x > 0).Aggregate((x, y) => x * y); - // The column length should be divisible by this, so that the other dimensions can be integral. - if (type.ValueCount % valCount != 0) - throw Contracts.Except($"Input shape mismatch: Input '{_parent.Inputs[i]}' has shape {String.Join(",", inputShape)}, but input data is of length {type.ValueCount}."); - - //Host.Assert(_outputItemRawType == _outputColType.ItemType.RawType); - } + _idvToTensorAdapter = new IdvToTensorAdapter(inputSchema, parent._args.InputColumn, + model.ModelInfo.InputsInfo[0]); + + // TODO: Remove assumption below + // Assume first output dimension is 1 + var outputNodeInfo = model.ModelInfo.OutputsInfo[0]; + var inputNodeInfo = model.ModelInfo.InputsInfo[0]; + int[] dims = outputNodeInfo.Shape.Skip(1).Select(x => (int)x).ToArray(); + var outputItemType = OnnxUtils.OnnxToMlNetType(outputNodeInfo.Type); + var inputShape = inputNodeInfo.Shape; + _outputColType = new VectorType(outputItemType, dims); + _outputColName = _parent.Output; + _outputItemRawType = outputItemType.RawType; + + int inColIndex; + if (!inputSchema.TryGetColumnIndex(_parent.Input, out inColIndex)) + throw _host.Except($"Column {_parent.Input} doesn't exist"); + + var type = inputSchema.GetColumnType(inColIndex); + if (type.IsVector && type.VectorSize == 0) + throw _host.Except($"Variable length input columns not supported"); + + if (type.ItemType != outputItemType) + throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.Input, outputItemType.ToString(), type.ToString()); + + // If the column is one dimension we make sure that the total size of the TF shape matches. + // Compute the total size of the known dimensions of the shape. + int valCount = inputShape.Select(x => (int) x).Where(x => x > 0).Aggregate((x, y) => x * y); + // The column length should be divisible by this, so that the other dimensions can be integral. + if (type.ValueCount % valCount != 0) + throw Contracts.Except($"Input shape mismatch: Input '{_outputColName}' has shape {String.Join(",", inputShape)}, but input data is of length {type.ValueCount}."); + + _host.Assert(_outputItemRawType == _outputColType.ItemType.RawType); } - protected override Schema.Column[] GetOutputColumnsCore() + public Schema.Column[] GetOutputColumns() { - var info = new Schema.Column[_parent.Outputs.Length]; - for (int i = 0; i < _parent.Outputs.Length; i++) - info[i] = new Schema.Column(_parent.Outputs[i], _parent.OutputTypes[i], null); + var info = new Schema.Column[1]; + info[0] = new Schema.Column(_outputColName, _outputColType, null); return info; } - public override Func GetDependencies(Func activeOutput) + public Func GetDependencies(Func activeOutput) { - return col => Enumerable.Range(0, _parent.Outputs.Length).Any(i => activeOutput(i)) && _inputColIndices.Any(i => i == col); + return col => activeOutput(0) && (_idvToTensorAdapter.IdvColumnIndex == col); } - public override void Save(ModelSaveContext ctx) => _parent.Save(ctx); - - private interface ITensorValueGetter + public void Save(ModelSaveContext ctx) { - Tensor GetTensor(); - } - private class OutputCache - { - public long Position; - public Dictionary Outputs; - public OutputCache() - { - Position = -1; - Outputs = new Dictionary(); - } - } - - private void UpdateCacheIfNeeded(long position, ITensorValueGetter[] srcTensorGetters, string[] activeOutputColNames, OutputCache outputCache) - { - if (outputCache.Position != position) - { - var inputTensors = new List(); - - for (int i = 0; i < _inputColIndices.Length; i++) - inputTensors.Add(srcTensorGetters[i].GetTensor()); - - var outputTensors = _parent.Model.Run(inputTensors); - Contracts.Assert(outputTensors.Count > 0); - - for (int j = 0; j < outputTensors.Count; j++) - outputCache.Outputs[activeOutputColNames[j]] = outputTensors[j]; - - outputCache.Position = position; - } + _parent.Save(ctx); } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + public Delegate[] CreateGetters(IRow input, Func activeOutput, out Action disposer) { disposer = null; - Host.AssertValue(input); - //Host.Assert(typeof(T) == _outputItemRawType); - - var outputCache = new OutputCache(); - var activeOutputColNames = _parent.Outputs.Where((x, i) => activeOutput(i)).ToArray(); - var type = OnnxUtils.OnnxToMlNetType(_parent.Model.ModelInfo.OutputsInfo[iinfo].Type).RawType; - Host.Assert(type == _parent.OutputTypes[iinfo].ItemType.RawType); - var srcTensorGetters = GetTensorValueGetters(input, _inputColIndices, _isInputVector, _inputOnnxTypes, _inputTensorShapes); - return Utils.MarshalInvoke(MakeGetter, type, input, iinfo, srcTensorGetters, activeOutputColNames, outputCache); + var getters = new Delegate[1]; + if (activeOutput(0)) + getters[0] = Utils.MarshalInvoke(MakeGetter, _outputItemRawType, input); + return getters; } - private Delegate MakeGetter(IRow input, int iinfo, ITensorValueGetter[] srcTensorGetters, string[] activeOutputColNames, OutputCache outputCache) + private Delegate MakeGetter(IRow input) { - Host.AssertValue(input); - ValueGetter> valuegetter = (ref VBuffer dst) => - { - UpdateCacheIfNeeded(input.Position, srcTensorGetters, activeOutputColNames, outputCache); - var tensor = outputCache.Outputs[_parent.Outputs[iinfo]]; - var editor = VBufferEditor.Create(ref dst, tensor.GetSize()); - OnnxUtils.CopyTo(tensor, editor.Values); - dst = editor.Commit(); - }; - return valuegetter; - } + _host.AssertValue(input); + _host.Assert(typeof(T) == _outputItemRawType); - private static ITensorValueGetter[] GetTensorValueGetters(IRow input, - int[] inputColIndices, - bool[] isInputVector, - DataType[] onnxInputTypes, - OnnxShape[] onnxInputShapes) - { - var srcTensorGetters = new ITensorValueGetter[inputColIndices.Length]; - for (int i = 0; i < inputColIndices.Length; i++) + ValueGetter> valueGetter = (ref VBuffer dst) => { - int colIndex = inputColIndices[i]; - srcTensorGetters[i] = CreateTensorValueGetter(input, onnxInputTypes[i], isInputVector[i], colIndex, onnxInputShapes[i]); - } - return srcTensorGetters; - } - - private static ITensorValueGetter CreateTensorValueGetter(IRow input, DataType onnxType, bool isVector, int colIndex, OnnxShape onnxShape) - { - var type = OnnxUtils.OnnxToMlNetType(onnxType).RawType; - Contracts.AssertValue(type); - return Utils.MarshalInvoke(CreateTensorValueGetter, type, input, isVector, colIndex, onnxShape); - } - - private static ITensorValueGetter CreateTensorValueGetter(IRow input, bool isVector, int colIndex, OnnxShape onnxShape) - { - if (isVector) - return new TensorValueGetterVec(input, colIndex, onnxShape); - return new TensorValueGetter(input, colIndex); - } + _idvToTensorAdapter.InitializeValueGetters(input); + var inputTensors = new List { _idvToTensorAdapter.GetTensor() }; + var outputTensors = _parent.Model.Run(inputTensors); + Contracts.Assert(outputTensors.Count() > 0); - private class TensorValueGetter : ITensorValueGetter - { - private readonly ValueGetter _srcgetter; + var values = dst.Values; + if (Utils.Size(values) < _outputColType.VectorSize) + values = new T[_outputColType.VectorSize]; - public TensorValueGetter(IRow input, int colIndex) - { - _srcgetter = input.GetGetter(colIndex); - } - public Tensor GetTensor() - { - var scalar = default(T); - _srcgetter(ref scalar); - return OnnxUtils.CreateScalarTensor(scalar); - } - } + OnnxUtils.CopyTo(outputTensors[0], values); + dst = new VBuffer(values.Length, values, dst.Indices); + }; - private class TensorValueGetterVec : ITensorValueGetter - { - private readonly ValueGetter> _srcgetter; - private readonly OnnxShape _tensorShape; - private VBuffer _vBuffer; - private VBuffer _vBufferDense; - public TensorValueGetterVec(IRow input, int colIndex, OnnxShape tensorShape) - { - _srcgetter = input.GetGetter>(colIndex); - _tensorShape = tensorShape; - _vBuffer = default; - _vBufferDense = default; - } - public Tensor GetTensor() - { - _srcgetter(ref _vBuffer); - _vBuffer.CopyToDense(ref _vBufferDense); - return OnnxUtils.CreateTensor(_vBufferDense.GetValues(), _tensorShape); - } + return valueGetter; } } } public sealed class OnnxScoringEstimator : TrivialEstimator { - public OnnxScoringEstimator(IHostEnvironment env, string modelFile, string[] inputs, string[] outputs) - : this(env, new OnnxTransform(env, modelFile, inputs, outputs)) + public OnnxScoringEstimator(IHostEnvironment env, string modelFile, string input, string output) + : this(env, new OnnxTransform(env, modelFile, input, output)) { } @@ -435,31 +312,20 @@ public override SchemaShape GetOutputSchema(SchemaShape inputSchema) var result = inputSchema.Columns.ToDictionary(x => x.Name); var resultDic = inputSchema.Columns.ToDictionary(x => x.Name); - for (var i = 0; i < Transformer.Inputs.Length; i++) - { - var input = Transformer.Inputs[i]; - if (!inputSchema.TryFindColumn(input, out var col)) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input); - if (!(col.Kind == SchemaShape.Column.VectorKind.VariableVector || col.Kind == SchemaShape.Column.VectorKind.Vector)) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input, nameof(VectorType), col.GetTypeString()); - - var inputsInfo = Transformer.Model.ModelInfo.InputsInfo; - var idx = Transformer.Model.InputNames.IndexOf(input); - if (idx < 0) - throw Host.Except($"Column {input} doesn't match input node names of model."); - - var inputNodeInfo = inputsInfo[idx]; - var expectedType = OnnxUtils.OnnxToMlNetType(inputNodeInfo.Type); - if (col.ItemType != expectedType) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input, expectedType.ToString(), col.ItemType.ToString()); - } + var input = Transformer.Input; + if (!inputSchema.TryFindColumn(input, out var col)) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input); + if (!(col.Kind == SchemaShape.Column.VectorKind.VariableVector || col.Kind == SchemaShape.Column.VectorKind.Vector)) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input, nameof(VectorType), col.GetTypeString()); + var inputNodeInfo = Transformer.Model.ModelInfo.InputsInfo[0]; + var expectedType = OnnxUtils.OnnxToMlNetType(inputNodeInfo.Type); + if (col.ItemType != expectedType) + throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", input, expectedType.ToString(), col.ItemType.ToString()); + + resultDic[Transformer.Output] = new SchemaShape.Column(Transformer.Output, + Transformer.OutputType.IsKnownSizeVector ? SchemaShape.Column.VectorKind.Vector + : SchemaShape.Column.VectorKind.VariableVector, NumberType.R4, false); - for (var i = 0; i < Transformer.Outputs.Length; i++) - { - resultDic[Transformer.Outputs[i]] = new SchemaShape.Column(Transformer.Outputs[i], - Transformer.OutputTypes[i].IsKnownSizeVector ? SchemaShape.Column.VectorKind.Vector - : SchemaShape.Column.VectorKind.VariableVector, NumberType.R4, false); - } return new SchemaShape(resultDic.Values); } } @@ -497,7 +363,7 @@ public override IEstimator Reconcile(IHostEnvironment env, Contracts.Assert(toOutput.Length == 1); var outCol = (OutColumn)toOutput[0]; - return new OnnxScoringEstimator(env, _modelFile, new[] { inputNames[outCol.Input] }, new[] { outputNames[outCol] }); + return new OnnxScoringEstimator(env, _modelFile, inputNames[outCol.Input], outputNames[outCol]); } } @@ -513,4 +379,3 @@ public static Vector ApplyOnnxModel(this Vector input, string mode } } } - diff --git a/src/Microsoft.ML.OnnxTransform/OnnxUtils.cs b/src/Microsoft.ML.OnnxTransform/OnnxUtils.cs index 687133296f..05abdfb40a 100644 --- a/src/Microsoft.ML.OnnxTransform/OnnxUtils.cs +++ b/src/Microsoft.ML.OnnxTransform/OnnxUtils.cs @@ -16,6 +16,106 @@ namespace Microsoft.ML.Transforms { + /// + /// IdvToTensorAdapter adapts an Idv (row-iterator interface) to a tensor-iterator interface. + /// For an Idv, you'd need to create a cursor and iterate over it to get each rows of the Idv. + /// After adaptation, you'd call GetTensor() on the IdvToTensorAdapter object to get the Tensor equivalent of + /// each row. + /// + internal sealed class IdvToTensorAdapter + { + // Idv information + private readonly string _idvColumnName; + internal readonly int IdvColumnIndex; + private readonly bool _idvIsVectorColumn; + public readonly ColumnType IdvColumnType; + + // Onnx tensor information + private readonly OnnxShape _onnxTensorShape; + + private ITensorValueGetter _tensorValueGetter; + + public IdvToTensorAdapter(Schema idvSchema, string idvColumnName, + OnnxModel.OnnxNodeInfo onnxInputNodeInfo) + { + _idvColumnName = idvColumnName; + if (!idvSchema.TryGetColumnIndex(_idvColumnName, out IdvColumnIndex)) + throw Contracts.Except($"Column '{_idvColumnName}' does not exist"); + IdvColumnType = idvSchema.GetColumnType(IdvColumnIndex); + _idvIsVectorColumn = IdvColumnType.IsVector; + _onnxTensorShape = onnxInputNodeInfo.Shape; + + // TODO: Check that the idv and tensor sizes match + // TODO: Check type matches + + // TODO: Add Yaels shape logic here + if (_onnxTensorShape[0] == -1) + _onnxTensorShape[0] = 1; + } + + public void InitializeValueGetters(IRow idvRow) + { + var type = IdvColumnType.ItemType.RawType; + _tensorValueGetter = Utils.MarshalInvoke( + CreateTensorValueGetter, type, idvRow, _idvIsVectorColumn, IdvColumnIndex, _onnxTensorShape); + } + + public Tensor GetTensor() + { + return _tensorValueGetter.GetTensor(); + } + + private ITensorValueGetter CreateTensorValueGetter(IRow input, bool isVector, int colIndex, OnnxShape tensorShape) + { + if (isVector) + return new TensorValueGetterVec(input, colIndex, tensorShape); + else + return new TensorValueGetter(input, colIndex); + } + + private interface ITensorValueGetter + { + Tensor GetTensor(); + } + + private class TensorValueGetter : ITensorValueGetter + { + private readonly ValueGetter _srcgetter; + + public TensorValueGetter(IRow input, int colIndex) + { + _srcgetter = input.GetGetter(colIndex); + } + public Tensor GetTensor() + { + var scalar = default(T); + _srcgetter(ref scalar); + return OnnxUtils.CreateScalarTensor(scalar); + } + } + + private class TensorValueGetterVec : ITensorValueGetter + { + private readonly ValueGetter> _srcgetter; + private readonly OnnxShape _tensorShape; + private VBuffer _vBuffer; + private VBuffer _vBufferDense; + public TensorValueGetterVec(IRow input, int colIndex, OnnxShape tensorShape) + { + _srcgetter = input.GetGetter>(colIndex); + _tensorShape = tensorShape; + _vBuffer = default; + _vBufferDense = default; + } + public Tensor GetTensor() + { + _srcgetter(ref _vBuffer); + _vBuffer.CopyToDense(ref _vBufferDense); + return OnnxUtils.CreateTensor(_vBufferDense.Values, _tensorShape); + } + } + } + /// /// OnnxModel is a facad for ModelManager. ModelManager is provided by Sonoma API, /// and it has a lot of functionality (multiple models, multiple versions) that are not @@ -64,8 +164,8 @@ public OnnxNodeInfo(string name, OnnxShape shape, DataType type) private readonly ModelManager _modelManager; private readonly string _modelFile; private readonly string _modelName; - public readonly List InputNames; - public readonly List OutputNames; + private readonly List _inputNames; + private readonly List _outputNames; public OnnxModel(string modelFile) { @@ -78,8 +178,8 @@ public OnnxModel(string modelFile) _modelManager.InitOnnxModel(_modelName, _ignoredVersion); ModelInfo = new OnnxModelInfo(GetInputsInfo(), GetOutputsInfo()); - InputNames = ModelInfo.InputsInfo.Select(i => i.Name).ToList(); - OutputNames = ModelInfo.OutputsInfo.Select(i => i.Name).ToList(); + _inputNames = ModelInfo.InputsInfo.Select(i => i.Name).ToList(); + _outputNames = ModelInfo.OutputsInfo.Select(i => i.Name).ToList(); } public static OnnxModel CreateFromBytes(byte[] modelBytes) @@ -100,7 +200,7 @@ public static OnnxModel CreateFromBytes(byte[] modelBytes) public List Run(List inputTensors) { var outputTensors = _modelManager.RunModel( - _modelName, _ignoredVersion, InputNames, inputTensors, OutputNames); + _modelName, _ignoredVersion, _inputNames, inputTensors, _outputNames); return outputTensors; } @@ -146,9 +246,6 @@ internal sealed class OnnxUtils /// Sonoma API only provides Tensor() constructors with overloaded /// versions based on data type. /// - - private static Dictionary _typeMap; - public static Tensor CreateScalarTensor(T data) { if (typeof(T) == typeof(System.Boolean)) @@ -208,27 +305,27 @@ public static Tensor CreateScalarTensor(T data) /// generic version. CreateTensor<T> is generic wrapper on top of /// overloaded Tensor(T[] data, OnnxShape shape) constructors. /// - public static Tensor CreateTensor(ReadOnlySpan data, OnnxShape shape) + public static Tensor CreateTensor(T[] data, OnnxShape shape) { if (typeof(T) == typeof(System.Boolean)) { - return new Tensor((System.Boolean[])(object)data.ToArray(), shape.ToArray()); + return new Tensor(((System.Boolean[])(object)data).ToList(), shape); } else if (typeof(T) == typeof(System.Double)) { - return new Tensor((System.Double[])(object)data.ToArray(), shape.ToArray()); + return new Tensor(((System.Double[])(object)data).ToList(), shape); } else if (typeof(T) == typeof(System.Single)) { - return new Tensor((System.Single[])(object)data.ToArray(), shape.ToArray()); + return new Tensor(((System.Single[])(object)data).ToList(), shape); } else if (typeof(T) == typeof(System.Int32)) { - return new Tensor((System.Int32[])(object)data.ToArray(), shape.ToArray()); + return new Tensor(((System.Int32[])(object)data).ToList(), shape); } else if (typeof(T) == typeof(System.Int64)) { - return new Tensor((System.Int64[])(object)data.ToArray(), shape.ToArray()); + return new Tensor(((System.Int64[])(object)data).ToList(), shape); } throw new NotImplementedException($"Not implemented type {typeof(T)}"); } @@ -241,24 +338,19 @@ public static Tensor CreateTensor(ReadOnlySpan data, OnnxShape shape) /// Also Tensor.CopyTo(List<T> dst) requires a list input, whereas ML.NET /// provides array buffers to copy values to. This mismatch causes an extra copy. /// - public static unsafe void CopyTo(Tensor tensor, Span dst) + public static void CopyTo(Tensor tensor, T[] dst) { - var typeMap = SystemTypeToOnnxType(); - if (typeMap.ContainsKey(typeof(T))) + if (typeof(T) == typeof(System.Single)) { - if (tensor.GetDataType() != typeMap[typeof(T)]) - { - throw new InvalidOperationException( string.Format("Cannot copy source tensor of type {0} to managed type {1}.", tensor.GetDataType(), typeof(T))); - } - Span tensorSpan = new Span(tensor.UnsafeGetData().ToPointer(), tensor.GetSize()); - tensorSpan.CopyTo(dst); + var typedDst = (System.Single[])(object)dst; + tensor.CopyTo(typedDst); // TODO: the CopyTo() function is susceptible to GC reclaiming tensor // during the method call. Use KeepAlive for now, and remove // after permanent fix in CopyTo(). + GC.KeepAlive(tensor); } else throw new NotImplementedException($"Not implemented type {typeof(T)}"); - GC.KeepAlive(tensor); } public static PrimitiveType OnnxToMlNetType(DataType type) @@ -313,23 +405,5 @@ public static PrimitiveType OnnxToMlNetType(DataType type) return PrimitiveType.FromKind(kind); } - - internal static Dictionary SystemTypeToOnnxType() - { - if (_typeMap == null) - { - _typeMap = new Dictionary - { - { typeof(Boolean) , DataType.Type_Bool }, - { typeof(Double) , DataType.Type_Double }, - { typeof(Single) , DataType.Type_Float }, - { typeof(Int16) , DataType.Type_Int16 }, - { typeof(Int32) , DataType.Type_Int32 }, - { typeof(Int64) , DataType.Type_Int64 }, - { typeof(UInt16) , DataType.Type_Uint16 } - }; - } - return _typeMap; - } } } diff --git a/src/Microsoft.ML.PCA/PcaTrainer.cs b/src/Microsoft.ML.PCA/PcaTrainer.cs index b87d816c01..cde9e08aeb 100644 --- a/src/Microsoft.ML.PCA/PcaTrainer.cs +++ b/src/Microsoft.ML.PCA/PcaTrainer.cs @@ -84,20 +84,15 @@ public class Arguments : UnsupervisedLearnerInputBaseWithWeight /// Initializes a new instance of . /// /// The local instance of the . - /// The name of the feature column. - /// The name of the weight column. + /// The name of the feature column. + /// The name of the weight column. /// The number of components in the PCA. /// Oversampling parameter for randomized PCA training. /// If enabled, data is centered to be zero mean. /// The seed for random number generation. - public RandomizedPcaTrainer(IHostEnvironment env, - string features, - string weights = null, - int rank = 20, - int oversampling = 20, - bool center = true, - int? seed = null) - : this(env, null, features, weights, rank, oversampling, center, seed) + public RandomizedPcaTrainer(IHostEnvironment env, string featureColumn, string weightColumn = null, + int rank = 20, int oversampling = 20, bool center = true, int? seed = null) + : this(env, null, featureColumn, weightColumn, rank, oversampling, center, seed) { } @@ -136,7 +131,7 @@ private RandomizedPcaTrainer(IHostEnvironment env, Arguments args, string featur } //Note: the notations used here are the same as in https://web.stanford.edu/group/mmds/slides2010/Martinsson.pdf (pg. 9) - private protected override PcaPredictor TrainModelCore(TrainContext context) + protected override PcaPredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); @@ -190,11 +185,11 @@ private PcaPredictor TrainCore(IChannel ch, RoleMappedData data, int dimension) for (var i = 0; i < oversampledRank; ++i) { var v = y[i]; - VectorUtils.ScaleBy(v, 1 / VectorUtils.Norm(y[i])); + VectorUtils.ScaleBy(ref v, 1 / VectorUtils.Norm(y[i])); // Make the next vectors in the queue orthogonal to the orthonormalized vectors. for (var j = i + 1; j < oversampledRank; ++j) //subtract the projection of y[j] on v. - VectorUtils.AddMult(v, y[j], -VectorUtils.DotProduct(v, y[j])); + VectorUtils.AddMult(in v, -VectorUtils.DotProduct(in v, in y[j]), ref y[j]); } var q = y; // q in QR decomposition. @@ -206,7 +201,7 @@ private PcaPredictor TrainCore(IChannel ch, RoleMappedData data, int dimension) for (var i = 0; i < oversampledRank; ++i) { for (var j = i; j < oversampledRank; ++j) - b2[i * oversampledRank + j] = b2[j * oversampledRank + i] = VectorUtils.DotProduct(b[i], b[j]); + b2[i * oversampledRank + j] = b2[j * oversampledRank + i] = VectorUtils.DotProduct(in b[i], in b[j]); } float[] smallEigenvalues;// eigenvectors and eigenvalues of the small matrix B2. @@ -217,15 +212,15 @@ private PcaPredictor TrainCore(IChannel ch, RoleMappedData data, int dimension) return new PcaPredictor(Host, _rank, b, in mean); } - private static float[][] Zeros(int k, int d) + private static VBuffer[] Zeros(int k, int d) { - float[][] rv = new float[k][]; + var rv = new VBuffer[k]; for (var i = 0; i < k; ++i) - rv[i] = new float[d]; + rv[i] = VBufferUtils.CreateDense(d); return rv; } - private static float[][] GaussianMatrix(int k, int d, int seed) + private static VBuffer[] GaussianMatrix(int k, int d, int seed) { var rv = Zeros(k, d); var rng = new SysRandom(seed); @@ -235,7 +230,7 @@ private static float[][] GaussianMatrix(int k, int d, int seed) for (var i = 0; i < k; ++i) { for (var j = 0; j < d; ++j) - rv[i][j] = (float)Stats.SampleFromGaussian(rng); // not fast for large matrix generation + rv[i].Values[j] = (float)Stats.SampleFromGaussian(rng); // not fast for large matrix generation } return rv; } @@ -243,7 +238,7 @@ private static float[][] GaussianMatrix(int k, int d, int seed) //Project the covariance matrix A on to Omega: Y <- A * Omega //A = X' * X / n, where X = data - mean //Note that the covariance matrix is not computed explicitly - private static void Project(IHost host, FeatureFloatVectorCursor.Factory cursorFactory, ref VBuffer mean, float[][] omega, float[][] y, out long numBad) + private static void Project(IHost host, FeatureFloatVectorCursor.Factory cursorFactory, ref VBuffer mean, VBuffer[] omega, VBuffer[] y, out long numBad) { Contracts.AssertValue(host, "host"); host.AssertNonEmpty(omega); @@ -251,7 +246,7 @@ private static void Project(IHost host, FeatureFloatVectorCursor.Factory cursorF int numCols = omega.Length; for (int i = 0; i < y.Length; ++i) - Array.Clear(y[i], 0, y[i].Length); + VBufferUtils.Clear(ref y[i]); bool center = mean.IsDense; float n = 0; @@ -268,8 +263,8 @@ private static void Project(IHost host, FeatureFloatVectorCursor.Factory cursorF { VectorUtils.AddMult( in cursor.Features, - y[i], - cursor.Weight * VectorUtils.DotProduct(omega[i], in cursor.Features)); + cursor.Weight * VectorUtils.DotProduct(in omega[i], in cursor.Features), + ref y[i]); } n += cursor.Weight; count++; @@ -282,13 +277,13 @@ private static void Project(IHost host, FeatureFloatVectorCursor.Factory cursorF float invn = 1 / n; for (var i = 0; i < numCols; ++i) - VectorUtils.ScaleBy(y[i], invn); + VectorUtils.ScaleBy(ref y[i], invn); if (center) { VectorUtils.ScaleBy(ref mean, invn); for (int i = 0; i < numCols; i++) - VectorUtils.AddMult(in mean, y[i], -VectorUtils.DotProduct(omega[i], in mean)); + VectorUtils.AddMult(in mean, -VectorUtils.DotProduct(in omega[i], in mean), ref y[i]); } } @@ -296,8 +291,9 @@ private static void Project(IHost host, FeatureFloatVectorCursor.Factory cursorF /// Modifies in place so it becomes * eigenvectors / eigenvalues. /// // REVIEW: improve - private static void PostProcess(float[][] y, float[] sigma, float[] z, int d, int k) + private static void PostProcess(VBuffer[] y, float[] sigma, float[] z, int d, int k) { + Contracts.Assert(y.All(v => v.IsDense)); var pinv = new float[k]; var tmp = new float[k]; @@ -310,10 +306,10 @@ private static void PostProcess(float[][] y, float[] sigma, float[] z, int d, in { tmp[j] = 0; for (int l = 0; l < k; l++) - tmp[j] += y[l][i] * z[j * k + l]; + tmp[j] += y[l].Values[i] * z[j * k + l]; } for (int j = 0; j < k; j++) - y[j][i] = pinv[j] * tmp[j]; + y[j].Values[i] = pinv[j] * tmp[j]; } } @@ -397,7 +393,7 @@ public override PredictionKind PredictionKind get { return PredictionKind.AnomalyDetection; } } - internal PcaPredictor(IHostEnvironment env, int rank, float[][] eigenVectors, in VBuffer mean) + internal PcaPredictor(IHostEnvironment env, int rank, VBuffer[] eigenVectors, in VBuffer mean) : base(env, RegistrationName) { _dimension = eigenVectors[0].Length; @@ -407,8 +403,8 @@ internal PcaPredictor(IHostEnvironment env, int rank, float[][] eigenVectors, in for (var i = 0; i < rank; ++i) // Only want first k { - _eigenVectors[i] = new VBuffer(eigenVectors[i].Length, eigenVectors[i]); - _meanProjected[i] = VectorUtils.DotProduct(in _eigenVectors[i], in mean); + _eigenVectors[i] = eigenVectors[i]; + _meanProjected[i] = VectorUtils.DotProduct(in eigenVectors[i], in mean); } _mean = mean; diff --git a/src/Microsoft.ML.PCA/PcaTransform.cs b/src/Microsoft.ML.PCA/PcaTransform.cs index aa7bbc69c4..e124f9cb7b 100644 --- a/src/Microsoft.ML.PCA/PcaTransform.cs +++ b/src/Microsoft.ML.PCA/PcaTransform.cs @@ -554,7 +554,7 @@ internal static void ValidatePcaInput(IExceptionContext ectx, string name, Colum throw ectx.ExceptSchemaMismatch(nameof(inputSchema), "input", name, "vector of floats with fixed size greater than 1", type.ToString()); } - private sealed class Mapper : OneToOneMapperBase + private sealed class Mapper : MapperBase { public sealed class ColumnSchemaInfo { @@ -600,7 +600,7 @@ public Mapper(PcaTransform parent, Schema inputSchema) } } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { var result = new Schema.Column[_numColumns]; for (int i = 0; i < _numColumns; i++) @@ -608,7 +608,7 @@ protected override Schema.Column[] GetOutputColumnsCore() return result; } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _numColumns); @@ -630,14 +630,17 @@ private static void TransformFeatures(IExceptionContext ectx, in VBuffer { ectx.Check(src.Length == transformInfo.Dimension); - var editor = VBufferEditor.Create(ref dst, transformInfo.Rank); + var values = dst.Values; + if (Utils.Size(values) < transformInfo.Rank) + values = new float[transformInfo.Rank]; + for (int i = 0; i < transformInfo.Rank; i++) { - editor.Values[i] = VectorUtils.DotProductWithOffset(transformInfo.Eigenvectors[i], 0, in src) - + values[i] = VectorUtils.DotProductWithOffset(transformInfo.Eigenvectors[i], 0, in src) - (transformInfo.MeanProjected == null ? 0 : transformInfo.MeanProjected[i]); } - dst = editor.Commit(); + dst = new VBuffer(transformInfo.Rank, values, dst.Indices); } } diff --git a/src/Microsoft.ML.Parquet/ParquetLoader.cs b/src/Microsoft.ML.Parquet/ParquetLoader.cs index 6254c70a1a..4bbfc608f5 100644 --- a/src/Microsoft.ML.Parquet/ParquetLoader.cs +++ b/src/Microsoft.ML.Parquet/ParquetLoader.cs @@ -384,7 +384,7 @@ private static Stream OpenStream(string filename) public Schema Schema { get; } - public long? GetRowCount() + public long? GetRowCount(bool lazy = true) { return _rowCount; } diff --git a/src/Microsoft.ML.PipelineInference/AutoInference.cs b/src/Microsoft.ML.PipelineInference/AutoInference.cs index d04b61403f..5fb8e70d20 100644 --- a/src/Microsoft.ML.PipelineInference/AutoInference.cs +++ b/src/Microsoft.ML.PipelineInference/AutoInference.cs @@ -470,7 +470,7 @@ public static AutoMlMlState InferPipelines(IHostEnvironment env, PipelineOptimiz env.CheckValue(trainData, nameof(trainData)); env.CheckValue(testData, nameof(testData)); - int numOfRows = (int)(trainData.GetRowCount() ?? 1000); + int numOfRows = (int)(trainData.GetRowCount(false) ?? 1000); AutoMlMlState amls = new AutoMlMlState(env, metric, autoMlEngine, terminator, trainerKind, trainData, testData); bestPipeline = amls.InferPipelines(numTransformLevels, batchSize, numOfRows); return amls; diff --git a/src/Microsoft.ML.PipelineInference/AutoMlUtils.cs b/src/Microsoft.ML.PipelineInference/AutoMlUtils.cs index 8837ac945b..ba4b1e3872 100644 --- a/src/Microsoft.ML.PipelineInference/AutoMlUtils.cs +++ b/src/Microsoft.ML.PipelineInference/AutoMlUtils.cs @@ -338,7 +338,7 @@ public static AutoInference.LevelDependencyMap ComputeColumnResponsibilities(IDa return mapping; } - internal static TlcModule.SweepableParamAttribute[] GetSweepRanges(Type learnerInputType) + public static TlcModule.SweepableParamAttribute[] GetSweepRanges(Type learnerInputType) { var paramSet = new List(); foreach (var prop in learnerInputType.GetProperties(BindingFlags.Instance | @@ -370,7 +370,7 @@ internal static TlcModule.SweepableParamAttribute[] GetSweepRanges(Type learnerI return paramSet.ToArray(); } - internal static IValueGenerator ToIValueGenerator(TlcModule.SweepableParamAttribute attr) + public static IValueGenerator ToIValueGenerator(TlcModule.SweepableParamAttribute attr) { if (attr is TlcModule.SweepableLongParamAttribute sweepableLongParamAttr) { @@ -430,7 +430,7 @@ private static void SetValue(PropertyInfo pi, IComparable value, object entryPoi /// /// Updates properties of entryPointObj instance based on the values in sweepParams /// - internal static bool UpdateProperties(object entryPointObj, TlcModule.SweepableParamAttribute[] sweepParams) + public static bool UpdateProperties(object entryPointObj, TlcModule.SweepableParamAttribute[] sweepParams) { bool result = true; foreach (var param in sweepParams) @@ -501,7 +501,7 @@ public static void PopulateSweepableParams(RecipeInference.SuggestedRecipe.Sugge } } - internal static bool CheckEntryPointStateMatchesParamValues(object entryPointObj, + public static bool CheckEntryPointStateMatchesParamValues(object entryPointObj, TlcModule.SweepableParamAttribute[] sweepParams) { foreach (var param in sweepParams) @@ -584,7 +584,7 @@ public static IRunResult[] ConvertToRunResults(PipelinePattern[] history, bool i /// Method to convert set of sweepable hyperparameters into instances used /// by the current smart hyperparameter sweepers. /// - internal static IComponentFactory[] ConvertToComponentFactories(TlcModule.SweepableParamAttribute[] hps) + public static IComponentFactory[] ConvertToComponentFactories(TlcModule.SweepableParamAttribute[] hps) { var results = new IComponentFactory[hps.Length]; diff --git a/src/Microsoft.ML.PipelineInference/DatasetFeaturesInference.cs b/src/Microsoft.ML.PipelineInference/DatasetFeaturesInference.cs index 235a85e96c..097a61e621 100644 --- a/src/Microsoft.ML.PipelineInference/DatasetFeaturesInference.cs +++ b/src/Microsoft.ML.PipelineInference/DatasetFeaturesInference.cs @@ -21,19 +21,19 @@ public static class DatasetFeatureInference { public sealed class Stats { - [JsonIgnore] private SummaryStatistics _statistics; + [JsonIgnore] public SummaryStatistics Statistics; [JsonIgnore] public double Sum; public Stats() { - _statistics = new SummaryStatistics(); + Statistics = new SummaryStatistics(); } public void Add(double x) { Sum += x; - _statistics.Add(x); + Statistics.Add(x); } public void Add(IEnumerable x) @@ -43,31 +43,31 @@ public void Add(IEnumerable x) } [JsonProperty] - public long Count => _statistics.RawCount; + public long Count => Statistics.RawCount; [JsonProperty] - public double? NonZeroValueCount => _statistics.RawCount > 20 ? (double?)_statistics.Nonzero : null; + public double? NonZeroValueCount => Statistics.RawCount > 20 ? (double?)Statistics.Nonzero : null; [JsonProperty] - public double? Variance => _statistics.RawCount > 20 ? (double?)_statistics.SampleVariance : null; + public double? Variance => Statistics.RawCount > 20 ? (double?)Statistics.SampleVariance : null; [JsonProperty] - public double? StandardDeviation => _statistics.RawCount > 20 ? (double?)_statistics.SampleStdDev : null; + public double? StandardDeviation => Statistics.RawCount > 20 ? (double?)Statistics.SampleStdDev : null; [JsonProperty] - public double? Skewness => _statistics.RawCount > 20 ? (double?)_statistics.Skewness : null; + public double? Skewness => Statistics.RawCount > 20 ? (double?)Statistics.Skewness : null; [JsonProperty] - public double? Kurtosis => _statistics.RawCount > 20 ? (double?)_statistics.Kurtosis : null; + public double? Kurtosis => Statistics.RawCount > 20 ? (double?)Statistics.Kurtosis : null; [JsonProperty] - public double? Mean => _statistics.RawCount > 20 ? (double?)_statistics.Mean : null; + public double? Mean => Statistics.RawCount > 20 ? (double?)Statistics.Mean : null; [JsonIgnore] - public double Min => _statistics.Min; + public double Min => Statistics.Min; [JsonIgnore] - public double Max => _statistics.Max; + public double Max => Statistics.Max; } public sealed class Column @@ -428,8 +428,8 @@ private void ApplyCore(ReadOnlyMemory[][] data, Column column) NumericColumnFeatures.Add(new ColumnStatistics { Column = column, Stats = stats }); else { - NonNumericColumnLengthFeature.Add(new ColumnStatistics { Column = column, Stats = stats }); - NonNumericColumnSpacesFeature.Add(new ColumnStatistics { Column = column, Stats = spacesStats }); + NonNumericColumnLengthFeature.Push(new ColumnStatistics { Column = column, Stats = stats }); + NonNumericColumnSpacesFeature.Push(new ColumnStatistics { Column = column, Stats = spacesStats }); } } diff --git a/src/Microsoft.ML.PipelineInference/InferenceUtils.cs b/src/Microsoft.ML.PipelineInference/InferenceUtils.cs index 9510e94eb3..b87cf8cb02 100644 --- a/src/Microsoft.ML.PipelineInference/InferenceUtils.cs +++ b/src/Microsoft.ML.PipelineInference/InferenceUtils.cs @@ -2,7 +2,6 @@ // 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.Data; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Transforms; @@ -18,7 +17,7 @@ public static IDataView Take(this IDataView data, int count) { Contracts.CheckValue(data, nameof(data)); // REVIEW: This should take an env as a parameter, not create one. - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(0); var take = SkipTakeFilter.Create(env, new SkipTakeFilter.TakeArguments { Count = count }, data); return CacheCore(take, env); } @@ -27,7 +26,7 @@ public static IDataView Cache(this IDataView data) { Contracts.CheckValue(data, nameof(data)); // REVIEW: This should take an env as a parameter, not create one. - return CacheCore(data, new MLContext(0)); + return CacheCore(data, new ConsoleEnvironment(0)); } private static IDataView CacheCore(IDataView data, IHostEnvironment env) diff --git a/src/Microsoft.ML.PipelineInference/Interfaces/IPipelineNode.cs b/src/Microsoft.ML.PipelineInference/Interfaces/IPipelineNode.cs index a8bee5d046..30f93d2eb4 100644 --- a/src/Microsoft.ML.PipelineInference/Interfaces/IPipelineNode.cs +++ b/src/Microsoft.ML.PipelineInference/Interfaces/IPipelineNode.cs @@ -60,7 +60,7 @@ protected string GetEpName(Type type) return epName; } - private protected void PropagateParamSetValues(ParameterSet hyperParams, + protected void PropagateParamSetValues(ParameterSet hyperParams, TlcModule.SweepableParamAttribute[] sweepParams) { var spMap = sweepParams.ToDictionary(sp => sp.Name); @@ -79,9 +79,9 @@ public sealed class TransformPipelineNode : PipelineNodeBase, IPipelineNode sweepParams = null, CommonInputs.ITrainerInput subTrainerObj = null) { @@ -136,10 +136,9 @@ public sealed class TrainerPipelineNode : PipelineNodeBase, IPipelineNode sweepParams = null, ParameterSet hyperParameterSet = null) { diff --git a/src/Microsoft.ML.PipelineInference/Microsoft.ML.PipelineInference.csproj b/src/Microsoft.ML.PipelineInference/Microsoft.ML.PipelineInference.csproj index 9f79aebbe1..fdc8d2802d 100644 --- a/src/Microsoft.ML.PipelineInference/Microsoft.ML.PipelineInference.csproj +++ b/src/Microsoft.ML.PipelineInference/Microsoft.ML.PipelineInference.csproj @@ -15,9 +15,9 @@ - + diff --git a/src/Microsoft.ML.PipelineInference/Properties/AssemblyInfo.cs b/src/Microsoft.ML.PipelineInference/Properties/AssemblyInfo.cs deleted file mode 100644 index db1d151fa2..0000000000 --- a/src/Microsoft.ML.PipelineInference/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Runtime.CompilerServices; -using Microsoft.ML; - -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Predictor.Tests" + PublicKey.TestValue)] - -[assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.PipelineInference/RecipeInference.cs b/src/Microsoft.ML.PipelineInference/RecipeInference.cs index 4f3b796153..842bf339a2 100644 --- a/src/Microsoft.ML.PipelineInference/RecipeInference.cs +++ b/src/Microsoft.ML.PipelineInference/RecipeInference.cs @@ -2,13 +2,12 @@ // 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.Data; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Runtime.Internal.Internallearn; using Microsoft.ML.Runtime.Sweeper; -using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.FastTree; +using Microsoft.ML.Trainers; using Microsoft.ML.Trainers.Online; using Newtonsoft.Json; using System; diff --git a/src/Microsoft.ML.PipelineInference/TextFileContents.cs b/src/Microsoft.ML.PipelineInference/TextFileContents.cs index df2dbc4a7f..f3f45cc8b9 100644 --- a/src/Microsoft.ML.PipelineInference/TextFileContents.cs +++ b/src/Microsoft.ML.PipelineInference/TextFileContents.cs @@ -114,7 +114,7 @@ private static bool TryParseFile(IChannel ch, TextLoader.Arguments args, IMultiS try { // No need to provide information from unsuccessful loader, so we create temporary environment and get information from it in case of success - using (var loaderEnv = new ConsoleEnvironment(0, verbose: true)) + using (var loaderEnv = new ConsoleEnvironment(0, true)) { var messages = new ConcurrentBag(); loaderEnv.AddListener( diff --git a/src/Microsoft.ML.PipelineInference/TransformInference.cs b/src/Microsoft.ML.PipelineInference/TransformInference.cs index 4c8312d663..724d231843 100644 --- a/src/Microsoft.ML.PipelineInference/TransformInference.cs +++ b/src/Microsoft.ML.PipelineInference/TransformInference.cs @@ -374,7 +374,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum var epInput = new ML.Legacy.Transforms.TextToKeyConverter(); epInput.Column = new[] { - new ML.Legacy.Transforms.ValueToKeyMappingTransformerColumn + new ML.Legacy.Transforms.TermTransformColumn { Name = dest, Source = source @@ -415,7 +415,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.ColumnsCopyingTransformerColumn + new ML.Legacy.Transforms.CopyColumnsTransformColumn { Name = dest, Source = source @@ -477,7 +477,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.OneHotHashEncodingTransformerColumn + new ML.Legacy.Transforms.CategoricalHashTransformColumn { Name = dest, Source = source @@ -510,7 +510,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.ColumnsCopyingTransformerColumn + new ML.Legacy.Transforms.CopyColumnsTransformColumn { Name = dest, Source = source @@ -590,8 +590,8 @@ public override IEnumerable Apply(IntermediateColumn[] colum bool foundCatHash = false; var colSpecCat = new StringBuilder(); var colSpecCatHash = new StringBuilder(); - var catColumns = new List(); - var catHashColumns = new List(); + var catColumns = new List(); + var catHashColumns = new List(); var featureCols = new List(); foreach (var column in columns) @@ -622,7 +622,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { foundCat = true; colSpecCat.Append(columnArgument); - catColumns.Add(new ML.Legacy.Transforms.OneHotEncodingTransformerColumn + catColumns.Add(new ML.Legacy.Transforms.CategoricalTransformColumn { Name = columnNameQuoted.ToString(), Source = columnNameQuoted.ToString() @@ -633,7 +633,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum ch.Info("Categorical column '{0}' has extremely high cardinality. Suggested hash-based category encoding.", column.ColumnName); foundCatHash = true; colSpecCatHash.Append(columnArgument); - catHashColumns.Add(new ML.Legacy.Transforms.OneHotHashEncodingTransformerColumn + catHashColumns.Add(new ML.Legacy.Transforms.CategoricalHashTransformColumn { Name = columnNameQuoted.ToString(), Source = columnNameQuoted.ToString() @@ -707,7 +707,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { var columnArgument = new StringBuilder(); var columnNameQuoted = new StringBuilder(); - var epColumns = new List(); + var epColumns = new List(); foreach (var column in columns) { @@ -730,7 +730,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum columnNameQuoted.AppendFormat("{0}", column.ColumnName); } - epColumns.Add(new ML.Legacy.Transforms.TypeConvertingTransformerColumn + epColumns.Add(new ML.Legacy.Transforms.ConvertingTransformColumn { Name = columnNameQuoted.ToString(), Source = columnNameQuoted.ToString(), @@ -846,7 +846,7 @@ public static SuggestedTransform ConcatColumnsIntoOne(List columnNames, { Column = new[] { - new ML.Legacy.Transforms.ColumnConcatenatingTransformerColumn + new ML.Legacy.Transforms.ConcatTransformColumn { Name = concatColumnName, Source = columnNames.ToArray() @@ -979,7 +979,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.ColumnConcatenatingTransformerColumn + new ML.Legacy.Transforms.ConcatTransformColumn { Name = featuresTreeFeatColumn, Source = new [] { treeFeaturizerOutputColumnName } @@ -1016,7 +1016,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.ColumnConcatenatingTransformerColumn + new ML.Legacy.Transforms.ConcatTransformColumn { Name = featuresKMeansColumn, Source = new [] { kMeansOutputColumnName } @@ -1292,7 +1292,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.MissingValueHandlingTransformerColumn + new ML.Legacy.Transforms.NAHandleTransformColumn { Name = name, Source = name @@ -1372,7 +1372,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.ColumnConcatenatingTransformerColumn + new ML.Legacy.Transforms.ConcatTransformColumn { Name = DefaultColumnNames.Features, Source = columnListQuoted.ToArray() @@ -1461,7 +1461,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.ColumnsCopyingTransformerColumn + new ML.Legacy.Transforms.CopyColumnsTransformColumn { Name = DefaultColumnNames.Name, Source = columnNameQuoted.ToString() @@ -1507,7 +1507,7 @@ public override IEnumerable Apply(IntermediateColumn[] colum { Column = new[] { - new ML.Legacy.Transforms.ColumnConcatenatingTransformerColumn + new ML.Legacy.Transforms.ConcatTransformColumn { Name = DefaultColumnNames.Name, Source = columnListQuoted.ToArray() diff --git a/src/Microsoft.ML.Recommender/MatrixFactorizationStatic.cs b/src/Microsoft.ML.Recommender/MatrixFactorizationStatic.cs index fee3009a6e..5d53c1ec8d 100644 --- a/src/Microsoft.ML.Recommender/MatrixFactorizationStatic.cs +++ b/src/Microsoft.ML.Recommender/MatrixFactorizationStatic.cs @@ -56,7 +56,7 @@ public static Scalar MatrixFactorization(this RegressionContext.Regres var rec = new MatrixFactorizationReconciler((env, labelColName, matrixColumnIndexColName, matrixRowIndexColName) => { - var trainer = new MatrixFactorizationTrainer(env, matrixColumnIndexColName, matrixRowIndexColName, labelColName, advancedSettings: + var trainer = new MatrixFactorizationTrainer(env, labelColName, matrixColumnIndexColName, matrixRowIndexColName, advancedSettings: args => { args.Lambda = regularizationCoefficient; diff --git a/src/Microsoft.ML.Recommender/MatrixFactorizationTrainer.cs b/src/Microsoft.ML.Recommender/MatrixFactorizationTrainer.cs index a0b0d35ce6..3894007701 100644 --- a/src/Microsoft.ML.Recommender/MatrixFactorizationTrainer.cs +++ b/src/Microsoft.ML.Recommender/MatrixFactorizationTrainer.cs @@ -78,30 +78,17 @@ namespace Microsoft.ML.Trainers /// ///

///

Example code can be found by searching for MatrixFactorization in ML.NET.

- /// /// /// /// - /// ///
public sealed class MatrixFactorizationTrainer : TrainerBase, IEstimator { - public enum LossFunctionType { SquareLossRegression = 0, SquareLossOneClass = 12 }; - public sealed class Arguments { - /// - /// Loss function minimized for finding factor matrices. Two values are allowed, 0 or 12. The values 0 means traditional collaborative filtering - /// problem with squared loss. The value 12 triggers one-class matrix factorization for implicit-feedback recommendation problem. - /// - [Argument(ArgumentType.AtMostOnce, HelpText = "Loss function minimized for finding factor matrices.")] - [TGUI(SuggestedSweeps = "0,12")] - [TlcModule.SweepableDiscreteParam("LossFunction", new object[] { LossFunctionType.SquareLossRegression, LossFunctionType.SquareLossOneClass })] - public LossFunctionType LossFunction = LossFunctionType.SquareLossRegression; - [Argument(ArgumentType.AtMostOnce, HelpText = "Regularization parameter. " + "It's the weight of factor matrices' norms in the objective function minimized by matrix factorization's algorithm. " + "A small value could cause over-fitting.")] @@ -127,33 +114,6 @@ public sealed class Arguments [TlcModule.SweepableDiscreteParam("Eta", new object[] { 0.001f, 0.01f, 0.1f })] public double Eta = 0.1; - /// - /// Importance of unobserved (i.e., negative) entries' loss in one-class matrix factorization. - /// In general, only a few of matrix entries (e.g., less than 1%) in the training are observed (i.e., positive). - /// To balance the contributions from unobserved and obverved in the overall loss function, this parameter is - /// usually a small value so that the solver is able to find a factorization equally good to unobserved and observed - /// entries. If only 10000 observed entries present in a 200000-by-300000 training matrix, one can try Alpha = 10000 / (200000*300000 - 10000). - /// When most entries in the training matrix are observed, one can use Alpha >> 1; for example, if only 10000 in previous - /// matrix is not observed, one can try Alpha = (200000 * 300000 - 10000) / 10000. Consequently, - /// Alpha = (# of observed entries) / (# of unobserved entries) can make observed and unobserved entries equally important - /// in the minimized loss function. However, the best setting in machine learning is alwasy data-depedent so user still needs to - /// try multiple values. - /// - [Argument(ArgumentType.AtMostOnce, HelpText = "Importance of unobserved entries' loss in one-class matrix factorization.")] - [TGUI(SuggestedSweeps = "1,0.01,0.0001,0.000001")] - [TlcModule.SweepableDiscreteParam("Alpha", new object[] { 1f, 0.01f, 0.0001f, 0.000001f})] - public double Alpha = 0.0001; - - /// - /// Desired negative entries value in one-class matrix factorization. In one-class matrix factorization, all matrix values observed are one - /// (which can be viewed as positive cases in binary classification) while unobserved values (which can be viewed as negative cases in binary - /// classification) need to be specified manually using this option. - /// - [Argument(ArgumentType.AtMostOnce, HelpText = "Desired negative entries' value in one-class matrix factorization")] - [TGUI(SuggestedSweeps = "0.000001,0,0001,0.01")] - [TlcModule.SweepableDiscreteParam("C", new object[] { 0.000001f, 0.0001f, 0.01f })] - public double C = 0.000001f; - [Argument(ArgumentType.AtMostOnce, HelpText = "Number of threads can be used in the training procedure.", ShortName = "t")] public int? NumThreads; @@ -169,13 +129,10 @@ public sealed class Arguments + "and the values of the matrix are ratings. "; // LIBMF's parameter - private readonly int _fun; private readonly double _lambda; private readonly int _k; private readonly int _iter; private readonly double _eta; - private readonly double _alpha; - private readonly double _c; private readonly int _threads; private readonly bool _quiet; private readonly bool _doNmf; @@ -233,15 +190,11 @@ public MatrixFactorizationTrainer(IHostEnvironment env, Arguments args) : base(e Host.CheckUserArg(args.NumIterations > 0, nameof(args.NumIterations), posError); Host.CheckUserArg(args.Lambda > 0, nameof(args.Lambda), posError); Host.CheckUserArg(args.Eta > 0, nameof(args.Eta), posError); - Host.CheckUserArg(args.Alpha > 0, nameof(args.Alpha), posError); - _fun = (int)args.LossFunction; _lambda = args.Lambda; _k = args.K; _iter = args.NumIterations; _eta = args.Eta; - _alpha = args.Alpha; - _c = args.C; _threads = args.NumThreads ?? Environment.ProcessorCount; _quiet = args.Quiet; _doNmf = args.NonNegative; @@ -253,29 +206,22 @@ public MatrixFactorizationTrainer(IHostEnvironment env, Arguments args) : base(e /// Initializing a new instance of . ///
/// The private instance of . + /// The name of the label column. /// The name of the column hosting the matrix's column IDs. /// The name of the column hosting the matrix's row IDs. - /// The name of the label column. /// A delegate to apply all the advanced arguments to the algorithm. /// The for additional input data to training. - public MatrixFactorizationTrainer(IHostEnvironment env, - string matrixColumnIndexColumnName, - string matrixRowIndexColumnName, - string labelColumn = DefaultColumnNames.Label, - TrainerEstimatorContext context = null, - Action advancedSettings = null) + public MatrixFactorizationTrainer(IHostEnvironment env, string labelColumn, string matrixColumnIndexColumnName, string matrixRowIndexColumnName, + TrainerEstimatorContext context = null, Action advancedSettings = null) : base(env, LoadNameValue) { var args = new Arguments(); advancedSettings?.Invoke(args); - _fun = (int)args.LossFunction; _lambda = args.Lambda; _k = args.K; _iter = args.NumIterations; _eta = args.Eta; - _alpha = args.Alpha; - _c = args.C; _threads = args.NumThreads ?? Environment.ProcessorCount; _quiet = args.Quiet; _doNmf = args.NonNegative; @@ -292,7 +238,7 @@ public MatrixFactorizationTrainer(IHostEnvironment env, /// Train a matrix factorization model based on training data, validation data, and so on in the given context. ///
/// The information collection needed for training. for details. - private protected override MatrixFactorizationPredictor Train(TrainContext context) + public override MatrixFactorizationPredictor Train(TrainContext context) { Host.CheckValue(context, nameof(context)); @@ -386,8 +332,8 @@ private MatrixFactorizationPredictor TrainCore(IChannel ch, RoleMappedData data, private SafeTrainingAndModelBuffer PrepareBuffer() { - return new SafeTrainingAndModelBuffer(Host, _fun, _k, _threads, Math.Max(20, 2 * _threads), - _iter, _lambda, _eta, _alpha, _c, _doNmf, _quiet, copyData: false); + return new SafeTrainingAndModelBuffer(Host, _k, Math.Max(20, 2 * _threads), + _threads, _iter, _lambda, _eta, _doNmf, _quiet, copyData: false); } /// diff --git a/src/Microsoft.ML.Recommender/SafeTrainingAndModelBuffer.cs b/src/Microsoft.ML.Recommender/SafeTrainingAndModelBuffer.cs index 33bb90ae0b..615b0875f8 100644 --- a/src/Microsoft.ML.Recommender/SafeTrainingAndModelBuffer.cs +++ b/src/Microsoft.ML.Recommender/SafeTrainingAndModelBuffer.cs @@ -44,107 +44,23 @@ private unsafe struct MFProblem [StructLayout(LayoutKind.Explicit)] private struct MFParameter { - /// - /// Enum of loss functions which can be minimized. - /// 0: square loss for regression. - /// 1: absolute loss for regression. - /// 2: KL-divergence for regression. - /// 5: logistic loss for binary classification. - /// 6: squared hinge loss for binary classification. - /// 7: hinge loss for binary classification. - /// 10: row-wise Bayesian personalized ranking. - /// 11: column-wise Bayesian personalized ranking. - /// 12: squared loss for implicit-feedback matrix factorization. - /// Fun 12 is solved by a coordinate descent method while other functions invoke - /// a stochastic gradient method. - /// [FieldOffset(0)] - public int Fun; - - /// - /// Rank of factor matrices. - /// - [FieldOffset(4)] public int K; - - /// - /// Number of threads which can be used for training. - /// - [FieldOffset(8)] + [FieldOffset(4)] public int NrThreads; - - /// - /// Number of blocks that the training matrix is divided into. The parallel stochastic gradient - /// method in LIBMF processes assigns each thread a block at one time. The ratings in one block - /// would be sequentially accessed (not randomaly accessed like standard stochastic gradient methods). - /// - [FieldOffset(12)] + [FieldOffset(8)] public int NrBins; - - /// - /// Number of training iteration. At one iteration, all values in the training matrix are roughly accessed once. - /// - [FieldOffset(16)] + [FieldOffset(12)] public int NrIters; - - /// - /// L1-norm regularization coefficient of left factor matrix. - /// + [FieldOffset(16)] + public float Lambda; [FieldOffset(20)] - public float LambdaP1; - - /// - /// L2-norm regularization coefficient of left factor matrix. - /// - [FieldOffset(24)] - public float LambdaP2; - - /// - /// L1-norm regularization coefficient of right factor matrix. - /// - [FieldOffset(28)] - public float LambdaQ1; - - /// - /// L2-norm regularization coefficient of right factor matrix. - /// - [FieldOffset(32)] - public float LambdaQ2; - - /// - /// Learning rate of LIBMF's stochastic gradient method. - /// - [FieldOffset(36)] public float Eta; - - /// - /// Coefficient of loss function on unobserved entries in the training matrix. It's used only with fun=12. - /// - [FieldOffset(40)] - public float Alpha; - - /// - /// Desired value of unobserved entries in the training matrix. It's used only with fun=12. - /// - [FieldOffset(44)] - public float C; - - /// - /// Specify if the factor matrices should be non-negative. - /// - [FieldOffset(48)] + [FieldOffset(24)] public int DoNmf; - - /// - /// Set to true so that LIBMF may produce less information to STDOUT. - /// - [FieldOffset(52)] + [FieldOffset(28)] public int Quiet; - - /// - /// Set to false so that LIBMF may reuse and modifiy the data passed in. - /// - [FieldOffset(56)] + [FieldOffset(32)] public int CopyData; } @@ -152,36 +68,14 @@ private struct MFParameter private unsafe struct MFModel { [FieldOffset(0)] - public int Fun; - /// - /// Number of rows in the training matrix. - /// - [FieldOffset(4)] public int M; - /// - /// Number of columns in the training matrix. - /// - [FieldOffset(8)] + [FieldOffset(4)] public int N; - /// - /// Rank of factor matrices. - /// - [FieldOffset(12)] + [FieldOffset(8)] public int K; - /// - /// Average value in the training matrix. - /// [FieldOffset(16)] - public float B; - /// - /// Left factor matrix. Its shape is M-by-K stored in row-major format. - /// - [FieldOffset(24)] // pointer is 8-byte on 64-bit machine. public float* P; - /// - /// Right factor matrix. Its shape is N-by-K stored in row-major format. - /// - [FieldOffset(32)] // pointer is 8-byte on 64-bit machine. + [FieldOffset(24)] public float* Q; } @@ -206,23 +100,16 @@ private unsafe struct MFModel private unsafe MFModel* _pMFModel; private readonly IHost _host; - public SafeTrainingAndModelBuffer(IHostEnvironment env, int fun, int k, int nrThreads, - int nrBins, int nrIters, double lambda, double eta, double alpha, double c, + public SafeTrainingAndModelBuffer(IHostEnvironment env, int k, int nrBins, int nrThreads, int nrIters, double lambda, double eta, bool doNmf, bool quiet, bool copyData) { _host = env.Register("SafeTrainingAndModelBuffer"); - _mfParam.Fun = fun; _mfParam.K = k; - _mfParam.NrThreads = nrThreads; _mfParam.NrBins = nrBins; + _mfParam.NrThreads = nrThreads; _mfParam.NrIters = nrIters; - _mfParam.LambdaP1 = 0; - _mfParam.LambdaP2 = (float)lambda; - _mfParam.LambdaQ1 = 0; - _mfParam.LambdaQ2 = (float)lambda; + _mfParam.Lambda = (float)lambda; _mfParam.Eta = (float)eta; - _mfParam.Alpha = (float)alpha; - _mfParam.C = (float)c; _mfParam.DoNmf = doNmf ? 1 : 0; _mfParam.Quiet = quiet ? 1 : 0; _mfParam.CopyData = copyData ? 1 : 0; diff --git a/src/Microsoft.ML.ResultProcessor/Microsoft.ML.ResultProcessor.csproj b/src/Microsoft.ML.ResultProcessor/Microsoft.ML.ResultProcessor.csproj index e0f084d70b..e5610126df 100644 --- a/src/Microsoft.ML.ResultProcessor/Microsoft.ML.ResultProcessor.csproj +++ b/src/Microsoft.ML.ResultProcessor/Microsoft.ML.ResultProcessor.csproj @@ -7,6 +7,10 @@ true + + + + diff --git a/src/Microsoft.ML.ResultProcessor/ResultProcessor.cs b/src/Microsoft.ML.ResultProcessor/ResultProcessor.cs index 85b9234856..b896e37bf6 100644 --- a/src/Microsoft.ML.ResultProcessor/ResultProcessor.cs +++ b/src/Microsoft.ML.ResultProcessor/ResultProcessor.cs @@ -151,9 +151,7 @@ public void GetDefaultSettingValues(IHostEnvironment env, string predictorName, /// private Dictionary GetDefaultSettings(IHostEnvironment env, string predictorName, string[] extraAssemblies = null) { -#pragma warning disable CS0618 // The result processor is an internal command line processing utility anyway, so this is, while not great, OK. AssemblyLoadingUtils.LoadAndRegister(env, extraAssemblies); -#pragma warning restore CS0618 var cls = env.ComponentCatalog.GetLoadableClassInfo(predictorName); if (cls == null) @@ -1156,9 +1154,7 @@ public static int Main(string[] args) { string currentDirectory = Path.GetDirectoryName(typeof(ResultProcessor).Module.FullyQualifiedName); using (var env = new ConsoleEnvironment(42)) -#pragma warning disable CS0618 // The result processor is an internal command line processing utility anyway, so this is, while not great, OK. using (AssemblyLoadingUtils.CreateAssemblyRegistrar(env, currentDirectory)) -#pragma warning restore CS0618 return Main(env, args); } @@ -1201,9 +1197,7 @@ protected static void Run(IHostEnvironment env, string[] args) if (cmd.IncludePerFoldResults) cmd.PerFoldResultSeparator = "" + PredictionUtil.SepCharFromString(cmd.PerFoldResultSeparator); -#pragma warning disable CS0618 // The result processor is an internal command line processing utility anyway, so this is, while not great, OK. AssemblyLoadingUtils.LoadAndRegister(env, cmd.ExtraAssemblies); -#pragma warning restore CS0618 if (cmd.Metrics.Length == 0) cmd.Metrics = null; diff --git a/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj b/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj index 8bc5796f73..6e20746a31 100644 --- a/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj +++ b/src/Microsoft.ML.SamplesUtils/Microsoft.ML.SamplesUtils.csproj @@ -5,8 +5,4 @@ Microsoft.ML - - - - diff --git a/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs b/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs index aae179e822..82ae0516c8 100644 --- a/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs +++ b/src/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs @@ -2,7 +2,6 @@ // 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 System; using System.Collections.Generic; using System.Net; @@ -106,7 +105,7 @@ public static IEnumerable GetTopicsData() var data = new List(); data.Add(new SampleTopicsData { Review = "animals birds cats dogs fish horse", ReviewReverse = "radiation galaxy universe duck", Label = true }); data.Add(new SampleTopicsData { Review = "horse birds house fish duck cats", ReviewReverse = "space galaxy universe radiation", Label = false }); - data.Add(new SampleTopicsData { Review = "car truck driver bus pickup", ReviewReverse = "bus pickup", Label = true }); + data.Add(new SampleTopicsData { Review = "car truck driver bus pickup", ReviewReverse = "bus pickup", Label = true}); data.Add(new SampleTopicsData { Review = "car truck driver bus pickup horse", ReviewReverse = "car truck", Label = false }); return data; @@ -135,100 +134,16 @@ public class SampleInfertData public static IEnumerable GetInfertData() { var data = new List(); - data.Add(new SampleInfertData - { - RowNum = 0, - Education = "0-5yrs", - Age = 26, - Parity = 6, - Induced = 1, - Case = 1, - Spontaneous = 2, - Stratum = 1, - PooledStratum = 3 - }); - data.Add(new SampleInfertData - { - RowNum = 1, - Education = "0-5yrs", - Age = 42, - Parity = 1, - Induced = 1, - Case = 1, - Spontaneous = 0, - Stratum = 2, - PooledStratum = 1 - }); - data.Add(new SampleInfertData - { - RowNum = 2, - Education = "0-5yrs", - Age = 39, - Parity = 6, - Induced = 2, - Case = 1, - Spontaneous = 0, - Stratum = 3, - PooledStratum = 4 - }); - data.Add(new SampleInfertData - { - RowNum = 3, - Education = "0-5yrs", - Age = 34, - Parity = 4, - Induced = 2, - Case = 1, - Spontaneous = 0, - Stratum = 4, - PooledStratum = 2 - }); - data.Add(new SampleInfertData - { - RowNum = 4, - Education = "6-11yrs", - Age = 35, - Parity = 3, - Induced = 1, - Case = 1, - Spontaneous = 1, - Stratum = 5, - PooledStratum = 32 - }); - return data; - } - - public class SampleVectorOfNumbersData - { - [VectorType(10)] - - public float[] Features { get; set; } - } - - /// - /// Returns a few rows of the infertility dataset. - /// - public static IEnumerable GetVectorOfNumbersData() - { - var data = new List(); - data.Add(new SampleVectorOfNumbersData { Features = new float[10] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } }); - data.Add(new SampleVectorOfNumbersData { Features = new float[10] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 } }); - data.Add(new SampleVectorOfNumbersData - { - Features = new float[10] { 2, 3, 4, 5, 6, 7, 8, 9, 0, 1 } - }); - data.Add(new SampleVectorOfNumbersData - { - Features = new float[10] { 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, } - }); - data.Add(new SampleVectorOfNumbersData - { - Features = new float[10] { 5, 6, 7, 8, 9, 0, 1, 2, 3, 4 } - }); - data.Add(new SampleVectorOfNumbersData - { - Features = new float[10] { 6, 7, 8, 9, 0, 1, 2, 3, 4, 5 } - }); + data.Add(new SampleInfertData { + RowNum = 0, Education = "0-5yrs", Age = 26, Parity = 6, Induced = 1, Case = 1, Spontaneous = 2, Stratum = 1, PooledStratum = 3 }); + data.Add(new SampleInfertData { + RowNum = 1, Education = "0-5yrs", Age = 42, Parity = 1, Induced = 1, Case = 1, Spontaneous = 0, Stratum = 2, PooledStratum = 1 }); + data.Add(new SampleInfertData { + RowNum = 2, Education = "0-5yrs", Age = 39, Parity = 6, Induced = 2, Case = 1, Spontaneous = 0, Stratum = 3, PooledStratum = 4 }); + data.Add(new SampleInfertData { + RowNum = 3, Education = "0-5yrs", Age = 34, Parity = 4, Induced = 2, Case = 1, Spontaneous = 0, Stratum = 4, PooledStratum = 2 }); + data.Add(new SampleInfertData { + RowNum = 4, Education = "6-11yrs", Age = 35, Parity = 3, Induced = 1, Case = 1, Spontaneous = 1, Stratum = 5, PooledStratum = 32 }); return data; } } diff --git a/src/Microsoft.ML.StandardLearners/AssemblyInfo.cs b/src/Microsoft.ML.StandardLearners/AssemblyInfo.cs index 671913b203..415752aa8d 100644 --- a/src/Microsoft.ML.StandardLearners/AssemblyInfo.cs +++ b/src/Microsoft.ML.StandardLearners/AssemblyInfo.cs @@ -6,6 +6,5 @@ using Microsoft.ML; [assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Legacy" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.HalLearners" + PublicKey.Value)] [assembly: WantsToBeBestFriends] diff --git a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineCatalog.cs b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineCatalog.cs index cc11b083dd..f94511ec76 100644 --- a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineCatalog.cs +++ b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineCatalog.cs @@ -18,22 +18,21 @@ public static class FactorizationMachineExtensions /// Predict a target using a field-aware factorization machine algorithm. /// /// The binary classification context trainer object. - /// The features, or independent variables. - /// The label, or dependent variable. + /// The label, or dependent variable. + /// The features, or independent variables. /// The optional example weights. /// A delegate to set more settings. /// The settings here will override the ones provided in the direct method signature, /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public static FieldAwareFactorizationMachineTrainer FieldAwareFactorizationMachine(this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string[] featureColumns, - string labelColumn = DefaultColumnNames.Label, - string weights = null, - Action advancedSettings = null) + string label, string[] features, + string weights = null, + Action advancedSettings = null) { Contracts.CheckValue(ctx, nameof(ctx)); var env = CatalogUtils.GetEnvironment(ctx); - return new FieldAwareFactorizationMachineTrainer(env, featureColumns, labelColumn, weights, advancedSettings: advancedSettings); + return new FieldAwareFactorizationMachineTrainer(env, label, features, weights, advancedSettings: advancedSettings); } } } diff --git a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineInterface.cs b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineInterface.cs index f746c3bd89..a4a2b79787 100644 --- a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineInterface.cs +++ b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineInterface.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Runtime.Internal.CpuMath; +using Microsoft.ML.Runtime.Internal.Utilities; using System.Runtime.InteropServices; using System.Security; diff --git a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineStatic.cs b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineStatic.cs index 3dbb900326..2a95df5dd7 100644 --- a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineStatic.cs +++ b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineStatic.cs @@ -56,7 +56,7 @@ public static (Scalar score, Scalar predictedLabel) FieldAwareFacto var rec = new CustomReconciler((env, labelCol, featureCols) => { - var trainer = new FieldAwareFactorizationMachineTrainer(env, featureCols, labelCol, advancedSettings: + var trainer = new FieldAwareFactorizationMachineTrainer(env, labelCol, featureCols, advancedSettings: args => { args.LearningRate = learningRate; diff --git a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineTrainer.cs b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineTrainer.cs index 756c1964a6..537a75a4d6 100644 --- a/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineTrainer.cs +++ b/src/Microsoft.ML.StandardLearners/FactorizationMachine/FactorizationMachineTrainer.cs @@ -134,17 +134,13 @@ public FieldAwareFactorizationMachineTrainer(IHostEnvironment env, Arguments arg /// Initializing a new instance of . ///
/// The private instance of . - /// The name of column hosting the features. /// The name of the label column. + /// The name of column hosting the features. /// A delegate to apply all the advanced arguments to the algorithm. - /// The name of the optional weights' column. + /// The name of the weight column. /// The for additional input data to training. - public FieldAwareFactorizationMachineTrainer(IHostEnvironment env, - string[] featureColumns, - string labelColumn = DefaultColumnNames.Label, - string weights = null, - TrainerEstimatorContext context = null, - Action advancedSettings = null) + public FieldAwareFactorizationMachineTrainer(IHostEnvironment env, string labelColumn, string[] featureColumns, + string weightColumn = null, TrainerEstimatorContext context = null, Action advancedSettings = null) : base(env, LoadName) { var args = new Arguments(); @@ -161,7 +157,7 @@ public FieldAwareFactorizationMachineTrainer(IHostEnvironment env, FeatureColumns[i] = new SchemaShape.Column(featureColumns[i], SchemaShape.Column.VectorKind.Vector, NumberType.R4, false); LabelColumn = new SchemaShape.Column(labelColumn, SchemaShape.Column.VectorKind.Scalar, BoolType.Instance, false); - WeightColumn = weights != null ? new SchemaShape.Column(weights, SchemaShape.Column.VectorKind.Scalar, NumberType.R4, false) : null; + WeightColumn = weightColumn != null ? new SchemaShape.Column(weightColumn, SchemaShape.Column.VectorKind.Scalar, NumberType.R4, false) : null; } /// @@ -429,7 +425,7 @@ private FieldAwareFactorizationMachinePredictor TrainCore(IChannel ch, IProgress return new FieldAwareFactorizationMachinePredictor(Host, _norm, fieldCount, totalFeatureCount, _latentDim, linearWeights, latentWeightsAligned); } - private protected override FieldAwareFactorizationMachinePredictor Train(TrainContext context) + public override FieldAwareFactorizationMachinePredictor Train(TrainContext context) { Host.CheckValue(context, nameof(context)); var initPredictor = context.InitialPredictor as FieldAwareFactorizationMachinePredictor; diff --git a/src/Microsoft.ML.StandardLearners/Microsoft.ML.StandardLearners.csproj b/src/Microsoft.ML.StandardLearners/Microsoft.ML.StandardLearners.csproj index d1c2fba257..b1624559cd 100644 --- a/src/Microsoft.ML.StandardLearners/Microsoft.ML.StandardLearners.csproj +++ b/src/Microsoft.ML.StandardLearners/Microsoft.ML.StandardLearners.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -6,10 +6,6 @@ true - - - - diff --git a/src/Microsoft.ML.StandardLearners/Optimizer/DifferentiableFunction.cs b/src/Microsoft.ML.StandardLearners/Optimizer/DifferentiableFunction.cs index d54f6b8666..ee928e5cda 100644 --- a/src/Microsoft.ML.StandardLearners/Optimizer/DifferentiableFunction.cs +++ b/src/Microsoft.ML.StandardLearners/Optimizer/DifferentiableFunction.cs @@ -101,7 +101,7 @@ private void Eval(object chunkIndexObj) VBuffer tempGrad = default(VBuffer); for (int i = from; i < to; ++i) { - VBufferUtils.Resize(ref tempGrad, 0, 0); + tempGrad = new VBuffer(0, 0, tempGrad.Values, tempGrad.Indices); _tempVals[chunkIndex] += _func(i, in _input, ref tempGrad); if (_tempGrads[chunkIndex].Length == 0) tempGrad.CopyTo(ref _tempGrads[chunkIndex]); @@ -247,7 +247,7 @@ public static Float Test(DifferentiableFunction f, in VBuffer x, bool qui /// /// /// - public static void TestAllCoords(DifferentiableFunction f, in VBuffer x) + public static void TestAllCoords(DifferentiableFunction f, ref VBuffer x) { // REVIEW: Delete this method? VBuffer grad = default(VBuffer); @@ -263,7 +263,7 @@ public static void TestAllCoords(DifferentiableFunction f, in VBuffer x) VBuffer dir = new VBuffer(x.Length, 1, new Float[] { 1 }, new int[] { 0 }); for (int n = 0; n < x.Length; n++) { - VBufferEditor.CreateFromBuffer(ref dir).Values[0] = n; + dir.Values[0] = n; VectorUtils.AddMultInto(in x, Eps, in dir, ref newX); Float rVal = f(in newX, ref newGrad, null); @@ -286,7 +286,7 @@ public static void TestAllCoords(DifferentiableFunction f, in VBuffer x) /// Function to test /// Point at which to test /// List of coordinates to test - public static void TestCoords(DifferentiableFunction f, in VBuffer x, IList coords) + public static void TestCoords(DifferentiableFunction f, ref VBuffer x, IList coords) { // REVIEW: Delete this method? VBuffer grad = default(VBuffer); @@ -302,7 +302,7 @@ public static void TestCoords(DifferentiableFunction f, in VBuffer x, ILi VBuffer dir = new VBuffer(x.Length, 1, new Float[] { 1 }, new int[] { 0 }); foreach (int n in coords) { - VBufferEditor.CreateFromBuffer(ref dir).Values[0] = n; + dir.Values[0] = n; VectorUtils.AddMultInto(in x, Eps, in dir, ref newX); Float rVal = f(in newX, ref newGrad, null); diff --git a/src/Microsoft.ML.StandardLearners/Optimizer/LineSearch.cs b/src/Microsoft.ML.StandardLearners/Optimizer/LineSearch.cs index 6b905a8ef2..fb8e2a6520 100644 --- a/src/Microsoft.ML.StandardLearners/Optimizer/LineSearch.cs +++ b/src/Microsoft.ML.StandardLearners/Optimizer/LineSearch.cs @@ -530,7 +530,7 @@ public static void Main(string[] argv) GDOptimizer gdo = new GDOptimizer(term, null, true); print = true; CreateWrapped(out init, 0, 0); - gdo.Minimize(QuadTest2D, in init, ref ans); + gdo.Minimize(QuadTest2D, ref init, ref ans); QuadTest2D(in ans, ref grad); Console.WriteLine(VectorUtils.Norm(grad)); } diff --git a/src/Microsoft.ML.StandardLearners/Optimizer/OptimizationMonitor.cs b/src/Microsoft.ML.StandardLearners/Optimizer/OptimizationMonitor.cs index 705c9f8477..7b231bb027 100644 --- a/src/Microsoft.ML.StandardLearners/Optimizer/OptimizationMonitor.cs +++ b/src/Microsoft.ML.StandardLearners/Optimizer/OptimizationMonitor.cs @@ -85,7 +85,7 @@ private Float Check(Optimizer.OptimizerState state) { Console.Error.Write(_checkingMessage); Console.Error.Flush(); - VBuffer x = state.X; + var x = state.X; var lastDir = state.LastDir; Float checkResult = GradientTester.Test(state.Function, in x, ref lastDir, true, ref _newGrad, ref _newX); for (int i = 0; i < _checkingMessage.Length; i++) diff --git a/src/Microsoft.ML.StandardLearners/Optimizer/Optimizer.cs b/src/Microsoft.ML.StandardLearners/Optimizer/Optimizer.cs index 914924d762..4ec56d0eaa 100644 --- a/src/Microsoft.ML.StandardLearners/Optimizer/Optimizer.cs +++ b/src/Microsoft.ML.StandardLearners/Optimizer/Optimizer.cs @@ -645,7 +645,7 @@ public void Minimize(DifferentiableFunction function, ref VBuffer initial double? improvement = null; double x; int end; - if (message != null && DoubleParser.TryParse(message.AsSpan(), out x, out end)) + if (message != null && DoubleParser.TryParse(message.AsMemory().Span, out x, out end)) improvement = x; pch.Checkpoint(state.Value, improvement, state.Iter); diff --git a/src/Microsoft.ML.StandardLearners/Optimizer/SgdOptimizer.cs b/src/Microsoft.ML.StandardLearners/Optimizer/SgdOptimizer.cs index c03c709e2a..67fcf1c18b 100644 --- a/src/Microsoft.ML.StandardLearners/Optimizer/SgdOptimizer.cs +++ b/src/Microsoft.ML.StandardLearners/Optimizer/SgdOptimizer.cs @@ -169,7 +169,7 @@ public void Minimize(DStochasticGradient f, ref VBuffer initial, ref VBuf for (int n = 0; _maxSteps == 0 || n < _maxSteps; ++n) { if (_momentum == 0) - VBufferUtils.Resize(ref step, step.Length, 0); + step = new VBuffer(step.Length, 0, step.Values, step.Indices); else VectorUtils.ScaleBy(ref step, _momentum); @@ -349,7 +349,7 @@ public void ChangeDir() /// Function to minimize /// Initial point /// Approximate minimum - public void Minimize(DifferentiableFunction function, in VBuffer initial, ref VBuffer result) + public void Minimize(DifferentiableFunction function, ref VBuffer initial, ref VBuffer result) { Contracts.Check(FloatUtils.IsFinite(initial.GetValues()), "The initial vector contains NaNs or infinite values."); LineFunc lineFunc = new LineFunc(function, in initial, UseCG); @@ -387,102 +387,96 @@ internal static bool ShouldTerminate(in VBuffer x, in VBuffer xpre Contracts.Assert(x.Length == xprev.Length, "Vectors must have the same dimensionality."); Contracts.Assert(FloatUtils.IsFinite(xprev.GetValues())); - var xValues = x.GetValues(); - if (!FloatUtils.IsFinite(xValues)) + if (!FloatUtils.IsFinite(x.GetValues())) return true; - var xprevValues = xprev.GetValues(); if (x.IsDense && xprev.IsDense) { - for (int i = 0; i < xValues.Length; i++) + for (int i = 0; i < x.Length; i++) { - if (xValues[i] != xprevValues[i]) + if (x.Values[i] != xprev.Values[i]) return false; } } else if (xprev.IsDense) { - var xIndices = x.GetIndices(); int j = 0; - for (int ii = 0; ii < xValues.Length; ii++) + for (int ii = 0; ii < x.Count; ii++) { - int i = xIndices[ii]; + int i = x.Indices[ii]; while (j < i) { - if (xprevValues[j++] != 0) + if (xprev.Values[j++] != 0) return false; } Contracts.Assert(i == j); - if (xValues[ii] != xprevValues[j++]) + if (x.Values[ii] != xprev.Values[j++]) return false; } - while (j < xprevValues.Length) + while (j < xprev.Length) { - if (xprevValues[j++] != 0) + if (xprev.Values[j++] != 0) return false; } } else if (x.IsDense) { - var xprevIndices = xprev.GetIndices(); int i = 0; - for (int jj = 0; jj < xprevValues.Length; jj++) + for (int jj = 0; jj < xprev.Count; jj++) { - int j = xprevIndices[jj]; + int j = xprev.Indices[jj]; while (i < j) { - if (xValues[i++] != 0) + if (x.Values[i++] != 0) return false; } Contracts.Assert(j == i); - if (xValues[i++] != xprevValues[jj]) + if (x.Values[i++] != xprev.Values[jj]) return false; } - while (i < xValues.Length) + while (i < x.Length) { - if (xValues[i++] != 0) + if (x.Values[i++] != 0) return false; } } else { // Both sparse. - var xIndices = x.GetIndices(); - var xprevIndices = xprev.GetIndices(); int ii = 0; int jj = 0; - while (ii < xValues.Length && jj < xprevValues.Length) + while (ii < x.Count && jj < xprev.Count) { - int i = xIndices[ii]; - int j = xprevIndices[jj]; + int i = x.Indices[ii]; + int j = xprev.Indices[jj]; if (i == j) { - if (xValues[ii++] != xprevValues[jj++]) + if (x.Values[ii++] != xprev.Values[jj++]) return false; } else if (i < j) { - if (xValues[ii++] != 0) + if (x.Values[ii++] != 0) return false; } else { - if (xprevValues[jj++] != 0) + if (xprev.Values[jj++] != 0) return false; } } - while (ii < xValues.Length) + while (ii < x.Count) { - if (xValues[ii++] != 0) + if (x.Values[ii++] != 0) return false; } - while (jj < xprevValues.Length) + while (jj < xprev.Count) { - if (xprevValues[jj++] != 0) + if (xprev.Values[jj++] != 0) return false; } } diff --git a/src/Microsoft.ML.StandardLearners/Standard/LinearPredictor.cs b/src/Microsoft.ML.StandardLearners/Standard/LinearPredictor.cs index 5f3c0c72cc..6a0cfaff99 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/LinearPredictor.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/LinearPredictor.cs @@ -63,10 +63,8 @@ private sealed class WeightsCollection : IReadOnlyList public int Count => _pred.Weight.Length; - public Float this[int index] - { - get - { + public Float this[int index] { + get { Contracts.CheckParam(0 <= index && index < Count, nameof(index), "Out of range"); Float value = 0; _pred.Weight.GetItemOrDefault(index, ref value); @@ -101,9 +99,9 @@ IEnumerator IEnumerable.GetEnumerator() public ColumnType OutputType => NumberType.Float; - bool ICanSavePfa.CanSavePfa => true; + public bool CanSavePfa => true; - bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => true; + public bool CanSaveOnnx(OnnxContext ctx) => true; /// /// Constructs a new linear predictor. @@ -205,7 +203,7 @@ protected override void SaveCore(ModelSaveContext ctx) ctx.Writer.WriteSingleArray(Weight.GetValues()); } - JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) + public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckValue(input, nameof(input)); @@ -232,7 +230,7 @@ JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) return PfaUtils.Call("model.reg.linear", input, cellRef); } - bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputs, string featureColumn) + public bool SaveAsOnnx(OnnxContext ctx, string[] outputs, string featureColumn) { Host.CheckValue(ctx, nameof(ctx)); Host.Check(Utils.Size(outputs) == 1); @@ -441,7 +439,17 @@ private LinearBinaryPredictor(IHostEnvironment env, ModelLoadContext ctx) // (Base class) // LinearModelStatistics: model statistics (optional, in a separate stream) - ctx.LoadModelOrNull(Host, out _stats, ModelStatsSubModelFilename); + string statsDir = Path.Combine(ctx.Directory ?? "", ModelStatsSubModelFilename); + using (var statsEntry = ctx.Repository.OpenEntryOrNull(statsDir, ModelLoadContext.ModelStreamName)) + { + if (statsEntry == null) + _stats = null; + else + { + using (var statsCtx = new ModelLoadContext(ctx.Repository, statsEntry, statsDir)) + _stats = LinearModelStatistics.Create(Host, statsCtx); + } + } } public static IPredictorProducing Create(IHostEnvironment env, ModelLoadContext ctx) @@ -466,11 +474,18 @@ protected override void SaveCore(ModelSaveContext ctx) // LinearModelStatistics: model statistics (optional, in a separate stream) base.SaveCore(ctx); - ctx.SetVersionInfo(GetVersionInfo()); - Contracts.AssertValueOrNull(_stats); if (_stats != null) - ctx.SaveModel(_stats, ModelStatsSubModelFilename); + { + using (var statsCtx = new ModelSaveContext(ctx.Repository, + Path.Combine(ctx.Directory ?? "", ModelStatsSubModelFilename), ModelLoadContext.ModelStreamName)) + { + _stats.Save(statsCtx); + statsCtx.Done(); + } + } + + ctx.SetVersionInfo(GetVersionInfo()); } public override PredictionKind PredictionKind => PredictionKind.BinaryClassification; @@ -547,8 +562,7 @@ protected RegressionPredictor(IHostEnvironment env, string name, ModelLoadContex { } - public override PredictionKind PredictionKind - { + public override PredictionKind PredictionKind { get { return PredictionKind.Regression; } } diff --git a/src/Microsoft.ML.StandardLearners/Standard/LinearPredictorUtils.cs b/src/Microsoft.ML.StandardLearners/Standard/LinearPredictorUtils.cs index 69740fa7fe..244019bcdd 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/LinearPredictorUtils.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/LinearPredictorUtils.cs @@ -51,7 +51,7 @@ public static void SaveAsCode(TextWriter writer, in VBuffer weights, Floa writer.Write(FloatUtils.ToRoundTripString(value)); writer.Write("*"); - if (featureNames.GetValues().Length > 0) + if (featureNames.Count > 0) writer.Write(FeatureNameAsCode(featureNames.GetItemOrDefault(idx).ToString(), idx)); else writer.Write("f_" + idx); @@ -118,7 +118,7 @@ public static string LinearModelAsIni(in VBuffer weights, Float bias, IPr var name = featureNames.GetItemOrDefault(idx); inputBuilder.AppendLine("[Input:" + numNonZeroWeights + "]"); - inputBuilder.AppendLine("Name=" + (featureNames.GetValues().Length == 0 ? "Feature_" + idx : name.IsEmpty ? $"f{idx}" : name.ToString())); + inputBuilder.AppendLine("Name=" + (featureNames.Count == 0 ? "Feature_" + idx : name.IsEmpty ? $"f{idx}" : name.ToString())); inputBuilder.AppendLine("Transform=linear"); inputBuilder.AppendLine("Slope=1"); inputBuilder.AppendLine("Intercept=0"); diff --git a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsCatalog.cs b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsCatalog.cs new file mode 100644 index 0000000000..5580e66e77 --- /dev/null +++ b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsCatalog.cs @@ -0,0 +1,123 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Internal.Calibration; +using Microsoft.ML.Runtime.Learners; +using Microsoft.ML.Trainers; +using System; + +namespace Microsoft.ML +{ + using Arguments = LogisticRegression.Arguments; + + /// + /// Binary Classification trainer estimators. + /// + public static class LbfgsBinaryClassificationExtensions + { + /// + /// Predict a target using a linear binary classification model trained with the trainer. + /// + /// The binary classificaiton context trainer object. + /// The label, or dependent variable. + /// The features, or independent variables. + /// The optional example weights. + /// Enforce non-negative weights. + /// Weight of L1 regularization term. + /// Weight of L2 regularization term. + /// Memory size for . Lower=faster, less accurate. + /// Threshold for optimizer convergence. + /// A delegate to apply all the advanced arguments to the algorithm. + public static LogisticRegression LogisticRegression(this BinaryClassificationContext.BinaryClassificationTrainers ctx, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, + string weights = null, + float l1Weight = Arguments.Defaults.L1Weight, + float l2Weight = Arguments.Defaults.L2Weight, + float optimizationTolerance = Arguments.Defaults.OptTol, + int memorySize = Arguments.Defaults.MemorySize, + bool enforceNoNegativity = Arguments.Defaults.EnforceNonNegativity, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new LogisticRegression(env, features, label, weights, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity, advancedSettings); + } + } + + /// + /// Regression trainer estimators. + /// + public static class LbfgsRegressionExtensions + { + + /// + /// Predict a target using a linear regression model trained with the trainer. + /// + /// The regression context trainer object. + /// The label, or dependent variable. + /// The features, or independent variables. + /// The optional example weights. + /// Enforce non-negative weights. + /// Weight of L1 regularization term. + /// Weight of L2 regularization term. + /// Memory size for . Lower=faster, less accurate. + /// Threshold for optimizer convergence. + /// A delegate to apply all the advanced arguments to the algorithm. + public static PoissonRegression PoissonRegression(this RegressionContext.RegressionTrainers ctx, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, + string weights = null, + float l1Weight = Arguments.Defaults.L1Weight, + float l2Weight = Arguments.Defaults.L2Weight, + float optimizationTolerance = Arguments.Defaults.OptTol, + int memorySize = Arguments.Defaults.MemorySize, + bool enforceNoNegativity = Arguments.Defaults.EnforceNonNegativity, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new PoissonRegression(env, features, label, weights, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity, advancedSettings); + } + } + + /// + /// Multiclass Classification trainer estimators. + /// + public static class LbfgsMulticlassExtensions + { + + /// + /// Predict a target using a linear multiclass classification model trained with the trainer. + /// + /// The multiclass classification context trainer object. + /// The label, or dependent variable. + /// The features, or independent variables. + /// The optional example weights. + /// Enforce non-negative weights. + /// Weight of L1 regularization term. + /// Weight of L2 regularization term. + /// Memory size for . Lower=faster, less accurate. + /// Threshold for optimizer convergence. + /// A delegate to apply all the advanced arguments to the algorithm. + public static MulticlassLogisticRegression LogisticRegression(this MulticlassClassificationContext.MulticlassClassificationTrainers ctx, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, + string weights = null, + float l1Weight = Arguments.Defaults.L1Weight, + float l2Weight = Arguments.Defaults.L2Weight, + float optimizationTolerance = Arguments.Defaults.OptTol, + int memorySize = Arguments.Defaults.MemorySize, + bool enforceNoNegativity = Arguments.Defaults.EnforceNonNegativity, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new MulticlassLogisticRegression(env, features, label, weights, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity, advancedSettings); + } + + } +} diff --git a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsPredictorBase.cs b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsPredictorBase.cs index 0d12aee904..f17e617e29 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsPredictorBase.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsPredictorBase.cs @@ -329,7 +329,7 @@ protected virtual VBuffer InitializeWeightsSgd(IChannel ch, FloatLabelCur (in VBuffer x, ref VBuffer grad) => { // Zero out the gradient by sparsifying. - VBufferUtils.Resize(ref grad, grad.Length, 0); + grad = new VBuffer(grad.Length, 0, grad.Values, grad.Indices); EnsureBiases(ref grad); if (cursor == null || !cursor.MoveNext()) @@ -378,7 +378,7 @@ protected virtual void PreTrainingProcessInstance(float label, in VBuffer /// /// The basic training calls the optimizer /// - private protected override TModel TrainModelCore(TrainContext context) + protected override TModel TrainModelCore(TrainContext context) { Contracts.CheckValue(context, nameof(context)); Host.CheckParam(context.InitialPredictor == null || context.InitialPredictor is TModel, nameof(context.InitialPredictor)); @@ -447,7 +447,7 @@ protected virtual void TrainCore(IChannel ch, RoleMappedData data) { // REVIEW: maybe it makes sense for the factory to capture the good row count after // the first successful cursoring? - Double totalCount = data.Data.GetRowCount() ?? Double.NaN; + Double totalCount = data.Data.GetRowCount(true) ?? Double.NaN; long exCount = 0; pch.SetHeader(new ProgressHeader(null, new[] { "examples" }), @@ -595,15 +595,11 @@ protected virtual float DifferentiableFunction(in VBuffer x, ref VBuffer< Contracts.AssertValueOrNull(progress); float scaleFactor = 1 / (float)WeightSum; - VBuffer xDense = default; + VBuffer xDense = default(VBuffer); if (x.IsDense) xDense = x; else - { - VBuffer xDenseTemp = default; - x.CopyToDense(ref xDenseTemp); - xDense = xDenseTemp; - } + x.CopyToDense(ref xDense); IProgressChannel pch = progress != null ? progress.StartProgressChannel("Gradient") : null; float loss; @@ -617,7 +613,7 @@ protected virtual float DifferentiableFunction(in VBuffer x, ref VBuffer< if (L2Weight > 0) { Contracts.Assert(xDense.IsDense); - var values = xDense.GetValues(); + var values = xDense.Values; Double r = 0; for (int i = BiasCount; i < values.Length; i++) { diff --git a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsStatic.cs b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsStatic.cs index 08bef182cc..75056d6f20 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsStatic.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LbfgsStatic.cs @@ -55,7 +55,7 @@ public static (Scalar score, Scalar probability, Scalar pred var rec = new TrainerEstimatorReconciler.BinaryClassifier( (env, labelName, featuresName, weightsName) => { - var trainer = new LogisticRegression(env, labelName, featuresName, weightsName, + var trainer = new LogisticRegression(env, featuresName, labelName, weightsName, l1Weight, l2Weight, optimizationTolerance, memorySize, enoforceNoNegativity, advancedSettings); if (onFit != null) @@ -110,7 +110,7 @@ public static Scalar PoissonRegression(this RegressionContext.RegressionT var rec = new TrainerEstimatorReconciler.Regression( (env, labelName, featuresName, weightsName) => { - var trainer = new PoissonRegression(env, labelName, featuresName, weightsName, + var trainer = new PoissonRegression(env, featuresName, labelName, weightsName, l1Weight, l2Weight, optimizationTolerance, memorySize, enoforceNoNegativity); if (onFit != null) @@ -166,7 +166,7 @@ public static (Vector score, Key predictedLabel) var rec = new TrainerEstimatorReconciler.MulticlassClassifier( (env, labelName, featuresName, weightsName) => { - var trainer = new MulticlassLogisticRegression(env, labelName, featuresName, weightsName, + var trainer = new MulticlassLogisticRegression(env, featuresName, labelName, weightsName, l1Weight, l2Weight, optimizationTolerance, memorySize, enoforceNoNegativity); if (onFit != null) diff --git a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LogisticRegression.cs b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LogisticRegression.cs index 4507b1e5d3..2db21d6320 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LogisticRegression.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/LogisticRegression.cs @@ -4,7 +4,6 @@ using System; using System.Collections.Generic; -using MathNet.Numerics.LinearAlgebra; using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; @@ -41,27 +40,11 @@ public sealed partial class LogisticRegression : LbfgsTrainerBase - /// If set to truetraining statistics will be generated at the end of training. - /// If you have a large number of learned training parameters(more than 500), - /// generating the training statistics might take a few seconds. - /// More than 1000 weights might take a few minutes. For those cases consider using the instance of - /// present in the Microsoft.ML.HalLearners package. That computes the statistics using hardware acceleration. - /// [Argument(ArgumentType.AtMostOnce, HelpText = "Show statistics of training examples.", ShortName = "stat", SortOrder = 50)] public bool ShowTrainingStats = false; - - /// - /// The instance of that computes the training statistics at the end of training. - /// If you have a large number of learned training parameters(more than 500), - /// generating the training statistics might take a few seconds. - /// More than 1000 weights might take a few minutes. For those cases consider using the instance of - /// present in the Microsoft.ML.HalLearners package. That computes the statistics using hardware acceleration. - /// - public ComputeLRTrainingStd StdComputer; } - private double _posWeight; + private Double _posWeight; private LinearModelStatistics _stats; /// @@ -70,7 +53,7 @@ public sealed class Arguments : ArgumentsBase /// The environment to use. /// The name of the label column. /// The name of the feature column. - /// The name for the example weight column. + /// The name for the example weight column. /// Enforce non-negative weights. /// Weight of L1 regularizer term. /// Weight of L2 regularizer term. @@ -78,16 +61,16 @@ public sealed class Arguments : ArgumentsBase /// Threshold for optimizer convergence. /// A delegate to apply all the advanced arguments to the algorithm. public LogisticRegression(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, + string featureColumn, + string labelColumn, + string weightColumn = null, float l1Weight = Arguments.Defaults.L1Weight, float l2Weight = Arguments.Defaults.L2Weight, float optimizationTolerance = Arguments.Defaults.OptTol, int memorySize = Arguments.Defaults.MemorySize, bool enforceNoNegativity = Arguments.Defaults.EnforceNonNegativity, Action advancedSettings = null) - : base(env, featureColumn, TrainerUtils.MakeBoolScalarLabel(labelColumn), weights, advancedSettings, + : base(env, featureColumn, TrainerUtils.MakeBoolScalarLabel(labelColumn), weightColumn, advancedSettings, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity) { Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); @@ -95,9 +78,6 @@ public LogisticRegression(IHostEnvironment env, _posWeight = 0; ShowTrainingStats = Args.ShowTrainingStats; - - if (ShowTrainingStats && Args.StdComputer == null) - Args.StdComputer = new ComputeLRTrainingStdImpl(); } /// @@ -108,9 +88,6 @@ internal LogisticRegression(IHostEnvironment env, Arguments args) { _posWeight = 0; ShowTrainingStats = Args.ShowTrainingStats; - - if (ShowTrainingStats && Args.StdComputer == null) - Args.StdComputer = new ComputeLRTrainingStdImpl(); } public override PredictionKind PredictionKind => PredictionKind.BinaryClassification; @@ -157,9 +134,8 @@ protected override float AccumulateOneGradient(in VBuffer feat, float lab VectorUtils.AddMultWithOffset(in feat, mult, ref grad, 1); // Note that 0th L-BFGS weight is for bias. // Add bias using this strange trick that has advantage of working well for dense and sparse arrays. // Due to the call to EnsureBiases, we know this region is dense. - var editor = VBufferEditor.CreateFromBuffer(ref grad); - Contracts.Assert(editor.Values.Length >= BiasCount && (grad.IsDense || editor.Indices[BiasCount - 1] == BiasCount - 1)); - editor.Values[0] += mult; + Contracts.Assert(grad.Count >= BiasCount && (grad.IsDense || grad.Indices[BiasCount - 1] == BiasCount - 1)); + grad.Values[0] += mult; return weight * datumLoss; } @@ -179,13 +155,12 @@ protected override void ComputeTrainingStatistics(IChannel ch, FloatLabelCursor. // Compute deviance: start with loss function. float deviance = (float)(2 * loss * WeightSum); - var currentWeightsValues = CurrentWeights.GetValues(); if (L2Weight > 0) { // Need to subtract L2 regularization loss. // The bias term is not regularized. - var regLoss = VectorUtils.NormSquared(currentWeightsValues.Slice(1)) * L2Weight; + var regLoss = VectorUtils.NormSquared(CurrentWeights.Values, 1, CurrentWeights.Length - 1) * L2Weight; deviance -= regLoss; } @@ -237,9 +212,9 @@ protected override void ComputeTrainingStatistics(IChannel ch, FloatLabelCursor. weightIndices[0] = 0; weightIndicesInvMap[0] = 0; int j = 1; - for (int i = 1; i < currentWeightsValues.Length; i++) + for (int i = 1; i < CurrentWeights.Length; i++) { - if (currentWeightsValues[i] != 0) + if (CurrentWeights.Values[i] != 0) { weightIndices[j] = i; weightIndicesInvMap[i] = j++; @@ -286,7 +261,7 @@ protected override void ComputeTrainingStatistics(IChannel ch, FloatLabelCursor. } // Initialize the remaining entries. - var bias = currentWeightsValues[0]; + var bias = CurrentWeights.Values[0]; using (var cursor = cursorFactory.Create()) { while (cursor.MoveNext()) @@ -300,7 +275,7 @@ protected override void ComputeTrainingStatistics(IChannel ch, FloatLabelCursor. // Increment the first entry of hessian. hessian[0] += variance; - var values = cursor.Features.GetValues(); + var values = cursor.Features.Values; if (cursor.Features.IsDense) { int ioff = 1; @@ -326,8 +301,8 @@ protected override void ComputeTrainingStatistics(IChannel ch, FloatLabelCursor. } else { - var indices = cursor.Features.GetIndices(); - for (int ii = 0; ii < values.Length; ++ii) + var indices = cursor.Features.Indices; + for (int ii = 0; ii < cursor.Features.Count; ++ii) { int i = indices[ii]; int wi = i + 1; @@ -355,13 +330,7 @@ protected override void ComputeTrainingStatistics(IChannel ch, FloatLabelCursor. } } - if (Args.StdComputer == null) - _stats = new LinearModelStatistics(Host, NumGoodRows, numParams, deviance, nullDeviance); - else - { - var std = Args.StdComputer.ComputeStd(hessian, weightIndices, numParams, CurrentWeights.Length, ch, L2Weight); - _stats = new LinearModelStatistics(Host, NumGoodRows, numParams, deviance, nullDeviance, std); - } + _stats = new LinearModelStatistics(Host, NumGoodRows, numParams, deviance, nullDeviance); } protected override void ProcessPriorDistribution(float label, float weight) @@ -428,125 +397,4 @@ public static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnvironm () => LearnerEntryPointsUtils.FindColumn(host, input.TrainingData.Schema, input.WeightColumn)); } } - - /// - /// Computes the standard deviation matrix of each of the non-zero training weights, needed to calculate further the standard deviation, - /// p-value and z-Score. - /// If you need fast calculations, use the implementation in the Microsoft.ML.HALLearners package, - /// which makes use of hardware acceleration. - /// Due to the existence of regularization, an approximation is used to compute the variances of the trained linear coefficients. - /// - public abstract class ComputeLRTrainingStd - { - /// - /// Computes the standard deviation matrix of each of the non-zero training weights, needed to calculate further the standard deviation, - /// p-value and z-Score. - /// If you need fast calculations, use the ComputeStd method from the Microsoft.ML.HALLearners package, which makes use of hardware acceleration. - /// Due to the existence of regularization, an approximation is used to compute the variances of the trained linear coefficients. - /// - public abstract VBuffer ComputeStd(double[] hessian, int[] weightIndices, int parametersCount, int currentWeightsCount, IChannel ch, float l2Weight); - - /// - /// Adjust the variance for regularized cases. - /// - [BestFriend] - internal void AdjustVariance(float inverseEntry, int iRow, int iCol, float l2Weight, float[] stdErrorValues2) - { - var adjustment = l2Weight * inverseEntry * inverseEntry; - stdErrorValues2[iRow] -= adjustment; - - if (0 < iCol && iCol < iRow) - stdErrorValues2[iCol] -= adjustment; - } - } - - /// - /// Extends the implementing making use of Math.Net numeric - /// If you need faster calculations(have non-sparse weight vectors of more than 300 features), use the instance of ComputeLRTrainingStd from the Microsoft.ML.HALLearners package, which makes use of hardware acceleration - /// for those computations. - /// - public sealed class ComputeLRTrainingStdImpl : ComputeLRTrainingStd - { - /// - /// Computes the standard deviation matrix of each of the non-zero training weights, needed to calculate further the standard deviation, - /// p-value and z-Score. - /// If you need faster calculations, use the ComputeStd method from the Microsoft.ML.HALLearners package, which makes use of hardware acceleration. - /// Due to the existence of regularization, an approximation is used to compute the variances of the trained linear coefficients. - /// - /// - /// - /// - /// - /// The used for messaging. - /// The L2Weight used for training. (Supply the same one that got used during training.) - public override VBuffer ComputeStd(double[] hessian, int[] weightIndices, int numSelectedParams, int currentWeightsCount, IChannel ch, float l2Weight) - { - Contracts.AssertValue(ch); - Contracts.AssertValue(hessian, nameof(hessian)); - Contracts.Assert(numSelectedParams > 0); - Contracts.Assert(currentWeightsCount > 0); - Contracts.Assert(l2Weight > 0); - - double[,] matrixHessian = new double[numSelectedParams, numSelectedParams]; - - int hessianLength = 0; - int dimension = numSelectedParams - 1; - - for (int row = dimension; row >= 0; row--) - { - for (int col = 0; col <= dimension; col++) - { - if ((row + col) <= dimension) - { - if ((row + col) == dimension) - { - matrixHessian[row, col] = hessian[hessianLength]; - } - else - { - matrixHessian[row, col] = hessian[hessianLength]; - matrixHessian[dimension - col, dimension - row] = hessian[hessianLength]; - } - hessianLength++; - } - else - continue; - } - } - - var h = Matrix.Build.DenseOfArray(matrixHessian); - var invers = h.Inverse(); - - float[] stdErrorValues = new float[numSelectedParams]; - stdErrorValues[0] = (float)Math.Sqrt(invers[0, numSelectedParams - 1]); - - for (int i = 1; i < numSelectedParams; i++) - { - // Initialize with inverse Hessian. - // The diagonal of the inverse Hessian. - stdErrorValues[i] = (float)invers[i, numSelectedParams - i - 1]; - } - - if (l2Weight > 0) - { - // Iterate through all entries of inverse Hessian to make adjustment to variance. - // A discussion on ridge regularized LR coefficient covariance matrix can be found here: - // http://www.aloki.hu/pdf/0402_171179.pdf (Equations 11 and 25) - // http://www.inf.unibz.it/dis/teaching/DWDM/project2010/LogisticRegression.pdf (Section "Significance testing in ridge logistic regression") - for (int iRow = 1; iRow < numSelectedParams; iRow++) - { - for (int iCol = 0; iCol <= iRow; iCol++) - { - float entry = (float)invers[iRow, numSelectedParams - iCol - 1]; - AdjustVariance(entry, iRow, iCol, l2Weight, stdErrorValues); - } - } - } - - for (int i = 1; i < numSelectedParams; i++) - stdErrorValues[i] = (float)Math.Sqrt(stdErrorValues[i]); - - return new VBuffer(currentWeightsCount, numSelectedParams, stdErrorValues, weightIndices); - } - } } diff --git a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/MulticlassLogisticRegression.cs b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/MulticlassLogisticRegression.cs index 0ba1a7ca8a..4a6a9e4413 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/MulticlassLogisticRegression.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/LogisticRegression/MulticlassLogisticRegression.cs @@ -76,24 +76,22 @@ public sealed class Arguments : ArgumentsBase /// The environment to use. /// The name of the label column. /// The name of the feature column. - /// The name for the example weight column. + /// The name for the example weight column. /// Enforce non-negative weights. /// Weight of L1 regularizer term. /// Weight of L2 regularizer term. /// Memory size for . Lower=faster, less accurate. /// Threshold for optimizer convergence. /// A delegate to apply all the advanced arguments to the algorithm. - public MulticlassLogisticRegression(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, + public MulticlassLogisticRegression(IHostEnvironment env, string featureColumn, string labelColumn, + string weightColumn = null, float l1Weight = Arguments.Defaults.L1Weight, float l2Weight = Arguments.Defaults.L2Weight, float optimizationTolerance = Arguments.Defaults.OptTol, int memorySize = Arguments.Defaults.MemorySize, bool enforceNoNegativity = Arguments.Defaults.EnforceNonNegativity, Action advancedSettings = null) - : base(env, featureColumn, TrainerUtils.MakeU4ScalarColumn(labelColumn), weights, advancedSettings, + : base(env, featureColumn, TrainerUtils.MakeU4ScalarColumn(labelColumn), weightColumn, advancedSettings, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity) { Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); @@ -150,7 +148,7 @@ protected override void CheckLabel(RoleMappedData data) } _labelNames = new string[_numClasses]; - ReadOnlySpan> values = labelNames.GetValues(); + ReadOnlyMemory[] values = labelNames.Values; // This hashset is used to verify the uniqueness of label names. HashSet labelNamesSet = new HashSet(); @@ -204,7 +202,7 @@ protected override float AccumulateOneGradient(in VBuffer feat, float lab scores[c] = bias + VectorUtils.DotProductWithOffset(in x, start, in feat); } - float logZ = MathUtils.SoftMax(scores.AsSpan(0, _numClasses)); + float logZ = MathUtils.SoftMax(scores, _numClasses); float datumLoss = logZ; int lab = (int)label; @@ -218,9 +216,8 @@ protected override float AccumulateOneGradient(in VBuffer feat, float lab float mult = weight * (modelProb - probLabel); VectorUtils.AddMultWithOffset(in feat, mult, ref grad, start); // Due to the call to EnsureBiases, we know this region is dense. - var editor = VBufferEditor.CreateFromBuffer(ref grad); - Contracts.Assert(editor.Values.Length >= BiasCount && (grad.IsDense || editor.Indices[BiasCount - 1] == BiasCount - 1)); - editor.Values[c] += mult; + Contracts.Assert(grad.Count >= BiasCount && (grad.IsDense || grad.Indices[BiasCount - 1] == BiasCount - 1)); + grad.Values[c] += mult; } Contracts.Check(FloatUtils.IsFinite(datumLoss), "Data contain bad values."); @@ -273,7 +270,7 @@ protected override void ComputeTrainingStatistics(IChannel ch, FloatLabelCursor. { // Need to subtract L2 regularization loss. // The bias term is not regularized. - var regLoss = VectorUtils.NormSquared(CurrentWeights.GetValues().Slice(BiasCount)) * L2Weight; + var regLoss = VectorUtils.NormSquared(CurrentWeights.Values, BiasCount, CurrentWeights.Length - BiasCount) * L2Weight; deviance -= regLoss; } @@ -395,8 +392,8 @@ private static VersionInfo GetVersionInfo() public override PredictionKind PredictionKind => PredictionKind.MultiClassClassification; public ColumnType InputType { get; } public ColumnType OutputType { get; } - bool ICanSavePfa.CanSavePfa => true; - bool ICanSaveOnnx.CanSaveOnnx(OnnxContext ctx) => true; + public bool CanSavePfa => true; + public bool CanSaveOnnx(OnnxContext ctx) => true; internal MulticlassLogisticRegressionPredictor(IHostEnvironment env, in VBuffer weights, int numClasses, int numFeatures, string[] labelNames, LinearModelStatistics stats = null) : base(env, RegistrationName) @@ -555,7 +552,17 @@ private MulticlassLogisticRegressionPredictor(IHostEnvironment env, ModelLoadCon if (ctx.TryLoadBinaryStream(LabelNamesSubModelFilename, r => labelNames = LoadLabelNames(ctx, r))) _labelNames = labelNames; - ctx.LoadModelOrNull< LinearModelStatistics, SignatureLoadModel>(Host, out _stats, ModelStatsSubModelFilename); + string statsDir = Path.Combine(ctx.Directory ?? "", ModelStatsSubModelFilename); + using (var statsEntry = ctx.Repository.OpenEntryOrNull(statsDir, ModelLoadContext.ModelStreamName)) + { + if (statsEntry == null) + _stats = null; + else + { + using (var statsCtx = new ModelLoadContext(ctx.Repository, statsEntry, statsDir)) + _stats = LinearModelStatistics.Create(Host, statsCtx); + } + } } public static MulticlassLogisticRegressionPredictor Create(IHostEnvironment env, ModelLoadContext ctx) @@ -637,12 +644,11 @@ protected override void SaveCore(ModelSaveContext ctx) int count = 0; foreach (var fw in _weights) { - var fwValues = fw.GetValues(); if (fw.IsDense) { - for (int i = 0; i < fwValues.Length; i++) + for (int i = 0; i < fw.Length; i++) { - if (fwValues[i] != 0) + if (fw.Values[i] != 0) { ctx.Writer.Write(i); count++; @@ -665,22 +671,21 @@ protected override void SaveCore(ModelSaveContext ctx) int count = 0; foreach (var fw in _weights) { - var fwValues = fw.GetValues(); if (fw.IsDense) { - for (int i = 0; i < fwValues.Length; i++) + for (int i = 0; i < fw.Length; i++) { - if (fwValues[i] != 0) + if (fw.Values[i] != 0) { - ctx.Writer.Write(fwValues[i]); + ctx.Writer.Write(fw.Values[i]); count++; } } } else { - ctx.Writer.WriteSinglesNoCount(fwValues); - count += fwValues.Length; + ctx.Writer.WriteSinglesNoCount(fw.GetValues()); + count += fw.Count; } } Host.Assert(count == numIndices); @@ -693,18 +698,35 @@ protected override void SaveCore(ModelSaveContext ctx) Contracts.AssertValueOrNull(_stats); if (_stats != null) - ctx.SaveModel(_stats, ModelStatsSubModelFilename); + { + using (var statsCtx = new ModelSaveContext(ctx.Repository, + Path.Combine(ctx.Directory ?? "", ModelStatsSubModelFilename), ModelLoadContext.ModelStreamName)) + { + _stats.Save(statsCtx); + statsCtx.Done(); + } + } } // REVIEW: Destroy. private static int NonZeroCount(in VBuffer vector) { int count = 0; - var values = vector.GetValues(); - for (int i = 0; i < values.Length; i++) + if (!vector.IsDense) { - if (values[i] != 0) - count++; + for (int i = 0; i < vector.Count; i++) + { + if (vector.Values[i] != 0) + count++; + } + } + else + { + for (int i = 0; i < vector.Length; i++) + { + if (vector.Values[i] != 0) + count++; + } } return count; } @@ -719,24 +741,27 @@ public ValueMapper GetMapper() { Host.Check(src.Length == _numFeatures); - PredictCore(in src, ref dst); + var values = dst.Values; + PredictCore(in src, ref values); + dst = new VBuffer(_numClasses, values, dst.Indices); }; return (ValueMapper)(Delegate)del; } - private void PredictCore(in VBuffer src, ref VBuffer dst) + private void PredictCore(in VBuffer src, ref float[] dst) { Host.Check(src.Length == _numFeatures, "src length should equal the number of features"); var weights = _weights; if (!src.IsDense) weights = DensifyWeights(); - var editor = VBufferEditor.Create(ref dst, _numClasses); + if (Utils.Size(dst) < _numClasses) + dst = new float[_numClasses]; + for (int i = 0; i < _biases.Length; i++) - editor.Values[i] = _biases[i] + VectorUtils.DotProduct(in weights[i], in src); + dst[i] = _biases[i] + VectorUtils.DotProduct(in weights[i], in src); - Calibrate(editor.Values); - dst = editor.Commit(); + Calibrate(dst); } private VBuffer[] DensifyWeights() @@ -766,13 +791,13 @@ private VBuffer[] DensifyWeights() return _weightsDense; } - private void Calibrate(Span dst) + private void Calibrate(float[] dst) { - Host.Assert(dst.Length >= _numClasses); + Host.Assert(Utils.Size(dst) >= _numClasses); // scores are in log-space; convert and fix underflow/overflow // TODO: re-normalize probabilities to account for underflow/overflow? - float softmax = MathUtils.SoftMax(dst.Slice(0, _numClasses)); + float softmax = MathUtils.SoftMax(dst, _numClasses); for (int i = 0; i < _numClasses; ++i) dst[i] = MathUtils.ExpSlow(dst[i] - softmax); } @@ -849,7 +874,7 @@ public void SaveAsCode(TextWriter writer, RoleMappedSchema schema) "score[" + i.ToString() + "]"); } - writer.WriteLine(string.Format("var softmax = MathUtils.SoftMax(scores.AsSpan(0, {0}));", _numClasses)); + writer.WriteLine(string.Format("var softmax = MathUtils.SoftMax(scores, {0});", _numClasses)); for (int c = 0; c < _biases.Length; c++) writer.WriteLine("output[{0}] = Math.Exp(scores[{0}] - softmax);", c); } @@ -859,7 +884,7 @@ public void SaveSummary(TextWriter writer, RoleMappedSchema schema) SaveAsText(writer, schema); } - JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) + public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckValue(input, nameof(input)); @@ -886,7 +911,7 @@ JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) return PfaUtils.Call("m.link.softmax", PfaUtils.Call("model.reg.linear", input, cellRef)); } - bool ISingleCanSaveOnnx.SaveAsOnnx(OnnxContext ctx, string[] outputs, string featureColumn) + public bool SaveAsOnnx(OnnxContext ctx, string[] outputs, string featureColumn) { Host.CheckValue(ctx, nameof(ctx)); diff --git a/src/Microsoft.ML.StandardLearners/Standard/ModelStatistics.cs b/src/Microsoft.ML.StandardLearners/Standard/ModelStatistics.cs index e71cb85257..bd69453d5a 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/ModelStatistics.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/ModelStatistics.cs @@ -2,16 +2,17 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using System.Linq; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Internal.CpuMath; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Learners; using Microsoft.ML.Runtime.Model; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; // This is for deserialization from a model repository. [assembly: LoadableClass(typeof(LinearModelStatistics), null, typeof(SignatureLoadModel), @@ -83,13 +84,13 @@ private static VersionInfo GetVersionInfo() // of the variance-covariance matrix. private readonly VBuffer? _coeffStdError; - public long TrainingExampleCount => _trainingExampleCount; + public long TrainingExampleCount { get { return _trainingExampleCount; } } - public Single Deviance => _deviance; + public Single Deviance { get { return _deviance; } } - public Single NullDeviance => _nullDeviance; + public Single NullDeviance { get { return _nullDeviance; } } - public int ParametersCount => _paramCount; + public int ParametersCount { get { return _paramCount; } } internal LinearModelStatistics(IHostEnvironment env, long trainingExampleCount, int paramCount, Single deviance, Single nullDeviance) { @@ -106,11 +107,11 @@ internal LinearModelStatistics(IHostEnvironment env, long trainingExampleCount, internal LinearModelStatistics(IHostEnvironment env, long trainingExampleCount, int paramCount, Single deviance, Single nullDeviance, in VBuffer coeffStdError) : this(env, trainingExampleCount, paramCount, deviance, nullDeviance) { - _env.Assert(coeffStdError.GetValues().Length == _paramCount); + _env.Assert(coeffStdError.Count == _paramCount); _coeffStdError = coeffStdError; } - internal LinearModelStatistics(IHostEnvironment env, ModelLoadContext ctx) + public LinearModelStatistics(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); _env = env; @@ -156,7 +157,7 @@ internal LinearModelStatistics(IHostEnvironment env, ModelLoadContext ctx) _coeffStdError = new VBuffer(length, _paramCount, stdErrorValues, stdErrorIndices); } - internal static LinearModelStatistics Create(IHostEnvironment env, ModelLoadContext ctx) + public static LinearModelStatistics Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(ctx, nameof(ctx)); @@ -208,9 +209,6 @@ private void SaveCore(ModelSaveContext ctx) ctx.Writer.WriteIntsNoCount(_coeffStdError.Value.GetIndices()); } - /// - /// Computes the standart deviation, Z-Score and p-Value. - /// public static bool TryGetBiasStatistics(LinearModelStatistics stats, Single bias, out Single stdError, out Single zScore, out Single pValue) { if (!stats._coeffStdError.HasValue) @@ -222,10 +220,10 @@ public static bool TryGetBiasStatistics(LinearModelStatistics stats, Single bias } const Double sqrt2 = 1.41421356237; // Math.Sqrt(2); - stdError = stats._coeffStdError.Value.GetValues()[0]; + stdError = stats._coeffStdError.Value.Values[0]; Contracts.Assert(stdError == stats._coeffStdError.Value.GetItemOrDefault(0)); zScore = bias / stdError; - pValue = 1.0f - (Single)ProbabilityFunctions.Erf(Math.Abs(zScore / sqrt2)); + pValue = 1 - (Single)ProbabilityFunctions.Erf(Math.Abs(zScore / sqrt2)); return true; } @@ -240,55 +238,61 @@ private static void GetUnorderedCoefficientStatistics(LinearModelStatistics stat Contracts.Assert(stats._coeffStdError.Value.Length == weights.Length + 1); - var statisticsCount = stats.ParametersCount - 1; - - var estimateEditor = VBufferEditor.Create(ref estimate, statisticsCount); - var stdErrorEditor = VBufferEditor.Create(ref stdErr, statisticsCount); - var zScoreEditor = VBufferEditor.Create(ref zScore, statisticsCount); - var pValueEditor = VBufferEditor.Create(ref pValue, statisticsCount); + var estimateValues = estimate.Values; + if (Utils.Size(estimateValues) < stats.ParametersCount - 1) + estimateValues = new Single[stats.ParametersCount - 1]; + var stdErrorValues = stdErr.Values; + if (Utils.Size(stdErrorValues) < stats.ParametersCount - 1) + stdErrorValues = new Single[stats.ParametersCount - 1]; + var zScoreValues = zScore.Values; + if (Utils.Size(zScoreValues) < stats.ParametersCount - 1) + zScoreValues = new Single[stats.ParametersCount - 1]; + var pValueValues = pValue.Values; + if (Utils.Size(pValueValues) < stats.ParametersCount - 1) + pValueValues = new Single[stats.ParametersCount - 1]; const Double sqrt2 = 1.41421356237; // Math.Sqrt(2); bool denseStdError = stats._coeffStdError.Value.IsDense; - ReadOnlySpan stdErrorIndices = stats._coeffStdError.Value.GetIndices(); - ReadOnlySpan coeffStdErrorValues = stats._coeffStdError.Value.GetValues(); + int[] stdErrorIndices = stats._coeffStdError.Value.Indices; for (int i = 1; i < stats.ParametersCount; i++) { int wi = denseStdError ? i - 1 : stdErrorIndices[i] - 1; Contracts.Assert(0 <= wi && wi < weights.Length); - var weight = estimateEditor.Values[i - 1] = weights.GetItemOrDefault(wi); - var stdError = stdErrorEditor.Values[wi] = coeffStdErrorValues[i]; - zScoreEditor.Values[i - 1] = weight / stdError; - pValueEditor.Values[i - 1] = 1 - (Single)ProbabilityFunctions.Erf(Math.Abs(zScoreEditor.Values[i - 1] / sqrt2)); + var weight = estimateValues[i - 1] = weights.GetItemOrDefault(wi); + var stdError = stdErrorValues[wi] = stats._coeffStdError.Value.Values[i]; + zScoreValues[i - 1] = weight / stdError; + pValueValues[i - 1] = 1 - (Single)ProbabilityFunctions.Erf(Math.Abs(zScoreValues[i - 1] / sqrt2)); } - estimate = estimateEditor.Commit(); - stdErr = stdErrorEditor.Commit(); - zScore = zScoreEditor.Commit(); - pValue = pValueEditor.Commit(); + estimate = new VBuffer(stats.ParametersCount - 1, estimateValues, estimate.Indices); + stdErr = new VBuffer(stats.ParametersCount - 1, stdErrorValues, stdErr.Indices); + zScore = new VBuffer(stats.ParametersCount - 1, zScoreValues, zScore.Indices); + pValue = new VBuffer(stats.ParametersCount - 1, pValueValues, pValue.Indices); var slotNames = names; getSlotNames = (ref VBuffer> dst) => { - var editor = VBufferEditor.Create(ref dst, statisticsCount); - ReadOnlySpan stdErrorIndices2 = stats._coeffStdError.Value.GetIndices(); - for (int i = 1; i <= statisticsCount; i++) + var values = dst.Values; + if (Utils.Size(values) < stats.ParametersCount - 1) + values = new ReadOnlyMemory[stats.ParametersCount - 1]; + for (int i = 1; i < stats.ParametersCount; i++) { - int wi = denseStdError ? i - 1 : stdErrorIndices2[i] - 1; - editor.Values[i - 1] = slotNames.GetItemOrDefault(wi); + int wi = denseStdError ? i - 1 : stdErrorIndices[i] - 1; + values[i - 1] = slotNames.GetItemOrDefault(wi); } - dst = editor.Commit(); + dst = new VBuffer>(stats.ParametersCount - 1, values, dst.Indices); }; } - private List GetUnorderedCoefficientStatistics(LinearBinaryPredictor parent, RoleMappedSchema schema) + private IEnumerable GetUnorderedCoefficientStatistics(LinearBinaryPredictor parent, RoleMappedSchema schema) { Contracts.AssertValue(_env); _env.CheckValue(parent, nameof(parent)); if (!_coeffStdError.HasValue) - return new List(); + yield break; var weights = parent.Weights2 as IReadOnlyList; _env.Assert(_paramCount == 1 || weights != null); @@ -297,12 +301,11 @@ private List GetUnorderedCoefficientStatistics(LinearBina var names = default(VBuffer>); MetadataUtils.GetSlotNames(schema, RoleMappedSchema.ColumnRole.Feature, weights.Count, ref names); - ReadOnlySpan stdErrorValues = _coeffStdError.Value.GetValues(); + Single[] stdErrorValues = _coeffStdError.Value.Values; const Double sqrt2 = 1.41421356237; // Math.Sqrt(2); - List result = new List(_paramCount - 1); bool denseStdError = _coeffStdError.Value.IsDense; - ReadOnlySpan stdErrorIndices = _coeffStdError.Value.GetIndices(); + int[] stdErrorIndices = _coeffStdError.Value.Indices; Single[] zScores = new Single[_paramCount - 1]; for (int i = 1; i < _paramCount; i++) { @@ -315,9 +318,8 @@ private List GetUnorderedCoefficientStatistics(LinearBina var stdError = stdErrorValues[i]; var zScore = zScores[i - 1] = weight / stdError; var pValue = 1 - (Single)ProbabilityFunctions.Erf(Math.Abs(zScore / sqrt2)); - result.Add(new CoefficientStatistics(name, weight, stdError, zScore, pValue)); + yield return new CoefficientStatistics(name, weight, stdError, zScore, pValue); } - return result; } /// diff --git a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MetaMulticlassTrainer.cs b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MetaMulticlassTrainer.cs index def476c661..286fad1063 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MetaMulticlassTrainer.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MetaMulticlassTrainer.cs @@ -45,7 +45,8 @@ public abstract class ArgumentsBase protected readonly ArgumentsBase Args; protected readonly IHost Host; protected readonly ICalibratorTrainer Calibrator; - protected readonly TScalarTrainer Trainer; + + private TScalarTrainer _trainer; public PredictionKind PredictionKind => PredictionKind.MultiClassClassification; @@ -53,6 +54,8 @@ public abstract class ArgumentsBase public TrainerInfo Info { get; } + public TScalarTrainer PredictorType; + /// /// Initializes the from the Arguments class. /// @@ -72,15 +75,17 @@ internal MetaMulticlassTrainer(IHostEnvironment env, ArgumentsBase args, string if (labelColumn != null) LabelColumn = new SchemaShape.Column(labelColumn, SchemaShape.Column.VectorKind.Scalar, NumberType.U4, true); - Trainer = singleEstimator ?? CreateTrainer(); + // Create the first trainer so errors in the args surface early. + _trainer = singleEstimator ?? CreateTrainer(); Calibrator = calibrator ?? new PlattCalibratorTrainer(env); + if (args.Calibrator != null) Calibrator = args.Calibrator.CreateComponent(Host); // Regarding caching, no matter what the internal predictor, we're performing many passes // simply by virtue of this being a meta-trainer, so we will still cache. - Info = new TrainerInfo(normalization: Trainer.Info.NeedNormalization); + Info = new TrainerInfo(normalization: _trainer.Info.NeedNormalization); } private TScalarTrainer CreateTrainer() @@ -114,6 +119,15 @@ protected IDataView MapLabelsCore(ColumnType type, InPredicate equalsTarge dst = equalsTarget(in src) ? 1 : default(float)); } + protected TScalarTrainer GetTrainer() + { + // We may have instantiated the first trainer to use already, from the constructor. + // If so capture it and set the retained trainer to null; otherwise create a new one. + var train = _trainer ?? CreateTrainer(); + _trainer = null; + return train; + } + protected abstract TModel TrainCore(IChannel ch, RoleMappedData data, int count); /// @@ -121,7 +135,7 @@ protected IDataView MapLabelsCore(ColumnType type, InPredicate equalsTarge /// /// The trainig context for this learner. /// The trained model. - TModel ITrainer.Train(TrainContext context) + public TModel Train(TrainContext context) { Host.CheckValue(context, nameof(context)); var data = context.TrainingSet; @@ -202,7 +216,7 @@ private SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSchema) return cols; } - IPredictor ITrainer.Train(TrainContext context) => ((ITrainer)this).Train(context); + IPredictor ITrainer.Train(TrainContext context) => Train(context); /// /// Fits the data to the trainer. diff --git a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MultiClassNaiveBayesTrainer.cs b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MultiClassNaiveBayesTrainer.cs index ce6b0566f0..64ef2baf3d 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MultiClassNaiveBayesTrainer.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/MultiClassNaiveBayesTrainer.cs @@ -50,9 +50,7 @@ public sealed class Arguments : LearnerInputBaseWithLabel /// The environment to use. /// The name of the label column. /// The name of the feature column. - public MultiClassNaiveBayesTrainer(IHostEnvironment env, - string featureColumn = DefaultColumnNames.Features, - string labelColumn = DefaultColumnNames.Label) + public MultiClassNaiveBayesTrainer(IHostEnvironment env, string featureColumn, string labelColumn) : base(Contracts.CheckRef(env, nameof(env)).Register(LoadName), TrainerUtils.MakeR4VecFeature(featureColumn), TrainerUtils.MakeU4ScalarColumn(labelColumn)) { @@ -91,7 +89,7 @@ protected override SchemaShape.Column[] GetOutputColumnsCore(SchemaShape inputSc protected override MulticlassPredictionTransformer MakeTransformer(MultiClassNaiveBayesPredictor model, Schema trainSchema) => new MulticlassPredictionTransformer(Host, model, trainSchema, FeatureColumn.Name, LabelColumn.Name); - private protected override MultiClassNaiveBayesPredictor TrainModelCore(TrainContext context) + protected override MultiClassNaiveBayesPredictor TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var data = context.TrainingSet; @@ -133,22 +131,20 @@ private protected override MultiClassNaiveBayesPredictor TrainModelCore(TrainCon labelHistogram[cursor.Label] += 1; labelCount = labelCount < size ? size : labelCount; - var featureValues = cursor.Features.GetValues(); if (cursor.Features.IsDense) { - for (int i = 0; i < featureValues.Length; i += 1) + for (int i = 0; i < cursor.Features.Count; i += 1) { - if (featureValues[i] > 0) + if (cursor.Features.Values[i] > 0) featureHistogram[cursor.Label][i] += 1; } } else { - var featureIndices = cursor.Features.GetIndices(); - for (int i = 0; i < featureValues.Length; i += 1) + for (int i = 0; i < cursor.Features.Count; i += 1) { - if (featureValues[i] > 0) - featureHistogram[cursor.Label][featureIndices[i]] += 1; + if (cursor.Features.Values[i] > 0) + featureHistogram[cursor.Label][cursor.Features.Indices[i]] += 1; } } @@ -376,12 +372,7 @@ private void ComputeLabelProbabilityFromFeature(double labelOccurrenceCount, int private void Map(in VBuffer src, ref VBuffer dst) { Host.Check(src.Length == _featureCount, "Invalid number of features passed."); - - var srcValues = src.GetValues(); - var srcIndices = src.GetIndices(); - - var editor = VBufferEditor.Create(ref dst, _labelCount); - Span labelScores = editor.Values; + float[] labelScores = (dst.Length >= _labelCount) ? dst.Values : new float[_labelCount]; for (int iLabel = 0; iLabel < _labelCount; iLabel += 1) { double labelOccurrenceCount = _labelHistogram[iLabel]; @@ -391,18 +382,18 @@ private void Map(in VBuffer src, ref VBuffer dst) { if (src.IsDense) { - for (int iFeature = 0; iFeature < srcValues.Length; iFeature += 1) + for (int iFeature = 0; iFeature < src.Count; iFeature += 1) { ComputeLabelProbabilityFromFeature(labelOccurrenceCount, iLabel, iFeature, - srcValues[iFeature], ref logProb, ref absentFeatureLogProb); + src.Values[iFeature], ref logProb, ref absentFeatureLogProb); } } else { - for (int iFeature = 0; iFeature < srcValues.Length; iFeature += 1) + for (int iFeature = 0; iFeature < src.Count; iFeature += 1) { - ComputeLabelProbabilityFromFeature(labelOccurrenceCount, iLabel, srcIndices[iFeature], - srcValues[iFeature], ref logProb, ref absentFeatureLogProb); + ComputeLabelProbabilityFromFeature(labelOccurrenceCount, iLabel, src.Indices[iFeature], + src.Values[iFeature], ref logProb, ref absentFeatureLogProb); } } } @@ -411,7 +402,7 @@ private void Map(in VBuffer src, ref VBuffer dst) (float)(logProb + (_absentFeaturesLogProb[iLabel] - absentFeatureLogProb)); } - dst = editor.Commit(); + dst = new VBuffer(_labelCount, labelScores, dst.Indices); } } } diff --git a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Ova.cs b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Ova.cs index a8894f9149..529ee30f46 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Ova.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Ova.cs @@ -82,13 +82,9 @@ public Ova(IHostEnvironment env, Arguments args) /// Whether to treat missing labels as having negative labels, instead of keeping them missing. /// Number of instances to train the calibrator. /// Use probabilities (vs. raw outputs) to identify top-score category. - public Ova(IHostEnvironment env, - TScalarTrainer binaryEstimator, - string labelColumn = DefaultColumnNames.Label, - bool imputeMissingLabelsAsNegative = false, - ICalibratorTrainer calibrator = null, - int maxCalibrationExamples = 1000000000, - bool useProbabilities = true) + public Ova(IHostEnvironment env, TScalarTrainer binaryEstimator, string labelColumn = DefaultColumnNames.Label, + bool imputeMissingLabelsAsNegative = false, ICalibratorTrainer calibrator = null, + int maxCalibrationExamples = 1000000000, bool useProbabilities = true) : base(env, new Arguments { @@ -109,7 +105,7 @@ protected override OvaPredictor TrainCore(IChannel ch, RoleMappedData data, int for (int i = 0; i < predictors.Length; i++) { ch.Info($"Training learner {i}"); - predictors[i] = TrainOne(ch, Trainer, data, i).Model; + predictors[i] = TrainOne(ch, GetTrainer(), data, i).Model; } return OvaPredictor.Create(Host, _args.UseProbabilities, predictors); } @@ -187,11 +183,11 @@ public override MulticlassPredictionTransformer Fit(IDataView inpu if (i == 0) { - var transformer = TrainOne(ch, Trainer, td, i); + var transformer = TrainOne(ch, GetTrainer(), td, i); featureColumn = transformer.FeatureColumn; } - predictors[i] = TrainOne(ch, Trainer, td, i).Model; + predictors[i] = TrainOne(ch, GetTrainer(), td, i).Model; } } @@ -229,7 +225,7 @@ private static VersionInfo GetVersionInfo() public ColumnType InputType => _impl.InputType; public ColumnType OutputType { get; } public ColumnType DistType => OutputType; - bool ICanSavePfa.CanSavePfa => _impl.CanSavePfa; + public bool CanSavePfa => _impl.CanSavePfa; [BestFriend] internal static OvaPredictor Create(IHost host, bool useProb, TScalarPredictor[] predictors) @@ -341,7 +337,7 @@ protected override void SaveCore(ModelSaveContext ctx) ctx.SaveModel(preds[i], string.Format(SubPredictorFmt, i)); } - JToken ISingleCanSavePfa.SaveAsPfa(BoundPfaContext ctx, JToken input) + public JToken SaveAsPfa(BoundPfaContext ctx, JToken input) { Host.CheckValue(ctx, nameof(ctx)); Host.CheckValue(input, nameof(input)); @@ -457,19 +453,19 @@ public override ValueMapper, VBuffer> GetMapper() for (int i = 0; i < Predictors.Length; i++) maps[i] = Predictors[i].GetMapper, float>(); - var buffer = new float[maps.Length]; return (in VBuffer src, ref VBuffer dst) => { if (InputType.VectorSize > 0) Contracts.Check(src.Length == InputType.VectorSize); - var tmp = src; - Parallel.For(0, maps.Length, i => maps[i](in tmp, ref buffer[i])); + var values = dst.Values; + if (Utils.Size(values) < maps.Length) + values = new float[maps.Length]; - var editor = VBufferEditor.Create(ref dst, maps.Length); - buffer.CopyTo(editor.Values); - dst = editor.Commit(); + var tmp = src; + Parallel.For(0, maps.Length, i => maps[i](in tmp, ref values[i])); + dst = new VBuffer(maps.Length, values, dst.Indices); }; } @@ -526,25 +522,25 @@ public override ValueMapper, VBuffer> GetMapper() for (int i = 0; i < Predictors.Length; i++) maps[i] = _mappers[i].GetMapper, float, float>(); - var buffer = new float[maps.Length]; return (in VBuffer src, ref VBuffer dst) => { if (InputType.VectorSize > 0) Contracts.Check(src.Length == InputType.VectorSize); + var values = dst.Values; + if (Utils.Size(values) < maps.Length) + values = new float[maps.Length]; + var tmp = src; Parallel.For(0, maps.Length, i => { float score = 0; - maps[i](in tmp, ref score, ref buffer[i]); + maps[i](in tmp, ref score, ref values[i]); }); - Normalize(buffer, maps.Length); - - var editor = VBufferEditor.Create(ref dst, maps.Length); - buffer.CopyTo(editor.Values); - dst = editor.Commit(); + Normalize(values, maps.Length); + dst = new VBuffer(maps.Length, values, dst.Indices); }; } diff --git a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Pkpd.cs b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Pkpd.cs index 9f5ab8ea3c..d956702f32 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Pkpd.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/MultiClass/Pkpd.cs @@ -87,12 +87,8 @@ internal Pkpd(IHostEnvironment env, Arguments args) /// The name of the label colum. /// Whether to treat missing labels as having negative labels, instead of keeping them missing. /// Number of instances to train the calibrator. - public Pkpd(IHostEnvironment env, - TScalarTrainer binaryEstimator, - string labelColumn = DefaultColumnNames.Label, - bool imputeMissingLabelsAsNegative = false, - ICalibratorTrainer calibrator = null, - int maxCalibrationExamples = 1000000000) + public Pkpd(IHostEnvironment env, TScalarTrainer binaryEstimator, string labelColumn = DefaultColumnNames.Label, + bool imputeMissingLabelsAsNegative = false, ICalibratorTrainer calibrator = null, int maxCalibrationExamples = 1000000000) : base(env, new Arguments { @@ -116,7 +112,7 @@ protected override PkpdPredictor TrainCore(IChannel ch, RoleMappedData data, int for (int j = 0; j <= i; j++) { ch.Info($"Training learner ({i},{j})"); - predModels[i][j] = TrainOne(ch, Trainer, data, i, j).Model; + predModels[i][j] = TrainOne(ch, GetTrainer(), data, i, j).Model; } } @@ -201,11 +197,11 @@ public override TTransformer Fit(IDataView input) // need to capture the featureColum, and it is the same for all the transformers if (i == 0 && j == 0) { - var transformer = TrainOne(ch, Trainer, td, i, j); + var transformer = TrainOne(ch, GetTrainer(), td, i, j); featureColumn = transformer.FeatureColumn; } - predictors[i][j] = TrainOne(ch, Trainer, td, i, j).Model; + predictors[i][j] = TrainOne(ch, GetTrainer(), td, i, j).Model; } } } @@ -356,7 +352,7 @@ protected override void SaveCore(ModelSaveContext ctx) } } - private void ComputeProbabilities(Double[] buffer, Span output) + private void ComputeProbabilities(Double[] buffer, ref float[] output) { // Compute the probabilities and store them in the beginning of buffer. Note that this is safe to do since // once we've computed the ith probability, we are totally done with the ith row and all previous rows @@ -369,7 +365,8 @@ private void ComputeProbabilities(Double[] buffer, Span output) sum += value; } - Contracts.Assert(output.Length >= _numClasses); + if (Utils.Size(output) < _numClasses) + output = new float[_numClasses]; // Normalize. if (sum <= 0) @@ -458,6 +455,7 @@ public ValueMapper GetMapper() if (InputType.VectorSize > 0) Host.Check(src.Length == InputType.VectorSize); + var values = dst.Values; var tmp = src; Parallel.For(0, maps.Length, i => { @@ -468,10 +466,9 @@ public ValueMapper GetMapper() }); ReconcilePredictions(buffer); + ComputeProbabilities(buffer, ref values); - var editor = VBufferEditor.Create(ref dst, _numClasses); - ComputeProbabilities(buffer, editor.Values); - dst = editor.Commit(); + dst = new VBuffer(_numClasses, values, dst.Indices); }; return (ValueMapper)(Delegate)del; } diff --git a/src/Microsoft.ML.StandardLearners/Standard/Online/AveragedPerceptron.cs b/src/Microsoft.ML.StandardLearners/Standard/Online/AveragedPerceptron.cs index ee21496f56..0e86d91c47 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/Online/AveragedPerceptron.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/Online/AveragedPerceptron.cs @@ -96,8 +96,8 @@ internal AveragedPerceptronTrainer(IHostEnvironment env, Arguments args) /// /// The local instance of the /// The classification loss function. - /// The name of the label column. - /// The name of the feature column. + /// The name of the label column. + /// The name of the feature column. /// The optional name of the weights column. /// The learning rate. /// Wheather to decrease learning rate as iterations progress. @@ -105,8 +105,8 @@ internal AveragedPerceptronTrainer(IHostEnvironment env, Arguments args) /// The number of training iteraitons. /// A delegate to supply more advanced arguments to the algorithm. public AveragedPerceptronTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string label, + string features, string weights = null, IClassificationLoss lossFunction = null, float learningRate = Arguments.AveragedDefaultArgs.LearningRate, @@ -116,8 +116,8 @@ public AveragedPerceptronTrainer(IHostEnvironment env, Action advancedSettings = null) : this(env, InvokeAdvanced(advancedSettings, new Arguments { - LabelColumn = labelColumn, - FeatureColumn = featureColumn, + LabelColumn = label, + FeatureColumn = features, InitialWeights = weights, LearningRate = learningRate, DecreaseLearningRate = decreaseLearningRate, diff --git a/src/Microsoft.ML.StandardLearners/Standard/Online/LinearSvm.cs b/src/Microsoft.ML.StandardLearners/Standard/Online/LinearSvm.cs index 09700c8184..716bd1c4fc 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/Online/LinearSvm.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/Online/LinearSvm.cs @@ -119,7 +119,7 @@ private void BeginBatch() _batch++; _numBatchExamples = 0; _biasUpdate = 0; - VBufferUtils.Resize(ref _weightsUpdate, _weightsUpdate.Length, 0); + _weightsUpdate = new VBuffer(_weightsUpdate.Length, 0, _weightsUpdate.Values, _weightsUpdate.Indices); } private void FinishBatch(in VBuffer weightsUpdate, Float weightsUpdateScale) @@ -147,7 +147,7 @@ public override void ProcessDataInstance(IChannel ch, in VBuffer feat, Fl Float currentBiasUpdate = trueOutput * weight; _biasUpdate += currentBiasUpdate; // Only aggregate in the case where we're handling multiple instances. - if (_weightsUpdate.GetValues().Length == 0) + if (_weightsUpdate.Count == 0) { VectorUtils.ScaleInto(in feat, currentBiasUpdate, ref _weightsUpdate); _weightsUpdateScale = 1; @@ -160,7 +160,7 @@ public override void ProcessDataInstance(IChannel ch, in VBuffer feat, Fl { if (_batchSize == 1 && loss < 0) { - Contracts.Assert(_weightsUpdate.GetValues().Length == 0); + Contracts.Assert(_weightsUpdate.Count == 0); // If we aren't aggregating multiple instances, just use the instance's // vector directly. Float currentBiasUpdate = trueOutput * weight; diff --git a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineGradientDescent.cs b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineGradientDescent.cs index 9614155412..7bc7b7d96d 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineGradientDescent.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineGradientDescent.cs @@ -101,8 +101,8 @@ public override LinearRegressionPredictor CreatePredictor() /// The custom loss functions. Defaults to if not provided. /// A delegate to supply advanced arguments to the algorithm. public OnlineGradientDescentTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string labelColumn, + string featureColumn, float learningRate = Arguments.OgdDefaultArgs.LearningRate, bool decreaseLearningRate = Arguments.OgdDefaultArgs.DecreaseLearningRate, float l2RegularizerWeight = Arguments.OgdDefaultArgs.L2RegularizerWeight, diff --git a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerCatalog.cs b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerCatalog.cs new file mode 100644 index 0000000000..6580defb4b --- /dev/null +++ b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerCatalog.cs @@ -0,0 +1,97 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Trainers.Online; +using System; + +namespace Microsoft.ML +{ + /// + /// Binary Classification trainer estimators. + /// + public static class AveragedPerceptronExtensions + { + /// + /// Predict a target using a linear binary classification model trained with the AveragedPerceptron trainer, and a custom loss. + /// + /// The binary classification context trainer object. + /// The label, or dependent variable. + /// The features, or independent variables. + /// The custom loss. + /// The optional example weights. + /// The learning Rate. + /// Decrease learning rate as iterations progress. + /// L2 regularization weight. + /// Number of training iterations through the data. + /// A delegate to supply more advanced arguments to the algorithm. + public static AveragedPerceptronTrainer AveragedPerceptron( + this BinaryClassificationContext.BinaryClassificationTrainers ctx, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, + string weights = null, + IClassificationLoss lossFunction = null, + float learningRate = AveragedLinearArguments.AveragedDefaultArgs.LearningRate, + bool decreaseLearningRate = AveragedLinearArguments.AveragedDefaultArgs.DecreaseLearningRate, + float l2RegularizerWeight = AveragedLinearArguments.AveragedDefaultArgs.L2RegularizerWeight, + int numIterations = AveragedLinearArguments.AveragedDefaultArgs.NumIterations, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new AveragedPerceptronTrainer(env, label, features, weights, lossFunction ?? new LogLoss(), learningRate, decreaseLearningRate, l2RegularizerWeight, numIterations, advancedSettings); + } + + private sealed class TrivialClassificationLossFactory : ISupportClassificationLossFactory + { + private readonly IClassificationLoss _loss; + + public TrivialClassificationLossFactory(IClassificationLoss loss) + { + _loss = loss; + } + + public IClassificationLoss CreateComponent(IHostEnvironment env) + { + return _loss; + } + } + } + + /// + /// Regression trainer estimators. + /// + public static class OnlineGradientDescentExtensions + { + /// + /// Predict a target using a linear regression model trained with the trainer. + /// + /// The regression context trainer object. + /// The label, or dependent variable. + /// The features, or independent variables. + /// The optional example weights. + /// The custom loss. Defaults to if not provided. + /// The learning Rate. + /// Decrease learning rate as iterations progress. + /// L2 regularization weight. + /// Number of training iterations through the data. + /// A delegate to supply more advanced arguments to the algorithm. + public static OnlineGradientDescentTrainer OnlineGradientDescent(this RegressionContext.RegressionTrainers ctx, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, + string weights = null, + IRegressionLoss lossFunction = null, + float learningRate = OnlineGradientDescentTrainer.Arguments.OgdDefaultArgs.LearningRate, + bool decreaseLearningRate = OnlineGradientDescentTrainer.Arguments.OgdDefaultArgs.DecreaseLearningRate, + float l2RegularizerWeight = AveragedLinearArguments.AveragedDefaultArgs.L2RegularizerWeight, + int numIterations = OnlineLinearArguments.OnlineDefaultArgs.NumIterations, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new OnlineGradientDescentTrainer(env, label, features, learningRate, decreaseLearningRate, l2RegularizerWeight, numIterations, weights, lossFunction, advancedSettings); + } + } +} diff --git a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerStatic.cs b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerStatic.cs index 8153d0f8cf..951fca08f6 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerStatic.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLearnerStatic.cs @@ -40,7 +40,7 @@ public static class AveragedPerceptronExtensions /// /// /// /// public static (Scalar score, Scalar predictedLabel) AveragedPerceptron( diff --git a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLinear.cs b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLinear.cs index ebcf5d0ad5..1c25986c77 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLinear.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/Online/OnlineLinear.cs @@ -130,18 +130,16 @@ protected TrainStateBase(IChannel ch, int numFeatures, LinearPredictor predictor numFeatures + 1, numFeatures); } - var weightValues = new float[numFeatures]; + Weights = VBufferUtils.CreateDense(numFeatures); for (int i = 0; i < numFeatures; i++) - weightValues[i] = Float.Parse(weightStr[i], CultureInfo.InvariantCulture); - Weights = new VBuffer(numFeatures, weightValues); + Weights.Values[i] = Float.Parse(weightStr[i], CultureInfo.InvariantCulture); Bias = Float.Parse(weightStr[numFeatures], CultureInfo.InvariantCulture); } else if (parent.Args.InitWtsDiameter > 0) { - var weightValues = new float[numFeatures]; + Weights = VBufferUtils.CreateDense(numFeatures); for (int i = 0; i < numFeatures; i++) - weightValues[i] = parent.Args.InitWtsDiameter * (parent.Host.Rand.NextSingle() - (Float)0.5); - Weights = new VBuffer(numFeatures, weightValues); + Weights.Values[i] = parent.Args.InitWtsDiameter * (parent.Host.Rand.NextSingle() - (Float)0.5); Bias = parent.Args.InitWtsDiameter * (parent.Host.Rand.NextSingle() - (Float)0.5); } else if (numFeatures <= 1000) @@ -256,7 +254,7 @@ private protected static TArgs InvokeAdvanced(Action advancedSetti return args; } - private protected sealed override TModel TrainModelCore(TrainContext context) + protected sealed override TModel TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); var initPredictor = context.InitialPredictor; diff --git a/src/Microsoft.ML.StandardLearners/Standard/PoissonRegression/PoissonRegression.cs b/src/Microsoft.ML.StandardLearners/Standard/PoissonRegression/PoissonRegression.cs index cfa56e1e6f..34d9a743cc 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/PoissonRegression/PoissonRegression.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/PoissonRegression/PoissonRegression.cs @@ -46,24 +46,22 @@ public sealed class Arguments : ArgumentsBase /// The environment to use. /// The name of the label column. /// The name of the feature column. - /// The name for the example weight column. + /// The name for the example weight column. + /// Enforce non-negative weights. /// Weight of L1 regularizer term. /// Weight of L2 regularizer term. - /// Threshold for optimizer convergence. /// Memory size for . Lower=faster, less accurate. - /// Enforce non-negative weights. + /// Threshold for optimizer convergence. /// A delegate to apply all the advanced arguments to the algorithm. - public PoissonRegression(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, + public PoissonRegression(IHostEnvironment env, string featureColumn, string labelColumn, + string weightColumn = null, float l1Weight = Arguments.Defaults.L1Weight, float l2Weight = Arguments.Defaults.L2Weight, float optimizationTolerance = Arguments.Defaults.OptTol, int memorySize = Arguments.Defaults.MemorySize, bool enforceNoNegativity = Arguments.Defaults.EnforceNonNegativity, Action advancedSettings = null) - : base(env, featureColumn, TrainerUtils.MakeR4ScalarLabel(labelColumn), weights, advancedSettings, + : base(env, featureColumn, TrainerUtils.MakeR4ScalarLabel(labelColumn), weightColumn, advancedSettings, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity) { Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); @@ -138,9 +136,8 @@ protected override float AccumulateOneGradient(in VBuffer feat, float lab float mult = -(y - lambda) * weight; VectorUtils.AddMultWithOffset(in feat, mult, ref grad, 1); // Due to the call to EnsureBiases, we know this region is dense. - var editor = VBufferEditor.CreateFromBuffer(ref grad); - Contracts.Assert(editor.Values.Length >= BiasCount && (grad.IsDense || editor.Indices[BiasCount - 1] == BiasCount - 1)); - editor.Values[0] += mult; + Contracts.Assert(grad.Count >= BiasCount && (grad.IsDense || grad.Indices[BiasCount - 1] == BiasCount - 1)); + grad.Values[0] += mult; // From the computer's perspective exp(infinity)==infinity // so inf-inf=nan, but in reality, infinity is just a large // number we can't represent, and exp(X)-X for X=inf is just inf. diff --git a/src/Microsoft.ML.StandardLearners/Standard/SdcaBinary.cs b/src/Microsoft.ML.StandardLearners/Standard/SdcaBinary.cs index 1a2f435bf2..eeeab2a5ad 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/SdcaBinary.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/SdcaBinary.cs @@ -68,7 +68,7 @@ private protected LinearTrainerBase(IHostEnvironment env, string featureColumn, { } - private protected override TModel TrainModelCore(TrainContext context) + protected override TModel TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); using (var ch = Host.Start("Training")) @@ -105,12 +105,12 @@ protected RoleMappedData PrepareDataFromTrainingExamples(IChannel ch, RoleMapped idvToFeedTrain = idvToShuffle; else { - var shuffleArgs = new RowShufflingTransformer.Arguments + var shuffleArgs = new ShuffleTransform.Arguments { PoolOnly = false, ForceShuffle = ShuffleData }; - idvToFeedTrain = new RowShufflingTransformer(Host, shuffleArgs, idvToShuffle); + idvToFeedTrain = new ShuffleTransform(Host, shuffleArgs, idvToShuffle); } ch.Assert(idvToFeedTrain.CanShuffle); @@ -772,7 +772,7 @@ protected virtual void TrainWithoutLock(IProgressChannelProvider progress, Float while (cursor.MoveNext()) { long idx = getIndexFromId(cursor.Id); - VBuffer features = cursor.Features; + var features = cursor.Features; var label = cursor.Label; float invariant; if (invariants != null) @@ -787,11 +787,6 @@ protected virtual void TrainWithoutLock(IProgressChannelProvider progress, Float invariant = Loss.ComputeDualUpdateInvariant(featuresNormSquared * lambdaNInv * GetInstanceWeight(cursor)); } - var weightsEditor = VBufferEditor.CreateFromBuffer(ref weights[0]); - var l1IntermediateWeightsEditor = - !l1ThresholdZero ? VBufferEditor.CreateFromBuffer(ref l1IntermediateWeights[0]) : - default; - for (int numTrials = 0; numTrials < maxUpdateTrials; numTrials++) { var dual = duals[idx]; @@ -817,7 +812,7 @@ protected virtual void TrainWithoutLock(IProgressChannelProvider progress, Float if (l1ThresholdZero) { - VectorUtils.AddMult(in features, weightsEditor.Values, primalUpdate); + VectorUtils.AddMult(in features, weights[0].Values, primalUpdate); biasReg[0] += primalUpdate; } else @@ -834,11 +829,10 @@ protected virtual void TrainWithoutLock(IProgressChannelProvider progress, Float : 0; } - var featureValues = features.GetValues(); if (features.IsDense) - CpuMathUtils.SdcaL1UpdateDense(primalUpdate, featureValues.Length, featureValues, l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); - else if (featureValues.Length > 0) - CpuMathUtils.SdcaL1UpdateSparse(primalUpdate, featureValues.Length, featureValues, features.GetIndices(), l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); + CpuMathUtils.SdcaL1UpdateDense(primalUpdate, features.Count, features.Values, l1Threshold, l1IntermediateWeights[0].Values, weights[0].Values); + else if (features.Count > 0) + CpuMathUtils.SdcaL1UpdateSparse(primalUpdate, features.Count, features.Values, features.Indices, l1Threshold, l1IntermediateWeights[0].Values, weights[0].Values); } break; @@ -925,7 +919,6 @@ protected virtual bool CheckConvergence( var lossSum = new CompensatedSum(); var dualLossSum = new CompensatedSum(); var biasTotal = biasReg[0] + biasUnreg[0]; - VBuffer firstWeights = weights[0]; using (var cursor = cursorFactory.Create()) { @@ -962,7 +955,7 @@ protected virtual bool CheckConvergence( var dualityGap = metrics[(int)MetricKind.DualityGap] = newLoss - newDualLoss; metrics[(int)MetricKind.BiasUnreg] = biasUnreg[0]; metrics[(int)MetricKind.BiasReg] = biasReg[0]; - metrics[(int)MetricKind.L1Sparsity] = Args.L1Threshold == 0 ? 1 : (Double)firstWeights.GetValues().Count(w => w != 0) / weights.Length; + metrics[(int)MetricKind.L1Sparsity] = Args.L1Threshold == 0 ? 1 : (Double)weights[0].Values.Count(w => w != 0) / weights.Length; bool converged = dualityGap / newLoss < Args.ConvergenceTolerance; @@ -971,7 +964,7 @@ protected virtual bool CheckConvergence( // Maintain a copy of weights and bias with best primal loss thus far. // This is some extra work and uses extra memory, but it seems worth doing it. // REVIEW: Sparsify bestWeights? - firstWeights.CopyTo(ref bestWeights[0]); + weights[0].CopyTo(ref bestWeights[0]); bestBiasReg[0] = biasReg[0]; bestBiasUnreg[0] = biasUnreg[0]; bestPrimalLoss = metrics[(int)MetricKind.Loss]; @@ -1434,8 +1427,8 @@ internal override void Check(IHostEnvironment env) /// Initializes a new instance of /// /// The environment to use. - /// The label, or dependent variable. /// The features, or independent variables. + /// The label, or dependent variable. /// The custom loss. /// The optional example weights. /// The L2 regularization hyperparameter. @@ -1446,8 +1439,8 @@ internal override void Check(IHostEnvironment env) /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public SdcaBinaryTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, + string featureColumn, + string labelColumn, string weightColumn = null, ISupportSdcaClassificationLoss loss = null, float? l2Const = null, @@ -1682,10 +1675,7 @@ internal static class Defaults /// The L2 regularizer constant. /// The loss function to use. /// A delegate to apply all the advanced arguments to the algorithm. - public StochasticGradientDescentClassificationTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weightColumn = null, + public StochasticGradientDescentClassificationTrainer(IHostEnvironment env, string featureColumn, string labelColumn, string weightColumn = null, int maxIterations = Arguments.Defaults.MaxIterations, double initLearningRate = Arguments.Defaults.InitLearningRate, float l2Weight = Arguments.Defaults.L2Weight, @@ -1841,7 +1831,6 @@ protected override TScalarPredictor TrainCore(IChannel ch, RoleMappedData data, { using (var cursor = _args.Shuffle ? cursorFactory.Create(rand) : cursorFactory.Create()) { - var weightsEditor = VBufferEditor.CreateFromBuffer(ref weights); while (cursor.MoveNext()) { VBuffer features = cursor.Features; @@ -1857,7 +1846,7 @@ protected override TScalarPredictor TrainCore(IChannel ch, RoleMappedData data, Double rate = ilr / (1 + ilr * l2Weight * (t++)); Double step = -derivative * rate; weightScaling *= 1 - rate * l2Weight; - VectorUtils.AddMult(in features, weightsEditor.Values, (float)(step / weightScaling)); + VectorUtils.AddMult(in features, weights.Values, (float)(step / weightScaling)); bias += (float)step; } if (e == 1) diff --git a/src/Microsoft.ML.StandardLearners/Standard/SdcaCatalog.cs b/src/Microsoft.ML.StandardLearners/Standard/SdcaCatalog.cs new file mode 100644 index 0000000000..04727f5910 --- /dev/null +++ b/src/Microsoft.ML.StandardLearners/Standard/SdcaCatalog.cs @@ -0,0 +1,126 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Learners; +using Microsoft.ML.Trainers; +using System; + +namespace Microsoft.ML +{ + /// + /// Extension methods for instantiating SDCA trainer estimators. + /// + public static class SdcaRegressionExtensions + { + /// + /// Predict a target using a linear regression model trained with the SDCA trainer. + /// + /// The regression context trainer object. + /// The label, or dependent variable. + /// The features, or independent variables. + /// The optional example weights. + /// The L2 regularization hyperparameter. + /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. + /// The maximum number of passes to perform over the data. + /// The custom loss, if unspecified will be . + /// A delegate to set more settings. + /// The settings here will override the ones provided in the direct method signature, + /// if both are present and have different values. + /// The columns names, however need to be provided directly, not through the . + public static SdcaRegressionTrainer StochasticDualCoordinateAscent(this RegressionContext.RegressionTrainers ctx, + string label = DefaultColumnNames.Label, string features = DefaultColumnNames.Features, string weights = null, + ISupportSdcaRegressionLoss loss = null, + float? l2Const = null, + float? l1Threshold = null, + int? maxIterations = null, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new SdcaRegressionTrainer(env, features, label, weights, loss, l2Const, l1Threshold, maxIterations, advancedSettings); + } + } + + public static class SdcaBinaryClassificationExtensions + { + /// + /// Predict a target using a linear binary classification model trained with the SDCA trainer. + /// + /// The binary classification context trainer object. + /// The label, or dependent variable. + /// The features, or independent variables. + /// The optional example weights. + /// The custom loss. Defaults to log-loss if not specified. + /// The L2 regularization hyperparameter. + /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. + /// The maximum number of passes to perform over the data. + /// A delegate to set more settings. + /// The settings here will override the ones provided in the direct method signature, + /// if both are present and have different values. + /// The columns names, however need to be provided directly, not through the . + /// + /// + /// + /// + /// + /// + /// + /// + public static SdcaBinaryTrainer StochasticDualCoordinateAscent( + this BinaryClassificationContext.BinaryClassificationTrainers ctx, + string label = DefaultColumnNames.Label, string features = DefaultColumnNames.Features, + string weights = null, + ISupportSdcaClassificationLoss loss = null, + float? l2Const = null, + float? l1Threshold = null, + int? maxIterations = null, + Action advancedSettings = null + ) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new SdcaBinaryTrainer(env, features, label, weights, loss, l2Const, l1Threshold, maxIterations, advancedSettings); + } + } + + public static class SdcaMulticlassExtensions + { + + /// + /// Predict a target using a linear multiclass classification model trained with the SDCA trainer. + /// + /// The multiclass classification context trainer object. + /// The label, or dependent variable. + /// The features, or independent variables. + /// The optional custom loss. + /// The optional example weights. + /// The L2 regularization hyperparameter. + /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. + /// The maximum number of passes to perform over the data. + /// A delegate to set more settings. + /// The settings here will override the ones provided in the direct method signature, + /// if both are present and have different values. + /// The columns names, however need to be provided directly, not through the . + public static SdcaMultiClassTrainer StochasticDualCoordinateAscent(this MulticlassClassificationContext.MulticlassClassificationTrainers ctx, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, + string weights = null, + ISupportSdcaClassificationLoss loss = null, + float? l2Const = null, + float? l1Threshold = null, + int? maxIterations = null, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new SdcaMultiClassTrainer(env, features, label, weights, loss, l2Const, l1Threshold, maxIterations, advancedSettings); + } + } +} diff --git a/src/Microsoft.ML.StandardLearners/Standard/SdcaMultiClass.cs b/src/Microsoft.ML.StandardLearners/Standard/SdcaMultiClass.cs index 0b5647f446..deaa204b03 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/SdcaMultiClass.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/SdcaMultiClass.cs @@ -51,10 +51,10 @@ public sealed class Arguments : ArgumentsBase /// Initializes a new instance of /// /// The environment to use. - /// The label, or dependent variable. /// The features, or independent variables. - /// The optional example weights. + /// The label, or dependent variable. /// The custom loss. + /// The optional example weights. /// The L2 regularization hyperparameter. /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. /// The maximum number of passes to perform over the data. @@ -63,15 +63,15 @@ public sealed class Arguments : ArgumentsBase /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public SdcaMultiClassTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, + string featureColumn, + string labelColumn, + string weightColumn = null, ISupportSdcaClassificationLoss loss = null, float? l2Const = null, float? l1Threshold = null, int? maxIterations = null, Action advancedSettings = null) - : base(env, featureColumn, TrainerUtils.MakeU4ScalarColumn(labelColumn), TrainerUtils.MakeR4ScalarWeightColumn(weights), advancedSettings, + : base(env, featureColumn, TrainerUtils.MakeU4ScalarColumn(labelColumn), TrainerUtils.MakeR4ScalarWeightColumn(weightColumn), advancedSettings, l2Const, l1Threshold, maxIterations) { Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); @@ -167,7 +167,7 @@ protected override void TrainWithoutLock(IProgressChannelProvider progress, Floa } else { - normSquared = VectorUtils.NormSquared(in features); + normSquared = VectorUtils.NormSquared(features); if (Args.BiasLearningRate == 0) normSquared += 1; @@ -194,11 +194,6 @@ protected override void TrainWithoutLock(IProgressChannelProvider progress, Floa if (iClass == label) continue; - var weightsEditor = VBufferEditor.CreateFromBuffer(ref weights[iClass]); - var l1IntermediateWeightsEditor = - !l1ThresholdZero ? VBufferEditor.CreateFromBuffer(ref l1IntermediateWeights[iClass]) : - default; - // Loop trials for compare-and-swap updates of duals. // In general, concurrent update conflict to the same dual variable is rare // if data is shuffled. @@ -228,7 +223,7 @@ protected override void TrainWithoutLock(IProgressChannelProvider progress, Floa if (l1ThresholdZero) { - VectorUtils.AddMult(in features, weightsEditor.Values, -primalUpdate); + VectorUtils.AddMult(in features, weights[iClass].Values, -primalUpdate); biasReg[iClass] -= primalUpdate; } else @@ -245,11 +240,10 @@ protected override void TrainWithoutLock(IProgressChannelProvider progress, Floa : 0; } - var featureValues = features.GetValues(); if (features.IsDense) - CpuMathUtils.SdcaL1UpdateDense(-primalUpdate, featureValues.Length, featureValues, l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); - else if (featureValues.Length > 0) - CpuMathUtils.SdcaL1UpdateSparse(-primalUpdate, featureValues.Length, featureValues, features.GetIndices(), l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); + CpuMathUtils.SdcaL1UpdateDense(-primalUpdate, features.Count, features.Values, l1Threshold, l1IntermediateWeights[iClass].Values, weights[iClass].Values); + else if (features.Count > 0) + CpuMathUtils.SdcaL1UpdateSparse(-primalUpdate, features.Count, features.Values, features.Indices, l1Threshold, l1IntermediateWeights[iClass].Values, weights[iClass].Values); } break; @@ -262,8 +256,7 @@ protected override void TrainWithoutLock(IProgressChannelProvider progress, Floa biasUnreg[label] += labelAdjustment * lambdaNInv * instanceWeight; if (l1ThresholdZero) { - var weightsEditor = VBufferEditor.CreateFromBuffer(ref weights[label]); - VectorUtils.AddMult(in features, weightsEditor.Values, labelPrimalUpdate); + VectorUtils.AddMult(in features, weights[label].Values, labelPrimalUpdate); biasReg[label] += labelPrimalUpdate; } else @@ -274,13 +267,10 @@ protected override void TrainWithoutLock(IProgressChannelProvider progress, Floa ? intermediateBias - Math.Sign(intermediateBias) * l1Threshold : 0; - var weightsEditor = VBufferEditor.CreateFromBuffer(ref weights[label]); - var l1IntermediateWeightsEditor = VBufferEditor.CreateFromBuffer(ref l1IntermediateWeights[label]); - var featureValues = features.GetValues(); if (features.IsDense) - CpuMathUtils.SdcaL1UpdateDense(labelPrimalUpdate, featureValues.Length, featureValues, l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); - else if (featureValues.Length > 0) - CpuMathUtils.SdcaL1UpdateSparse(labelPrimalUpdate, featureValues.Length, featureValues, features.GetIndices(), l1Threshold, l1IntermediateWeightsEditor.Values, weightsEditor.Values); + CpuMathUtils.SdcaL1UpdateDense(labelPrimalUpdate, features.Count, features.Values, l1Threshold, l1IntermediateWeights[label].Values, weights[label].Values); + else if (features.Count > 0) + CpuMathUtils.SdcaL1UpdateSparse(labelPrimalUpdate, features.Count, features.Values, features.Indices, l1Threshold, l1IntermediateWeights[label].Values, weights[label].Values); } rowCount++; @@ -387,7 +377,7 @@ protected override bool CheckConvergence( metrics[(int)MetricKind.BiasUnreg] = biasUnreg[0]; metrics[(int)MetricKind.BiasReg] = biasReg[0]; metrics[(int)MetricKind.L1Sparsity] = Args.L1Threshold == 0 ? 1 : weights.Sum( - weight => weight.GetValues().Count(w => w != 0)) / (numClasses * numFeatures); + weight => weight.Values.Count(w => w != 0)) / (numClasses * numFeatures); bool converged = dualityGap / newLoss < Args.ConvergenceTolerance; diff --git a/src/Microsoft.ML.StandardLearners/Standard/SdcaRegression.cs b/src/Microsoft.ML.StandardLearners/Standard/SdcaRegression.cs index 0fb28424e7..f55ba18fe1 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/SdcaRegression.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/SdcaRegression.cs @@ -56,10 +56,10 @@ public Arguments() /// Initializes a new instance of /// /// The environment to use. - /// The label, or dependent variable. /// The features, or independent variables. - /// The optional example weights. + /// The label, or dependent variable. /// The custom loss. + /// The optional example weights. /// The L2 regularization hyperparameter. /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. /// The maximum number of passes to perform over the data. @@ -68,15 +68,15 @@ public Arguments() /// if both are present and have different values. /// The columns names, however need to be provided directly, not through the . public SdcaRegressionTrainer(IHostEnvironment env, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, + string featureColumn, + string labelColumn, + string weightColumn = null, ISupportSdcaRegressionLoss loss = null, float? l2Const = null, float? l1Threshold = null, int? maxIterations = null, Action advancedSettings = null) - : base(env, featureColumn, TrainerUtils.MakeR4ScalarLabel(labelColumn), TrainerUtils.MakeR4ScalarWeightColumn(weights), advancedSettings, + : base(env, featureColumn, TrainerUtils.MakeR4ScalarLabel(labelColumn), TrainerUtils.MakeR4ScalarWeightColumn(weightColumn), advancedSettings, l2Const, l1Threshold, maxIterations) { Host.CheckNonEmpty(featureColumn, nameof(featureColumn)); diff --git a/src/Microsoft.ML.StandardLearners/Standard/SdcaStatic.cs b/src/Microsoft.ML.StandardLearners/Standard/SdcaStatic.cs index e53617c6e9..b2d631480e 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/SdcaStatic.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/SdcaStatic.cs @@ -41,7 +41,7 @@ public static class SdcaExtensions /// /// /// /// public static Scalar Sdca(this RegressionContext.RegressionTrainers ctx, @@ -66,7 +66,7 @@ public static Scalar Sdca(this RegressionContext.RegressionTrainers ctx, var rec = new TrainerEstimatorReconciler.Regression( (env, labelName, featuresName, weightsName) => { - var trainer = new SdcaRegressionTrainer(env, labelName, featuresName, weightsName, loss, l2Const, l1Threshold, maxIterations, advancedSettings); + var trainer = new SdcaRegressionTrainer(env, featuresName, labelName, weightsName, loss, l2Const, l1Threshold, maxIterations, advancedSettings); if (onFit != null) return trainer.WithOnFitDelegate(trans => onFit(trans.Model)); return trainer; @@ -99,7 +99,7 @@ public static Scalar Sdca(this RegressionContext.RegressionTrainers ctx, /// /// /// /// public static (Scalar score, Scalar probability, Scalar predictedLabel) Sdca( @@ -123,7 +123,7 @@ public static (Scalar score, Scalar probability, Scalar pred var rec = new TrainerEstimatorReconciler.BinaryClassifier( (env, labelName, featuresName, weightsName) => { - var trainer = new SdcaBinaryTrainer(env, labelName, featuresName, weightsName, loss: new LogLoss(), l2Const, l1Threshold, maxIterations, advancedSettings); + var trainer = new SdcaBinaryTrainer(env, featuresName, labelName, weightsName, loss: new LogLoss(), l2Const, l1Threshold, maxIterations, advancedSettings); if (onFit != null) { return trainer.WithOnFitDelegate(trans => @@ -193,7 +193,7 @@ public static (Scalar score, Scalar predictedLabel) Sdca( var rec = new TrainerEstimatorReconciler.BinaryClassifierNoCalibration( (env, labelName, featuresName, weightsName) => { - var trainer = new SdcaBinaryTrainer(env, labelName, featuresName, weightsName, loss, l2Const, l1Threshold, maxIterations, advancedSettings); + var trainer = new SdcaBinaryTrainer(env, featuresName, labelName, weightsName, loss, l2Const, l1Threshold, maxIterations, advancedSettings); if (onFit != null) { return trainer.WithOnFitDelegate(trans => @@ -257,7 +257,7 @@ public static (Vector score, Key predictedLabel) var rec = new TrainerEstimatorReconciler.MulticlassClassifier( (env, labelName, featuresName, weightsName) => { - var trainer = new SdcaMultiClassTrainer(env, labelName, featuresName, weightsName, loss, l2Const, l1Threshold, maxIterations, advancedSettings); + var trainer = new SdcaMultiClassTrainer(env, featuresName, labelName, weightsName, loss, l2Const, l1Threshold, maxIterations, advancedSettings); if (onFit != null) return trainer.WithOnFitDelegate(trans => onFit(trans.Model)); return trainer; diff --git a/src/Microsoft.ML.StandardLearners/Standard/SgdCatalog.cs b/src/Microsoft.ML.StandardLearners/Standard/SgdCatalog.cs new file mode 100644 index 0000000000..be68580822 --- /dev/null +++ b/src/Microsoft.ML.StandardLearners/Standard/SgdCatalog.cs @@ -0,0 +1,46 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Trainers; +using System; + +namespace Microsoft.ML +{ + using Arguments = StochasticGradientDescentClassificationTrainer.Arguments; + + /// + /// Binary Classification trainer estimators. + /// + public static class StochasticGradientDescentCatalog + { + /// + /// Predict a target using a linear binary classification model trained with the trainer. + /// + /// The binary classificaiton context trainer object. + /// The name of the label column. + /// The name of the feature column. + /// The name for the example weight column. + /// The maximum number of iterations; set to 1 to simulate online learning. + /// The initial learning rate used by SGD. + /// The L2 regularization constant. + /// The loss function to use. + /// A delegate to apply all the advanced arguments to the algorithm. + public static StochasticGradientDescentClassificationTrainer StochasticGradientDescent(this BinaryClassificationContext.BinaryClassificationTrainers ctx, + string label = DefaultColumnNames.Label, + string features = DefaultColumnNames.Features, + string weights = null, + int maxIterations = Arguments.Defaults.MaxIterations, + double initLearningRate = Arguments.Defaults.InitLearningRate, + float l2Weight = Arguments.Defaults.L2Weight, + ISupportClassificationLossFactory loss = null, + Action advancedSettings = null) + { + Contracts.CheckValue(ctx, nameof(ctx)); + var env = CatalogUtils.GetEnvironment(ctx); + return new StochasticGradientDescentClassificationTrainer(env, features, label, weights, maxIterations, initLearningRate, l2Weight, loss, advancedSettings); + } + } +} diff --git a/src/Microsoft.ML.StandardLearners/Standard/SgdStatic.cs b/src/Microsoft.ML.StandardLearners/Standard/SgdStatic.cs index 8bc0b510a1..96c3b1a5ef 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/SgdStatic.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/SgdStatic.cs @@ -50,7 +50,7 @@ public static (Scalar score, Scalar probability, Scalar pred var rec = new TrainerEstimatorReconciler.BinaryClassifier( (env, labelName, featuresName, weightsName) => { - var trainer = new StochasticGradientDescentClassificationTrainer(env, labelName, featuresName, weightsName, maxIterations, initLearningRate, l2Weight, loss, advancedSettings); + var trainer = new StochasticGradientDescentClassificationTrainer(env, featuresName, labelName, weightsName, maxIterations, initLearningRate, l2Weight, loss, advancedSettings); if (onFit != null) return trainer.WithOnFitDelegate(trans => onFit(trans.Model)); diff --git a/src/Microsoft.ML.StandardLearners/Standard/Simple/SimpleTrainers.cs b/src/Microsoft.ML.StandardLearners/Standard/Simple/SimpleTrainers.cs index ec39fc1e1c..5dcb72ad02 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/Simple/SimpleTrainers.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/Simple/SimpleTrainers.cs @@ -70,12 +70,14 @@ public RandomTrainer(IHostEnvironment env, Arguments args) public BinaryPredictionTransformer Fit(IDataView input) { - RoleMappedData trainRoles = new RoleMappedData(input); + var cachedTrain = Info.WantCaching ? new CacheDataView(Host, input, prefetch: null) : input; + + RoleMappedData trainRoles = new RoleMappedData(cachedTrain); var pred = Train(new TrainContext(trainRoles)); - return new BinaryPredictionTransformer(Host, pred, input.Schema, featureColumn: null); + return new BinaryPredictionTransformer(Host, pred, cachedTrain.Schema, featureColumn: null); } - private protected override RandomPredictor Train(TrainContext context) + public override RandomPredictor Train(TrainContext context) { Host.CheckValue(context, nameof(context)); return new RandomPredictor(Host, Host.Rand.Next()); @@ -268,12 +270,14 @@ public PriorTrainer(IHost host, String labelColumn, String weightColunn = null) public BinaryPredictionTransformer Fit(IDataView input) { - RoleMappedData trainRoles = new RoleMappedData(input, feature: null, label: _labelColumnName, weight: _weightColumnName); + var cachedTrain = Info.WantCaching ? new CacheDataView(Host, input, prefetch: null) : input; + + RoleMappedData trainRoles = new RoleMappedData(cachedTrain, feature: null, label: _labelColumnName, weight: _weightColumnName); var pred = Train(new TrainContext(trainRoles)); - return new BinaryPredictionTransformer(Host, pred, input.Schema, featureColumn: null); + return new BinaryPredictionTransformer(Host, pred, cachedTrain.Schema, featureColumn: null); } - private protected override PriorPredictor Train(TrainContext context) + public override PriorPredictor Train(TrainContext context) { Contracts.CheckValue(context, nameof(context)); var data = context.TrainingSet; diff --git a/src/Microsoft.ML.StandardLearners/Standard/StochasticTrainerBase.cs b/src/Microsoft.ML.StandardLearners/Standard/StochasticTrainerBase.cs index d419a3a8a1..cae4894214 100644 --- a/src/Microsoft.ML.StandardLearners/Standard/StochasticTrainerBase.cs +++ b/src/Microsoft.ML.StandardLearners/Standard/StochasticTrainerBase.cs @@ -28,7 +28,7 @@ public StochasticTrainerBase(IHost host, SchemaShape.Column feature, SchemaShape private static readonly TrainerInfo _info = new TrainerInfo(); public override TrainerInfo Info => _info; - private protected override TModel TrainModelCore(TrainContext context) + protected override TModel TrainModelCore(TrainContext context) { Host.CheckValue(context, nameof(context)); using (var ch = Host.Start("Training")) @@ -72,12 +72,12 @@ protected RoleMappedData PrepareDataFromTrainingExamples(IChannel ch, RoleMapped idvToFeedTrain = idvToShuffle; else { - var shuffleArgs = new RowShufflingTransformer.Arguments + var shuffleArgs = new ShuffleTransform.Arguments { PoolOnly = false, ForceShuffle = ShuffleData }; - idvToFeedTrain = new RowShufflingTransformer(Host, shuffleArgs, idvToShuffle); + idvToFeedTrain = new ShuffleTransform(Host, shuffleArgs, idvToShuffle); } ch.Assert(idvToFeedTrain.CanShuffle); diff --git a/src/Microsoft.ML.StandardLearners/StandardLearnersCatalog.cs b/src/Microsoft.ML.StandardLearners/StandardLearnersCatalog.cs deleted file mode 100644 index aaba510815..0000000000 --- a/src/Microsoft.ML.StandardLearners/StandardLearnersCatalog.cs +++ /dev/null @@ -1,314 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Learners; -using Microsoft.ML.Trainers; -using Microsoft.ML.Trainers.Online; -using System; - -namespace Microsoft.ML -{ - using SgdArguments = StochasticGradientDescentClassificationTrainer.Arguments; - using LRArguments = LogisticRegression.Arguments; - - /// - /// TrainerEstimator extension methods. - /// - public static class StandardLearnersCatalog - { - /// - /// Predict a target using a linear binary classification model trained with the trainer. - /// - /// The binary classificaiton context trainer object. - /// The name of the label column. - /// The name of the feature column. - /// The name for the example weight column. - /// The maximum number of iterations; set to 1 to simulate online learning. - /// The initial learning rate used by SGD. - /// The L2 regularization constant. - /// The loss function to use. - /// A delegate to apply all the advanced arguments to the algorithm. - public static StochasticGradientDescentClassificationTrainer StochasticGradientDescent(this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, - int maxIterations = SgdArguments.Defaults.MaxIterations, - double initLearningRate = SgdArguments.Defaults.InitLearningRate, - float l2Weight = SgdArguments.Defaults.L2Weight, - ISupportClassificationLossFactory loss = null, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new StochasticGradientDescentClassificationTrainer(env, labelColumn, featureColumn, weights, maxIterations, initLearningRate, l2Weight, loss, advancedSettings); - } - - /// - /// Predict a target using a linear regression model trained with the SDCA trainer. - /// - /// The regression context trainer object. - /// The label column, or dependent variable. - /// The features, or independent variables. - /// The optional example weights. - /// The L2 regularization hyperparameter. - /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. - /// The maximum number of passes to perform over the data. - /// The custom loss, if unspecified will be . - /// A delegate to set more settings. - /// The settings here will override the ones provided in the direct method signature, - /// if both are present and have different values. - /// The columns names, however need to be provided directly, not through the . - public static SdcaRegressionTrainer StochasticDualCoordinateAscent(this RegressionContext.RegressionTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, - ISupportSdcaRegressionLoss loss = null, - float? l2Const = null, - float? l1Threshold = null, - int? maxIterations = null, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new SdcaRegressionTrainer(env, labelColumn, featureColumn, weights, loss, l2Const, l1Threshold, maxIterations, advancedSettings); - } - - /// - /// Predict a target using a linear binary classification model trained with the SDCA trainer. - /// - /// The binary classification context trainer object. - /// The labelColumn, or dependent variable. - /// The features, or independent variables. - /// The optional example weights. - /// The custom loss. Defaults to log-loss if not specified. - /// The L2 regularization hyperparameter. - /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. - /// The maximum number of passes to perform over the data. - /// A delegate to set more settings. - /// The settings here will override the ones provided in the direct method signature, - /// if both are present and have different values. - /// The columns names, however need to be provided directly, not through the . - /// - /// - /// - /// - /// - /// - /// - /// - public static SdcaBinaryTrainer StochasticDualCoordinateAscent( - this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, - ISupportSdcaClassificationLoss loss = null, - float? l2Const = null, - float? l1Threshold = null, - int? maxIterations = null, - Action advancedSettings = null - ) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new SdcaBinaryTrainer(env, labelColumn, featureColumn, weights, loss, l2Const, l1Threshold, maxIterations, advancedSettings); - } - - /// - /// Predict a target using a linear multiclass classification model trained with the SDCA trainer. - /// - /// The multiclass classification context trainer object. - /// The labelColumn, or dependent variable. - /// The features, or independent variables. - /// The optional custom loss. - /// The optional example weights. - /// The L2 regularization hyperparameter. - /// The L1 regularization hyperparameter. Higher values will tend to lead to more sparse model. - /// The maximum number of passes to perform over the data. - /// A delegate to set more settings. - /// The settings here will override the ones provided in the direct method signature, - /// if both are present and have different values. - /// The columns names, however need to be provided directly, not through the . - public static SdcaMultiClassTrainer StochasticDualCoordinateAscent(this MulticlassClassificationContext.MulticlassClassificationTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, - ISupportSdcaClassificationLoss loss = null, - float? l2Const = null, - float? l1Threshold = null, - int? maxIterations = null, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new SdcaMultiClassTrainer(env, labelColumn, featureColumn, weights, loss, l2Const, l1Threshold, maxIterations, advancedSettings); - } - - /// - /// Predict a target using a linear binary classification model trained with the AveragedPerceptron trainer, and a custom loss. - /// - /// The binary classification context trainer object. - /// The name of the label column, or dependent variable. - /// The features, or independent variables. - /// The custom loss. - /// The optional example weights. - /// The learning Rate. - /// Decrease learning rate as iterations progress. - /// L2 regularization weight. - /// Number of training iterations through the data. - /// A delegate to supply more advanced arguments to the algorithm. - public static AveragedPerceptronTrainer AveragedPerceptron( - this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, - IClassificationLoss lossFunction = null, - float learningRate = AveragedLinearArguments.AveragedDefaultArgs.LearningRate, - bool decreaseLearningRate = AveragedLinearArguments.AveragedDefaultArgs.DecreaseLearningRate, - float l2RegularizerWeight = AveragedLinearArguments.AveragedDefaultArgs.L2RegularizerWeight, - int numIterations = AveragedLinearArguments.AveragedDefaultArgs.NumIterations, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new AveragedPerceptronTrainer(env, labelColumn, featureColumn, weights, lossFunction ?? new LogLoss(), learningRate, decreaseLearningRate, l2RegularizerWeight, numIterations, advancedSettings); - } - - private sealed class TrivialClassificationLossFactory : ISupportClassificationLossFactory - { - private readonly IClassificationLoss _loss; - - public TrivialClassificationLossFactory(IClassificationLoss loss) - { - _loss = loss; - } - - public IClassificationLoss CreateComponent(IHostEnvironment env) - { - return _loss; - } - } - - /// - /// Predict a target using a linear regression model trained with the trainer. - /// - /// The regression context trainer object. - /// The name of the label, or dependent variable. - /// The features, or independent variables. - /// The optional example weights. - /// The custom loss. Defaults to if not provided. - /// The learning Rate. - /// Decrease learning rate as iterations progress. - /// L2 regularization weight. - /// Number of training iterations through the data. - /// A delegate to supply more advanced arguments to the algorithm. - public static OnlineGradientDescentTrainer OnlineGradientDescent(this RegressionContext.RegressionTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, - IRegressionLoss lossFunction = null, - float learningRate = OnlineGradientDescentTrainer.Arguments.OgdDefaultArgs.LearningRate, - bool decreaseLearningRate = OnlineGradientDescentTrainer.Arguments.OgdDefaultArgs.DecreaseLearningRate, - float l2RegularizerWeight = AveragedLinearArguments.AveragedDefaultArgs.L2RegularizerWeight, - int numIterations = OnlineLinearArguments.OnlineDefaultArgs.NumIterations, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new OnlineGradientDescentTrainer(env, labelColumn, featureColumn, learningRate, decreaseLearningRate, l2RegularizerWeight, numIterations, weights, lossFunction, advancedSettings); - } - - /// - /// Predict a target using a linear binary classification model trained with the trainer. - /// - /// The binary classificaiton context trainer object. - /// The label column name, or dependent variable. - /// The features, or independent variables. - /// The optional example weights. - /// Enforce non-negative weights. - /// Weight of L1 regularization term. - /// Weight of L2 regularization term. - /// Memory size for . Lower=faster, less accurate. - /// Threshold for optimizer convergence. - /// A delegate to apply all the advanced arguments to the algorithm. - public static LogisticRegression LogisticRegression(this BinaryClassificationContext.BinaryClassificationTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, - float l1Weight = LRArguments.Defaults.L1Weight, - float l2Weight = LRArguments.Defaults.L2Weight, - float optimizationTolerance = LRArguments.Defaults.OptTol, - int memorySize = LRArguments.Defaults.MemorySize, - bool enforceNoNegativity = LRArguments.Defaults.EnforceNonNegativity, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new LogisticRegression(env, labelColumn, featureColumn, weights, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity, advancedSettings); - } - - /// - /// Predict a target using a linear regression model trained with the trainer. - /// - /// The regression context trainer object. - /// The labelColumn, or dependent variable. - /// The features, or independent variables. - /// The optional example weights. - /// Weight of L1 regularization term. - /// Weight of L2 regularization term. - /// Threshold for optimizer convergence. - /// Memory size for . Lower=faster, less accurate. - /// Enforce non-negative weights. - /// A delegate to apply all the advanced arguments to the algorithm. - public static PoissonRegression PoissonRegression(this RegressionContext.RegressionTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, - float l1Weight = LRArguments.Defaults.L1Weight, - float l2Weight = LRArguments.Defaults.L2Weight, - float optimizationTolerance = LRArguments.Defaults.OptTol, - int memorySize = LRArguments.Defaults.MemorySize, - bool enforceNoNegativity = LRArguments.Defaults.EnforceNonNegativity, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new PoissonRegression(env, labelColumn, featureColumn, weights, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity, advancedSettings); - } - - /// - /// Predict a target using a linear multiclass classification model trained with the trainer. - /// - /// The multiclass classification context trainer object. - /// The labelColumn, or dependent variable. - /// The features, or independent variables. - /// The optional example weights. - /// Enforce non-negative weights. - /// Weight of L1 regularization term. - /// Weight of L2 regularization term. - /// Memory size for . Lower=faster, less accurate. - /// Threshold for optimizer convergence. - /// A delegate to apply all the advanced arguments to the algorithm. - public static MulticlassLogisticRegression LogisticRegression(this MulticlassClassificationContext.MulticlassClassificationTrainers ctx, - string labelColumn = DefaultColumnNames.Label, - string featureColumn = DefaultColumnNames.Features, - string weights = null, - float l1Weight = LRArguments.Defaults.L1Weight, - float l2Weight = LRArguments.Defaults.L2Weight, - float optimizationTolerance = LRArguments.Defaults.OptTol, - int memorySize = LRArguments.Defaults.MemorySize, - bool enforceNoNegativity = LRArguments.Defaults.EnforceNonNegativity, - Action advancedSettings = null) - { - Contracts.CheckValue(ctx, nameof(ctx)); - var env = CatalogUtils.GetEnvironment(ctx); - return new MulticlassLogisticRegression(env, labelColumn, featureColumn, weights, l1Weight, l2Weight, optimizationTolerance, memorySize, enforceNoNegativity, advancedSettings); - } - } -} diff --git a/src/Microsoft.ML.Sweeper/Algorithms/SmacSweeper.cs b/src/Microsoft.ML.Sweeper/Algorithms/SmacSweeper.cs index cf4de98e66..d78b6eaa7d 100644 --- a/src/Microsoft.ML.Sweeper/Algorithms/SmacSweeper.cs +++ b/src/Microsoft.ML.Sweeper/Algorithms/SmacSweeper.cs @@ -12,6 +12,7 @@ using Microsoft.ML.Runtime.Sweeper; using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Trainers.FastTree; using Microsoft.ML.Trainers.FastTree.Internal; using Microsoft.ML.Runtime.Internal.Utilities; @@ -162,20 +163,20 @@ private FastForestRegressionPredictor FitModel(IEnumerable previousR /// An array of ParamaterSets which are the candidate configurations to sweep. private ParameterSet[] GenerateCandidateConfigurations(int numOfCandidates, IEnumerable previousRuns, FastForestRegressionPredictor forest) { + ParameterSet[] configs = new ParameterSet[numOfCandidates]; + // Get k best previous runs ParameterSets. ParameterSet[] bestKParamSets = GetKBestConfigurations(previousRuns, forest, _args.LocalSearchParentCount); // Perform local searches using the k best previous run configurations. ParameterSet[] eiChallengers = GreedyPlusRandomSearch(bestKParamSets, forest, (int)Math.Ceiling(numOfCandidates / 2.0F), previousRuns); - // Generate another set of random configurations to interleave. + // Generate another set of random configurations to interleave ParameterSet[] randomChallengers = _randomSweeper.ProposeSweeps(numOfCandidates - eiChallengers.Length, previousRuns); - // Return interleaved challenger candidates with random candidates. Since the number of candidates from either can be less than - // the number asked for, since we only generate unique candidates, and the number from either method may vary considerably. - ParameterSet[] configs = new ParameterSet[eiChallengers.Length + randomChallengers.Length]; - Array.Copy(eiChallengers, 0, configs, 0, eiChallengers.Length); - Array.Copy(randomChallengers, 0, configs, eiChallengers.Length, randomChallengers.Length); + // Return interleaved challenger candidates with random candidates + for (int j = 0; j < configs.Length; j++) + configs[j] = j % 2 == 0 ? eiChallengers[j / 2] : randomChallengers[j / 2]; return configs; } diff --git a/src/Microsoft.ML.Sweeper/Algorithms/SweeperProbabilityUtils.cs b/src/Microsoft.ML.Sweeper/Algorithms/SweeperProbabilityUtils.cs index 503ffe75cc..08ef587596 100644 --- a/src/Microsoft.ML.Sweeper/Algorithms/SweeperProbabilityUtils.cs +++ b/src/Microsoft.ML.Sweeper/Algorithms/SweeperProbabilityUtils.cs @@ -2,8 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +using Float = System.Single; using System; using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; using Microsoft.ML.Runtime.Internal.CpuMath; namespace Microsoft.ML.Runtime.Sweeper.Algorithms @@ -156,11 +160,11 @@ public static double[] InverseNormalize(double[] weights) return Normalize(weights); } - public static float[] ParameterSetAsFloatArray(IHost host, IValueGenerator[] sweepParams, ParameterSet ps, bool expandCategoricals = true) + public static Float[] ParameterSetAsFloatArray(IHost host, IValueGenerator[] sweepParams, ParameterSet ps, bool expandCategoricals = true) { host.Assert(ps.Count == sweepParams.Length); - var result = new List(); + var result = new List(); for (int i = 0; i < sweepParams.Length; i++) { @@ -208,7 +212,7 @@ public static float[] ParameterSetAsFloatArray(IHost host, IValueGenerator[] swe return result.ToArray(); } - public static ParameterSet FloatArrayAsParameterSet(IHost host, IValueGenerator[] sweepParams, float[] array, bool expandedCategoricals = true) + public static ParameterSet FloatArrayAsParameterSet(IHost host, IValueGenerator[] sweepParams, Float[] array, bool expandedCategoricals = true) { Contracts.Assert(array.Length == sweepParams.Length); diff --git a/src/Microsoft.ML.Sweeper/AsyncSweeper.cs b/src/Microsoft.ML.Sweeper/AsyncSweeper.cs index 7f29dc2fa8..fa537e793a 100644 --- a/src/Microsoft.ML.Sweeper/AsyncSweeper.cs +++ b/src/Microsoft.ML.Sweeper/AsyncSweeper.cs @@ -10,6 +10,7 @@ using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; +using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Sweeper; diff --git a/src/Microsoft.ML.Sweeper/ConfigRunner.cs b/src/Microsoft.ML.Sweeper/ConfigRunner.cs index 504ba298a0..3219d691b1 100644 --- a/src/Microsoft.ML.Sweeper/ConfigRunner.cs +++ b/src/Microsoft.ML.Sweeper/ConfigRunner.cs @@ -7,8 +7,11 @@ using System.IO; using System.Linq; using System.Threading.Tasks; + +using Microsoft.ML; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; +using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Sweeper; @@ -107,9 +110,7 @@ public virtual void Finish() string currentDirectory = Path.GetDirectoryName(typeof(ExeConfigRunnerBase).Module.FullyQualifiedName); using (var ch = Host.Start("Finish")) -#pragma warning disable CS0618 // As this deals with invoking command lines, this may be OK, though this code has some other problems. using (AssemblyLoadingUtils.CreateAssemblyRegistrar(Host, currentDirectory)) -#pragma warning restore CS0618 { var runs = RunNums.ToArray(); var args = Utils.BuildArray(RunNums.Count + 2, diff --git a/src/Microsoft.ML.Sweeper/Microsoft.ML.Sweeper.csproj b/src/Microsoft.ML.Sweeper/Microsoft.ML.Sweeper.csproj index 9ed5d25e0e..d48a762104 100644 --- a/src/Microsoft.ML.Sweeper/Microsoft.ML.Sweeper.csproj +++ b/src/Microsoft.ML.Sweeper/Microsoft.ML.Sweeper.csproj @@ -13,6 +13,11 @@ + + + + + diff --git a/src/Microsoft.ML.Sweeper/Parameters.cs b/src/Microsoft.ML.Sweeper/Parameters.cs index 7e87d34c35..1618881867 100644 --- a/src/Microsoft.ML.Sweeper/Parameters.cs +++ b/src/Microsoft.ML.Sweeper/Parameters.cs @@ -9,6 +9,7 @@ using System.Globalization; using System.Linq; using System.Text.RegularExpressions; +using Microsoft.ML; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Internal.Utilities; diff --git a/src/Microsoft.ML.Sweeper/Properties/AssemblyInfo.cs b/src/Microsoft.ML.Sweeper/Properties/AssemblyInfo.cs deleted file mode 100644 index 160c67eb55..0000000000 --- a/src/Microsoft.ML.Sweeper/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Runtime.CompilerServices; -using Microsoft.ML; - -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.Legacy" + PublicKey.Value)] -[assembly: InternalsVisibleTo(assemblyName: "Microsoft.ML.PipelineInference" + PublicKey.Value)] diff --git a/src/Microsoft.ML.Sweeper/SweepCommand.cs b/src/Microsoft.ML.Sweeper/SweepCommand.cs index fe61dc3c6e..c738db0ef5 100644 --- a/src/Microsoft.ML.Sweeper/SweepCommand.cs +++ b/src/Microsoft.ML.Sweeper/SweepCommand.cs @@ -5,10 +5,13 @@ using System; using System.Collections.Generic; using System.IO; +using Microsoft.ML; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; +using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Sweeper; +using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Command; [assembly: LoadableClass(SweepCommand.Summary, typeof(SweepCommand), typeof(SweepCommand.Arguments), typeof(SignatureCommand), @@ -16,10 +19,8 @@ namespace Microsoft.ML.Runtime.Sweeper { - [BestFriend] - internal sealed class SweepCommand : ICommand + public sealed class SweepCommand : ICommand { -#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. public sealed class Arguments { [Argument(ArgumentType.Multiple, HelpText = "Config runner", ShortName = "run,ev,evaluator", SignatureType = typeof(SignatureConfigRunner))] @@ -41,7 +42,6 @@ public sealed class Arguments [Argument(ArgumentType.AtMostOnce, HelpText = "Random seed", ShortName = "seed")] public int? RandomSeed; } -#pragma warning restore CS0649 internal const string Summary = "Given a command line template and sweep ranges, creates and runs a sweep."; diff --git a/src/Microsoft.ML.Sweeper/SweepResultEvaluator.cs b/src/Microsoft.ML.Sweeper/SweepResultEvaluator.cs index 1bfd37ec70..fded15ddaf 100644 --- a/src/Microsoft.ML.Sweeper/SweepResultEvaluator.cs +++ b/src/Microsoft.ML.Sweeper/SweepResultEvaluator.cs @@ -4,6 +4,7 @@ using System; using System.Text; +using Microsoft.ML; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.CommandLine; diff --git a/src/Microsoft.ML.Sweeper/SynthConfigRunner.cs b/src/Microsoft.ML.Sweeper/SynthConfigRunner.cs index 27da71cc64..bee7b8a60b 100644 --- a/src/Microsoft.ML.Sweeper/SynthConfigRunner.cs +++ b/src/Microsoft.ML.Sweeper/SynthConfigRunner.cs @@ -7,9 +7,12 @@ using System.IO; using System.Threading.Tasks; +using Microsoft.ML; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; +using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Sweeper; +using Microsoft.ML.Runtime.Internal.Internallearn; [assembly: LoadableClass(typeof(SynthConfigRunner), typeof(SynthConfigRunner.Arguments), typeof(SignatureConfigRunner), "", "Synth")] diff --git a/src/Microsoft.ML.TensorFlow/TensorFlow/TensorflowUtils.cs b/src/Microsoft.ML.TensorFlow/TensorFlow/TensorflowUtils.cs index dbf080d9a1..8ac5e532a3 100644 --- a/src/Microsoft.ML.TensorFlow/TensorFlow/TensorflowUtils.cs +++ b/src/Microsoft.ML.TensorFlow/TensorFlow/TensorflowUtils.cs @@ -115,12 +115,8 @@ public static ISchema GetModelSchema(IExceptionContext ectx, string modelFile) Contracts.Assert(metadataType.IsKnownSizeVector && metadataType.ItemType.IsText); schema.GetMetadata(TensorFlowUtils.InputOps, i, ref inputOps); } - - string[] inputOpsResult = inputOps.DenseValues() - .Select(input => input.ToString()) - .ToArray(); - - yield return (name, opType.ToString(), type, inputOpsResult); + yield return (name, opType.ToString(), type, + Utils.Size(inputOps.Values) > 0 ? inputOps.Values.Select(input => input.ToString()).ToArray() : new string[0]); } } @@ -332,10 +328,16 @@ internal static TFSession GetSession(IHostEnvironment env, string modelPath) return LoadTFSession(env, bytes, modelPath); } - internal static unsafe void FetchData(IntPtr data, Span result) + internal static unsafe void FetchData(IntPtr data, T[] result) { - var dataSpan = new Span(data.ToPointer(), result.Length); - dataSpan.CopyTo(result); + var size = result.Length; + + GCHandle handle = GCHandle.Alloc(result, GCHandleType.Pinned); + IntPtr target = handle.AddrOfPinnedObject(); + + Int64 sizeInBytes = size * Marshal.SizeOf((typeof(T))); + Buffer.MemoryCopy(data.ToPointer(), target.ToPointer(), sizeInBytes, sizeInBytes); + handle.Free(); } internal static bool IsTypeSupported(TFDataType tfoutput) diff --git a/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs b/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs index ff65f699e3..8c0a079dd8 100644 --- a/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs +++ b/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs @@ -37,7 +37,7 @@ namespace Microsoft.ML.Transforms { /// - public sealed class TensorFlowTransform : RowToRowTransformerBase + public sealed class TensorFlowTransform : ITransformer, ICanSaveModel { public sealed class Arguments : TransformInputBase { @@ -140,8 +140,10 @@ public sealed class Arguments : TransformInputBase public bool ReTrain = false; } + private readonly IHost _host; private readonly string _savedModelPath; private readonly bool _isTemporarySavedModel; + private const string RegistrationName = "TensorFlowTransform"; internal readonly TFSession Session; internal readonly ColumnType[] OutputTypes; @@ -235,7 +237,7 @@ private static TensorFlowTransform Create(IHostEnvironment env, ModelLoadContext return new TensorFlowTransform(env, TensorFlowUtils.LoadTFSession(env, modelBytes), inputs, outputs, null, false); } - var tempDirPath = Path.GetFullPath(Path.Combine(Path.GetTempPath(), nameof(TensorFlowTransform) + "_" + Guid.NewGuid())); + var tempDirPath = Path.GetFullPath(Path.Combine(Path.GetTempPath(), RegistrationName + "_" + Guid.NewGuid())); TensorFlowUtils.CreateFolderWithAclIfNotExists(env, tempDirPath); try { @@ -283,7 +285,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV } internal TensorFlowTransform(IHostEnvironment env, Arguments args, IDataView input) - : this(env, args, TensorFlowUtils.LoadTensorFlowModel(env, args.ModelLocation), input) + :this(env,args, TensorFlowUtils.LoadTensorFlowModel(env,args.ModelLocation), input) { } @@ -308,49 +310,49 @@ internal TensorFlowTransform(IHostEnvironment env, Arguments args, TensorFlowMod private void CheckTrainingParameters(Arguments args) { - Host.CheckNonWhiteSpace(args.LabelColumn, nameof(args.LabelColumn)); - Host.CheckNonWhiteSpace(args.OptimizationOperation, nameof(args.OptimizationOperation)); + _host.CheckNonWhiteSpace(args.LabelColumn, nameof(args.LabelColumn)); + _host.CheckNonWhiteSpace(args.OptimizationOperation, nameof(args.OptimizationOperation)); if (Session.Graph[args.OptimizationOperation] == null) - throw Host.ExceptParam(nameof(args.OptimizationOperation), $"Optimization operation '{args.OptimizationOperation}' does not exist in the model"); + throw _host.ExceptParam(nameof(args.OptimizationOperation), $"Optimization operation '{args.OptimizationOperation}' does not exist in the model"); - Host.CheckNonWhiteSpace(args.TensorFlowLabel, nameof(args.TensorFlowLabel)); + _host.CheckNonWhiteSpace(args.TensorFlowLabel, nameof(args.TensorFlowLabel)); if (Session.Graph[args.TensorFlowLabel] == null) - throw Host.ExceptParam(nameof(args.TensorFlowLabel), $"'{args.TensorFlowLabel}' does not exist in the model"); + throw _host.ExceptParam(nameof(args.TensorFlowLabel), $"'{args.TensorFlowLabel}' does not exist in the model"); - Host.CheckNonWhiteSpace(args.SaveLocationOperation, nameof(args.SaveLocationOperation)); + _host.CheckNonWhiteSpace(args.SaveLocationOperation, nameof(args.SaveLocationOperation)); if (Session.Graph[args.SaveLocationOperation] == null) - throw Host.ExceptParam(nameof(args.SaveLocationOperation), $"'{args.SaveLocationOperation}' does not exist in the model"); + throw _host.ExceptParam(nameof(args.SaveLocationOperation), $"'{args.SaveLocationOperation}' does not exist in the model"); - Host.CheckNonWhiteSpace(args.SaveOperation, nameof(args.SaveOperation)); + _host.CheckNonWhiteSpace(args.SaveOperation, nameof(args.SaveOperation)); if (Session.Graph[args.SaveOperation] == null) - throw Host.ExceptParam(nameof(args.SaveOperation), $"'{args.SaveOperation}' does not exist in the model"); + throw _host.ExceptParam(nameof(args.SaveOperation), $"'{args.SaveOperation}' does not exist in the model"); if (args.LossOperation != null) { - Host.CheckNonWhiteSpace(args.LossOperation, nameof(args.LossOperation)); + _host.CheckNonWhiteSpace(args.LossOperation, nameof(args.LossOperation)); if (Session.Graph[args.LossOperation] == null) - throw Host.ExceptParam(nameof(args.LossOperation), $"'{args.LossOperation}' does not exist in the model"); + throw _host.ExceptParam(nameof(args.LossOperation), $"'{args.LossOperation}' does not exist in the model"); } if (args.MetricOperation != null) { - Host.CheckNonWhiteSpace(args.MetricOperation, nameof(args.MetricOperation)); + _host.CheckNonWhiteSpace(args.MetricOperation, nameof(args.MetricOperation)); if (Session.Graph[args.MetricOperation] == null) - throw Host.ExceptParam(nameof(args.MetricOperation), $"'{args.MetricOperation}' does not exist in the model"); + throw _host.ExceptParam(nameof(args.MetricOperation), $"'{args.MetricOperation}' does not exist in the model"); } if (args.LearningRateOperation != null) { - Host.CheckNonWhiteSpace(args.LearningRateOperation, nameof(args.LearningRateOperation)); + _host.CheckNonWhiteSpace(args.LearningRateOperation, nameof(args.LearningRateOperation)); if (Session.Graph[args.LearningRateOperation] == null) - throw Host.ExceptParam(nameof(args.LearningRateOperation), $"'{args.LearningRateOperation}' does not exist in the model"); + throw _host.ExceptParam(nameof(args.LearningRateOperation), $"'{args.LearningRateOperation}' does not exist in the model"); } } private (int, bool, TFDataType, TFShape) GetTrainingInputInfo(ISchema inputSchema, string columnName, string tfNodeName, int batchSize) { if (!inputSchema.TryGetColumnIndex(columnName, out int inputColIndex)) - throw Host.Except($"Column {columnName} doesn't exist"); + throw _host.Except($"Column {columnName} doesn't exist"); var type = inputSchema.GetColumnType(inputColIndex); var isInputVector = type.IsVector; @@ -370,7 +372,7 @@ private void CheckTrainingParameters(Arguments args) var expectedType = TensorFlowUtils.Tf2MlNetType(tfInputType); if (type.ItemType != expectedType) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", columnName, expectedType.ToString(), type.ToString()); + throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", columnName, expectedType.ToString(), type.ToString()); return (inputColIndex, isInputVector, tfInputType, tfInputShape); } @@ -416,8 +418,8 @@ private void TrainCore(Arguments args, IDataView input) float loss = 0; float metric = 0; bool isDataLeft = false; - using (var ch = Host.Start("Training TensorFlow model...")) - using (var pch = Host.StartProgressChannel("TensorFlow training progress...")) + using (var ch = _host.Start("Training TensorFlow model...")) + using (var pch = _host.StartProgressChannel("TensorFlow training progress...")) { pch.SetHeader(new ProgressHeader(new[] { "Loss", "Metric" }, new[] { "Epoch" }), (e) => e.SetProgress(0, epoch, args.Epoch)); @@ -531,11 +533,11 @@ private void UpdateModelOnDisk(string modelDir, Arguments args) } if (tmpParamDir != null && tmpParamDir.Length > 0) - TensorFlowUtils.DeleteFolderWithRetries(Host, tmpParamDir[0]); + TensorFlowUtils.DeleteFolderWithRetries(_host, tmpParamDir[0]); } catch (Exception e) { - throw Host.ExceptIO(e, "Error serializing TensorFlow retrained model to disk."); + throw _host.ExceptIO(e, "Error serializing TensorFlow retrained model to disk."); } } @@ -600,13 +602,13 @@ private static void GetModelInfo(IHostEnvironment env, ModelLoadContext ctx, out outputs[j] = ctx.LoadNonEmptyString(); } - internal TensorFlowTransform(IHostEnvironment env, TFSession session, string[] inputs, string[] outputs, string savedModelPath, bool isTemporarySavedModel) : - base(Contracts.CheckRef(env, nameof(env)).Register(nameof(TensorFlowTransform))) - + internal TensorFlowTransform(IHostEnvironment env, TFSession session, string[] inputs, string[] outputs, string savedModelPath, bool isTemporarySavedModel) { - Host.CheckValue(session, nameof(session)); - Host.CheckNonEmpty(inputs, nameof(inputs)); - Host.CheckNonEmpty(outputs, nameof(outputs)); + Contracts.CheckValue(env, nameof(env)); + _host = env.Register(nameof(RegistrationName)); + _host.CheckValue(session, nameof(session)); + _host.CheckNonEmpty(inputs, nameof(inputs)); + _host.CheckNonEmpty(outputs, nameof(outputs)); Session = session; _savedModelPath = savedModelPath; @@ -614,8 +616,8 @@ internal TensorFlowTransform(IHostEnvironment env, TFSession session, string[] i Inputs = inputs; Outputs = outputs; - (TFInputTypes, TFInputShapes) = GetInputInfo(Host, Session, Inputs); - (TFOutputTypes, OutputTypes) = GetOutputInfo(Host, Session, Outputs); + (TFInputTypes, TFInputShapes) = GetInputInfo(_host, Session, Inputs); + (TFOutputTypes, OutputTypes) = GetOutputInfo(_host, Session, Outputs); } internal static (TFDataType[] tfInputTypes, TFShape[] tfInputShapes) GetInputInfo(IHost host, TFSession session, string[] inputs) @@ -678,11 +680,30 @@ internal static (TFDataType[] tfOutputTypes, ColumnType[] outputTypes) GetOutput return (tfOutputTypes, outputTypes); } - protected override IRowMapper MakeRowMapper(Schema inputSchema) => new Mapper(this, inputSchema); + public Schema GetOutputSchema(Schema inputSchema) + { + _host.CheckValue(inputSchema, nameof(inputSchema)); + foreach (var input in Inputs) + { + if (!inputSchema.TryGetColumnIndex(input, out int srcCol)) + throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", input); + } + return Transform(new EmptyDataView(_host, inputSchema)).Schema; + } + + private IRowMapper MakeRowMapper(Schema schema) => new Mapper(_host, this, schema); - public override void Save(ModelSaveContext ctx) + private RowToRowMapperTransform MakeDataTransform(IDataView input) { - Host.AssertValue(ctx); + _host.CheckValue(input, nameof(input)); + return new RowToRowMapperTransform(_host, input, MakeRowMapper(input.Schema), MakeRowMapper); + } + + public IDataView Transform(IDataView input) => MakeDataTransform(input); + + public void Save(ModelSaveContext ctx) + { + _host.AssertValue(ctx); ctx.CheckAtModel(); ctx.SetVersionInfo(GetVersionInfo()); @@ -730,17 +751,17 @@ public override void Save(ModelSaveContext ctx) long fileLength = fs.Length; w.Write(fileLength); long actualWritten = fs.CopyRange(w.BaseStream, fileLength); - Host.Assert(actualWritten == fileLength); + _host.Assert(actualWritten == fileLength); } } }); } - Host.AssertNonEmpty(Inputs); + _host.AssertNonEmpty(Inputs); ctx.Writer.Write(Inputs.Length); foreach (var colName in Inputs) ctx.SaveNonEmptyString(colName); - Host.AssertNonEmpty(Outputs); + _host.AssertNonEmpty(Outputs); ctx.Writer.Write(Outputs.Length); foreach (var colName in Outputs) ctx.SaveNonEmptyString(colName); @@ -769,42 +790,54 @@ private void Dispose(bool disposing) { if (!string.IsNullOrEmpty(_savedModelPath) && _isTemporarySavedModel) { - TensorFlowUtils.DeleteFolderWithRetries(Host, _savedModelPath); + TensorFlowUtils.DeleteFolderWithRetries(_host, _savedModelPath); } } } + public bool IsRowToRowMapper => true; + + public IRowToRowMapper GetRowToRowMapper(Schema inputSchema) + { + _host.CheckValue(inputSchema, nameof(inputSchema)); + return MakeDataTransform(new EmptyDataView(_host, inputSchema)); + } - private sealed class Mapper : MapperBase + private sealed class Mapper : IRowMapper { + private readonly IHost _host; + private readonly ISchema _schema; private readonly TensorFlowTransform _parent; private readonly int[] _inputColIndices; private readonly bool[] _isInputVector; private readonly TFShape[] _fullySpecifiedShapes; - public Mapper(TensorFlowTransform parent, Schema inputSchema) : - base(Contracts.CheckRef(parent, nameof(parent)).Host.Register(nameof(Mapper)), inputSchema) + public Mapper(IHostEnvironment env, TensorFlowTransform parent, ISchema inputSchema) { - Host.CheckValue(parent, nameof(parent)); + Contracts.CheckValue(env, nameof(env)); + _host = env.Register(nameof(Mapper)); + _host.CheckValue(inputSchema, nameof(inputSchema)); + _host.CheckValue(parent, nameof(parent)); _parent = parent; + _schema = inputSchema; _inputColIndices = new int[_parent.Inputs.Length]; _isInputVector = new bool[_parent.Inputs.Length]; _fullySpecifiedShapes = new TFShape[_parent.Inputs.Length]; for (int i = 0; i < _parent.Inputs.Length; i++) { if (!inputSchema.TryGetColumnIndex(_parent.Inputs[i], out _inputColIndices[i])) - throw Host.Except($"Column {_parent.Inputs[i]} doesn't exist"); + throw _host.Except($"Column {_parent.Inputs[i]} doesn't exist"); var type = inputSchema.GetColumnType(_inputColIndices[i]); if (type is VectorType vecType && vecType.Size == 0) - throw Host.Except("Variable length input columns not supported"); + throw _host.Except("Variable length input columns not supported"); _isInputVector[i] = type is VectorType; if (!_isInputVector[i]) // Temporary pending fix of issue #1542. In its current state, the below code would fail anyway with a naked exception if this check was not here. - throw Host.Except("Non-vector columns not supported"); + throw _host.Except("Non-vector columns not supported"); vecType = (VectorType)type; var expectedType = TensorFlowUtils.Tf2MlNetType(_parent.TFInputTypes[i]); if (type.ItemType != expectedType) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.Inputs[i], expectedType.ToString(), type.ToString()); + throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.Inputs[i], expectedType.ToString(), type.ToString()); var originalShape = _parent.TFInputShapes[i]; var shape = originalShape.ToIntArray(); @@ -847,7 +880,10 @@ public Mapper(TensorFlowTransform parent, Schema inputSchema) : } } - public override void Save(ModelSaveContext ctx) => _parent.Save(ctx); + public void Save(ModelSaveContext ctx) + { + _parent.Save(ctx); + } private class OutputCache { @@ -860,23 +896,30 @@ public OutputCache() } } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + private Delegate[] MakeGetters(IRow input, Func activeOutput) { - disposer = null; - Host.AssertValue(input); + _host.AssertValue(input); var outputCache = new OutputCache(); var activeOutputColNames = _parent.Outputs.Where((x, i) => activeOutput(i)).ToArray(); - var type = TFTensor.TypeFromTensorType(_parent.TFOutputTypes[iinfo]); - Host.Assert(type == _parent.OutputTypes[iinfo].ItemType.RawType); - var srcTensorGetters = GetTensorValueGetters(input, _inputColIndices, _isInputVector, _parent.TFInputTypes, _fullySpecifiedShapes); - return Utils.MarshalInvoke(MakeGetter, type, input, iinfo, srcTensorGetters, activeOutputColNames, outputCache); + var valueGetters = new Delegate[_parent.Outputs.Length]; + for (int i = 0; i < _parent.Outputs.Length; i++) + { + if (activeOutput(i)) + { + var type = TFTensor.TypeFromTensorType(_parent.TFOutputTypes[i]); + _host.Assert(type == _parent.OutputTypes[i].ItemType.RawType); + var srcTensorGetters = GetTensorValueGetters(input, _inputColIndices, _isInputVector, _parent.TFInputTypes, _fullySpecifiedShapes); + valueGetters[i] = Utils.MarshalInvoke(MakeGetter, type, input, i, srcTensorGetters, activeOutputColNames, outputCache); + } + } + return valueGetters; } private Delegate MakeGetter(IRow input, int iinfo, ITensorValueGetter[] srcTensorGetters, string[] activeOutputColNames, OutputCache outputCache) { - Host.AssertValue(input); + _host.AssertValue(input); ValueGetter> valuegetter = (ref VBuffer dst) => { UpdateCacheIfNeeded(input.Position, srcTensorGetters, activeOutputColNames, outputCache); @@ -884,9 +927,12 @@ private Delegate MakeGetter(IRow input, int iinfo, ITensorValueGetter[] srcTe var tensor = outputCache.Outputs[_parent.Outputs[iinfo]]; var tensorSize = tensor.Shape.Where(x => x > 0).Aggregate((x, y) => x * y); - var editor = VBufferEditor.Create(ref dst, (int)tensorSize); - TensorFlowUtils.FetchData(tensor.Data, editor.Values); - dst = editor.Commit(); + var values = dst.Values; + if (Utils.Size(values) < tensorSize) + values = new T[tensorSize]; + + TensorFlowUtils.FetchData(tensor.Data, values); + dst = new VBuffer(values.Length, values, dst.Indices); }; return valuegetter; } @@ -912,12 +958,21 @@ private void UpdateCacheIfNeeded(long position, ITensorValueGetter[] srcTensorGe } } - public override Func GetDependencies(Func activeOutput) + public Delegate[] CreateGetters(IRow input, Func activeOutput, out Action disposer) + { + disposer = null; + using (var ch = _host.Start("CreateGetters")) + { + return MakeGetters(input, activeOutput); + } + } + + public Func GetDependencies(Func activeOutput) { return col => Enumerable.Range(0, _parent.Outputs.Length).Any(i => activeOutput(i)) && _inputColIndices.Any(i => i == col); } - protected override Schema.Column[] GetOutputColumnsCore() + public Schema.Column[] GetOutputColumns() { var info = new Schema.Column[_parent.Outputs.Length]; for (int i = 0; i < _parent.Outputs.Length; i++) @@ -1003,7 +1058,7 @@ private class TensorValueGetterVec : ITensorValueGetter private readonly ValueGetter> _srcgetter; private readonly TFShape _tfShape; private VBuffer _vBuffer; - private T[] _denseData; + private VBuffer _vBufferDense; private readonly T[] _bufferedData; private int _position; @@ -1012,7 +1067,7 @@ public TensorValueGetterVec(IRow input, int colIndex, TFShape tfShape) _srcgetter = input.GetGetter>(colIndex); _tfShape = tfShape; _vBuffer = default; - _denseData = default; + _vBufferDense = default; long size = 0; _position = 0; @@ -1028,11 +1083,8 @@ public TensorValueGetterVec(IRow input, int colIndex, TFShape tfShape) public TFTensor GetTensor() { _srcgetter(ref _vBuffer); - - Utils.EnsureSize(ref _denseData, _vBuffer.Length, keepOld: false); - _vBuffer.CopyTo(_denseData); - - return TFTensor.Create(_denseData, _vBuffer.Length, _tfShape); + _vBuffer.CopyToDense(ref _vBufferDense); + return TFTensor.Create(_vBufferDense.Values, _vBufferDense.Length, _tfShape); } public void BufferTrainingData() @@ -1061,17 +1113,17 @@ public sealed class TensorFlowEstimator : IEstimator private TensorFlowTransform _transformer; public TensorFlowEstimator(IHostEnvironment env, string modelLocation, string[] inputs, string[] outputs) - : this(env, TensorFlowUtils.LoadTensorFlowModel(env, modelLocation), inputs, outputs) + :this(env, TensorFlowUtils.LoadTensorFlowModel(env,modelLocation), inputs, outputs) { } public TensorFlowEstimator(IHostEnvironment env, TensorFlowModelInfo tensorFlowModel, string[] inputs, string[] outputs) - : this(env, CreateArguments(tensorFlowModel, inputs, outputs), tensorFlowModel) + :this(env, CreateArguments(tensorFlowModel,inputs, outputs), tensorFlowModel) { } public TensorFlowEstimator(IHostEnvironment env, TensorFlowTransform.Arguments args) - : this(env, args, TensorFlowUtils.LoadTensorFlowModel(env, args.ModelLocation)) + :this(env, args, TensorFlowUtils.LoadTensorFlowModel(env, args.ModelLocation)) { } diff --git a/src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs b/src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs index c60717bce1..a2b85313d6 100644 --- a/src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs +++ b/src/Microsoft.ML.TimeSeries/AdaptiveSingularSpectrumSequenceModeler.cs @@ -14,7 +14,7 @@ using Microsoft.ML.Runtime.Model; using Microsoft.ML.Runtime.TimeSeriesProcessing; -[assembly: LoadableClass(typeof(AdaptiveSingularSpectrumSequenceModeler), typeof(AdaptiveSingularSpectrumSequenceModeler), null, typeof(SignatureLoadModel), +[assembly: LoadableClass(typeof(ISequenceModeler), typeof(AdaptiveSingularSpectrumSequenceModeler), null, typeof(SignatureLoadModel), "SSA Sequence Modeler", AdaptiveSingularSpectrumSequenceModeler.LoaderSignature)] @@ -24,7 +24,7 @@ namespace Microsoft.ML.Runtime.TimeSeriesProcessing /// This class implements basic Singular Spectrum Analysis (SSA) model for modeling univariate time-series. /// For the details of the model, refer to http://arxiv.org/pdf/1206.6910.pdf. ///
- public sealed class AdaptiveSingularSpectrumSequenceModeler : SequenceModelerBase + public sealed class AdaptiveSingularSpectrumSequenceModeler : ISequenceModeler { public const string LoaderSignature = "SSAModel"; @@ -239,6 +239,7 @@ private static VersionInfo GetVersionInfo() /// The length of series that is kept in buffer for modeling (parameter N). /// The length of the window on the series for building the trajectory matrix (parameter L). /// The discount factor in [0,1] used for online updates (default = 1). + /// The buffer used to keep the series in the memory. If null, an internal buffer is created (default = null). /// The rank selection method (default = Exact). /// The desired rank of the subspace used for SSA projection (parameter r). This parameter should be in the range in [1, windowSize]. /// If set to null, the rank is automatically determined based on prediction error minimization. (default = null) @@ -248,9 +249,8 @@ private static VersionInfo GetVersionInfo() /// The flag determining whether the meta information for the model needs to be maintained. /// The maximum growth on the exponential trend public AdaptiveSingularSpectrumSequenceModeler(IHostEnvironment env, int trainSize, int seriesLength, int windowSize, Single discountFactor = 1, - RankSelectionMethod rankSelectionMethod = RankSelectionMethod.Exact, int? rank = null, int? maxRank = null, + FixedSizeQueue buffer = null, RankSelectionMethod rankSelectionMethod = RankSelectionMethod.Exact, int? rank = null, int? maxRank = null, bool shouldComputeForecastIntervals = true, bool shouldstablize = true, bool shouldMaintainInfo = false, GrowthRatio? maxGrowth = null) - : base() { Contracts.CheckValue(env, nameof(env)); _host = env.Register(LoaderSignature); @@ -285,7 +285,10 @@ public AdaptiveSingularSpectrumSequenceModeler(IHostEnvironment env, int trainSi _trainSize = trainSize; _discountFactor = discountFactor; - _buffer = new FixedSizeQueue(seriesLength); + if (buffer == null) + _buffer = new FixedSizeQueue(seriesLength); + else + _buffer = buffer; _alpha = new Single[windowSize - 1]; _state = new Single[windowSize - 1]; @@ -309,7 +312,7 @@ public AdaptiveSingularSpectrumSequenceModeler(IHostEnvironment env, int trainSi } /// - /// The copy constructor. + /// The copy constructor /// /// An object whose contents are copied to the current object. private AdaptiveSingularSpectrumSequenceModeler(AdaptiveSingularSpectrumSequenceModeler model) @@ -462,7 +465,7 @@ public AdaptiveSingularSpectrumSequenceModeler(IHostEnvironment env, ModelLoadCo _xSmooth = new CpuAlignedVector(_windowSize, SseUtils.CbAlign); } - public override void Save(ModelSaveContext ctx) + public void Save(ModelSaveContext ctx) { _host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(); @@ -738,7 +741,7 @@ private static int DetermineSignalRank(Single[] series, TrajectoryMatrix tMat, S return minIndex + 1; } - internal override void InitState() + public void InitState() { for (int i = 0; i < _windowSize - 2; ++i) _state[i] = 0; @@ -1111,7 +1114,7 @@ private bool Stabilize() ///
/// The next observation on the series. /// Determines whether the model parameters also need to be updated upon consuming the new observation (default = false). - internal override void Consume(ref Single input, bool updateModel = false) + public void Consume(ref Single input, bool updateModel = false) { if (Single.IsNaN(input)) return; @@ -1174,7 +1177,7 @@ internal override void Consume(ref Single input, bool updateModel = false) /// Train the model parameters based on a training series. ///
/// The training time-series. - internal override void Train(FixedSizeQueue data) + public void Train(FixedSizeQueue data) { _host.CheckParam(data != null, nameof(data), "The input series for training cannot be null."); _host.CheckParam(data.Count >= _trainSize, nameof(data), "The input series for training does not have enough points for training."); @@ -1215,7 +1218,7 @@ internal override void Train(FixedSizeQueue data) /// Train the model parameters based on a training series. ///
/// The training time-series. - internal override void Train(RoleMappedData data) + public void Train(RoleMappedData data) { _host.CheckParam(data != null, nameof(data), "The input series for training cannot be null."); if (data.Schema.Feature.Type != NumberType.Float) @@ -1425,7 +1428,7 @@ private void TrainCore(Single[] dataArray, int originalSeriesLength) ///
/// The forecast result. /// The forecast horizon. - internal override void Forecast(ref ForecastResultBase result, int horizon = 1) + public void Forecast(ref ForecastResultBase result, int horizon = 1) { _host.CheckParam(horizon >= 1, nameof(horizon), "The horizon parameter should be greater than 0."); if (result == null) @@ -1436,36 +1439,41 @@ internal override void Forecast(ref ForecastResultBase result, int horiz var output = result as SsaForecastResult; - var resEditor = VBufferEditor.Create(ref result.PointForecast, horizon); + var res = result.PointForecast.Values; + if (Utils.Size(res) < horizon) + res = new Single[horizon]; int i; int j; int k; // Computing the point forecasts - resEditor.Values[0] = _nextPrediction; + res[0] = _nextPrediction; for (i = 1; i < horizon; ++i) { k = 0; - resEditor.Values[i] = _autoregressionNoiseMean + _observationNoiseMean; + res[i] = _autoregressionNoiseMean + _observationNoiseMean; for (j = i; j < _windowSize - 1; ++j, ++k) - resEditor.Values[i] += _state[j] * _alpha[k]; + res[i] += _state[j] * _alpha[k]; for (j = Math.Max(0, i - _windowSize + 1); j < i; ++j, ++k) - resEditor.Values[i] += resEditor.Values[j] * _alpha[k]; + res[i] += res[j] * _alpha[k]; } // Computing the forecast variances if (ShouldComputeForecastIntervals) { - var sdEditor = VBufferEditor.Create(ref output.ForecastStandardDeviation, horizon); + var sd = output.ForecastStandardDeviation.Values; + if (Utils.Size(sd) < horizon) + sd = new Single[horizon]; + var lastCol = new FixedSizeQueue(_windowSize - 1); for (i = 0; i < _windowSize - 3; ++i) lastCol.AddLast(0); lastCol.AddLast(1); lastCol.AddLast(_alpha[_windowSize - 2]); - sdEditor.Values[0] = _autoregressionNoiseVariance + _observationNoiseVariance; + sd[0] = _autoregressionNoiseVariance + _observationNoiseVariance; for (i = 1; i < horizon; ++i) { @@ -1474,16 +1482,16 @@ internal override void Forecast(ref ForecastResultBase result, int horiz temp += _alpha[j] * lastCol[j]; lastCol.AddLast(temp); - sdEditor.Values[i] = sdEditor.Values[i - 1] + _autoregressionNoiseVariance * temp * temp; + sd[i] = sd[i - 1] + _autoregressionNoiseVariance * temp * temp; } for (i = 0; i < horizon; ++i) - sdEditor.Values[i] = (float)Math.Sqrt(sdEditor.Values[i]); + sd[i] = (float)Math.Sqrt(sd[i]); - output.ForecastStandardDeviation = sdEditor.Commit(); + output.ForecastStandardDeviation = new VBuffer(horizon, sd, output.ForecastStandardDeviation.Indices); } - result.PointForecast = resEditor.Commit(); + result.PointForecast = new VBuffer(horizon, res, result.PointForecast.Indices); output.CanComputeForecastIntervals = ShouldComputeForecastIntervals; output.BoundOffset = 0; } @@ -1492,12 +1500,12 @@ internal override void Forecast(ref ForecastResultBase result, int horiz /// Predicts the next value on the series. ///
/// The prediction result. - internal override void PredictNext(ref Single output) + public void PredictNext(ref Single output) { output = _nextPrediction; } - internal override SequenceModelerBase Clone() + public ISequenceModeler Clone() { return new AdaptiveSingularSpectrumSequenceModeler(this); } @@ -1513,30 +1521,35 @@ public static void ComputeForecastIntervals(ref SsaForecastResult forecast, Sing Contracts.CheckValue(forecast, nameof(forecast)); Contracts.Check(forecast.CanComputeForecastIntervals, "The forecast intervals cannot be computed for this forecast object."); - var meanForecast = forecast.PointForecast.GetValues(); - var horizon = meanForecast.Length; - var sdForecast = forecast.ForecastStandardDeviation.GetValues(); - Contracts.Check(sdForecast.Length >= horizon, "The forecast standard deviation values are not available."); + var horizon = Utils.Size(forecast.PointForecast.Values); + Contracts.Check(Utils.Size(forecast.ForecastStandardDeviation.Values) >= horizon, "The forecast standard deviation values are not available."); forecast.ConfidenceLevel = confidenceLevel; if (horizon == 0) return; - var upper = VBufferEditor.Create(ref forecast.UpperBound, horizon); - var lower = VBufferEditor.Create(ref forecast.LowerBound, horizon); + var upper = forecast.UpperBound.Values; + if (Utils.Size(upper) < horizon) + upper = new Single[horizon]; + + var lower = forecast.LowerBound.Values; + if (Utils.Size(lower) < horizon) + lower = new Single[horizon]; var z = ProbabilityFunctions.Probit(0.5 + confidenceLevel / 2.0); + var meanForecast = forecast.PointForecast.Values; + var sdForecast = forecast.ForecastStandardDeviation.Values; double temp; for (int i = 0; i < horizon; ++i) { temp = z * sdForecast[i]; - upper.Values[i] = (Single)(meanForecast[i] + forecast.BoundOffset + temp); - lower.Values[i] = (Single)(meanForecast[i] + forecast.BoundOffset - temp); + upper[i] = (Single)(meanForecast[i] + forecast.BoundOffset + temp); + lower[i] = (Single)(meanForecast[i] + forecast.BoundOffset - temp); } - forecast.UpperBound = upper.Commit(); - forecast.LowerBound = lower.Commit(); + forecast.UpperBound = new VBuffer(horizon, upper, forecast.UpperBound.Indices); + forecast.LowerBound = new VBuffer(horizon, lower, forecast.LowerBound.Indices); } } } diff --git a/src/Microsoft.ML.TimeSeries/ExponentialAverageTransform.cs b/src/Microsoft.ML.TimeSeries/ExponentialAverageTransform.cs index 8a1807a797..a6a7c20986 100644 --- a/src/Microsoft.ML.TimeSeries/ExponentialAverageTransform.cs +++ b/src/Microsoft.ML.TimeSeries/ExponentialAverageTransform.cs @@ -109,12 +109,12 @@ public State() _firstIteration = true; } - private protected override void SetNaOutput(ref Single output) + protected override void SetNaOutput(ref Single output) { output = Single.NaN; } - private protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref Single output) + protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref Single output) { if (_firstIteration) { @@ -127,13 +127,13 @@ private protected override void TransformCore(ref Single input, FixedSizeQueue data) + protected override void LearnStateFromDataCore(FixedSizeQueue data) { // This method is empty because there is no need for parameter learning from the initial windowed buffer for this transform. } diff --git a/src/Microsoft.ML.TimeSeries/SequenceModelerBase.cs b/src/Microsoft.ML.TimeSeries/ISequenceModeler.cs similarity index 75% rename from src/Microsoft.ML.TimeSeries/SequenceModelerBase.cs rename to src/Microsoft.ML.TimeSeries/ISequenceModeler.cs index 5b7b86d93f..5ee0c01711 100644 --- a/src/Microsoft.ML.TimeSeries/SequenceModelerBase.cs +++ b/src/Microsoft.ML.TimeSeries/ISequenceModeler.cs @@ -22,59 +22,50 @@ public abstract class ForecastResultBase ///
/// The type of the elements in the input sequence /// The type of the elements in the output sequence - public abstract class SequenceModelerBase : ICanSaveModel + public interface ISequenceModeler : ICanSaveModel { - private protected SequenceModelerBase() - { - } - /// /// Initializes the state of the modeler /// - internal abstract void InitState(); + void InitState(); /// /// Consumes one element from the input sequence. /// /// An element in the sequence /// determines whether the sequence model should be updated according to the input - internal abstract void Consume(ref TInput input, bool updateModel = false); + void Consume(ref TInput input, bool updateModel = false); /// /// Trains the sequence model on a given sequence. /// /// The input sequence used for training - internal abstract void Train(FixedSizeQueue data); + void Train(FixedSizeQueue data); /// /// Trains the sequence model on a given sequence. The method accepts an object of RoleMappedData, /// and assumes the input column is the 'Feature' column of type TInput. /// /// The input sequence used for training - internal abstract void Train(RoleMappedData data); + void Train(RoleMappedData data); /// /// Forecasts the next 'horizon' elements in the output sequence. /// /// The forecast result for the given horizon along with optional information depending on the algorithm /// The forecast horizon - internal abstract void Forecast(ref ForecastResultBase result, int horizon = 1); + void Forecast(ref ForecastResultBase result, int horizon = 1); /// /// Predicts the next element in the output sequence. /// /// The output ref parameter the will contain the prediction result - internal abstract void PredictNext(ref TOutput output); + void PredictNext(ref TOutput output); /// /// Creates a clone of the model. /// /// A clone of the object - internal abstract SequenceModelerBase Clone(); - - /// - /// Implementation of . - /// - public abstract void Save(ModelSaveContext ctx); + ISequenceModeler Clone(); } } diff --git a/src/Microsoft.ML.TimeSeries/IidAnomalyDetectionBase.cs b/src/Microsoft.ML.TimeSeries/IidAnomalyDetectionBase.cs index f19694e38d..900407adec 100644 --- a/src/Microsoft.ML.TimeSeries/IidAnomalyDetectionBase.cs +++ b/src/Microsoft.ML.TimeSeries/IidAnomalyDetectionBase.cs @@ -54,17 +54,17 @@ public override void Save(ModelSaveContext ctx) public sealed class State : AnomalyDetectionStateBase { - private protected override void LearnStateFromDataCore(FixedSizeQueue data) + protected override void LearnStateFromDataCore(FixedSizeQueue data) { // This method is empty because there is no need for initial tuning for this transform. } - private protected override void InitializeAnomalyDetector() + protected override void InitializeAnomalyDetector() { // This method is empty because there is no need for any extra initialization for this transform. } - private protected override double ComputeRawAnomalyScore(ref Single input, FixedSizeQueue windowedBuffer, long iteration) + protected override double ComputeRawAnomalyScore(ref Single input, FixedSizeQueue windowedBuffer, long iteration) { // This transform treats the input sequenence as the raw anomaly score. return (double)input; diff --git a/src/Microsoft.ML.TimeSeries/IidChangePointDetector.cs b/src/Microsoft.ML.TimeSeries/IidChangePointDetector.cs index 1fb5b2e62e..5338ae95cf 100644 --- a/src/Microsoft.ML.TimeSeries/IidChangePointDetector.cs +++ b/src/Microsoft.ML.TimeSeries/IidChangePointDetector.cs @@ -188,14 +188,6 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc /// /// Estimator for /// - ///

Example code can be found by searching for IidChangePointDetector in ML.NET.

- /// - /// - /// - /// - /// public sealed class IidChangePointEstimator : TrivialEstimator { /// @@ -208,6 +200,12 @@ public sealed class IidChangePointEstimator : TrivialEstimatorThe length of the sliding window on p-values for computing the martingale score. /// The martingale used for scoring. /// The epsilon parameter for the Power martingale. + ///

Example code can be found by searching for IidChangePointDetector in ML.NET.

+ /// + /// + /// public IidChangePointEstimator(IHostEnvironment env, string inputColumn, string outputColumn, int confidence, int changeHistoryLength, MartingaleType martingale = MartingaleType.Power, double eps = 0.1) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(IidChangePointEstimator)), diff --git a/src/Microsoft.ML.TimeSeries/IidSpikeDetector.cs b/src/Microsoft.ML.TimeSeries/IidSpikeDetector.cs index 9ccb302eb6..ceb3470049 100644 --- a/src/Microsoft.ML.TimeSeries/IidSpikeDetector.cs +++ b/src/Microsoft.ML.TimeSeries/IidSpikeDetector.cs @@ -167,14 +167,6 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc /// /// Estimator for /// - ///

Example code can be found by searching for IidSpikeDetector in ML.NET.

- /// - /// - /// - /// - /// public sealed class IidSpikeEstimator : TrivialEstimator { /// @@ -186,6 +178,12 @@ public sealed class IidSpikeEstimator : TrivialEstimator /// The confidence for spike detection in the range [0, 100]. /// The size of the sliding window for computing the p-value. /// The argument that determines whether to detect positive or negative anomalies, or both. + ///

Example code can be found by searching for IidSpikeDetector in ML.NET.

+ /// + /// + /// public IidSpikeEstimator(IHostEnvironment env, string inputColumn, string outputColumn, int confidence, int pvalueHistoryLength, AnomalySide side = AnomalySide.TwoSided) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(IidSpikeDetector)), new IidSpikeDetector(env, new IidSpikeDetector.Arguments diff --git a/src/Microsoft.ML.TimeSeries/MovingAverageTransform.cs b/src/Microsoft.ML.TimeSeries/MovingAverageTransform.cs index da4094a125..da71c8d5e9 100644 --- a/src/Microsoft.ML.TimeSeries/MovingAverageTransform.cs +++ b/src/Microsoft.ML.TimeSeries/MovingAverageTransform.cs @@ -143,7 +143,7 @@ private static Single ComputeMovingAverageUniformInitialisation(FixedSizeQueue others, Single input, Single[] weights, int lag) + public static Single ComputeMovingAverageNonUniform(FixedSizeQueue others, Single input, Single[] weights, int lag) { Single sumWeights = 0; Single sumValues = 0; @@ -178,7 +178,7 @@ internal static Single ComputeMovingAverageNonUniform(FixedSizeQueue oth /// NaN value: only NaN values in the sliding window or +/- Infinite /// Inifinite value: one infinite value in the sliding window (sign is no relevant) ///
- internal static Single ComputeMovingAverageUniform(FixedSizeQueue others, Single input, int lag, + public static Single ComputeMovingAverageUniform(FixedSizeQueue others, Single input, int lag, Single lastDropped, ref Single currentSum, ref bool initUniformMovingAverage, ref int nbNanValues) @@ -262,7 +262,7 @@ public sealed class State : StateBase // take part of the computation. private int _nbNanValues; - private protected override void SetNaOutput(ref Single output) + protected override void SetNaOutput(ref Single output) { output = Single.NaN; } @@ -274,7 +274,7 @@ private protected override void SetNaOutput(ref Single output) /// /// /// - private protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref Single output) + protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref Single output) { if (_weights == null) output = ComputeMovingAverageUniform(windowedBuffer, input, _lag, _lastDroppedValue, ref _currentSum, ref _initUniformMovingAverage, ref _nbNanValues); @@ -283,14 +283,14 @@ private protected override void TransformCore(ref Single input, FixedSizeQueue data) + protected override void LearnStateFromDataCore(FixedSizeQueue data) { // This method is empty because there is no need for parameter learning from the initial windowed buffer for this transform. } diff --git a/src/Microsoft.ML.TimeSeries/PValueTransform.cs b/src/Microsoft.ML.TimeSeries/PValueTransform.cs index 36e8bebf4b..b6490de3c7 100644 --- a/src/Microsoft.ML.TimeSeries/PValueTransform.cs +++ b/src/Microsoft.ML.TimeSeries/PValueTransform.cs @@ -113,12 +113,12 @@ public sealed class State : StateBase private PValueTransform _parent; - private protected override void SetNaOutput(ref Single dst) + protected override void SetNaOutput(ref Single dst) { dst = Single.NaN; } - private protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref Single dst) + protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref Single dst) { int count; int equalCount; @@ -131,13 +131,13 @@ private protected override void TransformCore(ref Single input, FixedSizeQueue data) + protected override void LearnStateFromDataCore(FixedSizeQueue data) { // This method is empty because there is no need for parameter learning from the initial windowed buffer for this transform. } diff --git a/src/Microsoft.ML.TimeSeries/PercentileThresholdTransform.cs b/src/Microsoft.ML.TimeSeries/PercentileThresholdTransform.cs index 571a1b1bc4..9d771ef21a 100644 --- a/src/Microsoft.ML.TimeSeries/PercentileThresholdTransform.cs +++ b/src/Microsoft.ML.TimeSeries/PercentileThresholdTransform.cs @@ -101,7 +101,7 @@ public override void Save(ModelSaveContext ctx) ctx.Writer.Write(_percentile); } - internal static void CountGreaterOrEqualValues(FixedSizeQueue others, Single theValue, out int greaterVals, out int equalVals, out int totalVals) + public static void CountGreaterOrEqualValues(FixedSizeQueue others, Single theValue, out int greaterVals, out int equalVals, out int totalVals) { // The current linear algorithm for counting greater and equal elements takes O(n), // but it can be improved to O(log n) if a separate Binary Search Tree data structure is used. @@ -130,12 +130,12 @@ public sealed class State : StateBase ///
private PercentileThresholdTransform _parent; - private protected override void SetNaOutput(ref bool dst) + protected override void SetNaOutput(ref bool dst) { dst = false; } - private protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref bool dst) + protected override void TransformCore(ref Single input, FixedSizeQueue windowedBuffer, long iteration, ref bool dst) { int greaterCount; int equalCount; @@ -145,15 +145,15 @@ private protected override void TransformCore(ref Single input, FixedSizeQueue data) + protected override void LearnStateFromDataCore(FixedSizeQueue data) { // This method is empty because there is no need for parameter learning from the initial windowed buffer for this transform. } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.TimeSeries/SequentialAnomalyDetectionTransformBase.cs b/src/Microsoft.ML.TimeSeries/SequentialAnomalyDetectionTransformBase.cs index 5c3f2403ac..e80f41a985 100644 --- a/src/Microsoft.ML.TimeSeries/SequentialAnomalyDetectionTransformBase.cs +++ b/src/Microsoft.ML.TimeSeries/SequentialAnomalyDetectionTransformBase.cs @@ -159,7 +159,7 @@ private static int GetOutputLength(AlertingScore alertingScore, IHostEnvironment } } - private protected SequentialAnomalyDetectionTransformBase(int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, string name, IHostEnvironment env, + protected SequentialAnomalyDetectionTransformBase(int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, string name, IHostEnvironment env, AnomalySide anomalySide, MartingaleType martingale, AlertingScore alertingScore, Double powerMartingaleEpsilon, Double alertThreshold) : base(Contracts.CheckRef(env, nameof(env)).Register(name), windowSize, initialWindowSize, inputColumnName, outputColumnName, new VectorType(NumberType.R8, GetOutputLength(alertingScore, env))) @@ -183,13 +183,13 @@ private protected SequentialAnomalyDetectionTransformBase(int windowSize, int in _outputLength = GetOutputLength(ThresholdScore, Host); } - private protected SequentialAnomalyDetectionTransformBase(ArgumentsBase args, string name, IHostEnvironment env) + protected SequentialAnomalyDetectionTransformBase(ArgumentsBase args, string name, IHostEnvironment env) : this(args.WindowSize, args.InitialWindowSize, args.Source, args.Name, name, env, args.Side, args.Martingale, args.AlertOn, args.PowerMartingaleEpsilon, args.AlertThreshold) { } - private protected SequentialAnomalyDetectionTransformBase(IHostEnvironment env, ModelLoadContext ctx, string name) + protected SequentialAnomalyDetectionTransformBase(IHostEnvironment env, ModelLoadContext ctx, string name) : base(Contracts.CheckRef(env, nameof(env)).Register(name), ctx) { // *** Binary format *** @@ -319,10 +319,8 @@ public abstract class AnomalyDetectionStateBase : StateBase private int _martingaleAlertCounter; - protected Double LatestMartingaleScore => Math.Exp(_logMartingaleValue); - - private protected AnomalyDetectionStateBase() : base() - { + protected Double LatestMartingaleScore { + get { return Math.Exp(_logMartingaleValue); } } private Double ComputeKernelPValue(Double rawScore) @@ -361,78 +359,83 @@ private Double ComputeKernelPValue(Double rawScore) return pValue; } - private protected override void SetNaOutput(ref VBuffer dst) + protected override void SetNaOutput(ref VBuffer dst) { + var values = dst.Values; var outputLength = Parent._outputLength; - var editor = VBufferEditor.Create(ref dst, outputLength); + if (Utils.Size(values) < outputLength) + values = new Double[outputLength]; for (int i = 0; i < outputLength; ++i) - editor.Values[i] = Double.NaN; + values[i] = Double.NaN; - dst = editor.Commit(); + dst = new VBuffer(Utils.Size(values), values, dst.Indices); } - private protected override sealed void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref VBuffer dst) + protected override sealed void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref VBuffer dst) { var outputLength = Parent._outputLength; Host.Assert(outputLength >= 2); - var result = VBufferEditor.Create(ref dst, outputLength); + var result = dst.Values; + if (Utils.Size(result) < outputLength) + result = new Double[outputLength]; + float rawScore = 0; for (int i = 0; i < outputLength; ++i) - result.Values[i] = Double.NaN; + result[i] = Double.NaN; // Step 1: Computing the raw anomaly score - result.Values[1] = ComputeRawAnomalyScore(ref input, windowedBuffer, iteration); + result[1] = ComputeRawAnomalyScore(ref input, windowedBuffer, iteration); - if (Double.IsNaN(result.Values[1])) - result.Values[0] = 0; + if (Double.IsNaN(result[1])) + result[0] = 0; else { if (WindowSize > 0) { // Step 2: Computing the p-value score - rawScore = (float)result.Values[1]; + rawScore = (float)result[1]; if (Parent.ThresholdScore == AlertingScore.RawScore) { switch (Parent.Side) { case AnomalySide.Negative: - rawScore = (float)(-result.Values[1]); + rawScore = (float)(-result[1]); break; case AnomalySide.Positive: break; default: - rawScore = (float)Math.Abs(result.Values[1]); + rawScore = (float)Math.Abs(result[1]); break; } } else { - result.Values[2] = ComputeKernelPValue(rawScore); + result[2] = ComputeKernelPValue(rawScore); switch (Parent.Side) { case AnomalySide.Negative: - result.Values[2] = 1 - result.Values[2]; + result[2] = 1 - result[2]; break; case AnomalySide.Positive: break; default: - result.Values[2] = Math.Min(result.Values[2], 1 - result.Values[2]); + result[2] = Math.Min(result[2], 1 - result[2]); break; } // Keeping the p-value in the safe range - if (result.Values[2] < MinPValue) - result.Values[2] = MinPValue; - else if (result.Values[2] > MaxPValue) - result.Values[2] = MaxPValue; + if (result[2] < MinPValue) + result[2] = MinPValue; + else if (result[2] > MaxPValue) + result[2] = MaxPValue; _rawScoreBuffer.AddLast(rawScore); @@ -443,11 +446,11 @@ private protected override sealed void TransformCore(ref TInput input, FixedSize switch (Parent.Martingale) { case MartingaleType.Power: - martingaleUpdate = Parent.LogPowerMartigaleBettingFunc(result.Values[2], Parent.PowerMartingaleEpsilon); + martingaleUpdate = Parent.LogPowerMartigaleBettingFunc(result[2], Parent.PowerMartingaleEpsilon); break; case MartingaleType.Mixture: - martingaleUpdate = Parent.LogMixtureMartigaleBettingFunc(result.Values[2]); + martingaleUpdate = Parent.LogMixtureMartigaleBettingFunc(result[2]); break; } @@ -464,7 +467,7 @@ private protected override sealed void TransformCore(ref TInput input, FixedSize _logMartingaleUpdateBuffer.AddLast(martingaleUpdate); } - result.Values[3] = Math.Exp(_logMartingaleValue); + result[3] = Math.Exp(_logMartingaleValue); } } } @@ -480,10 +483,10 @@ private protected override sealed void TransformCore(ref TInput input, FixedSize alert = rawScore >= Parent.AlertThreshold; break; case AlertingScore.PValueScore: - alert = result.Values[2] <= Parent.AlertThreshold; + alert = result[2] <= Parent.AlertThreshold; break; case AlertingScore.MartingaleScore: - alert = (Parent.Martingale != MartingaleType.None) && (result.Values[3] >= Parent.AlertThreshold); + alert = (Parent.Martingale != MartingaleType.None) && (result[3] >= Parent.AlertThreshold); if (alert) { @@ -499,13 +502,13 @@ private protected override sealed void TransformCore(ref TInput input, FixedSize } } - result.Values[0] = Convert.ToDouble(alert); + result[0] = Convert.ToDouble(alert); } - dst = result.Commit(); + dst = new VBuffer(outputLength, result, dst.Indices); } - private protected override sealed void InitializeStateCore() + protected override sealed void InitializeStateCore() { Parent = (SequentialAnomalyDetectionTransformBase)ParentTransform; Host.Assert(WindowSize >= 0); @@ -522,7 +525,7 @@ private protected override sealed void InitializeStateCore() /// /// The abstract method that realizes the initialization functionality for the anomaly detector. /// - private protected abstract void InitializeAnomalyDetector(); + protected abstract void InitializeAnomalyDetector(); /// /// The abstract method that realizes the main logic for calculating the raw anomaly score bfor the current input given a windowed buffer @@ -532,7 +535,7 @@ private protected override sealed void InitializeStateCore() /// A long number that indicates the number of times ComputeRawAnomalyScore has been called so far (starting value = 0). /// The raw anomaly score for the input. The Assumption is the higher absolute value of the raw score, the more anomalous the input is. /// The sign of the score determines whether it's a positive anomaly or a negative one. - private protected abstract Double ComputeRawAnomalyScore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration); + protected abstract Double ComputeRawAnomalyScore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration); } protected override IRowMapper MakeRowMapper(ISchema schema) => new Mapper(Host, this, schema); @@ -606,13 +609,13 @@ private Delegate MakeGetter(IRow input, TState state) _host.AssertValue(input); var srcGetter = input.GetGetter(_inputColumnIndex); ProcessData processData = _parent.WindowSize > 0 ? - (ProcessData)state.Process : state.ProcessWithoutBuffer; - ValueGetter> valueGetter = (ref VBuffer dst) => - { - TInput src = default; - srcGetter(ref src); - processData(ref src, ref dst); - }; + (ProcessData) state.Process : state.ProcessWithoutBuffer; + ValueGetter > valueGetter = (ref VBuffer dst) => + { + TInput src = default; + srcGetter(ref src); + processData(ref src, ref dst); + }; return valueGetter; } diff --git a/src/Microsoft.ML.TimeSeries/SequentialTransformBase.cs b/src/Microsoft.ML.TimeSeries/SequentialTransformBase.cs index 0737809cb7..5d6bd8f553 100644 --- a/src/Microsoft.ML.TimeSeries/SequentialTransformBase.cs +++ b/src/Microsoft.ML.TimeSeries/SequentialTransformBase.cs @@ -51,28 +51,28 @@ public abstract class StateBase /// /// A reference to the parent transform that operates on the state object. /// - private protected SequentialTransformBase ParentTransform; + protected SequentialTransformBase ParentTransform; /// /// The internal windowed buffer for buffering the values in the input sequence. /// - private protected FixedSizeQueue WindowedBuffer; + protected FixedSizeQueue WindowedBuffer; /// /// The buffer used to buffer the training data points. /// - private protected FixedSizeQueue InitialWindowedBuffer; + protected FixedSizeQueue InitialWindowedBuffer; - private protected int WindowSize { get; private set; } + protected int WindowSize { get; private set; } - private protected int InitialWindowSize { get; private set; } + protected int InitialWindowSize { get; private set; } /// /// Counts the number of rows observed by the transform so far. /// - private protected int RowCounter { get; private set; } + protected int RowCounter { get; private set; } - private protected int IncrementRowCounter() + protected int IncrementRowCounter() { RowCounter++; return RowCounter; @@ -166,10 +166,10 @@ public void ProcessWithoutBuffer(ref TInput input, ref TOutput output) } /// - /// The abstract method that specifies the NA value for 's type. + /// The abstract method that specifies the NA value for the dst type. /// /// - private protected abstract void SetNaOutput(ref TOutput dst); + protected abstract void SetNaOutput(ref TOutput dst); /// /// The abstract method that realizes the main logic for the transform. @@ -178,18 +178,18 @@ public void ProcessWithoutBuffer(ref TInput input, ref TOutput output) /// A reference to the dst object. /// A reference to the windowed buffer. /// A long number that indicates the number of times TransformCore has been called so far (starting value = 0). - private protected abstract void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref TOutput dst); + protected abstract void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref TOutput dst); /// /// The abstract method that realizes the logic for initializing the state object. /// - private protected abstract void InitializeStateCore(); + protected abstract void InitializeStateCore(); /// /// The abstract method that realizes the logic for learning the parameters and the initial state object from data. /// /// A queue of data points used for training - private protected abstract void LearnStateFromDataCore(FixedSizeQueue data); + protected abstract void LearnStateFromDataCore(FixedSizeQueue data); } /// @@ -242,13 +242,13 @@ private static IDataTransform CreateLambdaTransform(IHost host, IDataView input, /// A reference to the environment variable. /// A reference to the input data view. /// - private protected SequentialTransformBase(int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, + protected SequentialTransformBase(int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, string name, IHostEnvironment env, IDataView input, ColumnType outputColTypeOverride = null) : this(windowSize, initialWindowSize, inputColumnName, outputColumnName, Contracts.CheckRef(env, nameof(env)).Register(name), input, outputColTypeOverride) { } - private protected SequentialTransformBase(int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, + protected SequentialTransformBase(int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, IHost host, IDataView input, ColumnType outputColTypeOverride = null) : base(host, input) { @@ -268,7 +268,7 @@ private protected SequentialTransformBase(int windowSize, int initialWindowSize, _transform = CreateLambdaTransform(Host, input, InputColumnName, OutputColumnName, InitFunction, WindowSize > 0, outputColTypeOverride); } - private protected SequentialTransformBase(IHostEnvironment env, ModelLoadContext ctx, string name, IDataView input) + protected SequentialTransformBase(IHostEnvironment env, ModelLoadContext ctx, string name, IDataView input) : base(env, name, input) { Host.CheckValue(ctx, nameof(ctx)); @@ -343,7 +343,7 @@ private void InitFunction(TState state) state.InitState(WindowSize, InitialWindowSize, this, Host); } - public override bool CanShuffle => false; + public override bool CanShuffle { get { return false; } } protected override bool? ShouldUseParallelCursors(Func predicate) { @@ -357,11 +357,14 @@ protected override IRowCursor GetRowCursorCore(Func predicate, IRando return new Cursor(this, srcCursor); } - public override Schema Schema => _transform.Schema; + public override Schema Schema + { + get { return _transform.Schema; } + } - public override long? GetRowCount() + public override long? GetRowCount(bool lazy = true) { - return _transform.GetRowCount(); + return _transform.GetRowCount(lazy); } public override IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolidator, Func predicate, int n, IRandom rand = null) diff --git a/src/Microsoft.ML.TimeSeries/SequentialTransformerBase.cs b/src/Microsoft.ML.TimeSeries/SequentialTransformerBase.cs index b1a95b916f..5e2b32a81b 100644 --- a/src/Microsoft.ML.TimeSeries/SequentialTransformerBase.cs +++ b/src/Microsoft.ML.TimeSeries/SequentialTransformerBase.cs @@ -29,7 +29,7 @@ public abstract class StateBase { // Ideally this class should be private. However, due to the current constraints with the LambdaTransform, we need to have // access to the state class when inheriting from SequentialTransformerBase. - private protected IHost Host; + protected IHost Host; /// /// A reference to the parent transform that operates on the state object. @@ -39,26 +39,22 @@ public abstract class StateBase /// /// The internal windowed buffer for buffering the values in the input sequence. /// - private protected FixedSizeQueue WindowedBuffer; + protected FixedSizeQueue WindowedBuffer; /// /// The buffer used to buffer the training data points. /// - private protected FixedSizeQueue InitialWindowedBuffer; + protected FixedSizeQueue InitialWindowedBuffer; - private protected int WindowSize { get; private set; } + protected int WindowSize { get; private set; } - private protected int InitialWindowSize { get; private set; } + protected int InitialWindowSize { get; private set; } /// /// Counts the number of rows observed by the transform so far. /// protected long RowCounter { get; private set; } - private protected StateBase() - { - } - protected long IncrementRowCounter() { RowCounter++; @@ -151,7 +147,7 @@ public void ProcessWithoutBuffer(ref TInput input, ref TOutput output) /// The abstract method that specifies the NA value for the dst type. /// /// - private protected abstract void SetNaOutput(ref TOutput dst); + protected abstract void SetNaOutput(ref TOutput dst); /// /// The abstract method that realizes the main logic for the transform. @@ -160,35 +156,35 @@ public void ProcessWithoutBuffer(ref TInput input, ref TOutput output) /// A reference to the dst object. /// A reference to the windowed buffer. /// A long number that indicates the number of times TransformCore has been called so far (starting value = 0). - private protected abstract void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref TOutput dst); + protected abstract void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref TOutput dst); /// /// The abstract method that realizes the logic for initializing the state object. /// - private protected abstract void InitializeStateCore(); + protected abstract void InitializeStateCore(); /// /// The abstract method that realizes the logic for learning the parameters and the initial state object from data. /// /// A queue of data points used for training - private protected abstract void LearnStateFromDataCore(FixedSizeQueue data); + protected abstract void LearnStateFromDataCore(FixedSizeQueue data); } - private protected readonly IHost Host; + protected readonly IHost Host; /// /// The window size for buffering. /// - private protected readonly int WindowSize; + protected readonly int WindowSize; /// /// The number of datapoints from the beginning of the sequence that are used for learning the initial state. /// - private protected int InitialWindowSize; + protected int InitialWindowSize; - internal readonly string InputColumnName; - internal readonly string OutputColumnName; - private protected ColumnType OutputColumnType; + public string InputColumnName; + public string OutputColumnName; + protected ColumnType OutputColumnType; public bool IsRowToRowMapper => false; @@ -201,7 +197,7 @@ public void ProcessWithoutBuffer(ref TInput input, ref TOutput output) /// The name of the input column. /// The name of the dst column. /// - private protected SequentialTransformerBase(IHost host, int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, ColumnType outputColType) + protected SequentialTransformerBase(IHost host, int windowSize, int initialWindowSize, string inputColumnName, string outputColumnName, ColumnType outputColType) { Host = host; Host.CheckParam(initialWindowSize >= 0, nameof(initialWindowSize), "Must be non-negative."); @@ -218,7 +214,7 @@ private protected SequentialTransformerBase(IHost host, int windowSize, int init WindowSize = windowSize; } - private protected SequentialTransformerBase(IHost host, ModelLoadContext ctx) + protected SequentialTransformerBase(IHost host, ModelLoadContext ctx) { Host = host; Host.CheckValue(ctx, nameof(ctx)); @@ -356,9 +352,9 @@ protected override IRowCursor GetRowCursorCore(Func predicate, IRando public override Schema Schema => _bindings.Schema; - public override long? GetRowCount() + public override long? GetRowCount(bool lazy = true) { - return _transform.GetRowCount(); + return _transform.GetRowCount(lazy); } public override IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolidator, Func predicate, int n, IRandom rand = null) diff --git a/src/Microsoft.ML.TimeSeries/SlidingWindowTransformBase.cs b/src/Microsoft.ML.TimeSeries/SlidingWindowTransformBase.cs index 267601dc42..0947d02b25 100644 --- a/src/Microsoft.ML.TimeSeries/SlidingWindowTransformBase.cs +++ b/src/Microsoft.ML.TimeSeries/SlidingWindowTransformBase.cs @@ -72,7 +72,7 @@ protected SlidingWindowTransformBase(Arguments args, string loaderSignature, IHo { Host.Assert(args.WindowSize == 1); throw Host.ExceptUserArg(nameof(args.Lag), - $"If {args.Lag}=0 and {args.WindowSize}=1, the transform just copies the column. Use {ColumnsCopyingTransformer.LoaderSignature} transform instead."); + $"If {args.Lag}=0 and {args.WindowSize}=1, the transform just copies the column. Use {CopyColumnsTransform.LoaderSignature} transform instead."); } Host.CheckUserArg(Enum.IsDefined(typeof(BeginOptions), args.Begin), nameof(args.Begin), "Undefined value."); _lag = args.Lag; @@ -131,11 +131,13 @@ public sealed class StateSlide : StateBase { private SlidingWindowTransformBase _parentSliding; - private protected override void SetNaOutput(ref VBuffer output) + protected override void SetNaOutput(ref VBuffer output) { int size = _parentSliding.WindowSize - _parentSliding._lag + 1; - var result = VBufferEditor.Create(ref output, size); + var result = output.Values; + if (Utils.Size(result) < size) + result = new TInput[size]; TInput value = _parentSliding._nanValue; switch (_parentSliding._begin) @@ -150,35 +152,37 @@ private protected override void SetNaOutput(ref VBuffer output) } for (int i = 0; i < size; ++i) - result.Values[i] = value; - output = result.Commit(); + result[i] = value; + output = new VBuffer(size, result, output.Indices); } - private protected override void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref VBuffer output) + protected override void TransformCore(ref TInput input, FixedSizeQueue windowedBuffer, long iteration, ref VBuffer output) { int size = _parentSliding.WindowSize - _parentSliding._lag + 1; - var result = VBufferEditor.Create(ref output, size); + var result = output.Values; + if (Utils.Size(result) < size) + result = new TInput[size]; if (_parentSliding._lag == 0) { for (int i = 0; i < _parentSliding.WindowSize; ++i) - result.Values[i] = windowedBuffer[i]; - result.Values[_parentSliding.WindowSize] = input; + result[i] = windowedBuffer[i]; + result[_parentSliding.WindowSize] = input; } else { for (int i = 0; i < size; ++i) - result.Values[i] = windowedBuffer[i]; + result[i] = windowedBuffer[i]; } - output = result.Commit(); + output = new VBuffer(size, result, output.Indices); } - private protected override void InitializeStateCore() + protected override void InitializeStateCore() { _parentSliding = (SlidingWindowTransformBase)base.ParentTransform; } - private protected override void LearnStateFromDataCore(FixedSizeQueue data) + protected override void LearnStateFromDataCore(FixedSizeQueue data) { // This method is empty because there is no need for parameter learning from the initial windowed buffer for this transform. } diff --git a/src/Microsoft.ML.TimeSeries/SsaAnomalyDetectionBase.cs b/src/Microsoft.ML.TimeSeries/SsaAnomalyDetectionBase.cs index b5a5cd9d16..86d422e484 100644 --- a/src/Microsoft.ML.TimeSeries/SsaAnomalyDetectionBase.cs +++ b/src/Microsoft.ML.TimeSeries/SsaAnomalyDetectionBase.cs @@ -104,7 +104,7 @@ public abstract class SsaArguments : ArgumentsBase protected readonly bool IsAdaptive; protected readonly ErrorFunctionUtils.ErrorFunction ErrorFunction; protected readonly Func ErrorFunc; - protected readonly SequenceModelerBase Model; + protected readonly ISequenceModeler Model; public SsaAnomalyDetectionBase(SsaArguments args, string name, IHostEnvironment env) : base(args.WindowSize, 0, args.Source, args.Name, name, env, args.Side, args.Martingale, args.AlertOn, args.PowerMartingaleEpsilon, args.AlertThreshold) @@ -120,7 +120,7 @@ public SsaAnomalyDetectionBase(SsaArguments args, string name, IHostEnvironment IsAdaptive = args.IsAdaptive; // Creating the master SSA model Model = new AdaptiveSingularSpectrumSequenceModeler(Host, args.InitialWindowSize, SeasonalWindowSize + 1, SeasonalWindowSize, - DiscountFactor, AdaptiveSingularSpectrumSequenceModeler.RankSelectionMethod.Exact, null, SeasonalWindowSize / 2, false, false); + DiscountFactor, null, AdaptiveSingularSpectrumSequenceModeler.RankSelectionMethod.Exact, null, SeasonalWindowSize / 2, false, false); } public SsaAnomalyDetectionBase(IHostEnvironment env, ModelLoadContext ctx, string name) @@ -150,7 +150,7 @@ public SsaAnomalyDetectionBase(IHostEnvironment env, ModelLoadContext ctx, strin IsAdaptive = ctx.Reader.ReadBoolean(); - ctx.LoadModel, SignatureLoadModel>(env, out Model, "SSA"); + ctx.LoadModel, SignatureLoadModel>(env, out Model, "SSA"); Host.CheckDecode(Model != null); } @@ -197,21 +197,21 @@ public override void Save(ModelSaveContext ctx) public sealed class State : AnomalyDetectionStateBase { - private SequenceModelerBase _model; + private ISequenceModeler _model; private SsaAnomalyDetectionBase _parentAnomalyDetector; - private protected override void LearnStateFromDataCore(FixedSizeQueue data) + protected override void LearnStateFromDataCore(FixedSizeQueue data) { // This method is empty because there is no need to implement a training logic here. } - private protected override void InitializeAnomalyDetector() + protected override void InitializeAnomalyDetector() { _parentAnomalyDetector = (SsaAnomalyDetectionBase)Parent; _model = _parentAnomalyDetector.Model.Clone(); } - private protected override double ComputeRawAnomalyScore(ref Single input, FixedSizeQueue windowedBuffer, long iteration) + protected override double ComputeRawAnomalyScore(ref Single input, FixedSizeQueue windowedBuffer, long iteration) { // Get the prediction for the next point opn the series Single expectedValue = 0; diff --git a/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs b/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs index 32f52ca786..6bf0a13691 100644 --- a/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs +++ b/src/Microsoft.ML.TimeSeries/SsaChangePointDetector.cs @@ -197,14 +197,6 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc /// /// Estimator for /// - ///

Example code can be found by searching for SsaChangePointDetector in ML.NET.

- /// - /// - /// - /// - /// public sealed class SsaChangePointEstimator : IEstimator { private readonly IHost _host; @@ -223,6 +215,12 @@ public sealed class SsaChangePointEstimator : IEstimator /// The function used to compute the error between the expected and the observed value. /// The martingale used for scoring. /// The epsilon parameter for the Power martingale. + ///

Example code can be found by searching for SsaChangePointDetector in ML.NET.

+ /// + /// + /// public SsaChangePointEstimator(IHostEnvironment env, string inputColumn, string outputColumn, int confidence, int changeHistoryLength, int trainingWindowSize, int seasonalityWindowSize, ErrorFunctionUtils.ErrorFunction errorFunction = ErrorFunctionUtils.ErrorFunction.SignedDifference, diff --git a/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs b/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs index 1fbc36b49d..cca54842fb 100644 --- a/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs +++ b/src/Microsoft.ML.TimeSeries/SsaSpikeDetector.cs @@ -178,14 +178,6 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc /// /// Estimator for /// - ///

Example code can be found by searching for SsaSpikeDetector in ML.NET.

- /// - /// - /// - /// - /// public sealed class SsaSpikeEstimator : IEstimator { private readonly IHost _host; @@ -203,6 +195,12 @@ public sealed class SsaSpikeEstimator : IEstimator /// An upper bound on the largest relevant seasonality in the input time-series. /// The argument that determines whether to detect positive or negative anomalies, or both. /// The function used to compute the error between the expected and the observed value. + ///

Example code can be found by searching for SsaSpikeDetector in ML.NET.

+ /// + /// + /// public SsaSpikeEstimator(IHostEnvironment env, string inputColumn, string outputColumn, int confidence, int pvalueHistoryLength, int trainingWindowSize, int seasonalityWindowSize, AnomalySide side = AnomalySide.TwoSided, ErrorFunctionUtils.ErrorFunction errorFunction = ErrorFunctionUtils.ErrorFunction.SignedDifference) diff --git a/src/Microsoft.ML.Transforms/BootstrapSamplingTransformer.cs b/src/Microsoft.ML.Transforms/BootstrapSampleTransform.cs similarity index 84% rename from src/Microsoft.ML.Transforms/BootstrapSamplingTransformer.cs rename to src/Microsoft.ML.Transforms/BootstrapSampleTransform.cs index abb41ab240..10dad94cdd 100644 --- a/src/Microsoft.ML.Transforms/BootstrapSamplingTransformer.cs +++ b/src/Microsoft.ML.Transforms/BootstrapSampleTransform.cs @@ -11,11 +11,11 @@ using Microsoft.ML.Transforms; using System; -[assembly: LoadableClass(BootstrapSamplingTransformer.Summary, typeof(BootstrapSamplingTransformer), typeof(BootstrapSamplingTransformer.Arguments), typeof(SignatureDataTransform), - BootstrapSamplingTransformer.UserName, "BootstrapSampleTransform", "BootstrapSample")] +[assembly: LoadableClass(BootstrapSampleTransform.Summary, typeof(BootstrapSampleTransform), typeof(BootstrapSampleTransform.Arguments), typeof(SignatureDataTransform), + BootstrapSampleTransform.UserName, "BootstrapSampleTransform", "BootstrapSample")] -[assembly: LoadableClass(BootstrapSamplingTransformer.Summary, typeof(BootstrapSamplingTransformer), null, typeof(SignatureLoadDataTransform), - BootstrapSamplingTransformer.UserName, BootstrapSamplingTransformer.LoaderSignature)] +[assembly: LoadableClass(BootstrapSampleTransform.Summary, typeof(BootstrapSampleTransform), null, typeof(SignatureLoadDataTransform), + BootstrapSampleTransform.UserName, BootstrapSampleTransform.LoaderSignature)] [assembly: EntryPointModule(typeof(BootstrapSample))] @@ -24,7 +24,7 @@ namespace Microsoft.ML.Transforms /// /// This class approximates bootstrap sampling of a dataview. /// - public sealed class BootstrapSamplingTransformer : FilterBase + public sealed class BootstrapSampleTransform : FilterBase { private static class Defaults { @@ -61,7 +61,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(BootstrapSamplingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(BootstrapSampleTransform).Assembly.FullName); } internal const string RegistrationName = "BootstrapSample"; @@ -73,7 +73,7 @@ private static VersionInfo GetVersionInfo() private readonly bool _shuffleInput; private readonly int _poolSize; - public BootstrapSamplingTransformer(IHostEnvironment env, Arguments args, IDataView input) + public BootstrapSampleTransform(IHostEnvironment env, Arguments args, IDataView input) : base(env, RegistrationName, input) { Host.CheckValue(args, nameof(args)); @@ -86,7 +86,7 @@ public BootstrapSamplingTransformer(IHostEnvironment env, Arguments args, IDataV } /// - /// Initializes a new instance of . + /// Convenience constructor for public facing API. /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -94,7 +94,7 @@ public BootstrapSamplingTransformer(IHostEnvironment env, Arguments args, IDataV /// The random seed. If unspecified random state will be instead derived from the environment. /// Whether we should attempt to shuffle the source data. By default on, but can be turned off for efficiency. /// When shuffling the output, the number of output rows to keep in that pool. Note that shuffling of output is completely distinct from shuffling of input. - public BootstrapSamplingTransformer(IHostEnvironment env, + public BootstrapSampleTransform(IHostEnvironment env, IDataView input, bool complement = Defaults.Complement, uint? seed = null, @@ -104,7 +104,7 @@ public BootstrapSamplingTransformer(IHostEnvironment env, { } - private BootstrapSamplingTransformer(IHost host, ModelLoadContext ctx, IDataView input) + private BootstrapSampleTransform(IHost host, ModelLoadContext ctx, IDataView input) : base(host, input) { host.AssertValue(ctx); @@ -148,14 +148,14 @@ public override void Save(ModelSaveContext ctx) ctx.Writer.Write(_poolSize); } - public static BootstrapSamplingTransformer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + public static BootstrapSampleTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { Contracts.CheckValue(env, nameof(env)); var h = env.Register(RegistrationName); h.CheckValue(ctx, nameof(ctx)); h.CheckValue(input, nameof(input)); ctx.CheckAtModel(GetVersionInfo()); - return h.Apply("Loading Model", ch => new BootstrapSamplingTransformer(h, ctx, input)); + return h.Apply("Loading Model", ch => new BootstrapSampleTransform(h, ctx, input)); } protected override bool? ShouldUseParallelCursors(Func predicate) @@ -170,7 +170,7 @@ protected override IRowCursor GetRowCursorCore(Func predicate, IRando var input = Source.GetRowCursor(predicate, _shuffleInput ? new TauswortheHybrid(rgen) : null); IRowCursor cursor = new RowCursor(this, input, rgen); if (_poolSize > 1) - cursor = RowShufflingTransformer.GetShuffledCursor(Host, _poolSize, cursor, new TauswortheHybrid(rgen)); + cursor = ShuffleTransform.GetShuffledCursor(Host, _poolSize, cursor, new TauswortheHybrid(rgen)); return cursor; } @@ -184,14 +184,14 @@ public override IRowCursor[] GetRowCursorSet(out IRowCursorConsolidator consolid private sealed class RowCursor : LinkedRootCursorBase, IRowCursor { private int _remaining; - private readonly BootstrapSamplingTransformer _parent; + private readonly BootstrapSampleTransform _parent; private readonly IRandom _rgen; public override long Batch { get { return 0; } } public Schema Schema { get { return Input.Schema; } } - public RowCursor(BootstrapSamplingTransformer parent, IRowCursor input, IRandom rgen) + public RowCursor(BootstrapSampleTransform parent, IRowCursor input, IRandom rgen) : base(parent.Host, input) { Ch.AssertValue(rgen); @@ -237,14 +237,14 @@ protected override bool MoveNextCore() public static class BootstrapSample { - [TlcModule.EntryPoint(Name = "Transforms.ApproximateBootstrapSampler", Desc = BootstrapSamplingTransformer.Summary, UserName = BootstrapSamplingTransformer.UserName, ShortName = BootstrapSamplingTransformer.RegistrationName)] - public static CommonOutputs.TransformOutput GetSample(IHostEnvironment env, BootstrapSamplingTransformer.Arguments input) + [TlcModule.EntryPoint(Name = "Transforms.ApproximateBootstrapSampler", Desc = BootstrapSampleTransform.Summary, UserName = BootstrapSampleTransform.UserName, ShortName = BootstrapSampleTransform.RegistrationName)] + public static CommonOutputs.TransformOutput GetSample(IHostEnvironment env, BootstrapSampleTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(input, nameof(input)); var h = EntryPointUtils.CheckArgsAndCreateHost(env, "BootstrapSample", input); - var view = new BootstrapSamplingTransformer(h, input, input.Data); + var view = new BootstrapSampleTransform(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, view, input.Data), diff --git a/src/Microsoft.ML.Transforms/CategoricalCatalog.cs b/src/Microsoft.ML.Transforms/CategoricalCatalog.cs index 9f3b3b6547..8709c1702e 100644 --- a/src/Microsoft.ML.Transforms/CategoricalCatalog.cs +++ b/src/Microsoft.ML.Transforms/CategoricalCatalog.cs @@ -24,7 +24,7 @@ public static class CategoricalCatalog public static OneHotEncodingEstimator OneHotEncoding(this TransformsCatalog.CategoricalTransforms catalog, string inputColumn, string outputColumn = null, - OneHotEncodingTransformer.OutputKind outputKind = OneHotEncodingTransformer.OutputKind.Ind) + CategoricalTransform.OutputKind outputKind = CategoricalTransform.OutputKind.Ind) => new OneHotEncodingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, outputKind); /// @@ -43,17 +43,13 @@ public static OneHotEncodingEstimator OneHotEncoding(this TransformsCatalog.Cate /// The transform catalog /// The input column /// The output column. If null, is used. - /// Number of bits to hash into. Must be between 1 and 30, inclusive. - /// Limit the number of keys used to generate the slot name to this many. 0 means no invert hashing, -1 means no limit. /// The conversion mode. /// public static OneHotHashEncodingEstimator OneHotHashEncoding(this TransformsCatalog.CategoricalTransforms catalog, string inputColumn, string outputColumn = null, - int hashBits = OneHotHashEncodingEstimator.Defaults.HashBits, - int invertHash = OneHotHashEncodingEstimator.Defaults.InvertHash, - OneHotEncodingTransformer.OutputKind outputKind = OneHotEncodingTransformer.OutputKind.Ind) - => new OneHotHashEncodingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, hashBits, invertHash, outputKind); + CategoricalTransform.OutputKind outputKind = CategoricalTransform.OutputKind.Ind) + => new OneHotHashEncodingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, outputKind); /// /// Convert several text column into hash-based one-hot encoded vectors. diff --git a/src/Microsoft.ML.Transforms/OneHotHashEncodingTransformer.cs b/src/Microsoft.ML.Transforms/CategoricalHashTransform.cs similarity index 85% rename from src/Microsoft.ML.Transforms/OneHotHashEncodingTransformer.cs rename to src/Microsoft.ML.Transforms/CategoricalHashTransform.cs index 8bd7856c7e..24a800024c 100644 --- a/src/Microsoft.ML.Transforms/OneHotHashEncodingTransformer.cs +++ b/src/Microsoft.ML.Transforms/CategoricalHashTransform.cs @@ -17,12 +17,12 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(OneHotHashEncodingTransformer.Summary, typeof(IDataTransform), typeof(OneHotHashEncodingTransformer), typeof(OneHotHashEncodingTransformer.Arguments), typeof(SignatureDataTransform), - OneHotHashEncodingTransformer.UserName, "CategoricalHashTransform", "CatHashTransform", "CategoricalHash", "CatHash")] +[assembly: LoadableClass(CategoricalHashTransform.Summary, typeof(IDataTransform), typeof(CategoricalHashTransform), typeof(CategoricalHashTransform.Arguments), typeof(SignatureDataTransform), + CategoricalHashTransform.UserName, "CategoricalHashTransform", "CatHashTransform", "CategoricalHash", "CatHash")] namespace Microsoft.ML.Transforms.Categorical { - public sealed class OneHotHashEncodingTransformer : ITransformer, ICanSaveModel + public sealed class CategoricalHashTransform : ITransformer, ICanSaveModel { public sealed class Column : OneToOneColumn { @@ -44,7 +44,7 @@ public sealed class Column : OneToOneColumn [Argument(ArgumentType.AtMostOnce, HelpText = "Output kind: Bag (multi-set vector), Ind (indicator vector), or Key (index)", ShortName = "kind", SortOrder = 102)] - public OneHotEncodingTransformer.OutputKind? OutputKind; + public CategoricalTransform.OutputKind? OutputKind; public static Column Parse(string str) { @@ -90,11 +90,11 @@ private static class Defaults public const uint Seed = 314489979; public const bool Ordered = true; public const int InvertHash = 0; - public const OneHotEncodingTransformer.OutputKind OutputKind = OneHotEncodingTransformer.OutputKind.Bag; + public const CategoricalTransform.OutputKind OutputKind = CategoricalTransform.OutputKind.Bag; } /// - /// This class is a merger of and + /// This class is a merger of and /// with join option removed /// public sealed class Arguments : TransformInputBase @@ -119,7 +119,7 @@ public sealed class Arguments : TransformInputBase [Argument(ArgumentType.AtMostOnce, HelpText = "Output kind: Bag (multi-set vector), Ind (indicator vector), or Key (index)", ShortName = "kind", SortOrder = 102)] - public OneHotEncodingTransformer.OutputKind OutputKind = Defaults.OutputKind; + public CategoricalTransform.OutputKind OutputKind = Defaults.OutputKind; } internal const string Summary = "Converts the categorical value into an indicator array by hashing the value and using the hash as an index in the " @@ -128,7 +128,7 @@ public sealed class Arguments : TransformInputBase public const string UserName = "Categorical Hash Transform"; /// - /// A helper method to create . + /// A helper method to create . /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -143,9 +143,9 @@ public static IDataView Create(IHostEnvironment env, string source = null, int hashBits = OneHotHashEncodingEstimator.Defaults.HashBits, int invertHash = OneHotHashEncodingEstimator.Defaults.InvertHash, - OneHotEncodingTransformer.OutputKind outputKind = OneHotHashEncodingEstimator.Defaults.OutputKind) + CategoricalTransform.OutputKind outputKind = OneHotHashEncodingEstimator.Defaults.OutputKind) { - return new OneHotHashEncodingEstimator(env, name, source, hashBits, invertHash, outputKind).Fit(input).Transform(input) as IDataView; + return new OneHotHashEncodingEstimator(env, name, source, outputKind).Fit(input).Transform(input) as IDataView; } internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) @@ -174,7 +174,7 @@ internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDat private readonly TransformerChain _transformer; - internal OneHotHashEncodingTransformer(HashingEstimator hash, IEstimator keyToVector, IDataView input) + internal CategoricalHashTransform(HashingEstimator hash, IEstimator keyToVector, IDataView input) { var chain = hash.Append(keyToVector); _transformer = chain.Fit(input); @@ -194,7 +194,7 @@ internal OneHotHashEncodingTransformer(HashingEstimator hash, IEstimator /// Estimator which takes set of columns and produce for each column indicator array. Use hashing to determine indicator position. /// - public sealed class OneHotHashEncodingEstimator : IEstimator + public sealed class OneHotHashEncodingEstimator : IEstimator { internal static class Defaults { @@ -202,13 +202,13 @@ internal static class Defaults public const uint Seed = 314489979; public const bool Ordered = true; public const int InvertHash = 0; - public const OneHotEncodingTransformer.OutputKind OutputKind = OneHotEncodingTransformer.OutputKind.Bag; + public const CategoricalTransform.OutputKind OutputKind = CategoricalTransform.OutputKind.Bag; } public sealed class ColumnInfo { - public readonly HashingTransformer.ColumnInfo HashInfo; - public readonly OneHotEncodingTransformer.OutputKind OutputKind; + public readonly HashTransformer.ColumnInfo HashInfo; + public readonly CategoricalTransform.OutputKind OutputKind; /// /// Describes how the transformer handles one column pair. @@ -221,13 +221,13 @@ public sealed class ColumnInfo /// Whether the position of each term should be included in the hash. /// Limit the number of keys used to generate the slot name to this many. 0 means no invert hashing, -1 means no limit. public ColumnInfo(string input, string output, - OneHotEncodingTransformer.OutputKind outputKind = Defaults.OutputKind, + CategoricalTransform.OutputKind outputKind = Defaults.OutputKind, int hashBits = Defaults.HashBits, uint seed = Defaults.Seed, bool ordered = Defaults.Ordered, int invertHash = Defaults.InvertHash) { - HashInfo = new HashingTransformer.ColumnInfo(input, output, hashBits, seed, ordered, invertHash); + HashInfo = new HashTransformer.ColumnInfo(input, output, hashBits, seed, ordered, invertHash); OutputKind = outputKind; } } @@ -240,16 +240,10 @@ public ColumnInfo(string input, string output, /// Host Environment. /// Name of the input column. /// Name of the output column. If this is null '' will be used. - /// Number of bits to hash into. Must be between 1 and 30, inclusive. - /// Limit the number of keys used to generate the slot name to this many. 0 means no invert hashing, -1 means no limit. /// The type of output expected. - public OneHotHashEncodingEstimator(IHostEnvironment env, - string inputColumn, - string outputColumn, - int hashBits = OneHotHashEncodingEstimator.Defaults.HashBits, - int invertHash = OneHotHashEncodingEstimator.Defaults.InvertHash, - OneHotEncodingTransformer.OutputKind outputKind = Defaults.OutputKind) - : this(env, new ColumnInfo(inputColumn, outputColumn ?? inputColumn, outputKind, hashBits, invertHash: invertHash)) + public OneHotHashEncodingEstimator(IHostEnvironment env, string inputColumn, + string outputColumn = null, CategoricalTransform.OutputKind outputKind = Defaults.OutputKind) + : this(env, new ColumnInfo(inputColumn, outputColumn ?? inputColumn, outputKind)) { } @@ -265,22 +259,22 @@ public OneHotHashEncodingEstimator(IHostEnvironment env, params ColumnInfo[] col for (int i = 0; i < columns.Length; i++) { var column = columns[i]; - OneHotEncodingTransformer.OutputKind kind = columns[i].OutputKind; + CategoricalTransform.OutputKind kind = columns[i].OutputKind; switch (kind) { default: throw _host.ExceptUserArg(nameof(column.OutputKind)); - case OneHotEncodingTransformer.OutputKind.Key: + case CategoricalTransform.OutputKind.Key: continue; - case OneHotEncodingTransformer.OutputKind.Bin: + case CategoricalTransform.OutputKind.Bin: if ((column.HashInfo.InvertHash) != 0) ch.Warning("Invert hashing is being used with binary encoding."); binaryCols.Add((column.HashInfo.Output, column.HashInfo.Output)); break; - case OneHotEncodingTransformer.OutputKind.Ind: + case CategoricalTransform.OutputKind.Ind: cols.Add((column.HashInfo.Output, column.HashInfo.Output, false)); break; - case OneHotEncodingTransformer.OutputKind.Bag: + case CategoricalTransform.OutputKind.Bag: cols.Add((column.HashInfo.Output, column.HashInfo.Output, true)); break; } @@ -288,9 +282,9 @@ public OneHotHashEncodingEstimator(IHostEnvironment env, params ColumnInfo[] col IEstimator toBinVector = null; IEstimator toVector = null; if (binaryCols.Count > 0) - toBinVector = new KeyToBinaryVectorMappingEstimator(_host, binaryCols.Select(x => new KeyToBinaryVectorMappingTransformer.ColumnInfo(x.input, x.output)).ToArray()); + toBinVector = new KeyToBinaryVectorMappingEstimator(_host, binaryCols.Select(x => new KeyToBinaryVectorTransform.ColumnInfo(x.input, x.output)).ToArray()); if (cols.Count > 0) - toVector = new KeyToVectorMappingEstimator(_host, cols.Select(x => new KeyToVectorMappingTransformer.ColumnInfo(x.input, x.output, x.bag)).ToArray()); + toVector = new KeyToVectorMappingEstimator(_host, cols.Select(x => new KeyToVectorTransform.ColumnInfo(x.input, x.output, x.bag)).ToArray()); if (toBinVector != null && toVector != null) _toSomething = toVector.Append(toBinVector); @@ -306,7 +300,7 @@ public OneHotHashEncodingEstimator(IHostEnvironment env, params ColumnInfo[] col public SchemaShape GetOutputSchema(SchemaShape inputSchema) => _hash.Append(_toSomething).GetOutputSchema(inputSchema); - public OneHotHashEncodingTransformer Fit(IDataView input) => new OneHotHashEncodingTransformer(_hash, _toSomething, input); + public CategoricalHashTransform Fit(IDataView input) => new CategoricalHashTransform(_hash, _toSomething, input); } public static class CategoricalHashStaticExtensions @@ -405,7 +399,7 @@ public override IEstimator Reconcile(IHostEnvironment env, Pipelin for (int i = 0; i < toOutput.Length; ++i) { var tcol = (ICategoricalCol)toOutput[i]; - infos[i] = new OneHotHashEncodingEstimator.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], (OneHotEncodingTransformer.OutputKind)tcol.Config.OutputKind, + infos[i] = new OneHotHashEncodingEstimator.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], (CategoricalTransform.OutputKind)tcol.Config.OutputKind, tcol.Config.HashBits, tcol.Config.Seed, tcol.Config.Ordered, tcol.Config.InvertHash); } return new OneHotHashEncodingEstimator(env, infos); diff --git a/src/Microsoft.ML.Transforms/OneHotEncodingTransformer.cs b/src/Microsoft.ML.Transforms/CategoricalTransform.cs similarity index 83% rename from src/Microsoft.ML.Transforms/OneHotEncodingTransformer.cs rename to src/Microsoft.ML.Transforms/CategoricalTransform.cs index bfe13f91db..addd2e54a3 100644 --- a/src/Microsoft.ML.Transforms/OneHotEncodingTransformer.cs +++ b/src/Microsoft.ML.Transforms/CategoricalTransform.cs @@ -19,15 +19,15 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(OneHotEncodingTransformer.Summary, typeof(IDataTransform), typeof(OneHotEncodingTransformer), typeof(OneHotEncodingTransformer.Arguments), typeof(SignatureDataTransform), - OneHotEncodingTransformer.UserName, "CategoricalTransform", "CatTransform", "Categorical", "Cat")] +[assembly: LoadableClass(CategoricalTransform.Summary, typeof(IDataTransform), typeof(CategoricalTransform), typeof(CategoricalTransform.Arguments), typeof(SignatureDataTransform), + CategoricalTransform.UserName, "CategoricalTransform", "CatTransform", "Categorical", "Cat")] [assembly: LoadableClass(typeof(void), typeof(Categorical), null, typeof(SignatureEntryPointModule), "Categorical")] namespace Microsoft.ML.Transforms.Categorical { /// - public sealed class OneHotEncodingTransformer : ITransformer, ICanSaveModel + public sealed class CategoricalTransform : ITransformer, ICanSaveModel { public enum OutputKind : byte { @@ -56,7 +56,7 @@ public enum OutputKind : byte Bin = 4, } - public sealed class Column : ValueToKeyMappingTransformer.ColumnBase + public sealed class Column : TermTransform.ColumnBase { [Argument(ArgumentType.AtMostOnce, HelpText = "Output kind: Bag (multi-set vector), Ind (indicator vector), Key (index), or Binary encoded indicator vector", ShortName = "kind")] public OutputKind? OutputKind; @@ -98,7 +98,7 @@ public bool TryUnparse(StringBuilder sb) } } - public sealed class Arguments : ValueToKeyMappingTransformer.ArgumentsBase + public sealed class Arguments : TermTransform.ArgumentsBase { [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "New column definition(s) (optional form: name:src)", ShortName = "col", SortOrder = 1)] public Column[] Column; @@ -146,7 +146,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV private readonly TransformerChain _transformer; - public OneHotEncodingTransformer(ValueToKeyMappingEstimator term, IEstimator toVector, IDataView input) + public CategoricalTransform(ValueToKeyMappingEstimator term, IEstimator toVector, IDataView input) { if (toVector != null) _transformer = term.Append(toVector).Fit(input); @@ -167,18 +167,18 @@ public OneHotEncodingTransformer(ValueToKeyMappingEstimator term, IEstimator /// Estimator which takes set of columns and produce for each column indicator array. /// - public sealed class OneHotEncodingEstimator : IEstimator + public sealed class OneHotEncodingEstimator : IEstimator { internal static class Defaults { - public const OneHotEncodingTransformer.OutputKind OutKind = OneHotEncodingTransformer.OutputKind.Ind; + public const CategoricalTransform.OutputKind OutKind = CategoricalTransform.OutputKind.Ind; } - public class ColumnInfo : ValueToKeyMappingTransformer.ColumnInfo + public class ColumnInfo : TermTransform.ColumnInfo { - public readonly OneHotEncodingTransformer.OutputKind OutputKind; - public ColumnInfo(string input, string output, OneHotEncodingTransformer.OutputKind outputKind = Defaults.OutKind, - int maxNumTerms = ValueToKeyMappingEstimator.Defaults.MaxNumTerms, ValueToKeyMappingTransformer.SortOrder sort = ValueToKeyMappingEstimator.Defaults.Sort, + public readonly CategoricalTransform.OutputKind OutputKind; + public ColumnInfo(string input, string output, CategoricalTransform.OutputKind outputKind = Defaults.OutKind, + int maxNumTerms = ValueToKeyMappingEstimator.Defaults.MaxNumTerms, TermTransform.SortOrder sort = ValueToKeyMappingEstimator.Defaults.Sort, string[] term = null) : base(input, output, maxNumTerms, sort, term, true) { @@ -202,7 +202,7 @@ internal void SetTerms(string terms) /// Name of the output column. If this is null, is used. /// The type of output expected. public OneHotEncodingEstimator(IHostEnvironment env, string inputColumn, - string outputColumn = null, OneHotEncodingTransformer.OutputKind outputKind = Defaults.OutKind) + string outputColumn = null, CategoricalTransform.OutputKind outputKind = Defaults.OutKind) : this(env, new[] { new ColumnInfo(inputColumn, outputColumn ?? inputColumn, outputKind) }) { } @@ -219,20 +219,20 @@ public OneHotEncodingEstimator(IHostEnvironment env, ColumnInfo[] columns, for (int i = 0; i < columns.Length; i++) { var column = columns[i]; - OneHotEncodingTransformer.OutputKind kind = columns[i].OutputKind; + CategoricalTransform.OutputKind kind = columns[i].OutputKind; switch (kind) { default: throw _host.ExceptUserArg(nameof(column.OutputKind)); - case OneHotEncodingTransformer.OutputKind.Key: + case CategoricalTransform.OutputKind.Key: continue; - case OneHotEncodingTransformer.OutputKind.Bin: + case CategoricalTransform.OutputKind.Bin: binaryCols.Add((column.Output, column.Output)); break; - case OneHotEncodingTransformer.OutputKind.Ind: + case CategoricalTransform.OutputKind.Ind: cols.Add((column.Output, column.Output, false)); break; - case OneHotEncodingTransformer.OutputKind.Bag: + case CategoricalTransform.OutputKind.Bag: cols.Add((column.Output, column.Output, true)); break; } @@ -240,9 +240,9 @@ public OneHotEncodingEstimator(IHostEnvironment env, ColumnInfo[] columns, IEstimator toBinVector = null; IEstimator toVector = null; if (binaryCols.Count > 0) - toBinVector = new KeyToBinaryVectorMappingEstimator(_host, binaryCols.Select(x => new KeyToBinaryVectorMappingTransformer.ColumnInfo(x.input, x.output)).ToArray()); + toBinVector = new KeyToBinaryVectorMappingEstimator(_host, binaryCols.Select(x => new KeyToBinaryVectorTransform.ColumnInfo(x.input, x.output)).ToArray()); if (cols.Count > 0) - toVector = new KeyToVectorMappingEstimator(_host, cols.Select(x => new KeyToVectorMappingTransformer.ColumnInfo(x.input, x.output, x.bag)).ToArray()); + toVector = new KeyToVectorMappingEstimator(_host, cols.Select(x => new KeyToVectorTransform.ColumnInfo(x.input, x.output, x.bag)).ToArray()); if (toBinVector != null && toVector != null) _toSomething = toVector.Append(toBinVector); @@ -257,9 +257,9 @@ public OneHotEncodingEstimator(IHostEnvironment env, ColumnInfo[] columns, public SchemaShape GetOutputSchema(SchemaShape inputSchema) => _term.Append(_toSomething).GetOutputSchema(inputSchema); - public OneHotEncodingTransformer Fit(IDataView input) => new OneHotEncodingTransformer(_term, _toSomething, input); + public CategoricalTransform Fit(IDataView input) => new CategoricalTransform(_term, _toSomething, input); - internal void WrapTermWithDelegate(Action onFit) + internal void WrapTermWithDelegate(Action onFit) { _term = (ValueToKeyMappingEstimator)_term.WithOnFitDelegate(onFit); } @@ -268,65 +268,65 @@ internal void WrapTermWithDelegate(Action onFit) public static class Categorical { [TlcModule.EntryPoint(Name = "Transforms.CategoricalOneHotVectorizer", - Desc = OneHotEncodingTransformer.Summary, - UserName = OneHotEncodingTransformer.UserName, + Desc = CategoricalTransform.Summary, + UserName = CategoricalTransform.UserName, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput CatTransformDict(IHostEnvironment env, OneHotEncodingTransformer.Arguments input) + public static CommonOutputs.TransformOutput CatTransformDict(IHostEnvironment env, CategoricalTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("CatTransformDict"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = OneHotEncodingTransformer.Create(host, input, input.Data); + var xf = CategoricalTransform.Create(host, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } [TlcModule.EntryPoint(Name = "Transforms.CategoricalHashOneHotVectorizer", - Desc = OneHotHashEncodingTransformer.Summary, - UserName = OneHotHashEncodingTransformer.UserName, + Desc = CategoricalHashTransform.Summary, + UserName = CategoricalHashTransform.UserName, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput CatTransformHash(IHostEnvironment env, OneHotHashEncodingTransformer.Arguments input) + public static CommonOutputs.TransformOutput CatTransformHash(IHostEnvironment env, CategoricalHashTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("CatTransformDict"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = OneHotHashEncodingTransformer.Create(host, input, input.Data); + var xf = CategoricalHashTransform.Create(host, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } [TlcModule.EntryPoint(Name = "Transforms.TextToKeyConverter", - Desc = ValueToKeyMappingTransformer.Summary, - UserName = ValueToKeyMappingTransformer.FriendlyName, + Desc = TermTransform.Summary, + UserName = TermTransform.FriendlyName, XmlInclude = new[] { @"", @"" })] - public static CommonOutputs.TransformOutput TextToKey(IHostEnvironment env, ValueToKeyMappingTransformer.Arguments input) + public static CommonOutputs.TransformOutput TextToKey(IHostEnvironment env, TermTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("Term"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = ValueToKeyMappingTransformer.Create(host, input, input.Data); + var xf = TermTransform.Create(host, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } [TlcModule.EntryPoint(Name = "Transforms.KeyToTextConverter", Desc = "KeyToValueTransform utilizes KeyValues metadata to map key indices to the corresponding values in the KeyValues metadata.", - UserName = KeyToValueMappingTransformer.UserName, + UserName = KeyToValueTransform.UserName, XmlInclude = new[] { @"" })] - public static CommonOutputs.TransformOutput KeyToText(IHostEnvironment env, KeyToValueMappingTransformer.Arguments input) + public static CommonOutputs.TransformOutput KeyToText(IHostEnvironment env, KeyToValueTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("KeyToValue"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = KeyToValueMappingTransformer.Create(host, input, input.Data); + var xf = KeyToValueTransform.Create(host, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } } @@ -373,9 +373,9 @@ private readonly struct Config public readonly KeyValueOrder Order; public readonly int Max; public readonly OneHotVectorOutputKind OutputKind; - public readonly Action OnFit; + public readonly Action OnFit; - public Config(OneHotVectorOutputKind outputKind, KeyValueOrder order, int max, Action onFit) + public Config(OneHotVectorOutputKind outputKind, KeyValueOrder order, int max, Action onFit) { OutputKind = outputKind; Order = order; @@ -384,7 +384,7 @@ public Config(OneHotVectorOutputKind outputKind, KeyValueOrder order, int max, A } } - private static Action Wrap(ToKeyFitResult.OnFit onFit) + private static Action Wrap(ToKeyFitResult.OnFit onFit) { if (onFit == null) return null; @@ -430,12 +430,12 @@ public override IEstimator Reconcile(IHostEnvironment env, Pipelin IReadOnlyDictionary inputNames, IReadOnlyDictionary outputNames, IReadOnlyCollection usedNames) { var infos = new OneHotEncodingEstimator.ColumnInfo[toOutput.Length]; - Action onFit = null; + Action onFit = null; for (int i = 0; i < toOutput.Length; ++i) { var tcol = (ICategoricalCol)toOutput[i]; - infos[i] = new OneHotEncodingEstimator.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], (OneHotEncodingTransformer.OutputKind)tcol.Config.OutputKind, - tcol.Config.Max, (ValueToKeyMappingTransformer.SortOrder)tcol.Config.Order); + infos[i] = new OneHotEncodingEstimator.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], (CategoricalTransform.OutputKind)tcol.Config.OutputKind, + tcol.Config.Max, (TermTransform.SortOrder)tcol.Config.Order); if (tcol.Config.OnFit != null) { int ii = i; // Necessary because if we capture i that will change to toOutput.Length on call. diff --git a/src/Microsoft.ML.Transforms/CompositeTransformer.cs b/src/Microsoft.ML.Transforms/CompositeTransform.cs similarity index 89% rename from src/Microsoft.ML.Transforms/CompositeTransformer.cs rename to src/Microsoft.ML.Transforms/CompositeTransform.cs index fe1855c5fa..180a613b32 100644 --- a/src/Microsoft.ML.Transforms/CompositeTransformer.cs +++ b/src/Microsoft.ML.Transforms/CompositeTransform.cs @@ -10,12 +10,12 @@ // REVIEW: This is a temporary hack code to allow loading old saved loader models. Delete it once it is no longer needed. // The below signatures are for (de)serialization purposes only. -[assembly: LoadableClass(typeof(IDataTransform), typeof(CompositeTransformer), null, typeof(SignatureLoadDataTransform), - "Composite Transform", CompositeTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IDataTransform), typeof(CompositeTransform), null, typeof(SignatureLoadDataTransform), + "Composite Transform", CompositeTransform.LoaderSignature)] namespace Microsoft.ML.Transforms { - public static class CompositeTransformer + public static class CompositeTransform { private const string RegistrationName = "CompositeTransform"; @@ -28,7 +28,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(CompositeTransformer).Assembly.FullName); + loaderAssemblyName: typeof(CompositeTransform).Assembly.FullName); } public static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) diff --git a/src/Microsoft.ML.Transforms/CountFeatureSelectingTransformer.cs b/src/Microsoft.ML.Transforms/CountFeatureSelection.cs similarity index 94% rename from src/Microsoft.ML.Transforms/CountFeatureSelectingTransformer.cs rename to src/Microsoft.ML.Transforms/CountFeatureSelection.cs index 34a6e79f62..b4b876138d 100644 --- a/src/Microsoft.ML.Transforms/CountFeatureSelectingTransformer.cs +++ b/src/Microsoft.ML.Transforms/CountFeatureSelection.cs @@ -13,13 +13,13 @@ using System.Linq; using System.Reflection; -[assembly: LoadableClass(CountFeatureSelectingTransformer.Summary, typeof(IDataTransform), typeof(CountFeatureSelectingTransformer), typeof(CountFeatureSelectingTransformer.Arguments), typeof(SignatureDataTransform), - CountFeatureSelectingTransformer.UserName, "CountFeatureSelectionTransform", "CountFeatureSelection")] +[assembly: LoadableClass(CountFeatureSelectionTransform.Summary, typeof(IDataTransform), typeof(CountFeatureSelectionTransform), typeof(CountFeatureSelectionTransform.Arguments), typeof(SignatureDataTransform), + CountFeatureSelectionTransform.UserName, "CountFeatureSelectionTransform", "CountFeatureSelection")] namespace Microsoft.ML.Transforms { /// - public static class CountFeatureSelectingTransformer + public static class CountFeatureSelectionTransform { internal const string Summary = "Selects the slots for which the count of non-default values is greater than or equal to a threshold."; internal const string UserName = "Count Feature Selection Transform"; @@ -165,11 +165,11 @@ public static long[][] Train(IHostEnvironment env, IDataView input, string[] col int colSrc; var colName = columns[i]; if (!schema.TryGetColumnIndex(colName, out colSrc)) - throw env.ExceptUserArg(nameof(CountFeatureSelectingTransformer.Arguments.Column), "Source column '{0}' not found", colName); + throw env.ExceptUserArg(nameof(CountFeatureSelectionTransform.Arguments.Column), "Source column '{0}' not found", colName); var colType = schema.GetColumnType(colSrc); if (colType.IsVector && !colType.IsKnownSizeVector) - throw env.ExceptUserArg(nameof(CountFeatureSelectingTransformer.Arguments.Column), "Variable length column '{0}' is not allowed", colName); + throw env.ExceptUserArg(nameof(CountFeatureSelectionTransform.Arguments.Column), "Variable length column '{0}' is not allowed", colName); activeInput[colSrc] = true; colSrcs[i] = colSrc; @@ -179,7 +179,7 @@ public static long[][] Train(IHostEnvironment env, IDataView input, string[] col var aggregators = new CountAggregator[size]; long rowCur = 0; - double rowCount = input.GetRowCount() ?? double.NaN; + double rowCount = input.GetRowCount(true) ?? double.NaN; using (var pch = env.StartProgressChannel("Aggregating counts")) using (var cursor = input.GetRowCursor(col => activeInput[col])) { @@ -252,7 +252,7 @@ public CountAggregator(ColumnType type, ValueGetter getter) () => { getter(ref t); - VBufferEditor.CreateFromBuffer(ref _buffer).Values[0] = t; + _buffer.Values[0] = t; }; _isDefault = Runtime.Data.Conversion.Conversions.Instance.GetIsDefaultPredicate(type); if (!Runtime.Data.Conversion.Conversions.Instance.TryGetIsNAPredicate(type, out _isMissing)) diff --git a/src/Microsoft.ML.Transforms/EntryPoints/SelectFeatures.cs b/src/Microsoft.ML.Transforms/EntryPoints/SelectFeatures.cs index 5869120b96..1c07bfdc60 100644 --- a/src/Microsoft.ML.Transforms/EntryPoints/SelectFeatures.cs +++ b/src/Microsoft.ML.Transforms/EntryPoints/SelectFeatures.cs @@ -14,18 +14,18 @@ namespace Microsoft.ML.Transforms public static class SelectFeatures { [TlcModule.EntryPoint(Name = "Transforms.FeatureSelectorByCount", - Desc = CountFeatureSelectingTransformer.Summary, - UserName = CountFeatureSelectingTransformer.UserName, + Desc = CountFeatureSelectionTransform.Summary, + UserName = CountFeatureSelectionTransform.UserName, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput CountSelect(IHostEnvironment env, CountFeatureSelectingTransformer.Arguments input) + public static CommonOutputs.TransformOutput CountSelect(IHostEnvironment env, CountFeatureSelectionTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); var host = env.Register("CountSelect"); host.CheckValue(input, nameof(input)); EntryPointUtils.CheckInputArgs(host, input); - var xf = CountFeatureSelectingTransformer.Create(host, input, input.Data); + var xf = CountFeatureSelectionTransform.Create(host, input, input.Data); return new CommonOutputs.TransformOutput { Model = new TransformModel(env, xf, input.Data), OutputData = xf }; } diff --git a/src/Microsoft.ML.Transforms/EntryPoints/TextAnalytics.cs b/src/Microsoft.ML.Transforms/EntryPoints/TextAnalytics.cs index b7b93584e9..ba1af900ff 100644 --- a/src/Microsoft.ML.Transforms/EntryPoints/TextAnalytics.cs +++ b/src/Microsoft.ML.Transforms/EntryPoints/TextAnalytics.cs @@ -3,10 +3,11 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.EntryPoints; +using Microsoft.ML.Runtime.TextAnalytics; using Microsoft.ML.Transforms.Categorical; using Microsoft.ML.Transforms.Text; -using System.Linq; [assembly: LoadableClass(typeof(void), typeof(TextAnalytics), null, typeof(SignatureEntryPointModule), "TextAnalytics")] @@ -35,15 +36,15 @@ public static CommonOutputs.TransformOutput TextTransform(IHostEnvironment env, } [TlcModule.EntryPoint(Name = "Transforms.WordTokenizer", - Desc = ML.Transforms.Text.WordTokenizingTransformer.Summary, - UserName = ML.Transforms.Text.WordTokenizingTransformer.UserName, - ShortName = ML.Transforms.Text.WordTokenizingTransformer.LoaderSignature, + Desc = ML.Transforms.Text.WordTokenizeTransform.Summary, + UserName = ML.Transforms.Text.WordTokenizeTransform.UserName, + ShortName = ML.Transforms.Text.WordTokenizeTransform.LoaderSignature, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput DelimitedTokenizeTransform(IHostEnvironment env, WordTokenizingTransformer.Arguments input) + public static CommonOutputs.TransformOutput DelimitedTokenizeTransform(IHostEnvironment env, WordTokenizeTransform.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "DelimitedTokenizeTransform", input); - var xf = ML.Transforms.Text.WordTokenizingTransformer.Create(h, input, input.Data); + var xf = ML.Transforms.Text.WordTokenizeTransform.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), @@ -52,14 +53,14 @@ public static CommonOutputs.TransformOutput DelimitedTokenizeTransform(IHostEnvi } [TlcModule.EntryPoint(Name = "Transforms.NGramTranslator", - Desc = NgramCountingTransformer.Summary, - UserName = NgramCountingTransformer.UserName, - ShortName = NgramCountingTransformer.LoaderSignature, + Desc = NgramTransform.Summary, + UserName = NgramTransform.UserName, + ShortName = NgramTransform.LoaderSignature, XmlInclude = new[] { @"" })] - public static CommonOutputs.TransformOutput NGramTransform(IHostEnvironment env, NgramCountingTransformer.Arguments input) + public static CommonOutputs.TransformOutput NGramTransform(IHostEnvironment env, NgramTransform.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "NGramTransform", input); - var xf = NgramCountingTransformer.Create(h, input, input.Data); + var xf = new NgramTransform(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), @@ -68,13 +69,13 @@ public static CommonOutputs.TransformOutput NGramTransform(IHostEnvironment env, } [TlcModule.EntryPoint(Name = "Transforms.Dictionarizer", - Desc = ValueToKeyMappingTransformer.Summary, - UserName = ValueToKeyMappingTransformer.UserName, - ShortName = ValueToKeyMappingTransformer.LoaderSignature)] - public static CommonOutputs.TransformOutput TermTransform(IHostEnvironment env, ValueToKeyMappingTransformer.Arguments input) + Desc = Categorical.TermTransform.Summary, + UserName = Categorical.TermTransform.UserName, + ShortName = Categorical.TermTransform.LoaderSignature)] + public static CommonOutputs.TransformOutput TermTransform(IHostEnvironment env, TermTransform.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "TermTransform", input); - var xf = ValueToKeyMappingTransformer.Create(h, input, input.Data); + var xf = Categorical.TermTransform.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), @@ -84,14 +85,14 @@ public static CommonOutputs.TransformOutput TermTransform(IHostEnvironment env, [TlcModule.EntryPoint(Name = "Transforms.SentimentAnalyzer", Desc = "Uses a pretrained sentiment model to score input strings", - UserName = SentimentAnalyzingTransformer.UserName, - ShortName = SentimentAnalyzingTransformer.ShortName, + UserName = SentimentAnalyzingTransform.UserName, + ShortName = SentimentAnalyzingTransform.ShortName, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput AnalyzeSentiment(IHostEnvironment env, SentimentAnalyzingTransformer.Arguments input) + public static CommonOutputs.TransformOutput AnalyzeSentiment(IHostEnvironment env, SentimentAnalyzingTransform.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "SentimentAnalyzer", input); - var view = SentimentAnalyzingTransformer.Create(h, input, input.Data); + var view = SentimentAnalyzingTransform.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, view, input.Data), @@ -100,17 +101,17 @@ public static CommonOutputs.TransformOutput AnalyzeSentiment(IHostEnvironment en } [TlcModule.EntryPoint(Name = "Transforms.CharacterTokenizer", - Desc = TokenizingByCharactersTransformer.Summary, - UserName = TokenizingByCharactersTransformer.UserName, - ShortName = TokenizingByCharactersTransformer.LoaderSignature, + Desc = CharTokenizeTransform.Summary, + UserName = CharTokenizeTransform.UserName, + ShortName = CharTokenizeTransform.LoaderSignature, XmlInclude = new[] { @"" })] - public static CommonOutputs.TransformOutput CharTokenize(IHostEnvironment env, TokenizingByCharactersTransformer.Arguments input) + public static CommonOutputs.TransformOutput CharTokenize(IHostEnvironment env, CharTokenizeTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(input, nameof(input)); var h = EntryPointUtils.CheckArgsAndCreateHost(env, "CharTokenize", input); - var view = TokenizingByCharactersTransformer.Create(h, input, input.Data); + var view = CharTokenizeTransform.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, view, input.Data), @@ -119,21 +120,18 @@ public static CommonOutputs.TransformOutput CharTokenize(IHostEnvironment env, T } [TlcModule.EntryPoint(Name = "Transforms.LightLda", - Desc = LatentDirichletAllocationTransformer.Summary, - UserName = LatentDirichletAllocationTransformer.UserName, - ShortName = LatentDirichletAllocationTransformer.ShortName, + Desc = LdaTransform.Summary, + UserName = LdaTransform.UserName, + ShortName = LdaTransform.ShortName, XmlInclude = new[] { @"", @"" })] - public static CommonOutputs.TransformOutput LightLda(IHostEnvironment env, LatentDirichletAllocationTransformer.Arguments input) + public static CommonOutputs.TransformOutput LightLda(IHostEnvironment env, LdaTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(input, nameof(input)); var h = EntryPointUtils.CheckArgsAndCreateHost(env, "LightLda", input); - var cols = input.Column.Select(colPair => new LatentDirichletAllocationTransformer.ColumnInfo(colPair, input)).ToArray(); - var est = new LatentDirichletAllocationEstimator(h, cols); - var view = est.Fit(input.Data).Transform(input.Data); - + var view = new LdaTransform(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, view, input.Data), @@ -142,18 +140,18 @@ public static CommonOutputs.TransformOutput LightLda(IHostEnvironment env, Laten } [TlcModule.EntryPoint(Name = "Transforms.WordEmbeddings", - Desc = WordEmbeddingsExtractingTransformer.Summary, - UserName = WordEmbeddingsExtractingTransformer.UserName, - ShortName = WordEmbeddingsExtractingTransformer.ShortName, + Desc = WordEmbeddingsTransform.Summary, + UserName = WordEmbeddingsTransform.UserName, + ShortName = WordEmbeddingsTransform.ShortName, XmlInclude = new[] { @"", @"" })] - public static CommonOutputs.TransformOutput WordEmbeddings(IHostEnvironment env, WordEmbeddingsExtractingTransformer.Arguments input) + public static CommonOutputs.TransformOutput WordEmbeddings(IHostEnvironment env, WordEmbeddingsTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(input, nameof(input)); var h = EntryPointUtils.CheckArgsAndCreateHost(env, "WordEmbeddings", input); - var view = WordEmbeddingsExtractingTransformer.Create(h, input, input.Data); + var view = WordEmbeddingsTransform.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, view, input.Data), diff --git a/src/Microsoft.ML.Transforms/ExtensionsCatalog.cs b/src/Microsoft.ML.Transforms/ExtensionsCatalog.cs index 6e14ba7d05..2ece80109a 100644 --- a/src/Microsoft.ML.Transforms/ExtensionsCatalog.cs +++ b/src/Microsoft.ML.Transforms/ExtensionsCatalog.cs @@ -41,11 +41,11 @@ public static class MissingValueReplacerCatalog /// The name of the input column. /// The optional name of the output column, /// If not provided, the will be replaced with the results of the transforms. - /// The type of replacement to use as specified in + /// The type of replacement to use as specified in public static MissingValueReplacingEstimator ReplaceMissingValues(this TransformsCatalog catalog, string inputColumn, string outputColumn = null, - MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementKind = MissingValueReplacingEstimator.Defaults.ReplacementMode) + NAReplaceTransform.ColumnInfo.ReplacementMode replacementKind = MissingValueReplacingEstimator.Defaults.ReplacementMode) => new MissingValueReplacingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, replacementKind); /// @@ -53,7 +53,7 @@ public static MissingValueReplacingEstimator ReplaceMissingValues(this Transform /// /// The transform's catalog. /// The name of the columns to use, and per-column transformation configuraiton. - public static MissingValueReplacingEstimator ReplaceMissingValues(this TransformsCatalog catalog, params MissingValueReplacingTransformer.ColumnInfo[] columns) + public static MissingValueReplacingEstimator ReplaceMissingValues(this TransformsCatalog catalog, params NAReplaceTransform.ColumnInfo[] columns) => new MissingValueReplacingEstimator(CatalogUtils.GetEnvironment(catalog), columns); } @@ -69,7 +69,7 @@ public static class ToBinaryVectorCatalog /// The input column. /// public static KeyToBinaryVectorMappingEstimator MapKeyToBinaryVector(this TransformsCatalog.CategoricalTransforms catalog, - params KeyToBinaryVectorMappingTransformer.ColumnInfo[] columns) + params KeyToBinaryVectorTransform.ColumnInfo[] columns) => new KeyToBinaryVectorMappingEstimator(CatalogUtils.GetEnvironment(catalog), columns); /// diff --git a/src/Microsoft.ML.Transforms/GcnTransform.cs b/src/Microsoft.ML.Transforms/GcnTransform.cs index 2f7d54f22d..7d32a370e1 100644 --- a/src/Microsoft.ML.Transforms/GcnTransform.cs +++ b/src/Microsoft.ML.Transforms/GcnTransform.cs @@ -2,7 +2,6 @@ // 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.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; @@ -10,28 +9,19 @@ using Microsoft.ML.Runtime.Internal.CpuMath; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Model; -using Microsoft.ML.StaticPipe; -using Microsoft.ML.StaticPipe.Runtime; using Microsoft.ML.Transforms.Projections; using System; -using System.Collections.Generic; -using System.Linq; using System.Text; +using Float = System.Single; -[assembly: LoadableClass(LpNormalizingTransformer.GcnSummary, typeof(IDataTransform), typeof(LpNormalizingTransformer), typeof(LpNormalizingTransformer.GcnArguments), typeof(SignatureDataTransform), - LpNormalizingTransformer.UserNameGn, "GcnTransform", LpNormalizingTransformer.ShortNameGn)] +[assembly: LoadableClass(LpNormNormalizerTransform.GcnSummary, typeof(LpNormNormalizerTransform), typeof(LpNormNormalizerTransform.GcnArguments), typeof(SignatureDataTransform), + LpNormNormalizerTransform.UserNameGn, "GcnTransform", LpNormNormalizerTransform.ShortNameGn)] -[assembly: LoadableClass(LpNormalizingTransformer.GcnSummary, typeof(IDataTransform), typeof(LpNormalizingTransformer), null, typeof(SignatureLoadDataTransform), - LpNormalizingTransformer.UserNameGn, LpNormalizingTransformer.LoaderSignature, LpNormalizingTransformer.LoaderSignatureOld)] +[assembly: LoadableClass(LpNormNormalizerTransform.GcnSummary, typeof(LpNormNormalizerTransform), null, typeof(SignatureLoadDataTransform), + LpNormNormalizerTransform.UserNameGn, LpNormNormalizerTransform.LoaderSignature, LpNormNormalizerTransform.LoaderSignatureOld)] -[assembly: LoadableClass(LpNormalizingTransformer.Summary, typeof(IDataTransform), typeof(LpNormalizingTransformer), typeof(LpNormalizingTransformer.Arguments), typeof(SignatureDataTransform), - LpNormalizingTransformer.UserNameLP, "LpNormNormalizer", LpNormalizingTransformer.ShortNameLP)] - -[assembly: LoadableClass(LpNormalizingTransformer.Summary, typeof(LpNormalizingTransformer), null, typeof(SignatureLoadModel), - LpNormalizingTransformer.UserNameGn, LpNormalizingTransformer.LoaderSignature)] - -[assembly: LoadableClass(typeof(IRowMapper), typeof(LpNormalizingTransformer), null, typeof(SignatureLoadRowMapper), - LpNormalizingTransformer.UserNameGn, LpNormalizingTransformer.LoaderSignature)] +[assembly: LoadableClass(LpNormNormalizerTransform.Summary, typeof(LpNormNormalizerTransform), typeof(LpNormNormalizerTransform.Arguments), typeof(SignatureDataTransform), + LpNormNormalizerTransform.UserNameLP, "LpNormNormalizer", LpNormNormalizerTransform.ShortNameLP)] [assembly: EntryPointModule(typeof(LpNormalization))] @@ -50,18 +40,38 @@ namespace Microsoft.ML.Transforms.Projections /// Usage examples and Matlab code: /// https://www.cs.stanford.edu/~acoates/papers/coatesleeng_aistats_2011.pdf. /// - public sealed class LpNormalizingTransformer : OneToOneTransformerBase + public sealed class LpNormNormalizerTransform : OneToOneTransformBase { + /// + /// The kind of unit norm vectors are rescaled to. This enumeration is serialized. + /// + public enum NormalizerKind : byte + { + L2Norm = 0, + StdDev = 1, + L1Norm = 2, + LInf = 3 + } + + private static class Defaults + { + public const NormalizerKind NormKind = NormalizerKind.L2Norm; + public const bool LpSubMean = false; + public const bool GcnSubMean = true; + public const bool UseStdDev = false; + public const Float Scale = 1; + } + public sealed class Arguments : TransformInputBase { [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "New column definition(s) (optional form: name:src)", ShortName = "col", SortOrder = 1)] public Column[] Column; [Argument(ArgumentType.AtMostOnce, HelpText = "The norm to use to normalize each sample", ShortName = "norm", SortOrder = 1)] - public LpNormalizingEstimatorBase.NormalizerKind NormKind = LpNormalizingEstimatorBase.Defaults.NormKind; + public NormalizerKind NormKind = Defaults.NormKind; [Argument(ArgumentType.AtMostOnce, HelpText = "Subtract mean from each value before normalizing", SortOrder = 2)] - public bool SubMean = LpNormalizingEstimatorBase.Defaults.LpSubstractMean; + public bool SubMean = Defaults.LpSubMean; } public sealed class GcnArguments : TransformInputBase @@ -70,13 +80,13 @@ public sealed class GcnArguments : TransformInputBase public GcnColumn[] Column; [Argument(ArgumentType.AtMostOnce, HelpText = "Subtract mean from each value before normalizing", SortOrder = 1)] - public bool SubMean = LpNormalizingEstimatorBase.Defaults.GcnSubstractMean; + public bool SubMean = Defaults.GcnSubMean; [Argument(ArgumentType.AtMostOnce, HelpText = "Normalize by standard deviation rather than L2 norm", ShortName = "useStd")] - public bool UseStdDev = LpNormalizingEstimatorBase.Defaults.UseStdDev; + public bool UseStdDev = Defaults.UseStdDev; [Argument(ArgumentType.AtMostOnce, HelpText = "Scale features by this value")] - public float Scale = LpNormalizingEstimatorBase.Defaults.Scale; + public Float Scale = Defaults.Scale; } public abstract class ColumnBase : OneToOneColumn @@ -96,7 +106,7 @@ protected override bool TryUnparseCore(StringBuilder sb) public sealed class Column : ColumnBase { [Argument(ArgumentType.AtMostOnce, HelpText = "The norm to use to normalize each sample", ShortName = "norm", SortOrder = 1)] - public LpNormalizingEstimatorBase.NormalizerKind? NormKind; + public NormalizerKind? NormKind; public static Column Parse(string str) { @@ -123,7 +133,7 @@ public sealed class GcnColumn : ColumnBase public bool? UseStdDev; [Argument(ArgumentType.AtMostOnce, HelpText = "Scale features by this value")] - public float? Scale; + public Float? Scale; public static GcnColumn Parse(string str) { @@ -144,122 +154,66 @@ public bool TryUnparse(StringBuilder sb) } } - /// - /// Describes how the transformer handles one Gcn column pair. - /// - public sealed class GcnColumnInfo : ColumnInfoBase - { - /// - /// Describes how the transformer handles one Gcn column pair. - /// - /// Name of input column. - /// Name of output column. - /// Subtract mean from each value before normalizing. - /// Normalize by standard deviation rather than L2 norm. - /// Scale features by this value. - public GcnColumnInfo(string input, string output, - bool substractMean = LpNormalizingEstimatorBase.Defaults.GcnSubstractMean, - bool useStdDev = LpNormalizingEstimatorBase.Defaults.UseStdDev, - float scale = LpNormalizingEstimatorBase.Defaults.Scale) - : base(input, output, substractMean, useStdDev ? LpNormalizingEstimatorBase.NormalizerKind.StdDev : LpNormalizingEstimatorBase.NormalizerKind.L2Norm, scale) - { - } - } - - /// - /// Describes how the transformer handles one LpNorm column pair. - /// - public sealed class LpNormColumnInfo : ColumnInfoBase + private sealed class ColInfoEx { - /// - /// Describes how the transformer handles one LpNorm column pair. - /// - /// Name of input column. - /// Name of output column. - /// Subtract mean from each value before normalizing. - /// The norm to use to normalize each sample. - public LpNormColumnInfo(string input, string output, - bool substractMean = LpNormalizingEstimatorBase.Defaults.LpSubstractMean, - LpNormalizingEstimatorBase.NormalizerKind normalizerKind = LpNormalizingEstimatorBase.Defaults.NormKind) - : base(input, output, substractMean, normalizerKind, 1) - { - } - } + public readonly bool SubtractMean; + public readonly NormalizerKind NormKind; + public readonly Float Scale; - private sealed class ColumnInfoLoaded : ColumnInfoBase - { - internal ColumnInfoLoaded(ModelLoadContext ctx, string input, string output, bool normKindSerialized) - : base(ctx, input, output, normKindSerialized) + public ColInfoEx(Column col, Arguments args) { - + SubtractMean = col.SubMean ?? args.SubMean; + NormKind = col.NormKind ?? args.NormKind; + Scale = 1; } - } - - /// - /// Describes base class for one column pair. - /// - public abstract class ColumnInfoBase - { - public readonly string Input; - public readonly string Output; - public readonly bool SubtractMean; - public readonly LpNormalizingEstimatorBase.NormalizerKind NormKind; - public readonly float Scale; - internal ColumnInfoBase(string input, string output, bool substractMean, LpNormalizingEstimatorBase.NormalizerKind normalizerKind, float scale) + public ColInfoEx(GcnColumn col, GcnArguments args) { - Contracts.CheckNonWhiteSpace(input, nameof(input)); - Contracts.CheckNonWhiteSpace(output, nameof(output)); - Input = input; - Output = output; - SubtractMean = substractMean; - Contracts.CheckUserArg(0 < scale && scale < float.PositiveInfinity, nameof(scale), "scale must be a positive finite value"); - Scale = scale; - NormKind = normalizerKind; + SubtractMean = col.SubMean ?? args.SubMean; + NormKind = (col.UseStdDev ?? args.UseStdDev) ? NormalizerKind.StdDev : NormalizerKind.L2Norm; + Scale = col.Scale ?? args.Scale; + Contracts.CheckUserArg(0 < Scale && Scale < Float.PositiveInfinity, nameof(args.Scale), "scale must be a positive finite value"); } - internal ColumnInfoBase(ModelLoadContext ctx, string input, string output, bool normKindSerialized) + public ColInfoEx(ModelLoadContext ctx, bool normKindSerialized) { Contracts.AssertValue(ctx); - Contracts.CheckNonWhiteSpace(input, nameof(input)); - Contracts.CheckNonWhiteSpace(output, nameof(output)); - Input = input; - Output = output; // *** Binary format *** - // byte: SubtractMean + // byte: subMean // byte: NormKind - // Float: Scale + // Float: scale SubtractMean = ctx.Reader.ReadBoolByte(); byte normKindVal = ctx.Reader.ReadByte(); - Contracts.CheckDecode(Enum.IsDefined(typeof(LpNormalizingEstimatorBase.NormalizerKind), normKindVal)); - NormKind = (LpNormalizingEstimatorBase.NormalizerKind)normKindVal; + Contracts.CheckDecode(Enum.IsDefined(typeof(NormalizerKind), normKindVal)); + NormKind = (NormalizerKind)normKindVal; // Note: In early versions, a bool option (useStd) to whether to normalize by StdDev rather than // L2 norm was used. normKind was added in version=verVectorNormalizerSupported. // normKind was defined in a way such that the serialized boolean (0: use StdDev, 1: use L2) is // still valid. Contracts.CheckDecode(normKindSerialized || - (NormKind == LpNormalizingEstimatorBase.NormalizerKind.L2Norm || NormKind == LpNormalizingEstimatorBase.NormalizerKind.StdDev)); + (NormKind == NormalizerKind.L2Norm || NormKind == NormalizerKind.StdDev)); Scale = ctx.Reader.ReadFloat(); - Contracts.CheckDecode(0 < Scale && Scale < float.PositiveInfinity); + Contracts.CheckDecode(0 < Scale && Scale < Float.PositiveInfinity); } - internal void Save(ModelSaveContext ctx) + public void Save(ModelSaveContext ctx) { Contracts.AssertValue(ctx); + // *** Binary format *** - // byte: SubtractMean + // byte: subMean // byte: NormKind - // Float: Scale + // Float: scale ctx.Writer.WriteBoolByte(SubtractMean); ctx.Writer.Write((byte)NormKind); - Contracts.Assert(0 < Scale && Scale < float.PositiveInfinity); + Contracts.Assert(0 < Scale && Scale < Float.PositiveInfinity); ctx.Writer.Write(Scale); } } internal const string GcnSummary = "Performs a global contrast normalization on input values: Y = (s * X - M) / D, where s is a scale, M is mean and D is " - + "either L2 norm or standard deviation."; + + "either L2 norm or standard deviation."; internal const string UserNameGn = "Global Contrast Normalization Transform"; internal const string ShortNameGn = "Gcn"; @@ -271,619 +225,477 @@ internal void Save(ModelSaveContext ctx) private const uint VerVectorNormalizerSupported = 0x00010002; - internal const string LoaderSignature = "GcnTransform"; + public const string LoaderSignature = "GcnTransform"; internal const string LoaderSignatureOld = "GcnFunction"; - private static VersionInfo GetVersionInfo() { return new VersionInfo( modelSignature: "GCNORMAF", // verWrittenCur: 0x00010001, // Initial - // verWrittenCur: 0x00010002, // Added arguments for Lp-norm (vector/row-wise) normalizer - verWrittenCur: 0x00010003, // Dropped sizeof(Float). - verReadableCur: 0x00010003, + verWrittenCur: 0x00010002, // Added arguments for Lp-norm (vector/row-wise) normalizer + verReadableCur: 0x00010002, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, loaderSignatureAlt: LoaderSignatureOld, - loaderAssemblyName: typeof(LpNormalizingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(LpNormNormalizerTransform).Assembly.FullName); } private const string RegistrationName = "LpNormNormalizer"; // REVIEW: should this be an argument instead? - private const float MinScale = 1e-8f; + private const Float MinScale = (Float)1e-8; - public IReadOnlyCollection Columns => _columns.AsReadOnly(); - private readonly ColumnInfoBase[] _columns; + private readonly ColInfoEx[] _exes; - private static (string input, string output)[] GetColumnPairs(ColumnInfoBase[] columns) - { - Contracts.CheckValue(columns, nameof(columns)); - return columns.Select(x => (x.Input, x.Output)).ToArray(); + /// + /// A helper method to create GlobalContrastNormalizer transform for public facing API. + /// + /// Host Environment. + /// Input . This is the output from previous transform or loader. + /// Name of the output column. + /// Name of the column to be transformed. If this is null '' will be used. + /// Subtract mean from each value before normalizing. + /// Normalize by standard deviation rather than L2 norm. + /// Scale features by this value. + public static IDataTransform CreateGlobalContrastNormalizer(IHostEnvironment env, + IDataView input, + string name, + string source = null, + bool subMean = Defaults.GcnSubMean, + bool useStdDev = Defaults.UseStdDev, + Float scale = Defaults.Scale) + { + var args = new GcnArguments() + { + Column = new[] { new GcnColumn(){ + Source = source ?? name, + Name = name + } + }, + SubMean = subMean, + UseStdDev = useStdDev, + Scale = scale + }; + return new LpNormNormalizerTransform(env, args, input); } - protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCol) - { - var inType = inputSchema.GetColumnType(srcCol); - if (!LpNormalizingEstimatorBase.IsColumnTypeValid(inType)) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", inputSchema.GetColumnName(srcCol), LpNormalizingEstimatorBase.ExpectedColumnType, inType.ToString()); - } /// - /// Create a that takes multiple pairs of columns. + /// Public constructor corresponding to SignatureDataTransform. /// - public LpNormalizingTransformer(IHostEnvironment env, params ColumnInfoBase[] columns) : - base(Contracts.CheckRef(env, nameof(env)).Register(nameof(LpNormalizingTransformer)), GetColumnPairs(columns)) + public LpNormNormalizerTransform(IHostEnvironment env, GcnArguments args, IDataView input) + : base(env, RegistrationName, env.CheckRef(args, nameof(args)).Column, + input, TestIsFloatVector) { - _columns = columns.ToArray(); - } + Host.AssertNonEmpty(Infos); + Host.Assert(Infos.Length == Utils.Size(args.Column)); - // Factory method for SignatureDataTransform for GcnArguments class. - internal static IDataTransform Create(IHostEnvironment env, GcnArguments args, IDataView input) - { - Contracts.CheckValue(env, nameof(env)); - env.CheckValue(args, nameof(args)); - env.CheckValue(input, nameof(input)); + _exes = new ColInfoEx[Infos.Length]; + for (int i = 0; i < _exes.Length; i++) + _exes[i] = new ColInfoEx(args.Column[i], args); - env.CheckValue(args.Column, nameof(args.Column)); - var cols = new GcnColumnInfo[args.Column.Length]; - using (var ch = env.Start("ValidateArgs")) + // REVIEW: for now check only global (default) values. Move to Bindings/ColInfoEx? + if (!args.SubMean && args.UseStdDev) { - for (int i = 0; i < cols.Length; i++) + using (var ch = Host.Start("Argument validation")) { - var item = args.Column[i]; - cols[i] = new GcnColumnInfo(item.Source ?? item.Name, - item.Name, - item.SubMean ?? args.SubMean, - item.UseStdDev ?? args.UseStdDev, - item.Scale ?? args.Scale); - } - if (!args.SubMean && args.UseStdDev) ch.Warning("subMean parameter is false while useStd is true. It is advisable to set subMean to true in case useStd is set to true."); + } } - return new LpNormalizingTransformer(env, cols).MakeDataTransform(input); + SetMetadata(); } - // Factory method for SignatureDataTransform for Arguments class. - internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) - { - Contracts.CheckValue(env, nameof(env)); - env.CheckValue(args, nameof(args)); - env.CheckValue(input, nameof(input)); - - env.CheckValue(args.Column, nameof(args.Column)); - var cols = new LpNormColumnInfo[args.Column.Length]; - using (var ch = env.Start("ValidateArgs")) + /// + /// A helper method to create LpNormNormalizer transform for public facing API. + /// + /// Host Environment. + /// Input . This is the output from previous transform or loader. + /// Name of the output column. + /// Name of the column to be transformed. If this is null '' will be used. + /// The norm to use to normalize each sample. + /// Subtract mean from each value before normalizing. + public static IDataTransform CreateLpNormNormalizer(IHostEnvironment env, + IDataView input, + string name, + string source = null, + NormalizerKind normKind = Defaults.NormKind, + bool subMean = Defaults.LpSubMean) + { + var args = new Arguments() { - for (int i = 0; i < cols.Length; i++) - { - var item = args.Column[i]; - cols[i] = new LpNormColumnInfo(item.Source ?? item.Name, - item.Name, - item.SubMean ?? args.SubMean, - item.NormKind ?? args.NormKind); - } - } - return new LpNormalizingTransformer(env, cols).MakeDataTransform(input); + Column = new[] { new Column(){ + Source = source ?? name, + Name = name + } + }, + SubMean = subMean, + NormKind = normKind + }; + return new LpNormNormalizerTransform(env, args, input); } - // Factory method for SignatureLoadModel. - private static LpNormalizingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + public LpNormNormalizerTransform(IHostEnvironment env, Arguments args, IDataView input) + : base(env, RegistrationName, env.CheckRef(args, nameof(args)).Column, + input, TestIsFloatVector) { - Contracts.CheckValue(env, nameof(env)); - var host = env.Register(nameof(LpNormalizingTransformer)); + Host.AssertNonEmpty(Infos); + Host.Assert(Infos.Length == Utils.Size(args.Column)); - host.CheckValue(ctx, nameof(ctx)); - ctx.CheckAtModel(GetVersionInfo()); - if (ctx.Header.ModelVerWritten <= 0x00010002) - { - int cbFloat = ctx.Reader.ReadInt32(); - env.CheckDecode(cbFloat == sizeof(float)); - } - return new LpNormalizingTransformer(host, ctx); + _exes = new ColInfoEx[Infos.Length]; + for (int i = 0; i < _exes.Length; i++) + _exes[i] = new ColInfoEx(args.Column[i], args); + SetMetadata(); } - // Factory method for SignatureLoadDataTransform. - private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) - => Create(env, ctx).MakeDataTransform(input); - - // Factory method for SignatureLoadRowMapper. - private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) - => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); - - private LpNormalizingTransformer(IHost host, ModelLoadContext ctx) - : base(host, ctx) + private LpNormNormalizerTransform(IHost host, ModelLoadContext ctx, IDataView input) + : base(host, ctx, input, TestIsFloatItem) { + Host.AssertValue(ctx); + // *** Binary format *** // // - // - var columnsLength = ColumnPairs.Length; - _columns = new ColumnInfoLoaded[columnsLength]; - for (int i = 0; i < columnsLength; i++) - _columns[i] = new ColumnInfoLoaded(ctx, ColumnPairs[i].input, ColumnPairs[i].output, ctx.Header.ModelVerWritten >= VerVectorNormalizerSupported); + // foreach added column + // ColInfoEx + + Host.AssertNonEmpty(Infos); + _exes = new ColInfoEx[Infos.Length]; + for (int i = 0; i < _exes.Length; i++) + _exes[i] = new ColInfoEx(ctx, ctx.Header.ModelVerWritten >= VerVectorNormalizerSupported); + SetMetadata(); + } + + public static LpNormNormalizerTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + { + Contracts.CheckValue(env, nameof(env)); + var h = env.Register(RegistrationName); + h.CheckValue(ctx, nameof(ctx)); + h.CheckValue(input, nameof(input)); + ctx.CheckAtModel(GetVersionInfo()); + return h.Apply("Loading Model", + ch => + { + // *** Binary format *** + // int: sizeof(Float) + // + int cbFloat = ctx.Reader.ReadInt32(); + ch.CheckDecode(cbFloat == sizeof(Float)); + return new LpNormNormalizerTransform(h, ctx, input); + }); } public override void Save(ModelSaveContext ctx) { Host.CheckValue(ctx, nameof(ctx)); - ctx.CheckAtModel(); ctx.SetVersionInfo(GetVersionInfo()); // *** Binary format *** + // int: sizeof(Float) // - // - SaveColumns(ctx); - - Host.Assert(_columns.Length == ColumnPairs.Length); - foreach (var col in _columns) - col.Save(ctx); + // foreach added column + // ColInfoEx + ctx.Writer.Write(sizeof(Float)); + SaveBase(ctx); + Host.Assert(_exes.Length == Infos.Length); + for (int i = 0; i < _exes.Length; i++) + _exes[i].Save(ctx); } - protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, Schema.Create(schema)); - - private sealed class Mapper : OneToOneMapperBase + protected override ColumnType GetColumnTypeCore(int iinfo) { - private readonly ColumnType[] _srcTypes; - private readonly int[] _srcCols; - private readonly ColumnType[] _types; - private readonly LpNormalizingTransformer _parent; - - public Mapper(LpNormalizingTransformer parent, Schema inputSchema) - : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) - { - _parent = parent; - _types = new ColumnType[_parent.ColumnPairs.Length]; - _srcTypes = new ColumnType[_parent.ColumnPairs.Length]; - _srcCols = new int[_parent.ColumnPairs.Length]; - for (int i = 0; i < _parent.ColumnPairs.Length; i++) - { - inputSchema.TryGetColumnIndex(_parent.ColumnPairs[i].input, out _srcCols[i]); - var srcCol = inputSchema[_srcCols[i]]; - _srcTypes[i] = srcCol.Type; - _types[i] = srcCol.Type; - } - } + Host.Check(0 <= iinfo & iinfo < Infos.Length); + return Infos[iinfo].TypeSrc; + } - protected override Schema.Column[] GetOutputColumnsCore() + private void SetMetadata() + { + var md = Metadata; + for (int iinfo = 0; iinfo < Infos.Length; iinfo++) { - var result = new Schema.Column[_parent.ColumnPairs.Length]; - for (int i = 0; i < _parent.ColumnPairs.Length; i++) - { - var builder = new Schema.Metadata.Builder(); - builder.Add(InputSchema[ColMapNewToOld[i]].Metadata, name => name == MetadataUtils.Kinds.SlotNames); - ValueGetter getter = (ref bool dst) => dst = true; - builder.Add(new Schema.Column(MetadataUtils.Kinds.IsNormalized, BoolType.Instance, null), getter); - result[i] = new Schema.Column(_parent.ColumnPairs[i].output, _types[i], builder.GetMetadata()); - } - return result; + using (var bldr = md.BuildMetadata(iinfo, Source.Schema, Infos[iinfo].Source, MetadataUtils.Kinds.SlotNames)) + bldr.AddPrimitive(MetadataUtils.Kinds.IsNormalized, BoolType.Instance, true); } + md.Seal(); + } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) - { - Contracts.AssertValue(input); - Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); - disposer = null; + protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, out Action disposer) + { + Host.AssertValueOrNull(ch); + Host.AssertValue(input); + Host.Assert(0 <= iinfo && iinfo < Infos.Length); + disposer = null; - var ex = _parent._columns[iinfo]; - Host.Assert(0 < ex.Scale && ex.Scale < float.PositiveInfinity); - Host.Assert(_srcTypes[iinfo].IsVector); + var info = Infos[iinfo]; + var ex = _exes[iinfo]; + Host.Assert(0 < ex.Scale && ex.Scale < Float.PositiveInfinity); + Host.Assert(info.TypeSrc.IsVector); - var getSrc = input.GetGetter>(_srcCols[iinfo]); - var src = default(VBuffer); - ValueGetter> del; - float scale = ex.Scale; - - if (ex.SubtractMean) - { - switch (ex.NormKind) - { - case LpNormalizingEstimatorBase.NormalizerKind.StdDev: - del = - (ref VBuffer dst) => - { - getSrc(ref src); - var srcValues = src.GetValues(); - var mean = Mean(srcValues, src.Length); - var divisor = StdDev(srcValues, src.Length, mean); - FillValues(Host, in src, ref dst, divisor, scale, mean); - }; - return del; - case LpNormalizingEstimatorBase.NormalizerKind.L2Norm: - del = - (ref VBuffer dst) => - { - getSrc(ref src); - var srcValues = src.GetValues(); - var mean = Mean(srcValues, src.Length); - var divisor = L2Norm(srcValues, mean); - FillValues(Host, in src, ref dst, divisor, scale, mean); - }; - return del; - case LpNormalizingEstimatorBase.NormalizerKind.L1Norm: - del = - (ref VBuffer dst) => - { - getSrc(ref src); - var srcValues = src.GetValues(); - var mean = Mean(srcValues, src.Length); - var divisor = L1Norm(srcValues, mean); - FillValues(Host, in src, ref dst, divisor, scale, mean); - }; - return del; - case LpNormalizingEstimatorBase.NormalizerKind.LInf: - del = - (ref VBuffer dst) => - { - getSrc(ref src); - var srcValues = src.GetValues(); - var mean = Mean(srcValues, src.Length); - var divisor = LInfNorm(srcValues, mean); - FillValues(Host, in src, ref dst, divisor, scale, mean); - }; - return del; - default: - Host.Assert(false, "Unsupported normalizer type"); - goto case LpNormalizingEstimatorBase.NormalizerKind.L2Norm; - } - } + var getSrc = GetSrcGetter>(input, iinfo); + var src = default(VBuffer); + ValueGetter> del; + Float scale = ex.Scale; + if (ex.SubtractMean) + { switch (ex.NormKind) { - case LpNormalizingEstimatorBase.NormalizerKind.StdDev: + case NormalizerKind.StdDev: del = - (ref VBuffer dst) => + (ref VBuffer dst) => { getSrc(ref src); - var divisor = StdDev(src.GetValues(), src.Length); - FillValues(Host, in src, ref dst, divisor, scale); + Float mean = Mean(src.Values, src.Count, src.Length); + Float divisor = StdDev(src.Values, src.Count, src.Length, mean); + FillValues(Host, in src, ref dst, divisor, scale, mean); }; return del; - case LpNormalizingEstimatorBase.NormalizerKind.L2Norm: + case NormalizerKind.L2Norm: del = - (ref VBuffer dst) => + (ref VBuffer dst) => { getSrc(ref src); - var divisor = L2Norm(src.GetValues()); - FillValues(Host, in src, ref dst, divisor, scale); + Float mean = Mean(src.Values, src.Count, src.Length); + Float divisor = L2Norm(src.Values, src.Count, mean); + FillValues(Host, in src, ref dst, divisor, scale, mean); }; return del; - case LpNormalizingEstimatorBase.NormalizerKind.L1Norm: + case NormalizerKind.L1Norm: del = - (ref VBuffer dst) => + (ref VBuffer dst) => { getSrc(ref src); - var divisor = L1Norm(src.GetValues()); - FillValues(Host, in src, ref dst, divisor, scale); + Float mean = Mean(src.Values, src.Count, src.Length); + Float divisor = L1Norm(src.Values, src.Count, mean); + FillValues(Host, in src, ref dst, divisor, scale, mean); }; return del; - case LpNormalizingEstimatorBase.NormalizerKind.LInf: + case NormalizerKind.LInf: del = - (ref VBuffer dst) => + (ref VBuffer dst) => { getSrc(ref src); - var divisor = LInfNorm(src.GetValues()); - FillValues(Host, in src, ref dst, divisor, scale); + Float mean = Mean(src.Values, src.Count, src.Length); + Float divisor = LInfNorm(src.Values, src.Count, mean); + FillValues(Host, in src, ref dst, divisor, scale, mean); }; return del; default: Host.Assert(false, "Unsupported normalizer type"); - goto case LpNormalizingEstimatorBase.NormalizerKind.L2Norm; + goto case NormalizerKind.L2Norm; } } - private static void FillValues(IExceptionContext ectx, in VBuffer src, ref VBuffer dst, float divisor, float scale, float offset = 0) + switch (ex.NormKind) { - var srcValues = src.GetValues(); - int count = srcValues.Length; - int length = src.Length; - ectx.Assert(divisor >= 0); - - if (count == 0) - { - VBufferUtils.Resize(ref dst, length, 0); - return; - } - ectx.Assert(count > 0); - ectx.Assert(length > 0); - - float normScale = scale; - if (divisor > 0) - normScale /= divisor; - - // Don't normalize small values. - if (normScale < MinScale) - normScale = 1; - - VBufferEditor editor; - if (offset == 0) - { - editor = VBufferEditor.Create(ref dst, length, count); - var dstValues = editor.Values; - if (!src.IsDense) - { - src.GetIndices().CopyTo(editor.Indices); - } - - CpuMathUtils.Scale(normScale, src.GetValues(), dstValues, count); - dst = editor.Commit(); - - return; - } - - // Subtracting the mean requires a dense representation. - src.CopyToDense(ref dst); - - editor = VBufferEditor.CreateFromBuffer(ref dst); - if (normScale != 1) - CpuMathUtils.ScaleAdd(normScale, -offset, editor.Values); - else - CpuMathUtils.Add(-offset, editor.Values); + case NormalizerKind.StdDev: + del = + (ref VBuffer dst) => + { + getSrc(ref src); + Float divisor = StdDev(src.Values, src.Count, src.Length); + FillValues(Host, in src, ref dst, divisor, scale); + }; + return del; + case NormalizerKind.L2Norm: + del = + (ref VBuffer dst) => + { + getSrc(ref src); + Float divisor = L2Norm(src.Values, src.Count); + FillValues(Host, in src, ref dst, divisor, scale); + }; + return del; + case NormalizerKind.L1Norm: + del = + (ref VBuffer dst) => + { + getSrc(ref src); + Float divisor = L1Norm(src.Values, src.Count); + FillValues(Host, in src, ref dst, divisor, scale); + }; + return del; + case NormalizerKind.LInf: + del = + (ref VBuffer dst) => + { + getSrc(ref src); + Float divisor = LInfNorm(src.Values, src.Count); + FillValues(Host, in src, ref dst, divisor, scale); + }; + return del; + default: + Host.Assert(false, "Unsupported normalizer type"); + goto case NormalizerKind.L2Norm; } + } - /// - /// Compute Standard Deviation. In case of both subMean and useStd are true, we technically need to compute variance - /// based on centered values (i.e. after subtracting the mean). But since the centered - /// values mean is approximately zero, we can use variance of non-centered values. - /// - private static float StdDev(ReadOnlySpan values, int length) + private static void FillValues(IExceptionContext ectx, in VBuffer src, ref VBuffer dst, Float divisor, Float scale, Float offset = 0) + { + int count = src.Count; + int length = src.Length; + ectx.Assert(Utils.Size(src.Values) >= count); + ectx.Assert(divisor >= 0); + + if (count == 0) { - Contracts.Assert(0 <= values.Length && values.Length <= length); - if (values.Length == 0) - return 0; - // We need a mean to compute variance. - var tmpMean = CpuMathUtils.Sum(values) / length; - float sumSq = 0; - if (values.Length != length && tmpMean != 0) - { - // Sparse representation. - float meanSq = tmpMean * tmpMean; - sumSq = (length - values.Length) * meanSq; - } - sumSq += CpuMathUtils.SumSq(tmpMean, values); - return MathUtils.Sqrt(sumSq / length); + dst = new VBuffer(length, 0, dst.Values, dst.Indices); + return; } + ectx.Assert(count > 0); + ectx.Assert(length > 0); + + Float normScale = scale; + if (divisor > 0) + normScale /= divisor; - /// - /// Compute Standard Deviation. - /// We have two overloads of StdDev instead of one with mean for perf reasons. - /// - private static float StdDev(ReadOnlySpan values, int length, float mean) + // Don't normalize small values. + if (normScale < MinScale) + normScale = 1; + + if (offset == 0) { - Contracts.Assert(0 <= values.Length && values.Length <= length); - if (values.Length == 0) - return 0; - float sumSq = 0; - if (values.Length != length && mean != 0) + var dstValues = dst.Values; + if (Utils.Size(dstValues) < count) + dstValues = new Float[count]; + var dstIndices = dst.Indices; + if (!src.IsDense) { - // Sparse representation. - float meanSq = mean * mean; - sumSq = (length - values.Length) * meanSq; + if (Utils.Size(dstIndices) < count) + dstIndices = new int[count]; + Array.Copy(src.Indices, dstIndices, count); } - sumSq += CpuMathUtils.SumSq(mean, values); - return MathUtils.Sqrt(sumSq / length); - } - /// - /// Compute L2-norm. L2-norm computation doesn't subtract the mean from the source values. - /// However, we substract the mean here in case subMean is true (if subMean is false, mean is zero). - /// - private static float L2Norm(ReadOnlySpan values, float mean = 0) - { - if (values.Length == 0) - return 0; - return MathUtils.Sqrt(CpuMathUtils.SumSq(mean, values)); - } + CpuMathUtils.Scale(normScale, src.Values, dstValues, count); + dst = new VBuffer(length, count, dstValues, dstIndices); - /// - /// Compute L1-norm. L1-norm computation doesn't subtract the mean from the source values. - /// However, we substract the mean here in case subMean is true (if subMean is false, mean is zero). - /// - private static float L1Norm(ReadOnlySpan values, float mean = 0) - { - if (values.Length == 0) - return 0; - return CpuMathUtils.SumAbs(mean, values); + return; } - /// - /// Compute LInf-norm. LInf-norm computation doesn't subtract the mean from the source values. - /// However, we substract the mean here in case subMean is true (if subMean is false, mean is zero). - /// - private static float LInfNorm(ReadOnlySpan values, float mean = 0) - { - if (values.Length == 0) - return 0; - return CpuMathUtils.MaxAbsDiff(mean, values); - } + // Subtracting the mean requires a dense representation. + src.CopyToDense(ref dst); - private static float Mean(ReadOnlySpan src, int length) - { - if (length == 0 || src.Length == 0) - return 0; - return CpuMathUtils.Sum(src) / length; - } + if (normScale != 1) + CpuMathUtils.ScaleAdd(normScale, -offset, dst.Values.AsSpan(0, length)); + else + CpuMathUtils.Add(-offset, dst.Values.AsSpan(0, length)); } - } - public static class LpNormalization - { - [TlcModule.EntryPoint(Name = "Transforms.LpNormalizer", - Desc = LpNormalizingTransformer.Summary, - UserName = LpNormalizingTransformer.UserNameLP, - ShortName = LpNormalizingTransformer.ShortNameLP, - XmlInclude = new[] { @"" })] - public static CommonOutputs.TransformOutput Normalize(IHostEnvironment env, LpNormalizingTransformer.Arguments input) - { - var h = EntryPointUtils.CheckArgsAndCreateHost(env, "LpNormalize", input); - var xf = LpNormalizingTransformer.Create(h, input, input.Data); - return new CommonOutputs.TransformOutput() - { - Model = new TransformModel(h, xf, input.Data), - OutputData = xf - }; - } - - [TlcModule.EntryPoint(Name = "Transforms.GlobalContrastNormalizer", - Desc = LpNormalizingTransformer.GcnSummary, - UserName = LpNormalizingTransformer.UserNameGn, - ShortName = LpNormalizingTransformer.ShortNameGn, - XmlInclude = new[] { @"" })] - public static CommonOutputs.TransformOutput GcNormalize(IHostEnvironment env, LpNormalizingTransformer.GcnArguments input) - { - var h = EntryPointUtils.CheckArgsAndCreateHost(env, "GcNormalize", input); - var xf = LpNormalizingTransformer.Create(h, input, input.Data); - return new CommonOutputs.TransformOutput() - { - Model = new TransformModel(h, xf, input.Data), - OutputData = xf - }; - } - } - - /// - /// Base estimator class for LpNorm and Gcn normalizers. - /// - public abstract class LpNormalizingEstimatorBase : TrivialEstimator - { /// - /// The kind of unit norm vectors are rescaled to. This enumeration is serialized. + /// Compute Standard Deviation. In case of both subMean and useStd are true, we technically need to compute variance + /// based on centered values (i.e. after subtracting the mean). But since the centered + /// values mean is approximately zero, we can use variance of non-centered values. /// - public enum NormalizerKind : byte - { - L2Norm = 0, - StdDev = 1, - L1Norm = 2, - LInf = 3 - } - - internal static class Defaults - { - public const NormalizerKind NormKind = NormalizerKind.L2Norm; - public const bool LpSubstractMean = false; - public const bool GcnSubstractMean = true; - public const bool UseStdDev = false; - public const float Scale = 1; + private static Float StdDev(Float[] values, int count, int length) + { + Contracts.Assert(0 <= count && count <= length); + if (count == 0) + return 0; + // We need a mean to compute variance. + Float tmpMean = CpuMathUtils.Sum(values.AsSpan(0, count)) / length; + Float sumSq = 0; + if (count != length && tmpMean != 0) + { + // Sparse representation. + Float meanSq = tmpMean * tmpMean; + sumSq = (length - count) * meanSq; + } + sumSq += CpuMathUtils.SumSq(tmpMean, values.AsSpan(0, count)); + return MathUtils.Sqrt(sumSq / length); } /// - /// Create a that takes multiple pairs of columns. + /// Compute Standard Deviation. + /// We have two overloads of StdDev instead of one with mean for perf reasons. /// - public LpNormalizingEstimatorBase(IHostEnvironment env, params LpNormalizingTransformer.ColumnInfoBase[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(LpNormalizingEstimator)), new LpNormalizingTransformer(env, columns)) - { - - } - - internal static bool IsColumnTypeValid(ColumnType type) + private static Float StdDev(Float[] values, int count, int length, Float mean) { - if (!(type.IsVector && type.IsKnownSizeVector)) - return false; - return type.ItemType == NumberType.R4; - } - - internal static bool IsSchemaColumnValid(SchemaShape.Column col) - { - if (col.Kind != SchemaShape.Column.VectorKind.Vector) - return false; - return col.ItemType == NumberType.R4; - } - - internal const string ExpectedColumnType = "Expected float or float vector of known size"; - - public override SchemaShape GetOutputSchema(SchemaShape inputSchema) - { - Host.CheckValue(inputSchema, nameof(inputSchema)); - var result = inputSchema.Columns.ToDictionary(x => x.Name); - foreach (var colPair in Transformer.Columns) + Contracts.Assert(0 <= count && count <= length); + if (count == 0) + return 0; + Float sumSq = 0; + if (count != length && mean != 0) { - if (!inputSchema.TryFindColumn(colPair.Input, out var col)) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", colPair.Input); - if (!IsSchemaColumnValid(col)) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", colPair.Input, ExpectedColumnType, col.GetTypeString()); - var metadata = new List(); - if (col.Metadata.TryFindColumn(MetadataUtils.Kinds.SlotNames, out var slotMeta)) - metadata.Add(slotMeta); - metadata.Add(new SchemaShape.Column(MetadataUtils.Kinds.IsNormalized, SchemaShape.Column.VectorKind.Scalar, BoolType.Instance, false)); - result[colPair.Output] = new SchemaShape.Column(colPair.Output, col.Kind, col.ItemType, false, new SchemaShape(metadata.ToArray())); + // Sparse representation. + Float meanSq = mean * mean; + sumSq = (length - count) * meanSq; } - return new SchemaShape(result.Values); + sumSq += CpuMathUtils.SumSq(mean, values.AsSpan(0, count)); + return MathUtils.Sqrt(sumSq / length); } - } - /// - /// Lp Normalizing estimator allow you take columns and normalize them individually by rescaling them to unit norm. - /// - public sealed class LpNormalizingEstimator : LpNormalizingEstimatorBase - { - /// - /// The environment. - /// Name of the input column. - /// Name of the column resulting from the transformation of . Null means is replaced. - /// Type of norm to use to normalize each sample. - /// Subtract mean from each value before normalizing. - public LpNormalizingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, - NormalizerKind normKind = Defaults.NormKind, bool substractMean = Defaults.LpSubstractMean) - : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, normKind, substractMean) + /// + /// Compute L2-norm. L2-norm computation doesn't subtract the mean from the source values. + /// However, we substract the mean here in case subMean is true (if subMean is false, mean is zero). + /// + private static Float L2Norm(Float[] values, int count, Float mean = 0) { + if (count == 0) + return 0; + return MathUtils.Sqrt(CpuMathUtils.SumSq(mean, values.AsSpan(0, count))); } - /// - /// The environment. - /// Pairs of columns to run the normalization on. - /// Type of norm to use to normalize each sample. - /// Subtract mean from each value before normalizing. - public LpNormalizingEstimator(IHostEnvironment env, (string input, string output)[] columns, - NormalizerKind normKind = Defaults.NormKind, bool substractMean = Defaults.LpSubstractMean) - : this(env, columns.Select(x => new LpNormalizingTransformer.LpNormColumnInfo(x.input, x.output, substractMean, normKind)).ToArray()) + /// + /// Compute L1-norm. L1-norm computation doesn't subtract the mean from the source values. + /// However, we substract the mean here in case subMean is true (if subMean is false, mean is zero). + /// + private static Float L1Norm(Float[] values, int count, Float mean = 0) { + if (count == 0) + return 0; + return CpuMathUtils.SumAbs(mean, values.AsSpan(0, count)); } /// - /// Create a that takes multiple pairs of columns. + /// Compute LInf-norm. LInf-norm computation doesn't subtract the mean from the source values. + /// However, we substract the mean here in case subMean is true (if subMean is false, mean is zero). /// - public LpNormalizingEstimator(IHostEnvironment env, params LpNormalizingTransformer.LpNormColumnInfo[] columns) - : base(env, columns) + private static Float LInfNorm(Float[] values, int count, Float mean = 0) { + if (count == 0) + return 0; + return CpuMathUtils.MaxAbsDiff(mean, values.AsSpan(0, count)); } - } - /// - /// Global contrast normalizing estimator allow you take columns and performs global constrast normalization on them. - /// - public sealed class GlobalContrastNormalizingEstimator : LpNormalizingEstimatorBase - { - /// - /// The environment. - /// Name of the input column. - /// Name of the column resulting from the transformation of . Null means is replaced. - /// Subtract mean from each value before normalizing. - /// Normalize by standard deviation rather than L2 norm. - /// Scale features by this value. - public GlobalContrastNormalizingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, - bool substractMean = Defaults.GcnSubstractMean, bool useStdDev = Defaults.UseStdDev, float scale = Defaults.Scale) - : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, substractMean, useStdDev, scale) + private static Float Mean(Float[] src, int count, int length) { + if (length == 0 || count == 0) + return 0; + return CpuMathUtils.Sum(src.AsSpan(0, count)) / length; } + } - /// - /// The environment. - /// Pairs of columns to run the normalization on. - /// Subtract mean from each value before normalizing. - /// Normalize by standard deviation rather than L2 norm. - /// Scale features by this value. - public GlobalContrastNormalizingEstimator(IHostEnvironment env, (string input, string output)[] columns, - bool substractMean = Defaults.GcnSubstractMean, bool useStdDev = Defaults.UseStdDev, float scale = Defaults.Scale) - : this(env, columns.Select(x => new LpNormalizingTransformer.GcnColumnInfo(x.input, x.output, substractMean, useStdDev, scale)).ToArray()) + public static class LpNormalization + { + [TlcModule.EntryPoint(Name = "Transforms.LpNormalizer", + Desc = LpNormNormalizerTransform.Summary, + UserName = LpNormNormalizerTransform.UserNameLP, + ShortName = LpNormNormalizerTransform.ShortNameLP, + XmlInclude = new[] { @"" })] + public static CommonOutputs.TransformOutput Normalize(IHostEnvironment env, LpNormNormalizerTransform.Arguments input) { + var h = EntryPointUtils.CheckArgsAndCreateHost(env, "LpNormalize", input); + var xf = new LpNormNormalizerTransform(h, input, input.Data); + return new CommonOutputs.TransformOutput() + { + Model = new TransformModel(h, xf, input.Data), + OutputData = xf + }; } - /// - /// Create a that takes multiple pairs of columns. - /// - public GlobalContrastNormalizingEstimator(IHostEnvironment env, params LpNormalizingTransformer.GcnColumnInfo[] columns) : - base(env, columns) + [TlcModule.EntryPoint(Name = "Transforms.GlobalContrastNormalizer", + Desc = LpNormNormalizerTransform.GcnSummary, + UserName = LpNormNormalizerTransform.UserNameGn, + ShortName = LpNormNormalizerTransform.ShortNameGn, + XmlInclude = new[] { @"" })] + public static CommonOutputs.TransformOutput GcNormalize(IHostEnvironment env, LpNormNormalizerTransform.GcnArguments input) { + var h = EntryPointUtils.CheckArgsAndCreateHost(env, "GcNormalize", input); + var xf = new LpNormNormalizerTransform(h, input, input.Data); + return new CommonOutputs.TransformOutput() + { + Model = new TransformModel(h, xf, input.Data), + OutputData = xf + }; } } } diff --git a/src/Microsoft.ML.Transforms/GroupTransform.cs b/src/Microsoft.ML.Transforms/GroupTransform.cs index 2d6f1ddd54..8eebd94230 100644 --- a/src/Microsoft.ML.Transforms/GroupTransform.cs +++ b/src/Microsoft.ML.Transforms/GroupTransform.cs @@ -96,7 +96,7 @@ public sealed class Arguments : TransformInputBase private readonly GroupSchema _groupSchema; /// - /// Initializes a new instance of . + /// Convenience constructor for public facing API. /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -147,7 +147,7 @@ public override void Save(ModelSaveContext ctx) _groupSchema.Save(ctx); } - public override long? GetRowCount() + public override long? GetRowCount(bool lazy = true) { // We have no idea how many total rows we'll have. return null; @@ -429,7 +429,7 @@ public void GetMetadata(string kind, int col, ref TValue value) /// - The group column getters are taken directly from the trailing cursor. /// - The keep column getters are provided by the aggregators. /// - private sealed class Cursor : RootCursorBase, IRowCursor + public sealed class Cursor : RootCursorBase, IRowCursor { /// /// This class keeps track of the previous group key and tests the current group key against the previous one. @@ -516,9 +516,9 @@ public ListAggregator(IRow row, int col) private void Getter(ref VBuffer dst) { - var editor = VBufferEditor.Create(ref dst, _size); - _buffer.AsSpan(0, _size).CopyTo(editor.Values); - dst = editor.Commit(); + var values = (Utils.Size(dst.Values) < _size) ? new TValue[_size] : dst.Values; + Array.Copy(_buffer, values, _size); + dst = new VBuffer(_size, values, dst.Indices); } public override ValueGetter GetGetter(IExceptionContext ctx) diff --git a/src/Microsoft.ML.Transforms/HashJoiningTransform.cs b/src/Microsoft.ML.Transforms/HashJoinTransform.cs similarity index 92% rename from src/Microsoft.ML.Transforms/HashJoiningTransform.cs rename to src/Microsoft.ML.Transforms/HashJoinTransform.cs index bf674b8ed5..9517130052 100644 --- a/src/Microsoft.ML.Transforms/HashJoiningTransform.cs +++ b/src/Microsoft.ML.Transforms/HashJoinTransform.cs @@ -16,11 +16,11 @@ using System.Threading; using Float = System.Single; -[assembly: LoadableClass(HashJoiningTransform.Summary, typeof(HashJoiningTransform), typeof(HashJoiningTransform.Arguments), typeof(SignatureDataTransform), - HashJoiningTransform.UserName, "HashJoinTransform", HashJoiningTransform.RegistrationName)] +[assembly: LoadableClass(HashJoinTransform.Summary, typeof(HashJoinTransform), typeof(HashJoinTransform.Arguments), typeof(SignatureDataTransform), + HashJoinTransform.UserName, "HashJoinTransform", HashJoinTransform.RegistrationName)] -[assembly: LoadableClass(HashJoiningTransform.Summary, typeof(HashJoiningTransform), null, typeof(SignatureLoadDataTransform), - HashJoiningTransform.UserName, HashJoiningTransform.LoaderSignature, "HashJoinFunction")] +[assembly: LoadableClass(HashJoinTransform.Summary, typeof(HashJoinTransform), null, typeof(SignatureLoadDataTransform), + HashJoinTransform.UserName, HashJoinTransform.LoaderSignature, "HashJoinFunction")] [assembly: EntryPointModule(typeof(HashJoin))] @@ -31,7 +31,7 @@ namespace Microsoft.ML.Transforms.Conversions /// column there is an option to specify which slots should be hashed together into one output slot. /// This transform can be applied either to single valued columns or to known length vector columns. /// - public sealed class HashJoiningTransform : OneToOneTransformBase + public sealed class HashJoinTransform : OneToOneTransformBase { public const int NumBitsMin = 1; public const int NumBitsLim = 32; @@ -168,13 +168,13 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010005, verWeCanReadBack: 0x00010005, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(HashJoiningTransform).Assembly.FullName); + loaderAssemblyName: typeof(HashJoinTransform).Assembly.FullName); } private readonly ColumnInfoEx[] _exes; /// - /// Initializes a new instance of . + /// Convenience constructor for public facing API. /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -182,7 +182,7 @@ private static VersionInfo GetVersionInfo() /// Name of the column to be transformed. If this is null '' will be used. /// Whether the values need to be combined for a single hash. /// Number of bits to hash into. Must be between 1 and 31, inclusive. - public HashJoiningTransform(IHostEnvironment env, + public HashJoinTransform(IHostEnvironment env, IDataView input, string name, string source = null, @@ -193,7 +193,7 @@ public HashJoiningTransform(IHostEnvironment env, } /// - public HashJoiningTransform(IHostEnvironment env, Arguments args, IDataView input) + public HashJoinTransform(IHostEnvironment env, Arguments args, IDataView input) : base(env, RegistrationName, Contracts.CheckRef(args, nameof(args)).Column, input, TestColumnType) { Host.AssertNonEmpty(Infos); @@ -219,7 +219,7 @@ public HashJoiningTransform(IHostEnvironment env, Arguments args, IDataView inpu SetMetadata(); } - private HashJoiningTransform(IHost host, ModelLoadContext ctx, IDataView input) + private HashJoinTransform(IHost host, ModelLoadContext ctx, IDataView input) : base(host, ctx, input, TestColumnType) { Host.AssertValue(ctx); @@ -272,7 +272,7 @@ private HashJoiningTransform(IHost host, ModelLoadContext ctx, IDataView input) SetMetadata(); } - public static HashJoiningTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + public static HashJoinTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { Contracts.CheckValue(env, nameof(env)); var h = env.Register(RegistrationName); @@ -281,7 +281,7 @@ public static HashJoiningTransform Create(IHostEnvironment env, ModelLoadContext ctx.CheckAtModel(GetVersionInfo()); h.CheckValue(input, nameof(input)); - return h.Apply("Loading Model", ch => new HashJoiningTransform(h, ctx, input)); + return h.Apply("Loading Model", ch => new HashJoinTransform(h, ctx, input)); } public override void Save(ModelSaveContext ctx) @@ -411,7 +411,9 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) Host.AssertValue(_exes[iinfo].SlotMap); int n = _exes[iinfo].OutputValueCount; - var dstEditor = VBufferEditor.Create(ref dst, n); + var output = dst.Values; + if (Utils.Size(output) < n) + output = new ReadOnlyMemory[n]; var srcColumnName = Source.Schema.GetColumnName(Infos[iinfo].Source); bool useDefaultSlotNames = !Source.Schema.HasSlotNames(Infos[iinfo].Source, Infos[iinfo].TypeSrc.VectorSize); @@ -425,7 +427,6 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) } var outputSlotName = new StringBuilder(); - var srcSlotNameValues = srcSlotNames.GetValues(); for (int slot = 0; slot < n; slot++) { var slotList = _exes[iinfo].SlotMap[slot]; @@ -440,13 +441,13 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) if (useDefaultSlotNames) outputSlotName.AppendFormat("{0}[{1}]", srcColumnName, inputSlotIndex); else - outputSlotName.Append(srcSlotNameValues[inputSlotIndex]); + outputSlotName.Append(srcSlotNames.Values[inputSlotIndex]); } - dstEditor.Values[slot] = outputSlotName.ToString().AsMemory(); + output[slot] = outputSlotName.ToString().AsMemory(); } - dst = dstEditor.Commit(); + dst = new VBuffer>(n, output, dst.Indices); } private delegate uint HashDelegate(in TSrc value, uint seed); @@ -547,23 +548,25 @@ private ValueGetter> ComposeGetterVecToVec(IRow input, int i { getSrc(ref src); Host.Check(src.Length == expectedSrcLength); - ReadOnlySpan values; + TSrc[] values; // force-densify the input // REVIEW: this performs poorly if only a fraction of sparse vector is used for hashing. // This scenario was unlikely at the time of writing. Regardless of performance, the hash value // needs to be consistent across equivalent representations - sparse vs dense. if (src.IsDense) - values = src.GetValues(); + values = src.Values; else { if (denseValues == null) denseValues = new TSrc[expectedSrcLength]; - src.CopyTo(denseValues); values = denseValues; + src.CopyTo(values); } - var hashes = VBufferEditor.Create(ref dst, n); + var hashes = dst.Values; + if (Utils.Size(hashes) < n) + hashes = new uint[n]; for (int i = 0; i < n; i++) { @@ -577,10 +580,10 @@ private ValueGetter> ComposeGetterVecToVec(IRow input, int i hash = hashFunction(in values[srcSlot], hash); } - hashes.Values[i] = (Hashing.MixHash(hash) & mask) + 1; // +1 to offset from zero, which has special meaning for KeyType + hashes[i] = (Hashing.MixHash(hash) & mask) + 1; // +1 to offset from zero, which has special meaning for KeyType } - dst = hashes.Commit(); + dst = new VBuffer(n, hashes, dst.Indices); }; } @@ -612,19 +615,19 @@ private ValueGetter ComposeGetterVecToOne(IRow input, int iinfo) getSrc(ref src); Host.Check(src.Length == expectedSrcLength); - ReadOnlySpan values; + TSrc[] values; // force-densify the input // REVIEW: this performs poorly if only a fraction of sparse vector is used for hashing. // This scenario was unlikely at the time of writing. Regardless of performance, the hash value // needs to be consistent across equivalent representations - sparse vs dense. if (src.IsDense) - values = src.GetValues(); + values = src.Values; else { if (denseValues == null) denseValues = new TSrc[expectedSrcLength]; - src.CopyTo(denseValues); values = denseValues; + src.CopyTo(values); } uint hash = hashSeed; @@ -699,18 +702,18 @@ protected override ColumnType GetColumnTypeCore(int iinfo) public static class HashJoin { [TlcModule.EntryPoint(Name = "Transforms.HashConverter", - Desc = HashJoiningTransform.Summary, - UserName = HashJoiningTransform.UserName, - ShortName = HashJoiningTransform.RegistrationName, + Desc = HashJoinTransform.Summary, + UserName = HashJoinTransform.UserName, + ShortName = HashJoinTransform.RegistrationName, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput Apply(IHostEnvironment env, HashJoiningTransform.Arguments input) + public static CommonOutputs.TransformOutput Apply(IHostEnvironment env, HashJoinTransform.Arguments input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(input, nameof(input)); var h = EntryPointUtils.CheckArgsAndCreateHost(env, "HashJoin", input); - var view = new HashJoiningTransform(h, input, input.Data); + var view = new HashJoinTransform(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, view, input.Data), diff --git a/src/Microsoft.ML.Transforms/KeyToVectorMapping.cs b/src/Microsoft.ML.Transforms/KeyToBinaryVectorTransform.cs similarity index 89% rename from src/Microsoft.ML.Transforms/KeyToVectorMapping.cs rename to src/Microsoft.ML.Transforms/KeyToBinaryVectorTransform.cs index f88bff5b87..7cc814b4ce 100644 --- a/src/Microsoft.ML.Transforms/KeyToVectorMapping.cs +++ b/src/Microsoft.ML.Transforms/KeyToBinaryVectorTransform.cs @@ -16,27 +16,27 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(KeyToBinaryVectorMappingTransformer.Summary, typeof(IDataTransform), typeof(KeyToBinaryVectorMappingTransformer), typeof(KeyToBinaryVectorMappingTransformer.Arguments), typeof(SignatureDataTransform), - "Key To Binary Vector Transform", KeyToBinaryVectorMappingTransformer.UserName, "KeyToBinary", "ToBinaryVector", DocName = "transform/KeyToBinaryVectorTransform.md")] +[assembly: LoadableClass(KeyToBinaryVectorTransform.Summary, typeof(IDataTransform), typeof(KeyToBinaryVectorTransform), typeof(KeyToBinaryVectorTransform.Arguments), typeof(SignatureDataTransform), + "Key To Binary Vector Transform", KeyToBinaryVectorTransform.UserName, "KeyToBinary", "ToBinaryVector", DocName = "transform/KeyToBinaryVectorTransform.md")] -[assembly: LoadableClass(KeyToBinaryVectorMappingTransformer.Summary, typeof(IDataTransform), typeof(KeyToBinaryVectorMappingTransformer), null, typeof(SignatureLoadDataTransform), - "Key To Binary Vector Transform", KeyToBinaryVectorMappingTransformer.LoaderSignature)] +[assembly: LoadableClass(KeyToBinaryVectorTransform.Summary, typeof(IDataTransform), typeof(KeyToBinaryVectorTransform), null, typeof(SignatureLoadDataTransform), + "Key To Binary Vector Transform", KeyToBinaryVectorTransform.LoaderSignature)] -[assembly: LoadableClass(KeyToBinaryVectorMappingTransformer.Summary, typeof(KeyToBinaryVectorMappingTransformer), null, typeof(SignatureLoadModel), - KeyToBinaryVectorMappingTransformer.UserName, KeyToBinaryVectorMappingTransformer.LoaderSignature)] +[assembly: LoadableClass(KeyToBinaryVectorTransform.Summary, typeof(KeyToBinaryVectorTransform), null, typeof(SignatureLoadModel), + KeyToBinaryVectorTransform.UserName, KeyToBinaryVectorTransform.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(KeyToBinaryVectorMappingTransformer), null, typeof(SignatureLoadRowMapper), - KeyToBinaryVectorMappingTransformer.UserName, KeyToBinaryVectorMappingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(KeyToBinaryVectorTransform), null, typeof(SignatureLoadRowMapper), + KeyToBinaryVectorTransform.UserName, KeyToBinaryVectorTransform.LoaderSignature)] namespace Microsoft.ML.Transforms.Conversions { - public sealed class KeyToBinaryVectorMappingTransformer : OneToOneTransformerBase + public sealed class KeyToBinaryVectorTransform : OneToOneTransformerBase { public sealed class Arguments { [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "New column definition(s) (optional form: name:src)", ShortName = "col", SortOrder = 1)] - public KeyToVectorMappingTransformer.Column[] Column; + public KeyToVectorTransform.Column[] Column; } public class ColumnInfo { @@ -62,7 +62,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00000001, verWeCanReadBack: 0x00000001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(KeyToBinaryVectorMappingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(KeyToBinaryVectorTransform).Assembly.FullName); } private const string RegistrationName = "KeyToBinary"; @@ -91,7 +91,7 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].input, reason, type.ToString()); } - public KeyToBinaryVectorMappingTransformer(IHostEnvironment env, params ColumnInfo[] columns) + public KeyToBinaryVectorTransform(IHostEnvironment env, params ColumnInfo[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), GetColumnPairs(columns)) { _columns = columns.ToArray(); @@ -111,7 +111,7 @@ public override void Save(ModelSaveContext ctx) } // Factory method for SignatureLoadModel. - private static KeyToBinaryVectorMappingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + private static KeyToBinaryVectorTransform Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(RegistrationName); @@ -119,10 +119,10 @@ private static KeyToBinaryVectorMappingTransformer Create(IHostEnvironment env, host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new KeyToBinaryVectorMappingTransformer(host, ctx); + return new KeyToBinaryVectorTransform(host, ctx); } - private KeyToBinaryVectorMappingTransformer(IHost host, ModelLoadContext ctx) + private KeyToBinaryVectorTransform(IHost host, ModelLoadContext ctx) : base(host, ctx) { _columns = new ColumnInfo[ColumnPairs.Length]; @@ -131,7 +131,7 @@ private KeyToBinaryVectorMappingTransformer(IHost host, ModelLoadContext ctx) } public static IDataTransform Create(IHostEnvironment env, IDataView input, params ColumnInfo[] columns) => - new KeyToBinaryVectorMappingTransformer(env, columns).MakeDataTransform(input); + new KeyToBinaryVectorTransform(env, columns).MakeDataTransform(input); // Factory method for SignatureDataTransform. public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) @@ -150,7 +150,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV cols[i] = new ColumnInfo(item.Source ?? item.Name, item.Name); }; } - return new KeyToBinaryVectorMappingTransformer(env, cols).MakeDataTransform(input); + return new KeyToBinaryVectorTransform(env, cols).MakeDataTransform(input); } // Factory method for SignatureLoadDataTransform. @@ -163,7 +163,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : OneToOneMapperBase + private sealed class Mapper : MapperBase { private sealed class ColInfo { @@ -179,12 +179,12 @@ public ColInfo(string name, string source, ColumnType type) } } - private readonly KeyToBinaryVectorMappingTransformer _parent; + private readonly KeyToBinaryVectorTransform _parent; private readonly ColInfo[] _infos; private readonly VectorType[] _types; private readonly int[] _bitsPerKey; - public Mapper(KeyToBinaryVectorMappingTransformer parent, Schema inputSchema) + public Mapper(KeyToBinaryVectorTransform parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -219,7 +219,7 @@ private ColInfo[] CreateInfos(ISchema inputSchema) return infos; } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -322,7 +322,9 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) int slotLim = _types[iinfo].VectorSize; Host.Assert(slotLim == (long)typeSrc.VectorSize * _bitsPerKey[iinfo]); - var editor = VBufferEditor.Create(ref dst, slotLim); + var values = dst.Values; + if (Utils.Size(values) < slotLim) + values = new ReadOnlyMemory[slotLim]; var sb = new StringBuilder(); int slot = 0; @@ -339,19 +341,19 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) sb.Append('.'); int len = sb.Length; - foreach (var key in bits.GetValues()) + foreach (var key in bits.Values) { sb.Length = len; sb.AppendMemory(key); - editor.Values[slot++] = sb.ToString().AsMemory(); + values[slot++] = sb.ToString().AsMemory(); } } Host.Assert(slot == slotLim); - dst = editor.Commit(); + dst = new VBuffer>(slotLim, values, dst.Indices); } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _infos.Length); @@ -443,20 +445,20 @@ private void EncodeValueToBinary(BufferBuilder bldr, uint value, int bits } } - public sealed class KeyToBinaryVectorMappingEstimator : TrivialEstimator + public sealed class KeyToBinaryVectorMappingEstimator : TrivialEstimator { - public KeyToBinaryVectorMappingEstimator(IHostEnvironment env, params KeyToBinaryVectorMappingTransformer.ColumnInfo[] columns) - : this(env, new KeyToBinaryVectorMappingTransformer(env, columns)) + public KeyToBinaryVectorMappingEstimator(IHostEnvironment env, params KeyToBinaryVectorTransform.ColumnInfo[] columns) + : this(env, new KeyToBinaryVectorTransform(env, columns)) { } public KeyToBinaryVectorMappingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null) - : this(env, new KeyToBinaryVectorMappingTransformer(env, new KeyToBinaryVectorMappingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn))) + : this(env, new KeyToBinaryVectorTransform(env, new KeyToBinaryVectorTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn))) { } - private KeyToBinaryVectorMappingEstimator(IHostEnvironment env, KeyToBinaryVectorMappingTransformer transformer) + private KeyToBinaryVectorMappingEstimator(IHostEnvironment env, KeyToBinaryVectorTransform transformer) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(KeyToBinaryVectorMappingEstimator)), transformer) { } @@ -560,11 +562,11 @@ public override IEstimator Reconcile(IHostEnvironment env, IReadOnlyDictionary outputNames, IReadOnlyCollection usedNames) { - var infos = new KeyToBinaryVectorMappingTransformer.ColumnInfo[toOutput.Length]; + var infos = new KeyToBinaryVectorTransform.ColumnInfo[toOutput.Length]; for (int i = 0; i < toOutput.Length; ++i) { var col = (IColInput)toOutput[i]; - infos[i] = new KeyToBinaryVectorMappingTransformer.ColumnInfo(inputNames[col.Input], outputNames[toOutput[i]]); + infos[i] = new KeyToBinaryVectorTransform.ColumnInfo(inputNames[col.Input], outputNames[toOutput[i]]); } return new KeyToBinaryVectorMappingEstimator(env, infos); } diff --git a/src/Microsoft.ML.Transforms/LearnerFeatureSelection.cs b/src/Microsoft.ML.Transforms/LearnerFeatureSelection.cs index e9a057feb6..a67816f348 100644 --- a/src/Microsoft.ML.Transforms/LearnerFeatureSelection.cs +++ b/src/Microsoft.ML.Transforms/LearnerFeatureSelection.cs @@ -21,11 +21,10 @@ namespace Microsoft.ML.Transforms /// is greater than a threshold. /// Instantiates a DropSlots transform to actually drop the slots. ///
- internal static class LearnerFeatureSelectionTransform + public static class LearnerFeatureSelectionTransform { internal const string Summary = "Selects the slots for which the absolute value of the corresponding weight in a linear learner is greater than a threshold."; -#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. public sealed class Arguments { [Argument(ArgumentType.LastOccurenceWins, HelpText = "If the corresponding absolute value of the weight for a slot is greater than this threshold, the slot is preserved", ShortName = "ft", SortOrder = 2)] @@ -34,8 +33,6 @@ public sealed class Arguments [Argument(ArgumentType.AtMostOnce, HelpText = "The number of slots to preserve", ShortName = "topk", SortOrder = 1)] public int? NumSlotsToKeep; - // If we make this public again it should be an *estimator* of this type of predictor, rather than the (deprecated) ITrainer, but the utility - // of this would be limited because estimators and transformers now act more or less like this transform used to. [Argument(ArgumentType.Multiple, HelpText = "Filter", ShortName = "f", SortOrder = 1, SignatureType = typeof(SignatureFeatureScorerTrainer))] public IComponentFactory>> Filter = ComponentFactoryUtils.CreateFromFunction(env => @@ -77,7 +74,6 @@ internal void Check(IExceptionContext ectx) ectx.CheckUserArg((NumSlotsToKeep ?? int.MaxValue) > 0, nameof(NumSlotsToKeep), "Must be positive"); } } -#pragma warning restore CS0649 internal static string RegistrationName = "LearnerFeatureSelectionTransform"; @@ -124,10 +120,9 @@ private static DropSlotsTransform.Column CreateDropSlotsColumn(Arguments args, i var col = new DropSlotsTransform.Column(); col.Source = args.FeatureColumn; selectedCount = 0; - var scoresValues = scores.GetValues(); // Degenerate case, dropping all slots. - if (scoresValues.Length == 0) + if (scores.Count == 0) { var range = new DropSlotsTransform.Range(); col.Slots = new DropSlotsTransform.Range[] { range }; @@ -144,13 +139,13 @@ private static DropSlotsTransform.Column CreateDropSlotsColumn(Arguments args, i else { Contracts.Assert(args.NumSlotsToKeep.HasValue); - threshold = ComputeThreshold(scoresValues, args.NumSlotsToKeep.Value, out tiedScoresToKeep); + threshold = ComputeThreshold(scores.Values, scores.Count, args.NumSlotsToKeep.Value, out tiedScoresToKeep); } var slots = new List(); - for (int i = 0; i < scoresValues.Length; i++) + for (int i = 0; i < scores.Count; i++) { - var score = Math.Abs(scoresValues[i]); + var score = Math.Abs(scores.Values[i]); if (score > threshold) { selectedCount++; @@ -165,9 +160,9 @@ private static DropSlotsTransform.Column CreateDropSlotsColumn(Arguments args, i var range = new DropSlotsTransform.Range(); range.Min = i; - while (++i < scoresValues.Length) + while (++i < scores.Count) { - score = Math.Abs(scoresValues[i]); + score = Math.Abs(scores.Values[i]); if (score > threshold) { selectedCount++; @@ -186,7 +181,6 @@ private static DropSlotsTransform.Column CreateDropSlotsColumn(Arguments args, i if (!scores.IsDense) { - var scoresIndices = scores.GetIndices(); int ii = 0; var count = slots.Count; for (int i = 0; i < count; i++) @@ -196,16 +190,16 @@ private static DropSlotsTransform.Column CreateDropSlotsColumn(Arguments args, i var min = range.Min; var max = range.Max.Value; Contracts.Assert(min <= max); - Contracts.Assert(max < scoresValues.Length); + Contracts.Assert(max < scores.Count); - range.Min = min == 0 ? 0 : scoresIndices[min - 1] + 1; - range.Max = max == scoresIndices.Length - 1 ? scores.Length - 1 : scoresIndices[max + 1] - 1; + range.Min = min == 0 ? 0 : scores.Indices[min - 1] + 1; + range.Max = max == scores.Count - 1 ? scores.Length - 1 : scores.Indices[max + 1] - 1; // Add the gaps before this range. for (; ii < min; ii++) { - var gapMin = ii == 0 ? 0 : scoresIndices[ii - 1] + 1; - var gapMax = scoresIndices[ii] - 1; + var gapMin = ii == 0 ? 0 : scores.Indices[ii - 1] + 1; + var gapMax = scores.Indices[ii] - 1; if (gapMin <= gapMax) { var gap = new DropSlotsTransform.Range(); @@ -218,10 +212,10 @@ private static DropSlotsTransform.Column CreateDropSlotsColumn(Arguments args, i } // Add the gaps after the last range. - for (; ii <= scoresIndices.Length; ii++) + for (; ii <= scores.Count; ii++) { - var gapMin = ii == 0 ? 0 : scoresIndices[ii - 1] + 1; - var gapMax = ii == scoresIndices.Length ? scores.Length - 1 : scoresIndices[ii] - 1; + var gapMin = ii == 0 ? 0 : scores.Indices[ii - 1] + 1; + var gapMax = ii == scores.Count ? scores.Length - 1 : scores.Indices[ii] - 1; if (gapMin <= gapMax) { var gap = new DropSlotsTransform.Range(); @@ -246,12 +240,12 @@ private static DropSlotsTransform.Column CreateDropSlotsColumn(Arguments args, i return null; } - private static float ComputeThreshold(ReadOnlySpan scores, int topk, out int tiedScoresToKeep) + private static float ComputeThreshold(float[] scores, int count, int topk, out int tiedScoresToKeep) { // Use a min-heap for the topk elements var heap = new Heap((f1, f2) => f1 > f2, topk); - for (int i = 0; i < scores.Length; i++) + for (int i = 0; i < count; i++) { var score = Math.Abs(scores[i]); if (float.IsNaN(score)) diff --git a/src/Microsoft.ML.Transforms/Microsoft.ML.Transforms.csproj b/src/Microsoft.ML.Transforms/Microsoft.ML.Transforms.csproj index 7ab146b21c..11d96a6cfc 100644 --- a/src/Microsoft.ML.Transforms/Microsoft.ML.Transforms.csproj +++ b/src/Microsoft.ML.Transforms/Microsoft.ML.Transforms.csproj @@ -4,7 +4,6 @@ netstandard2.0 Microsoft.ML CORECLR - true diff --git a/src/Microsoft.ML.Transforms/MissingValueDroppingTransformer.cs b/src/Microsoft.ML.Transforms/MissingValueDroppingTransformer.cs deleted file mode 100644 index 61735dcf6c..0000000000 --- a/src/Microsoft.ML.Transforms/MissingValueDroppingTransformer.cs +++ /dev/null @@ -1,390 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Core.Data; -using Microsoft.ML.Runtime; -using Microsoft.ML.Runtime.CommandLine; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.EntryPoints; -using Microsoft.ML.Runtime.Internal.Utilities; -using Microsoft.ML.Runtime.Model; -using Microsoft.ML.Transforms; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; - -[assembly: LoadableClass(MissingValueDroppingTransformer.Summary, typeof(IDataTransform), typeof(MissingValueDroppingTransformer), typeof(MissingValueDroppingTransformer.Arguments), typeof(SignatureDataTransform), - MissingValueDroppingTransformer.FriendlyName, MissingValueDroppingTransformer.ShortName, "NADropTransform")] - -[assembly: LoadableClass(MissingValueDroppingTransformer.Summary, typeof(IDataTransform), typeof(MissingValueDroppingTransformer), null, typeof(SignatureLoadDataTransform), - MissingValueDroppingTransformer.FriendlyName, MissingValueDroppingTransformer.LoaderSignature)] - -[assembly: LoadableClass(MissingValueDroppingTransformer.Summary, typeof(MissingValueDroppingTransformer), null, typeof(SignatureLoadModel), - MissingValueDroppingTransformer.FriendlyName, MissingValueDroppingTransformer.LoaderSignature)] - -[assembly: LoadableClass(typeof(IRowMapper), typeof(MissingValueDroppingTransformer), null, typeof(SignatureLoadRowMapper), - MissingValueDroppingTransformer.FriendlyName, MissingValueDroppingTransformer.LoaderSignature)] - -namespace Microsoft.ML.Transforms -{ - /// - public sealed class MissingValueDroppingTransformer : OneToOneTransformerBase - { - public sealed class Arguments : TransformInputBase - { - [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "Columns to drop the NAs for", ShortName = "col", SortOrder = 1)] - public Column[] Column; - } - - public sealed class Column : OneToOneColumn - { - public static Column Parse(string str) - { - var res = new Column(); - if (res.TryParse(str)) - return res; - return null; - } - - public bool TryUnparse(StringBuilder sb) - { - Contracts.AssertValue(sb); - return TryUnparseCore(sb); - } - } - - internal const string Summary = "Removes NAs from vector columns."; - internal const string FriendlyName = "NA Drop Transform"; - internal const string ShortName = "NADrop"; - internal const string LoaderSignature = "NADropTransform"; - - private static VersionInfo GetVersionInfo() - { - return new VersionInfo( - modelSignature: "NADROPXF", - verWrittenCur: 0x00010001, // Initial - verReadableCur: 0x00010001, - verWeCanReadBack: 0x00010001, - loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(MissingValueDroppingTransformer).Assembly.FullName); - } - - private const string RegistrationName = "DropNAs"; - - public IReadOnlyList<(string input, string output)> Columns => ColumnPairs.AsReadOnly(); - - /// - /// Initializes a new instance of - /// - /// The environment to use. - /// The names of the input columns of the transformation and the corresponding names for the output columns. - public MissingValueDroppingTransformer(IHostEnvironment env, params (string input, string output)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueDroppingTransformer)), columns) - { - } - - internal MissingValueDroppingTransformer(IHostEnvironment env, Arguments args) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueDroppingTransformer)), GetColumnPairs(args.Column)) - { - } - - private MissingValueDroppingTransformer(IHostEnvironment env, ModelLoadContext ctx) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueDroppingTransformer)), ctx) - { - Host.CheckValue(ctx, nameof(ctx)); - } - - private static (string input, string output)[] GetColumnPairs(Column[] columns) - => columns.Select(c => (c.Source ?? c.Name, c.Name)).ToArray(); - - protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCol) - { - var inType = inputSchema.GetColumnType(srcCol); - if (!inType.IsVector) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", inputSchema.GetColumnName(srcCol), "Vector", inType.ToString()); - } - - // Factory method for SignatureLoadModel - private static MissingValueDroppingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) - { - Contracts.CheckValue(env, nameof(env)); - ctx.CheckAtModel(GetVersionInfo()); - - return new MissingValueDroppingTransformer(env, ctx); - } - - // Factory method for SignatureDataTransform. - internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) - => new MissingValueDroppingTransformer(env, args).MakeDataTransform(input); - - // Factory method for SignatureLoadDataTransform. - private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) - => Create(env, ctx).MakeDataTransform(input); - - // Factory method for SignatureLoadRowMapper. - private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) - => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); - - /// - /// Saves the transform. - /// - public override void Save(ModelSaveContext ctx) - { - Host.CheckValue(ctx, nameof(ctx)); - ctx.CheckAtModel(); - ctx.SetVersionInfo(GetVersionInfo()); - SaveColumns(ctx); - } - - protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - - private sealed class Mapper : OneToOneMapperBase - { - private readonly MissingValueDroppingTransformer _parent; - - private readonly ColumnType[] _srcTypes; - private readonly int[] _srcCols; - private readonly ColumnType[] _types; - private readonly Delegate[] _isNAs; - - public Mapper(MissingValueDroppingTransformer parent, Schema inputSchema) : - base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) - { - _parent = parent; - _types = new ColumnType[_parent.ColumnPairs.Length]; - _srcTypes = new ColumnType[_parent.ColumnPairs.Length]; - _srcCols = new int[_parent.ColumnPairs.Length]; - _isNAs = new Delegate[_parent.ColumnPairs.Length]; - for (int i = 0; i < _parent.ColumnPairs.Length; i++) - { - inputSchema.TryGetColumnIndex(_parent.ColumnPairs[i].input, out _srcCols[i]); - var srcCol = inputSchema[_srcCols[i]]; - _srcTypes[i] = srcCol.Type; - _types[i] = new VectorType(srcCol.Type.ItemType.AsPrimitive); - _isNAs[i] = GetIsNADelegate(srcCol.Type); - } - } - - /// - /// Returns the isNA predicate for the respective type. - /// - private Delegate GetIsNADelegate(ColumnType type) - { - Func func = GetIsNADelegate; - return Utils.MarshalInvoke(func, type.ItemType.RawType, type); - } - - private Delegate GetIsNADelegate(ColumnType type) => Runtime.Data.Conversion.Conversions.Instance.GetIsNAPredicate(type.ItemType); - - protected override Schema.Column[] GetOutputColumnsCore() - { - var result = new Schema.Column[_parent.ColumnPairs.Length]; - for (int i = 0; i < _parent.ColumnPairs.Length; i++) - { - var builder = new Schema.Metadata.Builder(); - builder.Add(InputSchema[ColMapNewToOld[i]].Metadata, x => x == MetadataUtils.Kinds.KeyValues || x == MetadataUtils.Kinds.IsNormalized); - result[i] = new Schema.Column(_parent.ColumnPairs[i].output, _types[i], builder.GetMetadata()); - } - return result; - } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) - { - Contracts.AssertValue(input); - Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); - disposer = null; - - Func>> del = MakeVecGetter; - var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(_srcTypes[iinfo].ItemType.RawType); - return (Delegate)methodInfo.Invoke(this, new object[] { input, iinfo }); - } - - private ValueGetter> MakeVecGetter(IRow input, int iinfo) - { - var srcGetter = input.GetGetter>(iinfo); - var buffer = default(VBuffer); - var isNA = (InPredicate)_isNAs[iinfo]; - var def = default(TDst); - if (isNA(in def)) - { - // Case I: NA equals the default value. - return - (ref VBuffer value) => - { - srcGetter(ref buffer); - DropNAsAndDefaults(ref buffer, ref value, isNA); - }; - } - - // Case II: NA is different form default value. - Host.Assert(!isNA(in def)); - return - (ref VBuffer value) => - { - srcGetter(ref buffer); - DropNAs(ref buffer, ref value, isNA); - }; - } - - private void DropNAsAndDefaults(ref VBuffer src, ref VBuffer dst, InPredicate isNA) - { - Host.AssertValue(isNA); - - var srcValues = src.GetValues(); - int newCount = 0; - for (int i = 0; i < srcValues.Length; i++) - { - if (!isNA(in srcValues[i])) - newCount++; - } - Host.Assert(newCount <= srcValues.Length); - - if (newCount == 0) - { - VBufferUtils.Resize(ref dst, 0); - return; - } - - if (newCount == srcValues.Length) - { - Utils.Swap(ref src, ref dst); - if (!dst.IsDense) - { - Host.Assert(dst.GetValues().Length == newCount); - VBufferUtils.Resize(ref dst, newCount); - } - return; - } - - int iDst = 0; - - // Densifying sparse vectors since default value equals NA and hence should be dropped. - var editor = VBufferEditor.Create(ref dst, newCount); - for (int i = 0; i < srcValues.Length; i++) - { - if (!isNA(in srcValues[i])) - editor.Values[iDst++] = srcValues[i]; - } - Host.Assert(iDst == newCount); - - dst = editor.Commit(); - } - - private void DropNAs(ref VBuffer src, ref VBuffer dst, InPredicate isNA) - { - Host.AssertValue(isNA); - - var srcValues = src.GetValues(); - int newCount = 0; - for (int i = 0; i < srcValues.Length; i++) - { - if (!isNA(in srcValues[i])) - newCount++; - } - Host.Assert(newCount <= srcValues.Length); - - if (newCount == 0) - { - VBufferUtils.Resize(ref dst, src.Length - srcValues.Length, 0); - return; - } - - if (newCount == srcValues.Length) - { - Utils.Swap(ref src, ref dst); - return; - } - - int iDst = 0; - if (src.IsDense) - { - var editor = VBufferEditor.Create(ref dst, newCount); - for (int i = 0; i < srcValues.Length; i++) - { - if (!isNA(in srcValues[i])) - { - editor.Values[iDst] = srcValues[i]; - iDst++; - } - } - Host.Assert(iDst == newCount); - dst = editor.Commit(); - } - else - { - var newLength = src.Length - srcValues.Length - newCount; - var editor = VBufferEditor.Create(ref dst, newLength, newCount); - - var srcIndices = src.GetIndices(); - int offset = 0; - for (int i = 0; i < srcValues.Length; i++) - { - if (!isNA(in srcValues[i])) - { - editor.Values[iDst] = srcValues[i]; - editor.Indices[iDst] = srcIndices[i] - offset; - iDst++; - } - else - offset++; - } - Host.Assert(iDst == newCount); - Host.Assert(offset == srcValues.Length - newCount); - dst = editor.Commit(); - } - } - } - } - /// - /// Drops missing values from columns. - /// - public sealed class MissingValueDroppingEstimator : TrivialEstimator - { - /// - /// Drops missing values from columns. - /// - /// The environment to use. - /// The names of the input columns of the transformation and the corresponding names for the output columns. - public MissingValueDroppingEstimator(IHostEnvironment env, params (string input, string output)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueDroppingEstimator)), new MissingValueDroppingTransformer(env, columns)) - { - Contracts.CheckValue(env, nameof(env)); - } - - /// - /// Drops missing values from columns. - /// - /// The environment to use. - /// The name of the input column of the transformation. - /// The name of the column produced by the transformation. - public MissingValueDroppingEstimator(IHostEnvironment env, string input, string output = null) - : this(env, (input, output ?? input)) - { - } - - /// - /// Returns the schema that would be produced by the transformation. - /// - public override SchemaShape GetOutputSchema(SchemaShape inputSchema) - { - Host.CheckValue(inputSchema, nameof(inputSchema)); - var result = inputSchema.Columns.ToDictionary(x => x.Name); - foreach (var colPair in Transformer.Columns) - { - if (!inputSchema.TryFindColumn(colPair.input, out var col) || !Runtime.Data.Conversion.Conversions.Instance.TryGetIsNAPredicate(col.ItemType, out Delegate del)) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", colPair.input); - if (!(col.Kind == SchemaShape.Column.VectorKind.Vector || col.Kind == SchemaShape.Column.VectorKind.VariableVector)) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", colPair.input, "Vector", col.GetTypeString()); - var metadata = new List(); - if (col.Metadata.TryFindColumn(MetadataUtils.Kinds.KeyValues, out var keyMeta)) - metadata.Add(keyMeta); - if (col.Metadata.TryFindColumn(MetadataUtils.Kinds.IsNormalized, out var normMeta)) - metadata.Add(normMeta); - result[colPair.output] = new SchemaShape.Column(colPair.output, SchemaShape.Column.VectorKind.VariableVector, col.ItemType, false, new SchemaShape(metadata.ToArray())); - } - return new SchemaShape(result.Values); - } - } -} \ No newline at end of file diff --git a/src/Microsoft.ML.Transforms/MissingValueIndicatorTransform.cs b/src/Microsoft.ML.Transforms/MissingValueIndicatorTransform.cs index 72a52e5cdc..5e42acfedb 100644 --- a/src/Microsoft.ML.Transforms/MissingValueIndicatorTransform.cs +++ b/src/Microsoft.ML.Transforms/MissingValueIndicatorTransform.cs @@ -183,15 +183,17 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) if (size == 0) throw MetadataUtils.ExceptGetMetadata(); - var editor = VBufferEditor.Create(ref dst, size); + var values = dst.Values; + if (Utils.Size(values) < size) + values = new ReadOnlyMemory[size]; var type = Infos[iinfo].TypeSrc; if (!type.IsVector) { Host.Assert(_types[iinfo].VectorSize == 2); var columnName = Source.Schema.GetColumnName(Infos[iinfo].Source); - editor.Values[0] = columnName.AsMemory(); - editor.Values[1] = (columnName + IndicatorSuffix).AsMemory(); + values[0] = columnName.AsMemory(); + values[1] = (columnName + IndicatorSuffix).AsMemory(); } else { @@ -228,13 +230,13 @@ private void GetSlotNames(int iinfo, ref VBuffer> dst) sb.Append(IndicatorSuffix); var str = sb.ToString(); - editor.Values[slot++] = str.AsMemory().Slice(0, len); - editor.Values[slot++] = str.AsMemory(); + values[slot++] = str.AsMemory().Slice(0, len); + values[slot++] = str.AsMemory(); } Host.Assert(slot == size); } - dst = editor.Commit(); + dst = new VBuffer>(size, values, dst.Indices); } protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, out Action disposer) @@ -272,25 +274,32 @@ protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, ou private static void FillValues(Float input, ref VBuffer result) { + var values = result.Values; + var indices = result.Indices; + if (input == 0) { - VBufferUtils.Resize(ref result, 2, 0); + result = new VBuffer(2, 0, values, indices); return; } - var editor = VBufferEditor.Create(ref result, 2, 1); + if (Utils.Size(values) < 1) + values = new Float[1]; + if (Utils.Size(indices) < 1) + indices = new int[1]; + if (Float.IsNaN(input)) { - editor.Values[0] = 1; - editor.Indices[0] = 1; + values[0] = 1; + indices[0] = 1; } else { - editor.Values[0] = input; - editor.Indices[0] = 0; + values[0] = input; + indices[0] = 0; } - result = editor.Commit(); + result = new VBuffer(2, 1, values, indices); } // This converts in place. @@ -299,14 +308,18 @@ private static void FillValues(IExceptionContext ectx, ref VBuffer buffer int size = buffer.Length; ectx.Check(0 <= size & size < int.MaxValue / 2); - var values = buffer.GetValues(); - var editor = VBufferEditor.Create(ref buffer, size * 2, values.Length); + int count = buffer.Count; + var values = buffer.Values; + var indices = buffer.Indices; int iivDst = 0; - if (buffer.IsDense) + if (count >= size) { // Currently, it's dense. We always produce sparse. + ectx.Assert(Utils.Size(values) >= size); + if (Utils.Size(indices) < size) + indices = new int[size]; - for (int ivSrc = 0; ivSrc < values.Length; ivSrc++) + for (int ivSrc = 0; ivSrc < count; ivSrc++) { ectx.Assert(iivDst <= ivSrc); var val = values[ivSrc]; @@ -314,13 +327,13 @@ private static void FillValues(IExceptionContext ectx, ref VBuffer buffer continue; if (Float.IsNaN(val)) { - editor.Values[iivDst] = 1; - editor.Indices[iivDst] = 2 * ivSrc + 1; + values[iivDst] = 1; + indices[iivDst] = 2 * ivSrc + 1; } else { - editor.Values[iivDst] = val; - editor.Indices[iivDst] = 2 * ivSrc; + values[iivDst] = val; + indices[iivDst] = 2 * ivSrc; } iivDst++; } @@ -328,10 +341,11 @@ private static void FillValues(IExceptionContext ectx, ref VBuffer buffer else { // Currently, it's sparse. + ectx.Assert(Utils.Size(values) >= count); + ectx.Assert(Utils.Size(indices) >= count); - var indices = buffer.GetIndices(); int ivPrev = -1; - for (int iivSrc = 0; iivSrc < values.Length; iivSrc++) + for (int iivSrc = 0; iivSrc < count; iivSrc++) { ectx.Assert(iivDst <= iivSrc); var val = values[iivSrc]; @@ -342,20 +356,20 @@ private static void FillValues(IExceptionContext ectx, ref VBuffer buffer ivPrev = iv; if (Float.IsNaN(val)) { - editor.Values[iivDst] = 1; - editor.Indices[iivDst] = 2 * iv + 1; + values[iivDst] = 1; + indices[iivDst] = 2 * iv + 1; } else { - editor.Values[iivDst] = val; - editor.Indices[iivDst] = 2 * iv; + values[iivDst] = val; + indices[iivDst] = 2 * iv; } iivDst++; } } - ectx.Assert(0 <= iivDst & iivDst <= values.Length); - buffer = editor.CommitTruncated(iivDst); + ectx.Assert(0 <= iivDst & iivDst <= count); + buffer = new VBuffer(size * 2, iivDst, values, indices); } } } diff --git a/src/Microsoft.ML.Transforms/MutualInformationFeatureSelection.cs b/src/Microsoft.ML.Transforms/MutualInformationFeatureSelection.cs index 7982511cb8..c98ccfab04 100644 --- a/src/Microsoft.ML.Transforms/MutualInformationFeatureSelection.cs +++ b/src/Microsoft.ML.Transforms/MutualInformationFeatureSelection.cs @@ -291,7 +291,7 @@ private sealed class Impl private readonly IHost _host; private readonly BinFinderBase _binFinder; private int _numBins; - private VBuffer _labels; // always dense + private int[] _labels; private int _numLabels; private int[][] _contingencyTable; private int[] _labelSums; @@ -406,28 +406,28 @@ private void GetLabels(Transposer trans, ColumnType labelType, int labelCol) { var tmp = default(VBuffer); trans.GetSingleSlotValue(labelCol, ref tmp); - BinInts(in tmp, ref labels, _numBins, out min, out lim); + BinInts(ref tmp, ref labels, _numBins, out min, out lim); _numLabels = lim - min; } else if (labelType == NumberType.R4) { var tmp = default(VBuffer); trans.GetSingleSlotValue(labelCol, ref tmp); - BinSingles(in tmp, ref labels, _numBins, out min, out lim); + BinSingles(ref tmp, ref labels, _numBins, out min, out lim); _numLabels = lim - min; } else if (labelType == NumberType.R8) { var tmp = default(VBuffer); trans.GetSingleSlotValue(labelCol, ref tmp); - BinDoubles(in tmp, ref labels, _numBins, out min, out lim); + BinDoubles(ref tmp, ref labels, _numBins, out min, out lim); _numLabels = lim - min; } else if (labelType.IsBool) { var tmp = default(VBuffer); trans.GetSingleSlotValue(labelCol, ref tmp); - BinBools(in tmp, ref labels); + BinBools(ref tmp, ref labels); _numLabels = 3; min = -1; lim = 2; @@ -438,7 +438,7 @@ private void GetLabels(Transposer trans, ColumnType labelType, int labelCol) KeyLabelGetter del = GetKeyLabels; var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(labelType.RawType); var parameters = new object[] { trans, labelCol, labelType }; - _labels = (VBuffer)methodInfo.Invoke(this, parameters); + _labels = (int[])methodInfo.Invoke(this, parameters); _numLabels = labelType.KeyCount + 1; // No need to densify or shift in this case. @@ -448,25 +448,29 @@ private void GetLabels(Transposer trans, ColumnType labelType, int labelCol) // Densify and shift labels. VBufferUtils.Densify(ref labels); Contracts.Assert(labels.IsDense); - var labelsEditor = VBufferEditor.CreateFromBuffer(ref labels); - for (int i = 0; i < labels.Length; i++) + _labels = labels.Values; + if (labels.Length < _labels.Length) + Array.Resize(ref _labels, labels.Length); + for (int i = 0; i < _labels.Length; i++) { - labelsEditor.Values[i] -= min; - Contracts.Assert(labelsEditor.Values[i] < _numLabels); + _labels[i] -= min; + Contracts.Assert(_labels[i] < _numLabels); } - _labels = labelsEditor.Commit(); } - private delegate VBuffer KeyLabelGetter(Transposer trans, int labelCol, ColumnType labeColumnType); + private delegate int[] KeyLabelGetter(Transposer trans, int labelCol, ColumnType labeColumnType); - private VBuffer GetKeyLabels(Transposer trans, int labelCol, ColumnType labelColumnType) + private int[] GetKeyLabels(Transposer trans, int labelCol, ColumnType labeColumnType) { var tmp = default(VBuffer); var labels = default(VBuffer); trans.GetSingleSlotValue(labelCol, ref tmp); - BinKeys(labelColumnType)(in tmp, ref labels); + BinKeys(labeColumnType)(in tmp, ref labels); VBufferUtils.Densify(ref labels); - return labels; + var values = labels.Values; + if (labels.Length < values.Length) + Array.Resize(ref values, labels.Length); + return values; } /// @@ -481,7 +485,7 @@ private Single[] ComputeMutualInformation(Transposer trans, int col) return ComputeMutualInformation(trans, col, (ref VBuffer src, ref VBuffer dst, out int min, out int lim) => { - BinInts(in src, ref dst, _numBins, out min, out lim); + BinInts(ref src, ref dst, _numBins, out min, out lim); }); } if (type.ItemType == NumberType.R4) @@ -489,7 +493,7 @@ private Single[] ComputeMutualInformation(Transposer trans, int col) return ComputeMutualInformation(trans, col, (ref VBuffer src, ref VBuffer dst, out int min, out int lim) => { - BinSingles(in src, ref dst, _numBins, out min, out lim); + BinSingles(ref src, ref dst, _numBins, out min, out lim); }); } if (type.ItemType == NumberType.R8) @@ -497,7 +501,7 @@ private Single[] ComputeMutualInformation(Transposer trans, int col) return ComputeMutualInformation(trans, col, (ref VBuffer src, ref VBuffer dst, out int min, out int lim) => { - BinDoubles(in src, ref dst, _numBins, out min, out lim); + BinDoubles(ref src, ref dst, _numBins, out min, out lim); }); } if (type.ItemType.IsBool) @@ -507,7 +511,7 @@ private Single[] ComputeMutualInformation(Transposer trans, int col) { min = -1; lim = 2; - BinBools(in src, ref dst); + BinBools(ref src, ref dst); }); } Contracts.Assert(0 < type.ItemType.KeyCount && type.ItemType.KeyCount < Utils.ArrayMaxSize); @@ -605,16 +609,13 @@ private Single ComputeMutualInformation(in VBuffer features, int numFeature /// private void FillTable(in VBuffer features, int offset, int numFeatures) { - Contracts.Assert(_labels.IsDense); Contracts.Assert(_labels.Length == features.Length); - var featureValues = features.GetValues(); - var labelsValues = _labels.GetValues(); if (features.IsDense) { - for (int i = 0; i < labelsValues.Length; i++) + for (int i = 0; i < _labels.Length; i++) { - var label = labelsValues[i]; - var feature = featureValues[i] - offset; + var label = _labels[i]; + var feature = features.Values[i] - offset; Contracts.Assert(0 <= label && label < _numLabels); Contracts.Assert(0 <= feature && feature < numFeatures); _contingencyTable[label][feature]++; @@ -622,24 +623,23 @@ private void FillTable(in VBuffer features, int offset, int numFeatures) return; } - var featureIndices = features.GetIndices(); int ii = 0; - for (int i = 0; i < labelsValues.Length; i++) + for (int i = 0; i < _labels.Length; i++) { - var label = labelsValues[i]; + var label = _labels[i]; int feature; - if (ii == featureIndices.Length || i < featureIndices[ii]) + if (ii == features.Count || i < features.Indices[ii]) feature = -offset; else { - feature = featureValues[ii] - offset; + feature = features.Values[ii] - offset; ii++; } Contracts.Assert(0 <= label && label < _numLabels); Contracts.Assert(0 <= feature && feature < numFeatures); _contingencyTable[label][feature]++; } - Contracts.Assert(ii == featureIndices.Length); + Contracts.Assert(ii == features.Count); } /// @@ -673,12 +673,12 @@ private static ValueMapper, VBuffer> BinKeys(ColumnType colTy /// /// Maps Ints. /// - private void BinInts(in VBuffer input, ref VBuffer output, + private void BinInts(ref VBuffer input, ref VBuffer output, int numBins, out int min, out int lim) { Contracts.Assert(_singles.Count == 0); - var bounds = _binFinder.FindBins(numBins, _singles, input.Length - input.GetValues().Length); + var bounds = _binFinder.FindBins(numBins, _singles, input.Length - input.Count); min = -1 - bounds.FindIndexSorted(0); lim = min + bounds.Length + 1; int offset = min; @@ -692,19 +692,21 @@ private void BinInts(in VBuffer input, ref VBuffer output, /// /// Maps from Singles to ints. NaNs (and only NaNs) are mapped to the first bin. /// - private void BinSingles(in VBuffer input, ref VBuffer output, + private void BinSingles(ref VBuffer input, ref VBuffer output, int numBins, out int min, out int lim) { Contracts.Assert(_singles.Count == 0); - var inputValues = input.GetValues(); - for (int i = 0; i < inputValues.Length; i++) + if (input.Values != null) { - var val = inputValues[i]; - if (!Single.IsNaN(val)) - _singles.Add(val); + for (int i = 0; i < input.Count; i++) + { + var val = input.Values[i]; + if (!Single.IsNaN(val)) + _singles.Add(val); + } } - var bounds = _binFinder.FindBins(numBins, _singles, input.Length - inputValues.Length); + var bounds = _binFinder.FindBins(numBins, _singles, input.Length - input.Count); min = -1 - bounds.FindIndexSorted(0); lim = min + bounds.Length + 1; int offset = min; @@ -718,19 +720,21 @@ private void BinSingles(in VBuffer input, ref VBuffer output, /// /// Maps from Doubles to ints. NaNs (and only NaNs) are mapped to the first bin. /// - private void BinDoubles(in VBuffer input, ref VBuffer output, + private void BinDoubles(ref VBuffer input, ref VBuffer output, int numBins, out int min, out int lim) { Contracts.Assert(_doubles.Count == 0); - var inputValues = input.GetValues(); - for (int i = 0; i < inputValues.Length; i++) + if (input.Values != null) { - var val = inputValues[i]; - if (!Double.IsNaN(val)) - _doubles.Add(val); + for (int i = 0; i < input.Count; i++) + { + var val = input.Values[i]; + if (!Double.IsNaN(val)) + _doubles.Add(val); + } } - var bounds = _binFinder.FindBins(numBins, _doubles, input.Length - inputValues.Length); + var bounds = _binFinder.FindBins(numBins, _doubles, input.Length - input.Count); var offset = min = -1 - bounds.FindIndexSorted(0); lim = min + bounds.Length + 1; ValueMapper mapper = @@ -740,7 +744,7 @@ private void BinDoubles(in VBuffer input, ref VBuffer output, _doubles.Clear(); } - private void BinBools(in VBuffer input, ref VBuffer output) + private void BinBools(ref VBuffer input, ref VBuffer output) { if (_boolMapper == null) _boolMapper = CreateVectorMapper(BinOneBool); @@ -771,20 +775,24 @@ private static ValueMapper, VBuffer> CreateVectorMapper(this ValueMapper map, in VBuffer input, ref VBuffer output) { - var inputValues = input.GetValues(); - var editor = VBufferEditor.Create(ref output, input.Length, inputValues.Length); - for (int i = 0; i < inputValues.Length; i++) + var values = output.Values; + if (Utils.Size(values) < input.Count) + values = new TDst[input.Count]; + for (int i = 0; i < input.Count; i++) { - TSrc val = inputValues[i]; - map(in val, ref editor.Values[i]); + TSrc val = input.Values[i]; + map(in val, ref values[i]); } - if (!input.IsDense && inputValues.Length > 0) + var indices = output.Indices; + if (!input.IsDense && input.Count > 0) { - input.GetIndices().CopyTo(editor.Indices); + if (Utils.Size(indices) < input.Count) + indices = new int[input.Count]; + Array.Copy(input.Indices, indices, input.Count); } - output = editor.Commit(); + output = new VBuffer(input.Length, input.Count, values, indices); } } } diff --git a/src/Microsoft.ML.Transforms/NADropTransform.cs b/src/Microsoft.ML.Transforms/NADropTransform.cs new file mode 100644 index 0000000000..c045ba5d7a --- /dev/null +++ b/src/Microsoft.ML.Transforms/NADropTransform.cs @@ -0,0 +1,339 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Reflection; +using System.Text; +using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.CommandLine; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Data.Conversion; +using Microsoft.ML.Runtime.EntryPoints; +using Microsoft.ML.Runtime.Internal.Utilities; +using Microsoft.ML.Runtime.Model; + +[assembly: LoadableClass(NADropTransform.Summary, typeof(NADropTransform), typeof(NADropTransform.Arguments), typeof(SignatureDataTransform), + NADropTransform.FriendlyName, NADropTransform.ShortName, "NADropTransform")] + +[assembly: LoadableClass(NADropTransform.Summary, typeof(NADropTransform), null, typeof(SignatureLoadDataTransform), + NADropTransform.FriendlyName, NADropTransform.LoaderSignature)] + +namespace Microsoft.ML.Runtime.Data +{ + /// + public sealed class NADropTransform : OneToOneTransformBase + { + public sealed class Arguments : TransformInputBase + { + [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "Columns to drop the NAs for", ShortName = "col", SortOrder = 1)] + public Column[] Column; + } + + public sealed class Column : OneToOneColumn + { + public static Column Parse(string str) + { + var res = new Column(); + if (res.TryParse(str)) + return res; + return null; + } + + public bool TryUnparse(StringBuilder sb) + { + Contracts.AssertValue(sb); + return TryUnparseCore(sb); + } + } + + internal const string Summary = "Removes NAs from vector columns."; + internal const string FriendlyName = "NA Drop Transform"; + internal const string ShortName = "NADrop"; + public const string LoaderSignature = "NADropTransform"; + + private static VersionInfo GetVersionInfo() + { + return new VersionInfo( + modelSignature: "NADROPXF", + verWrittenCur: 0x00010001, // Initial + verReadableCur: 0x00010001, + verWeCanReadBack: 0x00010001, + loaderSignature: LoaderSignature, + loaderAssemblyName: typeof(NADropTransform).Assembly.FullName); + } + + private const string RegistrationName = "DropNAs"; + + // The isNA delegates, parallel to Infos. + private readonly Delegate[] _isNAs; + + /// + /// Convenience constructor for public facing API. + /// + /// Host Environment. + /// Input . This is the output from previous transform or loader. + /// Name of the output column. + /// Name of the column to be transformed. If this is null '' will be used. + public NADropTransform(IHostEnvironment env, IDataView input, string name, string source = null) + : this(env, new Arguments() { Column = new[] { new Column() { Source = source ?? name, Name = name } } }, input) + { + } + + public NADropTransform(IHostEnvironment env, Arguments args, IDataView input) + : base(Contracts.CheckRef(env, nameof(env)), RegistrationName, env.CheckRef(args, nameof(args)).Column, input, TestType) + { + Host.CheckNonEmpty(args.Column, nameof(args.Column)); + _isNAs = InitIsNAAndMetadata(); + } + + private Delegate[] InitIsNAAndMetadata() + { + var md = Metadata; + var isNAs = new Delegate[Infos.Length]; + for (int iinfo = 0; iinfo < Infos.Length; iinfo++) + { + var type = Infos[iinfo].TypeSrc; + isNAs[iinfo] = GetIsNADelegate(type); + // Register for metadata. Propagate the IsNormalized metadata. + // SlotNames will not be propagated. + using (var bldr = md.BuildMetadata(iinfo, Source.Schema, Infos[iinfo].Source, + MetadataUtils.Kinds.IsNormalized, MetadataUtils.Kinds.KeyValues)) + { + // Output does not have missings. + bldr.AddPrimitive(MetadataUtils.Kinds.HasMissingValues, BoolType.Instance, false); + } + } + md.Seal(); + return isNAs; + } + + /// + /// Returns the isNA predicate for the respective type. + /// + private Delegate GetIsNADelegate(ColumnType type) + { + Func func = GetIsNADelegate; + return Utils.MarshalInvoke(func, type.ItemType.RawType, type); + } + + private Delegate GetIsNADelegate(ColumnType type) + { + return Conversions.Instance.GetIsNAPredicate(type.ItemType); + } + + private static string TestType(ColumnType type) + { + if (!type.IsVector) + { + return string.Format("Type '{0}' is not supported by {1} since it is not a vector", + type, LoaderSignature); + } + + // Item type must have an NA value that exists. + Func func = TestType; + return Utils.MarshalInvoke(func, type.ItemType.RawType, type.ItemType); + } + + private static string TestType(ColumnType type) + { + Contracts.Assert(type.ItemType.RawType == typeof(T)); + InPredicate isNA; + if (!Conversions.Instance.TryGetIsNAPredicate(type.ItemType, out isNA)) + { + return string.Format("Type '{0}' is not supported by {1} since it doesn't have an NA value", + type, LoaderSignature); + } + return null; + } + + public static NADropTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + { + Contracts.CheckValue(env, nameof(env)); + var h = env.Register(RegistrationName); + h.CheckValue(ctx, nameof(ctx)); + h.CheckValue(input, nameof(input)); + ctx.CheckAtModel(GetVersionInfo()); + return h.Apply("Loading Model", ch => new NADropTransform(h, ctx, input)); + } + + private NADropTransform(IHost host, ModelLoadContext ctx, IDataView input) + : base(host, ctx, input, TestType) + { + Host.AssertValue(ctx); + // *** Binary format *** + // + Host.AssertNonEmpty(Infos); + + _isNAs = InitIsNAAndMetadata(); + } + + public override void Save(ModelSaveContext ctx) + { + Host.CheckValue(ctx, nameof(ctx)); + ctx.CheckAtModel(); + ctx.SetVersionInfo(GetVersionInfo()); + + // *** Binary format *** + // + SaveBase(ctx); + } + + protected override ColumnType GetColumnTypeCore(int iinfo) + { + Host.Assert(0 <= iinfo & iinfo < Infos.Length); + return new VectorType(Infos[iinfo].TypeSrc.ItemType.AsPrimitive); + } + + protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, out Action disposer) + { + Host.AssertValueOrNull(ch); + Host.AssertValue(input); + Host.Assert(0 <= iinfo && iinfo < Infos.Length); + Host.Assert(Infos[iinfo].TypeSrc.IsVector); + + disposer = null; + Func>> del = MakeVecGetter; + var methodInfo = del.GetMethodInfo().GetGenericMethodDefinition().MakeGenericMethod(Infos[iinfo].TypeSrc.ItemType.RawType); + return (Delegate)methodInfo.Invoke(this, new object[] { input, iinfo }); + } + + private ValueGetter> MakeVecGetter(IRow input, int iinfo) + { + var srcGetter = GetSrcGetter>(input, iinfo); + var buffer = default(VBuffer); + var isNA = (InPredicate)_isNAs[iinfo]; + var def = default(TDst); + if (isNA(in def)) + { + // Case I: NA equals the default value. + return + (ref VBuffer value) => + { + srcGetter(ref buffer); + DropNAsAndDefaults(ref buffer, ref value, isNA); + }; + } + + // Case II: NA is different form default value. + Host.Assert(!isNA(in def)); + return + (ref VBuffer value) => + { + srcGetter(ref buffer); + DropNAs(ref buffer, ref value, isNA); + }; + } + + private void DropNAsAndDefaults(ref VBuffer src, ref VBuffer dst, InPredicate isNA) + { + Host.AssertValue(isNA); + + int newCount = 0; + for (int i = 0; i < src.Count; i++) + { + if (!isNA(in src.Values[i])) + newCount++; + } + Host.Assert(newCount <= src.Count); + + if (newCount == 0) + { + dst = new VBuffer(0, dst.Values, dst.Indices); + return; + } + + if (newCount == src.Count) + { + Utils.Swap(ref src, ref dst); + if (!dst.IsDense) + { + Host.Assert(dst.Count == newCount); + dst = new VBuffer(dst.Count, dst.Values, dst.Indices); + } + return; + } + + int iDst = 0; + var values = dst.Values; + if (Utils.Size(values) < newCount) + values = new TDst[newCount]; + + // Densifying sparse vectors since default value equals NA and hence should be dropped. + for (int i = 0; i < src.Count; i++) + { + if (!isNA(in src.Values[i])) + values[iDst++] = src.Values[i]; + } + Host.Assert(iDst == newCount); + + dst = new VBuffer(newCount, values, dst.Indices); + } + + private void DropNAs(ref VBuffer src, ref VBuffer dst, InPredicate isNA) + { + Host.AssertValue(isNA); + + int newCount = 0; + for (int i = 0; i < src.Count; i++) + { + if (!isNA(in src.Values[i])) + newCount++; + } + Host.Assert(newCount <= src.Count); + + if (newCount == 0) + { + dst = new VBuffer(src.Length - src.Count, 0, dst.Values, dst.Indices); + return; + } + + if (newCount == src.Count) + { + Utils.Swap(ref src, ref dst); + return; + } + + var values = dst.Values; + if (Utils.Size(values) < newCount) + values = new TDst[newCount]; + + int iDst = 0; + if (src.IsDense) + { + for (int i = 0; i < src.Count; i++) + { + if (!isNA(in src.Values[i])) + { + values[iDst] = src.Values[i]; + iDst++; + } + } + Host.Assert(iDst == newCount); + dst = new VBuffer(newCount, values, dst.Indices); + } + else + { + var indices = dst.Indices; + if (Utils.Size(indices) < newCount) + indices = new int[newCount]; + + int offset = 0; + for (int i = 0; i < src.Count; i++) + { + if (!isNA(in src.Values[i])) + { + values[iDst] = src.Values[i]; + indices[iDst] = src.Indices[i] - offset; + iDst++; + } + else + offset++; + } + Host.Assert(iDst == newCount); + Host.Assert(offset == src.Count - newCount); + dst = new VBuffer(src.Length - offset, newCount, values, indices); + } + } + } +} \ No newline at end of file diff --git a/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs b/src/Microsoft.ML.Transforms/NAHandleTransform.cs similarity index 79% rename from src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs rename to src/Microsoft.ML.Transforms/NAHandleTransform.cs index 4e817a9098..9c70dab3e8 100644 --- a/src/Microsoft.ML.Transforms/MissingValueHandlingTransformer.cs +++ b/src/Microsoft.ML.Transforms/NAHandleTransform.cs @@ -13,13 +13,13 @@ using System.Collections.Generic; using System.Text; -[assembly: LoadableClass(MissingValueHandlingTransformer.Summary, typeof(IDataTransform), typeof(MissingValueHandlingTransformer), typeof(MissingValueHandlingTransformer.Arguments), typeof(SignatureDataTransform), - MissingValueHandlingTransformer.FriendlyName, "NAHandleTransform", MissingValueHandlingTransformer.ShortName, "NA", DocName = "transform/NAHandle.md")] +[assembly: LoadableClass(NAHandleTransform.Summary, typeof(IDataTransform), typeof(NAHandleTransform), typeof(NAHandleTransform.Arguments), typeof(SignatureDataTransform), + NAHandleTransform.FriendlyName, "NAHandleTransform", NAHandleTransform.ShortName, "NA", DocName = "transform/NAHandle.md")] namespace Microsoft.ML.Transforms { /// - public static class MissingValueHandlingTransformer + public static class NAHandleTransform { public enum ReplacementKind : byte { @@ -108,7 +108,7 @@ public bool TryUnparse(StringBuilder sb) internal const string ShortName = "NAHandle"; /// - /// A helper method to create for public facing API. + /// A helper method to create for public facing API. /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -136,10 +136,10 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV h.CheckValue(input, nameof(input)); h.CheckUserArg(Utils.Size(args.Column) > 0, nameof(args.Column)); - var replaceCols = new List(); - var naIndicatorCols = new List(); - var naConvCols = new List(); - var concatCols = new List(); + var replaceCols = new List(); + var naIndicatorCols = new List(); + var naConvCols = new List(); + var concatCols = new List(); var dropCols = new List(); var tmpIsMissingColNames = input.Schema.GetTempColumnNames(args.Column.Length, "IsMissing"); var tmpReplaceColNames = input.Schema.GetTempColumnNames(args.Column.Length, "Replace"); @@ -150,7 +150,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV var addInd = column.ConcatIndicator ?? args.Concat; if (!addInd) { - replaceCols.Add(new MissingValueReplacingTransformer.ColumnInfo(column.Source, column.Name, (MissingValueReplacingTransformer.ColumnInfo.ReplacementMode)(column.Kind ?? args.ReplaceWith), column.ImputeBySlot ?? args.ImputeBySlot)); + replaceCols.Add(new NAReplaceTransform.ColumnInfo(column.Source, column.Name, (NAReplaceTransform.ColumnInfo.ReplacementMode)(column.Kind ?? args.ReplaceWith), column.ImputeBySlot ?? args.ImputeBySlot)); continue; } @@ -170,19 +170,19 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV var tmpReplacementColName = tmpReplaceColNames[i]; // Add an NAHandleTransform column. - naIndicatorCols.Add(new MissingValueIndicatorTransformer.Column() { Name = tmpIsMissingColName, Source = column.Source }); + naIndicatorCols.Add(new NAIndicatorTransform.Column() { Name = tmpIsMissingColName, Source = column.Source }); // Add a ConvertTransform column if necessary. if (!identity) - naConvCols.Add(new TypeConvertingTransformer.ColumnInfo(tmpIsMissingColName, tmpIsMissingColName, replaceType.ItemType.RawKind)); + naConvCols.Add(new ConvertingTransform.ColumnInfo(tmpIsMissingColName, tmpIsMissingColName, replaceType.ItemType.RawKind)); // Add the NAReplaceTransform column. - replaceCols.Add(new MissingValueReplacingTransformer.ColumnInfo(column.Source, tmpReplacementColName, (MissingValueReplacingTransformer.ColumnInfo.ReplacementMode)(column.Kind ?? args.ReplaceWith), column.ImputeBySlot ?? args.ImputeBySlot)); + replaceCols.Add(new NAReplaceTransform.ColumnInfo(column.Source, tmpReplacementColName, (NAReplaceTransform.ColumnInfo.ReplacementMode)(column.Kind ?? args.ReplaceWith), column.ImputeBySlot ?? args.ImputeBySlot)); // Add the ConcatTransform column. if (replaceType.IsVector) { - concatCols.Add(new ColumnConcatenatingTransformer.TaggedColumn() + concatCols.Add(new ConcatTransform.TaggedColumn() { Name = column.Name, Source = new[] { @@ -193,7 +193,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV } else { - concatCols.Add(new ColumnConcatenatingTransformer.TaggedColumn() + concatCols.Add(new ConcatTransform.TaggedColumn() { Name = column.Name, Source = new[] @@ -213,25 +213,25 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV // Create the indicator columns. if (naIndicatorCols.Count > 0) - output = MissingValueIndicatorTransformer.Create(h, new MissingValueIndicatorTransformer.Arguments() { Column = naIndicatorCols.ToArray() }, input); + output = NAIndicatorTransform.Create(h, new NAIndicatorTransform.Arguments() { Column = naIndicatorCols.ToArray() }, input); // Convert the indicator columns to the correct type so that they can be concatenated to the NAReplace outputs. if (naConvCols.Count > 0) { h.AssertValue(output); //REVIEW: all this need to be converted to estimatorChain as soon as we done with dropcolumns. - output = new TypeConvertingTransformer(h, naConvCols.ToArray()).Transform(output) as IDataTransform; + output = new ConvertingTransform(h, naConvCols.ToArray()).Transform(output) as IDataTransform; } // Create the NAReplace transform. - output = MissingValueReplacingTransformer.Create(env, output ?? input, replaceCols.ToArray()); + output = NAReplaceTransform.Create(env, output ?? input, replaceCols.ToArray()); // Concat the NAReplaceTransform output and the NAIndicatorTransform output. if (naIndicatorCols.Count > 0) - output = ColumnConcatenatingTransformer.Create(h, new ColumnConcatenatingTransformer.TaggedArguments() { Column = concatCols.ToArray() }, output); + output = ConcatTransform.Create(h, new ConcatTransform.TaggedArguments() { Column = concatCols.ToArray() }, output); // Finally, drop the temporary indicator columns. if (dropCols.Count > 0) - output = ColumnSelectingTransformer.CreateDrop(h, output, dropCols.ToArray()); + output = SelectColumnsTransform.CreateDrop(h, output, dropCols.ToArray()); return output; } diff --git a/src/Microsoft.ML.Transforms/NAHandling.cs b/src/Microsoft.ML.Transforms/NAHandling.cs index e5809adf68..9ad7acd94a 100644 --- a/src/Microsoft.ML.Transforms/NAHandling.cs +++ b/src/Microsoft.ML.Transforms/NAHandling.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Transforms; @@ -13,15 +14,15 @@ namespace Microsoft.ML.Transforms public static class NAHandling { [TlcModule.EntryPoint(Name = "Transforms.MissingValuesDropper", - Desc = MissingValueDroppingTransformer.Summary, - UserName = MissingValueDroppingTransformer.FriendlyName, - ShortName = MissingValueDroppingTransformer.ShortName, + Desc = NADropTransform.Summary, + UserName = NADropTransform.FriendlyName, + ShortName = NADropTransform.ShortName, XmlInclude = new[] { @"", @"" })] - public static CommonOutputs.TransformOutput Drop(IHostEnvironment env, MissingValueDroppingTransformer.Arguments input) + public static CommonOutputs.TransformOutput Drop(IHostEnvironment env, NADropTransform.Arguments input) { - var h = EntryPointUtils.CheckArgsAndCreateHost(env, MissingValueDroppingTransformer.ShortName, input); - var xf = MissingValueDroppingTransformer.Create(h, input, input.Data); + var h = EntryPointUtils.CheckArgsAndCreateHost(env, NADropTransform.ShortName, input); + var xf = new NADropTransform(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), @@ -47,15 +48,15 @@ public static CommonOutputs.TransformOutput Filter(IHostEnvironment env, NAFilte } [TlcModule.EntryPoint(Name = "Transforms.MissingValueHandler", - Desc = MissingValueHandlingTransformer.Summary, - UserName = MissingValueHandlingTransformer.FriendlyName, - ShortName = MissingValueHandlingTransformer.ShortName, + Desc = NAHandleTransform.Summary, + UserName = NAHandleTransform.FriendlyName, + ShortName = NAHandleTransform.ShortName, XmlInclude = new[] { @"", @"" })] - public static CommonOutputs.TransformOutput Handle(IHostEnvironment env, MissingValueHandlingTransformer.Arguments input) + public static CommonOutputs.TransformOutput Handle(IHostEnvironment env, NAHandleTransform.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "NAHandle", input); - var xf = MissingValueHandlingTransformer.Create(h, input, input.Data); + var xf = NAHandleTransform.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), @@ -64,15 +65,15 @@ public static CommonOutputs.TransformOutput Handle(IHostEnvironment env, Missing } [TlcModule.EntryPoint(Name = "Transforms.MissingValueIndicator", - Desc = MissingValueIndicatorTransformer.Summary, - UserName = MissingValueIndicatorTransformer.FriendlyName, - ShortName = MissingValueIndicatorTransformer.ShortName, + Desc = NAIndicatorTransform.Summary, + UserName = NAIndicatorTransform.FriendlyName, + ShortName = NAIndicatorTransform.ShortName, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput Indicator(IHostEnvironment env, MissingValueIndicatorTransformer.Arguments input) + public static CommonOutputs.TransformOutput Indicator(IHostEnvironment env, NAIndicatorTransform.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "NAIndicator", input); - var xf = new MissingValueIndicatorTransformer(h, input).Transform(input.Data); + var xf = new NAIndicatorTransform(h, input).Transform(input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), @@ -81,15 +82,15 @@ public static CommonOutputs.TransformOutput Indicator(IHostEnvironment env, Miss } [TlcModule.EntryPoint(Name = "Transforms.MissingValueSubstitutor", - Desc = MissingValueReplacingTransformer.Summary, - UserName = MissingValueReplacingTransformer.FriendlyName, - ShortName = MissingValueReplacingTransformer.ShortName, + Desc = NAReplaceTransform.Summary, + UserName = NAReplaceTransform.FriendlyName, + ShortName = NAReplaceTransform.ShortName, XmlInclude = new[] { @"", @""})] - public static CommonOutputs.TransformOutput Replace(IHostEnvironment env, MissingValueReplacingTransformer.Arguments input) + public static CommonOutputs.TransformOutput Replace(IHostEnvironment env, NAReplaceTransform.Arguments input) { var h = EntryPointUtils.CheckArgsAndCreateHost(env, "NAReplace", input); - var xf = MissingValueReplacingTransformer.Create(h, input, input.Data); + var xf = NAReplaceTransform.Create(h, input, input.Data); return new CommonOutputs.TransformOutput() { Model = new TransformModel(h, xf, input.Data), diff --git a/src/Microsoft.ML.Transforms/MissingValueIndicatorTransformer.cs b/src/Microsoft.ML.Transforms/NAIndicatorTransform.cs similarity index 85% rename from src/Microsoft.ML.Transforms/MissingValueIndicatorTransformer.cs rename to src/Microsoft.ML.Transforms/NAIndicatorTransform.cs index cdf08a3244..1c16479613 100644 --- a/src/Microsoft.ML.Transforms/MissingValueIndicatorTransformer.cs +++ b/src/Microsoft.ML.Transforms/NAIndicatorTransform.cs @@ -18,22 +18,22 @@ using Microsoft.ML.StaticPipe.Runtime; using Microsoft.ML.Transforms; -[assembly: LoadableClass(MissingValueIndicatorTransformer.Summary, typeof(IDataTransform), typeof(MissingValueIndicatorTransformer), typeof(MissingValueIndicatorTransformer.Arguments), typeof(SignatureDataTransform), - MissingValueIndicatorTransformer.FriendlyName, MissingValueIndicatorTransformer.LoadName, "NAIndicator", MissingValueIndicatorTransformer.ShortName, DocName = "transform/NAHandle.md")] +[assembly: LoadableClass(NAIndicatorTransform.Summary, typeof(IDataTransform), typeof(NAIndicatorTransform), typeof(NAIndicatorTransform.Arguments), typeof(SignatureDataTransform), + NAIndicatorTransform.FriendlyName, NAIndicatorTransform.LoadName, "NAIndicator", NAIndicatorTransform.ShortName, DocName = "transform/NAHandle.md")] -[assembly: LoadableClass(MissingValueIndicatorTransformer.Summary, typeof(IDataTransform), typeof(MissingValueIndicatorTransformer), null, typeof(SignatureLoadDataTransform), - MissingValueIndicatorTransformer.FriendlyName, MissingValueIndicatorTransformer.LoadName)] +[assembly: LoadableClass(NAIndicatorTransform.Summary, typeof(IDataTransform), typeof(NAIndicatorTransform), null, typeof(SignatureLoadDataTransform), + NAIndicatorTransform.FriendlyName, NAIndicatorTransform.LoadName)] -[assembly: LoadableClass(MissingValueIndicatorTransformer.Summary, typeof(MissingValueIndicatorTransformer), null, typeof(SignatureLoadModel), - MissingValueIndicatorTransformer.FriendlyName, MissingValueIndicatorTransformer.LoadName)] +[assembly: LoadableClass(NAIndicatorTransform.Summary, typeof(NAIndicatorTransform), null, typeof(SignatureLoadModel), + NAIndicatorTransform.FriendlyName, NAIndicatorTransform.LoadName)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(MissingValueIndicatorTransformer), null, typeof(SignatureLoadRowMapper), - MissingValueIndicatorTransformer.FriendlyName, MissingValueIndicatorTransformer.LoadName)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(NAIndicatorTransform), null, typeof(SignatureLoadRowMapper), + NAIndicatorTransform.FriendlyName, NAIndicatorTransform.LoadName)] namespace Microsoft.ML.Transforms { /// - public sealed class MissingValueIndicatorTransformer : OneToOneTransformerBase + public sealed class NAIndicatorTransform : OneToOneTransformerBase { public sealed class Column : OneToOneColumn { @@ -70,7 +70,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoadName, - loaderAssemblyName: typeof(MissingValueIndicatorTransformer).Assembly.FullName); + loaderAssemblyName: typeof(NAIndicatorTransform).Assembly.FullName); } internal const string Summary = "Create a boolean output column with the same number of slots as the input column, where the output value" @@ -78,27 +78,27 @@ private static VersionInfo GetVersionInfo() internal const string FriendlyName = "NA Indicator Transform"; internal const string ShortName = "NAInd"; - private const string RegistrationName = nameof(MissingValueIndicatorTransformer); + private const string RegistrationName = nameof(NAIndicatorTransform); public IReadOnlyList<(string input, string output)> Columns => ColumnPairs.AsReadOnly(); /// - /// Initializes a new instance of + /// Initializes a new instance of /// /// The environment to use. /// The names of the input columns of the transformation and the corresponding names for the output columns. - public MissingValueIndicatorTransformer(IHostEnvironment env, params (string input, string output)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueIndicatorTransformer)), columns) + public NAIndicatorTransform(IHostEnvironment env, params (string input, string output)[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(NAIndicatorTransform)), columns) { } - internal MissingValueIndicatorTransformer(IHostEnvironment env, Arguments args) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueIndicatorTransformer)), GetColumnPairs(args.Column)) + internal NAIndicatorTransform(IHostEnvironment env, Arguments args) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(NAIndicatorTransform)), GetColumnPairs(args.Column)) { } - private MissingValueIndicatorTransformer(IHostEnvironment env, ModelLoadContext ctx) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueIndicatorTransformer)), ctx) + private NAIndicatorTransform(IHostEnvironment env, ModelLoadContext ctx) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(NAIndicatorTransform)), ctx) { Host.CheckValue(ctx, nameof(ctx)); } @@ -107,17 +107,17 @@ private static (string input, string output)[] GetColumnPairs(Column[] columns) => columns.Select(c => (c.Source ?? c.Name, c.Name)).ToArray(); // Factory method for SignatureLoadModel - internal static MissingValueIndicatorTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + internal static NAIndicatorTransform Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); ctx.CheckAtModel(GetVersionInfo()); - return new MissingValueIndicatorTransformer(env, ctx); + return new NAIndicatorTransform(env, ctx); } // Factory method for SignatureDataTransform. internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) - => new MissingValueIndicatorTransformer(env, args).MakeDataTransform(input); + => new NAIndicatorTransform(env, args).MakeDataTransform(input); // Factory method for SignatureLoadDataTransform. internal static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) @@ -140,9 +140,9 @@ public override void Save(ModelSaveContext ctx) protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : OneToOneMapperBase + private sealed class Mapper : MapperBase { - private readonly MissingValueIndicatorTransformer _parent; + private readonly NAIndicatorTransform _parent; private readonly ColInfo[] _infos; private sealed class ColInfo @@ -163,7 +163,7 @@ public ColInfo(string input, string output, ColumnType inType, ColumnType outTyp } } - public Mapper(MissingValueIndicatorTransformer parent, Schema inputSchema) + public Mapper(NAIndicatorTransform parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -190,7 +190,7 @@ private ColInfo[] CreateInfos(Schema inputSchema) return infos; } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int iinfo = 0; iinfo < _infos.Length; iinfo++) @@ -223,7 +223,7 @@ private static Delegate GetIsNADelegate(ColumnType type) return Runtime.Data.Conversion.Conversions.Instance.GetIsNAPredicate(type.ItemType); } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _infos.Length); @@ -294,8 +294,8 @@ private void FindNAs(in VBuffer src, InPredicate isNA, bool defaultIsNA // Find the indices of all of the NAs. indices.Clear(); - var srcValues = src.GetValues(); - var srcCount = srcValues.Length; + var srcValues = src.Values; + var srcCount = src.Count; if (src.IsDense) { for (int i = 0; i < srcCount; i++) @@ -307,7 +307,7 @@ private void FindNAs(in VBuffer src, InPredicate isNA, bool defaultIsNA } else if (!defaultIsNA) { - var srcIndices = src.GetIndices(); + var srcIndices = src.Indices; for (int ii = 0; ii < srcCount; ii++) { if (isNA(in srcValues[ii])) @@ -318,7 +318,7 @@ private void FindNAs(in VBuffer src, InPredicate isNA, bool defaultIsNA else { // Note that this adds non-NAs to indices -- this is indicated by sense being false. - var srcIndices = src.GetIndices(); + var srcIndices = src.Indices; for (int ii = 0; ii < srcCount; ii++) { if (!isNA(in srcValues[ii])) @@ -334,20 +334,23 @@ private void FindNAs(in VBuffer src, InPredicate isNA, bool defaultIsNA /// private void FillValues(int srcLength, ref VBuffer dst, List indices, bool sense) { + var dstValues = dst.Values; + var dstIndices = dst.Indices; + if (indices.Count == 0) { if (sense) { // Return empty VBuffer. - VBufferUtils.Resize(ref dst, srcLength, 0); + dst = new VBuffer(srcLength, 0, dstValues, dstIndices); return; } // Return VBuffer filled with 1's. - var editor = VBufferEditor.Create(ref dst, srcLength); + Utils.EnsureSize(ref dstValues, srcLength, false); for (int i = 0; i < srcLength; i++) - editor.Values[i] = true; - dst = editor.Commit(); + dstValues[i] = true; + dst = new VBuffer(srcLength, dstValues, dstIndices); return; } @@ -355,20 +358,22 @@ private void FillValues(int srcLength, ref VBuffer dst, List indices, { // Will produce sparse output. int dstCount = indices.Count; - var editor = VBufferEditor.Create(ref dst, srcLength, dstCount); + Utils.EnsureSize(ref dstValues, dstCount, false); + Utils.EnsureSize(ref dstIndices, dstCount, false); - indices.CopyTo(editor.Indices); + indices.CopyTo(dstIndices); for (int ii = 0; ii < dstCount; ii++) - editor.Values[ii] = true; + dstValues[ii] = true; Host.Assert(dstCount <= srcLength); - dst = editor.Commit(); + dst = new VBuffer(srcLength, dstCount, dstValues, dstIndices); } else if (!sense && srcLength - indices.Count < srcLength / 2) { // Will produce sparse output. int dstCount = srcLength - indices.Count; - var editor = VBufferEditor.Create(ref dst, srcLength, dstCount); + Utils.EnsureSize(ref dstValues, dstCount, false); + Utils.EnsureSize(ref dstIndices, dstCount, false); // Appends the length of the src to make the loop simpler, // as the length of src will never be reached in the loop. @@ -384,8 +389,8 @@ private void FillValues(int srcLength, ref VBuffer dst, List indices, if (i < iNext) { Host.Assert(iiDst < dstCount); - editor.Values[iiDst] = true; - editor.Indices[iiDst++] = i; + dstValues[iiDst] = true; + dstIndices[iiDst++] = i; } else { @@ -397,12 +402,12 @@ private void FillValues(int srcLength, ref VBuffer dst, List indices, Host.Assert(srcLength == iiSrc + iiDst); Host.Assert(iiDst == dstCount); - dst = editor.Commit(); + dst = new VBuffer(srcLength, dstCount, dstValues, dstIndices); } else { // Will produce dense output. - var editor = VBufferEditor.Create(ref dst, srcLength); + Utils.EnsureSize(ref dstValues, srcLength, false); // Appends the length of the src to make the loop simpler, // as the length of src will never be reached in the loop. @@ -414,22 +419,22 @@ private void FillValues(int srcLength, ref VBuffer dst, List indices, Host.Assert(0 <= i && i <= indices[ii]); if (i == indices[ii]) { - editor.Values[i] = sense; + dstValues[i] = sense; ii++; Host.Assert(ii < indices.Count); Host.Assert(indices[ii - 1] < indices[ii]); } else - editor.Values[i] = !sense; + dstValues[i] = !sense; } - dst = editor.Commit(); + dst = new VBuffer(srcLength, dstValues, dstIndices); } } } } - public sealed class MissingValueIndicatorEstimator : TrivialEstimator + public sealed class MissingValueIndicatorEstimator : TrivialEstimator { /// /// Initializes a new instance of @@ -437,7 +442,7 @@ public sealed class MissingValueIndicatorEstimator : TrivialEstimatorThe environment to use. /// The names of the input columns of the transformation and the corresponding names for the output columns. public MissingValueIndicatorEstimator(IHostEnvironment env, params (string input, string output)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueIndicatorTransformer)), new MissingValueIndicatorTransformer(env, columns)) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(NAIndicatorTransform)), new NAIndicatorTransform(env, columns)) { Contracts.CheckValue(env, nameof(env)); } diff --git a/src/Microsoft.ML.Transforms/MissingValueReplacing.cs b/src/Microsoft.ML.Transforms/NAReplaceTransform.cs similarity index 86% rename from src/Microsoft.ML.Transforms/MissingValueReplacing.cs rename to src/Microsoft.ML.Transforms/NAReplaceTransform.cs index 9dea80ca81..ec2793cc2d 100644 --- a/src/Microsoft.ML.Transforms/MissingValueReplacing.cs +++ b/src/Microsoft.ML.Transforms/NAReplaceTransform.cs @@ -22,17 +22,17 @@ using System.Reflection; using System.Text; -[assembly: LoadableClass(MissingValueReplacingTransformer.Summary, typeof(IDataTransform), typeof(MissingValueReplacingTransformer), typeof(MissingValueReplacingTransformer.Arguments), typeof(SignatureDataTransform), - MissingValueReplacingTransformer.FriendlyName, MissingValueReplacingTransformer.LoadName, "NAReplace", MissingValueReplacingTransformer.ShortName, DocName = "transform/NAHandle.md")] +[assembly: LoadableClass(NAReplaceTransform.Summary, typeof(IDataTransform), typeof(NAReplaceTransform), typeof(NAReplaceTransform.Arguments), typeof(SignatureDataTransform), + NAReplaceTransform.FriendlyName, NAReplaceTransform.LoadName, "NAReplace", NAReplaceTransform.ShortName, DocName = "transform/NAHandle.md")] -[assembly: LoadableClass(MissingValueReplacingTransformer.Summary, typeof(IDataTransform), typeof(MissingValueReplacingTransformer), null, typeof(SignatureLoadDataTransform), - MissingValueReplacingTransformer.FriendlyName, MissingValueReplacingTransformer.LoadName)] +[assembly: LoadableClass(NAReplaceTransform.Summary, typeof(IDataTransform), typeof(NAReplaceTransform), null, typeof(SignatureLoadDataTransform), + NAReplaceTransform.FriendlyName, NAReplaceTransform.LoadName)] -[assembly: LoadableClass(MissingValueReplacingTransformer.Summary, typeof(MissingValueReplacingTransformer), null, typeof(SignatureLoadModel), - MissingValueReplacingTransformer.FriendlyName, MissingValueReplacingTransformer.LoadName)] +[assembly: LoadableClass(NAReplaceTransform.Summary, typeof(NAReplaceTransform), null, typeof(SignatureLoadModel), + NAReplaceTransform.FriendlyName, NAReplaceTransform.LoadName)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(MissingValueReplacingTransformer), null, typeof(SignatureLoadRowMapper), - MissingValueReplacingTransformer.FriendlyName, MissingValueReplacingTransformer.LoadName)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(NAReplaceTransform), null, typeof(SignatureLoadRowMapper), + NAReplaceTransform.FriendlyName, NAReplaceTransform.LoadName)] namespace Microsoft.ML.Transforms { @@ -42,7 +42,7 @@ namespace Microsoft.ML.Transforms // Imputation modes are supported for vectors both by slot and across all slots. // REVIEW: May make sense to implement the transform template interface. /// - public sealed partial class MissingValueReplacingTransformer : OneToOneTransformerBase + public sealed partial class NAReplaceTransform : OneToOneTransformerBase { public enum ReplacementKind : byte { @@ -140,7 +140,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010001, loaderSignature: LoadName, - loaderAssemblyName: typeof(MissingValueReplacingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(NAReplaceTransform).Assembly.FullName); } internal const string Summary = "Create an output column of the same type and size of the input column, where missing values " @@ -239,8 +239,8 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.ExceptParam(nameof(inputSchema), reason); } - public MissingValueReplacingTransformer(IHostEnvironment env, IDataView input, params ColumnInfo[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(MissingValueReplacingTransformer)), GetColumnPairs(columns)) + public NAReplaceTransform(IHostEnvironment env, IDataView input, params ColumnInfo[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(NAReplaceTransform)), GetColumnPairs(columns)) { // Check that all the input columns are present and correct. for (int i = 0; i < ColumnPairs.Length; i++) @@ -252,7 +252,7 @@ public MissingValueReplacingTransformer(IHostEnvironment env, IDataView input, p GetReplacementValues(input, columns, out _repValues, out _repIsDefault, out _replaceTypes); } - private MissingValueReplacingTransformer(IHost host, ModelLoadContext ctx) + private NAReplaceTransform(IHost host, ModelLoadContext ctx) : base(host, ctx) { var columnsLength = ColumnPairs.Length; @@ -289,14 +289,13 @@ private T[] GetValuesArray(VBuffer src, ColumnType srcType, int iinfo) VBufferUtils.Densify(ref src); InPredicate defaultPred = Runtime.Data.Conversion.Conversions.Instance.GetIsDefaultPredicate(srcType.ItemType); _repIsDefault[iinfo] = new BitArray(srcType.VectorSize); - var srcValues = src.GetValues(); - for (int slot = 0; slot < srcValues.Length; slot++) + for (int slot = 0; slot < src.Length; slot++) { - if (defaultPred(in srcValues[slot])) + if (defaultPred(in src.Values[slot])) _repIsDefault[iinfo][slot] = true; } - // copy the result array out. Copying is OK because this method is only called on model load. - T[] valReturn = srcValues.ToArray(); + T[] valReturn = src.Values; + Array.Resize(ref valReturn, srcType.VectorSize); Host.Assert(valReturn.Length == src.Length); return valReturn; } @@ -483,16 +482,16 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV item.Slot ?? args.ImputeBySlot); cols[i].ReplacementString = item.ReplacementString; }; - return new MissingValueReplacingTransformer(env, input, cols).MakeDataTransform(input); + return new NAReplaceTransform(env, input, cols).MakeDataTransform(input); } public static IDataTransform Create(IHostEnvironment env, IDataView input, params ColumnInfo[] columns) { - return new MissingValueReplacingTransformer(env, input, columns).MakeDataTransform(input); + return new NAReplaceTransform(env, input, columns).MakeDataTransform(input); } // Factory method for SignatureLoadModel. - public static MissingValueReplacingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + public static NAReplaceTransform Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(LoadName); @@ -500,7 +499,7 @@ public static MissingValueReplacingTransformer Create(IHostEnvironment env, Mode host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new MissingValueReplacingTransformer(host, ctx); + return new NAReplaceTransform(host, ctx); } // Factory method for SignatureLoadDataTransform. @@ -559,7 +558,7 @@ public override void Save(ModelSaveContext ctx) protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : OneToOneMapperBase, ISaveAsOnnx + private sealed class Mapper : MapperBase, ISaveAsOnnx { private sealed class ColInfo { @@ -575,14 +574,14 @@ public ColInfo(string name, string source, ColumnType type) } } - private readonly MissingValueReplacingTransformer _parent; + private readonly NAReplaceTransform _parent; private readonly ColInfo[] _infos; private readonly ColumnType[] _types; // The isNA delegates, parallel to Infos. private readonly Delegate[] _isNAs; public bool CanSaveOnnx(OnnxContext ctx) => true; - public Mapper(MissingValueReplacingTransformer parent, Schema inputSchema) + public Mapper(NAReplaceTransform parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -630,7 +629,7 @@ private ColInfo[] CreateInfos(ISchema inputSchema) return infos; } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -644,7 +643,7 @@ protected override Schema.Column[] GetOutputColumnsCore() return result; } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _infos.Length); @@ -735,13 +734,17 @@ private void FillValues(in VBuffer src, ref VBuffer dst, InPredicate Host.AssertValue(isNA); int srcSize = src.Length; - var srcValues = src.GetValues(); - int srcCount = srcValues.Length; + int srcCount = src.Count; + var srcValues = src.Values; + Host.Assert(Utils.Size(srcValues) >= srcCount); + var srcIndices = src.Indices; - // REVIEW: One thing that changing the code to simply ensure that there are srcCount indices in the arrays - // does is over-allocate space if the replacement value is the default value in a dataset with a - // signficiant amount of NA values -- is it worth handling allocation of memory for this case? - var dstEditor = VBufferEditor.Create(ref dst, srcSize, srcCount); + var dstValues = dst.Values; + var dstIndices = dst.Indices; + + // If the values array is not large enough, allocate sufficient space. + // Note: We can't set the max to srcSize as vectors can be of variable lengths. + Utils.EnsureSize(ref dstValues, srcCount, keepOld: false); int iivDst = 0; if (src.IsDense) @@ -758,15 +761,21 @@ private void FillValues(in VBuffer src, ref VBuffer dst, InPredicate // the default value, resulting in more than half of the indices being the default value. // In this case, changing the dst vector to be sparse would be more memory efficient -- the current decision // is it is not worth handling this case at the expense of running checks that will almost always not be triggered. - dstEditor.Values[ivSrc] = isNA(in srcVal) ? rep : srcVal; + dstValues[ivSrc] = isNA(in srcVal) ? rep : srcVal; } iivDst = srcCount; } else { // The source vector is sparse. + Host.Assert(Utils.Size(srcIndices) >= srcCount); Host.Assert(srcCount < srcSize); - var srcIndices = src.GetIndices(); + + // Allocate more space if necessary. + // REVIEW: One thing that changing the code to simply ensure that there are srcCount indices in the arrays + // does is over-allocate space if the replacement value is the default value in a dataset with a + // signficiant amount of NA values -- is it worth handling allocation of memory for this case? + Utils.EnsureSize(ref dstIndices, srcCount, keepOld: false); // Note: ivPrev is only used for asserts. int ivPrev = -1; @@ -780,21 +789,21 @@ private void FillValues(in VBuffer src, ref VBuffer dst, InPredicate if (!isNA(in srcVal)) { - dstEditor.Values[iivDst] = srcVal; - dstEditor.Indices[iivDst++] = iv; + dstValues[iivDst] = srcVal; + dstIndices[iivDst++] = iv; } else if (!repIsDefault) { // Allow for further sparsification. - dstEditor.Values[iivDst] = rep; - dstEditor.Indices[iivDst++] = iv; + dstValues[iivDst] = rep; + dstIndices[iivDst++] = iv; } } Host.Assert(iivDst <= srcCount); } Host.Assert(0 <= iivDst); Host.Assert(repIsDefault || iivDst == srcCount); - dst = dstEditor.CommitTruncated(iivDst); + dst = new VBuffer(srcSize, iivDst, dstValues, dstIndices); } /// @@ -809,15 +818,19 @@ private void FillValues(in VBuffer src, ref VBuffer dst, InPredicate Host.AssertValue(isNA); int srcSize = src.Length; - var srcValues = src.GetValues(); - int srcCount = srcValues.Length; + int srcCount = src.Count; + var srcValues = src.Values; + Host.Assert(Utils.Size(srcValues) >= srcCount); + var srcIndices = src.Indices; - // REVIEW: One thing that changing the code to simply ensure that there are srcCount indices in the arrays - // does is over-allocate space if the replacement value is the default value in a dataset with a - // signficiant amount of NA values -- is it worth handling allocation of memory for this case? - var dstEditor = VBufferEditor.Create(ref dst, srcSize, srcCount); + var dstValues = dst.Values; + var dstIndices = dst.Indices; + + // If the values array is not large enough, allocate sufficient space. + Utils.EnsureSize(ref dstValues, srcCount, srcSize, keepOld: false); int iivDst = 0; + Host.Assert(Utils.Size(srcValues) >= srcCount); if (src.IsDense) { // The source vector is dense. @@ -832,15 +845,21 @@ private void FillValues(in VBuffer src, ref VBuffer dst, InPredicate // the default value, resulting in more than half of the indices being the default value. // In this case, changing the dst vector to be sparse would be more memory efficient -- the current decision // is it is not worth handling this case at the expense of running checks that will almost always not be triggered. - dstEditor.Values[ivSrc] = isNA(in srcVal) ? rep[ivSrc] : srcVal; + dstValues[ivSrc] = isNA(in srcVal) ? rep[ivSrc] : srcVal; } iivDst = srcCount; } else { // The source vector is sparse. + Host.Assert(Utils.Size(srcIndices) >= srcCount); Host.Assert(srcCount < srcSize); - var srcIndices = src.GetIndices(); + + // Allocate more space if necessary. + // REVIEW: One thing that changing the code to simply ensure that there are srcCount indices in the arrays + // does is over-allocate space if the replacement value is the default value in a dataset with a + // signficiant amount of NA values -- is it worth handling allocation of memory for this case? + Utils.EnsureSize(ref dstIndices, srcCount, srcSize, keepOld: false); // Note: ivPrev is only used for asserts. int ivPrev = -1; @@ -854,20 +873,20 @@ private void FillValues(in VBuffer src, ref VBuffer dst, InPredicate if (!isNA(in srcVal)) { - dstEditor.Values[iivDst] = srcVal; - dstEditor.Indices[iivDst++] = iv; + dstValues[iivDst] = srcVal; + dstIndices[iivDst++] = iv; } else if (!repIsDefault[iv]) { // Allow for further sparsification. - dstEditor.Values[iivDst] = rep[iv]; - dstEditor.Indices[iivDst++] = iv; + dstValues[iivDst] = rep[iv]; + dstIndices[iivDst++] = iv; } } Host.Assert(iivDst <= srcCount); } Host.Assert(0 <= iivDst); - dst = dstEditor.CommitTruncated(iivDst); + dst = new VBuffer(srcSize, iivDst, dstValues, dstIndices); } public void SaveAsOnnx(OnnxContext ctx) @@ -924,24 +943,24 @@ private bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColInfo info, string src } } - public sealed class MissingValueReplacingEstimator : IEstimator + public sealed class MissingValueReplacingEstimator : IEstimator { public static class Defaults { - public const MissingValueReplacingTransformer.ColumnInfo.ReplacementMode ReplacementMode = MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.DefaultValue; + public const NAReplaceTransform.ColumnInfo.ReplacementMode ReplacementMode = NAReplaceTransform.ColumnInfo.ReplacementMode.DefaultValue; public const bool ImputeBySlot = true; } private readonly IHost _host; - private readonly MissingValueReplacingTransformer.ColumnInfo[] _columns; + private readonly NAReplaceTransform.ColumnInfo[] _columns; - public MissingValueReplacingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementKind = Defaults.ReplacementMode) - : this(env, new MissingValueReplacingTransformer.ColumnInfo(outputColumn ?? inputColumn, inputColumn, replacementKind)) + public MissingValueReplacingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, NAReplaceTransform.ColumnInfo.ReplacementMode replacementKind = Defaults.ReplacementMode) + : this(env, new NAReplaceTransform.ColumnInfo(outputColumn ?? inputColumn, inputColumn, replacementKind)) { } - public MissingValueReplacingEstimator(IHostEnvironment env, params MissingValueReplacingTransformer.ColumnInfo[] columns) + public MissingValueReplacingEstimator(IHostEnvironment env, params NAReplaceTransform.ColumnInfo[] columns) { Contracts.CheckValue(env, nameof(env)); _host = env.Register(nameof(MissingValueReplacingEstimator)); @@ -956,7 +975,7 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) { if (!inputSchema.TryFindColumn(colInfo.Input, out var col)) throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.Input); - string reason = MissingValueReplacingTransformer.TestType(col.ItemType); + string reason = NAReplaceTransform.TestType(col.ItemType); if (reason != null) throw _host.ExceptParam(nameof(inputSchema), reason); var metadata = new List(); @@ -970,7 +989,7 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) return new SchemaShape(result.Values); } - public MissingValueReplacingTransformer Fit(IDataView input) => new MissingValueReplacingTransformer(_host, input, _columns); + public NAReplaceTransform Fit(IDataView input) => new NAReplaceTransform(_host, input, _columns); } /// @@ -981,9 +1000,9 @@ public static class NAReplacerExtensions private readonly struct Config { public readonly bool ImputeBySlot; - public readonly MissingValueReplacingTransformer.ColumnInfo.ReplacementMode ReplacementMode; + public readonly NAReplaceTransform.ColumnInfo.ReplacementMode ReplacementMode; - public Config(MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode, + public Config(NAReplaceTransform.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode, bool imputeBySlot = MissingValueReplacingEstimator.Defaults.ImputeBySlot) { ImputeBySlot = imputeBySlot; @@ -1049,11 +1068,11 @@ public override IEstimator Reconcile(IHostEnvironment env, IReadOnlyDictionary outputNames, IReadOnlyCollection usedNames) { - var infos = new MissingValueReplacingTransformer.ColumnInfo[toOutput.Length]; + var infos = new NAReplaceTransform.ColumnInfo[toOutput.Length]; for (int i = 0; i < toOutput.Length; ++i) { var col = (IColInput)toOutput[i]; - infos[i] = new MissingValueReplacingTransformer.ColumnInfo(inputNames[col.Input], outputNames[toOutput[i]], col.Config.ReplacementMode, col.Config.ImputeBySlot); + infos[i] = new NAReplaceTransform.ColumnInfo(inputNames[col.Input], outputNames[toOutput[i]], col.Config.ReplacementMode, col.Config.ImputeBySlot); } return new MissingValueReplacingEstimator(env, infos); } @@ -1064,7 +1083,7 @@ public override IEstimator Reconcile(IHostEnvironment env, /// /// Incoming data. /// How NaN should be replaced - public static Scalar ReplaceNaNValues(this Scalar input, MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) + public static Scalar ReplaceNaNValues(this Scalar input, NAReplaceTransform.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) { Contracts.CheckValue(input, nameof(input)); return new OutScalar(input, new Config(replacementMode, false)); @@ -1075,7 +1094,7 @@ public static Scalar ReplaceNaNValues(this Scalar input, MissingVa /// /// Incoming data. /// How NaN should be replaced - public static Scalar ReplaceNaNValues(this Scalar input, MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) + public static Scalar ReplaceNaNValues(this Scalar input, NAReplaceTransform.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) { Contracts.CheckValue(input, nameof(input)); return new OutScalar(input, new Config(replacementMode, false)); @@ -1088,7 +1107,7 @@ public static Scalar ReplaceNaNValues(this Scalar input, Missing /// If true, per-slot imputation of replacement is performed. /// Otherwise, replacement value is imputed for the entire vector column. This setting is ignored for scalars and variable vectors, /// where imputation is always for the entire column. - public static Vector ReplaceNaNValues(this Vector input, MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode, bool imputeBySlot = MissingValueReplacingEstimator.Defaults.ImputeBySlot) + public static Vector ReplaceNaNValues(this Vector input, NAReplaceTransform.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode, bool imputeBySlot = MissingValueReplacingEstimator.Defaults.ImputeBySlot) { Contracts.CheckValue(input, nameof(input)); return new OutVectorColumn(input, new Config(replacementMode, imputeBySlot)); @@ -1102,7 +1121,7 @@ public static Vector ReplaceNaNValues(this Vector input, MissingVa /// If true, per-slot imputation of replacement is performed. /// Otherwise, replacement value is imputed for the entire vector column. This setting is ignored for scalars and variable vectors, /// where imputation is always for the entire column. - public static Vector ReplaceNaNValues(this Vector input, MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode, bool imputeBySlot = MissingValueReplacingEstimator.Defaults.ImputeBySlot) + public static Vector ReplaceNaNValues(this Vector input, NAReplaceTransform.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode, bool imputeBySlot = MissingValueReplacingEstimator.Defaults.ImputeBySlot) { Contracts.CheckValue(input, nameof(input)); return new OutVectorColumn(input, new Config(replacementMode, imputeBySlot)); @@ -1113,7 +1132,7 @@ public static Vector ReplaceNaNValues(this Vector input, Missing /// /// Incoming data. /// How NaN should be replaced - public static VarVector ReplaceNaNValues(this VarVector input, MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) + public static VarVector ReplaceNaNValues(this VarVector input, NAReplaceTransform.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) { Contracts.CheckValue(input, nameof(input)); return new OutVarVectorColumn(input, new Config(replacementMode, false)); @@ -1123,7 +1142,7 @@ public static VarVector ReplaceNaNValues(this VarVector input, Mis ///
/// Incoming data. /// How NaN should be replaced - public static VarVector ReplaceNaNValues(this VarVector input, MissingValueReplacingTransformer.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) + public static VarVector ReplaceNaNValues(this VarVector input, NAReplaceTransform.ColumnInfo.ReplacementMode replacementMode = MissingValueReplacingEstimator.Defaults.ReplacementMode) { Contracts.CheckValue(input, nameof(input)); return new OutVarVectorColumn(input, new Config(replacementMode, false)); diff --git a/src/Microsoft.ML.Transforms/MissingValueReplacingUtils.cs b/src/Microsoft.ML.Transforms/NAReplaceUtils.cs similarity index 98% rename from src/Microsoft.ML.Transforms/MissingValueReplacingUtils.cs rename to src/Microsoft.ML.Transforms/NAReplaceUtils.cs index 8466d1b5ef..82ca10a966 100644 --- a/src/Microsoft.ML.Transforms/MissingValueReplacingUtils.cs +++ b/src/Microsoft.ML.Transforms/NAReplaceUtils.cs @@ -12,7 +12,7 @@ namespace Microsoft.ML.Transforms { using Conditional = System.Diagnostics.ConditionalAttribute; - public sealed partial class MissingValueReplacingTransformer + public sealed partial class NAReplaceTransform { private static StatAggregator CreateStatAggregator(IChannel ch, ColumnType type, ReplacementKind? kind, bool bySlot, IRowCursor cursor, int col) { @@ -185,8 +185,9 @@ protected StatAggregatorAcrossSlots(IChannel ch, IRowCursor cursor, int col) protected sealed override void ProcessRow(in VBuffer src) { - var srcValues = src.GetValues(); - var srcCount = srcValues.Length; + var srcCount = src.Count; + var srcValues = src.Values; + Ch.Assert(Utils.Size(srcValues) >= srcCount); for (int slot = 0; slot < srcCount; slot++) ProcessValue(in srcValues[slot]); @@ -209,8 +210,9 @@ protected StatAggregatorBySlot(IChannel ch, ColumnType type, IRowCursor cursor, protected sealed override void ProcessRow(in VBuffer src) { - var srcValues = src.GetValues(); - var srcCount = srcValues.Length; + var srcCount = src.Count; + var srcValues = src.Values; + Ch.Assert(Utils.Size(srcValues) >= srcCount); if (src.IsDense) { // The src vector is dense. @@ -220,7 +222,8 @@ protected sealed override void ProcessRow(in VBuffer src) else { // The src vector is sparse. - var srcIndices = src.GetIndices(); + var srcIndices = src.Indices; + Ch.Assert(Utils.Size(srcIndices) >= srcCount); for (int islot = 0; islot < srcCount; islot++) ProcessValue(in srcValues[islot], srcIndices[islot]); } diff --git a/src/Microsoft.ML.Transforms/OptionalColumnTransform.cs b/src/Microsoft.ML.Transforms/OptionalColumnTransform.cs index d3e4cbefc0..8139f3da01 100644 --- a/src/Microsoft.ML.Transforms/OptionalColumnTransform.cs +++ b/src/Microsoft.ML.Transforms/OptionalColumnTransform.cs @@ -235,7 +235,7 @@ private static VersionInfo GetVersionInfo() private const string RegistrationName = "OptionalColumn"; /// - /// Initializes a new instance of . + /// Convenience constructor for public facing API. /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -398,8 +398,7 @@ private Delegate MakeGetterOne() private Delegate MakeGetterVec(int length) { - return (ValueGetter>)((ref VBuffer value) => - VBufferUtils.Resize(ref value, length, 0)); + return (ValueGetter>)((ref VBuffer value) => value = new VBuffer(length, 0, value.Values, value.Indices)); } private sealed class RowCursor : SynchronizedCursorBase, IRowCursor @@ -468,8 +467,7 @@ private Delegate MakeGetterOne() private Delegate MakeGetterVec(int length) { - return (ValueGetter>)((ref VBuffer value) => - VBufferUtils.Resize(ref value, length, 0)); + return (ValueGetter>)((ref VBuffer value) => value = new VBuffer(length, 0, value.Values, value.Indices)); } } diff --git a/src/Microsoft.ML.Transforms/ProjectionCatalog.cs b/src/Microsoft.ML.Transforms/ProjectionCatalog.cs index 1460613981..ff182e46d6 100644 --- a/src/Microsoft.ML.Transforms/ProjectionCatalog.cs +++ b/src/Microsoft.ML.Transforms/ProjectionCatalog.cs @@ -11,20 +11,13 @@ namespace Microsoft.ML public static class ProjectionCatalog { /// - /// Takes column filled with a vector of floats and maps its to a random low-dimensional feature space. + /// Initializes a new instance of . /// /// The transform's catalog. /// Name of the column to be transformed. /// Name of the output column. If this is null '' will be used. /// The number of random Fourier features to create. /// Create two features for every random Fourier frequency? (one for cos and one for sin). - /// - /// - /// - /// - /// public static RandomFourierFeaturizingEstimator CreateRandomFourierFeatures(this TransformsCatalog.ProjectionTransforms catalog, string inputColumn, string outputColumn = null, @@ -33,68 +26,11 @@ public static RandomFourierFeaturizingEstimator CreateRandomFourierFeatures(this => new RandomFourierFeaturizingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, newDim, useSin); /// - /// Takes columns filled with a vector of floats and maps its to a random low-dimensional feature space. + /// Initializes a new instance of . /// /// The transform's catalog. /// The input columns to use for the transformation. - public static RandomFourierFeaturizingEstimator CreateRandomFourierFeatures(this TransformsCatalog.ProjectionTransforms catalog, params RandomFourierFeaturizingTransformer.ColumnInfo[] columns) + public static RandomFourierFeaturizingEstimator CreateRandomFourierFeatures(this TransformsCatalog.ProjectionTransforms catalog, params RffTransform.ColumnInfo[] columns) => new RandomFourierFeaturizingEstimator(CatalogUtils.GetEnvironment(catalog), columns); - - /// - /// Takes column filled with a vector of floats and computes L-p norm of it. - /// - /// The transform's catalog. - /// Name of the input column. - /// Name of the column resulting from the transformation of . Null means is replaced. - /// Type of norm to use to normalize each sample. - /// Subtract mean from each value before normalizing. - /// - /// - /// - /// - /// - public static LpNormalizingEstimator LpNormalize(this TransformsCatalog.ProjectionTransforms catalog, string inputColumn, string outputColumn =null, - LpNormalizingEstimatorBase.NormalizerKind normKind = LpNormalizingEstimatorBase.Defaults.NormKind, bool subMean = LpNormalizingEstimatorBase.Defaults.LpSubstractMean) - => new LpNormalizingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, normKind, subMean); - - /// - /// Takes columns filled with a vector of floats and computes L-p norm of it. - /// - /// The transform's catalog. - /// Describes the parameters of the lp-normalization process for each column pair. - public static LpNormalizingEstimator LpNormalize(this TransformsCatalog.ProjectionTransforms catalog, params LpNormalizingTransformer.LpNormColumnInfo[] columns) - => new LpNormalizingEstimator(CatalogUtils.GetEnvironment(catalog), columns); - - /// - /// Takes column filled with a vector of floats and computes global contrast normalization of it. - /// - /// The transform's catalog. - /// Name of the input column. - /// Name of the column resulting from the transformation of . Null means is replaced. - /// Subtract mean from each value before normalizing. - /// Normalize by standard deviation rather than L2 norm. - /// Scale features by this value. - /// - /// - /// - /// - /// - public static GlobalContrastNormalizingEstimator GlobalContrastNormalize(this TransformsCatalog.ProjectionTransforms catalog, string inputColumn, string outputColumn = null, - bool substractMean = LpNormalizingEstimatorBase.Defaults.GcnSubstractMean, - bool useStdDev = LpNormalizingEstimatorBase.Defaults.UseStdDev, - float scale = LpNormalizingEstimatorBase.Defaults.Scale) - => new GlobalContrastNormalizingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, substractMean, useStdDev, scale); - - /// - /// Takes columns filled with a vector of floats and computes global contrast normalization of it. - /// - /// The transform's catalog. - /// Describes the parameters of the gcn-normaliztion process for each column pair. - public static GlobalContrastNormalizingEstimator GlobalContrastNormalize(this TransformsCatalog.ProjectionTransforms catalog, params LpNormalizingTransformer.GcnColumnInfo[] columns) - => new GlobalContrastNormalizingEstimator(CatalogUtils.GetEnvironment(catalog), columns); } } diff --git a/src/Microsoft.ML.Transforms/RandomFourierFeaturizing.cs b/src/Microsoft.ML.Transforms/RffTransform.cs similarity index 89% rename from src/Microsoft.ML.Transforms/RandomFourierFeaturizing.cs rename to src/Microsoft.ML.Transforms/RffTransform.cs index 020d96883f..cd2623e05f 100644 --- a/src/Microsoft.ML.Transforms/RandomFourierFeaturizing.cs +++ b/src/Microsoft.ML.Transforms/RffTransform.cs @@ -18,21 +18,21 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(RandomFourierFeaturizingTransformer.Summary, typeof(IDataTransform), typeof(RandomFourierFeaturizingTransformer), typeof(RandomFourierFeaturizingTransformer.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(RffTransform.Summary, typeof(IDataTransform), typeof(RffTransform), typeof(RffTransform.Arguments), typeof(SignatureDataTransform), "Random Fourier Features Transform", "RffTransform", "Rff")] -[assembly: LoadableClass(RandomFourierFeaturizingTransformer.Summary, typeof(IDataTransform), typeof(RandomFourierFeaturizingTransformer), null, typeof(SignatureLoadDataTransform), - "Random Fourier Features Transform", RandomFourierFeaturizingTransformer.LoaderSignature)] +[assembly: LoadableClass(RffTransform.Summary, typeof(IDataTransform), typeof(RffTransform), null, typeof(SignatureLoadDataTransform), + "Random Fourier Features Transform", RffTransform.LoaderSignature)] -[assembly: LoadableClass(RandomFourierFeaturizingTransformer.Summary, typeof(RandomFourierFeaturizingTransformer), null, typeof(SignatureLoadModel), - "Random Fourier Features Transform", RandomFourierFeaturizingTransformer.LoaderSignature)] +[assembly: LoadableClass(RffTransform.Summary, typeof(RffTransform), null, typeof(SignatureLoadModel), + "Random Fourier Features Transform", RffTransform.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(RandomFourierFeaturizingTransformer), null, typeof(SignatureLoadRowMapper), - "Random Fourier Features Transform", RandomFourierFeaturizingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(RffTransform), null, typeof(SignatureLoadRowMapper), + "Random Fourier Features Transform", RffTransform.LoaderSignature)] namespace Microsoft.ML.Transforms.Projections { - public sealed class RandomFourierFeaturizingTransformer : OneToOneTransformerBase + public sealed class RffTransform : OneToOneTransformerBase { public sealed class Arguments { @@ -219,7 +219,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(RandomFourierFeaturizingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(RffTransform).Assembly.FullName); } private readonly TransformInfo[] _transformInfos; @@ -280,8 +280,8 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo new VectorType(NumberType.Float, _transformInfos[col].SrcDim).ToString(), type.ToString()); } - public RandomFourierFeaturizingTransformer(IHostEnvironment env, IDataView input, ColumnInfo[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(RandomFourierFeaturizingTransformer)), GetColumnPairs(columns)) + public RffTransform(IHostEnvironment env, IDataView input, ColumnInfo[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(RffTransform)), GetColumnPairs(columns)) { var avgDistances = GetAvgDistances(columns, input); _transformInfos = new TransformInfo[columns.Length]; @@ -432,7 +432,7 @@ private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); - private RandomFourierFeaturizingTransformer(IHost host, ModelLoadContext ctx) + private RffTransform(IHost host, ModelLoadContext ctx) : base(host, ctx) { // *** Binary format *** @@ -463,7 +463,7 @@ private static IDataTransform Create(IHostEnvironment env, Arguments args, IData for (int i = 0; i < cols.Length; i++) { var item = args.Column[i]; - cols[i] = new ColumnInfo(item.Source ?? item.Name, + cols[i] = new ColumnInfo(item.Source, item.Name, item.NewDim ?? args.NewDim, item.UseSin ?? args.UseSin, @@ -471,14 +471,14 @@ private static IDataTransform Create(IHostEnvironment env, Arguments args, IData item.Seed ?? args.Seed); }; } - return new RandomFourierFeaturizingTransformer(env, input, cols).MakeDataTransform(input); + return new RffTransform(env, input, cols).MakeDataTransform(input); } // Factory method for SignatureLoadModel. - private static RandomFourierFeaturizingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + private static RffTransform Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); - var host = env.Register(nameof(RandomFourierFeaturizingTransformer)); + var host = env.Register(nameof(RffTransform)); host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); @@ -487,7 +487,7 @@ private static RandomFourierFeaturizingTransformer Create(IHostEnvironment env, int cbFloat = ctx.Reader.ReadInt32(); env.CheckDecode(cbFloat == sizeof(float)); } - return new RandomFourierFeaturizingTransformer(host, ctx); + return new RffTransform(host, ctx); } public override void Save(ModelSaveContext ctx) @@ -506,14 +506,14 @@ public override void Save(ModelSaveContext ctx) protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : OneToOneMapperBase + private sealed class Mapper : MapperBase { private readonly ColumnType[] _srcTypes; private readonly int[] _srcCols; private readonly ColumnType[] _types; - private readonly RandomFourierFeaturizingTransformer _parent; + private readonly RffTransform _parent; - public Mapper(RandomFourierFeaturizingTransformer parent, Schema inputSchema) + public Mapper(RffTransform parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -531,7 +531,7 @@ public Mapper(RandomFourierFeaturizingTransformer parent, Schema inputSchema) } } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -539,7 +539,7 @@ protected override Schema.Column[] GetOutputColumnsCore() return result; } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Contracts.AssertValue(input); Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); @@ -580,7 +580,7 @@ private ValueGetter> GetterFromFloatType(IRow input, int iinfo) (ref VBuffer dst) => { getSrc(ref src); - VBufferEditor.CreateFromBuffer(ref oneDimensionalVector).Values[0] = src; + oneDimensionalVector.Values[0] = src; TransformFeatures(in oneDimensionalVector, ref dst, _parent._transformInfos[iinfo], featuresAligned, productAligned); }; } @@ -590,22 +590,24 @@ private void TransformFeatures(in VBuffer src, ref VBuffer dst, Tr { Host.Check(src.Length == transformInfo.SrcDim, "column does not have the expected dimensionality."); + var values = dst.Values; float scale; - int newDstLength; if (transformInfo.RotationTerms != null) { - newDstLength = transformInfo.NewDim; + if (Utils.Size(values) < transformInfo.NewDim) + values = new float[transformInfo.NewDim]; scale = MathUtils.Sqrt(2.0f / transformInfo.NewDim); } else { - newDstLength = 2 * transformInfo.NewDim; + if (Utils.Size(values) < 2 * transformInfo.NewDim) + values = new float[2 * transformInfo.NewDim]; scale = MathUtils.Sqrt(1.0f / transformInfo.NewDim); } if (src.IsDense) { - featuresAligned.CopyFrom(src.GetValues()); + featuresAligned.CopyFrom(src.Values, 0, src.Length); CpuMathUtils.MatrixTimesSource(false, transformInfo.RndFourierVectors, featuresAligned, productAligned, transformInfo.NewDim); } @@ -613,27 +615,25 @@ private void TransformFeatures(in VBuffer src, ref VBuffer dst, Tr { // This overload of MatTimesSrc ignores the values in slots that are not in src.Indices, so there is // no need to zero them out. - var srcValues = src.GetValues(); - var srcIndices = src.GetIndices(); - featuresAligned.CopyFrom(srcIndices, srcValues, 0, 0, srcValues.Length, zeroItems: false); - CpuMathUtils.MatrixTimesSource(transformInfo.RndFourierVectors, srcIndices, featuresAligned, 0, 0, - srcValues.Length, productAligned, transformInfo.NewDim); + featuresAligned.CopyFrom(src.Indices, src.Values, 0, 0, src.Count, zeroItems: false); + CpuMathUtils.MatrixTimesSource(transformInfo.RndFourierVectors, src.Indices, featuresAligned, 0, 0, + src.Count, productAligned, transformInfo.NewDim); } - var dstEditor = VBufferEditor.Create(ref dst, newDstLength); for (int i = 0; i < transformInfo.NewDim; i++) { var dotProduct = productAligned[i]; if (transformInfo.RotationTerms != null) - dstEditor.Values[i] = (float)MathUtils.Cos(dotProduct + transformInfo.RotationTerms[i]) * scale; + values[i] = (float)MathUtils.Cos(dotProduct + transformInfo.RotationTerms[i]) * scale; else { - dstEditor.Values[2 * i] = (float)MathUtils.Cos(dotProduct) * scale; - dstEditor.Values[2 * i + 1] = (float)MathUtils.Sin(dotProduct) * scale; + values[2 * i] = (float)MathUtils.Cos(dotProduct) * scale; + values[2 * i + 1] = (float)MathUtils.Sin(dotProduct) * scale; } } - dst = dstEditor.Commit(); + dst = new VBuffer(transformInfo.RotationTerms == null ? 2 * transformInfo.NewDim : transformInfo.NewDim, + values, dst.Indices); } } } @@ -641,7 +641,7 @@ private void TransformFeatures(in VBuffer src, ref VBuffer dst, Tr /// /// Estimator which takes set of vector columns and maps its input to a random low-dimensional feature space. /// - public sealed class RandomFourierFeaturizingEstimator : IEstimator + public sealed class RandomFourierFeaturizingEstimator : IEstimator { internal static class Defaults { @@ -650,7 +650,7 @@ internal static class Defaults } private readonly IHost _host; - private readonly RandomFourierFeaturizingTransformer.ColumnInfo[] _columns; + private readonly RffTransform.ColumnInfo[] _columns; /// /// Convinence constructor for simple one column case @@ -661,18 +661,18 @@ internal static class Defaults /// The number of random Fourier features to create. /// Create two features for every random Fourier frequency? (one for cos and one for sin). public RandomFourierFeaturizingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, int newDim = Defaults.NewDim, bool useSin = Defaults.UseSin) - : this(env, new RandomFourierFeaturizingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn, newDim, useSin)) + : this(env, new RffTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn, newDim, useSin)) { } - public RandomFourierFeaturizingEstimator(IHostEnvironment env, params RandomFourierFeaturizingTransformer.ColumnInfo[] columns) + public RandomFourierFeaturizingEstimator(IHostEnvironment env, params RffTransform.ColumnInfo[] columns) { Contracts.CheckValue(env, nameof(env)); _host = env.Register(nameof(RandomFourierFeaturizingEstimator)); _columns = columns; } - public RandomFourierFeaturizingTransformer Fit(IDataView input) => new RandomFourierFeaturizingTransformer(_host, input, _columns); + public RffTransform Fit(IDataView input) => new RffTransform(_host, input, _columns); public SchemaShape GetOutputSchema(SchemaShape inputSchema) { @@ -733,11 +733,11 @@ private sealed class Reconciler : EstimatorReconciler public override IEstimator Reconcile(IHostEnvironment env, PipelineColumn[] toOutput, IReadOnlyDictionary inputNames, IReadOnlyDictionary outputNames, IReadOnlyCollection usedNames) { - var infos = new RandomFourierFeaturizingTransformer.ColumnInfo[toOutput.Length]; + var infos = new RffTransform.ColumnInfo[toOutput.Length]; for (int i = 0; i < toOutput.Length; ++i) { var tcol = (IColInput)toOutput[i]; - infos[i] = new RandomFourierFeaturizingTransformer.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], tcol.Config.NewDim, tcol.Config.UseSin, tcol.Config.Generator, tcol.Config.Seed); + infos[i] = new RffTransform.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], tcol.Config.NewDim, tcol.Config.UseSin, tcol.Config.Generator, tcol.Config.Seed); } return new RandomFourierFeaturizingEstimator(env, infos); } diff --git a/src/Microsoft.ML.Transforms/TermLookupTransformer.cs b/src/Microsoft.ML.Transforms/TermLookupTransform.cs similarity index 95% rename from src/Microsoft.ML.Transforms/TermLookupTransformer.cs rename to src/Microsoft.ML.Transforms/TermLookupTransform.cs index bc46943263..14fc80322a 100644 --- a/src/Microsoft.ML.Transforms/TermLookupTransformer.cs +++ b/src/Microsoft.ML.Transforms/TermLookupTransform.cs @@ -16,11 +16,11 @@ using System.Reflection; using System.Text; -[assembly: LoadableClass(TermLookupTransformer.Summary, typeof(TermLookupTransformer), typeof(TermLookupTransformer.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(TermLookupTransform.Summary, typeof(TermLookupTransform), typeof(TermLookupTransform.Arguments), typeof(SignatureDataTransform), "Term Lookup Transform", "TermLookup", "Lookup", "LookupTransform", "TermLookupTransform")] -[assembly: LoadableClass(TermLookupTransformer.Summary, typeof(TermLookupTransformer), null, typeof(SignatureLoadDataTransform), - "Term Lookup Transform", TermLookupTransformer.LoaderSignature)] +[assembly: LoadableClass(TermLookupTransform.Summary, typeof(TermLookupTransform), null, typeof(SignatureLoadDataTransform), + "Term Lookup Transform", TermLookupTransform.LoaderSignature)] namespace Microsoft.ML.Transforms.Categorical { @@ -29,7 +29,7 @@ namespace Microsoft.ML.Transforms.Categorical /// /// This transform maps text values columns to new columns using a map dataset provided through its arguments. /// - public sealed class TermLookupTransformer : OneToOneTransformBase + public sealed class TermLookupTransform : OneToOneTransformBase { public sealed class Column : OneToOneColumn { @@ -158,7 +158,7 @@ public override void Train(IExceptionContext ectx, IRowCursor cursor, int colTer getTerm(ref term); // REVIEW: Should we trim? term = ReadOnlyMemoryUtils.TrimSpaces(term); - var nstr = terms.Add(term); + var nstr = ReadOnlyMemoryUtils.AddToPool(term, terms); if (nstr.Id != values.Count) throw ectx.Except("Duplicate term in lookup data: '{0}'", nstr); @@ -193,7 +193,7 @@ private ValueGetter GetGetterCore(ValueGetter> getTer { getTerm(ref src); src = ReadOnlyMemoryUtils.TrimSpaces(src); - var nstr = _terms.Get(src); + var nstr = ReadOnlyMemoryUtils.FindInPool(src, _terms); if (nstr == null) GetMissing(ref dst); else @@ -257,7 +257,7 @@ public VecValueMap(VectorType type) protected override void GetMissing(ref VBuffer dst) { - VBufferUtils.Resize(ref dst, Type.VectorSize, 0); + dst = new VBuffer(Type.VectorSize, 0, dst.Values, dst.Indices); } protected override void CopyValue(in VBuffer src, ref VBuffer dst) @@ -279,7 +279,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010002, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(TermLookupTransformer).Assembly.FullName); + loaderAssemblyName: typeof(TermLookupTransform).Assembly.FullName); } // This is the byte array containing the binary .idv file contents for the lookup data. @@ -301,7 +301,7 @@ private static VersionInfo GetVersionInfo() /// /// Public constructor corresponding to SignatureDataTransform. /// - public TermLookupTransformer(IHostEnvironment env, Arguments args, IDataView input) + public TermLookupTransform(IHostEnvironment env, Arguments args, IDataView input) : base(env, RegistrationName, env.CheckRef(args, nameof(args)).Column, input, TestIsText) { @@ -321,7 +321,7 @@ public TermLookupTransformer(IHostEnvironment env, Arguments args, IDataView inp } } - public TermLookupTransformer(IHostEnvironment env, IDataView input, IDataView lookup, string sourceTerm, string sourceValue, string targetTerm, string targetValue) + public TermLookupTransform(IHostEnvironment env, IDataView input, IDataView lookup, string sourceTerm, string sourceValue, string targetTerm, string targetValue) : base(env, RegistrationName, new[] { new Column { Name = sourceValue, Source = sourceTerm } }, input, TestIsText) { Host.AssertNonEmpty(Infos); @@ -513,8 +513,8 @@ private static byte[] GetBytesFromDataView(IHost host, IDataView lookup, string (valueColumn, "Value") }; - var view = new ColumnsCopyingTransformer(host, cols.ToArray()).Transform(lookup); - view = ColumnSelectingTransformer.CreateKeep(host, view, cols.Select(x=>x.Name).ToArray()); + var view = new CopyColumnsTransform(host, cols.ToArray()).Transform(lookup); + view = SelectColumnsTransform.CreateKeep(host, view, cols.Select(x=>x.Name).ToArray()); var saver = new BinarySaver(host, new BinarySaver.Arguments()); using (var strm = new MemoryStream()) @@ -589,7 +589,7 @@ private static ValueMap Train(IExceptionContext ectx, BinaryLoader ldr) return values; } - private TermLookupTransformer(IChannel ch, ModelLoadContext ctx, IHost host, IDataView input) + private TermLookupTransform(IChannel ch, ModelLoadContext ctx, IHost host, IDataView input) : base(host, ctx, input, TestIsText) { Host.AssertValue(ch); @@ -630,14 +630,14 @@ private static byte[] ReadAllBytes(IExceptionContext ectx, BinaryReader rdr) return rgb; } - public static TermLookupTransformer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + public static TermLookupTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { Contracts.CheckValue(env, nameof(env)); var h = env.Register(RegistrationName); h.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); h.CheckValue(input, nameof(input)); - return h.Apply("Loading Model", ch => new TermLookupTransformer(ch, ctx, h, input)); + return h.Apply("Loading Model", ch => new TermLookupTransform(ch, ctx, h, input)); } public override void Save(ModelSaveContext ctx) diff --git a/src/Microsoft.ML.Transforms/Text/TokenizingByCharacters.cs b/src/Microsoft.ML.Transforms/Text/CharTokenizeTransform.cs similarity index 80% rename from src/Microsoft.ML.Transforms/Text/TokenizingByCharacters.cs rename to src/Microsoft.ML.Transforms/Text/CharTokenizeTransform.cs index 71665b0c57..53f99405d7 100644 --- a/src/Microsoft.ML.Transforms/Text/TokenizingByCharacters.cs +++ b/src/Microsoft.ML.Transforms/Text/CharTokenizeTransform.cs @@ -19,24 +19,24 @@ using System.Text; using System.Threading; -[assembly: LoadableClass(TokenizingByCharactersTransformer.Summary, typeof(IDataTransform), typeof(TokenizingByCharactersTransformer), typeof(TokenizingByCharactersTransformer.Arguments), typeof(SignatureDataTransform), - TokenizingByCharactersTransformer.UserName, "CharTokenize", TokenizingByCharactersTransformer.LoaderSignature)] +[assembly: LoadableClass(CharTokenizeTransform.Summary, typeof(IDataTransform), typeof(CharTokenizeTransform), typeof(CharTokenizeTransform.Arguments), typeof(SignatureDataTransform), + CharTokenizeTransform.UserName, "CharTokenize", CharTokenizeTransform.LoaderSignature)] -[assembly: LoadableClass(typeof(IDataTransform), typeof(TokenizingByCharactersTransformer), null, typeof(SignatureLoadDataTransform), - TokenizingByCharactersTransformer.UserName, TokenizingByCharactersTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IDataTransform), typeof(CharTokenizeTransform), null, typeof(SignatureLoadDataTransform), + CharTokenizeTransform.UserName, CharTokenizeTransform.LoaderSignature)] -[assembly: LoadableClass(TokenizingByCharactersTransformer.Summary, typeof(TokenizingByCharactersTransformer), null, typeof(SignatureLoadModel), - TokenizingByCharactersTransformer.UserName, TokenizingByCharactersTransformer.LoaderSignature)] +[assembly: LoadableClass(CharTokenizeTransform.Summary, typeof(CharTokenizeTransform), null, typeof(SignatureLoadModel), + CharTokenizeTransform.UserName, CharTokenizeTransform.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(TokenizingByCharactersTransformer), null, typeof(SignatureLoadRowMapper), - TokenizingByCharactersTransformer.UserName, TokenizingByCharactersTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(CharTokenizeTransform), null, typeof(SignatureLoadRowMapper), + CharTokenizeTransform.UserName, CharTokenizeTransform.LoaderSignature)] namespace Microsoft.ML.Transforms.Text { /// /// Character-oriented tokenizer where text is considered a sequence of characters. /// - public sealed class TokenizingByCharactersTransformer : OneToOneTransformerBase + public sealed class CharTokenizeTransform : OneToOneTransformerBase { public sealed class Column : OneToOneColumn { @@ -62,7 +62,7 @@ public sealed class Arguments : TransformInputBase [Argument(ArgumentType.Multiple, HelpText = "Whether to mark the beginning/end of each row/slot with start of text character (0x02)/end of text character (0x03)", ShortName = "mark", SortOrder = 2)] - public bool UseMarkerChars = TokenizingByCharactersEstimator.Defaults.UseMarkerCharacters; + public bool UseMarkerChars = CharacterTokenizingEstimator.Defaults.UseMarkerCharacters; // REVIEW: support UTF-32 encoding through an argument option? @@ -86,7 +86,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(TokenizingByCharactersTransformer).Assembly.FullName); + loaderAssemblyName: typeof(CharTokenizeTransform).Assembly.FullName); } // Controls whether to mark the beginning/end of each row/slot with TextStartMarker/TextEndMarker. @@ -108,7 +108,7 @@ private static VersionInfo GetVersionInfo() /// The environment. /// Whether to use marker characters to separate words. /// Pairs of columns to run the tokenization on. - public TokenizingByCharactersTransformer(IHostEnvironment env, bool useMarkerCharacters = TokenizingByCharactersEstimator.Defaults.UseMarkerCharacters, params (string input, string output)[] columns) : + public CharTokenizeTransform(IHostEnvironment env, bool useMarkerCharacters = CharacterTokenizingEstimator.Defaults.UseMarkerCharacters, params (string input, string output)[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), columns) { _useMarkerChars = useMarkerCharacters; @@ -119,11 +119,11 @@ public TokenizingByCharactersTransformer(IHostEnvironment env, bool useMarkerCha protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCol) { var type = inputSchema.GetColumnType(srcCol); - if (!TokenizingByCharactersEstimator.IsColumnTypeValid(type)) - throw Host.ExceptParam(nameof(inputSchema), TokenizingByCharactersEstimator.ExpectedColumnType); + if (!CharacterTokenizingEstimator.IsColumnTypeValid(type)) + throw Host.ExceptParam(nameof(inputSchema), CharacterTokenizingEstimator.ExpectedColumnType); } - private TokenizingByCharactersTransformer(IHost host, ModelLoadContext ctx) : + private CharTokenizeTransform(IHost host, ModelLoadContext ctx) : base(host, ctx) { // *** Binary format *** @@ -152,13 +152,13 @@ public override void Save(ModelSaveContext ctx) } // Factory method for SignatureLoadModel. - private static TokenizingByCharactersTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + private static CharTokenizeTransform Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(RegistrationName); host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new TokenizingByCharactersTransformer(host, ctx); + return new CharTokenizeTransform(host, ctx); } // Factory method for SignatureDataTransform. @@ -175,7 +175,7 @@ internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDat var item = args.Column[i]; cols[i] = (item.Source ?? item.Name, item.Name); } - return new TokenizingByCharactersTransformer(env, args.UseMarkerChars, cols).MakeDataTransform(input); + return new CharTokenizeTransform(env, args.UseMarkerChars, cols).MakeDataTransform(input); } // Factory method for SignatureLoadRowMapper. @@ -184,16 +184,16 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : OneToOneMapperBase + private sealed class Mapper : MapperBase { private readonly ColumnType _type; - private readonly TokenizingByCharactersTransformer _parent; + private readonly CharTokenizeTransform _parent; private readonly bool[] _isSourceVector; // Constructed and cached the first time it is needed. private volatile string _keyValuesStr; private volatile int[] _keyValuesBoundaries; - public Mapper(TokenizingByCharactersTransformer parent, Schema inputSchema) + public Mapper(CharTokenizeTransform parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -204,7 +204,7 @@ public Mapper(TokenizingByCharactersTransformer parent, Schema inputSchema) _isSourceVector[i] = inputSchema[_parent.ColumnPairs[i].input].Type.IsVector; } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -258,10 +258,12 @@ private void GetKeyValues(int iinfo, ref VBuffer> dst) var keyValuesBoundaries = _keyValuesBoundaries; Host.AssertValue(keyValuesBoundaries); - var editor = VBufferEditor.Create(ref dst, CharsCount); + var values = dst.Values; + if (Utils.Size(values) < CharsCount) + values = new ReadOnlyMemory[CharsCount]; for (int i = 0; i < CharsCount; i++) - editor.Values[i] = keyValuesStr.AsMemory().Slice(keyValuesBoundaries[i], keyValuesBoundaries[i + 1] - keyValuesBoundaries[i]); - dst = editor.Commit(); + values[i] = keyValuesStr.AsMemory().Slice(keyValuesBoundaries[i], keyValuesBoundaries[i + 1] - keyValuesBoundaries[i]); + dst = new VBuffer>(CharsCount, values, dst.Indices); } private void AppendCharRepr(char c, StringBuilder bldr) @@ -397,7 +399,7 @@ private void AppendCharRepr(char c, StringBuilder bldr) } } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); @@ -419,21 +421,24 @@ private ValueGetter> MakeGetterOne(IRow input, int iinfo) getSrc(ref src); var len = !src.IsEmpty ? (_parent._useMarkerChars ? src.Length + TextMarkersCount : src.Length) : 0; - var editor = VBufferEditor.Create(ref dst, len); + var values = dst.Values; if (len > 0) { + if (Utils.Size(values) < len) + values = new ushort[len]; + int index = 0; if (_parent._useMarkerChars) - editor.Values[index++] = TextStartMarker; + values[index++] = TextStartMarker; var span = src.Span; for (int ich = 0; ich < src.Length; ich++) - editor.Values[index++] = span[ich]; + values[index++] = span[ich]; if (_parent._useMarkerChars) - editor.Values[index++] = TextEndMarker; + values[index++] = TextEndMarker; Contracts.Assert(index == len); } - dst = editor.Commit(); + dst = new VBuffer(len, values, dst.Indices); }; } @@ -452,37 +457,39 @@ private ValueGetter> MakeGetterVec(IRow input, int iinfo) getSrc(ref src); int len = 0; - var srcValues = src.GetValues(); - for (int i = 0; i < srcValues.Length; i++) + for (int i = 0; i < src.Count; i++) { - if (!srcValues[i].IsEmpty) + if (!src.Values[i].IsEmpty) { - len += srcValues[i].Length; + len += src.Values[i].Length; if (_parent._useMarkerChars) len += TextMarkersCount; } } - var editor = VBufferEditor.Create(ref dst, len); + var values = dst.Values; if (len > 0) { + if (Utils.Size(values) < len) + values = new ushort[len]; + int index = 0; - for (int i = 0; i < srcValues.Length; i++) + for (int i = 0; i < src.Count; i++) { - if (srcValues[i].IsEmpty) + if (src.Values[i].IsEmpty) continue; if (_parent._useMarkerChars) - editor.Values[index++] = TextStartMarker; - var span = srcValues[i].Span; - for (int ich = 0; ich < srcValues[i].Length; ich++) - editor.Values[index++] = span[ich]; + values[index++] = TextStartMarker; + var span = src.Values[i].Span; + for (int ich = 0; ich < src.Values[i].Length; ich++) + values[index++] = span[ich]; if (_parent._useMarkerChars) - editor.Values[index++] = TextEndMarker; + values[index++] = TextEndMarker; } Contracts.Assert(index == len); } - dst = editor.Commit(); + dst = new VBuffer(len, values, dst.Indices); }; ValueGetter> getterWithUnitSep = (ref VBuffer dst) => @@ -491,12 +498,11 @@ private ValueGetter> MakeGetterVec(IRow input, int iinfo) int len = 0; - var srcValues = src.GetValues(); - for (int i = 0; i < srcValues.Length; i++) + for (int i = 0; i < src.Count; i++) { - if (!srcValues[i].IsEmpty) + if (!src.Values[i].IsEmpty) { - len += srcValues[i].Length; + len += src.Values[i].Length; if (i > 0) len += 1; // add UnitSeparator character to len that will be added @@ -506,9 +512,12 @@ private ValueGetter> MakeGetterVec(IRow input, int iinfo) if (_parent._useMarkerChars) len += TextMarkersCount; - var editor = VBufferEditor.Create(ref dst, len); + var values = dst.Values; if (len > 0) { + if (Utils.Size(values) < len) + values = new ushort[len]; + int index = 0; // ReadOnlyMemory can be a result of either concatenating text columns together @@ -518,38 +527,39 @@ private ValueGetter> MakeGetterVec(IRow input, int iinfo) // Therefore, prepend and append start and end markers only once i.e. at the start and at end of vector. // Insert UnitSeparator after every piece of text in the vector. if (_parent._useMarkerChars) - editor.Values[index++] = TextStartMarker; + values[index++] = TextStartMarker; - for (int i = 0; i < srcValues.Length; i++) + for (int i = 0; i < src.Count; i++) { - if (srcValues[i].IsEmpty) + if (src.Values[i].IsEmpty) continue; if (i > 0) - editor.Values[index++] = UnitSeparator; + values[index++] = UnitSeparator; - var span = srcValues[i].Span; - for (int ich = 0; ich < srcValues[i].Length; ich++) - editor.Values[index++] = span[ich]; + var span = src.Values[i].Span; + for (int ich = 0; ich < src.Values[i].Length; ich++) + values[index++] = span[ich]; } if (_parent._useMarkerChars) - editor.Values[index++] = TextEndMarker; + values[index++] = TextEndMarker; Contracts.Assert(index == len); } - dst = editor.Commit(); + dst = new VBuffer(len, values, dst.Indices); }; return _parent._isSeparatorStartEnd ? getterWithStartEndSep : getterWithUnitSep; } } + } /// /// Character tokenizer splits text into sequences of characters using a sliding window. /// - public sealed class TokenizingByCharactersEstimator : TrivialEstimator + public sealed class CharacterTokenizingEstimator : TrivialEstimator { internal static class Defaults { @@ -566,7 +576,7 @@ internal static class Defaults /// The column containing text to tokenize. /// The column containing output tokens. Null means is replaced. /// Whether to use marker characters to separate words. - public TokenizingByCharactersEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, bool useMarkerCharacters = Defaults.UseMarkerCharacters) + public CharacterTokenizingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, bool useMarkerCharacters = Defaults.UseMarkerCharacters) : this(env, useMarkerCharacters, new[] { (inputColumn, outputColumn ?? inputColumn) }) { } @@ -578,8 +588,8 @@ public TokenizingByCharactersEstimator(IHostEnvironment env, string inputColumn, /// Whether to use marker characters to separate words. /// Pairs of columns to run the tokenization on. - public TokenizingByCharactersEstimator(IHostEnvironment env, bool useMarkerCharacters = Defaults.UseMarkerCharacters, params (string input, string output)[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(TokenizingByCharactersEstimator)), new TokenizingByCharactersTransformer(env, useMarkerCharacters, columns)) + public CharacterTokenizingEstimator(IHostEnvironment env, bool useMarkerCharacters = Defaults.UseMarkerCharacters, params (string input, string output)[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(CharacterTokenizingEstimator)), new CharTokenizeTransform(env, useMarkerCharacters, columns)) { } diff --git a/src/Microsoft.ML.Transforms/Text/LdaSingleBox.cs b/src/Microsoft.ML.Transforms/Text/LdaSingleBox.cs index af643a2907..4a9ef780ca 100644 --- a/src/Microsoft.ML.Transforms/Text/LdaSingleBox.cs +++ b/src/Microsoft.ML.Transforms/Text/LdaSingleBox.cs @@ -181,7 +181,7 @@ public void SetAlphaSum(float averageDocLength) LdaInterface.SetAlphaSum(_engine, averageDocLength); } - public int LoadDoc(ReadOnlySpan termID, ReadOnlySpan termVal, int termNum, int numVocab) + public int LoadDoc(int[] termID, double[] termVal, int termNum, int numVocab) { Contracts.Check(numVocab == NumVocab); Contracts.Check(termNum > 0); @@ -189,14 +189,12 @@ public int LoadDoc(ReadOnlySpan termID, ReadOnlySpan termVal, int t Contracts.Check(termVal.Length >= termNum); int[] pID = new int[termNum]; - int[] pVal = new int[termVal.Length]; - for (int i = 0; i < termVal.Length; i++) - pVal[i] = (int)termVal[i]; - termID.Slice(0, termNum).CopyTo(pID); + int[] pVal = termVal.Select(item => (int)item).ToArray(); + Array.Copy(termID, pID, termNum); return LdaInterface.FeedInData(_engine, pID, pVal, termNum, NumVocab); } - public int LoadDocDense(ReadOnlySpan termVal, int termNum, int numVocab) + public int LoadDocDense(double[] termVal, int termNum, int numVocab) { Contracts.Check(numVocab == NumVocab); Contracts.Check(termNum > 0); @@ -204,10 +202,9 @@ public int LoadDocDense(ReadOnlySpan termVal, int termNum, int numVocab) Contracts.Check(termVal.Length >= termNum); int[] pID = new int[termNum]; - int[] pVal = new int[termVal.Length]; - for (int i = 0; i < termVal.Length; i++) - pVal[i] = (int)termVal[i]; + int[] pVal = termVal.Select(item => (int)item).ToArray(); return LdaInterface.FeedInDataDense(_engine, pVal, termNum, NumVocab); + } public List> GetDocTopicVector(int docID) @@ -247,19 +244,17 @@ public List> GetDocTopicVector(int docID) return topicRet; } - public List> TestDoc(ReadOnlySpan termID, ReadOnlySpan termVal, int termNum, int numBurninIter, bool reset) + public List> TestDoc(int[] termID, double[] termVal, int termNum, int numBurninIter, bool reset) { Contracts.Check(termNum > 0); Contracts.Check(termVal.Length >= termNum); Contracts.Check(termID.Length >= termNum); int[] pID = new int[termNum]; - int[] pVal = new int[termVal.Length]; - for (int i = 0; i < termVal.Length; i++) - pVal[i] = (int)termVal[i]; + int[] pVal = termVal.Select(item => (int)item).ToArray(); int[] pTopic = new int[NumTopic]; int[] pProb = new int[NumTopic]; - termID.Slice(0, termNum).CopyTo(pID); + Array.Copy(termID, pID, termNum); int numTopicReturn = NumTopic; @@ -278,14 +273,12 @@ public List> TestDoc(ReadOnlySpan termID, ReadOnly return topicRet; } - public List> TestDocDense(ReadOnlySpan termVal, int termNum, int numBurninIter, bool reset) + public List> TestDocDense(double[] termVal, int termNum, int numBurninIter, bool reset) { Contracts.Check(termNum > 0); Contracts.Check(numBurninIter > 0); Contracts.Check(termVal.Length >= termNum); - int[] pVal = new int[termVal.Length]; - for (int i = 0; i < termVal.Length; i++) - pVal[i] = (int)termVal[i]; + int[] pVal = termVal.Select(item => (int)item).ToArray(); int[] pTopic = new int[NumTopic]; int[] pProb = new int[NumTopic]; diff --git a/src/Microsoft.ML.Transforms/Text/LdaStaticExtensions.cs b/src/Microsoft.ML.Transforms/Text/LdaStaticExtensions.cs deleted file mode 100644 index 05acdca178..0000000000 --- a/src/Microsoft.ML.Transforms/Text/LdaStaticExtensions.cs +++ /dev/null @@ -1,174 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Core.Data; -using Microsoft.ML.Runtime; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.StaticPipe.Runtime; -using Microsoft.ML.Transforms.Text; -using System; -using System.Collections.Generic; - -namespace Microsoft.ML.StaticPipe -{ - /// - /// Information on the result of fitting a LDA transform. - /// - public sealed class LdaFitResult - { - /// - /// For user defined delegates that accept instances of the containing type. - /// - /// - public delegate void OnFit(LdaFitResult result); - - public LatentDirichletAllocationTransformer.LdaSummary LdaTopicSummary; - public LdaFitResult(LatentDirichletAllocationTransformer.LdaSummary ldaTopicSummary) - { - LdaTopicSummary = ldaTopicSummary; - } - } - - public static class LdaStaticExtensions - { - private struct Config - { - public readonly int NumTopic; - public readonly Single AlphaSum; - public readonly Single Beta; - public readonly int MHStep; - public readonly int NumIter; - public readonly int LikelihoodInterval; - public readonly int NumThread; - public readonly int NumMaxDocToken; - public readonly int NumSummaryTermPerTopic; - public readonly int NumBurninIter; - public readonly bool ResetRandomGenerator; - - public readonly Action OnFit; - - public Config(int numTopic, Single alphaSum, Single beta, int mhStep, int numIter, int likelihoodInterval, - int numThread, int numMaxDocToken, int numSummaryTermPerTopic, int numBurninIter, bool resetRandomGenerator, - Action onFit) - { - NumTopic = numTopic; - AlphaSum = alphaSum; - Beta = beta; - MHStep = mhStep; - NumIter = numIter; - LikelihoodInterval = likelihoodInterval; - NumThread = numThread; - NumMaxDocToken = numMaxDocToken; - NumSummaryTermPerTopic = numSummaryTermPerTopic; - NumBurninIter = numBurninIter; - ResetRandomGenerator = resetRandomGenerator; - - OnFit = onFit; - } - } - - private static Action Wrap(LdaFitResult.OnFit onFit) - { - if (onFit == null) - return null; - - return ldaTopicSummary => onFit(new LdaFitResult(ldaTopicSummary)); - } - - private interface ILdaCol - { - PipelineColumn Input { get; } - Config Config { get; } - } - - private sealed class ImplVector : Vector, ILdaCol - { - public PipelineColumn Input { get; } - public Config Config { get; } - public ImplVector(PipelineColumn input, Config config) : base(Rec.Inst, input) - { - Input = input; - Config = config; - } - } - - private sealed class Rec : EstimatorReconciler - { - public static readonly Rec Inst = new Rec(); - - public override IEstimator Reconcile(IHostEnvironment env, - PipelineColumn[] toOutput, - IReadOnlyDictionary inputNames, - IReadOnlyDictionary outputNames, - IReadOnlyCollection usedNames) - { - var infos = new LatentDirichletAllocationTransformer.ColumnInfo[toOutput.Length]; - Action onFit = null; - for (int i = 0; i < toOutput.Length; ++i) - { - var tcol = (ILdaCol)toOutput[i]; - - infos[i] = new LatentDirichletAllocationTransformer.ColumnInfo(inputNames[tcol.Input], outputNames[toOutput[i]], - tcol.Config.NumTopic, - tcol.Config.AlphaSum, - tcol.Config.Beta, - tcol.Config.MHStep, - tcol.Config.NumIter, - tcol.Config.LikelihoodInterval, - tcol.Config.NumThread, - tcol.Config.NumMaxDocToken, - tcol.Config.NumSummaryTermPerTopic, - tcol.Config.NumBurninIter, - tcol.Config.ResetRandomGenerator); - - if (tcol.Config.OnFit != null) - { - int ii = i; // Necessary because if we capture i that will change to toOutput.Length on call. - onFit += tt => tcol.Config.OnFit(tt.GetLdaDetails(ii)); - } - } - - var est = new LatentDirichletAllocationEstimator(env, infos); - if (onFit == null) - return est; - - return est.WithOnFitDelegate(onFit); - } - } - - /// - /// A vector of floats representing the document. - /// The number of topics. - /// Dirichlet prior on document-topic vectors. - /// Dirichlet prior on vocab-topic vectors. - /// Number of Metropolis Hasting step. - /// Number of iterations. - /// Compute log likelihood over local dataset on this iteration interval. - /// The number of training threads. Default value depends on number of logical processors. - /// The threshold of maximum count of tokens per doc. - /// The number of words to summarize the topic. - /// The number of burn-in iterations. - /// Reset the random number generator for each document. - /// Called upon fitting with the learnt enumeration on the dataset. - public static Vector ToLdaTopicVector(this Vector input, - int numTopic = LatentDirichletAllocationEstimator.Defaults.NumTopic, - Single alphaSum = LatentDirichletAllocationEstimator.Defaults.AlphaSum, - Single beta = LatentDirichletAllocationEstimator.Defaults.Beta, - int mhstep = LatentDirichletAllocationEstimator.Defaults.Mhstep, - int numIterations = LatentDirichletAllocationEstimator.Defaults.NumIterations, - int likelihoodInterval = LatentDirichletAllocationEstimator.Defaults.LikelihoodInterval, - int numThreads = LatentDirichletAllocationEstimator.Defaults.NumThreads, - int numMaxDocToken = LatentDirichletAllocationEstimator.Defaults.NumMaxDocToken, - int numSummaryTermPerTopic = LatentDirichletAllocationEstimator.Defaults.NumSummaryTermPerTopic, - int numBurninIterations = LatentDirichletAllocationEstimator.Defaults.NumBurninIterations, - bool resetRandomGenerator = LatentDirichletAllocationEstimator.Defaults.ResetRandomGenerator, - LdaFitResult.OnFit onFit = null) - { - Contracts.CheckValue(input, nameof(input)); - return new ImplVector(input, - new Config(numTopic, alphaSum, beta, mhstep, numIterations, likelihoodInterval, numThreads, numMaxDocToken, numSummaryTermPerTopic, - numBurninIterations, resetRandomGenerator, Wrap(onFit))); - } - } -} \ No newline at end of file diff --git a/src/Microsoft.ML.Transforms/Text/LdaTransform.cs b/src/Microsoft.ML.Transforms/Text/LdaTransform.cs index 3466e2219a..3f697a8478 100644 --- a/src/Microsoft.ML.Transforms/Text/LdaTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/LdaTransform.cs @@ -2,7 +2,13 @@ // 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.Core.Data; +using Float = System.Single; + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; @@ -12,23 +18,12 @@ using Microsoft.ML.Runtime.Model; using Microsoft.ML.Runtime.TextAnalytics; using Microsoft.ML.Transforms.Text; -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Linq; -using System.Text; - -[assembly: LoadableClass(LatentDirichletAllocationTransformer.Summary, typeof(IDataTransform), typeof(LatentDirichletAllocationTransformer), typeof(LatentDirichletAllocationTransformer.Arguments), typeof(SignatureDataTransform), - "Latent Dirichlet Allocation Transform", LatentDirichletAllocationTransformer.LoaderSignature, "Lda")] -[assembly: LoadableClass(LatentDirichletAllocationTransformer.Summary, typeof(IDataTransform), typeof(LatentDirichletAllocationTransformer), null, typeof(SignatureLoadDataTransform), - "Latent Dirichlet Allocation Transform", LatentDirichletAllocationTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(LdaTransform), typeof(LdaTransform.Arguments), typeof(SignatureDataTransform), + LdaTransform.UserName, LdaTransform.LoaderSignature, LdaTransform.ShortName, DocName = "transform/LdaTransform.md")] -[assembly: LoadableClass(LatentDirichletAllocationTransformer.Summary, typeof(LatentDirichletAllocationTransformer), null, typeof(SignatureLoadModel), - "Latent Dirichlet Allocation Transform", LatentDirichletAllocationTransformer.LoaderSignature)] - -[assembly: LoadableClass(typeof(IRowMapper), typeof(LatentDirichletAllocationTransformer), null, typeof(SignatureLoadRowMapper), - "Latent Dirichlet Allocation Transform", LatentDirichletAllocationTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(LdaTransform), null, typeof(SignatureLoadDataTransform), + LdaTransform.UserName, LdaTransform.LoaderSignature)] namespace Microsoft.ML.Transforms.Text { @@ -46,60 +41,60 @@ namespace Microsoft.ML.Transforms.Text // https://github.com/Microsoft/LightLDA // // See - // for an example on how to use LatentDirichletAllocationTransformer. + // for an example on how to use LdaTransform. /// - public sealed class LatentDirichletAllocationTransformer : OneToOneTransformerBase + public sealed class LdaTransform : OneToOneTransformBase { public sealed class Arguments : TransformInputBase { [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "New column definition(s) (optional form: name:srcs)", ShortName = "col", SortOrder = 49)] public Column[] Column; - [Argument(ArgumentType.AtMostOnce, HelpText = "The number of topics", SortOrder = 50)] + [Argument(ArgumentType.AtMostOnce, HelpText = "The number of topics in the LDA", SortOrder = 50)] [TGUI(SuggestedSweeps = "20,40,100,200")] [TlcModule.SweepableDiscreteParam("NumTopic", new object[] { 20, 40, 100, 200 })] - public int NumTopic = LatentDirichletAllocationEstimator.Defaults.NumTopic; + public int NumTopic = 100; [Argument(ArgumentType.AtMostOnce, HelpText = "Dirichlet prior on document-topic vectors")] [TGUI(SuggestedSweeps = "1,10,100,200")] [TlcModule.SweepableDiscreteParam("AlphaSum", new object[] { 1, 10, 100, 200 })] - public float AlphaSum = LatentDirichletAllocationEstimator.Defaults.AlphaSum; + public Single AlphaSum = 100; [Argument(ArgumentType.AtMostOnce, HelpText = "Dirichlet prior on vocab-topic vectors")] [TGUI(SuggestedSweeps = "0.01,0.015,0.07,0.02")] [TlcModule.SweepableDiscreteParam("Beta", new object[] { 0.01f, 0.015f, 0.07f, 0.02f })] - public float Beta = LatentDirichletAllocationEstimator.Defaults.Beta; + public Single Beta = 0.01f; [Argument(ArgumentType.Multiple, HelpText = "Number of Metropolis Hasting step")] [TGUI(SuggestedSweeps = "2,4,8,16")] [TlcModule.SweepableDiscreteParam("Mhstep", new object[] { 2, 4, 8, 16 })] - public int Mhstep = LatentDirichletAllocationEstimator.Defaults.Mhstep; + public int Mhstep = 4; [Argument(ArgumentType.AtMostOnce, HelpText = "Number of iterations", ShortName = "iter")] [TGUI(SuggestedSweeps = "100,200,300,400")] [TlcModule.SweepableDiscreteParam("NumIterations", new object[] { 100, 200, 300, 400 })] - public int NumIterations = LatentDirichletAllocationEstimator.Defaults.NumIterations; + public int NumIterations = 200; [Argument(ArgumentType.AtMostOnce, HelpText = "Compute log likelihood over local dataset on this iteration interval", ShortName = "llInterval")] - public int LikelihoodInterval = LatentDirichletAllocationEstimator.Defaults.LikelihoodInterval; + public int LikelihoodInterval = 5; + + [Argument(ArgumentType.AtMostOnce, HelpText = "The threshold of maximum count of tokens per doc", ShortName = "maxNumToken", SortOrder = 50)] + public int NumMaxDocToken = 512; // REVIEW: Should change the default when multi-threading support is optimized. [Argument(ArgumentType.AtMostOnce, HelpText = "The number of training threads. Default value depends on number of logical processors.", ShortName = "t", SortOrder = 50)] - public int NumThreads = LatentDirichletAllocationEstimator.Defaults.NumThreads; - - [Argument(ArgumentType.AtMostOnce, HelpText = "The threshold of maximum count of tokens per doc", ShortName = "maxNumToken", SortOrder = 50)] - public int NumMaxDocToken = LatentDirichletAllocationEstimator.Defaults.NumMaxDocToken; + public int? NumThreads; [Argument(ArgumentType.AtMostOnce, HelpText = "The number of words to summarize the topic", ShortName = "ns")] - public int NumSummaryTermPerTopic = LatentDirichletAllocationEstimator.Defaults.NumSummaryTermPerTopic; + public int NumSummaryTermPerTopic = 10; [Argument(ArgumentType.AtMostOnce, HelpText = "The number of burn-in iterations", ShortName = "burninIter")] [TGUI(SuggestedSweeps = "10,20,30,40")] [TlcModule.SweepableDiscreteParam("NumBurninIterations", new object[] { 10, 20, 30, 40 })] - public int NumBurninIterations = LatentDirichletAllocationEstimator.Defaults.NumBurninIterations; + public int NumBurninIterations = 10; [Argument(ArgumentType.AtMostOnce, HelpText = "Reset the random number generator for each document", ShortName = "reset")] - public bool ResetRandomGenerator = LatentDirichletAllocationEstimator.Defaults.ResetRandomGenerator; + public bool ResetRandomGenerator; [Argument(ArgumentType.AtMostOnce, HelpText = "Whether to output the topic-word summary in text format", ShortName = "summary")] public bool OutputTopicWordSummary; @@ -107,14 +102,14 @@ public sealed class Arguments : TransformInputBase public sealed class Column : OneToOneColumn { - [Argument(ArgumentType.AtMostOnce, HelpText = "The number of topics")] + [Argument(ArgumentType.AtMostOnce, HelpText = "The number of topics in the LDA")] public int? NumTopic; [Argument(ArgumentType.AtMostOnce, HelpText = "Dirichlet prior on document-topic vectors")] - public float? AlphaSum; + public Single? AlphaSum; [Argument(ArgumentType.AtMostOnce, HelpText = "Dirichlet prior on vocab-topic vectors")] - public float? Beta; + public Single? Beta; [Argument(ArgumentType.Multiple, HelpText = "Number of Metropolis Hasting step")] public int? Mhstep; @@ -160,13 +155,11 @@ public bool TryUnparse(StringBuilder sb) } } - public sealed class ColumnInfo + private sealed class ColInfoEx { - public readonly string Input; - public readonly string Output; public readonly int NumTopic; - public readonly float AlphaSum; - public readonly float Beta; + public readonly Single AlphaSum; + public readonly Single Beta; public readonly int MHStep; public readonly int NumIter; public readonly int LikelihoodInterval; @@ -176,78 +169,50 @@ public sealed class ColumnInfo public readonly int NumBurninIter; public readonly bool ResetRandomGenerator; - /// - /// Describes how the transformer handles one column pair. - /// - /// The column representing the document as a vector of floats. - /// The column containing the output scores over a set of topics, represented as a vector of floats. A null value for the column means is replaced. - /// The number of topics. - /// Dirichlet prior on document-topic vectors. - /// Dirichlet prior on vocab-topic vectors. - /// Number of Metropolis Hasting step. - /// Number of iterations. - /// Compute log likelihood over local dataset on this iteration interval. - /// The number of training threads. Default value depends on number of logical processors. - /// The threshold of maximum count of tokens per doc. - /// The number of words to summarize the topic. - /// The number of burn-in iterations. - /// Reset the random number generator for each document. - public ColumnInfo(string input, - string output = null, - int numTopic = LatentDirichletAllocationEstimator.Defaults.NumTopic, - float alphaSum = LatentDirichletAllocationEstimator.Defaults.AlphaSum, - float beta = LatentDirichletAllocationEstimator.Defaults.Beta, - int mhStep = LatentDirichletAllocationEstimator.Defaults.Mhstep, - int numIter = LatentDirichletAllocationEstimator.Defaults.NumIterations, - int likelihoodInterval = LatentDirichletAllocationEstimator.Defaults.LikelihoodInterval, - int numThread = LatentDirichletAllocationEstimator.Defaults.NumThreads, - int numMaxDocToken = LatentDirichletAllocationEstimator.Defaults.NumMaxDocToken, - int numSummaryTermPerTopic = LatentDirichletAllocationEstimator.Defaults.NumSummaryTermPerTopic, - int numBurninIter = LatentDirichletAllocationEstimator.Defaults.NumBurninIterations, - bool resetRandomGenerator = LatentDirichletAllocationEstimator.Defaults.ResetRandomGenerator) + public ColInfoEx(IExceptionContext ectx, Column item, Arguments args) { - Contracts.CheckValue(input, nameof(input)); - Contracts.CheckValueOrNull(output); - Contracts.CheckParam(numTopic > 0, nameof(numTopic), "Must be positive."); - Contracts.CheckParam(mhStep > 0, nameof(mhStep), "Must be positive."); - Contracts.CheckParam(numIter > 0, nameof(numIter), "Must be positive."); - Contracts.CheckParam(likelihoodInterval > 0, nameof(likelihoodInterval), "Must be positive."); - Contracts.CheckParam(numThread >= 0, nameof(numThread), "Must be positive or zero."); - Contracts.CheckParam(numMaxDocToken > 0, nameof(numMaxDocToken), "Must be positive."); - Contracts.CheckParam(numSummaryTermPerTopic > 0, nameof(numSummaryTermPerTopic), "Must be positive"); - Contracts.CheckParam(numBurninIter >= 0, nameof(numBurninIter), "Must be non-negative."); - - Input = input; - Output = output ?? input; - NumTopic = numTopic; - AlphaSum = alphaSum; - Beta = beta; - MHStep = mhStep; - NumIter = numIter; - LikelihoodInterval = likelihoodInterval; - NumThread = numThread; - NumMaxDocToken = numMaxDocToken; - NumSummaryTermPerTopic = numSummaryTermPerTopic; - NumBurninIter = numBurninIter; - ResetRandomGenerator = resetRandomGenerator; - } + Contracts.AssertValue(ectx); - internal ColumnInfo(Column item, Arguments args) : - this(item.Source, item.Name, - args.NumTopic, args.AlphaSum, args.Beta, args.Mhstep, args.NumIterations, - args.LikelihoodInterval, args.NumThreads, args.NumMaxDocToken, args.NumSummaryTermPerTopic, args.NumBurninIterations, args.ResetRandomGenerator) - { + NumTopic = item.NumTopic ?? args.NumTopic; + Contracts.CheckUserArg(NumTopic > 0, nameof(item.NumTopic), "Must be positive."); + + AlphaSum = item.AlphaSum ?? args.AlphaSum; + + Beta = item.Beta ?? args.Beta; + + MHStep = item.Mhstep ?? args.Mhstep; + ectx.CheckUserArg(MHStep > 0, nameof(item.Mhstep), "Must be positive."); + + NumIter = item.NumIterations ?? args.NumIterations; + ectx.CheckUserArg(NumIter > 0, nameof(item.NumIterations), "Must be positive."); + + LikelihoodInterval = item.LikelihoodInterval ?? args.LikelihoodInterval; + ectx.CheckUserArg(LikelihoodInterval > 0, nameof(item.LikelihoodInterval), "Must be positive."); + + NumThread = item.NumThreads ?? args.NumThreads ?? 0; + ectx.CheckUserArg(NumThread >= 0, nameof(item.NumThreads), "Must be positive or zero."); + + NumMaxDocToken = item.NumMaxDocToken ?? args.NumMaxDocToken; + ectx.CheckUserArg(NumMaxDocToken > 0, nameof(item.NumMaxDocToken), "Must be positive."); + + NumSummaryTermPerTopic = item.NumSummaryTermPerTopic ?? args.NumSummaryTermPerTopic; + ectx.CheckUserArg(NumSummaryTermPerTopic > 0, nameof(item.NumSummaryTermPerTopic), "Must be positive"); + + NumBurninIter = item.NumBurninIterations ?? args.NumBurninIterations; + ectx.CheckUserArg(NumBurninIter >= 0, nameof(item.NumBurninIterations), "Must be non-negative."); + + ResetRandomGenerator = item.ResetRandomGenerator ?? args.ResetRandomGenerator; } - internal ColumnInfo(IExceptionContext ectx, ModelLoadContext ctx) + public ColInfoEx(IExceptionContext ectx, ModelLoadContext ctx) { Contracts.AssertValue(ectx); ectx.AssertValue(ctx); // *** Binary format *** // int NumTopic; - // float AlphaSum; - // float Beta; + // Single AlphaSum; + // Single Beta; // int MHStep; // int NumIter; // int LikelihoodInterval; @@ -288,14 +253,14 @@ internal ColumnInfo(IExceptionContext ectx, ModelLoadContext ctx) ResetRandomGenerator = ctx.Reader.ReadBoolByte(); } - internal void Save(ModelSaveContext ctx) + public void Save(ModelSaveContext ctx) { Contracts.AssertValue(ctx); // *** Binary format *** // int NumTopic; - // float AlphaSum; - // float Beta; + // Single AlphaSum; + // Single Beta; // int MHStep; // int NumIter; // int LikelihoodInterval; @@ -319,41 +284,311 @@ internal void Save(ModelSaveContext ctx) } } - /// - /// Provide details about the topics discovered by LightLDA. - /// - public sealed class LdaSummary + public const string LoaderSignature = "LdaTransform"; + private static VersionInfo GetVersionInfo() + { + return new VersionInfo( + modelSignature: "LIGHTLDA", + verWrittenCur: 0x00010001, // Initial + verReadableCur: 0x00010001, + verWeCanReadBack: 0x00010001, + loaderSignature: LoaderSignature, + loaderAssemblyName: typeof(LdaTransform).Assembly.FullName); + } + + private readonly ColInfoEx[] _exes; + private readonly LdaState[] _ldas; + private readonly ColumnType[] _types; + private readonly bool _saveText; + + private const string RegistrationName = "LightLda"; + private const string WordTopicModelFilename = "word_topic_summary.txt"; + internal const string Summary = "The LDA transform implements LightLDA, a state-of-the-art implementation of Latent Dirichlet Allocation."; + internal const string UserName = "Latent Dirichlet Allocation Transform"; + internal const string ShortName = "LightLda"; + + public LdaTransform(IHostEnvironment env, Arguments args, IDataView input) + : base(env, RegistrationName, args.Column, input, TestType) + { + Host.CheckValue(args, nameof(args)); + Host.CheckUserArg(args.NumTopic > 0, nameof(args.NumTopic), "Must be positive."); + Host.CheckValue(input, nameof(input)); + Host.CheckUserArg(Utils.Size(args.Column) > 0, nameof(args.Column)); + _exes = new ColInfoEx[Infos.Length]; + _types = new ColumnType[Infos.Length]; + _ldas = new LdaState[Infos.Length]; + _saveText = args.OutputTopicWordSummary; + for (int i = 0; i < Infos.Length; i++) + { + var ex = new ColInfoEx(Host, args.Column[i], args); + _exes[i] = ex; + _types[i] = new VectorType(NumberType.Float, ex.NumTopic); + } + using (var ch = Host.Start("Train")) + { + Train(ch, input, _ldas); + } + Metadata.Seal(); + } + + private void Dispose(bool disposing) + { + if (_ldas != null) + { + foreach (var state in _ldas) + state?.Dispose(); + } + if (disposing) + GC.SuppressFinalize(this); + } + + public void Dispose() + { + Dispose(true); + } + + ~LdaTransform() { - // For each topic, provide information about the (item, score) pairs. - public readonly ImmutableArray> ItemScoresPerTopic; + Dispose(false); + } - // For each topic, provide information about the (item, word, score) tuple. - public readonly ImmutableArray> WordScoresPerTopic; + private LdaTransform(IHost host, ModelLoadContext ctx, IDataView input) + : base(host, ctx, input, TestType) + { + Host.AssertValue(ctx); - internal LdaSummary(ImmutableArray> itemScoresPerTopic) + // *** Binary format *** + // + // + // ldaState[num infos]: The LDA parameters + + // Note: infos.length would be just one in most cases. + _exes = new ColInfoEx[Infos.Length]; + _ldas = new LdaState[Infos.Length]; + _types = new ColumnType[Infos.Length]; + for (int i = 0; i < _ldas.Length; i++) { - ItemScoresPerTopic = itemScoresPerTopic; + _ldas[i] = new LdaState(Host, ctx); + _exes[i] = _ldas[i].InfoEx; + _types[i] = new VectorType(NumberType.Float, _ldas[i].InfoEx.NumTopic); + } + using (var ent = ctx.Repository.OpenEntryOrNull("model", WordTopicModelFilename)) + { + _saveText = ent != null; } + Metadata.Seal(); + } + + public static LdaTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + { + Contracts.CheckValue(env, nameof(env)); + var h = env.Register(RegistrationName); + + h.CheckValue(ctx, nameof(ctx)); + ctx.CheckAtModel(GetVersionInfo()); + h.CheckValue(input, nameof(input)); - internal LdaSummary(ImmutableArray> wordScoresPerTopic) + return h.Apply( + "Loading Model", + ch => + { + // *** Binary Format *** + // int: sizeof(Float) + // + int cbFloat = ctx.Reader.ReadInt32(); + h.CheckDecode(cbFloat == sizeof(Float)); + return new LdaTransform(h, ctx, input); + }); + } + + public string GetTopicSummary() + { + StringWriter writer = new StringWriter(); + VBuffer> slotNames = default; + for (int i = 0; i < _ldas.Length; i++) { - WordScoresPerTopic = wordScoresPerTopic; + GetSlotNames(i, ref slotNames); + _ldas[i].GetTopicSummaryWriter(slotNames)(writer); + writer.WriteLine(); } + return writer.ToString(); } - internal LdaSummary GetLdaDetails(int iinfo) + public override void Save(ModelSaveContext ctx) { - Contracts.Assert(0 <= iinfo && iinfo < _ldas.Length); + Host.CheckValue(ctx, nameof(ctx)); + ctx.CheckAtModel(); + ctx.SetVersionInfo(GetVersionInfo()); - var ldaState = _ldas[iinfo]; - var mapping = _columnMappings[iinfo]; + // *** Binary format *** + // int: sizeof(Float) + // + // ldaState[num infos]: The LDA parameters - return ldaState.GetLdaSummary(mapping); + ctx.Writer.Write(sizeof(Float)); + SaveBase(ctx); + Host.Assert(_ldas.Length == Infos.Length); + VBuffer> slotNames = default; + for (int i = 0; i < _ldas.Length; i++) + { + GetSlotNames(i, ref slotNames); + _ldas[i].Save(ctx, _saveText, slotNames); + } + } + + private void GetSlotNames(int iinfo, ref VBuffer> dst) + { + Host.Assert(0 <= iinfo && iinfo < Infos.Length); + if (Source.Schema.HasSlotNames(Infos[iinfo].Source, Infos[iinfo].TypeSrc.ValueCount)) + Source.Schema.GetMetadata(MetadataUtils.Kinds.SlotNames, Infos[iinfo].Source, ref dst); + else + dst = default(VBuffer>); + } + + private static string TestType(ColumnType t) + { + // LDA consumes term frequency vectors, so I am assuming VBuffer is an appropriate input type. + // It must also be of known size for the sake of the LDA trainer initialization. + if (t.IsKnownSizeVector && t.ItemType is NumberType) + return null; + return "Expected vector of number type of known size."; + } + + private static int GetFrequency(double value) + { + int result = (int)value; + if (!(result == value && result >= 0)) + return -1; + return result; + } + + private void Train(IChannel ch, IDataView trainingData, LdaState[] states) + { + Host.AssertValue(ch); + ch.AssertValue(trainingData); + ch.AssertValue(states); + ch.Assert(states.Length == Infos.Length); + + bool[] activeColumns = new bool[trainingData.Schema.ColumnCount]; + int[] numVocabs = new int[Infos.Length]; + + for (int i = 0; i < Infos.Length; i++) + { + activeColumns[Infos[i].Source] = true; + numVocabs[i] = 0; + } + + //the current lda needs the memory allocation before feedin data, so needs two sweeping of the data, + //one for the pre-calc memory, one for feedin data really + //another solution can be prepare these two value externally and put them in the beginning of the input file. + long[] corpusSize = new long[Infos.Length]; + int[] numDocArray = new int[Infos.Length]; + + using (var cursor = trainingData.GetRowCursor(col => activeColumns[col])) + { + var getters = new ValueGetter>[Utils.Size(Infos)]; + for (int i = 0; i < Infos.Length; i++) + { + corpusSize[i] = 0; + numDocArray[i] = 0; + getters[i] = RowCursorUtils.GetVecGetterAs(NumberType.R8, cursor, Infos[i].Source); + } + VBuffer src = default(VBuffer); + long rowCount = 0; + + while (cursor.MoveNext()) + { + ++rowCount; + for (int i = 0; i < Infos.Length; i++) + { + int docSize = 0; + getters[i](ref src); + + // compute term, doc instance#. + for (int termID = 0; termID < src.Count; termID++) + { + int termFreq = GetFrequency(src.Values[termID]); + if (termFreq < 0) + { + // Ignore this row. + docSize = 0; + break; + } + + if (docSize >= _exes[i].NumMaxDocToken - termFreq) + break; //control the document length + + //if legal then add the term + docSize += termFreq; + } + + // Ignore empty doc + if (docSize == 0) + continue; + + numDocArray[i]++; + corpusSize[i] += docSize * 2 + 1; // in the beggining of each doc, there is a cursor variable + + // increase numVocab if needed. + if (numVocabs[i] < src.Length) + numVocabs[i] = src.Length; + } + } + + for (int i = 0; i < Infos.Length; ++i) + { + if (numDocArray[i] != rowCount) + { + ch.Assert(numDocArray[i] < rowCount); + ch.Warning($"Column '{Infos[i].Name}' has skipped {rowCount - numDocArray[i]} of {rowCount} rows either empty or with negative, non-finite, or fractional values."); + } + } + } + + // Initialize all LDA states + for (int i = 0; i < Infos.Length; i++) + { + var state = new LdaState(Host, _exes[i], numVocabs[i]); + if (numDocArray[i] == 0 || corpusSize[i] == 0) + throw ch.Except("The specified documents are all empty in column '{0}'.", Infos[i].Name); + + state.AllocateDataMemory(numDocArray[i], corpusSize[i]); + states[i] = state; + } + + using (var cursor = trainingData.GetRowCursor(col => activeColumns[col])) + { + int[] docSizeCheck = new int[Infos.Length]; + // This could be optimized so that if multiple trainers consume the same column, it is + // fed into the train method once. + var getters = new ValueGetter>[Utils.Size(Infos)]; + for (int i = 0; i < Infos.Length; i++) + { + docSizeCheck[i] = 0; + getters[i] = RowCursorUtils.GetVecGetterAs(NumberType.R8, cursor, Infos[i].Source); + } + + VBuffer src = default(VBuffer); + + while (cursor.MoveNext()) + { + for (int i = 0; i < Infos.Length; i++) + { + getters[i](ref src); + docSizeCheck[i] += states[i].FeedTrain(Host, in src); + } + } + for (int i = 0; i < Infos.Length; i++) + { + Host.Assert(corpusSize[i] == docSizeCheck[i]); + states[i].CompleteTrain(); + } + } } private sealed class LdaState : IDisposable { - internal readonly ColumnInfo InfoEx; + public readonly ColInfoEx InfoEx; private readonly int _numVocab; private readonly object _preparationSyncRoot; private readonly object _testSyncRoot; @@ -366,7 +601,7 @@ private LdaState() _testSyncRoot = new object(); } - internal LdaState(IExceptionContext ectx, ColumnInfo ex, int numVocab) + public LdaState(IExceptionContext ectx, ColInfoEx ex, int numVocab) : this() { Contracts.AssertValue(ectx); @@ -390,7 +625,7 @@ internal LdaState(IExceptionContext ectx, ColumnInfo ex, int numVocab) InfoEx.NumMaxDocToken); } - internal LdaState(IExceptionContext ectx, ModelLoadContext ctx) + public LdaState(IExceptionContext ectx, ModelLoadContext ctx) : this() { ectx.AssertValue(ctx); @@ -403,7 +638,7 @@ internal LdaState(IExceptionContext ectx, ModelLoadContext ctx) // (serializing term by term, for one term) // int: term_id, int: topic_num, KeyValuePair[]: termTopicVector - InfoEx = new ColumnInfo(ectx, ctx); + InfoEx = new ColInfoEx(ectx, ctx); _numVocab = ctx.Reader.ReadInt32(); ectx.CheckDecode(_numVocab > 0); @@ -452,52 +687,54 @@ internal LdaState(IExceptionContext ectx, ModelLoadContext ctx) //do the preparation if (!_predictionPreparationDone) { - lock (_preparationSyncRoot) - { - _ldaTrainer.InitializeBeforeTest(); - _predictionPreparationDone = true; - } + _ldaTrainer.InitializeBeforeTest(); + _predictionPreparationDone = true; } } - internal LdaSummary GetLdaSummary(VBuffer> mapping) + public Action GetTopicSummaryWriter(VBuffer> mapping) { + Action writeAction; + if (mapping.Length == 0) { - var itemScoresPerTopicBuilder = ImmutableArray.CreateBuilder>(); - for (int i = 0; i < _ldaTrainer.NumTopic; i++) - { - var scores = _ldaTrainer.GetTopicSummary(i); - var itemScores = new List<(int, float)>(); - foreach (KeyValuePair p in scores) + writeAction = + writer => { - itemScores.Add((p.Key, p.Value)); - } - - itemScoresPerTopicBuilder.Add(itemScores); - } - return new LdaSummary(itemScoresPerTopicBuilder.ToImmutable()); + for (int i = 0; i < _ldaTrainer.NumTopic; i++) + { + KeyValuePair[] topicSummaryVector = _ldaTrainer.GetTopicSummary(i); + writer.Write("{0}\t{1}\t", i, topicSummaryVector.Length); + foreach (KeyValuePair p in topicSummaryVector) + writer.Write("{0}:{1}\t", p.Key, p.Value); + writer.WriteLine(); + } + }; } else { - ReadOnlyMemory slotName = default; - var wordScoresPerTopicBuilder = ImmutableArray.CreateBuilder>(); - for (int i = 0; i < _ldaTrainer.NumTopic; i++) - { - var scores = _ldaTrainer.GetTopicSummary(i); - var wordScores = new List<(int, string, float)>(); - foreach (KeyValuePair p in scores) + writeAction = + writer => { - mapping.GetItemOrDefault(p.Key, ref slotName); - wordScores.Add((p.Key, slotName.ToString(), p.Value)); - } - wordScoresPerTopicBuilder.Add(wordScores); - } - return new LdaSummary(wordScoresPerTopicBuilder.ToImmutable()); + ReadOnlyMemory slotName = default; + for (int i = 0; i < _ldaTrainer.NumTopic; i++) + { + KeyValuePair[] topicSummaryVector = _ldaTrainer.GetTopicSummary(i); + writer.Write("{0}\t{1}\t", i, topicSummaryVector.Length); + foreach (KeyValuePair p in topicSummaryVector) + { + mapping.GetItemOrDefault(p.Key, ref slotName); + writer.Write("{0}[{1}]:{2}\t", p.Key, slotName, p.Value); + } + writer.WriteLine(); + } + }; } + + return writeAction; } - public void Save(ModelSaveContext ctx) + public void Save(ModelSaveContext ctx, bool saveText, VBuffer> mapping) { Contracts.AssertValue(ctx); long memBlockSize = 0; @@ -532,6 +769,12 @@ public void Save(ModelSaveContext ctx) ctx.Writer.Write(p.Value); } } + + var writeAction = GetTopicSummaryWriter(mapping); + + // save word-topic summary in text + if (saveText) + ctx.SaveTextStream(WordTopicModelFilename, writeAction); } public void AllocateDataMemory(int docNum, long corpusSize) @@ -549,10 +792,9 @@ public int FeedTrain(IExceptionContext ectx, in VBuffer input) int docSize = 0; int termNum = 0; - var inputValues = input.GetValues(); - for (int i = 0; i < inputValues.Length; i++) + for (int i = 0; i < input.Count; i++) { - int termFreq = GetFrequency(inputValues[i]); + int termFreq = GetFrequency(input.Values[i]); if (termFreq < 0) { // Ignore this row. @@ -572,9 +814,9 @@ public int FeedTrain(IExceptionContext ectx, in VBuffer input) int actualSize = 0; if (input.IsDense) - actualSize = _ldaTrainer.LoadDocDense(inputValues, termNum, input.Length); + actualSize = _ldaTrainer.LoadDocDense(input.Values, termNum, input.Length); else - actualSize = _ldaTrainer.LoadDoc(input.GetIndices(), inputValues, termNum, input.Length); + actualSize = _ldaTrainer.LoadDoc(input.Indices, input.Values, termNum, input.Length); ectx.Assert(actualSize == 2 * docSize + 1, string.Format("The doc size are distinct. Actual: {0}, Expected: {1}", actualSize, 2 * docSize + 1)); return actualSize; @@ -589,7 +831,7 @@ public void CompleteTrain() _ldaTrainer.Train(""); /* Need to pass in an empty string */ } - public void Output(in VBuffer src, ref VBuffer dst, int numBurninIter, bool reset) + public void Output(in VBuffer src, ref VBuffer dst, int numBurninIter, bool reset) { // Prediction for a single document. // LdaSingleBox.InitializeBeforeTest() is NOT thread-safe. @@ -607,30 +849,30 @@ public void Output(in VBuffer src, ref VBuffer dst, int numBurnin } int len = InfoEx.NumTopic; - var srcValues = src.GetValues(); - if (srcValues.Length == 0) + var values = dst.Values; + var indices = dst.Indices; + if (src.Count == 0) { - VBufferUtils.Resize(ref dst, len, 0); + dst = new VBuffer(len, 0, values, indices); return; } - VBufferEditor editor; // Make sure all the frequencies are valid and truncate if the sum gets too large. int docSize = 0; int termNum = 0; - for (int i = 0; i < srcValues.Length; i++) + for (int i = 0; i < src.Count; i++) { - int termFreq = GetFrequency(srcValues[i]); + int termFreq = GetFrequency(src.Values[i]); if (termFreq < 0) { // REVIEW: Should this log a warning message? And what should it produce? // It currently produces a vbuffer of all NA values. // REVIEW: Need a utility method to do this... - editor = VBufferEditor.Create(ref dst, len); - + if (Utils.Size(values) < len) + values = new Float[len]; for (int k = 0; k < len; k++) - editor.Values[k] = float.NaN; - dst = editor.Commit(); + values[k] = Float.NaN; + dst = new VBuffer(len, values, indices); return; } @@ -644,40 +886,42 @@ public void Output(in VBuffer src, ref VBuffer dst, int numBurnin // REVIEW: Too much memory allocation here on each prediction. List> retTopics; if (src.IsDense) - retTopics = _ldaTrainer.TestDocDense(srcValues, termNum, numBurninIter, reset); + retTopics = _ldaTrainer.TestDocDense(src.Values, termNum, numBurninIter, reset); else - retTopics = _ldaTrainer.TestDoc(src.GetIndices(), srcValues, termNum, numBurninIter, reset); + retTopics = _ldaTrainer.TestDoc(src.Indices.Take(src.Count).ToArray(), src.Values.Take(src.Count).ToArray(), termNum, numBurninIter, reset); int count = retTopics.Count; Contracts.Assert(count <= len); + if (Utils.Size(values) < count) + values = new Float[count]; + if (count < len && Utils.Size(indices) < count) + indices = new int[count]; - editor = VBufferEditor.Create(ref dst, len, count); double normalizer = 0; for (int i = 0; i < count; i++) { int index = retTopics[i].Key; - float value = retTopics[i].Value; + Float value = retTopics[i].Value; Contracts.Assert(value >= 0); Contracts.Assert(0 <= index && index < len); if (count < len) { - Contracts.Assert(i == 0 || editor.Indices[i - 1] < index); - editor.Indices[i] = index; + Contracts.Assert(i == 0 || indices[i - 1] < index); + indices[i] = index; } else Contracts.Assert(index == i); - editor.Values[i] = value; + values[i] = value; normalizer += value; } if (normalizer > 0) { for (int i = 0; i < count; i++) - editor.Values[i] = (float)(editor.Values[i] / normalizer); + values[i] = (Float)(values[i] / normalizer); } - - dst = editor.Commit(); + dst = new VBuffer(len, count, values, indices); } public void Dispose() @@ -686,481 +930,46 @@ public void Dispose() } } - private sealed class Mapper : OneToOneMapperBase - { - private readonly LatentDirichletAllocationTransformer _parent; - private readonly int[] _srcCols; - - public Mapper(LatentDirichletAllocationTransformer parent, Schema inputSchema) - : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) - { - _parent = parent; - _srcCols = new int[_parent.ColumnPairs.Length]; - - for (int i = 0; i < _parent.ColumnPairs.Length; i++) - { - if (!inputSchema.TryGetColumnIndex(_parent.ColumnPairs[i].input, out _srcCols[i])) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.ColumnPairs[i].input); - - var srcCol = inputSchema[_srcCols[i]]; - if (!srcCol.Type.IsKnownSizeVector || !(srcCol.Type.ItemType is NumberType)) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", _parent.ColumnPairs[i].input, "a fixed vector of floats", srcCol.Type.ToString()); - } - } - - protected override Schema.Column[] GetOutputColumnsCore() - { - var result = new Schema.Column[_parent.ColumnPairs.Length]; - for (int i = 0; i < _parent.ColumnPairs.Length; i++) - { - var info = _parent._columns[i]; - result[i] = new Schema.Column(_parent.ColumnPairs[i].output, new VectorType(NumberType.Float, info.NumTopic), null); - } - return result; - } - - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) - { - Contracts.AssertValue(input); - Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); - disposer = null; - - return GetTopic(input, iinfo); - } - - private ValueGetter> GetTopic(IRow input, int iinfo) - { - var getSrc = RowCursorUtils.GetVecGetterAs(NumberType.R8, input, _srcCols[iinfo]); - var src = default(VBuffer); - var lda = _parent._ldas[iinfo]; - int numBurninIter = lda.InfoEx.NumBurninIter; - bool reset = lda.InfoEx.ResetRandomGenerator; - return - (ref VBuffer dst) => - { - // REVIEW: This will work, but there are opportunities for caching - // based on input.Counter that are probably worthwhile given how long inference takes. - getSrc(ref src); - lda.Output(in src, ref dst, numBurninIter, reset); - }; - } - } - - internal const string LoaderSignature = "LdaTransform"; - private static VersionInfo GetVersionInfo() - { - return new VersionInfo( - modelSignature: "LIGHTLDA", - verWrittenCur: 0x00010001, // Initial - verReadableCur: 0x00010001, - verWeCanReadBack: 0x00010001, - loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(LatentDirichletAllocationTransformer).Assembly.FullName); - } - - private readonly ColumnInfo[] _columns; - private readonly LdaState[] _ldas; - private readonly List>> _columnMappings; - - private const string RegistrationName = "LightLda"; - private const string WordTopicModelFilename = "word_topic_summary.txt"; - internal const string Summary = "The LDA transform implements LightLDA, a state-of-the-art implementation of Latent Dirichlet Allocation."; - internal const string UserName = "Latent Dirichlet Allocation Transform"; - internal const string ShortName = "LightLda"; - - private static (string input, string output)[] GetColumnPairs(ColumnInfo[] columns) - { - Contracts.CheckValue(columns, nameof(columns)); - return columns.Select(x => (x.Input, x.Output)).ToArray(); - } - - /// - /// Initializes a new object. - /// - /// Host Environment. - /// An array of LdaState objects, where ldas[i] is learnt from the i-th element of . - /// A list of mappings, where columnMapping[i] is a map of slot names for the i-th element of . - /// Describes the parameters of the LDA process for each column pair. - private LatentDirichletAllocationTransformer(IHostEnvironment env, - LdaState[] ldas, - List>> columnMappings, - params ColumnInfo[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(LatentDirichletAllocationTransformer)), GetColumnPairs(columns)) - { - Host.AssertNonEmpty(ColumnPairs); - _ldas = ldas; - _columnMappings = columnMappings; - _columns = columns; - } - - private LatentDirichletAllocationTransformer(IHost host, ModelLoadContext ctx) : base(host, ctx) - { - Host.AssertValue(ctx); - - // *** Binary format *** - // - // - // ldaState[num infos]: The LDA parameters - - // Note: columnsLength would be just one in most cases. - var columnsLength = ColumnPairs.Length; - _columns = new ColumnInfo[columnsLength]; - _ldas = new LdaState[columnsLength]; - for (int i = 0; i < _ldas.Length; i++) - { - _ldas[i] = new LdaState(Host, ctx); - _columns[i] = _ldas[i].InfoEx; - } - } - - internal static LatentDirichletAllocationTransformer TrainLdaTransformer(IHostEnvironment env, IDataView inputData, params ColumnInfo[] columns) - { - var ldas = new LdaState[columns.Length]; - - List>> columnMappings; - using (var ch = env.Start("Train")) - { - columnMappings = Train(env, ch, inputData, ldas, columns); - } - - return new LatentDirichletAllocationTransformer(env, ldas, columnMappings, columns); - } - - private void Dispose(bool disposing) + private ColumnType[] InitColumnTypes(int numTopics) { - if (_ldas != null) - { - foreach (var state in _ldas) - state?.Dispose(); - } - if (disposing) - GC.SuppressFinalize(this); + Host.Assert(Utils.Size(Infos) > 0); + var types = new ColumnType[Infos.Length]; + for (int c = 0; c < Infos.Length; c++) + types[c] = new VectorType(NumberType.Float, numTopics); + return types; } - public void Dispose() + protected override ColumnType GetColumnTypeCore(int iinfo) { - Dispose(true); + Host.Assert(0 <= iinfo & iinfo < Utils.Size(_types)); + return _types[iinfo]; } - ~LatentDirichletAllocationTransformer() + protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, out Action disposer) { - Dispose(false); - } - - // Factory method for SignatureLoadDataTransform. - private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) - => Create(env, ctx).MakeDataTransform(input); - - // Factory method for SignatureLoadRowMapper. - private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) - => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); + Host.AssertValueOrNull(ch); + Host.AssertValue(input); + Host.Assert(0 <= iinfo && iinfo < Infos.Length); + disposer = null; - // Factory method for SignatureDataTransform. - private static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) - { - Contracts.CheckValue(env, nameof(env)); - env.CheckValue(args, nameof(args)); - env.CheckValue(input, nameof(input)); - env.CheckValue(args.Column, nameof(args.Column)); - - var cols = args.Column.Select(colPair => new ColumnInfo(colPair, args)).ToArray(); - return TrainLdaTransformer(env, input, cols).MakeDataTransform(input); + return GetTopic(input, iinfo); } - // Factory method for SignatureLoadModel - private static LatentDirichletAllocationTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + private ValueGetter> GetTopic(IRow input, int iinfo) { - Contracts.CheckValue(env, nameof(env)); - var h = env.Register(RegistrationName); - - h.CheckValue(ctx, nameof(ctx)); - ctx.CheckAtModel(GetVersionInfo()); - - return h.Apply( - "Loading Model", - ch => + var getSrc = RowCursorUtils.GetVecGetterAs(NumberType.R8, input, Infos[iinfo].Source); + var src = default(VBuffer); + var lda = _ldas[iinfo]; + int numBurninIter = lda.InfoEx.NumBurninIter; + bool reset = lda.InfoEx.ResetRandomGenerator; + return + (ref VBuffer dst) => { - // *** Binary Format *** - // int: sizeof(float) - // - int cbFloat = ctx.Reader.ReadInt32(); - h.CheckDecode(cbFloat == sizeof(float)); - return new LatentDirichletAllocationTransformer(h, ctx); - }); - } - - public override void Save(ModelSaveContext ctx) - { - Host.CheckValue(ctx, nameof(ctx)); - ctx.CheckAtModel(); - ctx.SetVersionInfo(GetVersionInfo()); - - // *** Binary format *** - // int: sizeof(float) - // - // ldaState[num infos]: The LDA parameters - - ctx.Writer.Write(sizeof(float)); - SaveColumns(ctx); - for (int i = 0; i < _ldas.Length; i++) - { - _ldas[i].Save(ctx); - } - } - - private static int GetFrequency(double value) - { - int result = (int)value; - if (!(result == value && result >= 0)) - return -1; - return result; - } - - private static List>> Train(IHostEnvironment env, IChannel ch, IDataView inputData, LdaState[] states, params ColumnInfo[] columns) - { - env.AssertValue(ch); - ch.AssertValue(inputData); - ch.AssertValue(states); - ch.Assert(states.Length == columns.Length); - - bool[] activeColumns = new bool[inputData.Schema.ColumnCount]; - int[] numVocabs = new int[columns.Length]; - int[] srcCols = new int[columns.Length]; - - var columnMappings = new List>>(); - - var inputSchema = inputData.Schema; - for (int i = 0; i < columns.Length; i++) - { - if (!inputData.Schema.TryGetColumnIndex(columns[i].Input, out int srcCol)) - throw env.ExceptSchemaMismatch(nameof(inputData), "input", columns[i].Input); - - var srcColType = inputSchema.GetColumnType(srcCol); - if (!srcColType.IsKnownSizeVector || !(srcColType.ItemType is NumberType)) - throw env.ExceptSchemaMismatch(nameof(inputSchema), "input", columns[i].Input, "a fixed vector of floats", srcColType.ToString()); - - srcCols[i] = srcCol; - activeColumns[srcCol] = true; - numVocabs[i] = 0; - - VBuffer> dst = default; - if (inputSchema.HasSlotNames(srcCol, srcColType.ValueCount)) - inputSchema.GetMetadata(MetadataUtils.Kinds.SlotNames, srcCol, ref dst); - else - dst = default(VBuffer>); - columnMappings.Add(dst); - } - - //the current lda needs the memory allocation before feedin data, so needs two sweeping of the data, - //one for the pre-calc memory, one for feedin data really - //another solution can be prepare these two value externally and put them in the beginning of the input file. - long[] corpusSize = new long[columns.Length]; - int[] numDocArray = new int[columns.Length]; - - using (var cursor = inputData.GetRowCursor(col => activeColumns[col])) - { - var getters = new ValueGetter>[columns.Length]; - for (int i = 0; i < columns.Length; i++) - { - corpusSize[i] = 0; - numDocArray[i] = 0; - getters[i] = RowCursorUtils.GetVecGetterAs(NumberType.R8, cursor, srcCols[i]); - } - VBuffer src = default(VBuffer); - long rowCount = 0; - while (cursor.MoveNext()) - { - ++rowCount; - for (int i = 0; i < columns.Length; i++) - { - int docSize = 0; - getters[i](ref src); - - // compute term, doc instance#. - var srcValues = src.GetValues(); - for (int termID = 0; termID < srcValues.Length; termID++) - { - int termFreq = GetFrequency(srcValues[termID]); - if (termFreq < 0) - { - // Ignore this row. - docSize = 0; - break; - } - - if (docSize >= columns[i].NumMaxDocToken - termFreq) - break; //control the document length - - //if legal then add the term - docSize += termFreq; - } - - // Ignore empty doc - if (docSize == 0) - continue; - - numDocArray[i]++; - corpusSize[i] += docSize * 2 + 1; // in the beggining of each doc, there is a cursor variable - - // increase numVocab if needed. - if (numVocabs[i] < src.Length) - numVocabs[i] = src.Length; - } - } - - // No data to train on, just return - if (rowCount == 0) - return columnMappings; - - for (int i = 0; i < columns.Length; ++i) - { - if (numDocArray[i] != rowCount) - { - ch.Assert(numDocArray[i] < rowCount); - ch.Warning($"Column '{columns[i].Input}' has skipped {rowCount - numDocArray[i]} of {rowCount} rows either empty or with negative, non-finite, or fractional values."); - } - } - } - - // Initialize all LDA states - for (int i = 0; i < columns.Length; i++) - { - var state = new LdaState(env, columns[i], numVocabs[i]); - - if (numDocArray[i] == 0 || corpusSize[i] == 0) - throw ch.Except("The specified documents are all empty in column '{0}'.", columns[i].Input); - - state.AllocateDataMemory(numDocArray[i], corpusSize[i]); - states[i] = state; - } - - using (var cursor = inputData.GetRowCursor(col => activeColumns[col])) - { - int[] docSizeCheck = new int[columns.Length]; - // This could be optimized so that if multiple trainers consume the same column, it is - // fed into the train method once. - var getters = new ValueGetter>[columns.Length]; - for (int i = 0; i < columns.Length; i++) - { - docSizeCheck[i] = 0; - getters[i] = RowCursorUtils.GetVecGetterAs(NumberType.R8, cursor, srcCols[i]); - } - - VBuffer src = default(VBuffer); - - while (cursor.MoveNext()) - { - for (int i = 0; i < columns.Length; i++) - { - getters[i](ref src); - docSizeCheck[i] += states[i].FeedTrain(env, in src); - } - } - - for (int i = 0; i < columns.Length; i++) - { - env.Assert(corpusSize[i] == docSizeCheck[i]); - states[i].CompleteTrain(); - } - } - - return columnMappings; - } - - protected override IRowMapper MakeRowMapper(Schema schema) - { - return new Mapper(this, schema); - } - } - - /// - public sealed class LatentDirichletAllocationEstimator : IEstimator - { - internal static class Defaults - { - public const int NumTopic = 100; - public const float AlphaSum = 100; - public const float Beta = 0.01f; - public const int Mhstep = 4; - public const int NumIterations = 200; - public const int LikelihoodInterval = 5; - public const int NumThreads = 0; - public const int NumMaxDocToken = 512; - public const int NumSummaryTermPerTopic = 10; - public const int NumBurninIterations = 10; - public const bool ResetRandomGenerator = false; - } - - private readonly IHost _host; - private readonly ImmutableArray _columns; - - /// - /// The environment. - /// The column representing the document as a vector of floats. - /// The column containing the output scores over a set of topics, represented as a vector of floats. A null value for the column means is replaced. - /// The number of topics. - /// Dirichlet prior on document-topic vectors. - /// Dirichlet prior on vocab-topic vectors. - /// Number of Metropolis Hasting step. - /// Number of iterations. - /// Compute log likelihood over local dataset on this iteration interval. - /// The number of training threads. Default value depends on number of logical processors. - /// The threshold of maximum count of tokens per doc. - /// The number of words to summarize the topic. - /// The number of burn-in iterations. - /// Reset the random number generator for each document. - public LatentDirichletAllocationEstimator(IHostEnvironment env, - string inputColumn, - string outputColumn = null, - int numTopic = Defaults.NumTopic, - float alphaSum = Defaults.AlphaSum, - float beta = Defaults.Beta, - int mhstep = Defaults.Mhstep, - int numIterations = Defaults.NumIterations, - int likelihoodInterval = Defaults.LikelihoodInterval, - int numThreads = Defaults.NumThreads, - int numMaxDocToken = Defaults.NumMaxDocToken, - int numSummaryTermPerTopic = Defaults.NumSummaryTermPerTopic, - int numBurninIterations = Defaults.NumBurninIterations, - bool resetRandomGenerator = Defaults.ResetRandomGenerator) - : this(env, new[] { new LatentDirichletAllocationTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn, - numTopic, alphaSum, beta, mhstep, numIterations, likelihoodInterval, numThreads, numMaxDocToken, - numSummaryTermPerTopic, numBurninIterations, resetRandomGenerator) }) - { } - - /// - /// The environment. - /// Describes the parameters of the LDA process for each column pair. - public LatentDirichletAllocationEstimator(IHostEnvironment env, params LatentDirichletAllocationTransformer.ColumnInfo[] columns) - { - Contracts.CheckValue(env, nameof(env)); - _host = env.Register(nameof(LatentDirichletAllocationEstimator)); - _columns = columns.ToImmutableArray(); - } - - /// - /// Returns the schema that would be produced by the transformation. - /// - public SchemaShape GetOutputSchema(SchemaShape inputSchema) - { - _host.CheckValue(inputSchema, nameof(inputSchema)); - var result = inputSchema.Columns.ToDictionary(x => x.Name); - foreach (var colInfo in _columns) - { - if (!inputSchema.TryFindColumn(colInfo.Input, out var col)) - throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.Input); - if (col.ItemType.RawKind != DataKind.R4 || col.Kind == SchemaShape.Column.VectorKind.Scalar) - throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.Input, "a vector of floats", col.GetTypeString()); - - result[colInfo.Output] = new SchemaShape.Column(colInfo.Output, SchemaShape.Column.VectorKind.Vector, NumberType.R4, false); - } - - return new SchemaShape(result.Values); - } - - public LatentDirichletAllocationTransformer Fit(IDataView input) - { - return LatentDirichletAllocationTransformer.TrainLdaTransformer(_host, input, _columns.ToArray()); + // REVIEW: This will work, but there are opportunities for caching + // based on input.Counter that are probably worthwhile given how long inference takes. + getSrc(ref src); + lda.Output(in src, ref dst, numBurninIter, reset); + }; } } } diff --git a/src/Microsoft.ML.Transforms/Text/NgramHashingTransformer.cs b/src/Microsoft.ML.Transforms/Text/NgramHashTransform.cs similarity index 97% rename from src/Microsoft.ML.Transforms/Text/NgramHashingTransformer.cs rename to src/Microsoft.ML.Transforms/Text/NgramHashTransform.cs index 7ec307d115..563093e39a 100644 --- a/src/Microsoft.ML.Transforms/Text/NgramHashingTransformer.cs +++ b/src/Microsoft.ML.Transforms/Text/NgramHashTransform.cs @@ -16,17 +16,17 @@ using Microsoft.ML.Runtime.Model; using Microsoft.ML.Transforms.Text; -[assembly: LoadableClass(typeof(NgramHashingTransformer), typeof(NgramHashingTransformer.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(typeof(NgramHashTransform), typeof(NgramHashTransform.Arguments), typeof(SignatureDataTransform), "Ngram Hash Transform", "NgramHashTransform", "NgramHash")] -[assembly: LoadableClass(typeof(NgramHashingTransformer), null, typeof(SignatureLoadDataTransform), - "Ngram Hash Transform", NgramHashingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(NgramHashTransform), null, typeof(SignatureLoadDataTransform), + "Ngram Hash Transform", NgramHashTransform.LoaderSignature)] namespace Microsoft.ML.Transforms.Text { using Conditional = System.Diagnostics.ConditionalAttribute; - public sealed class NgramHashingTransformer : RowToRowMapperTransformBase + public sealed class NgramHashTransform : RowToRowMapperTransformBase { public sealed class Column : ManyToOneColumn { @@ -151,16 +151,16 @@ public sealed class Arguments private sealed class Bindings : ManyToOneColumnBindingsBase { public readonly VectorType[] Types; - private readonly NgramHashingTransformer _parent; + private readonly NgramHashTransform _parent; - public Bindings(Arguments args, ISchema schemaInput, NgramHashingTransformer parent) + public Bindings(Arguments args, ISchema schemaInput, NgramHashTransform parent) : base(args.Column, schemaInput, TestTypes) { Types = new VectorType[args.Column.Length]; _parent = parent; } - public Bindings(ModelLoadContext ctx, ISchema schemaInput, NgramHashingTransformer parent) + public Bindings(ModelLoadContext ctx, ISchema schemaInput, NgramHashTransform parent) : base(ctx, schemaInput, TestTypes) { Types = new VectorType[Infos.Length]; @@ -319,7 +319,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010002, verWeCanReadBack: 0x00010002, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(NgramHashingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(NgramHashTransform).Assembly.FullName); } private readonly Bindings _bindings; @@ -333,7 +333,7 @@ private static VersionInfo GetVersionInfo() /// /// Public constructor corresponding to SignatureDataTransform. /// - public NgramHashingTransformer(IHostEnvironment env, Arguments args, IDataView input) + public NgramHashTransform(IHostEnvironment env, Arguments args, IDataView input) : base(env, RegistrationName, input) { Host.CheckValue(args, nameof(args)); @@ -376,7 +376,7 @@ public NgramHashingTransformer(IHostEnvironment env, Arguments args, IDataView i } } - private NgramHashingTransformer(IHost host, ModelLoadContext ctx, IDataView input) + private NgramHashTransform(IHost host, ModelLoadContext ctx, IDataView input) : base(host, input) { Host.AssertValue(ctx); @@ -398,14 +398,14 @@ private NgramHashingTransformer(IHost host, ModelLoadContext ctx, IDataView inpu TextModelHelper.LoadAll(Host, ctx, _exes.Length, out _slotNames, out _slotNamesTypes); } - public static NgramHashingTransformer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + public static NgramHashTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { Contracts.CheckValue(env, nameof(env)); var h = env.Register(RegistrationName); h.CheckValue(ctx, nameof(ctx)); h.CheckValue(input, nameof(input)); ctx.CheckAtModel(GetVersionInfo()); - return h.Apply("Loading Model", ch => new NgramHashingTransformer(h, ctx, input)); + return h.Apply("Loading Model", ch => new NgramHashTransform(h, ctx, input)); } public override void Save(ModelSaveContext ctx) @@ -723,7 +723,7 @@ private sealed class RowCursor : SynchronizedCursorBase, IRowCursor public Schema Schema => _bindings.AsSchema; - public RowCursor(NgramHashingTransformer parent, IRowCursor input, bool[] active, FinderDecorator decorator = null) + public RowCursor(NgramHashTransform parent, IRowCursor input, bool[] active, FinderDecorator decorator = null) : base(parent.Host, input) { Ch.AssertValue(parent); @@ -777,7 +777,7 @@ private ValueGetter GetSrcGetter(int iinfo, int isrc) private sealed class InvertHashHelper { - private readonly NgramHashingTransformer _parent; + private readonly NgramHashTransform _parent; // One per output column (will be null if invert hashing is not specified for // this column). private readonly InvertHashCollector[] _iinfoToCollector; @@ -788,7 +788,7 @@ private sealed class InvertHashHelper private readonly string[][] _friendlyNames; private readonly int[] _invertHashMaxCounts; - public InvertHashHelper(NgramHashingTransformer parent, string[][] friendlyNames, Func inputPred, int[] invertHashMaxCounts) + public InvertHashHelper(NgramHashTransform parent, string[][] friendlyNames, Func inputPred, int[] invertHashMaxCounts) { Contracts.AssertValue(parent); Contracts.AssertValue(friendlyNames); diff --git a/src/Microsoft.ML.Transforms/Text/NgramTransform.cs b/src/Microsoft.ML.Transforms/Text/NgramTransform.cs index d606d42ff1..56322f68f9 100644 --- a/src/Microsoft.ML.Transforms/Text/NgramTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/NgramTransform.cs @@ -2,38 +2,47 @@ // 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.Core.Data; +using Float = System.Single; + +using System; +using System.Linq; +using System.Text; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Runtime.Internal.Utilities; using Microsoft.ML.Runtime.Model; +using Microsoft.ML.Runtime.EntryPoints; using Microsoft.ML.Transforms.Text; -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Linq; -using System.Text; -[assembly: LoadableClass(NgramCountingTransformer.Summary, typeof(IDataTransform), typeof(NgramCountingTransformer), typeof(NgramCountingTransformer.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(NgramTransform.Summary, typeof(NgramTransform), typeof(NgramTransform.Arguments), typeof(SignatureDataTransform), "Ngram Transform", "NgramTransform", "Ngram")] -[assembly: LoadableClass(NgramCountingTransformer.Summary, typeof(IDataTransform), typeof(NgramCountingTransformer), null, typeof(SignatureLoadDataTransform), - "Ngram Transform", NgramCountingTransformer.LoaderSignature)] - -[assembly: LoadableClass(NgramCountingTransformer.Summary, typeof(NgramCountingTransformer), null, typeof(SignatureLoadModel), - "Ngram Transform", NgramCountingTransformer.LoaderSignature)] - -[assembly: LoadableClass(typeof(IRowMapper), typeof(NgramCountingTransformer), null, typeof(SignatureLoadRowMapper), - "Ngram Transform", NgramCountingTransformer.LoaderSignature)] +[assembly: LoadableClass(NgramTransform.Summary, typeof(NgramTransform), null, typeof(SignatureLoadDataTransform), + "Ngram Transform", NgramTransform.LoaderSignature)] namespace Microsoft.ML.Transforms.Text { using Conditional = System.Diagnostics.ConditionalAttribute; - public sealed class NgramCountingTransformer : OneToOneTransformerBase + public sealed class NgramTransform : OneToOneTransformBase { + /// + /// Weighting criteria: a statistical measure used to evaluate how important a word is to a document in a corpus. + /// This enumeration is serialized. + /// + public enum WeightingCriteria + { + [EnumValueDisplay("TF (Term Frequency)")] + Tf = 0, + + [EnumValueDisplay("IDF (Inverse Document Frequency)")] + Idf = 1, + + [EnumValueDisplay("TF-IDF")] + TfIdf = 2 + } + public sealed class Column : OneToOneColumn { [Argument(ArgumentType.AtMostOnce, HelpText = "Maximum ngram length", ShortName = "ngram")] @@ -52,7 +61,7 @@ public sealed class Column : OneToOneColumn public int[] MaxNumTerms = null; [Argument(ArgumentType.AtMostOnce, HelpText = "Statistical measure used to evaluate how important a word is to a document in a corpus")] - public NgramCountingEstimator.WeightingCriteria? Weighting; + public WeightingCriteria? Weighting; public static Column Parse(string str) { @@ -75,141 +84,64 @@ public bool TryUnparse(StringBuilder sb) public sealed class Arguments : TransformInputBase { + internal const int DefaultMaxTerms = 10000000; + [Argument(ArgumentType.Multiple, HelpText = "New column definition(s) (optional form: name:src)", ShortName = "col", SortOrder = 1)] public Column[] Column; [Argument(ArgumentType.AtMostOnce, HelpText = "Maximum ngram length", ShortName = "ngram")] - public int NgramLength = NgramCountingEstimator.Defaults.NgramLength; + public int NgramLength = 2; [Argument(ArgumentType.AtMostOnce, HelpText = "Whether to store all ngram lengths up to ngramLength, or only ngramLength", ShortName = "all")] - public bool AllLengths = NgramCountingEstimator.Defaults.AllLength; + public bool AllLengths = true; [Argument(ArgumentType.AtMostOnce, HelpText = "Maximum number of tokens to skip when constructing an ngram", ShortName = "skips")] - public int SkipLength = NgramCountingEstimator.Defaults.SkipLength; + public int SkipLength = 0; [Argument(ArgumentType.Multiple, HelpText = "Maximum number of ngrams to store in the dictionary", ShortName = "max")] - public int[] MaxNumTerms = new int[] { NgramCountingEstimator.Defaults.MaxNumTerms }; + public int[] MaxNumTerms = new int[] { DefaultMaxTerms }; [Argument(ArgumentType.AtMostOnce, HelpText = "The weighting criteria")] - public NgramCountingEstimator.WeightingCriteria Weighting = NgramCountingEstimator.Defaults.Weighting; + public WeightingCriteria Weighting = WeightingCriteria.Tf; } - private const uint VerTfIdfSupported = 0x00010002; - - internal const string LoaderSignature = "NgramTransform"; - internal const string Summary = "Produces a bag of counts of ngrams (sequences of consecutive values of length 1-n) in a given vector of keys. " - + "It does so by building a dictionary of ngrams and using the id in the dictionary as the index in the bag."; - - internal const string UserName = "NGram Transform"; - - private static VersionInfo GetVersionInfo() + private sealed class ColInfoEx { - return new VersionInfo( - modelSignature: "NGRAMTRN", - // verWrittenCur: 0x00010001, // Initial - // verWrittenCur: 0x00010002, // Add support for TF-IDF - verWrittenCur: 0x00010003, // Get rid of writing float size in model context - verReadableCur: 0x00010003, - verWeCanReadBack: 0x00010001, - loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(NgramCountingTransformer).Assembly.FullName); - } + // Position i, indicates whether the pool contains any (i+1)-grams + public readonly bool[] NonEmptyLevels; - /// - /// Describes how the transformer handles one column pair. - /// - public sealed class ColumnInfo - { - public readonly string Input; - public readonly string Output; public readonly int NgramLength; public readonly int SkipLength; - public readonly bool AllLengths; - public readonly NgramCountingEstimator.WeightingCriteria Weighting; - /// - /// Contains the maximum number of grams to store in the dictionary, for each level of ngrams, - /// from 1 (in position 0) up to ngramLength (in position ngramLength-1) - /// - public readonly ImmutableArray Limits; - - /// - /// Describes how the transformer handles one Gcn column pair. - /// - /// Name of input column. - /// Name of output column. - /// Maximum ngram length. - /// Maximum number of tokens to skip when constructing an ngram. - /// "Whether to store all ngram lengths up to ngramLength, or only ngramLength. - /// The weighting criteria. - /// Maximum number of ngrams to store in the dictionary. - public ColumnInfo(string input, string output, - int ngramLength = NgramCountingEstimator.Defaults.NgramLength, - int skipLength = NgramCountingEstimator.Defaults.SkipLength, - bool allLengths = NgramCountingEstimator.Defaults.AllLength, - NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.Defaults.Weighting, - int maxNumTerms = NgramCountingEstimator.Defaults.MaxNumTerms) : this(input, output, ngramLength, skipLength, allLengths, weighting, new int[] { maxNumTerms }) + + public readonly WeightingCriteria Weighting; + + public bool RequireIdf() { + return Weighting == WeightingCriteria.Idf || Weighting == WeightingCriteria.TfIdf; } - internal ColumnInfo(string input, string output, - int ngramLength, - int skipLength, - bool allLengths, - NgramCountingEstimator.WeightingCriteria weighting, - int[] maxNumTerms) + public ColInfoEx(Column item, Arguments args) { - Input = input; - Output = output; - NgramLength = ngramLength; - Contracts.CheckUserArg(0 < NgramLength && NgramLength <= NgramBufferBuilder.MaxSkipNgramLength, nameof(ngramLength)); - SkipLength = skipLength; + NgramLength = item.NgramLength ?? args.NgramLength; + Contracts.CheckUserArg(0 < NgramLength && NgramLength <= NgramBufferBuilder.MaxSkipNgramLength, nameof(item.NgramLength)); + SkipLength = item.SkipLength ?? args.SkipLength; + Contracts.CheckUserArg(0 <= SkipLength && SkipLength <= NgramBufferBuilder.MaxSkipNgramLength, nameof(item.SkipLength)); if (NgramLength + SkipLength > NgramBufferBuilder.MaxSkipNgramLength) { - throw Contracts.ExceptUserArg(nameof(skipLength), - $"The sum of skipLength and ngramLength must be less than or equal to {NgramBufferBuilder.MaxSkipNgramLength}"); - } - AllLengths = allLengths; - Weighting = weighting; - var limits = new int[ngramLength]; - if (!AllLengths) - { - Contracts.CheckUserArg(Utils.Size(maxNumTerms) == 0 || - Utils.Size(maxNumTerms) == 1 && maxNumTerms[0] > 0, nameof(maxNumTerms)); - limits[ngramLength - 1] = Utils.Size(maxNumTerms) == 0 ? NgramCountingEstimator.Defaults.MaxNumTerms : maxNumTerms[0]; - } - else - { - Contracts.CheckUserArg(Utils.Size(maxNumTerms) <= ngramLength, nameof(maxNumTerms)); - Contracts.CheckUserArg(Utils.Size(maxNumTerms) == 0 || maxNumTerms.All(i => i >= 0) && maxNumTerms[maxNumTerms.Length - 1] > 0, nameof(maxNumTerms)); - var extend = Utils.Size(maxNumTerms) == 0 ? NgramCountingEstimator.Defaults.MaxNumTerms : maxNumTerms[maxNumTerms.Length - 1]; - limits = Utils.BuildArray(ngramLength, i => i < Utils.Size(maxNumTerms) ? maxNumTerms[i] : extend); + throw Contracts.ExceptUserArg(nameof(item.SkipLength), + "The sum of skipLength and ngramLength must be less than or equal to {0}", + NgramBufferBuilder.MaxSkipNgramLength); } - Limits = ImmutableArray.Create(limits); - } - } + Contracts.CheckUserArg(Enum.IsDefined(typeof(WeightingCriteria), args.Weighting), nameof(args.Weighting)); + Weighting = item.Weighting ?? args.Weighting; - private sealed class TransformInfo - { - // Position i, indicates whether the pool contains any (i+1)-grams - public readonly bool[] NonEmptyLevels; - public readonly int NgramLength; - public readonly int SkipLength; - public readonly NgramCountingEstimator.WeightingCriteria Weighting; - - public bool RequireIdf => Weighting == NgramCountingEstimator.WeightingCriteria.Idf || Weighting == NgramCountingEstimator.WeightingCriteria.TfIdf; - - public TransformInfo(ColumnInfo info) - { - NgramLength = info.NgramLength; - SkipLength = info.SkipLength; - Weighting = info.Weighting; NonEmptyLevels = new bool[NgramLength]; } - public TransformInfo(ModelLoadContext ctx, bool readWeighting) + public ColInfoEx(ModelLoadContext ctx, bool readWeighting) { Contracts.AssertValue(ctx); @@ -226,8 +158,8 @@ public TransformInfo(ModelLoadContext ctx, bool readWeighting) Contracts.CheckDecode(NgramLength <= NgramBufferBuilder.MaxSkipNgramLength - SkipLength); if (readWeighting) - Weighting = (NgramCountingEstimator.WeightingCriteria)ctx.Reader.ReadInt32(); - Contracts.CheckDecode(Enum.IsDefined(typeof(NgramCountingEstimator.WeightingCriteria), Weighting)); + Weighting = (WeightingCriteria)ctx.Reader.ReadInt32(); + Contracts.CheckDecode(Enum.IsDefined(typeof(WeightingCriteria), Weighting)); NonEmptyLevels = ctx.Reader.ReadBoolArray(NgramLength); } @@ -246,113 +178,343 @@ public void Save(ModelSaveContext ctx) Contracts.Assert(0 <= SkipLength && SkipLength <= NgramBufferBuilder.MaxSkipNgramLength); Contracts.Assert(NgramLength + SkipLength <= NgramBufferBuilder.MaxSkipNgramLength); ctx.Writer.Write(SkipLength); - Contracts.Assert(Enum.IsDefined(typeof(NgramCountingEstimator.WeightingCriteria), Weighting)); + Contracts.Assert(Enum.IsDefined(typeof(WeightingCriteria), Weighting)); ctx.Writer.Write((int)Weighting); Contracts.Assert(Utils.Size(NonEmptyLevels) == NgramLength); ctx.Writer.WriteBoolBytesNoCount(NonEmptyLevels); } } - private readonly ImmutableArray _transformInfos; + private const uint VerTfIdfSupported = 0x00010002; + public const string LoaderSignature = "NgramTransform"; + internal const string Summary = "Produces a bag of counts of ngrams (sequences of consecutive values of length 1-n) in a given vector of keys. " + + "It does so by building a dictionary of ngrams and using the id in the dictionary as the index in the bag."; + + internal const string UserName = "NGram Transform"; + + private static VersionInfo GetVersionInfo() + { + return new VersionInfo( + modelSignature: "NGRAMTRN", + // verWrittenCur: 0x00010001, // Initial + verWrittenCur: 0x00010002, // Add support for TF-IDF + verReadableCur: 0x00010002, + verWeCanReadBack: 0x00010001, + loaderSignature: LoaderSignature, + loaderAssemblyName: typeof(NgramTransform).Assembly.FullName); + } + + private readonly VectorType[] _types; + + // REVIEW: The slot names types are not really needed. They are only used to "remember" which new + // columns have slot names. + private readonly VectorType[] _slotNamesTypes; + + private readonly ColInfoEx[] _exes; // These contain the ngram maps private readonly SequencePool[] _ngramMaps; // Ngram inverse document frequencies private readonly double[][] _invDocFreqs; - private static (string input, string output)[] GetColumnPairs(ColumnInfo[] columns) + private const string RegistrationName = "Ngram"; + + /// + /// Public constructor corresponding to SignatureDataTransform. + /// + public NgramTransform(IHostEnvironment env, Arguments args, IDataView input) + : base(env, RegistrationName, Contracts.CheckRef(args, nameof(args)).Column, input, TestType) { - Contracts.CheckValue(columns, nameof(columns)); - return columns.Select(x => (x.Input, x.Output)).ToArray(); + Host.AssertNonEmpty(Infos); + Host.Assert(Utils.Size(Infos) == Utils.Size(args.Column)); + + _exes = new ColInfoEx[Infos.Length]; + for (int iinfo = 0; iinfo < _exes.Length; iinfo++) + _exes[iinfo] = new ColInfoEx(args.Column[iinfo], args); + + _ngramMaps = Train(args, input, out _invDocFreqs); + + InitColumnTypeAndMetadata(out _types, out _slotNamesTypes); } - protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCol) + private NgramTransform(IHost host, ModelLoadContext ctx, IDataView input) + : base(host, ctx, input, TestType) { - var type = inputSchema.GetColumnType(srcCol); - if (!NgramCountingEstimator.IsColumnTypeValid(type)) - throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].input, NgramCountingEstimator.ExpectedColumnType, type.ToString()); + Host.AssertValue(ctx); + + // *** Binary format *** + // + // + // for each column + // ColInfoEx + // the ngram SequencePool + // the ngram inverse document frequencies + + _exes = new ColInfoEx[Infos.Length]; + _ngramMaps = new SequencePool[Infos.Length]; + _invDocFreqs = new double[Infos.Length][]; + for (int i = 0; i < Infos.Length; i++) + { + _exes[i] = new ColInfoEx(ctx, ctx.Header.ModelVerWritten >= VerTfIdfSupported); + _ngramMaps[i] = new SequencePool(ctx.Reader); + + if (ctx.Header.ModelVerWritten >= VerTfIdfSupported) + { + _invDocFreqs[i] = ctx.Reader.ReadDoubleArray(); + for (int j = 0; j < Utils.Size(_invDocFreqs[i]); j++) + Host.CheckDecode(_invDocFreqs[i][j] >= 0); + } + } + + InitColumnTypeAndMetadata(out _types, out _slotNamesTypes); } - internal NgramCountingTransformer(IHostEnvironment env, IDataView input, ColumnInfo[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(NgramCountingTransformer)), GetColumnPairs(columns)) + public static NgramTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { - var transformInfos = new TransformInfo[columns.Length]; - for (int i = 0; i < columns.Length; i++) + Contracts.CheckValue(env, nameof(env)); + var h = env.Register(RegistrationName); + h.CheckValue(ctx, nameof(ctx)); + h.CheckValue(input, nameof(input)); + ctx.CheckAtModel(GetVersionInfo()); + return h.Apply("Loading Model", + ch => + { + // *** Binary format *** + // int: sizeof(Float) + // + int cbFloat = ctx.Reader.ReadInt32(); + ch.CheckDecode(cbFloat == sizeof(Float)); + return new NgramTransform(h, ctx, input); + }); + } + + public override void Save(ModelSaveContext ctx) + { + Host.CheckValue(ctx, nameof(ctx)); + ctx.CheckAtModel(); + ctx.SetVersionInfo(GetVersionInfo()); + + // *** Binary format *** + // int: sizeof(Float) + // + // for each added column + // ColInfoEx + // the ngram SequencePool + // the ngram inverse document frequencies + + ctx.Writer.Write(sizeof(Float)); + SaveBase(ctx); + var ngramsNames = default(VBuffer>); + for (int i = 0; i < _exes.Length; i++) { - input.Schema.TryGetColumnIndex(columns[i].Input, out int srcCol); - var typeSrc = input.Schema.GetColumnType(srcCol); - transformInfos[i] = new TransformInfo(columns[i]); + _exes[i].Save(ctx); + _ngramMaps[i].Save(ctx.Writer); + ctx.Writer.WriteDoubleArray(_invDocFreqs[i]); + + if (_slotNamesTypes[i] != null) + { + GetSlotNames(i, ref ngramsNames); + Host.Assert(_ngramMaps[i].Count == ngramsNames.Count); + Host.Assert(ngramsNames.IsDense); + ctx.SaveTextStream(string.Format("{0}-ngrams.txt", Infos[i].Name), + writer => + { + writer.WriteLine("# Number of Ngrams terms = {0}", ngramsNames.Count); + for (int j = 0; j < ngramsNames.Count; j++) + writer.WriteLine("{0}\t{1}", j, ngramsNames.Values[j]); + }); + } } - _transformInfos = transformInfos.ToImmutableArray(); - _ngramMaps = Train(Host, columns, _transformInfos, input, out _invDocFreqs); } - private static SequencePool[] Train(IHostEnvironment env, ColumnInfo[] columns, ImmutableArray transformInfos, IDataView trainingData, out double[][] invDocFreqs) + private static string TestType(ColumnType type) { - var helpers = new NgramBufferBuilder[columns.Length]; - var getters = new ValueGetter>[columns.Length]; - var src = new VBuffer[columns.Length]; + const string reason = "Expected vector of Key type, and Key is convertable to U4"; + Contracts.AssertValue(type); + if (!type.IsVector) + return reason; + if (!type.ItemType.IsKey) + return reason; + // Can only accept key types that can be converted to U4. + if (type.ItemType.KeyCount == 0 && type.ItemType.RawKind > DataKind.U4) + return reason; + return null; + } - // Keep track of how many grams are in the pool for each value of n. Position - // i in _counts counts how many (i+1)-grams are in the pool for column iinfo. - var counts = new int[columns.Length][]; - var ngramMaps = new SequencePool[columns.Length]; - var activeInput = new bool[trainingData.Schema.ColumnCount]; - var srcTypes = new ColumnType[columns.Length]; - var srcCols = new int[columns.Length]; - for (int iinfo = 0; iinfo < columns.Length; iinfo++) + private void InitColumnTypeAndMetadata(out VectorType[] types, out VectorType[] slotNamesTypes) + { + types = new VectorType[Infos.Length]; + slotNamesTypes = new VectorType[Infos.Length]; + + var md = Metadata; + for (int iinfo = 0; iinfo < _exes.Length; iinfo++) + { + types[iinfo] = new VectorType(NumberType.Float, _ngramMaps[iinfo].Count); + var info = Infos[iinfo]; + if (!Source.Schema.HasKeyNames(info.Source, info.TypeSrc.ItemType.KeyCount)) + continue; + + using (var bldr = md.BuildMetadata(iinfo)) + { + if (_ngramMaps[iinfo].Count > 0) + { + slotNamesTypes[iinfo] = new VectorType(TextType.Instance, _ngramMaps[iinfo].Count); + bldr.AddGetter>>(MetadataUtils.Kinds.SlotNames, + slotNamesTypes[iinfo], GetSlotNames); + } + } + } + md.Seal(); + } + + private void GetSlotNames(int iinfo, ref VBuffer> dst) + { + Host.Assert(0 <= iinfo && iinfo < Infos.Length); + Host.Assert(_slotNamesTypes[iinfo] != null); + + var keyCount = Infos[iinfo].TypeSrc.ItemType.KeyCount; + Host.Assert(Source.Schema.HasKeyNames(Infos[iinfo].Source, keyCount)); + + var unigramNames = new VBuffer>(); + + // Get the key values of the unigrams. + Source.Schema.GetMetadata(MetadataUtils.Kinds.KeyValues, Infos[iinfo].Source, ref unigramNames); + Host.Check(unigramNames.Length == keyCount); + + var pool = _ngramMaps[iinfo]; + var values = dst.Values; + + var ngramCount = pool.Count; + if (Utils.Size(values) < ngramCount) + Array.Resize(ref values, ngramCount); + + StringBuilder sb = new StringBuilder(); + uint[] ngram = new uint[_exes[iinfo].NgramLength]; + for (int slot = 0; slot < pool.Count; slot++) { - trainingData.Schema.TryGetColumnIndex(columns[iinfo].Input, out srcCols[iinfo]); - srcTypes[iinfo] = trainingData.Schema[srcCols[iinfo]].Type; - activeInput[srcCols[iinfo]] = true; + var n = pool.GetById(slot, ref ngram); + Host.Assert(n >= 0); + + // Get the unigrams composing the current ngram. + ComposeNgramString(ngram, n, sb, keyCount, + unigramNames.GetItemOrDefault); + values[slot] = sb.ToString().AsMemory(); + } + + dst = new VBuffer>(ngramCount, values, dst.Indices); + } + + private delegate void TermGetter(int index, ref ReadOnlyMemory term); + + private void ComposeNgramString(uint[] ngram, int count, StringBuilder sb, int keyCount, TermGetter termGetter) + { + Host.AssertValue(sb); + Host.AssertValue(ngram); + Host.Assert(keyCount > 0); + + sb.Clear(); + ReadOnlyMemory term = default; + string sep = ""; + for (int iterm = 0; iterm < count; iterm++) + { + sb.Append(sep); + sep = "|"; + var unigram = ngram[iterm]; + if (unigram <= 0 || unigram > keyCount) + sb.Append("*"); + else + { + termGetter((int)unigram - 1, ref term); + sb.AppendMemory(term); + } + } + } + + private SequencePool[] Train(Arguments args, IDataView trainingData, out double[][] invDocFreqs) + { + // Contains the maximum number of grams to store in the dictionary, for each level of ngrams, + // from 1 (in position 0) up to ngramLength (in position ngramLength-1) + var lims = new int[Infos.Length][]; + for (int iinfo = 0; iinfo < Infos.Length; iinfo++) + { + var all = args.Column[iinfo].AllLengths ?? args.AllLengths; + var ngramLength = _exes[iinfo].NgramLength; + var maxNumTerms = Utils.Size(args.Column[iinfo].MaxNumTerms) > 0 ? args.Column[iinfo].MaxNumTerms : args.MaxNumTerms; + if (!all) + { + Host.CheckUserArg(Utils.Size(maxNumTerms) == 0 || + Utils.Size(maxNumTerms) == 1 && maxNumTerms[0] > 0, nameof(args.MaxNumTerms)); + lims[iinfo] = new int[ngramLength]; + lims[iinfo][ngramLength - 1] = Utils.Size(maxNumTerms) == 0 ? Arguments.DefaultMaxTerms : maxNumTerms[0]; + } + else + { + Host.CheckUserArg(Utils.Size(maxNumTerms) <= ngramLength, nameof(args.MaxNumTerms)); + Host.CheckUserArg(Utils.Size(maxNumTerms) == 0 || maxNumTerms.All(i => i >= 0) && maxNumTerms[maxNumTerms.Length - 1] > 0, nameof(args.MaxNumTerms)); + var extend = Utils.Size(maxNumTerms) == 0 ? Arguments.DefaultMaxTerms : maxNumTerms[maxNumTerms.Length - 1]; + lims[iinfo] = Utils.BuildArray(ngramLength, + i => i < Utils.Size(maxNumTerms) ? maxNumTerms[i] : extend); + } } + + var helpers = new NgramBufferBuilder[Infos.Length]; + var getters = new ValueGetter>[Infos.Length]; + var src = new VBuffer[Infos.Length]; + + // Keep track of how many grams are in the pool for each value of n. Position + // i in _counts counts how many (i+1)-grams are in the pool for column iinfo. + var counts = new int[Infos.Length][]; + var ngramMaps = new SequencePool[Infos.Length]; + bool[] activeInput = new bool[trainingData.Schema.ColumnCount]; + foreach (var info in Infos) + activeInput[info.Source] = true; using (var cursor = trainingData.GetRowCursor(col => activeInput[col])) - using (var pch = env.StartProgressChannel("Building n-gram dictionary")) + using (var pch = Host.StartProgressChannel("Building n-gram dictionary")) { - for (int iinfo = 0; iinfo < columns.Length; iinfo++) + for (int iinfo = 0; iinfo < Infos.Length; iinfo++) { - env.Assert(srcTypes[iinfo].IsVector && srcTypes[iinfo].ItemType.IsKey); - var ngramLength = columns[iinfo].NgramLength; - var skipLength = columns[iinfo].SkipLength; + Host.Assert(Infos[iinfo].TypeSrc.IsVector && Infos[iinfo].TypeSrc.ItemType.IsKey); + var ngramLength = _exes[iinfo].NgramLength; + var skipLength = _exes[iinfo].SkipLength; - getters[iinfo] = RowCursorUtils.GetVecGetterAs(NumberType.U4, cursor, srcCols[iinfo]); - src[iinfo] = default; + getters[iinfo] = RowCursorUtils.GetVecGetterAs(NumberType.U4, cursor, Infos[iinfo].Source); + src[iinfo] = default(VBuffer); counts[iinfo] = new int[ngramLength]; ngramMaps[iinfo] = new SequencePool(); // Note: GetNgramIdFinderAdd will control how many ngrams of a specific length will // be added (using lims[iinfo]), therefore we set slotLim to the maximum helpers[iinfo] = new NgramBufferBuilder(ngramLength, skipLength, Utils.ArrayMaxSize, - GetNgramIdFinderAdd(env, counts[iinfo], columns[iinfo].Limits, ngramMaps[iinfo], transformInfos[iinfo].RequireIdf)); + GetNgramIdFinderAdd(counts[iinfo], lims[iinfo], ngramMaps[iinfo], _exes[iinfo].RequireIdf(), Host)); } int cInfoFull = 0; - bool[] infoFull = new bool[columns.Length]; + bool[] infoFull = new bool[Infos.Length]; - invDocFreqs = new double[columns.Length][]; + invDocFreqs = new double[Infos.Length][]; long totalDocs = 0; - var rowCount = trainingData.GetRowCount() ?? double.NaN; - var buffers = new VBuffer[columns.Length]; + Double rowCount = trainingData.GetRowCount(true) ?? Double.NaN; + var buffers = new VBuffer[Infos.Length]; pch.SetHeader(new ProgressHeader(new[] { "Total n-grams" }, new[] { "documents" }), e => e.SetProgress(0, totalDocs, rowCount)); - while (cInfoFull < columns.Length && cursor.MoveNext()) + while (cInfoFull < Infos.Length && cursor.MoveNext()) { totalDocs++; - for (int iinfo = 0; iinfo < columns.Length; iinfo++) + for (int iinfo = 0; iinfo < Infos.Length; iinfo++) { getters[iinfo](ref src[iinfo]); - var keyCount = (uint)srcTypes[iinfo].ItemType.KeyCount; + var keyCount = (uint)Infos[iinfo].TypeSrc.ItemType.KeyCount; if (keyCount == 0) keyCount = uint.MaxValue; if (!infoFull[iinfo]) { - if (transformInfos[iinfo].RequireIdf) + if (_exes[iinfo].RequireIdf()) helpers[iinfo].Reset(); helpers[iinfo].AddNgrams(in src[iinfo], 0, keyCount); - if (transformInfos[iinfo].RequireIdf) + if (_exes[iinfo].RequireIdf()) { int totalNgrams = counts[iinfo].Sum(); Utils.EnsureSize(ref invDocFreqs[iinfo], totalNgrams); @@ -364,25 +526,25 @@ private static SequencePool[] Train(IHostEnvironment env, ColumnInfo[] columns, } } } - AssertValid(env, counts[iinfo], columns[iinfo].Limits, ngramMaps[iinfo]); + AssertValid(counts[iinfo], lims[iinfo], ngramMaps[iinfo]); } } pch.Checkpoint(counts.Sum(c => c.Sum()), totalDocs); - for (int iinfo = 0; iinfo < columns.Length; iinfo++) + for (int iinfo = 0; iinfo < Infos.Length; iinfo++) { for (int i = 0; i < Utils.Size(invDocFreqs[iinfo]); i++) if (invDocFreqs[iinfo][i] != 0) invDocFreqs[iinfo][i] = Math.Log(totalDocs / invDocFreqs[iinfo][i]); } - for (int iinfo = 0; iinfo < columns.Length; iinfo++) + for (int iinfo = 0; iinfo < Infos.Length; iinfo++) { - AssertValid(env, counts[iinfo], columns[iinfo].Limits, ngramMaps[iinfo]); + AssertValid(counts[iinfo], lims[iinfo], ngramMaps[iinfo]); - int ngramLength = transformInfos[iinfo].NgramLength; + int ngramLength = _exes[iinfo].NgramLength; for (int i = 0; i < ngramLength; i++) - transformInfos[iinfo].NonEmptyLevels[i] = counts[iinfo][i] > 0; + _exes[iinfo].NonEmptyLevels[i] = counts[iinfo][i] > 0; } return ngramMaps; @@ -390,36 +552,36 @@ private static SequencePool[] Train(IHostEnvironment env, ColumnInfo[] columns, } [Conditional("DEBUG")] - private static void AssertValid(IHostEnvironment env, int[] counts, ImmutableArray lims, SequencePool pool) + private void AssertValid(int[] counts, int[] lims, SequencePool pool) { int count = 0; int countFull = 0; for (int i = 0; i < lims.Length; i++) { - env.Assert(counts[i] >= 0); - env.Assert(counts[i] <= lims[i]); + Host.Assert(counts[i] >= 0); + Host.Assert(counts[i] <= lims[i]); if (counts[i] == lims[i]) countFull++; count += counts[i]; } - env.Assert(count == pool.Count); + Host.Assert(count == pool.Count); } - private static NgramIdFinder GetNgramIdFinderAdd(IHostEnvironment env, int[] counts, ImmutableArray lims, SequencePool pool, bool requireIdf) + private static NgramIdFinder GetNgramIdFinderAdd(int[] counts, int[] lims, SequencePool pool, bool requireIdf, IHost host) { - Contracts.AssertValue(env); - env.Assert(lims.Length > 0); - env.Assert(lims.Length == Utils.Size(counts)); + Contracts.AssertValue(host); + host.Assert(Utils.Size(lims) > 0); + host.Assert(Utils.Size(lims) == Utils.Size(counts)); int numFull = lims.Count(l => l <= 0); int ngramLength = lims.Length; return (uint[] ngram, int lim, int icol, ref bool more) => { - env.Assert(0 < lim && lim <= Utils.Size(ngram)); - env.Assert(lim <= Utils.Size(counts)); - env.Assert(lim <= lims.Length); - env.Assert(icol == 0); + host.Assert(0 < lim && lim <= Utils.Size(ngram)); + host.Assert(lim <= Utils.Size(counts)); + host.Assert(lim <= Utils.Size(lims)); + host.Assert(icol == 0); var max = lim - 1; int slot = -1; @@ -438,443 +600,101 @@ private static NgramIdFinder GetNgramIdFinderAdd(IHostEnvironment env, int[] cou }; } - // Factory method for SignatureLoadDataTransform. - private static IDataTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) - => Create(env, ctx).MakeDataTransform(input); - - // Factory method for SignatureLoadRowMapper. - private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISchema inputSchema) - => Create(env, ctx).MakeRowMapper(Schema.Create(inputSchema)); - - private NgramCountingTransformer(IHost host, ModelLoadContext ctx) : - base(host, ctx) + private NgramIdFinder GetNgramIdFinder(int iinfo) { - var columnsLength = ColumnPairs.Length; - // *** Binary format *** - // - // - // for each column - // _transformInfo - // the ngram SequencePool - // the ngram inverse document frequencies - var transformInfos = new TransformInfo[columnsLength]; - _ngramMaps = new SequencePool[columnsLength]; - _invDocFreqs = new double[columnsLength][]; - for (int i = 0; i < columnsLength; i++) - { - transformInfos[i] = new TransformInfo(ctx, ctx.Header.ModelVerWritten >= VerTfIdfSupported); - _ngramMaps[i] = new SequencePool(ctx.Reader); - - if (ctx.Header.ModelVerWritten >= VerTfIdfSupported) + return + (uint[] ngram, int lim, int icol, ref bool more) => { - _invDocFreqs[i] = ctx.Reader.ReadDoubleArray(); - for (int j = 0; j < Utils.Size(_invDocFreqs[i]); j++) - Host.CheckDecode(_invDocFreqs[i][j] >= 0); - } - } - _transformInfos = transformInfos.ToImmutableArray(); - } - - // Factory method for SignatureDataTransform. - internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDataView input) - { - Contracts.CheckValue(env, nameof(env)); - env.CheckValue(args, nameof(args)); - env.CheckValue(input, nameof(input)); - - env.CheckValue(args.Column, nameof(args.Column)); - var cols = new ColumnInfo[args.Column.Length]; - using (var ch = env.Start("ValidateArgs")) - { + Host.Assert(0 < lim && lim <= Utils.Size(ngram)); + Host.Assert(lim <= Utils.Size(_exes[iinfo].NonEmptyLevels)); - for (int i = 0; i < cols.Length; i++) - { - var item = args.Column[i]; - var maxNumTerms = Utils.Size(item.MaxNumTerms) > 0 ? item.MaxNumTerms : args.MaxNumTerms; - cols[i] = new ColumnInfo(item.Source ?? item.Name, - item.Name, - item.NgramLength ?? args.NgramLength, - item.SkipLength ?? args.SkipLength, - item.AllLengths ?? args.AllLengths, - item.Weighting ?? args.Weighting, - maxNumTerms); + if (!_exes[iinfo].NonEmptyLevels[lim - 1]) + return -1; + return _ngramMaps[iinfo].Get(ngram, 0, lim); }; - } - return new NgramCountingTransformer(env, input, cols).MakeDataTransform(input); - } - - // Factory method for SignatureLoadModel. - private static NgramCountingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) - { - Contracts.CheckValue(env, nameof(env)); - var host = env.Register(nameof(NgramCountingTransformer)); - - host.CheckValue(ctx, nameof(ctx)); - ctx.CheckAtModel(GetVersionInfo()); - if (ctx.Header.ModelVerWritten < 0x00010003) - { - int cbFloat = ctx.Reader.ReadInt32(); - env.CheckDecode(cbFloat == sizeof(float)); - } - return new NgramCountingTransformer(host, ctx); } - public override void Save(ModelSaveContext ctx) + protected override ColumnType GetColumnTypeCore(int iinfo) { - Host.CheckValue(ctx, nameof(ctx)); - ctx.CheckAtModel(); - ctx.SetVersionInfo(GetVersionInfo()); - // *** Binary format *** - // - // for each added column - // _transformInfo - // the ngram SequencePool - // the ngram inverse document frequencies - SaveColumns(ctx); - for (int i = 0; i < _transformInfos.Length; i++) - { - _transformInfos[i].Save(ctx); - _ngramMaps[i].Save(ctx.Writer); - ctx.Writer.WriteDoubleArray(_invDocFreqs[i]); - } + Host.Check(0 <= iinfo & iinfo < Infos.Length); + return _types[iinfo]; } - protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - - private sealed class Mapper : OneToOneMapperBase + protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, out Action disposer) { - private readonly ColumnType[] _srcTypes; - private readonly int[] _srcCols; - private readonly ColumnType[] _types; - private readonly NgramCountingTransformer _parent; - - public Mapper(NgramCountingTransformer parent, Schema inputSchema) - : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) + Host.AssertValueOrNull(ch); + Host.AssertValue(input); + Host.Assert(0 <= iinfo && iinfo < Infos.Length); + Host.Assert(Infos[iinfo].TypeSrc.IsVector); + Host.Assert(Infos[iinfo].TypeSrc.ItemType.IsKey); + + disposer = null; + + var getSrc = RowCursorUtils.GetVecGetterAs(NumberType.U4, input, Infos[iinfo].Source); + var src = default(VBuffer); + var bldr = new NgramBufferBuilder(_exes[iinfo].NgramLength, _exes[iinfo].SkipLength, + _ngramMaps[iinfo].Count, GetNgramIdFinder(iinfo)); + var keyCount = (uint)Infos[iinfo].TypeSrc.ItemType.KeyCount; + if (keyCount == 0) + keyCount = uint.MaxValue; + + ValueGetter> del; + switch (_exes[iinfo].Weighting) { - _parent = parent; - _types = new ColumnType[_parent.ColumnPairs.Length]; - _srcTypes = new ColumnType[_parent.ColumnPairs.Length]; - _srcCols = new int[_parent.ColumnPairs.Length]; - for (int i = 0; i < _parent.ColumnPairs.Length; i++) - { - _types[i] = new VectorType(NumberType.Float, _parent._ngramMaps[i].Count); - inputSchema.TryGetColumnIndex(_parent.ColumnPairs[i].input, out _srcCols[i]); - _srcTypes[i] = inputSchema.GetColumnType(_srcCols[i]); - } - } - - protected override Schema.Column[] GetOutputColumnsCore() - { - var result = new Schema.Column[_parent.ColumnPairs.Length]; - for (int i = 0; i < _parent.ColumnPairs.Length; i++) - { - var builder = new Schema.Metadata.Builder(); - AddMetadata(i, builder); - - result[i] = new Schema.Column(_parent.ColumnPairs[i].output, _types[i], builder.GetMetadata()); - } - return result; - } - - private void AddMetadata(int iinfo, Schema.Metadata.Builder builder) - { - if (InputSchema.HasKeyValues(_srcCols[iinfo], _srcTypes[iinfo].ItemType.KeyCount)) - { - ValueGetter>> getter = (ref VBuffer> dst) => - { - GetSlotNames(iinfo, _parent._ngramMaps[iinfo].Count, ref dst); - }; - - var slotNamesType = new VectorType(TextType.Instance, _parent._ngramMaps[iinfo].Count); - builder.AddSlotNames(_parent._ngramMaps[iinfo].Count, getter); - } - } - - private void GetSlotNames(int iinfo, int size, ref VBuffer> dst) - { - Host.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); - - var keyCount = _srcTypes[iinfo].ItemType.KeyCount; - Host.Assert(InputSchema.HasKeyValues(_srcCols[iinfo], keyCount)); - - var unigramNames = new VBuffer>(); - - // Get the key values of the unigrams. - InputSchema.GetMetadata(MetadataUtils.Kinds.KeyValues, _srcCols[iinfo], ref unigramNames); - Host.Check(unigramNames.Length == keyCount); - - var pool = _parent._ngramMaps[iinfo]; - - var ngramCount = pool.Count; - var dstEditor = VBufferEditor.Create(ref dst, ngramCount); - - StringBuilder sb = new StringBuilder(); - uint[] ngram = new uint[_parent._transformInfos[iinfo].NgramLength]; - for (int slot = 0; slot < pool.Count; slot++) - { - var n = pool.GetById(slot, ref ngram); - Host.Assert(n >= 0); - - // Get the unigrams composing the current ngram. - ComposeNgramString(ngram, n, sb, keyCount, - unigramNames.GetItemOrDefault); - dstEditor.Values[slot] = sb.ToString().AsMemory(); - } - - dst = dstEditor.Commit(); - } - - private delegate void TermGetter(int index, ref ReadOnlyMemory term); - - private void ComposeNgramString(uint[] ngram, int count, StringBuilder sb, int keyCount, TermGetter termGetter) - { - Host.AssertValue(sb); - Host.AssertValue(ngram); - Host.Assert(keyCount > 0); - - sb.Clear(); - ReadOnlyMemory term = default; - string sep = ""; - for (int iterm = 0; iterm < count; iterm++) - { - sb.Append(sep); - sep = "|"; - var unigram = ngram[iterm]; - if (unigram <= 0 || unigram > keyCount) - sb.Append("*"); - else - { - termGetter((int)unigram - 1, ref term); - sb.AppendMemory(term); - } - } - } - - private NgramIdFinder GetNgramIdFinder(int iinfo) - { - return - (uint[] ngram, int lim, int icol, ref bool more) => - { - Host.Assert(0 < lim && lim <= Utils.Size(ngram)); - Host.Assert(lim <= Utils.Size(_parent._transformInfos[iinfo].NonEmptyLevels)); - - if (!_parent._transformInfos[iinfo].NonEmptyLevels[lim - 1]) - return -1; - return _parent._ngramMaps[iinfo].Get(ngram, 0, lim); - }; - } - - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) - { - Contracts.AssertValue(input); - Contracts.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); - disposer = null; - - var getSrc = RowCursorUtils.GetVecGetterAs(NumberType.U4, input, _srcCols[iinfo]); - var src = default(VBuffer); - var bldr = new NgramBufferBuilder(_parent._transformInfos[iinfo].NgramLength, _parent._transformInfos[iinfo].SkipLength, - _parent._ngramMaps[iinfo].Count, GetNgramIdFinder(iinfo)); - var keyCount = (uint)_srcTypes[iinfo].ItemType.KeyCount; - if (keyCount == 0) - keyCount = uint.MaxValue; - - ValueGetter> del; - switch (_parent._transformInfos[iinfo].Weighting) - { - case NgramCountingEstimator.WeightingCriteria.TfIdf: - Host.AssertValue(_parent._invDocFreqs[iinfo]); - del = - (ref VBuffer dst) => + case WeightingCriteria.TfIdf: + Host.AssertValue(_invDocFreqs[iinfo]); + del = + (ref VBuffer dst) => + { + getSrc(ref src); + if (!bldr.IsEmpty) { - getSrc(ref src); - if (!bldr.IsEmpty) - { - bldr.Reset(); - bldr.AddNgrams(in src, 0, keyCount); - bldr.GetResult(ref dst); - VBufferUtils.Apply(ref dst, (int i, ref float v) => v = (float)(v * _parent._invDocFreqs[iinfo][i])); - } - else - VBufferUtils.Resize(ref dst, 0); - }; - break; - case NgramCountingEstimator.WeightingCriteria.Idf: - Host.AssertValue(_parent._invDocFreqs[iinfo]); - del = - (ref VBuffer dst) => + bldr.Reset(); + bldr.AddNgrams(in src, 0, keyCount); + bldr.GetResult(ref dst); + VBufferUtils.Apply(ref dst, (int i, ref Float v) => v = (Float)(v * _invDocFreqs[iinfo][i])); + } + else + dst = new VBuffer(0, dst.Values, dst.Indices); + }; + break; + case WeightingCriteria.Idf: + Host.AssertValue(_invDocFreqs[iinfo]); + del = + (ref VBuffer dst) => + { + getSrc(ref src); + if (!bldr.IsEmpty) { - getSrc(ref src); - if (!bldr.IsEmpty) - { - bldr.Reset(); - bldr.AddNgrams(in src, 0, keyCount); - bldr.GetResult(ref dst); - VBufferUtils.Apply(ref dst, (int i, ref float v) => v = v >= 1 ? (float)_parent._invDocFreqs[iinfo][i] : 0); - } - else - VBufferUtils.Resize(ref dst, 0); - }; - break; - case NgramCountingEstimator.WeightingCriteria.Tf: - del = - (ref VBuffer dst) => + bldr.Reset(); + bldr.AddNgrams(in src, 0, keyCount); + bldr.GetResult(ref dst); + VBufferUtils.Apply(ref dst, (int i, ref Float v) => v = v >= 1 ? (Float)_invDocFreqs[iinfo][i] : 0); + } + else + dst = new VBuffer(0, dst.Values, dst.Indices); + }; + break; + case WeightingCriteria.Tf: + del = + (ref VBuffer dst) => + { + getSrc(ref src); + if (!bldr.IsEmpty) { - getSrc(ref src); - if (!bldr.IsEmpty) - { - bldr.Reset(); - bldr.AddNgrams(in src, 0, keyCount); - bldr.GetResult(ref dst); - } - else - VBufferUtils.Resize(ref dst, 0); - }; - break; - default: - throw Host.Except("Unsupported weighting criteria"); - } - return del; + bldr.Reset(); + bldr.AddNgrams(in src, 0, keyCount); + bldr.GetResult(ref dst); + } + else + dst = new VBuffer(0, dst.Values, dst.Indices); + }; + break; + default: + throw Host.Except("Unsupported weighting criteria"); } - } - } - /// - /// Produces a bag of counts of ngrams(sequences of consecutive values of length 1-n) in a given vector of keys. - /// It does so by building a dictionary of ngrams and using the id in the dictionary as the index in the bag. - /// - public sealed class NgramCountingEstimator : IEstimator - { - /// - /// Weighting criteria: a statistical measure used to evaluate how important a word is to a document in a corpus. - /// This enumeration is serialized. - /// - public enum WeightingCriteria - { - [EnumValueDisplay("TF (Term Frequency)")] - Tf = 0, - - [EnumValueDisplay("IDF (Inverse Document Frequency)")] - Idf = 1, - - [EnumValueDisplay("TF-IDF")] - TfIdf = 2 - } - - internal static class Defaults - { - public const int NgramLength = 2; - public const bool AllLength = true; - public const int SkipLength = 0; - public const int MaxNumTerms = 10000000; - public const WeightingCriteria Weighting = WeightingCriteria.Tf; - } - - private readonly IHost _host; - private readonly NgramCountingTransformer.ColumnInfo[] _columns; - - /// - /// Produces a bag of counts of ngrams (sequences of consecutive words) in - /// and outputs bag of word vector as - /// - /// The environment. - /// The column containing text to compute bag of word vector. - /// The column containing bag of word vector. Null means is replaced. - /// Ngram length. - /// Maximum number of tokens to skip when constructing an ngram. - /// Whether to include all ngram lengths up to or only . - /// Maximum number of ngrams to store in the dictionary. - /// Statistical measure used to evaluate how important a word is to a document in a corpus. - public NgramCountingEstimator(IHostEnvironment env, - string inputColumn, - string outputColumn = null, - int ngramLength = Defaults.NgramLength, - int skipLength = Defaults.SkipLength, - bool allLengths = Defaults.AllLength, - int maxNumTerms = Defaults.MaxNumTerms, - WeightingCriteria weighting = Defaults.Weighting) - : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, ngramLength, skipLength, allLengths, maxNumTerms, weighting) - { - } - - /// - /// Produces a bag of counts of ngrams (sequences of consecutive words) in - /// and outputs bag of word vector for each output in - /// - /// The environment. - /// Pairs of columns to compute bag of word vector. - /// Ngram length. - /// Maximum number of tokens to skip when constructing an ngram. - /// Whether to include all ngram lengths up to or only . - /// Maximum number of ngrams to store in the dictionary. - /// Statistical measure used to evaluate how important a word is to a document in a corpus. - public NgramCountingEstimator(IHostEnvironment env, - (string input, string output)[] columns, - int ngramLength = Defaults.NgramLength, - int skipLength = Defaults.SkipLength, - bool allLengths = Defaults.AllLength, - int maxNumTerms = Defaults.MaxNumTerms, - WeightingCriteria weighting = Defaults.Weighting) - : this(env, columns.Select(x => new NgramCountingTransformer.ColumnInfo(x.input, x.output, ngramLength, skipLength, allLengths, weighting, maxNumTerms)).ToArray()) - { - } - - /// - /// Produces a bag of counts of ngrams (sequences of consecutive words) in - /// and outputs bag of word vector for each output in - /// - /// The environment. - /// Array of columns with information how to transform data. - public NgramCountingEstimator(IHostEnvironment env, params NgramCountingTransformer.ColumnInfo[] columns) - { - Contracts.CheckValue(env, nameof(env)); - _host = env.Register(nameof(NgramCountingEstimator)); - _columns = columns; - } - - public NgramCountingTransformer Fit(IDataView input) => new NgramCountingTransformer(_host, input, _columns); - - internal static bool IsColumnTypeValid(ColumnType type) - { - if (!type.IsVector) - return false; - if (!type.ItemType.IsKey) - return false; - // Can only accept key types that can be converted to U4. - if (type.ItemType.KeyCount == 0 && type.ItemType.RawKind > DataKind.U4) - return false; - return true; - } - - internal static bool IsSchemaColumnValid(SchemaShape.Column col) - { - if (col.Kind == SchemaShape.Column.VectorKind.Scalar) - return false; - if (!col.IsKey) - return false; - // Can only accept key types that can be converted to U4. - if (col.ItemType.RawKind > DataKind.U4) - return false; - return true; - } - - internal const string ExpectedColumnType = "Expected vector of Key type, and Key is convertable to U4"; - - public SchemaShape GetOutputSchema(SchemaShape inputSchema) - { - _host.CheckValue(inputSchema, nameof(inputSchema)); - var result = inputSchema.Columns.ToDictionary(x => x.Name); - foreach (var colInfo in _columns) - { - if (!inputSchema.TryFindColumn(colInfo.Input, out var col)) - throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.Input); - if (!IsSchemaColumnValid(col)) - throw _host.ExceptSchemaMismatch(nameof(inputSchema), "input", colInfo.Input, ExpectedColumnType, col.GetTypeString()); - var metadata = new List(); - if (col.HasKeyValues()) - metadata.Add(new SchemaShape.Column(MetadataUtils.Kinds.SlotNames, SchemaShape.Column.VectorKind.Vector, TextType.Instance, false)); - result[colInfo.Output] = new SchemaShape.Column(colInfo.Output, SchemaShape.Column.VectorKind.Vector, NumberType.R4, false, new SchemaShape(metadata)); - } - return new SchemaShape(result.Values); + return del; } } } diff --git a/src/Microsoft.ML.Transforms/Text/NgramUtils.cs b/src/Microsoft.ML.Transforms/Text/NgramUtils.cs index 38bc6333e8..7a0db6d8bd 100644 --- a/src/Microsoft.ML.Transforms/Text/NgramUtils.cs +++ b/src/Microsoft.ML.Transforms/Text/NgramUtils.cs @@ -73,13 +73,12 @@ public bool AddNgrams(in VBuffer src, int icol, uint keyMax) Contracts.Assert(icol >= 0); Contracts.Assert(keyMax > 0); - var srcValues = src.GetValues(); uint curKey = 0; if (src.IsDense) { for (int i = 0; i < src.Length; i++) { - curKey = srcValues[i]; + curKey = src.Values[i]; if (curKey > keyMax) curKey = 0; @@ -93,14 +92,13 @@ public bool AddNgrams(in VBuffer src, int icol, uint keyMax) else { var queueSize = _queue.Capacity; - var srcIndices = src.GetIndices(); int iindex = 0; for (int i = 0; i < src.Length; i++) { - if (iindex < srcIndices.Length && i == srcIndices[iindex]) + if (iindex < src.Count && i == src.Indices[iindex]) { - curKey = srcValues[iindex]; + curKey = src.Values[iindex]; if (curKey > keyMax) curKey = 0; iindex++; diff --git a/src/Microsoft.ML.Transforms/Text/SentimentAnalyzingTransform.cs b/src/Microsoft.ML.Transforms/Text/SentimentAnalyzerTransform.cs similarity index 82% rename from src/Microsoft.ML.Transforms/Text/SentimentAnalyzingTransform.cs rename to src/Microsoft.ML.Transforms/Text/SentimentAnalyzerTransform.cs index 343bb3cb22..785ef7234d 100644 --- a/src/Microsoft.ML.Transforms/Text/SentimentAnalyzingTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/SentimentAnalyzerTransform.cs @@ -12,13 +12,13 @@ using System.Collections.Generic; using System.Linq; -[assembly: LoadableClass(TextFeaturizingEstimator.Summary, typeof(IDataTransform), typeof(SentimentAnalyzingTransformer), typeof(SentimentAnalyzingTransformer.Arguments), typeof(SignatureDataTransform), - SentimentAnalyzingTransformer.UserName, "SentimentAnalyzingTransform", SentimentAnalyzingTransformer.LoaderSignature, SentimentAnalyzingTransformer.ShortName, DocName = "transform/SentimentAnalyzingTransform.md")] +[assembly: LoadableClass(TextFeaturizingEstimator.Summary, typeof(IDataTransform), typeof(SentimentAnalyzingTransform), typeof(SentimentAnalyzingTransform.Arguments), typeof(SignatureDataTransform), + SentimentAnalyzingTransform.UserName, "SentimentAnalyzingTransform", SentimentAnalyzingTransform.LoaderSignature, SentimentAnalyzingTransform.ShortName, DocName = "transform/SentimentAnalyzingTransform.md")] namespace Microsoft.ML.Transforms.Text { /// - public static class SentimentAnalyzingTransformer + public static class SentimentAnalyzingTransform { public sealed class Arguments : TransformInputBase { @@ -59,7 +59,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV if (string.IsNullOrWhiteSpace(args.Name)) args.Name = args.Source; - var file = Utils.FindExistentFileOrNull("pretrained.model", "Sentiment", assemblyForBasePath: typeof(SentimentAnalyzingTransformer)); + var file = Utils.FindExistentFileOrNull("pretrained.model", "Sentiment", assemblyForBasePath: typeof(SentimentAnalyzingTransform)); if (file == null) { throw h.Except("resourcePath", "Missing resource for SentimentAnalyzingTransform."); @@ -79,7 +79,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV // 2. Copy source column to a column with the name expected by the pretrained model featurization // transform pipeline. - var copyTransformer = new ColumnsCopyingTransformer(env, (args.Source, ModelInputColumnName)); + var copyTransformer = new CopyColumnsTransform(env, (args.Source, ModelInputColumnName)); input = copyTransformer.Transform(input); @@ -88,12 +88,12 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV // 4. Copy the output column from the pretrained model to a temporary column. var scoreTempName = input.Schema.GetTempColumnName("sa_out"); - copyTransformer = new ColumnsCopyingTransformer(env, (ModelScoreColumnName, scoreTempName)); + copyTransformer = new CopyColumnsTransform(env, (ModelScoreColumnName, scoreTempName)); input = copyTransformer.Transform(input); // 5. Drop all the columns created by the pretrained model, including the expected input column // and the output column, which we have copied to a temporary column in (4). - input = ColumnSelectingTransformer.CreateDrop(env, input, _modelIntermediateColumnNames); + input = SelectColumnsTransform.CreateDrop(env, input, _modelIntermediateColumnNames); // 6. Unalias all the original columns that were originally present in the IDataView, but may have // been shadowed by column names in the pretrained model. This method will also drop all the temporary @@ -101,11 +101,11 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV input = UnaliasIfNeeded(env, input, aliased); // 7. Copy the temporary column with the score we created in (4) to a column with the user-specified destination name. - copyTransformer = new ColumnsCopyingTransformer(env, (scoreTempName, args.Name)); + copyTransformer = new CopyColumnsTransform(env, (scoreTempName, args.Name)); input = copyTransformer.Transform(input); // 8. Drop the temporary column with the score created in (4). - return ColumnSelectingTransformer.CreateDrop(env, input, scoreTempName); + return SelectColumnsTransform.CreateDrop(env, input, scoreTempName); } /// @@ -130,9 +130,9 @@ private static IDataView AliasIfNeeded(IHostEnvironment env, IDataView input, st hiddenNames = toHide.Select(colName => new KeyValuePair(colName, input.Schema.GetTempColumnName(colName))).ToArray(); - return ColumnsCopyingTransformer.Create(env, new ColumnsCopyingTransformer.Arguments() + return CopyColumnsTransform.Create(env, new CopyColumnsTransform.Arguments() { - Column = hiddenNames.Select(pair => new ColumnsCopyingTransformer.Column() { Name = pair.Value, Source = pair.Key }).ToArray() + Column = hiddenNames.Select(pair => new CopyColumnsTransform.Column() { Name = pair.Value, Source = pair.Key }).ToArray() }, input); } @@ -141,12 +141,12 @@ private static IDataView UnaliasIfNeeded(IHostEnvironment env, IDataView input, if (Utils.Size(hiddenNames) == 0) return input; - input = ColumnsCopyingTransformer.Create(env, new ColumnsCopyingTransformer.Arguments() + input = CopyColumnsTransform.Create(env, new CopyColumnsTransform.Arguments() { - Column = hiddenNames.Select(pair => new ColumnsCopyingTransformer.Column() { Name = pair.Key, Source = pair.Value }).ToArray() + Column = hiddenNames.Select(pair => new CopyColumnsTransform.Column() { Name = pair.Key, Source = pair.Value }).ToArray() }, input); - return ColumnSelectingTransformer.CreateDrop(env, input, hiddenNames.Select(pair => pair.Value).ToArray()); + return SelectColumnsTransform.CreateDrop(env, input, hiddenNames.Select(pair => pair.Value).ToArray()); } private static IDataView LoadTransforms(IHostEnvironment env, IDataView input, string modelFile) diff --git a/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs b/src/Microsoft.ML.Transforms/Text/StopWordsRemoverTransform.cs similarity index 91% rename from src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs rename to src/Microsoft.ML.Transforms/Text/StopWordsRemoverTransform.cs index 9c2c58b4e8..98300ebb08 100644 --- a/src/Microsoft.ML.Transforms/Text/StopWordsRemovingTransformer.cs +++ b/src/Microsoft.ML.Transforms/Text/StopWordsRemoverTransform.cs @@ -20,26 +20,26 @@ using System.Text; using System.Threading; -[assembly: LoadableClass(StopWordsRemovingTransformer.Summary, typeof(StopWordsRemovingTransformer), typeof(StopWordsRemovingTransformer.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(StopWordsRemoverTransform.Summary, typeof(StopWordsRemoverTransform), typeof(StopWordsRemoverTransform.Arguments), typeof(SignatureDataTransform), "Stopwords Remover Transform", "StopWordsRemoverTransform", "StopWordsRemover", "StopWords")] -[assembly: LoadableClass(StopWordsRemovingTransformer.Summary, typeof(StopWordsRemovingTransformer), null, typeof(SignatureStopWordsRemoverTransform), +[assembly: LoadableClass(StopWordsRemoverTransform.Summary, typeof(StopWordsRemoverTransform), null, typeof(SignatureStopWordsRemoverTransform), "Predefined Stopwords List Remover", "PredefinedStopWordsRemoverTransform", "PredefinedStopWordsRemover", "PredefinedStopWords", "Predefined")] -[assembly: LoadableClass(StopWordsRemovingTransformer.Summary, typeof(StopWordsRemovingTransformer), null, typeof(SignatureLoadDataTransform), - "Stopwords Remover Transform", StopWordsRemovingTransformer.LoaderSignature)] +[assembly: LoadableClass(StopWordsRemoverTransform.Summary, typeof(StopWordsRemoverTransform), null, typeof(SignatureLoadDataTransform), + "Stopwords Remover Transform", StopWordsRemoverTransform.LoaderSignature)] -[assembly: LoadableClass(CustomStopWordsRemovingTransformer.Summary, typeof(CustomStopWordsRemovingTransformer), typeof(CustomStopWordsRemovingTransformer.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(CustomStopWordsRemoverTransform.Summary, typeof(CustomStopWordsRemoverTransform), typeof(CustomStopWordsRemoverTransform.Arguments), typeof(SignatureDataTransform), "Custom Stopwords Remover Transform", "CustomStopWordsRemoverTransform", "CustomStopWords")] -[assembly: LoadableClass(CustomStopWordsRemovingTransformer.Summary, typeof(CustomStopWordsRemovingTransformer), typeof(CustomStopWordsRemovingTransformer.LoaderArguments), +[assembly: LoadableClass(CustomStopWordsRemoverTransform.Summary, typeof(CustomStopWordsRemoverTransform), typeof(CustomStopWordsRemoverTransform.LoaderArguments), typeof(SignatureStopWordsRemoverTransform), "Custom Stopwords Remover Transform", "CustomStopWordsRemoverTransform", "CustomStopWords", "Custom")] -[assembly: LoadableClass(CustomStopWordsRemovingTransformer.Summary, typeof(CustomStopWordsRemovingTransformer), null, typeof(SignatureLoadDataTransform), - "Custom Stopwords Remover Transform", CustomStopWordsRemovingTransformer.LoaderSignature)] +[assembly: LoadableClass(CustomStopWordsRemoverTransform.Summary, typeof(CustomStopWordsRemoverTransform), null, typeof(SignatureLoadDataTransform), + "Custom Stopwords Remover Transform", CustomStopWordsRemoverTransform.LoaderSignature)] [assembly: EntryPointModule(typeof(PredefinedStopWordsRemoverFactory))] -[assembly: EntryPointModule(typeof(CustomStopWordsRemovingTransformer.LoaderArguments))] +[assembly: EntryPointModule(typeof(CustomStopWordsRemoverTransform.LoaderArguments))] namespace Microsoft.ML.Transforms.Text { @@ -59,7 +59,7 @@ public sealed class PredefinedStopWordsRemoverFactory : IStopWordsRemoverFactory { public IStopWordsRemoverTransform CreateComponent(IHostEnvironment env, IDataView input, OneToOneColumn[] column) { - return new StopWordsRemovingTransformer(env, input, column); + return new StopWordsRemoverTransform(env, input, column); } } @@ -69,7 +69,7 @@ public IStopWordsRemoverTransform CreateComponent(IHostEnvironment env, IDataVie /// The transform is usually applied after tokenizing text, so it compares individual tokens /// (case-insensitive comparison) to the stopwords. /// - public sealed class StopWordsRemovingTransformer : OneToOneTransformBase, IStopWordsRemoverTransform + public sealed class StopWordsRemoverTransform : OneToOneTransformBase, IStopWordsRemoverTransform { /// /// Stopwords language. This enumeration is serialized. @@ -236,7 +236,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(StopWordsRemovingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(StopWordsRemoverTransform).Assembly.FullName); } private readonly bool?[] _resourcesExist; @@ -278,7 +278,7 @@ private static Dictionary, Language> LangsDictionary if (_langsDictionary == null) { var langsDictionary = Enum.GetValues(typeof(Language)).Cast() - .ToDictionary(lang => lang.ToString().AsMemory(), new ReadOnlyMemoryUtils.ReadonlyMemoryCharComparer()); + .ToDictionary(lang => lang.ToString().AsMemory()); Interlocked.CompareExchange(ref _langsDictionary, langsDictionary, null); } @@ -286,7 +286,7 @@ private static Dictionary, Language> LangsDictionary } } - public StopWordsRemovingTransformer(IHostEnvironment env, Arguments args, IDataView input) + public StopWordsRemoverTransform(IHostEnvironment env, Arguments args, IDataView input) : base(env, RegistrationName, Contracts.CheckRef(args, nameof(args)).Column, input, TestIsTextVector) { Host.AssertNonEmpty(Infos); @@ -311,7 +311,7 @@ public StopWordsRemovingTransformer(IHostEnvironment env, Arguments args, IDataV Metadata.Seal(); } - public StopWordsRemovingTransformer(IHostEnvironment env, IDataView input, OneToOneColumn[] column) + public StopWordsRemoverTransform(IHostEnvironment env, IDataView input, OneToOneColumn[] column) : base(env, RegistrationName, column, input, TestIsTextVector) { Host.AssertNonEmpty(Infos); @@ -334,7 +334,7 @@ public StopWordsRemovingTransformer(IHostEnvironment env, IDataView input, OneTo Metadata.Seal(); } - private StopWordsRemovingTransformer(IHost host, ModelLoadContext ctx, IDataView input) + private StopWordsRemoverTransform(IHost host, ModelLoadContext ctx, IDataView input) : base(host, ctx, input, TestIsTextVector) { Host.AssertValue(ctx); @@ -391,7 +391,7 @@ private void CheckResources(IChannel ch) } } - public static StopWordsRemovingTransformer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + public static StopWordsRemoverTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(ctx, nameof(ctx)); @@ -400,7 +400,7 @@ public static StopWordsRemovingTransformer Create(IHostEnvironment env, ModelLoa env.CheckValue(input, nameof(input)); var h = env.Register(RegistrationName); - return h.Apply("Loading Model", ch => new StopWordsRemovingTransformer(h, ctx, input)); + return h.Apply("Loading Model", ch => new StopWordsRemoverTransform(h, ctx, input)); } public override void Save(ModelSaveContext ctx) @@ -464,17 +464,16 @@ protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, ou getSrc(ref src); list.Clear(); - var srcValues = src.GetValues(); - for (int i = 0; i < srcValues.Length; i++) + for (int i = 0; i < src.Count; i++) { - if (srcValues[i].IsEmpty) + if (src.Values[i].IsEmpty) continue; buffer.Clear(); - ReadOnlyMemoryUtils.AddLowerCaseToStringBuilder(srcValues[i].Span, buffer); + ReadOnlyMemoryUtils.AddLowerCaseToStringBuilder(src.Values[i].Span, buffer); // REVIEW nihejazi: Consider using a trie for string matching (Aho-Corasick, etc.) if (StopWords[(int)langToUse].Get(buffer) == null) - list.Add(srcValues[i]); + list.Add(src.Values[i]); } VBufferUtils.Copy(list, ref dst, list.Count); @@ -536,7 +535,7 @@ private static Stream GetResourceFileStreamOrNull(Language lang) } } - public sealed class CustomStopWordsRemovingTransformer : OneToOneTransformBase, IStopWordsRemoverTransform + public sealed class CustomStopWordsRemoverTransform : OneToOneTransformBase, IStopWordsRemoverTransform { public sealed class Column : OneToOneColumn { @@ -585,7 +584,7 @@ public sealed class LoaderArguments : ArgumentsBase, IStopWordsRemoverFactory { public IStopWordsRemoverTransform CreateComponent(IHostEnvironment env, IDataView input, OneToOneColumn[] column) { - return new CustomStopWordsRemovingTransformer(env, this, input, column); + return new CustomStopWordsRemoverTransform(env, this, input, column); } } @@ -602,7 +601,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(CustomStopWordsRemovingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(CustomStopWordsRemoverTransform).Assembly.FullName); } public const string StopwordsManagerLoaderSignature = "CustomStopWordsManager"; @@ -614,7 +613,7 @@ private static VersionInfo GetStopwrodsManagerVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: StopwordsManagerLoaderSignature, - loaderAssemblyName: typeof(CustomStopWordsRemovingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(CustomStopWordsRemoverTransform).Assembly.FullName); } private static readonly ColumnType _outputType = new VectorType(TextType.Instance); @@ -712,7 +711,7 @@ private void LoadStopWords(IHostEnvironment env, IChannel ch, ArgumentsBase load if (!stopword.IsEmpty) { buffer.Clear(); - ReadOnlyMemoryUtils.AddLowerCaseToStringBuilder(stopword.Span, buffer); + ReadOnlyMemoryUtils.AddLowerCaseToStringBuilder(stopwords.Span, buffer); stopWordsMap.Add(buffer); } else if (warnEmpty) @@ -778,7 +777,7 @@ private void LoadStopWords(IHostEnvironment env, IChannel ch, ArgumentsBase load } } - public CustomStopWordsRemovingTransformer(IHostEnvironment env, Arguments args, IDataView input) + public CustomStopWordsRemoverTransform(IHostEnvironment env, Arguments args, IDataView input) : base(env, RegistrationName, Contracts.CheckRef(args, nameof(args)).Column, input, TestIsTextVector) { Host.AssertNonEmpty(Infos); @@ -799,7 +798,7 @@ public CustomStopWordsRemovingTransformer(IHostEnvironment env, Arguments args, /// Public constructor corresponding to SignatureStopWordsRemoverTransform. It accepts arguments of type LoaderArguments, /// and a separate array of columns (constructed by the caller -TextFeaturizingEstimator - arguments). /// - public CustomStopWordsRemovingTransformer(IHostEnvironment env, LoaderArguments loaderArgs, IDataView input, OneToOneColumn[] column) + public CustomStopWordsRemoverTransform(IHostEnvironment env, LoaderArguments loaderArgs, IDataView input, OneToOneColumn[] column) : base(env, RegistrationName, column, input, TestIsTextItem) { Host.AssertNonEmpty(Infos); @@ -816,7 +815,7 @@ public CustomStopWordsRemovingTransformer(IHostEnvironment env, LoaderArguments Metadata.Seal(); } - private CustomStopWordsRemovingTransformer(IHost host, ModelLoadContext ctx, IDataView input) + private CustomStopWordsRemoverTransform(IHost host, ModelLoadContext ctx, IDataView input) : base(host, ctx, input, TestIsTextVector) { Host.AssertValue(ctx); @@ -861,7 +860,7 @@ private CustomStopWordsRemovingTransformer(IHost host, ModelLoadContext ctx, IDa Metadata.Seal(); } - public static CustomStopWordsRemovingTransformer Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + public static CustomStopWordsRemoverTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) { Contracts.CheckValue(env, nameof(env)); env.CheckValue(ctx, nameof(ctx)); @@ -870,7 +869,7 @@ public static CustomStopWordsRemovingTransformer Create(IHostEnvironment env, Mo env.CheckValue(input, nameof(input)); var h = env.Register(RegistrationName); - return h.Apply("Loading Model", ch => new CustomStopWordsRemovingTransformer(h, ctx, input)); + return h.Apply("Loading Model", ch => new CustomStopWordsRemoverTransform(h, ctx, input)); } public override void Save(ModelSaveContext ctx) @@ -937,17 +936,16 @@ protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, ou getSrc(ref src); list.Clear(); - var srcValues = src.GetValues(); - for (int i = 0; i < srcValues.Length; i++) + for (int i = 0; i < src.Count; i++) { - if (srcValues[i].IsEmpty) + if (src.Values[i].IsEmpty) continue; buffer.Clear(); - ReadOnlyMemoryUtils.AddLowerCaseToStringBuilder(srcValues[i].Span, buffer); + ReadOnlyMemoryUtils.AddLowerCaseToStringBuilder(src.Values[i].Span, buffer); // REVIEW nihejazi: Consider using a trie for string matching (Aho-Corasick, etc.) if (_stopWordsMap.Get(buffer) == null) - list.Add(srcValues[i]); + list.Add(src.Values[i]); } VBufferUtils.Copy(list, ref dst, list.Count); diff --git a/src/Microsoft.ML.Transforms/Text/TextNormalizing.cs b/src/Microsoft.ML.Transforms/Text/TextNormalizerTransform.cs similarity index 97% rename from src/Microsoft.ML.Transforms/Text/TextNormalizing.cs rename to src/Microsoft.ML.Transforms/Text/TextNormalizerTransform.cs index 89c4f4c696..60de96701b 100644 --- a/src/Microsoft.ML.Transforms/Text/TextNormalizing.cs +++ b/src/Microsoft.ML.Transforms/Text/TextNormalizerTransform.cs @@ -194,7 +194,7 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : OneToOneMapperBase + private sealed class Mapper : MapperBase { private readonly ColumnType[] _types; private readonly TextNormalizingTransformer _parent; @@ -212,7 +212,7 @@ public Mapper(TextNormalizingTransformer parent, Schema inputSchema) } } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -279,7 +279,7 @@ private static Dictionary CombinedDiacriticsMap } } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); @@ -308,7 +308,7 @@ private ValueGetter> MakeGetterOne(IRow input, int iinfo) (ref ReadOnlyMemory dst) => { getSrc(ref src); - NormalizeSrc(in src, ref dst, buffer); + NormalizeSrc(ref src, ref dst, buffer); }; } @@ -325,10 +325,9 @@ private ValueGetter>> MakeGetterVec(IRow input, int { getSrc(ref src); list.Clear(); - var srcValues = src.GetValues(); - for (int i = 0; i < srcValues.Length; i++) + for (int i = 0; i < src.Count; i++) { - NormalizeSrc(in srcValues[i], ref temp, buffer); + NormalizeSrc(ref src.Values[i], ref temp, buffer); if (!temp.IsEmpty) list.Add(temp); } @@ -337,7 +336,7 @@ private ValueGetter>> MakeGetterVec(IRow input, int }; } - private void NormalizeSrc(in ReadOnlyMemory src, ref ReadOnlyMemory dst, StringBuilder buffer) + private void NormalizeSrc(ref ReadOnlyMemory src, ref ReadOnlyMemory dst, StringBuilder buffer) { Host.AssertValue(buffer); diff --git a/src/Microsoft.ML.Transforms/Text/TextStaticExtensions.cs b/src/Microsoft.ML.Transforms/Text/TextStaticExtensions.cs index 83b05cbbb7..cd5b11e3a1 100644 --- a/src/Microsoft.ML.Transforms/Text/TextStaticExtensions.cs +++ b/src/Microsoft.ML.Transforms/Text/TextStaticExtensions.cs @@ -5,13 +5,14 @@ using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Transforms.Text; +using Microsoft.ML.StaticPipe; using Microsoft.ML.StaticPipe.Runtime; using System; using System.Collections.Generic; +using static Microsoft.ML.Transforms.Text.StopWordsRemoverTransform; -namespace Microsoft.ML.StaticPipe +namespace Microsoft.ML.Transforms.Text { - using Language = Microsoft.ML.Transforms.Text.StopWordsRemovingTransformer.Language; /// /// Extensions for statically typed word tokenizer. /// @@ -103,7 +104,7 @@ public override IEstimator Reconcile(IHostEnvironment env, foreach (var outCol in toOutput) pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); - return new TokenizingByCharactersEstimator(env, _useMarker, pairs.ToArray()); + return new CharacterTokenizingEstimator(env, _useMarker, pairs.ToArray()); } } @@ -255,7 +256,7 @@ public OutPipelineColumn(Scalar input, int skipLength, bool allLengths, int maxNumTerms, - NgramCountingEstimator.WeightingCriteria weighting) + NgramTransform.WeightingCriteria weighting) : base(new Reconciler(ngramLength, skipLength, allLengths, maxNumTerms, weighting), input) { Input = input; @@ -268,9 +269,9 @@ private sealed class Reconciler : EstimatorReconciler, IEquatable private readonly int _skipLength; private readonly bool _allLengths; private readonly int _maxNumTerms; - private readonly NgramCountingEstimator.WeightingCriteria _weighting; + private readonly NgramTransform.WeightingCriteria _weighting; - public Reconciler(int ngramLength, int skipLength, bool allLengths, int maxNumTerms, NgramCountingEstimator.WeightingCriteria weighting) + public Reconciler(int ngramLength, int skipLength, bool allLengths, int maxNumTerms, NgramTransform.WeightingCriteria weighting) { _ngramLength = ngramLength; _skipLength = skipLength; @@ -320,7 +321,7 @@ public static Vector ToBagofWords(this Scalar input, int skipLength = 0, bool allLengths = true, int maxNumTerms = 10000000, - NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.WeightingCriteria.Tf) + NgramTransform.WeightingCriteria weighting = NgramTransform.WeightingCriteria.Tf) => new OutPipelineColumn(input, ngramLength, skipLength, allLengths, maxNumTerms, weighting); } @@ -431,7 +432,7 @@ public OutPipelineColumn(PipelineColumn input, int skipLength, bool allLengths, int maxNumTerms, - NgramCountingEstimator.WeightingCriteria weighting) + NgramTransform.WeightingCriteria weighting) : base(new Reconciler(ngramLength, skipLength, allLengths, maxNumTerms, weighting), input) { Input = input; @@ -444,9 +445,9 @@ private sealed class Reconciler : EstimatorReconciler, IEquatable private readonly int _skipLength; private readonly bool _allLengths; private readonly int _maxNumTerms; - private readonly NgramCountingEstimator.WeightingCriteria _weighting; + private readonly NgramTransform.WeightingCriteria _weighting; - public Reconciler(int ngramLength, int skipLength, bool allLengths, int maxNumTerms, NgramCountingEstimator.WeightingCriteria weighting) + public Reconciler(int ngramLength, int skipLength, bool allLengths, int maxNumTerms, NgramTransform.WeightingCriteria weighting) { _ngramLength = ngramLength; _skipLength = skipLength; @@ -477,7 +478,7 @@ public override IEstimator Reconcile(IHostEnvironment env, foreach (var outCol in toOutput) pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); - return new NgramCountingEstimator(env, pairs.ToArray(), _ngramLength, _skipLength, _allLengths, _maxNumTerms, _weighting); + return new NgramEstimator(env, pairs.ToArray(), _ngramLength, _skipLength, _allLengths, _maxNumTerms, _weighting); } } @@ -499,7 +500,7 @@ public static Vector ToNgrams(this VarVector> inp int skipLength = 0, bool allLengths = true, int maxNumTerms = 10000000, - NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.WeightingCriteria.Tf) + NgramTransform.WeightingCriteria weighting = NgramTransform.WeightingCriteria.Tf) => new OutPipelineColumn(input, ngramLength, skipLength, allLengths, maxNumTerms, weighting); } @@ -591,4 +592,56 @@ public static Vector ToNgramsHash(this VarVector> input bool ordered = true, int invertHash = 0) => new OutPipelineColumn(input, hashBits, ngramLength, skipLength, allLengths, seed, ordered, invertHash); } + + /// + /// Extensions for statically typed . + /// + public static class LdaEstimatorExtensions + { + private sealed class OutPipelineColumn : Vector + { + public readonly Vector Input; + + public OutPipelineColumn(Vector input, int numTopic, Action advancedSettings) + : base(new Reconciler(numTopic, advancedSettings), input) + { + Input = input; + } + } + + private sealed class Reconciler : EstimatorReconciler + { + private readonly int _numTopic; + private readonly Action _advancedSettings; + + public Reconciler(int numTopic, Action advancedSettings) + { + _numTopic = numTopic; + _advancedSettings = advancedSettings; + } + + public override IEstimator Reconcile(IHostEnvironment env, + PipelineColumn[] toOutput, + IReadOnlyDictionary inputNames, + IReadOnlyDictionary outputNames, + IReadOnlyCollection usedNames) + { + Contracts.Assert(toOutput.Length == 1); + + var pairs = new List<(string input, string output)>(); + foreach (var outCol in toOutput) + pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); + + return new LdaEstimator(env, pairs.ToArray(), _numTopic, _advancedSettings); + } + } + + /// + /// The column to apply to. + /// The number of topics in the LDA. + /// A delegate to apply all the advanced arguments to the algorithm. + public static Vector ToLdaTopicVector(this Vector input, + int numTopic = 100, + Action advancedSettings = null) => new OutPipelineColumn(input, numTopic, advancedSettings); + } } diff --git a/src/Microsoft.ML.Transforms/Text/TextFeaturizingEstimator.cs b/src/Microsoft.ML.Transforms/Text/TextTransform.cs similarity index 91% rename from src/Microsoft.ML.Transforms/Text/TextFeaturizingEstimator.cs rename to src/Microsoft.ML.Transforms/Text/TextTransform.cs index 8392b7c238..81032dbef6 100644 --- a/src/Microsoft.ML.Transforms/Text/TextFeaturizingEstimator.cs +++ b/src/Microsoft.ML.Transforms/Text/TextTransform.cs @@ -31,7 +31,7 @@ namespace Microsoft.ML.Transforms.Text { using CaseNormalizationMode = TextNormalizingEstimator.CaseNormalizationMode; - using StopWordsCol = StopWordsRemovingTransformer.Column; + using StopWordsCol = StopWordsRemoverTransform.Column; // A transform that turns a collection of text documents into numerical feature vectors. The feature vectors are counts // of (word or character) ngrams in a given text. It offers ngram hashing (finding the ngram token string name to feature @@ -82,7 +82,7 @@ public bool TryUnparse(StringBuilder sb) } /// - /// This class exposes / arguments. + /// This class exposes / arguments. /// public sealed class Arguments : TransformInputBase { @@ -115,11 +115,11 @@ public sealed class Arguments : TransformInputBase [TGUI(Label = "Word Gram Extractor")] [Argument(ArgumentType.Multiple, HelpText = "Ngram feature extractor to use for words (WordBag/WordHashBag).", ShortName = "wordExtractor", NullName = "", SortOrder = 11)] - public INgramExtractorFactoryFactory WordFeatureExtractor = new NgramExtractingTransformer.NgramExtractorArguments(); + public INgramExtractorFactoryFactory WordFeatureExtractor = new NgramExtractorTransform.NgramExtractorArguments(); [TGUI(Label = "Char Gram Extractor")] [Argument(ArgumentType.Multiple, HelpText = "Ngram feature extractor to use for characters (WordBag/WordHashBag).", ShortName = "charExtractor", NullName = "", SortOrder = 12)] - public INgramExtractorFactoryFactory CharFeatureExtractor = new NgramExtractingTransformer.NgramExtractorArguments() { NgramLength = 3, AllLengths = false }; + public INgramExtractorFactoryFactory CharFeatureExtractor = new NgramExtractorTransform.NgramExtractorArguments() { NgramLength = 3, AllLengths = false }; [Argument(ArgumentType.AtMostOnce, HelpText = "Normalize vectors (rows) individually by rescaling them to unit norm.", ShortName = "norm", SortOrder = 13)] public TextNormKind VectorNormalizer = TextNormKind.L2; @@ -171,24 +171,24 @@ private sealed class TransformApplierParams public readonly bool OutputTextTokens; public readonly TermLoaderArguments Dictionary; - public StopWordsRemovingTransformer.Language StopwordsLanguage - =>(StopWordsRemovingTransformer.Language) Enum.Parse(typeof(StopWordsRemovingTransformer.Language), Language.ToString()); + public StopWordsRemoverTransform.Language StopwordsLanguage + =>(StopWordsRemoverTransform.Language) Enum.Parse(typeof(StopWordsRemoverTransform.Language), Language.ToString()); - public LpNormalizingEstimatorBase.NormalizerKind LpNormalizerKind + public LpNormNormalizerTransform.NormalizerKind LpNormalizerKind { get { switch (VectorNormalizer) { case TextNormKind.L1: - return LpNormalizingEstimatorBase.NormalizerKind.L1Norm; + return LpNormNormalizerTransform.NormalizerKind.L1Norm; case TextNormKind.L2: - return LpNormalizingEstimatorBase.NormalizerKind.L2Norm; + return LpNormNormalizerTransform.NormalizerKind.L2Norm; case TextNormKind.LInf: - return LpNormalizingEstimatorBase.NormalizerKind.LInf; + return LpNormNormalizerTransform.NormalizerKind.LInf; default: Contracts.Assert(false, "Unexpected normalizer type"); - return LpNormalizingEstimatorBase.NormalizerKind.L2Norm; + return LpNormNormalizerTransform.NormalizerKind.L2Norm; } } } @@ -288,8 +288,8 @@ public TextFeaturizingEstimator (IHostEnvironment env, IEnumerable input _stopWordsRemover = null; _dictionary = null; - _wordFeatureExtractor = new NgramExtractingTransformer.NgramExtractorArguments(); - _charFeatureExtractor = new NgramExtractingTransformer.NgramExtractorArguments() { NgramLength = 3, AllLengths = false }; + _wordFeatureExtractor = new NgramExtractorTransform.NgramExtractorArguments(); + _charFeatureExtractor = new NgramExtractorTransform.NgramExtractorArguments() { NgramLength = 3, AllLengths = false }; } public ITransformer Fit(IDataView input) @@ -311,7 +311,7 @@ public ITransformer Fit(IDataView input) var srcCols = textCols; textCols = new[] { GenerateColumnName(input.Schema, OutputColumn, "InitialConcat") }; tempCols.Add(textCols[0]); - view = new ColumnConcatenatingTransformer(h, textCols[0], srcCols).Transform(view); + view = new ConcatTransform(h, textCols[0], srcCols).Transform(view); } if (tparams.NeedsNormalizeTransform) @@ -332,11 +332,11 @@ public ITransformer Fit(IDataView input) if (tparams.NeedsWordTokenizationTransform) { - var xfCols = new WordTokenizingTransformer.ColumnInfo[textCols.Length]; + var xfCols = new WordTokenizeTransform.ColumnInfo[textCols.Length]; wordTokCols = new string[textCols.Length]; for (int i = 0; i < textCols.Length; i++) { - var col = new WordTokenizingTransformer.ColumnInfo(textCols[i], GenerateColumnName(view.Schema, textCols[i], "WordTokenizer")); + var col = new WordTokenizeTransform.ColumnInfo(textCols[i], GenerateColumnName(view.Schema, textCols[i], "WordTokenizer")); xfCols[i] = col; wordTokCols[i] = col.Output; tempCols.Add(col.Output); @@ -382,7 +382,7 @@ public ITransformer Fit(IDataView input) if (tparams.OutputTextTokens) { string[] srcCols = wordTokCols ?? textCols; - view = new ColumnConcatenatingTransformer(h, string.Format(TransformedTextColFormat, OutputColumn), srcCols).Transform(view); + view = new ConcatTransform(h, string.Format(TransformedTextColFormat, OutputColumn), srcCols).Transform(view); } if (tparams.CharExtractorFactory != null) @@ -397,7 +397,7 @@ public ITransformer Fit(IDataView input) tempCols.Add(xfCols[i].output); charTokCols[i] = xfCols[i].output; } - view = new TokenizingByCharactersTransformer(h, columns: xfCols).Transform(view); + view = new CharTokenizeTransform(h, columns: xfCols).Transform(view); } { @@ -415,13 +415,16 @@ public ITransformer Fit(IDataView input) if (tparams.VectorNormalizer != TextNormKind.None) { - var xfCols = new List(2); - + var xfCols = new List(2); if (charFeatureCol != null) { var dstCol = GenerateColumnName(view.Schema, charFeatureCol, "LpCharNorm"); tempCols.Add(dstCol); - xfCols.Add(new LpNormalizingTransformer.LpNormColumnInfo(charFeatureCol, dstCol, normalizerKind: tparams.LpNormalizerKind)); + xfCols.Add(new LpNormNormalizerTransform.Column() + { + Source = charFeatureCol, + Name = dstCol + }); charFeatureCol = dstCol; } @@ -429,12 +432,19 @@ public ITransformer Fit(IDataView input) { var dstCol = GenerateColumnName(view.Schema, wordFeatureCol, "LpWordNorm"); tempCols.Add(dstCol); - xfCols.Add(new LpNormalizingTransformer.LpNormColumnInfo(wordFeatureCol, dstCol, normalizerKind: tparams.LpNormalizerKind)); + xfCols.Add(new LpNormNormalizerTransform.Column() + { + Source = wordFeatureCol, + Name = dstCol + }); wordFeatureCol = dstCol; } - if (xfCols.Count > 0) - view = new LpNormalizingTransformer(h, xfCols.ToArray()).Transform(view); + view = new LpNormNormalizerTransform(h, new LpNormNormalizerTransform.Arguments() + { + NormKind = tparams.LpNormalizerKind, + Column = xfCols.ToArray() + }, view); } { @@ -459,13 +469,13 @@ public ITransformer Fit(IDataView input) } if (srcTaggedCols.Count > 0) { - view = new ColumnConcatenatingTransformer(h, new ColumnConcatenatingTransformer.ColumnInfo(OutputColumn, + view = new ConcatTransform(h, new ConcatTransform.ColumnInfo(OutputColumn, srcTaggedCols.Select(kvp => (kvp.Value, kvp.Key)))) .Transform(view); } } - view = ColumnSelectingTransformer.CreateDrop(h, view, tempCols.ToArray()); + view = SelectColumnsTransform.CreateDrop(h, view, tempCols.ToArray()); return new Transformer(_host, input, view); } diff --git a/src/Microsoft.ML.Transforms/Text/WordBagTransform.cs b/src/Microsoft.ML.Transforms/Text/WordBagTransform.cs index 14f2668522..279a0aaa3c 100644 --- a/src/Microsoft.ML.Transforms/Text/WordBagTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/WordBagTransform.cs @@ -14,13 +14,13 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(WordBagBuildingTransformer.Summary, typeof(IDataTransform), typeof(WordBagBuildingTransformer), typeof(WordBagBuildingTransformer.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(WordBagTransform.Summary, typeof(IDataTransform), typeof(WordBagTransform), typeof(WordBagTransform.Arguments), typeof(SignatureDataTransform), "Word Bag Transform", "WordBagTransform", "WordBag")] -[assembly: LoadableClass(NgramExtractingTransformer.Summary, typeof(INgramExtractorFactory), typeof(NgramExtractingTransformer), typeof(NgramExtractingTransformer.NgramExtractorArguments), - typeof(SignatureNgramExtractorFactory), "Ngram Extractor Transform", "NgramExtractorTransform", "Ngram", NgramExtractingTransformer.LoaderSignature)] +[assembly: LoadableClass(NgramExtractorTransform.Summary, typeof(INgramExtractorFactory), typeof(NgramExtractorTransform), typeof(NgramExtractorTransform.NgramExtractorArguments), + typeof(SignatureNgramExtractorFactory), "Ngram Extractor Transform", "NgramExtractorTransform", "Ngram", NgramExtractorTransform.LoaderSignature)] -[assembly: EntryPointModule(typeof(NgramExtractingTransformer.NgramExtractorArguments))] +[assembly: EntryPointModule(typeof(NgramExtractorTransform.NgramExtractorArguments))] namespace Microsoft.ML.Transforms.Text { @@ -30,8 +30,8 @@ namespace Microsoft.ML.Transforms.Text public delegate void SignatureNgramExtractorFactory(TermLoaderArguments termLoaderArgs); /// - /// A many-to-one column common to both - /// and . + /// A many-to-one column common to both + /// and . /// public sealed class ExtractorColumn : ManyToOneColumn { @@ -40,7 +40,7 @@ public sealed class ExtractorColumn : ManyToOneColumn public string[] FriendlyNames; } - public static class WordBagBuildingTransformer + public static class WordBagTransform { public sealed class Column : ManyToOneColumn { @@ -61,7 +61,7 @@ public sealed class Column : ManyToOneColumn public int[] MaxNumTerms = null; [Argument(ArgumentType.AtMostOnce, HelpText = "Statistical measure used to evaluate how important a word is to a document in a corpus")] - public NgramCountingEstimator.WeightingCriteria? Weighting; + public NgramTransform.WeightingCriteria? Weighting; public static Column Parse(string str) { @@ -94,7 +94,7 @@ public bool TryUnparse(StringBuilder sb) /// public sealed class TokenizeColumn : OneToOneColumn { } - public sealed class Arguments : NgramExtractingTransformer.ArgumentsBase + public sealed class Arguments : NgramExtractorTransform.ArgumentsBase { [Argument(ArgumentType.Multiple, HelpText = "New column definition(s) (optional form: name:srcs)", ShortName = "col", SortOrder = 1)] public Column[] Column; @@ -124,17 +124,17 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV // REVIEW: In order to make it possible to output separate bags for different columns // using the same dictionary, we need to find a way to make ConcatTransform remember the boundaries. - var tokenizeColumns = new WordTokenizingTransformer.ColumnInfo[args.Column.Length]; + var tokenizeColumns = new WordTokenizeTransform.ColumnInfo[args.Column.Length]; var extractorArgs = - new NgramExtractingTransformer.Arguments() + new NgramExtractorTransform.Arguments() { MaxNumTerms = args.MaxNumTerms, NgramLength = args.NgramLength, SkipLength = args.SkipLength, AllLengths = args.AllLengths, Weighting = args.Weighting, - Column = new NgramExtractingTransformer.Column[args.Column.Length] + Column = new NgramExtractorTransform.Column[args.Column.Length] }; for (int iinfo = 0; iinfo < args.Column.Length; iinfo++) @@ -144,10 +144,10 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV h.CheckUserArg(Utils.Size(column.Source) > 0, nameof(column.Source)); h.CheckUserArg(column.Source.All(src => !string.IsNullOrWhiteSpace(src)), nameof(column.Source)); - tokenizeColumns[iinfo] = new WordTokenizingTransformer.ColumnInfo(column.Source.Length > 1 ? column.Name : column.Source[0], column.Name); + tokenizeColumns[iinfo] = new WordTokenizeTransform.ColumnInfo(column.Source.Length > 1 ? column.Name : column.Source[0], column.Name); extractorArgs.Column[iinfo] = - new NgramExtractingTransformer.Column() + new NgramExtractorTransform.Column() { Name = column.Name, Source = column.Name, @@ -162,16 +162,16 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV IDataView view = input; view = NgramExtractionUtils.ApplyConcatOnSources(h, args.Column, view); view = new WordTokenizingEstimator(env, tokenizeColumns).Fit(view).Transform(view); - return NgramExtractingTransformer.Create(h, extractorArgs, view); + return NgramExtractorTransform.Create(h, extractorArgs, view); } } /// - /// A transform that turns a collection of tokenized text (vector of ReadOnlyMemory), or vectors of keys into numerical + /// A transform that turns a collection of tokenized text (vector of ReadOnlyMemory), or vectors of keys into numerical /// feature vectors. The feature vectors are counts of ngrams (sequences of consecutive *tokens* -words or keys- /// of length 1-n). /// - public static class NgramExtractingTransformer + public static class NgramExtractorTransform { public sealed class Column : OneToOneColumn { @@ -194,7 +194,7 @@ public sealed class Column : OneToOneColumn public int[] MaxNumTerms = null; [Argument(ArgumentType.AtMostOnce, HelpText = "The weighting criteria")] - public NgramCountingEstimator.WeightingCriteria? Weighting; + public NgramTransform.WeightingCriteria? Weighting; public static Column Parse(string str) { @@ -219,8 +219,8 @@ public bool TryUnparse(StringBuilder sb) } /// - /// This class is a merger of and - /// , with the allLength option removed. + /// This class is a merger of and + /// , with the allLength option removed. /// public abstract class ArgumentsBase { @@ -230,18 +230,18 @@ public abstract class ArgumentsBase [Argument(ArgumentType.AtMostOnce, HelpText = "Maximum number of tokens to skip when constructing an ngram", ShortName = "skips")] - public int SkipLength = NgramCountingEstimator.Defaults.SkipLength; + public int SkipLength = 0; [Argument(ArgumentType.AtMostOnce, HelpText = "Whether to include all ngram lengths up to " + nameof(NgramLength) + " or only " + nameof(NgramLength), ShortName = "all")] - public bool AllLengths = NgramCountingEstimator.Defaults.AllLength; + public bool AllLengths = true; [Argument(ArgumentType.Multiple, HelpText = "Maximum number of ngrams to store in the dictionary", ShortName = "max")] - public int[] MaxNumTerms = new int[] { NgramCountingEstimator.Defaults.MaxNumTerms }; + public int[] MaxNumTerms = new int[] { NgramTransform.Arguments.DefaultMaxTerms }; [Argument(ArgumentType.AtMostOnce, HelpText = "The weighting criteria")] - public NgramCountingEstimator.WeightingCriteria Weighting = NgramCountingEstimator.Defaults.Weighting; + public NgramTransform.WeightingCriteria Weighting = NgramTransform.WeightingCriteria.Tf; } [TlcModule.Component(Name = "NGram", FriendlyName = "NGram Extractor Transform", Alias = "NGramExtractorTransform,NGramExtractor", @@ -260,7 +260,7 @@ public sealed class Arguments : ArgumentsBase public Column[] Column; } - internal const string Summary = "A transform that turns a collection of tokenized text ReadOnlyMemory, or vectors of keys into numerical " + + internal const string Summary = "A transform that turns a collection of tokenized text ReadOnlyMemory, or vectors of keys into numerical " + "feature vectors. The feature vectors are counts of ngrams (sequences of consecutive *tokens* -words or keys- of length 1-n)."; internal const string LoaderSignature = "NgramExtractor"; @@ -300,12 +300,12 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV // of args.column are not text nor keys). if (termCols.Count > 0) { - ValueToKeyMappingTransformer.Arguments termArgs = null; - string[] missingDropColumns = null; + TermTransform.Arguments termArgs = null; + NADropTransform.Arguments naDropArgs = null; if (termLoaderArgs != null) { termArgs = - new ValueToKeyMappingTransformer.Arguments() + new TermTransform.Arguments() { MaxNumTerms = int.MaxValue, Terms = termLoaderArgs.Terms, @@ -314,18 +314,19 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV Loader = termLoaderArgs.Loader, TermsColumn = termLoaderArgs.TermsColumn, Sort = termLoaderArgs.Sort, - Column = new ValueToKeyMappingTransformer.Column[termCols.Count] + Column = new TermTransform.Column[termCols.Count] }; + if (termLoaderArgs.DropUnknowns) - missingDropColumns = new string[termCols.Count]; + naDropArgs = new NADropTransform.Arguments { Column = new NADropTransform.Column[termCols.Count] }; } else { termArgs = - new ValueToKeyMappingTransformer.Arguments() + new TermTransform.Arguments() { - MaxNumTerms = Utils.Size(args.MaxNumTerms) > 0 ? args.MaxNumTerms[0] : NgramCountingEstimator.Defaults.MaxNumTerms, - Column = new ValueToKeyMappingTransformer.Column[termCols.Count] + MaxNumTerms = Utils.Size(args.MaxNumTerms) > 0 ? args.MaxNumTerms[0] : NgramTransform.Arguments.DefaultMaxTerms, + Column = new TermTransform.Column[termCols.Count] }; } @@ -333,36 +334,50 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV { var column = termCols[iinfo]; termArgs.Column[iinfo] = - new ValueToKeyMappingTransformer.Column() + new TermTransform.Column() { Name = column.Name, Source = column.Source, MaxNumTerms = Utils.Size(column.MaxNumTerms) > 0 ? column.MaxNumTerms[0] : default(int?) }; - if (missingDropColumns != null) - missingDropColumns[iinfo] = column.Name; + if (naDropArgs != null) + naDropArgs.Column[iinfo] = new NADropTransform.Column { Name = column.Name, Source = column.Name }; } - view = ValueToKeyMappingTransformer.Create(h, termArgs, view); - if (missingDropColumns != null) - view = new MissingValueDroppingTransformer(h, missingDropColumns.Select(x => (x, x)).ToArray()).Transform(view); + view = TermTransform.Create(h, termArgs, view); + if (naDropArgs != null) + view = new NADropTransform(h, naDropArgs, view); } - var ngramColumns = new NgramCountingTransformer.ColumnInfo[args.Column.Length]; + var ngramArgs = + new NgramTransform.Arguments() + { + MaxNumTerms = args.MaxNumTerms, + NgramLength = args.NgramLength, + SkipLength = args.SkipLength, + AllLengths = args.AllLengths, + Weighting = args.Weighting, + Column = new NgramTransform.Column[args.Column.Length] + }; + for (int iinfo = 0; iinfo < args.Column.Length; iinfo++) { var column = args.Column[iinfo]; - ngramColumns[iinfo] = new NgramCountingTransformer.ColumnInfo(isTermCol[iinfo] ? column.Name : column.Source, column.Name, - column.NgramLength ?? args.NgramLength, - column.SkipLength ?? args.SkipLength, - column.AllLengths ?? args.AllLengths, - column.Weighting ?? args.Weighting, - column.MaxNumTerms ?? args.MaxNumTerms - ); + ngramArgs.Column[iinfo] = + new NgramTransform.Column() + { + Name = column.Name, + Source = isTermCol[iinfo] ? column.Name : column.Source, + AllLengths = column.AllLengths, + MaxNumTerms = column.MaxNumTerms, + NgramLength = column.NgramLength, + SkipLength = column.SkipLength, + Weighting = column.Weighting + }; } - return new NgramCountingEstimator(env, ngramColumns).Fit(view).Transform(view) as IDataTransform; + return new NgramTransform(h, ngramArgs, view); } public static IDataTransform Create(IHostEnvironment env, NgramExtractorArguments extractorArgs, IDataView input, @@ -410,7 +425,7 @@ public static INgramExtractorFactory Create(IHostEnvironment env, NgramExtractor /// /// Arguments for defining custom list of terms or data file containing the terms. - /// The class includes a subset of 's arguments. + /// The class includes a subset of 's arguments. /// public sealed class TermLoaderArguments { @@ -431,7 +446,7 @@ public sealed class TermLoaderArguments [Argument(ArgumentType.AtMostOnce, HelpText = "How items should be ordered when vectorized. By default, they will be in the order encountered. " + "If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a').", SortOrder = 5)] - public ValueToKeyMappingTransformer.SortOrder Sort = ValueToKeyMappingTransformer.SortOrder.Occurrence; + public TermTransform.SortOrder Sort = TermTransform.SortOrder.Occurrence; [Argument(ArgumentType.AtMostOnce, HelpText = "Drop unknown terms instead of mapping them to NA term.", ShortName = "dropna", SortOrder = 6)] public bool DropUnknowns = false; @@ -444,7 +459,7 @@ public interface INgramExtractorFactory { /// /// Whether the extractor transform created by this factory uses the hashing trick - /// (by using or , for example). + /// (by using or , for example). /// bool UseHashingTrick { get; } @@ -455,16 +470,16 @@ public interface INgramExtractorFactory public interface INgramExtractorFactoryFactory : IComponentFactory { } /// - /// An implementation of to create . + /// An implementation of to create . /// internal class NgramExtractorFactory : INgramExtractorFactory { - private readonly NgramExtractingTransformer.NgramExtractorArguments _extractorArgs; + private readonly NgramExtractorTransform.NgramExtractorArguments _extractorArgs; private readonly TermLoaderArguments _termLoaderArgs; public bool UseHashingTrick { get { return false; } } - public NgramExtractorFactory(NgramExtractingTransformer.NgramExtractorArguments extractorArgs, + public NgramExtractorFactory(NgramExtractorTransform.NgramExtractorArguments extractorArgs, TermLoaderArguments termLoaderArgs) { Contracts.CheckValue(extractorArgs, nameof(extractorArgs)); @@ -475,21 +490,21 @@ public NgramExtractorFactory(NgramExtractingTransformer.NgramExtractorArguments public IDataTransform Create(IHostEnvironment env, IDataView input, ExtractorColumn[] cols) { - return NgramExtractingTransformer.Create(env, _extractorArgs, input, cols, _termLoaderArgs); + return NgramExtractorTransform.Create(env, _extractorArgs, input, cols, _termLoaderArgs); } } /// - /// An implementation of to create . + /// An implementation of to create . /// internal class NgramHashExtractorFactory : INgramExtractorFactory { - private readonly NgramHashExtractingTransformer.NgramHashExtractorArguments _extractorArgs; + private readonly NgramHashExtractorTransform.NgramHashExtractorArguments _extractorArgs; private readonly TermLoaderArguments _termLoaderArgs; public bool UseHashingTrick { get { return true; } } - public NgramHashExtractorFactory(NgramHashExtractingTransformer.NgramHashExtractorArguments extractorArgs, + public NgramHashExtractorFactory(NgramHashExtractorTransform.NgramHashExtractorArguments extractorArgs, TermLoaderArguments customTermsArgs = null) { Contracts.CheckValue(extractorArgs, nameof(extractorArgs)); @@ -500,7 +515,7 @@ public NgramHashExtractorFactory(NgramHashExtractingTransformer.NgramHashExtract public IDataTransform Create(IHostEnvironment env, IDataView input, ExtractorColumn[] cols) { - return NgramHashExtractingTransformer.Create(_extractorArgs, env, input, cols, _termLoaderArgs); + return NgramHashExtractorTransform.Create(_extractorArgs, env, input, cols, _termLoaderArgs); } } @@ -513,10 +528,10 @@ public static IDataView ApplyConcatOnSources(IHostEnvironment env, ManyToOneColu env.CheckValue(input, nameof(input)); IDataView view = input; - var concatCols = new List(); + var concatCols = new List(); foreach (var col in columns) { - env.CheckUserArg(col != null, nameof(WordBagBuildingTransformer.Arguments.Column)); + env.CheckUserArg(col != null, nameof(WordBagTransform.Arguments.Column)); env.CheckUserArg(!string.IsNullOrWhiteSpace(col.Name), nameof(col.Name)); env.CheckUserArg(Utils.Size(col.Source) > 0, nameof(col.Source)); env.CheckUserArg(col.Source.All(src => !string.IsNullOrWhiteSpace(src)), nameof(col.Source)); @@ -524,7 +539,7 @@ public static IDataView ApplyConcatOnSources(IHostEnvironment env, ManyToOneColu if (col.Source.Length > 1) { concatCols.Add( - new ColumnConcatenatingTransformer.Column + new ConcatTransform.Column { Source = col.Source, Name = col.Name @@ -533,8 +548,8 @@ public static IDataView ApplyConcatOnSources(IHostEnvironment env, ManyToOneColu } if (concatCols.Count > 0) { - var concatArgs = new ColumnConcatenatingTransformer.Arguments { Column = concatCols.ToArray() }; - return ColumnConcatenatingTransformer.Create(env, concatArgs, view); + var concatArgs = new ConcatTransform.Arguments { Column = concatCols.ToArray() }; + return ConcatTransform.Create(env, concatArgs, view); } return view; @@ -555,7 +570,7 @@ public static string[][] GenerateUniqueSourceNames(IHostEnvironment env, ManyToO for (int iinfo = 0; iinfo < columns.Length; iinfo++) { var col = columns[iinfo]; - env.CheckUserArg(col != null, nameof(WordHashBagProducingTransformer.Arguments.Column)); + env.CheckUserArg(col != null, nameof(WordHashBagTransform.Arguments.Column)); env.CheckUserArg(!string.IsNullOrWhiteSpace(col.Name), nameof(col.Name)); env.CheckUserArg(Utils.Size(col.Source) > 0 && col.Source.All(src => !string.IsNullOrWhiteSpace(src)), nameof(col.Source)); @@ -580,4 +595,4 @@ public static string[][] GenerateUniqueSourceNames(IHostEnvironment env, ManyToO return uniqueNames; } } -} \ No newline at end of file +} diff --git a/src/Microsoft.ML.Transforms/Text/WordEmbeddingsExtractor.cs b/src/Microsoft.ML.Transforms/Text/WordEmbeddingsTransform.cs similarity index 78% rename from src/Microsoft.ML.Transforms/Text/WordEmbeddingsExtractor.cs rename to src/Microsoft.ML.Transforms/Text/WordEmbeddingsTransform.cs index 8f8177b291..c32c716e32 100644 --- a/src/Microsoft.ML.Transforms/Text/WordEmbeddingsExtractor.cs +++ b/src/Microsoft.ML.Transforms/Text/WordEmbeddingsTransform.cs @@ -15,29 +15,27 @@ using Microsoft.ML.StaticPipe.Runtime; using Microsoft.ML.Transforms.Text; using System; -using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; -using System.Threading.Tasks; -[assembly: LoadableClass(WordEmbeddingsExtractingTransformer.Summary, typeof(IDataTransform), typeof(WordEmbeddingsExtractingTransformer), typeof(WordEmbeddingsExtractingTransformer.Arguments), - typeof(SignatureDataTransform), WordEmbeddingsExtractingTransformer.UserName, "WordEmbeddingsTransform", WordEmbeddingsExtractingTransformer.ShortName, DocName = "transform/WordEmbeddingsTransform.md")] +[assembly: LoadableClass(WordEmbeddingsTransform.Summary, typeof(IDataTransform), typeof(WordEmbeddingsTransform), typeof(WordEmbeddingsTransform.Arguments), + typeof(SignatureDataTransform), WordEmbeddingsTransform.UserName, "WordEmbeddingsTransform", WordEmbeddingsTransform.ShortName, DocName = "transform/WordEmbeddingsTransform.md")] -[assembly: LoadableClass(WordEmbeddingsExtractingTransformer.Summary, typeof(IDataTransform), typeof(WordEmbeddingsExtractingTransformer), null, typeof(SignatureLoadDataTransform), - WordEmbeddingsExtractingTransformer.UserName, WordEmbeddingsExtractingTransformer.LoaderSignature)] +[assembly: LoadableClass(WordEmbeddingsTransform.Summary, typeof(IDataTransform), typeof(WordEmbeddingsTransform), null, typeof(SignatureLoadDataTransform), + WordEmbeddingsTransform.UserName, WordEmbeddingsTransform.LoaderSignature)] -[assembly: LoadableClass(typeof(WordEmbeddingsExtractingTransformer), null, typeof(SignatureLoadModel), - WordEmbeddingsExtractingTransformer.UserName, WordEmbeddingsExtractingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(WordEmbeddingsTransform), null, typeof(SignatureLoadModel), + WordEmbeddingsTransform.UserName, WordEmbeddingsTransform.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(WordEmbeddingsExtractingTransformer), null, typeof(SignatureLoadRowMapper), - WordEmbeddingsExtractingTransformer.UserName, WordEmbeddingsExtractingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(WordEmbeddingsTransform), null, typeof(SignatureLoadRowMapper), + WordEmbeddingsTransform.UserName, WordEmbeddingsTransform.LoaderSignature)] namespace Microsoft.ML.Transforms.Text { /// - public sealed class WordEmbeddingsExtractingTransformer : OneToOneTransformerBase + public sealed class WordEmbeddingsTransform : OneToOneTransformerBase { public sealed class Column : OneToOneColumn { @@ -85,7 +83,7 @@ public static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(WordEmbeddingsExtractingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(WordEmbeddingsTransform).Assembly.FullName); } private readonly PretrainedModelKind? _modelKind; @@ -120,7 +118,7 @@ public void AddWordVector(IChannel ch, string word, float[] wordVector) } } - public bool GetWordVector(in ReadOnlyMemory word, float[] wordVector) + public bool GetWordVector(ref ReadOnlyMemory word, float[] wordVector) { NormStr str = _pool.Get(word); if (str != null) @@ -172,53 +170,53 @@ public ColumnInfo(string input, string output) private const int Timeout = 10 * 60 * 1000; /// - /// Instantiates using the pretrained word embedding model specified by . + /// Instantiates using the pretrained word embedding model specified by . /// /// Host Environment. /// Name of the input column. /// Name of the output column. /// The pretrained word embedding model. - public WordEmbeddingsExtractingTransformer(IHostEnvironment env, string inputColumn, string outputColumn, + public WordEmbeddingsTransform(IHostEnvironment env, string inputColumn, string outputColumn, PretrainedModelKind modelKind = PretrainedModelKind.Sswe) : this(env, modelKind, new ColumnInfo(inputColumn, outputColumn)) { } /// - /// Instantiates using the custom word embedding model by loading it from the file specified by the . + /// Instantiates using the custom word embedding model by loading it from the file specified by the . /// /// Host Environment. /// Name of the input column. /// Name of the output column. /// Filename for custom word embedding model. - public WordEmbeddingsExtractingTransformer(IHostEnvironment env, string inputColumn, string outputColumn, string customModelFile) + public WordEmbeddingsTransform(IHostEnvironment env, string inputColumn, string outputColumn, string customModelFile) : this(env, customModelFile, new ColumnInfo(inputColumn, outputColumn)) { } /// - /// Instantiates using the pretrained word embedding model specified by . + /// Instantiates using the pretrained word embedding model specified by . /// /// Host Environment. /// The pretrained word embedding model. /// Input/Output columns. - public WordEmbeddingsExtractingTransformer(IHostEnvironment env, PretrainedModelKind modelKind, params ColumnInfo[] columns) + public WordEmbeddingsTransform(IHostEnvironment env, PretrainedModelKind modelKind, params ColumnInfo[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), GetColumnPairs(columns)) { env.CheckUserArg(Enum.IsDefined(typeof(PretrainedModelKind), modelKind), nameof(modelKind)); _modelKind = modelKind; _modelFileNameWithPath = EnsureModelFile(env, out _linesToSkip, (PretrainedModelKind)_modelKind); - _currentVocab = GetVocabularyDictionary(env); + _currentVocab = GetVocabularyDictionary(); } /// - /// Instantiates using the custom word embedding model by loading it from the file specified by the . + /// Instantiates using the custom word embedding model by loading it from the file specified by the . /// /// Host Environment. /// Filename for custom word embedding model. /// Input/Output columns. - public WordEmbeddingsExtractingTransformer(IHostEnvironment env, string customModelFile, params ColumnInfo[] columns) + public WordEmbeddingsTransform(IHostEnvironment env, string customModelFile, params ColumnInfo[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), GetColumnPairs(columns)) { env.CheckValue(customModelFile, nameof(customModelFile)); @@ -227,7 +225,7 @@ public WordEmbeddingsExtractingTransformer(IHostEnvironment env, string customMo _modelKind = null; _customLookup = true; _modelFileNameWithPath = customModelFile; - _currentVocab = GetVocabularyDictionary(env); + _currentVocab = GetVocabularyDictionary(); } private static (string input, string output)[] GetColumnPairs(ColumnInfo[] columns) @@ -260,12 +258,12 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV bool customLookup = !string.IsNullOrWhiteSpace(args.CustomLookupTable); if (customLookup) - return new WordEmbeddingsExtractingTransformer(env, args.CustomLookupTable, cols).MakeDataTransform(input); + return new WordEmbeddingsTransform(env, args.CustomLookupTable, cols).MakeDataTransform(input); else - return new WordEmbeddingsExtractingTransformer(env, args.ModelKind.Value, cols).MakeDataTransform(input); + return new WordEmbeddingsTransform(env, args.ModelKind.Value, cols).MakeDataTransform(input); } - private WordEmbeddingsExtractingTransformer(IHost host, ModelLoadContext ctx) + private WordEmbeddingsTransform(IHost host, ModelLoadContext ctx) : base(host, ctx) { Host.AssertValue(ctx); @@ -283,16 +281,16 @@ private WordEmbeddingsExtractingTransformer(IHost host, ModelLoadContext ctx) } Host.CheckNonWhiteSpace(_modelFileNameWithPath, nameof(_modelFileNameWithPath)); - _currentVocab = GetVocabularyDictionary(host); + _currentVocab = GetVocabularyDictionary(); } - public static WordEmbeddingsExtractingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + public static WordEmbeddingsTransform Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); IHost h = env.Register(RegistrationName); h.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new WordEmbeddingsExtractingTransformer(h, ctx); + return new WordEmbeddingsTransform(h, ctx); } // Factory method for SignatureLoadDataTransform. @@ -326,12 +324,12 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].input, "Text", inputSchema.GetColumnType(srcCol).ToString()); } - private sealed class Mapper : OneToOneMapperBase, ISaveAsOnnx + private sealed class Mapper : MapperBase, ISaveAsOnnx { - private readonly WordEmbeddingsExtractingTransformer _parent; + private readonly WordEmbeddingsTransform _parent; private readonly VectorType _outputType; - public Mapper(WordEmbeddingsExtractingTransformer parent, Schema inputSchema) + public Mapper(WordEmbeddingsTransform parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { Host.CheckValue(inputSchema, nameof(inputSchema)); @@ -347,7 +345,7 @@ public Mapper(WordEmbeddingsExtractingTransformer parent, Schema inputSchema) public bool CanSaveOnnx(OnnxContext ctx) => true; - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() => _parent.ColumnPairs.Select(x => new Schema.Column(x.output, _outputType, null)).ToArray(); public void SaveAsOnnx(OnnxContext ctx) @@ -558,7 +556,7 @@ private void SaveAsOnnxCore(OnnxContext ctx, string srcVariableName, string dstV nodeP.AddAttribute("axis", 1); } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _parent.ColumnPairs.Length); @@ -585,37 +583,38 @@ private ValueGetter> GetGetterVec(IRow input, int iinfo) { int deno = 0; srcGetter(ref src); - var editor = VBufferEditor.Create(ref dst, 3 * dimension); + var values = dst.Values; + if (Utils.Size(values) != 3 * dimension) + values = new float[3 * dimension]; int offset = 2 * dimension; for (int i = 0; i < dimension; i++) { - editor.Values[i] = float.MaxValue; - editor.Values[i + dimension] = 0; - editor.Values[i + offset] = float.MinValue; + values[i] = float.MaxValue; + values[i + dimension] = 0; + values[i + offset] = float.MinValue; } - var srcValues = src.GetValues(); - for (int word = 0; word < srcValues.Length; word++) + for (int word = 0; word < src.Count; word++) { - if (_parent._currentVocab.GetWordVector(in srcValues[word], wordVector)) + if (_parent._currentVocab.GetWordVector(ref src.Values[word], wordVector)) { deno++; for (int i = 0; i < dimension; i++) { float currentTerm = wordVector[i]; - if (editor.Values[i] > currentTerm) - editor.Values[i] = currentTerm; - editor.Values[dimension + i] += currentTerm; - if (editor.Values[offset + i] < currentTerm) - editor.Values[offset + i] = currentTerm; + if (values[i] > currentTerm) + values[i] = currentTerm; + values[dimension + i] += currentTerm; + if (values[offset + i] < currentTerm) + values[offset + i] = currentTerm; } } } if (deno != 0) for (int index = 0; index < dimension; index++) - editor.Values[index + dimension] /= deno; + values[index + dimension] /= deno; - dst = editor.Commit(); + dst = new VBuffer(values.Length, values, dst.Indices); }; } } @@ -698,7 +697,7 @@ private string EnsureModelFile(IHostEnvironment env, out int linesToSkip, Pretra throw Host.Except($"Can't map model kind = {kind} to specific file, please refer to https://aka.ms/MLNetIssue for assistance"); } - private Model GetVocabularyDictionary(IHostEnvironment hostEnvironment) + private Model GetVocabularyDictionary() { int dimension = 0; if (!File.Exists(_modelFileNameWithPath)) @@ -724,96 +723,94 @@ private Model GetVocabularyDictionary(IHostEnvironment hostEnvironment) } } - using (var ch = Host.Start(LoaderSignature)) - using (var pch = Host.StartProgressChannel("Building Vocabulary from Model File for Word Embeddings Transform")) + Model model = null; + using (StreamReader sr = File.OpenText(_modelFileNameWithPath)) { - var parsedData = new ConcurrentBag<(string key, float[] values, long lineNumber)>(); - int skippedLinesCount = Math.Max(1, _linesToSkip); - - Parallel.ForEach(File.ReadLines(_modelFileNameWithPath).Skip(skippedLinesCount), GetParallelOptions(hostEnvironment), - (line, parallelState, lineNumber) => + string line; + int lineNumber = 1; + char[] delimiters = { ' ', '\t' }; + using (var ch = Host.Start(LoaderSignature)) + using (var pch = Host.StartProgressChannel("Building Vocabulary from Model File for Word Embeddings Transform")) + { + var header = new ProgressHeader(new[] { "lines" }); + pch.SetHeader(header, e => e.SetProgress(0, lineNumber)); + string firstLine = sr.ReadLine(); + while ((line = sr.ReadLine()) != null) { - (bool isSuccess, string key, float[] values) = LineParser.ParseKeyThenNumbers(line); - - if (isSuccess) - parsedData.Add((key, values, lineNumber + skippedLinesCount)); - else // we use shared state here (ch) but it's not our hot path and we don't care about unhappy-path performance - ch.Warning($"Parsing error while reading model file: '{_modelFileNameWithPath}', line number {lineNumber + skippedLinesCount}"); - }); + if (lineNumber >= _linesToSkip) + { + string[] words = line.TrimEnd().Split(delimiters); + dimension = words.Length - 1; + if (model == null) + model = new Model(dimension); + if (model.Dimension != dimension) + ch.Warning($"Dimension mismatch while reading model file: '{_modelFileNameWithPath}', line number {lineNumber + 1}, expected dimension = {model.Dimension}, received dimension = {dimension}"); + else + { + float tmp; + string key = words[0]; + float[] value = words.Skip(1).Select(x => float.TryParse(x, out tmp) ? tmp : Single.NaN).ToArray(); + if (!value.Contains(Single.NaN)) + model.AddWordVector(ch, key, value); + else + ch.Warning($"Parsing error while reading model file: '{_modelFileNameWithPath}', line number {lineNumber + 1}"); + } + } + lineNumber++; + } - Model model = null; - foreach (var parsedLine in parsedData.OrderBy(parsedLine => parsedLine.lineNumber)) - { - dimension = parsedLine.values.Length; + // Handle first line of the embedding file separately since some embedding files including fastText have a single-line header + string[] wordsInFirstLine = firstLine.TrimEnd().Split(delimiters); + dimension = wordsInFirstLine.Length - 1; if (model == null) model = new Model(dimension); - if (model.Dimension != dimension) - ch.Warning($"Dimension mismatch while reading model file: '{_modelFileNameWithPath}', line number {parsedLine.lineNumber}, expected dimension = {model.Dimension}, received dimension = {dimension}"); - else - model.AddWordVector(ch, parsedLine.key, parsedLine.values); - } - - // Handle first line of the embedding file separately since some embedding files including fastText have a single-line header - var firstLine = File.ReadLines(_modelFileNameWithPath).First(); - string[] wordsInFirstLine = firstLine.TrimEnd().Split(' ', '\t'); - dimension = wordsInFirstLine.Length - 1; - if (model == null) - model = new Model(dimension); - if (model.Dimension == dimension) - { - float temp; - string firstKey = wordsInFirstLine[0]; - float[] firstValue = wordsInFirstLine.Skip(1).Select(x => float.TryParse(x, out temp) ? temp : Single.NaN).ToArray(); - if (!firstValue.Contains(Single.NaN)) - model.AddWordVector(ch, firstKey, firstValue); + if (model.Dimension == dimension) + { + float temp; + string firstKey = wordsInFirstLine[0]; + float[] firstValue = wordsInFirstLine.Skip(1).Select(x => float.TryParse(x, out temp) ? temp : Single.NaN).ToArray(); + if (!firstValue.Contains(Single.NaN)) + model.AddWordVector(ch, firstKey, firstValue); + } + pch.Checkpoint(lineNumber); } - - _vocab[_modelFileNameWithPath] = new WeakReference(model, false); - return model; } + _vocab[_modelFileNameWithPath] = new WeakReference(model, false); + return model; } } - - private static ParallelOptions GetParallelOptions(IHostEnvironment hostEnvironment) - { - // "Less than 1 means whatever the component views as ideal." (about ConcurrencyFactor) - if (hostEnvironment.ConcurrencyFactor < 1) - return new ParallelOptions(); // we provide default options and let the Parallel decide - else - return new ParallelOptions() { MaxDegreeOfParallelism = hostEnvironment.ConcurrencyFactor }; - } } /// - public sealed class WordEmbeddingsExtractingEstimator : IEstimator + public sealed class WordEmbeddingsExtractorEstimator : IEstimator { private readonly IHost _host; - private readonly WordEmbeddingsExtractingTransformer.ColumnInfo[] _columns; - private readonly WordEmbeddingsExtractingTransformer.PretrainedModelKind? _modelKind; + private readonly WordEmbeddingsTransform.ColumnInfo[] _columns; + private readonly WordEmbeddingsTransform.PretrainedModelKind? _modelKind; private readonly string _customLookupTable; /// - /// Initializes a new instance of + /// Initializes a new instance of /// /// The local instance of /// The input column. /// The optional output column. If it is null the input column will be substituted with its value. - /// The embeddings to use. - public WordEmbeddingsExtractingEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, - WordEmbeddingsExtractingTransformer.PretrainedModelKind modelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe) - : this(env, modelKind, new WordEmbeddingsExtractingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn)) + /// The embeddings to use. + public WordEmbeddingsExtractorEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, + WordEmbeddingsTransform.PretrainedModelKind modelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe) + : this(env, modelKind, new WordEmbeddingsTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn)) { } /// - /// Initializes a new instance of + /// Initializes a new instance of /// /// The local instance of /// The input column. /// The optional output column. If it is null the input column will be substituted with its value. /// The path of the pre-trained embeedings model to use. - public WordEmbeddingsExtractingEstimator(IHostEnvironment env, string inputColumn, string outputColumn, string customModelFile) - : this(env, customModelFile, new WordEmbeddingsExtractingTransformer.ColumnInfo(inputColumn, outputColumn ?? inputColumn)) + public WordEmbeddingsExtractorEstimator(IHostEnvironment env, string inputColumn, string outputColumn, string customModelFile) + : this(env, customModelFile, new WordEmbeddingsTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn)) { } @@ -821,22 +818,22 @@ public WordEmbeddingsExtractingEstimator(IHostEnvironment env, string inputColum /// Extracts word embeddings. ///
/// The local instance of - /// The embeddings to use. + /// The embeddings to use. /// The array columns, and per-column configurations to extract embeedings from. - public WordEmbeddingsExtractingEstimator(IHostEnvironment env, - WordEmbeddingsExtractingTransformer.PretrainedModelKind modelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe, params WordEmbeddingsExtractingTransformer.ColumnInfo[] columns) + public WordEmbeddingsExtractorEstimator(IHostEnvironment env, + WordEmbeddingsTransform.PretrainedModelKind modelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe, params WordEmbeddingsTransform.ColumnInfo[] columns) { Contracts.CheckValue(env, nameof(env)); - _host = env.Register(nameof(WordEmbeddingsExtractingEstimator)); + _host = env.Register(nameof(WordEmbeddingsExtractorEstimator)); _modelKind = modelKind; _customLookupTable = null; _columns = columns; } - public WordEmbeddingsExtractingEstimator(IHostEnvironment env, string customModelFile, params WordEmbeddingsExtractingTransformer.ColumnInfo[] columns) + public WordEmbeddingsExtractorEstimator(IHostEnvironment env, string customModelFile, params WordEmbeddingsTransform.ColumnInfo[] columns) { Contracts.CheckValue(env, nameof(env)); - _host = env.Register(nameof(WordEmbeddingsExtractingEstimator)); + _host = env.Register(nameof(WordEmbeddingsExtractorEstimator)); _modelKind = null; _customLookupTable = customModelFile; _columns = columns; @@ -859,13 +856,13 @@ public SchemaShape GetOutputSchema(SchemaShape inputSchema) return new SchemaShape(result.Values); } - public WordEmbeddingsExtractingTransformer Fit(IDataView input) + public WordEmbeddingsTransform Fit(IDataView input) { bool customLookup = !string.IsNullOrWhiteSpace(_customLookupTable); if (customLookup) - return new WordEmbeddingsExtractingTransformer(_host, _customLookupTable, _columns); + return new WordEmbeddingsTransform(_host, _customLookupTable, _columns); else - return new WordEmbeddingsExtractingTransformer(_host, _modelKind.Value, _columns); + return new WordEmbeddingsTransform(_host, _modelKind.Value, _columns); } } @@ -875,7 +872,7 @@ public static class WordEmbeddingsStaticExtensions /// Vector of tokenized text. /// The pretrained word embedding model. /// - public static Vector WordEmbeddings(this VarVector input, WordEmbeddingsExtractingTransformer.PretrainedModelKind modelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe) + public static Vector WordEmbeddings(this VarVector input, WordEmbeddingsTransform.PretrainedModelKind modelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe) { Contracts.CheckValue(input, nameof(input)); return new OutColumn(input, modelKind); @@ -894,7 +891,7 @@ private sealed class OutColumn : Vector { public PipelineColumn Input { get; } - public OutColumn(VarVector input, WordEmbeddingsExtractingTransformer.PretrainedModelKind modelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe) + public OutColumn(VarVector input, WordEmbeddingsTransform.PretrainedModelKind modelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe) : base(new Reconciler(modelKind), input) { Input = input; @@ -909,10 +906,10 @@ public OutColumn(VarVector input, string customModelFile = null) private sealed class Reconciler : EstimatorReconciler { - private readonly WordEmbeddingsExtractingTransformer.PretrainedModelKind? _modelKind; + private readonly WordEmbeddingsTransform.PretrainedModelKind? _modelKind; private readonly string _customLookupTable; - public Reconciler(WordEmbeddingsExtractingTransformer.PretrainedModelKind modelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe) + public Reconciler(WordEmbeddingsTransform.PretrainedModelKind modelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe) { _modelKind = modelKind; _customLookupTable = null; @@ -932,18 +929,18 @@ public override IEstimator Reconcile(IHostEnvironment env, { Contracts.Assert(toOutput.Length == 1); - var cols = new WordEmbeddingsExtractingTransformer.ColumnInfo[toOutput.Length]; + var cols = new WordEmbeddingsTransform.ColumnInfo[toOutput.Length]; for (int i = 0; i < toOutput.Length; ++i) { var outCol = (OutColumn)toOutput[i]; - cols[i] = new WordEmbeddingsExtractingTransformer.ColumnInfo(inputNames[outCol.Input], outputNames[outCol]); + cols[i] = new WordEmbeddingsTransform.ColumnInfo(inputNames[outCol.Input], outputNames[outCol]); } bool customLookup = !string.IsNullOrWhiteSpace(_customLookupTable); if (customLookup) - return new WordEmbeddingsExtractingEstimator(env, _customLookupTable, cols); + return new WordEmbeddingsExtractorEstimator(env, _customLookupTable, cols); else - return new WordEmbeddingsExtractingEstimator(env, _modelKind.Value, cols); + return new WordEmbeddingsExtractorEstimator(env, _modelKind.Value, cols); } } } diff --git a/src/Microsoft.ML.Transforms/Text/WordHashBagProducingTransform.cs b/src/Microsoft.ML.Transforms/Text/WordHashBagTransform.cs similarity index 87% rename from src/Microsoft.ML.Transforms/Text/WordHashBagProducingTransform.cs rename to src/Microsoft.ML.Transforms/Text/WordHashBagTransform.cs index fa727b3bbd..aec1912bea 100644 --- a/src/Microsoft.ML.Transforms/Text/WordHashBagProducingTransform.cs +++ b/src/Microsoft.ML.Transforms/Text/WordHashBagTransform.cs @@ -14,19 +14,19 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(WordHashBagProducingTransformer.Summary, typeof(IDataTransform), typeof(WordHashBagProducingTransformer), typeof(WordHashBagProducingTransformer.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(WordHashBagTransform.Summary, typeof(IDataTransform), typeof(WordHashBagTransform), typeof(WordHashBagTransform.Arguments), typeof(SignatureDataTransform), "Word Hash Bag Transform", "WordHashBagTransform", "WordHashBag")] -[assembly: LoadableClass(NgramHashExtractingTransformer.Summary, typeof(INgramExtractorFactory), typeof(NgramHashExtractingTransformer), typeof(NgramHashExtractingTransformer.NgramHashExtractorArguments), - typeof(SignatureNgramExtractorFactory), "Ngram Hash Extractor Transform", "NgramHashExtractorTransform", "NgramHash", NgramHashExtractingTransformer.LoaderSignature)] +[assembly: LoadableClass(NgramHashExtractorTransform.Summary, typeof(INgramExtractorFactory), typeof(NgramHashExtractorTransform), typeof(NgramHashExtractorTransform.NgramHashExtractorArguments), + typeof(SignatureNgramExtractorFactory), "Ngram Hash Extractor Transform", "NgramHashExtractorTransform", "NgramHash", NgramHashExtractorTransform.LoaderSignature)] -[assembly: EntryPointModule(typeof(NgramHashExtractingTransformer.NgramHashExtractorArguments))] +[assembly: EntryPointModule(typeof(NgramHashExtractorTransform.NgramHashExtractorArguments))] namespace Microsoft.ML.Transforms.Text { - public static class WordHashBagProducingTransformer + public static class WordHashBagTransform { - public sealed class Column : NgramHashExtractingTransformer.ColumnBase + public sealed class Column : NgramHashExtractorTransform.ColumnBase { public static Column Parse(string str) { @@ -73,7 +73,7 @@ public bool TryUnparse(StringBuilder sb) } } - public sealed class Arguments : NgramHashExtractingTransformer.ArgumentsBase + public sealed class Arguments : NgramHashExtractorTransform.ArgumentsBase { [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "New column definition(s) (optional form: name:hashBits:srcs)", ShortName = "col", SortOrder = 1)] @@ -103,8 +103,8 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV var uniqueSourceNames = NgramExtractionUtils.GenerateUniqueSourceNames(h, args.Column, view.Schema); Contracts.Assert(uniqueSourceNames.Length == args.Column.Length); - var tokenizeColumns = new List(); - var extractorCols = new NgramHashExtractingTransformer.Column[args.Column.Length]; + var tokenizeColumns = new List(); + var extractorCols = new NgramHashExtractorTransform.Column[args.Column.Length]; var colCount = args.Column.Length; List tmpColNames = new List(); for (int iinfo = 0; iinfo < colCount; iinfo++) @@ -114,11 +114,11 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV var curTmpNames = new string[srcCount]; Contracts.Assert(uniqueSourceNames[iinfo].Length == args.Column[iinfo].Source.Length); for (int isrc = 0; isrc < srcCount; isrc++) - tokenizeColumns.Add(new WordTokenizingTransformer.ColumnInfo(args.Column[iinfo].Source[isrc], curTmpNames[isrc] = uniqueSourceNames[iinfo][isrc])); + tokenizeColumns.Add(new WordTokenizeTransform.ColumnInfo(args.Column[iinfo].Source[isrc], curTmpNames[isrc] = uniqueSourceNames[iinfo][isrc])); tmpColNames.AddRange(curTmpNames); extractorCols[iinfo] = - new NgramHashExtractingTransformer.Column + new NgramHashExtractorTransform.Column { Name = column.Name, Source = curTmpNames, @@ -136,7 +136,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV view = new WordTokenizingEstimator(env, tokenizeColumns.ToArray()).Fit(view).Transform(view); var featurizeArgs = - new NgramHashExtractingTransformer.Arguments + new NgramHashExtractorTransform.Arguments { AllLengths = args.AllLengths, HashBits = args.HashBits, @@ -148,10 +148,10 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV InvertHash = args.InvertHash }; - view = NgramHashExtractingTransformer.Create(h, featurizeArgs, view); + view = NgramHashExtractorTransform.Create(h, featurizeArgs, view); // Since we added columns with new names, we need to explicitly drop them before we return the IDataTransform. - return ColumnSelectingTransformer.CreateDrop(h, view, tmpColNames.ToArray()); + return SelectColumnsTransform.CreateDrop(h, view, tmpColNames.ToArray()); } } @@ -159,7 +159,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV /// A transform that turns a collection of tokenized text (vector of ReadOnlyMemory) into numerical feature vectors /// using the hashing trick. ///
- public static class NgramHashExtractingTransformer + public static class NgramHashExtractorTransform { public abstract class ColumnBase : ManyToOneColumn { @@ -245,8 +245,8 @@ public bool TryUnparse(StringBuilder sb) } /// - /// This class is a merger of and - /// , with the ordered option, + /// This class is a merger of and + /// , with the ordered option, /// the rehashUnigrams option and the allLength option removed. /// public abstract class ArgumentsBase @@ -316,11 +316,11 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV // bits (to minimize collisions) is applied first, followed by an NgramHashTransform. IDataView view = input; - List termCols = null; + List termCols = null; if (termLoaderArgs != null) - termCols = new List(); - var hashColumns = new List(); - var ngramHashColumns = new NgramHashingTransformer.Column[args.Column.Length]; + termCols = new List(); + var hashColumns = new List(); + var ngramHashColumns = new NgramHashTransform.Column[args.Column.Length]; var colCount = args.Column.Length; // The NGramHashExtractor has a ManyToOne column type. To avoid stepping over the source @@ -342,7 +342,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV if (termLoaderArgs != null) { termCols.Add( - new ValueToKeyMappingTransformer.Column + new TermTransform.Column { Name = tmpName, Source = column.Source[isrc] @@ -350,7 +350,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV } hashColumns.Add( - new HashingTransformer.Column + new HashTransformer.Column { Name = tmpName, Source = termLoaderArgs == null ? column.Source[isrc] : tmpName, @@ -362,7 +362,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV } ngramHashColumns[iinfo] = - new NgramHashingTransformer.Column + new NgramHashTransform.Column { Name = column.Name, Source = tmpColNames[iinfo], @@ -387,7 +387,7 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV { h.Assert(Utils.Size(termCols) == hashColumns.Count); var termArgs = - new ValueToKeyMappingTransformer.Arguments() + new TermTransform.Arguments() { MaxNumTerms = int.MaxValue, Terms = termLoaderArgs.Terms, @@ -398,20 +398,23 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV Sort = termLoaderArgs.Sort, Column = termCols.ToArray() }; - view = ValueToKeyMappingTransformer.Create(h, termArgs, view); + view = TermTransform.Create(h, termArgs, view); if (termLoaderArgs.DropUnknowns) { - var missingDropColumns = new (string input, string output)[termCols.Count]; + var naDropArgs = new NADropTransform.Arguments { Column = new NADropTransform.Column[termCols.Count] }; for (int iinfo = 0; iinfo < termCols.Count; iinfo++) - missingDropColumns[iinfo] = (termCols[iinfo].Name, termCols[iinfo].Name); - view = new MissingValueDroppingTransformer(h, missingDropColumns).Transform(view); + { + naDropArgs.Column[iinfo] = + new NADropTransform.Column { Name = termCols[iinfo].Name, Source = termCols[iinfo].Name }; + } + view = new NADropTransform(h, naDropArgs, view); } } // Args for the Hash function with multiple columns var hashArgs = - new HashingTransformer.Arguments + new HashTransformer.Arguments { HashBits = 31, Seed = args.Seed, @@ -420,11 +423,11 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV InvertHash = args.InvertHash }; - view = HashingTransformer.Create(h, hashArgs, view); + view = HashTransformer.Create(h, hashArgs, view); // creating the NgramHash function var ngramHashArgs = - new NgramHashingTransformer.Arguments + new NgramHashTransform.Arguments { AllLengths = args.AllLengths, HashBits = args.HashBits, @@ -437,8 +440,8 @@ public static IDataTransform Create(IHostEnvironment env, Arguments args, IDataV InvertHash = args.InvertHash }; - view = new NgramHashingTransformer(h, ngramHashArgs, view); - return ColumnSelectingTransformer.CreateDrop(h, view, tmpColNames.SelectMany(cols => cols).ToArray()); + view = new NgramHashTransform(h, ngramHashArgs, view); + return SelectColumnsTransform.CreateDrop(h, view, tmpColNames.SelectMany(cols => cols).ToArray()); } public static IDataTransform Create(NgramHashExtractorArguments extractorArgs, IHostEnvironment env, IDataView input, diff --git a/src/Microsoft.ML.Transforms/Text/WordTokenizing.cs b/src/Microsoft.ML.Transforms/Text/WordTokenizeTransform.cs similarity index 86% rename from src/Microsoft.ML.Transforms/Text/WordTokenizing.cs rename to src/Microsoft.ML.Transforms/Text/WordTokenizeTransform.cs index f5fc5a2710..9cc4d56bb6 100644 --- a/src/Microsoft.ML.Transforms/Text/WordTokenizing.cs +++ b/src/Microsoft.ML.Transforms/Text/WordTokenizeTransform.cs @@ -18,17 +18,17 @@ using System.Linq; using System.Text; -[assembly: LoadableClass(WordTokenizingTransformer.Summary, typeof(IDataTransform), typeof(WordTokenizingTransformer), typeof(WordTokenizingTransformer.Arguments), typeof(SignatureDataTransform), +[assembly: LoadableClass(WordTokenizeTransform.Summary, typeof(IDataTransform), typeof(WordTokenizeTransform), typeof(WordTokenizeTransform.Arguments), typeof(SignatureDataTransform), "Word Tokenizer Transform", "WordTokenizeTransform", "DelimitedTokenizeTransform", "WordToken", "DelimitedTokenize", "Token")] -[assembly: LoadableClass(WordTokenizingTransformer.Summary, typeof(IDataTransform), typeof(WordTokenizingTransformer), null, typeof(SignatureLoadDataTransform), - "Word Tokenizer Transform", WordTokenizingTransformer.LoaderSignature)] +[assembly: LoadableClass(WordTokenizeTransform.Summary, typeof(IDataTransform), typeof(WordTokenizeTransform), null, typeof(SignatureLoadDataTransform), + "Word Tokenizer Transform", WordTokenizeTransform.LoaderSignature)] -[assembly: LoadableClass(WordTokenizingTransformer.Summary, typeof(WordTokenizingTransformer), null, typeof(SignatureLoadModel), - "Word Tokenizer Transform", WordTokenizingTransformer.LoaderSignature)] +[assembly: LoadableClass(WordTokenizeTransform.Summary, typeof(WordTokenizeTransform), null, typeof(SignatureLoadModel), + "Word Tokenizer Transform", WordTokenizeTransform.LoaderSignature)] -[assembly: LoadableClass(typeof(IRowMapper), typeof(WordTokenizingTransformer), null, typeof(SignatureLoadRowMapper), - "Word Tokenizer Transform", WordTokenizingTransformer.LoaderSignature)] +[assembly: LoadableClass(typeof(IRowMapper), typeof(WordTokenizeTransform), null, typeof(SignatureLoadRowMapper), + "Word Tokenizer Transform", WordTokenizeTransform.LoaderSignature)] namespace Microsoft.ML.Transforms.Text { @@ -37,7 +37,7 @@ namespace Microsoft.ML.Transforms.Text // corresponding to the tokens in the input text, split using a set of user specified separator characters. // Empty strings and strings containing only spaces are dropped. /// - public sealed class WordTokenizingTransformer : OneToOneTransformerBase + public sealed class WordTokenizeTransform : OneToOneTransformerBase { public class Column : OneToOneColumn { @@ -105,7 +105,7 @@ private static VersionInfo GetVersionInfo() verReadableCur: 0x00010001, verWeCanReadBack: 0x00010001, loaderSignature: LoaderSignature, - loaderAssemblyName: typeof(WordTokenizingTransformer).Assembly.FullName); + loaderAssemblyName: typeof(WordTokenizeTransform).Assembly.FullName); } private const string RegistrationName = "DelimitedTokenize"; @@ -138,7 +138,7 @@ private static (string input, string output)[] GetColumnPairs(ColumnInfo[] colum return columns.Select(x => (x.Input, x.Output)).ToArray(); } - public WordTokenizingTransformer(IHostEnvironment env, params ColumnInfo[] columns) : + public WordTokenizeTransform(IHostEnvironment env, params ColumnInfo[] columns) : base(Contracts.CheckRef(env, nameof(env)).Register(RegistrationName), GetColumnPairs(columns)) { _columns = columns.ToArray(); @@ -151,7 +151,7 @@ protected override void CheckInputColumn(ISchema inputSchema, int col, int srcCo throw Host.ExceptSchemaMismatch(nameof(inputSchema), "input", ColumnPairs[col].input, WordTokenizingEstimator.ExpectedColumnType, type.ToString()); } - private WordTokenizingTransformer(IHost host, ModelLoadContext ctx) : + private WordTokenizeTransform(IHost host, ModelLoadContext ctx) : base(host, ctx) { var columnsLength = ColumnPairs.Length; @@ -188,13 +188,13 @@ public override void Save(ModelSaveContext ctx) } // Factory method for SignatureLoadModel. - private static WordTokenizingTransformer Create(IHostEnvironment env, ModelLoadContext ctx) + private static WordTokenizeTransform Create(IHostEnvironment env, ModelLoadContext ctx) { Contracts.CheckValue(env, nameof(env)); var host = env.Register(RegistrationName); host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(GetVersionInfo()); - return new WordTokenizingTransformer(host, ctx); + return new WordTokenizeTransform(host, ctx); } // Factory method for SignatureDataTransform. @@ -213,7 +213,7 @@ internal static IDataTransform Create(IHostEnvironment env, Arguments args, IDat cols[i] = new ColumnInfo(item.Source ?? item.Name, item.Name, separators); } - return new WordTokenizingTransformer(env, cols).MakeDataTransform(input); + return new WordTokenizeTransform(env, cols).MakeDataTransform(input); } // Factory method for SignatureLoadRowMapper. @@ -222,15 +222,15 @@ private static IRowMapper Create(IHostEnvironment env, ModelLoadContext ctx, ISc protected override IRowMapper MakeRowMapper(Schema schema) => new Mapper(this, schema); - private sealed class Mapper : OneToOneMapperBase, ISaveAsPfa + private sealed class Mapper : MapperBase, ISaveAsPfa { private readonly ColumnType _type; - private readonly WordTokenizingTransformer _parent; + private readonly WordTokenizeTransform _parent; private readonly bool[] _isSourceVector; public bool CanSavePfa => true; - public Mapper(WordTokenizingTransformer parent, Schema inputSchema) + public Mapper(WordTokenizeTransform parent, Schema inputSchema) : base(parent.Host.Register(nameof(Mapper)), parent, inputSchema) { _parent = parent; @@ -244,7 +244,7 @@ public Mapper(WordTokenizingTransformer parent, Schema inputSchema) } } - protected override Schema.Column[] GetOutputColumnsCore() + public override Schema.Column[] GetOutputColumns() { var result = new Schema.Column[_parent.ColumnPairs.Length]; for (int i = 0; i < _parent.ColumnPairs.Length; i++) @@ -256,7 +256,7 @@ protected override Schema.Column[] GetOutputColumnsCore() return result; } - protected override Delegate MakeGetter(IRow input, int iinfo, Func activeOutput, out Action disposer) + protected override Delegate MakeGetter(IRow input, int iinfo, out Action disposer) { Host.AssertValue(input); Host.Assert(0 <= iinfo && iinfo < _parent._columns.Length); @@ -287,13 +287,15 @@ private ValueGetter>> MakeGetterOne(IRow input, int AddTerms(src, separators, terms); - var editor = VBufferEditor.Create(ref dst, terms.Count); + var values = dst.Values; if (terms.Count > 0) { - terms.CopyTo(editor.Values); + if (Utils.Size(values) < terms.Count) + values = new ReadOnlyMemory[terms.Count]; + terms.CopyTo(values); } - dst = editor.Commit(); + dst = new VBuffer>(terms.Count, values, dst.Indices); }; } @@ -314,14 +316,18 @@ private ValueGetter>> MakeGetterVec(IRow input, int getSrc(ref src); terms.Clear(); - var srcValues = src.GetValues(); - for (int i = 0; i < srcValues.Length; i++) - AddTerms(srcValues[i], separators, terms); + for (int i = 0; i < src.Count; i++) + AddTerms(src.Values[i], separators, terms); - var editor = VBufferEditor.Create(ref dst, terms.Count); - for (int i = 0; i < terms.Count; i++) - editor.Values[i] = terms[i]; - dst = editor.Commit(); + var values = dst.Values; + if (terms.Count > 0) + { + if (Utils.Size(values) < terms.Count) + values = new ReadOnlyMemory[terms.Count]; + terms.CopyTo(values); + } + + dst = new VBuffer>(terms.Count, values, dst.Indices); }; } @@ -355,7 +361,7 @@ private void AddTerms(ReadOnlyMemory txt, char[] separators, List - public sealed class WordTokenizingEstimator : TrivialEstimator + public sealed class WordTokenizingEstimator : TrivialEstimator { public static bool IsColumnTypeValid(ColumnType type) => type.ItemType.IsText; @@ -450,7 +456,7 @@ public WordTokenizingEstimator(IHostEnvironment env, string inputColumn, string /// Pairs of columns to run the tokenization on. /// The separators to use (uses space character by default). public WordTokenizingEstimator(IHostEnvironment env, (string input, string output)[] columns, char[] separators = null) - : this(env, columns.Select(x => new WordTokenizingTransformer.ColumnInfo(x.input, x.output, separators)).ToArray()) + : this(env, columns.Select(x => new WordTokenizeTransform.ColumnInfo(x.input, x.output, separators)).ToArray()) { } @@ -459,8 +465,8 @@ public WordTokenizingEstimator(IHostEnvironment env, (string input, string outpu ///
/// The environment. /// Pairs of columns to run the tokenization on. - public WordTokenizingEstimator(IHostEnvironment env, params WordTokenizingTransformer.ColumnInfo[] columns) - : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(WordTokenizingEstimator)), new WordTokenizingTransformer(env, columns)) + public WordTokenizingEstimator(IHostEnvironment env, params WordTokenizeTransform.ColumnInfo[] columns) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(WordTokenizingEstimator)), new WordTokenizeTransform(env, columns)) { } diff --git a/src/Microsoft.ML.Transforms/Text/WrappedTextTransformers.cs b/src/Microsoft.ML.Transforms/Text/WrappedTextTransformers.cs index e5fd8f8cce..4d61d67bc6 100644 --- a/src/Microsoft.ML.Transforms/Text/WrappedTextTransformers.cs +++ b/src/Microsoft.ML.Transforms/Text/WrappedTextTransformers.cs @@ -7,7 +7,7 @@ using Microsoft.ML.Runtime.Internal.Utilities; using System; using System.Linq; -using static Microsoft.ML.Transforms.Text.StopWordsRemovingTransformer; +using static Microsoft.ML.Transforms.Text.StopWordsRemoverTransform; namespace Microsoft.ML.Transforms.Text { @@ -55,9 +55,9 @@ private static TransformWrapper MakeTransformer(IHostEnvironment env, (string in } // Create arguments. - var args = new StopWordsRemovingTransformer.Arguments + var args = new StopWordsRemoverTransform.Arguments { - Column = columns.Select(x => new StopWordsRemovingTransformer.Column { Source = x.input, Name = x.output }).ToArray(), + Column = columns.Select(x => new StopWordsRemoverTransform.Column { Source = x.input, Name = x.output }).ToArray(), Language = language }; @@ -65,7 +65,7 @@ private static TransformWrapper MakeTransformer(IHostEnvironment env, (string in var schema = new Schema(columns.Select(x => new Schema.Column(x.input, new VectorType(TextType.Instance), null))); var emptyData = new EmptyDataView(env, schema); - return new TransformWrapper(env, new StopWordsRemovingTransformer(env, args, emptyData)); + return new TransformWrapper(env, new StopWordsRemoverTransform(env, args, emptyData)); } } @@ -80,7 +80,7 @@ public sealed class WordBagEstimator : TrainedWrapperEstimatorBase private readonly int _skipLength; private readonly bool _allLengths; private readonly int _maxNumTerms; - private readonly NgramCountingEstimator.WeightingCriteria _weighting; + private readonly NgramTransform.WeightingCriteria _weighting; /// /// Produces a bag of counts of ngrams (sequences of consecutive words) in @@ -101,7 +101,7 @@ public WordBagEstimator(IHostEnvironment env, int skipLength = 0, bool allLengths = true, int maxNumTerms = 10000000, - NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.WeightingCriteria.Tf) + NgramTransform.WeightingCriteria weighting = NgramTransform.WeightingCriteria.Tf) : this(env, new[] { (new[] { inputColumn }, outputColumn ?? inputColumn) }, ngramLength, skipLength, allLengths, maxNumTerms, weighting) { } @@ -125,7 +125,7 @@ public WordBagEstimator(IHostEnvironment env, int skipLength = 0, bool allLengths = true, int maxNumTerms = 10000000, - NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.WeightingCriteria.Tf) + NgramTransform.WeightingCriteria weighting = NgramTransform.WeightingCriteria.Tf) : this(env, new[] { (inputColumns, outputColumn) }, ngramLength, skipLength, allLengths, maxNumTerms, weighting) { } @@ -147,7 +147,7 @@ public WordBagEstimator(IHostEnvironment env, int skipLength = 0, bool allLengths = true, int maxNumTerms = 10000000, - NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.WeightingCriteria.Tf) + NgramTransform.WeightingCriteria weighting = NgramTransform.WeightingCriteria.Tf) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(WordBagEstimator))) { foreach (var (input, output) in columns) @@ -167,9 +167,9 @@ public WordBagEstimator(IHostEnvironment env, public override TransformWrapper Fit(IDataView input) { // Create arguments. - var args = new WordBagBuildingTransformer.Arguments + var args = new WordBagTransform.Arguments { - Column = _columns.Select(x => new WordBagBuildingTransformer.Column { Source = x.inputs, Name = x.output }).ToArray(), + Column = _columns.Select(x => new WordBagTransform.Column { Source = x.inputs, Name = x.output }).ToArray(), NgramLength = _ngramLength, SkipLength = _skipLength, AllLengths = _allLengths, @@ -177,7 +177,7 @@ public override TransformWrapper Fit(IDataView input) Weighting = _weighting }; - return new TransformWrapper(Host, WordBagBuildingTransformer.Create(Host, args, input)); + return new TransformWrapper(Host, WordBagTransform.Create(Host, args, input)); } } @@ -295,9 +295,9 @@ public WordHashBagEstimator(IHostEnvironment env, public override TransformWrapper Fit(IDataView input) { // Create arguments. - var args = new WordHashBagProducingTransformer.Arguments + var args = new WordHashBagTransform.Arguments { - Column = _columns.Select(x => new WordHashBagProducingTransformer.Column { Source = x.inputs, Name = x.output }).ToArray(), + Column = _columns.Select(x => new WordHashBagTransform.Column { Source = x.inputs, Name = x.output }).ToArray(), HashBits = _hashBits, NgramLength = _ngramLength, SkipLength = _skipLength, @@ -307,7 +307,95 @@ public override TransformWrapper Fit(IDataView input) InvertHash = _invertHash }; - return new TransformWrapper(Host, WordHashBagProducingTransformer.Create(Host, args, input)); + return new TransformWrapper(Host, WordHashBagTransform.Create(Host, args, input)); + } + } + + /// + /// Produces a bag of counts of ngrams(sequences of consecutive values of length 1-n) in a given vector of keys. + /// It does so by building a dictionary of ngrams and using the id in the dictionary as the index in the bag. + /// + public sealed class NgramEstimator : TrainedWrapperEstimatorBase + { + private readonly (string inputs, string output)[] _columns; + private readonly int _ngramLength; + private readonly int _skipLength; + private readonly bool _allLengths; + private readonly int _maxNumTerms; + private readonly NgramTransform.WeightingCriteria _weighting; + + /// + /// Produces a bag of counts of ngrams (sequences of consecutive words) in + /// and outputs bag of word vector as + /// + /// The environment. + /// The column containing text to compute bag of word vector. + /// The column containing bag of word vector. Null means is replaced. + /// Ngram length. + /// Maximum number of tokens to skip when constructing an ngram. + /// Whether to include all ngram lengths up to or only . + /// Maximum number of ngrams to store in the dictionary. + /// Statistical measure used to evaluate how important a word is to a document in a corpus. + public NgramEstimator(IHostEnvironment env, + string inputColumn, + string outputColumn = null, + int ngramLength = 2, + int skipLength = 0, + bool allLengths = true, + int maxNumTerms = 10000000, + NgramTransform.WeightingCriteria weighting = NgramTransform.WeightingCriteria.Tf) + : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, ngramLength, skipLength, allLengths, maxNumTerms, weighting) + { + } + + /// + /// Produces a bag of counts of ngrams (sequences of consecutive words) in + /// and outputs bag of word vector for each output in + /// + /// The environment. + /// Pairs of columns to compute bag of word vector. + /// Ngram length. + /// Maximum number of tokens to skip when constructing an ngram. + /// Whether to include all ngram lengths up to or only . + /// Maximum number of ngrams to store in the dictionary. + /// Statistical measure used to evaluate how important a word is to a document in a corpus. + public NgramEstimator(IHostEnvironment env, + (string inputs, string output)[] columns, + int ngramLength = 2, + int skipLength = 0, + bool allLengths = true, + int maxNumTerms = 10000000, + NgramTransform.WeightingCriteria weighting = NgramTransform.WeightingCriteria.Tf) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(WordBagEstimator))) + { + foreach (var (input, output) in columns) + { + Host.CheckUserArg(Utils.Size(input) > 0, nameof(input)); + Host.CheckValue(output, nameof(input)); + } + + _columns = columns; + _ngramLength = ngramLength; + _skipLength = skipLength; + _allLengths = allLengths; + _maxNumTerms = maxNumTerms; + _weighting = weighting; + } + + public override TransformWrapper Fit(IDataView input) + { + // Create arguments. + var args = new NgramTransform.Arguments + { + Column = _columns.Select(x => new NgramTransform.Column { Source = x.inputs, Name = x.output }).ToArray(), + NgramLength = _ngramLength, + SkipLength = _skipLength, + AllLengths = _allLengths, + MaxNumTerms = new[] { _maxNumTerms }, + Weighting = _weighting + }; + + return new TransformWrapper(Host, new NgramTransform(Host, args, input)); } } @@ -437,9 +525,9 @@ public NgramHashEstimator(IHostEnvironment env, public override TransformWrapper Fit(IDataView input) { // Create arguments. - var args = new NgramHashingTransformer.Arguments + var args = new NgramHashTransform.Arguments { - Column = _columns.Select(x => new NgramHashingTransformer.Column { Source = x.inputs, Name = x.output }).ToArray(), + Column = _columns.Select(x => new NgramHashTransform.Column { Source = x.inputs, Name = x.output }).ToArray(), HashBits = _hashBits, NgramLength = _ngramLength, SkipLength = _skipLength, @@ -449,7 +537,53 @@ public override TransformWrapper Fit(IDataView input) InvertHash = _invertHash }; - return new TransformWrapper(Host, new NgramHashingTransformer(Host, args, input)); + return new TransformWrapper(Host, new NgramHashTransform(Host, args, input)); + } + } + + /// + public sealed class LdaEstimator : TrainedWrapperEstimatorBase + { + private readonly LdaTransform.Arguments _args; + + /// + /// The environment. + /// The column containing text to tokenize. + /// The column containing output tokens. Null means is replaced. + /// The number of topics in the LDA. + /// A delegate to apply all the advanced arguments to the algorithm. + public LdaEstimator(IHostEnvironment env, + string inputColumn, + string outputColumn = null, + int numTopic = 100, + Action advancedSettings = null) + : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, + numTopic, + advancedSettings) + { + } + + /// + /// The environment. + /// Pairs of columns to compute LDA. + /// The number of topics in the LDA. + /// A delegate to apply all the advanced arguments to the algorithm. + public LdaEstimator(IHostEnvironment env, + (string input, string output)[] columns, + int numTopic = 100, + Action advancedSettings = null) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(LdaEstimator))) + { + _args = new LdaTransform.Arguments(); + _args.Column = columns.Select(x => new LdaTransform.Column { Source = x.input, Name = x.output }).ToArray(); + _args.NumTopic = numTopic; + + advancedSettings?.Invoke(_args); + } + + public override TransformWrapper Fit(IDataView input) + { + return new TransformWrapper(Host, new LdaTransform(Host, _args, input)); } } } \ No newline at end of file diff --git a/src/Microsoft.ML.Transforms/TextCatalog.cs b/src/Microsoft.ML.Transforms/TextCatalog.cs index c3b01bfe0b..e7d6ba892b 100644 --- a/src/Microsoft.ML.Transforms/TextCatalog.cs +++ b/src/Microsoft.ML.Transforms/TextCatalog.cs @@ -10,7 +10,7 @@ namespace Microsoft.ML { - using CharTokenizingDefaults = TokenizingByCharactersEstimator.Defaults; + using CharTokenizingDefaults = CharacterTokenizingEstimator.Defaults; using TextNormalizeDefaults = TextNormalizingEstimator.Defaults; public static class TextCatalog @@ -25,7 +25,14 @@ public static class TextCatalog /// /// /// + /// + /// + /// + /// + /// /// /// @@ -57,11 +64,11 @@ public static TextFeaturizingEstimator FeaturizeText(this TransformsCatalog.Text /// The column containing text to tokenize. /// The column containing output tokens. Null means is replaced. /// Whether to use marker characters to separate words. - public static TokenizingByCharactersEstimator TokenizeCharacters(this TransformsCatalog.TextTransforms catalog, + public static CharacterTokenizingEstimator TokenizeCharacters(this TransformsCatalog.TextTransforms catalog, string inputColumn, string outputColumn = null, bool useMarkerCharacters = CharTokenizingDefaults.UseMarkerCharacters) - => new TokenizingByCharactersEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), + => new CharacterTokenizingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), useMarkerCharacters, new[] { (inputColumn, outputColumn) }); /// @@ -71,10 +78,10 @@ public static TokenizingByCharactersEstimator TokenizeCharacters(this Transforms /// Whether to use marker characters to separate words. /// Pairs of columns to run the tokenization on. - public static TokenizingByCharactersEstimator TokenizeCharacters(this TransformsCatalog.TextTransforms catalog, + public static CharacterTokenizingEstimator TokenizeCharacters(this TransformsCatalog.TextTransforms catalog, bool useMarkerCharacters = CharTokenizingDefaults.UseMarkerCharacters, params (string inputColumn, string outputColumn)[] columns) - => new TokenizingByCharactersEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), useMarkerCharacters, columns); + => new CharacterTokenizingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), useMarkerCharacters, columns); /// /// Normalizes incoming text in by changing case, removing diacritical marks, punctuation marks and/or numbers @@ -103,12 +110,12 @@ public static TextNormalizingEstimator NormalizeText(this TransformsCatalog.Text /// The text-related transform's catalog. /// The input column. /// The optional output column. If it is null the input column will be substituted with its value. - /// The embeddings to use. - public static WordEmbeddingsExtractingEstimator ExtractWordEmbeddings(this TransformsCatalog.TextTransforms catalog, + /// The embeddings to use. + public static WordEmbeddingsExtractorEstimator ExtractWordEmbeedings(this TransformsCatalog.TextTransforms catalog, string inputColumn, string outputColumn = null, - WordEmbeddingsExtractingTransformer.PretrainedModelKind modelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe) - => new WordEmbeddingsExtractingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), inputColumn, outputColumn, modelKind); + WordEmbeddingsTransform.PretrainedModelKind modelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe) + => new WordEmbeddingsExtractorEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), inputColumn, outputColumn, modelKind); /// /// Extracts word embeddings. @@ -117,23 +124,23 @@ public static WordEmbeddingsExtractingEstimator ExtractWordEmbeddings(this Trans /// The input column. /// The optional output column. If it is null the input column will be substituted with its value. /// The path of the pre-trained embeedings model to use. - public static WordEmbeddingsExtractingEstimator ExtractWordEmbeddings(this TransformsCatalog.TextTransforms catalog, + public static WordEmbeddingsExtractorEstimator ExtractWordEmbeedings(this TransformsCatalog.TextTransforms catalog, string inputColumn, string customModelFile, string outputColumn = null) - => new WordEmbeddingsExtractingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), + => new WordEmbeddingsExtractorEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), inputColumn, outputColumn, customModelFile); /// /// Extracts word embeddings. /// /// The text-related transform's catalog. - /// The embeddings to use. + /// The embeddings to use. /// The array columns, and per-column configurations to extract embeedings from. - public static WordEmbeddingsExtractingEstimator ExtractWordEmbeddings(this TransformsCatalog.TextTransforms catalog, - WordEmbeddingsExtractingTransformer.PretrainedModelKind modelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe, - params WordEmbeddingsExtractingTransformer.ColumnInfo[] columns) - => new WordEmbeddingsExtractingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), modelKind, columns); + public static WordEmbeddingsExtractorEstimator ExtractWordEmbeedings(this TransformsCatalog.TextTransforms catalog, + WordEmbeddingsTransform.PretrainedModelKind modelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe, + params WordEmbeddingsTransform.ColumnInfo[] columns) + => new WordEmbeddingsExtractorEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), modelKind, columns); /// /// Tokenizes incoming text in , using as separators, @@ -166,112 +173,8 @@ public static WordTokenizingEstimator TokenizeWords(this TransformsCatalog.TextT /// The text-related transform's catalog. /// Pairs of columns to run the tokenization on. public static WordTokenizingEstimator TokenizeWords(this TransformsCatalog.TextTransforms catalog, - params WordTokenizingTransformer.ColumnInfo[] columns) + params WordTokenizeTransform.ColumnInfo[] columns) => new WordTokenizingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), columns); - /// - /// Produces a bag of counts of ngrams (sequences of consecutive words) in - /// and outputs bag of word vector as - /// - /// The text-related transform's catalog. - /// The column containing text to compute bag of word vector. - /// The column containing bag of word vector. Null means is replaced. - /// Ngram length. - /// Maximum number of tokens to skip when constructing an ngram. - /// Whether to include all ngram lengths up to or only . - /// Maximum number of ngrams to store in the dictionary. - /// Statistical measure used to evaluate how important a word is to a document in a corpus. - /// - /// - /// - /// - /// - public static NgramCountingEstimator ProduceNgrams(this TransformsCatalog.TextTransforms catalog, - string inputColumn, - string outputColumn = null, - int ngramLength = NgramCountingEstimator.Defaults.NgramLength, - int skipLength = NgramCountingEstimator.Defaults.SkipLength, - bool allLengths = NgramCountingEstimator.Defaults.AllLength, - int maxNumTerms = NgramCountingEstimator.Defaults.MaxNumTerms, - NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.Defaults.Weighting) => - new NgramCountingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), inputColumn, outputColumn, - ngramLength, skipLength, allLengths, maxNumTerms, weighting); - - /// - /// Produces a bag of counts of ngrams (sequences of consecutive words) in - /// and outputs bag of word vector for each output in - /// - /// The text-related transform's catalog. - /// Pairs of columns to compute bag of word vector. - /// Ngram length. - /// Maximum number of tokens to skip when constructing an ngram. - /// Whether to include all ngram lengths up to or only . - /// Maximum number of ngrams to store in the dictionary. - /// Statistical measure used to evaluate how important a word is to a document in a corpus. - public static NgramCountingEstimator ProduceNgrams(this TransformsCatalog.TextTransforms catalog, - (string input, string output)[] columns, - int ngramLength = NgramCountingEstimator.Defaults.NgramLength, - int skipLength = NgramCountingEstimator.Defaults.SkipLength, - bool allLengths = NgramCountingEstimator.Defaults.AllLength, - int maxNumTerms = NgramCountingEstimator.Defaults.MaxNumTerms, - NgramCountingEstimator.WeightingCriteria weighting = NgramCountingEstimator.Defaults.Weighting) - => new NgramCountingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), columns, - ngramLength, skipLength, allLengths, maxNumTerms, weighting); - - /// - /// Produces a bag of counts of ngrams (sequences of consecutive words) in - /// and outputs bag of word vector for each output in - /// - /// The text-related transform's catalog. - /// Pairs of columns to run the ngram process on. - public static NgramCountingEstimator ProduceNgrams(this TransformsCatalog.TextTransforms catalog, - params NgramCountingTransformer.ColumnInfo[] columns) - => new NgramCountingEstimator(Contracts.CheckRef(catalog, nameof(catalog)).GetEnvironment(), columns); - - /// - /// Uses LightLDA to transform a document (represented as a vector of floats) - /// into a vector of floats over a set of topics. - /// - /// The transform's catalog. - /// The column representing the document as a vector of floats. - /// The column containing the output scores over a set of topics, represented as a vector of floats. A null value for the column means is replaced. - /// The number of topics. - /// Dirichlet prior on document-topic vectors. - /// Dirichlet prior on vocab-topic vectors. - /// Number of Metropolis Hasting step. - /// Number of iterations. - /// Compute log likelihood over local dataset on this iteration interval. - /// The number of training threads. Default value depends on number of logical processors. - /// The threshold of maximum count of tokens per doc. - /// The number of words to summarize the topic. - /// The number of burn-in iterations. - /// Reset the random number generator for each document. - public static LatentDirichletAllocationEstimator LatentDirichletAllocation(this TransformsCatalog.TextTransforms catalog, - string inputColumn, - string outputColumn = null, - int numTopic = LatentDirichletAllocationEstimator.Defaults.NumTopic, - float alphaSum = LatentDirichletAllocationEstimator.Defaults.AlphaSum, - float beta = LatentDirichletAllocationEstimator.Defaults.Beta, - int mhstep = LatentDirichletAllocationEstimator.Defaults.Mhstep, - int numIterations = LatentDirichletAllocationEstimator.Defaults.NumIterations, - int likelihoodInterval = LatentDirichletAllocationEstimator.Defaults.LikelihoodInterval, - int numThreads = LatentDirichletAllocationEstimator.Defaults.NumThreads, - int numMaxDocToken = LatentDirichletAllocationEstimator.Defaults.NumMaxDocToken, - int numSummaryTermPerTopic = LatentDirichletAllocationEstimator.Defaults.NumSummaryTermPerTopic, - int numBurninIterations = LatentDirichletAllocationEstimator.Defaults.NumBurninIterations, - bool resetRandomGenerator = LatentDirichletAllocationEstimator.Defaults.ResetRandomGenerator) - => new LatentDirichletAllocationEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, numTopic, alphaSum, beta, mhstep, numIterations, likelihoodInterval, numThreads, numMaxDocToken, - numSummaryTermPerTopic, numBurninIterations, resetRandomGenerator); - - /// - /// Uses LightLDA to transform a document (represented as a vector of floats) - /// into a vector of floats over a set of topics. - /// - /// The transform's catalog. - /// Describes the parameters of LDA for each column pair. - public static LatentDirichletAllocationEstimator LatentDirichletAllocation(this TransformsCatalog.TextTransforms catalog, params LatentDirichletAllocationTransformer.ColumnInfo[] columns) - => new LatentDirichletAllocationEstimator(CatalogUtils.GetEnvironment(catalog), columns); } } diff --git a/src/Microsoft.ML.Transforms/TransformsStatic.cs b/src/Microsoft.ML.Transforms/TransformsStatic.cs deleted file mode 100644 index fc23ebfb38..0000000000 --- a/src/Microsoft.ML.Transforms/TransformsStatic.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Core.Data; -using Microsoft.ML.Runtime; -using Microsoft.ML.StaticPipe.Runtime; -using Microsoft.ML.Transforms.Projections; -using System.Collections.Generic; - -namespace Microsoft.ML.StaticPipe -{ - /// - /// Extensions for statically typed . - /// - public static class LpNormalizerExtensions - { - private sealed class OutPipelineColumn : Vector - { - public readonly Vector Input; - - public OutPipelineColumn(Vector input, LpNormalizingEstimatorBase.NormalizerKind normKind, bool subMean) - : base(new Reconciler(normKind, subMean), input) - { - Input = input; - } - } - - private sealed class Reconciler : EstimatorReconciler - { - private readonly LpNormalizingEstimatorBase.NormalizerKind _normKind; - private readonly bool _subMean; - - public Reconciler(LpNormalizingEstimatorBase.NormalizerKind normKind, bool subMean) - { - _normKind = normKind; - _subMean = subMean; - } - - public override IEstimator Reconcile(IHostEnvironment env, - PipelineColumn[] toOutput, - IReadOnlyDictionary inputNames, - IReadOnlyDictionary outputNames, - IReadOnlyCollection usedNames) - { - Contracts.Assert(toOutput.Length == 1); - - var pairs = new List<(string input, string output)>(); - foreach (var outCol in toOutput) - pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); - - return new LpNormalizingEstimator(env, pairs.ToArray(), _normKind, _subMean); - } - } - - /// - /// The column to apply to. - /// Type of norm to use to normalize each sample. - /// Subtract mean from each value before normalizing. - public static Vector LpNormalize(this Vector input, - LpNormalizingEstimatorBase.NormalizerKind normKind = LpNormalizingEstimatorBase.Defaults.NormKind, - bool subMean = LpNormalizingEstimatorBase.Defaults.LpSubstractMean) => new OutPipelineColumn(input, normKind, subMean); - } - - /// - /// Extensions for statically typed . - /// - public static class GlobalContrastNormalizerExtensions - { - private sealed class OutPipelineColumn : Vector - { - public readonly Vector Input; - - public OutPipelineColumn(Vector input, bool subMean, bool useStdDev, float scale) - : base(new Reconciler(subMean, useStdDev, scale), input) - { - Input = input; - } - } - - private sealed class Reconciler : EstimatorReconciler - { - private readonly bool _subMean; - private readonly bool _useStdDev; - private readonly float _scale; - - public Reconciler(bool subMean, bool useStdDev, float scale) - { - _subMean = subMean; - _useStdDev = useStdDev; - _scale = scale; - } - - public override IEstimator Reconcile(IHostEnvironment env, - PipelineColumn[] toOutput, - IReadOnlyDictionary inputNames, - IReadOnlyDictionary outputNames, - IReadOnlyCollection usedNames) - { - Contracts.Assert(toOutput.Length == 1); - - var pairs = new List<(string input, string output)>(); - foreach (var outCol in toOutput) - pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); - - return new GlobalContrastNormalizingEstimator(env, pairs.ToArray(), _subMean, _useStdDev, _scale); - } - } - - /// - /// The column to apply to. - /// Subtract mean from each value before normalizing. - /// Normalize by standard deviation rather than L2 norm. - /// Scale features by this value. - public static Vector GlobalContrastNormalize(this Vector input, - bool subMean = LpNormalizingEstimatorBase.Defaults.GcnSubstractMean, - bool useStdDev = LpNormalizingEstimatorBase.Defaults.UseStdDev, - float scale = LpNormalizingEstimatorBase.Defaults.Scale) => new OutPipelineColumn(input, subMean, useStdDev, scale); - } -} diff --git a/src/Microsoft.ML.Transforms/UngroupTransform.cs b/src/Microsoft.ML.Transforms/UngroupTransform.cs index 99e1193e19..230138151d 100644 --- a/src/Microsoft.ML.Transforms/UngroupTransform.cs +++ b/src/Microsoft.ML.Transforms/UngroupTransform.cs @@ -96,7 +96,7 @@ public sealed class Arguments : TransformInputBase private readonly SchemaImpl _schemaImpl; /// - /// Initializes a new instance of . + /// Convenience constructor for public facing API. /// /// Host Environment. /// Input . This is the output from previous transform or loader. @@ -149,13 +149,13 @@ public override void Save(ModelSaveContext ctx) _schemaImpl.Save(ctx); } - public override long? GetRowCount() + public override long? GetRowCount(bool lazy = true) { // Row count is known if the input's row count is known, and pivot column sizes are fixed. var commonSize = _schemaImpl.GetCommonPivotColumnSize(); if (commonSize > 0) { - long? srcRowCount = Source.GetRowCount(); + long? srcRowCount = Source.GetRowCount(true); if (srcRowCount.HasValue && srcRowCount.Value <= (long.MaxValue / commonSize)) return srcRowCount.Value * commonSize; } @@ -205,6 +205,7 @@ private static bool ShouldPreserveMetadata(string kind) case MetadataUtils.Kinds.ScoreColumnSetId: case MetadataUtils.Kinds.ScoreColumnKind: case MetadataUtils.Kinds.ScoreValueKind: + case MetadataUtils.Kinds.HasMissingValues: case MetadataUtils.Kinds.IsUserVisible: return true; default: @@ -630,20 +631,18 @@ private ValueGetter MakeGetter(int col, PrimitiveType itemType) cachedIndex = 0; } - var rowValues = row.GetValues(); if (_pivotColPosition >= row.Length) value = naValue; else if (row.IsDense) - value = rowValues[_pivotColPosition]; + value = row.Values[_pivotColPosition]; else { // The row is sparse. - var rowIndices = row.GetIndices(); - while (cachedIndex < rowIndices.Length && _pivotColPosition > rowIndices[cachedIndex]) + while (cachedIndex < row.Count && _pivotColPosition > row.Indices[cachedIndex]) cachedIndex++; - if (cachedIndex < rowIndices.Length && _pivotColPosition == rowIndices[cachedIndex]) - value = rowValues[cachedIndex]; + if (cachedIndex < row.Count && _pivotColPosition == row.Indices[cachedIndex]) + value = row.Values[cachedIndex]; else value = default(T); } diff --git a/src/Microsoft.ML.Transforms/WhiteningTransform.cs b/src/Microsoft.ML.Transforms/WhiteningTransform.cs new file mode 100644 index 0000000000..2550fe5821 --- /dev/null +++ b/src/Microsoft.ML.Transforms/WhiteningTransform.cs @@ -0,0 +1,640 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Float = System.Single; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Runtime.InteropServices; +using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.CommandLine; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Internal.CpuMath; +using Microsoft.ML.Runtime.Internal.Utilities; +using Microsoft.ML.Runtime.Model; +using Microsoft.ML.Runtime.Internal.Internallearn; +using Microsoft.ML.Transforms.Projections; + +[assembly: LoadableClass(WhiteningTransform.Summary, typeof(WhiteningTransform), typeof(WhiteningTransform.Arguments), typeof(SignatureDataTransform), + "Whitening Transform", "WhiteningTransform", "Whitening")] + +[assembly: LoadableClass(WhiteningTransform.Summary, typeof(WhiteningTransform), null, typeof(SignatureLoadDataTransform), + "Whitening Transform", WhiteningTransform.LoaderSignature, WhiteningTransform.LoaderSignatureOld)] + +namespace Microsoft.ML.Transforms.Projections +{ + public enum WhiteningKind + { + [TGUI(Label = "PCA whitening")] + Pca, + + [TGUI(Label = "ZCA whitening")] + Zca + } + + /// + public sealed class WhiteningTransform : OneToOneTransformBase + { + private static class Defaults + { + public const WhiteningKind Kind = WhiteningKind.Zca; + public const Float Eps = (Float)1e-5; + public const int MaxRows = 100 * 1000; + public const bool SaveInverse = false; + public const int PcaNum = 0; + } + + public sealed class Arguments + { + [Argument(ArgumentType.Multiple | ArgumentType.Required, HelpText = "New column definition(s) (optional form: name:src)", ShortName = "col", SortOrder = 1)] + public Column[] Column; + + [Argument(ArgumentType.AtMostOnce, HelpText = "Whitening kind (PCA/ZCA)")] + public WhiteningKind Kind = Defaults.Kind; + + [Argument(ArgumentType.AtMostOnce, HelpText = "Scaling regularizer")] + public Float Eps = Defaults.Eps; + + [Argument(ArgumentType.AtMostOnce, HelpText = "Max number of rows", ShortName = "rows")] + public int MaxRows = Defaults.MaxRows; + + [Argument(ArgumentType.AtMostOnce, HelpText = "Whether to save inverse (recovery) matrix", ShortName = "saveInv")] + public bool SaveInverse = Defaults.SaveInverse; + + [Argument(ArgumentType.AtMostOnce, HelpText = "PCA components to retain")] + public int PcaNum = Defaults.PcaNum; + + // REVIEW: add the following options: + // 1. Currently there is no way to apply an inverse transform AFTER the the transform is trained. + // 2. How many PCA components to retain/drop. Options: retain-first, drop-first, variance-threshold. + } + + public sealed class Column : OneToOneColumn + { + [Argument(ArgumentType.AtMostOnce, HelpText = "Whitening kind (PCA/ZCA)")] + public WhiteningKind? Kind; + + [Argument(ArgumentType.AtMostOnce, HelpText = "Scaling regularizer")] + public Float? Eps; + + [Argument(ArgumentType.AtMostOnce, HelpText = "Max number of rows", ShortName = "rows")] + public int? MaxRows; + + [Argument(ArgumentType.AtMostOnce, HelpText = "Whether to save inverse (recovery) matrix", ShortName = "saveInv")] + public bool? SaveInverse; + + [Argument(ArgumentType.AtMostOnce, HelpText = "PCA components to keep/drop")] + public int? PcaNum; + + public static Column Parse(string str) + { + Contracts.AssertNonEmpty(str); + + var res = new Column(); + if (res.TryParse(str)) + return res; + return null; + } + + public bool TryUnparse(StringBuilder sb) + { + Contracts.AssertValue(sb); + if (Kind != null || Eps != null || MaxRows != null || SaveInverse != null || PcaNum != null) + return false; + return TryUnparseCore(sb); + } + } + + public sealed class ColInfoEx + { + public readonly WhiteningKind Kind; + public readonly Float Epsilon; + public readonly int MaxRow; + public readonly bool SaveInv; + public readonly int PcaNum; + public readonly VectorType Type; + + public ColInfoEx(Column item, Arguments args, ColInfo info) + { + Kind = item.Kind ?? args.Kind; + Contracts.CheckUserArg(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca, nameof(item.Kind)); + Epsilon = item.Eps ?? args.Eps; + Contracts.CheckUserArg(0 <= Epsilon && Epsilon < Float.PositiveInfinity, nameof(item.Eps)); + MaxRow = item.MaxRows ?? args.MaxRows; + Contracts.CheckUserArg(MaxRow > 0, nameof(item.MaxRows)); + SaveInv = item.SaveInverse ?? args.SaveInverse; + PcaNum = item.PcaNum ?? args.PcaNum; + Contracts.CheckUserArg(PcaNum >= 0, nameof(item.PcaNum)); + + if (Kind == WhiteningKind.Zca || PcaNum == 0) + Type = info.TypeSrc.AsVector; + else + Type = new VectorType(NumberType.Float, PcaNum); // REVIEW: make it work with pcaNum == 1. + } + + public ColInfoEx(ModelLoadContext ctx, ColInfo info) + { + Contracts.AssertValue(ctx); + + // *** Binary format *** + // int: kind + // Float: epsilon + // int: maxrow + // byte: saveInv + // int: pcaNum + Kind = (WhiteningKind)ctx.Reader.ReadInt32(); + Contracts.CheckDecode(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca); + Epsilon = ctx.Reader.ReadFloat(); + Contracts.CheckDecode(0 <= Epsilon && Epsilon < Float.PositiveInfinity); + MaxRow = ctx.Reader.ReadInt32(); + Contracts.CheckDecode(MaxRow > 0); + SaveInv = ctx.Reader.ReadBoolByte(); + PcaNum = ctx.Reader.ReadInt32(); + Contracts.CheckDecode(PcaNum >= 0); + + if (Kind == WhiteningKind.Zca || PcaNum == 0) + Type = info.TypeSrc.AsVector; + else + Type = new VectorType(NumberType.Float, PcaNum); // REVIEW: make it work with pcaNum == 1. + } + + public void Save(ModelSaveContext ctx) + { + Contracts.AssertValue(ctx); + + // *** Binary format *** + // int: kind + // Float: epsilon + // int: maxrow + // byte: saveInv + // int: pcaNum + Contracts.Assert(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca); + ctx.Writer.Write((int)Kind); + Contracts.Assert(0 <= Epsilon && Epsilon < Float.PositiveInfinity); + ctx.Writer.Write(Epsilon); + Contracts.Assert(MaxRow > 0); + ctx.Writer.Write(MaxRow); + ctx.Writer.WriteBoolByte(SaveInv); + Contracts.Assert(PcaNum >= 0); + ctx.Writer.Write(PcaNum); + } + } + + private const Mkl.Layout Layout = Mkl.Layout.RowMajor; + + // Stores whitening matrix as Float[] for each column. + private readonly Float[][] _models; + // Stores inverse ("recover") matrix as Float[] for each column. Temporarily internal as it's used in unit test. + // REVIEW: It doesn't look like this is used by non-test code. Should it be saved at all? + internal readonly Float[][] InvModels; + + internal const string Summary = "Apply PCA or ZCA whitening algorithm to the input."; + + public const string LoaderSignature = "WhiteningTransform"; + internal const string LoaderSignatureOld = "WhiteningFunction"; + private static VersionInfo GetVersionInfo() + { + return new VersionInfo( + modelSignature: "WHITENTF", + verWrittenCur: 0x00010001, // Initial + verReadableCur: 0x00010001, + verWeCanReadBack: 0x00010001, + loaderSignature: LoaderSignature, + loaderSignatureAlt: LoaderSignatureOld, + loaderAssemblyName: typeof(WhiteningTransform).Assembly.FullName); + } + + private readonly ColInfoEx[] _exes; + + private const string RegistrationName = "Whitening"; + + /// + /// Convenience constructor for public facing API. + /// + /// Host Environment. + /// Input . This is the output from previous transform or loader. + /// Name of the output column. + /// Name of the column to be transformed. If this is null '' will be used. + /// Whitening kind (PCA/ZCA). + public WhiteningTransform(IHostEnvironment env, + IDataView input, + string name, + string source = null, + WhiteningKind kind = Defaults.Kind) + : this(env, new Arguments() { Column = new[] { new Column() { Source = source ?? name, Name = name } }, Kind = kind }, input) + { + } + + /// + /// Public constructor corresponding to SignatureDataTransform. + /// + public WhiteningTransform(IHostEnvironment env, Arguments args, IDataView input) + : base(env, RegistrationName, Contracts.CheckRef(args, nameof(args)).Column, + input, TestColumn) + { + Host.AssertNonEmpty(Infos); + Host.Assert(Infos.Length == Utils.Size(args.Column)); + + _exes = new ColInfoEx[Infos.Length]; + for (int i = 0; i < _exes.Length; i++) + _exes[i] = new ColInfoEx(args.Column[i], args, Infos[i]); + + using (var ch = Host.Start("Training")) + { + // The training process will load all data into memory and perform whitening process + // for each resulting column separately. + _models = new Float[Infos.Length][]; + InvModels = new Float[Infos.Length][]; + int[] rowCounts; + var columnData = LoadDataAsDense(ch, out rowCounts); + TrainModels(columnData, rowCounts, ch); + } + Metadata.Seal(); + } + + private Float[][] LoadDataAsDense(IChannel ch, out int[] actualRowCounts) + { + long crowData = GetRowCount(); + + var columnData = new Float[Infos.Length][]; + actualRowCounts = new int[Infos.Length]; + int maxActualRowCount = 0; + for (int i = 0; i < Infos.Length; i++) + { + var type = Infos[i].TypeSrc; + ch.Assert(type.IsVector && type.IsKnownSizeVector); + // Use not more than MaxRow number of rows. + var ex = _exes[i]; + if (crowData <= ex.MaxRow) + actualRowCounts[i] = (int)crowData; + else + { + ch.Info(MessageSensitivity.Schema, "Only {0:N0} rows of column '{1}' will be used for whitening transform.", ex.MaxRow, Infos[i].Name); + actualRowCounts[i] = ex.MaxRow; + } + + int cslot = type.ValueCount; + // Check that total number of values in matrix does not exceed int.MaxValue and adjust row count if necessary. + if ((long)cslot * actualRowCounts[i] > int.MaxValue) + { + actualRowCounts[i] = int.MaxValue / cslot; + ch.Info(MessageSensitivity.Schema, "Only {0:N0} rows of column '{1}' will be used for whitening transform.", actualRowCounts[i], Infos[i].Name); + } + columnData[i] = new Float[cslot * actualRowCounts[i]]; + if (actualRowCounts[i] > maxActualRowCount) + maxActualRowCount = actualRowCounts[i]; + } + var idxDst = new int[Infos.Length]; + + var cols = new HashSet(Infos.Select(info => info.Source)); + using (var cursor = Source.GetRowCursor(cols.Contains)) + { + var getters = new ValueGetter>[Infos.Length]; + for (int i = 0; i < Infos.Length; i++) + getters[i] = cursor.GetGetter>(Infos[i].Source); + var val = default(VBuffer); + int irow = 0; + while (irow < maxActualRowCount && cursor.MoveNext()) + { + for (int i = 0; i < Infos.Length; i++) + { + if (irow >= actualRowCounts[i] || columnData[i].Length == 0) + continue; + + getters[i](ref val); + val.CopyTo(columnData[i], idxDst[i]); + idxDst[i] += Infos[i].TypeSrc.ValueCount; + } + irow++; + } +#if DEBUG + for (int i = 0; i < Infos.Length; i++) + ch.Assert(idxDst[i] == columnData[i].Length); +#endif + } + + return columnData; + } + + private void TrainModels(Float[][] columnData, int[] rowCounts, IChannel ch) + { + Host.AssertValue(ch); + ch.Assert(columnData.Length == rowCounts.Length); + + for (int iinfo = 0; iinfo < Infos.Length; iinfo++) + { + var ex = _exes[iinfo]; + var data = columnData[iinfo]; + int crow = rowCounts[iinfo]; + int ccol = Infos[iinfo].TypeSrc.ValueCount; + + // If there is no training data, simply initialize the model matrices. + if (crow == 0) + { + var matrixSize = ccol * ccol; + _models[iinfo] = new float[matrixSize]; + InvModels[iinfo] = new float[matrixSize]; + continue; + } + + // Compute covariance matrix (sigma). + var u = new Float[ccol * ccol]; + ch.Info("Computing covariance matrix..."); + Mkl.Gemm(Layout, Mkl.Transpose.Trans, Mkl.Transpose.NoTrans, + ccol, ccol, crow, 1 / (Float)crow, data, ccol, data, ccol, 0, u, ccol); + + ch.Info("Computing SVD..."); + var eigValues = new Float[ccol]; // Eigenvalues. + var unconv = new Float[ccol]; // Superdiagonal unconverged values (if any). Not used but seems to be required by MKL. + // After the next call, values in U will be ovewritten by left eigenvectors. + // Each column in U will be an eigenvector. + int r = Mkl.Svd(Layout, Mkl.SvdJob.MinOvr, Mkl.SvdJob.None, + ccol, ccol, u, ccol, eigValues, null, ccol, null, ccol, unconv); + ch.Assert(r == 0); + if (r > 0) + throw ch.Except("SVD did not converge."); + if (r < 0) + throw ch.Except("Invalid arguments to LAPACK gesvd, error: {0}", r); + + ch.Info("Scaling eigenvectors..."); + // Scale eigenvalues first so we don't have to compute sqrt for every matrix element. + // Scaled eigenvalues are used to compute inverse transformation matrix + // while reciprocal (eigValuesRcp) values are used to compute whitening matrix. + for (int i = 0; i < eigValues.Length; i++) + eigValues[i] = MathUtils.Sqrt(Math.Max(0, eigValues[i]) + ex.Epsilon); + var eigValuesRcp = new Float[eigValues.Length]; + for (int i = 0; i < eigValuesRcp.Length; i++) + eigValuesRcp[i] = 1 / eigValues[i]; + + // Scale eigenvectors. Note that resulting matrix is transposed, so the scaled + // eigenvectors are stored row-wise. + var uScaled = new Float[u.Length]; + var uInvScaled = new Float[u.Length]; + int isrc = 0; + for (int irowSrc = 0; irowSrc < ccol; irowSrc++) + { + int idst = irowSrc; + for (int icolSrc = 0; icolSrc < ccol; icolSrc++) + { + uScaled[idst] = u[isrc] * eigValuesRcp[icolSrc]; + uInvScaled[idst] = u[isrc] * eigValues[icolSrc]; + isrc++; + idst += ccol; + } + } + + // For ZCA need to do additional multiply by U. + if (ex.Kind == WhiteningKind.Pca) + { + // Save all components for PCA. Retained components will be selected during evaluation. + _models[iinfo] = uScaled; + if (ex.SaveInv) + InvModels[iinfo] = uInvScaled; + } + else if (ex.Kind == WhiteningKind.Zca) + { + _models[iinfo] = new Float[u.Length]; + Mkl.Gemm(Layout, Mkl.Transpose.NoTrans, Mkl.Transpose.NoTrans, + ccol, ccol, ccol, 1, u, ccol, uScaled, ccol, 0, _models[iinfo], ccol); + + if (ex.SaveInv) + { + InvModels[iinfo] = new Float[u.Length]; + Mkl.Gemm(Layout, Mkl.Transpose.NoTrans, Mkl.Transpose.NoTrans, + ccol, ccol, ccol, 1, u, ccol, uInvScaled, ccol, 0, InvModels[iinfo], ccol); + } + } + else + ch.Assert(false); + } + } + + private WhiteningTransform(IHost host, ModelLoadContext ctx, IDataView input) + : base(host, ctx, input, TestColumn) + { + Host.AssertValue(ctx); + + // *** Binary format *** + // + // + // foreach added column + // ColInfoEx + // foreach model + // whitening matrix + // recovery matrix + + Host.AssertNonEmpty(Infos); + _exes = new ColInfoEx[Infos.Length]; + for (int i = 0; i < _exes.Length; i++) + _exes[i] = new ColInfoEx(ctx, Infos[i]); + + _models = new Float[Infos.Length][]; + InvModels = new Float[Infos.Length][]; + for (int i = 0; i < Infos.Length; i++) + { + _models[i] = ctx.Reader.ReadFloatArray(); + ValidateModel(Host, _models[i], Infos[i].TypeSrc); + if (_exes[i].SaveInv) + { + InvModels[i] = ctx.Reader.ReadFloatArray(); + ValidateModel(Host, InvModels[i], Infos[i].TypeSrc); + } + } + Metadata.Seal(); + } + + public static WhiteningTransform Create(IHostEnvironment env, ModelLoadContext ctx, IDataView input) + { + Contracts.CheckValue(env, nameof(env)); + var h = env.Register(RegistrationName); + h.CheckValue(ctx, nameof(ctx)); + h.CheckValue(input, nameof(input)); + ctx.CheckAtModel(GetVersionInfo()); + + // *** Binary format *** + // int: sizeof(Float) + // + int cbFloat = ctx.Reader.ReadInt32(); + h.CheckDecode(cbFloat == sizeof(Float)); + return h.Apply("Loading Model", ch => new WhiteningTransform(h, ctx, input)); + } + + public override void Save(ModelSaveContext ctx) + { + Host.CheckValue(ctx, nameof(ctx)); + ctx.CheckAtModel(); + ctx.SetVersionInfo(GetVersionInfo()); + + // *** Binary format *** + // int: sizeof(Float) + // + // foreach added column + // ColInfoEx + // foreach model + // whitening matrix + // recovery matrix + ctx.Writer.Write(sizeof(Float)); + + SaveBase(ctx); + + Host.Assert(_exes.Length == Infos.Length); + for (int i = 0; i < _exes.Length; i++) + _exes[i].Save(ctx); + for (int i = 0; i < _models.Length; i++) + { + ctx.Writer.WriteSingleArray(_models[i]); + if (_exes[i].SaveInv) + ctx.Writer.WriteSingleArray(InvModels[i]); + } + } + + private static string TestColumn(ColumnType t) + { + string reason = TestIsKnownSizeFloatVector(t); + if (reason != null) + return reason; + + if ((long)t.ValueCount * t.ValueCount > Utils.ArrayMaxSize) + return "Vector size exceeds limit"; + + return null; + } + + private static void ValidateModel(IExceptionContext ectx, Float[] model, ColumnType col) + { + ectx.CheckDecode(Utils.Size(model) == (long)col.ValueCount * col.ValueCount, "Invalid model size."); + for (int i = 0; i < model.Length; i++) + ectx.CheckDecode(FloatUtils.IsFinite(model[i]), "Found NaN or infinity in the model."); + } + + private long GetRowCount() + { + long? rows = Source.GetRowCount(lazy: false); + if (rows != null) + return rows.GetValueOrDefault(); + + int maxRows = _exes.Max(i => i.MaxRow); + long r = 0; + using (var cursor = Source.GetRowCursor(col => false)) + { + while (r < maxRows && cursor.MoveNext()) + r++; + } + return r; + } + + protected override ColumnType GetColumnTypeCore(int iinfo) + { + Host.Check(0 <= iinfo & iinfo < Infos.Length); + return _exes[iinfo].Type; + } + + protected override Delegate GetGetterCore(IChannel ch, IRow input, int iinfo, out Action disposer) + { + Host.AssertValueOrNull(ch); + Host.AssertValue(input); + Host.Assert(0 <= iinfo && iinfo < Infos.Length); + disposer = null; + + var ex = _exes[iinfo]; + Host.Assert(ex.Kind == WhiteningKind.Pca || ex.Kind == WhiteningKind.Zca); + var getSrc = GetSrcGetter>(input, iinfo); + var src = default(VBuffer); + int cslotSrc = Infos[iinfo].TypeSrc.ValueCount; + int cslotDst = (ex.Kind == WhiteningKind.Pca && ex.PcaNum > 0) ? ex.PcaNum : Infos[iinfo].TypeSrc.ValueCount; + var model = _models[iinfo]; + ValueGetter> del = + (ref VBuffer dst) => + { + getSrc(ref src); + Host.Check(src.Length == cslotSrc, "Invalid column size."); + FillValues(model, in src, ref dst, cslotDst); + }; + return del; + } + + private static void FillValues(Float[] model, in VBuffer src, ref VBuffer dst, int cdst) + { + int count = src.Count; + int length = src.Length; + var values = src.Values; + var indices = src.Indices; + Contracts.Assert(Utils.Size(values) >= count); + + // Since the whitening process produces dense vector, always use dense representation of dst. + var a = Utils.Size(dst.Values) >= cdst ? dst.Values : new Float[cdst]; + if (src.IsDense) + { + Mkl.Gemv(Mkl.Layout.RowMajor, Mkl.Transpose.NoTrans, cdst, length, + 1, model, length, values, 1, 0, a, 1); + } + else + { + Contracts.Assert(Utils.Size(indices) >= count); + + int offs = 0; + for (int i = 0; i < cdst; i++) + { + a[i] = DotProduct(model, offs, values, indices, count); + offs += length; + } + } + dst = new VBuffer(cdst, a, dst.Indices); + } + + /// + /// Returns a dot product of dense vector 'a' starting from offset 'aOffset' and sparse vector 'b' + /// with first 'count' valid elements and their corresponding 'indices'. + /// + private static Float DotProduct(Float[] a, int aOffset, Float[] b, int[] indices, int count) + { + Contracts.Assert(count <= indices.Length); + return CpuMathUtils.DotProductSparse(a.AsSpan(aOffset), b, indices, count); + + } + + private static class Mkl + { + private const string DllName = "MklImports"; + + public enum Layout + { + RowMajor = 101, + ColMajor = 102 + } + + public enum Transpose + { + NoTrans = 111, + Trans = 112, + ConjTrans = 113 + } + + public enum SvdJob : byte + { + None = (byte)'N', + All = (byte)'A', + Min = (byte)'S', + MinOvr = (byte)'O', + } + + // See: https://software.intel.com/en-us/node/520750 + [DllImport(DllName, EntryPoint = "cblas_sgemv")] + public static extern void Gemv(Layout layout, Transpose trans, int m, int n, Float alpha, + Float[] a, int lda, Float[] x, int incx, Float beta, Float[] y, int incy); + + // See: https://software.intel.com/en-us/node/520775 + [DllImport(DllName, EntryPoint = "cblas_sgemm")] + public static extern void Gemm(Layout layout, Transpose transA, Transpose transB, int m, int n, int k, Float alpha, + Float[] a, int lda, Float[] b, int ldb, Float beta, Float[] c, int ldc); + + // See: https://software.intel.com/en-us/node/521150 + [DllImport(DllName, EntryPoint = "LAPACKE_sgesvd")] + public static extern int Svd(Layout layout, SvdJob jobu, SvdJob jobvt, + int m, int n, Float[] a, int lda, Float[] s, Float[] u, int ldu, Float[] vt, int ldvt, Float[] superb); + } + } +} diff --git a/src/Microsoft.ML.Transforms/WrappedFeatureSelectionTransformers.cs b/src/Microsoft.ML.Transforms/WrappedFeatureSelectionTransformers.cs index f49bc4b58c..3fa2b55a37 100644 --- a/src/Microsoft.ML.Transforms/WrappedFeatureSelectionTransformers.cs +++ b/src/Microsoft.ML.Transforms/WrappedFeatureSelectionTransformers.cs @@ -24,7 +24,7 @@ public sealed class CountFeatureSelector : TrainedWrapperEstimatorBase /// The input column to apply feature selection on. /// The output column. Null means is used. /// If the count of non-default values for a slot is greater than or equal to this threshold, the slot is preserved. - public CountFeatureSelector(IHostEnvironment env, string inputColumn, string outputColumn = null, long count = CountFeatureSelectingTransformer.Defaults.Count) + public CountFeatureSelector(IHostEnvironment env, string inputColumn, string outputColumn = null, long count = CountFeatureSelectionTransform.Defaults.Count) : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, count) { } @@ -33,7 +33,7 @@ public CountFeatureSelector(IHostEnvironment env, string inputColumn, string out /// The environment. /// If the count of non-default values for a slot is greater than or equal to this threshold, the slot is preserved. /// Columns to use for feature selection. - public CountFeatureSelector(IHostEnvironment env, (string input, string output)[] columns, long count = CountFeatureSelectingTransformer.Defaults.Count) + public CountFeatureSelector(IHostEnvironment env, (string input, string output)[] columns, long count = CountFeatureSelectionTransform.Defaults.Count) : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(CountFeatureSelector))) { _count = count; @@ -42,10 +42,10 @@ public CountFeatureSelector(IHostEnvironment env, (string input, string output)[ public override TransformWrapper Fit(IDataView input) { - var copyColumn = new ColumnsCopyingEstimator(Host, _columns); + var copyColumn = new CopyColumnsEstimator(Host, _columns); var dataview = copyColumn.Fit(input).Transform(input); var names = _columns.Select(x => x.output).ToArray(); - return new TransformWrapper(Host, CountFeatureSelectingTransformer.Create(Host, dataview, _count, names)); + return new TransformWrapper(Host, CountFeatureSelectionTransform.Create(Host, dataview, _count, names)); } } @@ -95,7 +95,7 @@ public MutualInformationFeatureSelector(IHostEnvironment env, public override TransformWrapper Fit(IDataView input) { - var copyColumn = new ColumnsCopyingEstimator(Host, _columns); + var copyColumn = new CopyColumnsEstimator(Host, _columns); var dataview = copyColumn.Fit(input).Transform(input); var names = _columns.Select(x => x.output).ToArray(); return new TransformWrapper(Host, MutualInformationFeatureSelectionTransform.Create(Host, dataview, _labelColumn, _slotsInOutput, _numBins, names)); @@ -147,19 +147,19 @@ public override IEstimator Reconcile(IHostEnvironment env, /// The column to apply to. /// If the count of non-default values for a slot is greater than or equal to this threshold, the slot is preserved. public static Vector SelectFeaturesBasedOnCount(this Vector input, - long count = CountFeatureSelectingTransformer.Defaults.Count) => new OutPipelineColumn(input, count); + long count = CountFeatureSelectionTransform.Defaults.Count) => new OutPipelineColumn(input, count); /// /// The column to apply to. /// If the count of non-default values for a slot is greater than or equal to this threshold, the slot is preserved. public static Vector SelectFeaturesBasedOnCount(this Vector input, - long count = CountFeatureSelectingTransformer.Defaults.Count) => new OutPipelineColumn(input, count); + long count = CountFeatureSelectionTransform.Defaults.Count) => new OutPipelineColumn(input, count); /// /// The column to apply to. /// If the count of non-default values for a slot is greater than or equal to this threshold, the slot is preserved. public static Vector SelectFeaturesBasedOnCount(this Vector input, - long count = CountFeatureSelectingTransformer.Defaults.Count) => new OutPipelineColumn(input, count); + long count = CountFeatureSelectionTransform.Defaults.Count) => new OutPipelineColumn(input, count); } /// diff --git a/src/Microsoft.ML.Transforms/WrappedGcnTransformers.cs b/src/Microsoft.ML.Transforms/WrappedGcnTransformers.cs new file mode 100644 index 0000000000..20620ba489 --- /dev/null +++ b/src/Microsoft.ML.Transforms/WrappedGcnTransformers.cs @@ -0,0 +1,223 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Core.Data; +using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.StaticPipe; +using Microsoft.ML.StaticPipe.Runtime; +using Microsoft.ML.Transforms.Projections; +using System.Collections.Generic; +using System.Linq; +using static Microsoft.ML.Transforms.Projections.LpNormNormalizerTransform; + +namespace Microsoft.ML.Transforms +{ + /// + public sealed class LpNormalizer : TrivialWrapperEstimator + { + /// + /// The environment. + /// The column containing text to tokenize. + /// The column containing output tokens. Null means is replaced. + /// Type of norm to use to normalize each sample. + /// Subtract mean from each value before normalizing. + public LpNormalizer(IHostEnvironment env, string inputColumn, string outputColumn = null, NormalizerKind normKind = NormalizerKind.L2Norm, bool subMean = false) + : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, normKind, subMean) + { + } + + /// + /// The environment. + /// Pairs of columns to run the tokenization on. + /// Type of norm to use to normalize each sample. + /// Subtract mean from each value before normalizing. + public LpNormalizer(IHostEnvironment env, (string input, string output)[] columns, NormalizerKind normKind = NormalizerKind.L2Norm, bool subMean = false) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(LpNormalizer)), MakeTransformer(env, columns, normKind, subMean)) + { + } + + private static TransformWrapper MakeTransformer(IHostEnvironment env, (string input, string output)[] columns, NormalizerKind normKind, bool subMean) + { + Contracts.AssertValue(env); + env.CheckNonEmpty(columns, nameof(columns)); + foreach (var (input, output) in columns) + { + env.CheckValue(input, nameof(input)); + env.CheckValue(output, nameof(input)); + } + + var args = new LpNormNormalizerTransform.Arguments + { + Column = columns.Select(x => new LpNormNormalizerTransform.Column { Source = x.input, Name = x.output }).ToArray(), + SubMean = subMean, + NormKind = normKind + }; + + // Create a valid instance of data. + var schema = new Schema(columns.Select(x => new Schema.Column(x.input, new VectorType(NumberType.R4), null))); + var emptyData = new EmptyDataView(env, schema); + + return new TransformWrapper(env, new LpNormNormalizerTransform(env, args, emptyData)); + } + } + + /// + public sealed class GlobalContrastNormalizer : TrivialWrapperEstimator + { + /// + /// The environment. + /// The column containing text to tokenize. + /// The column containing output tokens. Null means is replaced. + /// Subtract mean from each value before normalizing. + /// Normalize by standard deviation rather than L2 norm. + /// Scale features by this value. + public GlobalContrastNormalizer(IHostEnvironment env, string inputColumn, string outputColumn = null, bool subMean = true, bool useStdDev = false, float scale = 1) + : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, subMean, useStdDev , scale) + { + } + + /// + /// The environment. + /// Pairs of columns to run the tokenization on. + /// Subtract mean from each value before normalizing. + /// Normalize by standard deviation rather than L2 norm. + /// Scale features by this value. + public GlobalContrastNormalizer(IHostEnvironment env, (string input, string output)[] columns, bool subMean = true, bool useStdDev = false, float scale = 1) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(GlobalContrastNormalizer)), MakeTransformer(env, columns, subMean, useStdDev, scale)) + { + } + + private static TransformWrapper MakeTransformer(IHostEnvironment env, (string input, string output)[] columns, bool subMean, bool useStdDev, float scale) + { + Contracts.AssertValue(env); + env.CheckNonEmpty(columns, nameof(columns)); + foreach (var (input, output) in columns) + { + env.CheckValue(input, nameof(input)); + env.CheckValue(output, nameof(input)); + } + + var args = new LpNormNormalizerTransform.GcnArguments + { + Column = columns.Select(x => new LpNormNormalizerTransform.GcnColumn { Source = x.input, Name = x.output }).ToArray(), + SubMean = subMean, + UseStdDev = useStdDev, + Scale = scale + }; + + // Create a valid instance of data. + var schema = new Schema(columns.Select(x => new Schema.Column(x.input, new VectorType(NumberType.R4), null))); + var emptyData = new EmptyDataView(env, schema); + + return new TransformWrapper(env, new LpNormNormalizerTransform(env, args, emptyData)); + } + } + + /// + /// Extensions for statically typed LpNormalizer estimator. + /// + public static class LpNormNormalizerExtensions + { + private sealed class OutPipelineColumn : Vector + { + public readonly Vector Input; + + public OutPipelineColumn(Vector input, NormalizerKind normKind, bool subMean) + : base(new Reconciler(normKind, subMean), input) + { + Input = input; + } + } + + private sealed class Reconciler : EstimatorReconciler + { + private readonly NormalizerKind _normKind; + private readonly bool _subMean; + + public Reconciler(NormalizerKind normKind, bool subMean) + { + _normKind = normKind; + _subMean = subMean; + } + + public override IEstimator Reconcile(IHostEnvironment env, + PipelineColumn[] toOutput, + IReadOnlyDictionary inputNames, + IReadOnlyDictionary outputNames, + IReadOnlyCollection usedNames) + { + Contracts.Assert(toOutput.Length == 1); + + var pairs = new List<(string input, string output)>(); + foreach (var outCol in toOutput) + pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); + + return new LpNormalizer(env, pairs.ToArray(), _normKind, _subMean); + } + } + + /// + /// The column to apply to. + /// Type of norm to use to normalize each sample. + /// Subtract mean from each value before normalizing. + public static Vector LpNormalize(this Vector input, NormalizerKind normKind = NormalizerKind.L2Norm, bool subMean = false) => new OutPipelineColumn(input, normKind, subMean); + } + + /// + /// Extensions for statically typed GcNormalizer estimator. + /// + public static class GcNormalizerExtensions + { + private sealed class OutPipelineColumn : Vector + { + public readonly Vector Input; + + public OutPipelineColumn(Vector input, bool subMean, bool useStdDev, float scale) + : base(new Reconciler(subMean, useStdDev, scale), input) + { + Input = input; + } + } + + private sealed class Reconciler : EstimatorReconciler + { + private readonly bool _subMean; + private readonly bool _useStdDev; + private readonly float _scale; + + public Reconciler(bool subMean, bool useStdDev, float scale) + { + _subMean = subMean; + _useStdDev = useStdDev; + _scale = scale; + } + + public override IEstimator Reconcile(IHostEnvironment env, + PipelineColumn[] toOutput, + IReadOnlyDictionary inputNames, + IReadOnlyDictionary outputNames, + IReadOnlyCollection usedNames) + { + Contracts.Assert(toOutput.Length == 1); + + var pairs = new List<(string input, string output)>(); + foreach (var outCol in toOutput) + pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); + + return new GlobalContrastNormalizer(env, pairs.ToArray(), _subMean, _useStdDev, _scale); + } + } + + /// + /// The column to apply to. + /// Subtract mean from each value before normalizing. + /// Normalize by standard deviation rather than L2 norm. + /// Scale features by this value. + public static Vector GlobalContrastNormalize(this Vector input, + bool subMean = true, + bool useStdDev = false, + float scale = 1) => new OutPipelineColumn(input, subMean, useStdDev, scale); + } +} diff --git a/src/Microsoft.ML.Transforms/WrappedWhiteningTransformer.cs b/src/Microsoft.ML.Transforms/WrappedWhiteningTransformer.cs new file mode 100644 index 0000000000..ac52e8b98d --- /dev/null +++ b/src/Microsoft.ML.Transforms/WrappedWhiteningTransformer.cs @@ -0,0 +1,167 @@ +// Licensed to the .NET Foundation under one or more agreements. +// 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.Core.Data; +using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.Data; +using Microsoft.ML.Runtime.Internal.Utilities; +using Microsoft.ML.StaticPipe; +using Microsoft.ML.StaticPipe.Runtime; +using System.Collections.Generic; +using System.Linq; +using Microsoft.ML.Transforms.Projections; + +namespace Microsoft.ML.Transforms +{ + /// + public sealed class Whitening : TrainedWrapperEstimatorBase + { + private readonly (string input, string output)[] _columns; + private readonly WhiteningKind _kind; + private readonly float _eps; + private readonly int _maxRows; + private readonly bool _saveInverse; + private readonly int _pcaNum; + + /// + /// The environment. + /// The column containing text to tokenize. + /// The column containing output tokens. Null means is replaced. + /// Whitening kind (PCA/ZCA). + /// Scaling regularizer. + /// Max number of rows. + /// Whether to save inverse (recovery) matrix. + /// PCA components to retain. + public Whitening(IHostEnvironment env, + string inputColumn, + string outputColumn = null, + WhiteningKind kind = WhiteningKind.Zca, + float eps = (float)1e-5, + int maxRows = 100 * 1000, + bool saveInverse = false, + int pcaNum = 0) + : this(env, new[] { (inputColumn, outputColumn ?? inputColumn) }, kind, eps, maxRows, saveInverse, pcaNum) + { + } + + /// + /// The environment. + /// Pairs of columns to run the tokenization on. + /// Whitening kind (PCA/ZCA). + /// Scaling regularizer. + /// Max number of rows. + /// Whether to save inverse (recovery) matrix. + /// PCA components to retain. + public Whitening(IHostEnvironment env, (string input, string output)[] columns, + WhiteningKind kind = WhiteningKind.Zca, + float eps = (float)1e-5, + int maxRows = 100 * 1000, + bool saveInverse = false, + int pcaNum = 0) + : base(Contracts.CheckRef(env, nameof(env)).Register(nameof(LpNormalizer))) + { + foreach (var (input, output) in columns) + { + Host.CheckUserArg(Utils.Size(input) > 0, nameof(input)); + Host.CheckValue(output, nameof(input)); + } + + _columns = columns; + _kind = kind; + _eps = eps; + _maxRows = maxRows; + _saveInverse = saveInverse; + _pcaNum = pcaNum; + } + + public override TransformWrapper Fit(IDataView input) + { + var args = new WhiteningTransform.Arguments + { + Column = _columns.Select(x => new WhiteningTransform.Column { Source = x.input, Name = x.output }).ToArray(), + Kind = _kind, + Eps = _eps, + MaxRows = _maxRows, + SaveInverse = _saveInverse, + PcaNum = _pcaNum + }; + + return new TransformWrapper(Host, new WhiteningTransform(Host, args, input)); + } + } + + /// + /// Extensions for statically typed Whitening estimator. + /// + public static class WhiteningExtensions + { + private sealed class OutPipelineColumn : Vector + { + public readonly Vector Input; + + public OutPipelineColumn(Vector input, WhiteningKind kind, float eps, int maxRows, bool saveInverse, int pcaNum) + : base(new Reconciler(kind, eps, maxRows, saveInverse, pcaNum), input) + { + Input = input; + } + } + + private sealed class Reconciler : EstimatorReconciler + { + private readonly WhiteningKind _kind; + private readonly float _eps; + private readonly int _maxRows; + private readonly bool _saveInverse; + private readonly int _pcaNum; + + public Reconciler(WhiteningKind kind, float eps, int maxRows, bool saveInverse, int pcaNum) + { + _kind = kind; + _eps = eps; + _maxRows = maxRows; + _saveInverse = saveInverse; + _pcaNum = pcaNum; + } + + public override IEstimator Reconcile(IHostEnvironment env, + PipelineColumn[] toOutput, + IReadOnlyDictionary inputNames, + IReadOnlyDictionary outputNames, + IReadOnlyCollection usedNames) + { + Contracts.Assert(toOutput.Length == 1); + + var pairs = new List<(string input, string output)>(); + foreach (var outCol in toOutput) + pairs.Add((inputNames[((OutPipelineColumn)outCol).Input], outputNames[outCol])); + + return new Whitening(env, pairs.ToArray(), _kind, _eps, _maxRows, _saveInverse, _pcaNum); + } + } + + /// + /// The column to apply to. + /// Scaling regularizer. + /// Max number of rows. + /// Whether to save inverse (recovery) matrix. + /// PCA components to retain. + public static Vector PcaWhitening(this Vector input, + float eps = (float)1e-5, + int maxRows = 100 * 1000, + bool saveInverse = false, + int pcaNum = 0) => new OutPipelineColumn(input, WhiteningKind.Pca, eps, maxRows, saveInverse, pcaNum); + + /// + /// The column to apply to. + /// Scaling regularizer. + /// Max number of rows. + /// Whether to save inverse (recovery) matrix. + /// PCA components to retain. + public static Vector ZcaWhitening(this Vector input, + float eps = (float)1e-5, + int maxRows = 100 * 1000, + bool saveInverse = false, + int pcaNum = 0) => new OutPipelineColumn(input, WhiteningKind.Zca, eps, maxRows, saveInverse, pcaNum); + } +} diff --git a/src/Microsoft.ML.Transforms/doc.xml b/src/Microsoft.ML.Transforms/doc.xml index f39322a75c..6d15b547d0 100644 --- a/src/Microsoft.ML.Transforms/doc.xml +++ b/src/Microsoft.ML.Transforms/doc.xml @@ -65,7 +65,7 @@ This transform uses a set of aggregators to count the number of non-default values for each slot and instantiates a to actually drop the slots. - This transform is useful when applied together with a . + This transform is useful when applied together with a . The count feature selection can remove those features generated by the hash transform that have no data in the examples. @@ -157,6 +157,7 @@ Removes missing values from vector type columns. + @@ -171,6 +172,7 @@ This transform can transform either scalars or vectors (both fixed and variable size), creating output columns that indicate, through the true/false booleans whether the row has a missing value. + @@ -191,6 +193,7 @@ with either the default value, user input, or imputed values (min/max/mean are currently supported). Imputation modes are supported for vectors both by slot and across all slots. + @@ -214,7 +217,7 @@ Scaling inputs to unit norms is a common operation for text classification or clustering. For more information see: - + pipeline.Add(new LpNormalizer("FeatureCol") @@ -236,7 +239,7 @@ For more information see: An Analysis of Single-Layer Networks in Unsupervised Feature Learning - + pipeline.Add(new GlobalContrastNormalizer("FeatureCol") diff --git a/test/BaselineOutput/Common/Command/CommandTrainingLrWithStats-summary.txt b/test/BaselineOutput/Common/Command/CommandTrainingLrWithStats-summary.txt index 4bd1c57233..6d58cb8d2d 100644 --- a/test/BaselineOutput/Common/Command/CommandTrainingLrWithStats-summary.txt +++ b/test/BaselineOutput/Common/Command/CommandTrainingLrWithStats-summary.txt @@ -13,15 +13,3 @@ Count of training examples: 32561 Residual Deviance: 26705.74 Null Deviance: 35948.08 AIC: 26719.74 - -Coefficients statistics: -Coefficient Estimate Std. Error z value Pr(>|z|) -(Bias) -8.228298 0.1161297 -70.85435 0 *** -education-num 5.066041 0.1048074 48.33666 0 *** -capital-gain 18.58347 0.4694776 39.5833 0 *** -age 3.86064 0.1061118 36.38277 0 *** -hours-per-week 3.946534 0.1258723 31.35349 0 *** -capital-loss 2.81616 0.13793 20.41732 0 *** -fnlwgt 0.7489593 0.2048056 3.656927 0.0002553463 *** ---- -Significance codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 diff --git a/test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv b/test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv index 655b617d72..8a90026359 100644 --- a/test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv +++ b/test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv @@ -75,48 +75,48 @@ Trainers.StochasticDualCoordinateAscentClassifier The SDCA linear multi-class cl Trainers.StochasticDualCoordinateAscentRegressor The SDCA linear regression trainer. Microsoft.ML.Trainers.Sdca TrainRegression Microsoft.ML.Trainers.SdcaRegressionTrainer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+RegressionOutput Trainers.StochasticGradientDescentBinaryClassifier Train an Hogwild SGD binary model. Microsoft.ML.Trainers.StochasticGradientDescentClassificationTrainer TrainBinary Microsoft.ML.Trainers.StochasticGradientDescentClassificationTrainer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+BinaryClassificationOutput Trainers.SymSgdBinaryClassifier Train a symbolic SGD. Microsoft.ML.Trainers.SymSgd.SymSgdClassificationTrainer TrainSymSgd Microsoft.ML.Trainers.SymSgd.SymSgdClassificationTrainer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+BinaryClassificationOutput -Transforms.ApproximateBootstrapSampler Approximate bootstrap sampling. Microsoft.ML.Transforms.BootstrapSample GetSample Microsoft.ML.Transforms.BootstrapSamplingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.ApproximateBootstrapSampler Approximate bootstrap sampling. Microsoft.ML.Transforms.BootstrapSample GetSample Microsoft.ML.Transforms.BootstrapSampleTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.BinaryPredictionScoreColumnsRenamer For binary prediction, it renames the PredictedLabel and Score columns to include the name of the positive class. Microsoft.ML.Runtime.EntryPoints.ScoreModel RenameBinaryPredictionScoreColumns Microsoft.ML.Runtime.EntryPoints.ScoreModel+RenameBinaryPredictionScoreColumnsInput Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.BinNormalizer The values are assigned into equidensity bins and a value is mapped to its bin_number/number_of_bins. Microsoft.ML.Runtime.Data.Normalize Bin Microsoft.ML.Transforms.Normalizers.NormalizeTransform+BinArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.CategoricalHashOneHotVectorizer Converts the categorical value into an indicator array by hashing the value and using the hash as an index in the bag. If the input column is a vector, a single indicator bag is returned for it. Microsoft.ML.Transforms.Categorical.Categorical CatTransformHash Microsoft.ML.Transforms.Categorical.OneHotHashEncodingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.CategoricalOneHotVectorizer Converts the categorical value into an indicator array by building a dictionary of categories based on the data and using the id in the dictionary as the index in the array. Microsoft.ML.Transforms.Categorical.Categorical CatTransformDict Microsoft.ML.Transforms.Categorical.OneHotEncodingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.CharacterTokenizer Character-oriented tokenizer where text is considered a sequence of characters. Microsoft.ML.Transforms.Text.TextAnalytics CharTokenize Microsoft.ML.Transforms.Text.TokenizingByCharactersTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.ColumnConcatenator Concatenates one or more columns of the same item type. Microsoft.ML.Runtime.EntryPoints.SchemaManipulation ConcatColumns Microsoft.ML.Runtime.Data.ColumnConcatenatingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.ColumnCopier Duplicates columns from the dataset Microsoft.ML.Runtime.EntryPoints.SchemaManipulation CopyColumns Microsoft.ML.Transforms.ColumnsCopyingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.ColumnSelector Selects a set of columns, dropping all others Microsoft.ML.Runtime.EntryPoints.SchemaManipulation SelectColumns Microsoft.ML.Transforms.ColumnSelectingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.ColumnTypeConverter Converts a column to a different type, using standard conversions. Microsoft.ML.Transforms.Conversions.TypeConversion Convert Microsoft.ML.Transforms.Conversions.TypeConvertingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.CategoricalHashOneHotVectorizer Converts the categorical value into an indicator array by hashing the value and using the hash as an index in the bag. If the input column is a vector, a single indicator bag is returned for it. Microsoft.ML.Transforms.Categorical.Categorical CatTransformHash Microsoft.ML.Transforms.Categorical.CategoricalHashTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.CategoricalOneHotVectorizer Converts the categorical value into an indicator array by building a dictionary of categories based on the data and using the id in the dictionary as the index in the array. Microsoft.ML.Transforms.Categorical.Categorical CatTransformDict Microsoft.ML.Transforms.Categorical.CategoricalTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.CharacterTokenizer Character-oriented tokenizer where text is considered a sequence of characters. Microsoft.ML.Transforms.Text.TextAnalytics CharTokenize Microsoft.ML.Transforms.Text.CharTokenizeTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.ColumnConcatenator Concatenates one or more columns of the same item type. Microsoft.ML.Runtime.EntryPoints.SchemaManipulation ConcatColumns Microsoft.ML.Runtime.Data.ConcatTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.ColumnCopier Duplicates columns from the dataset Microsoft.ML.Runtime.EntryPoints.SchemaManipulation CopyColumns Microsoft.ML.Transforms.CopyColumnsTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.ColumnSelector Selects a set of columns, dropping all others Microsoft.ML.Runtime.EntryPoints.SchemaManipulation SelectColumns Microsoft.ML.Transforms.SelectColumnsTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.ColumnTypeConverter Converts a column to a different type, using standard conversions. Microsoft.ML.Transforms.Conversions.TypeConversion Convert Microsoft.ML.Transforms.Conversions.ConvertingTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.CombinerByContiguousGroupId Groups values of a scalar column into a vector, by a contiguous group ID Microsoft.ML.Transforms.GroupingOperations Group Microsoft.ML.Transforms.GroupTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.ConditionalNormalizer Normalize the columns only if needed Microsoft.ML.Runtime.Data.Normalize IfNeeded Microsoft.ML.Transforms.Normalizers.NormalizeTransform+MinMaxArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+MacroOutput`1[Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput] Transforms.DataCache Caches using the specified cache option. Microsoft.ML.Runtime.EntryPoints.Cache CacheData Microsoft.ML.Runtime.EntryPoints.Cache+CacheInput Microsoft.ML.Runtime.EntryPoints.Cache+CacheOutput Transforms.DatasetScorer Score a dataset with a predictor model Microsoft.ML.Runtime.EntryPoints.ScoreModel Score Microsoft.ML.Runtime.EntryPoints.ScoreModel+Input Microsoft.ML.Runtime.EntryPoints.ScoreModel+Output Transforms.DatasetTransformScorer Score a dataset with a transform model Microsoft.ML.Runtime.EntryPoints.ScoreModel ScoreUsingTransform Microsoft.ML.Runtime.EntryPoints.ScoreModel+InputTransformScorer Microsoft.ML.Runtime.EntryPoints.ScoreModel+Output -Transforms.Dictionarizer Converts input values (words, numbers, etc.) to index in a dictionary. Microsoft.ML.Transforms.Text.TextAnalytics TermTransform Microsoft.ML.Transforms.Categorical.ValueToKeyMappingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.Dictionarizer Converts input values (words, numbers, etc.) to index in a dictionary. Microsoft.ML.Transforms.Text.TextAnalytics TermTransform Microsoft.ML.Transforms.Categorical.TermTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.FeatureCombiner Combines all the features into one feature column. Microsoft.ML.Runtime.EntryPoints.FeatureCombiner PrepareFeatures Microsoft.ML.Runtime.EntryPoints.FeatureCombiner+FeatureCombinerInput Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.FeatureSelectorByCount Selects the slots for which the count of non-default values is greater than or equal to a threshold. Microsoft.ML.Transforms.SelectFeatures CountSelect Microsoft.ML.Transforms.CountFeatureSelectingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.FeatureSelectorByCount Selects the slots for which the count of non-default values is greater than or equal to a threshold. Microsoft.ML.Transforms.SelectFeatures CountSelect Microsoft.ML.Transforms.CountFeatureSelectionTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.FeatureSelectorByMutualInformation Selects the top k slots across all specified columns ordered by their mutual information with the label column. Microsoft.ML.Transforms.SelectFeatures MutualInformationSelect Microsoft.ML.Transforms.MutualInformationFeatureSelectionTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.GlobalContrastNormalizer Performs a global contrast normalization on input values: Y = (s * X - M) / D, where s is a scale, M is mean and D is either L2 norm or standard deviation. Microsoft.ML.Transforms.Projections.LpNormalization GcNormalize Microsoft.ML.Transforms.Projections.LpNormalizingTransformer+GcnArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.HashConverter Converts column values into hashes. This transform accepts both numeric and text inputs, both single and vector-valued columns. Microsoft.ML.Transforms.Conversions.HashJoin Apply Microsoft.ML.Transforms.Conversions.HashJoiningTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.GlobalContrastNormalizer Performs a global contrast normalization on input values: Y = (s * X - M) / D, where s is a scale, M is mean and D is either L2 norm or standard deviation. Microsoft.ML.Transforms.Projections.LpNormalization GcNormalize Microsoft.ML.Transforms.Projections.LpNormNormalizerTransform+GcnArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.HashConverter Converts column values into hashes. This transform accepts both numeric and text inputs, both single and vector-valued columns. Microsoft.ML.Transforms.Conversions.HashJoin Apply Microsoft.ML.Transforms.Conversions.HashJoinTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.ImageGrayscale Convert image into grayscale. Microsoft.ML.Runtime.ImageAnalytics.EntryPoints.ImageAnalytics ImageGrayscale Microsoft.ML.Runtime.ImageAnalytics.ImageGrayscaleTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.ImageLoader Load images from files. Microsoft.ML.Runtime.ImageAnalytics.EntryPoints.ImageAnalytics ImageLoader Microsoft.ML.Runtime.ImageAnalytics.ImageLoaderTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.ImagePixelExtractor Extract color plane(s) from an image. Options include scaling, offset and conversion to floating point. Microsoft.ML.Runtime.ImageAnalytics.EntryPoints.ImageAnalytics ImagePixelExtractor Microsoft.ML.Runtime.ImageAnalytics.ImagePixelExtractorTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.ImageResizer Scales an image to specified dimensions using one of the three scale types: isotropic with padding, isotropic with cropping or anisotropic. In case of isotropic padding, transparent color is used to pad resulting image. Microsoft.ML.Runtime.ImageAnalytics.EntryPoints.ImageAnalytics ImageResizer Microsoft.ML.Runtime.ImageAnalytics.ImageResizerTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.KeyToTextConverter KeyToValueTransform utilizes KeyValues metadata to map key indices to the corresponding values in the KeyValues metadata. Microsoft.ML.Transforms.Categorical.Categorical KeyToText Microsoft.ML.Transforms.Conversions.KeyToValueMappingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.KeyToTextConverter KeyToValueTransform utilizes KeyValues metadata to map key indices to the corresponding values in the KeyValues metadata. Microsoft.ML.Transforms.Categorical.Categorical KeyToText Microsoft.ML.Transforms.Conversions.KeyToValueTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.LabelColumnKeyBooleanConverter Transforms the label to either key or bool (if needed) to make it suitable for classification. Microsoft.ML.Runtime.EntryPoints.FeatureCombiner PrepareClassificationLabel Microsoft.ML.Runtime.EntryPoints.FeatureCombiner+ClassificationLabelInput Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.LabelIndicator Label remapper used by OVA Microsoft.ML.Transforms.LabelIndicatorTransform LabelIndicator Microsoft.ML.Transforms.LabelIndicatorTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.LabelToFloatConverter Transforms the label to float to make it suitable for regression. Microsoft.ML.Runtime.EntryPoints.FeatureCombiner PrepareRegressionLabel Microsoft.ML.Runtime.EntryPoints.FeatureCombiner+RegressionLabelInput Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.LightLda The LDA transform implements LightLDA, a state-of-the-art implementation of Latent Dirichlet Allocation. Microsoft.ML.Transforms.Text.TextAnalytics LightLda Microsoft.ML.Transforms.Text.LatentDirichletAllocationTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.LightLda The LDA transform implements LightLDA, a state-of-the-art implementation of Latent Dirichlet Allocation. Microsoft.ML.Transforms.Text.TextAnalytics LightLda Microsoft.ML.Transforms.Text.LdaTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.LogMeanVarianceNormalizer Normalizes the data based on the computed mean and variance of the logarithm of the data. Microsoft.ML.Runtime.Data.Normalize LogMeanVar Microsoft.ML.Transforms.Normalizers.NormalizeTransform+LogMeanVarArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.LpNormalizer Normalize vectors (rows) individually by rescaling them to unit norm (L2, L1 or LInf). Performs the following operation on a vector X: Y = (X - M) / D, where M is mean and D is either L2 norm, L1 norm or LInf norm. Microsoft.ML.Transforms.Projections.LpNormalization Normalize Microsoft.ML.Transforms.Projections.LpNormalizingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.LpNormalizer Normalize vectors (rows) individually by rescaling them to unit norm (L2, L1 or LInf). Performs the following operation on a vector X: Y = (X - M) / D, where M is mean and D is either L2 norm, L1 norm or LInf norm. Microsoft.ML.Transforms.Projections.LpNormalization Normalize Microsoft.ML.Transforms.Projections.LpNormNormalizerTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.ManyHeterogeneousModelCombiner Combines a sequence of TransformModels and a PredictorModel into a single PredictorModel. Microsoft.ML.Runtime.EntryPoints.ModelOperations CombineModels Microsoft.ML.Runtime.EntryPoints.ModelOperations+PredictorModelInput Microsoft.ML.Runtime.EntryPoints.ModelOperations+PredictorModelOutput Transforms.MeanVarianceNormalizer Normalizes the data based on the computed mean and variance of the data. Microsoft.ML.Runtime.Data.Normalize MeanVar Microsoft.ML.Transforms.Normalizers.NormalizeTransform+MeanVarArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.MinMaxNormalizer Normalizes the data based on the observed minimum and maximum values of the data. Microsoft.ML.Runtime.Data.Normalize MinMax Microsoft.ML.Transforms.Normalizers.NormalizeTransform+MinMaxArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.MissingValueHandler Handle missing values by replacing them with either the default value or the mean/min/max value (for non-text columns only). An indicator column can optionally be concatenated, if theinput column type is numeric. Microsoft.ML.Transforms.NAHandling Handle Microsoft.ML.Transforms.MissingValueHandlingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.MissingValueIndicator Create a boolean output column with the same number of slots as the input column, where the output value is true if the value in the input column is missing. Microsoft.ML.Transforms.NAHandling Indicator Microsoft.ML.Transforms.MissingValueIndicatorTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.MissingValuesDropper Removes NAs from vector columns. Microsoft.ML.Transforms.NAHandling Drop Microsoft.ML.Transforms.MissingValueDroppingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.MissingValueHandler Handle missing values by replacing them with either the default value or the mean/min/max value (for non-text columns only). An indicator column can optionally be concatenated, if theinput column type is numeric. Microsoft.ML.Transforms.NAHandling Handle Microsoft.ML.Transforms.NAHandleTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.MissingValueIndicator Create a boolean output column with the same number of slots as the input column, where the output value is true if the value in the input column is missing. Microsoft.ML.Transforms.NAHandling Indicator Microsoft.ML.Transforms.NAIndicatorTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.MissingValuesDropper Removes NAs from vector columns. Microsoft.ML.Transforms.NAHandling Drop Microsoft.ML.Runtime.Data.NADropTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.MissingValuesRowDropper Filters out rows that contain missing values. Microsoft.ML.Transforms.NAHandling Filter Microsoft.ML.Transforms.NAFilter+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.MissingValueSubstitutor Create an output column of the same type and size of the input column, where missing values are replaced with either the default value or the mean/min/max value (for non-text columns only). Microsoft.ML.Transforms.NAHandling Replace Microsoft.ML.Transforms.MissingValueReplacingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.MissingValueSubstitutor Create an output column of the same type and size of the input column, where missing values are replaced with either the default value or the mean/min/max value (for non-text columns only). Microsoft.ML.Transforms.NAHandling Replace Microsoft.ML.Transforms.NAReplaceTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.ModelCombiner Combines a sequence of TransformModels into a single model Microsoft.ML.Runtime.EntryPoints.ModelOperations CombineTransformModels Microsoft.ML.Runtime.EntryPoints.ModelOperations+CombineTransformModelsInput Microsoft.ML.Runtime.EntryPoints.ModelOperations+CombineTransformModelsOutput -Transforms.NGramTranslator Produces a bag of counts of ngrams (sequences of consecutive values of length 1-n) in a given vector of keys. It does so by building a dictionary of ngrams and using the id in the dictionary as the index in the bag. Microsoft.ML.Transforms.Text.TextAnalytics NGramTransform Microsoft.ML.Transforms.Text.NgramCountingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.NGramTranslator Produces a bag of counts of ngrams (sequences of consecutive values of length 1-n) in a given vector of keys. It does so by building a dictionary of ngrams and using the id in the dictionary as the index in the bag. Microsoft.ML.Transforms.Text.TextAnalytics NGramTransform Microsoft.ML.Transforms.Text.NgramTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.NoOperation Does nothing. Microsoft.ML.Runtime.Data.NopTransform Nop Microsoft.ML.Runtime.Data.NopTransform+NopInput Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.OptionalColumnCreator If the source column does not exist after deserialization, create a column with the right type and default values. Microsoft.ML.Transforms.OptionalColumnTransform MakeOptional Microsoft.ML.Transforms.OptionalColumnTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.PcaCalculator PCA is a dimensionality-reduction transform which computes the projection of a numeric vector onto a low-rank subspace. Microsoft.ML.Transforms.Projections.PcaTransform Calculate Microsoft.ML.Transforms.Projections.PcaTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput @@ -129,13 +129,13 @@ Transforms.RowTakeFilter Allows limiting input to a subset of rows by taking N f Transforms.ScoreColumnSelector Selects only the last score columns and the extra columns specified in the arguments. Microsoft.ML.Runtime.EntryPoints.ScoreModel SelectColumns Microsoft.ML.Runtime.EntryPoints.ScoreModel+ScoreColumnSelectorInput Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.Scorer Turn the predictor model into a transform model Microsoft.ML.Runtime.EntryPoints.ScoreModel MakeScoringTransform Microsoft.ML.Runtime.EntryPoints.ScoreModel+ModelInput Microsoft.ML.Runtime.EntryPoints.ScoreModel+Output Transforms.Segregator Un-groups vector columns into sequences of rows, inverse of Group transform Microsoft.ML.Transforms.GroupingOperations Ungroup Microsoft.ML.Transforms.UngroupTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.SentimentAnalyzer Uses a pretrained sentiment model to score input strings Microsoft.ML.Transforms.Text.TextAnalytics AnalyzeSentiment Microsoft.ML.Transforms.Text.SentimentAnalyzingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.SentimentAnalyzer Uses a pretrained sentiment model to score input strings Microsoft.ML.Transforms.Text.TextAnalytics AnalyzeSentiment Microsoft.ML.Transforms.Text.SentimentAnalyzingTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.TensorFlowScorer Transforms the data using the TensorFlow model. Microsoft.ML.Transforms.TensorFlowTransform TensorFlowScorer Microsoft.ML.Transforms.TensorFlowTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.TextFeaturizer A transform that turns a collection of text documents into numerical feature vectors. The feature vectors are normalized counts of (word and/or character) ngrams in a given tokenized text. Microsoft.ML.Transforms.Text.TextAnalytics TextTransform Microsoft.ML.Transforms.Text.TextFeaturizingEstimator+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.TextToKeyConverter Converts input values (words, numbers, etc.) to index in a dictionary. Microsoft.ML.Transforms.Categorical.Categorical TextToKey Microsoft.ML.Transforms.Categorical.ValueToKeyMappingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.TextToKeyConverter Converts input values (words, numbers, etc.) to index in a dictionary. Microsoft.ML.Transforms.Categorical.Categorical TextToKey Microsoft.ML.Transforms.Categorical.TermTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.TrainTestDatasetSplitter Split the dataset into train and test sets Microsoft.ML.Runtime.EntryPoints.TrainTestSplit Split Microsoft.ML.Runtime.EntryPoints.TrainTestSplit+Input Microsoft.ML.Runtime.EntryPoints.TrainTestSplit+Output Transforms.TreeLeafFeaturizer Trains a tree ensemble, or loads it from a file, then maps a numeric feature vector to three outputs: 1. A vector containing the individual tree outputs of the tree ensemble. 2. A vector indicating the leaves that the feature vector falls on in the tree ensemble. 3. A vector indicating the paths that the feature vector falls on in the tree ensemble. If a both a model file and a trainer are specified - will use the model file. If neither are specified, will train a default FastTree model. This can handle key labels by training a regression model towards their optionally permuted indices. Microsoft.ML.Runtime.Data.TreeFeaturize Featurizer Microsoft.ML.Runtime.Data.TreeEnsembleFeaturizerTransform+ArgumentsForEntryPoint Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput Transforms.TwoHeterogeneousModelCombiner Combines a TransformModel and a PredictorModel into a single PredictorModel. Microsoft.ML.Runtime.EntryPoints.ModelOperations CombineTwoModels Microsoft.ML.Runtime.EntryPoints.ModelOperations+SimplePredictorModelInput Microsoft.ML.Runtime.EntryPoints.ModelOperations+PredictorModelOutput Transforms.VectorToImage Converts vector array into image type. Microsoft.ML.Runtime.ImageAnalytics.EntryPoints.ImageAnalytics VectorToImage Microsoft.ML.Runtime.ImageAnalytics.VectorToImageTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.WordEmbeddings Word Embeddings transform is a text featurizer which converts vectors of text tokens into sentence vectors using a pre-trained model Microsoft.ML.Transforms.Text.TextAnalytics WordEmbeddings Microsoft.ML.Transforms.Text.WordEmbeddingsExtractingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput -Transforms.WordTokenizer The input to this transform is text, and the output is a vector of text containing the words (tokens) in the original text. The separator is space, but can be specified as any other character (or multiple characters) if needed. Microsoft.ML.Transforms.Text.TextAnalytics DelimitedTokenizeTransform Microsoft.ML.Transforms.Text.WordTokenizingTransformer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.WordEmbeddings Word Embeddings transform is a text featurizer which converts vectors of text tokens into sentence vectors using a pre-trained model Microsoft.ML.Transforms.Text.TextAnalytics WordEmbeddings Microsoft.ML.Transforms.Text.WordEmbeddingsTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput +Transforms.WordTokenizer The input to this transform is text, and the output is a vector of text containing the words (tokens) in the original text. The separator is space, but can be specified as any other character (or multiple characters) if needed. Microsoft.ML.Transforms.Text.TextAnalytics DelimitedTokenizeTransform Microsoft.ML.Transforms.Text.WordTokenizeTransform+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput diff --git a/test/BaselineOutput/Common/EntryPoints/core_manifest.json b/test/BaselineOutput/Common/EntryPoints/core_manifest.json index 6b5b8eb81a..bfdec78010 100644 --- a/test/BaselineOutput/Common/EntryPoints/core_manifest.json +++ b/test/BaselineOutput/Common/EntryPoints/core_manifest.json @@ -20054,7 +20054,7 @@ { "Name": "NumTopic", "Type": "Int", - "Desc": "The number of topics", + "Desc": "The number of topics in the LDA", "Required": false, "SortOrder": 150.0, "IsNullable": true, @@ -20209,7 +20209,7 @@ { "Name": "NumTopic", "Type": "Int", - "Desc": "The number of topics", + "Desc": "The number of topics in the LDA", "Required": false, "SortOrder": 50.0, "IsNullable": false, @@ -20225,28 +20225,28 @@ } }, { - "Name": "NumThreads", + "Name": "NumMaxDocToken", "Type": "Int", - "Desc": "The number of training threads. Default value depends on number of logical processors.", + "Desc": "The threshold of maximum count of tokens per doc", "Aliases": [ - "t" + "maxNumToken" ], "Required": false, "SortOrder": 50.0, "IsNullable": false, - "Default": 0 + "Default": 512 }, { - "Name": "NumMaxDocToken", + "Name": "NumThreads", "Type": "Int", - "Desc": "The threshold of maximum count of tokens per doc", + "Desc": "The number of training threads. Default value depends on number of logical processors.", "Aliases": [ - "maxNumToken" + "t" ], "Required": false, "SortOrder": 50.0, - "IsNullable": false, - "Default": 512 + "IsNullable": true, + "Default": null }, { "Name": "AlphaSum", diff --git a/test/BaselineOutput/Common/EntryPoints/ensemble-model0-stats.txt b/test/BaselineOutput/Common/EntryPoints/ensemble-model0-stats.txt index 057ef0ff87..5c5d36e4b6 100644 --- a/test/BaselineOutput/Common/EntryPoints/ensemble-model0-stats.txt +++ b/test/BaselineOutput/Common/EntryPoints/ensemble-model0-stats.txt @@ -5,14 +5,6 @@ #@ col={name={Residual Deviance} type=R4 src=1} #@ col={name={Null Deviance} type=R4 src=2} #@ col=AIC:R4:3 -#@ col=BiasEstimate:R4:4 -#@ col=BiasStandardError:R4:5 -#@ col=BiasZScore:R4:6 -#@ col=BiasPValue:R4:7 -#@ col=Estimate:R4:8-16 -#@ col=StandardError:R4:17-25 -#@ col=ZScore:R4:26-34 -#@ col=PValue:R4:35-43 #@ } -Count of training examples Residual Deviance Null Deviance AIC BiasEstimate BiasStandardError BiasZScore BiasPValue Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 -521 98.29433 669.0935 118.294327 -5.120674 0.699818552 -7.31714535 0 2.353567 1.78653753 1.9442488 1.38072 1.0831089 2.43588924 1.61141682 1.34575915 -0.7715381 0.4267568 0.42040658 0.41370967 0.482155383 0.456691444 0.451504 0.4605175 0.478413582 0.342069477 5.5150075 4.249547 4.69954872 2.86364126 2.37164259 5.395056 3.4991436 2.81296182 -2.255501 5.96046448E-08 2.14576721E-05 2.62260437E-06 0.00418818 0.0177091956 5.96046448E-08 0.000466823578 0.00490885973 0.0241017938 +Count of training examples Residual Deviance Null Deviance AIC +521 98.29433 669.0935 118.294327 diff --git a/test/BaselineOutput/Common/EntryPoints/ensemble-model2-stats.txt b/test/BaselineOutput/Common/EntryPoints/ensemble-model2-stats.txt index dbb2224574..152e94f64d 100644 --- a/test/BaselineOutput/Common/EntryPoints/ensemble-model2-stats.txt +++ b/test/BaselineOutput/Common/EntryPoints/ensemble-model2-stats.txt @@ -5,14 +5,6 @@ #@ col={name={Residual Deviance} type=R4 src=1} #@ col={name={Null Deviance} type=R4 src=2} #@ col=AIC:R4:3 -#@ col=BiasEstimate:R4:4 -#@ col=BiasStandardError:R4:5 -#@ col=BiasZScore:R4:6 -#@ col=BiasPValue:R4:7 -#@ col=Estimate:R4:8-16 -#@ col=StandardError:R4:17-25 -#@ col=ZScore:R4:26-34 -#@ col=PValue:R4:35-43 #@ } -Count of training examples Residual Deviance Null Deviance AIC BiasEstimate BiasStandardError BiasZScore BiasPValue Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 Features.thickness Features.uniform_size Features.uniform_shape Features.adhesion Features.epit_size Features.bare_nuclei Features.bland_chromatin Features.normal_nucleoli Cat.1 -520 94.1969452 673.3445 114.196945 -4.860323 0.712811947 -6.81852055 0 2.143086 1.49418533 1.71121442 1.38318741 0.883200347 3.16845965 1.38684654 1.51904845 -0.8226236 0.430655479 0.4099987 0.4222687 0.4832917 0.457050323 0.457937717 0.445124656 0.4728626 0.338379949 4.976335 3.64436626 4.05243 2.86201358 1.93239188 6.918975 3.11563635 3.21245217 -2.43106484 6.556511E-07 0.0002681017 5.07235527E-05 0.00420969725 0.05331099 0 0.00183564425 0.00131618977 0.0150545239 +Count of training examples Residual Deviance Null Deviance AIC +520 94.1969452 673.3445 114.196945 diff --git a/test/BaselineOutput/Common/EntryPoints/ensemble-summary-key-value-pairs.txt b/test/BaselineOutput/Common/EntryPoints/ensemble-summary-key-value-pairs.txt index d89d7a7619..beeec64d77 100644 --- a/test/BaselineOutput/Common/EntryPoints/ensemble-summary-key-value-pairs.txt +++ b/test/BaselineOutput/Common/EntryPoints/ensemble-summary-key-value-pairs.txt @@ -14,16 +14,6 @@ Count of training examples: 521 Residual Deviance: 98.29433 Null Deviance: 669.0935 AIC: 118.2943 -(Bias): System.Single[] -Features.thickness: System.Single[] -Features.bare_nuclei: System.Single[] -Features.uniform_shape: System.Single[] -Features.uniform_size: System.Single[] -Features.bland_chromatin: System.Single[] -Features.adhesion: System.Single[] -Features.normal_nucleoli: System.Single[] -Features.epit_size: System.Single[] -Cat.1: System.Single[] Partition model 1 summary: Per-feature gain summary for the boosted tree ensemble: Features.uniform_size: 1 @@ -53,16 +43,6 @@ Count of training examples: 520 Residual Deviance: 94.19695 Null Deviance: 673.3445 AIC: 114.1969 -(Bias): System.Single[] -Features.bare_nuclei: System.Single[] -Features.thickness: System.Single[] -Features.uniform_shape: System.Single[] -Features.uniform_size: System.Single[] -Features.normal_nucleoli: System.Single[] -Features.bland_chromatin: System.Single[] -Features.adhesion: System.Single[] -Features.epit_size: System.Single[] -Cat.1: System.Single[] Partition model 3 summary: Per-feature gain summary for the boosted tree ensemble: Features.uniform_size: 1 diff --git a/test/BaselineOutput/Common/EntryPoints/ensemble-summary.txt b/test/BaselineOutput/Common/EntryPoints/ensemble-summary.txt index fadb2e27c8..50abe9df54 100644 --- a/test/BaselineOutput/Common/EntryPoints/ensemble-summary.txt +++ b/test/BaselineOutput/Common/EntryPoints/ensemble-summary.txt @@ -17,21 +17,6 @@ Count of training examples: 521 Residual Deviance: 98.29433 Null Deviance: 669.0935 AIC: 118.2943 - -Coefficients statistics: -Coefficient Estimate Std. Error z value Pr(>|z|) -(Bias) -5.120674 0.6998186 -7.317145 0 *** -Features.thickness 2.353567 0.4267568 5.515007 5.960464E-08 *** -Features.bare_nuclei 2.435889 0.451504 5.395056 5.960464E-08 *** -Features.uniform_shape 1.944249 0.4137097 4.699549 2.622604E-06 *** -Features.uniform_size 1.786538 0.4204066 4.249547 2.145767E-05 *** -Features.bland_chromatin 1.611417 0.4605175 3.499144 0.0004668236 *** -Features.adhesion 1.38072 0.4821554 2.863641 0.00418818 ** -Features.normal_nucleoli 1.345759 0.4784136 2.812962 0.00490886 ** -Features.epit_size 1.083109 0.4566914 2.371643 0.0177092 * -Cat.1 -0.7715381 0.3420695 -2.255501 0.02410179 * ---- -Significance codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Partition model 1 summary: Per-feature gain summary for the boosted tree ensemble: @@ -65,21 +50,6 @@ Count of training examples: 520 Residual Deviance: 94.19695 Null Deviance: 673.3445 AIC: 114.1969 - -Coefficients statistics: -Coefficient Estimate Std. Error z value Pr(>|z|) -(Bias) -4.860323 0.7128119 -6.818521 0 *** -Features.bare_nuclei 3.16846 0.4579377 6.918975 0 *** -Features.thickness 2.143086 0.4306555 4.976335 6.556511E-07 *** -Features.uniform_shape 1.711214 0.4222687 4.05243 5.072355E-05 *** -Features.uniform_size 1.494185 0.4099987 3.644366 0.0002681017 *** -Features.normal_nucleoli 1.519048 0.4728626 3.212452 0.00131619 ** -Features.bland_chromatin 1.386847 0.4451247 3.115636 0.001835644 ** -Features.adhesion 1.383187 0.4832917 2.862014 0.004209697 ** -Features.epit_size 0.8832003 0.4570503 1.932392 0.05331099 . -Cat.1 -0.8226236 0.3383799 -2.431065 0.01505452 * ---- -Significance codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Partition model 3 summary: Per-feature gain summary for the boosted tree ensemble: diff --git a/test/BaselineOutput/Common/EntryPoints/lr-stats.txt b/test/BaselineOutput/Common/EntryPoints/lr-stats.txt index c467f102be..8e04238c73 100644 --- a/test/BaselineOutput/Common/EntryPoints/lr-stats.txt +++ b/test/BaselineOutput/Common/EntryPoints/lr-stats.txt @@ -5,14 +5,6 @@ #@ col={name={Residual Deviance} type=R4 src=1} #@ col={name={Null Deviance} type=R4 src=2} #@ col=AIC:R4:3 -#@ col=BiasEstimate:R4:4 -#@ col=BiasStandardError:R4:5 -#@ col=BiasZScore:R4:6 -#@ col=BiasPValue:R4:7 -#@ col=Estimate:R4:8-16 -#@ col=StandardError:R4:17-25 -#@ col=ZScore:R4:26-34 -#@ col=PValue:R4:35-43 #@ } -Count of training examples Residual Deviance Null Deviance AIC BiasEstimate BiasStandardError BiasZScore BiasPValue thickness uniform_size uniform_shape adhesion epit_size bare_nuclei bland_chromatin normal_nucleoli mitoses thickness uniform_size uniform_shape adhesion epit_size bare_nuclei bland_chromatin normal_nucleoli mitoses thickness uniform_size uniform_shape adhesion epit_size bare_nuclei bland_chromatin normal_nucleoli mitoses thickness uniform_size uniform_shape adhesion epit_size bare_nuclei bland_chromatin normal_nucleoli mitoses -683 126.83107 884.350159 146.83107 -6.186806 0.459383339 -13.4676332 0 2.65800762 1.68089855 1.944068 1.42514718 0.8536965 2.9325006 1.74816787 1.58165014 0.595681 0.455618978 0.429146379 0.431570023 0.479817748 0.470442533 0.4381438 0.469593167 0.4714128 0.467883229 5.83383846 3.916842 4.504641 2.97018433 1.814667 6.69301 3.72272849 3.35512757 1.27314031 0 8.9764595E-05 6.67572E-06 0.002976358 0.06957501 0 0.00019711256 0.0007933974 0.202968419 +Count of training examples Residual Deviance Null Deviance AIC +683 126.83107 884.350159 146.83107 diff --git a/test/BaselineOutput/Common/FastForestRegression/FastForestRegression-TrainTest-housing-out.txt b/test/BaselineOutput/Common/FastForestRegression/FastForestRegression-TrainTest-housing-out.txt index c4e8943cb8..f27cd71298 100644 --- a/test/BaselineOutput/Common/FastForestRegression/FastForestRegression-TrainTest-housing-out.txt +++ b/test/BaselineOutput/Common/FastForestRegression/FastForestRegression-TrainTest-housing-out.txt @@ -4,7 +4,6 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 506 instances Binning and forming Feature objects -Changing data from row-wise to column-wise Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. @@ -34,11 +33,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/Common/FastForestRegression/QuantileRegressorTester-TrainTest-housing-out.txt b/test/BaselineOutput/Common/FastForestRegression/QuantileRegressorTester-TrainTest-housing-out.txt index a9834d1a5a..846e03abea 100644 --- a/test/BaselineOutput/Common/FastForestRegression/QuantileRegressorTester-TrainTest-housing-out.txt +++ b/test/BaselineOutput/Common/FastForestRegression/QuantileRegressorTester-TrainTest-housing-out.txt @@ -4,7 +4,6 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 506 instances Binning and forming Feature objects -Changing data from row-wise to column-wise Reserved memory for tree learner: %Number% bytes Starting to train ... Not training a calibrator because it is not needed. @@ -34,11 +33,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/Common/FastRank/FastRank-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/Common/FastRank/FastRank-TrainTest-breast-cancer-out.txt index 05ab7bc5ea..5e8cb6c6d9 100644 --- a/test/BaselineOutput/Common/FastRank/FastRank-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/Common/FastRank/FastRank-TrainTest-breast-cancer-out.txt @@ -5,8 +5,6 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Warning: Skipped 16 instances with missing features during training Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -50,11 +48,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/Common/NormalizerEstimator/gcnNorm.tsv b/test/BaselineOutput/Common/NormalizerEstimator/gcnNorm.tsv deleted file mode 100644 index 334b7b2c5e..0000000000 --- a/test/BaselineOutput/Common/NormalizerEstimator/gcnNorm.tsv +++ /dev/null @@ -1,9 +0,0 @@ -#@ TextLoader{ -#@ sep=tab -#@ col=gcnNorm1:R4:0-10 -#@ col=gcnNorm2:R4:11-21 -#@ } --0.626524031 0.289601743 -0.0695612058 0.125636056 0.4509648 0.188099176 -0.0487401523 -0.04093227 -0.465160966 -0.0123033375 0.208920211 -7.12135649 1.99397969 -1.57964635 0.362541765 3.59952188 0.9840419 -1.37247956 -1.294792 -5.5158143 -1.00993776 1.19120872 --0.137441739 -0.055349838 0.0301625486 0.259335726 -0.270841062 0.3585301 0.0643675 0.5158729 -0.0108833946 -0.09981628 -0.653936446 -2.07604337 -1.25923944 -0.408401966 1.8718425 -3.40334988 2.85881376 -0.068067 4.42435455 -0.816803932 -1.70167494 -7.21510124 --0.1769031 -0.19703348 0.715542555 0.114987031 -0.153417677 -0.3647864 -0.257424533 -0.109801918 0.410232216 -0.0158602744 0.0344656147 -2.83750534 -3.03779984 6.04221725 0.06676483 -2.60382843 -4.70692062 -3.63868332 -2.169857 3.00441742 -1.23514938 -0.734413147 -0.160775676 0.485780418 -0.0587080531 0.169217363 -0.3752711 0.122788109 0.177659035 -0.358387738 -0.459687948 -0.223320842 0.3591552 1.17591143 4.40966749 -1.00792408 1.2599051 -4.15768671 0.7979399 1.34389877 -3.98969936 -4.997624 -2.64580059 3.14976263 diff --git a/test/BaselineOutput/Common/NormalizerEstimator/lpNorm.tsv b/test/BaselineOutput/Common/NormalizerEstimator/lpNorm.tsv deleted file mode 100644 index e96c30bce6..0000000000 --- a/test/BaselineOutput/Common/NormalizerEstimator/lpNorm.tsv +++ /dev/null @@ -1,9 +0,0 @@ -#@ TextLoader{ -#@ sep=tab -#@ col=lpNorm1:R4:0-10 -#@ col=lpNorm2:R4:11-21 -#@ } --0.686319232 0.192169383 -0.152238086 0.03493989 0.346903175 0.09483684 -0.132272437 -0.124785319 -0.5315855 -0.0973325446 0.114802495 -0.2479865 0.114628196 -0.0275332443 0.04972841 0.178497821 0.07445214 -0.019291997 -0.0162015334 -0.18411687 -0.004869824 0.08269338 --0.20306389 -0.1231699 -0.039946992 0.183090389 -0.3328916 0.279628932 -0.0066578323 0.432759076 -0.0798939839 -0.1664458 -0.7057302 -0.05594937 -0.0225316472 0.01227848 0.105569616 -0.110253163 0.145949364 0.0262025315 0.21 -0.00443037972 -0.0406329148 -0.2662025 --0.268398017 -0.28734377 0.571529865 0.006315247 -0.246294647 -0.445224941 -0.344181 -0.20524554 0.284186125 -0.116832078 -0.06946772 -0.0693613961 -0.07725425 0.2805549 0.0450849123 -0.0601530671 -0.143027976 -0.100932792 -0.0430519 0.1608467 -0.006218606 0.0135135166 -0.117021732 0.438831449 -0.100304335 0.125380427 -0.413755417 0.0794076 0.133739114 -0.397038 -0.497342378 -0.2632989 0.313451052 0.05448634 0.164629385 -0.0198959652 0.0573472 -0.127178147 0.04161248 0.06020806 -0.121456429 -0.155786738 -0.0756827 0.121716514 diff --git a/test/BaselineOutput/Common/NormalizerEstimator/whitened.tsv b/test/BaselineOutput/Common/NormalizerEstimator/whitened.tsv deleted file mode 100644 index c06b317bd8..0000000000 --- a/test/BaselineOutput/Common/NormalizerEstimator/whitened.tsv +++ /dev/null @@ -1,9 +0,0 @@ -#@ TextLoader{ -#@ sep=tab -#@ col=whitened1:R4:0-10 -#@ col=whitened2:R4:11-15 -#@ } --2.604605 0.829638362 -0.5992434 0.19860521 1.33247662 0.369197041 -0.5760094 -0.5490271 -1.94509208 -0.393351972 0.507488966 1.75005662 -0.546613038 2.462052 1.32538271 -0.57087183 --0.5923902 -0.324390084 -0.114805378 0.6855182 -1.055579 0.8767955 -0.0392023772 1.21807373 -0.160801888 -0.47570774 -2.22817 0.7284955 -0.8200103 0.4638015 -1.0152092 0.3444226 --0.9132714 -0.911281645 1.814283 0.07471426 -0.8969923 -1.44387519 -1.19571114 -0.6542767 0.887983143 -0.4604767 -0.17543222 0.0112341344 0.913079262 -0.134250313 -0.118262529 -1.16476536 -0.236966148 1.004758 -0.233154371 0.3862052 -1.02724624 0.240614042 0.299898773 -1.03102541 -1.13852251 -0.6675951 0.766793966 0.490669161 -0.489173561 -0.5981086 1.18466234 1.05758965 diff --git a/test/BaselineOutput/Common/Onnx/Cluster/BreastCancer/Kmeans.json b/test/BaselineOutput/Common/Onnx/Cluster/BreastCancer/Kmeans.json index d74ebe1c3f..880cd67637 100644 --- a/test/BaselineOutput/Common/Onnx/Cluster/BreastCancer/Kmeans.json +++ b/test/BaselineOutput/Common/Onnx/Cluster/BreastCancer/Kmeans.json @@ -166,24 +166,24 @@ ], "dataType": "FLOAT", "floatData": [ - 0.5522167, - 0.3039403, - 0.319211155, - 0.261575729, - 0.320196062, - 0.344088882, - 0.293349, - 0.273151934, - 0.15763472, - 0.285144627, - 0.332245946, - 0.325724274, - 0.315217048, - 0.328623, - 0.3706516, - 0.41992715, - 0.307970464, - 0.164492577 + 0.6232001, + 0.482400715, + 0.495733529, + 0.416533619, + 0.425866365, + 0.5456011, + 0.477333277, + 0.4338674, + 0.20399937, + 0.225407124, + 0.111400835, + 0.109446481, + 0.120521255, + 0.198697388, + 0.121824168, + 0.182410166, + 0.108143583, + 0.107166387 ], "name": "C" }, @@ -193,8 +193,8 @@ ], "dataType": "FLOAT", "floatData": [ - 0.9740776, - 0.940771043 + 1.97708726, + 0.200497344 ], "name": "C2" }, diff --git a/test/BaselineOutput/Common/Onnx/Cluster/BreastCancer/Kmeans.onnx b/test/BaselineOutput/Common/Onnx/Cluster/BreastCancer/Kmeans.onnx new file mode 100644 index 0000000000000000000000000000000000000000..e1dc568fc4f9e2535c67fabcc2d2fd16f4bd0ec1 GIT binary patch literal 867 zcma)4%Wl&^6lEO8ac*dm8iC5ND42kdB`hb4R#@^xbrc?ILo3`xm7Nn$zz`?Jc0|d7 z6)Qe~bv^)z4`9Q#QjtK21t2OG^b0_hSVUs-YK%89(###5d(VA~2}!7JsCTQ|IHRen zYH3x|Zm62fZ+1F+`fCARA`ovx2Z2rrBVc;+iC?g)C;Hn;|!3X zXpjs>PV~aNg9GDVmoap(UA4;+Q@u76VV;e|?UZot9(8(6YV|zpanJUt90#Bpp#Z7? z-=}_8O6*ihn7>6mPaeNY4w80z_kn$u)$w+Kkg@oBl&jb#d2969+Um|LvmF4M6PANkms*5^s}pRALg&wd+k_I1+ee=`>PUkwvglrw-h=2I*!4$Id!Ys6$tRTcpu z2J)ljGRKpvVg0O literal 0 HcmV?d00001 diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeCustomStopwordsRemover-Data.txt b/test/BaselineOutput/Common/SavePipe/SavePipeCustomStopwordsRemover-Data.txt deleted file mode 100644 index 4653d9e1f1..0000000000 --- a/test/BaselineOutput/Common/SavePipe/SavePipeCustomStopwordsRemover-Data.txt +++ /dev/null @@ -1,6 +0,0 @@ -#@ TextLoader{ -#@ sep=tab -#@ col=T:TX:0-** -#@ } -Fred McGriff free agent -erythromycin treating pneumonia diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Data.txt b/test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Data.txt deleted file mode 100644 index f3ffa79f6e..0000000000 --- a/test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Data.txt +++ /dev/null @@ -1,32569 +0,0 @@ -#@ TextLoader{ -#@ header+ -#@ sep=tab -#@ col=One:TX:0 -#@ col=Num:R4:1-6 -#@ col=Cat:TX:7-15 -#@ } -One age fnlwgt education-num capital-gain capital-loss hours-per-week workclass education marital-status occupation relationship ethnicity sex native-country label(IsOver50K) -39 0.433333337 0.0522096977 0.8125 0.0217402168 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -50 0.5555556 0.0561128333 0.8125 0 0 0.13131313 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.145245016 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -53 0.5888889 0.158092692 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -28 0.311111122 0.227930129 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife Black Female Cuba 0 -37 0.411111116 0.1916758 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 0 -49 0.544444442 0.10789147 0.3125 0 0 0.161616161 Private 9th Married-spouse-absent Other-service Not-in-family Black Female Jamaica 0 -52 0.5777778 0.141201124 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.0308350828 0.875 0.14084141 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 -42 0.466666669 0.1073944 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.188902169 0.625 0 0 0.8080808 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -30 0.333333343 0.0951684043 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -23 0.25555557 0.08235441 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -32 0.355555564 0.138087362 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Sales Not-in-family Black Male United-States 0 -40 0.444444448 0.0820176452 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male ? 1 -34 0.377777785 0.165343955 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male Mexico 0 -25 0.2777778 0.119051263 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -32 0.355555564 0.125832409 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 -38 0.422222227 0.01945639 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 -43 0.477777779 0.196789935 0.875 0 0 0.454545468 Self-emp-not-inc Masters Divorced Exec-managerial Unmarried White Female United-States 1 -40 0.444444448 0.130345091 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -54 0.6 0.203505754 0.5625 0 0 0.2020202 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 -35 0.3888889 0.0517577566 0.3125 0 0 0.4040404 Federal-gov 9th Married-civ-spouse Farming-fishing Husband Black Male United-States 0 -43 0.477777779 0.078828454 0.4375 0 0.4687787 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.07342536 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 -56 0.622222245 0.146056622 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -19 0.211111113 0.113351814 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -54 0.6 0.121378325 0.625 0 0 0.6060606 ? Some-college Married-civ-spouse ? Husband Asian-Pac-Islander Male South 1 -39 0.433333337 0.247362271 0.5625 0 0 0.8080808 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -49 0.544444442 0.130238667 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.128449082 0.75 0 0 0.5252525 Local-gov Assoc-acdm Never-married Protective-serv Not-in-family White Male United-States 0 -20 0.222222224 0.179170281 0.625 0 0 0.444444448 Private Some-college Never-married Sales Own-child Black Male United-States 0 -45 0.5 0.260617435 0.8125 0 0.323232323 0.4040404 Private Bachelors Divorced Exec-managerial Own-child White Male United-States 0 -30 0.333333343 0.040379066 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Own-child White Male United-States 0 -22 0.244444445 0.209814072 0.625 0 0 0.151515156 State-gov Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 -48 0.533333361 0.1632688 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Unmarried White Male Puerto-Rico 0 -21 0.233333334 0.132821 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -19 0.211111113 0.366464049 0.5625 0 0 0.25252524 Private HS-grad Married-AF-spouse Adm-clerical Wife White Female United-States 0 -31 0.344444454 0.05668062 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Sales Husband White Male ? 1 -48 0.533333361 0.178807914 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -31 0.344444454 0.342071325 0.3125 0 0 0.434343427 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -53 0.5888889 0.059611842 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -24 0.266666681 0.116512708 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -49 0.544444442 0.06374196 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -25 0.2777778 0.195311531 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -57 0.6333333 0.22758393 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -53 0.5888889 0.09723211 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -44 0.4888889 0.086450845 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Unmarried White Female United-States 0 -41 0.455555558 0.06843312 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.182841718 0.6875 0 0 0.434343427 Private Assoc-voc Never-married Prof-specialty Not-in-family White Male United-States 0 -25 0.2777778 0.0217383262 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife Other Female United-States 0 -18 0.2 0.1528627 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female ? 0 -47 0.5222222 0.03491266 0.9375 0 0.43663913 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female Honduras 1 -50 0.5555556 0.169451177 0.8125 0 0 0.5555556 Federal-gov Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -47 0.5222222 0.07397564 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -43 0.477777779 0.1602965 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -46 0.51111114 0.145932019 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -35 0.3888889 0.0379550159 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male Puerto-Rico 0 -41 0.455555558 0.09926012 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -30 0.333333343 0.126722813 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -30 0.333333343 0.04007261 0.8125 0.02407024 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.197976038 0.25 0 0 0.4040404 ? 7th-8th Married-spouse-absent ? Not-in-family White Male ? 0 -48 0.533333361 0.1007877 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.07855567 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.0711239 0.625 0 0 0.5858586 Private Some-college Divorced Tech-support Not-in-family White Male United-States 0 -36 0.4 0.104759537 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.123374678 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -53 0.5888889 0.114397138 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -49 0.544444442 0.129103765 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.135165572 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -19 0.211111113 0.06836981 0.625 0 0 0.323232323 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -31 0.344444454 0.208778173 0.8125 0 0 0.4040404 Private Bachelors Separated Sales Own-child Black Female United-States 0 -29 0.322222233 0.1093133 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.142572433 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -79 0.8777778 0.0840193853 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Prof-specialty Other-relative White Male United-States 0 -27 0.3 0.144083172 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male Mexico 0 -40 0.444444448 0.02169724 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 -67 0.7444445 0.143300518 0.375 0 0 0.02020202 ? 10th Married-civ-spouse ? Husband White Male United-States 0 -18 0.2 0.208549172 0.4375 0 0 0.222222224 Private 11th Never-married Other-service Own-child White Female United-States 0 -31 0.344444454 0.08481618 0.25 0 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -18 0.2 0.300961465 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -52 0.5777778 0.186242387 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male Cuba 0 -46 0.51111114 0.0347665027 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -59 0.655555546 0.107723087 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.231420383 0.5625 0.143441439 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 1 -53 0.5888889 0.233213335 0.5625 0 0 0.353535354 Private HS-grad Divorced Sales Own-child White Female United-States 0 -49 0.544444442 0.180664852 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -33 0.366666675 0.136088312 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -30 0.333333343 0.03659582 0.3125 0 0 0.4040404 Private 9th Never-married Sales Not-in-family White Male United-States 0 -43 0.477777779 0.2767331 1 0 0 0.5050505 Federal-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 -57 0.6333333 0.168368131 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.193122551 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Female United-States 0 -28 0.311111122 0.143168509 0.625 0 0 0.25252524 Private Some-college Divorced Machine-op-inspct Unmarried Black Female United-States 0 -30 0.333333343 0.07930666 0.5625 0 0.3611111 0.353535354 Private HS-grad Married-civ-spouse Sales Wife Asian-Pac-Islander Female ? 0 -34 0.377777785 0.152418166 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -29 0.322222233 0.07785048 0.625 0 0 0.5050505 Local-gov Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -48 0.533333361 0.128831655 1 0 0.43663913 0.6060606 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.136514 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -48 0.533333361 0.115238383 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Unmarried White Female England 0 -32 0.355555564 0.167985559 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Other-service Own-child Black Male United-States 0 -76 0.844444454 0.08364692 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.133549765 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.100434765 0.875 0 0 0.5050505 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -20 0.222222224 0.12682654 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -29 0.322222233 0.06966502 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.21395497 0.5625 0.07688077 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -17 0.188888893 0.205342487 0.375 0.3409534 0 0.323232323 ? 10th Never-married ? Own-child White Female United-States 0 -30 0.333333343 0.131272539 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -31 0.344444454 0.1274765 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.08398436 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -24 0.266666681 0.291220158 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Other-relative White Male United-States 0 -38 0.422222227 0.0439979658 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -56 0.622222245 0.226041541 0.5625 0 0.4331956 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male Canada 1 -28 0.311111122 0.2545078 0.625 0.0406404063 0 0.25252524 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 -36 0.4 0.06928245 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -53 0.5888889 0.06442155 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -56 0.622222245 0.204141572 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -49 0.544444442 0.13293618 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 1 -55 0.6111111 0.166734815 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.06912619 0.5625 0 0 0.414141417 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.134649649 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -40 0.444444448 0.08005159 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.05195847 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child Black Male Germany 0 -29 0.322222233 0.180499837 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.203142047 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child Black Male United-States 0 -47 0.5222222 0.193862081 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -20 0.222222224 0.07523178 0.625 0 0.3946281 0.282828271 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -31 0.344444454 0.0774140358 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 -35 0.3888889 0.08709138 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -39 0.433333337 0.246337831 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.0468921438 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Sales Not-in-family White Female United-States 0 -24 0.266666681 0.0291795339 0.5625 0 0.404499531 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -38 0.422222227 0.0814875662 0.5625 0.04386044 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.171213821 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.09846737 0.75 0 0 0.363636374 Private Assoc-acdm Divorced Tech-support Not-in-family Black Female United-States 0 -38 0.422222227 0.08482022 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male Iran 1 -43 0.477777779 0.0383375846 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.109871663 0.6875 0 0 0.353535354 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 -20 0.222222224 0.0231089685 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 -49 0.544444442 0.05521164 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 1 -61 0.677777767 0.0448668264 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.15678671 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -19 0.211111113 0.213421524 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male Mexico 0 -45 0.5 0.1324061 0.6875 0 0.359045 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 1 -70 0.7777778 0.07097437 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Other-relative White Male United-States 0 -31 0.344444454 0.125152141 0.5625 0 0 0.3030303 Private HS-grad Never-married Transport-moving Unmarried Black Female United-States 0 -22 0.244444445 0.118120439 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -36 0.4 0.07293907 0.5625 0 0 0.24242425 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -64 0.7111111 0.122066 0.4375 0 0.500229537 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.117640883 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Female United-States 0 -47 0.5222222 0.12528348 0.625 0 0 0.3838384 Local-gov Some-college Divorced Adm-clerical Unmarried White Female Mexico 0 -34 0.377777785 0.133483082 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -33 0.366666675 0.109788142 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Other-relative Asian-Pac-Islander Female Philippines 0 -21 0.233333334 0.199472621 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -52 0.5777778 0.1703389 0.5625 0 0 0.454545468 ? HS-grad Divorced ? Not-in-family White Male United-States 1 -48 0.533333361 0.126432523 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.144501433 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family White Male United-States 0 -71 0.788888931 0.332876235 0.625 0 0.416896224 0.02020202 Self-emp-not-inc Some-college Separated Sales Unmarried Black Male United-States 0 -29 0.322222233 0.129005432 0.5625 0 0 0.6060606 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -42 0.466666669 0.153873 0.8125 0 0 0.5050505 Private Bachelors Separated Other-service Other-relative Black Male United-States 0 -68 0.75555557 0.02580782 0.125 0 0 0.2020202 ? 1st-4th Divorced ? Not-in-family White Female United-States 0 -25 0.2777778 0.170237184 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -44 0.4888889 0.05278759 0.875 0 0 0.4040404 Self-emp-inc Masters Divorced Exec-managerial Unmarried Asian-Pac-Islander Female United-States 0 -28 0.311111122 0.0595532469 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family Asian-Pac-Islander Female England 0 -45 0.5 0.135434315 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.13952738 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female Mexico 0 -39 0.433333337 0.158607274 0.75 0 0 0.424242437 Federal-gov Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 0 -46 0.51111114 0.0691235 0.875 0 0 0.4040404 State-gov Masters Widowed Protective-serv Unmarried White Male United-States 0 -18 0.2 0.01739605 0.4375 0 0 0.161616161 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -66 0.733333349 0.0369272 0.6875 0 0 0.2020202 Local-gov Assoc-voc Widowed Prof-specialty Not-in-family White Female United-States 0 -27 0.3 0.08416016 0.5625 0 0.454545438 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.118087433 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -51 0.566666663 0.06470107 0.625 0 0.453856736 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.288292974 0.8125 0 0 0.5050505 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.100776926 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.170952484 0.5625 0 0 0.25252524 Private HS-grad Married-spouse-absent Sales Unmarried White Female United-States 0 -21 0.233333334 0.210786656 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -34 0.377777785 0.3258405 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -18 0.2 0.123883195 0.5625 0 0 0.121212125 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -33 0.366666675 0.0251053236 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -44 0.4888889 0.122141436 0.625 0 0 0.3838384 Local-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -43 0.477777779 0.07717358 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.4268471 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 -40 0.444444448 0.192880064 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 1 -37 0.411111116 0.0195688717 0.625 0 0 0.424242437 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -34 0.377777785 0.2047747 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -41 0.455555558 0.09640232 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -53 0.5888889 0.0909978747 0.8125 0 0 0.5050505 ? Bachelors Divorced ? Not-in-family White Female United-States 0 -31 0.344444454 0.0673049539 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 -58 0.644444466 0.07379715 1 0 0 0.01010101 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.104547366 0.625 0 0 0.282828271 Private Some-college Divorced Machine-op-inspct Not-in-family Black Female United-States 0 -24 0.266666681 0.10747388 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -41 0.455555558 0.352871448 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Craft-repair Husband Black Male United-States 0 -47 0.5222222 0.08145659 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -41 0.455555558 0.08807137 0.8125 0 0 0.24242425 Federal-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -23 0.25555557 0.132946953 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Other-relative White Male Mexico 0 -36 0.4 0.066931814 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -40 0.444444448 0.038253393 0.875 0.14084141 0 0.5555556 Federal-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 1 -35 0.3888889 0.0936159045 0.875 0.07298073 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Other-relative White Male United-States 1 -24 0.266666681 0.0221734289 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Sales Not-in-family White Male United-States 0 -26 0.2888889 0.2676067 0.875 0 0.430670351 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -19 0.211111113 0.114940681 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male Italy 0 -51 0.566666663 0.174662977 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.171628043 0.625 0 0.307621658 0.4040404 Local-gov Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.0324717723 0.5625 0 0 0.353535354 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -18 0.2 0.094405286 0.4375 0 0 0.4040404 Private 11th Never-married Sales Own-child White Female United-States 0 -36 0.4 0.08672228 0.8125 0.07298073 0 0.363636374 Private Bachelors Married-civ-spouse Other-service Husband Black Male United-States 1 -35 0.3888889 0.0244290959 0.5625 0 0 0.6060606 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -58 0.644444466 0.141821444 0.5625 0.1502415 0 0.353535354 Self-emp-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 1 -17 0.188888893 0.0440276042 0.4375 0 0 0.121212125 Private 11th Never-married Sales Own-child White Female United-States 0 -44 0.4888889 0.108400658 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -37 0.411111116 0.1403363 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.103582866 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family Amer-Indian-Eskimo Female United-States 0 -60 0.6666667 0.05779936 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 0 -54 0.6 0.08447267 0.25 0 0 0.4040404 Self-emp-inc 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -37 0.411111116 0.428309321 0.8125 0 0 0.6060606 Private Bachelors Never-married Exec-managerial Not-in-family Black Male United-States 1 -50 0.5555556 0.2110325 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Sales Not-in-family White Female United-States 0 -38 0.422222227 0.122993462 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male Poland 0 -45 0.5 0.07370757 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -25 0.2777778 0.171753988 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 -31 0.344444454 0.13326554 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -64 0.7111111 0.126392782 0.125 0 0 0.4040404 ? 1st-4th Divorced ? Not-in-family White Male United-States 0 -90 1 0.03485137 0.5625 0 0.5064279 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 -54 0.6 0.119000748 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -53 0.5888889 0.0945366248 0.0625 0 0 0.353535354 Local-gov Preschool Never-married Machine-op-inspct Not-in-family White Female United-States 0 -18 0.2 0.1638797 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -60 0.6666667 0.0163096376 0.375 0 0 0.1010101 ? 10th Divorced ? Not-in-family Amer-Indian-Eskimo Female United-States 0 -66 0.733333349 0.112942979 0.5625 0.01409014 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -75 0.8333334 0.2116306 0.6875 0 0 0.2020202 Private Assoc-voc Widowed Adm-clerical Not-in-family White Female Columbia 0 -65 0.722222269 0.119078204 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.362754226 0.4375 0.0367403664 0 0.4040404 Private 11th Separated Transport-moving Not-in-family Black Male United-States 0 -41 0.455555558 0.08783428 0.5625 0 0 0.3838384 Private HS-grad Divorced Sales Unmarried Black Female United-States 0 -25 0.2777778 0.107585013 0.625 0 0 0.424242437 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -33 0.366666675 0.07474751 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Other-relative Other Female United-States 0 -28 0.311111122 0.0516695231 0.9375 0 0 0.5555556 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 -59 0.655555546 0.180978715 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -40 0.444444448 0.11485447 0.625 0 0 0.3838384 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -41 0.455555558 0.121329159 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Iran 1 -38 0.422222227 0.07750765 0.875 0 0 0.7070707 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.07776494 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -40 0.444444448 0.234315917 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.13201344 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -24 0.266666681 0.184484467 0.75 0 0 0.5050505 State-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 -20 0.222222224 0.08025567 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 -38 0.422222227 0.120891355 0.625 0 0.3996786 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -56 0.622222245 0.137118146 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male ? 0 -58 0.644444466 0.159355566 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -32 0.355555564 0.12387377 0.5625 0 0 0.343434334 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -40 0.444444448 0.139810935 0.75 0 0.453856736 0.6060606 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -45 0.5 0.103145748 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male ? 0 -41 0.455555558 0.0759497657 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 -42 0.466666669 0.2632045 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -59 0.655555546 0.115395315 0.375 0 0 0.3030303 Local-gov 10th Widowed Other-service Unmarried Black Female United-States 0 -19 0.211111113 0.018442722 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 -58 0.644444466 0.174454868 0.625 0 0 0.2020202 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -42 0.466666669 0.204110578 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male Cambodia 1 -20 0.222222224 0.07933495 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -32 0.355555564 0.116237909 0.5625 0 0 0.3030303 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -45 0.5 0.126399517 0.6875 0 0 0.454545468 Private Assoc-voc Widowed Exec-managerial Not-in-family White Female United-States 0 -50 0.5555556 0.137749925 0.25 0 0 0.4040404 Private 7th-8th Divorced Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.101058461 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Own-child White Female United-States 0 -45 0.5 0.0660683438 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -17 0.188888893 0.16563426 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Own-child White Male United-States 0 -59 0.655555546 0.09834479 0.625 0.0406404063 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.254812926 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.173297063 0.625 0 0 0.75757575 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Thailand 1 -19 0.211111113 0.147474423 0.625 0 0 0.24242425 ? Some-college Never-married ? Own-child White Male Canada 0 -64 0.7111111 0.014261419 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.124927178 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.149662733 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 1 -61 0.677777767 0.0470578335 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.128820211 0.3125 0.010550105 0 0.24242425 Private 9th Never-married Other-service Own-child White Male United-States 0 -50 0.5555556 0.0206458531 0.875 0.02407024 0 0.989899 Self-emp-not-inc Masters Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.140842125 0.875 0 0 0.353535354 Local-gov Masters Never-married Prof-specialty Own-child White Male United-States 0 -30 0.333333343 0.0474013351 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Own-child White Female United-States 0 -43 0.477777779 0.321938038 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -44 0.4888889 0.115123212 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.128088742 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -25 0.2777778 0.130522221 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -24 0.266666681 0.188234031 0.625 0.07298073 0 0.4848485 Private Some-college Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 -22 0.244444445 0.0235184766 0.8125 0 0 0.151515156 Private Bachelors Never-married Prof-specialty Not-in-family White Female Germany 0 -42 0.466666669 0.06579623 0.625 0.05178052 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.1181467 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Sales Unmarried Black Female United-States 0 -60 0.6666667 0.117168061 0.8125 0 0 0.424242437 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -21 0.233333334 0.138585776 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -57 0.6333333 0.2863606 0.875 0.1502415 0 0.4040404 Federal-gov Masters Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.148535237 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.118952252 0.625 0 0 0.454545468 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -25 0.2777778 0.250546068 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -50 0.5555556 0.130587563 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Ecuador 0 -36 0.4 0.134943977 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -31 0.344444454 0.08593963 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 -29 0.322222233 0.148459792 0.8125 0 0 0.565656543 Local-gov Bachelors Never-married Protective-serv Not-in-family White Male United-States 0 -21 0.233333334 0.156213522 0.625 0 0 0.454545468 Private Some-college Never-married Sales Own-child White Male United-States 0 -27 0.3 0.167307317 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Unmarried Black Female United-States 0 -65 0.722222269 0.074826315 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.0386770442 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Divorced Sales Not-in-family White Female United-States 0 -39 0.433333337 0.106043287 0.875 0.0346403457 0 0.4040404 ? Masters Married-civ-spouse ? Wife Asian-Pac-Islander Female ? 0 -24 0.266666681 0.187330142 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -38 0.422222227 0.114143215 0.5625 0 0 0.8080808 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -48 0.533333361 0.09851654 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -21 0.233333334 0.103534371 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Female United-States 0 -31 0.344444454 0.1464668 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -55 0.6111111 0.160730928 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.204280317 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female Laos 0 -43 0.477777779 0.116737671 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.130628645 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Tech-support Not-in-family White Male United-States 0 -46 0.51111114 0.05595859 0.75 0 0 0.333333343 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 -35 0.3888889 0.130541086 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 -41 0.455555558 0.0235649515 0.625 0 0 0.545454562 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -26 0.2888889 0.0399446376 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -34 0.377777785 0.0962460563 0.875 0.07298073 0 0.353535354 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Taiwan 1 -19 0.211111113 0.579474032 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child Black Female United-States 0 -36 0.4 0.1384834 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family Black Female United-States 1 -22 0.244444445 0.134503484 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Male United-States 0 -24 0.266666681 0.129287645 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -77 0.8555556 0.0934286639 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.268798858 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Other-relative White Female Mexico 0 -29 0.322222233 0.2850115 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -62 0.6888889 0.107658423 0.5625 0 0 0.24242425 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -39 0.433333337 0.117402449 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.0339165032 0.625 0 0.3409091 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.1253515 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -29 0.322222233 0.134963512 0.4375 0 0 0.4040404 Private 11th Never-married Exec-managerial Not-in-family White Female United-States 0 -76 0.844444454 0.11740312 0.875 0 0 0.1010101 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 0 -63 0.7 0.0527936555 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -23 0.25555557 0.142520577 0.6875 0 0 0.151515156 ? Assoc-voc Never-married ? Own-child Black Female United-States 0 -43 0.477777779 0.126441285 0.625 0 0.4331956 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -58 0.644444466 0.21631974 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -66 0.733333349 0.08615921 0.5625 0.0205002055 0 0.5555556 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -41 0.455555558 0.139128655 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 -26 0.2888889 0.151250929 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -47 0.5222222 0.12035118 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 -55 0.6111111 0.06637345 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -53 0.5888889 0.163403511 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -17 0.188888893 0.182488784 0.1875 0 0 0.4848485 Private 5th-6th Never-married Other-service Other-relative White Male Mexico 0 -30 0.333333343 0.06347052 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -49 0.544444442 0.0479522869 0.875 0 0 0.6060606 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -19 0.211111113 0.0701230243 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Unmarried Black Male Haiti 0 -45 0.5 0.175921813 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -26 0.2888889 0.06394267 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 -38 0.422222227 0.199688151 0.6875 0.07298073 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.08033381 0.5625 0.07298073 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -33 0.366666675 0.0572793931 0.5625 0 0 0.2020202 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -22 0.244444445 0.197590768 0.625 0 0 0.4040404 State-gov Some-college Never-married Protective-serv Own-child Black Female United-States 0 -43 0.477777779 0.162924618 0.8125 0 0 0.424242437 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 -67 0.7444445 0.024338169 0.4375 0 0 0.08080808 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -30 0.333333343 0.10236983 0.6875 0 0 0.4040404 ? Assoc-voc Divorced ? Unmarried White Female United-States 0 -56 0.622222245 0.06811319 0.75 0 0 0.25252524 Private Assoc-acdm Married-spouse-absent Other-service Not-in-family White Male Iran 0 -31 0.344444454 0.1053839 0.8125 0 0 0.25252524 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -33 0.366666675 0.07945215 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.129495084 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -33 0.366666675 0.07500682 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.222099349 0.4375 0 0 0.3030303 Local-gov 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.2505683 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -38 0.422222227 0.06427674 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -65 0.722222269 0.108708464 0.4375 0 0 0.4040404 Private 11th Widowed Other-service Unmarried Other Male United-States 0 -40 0.444444448 0.06474619 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -42 0.466666669 0.0754015148 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -26 0.2888889 0.07888772 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male Portugal 0 -36 0.4 0.234404817 0.375 0 0 0.24242425 Private 10th Married-civ-spouse Other-service Wife White Female United-States 0 -62 0.6888889 0.181916282 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.121646389 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -43 0.477777779 0.117582284 0.8125 0 0.359045 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -22 0.244444445 0.276444823 0.5625 0 0 0.5555556 Private HS-grad Married-spouse-absent Sales Not-in-family White Male United-States 0 -28 0.311111122 0.06214164 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -56 0.622222245 0.123311371 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.244216189 0.75 0 0 0.151515156 Private Assoc-acdm Never-married Sales Not-in-family White Female United-States 0 -57 0.6333333 0.143091053 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 -39 0.433333337 0.3240105 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -26 0.2888889 0.125199959 0.625 0 0 0.151515156 Federal-gov Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -17 0.188888893 0.06049754 0.4375 0 0 0.1010101 Private 11th Never-married Other-service Own-child White Male United-States 0 -40 0.444444448 0.123942472 0.6875 0 0 0.3838384 State-gov Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -45 0.5 0.172861949 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -44 0.4888889 0.107983068 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 -20 0.222222224 0.2363062 0.625 0 0 0.1010101 Local-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -33 0.366666675 0.18010582 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 0 -23 0.25555557 0.0240000542 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -46 0.51111114 0.05449837 0.875 0 0 0.3030303 Self-emp-not-inc Masters Divorced Exec-managerial Not-in-family White Male United-States 0 -38 0.422222227 0.1164723 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -54 0.6 0.117409855 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -46 0.51111114 0.144779608 0.1875 0 0.5369605 0.454545468 Private 5th-6th Divorced Craft-repair Not-in-family White Female United-States 0 -25 0.2777778 0.232363343 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.07321253 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -36 0.4 0.0790136755 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Wife White Female United-States 0 -23 0.25555557 0.266786337 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -29 0.322222233 0.090356 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family White Male United-States 0 -44 0.4888889 0.109131448 0.625 0 0.5544077 0.0606060624 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -19 0.211111113 0.017127309 0.625 0 0 0.161616161 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -19 0.211111113 0.156524032 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Female United-States 0 -35 0.3888889 0.148243591 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 -27 0.3 0.20293729 0.8125 0 0 0.5050505 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -46 0.51111114 0.187206224 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Separated Craft-repair Not-in-family White Male United-States 0 -34 0.377777785 0.06607441 0.8125 0.07688077 0 0.454545468 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 -34 0.377777785 0.132123217 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -44 0.4888889 0.07783499 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -45 0.5 0.06531601 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Unmarried White Female United-States 0 -20 0.222222224 0.092476286 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Other-relative White Female United-States 0 -25 0.2777778 0.058511287 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.08902644 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.280259728 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -28 0.311111122 0.0731283352 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -50 0.5555556 0.194215685 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -34 0.377777785 0.153356388 0.6875 0 0 0.646464646 Private Assoc-voc Divorced Tech-support Not-in-family White Female United-States 0 -28 0.311111122 0.112130694 0.25 0 0.500229537 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband Other Male Puerto-Rico 0 -41 0.455555558 0.299980134 0.875 0 0.453856736 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.07418646 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -46 0.51111114 0.213680834 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.08294375 0.625 0 0.4331956 0.4040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 -32 0.355555564 0.24560906 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.0285214912 0.625 0 0 0.24242425 Local-gov Some-college Divorced Other-service Not-in-family Black Female United-States 0 -24 0.266666681 0.162962347 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried Black Female United-States 0 -33 0.366666675 0.07981384 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -46 0.51111114 0.12688446 1 0.1502415 0 0.6060606 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.695910633 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.06226153 0.5 0 0 0.5050505 Private 12th Divorced Craft-repair Not-in-family White Male United-States 1 -52 0.5777778 0.128484786 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -30 0.333333343 0.286937147 0.4375 0 0 0.1919192 Private 11th Never-married Other-service Own-child White Female United-States 0 -34 0.377777785 0.164252833 0.4375 0 0 0.4040404 Local-gov 11th Separated Machine-op-inspct Not-in-family Black Male United-States 0 -34 0.377777785 0.161838889 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Transport-moving Unmarried White Female United-States 0 -20 0.222222224 0.04160894 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -17 0.188888893 0.1178847 0.4375 0.0217602178 0 0.181818187 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -32 0.355555564 0.0619671941 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -29 0.322222233 0.126894563 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -33 0.366666675 0.153921485 0.375 0 0 0.353535354 Private 10th Never-married Craft-repair Unmarried White Female United-States 0 -25 0.2777778 0.089831315 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.171879932 0.875 0 0.323232323 0.4040404 Federal-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -23 0.25555557 0.137840852 0.5625 0 0 0.727272749 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male Dominican-Republic 0 -63 0.7 0.149719313 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.1936277 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -80 0.8888889 0.0725814253 0.5625 0 0 0.24242425 ? HS-grad Widowed ? Not-in-family White Male United-States 0 -17 0.188888893 0.136404872 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child White Male United-States 0 -40 0.444444448 0.137479171 0.8125 0.0217402168 0 0.4040404 Self-emp-not-inc Bachelors Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.01997838 0.75 0 0 0.25252524 Private Assoc-acdm Married-civ-spouse Other-service Wife White Female United-States 1 -27 0.3 0.07837112 0.625 0 0.454545438 0.4040404 Private Some-college Never-married Craft-repair Own-child Asian-Pac-Islander Male Philippines 0 -33 0.366666675 0.140367955 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.191851586 0.5625 0.005940059 0 0.6060606 Local-gov HS-grad Never-married Farming-fishing Not-in-family Black Male United-States 0 -34 0.377777785 0.07881566 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family White Female United-States 0 -23 0.25555557 0.0547455549 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -42 0.466666669 0.2291014 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -29 0.322222233 0.244779274 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -45 0.5 0.03088627 0.5625 0 0 0.282828271 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.128694251 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Armed-Forces Own-child White Male United-States 0 -44 0.4888889 0.07855567 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.273357332 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Other-relative White Male Mexico 0 -20 0.222222224 0.200866163 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -44 0.4888889 0.19567591 0.5625 0 0 0.4040404 Private HS-grad Widowed Exec-managerial Unmarried Black Female United-States 0 -51 0.566666663 0.0383342169 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 -20 0.222222224 0.0986984 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -17 0.188888893 0.174359217 0.4375 0 0 0.05050505 ? 11th Never-married ? Own-child White Female United-States 0 -19 0.211111113 0.139016852 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Female United-States 0 -45 0.5 0.132909909 0.625 0 0 0.5555556 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -60 0.6666667 0.1650577 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.133078963 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband Black Male ? 1 -44 0.4888889 0.158203155 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 1 -40 0.444444448 0.04909191 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male United-States 1 -30 0.333333343 0.121488109 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -38 0.422222227 0.236611992 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 -23 0.25555557 0.0363789462 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.07795825 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -44 0.4888889 0.07855567 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Farming-fishing Own-child White Male United-States 0 -54 0.6 0.1945336 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -32 0.355555564 0.08931135 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -50 0.5555556 0.130244061 0.125 0 0 0.4040404 Private 1st-4th Married-spouse-absent Craft-repair Unmarried White Male United-States 0 -24 0.266666681 0.114548013 0.8125 0 0 0.2020202 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -37 0.411111116 0.0853422061 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -52 0.5777778 0.02397648 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Unmarried White Male United-States 0 -38 0.422222227 0.0228887219 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -49 0.544444442 0.129841283 0.875 0 0.453856736 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.0798481852 0.8125 0 0 0.161616161 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 -60 0.6666667 0.136030391 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Unmarried White Male United-States 1 -22 0.244444445 0.09421603 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -35 0.3888889 0.1919708 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.204747751 0.5625 0 0 0.6060606 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -67 0.7444445 0.0332732759 0.6875 0 0 0.24242425 Private Assoc-voc Divorced Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.188048139 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Female United-States 0 -17 0.188888893 0.142701745 0.3125 0 0 0.0606060624 Private 9th Never-married Other-service Not-in-family White Male United-States 0 -22 0.244444445 0.189554155 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -27 0.3 0.108543448 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Male United-States 0 -23 0.25555557 0.133295164 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -33 0.366666675 0.07526478 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male Portugal 0 -43 0.477777779 0.114986479 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.04721477 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -41 0.455555558 0.130413786 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Unmarried White Female United-States 0 -52 0.5777778 0.183032319 0.5 0.005940059 0 0.4040404 ? 12th Never-married ? Other-relative Black Male United-States 0 -25 0.2777778 0.12782 0.625 0 0 0.2020202 Private Some-college Married-spouse-absent Adm-clerical Own-child Black Female United-States 0 -63 0.7 0.270445 0.125 0 0 0.353535354 ? 1st-4th Married-civ-spouse ? Husband White Male United-States 0 -59 0.655555546 0.193282172 0.5625 0 0 0.454545468 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -45 0.5 0.110747255 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -38 0.422222227 0.0613179058 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.234345555 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.250132531 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -35 0.3888889 0.0217012819 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Female United-States 0 -34 0.377777785 0.12612 0.5625 0 0 0.25252524 Private HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 -33 0.366666675 0.11996121 0.8125 0 0 0.2020202 Private Bachelors Never-married Craft-repair Own-child White Male United-States 0 -41 0.455555558 0.231103823 0.5625 0 0 0.363636374 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -20 0.222222224 0.176970512 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -23 0.25555557 0.271506459 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Own-child White Male El-Salvador 0 -26 0.2888889 0.043303553 0.625 0 0 0.353535354 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -72 0.8 0.204476982 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -23 0.25555557 0.218871772 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Farming-fishing Not-in-family White Male Poland 0 -62 0.6888889 0.07682335 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -52 0.5777778 0.0329526737 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -58 0.644444466 0.121896274 0.625 0 0 0.424242437 Private Some-college Divorced Other-service Unmarried White Female France 0 -25 0.2777778 0.121946111 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -24 0.266666681 0.261394024 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family Black Male United-States 0 -19 0.211111113 0.168120265 0.625 0 0 0.08080808 Private Some-college Never-married Protective-serv Own-child White Male United-States 0 -43 0.477777779 0.0755241 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.365838349 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Adm-clerical Unmarried Black Female United-States 0 -39 0.433333337 0.0619624779 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -49 0.544444442 0.09560418 0.6875 0 0.3168044 0.424242437 Private Assoc-voc Married-spouse-absent Handlers-cleaners Unmarried White Male United-States 0 -53 0.5888889 0.169598684 0.1875 0 0 0.3030303 ? 5th-6th Widowed ? Unmarried Black Female United-States 0 -32 0.355555564 0.0249679238 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -34 0.377777785 0.227376491 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.127531067 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -57 0.6333333 0.149670139 0.6875 0 0 0.3838384 ? Assoc-voc Widowed ? Unmarried White Female United-States 0 -25 0.2777778 0.179863349 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family Amer-Indian-Eskimo Female United-States 0 -20 0.222222224 0.144564077 0.625 0 0 0.24242425 ? Some-college Never-married ? Own-child White Male United-States 0 -21 0.233333334 0.13755326 0.625 0 0 0.353535354 ? Some-college Never-married ? Unmarried White Female United-States 0 -34 0.377777785 0.07281985 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.06677825 0.8125 0.1502415 0 0.8080808 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.132169023 0.5625 0.07688077 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.167268246 0.625 0 0 0.5050505 Local-gov Some-college Divorced Handlers-cleaners Not-in-family Black Male United-States 0 -37 0.411111116 0.125300989 0.625 0 0 0.454545468 Local-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -44 0.4888889 0.119825155 0.625 0 0 0.5858586 Private Some-college Divorced Machine-op-inspct Unmarried White Male United-States 1 -28 0.311111122 0.0577973425 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 -42 0.466666669 0.148966968 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -74 0.822222233 0.06680317 0.625 0 0 0.09090909 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.128232211 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.136520058 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -44 0.4888889 0.07364359 0.4375 0 0 0.464646459 Private 11th Divorced Machine-op-inspct Unmarried Other Female Puerto-Rico 0 -26 0.2888889 0.07318491 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -36 0.4 0.13282235 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -41 0.455555558 0.0685247257 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 -67 0.7444445 0.155962974 0.9375 0.200512 0 0.4848485 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.139996171 0.5 0 0 0.5050505 Local-gov 12th Married-civ-spouse Tech-support Husband White Male United-States 0 -57 0.6333333 0.128606021 0.125 0 0 0.3030303 Private 1st-4th Widowed Priv-house-serv Not-in-family Black Female United-States 0 -29 0.322222233 0.06893288 0.6875 0 0 0.4040404 Private Assoc-voc Separated Craft-repair Not-in-family White Male United-States 0 -31 0.344444454 0.0279469658 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Never-married Farming-fishing Not-in-family White Female United-States 0 -34 0.377777785 0.127989739 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -44 0.4888889 0.141795844 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.09021119 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Own-child White Male United-States 0 -30 0.333333343 0.160235882 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Unmarried White Female United-States 0 -27 0.3 0.11036671 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -27 0.3 0.135967761 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.056697458 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 -58 0.644444466 0.0347961374 0.375 0 0 0.08080808 Private 10th Married-civ-spouse Other-service Wife White Female United-States 0 -35 0.3888889 0.157153785 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -21 0.233333334 0.174788937 0.5625 0 0 0.363636374 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -28 0.311111122 0.124490052 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 -46 0.51111114 0.165503591 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -36 0.4 0.0182211287 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Separated Other-service Unmarried White Female United-States 0 -72 0.8 0.13830559 0.4375 0 0 0.4040404 Private 11th Widowed Adm-clerical Unmarried White Female United-States 0 -35 0.3888889 0.154460311 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female United-States 0 -33 0.366666675 0.215234682 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Divorced Craft-repair Unmarried Black Female United-States 1 -69 0.7666667 0.09174752 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family White Female United-States 0 -35 0.3888889 0.0367588177 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.21759811 0.5625 0 0 0.2020202 Private HS-grad Separated Adm-clerical Unmarried White Female ? 0 -34 0.377777785 0.0998791 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Tech-support Wife White Female United-States 0 -30 0.333333343 0.102682352 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male Mexico 0 -28 0.311111122 0.07681863 0.8125 0 0 0.5555556 Private Bachelors Never-married Transport-moving Not-in-family White Male United-States 0 -54 0.6 0.14343591 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.17784813 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.05577135 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried Black Female United-States 0 -52 0.5777778 0.225144386 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.0184124131 0.5625 0 0 0.4848485 Private HS-grad Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 -43 0.477777779 0.126918152 0.875 0.0501305 0 0.454545468 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -45 0.5 0.29208833 0.25 0 0 0.4040404 Private 7th-8th Separated Other-service Unmarried White Female Mexico 0 -29 0.322222233 0.07453535 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Separated Craft-repair Not-in-family White Male United-States 0 -47 0.5222222 0.0589275323 0.875 0 0 0.424242437 Private Masters Divorced Exec-managerial Unmarried White Male United-States 0 -24 0.266666681 0.238667622 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -51 0.566666663 0.06430166 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -17 0.188888893 0.163478941 0.4375 0 0 0.121212125 Private 11th Never-married Sales Own-child White Male United-States 0 -37 0.411111116 0.0151296053 0.6875 0 0.453856736 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.106523521 1 0 0 0.7070707 Private Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 -29 0.322222233 0.235846177 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Male United-States 1 -18 0.2 0.111491509 0.5 0 0 0.25252524 ? 12th Never-married ? Own-child White Male United-States 0 -36 0.4 0.0193560347 0.75 0 0 0.353535354 Self-emp-not-inc Assoc-acdm Divorced Sales Unmarried White Female United-States 0 -58 0.644444466 0.191037953 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -26 0.2888889 0.0583590679 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -65 0.722222269 0.131832927 0.625 0 0 0.3030303 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -57 0.6333333 0.0470692851 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -59 0.655555546 0.134513587 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.1223536 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.229634181 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -21 0.233333334 0.133189425 0.625 0 0 0.24242425 Private Some-college Never-married Sales Own-child White Female United-States 0 -29 0.322222233 0.0230968446 0.625 0 0 0.6060606 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -18 0.2 0.105585963 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Own-child White Male United-States 0 -52 0.5777778 0.017394701 0.375 0 0.4331956 0.474747479 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -57 0.6333333 0.07001256 0.8125 0 0 0.8080808 Self-emp-inc Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -42 0.466666669 0.0925369039 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -55 0.6111111 0.0708140656 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife Asian-Pac-Islander Female United-States 0 -60 0.6666667 0.0265049282 0.25 0 0 0.4848485 Private 7th-8th Never-married Transport-moving Not-in-family White Male United-States 1 -31 0.344444454 0.113414451 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Canada 1 -23 0.25555557 0.07933495 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -27 0.3 0.179932714 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -23 0.25555557 0.06694865 0.625 0 0 0.25252524 ? Some-college Never-married ? Unmarried Amer-Indian-Eskimo Female United-States 0 -42 0.466666669 0.144299373 0.9375 0 0.43663913 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.1349817 0.625 0.0217402168 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Male United-States 0 -49 0.544444442 0.09190715 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -32 0.355555564 0.161529735 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -19 0.211111113 0.146183252 0.625 0 0 0.282828271 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -60 0.6666667 0.0345455855 0.25 0 0 0.4040404 Private 7th-8th Divorced Other-service Not-in-family White Female United-States 0 -42 0.466666669 0.1183225 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Other-service Husband White Male United-States 0 -35 0.3888889 0.1309378 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Never-married Farming-fishing Not-in-family White Male United-States 0 -48 0.533333361 0.0307212546 0.5625 0 0 0.373737365 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -51 0.566666663 0.276225924 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.122934185 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 -36 0.4 0.228848159 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Exec-managerial Not-in-family Black Male United-States 0 -17 0.188888893 0.114270516 0.375 0 0 0.212121218 Private 10th Never-married Other-service Own-child White Female United-States 0 -52 0.5777778 0.135281429 0.875 0.068490684 0 0.6060606 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.166742891 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -24 0.266666681 0.168322325 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -26 0.2888889 0.140177339 0.8125 0.010550105 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -27 0.3 0.07400864 0.8125 0 0 0.2020202 Private Bachelors Never-married Other-service Own-child White Female United-States 0 -39 0.433333337 0.139976636 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -30 0.333333343 0.248552412 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -50 0.5555556 0.07686173 0.5625 0 0 0.323232323 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -52 0.5777778 0.03438259 0.8125 0 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.06896185 0.9375 0.1502415 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.128296867 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Own-child White Female United-States 0 -45 0.5 0.3114693 0.4375 0 0 0.2020202 Private 11th Widowed Other-service Not-in-family Black Female United-States 0 -65 0.722222269 0.07365167 0.3125 0 0 0.24242425 Private 9th Widowed Priv-house-serv Unmarried Black Female United-States 0 -29 0.322222233 0.0231581368 0.6875 0 0 0.5555556 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 -47 0.5222222 0.1628822 0.3125 0 0 0.4040404 Private 9th Married-spouse-absent Handlers-cleaners Unmarried White Male El-Salvador 0 -30 0.333333343 0.0836442262 0.5625 0 0 0.6060606 Private HS-grad Never-married Farming-fishing Own-child Black Male United-States 0 -34 0.377777785 0.103464328 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.180208191 0.5625 0 0 0.646464646 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.138390452 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.180567861 0.8125 0 0 0.262626261 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.111159459 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Other-service Unmarried Black Female United-States 0 -49 0.544444442 0.0811279044 0.375 0 0 0.4040404 Local-gov 10th Separated Other-service Unmarried Black Female United-States 0 -43 0.477777779 0.103976212 0.625 0.1502415 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.06981117 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife Black Female United-States 1 -58 0.644444466 0.0240606721 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.176870823 0.5625 0 0 0.141414136 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -21 0.233333334 0.15234071 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family White Male United-States 0 -33 0.366666675 0.118337989 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.16713421 0.1875 0 0 0.5050505 Self-emp-inc 5th-6th Married-civ-spouse Transport-moving Husband White Male Cuba 0 -52 0.5777778 0.194945127 1 0 0 0.6060606 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.05095558 0.5625 0 0 0.5555556 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -60 0.6666667 0.134287953 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.108417496 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -36 0.4 0.127003685 0.625 0.05178052 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.0376162268 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.131556109 1 0 0 0.4040404 Self-emp-inc Doctorate Separated Prof-specialty Not-in-family White Male United-States 1 -31 0.344444454 0.2708208 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -71 0.788888931 0.05272226 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.106829979 0.5625 0 0 0.5050505 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -30 0.333333343 0.1141614 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -20 0.222222224 0.0882054046 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -24 0.266666681 0.3749297 0.5625 0.04101041 0 0.5050505 Private HS-grad Never-married Exec-managerial Other-relative White Male United-States 0 -35 0.3888889 0.196989983 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 -38 0.422222227 0.0968367457 0.625 0 0 0.454545468 State-gov Some-college Separated Exec-managerial Not-in-family White Female United-States 0 -27 0.3 0.194207609 0.5625 0 0 0.323232323 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -29 0.322222233 0.04821968 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Unmarried Asian-Pac-Islander Female Philippines 0 -70 0.7777778 0.112721384 0.3125 0.0111101111 0 0.151515156 ? 9th Widowed ? Unmarried White Female United-States 0 -34 0.377777785 0.0718944147 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.14769803 0.25 0 0 0.353535354 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.117547929 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -44 0.4888889 0.225757316 0.5 0 0 0.4040404 Self-emp-not-inc 12th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 -35 0.3888889 0.175989851 0.875 0 0 0.6060606 Private Masters Never-married Sales Not-in-family White Male United-States 0 -27 0.3 0.07536851 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -43 0.477777779 0.130908161 0.875 0 0 0.3838384 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -20 0.222222224 0.0546539575 0.625 0 0 0.25252524 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -42 0.466666669 0.229812667 0.75 0.0861408561 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 1 -27 0.3 0.167953908 0.625 0.03411034 0 0.4040404 State-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.166375816 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 -20 0.222222224 0.07728539 0.4375 0 0.404499531 0.4040404 ? 11th Married-spouse-absent ? Own-child Asian-Pac-Islander Female South 0 -24 0.266666681 0.115946271 0.3125 0 0.395087242 0.4040404 Private 9th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -48 0.533333361 0.0743965954 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -17 0.188888893 0.0539346226 0.4375 0 0 0.2020202 ? 11th Never-married ? Own-child White Female United-States 0 -17 0.188888893 0.248332173 0.4375 0 0 0.1010101 Self-emp-not-inc 11th Never-married Farming-fishing Own-child White Male United-States 0 -33 0.366666675 0.122957759 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.14778693 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.162198558 0.5625 0.02597026 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -17 0.188888893 0.0691895038 0.5 0 0 0.161616161 Private 12th Never-married Other-service Own-child White Male United-States 0 -32 0.355555564 0.152398631 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male Mexico 0 -31 0.344444454 0.08449961 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -58 0.644444466 0.137415186 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Widowed Exec-managerial Not-in-family White Male United-States 0 -29 0.322222233 0.06214164 0.5625 0 0 0.4848485 Local-gov HS-grad Never-married Protective-serv Own-child White Male United-States 0 -37 0.411111116 0.108534023 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Portugal 1 -34 0.377777785 0.128166884 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.290177524 0.625 0 0 0.4040404 Local-gov Some-college Separated Exec-managerial Unmarried Black Male United-States 0 -18 0.2 0.03996888 0.4375 0 0 0.05050505 State-gov 11th Never-married Adm-clerical Own-child White Female United-States 0 -34 0.377777785 0.09208631 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -66 0.733333349 0.100640871 0.25 0 0 0.04040404 ? 7th-8th Never-married ? Not-in-family White Male United-States 0 -45 0.5 0.0583577231 0.8125 0 0 0.5555556 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -41 0.455555558 0.131422743 0.875 0 0 0.353535354 Private Masters Never-married Exec-managerial Not-in-family White Male Dominican-Republic 0 -26 0.2888889 0.112716 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 -54 0.6 0.0761093944 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -24 0.266666681 0.09431301 0.625 0 0 0.454545468 Private Some-college Never-married Machine-op-inspct Own-child Black Female United-States 0 -42 0.466666669 0.176752284 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -20 0.222222224 0.21330972 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -23 0.25555557 0.22593917 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -25 0.2777778 0.13637726 0.75 0 0 0.454545468 ? Assoc-acdm Never-married ? Other-relative White Male United-States 0 -35 0.3888889 0.137150481 0.875 0 0 0.6060606 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -31 0.344444454 0.07995528 0.875 0 0.43663913 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 -30 0.333333343 0.1277156 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female Poland 0 -19 0.211111113 0.319947749 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 -36 0.4 0.07467207 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -31 0.344444454 0.164076373 0.8125 0 0.3168044 0.4040404 Private Bachelors Widowed Sales Unmarried White Female Cuba 0 -21 0.233333334 0.1103721 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -31 0.344444454 0.05398042 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.1990739 1 0.25236252 0 0.656565666 Private Doctorate Divorced Prof-specialty Unmarried White Female United-States 1 -44 0.4888889 0.04246096 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Own-child White Female United-States 1 -40 0.444444448 0.154339075 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Other-service Husband Black Male Jamaica 0 -45 0.5 0.163367137 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family Black Male United-States 0 -60 0.6666667 0.119663507 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.140164554 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Other-relative White Male United-States 0 -28 0.311111122 0.1996693 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -36 0.4 0.04733735 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -36 0.4 0.183044448 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Not-in-family White Male ? 0 -40 0.444444448 0.09765913 0.6875 0.04386044 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -36 0.4 0.257717878 0.8125 0 0 0.353535354 Local-gov Bachelors Divorced Adm-clerical Unmarried White Female Honduras 0 -31 0.344444454 0.199162126 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 -33 0.366666675 0.130760655 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.254877567 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Tech-support Own-child White Female United-States 0 -22 0.244444445 0.144405127 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 -34 0.377777785 0.1464668 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.122957759 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -41 0.455555558 0.08475152 0.5625 0 0.4708448 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.182748765 0.8125 0.046500463 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -50 0.5555556 0.0339858755 0.5625 0 0 0.424242437 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.109206885 0.8125 0.07298073 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.119846709 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male ? 1 -44 0.4888889 0.0751004443 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -20 0.222222224 0.201418474 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -31 0.344444454 0.150340974 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 -65 0.722222269 0.07979632 0.4375 0.09386094 0 0.5959596 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male ? 1 -23 0.25555557 0.237177759 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -55 0.6111111 0.116584107 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 -26 0.2888889 0.122350909 0.6875 0 0.5456841 0.454545468 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -25 0.2777778 0.22408627 0.6875 0 0 0.151515156 Private Assoc-voc Never-married Other-service Own-child White Female United-States 0 -45 0.5 0.03446072 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Wife Black Female United-States 0 -35 0.3888889 0.158213928 0.625 0.02407024 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.08851186 0.625 0 0 0.363636374 Private Some-college Never-married Sales Not-in-family Black Female United-States 0 -43 0.477777779 0.175765559 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -56 0.622222245 0.105106406 0.5625 0.005940059 0 0.2020202 Private HS-grad Widowed Other-service Unmarried Black Female United-States 0 -42 0.466666669 0.188531727 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -19 0.211111113 0.129623726 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Other-relative White Female United-States 0 -55 0.6111111 0.13533935 0.5625 0 0 0.727272749 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.101978511 0.875 0.14084141 0 0.5050505 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 -26 0.2888889 0.0760063455 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Own-child White Male United-States 0 -17 0.188888893 0.2134626 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 -42 0.466666669 0.08508021 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -55 0.6111111 0.132970527 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -32 0.355555564 0.180329427 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -29 0.322222233 0.179856613 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Own-child Black Male Haiti 0 -46 0.51111114 0.1300238 0.8125 0 0 0.373737365 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -29 0.322222233 0.239838228 0.8125 0.07688077 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.150545061 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Unmarried White Male United-States 0 -58 0.644444466 0.0589410029 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.09773726 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Unmarried White Male United-States 0 -39 0.433333337 0.0323922932 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -27 0.3 0.0213894341 0.6875 0 0 0.3838384 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 -54 0.6 0.192532524 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -33 0.366666675 0.0808672458 0.8125 0 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.112736873 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -37 0.411111116 0.0696488544 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family Black Male United-States 0 -36 0.4 0.06833681 0.5625 0 0 0.181818187 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -59 0.655555546 0.28324616 0.5625 0 0 0.3838384 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -34 0.377777785 0.08042742 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Protective-serv Unmarried White Male Portugal 0 -53 0.5888889 0.0863956138 1 0 0 0.7070707 Self-emp-inc Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.260504961 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -32 0.355555564 0.190790772 0.375 0 0 0.424242437 Private 10th Separated Other-service Unmarried White Female United-States 0 -31 0.344444454 0.203088164 0.625 0 0 0.4040404 State-gov Some-college Married-spouse-absent Other-service Other-relative White Male United-States 0 -22 0.244444445 0.1022358 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Sales Wife White Female Germany 0 -47 0.5222222 0.0715643838 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Sales Not-in-family White Female United-States 0 -32 0.355555564 0.126999646 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -26 0.2888889 0.115251184 0.625 0 0 0.3838384 Private Some-college Never-married Farming-fishing Not-in-family White Female United-States 0 -37 0.411111116 0.220463336 0.1875 0 0 0.323232323 Private 5th-6th Separated Farming-fishing Not-in-family White Male Guatemala 0 -31 0.344444454 0.164441422 0.5625 0 0 0.5555556 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -37 0.411111116 0.188779593 0.6875 0 0 0.24242425 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 -55 0.6111111 0.0784277 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -23 0.25555557 0.1903267 0.6875 0 0 0.565656543 Local-gov Assoc-voc Divorced Tech-support Not-in-family White Male United-States 0 -36 0.4 0.03491468 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.049562037 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 0 -43 0.477777779 0.152826324 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.188003 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Male United-States 0 -43 0.477777779 0.09894761 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Craft-repair Husband White Male ? 0 -28 0.311111122 0.132477492 0.6875 0 0.383149683 0.424242437 Private Assoc-voc Never-married Machine-op-inspct Not-in-family White Female United-States 0 -40 0.444444448 0.08807137 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.03338845 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -40 0.444444448 0.160032466 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Not-in-family Other Female United-States 1 -42 0.466666669 0.11425031 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 -61 0.677777767 0.0246991832 0.5625 0 0.5399449 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -18 0.2 0.155716464 0.5 0 0 0.3030303 Private 12th Never-married Machine-op-inspct Own-child White Male United-States 0 -59 0.655555546 0.129406184 0.5625 0 0 0.161616161 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -21 0.233333334 0.100830808 0.5625 0.010550105 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -48 0.533333361 0.06876922 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -41 0.455555558 0.0216777083 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -18 0.2 0.132053852 0.625 0 0 0.333333343 ? Some-college Never-married ? Own-child White Male United-States 0 -23 0.25555557 0.142146766 0.5625 0.0246302467 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -60 0.6666667 0.0212681983 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -22 0.244444445 0.109343611 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Other-relative Black Male United-States 0 -61 0.677777767 0.08677212 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -25 0.2777778 0.213300288 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -46 0.51111114 0.0611286424 0.875 0 0 0.353535354 Private Masters Never-married Tech-support Not-in-family White Male United-States 1 -43 0.477777779 0.184792936 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male England 1 -43 0.477777779 0.104086675 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 -24 0.266666681 0.0714519 0.5625 0 0.395087242 0.3030303 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -68 0.75555557 0.212741926 0.4375 0 0 0.2020202 Self-emp-not-inc 11th Never-married Farming-fishing Unmarried White Male United-States 0 -31 0.344444454 0.0346674919 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -17 0.188888893 0.130551189 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 -32 0.355555564 0.155615434 0.5625 0.05178052 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -50 0.5555556 0.0160166509 0.875 0 0 0.4040404 ? Masters Married-spouse-absent ? Other-relative White Male United-States 0 -33 0.366666675 0.114419363 0.8125 0.03103031 0 0.474747479 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -64 0.7111111 0.1820786 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.09346503 0.5625 0 0 0.3030303 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -30 0.333333343 0.129029676 0.5625 0 0 0.363636374 Private HS-grad Separated Other-service Own-child White Female United-States 0 -22 0.244444445 0.148137853 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Black Male United-States 0 -43 0.477777779 0.06338835 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -22 0.244444445 0.09261773 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -17 0.188888893 0.0219619386 0.375 0 0 0.2020202 Private 10th Never-married Farming-fishing Own-child White Male United-States 0 -47 0.5222222 0.0627788 0.5625 0 0 0.75757575 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female Italy 0 -41 0.455555558 0.171374112 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 -56 0.622222245 0.1256519 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -64 0.7111111 0.114413977 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -47 0.5222222 0.128831655 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -48 0.533333361 0.112587348 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Unmarried White Male United-States 0 -31 0.344444454 0.115761049 0.875 0 0 0.464646459 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -29 0.322222233 0.104001135 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Own-child White Male United-States 0 -30 0.333333343 0.0870388448 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.07431173 0.5625 0 0.3838384 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -57 0.6333333 0.0230813529 0.5625 0 0.14990817 0.424242437 Private HS-grad Widowed Transport-moving Unmarried White Male United-States 1 -62 0.6888889 0.117434107 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -39 0.433333337 0.458266139 0.5625 0 0 0.24242425 Private HS-grad Separated Machine-op-inspct Unmarried White Female United-States 0 -43 0.477777779 0.15702109 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -24 0.266666681 0.111452445 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Sales Own-child White Male United-States 0 -42 0.466666669 0.173623726 0.4375 0 0 0.151515156 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -53 0.5888889 0.130840138 0.625 0.04386044 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -26 0.2888889 0.188652292 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -73 0.811111152 0.119476259 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -72 0.8 0.0194846783 0.4375 0 0 0.24242425 ? 11th Widowed ? Not-in-family White Female United-States 0 -55 0.6111111 0.07092588 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -25 0.2777778 0.336250633 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -41 0.455555558 0.121621467 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 -24 0.266666681 0.216497555 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -63 0.7 0.05799671 0.5625 0 0 0.0606060624 Private HS-grad Widowed Farming-fishing Not-in-family White Male United-States 0 -17 0.188888893 0.133443341 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 -35 0.3888889 0.09103627 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.09888362 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -62 0.6888889 0.1961164 0.8125 0 0 0.4848485 Local-gov Bachelors Widowed Prof-specialty Not-in-family White Female United-States 0 -55 0.6111111 0.261041075 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.0693033338 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 0 -40 0.444444448 0.0224111862 0.5625 0 0 0.5050505 Local-gov HS-grad Divorced Other-service Not-in-family White Female United-States 0 -37 0.411111116 0.0582950823 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.09307708 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.0801277 0.5625 0 0 0.181818187 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -61 0.677777767 0.06720796 0.875 0 0 0.4040404 Private Masters Widowed Prof-specialty Not-in-family White Female United-States 1 -26 0.2888889 0.0612781681 0.6875 0 0 0.5555556 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 -46 0.51111114 0.119489729 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.06497385 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -48 0.533333361 0.220842525 1 0 0 0.5050505 State-gov Doctorate Divorced Prof-specialty Own-child White Male United-States 1 -34 0.377777785 0.0751442239 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -34 0.377777785 0.1121738 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -59 0.655555546 0.09576448 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -34 0.377777785 0.127161965 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -49 0.544444442 0.02597351 0.8125 0 0 0.565656543 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 -18 0.2 0.145674735 0.4375 0 0 0.2020202 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 -43 0.477777779 0.129013509 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -48 0.533333361 0.192182958 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.09612145 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.0545192473 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -24 0.266666681 0.2081592 0.625 0 0 0.151515156 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -21 0.233333334 0.0419874676 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -17 0.188888893 0.248332173 0.4375 0 0 0.282828271 Private 11th Never-married Sales Own-child White Male United-States 0 -39 0.433333337 0.118667349 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -29 0.322222233 0.179736048 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Separated Prof-specialty Own-child White Male United-States 0 -44 0.4888889 0.03238825 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.08170849 0.625 0 0 0.5050505 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -71 0.788888931 0.0966097638 0.875 0.106051058 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -51 0.566666663 0.108253159 0.8125 0 0.5544077 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male China 1 -55 0.6111111 0.1904439 0.1875 0 0 0.25252524 Private 5th-6th Divorced Other-service Unmarried Black Male United-States 0 -41 0.455555558 0.131094053 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.103080414 0.5625 0 0 0.07070707 Private HS-grad Never-married Handlers-cleaners Unmarried Black Female United-States 0 -38 0.422222227 0.2773595 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -39 0.433333337 0.07926356 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -19 0.211111113 0.253612667 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -49 0.544444442 0.04875918 0.3125 0 0 0.4040404 Private 9th Divorced Machine-op-inspct Not-in-family White Female United-States 0 -32 0.355555564 0.182079941 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Other-relative White Male Philippines 1 -27 0.3 0.06481153 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.0642120838 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.174107313 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Wife White Female United-States 0 -63 0.7 0.100826763 0.625 0 0 0.151515156 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -23 0.25555557 0.138657182 0.8125 0 0 0.282828271 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -33 0.366666675 0.104923874 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male ? 0 -54 0.6 0.2737702 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 -29 0.322222233 0.119295754 0.6875 0.0217402168 0 0.454545468 Private Assoc-voc Divorced Tech-support Not-in-family White Female United-States 0 -48 0.533333361 0.09725636 0.625 0 0 0.3030303 ? Some-college Divorced ? Unmarried Black Female United-States 0 -35 0.3888889 0.250908434 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -28 0.311111122 0.110574156 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female India 0 -37 0.411111116 0.123795636 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.119422376 0.9375 0 0 0.656565666 Self-emp-not-inc Prof-school Married-civ-spouse Farming-fishing Husband White Male United-States 1 -40 0.444444448 0.114573605 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -47 0.5222222 0.230345428 0.625 0 0 0.5555556 Private Some-college Divorced Sales Own-child White Male United-States 0 -22 0.244444445 0.152560949 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -30 0.333333343 0.0588790365 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.07352639 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -63 0.7 0.0194355119 0.25 0 0 0.5555556 Local-gov 7th-8th Married-civ-spouse Other-service Husband White Male United-States 0 -51 0.566666663 0.118472695 0.3125 0 0 0.2020202 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.06714937 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -27 0.3 0.0607999563 0.75 0 0 0.4040404 ? Assoc-acdm Married-civ-spouse ? Own-child Amer-Indian-Eskimo Male United-States 0 -35 0.3888889 0.102629818 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -46 0.51111114 0.115544841 0.5625 0 0 0.3838384 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -37 0.411111116 0.1422195 0.625 0 0 0.5252525 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -24 0.266666681 0.136437878 0.8125 0 0 0.151515156 Private Bachelors Never-married Prof-specialty Own-child Black Male United-States 0 -37 0.411111116 0.11348787 0.5625 0 0 0.1010101 Self-emp-not-inc HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 -53 0.5888889 0.0464051776 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -27 0.3 0.06279699 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -38 0.422222227 0.187864929 0.625 0 0 0.444444448 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -53 0.5888889 0.2094827 0.375 0 0 0.6060606 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -34 0.377777785 0.118459895 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.365748078 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Male United-States 0 -39 0.433333337 0.136072159 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.107042141 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female South 0 -67 0.7444445 0.05176786 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 -81 0.900000036 0.0916431248 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -21 0.233333334 0.12571387 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -23 0.25555557 0.173441187 0.625 0 0 0.25252524 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -25 0.2777778 0.0661107749 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Unmarried White Male United-States 0 -42 0.466666669 0.1846818 0.1875 0 0 0.3838384 Private 5th-6th Married-civ-spouse Machine-op-inspct Wife White Female Mexico 0 -38 0.422222227 0.06538875 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -64 0.7111111 0.020088166 0.5625 0 0 0.05050505 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -32 0.355555564 0.176569089 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.144633442 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.09296258 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.0618587546 0.625 0 0 0.424242437 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -33 0.366666675 0.251674235 0.125 0 0 0.4040404 Private 1st-4th Married-spouse-absent Priv-house-serv Not-in-family White Female Guatemala 0 -42 0.466666669 0.10911461 0.5625 0 0 0.5555556 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -19 0.211111113 0.0351005755 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Female United-States 0 -51 0.566666663 0.1628896 0.0625 0 0 0.4040404 Local-gov Preschool Married-civ-spouse Other-service Husband White Male United-States 0 -23 0.25555557 0.2531621 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female Mexico 0 -37 0.411111116 0.1259065 0.4375 0.03103031 0 0.444444448 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -37 0.411111116 0.119148254 0.5625 0 0 1 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.0147544462 0.875 0 0 0.25252524 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -41 0.455555558 0.0890560746 0.9375 0 0.5544077 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.09675525 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.0751442239 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -31 0.344444454 0.05294116 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 -35 0.3888889 0.313535 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -38 0.422222227 0.132263988 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.1974985 0.5625 0 0 0.454545468 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -20 0.222222224 0.162828311 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -54 0.6 0.112074792 0.625 0 0 0.353535354 Local-gov Some-college Divorced Exec-managerial Unmarried Black Female United-States 0 -40 0.444444448 0.124389693 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.07293907 0.8125 0 0.453856736 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -43 0.477777779 0.1689238 0.625 0 0 0.353535354 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 -44 0.4888889 0.2190058 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Farming-fishing Unmarried White Male United-States 0 -44 0.4888889 0.117649637 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 1 -43 0.477777779 0.1529361 0.875 0 0 0.434343427 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.181234658 0.25 0 0 0.4040404 Private 7th-8th Widowed Other-service Unmarried Black Female United-States 0 -18 0.2 0.1197019 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -51 0.566666663 0.0898905843 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.16143477 0.375 0 0 0.3030303 Private 10th Married-civ-spouse Craft-repair Husband White Male ? 0 -44 0.4888889 0.268385321 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.201242 0.375 0 0 0.4040404 Local-gov 10th Divorced Transport-moving Not-in-family White Male United-States 0 -33 0.366666675 0.08313032 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.1187347 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.101071931 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -32 0.355555564 0.113988973 0.5625 0 0 0.3838384 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -32 0.355555564 0.1941618 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Craft-repair Husband White Male Mexico 0 -36 0.4 0.354931116 0.375 0 0 0.4040404 Private 10th Divorced Exec-managerial Unmarried White Female United-States 0 -28 0.311111122 0.0384359173 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.217937574 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -35 0.3888889 0.248416364 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -55 0.6111111 0.127783641 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.111110292 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male India 1 -36 0.4 0.06395479 0.6875 0 0 0.2020202 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 -34 0.377777785 0.136084944 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.108801417 0.8125 0 0 0.353535354 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -67 0.7444445 0.07089085 0.8125 0 0.549127638 0.4040404 Private Bachelors Widowed Exec-managerial Not-in-family White Male United-States 1 -37 0.411111116 0.134809941 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.0216777083 0.5625 0 0 0.7070707 Private HS-grad Never-married Transport-moving Unmarried White Male United-States 0 -25 0.2777778 0.120108709 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -21 0.233333334 0.17239587 0.625 0.04101041 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -40 0.444444448 0.127091244 0.875 0 0 0.353535354 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -78 0.8666667 0.12324132 0.5625 0.0296402965 0 0.4040404 Private HS-grad Widowed Other-service Not-in-family Black Female United-States 0 -34 0.377777785 0.1077177 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 -49 0.544444442 0.0829841644 0.5625 0 0 0.444444448 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.191497311 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -23 0.25555557 0.124401145 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -60 0.6666667 0.104043566 0.5625 0 0 0.424242437 Self-emp-not-inc HS-grad Never-married Farming-fishing Unmarried White Male United-States 0 -45 0.5 0.21437256 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Protective-serv Not-in-family White Male United-States 1 -63 0.7 0.171688661 0.6875 0 0 0.2020202 Private Assoc-voc Divorced Other-service Not-in-family White Female United-States 0 -41 0.455555558 0.235212386 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Own-child Black Female United-States 0 -47 0.5222222 0.2262894 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -44 0.4888889 0.08533749 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -51 0.566666663 0.0822783 0.625 0.0332503319 0 0.4040404 Private Some-college Widowed Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.126200154 0.8125 0 0.3452709 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -41 0.455555558 0.131094053 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -50 0.5555556 0.08405239 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.129881024 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -35 0.3888889 0.195477217 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -56 0.622222245 0.07600163 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.0601634681 0.875 0 0 0.454545468 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -48 0.533333361 0.0223000534 0.8125 0 0 0.5858586 Federal-gov Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 -40 0.444444448 0.05554302 0.625 0.0258002579 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -39 0.433333337 0.2222529 0.8125 0.1502415 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.09988112 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -50 0.5555556 0.113296583 1 0 0.43663913 0.656565666 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.231454745 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 1 -23 0.25555557 0.07762081 0.8125 0 0 0.6060606 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -31 0.344444454 0.109497845 0.5625 0 0 0.161616161 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -58 0.644444466 0.2398234 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -66 0.733333349 0.182909742 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family Black Male United-States 0 -39 0.433333337 0.121777728 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.08285215 0.5625 0.1502415 0 0.5252525 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.07354054 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male Germany 0 -51 0.566666663 0.148539275 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -34 0.377777785 0.08407529 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Transport-moving Own-child White Male United-States 0 -50 0.5555556 0.5168724 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -42 0.466666669 0.07980979 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.116661564 0.875 0 0 0.25252524 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -48 0.533333361 0.07231942 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -33 0.366666675 0.0181672461 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 -51 0.566666663 0.129295051 0.5625 0 0 0.323232323 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -22 0.244444445 0.08240425 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -19 0.211111113 0.07893892 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Own-child White Male United-States 0 -41 0.455555558 0.133572668 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Not-in-family White Male Japan 0 -48 0.533333361 0.08289526 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.141017914 0.5625 0 0 0.3030303 Private HS-grad Separated Sales Not-in-family White Female United-States 0 -34 0.377777785 0.022305442 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -23 0.25555557 0.0869142339 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -56 0.622222245 0.113916911 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male Yugoslavia 0 -30 0.333333343 0.135800719 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family Black Male ? 0 -45 0.5 0.248238549 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.1399928 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Adm-clerical Wife White Female United-States 0 -48 0.533333361 0.0931969658 0.875 0 0 0.5050505 Self-emp-inc Masters Married-spouse-absent Sales Not-in-family Asian-Pac-Islander Male India 0 -31 0.344444454 0.0627101 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -20 0.222222224 0.150545061 0.75 0 0.3946281 0.2020202 State-gov Assoc-acdm Never-married Other-service Own-child White Male United-States 0 -27 0.3 0.262485147 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -32 0.355555564 0.138993949 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -76 0.844444454 0.290422678 0.25 0 0 0.02020202 ? 7th-8th Widowed ? Not-in-family White Male United-States 0 -19 0.211111113 0.162736714 0.5625 0 0.459366381 0.4040404 ? HS-grad Never-married ? Unmarried White Male United-States 0 -66 0.733333349 0.10151916 0.3125 0.01409014 0 0.01010101 Self-emp-inc 9th Married-civ-spouse Exec-managerial Husband White Male ? 0 -37 0.411111116 0.0833734646 0.5625 0 0 0.75757575 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -34 0.377777785 0.195314229 0.5625 0 0 0.3030303 Private HS-grad Divorced Priv-house-serv Unmarried Black Female United-States 0 -34 0.377777785 0.11066778 0.4375 0 0 0.08080808 ? 11th Married-civ-spouse ? Wife White Female United-States 0 -90 1 0.09228635 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -23 0.25555557 0.09294372 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child Black Female United-States 0 -43 0.477777779 0.229812667 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.112483628 0.8125 0.07688077 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.02320057 0.625 0 0 0.373737365 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -28 0.311111122 0.126058713 0.9375 0 0 0.5555556 Private Prof-school Divorced Prof-specialty Unmarried White Male United-States 0 -64 0.7111111 0.132206738 0.75 0 0 0.2020202 ? Assoc-acdm Never-married ? Not-in-family White Female United-States 0 -23 0.25555557 0.146804243 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -20 0.222222224 0.0502665527 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -36 0.4 0.105520628 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -61 0.677777767 0.08429621 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -53 0.5888889 0.177762583 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male Canada 1 -30 0.333333343 0.199671313 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -52 0.5777778 0.03012585 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.130009666 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male Iran 0 -32 0.355555564 0.05903058 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.0718944147 0.5 0 0 0.75757575 Self-emp-not-inc 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 -41 0.455555558 0.203489587 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Not-in-family White Female United-States 0 -49 0.544444442 0.130638748 0.875 0 0.43663913 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.124863192 0.5625 0 0 0.474747479 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.187004834 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -61 0.677777767 0.08678357 0.5625 0.0347103477 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -54 0.6 0.25439465 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 -34 0.377777785 0.106341667 0.75 0 0 0.4040404 Private Assoc-acdm Separated Other-service Unmarried White Female United-States 0 -49 0.544444442 0.118513778 0.625 0 0 0.8080808 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.150200889 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -35 0.3888889 0.134270445 0.9375 0 0.453856736 0.8080808 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.0201952588 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.122348212 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.0790136755 0.75 0 0 0.6060606 Private Assoc-acdm Divorced Tech-support Not-in-family White Female United-States 0 -22 0.244444445 0.0229197051 0.8125 0 0 0.2020202 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -38 0.422222227 0.08949859 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -37 0.411111116 0.145018712 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -48 0.533333361 0.0376256555 1 0 0.43663913 0.464646459 State-gov Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 -17 0.188888893 0.148436219 0.4375 0 0 0.151515156 Private 11th Never-married Adm-clerical Own-child White Male United-States 0 -19 0.211111113 0.0242553242 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 -27 0.3 0.0927086547 0.8125 0 0.365013778 0.4040404 Private Bachelors Never-married Sales Not-in-family Black Female United-States 0 -22 0.244444445 0.128875434 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Own-child Asian-Pac-Islander Male Taiwan 0 -49 0.544444442 0.0211078972 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.153505251 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -43 0.477777779 0.1170118 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Unmarried White Female United-States 0 -19 0.211111113 0.11302986 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -58 0.644444466 0.0549887 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -41 0.455555558 0.131513 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -31 0.344444454 0.156579927 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -30 0.333333343 0.162496254 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.07958551 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -29 0.322222233 0.136022985 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -42 0.466666669 0.10138917 0.625 0.07298073 0 0.5252525 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.277695566 0.5625 0 0 0.282828271 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 -41 0.455555558 0.0896205 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.08118717 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 1 -31 0.344444454 0.1320296 1 0 0 0.6060606 Private Doctorate Married-spouse-absent Prof-specialty Not-in-family Asian-Pac-Islander Male China 0 -34 0.377777785 0.0726023 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.1103721 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -22 0.244444445 0.243334547 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Male India 0 -62 0.6888889 0.0620850623 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.0543609671 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Female United-States 0 -29 0.322222233 0.175609976 0.5625 0 0.453856736 0.25252524 Self-emp-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 1 -43 0.477777779 0.122754358 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -68 0.75555557 0.09448476 0.25 0 0 0.08080808 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -45 0.5 0.100939244 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -39 0.433333337 0.146954447 0.3125 0 0.379017442 0.4040404 Self-emp-inc 9th Married-civ-spouse Exec-managerial Husband White Male Mexico 0 -41 0.455555558 0.0798939839 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -34 0.377777785 0.132545531 0.75 0 0 0.25252524 Self-emp-not-inc Assoc-acdm Married-civ-spouse Prof-specialty Wife White Female United-States 1 -34 0.377777785 0.113153122 0.5625 0 0 0.333333343 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -31 0.344444454 0.0345247053 0.8125 0 0 0.474747479 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -29 0.322222233 0.0882922858 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -41 0.455555558 0.07961986 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -41 0.455555558 0.197878376 0.6875 0 0 0.5555556 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.194941089 0.875 0 0 0.454545468 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male Mexico 1 -33 0.366666675 0.0238283034 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 -37 0.411111116 0.04056496 0.8125 0 0 0.3838384 State-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -69 0.7666667 0.113247417 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -34 0.377777785 0.195838913 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Own-child White Female United-States 0 -60 0.6666667 0.1524579 0.6875 0 0.5544077 0.7070707 Self-emp-inc Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male ? 1 -36 0.4 0.03441761 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.153326079 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -58 0.644444466 0.1382544 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -53 0.5888889 0.193991408 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Japan 0 -29 0.322222233 0.09487609 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -45 0.5 0.115117148 0.5625 0.0486504845 0 0.4040404 Federal-gov HS-grad Divorced Tech-support Not-in-family White Female United-States 0 -34 0.377777785 0.0337966122 0.625 0 0 0.3838384 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.07577061 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -48 0.533333361 0.06415012 0.625 0 0 0.353535354 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 -20 0.222222224 0.0792117 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -35 0.3888889 0.0602867231 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -63 0.7 0.08368262 0.5625 0 0 0.4040404 Federal-gov HS-grad Widowed Handlers-cleaners Not-in-family Black Male United-States 0 -41 0.455555558 0.103976212 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Divorced Other-service Unmarried White Male United-States 0 -28 0.311111122 0.19864957 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -30 0.333333343 0.233805373 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family Black Female United-States 0 -34 0.377777785 0.12253882 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -31 0.344444454 0.213289514 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female Mexico 0 -37 0.411111116 0.127555311 0.6875 0 0 0.3838384 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.123942472 0.625 0 0 0.4040404 ? Some-college Divorced ? Unmarried White Male United-States 0 -31 0.344444454 0.124137118 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Jamaica 1 -46 0.51111114 0.165832266 0.875 0 0 0.454545468 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.168723077 0.5625 0 0 0.6060606 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -27 0.3 0.0934226 0.5625 0 0 0.535353541 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.221220389 0.125 0 0 0.353535354 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -19 0.211111113 0.1310752 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -20 0.222222224 0.155513048 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -59 0.655555546 0.143091053 0.5625 0 0 0.4040404 Federal-gov HS-grad Widowed Sales Unmarried White Female Germany 0 -40 0.444444448 0.144143119 0.8125 0 0 0.373737365 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -56 0.622222245 0.13486518 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.23881714 0.875 0.1502415 0 0.444444448 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.138568267 0.625 0 0 0.6060606 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -46 0.51111114 0.124631494 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -61 0.677777767 0.0568523742 0.5625 0 0 0.353535354 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.197477624 0.5625 0.07298073 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.162743449 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -40 0.444444448 0.350632638 0.625 0 0 0.3939394 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -24 0.266666681 0.0240000542 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male ? 0 -51 0.566666663 0.2039779 0.5625 0 0 0.545454562 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.111341313 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -34 0.377777785 0.07915983 0.625 0 0 0.545454562 Private Some-college Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -46 0.51111114 0.07145662 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.300277829 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -26 0.2888889 0.153115943 0.8125 0 0 0.4040404 Private Bachelors Never-married Transport-moving Unmarried Asian-Pac-Islander Male ? 0 -20 0.222222224 0.1856874 0.5625 0 0 0.282828271 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -44 0.4888889 0.130301312 0.6875 0.03411034 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.191505387 0.5625 0 0 0.4040404 Private HS-grad Widowed Transport-moving Unmarried White Male United-States 0 -33 0.366666675 0.07724834 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.06470107 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -50 0.5555556 0.0902287 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -33 0.366666675 0.120229945 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family Black Female United-States 0 -65 0.722222269 0.2360725 0.8125 0.106051058 0 0.2020202 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -22 0.244444445 0.08861896 0.625 0 0 0.08080808 ? Some-college Never-married ? Own-child White Female United-States 0 -88 0.9777778 0.1389441 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -40 0.444444448 0.122786686 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -51 0.566666663 0.16255486 0.5625 0 0 0.434343427 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -50 0.5555556 0.105773874 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Not-in-family Black Female United-States 0 -25 0.2777778 0.272522837 0.875 0 0 1 Private Masters Married-civ-spouse Farming-fishing Not-in-family White Male United-States 1 -20 0.222222224 0.277403265 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 -47 0.5222222 0.123265564 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -58 0.644444466 0.114488736 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -22 0.244444445 0.126990885 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -50 0.5555556 0.2401952 0.5625 0 0 0.4848485 State-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.03088627 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -24 0.266666681 0.195248216 0.4375 0 0 0.454545468 Local-gov 11th Never-married Other-service Not-in-family Asian-Pac-Islander Male United-States 0 -50 0.5555556 0.09834614 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -40 0.444444448 0.14564307 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 -36 0.4 0.28069213 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -32 0.355555564 0.136695176 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -44 0.4888889 0.112968571 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.11156223 0.875 0 0 0.4040404 ? Masters Married-civ-spouse ? Husband White Male United-States 0 -59 0.655555546 0.0291505717 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Exec-managerial Own-child Black Female United-States 0 -65 0.722222269 0.08000175 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.128826261 0.8125 0 0 0.656565666 State-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.1667045 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -51 0.566666663 0.161079139 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Not-in-family White Male United-States 0 -48 0.533333361 0.123163864 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.02282339 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -28 0.311111122 0.29925406 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -19 0.211111113 0.126059383 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -49 0.544444442 0.07873079 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family Black Female United-States 0 -51 0.566666663 0.119089656 0.75 0 0 0.6060606 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -59 0.655555546 0.102118604 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -18 0.2 0.162151411 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female Dominican-Republic 0 -50 0.5555556 0.0508329943 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male ? 0 -45 0.5 0.216081992 0.5625 0 0 0.8080808 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -30 0.333333343 0.158463135 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.112141475 0.8125 0 0 0.353535354 Private Bachelors Divorced Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.231736273 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 1 -33 0.366666675 0.148983136 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 -61 0.677777767 0.0764758 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -61 0.677777767 0.216283381 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -38 0.422222227 0.0536261424 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.0282911435 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 -36 0.4 0.09112181 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -44 0.4888889 0.2161938 0.625 0.05178052 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.136774644 0.625 0 0 0.6262626 Private Some-college Separated Adm-clerical Own-child White Male United-States 0 -31 0.344444454 0.0218265578 0.625 0 0 0.2020202 Private Some-college Divorced Craft-repair Unmarried White Female United-States 0 -54 0.6 0.06680452 1 0.1502415 0 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.138639659 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Male United-States 0 -63 0.7 0.101292178 0.8125 0 0 0.4040404 ? Bachelors Widowed ? Not-in-family White Female United-States 1 -48 0.533333361 0.164093882 0.625 0.07688077 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 1 -33 0.366666675 0.109788142 0.5625 0 0 0.414141417 ? HS-grad Divorced ? Not-in-family Asian-Pac-Islander Female China 0 -31 0.344444454 0.155763611 0.8125 0.046500463 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -38 0.422222227 0.135257855 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.166618288 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -48 0.533333361 0.235165238 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.0149214827 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.118755579 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Own-child White Female United-States 0 -38 0.422222227 0.0149827749 0.875 0 0 0.727272749 Private Masters Married-civ-spouse Transport-moving Husband White Male ? 1 -29 0.322222233 0.1592478 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.238483742 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.112354308 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -50 0.5555556 0.241623759 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female England 0 -75 0.8333334 0.1403821 0.9375 0 0 0.353535354 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -46 0.51111114 0.1786658 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.021443991 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -27 0.3 0.117891438 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.278369784 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.07162837 0.4375 0 0 0.424242437 Private 11th Separated Other-service Not-in-family Black Female United-States 0 -23 0.25555557 0.117702849 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -34 0.377777785 0.2973345 0.5625 0 0 0.24242425 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -41 0.455555558 0.1410004 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Other-relative White Female Cuba 0 -31 0.344444454 0.1250969 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -42 0.466666669 0.0440302975 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -35 0.3888889 0.0228833333 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -55 0.6111111 0.219772279 0.5625 0 0 0.25252524 Private HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.131090015 0.5625 0 0 0.4040404 State-gov HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 -65 0.722222269 0.112759106 0.5625 0 0 0.5959596 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.111671343 0.625 0 0 0.121212125 Local-gov Some-college Never-married Other-service Not-in-family White Male United-States 0 -62 0.6888889 0.1299019 0.625 0 0 0.2020202 Private Some-college Widowed Other-service Not-in-family White Female United-States 0 -54 0.6 0.112115875 0.9375 1 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.100353271 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -34 0.377777785 0.1279985 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -32 0.355555564 0.141059682 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -51 0.566666663 0.1545526 0.875 0.1502415 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.26770705 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.191126868 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male ? 0 -52 0.5777778 0.13635841 0.5625 0 0 0.434343427 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.147204325 0.625 0 0.404499531 0.4040404 Self-emp-not-inc Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -29 0.322222233 0.08661923 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 0 -38 0.422222227 0.04409361 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -57 0.6333333 0.09518793 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.248849437 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.09169296 0.625 0 0 0.4040404 State-gov Some-college Separated Adm-clerical Not-in-family White Male United-States 0 -30 0.333333343 0.159472764 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.0603042357 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -69 0.7666667 0.1318639 0.6875 0 0 0.01010101 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 -73 0.811111152 0.02005651 0.5625 0 0 0.373737365 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -22 0.244444445 0.103398323 0.625 0 0 0.353535354 Self-emp-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 -31 0.344444454 0.110186204 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -38 0.422222227 0.127717629 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.231526136 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.260947466 0.625 0 0 0.373737365 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -44 0.4888889 0.275815725 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Protective-serv Not-in-family White Male United-States 0 -47 0.5222222 0.135201275 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Unmarried Black Female United-States 0 -27 0.3 0.07801618 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -28 0.311111122 0.101229541 0.75 0 0 0.8080808 Private Assoc-acdm Never-married Other-service Not-in-family White Female United-States 0 -25 0.2777778 0.217918709 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family Black Female United-States 0 -20 0.222222224 0.156648636 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Unmarried White Female United-States 0 -51 0.566666663 0.10288509 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -46 0.51111114 0.08689066 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -67 0.7444445 0.115567744 0.8125 0.06514065 0 0.07070707 Private Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -47 0.5222222 0.260075927 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.2309314 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -52 0.5777778 0.125806138 0.5625 0 0.430670351 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -42 0.466666669 0.107042141 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Divorced Prof-specialty Unmarried Asian-Pac-Islander Female Philippines 1 -65 0.722222269 0.02427351 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -21 0.233333334 0.110472456 0.625 0 0 0.1010101 Private Some-college Never-married Farming-fishing Own-child Black Male United-States 0 -50 0.5555556 0.05989473 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -46 0.51111114 0.1272044 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -47 0.5222222 0.2492879 0.8125 0.1502415 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -57 0.6333333 0.122625038 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband White Male United-States 0 -37 0.411111116 0.0250810776 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -50 0.5555556 0.2836469 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.120333672 0.5 0 0 0.4040404 ? 12th Married-civ-spouse ? Husband White Male United-States 0 -63 0.7 0.536018968 0.125 0 0 0.3030303 Self-emp-not-inc 1st-4th Widowed Other-service Unmarried White Female El-Salvador 0 -39 0.433333337 0.187514022 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -46 0.51111114 0.188361332 0.875 0 0 0.353535354 Private Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 0 -36 0.4 0.07637679 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -26 0.2888889 0.188652292 0.1875 0 0.373737365 0.5050505 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.159422919 0.625 0 0 0.575757563 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -41 0.455555558 0.1786658 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 -44 0.4888889 0.0235299282 0.625 0 0 0.4040404 Local-gov Some-college Never-married Other-service Own-child Black Male United-States 0 -22 0.244444445 0.0392145254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.20274061 0.625 0 0 0.6060606 Federal-gov Some-college Never-married Armed-Forces Not-in-family Black Male United-States 0 -29 0.322222233 0.282696575 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female Japan 0 -58 0.644444466 0.125810176 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Transport-moving Wife White Female United-States 1 -36 0.4 0.121698253 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -30 0.333333343 0.140838087 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.0220030248 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -29 0.322222233 0.173068732 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Not-in-family White Male United-States 0 -26 0.2888889 0.1361907 0.1875 0 0 0.4040404 Private 5th-6th Never-married Adm-clerical Own-child White Female Mexico 0 -43 0.477777779 0.0579205975 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -49 0.544444442 0.08447537 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 1 -45 0.5 0.190635175 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.129946351 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -20 0.222222224 0.164806485 0.625 0 0 0.25252524 ? Some-college Never-married ? Not-in-family White Female United-States 0 -51 0.566666663 0.120997779 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -32 0.355555564 0.343064785 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male Canada 1 -24 0.266666681 0.06484722 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -35 0.3888889 0.08021661 1 0.07298073 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.2203266 0.75 0 0 0.5555556 ? Assoc-acdm Never-married ? Not-in-family White Male United-States 0 -41 0.455555558 0.0976140052 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.0372040235 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -61 0.677777767 0.06820547 0.5625 0.0147101469 0 0.353535354 Local-gov HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -20 0.222222224 0.0773716 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -27 0.3 0.128325164 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 1 -55 0.6111111 0.08211194 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -39 0.433333337 0.056504827 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -17 0.188888893 0.09328924 0.375 0 0 0.2020202 ? 10th Never-married ? Own-child White Male United-States 0 -47 0.5222222 0.172776416 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male ? 0 -52 0.5777778 0.113410413 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried Asian-Pac-Islander Female India 1 -24 0.266666681 0.197735578 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child Black Female United-States 0 -29 0.322222233 0.192152649 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Unmarried Black Female United-States 0 -25 0.2777778 0.12695317 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 -20 0.222222224 0.218541056 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 -23 0.25555557 0.18538633 0.5625 0 0 0.353535354 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -57 0.6333333 0.178553313 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -51 0.566666663 0.0988526344 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.0274000559 0.625 0.0367403664 0 0.161616161 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -39 0.433333337 0.117826775 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -40 0.444444448 0.1617318 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -71 0.788888931 0.181657642 0.8125 0.0232902318 0 0.161616161 Private Bachelors Divorced Tech-support Own-child White Female United-States 0 -38 0.422222227 0.02302141 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.152154133 0.9375 0 0 0.4040404 State-gov Prof-school Never-married Prof-specialty Unmarried White Male United-States 0 -57 0.6333333 0.0602085963 0.875 0 0 0.4040404 Private Masters Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.0315598063 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 -59 0.655555546 0.07096561 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -26 0.2888889 0.131409943 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family Other Male United-States 0 -35 0.3888889 0.124009147 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -61 0.677777767 0.09077089 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Germany 1 -17 0.188888893 0.0982592553 0.4375 0 0 0.3030303 ? 11th Never-married ? Own-child White Female United-States 0 -36 0.4 0.10310331 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 1 -62 0.6888889 0.151984408 0.25 0.03411034 0 0.5050505 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -34 0.377777785 0.314613342 0.625 0 0 0.5050505 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 1 -32 0.355555564 0.134548619 0.8125 0.07688077 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.117153242 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Own-child White Female United-States 0 -39 0.433333337 0.128753528 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.0893147141 0.1875 0 0 0.4040404 Private 5th-6th Divorced Machine-op-inspct Not-in-family Black Male United-States 0 -61 0.677777767 0.0202552024 0.5625 0 0.4242424 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -40 0.444444448 0.104525819 0.375 0 0 0.5555556 Private 10th Never-married Craft-repair Other-relative Black Male United-States 0 -31 0.344444454 0.02889463 0.8125 0 0 0.373737365 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -36 0.4 0.128753528 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -23 0.25555557 0.122462042 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -33 0.366666675 0.07137714 0.5625 0 0 0.414141417 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -52 0.5777778 0.0985906348 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.06967041 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -51 0.566666663 0.137020484 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female Italy 0 -31 0.344444454 0.113363937 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Never-married Exec-managerial Not-in-family White Female United-States 0 -49 0.544444442 0.173612937 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -49 0.544444442 0.115377128 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female United-States 0 -53 0.5888889 0.151773587 0.625 0 0 0.4040404 Federal-gov Some-college Widowed Adm-clerical Not-in-family Black Female United-States 0 -52 0.5777778 0.102534845 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 -20 0.222222224 0.299422443 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 -26 0.2888889 0.271965146 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Own-child Black Male United-States 0 -61 0.677777767 0.128643066 0.5625 0 0 0.0606060624 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -43 0.477777779 0.149221569 0.875 0 0 0.3030303 Private Masters Never-married Other-service Not-in-family White Female Poland 0 -46 0.51111114 0.06663209 0.8125 0 0 0.5252525 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -43 0.477777779 0.113964058 0.6875 0 0 0.353535354 Local-gov Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -41 0.455555558 0.06892413 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried Black Female United-States 0 -44 0.4888889 0.155373633 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -54 0.6 0.302590072 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -65 0.722222269 0.133875757 0.875 0.200512 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.06562179 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female Canada 0 -25 0.2777778 0.140768036 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Own-child White Male United-States 0 -23 0.25555557 0.02496927 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -25 0.2777778 0.109854147 0.8125 0 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -19 0.211111113 0.08020112 0.625 0 0 0.5050505 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -37 0.411111116 0.09248571 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -45 0.5 0.08574296 0.625 0 0 0.454545468 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -37 0.411111116 0.235141665 0.5625 0 0 0.444444448 Private HS-grad Never-married Sales Not-in-family Black Male United-States 0 -40 0.444444448 0.1793784 0.625 0 0.359045 0.7070707 Self-emp-not-inc Some-college Divorced Exec-managerial Other-relative White Male Iran 1 -19 0.211111113 0.130729675 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -17 0.188888893 0.03131666 0.4375 0 0 0.05050505 Private 11th Never-married Other-service Own-child White Male United-States 0 -27 0.3 0.0201413762 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -40 0.444444448 0.1949229 0.25 0 0.4331956 0.4040404 Local-gov 7th-8th Married-civ-spouse Craft-repair Husband Black Male ? 1 -59 0.655555546 0.1528398 0.5625 0 0.404499531 0.3030303 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -19 0.211111113 0.157708779 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -43 0.477777779 0.1604945 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -42 0.466666669 0.155333221 0.375 0 0 0.4040404 Private 10th Never-married Transport-moving Unmarried White Male United-States 1 -54 0.6 0.268209517 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -54 0.6 0.07729347 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 -51 0.566666663 0.16603905 0.375 0.02105021 0 0.454545468 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -50 0.5555556 0.0928231552 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -40 0.444444448 0.175587744 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -55 0.6111111 0.218903422 0.75 0 0 0.25252524 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 -50 0.5555556 0.07622794 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.0450022072 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.03488572 0.5625 0 0 0.323232323 ? HS-grad Divorced ? Unmarried Black Female United-States 0 -24 0.266666681 0.162674069 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -30 0.333333343 0.0203582533 0.4375 0 0 0.4040404 Private 11th Divorced Sales Own-child White Male United-States 0 -39 0.433333337 0.23750712 0.75 0 0 0.5050505 Local-gov Assoc-acdm Married-civ-spouse Craft-repair Wife White Female United-States 1 -37 0.411111116 0.09692969 0.5625 0 0 0.5050505 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -33 0.366666675 0.0875736251 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -48 0.533333361 0.222116858 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -43 0.477777779 0.132649243 0.5625 0 0 0.7878788 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Thailand 0 -39 0.433333337 0.0163951758 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.0231480338 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.11708656 0.375 0 0 0.6060606 Self-emp-not-inc 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.0493101329 0.625 0 0 0.2020202 State-gov Some-college Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male United-States 0 -32 0.355555564 0.05841093 0.5625 0 0 0.5252525 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -31 0.344444454 0.120687954 0.8125 0 0 0.909090936 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 1 -31 0.344444454 0.0859497339 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -47 0.5222222 0.0775036141 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.116239928 0.625 0 0 0.5050505 ? Some-college Never-married ? Own-child White Male United-States 0 -40 0.444444448 0.172560886 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -40 0.444444448 0.1366413 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 -41 0.455555558 0.123999044 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Not-in-family White Male United-States 0 -53 0.5888889 0.0880329758 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -46 0.51111114 0.09074328 0.4375 0 0 0.434343427 Private 11th Divorced Machine-op-inspct Unmarried Amer-Indian-Eskimo Male Germany 0 -45 0.5 0.0244008079 0.8125 0.04386044 0 0.353535354 Self-emp-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -39 0.433333337 0.20061022 0.3125 0.03411034 0 0.343434334 Private 9th Married-civ-spouse Other-service Wife Black Female United-States 0 -19 0.211111113 0.1438966 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -57 0.6333333 0.1170576 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -49 0.544444442 0.099226445 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Wife White Female Peru 0 -59 0.655555546 0.1995366 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -32 0.355555564 0.121822856 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Sales Not-in-family White Male United-States 1 -18 0.2 0.114421383 0.625 0.005940059 0 0.151515156 ? Some-college Never-married ? Own-child White Female United-States 0 -35 0.3888889 0.142193228 0.625 0 0 0.4040404 State-gov Some-college Never-married Protective-serv Not-in-family Black Male United-States 0 -58 0.644444466 0.123842783 0.375 0 0 0.4040404 Self-emp-inc 10th Married-civ-spouse Transport-moving Wife White Female United-States 0 -28 0.311111122 0.2974463 0.8125 0 0 0.434343427 Private Bachelors Never-married Other-service Not-in-family White Male Mexico 0 -36 0.4 0.147195578 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 -41 0.455555558 0.09518861 0.875 0 0 0.353535354 Self-emp-not-inc Masters Divorced Prof-specialty Unmarried White Female United-States 0 -47 0.5222222 0.04560906 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.118096866 0.5625 0 0.3838384 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -61 0.677777767 0.2337764 0.5625 0 0 0.161616161 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -36 0.4 0.226708338 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.0188569445 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 -56 0.622222245 0.09804911 0.5625 0 0.43663913 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -50 0.5555556 0.0205071047 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 -45 0.5 0.173008114 0.625 0.0501305 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.0813878849 0.5625 0 0 0.6666667 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -51 0.566666663 0.124794491 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.154553264 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.200864822 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -60 0.6666667 0.125108361 0.4375 0 0 0.4040404 Private 11th Widowed Transport-moving Unmarried Black Male United-States 0 -17 0.188888893 0.224354342 0.375 0.010550105 0 0.3030303 ? 10th Never-married ? Own-child White Male United-States 0 -49 0.544444442 0.08479261 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.379794657 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 -56 0.622222245 0.209636942 0.5625 0 0 0.3838384 Private HS-grad Widowed Adm-clerical Unmarried Black Female United-States 0 -25 0.2777778 0.149360985 0.5625 0.0332503319 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -22 0.244444445 0.208898067 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -76 0.844444454 0.142420888 0.5625 0 0 0.02020202 ? HS-grad Widowed ? Not-in-family Black Female United-States 0 -41 0.455555558 0.06338835 0.9375 0 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.129955113 0.5625 0.07688077 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.108781211 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -30 0.333333343 0.119670242 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 1 -39 0.433333337 0.03441761 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -40 0.444444448 0.0677467957 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 -70 0.7777778 0.109788142 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -35 0.3888889 0.0456171446 0.625 0 0.4708448 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.06824251 0.875 0 0 0.75757575 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 0 -24 0.266666681 0.0287639629 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 0 -40 0.444444448 0.153926209 0.75 0.07298073 0 0.363636374 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -61 0.677777767 0.08145659 0.9375 0 0 0.05050505 Private Prof-school Married-civ-spouse Transport-moving Husband White Male United-States 1 -25 0.2777778 0.06619699 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Male United-States 0 -28 0.311111122 0.145807415 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -69 0.7666667 0.140680477 0.875 0 0 0.111111112 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -22 0.244444445 0.140054762 0.625 0 0 0.363636374 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 -47 0.5222222 0.02306721 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -38 0.422222227 0.0563930236 0.5625 0 0 0.4848485 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -26 0.2888889 0.123308674 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -17 0.188888893 0.1332588 0.4375 0 0 0.24242425 Private 11th Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -33 0.366666675 0.158463135 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Other-service Not-in-family White Male United-States 0 -43 0.477777779 0.02373266 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 -58 0.644444466 0.172304943 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -53 0.5888889 0.177762583 0.5625 1 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -26 0.2888889 0.172601968 0.5625 0 0 0.25252524 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -43 0.477777779 0.197705939 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -31 0.344444454 0.141070455 0.375 0.02105021 0 0.4040404 Private 10th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -30 0.333333343 0.0388299376 0.5625 0 0.459366381 0.424242437 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 -25 0.2777778 0.117593735 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -57 0.6333333 0.1877565 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -37 0.411111116 0.118024796 0.875 0 0 0.6060606 Private Masters Divorced Exec-managerial Unmarried White Male United-States 1 -32 0.355555564 0.271307766 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.06812801 0.5625 0 0 0.414141417 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -45 0.5 0.06973641 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -53 0.5888889 0.10566207 0.5625 0.1502415 0 0.353535354 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -27 0.3 0.0161244161 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative Amer-Indian-Eskimo Male United-States 0 -28 0.311111122 0.141640931 0.4375 0 0 0.5050505 Self-emp-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 -32 0.355555564 0.0539218225 0.4375 0 0 0.434343427 Private 11th Divorced Sales Not-in-family White Male United-States 1 -35 0.3888889 0.1260311 0.8125 0 0.454545438 0.656565666 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 -36 0.4 0.07073527 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.152067244 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -37 0.411111116 0.266605824 0.8125 0 0 0.8080808 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.0338666625 0.625 0.0332503319 0 0.454545468 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -20 0.222222224 0.02204613 0.625 0 0 0.454545468 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -64 0.7111111 0.120856337 0.8125 0.1502415 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -60 0.6666667 0.195724413 0.875 0 0 0.4040404 ? Masters Married-civ-spouse ? Husband White Male United-States 0 -32 0.355555564 0.0830151439 0.75 0 0 0.424242437 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.0326212943 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -42 0.466666669 0.165229455 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -20 0.222222224 0.290795147 0.625 0 0 0.141414136 Private Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 -42 0.466666669 0.293665081 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -25 0.2777778 0.151506871 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Prof-specialty Unmarried Black Male United-States 0 -30 0.333333343 0.113147058 0.6875 0.1502415 0 0.656565666 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.146193355 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -66 0.733333349 0.201275 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -59 0.655555546 0.0841918141 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male England 1 -44 0.4888889 0.08350682 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Not-in-family Asian-Pac-Islander Male China 0 -46 0.51111114 0.1047272 0.5625 0 0 0.5858586 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -59 0.655555546 0.191845521 0.8125 0.0288502872 0 0.3030303 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 -25 0.2777778 0.143122718 0.8125 0 0.307621658 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -17 0.188888893 0.021636622 0.3125 0 0 0.09090909 Local-gov 9th Never-married Other-service Own-child Black Male United-States 0 -47 0.5222222 0.1662896 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 -47 0.5222222 0.09529368 0.3125 0 0 0.4040404 State-gov 9th Divorced Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.021543 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -20 0.222222224 0.115039691 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Own-child White Female United-States 0 -26 0.2888889 0.11200542 0.8125 0 0.5369605 0.5555556 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -20 0.222222224 0.1557791 0.625 0 0 0.151515156 Private Some-college Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -33 0.366666675 0.107308865 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Male United-States 0 -48 0.533333361 0.118559584 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -52 0.5777778 0.07949391 0.8125 1 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.0181167312 0.5625 0 0 0.121212125 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -47 0.5222222 0.156682983 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -40 0.444444448 0.0579205975 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -48 0.533333361 0.08447537 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Unmarried White Female United-States 1 -49 0.544444442 0.165221378 0.375 0 0 0.424242437 Private 10th Married-civ-spouse Transport-moving Husband Black Male United-States 1 -50 0.5555556 0.04950007 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.132725358 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 -34 0.377777785 0.0822493359 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.0510148481 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -22 0.244444445 0.144628733 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -35 0.3888889 0.1791292 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family Black Male United-States 0 -26 0.2888889 0.13279137 0.5625 0 0 0.3030303 State-gov HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -62 0.6888889 0.109277606 0.9375 0 0.373737365 0.7070707 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -39 0.433333337 0.136774644 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Protective-serv Not-in-family White Male United-States 0 -59 0.655555546 0.111601293 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -69 0.7666667 0.318608761 0.1875 0 0 0.4040404 ? 5th-6th Divorced ? Not-in-family White Male United-States 0 -27 0.3 0.113225862 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.110118851 0.375 0 0 0.3030303 Private 10th Never-married Sales Own-child White Male United-States 0 -38 0.422222227 0.121466555 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -41 0.455555558 0.08242782 0.625 0 0.4331956 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.0997295752 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Unmarried White Female United-States 0 -23 0.25555557 0.135362253 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -17 0.188888893 0.0881023556 0.375 0 0 0.24242425 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 -56 0.622222245 0.07890322 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Female United-States 0 -24 0.266666681 0.144120887 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -62 0.6888889 0.09077089 1 0.07688077 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 -44 0.4888889 0.09384895 0.5 0 0 0.4040404 Private 12th Divorced Transport-moving Unmarried Black Male United-States 0 -23 0.25555557 0.212754056 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -41 0.455555558 0.131422743 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Sales Not-in-family White Male ? 0 -25 0.2777778 0.237122536 0.5625 0 0 0.656565666 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -21 0.233333334 0.159414843 0.625 0 0 0.08080808 Private Some-college Never-married Other-service Other-relative Black Female United-States 0 -18 0.2 0.140396237 0.5 0 0 0.0606060624 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 -45 0.5 0.1007877 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -75 0.8333334 0.0748815462 0.8125 0.251242518 0 0.161616161 ? Bachelors Widowed ? Not-in-family White Female United-States 1 -51 0.566666663 0.103954658 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Protective-serv Husband White Male United-States 0 -42 0.466666669 0.09527752 0.5625 0 0 0.4040404 Federal-gov HS-grad Separated Other-service Other-relative Black Female United-States 0 -47 0.5222222 0.07529914 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family Black Female Outlying-US(Guam-USVI-etc) 0 -29 0.322222233 0.07536851 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -33 0.366666675 0.05301188 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family Black Male United-States 0 -43 0.477777779 0.108152129 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.117675908 0.625 0 0 0.161616161 ? Some-college Never-married ? Own-child White Male United-States 0 -19 0.211111113 0.0421188064 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Own-child Black Female Jamaica 0 -44 0.4888889 0.146094352 0.75 0 0.4242424 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.133459508 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 -19 0.211111113 0.08369676 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -49 0.544444442 0.175832242 0.375 0.0217602178 0 0.4040404 ? 10th Separated ? Own-child White Male United-States 0 -52 0.5777778 0.140187442 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -38 0.422222227 0.173266754 0.5625 0 0 0.5252525 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -24 0.266666681 0.0991799757 0.625 0 0 0.5050505 State-gov Some-college Never-married Tech-support Not-in-family White Male United-States 0 -32 0.355555564 0.164522916 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -72 0.8 0.1436346 0.5625 0 0 0.08080808 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -26 0.2888889 0.179774433 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.113897376 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child Asian-Pac-Islander Male ? 0 -29 0.322222233 0.135051072 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.0866939947 0.5625 0.105201051 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 1 -48 0.533333361 0.04414008 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -40 0.444444448 0.0696401 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.04785193 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Unmarried White Male Scotland 0 -28 0.311111122 0.08448951 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Own-child White Male United-States 0 -22 0.244444445 0.113953955 0.5625 0 0 0.2020202 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 -23 0.25555557 0.08181491 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -65 0.722222269 0.1396109 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -26 0.2888889 0.03104792 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -20 0.222222224 0.139200047 0.625 0.010550105 0 0.5050505 ? Some-college Never-married ? Own-child White Male United-States 0 -55 0.6111111 0.06624953 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 -38 0.422222227 0.216974422 0.8125 0 0 0.1010101 Self-emp-not-inc Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 -33 0.366666675 0.100480571 0.5625 0 0 0.6060606 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 1 -33 0.366666675 0.0807089657 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -37 0.411111116 0.613184452 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family Black Female United-States 0 -19 0.211111113 0.118925981 0.4375 0 0 0.6060606 Private 11th Never-married Machine-op-inspct Own-child White Male United-States 0 -24 0.266666681 0.145570338 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -30 0.333333343 0.018324852 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.04635938 0.5625 0 0 0.5050505 State-gov HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -22 0.244444445 0.120440088 0.625 0 0 0.2020202 State-gov Some-college Never-married Prof-specialty Own-child White Female United-States 0 -57 0.6333333 0.159589961 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -46 0.51111114 0.184394211 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -67 0.7444445 0.214542955 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -35 0.3888889 0.304397166 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -47 0.5222222 0.068914704 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Own-child White Male United-States 0 -39 0.433333337 0.2555053 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.01420821 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried Asian-Pac-Islander Male Philippines 0 -58 0.644444466 0.1424842 0.5 0 0 0.5252525 Self-emp-not-inc 12th Divorced Sales Not-in-family White Female United-States 0 -36 0.4 0.05743363 0.75 0 0 0.3030303 Private Assoc-acdm Married-civ-spouse Prof-specialty Wife White Female United-States 1 -45 0.5 0.0312560424 0.875 0 0 0.363636374 Private Masters Married-civ-spouse Prof-specialty Husband White Male England 1 -54 0.6 0.03625838 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -26 0.2888889 0.108443767 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -60 0.6666667 0.036173515 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.2492879 0.9375 1 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.209406585 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -32 0.355555564 0.2531365 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Other-relative White Male United-States 0 -38 0.422222227 0.07241371 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -48 0.533333361 0.0395250246 0.625 0 0 0.7070707 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -44 0.4888889 0.120937832 0.5625 0 0.453856736 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.0473090634 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Asian-Pac-Islander Female Philippines 0 -44 0.4888889 0.09914832 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.11823763 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family Other Female United-States 0 -61 0.677777767 0.109903313 0.9375 0 0 0.353535354 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.08487208 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.0995995849 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 -45 0.5 0.2885085 0.5625 0 0.399449021 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -36 0.4 0.135315776 0.75 0 0 0.212121218 ? Assoc-acdm Married-civ-spouse ? Wife Black Female Haiti 0 -39 0.433333337 0.221233174 0.4375 0.02407024 0 0.7070707 Private 11th Married-civ-spouse Other-service Husband White Male Mexico 0 -67 0.7444445 0.174427241 0.5625 0 0 0.24242425 Local-gov HS-grad Divorced Other-service Not-in-family White Female United-States 0 -40 0.444444448 0.233022049 0.75 0 0 0.4040404 State-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 -27 0.3 0.0860750154 0.1875 0 0 0.353535354 Private 5th-6th Never-married Farming-fishing Not-in-family White Male Mexico 0 -37 0.411111116 0.273268431 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -57 0.6333333 0.118503004 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.1914158 0.375 0 0 0.4040404 Private 10th Divorced Other-service Not-in-family White Female United-States 0 -28 0.311111122 0.06042817 0.5625 0.0220202189 0 0.4848485 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -34 0.377777785 0.1183811 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -54 0.6 0.138996646 0.5625 0.05178052 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -52 0.5777778 0.107087269 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Other-relative Black Female United-States 0 -42 0.466666669 0.192001775 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.08537319 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -65 0.722222269 0.1409573 0.875 0.06514065 0 0.353535354 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.0356218927 0.9375 0 0 0.1010101 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 0 -71 0.788888931 0.090133056 0.5625 0 0 0.2020202 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -33 0.366666675 0.162162185 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -30 0.333333343 0.0263042152 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.08033381 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -59 0.655555546 0.0965659842 0.375 0 0 0.4040404 Private 10th Divorced Adm-clerical Not-in-family Black Female United-States 0 -19 0.211111113 0.2178352 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -36 0.4 0.09161955 0.3125 0 0 0.3030303 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.109913416 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Sales Own-child White Male United-States 0 -34 0.377777785 0.136544973 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -41 0.455555558 0.28414467 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 -44 0.4888889 0.08101071 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Italy 1 -26 0.2888889 0.142653257 0.5625 0 0 0.4040404 ? HS-grad Separated ? Unmarried White Female United-States 0 -47 0.5222222 0.133966684 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.144551948 0.625 0 0 0.161616161 Private Some-college Never-married Sales Own-child White Male United-States 0 -55 0.6111111 0.121044248 0.375 0 0 0.181818187 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.0722237751 0.5625 0 0.459595948 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.0743279 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.124184944 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -62 0.6888889 0.1841807 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Protective-serv Husband White Male Cuba 0 -44 0.4888889 0.298402727 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -39 0.433333337 0.0482930951 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried White Female United-States 0 -50 0.5555556 0.107867219 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.07273566 0.4375 0 0 0.454545468 Private 11th Never-married Sales Not-in-family White Male United-States 0 -52 0.5777778 0.0635755956 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -46 0.51111114 0.06724232 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.0294408668 0.75 0.07688077 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.0564125553 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Unmarried White Male United-States 0 -51 0.566666663 0.08143975 0.25 0.0296102948 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.12127123 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 -47 0.5222222 0.115070671 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female Italy 1 -43 0.477777779 0.0255518779 0.875 0 0 0.5050505 Private Masters Divorced Exec-managerial Unmarried White Male United-States 0 -64 0.7111111 0.113382794 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male ? 1 -24 0.266666681 0.0259007681 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -27 0.3 0.08625215 0.625 0 0 0.5050505 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.2834873 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.112307832 0.5625 0 0 0.121212125 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -26 0.2888889 0.160818487 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -43 0.477777779 0.118723921 0.8125 1 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.0946935639 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -20 0.222222224 0.14242965 0.5625 0 0 0.8080808 Self-emp-not-inc HS-grad Never-married Transport-moving Own-child White Male United-States 0 -37 0.411111116 0.126988187 0.5625 0 0.43663913 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.0266591683 0.5625 0 0 0.454545468 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -37 0.411111116 0.115275428 0.5625 0 0.4331956 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -53 0.5888889 0.07913761 0.3125 0 0 0.363636374 Private 9th Divorced Other-service Not-in-family White Female Canada 0 -44 0.4888889 0.0977702662 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.0192092042 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -17 0.188888893 0.06994723 0.4375 0.010550105 0 0.2020202 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 -19 0.211111113 0.252627283 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Own-child White Male United-States 0 -53 0.5888889 0.189660579 0.5625 0.1502415 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -44 0.4888889 0.102043167 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -51 0.566666663 0.2797101 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -49 0.544444442 0.0216958933 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -35 0.3888889 0.08325291 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -44 0.4888889 0.13643451 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -54 0.6 0.119839974 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.1729118 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -18 0.2 0.03114895 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 -24 0.266666681 0.179783866 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -29 0.322222233 0.07545674 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 -22 0.244444445 0.253435522 0.625 0 0 0.353535354 ? Some-college Divorced ? Not-in-family White Female United-States 0 -35 0.3888889 0.11370407 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -56 0.622222245 0.126278967 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -32 0.355555564 0.1069465 0.25 0 0 0.4040404 ? 7th-8th Widowed ? Not-in-family White Female United-States 0 -24 0.266666681 0.0452763364 0.8125 0 0 0.454545468 Private Bachelors Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male China 0 -43 0.477777779 0.1358674 0.875 0 0.43663913 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -73 0.811111152 0.180108517 0.5625 0 0 0.151515156 Private HS-grad Widowed Sales Other-relative White Female United-States 0 -47 0.5222222 0.113282442 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male ? 0 -49 0.544444442 0.07102017 0.5 0 0 0.3939394 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.105561711 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.100087225 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -39 0.433333337 0.0134127662 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 -42 0.466666669 0.128488153 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 -41 0.455555558 0.157576755 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 1 -35 0.3888889 0.02046265 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.125997424 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.247398645 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -51 0.566666663 0.0681071356 0.5625 0 0 0.7070707 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -38 0.422222227 0.0582950823 0.8125 0 0 0.4848485 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 -40 0.444444448 0.147500679 0.625 0 0 0.424242437 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.03887035 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -44 0.4888889 0.204431862 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -55 0.6111111 0.134078488 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.166662738 0.5625 0 0 0.454545468 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -49 0.544444442 0.125329956 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -31 0.344444454 0.0522891767 0.6875 0 0 0.424242437 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -24 0.266666681 0.121276617 0.875 0.068490684 0 0.909090936 Private Masters Never-married Exec-managerial Own-child White Male United-States 0 -46 0.51111114 0.0380425751 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family Black Male United-States 0 -26 0.2888889 0.211609051 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family Black Male United-States 0 -35 0.3888889 0.161483258 0.8125 0 0 0.3838384 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -27 0.3 0.2543805 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Sales Not-in-family White Male United-States 0 -64 0.7111111 0.09090021 0.8125 0.1502415 0 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.198351189 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Other-relative White Male United-States 0 -21 0.233333334 0.0219680015 0.5625 0 0.3946281 0.161616161 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -45 0.5 0.123024441 0.8125 0 0 0.454545468 Private Bachelors Divorced Other-service Not-in-family White Male ? 1 -57 0.6333333 0.03520363 0.5625 0 0 0.727272749 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.07945215 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -45 0.5 0.0665997639 0.4375 0 0 0.323232323 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 -50 0.5555556 0.132661372 0.25 0 0 0.3030303 Private 7th-8th Divorced Craft-repair Not-in-family White Female United-States 0 -38 0.422222227 0.112472177 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -43 0.477777779 0.130301312 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.122813627 0.625 0 0 0.5555556 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 0 -32 0.355555564 0.334573537 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -20 0.222222224 0.104250342 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.147753939 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -45 0.5 0.0668004751 0.4375 0 0 0.4040404 Private 11th Widowed Adm-clerical Unmarried White Female United-States 0 -40 0.444444448 0.151484638 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -38 0.422222227 0.205192953 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -37 0.411111116 0.2355276 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -60 0.6666667 0.07196716 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family White Female United-States 0 -53 0.5888889 0.132233679 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -25 0.2777778 0.114044882 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Own-child White Female United-States 0 -47 0.5222222 0.10973493 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family Asian-Pac-Islander Male Japan 0 -40 0.444444448 0.0229250938 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -51 0.566666663 0.112918727 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -19 0.211111113 0.132944927 0.625 0 0 0.1010101 Private Some-college Never-married Other-service Own-child White Female United-States 0 -42 0.466666669 0.169592619 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -65 0.722222269 0.179214731 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -41 0.455555558 0.111341313 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.145397916 0.375 0 0 0.454545468 Private 10th Never-married Machine-op-inspct Own-child Black Male United-States 0 -46 0.51111114 0.09021186 0.875 0.2782828 0 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 1 -49 0.544444442 0.107641585 0.8125 1 0 0.2020202 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -24 0.266666681 0.153851435 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative Black Male United-States 0 -32 0.355555564 0.131727174 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -71 0.788888931 0.0708558261 0.5625 0.06767067 0 0.2020202 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -26 0.2888889 0.112716 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -29 0.322222233 0.0351578258 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Protective-serv Not-in-family White Male United-States 0 -50 0.5555556 0.11540205 0.625 1 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.08094066 0.6875 0.03103031 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -17 0.188888893 0.106931679 0.375 0 0 0.2020202 ? 10th Never-married ? Own-child White Female United-States 0 -49 0.544444442 0.114378281 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 1 -31 0.344444454 0.19426015 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.139789388 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -59 0.655555546 0.099485755 0.5625 0 0.5369605 0.4040404 Local-gov HS-grad Widowed Farming-fishing Unmarried White Male United-States 0 -17 0.188888893 0.153817087 0.375 0 0 0.3030303 ? 10th Never-married ? Own-child White Male United-States 0 -43 0.477777779 0.1305862 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.0209017955 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.183841243 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.123609066 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Male United-States 0 -39 0.433333337 0.160580724 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.0130005628 0.75 0.0220202189 0 0.3838384 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 -42 0.466666669 0.228780136 0.8125 0.0861408561 0 0.454545468 Local-gov Bachelors Married-spouse-absent Prof-specialty Not-in-family White Female United-States 1 -35 0.3888889 0.06954917 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -39 0.433333337 0.0534321629 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 -40 0.444444448 0.0909648761 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -66 0.733333349 0.0961288661 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Handlers-cleaners Unmarried White Female Puerto-Rico 0 -30 0.333333343 0.127007723 0.3125 0 0 0.4040404 Federal-gov 9th Married-civ-spouse Tech-support Husband White Male United-States 0 -43 0.477777779 0.0386083424 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 -47 0.5222222 0.120097257 0.3125 0 0 0.5050505 Private 9th Never-married Other-service Unmarried White Female United-States 0 -45 0.5 0.11187879 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female Philippines 0 -31 0.344444454 0.0357256159 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male Trinadad&Tobago 0 -33 0.366666675 0.104628868 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.02397446 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -28 0.311111122 0.289287776 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -50 0.5555556 0.107543252 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -63 0.7 0.101845153 0.25 0 0 0.4040404 Private 7th-8th Divorced Sales Not-in-family White Female United-States 0 -28 0.311111122 0.125810847 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -38 0.422222227 0.13783209 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Unmarried Black Female United-States 0 -52 0.5777778 0.0587355755 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -38 0.422222227 0.0760063455 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 1 -41 0.455555558 0.07227429 0.5625 0.0217402168 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -50 0.5555556 0.142330632 0.875 0 0 0.3838384 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -59 0.655555546 0.123664975 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -32 0.355555564 0.138337255 0.5625 0 0 0.4949495 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -73 0.811111152 0.156846642 0.25 0.0222802218 0 0.1010101 Local-gov 7th-8th Married-civ-spouse Protective-serv Husband White Male United-States 0 -52 0.5777778 0.0680384338 0.5625 0 0 0.3838384 Self-emp-inc HS-grad Divorced Exec-managerial Unmarried White Male United-States 0 -57 0.6333333 0.07711633 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.123861648 0.6875 0.07298073 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.110406443 0.8125 0 0 0.565656543 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 -22 0.244444445 0.209983811 0.4375 0 0 0.353535354 Private 11th Widowed Sales Own-child Black Female United-States 0 -49 0.544444442 0.126846746 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.179950908 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -46 0.51111114 0.0244008079 0.5625 0 0.43663913 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.134531111 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -52 0.5777778 0.124878012 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male ? 0 -43 0.477777779 0.138841718 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -25 0.2777778 0.189979151 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -31 0.344444454 0.223868713 0.25 0 0 0.4040404 Private 7th-8th Never-married Craft-repair Not-in-family White Male United-States 0 -19 0.211111113 0.281755626 0.625 0 0 0.363636374 Private Some-college Never-married Sales Own-child White Male United-States 0 -19 0.211111113 0.177367225 0.625 0 0 0.454545468 ? Some-college Never-married ? Own-child White Male United-States 0 -51 0.566666663 0.10705696 0.5625 0 0 0.8484849 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -51 0.566666663 0.14920944 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 -22 0.244444445 0.136673614 0.5625 1 0 0.4040404 Self-emp-not-inc HS-grad Never-married Prof-specialty Unmarried White Female Dominican-Republic 1 -37 0.411111116 0.0800893158 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -19 0.211111113 0.192946747 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 -45 0.5 0.1292607 0.5625 0 0 0.5555556 Private HS-grad Divorced Transport-moving Unmarried White Female United-States 0 -21 0.233333334 0.09615783 0.625 0 0 0.1010101 State-gov Some-college Never-married Other-service Own-child White Male United-States 0 -52 0.5777778 0.133860931 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -46 0.51111114 0.183726743 0.625 0 0 0.24242425 Local-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -42 0.466666669 0.147876516 0.875 0 0 0.3838384 State-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -56 0.622222245 0.175948754 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.04330288 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -58 0.644444466 0.210230991 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 -70 0.7777778 0.0206862651 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -30 0.333333343 0.165985167 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Male United-States 0 -45 0.5 0.227725372 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 0 -23 0.25555557 0.153729528 0.625 0 0 0.444444448 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -34 0.377777785 0.0420709848 0.625 0 0.3624885 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -38 0.422222227 0.02128571 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Wife White Female United-States 0 -24 0.266666681 0.111169562 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.08191392 0.25 0 0 0.4040404 Private 7th-8th Never-married Transport-moving Not-in-family Amer-Indian-Eskimo Male United-States 0 -45 0.5 0.184005573 0.5625 0.0332503319 0 0.4040404 Federal-gov HS-grad Never-married Transport-moving Not-in-family Black Male United-States 0 -21 0.233333334 0.110234022 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -21 0.233333334 0.362576425 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female Puerto-Rico 0 -34 0.377777785 0.1604669 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -32 0.355555564 0.164790317 0.5625 0.05178052 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.0887792557 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -63 0.7 0.15610981 0.875 0 0 0.3030303 ? Masters Married-civ-spouse ? Husband White Male United-States 0 -23 0.25555557 0.105614923 0.3125 0 0 0.363636374 Private 9th Never-married Handlers-cleaners Own-child Black Male United-States 0 -28 0.311111122 0.159534052 0.8125 0 0 0.5050505 Private Bachelors Divorced Craft-repair Unmarried White Male United-States 0 -29 0.322222233 0.15480651 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Never-married Transport-moving Unmarried Black Male United-States 0 -25 0.2777778 0.128009945 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -44 0.4888889 0.037095584 0.875 0 0 0.6060606 State-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -18 0.2 0.102744319 0.5625 0 0 0.08080808 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -26 0.2888889 0.103343092 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -47 0.5222222 0.115238383 0.75 0 0 0.353535354 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 -23 0.25555557 0.161191627 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -46 0.51111114 0.09362062 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -61 0.677777767 0.06428887 0.8125 0.05178052 0 0.5050505 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.118892305 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -38 0.422222227 0.0487221368 0.5625 0 0 0.545454562 Local-gov HS-grad Married-civ-spouse Protective-serv Husband Asian-Pac-Islander Male United-States 1 -60 0.6666667 0.260160118 0.8125 0 0 0.151515156 ? Bachelors Married-spouse-absent ? Unmarried Black Female United-States 0 -23 0.25555557 0.1587669 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -36 0.4 0.08680782 0.5625 0 0 0.4848485 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -46 0.51111114 0.126103163 0.3125 0 0 0.25252524 Private 9th Divorced Other-service Not-in-family White Male United-States 0 -32 0.355555564 0.200936884 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.1169303 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.152727991 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 -31 0.344444454 0.106342338 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.115249157 0.8125 0 0 0.373737365 State-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -21 0.233333334 0.08507684 0.625 0 0 0.1010101 Private Some-college Never-married Other-service Own-child White Male United-States 0 -63 0.7 0.117207125 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 1 -44 0.4888889 0.0975129753 0.625 0 0 0.454545468 Private Some-college Separated Exec-managerial Not-in-family White Male United-States 1 -42 0.466666669 0.13573201 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.0154683935 0.8125 0 0 0.353535354 ? Bachelors Never-married ? Own-child White Male United-States 0 -30 0.333333343 0.268799543 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.190072775 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male El-Salvador 0 -42 0.466666669 0.06910868 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -44 0.4888889 0.166270077 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Wife White Female Italy 1 -27 0.3 0.342381835 0.8125 0 0 0.4848485 Federal-gov Bachelors Never-married Exec-managerial Not-in-family Black Male United-States 0 -27 0.3 0.17742987 0.625 0 0 0.4040404 Local-gov Some-college Never-married Exec-managerial Unmarried White Male United-States 0 -22 0.244444445 0.1587743 0.5625 0 0 0.454545468 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -68 0.75555557 0.07268111 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -55 0.6111111 0.1242166 0.625 0 0 1 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -22 0.244444445 0.09635719 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Other-service Own-child White Male Greece 0 -25 0.2777778 0.134400442 0.625 0 0 0.151515156 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -68 0.75555557 0.13269639 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -62 0.6888889 0.100772209 0.625 0 0 0.161616161 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 0 -26 0.2888889 0.0226374939 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Other-relative White Male United-States 0 -34 0.377777785 0.129319966 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -68 0.75555557 0.0456595756 0.625 0 0 0.4040404 Private Some-college Widowed Sales Not-in-family White Male United-States 0 -42 0.466666669 0.299980134 0.8125 0 0 0.454545468 Local-gov Bachelors Separated Exec-managerial Not-in-family White Male United-States 1 -45 0.5 0.07562647 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.105912626 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Not-in-family White Male United-States 0 -25 0.2777778 0.07400258 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.08071502 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -29 0.322222233 0.100991778 0.625 0 0.365013778 0.4040404 Private Some-college Never-married Other-service Not-in-family Other Male ? 0 -65 0.722222269 0.0181935132 0.25 0 0 0.5050505 Without-pay 7th-8th Widowed Farming-fishing Unmarried White Female United-States 0 -31 0.344444454 0.0617402121 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -26 0.2888889 0.1820402 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.120745204 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.108990677 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -45 0.5 0.228786871 0.875 0.01506015 0 0.454545468 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -26 0.2888889 0.148108214 0.875 0 0 0.5050505 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -26 0.2888889 0.0617516637 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.127186209 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -38 0.422222227 0.125981927 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.129188627 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 -52 0.5777778 0.121203206 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 0 -39 0.433333337 0.218508065 0.125 0 0 0.454545468 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -41 0.455555558 0.04487895 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -42 0.466666669 0.08198127 0.875 0 0.43663913 0.6060606 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.109135486 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -28 0.311111122 0.147497311 0.6875 0 0 0.464646459 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband Black Male United-States 0 -25 0.2777778 0.08477307 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -35 0.3888889 0.151767522 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.081111066 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -38 0.422222227 0.0806497 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Craft-repair Husband Black Male United-States 1 -44 0.4888889 0.0215531029 0.625 0 0 0.181818187 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -21 0.233333334 0.08368127 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -27 0.3 0.187633917 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 -30 0.333333343 0.155063808 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -30 0.333333343 0.137652934 0.8125 0 0.3996786 0.4848485 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -45 0.5 0.12688446 0.5625 0 0.373737365 0.454545468 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -20 0.222222224 0.111080654 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -57 0.6333333 0.131457761 0.875 0 0 0.8080808 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -43 0.477777779 0.112305142 0.625 0 0 0.4848485 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 -50 0.5555556 0.105076768 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Own-child Black Female United-States 0 -28 0.311111122 0.109483704 0.25 0 0 0.4848485 Private 7th-8th Married-civ-spouse Machine-op-inspct Other-relative Asian-Pac-Islander Female China 0 -25 0.2777778 0.14227137 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Tech-support Other-relative White Female United-States 1 -25 0.2777778 0.11449413 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -90 1 0.1494115 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.172057077 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Unmarried Black Male United-States 0 -35 0.3888889 0.01896673 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Exec-managerial Unmarried White Female United-States 0 -50 0.5555556 0.107239485 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male Canada 1 -26 0.2888889 0.069473736 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.11125847 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -56 0.622222245 0.0214062724 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.167778119 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Protective-serv Unmarried Black Female United-States 0 -46 0.51111114 0.163796857 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -18 0.2 0.103323556 0.4375 0 0 0.25252524 Local-gov 11th Never-married Adm-clerical Other-relative White Female United-States 0 -37 0.411111116 0.2222529 0.875 0 0.5544077 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -57 0.6333333 0.11859528 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -43 0.477777779 0.147195578 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -29 0.322222233 0.204381347 0.8125 0 0 0.25252524 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male Nicaragua 0 -40 0.444444448 0.06910868 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.325452536 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -77 0.8555556 0.0973984748 0.5625 0 0 0.0606060624 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.152227551 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 -21 0.233333334 0.111453116 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -66 0.733333349 0.177568614 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Protective-serv Husband White Male United-States 0 -40 0.444444448 0.135713831 0.4375 0 0 0.353535354 Private 11th Never-married Transport-moving Own-child White Male United-States 0 -68 0.75555557 0.1439478 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -64 0.7111111 0.11482618 0.5625 0 0 0.3838384 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -26 0.2888889 0.144340456 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -32 0.355555564 0.128315732 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.163096383 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -51 0.566666663 0.1076005 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.09943322 0.875 0.1502415 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.180522054 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.127103373 0.8125 0 0 0.2020202 Private Bachelors Never-married Transport-moving Unmarried White Male United-States 0 -29 0.322222233 0.304575652 0.5625 0 0 0.363636374 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -21 0.233333334 0.175689444 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Male United-States 0 -28 0.311111122 0.196250439 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -55 0.6111111 0.127926424 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.0902327448 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male South 1 -35 0.3888889 0.2227136 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -31 0.344444454 0.452892661 0.4375 0 0 0.4040404 ? 11th Separated ? Not-in-family Black Male United-States 0 -26 0.2888889 0.08284407 0.875 0.0861408561 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -30 0.333333343 0.0750418454 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Other-service Husband White Male Germany 0 -33 0.366666675 0.146315262 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.08214157 0.8125 0.135501355 0 0.4040404 Private Bachelors Married-spouse-absent Prof-specialty Not-in-family Asian-Pac-Islander Male Cambodia 1 -23 0.25555557 0.0809399858 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -35 0.3888889 0.231293768 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -48 0.533333361 0.07057968 0.4375 0 0 0.5050505 Self-emp-not-inc 11th Married-civ-spouse Farming-fishing Husband White Male United-States 1 -39 0.433333337 0.318950236 0.375 0 0 0.4040404 Local-gov 10th Divorced Handlers-cleaners Own-child Black Male United-States 0 -53 0.5888889 0.175190359 0.9375 0 0 0.5050505 Local-gov Prof-school Divorced Prof-specialty Not-in-family White Female United-States 0 -49 0.544444442 0.113310054 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -31 0.344444454 0.2347207 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family Black Female United-States 0 -36 0.4 0.0162362214 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -60 0.6666667 0.133058757 0.625 0.07688077 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.2836018 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -54 0.6 0.09352161 0.625 0 0 0.454545468 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.114252329 0.75 0 0 0.0303030312 ? Assoc-acdm Married-AF-spouse ? Wife White Female United-States 0 -34 0.377777785 0.255547076 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.122577891 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family Black Female United-States 0 -19 0.211111113 0.246271148 0.5625 0 0 0.454545468 Private HS-grad Never-married Priv-house-serv Not-in-family White Female ? 0 -26 0.2888889 0.159334019 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -47 0.5222222 0.24477455 0.625 0 0 0.7070707 Private Some-college Never-married Sales Not-in-family White Male United-States 1 -50 0.5555556 0.07567228 0.5625 0 0 0.3838384 Private HS-grad Divorced Exec-managerial Unmarried White Male United-States 0 -30 0.333333343 0.1378752 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Unmarried White Female United-States 1 -44 0.4888889 0.03678239 0.625 0 0 0.5050505 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -49 0.544444442 0.08630132 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -75 0.8333334 0.0206094813 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.255621165 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -51 0.566666663 0.132352218 0.5625 0 0 0.3838384 State-gov HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -35 0.3888889 0.05560162 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -28 0.311111122 0.0700637549 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Female United-States 0 -66 0.733333349 0.197422385 0.5625 0.01409014 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -72 0.8 0.04993652 0.3125 0 0 0.4848485 Private 9th Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female United-States 1 -39 0.433333337 0.1295456 0.8125 0 0 0.5050505 Private Bachelors Separated Sales Not-in-family White Male United-States 0 -27 0.3 0.176787987 0.5625 0 0 0.3030303 Private HS-grad Never-married Farming-fishing Own-child Black Male United-States 0 -57 0.6333333 0.124652378 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative Black Female Jamaica 0 -24 0.266666681 0.199396521 0.25 0.0263502635 0 0.3838384 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.166090235 0.5625 0 0 0.7070707 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -23 0.25555557 0.03668877 0.625 0 0 0.5050505 Private Some-college Married-spouse-absent Other-service Not-in-family White Female United-States 0 -31 0.344444454 0.222983688 0.8125 0 0.323232323 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -23 0.25555557 0.108915918 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -31 0.344444454 0.178443536 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -27 0.3 0.07647647 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.14294894 0.8125 0 0.399449021 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -31 0.344444454 0.114790484 0.9375 0 0 0.8080808 Private Prof-school Never-married Prof-specialty Not-in-family White Female ? 0 -34 0.377777785 0.117064334 0.875 0.0486504845 0 0.6060606 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -57 0.6333333 0.249807209 0.5625 0 0.518365443 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -39 0.433333337 0.340215057 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male Cuba 1 -23 0.25555557 0.1300521 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -24 0.266666681 0.0225176048 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Other-service Wife White Female United-States 0 -36 0.4 0.06944814 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male England 0 -32 0.355555564 0.108009338 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Other-relative White Male Nicaragua 0 -35 0.3888889 0.1378193 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Other-service Own-child White Female United-States 0 -36 0.4 0.0237818286 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.103975542 0.8125 0 0 0.5050505 ? Bachelors Never-married ? Not-in-family White Female United-States 0 -47 0.5222222 0.131185666 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -35 0.3888889 0.104000457 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -44 0.4888889 0.148556784 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -32 0.355555564 0.170642659 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -32 0.355555564 0.142586574 0.75 0 0.3409091 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 -63 0.7 0.1128177 0.625 0.200512 0 0.1010101 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -34 0.377777785 0.154732421 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.124917075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -27 0.3 0.226148635 0.4375 0 0 0.353535354 Private 11th Married-civ-spouse Sales Own-child Black Male United-States 0 -23 0.25555557 0.309856832 0.5625 0 0 0.424242437 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 -19 0.211111113 0.022554649 0.625 0 0 0.4040404 ? Some-college Never-married ? Other-relative Amer-Indian-Eskimo Female United-States 0 -50 0.5555556 0.119164415 0.375 0 0 0.3838384 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.14366962 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -36 0.4 0.056504827 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.130734384 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried White Male United-States 0 -61 0.677777767 0.160712734 0.25 0 0 0.3838384 Private 7th-8th Widowed Other-service Unmarried Black Female United-States 0 -41 0.455555558 0.0765114948 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.140368626 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -53 0.5888889 0.184904069 0.8125 0 0 0.7070707 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -17 0.188888893 0.0404902 0.375 0 0 0.1010101 Self-emp-not-inc 10th Never-married Adm-clerical Own-child White Male United-States 0 -23 0.25555557 0.132562369 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Not-in-family White Male United-States 0 -53 0.5888889 0.112054586 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.2047235 0.5625 0 0.4242424 0.424242437 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.0669399 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Prof-specialty Own-child White Female United-States 0 -22 0.244444445 0.127007723 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -53 0.5888889 0.203992039 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.1908406 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Other-relative Black Male United-States 0 -24 0.266666681 0.157456875 0.625 0 0 0.5050505 Private Some-college Never-married Sales Unmarried White Male Mexico 0 -20 0.222222224 0.114526458 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -30 0.333333343 0.17600736 0.25 0 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.247346789 0.6875 0.0861408561 0 0.4040404 State-gov Assoc-voc Never-married Prof-specialty Not-in-family White Male United-States 1 -34 0.377777785 0.0854297653 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.238501251 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -20 0.222222224 0.118758276 0.5 0 0 0.4040404 Private 12th Never-married Adm-clerical Own-child White Female Mexico 0 -47 0.5222222 0.0573373176 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Asian-Pac-Islander Female United-States 0 -20 0.222222224 0.253568232 0.625 0 0 0.323232323 ? Some-college Never-married ? Own-child White Male United-States 0 -22 0.244444445 0.04210062 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -42 0.466666669 0.07493206 0.875 0 0.453856736 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -60 0.6666667 0.105670154 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.370060056 0.5625 0 0 0.4040404 Private HS-grad Never-married Priv-house-serv Unmarried White Female Mexico 0 -46 0.51111114 0.0200012811 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -66 0.733333349 0.0665701255 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.058024995 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Other-service Wife Asian-Pac-Islander Female United-States 1 -34 0.377777785 0.138068512 0.625 0 0 0.444444448 Private Some-college Divorced Exec-managerial Own-child White Male United-States 0 -45 0.5 0.250478059 0.8125 0 0 0.464646459 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -35 0.3888889 0.06978154 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -63 0.7 0.03694404 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -51 0.566666663 0.0896137655 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -36 0.4 0.08524859 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -25 0.2777778 0.09716341 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 -51 0.566666663 0.108763695 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -25 0.2777778 0.205730438 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -19 0.211111113 0.08419855 0.5625 0 0 0.454545468 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -47 0.5222222 0.204844058 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -59 0.655555546 0.08123971 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Protective-serv Unmarried Black Female United-States 0 -34 0.377777785 0.106248043 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.20030646 0.625 0 0 0.6060606 Private Some-college Separated Exec-managerial Unmarried White Female United-States 0 -42 0.466666669 0.0816909745 0.5625 0 0 0.454545468 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -28 0.311111122 0.207780674 0.5625 0 0 0.171717167 ? HS-grad Married-civ-spouse ? Wife White Female Honduras 0 -37 0.411111116 0.0330806449 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.140298575 0.75 0 0 0.3838384 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -25 0.2777778 0.204776034 0.5625 0 0 0.363636374 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -31 0.344444454 0.139624372 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -37 0.411111116 0.082986854 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -42 0.466666669 0.02257755 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -29 0.322222233 0.276385546 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Not-in-family White Male United-States 0 -35 0.3888889 0.276172042 0.625 0 0 0.5050505 Private Some-college Divorced Sales Not-in-family White Male United-States 0 -51 0.566666663 0.118096866 0.8125 0 0 0.474747479 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.0188165326 0.625 0 0 0.363636374 ? Some-college Never-married ? Own-child White Male United-States 0 -49 0.544444442 0.113295913 0.625 0 0.3409091 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.0846498162 0.8125 0 0 0.161616161 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male Japan 0 -56 0.622222245 0.10832388 0.5625 0 0 0.464646459 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -52 0.5777778 0.179516479 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -61 0.677777767 0.07747196 0.875 0 0 0.04040404 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male ? 0 -47 0.5222222 0.150972083 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 -52 0.5777778 0.101656564 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.23149313 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -43 0.477777779 0.116404273 0.625 1 0 0.5555556 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.110050149 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male ? 0 -17 0.188888893 0.069919616 0.5 0 0 0.4040404 ? 12th Never-married ? Own-child White Male United-States 0 -42 0.466666669 0.144015819 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.142294258 0.625 0 0 0.353535354 Private Some-college Married-spouse-absent Craft-repair Other-relative Black Female Dominican-Republic 0 -58 0.644444466 0.108160213 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -66 0.733333349 0.09864182 0.625 0.0555605553 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.136914074 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -46 0.51111114 0.208724976 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 -45 0.5 0.0178634822 0.625 0 0.43663913 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -57 0.6333333 0.06991894 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Female United-States 0 -25 0.2777778 0.0608141 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -21 0.233333334 0.1224223 0.625 0 0 0.1010101 State-gov Some-college Never-married Tech-support Own-child White Female United-States 0 -37 0.411111116 0.0237959735 0.5625 0 0.383149683 0.5555556 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -45 0.5 0.09144982 0.875 0 0 0.3030303 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -61 0.677777767 0.126740336 1 0 0 0.05050505 ? Doctorate Widowed ? Not-in-family White Female United-States 0 -39 0.433333337 0.120952651 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -42 0.466666669 0.130413786 0.5625 0 0 0.535353541 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -20 0.222222224 0.07333915 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -23 0.25555557 0.134080514 0.5625 0 0 0.161616161 Private HS-grad Never-married Protective-serv Own-child Black Male United-States 0 -25 0.2777778 0.29742676 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 -47 0.5222222 0.124774955 0.1875 0 0 0.4040404 Private 5th-6th Never-married Priv-house-serv Own-child White Female El-Salvador 0 -24 0.266666681 0.07362203 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Own-child White Male United-States 0 -20 0.222222224 0.055130817 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child Asian-Pac-Islander Female United-States 0 -35 0.3888889 0.0159095582 0.5625 0 0 0.7070707 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.09778239 0.5625 0 0 0.3838384 Local-gov HS-grad Married-civ-spouse Other-service Wife Black Female Jamaica 1 -47 0.5222222 0.0205933172 0.625 0 0 0.5050505 State-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -28 0.311111122 0.0879770741 0.4375 0 0 0.4040404 State-gov 11th Separated Adm-clerical Unmarried Asian-Pac-Islander Female India 0 -41 0.455555558 0.0149221569 0.875 0 0 0.6060606 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -31 0.344444454 0.07168899 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.0537392944 0.875 0 0 0.25252524 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -47 0.5222222 0.220149457 0.6875 0.0501305 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.055130817 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family Asian-Pac-Islander Female United-States 0 -61 0.677777767 0.08145255 0.625 0 0 0.4040404 Private Some-college Never-married Priv-house-serv Not-in-family White Female United-States 0 -42 0.466666669 0.103147089 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Other-relative White Female Puerto-Rico 0 -46 0.51111114 0.0186360255 0.5625 0 0 0.282828271 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.07102017 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.114356056 0.875 0 0 0.3838384 Local-gov Masters Widowed Prof-specialty Unmarried White Female United-States 0 -49 0.544444442 0.08250326 0.5625 0 0 0.4040404 Private HS-grad Widowed Tech-support Unmarried White Male United-States 0 -56 0.622222245 0.16344662 0.625 0 0 0.4040404 Local-gov Some-college Widowed Adm-clerical Unmarried White Female United-States 0 -52 0.5777778 0.03699927 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Own-child White Female United-States 0 -34 0.377777785 0.140982226 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male Puerto-Rico 0 -25 0.2777778 0.190361723 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.0660360157 0.4375 0 0 0.4040404 Private 11th Never-married Prof-specialty Own-child White Female United-States 0 -58 0.644444466 0.126278967 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.0405373462 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -29 0.322222233 0.0509515367 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.1354983 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -30 0.333333343 0.0130005628 0.625 0 0 0.4848485 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -21 0.233333334 0.202607259 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 -44 0.4888889 0.0987798944 0.875 0 0.4331956 0.353535354 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -75 0.8333334 0.06862441 0.375 0 0 0.7070707 Private 10th Widowed Priv-house-serv Not-in-family White Female United-States 0 -66 0.733333349 0.0793275461 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -26 0.2888889 0.0409010537 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 -33 0.366666675 0.135894343 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -57 0.6333333 0.08032101 0.875 0.1502415 0 0.656565666 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.08158119 0.1875 0 0 0.5555556 Self-emp-not-inc 5th-6th Married-civ-spouse Sales Husband White Male Italy 1 -41 0.455555558 0.1482665 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.04084246 0.625 0 0 0.373737365 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -17 0.188888893 0.1315157 0.4375 0 0 0.171717167 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -61 0.677777767 0.0764758 0.8125 0 0 0.5555556 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -47 0.5222222 0.22337772 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Wife White Female United-States 1 -22 0.244444445 0.0677488148 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child Black Female United-States 0 -47 0.5222222 0.200800836 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -45 0.5 0.1632587 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.133270249 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Divorced Sales Unmarried White Male United-States 0 -59 0.655555546 0.102361754 0.375 0 0 0.3030303 Private 10th Separated Priv-house-serv Not-in-family Black Female United-States 0 -38 0.422222227 0.186802775 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.08435952 0.5625 0 0 0.4040404 Private HS-grad Separated Protective-serv Own-child White Female United-States 0 -41 0.455555558 0.1496203 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.181984976 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.1144975 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -27 0.3 0.241903275 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -60 0.6666667 0.08351289 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -64 0.7111111 0.17921406 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.135738075 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -54 0.6 0.121036842 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.265152335 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 -34 0.377777785 0.164441422 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 1 -41 0.455555558 0.295476884 0.875 0 0 0.05050505 Self-emp-not-inc Masters Divorced Sales Unmarried White Male United-States 1 -35 0.3888889 0.1398042 0.25 0 0 0.75757575 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -63 0.7 0.0364058875 0.875 0 0 0.686868668 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -46 0.51111114 0.126342267 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative White Male United-States 0 -47 0.5222222 0.051930856 0.875 0 0 0.4040404 Self-emp-not-inc Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -24 0.266666681 0.2377644 0.8125 0 0 0.656565666 Private Bachelors Never-married Machine-op-inspct Not-in-family White Male United-States 0 -29 0.322222233 0.0364590958 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -74 0.822222233 0.026867291 0.625 0 0 0.181818187 Federal-gov Some-college Widowed Transport-moving Not-in-family White Female United-States 0 -50 0.5555556 0.10566207 0.4375 0 0 0.7070707 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 1 -22 0.244444445 0.239566788 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -48 0.533333361 0.2021735 0.5 0 0 0.4040404 Private 12th Separated Adm-clerical Own-child Black Female United-States 0 -30 0.333333343 0.32916978 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Other-relative White Male Mexico 0 -32 0.355555564 0.105938219 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.1243742 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -49 0.544444442 0.144250214 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -25 0.2777778 0.129418984 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -50 0.5555556 0.09244463 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -44 0.4888889 0.251262039 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -65 0.722222269 0.0608720258 0.6875 0.06767067 0 0.6060606 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -28 0.311111122 0.123358518 0.75 0 0 0.6060606 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 -55 0.6111111 0.152998745 0.8125 0 0 0.4040404 Private Bachelors Widowed Adm-clerical Unmarried White Female United-States 0 -49 0.544444442 0.0229143165 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -31 0.344444454 0.111232877 0.5625 0 0 0.121212125 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 -47 0.5222222 0.1425657 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female United-States 1 -45 0.5 0.241722092 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -35 0.3888889 0.03213231 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -34 0.377777785 0.206762969 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male South 0 -49 0.544444442 0.0354211777 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Protective-serv Not-in-family Black Male United-States 0 -39 0.433333337 0.120799758 0.625 0 0 0.353535354 ? Some-college Divorced ? Not-in-family White Female United-States 0 -27 0.3 0.106523521 0.5625 0 0 0.424242437 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -42 0.466666669 0.04718446 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -60 0.6666667 0.08880687 0.1875 0 0 0.3030303 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 1 -64 0.7111111 0.119771272 0.5625 0.010550105 0 0.4040404 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family White Male United-States 0 -33 0.366666675 0.08568369 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.11799179 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.0958352 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.149069354 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -53 0.5888889 0.1532978 0.5625 0 0 0.373737365 Private HS-grad Divorced Sales Not-in-family White Female Mexico 0 -22 0.244444445 0.1538703 0.375 0 0 0.3030303 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 -57 0.6333333 0.0265237875 0.5625 0 0 0.353535354 State-gov HS-grad Separated Other-service Not-in-family White Female United-States 0 -20 0.222222224 0.0652399 0.625 0 0 0.08080808 ? Some-college Never-married ? Own-child White Female United-States 0 -23 0.25555557 0.226550058 0.25 0 0 0.4040404 Private 7th-8th Never-married Craft-repair Own-child Black Male United-States 0 -31 0.344444454 0.173532113 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Unmarried White Male United-States 0 -23 0.25555557 0.158855125 0.8125 0 0 0.222222224 State-gov Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -30 0.333333343 0.182242945 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -32 0.355555564 0.150130838 0.8125 0 0 0.5050505 Local-gov Bachelors Separated Prof-specialty Not-in-family White Female United-States 1 -42 0.466666669 0.06685099 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife Black Female United-States 1 -51 0.566666663 0.151385635 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male Cuba 0 -59 0.655555546 0.117232718 0.8125 0.1502415 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.0857449844 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -45 0.5 0.228669 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family Black Male United-States 0 -35 0.3888889 0.120106019 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male Germany 1 -33 0.366666675 0.1278658 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -43 0.477777779 0.108314447 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -60 0.6666667 0.139869541 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Wife White Female United-States 1 -37 0.411111116 0.10803628 0.8125 0 0 0.5555556 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.114678 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Unmarried White Female United-States 0 -36 0.4 0.1243742 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -38 0.422222227 0.227870181 0.9375 0 0.453856736 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -54 0.6 0.0680384338 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.137617916 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -45 0.5 0.162557542 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -63 0.7 0.146826476 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -51 0.566666663 0.08630873 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -58 0.644444466 0.110503435 0.875 0 0 0.181818187 Self-emp-not-inc Masters Divorced Sales Not-in-family White Male United-States 0 -64 0.7111111 0.05311897 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -20 0.222222224 0.1594721 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -44 0.4888889 0.161337778 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 -39 0.433333337 0.02291903 0.8125 0 0 0.4848485 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -45 0.5 0.139992118 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -44 0.4888889 0.118498288 1 0 0 0.5555556 Private Doctorate Married-civ-spouse Adm-clerical Husband White Male United-States 1 -22 0.244444445 0.147130236 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -63 0.7 0.145370975 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.105728753 0.6875 0 0 0.4040404 Private Assoc-voc Separated Other-service Not-in-family Black Male United-States 0 -42 0.466666669 0.148613364 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -20 0.222222224 0.147061542 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -29 0.322222233 0.16261211 0.875 0.07298073 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.08350682 0.8125 0 0.3996786 0.4040404 Local-gov Bachelors Never-married Exec-managerial Unmarried Asian-Pac-Islander Male Vietnam 0 -25 0.2777778 0.04936267 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -27 0.3 0.275221676 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Other-relative White Male United-States 0 -46 0.51111114 0.113948561 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.0369965769 0.625 0 0 0.6060606 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -24 0.266666681 0.206626236 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Exec-managerial Own-child White Male United-States 0 -43 0.477777779 0.107461751 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.324698865 0.5 0 0 0.212121218 Private 12th Never-married Machine-op-inspct Own-child White Male Mexico 0 -32 0.355555564 0.1926989 0.5625 0 0 0.373737365 Local-gov HS-grad Never-married Transport-moving Unmarried Black Female United-States 0 -44 0.4888889 0.113123484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Poland 0 -40 0.444444448 0.140795648 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.07073257 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -23 0.25555557 0.0187080931 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Not-in-family White Male United-States 0 -19 0.211111113 0.163629144 0.625 0 0.3677686 0.1010101 Private Some-college Never-married Sales Own-child White Female United-States 0 -41 0.455555558 0.08005159 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -48 0.533333361 0.08053115 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.132569775 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.185465127 0.75 0 0 0.353535354 Private Assoc-acdm Widowed Other-service Own-child White Female United-States 0 -42 0.466666669 0.151675254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.222120225 0.375 0 0 0.1010101 Private 10th Never-married Sales Other-relative White Female United-States 0 -29 0.322222233 0.07234501 0.9375 0 0 0.7070707 Local-gov Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 -21 0.233333334 0.174101934 0.625 0 0 0.2020202 State-gov Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -18 0.2 0.0809878 0.4375 0 0 0.272727281 ? 11th Never-married ? Own-child White Male United-States 0 -31 0.344444454 0.147846878 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 1 -27 0.3 0.0196496956 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 -29 0.322222233 0.0269972831 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male Canada 0 -23 0.25555557 0.058953125 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -41 0.455555558 0.07838527 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 -46 0.51111114 0.145627588 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.18054159 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Protective-serv Other-relative Black Female Haiti 0 -42 0.466666669 0.08198127 0.5625 0 0 0.24242425 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.135987282 0.5625 0 0.3946281 0.151515156 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -46 0.51111114 0.0734752044 0.5625 0 0 0.373737365 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -18 0.2 0.233300224 0.4375 0 0 0.151515156 ? 11th Never-married ? Own-child White Male United-States 0 -52 0.5777778 0.191370681 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -56 0.622222245 0.0963356346 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -21 0.233333334 0.143206224 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Own-child White Male United-States 0 -22 0.244444445 0.134040773 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -31 0.344444454 0.08008392 0.8125 0 0 0.454545468 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 -41 0.455555558 0.08746856 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -25 0.2777778 0.106351092 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.23529321 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -45 0.5 0.106879823 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Not-in-family White Female United-States 0 -26 0.2888889 0.260378331 0.625 0 0 0.6060606 Private Some-college Divorced Tech-support Not-in-family White Male United-States 0 -90 1 0.0352837779 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Male United-States 0 -45 0.5 0.1662896 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.12823087 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Wife White Female United-States 1 -42 0.466666669 0.0255060773 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.146700531 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -53 0.5888889 0.100884691 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -64 0.7111111 0.135577783 0.5625 0 0 0.3838384 State-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -56 0.622222245 0.08672699 0.25 0 0 0.2020202 Private 7th-8th Widowed Transport-moving Not-in-family White Male United-States 0 -42 0.466666669 0.01848448 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Prof-specialty Not-in-family White Male United-States 1 -26 0.2888889 0.0420541465 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 -31 0.344444454 0.102192692 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Adm-clerical Own-child Amer-Indian-Eskimo Female United-States 0 -40 0.444444448 0.0200989433 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 -58 0.644444466 0.08864253 0.625 0 0 0.4040404 Private Some-college Widowed Craft-repair Not-in-family White Male United-States 0 -41 0.455555558 0.0744673163 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -58 0.644444466 0.128335938 0.5625 0 0 0.474747479 Self-emp-inc HS-grad Never-married Sales Not-in-family White Male United-States 0 -62 0.6888889 0.02232228 0.875 0 0 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -65 0.722222269 0.09380449 0.8125 1 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.158033416 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -45 0.5 0.160561189 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -22 0.244444445 0.310388267 0.5625 0 0 0.5555556 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -23 0.25555557 0.163796857 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child Asian-Pac-Islander Male China 0 -63 0.7 0.0659087151 0.875 0 0 0.5050505 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.05196049 0.8125 0 0.4331956 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.135288164 0.625 0 0 0.4040404 Private Some-college Widowed Craft-repair Unmarried White Male United-States 0 -25 0.2777778 0.0276869815 0.8125 0 0 0.4040404 ? Bachelors Married-spouse-absent ? Not-in-family White Male Canada 0 -56 0.622222245 0.0521416739 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -32 0.355555564 0.159472764 0.625 0 0 0.5050505 Private Some-college Divorced Sales Not-in-family White Male United-States 0 -53 0.5888889 0.116584107 0.625 0 0.4331956 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female Philippines 1 -32 0.355555564 0.158364117 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Not-in-family White Male United-States 0 -23 0.25555557 0.190343544 0.4375 0.07688077 0 0.6060606 Self-emp-not-inc 11th Married-civ-spouse Transport-moving Husband White Male United-States 1 -35 0.3888889 0.134227335 0.4375 0 0 0.909090936 Private 11th Separated Transport-moving Not-in-family White Male United-States 0 -51 0.566666663 0.129088953 0.625 0 0.4331956 0.656565666 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.02915394 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -41 0.455555558 0.108329266 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Machine-op-inspct Not-in-family White Male Guatemala 0 -22 0.244444445 0.155299544 0.375 0 0 0.25252524 Private 10th Never-married Transport-moving Own-child White Male United-States 0 -23 0.25555557 0.118661962 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Own-child White Female United-States 0 -36 0.4 0.07837112 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Taiwan 1 -27 0.3 0.170992225 0.625 0 0 0.25252524 ? Some-college Divorced ? Not-in-family White Female United-States 0 -45 0.5 0.07259826 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Canada 0 -23 0.25555557 0.3499867 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male Mexico 0 -21 0.233333334 0.128954917 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Unmarried Black Female United-States 0 -44 0.4888889 0.133549765 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.144714266 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.04369555 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -18 0.2 0.454919338 0.3125 0.005940059 0 0.4040404 Private 9th Never-married Handlers-cleaners Own-child White Male United-States 0 -62 0.6888889 0.09077089 0.5 0 0 0.4040404 Self-emp-not-inc 12th Married-civ-spouse Craft-repair Husband White Male United-States 1 -25 0.2777778 0.139651984 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Exec-managerial Not-in-family Black Male United-States 0 -34 0.377777785 0.04366524 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 -31 0.344444454 0.148222044 0.8125 0.143441439 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 -37 0.411111116 0.05558074 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.119020954 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male England 0 -22 0.244444445 0.146440536 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 -28 0.311111122 0.07536851 0.75 0 0 0.3030303 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.1326479 0.625 0 0 0.25252524 ? Some-college Separated ? Own-child White Male United-States 0 -47 0.5222222 0.32463488 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -67 0.7444445 0.124271154 0.4375 0 0.09618916 0.0303030312 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -20 0.222222224 0.08170849 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 -34 0.377777785 0.106701337 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.172424823 0.9375 1 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.1238576 0.625 0.07298073 0 0.444444448 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.0287828222 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -22 0.244444445 0.122430384 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 -47 0.5222222 0.124566838 0.625 0 0 0.353535354 Private Some-college Separated Other-service Not-in-family Black Female United-States 0 -33 0.366666675 0.07223523 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Adm-clerical Not-in-family White Male United-States 0 -34 0.377777785 0.1450672 0.875 0.04787048 0 0.4040404 Self-emp-inc Masters Separated Prof-specialty Not-in-family White Female United-States 1 -25 0.2777778 0.08284407 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -37 0.411111116 0.5110106 0.3125 0.0378103778 0 0.5050505 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -36 0.4 0.112214886 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -61 0.677777767 0.129359037 0.8125 0 0 0.3030303 Local-gov Bachelors Separated Prof-specialty Not-in-family White Male ? 0 -74 0.822222233 0.229634181 0.3125 0.0347103477 0 0.4040404 ? 9th Married-civ-spouse ? Husband White Male United-States 0 -57 0.6333333 0.138551429 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Poland 0 -55 0.6111111 0.0454299 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male England 0 -20 0.222222224 0.163047209 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family Black Female United-States 0 -43 0.477777779 0.0872718841 0.5625 0 0 0.444444448 Private HS-grad Never-married Sales Not-in-family Black Female United-States 0 -54 0.6 0.121998645 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male England 1 -25 0.2777778 0.14299272 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 -42 0.466666669 0.0561801866 0.625 0 0.323232323 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -23 0.25555557 0.100188926 0.625 0 0 0.353535354 ? Some-college Never-married ? Not-in-family White Female United-States 0 -17 0.188888893 0.213969111 0.4375 0 0 0.1010101 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -39 0.433333337 0.0700381547 0.5625 0 0.365013778 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 -63 0.7 0.0206115022 0.25 0 0 0.4040404 Private 7th-8th Married-spouse-absent Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 -19 0.211111113 0.1164494 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -56 0.622222245 0.1426573 0.8125 0.1502415 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.2101798 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.04404242 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.135043666 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.162969753 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -30 0.333333343 0.0528926626 0.5625 0 0 0.656565666 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male Canada 1 -22 0.244444445 0.127937883 0.8125 0 0 0.5555556 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -35 0.3888889 0.07502299 0.625 0 0.3624885 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -20 0.222222224 0.162962347 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -18 0.2 0.23106207 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -25 0.2777778 0.203720614 0.5 0 0.3996786 0.4040404 Private 12th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -53 0.5888889 0.105639167 0.875 0 0.359045 0.545454562 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 -21 0.233333334 0.0536995567 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -19 0.211111113 0.03723568 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Female United-States 0 -34 0.377777785 0.343074232 0.5625 0 0 0.3030303 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -32 0.355555564 0.0794279 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 -20 0.222222224 0.09271269 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child Amer-Indian-Eskimo Male United-States 0 -70 0.7777778 0.08827343 0.25 0 0 0.25252524 Private 7th-8th Married-civ-spouse Other-service Husband White Male United-States 0 -57 0.6333333 0.233691543 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.123668343 0.625 0.031370312 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.0907500163 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -48 0.533333361 0.02458603 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.168465123 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 -45 0.5 0.222626716 0.5625 0.0332503319 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -27 0.3 0.26118052 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -51 0.566666663 0.02793417 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband White Male Mexico 0 -36 0.4 0.214838639 0.625 0 0 0.656565666 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -33 0.366666675 0.0580202825 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Asian-Pac-Islander Male Philippines 0 -50 0.5555556 0.122003362 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 -44 0.4888889 0.2197285 0.8125 0 0.5847107 0.5050505 Private Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 -39 0.433333337 0.103708148 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.0400544219 0.3125 0 0 0.25252524 Self-emp-not-inc 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -24 0.266666681 0.0856325 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -35 0.3888889 0.0918317139 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -32 0.355555564 0.236157358 0.5 0 0 0.4040404 Self-emp-not-inc 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -66 0.733333349 0.119452015 0.8125 0 0.499081731 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -68 0.75555557 0.11190708 0.5625 0 0.5064279 0.3030303 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.08184993 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.180100426 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 -61 0.677777767 0.0559336729 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.108067937 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -55 0.6111111 0.08361055 0.9375 0 0.5544077 0.353535354 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male Greece 1 -20 0.222222224 0.193763077 0.625 0 0 0.363636374 ? Some-college Never-married ? Own-child White Male United-States 0 -41 0.455555558 0.103854977 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -36 0.4 0.198778212 0.5625 0 0 0.8484849 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -60 0.6666667 0.161999181 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -61 0.677777767 0.16440101 0.5625 0 0 0.5252525 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.239946663 0.9375 0 0 0.353535354 Private Prof-school Married-civ-spouse Sales Husband Asian-Pac-Islander Male China 0 -42 0.466666669 0.197878376 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.0298429653 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -44 0.4888889 0.1417972 0.625 0 0 0.4040404 Local-gov Some-college Never-married Other-service Unmarried Black Female United-States 0 -31 0.344444454 0.102217615 0.875 0 0 0.25252524 State-gov Masters Never-married Adm-clerical Not-in-family White Male United-States 0 -39 0.433333337 0.18022503 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Not-in-family Black Male United-States 0 -20 0.222222224 0.06748007 0.625 0 0 0.24242425 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -32 0.355555564 0.07526478 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.115235686 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -61 0.677777767 0.239539176 0.3125 0 0 0.2020202 Private 9th Married-civ-spouse Machine-op-inspct Husband Black Male Trinadad&Tobago 0 -54 0.6 0.09273088 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.0477495529 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Other-relative White Male United-States 0 -19 0.211111113 0.115380496 0.5625 0 0 0.0303030312 Private HS-grad Never-married Sales Own-child White Male United-States 0 -31 0.344444454 0.06802496 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 -35 0.3888889 0.0430529974 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -29 0.322222233 0.0221572649 0.5625 0 0 0.25252524 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -29 0.322222233 0.16963236 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Not-in-family Black Female United-States 0 -25 0.2777778 0.2324509 0.375 0 0 0.25252524 Private 10th Separated Other-service Own-child White Female United-States 0 -46 0.51111114 0.0580721423 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 -35 0.3888889 0.116417065 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Other-service Unmarried White Female United-States 0 -20 0.222222224 0.115442462 0.375 0 0 0.4040404 Private 10th Never-married Sales Not-in-family Other Male United-States 0 -24 0.266666681 0.117458351 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -48 0.533333361 0.1394607 0.5625 0 0 0.373737365 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -37 0.411111116 0.196167588 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -60 0.6666667 0.151125655 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.07126871 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.121853165 0.625 0 0 0.3838384 Local-gov Some-college Separated Adm-clerical Unmarried White Female United-States 0 -31 0.344444454 0.08267569 0.6875 0 0 0.2020202 Self-emp-not-inc Assoc-voc Divorced Craft-repair Own-child White Male United-States 0 -38 0.422222227 0.0209260434 0.6875 0.04386044 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.19151482 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 -64 0.7111111 0.215107381 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.11734587 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Protective-serv Not-in-family Black Male United-States 0 -69 0.7666667 0.12390206 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -39 0.433333337 0.08605885 0.5625 0.03103031 0 0.444444448 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -48 0.533333361 0.05432123 0.5625 0 0 0.5555556 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -46 0.51111114 0.04229325 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Other-relative White Female United-States 0 -42 0.466666669 0.129124641 0.8125 0 0.365013778 0.4040404 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 -39 0.433333337 0.159985989 0.5625 0 0 0.545454562 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife Black Female Dominican-Republic 1 -50 0.5555556 0.0135912523 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Tech-support Husband White Male United-States 1 -24 0.266666681 0.209722474 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.291347444 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Other-relative White Female Canada 1 -39 0.433333337 0.2222529 0.8125 0 0.5544077 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -29 0.322222233 0.0843197852 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.230985954 0.4375 0 0 0.3838384 Private 11th Never-married Transport-moving Own-child White Female United-States 0 -21 0.233333334 0.148066461 0.6875 0 0 0.4040404 ? Assoc-voc Never-married ? Not-in-family White Male United-States 0 -32 0.355555564 0.08313369 0.375 0 0 0.4040404 Private 10th Separated Craft-repair Not-in-family White Male United-States 0 -69 0.7666667 0.0466146469 0.8125 0.03818038 0 0.3030303 Self-emp-inc Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -55 0.6111111 0.0446930528 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Unmarried White Male United-States 0 -41 0.455555558 0.13194339 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.103139684 0.8125 0.07688077 0 0.5252525 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.155502275 0.4375 0 0 0.4040404 Private 11th Never-married Adm-clerical Not-in-family White Male United-States 0 -74 0.822222233 0.0621658862 0.8125 0 0 0.1010101 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -40 0.444444448 0.124701545 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.2002391 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -75 0.8333334 0.111031488 0.3125 0.01409014 0 0.05050505 ? 9th Married-civ-spouse ? Husband Black Male United-States 0 -55 0.6111111 0.09780664 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -52 0.5777778 0.163225025 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 -54 0.6 0.162013337 0.625 0 0 0.4848485 Private Some-college Divorced Sales Unmarried White Female United-States 0 -36 0.4 0.0705675557 0.5625 0 0 0.4848485 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -76 0.844444454 0.102917418 0.625 0 0 0.08080808 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -26 0.2888889 0.122358315 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -18 0.2 0.279867053 0.4375 0 0 0.2020202 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -38 0.422222227 0.174284458 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -50 0.5555556 0.05983815 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 -19 0.211111113 0.2402612 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Female United-States 0 -32 0.355555564 0.106713459 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -57 0.6333333 0.138886854 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -20 0.222222224 0.0348998643 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Own-child Black Male United-States 0 -27 0.3 0.170952484 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.108940832 0.8125 0 0.454545438 0.6060606 Self-emp-not-inc Bachelors Married-spouse-absent Exec-managerial Not-in-family White Male United-States 0 -60 0.6666667 0.109750427 0.1875 0 0 0.4040404 Private 5th-6th Divorced Machine-op-inspct Not-in-family White Female Puerto-Rico 0 -52 0.5777778 0.10980431 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -61 0.677777767 0.09886678 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -57 0.6333333 0.04937614 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Widowed Craft-repair Not-in-family White Male United-States 1 -19 0.211111113 0.09689938 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -59 0.655555546 0.07019307 0.9375 0 0 0.25252524 Self-emp-not-inc Prof-school Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.232844234 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 -31 0.344444454 0.09009871 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Craft-repair Not-in-family Asian-Pac-Islander Male United-States 1 -42 0.466666669 0.14103274 0.5625 0 0 0.353535354 Private HS-grad Divorced Protective-serv Not-in-family Black Male United-States 0 -70 0.7777778 0.1766984 0.625 0 0 0.0606060624 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.186936125 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male ? 1 -47 0.5222222 0.117548607 0.5625 0.0394203924 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male ? 0 -29 0.322222233 0.3302555 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -27 0.3 0.142499685 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Other-relative Black Male United-States 0 -25 0.2777778 0.2525202 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Other-service Wife White Female United-States 0 -51 0.566666663 0.07188499 0.8125 0.05178052 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.116958588 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female ? 0 -35 0.3888889 0.1175971 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.15729253 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -54 0.6 0.114356056 0.875 0 0 0.4040404 ? Masters Never-married ? Not-in-family White Female United-States 0 -46 0.51111114 0.08969391 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.133914813 0.6875 0 0 0.353535354 Private Assoc-voc Separated Other-service Unmarried White Female United-States 0 -65 0.722222269 0.117232718 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -43 0.477777779 0.12709327 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Machine-op-inspct Not-in-family White Male United-States 0 -41 0.455555558 0.06108419 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Prof-specialty Unmarried Asian-Pac-Islander Female United-States 0 -34 0.377777785 0.183156252 0.8125 0 0.3996786 0.454545468 Private Bachelors Never-married Exec-managerial Other-relative White Female United-States 0 -47 0.5222222 0.0689423159 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -49 0.544444442 0.143912762 0.875 0 0 0.565656543 Federal-gov Masters Never-married Exec-managerial Not-in-family White Male United-States 1 -21 0.233333334 0.198550552 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -20 0.222222224 0.106148362 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -18 0.2 0.0908833742 0.5 0 0 0.4040404 Local-gov 12th Never-married Protective-serv Own-child White Male United-States 0 -27 0.3 0.314017951 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family Black Male United-States 0 -34 0.377777785 0.07542576 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.178235412 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -24 0.266666681 0.143750444 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -34 0.377777785 0.187926218 0.625 0 0 0.656565666 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -47 0.5222222 0.111764289 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -27 0.3 0.126855507 0.5625 0 0 0.4040404 Federal-gov HS-grad Separated Exec-managerial Unmarried Black Female United-States 0 -63 0.7 0.10682863 0.6875 0 0 0.08080808 Private Assoc-voc Widowed Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.1300164 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -25 0.2777778 0.1337855 0.625 0 0 0.5050505 Private Some-college Married-spouse-absent Sales Not-in-family White Male United-States 0 -54 0.6 0.1184828 0.5625 0.009140091 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried White Male United-States 0 -19 0.211111113 0.129839256 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 -35 0.3888889 0.06828764 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -24 0.266666681 0.0409394465 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -26 0.2888889 0.123407684 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -59 0.655555546 0.06787611 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.0387955867 1 0 0 0.4040404 Private Doctorate Married-spouse-absent Prof-specialty Not-in-family White Female ? 0 -20 0.222222224 0.117237434 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -41 0.455555558 0.20643495 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -51 0.566666663 0.16820918 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -27 0.3 0.06265285 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Other Female United-States 0 -36 0.4 0.03342482 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.04247443 0.625 0 0 0.6060606 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -55 0.6111111 0.216093436 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.0833344 0.625 0 0 0.212121218 Local-gov Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -58 0.644444466 0.07443701 1 0.0406404063 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 -43 0.477777779 0.100807905 0.625 0.0406404063 0 0.151515156 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -39 0.433333337 0.116134182 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 1 -40 0.444444448 0.145561576 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Unmarried Black Female Haiti 0 -46 0.51111114 0.117335767 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -54 0.6 0.117924437 0.5625 0 0 0.2020202 Federal-gov HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.0869256854 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child Black Male United-States 0 -24 0.266666681 0.08170849 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -53 0.5888889 0.122123249 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -24 0.266666681 0.1123799 0.875 0 0 0.13131313 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -29 0.322222233 0.0199473966 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -56 0.622222245 0.07111312 0.625 0.07688077 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.0841871 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -21 0.233333334 0.10002593 0.625 0 0 0.3030303 ? Some-college Never-married ? Not-in-family White Female United-States 0 -34 0.377777785 0.15507862 0.3125 0 0 0.4040404 Private 9th Separated Craft-repair Not-in-family White Male ? 0 -56 0.622222245 0.07939692 0.4375 0 0 0.4040404 Private 11th Divorced Machine-op-inspct Not-in-family White Female United-States 0 -34 0.377777785 0.1370023 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.300543875 0.375 0 0 0.4040404 Private 10th Never-married Sales Unmarried Black Female United-States 0 -32 0.355555564 0.07431173 0.5625 0 0 0.656565666 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -48 0.533333361 0.1400588 0.5625 0 0 0.5252525 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -67 0.7444445 0.03067074 0.875 0 0 0.4040404 ? Masters Married-civ-spouse ? Husband Black Male United-States 1 -47 0.5222222 0.126846746 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -52 0.5777778 0.09943322 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -40 0.444444448 0.103588931 0.125 0 0 0.4040404 Private 1st-4th Married-spouse-absent Machine-op-inspct Unmarried White Female Dominican-Republic 0 -28 0.311111122 0.13725017 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.113201618 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -57 0.6333333 0.234679624 0.125 0 0 0.4040404 Private 1st-4th Divorced Craft-repair Unmarried White Male Portugal 0 -51 0.566666663 0.0696481839 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.102408223 0.4375 0 0 0.353535354 ? 11th Never-married ? Not-in-family White Female Germany 0 -36 0.4 0.10318885 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 0 -33 0.366666675 0.2196423 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.160410315 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -50 0.5555556 0.14907743 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Other-relative Asian-Pac-Islander Female Philippines 0 -33 0.366666675 0.121678047 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Craft-repair Not-in-family White Male ? 0 -77 0.8555556 0.0978840962 0.5625 0.00401004 0 0.2020202 Self-emp-not-inc HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -39 0.433333337 0.212686032 0.875 0.0861408561 0 0.5252525 Private Masters Never-married Exec-managerial Not-in-family Black Male United-States 1 -67 0.7444445 0.101377718 0.5625 0 0 0.0303030312 ? HS-grad Widowed ? Unmarried White Male United-States 0 -35 0.3888889 0.219438881 0.75 0 0 0.24242425 Private Assoc-acdm Divorced Handlers-cleaners Unmarried White Female United-States 0 -23 0.25555557 0.09024352 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Own-child Black Female United-States 0 -37 0.411111116 0.18140237 0.6875 0.0861408561 0 0.454545468 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 1 -41 0.455555558 0.123393536 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -60 0.6666667 0.0512741581 0.75 0 0 0.353535354 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 -32 0.355555564 0.131939352 0.8125 0 0 0.5555556 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -56 0.622222245 0.109204859 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -45 0.5 0.0253733918 0.6875 0 0 0.4040404 State-gov Assoc-voc Divorced Tech-support Unmarried White Female United-States 0 -24 0.266666681 0.108915918 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 1 -18 0.2 0.0542976558 0.375 0 0 0.272727281 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 -31 0.344444454 0.1409546 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Other Male United-States 0 -21 0.233333334 0.0231985487 0.625 0 0 0.5050505 ? Some-college Never-married ? Own-child White Male United-States 0 -45 0.5 0.129881024 0.8125 0 0.453856736 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.136889145 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -45 0.5 0.06890797 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -18 0.2 0.02749974 0.4375 0 0 0.25252524 Private 11th Never-married Sales Other-relative Amer-Indian-Eskimo Female United-States 0 -25 0.2777778 0.0409010537 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -31 0.344444454 0.07858598 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -19 0.211111113 0.03843659 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 -41 0.455555558 0.2053647 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -74 0.822222233 0.06842437 0.9375 0 0 0.2020202 Private Prof-school Widowed Adm-clerical Not-in-family Black Female United-States 0 -27 0.3 0.1738406 0.1875 0 0 0.4040404 Private 5th-6th Never-married Transport-moving Not-in-family White Male Mexico 0 -23 0.25555557 0.162446409 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.08407529 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.05160958 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -41 0.455555558 0.1773679 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -25 0.2777778 0.09136158 0.875 0 0 0.2020202 Private Masters Never-married Sales Not-in-family White Male United-States 0 -42 0.466666669 0.165437579 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 -24 0.266666681 0.14196828 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Female United-States 0 -42 0.466666669 0.15881 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.107878 0.375 0 0 0.7070707 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.020698389 0.5625 0.07298073 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.2117424 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.05491192 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -54 0.6 0.123158477 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.199903682 0.4375 0 0.307621658 0.4040404 Federal-gov 11th Never-married Tech-support Not-in-family White Male United-States 0 -32 0.355555564 0.130952612 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -40 0.444444448 0.047581844 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -55 0.6111111 0.0955119058 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -66 0.733333349 0.07602251 0.4375 0 0 0.3030303 ? 11th Never-married ? Not-in-family White Male United-States 0 -52 0.5777778 0.0480526462 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -21 0.233333334 0.229951411 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -33 0.366666675 0.08011086 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -52 0.5777778 0.1076005 0.6875 0 0 0.5050505 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 1 -28 0.311111122 0.08655524 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Not-in-family White Female ? 0 -27 0.3 0.1543236 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.09615109 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -27 0.3 0.16425553 0.625 0 0 0.454545468 Self-emp-inc Some-college Never-married Adm-clerical Own-child White Female United-States 0 -47 0.5222222 0.143557146 0.6875 0.07688077 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.132589981 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.0933693945 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.108664013 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Widowed Other-service Not-in-family White Female Nicaragua 0 -50 0.5555556 0.18423593 0.25 0 0 0.4949495 Private 7th-8th Married-civ-spouse Sales Husband Other Male Dominican-Republic 0 -32 0.355555564 0.07788146 0.625 0.04101041 0 0.5050505 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.125248447 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -23 0.25555557 0.225200966 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -43 0.477777779 0.0647280142 0.875 0 0 0.5050505 Private Masters Married-spouse-absent Exec-managerial Not-in-family White Male United-States 0 -34 0.377777785 0.143615067 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Iran 1 -19 0.211111113 0.0776235 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male Vietnam 0 -37 0.411111116 0.124644965 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 0 -27 0.3 0.0994392857 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Other-relative Asian-Pac-Islander Female Hong 0 -18 0.2 0.188790366 0.5625 0 0 0.24242425 Private HS-grad Never-married Sales Own-child White Female United-States 0 -31 0.344444454 0.110133663 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 -49 0.544444442 0.186861366 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -26 0.2888889 0.139410183 0.9375 0 0 0.6060606 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male Columbia 0 -48 0.533333361 0.07341054 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.194349051 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -41 0.455555558 0.118588544 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried White Female United-States 0 -48 0.533333361 0.123584151 0.6875 0 0 0.565656543 State-gov Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 1 -40 0.444444448 0.109930933 0.8125 0.105201051 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 -70 0.7777778 0.0637783259 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -20 0.222222224 0.0797882453 0.5625 0 0 0.434343427 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -38 0.422222227 0.274174333 0.1875 0 0 0.75757575 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 -37 0.411111116 0.164064243 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Separated Other-service Own-child White Female Cuba 0 -49 0.544444442 0.0155411344 0.625 0 0 0.4040404 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 1 -51 0.566666663 0.160122722 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -43 0.477777779 0.126820475 0.125 0 0 0.4040404 Private 1st-4th Never-married Sales Own-child White Male United-States 0 -38 0.422222227 0.1913956 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 -18 0.2 0.2852149 0.4375 0 0 0.363636374 ? 11th Never-married ? Own-child White Male United-States 0 -23 0.25555557 0.193763077 0.25 0 0 0.25252524 Private 7th-8th Never-married Other-service Not-in-family White Male Mexico 0 -34 0.377777785 0.343074232 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.09388465 0.625 0 0 0.24242425 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -33 0.366666675 0.0619409271 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Male United-States 0 -31 0.344444454 0.0791578144 0.625 0 0 0.454545468 Private Some-college Never-married Farming-fishing Not-in-family White Female United-States 0 -64 0.7111111 0.06152266 0.625 0 0 0.4040404 Private Some-college Widowed Tech-support Unmarried White Female United-States 0 -26 0.2888889 0.226960242 0.8125 0 0 0.282828271 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male El-Salvador 0 -55 0.6111111 0.171996459 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -61 0.677777767 0.112931527 0.8125 0 0 0.4040404 Local-gov Bachelors Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 -37 0.411111116 0.1424485 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -78 0.8666667 0.09173405 0.8125 0 0 0.151515156 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -27 0.3 0.27602455 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -49 0.544444442 0.1271788 0.5625 0 0 0.424242437 Private HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 -55 0.6111111 0.09855561 0.875 0.07688077 0 0.454545468 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.103976212 0.8125 0 0 0.5858586 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -22 0.244444445 0.145862654 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Other-relative White Female United-States 0 -61 0.677777767 0.132878929 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -64 0.7111111 0.06783974 0.8125 0 0 0.05050505 Self-emp-not-inc Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -46 0.51111114 0.254341453 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -24 0.266666681 0.09831179 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -27 0.3 0.241553709 0.625 0.0282902829 0 0.7070707 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.1047272 0.5625 0.07688077 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -18 0.2 0.0386696346 0.625 0 0 0.151515156 Private Some-college Divorced Other-service Own-child White Male United-States 0 -48 0.533333361 0.21581459 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.1177015 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -40 0.444444448 0.15448457 0.875 0 0 0.454545468 State-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -56 0.622222245 0.106072254 0.375 0 0 0.4040404 Self-emp-not-inc 10th Divorced Sales Own-child White Male United-States 0 -34 0.377777785 0.0624245219 0.5625 0.0486504845 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -56 0.622222245 0.0682546347 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -18 0.2 0.08934569 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 -21 0.233333334 0.02331507 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -40 0.444444448 0.14743872 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 -27 0.3 0.137467042 0.5625 0 0 0.5050505 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Other-relative White Male United-States 0 -52 0.5777778 0.0431365147 0.9375 1 0 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.127811924 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -23 0.25555557 0.0176789332 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -50 0.5555556 0.0620183833 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -19 0.211111113 0.18863748 0.625 0 0 0.5050505 Private Some-college Never-married Machine-op-inspct Other-relative White Male United-States 0 -20 0.222222224 0.150911465 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -39 0.433333337 0.124954119 0.625 0.0861408561 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 1 -24 0.266666681 0.178868532 0.4375 0 0 0.353535354 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -72 0.8 0.0719941 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.026662536 0.875 0 0 0.2020202 State-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -42 0.466666669 0.103139684 0.8125 0 0 0.454545468 Private Bachelors Divorced Sales Unmarried White Male ? 0 -51 0.566666663 0.141382977 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family Amer-Indian-Eskimo Male United-States 0 -39 0.433333337 0.09710279 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.0339744277 0.625 0.0297702979 0 0.353535354 Local-gov Some-college Never-married Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 -34 0.377777785 0.0603783242 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -19 0.211111113 0.185820758 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male Mexico 0 -26 0.2888889 0.156016186 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 -45 0.5 0.151190981 0.8125 0.049340494 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 1 -28 0.311111122 0.2392792 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 -30 0.333333343 0.0460226126 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -32 0.355555564 0.124880031 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.0590373166 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -21 0.233333334 0.193205386 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -54 0.6 0.06513752 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Priv-house-serv Other-relative Black Female United-States 0 -62 0.6888889 0.107861832 0.9375 0 0 0.3030303 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.125900432 0.625 0.02597026 0 0.4848485 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -49 0.544444442 0.0738901 0.625 0 0 0.323232323 Self-emp-inc Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -32 0.355555564 0.06347052 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.151733175 0.625 0 0.3677686 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Male ? 0 -37 0.411111116 0.200342163 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -58 0.644444466 0.138678059 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Other-relative White Female United-States 0 -37 0.411111116 0.06312163 0.625 0.07298073 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -41 0.455555558 0.1311439 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -38 0.422222227 0.159217492 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.127380863 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -42 0.466666669 0.241581336 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Unmarried Black Male United-States 0 -30 0.333333343 0.1343964 0.5625 0 0.43663913 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -43 0.477777779 0.08632691 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -34 0.377777785 0.155746773 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -57 0.6333333 0.199468583 0.625 0.005940059 0 0.1010101 Private Some-college Divorced Exec-managerial Other-relative White Female United-States 0 -46 0.51111114 0.111808747 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -32 0.355555564 0.189557523 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.128127143 0.3125 0 0 0.111111112 Private 9th Never-married Machine-op-inspct Own-child White Female Nicaragua 0 -47 0.5222222 0.08218872 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Sales Not-in-family White Male United-States 0 -55 0.6111111 0.138429523 0.5625 0 0 0.2020202 ? HS-grad Divorced ? Not-in-family White Male United-States 0 -53 0.5888889 0.117263705 0.25 0.04386044 0 0.5050505 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male Greece 1 -43 0.477777779 0.08450231 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -80 0.8888889 0.124155983 0.25 0 0 0.3030303 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -24 0.266666681 0.14234814 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female Mexico 0 -43 0.477777779 0.09923049 0.875 0 0.453856736 0.6060606 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.150193483 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -40 0.444444448 0.152203977 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Not-in-family Black Male United-States 0 -48 0.533333361 0.08158119 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.441862881 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -34 0.377777785 0.233556166 0.4375 0 0 0.8484849 ? 11th Divorced ? Own-child White Male United-States 0 -51 0.566666663 0.157645464 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.206448421 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.0785085261 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -34 0.377777785 0.115281492 0.625 0 0 0.3030303 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -24 0.266666681 0.134040773 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -41 0.455555558 0.298717946 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Transport-moving Husband White Male Canada 1 -24 0.266666681 0.020078063 0.5625 0 0 0.3838384 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -22 0.244444445 0.160860911 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 -32 0.355555564 0.381299317 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -41 0.455555558 0.171780929 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -20 0.222222224 0.293831438 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 -31 0.344444454 0.202523068 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 -55 0.6111111 0.09703679 0.8125 0 0 0.181818187 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -49 0.544444442 0.09019772 1 0 0.43663913 0.6060606 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Black Male ? 1 -26 0.2888889 0.127141088 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 -27 0.3 0.202583686 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -35 0.3888889 0.0181766748 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.117461048 0.5625 0 0 0.6060606 Private HS-grad Divorced Other-service Not-in-family White Male Greece 0 -59 0.655555546 0.060813427 0.625 0 0 0.343434334 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -61 0.677777767 0.123751856 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.0830286145 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Female United-States 0 -43 0.477777779 0.125894368 0.875 0 0 0.6060606 Federal-gov Masters Divorced Protective-serv Not-in-family White Male United-States 1 -61 0.677777767 0.02933512 0.1875 0 0.5369605 0.4040404 Private 5th-6th Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -54 0.6 0.120058194 0.75 0 0 0.3030303 Private Assoc-acdm Widowed Adm-clerical Unmarried White Female United-States 0 -30 0.333333343 0.172347367 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -20 0.222222224 0.04330288 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -27 0.3 0.131186336 0.875 0 0 0.5050505 State-gov Masters Never-married Prof-specialty Not-in-family White Female Germany 0 -44 0.4888889 0.0896205 0.625 0 0 0.6060606 Self-emp-inc Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -64 0.7111111 0.173775941 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Not-in-family White Female Cuba 0 -55 0.6111111 0.0621099845 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.0228631273 0.5625 0.068490684 0 0.5555556 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -61 0.677777767 0.103083104 0.5625 0 0 0.353535354 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -28 0.311111122 0.129453331 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 0 -34 0.377777785 0.239489332 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried Black Female United-States 0 -47 0.5222222 0.0938018039 0.9375 0 0.453856736 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.0231709331 0.8125 0 0 0.454545468 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -35 0.3888889 0.0174815878 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Unmarried Amer-Indian-Eskimo Male United-States 0 -36 0.4 0.141178891 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -47 0.5222222 0.1133444 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.199021354 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Own-child Black Female United-States 0 -35 0.3888889 0.128574371 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.110587627 0.875 0 0 0.2020202 Private Masters Never-married Prof-specialty Own-child White Male United-States 0 -25 0.2777778 0.145490184 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 -18 0.2 0.261040419 0.375 0 0 0.1010101 Private 10th Never-married Sales Own-child White Male United-States 0 -47 0.5222222 0.12688446 0.875 0 0 0.3838384 State-gov Masters Separated Prof-specialty Not-in-family White Male United-States 0 -44 0.4888889 0.117525704 0.5625 0 0 0.3030303 Private HS-grad Widowed Other-service Unmarried Black Female United-States 0 -41 0.455555558 0.02102842 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -30 0.333333343 0.183505148 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -53 0.5888889 0.102816388 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -53 0.5888889 0.0703257546 0.5625 0 0 0.2020202 Private HS-grad Widowed Other-service Unmarried Black Female United-States 0 -40 0.444444448 0.07135155 0.5625 0.0501305 0 0.2020202 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -24 0.266666681 0.255314022 0.625 0 0.506198347 0.24242425 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -27 0.3 0.144714266 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 -50 0.5555556 0.160122722 0.1875 0 0 0.373737365 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male Mexico 0 -36 0.4 0.106817178 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.159843877 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 1 -41 0.455555558 0.0159263965 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -31 0.344444454 0.113988973 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.3061268 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -22 0.244444445 0.08779926 0.625 0 0 0.4848485 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -22 0.244444445 0.288061261 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Own-child White Male United-States 0 -18 0.2 0.0245240647 0.5 0 0 0.3030303 Local-gov 12th Never-married Prof-specialty Own-child White Male United-States 0 -39 0.433333337 0.3694404 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 0 -38 0.422222227 0.126128763 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -35 0.3888889 0.09480133 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.219300136 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -54 0.6 0.118410058 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.0722716 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -63 0.7 0.0277233534 0.5625 0 0 0.5555556 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -39 0.433333337 0.2706477 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -57 0.6333333 0.238301888 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -58 0.644444466 0.235676453 0.9375 0 0.453856736 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.108761005 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female Japan 0 -17 0.188888893 0.269565344 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 -40 0.444444448 0.247546151 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -69 0.7666667 0.04667998 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -28 0.311111122 0.182100832 0.375 0 0 0.4040404 Private 10th Divorced Sales Not-in-family White Female United-States 0 -38 0.422222227 0.0698798746 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.05066798 0.9375 0.14084141 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 -45 0.5 0.08928575 0.9375 0 0.396235079 0.4040404 Local-gov Prof-school Divorced Prof-specialty Unmarried Black Female United-States 0 -33 0.366666675 0.0535998754 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -41 0.455555558 0.232116148 0.625 0 0.3409091 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 1 -37 0.411111116 0.125519216 0.5625 0.07688077 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.08195905 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -48 0.533333361 0.0505851358 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -26 0.2888889 0.126855507 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -36 0.4 0.1659919 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.057309702 0.625 0 0 0.373737365 Private Some-college Never-married Other-service Own-child White Female United-States 0 -37 0.411111116 0.3674016 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Farming-fishing Husband White Male United-States 0 -20 0.222222224 0.164332986 0.625 0 0 0.2020202 State-gov Some-college Never-married Prof-specialty Own-child White Female United-States 0 -54 0.6 0.0220771134 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -28 0.311111122 0.248611 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Other-relative White Female United-States 0 -27 0.3 0.146291688 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -33 0.366666675 0.100504816 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Unmarried Black Female United-States 0 -46 0.51111114 0.109135486 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -28 0.311111122 0.1062925 0.4375 0 0 0.5858586 ? 11th Divorced ? Unmarried White Female Canada 0 -17 0.188888893 0.121044248 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 -40 0.444444448 0.226003826 0.9375 0 0.5610652 0.454545468 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 -47 0.5222222 0.06890797 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -44 0.4888889 0.247691631 0.125 0 0 0.4040404 Private 1st-4th Never-married Machine-op-inspct Not-in-family White Female El-Salvador 0 -25 0.2777778 0.0661956444 0.5 0 0 0.434343427 Private 12th Never-married Handlers-cleaners Unmarried White Male United-States 0 -35 0.3888889 0.0779899061 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -29 0.322222233 0.1870998 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 -30 0.333333343 0.06966704 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 -30 0.333333343 0.02535588 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -56 0.622222245 0.259736449 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Divorced Other-service Unmarried White Female United-States 0 -25 0.2777778 0.141629487 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -28 0.311111122 0.2258745 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -43 0.477777779 0.18331252 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.100353271 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -46 0.51111114 0.07640171 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.08927767 0.875 0 0 0.353535354 State-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -38 0.422222227 0.0777481049 0.75 0.07688077 0 0.333333343 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 -29 0.322222233 0.15349178 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Other-relative Black Male United-States 0 -25 0.2777778 0.33879593 0.1875 0 0 0.4040404 Private 5th-6th Never-married Craft-repair Not-in-family White Male Mexico 0 -56 0.622222245 0.168971613 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.2747549 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -22 0.244444445 0.09980906 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Other-relative White Male United-States 0 -31 0.344444454 0.107308865 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -28 0.311111122 0.225208372 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Not-in-family White Female United-States 0 -53 0.5888889 0.132233679 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -45 0.5 0.182421431 0.875 0 0 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 1 -71 0.788888931 0.158333808 0.0625 0 0 0.1010101 Private Preschool Widowed Craft-repair Unmarried Black Male United-States 0 -65 0.722222269 0.2203495 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Unmarried White Female United-States 0 -39 0.433333337 0.126887828 0.5625 0.07298073 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.02058254 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-AF-spouse Sales Wife White Female United-States 0 -34 0.377777785 0.1718173 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -36 0.4 0.167043284 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -40 0.444444448 0.117541872 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Other-service Own-child White Female United-States 0 -90 1 0.1158183 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Own-child White Female Puerto-Rico 0 -56 0.622222245 0.130079716 0.9375 0 0 0.161616161 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 0 -21 0.233333334 0.07319299 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 -48 0.533333361 0.125393257 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.2349652 0.625 0 0 0.272727281 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 -46 0.51111114 0.183085531 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -64 0.7111111 0.100091264 0.375 0 0 0.353535354 Private 10th Separated Other-service Not-in-family White Female United-States 0 -29 0.322222233 0.08350682 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Own-child Asian-Pac-Islander Male Taiwan 0 -22 0.244444445 0.0167683139 0.5625 0 0 0.3030303 Private HS-grad Divorced Tech-support Unmarried White Female Germany 0 -47 0.5222222 0.386327922 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Transport-moving Husband White Male Italy 1 -67 0.7444445 0.07151253 0.8125 0 0.549127638 0.75757575 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.207291692 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -42 0.466666669 0.13509351 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -31 0.344444454 0.0397944376 0.625 0 0.3838384 0.5050505 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -53 0.5888889 0.24116306 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Unmarried White Female United-States 0 -81 0.900000036 0.0772342 0.3125 0.0206202064 0 0.05050505 Private 9th Widowed Priv-house-serv Not-in-family Black Female United-States 0 -33 0.366666675 0.17649433 0.5625 0 0.261248857 0.4040404 Local-gov HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -17 0.188888893 0.138754845 0.5 0 0 0.08080808 Private 12th Never-married Other-service Own-child White Female United-States 0 -55 0.6111111 0.123842113 0.9375 0 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Exec-managerial Husband White Male ? 1 -28 0.311111122 0.107092656 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -24 0.266666681 0.1049488 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -40 0.444444448 0.06469636 0.5625 0 0 0.454545468 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -30 0.333333343 0.08875568 0.875 0 0 0.4040404 Local-gov Masters Never-married Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.153978735 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Unmarried White Female United-States 0 -26 0.2888889 0.133469611 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Wife White Female United-States 0 -38 0.422222227 0.0249396358 0.625 0 0 0.3838384 Private Some-college Divorced Sales Unmarried White Female United-States 0 -30 0.333333343 0.119420357 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -33 0.366666675 0.09703207 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -40 0.444444448 0.0987798944 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -63 0.7 0.0181207713 0.5625 0 0 0.989899 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -23 0.25555557 0.160918832 0.25 0 0 0.363636374 Private 7th-8th Never-married Craft-repair Other-relative White Male United-States 0 -56 0.622222245 0.114600547 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried Black Male United-States 0 -42 0.466666669 0.0187384021 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -40 0.444444448 0.148487419 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male Canada 0 -49 0.544444442 0.06824251 0.75 0 0.43663913 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Wife White Female United-States 1 -35 0.3888889 0.11709936 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Not-in-family Asian-Pac-Islander Male ? 0 -52 0.5777778 0.0613239668 0.5625 0 0 0.353535354 Private HS-grad Divorced Machine-op-inspct Own-child Black Female United-States 0 -28 0.311111122 0.201182052 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -35 0.3888889 0.139557689 0.375 0 0 0.7070707 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -21 0.233333334 0.15518032 0.625 0 0 0.05050505 ? Some-college Never-married ? Own-child White Female United-States 0 -43 0.477777779 0.121639654 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.134064347 0.6875 0 0 0.02020202 ? Assoc-voc Never-married ? Unmarried White Female United-States 0 -29 0.322222233 0.0893686 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Never-married Prof-specialty Own-child White Male Italy 1 -23 0.25555557 0.161690712 0.8125 0 0 0.25252524 Private Bachelors Never-married Machine-op-inspct Own-child White Male United-States 0 -50 0.5555556 0.119690448 0.625 0 0.399449021 0.4848485 Local-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -34 0.377777785 0.344419271 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Male United-States 0 -19 0.211111113 0.060211964 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -47 0.5222222 0.161270425 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Wife Black Female United-States 0 -37 0.411111116 0.0249133669 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -25 0.2777778 0.05184734 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 -75 0.8333334 0.134752691 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.306418449 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.07221502 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Tech-support Own-child Asian-Pac-Islander Male United-States 0 -17 0.188888893 0.122630425 0.4375 0 0 0.161616161 Local-gov 11th Never-married Other-service Own-child White Female United-States 0 -31 0.344444454 0.118784539 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -31 0.344444454 0.304710358 0.0625 0 0 0.353535354 Private Preschool Never-married Other-service Other-relative White Female Mexico 0 -18 0.2 0.20030646 0.5625 0 0 0.1010101 ? HS-grad Never-married ? Own-child White Male United-States 0 -45 0.5 0.05710899 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.125807479 0.5625 0 0 0.424242437 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -27 0.3 0.114273205 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.08482022 0.625 0 0.383149683 0.3838384 Private Some-college Widowed Exec-managerial Unmarried Black Female United-States 0 -22 0.244444445 0.02387545 0.5625 0 0 0.222222224 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -34 0.377777785 0.151914358 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 0 -26 0.2888889 0.1622154 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -53 0.5888889 0.07000111 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -60 0.6666667 0.156676248 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.194347024 0.875 0 0 0.5050505 Local-gov Masters Separated Prof-specialty Unmarried White Female United-States 0 -40 0.444444448 0.148587763 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -48 0.533333361 0.017609559 0.375 0 0 0.8080808 Self-emp-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -23 0.25555557 0.180860847 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -68 0.75555557 0.090090625 0.25 0 0 0.1010101 ? 7th-8th Widowed ? Not-in-family Black Male United-States 0 -42 0.466666669 0.0816754848 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.0200807564 0.5625 0 0 0.858585835 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -27 0.3 0.1304643 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Own-child White Female United-States 0 -38 0.422222227 0.123444729 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.110420592 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male Ireland 0 -75 0.8333334 0.127036691 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -49 0.544444442 0.06921981 0.8125 0 0 0.5252525 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.05767139 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -36 0.4 0.165076569 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Farming-fishing Not-in-family White Male Mexico 0 -36 0.4 0.08839399 0.8125 0.03103031 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.122633114 0.5625 0 0 0.353535354 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 -36 0.4 0.125981927 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -53 0.5888889 0.06103839 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband Black Male United-States 0 -27 0.3 0.0255491845 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -34 0.377777785 0.122702494 0.5625 0.0332503319 0 0.353535354 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -61 0.677777767 0.4825309 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -29 0.322222233 0.128350079 0.5625 0 0 0.565656543 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 -40 0.444444448 0.09536103 0.625 0 0 0.353535354 State-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -37 0.411111116 0.0666401759 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 -22 0.244444445 0.13587144 0.3125 0 0 0.3030303 Private 9th Never-married Handlers-cleaners Other-relative White Male United-States 0 -43 0.477777779 0.1181952 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -55 0.6111111 0.10046979 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -28 0.311111122 0.07811047 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.108915918 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Own-child White Female United-States 0 -64 0.7111111 0.164950609 0.4375 0 0 0.4040404 Local-gov 11th Married-civ-spouse Craft-repair Husband Black Male United-States 1 -46 0.51111114 0.104845069 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -29 0.322222233 0.07594371 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -44 0.4888889 0.12014845 0.875 0 0 0.4848485 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male India 0 -20 0.222222224 0.0296786241 0.625 0 0 0.25252524 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -62 0.6888889 0.08145659 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Sales Not-in-family White Male United-States 0 -49 0.544444442 0.111223444 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Exec-managerial Unmarried White Female Columbia 0 -29 0.322222233 0.06762623 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Farming-fishing Wife Amer-Indian-Eskimo Female United-States 0 -35 0.3888889 0.243744045 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male Japan 0 -39 0.433333337 0.113062195 0.4375 0 0 0.3030303 Local-gov 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -39 0.433333337 0.13669382 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -37 0.411111116 0.146957144 0.5625 0 0 0.323232323 Private HS-grad Divorced Machine-op-inspct Other-relative White Female United-States 0 -38 0.422222227 0.158255011 0.5625 0.0282902829 0 0.3030303 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -72 0.8 0.119367823 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -31 0.344444454 0.175072491 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -55 0.6111111 0.127653643 0.25 0 0 0.6060606 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.0235710125 0.625 0 0 0.4040404 Private Some-college Separated Other-service Unmarried White Female United-States 0 -33 0.366666675 0.07582921 0.625 0 0 0.25252524 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -25 0.2777778 0.0792002454 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.09782011 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 -37 0.411111116 0.179891631 0.6875 0 0 0.5252525 Private Assoc-voc Divorced Tech-support Unmarried White Female United-States 0 -49 0.544444442 0.0299278311 0.625 0 0 0.353535354 Private Some-college Divorced Tech-support Other-relative White Male United-States 0 -26 0.2888889 0.06474687 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -35 0.3888889 0.122167036 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.113722928 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -37 0.411111116 0.183044448 0.875 0 0 0.454545468 Private Masters Separated Exec-managerial Not-in-family White Male United-States 1 -42 0.466666669 0.131094053 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -64 0.7111111 0.131267831 1 0.04787048 0 0.4040404 State-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 -28 0.311111122 0.0893686 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -35 0.3888889 0.125175044 0.5625 0.046500463 0 0.5050505 Self-emp-not-inc HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -40 0.444444448 0.124184944 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -55 0.6111111 0.182432875 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.156169742 0.5625 0 0 0.656565666 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -49 0.544444442 0.0242687948 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family Black Female United-States 0 -51 0.566666663 0.11649587 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -57 0.6333333 0.06624211 0.9375 0 0.43663913 0.4040404 Private Prof-school Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 1 -51 0.566666663 0.0162894316 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.036323715 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family Black Male ? 0 -24 0.266666681 0.057309702 0.5625 0 0.404499531 0.323232323 Private HS-grad Never-married Sales Own-child White Female United-States 0 -45 0.5 0.06396018 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male England 0 -28 0.311111122 0.32387647 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -42 0.466666669 0.126423776 0.9375 0 0.5544077 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.03520026 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.03545216 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -60 0.6666667 0.118052408 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried White Female United-States 0 -31 0.344444454 0.220801443 0.5625 0 0.5137741 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried White Female United-States 0 -47 0.5222222 0.08479261 0.625 0 0 0.75757575 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.05270744 0.5625 0 0 0.25252524 ? HS-grad Divorced ? Not-in-family White Male United-States 0 -30 0.333333343 0.268623739 0.5625 0 0 0.6060606 Private HS-grad Married-AF-spouse Adm-clerical Husband White Male United-States 0 -61 0.677777767 0.140714154 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -71 0.788888931 0.246510923 0.8125 0 0 0.0606060624 Local-gov Bachelors Widowed Prof-specialty Unmarried White Female United-States 0 -42 0.466666669 0.2072048 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -44 0.4888889 0.0222724378 0.5 0 0 0.5555556 Local-gov 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.171273753 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.08447267 0.9375 0 0 0.5252525 Local-gov Prof-school Never-married Exec-managerial Not-in-family Black Female United-States 1 -27 0.3 0.0194301233 0.8125 0 0 0.09090909 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -40 0.444444448 0.184161171 0.6875 0 0 0.151515156 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 0 -21 0.233333334 0.13115266 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative White Female Mexico 0 -25 0.2777778 0.1314187 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -61 0.677777767 0.0830286145 0.1875 0 0.430670351 0.565656543 Private 5th-6th Divorced Transport-moving Not-in-family White Male United-States 0 -54 0.6 0.14825505 0.625 0 0 0.3030303 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 -31 0.344444454 0.178962156 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -53 0.5888889 0.188003 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -39 0.433333337 0.08267097 0.75 0.1502415 0 0.5555556 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -57 0.6333333 0.116288424 0.9375 0.1502415 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Transport-moving Husband White Male United-States 1 -48 0.533333361 0.08028464 0.8125 0 0 0.444444448 Private Bachelors Divorced Sales Unmarried White Female United-States 0 -30 0.333333343 0.0726023 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -35 0.3888889 0.160262823 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -42 0.466666669 0.04353188 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.06482433 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -59 0.655555546 0.243478671 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -69 0.7666667 0.08274371 0.375 0 0 0.2020202 Local-gov 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.116960607 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.110906206 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -21 0.233333334 0.06646304 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Male United-States 0 -40 0.444444448 0.165372252 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 -43 0.477777779 0.0372424163 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.0946875 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -41 0.455555558 0.05374603 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Prof-specialty Not-in-family Asian-Pac-Islander Male Japan 1 -72 0.8 0.07613903 0.5625 0 0 0.3030303 ? HS-grad Widowed ? Not-in-family White Male United-States 0 -20 0.222222224 0.190946355 0.625 0 0 0.3030303 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -41 0.455555558 0.03442502 0.8125 0 0 0.4040404 Local-gov Bachelors Widowed Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.156579927 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -48 0.533333361 0.118636362 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Unmarried Black Female United-States 0 -27 0.3 0.203174368 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 -35 0.3888889 0.253555417 0.625 0.1502415 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.129701868 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child Black Male United-States 0 -27 0.3 0.154780239 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -20 0.222222224 0.227411509 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -18 0.2 0.088131316 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 -32 0.355555564 0.199556142 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.1795946 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.07417501 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Own-child White Male United-States 0 -28 0.311111122 0.0607501157 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.0269575436 0.9375 0 0 0.3838384 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.09720585 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -74 0.822222233 0.109341592 0.625 0 0 0.4040404 Self-emp-inc Some-college Widowed Exec-managerial Unmarried White Male United-States 0 -28 0.311111122 0.1138738 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -23 0.25555557 0.07651419 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -20 0.222222224 0.105842575 0.625 0 0.518365443 0.1010101 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 -44 0.4888889 0.07494755 0.5625 0 0 0.565656543 Private HS-grad Divorced Machine-op-inspct Unmarried Black Female United-States 0 -46 0.51111114 0.06875171 0.5625 0 0 0.25252524 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -20 0.222222224 0.122662082 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -51 0.566666663 0.09793798 0.8125 0.1502415 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.128053725 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Not-in-family White Female United-States 0 -48 0.533333361 0.22326456 0.9375 0 0.453856736 0.4040404 Private Prof-school Married-civ-spouse Tech-support Husband White Male United-States 1 -60 0.6666667 0.114577644 0.3125 0 0.3838384 0.8484849 Self-emp-not-inc 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -48 0.533333361 0.130118787 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.180229753 0.8125 0 0 0.7070707 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -48 0.533333361 0.13502413 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.11826323 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -24 0.266666681 0.217321292 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -45 0.5 0.177800983 0.625 0 0 0.4040404 State-gov Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -18 0.2 0.179353476 0.5 0 0 0.353535354 Private 12th Never-married Sales Own-child White Female United-States 0 -39 0.433333337 0.187368542 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -65 0.722222269 0.0548344627 0.5625 0 0.5399449 0.656565666 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -22 0.244444445 0.149352908 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Own-child White Female United-States 0 -20 0.222222224 0.0948094055 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.138984516 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.119090326 0.9375 1 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.165222719 0.8125 0 0.453856736 0.4848485 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -61 0.677777767 0.08417228 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 -28 0.311111122 0.08051768 0.625 0.07688077 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Own-child White Male United-States 1 -18 0.2 0.1206994 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -24 0.266666681 0.0296860319 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 0 -45 0.5 0.120103993 1 0 0 0.565656543 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.1480119 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -44 0.4888889 0.133572668 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.113264926 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 -35 0.3888889 0.2403427 0.625 0.0282902829 0 0.5555556 Private Some-college Married-civ-spouse Tech-support Husband White Male Poland 0 -52 0.5777778 0.141937956 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.116664253 0.75 0.0235402342 0 0.454545468 Private Assoc-acdm Never-married Farming-fishing Not-in-family White Male United-States 0 -19 0.211111113 0.08784977 0.1875 0 0 0.363636374 Private 5th-6th Never-married Farming-fishing Not-in-family White Male Mexico 0 -35 0.3888889 0.114372216 0.8125 0 0 0.2020202 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -54 0.6 0.133010268 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -21 0.233333334 0.1044423 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -26 0.2888889 0.0210748948 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -42 0.466666669 0.0364395641 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.122277491 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -55 0.6111111 0.103376769 0.875 0 0.453856736 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.236564174 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -25 0.2777778 0.08889039 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -26 0.2888889 0.13513729 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -64 0.7111111 0.180201456 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Separated Prof-specialty Not-in-family White Female United-States 1 -41 0.455555558 0.121152014 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Unmarried Other Female United-States 0 -25 0.2777778 0.160210282 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Black Male ? 0 -43 0.477777779 0.202415973 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -45 0.5 0.04560906 0.5625 0.105201051 0 0.4848485 Private HS-grad Never-married Craft-repair Own-child White Male United-States 1 -48 0.533333361 0.219604567 0.8125 0 0 0.444444448 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -60 0.6666667 0.1287717 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -45 0.5 0.021668952 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 -51 0.566666663 0.1703389 0.375 0 0.453856736 0.4040404 Private 10th Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.225172013 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -22 0.244444445 0.05637753 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -44 0.4888889 0.108152129 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.13725017 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.221330166 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.199089378 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -40 0.444444448 0.117446229 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.166869521 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.134197712 0.375 0 0 0.4040404 ? 10th Divorced ? Not-in-family White Female United-States 0 -26 0.2888889 0.09428944 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.06444378 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 0 -55 0.6111111 0.127926424 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.335948884 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -24 0.266666681 0.119569883 0.8125 0 0 0.151515156 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -64 0.7111111 0.101111673 1 0 0 0.25252524 Self-emp-not-inc Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.08786527 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.08020382 0.5625 0 0 0.4949495 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.148810029 0.5625 0.07298073 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.06347052 0.9375 0 0 0.424242437 Private Prof-school Never-married Prof-specialty Own-child White Male United-States 1 -21 0.233333334 0.20601669 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -59 0.655555546 0.0417726077 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Craft-repair Not-in-family Black Male United-States 0 -58 0.644444466 0.158700883 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male Germany 1 -43 0.477777779 0.166709214 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried White Male United-States 0 -21 0.233333334 0.185710967 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -45 0.5 0.04909797 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -53 0.5888889 0.0744323 0.5625 0 0 0.5050505 Local-gov HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -41 0.455555558 0.117153242 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Adm-clerical Husband White Male ? 1 -27 0.3 0.135138631 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Wife White Female Mexico 0 -53 0.5888889 0.142556265 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male ? 1 -38 0.422222227 0.1634803 0.875 0 0 0.353535354 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.0751442239 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.120921664 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -22 0.244444445 0.225427285 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -43 0.477777779 0.133424491 0.875 0 0 0.6060606 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 -41 0.455555558 0.239613935 0.625 0 0 0.4040404 State-gov Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.0130632017 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Handlers-cleaners Wife White Female United-States 0 -41 0.455555558 0.16339004 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.1403363 0.9375 1 0 0.454545468 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 -49 0.544444442 0.108201295 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -20 0.222222224 0.153527468 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -58 0.644444466 0.1331342 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 -35 0.3888889 0.145570338 0.5 0 0 0.4040404 Self-emp-not-inc 12th Never-married Other-service Not-in-family Black Female Trinadad&Tobago 0 -30 0.333333343 0.2196423 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -21 0.233333334 0.0385335833 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -29 0.322222233 0.06750096 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Machine-op-inspct Unmarried White Male United-States 0 -40 0.444444448 0.196127862 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -54 0.6 0.06291822 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Unmarried Asian-Pac-Islander Female United-States 1 -35 0.3888889 0.1289832 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.176049784 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.114655778 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Other-service Not-in-family White Female ? 0 -59 0.655555546 0.252524257 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Unmarried Black Female United-States 0 -43 0.477777779 0.2161938 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -39 0.433333337 0.227870181 0.375 0 0 0.6060606 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.091055125 0.25 0 0 0.3030303 Private 7th-8th Separated Machine-op-inspct Not-in-family Black Female United-States 0 -71 0.788888931 0.106357157 0.625 0.0296402965 0 0.6060606 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -33 0.366666675 0.429191 0.5 0 0 0.4040404 Private 12th Divorced Machine-op-inspct Unmarried Black Female United-States 0 -28 0.311111122 0.2896764 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Own-child Black Male United-States 0 -30 0.333333343 0.0843797252 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Sales Unmarried White Male United-States 0 -20 0.222222224 0.14949435 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Farming-fishing Other-relative White Male Mexico 0 -51 0.566666663 0.121367544 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.140619189 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 -62 0.6888889 0.05491596 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Asian-Pac-Islander Male United-States 1 -37 0.411111116 0.219261065 0.5625 0 0 0.6060606 Private HS-grad Never-married Exec-managerial Own-child White Male ? 0 -28 0.311111122 0.09581971 0.3125 0 0 0.5050505 Private 9th Never-married Machine-op-inspct Not-in-family White Male Dominican-Republic 0 -23 0.25555557 0.08661923 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Own-child Asian-Pac-Islander Male South 0 -39 0.433333337 0.187165812 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 0 -50 0.5555556 0.06737298 0.8125 0 0 0.656565666 Self-emp-inc Bachelors Widowed Sales Unmarried White Male United-States 1 -31 0.344444454 0.114008509 0.25 0 0 0.4040404 Private 7th-8th Never-married Craft-repair Unmarried White Male United-States 0 -45 0.5 0.108083427 0.8125 0 0.453856736 0.5050505 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.08350682 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Own-child Other Male United-States 0 -47 0.5222222 0.20063515 0.375 0 0 0.4040404 Private 10th Widowed Machine-op-inspct Not-in-family White Male United-States 0 -59 0.655555546 0.06676815 0.5625 0 0 0.181818187 Private HS-grad Widowed Prof-specialty Not-in-family White Female United-States 0 -32 0.355555564 0.0298995432 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -82 0.9111111 0.0198295284 0.25 0 0 0.05050505 ? 7th-8th Widowed ? Not-in-family White Male United-States 0 -49 0.544444442 0.1340529 0.8125 0 0.5544077 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -74 0.822222233 0.1222519 0.5625 0 0 0.171717167 Federal-gov HS-grad Widowed Other-service Not-in-family White Male United-States 0 -22 0.244444445 0.128392518 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -32 0.355555564 0.1311641 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male Greece 0 -34 0.377777785 0.0184413735 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -59 0.655555546 0.108190522 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.151229367 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -59 0.655555546 0.190613627 0.4375 0 0 0.4040404 Private 11th Divorced Adm-clerical Unmarried White Female United-States 0 -47 0.5222222 0.06865068 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -53 0.5888889 0.0909958556 0.5625 0 0.459595948 0.454545468 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -25 0.2777778 0.07640306 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Craft-repair Unmarried White Male United-States 0 -44 0.4888889 0.1676919 0.8125 0 0 0.656565666 Private Bachelors Divorced Adm-clerical Not-in-family Black Male United-States 0 -57 0.6333333 0.151770219 0.9375 0.1502415 0 0.353535354 Self-emp-not-inc Prof-school Married-civ-spouse Sales Wife White Female United-States 1 -42 0.466666669 0.10612344 0.8125 0 0.43663913 0.8080808 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -58 0.644444466 0.208852947 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -39 0.433333337 0.08728805 0.8125 0.0346403457 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.0357256159 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child Black Male United-States 0 -45 0.5 0.1375391 0.25 0 0 0.4848485 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Male United-States 0 -47 0.5222222 0.114045553 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Exec-managerial Wife Black Female United-States 1 -52 0.5777778 0.09055469 0.625 0 0 0.5050505 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -56 0.622222245 0.1594465 0.125 0 0 0.25252524 Self-emp-not-inc 1st-4th Separated Exec-managerial Not-in-family White Male ? 0 -52 0.5777778 0.0951710939 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -34 0.377777785 0.158364117 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -36 0.4 0.247200623 0.25 0 0 0.353535354 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.10042534 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Not-in-family White Male Poland 0 -30 0.333333343 0.2854237 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Male Mexico 0 -44 0.4888889 0.142626986 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Other Male Puerto-Rico 0 -17 0.188888893 0.07476098 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Female Philippines 0 -34 0.377777785 0.0383126624 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Unmarried White Female United-States 0 -41 0.455555558 0.150239944 0.625 0 0 0.4040404 Private Some-college Separated Other-service Not-in-family Black Male United-States 0 -29 0.322222233 0.2739009 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -25 0.2777778 0.139152229 0.3125 0 0 0.4848485 Private 9th Never-married Machine-op-inspct Other-relative White Male Mexico 0 -42 0.466666669 0.099353075 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Unmarried White Male United-States 0 -48 0.533333361 0.15871571 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -26 0.2888889 0.126339585 0.6875 0 0 0.5555556 Private Assoc-voc Never-married Sales Not-in-family White Male United-States 0 -64 0.7111111 0.08946693 0.5625 0.200512 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female ? 1 -46 0.51111114 0.187459469 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.187864929 0.8125 0 0.4331956 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.136753768 0.4375 0 0 0.4040404 State-gov 11th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -23 0.25555557 0.0981009752 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Black Female United-States 0 -46 0.51111114 0.09734661 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -30 0.333333343 0.0613893 0.5625 0 0 0.5555556 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 -49 0.544444442 0.142629012 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.07514153 0.6875 0 0 0.4040404 ? Assoc-voc Divorced ? Not-in-family White Male United-States 0 -44 0.4888889 0.121899642 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 1 -31 0.344444454 0.139783323 0.5625 0 0.383149683 0.5050505 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 -19 0.211111113 0.2813064 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -45 0.5 0.127897456 0.75 0.0545505434 0 0.3838384 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 -34 0.377777785 0.150340974 0.8125 0 0.4242424 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Peru 1 -26 0.2888889 0.07318491 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -38 0.422222227 0.127987042 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -31 0.344444454 0.149612218 0.625 0 0 0.434343427 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.111042939 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Separated Exec-managerial Not-in-family White Male United-States 0 -31 0.344444454 0.115162946 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.1254586 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -37 0.411111116 0.192648381 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.271726042 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 1 -21 0.233333334 0.1510125 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Wife Black Female United-States 0 -73 0.811111152 0.08295251 0.375 0 0 0.1010101 Private 10th Widowed Other-service Not-in-family White Female United-States 0 -38 0.422222227 0.06703487 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.08296463 0.375 0 0 0.5050505 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.155615434 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -52 0.5777778 0.214004129 0.8125 0.07688077 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -58 0.644444466 0.162359536 0.625 0 0 0.464646459 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.148222044 0.875 0 0 0.5050505 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -35 0.3888889 0.121466555 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.0214453377 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.123369962 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -27 0.3 0.260008574 0.625 0 0 0.4848485 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -31 0.344444454 0.3006375 1 0 0 0.5050505 Local-gov Doctorate Never-married Prof-specialty Not-in-family White Male Mexico 1 -45 0.5 0.01888254 0.625 0 0 0.5050505 Private Some-college Never-married Farming-fishing Other-relative White Male United-States 0 -40 0.444444448 0.190041125 0.5625 0 0 0.25252524 Private HS-grad Separated Other-service Other-relative White Female United-States 0 -27 0.3 0.129577264 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Adm-clerical Husband White Male United-States 0 -19 0.211111113 0.258392751 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -29 0.322222233 0.308076024 0.1875 0 0 0.25252524 Private 5th-6th Never-married Other-service Not-in-family White Male Mexico 0 -34 0.377777785 0.0540504679 0.625 0 0 0.727272749 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -32 0.355555564 0.107453674 0.75 0 0 0.4040404 State-gov Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.162226841 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male Cuba 0 -33 0.366666675 0.05620376 0.4375 0 0 0.4040404 Private 11th Divorced Exec-managerial Unmarried White Female United-States 1 -74 0.822222233 0.0201157816 0.25 0 0 0.02020202 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -62 0.6888889 0.124942668 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.0463263765 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.1485743 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -22 0.244444445 0.03444186 0.625 0 0 0.6060606 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -24 0.266666681 0.03674804 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -76 0.844444454 0.0190078169 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male Canada 1 -25 0.2777778 0.1356586 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 -19 0.211111113 0.02722763 0.625 0 0 0.282828271 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -31 0.344444454 0.127608523 0.75 0 0 0.414141417 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -53 0.5888889 0.135094851 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Other-relative White Female United-States 0 -61 0.677777767 0.0624305867 0.5625 0 0 0.0303030312 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -47 0.5222222 0.447779864 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male El-Salvador 0 -37 0.411111116 0.117956094 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -50 0.5555556 0.263362765 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -27 0.3 0.167922243 0.625 0 0 0.444444448 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -58 0.644444466 0.07487615 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.22559768 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -39 0.433333337 0.237251177 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 -36 0.4 0.117062986 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -56 0.622222245 0.10470026 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -26 0.2888889 0.0496320836 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -23 0.25555557 0.1532924 0.8125 0 0 0.3838384 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -47 0.5222222 0.108894363 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Not-in-family Black Male United-States 0 -68 0.75555557 0.0511300229 0.5 0 0 0.3030303 Private 12th Widowed Sales Not-in-family White Female United-States 0 -47 0.5222222 0.163367137 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family Black Male United-States 0 -45 0.5 0.23714745 0.625 0.07688077 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male Guatemala 1 -26 0.2888889 0.107585013 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -20 0.222222224 0.08838793 0.5625 0 0.365013778 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -46 0.51111114 0.121704318 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -37 0.411111116 0.127919018 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -37 0.411111116 0.2756029 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.07493206 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.198285192 0.875 0 0 0.4040404 Private Masters Widowed Prof-specialty Not-in-family White Female United-States 0 -39 0.433333337 0.116331533 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -32 0.355555564 0.0292334165 0.625 0 0.365013778 0.545454562 Private Some-college Divorced Farming-fishing Not-in-family White Female United-States 0 -63 0.7 0.07541094 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -45 0.5 0.166948318 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -59 0.655555546 0.07680448 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.2403427 0.5 0 0 0.353535354 ? 12th Never-married ? Not-in-family White Male United-States 0 -26 0.2888889 0.120989017 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Other-relative White Male United-States 0 -34 0.377777785 0.0133676389 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -41 0.455555558 0.156050533 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.141403183 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -53 0.5888889 0.133017674 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -33 0.366666675 0.176761717 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -46 0.51111114 0.190635175 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -79 0.8777778 0.09734796 0.5625 0 0 0.3030303 ? HS-grad Widowed ? Not-in-family Black Female United-States 0 -31 0.344444454 0.05620376 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried White Female United-States 0 -24 0.266666681 0.1451083 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Male United-States 0 -57 0.6333333 0.180676967 0.5625 0 0 0.6262626 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -40 0.444444448 0.121919848 0.5625 0 0 0.474747479 Private HS-grad Separated Other-service Unmarried White Female United-States 0 -41 0.455555558 0.09423825 0.6875 0 0.500229537 0.8484849 Self-emp-inc Assoc-voc Married-civ-spouse Sales Husband Other Male Mexico 0 -20 0.222222224 0.131857842 0.625 0 0 0.262626261 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -45 0.5 0.0843224749 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family Black Female United-States 0 -27 0.3 0.0395054929 0.6875 0 0 0.4040404 Private Assoc-voc Separated Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.169950932 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Craft-repair Other-relative White Male Mexico 0 -30 0.333333343 0.07847215 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Germany 0 -36 0.4 0.112472177 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -25 0.2777778 0.2520117 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Farming-fishing Not-in-family Other Male Mexico 0 -30 0.333333343 0.0652324855 0.625 0 0.3946281 0.25252524 ? Some-college Never-married ? Not-in-family White Female United-States 0 -31 0.344444454 0.1325435 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -49 0.544444442 0.125393257 0.5625 0.07688077 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.165438935 0.4375 0 0 0.2020202 Private 11th Never-married Handlers-cleaners Unmarried White Male United-States 0 -25 0.2777778 0.107585013 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -29 0.322222233 0.08746249 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -24 0.266666681 0.123130187 0.625 0.0332503319 0 0.5252525 Private Some-college Never-married Adm-clerical Own-child White Female Dominican-Republic 0 -41 0.455555558 0.211706713 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -35 0.3888889 0.06935789 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 -57 0.6333333 0.0289343689 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Wife White Female United-States 1 -21 0.233333334 0.172664613 0.4375 0 0 0.4040404 Private 11th Never-married Priv-house-serv Other-relative White Female Mexico 0 -29 0.322222233 0.09178726 0.375 0 0 0.323232323 Private 10th Never-married Other-service Own-child Black Female United-States 0 -36 0.4 0.191698685 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -20 0.222222224 0.124977015 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -51 0.566666663 0.09351824 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.022554649 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -36 0.4 0.056783 0.8125 0.0501305 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -40 0.444444448 0.150791571 0.9375 1 0 0.7070707 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -61 0.677777767 0.100796454 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.234887749 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -20 0.222222224 0.1585783 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Male United-States 0 -21 0.233333334 0.0232409816 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Own-child White Female United-States 0 -40 0.444444448 0.233692214 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 -46 0.51111114 0.129458711 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.20601669 0.625 0 0 0.545454562 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.311772376 0.375 0 0 0.5050505 Self-emp-not-inc 10th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -39 0.433333337 0.0602867231 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.134809941 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.120863073 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.140745133 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Unmarried Other Male Mexico 0 -32 0.355555564 0.02703702 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.0386959 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.220631719 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.101883538 0.5625 0.1502415 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female United-States 1 -44 0.4888889 0.1786658 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -38 0.422222227 0.137290582 0.5625 0.0346403457 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male Columbia 0 -51 0.566666663 0.110458307 0.5625 0 0 0.2020202 ? HS-grad Married-spouse-absent ? Not-in-family White Male United-States 1 -46 0.51111114 0.0190482289 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -51 0.566666663 0.197477624 1 0.1502415 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male Iran 1 -45 0.5 0.144558683 1 0.1502015 0 0.4040404 Private Doctorate Widowed Prof-specialty Unmarried White Male Iran 1 -20 0.222222224 0.248434544 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -44 0.4888889 0.2380244 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.108940832 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -18 0.2 0.06598146 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -61 0.677777767 0.105436437 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Separated Prof-specialty Not-in-family White Male United-States 1 -50 0.5555556 0.1334292 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -47 0.5222222 0.037298318 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Machine-op-inspct Own-child Black Male United-States 0 -34 0.377777785 0.117013149 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -53 0.5888889 0.252297938 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -39 0.433333337 0.117417268 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.05263066 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -66 0.733333349 0.128189772 0.5625 0 0 0.181818187 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 -26 0.2888889 0.0211153068 0.4375 0 0 0.5050505 Private 11th Never-married Farming-fishing Not-in-family White Male United-States 0 -41 0.455555558 0.164077714 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Adm-clerical Husband White Male Mexico 0 -47 0.5222222 0.0907055661 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.132701784 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband Amer-Indian-Eskimo Male United-States 0 -52 0.5777778 0.0792574957 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.114376262 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.4031818 0.3125 0 0 0.5050505 Private 9th Separated Handlers-cleaners Unmarried Black Female United-States 0 -42 0.466666669 0.08275112 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.111965008 0.625 0 0 0.3030303 Private Some-college Never-married Machine-op-inspct Not-in-family Black Female United-States 0 -41 0.455555558 0.126503915 0.5625 0.0288502872 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.229634851 0.8125 0.07298073 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -52 0.5777778 0.131198451 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -61 0.677777767 0.155804023 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.205830112 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Exec-managerial Unmarried White Male United-States 0 -19 0.211111113 0.017127309 0.625 0 0 0.25252524 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -46 0.51111114 0.12984331 0.8125 0.07688077 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.23336488 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -22 0.244444445 0.229923114 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -30 0.333333343 0.199104875 0.5625 0 0 0.4040404 State-gov HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.113784224 0.6875 0 0 0.323232323 Private Assoc-voc Divorced Other-service Not-in-family White Female United-States 0 -43 0.477777779 0.147206351 0.8125 0.0332503319 0 0.4040404 Private Bachelors Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 -37 0.411111116 0.226710364 0.1875 0 0 0.363636374 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -23 0.25555557 0.207586691 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Other-service Own-child White Male United-States 0 -39 0.433333337 0.24056834 0.75 0 0 0.5959596 Local-gov Assoc-acdm Divorced Prof-specialty Not-in-family White Male United-States 0 -54 0.6 0.3079649 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.191821948 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -20 0.222222224 0.120847575 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Female United-States 0 -50 0.5555556 0.2447658 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 -17 0.188888893 0.09374455 0.375 0 0 0.151515156 Private 10th Never-married Sales Own-child White Female United-States 0 -36 0.4 0.137052149 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.075809 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -53 0.5888889 0.0670005158 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -50 0.5555556 0.0631034449 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -38 0.422222227 0.14857161 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -63 0.7 0.131095409 0.5625 0 0 0.323232323 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.104253039 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.109185331 0.8125 0 0 0.5050505 ? Bachelors Divorced ? Not-in-family White Female United-States 0 -23 0.25555557 0.144501433 0.625 0 0 0.5050505 Self-emp-inc Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -20 0.222222224 0.109060049 0.5625 0 0 0.434343427 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -46 0.51111114 0.140054762 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 -28 0.311111122 0.174681842 0.375 0 0 0.4040404 Private 10th Never-married Other-service Other-relative Amer-Indian-Eskimo Male Mexico 0 -59 0.655555546 0.14036122 0.875 0 0 0.5050505 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -41 0.455555558 0.078393355 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.161500767 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -56 0.622222245 0.11743141 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male Italy 0 -50 0.5555556 0.0298833773 0.5625 0.1502415 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male El-Salvador 1 -31 0.344444454 0.127161965 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -41 0.455555558 0.0337588973 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Sales Own-child White Male United-States 0 -38 0.422222227 0.0750303939 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -25 0.2777778 0.102400817 0.75 0 0 0.4040404 State-gov Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 -18 0.2 0.09362332 0.5625 0 0 0.121212125 ? HS-grad Never-married ? Other-relative Other Female United-States 0 -49 0.544444442 0.167904735 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried Black Female United-States 0 -39 0.433333337 0.173587352 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -22 0.244444445 0.07622726 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 -21 0.233333334 0.101810127 0.625 0 0 0.25252524 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -35 0.3888889 0.3134131 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.240298241 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried White Female United-States 0 -38 0.422222227 0.245693251 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -55 0.6111111 0.133619145 0.25 0 0 0.2020202 Private 7th-8th Widowed Other-service Unmarried White Female ? 0 -31 0.344444454 0.221795574 0.5625 0 0 0.5555556 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -17 0.188888893 0.171656325 0.4375 0 0 0.2020202 Self-emp-inc 11th Never-married Prof-specialty Own-child White Male United-States 0 -31 0.344444454 0.137056187 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -25 0.2777778 0.150063485 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -39 0.433333337 0.06496375 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.114534542 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.07852065 0.8125 0 0 0.2020202 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -50 0.5555556 0.269416481 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -63 0.7 0.123666324 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.130702734 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -23 0.25555557 0.14174062 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -18 0.2 0.0291451849 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -43 0.477777779 0.07337821 0.8125 0 0 0.4848485 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -34 0.377777785 0.07724834 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.204868317 0.4375 0 0 0.353535354 Private 11th Never-married Sales Own-child White Male United-States 0 -46 0.51111114 0.33940953 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -35 0.3888889 0.22929 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Unmarried White Female United-States 1 -46 0.51111114 0.0718695 0.875 0 0 0.3838384 State-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -59 0.655555546 0.09859939 0.6875 0.07298073 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -31 0.344444454 0.1585426 0.25 0 0 0.3030303 Private 7th-8th Never-married Handlers-cleaners Not-in-family White Female Portugal 0 -27 0.3 0.0267157461 0.5625 0 0 0.373737365 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -41 0.455555558 0.07666372 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male England 0 -42 0.466666669 0.146713316 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male ? 0 -55 0.6111111 0.2352683 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.133149683 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family Black Female United-States 0 -44 0.4888889 0.0367123447 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -26 0.2888889 0.07936459 0.8125 0 0.383149683 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -36 0.4 0.110052839 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -69 0.7666667 0.059652254 0.3125 0.014240142 0 0.353535354 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 -33 0.366666675 0.217968553 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -30 0.333333343 0.0510236062 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -35 0.3888889 0.100291304 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 -25 0.2777778 0.0275576636 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 -21 0.233333334 0.122991435 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Male ? 0 -18 0.2 0.08825524 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Other-relative Black Male United-States 0 -35 0.3888889 0.113473721 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.08188024 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -26 0.2888889 0.0936873 0.875 0.0501305 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -46 0.51111114 0.240679473 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -31 0.344444454 0.190790772 0.8125 0 0 0.363636374 Private Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 -40 0.444444448 0.385767549 0.9375 0.05178052 0 0.4040404 Private Prof-school Married-civ-spouse Craft-repair Husband White Male Mexico 1 -40 0.444444448 0.212379575 0.5625 0 0.143480256 0.5252525 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -31 0.344444454 0.08113464 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -32 0.355555564 0.0439669825 1 0 0 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.140433967 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Adm-clerical Own-child White Male United-States 0 -25 0.2777778 0.07599826 0.875 0 0 0.4040404 Local-gov Masters Never-married Protective-serv Not-in-family White Male United-States 0 -37 0.411111116 0.178512231 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -18 0.2 0.0602665171 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -55 0.6111111 0.186049759 0.5625 0 0 0.3838384 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -52 0.5777778 0.246669888 0.3125 0 0 0.4040404 Private 9th Divorced Craft-repair Unmarried White Female Cuba 0 -26 0.2888889 0.102400817 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -37 0.411111116 0.138302892 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Male United-States 1 -39 0.433333337 0.051185254 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -62 0.6888889 0.129477575 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 -19 0.211111113 0.127040729 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Female United-States 0 -47 0.5222222 0.154735789 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.134496748 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -55 0.6111111 0.0356656723 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -30 0.333333343 0.148880079 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.077718474 0.625 0 0 0.363636374 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.1375391 0.375 0 0 0.656565666 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.228204265 0.625 0.1502415 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.132946953 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -31 0.344444454 0.0286151133 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -29 0.322222233 0.247662678 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Male United-States 0 -24 0.266666681 0.06903257 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -17 0.188888893 0.177642033 0.375 0 0 0.24242425 Private 10th Never-married Other-service Own-child White Male United-States 0 -47 0.5222222 0.07769759 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Female United-States 0 -46 0.51111114 0.127756014 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.190355659 0.5625 0 0 0.282828271 ? HS-grad Divorced ? Unmarried White Female United-States 0 -34 0.377777785 0.08597735 0.375 0 0 0.444444448 Private 10th Never-married Farming-fishing Not-in-family White Male ? 0 -63 0.7 0.155467257 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male Cuba 0 -21 0.233333334 0.202607259 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Male United-States 0 -18 0.2 0.11768803 0.5625 0 0 0.363636374 Private HS-grad Never-married Other-service Other-relative Black Male United-States 0 -49 0.544444442 0.123735018 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -81 0.900000036 0.09228635 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.143468231 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.241022974 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.111671343 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.127009079 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -46 0.51111114 0.06592757 0.8125 0 0 0.353535354 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -43 0.477777779 0.0713017061 0.625 0 0.43663913 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -39 0.433333337 0.0386770442 0.8125 0 0 0.353535354 Local-gov Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 -29 0.322222233 0.102024309 0.625 0 0 0.4040404 Private Some-college Separated Sales Not-in-family White Female United-States 0 -23 0.25555557 0.08727862 0.5625 0 0 0.161616161 Private HS-grad Never-married Handlers-cleaners Own-child Black Female United-States 0 -57 0.6333333 0.121855862 0.375 0 0 0.434343427 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.122863464 0.5625 0 0 0.424242437 Self-emp-not-inc HS-grad Never-married Sales Unmarried Black Female United-States 0 -25 0.2777778 0.169673443 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 -39 0.433333337 0.1260365 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -24 0.266666681 0.04650419 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family Black Male Jamaica 0 -56 0.622222245 0.129903927 0.875 0 0.453856736 0.444444448 Private Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.0499513373 0.5 0 0 0.4040404 Private 12th Divorced Sales Not-in-family White Female United-States 0 -23 0.25555557 0.0409825519 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Sales Unmarried White Female United-States 0 -17 0.188888893 0.1434999 0.4375 0 0 0.2020202 ? 11th Never-married ? Not-in-family Other Female United-States 0 -67 0.7444445 0.07816839 0.5625 0.0327303261 0 0.161616161 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -41 0.455555558 0.05549453 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male United-States 0 -24 0.266666681 0.09037553 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -51 0.566666663 0.1077049 0.8125 0.105201051 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family Black Male United-States 1 -30 0.333333343 0.07918745 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Divorced Other-service Not-in-family White Female United-States 0 -47 0.5222222 0.144250214 0.5625 0.1502415 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -56 0.622222245 0.03794087 0.5625 0 0 0.323232323 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -51 0.566666663 0.0239616632 0.5625 0 0 0.3838384 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -57 0.6333333 0.10046979 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.105856046 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -24 0.266666681 0.187330142 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -57 0.6333333 0.173233077 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.190692425 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -23 0.25555557 0.390817046 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Female United-States 0 -35 0.3888889 0.1549493 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -58 0.644444466 0.349568427 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.0251443889 0.5625 0.010550105 0 0.121212125 ? HS-grad Never-married ? Own-child White Female United-States 0 -19 0.211111113 0.246426731 0.25 0 0 0.4040404 ? 7th-8th Never-married ? Not-in-family White Male Mexico 0 -68 0.75555557 0.158874661 1 0 0.5456841 0.6060606 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.226653114 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.07782758 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 -53 0.5888889 0.033709053 1 0.07688077 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.257830352 1 0 0 1 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -21 0.233333334 0.121440291 0.8125 0 0 0.25252524 ? Bachelors Never-married ? Not-in-family Asian-Pac-Islander Male ? 0 -63 0.7 0.07141015 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.223868713 0.625 0 0 0.5050505 Private Some-college Married-spouse-absent Transport-moving Unmarried White Male United-States 0 -29 0.322222233 0.06429897 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -43 0.477777779 0.0647280142 0.625 0 0.4331956 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -27 0.3 0.0245435964 0.9375 0 0 0.656565666 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 -25 0.2777778 0.141027346 0.5625 0 0 0.323232323 Self-emp-not-inc HS-grad Never-married Other-service Other-relative White Male United-States 0 -28 0.311111122 0.03422498 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 -54 0.6 0.09689804 0.5625 0 0 0.353535354 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -74 0.822222233 0.0704928 0.625 0 0 0.121212125 ? Some-college Widowed ? Not-in-family White Female United-States 0 -31 0.344444454 0.0339744277 0.625 0 0 0.323232323 Local-gov Some-college Never-married Exec-managerial Own-child Amer-Indian-Eskimo Female United-States 0 -23 0.25555557 0.159358934 0.625 0 0 0.4848485 Private Some-college Never-married Tech-support Not-in-family White Male United-States 0 -19 0.211111113 0.06802631 0.8125 0 0 0.3030303 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -39 0.433333337 0.24428086 0.0625 0 0 0.2020202 ? Preschool Widowed ? Not-in-family White Female El-Salvador 0 -61 0.677777767 0.02183801 0.5625 0.2204022 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Wife White Female United-States 0 -59 0.655555546 0.103883266 0.5625 0.07688077 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 1 -27 0.3 0.103418529 0.6875 0 0 0.363636374 Self-emp-inc Assoc-voc Married-civ-spouse Other-service Wife White Female United-States 1 -19 0.211111113 0.122822382 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -23 0.25555557 0.128944144 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 -25 0.2777778 0.029781 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Adm-clerical Not-in-family Amer-Indian-Eskimo Female United-States 0 -40 0.444444448 0.06579623 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -53 0.5888889 0.140783519 0.4375 0 0 0.373737365 Private 11th Divorced Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.0646700859 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -72 0.8 0.03511674 1 0 0.549127638 0.25252524 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -61 0.677777767 0.107122965 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.09337478 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -17 0.188888893 0.0876436755 0.375 0.010550105 0 0.2020202 Private 10th Never-married Other-service Own-child Amer-Indian-Eskimo Female United-States 0 -73 0.811111152 0.16660212 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Transport-moving Husband White Male Canada 0 -41 0.455555558 0.1529361 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Separated Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.164861709 0.625 0 0 0.2020202 Private Some-college Never-married Machine-op-inspct Own-child Black Female Jamaica 0 -23 0.25555557 0.14522481 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Female Canada 0 -65 0.722222269 0.260436922 0.6875 0 0 0.151515156 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -45 0.5 0.119581334 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -52 0.5777778 0.415584922 0.8125 0.07688077 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Tech-support Husband Black Male United-States 1 -24 0.266666681 0.07887695 0.8125 0 0 0.272727281 Local-gov Bachelors Never-married Adm-clerical Own-child Black Female United-States 0 -23 0.25555557 0.2515988 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.0133676389 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Own-child White Female United-States 0 -26 0.2888889 0.1276954 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -37 0.411111116 0.0392960235 0.5625 0 0 0.565656543 Self-emp-not-inc HS-grad Divorced Farming-fishing Unmarried White Male United-States 0 -17 0.188888893 0.238566592 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -31 0.344444454 0.08043484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -52 0.5777778 0.2447658 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Other-relative White Female United-States 0 -63 0.7 0.122491 0.8125 0 0 0.272727281 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -27 0.3 0.1309836 0.5625 0 0 0.6060606 Private HS-grad Never-married Priv-house-serv Not-in-family White Female United-States 0 -31 0.344444454 0.16658394 0.3125 0.031370312 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -71 0.788888931 0.08805184 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.159567058 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -44 0.4888889 0.2547651 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -36 0.4 0.08133602 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 0 -22 0.244444445 0.136850089 0.8125 0 0 0.2020202 Private Bachelors Never-married Exec-managerial Other-relative White Female United-States 0 -32 0.355555564 0.08776424 0.5625 0 0.3409091 0.4848485 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -30 0.333333343 0.2374492 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -60 0.6666667 0.128661245 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -25 0.2777778 0.133176625 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -76 0.844444454 0.2129615 0.25 0 0 0.121212125 Private 7th-8th Widowed Protective-serv Not-in-family White Female United-States 0 -41 0.455555558 0.06009679 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -26 0.2888889 0.19690983 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband Other Male United-States 0 -45 0.5 0.2051384 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male ? 0 -32 0.355555564 0.121435575 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -22 0.244444445 0.243473962 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -39 0.433333337 0.147160545 0.8125 0 0.4242424 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -63 0.7 0.15610981 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Transport-moving Not-in-family White Male United-States 0 -23 0.25555557 0.1278584 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Transport-moving Unmarried White Female United-States 0 -61 0.677777767 0.156467453 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.0224340875 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.224742964 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.114939332 0.5625 0.010550105 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -39 0.433333337 0.231293768 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -53 0.5888889 0.112066709 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female China 0 -26 0.2888889 0.0323963352 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -21 0.233333334 0.09635719 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Own-child White Male United-States 0 -18 0.2 0.07052176 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 -34 0.377777785 0.0205407813 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.1174139 0.875 0.07688077 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -31 0.344444454 0.193085492 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 -44 0.4888889 0.04005779 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -42 0.466666669 0.254854679 0.9375 0 0.43663913 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.165583059 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -33 0.366666675 0.184697971 0.8125 0.07688077 0 0.3838384 Private Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male United-States 1 -21 0.233333334 0.230736077 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child Black Female United-States 0 -30 0.333333343 0.138782457 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -55 0.6111111 0.157750532 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -57 0.6333333 0.0977898 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.157263562 0.5625 0 0 0.5050505 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -32 0.355555564 0.231782749 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -62 0.6888889 0.115386561 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.122236408 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Sales Not-in-family Black Male United-States 1 -51 0.566666663 0.1720288 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male France 1 -37 0.411111116 0.176741511 0.875 0 0.04889807 0.454545468 Private Masters Divorced Exec-managerial Unmarried White Female United-States 0 -45 0.5 0.134430751 0.1875 0 0 0.3838384 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male Mexico 0 -47 0.5222222 0.05706588 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.152813524 0.5625 0 0 0.75757575 ? HS-grad Divorced ? Own-child White Male United-States 0 -75 0.8333334 0.124155983 0.4375 0 0 0.3030303 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.06871735 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband Other Male United-States 0 -39 0.433333337 0.123861648 0.75 0.07688077 0 0.6060606 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male Germany 1 -30 0.333333343 0.0372403935 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.101047009 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Other-relative White Male Guatemala 0 -44 0.4888889 0.0677467957 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Amer-Indian-Eskimo Male United-States 0 -53 0.5888889 0.122418262 0.875 0 0 0.353535354 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 1 -40 0.444444448 0.1013858 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -18 0.2 0.07225476 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 -33 0.366666675 0.16650109 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Protective-serv Husband Black Male England 0 -20 0.222222224 0.196657926 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -38 0.422222227 0.182517737 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -48 0.533333361 0.0421666279 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -46 0.51111114 0.119123332 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -51 0.566666663 0.0358300135 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.180356368 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Other-service Other-relative White Female United-States 0 -24 0.266666681 0.207586691 0.25 0 0 0.4040404 Private 7th-8th Never-married Handlers-cleaners Other-relative White Male Mexico 0 -30 0.333333343 0.206359521 0.625 0 0 0.5050505 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 -70 0.7777778 0.023906434 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.19665052 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -34 0.377777785 0.0545111671 0.5625 0 0.3838384 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.183085531 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -70 0.7777778 0.08216649 0.5625 0 0 0.05050505 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -37 0.411111116 0.02089506 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -36 0.4 0.0245334934 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Divorced Sales Unmarried White Female United-States 0 -23 0.25555557 0.274589241 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Other-relative White Female Mexico 0 -28 0.311111122 0.162924618 0.5625 0 0.373737365 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.106792264 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.09453932 0.5625 0.0332503319 0 0.3030303 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -53 0.5888889 0.08313369 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.0269817915 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -26 0.2888889 0.195517629 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 -21 0.233333334 0.16789262 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -34 0.377777785 0.07150848 0.875 0 0 0.5050505 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -43 0.477777779 0.0515166335 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.29500407 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Other-relative Black Male United-States 0 -41 0.455555558 0.076483205 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 1 -36 0.4 0.107846342 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Vietnam 0 -41 0.455555558 0.23107554 0.8125 0 0.399449021 0.2020202 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -27 0.3 0.2739009 0.5625 0.04416044 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -42 0.466666669 0.02533702 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.07688935 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -41 0.455555558 0.07783499 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Own-child White Male United-States 0 -32 0.355555564 0.238427162 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Other-relative Asian-Pac-Islander Female China 1 -21 0.233333334 0.23229599 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Male United-States 0 -44 0.4888889 0.193136021 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -29 0.322222233 0.13079837 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -19 0.211111113 0.139151558 0.625 0 0 0.222222224 Self-emp-not-inc Some-college Never-married Other-service Own-child White Female United-States 0 -21 0.233333334 0.401949227 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Own-child White Male Guatemala 0 -46 0.51111114 0.0382843725 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -38 0.422222227 0.07581372 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.09908366 0.625 0 0 0.4848485 Private Some-college Never-married Adm-clerical Unmarried White Male United-States 1 -54 0.6 0.118096866 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.158213928 0.875 0 0.453856736 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.200802863 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -50 0.5555556 0.146212891 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -30 0.333333343 0.06584271 0.6875 0 0 0.363636374 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -30 0.333333343 0.102288336 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.0174202956 0.5625 0 0 0.353535354 Local-gov HS-grad Never-married Exec-managerial Unmarried Amer-Indian-Eskimo Female United-States 0 -26 0.2888889 0.07369747 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.136774644 0.625 0 0 0.434343427 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.07263598 0.5625 0.05178052 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -64 0.7111111 0.1781795 0.875 0 0 0.05050505 State-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -18 0.2 0.100116864 0.5625 0 0 0.282828271 Private HS-grad Never-married Sales Own-child White Female United-States 0 -30 0.333333343 0.08470505 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -36 0.4 0.03610549 0.6875 0.03908039 0 0.08080808 ? Assoc-voc Married-civ-spouse ? Wife White Female United-States 0 -18 0.2 0.130491242 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Other-relative Black Male United-States 0 -27 0.3 0.396647841 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.07786934 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 -46 0.51111114 0.149776563 0.5625 0 0 0.434343427 State-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -37 0.411111116 0.124845676 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -30 0.333333343 0.11695724 0.625 0 0 0.4040404 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 -29 0.322222233 0.0209913757 0.5625 0 0 0.3030303 Private HS-grad Divorced Prof-specialty Not-in-family Other Female Germany 0 -22 0.244444445 0.3488875 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male Mexico 0 -25 0.2777778 0.1273162 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -38 0.422222227 0.1994504 0.5625 0 0 0.3030303 Private HS-grad Separated Priv-house-serv Unmarried Black Female United-States 0 -32 0.355555564 0.431320041 0.8125 0 0 0.4040404 ? Bachelors Divorced ? Unmarried White Female United-States 0 -35 0.3888889 0.225156516 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -56 0.622222245 0.214487061 0.875 0 0 0.8080808 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 -29 0.322222233 0.117304787 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -41 0.455555558 0.0806362256 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -47 0.5222222 0.09612617 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.109511994 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 -46 0.51111114 0.159527987 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.104305573 0.5625 0 0.430670351 0.4040404 Local-gov HS-grad Never-married Protective-serv Other-relative Black Male United-States 0 -39 0.433333337 0.113755934 0.8125 0 0 0.2020202 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 -42 0.466666669 0.232315511 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Wife White Female United-States 0 -39 0.433333337 0.0224657431 0.5625 0.07298073 0 0.4848485 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -68 0.75555557 0.132539466 0.25 0 0 0.3030303 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -37 0.411111116 0.19634743 0.8125 0.1502415 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -57 0.6333333 0.1146652 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 -22 0.244444445 0.24890399 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family Black Female United-States 0 -24 0.266666681 0.0157863013 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Adm-clerical Not-in-family White Male United-States 1 -19 0.211111113 0.136507258 0.625 0 0 0.5050505 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -55 0.6111111 0.115699753 0.75 0 0 0.3030303 Private Assoc-acdm Divorced Sales Unmarried Black Female United-States 0 -37 0.411111116 0.178151891 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -37 0.411111116 0.16457209 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -28 0.311111122 0.140842125 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 -27 0.3 0.126214981 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -40 0.444444448 0.0805399045 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 -51 0.566666663 0.131409943 0.5625 0 0 0.4040404 Private HS-grad Divorced Priv-house-serv Own-child White Female United-States 0 -52 0.5777778 0.06853348 0.6875 0 0 0.565656543 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 -74 0.822222233 0.0645414442 0.625 0 0 0.0303030312 ? Some-college Widowed ? Not-in-family White Female United-States 0 -49 0.544444442 0.244259968 0.625 0.1502415 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.020078063 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -40 0.444444448 0.05208577 0.625 0 0 0.5050505 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -80 0.8888889 0.05894639 0.625 0 0.416896224 0.6060606 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -63 0.7 0.07632762 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -63 0.7 0.0648606941 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Unmarried White Male United-States 1 -51 0.566666663 0.160118684 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.135362253 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -66 0.733333349 0.143096447 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Widowed Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.08861559 0.5625 0 0 0.6666667 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -49 0.544444442 0.12518245 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.1562472 0.625 0 0 0.323232323 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -33 0.366666675 0.07945215 0.75 0 0.4331956 0.6060606 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.05265154 0.625 0 0 0.4040404 Private Some-college Married-AF-spouse Protective-serv Husband White Male United-States 0 -52 0.5777778 0.110550582 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.115319878 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.09474205 0.8125 0 0 0.454545468 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 -23 0.25555557 0.167896658 0.5625 0 0 0.75757575 Private HS-grad Never-married Exec-managerial Own-child Black Male United-States 0 -53 0.5888889 0.0793740153 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 -19 0.211111113 0.03527435 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -26 0.2888889 0.0645286441 0.625 0.0332503319 0 0.4040404 Federal-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -53 0.5888889 0.0925625 0.25 0 0 0.6060606 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 1 -65 0.722222269 0.113858983 0.5625 0 0 0.1010101 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -68 0.75555557 0.228441343 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.3399497 0.375 0 0 0.181818187 Private 10th Never-married Sales Other-relative White Male Guatemala 0 -28 0.311111122 0.08949253 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.09149292 0.375 0 0 0.454545468 Local-gov 10th Married-civ-spouse Protective-serv Husband White Male United-States 0 -30 0.333333343 0.0240074638 0.5625 0 0 0.1010101 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -22 0.244444445 0.133459508 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -25 0.2777778 0.148243591 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -19 0.211111113 0.1768129 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Other-relative White Male United-States 0 -19 0.211111113 0.285486341 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 -32 0.355555564 0.0751442239 0.9375 0 0 0.4040404 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.130730346 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -51 0.566666663 0.2835021 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -25 0.2777778 0.133272946 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -46 0.51111114 0.170482352 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 -38 0.422222227 0.139108449 0.625 0 0 0.5050505 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 -26 0.2888889 0.0474484824 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband Asian-Pac-Islander Male United-States 1 -46 0.51111114 0.135526583 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 -25 0.2777778 0.141422033 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -20 0.222222224 0.132514536 0.625 0.005940059 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 -29 0.322222233 0.118045 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Other-relative White Male United-States 0 -51 0.566666663 0.20539771 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.122088231 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.135362253 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.02521713 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Farming-fishing Unmarried White Male United-States 0 -31 0.344444454 0.266160637 0.6875 0 0 0.24242425 Private Assoc-voc Married-civ-spouse Other-service Wife Amer-Indian-Eskimo Female Mexico 0 -54 0.6 0.0218124148 0.5625 0 0 0.3030303 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -34 0.377777785 0.237901136 0.75 0 0 0.6060606 Private Assoc-acdm Separated Craft-repair Not-in-family White Male United-States 0 -19 0.211111113 0.0260112286 0.625 0 0 0.6666667 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -21 0.233333334 0.119694486 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 -21 0.233333334 0.128484115 0.375 0 0 0.7070707 Private 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -23 0.25555557 0.0187080931 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.31700775 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -40 0.444444448 0.0483180173 0.875 0 0 0.464646459 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -57 0.6333333 0.0499466248 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -48 0.533333361 0.136368513 0.8125 0 0.3409091 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.08350682 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male Vietnam 0 -43 0.477777779 0.130324885 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -32 0.355555564 0.11442408 0.8125 0 0 0.2020202 ? Bachelors Never-married ? Not-in-family White Female ? 0 -40 0.444444448 0.08794407 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -52 0.5777778 0.0608625971 0.9375 1 0 0.353535354 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.05620241 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -45 0.5 0.161037385 0.625 0.031370312 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 -62 0.6888889 0.10195224 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -29 0.322222233 0.0381422564 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -49 0.544444442 0.07886752 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried White Female United-States 0 -55 0.6111111 0.127961457 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -20 0.222222224 0.02348076 0.625 0 0 0.727272749 ? Some-college Never-married ? Own-child Amer-Indian-Eskimo Male United-States 0 -37 0.411111116 0.08531998 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -43 0.477777779 0.134576231 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -29 0.322222233 0.0387928933 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.0696832 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 1 -28 0.311111122 0.1902048 0.625 0 0 0.4040404 Private Some-college Separated Tech-support Unmarried White Male United-States 1 -38 0.422222227 0.201279715 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -45 0.5 0.0224286988 0.6875 0 0.453856736 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.206122428 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -19 0.211111113 0.2064161 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -20 0.222222224 0.127896115 0.5 0 0 0.4040404 Private 12th Never-married Other-service Not-in-family White Male United-States 0 -60 0.6666667 0.0564832762 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -30 0.333333343 0.0790682361 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -22 0.244444445 0.08751503 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male ? 0 -51 0.566666663 0.120569408 0.625 0 0 0.6060606 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -31 0.344444454 0.253033429 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Unmarried Black Female ? 0 -48 0.533333361 0.21290493 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -43 0.477777779 0.197551027 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -51 0.566666663 0.118373685 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Transport-moving Unmarried Black Male United-States 0 -41 0.455555558 0.08198127 0.6875 0 0.4242424 0.4848485 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -62 0.6888889 0.0639393 0.6875 0.03411034 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 0 -50 0.5555556 0.1544226 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 -46 0.51111114 0.09619959 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 1 -54 0.6 0.0153181944 0.625 0.1502415 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -68 0.75555557 0.051438503 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -23 0.25555557 0.145570338 0.75 0 0 0.3030303 Self-emp-not-inc Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 -49 0.544444442 0.07235444 0.875 0 0 0.353535354 Private Masters Never-married Sales Not-in-family White Female United-States 0 -24 0.266666681 0.4115491 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -30 0.333333343 0.24451457 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband Black Male United-States 0 -38 0.422222227 0.114514336 0.5625 0.031370312 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.0928804055 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -22 0.244444445 0.217332065 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -30 0.333333343 0.0160153024 0.25 0 0 0.4040404 Private 7th-8th Separated Handlers-cleaners Not-in-family White Male United-States 0 -61 0.677777767 0.09957871 0.25 0 0 0.3131313 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.118379749 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Male United-States 0 -51 0.566666663 0.112115875 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.0863552 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female Vietnam 1 -54 0.6 0.08584534 0.625 0 0 0.4848485 Federal-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -63 0.7 0.09072442 0.5625 0 0 0.25252524 Private HS-grad Widowed Prof-specialty Not-in-family White Female United-States 0 -51 0.566666663 0.171232671 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -63 0.7 0.107573561 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.0783226341 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.09882031 0.5625 0 0 0.353535354 Private HS-grad Divorced Sales Own-child White Female United-States 0 -35 0.3888889 0.243744045 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -31 0.344444454 0.01788436 0.8125 0 0 0.25252524 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 -46 0.51111114 0.022108769 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Separated Craft-repair Unmarried White Male United-States 0 -53 0.5888889 0.152062535 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 1 -26 0.2888889 0.265189379 0.625 0 0 0.24242425 Federal-gov Some-college Divorced Adm-clerical Own-child White Male United-States 0 -43 0.477777779 0.108014055 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -39 0.433333337 0.129188627 0.5625 0.1502415 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.119194724 0.5625 0 0.365013778 0.4040404 Federal-gov HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 -54 0.6 0.022807898 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -62 0.6888889 0.123045996 0.625 0 0 0.454545468 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 -57 0.6333333 0.09527752 0.625 0 0 0.4040404 State-gov Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -19 0.211111113 0.117351934 0.625 0 0 0.24242425 ? Some-college Never-married ? Own-child Black Male United-States 0 -29 0.322222233 0.06425048 0.5625 0 0 0.2020202 Local-gov HS-grad Never-married Other-service Own-child White Male United-States 0 -20 0.222222224 0.148915112 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative Black Male United-States 0 -53 0.5888889 0.070385024 0.8125 0 0.43663913 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.294907749 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -22 0.244444445 0.08838793 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -23 0.25555557 0.333997667 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male El-Salvador 0 -69 0.7666667 0.12506929 0.4375 0 0 0.2020202 Private 11th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -56 0.622222245 0.135934085 0.25 0 0.459595948 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -53 0.5888889 0.3700001 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 0 -28 0.311111122 0.166662738 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -28 0.311111122 0.134414583 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband Black Male United-States 0 -33 0.366666675 0.0936596841 0.5625 0 0 0.8484849 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Taiwan 1 -48 0.533333361 0.124630146 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -61 0.677777767 0.111890242 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -49 0.544444442 0.0556669533 0.8125 0.0501305 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -48 0.533333361 0.07360048 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.275022984 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.125505075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.08813603 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Not-in-family White Male United-States 0 -19 0.211111113 0.169447139 0.625 0 0 0.141414136 Private Some-college Never-married Other-service Own-child White Male United-States 0 -47 0.5222222 0.051600825 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -25 0.2777778 0.0151855089 0.8125 0 0 0.6060606 Private Bachelors Never-married Transport-moving Own-child White Male United-States 0 -72 0.8 0.0361580253 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 0 -29 0.322222233 0.123679116 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Not-in-family White Male United-States 0 -22 0.244444445 0.0493047461 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -57 0.6333333 0.0730286539 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Other-service Husband Black Male England 0 -50 0.5555556 0.0783233047 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male Columbia 0 -45 0.5 0.0981319547 0.625 0 0 0.3030303 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -52 0.5777778 0.219677314 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 1 -53 0.5888889 0.135465965 0.875 0 0 0.4848485 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.168916389 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -46 0.51111114 0.221064791 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.26971218 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 -75 0.8333334 0.06464921 0.1875 0 0 0.1010101 Private 5th-6th Widowed Other-service Unmarried Black Male United-States 0 -32 0.355555564 0.08597735 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.168840945 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.07001391 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -17 0.188888893 0.134840935 0.4375 0 0 0.353535354 Private 11th Never-married Sales Own-child White Female United-States 0 -46 0.51111114 0.199225441 0.6875 0 0 0.3838384 State-gov Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -39 0.433333337 0.12921153 0.75 0 0 0.3030303 Private Assoc-acdm Separated Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.0556487665 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 -36 0.4 0.108255848 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -63 0.7 0.07398709 0.8125 0 0 0.212121218 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 -28 0.311111122 0.228932351 0.125 0 0 0.434343427 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -28 0.311111122 0.025065586 0.8125 0 0 0.454545468 ? Bachelors Never-married ? Own-child White Male United-States 0 -49 0.544444442 0.250082672 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.284121782 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -38 0.422222227 0.0200053211 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.07906015 0.5625 0 0 0.6262626 Private HS-grad Never-married Tech-support Not-in-family White Male England 0 -42 0.466666669 0.161666468 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family Black Female United-States 0 -40 0.444444448 0.228153065 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -45 0.5 0.0191007648 0.5625 0 0 0.1010101 ? HS-grad Separated ? Unmarried White Female United-States 0 -29 0.322222233 0.212180883 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried White Female United-States 0 -24 0.266666681 0.211843431 0.8125 0 0.3996786 0.454545468 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -30 0.333333343 0.11652483 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -44 0.4888889 0.193136021 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 -40 0.444444448 0.110449553 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.147718236 0.5625 0 0 0.353535354 Private HS-grad Never-married Machine-op-inspct Other-relative White Female Puerto-Rico 0 -42 0.466666669 0.0297170151 0.875 0 0.430670351 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -52 0.5777778 0.069908835 0.6875 0 0 0.353535354 Self-emp-not-inc Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 -42 0.466666669 0.209221363 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 -39 0.433333337 0.103708148 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.117582284 0.625 0 0 0.454545468 Private Some-college Divorced Prof-specialty Unmarried White Male United-States 0 -62 0.6888889 0.05549116 0.5625 0.105661057 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.139592037 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male England 0 -83 0.922222257 0.169697687 0.5625 0 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -39 0.433333337 0.502986133 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.207648 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Transport-moving Wife White Female United-States 0 -49 0.544444442 0.06858265 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -25 0.2777778 0.07342132 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.278414249 0.4375 0 0.459595948 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.07930936 0.75 0 0 0.08080808 ? Assoc-acdm Divorced ? Not-in-family White Male United-States 0 -44 0.4888889 0.199585781 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -36 0.4 0.1403363 0.3125 0.046500463 0 0.565656543 Private 9th Divorced Handlers-cleaners Not-in-family White Male United-States 0 -40 0.444444448 0.08101071 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male Ireland 0 -21 0.233333334 0.130139664 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Own-child Black Female Jamaica 0 -41 0.455555558 0.0581927076 0.625 0 0 0.3838384 Private Some-college Separated Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.14497897 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -67 0.7444445 0.0838348344 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -24 0.266666681 0.154003 0.8125 0 0 0.3838384 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -50 0.5555556 0.2602517 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -48 0.533333361 0.06519679 0.875 0 0 0.353535354 Private Masters Divorced Sales Not-in-family White Male United-States 0 -55 0.6111111 0.07187084 0.75 0 0 0.2020202 ? Assoc-acdm Married-civ-spouse ? Husband Black Male United-States 1 -29 0.322222233 0.107609257 0.5625 0.0332503319 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male Ecuador 0 -50 0.5555556 0.09393381 0.8125 0 0 0.363636374 Private Bachelors Divorced Prof-specialty Unmarried White Female Ireland 0 -64 0.7111111 0.371015131 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.04614048 0.3125 0 0 0.373737365 Private 9th Divorced Other-service Not-in-family Black Male United-States 0 -20 0.222222224 0.08231602 0.5625 0 0 0.5252525 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -30 0.333333343 0.107389688 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.054312475 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 -52 0.5777778 0.1295813 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -22 0.244444445 0.1288633 0.625 0 0 0.25252524 Private Some-college Never-married Protective-serv Own-child White Male United-States 0 -77 0.8555556 0.09920085 0.5625 0 0 0.141414136 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -19 0.211111113 0.0491740778 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 -52 0.5777778 0.1197935 0.5625 0 0 0.5555556 Private HS-grad Divorced Craft-repair Other-relative White Male United-States 1 -42 0.466666669 0.109788142 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Tech-support Own-child Asian-Pac-Islander Female United-States 0 -35 0.3888889 0.06435689 0.5625 0 0 0.363636374 Private HS-grad Separated Exec-managerial Not-in-family White Female United-States 0 -27 0.3 0.0843925253 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -54 0.6 0.133485109 0.5625 0 0 0.3838384 State-gov HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -37 0.411111116 0.199331865 0.5625 0 0.373737365 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.123033196 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -28 0.311111122 0.08412783 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -63 0.7 0.115602091 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -19 0.211111113 0.2534106 0.5625 0 0 0.424242437 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -28 0.311111122 0.106008269 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 -23 0.25555557 0.07702339 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 -44 0.4888889 0.119979389 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 -31 0.344444454 0.139557019 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.0838436 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family Asian-Pac-Islander Male ? 1 -64 0.7111111 0.0687698945 0.5625 0 0 0.5050505 Private HS-grad Divorced Priv-house-serv Not-in-family White Female United-States 0 -40 0.444444448 0.06198942 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -59 0.655555546 0.159241065 0.75 0 0 0.5050505 Local-gov Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 -22 0.244444445 0.270064443 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.272493869 0.625 0 0 0.444444448 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -35 0.3888889 0.15327692 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -20 0.222222224 0.09828013 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -35 0.3888889 0.128123775 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Own-child White Male United-States 0 -28 0.311111122 0.240152091 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.0447718576 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 -37 0.411111116 0.116020359 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -72 0.8 0.0800846 1 0 0.549127638 0.0606060624 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 -25 0.2777778 0.109812386 0.75 0 0 0.6060606 Self-emp-inc Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 -37 0.411111116 0.060321074 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.0239151884 0.625 0 0 0.454545468 ? Some-college Never-married ? Own-child White Female United-States 0 -31 0.344444454 0.1099902 0.6875 0 0 0.3838384 Private Assoc-voc Divorced Sales Own-child White Female United-States 0 -41 0.455555558 0.129798174 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -31 0.344444454 0.256719679 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Tech-support Husband White Male United-States 1 -44 0.4888889 0.149816975 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.0233756881 0.625 0 0 0.474747479 Private Some-college Never-married Exec-managerial Not-in-family Black Male United-States 0 -57 0.6333333 0.03223334 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -26 0.2888889 0.1314847 0.5625 0 0 0.121212125 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -44 0.4888889 0.0698071346 0.5625 0.0501305 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male Greece 0 -29 0.322222233 0.221879765 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 -36 0.4 0.123669013 0.5625 0 0.453856736 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.124001063 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.142375082 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Other-service Not-in-family Black Male Jamaica 0 -21 0.233333334 0.04160894 0.625 0 0 0.7070707 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -34 0.377777785 0.2156617 0.9375 0 0 0.4848485 Self-emp-not-inc Prof-school Separated Prof-specialty Unmarried White Male United-States 1 -24 0.266666681 0.134332418 0.8125 0 0 0.151515156 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -28 0.311111122 0.2105388 0.375 0 0 0.4040404 Private 10th Divorced Other-service Not-in-family White Female United-States 0 -35 0.3888889 0.113608427 0.5625 0 0 0.5050505 Private HS-grad Separated Transport-moving Own-child White Male United-States 0 -35 0.3888889 0.0589719862 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -38 0.422222227 0.148461148 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -44 0.4888889 0.2725114 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -39 0.433333337 0.0667237 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Wife White Female Poland 1 -57 0.6333333 0.07407061 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Other-service Not-in-family White Female United-States 0 -19 0.211111113 0.166128635 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -29 0.322222233 0.03867637 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.196165577 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative Black Male United-States 0 -50 0.5555556 0.110262983 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -51 0.566666663 0.1618894 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.0174815878 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 -44 0.4888889 0.0684263855 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.15349178 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 -31 0.344444454 0.15158096 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -27 0.3 0.15388377 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.165270552 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -50 0.5555556 0.10549099 0.9375 0.07688077 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 -27 0.3 0.02359526 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -31 0.344444454 0.174343735 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Unmarried Black Female United-States 0 -46 0.51111114 0.128049016 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.0430455878 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -40 0.444444448 0.343551069 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.1420262 0.4375 0 0 0.4040404 Private 11th Divorced Sales Own-child White Male United-States 0 -18 0.2 0.177155733 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -51 0.566666663 0.206630275 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -58 0.644444466 0.07027187 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 -66 0.733333349 0.2294961 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.194371954 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife Asian-Pac-Islander Female South 0 -38 0.422222227 0.162837058 0.4375 0 0 0.6060606 Private 11th Divorced Handlers-cleaners Not-in-family White Female United-States 0 -25 0.2777778 0.07480139 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Exec-managerial Own-child White Male United-States 0 -25 0.2777778 0.07049347 0.5625 0 0 0.222222224 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -90 1 0.2114804 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -41 0.455555558 0.0350487158 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.09873275 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -33 0.366666675 0.08875568 0.8125 0.009140091 0 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried White Female Germany 0 -33 0.366666675 0.1712266 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.102989487 0.8125 0 0.4331956 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.1426445 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child Black Female United-States 0 -59 0.655555546 0.108009338 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -19 0.211111113 0.260802656 0.625 0 0.3946281 0.161616161 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -39 0.433333337 0.125981927 0.5625 0.0406404063 0 0.3838384 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -19 0.211111113 0.140683845 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -27 0.3 0.114252329 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -52 0.5777778 0.136697859 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.0541973 0.5625 0 0 0.24242425 Self-emp-not-inc HS-grad Divorced Other-service Own-child White Female United-States 0 -28 0.311111122 0.274581164 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Female United-States 0 -37 0.411111116 0.163955137 0.5625 0 0 0.5050505 Private HS-grad Divorced Other-service Other-relative White Female Peru 0 -50 0.5555556 0.117844291 0.375 0 0 1 ? 10th Married-civ-spouse ? Husband White Male United-States 0 -36 0.4 0.234047174 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.09844448 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.30270794 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -19 0.211111113 0.118204631 0.4375 0 0 0.3030303 ? 11th Never-married ? Own-child White Female United-States 0 -33 0.366666675 0.1945336 0.5625 0 0.518365443 0.8484849 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -27 0.3 0.0908012 0.875 0 0 0.5252525 Local-gov Masters Never-married Prof-specialty Own-child White Male United-States 0 -31 0.344444454 0.128241643 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -21 0.233333334 0.175534531 0.375 0 0 0.363636374 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.030715866 0.5625 0 0 0.545454562 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -59 0.655555546 0.0456932522 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -40 0.444444448 0.164694 0.875 0 0.43663913 0.4848485 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.289937079 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -47 0.5222222 0.131135821 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -34 0.377777785 0.06347052 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Unmarried White Male United-States 0 -57 0.6333333 0.126846746 0.5625 0 0 0.7878788 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -51 0.566666663 0.09845795 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -21 0.233333334 0.1192998 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -30 0.333333343 0.0460226126 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.06441414 0.625 0 0 0.454545468 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 -40 0.444444448 0.1605228 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -52 0.5777778 0.280277222 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Other-service Not-in-family White Male El-Salvador 0 -23 0.25555557 0.191960022 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family Asian-Pac-Islander Male Taiwan 0 -90 1 0.172771022 0.8125 0.009910099 0 0.1010101 ? Bachelors Widowed ? Other-relative White Female United-States 0 -25 0.2777778 0.125475436 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.127153888 0.625 0 0 0.454545468 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 -38 0.422222227 0.0211166535 0.625 0 0 0.4040404 State-gov Some-college Divorced Protective-serv Unmarried Amer-Indian-Eskimo Female United-States 1 -22 0.244444445 0.133099169 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 -33 0.366666675 0.10907352 0.8125 0.010550105 0 0.4040404 Local-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.185517 0.625 0.05178052 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -65 0.722222269 0.243631572 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 -50 0.5555556 0.09764095 0.5625 0 0 0.151515156 Private HS-grad Never-married Tech-support Own-child White Male United-States 0 -29 0.322222233 0.128334582 0.8125 0.068490684 0 0.4848485 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -25 0.2777778 0.119914062 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -54 0.6 0.206764981 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -49 0.544444442 0.05922254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -44 0.4888889 0.163412258 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -24 0.266666681 0.103835441 0.3125 0 0 0.4040404 Private 9th Divorced Other-service Own-child White Female United-States 0 -25 0.2777778 0.344399065 0.8125 0 0 0.3838384 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -65 0.722222269 0.148868635 0.5625 0 0 0.2020202 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -56 0.622222245 0.149647236 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -39 0.433333337 0.08524859 0.9375 0.1502415 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.136285663 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -20 0.222222224 0.128256455 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -24 0.266666681 0.160918832 0.1875 0 0 0.4040404 Private 5th-6th Never-married Craft-repair Unmarried White Male El-Salvador 0 -41 0.455555558 0.149488956 0.625 0 0.4331956 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.02559229 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -55 0.6111111 0.09907558 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.187412992 0.5625 0 0 0.4848485 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.131616041 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -44 0.4888889 0.0513206348 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -45 0.5 0.080912374 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.125286847 0.625 0 0 0.121212125 Self-emp-not-inc Some-college Never-married Adm-clerical Own-child White Female Germany 0 -29 0.322222233 0.138682768 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -43 0.477777779 0.0844645947 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -30 0.333333343 0.148068473 0.5 0 0 0.4040404 Private 12th Divorced Machine-op-inspct Not-in-family White Male United-States 0 -28 0.311111122 0.0130632017 0.625 0 0 0.3838384 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.150418431 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.07682469 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -36 0.4 0.0644262657 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female Iran 1 -38 0.422222227 0.119421035 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -66 0.733333349 0.2018017 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -63 0.7 0.07926221 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -21 0.233333334 0.160066143 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 -33 0.366666675 0.101414084 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -46 0.51111114 0.0718695 0.625 0.01506015 0 0.5050505 State-gov Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -20 0.222222224 0.117675908 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 -47 0.5222222 0.118513778 0.8125 0.0332503319 0 0.6060606 Self-emp-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 -33 0.366666675 0.09703207 1 0 0 0.5555556 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -66 0.733333349 0.07214363 0.25 0 0 0.3030303 ? 7th-8th Never-married ? Other-relative Black Male United-States 0 -20 0.222222224 0.03647324 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Female ? 0 -28 0.311111122 0.10301777 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -46 0.51111114 0.128299564 0.5625 0 0 0.282828271 Private HS-grad Divorced Priv-house-serv Unmarried White Female Ecuador 0 -25 0.2777778 0.206550121 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 0 -37 0.411111116 0.131438911 0.5625 0.031370312 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Own-child White Male United-States 0 -31 0.344444454 0.152639076 0.3125 0 0 0.6060606 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.106128156 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.0154683935 0.625 0 0 0.2020202 State-gov Some-college Married-spouse-absent Tech-support Unmarried White Male United-States 0 -52 0.5777778 0.25572893 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Other-service Wife White Female United-States 1 -29 0.322222233 0.300772876 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 0 -18 0.2 0.0281497 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 -31 0.344444454 0.06089358 0.625 0 0 0.353535354 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.0845225155 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Female Vietnam 0 -27 0.3 0.08733115 0.6875 0 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Wife Amer-Indian-Eskimo Female United-States 1 -54 0.6 0.07055139 0.375 0 0 0.656565666 Self-emp-not-inc 10th Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.11394991 0.5625 0 0 0.4949495 Local-gov HS-grad Divorced Other-service Unmarried White Female Dominican-Republic 0 -46 0.51111114 0.218666345 0.875 0 0.43663913 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male ? 1 -24 0.266666681 0.08235441 0.8125 0 0 0.4040404 Private Bachelors Never-married Farming-fishing Own-child White Female United-States 0 -17 0.188888893 0.07732041 0.4375 0 0 0.181818187 ? 11th Never-married ? Own-child White Female United-States 0 -49 0.544444442 0.195127651 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Separated Other-service Not-in-family White Male United-States 0 -54 0.6 0.0927396342 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -41 0.455555558 0.05698775 0.8125 0 0.43663913 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.112338141 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -36 0.4 0.234880328 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.234451964 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male Haiti 0 -63 0.7 0.104078591 0.625 0 0 0.4040404 Private Some-college Widowed Other-service Not-in-family White Female United-States 0 -67 0.7444445 0.194227815 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male Canada 1 -23 0.25555557 0.122813627 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -22 0.244444445 0.164588928 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -66 0.733333349 0.0689854249 0.6875 0 0 0.3030303 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -25 0.2777778 0.174908817 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.06650008 0.625 0 0 0.2020202 Private Some-college Divorced Machine-op-inspct Unmarried White Female United-States 0 -35 0.3888889 0.117771544 0.5625 0.0288502872 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -67 0.7444445 0.09550517 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.220381826 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Not-in-family Black Male United-States 0 -26 0.2888889 0.05185946 0.625 0 0 0.3838384 Private Some-college Never-married Machine-op-inspct Not-in-family Black Female United-States 0 -34 0.377777785 0.175496146 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -21 0.233333334 0.249874562 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -18 0.2 0.08689269 0.5 0 0 0.1010101 Private 12th Never-married Craft-repair Own-child White Male United-States 0 -21 0.233333334 0.304868639 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -76 0.844444454 0.08136027 0.3125 0 0 0.4040404 Self-emp-inc 9th Married-civ-spouse Prof-specialty Husband White Male United-States 0 -51 0.566666663 0.0305340122 0.625 0 0 0.7070707 Federal-gov Some-college Married-civ-spouse Protective-serv Husband Asian-Pac-Islander Male ? 0 -26 0.2888889 0.15459165 0.5625 0 0 0.565656543 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -18 0.2 0.08580021 0.5 0 0 0.25252524 Private 12th Never-married Other-service Not-in-family White Female United-States 0 -18 0.2 0.266428024 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child White Male United-States 0 -34 0.377777785 0.08043484 0.6875 0 0.3838384 0.5050505 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -59 0.655555546 0.130594969 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -55 0.6111111 0.109842025 0.8125 0.14084141 0 0.454545468 Private Bachelors Separated Exec-managerial Not-in-family White Male United-States 1 -33 0.366666675 0.104628868 0.625 0 0 0.727272749 Self-emp-not-inc Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 -25 0.2777778 0.0497708321 0.5625 0 0 0.1010101 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -48 0.533333361 0.07252754 0.5625 0 0 0.1010101 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 -64 0.7111111 0.216316372 0.8125 0 0 0.05050505 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 -47 0.5222222 0.104357436 0.875 0 0 0.454545468 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 1 -26 0.2888889 0.06984553 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -36 0.4 0.0427755 0.75 0 0 0.4848485 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.164236 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -54 0.6 0.1260998 0.25 0 0 0.25252524 ? 7th-8th Never-married ? Not-in-family White Female United-States 0 -30 0.333333343 0.0394671 0.5625 0 0 0.444444448 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -41 0.455555558 0.128166884 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -53 0.5888889 0.106655531 0.875 0.0861408561 0 0.353535354 ? Masters Never-married ? Not-in-family White Female United-States 1 -34 0.377777785 0.04187027 0.625 0 0 0.3030303 Private Some-college Never-married Sales Other-relative Black Male United-States 0 -20 0.222222224 0.206875443 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 -24 0.266666681 0.1886799 0.375 0 0 0.4949495 Private 10th Never-married Sales Not-in-family White Male El-Salvador 0 -26 0.2888889 0.07997279 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -25 0.2777778 0.115251184 0.5625 0 0 0.4848485 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.114257045 0.625 0 0 0.363636374 Private Some-college Divorced Sales Unmarried White Female United-States 0 -41 0.455555558 0.08450231 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 1 -33 0.366666675 0.09795482 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -18 0.2 0.102499828 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -27 0.3 0.157421172 0.5625 0 0 0.3838384 Self-emp-inc HS-grad Separated Adm-clerical Not-in-family White Male United-States 0 -32 0.355555564 0.103699394 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -51 0.566666663 0.0593518578 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Not-in-family Black Male United-States 0 -38 0.422222227 0.06488158 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried Black Female United-States 0 -41 0.455555558 0.0445327535 0.625 0 0 0.25252524 Local-gov Some-college Married-civ-spouse Transport-moving Wife White Female United-States 0 -26 0.2888889 0.122703165 0.625 0.0282902829 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.0361203067 0.6875 0 0 0.353535354 Self-emp-not-inc Assoc-voc Divorced Exec-managerial Unmarried White Male United-States 0 -54 0.6 0.117777608 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.0445839427 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family White Female Outlying-US(Guam-USVI-etc) 0 -31 0.344444454 0.04970415 0.625 0 0 0.3030303 Private Some-college Widowed Exec-managerial Unmarried White Female United-States 0 -26 0.2888889 0.01910548 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -75 0.8333334 0.156085551 1 0.04931049 0 0.0303030312 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -29 0.322222233 0.160210282 0.875 0 0 0.4040404 Private Masters Never-married Transport-moving Own-child Black Male United-States 0 -61 0.677777767 0.131644338 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.07875908 0.625 0 0 0.454545468 Private Some-college Separated Sales Unmarried White Female United-States 0 -22 0.244444445 0.0591814555 0.5 0 0 0.3030303 ? 12th Never-married ? Not-in-family White Male United-States 0 -34 0.377777785 0.307400465 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 0 -42 0.466666669 0.177549079 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Own-child White Male United-States 0 -24 0.266666681 0.17747499 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 -42 0.466666669 0.123772062 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male ? 0 -27 0.3 0.31636253 0.5625 0 0.454545438 0.4040404 Federal-gov HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 -39 0.433333337 0.0762798041 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -20 0.222222224 0.09346503 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -51 0.566666663 0.203505754 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family Black Female United-States 0 -68 0.75555557 0.1709875 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -28 0.311111122 0.144714266 0.5625 0 0 0.4848485 Federal-gov HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -43 0.477777779 0.163989484 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Not-in-family White Female United-States 0 -35 0.3888889 0.113897376 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.06952088 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -41 0.455555558 0.0385484 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family White Male United-States 0 -44 0.4888889 0.1537814 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -20 0.222222224 0.146440536 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 -46 0.51111114 0.124631494 0.5625 0 0 0.75757575 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.0251241829 0.75 0.07688077 0 0.7070707 Self-emp-not-inc Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 1 -32 0.355555564 0.175832242 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -46 0.51111114 0.0402551368 0.625 0 0 0.5050505 Private Some-college Divorced Sales Not-in-family White Male United-States 0 -26 0.2888889 0.224651366 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -20 0.222222224 0.0898171738 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female Vietnam 0 -36 0.4 0.06686177 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Wife White Female United-States 0 -49 0.544444442 0.137824684 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.02297022 0.5625 0.03103031 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.210592 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.22199899 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.189277336 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -22 0.244444445 0.1854813 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Other-relative White Male United-States 0 -52 0.5777778 0.08700516 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.259708822 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.135501 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -72 0.8 0.0258367825 0.5625 0 0 0.161616161 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -30 0.333333343 0.04970415 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Not-in-family White Female United-States 0 -44 0.4888889 0.04557875 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -23 0.25555557 0.173516631 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -22 0.244444445 0.12127123 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 -59 0.655555546 0.441862881 0.8125 0 0 0.6060606 Private Bachelors Separated Adm-clerical Unmarried White Male United-States 0 -46 0.51111114 0.145445064 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 -30 0.333333343 0.32916978 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -64 0.7111111 0.134234071 0.25 0 0 0.3030303 Federal-gov 7th-8th Widowed Other-service Unmarried White Female Puerto-Rico 0 -31 0.344444454 0.2058941 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife Black Female United-States 0 -64 0.7111111 0.07745242 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -45 0.5 0.05944952 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -59 0.655555546 0.113537036 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -32 0.355555564 0.1181467 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative Black Female Jamaica 0 -43 0.477777779 0.108591273 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband Amer-Indian-Eskimo Male United-States 0 -66 0.733333349 0.108435683 0.375 0.0108601088 0 0.2020202 ? 10th Divorced ? Not-in-family White Female United-States 0 -23 0.25555557 0.140497953 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -49 0.544444442 0.13502413 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.172835 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -49 0.544444442 0.119002767 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Unmarried White Female United-States 0 -33 0.366666675 0.139092952 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 0 -28 0.311111122 0.14322038 0.9375 0 0 0.858585835 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.100170746 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 -41 0.455555558 0.179503679 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -34 0.377777785 0.161818013 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.241782039 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -20 0.222222224 0.08368127 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -21 0.233333334 0.292792171 0.625 0 0 0.151515156 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -25 0.2777778 0.137628689 0.5625 0 0 0.3030303 Private HS-grad Never-married Farming-fishing Unmarried White Male ? 0 -46 0.51111114 0.16289027 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 -37 0.411111116 0.128875434 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Cambodia 0 -41 0.455555558 0.149488956 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.0750876442 0.5625 0 0.3452709 0.5050505 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -30 0.333333343 0.0439669825 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -54 0.6 0.08985152 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.112086914 0.5625 0 0 1 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -58 0.644444466 0.09574831 0.5625 0 0 0.121212125 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -21 0.233333334 0.149174422 0.625 0 0 0.25252524 Private Some-college Never-married Tech-support Own-child White Female Ecuador 0 -35 0.3888889 0.12788938 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.187514022 0.9375 0 0 0.8080808 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.124408558 0.625 0 0 0.2020202 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -48 0.533333361 0.119737595 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -56 0.622222245 0.185857132 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male Nicaragua 0 -65 0.722222269 0.151863843 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Widowed Craft-repair Not-in-family White Female United-States 0 -40 0.444444448 0.1949229 0.8125 0 0 0.353535354 Private Bachelors Separated Adm-clerical Unmarried Black Male United-States 0 -26 0.2888889 0.181221187 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.302655429 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.144414544 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -32 0.355555564 0.0539218225 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -35 0.3888889 0.136072159 0.8125 0.2782828 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -22 0.244444445 0.0831410959 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -37 0.411111116 0.128998026 0.6875 0 0 0.3838384 Private Assoc-voc Separated Prof-specialty Own-child White Female United-States 0 -25 0.2777778 0.207545608 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male Mexico 0 -64 0.7111111 0.110597059 0.125 0 0 0.535353541 Private 1st-4th Married-civ-spouse Transport-moving Husband White Male ? 0 -46 0.51111114 0.13814193 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.131844372 0.5625 0 0 0.272727281 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -63 0.7 0.100865833 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Male United-States 1 -51 0.566666663 0.1618894 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -68 0.75555557 0.162439 0.25 0 0 0.161616161 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.2403427 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male Canada 0 -28 0.311111122 0.07793131 0.625 0 0 0.5050505 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -41 0.455555558 0.09236987 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Sales Husband White Male United-States 0 -47 0.5222222 0.199410662 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -22 0.244444445 0.270312965 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 -33 0.366666675 0.123102568 0.8125 0 0 0.8080808 ? Bachelors Never-married ? Own-child Asian-Pac-Islander Male Philippines 0 -34 0.377777785 0.125832409 0.9375 0.1502415 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.109238535 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.06601311 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Adm-clerical Own-child White Female United-States 0 -36 0.4 0.1162103 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.0539925434 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -33 0.366666675 0.0296079032 0.875 0.07688077 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.109538257 0.5625 0.07298073 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -56 0.622222245 0.0777407 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -54 0.6 0.0679818541 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -29 0.322222233 0.182109579 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Unmarried Black Female United-States 0 -40 0.444444448 0.013544105 0.625 0 0 0.8484849 Private Some-college Divorced Handlers-cleaners Not-in-family Amer-Indian-Eskimo Female United-States 0 -53 0.5888889 0.07729347 0.875 0.1502415 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.06758582 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -33 0.366666675 0.1245372 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -28 0.311111122 0.0587584749 0.5625 0 0 0.5050505 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -63 0.7 0.08578337 0.625 0 0 0.121212125 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 0 -53 0.5888889 0.13451831 1 0.1502415 0 0.6060606 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male Germany 1 -37 0.411111116 0.0963545 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.0245766 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Unmarried White Male United-States 0 -22 0.244444445 0.09543849 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -40 0.444444448 0.0177530218 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.13169755 0.8125 0.0861408561 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -21 0.233333334 0.0202323031 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -25 0.2777778 0.0842989 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband Black Male Jamaica 0 -20 0.222222224 0.165857866 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Female United-States 0 -43 0.477777779 0.0521113649 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.239487991 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Exec-managerial Unmarried White Female United-States 0 -32 0.355555564 0.121642351 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.135909155 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.17256695 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male South 0 -27 0.3 0.0988506153 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -22 0.244444445 0.142767757 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female Iran 0 -29 0.322222233 0.135053769 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -29 0.322222233 0.03545216 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.0182184335 0.625 0 0 0.2020202 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -35 0.3888889 0.07484854 0.375 0 0 0.4040404 Private 10th Never-married Adm-clerical Own-child White Male United-States 0 -31 0.344444454 0.234415591 0.8125 0 0.43663913 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male Puerto-Rico 1 -33 0.366666675 0.06326509 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -67 0.7444445 0.2679529 0.625 0 0.3533058 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -46 0.51111114 0.022761425 0.625 0 0 0.1010101 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -45 0.5 0.12003395 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 -17 0.188888893 0.129258 0.4375 0 0 0.2020202 Local-gov 11th Never-married Sales Own-child White Male United-States 0 -35 0.3888889 0.229075819 0.8125 0 0.4242424 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.09004752 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-spouse-absent Exec-managerial Not-in-family Black Male Jamaica 1 -49 0.544444442 0.09995117 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Female United-States 0 -20 0.222222224 0.08992696 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Female United-States 0 -27 0.3 0.122358993 0.5625 0.0501305 0 0.464646459 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Canada 0 -64 0.7111111 0.107573561 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.117221944 0.625 0 0 0.4040404 Federal-gov Some-college Separated Craft-repair Not-in-family Black Male United-States 0 -52 0.5777778 0.07927501 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.025065586 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.03152613 0.5625 1 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -48 0.533333361 0.21375291 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -30 0.333333343 0.28667447 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Other-relative White Male Mexico 0 -34 0.377777785 0.05564944 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -19 0.211111113 0.04281928 0.625 0 0 0.5050505 ? Some-college Never-married ? Own-child White Male United-States 0 -39 0.433333337 0.09487002 0.5625 0 0 0.5050505 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -28 0.311111122 0.124644965 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Other-relative White Male United-States 0 -17 0.188888893 0.107844993 0.5 0 0 0.1010101 Private 12th Never-married Sales Not-in-family White Female ? 0 -54 0.6 0.190394729 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.09267228 0.625 0 0.404499531 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -25 0.2777778 0.133469611 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 -25 0.2777778 0.08941103 0.4375 0 0 0.121212125 Private 11th Divorced Other-service Unmarried White Female United-States 0 -48 0.533333361 0.0210573822 0.625 0.05178052 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -24 0.266666681 0.269042671 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 -31 0.344444454 0.0185181573 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband Asian-Pac-Islander Male Taiwan 0 -47 0.5222222 0.248238549 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.06876518 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 -19 0.211111113 0.273507535 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -52 0.5777778 0.0676942542 0.625 0.1502415 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -52 0.5777778 0.0199756864 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -19 0.211111113 0.0137865776 0.5625 0 0 0.121212125 ? HS-grad Never-married ? Other-relative Asian-Pac-Islander Female South 0 -60 0.6666667 0.12255162 0.5625 0 0 0.282828271 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -43 0.477777779 0.204872355 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.114548013 0.75 0 0 0.3030303 Private Assoc-acdm Divorced Other-service Own-child White Female United-States 0 -20 0.222222224 0.130272344 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -51 0.566666663 0.131277263 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.241099745 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Divorced Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.14461863 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.139810935 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -54 0.6 0.09861151 0.625 0 0 0.4040404 Private Some-college Widowed Exec-managerial Unmarried White Female United-States 0 -35 0.3888889 0.230108336 0.8125 0 0 0.5050505 Private Bachelors Never-married Other-service Other-relative White Male United-States 0 -52 0.5777778 0.08865802 0.4375 0 0 0.4040404 Private 11th Separated Machine-op-inspct Unmarried Black Male United-States 0 -53 0.5888889 0.05983815 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.0868186 0.625 0 0 0.4040404 ? Some-college Widowed ? Not-in-family Black Female United-States 0 -35 0.3888889 0.2809555 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried Black Male United-States 0 -43 0.477777779 0.2268215 0.625 0 0.2020202 0.424242437 Self-emp-not-inc Some-college Divorced Sales Unmarried White Female United-States 0 -29 0.322222233 0.140971437 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male Canada 0 -29 0.322222233 0.0814882442 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -27 0.3 0.0343670957 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -58 0.644444466 0.147019789 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male Mexico 0 -64 0.7111111 0.07745242 0.5625 0 0 0.181818187 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -53 0.5888889 0.225958019 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -21 0.233333334 0.117533788 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.155234888 0.75 0 0 0.3030303 Self-emp-not-inc Assoc-acdm Divorced Exec-managerial Not-in-family White Male United-States 0 -52 0.5777778 0.100794435 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male Iran 1 -38 0.422222227 0.100638852 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 -40 0.444444448 0.2300383 0.625 0 0 0.3030303 ? Some-college Divorced ? Not-in-family White Female United-States 0 -39 0.433333337 0.124670558 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -56 0.622222245 0.08953294 0.875 0 0 0.5050505 ? Masters Never-married ? Not-in-family White Female United-States 1 -68 0.75555557 0.08653032 1 0 0 0.5555556 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.08417228 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -40 0.444444448 0.231736273 0.9375 0 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.193136021 0.9375 0 0 1 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -38 0.422222227 0.200039074 0.8125 0 0 0.7070707 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -45 0.5 0.08330342 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.156276166 0.4375 0 0 0.5555556 Private 11th Never-married Machine-op-inspct Own-child White Male United-States 0 -57 0.6333333 0.03520363 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.08027319 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Not-in-family Black Female United-States 0 -25 0.2777778 0.1288 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female Yugoslavia 0 -52 0.5777778 0.0160166509 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 -56 0.622222245 0.124302812 0.375 0 0 0.565656543 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 -26 0.2888889 0.16343382 0.625 0 0 0.4848485 Self-emp-inc Some-college Never-married Sales Not-in-family White Male United-States 0 -19 0.211111113 0.1658417 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 -25 0.2777778 0.05842575 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -25 0.2777778 0.0719934255 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -21 0.233333334 0.310388267 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Other-relative White Male United-States 0 -48 0.533333361 0.143557146 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male Italy 0 -33 0.366666675 0.0249679238 0.875 0 0 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male Canada 0 -31 0.344444454 0.06303542 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Protective-serv Own-child Other Male United-States 0 -26 0.2888889 0.143636614 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Divorced Farming-fishing Unmarried White Male United-States 0 -37 0.411111116 0.0315308422 0.8125 0 0 0.3838384 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -29 0.322222233 0.113741793 0.625 0 0 0.3030303 ? Some-college Divorced ? Unmarried White Female United-States 0 -20 0.222222224 0.1917802 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -28 0.311111122 0.208539754 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband Other Male ? 0 -49 0.544444442 0.13296783 0.5625 0 0 0.2020202 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -73 0.811111152 0.0894029438 0.375 0 0 0.04040404 ? 10th Never-married ? Not-in-family White Male United-States 0 -49 0.544444442 0.124631494 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.107498795 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -40 0.444444448 0.0832199 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.185505539 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Own-child White Female United-States 0 -18 0.2 0.112579271 0.5 0 0 0.24242425 Private 12th Never-married Sales Own-child White Male United-States 0 -41 0.455555558 0.133078963 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband Black Male United-States 1 -46 0.51111114 0.117941953 0.5625 0 0.3409091 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -46 0.51111114 0.07914165 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -64 0.7111111 0.121506296 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 -50 0.5555556 0.09874218 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.0968690738 0.875 0 0 0.363636374 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.03501369 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -22 0.244444445 0.0324111544 0.625 0 0 0.25252524 State-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -37 0.411111116 0.158150613 0.8125 0.07430074 0 0.454545468 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 1 -39 0.433333337 0.0439979658 0.9375 0 0 0.5555556 Federal-gov Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 -30 0.333333343 0.203507766 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male India 0 -25 0.2777778 0.113425225 0.8125 0 0.3996786 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -26 0.2888889 0.107696146 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Unmarried Black Female United-States 0 -43 0.477777779 0.280418 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -59 0.655555546 0.249621987 0.5625 0 0 0.6060606 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -27 0.3 0.147753939 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Unmarried White Female Jamaica 0 -55 0.6111111 0.08147746 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband Black Male United-States 1 -20 0.222222224 0.0154683935 0.625 0 0 0.121212125 Private Some-college Never-married Other-service Own-child White Male Canada 0 -25 0.2777778 0.0232645553 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female Canada 0 -28 0.311111122 0.128663272 0.75 0 0 0.4040404 Private Assoc-acdm Separated Other-service Not-in-family White Male United-States 0 -29 0.322222233 0.07237667 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -60 0.6666667 0.08205806 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.1574892 0.8125 0.1502415 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -25 0.2777778 0.0497331135 0.4375 0 0 0.4040404 Private 11th Divorced Sales Own-child White Female United-States 0 -27 0.3 0.07352639 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.0694164857 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.0200457331 0.625 0.0501305 0 0.7070707 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -46 0.51111114 0.07542172 0.25 0 0 0.474747479 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.101114362 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Unmarried Black Female United-States 0 -21 0.233333334 0.2033084 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -35 0.3888889 0.19986327 0.4375 0.068490684 0 0.6060606 ? 11th Separated ? Not-in-family White Female United-States 0 -40 0.444444448 0.07947774 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -49 0.544444442 0.10058362 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.0246520359 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -43 0.477777779 0.07988119 0.8125 0 0.143480256 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -39 0.433333337 0.188099325 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Transport-moving Not-in-family Black Male United-States 0 -35 0.3888889 0.121923216 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -52 0.5777778 0.111805379 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -25 0.2777778 0.146922112 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family Black Male Outlying-US(Guam-USVI-etc) 0 -20 0.222222224 0.122717984 0.5625 0 0 0.3030303 Self-emp-inc HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -46 0.51111114 0.0265123378 0.625 0 0 0.1010101 Private Some-college Divorced Other-service Unmarried White Female ? 0 -24 0.266666681 0.0942955 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -29 0.322222233 0.130167276 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Craft-repair Other-relative Asian-Pac-Islander Male India 0 -21 0.233333334 0.128808752 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -37 0.411111116 0.140019059 0.8125 0 0 0.5050505 Federal-gov Bachelors Divorced Exec-managerial Other-relative White Female United-States 0 -43 0.477777779 0.142418861 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -19 0.211111113 0.124441557 0.5625 0 0 0.262626261 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.133249372 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -61 0.677777767 0.156467453 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -21 0.233333334 0.127896115 0.75 0 0 0.5555556 ? Assoc-acdm Never-married ? Not-in-family White Male United-States 0 -35 0.3888889 0.203147426 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -60 0.6666667 0.09879 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -27 0.3 0.151741251 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -57 0.6333333 0.10002593 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 -56 0.622222245 0.09187886 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.08490576 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -47 0.5222222 0.0492111221 0.25 0 0 0.353535354 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife Black Female United-States 0 -19 0.211111113 0.0262853578 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.02225021 0.5 0 0 0.3030303 Self-emp-not-inc 12th Divorced Other-service Unmarried White Female United-States 0 -43 0.477777779 0.130324885 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -63 0.7 0.09930593 0.625 0 0 0.353535354 Local-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -22 0.244444445 0.103139013 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -25 0.2777778 0.04355815 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Own-child Asian-Pac-Islander Female Philippines 0 -35 0.3888889 0.151814 0.5625 0.0861408561 0 0.4040404 Self-emp-not-inc HS-grad Never-married Machine-op-inspct Own-child White Male United-States 1 -20 0.222222224 0.117458351 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -48 0.533333361 0.25443238 0.375 0 0 0.7070707 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.24537535 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female Germany 0 -31 0.344444454 0.07452188 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.0473090634 0.5625 0 0 0.24242425 Private HS-grad Never-married Sales Own-child Asian-Pac-Islander Female Philippines 0 -57 0.6333333 0.0220205374 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.06401743 0.6875 0.07688077 0 0.444444448 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 1 -33 0.366666675 0.178443536 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Other-relative White Female United-States 0 -27 0.3 0.247408748 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -34 0.377777785 0.0377354436 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -22 0.244444445 0.125581846 0.375 0 0 0.3030303 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 -50 0.5555556 0.08447267 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife Black Female United-States 1 -40 0.444444448 0.163050577 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.02089506 0.5625 0 0 0.5151515 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.267626226 0.75 0 0 0.4040404 ? Assoc-acdm Divorced ? Not-in-family White Male United-States 0 -53 0.5888889 0.285631835 0.875 0.1502415 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.07337956 0.625 0.07688077 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -25 0.2777778 0.176451892 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -51 0.566666663 0.0373858772 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -22 0.244444445 0.196272671 0.5 0 0 0.4040404 ? 12th Never-married ? Own-child Black Male United-States 0 -18 0.2 0.2379988 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Male United-States 0 -41 0.455555558 0.0453551374 0.4375 0.07688077 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -33 0.366666675 0.158354014 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -33 0.366666675 0.14021641 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -67 0.7444445 0.28528294 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -47 0.5222222 0.0978578255 0.5625 0 0.5544077 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.271886349 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -32 0.355555564 0.0332220867 0.25 0 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Other-service Husband White Male United-States 0 -29 0.322222233 0.2495405 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female Mexico 0 -25 0.2777778 0.179841787 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Sales Not-in-family White Male United-States 0 -33 0.366666675 0.129221633 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -55 0.6111111 0.05418248 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.255807042 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.113414451 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -18 0.2 0.203372389 0.5625 0.3409534 0 0.0303030312 Private HS-grad Never-married Protective-serv Own-child White Male United-States 0 -36 0.4 0.185093343 0.5625 0 0 0.5050505 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -58 0.644444466 0.157063529 0.5625 0 0 0.272727281 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.2018145 0.875 0 0.43663913 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.159220859 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -21 0.233333334 0.463630825 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -36 0.4 0.0249335729 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -37 0.411111116 0.09969321 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife Black Female United-States 1 -43 0.477777779 0.0828279 0.5625 0 0 0.212121218 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female Trinadad&Tobago 0 -52 0.5777778 0.235599 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 -48 0.533333361 0.1548092 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Not-in-family White Female ? 0 -43 0.477777779 0.07337821 0.625 0 0 0.3838384 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -22 0.244444445 0.159963086 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -57 0.6333333 0.127211809 0.1875 0.06497065 0 0.4040404 Private 5th-6th Divorced Transport-moving Unmarried White Male United-States 0 -37 0.411111116 0.218237966 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.0555585138 0.625 0 0 0.3838384 Private Some-college Divorced Sales Unmarried Asian-Pac-Islander Female United-States 0 -54 0.6 0.1393974 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.0249800477 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Not-in-family White Male United-States 0 -21 0.233333334 0.102740951 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -65 0.722222269 0.09668857 0.625 0 0 0.3838384 Private Some-college Separated Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.08502834 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -22 0.244444445 0.08566348 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Not-in-family White Female United-States 0 -26 0.2888889 0.110471778 0.8125 0.0406404063 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.141566172 0.4375 0 0 0.4040404 Private 11th Separated Craft-repair Own-child White Male United-States 0 -35 0.3888889 0.07915916 0.6875 0 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Wife White Female United-States 1 -47 0.5222222 0.08417363 0.6875 0.1502415 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.122662082 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Other-service Own-child White Male United-States 0 -42 0.466666669 0.148210585 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 1 -39 0.433333337 0.16701971 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family Asian-Pac-Islander Male United-States 0 -55 0.6111111 0.0337871835 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.08295251 0.875 0 0 0.1010101 State-gov Masters Married-spouse-absent Prof-specialty Not-in-family Asian-Pac-Islander Female China 0 -46 0.51111114 0.148152 0.8125 0.07298073 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Machine-op-inspct Husband White Male ? 1 -53 0.5888889 0.05342745 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.0869533047 0.4375 0 0 0.6060606 Private 11th Separated Other-service Unmarried Black Female United-States 0 -40 0.444444448 0.141627461 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Unmarried Black Female United-States 0 -48 0.533333361 0.1276092 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.115251184 0.6875 0 0 0.353535354 Private Assoc-voc Separated Adm-clerical Unmarried White Female United-States 0 -22 0.244444445 0.135918587 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -35 0.3888889 0.134993821 0.5625 0 0 0.121212125 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -20 0.222222224 0.0164308734 0.625 0 0 0.2020202 ? Some-college Never-married ? Unmarried White Female United-States 0 -43 0.477777779 0.128745437 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -37 0.411111116 0.0230166949 0.5625 0 0 0.25252524 Local-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -30 0.333333343 0.236396462 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Laos 0 -41 0.455555558 0.09922106 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband Amer-Indian-Eskimo Male United-States 0 -38 0.422222227 0.09165525 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -77 0.8555556 0.15686214 0.3125 0 0 0.4040404 ? 9th Married-civ-spouse ? Husband Black Male United-States 0 -42 0.466666669 0.2514998 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -20 0.222222224 0.0812289342 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 -36 0.4 0.08818318 0.8125 0.0367403664 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.0487221368 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Never-married Prof-specialty Other-relative Asian-Pac-Islander Male United-States 0 -27 0.3 0.08730623 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.221388772 0.625 0 0 0.454545468 State-gov Some-college Divorced Protective-serv Other-relative White Male United-States 0 -40 0.444444448 0.1287771 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 0 -18 0.2 0.12872389 0.4375 0 0 0.25252524 ? 11th Never-married ? Own-child White Male United-States 0 -49 0.544444442 0.0742524639 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.122300394 0.4375 0 0 0.161616161 Private 11th Never-married Other-service Own-child White Female United-States 0 -29 0.322222233 0.059964776 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Female United-States 0 -47 0.5222222 0.232701451 0.9375 1 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 -24 0.266666681 0.187040523 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Separated Handlers-cleaners Own-child White Male United-States 0 -58 0.644444466 0.133681774 0.25 0 0 0.24242425 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -29 0.322222233 0.168840945 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -45 0.5 0.113717541 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Adm-clerical Wife White Female Canada 1 -30 0.333333343 0.09609653 0.5 0 0 0.5050505 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.201420486 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -59 0.655555546 0.07262924 0.375 0 0.3409091 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 -47 0.5222222 0.08214292 0.25 0 0 0.3030303 Private 7th-8th Married-spouse-absent Other-service Unmarried White Female United-States 0 -41 0.455555558 0.190575242 0.625 0.031370312 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband Black Male United-States 0 -28 0.311111122 0.1190021 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Own-child White Male France 0 -46 0.51111114 0.0231540948 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.141329765 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -66 0.733333349 0.0279557221 0.375 0 0 0.4040404 State-gov 10th Divorced Other-service Not-in-family Black Female United-States 0 -30 0.333333343 0.0842989 0.8125 0.14084141 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Male ? 1 -44 0.4888889 0.09914832 0.625 0 0 0.121212125 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 -58 0.644444466 0.063085936 0.5625 0.1502415 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.212207139 0.25 0 0 0.4848485 Private 7th-8th Never-married Other-service Other-relative White Male Mexico 0 -59 0.655555546 0.2571898 0.3125 0 0 0.4040404 Private 9th Widowed Other-service Unmarried Black Female United-States 0 -35 0.3888889 0.125121832 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -45 0.5 0.12546061 0.3125 0.05178052 0 0.4040404 Private 9th Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -30 0.333333343 0.210592 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.231645346 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male Jamaica 0 -26 0.2888889 0.132008716 0.625 0 0 0.151515156 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -48 0.533333361 0.268634528 0.625 0 0 0.353535354 Private Some-college Separated Sales Unmarried Black Female United-States 0 -31 0.344444454 0.0495142154 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Asian-Pac-Islander Female United-States 0 -36 0.4 0.194010928 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -48 0.533333361 0.0368820764 0.5625 0 0 0.3838384 Private HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 -30 0.333333343 0.104628868 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.270157367 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -19 0.211111113 0.08411368 0.3125 0 0 0.25252524 ? 9th Never-married ? Not-in-family White Female United-States 0 -37 0.411111116 0.1935105 0.75 1 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Wife Black Female ? 1 -53 0.5888889 0.07677957 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.0985906348 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female ? 0 -38 0.422222227 0.0750984251 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -34 0.377777785 0.0231520738 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -45 0.5 0.109238535 0.8125 0 0 0.5252525 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.09945006 0.6875 0 0 0.6060606 Local-gov Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -35 0.3888889 0.122897819 0.6875 0 0 0.444444448 Private Assoc-voc Married-civ-spouse Craft-repair Wife White Female United-States 0 -22 0.244444445 0.123910137 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -35 0.3888889 0.224009484 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -45 0.5 0.0180379264 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 -17 0.188888893 0.03274051 0.4375 0 0 0.454545468 Private 11th Never-married Farming-fishing Own-child White Male United-States 0 -50 0.5555556 0.109538257 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.06177052 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.133361846 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.120595 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Husband White Male ? 0 -25 0.2777778 0.176990047 0.8125 0.068490684 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -64 0.7111111 0.06901708 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.08295924 0.625 0 0 0.1010101 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.110623322 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -17 0.188888893 0.1768102 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 -61 0.677777767 0.0344647579 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.0619308241 1 0 0 0.4040404 State-gov Doctorate Never-married Prof-specialty Not-in-family Black Female United-States 0 -21 0.233333334 0.0833344 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Other-relative White Female United-States 0 -39 0.433333337 0.116639338 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.0810268745 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.169034928 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -27 0.3 0.1922483 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Transport-moving Not-in-family Black Male United-States 0 -20 0.222222224 0.0244055223 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.21365793 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 -51 0.566666663 0.0747387558 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Own-child White Male United-States 0 -45 0.5 0.08303535 0.5625 0 0 0.151515156 Private HS-grad Separated Machine-op-inspct Unmarried Black Female United-States 0 -20 0.222222224 0.167768687 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -31 0.344444454 0.103010364 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.253706962 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Own-child Black Male United-States 0 -56 0.622222245 0.15574272 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male Canada 0 -55 0.6111111 0.113574751 0.625 0 0 0.121212125 Self-emp-not-inc Some-college Divorced Tech-support Not-in-family White Female United-States 1 -26 0.2888889 0.0228590872 0.625 0 0 0.2020202 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -46 0.51111114 0.1048417 0.625 0.1502415 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -32 0.355555564 0.128125116 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -28 0.311111122 0.145603344 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -27 0.3 0.395573527 0.25 0 0 0.353535354 Private 7th-8th Never-married Other-service Other-relative White Male Guatemala 0 -23 0.25555557 0.10501682 0.3125 0 0 0.4040404 Private 9th Married-spouse-absent Craft-repair Not-in-family White Male Mexico 0 -59 0.655555546 0.153152317 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.09305014 0.5 0 0 0.4848485 Private 12th Never-married Craft-repair Other-relative Other Male Guatemala 0 -36 0.4 0.112804905 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -18 0.2 0.03903604 0.5625 0 0 0.151515156 Private HS-grad Never-married Sales Own-child White Female United-States 0 -33 0.366666675 0.106248043 0.3125 0 0 0.7070707 Private 9th Divorced Handlers-cleaners Not-in-family White Male United-States 0 -60 0.6666667 0.05965495 0.6875 0 0 0.151515156 Self-emp-not-inc Assoc-voc Married-civ-spouse Transport-moving Wife White Female Germany 1 -40 0.444444448 0.184082359 0.5625 0 0 0.4848485 Private HS-grad Divorced Machine-op-inspct Unmarried White Female Mexico 0 -48 0.533333361 0.145680115 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.08843373 0.375 0 0 0.4848485 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.260238916 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -38 0.422222227 0.121012591 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.141989157 0.625 0 0 0.434343427 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -45 0.5 0.209921166 0.6875 0.03908039 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 -20 0.222222224 0.144976273 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -32 0.355555564 0.0847683549 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -22 0.244444445 0.0502665527 0.625 0 0 0.13131313 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 -22 0.244444445 0.0161702167 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -38 0.422222227 0.23882927 0.5625 0.00114001136 0 0.3838384 State-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 -34 0.377777785 0.104628868 0.5625 0 0.4242424 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.207673579 0.125 0 0 0.3030303 Private 1st-4th Widowed Other-service Unmarried Other Female Mexico 0 -39 0.433333337 0.1652591 0.8125 0 0 0.25252524 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -79 0.8777778 0.106633306 0.5625 0 0 0.24242425 Self-emp-not-inc HS-grad Widowed Other-service Not-in-family White Female United-States 0 -60 0.6666667 0.137728378 0.8125 0 0 0.08080808 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -24 0.266666681 0.21204415 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male Dominican-Republic 0 -31 0.344444454 0.142340735 0.625 0.02407024 0 0.656565666 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.0493020527 0.8125 0.031370312 0 0.7777778 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male Vietnam 0 -23 0.25555557 0.08523579 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -31 0.344444454 0.175645664 0.625 0 0.3624885 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male El-Salvador 0 -29 0.322222233 0.0769338 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.04330288 0.8125 0 0 0.434343427 State-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -69 0.7666667 0.423516452 0.625 0 0 0.2020202 ? Some-college Widowed ? Not-in-family White Female United-States 0 -55 0.6111111 0.148026049 0.5625 0 0 0.3838384 Local-gov HS-grad Divorced Other-service Unmarried White Female United-States 0 -43 0.477777779 0.143391445 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative White Male United-States 0 -23 0.25555557 0.175131768 0.25 0 0 0.363636374 Private 7th-8th Never-married Farming-fishing Unmarried Other Male Mexico 0 -29 0.322222233 0.153616384 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried White Male Mexico 0 -22 0.244444445 0.1615176 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Other-relative White Female Mexico 0 -22 0.244444445 0.218654215 0.625 0 0 0.424242437 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -25 0.2777778 0.110203713 0.5625 0.07298073 0 0.8484849 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.1308004 0.625 0 0 0.454545468 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -25 0.2777778 0.08702066 0.625 0 0 0.4040404 State-gov Some-college Never-married Transport-moving Not-in-family Black Male United-States 0 -33 0.366666675 0.139537483 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -33 0.366666675 0.0911373 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -31 0.344444454 0.0678478256 1 0 0 0.282828271 Private Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.15251717 0.875 0 0.4331956 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.07467544 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.1297928 0.5 0.046500463 0 0.5050505 Private 12th Never-married Exec-managerial Not-in-family White Male United-States 0 -47 0.5222222 0.150944471 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Unmarried White Female United-States 0 -28 0.311111122 0.0531216636 0.8125 0.0861408561 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -42 0.466666669 0.0725814253 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.123668343 0.75 0 0 0.5555556 Private Assoc-acdm Divorced Exec-managerial Unmarried White Male Germany 0 -62 0.6888889 0.167762622 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family Black Female United-States 0 -65 0.722222269 0.1403996 0.625 0 0 0.353535354 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.203538761 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -60 0.6666667 0.1346712 0.5625 0 0 0.323232323 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -47 0.5222222 0.25534904 0.25 0 0 0.6060606 Private 7th-8th Married-civ-spouse Craft-repair Husband Black Male United-States 1 -50 0.5555556 0.117770873 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -70 0.7777778 0.117017187 0.8125 0 0 0.0606060624 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -32 0.355555564 0.02651638 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.13224715 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.229619354 0.5625 0.143441439 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 1 -76 0.844444454 0.06538471 0.375 0 0 0.121212125 Private 10th Widowed Sales Unmarried Black Female United-States 0 -54 0.6 0.1347729 0.8125 0 0 0.6060606 Private Bachelors Divorced Sales Not-in-family Black Female United-States 0 -32 0.355555564 0.08597735 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.212249577 0.625 0 0 0.5252525 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.139302418 0.8125 0 0 0.5050505 Federal-gov Bachelors Divorced Protective-serv Not-in-family White Male United-States 1 -65 0.722222269 0.212899536 0.9375 0 0.382920116 0.4040404 Self-emp-not-inc Prof-school Divorced Prof-specialty Not-in-family White Male United-States 0 -30 0.333333343 0.07551332 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Ireland 1 -63 0.7 0.137280479 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -21 0.233333334 0.168417975 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -40 0.444444448 0.20114097 0.875 0 0.43663913 0.4040404 Federal-gov Masters Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male Philippines 1 -26 0.2888889 0.0735452548 0.625 0 0 0.4040404 State-gov Some-college Never-married Craft-repair Not-in-family White Female United-States 0 -18 0.2 0.088131316 0.4375 0 0 0.08080808 Private 11th Never-married Other-service Own-child White Female United-States 0 -34 0.377777785 0.0296079032 0.5625 0 0 0.5050505 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -66 0.733333349 0.15007022 0.625 0.07896079 0 0.4040404 Local-gov Some-college Divorced Other-service Other-relative White Female ? 1 -44 0.4888889 0.0183484256 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 -30 0.333333343 0.0358037464 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 -36 0.4 0.139098346 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Craft-repair Own-child White Male United-States 0 -31 0.344444454 0.110587627 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.193969846 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -28 0.311111122 0.135258526 0.25 0 0 0.8484849 ? 7th-8th Divorced ? Own-child White Male United-States 0 -23 0.25555557 0.0565034822 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Asian-Pac-Islander Male United-States 0 -49 0.544444442 0.04383834 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.24477455 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Separated Craft-repair Own-child White Male United-States 0 -67 0.7444445 0.122837871 0.8125 0.09386094 0 0.6060606 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -19 0.211111113 0.187828556 0.625 0 0 0.161616161 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -30 0.333333343 0.117726423 0.75 0 0.4242424 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.153975368 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Other-relative Asian-Pac-Islander Female Cambodia 0 -24 0.266666681 0.124199763 0.5625 0 0 0.3030303 Private HS-grad Never-married Transport-moving Own-child Asian-Pac-Islander Male ? 0 -46 0.51111114 0.177522138 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.07906015 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -41 0.455555558 0.0561801866 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -40 0.444444448 0.03310826 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -44 0.4888889 0.283860445 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -32 0.355555564 0.160937026 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -58 0.644444466 0.1272859 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 -48 0.533333361 0.118491553 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.110587627 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.15687561 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child Black Female United-States 0 -46 0.51111114 0.08090564 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.121778406 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Transport-moving Not-in-family Asian-Pac-Islander Male United-States 0 -59 0.655555546 0.109074868 0.8125 0 0 0.3838384 Local-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -29 0.322222233 0.214957863 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male Mexico 0 -50 0.5555556 0.0151060317 0.875 0 0 0.4040404 ? Masters Never-married ? Not-in-family White Male United-States 0 -25 0.2777778 0.195680633 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.0835075 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Other-service Not-in-family Asian-Pac-Islander Female Philippines 0 -48 0.533333361 0.02302545 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -51 0.566666663 0.190394729 1 0 0.359045 0.7070707 Federal-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 -36 0.4 0.1238576 0.5625 0.0861408561 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 1 -42 0.466666669 0.131422743 0.4375 0.07430074 0 0.5050505 Local-gov 11th Divorced Sales Unmarried White Male Puerto-Rico 1 -49 0.544444442 0.03767617 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -33 0.366666675 0.141374886 0.625 0 0 0.2020202 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -40 0.444444448 0.1210456 0.8125 0 0.359045 0.6060606 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 -26 0.2888889 0.101273321 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -69 0.7666667 0.110528357 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 1 -59 0.655555546 0.1702116 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Italy 0 -30 0.333333343 0.138211966 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -31 0.344444454 0.113764018 0.75 0 0 0.353535354 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 -30 0.333333343 0.07551332 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.07848765 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -20 0.222222224 0.136723459 0.625 0 0 0.161616161 ? Some-college Never-married ? Own-child White Female United-States 0 -56 0.622222245 0.129262716 0.75 0.04101041 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -24 0.266666681 0.229873285 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.145977825 0.8125 0 0 0.5050505 Private Bachelors Divorced Sales Unmarried White Female United-States 0 -51 0.566666663 0.12270923 0.8125 0 0 0.353535354 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 -34 0.377777785 0.286244065 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.25534904 0.5625 0 0 0.09090909 Private HS-grad Divorced Other-service Unmarried Black Male United-States 0 -47 0.5222222 0.113310054 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -20 0.222222224 0.0991247445 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Asian-Pac-Islander Female Vietnam 0 -34 0.377777785 0.139871553 0.5625 0 0 0.545454562 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male ? 1 -31 0.344444454 0.130429953 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Not-in-family White Female United-States 0 -42 0.466666669 0.134832844 0.6875 0 0 0.323232323 Private Assoc-voc Divorced Other-service Unmarried White Female United-States 0 -52 0.5777778 0.127058238 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Craft-repair Other-relative White Male Mexico 0 -56 0.622222245 0.268111855 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -53 0.5888889 0.0199756864 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.104374945 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -81 0.900000036 0.245233238 0.625 0 0 0.2020202 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.196250439 0.375 0 0 0.4040404 ? 10th Never-married ? Unmarried Black Female United-States 0 -57 0.6333333 0.06589659 0.625 0 0 0.4848485 Federal-gov Some-college Divorced Prof-specialty Not-in-family White Male United-States 1 -34 0.377777785 0.07946562 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.232704148 0.375 0 0 0.4040404 ? 10th Married-civ-spouse ? Husband White Male United-States 0 -24 0.266666681 0.0432186872 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Unmarried Black Female United-States 0 -20 0.222222224 0.212754056 0.5625 0 0.459366381 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male United-States 0 -68 0.75555557 0.1563617 0.625 0.0234602336 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Other-relative Black Female United-States 0 -60 0.6666667 0.151899531 0.5625 0 0 0.323232323 Private HS-grad Separated Sales Not-in-family White Female United-States 0 -37 0.411111116 0.195091277 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.120873846 0.25 0 0 0.4040404 Private 7th-8th Never-married Handlers-cleaners Unmarried White Male United-States 0 -36 0.4 0.045340322 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -45 0.5 0.052376736 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.170699239 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.101238295 0.8125 0 0 0.7070707 Private Bachelors Separated Exec-managerial Not-in-family White Female United-States 0 -47 0.5222222 0.05594647 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -60 0.6666667 0.2539043 0.5625 0 0 0.424242437 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -75 0.8333334 0.209593162 0.8125 0 0 0.24242425 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.1073944 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -18 0.2 0.113347769 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -25 0.2777778 0.0504362844 0.8125 0 0.2506887 0.4040404 Private Bachelors Never-married Tech-support Not-in-family Asian-Pac-Islander Female Philippines 0 -20 0.222222224 0.185349956 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -32 0.355555564 0.127862439 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -57 0.6333333 0.0682546347 0.8125 0 0 0.2020202 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.22354205 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -18 0.2 0.0271387249 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Other-relative White Male United-States 0 -41 0.455555558 0.05987991 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Unmarried Black Female United-States 0 -48 0.533333361 0.09769011 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male Dominican-Republic 0 -35 0.3888889 0.0312418975 0.5625 0.05178052 0 0.909090936 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -41 0.455555558 0.244891077 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.123477057 0.5625 0 0.365932047 0.2020202 Private HS-grad Never-married Craft-repair Own-child Black Female United-States 0 -32 0.355555564 0.122957759 0.8125 0 0.4331956 0.454545468 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -33 0.366666675 0.180412278 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male El-Salvador 0 -58 0.644444466 0.128474683 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -22 0.244444445 0.109697886 0.625 0 0 0.656565666 Private Some-college Never-married Sales Other-relative White Male United-States 0 -33 0.366666675 0.0951226056 0.625 0 0 0.5050505 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -42 0.466666669 0.117340483 0.9375 0 0 0.3838384 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.2467938 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -39 0.433333337 0.1162103 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.130009666 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.124215923 0.625 0 0.43663913 0.3838384 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -49 0.544444442 0.2274984 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.120602414 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -47 0.5222222 0.06704968 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -46 0.51111114 0.0489114 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -42 0.466666669 0.0375589766 0.75 0 0 0.4040404 State-gov Assoc-acdm Divorced Prof-specialty Not-in-family Black Male United-States 0 -37 0.411111116 0.0203858688 0.4375 0 0 0.6060606 Private 11th Never-married Transport-moving Not-in-family White Male United-States 1 -25 0.2777778 0.207545608 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male Mexico 0 -29 0.322222233 0.138984516 0.375 0.0501305 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.190141484 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -26 0.2888889 0.118593931 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried White Female United-States 0 -45 0.5 0.09612617 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.07743828 0.5625 0 0 0.3030303 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 -33 0.366666675 0.10746108 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Adm-clerical Unmarried Black Female United-States 0 -43 0.477777779 0.0614324063 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.13239263 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.100504816 0.625 0 0 0.75757575 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -21 0.233333334 0.114298128 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -23 0.25555557 0.146975324 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 -30 0.333333343 0.105554976 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Female United-States 0 -46 0.51111114 0.0375293419 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.173266754 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -20 0.222222224 0.131090015 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -36 0.4 0.268693775 0.8125 0 0.3409091 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.243861243 0.9375 1 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.0684263855 0.875 0 0.430670351 0.424242437 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -33 0.366666675 0.132191926 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.132909909 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -47 0.5222222 0.06589996 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.0584877133 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 1 -17 0.188888893 0.03860969 0.375 0 0 0.3030303 Private 10th Never-married Other-service Own-child White Male United-States 0 -43 0.477777779 0.07870385 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female Portugal 1 -45 0.5 0.104013927 0.8125 0.105201051 0 0.5050505 Private Bachelors Widowed Prof-specialty Not-in-family White Female United-States 1 -37 0.411111116 0.0259095244 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.1271687 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -55 0.6111111 0.119325392 0.875 0.009140091 0 0.5050505 Local-gov Masters Widowed Prof-specialty Unmarried White Female United-States 0 -41 0.455555558 0.126167834 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.07245749 0.8125 0.0217402168 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -38 0.422222227 0.113611795 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -23 0.25555557 0.17293334 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Other-relative White Female Cuba 0 -35 0.3888889 0.243010566 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.1269451 0.4375 0 0 0.2020202 Private 11th Never-married Exec-managerial Own-child White Male United-States 0 -47 0.5222222 0.02051384 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -25 0.2777778 0.170237184 0.625 0 0 0.08080808 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -41 0.455555558 0.298717946 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.164617211 0.625 0 0 0.24242425 Private Some-college Never-married Adm-clerical Other-relative Asian-Pac-Islander Female Vietnam 0 -41 0.455555558 0.120551221 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -26 0.2888889 0.0963612348 0.625 0.02407024 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.16658394 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -42 0.466666669 0.135873452 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.166247845 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -28 0.311111122 0.195504829 0.8125 0 0 0.181818187 ? Bachelors Never-married ? Not-in-family White Male United-States 0 -29 0.322222233 0.0802651048 0.625 0 0 0.4040404 Private Some-college Separated Tech-support Unmarried White Female United-States 0 -21 0.233333334 0.140043318 0.625 0 0 0.151515156 Private Some-college Married-spouse-absent Adm-clerical Own-child White Female United-States 0 -48 0.533333361 0.1145965 0.875 0 0 0.4040404 State-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 1 -44 0.4888889 0.12606141 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Transport-moving Unmarried White Male United-States 0 -34 0.377777785 0.2046649 0.3125 0 0 0.4040404 Local-gov 9th Never-married Other-service Own-child White Male United-States 0 -19 0.211111113 0.196287483 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -32 0.355555564 0.1435834 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Own-child White Male United-States 1 -31 0.344444454 0.0753301159 0.75 0 0 0.4040404 State-gov Assoc-acdm Separated Other-service Unmarried Black Female United-States 0 -25 0.2777778 0.200143471 0.5625 0.02407024 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -47 0.5222222 0.0461323969 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -46 0.51111114 0.229485318 0.4375 0 0 0.4040404 Federal-gov 11th Widowed Adm-clerical Not-in-family White Female United-States 0 -18 0.2 0.130705431 0.5 0 0 0.4040404 Private 12th Never-married Adm-clerical Own-child White Male United-States 0 -31 0.344444454 0.0318554863 0.625 0 0.399449021 0.2020202 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -28 0.311111122 0.192839652 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Own-child White Female United-States 0 -38 0.422222227 0.139557689 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -33 0.366666675 0.08931135 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -17 0.188888893 0.09374455 0.375 0 0 0.151515156 ? 10th Never-married ? Own-child White Female United-States 0 -41 0.455555558 0.108294241 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.0793753639 0.625 0.1502415 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.151952744 0.625 0 0 0.444444448 Local-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -24 0.266666681 0.128166884 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -49 0.544444442 0.110997811 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -60 0.6666667 0.01473424 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Prof-specialty Not-in-family Amer-Indian-Eskimo Female United-States 0 -44 0.4888889 0.108294241 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -63 0.7 0.183487639 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.113516152 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.1375391 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.0958352 0.625 0 0.43663913 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -36 0.4 0.114451021 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -65 0.722222269 0.13809073 0.5625 0 0 0.08080808 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -41 0.455555558 0.2524165 0.8125 0 0 0.2020202 Private Bachelors Widowed Exec-managerial Unmarried White Male United-States 0 -25 0.2777778 0.07326641 0.875 0 0 0.4040404 Private Masters Separated Other-service Own-child White Female United-States 0 -20 0.222222224 0.197437212 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 -60 0.6666667 0.153115943 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Adm-clerical Not-in-family White Male United-States 0 -17 0.188888893 0.165896937 0.4375 0 0 0.2020202 Local-gov 11th Never-married Prof-specialty Own-child White Female Puerto-Rico 0 -28 0.311111122 0.0345731974 0.75 0 0 0.161616161 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 -31 0.344444454 0.10310331 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Craft-repair Own-child Other Male United-States 0 -47 0.5222222 0.113948561 0.875 0 0 0.353535354 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -45 0.5 0.130295917 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -51 0.566666663 0.205527022 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -23 0.25555557 0.09354855 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Male United-States 0 -44 0.4888889 0.27102825 0.875 0 0.43663913 0.6060606 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 -34 0.377777785 0.150378019 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Other-relative White Male United-States 0 -19 0.211111113 0.019700883 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -51 0.566666663 0.137369379 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -46 0.51111114 0.0200012811 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.21259442 1 0 0.453856736 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 1 -37 0.411111116 0.426086664 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -56 0.622222245 0.18995221 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.0523740426 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -46 0.51111114 0.100086555 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 -55 0.6111111 0.279512763 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.228909448 0.8125 0.0861408561 0 0.4848485 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 -34 0.377777785 0.336261421 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Handlers-cleaners Not-in-family White Male Guatemala 0 -45 0.5 0.0972273946 0.3125 0 0 0.4040404 ? 9th Separated ? Own-child Black Male United-States 0 -41 0.455555558 0.169769749 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -22 0.244444445 0.0670456439 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 -34 0.377777785 0.07945215 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.131104842 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -29 0.322222233 0.20186165 0.625 0 0 0.373737365 Private Some-college Never-married Handlers-cleaners Unmarried Black Male United-States 0 -19 0.211111113 0.0184770711 0.5 0 0 0.3030303 Federal-gov 12th Never-married Other-service Own-child White Female United-States 0 -47 0.5222222 0.02693195 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -43 0.477777779 0.0911575 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.181949958 0.6875 0 0 0.6060606 Private Assoc-voc Separated Exec-managerial Unmarried Black Female United-States 0 -33 0.366666675 0.07965691 0.75 0 0 0.6060606 Self-emp-not-inc Assoc-acdm Divorced Sales Not-in-family White Male United-States 0 -29 0.322222233 0.179189131 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -23 0.25555557 0.0240000542 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -23 0.25555557 0.0502241179 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -39 0.433333337 0.144685984 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.150178656 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Unmarried White Female Mexico 0 -31 0.344444454 0.174731687 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.142870128 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.165608659 0.5625 0 0 0.6060606 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -58 0.644444466 0.0370087 0.625 0 0 0.5555556 Local-gov Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.05363153 0.9375 0.2782828 0 0.5050505 Self-emp-inc Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 -55 0.6111111 0.102022961 0.8125 0 0.365013778 0.3838384 Private Bachelors Never-married Tech-support Other-relative White Female United-States 0 -26 0.2888889 0.08935176 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -28 0.311111122 0.108893014 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Female United-States 0 -36 0.4 0.04199218 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -40 0.444444448 0.153051287 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -19 0.211111113 0.190632492 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family White Male United-States 0 -63 0.7 0.200880989 0.8125 0.106051058 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.1692114 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -76 0.844444454 0.134672552 0.3125 0 0 0.13131313 Private 9th Married-civ-spouse Protective-serv Husband White Male United-States 0 -23 0.25555557 0.205763444 0.6875 0 0 0.4040404 State-gov Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 -38 0.422222227 0.137290582 0.1875 0 0 0.4040404 Self-emp-not-inc 5th-6th Never-married Transport-moving Not-in-family White Male United-States 0 -33 0.366666675 0.05350558 0.875 0 0 0.3030303 State-gov Masters Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male Japan 0 -48 0.533333361 0.09612617 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -56 0.622222245 0.08072917 0.625 0 0 0.4040404 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 1 -32 0.355555564 0.09524451 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -44 0.4888889 0.1366413 0.625 0 0 0.25252524 Local-gov Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -27 0.3 0.133907408 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child Black Female United-States 0 -33 0.366666675 0.08736214 0.625 0 0 0.5050505 Federal-gov Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -22 0.244444445 0.3002334 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 -18 0.2 0.0203717239 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 -44 0.4888889 0.1171822 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.07308254 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -34 0.377777785 0.0908503756 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.122563072 0.5625 0 0.3838384 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -57 0.6333333 0.190551668 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male Cuba 0 -59 0.655555546 0.132021517 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.2347207 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Wife Black Female United-States 1 -52 0.5777778 0.2803008 0.5625 0 0 0.4949495 Private HS-grad Married-civ-spouse Farming-fishing Husband Other Male Mexico 0 -17 0.188888893 0.08152259 0.5 0 0 0.151515156 Private 12th Never-married Sales Own-child White Female United-States 0 -29 0.322222233 0.0694488138 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male Canada 0 -63 0.7 0.09940628 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -20 0.222222224 0.0161702167 0.625 0 0 0.24242425 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -42 0.466666669 0.08340916 0.9375 0 0.453856736 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.118175671 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -55 0.6111111 0.0570982136 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Priv-house-serv Wife White Female United-States 0 -27 0.3 0.131063074 0.75 0 0 0.25252524 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -28 0.311111122 0.0906348452 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -55 0.6111111 0.142572433 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -44 0.4888889 0.0301891621 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.0973836556 0.625 0 0 0.4040404 State-gov Some-college Never-married Protective-serv Not-in-family White Female United-States 0 -23 0.25555557 0.08025567 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.250546068 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.09707316 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -55 0.6111111 0.0214891173 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.08158119 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.0391498655 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.214532852 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -30 0.333333343 0.199709043 0.25 0 0 0.454545468 Private 7th-8th Separated Farming-fishing Not-in-family White Male Mexico 0 -32 0.355555564 0.3186714 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.104690157 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -52 0.5777778 0.06680452 0.5625 0.07298073 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.0381543823 0.5625 0 0 0.474747479 Private HS-grad Separated Sales Not-in-family White Female United-States 0 -57 0.6333333 0.07980104 0.8125 0 0.43663913 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.216653138 0.5625 0.005940059 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -22 0.244444445 0.08071502 0.625 0 0 0.1010101 State-gov Some-college Never-married Other-service Own-child White Male United-States 0 -26 0.2888889 0.222734481 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -26 0.2888889 0.0390912667 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -44 0.4888889 0.2108311 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -42 0.466666669 0.119979389 0.625 0 0 0.3030303 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.111341313 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -22 0.244444445 0.145605356 0.4375 0 0 0.454545468 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -62 0.6888889 0.120390922 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.07480746 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.110316865 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -33 0.366666675 0.199090734 0.125 0 0 0.4040404 Self-emp-not-inc 1st-4th Married-spouse-absent Craft-repair Not-in-family White Male Mexico 0 -45 0.5 0.08289526 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -18 0.2 0.052566 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Own-child White Male United-States 0 -32 0.355555564 0.171753988 0.625 0 0 0.4040404 Local-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.1712266 1 0 0 0.6060606 Private Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 -20 0.222222224 0.117675908 0.625 0 0 0.151515156 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -68 0.75555557 0.303481162 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -61 0.677777767 0.086367324 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Sales Husband White Male United-States 1 -48 0.533333361 0.129920766 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.219161391 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.0136949765 0.5625 0.07688077 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 1 -32 0.355555564 0.08669332 0.5625 0 0 0.323232323 Federal-gov HS-grad Never-married Other-service Own-child Black Female United-States 0 -35 0.3888889 0.115037672 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Not-in-family White Female United-States 0 -39 0.433333337 0.181306049 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.0859908238 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -30 0.333333343 0.142681539 0.625 0 0 0.161616161 Private Some-college Separated Sales Unmarried Black Female United-States 0 -37 0.411111116 0.110050149 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Other-relative Asian-Pac-Islander Male ? 0 -40 0.444444448 0.135713831 0.8125 0 0 0.454545468 Private Bachelors Divorced Protective-serv Not-in-family White Male United-States 0 -25 0.2777778 0.16963236 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Black Female Jamaica 0 -41 0.455555558 0.188116163 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Not-in-family Black Female United-States 0 -52 0.5777778 0.1316504 0.5625 0 0 0.989899 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -33 0.366666675 0.115018807 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.09594027 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -25 0.2777778 0.123128168 0.5625 0.07298073 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -53 0.5888889 0.0817947 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.1852853 0.125 0 0 0.1010101 Private 1st-4th Never-married Other-service Own-child White Male United-States 0 -35 0.3888889 0.114678 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -38 0.422222227 0.116232522 0.625 0 0 0.5858586 Private Some-college Divorced Craft-repair Own-child White Male Poland 0 -34 0.377777785 0.120303363 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.188269049 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -24 0.266666681 0.111268573 0.625 0 0 0.454545468 State-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -65 0.722222269 0.217555687 0.5625 0 0 0.25252524 Local-gov HS-grad Widowed Other-service Unmarried Black Female United-States 0 -29 0.322222233 0.158393756 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.07735139 0.9375 1 0 0.656565666 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.1457623 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -37 0.411111116 0.02315477 0.25 0.0258002579 0 0.6060606 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -47 0.5222222 0.05449837 0.875 0 0 0.474747479 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.04936469 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -54 0.6 0.142900437 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -90 1 0.0352837779 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Male United-States 0 -33 0.366666675 0.138511688 0.75 0 0 0.2020202 Private Assoc-acdm Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 -57 0.6333333 0.07384498 0.625 0 0.3838384 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.1349817 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Own-child White Male United-States 0 -44 0.4888889 0.126435891 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -52 0.5777778 0.159075379 0.8125 0 0 0.5050505 Private Bachelors Married-spouse-absent Other-service Not-in-family White Male United-States 0 -21 0.233333334 0.07994383 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -31 0.344444454 0.244580582 0.5625 0 0 0.181818187 Private HS-grad Never-married Other-service Unmarried Black Male United-States 0 -39 0.433333337 0.151911661 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Transport-moving Husband White Male Poland 0 -59 0.655555546 0.164081082 0.5625 0 0 0.4040404 Federal-gov HS-grad Widowed Machine-op-inspct Unmarried White Female United-States 0 -29 0.322222233 0.108294919 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -49 0.544444442 0.1578226 0.25 0 0 0.454545468 Private 7th-8th Never-married Prof-specialty Other-relative Black Male United-States 0 -34 0.377777785 0.211924925 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.08417228 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -32 0.355555564 0.14089264 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband Other Male Puerto-Rico 0 -39 0.433333337 0.0820620954 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Other-service Unmarried Black Female United-States 0 -46 0.51111114 0.178671867 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -50 0.5555556 0.0481018126 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.0306606367 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.168474555 0.875 0 0.43663913 0.5555556 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 -18 0.2 0.08101475 0.5 0 0 0.24242425 Private 12th Never-married Sales Own-child White Female United-States 0 -20 0.222222224 0.146138132 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -20 0.222222224 0.07866277 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Female United-States 0 -55 0.6111111 0.0177072212 0.6875 0 0 0.3838384 State-gov Assoc-voc Widowed Exec-managerial Not-in-family Amer-Indian-Eskimo Female United-States 0 -22 0.244444445 0.1455737 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child Black Female United-States 0 -60 0.6666667 0.09694316 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -40 0.444444448 0.1462378 0.375 0 0 0.5050505 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 -47 0.5222222 0.150834009 0.625 0 0 0.3030303 State-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -23 0.25555557 0.124908321 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Not-in-family White Female Canada 0 -57 0.6333333 0.0298193917 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Transport-moving Not-in-family White Female United-States 0 -52 0.5777778 0.120551221 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 -42 0.466666669 0.14769803 0.25 0 0 0.4040404 Private 7th-8th Widowed Craft-repair Unmarried White Male United-States 0 -25 0.2777778 0.235191509 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Handlers-cleaners Own-child White Male United-States 0 -49 0.544444442 0.106879823 0.5625 0 0.5456841 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -41 0.455555558 0.03901381 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 -40 0.444444448 0.182072535 0.6875 0 0 0.3030303 State-gov Assoc-voc Married-civ-spouse Other-service Husband Black Male United-States 0 -38 0.422222227 0.0222273115 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.137415186 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male Canada 0 -26 0.2888889 0.129659429 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Not-in-family Black Female United-States 0 -57 0.6333333 0.25120613 0.375 0 0 0.7070707 Private 10th Divorced Adm-clerical Other-relative White Female Germany 0 -28 0.311111122 0.184500635 0.5625 0 0.373737365 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.131892189 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Unmarried White Female United-States 0 -28 0.311111122 0.0378384925 0.625 0.0217402168 0 0.5555556 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -17 0.188888893 0.0855409 0.3125 0 0 0.4040404 ? 9th Never-married ? Own-child Black Male United-States 0 -39 0.433333337 0.08357889 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.134437487 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -42 0.466666669 0.172321782 0.5625 0.04386044 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -51 0.566666663 0.14704 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Divorced Sales Unmarried White Female United-States 0 -27 0.3 0.112706564 0.625 0 0 0.3939394 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -41 0.455555558 0.04037031 0.5625 0 0 0.434343427 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.1776299 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.1873975 0.625 0.105201051 0 0.3030303 Self-emp-not-inc Some-college Divorced Farming-fishing Unmarried White Female United-States 1 -73 0.811111152 0.121642351 0.5625 0 0 0.08080808 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -49 0.544444442 0.029574899 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -47 0.5222222 0.128065169 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.073415935 0.625 0 0 0.4949495 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.107719041 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -32 0.355555564 0.131330475 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -32 0.355555564 0.0588062964 0.5625 0 0 0.414141417 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -27 0.3 0.09021119 0.875 0 0 0.4040404 Private Masters Never-married Sales Own-child White Male United-States 0 -29 0.322222233 0.139464751 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.02425465 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Prof-specialty Not-in-family White Male United-States 0 -41 0.455555558 0.113351814 0.5625 0.05178052 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -49 0.544444442 0.1312685 0.625 0.07298073 0 0.4040404 Local-gov Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -58 0.644444466 0.0335985944 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -41 0.455555558 0.0183908585 0.5625 0.07688077 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -26 0.2888889 0.154897436 0.3125 0 0 0.353535354 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.0434564464 0.5625 0 0 0.5555556 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -32 0.355555564 0.0908503756 0.5625 0 0 0.02020202 ? HS-grad Married-civ-spouse ? Wife White Female United-States 1 -37 0.411111116 0.205683291 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.136245251 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Own-child White Male United-States 0 -42 0.466666669 0.06680452 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.107537866 0.5625 0 0 0.262626261 Private HS-grad Married-civ-spouse Sales Own-child White Male United-States 1 -67 0.7444445 0.133268908 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -41 0.455555558 0.117968895 0.5625 0 0 0.3838384 Local-gov HS-grad Divorced Transport-moving Not-in-family Black Female United-States 0 -49 0.544444442 0.23548989 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -36 0.4 0.0911245048 0.8125 0.01506015 0 0.454545468 Private Bachelors Divorced Prof-specialty Unmarried White Female ? 0 -18 0.2 0.163596809 0.4375 0 0 0.353535354 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -25 0.2777778 0.147279769 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Own-child White Male United-States 0 -43 0.477777779 0.0975352 0.9375 0 0 0.5050505 State-gov Prof-school Divorced Prof-specialty Not-in-family White Male United-States 0 -38 0.422222227 0.09839733 1 1 0 0.363636374 Private Doctorate Married-civ-spouse Exec-managerial Wife White Female United-States 1 -21 0.233333334 0.139328018 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male ? 0 -65 0.722222269 0.1523636 0.8125 0 0 0.151515156 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -66 0.733333349 0.0770840049 0.6875 0 0 0.353535354 Private Assoc-voc Widowed Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.0836442262 0.4375 0 0 0.6060606 Private 11th Never-married Transport-moving Not-in-family Black Male United-States 0 -51 0.566666663 0.09965212 0.5625 0.03411034 0 0.3838384 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -27 0.3 0.0433614776 0.5625 0 0.399449021 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.105408818 0.5 0 0 0.161616161 Private 12th Never-married Other-service Own-child White Female United-States 0 -32 0.355555564 0.139871553 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -61 0.677777767 0.108626969 0.5625 0 0 0.363636374 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -38 0.422222227 0.152021453 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Cuba 1 -43 0.477777779 0.0778626055 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -40 0.444444448 0.341030031 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 -63 0.7 0.185244888 0.8125 0 0.399449021 0.353535354 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -76 0.844444454 0.116276972 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -42 0.466666669 0.03804325 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.0975129753 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -76 0.844444454 0.0223701 0.875 0 0 0.3030303 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 -41 0.455555558 0.200206786 0.9375 0 0.5544077 0.454545468 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.0923025161 0.375 0 0 0.2020202 Private 10th Never-married Prof-specialty Own-child White Male United-States 0 -30 0.333333343 0.0224340875 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.106701337 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male Iran 0 -22 0.244444445 0.0281288214 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -53 0.5888889 0.148608655 0.8125 0 0 0.2020202 ? Bachelors Divorced ? Other-relative Other Female United-States 0 -28 0.311111122 0.100851014 0.5625 0 0 0.5252525 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -25 0.2777778 0.176631048 0.6875 0.03418034 0 0.4040404 ? Assoc-voc Never-married ? Own-child White Female United-States 0 -24 0.266666681 0.235528946 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative Black Female United-States 0 -47 0.5222222 0.124863192 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -34 0.377777785 0.117506847 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Not-in-family White Male United-States 0 -26 0.2888889 0.158999935 0.625 0 0 0.2020202 Private Some-college Never-married Sales Other-relative White Female United-States 0 -63 0.7 0.299836 0.8125 0 0 0.565656543 ? Bachelors Widowed ? Not-in-family Amer-Indian-Eskimo Female United-States 0 -25 0.2777778 0.0615165979 0.6875 0 0 0.75757575 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.02282945 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -36 0.4 0.144685984 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 -24 0.266666681 0.154760033 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -51 0.566666663 0.112066709 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female Taiwan 0 -44 0.4888889 0.1792511 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.202315614 0.5 0 0 0.121212125 Private 12th Never-married Adm-clerical Own-child White Male United-States 0 -54 0.6 0.264363647 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -61 0.677777767 0.0497129075 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -51 0.566666663 0.1304771 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.212960154 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.1097484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.125875518 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Wife Black Female United-States 1 -27 0.3 0.222355291 0.5625 0 0 0.25252524 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -24 0.266666681 0.129330069 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -20 0.222222224 0.109097771 0.625 0 0 0.2020202 State-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -52 0.5777778 0.13668035 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -57 0.6333333 0.217759758 0.25 0 0 0.4040404 Local-gov 7th-8th Divorced Other-service Not-in-family White Male United-States 0 -49 0.544444442 0.132909909 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.137423262 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Married-civ-spouse Adm-clerical Wife White Female ? 0 -22 0.244444445 0.182712391 0.4375 0 0 0.4040404 Private 11th Never-married Sales Not-in-family White Female United-States 0 -38 0.422222227 0.117358 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -21 0.233333334 0.141094029 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -39 0.433333337 0.06677825 0.8125 0 0.4331956 0.6060606 Federal-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -52 0.5777778 0.06893356 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Prof-specialty Own-child White Female United-States 0 -25 0.2777778 0.122358315 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Own-child White Female United-States 0 -50 0.5555556 0.139668822 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Other-service Not-in-family White Female Cuba 0 -35 0.3888889 0.0556487665 0.625 0 0 0.8080808 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -50 0.5555556 0.136253327 0.6875 0 0 0.4040404 Private Assoc-voc Separated Prof-specialty Unmarried White Female United-States 0 -58 0.644444466 0.09576448 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.06354259 0.8125 0 0 0.454545468 Federal-gov Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -30 0.333333343 0.0279469658 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Not-in-family White Female Canada 0 -18 0.2 0.1223893 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -29 0.322222233 0.110868491 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.0279489867 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -63 0.7 0.09638144 0.5625 0.0406404063 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.132369056 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -24 0.266666681 0.105968527 0.625 0 0 0.424242437 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 -30 0.333333343 0.104354069 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Protective-serv Not-in-family Black Male United-States 0 -23 0.25555557 0.150353774 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Other Male Mexico 0 -35 0.3888889 0.170983464 0.5625 0 0 0.2020202 ? HS-grad Divorced ? Unmarried White Female United-States 0 -21 0.233333334 0.244216189 0.8125 0 0 0.2020202 Private Bachelors Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.06390495 0.625 0 0 0.434343427 Private Some-college Never-married Craft-repair Not-in-family White Male Mexico 0 -20 0.222222224 0.208512813 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -18 0.2 0.08782149 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male Scotland 0 -21 0.233333334 0.235309377 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -27 0.3 0.2538794 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -42 0.466666669 0.120937832 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 -21 0.233333334 0.07110975 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 -51 0.566666663 0.151011154 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.0322670154 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -23 0.25555557 0.1288357 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Transport-moving Own-child White Male United-States 0 -57 0.6333333 0.0141125685 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.125660658 0.8125 0 0 0.121212125 State-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -59 0.655555546 0.029110834 0.3125 0 0 0.6060606 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 1 -38 0.422222227 0.108534023 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -20 0.222222224 0.136729524 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Other-relative White Male United-States 0 -90 1 0.0954789 0.3125 0 0 0.4040404 Private 9th Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.07632627 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.231592819 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -45 0.5 0.144182175 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.07855567 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.161756039 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Own-child White Male United-States 0 -34 0.377777785 0.34777078 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -23 0.25555557 0.191722259 0.8125 0 0 0.434343427 Self-emp-inc Bachelors Divorced Sales Not-in-family White Female United-States 0 -39 0.433333337 0.09525125 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -19 0.211111113 0.0287936 0.625 0 0 0.5555556 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -54 0.6 0.111320436 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.112658747 0.875 0 0 0.434343427 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -44 0.4888889 0.09423219 0.625 0 0 0.5050505 Private Some-college Never-married Sales Own-child White Male United-States 0 -31 0.344444454 0.15923366 0.625 0 0 0.2020202 Self-emp-inc Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -25 0.2777778 0.210793391 0.3125 0 0 0.4040404 Private 9th Separated Handlers-cleaners Other-relative White Male El-Salvador 0 -33 0.366666675 0.08011086 0.8125 0 0 0.323232323 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -32 0.355555564 0.133405626 0.5625 0 0 0.6060606 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -36 0.4 0.251869559 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.1590289 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband Other Male United-States 1 -80 0.8888889 0.106268927 0.875 0 0 0.1010101 Private Masters Widowed Prof-specialty Not-in-family White Female United-States 0 -21 0.233333334 0.0967222452 0.625 0 0 0.08080808 Private Some-college Never-married Sales Own-child White Female United-States 0 -35 0.3888889 0.2154172 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -77 0.8555556 0.08939689 0.875 0 0 0.454545468 ? Masters Divorced ? Not-in-family White Male United-States 0 -30 0.333333343 0.092682384 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.0413166247 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -49 0.544444442 0.180664852 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -33 0.366666675 0.06744438 0.5625 0 0.399449021 0.25252524 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -53 0.5888889 0.02355552 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -41 0.455555558 0.218083724 0.5625 0 0 0.5555556 Private HS-grad Divorced Handlers-cleaners Unmarried White Male United-States 0 -57 0.6333333 0.215351209 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male Poland 1 -21 0.233333334 0.121464536 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Female United-States 0 -19 0.211111113 0.08458987 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.0409320369 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -42 0.466666669 0.0502995551 0.875 0 0.459366381 0.6060606 Federal-gov Masters Divorced Adm-clerical Not-in-family White Male United-States 0 -29 0.322222233 0.09509297 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -38 0.422222227 0.137850955 0.6875 0 0 0.25252524 ? Assoc-voc Separated ? Unmarried White Female United-States 0 -26 0.2888889 0.184408352 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -41 0.455555558 0.047172334 0.625 0 0.6896235 0.6060606 Private Some-college Never-married Craft-repair Unmarried White Male ? 1 -40 0.444444448 0.231068134 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -36 0.4 0.1198265 1 0 0 0.4040404 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 -28 0.311111122 0.0970314 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.173484966 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 -42 0.466666669 0.04517059 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -32 0.355555564 0.123496592 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -32 0.355555564 0.103010364 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Adm-clerical Own-child White Male United-States 0 -37 0.411111116 0.152978539 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.030717887 0.5625 0 0 0.565656543 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -49 0.544444442 0.1047272 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.1553871 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family Black Male United-States 0 -24 0.266666681 0.180476934 0.3125 0 0 0.2020202 ? 9th Never-married ? Own-child White Female United-States 0 -19 0.211111113 0.111210644 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -31 0.344444454 0.03362486 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -40 0.444444448 0.183363035 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -29 0.322222233 0.1720719 0.25 0 0 0.3030303 Private 7th-8th Never-married Handlers-cleaners Own-child White Male Mexico 0 -59 0.655555546 0.130861014 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -52 0.5777778 0.0980315953 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 -27 0.3 0.118045 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -45 0.5 0.0251268782 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -58 0.644444466 0.09264265 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male South 0 -53 0.5888889 0.186242387 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male Cuba 0 -23 0.25555557 0.117616631 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -35 0.3888889 0.145018712 0.4375 0 0 0.4040404 Private 11th Divorced Handlers-cleaners Other-relative White Male United-States 0 -49 0.544444442 0.22385256 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -49 0.544444442 0.13743943 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 -25 0.2777778 0.263750046 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Not-in-family White Male United-States 0 -47 0.5222222 0.113889292 0.875 0 0 0.5050505 Private Masters Divorced Prof-specialty Unmarried White Female United-States 1 -28 0.311111122 0.155413374 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 -20 0.222222224 0.128620163 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -74 0.822222233 0.137966812 0.1875 0 0 0.565656543 ? 5th-6th Married-civ-spouse ? Husband White Male Mexico 0 -19 0.211111113 0.114401855 0.5625 0 0 0.24242425 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -28 0.311111122 0.142850608 0.5625 0.0258002579 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.136607617 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -61 0.677777767 0.152884915 0.625 0 0 0.4040404 ? Some-college Married-spouse-absent ? Not-in-family White Male United-States 0 -30 0.333333343 0.09430224 0.6875 0 0 0.535353541 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -20 0.222222224 0.291220158 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male Germany 0 -35 0.3888889 0.06080198 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male ? 1 -23 0.25555557 0.1511573 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Male United-States 0 -25 0.2777778 0.11378894 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -19 0.211111113 0.3851627 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -30 0.333333343 0.1053839 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -26 0.2888889 0.07310678 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -34 0.377777785 0.130884588 0.5625 0 0 0.454545468 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -49 0.544444442 0.07731974 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried Black Female United-States 0 -35 0.3888889 0.0270323064 0.625 0 0.4687787 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -38 0.422222227 0.137910232 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -36 0.4 0.15369384 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -33 0.366666675 0.110050149 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 1 -54 0.6 0.09351689 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -19 0.211111113 0.114401855 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Own-child White Male United-States 0 -18 0.2 0.13898991 0.375 0 0 0.4040404 Never-worked 10th Never-married ? Own-child White Male United-States 0 -60 0.6666667 0.150937051 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.108294919 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 -43 0.477777779 0.128001183 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -49 0.544444442 0.0978578255 0.1875 0 0 0.4040404 Local-gov 5th-6th Married-civ-spouse Other-service Husband White Male United-States 0 -25 0.2777778 0.08100464 0.8125 0 0 0.7070707 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -17 0.188888893 0.2205381 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Male United-States 0 -41 0.455555558 0.14703393 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.797883749 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 -90 1 0.153428465 0.875 0.200512 0 0.6060606 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.138979122 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Other-relative White Male United-States 0 -27 0.3 0.024820419 0.6875 0 0 0.353535354 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.100053549 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.105798125 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband Black Male ? 1 -31 0.344444454 0.09595846 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family Black Female United-States 0 -43 0.477777779 0.05842912 0.6875 0 0 1 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -63 0.7 0.243570954 0.875 0 0 0.4040404 Private Masters Separated Prof-specialty Not-in-family White Female United-States 1 -46 0.51111114 0.109940358 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.120962754 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.1715984 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Wife Black Female United-States 1 -26 0.2888889 0.03910878 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.13836284 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -20 0.222222224 0.02773817 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 -19 0.211111113 0.207491726 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family Black Female United-States 0 -61 0.677777767 0.11714381 0.3125 0 0 0.4040404 Private 9th Divorced Handlers-cleaners Not-in-family White Male Puerto-Rico 1 -23 0.25555557 0.09601032 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -24 0.266666681 0.0806247741 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -35 0.3888889 0.185467154 0.8125 0.07430074 0 0.4040404 Private Bachelors Divorced Tech-support Unmarried White Male Germany 1 -42 0.466666669 0.139685661 0.5625 0 0 0.121212125 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -31 0.344444454 0.09915438 0.5 0 0 0.212121218 Private 12th Divorced Other-service Unmarried White Female United-States 0 -31 0.344444454 0.06840551 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -63 0.7 0.145761624 0.8125 0 0 0.25252524 Private Bachelors Widowed Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.1272886 0.6875 0 0.365013778 0.646464646 State-gov Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 -43 0.477777779 0.0355956256 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -22 0.244444445 0.2052327 0.8125 0 0 0.1010101 Private Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female Vietnam 0 -17 0.188888893 0.17892915 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Own-child White Male United-States 0 -23 0.25555557 0.1739726 0.8125 0 0.5121671 0.4040404 Self-emp-not-inc Bachelors Never-married Adm-clerical Own-child White Male United-States 1 -35 0.3888889 0.243020669 0.3125 0 0 0.454545468 Private 9th Divorced Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.03587245 0.5625 0 0 0.282828271 Private HS-grad Divorced Other-service Unmarried Other Female United-States 0 -50 0.5555556 0.08575104 0.8125 0.1502415 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.157456875 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Other-relative White Male ? 0 -26 0.2888889 0.133043274 0.875 0 0 0.4040404 Local-gov Masters Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 -32 0.355555564 0.229634851 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.059562 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.123802371 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -90 1 0.03485137 0.875 0 0 0.5050505 Private Masters Never-married Exec-managerial Not-in-family Black Male United-States 1 -35 0.3888889 0.118282087 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 1 -31 0.344444454 0.158440232 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband Black Male United-States 1 -60 0.6666667 0.1530715 0.5625 0 0 0.333333343 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -21 0.233333334 0.09867213 0.6875 0 0.3624885 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 -71 0.788888931 0.227024227 0.875 0 0 0.4040404 Local-gov Masters Widowed Prof-specialty Not-in-family White Female United-States 0 -22 0.244444445 0.09497038 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Other-service Own-child White Male United-States 0 -50 0.5555556 0.0793363 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.116417743 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.0495142154 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Asian-Pac-Islander Female Vietnam 0 -74 0.822222233 0.142166287 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -67 0.7444445 0.1332359 0.625 0 0.423324138 0.7070707 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -59 0.655555546 0.029110834 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.123782165 0.5625 0 0.399449021 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -45 0.5 0.0180379264 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband Amer-Indian-Eskimo Male United-States 0 -63 0.7 0.182898283 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -39 0.433333337 0.168489367 0.8125 0 0 0.6363636 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.6152381 0.625 0 0 0.4040404 State-gov Some-college Divorced Other-service Unmarried Black Female United-States 0 -32 0.355555564 0.10310331 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family Asian-Pac-Islander Male South 0 -34 0.377777785 0.121971034 0.8125 0 0.453856736 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.155917168 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -29 0.322222233 0.06427068 0.875 0 0 0.363636374 State-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 -22 0.244444445 0.158053622 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -53 0.5888889 0.19101572 0.8125 0.135501355 0 0.434343427 Private Bachelors Divorced Sales Not-in-family White Female United-States 1 -46 0.51111114 0.2213699 0.6875 0 0 0.424242437 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.09681452 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 1 -44 0.4888889 0.056245517 0.9375 0.0235402342 0 1 Private Prof-school Divorced Prof-specialty Not-in-family White Female United-States 0 -56 0.622222245 0.0551988445 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.176045075 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child Black Female United-States 0 -52 0.5777778 0.208826 0.3125 0 0 0.3030303 Private 9th Married-spouse-absent Machine-op-inspct Not-in-family Asian-Pac-Islander Female China 0 -39 0.433333337 0.212979019 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -45 0.5 0.05965091 0.625 0.07688077 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.04128699 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.07635456 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Male United-States 0 -35 0.3888889 0.320988357 0.5625 0 0 0.04040404 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -46 0.51111114 0.179905772 0.1875 0 0 0.454545468 Private 5th-6th Married-civ-spouse Craft-repair Wife White Female Italy 0 -35 0.3888889 0.0324125 0.5 0 0 0.5050505 Private 12th Married-civ-spouse Craft-repair Wife White Female United-States 0 -33 0.366666675 0.144564077 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -48 0.533333361 0.07785048 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.130760655 0.5625 0 0 0.5050505 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 -18 0.2 0.0156482272 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 -20 0.222222224 0.06061204 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Own-child White Female United-States 0 -35 0.3888889 0.06850452 0.5625 0 0 0.6060606 Private HS-grad Never-married Transport-moving Own-child Asian-Pac-Islander Male United-States 0 -19 0.211111113 0.159934133 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -21 0.233333334 0.139079481 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female ? 0 -56 0.622222245 0.0193499718 0.4375 0 0 0.4040404 Private 11th Separated Machine-op-inspct Not-in-family White Female United-States 0 -28 0.311111122 0.103370704 0.8125 0 0 0.161616161 Private Bachelors Never-married Adm-clerical Own-child White Female El-Salvador 0 -45 0.5 0.1855702 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -32 0.355555564 0.08621376 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 -44 0.4888889 0.1181952 0.8125 0 0 0.121212125 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.127745241 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.141312927 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -33 0.366666675 0.119210213 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.104174905 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -25 0.2777778 0.128827617 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -28 0.311111122 0.252900064 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -39 0.433333337 0.0693424 0.8125 0.07298073 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -53 0.5888889 0.11394991 0.375 0 0 0.4040404 Private 10th Married-spouse-absent Machine-op-inspct Not-in-family White Female Columbia 0 -47 0.5222222 0.12393371 0.5625 0.0332503319 0 0.454545468 Private HS-grad Divorced Exec-managerial Not-in-family Amer-Indian-Eskimo Female United-States 0 -49 0.544444442 0.02071186 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 0 -22 0.244444445 0.09798378 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 -31 0.344444454 0.0619409271 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative White Male United-States 0 -44 0.4888889 0.0331709 0.625 0 0 0.8080808 Self-emp-inc Some-college Divorced Other-service Unmarried White Male United-States 0 -19 0.211111113 0.147474423 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Own-child White Male United-States 0 -37 0.411111116 0.162527919 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -60 0.6666667 0.169442415 0.5625 0 0 0.353535354 ? HS-grad Widowed ? Not-in-family White Male Poland 0 -23 0.25555557 0.215424612 0.625 0 0 0.25252524 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -44 0.4888889 0.223883539 0.9375 1 0 0.656565666 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -54 0.6 0.122844607 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -23 0.25555557 0.138707012 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.137343109 0.625 0 0 0.1010101 Private Some-college Never-married Other-service Own-child White Female United-States 0 -19 0.211111113 0.1052694 0.625 0 0 0.25252524 State-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 -51 0.566666663 0.17121987 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -41 0.455555558 0.102043167 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -61 0.677777767 0.057619527 0.625 0.1502415 0 0.181818187 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -19 0.211111113 0.020744862 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-spouse-absent Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 -22 0.244444445 0.08838793 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 -22 0.244444445 0.0416581072 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -49 0.544444442 0.153431162 0.25 0 0 0.323232323 Private 7th-8th Married-civ-spouse Prof-specialty Husband White Male United-States 0 -35 0.3888889 0.08988587 0.375 0 0 0.5050505 Private 10th Divorced Machine-op-inspct Not-in-family White Male United-States 0 -38 0.422222227 0.0701109 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.07100535 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -56 0.622222245 0.09576448 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -41 0.455555558 0.226740673 0.625 0 0 0.8080808 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -62 0.6888889 0.135095522 0.875 0 0 0.454545468 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.140568674 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Own-child White Male Japan 0 -55 0.6111111 0.130594969 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female England 0 -25 0.2777778 0.18348965 0.5625 0.04416044 0 0.424242437 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -33 0.366666675 0.038190078 0.8125 0.1502415 0 0.75757575 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.194376662 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.179455861 0.5625 0 0 0.454545468 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -53 0.5888889 0.18648015 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 -43 0.477777779 0.088526 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Not-in-family White Female United-States 0 -56 0.622222245 0.117954075 0.5625 0 0 0.353535354 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -25 0.2777778 0.1868681 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -60 0.6666667 0.04263204 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Other-relative Black Male United-States 0 -28 0.311111122 0.0648862943 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.14949435 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male Mexico 0 -40 0.444444448 0.133307964 0.8125 0.0297702979 0 0.4040404 Private Bachelors Never-married Adm-clerical Unmarried Black Female United-States 0 -29 0.322222233 0.4260732 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -20 0.222222224 0.1387279 0.625 0 0 0.25252524 Private Some-college Never-married Craft-repair Own-child White Female United-States 0 -25 0.2777778 0.09411298 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.135987282 0.4375 0 0 0.1010101 Private 11th Never-married Sales Own-child White Female United-States 0 -32 0.355555564 0.155063808 0.75 0 0 0.353535354 State-gov Assoc-acdm Married-civ-spouse Other-service Husband White Male United-States 0 -27 0.3 0.07642192 0.125 0 0 0.353535354 Private 1st-4th Never-married Other-service Own-child Other Male Dominican-Republic 0 -48 0.533333361 0.06362274 0.5625 0 0 0.161616161 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 -20 0.222222224 0.182783112 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 -55 0.6111111 0.156083539 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female England 0 -33 0.366666675 0.133483082 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -21 0.233333334 0.0948094055 0.625 0 0 0.121212125 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -43 0.477777779 0.123579435 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.111649789 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -39 0.433333337 0.09386646 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.153223038 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family Asian-Pac-Islander Female United-States 0 -25 0.2777778 0.149695739 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -44 0.4888889 0.130324885 0.625 0 0 0.727272749 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -27 0.3 0.0197082926 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Unmarried White Male United-States 0 -39 0.433333337 0.117442861 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -69 0.7666667 0.0728737339 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Other-relative White Male United-States 0 -34 0.377777785 0.0745077357 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family Asian-Pac-Islander Female Philippines 0 -20 0.222222224 0.135838434 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Male United-States 0 -37 0.411111116 0.0877460539 0.1875 0 0 0.4040404 Private 5th-6th Separated Other-service Unmarried White Female United-States 0 -43 0.477777779 0.06609394 0.8125 0 0 0.3939394 Local-gov Bachelors Divorced Prof-specialty Own-child White Female United-States 0 -62 0.6888889 0.158631518 0.5625 0 0 0.4848485 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -34 0.377777785 0.400753021 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Wife Black Female United-States 1 -31 0.344444454 0.235163212 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -42 0.466666669 0.07919621 1 0.0861408561 0 0.6060606 State-gov Doctorate Divorced Prof-specialty Not-in-family White Female United-States 1 -26 0.2888889 0.110852323 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -39 0.433333337 0.229063019 0.625 0 0 0.75757575 Private Some-college Separated Other-service Unmarried White Female United-States 0 -25 0.2777778 0.0330651551 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Male United-States 0 -54 0.6 0.125872821 0.625 0 0 0.3030303 Local-gov Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 -44 0.4888889 0.112658747 0.875 0 0 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.02297022 0.875 0.07688077 0 0.3838384 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.178564772 0.625 0 0 0.4040404 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -50 0.5555556 0.08646701 0.1875 0 0 0.5555556 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male ? 0 -33 0.366666675 0.10669864 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -40 0.444444448 0.114418693 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 -44 0.4888889 0.199856535 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.230657279 0.75 0 0 0.565656543 Local-gov Assoc-acdm Divorced Protective-serv Not-in-family White Male United-States 0 -21 0.233333334 0.0261136051 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 -35 0.3888889 0.181382835 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Never-married Other-service Not-in-family Black Female United-States 0 -43 0.477777779 0.0750876442 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -57 0.6333333 0.134110153 0.375 0 0 0.3030303 ? 10th Separated ? Not-in-family White Male United-States 0 -51 0.566666663 0.022807898 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -29 0.322222233 0.08949522 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.186585218 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Protective-serv Not-in-family Black Male United-States 0 -35 0.3888889 0.07554363 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -18 0.2 0.473539859 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 -58 0.644444466 0.0857166946 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.173233077 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.0385302156 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 -37 0.411111116 0.135595292 0.625 0 0 0.4040404 Private Some-college Separated Other-service Unmarried White Female United-States 0 -38 0.422222227 0.07683614 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -45 0.5 0.155572325 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.196989983 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Cambodia 1 -64 0.7111111 0.193123892 0.25 0 0 0.4040404 ? 7th-8th Widowed ? Not-in-family White Female United-States 0 -38 0.422222227 0.09055267 0.625 0 0 0.727272749 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -30 0.333333343 0.116119362 0.5625 0 0 0.3030303 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -46 0.51111114 0.128885537 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -18 0.2 0.1881101 0.375 0 0 0.3030303 ? 10th Never-married ? Other-relative White Female United-States 0 -60 0.6666667 0.262176 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.2046649 0.5625 0 0 0.444444448 Private HS-grad Separated Transport-moving Not-in-family White Male United-States 0 -47 0.5222222 0.110535763 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 -39 0.433333337 0.0750984251 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -42 0.466666669 0.179216757 0.625 0.07298073 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.0414762534 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Other-relative White Female United-States 0 -44 0.4888889 0.155820861 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Male United-States 0 -33 0.366666675 0.110963456 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -54 0.6 0.138301551 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -58 0.644444466 0.0367520824 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -45 0.5 0.0231823828 0.8125 0 0 0.3030303 Private Bachelors Never-married Transport-moving Not-in-family White Male United-States 0 -59 0.655555546 0.0784277 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -29 0.322222233 0.195823416 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Priv-house-serv Not-in-family White Female United-States 0 -27 0.3 0.1721433 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -44 0.4888889 0.07578408 0.875 0 0 0.2020202 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 -44 0.4888889 0.114094719 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -33 0.366666675 0.116295159 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.221596211 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -33 0.366666675 0.0830151439 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.0551389 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried Black Female United-States 0 -32 0.355555564 0.116732955 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Husband Other Male United-States 0 -31 0.344444454 0.0232854337 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -57 0.6333333 0.107110843 0.9375 1 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.100480571 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -78 0.8666667 0.244583279 0.5625 0 0 0.01010101 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -28 0.311111122 0.207926154 0.8125 0 0 0.4848485 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -30 0.333333343 0.173297063 0.625 0 0.518365443 0.4040404 Self-emp-not-inc Some-college Never-married Sales Other-relative Asian-Pac-Islander Male South 0 -29 0.322222233 0.113476418 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -66 0.733333349 0.09597934 0.5625 0 0 0.0303030312 Private HS-grad Never-married Other-service Other-relative Black Female United-States 0 -60 0.6666667 0.22788702 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.119670242 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -26 0.2888889 0.176881611 0.5625 0.02597026 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -24 0.266666681 0.1353784 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -29 0.322222233 0.1190021 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -44 0.4888889 0.253297448 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -34 0.377777785 0.119670242 0.8125 0 0 0.5555556 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -59 0.655555546 0.234679624 0.8125 0 0.43663913 0.434343427 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.2158348 0.8125 0 0 0.24242425 Private Bachelors Never-married Exec-managerial Own-child Asian-Pac-Islander Male United-States 0 -23 0.25555557 0.025696015 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Other-relative White Male Philippines 0 -55 0.6111111 0.08310203 0.6875 0 0 0.353535354 Local-gov Assoc-voc Separated Prof-specialty Unmarried Black Female United-States 0 -39 0.433333337 0.101723239 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.326310635 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family Black Male United-States 0 -57 0.6333333 0.22212629 0.25 0 0 0.75757575 Private 7th-8th Divorced Transport-moving Unmarried White Male United-States 0 -35 0.3888889 0.100291304 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -39 0.433333337 0.203147426 0.6875 0 0 0.4848485 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 -47 0.5222222 0.118756928 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Sales Own-child White Female United-States 1 -53 0.5888889 0.0358300135 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Adm-clerical Husband White Male United-States 1 -23 0.25555557 0.196272671 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child Black Male United-States 0 -35 0.3888889 0.13775599 0.875 0 0 0.5050505 Private Masters Never-married Craft-repair Not-in-family White Male United-States 1 -44 0.4888889 0.32086578 0.625 0 0 0.4040404 Private Some-college Divorced Farming-fishing Not-in-family White Female United-States 0 -28 0.311111122 0.151521012 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -26 0.2888889 0.2062531 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family Asian-Pac-Islander Female Poland 0 -23 0.25555557 0.196687564 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -32 0.355555564 0.06333986 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Husband White Male Ireland 0 -49 0.544444442 0.126330152 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -36 0.4 0.1186101 0.625 0.0217402168 0 0.6060606 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -36 0.4 0.5045481 0.5625 0 0 0.363636374 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -41 0.455555558 0.1549264 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Husband Other Male United-States 0 -21 0.233333334 0.1455306 0.75 0 0 0.464646459 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife Amer-Indian-Eskimo Female United-States 1 -54 0.6 0.070727855 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.133496553 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Other-service Not-in-family Black Female United-States 0 -35 0.3888889 0.14509213 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -31 0.344444454 0.08113396 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -46 0.51111114 0.1342462 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Other-relative Asian-Pac-Islander Male India 0 -46 0.51111114 0.09895501 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Not-in-family White Female United-States 0 -56 0.622222245 0.117696114 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -45 0.5 0.127677888 0.875 0 0 0.01010101 ? Masters Married-civ-spouse ? Wife White Female United-States 0 -21 0.233333334 0.16835466 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -51 0.566666663 0.0987226442 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.105352245 0.625 0 0 0.2020202 State-gov Some-college Divorced Prof-specialty Unmarried White Male United-States 0 -42 0.466666669 0.159028232 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Craft-repair Not-in-family White Male Puerto-Rico 0 -19 0.211111113 0.0426771641 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 -25 0.2777778 0.128043622 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Own-child White Male United-States 0 -37 0.411111116 0.08524859 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 -35 0.3888889 0.119051263 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Other-service Husband Black Male United-States 0 -40 0.444444448 0.0775649 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -57 0.6333333 0.09354855 0.4375 0 0 0.151515156 Self-emp-not-inc 11th Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.173006758 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -48 0.533333361 0.178542539 0.375 0 0 0.3838384 Private 10th Divorced Sales Not-in-family White Female United-States 0 -34 0.377777785 0.1683486 0.625 0 0 0.343434334 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.0209745374 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Transport-moving Not-in-family White Male United-States 0 -30 0.333333343 0.110587627 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Not-in-family White Male ? 0 -45 0.5 0.04549321 0.875 0 0 0.5050505 State-gov Masters Divorced Protective-serv Not-in-family White Male United-States 0 -32 0.355555564 0.117726423 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.134540528 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -62 0.6888889 0.0823368952 0.625 0.0861408561 0 0.3939394 Private Some-college Never-married Craft-repair Not-in-family White Female United-States 1 -56 0.622222245 0.126736283 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -50 0.5555556 0.065054 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -25 0.2777778 0.1276954 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -41 0.455555558 0.0946922153 0.625 0 0 0.333333343 Private Some-college Never-married Sales Not-in-family Black Male United-States 0 -35 0.3888889 0.172224119 0.5625 0 0 0.272727281 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -33 0.366666675 0.175645664 0.625 0 0 0.414141417 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.114451021 0.75 0 0.43663913 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 -37 0.411111116 0.101920582 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -56 0.622222245 0.129903927 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -19 0.211111113 0.0630455241 0.25 0 0.3677686 0.323232323 Private 7th-8th Never-married Craft-repair Own-child White Male United-States 0 -31 0.344444454 0.05856921 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Exec-managerial Wife White Female United-States 0 -53 0.5888889 0.154052824 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Craft-repair Not-in-family Other Male ? 1 -33 0.366666675 0.129752383 0.5625 0 0 0.353535354 Private HS-grad Separated Handlers-cleaners Unmarried White Male Puerto-Rico 0 -72 0.8 0.191337675 0.125 0 0 0.4040404 Private 1st-4th Divorced Other-service Not-in-family Black Male United-States 0 -54 0.6 0.0291431639 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -30 0.333333343 0.1279985 0.8125 0 0 0.4040404 Private Bachelors Never-married Machine-op-inspct Not-in-family White Female United-States 0 -51 0.566666663 0.2061743 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 -30 0.333333343 0.148277268 0.5625 0 0.4242424 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.25705108 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -32 0.355555564 0.145726591 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 0 -30 0.333333343 0.143949136 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Male United-States 1 -35 0.3888889 0.07561839 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 -40 0.444444448 0.140281737 0.625 0 0 0.444444448 Private Some-college Divorced Adm-clerical Own-child White Female United-States 1 -38 0.422222227 0.23750712 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -19 0.211111113 0.08730354 0.375 0 0 0.3030303 Private 10th Never-married Other-service Other-relative White Female United-States 0 -32 0.355555564 0.168080539 0.625 0 0 0.444444448 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -49 0.544444442 0.120393619 0.875 0 0 0.4040404 Private Masters Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 -76 0.844444454 0.116886519 0.8125 0 0 0.1010101 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -60 0.6666667 0.112931527 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -60 0.6666667 0.0549455956 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Sales Husband White Male United-States 0 -55 0.6111111 0.1082114 1 0 0 0.8080808 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.110003 0.8125 0 0 0.3030303 Private Bachelors Divorced Tech-support Not-in-family White Female ? 0 -24 0.266666681 0.102504537 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -53 0.5888889 0.0715132 0.875 0.07298073 0 0.6060606 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -69 0.7666667 0.107220627 0.625 0 0.185950413 0.3838384 State-gov Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -71 0.788888931 0.168560758 0.625 0.0343203433 0 0.3030303 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -41 0.455555558 0.05281184 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -32 0.355555564 0.08848829 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -45 0.5 0.112432435 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.256183565 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -31 0.344444454 0.0533371978 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -40 0.444444448 0.230459258 0.5625 0 0 0.373737365 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -44 0.4888889 0.122998171 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -63 0.7 0.22864677 0.625 0 0 0.6060606 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -31 0.344444454 0.256719679 0.625 0.1502415 0 0.565656543 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -51 0.566666663 0.202609956 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Unmarried White Male United-States 0 -51 0.566666663 0.16231373 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Philippines 0 -23 0.25555557 0.100507513 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -49 0.544444442 0.11329928 0.25 0 0 0.4848485 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -56 0.622222245 0.192958876 0.5625 0.0288502872 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.205830112 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.07393119 0.9375 0.1502415 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.127161965 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Other-service Unmarried White Female United-States 0 -43 0.477777779 0.161762774 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Germany 0 -31 0.344444454 0.309465528 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.109453395 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -43 0.477777779 0.0979595259 0.9375 0 0 0.3030303 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.0872718841 1 0 0 0.727272749 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 -41 0.455555558 0.01848448 0.625 0 0 0.464646459 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -43 0.477777779 0.131513 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -47 0.5222222 0.0372275971 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.110813938 0.9375 0 0.6483012 0.454545468 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 -46 0.51111114 0.0187256057 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.111327842 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 -19 0.211111113 0.184990957 0.1875 0 0 0.5050505 Private 5th-6th Never-married Other-service Not-in-family White Male Guatemala 0 -24 0.266666681 0.2136283 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.109945752 0.625 0 0 0.656565666 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -37 0.411111116 0.114775665 0.6875 0 0 0.3030303 Private Assoc-voc Divorced Machine-op-inspct Not-in-family White Female United-States 0 -28 0.311111122 0.0376842543 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Own-child Black Female Germany 0 -40 0.444444448 0.05160958 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -27 0.3 0.24655807 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 -22 0.244444445 0.2353114 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -21 0.233333334 0.193185851 0.625 0 0 0.121212125 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -32 0.355555564 0.2514055 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -20 0.222222224 0.109097771 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Own-child White Male United-States 0 -45 0.5 0.366350234 0.875 0.143441439 0 0.4848485 Private Masters Divorced Transport-moving Not-in-family White Male United-States 1 -46 0.51111114 0.0734752044 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Protective-serv Husband White Male United-States 1 -46 0.51111114 0.0741905 0.6875 0 0 0.454545468 Private Assoc-voc Divorced Exec-managerial Unmarried White Female United-States 0 -26 0.2888889 0.022974262 0.625 0 0 0.444444448 Private Some-college Never-married Protective-serv Not-in-family White Male United-States 0 -47 0.5222222 0.0798178762 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Own-child White Male United-States 0 -22 0.244444445 0.07933495 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -34 0.377777785 0.238351062 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -49 0.544444442 0.13502413 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male Portugal 0 -20 0.222222224 0.174120113 0.625 0 0 0.25252524 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -28 0.311111122 0.12821874 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -30 0.333333343 0.117669173 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -23 0.25555557 0.12084084 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.221949816 0.3125 0 0 0.4040404 Private 9th Never-married Priv-house-serv Own-child White Male Mexico 0 -31 0.344444454 0.184425861 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Other-service Husband White Male Mexico 0 -46 0.51111114 0.172776416 0.125 0 0 0.4040404 Private 1st-4th Never-married Machine-op-inspct Own-child White Male Puerto-Rico 0 -42 0.466666669 0.13201344 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -60 0.6666667 0.190381259 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.04891881 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.033875417 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.136889145 0.3125 0 0 0.323232323 Private 9th Never-married Sales Own-child White Female United-States 0 -56 0.622222245 0.116264179 0.8125 0.07688077 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.136167124 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -61 0.677777767 0.119107164 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.118636362 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried Black Female United-States 1 -60 0.6666667 0.02690905 0.3125 0.0222802218 0 0.373737365 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.19698526 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -40 0.444444448 0.108631007 0.625 0 0 0.25252524 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -48 0.533333361 0.239320278 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Canada 1 -56 0.622222245 0.1228931 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -50 0.5555556 0.0467062481 0.6875 0.03103031 0 0.5555556 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 -57 0.6333333 0.0687395856 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.111674711 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Other Female United-States 0 -46 0.51111114 0.214358419 0.6875 0 0 0.363636374 Private Assoc-voc Divorced Tech-support Other-relative White Female United-States 0 -21 0.233333334 0.0792117 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.11498446 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -42 0.466666669 0.278369784 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -20 0.222222224 0.128279358 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -54 0.6 0.0594582781 1 0 0.453856736 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.146356344 0.5625 0.0406404063 0 0.222222224 Local-gov HS-grad Married-civ-spouse Transport-moving Wife White Female United-States 0 -62 0.6888889 0.0654884353 0.625 0 0 0.01010101 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -50 0.5555556 0.08313369 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -49 0.544444442 0.2830744 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -48 0.533333361 0.33563906 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.167395547 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative Black Female United-States 0 -46 0.51111114 0.09251265 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male Philippines 1 -42 0.466666669 0.1838143 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -52 0.5777778 0.138784468 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.06206014 0.75 0 0 0.4040404 Local-gov Assoc-acdm Widowed Adm-clerical Not-in-family Black Female United-States 0 -37 0.411111116 0.109920152 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family Amer-Indian-Eskimo Female United-States 0 -34 0.377777785 0.13191846 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.07793939 0.625 0 0.4708448 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -18 0.2 0.08084367 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Other-relative White Female United-States 0 -33 0.366666675 0.149364352 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family Black Male United-States 0 -41 0.455555558 0.230459258 0.625 0 0 0.151515156 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -21 0.233333334 0.11878185 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.08974106 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 -26 0.2888889 0.113895357 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Tech-support Own-child White Female United-States 0 -33 0.366666675 0.107389688 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Wife White Female United-States 0 -24 0.266666681 0.1175055 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -43 0.477777779 0.243334547 0.375 0 0 0.424242437 Private 10th Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male China 0 -52 0.5777778 0.301459879 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Not-in-family White Female England 0 -27 0.3 0.208118781 0.625 0 0 0.4040404 ? Some-college Divorced ? Own-child Black Female United-States 0 -61 0.677777767 0.1673383 0.25 0 0 0.4040404 Private 7th-8th Divorced Other-service Unmarried White Female United-States 0 -35 0.3888889 0.108534023 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.143102512 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.115087509 0.5625 0.1502415 0 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.157516137 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.109821148 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -35 0.3888889 0.234854743 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -47 0.5222222 0.0234693084 0.8125 0 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male Germany 1 -22 0.244444445 0.139328018 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -49 0.544444442 0.23521845 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.08812525 0.5625 0 0 0.2020202 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -19 0.211111113 0.279755235 0.375 0 0 0.4040404 Private 10th Divorced Other-service Not-in-family White Female United-States 0 -27 0.3 0.0890352 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -42 0.466666669 0.136367828 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 -27 0.3 0.151155278 0.625 0 0 0.4040404 ? Some-college Divorced ? Own-child White Male United-States 0 -23 0.25555557 0.159495667 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 -20 0.222222224 0.072511375 0.625 0 0 0.1010101 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -47 0.5222222 0.06921981 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -17 0.188888893 0.149122551 0.5 0 0 0.181818187 Private 12th Never-married Other-service Own-child Black Male United-States 0 -76 0.844444454 0.142502382 0.375 0 0 0.01010101 ? 10th Married-civ-spouse ? Husband White Male United-States 0 -39 0.433333337 0.035458222 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 -25 0.2777778 0.186104313 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -31 0.344444454 0.0906664953 0.6875 0 0 0.434343427 Private Assoc-voc Married-civ-spouse Exec-managerial Wife Black Female United-States 0 -44 0.4888889 0.145132542 0.5625 0 0 0.2020202 Private HS-grad Divorced Transport-moving Not-in-family Black Male Haiti 0 -53 0.5888889 0.179516479 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.17903018 0.625 0 0 0.454545468 Private Some-college Separated Craft-repair Not-in-family White Male United-States 0 -45 0.5 0.04560906 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.120529667 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.162406683 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.118908472 0.625 0 0 0.4848485 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -45 0.5 0.113948561 0.625 0 0 0.454545468 Private Some-college Widowed Other-service Unmarried White Female United-States 0 -37 0.411111116 0.190247223 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -53 0.5888889 0.10579139 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -35 0.3888889 0.06692036 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -38 0.422222227 0.279510736 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male ? 0 -65 0.722222269 0.2278675 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -49 0.544444442 0.04015074 0.375 0 0 0.7070707 Self-emp-not-inc 10th Divorced Farming-fishing Unmarried White Male United-States 0 -24 0.266666681 0.148464516 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -54 0.6 0.07807073 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.0182069838 0.375 0 0 0.121212125 Private 10th Never-married Sales Own-child White Female United-States 0 -19 0.211111113 0.114985809 0.5 0 0 0.161616161 Private 12th Never-married Other-service Own-child White Male United-States 0 -60 0.6666667 0.123365924 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 -46 0.51111114 0.1295611 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -78 0.8666667 0.111600623 0.875 0 0 0.151515156 ? Masters Widowed ? Not-in-family White Female United-States 0 -26 0.2888889 0.08658488 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Black Female United-States 0 -58 0.644444466 0.141053617 0.125 0 0 0.3838384 Private 1st-4th Married-civ-spouse Other-service Husband White Male Cuba 0 -37 0.411111116 0.08184118 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Divorced Exec-managerial Unmarried White Male United-States 0 -41 0.455555558 0.06317282 0.875 0 0 0.3838384 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.08998556 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -19 0.211111113 0.2635736 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -48 0.533333361 0.0649011061 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Greece 1 -22 0.244444445 0.137329638 0.625 0 0 0.24242425 Private Some-college Never-married Transport-moving Not-in-family White Female United-States 0 -50 0.5555556 0.132142752 0.875 0 0 0.6060606 Private Masters Married-spouse-absent Prof-specialty Other-relative White Male ? 0 -25 0.2777778 0.132008716 0.125 0 0 0.4040404 Private 1st-4th Never-married Priv-house-serv Not-in-family White Female Guatemala 0 -18 0.2 0.0342687629 0.375 0 0 0.0606060624 Private 10th Never-married Other-service Own-child White Male United-States 0 -21 0.233333334 0.125849247 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -47 0.5222222 0.135465965 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.07476098 0.5625 0 0 0.363636374 Private HS-grad Never-married Other-service Other-relative Amer-Indian-Eskimo Female United-States 0 -39 0.433333337 0.128285423 0.5625 0.0217402168 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 -67 0.7444445 0.117151223 0.8125 0 0 0.08080808 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.112574555 0.625 0 0.3677686 0.24242425 Private Some-college Never-married Other-service Own-child White Male United-States 0 -18 0.2 0.07424371 0.375 0 0 0.111111112 Private 10th Never-married Other-service Own-child White Male United-States 0 -36 0.4 0.19374758 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 -23 0.25555557 0.151514277 0.625 0 0 0.25252524 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -25 0.2777778 0.2659249 0.625 0 0 0.2020202 ? Some-college Separated ? Unmarried White Female United-States 0 -40 0.444444448 0.02533702 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male ? 0 -73 0.811111152 0.0197386015 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -35 0.3888889 0.0251322649 0.625 0.0501305 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.283388972 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.325136662 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -20 0.222222224 0.138892919 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -27 0.3 0.06827215 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -66 0.733333349 0.124852411 0.375 0 0 0.3030303 Self-emp-inc 10th Married-civ-spouse Sales Husband White Male United-States 0 -66 0.733333349 0.14605999 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 -64 0.7111111 0.172437623 0.875 0 0 0.353535354 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -48 0.533333361 0.234487 0.625 0.0332503319 0 0.535353541 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 -24 0.266666681 0.1281689 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -51 0.566666663 0.0174660962 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -25 0.2777778 0.119033076 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -33 0.366666675 0.11245399 0.4375 0 0 0.2020202 Private 11th Separated Sales Own-child White Female United-States 0 -50 0.5555556 0.058175195 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.215876564 0.25 0 0 0.5050505 Private 7th-8th Married-spouse-absent Craft-repair Not-in-family Black Male Dominican-Republic 0 -34 0.377777785 0.128166884 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.0753624439 0.25 0 0 0.4040404 Local-gov 7th-8th Never-married Other-service Unmarried Black Female United-States 0 -30 0.333333343 0.0308451857 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -59 0.655555546 0.0730758 0.625 0.02907029 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -41 0.455555558 0.08118717 0.625 0.03103031 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -36 0.4 0.110813938 0.875 0.105201051 0 0.454545468 Self-emp-not-inc Masters Never-married Sales Not-in-family White Male United-States 1 -37 0.411111116 0.217656031 0.125 0 0 0.858585835 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -28 0.311111122 0.0440417454 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family Amer-Indian-Eskimo Male United-States 0 -19 0.211111113 0.2794299 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -28 0.311111122 0.108847886 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -62 0.6888889 0.1515136 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -36 0.4 0.176049784 0.875 0.1502415 0 0.454545468 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -58 0.644444466 0.156137422 0.375 0 0 0.4040404 Self-emp-not-inc 10th Never-married Craft-repair Not-in-family White Male Greece 0 -42 0.466666669 0.123942472 0.5625 0.0115101151 0 0.5050505 Self-emp-inc HS-grad Divorced Sales Unmarried White Male United-States 0 -43 0.477777779 0.0896205 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.02359526 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.20489727 0.5625 0 0 0.5050505 State-gov HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -64 0.7111111 0.0339744277 0.3125 0 0 0.4040404 Local-gov 9th Never-married Adm-clerical Other-relative White Male United-States 0 -39 0.433333337 0.09839733 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -26 0.2888889 0.180124 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Own-child Black Female United-States 0 -19 0.211111113 0.0816593245 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -21 0.233333334 0.129703879 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -32 0.355555564 0.142134637 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.2331251 0.75 0.0501305 0 0.454545468 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 -26 0.2888889 0.1361907 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Other-relative White Female United-States 0 -20 0.222222224 0.107292026 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -19 0.211111113 0.2089021 0.625 0 0 0.3030303 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -33 0.366666675 0.130157843 0.8125 0 0 0.424242437 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -23 0.25555557 0.134766847 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Other-relative White Male El-Salvador 0 -29 0.322222233 0.0258320682 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.05137721 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -30 0.333333343 0.164116785 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -63 0.7 0.04638767 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Transport-moving Wife Asian-Pac-Islander Female United-States 0 -34 0.377777785 0.06977548 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -60 0.6666667 0.05930808 0.625 0 0 0.24242425 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.125414148 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -25 0.2777778 0.173711285 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -27 0.3 0.134859785 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -55 0.6111111 0.0841749758 0.5625 0.2782828 0 0.5555556 Self-emp-not-inc HS-grad Divorced Craft-repair Unmarried White Male United-States 1 -32 0.355555564 0.153342918 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child Black Female United-States 0 -22 0.244444445 0.07894497 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Male Greece 0 -25 0.2777778 0.05128561 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -18 0.2 0.066455625 0.4375 0 0 0.161616161 Private 11th Never-married Other-service Own-child White Female United-States 0 -24 0.266666681 0.1049488 0.625 0 0 0.444444448 Local-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -29 0.322222233 0.191122144 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -73 0.811111152 0.189874083 0.4375 0 0 0.0303030312 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -39 0.433333337 0.125400677 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -33 0.366666675 0.136157021 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.246300116 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 1 -22 0.244444445 0.126313314 0.375 0 0 0.4040404 Private 10th Separated Other-service Unmarried White Female United-States 0 -33 0.366666675 0.141059682 0.5625 0 0 0.2020202 ? HS-grad Separated ? Unmarried White Female United-States 0 -33 0.366666675 0.0855052 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.0741076544 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.07049212 0.8125 0 0 0.454545468 Private Bachelors Separated Prof-specialty Unmarried White Male United-States 0 -57 0.6333333 0.294523835 0.625 0 0 0.3838384 Self-emp-not-inc Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -42 0.466666669 0.174878508 0.875 0.046500463 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -22 0.244444445 0.146804243 0.625 0 0.3946281 0.3030303 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -21 0.233333334 0.09075608 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 -42 0.466666669 0.08118717 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.0173792113 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -41 0.455555558 0.0428341 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -20 0.222222224 0.219230756 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -47 0.5222222 0.142276749 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.13921015 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -29 0.322222233 0.2882492 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 -52 0.5777778 0.147200957 0.625 0.14084141 0 0.161616161 Private Some-college Married-spouse-absent Adm-clerical Not-in-family White Female United-States 1 -71 0.788888931 0.110045433 0.625 0 0 0.353535354 Private Some-college Widowed Sales Not-in-family White Male United-States 1 -52 0.5777778 0.0841871 0.5625 0 0 0.5555556 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -36 0.4 0.07234434 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -53 0.5888889 0.102628469 0.625 0 0 0.4848485 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 1 -37 0.411111116 0.108591273 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 -26 0.2888889 0.144001 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -34 0.377777785 0.13771154 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.254459977 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -20 0.222222224 0.078382574 0.3125 0 0 0.4040404 Private 9th Never-married Sales Own-child White Female United-States 0 -34 0.377777785 0.1415527 0.625 0 0.399449021 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -56 0.622222245 0.1742784 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -39 0.433333337 0.220538765 0.8125 0 0 0.363636374 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -24 0.266666681 0.20286791 0.625 0 0 0.2020202 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -24 0.266666681 0.125426263 0.4375 0 0 0.353535354 Private 11th Divorced Sales Unmarried White Female United-States 0 -23 0.25555557 0.137349844 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.129477575 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -25 0.2777778 0.102400817 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -29 0.322222233 0.135686219 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.10546203 0.625 0 0 0.373737365 Private Some-college Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 -51 0.566666663 0.07802965 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.07190183 0.6875 0 0.399449021 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.241995558 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -29 0.322222233 0.0559053831 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -18 0.2 0.0530859679 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -24 0.266666681 0.1353582 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 0 -38 0.422222227 0.07217865 0.625 0 0 0.4040404 State-gov Some-college Separated Exec-managerial Own-child White Male United-States 0 -36 0.4 0.127751976 0.5625 0 0 0.282828271 Private HS-grad Never-married Priv-house-serv Unmarried Black Female ? 0 -34 0.377777785 0.0610316545 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Separated Exec-managerial Not-in-family White Male United-States 0 -42 0.466666669 0.218083724 0.8125 0 0.453856736 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.163367137 0.5 0 0 0.353535354 Self-emp-not-inc 12th Divorced Craft-repair Other-relative Black Male United-States 0 -21 0.233333334 0.06124786 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Transport-moving Own-child White Male United-States 0 -64 0.7111111 0.111582436 1 0.07688077 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male Canada 1 -32 0.355555564 0.1095194 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative Black Male United-States 0 -45 0.5 0.138360143 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -53 0.5888889 0.06560967 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Laos 0 -42 0.466666669 0.124507561 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.111285411 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -49 0.544444442 0.07798452 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -62 0.6888889 0.2481813 0.1875 0 0 0.24242425 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -28 0.311111122 0.03573976 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.0906348452 1 0 0 0.5050505 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 -32 0.355555564 0.103368014 0.5625 0 0 0.353535354 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -37 0.411111116 0.07217865 0.375 0 0.5874656 0.5050505 Self-emp-inc 10th Never-married Transport-moving Not-in-family White Male United-States 1 -38 0.422222227 0.121440291 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 -44 0.4888889 0.159170344 0.5625 0 0 0.25252524 Local-gov HS-grad Divorced Transport-moving Own-child White Male United-States 0 -19 0.211111113 0.09555299 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -22 0.244444445 0.247628316 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -24 0.266666681 0.1370764 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -58 0.644444466 0.0805264339 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.07292762 0.8125 0 0 0.4040404 Private Bachelors Widowed Other-service Not-in-family White Female United-States 0 -37 0.411111116 0.2596152 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Unmarried White Female United-States 0 -43 0.477777779 0.10911461 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -32 0.355555564 0.235082388 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.0303858351 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child Black Female United-States 0 -44 0.4888889 0.07597267 0.3125 0 0 0.5050505 Private 9th Divorced Other-service Own-child White Female United-States 0 -28 0.311111122 0.1236872 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 -35 0.3888889 0.1192971 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -38 0.422222227 0.161483258 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -26 0.2888889 0.101273321 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -20 0.222222224 0.1974069 0.4375 0 0 0.6060606 Private 11th Never-married Transport-moving Own-child White Male United-States 0 -24 0.266666681 0.134766847 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 1 -40 0.444444448 0.0618547127 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.218871772 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -79 0.8777778 0.0569917932 0.4375 0 0 0.07070707 Local-gov 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -44 0.4888889 0.170357078 0.375 0 0 0.424242437 Private 10th Divorced Adm-clerical Unmarried Other Female United-States 0 -51 0.566666663 0.0296355169 0.875 1 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -30 0.333333343 0.1042921 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -52 0.5777778 0.0668866858 0.75 0.03103031 0 0.4848485 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.122965172 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 -33 0.366666675 0.06277745 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male Philippines 0 -50 0.5555556 0.06742686 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 -51 0.566666663 0.0774073 0.6875 0.07298073 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -41 0.455555558 0.0816909745 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -35 0.3888889 0.12791498 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 -34 0.377777785 0.106248043 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.0264241043 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -31 0.344444454 0.09016 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Divorced Sales Not-in-family White Male United-States 0 -22 0.244444445 0.340794981 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -67 0.7444445 0.123508714 0.5625 0.0232902318 0 0.151515156 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -65 0.722222269 0.130137637 0.5625 0.09386094 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.09480133 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.3700055 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -29 0.322222233 0.120568059 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -57 0.6333333 0.128344685 0.375 0 0 0.6060606 Self-emp-not-inc 10th Divorced Exec-managerial Own-child White Male United-States 1 -47 0.5222222 0.0545051061 0.625 0 0 0.353535354 Private Some-college Widowed Other-service Not-in-family White Female United-States 0 -51 0.566666663 0.214893878 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -34 0.377777785 0.200103059 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -52 0.5777778 0.114879392 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.162145346 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.200406149 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.11443688 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -21 0.233333334 0.10078568 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -38 0.422222227 0.122937553 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 -55 0.6111111 0.106630616 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -61 0.677777767 0.15304859 0.8125 0 0 0.3030303 Self-emp-inc Bachelors Separated Sales Not-in-family White Female United-States 0 -34 0.377777785 0.06498463 0.75 0.0861408561 0 0.6060606 Private Assoc-acdm Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 1 -41 0.455555558 0.1932842 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -27 0.3 0.1505545 0.6875 0 0 0.434343427 Local-gov Assoc-voc Never-married Adm-clerical Own-child White Male United-States 0 -78 0.8666667 0.2130127 0.8125 1 0 0.2020202 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -40 0.444444448 0.114645 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -26 0.2888889 0.151114866 0.25 0 0 0.75757575 Self-emp-not-inc 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -43 0.477777779 0.08413725 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Japan 0 -55 0.6111111 0.06981454 0.5625 0 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -25 0.2777778 0.206338644 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male Mexico 0 -26 0.2888889 0.153470218 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Never-married Other-service Not-in-family White Female United-States 0 -43 0.477777779 0.10138917 0.5625 0 0 0.686868668 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -25 0.2777778 0.0973109156 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male Poland 0 -22 0.244444445 0.171446189 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Other-relative Black Female Jamaica 0 -52 0.5777778 0.210979968 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -61 0.677777767 0.101017378 0.5625 0.02414024 0 0.05050505 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -42 0.466666669 0.08450231 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Unmarried White Male United-States 0 -21 0.233333334 0.206752867 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.129975989 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -65 0.722222269 0.1294082 0.5625 0.02290023 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Greece 0 -56 0.622222245 0.08864253 0.5625 0 0 0.1010101 ? HS-grad Divorced ? Not-in-family White Male United-States 0 -33 0.366666675 0.22858952 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Divorced Other-service Unmarried White Male United-States 0 -22 0.244444445 0.136889145 0.375 0 0 0.4040404 Private 10th Never-married Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.0564603768 0.5625 0 0 0.24242425 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -45 0.5 0.108061872 0.5625 0 0 0.424242437 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -42 0.466666669 0.07307984 0.5625 0 0 0.424242437 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -37 0.411111116 0.276764065 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Farming-fishing Unmarried Other Male Mexico 0 -56 0.622222245 0.130543113 0.3125 0 0 0.4040404 Private 9th Divorced Craft-repair Not-in-family White Male United-States 0 -35 0.3888889 0.11017812 0.375 0 0 0.161616161 ? 10th Divorced ? Unmarried White Female ? 0 -40 0.444444448 0.06990547 0.75 0 0 0.323232323 Private Assoc-acdm Divorced Adm-clerical Unmarried Black Female United-States 0 -31 0.344444454 0.0232854337 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.0292367842 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -26 0.2888889 0.07125119 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -42 0.466666669 0.0610848628 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -45 0.5 0.1923446 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male China 0 -47 0.5222222 0.0380425751 0.625 0.07688077 0 0.5050505 Local-gov Some-college Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -22 0.244444445 0.334089935 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -33 0.366666675 0.257804751 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -37 0.411111116 0.174636722 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Not-in-family Black Male United-States 0 -48 0.533333361 0.124863192 0.5625 0 0 0.989899 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -57 0.6333333 0.193193942 0.375 0 0 0.08080808 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.09371895 0.625 0 0 0.6060606 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -58 0.644444466 0.0298012067 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -55 0.6111111 0.114238858 0.4375 0 0 0.4040404 Private 11th Widowed Adm-clerical Unmarried White Female United-States 0 -52 0.5777778 0.08985152 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.1261712 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -42 0.466666669 0.12125776 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.03136044 0.5625 0 0 0.6060606 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.0579677448 0.5 0 0 0.3030303 Private 12th Never-married Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.172434255 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.126895919 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -43 0.477777779 0.267230183 0.8125 0 0.4331956 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -25 0.2777778 0.04073873 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -32 0.355555564 0.182713747 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -56 0.622222245 0.154593 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -33 0.366666675 0.0232867822 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.07572683 0.625 0 0 0.1010101 State-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 -20 0.222222224 0.07093126 0.625 0 0 0.181818187 Private Some-college Never-married Sales Own-child White Female United-States 0 -34 0.377777785 0.149117842 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -34 0.377777785 0.2053418 0.3125 0 0 0.4040404 Private 9th Divorced Other-service Unmarried White Female United-States 0 -55 0.6111111 0.215351209 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.118550152 0.3125 0 0 0.232323229 Private 9th Married-civ-spouse Tech-support Wife White Female United-States 0 -31 0.344444454 0.143968 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -30 0.333333343 0.167295188 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -31 0.344444454 0.236536562 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Male United-States 0 -51 0.566666663 0.093068324 0.5625 0 0.430670351 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family White Male United-States 0 -59 0.655555546 0.03382692 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.07912481 0.5625 0 0 0.363636374 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -40 0.444444448 0.130908161 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -54 0.6 0.07954981 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -25 0.2777778 0.061109785 0.8125 0 0.453856736 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.0258010849 0.4375 0 0 0.3030303 Self-emp-inc 11th Never-married Farming-fishing Own-child White Male United-States 0 -41 0.455555558 0.078393355 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.141776308 0.375 0 0 0.4040404 Private 10th Widowed Other-service Unmarried White Female United-States 0 -37 0.411111116 0.113473721 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.117454983 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -39 0.433333337 0.112307832 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -19 0.211111113 0.252652228 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 -41 0.455555558 0.251544237 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -54 0.6 0.228777438 0.5625 0 0 0.414141417 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -39 0.433333337 0.06177052 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.05526283 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.159117132 0.9375 0 0 0.3030303 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 -57 0.6333333 0.09450968 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -33 0.366666675 0.022954056 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -56 0.622222245 0.137950644 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -60 0.6666667 0.126034468 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -22 0.244444445 0.04870328 0.5625 0 0 0.7070707 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -58 0.644444466 0.117954075 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Other-relative White Male United-States 0 -48 0.533333361 0.138550758 0.875 0.105201051 0 0.5050505 Federal-gov Masters Married-spouse-absent Exec-managerial Not-in-family White Female United-States 1 -45 0.5 0.159348831 0.875 0.07688077 0 0.5555556 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.0483543873 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Asian-Pac-Islander Female United-States 0 -56 0.622222245 0.0589908436 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -48 0.533333361 0.0921920538 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.193966478 0.8125 0 0.518365443 0.4848485 Private Bachelors Never-married Tech-support Not-in-family Asian-Pac-Islander Female Philippines 0 -38 0.422222227 0.07449763 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -58 0.644444466 0.07342536 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.158328429 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -63 0.7 0.0597108528 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male ? 0 -51 0.566666663 0.223777115 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -22 0.244444445 0.196366966 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Wife Other Female Mexico 0 -44 0.4888889 0.03037169 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -46 0.51111114 0.108666033 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Tech-support Not-in-family White Male United-States 0 -64 0.7111111 0.1422653 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -32 0.355555564 0.198771477 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male England 1 -31 0.344444454 0.139112487 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -36 0.4 0.160580724 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -21 0.233333334 0.020078063 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.0727572143 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.0770011544 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family Black Female United-States 0 -54 0.6 0.1160372 0.5625 0 0.4708448 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.132881612 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Other-service Husband White Male United-States 0 -28 0.311111122 0.1287643 0.875 0 0 0.2020202 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -57 0.6333333 0.378902227 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -44 0.4888889 0.0535668731 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.1063383 0.625 0 0 0.6060606 Self-emp-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -58 0.644444466 0.137950644 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.125071988 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -39 0.433333337 0.112804905 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.0564071648 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female South 0 -27 0.3 0.0264241043 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.159511149 0.3125 0 0 0.4040404 Local-gov 9th Separated Other-service Unmarried Black Female United-States 0 -37 0.411111116 0.104000457 0.875 0 0 0.4040404 Self-emp-not-inc Masters Never-married Exec-managerial Not-in-family White Male United-States 0 -27 0.3 0.09113461 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family Black Female United-States 0 -33 0.366666675 0.137429327 0.625 0 0 0.5555556 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -20 0.222222224 0.2076096 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Male United-States 0 -55 0.6111111 0.123852216 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -39 0.433333337 0.06664489 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family White Female United-States 0 -41 0.455555558 0.09540077 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.1095322 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -39 0.433333337 0.1259065 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-spouse-absent Sales Not-in-family White Male United-States 0 -28 0.311111122 0.120907523 0.5625 0 0 0.5050505 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 -25 0.2777778 0.2634813 0.625 0 0 0.24242425 Private Some-college Never-married Sales Own-child White Male United-States 0 -31 0.344444454 0.05863387 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.0202114228 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.076423265 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -70 0.7777778 0.432968169 0.5625 0 0 0.323232323 Private HS-grad Divorced Protective-serv Not-in-family White Female United-States 0 -23 0.25555557 0.122662082 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -61 0.677777767 0.109403551 0.5625 0 0 0.4040404 Private HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 -45 0.5 0.163119271 0.25 0 0 0.5555556 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.115073368 0.5625 0.0406404063 0 0.6060606 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -56 0.622222245 0.2930023 0.625 0 0 0.5050505 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -79 0.8777778 0.0813003257 1 0.200512 0 0.353535354 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male El-Salvador 1 -20 0.222222224 0.115039691 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -30 0.333333343 0.180894524 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried Asian-Pac-Islander Male Vietnam 0 -27 0.3 0.181419209 0.8125 0 0 0.25252524 Private Bachelors Married-civ-spouse Sales Husband White Male ? 0 -40 0.444444448 0.151027992 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -60 0.6666667 0.103099272 0.5625 0 0 0.05050505 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -58 0.644444466 0.119463466 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -71 0.788888931 0.109983467 0.9375 0 0 0.02020202 Self-emp-not-inc Prof-school Married-civ-spouse Farming-fishing Husband White Male United-States 0 -50 0.5555556 0.120246112 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.123609066 0.625 0 0 0.4040404 Local-gov Some-college Never-married Exec-managerial Not-in-family White Male Iran 0 -33 0.366666675 0.139601469 0.375 0.03418034 0 0.353535354 Private 10th Separated Other-service Unmarried White Female United-States 0 -60 0.6666667 0.0182103515 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband Amer-Indian-Eskimo Male United-States 1 -33 0.366666675 0.119020954 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 -43 0.477777779 0.109930933 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Other-service Wife White Female ? 1 -33 0.366666675 0.265862256 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Unmarried Black Male United-States 0 -33 0.366666675 0.131667912 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -32 0.355555564 0.298743516 0.5625 0 0 0.454545468 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -21 0.233333334 0.08151317 0.625 0 0 0.09090909 Private Some-college Never-married Other-service Own-child White Female United-States 0 -38 0.422222227 0.03491468 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 -38 0.422222227 0.174369991 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -39 0.433333337 0.127557322 0.625 0 0 0.3030303 State-gov Some-college Separated Exec-managerial Unmarried Black Female United-States 0 -17 0.188888893 0.133458167 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Female United-States 0 -21 0.233333334 0.227497056 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -42 0.466666669 0.141795844 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -42 0.466666669 0.125009343 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -36 0.4 0.117062986 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.16922082 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 1 -37 0.411111116 0.2800873 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.080684714 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -37 0.411111116 0.122384585 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.122825749 0.5625 0 0 0.6060606 Private HS-grad Separated Prof-specialty Unmarried Other Female Puerto-Rico 0 -49 0.544444442 0.04168168 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.09868627 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.218083724 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -49 0.544444442 0.09851654 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.193325281 0.875 0.0861408561 0 0.4040404 Federal-gov Masters Never-married Exec-managerial Not-in-family White Male United-States 1 -33 0.366666675 0.196818233 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Protective-serv Unmarried White Male United-States 0 -24 0.266666681 0.0593559 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -41 0.455555558 0.0963464156 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.270506948 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband Black Male Jamaica 1 -36 0.4 0.190692425 0.5625 0 0.43663913 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -84 0.933333337 0.104436234 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -23 0.25555557 0.175290048 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -41 0.455555558 0.102573916 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.09334784 0.5625 0 0.453856736 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.352322519 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -46 0.51111114 0.118045 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male India 0 -55 0.6111111 0.21802716 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.213153452 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -54 0.6 0.110335052 0.875 0 0 0.6060606 Self-emp-not-inc Masters Divorced Sales Not-in-family White Male United-States 0 -27 0.3 0.0486345775 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Male United-States 0 -52 0.5777778 0.0503696 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -36 0.4 0.2583126 0.625 1 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 1 -25 0.2777778 0.179610088 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -52 0.5777778 0.234066024 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.226366863 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Not-in-family Amer-Indian-Eskimo Female United-States 0 -36 0.4 0.1282073 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 -31 0.344444454 0.137436062 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -66 0.733333349 0.0211233888 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -90 1 0.105058581 0.8125 0.105661057 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -67 0.7444445 0.131447658 0.875 0.200512 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.181573451 0.25 0.0258002579 0 0.4040404 Self-emp-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.01818139 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.07849304 0.8125 0 0.4331956 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.127926424 0.25 0 0 0.5050505 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -32 0.355555564 0.06821759 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 -48 0.533333361 0.07651217 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Other-relative Black Female United-States 0 -21 0.233333334 0.1271586 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Husband Other Male United-States 0 -33 0.366666675 0.0740861 0.75 0 0 0.4040404 Private Assoc-acdm Married-spouse-absent Prof-specialty Own-child White Female United-States 0 -27 0.3 0.1317979 0.625 0 0 0.4848485 Private Some-college Never-married Prof-specialty Not-in-family White Female ? 0 -47 0.5222222 0.294179648 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 -18 0.2 0.0567473024 0.4375 0 0 0.24242425 Private 11th Never-married Other-service Own-child White Female United-States 0 -44 0.4888889 0.258295774 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.146067411 0.625 0 0 0.373737365 Private Some-college Never-married Craft-repair Own-child White Male Mexico 0 -18 0.2 0.2701217 0.375 0 0 0.353535354 Private 10th Never-married Sales Own-child White Female United-States 0 -56 0.622222245 0.0560353734 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -24 0.266666681 0.219300136 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -43 0.477777779 0.126167834 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.130631343 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Own-child White Female United-States 0 -26 0.2888889 0.089831315 0.625 0 0 0.424242437 Private Some-college Never-married Sales Own-child White Male United-States 0 -42 0.466666669 0.07632762 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Unmarried White Male United-States 0 -23 0.25555557 0.120440088 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -53 0.5888889 0.102922805 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.226305574 0.5625 0.04386044 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.2939931 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -27 0.3 0.474241018 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -24 0.266666681 0.101086751 0.625 0 0 0.6060606 Local-gov Some-college Separated Protective-serv Not-in-family White Male United-States 0 -42 0.466666669 0.229812667 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative White Female United-States 0 -41 0.455555558 0.126177251 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.1375418 0.625 0 0 0.1010101 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -42 0.466666669 0.13879256 0.875 0 0 0.656565666 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -38 0.422222227 0.0427755 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -63 0.7 0.2634335 0.25 0 0 0.3030303 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -31 0.344444454 0.0377354436 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.04107281 0.4375 0 0 0.04040404 Self-emp-not-inc 11th Never-married Other-service Own-child White Female United-States 0 -21 0.233333334 0.15373762 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 -24 0.266666681 0.05842575 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Other-relative Asian-Pac-Islander Female Philippines 0 -55 0.6111111 0.157827318 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.0403770469 0.3125 0.00114001136 0 0.2020202 Private 9th Never-married Adm-clerical Unmarried Black Female United-States 0 -31 0.344444454 0.0928224847 0.625 0 0 0.3030303 Private Some-college Divorced Sales Own-child White Female United-States 0 -23 0.25555557 0.112946346 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -35 0.3888889 0.165076569 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 -51 0.566666663 0.173073441 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -19 0.211111113 0.107787743 0.625 0 0 0.3030303 Private Some-college Never-married Protective-serv Own-child White Female United-States 0 -38 0.422222227 0.194941089 0.5625 0 0 0.565656543 Local-gov HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 -52 0.5777778 0.205463722 0.5625 0 0.4708448 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -70 0.7777778 0.116097137 0.9375 0 0 0.25252524 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -53 0.5888889 0.215874538 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 -59 0.655555546 0.1154135 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.04379793 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -18 0.2 0.144937888 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 -41 0.455555558 0.100615948 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -19 0.211111113 0.114045553 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Male United-States 0 -24 0.266666681 0.09357954 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.375213951 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.184068218 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family Black Male Jamaica 0 -34 0.377777785 0.0520029254 0.5625 0 0.43663913 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.21361348 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -50 0.5555556 0.06430166 0.5625 0.07298073 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -18 0.2 0.203985974 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Male United-States 0 -37 0.411111116 0.224725455 0.5625 0 0 0.424242437 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -30 0.333333343 0.11961703 0.625 0 0 0.363636374 Private Some-college Never-married Other-service Unmarried White Female United-States 0 -40 0.444444448 0.105906561 0.875 0.1502415 0 0.3030303 Self-emp-inc Masters Married-civ-spouse Exec-managerial Wife White Female Iran 1 -22 0.244444445 0.124455027 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 -50 0.5555556 0.09318888 0.625 0 0 0.282828271 Local-gov Some-college Separated Other-service Unmarried Black Female United-States 0 -70 0.7777778 0.118734024 0.5625 0 0 0.232323229 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -43 0.477777779 0.06882175 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -77 0.8555556 0.1411102 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.154738486 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.218592927 0.625 0 0 0.3939394 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.227112457 0.625 0 0.43663913 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -58 0.644444466 0.1307115 0.875 0 0.453856736 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.1688194 0.625 0 0 0.121212125 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -33 0.366666675 0.321347356 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -27 0.3 0.07026918 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.15125294 0.625 0 0 0.6060606 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -32 0.355555564 0.114393771 0.625 0 0 0.5555556 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -41 0.455555558 0.02866765 0.8125 0 0 0.25252524 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 -37 0.411111116 0.0211274289 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.08941507 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Male United-States 0 -50 0.5555556 0.188003 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -31 0.344444454 0.0580202825 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Asian-Pac-Islander Male Philippines 0 -54 0.6 0.029751366 0.5625 0 0 0.3838384 State-gov HS-grad Separated Exec-managerial Unmarried White Female United-States 0 -23 0.25555557 0.06268989 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Own-child Black Male United-States 0 -40 0.444444448 0.0987758562 0.8125 0 0 0.2020202 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 -29 0.322222233 0.149097636 0.8125 0.0501305 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Germany 0 -38 0.422222227 0.127570122 0.5625 0 0 0.353535354 Private HS-grad Married-spouse-absent Other-service Not-in-family White Male ? 0 -30 0.333333343 0.116052687 0.6875 0 0 0.5555556 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -20 0.222222224 0.07857858 0.625 0 0 0.08080808 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Male India 0 -43 0.477777779 0.0431816429 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -25 0.2777778 0.0375279933 0.625 0 0 0.25252524 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -39 0.433333337 0.08531998 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -48 0.533333361 0.06877595 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.152558923 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Other-service Unmarried White Female United-States 0 -24 0.266666681 0.142470732 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -20 0.222222224 0.117915012 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male Yugoslavia 0 -25 0.2777778 0.0170060731 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -57 0.6333333 0.04944484 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.139546245 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Exec-managerial Wife White Female Puerto-Rico 1 -66 0.733333349 0.0856325 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.0281598028 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.200342163 0.8125 0.14084141 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 -46 0.51111114 0.09529368 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -42 0.466666669 0.0789564252 0.875 0 0 0.454545468 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -46 0.51111114 0.2541926 0.5625 0 0.43663913 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male Canada 1 -34 0.377777785 0.112522691 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Own-child White Male United-States 0 -43 0.477777779 0.17091544 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife Black Female United-States 0 -42 0.466666669 0.123321474 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Own-child White Female United-States 0 -31 0.344444454 0.181621268 0.8125 0 0 0.4848485 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -70 0.7777778 0.1973968 0.625 0 0 0.3030303 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -32 0.355555564 0.02297022 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -46 0.51111114 0.0539211519 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male Germany 1 -42 0.466666669 0.249060258 0.25 0 0 0.25252524 Self-emp-inc 7th-8th Divorced Craft-repair Unmarried White Male United-States 0 -21 0.233333334 0.150744423 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Own-child White Male United-States 0 -24 0.266666681 0.109821819 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -23 0.25555557 0.127608523 0.5625 0 0 0.5555556 Private HS-grad Never-married Sales Other-relative White Male United-States 0 -50 0.5555556 0.0977743044 0.875 0.07298073 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.05813276 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.17729044 0.4375 0 0 0.3030303 ? 11th Never-married ? Unmarried White Female United-States 0 -44 0.4888889 0.188833475 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.202754766 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -30 0.333333343 0.0504921861 0.6875 0 0 0.24242425 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 -36 0.4 0.171409816 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -49 0.544444442 0.137563363 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 -29 0.322222233 0.151561424 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -45 0.5 0.09983263 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 -75 0.8333334 0.07669403 1 0 0 0.2020202 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -42 0.466666669 0.0893329 0.5625 0 0 0.4040404 Private HS-grad Never-married Priv-house-serv Not-in-family White Female ? 0 -37 0.411111116 0.0301608741 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 -51 0.566666663 0.058175195 0.8125 0 0 0.25252524 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -61 0.677777767 0.119049244 0.5625 0 0 0.4848485 Local-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -33 0.366666675 0.110935844 0.75 0.0217402168 0 0.5555556 Private Assoc-acdm Never-married Exec-managerial Unmarried White Female ? 0 -50 0.5555556 0.249701455 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -59 0.655555546 0.146056622 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -25 0.2777778 0.09291475 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -22 0.244444445 0.124791794 0.5625 0 0 0.161616161 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -56 0.622222245 0.107579619 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -44 0.4888889 0.0695309862 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Unmarried Black Female United-States 0 -35 0.3888889 0.0427755 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.117432758 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -47 0.5222222 0.113227211 0.5625 0.1502415 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -27 0.3 0.107579619 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -50 0.5555556 0.070727855 0.5625 0 0.4708448 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -30 0.333333343 0.12063811 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Black Male ? 0 -46 0.51111114 0.2457815 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -48 0.533333361 0.104845069 0.9375 0 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -61 0.677777767 0.1552955 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Male United-States 1 -33 0.366666675 0.0582553446 0.5625 0 0 0.8787879 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -40 0.444444448 0.0480263755 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -58 0.644444466 0.127926424 0.625 0 0 0.656565666 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.1293038 0.875 0 0.549127638 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.0262328219 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.09370683 0.625 0 0 0.5050505 Self-emp-inc Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -37 0.411111116 0.203116447 0.5 0 0 0.4040404 Private 12th Never-married Other-service Own-child White Female United-States 0 -64 0.7111111 0.100386277 0.875 0 0.4722222 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 0 -41 0.455555558 0.132917985 0.5625 0 0 0.545454562 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -18 0.2 0.0217174459 0.4375 0.005940059 0 0.3030303 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -44 0.4888889 0.212436825 0.4375 0 0 0.8888889 Self-emp-not-inc 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -41 0.455555558 0.03177062 0.8125 0 0 0.4848485 State-gov Bachelors Married-civ-spouse Prof-specialty Wife Amer-Indian-Eskimo Female United-States 1 -33 0.366666675 0.1406239 0.625 0.105201051 0 0.4040404 State-gov Some-college Separated Prof-specialty Not-in-family White Male United-States 1 -37 0.411111116 0.132240415 0.3125 0 0 0.161616161 Private 9th Separated Priv-house-serv Unmarried White Female Mexico 0 -34 0.377777785 0.18134445 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -24 0.266666681 0.144887373 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Tech-support Own-child White Female ? 0 -20 0.222222224 0.07932013 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -38 0.422222227 0.1186101 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.09313837 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 -20 0.222222224 0.08912209 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Never-married Transport-moving Own-child White Male United-States 0 -22 0.244444445 0.3175392 0.8125 0 0 0.08080808 Federal-gov Bachelors Never-married Tech-support Own-child White Male United-States 0 -55 0.6111111 0.09944939 0.8125 0 0 0.7373737 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 -20 0.222222224 0.033123754 0.625 0 0 0.353535354 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -26 0.2888889 0.117815323 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -20 0.222222224 0.06465729 0.5625 0 0 0.7070707 Self-emp-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -40 0.444444448 0.166528031 0.3125 0 0 0.4040404 Private 9th Divorced Other-service Not-in-family White Female United-States 0 -33 0.366666675 0.0451753065 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.06420737 0.625 0 0 0.5050505 ? Some-college Divorced ? Own-child White Male United-States 0 -24 0.266666681 0.07266225 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -25 0.2777778 0.16287747 0.625 0 0 0.464646459 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -18 0.2 0.0535076 0.4375 0 0 0.08080808 Private 11th Never-married Other-service Own-child White Male United-States 0 -49 0.544444442 0.156973273 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.152878851 0.5 0 0 0.171717167 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 -34 0.377777785 0.121968336 0.6875 0 0 0.454545468 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.205830112 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.209921166 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -74 0.822222233 0.08747798 0.5625 0.158311576 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 1 -37 0.411111116 0.05615594 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -20 0.222222224 0.07801146 0.4375 0 0.3611111 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -40 0.444444448 0.095410876 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -34 0.377777785 0.03386262 0.8125 0.2782828 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -30 0.333333343 0.119361088 0.9375 0 0.399449021 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband Black Male Haiti 0 -44 0.4888889 0.153604254 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Female Puerto-Rico 0 -40 0.444444448 0.15009582 0.375 0 0 0.323232323 Private 10th Married-civ-spouse Other-service Wife Black Female United-States 0 -58 0.644444466 0.0815724358 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female Greece 0 -44 0.4888889 0.201309353 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.100968882 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.260947466 0.5625 0 0 0.181818187 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -19 0.211111113 0.08215235 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -41 0.455555558 0.188702136 0.875 0.1502415 0 0.7070707 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.1288842 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -34 0.377777785 0.07551332 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Craft-repair Other-relative White Male United-States 0 -38 0.422222227 0.0701109 0.625 0 0 0.151515156 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -27 0.3 0.142137334 0.0625 0.413104117 0 0.24242425 Private Preschool Married-civ-spouse Farming-fishing Other-relative White Male Mexico 0 -54 0.6 0.134240136 0.625 0 0 0.4848485 Private Some-college Divorced Craft-repair Unmarried White Female United-States 0 -40 0.444444448 0.138192445 0.5625 0 0 0.373737365 Private HS-grad Widowed Machine-op-inspct Unmarried Black Female United-States 0 -19 0.211111113 0.17360352 0.625 0 0 0.25252524 Private Some-college Never-married Sales Other-relative White Female United-States 0 -17 0.188888893 0.128820211 0.4375 0.005940059 0 0.1010101 Private 11th Never-married Other-service Own-child White Male United-States 0 -33 0.366666675 0.230840474 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -80 0.8888889 0.168372169 0.25 0 0 0.24242425 Private 7th-8th Widowed Other-service Not-in-family White Female United-States 0 -24 0.266666681 0.108781211 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 -28 0.311111122 0.227907911 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -55 0.6111111 0.22516796 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -21 0.233333334 0.08989732 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -51 0.566666663 0.08700516 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.120435372 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Female United-States 0 -42 0.466666669 0.120250829 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -60 0.6666667 0.158640951 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -20 0.222222224 0.200817674 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Black Female United-States 0 -51 0.566666663 0.09773929 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.130730346 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -37 0.411111116 0.129169777 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.107585013 0.5625 0 0 0.5252525 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -42 0.466666669 0.114655778 0.875 0.14084141 0 0.6060606 Federal-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 1 -40 0.444444448 0.07053186 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -55 0.6111111 0.109842025 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.27180618 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 -62 0.6888889 0.146836579 0.5625 0 0.453856736 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -47 0.5222222 0.120773487 0.375 0 0 0.3030303 Private 10th Divorced Sales Unmarried White Female United-States 0 -26 0.2888889 0.0349975266 0.5 0 0 0.5151515 Private 12th Never-married Sales Other-relative Black Male United-States 0 -59 0.655555546 0.286926359 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Adm-clerical Unmarried White Female Puerto-Rico 0 -70 0.7777778 0.118874125 0.625 0 0 0.171717167 Local-gov Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.08356408 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.0730852261 0.375 0 0 0.656565666 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.122265369 0.875 0 0 0.434343427 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -52 0.5777778 0.117029309 0.9375 0.1502415 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.114298128 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -67 0.7444445 0.08543718 0.375 0 0 0.2020202 Private 10th Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -34 0.377777785 0.13771759 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -53 0.5888889 0.07837719 0.625 0.046500463 0 0.4040404 State-gov Some-college Divorced Adm-clerical Other-relative White Female United-States 0 -22 0.244444445 0.07904803 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.07159469 0.5625 0 0 0.424242437 Local-gov HS-grad Divorced Adm-clerical Own-child White Male United-States 0 -54 0.6 0.07337013 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.128067866 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -37 0.411111116 0.166145474 0.5625 0 0 0.3838384 Private HS-grad Separated Prof-specialty Unmarried White Female United-States 0 -38 0.422222227 0.118111007 0.375 0 0.5874656 0.909090936 Private 10th Never-married Prof-specialty Not-in-family White Male United-States 1 -41 0.455555558 0.141616687 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family Black Female United-States 0 -36 0.4 0.112011477 0.5625 0 0 0.333333343 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -43 0.477777779 0.2041153 0.6875 0.1502415 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.03321064 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -26 0.2888889 0.129495084 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Own-child White Male United-States 0 -49 0.544444442 0.129553691 0.875 0.046500463 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.0323720872 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.114645 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.03438259 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.166068017 0.1875 0 0 0.4040404 Self-emp-inc 5th-6th Married-civ-spouse Sales Husband White Male Mexico 1 -57 0.6333333 0.144927785 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -28 0.311111122 0.07743424 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.312881023 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 -21 0.233333334 0.3044349 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -51 0.566666663 0.09352161 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.237765759 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -50 0.5555556 0.216758221 0.9375 0 0 0.75757575 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.218565986 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Widowed Exec-managerial Unmarried Asian-Pac-Islander Female South 0 -36 0.4 0.109285012 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -31 0.344444454 0.240242347 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -20 0.222222224 0.175253 0.5625 0 0 0.1010101 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -36 0.4 0.06978154 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -38 0.422222227 0.212979019 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 -37 0.411111116 0.207914039 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.1309378 0.875 0.07688077 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.225248113 0.375 0 0 0.363636374 Private 10th Never-married Farming-fishing Own-child White Male United-States 0 -33 0.366666675 0.143615067 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -35 0.3888889 0.230903789 0.5625 0.0115101151 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Female United-States 0 -23 0.25555557 0.02229736 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 -37 0.411111116 0.0994392857 0.8125 0 0 0.363636374 Private Bachelors Separated Other-service Unmarried Asian-Pac-Islander Female Philippines 0 -25 0.2777778 0.212596446 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -51 0.566666663 0.07156775 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Tech-support Husband Black Male United-States 0 -35 0.3888889 0.230866075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.0733883157 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -66 0.733333349 0.113201618 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -32 0.355555564 0.09223045 0.5625 0 0 0.13131313 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -37 0.411111116 0.1271458 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Never-married Protective-serv Not-in-family White Male United-States 1 -29 0.322222233 0.188821346 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.136388034 0.8125 0 0 0.373737365 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -61 0.677777767 0.09077089 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.118330583 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -24 0.266666681 0.1311695 0.5625 0 0 0.4949495 Private HS-grad Never-married Transport-moving Not-in-family White Female United-States 0 -49 0.544444442 0.04129238 0.25 0 0 0.3838384 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband Other Male United-States 0 -51 0.566666663 0.111133866 0.875 0.25236252 0 0.5050505 Self-emp-not-inc Masters Divorced Exec-managerial Unmarried White Male United-States 1 -34 0.377777785 0.219341889 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -28 0.311111122 0.1359489 0.5625 0 0 0.4040404 ? HS-grad Separated ? Unmarried White Female Mexico 0 -20 0.222222224 0.340794981 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -30 0.333333343 0.124830186 0.625 0 0 0.373737365 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -49 0.544444442 0.244354948 0.875 1 0 0.8080808 Self-emp-inc Masters Divorced Prof-specialty Unmarried White Male Mexico 1 -26 0.2888889 0.08542371 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -63 0.7 0.178217232 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -36 0.4 0.0557302646 0.75 0 0 0.5555556 Private Assoc-acdm Never-married Transport-moving Not-in-family White Male Iran 0 -63 0.7 0.0843117 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.08654042 0.5625 0 0 0.1010101 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.216715112 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.08636059 0.25 0 0 0.353535354 Private 7th-8th Widowed Adm-clerical Not-in-family White Female United-States 0 -49 0.544444442 0.119090326 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male Canada 0 -35 0.3888889 0.126670957 0.875 0.135501355 0 0.5555556 Private Masters Never-married Prof-specialty Not-in-family White Male ? 1 -23 0.25555557 0.105356283 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -25 0.2777778 0.11443688 0.6875 0.2782828 0 0.4040404 Private Assoc-voc Never-married Sales Not-in-family White Male United-States 1 -34 0.377777785 0.105939567 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -28 0.311111122 0.119196743 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.115459979 0.625 0 0.506198347 0.353535354 Self-emp-not-inc Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -33 0.366666675 0.0618378744 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Not-in-family White Male United-States 0 -21 0.233333334 0.137349844 0.625 0.02597026 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -55 0.6111111 0.119541593 0.4375 0 0.3838384 0.4040404 Private 11th Married-civ-spouse Other-service Husband Black Male United-States 0 -17 0.188888893 0.3061982 0.4375 0 0 0.08080808 ? 11th Never-married ? Own-child White Female United-States 0 -75 0.8333334 0.163068086 0.5625 0.0234602336 0 0.151515156 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 -61 0.677777767 0.08956123 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Unmarried Black Female United-States 0 -53 0.5888889 0.10638275 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.119540244 0.75 0 0 0.454545468 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 -48 0.533333361 0.1662896 0.625 0 0 0.5050505 Private Some-college Widowed Sales Unmarried White Male United-States 1 -28 0.311111122 0.106980175 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.137289226 0.8125 0 0 0.5050505 ? Bachelors Never-married ? Not-in-family Asian-Pac-Islander Female Taiwan 0 -29 0.322222233 0.07438649 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -25 0.2777778 0.1621036 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Own-child White Female United-States 0 -37 0.411111116 0.129951075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -43 0.477777779 0.175587744 0.8125 0 0 0.5555556 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -40 0.444444448 0.03728889 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -34 0.377777785 0.0976281539 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -55 0.6111111 0.07872137 1 0.1502415 0 0.3030303 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.241094366 0.75 0 0 0.2020202 Local-gov Assoc-acdm Never-married Tech-support Not-in-family White Male United-States 0 -21 0.233333334 0.114526458 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -32 0.355555564 0.128166884 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male Italy 0 -26 0.2888889 0.136915416 0.9375 0.0246302467 0 0.5050505 State-gov Prof-school Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male India 0 -26 0.2888889 0.112992816 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.09351689 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -49 0.544444442 0.0975574255 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -21 0.233333334 0.109065436 0.5625 0 0.3452709 0.3030303 ? HS-grad Never-married ? Own-child Black Female United-States 0 -26 0.2888889 0.03754483 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -40 0.444444448 0.07928915 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -19 0.211111113 0.07838931 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Never-married Adm-clerical Not-in-family White Female United-States 0 -58 0.644444466 0.203317836 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -61 0.677777767 0.16091615 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -28 0.311111122 0.08350682 0.625 0 0 0.6363636 Self-emp-not-inc Some-college Married-civ-spouse Sales Own-child Asian-Pac-Islander Male South 0 -26 0.2888889 0.11147669 0.8125 0 0 0.4040404 Private Bachelors Never-married Farming-fishing Own-child White Male United-States 0 -64 0.7111111 0.123602331 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.0803398639 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.1028009 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -45 0.5 0.07420397 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -39 0.433333337 0.142412126 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.241973326 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -51 0.566666663 0.08472794 0.4375 0 0 0.4040404 Private 11th Separated Other-service Not-in-family Black Female Jamaica 0 -34 0.377777785 0.0266780276 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -33 0.366666675 0.0751442239 0.875 0 0.43663913 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male Germany 1 -23 0.25555557 0.0296786241 0.625 0 0.5874656 0.4040404 Private Some-college Separated Other-service Not-in-family White Male United-States 1 -35 0.3888889 0.0808685943 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 -41 0.455555558 0.0893329 0.4375 0 0 0.25252524 Private 11th Divorced Priv-house-serv Unmarried White Female Guatemala 0 -39 0.433333337 0.129791439 0.875 0 0 0.5050505 Private Masters Never-married Craft-repair Not-in-family White Female United-States 0 -41 0.455555558 0.112354308 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.02724043 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -22 0.244444445 0.195664465 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 -25 0.2777778 0.120229274 0.625 0 0.3452709 0.454545468 Private Some-college Never-married Exec-managerial Other-relative White Female United-States 0 -25 0.2777778 0.118117742 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Own-child White Female United-States 0 -77 0.8555556 0.0491215438 0.25 0 0 0.2020202 Self-emp-not-inc 7th-8th Married-spouse-absent Adm-clerical Not-in-family White Male Italy 1 -33 0.366666675 0.157972127 0.6875 0 0 0.4040404 ? Assoc-voc Never-married ? Own-child White Female United-States 0 -66 0.733333349 0.191297933 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -19 0.211111113 0.187225074 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 -44 0.4888889 0.07494755 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -45 0.5 0.12916775 0.875 0.25236252 0 0.424242437 Self-emp-inc Masters Divorced Sales Unmarried White Female United-States 1 -28 0.311111122 0.08454677 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -19 0.211111113 0.02579233 0.5625 0.02597026 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -43 0.477777779 0.2108311 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -39 0.433333337 0.121012591 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -33 0.366666675 0.133804366 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.145561576 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Other-service Not-in-family Black Female Jamaica 0 -62 0.6888889 0.135327891 0.25 0 0 0.4040404 Private 7th-8th Widowed Machine-op-inspct Not-in-family White Female United-States 0 -40 0.444444448 0.103301331 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.27386114 0.5625 0 0 0.0606060624 Private HS-grad Never-married Other-service Not-in-family White Male Iran 0 -23 0.25555557 0.167268246 0.625 0 0 0.3030303 Local-gov Some-college Never-married Other-service Not-in-family Black Male United-States 0 -48 0.533333361 0.162071928 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Italy 1 -38 0.422222227 0.211698622 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.174974158 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.0856136456 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.120072342 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -66 0.733333349 0.05060534 0.5625 0 0 0.25252524 Local-gov HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.132002652 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -23 0.25555557 0.14949435 0.3125 0 0 0.3939394 Private 9th Never-married Handlers-cleaners Other-relative White Male Mexico 0 -34 0.377777785 0.119670242 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -39 0.433333337 0.123140961 0.875 0 0 0.454545468 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -33 0.366666675 0.182453081 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -43 0.477777779 0.123321474 0.625 0 0 0.1010101 Private Some-college Separated Sales Unmarried White Female United-States 0 -27 0.3 0.226948112 0.5625 0 0 1 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.199089378 0.625 0 0 0.353535354 State-gov Some-college Separated Adm-clerical Own-child Black Male United-States 0 -26 0.2888889 0.195311531 0.1875 0 0 0.3030303 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -56 0.622222245 0.04763236 0.875 0.2782828 0 0.6060606 Self-emp-inc Masters Divorced Exec-managerial Not-in-family White Male United-States 1 -46 0.51111114 0.110023208 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.128494218 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Unmarried White Female United-States 0 -90 1 0.2114804 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -72 0.8 0.319085628 0.625 0 0 0.25252524 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.109788142 0.5625 0 0 0.151515156 Private HS-grad Never-married Adm-clerical Unmarried Asian-Pac-Islander Female United-States 0 -29 0.322222233 0.1232979 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 -49 0.544444442 0.08323809 0.4375 0 0 0.75757575 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -23 0.25555557 0.08143705 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -20 0.222222224 0.153265461 0.625 0 0 0.181818187 Private Some-college Married-spouse-absent Sales Own-child Black Female United-States 0 -57 0.6333333 0.123039261 0.8125 0.04508045 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male South 0 -46 0.51111114 0.144779608 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 -33 0.366666675 0.141285986 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.173852727 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Not-in-family White Male Jamaica 0 -49 0.544444442 0.0740989 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Greece 0 -54 0.6 0.102816388 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -46 0.51111114 0.029100731 1 0 0.359045 0.5050505 Federal-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 -31 0.344444454 0.07721332 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.148966968 0.9375 0 0.453856736 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.08657478 0.625 0 0 0.0606060624 ? Some-college Never-married ? Own-child White Female United-States 0 -19 0.211111113 0.08864724 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -46 0.51111114 0.238312662 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 -43 0.477777779 0.120170005 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -58 0.644444466 0.1203229 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried White Male United-States 0 -43 0.477777779 0.182975739 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -37 0.411111116 0.150691211 0.625 0 0 0.4040404 ? Some-college Separated ? Unmarried White Male United-States 0 -21 0.233333334 0.113829352 0.5 0 0 0.25252524 Federal-gov 12th Never-married Adm-clerical Own-child Black Male United-States 0 -52 0.5777778 0.228204265 0.875 0 0 0.7070707 State-gov Masters Never-married Adm-clerical Not-in-family White Male United-States 1 -34 0.377777785 0.341386348 0.6875 0 0 0.323232323 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.178909615 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Handlers-cleaners Own-child White Female United-States 0 -34 0.377777785 0.116854869 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -29 0.322222233 0.119493775 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -39 0.433333337 0.0213308372 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -49 0.544444442 0.104028076 0.4375 0 0 0.353535354 Private 11th Divorced Machine-op-inspct Unmarried Black Female United-States 0 -35 0.3888889 0.178846985 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband Black Male Jamaica 1 -31 0.344444454 0.08011086 0.625 0 0 0.2020202 Private Some-college Divorced Other-service Own-child White Female United-States 0 -18 0.2 0.144551948 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -47 0.5222222 0.178551972 0.5625 0.04386044 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -46 0.51111114 0.185954109 0.5625 0.0501305 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -43 0.477777779 0.08398436 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -51 0.566666663 0.2066296 0.5625 0.04386044 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.292382658 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -18 0.2 0.2610896 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -31 0.344444454 0.122464731 0.8125 0 0.43663913 0.353535354 State-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -39 0.433333337 0.1198265 0.5625 0 0.4331956 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -58 0.644444466 0.0588190928 0.4375 0 0 0.4848485 Private 11th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -36 0.4 0.177227125 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.1770601 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -31 0.344444454 0.025288526 0.8125 0 0.43663913 0.353535354 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -19 0.211111113 0.0184770711 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -38 0.422222227 0.26533553 0.6875 0 0 0.363636374 Private Assoc-voc Divorced Tech-support Not-in-family White Female United-States 0 -26 0.2888889 0.117145836 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Prof-specialty Own-child Other Female Jamaica 0 -38 0.422222227 0.231293768 0.75 0 0 0.161616161 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.07484854 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.1305862 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.209377632 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family Black Male ? 0 -41 0.455555558 0.086450845 0.8125 0 0 0.25252524 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 -33 0.366666675 0.07635456 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -63 0.7 0.133736327 0.5625 0 0 0.161616161 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -51 0.566666663 0.09221563 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.07778515 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.1038772 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Not-in-family White Male United-States 0 -25 0.2777778 0.18836537 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.1892834 0.5625 0 0 0.6666667 Self-emp-not-inc HS-grad Never-married Sales Unmarried White Male United-States 0 -19 0.211111113 0.191246748 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -47 0.5222222 0.306450784 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -26 0.2888889 0.263587058 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.11228089 0.625 0 0 0.141414136 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 -36 0.4 0.10226611 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -60 0.6666667 0.134090617 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.0414136164 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Unmarried Black Male United-States 0 -19 0.211111113 0.0809932 0.5625 0 0 0.141414136 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.184029832 0.8125 0 0 0.909090936 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -36 0.4 0.241376579 0.5625 0 0 0.363636374 Private HS-grad Separated Machine-op-inspct Not-in-family Black Female United-States 0 -35 0.3888889 0.180433825 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -22 0.244444445 0.158199787 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -54 0.6 0.03257078 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.06496375 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -55 0.6111111 0.137906864 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -57 0.6333333 0.253160059 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 -56 0.622222245 0.278420985 0.25 0 0 0.363636374 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.361837536 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.0228833333 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.10933283 0.4375 0 0 0.4040404 Self-emp-inc 11th Divorced Sales Not-in-family White Male United-States 0 -34 0.377777785 0.123048685 0.5625 0 0 0.444444448 Private HS-grad Divorced Exec-managerial Own-child White Male United-States 0 -36 0.4 0.2026187 0.75 0 0 0.424242437 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -51 0.566666663 0.07712509 0.3125 0 0 0.4040404 Local-gov 9th Separated Other-service Other-relative White Female United-States 0 -46 0.51111114 0.144558683 1 0 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.08734664 0.5625 0.0545505434 0 0.5050505 Private HS-grad Divorced Exec-managerial Not-in-family Black Female United-States 0 -25 0.2777778 0.080851756 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -22 0.244444445 0.2432389 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -37 0.411111116 0.05179009 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.138360143 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Unmarried White Male United-States 1 -61 0.677777767 0.119107164 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.154339075 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband Black Male Jamaica 0 -58 0.644444466 0.104086 0.5625 0 0 0.2020202 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -52 0.5777778 0.122516595 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Farming-fishing Other-relative White Male Mexico 0 -18 0.2 0.102379933 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child Black Male United-States 0 -27 0.3 0.138201192 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -48 0.533333361 0.0207718033 0.625 0.0501305 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -63 0.7 0.044880297 0.3125 0 0 0.161616161 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.121384382 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.196033552 0.625 0 0.4708448 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -40 0.444444448 0.0671183839 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -41 0.455555558 0.220732749 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -28 0.311111122 0.0217491016 0.8125 0.0217402168 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -31 0.344444454 0.232451573 0.9375 0.14084141 0 0.5050505 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 -32 0.355555564 0.08579752 0.6875 0 0 0.5555556 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.244692385 0.5625 0 0 0.727272749 Private HS-grad Never-married Handlers-cleaners Unmarried Black Male United-States 0 -39 0.433333337 0.0582950823 0.5625 0 0.430670351 0.4040404 Local-gov HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.0202531815 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -31 0.344444454 0.400753021 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Other-relative Black Female United-States 0 -21 0.233333334 0.102598161 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 -33 0.366666675 0.119770594 0.5625 0 0 0.4040404 ? HS-grad Separated ? Unmarried White Female United-States 0 -44 0.4888889 0.0750876442 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.134407178 0.625 0 0 0.25252524 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -42 0.466666669 0.033688847 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male ? 0 -36 0.4 0.147160545 0.75 0 0 0.353535354 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.03301666 0.875 0 0.453168035 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 0 -61 0.677777767 0.143679053 0.625 0 0.3838384 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.107217938 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Own-child White Male United-States 0 -21 0.233333334 0.05592559 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Female Germany 0 -39 0.433333337 0.0214507263 0.625 0.0282902829 0 0.909090936 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -34 0.377777785 0.0168120936 0.5625 0 0 0.8080808 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -21 0.233333334 0.122662082 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Male United-States 0 -75 0.8333334 0.09872399 0.8125 0 0 0.4848485 Self-emp-not-inc Bachelors Widowed Prof-specialty Unmarried White Male United-States 1 -21 0.233333334 0.119006805 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Male United-States 0 -81 0.900000036 0.0826096758 0.625 0 0 0.151515156 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -54 0.6 0.100794435 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Divorced Other-service Not-in-family White Male Canada 0 -34 0.377777785 0.3061268 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Iran 0 -54 0.6 0.181226581 0.9375 1 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 -41 0.455555558 0.17951715 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Husband Amer-Indian-Eskimo Male United-States 0 -61 0.677777767 0.133724883 0.8125 0 0 0.4040404 ? Bachelors Divorced ? Not-in-family White Female United-States 0 -63 0.7 0.08967707 0.5625 0.0258002579 0 0.2020202 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -24 0.266666681 0.146804243 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -20 0.222222224 0.149296328 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female Mexico 0 -44 0.4888889 0.04090712 0.8125 0 0 0.6060606 Local-gov Bachelors Divorced Prof-specialty Own-child White Female United-States 0 -47 0.5222222 0.08158119 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.03272569 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.03238825 0.25 0 0.365013778 0.4040404 Private 7th-8th Divorced Craft-repair Not-in-family White Male United-States 0 -53 0.5888889 0.161741227 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -63 0.7 0.183881655 0.5625 0.0347103477 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -44 0.4888889 0.0701796 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.1549365 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.0262126159 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male Germany 1 -71 0.788888931 0.138081983 0.625 0 0 0.1010101 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -57 0.6333333 0.11859528 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.12127123 0.625 0 0 0.1010101 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -33 0.366666675 0.11652483 0.8125 0 0.4242424 0.454545468 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -30 0.333333343 0.255083 0.625 0 0 0.5555556 Private Some-college Divorced Adm-clerical Own-child White Female United-States 0 -20 0.222222224 0.157353818 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -28 0.311111122 0.129716679 0.8125 0 0 0.454545468 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -54 0.6 0.168289334 0.4375 0 0 0.1010101 Private 11th Divorced Priv-house-serv Unmarried Black Female United-States 0 -20 0.222222224 0.166742891 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -34 0.377777785 0.160915464 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -21 0.233333334 0.128124446 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -29 0.322222233 0.197538912 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Unmarried White Female United-States 0 -51 0.566666663 0.121779747 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -39 0.433333337 0.168529779 0.5625 0 0 0.7070707 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Female United-States 0 -19 0.211111113 0.146438524 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Other-relative Black Female United-States 0 -22 0.244444445 0.09261773 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -59 0.655555546 0.109817781 0.625 0 0 0.3838384 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -18 0.2 0.3889803 0.4375 0 0 0.13131313 Private 11th Never-married Sales Own-child White Male United-States 0 -22 0.244444445 0.14921011 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -42 0.466666669 0.172205925 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.07683614 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 -31 0.344444454 0.104923874 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.164182112 0.4375 0 0 0.4040404 Private 11th Separated Craft-repair Unmarried White Female United-States 0 -22 0.244444445 0.0761511549 0.8125 0 0 0.07070707 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -67 0.7444445 0.146175846 0.875 0 0 0.4040404 Private Masters Never-married Other-service Not-in-family White Female United-States 0 -17 0.188888893 0.07457576 0.4375 0 0 0.25252524 Private 11th Never-married Sales Own-child White Female United-States 0 -47 0.5222222 0.129222974 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 -23 0.25555557 0.120847575 0.8125 0 0 0.05050505 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -20 0.222222224 0.228724226 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female Peru 0 -22 0.244444445 0.139297038 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Female Peru 0 -47 0.5222222 0.06987449 0.25 0 0 0.4040404 State-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -49 0.544444442 0.158740625 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 -64 0.7111111 0.139637843 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -35 0.3888889 0.1330197 0.625 0 0 0.4040404 State-gov Some-college Divorced Exec-managerial Not-in-family Black Female United-States 0 -52 0.5777778 0.2855867 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -29 0.322222233 0.12020503 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -73 0.811111152 0.06256192 0.375 0 0 0.4040404 Self-emp-inc 10th Widowed Sales Unmarried White Female Canada 0 -38 0.422222227 0.144141763 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -59 0.655555546 0.219391733 0.5625 0 0.43663913 0.5252525 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.0192442276 0.625 0.0406404063 0 0.353535354 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.07973032 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 -24 0.266666681 0.0348884128 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -33 0.366666675 0.07778515 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -40 0.444444448 0.12838982 0.625 0 0 0.5555556 Private Some-college Divorced Exec-managerial Other-relative Black Female United-States 0 -55 0.6111111 0.13037473 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.129909977 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 -40 0.444444448 0.178259656 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -22 0.244444445 0.158099428 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 -55 0.6111111 0.20769985 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -45 0.5 0.13850832 0.5625 0 0 0.262626261 Private HS-grad Separated Tech-support Not-in-family White Female United-States 0 -47 0.5222222 0.216777742 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -56 0.622222245 0.139016852 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.08389748 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -32 0.355555564 0.133501947 0.625 0 0 0.3838384 State-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -17 0.188888893 0.08809494 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Male United-States 0 -44 0.4888889 0.0480021276 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -32 0.355555564 0.2150461 0.75 0 0 0.8080808 Self-emp-not-inc Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 -35 0.3888889 0.08482022 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.07222714 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -32 0.355555564 0.02204613 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -68 0.75555557 0.1917977 0.4375 0 0 0.7070707 Private 11th Divorced Transport-moving Not-in-family White Male United-States 0 -20 0.222222224 0.07588578 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -33 0.366666675 0.253574282 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 -24 0.266666681 0.271284878 0.3125 0 0 0.121212125 Private 9th Never-married Handlers-cleaners Own-child White Male United-States 0 -48 0.533333361 0.024366457 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.08452117 0.875 0 0 0.5050505 Private Masters Divorced Prof-specialty Unmarried White Female United-States 0 -48 0.533333361 0.205287248 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.140906781 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -60 0.6666667 0.07598884 0.625 0 0 0.353535354 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -39 0.433333337 0.119956493 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -23 0.25555557 0.04732321 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 -23 0.25555557 0.125704437 0.5 0 0 0.4040404 State-gov 12th Never-married Exec-managerial Not-in-family White Male United-States 0 -36 0.4 0.02219835 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Other-relative White Female United-States 0 -25 0.2777778 0.17158021 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -52 0.5777778 0.106920905 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male United-States 0 -35 0.3888889 0.09487002 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.0346910655 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -45 0.5 0.127677888 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 -37 0.411111116 0.219261065 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 -58 0.644444466 0.144119546 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Prof-specialty Not-in-family White Female United-States 0 -67 0.7444445 0.2905803 0.5625 0 0 0.02020202 Self-emp-not-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -48 0.533333361 0.134547263 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 -63 0.7 0.108818255 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.169746861 0.625 0 0 0.727272749 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -43 0.477777779 0.0295984726 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.120217152 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Own-child White Male United-States 0 -32 0.355555564 0.407155633 0.5625 0 0 0.727272749 Private HS-grad Married-civ-spouse Transport-moving Own-child White Male Mexico 0 -36 0.4 0.1536716 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Asian-Pac-Islander Male Laos 0 -43 0.477777779 0.134162009 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.12782 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 -17 0.188888893 0.11522828 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Own-child White Male United-States 0 -45 0.5 0.0790123343 0.8125 0 0 0.464646459 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 -41 0.455555558 0.05526283 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.0849286541 0.5625 0 0 0.3838384 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -18 0.2 0.1364015 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Own-child White Female United-States 0 -48 0.533333361 0.1659535 0.75 0 0 0.4040404 Local-gov Assoc-acdm Separated Adm-clerical Not-in-family Black Female United-States 0 -51 0.566666663 0.0466948 0.6875 0 0 0.5050505 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 1 -26 0.2888889 0.19721292 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Female United-States 0 -54 0.6 0.193296984 0.0625 0 0 0.6060606 Private Preschool Married-civ-spouse Farming-fishing Husband White Male United-States 0 -22 0.244444445 0.128296867 0.625 0 0 0.4848485 Private Some-college Divorced Sales Own-child White Female Iran 0 -19 0.211111113 0.158852428 0.5625 0 0 0.353535354 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -47 0.5222222 0.242314816 0.25 0 0 0.4040404 Private 7th-8th Divorced Handlers-cleaners Other-relative Black Male United-States 0 -32 0.355555564 0.08622319 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 -46 0.51111114 0.242537081 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.114604585 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 1 -35 0.3888889 0.227173746 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family Asian-Pac-Islander Male United-States 0 -52 0.5777778 0.137617916 0.6875 0.0501305 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -73 0.811111152 0.09687649 0.5 0 0 0.181818187 Self-emp-not-inc 12th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -17 0.188888893 0.246252969 0.375 0 0 0.1010101 Private 10th Never-married Other-service Own-child White Male Canada 0 -32 0.355555564 0.06744438 0.8125 0 0 0.323232323 Private Bachelors Separated Prof-specialty Unmarried White Female United-States 0 -43 0.477777779 0.121300869 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.2504383 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male Portugal 0 -26 0.2888889 0.04126746 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Other Female Columbia 0 -41 0.455555558 0.379964381 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.133871034 0.75 0.1502415 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -52 0.5777778 0.20439212 0.625 0 0 0.4040404 State-gov Some-college Separated Protective-serv Unmarried White Male United-States 0 -35 0.3888889 0.130063549 0.5625 0 0 0.323232323 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -57 0.6333333 0.168519 0.4375 0 0 0.5252525 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 -35 0.3888889 0.134993821 0.6875 0 0 0.444444448 Private Assoc-voc Married-spouse-absent Prof-specialty Unmarried White Female United-States 0 -33 0.366666675 0.149965152 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -56 0.622222245 0.03594384 0.25 0 0 0.4040404 Private 7th-8th Divorced Transport-moving Unmarried White Male United-States 0 -42 0.466666669 0.0890560746 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Own-child White Male United-States 0 -17 0.188888893 0.06791113 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -49 0.544444442 0.0210573822 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.136072159 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.113764018 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -37 0.411111116 0.172057077 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family Black Male United-States 0 -22 0.244444445 0.165368885 0.5 0 0 0.353535354 Private 12th Never-married Other-service Not-in-family White Male United-States 0 -27 0.3 0.260011256 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Mexico 0 -21 0.233333334 0.0238592848 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 -59 0.655555546 0.06307987 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -44 0.4888889 0.1028009 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -53 0.5888889 0.1018108 0.375 0 0 1 Self-emp-not-inc 10th Married-spouse-absent Transport-moving Not-in-family White Male United-States 0 -26 0.2888889 0.2763108 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 -48 0.533333361 0.0936010852 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.181667075 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.150654852 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 -54 0.6 0.13281022 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.09664277 0.5625 0.07298073 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -60 0.6666667 0.108186476 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -50 0.5555556 0.09464237 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -48 0.533333361 0.057480108 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -35 0.3888889 0.07293907 0.625 0 0.506198347 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.1296601 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.125905156 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -65 0.722222269 0.15058884 0.625 0.06514065 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -31 0.344444454 0.159534052 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.220842525 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 -67 0.7444445 0.274544775 0.3125 0.0205002055 0 0.4040404 ? 9th Divorced ? Not-in-family White Female United-States 0 -62 0.6888889 0.1327267 0.6875 0 0 0.5050505 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.154360637 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried White Female Cuba 0 -24 0.266666681 0.191497311 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Own-child White Female United-States 0 -24 0.266666681 0.0495142154 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family Asian-Pac-Islander Female Philippines 0 -27 0.3 0.0322670154 0.8125 0 0 0.4848485 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -43 0.477777779 0.0907803252 0.75 0 0 0.3030303 State-gov Assoc-acdm Married-spouse-absent Other-service Unmarried White Female United-States 0 -48 0.533333361 0.0800367743 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Unmarried Asian-Pac-Islander Female South 0 -41 0.455555558 0.201726943 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family Black Male United-States 0 -30 0.333333343 0.179942146 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Wife Black Female United-States 0 -38 0.422222227 0.08026982 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.220842525 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 -45 0.5 0.126442626 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -55 0.6111111 0.07342536 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -46 0.51111114 0.0740989 0.25 0 0 0.75757575 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male Greece 0 -24 0.266666681 0.07014592 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Male United-States 0 -31 0.344444454 0.0339744277 0.625 0 0 0.25252524 Local-gov Some-college Never-married Adm-clerical Own-child Amer-Indian-Eskimo Female United-States 0 -35 0.3888889 0.038822528 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.224734217 0.625 0 0 0.4040404 Local-gov Some-college Separated Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.151449621 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -56 0.622222245 0.195756733 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -60 0.6666667 0.12872456 0.5625 0 0.4242424 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -25 0.2777778 0.0231709331 0.8125 0 0.365013778 0.6060606 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -33 0.366666675 0.165270552 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -44 0.4888889 0.120654278 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -21 0.233333334 0.07866075 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -21 0.233333334 0.0873567462 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -46 0.51111114 0.0266760066 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male England 1 -44 0.4888889 0.06408681 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -63 0.7 0.06902314 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -44 0.4888889 0.134162009 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -31 0.344444454 0.154667765 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male Mexico 0 -26 0.2888889 0.03625838 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.0188569445 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -60 0.6666667 0.0838462859 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Female United-States 1 -33 0.366666675 0.07500682 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.07249252 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.09044693 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Sales Own-child White Female United-States 0 -46 0.51111114 0.190612957 0.6875 0 0 0.6363636 Self-emp-inc Assoc-voc Divorced Exec-managerial Unmarried Asian-Pac-Islander Female Thailand 0 -24 0.266666681 0.0226415358 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -47 0.5222222 0.08158119 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.126751781 0.625 0 0 0.3030303 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -46 0.51111114 0.07156641 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.190495759 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -47 0.5222222 0.164277762 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Male Honduras 0 -69 0.7666667 0.11114464 0.5625 0.0253802538 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried White Male United-States 0 -32 0.355555564 0.08862636 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -51 0.566666663 0.288125247 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -36 0.4 0.225156516 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.116672337 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 -29 0.322222233 0.0589389838 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 -32 0.355555564 0.126328126 0.9375 0.03908039 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -27 0.3 0.137735784 0.375 0 0 0.75757575 Private 10th Divorced Transport-moving Not-in-family Amer-Indian-Eskimo Male United-States 0 -60 0.6666667 0.155280009 0.25 0 0 0.353535354 Private 7th-8th Divorced Adm-clerical Not-in-family White Female Cuba 0 -31 0.344444454 0.07958551 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -46 0.51111114 0.101366267 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.06503245 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -39 0.433333337 0.194349051 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 -69 0.7666667 0.0700496063 0.25 0 0 0.5555556 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 -54 0.6 0.08416689 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.133621156 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.08500274 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.0617691725 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 -34 0.377777785 0.102450654 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.129287645 0.25 0 0 0.5050505 Self-emp-not-inc 7th-8th Never-married Farming-fishing Own-child White Male United-States 0 -63 0.7 0.07280706 0.625 0.105661057 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.195318937 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -64 0.7111111 0.0620426275 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -44 0.4888889 0.2157176 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -26 0.2888889 0.0226374939 0.5625 0 0 0.6060606 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -36 0.4 0.113339692 0.375 0 0 0.4040404 Private 10th Divorced Other-service Not-in-family White Female United-States 0 -55 0.6111111 0.117954075 0.8125 0.07688077 0 0.3838384 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -37 0.411111116 0.171733111 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Wife White Female United-States 1 -37 0.411111116 0.0642120838 0.375 0 0 0.656565666 Private 10th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -63 0.7 0.233699635 0.8125 0.07688077 0 0.363636374 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -33 0.366666675 0.153082266 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.09305081 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -57 0.6333333 0.117283911 0.875 0 0.453856736 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife Black Female United-States 1 -31 0.344444454 0.122742906 0.75 0.04386044 0 0.454545468 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -20 0.222222224 0.07493206 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 -58 0.644444466 0.146678969 0.5625 0.07298073 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.113735057 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 -25 0.2777778 0.265711367 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.095410876 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -18 0.2 0.08448884 0.4375 0.010550105 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 -26 0.2888889 0.116002843 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -29 0.322222233 0.190572545 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.037298318 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 0 -35 0.3888889 0.0332402736 0.625 0 0 0.3838384 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -32 0.355555564 0.144060269 0.625 0 0 0.454545468 Private Some-college Divorced Machine-op-inspct Unmarried White Male United-States 0 -61 0.677777767 0.01619581 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Widowed Other-service Other-relative White Female United-States 0 -26 0.2888889 0.140177339 0.8125 0 0 0.151515156 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -56 0.622222245 0.118621543 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.153561816 0.625 0 0 0.3939394 Private Some-college Married-spouse-absent Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -49 0.544444442 0.145071924 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -40 0.444444448 0.0669722259 0.5625 0 0 0.121212125 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -37 0.411111116 0.128620833 0.5625 0 0 0.4040404 Private HS-grad Separated Exec-managerial Own-child White Male United-States 0 -23 0.25555557 0.0765808746 0.8125 0 0 0.5050505 ? Bachelors Never-married ? Own-child White Male United-States 0 -28 0.311111122 0.1750112 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.113710806 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.0195217244 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Divorced Sales Unmarried White Female United-States 0 -49 0.544444442 0.12272539 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -41 0.455555558 0.05549453 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child Asian-Pac-Islander Male United-States 0 -28 0.311111122 0.1236872 0.8125 0 0 0.212121218 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -38 0.422222227 0.230650544 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.316498578 0.75 0 0.399449021 0.4040404 State-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 -28 0.311111122 0.142735422 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -44 0.4888889 0.0226698238 0.875 0.07688077 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.0230200626 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -50 0.5555556 0.269838125 0.9375 0 0 0.363636374 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -73 0.811111152 0.108608112 0.5625 0 0 0.24242425 Self-emp-not-inc HS-grad Widowed Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.17221266 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Male Outlying-US(Guam-USVI-etc) 0 -38 0.422222227 0.134205788 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -64 0.7111111 0.09679768 0.875 0 0 0.02020202 ? Masters Married-civ-spouse ? Husband White Male United-States 0 -47 0.5222222 0.1492997 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 -52 0.5777778 0.09793798 0.625 0.1502415 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male Canada 1 -24 0.266666681 0.02668207 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -44 0.4888889 0.07034394 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.101960994 0.25 0 0.223599628 0.4040404 Private 7th-8th Divorced Machine-op-inspct Unmarried White Male United-States 0 -61 0.677777767 0.3392425 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband Black Male United-States 1 -58 0.644444466 0.206258491 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -51 0.566666663 0.145803377 0.8125 0 0.359045 0.434343427 Private Bachelors Never-married Sales Not-in-family White Female United-States 1 -49 0.544444442 0.03418053 0.625 0 0 0.5555556 Private Some-college Divorced Sales Unmarried White Female England 0 -23 0.25555557 0.07219616 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Black Male United-States 0 -19 0.211111113 0.13933678 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child Black Female United-States 0 -21 0.233333334 0.05599833 0.5625 0 0 0.535353541 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -56 0.622222245 0.29910925 0.4375 0 0 0.4040404 Private 11th Divorced Sales Not-in-family White Female United-States 0 -35 0.3888889 0.09557185 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.022554649 0.625 0 0 0.2020202 Federal-gov Some-college Divorced Tech-support Unmarried Amer-Indian-Eskimo Female United-States 0 -41 0.455555558 0.0440302975 1 0 0 0.5050505 Private Doctorate Divorced Sales Unmarried White Female United-States 1 -30 0.333333343 0.2299083 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.231293768 1 0 0 0.2020202 Private Doctorate Married-civ-spouse Tech-support Wife White Female ? 0 -47 0.5222222 0.1936277 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.0722615 0.375 0 0.5874656 0.5050505 Self-emp-inc 10th Widowed Exec-managerial Unmarried White Female United-States 1 -55 0.6111111 0.134078488 0.4375 0 0 0.323232323 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -22 0.244444445 0.123102568 0.6875 0 0 0.2020202 ? Assoc-voc Never-married ? Own-child Asian-Pac-Islander Male United-States 0 -31 0.344444454 0.107588381 0.375 0 0 0.4040404 Private 10th Never-married Adm-clerical Unmarried Black Female United-States 0 -30 0.333333343 0.07452188 0.875 0.04386044 0 0.4040404 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 -24 0.266666681 0.07919621 0.8125 0 0 0.4848485 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -49 0.544444442 0.0292846058 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.136729524 0.25 0 0 0.25252524 Private 7th-8th Never-married Craft-repair Not-in-family White Male Germany 0 -50 0.5555556 0.0902287 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -38 0.422222227 0.153427109 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Black Male United-States 0 -20 0.222222224 0.07552814 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Never-married Prof-specialty Other-relative Asian-Pac-Islander Female South 0 -49 0.544444442 0.0743965954 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.189643741 0.5625 0 0 0.5050505 Private HS-grad Widowed Other-service Other-relative Asian-Pac-Islander Female South 0 -46 0.51111114 0.200649962 0.8125 0 0 0.5050505 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 1 -19 0.211111113 0.102044515 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -31 0.344444454 0.09392775 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Own-child White Female Cuba 0 -38 0.422222227 0.0181766748 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -56 0.622222245 0.157143682 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.108501017 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -58 0.644444466 0.06624953 0.5625 0 0 0.5050505 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.127249524 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -22 0.244444445 0.111080654 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -46 0.51111114 0.125057176 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -30 0.333333343 0.130394936 0.0625 0 0 0.4040404 Private Preschool Never-married Farming-fishing Not-in-family White Male Mexico 0 -56 0.622222245 0.184623212 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -32 0.355555564 0.165340587 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male ? 0 -56 0.622222245 0.108393252 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -50 0.5555556 0.0298833773 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.196250439 0.5625 0 0 0.3030303 ? HS-grad Separated ? Unmarried Black Female United-States 0 -30 0.333333343 0.189214021 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.150193483 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -42 0.466666669 0.01700001 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Divorced Prof-specialty Unmarried Amer-Indian-Eskimo Female United-States 0 -31 0.344444454 0.137436062 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.049877923 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child Other Female ? 0 -46 0.51111114 0.113855615 0.375 0 0 0.25252524 Private 10th Never-married Other-service Not-in-family White Female Ecuador 0 -31 0.344444454 0.07039042 0.8125 0 0 0.656565666 Private Bachelors Never-married Sales Not-in-family White Female United-States 1 -38 0.422222227 0.12486925 0.8125 0.07688077 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -44 0.4888889 0.171176091 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.153468877 0.8125 0 0.5544077 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.123284429 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -45 0.5 0.07252754 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 1 -50 0.5555556 0.193707168 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.122708552 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male Dominican-Republic 0 -41 0.455555558 0.131094053 0.8125 1 0 0.656565666 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.07564129 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 -21 0.233333334 0.143234521 0.375 0 0 0.3939394 Private 10th Never-married Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.02203064 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 -42 0.466666669 0.0312291 0.5625 0 0 0.4040404 Federal-gov HS-grad Separated Adm-clerical Unmarried Black Female United-States 0 -37 0.411111116 0.0162362214 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -46 0.51111114 0.115073368 0.8125 0 0.365013778 0.4040404 Private Bachelors Divorced Machine-op-inspct Not-in-family White Male ? 0 -45 0.5 0.0273899529 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -32 0.355555564 0.123239972 0.625 0 0 0.2020202 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -30 0.333333343 0.232451573 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -57 0.6333333 0.14030464 0.8125 0 0 0.8080808 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -37 0.411111116 0.0808544457 0.5625 0 0 0.565656543 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -18 0.2 0.135581821 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -32 0.355555564 0.103010364 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.164059535 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.122669488 0.875 0.06497065 0 0.5050505 Private Masters Divorced Prof-specialty Unmarried White Female United-States 0 -36 0.4 0.118850552 0.5625 0 0 0.282828271 ? HS-grad Divorced ? Unmarried White Female United-States 0 -33 0.366666675 0.06840551 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -48 0.533333361 0.07321253 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.118459895 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Female United-States 0 -34 0.377777785 0.119670242 0.625 0 0 0.5050505 Local-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 1 -33 0.366666675 0.144060269 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -36 0.4 0.240868732 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female Germany 0 -23 0.25555557 0.2935499 0.5625 0 0.383149683 0.5555556 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -39 0.433333337 0.111671343 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -22 0.244444445 0.0481368378 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 -19 0.211111113 0.154741183 0.5625 0 0 0.2020202 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -47 0.5222222 0.191900745 0.5625 0.07298073 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -46 0.51111114 0.0191411767 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Transport-moving Not-in-family White Male United-States 0 -47 0.5222222 0.0181517545 0.875 0 0 0.0606060624 Private Masters Divorced Sales Not-in-family White Female United-States 0 -47 0.5222222 0.0722237751 1 0 0 0.353535354 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.344919026 0.625 0 0 0.4040404 Local-gov Some-college Divorced Transport-moving Not-in-family White Female United-States 0 -38 0.422222227 0.165076569 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -58 0.644444466 0.211592883 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.164334327 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 -54 0.6 0.0556009449 0.6875 0 0 0.1010101 Self-emp-not-inc Assoc-voc Married-civ-spouse Tech-support Other-relative White Female United-States 0 -20 0.222222224 0.0287639629 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -25 0.2777778 0.158816069 0.75 0 0 0.4848485 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 -25 0.2777778 0.0727423951 0.3125 0 0 0.151515156 Self-emp-not-inc 9th Never-married Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.07577061 0.8125 0 0.430670351 0.444444448 State-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -69 0.7666667 0.08635116 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -28 0.311111122 0.151298746 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -20 0.222222224 0.244492352 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -21 0.233333334 0.23350969 0.25 0 0 0.4040404 Private 7th-8th Never-married Farming-fishing Unmarried White Male United-States 0 -37 0.411111116 0.118379749 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -21 0.233333334 0.0668139458 0.5625 0 0 0.323232323 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -25 0.2777778 0.148168832 0.75 0 0 0.13131313 ? Assoc-acdm Married-civ-spouse ? Husband White Male United-States 0 -39 0.433333337 0.09661516 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Other-relative Black Female United-States 0 -34 0.377777785 0.07995528 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 1 -33 0.366666675 0.150996327 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.08013175 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -29 0.322222233 0.11137566 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -48 0.533333361 0.0262341686 0.5625 0 0 0.8989899 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -42 0.466666669 0.186741471 1 0 0.453856736 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.166464716 0.4375 0 0 0.4040404 Private 11th Divorced Machine-op-inspct Unmarried White Female United-States 0 -34 0.377777785 0.143949136 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -20 0.222222224 0.14141193 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Male United-States 0 -41 0.455555558 0.117461048 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.0933693945 0.625 0 0.430670351 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -22 0.244444445 0.121218026 0.6875 0 0 0.4040404 ? Assoc-voc Never-married ? Own-child White Male United-States 0 -23 0.25555557 0.134846315 0.5625 0 0 0.444444448 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 -19 0.211111113 0.105466746 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -24 0.266666681 0.0222374145 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -20 0.222222224 0.133020371 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Male ? 0 -32 0.355555564 0.103446811 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -52 0.5777778 0.0671756342 0.875 0.1502015 0 0.5050505 Private Masters Divorced Prof-specialty Unmarried White Male United-States 1 -36 0.4 0.1913956 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Unmarried White Male United-States 1 -18 0.2 0.482295156 0.375 0 0 0.3030303 Private 10th Never-married Machine-op-inspct Own-child White Male United-States 0 -27 0.3 0.126974046 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Own-child White Female United-States 0 -26 0.2888889 0.07346914 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -52 0.5777778 0.117478557 0.75 0 0 0.323232323 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 -24 0.266666681 0.174681842 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried Amer-Indian-Eskimo Male Mexico 0 -42 0.466666669 0.191555232 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family Black Male United-States 0 -39 0.433333337 0.05746529 0.9375 0.07688077 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 -20 0.222222224 0.135896355 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 -20 0.222222224 0.229321659 0.625 0 0 0.1010101 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -39 0.433333337 0.328338623 0.5625 0 0 0.4040404 Private HS-grad Widowed Handlers-cleaners Unmarried White Male ? 0 -68 0.75555557 0.3261914 0.4375 0 0 0.3030303 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -35 0.3888889 0.114916436 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -54 0.6 0.0633492842 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 -24 0.266666681 0.07932822 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -24 0.266666681 0.141287327 0.8125 0 0 0.08080808 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -20 0.222222224 0.2138088 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -64 0.7111111 0.09445445 0.0625 0 0 0.4040404 ? Preschool Married-civ-spouse ? Husband White Male United-States 0 -28 0.311111122 0.07234501 0.8125 0 0 0.353535354 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -36 0.4 0.08250326 0.5625 0 0 0.474747479 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.131422743 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Transport-moving Husband White Male ? 0 -38 0.422222227 0.0686857 0.625 0 0.518365443 0.5555556 Private Some-college Separated Machine-op-inspct Not-in-family White Male United-States 1 -22 0.244444445 0.22593917 0.5625 0 0 0.6060606 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -56 0.622222245 0.214405566 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -24 0.266666681 0.06756965 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -24 0.266666681 0.0546539575 0.625 0 0 0.75757575 Self-emp-not-inc Some-college Never-married Other-service Not-in-family White Female United-States 0 -22 0.244444445 0.0423417464 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.118718535 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -42 0.466666669 0.113223165 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.140212372 0.875 0 0 0.5555556 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -19 0.211111113 0.127173409 0.5625 0.3409534 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -67 0.7444445 0.152280763 0.625 0 0 0.444444448 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -20 0.222222224 0.14323923 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 -32 0.355555564 0.2570093 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Other Male United-States 0 -46 0.51111114 0.161270425 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Own-child Black Female United-States 0 -52 0.5777778 0.116179988 0.5625 0 0 0.363636374 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -44 0.4888889 0.161564752 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried Black Male United-States 0 -65 0.722222269 0.1494445 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Husband White Male Mexico 0 -37 0.411111116 0.146954447 0.8125 0 0.4331956 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.139346883 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -35 0.3888889 0.0745387152 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female United-States 0 -30 0.333333343 0.142134637 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -64 0.7111111 0.136716723 0.5625 0.031370312 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.0136700561 0.5625 0 0 0.373737365 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 1 -35 0.3888889 0.131130427 0.25 0 0 0.4040404 Private 7th-8th Divorced Tech-support Unmarried White Female United-States 0 -28 0.311111122 0.138063788 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -63 0.7 0.02358785 0.8125 0 0.453856736 0.323232323 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 1 -40 0.444444448 0.160687819 0.9375 0 0 0.5555556 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.232611865 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -40 0.444444448 0.129575238 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -25 0.2777778 0.323138267 0.25 0 0 0.454545468 Private 7th-8th Never-married Sales Other-relative White Male Guatemala 0 -45 0.5 0.0229614638 0.8125 0 0 0.3838384 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.10222435 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -53 0.5888889 0.201440692 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -63 0.7 0.0911554843 0.5625 0.02105021 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Vietnam 0 -27 0.3 0.0351288654 0.625 0 0 0.6060606 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -31 0.344444454 0.214619741 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.05398042 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -39 0.433333337 0.231457427 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Protective-serv Not-in-family White Male Mexico 1 -42 0.466666669 0.133825913 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.179587871 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -31 0.344444454 0.13313891 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -53 0.5888889 0.125173688 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.212237448 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -27 0.3 0.148685426 1 0 0 0.4040404 Private Doctorate Never-married Adm-clerical Own-child White Female United-States 0 -22 0.244444445 0.04330288 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Female United-States 0 -29 0.322222233 0.08490576 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 1 -52 0.5777778 0.0525437742 0.5625 0 0.404499531 0.4040404 Private HS-grad Widowed Sales Unmarried White Female United-States 0 -32 0.355555564 0.141820773 0.6875 0 0 0.464646459 Private Assoc-voc Divorced Craft-repair Own-child White Male United-States 0 -23 0.25555557 0.235858977 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -27 0.3 0.1572171 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -53 0.5888889 0.112594761 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family Black Female United-States 0 -18 0.2 0.175658464 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -41 0.455555558 0.116770677 0.8125 0 0 0.3030303 Private Bachelors Separated Sales Unmarried White Female United-States 0 -27 0.3 0.09127739 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female Dominican-Republic 0 -30 0.333333343 0.08170512 0.625 0 0 0.4040404 Private Some-college Divorced Sales Own-child White Male United-States 0 -41 0.455555558 0.299549758 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 -21 0.233333334 0.0439312868 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -58 0.644444466 0.0922621042 0.5625 0 0 0.4040404 State-gov HS-grad Married-spouse-absent Other-service Unmarried Black Female Honduras 0 -45 0.5 0.183175787 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Protective-serv Not-in-family White Female United-States 0 -40 0.444444448 0.137432024 0.375 0 0 0.4040404 Private 10th Divorced Transport-moving Own-child White Male United-States 0 -21 0.233333334 0.15209958 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.123262875 0.8125 0 0.365013778 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Other Female United-States 0 -50 0.5555556 0.08152327 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Wife Black Female United-States 0 -26 0.2888889 0.0330651551 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.100160643 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Other-relative White Female United-States 0 -27 0.3 0.140906781 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 -36 0.4 0.19253993 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 -22 0.244444445 0.145570338 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 -37 0.411111116 0.0275846049 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Other-service Own-child White Male Japan 0 -54 0.6 0.132813588 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.0222273115 0.5625 0 0 0.5050505 Private HS-grad Divorced Farming-fishing Unmarried White Male United-States 0 -44 0.4888889 0.153161064 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -38 0.422222227 0.110493332 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 1 -49 0.544444442 0.174504027 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Female United-States 0 -18 0.2 0.1591306 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -26 0.2888889 0.119841315 0.8125 0 0 0.4848485 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -48 0.533333361 0.112432435 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male ? 1 -32 0.355555564 0.13468197 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -35 0.3888889 0.06652904 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Tech-support Own-child White Male United-States 0 -40 0.444444448 0.0909648761 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.03728889 0.5625 0.03411034 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.06893154 0.9375 0 0 0.727272749 State-gov Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -30 0.333333343 0.155763611 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -19 0.211111113 0.15283373 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -36 0.4 0.0872718841 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.128645763 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -50 0.5555556 0.0467062481 0.75 0 0 0.6060606 Federal-gov Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.137775525 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family Black Male United-States 0 -35 0.3888889 0.129740253 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.136600882 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.272900671 0.375 0 0 0.4040404 Private 10th Separated Sales Unmarried White Female United-States 0 -41 0.455555558 0.15349178 0.625 0 0 0.464646459 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 1 -33 0.366666675 0.06826407 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 -49 0.544444442 0.05561509 0.625 0 0 0.6060606 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -28 0.311111122 0.0893686 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.10049808 0.8125 0.1502415 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 1 -27 0.3 0.165461153 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Own-child White Female United-States 0 -47 0.5222222 0.325718582 0.5625 0.0288502872 0 0.323232323 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -42 0.466666669 0.07049414 1 0 0 0.4040404 State-gov Doctorate Never-married Exec-managerial Not-in-family White Female Italy 1 -30 0.333333343 0.233828276 0.5625 0 0 0.6060606 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -37 0.411111116 0.07310543 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.224492416 1 0 0 0.353535354 Private Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 0 -51 0.566666663 0.104672648 0.5625 0 0 0.3838384 Private HS-grad Married-spouse-absent Sales Not-in-family Black Female United-States 0 -27 0.3 0.165940031 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -53 0.5888889 0.02040136 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -45 0.5 0.233932674 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -37 0.411111116 0.138648421 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -40 0.444444448 0.109930933 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female ? 0 -54 0.6 0.06294113 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -47 0.5222222 0.0787543654 0.5625 0 0 0.424242437 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.110813938 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Yugoslavia 1 -33 0.366666675 0.0212655049 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.0842989 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Other-relative Black Male Haiti 0 -39 0.433333337 0.135451153 0.8125 0 0 0.5555556 State-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -25 0.2777778 0.08267299 0.5625 0 0.3677686 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 -33 0.366666675 0.101414084 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.08011086 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family White Female Ireland 0 -53 0.5888889 0.09522969 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -21 0.233333334 0.117675908 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Adm-clerical Own-child White Male United-States 0 -31 0.344444454 0.0510236062 1 0.07298073 0 0.5555556 State-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -63 0.7 0.08967707 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -21 0.233333334 0.214766577 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Never-married Other-service Own-child White Male United-States 0 -59 0.655555546 0.07384498 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -50 0.5555556 0.06261783 0.125 0 0 0.4040404 Private 1st-4th Separated Prof-specialty Unmarried Black Female United-States 0 -66 0.733333349 0.253267825 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -19 0.211111113 0.0970974043 0.5625 0 0 0.3030303 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -31 0.344444454 0.123780824 0.8125 0 0 0.454545468 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -23 0.25555557 0.2686756 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -45 0.5 0.115070671 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 -35 0.3888889 0.1375876 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -32 0.355555564 0.138176948 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Own-child White Male United-States 0 -20 0.222222224 0.1518113 0.25 0 0 0.6060606 Private 7th-8th Never-married Machine-op-inspct Other-relative White Female Mexico 0 -38 0.422222227 0.0228833333 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Other-relative White Male United-States 1 -49 0.544444442 0.09903112 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Philippines 0 -64 0.7111111 0.117751338 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -60 0.6666667 0.156777948 0.4375 0 0 0.2020202 Local-gov 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -25 0.2777778 0.02491 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -21 0.233333334 0.196849883 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -26 0.2888889 0.204736292 0.5625 0 0.3677686 0.151515156 Private HS-grad Never-married Priv-house-serv Other-relative White Female Mexico 0 -23 0.25555557 0.193969846 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -67 0.7444445 0.222363368 0.875 0 0 0.4848485 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.129283592 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -46 0.51111114 0.218629971 0.125 0 0 0.4040404 Private 1st-4th Separated Machine-op-inspct Own-child White Female Guatemala 0 -38 0.422222227 0.134901553 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 0 -20 0.222222224 0.07631617 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Other-relative White Male United-States 0 -28 0.311111122 0.130724281 0.625 0 0 0.4040404 ? Some-college Never-married ? Other-relative White Female United-States 0 -26 0.2888889 0.104541309 0.8125 0 0 0.4848485 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -58 0.644444466 0.117954075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.241435841 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Male United-States 0 -37 0.411111116 0.239056915 0.75 0 0 0.3838384 State-gov Assoc-acdm Divorced Protective-serv Not-in-family Black Male United-States 0 -53 0.5888889 0.070385024 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 -45 0.5 0.07606158 0.25 0 0 0.353535354 Private 7th-8th Divorced Machine-op-inspct Not-in-family Black Female United-States 0 -33 0.366666675 0.08946693 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -33 0.366666675 0.240917221 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Protective-serv Husband Black Male United-States 0 -35 0.3888889 0.07719042 0.5625 0 0 0.25252524 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -60 0.6666667 0.354196966 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -21 0.233333334 0.04604147 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -38 0.422222227 0.117579587 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Craft-repair Husband Black Male United-States 0 -40 0.444444448 0.0287619438 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Unmarried White Female United-States 0 -40 0.444444448 0.1485743 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 -44 0.4888889 0.133062124 0.9375 0 0 0.7070707 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.285073459 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.0197035782 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.208070964 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Male United-States 0 -49 0.544444442 0.186061874 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -37 0.411111116 0.144029289 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -52 0.5777778 0.122365728 0.375 0 0 0.3030303 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 -46 0.51111114 0.1078066 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -20 0.222222224 0.192156017 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Female ? 0 -43 0.477777779 0.1786658 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.149602115 0.8125 1 0 0.4040404 Local-gov Bachelors Divorced Adm-clerical Not-in-family White Female United-States 1 -25 0.2777778 0.131308243 0.625 0 0 0.151515156 State-gov Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -48 0.533333361 0.105695076 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Male United-States 0 -36 0.4 0.146435827 0.625 0 0 0.5555556 Local-gov Some-college Divorced Protective-serv Unmarried White Male United-States 0 -37 0.411111116 0.362659931 0.5625 0.143441439 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 -18 0.2 0.129587367 0.625 0 0 0.6060606 ? Some-college Never-married ? Own-child White Male United-States 0 -42 0.466666669 0.258295774 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -60 0.6666667 0.130150437 0.75 0 0 0.24242425 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 -37 0.411111116 0.0669843554 0.625 0 0 0.5555556 Self-emp-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -44 0.4888889 0.171168014 0.75 0 0 0.4040404 Local-gov Assoc-acdm Divorced Tech-support Not-in-family Black Male United-States 0 -32 0.355555564 0.0609185 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.07854288 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female Portugal 0 -42 0.466666669 0.160427839 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.06459802 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -41 0.455555558 0.0554446839 0.5 0 0 0.1010101 Private 12th Married-civ-spouse Other-service Wife White Female United-States 0 -34 0.377777785 0.122767828 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -56 0.622222245 0.12098363 0.375 0 0 0.323232323 Private 10th Separated Other-service Unmarried White Female United-States 0 -28 0.311111122 0.080684714 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -28 0.311111122 0.171743885 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Never-married Sales Own-child White Male United-States 0 -19 0.211111113 0.07060662 0.25 0 0 0.25252524 Private 7th-8th Never-married Transport-moving Unmarried White Male Guatemala 0 -49 0.544444442 0.07434002 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -36 0.4 0.09120735 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -25 0.2777778 0.200864822 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.112305142 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -47 0.5222222 0.143912762 0.9375 0 0.453856736 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.1863158 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -35 0.3888889 0.152750209 0.625 0 0 0.5858586 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.02089506 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.07857858 0.5625 0.046500463 0 0.4848485 Local-gov HS-grad Never-married Protective-serv Own-child Amer-Indian-Eskimo Male United-States 0 -42 0.466666669 0.0922647938 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.120953321 0.625 0 0 0.363636374 Private Some-college Divorced Other-service Not-in-family White Female United-States 1 -23 0.25555557 0.0695606247 0.625 0 0 0.24242425 Private Some-college Divorced Other-service Own-child White Female United-States 0 -31 0.344444454 0.236505568 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -36 0.4 0.128753528 0.625 0 0 0.575757563 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -20 0.222222224 0.100160643 0.625 0 0 0.25252524 Private Some-college Never-married Prof-specialty Unmarried White Female United-States 0 -36 0.4 0.0864697 0.625 0 0 0.454545468 Private Some-college Never-married Machine-op-inspct Unmarried White Male United-States 0 -50 0.5555556 0.09723211 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -37 0.411111116 0.1162103 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -25 0.2777778 0.06902112 0.8125 0.2782828 0 0.5050505 Private Bachelors Never-married Farming-fishing Own-child White Male United-States 1 -39 0.433333337 0.0310014449 0.625 0 0 0.6060606 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -32 0.355555564 0.133664265 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Wife White Female United-States 0 -59 0.655555546 0.130594969 0.625 0 0 0.353535354 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.1572171 0.8125 0.03411034 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.255099177 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -42 0.466666669 0.0210486259 0.6875 0 0 0.373737365 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.0481846556 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 0 -48 0.533333361 0.131185666 0.75 0 0.43663913 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -20 0.222222224 0.02328274 0.5625 0.0378103778 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.0245705377 0.375 0 0 0.454545468 Self-emp-not-inc 10th Divorced Craft-repair Not-in-family White Male United-States 0 -18 0.2 0.07848562 0.625 0 0 0.3030303 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -60 0.6666667 0.035126172 0.875 0 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -60 0.6666667 0.145948187 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male ? 0 -42 0.466666669 0.1529361 0.875 0 0 0.222222224 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -49 0.544444442 0.0565856546 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -35 0.3888889 0.05526418 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Wife White Female United-States 0 -30 0.333333343 0.118666671 0.75 0 0 0.6060606 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male Iran 0 -59 0.655555546 0.07773531 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.332075417 0.5625 0.135501355 0 0.5050505 Self-emp-inc HS-grad Never-married Other-service Not-in-family Black Male United-States 1 -55 0.6111111 0.239052877 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.265178621 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -39 0.433333337 0.0666401759 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.09529368 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -44 0.4888889 0.116170555 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.152316451 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -23 0.25555557 0.2657848 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child Black Male United-States 0 -22 0.244444445 0.155643716 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 -55 0.6111111 0.123802371 0.875 0 0 0.5555556 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.12538451 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -23 0.25555557 0.109302521 0.625 0 0 0.25252524 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -46 0.51111114 0.1475182 0.5625 0.1502415 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -23 0.25555557 0.184013665 0.8125 0 0 0.232323229 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.22385256 0.875 0.1502415 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.06919152 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 -42 0.466666669 0.133424491 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 1 -22 0.244444445 0.197300479 0.8125 0 0 0.1010101 State-gov Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -18 0.2 0.0915495 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -37 0.411111116 0.06677825 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.018460907 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.2017283 0.75 0 0 0.4040404 Private Assoc-acdm Separated Other-service Unmarried White Female United-States 0 -62 0.6888889 0.06912552 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Widowed Farming-fishing Unmarried White Female United-States 0 -51 0.566666663 0.103378117 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -34 0.377777785 0.292510629 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -28 0.311111122 0.16176413 0.875 0 0 0.4040404 Self-emp-not-inc Masters Never-married Prof-specialty Own-child White Male United-States 0 -56 0.622222245 0.147790983 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -46 0.51111114 0.199225441 0.5625 0 0 0.3030303 Private HS-grad Divorced Tech-support Not-in-family White Female United-States 0 -46 0.51111114 0.07680448 0.625 0 0.4331956 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -23 0.25555557 0.3343304 0.625 0 0 0.4040404 Local-gov Some-college Married-spouse-absent Adm-clerical Own-child White Female Guatemala 0 -33 0.366666675 0.253574282 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -27 0.3 0.07221502 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Asian-Pac-Islander Male United-States 0 -21 0.233333334 0.1658289 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -18 0.2 0.05426263 0.5625 0 0 0.6060606 ? HS-grad Never-married ? Own-child White Male United-States 0 -36 0.4 0.0559633076 0.1875 0.07298073 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 1 -37 0.411111116 0.221122041 0.8125 0 0 0.363636374 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -39 0.433333337 0.203147426 0.4375 0 0 0.4040404 Local-gov 11th Married-civ-spouse Other-service Husband White Male United-States 0 -36 0.4 0.134531111 0.5625 0.07298073 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -24 0.266666681 0.121276617 0.75 0.0235402342 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 -26 0.2888889 0.08152462 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Exec-managerial Own-child Black Female United-States 0 -37 0.411111116 0.08456226 0.5625 0 0 0.6060606 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -34 0.377777785 0.115020834 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.121607326 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -33 0.366666675 0.0324569531 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -20 0.222222224 0.2910706 0.5625 0 0 0.08080808 Private HS-grad Never-married Sales Own-child White Female Mexico 0 -26 0.2888889 0.177274272 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -47 0.5222222 0.0829841644 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -17 0.188888893 0.0746262744 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 -53 0.5888889 0.160625175 0.6875 0 0.3409091 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.124959506 0.625 0 0 0.353535354 Private Some-college Divorced Sales Own-child White Female United-States 0 -34 0.377777785 0.122119211 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.3560411 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 -39 0.433333337 0.183841243 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.13169755 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Female United-States 0 -21 0.233333334 0.133078963 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.03274186 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -54 0.6 0.0212385636 0.875 0.07298073 0 0.4040404 Local-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 -32 0.355555564 0.09977605 0.8125 0 0.459595948 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Iran 0 -29 0.322222233 0.020252509 0.5625 0.0263502635 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -68 0.75555557 0.11462345 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried Black Female United-States 0 -27 0.3 0.15550901 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -54 0.6 0.117263705 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 1 -23 0.25555557 0.237492308 0.5625 0 0 0.4040404 Private HS-grad Divorced Priv-house-serv Unmarried White Female United-States 0 -38 0.422222227 0.162424862 0.875 0 0 0.4848485 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.104689486 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -21 0.233333334 0.0736941 0.625 0 0.453168035 0.4040404 Private Some-college Never-married Prof-specialty Own-child Asian-Pac-Islander Male United-States 0 -40 0.444444448 0.08450231 0.6875 0 0 0.424242437 Private Assoc-voc Never-married Prof-specialty Not-in-family White Male United-States 0 -19 0.211111113 0.2233144 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Female United-States 0 -21 0.233333334 0.09333504 0.5625 0 0 0.6060606 ? HS-grad Never-married ? Other-relative White Male United-States 0 -35 0.3888889 0.15054439 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -39 0.433333337 0.077738 0.625 0.0217402168 0 0.454545468 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -38 0.422222227 0.130009666 0.5625 0 0.323232323 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male ? 0 -41 0.455555558 0.09914832 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -26 0.2888889 0.117593735 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.180924833 0.5625 0 0 0.454545468 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -70 0.7777778 0.101626925 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.07567968 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 -83 0.922222257 0.131680712 0.5625 0 0 0.5555556 Private HS-grad Widowed Protective-serv Not-in-family White Male United-States 0 -59 0.655555546 0.129980713 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -18 0.2 0.08119054 0.3125 0 0 0.151515156 Private 9th Never-married Other-service Own-child Black Male United-States 0 -31 0.344444454 0.0397944376 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -43 0.477777779 0.140281737 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -24 0.266666681 0.124387 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.187738314 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -48 0.533333361 0.0265803654 0.875 0 0 0.5252525 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -27 0.3 0.109343611 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Dominican-Republic 0 -41 0.455555558 0.137432024 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.172187075 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Wife White Female Mexico 0 -53 0.5888889 0.08285215 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 1 -66 0.733333349 0.196242362 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -31 0.344444454 0.107217938 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.08514419 0.8125 0 0 0.4040404 State-gov Bachelors Married-spouse-absent Adm-clerical Not-in-family White Male United-States 0 -22 0.244444445 0.153313965 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -47 0.5222222 0.117048845 0.8125 0.1502415 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -74 0.822222233 0.142166287 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.119051263 0.625 0 0.3409091 0.7070707 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -35 0.3888889 0.0209435541 0.625 0.04101041 0 0.6060606 Self-emp-not-inc Some-college Separated Farming-fishing Not-in-family White Male United-States 0 -51 0.566666663 0.0218036585 0.8125 0 0.3838384 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -40 0.444444448 0.22337839 0.625 0 0 0.4040404 Private Some-college Separated Other-service Not-in-family White Female United-States 0 -51 0.566666663 0.09855493 1 0 0.4331956 0.4040404 Local-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.3468871 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Wife White Female United-States 0 -53 0.5888889 0.265691847 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Unmarried Black Female United-States 0 -32 0.355555564 0.269774139 0.5625 0.0378103778 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.227321252 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male South 0 -42 0.466666669 0.14269501 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Male United-States 0 -22 0.244444445 0.0691612139 0.625 0 0 0.323232323 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -62 0.6888889 0.151987776 0.5625 0 0 0.24242425 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -33 0.366666675 0.0821483061 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.26725176 0.5625 0 0 0.2020202 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 -46 0.51111114 0.100995824 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.169856638 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -29 0.322222233 0.141397789 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 -29 0.322222233 0.154441461 0.8125 0 0 0.4848485 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -33 0.366666675 0.115018807 1 1 0 0.6060606 Private Doctorate Divorced Sales Not-in-family White Male United-States 1 -50 0.5555556 0.135123149 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 -22 0.244444445 0.146146208 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Amer-Indian-Eskimo Female United-States 0 -40 0.444444448 0.1433012 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.101238295 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Amer-Indian-Eskimo Male United-States 0 -54 0.6 0.117636167 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -29 0.322222233 0.0738335252 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.151628777 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried Black Female United-States 0 -46 0.51111114 0.116316035 0.4375 0 0 0.272727281 Private 11th Widowed Other-service Not-in-family White Female El-Salvador 0 -71 0.788888931 0.160623834 0.375 0 0 0.08080808 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.0254286211 0.625 0 0 0.8080808 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -56 0.622222245 0.0572625548 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -64 0.7111111 0.1727387 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male Philippines 1 -23 0.25555557 0.113953955 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -36 0.4 0.142078727 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.193325281 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.151114866 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -31 0.344444454 0.07305425 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 -36 0.4 0.0510714278 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.08101071 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -25 0.2777778 0.07034327 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.038303908 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -24 0.266666681 0.135258526 0.5 0 0 0.4040404 Private 12th Never-married Sales Not-in-family White Male United-States 0 -50 0.5555556 0.114879392 0.75 0 0 0.2020202 Self-emp-not-inc Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 -30 0.333333343 0.0545111671 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.0222859085 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -41 0.455555558 0.0759497657 0.875 0.07430074 0 0.363636374 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 1 -29 0.322222233 0.119654074 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -31 0.344444454 0.176427647 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -54 0.6 0.114356056 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female Italy 0 -20 0.222222224 0.09529233 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Sales Other-relative White Female United-States 0 -37 0.411111116 0.291971147 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -28 0.311111122 0.05833819 0.5625 0 0 0.3030303 Local-gov HS-grad Never-married Other-service Own-child Black Male United-States 0 -39 0.433333337 0.08456226 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -46 0.51111114 0.2837082 0.625 0 0 0.4040404 State-gov Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -35 0.3888889 0.0181847569 0.8125 0 0 0.424242437 Private Bachelors Separated Exec-managerial Unmarried White Female United-States 0 -36 0.4 0.162994 0.625 1 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -34 0.377777785 0.09016 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -44 0.4888889 0.07767402 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.0160153024 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -28 0.311111122 0.12853463 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.107212543 0.9375 0 0 0.454545468 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -64 0.7111111 0.138397187 0.8125 0 0 0.5050505 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -19 0.211111113 0.03213635 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -35 0.3888889 0.109945752 0.8125 0 0 0.5252525 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -61 0.677777767 0.136190027 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.113717541 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 -36 0.4 0.07561839 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -34 0.377777785 0.035385482 0.5625 0 0 0.3030303 Private HS-grad Never-married Transport-moving Unmarried Black Male United-States 0 -27 0.3 0.0258320682 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.09543849 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Unmarried White Male United-States 0 -26 0.2888889 0.0194355119 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -19 0.211111113 0.11830768 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Other-relative White Female United-States 0 -36 0.4 0.143468231 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -51 0.566666663 0.1323502 0.8125 0.14084141 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -63 0.7 0.08001455 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.06227702 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -20 0.222222224 0.08430295 0.625 0 0 0.25252524 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.07003412 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -40 0.444444448 0.121480025 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Own-child White Female United-States 0 -25 0.2777778 0.0363055281 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.121057719 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -41 0.455555558 0.186831728 0.8125 0 0 0.3030303 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 -49 0.544444442 0.0822904259 0.5625 0 0 0.8080808 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -46 0.51111114 0.126732916 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Own-child Black Female United-States 0 -32 0.355555564 0.114573605 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Separated Sales Not-in-family White Male United-States 0 -28 0.311111122 0.118045 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband Black Male Mexico 0 -19 0.211111113 0.137698069 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Other-relative Black Male United-States 0 -19 0.211111113 0.1107257 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -18 0.2 0.07788079 0.4375 0 0 0.2020202 Private 11th Never-married Adm-clerical Own-child Black Male United-States 0 -39 0.433333337 0.120438069 0.5625 0 0 0.5555556 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -60 0.6666667 0.113303989 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.136431143 0.8125 0 0.323232323 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.06755214 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife White Female Canada 1 -36 0.4 0.116020359 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -45 0.5 0.0347974859 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -60 0.6666667 0.241726816 0.8125 0 0.5369605 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.07810508 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.2248999 0.625 0 0 0.434343427 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -23 0.25555557 0.100321613 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -48 0.533333361 0.08793733 0.625 0 0 0.24242425 State-gov Some-college Never-married Prof-specialty Not-in-family Black Female United-States 0 -46 0.51111114 0.2885085 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Other-service Own-child White Female United-States 0 -43 0.477777779 0.1271687 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.0760063455 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Own-child Other Male United-States 0 -50 0.5555556 0.0745926 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -61 0.677777767 0.105511196 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 -35 0.3888889 0.132343471 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -65 0.722222269 0.171355933 0.625 0 0 0.4040404 Local-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -56 0.622222245 0.0614681058 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male United-States 0 -43 0.477777779 0.104253039 0.8125 0 0 0.8080808 Self-emp-not-inc Bachelors Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female Thailand 0 -55 0.6111111 0.0567324832 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -22 0.244444445 0.152439043 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.167310014 0.625 0 0 0.323232323 Private Some-college Divorced Machine-op-inspct Own-child White Male United-States 0 -35 0.3888889 0.0365843736 0.5625 0 0.3838384 0.5050505 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -22 0.244444445 0.02204613 0.625 0 0 0.5050505 ? Some-college Never-married ? Own-child White Male United-States 0 -20 0.222222224 0.06460408 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -46 0.51111114 0.253030062 0.5 0 0 0.353535354 Local-gov 12th Married-civ-spouse Other-service Husband White Male United-States 1 -43 0.477777779 0.16445826 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Unmarried White Male Mexico 0 -46 0.51111114 0.157307342 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried Black Female ? 0 -39 0.433333337 0.219802588 0.4375 0.0263502635 0 0.373737365 Private 11th Married-civ-spouse Other-service Husband Black Male United-States 0 -34 0.377777785 0.0520446822 0.5625 0 0 0.2020202 Private HS-grad Never-married Exec-managerial Unmarried White Female England 0 -35 0.3888889 0.0224940311 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.3006375 0.5625 0 0 0.414141417 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 -25 0.2777778 0.102249272 0.5625 0 0 0.282828271 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -44 0.4888889 0.08450231 0.875 0 0 0.353535354 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.09019031 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -41 0.455555558 0.10446924 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -43 0.477777779 0.137156546 0.8125 0.07298073 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -32 0.355555564 0.156775922 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -50 0.5555556 0.205642879 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.08151317 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -29 0.322222233 0.13403134 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -38 0.422222227 0.112574555 0.9375 1 0 0.7070707 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.02611428 0.375 0 0 0.5050505 Private 10th Never-married Handlers-cleaners Unmarried White Male United-States 0 -41 0.455555558 0.17091544 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 -27 0.3 0.08760461 0.625 0 0 0.656565666 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -37 0.411111116 0.137285188 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.149226949 0.875 0 0 0.24242425 State-gov Masters Separated Prof-specialty Unmarried White Female ? 0 -31 0.344444454 0.1053839 0.375 0 0 0.4040404 Private 10th Divorced Other-service Not-in-family White Male United-States 0 -49 0.544444442 0.04871877 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 -33 0.366666675 0.056355305 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 -31 0.344444454 0.228652835 0.5625 0 0.4242424 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.06191668 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Other-relative White Female United-States 0 -44 0.4888889 0.06681664 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.30712837 0.625 0 0 0.656565666 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 1 -62 0.6888889 0.1296655 0.5625 0 0 0.4040404 Private HS-grad Widowed Farming-fishing Unmarried White Female United-States 0 -65 0.722222269 0.0750876442 0.625 0 0.499081731 0.1010101 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.148938 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 -60 0.6666667 0.0575286 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -31 0.344444454 0.132096946 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.17891635 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 -53 0.5888889 0.119705267 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -44 0.4888889 0.138628215 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.0758447 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.119616359 0.625 0 0.3624885 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.123468973 0.4375 0 0 0.1010101 Private 11th Never-married Sales Own-child Black Female United-States 0 -47 0.5222222 0.07831792 0.5625 0 0 0.434343427 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -38 0.422222227 0.08250326 0.8125 0.0406404063 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.14509213 0.75 0 0 0.25252524 Private Assoc-acdm Married-civ-spouse Other-service Wife White Female United-States 0 -40 0.444444448 0.20886372 0.625 0 0 0.4040404 Private Some-college Separated Sales Not-in-family Amer-Indian-Eskimo Female United-States 0 -57 0.6333333 0.04168168 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -43 0.477777779 0.0398106 0.5625 0.04101041 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.15303646 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Other Male Ecuador 0 -64 0.7111111 0.161277831 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -18 0.2 0.0800475553 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 -40 0.444444448 0.0641379952 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -17 0.188888893 0.4440431 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child Black Female Trinadad&Tobago 0 -23 0.25555557 0.145075962 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -45 0.5 0.114904985 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried Black Female United-States 0 -45 0.5 0.0613212734 0.875 0 0 0.151515156 Self-emp-not-inc Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -27 0.3 0.214614362 0.375 0 0 0.6060606 Private 10th Never-married Other-service Not-in-family White Male Mexico 0 -23 0.25555557 0.108033583 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Handlers-cleaners Unmarried White Male United-States 0 -58 0.644444466 0.146038443 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male United-States 0 -35 0.3888889 0.2080851 0.5625 0 0 0.75757575 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 -47 0.5222222 0.0207718033 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 1 -33 0.366666675 0.0668880343 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -27 0.3 0.127012447 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Not-in-family Asian-Pac-Islander Male Philippines 1 -46 0.51111114 0.05594647 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -24 0.266666681 0.272017 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.15881 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.129246548 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -31 0.344444454 0.100480571 0.8125 0 0 0.979797959 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -37 0.411111116 0.102989487 0.6875 0.07688077 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 1 -23 0.25555557 0.293394327 0.6875 0 0 0.4040404 Private Assoc-voc Separated Exec-managerial Own-child White Female United-States 0 -30 0.333333343 0.0736051947 0.8125 0 0 0.5252525 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.167156443 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 -24 0.266666681 0.07589588 0.5625 0 0 0.323232323 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -32 0.355555564 0.140838087 0.625 0.0346403457 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -27 0.3 0.1236872 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -35 0.3888889 0.07222512 0.5625 0 0 0.5555556 Local-gov HS-grad Never-married Adm-clerical Unmarried Amer-Indian-Eskimo Male United-States 0 -27 0.3 0.118129194 0.8125 0 0.430670351 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -30 0.333333343 0.120060891 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male ? 0 -33 0.366666675 0.025744509 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -34 0.377777785 0.154153854 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.136176556 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.28631413 0.875 0.0217402168 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -39 0.433333337 0.102772608 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 -37 0.411111116 0.0263277888 0.625 0.03103031 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.137605786 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 1 -40 0.444444448 0.07819937 0.625 0.049340494 0 0.474747479 Private Some-college Separated Craft-repair Unmarried White Male United-States 1 -53 0.5888889 0.195756063 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Vietnam 0 -58 0.644444466 0.05521164 0.625 0 0.3409091 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male United-States 1 -29 0.322222233 0.0908530653 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -33 0.366666675 0.30505994 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Other Male Mexico 0 -57 0.6333333 0.165145949 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -69 0.7666667 0.0231285 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -20 0.222222224 0.124439538 0.625 0 0 0.121212125 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -56 0.622222245 0.264133275 0.5625 0 0 0.25252524 Private HS-grad Widowed Sales Unmarried White Female Mexico 0 -49 0.544444442 0.113380775 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.208467677 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -70 0.7777778 0.05200966 0.5625 0 0 0.373737365 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.1433874 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -37 0.411111116 0.243744045 0.8125 0.105201051 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -58 0.644444466 0.160219714 0.8125 0 0 0.5858586 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -42 0.466666669 0.06270539 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Own-child White Female United-States 0 -41 0.455555558 0.151675254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -28 0.311111122 0.03422498 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.08330342 0.875 0.07688077 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.1679465 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -58 0.644444466 0.149734125 0.5625 0.07688077 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -18 0.2 0.203247115 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -50 0.5555556 0.131539941 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -69 0.7666667 0.364878565 0.625 0.0205002055 0 0.24242425 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -84 0.933333337 0.162365586 0.875 0 0 0.6666667 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -47 0.5222222 0.08723147 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.252078354 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 -24 0.266666681 0.2573885 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family Black Male United-States 0 -48 0.533333361 0.124799877 0.8125 0 0 0.0606060624 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -53 0.5888889 0.0205071047 0.5625 0 0 0.5050505 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -58 0.644444466 0.0336046554 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.132946953 0.625 0 0 0.24242425 Private Some-college Never-married Handlers-cleaners Other-relative White Male Mexico 0 -36 0.4 0.0754069 0.625 0 0 0.5252525 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.2293102 0.5 0 0 0.4040404 Private 12th Never-married Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.125055149 0.125 0 0 0.212121218 Private 1st-4th Widowed Prof-specialty Unmarried White Female Mexico 0 -37 0.411111116 0.142078727 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -43 0.477777779 0.236182272 0.9375 0 0 0.5050505 Private Prof-school Separated Tech-support Not-in-family White Male Columbia 1 -42 0.466666669 0.128337279 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 1 -21 0.233333334 0.04732321 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 -49 0.544444442 0.120595 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male Greece 0 -35 0.3888889 0.163058653 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Other-relative Black Male United-States 0 -49 0.544444442 0.0792305544 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Widowed Craft-repair Unmarried White Female United-States 0 -28 0.311111122 0.0555874743 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family Black Male United-States 0 -51 0.566666663 0.130244061 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -30 0.333333343 0.1255603 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Not-in-family White Female United-States 0 -19 0.211111113 0.217959121 0.25 0 0 0.6060606 Private 7th-8th Never-married Other-service Not-in-family White Male United-States 1 -56 0.622222245 0.2499244 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 -20 0.222222224 0.0268922113 0.5625 0 0 0.08080808 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -22 0.244444445 0.04330288 0.625 0 0 0.373737365 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -33 0.366666675 0.133804366 0.5625 1 0 0.565656543 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -54 0.6 0.132669449 0.5625 0 0 0.454545468 ? HS-grad Divorced ? Other-relative White Male United-States 0 -22 0.244444445 0.141553372 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -68 0.75555557 0.097081244 0.625 0 0 0.3030303 Private Some-college Divorced Priv-house-serv Other-relative White Female United-States 0 -56 0.622222245 0.104840361 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -23 0.25555557 0.049136363 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 -69 0.7666667 0.07243729 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -41 0.455555558 0.109959893 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -33 0.366666675 0.149069354 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -18 0.2 0.299602956 0.4375 0 0 0.08080808 Private 11th Never-married Sales Own-child White Female Mexico 0 -17 0.188888893 0.10399238 0.4375 0 0 0.161616161 Private 11th Never-married Other-service Own-child Black Male Haiti 0 -31 0.344444454 0.08127675 0.4375 0 0.395087242 0.4040404 Private 11th Divorced Handlers-cleaners Other-relative Black Male United-States 0 -50 0.5555556 0.107529782 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -62 0.6888889 0.195832849 0.375 0 0 0.4040404 Private 10th Widowed Handlers-cleaners Not-in-family White Female United-States 0 -41 0.455555558 0.0334436819 0.5625 0 0 0.5252525 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -20 0.222222224 0.09924665 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Other-service Not-in-family White Female United-States 0 -23 0.25555557 0.153527468 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Sales Own-child White Male United-States 0 -18 0.2 0.284921259 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -53 0.5888889 0.0433230847 0.25 0 0 0.4040404 ? 7th-8th Separated ? Not-in-family White Male United-States 0 -42 0.466666669 0.300355971 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -23 0.25555557 0.155467927 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -43 0.477777779 0.0329237133 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Other-relative White Female United-States 0 -47 0.5222222 0.113285132 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -53 0.5888889 0.127058238 0.1875 0 0 0.4040404 Local-gov 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 -28 0.311111122 0.09165255 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -28 0.311111122 0.080684714 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -44 0.4888889 0.226653114 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -58 0.644444466 0.125944883 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -25 0.2777778 0.147469029 0.25 0 0 0.323232323 ? 7th-8th Never-married ? Not-in-family White Female Mexico 0 -26 0.2888889 0.142408758 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Female United-States 0 -36 0.4 0.188703477 0.625 0.0345603451 0 0.08080808 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.07408677 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -39 0.433333337 0.193162277 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.06901035 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -17 0.188888893 0.19341217 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Female United-States 0 -39 0.433333337 0.133425161 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -52 0.5777778 0.08022536 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -24 0.266666681 0.1175055 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -26 0.2888889 0.189719841 0.6875 0 0 0.5555556 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -24 0.266666681 0.2544108 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Not-in-family White Female United-States 0 -32 0.355555564 0.101739407 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -49 0.544444442 0.125640452 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Protective-serv Husband White Male United-States 1 -20 0.222222224 0.100678585 0.625 0 0 0.25252524 ? Some-college Never-married ? Other-relative White Female United-States 0 -40 0.444444448 0.133664265 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -52 0.5777778 0.133941084 0.9375 0 0.5874656 0.6060606 Private Prof-school Divorced Exec-managerial Not-in-family White Male United-States 1 -33 0.366666675 0.119020954 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -19 0.211111113 0.111341983 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Machine-op-inspct Other-relative White Male United-States 0 -37 0.411111116 0.143468231 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male Japan 0 -21 0.233333334 0.0257633682 0.625 0 0 0.2020202 State-gov Some-college Never-married Tech-support Own-child White Female United-States 0 -33 0.366666675 0.08470437 0.625 0 0 0.363636374 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -28 0.311111122 0.100117534 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 -48 0.533333361 0.1841679 0.5625 0 0.3624885 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.140508056 0.8125 0 0 0.4040404 Private Bachelors Separated Tech-support Not-in-family White Male United-States 0 -32 0.355555564 0.129699171 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.123852886 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -47 0.5222222 0.164093882 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male South 0 -37 0.411111116 0.129152939 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -26 0.2888889 0.175979748 0.625 0 0 0.3030303 Private Some-college Separated Sales Other-relative Black Male United-States 0 -55 0.6111111 0.08554831 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -40 0.444444448 0.133305266 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Sales Unmarried White Female United-States 0 -31 0.344444454 0.1464668 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.0582950823 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -54 0.6 0.06604073 0.625 0 0 0.545454562 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.14542754 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Asian-Pac-Islander Male Philippines 0 -53 0.5888889 0.129980028 0.5625 0 0 0.858585835 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.225049421 0.75 0 0 0.7878788 Self-emp-not-inc Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 -42 0.466666669 0.0922647938 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.07867691 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.127380863 0.4375 0 0.3409091 0.5858586 Private 11th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -26 0.2888889 0.06038102 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -33 0.366666675 0.127989739 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -59 0.655555546 0.06684695 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -42 0.466666669 0.0387955867 0.5625 0 0 0.454545468 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 -25 0.2777778 0.134184241 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -58 0.644444466 0.09453932 0.5625 0 0 0.363636374 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -30 0.333333343 0.207995534 0.625 0 0 0.6060606 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -21 0.233333334 0.185505539 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Female United-States 0 -61 0.677777767 0.143679053 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -33 0.366666675 0.106248043 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -51 0.566666663 0.12279477 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 -70 0.7777778 0.1485743 0.625 0 0 0.121212125 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 0 -55 0.6111111 0.140526235 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -29 0.322222233 0.127531067 0.625 0.0220202189 0 0.5050505 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -46 0.51111114 0.0835661 0.875 0 0 0.444444448 Private Masters Widowed Prof-specialty Not-in-family White Female United-States 0 -35 0.3888889 0.0137865776 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Unmarried Asian-Pac-Islander Female Philippines 0 -31 0.344444454 0.1038772 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -37 0.411111116 0.07075076 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.0241866242 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.127434745 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -41 0.455555558 0.07846205 0.5625 0.135501355 0 0.444444448 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 -42 0.466666669 0.0132686291 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -26 0.2888889 0.0328132547 0.375 0.02907029 0 0.4040404 Private 10th Never-married Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.07147077 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.172601968 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.13638939 0.25 0 0 0.4040404 ? 7th-8th Separated ? Not-in-family White Male Guatemala 0 -38 0.422222227 0.08087398 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -28 0.311111122 0.08279221 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -68 0.75555557 0.0787382051 0.6875 0 0.493342519 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -42 0.466666669 0.149926081 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.0722716 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male India 0 -36 0.4 0.105340794 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -33 0.366666675 0.0359485559 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.0396819562 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.112587348 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -24 0.266666681 0.191153124 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -57 0.6333333 0.09458175 0.125 0 0 0.353535354 Private 1st-4th Married-spouse-absent Other-service Not-in-family White Male ? 0 -36 0.4 0.0416096151 0.5625 0.1502415 0 0.4040404 Local-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.0224354342 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.136431143 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Prof-specialty Own-child White Female United-States 0 -25 0.2777778 0.0409697555 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Female United-States 0 -53 0.5888889 0.103378117 0.625 0 0 0.5050505 State-gov Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -28 0.311111122 0.112841271 0.75 0 0 0.4040404 Local-gov Assoc-acdm Widowed Prof-specialty Unmarried White Male United-States 0 -30 0.333333343 0.249874562 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.133943781 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.11781735 0.625 0 0 0.4848485 Local-gov Some-college Divorced Protective-serv Unmarried White Male Germany 0 -30 0.333333343 0.118445083 0.875 0 0 0.3838384 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -41 0.455555558 0.11425031 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female ? 0 -29 0.322222233 0.0842989 0.625 0 0 0.363636374 ? Some-college Never-married ? Not-in-family Black Male ? 0 -31 0.344444454 0.148642331 0.625 0 0 0.8080808 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.107789092 0.5625 0.03908039 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.07872137 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male Greece 0 -33 0.366666675 0.0907500163 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.0549927428 0.5625 0 0.4331956 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -49 0.544444442 0.0822904259 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -50 0.5555556 0.04688743 0.375 0 0 0.565656543 Federal-gov 10th Separated Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.07551332 0.8125 0 0.43663913 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.201671049 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -81 0.900000036 0.109706648 0.5625 0 0 0.353535354 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -24 0.266666681 0.07601106 0.625 0 0 0.161616161 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -32 0.355555564 0.0225075018 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.151248232 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 -44 0.4888889 0.315689653 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 -24 0.266666681 0.240470678 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -37 0.411111116 0.0344566777 0.625 0.07298073 0 0.363636374 Local-gov Some-college Married-civ-spouse Tech-support Wife White Female United-States 1 -51 0.566666663 0.1254815 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -52 0.5777778 0.08604336 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -22 0.244444445 0.196258515 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.09298413 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Not-in-family Other Male United-States 0 -47 0.5222222 0.117553994 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.1352693 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.07318491 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -43 0.477777779 0.121899642 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -25 0.2777778 0.02344102 0.8125 0 0 0.2020202 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -59 0.655555546 0.05109904 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -29 0.322222233 0.105623007 0.75 0 0 0.353535354 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 -30 0.333333343 0.0412688069 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Wife White Female Portugal 0 -24 0.266666681 0.026824858 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Wife Other Female Puerto-Rico 0 -38 0.422222227 0.0875642 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -37 0.411111116 0.0541009828 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.217291653 0.0625 0 0.3946281 0.4040404 Private Preschool Married-spouse-absent Machine-op-inspct Not-in-family White Male Mexico 0 -30 0.333333343 0.09488013 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -73 0.811111152 0.122517273 0.875 0 0 0.1010101 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male Poland 1 -30 0.333333343 0.193915963 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -33 0.366666675 0.208546489 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -46 0.51111114 0.01901051 0.625 0 0 0.5858586 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -40 0.444444448 0.2886661 0.5625 0.0346403457 0 0.2020202 ? HS-grad Married-civ-spouse ? Wife Black Female United-States 0 -18 0.2 0.026417369 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Own-child White Male United-States 0 -35 0.3888889 0.241887107 0.8125 0.07298073 0 0.08080808 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female ? 1 -22 0.244444445 0.08235441 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -50 0.5555556 0.133629248 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 -62 0.6888889 0.04922931 0.25 0 0 0.4040404 ? 7th-8th Widowed ? Not-in-family Black Male United-States 0 -39 0.433333337 0.19083792 0.8125 0.07298073 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.140732333 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -33 0.366666675 0.234670192 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -31 0.344444454 0.255300552 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Asian-Pac-Islander Female Vietnam 0 -29 0.322222233 0.123854235 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -38 0.422222227 0.08618615 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -24 0.266666681 0.14220266 0.8125 0 0 0.353535354 Private Bachelors Never-married Sales Own-child White Female United-States 0 -29 0.322222233 0.126388073 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Protective-serv Other-relative White Female United-States 0 -49 0.544444442 0.06382009 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 -33 0.366666675 0.1561428 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -28 0.311111122 0.09615648 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -22 0.244444445 0.08541899 0.8125 0 0 0.6060606 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -37 0.411111116 0.126670957 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -30 0.333333343 0.191549838 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.0210594032 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.1087381 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male Columbia 0 -25 0.2777778 0.09731428 0.5625 0 0 0.4040404 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 -36 0.4 0.09002125 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.07548571 1 0 0 0.454545468 State-gov Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 -21 0.233333334 0.168199748 0.5625 0 0 0.222222224 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -18 0.2 0.111641034 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 -30 0.333333343 0.116401576 0.6875 0 0 0.4040404 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 0 -44 0.4888889 0.194269568 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -40 0.444444448 0.0224495772 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -43 0.477777779 0.113201618 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -45 0.5 0.1396082 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.0879770741 0.625 0 0 0.262626261 Private Some-college Married-spouse-absent Sales Own-child Asian-Pac-Islander Female India 0 -40 0.444444448 0.09176503 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -43 0.477777779 0.654913962 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -20 0.222222224 0.165215984 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.0479226522 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -19 0.211111113 0.07971416 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 -21 0.233333334 0.07894497 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -23 0.25555557 0.0808699355 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -24 0.266666681 0.0325606763 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family Black Female United-States 0 -52 0.5777778 0.05688066 0.6875 0 0 0.323232323 Private Assoc-voc Divorced Other-service Not-in-family White Male United-States 0 -51 0.566666663 0.0514829569 0.625 0 0 0.4040404 ? Some-college Divorced ? Unmarried White Female United-States 0 -19 0.211111113 0.189737365 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -54 0.6 0.08285215 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.0705385953 0.5625 0 0 0.4848485 Private HS-grad Divorced Machine-op-inspct Other-relative White Female United-States 0 -29 0.322222233 0.0741790459 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -17 0.188888893 0.125322536 0.375 0 0 0.1010101 Private 10th Never-married Tech-support Own-child White Male United-States 0 -47 0.5222222 0.1446092 0.5625 0 0 0.373737365 Private HS-grad Divorced Other-service Unmarried White Female Puerto-Rico 0 -46 0.51111114 0.2591727 0.8125 0 0 0.323232323 Private Bachelors Divorced Prof-specialty Unmarried Black Female United-States 0 -30 0.333333343 0.1184956 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -58 0.644444466 0.246731848 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -48 0.533333361 0.079959996 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family Black Female United-States 0 -23 0.25555557 0.148066461 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Own-child White Male Mexico 0 -23 0.25555557 0.118869409 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -45 0.5 0.1841679 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.12302848 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Black Male United-States 0 -26 0.2888889 0.142994061 0.25 0 0 0.4848485 Private 7th-8th Never-married Machine-op-inspct Own-child White Male United-States 0 -50 0.5555556 0.0902287 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 1 -49 0.544444442 0.111235566 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -26 0.2888889 0.1850361 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Other-relative White Male Nicaragua 0 -47 0.5222222 0.132488951 0.9375 0 0 0.4040404 Private Prof-school Divorced Adm-clerical Not-in-family White Male United-States 0 -31 0.344444454 0.1434642 0.5 0.046500463 0 0.5050505 Private 12th Never-married Sales Not-in-family White Male United-States 0 -19 0.211111113 0.0179294888 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -23 0.25555557 0.243469924 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband White Male ? 0 -35 0.3888889 0.100074425 0.5625 0 0.399449021 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.309279621 0.625 0 0.43663913 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.144600451 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Never-married Craft-repair Not-in-family White Male United-States 0 -58 0.644444466 0.194896638 0.625 0.07688077 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.1178059 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -50 0.5555556 0.234456688 0.375 0 0 0.5050505 Self-emp-not-inc 10th Divorced Sales Not-in-family White Female United-States 0 -30 0.333333343 0.070697546 0.3125 0 0 0.3030303 ? 9th Never-married ? Not-in-family White Female United-States 0 -31 0.344444454 0.02128369 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -31 0.344444454 0.1928208 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 -35 0.3888889 0.122384585 0.5625 0.03103031 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -33 0.366666675 0.160915464 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.0907500163 0.875 0.07688077 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -67 0.7444445 0.106016345 0.9375 0.06418064 0 0.1010101 ? Prof-school Married-civ-spouse ? Husband White Male United-States 1 -37 0.411111116 0.132975236 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -48 0.533333361 0.0318871439 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.0451827124 0.8125 0.0147101469 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Unmarried Asian-Pac-Islander Male Cambodia 0 -24 0.266666681 0.16835466 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -55 0.6111111 0.118503004 0.5625 0 0 0.4040404 Private HS-grad Divorced Priv-house-serv Not-in-family White Female France 0 -50 0.5555556 0.129980028 0.5625 0 0.4242424 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -40 0.444444448 0.141137138 0.8125 0 0.453856736 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.09609653 0.8125 0 0 0.3030303 Private Bachelors Never-married Handlers-cleaners Not-in-family White Male United-States 0 -51 0.566666663 0.128195837 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.132279485 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -41 0.455555558 0.112305142 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.117553994 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.1420262 0.25 0 0 0.5050505 Private 7th-8th Never-married Farming-fishing Own-child White Male ? 0 -37 0.411111116 0.0798044056 0.8125 0.049340494 0 0.323232323 Private Bachelors Separated Prof-specialty Unmarried White Female United-States 1 -40 0.444444448 0.09703409 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.07204394 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.119980738 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -38 0.422222227 0.1323859 0.9375 0 0 0.353535354 Private Prof-school Separated Prof-specialty Not-in-family White Male United-States 1 -40 0.444444448 0.271804839 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.335565656 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -47 0.5222222 0.129827142 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 -20 0.222222224 0.0361943953 0.625 0 0 0.6060606 ? Some-college Never-married ? Own-child White Male United-States 0 -33 0.366666675 0.1052007 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.1278382 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -66 0.733333349 0.1435632 0.625 0 0.418962359 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -35 0.3888889 0.120677851 0.5625 0 0 0.3838384 Self-emp-not-inc HS-grad Never-married Sales Unmarried Black Female Germany 0 -32 0.355555564 0.0522891767 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -23 0.25555557 0.127857044 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 -19 0.211111113 0.08566685 0.5625 0 0 0.151515156 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -44 0.4888889 0.117294014 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -20 0.222222224 0.09301983 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -44 0.4888889 0.18167448 0.8125 0 0 0.3030303 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -41 0.455555558 0.1533867 0.5625 0.0346403457 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -19 0.211111113 0.214737609 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative White Female United-States 0 -48 0.533333361 0.0329257324 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -45 0.5 0.138360143 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.11709936 0.25 0 0 0.424242437 Private 7th-8th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Cambodia 0 -34 0.377777785 0.136357054 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.104248993 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative Other Female United-States 0 -33 0.366666675 0.121607326 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 -30 0.333333343 0.119567186 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.186789975 0.625 0 0 0.323232323 Private Some-college Never-married Handlers-cleaners Own-child White Male Cuba 0 -34 0.377777785 0.07582921 0.375 0 0 0.3838384 Private 10th Divorced Other-service Unmarried White Female United-States 0 -48 0.533333361 0.05750907 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -32 0.355555564 0.0834987462 0.4375 0 0 0.4949495 ? 11th Divorced ? Not-in-family White Female United-States 0 -42 0.466666669 0.0464866757 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 -22 0.244444445 0.0760063455 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Asian-Pac-Islander Male United-States 0 -60 0.6666667 0.0356299728 0.5625 0 0 0.424242437 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.0255518779 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.03999448 0.8125 0 0 0.5555556 Private Bachelors Separated Exec-managerial Not-in-family White Female United-States 0 -47 0.5222222 0.0773015544 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Own-child White Female United-States 0 -29 0.322222233 0.145807415 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 -34 0.377777785 0.118857957 0.8125 0 0 0.3838384 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -34 0.377777785 0.119101778 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 1 -39 0.433333337 0.276172042 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -29 0.322222233 0.06308459 0.625 0 0 0.24242425 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -42 0.466666669 0.09714792 0.625 0 0 0.6060606 Self-emp-inc Some-college Never-married Sales Not-in-family White Male United-States 0 -48 0.533333361 0.162265912 0.4375 0 0 0.353535354 Private 11th Separated Other-service Not-in-family Black Female United-States 0 -53 0.5888889 0.4096329 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -51 0.566666663 0.163912028 0.625 0 0 0.454545468 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 -44 0.4888889 0.0236855131 0.8125 0 0 0.909090936 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -46 0.51111114 0.123024441 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.09612482 1 0.04787048 0 0.6060606 Private Doctorate Divorced Craft-repair Not-in-family White Female United-States 1 -32 0.355555564 0.18383719 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Female United-States 0 -22 0.244444445 0.147660986 0.5625 0 0.3677686 0.3030303 ? HS-grad Never-married ? Own-child Black Male United-States 0 -24 0.266666681 0.154027909 0.625 0 0 0.454545468 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -33 0.366666675 0.159505084 0.6875 0 0 0.262626261 Private Assoc-voc Never-married Prof-specialty Unmarried Black Female United-States 0 -47 0.5222222 0.0793861449 0.5625 0 0 0.909090936 Self-emp-not-inc HS-grad Married-AF-spouse Craft-repair Husband White Male United-States 0 -64 0.7111111 0.07175702 0.875 0 0 0.5050505 Self-emp-not-inc Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -62 0.6888889 0.1036509 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.128583789 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.128646433 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female Poland 0 -42 0.466666669 0.0599937364 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -38 0.422222227 0.160531551 0.8125 0.07688077 0 0.424242437 Federal-gov Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -55 0.6111111 0.174803749 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.127487957 0.5625 0 0 0.272727281 ? HS-grad Married-civ-spouse ? Not-in-family White Female United-States 0 -42 0.466666669 0.08923052 0.75 0 0 0.24242425 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.138518423 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female Thailand 1 -32 0.355555564 0.122800827 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.14565587 0.5625 0.0346403457 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -50 0.5555556 0.112088934 0.4375 0.0367403664 0 0.4040404 Federal-gov 11th Never-married Sales Not-in-family Black Female United-States 0 -27 0.3 0.102542929 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Asian-Pac-Islander Male Philippines 0 -47 0.5222222 0.1048417 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.104531206 0.3125 0 0 0.353535354 Private 9th Divorced Machine-op-inspct Not-in-family White Male United-States 0 -48 0.533333361 0.06798051 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -23 0.25555557 0.109749079 0.25 0 0 0.353535354 Private 7th-8th Never-married Other-service Own-child White Male United-States 0 -31 0.344444454 0.22519356 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.122311845 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -61 0.677777767 0.0902327448 0.5625 0 0 0.6363636 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male South 0 -50 0.5555556 0.1415884 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Unmarried Black Male United-States 0 -49 0.544444442 0.114306211 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male Germany 1 -57 0.6333333 0.202130392 0.1875 0.07298073 0 0.8484849 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 1 -19 0.211111113 0.182878762 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Other-relative Asian-Pac-Islander Male United-States 0 -18 0.2 0.0345220119 0.4375 0 0 0.151515156 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -44 0.4888889 0.0179624911 0.75 0 0 1 Self-emp-not-inc Assoc-acdm Married-civ-spouse Other-service Wife White Female United-States 0 -54 0.6 0.131056339 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.119871624 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -27 0.3 0.21259442 0.875 0 0 0.2020202 State-gov Masters Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male China 0 -50 0.5555556 0.09221563 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -43 0.477777779 0.1555602 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.112522021 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Male United-States 0 -47 0.5222222 0.080912374 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -21 0.233333334 0.163916737 0.0625 0 0 0.5050505 Private Preschool Never-married Farming-fishing Not-in-family White Male Mexico 0 -30 0.333333343 0.115764417 0.9375 0 0 0.454545468 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 -19 0.211111113 0.09218397 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -40 0.444444448 0.2133892 0.625 0 0.3409091 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -55 0.6111111 0.124913029 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -67 0.7444445 0.0550688542 0.5625 0 0 0.2020202 ? HS-grad Divorced ? Own-child White Male United-States 0 -31 0.344444454 0.0294442344 0.6875 0 0 0.434343427 Private Assoc-voc Divorced Machine-op-inspct Unmarried White Male United-States 0 -30 0.333333343 0.148810029 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 0 -54 0.6 0.100125618 0.0625 0 0 0.4040404 ? Preschool Married-civ-spouse ? Wife White Female Mexico 0 -51 0.566666663 0.027485596 0.8125 0 0 0.434343427 Federal-gov Bachelors Never-married Prof-specialty Not-in-family Amer-Indian-Eskimo Female United-States 0 -34 0.377777785 0.123575389 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Own-child White Female United-States 0 -59 0.655555546 0.0730758 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.137965456 0.5625 0 0 0.3838384 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -29 0.322222233 0.0893686 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 -17 0.188888893 0.07941376 0.375 0 0 0.4040404 State-gov 10th Never-married Farming-fishing Own-child White Male United-States 0 -24 0.266666681 0.205014467 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -52 0.5777778 0.167112663 0.0625 0 0 0.4040404 ? Preschool Married-spouse-absent ? Other-relative White Male Mexico 0 -39 0.433333337 0.111278 0.875 0 0.43663913 0.181818187 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -18 0.2 0.145121768 0.5 0 0 0.25252524 ? 12th Never-married ? Own-child White Female United-States 0 -32 0.355555564 0.174929708 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Unmarried Black Male Nicaragua 0 -25 0.2777778 0.0241320673 0.625 0 0 0.5050505 ? Some-college Divorced ? Unmarried White Female United-States 0 -34 0.377777785 0.167572 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -44 0.4888889 0.08398436 0.5625 0 0.43663913 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.0862487853 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -39 0.433333337 0.121055029 0.875 0 0.5544077 0.656565666 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 -32 0.355555564 0.07647513 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.169833735 0.625 0 0 0.282828271 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -45 0.5 0.0309091713 0.625 0 0 0.424242437 Federal-gov Some-college Divorced Adm-clerical Unmarried White Male United-States 0 -30 0.333333343 0.075613 0.4375 0 0 0.4040404 Private 11th Divorced Handlers-cleaners Own-child White Male United-States 0 -20 0.222222224 0.0321888849 0.5 0 0 0.1010101 Private 12th Divorced Other-service Not-in-family White Female United-States 0 -41 0.455555558 0.136714026 0.5625 0 0 0.04040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Peru 0 -21 0.233333334 0.0235184766 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 -48 0.533333361 0.0614606962 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 -31 0.344444454 0.08957739 0.5625 0.05178052 0 0.454545468 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.206246361 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -25 0.2777778 0.13711141 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried Black Male United-States 0 -41 0.455555558 0.239723042 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Separated Craft-repair Not-in-family White Male United-States 0 -35 0.3888889 0.133926272 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.190586016 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -34 0.377777785 0.210275441 0.5625 0 0 0.75757575 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male Mexico 1 -44 0.4888889 0.06653106 0.375 0.04386044 0 0.6060606 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -32 0.355555564 0.134872586 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.123102568 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Male United-States 0 -23 0.25555557 0.134644926 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.115917981 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family Other Male India 1 -53 0.5888889 0.0237724 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Never-married Sales Unmarried White Male United-States 1 -27 0.3 0.146061346 1 0 0 0.5252525 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.2237394 0.8125 0 0 0.656565666 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -57 0.6333333 0.171824709 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -17 0.188888893 0.0749859437 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 -59 0.655555546 0.1605915 0.5625 0 0 0.3838384 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.08860481 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -30 0.333333343 0.07424977 0.375 0 0 0.5555556 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.172310323 0.75 0 0 0.454545468 State-gov Assoc-acdm Never-married Adm-clerical Own-child Black Female United-States 0 -18 0.2 0.118304983 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child White Male United-States 0 -23 0.25555557 0.0559020154 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -19 0.211111113 0.110675186 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -20 0.222222224 0.17747499 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Own-child White Male United-States 0 -52 0.5777778 0.1093692 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 -39 0.433333337 0.154677868 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.240686208 0.5625 0 0 0.5050505 Private HS-grad Separated Other-service Unmarried White Female United-States 0 -19 0.211111113 0.1816233 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -38 0.422222227 0.05582254 0.8125 0 0 0.151515156 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -19 0.211111113 0.262513429 0.5625 0 0 0.161616161 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -34 0.377777785 0.13143082 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -41 0.455555558 0.139883012 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male ? 0 -23 0.25555557 0.150147676 0.5625 0.02105021 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Own-child White Female United-States 0 -24 0.266666681 0.132274091 0.75 0 0 0.121212125 ? Assoc-acdm Never-married ? Not-in-family White Male United-States 0 -24 0.266666681 0.0339064 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.14422664 0.375 0 0 0.8484849 Private 10th Never-married Transport-moving Not-in-family Amer-Indian-Eskimo Male United-States 0 -45 0.5 0.07680448 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.129354313 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.161803856 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 -42 0.466666669 0.0299062785 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.12898387 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.110143095 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 -51 0.566666663 0.09215501 0.5625 0 0 0.323232323 Local-gov HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -59 0.655555546 0.08211194 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.0394852869 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Transport-moving Own-child White Male United-States 0 -27 0.3 0.04987927 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -29 0.322222233 0.09716341 0.8125 0.04386044 0 0.8080808 Private Bachelors Married-civ-spouse Handlers-cleaners Husband Black Male ? 1 -57 0.6333333 0.122602135 0.75 0 0 0.353535354 Private Assoc-acdm Widowed Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.140795648 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -31 0.344444454 0.138779089 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -23 0.25555557 0.122916006 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Own-child White Male United-States 0 -42 0.466666669 0.124642268 0.5625 0 0 0.353535354 Private HS-grad Separated Adm-clerical Unmarried White Female Scotland 0 -60 0.6666667 0.09932815 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -53 0.5888889 0.149337411 0.875 0.143441439 0 0.5050505 Local-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 1 -20 0.222222224 0.261877626 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -27 0.3 0.149465382 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -31 0.344444454 0.0324569531 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.257473379 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -22 0.244444445 0.0325633734 0.8125 0 0 0.4040404 Private Bachelors Never-married Farming-fishing Own-child White Male United-States 0 -42 0.466666669 0.0963464156 0.8125 0 0.359045 0.3838384 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -63 0.7 0.09290735 0.9375 0.1502415 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.16809468 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -79 0.8777778 0.08171186 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -39 0.433333337 0.151229367 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.124616675 0.5 0 0 0.4040404 Private 12th Never-married Other-service Not-in-family Other Male United-States 0 -60 0.6666667 0.0187821835 0.25 0 0 0.4040404 Private 7th-8th Divorced Other-service Not-in-family White Male United-States 0 -58 0.644444466 0.06381133 0.5 0 0 0.24242425 Private 12th Married-civ-spouse Other-service Wife White Female United-States 0 -20 0.222222224 0.07260769 0.75 0 0.506198347 0.181818187 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 -44 0.4888889 0.128817514 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -47 0.5222222 0.173008114 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.132785976 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -37 0.411111116 0.210325286 0.875 0 0 0.656565666 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 0 -21 0.233333334 0.0799195841 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Other-relative White Male United-States 0 -68 0.75555557 0.151099384 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Exec-managerial Not-in-family White Female United-States 0 -43 0.477777779 0.163324028 0.625 0.0501305 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -23 0.25555557 0.1582604 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Black Female United-States 0 -23 0.25555557 0.153508618 0.5625 0 0 0.333333343 Private HS-grad Never-married Craft-repair Unmarried White Female United-States 0 -40 0.444444448 0.0712040439 0.875 0 0.430670351 0.353535354 Local-gov Masters Never-married Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.108413458 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Sales Own-child White Female United-States 0 -34 0.377777785 0.238351062 0.6875 0.03103031 0 0.6060606 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 1 -22 0.244444445 0.127264336 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -38 0.422222227 0.135601357 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.147287175 0.625 0 0 0.4949495 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -23 0.25555557 0.124102093 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -39 0.433333337 0.135358885 0.625 0 0 0.454545468 Federal-gov Some-college Married-civ-spouse Adm-clerical Other-relative White Male United-States 1 -26 0.2888889 0.06887833 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -24 0.266666681 0.202453688 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 -22 0.244444445 0.140732333 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -36 0.4 0.07073527 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -20 0.222222224 0.0840241 0.625 0 0 0.2020202 Private Some-college Never-married Priv-house-serv Own-child White Female United-States 0 -18 0.2 0.184586838 0.4375 0 0 0.08080808 Private 11th Never-married Other-service Own-child Black Male United-States 0 -38 0.422222227 0.08949859 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.175765559 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Divorced Farming-fishing Not-in-family White Male United-States 0 -56 0.622222245 0.14037469 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family Black Male ? 0 -42 0.466666669 0.240407363 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.104000457 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.0238283034 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -73 0.811111152 0.202875316 0.125 0 0.398301184 0.2020202 Private 1st-4th Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.04958628 0.625 0 0 0.424242437 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -37 0.411111116 0.07283602 0.875 0.1502415 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -66 0.733333349 0.146290347 0.5625 0 0 0.1010101 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -22 0.244444445 0.105968527 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -51 0.566666663 0.136697859 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -31 0.344444454 0.116854869 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -65 0.722222269 0.100902878 0.5625 0 0.5064279 0.5959596 Private HS-grad Divorced Adm-clerical Unmarried White Female Canada 0 -39 0.433333337 0.2991968 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Wife Black Female United-States 0 -48 0.533333361 0.08427264 0.625 0 0 0.373737365 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -20 0.222222224 0.1282605 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -28 0.311111122 0.128175631 0.75 0 0 0.4040404 ? Assoc-acdm Never-married ? Other-relative White Male United-States 0 -48 0.533333361 0.167147011 0.8125 0.04386044 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -29 0.322222233 0.140454844 0.9375 0 0 0.8080808 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -36 0.4 0.231507942 1 0 0 0.3030303 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Male ? 1 -35 0.3888889 0.132263988 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.29217118 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -48 0.533333361 0.08222913 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -36 0.4 0.09248571 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 -40 0.444444448 0.0222724378 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -57 0.6333333 0.141905636 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -26 0.2888889 0.07936459 0.8125 0.0486504845 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.0696933046 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Own-child White Female United-States 0 -65 0.722222269 0.0780491754 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.157561943 0.375 0 0 0.323232323 Self-emp-not-inc 10th Never-married Prof-specialty Not-in-family White Female United-States 0 -42 0.466666669 0.0355498232 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -47 0.5222222 0.395133734 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male Japan 1 -62 0.6888889 0.07616328 0.25 0 0 0.4040404 Private 7th-8th Divorced Craft-repair Own-child White Male United-States 0 -27 0.3 0.169666708 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Exec-managerial Own-child White Male United-States 0 -76 0.844444454 0.152194545 0.625 0 0 0.08080808 Self-emp-not-inc Some-college Widowed Sales Not-in-family White Male United-States 0 -20 0.222222224 0.130730346 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -29 0.322222233 0.177699283 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -29 0.322222233 0.08967169 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 1 -32 0.355555564 0.08192469 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Own-child White Male Mexico 0 -22 0.244444445 0.02745798 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.239636168 0.5625 0 0 0.5050505 Federal-gov HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 -43 0.477777779 0.210084841 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -23 0.25555557 0.0614189357 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 -44 0.4888889 0.231736273 0.9375 0 0 0.4040404 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.07666372 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Not-in-family White Male United-States 0 -49 0.544444442 0.125142708 0.875 0.07430074 0 0.4040404 State-gov Masters Divorced Prof-specialty Unmarried Black Female United-States 1 -30 0.333333343 0.0512606874 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 1 -23 0.25555557 0.07921978 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -39 0.433333337 0.1603066 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Own-child White Female United-States 0 -32 0.355555564 0.09192399 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.192092031 0.625 0 0.4331956 0.353535354 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.236437544 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female Puerto-Rico 0 -35 0.3888889 0.826145947 0.8125 0 0 0.5252525 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.131855831 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -25 0.2777778 0.126314655 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -40 0.444444448 0.05345978 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -30 0.333333343 0.152666688 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -52 0.5777778 0.143603608 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -49 0.544444442 0.142119139 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -24 0.266666681 0.0647792 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -46 0.51111114 0.221064791 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.0745690241 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.151852384 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.107703552 0.8125 0 0.288797051 0.3838384 Local-gov Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 -43 0.477777779 0.07968452 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.12144433 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried White Female United-States 0 -62 0.6888889 0.0266921725 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -48 0.533333361 0.1844326 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 -56 0.622222245 0.115895756 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried Black Female Jamaica 0 -28 0.311111122 0.147427946 0.5625 0 0 0.353535354 Private HS-grad Never-married Farming-fishing Unmarried White Female United-States 0 -23 0.25555557 0.447678179 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -43 0.477777779 0.140869066 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -26 0.2888889 0.056993816 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.301302969 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -55 0.6111111 0.0255060773 1 0 0 0.6060606 Local-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 -48 0.533333361 0.06673784 0.8125 0 0 0.5050505 State-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -43 0.477777779 0.096707426 0.1875 0 0.488751143 0.727272749 Private 5th-6th Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female ? 0 -38 0.422222227 0.220169 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.122418262 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -56 0.622222245 0.167957947 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-spouse-absent Exec-managerial Not-in-family White Male United-States 0 -39 0.433333337 0.219841659 0.875 0 0 0.4040404 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -46 0.51111114 0.3399497 0.1875 0 0 0.5050505 Private 5th-6th Separated Handlers-cleaners Not-in-family White Male Mexico 0 -36 0.4 0.05992234 0.4375 0 0 0.656565666 Private 11th Never-married Transport-moving Unmarried Amer-Indian-Eskimo Male United-States 0 -42 0.466666669 0.114986479 0.5625 0 0.459595948 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.100324981 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -17 0.188888893 0.230855286 0.4375 0 0 0.2020202 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -57 0.6333333 0.148764238 0.25 0 0 0.4040404 Private 7th-8th Widowed Machine-op-inspct Unmarried Black Female United-States 0 -73 0.811111152 0.0199871361 0.5625 0 0 0.121212125 Private HS-grad Widowed Other-service Other-relative White Female United-States 0 -50 0.5555556 0.123668343 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -35 0.3888889 0.07760128 0.625 0 0 0.454545468 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -27 0.3 0.102532826 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -24 0.266666681 0.0278546922 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Female United-States 0 -27 0.3 0.1516409 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -23 0.25555557 0.08170849 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 -25 0.2777778 0.090806596 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -51 0.566666663 0.209704965 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.06877191 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Adm-clerical Wife White Female United-States 0 -47 0.5222222 0.28763628 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Husband White Male Mexico 0 -40 0.444444448 0.07938278 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Male United-States 0 -58 0.644444466 0.1925534 0.3125 0 0 0.4040404 Private 9th Divorced Other-service Unmarried White Female United-States 0 -25 0.2777778 0.143328145 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -29 0.322222233 0.131247625 0.5625 0 0 0.181818187 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -36 0.4 0.021174578 0.4375 0 0 0.434343427 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -46 0.51111114 0.09985418 0.5625 0 0 0.6060606 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -69 0.7666667 0.07613297 0.125 0 0 0.04040404 Private 1st-4th Widowed Priv-house-serv Not-in-family Black Female United-States 0 -69 0.7666667 0.07179541 0.5625 0.0184801836 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.097339876 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 -20 0.222222224 0.116004191 0.5625 0 0 0.4848485 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -54 0.6 0.0832434744 0.5625 0.0388703868 0 0.353535354 State-gov HS-grad Separated Adm-clerical Unmarried Black Female United-States 0 -25 0.2777778 0.129265413 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -64 0.7111111 0.159882948 0.5625 0.0347103477 0 0.4040404 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -17 0.188888893 0.140407026 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 -53 0.5888889 0.0464637764 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -50 0.5555556 0.0150992963 0.3125 0 0 0.5050505 Private 9th Divorced Transport-moving Not-in-family White Male United-States 0 -57 0.6333333 0.109817781 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -51 0.566666663 0.103636749 0.625 0 0.597566545 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.08416083 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 -47 0.5222222 0.133159116 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.112086244 0.5625 0 0 0.5252525 Private HS-grad Never-married Transport-moving Unmarried White Male United-States 0 -50 0.5555556 0.07827212 0.9375 0 0 0.5252525 State-gov Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.0226603951 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -43 0.477777779 0.0224495772 0.9375 0 0.453856736 0.7070707 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.0491808131 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -54 0.6 0.11394991 0.5625 0 0 0.3838384 Private HS-grad Separated Adm-clerical Unmarried White Female Puerto-Rico 0 -53 0.5888889 0.0137656983 0.625 0 0 0.151515156 Private Some-college Separated Exec-managerial Unmarried Amer-Indian-Eskimo Female United-States 0 -21 0.233333334 0.07400056 0.5625 0 0 0.3030303 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -58 0.644444466 0.213408723 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -30 0.333333343 0.140124142 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -61 0.677777767 0.103582866 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -56 0.622222245 0.103354543 0.625 0 0 0.353535354 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -59 0.655555546 0.06522508 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -72 0.8 0.129811645 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -33 0.366666675 0.140836731 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -46 0.51111114 0.09895501 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -46 0.51111114 0.129536167 0.625 0 0 0.3838384 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -48 0.533333361 0.146169782 0.5625 0 0 0.282828271 Private HS-grad Never-married Prof-specialty Unmarried Black Female United-States 0 -33 0.366666675 0.133501947 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -21 0.233333334 0.14985469 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 -27 0.3 0.0719051957 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -31 0.344444454 0.3780778 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -28 0.311111122 0.1372057 0.8125 0 0 0.4040404 Private Bachelors Never-married Machine-op-inspct Not-in-family White Male United-States 0 -45 0.5 0.136944383 0.625 0 0 0.3838384 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -51 0.566666663 0.08331823 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -46 0.51111114 0.210152864 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -25 0.2777778 0.141056985 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Sales Husband White Male El-Salvador 0 -61 0.677777767 0.1551096 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -17 0.188888893 0.07706582 0.4375 0 0 0.3030303 Private 11th Never-married Sales Own-child White Female United-States 0 -26 0.2888889 0.080984436 0.8125 0.0332503319 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -35 0.3888889 0.0676060244 0.375 0 0 0.6060606 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.0286151133 0.4375 0 0 0.7070707 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.0879770741 0.5 0 0 0.333333343 Private 12th Married-civ-spouse Sales Wife Asian-Pac-Islander Female ? 0 -39 0.433333337 0.09050081 0.5625 0 0 0.353535354 Local-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.09907625 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -35 0.3888889 0.0243913773 0.8125 0.04386044 0 0.474747479 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.08075948 0.5625 0 0 0.5050505 Private HS-grad Divorced Tech-support Not-in-family White Female United-States 1 -47 0.5222222 0.0712458044 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Sales Own-child White Male United-States 1 -64 0.7111111 0.111146659 0.4375 0 0 0.4848485 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.12601696 0.9375 0.1502415 0 0.474747479 Private Prof-school Married-civ-spouse Exec-managerial Wife White Female United-States 1 -43 0.477777779 0.0956621 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried White Female United-States 0 -34 0.377777785 0.162564278 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male ? 0 -62 0.6888889 0.08171253 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.10209436 0.625 0.1502415 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.109497845 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.0241913386 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -56 0.622222245 0.0240606721 0.25 0 0 0.5050505 Self-emp-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.131186336 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -33 0.366666675 0.0418635346 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family Black Male United-States 0 -45 0.5 0.129455343 0.625 0 0.3409091 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.11744421 0.625 0 0 0.5555556 Private Some-college Separated Sales Not-in-family White Male United-States 0 -26 0.2888889 0.108443767 0.6875 0 0 0.8080808 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -24 0.266666681 0.182202533 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female Mexico 0 -43 0.477777779 0.110356607 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -40 0.444444448 0.1305862 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Own-child White Male United-States 0 -61 0.677777767 0.10779044 0.25 0 0 0.353535354 Private 7th-8th Divorced Other-service Not-in-family White Male United-States 0 -34 0.377777785 0.12793383 0.625 0 0 0.727272749 Federal-gov Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 -85 0.9444445 0.0777016357 0.5625 0 0 0.353535354 Private HS-grad Widowed Sales Unmarried White Male United-States 0 -41 0.455555558 0.109903313 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.127230659 0.75 0.0332503319 0 0.353535354 State-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.144405127 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 -60 0.6666667 0.105486274 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried Black Female United-States 0 -29 0.322222233 0.137981623 0.75 0 0 0.363636374 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 -34 0.377777785 0.0376647227 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -35 0.3888889 0.116167858 0.8125 0.0297702979 0 0.454545468 State-gov Bachelors Never-married Exec-managerial Not-in-family Asian-Pac-Islander Female United-States 0 -24 0.266666681 0.103106007 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -45 0.5 0.131620765 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family Black Male United-States 0 -21 0.233333334 0.186461285 0.5 0 0 0.2020202 Local-gov 12th Never-married Other-service Own-child Black Male United-States 0 -30 0.333333343 0.06596126 0.75 0 0.3409091 0.373737365 Private Assoc-acdm Married-civ-spouse Transport-moving Wife White Female United-States 1 -50 0.5555556 0.08021729 0.625 0 0 1 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.0561801866 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.134027973 0.5625 0 0 0.333333343 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -45 0.5 0.227536783 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.129319966 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.127531067 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 -19 0.211111113 0.156234413 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male United-States 0 -26 0.2888889 0.110788338 0.8125 0.135501355 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -48 0.533333361 0.13502413 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 -69 0.7666667 0.154186189 0.8125 0 0.5238751 0.4040404 Private Bachelors Widowed Prof-specialty Not-in-family White Male United-States 1 -41 0.455555558 0.124500155 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.157506719 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.336094379 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male Mexico 0 -65 0.722222269 0.0847090855 0.625 0 0 0.282828271 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.171753988 0.8125 0 0.3996786 0.3838384 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -28 0.311111122 0.1061652 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -51 0.566666663 0.0988526344 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.07967307 0.625 0 0 0.8080808 Private Some-college Never-married Craft-repair Not-in-family White Female United-States 0 -43 0.477777779 0.2109382 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Other-relative Black Male United-States 0 -31 0.344444454 0.05919762 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -31 0.344444454 0.15251717 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.0546452 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Other-relative Asian-Pac-Islander Male Philippines 0 -20 0.222222224 0.1457771 0.8125 0 0 0.3030303 Private Bachelors Never-married Sales Other-relative Black Female United-States 0 -25 0.2777778 0.143740341 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Unmarried White Male United-States 0 -36 0.4 0.120803796 0.5625 0 0 0.3030303 Private HS-grad Widowed Handlers-cleaners Unmarried White Female United-States 0 -31 0.344444454 0.2490899 0.8125 0.04101041 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -56 0.622222245 0.134547263 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.161237419 0.8125 0 0 0.181818187 Private Bachelors Never-married Sales Own-child White Male United-States 0 -47 0.5222222 0.116934344 0.625 0 0 0.656565666 Self-emp-not-inc Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -40 0.444444448 0.0255060773 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.203976557 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -34 0.377777785 0.05739726 0.875 0 0 0.24242425 State-gov Masters Never-married Prof-specialty Unmarried Black Female United-States 0 -37 0.411111116 0.03251016 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.117173448 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.047808826 0.6875 0 0 0.161616161 Private Assoc-voc Never-married Other-service Own-child Asian-Pac-Islander Male United-States 0 -49 0.544444442 0.112383947 0.3125 0 0 0.4040404 Private 9th Divorced Handlers-cleaners Not-in-family White Female United-States 0 -18 0.2 0.17255348 0.5625 0 0 0.25252524 ? HS-grad Never-married ? Own-child Black Female United-States 0 -26 0.2888889 0.109699912 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 -82 0.9111111 0.102476925 0.25 0 0 0.02020202 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -40 0.444444448 0.09375129 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.5328224 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -23 0.25555557 0.09241836 0.5625 0 0 0.373737365 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 -19 0.211111113 0.12343058 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -67 0.7444445 0.103747882 0.5625 0 0 0.323232323 Private HS-grad Widowed Handlers-cleaners Other-relative Black Male United-States 0 -43 0.477777779 0.07767402 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.1434999 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Adm-clerical Not-in-family Other Female United-States 0 -37 0.411111116 0.10444095 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -20 0.222222224 0.0225977562 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -40 0.444444448 0.1144975 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -47 0.5222222 0.11333026 0.875 1 0 0.5050505 Private Masters Separated Exec-managerial Not-in-family White Male United-States 1 -40 0.444444448 0.0701796 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -39 0.433333337 0.07681998 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -24 0.266666681 0.184816509 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -78 0.8666667 0.01884482 0.5625 0.0222802218 0 0.323232323 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -67 0.7444445 0.164424583 0.6875 0 0 0.01010101 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 -49 0.544444442 0.132397354 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -66 0.733333349 0.06843582 0.5625 0 0 0.1010101 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -52 0.5777778 0.08224462 0.5625 0 0.0741506 0.4040404 Private HS-grad Never-married Prof-specialty Unmarried White Female United-States 0 -59 0.655555546 0.172304943 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -72 0.8 0.131463155 0.5625 0 0 0.121212125 Private HS-grad Widowed Priv-house-serv Unmarried White Female Cuba 0 -35 0.3888889 0.1652665 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -30 0.333333343 0.11422 0.8125 0 0 0.4040404 Private Bachelors Married-AF-spouse Exec-managerial Wife White Female United-States 1 -36 0.4 0.151229367 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -26 0.2888889 0.125379115 0.5625 0 0 0.4040404 Private HS-grad Separated Tech-support Own-child White Female United-States 0 -23 0.25555557 0.07994383 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -39 0.433333337 0.200342163 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.08433056 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -29 0.322222233 0.264876872 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -38 0.422222227 0.07283602 0.8125 0 0 0.2020202 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -63 0.7 0.178465083 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -58 0.644444466 0.214255363 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.105088219 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -38 0.422222227 0.100663096 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 -25 0.2777778 0.2424623 0.1875 0 0 0.333333343 Private 5th-6th Never-married Adm-clerical Not-in-family White Female Mexico 0 -44 0.4888889 0.111205935 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.0775763541 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 1 -21 0.233333334 0.100507513 0.625 0 0 0.3030303 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -41 0.455555558 0.23712185 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 0 -38 0.422222227 0.117677927 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -75 0.8333334 0.116564572 0.8125 0 0 0.0606060624 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -29 0.322222233 0.09951809 0.625 0 0.3838384 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.09140941 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -47 0.5222222 0.029781 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -28 0.311111122 0.0251625758 0.6875 1 0 0.5050505 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.120060891 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Priv-house-serv Wife White Female ? 0 -30 0.333333343 0.0475629866 0.875 0 0 0.1010101 State-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 0 -30 0.333333343 0.104364172 0.625 0.1502415 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.240407363 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Male United-States 1 -27 0.3 0.183008745 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 -26 0.2888889 0.166379854 0.5625 0 0 0.444444448 Private HS-grad Never-married Protective-serv Unmarried White Male United-States 0 -32 0.355555564 0.07234906 0.5625 0 0 0.373737365 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -36 0.4 0.07850314 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.6177793 0.5 0 0 0.4040404 Private 12th Never-married Transport-moving Own-child Black Male United-States 0 -25 0.2777778 0.2896764 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family Black Male United-States 0 -39 0.433333337 0.136685073 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Female Poland 0 -27 0.3 0.042255532 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -24 0.266666681 0.342524618 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -38 0.422222227 0.185372189 0.8125 0.07688077 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.2572437 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -29 0.322222233 0.1663455 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 -49 0.544444442 0.07101142 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 -36 0.4 0.09854551 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.107677288 1 0 0 0.5050505 Self-emp-not-inc Doctorate Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.137832776 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -35 0.3888889 0.0446533151 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female Philippines 1 -38 0.422222227 0.153306559 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -66 0.733333349 0.0725693 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -45 0.5 0.242737114 0.875 0 0.43663913 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.177368566 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 -18 0.2 0.095586665 0.5625 0 0 0.222222224 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -37 0.411111116 0.198215812 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 0 -49 0.544444442 0.0867081359 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 -33 0.366666675 0.344370782 0.6875 0 0 0.4848485 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 -27 0.3 0.203680873 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -34 0.377777785 0.0683752 0.625 0 0 0.353535354 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -54 0.6 0.108664013 0.875 0 0 0.4040404 State-gov Masters Married-spouse-absent Prof-specialty Not-in-family Asian-Pac-Islander Female China 0 -24 0.266666681 0.1273977 0.625 0 0 0.4040404 Self-emp-inc Some-college Never-married Transport-moving Own-child White Male United-States 0 -44 0.4888889 0.0694488138 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.03476785 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Separated Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.0212877318 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -29 0.322222233 0.0230968446 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -21 0.233333334 0.07266225 0.75 0 0 0.09090909 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 -18 0.2 0.026624145 0.5 0 0 0.323232323 Private 12th Never-married Other-service Own-child White Female United-States 0 -18 0.2 0.09113932 0.3125 0 0 0.323232323 Private 9th Never-married Sales Own-child Other Female United-States 0 -29 0.322222233 0.0726151 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -29 0.322222233 0.154730409 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -41 0.455555558 0.0753624439 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Other-relative Black Female United-States 0 -32 0.355555564 0.229619354 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -61 0.677777767 0.136695176 0.375 0 0 0.24242425 Private 10th Divorced Other-service Not-in-family Black Female United-States 0 -79 0.8777778 0.2244419 0.5625 0 0 0.0606060624 Private HS-grad Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 -34 0.377777785 0.07742616 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Machine-op-inspct Not-in-family White Male United-States 0 -46 0.51111114 0.107677288 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.0389020033 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -29 0.322222233 0.139464751 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.130052775 0.625 0.0367403664 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -64 0.7111111 0.101948872 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -70 0.7777778 0.05970075 0.875 0.07896079 0 0.5050505 Local-gov Masters Never-married Prof-specialty Unmarried White Female United-States 1 -28 0.311111122 0.205401078 0.75 0 0.454545438 0.4040404 Local-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -51 0.566666663 0.0692582056 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male Greece 0 -20 0.222222224 0.141461775 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -34 0.377777785 0.10389 0.8125 0.0486504845 0 0.5555556 State-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -29 0.322222233 0.09599146 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -49 0.544444442 0.0703540444 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Other-service Not-in-family Asian-Pac-Islander Male Philippines 0 -77 0.8555556 0.129473537 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.1970708 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -27 0.3 0.222355291 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 -22 0.244444445 0.03442502 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -35 0.3888889 0.173796818 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male Cuba 1 -42 0.466666669 0.126820475 0.8125 0 0.43663913 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -35 0.3888889 0.235107988 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 -62 0.6888889 0.1287717 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -33 0.366666675 0.0899188742 0.5625 0.0263502635 0 0.161616161 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -45 0.5 0.09867078 0.625 0 0 0.5555556 Private Some-college Widowed Exec-managerial Unmarried White Female United-States 0 -19 0.211111113 0.1619635 0.625 0 0.3677686 0.4040404 Private Some-college Married-spouse-absent Sales Own-child White Female United-States 0 -38 0.422222227 0.117949359 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -26 0.2888889 0.280578971 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -29 0.322222233 0.170952484 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -33 0.366666675 0.10725835 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.06901775 0.5625 0 0 0.8080808 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male Puerto-Rico 0 -42 0.466666669 0.143775359 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.142767757 0.6875 0 0 0.2020202 Private Assoc-voc Never-married Other-service Own-child White Female United-States 0 -43 0.477777779 0.02156388 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -69 0.7666667 0.3455178 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Prof-specialty Husband Black Male United-States 0 -39 0.433333337 0.0909406245 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -37 0.411111116 0.07350484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Portugal 0 -28 0.311111122 0.09612145 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.0517948 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -32 0.355555564 0.07555441 0.625 0 0 0.3030303 Private Some-college Divorced Sales Own-child White Male United-States 0 -43 0.477777779 0.176622972 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -49 0.544444442 0.08221566 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male Hungary 0 -28 0.311111122 0.131130427 0.25 0 0 0.6060606 Private 7th-8th Separated Other-service Own-child White Male Mexico 0 -35 0.3888889 0.206558213 0.5625 0.0288502872 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.146674931 0.625 0.005940059 0 0.1010101 ? Some-college Never-married ? Own-child White Female United-States 0 -35 0.3888889 0.2080851 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -57 0.6333333 0.0314533859 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -45 0.5 0.25443238 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -23 0.25555557 0.1488464 0.5625 0 0.365013778 0.4848485 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -45 0.5 0.0687995255 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.07662802 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -35 0.3888889 0.0936293751 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Vietnam 0 -45 0.5 0.100289285 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.221879765 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -64 0.7111111 0.122184545 0.6875 0 0 0.1010101 Self-emp-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.06866684 0.9375 0 0 0.4040404 Local-gov Prof-school Separated Prof-specialty Unmarried White Female United-States 0 -59 0.655555546 0.0219147913 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -41 0.455555558 0.141137138 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -21 0.233333334 0.1363052 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child Black Male United-States 0 -29 0.322222233 0.102024309 0.6875 0.0217402168 0 0.4040404 Self-emp-not-inc Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -51 0.566666663 0.11775 0.5625 0.0861408561 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 1 -22 0.244444445 0.09346503 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -49 0.544444442 0.09664007 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -53 0.5888889 0.134834871 0.75 0 0 0.8080808 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.113427922 0.625 0.0572105721 0 0.444444448 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.09989527 0.625 0 0 0.4040404 Private Some-college Separated Craft-repair Own-child White Male United-States 0 -20 0.222222224 0.182202533 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female Mexico 0 -40 0.444444448 0.036038138 0.8125 0 0 0.4040404 Private Bachelors Divorced Craft-repair Own-child White Female United-States 0 -25 0.2777778 0.07118788 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -27 0.3 0.127694726 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 -20 0.222222224 0.110846266 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -37 0.411111116 0.125105 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -40 0.444444448 0.0223310366 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Own-child White Male United-States 0 -28 0.311111122 0.14545314 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.15731813 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Separated Other-service Unmarried White Female United-States 0 -42 0.466666669 0.142286181 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -32 0.355555564 0.1289044 0.75 0.0217402168 0 0.4040404 Federal-gov Assoc-acdm Divorced Protective-serv Not-in-family White Male United-States 0 -20 0.222222224 0.09287704 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -62 0.6888889 0.10756278 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -31 0.344444454 0.19931367 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -31 0.344444454 0.118445083 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.145570338 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -62 0.6888889 0.274579138 0.25 0 0 0.353535354 Local-gov 7th-8th Widowed Other-service Not-in-family Black Female United-States 0 -43 0.477777779 0.144299373 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.192265138 0.625 0 0 0.5050505 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -30 0.333333343 0.08380116 0.5625 0.046500463 0 0.4040404 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -22 0.244444445 0.165949464 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -18 0.2 0.09614772 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -59 0.655555546 0.191037953 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.217505172 0.25 0 0.43663913 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 1 -49 0.544444442 0.0515132658 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.290795147 0.4375 0 0 0.3030303 State-gov 11th Never-married Other-service Own-child White Male United-States 0 -48 0.533333361 0.09560418 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -32 0.355555564 0.13002044 0.9375 0.1502415 0 0.6060606 Private Prof-school Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.0451308526 0.375 0 0 0.454545468 Private 10th Never-married Machine-op-inspct Not-in-family White Female United-States 0 -23 0.25555557 0.161916345 0.8125 0 0 0.151515156 Private Bachelors Never-married Sales Not-in-family Black Male United-States 0 -33 0.366666675 0.123064183 0.9375 0 0 0.656565666 Federal-gov Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 -50 0.5555556 0.115878917 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.1247231 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.06927841 0.75 0 0.459595948 0.424242437 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -39 0.433333337 0.05721945 0.625 0.0282902829 0 0.656565666 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.07805928 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -23 0.25555557 0.124327056 0.8125 0 0 0.212121218 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -32 0.355555564 0.190348253 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -57 0.6333333 0.14726764 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -22 0.244444445 0.1061093 0.625 0 0 0.1010101 State-gov Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -70 0.7777778 0.0979447141 0.5625 0 0 0.05050505 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.0825861 0.625 0 0 0.8484849 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -53 0.5888889 0.137794375 0.875 0 0 0.4040404 Private Masters Divorced Sales Not-in-family White Female United-States 0 -21 0.233333334 0.07894497 0.625 0 0 0.454545468 Private Some-college Never-married Sales Own-child White Male United-States 0 -37 0.411111116 0.04679785 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -60 0.6666667 0.100014485 0.5625 0 0.3409091 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.07203923 0.4375 0.143441439 0 0.4040404 Private 11th Never-married Craft-repair Own-child Asian-Pac-Islander Male Vietnam 1 -32 0.355555564 0.0197426435 0.375 0 0 0.8080808 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 -57 0.6333333 0.081027545 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -65 0.722222269 0.07537928 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -25 0.2777778 0.122736171 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -30 0.333333343 0.147578135 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.134836212 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female Germany 0 -19 0.211111113 0.2881798 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 -23 0.25555557 0.0225977562 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -44 0.4888889 0.110488616 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -43 0.477777779 0.07855567 0.625 0 0 0.454545468 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -42 0.466666669 0.117958114 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Unmarried Black Female United-States 0 -34 0.377777785 0.195143819 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -32 0.355555564 0.172668651 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -25 0.2777778 0.190348923 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Unmarried Black Female United-States 0 -21 0.233333334 0.04962535 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -31 0.344444454 0.16018267 0.5625 0 0 0.6060606 Private HS-grad Married-spouse-absent Priv-house-serv Other-relative Black Female Jamaica 0 -36 0.4 0.240936756 0.6875 0 0 0.4040404 Local-gov Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 -49 0.544444442 0.1047272 0.625 0 0 0.656565666 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male Poland 0 -44 0.4888889 0.09299962 0.8125 0 0 0.323232323 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 -42 0.466666669 0.123579435 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.06977548 0.5625 0 0 1 Private HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 -33 0.366666675 0.116052687 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -36 0.4 0.211390823 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Divorced Other-service Unmarried Black Male United-States 1 -17 0.188888893 0.19834581 0.375 0 0 0.3030303 Private 10th Never-married Other-service Own-child White Male United-States 0 -20 0.222222224 0.429095358 0.625 0 0 0.25252524 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -32 0.355555564 0.2599567 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -33 0.366666675 0.07849304 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.08706309 0.625 0 0 0.6060606 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -60 0.6666667 0.0951387659 0.375 0 0 0.4848485 Private 10th Divorced Farming-fishing Not-in-family White Male United-States 0 -35 0.3888889 0.02399534 0.625 0 0 0.151515156 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.06394334 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 -46 0.51111114 0.148358762 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -29 0.322222233 0.11419373 0.5625 0.05178052 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -36 0.4 0.1445432 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.0549200028 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -50 0.5555556 0.0161735844 0.625 0 0 0.8484849 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.0841514 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Adm-clerical Wife Amer-Indian-Eskimo Female United-States 0 -33 0.366666675 0.2113073 0.875 0 0 0.6060606 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -61 0.677777767 0.129478246 0.375 0 0 0.4040404 Private 10th Divorced Sales Unmarried White Female United-States 0 -28 0.311111122 0.113506727 0.6875 0 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Own-child White Female United-States 0 -41 0.455555558 0.07632762 0.6875 0 0 0.7070707 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 -22 0.244444445 0.145131186 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -27 0.3 0.134641558 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -25 0.2777778 0.2908733 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.0713529 0.5625 0 0.3677686 0.2020202 Private HS-grad Never-married Machine-op-inspct Own-child Black Female United-States 0 -28 0.311111122 0.185005784 0.875 0 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -25 0.2777778 0.119551696 0.8125 0 0.365013778 0.353535354 Private Bachelors Never-married Craft-repair Own-child White Male United-States 0 -28 0.311111122 0.1388323 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.14934954 0.8125 0 0 0.3030303 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -58 0.644444466 0.136493117 0.5625 0 0 0.373737365 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.2350366 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -33 0.366666675 0.115764417 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -59 0.655555546 0.106372647 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -58 0.644444466 0.13561213 0.8125 0 0 0.2020202 Private Bachelors Divorced Craft-repair Own-child White Female United-States 0 -38 0.422222227 0.238928944 0.6875 0 0 0.363636374 Private Assoc-voc Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 -34 0.377777785 0.0269865058 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.220152825 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Own-child Black Male United-States 0 -48 0.533333361 0.127811253 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -65 0.722222269 0.100389645 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -45 0.5 0.15238449 0.5625 0 0 0.5050505 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -80 0.8888889 0.01954597 0.9375 0.106051058 0 0.1010101 ? Prof-school Married-civ-spouse ? Husband White Male United-States 1 -23 0.25555557 0.0257633682 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -33 0.366666675 0.132272065 0.875 0 0 0.373737365 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.146193355 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Farming-fishing Not-in-family White Male United-States 0 -44 0.4888889 0.07070293 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Farming-fishing Husband White Male United-States 1 -48 0.533333361 0.160947129 0.875 0.09562095 0 0.4040404 Local-gov Masters Divorced Exec-managerial Unmarried Black Female United-States 1 -40 0.444444448 0.0230470039 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.197320014 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Other-relative Black Female United-States 0 -45 0.5 0.158902943 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Own-child White Female United-States 0 -34 0.377777785 0.06644822 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -70 0.7777778 0.06911138 0.625 0 0 0.8080808 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -32 0.355555564 0.199680075 0.875 0 0 0.6060606 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -33 0.366666675 0.21759811 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Unmarried White Female United-States 0 -24 0.266666681 0.124439538 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -30 0.333333343 0.157602355 0.8125 0 0 0.151515156 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -22 0.244444445 0.0880471244 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child Black Male United-States 0 -52 0.5777778 0.122485615 0.9375 1 0 0.656565666 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband Other Male United-States 1 -67 0.7444445 0.0859046057 0.375 0.02414024 0 0.8080808 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -40 0.444444448 0.12606141 0.5625 0 0.3838384 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -55 0.6111111 0.07672366 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 0 -29 0.322222233 0.145806074 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -62 0.6888889 0.09125045 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.1375088 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Female United-States 0 -64 0.7111111 0.07722073 0.3125 0 0 0.4040404 State-gov 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.16176413 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Exec-managerial Other-relative White Male United-States 0 -28 0.311111122 0.124490052 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.08391566 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Other-relative White Male United-States 0 -47 0.5222222 0.0811130852 1 0.1502415 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.1360762 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 -18 0.2 0.105660051 0.5 0 0 0.272727281 Private 12th Never-married Other-service Own-child White Male United-States 0 -52 0.5777778 0.119705267 0.375 0.0406404063 0 0.454545468 Self-emp-inc 10th Married-civ-spouse Sales Husband White Male United-States 0 -48 0.533333361 0.225236 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -36 0.4 0.20964098 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male Haiti 0 -23 0.25555557 0.14428927 0.6875 0 0 0.3030303 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 -41 0.455555558 0.0780283 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -56 0.622222245 0.4521383 0.5625 0 0 0.3838384 State-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -53 0.5888889 0.0211893953 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 -26 0.2888889 0.09552336 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -22 0.244444445 0.208898067 0.625 0.0332503319 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -25 0.2777778 0.121204555 0.875 0.02597026 0 0.3131313 Private Masters Never-married Prof-specialty Own-child White Female United-States 0 -31 0.344444454 0.09291543 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband Other Male Puerto-Rico 0 -36 0.4 0.0695916042 0.75 0.0282902829 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -46 0.51111114 0.117481925 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -46 0.51111114 0.12984331 0.75 0 0.518365443 0.3838384 State-gov Assoc-acdm Divorced Adm-clerical Unmarried White Male United-States 1 -32 0.355555564 0.114470556 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Other-service Wife White Female Puerto-Rico 0 -43 0.477777779 0.03238825 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -30 0.333333343 0.08931135 0.8125 1 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.170444638 0.8125 0.07688077 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.07303471 0.875 1 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.141746685 0.875 0 0 0.3838384 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -22 0.244444445 0.09037553 0.5625 0 0 0.5050505 Local-gov HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -51 0.566666663 0.0306370631 0.5625 0 0 0.8080808 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -47 0.5222222 0.123608395 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife Black Female United-States 1 -40 0.444444448 0.134237438 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -46 0.51111114 0.05594647 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.0909251347 0.625 0 0 0.2020202 ? Some-college Separated ? Unmarried White Female United-States 0 -30 0.333333343 0.0299177282 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Unmarried White Female United-States 0 -27 0.3 0.298114449 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.106480412 0.625 0 0 0.353535354 Local-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -31 0.344444454 0.252462953 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -30 0.333333343 0.07587366 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 -50 0.5555556 0.123519488 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Not-in-family White Male United-States 1 -27 0.3 0.139703169 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -22 0.244444445 0.22593917 0.625 0 0 0.161616161 ? Some-college Never-married ? Own-child White Female United-States 0 -29 0.322222233 0.164113417 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -28 0.311111122 0.0365345329 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -54 0.6 0.0339360349 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family Black Female United-States 1 -47 0.5222222 0.126342267 0.6875 0 0 0.4848485 State-gov Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -34 0.377777785 0.0251767188 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Unmarried White Female United-States 0 -26 0.2888889 0.166379854 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -53 0.5888889 0.0196880866 0.25 0 0 0.353535354 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -23 0.25555557 0.0680903 0.625 0 0 0.6060606 State-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 -42 0.466666669 0.119024321 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -36 0.4 0.07976601 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -52 0.5777778 0.14920944 0.8125 0 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -22 0.244444445 0.0812094 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -27 0.3 0.0839762762 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -42 0.466666669 0.103158541 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -39 0.433333337 0.07723959 0.5625 0.0545505434 0 0.4040404 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 -49 0.544444442 0.0962184444 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.0200053211 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -20 0.222222224 0.187040523 0.0625 0 0 0.323232323 Private Preschool Never-married Other-service Own-child White Male United-States 0 -55 0.6111111 0.0454184525 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.08158119 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.265673667 0.875 0 0 0.333333343 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.05364635 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.137241408 1 0 0 0.8080808 Private Doctorate Divorced Prof-specialty Unmarried White Female United-States 0 -55 0.6111111 0.154258937 0.8125 0.1502415 0 0.4848485 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.333155751 0.75 0 0 0.151515156 ? Assoc-acdm Never-married ? Own-child White Male United-States 0 -48 0.533333361 0.10966219 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.07349406 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Handlers-cleaners Own-child White Male United-States 0 -24 0.266666681 0.02204613 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.146623075 0.5625 0 0 0.3838384 Self-emp-not-inc HS-grad Widowed Craft-repair Not-in-family White Female United-States 0 -20 0.222222224 0.0232975576 0.625 0 0 0.6060606 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -18 0.2 0.186477453 0.625 0 0.3677686 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 -56 0.622222245 0.113574751 0.5625 0.04101041 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 -36 0.4 0.0613165572 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -44 0.4888889 0.115500391 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -57 0.6333333 0.135012016 0.5625 0.1502415 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -57 0.6333333 0.0249140412 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -33 0.366666675 0.133501947 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -61 0.677777767 0.020525964 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 1 -39 0.433333337 0.04781758 0.8125 0.1502415 0 1 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 -28 0.311111122 0.165548041 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -31 0.344444454 0.184093148 0.625 0 0.395087242 0.161616161 Private Some-college Never-married Other-service Own-child White Male United-States 0 -60 0.6666667 0.123045996 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Other-service Not-in-family White Female United-States 0 -36 0.4 0.166906565 0.6875 0 0 0.4040404 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 1 -58 0.644444466 0.109862231 0.5625 0 0 0.353535354 Private HS-grad Widowed Sales Not-in-family White Female United-States 1 -50 0.5555556 0.121587791 0.625 0 0 0.3838384 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -23 0.25555557 0.13696526 0.8125 0 0 0.121212125 Local-gov Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -30 0.333333343 0.0589133874 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -20 0.222222224 0.145862654 0.4375 0 0 0.4040404 ? 11th Never-married ? Other-relative White Male United-States 0 -90 1 0.0588480569 0.9375 0.200512 0 0.727272749 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.116914809 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.0540726967 0.8125 0.031370312 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -34 0.377777785 0.2154327 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male Taiwan 1 -37 0.411111116 0.274956316 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Tech-support Unmarried White Female United-States 0 -25 0.2777778 0.290500134 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Protective-serv Wife Black Female United-States 0 -37 0.411111116 0.09031289 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.1659562 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male Mexico 0 -34 0.377777785 0.107263736 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.0714040846 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -35 0.3888889 0.1259065 0.5625 0.07688077 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.080911696 0.625 0 0 0.4040404 Private Some-college Separated Machine-op-inspct Own-child White Male United-States 0 -32 0.355555564 0.137299329 0.25 0 0 0.1919192 State-gov 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -24 0.266666681 0.140054762 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -28 0.311111122 0.203680873 0.9375 0 0 0.6060606 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 -41 0.455555558 0.09738904 0.25 0 0.500229537 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -69 0.7666667 0.115208074 0.5625 0 0 0.09090909 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -32 0.355555564 0.309157044 0.5625 0 0 0.909090936 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -58 0.644444466 0.250676751 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 1 -47 0.5222222 0.115870833 0.5625 0 0 0.75757575 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.1054526 0.8125 0.04386044 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.227870181 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.238226458 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male Canada 0 -46 0.51111114 0.230959684 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband Black Male United-States 1 -69 0.7666667 0.11431025 0.8125 0.06418064 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.06988729 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -36 0.4 0.0320400372 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -31 0.344444454 0.08044157 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.0971001 0.8125 0 0 0.3030303 Local-gov Bachelors Never-married Prof-specialty Own-child Amer-Indian-Eskimo Male United-States 0 -35 0.3888889 0.121671982 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family Black Female United-States 0 -37 0.411111116 0.210299015 0.8125 0.05178052 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -35 0.3888889 0.101358861 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -18 0.2 0.135296911 0.4375 0 0 0.161616161 Private 11th Never-married Transport-moving Own-child White Male United-States 0 -43 0.477777779 0.126758516 0.3125 0 0 0.4040404 Private 9th Divorced Handlers-cleaners Unmarried White Female United-States 0 -53 0.5888889 0.08001118 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -54 0.6 0.137619928 0.625 0 0 0.5252525 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -29 0.322222233 0.172876775 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -46 0.51111114 0.155933335 0.75 0 0 0.474747479 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female Cuba 0 -24 0.266666681 0.067804046 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child Asian-Pac-Islander Male United-States 0 -30 0.333333343 0.05988597 0.625 0 0 0.4040404 Private Some-college Separated Other-service Unmarried Asian-Pac-Islander Female United-States 0 -23 0.25555557 0.244640529 0.625 0 0 0.0606060624 Private Some-college Never-married Priv-house-serv Not-in-family White Female United-States 0 -27 0.3 0.196366966 0.8125 0 0 0.0606060624 ? Bachelors Married-civ-spouse ? Not-in-family Other Female Mexico 0 -36 0.4 0.2080851 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.06756628 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.199671313 0.875 0 0 0.151515156 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 0 -66 0.733333349 0.201275 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male Canada 0 -45 0.5 0.127091914 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -68 0.75555557 0.0196941476 0.5625 0 0 0.121212125 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -37 0.411111116 0.1259065 0.5625 0.1502415 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -17 0.188888893 0.104335882 0.375 0 0 0.1010101 Private 10th Never-married Other-service Own-child White Female United-States 0 -31 0.344444454 0.0149531392 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Amer-Indian-Eskimo Male United-States 1 -46 0.51111114 0.146156311 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -40 0.444444448 0.125894368 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -34 0.377777785 0.07858598 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -56 0.622222245 0.06449968 0.375 0 0 0.454545468 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 -42 0.466666669 0.179638386 0.625 0 0 0.414141417 Private Some-college Separated Adm-clerical Unmarried Black Female United-States 0 -46 0.51111114 0.0793753639 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.163305178 0.5625 0 0 0.5050505 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.136544973 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.12234889 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -57 0.6333333 0.117706887 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-spouse-absent Farming-fishing Unmarried Amer-Indian-Eskimo Male United-States 0 -34 0.377777785 0.03779943 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Unmarried White Male United-States 0 -40 0.444444448 0.262927 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 -33 0.366666675 0.100845627 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.0345267244 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -29 0.322222233 0.1282073 0.5 0 0 0.353535354 Private 12th Never-married Other-service Unmarried Black Female ? 0 -53 0.5888889 0.138268545 0.5625 0.07688077 0 0.353535354 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -36 0.4 0.104286715 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Own-child Asian-Pac-Islander Female Philippines 0 -45 0.5 0.0599634275 0.5625 0.105201051 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family Asian-Pac-Islander Male United-States 1 -36 0.4 0.131090015 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 -18 0.2 0.142928734 0.5625 0 0 0.111111112 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -27 0.3 0.137931779 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.106881842 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.06581981 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.130009666 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.173266754 0.25 0 0 0.75757575 Self-emp-not-inc 7th-8th Never-married Farming-fishing Own-child White Male United-States 0 -48 0.533333361 0.239763454 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.13509351 0.9375 0 0.453856736 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.2538747 0.1875 0 0 0.4040404 Private 5th-6th Never-married Priv-house-serv Not-in-family White Female Mexico 0 -47 0.5222222 0.08299225 0.875 0 0 0.3838384 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.05575384 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -61 0.677777767 0.078050524 0.125 0 0 0.2020202 Self-emp-not-inc 1st-4th Married-civ-spouse Craft-repair Husband White Male United-States 0 -64 0.7111111 0.0693881959 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.200556338 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Not-in-family Black Male United-States 0 -44 0.4888889 0.17476806 0.5625 0 0 0.5050505 Private HS-grad Divorced Transport-moving Unmarried White Male United-States 0 -20 0.222222224 0.113010332 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -23 0.25555557 0.0269555245 0.625 0 0 0.7070707 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -52 0.5777778 0.165201172 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Other-service Wife White Female United-States 0 -43 0.477777779 0.0251915362 0.875 0 0 0.25252524 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -32 0.355555564 0.06978356 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband Asian-Pac-Islander Male United-States 0 -63 0.7 0.092403546 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male South 0 -29 0.322222233 0.09269047 0.625 0 0 0.414141417 Private Some-college Never-married Other-service Not-in-family White Female United-States 1 -42 0.466666669 0.06500214 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Taiwan 0 -65 0.722222269 0.132129952 0.375 0 0 0.282828271 Private 10th Divorced Handlers-cleaners Not-in-family White Female United-States 0 -24 0.266666681 0.116260134 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.09509364 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -35 0.3888889 0.15369384 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -40 0.444444448 0.128166884 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male ? 1 -38 0.422222227 0.2070472 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -26 0.2888889 0.1026709 0.5625 0 0 0.5050505 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -46 0.51111114 0.122947656 0.5625 0 0.3838384 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -39 0.433333337 0.190039769 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -29 0.322222233 0.0278041773 0.8125 0 0 0.5050505 ? Bachelors Married-spouse-absent ? Not-in-family White Male United-States 0 -42 0.466666669 0.10911461 1 0 0 0.363636374 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 -36 0.4 0.128482759 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.140177339 0.625 0 0 0.454545468 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 -57 0.6333333 0.117081843 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -55 0.6111111 0.08700247 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -35 0.3888889 0.193673491 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.145561576 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried Black Female ? 0 -24 0.266666681 0.09881155 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -47 0.5222222 0.192092031 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.2117424 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -44 0.4888889 0.137362644 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -18 0.2 0.1850509 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Unmarried White Female United-States 0 -27 0.3 0.348217338 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -36 0.4 0.0445697978 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.123137593 0.8125 0 0 0.3030303 Private Bachelors Never-married Sales Own-child White Male United-States 0 -29 0.322222233 0.1074146 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband Other Male United-States 0 -25 0.2777778 0.0913097262 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -73 0.811111152 0.2247423 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -45 0.5 0.135851234 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -28 0.311111122 0.06467278 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -43 0.477777779 0.118635021 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.0319901928 0.5625 0 0 0.424242437 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -20 0.222222224 0.126057371 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -22 0.244444445 0.168199748 0.625 0 0 0.2020202 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -76 0.844444454 0.160047963 0.25 0 0 0.1010101 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.118039615 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family Black Male United-States 0 -54 0.6 0.0289107952 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.138714433 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -33 0.366666675 0.07542576 0.625 0 0 0.5858586 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.112800859 0.625 0 0 0.5050505 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -40 0.444444448 0.148966968 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.127103373 0.625 0 0 0.3030303 ? Some-college Divorced ? Not-in-family White Male United-States 0 -49 0.544444442 0.1343351 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Unmarried White Female United-States 0 -30 0.333333343 0.2108419 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -22 0.244444445 0.0999733955 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Other Female United-States 0 -19 0.211111113 0.07572683 0.5625 0 0 0.5858586 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -46 0.51111114 0.0390070751 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -51 0.566666663 0.0977743044 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -56 0.622222245 0.166443169 0.25 0 0 0.4040404 Private 7th-8th Widowed Machine-op-inspct Unmarried Other Female Dominican-Republic 0 -53 0.5888889 0.1322 0.625 0 0 0.4040404 Private Some-college Widowed Sales Not-in-family White Female United-States 0 -60 0.6666667 0.246871263 0.6875 0 0 0.4040404 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 -27 0.3 0.145807415 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.126642674 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Unmarried White Female United-States 0 -37 0.411111116 0.0449153222 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -41 0.455555558 0.05036354 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Vietnam 0 -65 0.722222269 0.2192604 0.6875 0 0 0.5050505 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 1 -30 0.333333343 0.168719709 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -57 0.6333333 0.129903927 0.5625 0 0 0.727272749 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -44 0.4888889 0.0817347541 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.0478108451 0.5625 0.0406404063 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.08292287 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -57 0.6333333 0.228437975 0.625 0 0 0.4040404 Local-gov Some-college Widowed Adm-clerical Unmarried White Female Mexico 0 -59 0.655555546 0.08403757 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -32 0.355555564 0.1128379 0.9375 0.1502415 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female United-States 1 -90 1 0.0518978536 0.5625 0 1 0.4040404 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -22 0.244444445 0.134212524 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -39 0.433333337 0.128461882 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.0668227 0.6875 0.03103031 0 0.4848485 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.283858418 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -61 0.677777767 0.145445734 0.3125 0 0 0.25252524 Private 9th Divorced Sales Not-in-family White Male United-States 0 -24 0.266666681 0.04870328 0.625 0 0 0.434343427 Private Some-college Never-married Sales Own-child White Male United-States 0 -25 0.2777778 0.0387363136 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -44 0.4888889 0.0602227375 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.01896067 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 1 -90 1 0.0315119848 0.8125 0.09386094 0 0.151515156 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.152853936 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -44 0.4888889 0.122854039 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.2056651 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Other-relative Black Male United-States 0 -63 0.7 0.127468422 0.625 0 0 0.454545468 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -60 0.6666667 0.199692875 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 0 -34 0.377777785 0.1376536 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 -49 0.544444442 0.168104112 0.4375 0 0 0.656565666 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.100353271 0.875 0 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.113201618 0.5625 0 0 0.434343427 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -53 0.5888889 0.131335855 0.1875 0 0 0.454545468 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Italy 0 -23 0.25555557 0.142148778 0.625 0.04101041 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -28 0.311111122 0.13243708 0.6875 0 0 0.4040404 ? Assoc-voc Separated ? Unmarried White Female Mexico 0 -20 0.222222224 0.03394412 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 0 -43 0.477777779 0.119825155 0.5625 0.03908039 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -32 0.355555564 0.137652934 0.9375 0 0.453856736 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.0404127426 0.8125 0 0 0.444444448 Private Bachelors Divorced Sales Unmarried White Male United-States 1 -31 0.344444454 0.150229171 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.030255843 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -24 0.266666681 0.1041089 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Male United-States 0 -39 0.433333337 0.04521841 0.6875 0 0 0.4040404 Private Assoc-voc Separated Adm-clerical Not-in-family Asian-Pac-Islander Male United-States 0 -29 0.322222233 0.127079114 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male Jamaica 1 -20 0.222222224 0.2632287 0.1875 0 0 0.25252524 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 -23 0.25555557 0.09831179 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 -42 0.466666669 0.0204916131 0.4375 0 0 0.3838384 Private 11th Separated Other-service Unmarried White Female United-States 0 -53 0.5888889 0.369340032 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.1273977 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -58 0.644444466 0.179636359 0.125 0 0.500229537 0.181818187 Self-emp-not-inc 1st-4th Married-civ-spouse Transport-moving Husband White Male United-States 0 -51 0.566666663 0.209852472 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 -25 0.2777778 0.12639077 0.5625 0 0 0.4848485 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -38 0.422222227 0.158535868 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Prof-specialty Unmarried White Female United-States 0 -41 0.455555558 0.1270387 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -58 0.644444466 0.217343524 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -25 0.2777778 0.124400474 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family White Male Dominican-Republic 0 -50 0.5555556 0.09723211 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.08759788 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.07945215 1 0 0 0.4040404 Self-emp-inc Doctorate Never-married Prof-specialty Own-child White Male United-States 0 -22 0.244444445 0.08343476 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -37 0.411111116 0.16733627 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Other-relative White Male El-Salvador 0 -32 0.355555564 0.139537483 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Female United-States 0 -46 0.51111114 0.08075948 0.9375 0 0.359045 0.5555556 State-gov Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 -62 0.6888889 0.09077089 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -40 0.444444448 0.181293935 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband Other Male ? 0 -56 0.622222245 0.0889240652 0.8125 0.07688077 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 1 -37 0.411111116 0.04089836 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family Asian-Pac-Islander Female Japan 1 -41 0.455555558 0.436600536 0.125 0 0 0.4040404 Private 1st-4th Married-spouse-absent Farming-fishing Unmarried White Male Mexico 0 -56 0.622222245 0.201181382 0.25 0 0 0.4848485 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -20 0.222222224 0.148066461 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -34 0.377777785 0.2113073 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.09472858 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.137056187 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -51 0.566666663 0.08913623 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.108899079 0.4375 0 0 0.424242437 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.210662052 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.1738406 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -57 0.6333333 0.0162503663 0.8125 0 0 0.08080808 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -47 0.5222222 0.171324953 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -77 0.8555556 0.124890804 0.5625 0 0 0.151515156 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -43 0.477777779 0.1028009 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.09500743 0.5625 0 0 0.656565666 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.15702109 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.27388674 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.08043484 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -30 0.333333343 0.172078639 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -22 0.244444445 0.108797371 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -25 0.2777778 0.0510263 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -18 0.2 0.110009737 0.5625 0 0 0.222222224 Private HS-grad Never-married Sales Own-child White Female United-States 0 -28 0.311111122 0.06991423 0.8125 0 0.323232323 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female ? 0 -50 0.5555556 0.023460554 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -28 0.311111122 0.0255491845 0.5625 0 0 0.4848485 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -21 0.233333334 0.111205257 0.625 0 0 0.4040404 Private Some-college Never-married Priv-house-serv Own-child White Female United-States 0 -37 0.411111116 0.08487275 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Own-child White Male United-States 0 -28 0.311111122 0.0381564 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 -23 0.25555557 0.3521784 0.1875 0 0 0.353535354 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 -32 0.355555564 0.129168421 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Exec-managerial Not-in-family Black Female England 0 -27 0.3 0.0893686 0.5 0 0 0.5050505 Private 12th Never-married Machine-op-inspct Own-child White Male United-States 0 -55 0.6111111 0.135455862 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried Black Female United-States 0 -44 0.4888889 0.117385611 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -25 0.2777778 0.140493229 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -29 0.322222233 0.08513409 0.5625 0 0 0.323232323 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -50 0.5555556 0.09569106 0.5625 0 0 0.5555556 Private HS-grad Married-spouse-absent Exec-managerial Not-in-family White Female United-States 0 -18 0.2 0.266428024 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -74 0.822222233 0.121542662 0.8125 0 0 0.08080808 Private Bachelors Widowed Other-service Not-in-family White Female United-States 0 -22 0.244444445 0.158855125 0.3125 0 0 0.4040404 Private 9th Never-married Sales Not-in-family White Male United-States 0 -27 0.3 0.108257875 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -27 0.3 0.0215093233 0.625 0 0 0.8080808 State-gov Some-college Never-married Tech-support Own-child White Female United-States 0 -41 0.455555558 0.0236855131 0.9375 0.1502415 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.108501017 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -23 0.25555557 0.150210992 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -34 0.377777785 0.121015958 0.9375 0.07688077 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.16763936 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.134924442 0.9375 0 0 0.6060606 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 -41 0.455555558 0.1549264 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Other Male United-States 0 -29 0.322222233 0.0908530653 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 -48 0.533333361 0.109177247 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Machine-op-inspct Other-relative Asian-Pac-Islander Female China 0 -51 0.566666663 0.06992904 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male Haiti 0 -34 0.377777785 0.0413758978 0.5 0 0 0.4040404 State-gov 12th Never-married Adm-clerical Not-in-family Black Female United-States 0 -58 0.644444466 0.132901147 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.123673059 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -37 0.411111116 0.180910021 0.8125 0.07298073 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Other Male Puerto-Rico 1 -53 0.5888889 0.177630574 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Not-in-family White Female United-States 0 -54 0.6 0.0265998971 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.124846354 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.08935176 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -20 0.222222224 0.179429591 0.625 0 0 0.4848485 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -23 0.25555557 0.292091042 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 -39 0.433333337 0.145802036 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.146429092 0.375 0 0 0.4040404 Self-emp-not-inc 10th Never-married Machine-op-inspct Own-child White Male United-States 0 -28 0.311111122 0.153416336 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Other-relative Black Male United-States 0 -73 0.811111152 0.06483578 0.5625 0 0 0.4040404 State-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -67 0.7444445 0.166744232 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -56 0.622222245 0.09403619 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -32 0.355555564 0.049562037 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.0255060773 0.625 0 0.365013778 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -33 0.366666675 0.111681446 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -37 0.411111116 0.07335666 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -33 0.366666675 0.02355687 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.105797447 0.375 0 0 0.4040404 Private 10th Never-married Adm-clerical Unmarried White Female United-States 0 -59 0.655555546 0.156712621 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.198217839 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 -58 0.644444466 0.08786527 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.310956061 0.375 0 0 0.4040404 Local-gov 10th Never-married Other-service Not-in-family White Male United-States 0 -26 0.2888889 0.169921979 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -26 0.2888889 0.172921225 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.06498261 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female Germany 0 -25 0.2777778 0.157784209 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -21 0.233333334 0.07405646 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -24 0.266666681 0.176849946 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -39 0.433333337 0.044261992 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 -68 0.75555557 0.135873452 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -66 0.733333349 0.117725745 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Never-married Sales Not-in-family White Female United-States 0 -38 0.422222227 0.187864929 0.8125 0 0 0.4040404 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 -41 0.455555558 0.0684263855 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -71 0.788888931 0.130573422 0.25 0 0 0.161616161 ? 7th-8th Widowed ? Other-relative White Female Poland 0 -37 0.411111116 0.230866075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.163403511 0.875 0.04386044 0 0.454545468 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.119031727 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -49 0.544444442 0.0668004751 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -19 0.211111113 0.238501251 0.625 0 0 0.1010101 State-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 -25 0.2777778 0.0417295024 0.625 0 0 0.5050505 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -47 0.5222222 0.09289186 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -40 0.444444448 0.151314914 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Other-relative White Male United-States 0 -38 0.422222227 0.03441761 0.8125 0.0332503319 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -25 0.2777778 0.151114866 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -25 0.2777778 0.244433746 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Own-child White Female United-States 0 -23 0.25555557 0.147357225 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Other-relative Other Male United-States 0 -28 0.311111122 0.0696360543 0.875 0 0 0.4040404 Private Masters Divorced Sales Own-child White Female United-States 0 -29 0.322222233 0.208084434 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.09435679 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.1361954 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -52 0.5777778 0.280230075 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -33 0.366666675 0.1892834 0.5625 0 0 0.949494958 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -19 0.211111113 0.114337869 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 -68 0.75555557 0.130440727 1 0.200512 0 0.5555556 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.09423219 0.375 0 0 0.5050505 Private 10th Never-married Handlers-cleaners Unmarried White Male United-States 0 -18 0.2 0.08043484 0.5625 0 0 0.3030303 Self-emp-inc HS-grad Never-married Other-service Unmarried Asian-Pac-Islander Female India 0 -29 0.322222233 0.100574866 0.625 0 0.3409091 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.1746522 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.04994932 0.875 0 0 0.6060606 Self-emp-not-inc Masters Divorced Prof-specialty Unmarried White Male United-States 1 -49 0.544444442 0.09079043 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 -20 0.222222224 0.0276842881 0.625 0 0 0.2020202 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 -38 0.422222227 0.130009666 0.5625 0 0 0.5050505 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -57 0.6333333 0.204745054 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Not-in-family White Male Cuba 0 -35 0.3888889 0.08524859 0.625 0.0406404063 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -66 0.733333349 0.112117223 0.4375 0 0 0.262626261 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 -27 0.3 0.0413462631 0.8125 0 0 0.151515156 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -25 0.2777778 0.17158021 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -77 0.8555556 0.0193156227 0.875 0.09386094 0 0.0606060624 ? Masters Married-civ-spouse ? Husband White Male United-States 1 -19 0.211111113 0.121893577 0.375 0 0 0.353535354 ? 10th Never-married ? Unmarried White Female United-States 0 -70 0.7777778 0.190369129 0.5625 0 0.499081731 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -59 0.655555546 0.09187886 0.25 0 0 0.4848485 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -25 0.2777778 0.08854487 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -44 0.4888889 0.119377255 0.9375 0.105201051 0 0.4040404 Local-gov Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 -37 0.411111116 0.147160545 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male El-Salvador 1 -75 0.8333334 0.1754847 0.375 0 0 0.01010101 ? 10th Widowed ? Other-relative Asian-Pac-Islander Female China 0 -21 0.233333334 0.05434076 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -21 0.233333334 0.0139610227 0.5625 0.04101041 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -47 0.5222222 0.0792265162 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.06192409 0.5625 0 0.395087242 0.3030303 Private HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 -32 0.355555564 0.1184956 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -28 0.311111122 0.20850338 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -53 0.5888889 0.08331823 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -19 0.211111113 0.248990878 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Not-in-family Other Male United-States 0 -58 0.644444466 0.02015754 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 -22 0.244444445 0.113064885 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -23 0.25555557 0.158882737 0.4375 0 0 0.5555556 Private 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -21 0.233333334 0.127896115 0.5625 0.0332503319 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -36 0.4 0.0751294047 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.11852321 0.625 0 0 0.151515156 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -34 0.377777785 0.171259612 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -41 0.455555558 0.124642268 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -72 0.8 0.106144324 0.8125 0.0145501448 0 0.0606060624 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.06825935 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 -51 0.566666663 0.119047895 0.8125 0 0.43663913 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.06581981 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -38 0.422222227 0.08594368 0.625 0 0 0.4040404 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 1 -37 0.411111116 0.153294429 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.0969856 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child Black Male United-States 0 -21 0.233333334 0.168417975 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -26 0.2888889 0.191336334 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -34 0.377777785 0.139871553 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -18 0.2 0.110316195 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 -27 0.3 0.0802651048 0.4375 0 0 0.454545468 Private 11th Never-married Exec-managerial Unmarried White Female United-States 0 -20 0.222222224 0.127036691 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Own-child White Female Nicaragua 0 -36 0.4 0.07719042 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 1 -31 0.344444454 0.214023 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Not-in-family White Male United-States 0 -32 0.355555564 0.110592343 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.221772 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.1396796 0.875 0 0 0.4040404 Local-gov Masters Widowed Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.08324751 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.175072491 0.4375 0 0 0.3030303 Private 11th Separated Machine-op-inspct Other-relative White Male United-States 0 -32 0.355555564 0.0907500163 0.8125 1 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.07200084 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 -30 0.333333343 0.05863387 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.0556487665 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 1 -28 0.311111122 0.1223536 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -25 0.2777778 0.216342643 0.8125 0.04101041 0 0.353535354 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -44 0.4888889 0.155820861 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 1 -40 0.444444448 0.185960174 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -36 0.4 0.19570218 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -21 0.233333334 0.206987247 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Male United-States 0 -39 0.433333337 0.0667849854 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.16025272 0.8125 0 0 0.3939394 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -46 0.51111114 0.10338822 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family Amer-Indian-Eskimo Male United-States 0 -47 0.5222222 0.100828111 0.8125 0 0 0.363636374 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -47 0.5222222 0.127756014 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.252254844 0.9375 0 0 0.75757575 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -60 0.6666667 0.08608107 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 1 -35 0.3888889 0.101176329 0.8125 0 0 0.24242425 Private Bachelors Married-civ-spouse Other-service Wife White Female Poland 0 -33 0.366666675 0.19912979 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried White Female China 0 -21 0.233333334 0.132808879 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.162994 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -48 0.533333361 0.105347529 0.5625 0 0 0.5050505 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -58 0.644444466 0.319144875 0.25 0 0 0.454545468 Private 7th-8th Widowed Farming-fishing Other-relative White Female Guatemala 0 -21 0.233333334 0.133650124 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 -22 0.244444445 0.0767398253 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -22 0.244444445 0.214800254 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -28 0.311111122 0.118141994 0.875 0 0 0.3030303 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 -33 0.366666675 0.130108 0.6875 0.07688077 0 0.5050505 ? Assoc-voc Married-civ-spouse ? Own-child White Female United-States 1 -23 0.25555557 0.215729058 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -58 0.644444466 0.269605756 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -24 0.266666681 0.191102609 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Own-child White Male United-States 0 -38 0.422222227 0.152996048 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 0 -49 0.544444442 0.201157138 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Sales Husband White Male Mexico 0 -47 0.5222222 0.142870128 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.215874538 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.118407361 0.5625 0 0 0.5555556 Private HS-grad Never-married Prof-specialty Unmarried White Female United-States 0 -55 0.6111111 0.114614688 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.231801614 0.4375 0 0 0.4040404 Private 11th Divorced Handlers-cleaners Not-in-family White Male United-States 0 -19 0.211111113 0.134330392 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.151852384 0.5625 0 0 0.5050505 Private HS-grad Never-married Tech-support Other-relative White Male United-States 0 -36 0.4 0.0412054919 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.118045 0.75 0 0.459595948 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male England 0 -42 0.466666669 0.102759808 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Unmarried Amer-Indian-Eskimo Female United-States 0 -41 0.455555558 0.122656018 0.875 0.2782828 0 0.353535354 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 -46 0.51111114 0.184394211 0.8125 1 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.140291169 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.151112854 0.375 0 0 0.4040404 Private 10th Never-married Other-service Unmarried Black Female United-States 0 -33 0.366666675 0.0371629372 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -60 0.6666667 0.102856122 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -53 0.5888889 0.0462610424 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.124908321 0.8125 0 0 0.5050505 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -39 0.433333337 0.118024796 0.625 0 0.453856736 0.6060606 Federal-gov Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -23 0.25555557 0.117094643 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -50 0.5555556 0.10933283 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male ? 1 -36 0.4 0.0346358381 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.0831249356 0.5 0.010550105 0 0.4040404 Private 12th Separated Prof-specialty Own-child White Female United-States 0 -26 0.2888889 0.176907867 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -38 0.422222227 0.1570642 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 1 -41 0.455555558 0.195769534 0.8125 0.07688077 0 0.5555556 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.101774432 0.625 0 0 0.181818187 Private Some-college Never-married Sales Other-relative White Female United-States 0 -38 0.422222227 0.120641477 0.75 0.105201051 0 0.5050505 Private Assoc-acdm Never-married Machine-op-inspct Not-in-family Black Female United-States 1 -72 0.8 0.0226361472 0.625 0.09386094 0 0.3030303 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -39 0.433333337 0.21380274 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.08524859 0.5625 0.07298073 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.502300441 0.625 0 0 0.454545468 Local-gov Some-college Divorced Exec-managerial Unmarried Black Female United-States 0 -19 0.211111113 0.0470982455 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 -26 0.2888889 0.203813553 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -52 0.5777778 0.0315133333 0.8125 0 0 0.25252524 Private Bachelors Divorced Craft-repair Unmarried White Male United-States 0 -41 0.455555558 0.195248216 0.1875 0 0.3624885 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband Other Male Nicaragua 0 -45 0.5 0.1206536 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -58 0.644444466 0.118456528 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -34 0.377777785 0.0386783928 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -36 0.4 0.2102815 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.232273757 0.5625 0 0 0.2020202 Without-pay HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -26 0.2888889 0.119239181 0.4375 0 0 0.4040404 State-gov 11th Divorced Other-service Unmarried White Female United-States 0 -60 0.6666667 0.05930808 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.074826315 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -39 0.433333337 0.129487678 0.375 0 0 0.6060606 Private 10th Divorced Other-service Not-in-family White Female United-States 0 -27 0.3 0.020076042 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Unmarried White Female Japan 0 -26 0.2888889 0.142517209 0.875 0 0 0.4040404 Federal-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -17 0.188888893 0.180693135 0.5 0 0 0.121212125 Private 12th Never-married Other-service Own-child White Male United-States 0 -59 0.655555546 0.121956892 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male England 1 -53 0.5888889 0.0139259994 0.5625 0 0 0.4848485 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 -35 0.3888889 0.07799731 0.4375 0 0 0.4040404 Private 11th Divorced Transport-moving Not-in-family White Male United-States 0 -34 0.377777785 0.08407529 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.0642120838 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -36 0.4 0.173732832 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.0488938875 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -29 0.322222233 0.0992385745 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -35 0.3888889 0.12482278 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -59 0.655555546 0.24108696 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.145075962 0.625 0 0.3677686 0.1010101 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -50 0.5555556 0.0206653848 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -24 0.266666681 0.0199305583 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family Other Female United-States 0 -36 0.4 0.145073935 0.8125 0 0 0.4040404 Private Bachelors Divorced Tech-support Not-in-family White Female United-States 0 -31 0.344444454 0.07446193 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 -42 0.466666669 0.08997343 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male El-Salvador 0 -38 0.422222227 0.141737252 0.25 0 0 0.4040404 Private 7th-8th Divorced Sales Unmarried White Female United-States 0 -52 0.5777778 0.173041791 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -46 0.51111114 0.0495324 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.07405646 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.133343 0.1875 0 0 0.5151515 Private 5th-6th Married-civ-spouse Sales Husband White Male United-States 0 -27 0.3 0.2705743 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 -42 0.466666669 0.120915607 0.8125 0 0 0.5050505 Private Bachelors Separated Other-service Not-in-family White Female United-States 0 -33 0.366666675 0.199556142 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.0982309654 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Female United-States 0 -59 0.655555546 0.129295051 0.4375 0.03908039 0 0.282828271 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 -54 0.6 0.06519275 0.5625 0 0 0.323232323 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -48 0.533333361 0.124631494 0.25 0 0.3838384 0.5555556 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.157458216 0.625 0 0 0.6060606 ? Some-college Never-married ? Own-child White Male United-States 0 -45 0.5 0.2342782 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.14506115 0.8125 0 0 0.7070707 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -35 0.3888889 0.114114255 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.1366305 0.625 0 0 0.363636374 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -33 0.366666675 0.03386262 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -48 0.533333361 0.126256734 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -42 0.466666669 0.08493135 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Female United-States 0 -19 0.211111113 0.168814 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Male United-States 0 -64 0.7111111 0.131585732 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -51 0.566666663 0.12584655 0.8125 0 0 0.08080808 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -20 0.222222224 0.08025567 0.5625 0 0 0.2020202 Federal-gov HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 -28 0.311111122 0.109343611 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male Puerto-Rico 0 -52 0.5777778 0.07303471 0.875 0 0.43663913 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male Greece 1 -29 0.322222233 0.265996963 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -51 0.566666663 0.1160372 0.8125 0 0 0.4040404 Private Bachelors Separated Sales Not-in-family White Male United-States 0 -36 0.4 0.249724358 0.5625 0 0.5456841 0.6060606 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -43 0.477777779 0.2370875 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -52 0.5777778 0.111591868 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -50 0.5555556 0.174323529 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 -25 0.2777778 0.08809359 0.625 0 0 0.3030303 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -36 0.4 0.0800893158 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Unmarried Black Female Jamaica 0 -44 0.4888889 0.136367828 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -47 0.5222222 0.108814888 0.375 0 0 0.454545468 Private 10th Married-spouse-absent Transport-moving Not-in-family Black Male United-States 0 -32 0.355555564 0.126790166 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 -37 0.411111116 0.107846342 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Unmarried Asian-Pac-Islander Male South 0 -40 0.444444448 0.09738904 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -34 0.377777785 0.08313369 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.229075819 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -26 0.2888889 0.352303654 0.625 0 0 0.0303030312 Private Some-college Never-married Prof-specialty Own-child White Male El-Salvador 0 -49 0.544444442 0.07645492 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -63 0.7 0.1258223 0.8125 0 0 0.3030303 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -46 0.51111114 0.21581459 0.8125 0 0 0.25252524 Self-emp-not-inc Bachelors Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 -31 0.344444454 0.199089378 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Own-child Black Male United-States 0 -22 0.244444445 0.249576852 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -20 0.222222224 0.0812094 0.625 0 0 0.121212125 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -52 0.5777778 0.07474684 1 0 0 0.4040404 Private Doctorate Never-married Exec-managerial Not-in-family White Male United-States 1 -26 0.2888889 0.0376236364 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 -34 0.377777785 0.106957279 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.08861559 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -46 0.51111114 0.116934344 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -22 0.244444445 0.146067411 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -38 0.422222227 0.0701075345 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 -35 0.3888889 0.140166566 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male Ecuador 0 -27 0.3 0.2291829 0.625 0 0 0.4040404 State-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 0 -27 0.3 0.15911983 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 -46 0.51111114 0.143737644 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female Cuba 0 -40 0.444444448 0.0567331575 0.5625 0 0 0.04040404 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -19 0.211111113 0.20404391 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Male Thailand 0 -69 0.7666667 0.018991651 0.5625 0 0 0.6060606 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -20 0.222222224 0.176970512 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 -34 0.377777785 0.133538321 0.8125 0 0 0.6060606 Federal-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 -49 0.544444442 0.115087509 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.119728163 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Farming-fishing Husband Other Male United-States 0 -59 0.655555546 0.1183326 0.625 0 0 0.141414136 Private Some-college Married-civ-spouse Adm-clerical Wife White Female Cuba 1 -45 0.5 0.13814193 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.05237337 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 -51 0.566666663 0.0524717048 0.6875 0 0 0.4040404 State-gov Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -64 0.7111111 0.130379438 0.4375 0 0 0.4040404 ? 11th Never-married ? Unmarried White Male United-States 0 -41 0.455555558 0.0784802362 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.0573541559 0.5 0 0 0.24242425 ? 12th Never-married ? Own-child Asian-Pac-Islander Female Germany 0 -49 0.544444442 0.121594526 0.875 0 0 0.4040404 Private Masters Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 -51 0.566666663 0.342755646 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child Black Male United-States 0 -20 0.222222224 0.14234814 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 -69 0.7666667 0.115091555 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -18 0.2 0.06554703 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Own-child White Female United-States 0 -43 0.477777779 0.124001063 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -50 0.5555556 0.101663969 0.5625 0 0 0.444444448 Private HS-grad Divorced Machine-op-inspct Unmarried Black Female United-States 0 -32 0.355555564 0.204715416 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.184500635 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -38 0.422222227 0.132738158 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -62 0.6888889 0.109668255 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -46 0.51111114 0.107677288 0.5625 0 0 0.444444448 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -19 0.211111113 0.106649473 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Female ? 0 -17 0.188888893 0.274074644 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 -21 0.233333334 0.153556436 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Female United-States 0 -36 0.4 0.09262918 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.121337235 0.5 0 0 0.4040404 Private 12th Divorced Handlers-cleaners Not-in-family White Male United-States 0 -23 0.25555557 0.161337778 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Asian-Pac-Islander Male Philippines 0 -58 0.644444466 0.189796627 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.151409879 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -64 0.7111111 0.197102457 0.625 0.105661057 0 0.353535354 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -66 0.733333349 0.0150285754 0.4375 0 0 0.2020202 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.131094053 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -55 0.6111111 0.105131328 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 -53 0.5888889 0.1304771 0.625 0 0.453856736 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.147279769 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -39 0.433333337 0.2416891 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Unmarried Black Female United-States 0 -20 0.222222224 0.117656372 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -32 0.355555564 0.113728993 0.5625 0 0 0.545454562 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -28 0.311111122 0.0900488645 0.8125 0 0 0.656565666 Private Bachelors Never-married Sales Unmarried White Male United-States 0 -23 0.25555557 0.236195073 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Exec-managerial Own-child White Female Poland 0 -18 0.2 0.07760128 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -43 0.477777779 0.103022486 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.146291688 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.158364117 0.625 0 0 0.464646459 Private Some-college Married-civ-spouse Protective-serv Husband White Male Dominican-Republic 0 -31 0.344444454 0.0976281539 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -60 0.6666667 0.0912437141 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -42 0.466666669 0.189403966 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -46 0.51111114 0.1047272 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.1955311 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.122611567 0.4375 0 0 0.1919192 Private 11th Never-married Other-service Own-child White Female United-States 0 -31 0.344444454 0.141447634 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -54 0.6 0.158238843 0.5625 0.0406404063 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.212448269 0.625 0 0.4687787 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -27 0.3 0.0203703772 0.5625 0 0 0.8080808 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -50 0.5555556 0.0202114228 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.135601357 0.25 0 0 0.565656543 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -36 0.4 0.0649745241 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Own-child White Female United-States 0 -25 0.2777778 0.327561378 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male Mexico 0 -19 0.211111113 0.0310917 0.5625 0 0 0.25252524 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -60 0.6666667 0.06624211 0.625 0 0 0.6060606 Local-gov Some-college Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 0 -45 0.5 0.118513778 0.3125 0 0 0.4040404 Local-gov 9th Never-married Other-service Own-child White Male United-States 0 -21 0.233333334 0.08035873 0.625 0 0.3677686 0.161616161 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -42 0.466666669 0.118498288 0.5625 0 0.454545438 0.464646459 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -38 0.422222227 0.13775599 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.03894848 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -19 0.211111113 0.281655967 0.5625 0 0 0.323232323 Private HS-grad Never-married Exec-managerial Not-in-family Black Male United-States 0 -23 0.25555557 0.176967144 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -24 0.266666681 0.119408906 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 -30 0.333333343 0.171753988 0.75 0 0 0.5252525 Private Assoc-acdm Divorced Sales Not-in-family White Male United-States 0 -62 0.6888889 0.123751856 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.214617729 0.9375 0 0 0.2020202 Self-emp-not-inc Prof-school Never-married Prof-specialty Own-child White Male United-States 0 -42 0.466666669 0.08899074 0.8125 0 0 0.5252525 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.138782457 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.06680452 1 0 0 0.5050505 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 -35 0.3888889 0.1520504 0.8125 0 0 0.323232323 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -33 0.366666675 0.16553928 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -45 0.5 0.113889292 0.5625 0 0 0.5555556 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -62 0.6888889 0.142139345 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -24 0.266666681 0.1922483 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 -50 0.5555556 0.104248993 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 -54 0.6 0.0250804033 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -58 0.644444466 0.281146079 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Own-child White Male United-States 0 -39 0.433333337 0.0228833333 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.0286151133 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -27 0.3 0.114512309 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -27 0.3 0.102837265 0.5625 0.03908039 0 0.353535354 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.0281005315 0.625 0 0 0.6060606 Private Some-college Never-married Other-service Own-child White Male United-States 0 -64 0.7111111 0.044880297 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.17324385 0.875 0 0 0.4040404 Self-emp-inc Masters Widowed Sales Not-in-family White Female United-States 0 -46 0.51111114 0.113074318 0.5625 0 0 0.434343427 Private HS-grad Divorced Tech-support Not-in-family White Female United-States 0 -45 0.5 0.120850943 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -26 0.2888889 0.0387363136 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -36 0.4 0.203147426 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.130544454 0.8125 0 0.430670351 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -58 0.644444466 0.149691015 0.375 0 0.4331956 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 -39 0.433333337 0.127359986 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.146499813 0.5625 0 0 0.454545468 Private HS-grad Widowed Priv-house-serv Not-in-family Asian-Pac-Islander Female Thailand 0 -35 0.3888889 0.207914039 0.875 0 0 0.4848485 Private Masters Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.114279941 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -50 0.5555556 0.08143975 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.249312833 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.2682149 0.1875 0 0 0.4040404 Private 5th-6th Never-married Craft-repair Other-relative White Male Mexico 0 -44 0.4888889 0.140281737 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -40 0.444444448 0.227288261 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Unmarried White Female United-States 0 -55 0.6111111 0.116296507 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.0217416938 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -33 0.366666675 0.131272539 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.03861306 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female Japan 0 -32 0.355555564 0.117013149 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.103260919 0.875 0 0 0.1010101 Local-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -23 0.25555557 0.185085252 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -31 0.344444454 0.24196659 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Protective-serv Own-child Black Male United-States 0 -22 0.244444445 0.102878354 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Female Philippines 0 -59 0.655555546 0.126652092 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family Black Male United-States 0 -32 0.355555564 0.06581981 0.625 0 0 0.3838384 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -49 0.544444442 0.2387875 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.168199748 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -26 0.2888889 0.1276954 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -23 0.25555557 0.201299921 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Vietnam 0 -55 0.6111111 0.138273939 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Wife White Female United-States 0 -47 0.5222222 0.204509988 0.5625 0 0 0.4949495 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.163575262 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -27 0.3 0.0253242236 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -40 0.444444448 0.13428998 0.875 0.1502415 0 0.373737365 State-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -32 0.355555564 0.0379388519 0.8125 0 0 0.08080808 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -20 0.222222224 0.17256695 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Other-relative Asian-Pac-Islander Male Vietnam 0 -84 0.933333337 0.110247493 0.5625 0 0 0.333333343 Local-gov HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 -40 0.444444448 0.179216757 0.625 0 0 0.5050505 Private Some-college Divorced Craft-repair Other-relative White Male United-States 0 -37 0.411111116 0.108513817 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -44 0.4888889 0.134054244 0.625 0 0.3168044 0.4040404 Private Some-college Divorced Transport-moving Own-child White Male United-States 0 -47 0.5222222 0.112233743 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female Germany 0 -62 0.6888889 0.13745828 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -19 0.211111113 0.248889178 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -47 0.5222222 0.3131565 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -44 0.4888889 0.1176557 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Craft-repair Unmarried Black Male United-States 0 -26 0.2888889 0.11200542 0.8125 0 0 0.414141417 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -36 0.4 0.148521766 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.1663199 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 -33 0.366666675 0.07039042 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -48 0.533333361 0.179387152 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -33 0.366666675 0.169843838 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -25 0.2777778 0.062027812 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -62 0.6888889 0.05930808 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.0872840062 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.09612617 0.5625 0 0 0.656565666 Private HS-grad Married-spouse-absent Farming-fishing Not-in-family White Male United-States 0 -18 0.2 0.178435445 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -46 0.51111114 0.08674855 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.07768277 0.5625 0 0 0.7070707 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -52 0.5777778 0.128195837 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -63 0.7 0.120861724 0.25 0 0 0.151515156 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -49 0.544444442 0.147285834 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -17 0.188888893 0.09981377 0.4375 0 0 0.121212125 Local-gov 11th Never-married Adm-clerical Own-child White Female United-States 0 -33 0.366666675 0.1244914 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -70 0.7777778 0.189020038 0.5625 0.0232902318 0 0.2020202 Self-emp-not-inc HS-grad Widowed Other-service Other-relative White Female United-States 0 -19 0.211111113 0.146674931 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 -27 0.3 0.121608675 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 1 -61 0.677777767 0.037723992 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.171976253 0.8125 0 0 0.25252524 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.221064791 0.8125 0 0.43663913 0.424242437 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male ? 1 -29 0.322222233 0.235167265 0.375 0 0 0.4040404 Private 10th Separated Farming-fishing Unmarried White Female Guatemala 0 -40 0.444444448 0.0166787338 0.625 0.068490684 0 0.4040404 Local-gov Some-college Divorced Transport-moving Unmarried White Male United-States 0 -43 0.477777779 0.0281766411 0.5625 0 0 0.3838384 State-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -24 0.266666681 0.076423265 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -29 0.322222233 0.08813603 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -61 0.677777767 0.181044042 0.5625 0 0 0.171717167 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 -48 0.533333361 0.136132777 0.4375 0 0 0.343434334 Private 11th Divorced Other-service Not-in-family White Female United-States 0 -19 0.211111113 0.188688 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -30 0.333333343 0.0474013351 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 -24 0.266666681 0.159422919 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -39 0.433333337 0.149909914 0.875 0 0 0.434343427 Local-gov Masters Never-married Prof-specialty Unmarried White Female United-States 0 -46 0.51111114 0.07456162 0.625 0.0203602035 0 0.6060606 Self-emp-inc Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -40 0.444444448 0.06474619 0.5625 0 0 0.727272749 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.135038272 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -25 0.2777778 0.130544454 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Own-child White Female United-States 0 -31 0.344444454 0.3061268 0.4375 0 0.459366381 0.4040404 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 -58 0.644444466 0.148709 0.8125 0 0 0.454545468 Private Bachelors Divorced Transport-moving Not-in-family White Male United-States 0 -33 0.366666675 0.06825935 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female Canada 1 -40 0.444444448 0.09467133 0.5625 0 0 0.25252524 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -40 0.444444448 0.0437022857 0.875 0 0 0.7070707 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.271004021 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.096707426 0.5625 0 0 0.4848485 Private HS-grad Separated Other-service Unmarried Asian-Pac-Islander Female China 0 -49 0.544444442 0.124863192 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.07591138 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Own-child White Male United-States 0 -46 0.51111114 0.08780465 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -58 0.644444466 0.0992978439 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.138677388 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -65 0.722222269 0.184258163 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Unmarried White Male United-States 0 -43 0.477777779 0.103158541 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -48 0.533333361 0.113098562 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Sales Husband Asian-Pac-Islander Male India 0 -41 0.455555558 0.131784424 0.625 0 0 0.545454562 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -27 0.3 0.0984997 0.625 0 0 0.3030303 State-gov Some-college Separated Other-service Not-in-family White Female United-States 0 -52 0.5777778 0.0710094 0.625 0 0 0.121212125 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -26 0.2888889 0.100991778 0.5625 0 0 0.6060606 Private HS-grad Never-married Other-service Other-relative Asian-Pac-Islander Male ? 0 -52 0.5777778 0.165822163 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.129697815 0.625 0 0 0.3838384 Local-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -19 0.211111113 0.164419875 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -39 0.433333337 0.06640174 0.625 0 0 0.454545468 Local-gov Some-college Divorced Prof-specialty Own-child White Female United-States 0 -47 0.5222222 0.0982592553 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -27 0.3 0.164554581 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative Other Male United-States 0 -48 0.533333361 0.12984331 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -50 0.5555556 0.141081229 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Unmarried White Female United-States 0 -60 0.6666667 0.0169333313 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -28 0.311111122 0.273315579 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -47 0.5222222 0.0360327475 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Other-service Unmarried Black Female United-States 0 -69 0.7666667 0.32104224 0.8125 0 0 0.2020202 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -40 0.444444448 0.109322727 0.5625 0 0 0.6666667 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male South 0 -37 0.411111116 0.186583877 0.5625 0.0388703868 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried White Female Nicaragua 0 -41 0.455555558 0.07392849 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -38 0.422222227 0.08286562 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Trinadad&Tobago 0 -46 0.51111114 0.08075005 0.6875 0 0 0.3030303 Federal-gov Assoc-voc Separated Tech-support Not-in-family Other Female United-States 0 -21 0.233333334 0.2756305 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Never-married Adm-clerical Own-child White Male United-States 0 -44 0.4888889 0.150405645 0.875 0 0 0.4848485 Private Masters Separated Sales Unmarried White Female United-States 0 -38 0.422222227 0.08698698 0.375 0 0 0.353535354 ? 10th Separated ? Own-child White Male United-States 0 -47 0.5222222 0.08028464 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -42 0.466666669 0.031131437 1 0.2782828 0 0.6060606 Private Doctorate Married-spouse-absent Other-service Not-in-family White Male ? 1 -42 0.466666669 0.236519039 0.625 0 0 0.4040404 Local-gov Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -56 0.622222245 0.117553994 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 -32 0.355555564 0.218485162 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -24 0.266666681 0.08524791 0.8125 0 0 0.333333343 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 -26 0.2888889 0.185695484 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.147915587 0.8125 0.0217402168 0 0.5050505 Self-emp-not-inc Bachelors Never-married Sales Not-in-family Black Female United-States 0 -49 0.544444442 0.13502413 0.4375 0 0 0.6060606 Private 11th Never-married Other-service Not-in-family White Male United-States 0 -65 0.722222269 0.104573637 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -73 0.811111152 0.0498684943 0.25 0 0 0.4040404 State-gov 7th-8th Divorced Other-service Not-in-family Asian-Pac-Islander Female United-States 0 -34 0.377777785 0.152418166 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -22 0.244444445 0.142767757 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -49 0.544444442 0.08516574 0.625 0 0 0.3030303 Local-gov Some-college Never-married Other-service Unmarried White Female United-States 0 -25 0.2777778 0.177062109 0.4375 0 0 0.323232323 Private 11th Never-married Other-service Unmarried Black Female United-States 0 -39 0.433333337 0.126670957 0.3125 0 0 0.25252524 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.07647715 0.4375 0 0 0.565656543 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 -24 0.266666681 0.152939469 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -34 0.377777785 0.09227221 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -35 0.3888889 0.08015464 0.5625 0 0 0.3838384 ? HS-grad Widowed ? Own-child White Female United-States 0 -21 0.233333334 0.143063441 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 -43 0.477777779 0.133231863 0.875 0 0 0.4040404 Private Masters Divorced Other-service Unmarried White Female United-States 0 -35 0.3888889 0.0237818286 0.8125 0 0 0.282828271 Federal-gov Bachelors Never-married Tech-support Not-in-family Asian-Pac-Islander Male ? 0 -39 0.433333337 0.09550854 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -48 0.533333361 0.124275871 0.8125 0 0 0.8080808 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -33 0.366666675 0.0836442262 0.75 0 0 0.323232323 Self-emp-not-inc Assoc-acdm Never-married Other-service Not-in-family Black Male United-States 0 -19 0.211111113 0.135880873 0.625 0 0 0.262626261 Private Some-college Never-married Other-service Own-child White Female United-States 0 -17 0.188888893 0.1055671 0.375 0 0 0.121212125 Private 10th Never-married Sales Unmarried White Female United-States 0 -43 0.477777779 0.0318319127 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -62 0.6888889 0.101496935 0.5625 0 0 0.424242437 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -53 0.5888889 0.1574279 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family Black Female United-States 1 -45 0.5 0.0242263619 0.875 0 0 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.107462429 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family Black Female United-States 0 -30 0.333333343 0.128525868 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Female United-States 0 -53 0.5888889 0.143717438 0.5625 0 0 0.333333343 Private HS-grad Separated Sales Not-in-family White Female United-States 0 -24 0.266666681 0.173435137 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Own-child Black Female United-States 0 -41 0.455555558 0.329160333 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -58 0.644444466 0.161247522 0.1875 0 0 0.4040404 Local-gov 5th-6th Divorced Other-service Other-relative Black Female Haiti 0 -27 0.3 0.07084842 0.5625 0.0486504845 0 0.5050505 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -63 0.7 0.0739103 0.5625 0 0 0.3838384 State-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -50 0.5555556 0.1164824 0.625 0 0 0.282828271 Private Some-college Divorced Other-service Own-child White Male United-States 0 -43 0.477777779 0.141374215 0.875 0.0861408561 0 0.474747479 Local-gov Masters Never-married Tech-support Not-in-family Black Female United-States 1 -29 0.322222233 0.0590992831 0.625 0 0 0.6060606 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -41 0.455555558 0.126544327 0.625 0.0394203924 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -55 0.6111111 0.157691255 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -36 0.4 0.18383719 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -23 0.25555557 0.08704221 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -22 0.244444445 0.06758582 0.8125 0.135501355 0 0.5555556 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 1 -58 0.644444466 0.131901622 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -25 0.2777778 0.16963236 0.4375 0 0 0.4040404 Private 11th Never-married Adm-clerical Own-child Black Female United-States 0 -40 0.444444448 0.0696933046 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -38 0.422222227 0.0148460474 0.6875 0 0 0.3939394 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.231507942 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.156507865 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 -55 0.6111111 0.11751695 0.375 0 0 0.2929293 Private 10th Never-married Other-service Not-in-family White Male United-States 0 -55 0.6111111 0.18995221 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.18501319 0.8125 0 0 0.454545468 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -53 0.5888889 0.1695118 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male El-Salvador 0 -32 0.355555564 0.436370879 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male ? 0 -60 0.6666667 0.0864596 0.625 0.0332503319 0 0.424242437 Private Some-college Divorced Prof-specialty Unmarried White Male United-States 0 -32 0.355555564 0.0251767188 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.117013149 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -49 0.544444442 0.238312662 0.625 0 0 0.454545468 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 1 -21 0.233333334 0.1521447 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Other-relative White Female United-States 0 -24 0.266666681 0.09910858 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 -53 0.5888889 0.157458887 0.6875 0.0220202189 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Not-in-family Black Female United-States 0 -29 0.322222233 0.265996963 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male ? 0 -34 0.377777785 0.127083838 0.8125 0 0 0.4040404 Local-gov Bachelors Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 -52 0.5777778 0.07759724 0.9375 0 0 0.4040404 ? Prof-school Married-spouse-absent ? Unmarried Asian-Pac-Islander Female Vietnam 0 -41 0.455555558 0.186698377 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Wife White Female Mexico 0 -21 0.233333334 0.211612418 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -43 0.477777779 0.148700252 0.875 0 0 0.353535354 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.1274792 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Own-child White Male United-States 0 -38 0.422222227 0.0238626525 0.5625 0 0.4687787 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -42 0.466666669 0.103976212 0.8125 0 0.5544077 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.108748876 0.8125 0 0 0.3030303 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 -51 0.566666663 0.169385165 0.25 0 0 0.4040404 Private 7th-8th Widowed Machine-op-inspct Not-in-family Amer-Indian-Eskimo Female United-States 0 -30 0.333333343 0.11957325 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 -24 0.266666681 0.0363318 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -36 0.4 0.07643337 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -57 0.6333333 0.24336417 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.222324982 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.186044365 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -42 0.466666669 0.08153472 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -62 0.6888889 0.07994585 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -64 0.7111111 0.195150554 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -18 0.2 0.160571292 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 -43 0.477777779 0.176491633 0.1875 0 0 0.353535354 Private 5th-6th Married-spouse-absent Farming-fishing Unmarried White Male Mexico 0 -62 0.6888889 0.0181254875 0.25 0 0 0.6666667 Self-emp-not-inc 7th-8th Widowed Other-service Not-in-family White Female United-States 0 -29 0.322222233 0.108543448 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -43 0.477777779 0.170080259 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband Black Male Haiti 1 -39 0.433333337 0.02944154 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -69 0.7666667 0.113036595 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -34 0.377777785 0.127230659 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 -44 0.4888889 0.08086253 0.75 0.04386044 0 0.454545468 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.09032973 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -47 0.5222222 0.111686833 0.625 0 0 0.4040404 Local-gov Some-college Divorced Transport-moving Unmarried White Male United-States 0 -17 0.188888893 0.06678835 0.375 0 0 0.08080808 Private 10th Never-married Other-service Own-child White Male United-States 0 -41 0.455555558 0.0502328761 0.8125 0 0 0.656565666 Local-gov Bachelors Divorced Prof-specialty Unmarried White Male United-States 0 -19 0.211111113 0.205187574 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 -57 0.6333333 0.0820506439 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Other-service Husband Other Male Dominican-Republic 0 -25 0.2777778 0.104305573 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried Black Male United-States 0 -37 0.411111116 0.2461297 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Husband White Male Canada 1 -29 0.322222233 0.123331577 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -32 0.355555564 0.0337966122 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 -35 0.3888889 0.12584655 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.107703552 0.5 0 0 0.4040404 Private 12th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -41 0.455555558 0.109239884 0.5625 0.0183101818 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female Peru 0 -29 0.322222233 0.08655524 0.5625 0 0 0.3838384 Private HS-grad Married-spouse-absent Machine-op-inspct Not-in-family White Female El-Salvador 0 -23 0.25555557 0.09633698 0.875 0 0 0.363636374 Private Masters Never-married Prof-specialty Own-child White Female United-States 0 -31 0.344444454 0.257538021 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.141451 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.197970644 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -21 0.233333334 0.140433967 0.625 0 0 0.1010101 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -37 0.411111116 0.12921153 0.8125 0.0861408561 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 1 -49 0.544444442 0.239763454 0.9375 1 0 0.353535354 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -64 0.7111111 0.136551037 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -37 0.411111116 0.09720585 0.6875 0 0 0.434343427 Local-gov Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -70 0.7777778 0.104492813 0.8125 0 0.5456841 0.121212125 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.107846342 0.375 0 0 0.3030303 Private 10th Never-married Transport-moving Own-child Asian-Pac-Islander Male United-States 0 -29 0.322222233 0.128274649 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male Germany 0 -37 0.411111116 0.1433955 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.07791245 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -38 0.422222227 0.169899076 0.4375 0 0 0.656565666 Private 11th Divorced Machine-op-inspct Not-in-family White Male United-States 0 -27 0.3 0.142816931 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -58 0.644444466 0.1334575 0.8125 0 0 0.353535354 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -60 0.6666667 0.0765525848 0.625 0 0 0.353535354 Local-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -20 0.222222224 0.0218400285 0.625 0 0 0.25252524 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -51 0.566666663 0.066539146 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.137285188 0.3125 0 0 0.656565666 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -22 0.244444445 0.125704437 0.5 0 0 0.5050505 State-gov 12th Never-married Exec-managerial Not-in-family White Male United-States 1 -56 0.622222245 0.08429082 0.375 0 0 0.6060606 Self-emp-not-inc 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -26 0.2888889 0.166669473 0.8125 0.05178052 0 0.424242437 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 -19 0.211111113 0.0654776543 0.625 0 0 0.25252524 Private Some-college Separated Sales Unmarried White Female United-States 0 -37 0.411111116 0.222822726 0.6875 0 0 0.3030303 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 0 -27 0.3 0.135247067 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -27 0.3 0.105250537 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child Amer-Indian-Eskimo Male United-States 0 -52 0.5777778 0.04866758 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -45 0.5 0.244551614 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried Black Female United-States 0 -28 0.311111122 0.0174815878 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child Amer-Indian-Eskimo Male United-States 0 -20 0.222222224 0.225386873 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.07352437 0.875 0 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -44 0.4888889 0.3837537 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -30 0.333333343 0.141374886 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.183865488 0.75 0 0 0.08080808 State-gov Assoc-acdm Never-married Adm-clerical Own-child Black Female United-States 0 -55 0.6111111 0.03520363 0.875 0 0 0.181818187 ? Masters Married-civ-spouse ? Husband White Male United-States 0 -46 0.51111114 0.05586699 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -51 0.566666663 0.07048606 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.03936203 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -43 0.477777779 0.18167448 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Other-service Not-in-family White Male United-States 0 -19 0.211111113 0.08651753 0.5625 0 0 0.282828271 ? HS-grad Never-married ? Own-child White Female United-States 0 -36 0.4 0.120877884 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.123311371 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -48 0.533333361 0.0693322942 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Unmarried Asian-Pac-Islander Female Vietnam 0 -30 0.333333343 0.105939567 0.4375 0 0 0.4040404 ? 11th Never-married ? Unmarried White Male United-States 0 -24 0.266666681 0.242356569 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.1048417 0.5625 0 0 0.363636374 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -24 0.266666681 0.3941544 0.8125 0.07688077 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -62 0.6888889 0.11692626 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -41 0.455555558 0.144500762 0.5625 0 0.365013778 0.4040404 Self-emp-not-inc HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -49 0.544444442 0.110023208 0.9375 0 0 0.858585835 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.103708148 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -47 0.5222222 0.166818321 0.875 0.0545505434 0 0.454545468 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -49 0.544444442 0.104648404 0.875 0 0 0.4040404 State-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -52 0.5777778 0.222086549 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -52 0.5777778 0.109500542 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -26 0.2888889 0.118892305 0.5625 0 0 0.535353541 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -51 0.566666663 0.152814865 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -18 0.2 0.08135017 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Male United-States 0 -30 0.333333343 0.253132433 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -46 0.51111114 0.138414025 0.5625 0 0 0.2020202 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -28 0.311111122 0.133907408 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Female United-States 0 -48 0.533333361 0.171273753 0.8125 0.07298073 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.107703552 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -49 0.544444442 0.02694138 0.8125 0.0406404063 0 0.444444448 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -69 0.7666667 0.0692891851 0.5625 0 0 0.24242425 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.07906015 0.8125 0.0861408561 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -78 0.8666667 0.121397182 0.875 0 0 0.4040404 Private Masters Widowed Craft-repair Unmarried Asian-Pac-Islander Male South 0 -61 0.677777767 0.3634143 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.176170349 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -29 0.322222233 0.0545946844 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -36 0.4 0.107846342 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband Other Male ? 0 -17 0.188888893 0.0282743033 0.375 0 0 0.4040404 Private 10th Never-married Farming-fishing Own-child White Male United-States 0 -27 0.3 0.185296074 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 -64 0.7111111 0.178931847 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.130157843 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Never-married Exec-managerial Not-in-family White Male France 0 -32 0.355555564 0.159319863 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Other-relative White Male Mexico 0 -19 0.211111113 0.0198760033 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -42 0.466666669 0.07126264 0.4375 0 0 0.4040404 State-gov 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -24 0.266666681 0.1310725 0.8125 0 0 0.151515156 Private Bachelors Never-married Sales Own-child White Female United-States 0 -23 0.25555557 0.6995013 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family Black Male United-States 0 -51 0.566666663 0.140984237 0.9375 0.0332503319 0 0.4040404 Local-gov Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 -31 0.344444454 0.13014774 0.8125 0.0332503319 0 0.6060606 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -44 0.4888889 0.2070903 0.9375 0 0 0.2929293 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.1723851 0.875 0.105201051 0 0.5050505 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 -44 0.4888889 0.07263733 0.75 0 0 0.565656543 Local-gov Assoc-acdm Divorced Protective-serv Not-in-family White Female United-States 1 -44 0.4888889 0.3824248 0.1875 0 0 0.4040404 Self-emp-not-inc 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -38 0.422222227 0.0618688576 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.4934105 0.3125 0 0 0.4040404 Private 9th Divorced Adm-clerical Unmarried White Female United-States 0 -29 0.322222233 0.0583368428 0.125 0 0 0.2020202 Private 1st-4th Never-married Other-service Not-in-family White Male El-Salvador 0 -46 0.51111114 0.0242209733 0.75 0 0 0.25252524 Private Assoc-acdm Divorced Sales Not-in-family White Female Germany 0 -47 0.5222222 0.07729077 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -30 0.333333343 0.158364117 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -37 0.411111116 0.147160545 0.5625 0.07688077 0 0.353535354 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -27 0.3 0.221879765 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -43 0.477777779 0.121919848 0.5625 0 0 0.5050505 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -44 0.4888889 0.178311527 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.256719679 0.625 0 0 0.6060606 Private Some-college Never-married Exec-managerial Unmarried White Male United-States 0 -34 0.377777785 0.127809227 0.8125 0 0.453856736 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.155227467 0.8125 0 0.2506887 0.4040404 Private Bachelors Never-married Sales Own-child White Male Germany 0 -36 0.4 0.147195578 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Female United-States 0 -57 0.6333333 0.201054752 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -78 0.8666667 0.07488962 0.25 0 0 0.353535354 Private 7th-8th Never-married Machine-op-inspct Not-in-family White Female Dominican-Republic 0 -24 0.266666681 0.113825306 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.113755934 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.100901529 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Own-child White Male United-States 0 -34 0.377777785 0.231745034 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Male United-States 1 -22 0.244444445 0.280301481 0.625 0 0 0.323232323 Private Some-college Never-married Sales Unmarried White Female United-States 0 -36 0.4 0.0279449467 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -61 0.677777767 0.02712256 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -67 0.7444445 0.1638413 0.3125 0 0 0.151515156 ? 9th Married-civ-spouse ? Husband White Male United-States 0 -42 0.466666669 0.168744639 0.625 0 0 0.212121218 Private Some-college Separated Other-service Unmarried Black Female Haiti 0 -49 0.544444442 0.0711158141 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 1 -58 0.644444466 0.0346863531 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.12788938 0.625 0 0 0.6060606 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -39 0.433333337 0.120886646 0.5625 0.046500463 0 0.444444448 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 -25 0.2777778 0.201902062 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Other-relative Black Female Jamaica 0 -45 0.5 0.104845069 0.1875 0 0 0.4040404 Self-emp-inc 5th-6th Married-civ-spouse Craft-repair Husband White Male ? 1 -30 0.333333343 0.0367803723 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -49 0.544444442 0.117667824 0.625 0 0 0.353535354 ? Some-college Never-married ? Not-in-family White Male United-States 0 -36 0.4 0.1919708 0.5625 0.0288502872 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.1354781 0.5625 0 0 0.656565666 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -51 0.566666663 0.08472794 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female Jamaica 0 -55 0.6111111 0.167758584 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.0667849854 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -45 0.5 0.06382009 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Adm-clerical Husband White Male India 0 -36 0.4 0.07484854 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.106342338 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.0499722175 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.113282442 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.0190839265 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.05676414 0.625 0.07688077 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male ? 1 -44 0.4888889 0.4857268 0.625 0 0 0.4040404 Private Some-college Separated Machine-op-inspct Not-in-family Black Male United-States 0 -36 0.4 0.126670957 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.09778239 0.625 0 0 0.3030303 Private Some-college Divorced Craft-repair Unmarried Black Female United-States 0 -17 0.188888893 0.0356751 0.375 0 0 0.0606060624 Private 10th Never-married Other-service Own-child White Female United-States 0 -18 0.2 0.119604908 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Own-child White Female United-States 0 -30 0.333333343 0.124862514 0.625 0 0 0.25252524 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -66 0.733333349 0.044458665 0.5625 0 0 0.5050505 Private HS-grad Widowed Priv-house-serv Not-in-family White Female England 0 -59 0.655555546 0.221632585 0.8125 0 0 0.5050505 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.234930173 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -50 0.5555556 0.0230571069 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -24 0.266666681 0.343252718 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.01882933 0.9375 0 0 1 Private Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 0 -44 0.4888889 0.056095995 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -25 0.2777778 0.208188161 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Male United-States 0 -45 0.5 0.127264336 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.151017889 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -67 0.7444445 0.150130168 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -40 0.444444448 0.08305085 0.9375 0 0 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.1881431 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -34 0.377777785 0.233828276 1 0 0 0.5050505 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 -37 0.411111116 0.169323877 0.75 0 0 0.454545468 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male Canada 1 -17 0.188888893 0.09633833 0.375 0 0 0.04040404 Self-emp-inc 10th Never-married Other-service Own-child White Male United-States 0 -25 0.2777778 0.03881916 0.6875 0 0 0.424242437 Private Assoc-voc Married-civ-spouse Sales Wife White Female United-States 1 -35 0.3888889 0.109551057 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male Puerto-Rico 0 -63 0.7 0.0190839265 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 1 -38 0.422222227 0.05696081 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Own-child Amer-Indian-Eskimo Female United-States 0 -33 0.366666675 0.121971034 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male Iran 1 -51 0.566666663 0.07913761 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -64 0.7111111 0.145591214 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male Columbia 1 -50 0.5555556 0.1377021 0.625 0 0 0.4040404 Self-emp-inc Some-college Divorced Protective-serv Not-in-family White Male United-States 0 -18 0.2 0.252554566 0.375 0 0 0.565656543 Private 10th Never-married Transport-moving Not-in-family White Male United-States 0 -67 0.7444445 0.02358381 0.875 0 0 1 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -46 0.51111114 0.121147975 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -60 0.6666667 0.0927679241 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -29 0.322222233 0.130076349 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -30 0.333333343 0.06981117 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Female United-States 0 -56 0.622222245 0.03654598 1 0.0288502872 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Not-in-family Asian-Pac-Islander Male China 0 -29 0.322222233 0.133314028 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Wife White Female Mexico 1 -37 0.411111116 0.168195039 0.8125 0 0 0.272727281 Private Bachelors Never-married Adm-clerical Unmarried Black Female United-States 0 -55 0.6111111 0.150611073 0.125 0 0 0.3030303 Private 1st-4th Divorced Priv-house-serv Unmarried White Female Cuba 0 -24 0.266666681 0.175028041 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.203201309 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male Mexico 0 -46 0.51111114 0.1865246 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -25 0.2777778 0.266390979 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Other-relative Other Male Mexico 0 -40 0.444444448 0.113201618 0.5625 0 0 0.282828271 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -23 0.25555557 0.0305225626 0.625 0 0 0.4040404 Private Some-college Separated Sales Own-child White Female United-States 0 -43 0.477777779 0.209588438 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Never-married Transport-moving Not-in-family Black Male United-States 0 -29 0.322222233 0.128399923 0.625 0 0.3409091 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 1 -59 0.655555546 0.14907743 0.375 0 0 0.4040404 Private 10th Widowed Other-service Other-relative Asian-Pac-Islander Female Philippines 0 -18 0.2 0.08128955 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child Black Male ? 0 -28 0.311111122 0.07233019 0.5625 0 0 0.323232323 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 -17 0.188888893 0.197641954 0.4375 0 0 0.151515156 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 -53 0.5888889 0.09793798 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -22 0.244444445 0.144070372 0.1875 0 0 0.4040404 Private 5th-6th Never-married Priv-house-serv Other-relative White Female El-Salvador 0 -63 0.7 0.067420125 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.129221633 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Sales Wife White Female United-States 1 -40 0.444444448 0.157533661 0.5625 0 0 0.353535354 Local-gov HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -61 0.677777767 0.06470848 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male England 1 -35 0.3888889 0.319346935 0.5625 0 0.323232323 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -43 0.477777779 0.239681289 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Philippines 0 -20 0.222222224 0.09745034 0.625 0 0.3677686 0.4040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Female Taiwan 0 -48 0.533333361 0.09376408 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -56 0.622222245 0.09694249 0.8125 0 0 0.4040404 State-gov Bachelors Widowed Prof-specialty Not-in-family White Female United-States 0 -51 0.566666663 0.10823901 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -34 0.377777785 0.128841087 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.04629135 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Sales Husband Asian-Pac-Islander Male United-States 1 -61 0.677777767 0.08081471 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 -37 0.411111116 0.153259411 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.0220757667 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.154159248 0.625 0 0 0.4040404 Private Some-college Separated Machine-op-inspct Not-in-family Other Male United-States 0 -23 0.25555557 0.0570133477 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 -63 0.7 0.0686978251 0.875 0 0 0.4040404 Federal-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 1 -63 0.7 0.0464428961 0.5625 0 0 0.111111112 ? HS-grad Widowed ? Not-in-family Black Female United-States 0 -47 0.5222222 0.191997737 0.875 0 0.453856736 0.414141417 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.14115195 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Divorced Sales Unmarried White Female United-States 1 -31 0.344444454 0.223024786 0.8125 0 0 0.4848485 Local-gov Bachelors Never-married Protective-serv Own-child Black Male United-States 0 -27 0.3 0.188503444 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -58 0.644444466 0.101407349 0.8125 0.14084141 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 1 -28 0.311111122 0.125039652 0.625 0 0 0.4848485 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -52 0.5777778 0.08679906 0.25 0 0 0.646464646 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Female United-States 0 -31 0.344444454 0.260207266 0.5625 0 0 0.5050505 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -53 0.5888889 0.07935179 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.148587763 0.625 0 0 0.5050505 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 -43 0.477777779 0.07881835 0.5625 0 0 0.4040404 Local-gov HS-grad Married-spouse-absent Farming-fishing Unmarried Black Male United-States 0 -50 0.5555556 0.119047895 0.875 0 0 0.8080808 Self-emp-inc Masters Divorced Exec-managerial Not-in-family White Male United-States 1 -68 0.75555557 0.051438503 0.5625 0 0 0.353535354 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -37 0.411111116 0.0541589074 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 -26 0.2888889 0.0856749341 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -22 0.244444445 0.08181491 0.4375 0 0 0.4040404 Private 11th Never-married Sales Not-in-family White Female United-States 0 -22 0.244444445 0.147561982 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -59 0.655555546 0.182912439 0.625 0.1502415 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.162714481 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -24 0.266666681 0.2520723 0.5625 0 0 0.5555556 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.1448052 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.134703532 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Protective-serv Not-in-family White Male United-States 1 -38 0.422222227 0.303712875 0.5 0.0394203924 0 0.4040404 Private 12th Married-civ-spouse Other-service Husband White Male United-States 0 -29 0.322222233 0.08106594 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -76 0.844444454 0.0627229 0.5625 0.014240142 0 0.24242425 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.126296476 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Unmarried White Male United-States 0 -65 0.722222269 0.164052129 0.625 0 0 0.24242425 Private Some-college Widowed Other-service Unmarried White Female United-States 0 -43 0.477777779 0.199036181 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.0200255271 0.8125 0 0 0.24242425 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -32 0.355555564 0.142616212 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -37 0.411111116 0.169323877 0.75 0 0 0.656565666 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -64 0.7111111 0.3217454 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -49 0.544444442 0.102097049 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.1305862 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -68 0.75555557 0.07916859 0.5625 0.01409014 0 0.151515156 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -34 0.377777785 0.163305178 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.277088732 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -53 0.5888889 0.128661931 0.625 0 0 0.434343427 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.1041089 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Sales Unmarried Asian-Pac-Islander Male South 0 -31 0.344444454 0.140537679 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -25 0.2777778 0.0199359469 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.28538397 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -29 0.322222233 0.08217121 0.625 0 0 0.6060606 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -37 0.411111116 0.100074425 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -42 0.466666669 0.15018338 1 0 0 0.454545468 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.100436114 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 -32 0.355555564 0.147104651 0.625 0 0 0.7070707 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Male Cuba 0 -47 0.5222222 0.07557057 0.8125 0.105201051 0 0.454545468 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family Black Male United-States 1 -44 0.4888889 0.0576572455 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 -19 0.211111113 0.07491859 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -22 0.244444445 0.0668139458 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -51 0.566666663 0.134703532 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 1 -69 0.7666667 0.08274371 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -73 0.811111152 0.06099326 0.4375 0 0 0.08080808 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -18 0.2 0.183157608 0.4375 0 0 0.2020202 ? 11th Never-married ? Other-relative White Female United-States 0 -33 0.366666675 0.2434807 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -22 0.244444445 0.268753737 0.625 0 0 0.5555556 Local-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -33 0.366666675 0.232555971 0.8125 0 0 0.454545468 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 1 -20 0.222222224 0.03720133 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Other-relative White Female United-States 0 -28 0.311111122 0.135053769 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.126704633 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 -27 0.3 0.1190021 0.5625 0 0 0.4848485 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -22 0.244444445 0.208242044 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -67 0.7444445 0.0269555245 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -31 0.344444454 0.03362486 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.0246749353 0.625 0 0 0.25252524 ? Some-college Never-married ? Unmarried White Female United-States 0 -43 0.477777779 0.219374225 0.9375 0 0 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -33 0.366666675 0.0837924 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.203116447 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 1 -27 0.3 0.228972092 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -36 0.4 0.1187677 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -33 0.366666675 0.133664265 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Sales Not-in-family White Female United-States 0 -63 0.7 0.14409934 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male Iran 1 -48 0.533333361 0.11571794 0.8125 0 0 0.565656543 Private Bachelors Divorced Other-service Unmarried White Female United-States 1 -25 0.2777778 0.244375825 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -41 0.455555558 0.231917456 0.5625 0 0 0.1010101 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -26 0.2888889 0.09273088 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -23 0.25555557 0.118154116 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -33 0.366666675 0.0493673831 0.5625 0.0183101818 0 0.4040404 State-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 -30 0.333333343 0.0926871 0.875 0 0 0.171717167 State-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 0 -67 0.7444445 0.238704 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Widowed Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.08759788 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -48 0.533333361 0.24441421 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 -51 0.566666663 0.03301464 0.5625 0 0 0.24242425 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -39 0.433333337 0.100991778 0.875 0 0 0.4040404 Private Masters Never-married Sales Not-in-family Asian-Pac-Islander Male China 0 -40 0.444444448 0.06680452 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -40 0.444444448 0.198496 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 -19 0.211111113 0.153726161 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male Mexico 0 -28 0.311111122 0.105623007 0.5625 0 0 0.363636374 Private HS-grad Divorced Handlers-cleaners Unmarried White Female United-States 0 -47 0.5222222 0.224103108 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.195287287 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -41 0.455555558 0.07819937 0.5625 0.009140091 0 0.4040404 Private HS-grad Widowed Exec-managerial Other-relative White Male United-States 0 -29 0.322222233 0.0162678789 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife Amer-Indian-Eskimo Female United-States 0 -40 0.444444448 0.184161171 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -61 0.677777767 0.155709729 0.5625 0 0 0.4040404 Private HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 -25 0.2777778 0.211442679 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family White Male Mexico 0 -26 0.2888889 0.07710825 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -43 0.477777779 0.109185331 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -17 0.188888893 0.113697335 0.25 0 0 0.454545468 Private 7th-8th Never-married Craft-repair Not-in-family White Male United-States 0 -43 0.477777779 0.09687312 0.875 0.09562095 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried Black Female United-States 1 -73 0.811111152 0.163513288 0.5625 0.0347103477 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male England 0 -46 0.51111114 0.07513816 0.625 0 0 0.4040404 Local-gov Some-college Divorced Machine-op-inspct Own-child White Female United-States 0 -19 0.211111113 0.0469925 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -37 0.411111116 0.196659267 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -26 0.2888889 0.06901035 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -47 0.5222222 0.102097049 0.5625 0 0.430670351 0.4040404 Private HS-grad Divorced Sales Own-child White Male United-States 0 -47 0.5222222 0.193519935 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -29 0.322222233 0.07791245 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -29 0.322222233 0.161400422 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -33 0.366666675 0.275591463 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Own-child White Male United-States 0 -20 0.222222224 0.125849247 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Other-relative White Male United-States 0 -28 0.311111122 0.08005698 0.375 0 0 0.4848485 Private 10th Married-civ-spouse Craft-repair Wife Other Female Guatemala 0 -26 0.2888889 0.09610596 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male ? 0 -41 0.455555558 0.115123212 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -67 0.7444445 0.184852213 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -43 0.477777779 0.103380136 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.125606775 0.3125 0 0 0.464646459 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -18 0.2 0.1295941 0.5 0 0 0.25252524 Private 12th Never-married Other-service Own-child White Female United-States 0 -55 0.6111111 0.227384567 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 -44 0.4888889 0.1317063 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child Black Female United-States 0 -64 0.7111111 0.041686397 0.5625 0 0 0.151515156 Private HS-grad Widowed Priv-house-serv Not-in-family White Female United-States 0 -34 0.377777785 0.118337989 0.6875 0 0 0.75757575 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.05408684 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -25 0.2777778 0.282654136 0.5625 0 0 0.08080808 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -21 0.233333334 0.214967281 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child Black Male United-States 0 -37 0.411111116 0.08536578 0.125 0 0 0.535353541 Private 1st-4th Married-civ-spouse Other-service Husband White Male Mexico 0 -39 0.433333337 0.203116447 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 -34 0.377777785 0.08113464 0.625 0 0 0.5050505 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -23 0.25555557 0.1806049 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -54 0.6 0.173325345 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -49 0.544444442 0.14370127 0.875 0 0 0.7070707 Self-emp-inc Masters Separated Exec-managerial Not-in-family White Male United-States 1 -25 0.2777778 0.204371244 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -51 0.566666663 0.08416689 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.106565282 0.5625 0 0 0.353535354 Private HS-grad Never-married Farming-fishing Unmarried White Male United-States 0 -27 0.3 0.372783154 0.8125 0 0 0.4848485 State-gov Bachelors Married-civ-spouse Protective-serv Wife Black Female United-States 0 -53 0.5888889 0.031086985 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Priv-house-serv Other-relative White Female United-States 0 -68 0.75555557 0.0934286639 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -56 0.622222245 0.156112492 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.334351957 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male ? 0 -24 0.266666681 0.0130733047 0.5625 0 0 0.4848485 Private HS-grad Divorced Sales Unmarried Amer-Indian-Eskimo Female United-States 0 -70 0.7777778 0.0191762 0.3125 0 0 0.25252524 ? 9th Widowed ? Unmarried White Female United-States 0 -24 0.266666681 0.12515685 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -74 0.822222233 0.183650628 0.75 0 0 0.2020202 ? Assoc-acdm Widowed ? Not-in-family White Female United-States 0 -23 0.25555557 0.130686566 0.625 0 0 0.25252524 ? Some-college Never-married ? Not-in-family White Female United-States 0 -41 0.455555558 0.09765913 0.875 0 0 0.5555556 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -45 0.5 0.109445311 0.5625 0 0 0.1919192 Private HS-grad Never-married Sales Own-child White Female United-States 0 -35 0.3888889 0.115826376 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -21 0.233333334 0.156643242 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -45 0.5 0.108990677 0.4375 0 0 0.25252524 Private 11th Separated Adm-clerical Unmarried Black Female United-States 0 -18 0.2 0.08307576 0.4375 0 0 0.3030303 Private 11th Never-married Sales Not-in-family White Female United-States 0 -49 0.544444442 0.07102354 0.8125 0 0 0.25252524 Private Bachelors Never-married Priv-house-serv Not-in-family White Male United-States 0 -49 0.544444442 0.122392669 0.6875 0 0 0.363636374 Private Assoc-voc Separated Prof-specialty Own-child White Female United-States 0 -45 0.5 0.0689423159 0.8125 0 0 0.373737365 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -27 0.3 0.04909191 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative Asian-Pac-Islander Male United-States 0 -28 0.311111122 0.1041089 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Philippines 0 -35 0.3888889 0.171879932 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.117726423 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -35 0.3888889 0.07435955 0.4375 0 0 0.353535354 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 -19 0.211111113 0.1404407 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -33 0.366666675 0.0821065456 0.625 0 0 0.282828271 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -28 0.311111122 0.0231258068 0.5625 0.14084141 0 0.4040404 Private HS-grad Divorced Sales Not-in-family Amer-Indian-Eskimo Male United-States 1 -49 0.544444442 0.03999448 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 -61 0.677777767 0.09111911 0.5625 0 0.597566545 0.323232323 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -39 0.433333337 0.08531998 0.625 0 0 0.25252524 Self-emp-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -22 0.244444445 0.14640148 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -42 0.466666669 0.0618547127 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.12447793 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -18 0.2 0.119984783 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -49 0.544444442 0.0689423159 0.3125 0 0.5121671 0.4040404 Local-gov 9th Widowed Handlers-cleaners Unmarried White Male United-States 1 -33 0.366666675 0.189823568 1 0 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male Cuba 1 -28 0.311111122 0.06481153 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.131422743 0.25 0 0 0.353535354 Private 7th-8th Married-spouse-absent Prof-specialty Other-relative White Male Puerto-Rico 0 -20 0.222222224 0.03793481 0.625 0.0217602178 0 0.25252524 Private Some-college Never-married Other-service Own-child White Male United-States 0 -50 0.5555556 0.0656352639 0.625 0 0 0.4848485 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -32 0.355555564 0.22884883 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.142065942 0.5625 0 0 0.4040404 Federal-gov HS-grad Separated Handlers-cleaners Unmarried White Female United-States 0 -29 0.322222233 0.134369463 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family Black Male United-States 0 -46 0.51111114 0.128462553 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -32 0.355555564 0.1289044 1 0 0 0.7777778 Self-emp-inc Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 -61 0.677777767 0.130314782 0.5625 0 0 0.24242425 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.151656389 0.4375 0 0 0.5555556 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.233558863 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 -39 0.433333337 0.102584019 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -18 0.2 0.0538760237 0.4375 0 0 0.353535354 ? 11th Never-married ? Own-child White Male United-States 0 -42 0.466666669 0.114937983 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -23 0.25555557 0.132825717 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -32 0.355555564 0.154732421 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -52 0.5777778 0.1376718 0.5625 0 0 0.858585835 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -36 0.4 0.121953525 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -38 0.422222227 0.120952651 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male ? 1 -50 0.5555556 0.160118684 0.5625 0 0.5610652 0.727272749 Private HS-grad Widowed Sales Not-in-family White Female United-States 1 -23 0.25555557 0.110846266 0.75 0 0 0.4040404 ? Assoc-acdm Never-married ? Own-child White Male United-States 0 -71 0.788888931 0.120949283 0.9375 0 0 0.121212125 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.129171789 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Other-relative Black Female United-States 0 -56 0.622222245 0.098780565 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.0780929551 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Prof-specialty Unmarried White Male United-States 0 -45 0.5 0.14203158 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.09287906 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -28 0.311111122 0.146133408 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -18 0.2 0.135753572 0.625 0 0 0.151515156 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 -62 0.6888889 0.0390447937 0.25 0 0 0.4040404 Private 7th-8th Divorced Handlers-cleaners Not-in-family White Male United-States 0 -35 0.3888889 0.140349776 0.5 0 0 0.4040404 Private 12th Separated Machine-op-inspct Unmarried White Female United-States 0 -39 0.433333337 0.0413166247 0.375 0 0 0.6060606 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -24 0.266666681 0.191197589 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family Black Male United-States 0 -58 0.644444466 0.1519514 0.3125 0 0 0.4040404 Private 9th Divorced Farming-fishing Not-in-family Black Male United-States 0 -48 0.533333361 0.270311624 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -57 0.6333333 0.187396154 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.0979164243 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.080984436 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.126095757 0.8125 0.1502415 0 0.363636374 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -29 0.322222233 0.0970314 0.25 0 0 0.727272749 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -38 0.422222227 0.160786822 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Unmarried Black Female United-States 0 -21 0.233333334 0.111079305 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -34 0.377777785 0.102709293 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -50 0.5555556 0.06261715 0.8125 0 0 0.323232323 Private Bachelors Never-married Sales Unmarried White Female United-States 0 -50 0.5555556 0.0921637639 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried Black Female United-States 0 -49 0.544444442 0.145788565 0.6875 0 0 0.454545468 Federal-gov Assoc-voc Divorced Exec-managerial Unmarried Black Female United-States 0 -30 0.333333343 0.235163212 0.8125 0 0 0.7070707 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -29 0.322222233 0.208539754 0.875 0 0 0.2020202 State-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 0 -22 0.244444445 0.234257311 0.625 0 0 0.2020202 State-gov Some-college Never-married Adm-clerical Not-in-family Other Male United-States 0 -42 0.466666669 0.0579205975 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.112768531 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -31 0.344444454 0.1108429 0.625 0 0 0.4848485 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -42 0.466666669 0.207636535 0.8125 0 0 0.212121218 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -20 0.222222224 0.03793481 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -51 0.566666663 0.1367376 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -50 0.5555556 0.142556265 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.08090901 0.3125 0 0 0.4040404 Self-emp-inc 9th Never-married Craft-repair Own-child White Male United-States 0 -26 0.2888889 0.161003709 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family White Male United-States 0 -61 0.677777767 0.121075235 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -20 0.222222224 0.2101542 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Own-child White Male Germany 0 -51 0.566666663 0.173425034 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -52 0.5777778 0.03316686 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.154721648 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -31 0.344444454 0.230127871 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male India 0 -24 0.266666681 0.0217625722 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -56 0.622222245 0.185380936 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.269653559 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -29 0.322222233 0.124331772 0.4375 0.0394203924 0 0.5050505 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.125889659 0.5625 0.010550105 0 0.3030303 Private HS-grad Never-married Sales Other-relative White Female United-States 0 -43 0.477777779 0.102660127 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -43 0.477777779 0.176418215 1 0.25236252 0 0.646464646 State-gov Doctorate Married-spouse-absent Prof-specialty Unmarried White Male United-States 1 -21 0.233333334 0.1585783 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -51 0.566666663 0.108904466 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -20 0.222222224 0.117157958 0.4375 0 0 0.3939394 ? 11th Married-civ-spouse ? Other-relative White Female United-States 0 -41 0.455555558 0.239723042 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -45 0.5 0.133804366 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.0826083347 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -28 0.311111122 0.284209341 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -50 0.5555556 0.174699351 0.875 0.1502415 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -47 0.5222222 0.05004698 0.8125 0 0 0.4040404 Private Bachelors Divorced Craft-repair Not-in-family White Male United-States 0 -80 0.8888889 0.0231291745 0.25 0 0 0.353535354 Self-emp-not-inc 7th-8th Widowed Farming-fishing Not-in-family White Male United-States 0 -47 0.5222222 0.123089775 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female Iran 0 -19 0.211111113 0.032594353 0.625 0 0 0.8484849 ? Some-college Never-married ? Own-child White Male United-States 0 -45 0.5 0.02306721 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -17 0.188888893 0.12573339 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -37 0.411111116 0.113053434 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.09864586 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 -17 0.188888893 0.1412065 0.5 0 0 0.161616161 Private 12th Never-married Other-service Own-child White Male United-States 0 -18 0.2 0.08957066 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -57 0.6333333 0.06360119 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -26 0.2888889 0.170004144 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -26 0.2888889 0.117593735 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Own-child White Female United-States 0 -36 0.4 0.101920582 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.0250804033 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -38 0.422222227 0.0681563 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -77 0.8555556 0.102983423 0.1875 0 0 0.2020202 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 0 -51 0.566666663 0.0633668 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 -24 0.266666681 0.221867651 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -35 0.3888889 0.07141352 0.5625 0 0 0.656565666 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -35 0.3888889 0.111042939 0.375 0 0 1 ? 10th Divorced ? Not-in-family White Male United-States 0 -51 0.566666663 0.11301437 0.8125 0.1502415 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.0934138447 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.117173448 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -43 0.477777779 0.1537814 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.06505333 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -42 0.466666669 0.10546203 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Wife White Female Puerto-Rico 0 -58 0.644444466 0.141895533 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -52 0.5777778 0.0927813947 0.5625 0 0 0.2020202 Local-gov HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 -29 0.322222233 0.0201151073 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Not-in-family Amer-Indian-Eskimo Female United-States 0 -27 0.3 0.1320424 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.208118781 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female Jamaica 0 -59 0.655555546 0.107097372 0.75 0.07298073 0 0.2020202 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.244150192 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -24 0.266666681 0.0635782853 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -20 0.222222224 0.215562686 0.375 0 0 0.4040404 Private 10th Married-spouse-absent Handlers-cleaners Not-in-family White Male United-States 0 -54 0.6 0.06636672 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -65 0.722222269 0.123371311 0.5625 0 0 0.25252524 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -18 0.2 0.2232841 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 -38 0.422222227 0.131801262 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.120053478 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.08609994 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -36 0.4 0.181667075 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Other-service Husband White Male United-States 0 -55 0.6111111 0.09215231 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -22 0.244444445 0.138481379 0.1875 0 0 0.3030303 Private 5th-6th Never-married Machine-op-inspct Not-in-family White Male Mexico 0 -28 0.311111122 0.08895909 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -20 0.222222224 0.158199787 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 -24 0.266666681 0.132562369 0.8125 0.03908039 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -36 0.4 0.160262823 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -68 0.75555557 0.09486868 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -49 0.544444442 0.07113467 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 1 -18 0.2 0.05623474 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Own-child White Male United-States 0 -50 0.5555556 0.152065232 1 0 0 0.6060606 Self-emp-not-inc Doctorate Divorced Prof-specialty Not-in-family White Female United-States 1 -37 0.411111116 0.163475573 0.5 0 0 0.4040404 Private 12th Separated Priv-house-serv Unmarried Black Female United-States 0 -60 0.6666667 0.239687353 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.1167343 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.0240195878 1 0 0 0.7070707 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 -17 0.188888893 0.20020543 0.4375 0 0 0.09090909 Private 11th Never-married Priv-house-serv Own-child White Female United-States 0 -43 0.477777779 0.07337821 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -39 0.433333337 0.07554228 0.625 0 0 0.262626261 Private Some-college Married-civ-spouse Sales Husband White Male ? 0 -21 0.233333334 0.03859218 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.07767402 1 0 0 0.07070707 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Male ? 0 -48 0.533333361 0.110851653 0.625 0.07298073 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -56 0.622222245 0.1987378 0.8125 0.14084141 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -21 0.233333334 0.119394094 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.22667332 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband Asian-Pac-Islander Male Hong 1 -39 0.433333337 0.0356097668 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.2133892 0.25 0.0406404063 0 0.4040404 Private 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.134809941 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 0 -59 0.655555546 0.305156261 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.0182972383 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -19 0.211111113 0.201789588 0.5625 0 0 0.161616161 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -23 0.25555557 0.08220354 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -31 0.344444454 0.232555971 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -42 0.466666669 0.0762084052 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband Black Male United-States 0 -43 0.477777779 0.0229048878 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.171760723 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.102826491 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -21 0.233333334 0.155622169 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -34 0.377777785 0.06981252 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.08361055 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.133483082 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 -29 0.322222233 0.123679116 0.5625 0.031370312 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Ireland 0 -19 0.211111113 0.314175546 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -45 0.5 0.07704965 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -42 0.466666669 0.12553066 0.8125 0 0 0.727272749 Private Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 1 -32 0.355555564 0.19597429 0.8125 0 0.365013778 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -90 1 0.190000713 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -44 0.4888889 0.164998442 0.8125 0 0 0.444444448 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -34 0.377777785 0.07724834 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.07217596 0.5 0 0 0.3030303 Private 12th Separated Other-service Not-in-family White Female United-States 0 -39 0.433333337 0.09602783 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -29 0.322222233 0.137288556 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 -24 0.266666681 0.0321888849 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -49 0.544444442 0.0900711 0.625 0 0 0.171717167 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -52 0.5777778 0.0911554843 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male ? 1 -54 0.6 0.09146801 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male South 1 -31 0.344444454 0.08661047 0.3125 0 0 0.4040404 Private 9th Divorced Transport-moving Not-in-family White Male United-States 0 -44 0.4888889 0.09015461 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -18 0.2 0.09251872 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 -27 0.3 0.164052129 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.08025567 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -30 0.333333343 0.263428777 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -27 0.3 0.1700715 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Own-child White Female United-States 0 -34 0.377777785 0.0791423246 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male Italy 0 -25 0.2777778 0.07936459 0.625 0 0 0.1919192 State-gov Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -39 0.433333337 0.1981424 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -28 0.311111122 0.265996963 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -51 0.566666663 0.174662977 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.1400871 0.5625 0 0 0.353535354 ? HS-grad Married-civ-spouse ? Other-relative White Female United-States 0 -33 0.366666675 0.0650870055 0.625 0 0 0.262626261 Private Some-college Never-married Sales Not-in-family Asian-Pac-Islander Male South 0 -27 0.3 0.129509225 0.6875 0 0 0.3838384 Private Assoc-voc Never-married Handlers-cleaners Own-child White Female United-States 0 -29 0.322222233 0.144729763 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -33 0.366666675 0.112799518 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -37 0.411111116 0.0745690241 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -20 0.222222224 0.135517836 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -24 0.266666681 0.133134872 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -29 0.322222233 0.109113932 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -31 0.344444454 0.177517429 0.8125 0 0.515610635 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.151409879 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.06057904 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.160762578 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -54 0.6 0.026129771 0.3125 0 0 0.4040404 Private 9th Separated Craft-repair Unmarried White Male United-States 0 -55 0.6111111 0.060896948 0.8125 0 0 0.5555556 Private Bachelors Married-spouse-absent Craft-repair Unmarried White Female Ireland 0 -21 0.233333334 0.128513753 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -52 0.5777778 0.0160166509 0.6875 0 0.453856736 0.454545468 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.19213447 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -33 0.366666675 0.119438544 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 0 -22 0.244444445 0.234073445 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 -59 0.655555546 0.1549392 0.5625 0 0.143480256 0.3838384 Private HS-grad Never-married Exec-managerial Unmarried White Female United-States 0 -17 0.188888893 0.14181067 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 -31 0.344444454 0.137907535 0.5 0 0 0.323232323 Private 12th Never-married Sales Own-child White Male United-States 0 -74 0.822222233 0.07004826 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.170482352 0.375 0 0 0.4040404 Private 10th Divorced Other-service Unmarried Black Female United-States 0 -36 0.4 0.113852248 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.136072159 0.625 0 0 0.6060606 Self-emp-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -45 0.5 0.114567541 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -42 0.466666669 0.1433598 0.5625 0 0 0.858585835 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -50 0.5555556 0.207039118 0.875 0 0 0.4040404 State-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -39 0.433333337 0.157221809 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Other-relative White Female United-States 0 -44 0.4888889 0.23959507 0.625 0 0.454545438 0.454545468 Private Some-college Separated Exec-managerial Not-in-family White Male England 0 -52 0.5777778 0.119885772 0.125 0 0 0.565656543 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male Mexico 1 -24 0.266666681 0.191023141 0.8125 0 0 0.434343427 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -56 0.622222245 0.124333121 0.3125 0 0 1 Self-emp-inc 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -27 0.3 0.125039652 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -47 0.5222222 0.129920766 0.8125 0 0.43663913 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.1917593 0.9375 0 0.453856736 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 1 -38 0.422222227 0.120952651 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.08869035 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Not-in-family White Female United-States 0 -52 0.5777778 0.0895619 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -22 0.244444445 0.104204543 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Own-child White Male United-States 0 -41 0.455555558 0.08198127 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Italy 0 -30 0.333333343 0.171939209 0.5625 0 0 0.2020202 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -55 0.6111111 0.136430472 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Other-service Other-relative Asian-Pac-Islander Male Philippines 0 -25 0.2777778 0.08290873 0.625 0 0.365013778 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -32 0.355555564 0.103270352 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Other-relative White Male United-States 0 -28 0.311111122 0.0509831943 0.625 0 0 0.6060606 Private Some-college Separated Other-service Not-in-family White Female United-States 0 -33 0.366666675 0.1391583 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -17 0.188888893 0.158132434 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child Black Male United-States 0 -27 0.3 0.120413147 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -55 0.6111111 0.1154135 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -63 0.7 0.06444378 0.625 0 0 0.181818187 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -39 0.433333337 0.132466048 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -51 0.566666663 0.0496192873 1 0.04386044 0 0.5252525 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -67 0.7444445 0.09426789 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.2675818 0.8125 0 0 0.727272749 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 0 -27 0.3 0.0406639725 0.5625 0 0.365932047 0.262626261 Private HS-grad Widowed Craft-repair Unmarried White Female United-States 0 -54 0.6 0.283935875 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -59 0.655555546 0.16514796 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband Black Male United-States 1 -18 0.2 0.0186030231 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.126334861 0.5625 0 0 0.2020202 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -31 0.344444454 0.06929592 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -17 0.188888893 0.1538346 0.4375 0 0 0.07070707 Private 11th Never-married Other-service Own-child White Female United-States 0 -42 0.466666669 0.229159325 0.5625 0.1502415 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male United-States 1 -37 0.411111116 0.118739419 0.625 0 0 0.3030303 Private Some-college Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 -51 0.566666663 0.07303471 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.108565 0.5625 0.0246302467 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -23 0.25555557 0.187505946 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -27 0.3 0.106378712 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.123166561 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -69 0.7666667 0.249805853 0.75 0.0296402965 0 0.0606060624 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Female Germany 0 -30 0.333333343 0.139092952 0.8125 0 0 0.444444448 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -33 0.366666675 0.241094366 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male India 0 -28 0.311111122 0.127531067 0.5625 0 0 0.4848485 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -45 0.5 0.158046216 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -25 0.2777778 0.07640306 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -37 0.411111116 0.137498692 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -59 0.655555546 0.105950341 0.0625 0 0 0.4040404 Private Preschool Never-married Machine-op-inspct Not-in-family White Male Dominican-Republic 0 -26 0.2888889 0.0700778961 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -48 0.533333361 0.188873887 0.625 0 0 0.25252524 Private Some-college Separated Other-service Not-in-family White Female Peru 0 -64 0.7111111 0.117029309 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -39 0.433333337 0.1422195 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -24 0.266666681 0.216497555 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -40 0.444444448 0.119271509 0.875 0 0 0.353535354 State-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -46 0.51111114 0.1204475 0.875 0 0 0.7070707 Private Masters Married-spouse-absent Exec-managerial Not-in-family White Male United-States 1 -35 0.3888889 0.19374758 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 1 -43 0.477777779 0.141370848 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -31 0.344444454 0.225461632 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Not-in-family White Male United-States 0 -22 0.244444445 0.206752867 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.0351497456 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -35 0.3888889 0.0686857 0.5625 0 0 0.5050505 Private HS-grad Separated Transport-moving Not-in-family White Male United-States 0 -35 0.3888889 0.325674117 0.625 0 0 0.4040404 State-gov Some-college Divorced Tech-support Unmarried White Female United-States 0 -40 0.444444448 0.0521026067 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.100875258 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Unmarried White Female United-States 0 -48 0.533333361 0.221327469 0.9375 0.14084141 0 0.6363636 Self-emp-not-inc Prof-school Divorced Prof-specialty Unmarried White Male United-States 1 -70 0.7777778 0.116287075 0.875 0 0 0.08080808 ? Masters Married-civ-spouse ? Husband White Male United-States 0 -46 0.51111114 0.126821831 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.07853951 0.5625 0 0 0.3838384 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -37 0.411111116 0.2350366 0.8125 0 0 0.363636374 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.221949816 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Sales Husband White Male Mexico 0 -47 0.5222222 0.06295931 0.8125 0 0 0.7070707 Local-gov Bachelors Separated Prof-specialty Not-in-family White Female United-States 0 -35 0.3888889 0.131840333 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -43 0.477777779 0.0847528651 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Vietnam 0 -18 0.2 0.12872389 0.4375 0 0 0.2020202 State-gov 11th Never-married Other-service Own-child White Male United-States 0 -54 0.6 0.2094827 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -62 0.6888889 0.141754761 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Other-relative Black Female United-States 0 -36 0.4 0.09112181 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.105250537 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Farming-fishing Husband Amer-Indian-Eskimo Male United-States 0 -23 0.25555557 0.10386575 0.625 0 0 0.141414136 Private Some-college Never-married Adm-clerical Other-relative Asian-Pac-Islander Male Puerto-Rico 0 -61 0.677777767 0.108186476 0.8125 0.04386044 0 0.151515156 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -39 0.433333337 0.22326389 0.8125 0 0.383149683 0.6060606 Self-emp-not-inc Bachelors Divorced Craft-repair Not-in-family Black Male ? 0 -33 0.366666675 0.1678778 0.1875 0 0 0.5050505 Self-emp-not-inc 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.176280811 0.125 0 0 0.4040404 Private 1st-4th Never-married Machine-op-inspct Not-in-family White Female Mexico 0 -22 0.244444445 0.161386952 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -31 0.344444454 0.152687579 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 -26 0.2888889 0.128193825 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -44 0.4888889 0.130500674 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -73 0.811111152 0.129817039 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -44 0.4888889 0.136002779 0.8125 0 0 0.353535354 Private Bachelors Divorced Sales Unmarried White Female United-States 0 -35 0.3888889 0.05196049 0.6875 0 0 0.454545468 Private Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 0 -33 0.366666675 0.08514419 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Wife White Female ? 0 -27 0.3 0.0294011272 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.153056666 0.8125 0 0 0.5050505 Federal-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 1 -29 0.322222233 0.108257875 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -33 0.366666675 0.193895757 0.625 0 0 0.262626261 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -50 0.5555556 0.112317264 0.625 0 0 0.151515156 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.123803049 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -41 0.455555558 0.171628714 0.875 0 0 0.4040404 Self-emp-not-inc Masters Divorced Handlers-cleaners Unmarried White Male Peru 0 -19 0.211111113 0.1485258 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 -45 0.5 0.198723659 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -65 0.722222269 0.128354117 0.5625 0 0.185950413 0.363636374 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.142732054 0.625 0 0 0.4040404 State-gov Some-college Separated Tech-support Unmarried White Female United-States 0 -33 0.366666675 0.19911094 0.8125 0 0 0.25252524 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -32 0.355555564 0.137782931 0.8125 1 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.13755931 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.125938833 0.625 0 0 0.454545468 Private Some-college Separated Exec-managerial Not-in-family White Female United-States 1 -38 0.422222227 0.0899747759 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Protective-serv Own-child White Male United-States 0 -38 0.422222227 0.111759581 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.111064486 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.18734698 0.625 0 0 0.3030303 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -27 0.3 0.07793131 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Sales Not-in-family White Male United-States 0 -25 0.2777778 0.10140264 0.3125 0 0 0.4040404 Private 9th Married-spouse-absent Adm-clerical Unmarried Asian-Pac-Islander Female Vietnam 0 -29 0.322222233 0.124689423 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.135781184 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -44 0.4888889 0.111682124 0.5625 0 0 0.969697 Self-emp-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -26 0.2888889 0.0689834058 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family Asian-Pac-Islander Female South 0 -46 0.51111114 0.231811717 0.75 0 0 0.4949495 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 -38 0.422222227 0.149827749 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Unmarried White Male United-States 0 -38 0.422222227 0.14295432 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.128392518 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.137056187 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Male United-States 0 -50 0.5555556 0.2049296 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family Asian-Pac-Islander Male United-States 0 -31 0.344444454 0.164116785 0.5625 0 0 0.414141417 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -26 0.2888889 0.127458319 0.625 0 0 0.04040404 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family White Female Mexico 0 -42 0.466666669 0.052113384 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -27 0.3 0.276385546 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.0245065521 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -64 0.7111111 0.07418983 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -43 0.477777779 0.133572668 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.08605885 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.134072423 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 -56 0.622222245 0.192449 0.875 0 0 0.6666667 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -25 0.2777778 0.225050092 0.875 0 0 0.2020202 Local-gov Masters Never-married Prof-specialty Own-child White Male United-States 0 -60 0.6666667 0.06535305 0.8125 0 0 0.353535354 State-gov Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -52 0.5777778 0.04518743 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -43 0.477777779 0.268041819 0.5625 0.005940059 0 0.161616161 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -46 0.51111114 0.122942269 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Unmarried Asian-Pac-Islander Female Philippines 0 -19 0.211111113 0.377720833 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -56 0.622222245 0.245873764 0.25 0 0 0.2020202 Private 7th-8th Never-married Farming-fishing Unmarried Black Female United-States 0 -22 0.244444445 0.0742235 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -28 0.311111122 0.101047009 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family White Male ? 0 -39 0.433333337 0.2019445 0.1875 0 0 0.3030303 Private 5th-6th Separated Sales Unmarried Black Female Puerto-Rico 0 -28 0.311111122 0.0736051947 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 0 -31 0.344444454 0.06966704 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.0234033037 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -39 0.433333337 0.09262581 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male ? 1 -39 0.433333337 0.193162277 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.142137334 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Never-married Craft-repair Not-in-family White Male Mexico 0 -67 0.7444445 0.129935578 0.5625 0.03818038 0 0.111111112 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -31 0.344444454 0.147718236 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried White Female Puerto-Rico 0 -50 0.5555556 0.07602386 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.0242937151 0.5625 0.03908039 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.0494603328 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female Germany 1 -51 0.566666663 0.135094851 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 -54 0.6 0.11649587 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.0296395589 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Transport-moving Not-in-family White Male United-States 0 -20 0.222222224 0.157926321 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Black Female United-States 0 -37 0.411111116 0.143345654 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -38 0.422222227 0.158213928 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -59 0.655555546 0.135178372 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Farming-fishing Husband Black Male United-States 0 -59 0.655555546 0.0277886856 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -51 0.566666663 0.168143839 0.625 0 0 0.4848485 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 1 -60 0.6666667 0.155024067 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband Black Male United-States 0 -29 0.322222233 0.236902952 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.07729819 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 -42 0.466666669 0.235658944 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.1375674 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.0965794548 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -50 0.5555556 0.0255357139 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Italy 1 -22 0.244444445 0.1014902 0.5625 0 0 0.24242425 Self-emp-inc HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -27 0.3 0.139833167 0.5625 0 0 0.5252525 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -45 0.5 0.215306073 0.9375 0 0 0.434343427 State-gov Prof-school Divorced Prof-specialty Unmarried White Female United-States 0 -39 0.433333337 0.10504511 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -25 0.2777778 0.07936459 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -63 0.7 0.3011231 0.5625 0 0 0.151515156 ? HS-grad Never-married ? Not-in-family White Male United-States 0 -24 0.266666681 0.0959140062 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.104904346 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -19 0.211111113 0.169927359 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 -23 0.25555557 0.07506542 0.5 0 0 0.3838384 Private 12th Never-married Other-service Unmarried Black Male United-States 0 -20 0.222222224 0.3560411 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Other-relative White Male Mexico 0 -17 0.188888893 0.154095262 0.375 0 0 0.24242425 Self-emp-not-inc 10th Never-married Other-service Own-child White Female United-States 0 -63 0.7 0.05426802 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -28 0.311111122 0.121418737 0.8125 0 0 0.656565666 Local-gov Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -51 0.566666663 0.1601793 0.8125 0 0 0.5050505 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.106157117 0.8125 0.0332503319 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -64 0.7111111 0.25531134 0.625 0 0 0.121212125 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 -17 0.188888893 0.129258 0.375 0 0 0.25252524 Private 10th Never-married Other-service Own-child White Male United-States 0 -45 0.5 0.219615355 0.625 0.06497065 0 0.353535354 Local-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -18 0.2 0.210380524 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child Black Male United-States 0 -31 0.344444454 0.14366962 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -48 0.533333361 0.140807092 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-spouse-absent Sales Own-child White Male United-States 1 -41 0.455555558 0.2291014 0.625 0 0 0.454545468 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -65 0.722222269 0.103839487 0.9375 0.200512 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.06335535 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Machine-op-inspct Not-in-family White Male United-States 0 -39 0.433333337 0.08021661 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -51 0.566666663 0.261665463 0.625 0 0 0.08080808 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male Puerto-Rico 1 -49 0.544444442 0.122154236 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.141463116 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried White Male United-States 0 -36 0.4 0.139388636 0.8125 0 0.43663913 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -25 0.2777778 0.3269983 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Female United-States 0 -41 0.455555558 0.141616687 0.625 0 0 0.373737365 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -31 0.344444454 0.0798481852 0.3125 0 0 0.4040404 Private 9th Divorced Adm-clerical Not-in-family White Female United-States 0 -63 0.7 0.1218498 0.4375 0.04386044 0 0.373737365 Private 11th Married-civ-spouse Protective-serv Husband White Male United-States 1 -50 0.5555556 0.163343564 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -63 0.7 0.200789392 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -44 0.4888889 0.187096432 0.875 0 0 1 Self-emp-not-inc Masters Never-married Farming-fishing Own-child White Male United-States 0 -48 0.533333361 0.104978435 0.5625 0 0 0.656565666 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -51 0.566666663 0.115796745 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -18 0.2 0.164275065 0.5625 0 0 0.151515156 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.155694231 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Male United-States 0 -31 0.344444454 0.24037233 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.03301666 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.0710309446 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male England 0 -56 0.622222245 0.106249392 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -31 0.344444454 0.08861559 0.25 0 0 0.2020202 Private 7th-8th Divorced Transport-moving Unmarried White Male United-States 0 -46 0.51111114 0.22385256 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -39 0.433333337 0.137738481 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.205944613 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 -31 0.344444454 0.08739851 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Unmarried White Female United-States 0 -42 0.466666669 0.0876443461 0.8125 0 0.453856736 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.0692582056 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.108428277 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Female United-States 0 -18 0.2 0.171941236 0.4375 0 0.3677686 0.4848485 ? 11th Never-married ? Own-child Black Male United-States 0 -20 0.222222224 0.233272612 0.625 0 0 0.353535354 ? Some-college Never-married ? Not-in-family White Female United-States 0 -27 0.3 0.192561492 0.5625 0 0.4242424 0.454545468 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.240242347 0.8125 0 0 0.4040404 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 -52 0.5777778 0.1295786 0.875 0.0501305 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -46 0.51111114 0.265951842 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -30 0.333333343 0.07619628 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -26 0.2888889 0.03767011 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -48 0.533333361 0.11922773 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.108534023 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.208434 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.111448407 0.5625 0.07688077 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.03315002 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -74 0.822222233 0.08023749 0.5625 0 0.493342519 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -56 0.622222245 0.10920015 0.1875 0 0.4331956 0.676767647 Self-emp-not-inc 5th-6th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.0872718841 0.8125 0 0.3996786 0.4040404 Federal-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -21 0.233333334 0.206674054 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -29 0.322222233 0.0911265239 0.8125 0 0.518365443 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 -43 0.477777779 0.126167834 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Divorced Other-service Unmarried White Male United-States 0 -23 0.25555557 0.03749836 0.8125 0.02907029 0 0.4040404 Private Bachelors Never-married Protective-serv Not-in-family White Female United-States 0 -26 0.2888889 0.09988382 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -47 0.5222222 0.0234693084 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -27 0.3 0.1352006 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -45 0.5 0.129222974 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -30 0.333333343 0.286607772 0.5625 0 0 0.7070707 Private HS-grad Never-married Protective-serv Own-child White Male United-States 0 -35 0.3888889 0.0301608741 0.625 0.07688077 0 0.2020202 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -33 0.366666675 0.0847683549 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.0676956 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.09988112 0.5625 0 0 0.2020202 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -42 0.466666669 0.02648607 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -48 0.533333361 0.09927696 0.5625 0 0 0.363636374 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -46 0.51111114 0.01665516 0.5625 0 0 0.4848485 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 -36 0.4 0.1196305 0.1875 0 0 0.4040404 Private 5th-6th Separated Machine-op-inspct Not-in-family White Female United-States 0 -54 0.6 0.110342458 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -25 0.2777778 0.1346712 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -26 0.2888889 0.260623485 0.5625 0 0 0.25252524 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.07821958 0.5625 0 0 0.575757563 Self-emp-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -56 0.622222245 0.132219538 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -37 0.411111116 0.119337514 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.218800366 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -23 0.25555557 0.126964614 0.8125 0 0 0.25252524 Private Bachelors Never-married Other-service Own-child White Female United-States 0 -23 0.25555557 0.33832714 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -41 0.455555558 0.01811269 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -55 0.6111111 0.0687395856 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.112970591 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -67 0.7444445 0.157392219 0.75 0 0 0.353535354 Local-gov Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 -60 0.6666667 0.0180210881 0.5625 0 0 0.5050505 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -54 0.6 0.0686264262 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Unmarried White Female United-States 0 -38 0.422222227 0.1295456 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male England 1 -47 0.5222222 0.229663134 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Philippines 1 -49 0.544444442 0.06890797 0.8125 0 0 0.424242437 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.0570800267 0.5625 0 0 0.24242425 Private HS-grad Never-married Sales Own-child White Female United-States 0 -20 0.222222224 0.133192793 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 -66 0.733333349 0.124830186 0.5625 0 0 0.353535354 Private HS-grad Widowed Sales Other-relative White Female United-States 0 -22 0.244444445 0.195314229 0.625 0 0 0.25252524 ? Some-college Never-married ? Not-in-family Black Female United-States 0 -51 0.566666663 0.08447267 0.875 0 0 0.424242437 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.187565878 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -36 0.4 0.09861353 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -33 0.366666675 0.13002044 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -41 0.455555558 0.0363412276 0.8125 0 0.454545438 0.565656543 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 -90 1 0.118199244 0.5625 0.09386094 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Ecuador 1 -78 0.8666667 0.022351915 0.25 0 0 0.6060606 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -36 0.4 0.09709269 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -30 0.333333343 0.131272539 0.9375 0 0 0.5555556 Private Prof-school Divorced Sales Own-child White Male United-States 0 -35 0.3888889 0.226157382 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Male Mexico 0 -46 0.51111114 0.0938018039 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.0228240639 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 -24 0.266666681 0.191023141 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -40 0.444444448 0.09513338 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Wife White Female Puerto-Rico 0 -49 0.544444442 0.200800836 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.125342071 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -77 0.8555556 0.126392782 0.625 0 0 0.2020202 Private Some-college Widowed Priv-house-serv Not-in-family White Female United-States 0 -46 0.51111114 0.06890797 0.5625 0 0 0.565656543 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -41 0.455555558 0.0839486644 0.625 0 0 0.4040404 Private Some-college Separated Craft-repair Not-in-family Black Male United-States 0 -28 0.311111122 0.2614068 0.125 0 0 0.7777778 Private 1st-4th Never-married Farming-fishing Unmarried White Male Mexico 0 -21 0.233333334 0.07405646 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.110815957 0.5 0 0 0.4040404 Private 12th Never-married Farming-fishing Own-child Black Male United-States 0 -36 0.4 0.166868165 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -23 0.25555557 0.06977009 0.625 0 0 0.25252524 State-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 -38 0.422222227 0.167655528 0.5625 0 0.4708448 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.120260254 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.09169296 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Other-relative White Male United-States 1 -47 0.5222222 0.037298318 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Adm-clerical Unmarried Black Male United-States 1 -39 0.433333337 0.119705938 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -40 0.444444448 0.164059535 0.8125 0 0 0.4848485 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -21 0.233333334 0.12698482 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -32 0.355555564 0.0430455878 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -23 0.25555557 0.147864386 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 -44 0.4888889 0.121646389 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -37 0.411111116 0.03994935 0.625 0 0 0.4040404 Private Some-college Separated Other-service Not-in-family Black Male ? 0 -70 0.7777778 0.114789136 0.8125 0 0 0.2020202 Private Bachelors Widowed Prof-specialty Unmarried White Female Puerto-Rico 0 -51 0.566666663 0.0691147447 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Protective-serv Husband White Male United-States 1 -66 0.733333349 0.130081058 0.3125 0 0 0.3030303 Private 9th Separated Other-service Not-in-family Black Female United-States 0 -57 0.6333333 0.08361055 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.09202434 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -48 0.533333361 0.100353271 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Divorced Sales Not-in-family White Male United-States 1 -24 0.266666681 0.136778682 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -51 0.566666663 0.04271825 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -43 0.477777779 0.162924618 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.179815516 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.126656815 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -20 0.222222224 0.247139335 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -33 0.366666675 0.144223273 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.168934569 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -32 0.355555564 0.162307665 0.625 0 0 0.6060606 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.06619699 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male India 1 -26 0.2888889 0.07055005 0.5625 0.0501305 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.06985226 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Unmarried White Female United-States 0 -24 0.266666681 0.107482634 0.8125 0 0 0.75757575 Private Bachelors Never-married Other-service Own-child Black Female United-States 0 -45 0.5 0.07907901 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.0942955 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -49 0.544444442 0.0213173665 0.8125 0 0 0.454545468 State-gov Bachelors Married-civ-spouse Prof-specialty Other-relative White Female United-States 0 -35 0.3888889 0.0544020534 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.04464052 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -23 0.25555557 0.07260769 0.625 0 0.371212125 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -33 0.366666675 0.1391583 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.190247223 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.126790166 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -20 0.222222224 0.188430026 0.4375 0 0 0.25252524 Private 11th Never-married Craft-repair Not-in-family Black Male United-States 0 -44 0.4888889 0.315078765 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.09272819 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -50 0.5555556 0.106609732 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -25 0.2777778 0.137548536 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female Mexico 0 -28 0.311111122 0.141777664 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -60 0.6666667 0.0427869521 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -38 0.422222227 0.1461058 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.250931323 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 -57 0.6333333 0.134110153 0.8125 0 0.518365443 0.4040404 Federal-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -50 0.5555556 0.11351683 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.127911612 0.4375 0 0 0.4040404 Local-gov 11th Divorced Adm-clerical Unmarried White Female United-States 0 -69 0.7666667 0.04173085 0.5625 0.014240142 0 0.0606060624 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.0464051776 0.6875 0 0.5610652 0.3939394 State-gov Assoc-voc Divorced Tech-support Not-in-family White Male United-States 1 -42 0.466666669 0.137704119 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -53 0.5888889 0.209704965 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.07661455 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -37 0.411111116 0.242196932 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.08949859 0.5625 0.07298073 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.20286791 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Female United-States 0 -38 0.422222227 0.180197418 0.625 0 0 0.3838384 State-gov Some-college Separated Adm-clerical Unmarried Black Female United-States 0 -52 0.5777778 0.124878012 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Poland 1 -48 0.533333361 0.128831655 0.6875 0 0 0.5050505 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.0531957522 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -37 0.411111116 0.162633657 0.5625 0 0.4242424 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.146156311 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.0811663 0.8125 0 0 0.6060606 Local-gov Bachelors Divorced Protective-serv Unmarried White Female Germany 0 -33 0.366666675 0.08258341 0.5625 0 0 0.353535354 Private HS-grad Married-spouse-absent Other-service Not-in-family Asian-Pac-Islander Female Thailand 0 -20 0.222222224 0.06335063 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Male United-States 0 -41 0.455555558 0.133062124 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -32 0.355555564 0.2369959 0.625 0 0.3409091 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -54 0.6 0.08201023 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 0 -36 0.4 0.124304831 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 -46 0.51111114 0.1806965 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -45 0.5 0.15871571 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.125889659 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 -62 0.6888889 0.0241010841 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.1272044 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -42 0.466666669 0.244891077 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -18 0.2 0.316508 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -32 0.355555564 0.0344512872 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.1174139 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -20 0.222222224 0.234073445 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -50 0.5555556 0.0487308949 0.8125 0 0 0.454545468 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 -42 0.466666669 0.124690764 1 0 0 0.434343427 Local-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male ? 1 -36 0.4 0.127009079 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.17192103 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -30 0.333333343 0.196639061 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -33 0.366666675 0.150229171 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -43 0.477777779 0.0255518779 0.75 0 0 0.434343427 Local-gov Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 -38 0.422222227 0.198778212 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.123796314 0.8125 0 0 0.141414136 Local-gov Bachelors Never-married Other-service Not-in-family White Male United-States 0 -40 0.444444448 0.07827683 0.625 0 0 0.454545468 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 -40 0.444444448 0.0963619053 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -41 0.455555558 0.158921137 0.9375 0 0 0.5050505 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -57 0.6333333 0.07600163 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -65 0.722222269 0.09864182 0.875 0 0.378328741 0.04040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male Greece 0 -52 0.5777778 0.0294368248 0.625 0 0 0.5050505 Federal-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -59 0.655555546 0.08236182 0.9375 1 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -18 0.2 0.253684729 0.5625 0.0217602178 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -48 0.533333361 0.06822837 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -45 0.5 0.06519679 0.1875 0 0 0.4040404 Private 5th-6th Divorced Transport-moving Unmarried White Male United-States 0 -24 0.266666681 0.131106183 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -27 0.3 0.139346883 0.75 0 0 0.4040404 State-gov Assoc-acdm Never-married Protective-serv Not-in-family White Male United-States 0 -40 0.444444448 0.152826324 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.101538688 0.8125 0.0501305 0 0.4040404 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -24 0.266666681 0.135164231 0.5625 0 0 0.5050505 Private HS-grad Never-married Farming-fishing Own-child Black Male United-States 0 -71 0.788888931 0.123713471 0.9375 0 0 0.161616161 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -17 0.188888893 0.0223195851 0.5 0 0 0.4040404 Private 12th Never-married Sales Own-child White Male United-States 0 -57 0.6333333 0.038439285 0.625 0.031370312 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -71 0.788888931 0.0237777885 0.8125 0.09386094 0 0.3030303 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -37 0.411111116 0.127012447 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 0 -33 0.366666675 0.1141614 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -41 0.455555558 0.039148517 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -25 0.2777778 0.240009978 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.299139559 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -18 0.2 0.229080528 0.4375 0 0 0.5050505 ? 11th Never-married ? Unmarried Black Female United-States 0 -34 0.377777785 0.147920966 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -57 0.6333333 0.225354537 0.375 0 0 0.4040404 ? 10th Married-civ-spouse ? Wife White Female United-States 0 -27 0.3 0.2229709 0.8125 0 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.298496336 0.8125 0 0 0.08080808 ? Bachelors Divorced ? Not-in-family White Female United-States 0 -64 0.7111111 0.161331043 0.4375 0.0367403664 0 0.353535354 ? 11th Widowed ? Not-in-family White Female United-States 0 -24 0.266666681 0.06758582 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -23 0.25555557 0.138514385 0.8125 0 0 0.3030303 Private Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 -33 0.366666675 0.07569382 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -58 0.644444466 0.0145658571 0.6875 0.0220202189 0 0.565656543 Self-emp-inc Assoc-voc Divorced Sales Not-in-family White Male United-States 0 -25 0.2777778 0.0913097262 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -44 0.4888889 0.128329873 0.875 0 0 0.5555556 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -53 0.5888889 0.179562941 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.07853951 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -36 0.4 0.237934813 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -25 0.2777778 0.106160484 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -54 0.6 0.0146143511 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -31 0.344444454 0.05195847 0.5 0 0 0.4040404 Private 12th Separated Transport-moving Unmarried Black Male United-States 0 -18 0.2 0.230922639 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -40 0.444444448 0.118947536 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Male United-States 0 -26 0.2888889 0.09856706 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife Black Female United-States 0 -68 0.75555557 0.09877046 1 0.200512 0 0.5050505 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 -33 0.366666675 0.149501756 0.8125 0.0220202189 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -22 0.244444445 0.145177662 0.75 0 0 0.5555556 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 0 -50 0.5555556 0.116534933 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.166857392 0.8125 0 0 0.3030303 ? Bachelors Never-married ? Own-child White Male United-States 0 -44 0.4888889 0.169866741 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.3349487 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Male United-States 0 -34 0.377777785 0.287215978 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.109388739 0.625 0 0 0.454545468 Federal-gov Some-college Widowed Tech-support Not-in-family White Female United-States 1 -77 0.8555556 0.0966629758 0.875 0 0 0.08080808 ? Masters Married-civ-spouse ? Husband White Male United-States 1 -25 0.2777778 0.1282073 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Other-service Own-child White Female United-States 0 -20 0.222222224 0.131005153 0.625 0 0 0.4040404 Private Some-college Separated Sales Unmarried Black Female United-States 0 -46 0.51111114 0.0746841952 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family Amer-Indian-Eskimo Male United-States 0 -26 0.2888889 0.1263901 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Own-child White Male United-States 0 -45 0.5 0.05482571 0.125 0 0 0.25252524 Private 1st-4th Married-civ-spouse Other-service Wife White Female El-Salvador 0 -70 0.7777778 0.0658925548 0.5625 0 0 0.04040404 ? HS-grad Widowed ? Unmarried White Female United-States 0 -57 0.6333333 0.121855862 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -28 0.311111122 0.1274233 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Sales Not-in-family White Male United-States 0 -35 0.3888889 0.09710482 0.75 0 0 0.161616161 ? Assoc-acdm Married-civ-spouse ? Wife White Female United-States 0 -36 0.4 0.4094066 0.625 0.07688077 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.139624372 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 -29 0.322222233 0.197394773 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -36 0.4 0.141746685 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Unmarried White Male United-States 0 -19 0.211111113 0.0278843269 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -27 0.3 0.110574156 0.8125 0 0 0.2020202 Private Bachelors Never-married Tech-support Unmarried Asian-Pac-Islander Female Philippines 0 -48 0.533333361 0.07604609 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Transport-moving Husband White Male United-States 1 -49 0.544444442 0.08504585 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.14030464 0.875 0 0.453856736 0.2020202 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 -61 0.677777767 0.0190549642 0.5625 0 0 0.828282833 Private HS-grad Divorced Farming-fishing Not-in-family White Female United-States 0 -42 0.466666669 0.08216986 0.625 0.1502415 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.0212978348 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.07300171 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 -32 0.355555564 0.09074328 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.140358523 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -35 0.3888889 0.07561839 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.116757207 0.6875 0 0 0.4040404 Private Assoc-voc Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.163796857 0.9375 0 0 0.2020202 Private Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -55 0.6111111 0.12489754 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.19560048 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.0539218225 0.5625 0 0 0.4848485 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -56 0.622222245 0.249238074 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.02487767 0.6875 0 0.459595948 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.1557077 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.080684714 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Own-child White Male United-States 0 -38 0.422222227 0.06882041 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -76 0.844444454 0.0909534246 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -35 0.3888889 0.2140358 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried Black Female United-States 0 -48 0.533333361 0.156825766 0.625 0 0 0.434343427 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 -35 0.3888889 0.0228833333 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.173096344 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -64 0.7111111 0.200916 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -22 0.244444445 0.209051639 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -45 0.5 0.122650631 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.33755663 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male Mexico 0 -43 0.477777779 0.09694788 0.5625 0 0 0.5050505 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 1 -23 0.25555557 0.057309702 0.625 0 0 0.373737365 Private Some-college Never-married Other-service Own-child White Female United-States 0 -25 0.2777778 0.190147549 0.375 0 0.3677686 0.4040404 Private 10th Never-married Handlers-cleaners Own-child Black Male United-States 0 -39 0.433333337 0.1549493 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -63 0.7 0.159181789 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -37 0.411111116 0.216839716 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.147357225 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Other Male United-States 0 -33 0.366666675 0.1289044 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male Canada 0 -45 0.5 0.12493863 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female ? 0 -28 0.311111122 0.08495223 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -20 0.222222224 0.134213865 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -34 0.377777785 0.172218055 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -34 0.377777785 0.137056187 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -41 0.455555558 0.136884436 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.137290582 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.126521438 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.07837112 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 0 -46 0.51111114 0.133804366 0.8125 1 0 0.727272749 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.0603729375 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Wife Asian-Pac-Islander Female South 0 -49 0.544444442 0.08124779 0.625 0 0 0.3030303 Private Some-college Widowed Sales Unmarried White Female United-States 0 -26 0.2888889 0.101182394 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -28 0.311111122 0.09287906 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -54 0.6 0.0987226442 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -53 0.5888889 0.05975935 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Other Female ? 0 -24 0.266666681 0.0956567153 0.625 0 0 0.5050505 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -23 0.25555557 0.19188863 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -55 0.6111111 0.143091053 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -58 0.644444466 0.136753768 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Separated Craft-repair Not-in-family White Male United-States 0 -26 0.2888889 0.153221682 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Other-relative Black Male ? 0 -19 0.211111113 0.07091577 0.375 0 0 0.2020202 Private 10th Never-married Other-service Other-relative Black Female United-States 0 -28 0.311111122 0.150699973 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried White Female United-States 0 -45 0.5 0.163664833 0.625 0 0 0.5252525 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -30 0.333333343 0.132272065 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -76 0.844444454 0.0782660544 0.5625 0 0 0.333333343 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -47 0.5222222 0.09432514 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.0899188742 0.625 0.0217402168 0 0.4040404 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 -40 0.444444448 0.1526128 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -24 0.266666681 0.0572780445 0.5625 0 0 0.25252524 Private HS-grad Separated Other-service Unmarried White Female United-States 0 -30 0.333333343 0.109410286 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -67 0.7444445 0.188576192 0.625 0.106051058 0 0.1010101 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -24 0.266666681 0.145862654 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -43 0.477777779 0.156235754 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -29 0.322222233 0.177715436 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Unmarried White Male United-States 0 -40 0.444444448 0.0841345638 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -61 0.677777767 0.120099284 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -45 0.5 0.1453905 1 0.07688077 0 0.454545468 Local-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.0264268 0.625 0 0 0.5050505 State-gov Some-college Never-married Tech-support Not-in-family White Female United-States 0 -58 0.644444466 0.235676453 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.0510801822 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -34 0.377777785 0.119020954 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -20 0.222222224 0.179513782 0.625 0.005940059 0 0.2020202 Private Some-college Never-married Prof-specialty Other-relative Black Female United-States 0 -25 0.2777778 0.0231069475 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 -46 0.51111114 0.223462582 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -54 0.6 0.07507822 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -43 0.477777779 0.1340098 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.194102541 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -21 0.233333334 0.133393511 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -65 0.722222269 0.163386 0.625 0.116781168 0 0.5050505 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 1 -37 0.411111116 0.116607681 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -29 0.322222233 0.05920705 0.5625 0.105201051 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 1 -44 0.4888889 0.116995633 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.06279025 0.625 0.07688077 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -38 0.422222227 0.217732817 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife Black Female United-States 0 -35 0.3888889 0.106449433 0.625 0.0501305 0 0.7070707 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.0899188742 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -44 0.4888889 0.1160473 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Separated Sales Unmarried White Male United-States 0 -39 0.433333337 0.135451153 0.8125 0 0 0.3030303 ? Bachelors Married-civ-spouse ? Wife White Female United-States 0 -23 0.25555557 0.118869409 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Other-relative White Female United-States 0 -25 0.2777778 0.123088427 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Never-married Sales Not-in-family White Male United-States 1 -23 0.25555557 0.0555645749 0.625 0 0 0.282828271 Private Some-college Never-married Sales Own-child White Female United-States 0 -47 0.5222222 0.140682489 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.0978436843 0.4375 0 0 0.454545468 Private 11th Divorced Craft-repair Not-in-family White Female United-States 0 -25 0.2777778 0.0129412916 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -35 0.3888889 0.100590356 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -68 0.75555557 0.0362698324 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband Amer-Indian-Eskimo Male United-States 0 -50 0.5555556 0.106616467 0.6875 0.03103031 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -47 0.5222222 0.10242641 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -35 0.3888889 0.127717629 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.229923114 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -21 0.233333334 0.135786578 0.5625 0.0217602178 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -35 0.3888889 0.182239577 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 -30 0.333333343 0.192156017 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Philippines 0 -17 0.188888893 0.08539003 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child Black Male United-States 0 -49 0.544444442 0.136642635 0.5625 0 0 0.4040404 ? HS-grad Separated ? Unmarried White Female Columbia 0 -27 0.3 0.251564443 0.1875 0 0 0.6060606 Private 5th-6th Never-married Other-service Not-in-family White Male El-Salvador 0 -22 0.244444445 0.16486305 0.5625 0 0 0.151515156 Private HS-grad Never-married Sales Own-child Black Female United-States 0 -22 0.244444445 0.0652399 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -50 0.5555556 0.109538257 0.5625 0 0 0.02020202 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.1076005 0.6875 0 0 0.3838384 Self-emp-not-inc Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -27 0.3 0.0249800477 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -27 0.3 0.225917608 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.12698482 0.25 0 0 0.353535354 Never-worked 7th-8th Divorced ? Not-in-family White Male United-States 0 -20 0.222222224 0.235309377 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Not-in-family White Female United-States 0 -42 0.466666669 0.0222279858 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.222747952 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.09891325 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.185573563 0.25 0 0 0.8080808 Private 7th-8th Widowed Other-service Unmarried White Female United-States 0 -22 0.244444445 0.0293970853 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Own-child White Male United-States 0 -34 0.377777785 0.10409341 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.0322670154 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.1605686 0.8125 0 0 0.24242425 Private Bachelors Divorced Priv-house-serv Unmarried White Female United-States 0 -48 0.533333361 0.131978408 0.625 0 0 0.424242437 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -22 0.244444445 0.238667622 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 -34 0.377777785 0.235177368 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Craft-repair Husband White Male Mexico 0 -25 0.2777778 0.106864326 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -23 0.25555557 0.0157863013 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.0722716 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.117327012 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -49 0.544444442 0.152805448 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -23 0.25555557 0.08417228 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 -57 0.6333333 0.144177467 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.2975002 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 -44 0.4888889 0.07064838 0.625 0 0 0.5858586 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.157867059 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 -29 0.322222233 0.126811728 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -29 0.322222233 0.164608464 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Unmarried Black Female United-States 0 -35 0.3888889 0.0208229925 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -48 0.533333361 0.147884592 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.254249841 0.5625 0 0 0.363636374 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -42 0.466666669 0.09243049 0.5625 0 0 0.5050505 Local-gov HS-grad Divorced Protective-serv Unmarried White Female United-States 0 -53 0.5888889 0.157182068 0.625 0 0 0.4040404 Private Some-college Widowed Exec-managerial Unmarried White Female United-States 0 -29 0.322222233 0.0478660762 0.9375 0 0 0.5555556 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 -59 0.655555546 0.131457761 0.8125 0 0 0.727272749 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -31 0.344444454 0.06643677 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -34 0.377777785 0.123780824 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.08285215 0.8125 0 0.5874656 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -25 0.2777778 0.111091428 0.5625 0.04416044 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -28 0.311111122 0.0993268043 0.5625 0 0 0.1010101 ? HS-grad Divorced ? Own-child White Female United-States 0 -30 0.333333343 0.138779089 0.5625 0 0.4242424 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.05489104 0.5625 0 0 0.4848485 Private HS-grad Divorced Handlers-cleaners Not-in-family White Female United-States 0 -45 0.5 0.127449557 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -23 0.25555557 0.09514618 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Other-relative Black Female United-States 0 -33 0.366666675 0.0659652948 0.75 0 0 0.424242437 Private Assoc-acdm Divorced Machine-op-inspct Not-in-family White Female United-States 0 -44 0.4888889 0.10832388 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 -25 0.2777778 0.3258708 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male El-Salvador 0 -48 0.533333361 0.100180171 0.625 0 0 0.4040404 State-gov Some-college Divorced Other-service Own-child White Male United-States 0 -23 0.25555557 0.195312873 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -33 0.366666675 0.03953782 0.6875 0.03103031 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -20 0.222222224 0.09881155 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Sales Other-relative White Female United-States 0 -23 0.25555557 0.283539832 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -71 0.788888931 0.0841641948 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.08181491 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -36 0.4 0.133519456 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.189100191 0.4375 0 0 0.6060606 Private 11th Never-married Craft-repair Other-relative White Male United-States 0 -40 0.444444448 0.1290115 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.175808 0.625 0 0 0.5050505 Private Some-college Divorced Machine-op-inspct Unmarried White Male United-States 0 -30 0.333333343 0.155615434 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 -30 0.333333343 0.229619354 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.112574555 0.8125 0.0501305 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -39 0.433333337 0.249743223 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -39 0.433333337 0.141178891 0.5625 0 0 0.5050505 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -74 0.822222233 0.1410745 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -32 0.355555564 0.0528926626 0.625 0.1502415 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.0598920323 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -64 0.7111111 0.05857864 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -47 0.5222222 0.111448407 0.5625 0.07298073 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -37 0.411111116 0.09050081 0.8125 0 0 0.373737365 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -47 0.5222222 0.134072423 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -33 0.366666675 0.123669013 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -40 0.444444448 0.1293065 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 1 -22 0.244444445 0.346218944 0.5625 0 0 0.8080808 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 -56 0.622222245 0.1160931 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.128042281 0.5625 0 0 0.5555556 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -30 0.333333343 0.08043484 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -20 0.222222224 0.159352869 0.5 0 0 0.353535354 Private 12th Never-married Prof-specialty Not-in-family White Female Italy 0 -53 0.5888889 0.029603187 0.875 0.1502415 0 0.3838384 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.131094053 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.158855125 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -43 0.477777779 0.1013858 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.143949136 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -20 0.222222224 0.0279058814 0.625 0 0 0.464646459 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -22 0.244444445 0.192479312 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 -38 0.422222227 0.31700775 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -54 0.6 0.07713317 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.076423265 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -46 0.51111114 0.151248232 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -59 0.655555546 0.125536725 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.112543568 0.375 0 0 0.5050505 ? 10th Divorced ? Not-in-family White Male United-States 0 -18 0.2 0.14582561 0.5 0 0 0.25252524 ? 12th Never-married ? Not-in-family White Male United-States 0 -41 0.455555558 0.2587962 0.6875 0 0 0.4040404 Local-gov Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 -42 0.466666669 0.122088231 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 -58 0.644444466 0.128643066 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.06619968 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.06968118 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -28 0.311111122 0.124417312 0.8125 0 0.454545438 0.353535354 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -25 0.2777778 0.111552127 0.875 0 0 0.5555556 Private Masters Never-married Sales Not-in-family White Male United-States 0 -29 0.322222233 0.06842908 0.625 0 0 0.545454562 Private Some-college Divorced Sales Unmarried White Female United-States 0 -53 0.5888889 0.0985906348 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 -63 0.7 0.102487028 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -26 0.2888889 0.07194156 0.6875 0 0 0.3838384 State-gov Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 -21 0.233333334 0.09982522 0.5625 0.0367403664 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -45 0.5 0.126342267 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.0911265239 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -72 0.8 0.09733584 1 0 0.288797051 0.4040404 Local-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 0 -51 0.566666663 0.141937956 0.375 0 0 0.4040404 Private 10th Married-spouse-absent Craft-repair Other-relative White Male United-States 0 -21 0.233333334 0.141553372 0.3125 0 0 0.4040404 Private 9th Married-spouse-absent Handlers-cleaners Own-child White Male United-States 0 -38 0.422222227 0.15126507 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried Black Female United-States 0 -38 0.422222227 0.0544020534 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -46 0.51111114 0.110953353 0.875 0 0 0.414141417 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -31 0.344444454 0.08042742 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 -68 0.75555557 0.11961703 0.375 0 0 0.909090936 Local-gov 10th Separated Other-service Not-in-family Black Female United-States 0 -43 0.477777779 0.266797781 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -21 0.233333334 0.124772936 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -44 0.4888889 0.116918854 0.8125 0 0 0.0303030312 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -56 0.622222245 0.132219538 1 0 0 0.4040404 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.1974069 0.5625 0 0 0.121212125 ? HS-grad Never-married ? Own-child White Male United-States 0 -36 0.4 0.118024796 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.0343819149 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.22537677 0.625 1 0 0.4040404 Private Some-college Never-married Protective-serv Not-in-family Black Female United-States 1 -52 0.5777778 0.1029127 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -56 0.622222245 0.138479367 1 1 0 0.7070707 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.08700516 0.8125 0 0.6483012 0.2020202 Private Bachelors Widowed Other-service Not-in-family White Female United-States 1 -51 0.566666663 0.08186677 0.8125 0 0 0.25252524 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.164723635 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 -36 0.4 0.0505642556 0.625 0 0 0.5555556 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 -29 0.322222233 0.120568059 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -21 0.233333334 0.115039691 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 -58 0.644444466 0.251460046 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -37 0.411111116 0.08618615 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -50 0.5555556 0.066943936 0.625 0 0 0.454545468 Private Some-college Divorced Craft-repair Not-in-family Black Female United-States 0 -30 0.333333343 0.264572442 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male Germany 0 -29 0.322222233 0.176787987 0.5625 0 0 0.3030303 Private HS-grad Never-married Farming-fishing Own-child Black Male United-States 0 -48 0.533333361 0.022108769 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.1127362 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -39 0.433333337 0.1368649 0.75 0 0 0.25252524 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 -35 0.3888889 0.0708140656 0.9375 0 0 0.5555556 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -54 0.6 0.0981434062 0.5625 0.07688077 0 0.25252524 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -24 0.266666681 0.12276917 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -20 0.222222224 0.1854813 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -30 0.333333343 0.196989983 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband Amer-Indian-Eskimo Male United-States 1 -19 0.211111113 0.0495142154 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -26 0.2888889 0.134437487 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family Black Male United-States 0 -38 0.422222227 0.0750984251 0.5625 0 0.453856736 1 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -25 0.2777778 0.136431143 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -33 0.366666675 0.0668880343 0.625 0 0 0.5050505 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 -60 0.6666667 0.08418305 0.8125 0.07298073 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.1939685 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -30 0.333333343 0.08042742 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -19 0.211111113 0.133809745 0.25 0 0 0.4040404 Private 7th-8th Never-married Other-service Not-in-family White Female United-States 0 -23 0.25555557 0.07919621 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -27 0.3 0.158054292 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.07702339 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 -39 0.433333337 0.119181253 0.75 0 0 0.5252525 State-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 -33 0.366666675 0.12777622 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -65 0.722222269 0.138282686 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -34 0.377777785 0.131727174 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.146039113 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child White Female Mexico 0 -23 0.25555557 0.221710041 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 -25 0.2777778 0.132710546 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Own-child White Male United-States 0 -28 0.311111122 0.12210574 0.8125 0 0.359045 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 -31 0.344444454 0.139092952 0.4375 0 0 0.25252524 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -28 0.311111122 0.0258024335 0.8125 0.068490684 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -37 0.411111116 0.210658684 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -52 0.5777778 0.094073236 0.625 0 0.453856736 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -66 0.733333349 0.0260125753 0.6875 0.0327303261 0 0.4040404 Federal-gov Assoc-voc Widowed Other-service Unmarried Black Female United-States 0 -31 0.344444454 0.08407529 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -37 0.411111116 0.0524144545 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.0383268073 0.8125 0.0501305 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -45 0.5 0.128049016 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Unmarried White Male United-States 0 -44 0.4888889 0.071854 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.0286898743 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -35 0.3888889 0.0963545 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -53 0.5888889 0.0691147447 0.4375 0 0 0.4040404 Private 11th Divorced Transport-moving Not-in-family White Male Canada 0 -54 0.6 0.09409479 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Germany 1 -43 0.477777779 0.1617318 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.0892871 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 -49 0.544444442 0.218089119 0.625 0.0332503319 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -52 0.5777778 0.0649011061 1 0 0 0.575757563 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.111268573 0.625 0 0 0.04040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -60 0.6666667 0.111557513 0.5625 0 0.453856736 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -45 0.5 0.178167388 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Machine-op-inspct Own-child White Male United-States 0 -48 0.533333361 0.0689423159 0.8125 0.07298073 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.0251625758 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -61 0.677777767 0.156676248 0.9375 0 0 0.4040404 ? Prof-school Married-civ-spouse ? Husband White Male United-States 1 -48 0.533333361 0.077791214 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.106248043 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -27 0.3 0.0276815947 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -38 0.422222227 0.3183151 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Other-service Husband White Male Mexico 0 -33 0.366666675 0.23480624 0.1875 0 0 0.2020202 Private 5th-6th Married-spouse-absent Transport-moving Unmarried Other Male El-Salvador 0 -43 0.477777779 0.09133532 0.875 0 0 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 1 -36 0.4 0.16733627 0.5625 0 0 0.6060606 Private HS-grad Separated Transport-moving Other-relative White Male Mexico 0 -38 0.422222227 0.0754985 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.133058086 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Tech-support Not-in-family White Female United-States 0 -22 0.244444445 0.204634592 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Own-child White Male United-States 0 -30 0.333333343 0.194359154 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -55 0.6111111 0.3282881 0.875 0 0 0.4040404 ? Masters Married-civ-spouse ? Husband White Male United-States 1 -46 0.51111114 0.0291963723 0.9375 0.1502415 0 0.5555556 Self-emp-not-inc Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.161250219 0.5625 0 0 0.5050505 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -50 0.5555556 0.227389291 0.5625 0 0.3409091 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.02190873 0.6875 0 0.223599628 0.4040404 Private Assoc-voc Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 -47 0.5222222 0.07977814 0.8125 0 0 0.6060606 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.158071816 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.09497038 0.5625 0 0 0.6060606 ? HS-grad Never-married ? Own-child White Male United-States 0 -43 0.477777779 0.145511732 0.625 0 0.371212125 0.727272749 Private Some-college Divorced Tech-support Own-child White Female United-States 0 -45 0.5 0.1282962 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 -55 0.6111111 0.2572666 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Other-relative White Male United-States 0 -68 0.75555557 0.125912562 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.0961180851 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -39 0.433333337 0.0359983966 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family White Female United-States 0 -37 0.411111116 0.08605885 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -19 0.211111113 0.2319747 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -20 0.222222224 0.130758643 0.4375 0 0 0.2020202 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -49 0.544444442 0.3759555 0.6875 0 0 0.4040404 ? Assoc-voc Married-spouse-absent ? Unmarried White Female United-States 0 -33 0.366666675 0.1011339 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.206178337 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -72 0.8 0.1192971 0.8125 0 0 0.0303030312 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -58 0.644444466 0.2483975 0.875 0 0 0.353535354 Local-gov Masters Widowed Prof-specialty Unmarried White Male United-States 1 -43 0.477777779 0.118350111 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Never-married Exec-managerial Not-in-family Black Male United-States 0 -62 0.6888889 0.2807487 0.4375 0 0 0.212121218 Private 11th Separated Other-service Not-in-family Black Female United-States 0 -21 0.233333334 0.235737741 0.625 0 0 0.2020202 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -26 0.2888889 0.2289694 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -27 0.3 0.07743424 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.110587627 0.625 0 0.43663913 0.3838384 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.111832991 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Other-service Unmarried White Female United-States 0 -28 0.311111122 0.168474555 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Other-relative White Female United-States 0 -34 0.377777785 0.15825367 0.8125 0 0.4331956 0.4848485 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -29 0.322222233 0.06979703 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -58 0.644444466 0.2896232 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 -45 0.5 0.07174287 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -47 0.5222222 0.109271541 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Craft-repair Not-in-family White Female United-States 0 -53 0.5888889 0.0622547939 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -52 0.5777778 0.0273731146 0.375 0.0501305 0 0.4040404 Local-gov 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.114088662 0.4375 0 0 0.151515156 Private 11th Divorced Other-service Unmarried White Female United-States 0 -36 0.4 0.276172042 0.8125 0 0.4331956 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.159981281 0.8125 0.07688077 0 0.656565666 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.101068564 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.100052871 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.0510148481 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.119670242 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Germany 1 -49 0.544444442 0.13015987 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 -17 0.188888893 0.179208666 0.375 0 0 0.2020202 Private 10th Never-married Other-service Not-in-family White Male El-Salvador 0 -28 0.311111122 0.0539938919 0.625 0 0 0.3030303 ? Some-college Divorced ? Not-in-family White Female United-States 0 -25 0.2777778 0.228546411 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -69 0.7666667 0.07492263 0.3125 0 0 0.2020202 ? 9th Married-civ-spouse ? Husband White Male United-States 0 -41 0.455555558 0.191341713 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Divorced Sales Not-in-family White Male United-States 0 -31 0.344444454 0.138782457 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -57 0.6333333 0.287102818 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Unmarried White Male United-States 1 -49 0.544444442 0.06909319 0.625 0 0.4242424 0.444444448 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.187004834 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.0840624943 0.6875 0 0.453856736 0.5050505 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male Germany 1 -47 0.5222222 0.13003324 0.625 0 0 0.6060606 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -50 0.5555556 0.0817744955 0.5 0 0 0.4040404 Private 12th Divorced Transport-moving Not-in-family White Male United-States 0 -36 0.4 0.0600806251 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -17 0.188888893 0.156866178 0.4375 0 0 0.25252524 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -30 0.333333343 0.2150461 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -79 0.8777778 0.111273959 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -42 0.466666669 0.130324885 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -67 0.7444445 0.131383672 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -36 0.4 0.06677825 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -35 0.3888889 0.0619840324 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.117477208 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -21 0.233333334 0.0390084237 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Own-child White Male United-States 0 -46 0.51111114 0.258222342 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -45 0.5 0.133510023 0.8125 0 0.43663913 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -20 0.222222224 0.0739628449 0.4375 0 0 0.4040404 Private 11th Never-married Tech-support Other-relative White Male United-States 0 -17 0.188888893 0.117395714 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 -40 0.444444448 0.03077177 0.625 0.04787048 0 0.5050505 Private Some-college Divorced Other-service Not-in-family Black Male United-States 1 -28 0.311111122 0.177553117 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.06474552 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -55 0.6111111 0.148354053 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -55 0.6111111 0.0238027088 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.18891497 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Female United-States 0 -52 0.5777778 0.17121987 0.875 0.1502415 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.23662883 0.625 0 0 0.4040404 Private Some-college Never-married Sales Unmarried White Female United-States 0 -36 0.4 0.0394704677 0.1875 0 0 0.353535354 Private 5th-6th Never-married Other-service Not-in-family White Male United-States 0 -37 0.411111116 0.0437272042 0.8125 0 0 0.7070707 Private Bachelors Separated Other-service Not-in-family White Male England 0 -41 0.455555558 0.125018775 0.5625 0 0.454545438 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.125164255 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -24 0.266666681 0.171594366 0.25 0.02105021 0 0.5050505 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -39 0.433333337 0.0217632465 0.8125 0 0 0.6060606 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.07369882 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -42 0.466666669 0.123394884 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -39 0.433333337 0.105675541 0.5625 0 0.518365443 0.424242437 Private HS-grad Never-married Craft-repair Own-child White Male United-States 1 -48 0.533333361 0.0982592553 0.8125 0 0 0.6060606 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -47 0.5222222 0.0200841241 0.875 0 0.453856736 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -27 0.3 0.164723635 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -29 0.322222233 0.170943722 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Ecuador 0 -22 0.244444445 0.122120559 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 -37 0.411111116 0.101411395 0.5625 0 0 0.444444448 State-gov HS-grad Separated Craft-repair Not-in-family White Male United-States 0 -38 0.422222227 0.160107911 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.07552814 0.0625 0.04508045 0 0.4040404 Private Preschool Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female Cambodia 0 -48 0.533333361 0.1266036 0.875 0 0 0.8080808 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -46 0.51111114 0.150944471 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -51 0.566666663 0.117702849 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -28 0.311111122 0.1479789 0.8125 0.0501305 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.112522021 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -18 0.2 0.128190458 0.4375 0 0 0.3030303 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -45 0.5 0.07332029 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Female United-States 0 -36 0.4 0.231932268 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Transport-moving Own-child White Male United-States 0 -73 0.811111152 0.103136316 0.625 0 0 0.1010101 Private Some-college Widowed Priv-house-serv Unmarried White Female United-States 0 -52 0.5777778 0.121829592 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -17 0.188888893 0.123301268 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Female United-States 0 -29 0.322222233 0.228329539 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.124927178 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female ? 1 -20 0.222222224 0.115879588 0.625 0 0 0.1010101 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -42 0.466666669 0.06371636 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -37 0.411111116 0.203814223 0.625 0 0 0.4040404 Private Some-college Separated Other-service Other-relative White Female United-States 0 -40 0.444444448 0.167099863 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.0245617814 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 -29 0.322222233 0.0358192362 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.121931292 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 -26 0.2888889 0.167703345 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Adm-clerical Husband White Male United-States 1 -25 0.2777778 0.02728623 0.8125 0.0367403664 0 0.3030303 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -37 0.411111116 0.07906015 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -18 0.2 0.116605654 0.5 0 0 0.24242425 ? 12th Never-married ? Own-child White Female United-States 0 -33 0.366666675 0.213283449 0.625 0 0 0.5050505 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -26 0.2888889 0.104374945 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Puerto-Rico 0 -24 0.266666681 0.133534268 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 -33 0.366666675 0.11311271 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Own-child White Female United-States 0 -23 0.25555557 0.08841824 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Amer-Indian-Eskimo Male United-States 0 -20 0.222222224 0.159306392 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child Black Male United-States 0 -36 0.4 0.183841243 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -37 0.411111116 0.117533788 0.8125 0 0 0.5050505 Private Bachelors Widowed Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.0786688253 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Machine-op-inspct Own-child White Male United-States 0 -38 0.422222227 0.0745690241 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -50 0.5555556 0.1360836 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -44 0.4888889 0.202415973 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Adm-clerical Husband White Male United-States 1 -46 0.51111114 0.0370342955 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -57 0.6333333 0.08966495 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Female United-States 0 -37 0.411111116 0.0502409562 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.203692988 0.5625 0 0 0.5555556 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -21 0.233333334 0.232027248 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 -31 0.344444454 0.235163212 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -32 0.355555564 0.1496735 0.6875 0.07298073 0 0.424242437 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.158077866 0.5625 0 0 0.6060606 Private HS-grad Married-spouse-absent Other-service Unmarried Black Female United-States 1 -20 0.222222224 0.163788766 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -52 0.5777778 0.12778835 0.5625 0 0 0.5050505 Private HS-grad Separated Priv-house-serv Not-in-family White Female United-States 0 -47 0.5222222 0.214583367 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.0732004046 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -40 0.444444448 0.1262042 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.0507905632 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -46 0.51111114 0.116239257 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.179261208 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -65 0.722222269 0.182589814 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female ? 0 -50 0.5555556 0.09136024 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Other-relative Asian-Pac-Islander Female China 0 -59 0.655555546 0.0312964544 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -18 0.2 0.08799863 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -47 0.5222222 0.07709208 0.875 0.07688077 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.07397564 0.5625 0.05178052 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male Canada 1 -45 0.5 0.131712362 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -17 0.188888893 0.164739132 0.4375 0 0 0.4040404 Private 11th Never-married Sales Own-child White Female United-States 0 -45 0.5 0.1831347 0.5625 0 0 0.323232323 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -73 0.811111152 0.09428001 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -48 0.533333361 0.121536605 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -64 0.7111111 0.120376781 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -38 0.422222227 0.230108336 0.75 0 0 0.6060606 State-gov Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 0 -37 0.411111116 0.195091277 0.5625 0 0 0.5050505 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -62 0.6888889 0.07996538 0.5625 0.200512 0 0.727272749 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -26 0.2888889 0.126551062 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Male United-States 0 -46 0.51111114 0.07835765 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 -46 0.51111114 0.06921981 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 -51 0.566666663 0.0603837147 0.5625 0.04787048 0 0.24242425 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 1 -54 0.6 0.296091139 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -65 0.722222269 0.222363368 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.169666708 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.147473738 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -36 0.4 0.127279162 1 0 0 0.1010101 Self-emp-not-inc Doctorate Separated Prof-specialty Unmarried White Female Canada 0 -60 0.6666667 0.0173940286 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 -33 0.366666675 0.136084944 0.8125 0 0.459366381 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family White Male United-States 0 -62 0.6888889 0.07820005 0.5625 0 0 0.2020202 Private HS-grad Widowed Adm-clerical Not-in-family White Female Germany 0 -20 0.222222224 0.1312658 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.08456226 0.5625 0.14084141 0 0.353535354 Private HS-grad Never-married Tech-support Not-in-family White Female United-States 1 -66 0.733333349 0.07844521 0.875 0.0293602925 0 0.2020202 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -32 0.355555564 0.192045555 0.75 0 0 0.2020202 ? Assoc-acdm Never-married ? Unmarried White Male United-States 0 -29 0.322222233 0.275610983 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -70 0.7777778 0.2558212 0.625 0.105661057 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -74 0.822222233 0.0654453263 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -37 0.411111116 0.164883256 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male ? 0 -51 0.566666663 0.07802965 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.0795161352 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.174168617 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Not-in-family White Male United-States 1 -26 0.2888889 0.106964014 0.8125 0 0 0.7070707 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.0622554645 0.625 0 0.5121671 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 1 -58 0.644444466 0.111601293 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -30 0.333333343 0.06552211 0.625 0 0 0.6060606 ? Some-college Separated ? Not-in-family White Male United-States 0 -32 0.355555564 0.164441422 0.8125 0 0.430670351 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -66 0.733333349 0.17090331 0.5625 0 0.418962359 0.1010101 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.114825509 0.625 0 0 0.454545468 Private Some-college Never-married Sales Own-child White Male United-States 0 -35 0.3888889 0.162322491 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -50 0.5555556 0.111133866 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.200118542 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child White Female United-States 0 -35 0.3888889 0.229176849 0.5625 0 0 0.4848485 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -31 0.344444454 0.06498261 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.1247231 0.4375 0 0 0.4949495 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -84 0.933333337 0.116458826 0.625 0 0 0.353535354 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.208037287 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 -45 0.5 0.036436867 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 -46 0.51111114 0.194387436 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -50 0.5555556 0.171177447 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -37 0.411111116 0.07484854 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -32 0.355555564 0.115252525 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Own-child White Female United-States 0 -53 0.5888889 0.06470107 0.8125 0 0.43663913 0.4848485 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.186418176 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -22 0.244444445 0.1029686 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.100498751 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -35 0.3888889 0.0392960235 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.08594368 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Handlers-cleaners Wife White Female United-States 0 -29 0.322222233 0.240977839 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -26 0.2888889 0.0925214142 0.625 0 0 0.444444448 Private Some-college Never-married Handlers-cleaners Other-relative Asian-Pac-Islander Male Philippines 0 -34 0.377777785 0.07474751 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female United-States 0 -31 0.344444454 0.02323896 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.0566570461 0.625 0 0.4708448 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.150545061 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -37 0.411111116 0.250908434 0.875 0 0 0.4848485 Private Masters Divorced Prof-specialty Unmarried White Male United-States 0 -32 0.355555564 0.07837584 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -36 0.4 0.0749428347 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Sales Unmarried White Female United-States 0 -54 0.6 0.1519487 0.875 0.07298073 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -78 0.8666667 0.05624754 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male Portugal 0 -46 0.51111114 0.134434789 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -18 0.2 0.203317836 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child Amer-Indian-Eskimo Female United-States 0 -57 0.6333333 0.129307166 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -37 0.411111116 0.07126197 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -43 0.477777779 0.307290673 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.07830175 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family Black Female United-States 0 -32 0.355555564 0.158354014 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -38 0.422222227 0.06177389 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -25 0.2777778 0.08156637 0.75 0 0.459366381 0.3030303 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 -70 0.7777778 0.158806637 0.625 0 0 0.4040404 Private Some-college Divorced Farming-fishing Not-in-family Asian-Pac-Islander Male Vietnam 0 -40 0.444444448 0.0922647938 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -40 0.444444448 0.0226698238 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -20 0.222222224 0.03628869 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -29 0.322222233 0.135331944 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.117017187 0.6875 0 0 0.5555556 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.1443957 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Own-child Black Female United-States 0 -58 0.644444466 0.0690433457 0.375 0 0 0.5050505 Private 10th Divorced Transport-moving Not-in-family Black Male United-States 0 -38 0.422222227 0.11655312 0.8125 0 0.04889807 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried Asian-Pac-Islander Female Philippines 0 -59 0.655555546 0.162521854 0.625 0.068490684 0 0.4040404 Self-emp-not-inc Some-college Widowed Farming-fishing Not-in-family White Female United-States 0 -18 0.2 0.221629217 0.4375 0 0 0.151515156 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.184654862 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -39 0.433333337 0.162424862 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.1347857 0.8125 0 0.4331956 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 1 -45 0.5 0.154586941 0.5625 0 0 0.727272749 Private HS-grad Married-spouse-absent Craft-repair Not-in-family White Male Mexico 0 -62 0.6888889 0.168444917 0.8125 0 0 0.05050505 ? Bachelors Divorced ? Not-in-family White Male United-States 0 -24 0.266666681 0.166413531 0.5625 0 0 0.2020202 State-gov HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -22 0.244444445 0.2125163 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child Black Male Dominican-Republic 0 -23 0.25555557 0.0855018348 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -39 0.433333337 0.0201211683 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Separated Craft-repair Not-in-family White Male United-States 1 -28 0.311111122 0.0778464451 0.6875 0 0 0.3838384 Private Assoc-voc Never-married Tech-support Own-child White Female United-States 0 -51 0.566666663 0.01992315 0.4375 0.04386044 0 0.3030303 Private 11th Married-civ-spouse Sales Husband White Male United-States 1 -44 0.4888889 0.03804325 0.8125 0 0 0.373737365 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -73 0.811111152 0.06051842 0.125 0 0 0.4040404 ? 1st-4th Married-civ-spouse ? Husband White Male Portugal 0 -24 0.266666681 0.283409178 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Farming-fishing Husband Black Male United-States 0 -24 0.266666681 0.172070548 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 -52 0.5777778 0.162620857 0.125 0 0 0.5050505 Private 1st-4th Married-civ-spouse Craft-repair Husband Other Male Puerto-Rico 0 -43 0.477777779 0.0579205975 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -67 0.7444445 0.07879411 0.5 0 0 0.2020202 Self-emp-inc 12th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.146804929 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Not-in-family Black Male ? 0 -36 0.4 0.0138121713 0.5625 0.07688077 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.123997025 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.07935314 0.25 0 0 0.7070707 Private 7th-8th Divorced Handlers-cleaners Other-relative White Male United-States 0 -23 0.25555557 0.177745074 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Black Male Haiti 0 -26 0.2888889 0.030894354 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 -48 0.533333361 0.125640452 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -40 0.444444448 0.219781041 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.05695677 0.9375 0 0 0.3939394 Local-gov Prof-school Divorced Prof-specialty Not-in-family White Female United-States 0 -49 0.544444442 0.166561037 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.049028594 0.8125 0 0 0.151515156 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -29 0.322222233 0.176045075 0.5625 0 0 0.6060606 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -50 0.5555556 0.0524717048 0.8125 0 0 0.08080808 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.0450176969 0.625 0 0 0.09090909 Private Some-college Never-married Sales Own-child White Female United-States 0 -63 0.7 0.131125048 1 0 0.43663913 0.5050505 State-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -66 0.733333349 0.121378325 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 0 -65 0.722222269 0.0533924252 0.625 0 0 0.0606060624 ? Some-college Widowed ? Not-in-family Asian-Pac-Islander Female United-States 0 -60 0.6666667 0.06816034 0.6875 0 0 0.2020202 Private Assoc-voc Divorced Other-service Not-in-family White Male United-States 0 -60 0.6666667 0.054269366 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -19 0.211111113 0.133806378 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Own-child White Male United-States 0 -26 0.2888889 0.107994519 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -75 0.8333334 0.138653815 0.625 0 0.398301184 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 -58 0.644444466 0.0468638577 0.625 0 0 0.2020202 State-gov Some-college Widowed Prof-specialty Not-in-family White Female United-States 0 -18 0.2 0.255432576 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -65 0.722222269 0.07632695 0.75 0.03818038 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 -50 0.5555556 0.210464031 0.5625 0 0.4331956 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.174785569 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -45 0.5 0.115400031 0.875 0 0 0.5050505 Federal-gov Masters Married-civ-spouse Sales Husband White Male United-States 1 -19 0.211111113 0.3645721 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -29 0.322222233 0.105051175 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -52 0.5777778 0.06713927 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Sales Wife White Female Canada 1 -23 0.25555557 0.07933495 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -21 0.233333334 0.199472621 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -48 0.533333361 0.0531142578 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Exec-managerial Own-child White Female United-States 0 -59 0.655555546 0.126671627 0.875 0 0 0.353535354 ? Masters Married-civ-spouse ? Husband White Male United-States 1 -50 0.5555556 0.127844259 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.348911077 0.8125 0 0.365013778 0.4040404 State-gov Bachelors Never-married Protective-serv Not-in-family Black Male Puerto-Rico 0 -32 0.355555564 0.242871821 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Unmarried Black Female United-States 0 -40 0.444444448 0.0980019644 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband Black Male United-States 0 -19 0.211111113 0.309319377 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -30 0.333333343 0.19426015 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Husband White Male Mexico 0 -42 0.466666669 0.0849286541 0.5625 0 0 0.3939394 State-gov HS-grad Separated Adm-clerical Unmarried White Male United-States 0 -23 0.25555557 0.141094029 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -37 0.411111116 0.0217140783 0.5625 0.2782828 0 0.4040404 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 1 -21 0.233333334 0.141681343 0.4375 0 0 0.24242425 Private 11th Never-married Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.05694532 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -50 0.5555556 0.175508946 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 -20 0.222222224 0.0711151361 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Male United-States 0 -21 0.233333334 0.08912209 0.4375 0 0 0.353535354 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.08700179 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Other-relative White Male United-States 0 -45 0.5 0.149776563 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -49 0.544444442 0.135715857 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.1695118 0.625 0.0861408561 0 0.5050505 Self-emp-inc Some-college Divorced Sales Not-in-family White Male Cuba 1 -41 0.455555558 0.07688867 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 -48 0.533333361 0.0997646 0.8125 0 0 0.4040404 Local-gov Bachelors Married-spouse-absent Adm-clerical Unmarried Asian-Pac-Islander Female Philippines 0 -73 0.811111152 0.0566125959 0.5625 0 0 0.151515156 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -34 0.377777785 0.06498261 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Unmarried White Female United-States 0 -24 0.266666681 0.120847575 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -58 0.644444466 0.08306634 0.5625 0 0 0.161616161 State-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -41 0.455555558 0.09034118 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -53 0.5888889 0.127058238 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Other-service Husband White Male Mexico 0 -40 0.444444448 0.152480125 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -28 0.311111122 0.140906781 0.625 0.07298073 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -32 0.355555564 0.141312927 0.625 0 0.399449021 0.474747479 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.0378768854 0.625 0.0220202189 0 0.454545468 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family Black Male United-States 0 -18 0.2 0.0192954168 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Other-relative White Female United-States 0 -37 0.411111116 0.0235710125 0.5625 0 0 0.4040404 State-gov HS-grad Separated Other-service Unmarried White Female United-States 0 -43 0.477777779 0.18954742 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Adm-clerical Not-in-family Black Female United-States 0 -22 0.244444445 0.14461863 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.211609051 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Other-relative Black Male United-States 0 -51 0.566666663 0.07564466 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -63 0.7 0.137254879 0.5625 0 0 0.727272749 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 -29 0.322222233 0.138410658 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -44 0.4888889 0.0979595259 0.8125 0.07298073 0 0.4848485 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.104869992 0.25 0 0 0.3838384 Private 7th-8th Separated Other-service Unmarried White Female Peru 0 -37 0.411111116 0.1259065 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -62 0.6888889 0.141060352 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -31 0.344444454 0.0545111671 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.06910935 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -48 0.533333361 0.171622649 0.375 0 0.365932047 0.323232323 Private 10th Divorced Machine-op-inspct Unmarried White Female United-States 0 -24 0.266666681 0.0693349838 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Other-service Not-in-family White Female United-States 0 -56 0.622222245 0.117906928 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.0463263765 0.625 0 0 0.353535354 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -29 0.322222233 0.0731418058 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -34 0.377777785 0.06619699 0.9375 0 0.359045 0.4040404 Private Prof-school Never-married Tech-support Not-in-family Asian-Pac-Islander Male India 1 -39 0.433333337 0.03789911 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child Black Male United-States 0 -29 0.322222233 0.102716029 0.625 0 0 0.454545468 Private Some-college Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -38 0.422222227 0.139388636 0.5625 0 0 0.656565666 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.05549453 0.3125 0 0 0.2020202 Private 9th Never-married Other-service Own-child Asian-Pac-Islander Male Philippines 0 -37 0.411111116 0.112746976 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Guatemala 0 -30 0.333333343 0.0831121355 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Divorced Other-service Unmarried White Female United-States 0 -58 0.644444466 0.09944939 0.625 0 0 0.363636374 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -42 0.466666669 0.07991622 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 -59 0.655555546 0.07705302 0.5625 0 0.3452709 0.1919192 Local-gov HS-grad Widowed Other-service Not-in-family White Female United-States 0 -45 0.5 0.12546061 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 -46 0.51111114 0.123047344 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.15559724 0.875 0.046500463 0 0.373737365 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -41 0.455555558 0.0410512537 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -49 0.544444442 0.08723147 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -37 0.411111116 0.056783 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -31 0.344444454 0.0791450143 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -22 0.244444445 0.05930471 0.75 0 0 0.0606060624 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 0 -22 0.244444445 0.205763444 0.5625 0 0 0.333333343 Private HS-grad Divorced Sales Own-child White Female United-States 0 -17 0.188888893 0.198900118 0.4375 0 0 0.2020202 Private 11th Never-married Priv-house-serv Own-child White Female United-States 0 -47 0.5222222 0.07709208 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.118553519 0.375 0 0 0.151515156 Private 10th Never-married Other-service Other-relative White Male United-States 0 -39 0.433333337 0.16733627 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -23 0.25555557 0.144501433 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -41 0.455555558 0.2589794 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.271763742 0.875 0 0 0.454545468 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.09695731 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.171686634 0.5625 0 0 0.3030303 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 -33 0.366666675 0.06667655 0.375 0 0 0.363636374 Private 10th Divorced Handlers-cleaners Not-in-family White Female United-States 0 -17 0.188888893 0.1596802 0.4375 0 0 0.353535354 ? 11th Never-married ? Own-child White Female United-States 0 -41 0.455555558 0.130662322 0.5625 0 0 0.444444448 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -19 0.211111113 0.138632923 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Female United-States 0 -38 0.422222227 0.138648421 0.5625 0 0 0.454545468 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Male United-States 1 -24 0.266666681 0.02496927 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -38 0.422222227 0.185449645 0.8125 0.0115101151 0 0.4040404 Private Bachelors Divorced Sales Unmarried White Female United-States 0 -39 0.433333337 0.0824089646 0.8125 0 0 0.454545468 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.06735951 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 -31 0.344444454 0.0249409825 0.75 0 0 0.25252524 ? Assoc-acdm Never-married ? Own-child White Female United-States 0 -42 0.466666669 0.0909648761 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -36 0.4 0.09103627 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Own-child White Male ? 0 -29 0.322222233 0.1890059 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -17 0.188888893 0.152701721 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 -47 0.5222222 0.117153242 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.196237639 0.625 0 0 0.6060606 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -61 0.677777767 0.107869916 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.0200457331 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.05554841 0.3125 0 0 0.25252524 ? 9th Divorced ? Not-in-family White Female United-States 0 -59 0.655555546 0.115895756 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Prof-specialty Wife Black Female Jamaica 0 -29 0.322222233 0.11194817 0.625 0 0 0.5555556 Private Some-college Divorced Tech-support Not-in-family White Male United-States 0 -26 0.2888889 0.222443521 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Male United-States 0 -46 0.51111114 0.166391984 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -56 0.622222245 0.104558147 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -25 0.2777778 0.08793464 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -17 0.188888893 0.0383820347 0.5 0 0 0.181818187 Private 12th Never-married Sales Own-child White Female United-States 0 -29 0.322222233 0.148643672 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Not-in-family Black Female United-States 0 -23 0.25555557 0.08193547 0.1875 0 0 0.3030303 Private 5th-6th Never-married Handlers-cleaners Unmarried White Male United-States 0 -67 0.7444445 0.117601141 0.5625 0 0 0.353535354 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -29 0.322222233 0.230245069 0.875 0 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.06690824 0.75 0 0.2020202 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.0231945068 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -34 0.377777785 0.09500743 0.625 0 0 0.6262626 Private Some-college Married-civ-spouse Other-service Husband White Male Mexico 0 -49 0.544444442 0.129536167 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -54 0.6 0.0792574957 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male ? 0 -39 0.433333337 0.0192442276 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -41 0.455555558 0.08101071 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -31 0.344444454 0.11066778 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -47 0.5222222 0.06921981 1 0 0 0.4040404 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.0996501 0.5625 0 0 0.01010101 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 -23 0.25555557 0.126899958 0.4375 0.04508045 0 0.25252524 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -44 0.4888889 0.117119566 0.25 0 0 0.8080808 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 1 -25 0.2777778 0.166367054 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.0558286 0.625 0 0 0.161616161 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -52 0.5777778 0.174689919 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -62 0.6888889 0.107203119 0.5625 0 0 0.363636374 Federal-gov HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 -31 0.344444454 0.07547762 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -19 0.211111113 0.201420486 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.125581846 0.625 0 0 0.363636374 ? Some-college Never-married ? Own-child White Male United-States 0 -53 0.5888889 0.369487554 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Guatemala 0 -25 0.2777778 0.157645464 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 -45 0.5 0.162557542 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -69 0.7666667 0.0728737339 0.3125 0.0299303 0 0.4040404 Private 9th Never-married Craft-repair Other-relative White Male United-States 0 -49 0.544444442 0.187459469 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.106043287 0.8125 0 0 0.272727281 Private Bachelors Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female Taiwan 1 -44 0.4888889 0.02533702 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -56 0.622222245 0.1606932 0.625 0 0 0.414141417 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -37 0.411111116 0.01945639 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -37 0.411111116 0.0524144545 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.0747259557 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -34 0.377777785 0.155195817 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.139099017 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -54 0.6 0.10566207 0.5625 0 0 0.2020202 ? HS-grad Divorced ? Not-in-family White Male United-States 0 -28 0.311111122 0.190763146 0.625 0 0 0.656565666 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.0956129357 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -36 0.4 0.03929198 0.375 0 0 0.353535354 Private 10th Never-married Sales Unmarried White Female ? 0 -73 0.811111152 0.108457237 0.1875 0 0 0.2020202 Local-gov 5th-6th Married-civ-spouse Protective-serv Husband White Male United-States 0 -37 0.411111116 0.0213308372 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -24 0.266666681 0.138643026 0.8125 0 0 0.656565666 Private Bachelors Never-married Exec-managerial Own-child Black Female United-States 0 -30 0.333333343 0.0310795754 0.5625 0 0 0.3838384 State-gov HS-grad Married-AF-spouse Adm-clerical Own-child White Female United-States 0 -38 0.422222227 0.113190837 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -50 0.5555556 0.06624211 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 -69 0.7666667 0.123033196 0.5625 0 0 0.454545468 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -43 0.477777779 0.140508056 0.9375 1 0 0.4040404 Private Prof-school Married-spouse-absent Prof-specialty Not-in-family White Male United-States 1 -42 0.466666669 0.2253121 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -54 0.6 0.126412988 0.625 0 0 0.3838384 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.24645704 0.75 0 0 0.5858586 State-gov Assoc-acdm Never-married Exec-managerial Not-in-family White Female United-States 0 -39 0.433333337 0.128455818 0.625 0 0 0.454545468 Private Some-college Divorced Sales Not-in-family White Male United-States 0 -27 0.3 0.146954447 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Black Female Jamaica 0 -30 0.333333343 0.149633765 0.5625 0 0 0.6666667 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -30 0.333333343 0.100036032 0.5625 0 0.4722222 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.17989096 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.2071489 0.8125 0 0 0.6060606 Federal-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 -36 0.4 0.154360637 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Female Cuba 0 -22 0.244444445 0.187943742 0.625 0 0 0.1010101 Private Some-college Never-married Handlers-cleaners Own-child Black Male United-States 0 -21 0.233333334 0.2101542 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.0368975662 0.8125 0 0.3624885 0.424242437 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -76 0.844444454 0.04761687 0.25 0 0 0.25252524 Private 7th-8th Widowed Other-service Not-in-family White Female United-States 0 -22 0.244444445 0.177792892 0.625 0 0 0.282828271 ? Some-college Never-married ? Not-in-family White Female United-States 0 -37 0.411111116 0.1271458 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -34 0.377777785 0.203926042 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.1236872 0.5625 0 0 0.979797959 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -29 0.322222233 0.120260254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -28 0.311111122 0.118099555 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -73 0.811111152 0.128024086 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.07922584 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family Black Female United-States 0 -39 0.433333337 0.07302394 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -74 0.822222233 0.123728961 0.375 0 0 0.0606060624 Private 10th Widowed Other-service Not-in-family Black Female United-States 0 -27 0.3 0.140368626 0.8125 0 0 0.3030303 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -47 0.5222222 0.100278512 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -90 1 0.0587894581 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -47 0.5222222 0.134072423 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.116944447 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -69 0.7666667 0.2497715 0.8125 0 0 0.4040404 Private Bachelors Divorced Handlers-cleaners Not-in-family White Male United-States 0 -18 0.2 0.120888665 0.5 0 0 0.4040404 ? 12th Never-married ? Own-child Other Male United-States 0 -23 0.25555557 0.230866745 0.8125 0 0 0.2020202 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -44 0.4888889 0.0438774042 0.5625 0 0 0.3030303 Local-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -41 0.455555558 0.10138917 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -47 0.5222222 0.183323964 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Not-in-family Black Male United-States 0 -43 0.477777779 0.27174893 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -33 0.366666675 0.169843838 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family Black Male United-States 0 -48 0.533333361 0.054172378 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Not-in-family White Female United-States 0 -39 0.433333337 0.127717629 0.8125 0 0 0.6060606 Private Bachelors Divorced Sales Unmarried White Male United-States 0 -43 0.477777779 0.07799934 0.875 0 0.5847107 0.4040404 Private Masters Divorced Exec-managerial Unmarried White Female United-States 1 -18 0.2 0.0190994181 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 -52 0.5777778 0.152275369 0.5625 0 0 0.4040404 Private HS-grad Widowed Priv-house-serv Other-relative White Female United-States 0 -18 0.2 0.101580448 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 -27 0.3 0.128585145 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Never-married Sales Own-child White Male United-States 0 -27 0.3 0.08090901 0.8125 0 0.4331956 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.1721278 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -79 0.8777778 0.0958911 0.9375 0 0 0.1010101 ? Prof-school Married-civ-spouse ? Husband White Male United-States 0 -24 0.266666681 0.116978794 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -25 0.2777778 0.0241489056 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Sales Unmarried White Female United-States 0 -42 0.466666669 0.0553382672 0.375 0 0 0.353535354 Self-emp-not-inc 10th Widowed Transport-moving Unmarried White Male United-States 0 -63 0.7 0.08745509 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.152558923 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -47 0.5222222 0.102097049 0.9375 0.07688077 0 0.6060606 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.0918829 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.0447631031 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -63 0.7 0.2559027 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.0693309456 0.8125 0 0 0.5555556 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -65 0.722222269 0.138282686 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -30 0.333333343 0.105670825 0.375 0 0 0.4040404 ? 10th Divorced ? Unmarried White Male United-States 0 -62 0.6888889 0.140574053 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.09264265 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 -23 0.25555557 0.148290738 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Other-relative Black Female Jamaica 0 -47 0.5222222 0.0253733918 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -20 0.222222224 0.132445842 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -21 0.233333334 0.239566788 0.5625 0 0 0.1010101 ? HS-grad Never-married ? Own-child White Female United-States 0 -28 0.311111122 0.13301228 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -61 0.677777767 0.07747196 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -30 0.333333343 0.158162057 0.5625 0 0 0.727272749 State-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -30 0.333333343 0.2434807 0.8125 0 0 0.727272749 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -29 0.322222233 0.236997247 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -39 0.433333337 0.218380764 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried Black Female United-States 0 -23 0.25555557 0.08317477 0.4375 0 0 0.353535354 Private 11th Divorced Other-service Unmarried White Female United-States 0 -32 0.355555564 0.1267895 0.4375 0 0 0.4040404 Private 11th Never-married Priv-house-serv Unmarried Black Female United-States 0 -63 0.7 0.033911787 0.5625 0 0 0.343434334 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -19 0.211111113 0.0317746624 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Female United-States 0 -57 0.6333333 0.1957702 1 0 0 0.6060606 State-gov Doctorate Divorced Prof-specialty Not-in-family White Male United-States 1 -41 0.455555558 0.148966968 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.127264336 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Sales Own-child White Male United-States 0 -30 0.333333343 0.24037233 1 0 0 0.2020202 Private Doctorate Never-married Prof-specialty Own-child White Male United-States 0 -43 0.477777779 0.10138917 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 -64 0.7111111 0.112580612 0.25 0 0 0.25252524 Self-emp-not-inc 7th-8th Married-civ-spouse Other-service Husband White Male United-States 0 -56 0.622222245 0.203296289 0.1875 0 0 0.4040404 Private 5th-6th Separated Machine-op-inspct Not-in-family White Male United-States 0 -32 0.355555564 0.2113073 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -55 0.6111111 0.088204056 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.133179322 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Own-child White Female United-States 0 -17 0.188888893 0.168748 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child Black Male United-States 0 -29 0.322222233 0.147359237 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -23 0.25555557 0.156604856 0.5625 0 0 0.4040404 ? HS-grad Separated ? Own-child White Female United-States 0 -37 0.411111116 0.131090015 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -39 0.433333337 0.0260799285 0.5625 0 0 0.222222224 Private HS-grad Divorced Priv-house-serv Unmarried White Female United-States 0 -36 0.4 0.13573 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -50 0.5555556 0.1881431 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -41 0.455555558 0.0183113813 0.6875 0 0.5544077 0.121212125 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 1 -31 0.344444454 0.05897468 0.625 0 0 0.5050505 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 -71 0.788888931 0.06790575 0.5625 0 0.571395755 0.151515156 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -56 0.622222245 0.140385464 0.625 0 0 0.323232323 Private Some-college Widowed Exec-managerial Not-in-family Black Female United-States 0 -51 0.566666663 0.0968690738 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.1099242 0.625 0 0 0.3030303 Private Some-college Separated Other-service Own-child White Female United-States 0 -53 0.5888889 0.115796745 0.8125 0.143441439 0 0.5555556 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 -33 0.366666675 0.09268912 0.875 0 0 0.353535354 State-gov Masters Never-married Prof-specialty Not-in-family Black Female United-States 0 -27 0.3 0.105418921 0.625 0 0.5456841 0.2020202 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -40 0.444444448 0.08021863 0.625 0.05178052 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.07917802 0.625 0 0 0.323232323 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -54 0.6 0.09959083 0.6875 0.0501305 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Vietnam 0 -33 0.366666675 0.01650429 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Separated Craft-repair Other-relative White Male United-States 0 -27 0.3 0.1061652 0.5625 0 0 0.4040404 ? HS-grad Separated ? Other-relative White Female United-States 0 -36 0.4 0.122395359 0.375 0 0 0.6060606 Private 10th Never-married Farming-fishing Own-child Black Male United-States 0 -42 0.466666669 0.03728889 0.875 0 0 0.5555556 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.06254778 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -19 0.211111113 0.17419824 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female ? 0 -52 0.5777778 0.14920944 0.8125 0 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.123407684 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female Taiwan 1 -30 0.333333343 0.256719679 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.202647 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -47 0.5222222 0.0227048472 0.8125 0.03103031 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.106642738 0.1875 0 0 0.4040404 Private 5th-6th Never-married Transport-moving Not-in-family White Male Columbia 0 -36 0.4 0.1940473 0.4375 0 0 0.4040404 Private 11th Separated Machine-op-inspct Not-in-family Black Male United-States 0 -35 0.3888889 0.07335262 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried White Male United-States 0 -46 0.51111114 0.241484344 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 1 -24 0.266666681 0.08527822 0.8125 0 0 0.08080808 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -30 0.333333343 0.110587627 0.6875 0.05178052 0 0.5252525 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.134582967 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 -50 0.5555556 0.06615995 0.5625 0 0 0.454545468 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -41 0.455555558 0.08692636 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -38 0.422222227 0.0149827749 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.1528371 0.8125 0 0 0.4848485 Private Bachelors Never-married Sales Not-in-family Black Male United-States 0 -47 0.5222222 0.268505871 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -59 0.655555546 0.18107301 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Adm-clerical Other-relative White Female United-States 1 -35 0.3888889 0.06985226 0.8125 0 0 0.161616161 ? Bachelors Divorced ? Unmarried White Female ? 0 -59 0.655555546 0.0615502745 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.1177116 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.08531998 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -52 0.5777778 0.0554217845 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Other-service Other-relative Black Female Haiti 0 -51 0.566666663 0.119705267 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -67 0.7444445 0.232528359 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -58 0.644444466 0.234182552 0.4375 0 0 0.151515156 ? 11th Divorced ? Not-in-family Black Male United-States 0 -68 0.75555557 0.105071381 0.375 0 0 0.2020202 Private 10th Widowed Other-service Unmarried Black Female United-States 0 -71 0.788888931 0.154108733 0.3125 0 0 0.0606060624 Private 9th Divorced Priv-house-serv Not-in-family Black Female United-States 0 -49 0.544444442 0.12421862 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 -35 0.3888889 0.0693322942 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -18 0.2 0.108481482 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -29 0.322222233 0.170910716 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Farming-fishing Wife White Female United-States 0 -47 0.5222222 0.185087278 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -31 0.344444454 0.08742747 0.3125 0 0 0.4040404 Private 9th Never-married Farming-fishing Not-in-family White Male Puerto-Rico 0 -22 0.244444445 0.0441481657 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Exec-managerial Not-in-family Black Male United-States 0 -20 0.222222224 0.072511375 0.625 0 0 0.1010101 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -57 0.6333333 0.108504385 0.5625 0 0 0.262626261 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -18 0.2 0.07973032 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 -32 0.355555564 0.08838389 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -39 0.433333337 0.0814875662 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Own-child White Male United-States 0 -37 0.411111116 0.145073935 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -51 0.566666663 0.042894043 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male Cambodia 0 -48 0.533333361 0.08878936 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -39 0.433333337 0.142412126 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -35 0.3888889 0.02089506 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.0979581848 0.1875 0.0406404063 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband Other Male Mexico 0 -19 0.211111113 0.171859726 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child White Male United-States 0 -28 0.311111122 0.277462542 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -23 0.25555557 0.185772941 0.625 0 0.453168035 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -18 0.2 0.2142392 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 -23 0.25555557 0.193969846 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -47 0.5222222 0.09317811 0.4375 0.03411034 0 0.4040404 Local-gov 11th Married-civ-spouse Transport-moving Husband White Male El-Salvador 0 -42 0.466666669 0.0780842 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Adm-clerical Own-child White Male United-States 0 -25 0.2777778 0.0406531952 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -17 0.188888893 0.09437363 0.375 0 0 0.121212125 Private 10th Never-married Sales Own-child White Female United-States 0 -34 0.377777785 0.106445387 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -30 0.333333343 0.216871366 0.875 0.1502415 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male ? 1 -29 0.322222233 0.156788051 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Exec-managerial Own-child White Male United-States 0 -22 0.244444445 0.2353114 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -46 0.51111114 0.219284639 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -69 0.7666667 0.09441337 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.086534366 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.214361787 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 -59 0.655555546 0.09967569 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male ? 0 -45 0.5 0.1048417 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.194269568 0.875 0 0 0.4040404 State-gov Masters Never-married Adm-clerical Not-in-family Black Female United-States 0 -47 0.5222222 0.221730918 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Prof-specialty Unmarried White Male United-States 0 -64 0.7111111 0.115425624 0.4375 0 0 0.4040404 Private 11th Widowed Farming-fishing Unmarried White Female United-States 0 -29 0.322222233 0.1541451 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -29 0.322222233 0.1320909 0.9375 0.0217402168 0 0.727272749 Private Prof-school Divorced Prof-specialty Own-child White Female United-States 0 -17 0.188888893 0.0321754143 0.4375 0 0 0.2020202 Private 11th Never-married Prof-specialty Own-child White Female United-States 0 -24 0.266666681 0.135838434 0.5625 0 0 0.6060606 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 -28 0.311111122 0.22723572 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.1659919 0.5625 0.0332503319 0 0.5050505 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -48 0.533333361 0.153373227 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.119407564 0.6875 0 0 0.3838384 Private Assoc-voc Never-married Prof-specialty Unmarried Black Female United-States 0 -38 0.422222227 0.0482930951 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Female Portugal 0 -49 0.544444442 0.0203535389 0.5625 0 0.383149683 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -42 0.466666669 0.188702136 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.0184602328 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.112501137 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family White Female Columbia 0 -41 0.455555558 0.116980813 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.187617749 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -32 0.355555564 0.07657279 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 -41 0.455555558 0.1703948 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.0226772334 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -56 0.622222245 0.06787611 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -47 0.5222222 0.119523406 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 -30 0.333333343 0.210659355 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Sales Unmarried Black Female United-States 0 -51 0.566666663 0.0292004142 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.252859652 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Adm-clerical Own-child White Male South 0 -49 0.544444442 0.177522138 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -67 0.7444445 0.0500671864 0.5625 0 0 0.1010101 ? HS-grad Widowed ? Not-in-family White Female Germany 0 -26 0.2888889 0.203472748 0.5625 0.0346403457 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.167043284 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Craft-repair Unmarried White Male United-States 0 -37 0.411111116 0.0588460341 0.3125 0 0 0.4040404 ? 9th Divorced ? Unmarried White Female United-States 0 -34 0.377777785 0.273170084 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -51 0.566666663 0.11252404 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.06902112 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.354634762 0.625 0.0388703868 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -32 0.355555564 0.118459895 0.25 0 0 0.353535354 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.144065 0.4375 0 0 0.4040404 Private 11th Separated Adm-clerical Unmarried Black Female United-States 0 -17 0.188888893 0.101206638 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 -40 0.444444448 0.05075958 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Unmarried White Female United-States 0 -38 0.422222227 0.183653325 0.8125 0 0 0.5050505 Private Bachelors Divorced Sales Own-child White Male United-States 0 -67 0.7444445 0.2768274 0.5625 0.158311576 0 0.4040404 Self-emp-inc HS-grad Widowed Exec-managerial Not-in-family White Female United-States 1 -44 0.4888889 0.149816975 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 -26 0.2888889 0.1214019 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.115333349 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Own-child White Female United-States 0 -45 0.5 0.247212082 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -38 0.422222227 0.205192953 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -62 0.6888889 0.0653443 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.09892807 0.5625 0 0.459366381 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -45 0.5 0.216081992 0.625 0 0 0.4040404 State-gov Some-college Married-spouse-absent Other-service Other-relative Black Male Haiti 0 -47 0.5222222 0.0570719466 0.875 0 0 0.2020202 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -49 0.544444442 0.12421862 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Male United-States 0 -36 0.4 0.220169 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.114247613 0.5625 0 0 0.373737365 ? HS-grad Divorced ? Unmarried Black Female United-States 0 -29 0.322222233 0.142858014 0.5625 0 0 0.3030303 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 -23 0.25555557 0.118432283 0.4375 0 0 0.4040404 Private 11th Never-married Farming-fishing Other-relative White Female Puerto-Rico 0 -50 0.5555556 0.119543612 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.193136021 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -44 0.4888889 0.115459979 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.131326422 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Tech-support Wife White Female United-States 0 -73 0.811111152 0.13427718 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -24 0.266666681 0.13755326 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.0488352925 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 -61 0.677777767 0.0411125459 0.625 0.07688077 0 0.363636374 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.131090015 0.875 0 0 0.4040404 Federal-gov Masters Never-married Exec-managerial Own-child White Female United-States 0 -29 0.322222233 0.263935953 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.06336612 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.19492425 0.4375 0 0 0.121212125 Private 11th Never-married Machine-op-inspct Own-child Other Male United-States 0 -30 0.333333343 0.114588425 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.106497929 0.5625 0 0.3946281 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.301567644 1 0 0 0.6060606 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 -90 1 0.0268228371 0.5625 0.00401004 0 0.04040404 ? HS-grad Widowed ? Not-in-family White Male United-States 0 -76 0.844444454 0.210479528 0.1875 0 0 0.4040404 ? 5th-6th Widowed ? Unmarried White Female United-States 0 -47 0.5222222 0.150428534 0.5625 0 0.3452709 0.353535354 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -65 0.722222269 0.19760491 0.0625 0 0 0.3030303 ? Preschool Married-civ-spouse ? Husband Black Male United-States 0 -25 0.2777778 0.0716485754 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -41 0.455555558 0.0445327535 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Own-child White Female United-States 0 -47 0.5222222 0.185143188 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -27 0.3 0.08336538 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Adm-clerical Unmarried Black Female United-States 0 -42 0.466666669 0.04758858 0.5625 0 0 0.444444448 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.11950253 0.5625 0 0 0.2020202 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -37 0.411111116 0.1349588 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -19 0.211111113 0.107273161 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 -24 0.266666681 0.158882737 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.06581981 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.112688385 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -44 0.4888889 0.0660777763 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -37 0.411111116 0.0149531392 0.8125 0.07298073 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 -45 0.5 0.07341054 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -35 0.3888889 0.1791292 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -58 0.644444466 0.06800004 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -45 0.5 0.114562824 0.625 0 0 0.5050505 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -54 0.6 0.219677314 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.14611119 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -69 0.7666667 0.02489114 0.625 0.200512 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.144145817 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -36 0.4 0.06726724 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male India 0 -61 0.677777767 0.102012858 0.375 0 0 0.3838384 State-gov 10th Never-married Other-service Not-in-family Black Female United-States 0 -57 0.6333333 0.108884931 0.8125 0.07688077 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.247321859 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative White Male United-States 0 -35 0.3888889 0.0583604164 0.875 0 0.453856736 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.11351683 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.0947939157 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Other-relative White Female United-States 0 -25 0.2777778 0.133124769 0.625 0 0 0.434343427 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -46 0.51111114 0.08288044 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 -23 0.25555557 0.222650975 0.8125 0 0 0.25252524 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -44 0.4888889 0.13755931 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -38 0.422222227 0.233558863 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -35 0.3888889 0.173266754 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 -25 0.2777778 0.110052839 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family Other Female United-States 0 -78 0.8666667 0.09149225 0.5625 0.0108601088 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -18 0.2 0.0244163 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Female United-States 0 -40 0.444444448 0.10042534 0.5625 0.0217402168 0 0.6060606 Private HS-grad Married-spouse-absent Handlers-cleaners Not-in-family White Male Poland 0 -61 0.677777767 0.1497907 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -31 0.344444454 0.0196348783 0.5 0 0 0.4040404 State-gov 12th Married-civ-spouse Other-service Wife White Female United-States 0 -33 0.366666675 0.0534133054 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -35 0.3888889 0.183429033 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -55 0.6111111 0.135041639 0.875 0 0 0.454545468 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.09994713 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -31 0.344444454 0.110623322 0.625 0 0.3624885 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.08708666 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.117855735 0.875 0 0 0.474747479 Local-gov Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -48 0.533333361 0.221330166 0.9375 0 0 0.454545468 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.05238347 0.5625 0 0 0.343434334 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -38 0.422222227 0.0903001 0.875 0.07298073 0 0.6060606 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.140912846 0.5625 0.04386044 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -29 0.322222233 0.103592969 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative Other Male Ecuador 0 -27 0.3 0.113710806 0.8125 0 0 0.02020202 Private Bachelors Never-married Sales Own-child White Male United-States 0 -31 0.344444454 0.251519322 0.3125 0 0 0.434343427 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.0387955867 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -53 0.5888889 0.2039779 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.1532924 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.0301588532 0.5625 0 0 0.464646459 Federal-gov HS-grad Separated Machine-op-inspct Not-in-family Black Male United-States 0 -54 0.6 0.0902287 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Own-child White Female United-States 0 -36 0.4 0.188330352 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Own-child White Female United-States 0 -22 0.244444445 0.1859851 0.5625 0 0 0.5050505 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -62 0.6888889 0.09181218 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -41 0.455555558 0.137677178 0.5625 0 0.3409091 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -59 0.655555546 0.150343 0.8125 0 0.453856736 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.124351308 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -34 0.377777785 0.179104269 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.106854223 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.0148548028 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 -41 0.455555558 0.119024321 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.182339936 0.8125 0 0 0.323232323 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -24 0.266666681 0.06756965 0.625 0 0 0.4848485 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -35 0.3888889 0.0532429 0.5625 0 0 0.727272749 Private HS-grad Never-married Transport-moving Unmarried Black Male United-States 0 -40 0.444444448 0.0287619438 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -46 0.51111114 0.0787712038 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Prof-specialty Wife White Female United-States 0 -45 0.5 0.223373 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -33 0.366666675 0.140052736 0.5625 0 0.2506887 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -68 0.75555557 0.150525525 0.5625 0 0 0.07070707 Private HS-grad Widowed Other-service Unmarried White Female England 0 -33 0.366666675 0.229225338 0.8125 0 0 0.454545468 Private Bachelors Separated Exec-managerial Not-in-family Black Female United-States 0 -23 0.25555557 0.12447793 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -42 0.466666669 0.0216777083 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -30 0.333333343 0.133283049 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 1 -35 0.3888889 0.167288452 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -40 0.444444448 0.257626265 0.5625 0 0 0.5050505 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.0729572549 0.875 0.0545505434 0 0.3030303 State-gov Masters Divorced Prof-specialty Unmarried White Male United-States 0 -46 0.51111114 0.108699039 0.3125 0 0 0.5050505 Self-emp-inc 9th Married-civ-spouse Adm-clerical Wife White Female United-States 0 -49 0.544444442 0.07420464 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -41 0.455555558 0.0970105156 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.151158646 0.875 0 0 0.3838384 Private Masters Never-married Exec-managerial Own-child White Male United-States 0 -37 0.411111116 0.155187741 0.5625 0 0 0.2020202 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 -50 0.5555556 0.01400615 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -20 0.222222224 0.117675908 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -59 0.655555546 0.268488348 1 0.25236252 0 0.454545468 State-gov Doctorate Divorced Prof-specialty Unmarried White Male United-States 1 -30 0.333333343 0.100714289 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.0229762811 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.218083724 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -28 0.311111122 0.223196536 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -48 0.533333361 0.108201295 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female Ireland 1 -34 0.377777785 0.228423834 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Unmarried White Female United-States 0 -58 0.644444466 0.111036874 0.8125 0 0 1 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -33 0.366666675 0.180412278 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -38 0.422222227 0.112968571 0.8125 0 0 0.8484849 Private Bachelors Married-spouse-absent Transport-moving Not-in-family Other Male India 0 -49 0.544444442 0.395133734 0.8125 0.07298073 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -67 0.7444445 0.0713320151 0.125 0 0 0.2020202 Self-emp-not-inc 1st-4th Widowed Other-service Not-in-family Black Female United-States 0 -23 0.25555557 0.135162875 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family White Female United-States 0 -42 0.466666669 0.1305862 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -54 0.6 0.09296527 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -49 0.544444442 0.08243052 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.03301666 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.191091835 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -31 0.344444454 0.192904323 0.5625 0.0332503319 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -36 0.4 0.112086914 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -25 0.2777778 0.105296344 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.030717887 0.875 0 0 0.6060606 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -40 0.444444448 0.07567968 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -52 0.5777778 0.134989113 0.75 0 0 0.5050505 Private Assoc-acdm Separated Prof-specialty Not-in-family White Female United-States 0 -42 0.466666669 0.230104968 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.0230086111 0.5 0 0 0.3030303 ? 12th Separated ? Unmarried White Female United-States 0 -50 0.5555556 0.08564059 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Wife White Female Canada 1 -52 0.5777778 0.216850489 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband Black Male United-States 1 -51 0.566666663 0.023715822 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 -19 0.211111113 0.144766137 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -43 0.477777779 0.08899411 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 -57 0.6333333 0.149691015 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 1 -35 0.3888889 0.111671343 0.5625 0 0 0.6060606 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -30 0.333333343 0.173687026 0.8125 0 0 0.3030303 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -38 0.422222227 0.24056834 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.205925763 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -23 0.25555557 0.115879588 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -22 0.244444445 0.07454478 0.625 0 0 0.4040404 Private Some-college Separated Other-service Own-child White Female United-States 0 -21 0.233333334 0.273242176 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Other-relative White Male Mexico 0 -60 0.6666667 0.05549116 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -45 0.5 0.194806382 0.8125 0 0 0.4848485 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 1 -26 0.2888889 0.06857389 0.5625 0.0572105721 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 -49 0.544444442 0.226650417 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Other-service Husband White Male United-States 0 -29 0.322222233 0.258234471 0.625 0 0 0.353535354 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -47 0.5222222 0.221064791 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -40 0.444444448 0.188833475 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -34 0.377777785 0.142832413 0.5625 0.07443074 0 0.353535354 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -42 0.466666669 0.116995633 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.291893 0.125 0 0 0.353535354 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -63 0.7 0.07176577 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.0150992963 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.0369204655 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.241259381 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.128001183 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -26 0.2888889 0.06580297 0.875 0 0 0.323232323 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 0 -56 0.622222245 0.03594384 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -39 0.433333337 0.159045741 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried Black Female United-States 0 -44 0.4888889 0.2197285 0.25 0 0 0.4848485 Private 7th-8th Divorced Handlers-cleaners Not-in-family White Male United-States 0 -34 0.377777785 0.391371369 0.5625 0 0 0.4848485 Private HS-grad Separated Adm-clerical Not-in-family White Male United-States 1 -40 0.444444448 0.1485743 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.1087509 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 -44 0.4888889 0.06415753 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.150378019 0.625 0 0 0.727272749 Federal-gov Some-college Divorced Protective-serv Own-child White Male United-States 0 -22 0.244444445 0.1594721 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Not-in-family White Male England 0 -58 0.644444466 0.154574811 0.625 0 0 0.2020202 Self-emp-inc Some-college Widowed Sales Not-in-family White Female United-States 1 -43 0.477777779 0.119271509 0.625 0 0 0.3030303 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 -23 0.25555557 0.193763077 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male Columbia 0 -41 0.455555558 0.0335399956 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Not-in-family Black Female United-States 0 -44 0.4888889 0.11722935 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -32 0.355555564 0.131272539 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -38 0.422222227 0.169899076 0.75 0 0 0.565656543 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 -47 0.5222222 0.128831655 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.1178059 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -39 0.433333337 0.112574555 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.159319863 0.5 0 0 0.545454562 Private 12th Divorced Protective-serv Own-child White Male Mexico 0 -40 0.444444448 0.144299373 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.146065384 0.5625 0 0.8654729 0.454545468 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -34 0.377777785 0.165158063 0.5625 0.0203602035 0 0.3030303 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -57 0.6333333 0.294824243 0.875 0 0.453856736 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -71 0.788888931 0.134988442 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 0 -45 0.5 0.112705223 0.875 0 0 0.5050505 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -54 0.6 0.09889776 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -26 0.2888889 0.0528212674 0.6875 0 0 0.545454562 Private Assoc-voc Never-married Sales Unmarried White Female United-States 0 -37 0.411111116 0.123037912 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -28 0.311111122 0.02564752 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -42 0.466666669 0.0775763541 0.8125 0 0 0.151515156 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -45 0.5 0.131978408 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.112759776 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -57 0.6333333 0.15034233 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.0149827749 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Not-in-family White Male United-States 0 -45 0.5 0.055130817 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female United-States 1 -30 0.333333343 0.0996298939 0.6875 0 0 0.464646459 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.0197082926 0.5625 0 0 0.4040404 Private HS-grad Married-AF-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.1736089 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.09196844 1 0 0.43663913 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.138406619 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -19 0.211111113 0.0482587442 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -39 0.433333337 0.101176329 0.625 0 0 0.3838384 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -55 0.6111111 0.174208343 0.375 0 0 0.4040404 Self-emp-inc 10th Widowed Transport-moving Not-in-family White Male United-States 0 -17 0.188888893 0.07732041 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Female United-States 0 -43 0.477777779 0.125404045 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.118040286 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -45 0.5 0.168339849 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -44 0.4888889 0.08101071 0.875 0 0 0.3838384 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.13010329 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -32 0.355555564 0.124622062 0.75 0 0.4331956 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male Ireland 1 -21 0.233333334 0.149132654 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -43 0.477777779 0.0377603658 0.8125 0 0 0.6060606 Federal-gov Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.103675142 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.109860212 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -40 0.444444448 0.118337318 0.5625 0 0 0.5151515 Self-emp-inc HS-grad Never-married Sales Not-in-family White Male United-States 0 -46 0.51111114 0.09644273 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Own-child White Female Dominican-Republic 0 -20 0.222222224 0.07743558 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 -54 0.6 0.0220771134 0.5625 0 0 0.4040404 State-gov HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 -23 0.25555557 0.1014902 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -58 0.644444466 0.052605737 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.225637421 0.625 0.031370312 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -50 0.5555556 0.209840342 0.875 0.07688077 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.135730669 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.08359304 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -60 0.6666667 0.112066709 0.4375 0 0 0.3030303 Private 11th Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female Hong 0 -43 0.477777779 0.07912077 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.243352726 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 -31 0.344444454 0.09566749 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 0 -35 0.3888889 0.186267316 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -48 0.533333361 0.0339474864 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried White Male United-States 0 -43 0.477777779 0.117255621 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -27 0.3 0.187080935 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -24 0.266666681 0.0163284969 0.5625 0 0.365013778 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.101763651 0.5625 0 0.4331956 0.7070707 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.111320436 0.5625 0 0 0.222222224 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -49 0.544444442 0.123089775 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -31 0.344444454 0.116522811 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -59 0.655555546 0.175948754 0.4375 0 0 0.4040404 Private 11th Divorced Farming-fishing Not-in-family White Male United-States 0 -27 0.3 0.110868491 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 -38 0.422222227 0.0872718841 0.875 0 0 0.4040404 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -51 0.566666663 0.0243725181 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.219399825 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -58 0.644444466 0.222126961 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.08999498 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -55 0.6111111 0.05617345 0.1875 0 0 0.4040404 Private 5th-6th Widowed Machine-op-inspct Unmarried White Female United-States 0 -76 0.844444454 0.16156745 0.5625 0 0 0.08080808 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.135876819 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -51 0.566666663 0.1294412 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -33 0.366666675 0.09667914 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.0190839265 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -51 0.566666663 0.165603951 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -42 0.466666669 0.134097353 0.6875 0 0 0.4040404 Local-gov Assoc-voc Widowed Prof-specialty Unmarried Black Female United-States 0 -53 0.5888889 0.07035808 0.8125 0.0861408561 0 0.5050505 Private Bachelors Never-married Other-service Not-in-family White Male Italy 1 -33 0.366666675 0.123878486 0.875 0.07688077 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -30 0.333333343 0.08736214 0.8125 1 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.387580037 0.625 0 0 0.4040404 Local-gov Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -42 0.466666669 0.124389693 0.75 0 0 0.4040404 State-gov Assoc-acdm Divorced Other-service Not-in-family White Female United-States 0 -34 0.377777785 0.0466429368 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male United-States 1 -31 0.344444454 0.151886746 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Unmarried White Female United-States 0 -46 0.51111114 0.11282713 0.625 0 0.453856736 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.274174333 0.125 0 0 0.4040404 Private 1st-4th Married-spouse-absent Other-service Not-in-family White Male Guatemala 0 -40 0.444444448 0.114513658 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male ? 0 -46 0.51111114 0.08479261 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -43 0.477777779 0.0241287 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -35 0.3888889 0.0451827124 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 -23 0.25555557 0.07260769 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -50 0.5555556 0.0643744 0.5625 0 0 0.121212125 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female ? 0 -43 0.477777779 0.07983808 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Other-relative Black Male United-States 0 -61 0.677777767 0.133412361 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -29 0.322222233 0.0527114831 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Own-child White Male United-States 0 -21 0.233333334 0.157679811 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -36 0.4 0.162994 0.8125 0 0.3838384 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -40 0.444444448 0.0624480955 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -23 0.25555557 0.173558384 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -90 1 0.02720271 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -24 0.266666681 0.0373299755 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -20 0.222222224 0.114231452 0.625 0.0217602178 0 0.121212125 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -40 0.444444448 0.215040028 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.0505487621 0.6875 0 0 0.5555556 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.123186767 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 -22 0.244444445 0.126809031 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -25 0.2777778 0.142450526 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -46 0.51111114 0.0766522661 0.5 0.07298073 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male ? 1 -47 0.5222222 0.116013624 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.148152 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.125826344 0.875 0 0 0.5050505 ? Masters Married-civ-spouse ? Husband White Male United-States 0 -26 0.2888889 0.08941103 0.8125 0 0 0.8080808 ? Bachelors Never-married ? Not-in-family White Female United-States 0 -28 0.311111122 0.1413082 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -20 0.222222224 0.120237358 0.625 0 0 0.4040404 State-gov Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 -51 0.566666663 0.114072494 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Not-in-family White Female Ireland 0 -32 0.355555564 0.110935844 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -55 0.6111111 0.09704554 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband White Male United-States 0 -41 0.455555558 0.0900461748 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Protective-serv Unmarried White Female United-States 0 -46 0.51111114 0.124044172 0.875 0.07688077 0 0.353535354 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -45 0.5 0.0978578255 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -65 0.722222269 0.01671982 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.120103993 1 0.07688077 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.158838958 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -22 0.244444445 0.132201344 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 -42 0.466666669 0.0365069173 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.148337215 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.0398368724 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 -67 0.7444445 0.04320589 0.625 0 0 0.414141417 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 -28 0.311111122 0.13243103 0.5625 0 0 0.373737365 Private HS-grad Married-spouse-absent Tech-support Not-in-family White Female United-States 0 -56 0.622222245 0.131789148 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Other-service Husband White Male Cuba 1 -31 0.344444454 0.177139565 0.6875 0 0 0.3838384 State-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 -33 0.366666675 0.3738022 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Unmarried White Female United-States 0 -52 0.5777778 0.07288384 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -45 0.5 0.146597475 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male Germany 1 -53 0.5888889 0.094073236 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.06921981 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male Portugal 0 -40 0.444444448 0.143475637 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -35 0.3888889 0.153897911 0.625 0 0 0.4848485 Private Some-college Never-married Sales Own-child White Male United-States 0 -65 0.722222269 0.0154286548 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -42 0.466666669 0.016409995 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Other-service Wife Black Female United-States 0 -23 0.25555557 0.0279058814 0.8125 0 0 0.151515156 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -39 0.433333337 0.158455044 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.231342927 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.220169 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -25 0.2777778 0.16724737 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.02040136 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Other-service Unmarried White Female United-States 0 -39 0.433333337 0.126988187 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -39 0.433333337 0.160262823 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -25 0.2777778 0.133945808 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Own-child Black Male United-States 0 -30 0.333333343 0.1575936 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.115235016 0.3125 0 0 0.4848485 Private 9th Married-civ-spouse Machine-op-inspct Wife Black Female United-States 0 -22 0.244444445 0.237783939 0.5625 0 0 0.363636374 Private HS-grad Never-married Craft-repair Unmarried White Female Mexico 0 -46 0.51111114 0.143557146 0.875 0 0.453856736 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.126716077 0.8125 0 0.323232323 0.3838384 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 -33 0.366666675 0.08759788 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 -70 0.7777778 0.232597724 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -36 0.4 0.122633114 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 -53 0.5888889 0.118917227 0.875 0 0 0.5050505 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -55 0.6111111 0.0482452735 0.5625 0 0.371212125 0.4040404 State-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -17 0.188888893 0.107663818 0.4375 0 0 0.3030303 Private 11th Never-married Protective-serv Own-child White Female United-States 0 -36 0.4 0.123543061 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 -36 0.4 0.08482022 0.9375 0 0 0.5555556 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 -40 0.444444448 0.121319056 0.5625 0 0 0.4040404 Local-gov HS-grad Married-spouse-absent Farming-fishing Own-child Black Male United-States 0 -36 0.4 0.3993588 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 -28 0.311111122 0.123796985 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -39 0.433333337 0.05186552 0.875 1 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.05449837 0.1875 0 0 0.454545468 Private 5th-6th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -63 0.7 0.111582436 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -61 0.677777767 0.08351222 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -48 0.533333361 0.122116514 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -55 0.6111111 0.08361055 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Not-in-family White Male Poland 0 -18 0.2 0.09251872 0.625 0 0 0.04040404 ? Some-college Never-married ? Own-child White Female United-States 0 -20 0.222222224 0.196657926 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Sales Other-relative White Male United-States 0 -49 0.544444442 0.0614606962 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 -27 0.3 0.0997861549 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Handlers-cleaners Husband Asian-Pac-Islander Male United-States 0 -37 0.411111116 0.08854487 0.375 0 0 0.333333343 Private 10th Divorced Other-service Unmarried White Female United-States 0 -32 0.355555564 0.08597735 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -33 0.366666675 0.160986871 1 0 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -47 0.5222222 0.185954109 0.6875 0 0 0.262626261 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -34 0.377777785 0.260575 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -61 0.677777767 0.141754761 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Other-relative Black Female United-States 0 -25 0.2777778 0.426235527 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -26 0.2888889 0.165329143 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Sales Own-child White Male United-States 0 -18 0.2 0.133418426 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 -35 0.3888889 0.0184602328 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.163475573 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female ? 0 -56 0.622222245 0.2119795 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.18167448 0.6875 0 0 0.4040404 State-gov Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -24 0.266666681 0.119408906 0.5 0 0 0.3838384 Private 12th Never-married Other-service Own-child White Female United-States 0 -66 0.733333349 0.112959139 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Not-in-family White Female United-States 1 -42 0.466666669 0.0755577758 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -28 0.311111122 0.228329539 0.5625 0 0 0.2020202 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -39 0.433333337 0.0166504458 0.625 0 0 0.353535354 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -65 0.722222269 0.0249827411 0.6875 0 0 0.25252524 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -20 0.222222224 0.145862654 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -52 0.5777778 0.1377021 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -24 0.266666681 0.10180676 0.625 1 0 0.5050505 ? Some-college Never-married ? Not-in-family Asian-Pac-Islander Male South 1 -39 0.433333337 0.1260109 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -18 0.2 0.284940124 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -49 0.544444442 0.113948561 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife White Female Hong 0 -21 0.233333334 0.07070833 0.625 0 0 0.4848485 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -35 0.3888889 0.08087398 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -38 0.422222227 0.181398332 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -55 0.6111111 0.095338136 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.144714266 0.375 0 0 0.5555556 Private 10th Married-civ-spouse Craft-repair Other-relative White Male United-States 0 -34 0.377777785 0.1168744 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -54 0.6 0.2458731 0.625 0 0 0.4040404 Local-gov Some-college Never-married Prof-specialty Not-in-family White Female Mexico 0 -38 0.422222227 0.0406511724 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -32 0.355555564 0.05846818 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Other-relative White Female United-States 0 -33 0.366666675 0.117310174 0.625 0 0 0.121212125 State-gov Some-college Separated Tech-support Not-in-family White Male United-States 0 -32 0.355555564 0.340101928 0.75 0 0 0.5050505 Federal-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 -34 0.377777785 0.198062241 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male France 0 -46 0.51111114 0.080912374 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 -48 0.533333361 0.134072423 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.102598161 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -48 0.533333361 0.05965091 0.25 0 0 0.4040404 Federal-gov 7th-8th Married-spouse-absent Handlers-cleaners Unmarried White Male United-States 0 -67 0.7444445 0.06406189 0.5625 0 0 0.373737365 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.166738853 0.9375 0.05178052 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male ? 1 -25 0.2777778 0.120172694 0.8125 0 0 0.2020202 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -43 0.477777779 0.3265706 0.625 0.0406404063 0 0.3838384 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.151741251 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 -56 0.622222245 0.138569623 0.125 0 0 0.4040404 Private 1st-4th Separated Machine-op-inspct Unmarried White Male United-States 0 -54 0.6 0.0396698341 0.625 0 0.3624885 0.4848485 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.239419952 0.5625 0 0.4331956 0.464646459 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -60 0.6666667 0.124174163 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -27 0.3 0.234061986 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.09346503 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -24 0.266666681 0.020078063 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -31 0.344444454 0.08520278 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.0409394465 0.375 0 0 0.151515156 Private 10th Never-married Craft-repair Own-child White Male United-States 0 -26 0.2888889 0.121082641 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -45 0.5 0.18987678 0.5625 0 0 0.4848485 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.0474484824 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Other-relative Asian-Pac-Islander Male United-States 0 -55 0.6111111 0.302804947 0.1875 0 0 0.4848485 ? 5th-6th Married-civ-spouse ? Husband White Male Mexico 0 -29 0.322222233 0.220895067 0.3125 0 0 0.4040404 Private 9th Divorced Machine-op-inspct Unmarried Black Female United-States 0 -72 0.8 0.334435463 0.5625 0.06360064 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.103095233 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -53 0.5888889 0.05230063 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.0804826543 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -20 0.222222224 0.172586471 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -69 0.7666667 0.119467504 0.5625 0.0184801836 0 0.121212125 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -41 0.455555558 0.0254919324 0.5625 0 0 0.25252524 Local-gov HS-grad Never-married Other-service Unmarried White Female United-States 0 -45 0.5 0.0871122554 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 -27 0.3 0.12360099 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -46 0.51111114 0.080912374 0.9375 1 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.1283137 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 -31 0.344444454 0.244580582 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -45 0.5 0.161888048 0.625 0 0 0.5555556 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -64 0.7111111 0.08969189 0.5625 0 0 0.05050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.0221700612 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -17 0.188888893 0.07912481 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Male United-States 0 -33 0.366666675 0.0234039761 0.5625 0 0.4331956 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -22 0.244444445 0.3094642 0.5 0 0 0.5050505 Private 12th Married-spouse-absent Other-service Unmarried Black Female United-States 0 -23 0.25555557 0.0646519 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 -25 0.2777778 0.07953634 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -33 0.366666675 0.101414084 0.8125 0.03103031 0 0.434343427 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.340429932 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male Mexico 0 -37 0.411111116 0.121055029 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -53 0.5888889 0.08224462 0.5625 0 0.430670351 0.3838384 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.110420592 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 -33 0.366666675 0.07184593 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -41 0.455555558 0.0831161737 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -61 0.677777767 0.08081471 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.0448722132 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -20 0.222222224 0.0269817915 0.625 0 0 0.565656543 ? Some-college Never-married ? Own-child White Male United-States 0 -35 0.3888889 0.175508276 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 1 -64 0.7111111 0.0647105 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.04755423 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -39 0.433333337 0.155134529 0.625 0 0.359045 0.121212125 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family White Male United-States 1 -53 0.5888889 0.0334847681 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Unmarried White Male United-States 0 -28 0.311111122 0.07848765 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.144501433 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Handlers-cleaners Unmarried Black Female United-States 0 -25 0.2777778 0.225637421 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male Italy 0 -19 0.211111113 0.17419824 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -20 0.222222224 0.136889145 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.07035539 0.8125 0 0 0.4040404 Private Bachelors Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male ? 0 -55 0.6111111 0.06676815 0.5625 0 0.515610635 0.4040404 Local-gov HS-grad Married-civ-spouse Prof-specialty Other-relative White Female United-States 1 -52 0.5777778 0.08472794 0.875 0 0.4242424 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Wife Black Female United-States 1 -21 0.233333334 0.322947651 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -30 0.333333343 0.113012351 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -47 0.5222222 0.090090625 0.5625 0 0.453168035 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -22 0.244444445 0.071962446 0.375 0 0 0.3030303 Private 10th Never-married Craft-repair Other-relative White Male United-States 0 -24 0.266666681 0.07944945 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -26 0.2888889 0.117815323 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -27 0.3 0.090356 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -57 0.6333333 0.06692508 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Puerto-Rico 0 -18 0.2 0.105007395 0.875 0 0 0.6060606 Local-gov Masters Never-married Prof-specialty Own-child White Female United-States 0 -30 0.333333343 0.314613342 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -34 0.377777785 0.205173418 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -40 0.444444448 0.133825913 0.625 0.05178052 0 0.6060606 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -60 0.6666667 0.119922817 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 -25 0.2777778 0.1095753 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.0762111 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -48 0.533333361 0.107040793 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -27 0.3 0.09550382 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.0224987455 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 -65 0.722222269 0.120408431 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -52 0.5777778 0.113526255 0.5625 0 0.453856736 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.0745252445 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 -32 0.355555564 0.101739407 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 -45 0.5 0.09622855 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Separated Sales Unmarried White Male United-States 0 -18 0.2 0.231130764 0.4375 0 0 0.161616161 ? 11th Never-married ? Own-child White Male United-States 0 -27 0.3 0.123609066 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -57 0.6333333 0.149670139 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -44 0.4888889 0.08208634 0.625 0 0 0.5555556 Private Some-college Divorced Sales Unmarried White Male United-States 1 -30 0.333333343 0.314613342 0.875 0 0 0.444444448 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.0231648721 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.02829047 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -61 0.677777767 0.121517748 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -49 0.544444442 0.134430751 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 -33 0.366666675 0.0976281539 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.104797922 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -53 0.5888889 0.109500542 0.25 0 0 1 Self-emp-not-inc 7th-8th Married-civ-spouse Tech-support Husband White Male United-States 0 -33 0.366666675 0.156579927 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.181500033 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -45 0.5 0.09472858 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Protective-serv Not-in-family White Male United-States 1 -26 0.2888889 0.0266989078 0.625 0 0 0.6060606 ? Some-college Never-married ? Not-in-family White Male United-States 0 -50 0.5555556 0.233052358 0.25 0 0 0.2020202 ? 7th-8th Separated ? Own-child White Female United-States 0 -47 0.5222222 0.107580967 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -52 0.5777778 0.195901543 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -57 0.6333333 0.146753728 0.5625 0 0 0.363636374 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.134649649 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 -58 0.644444466 0.0717624053 0.5625 0.0217402168 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -50 0.5555556 0.148608655 0.875 0 0 0.5050505 Local-gov Masters Divorced Prof-specialty Not-in-family Amer-Indian-Eskimo Female United-States 1 -33 0.366666675 0.05988597 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -34 0.377777785 0.194305271 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.153169155 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -37 0.411111116 0.06730967 0.875 0.07688077 0 0.5050505 Local-gov Masters Married-civ-spouse Protective-serv Husband White Male United-States 1 -57 0.6333333 0.135455862 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family Black Female United-States 0 -57 0.6333333 0.08336875 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.137802467 0.75 0 0 0.08080808 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.128166884 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Male United-States 0 -23 0.25555557 0.132466719 0.625 0 0 0.4040404 Private Some-college Separated Craft-repair Not-in-family White Male United-States 0 -54 0.6 0.07303471 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -38 0.422222227 0.125519216 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.09232541 0.625 0.1502415 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.177017659 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.115615562 0.5625 0 0 0.424242437 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.12347167 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male El-Salvador 0 -36 0.4 0.0857449844 0.5625 0 0 0.474747479 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.046257 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 -40 0.444444448 0.09436757 0.3125 0 0 0.4040404 State-gov 9th Separated Machine-op-inspct Not-in-family Black Male United-States 0 -26 0.2888889 0.177438617 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -46 0.51111114 0.17885977 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Transport-moving Not-in-family Black Male United-States 0 -28 0.311111122 0.276294619 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Craft-repair Not-in-family White Male United-States 1 -46 0.51111114 0.0138303572 0.8125 0 0 0.454545468 State-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -55 0.6111111 0.127242118 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Female United-States 0 -76 0.844444454 0.06647449 0.625 0 0 0.2020202 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.277462542 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -50 0.5555556 0.1601793 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -75 0.8333334 0.126236528 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.133572668 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.09409479 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family Black Female United-States 0 -51 0.566666663 0.102778666 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -43 0.477777779 0.131154671 0.9375 0.1502415 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.05563462 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.15480718 0.625 0 0 0.2020202 ? Some-college Never-married ? Not-in-family Black Female United-States 0 -60 0.6666667 0.0823571 0.1875 0 0 0.454545468 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Italy 0 -47 0.5222222 0.12688446 0.8125 0 0 0.454545468 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -73 0.811111152 0.0621658862 0.4375 0 0 0.151515156 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.263120949 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -50 0.5555556 0.0599721856 0.5625 0.1502415 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.212094 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Puerto-Rico 0 -31 0.344444454 0.112037748 0.5625 0 0 0.5050505 Private HS-grad Never-married Machine-op-inspct Own-child Black Male ? 0 -45 0.5 0.0597970635 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male Germany 1 -57 0.6333333 0.0281281471 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male South 1 -34 0.377777785 0.572408 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Nicaragua 0 -19 0.211111113 0.207109153 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 -25 0.2777778 0.218475729 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -39 0.433333337 0.06686177 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female Germany 1 -28 0.311111122 0.108257875 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Poland 1 -48 0.533333361 0.0998892039 0.875 0 0 0.4040404 State-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -38 0.422222227 0.174458236 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.151473865 0.1875 0 0 0.1010101 Private 5th-6th Married-civ-spouse Priv-house-serv Wife Black Female Haiti 0 -19 0.211111113 0.174088463 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -41 0.455555558 0.133305266 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -23 0.25555557 0.14394711 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Sales Own-child Black Female United-States 0 -32 0.355555564 0.152579129 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -35 0.3888889 0.09836432 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family Amer-Indian-Eskimo Male United-States 0 -21 0.233333334 0.121464536 0.6875 0 0.3677686 0.3030303 Private Assoc-voc Never-married Farming-fishing Not-in-family White Female United-States 0 -24 0.266666681 0.0673332438 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 -34 0.377777785 0.202523068 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -29 0.322222233 0.148114279 0.8125 0 0 0.25252524 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -24 0.266666681 0.08232881 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family Black Female ? 0 -55 0.6111111 0.106850185 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.161337778 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Own-child Asian-Pac-Islander Male Philippines 0 -46 0.51111114 0.06890797 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Own-child White Male United-States 0 -38 0.422222227 0.1259065 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -29 0.322222233 0.157908142 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 -35 0.3888889 0.08482022 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.09615378 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -41 0.455555558 0.208159879 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.03290822 0.5625 0 0 0.323232323 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.07448887 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -72 0.8 0.287304223 0.4375 0 0 0.353535354 Private 11th Divorced Other-service Not-in-family Black Female United-States 0 -17 0.188888893 0.113852248 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -46 0.51111114 0.08289526 0.5625 0 0 0.7070707 Self-emp-inc HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -38 0.422222227 0.131840333 0.8125 0 0 0.4848485 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -36 0.4 0.05515978 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.115879588 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Never-married Craft-repair Own-child White Male United-States 0 -28 0.311111122 0.170952484 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -28 0.311111122 0.0447718576 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -60 0.6666667 0.03788497 0.5625 0 0.3409091 0.7070707 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -42 0.466666669 0.182878762 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband Other Male United-States 1 -48 0.533333361 0.178685337 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.117402449 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.132243112 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 -55 0.6111111 0.150598273 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male Puerto-Rico 1 -30 0.333333343 0.10088671 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -68 0.75555557 0.08398032 0.25 0 0 0.1010101 Private 7th-8th Widowed Machine-op-inspct Not-in-family White Female United-States 0 -45 0.5 0.03378651 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -26 0.2888889 0.118399955 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Own-child White Female United-States 0 -22 0.244444445 0.146975324 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -22 0.244444445 0.112056606 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -36 0.4 0.114143215 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.0977170542 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Not-in-family Black Female United-States 0 -68 0.75555557 0.144487292 0.9375 0 0 0.161616161 Private Prof-school Widowed Prof-specialty Unmarried White Female United-States 0 -26 0.2888889 0.193461329 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife Black Female United-States 1 -52 0.5777778 0.135589227 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male ? 0 -46 0.51111114 0.133249372 0.5625 0 0.3838384 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -53 0.5888889 0.106616467 0.875 0.07298073 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.0857854 0.4375 0 0 0.08080808 Private 11th Never-married Sales Own-child White Female United-States 0 -29 0.322222233 0.137196958 0.8125 0 0 0.75757575 Private Bachelors Married-civ-spouse Prof-specialty Own-child White Male United-States 0 -41 0.455555558 0.113645472 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.111289449 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family Black Female Trinadad&Tobago 0 -57 0.6333333 0.118503004 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 1 -30 0.333333343 0.240242347 0.8125 0 0 0.3030303 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male Japan 0 -46 0.51111114 0.08952081 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.126103163 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -59 0.655555546 0.17159301 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -40 0.444444448 0.13643451 0.75 0 0 0.5252525 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.06999707 0.5625 0.0203602035 0 0.2020202 State-gov HS-grad Divorced Other-service Unmarried White Female United-States 0 -22 0.244444445 0.0755463243 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female ? 0 -59 0.655555546 0.0475670248 0.25 0 0 0.858585835 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.06919152 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -40 0.444444448 0.376468062 0.25 0 0 0.4040404 Private 7th-8th Never-married Farming-fishing Own-child White Male United-States 0 -18 0.2 0.173076138 0.375 0 0 0.4040404 Private 10th Never-married Sales Other-relative Black Female United-States 0 -62 0.6888889 0.09738164 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -63 0.7 0.06897801 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -29 0.322222233 0.107622728 0.875 0 0 0.8080808 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -27 0.3 0.03754483 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Wife Black Female United-States 1 -47 0.5222222 0.09979828 1 0 0 0.5050505 State-gov Doctorate Divorced Prof-specialty Unmarried White Male France 1 -20 0.222222224 0.182766274 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -48 0.533333361 0.06635931 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.183816314 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male Mexico 0 -22 0.244444445 0.2185249 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Female United-States 0 -42 0.466666669 0.104713731 0.75 0 0 0.24242425 Private Assoc-acdm Widowed Tech-support Unmarried White Female United-States 0 -36 0.4 0.06933701 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 -60 0.6666667 0.196607411 0.375 0 0 0.4040404 Private 10th Divorced Other-service Not-in-family Black Female United-States 0 -41 0.455555558 0.1256822 0.5625 0 0 0.4040404 Federal-gov HS-grad Separated Exec-managerial Not-in-family Black Female United-States 0 -43 0.477777779 0.116118021 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.130184114 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.118706413 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Wife White Female United-States 0 -32 0.355555564 0.07932822 0.5625 0 0 0.353535354 Private HS-grad Never-married Transport-moving Own-child White Female United-States 0 -22 0.244444445 0.02331507 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 -52 0.5777778 0.11394991 0.3125 0 0 0.25252524 Private 9th Widowed Other-service Not-in-family White Female Puerto-Rico 0 -27 0.3 0.121746749 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 -60 0.6666667 0.0953974053 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.113842823 0.8125 0.07688077 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -34 0.377777785 0.06820615 0.8125 0 0 0.6262626 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 -30 0.333333343 0.110587627 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.0958318338 0.625 0 0 0.25252524 Private Some-college Separated Other-service Unmarried White Female United-States 0 -39 0.433333337 0.07003681 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Exec-managerial Unmarried Black Female United-States 0 -64 0.7111111 0.126355737 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -17 0.188888893 0.0243940726 0.4375 0 0 0.2020202 Self-emp-not-inc 11th Never-married Farming-fishing Own-child White Male United-States 0 -29 0.322222233 0.071619615 0.875 0 0 0.4040404 State-gov Masters Never-married Exec-managerial Not-in-family White Male ? 0 -37 0.411111116 0.167974114 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 -43 0.477777779 0.0743279 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.07943935 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -17 0.188888893 0.110349193 0.375 0 0 0.121212125 Private 10th Never-married Sales Own-child White Female United-States 0 -29 0.322222233 0.0980612338 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male Guatemala 0 -24 0.266666681 0.07307512 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male India 0 -27 0.3 0.142816931 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 -69 0.7666667 0.122887038 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Separated Exec-managerial Not-in-family White Male United-States 0 -30 0.333333343 0.0835317448 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Not-in-family White Male United-States 0 -29 0.322222233 0.1341115 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Puerto-Rico 0 -17 0.188888893 0.09706575 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 -61 0.677777767 0.0723632 0.25 0 0.379017442 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -70 0.7777778 0.273025274 0.25 0 0 0.3838384 Private 7th-8th Widowed Other-service Unmarried Black Female United-States 0 -32 0.355555564 0.118445083 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -21 0.233333334 0.176628351 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Other-relative White Male United-States 0 -27 0.3 0.282920867 0.5625 0.09562095 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Unmarried White Male United-States 1 -27 0.3 0.05838264 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -19 0.211111113 0.126059383 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 -44 0.4888889 0.466020525 0.875 0 0 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -36 0.4 0.147829369 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.134072423 0.875 0.07298073 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.12932536 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family White Female Poland 0 -34 0.377777785 0.282676369 0.8125 0.07298073 0 0.545454562 Federal-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -28 0.311111122 0.239838228 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Other-relative White Male United-States 0 -34 0.377777785 0.4607077 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Own-child White Male El-Salvador 0 -18 0.2 0.0248413 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -39 0.433333337 0.136848733 0.625 0 0 0.454545468 Private Some-college Divorced Farming-fishing Unmarried White Female United-States 0 -34 0.377777785 0.123803049 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -35 0.3888889 0.0700246841 0.875 0 0 0.414141417 Local-gov Masters Divorced Adm-clerical Unmarried White Female United-States 0 -24 0.266666681 0.205159947 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -41 0.455555558 0.0385484 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.194790885 1 0 0.43663913 0.454545468 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -68 0.75555557 0.150884524 0.625 0 0 0.3030303 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -35 0.3888889 0.18048434 0.4375 0 0 0.5050505 Private 11th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -47 0.5222222 0.14467521 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -43 0.477777779 0.162677437 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -35 0.3888889 0.132932141 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -34 0.377777785 0.199853852 0.625 0 0 0.171717167 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -26 0.2888889 0.09175291 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -50 0.5555556 0.02736099 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -22 0.244444445 0.178401768 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Female United-States 0 -20 0.222222224 0.0760063455 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child Asian-Pac-Islander Male United-States 0 -18 0.2 0.159014761 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Female United-States 0 -52 0.5777778 0.0599634275 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 0 -71 0.788888931 0.141895533 0.5625 0 0 0.282828271 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -55 0.6111111 0.0405420624 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -17 0.188888893 0.145575717 0.4375 0 0 0.08080808 Private 11th Never-married Sales Own-child White Female United-States 0 -36 0.4 0.09412173 0.625 0 0 0.4040404 Private Some-college Widowed Prof-specialty Own-child White Female United-States 0 -25 0.2777778 0.0217389986 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -39 0.433333337 0.285312563 0.5 0 0.4242424 0.4040404 Local-gov 12th Married-civ-spouse Transport-moving Husband White Male Nicaragua 1 -27 0.3 0.201299921 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family Asian-Pac-Islander Male Philippines 0 -42 0.466666669 0.214355722 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -22 0.244444445 0.23430042 0.5625 0 0.3946281 0.4040404 Private HS-grad Married-spouse-absent Sales Not-in-family White Male United-States 0 -57 0.6333333 0.1883445 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 1 -34 0.377777785 0.273041457 0.625 0 0 0.282828271 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 -31 0.344444454 0.200166374 0.875 0 0 0.6060606 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.122813627 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 -41 0.455555558 0.154339075 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family Black Male Jamaica 0 -30 0.333333343 0.1277156 0.625 0.068490684 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Female England 0 -17 0.188888893 0.2785449 0.4375 0 0 0.323232323 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 -26 0.2888889 0.165706322 0.5625 0 0 0.2020202 Self-emp-inc HS-grad Separated Sales Unmarried White Female Honduras 0 -32 0.355555564 0.26334995 0.125 0 0 0.5050505 Private 1st-4th Never-married Farming-fishing Not-in-family Other Male Mexico 0 -55 0.6111111 0.0687395856 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -19 0.211111113 0.166563734 0.5 0 0 0.2020202 Private 12th Married-spouse-absent Other-service Own-child Other Female United-States 0 -28 0.311111122 0.09436757 0.875 0 0 0.5050505 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -55 0.6111111 0.14611724 0.5625 0.0288502872 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -49 0.544444442 0.0549967848 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.119569883 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -43 0.477777779 0.04353121 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.0741076544 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.137240067 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.1103721 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -59 0.655555546 0.07900492 0.5625 0 0.4331956 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.0341131762 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -21 0.233333334 0.112154946 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -28 0.311111122 0.117060296 0.8125 0 0 0.1010101 ? Bachelors Married-spouse-absent ? Not-in-family Asian-Pac-Islander Female Taiwan 0 -44 0.4888889 0.122422978 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.229594439 0.8125 0 0 0.4848485 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.07729347 0.8125 0.04416044 0 0.454545468 Self-emp-not-inc Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -54 0.6 0.09351824 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -28 0.311111122 0.144819349 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -34 0.377777785 0.123780824 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -46 0.51111114 0.184298575 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.0766953751 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.144106075 0.5625 0 0.459366381 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 -29 0.322222233 0.0774443448 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -35 0.3888889 0.138302222 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.03901381 0.625 0.07688077 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -90 1 0.1515877 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child Asian-Pac-Islander Male South 0 -35 0.3888889 0.136072159 0.875 0.07688077 0 0.5555556 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.189502969 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Other Male United-States 0 -42 0.466666669 0.0207610279 0.875 0.0235402342 0 0.161616161 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -56 0.622222245 0.06655127 0.25 0.0501305 0 0.454545468 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -31 0.344444454 0.025744509 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Own-child White Male United-States 0 -23 0.25555557 0.116004191 0.5625 0 0 0.5050505 Private HS-grad Never-married Tech-support Own-child White Male United-States 0 -60 0.6666667 0.09466123 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -28 0.311111122 0.149097636 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -32 0.355555564 0.121774361 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -36 0.4 0.0750984251 0.875 0.14084141 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 -44 0.4888889 0.105024233 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.1354626 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.06850452 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Asian-Pac-Islander Male United-States 0 -49 0.544444442 0.0943763256 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Unmarried White Male United-States 0 -48 0.533333361 0.116325468 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 -47 0.5222222 0.080912374 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.07910258 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.1729394 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 -31 0.344444454 0.118666671 0.8125 0.0406404063 0 0.4040404 Local-gov Bachelors Married-civ-spouse Machine-op-inspct Husband White Male ? 0 -24 0.266666681 0.150744423 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.135786578 0.5625 0 0 0.3030303 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -25 0.2777778 0.09346301 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -36 0.4 0.09023611 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Unmarried White Female United-States 0 -38 0.422222227 0.0929161 0.5625 0 0 0.454545468 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -57 0.6333333 0.06964549 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.310956061 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -41 0.455555558 0.0477428176 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -56 0.622222245 0.3142025 0.6875 0 0 0.6060606 State-gov Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 1 -19 0.211111113 0.100116864 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -44 0.4888889 0.128469288 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Other-relative Black Male United-States 0 -34 0.377777785 0.2017283 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Female United-States 0 -25 0.2777778 0.142401353 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -27 0.3 0.07188027 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -22 0.244444445 0.129330069 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -59 0.655555546 0.357039958 0.625 0 0.4331956 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.08025365 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.136357054 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -21 0.233333334 0.0339064 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.0942955 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Other-relative White Male Italy 0 -19 0.211111113 0.1485258 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child White Female United-States 0 -82 0.9111111 0.0356441177 0.625 0 0 0.0303030312 ? Some-college Widowed ? Not-in-family Amer-Indian-Eskimo Male United-States 0 -35 0.3888889 0.0215288568 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.09982253 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.102126017 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -30 0.333333343 0.2711239 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.126811728 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.06480681 0.8125 0 0 0.05050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Wife White Female United-States 0 -29 0.322222233 0.2293614 0.5625 0 0 0.444444448 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -60 0.6666667 0.107993849 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Columbia 0 -28 0.311111122 0.08091506 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Sales Not-in-family White Female United-States 0 -38 0.422222227 0.204631224 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Not-in-family Black Female United-States 0 -31 0.344444454 0.121971034 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.135053769 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 1 -42 0.466666669 0.108366981 0.625 0 0 0.232323229 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -40 0.444444448 0.123321474 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Other-service Wife White Female Yugoslavia 1 -24 0.266666681 0.162569 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -37 0.411111116 0.230405375 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.130568027 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.0541589074 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -22 0.244444445 0.3733516 0.3125 0 0 0.353535354 Private 9th Married-spouse-absent Other-service Other-relative White Male Mexico 0 -46 0.51111114 0.057323847 0.625 0 0.373737365 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.07312497 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -34 0.377777785 0.08147006 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -42 0.466666669 0.149532065 0.625 0 0 0.434343427 Private Some-college Divorced Sales Unmarried White Female United-States 0 -43 0.477777779 0.160658181 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.0326017626 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -60 0.6666667 0.05930808 0.9375 0.0378103778 0 0.161616161 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.160557821 0.625 0.0861408561 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 1 -22 0.244444445 0.164290547 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Transport-moving Other-relative White Male United-States 0 -39 0.433333337 0.205830112 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.0955348 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -39 0.433333337 0.0874005258 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.101698995 0.4375 0 0 0.454545468 Self-emp-not-inc 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -63 0.7 0.09910387 0.25 0 0 0.6060606 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 1 -46 0.51111114 0.0203535389 0.625 0.07688077 0 0.3838384 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.113131568 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried Black Female United-States 0 -33 0.366666675 0.08976733 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -65 0.722222269 0.116191432 0.625 0.0184801836 0 0.2020202 Private Some-college Widowed Prof-specialty Not-in-family White Female Hungary 0 -39 0.433333337 0.129487678 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 1 -43 0.477777779 0.1420107 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family Black Female United-States 1 -28 0.311111122 0.177149668 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.104477324 0.5625 1 0 0.353535354 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Female United-States 1 -24 0.266666681 0.156878307 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -48 0.533333361 0.0966804847 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -35 0.3888889 0.030717887 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -62 0.6888889 0.020090187 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.07012706 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -60 0.6666667 0.128945485 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.018511422 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.138739347 0.9375 0 0 0.4040404 Private Prof-school Never-married Exec-managerial Not-in-family White Female Cuba 0 -39 0.433333337 0.0965747461 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.13504906 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -43 0.477777779 0.12594758 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Protective-serv Unmarried White Female United-States 0 -35 0.3888889 0.0364779532 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.07643337 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.158463135 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -32 0.355555564 0.235309377 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 0 -18 0.2 0.1910393 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -37 0.411111116 0.04733735 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Unmarried Black Female United-States 0 -26 0.2888889 0.111841075 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -51 0.566666663 0.1304771 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.08408135 0.625 0 0 0.363636374 ? Some-college Divorced ? Not-in-family Amer-Indian-Eskimo Female United-States 0 -33 0.366666675 0.159209415 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.08218872 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.07714462 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.129206821 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.282920867 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.107795827 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Widowed Other-service Unmarried White Female United-States 0 -34 0.377777785 0.2042069 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 1 -45 0.5 0.128030822 0.5625 0 0 0.3030303 Private HS-grad Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 -53 0.5888889 0.08552339 0.5625 0 0 0.353535354 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 -52 0.5777778 0.0424353667 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Philippines 0 -64 0.7111111 0.2634335 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 1 -42 0.466666669 0.142418861 0.875 0 0 0.454545468 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 -44 0.4888889 0.105349548 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -41 0.455555558 0.0786668062 0.5625 0.07298073 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -53 0.5888889 0.1377021 0.875 0 0 0.434343427 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.04508303 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -20 0.222222224 0.231883109 0.4375 0 0 0.4040404 Private 11th Separated Other-service Own-child White Female United-States 0 -29 0.322222233 0.0731283352 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Priv-house-serv Own-child White Female United-States 0 -56 0.622222245 0.1647499 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.244949 1 0 0.453856736 0.3030303 Private Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 -56 0.622222245 0.148017287 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -38 0.422222227 0.181394964 0.625 0.07298073 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.05245756 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male Philippines 0 -28 0.311111122 0.04721477 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -31 0.344444454 0.143895924 0.5625 0.03908039 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.04690494 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 -65 0.722222269 0.114508942 0.8125 0 0 0.343434334 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -40 0.444444448 0.222215191 0.5625 0 0 0.3030303 Private HS-grad Separated Handlers-cleaners Not-in-family Black Male United-States 0 -31 0.344444454 0.130184114 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -35 0.3888889 0.175954819 0.5625 0 0.3996786 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -42 0.466666669 0.07286498 0.875 0 0.43663913 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male South 1 -20 0.222222224 0.199782446 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -30 0.333333343 0.1736345 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.104613379 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -22 0.244444445 0.102301806 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -65 0.722222269 0.09639491 0.5625 0 0.5064279 0.1010101 ? HS-grad Widowed ? Unmarried White Female United-States 0 -31 0.344444454 0.04464052 0.625 0.03908039 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 0 -56 0.622222245 0.0622642227 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -51 0.566666663 0.1544226 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Other-relative Black Male Haiti 0 -36 0.4 0.139557689 0.375 0 0 0.6060606 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -44 0.4888889 0.103842854 0.625 0 0.365013778 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 -49 0.544444442 0.121841714 0.875 0 0.40289256 0.454545468 Private Masters Divorced Exec-managerial Unmarried White Male United-States 1 -28 0.311111122 0.138301551 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.12176089 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.231036469 0.625 0 0 0.656565666 Self-emp-not-inc Some-college Never-married Sales Not-in-family White Male United-States 0 -49 0.544444442 0.119090326 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -74 0.822222233 0.05970075 1 0 0.845500469 0.2020202 State-gov Doctorate Never-married Prof-specialty Other-relative White Female United-States 1 -48 0.533333361 0.16707629 0.8125 0.0501305 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.275882423 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.124639578 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -46 0.51111114 0.224208847 0.8125 0.07298073 0 0.656565666 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.143371239 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.0447718576 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.192071155 0.4375 0 0 0.4040404 Private 11th Never-married Priv-house-serv Own-child White Female United-States 0 -28 0.311111122 0.118158832 0.3125 0 0 0.4040404 Private 9th Divorced Prof-specialty Not-in-family Black Female United-States 0 -18 0.2 0.102808975 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 -42 0.466666669 0.228561237 0.875 0 0 0.25252524 Private Masters Divorced Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.1935105 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried Black Female United-States 0 -29 0.322222233 0.04755423 0.5625 0.0346403457 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -21 0.233333334 0.05989473 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -36 0.4 0.06147686 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Asian-Pac-Islander Female United-States 0 -56 0.622222245 0.164715558 0.375 0 0 0.4040404 Private 10th Widowed Machine-op-inspct Unmarried Black Female United-States 0 -49 0.544444442 0.156654686 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.08599553 0.625 0 0 0.8080808 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.109236516 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 -40 0.444444448 0.274956316 0.125 0 0 0.454545468 Private 1st-4th Never-married Other-service Not-in-family White Male El-Salvador 0 -43 0.477777779 0.09411567 0.8125 0.1502415 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.132878929 0.5 0 0 0.4848485 Private 12th Married-civ-spouse Farming-fishing Husband White Male Germany 0 -52 0.5777778 0.154901475 0.9375 0.03103031 0 0.3030303 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 -25 0.2777778 0.170271546 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -63 0.7 0.07468824 0.875 0 0 0.7070707 Self-emp-inc Masters Divorced Prof-specialty Not-in-family White Male United-States 1 -51 0.566666663 0.108253159 1 0 0 1 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male South 0 -25 0.2777778 0.0603655279 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -62 0.6888889 0.179185092 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -27 0.3 0.0853570253 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -48 0.533333361 0.06523451 0.625 0 0 0.3030303 Federal-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -32 0.355555564 0.125808164 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.0195298065 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.233828276 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -45 0.5 0.07429826 0.875 0 0 0.4040404 State-gov Masters Divorced Exec-managerial Unmarried White Female United-States 0 -27 0.3 0.2093682 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -41 0.455555558 0.148645014 0.8125 0 0 0.373737365 Private Bachelors Divorced Other-service Not-in-family White Male United-States 0 -61 0.677777767 0.100629419 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -70 0.7777778 0.08870382 0.8125 0 0 0.5555556 Self-emp-inc Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -55 0.6111111 0.03367403 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family Black Female United-States 0 -35 0.3888889 0.126026392 0.8125 0 0 0.454545468 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -36 0.4 0.121814772 0.6875 0 0 0.3838384 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -29 0.322222233 0.125039652 0.625 0 0 0.6060606 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -30 0.333333343 0.213245064 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Wife White Female United-States 0 -45 0.5 0.184990957 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male ? 0 -39 0.433333337 0.130384833 0.8125 0.0545505434 0 0.6060606 Federal-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -18 0.2 0.228217736 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -28 0.311111122 0.146031708 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -27 0.3 0.07202441 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.150489837 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -33 0.366666675 0.117726423 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.0913333 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -25 0.2777778 0.232180133 0.5625 0 0 0.04040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -38 0.422222227 0.2508808 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Own-child Black Female United-States 0 -23 0.25555557 0.122462042 0.625 0 0 0.454545468 Private Some-college Never-married Farming-fishing Unmarried White Male United-States 0 -40 0.444444448 0.158530489 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Male United-States 0 -36 0.4 0.145962328 0.5625 1 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male ? 1 -20 0.222222224 0.201655552 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -41 0.455555558 0.136396125 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -44 0.4888889 0.115864769 0.625 0 0 0.3838384 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 -49 0.544444442 0.1662896 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -22 0.244444445 0.303710163 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family Black Female United-States 0 -26 0.2888889 0.0361001 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.06988392 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.05120007 0.5625 0 0 0.25252524 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -28 0.311111122 0.0539891757 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Never-married Exec-managerial Own-child White Male United-States 0 -37 0.411111116 0.06121149 0.625 0.0861408561 0 0.5555556 Federal-gov Some-college Separated Exec-managerial Not-in-family White Male United-States 1 -44 0.4888889 0.288240433 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -20 0.222222224 0.155556157 0.5 0 0 0.353535354 ? 12th Never-married ? Not-in-family Black Female United-States 0 -53 0.5888889 0.11983256 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -36 0.4 0.2307812 0.875 0 0 0.151515156 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 0 -77 0.8555556 0.170836627 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband Other Male United-States 0 -21 0.233333334 0.147561982 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -24 0.266666681 0.109511994 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 -30 0.333333343 0.0589753538 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 -51 0.566666663 0.09591872 0.6875 0 0 0.5050505 Local-gov Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -22 0.244444445 0.104008541 0.625 0 0 0.3030303 Private Some-college Divorced Sales Own-child Asian-Pac-Islander Female Philippines 0 -23 0.25555557 0.113897376 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Male United-States 0 -47 0.5222222 0.1300238 1 1 0 0.5050505 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.101798676 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Male United-States 0 -48 0.533333361 0.180447966 0.8125 0 0 0.5050505 Private Bachelors Never-married Other-service Not-in-family White Male Mexico 1 -43 0.477777779 0.09235909 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.102682352 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male Guatemala 0 -19 0.211111113 0.240491554 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.13606137 0.625 0 0 0.4040404 State-gov Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -23 0.25555557 0.06619699 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child Asian-Pac-Islander Male United-States 0 -61 0.677777767 0.119192034 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -63 0.7 0.126569927 0.4375 0 0 0.3030303 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 -65 0.722222269 0.1851654 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Unmarried White Female United-States 0 -37 0.411111116 0.07126871 0.6875 0.07298073 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 1 -41 0.455555558 0.130345091 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -35 0.3888889 0.102871619 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband Black Male ? 0 -21 0.233333334 0.177571312 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Other-relative White Female United-States 0 -48 0.533333361 0.06875171 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Adm-clerical Unmarried White Female United-States 0 -51 0.566666663 0.104797922 0.625 0 0.4331956 0.4040404 State-gov Some-college Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.0224495772 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.10559202 0.625 0 0 0.151515156 State-gov Some-college Never-married Prof-specialty Not-in-family White Male ? 0 -56 0.622222245 0.07775215 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.12234889 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.08100464 0.8125 0 0 0.24242425 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -39 0.433333337 0.132220209 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -45 0.5 0.0274061188 0.625 0 0 0.75757575 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 -49 0.544444442 0.153958529 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Male Columbia 0 -23 0.25555557 0.468198061 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -69 0.7666667 0.140927657 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -41 0.455555558 0.1447008 0.875 0 0 0.6060606 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.126918152 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Separated Exec-managerial Other-relative White Male United-States 0 -25 0.2777778 0.119636565 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -52 0.5777778 0.08391634 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 -28 0.311111122 0.155489475 0.625 0.0332503319 0 0.5050505 Private Some-college Never-married Prof-specialty Not-in-family Black Female United-States 0 -50 0.5555556 0.14920944 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.156648636 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Tech-support Own-child White Female United-States 0 -48 0.533333361 0.11329928 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.1446092 0.9375 0 0 0.424242437 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -63 0.7 0.160045266 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.0369682871 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.110813938 1 0.14084141 0 0.454545468 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 -28 0.311111122 0.151212528 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Black Male ? 0 -58 0.644444466 0.123842783 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -41 0.455555558 0.14031744 0.625 0 0 0.5151515 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -67 0.7444445 0.113403 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -62 0.6888889 0.215784281 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -28 0.311111122 0.129577264 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -26 0.2888889 0.112716 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 -46 0.51111114 0.06973641 0.9375 0 0 0.656565666 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.0394165851 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.128875434 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 1 -25 0.2777778 0.130544454 0.875 0 0 0.353535354 Private Masters Never-married Prof-specialty Own-child White Female United-States 0 -20 0.222222224 0.174101934 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -21 0.233333334 0.0380681679 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -25 0.2777778 0.06902112 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -44 0.4888889 0.209709674 0.9375 0 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.112141475 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -50 0.5555556 0.108253159 0.875 0.07298073 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Philippines 1 -29 0.322222233 0.2278365 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -18 0.2 0.1902021 0.625 0 0 0.212121218 Private Some-college Never-married Sales Own-child Black Female United-States 0 -32 0.355555564 0.2581449 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried White Female United-States 0 -58 0.644444466 0.0804105848 0.6875 0 0 0.6060606 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 -50 0.5555556 0.132669449 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.225109369 0.625 0 0 0.181818187 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -58 0.644444466 0.0184447411 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.0901498944 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 -36 0.4 0.243744045 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -21 0.233333334 0.155201882 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -49 0.544444442 0.221441969 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -60 0.6666667 0.164227247 0.875 0 0 0.5050505 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -39 0.433333337 0.206536651 0.625 0.03103031 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.093068324 0.75 0 0.43663913 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.188636124 0.625 0 0 0.4848485 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -55 0.6111111 0.205939233 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male ? 0 -64 0.7111111 0.111049674 0.5625 0 0 0.2020202 Local-gov HS-grad Divorced Transport-moving Unmarried White Male United-States 0 -29 0.322222233 0.09334986 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Never-married Prof-specialty Other-relative Black Female United-States 0 -40 0.444444448 0.0750876442 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.0975129753 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.1151845 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Unmarried White Female United-States 0 -43 0.477777779 0.07576859 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -28 0.311111122 0.275120646 0.5 0 0 0.4040404 Private 12th Never-married Sales Not-in-family Black Male United-States 0 -46 0.51111114 0.0187256057 0.75 0 0 0.3838384 State-gov Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -34 0.377777785 0.159168318 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 -47 0.5222222 0.08206075 0.875 0.07688077 0 0.3838384 Private Masters Married-civ-spouse Adm-clerical Wife White Female United-States 1 -43 0.477777779 0.212817371 0.875 0 0 0.4040404 Self-emp-not-inc Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -24 0.266666681 0.470408618 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -21 0.233333334 0.221949816 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -65 0.722222269 0.130972818 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male England 1 -20 0.222222224 0.1903267 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -31 0.344444454 0.0177819841 0.875 0 0 0.25252524 State-gov Masters Divorced Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.2458118 0.5625 0.0346403457 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -22 0.244444445 0.05657555 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -20 0.222222224 0.06355741 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Not-in-family Other Female United-States 0 -44 0.4888889 0.117322296 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.06867829 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 -41 0.455555558 0.09894761 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.08531998 0.5625 0 0.506198347 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.0212877318 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female Germany 0 -24 0.266666681 0.0891267955 0.625 0 0 0.3030303 Private Some-college Married-spouse-absent Sales Unmarried Other Female Ecuador 0 -24 0.266666681 0.07574502 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.0329317935 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Own-child White Female United-States 0 -39 0.433333337 0.122544885 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -48 0.533333361 0.166824386 0.625 0.0332503319 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -24 0.266666681 0.131883442 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 -50 0.5555556 0.115882955 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male South 1 -50 0.5555556 0.0337966122 0.625 0.0406404063 0 0.5555556 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -68 0.75555557 0.236889482 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -31 0.344444454 0.128176987 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -22 0.244444445 0.312589377 0.125 0 0 0.4040404 Private 1st-4th Never-married Craft-repair Not-in-family White Male Guatemala 0 -18 0.2 0.0244816318 0.625 0 0 0.4848485 ? Some-college Never-married ? Own-child White Male United-States 0 -25 0.2777778 0.080984436 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Not-in-family White Male Poland 0 -28 0.311111122 0.2384952 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -17 0.188888893 0.208055481 0.4375 0 0 0.151515156 Local-gov 11th Never-married Adm-clerical Own-child White Female United-States 0 -24 0.266666681 0.140651509 1 0 0 1 State-gov Doctorate Never-married Prof-specialty Not-in-family White Female England 0 -20 0.222222224 0.248990208 0.375 0 0 0.363636374 Private 10th Separated Sales Not-in-family White Female United-States 0 -45 0.5 0.06635931 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 -44 0.4888889 0.161461711 0.625 0.01506015 0 0.454545468 Private Some-college Married-spouse-absent Craft-repair Unmarried White Female United-States 0 -57 0.6333333 0.15574272 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.159220859 0.8125 0 0.43663913 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.08025567 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Own-child White Male United-States 0 -22 0.244444445 0.2158348 0.625 0 0 0.24242425 Private Some-college Never-married Protective-serv Own-child Asian-Pac-Islander Male India 0 -41 0.455555558 0.0258617029 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -51 0.566666663 0.127421275 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -46 0.51111114 0.134222627 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Unmarried White Male United-States 0 -52 0.5777778 0.192861214 0.5625 0 0 0.3838384 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -50 0.5555556 0.102922805 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -26 0.2888889 0.119202808 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -17 0.188888893 0.0791733041 0.375 0 0 0.121212125 Private 10th Never-married Sales Other-relative Black Female United-States 0 -64 0.7111111 0.171614572 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -51 0.566666663 0.08980639 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -28 0.311111122 0.123139612 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -51 0.566666663 0.09175156 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.09057355 0.8125 0 0.404499531 0.4040404 Self-emp-not-inc Bachelors Divorced Adm-clerical Not-in-family White Male United-States 0 -48 0.533333361 0.183725387 0.625 0 0 0.323232323 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -44 0.4888889 0.188039377 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Own-child White Female United-States 1 -47 0.5222222 0.0742524639 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 -52 0.5777778 0.136101782 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Own-child White Female United-States 0 -58 0.644444466 0.1331187 0.625 0 0 0.3939394 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.08458987 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family White Female United-States 0 -40 0.444444448 0.132997468 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -23 0.25555557 0.160860911 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -31 0.344444454 0.122702494 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male Yugoslavia 0 -40 0.444444448 0.161987737 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.08479261 0.625 0 0 0.3838384 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -46 0.51111114 0.104013927 0.875 0 0 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 1 -32 0.355555564 0.139883012 0.5625 0.03908039 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Wife Black Female United-States 0 -50 0.5555556 0.14953813 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.163830534 0.5625 0 0 0.373737365 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -26 0.2888889 0.106912822 0.875 0 0 0.3030303 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -36 0.4 0.173563778 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -26 0.2888889 0.09731428 0.6875 0.005940059 0 0.353535354 Private Assoc-voc Divorced Sales Own-child White Female United-States 0 -19 0.211111113 0.141325042 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 -53 0.5888889 0.0203703772 0.75 0.1502415 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.0896137655 0.625 0 0 0.414141417 Private Some-college Never-married Sales Not-in-family Black Male United-States 0 -29 0.322222233 0.09317137 0.625 0 0 0.0606060624 Private Some-college Married-civ-spouse Adm-clerical Own-child White Female United-States 0 -81 0.900000036 0.1356485 0.875 0 0 0.6060606 Private Masters Widowed Prof-specialty Unmarried White Male ? 0 -37 0.411111116 0.354931116 0.875 0 0 0.3838384 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 -40 0.444444448 0.05323347 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Transport-moving Not-in-family White Male United-States 1 -36 0.4 0.16186583 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Unmarried Black Female United-States 0 -18 0.2 0.182220712 0.5 0 0 0.3030303 Private 12th Never-married Adm-clerical Own-child White Female United-States 0 -44 0.4888889 0.13440448 0.4375 0 0 0.4040404 State-gov 11th Separated Tech-support Not-in-family Black Male United-States 0 -36 0.4 0.155621484 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 -69 0.7666667 0.136776 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.08538464 0.5 0 0 0.07070707 Private 12th Never-married Prof-specialty Own-child White Male United-States 0 -38 0.422222227 0.0214507263 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.221580043 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Male United-States 0 -52 0.5777778 0.107543252 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 -24 0.266666681 0.303558618 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 -57 0.6333333 0.122602135 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 -19 0.211111113 0.235481128 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Own-child White Female United-States 0 -38 0.422222227 0.108483508 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 -46 0.51111114 0.143874377 0.25 0 0.365932047 0.24242425 Private 7th-8th Married-spouse-absent Priv-house-serv Unmarried White Female Guatemala 0 -21 0.233333334 0.369301 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Own-child White Male Mexico 1 -29 0.322222233 0.101610087 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female Japan 0 -33 0.366666675 0.226055011 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Female United-States 0 -26 0.2888889 0.09009601 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -28 0.311111122 0.135051072 0.5625 0 0 0.5555556 Private HS-grad Separated Farming-fishing Not-in-family White Male United-States 0 -26 0.2888889 0.0337460972 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 -37 0.411111116 0.09986226 0.9375 0 0 0.0606060624 ? Prof-school Married-civ-spouse ? Husband White Male Mexico 0 -49 0.544444442 0.11935772 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 -28 0.311111122 0.0893686 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -57 0.6333333 0.0145658571 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Other-service Not-in-family White Male United-States 0 -60 0.6666667 0.0356299728 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.101086751 0.5625 0 0 0.25252524 ? HS-grad Never-married ? Own-child White Male United-States 0 -38 0.422222227 0.16763331 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -51 0.566666663 0.07965151 0.5625 0.031370312 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -60 0.6666667 0.09799455 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.1478718 0.8125 0.03411034 0 0.474747479 Private Bachelors Married-civ-spouse Exec-managerial Other-relative White Male United-States 0 -44 0.4888889 0.268844664 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Craft-repair Own-child Black Female United-States 0 -19 0.211111113 0.153101131 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Never-married Other-service Own-child White Female United-States 0 -59 0.655555546 0.224468842 0.875 0 0 0.353535354 Private Masters Married-civ-spouse Craft-repair Wife Asian-Pac-Islander Female Philippines 0 -50 0.5555556 0.155919865 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -35 0.3888889 0.09020984 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.0372040235 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Machine-op-inspct Unmarried White Male United-States 0 -18 0.2 0.123279713 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child Black Male United-States 0 -32 0.355555564 0.165343955 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband Amer-Indian-Eskimo Male Mexico 0 -32 0.355555564 0.124927178 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Unmarried White Female United-States 0 -39 0.433333337 0.07695199 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -25 0.2777778 0.122457996 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Female United-States 0 -30 0.333333343 0.229619354 0.875 0.1502415 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.162994 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -38 0.422222227 0.0844100341 0.625 0 0 0.8080808 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.0234012827 0.75 0 0 0.373737365 Private Assoc-acdm Divorced Other-service Unmarried White Female United-States 0 -56 0.622222245 0.08864253 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.152835757 0.8125 0 0 0.4040404 Federal-gov Bachelors Widowed Adm-clerical Not-in-family White Male United-States 1 -56 0.622222245 0.08361055 0.5625 0 0 0.414141417 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -17 0.188888893 0.06484925 0.375 0 0 0.141414136 Private 10th Never-married Other-service Own-child White Male United-States 0 -46 0.51111114 0.2270148 0.875 0 0.453856736 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.154465035 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -61 0.677777767 0.134366766 0.5 0 0 0.4040404 State-gov 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.0752169639 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -27 0.3 0.09376206 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -50 0.5555556 0.0218036585 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -33 0.366666675 0.137255549 0.6875 0 0 0.6262626 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -33 0.366666675 0.110587627 0.6875 0.07298073 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.04369555 0.625 0 0 0.6060606 Private Some-college Never-married Farming-fishing Unmarried White Male United-States 0 -51 0.566666663 0.0281577837 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.140583485 0.75 0 0 0.424242437 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 -49 0.544444442 0.053222023 0.875 0 0 0.161616161 Local-gov Masters Widowed Prof-specialty Unmarried White Female United-States 0 -26 0.2888889 0.09224122 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried Black Female United-States 0 -42 0.466666669 0.137100637 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.170368522 0.8125 0 0.3946281 0.323232323 Private Bachelors Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -38 0.422222227 0.115080774 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -48 0.533333361 0.134430751 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 1 -41 0.455555558 0.356445223 0.8125 0.07430074 0 0.454545468 Private Bachelors Divorced Tech-support Unmarried Black Male ? 1 -33 0.366666675 0.131727174 0.5625 0.04386044 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.122702494 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male Ireland 0 -25 0.2777778 0.123713471 0.8125 0 0 0.5050505 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -50 0.5555556 0.140984237 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.139328688 0.5625 0 0 0.363636374 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.113787591 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Not-in-family White Male United-States 0 -59 0.655555546 0.135557577 0.8125 0.1502415 0 0.5555556 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -17 0.188888893 0.050739374 0.375 0 0 0.24242425 Private 10th Never-married Sales Own-child Black Female United-States 0 -65 0.722222269 0.201719537 0.4375 0.01797018 0 0.4040404 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -56 0.622222245 0.109928913 0.5625 1 0 0.4040404 Self-emp-not-inc HS-grad Widowed Adm-clerical Unmarried White Female United-States 1 -57 0.6333333 0.0938166156 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -33 0.366666675 0.269693971 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child Black Male United-States 0 -41 0.455555558 0.1507121 0.875 0 0 0.656565666 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.05248652 0.8125 0 0 0.4040404 Private Bachelors Widowed Other-service Own-child Asian-Pac-Islander Female Philippines 0 -50 0.5555556 0.118410058 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -18 0.2 0.0616452433 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Other-relative White Male United-States 0 -19 0.211111113 0.1885681 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -26 0.2888889 0.0523322821 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female United-States 0 -61 0.677777767 0.133821875 0.75 0 0 0.02020202 ? Assoc-acdm Married-civ-spouse ? Husband White Male United-States 1 -67 0.7444445 0.128200561 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -41 0.455555558 0.0764401 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.136645332 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -27 0.3 0.07303202 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 -35 0.3888889 0.130995721 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -37 0.411111116 0.0323922932 0.8125 0 0 0.909090936 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 1 -22 0.244444445 0.09215568 0.4375 0 0 0.4040404 Private 11th Never-married Adm-clerical Not-in-family White Male United-States 0 -25 0.2777778 0.09650402 0.375 0 0 0.24242425 Private 10th Never-married Priv-house-serv Own-child White Female United-States 0 -26 0.2888889 0.101071931 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -27 0.3 0.201056778 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Protective-serv Own-child White Male United-States 0 -26 0.2888889 0.119314611 0.8125 0.068490684 0 0.656565666 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -51 0.566666663 0.0774733052 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.236033425 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 -60 0.6666667 0.0564758666 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.0422097333 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.154760033 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -40 0.444444448 0.132170364 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Craft-repair Own-child White Female Puerto-Rico 0 -69 0.7666667 0.110186875 0.5625 0 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -44 0.4888889 0.105912626 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -65 0.722222269 0.053999953 0.5625 0.0184801836 0 0.5050505 Private HS-grad Divorced Exec-managerial Other-relative White Female United-States 0 -52 0.5777778 0.0330496654 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -38 0.422222227 0.08281241 0.5625 0 0 0.353535354 Private HS-grad Separated Craft-repair Unmarried White Female United-States 0 -18 0.2 0.08342129 0.4375 0 0 0.4949495 Private 11th Never-married Sales Own-child White Female United-States 0 -24 0.266666681 0.145605356 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Own-child White Male United-States 0 -52 0.5777778 0.121277966 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -21 0.233333334 0.12698482 0.5625 0 0 0.444444448 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -67 0.7444445 0.07149097 1 0.200512 0 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Sales Husband White Male United-States 1 -64 0.7111111 0.11478442 0.625 0 0 0.08080808 Self-emp-not-inc Some-college Widowed Craft-repair Not-in-family White Female United-States 0 -25 0.2777778 0.190668851 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Black Male United-States 0 -34 0.377777785 0.22970961 0.875 0 0 0.5050505 Federal-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 -39 0.433333337 0.02315477 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -26 0.2888889 0.256397069 0.5625 0 0 0.5252525 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -19 0.211111113 0.205070376 0.375 0 0 0.25252524 Private 10th Never-married Farming-fishing Own-child White Male United-States 0 -35 0.3888889 0.06677825 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.13814798 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.0667849854 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Own-child White Male United-States 0 -45 0.5 0.06589996 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -18 0.2 0.06794279 0.4375 0 0 0.282828271 Private 11th Never-married Other-service Unmarried White Female United-States 0 -51 0.566666663 0.135094851 0.625 0 0 0.6363636 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.239140436 0.5625 0 0 0.282828271 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 -18 0.2 0.07973032 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female ? 0 -37 0.411111116 0.079315424 0.6875 0.046500463 0 0.4040404 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 0 -37 0.411111116 0.0791854262 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.1277237 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -21 0.233333334 0.114573605 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -46 0.51111114 0.0183491 1 0.07688077 0 0.454545468 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.129765168 0.5625 0 0 0.353535354 Private HS-grad Separated Sales Not-in-family White Female United-States 0 -23 0.25555557 0.3543896 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Unmarried Black Female United-States 0 -52 0.5777778 0.09872601 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Sales Unmarried Black Male United-States 0 -28 0.311111122 0.040606048 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.162962347 0.625 0 0 0.4040404 State-gov Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -48 0.533333361 0.143557146 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.146914035 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 -22 0.244444445 0.1884563 0.625 0 0 0.0303030312 Self-emp-not-inc Some-college Never-married Prof-specialty Own-child White Female United-States 0 -26 0.2888889 0.10310331 0.5625 0 0 0.8080808 Private HS-grad Never-married Adm-clerical Own-child Asian-Pac-Islander Male ? 1 -40 0.444444448 0.11309924 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -90 1 0.168944 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.130098581 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Own-child White Female United-States 0 -44 0.4888889 0.115869485 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.026593836 0.8125 0.07298073 0 0.424242437 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 -45 0.5 0.05677761 0.6875 0 0.453856736 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.181190878 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male Germany 1 -17 0.188888893 0.176598042 0.375 0 0 0.08080808 ? 10th Never-married ? Own-child White Male United-States 0 -49 0.544444442 0.08479261 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.0908530653 0.8125 0 0 0.5050505 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 -60 0.6666667 0.175872654 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -33 0.366666675 0.08042608 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Other Female Columbia 0 -53 0.5888889 0.08001118 0.375 0 0 0.5050505 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.124069765 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -28 0.311111122 0.128663272 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -22 0.244444445 0.139948338 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Handlers-cleaners Own-child White Male United-States 0 -48 0.533333361 0.14086704 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -76 0.844444454 0.05350895 0.375 0.0117301168 0 0.4040404 ? 10th Married-civ-spouse ? Husband White Male United-States 0 -19 0.211111113 0.126438588 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.04497661 0.6875 0.031370312 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Other-relative White Female United-States 0 -58 0.644444466 0.106419794 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 0 -19 0.211111113 0.205989748 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Female United-States 0 -37 0.411111116 0.0823496953 0.5625 0 0 0.424242437 ? HS-grad Divorced ? Not-in-family Asian-Pac-Islander Female ? 0 -22 0.244444445 0.142653257 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -52 0.5777778 0.08285215 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.0244506486 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -50 0.5555556 0.119126022 1 0.0378103778 0 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -62 0.6888889 0.113964729 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried White Male United-States 0 -26 0.2888889 0.02575057 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -64 0.7111111 0.18701157 0.5625 0 0 0.24242425 State-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.02173563 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.07868566 0.9375 0.1502415 0 0.8080808 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.152352154 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -19 0.211111113 0.0189566277 0.5625 0 0 0.5252525 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -39 0.433333337 0.09461611 0.5625 0 0 0.1010101 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -50 0.5555556 0.111166865 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.136685073 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -36 0.4 0.21303761 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 -39 0.433333337 0.136774644 0.6875 0 0 0.4949495 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -51 0.566666663 0.07004422 0.75 0 0 0.25252524 Self-emp-inc Assoc-acdm Never-married Sales Not-in-family White Female United-States 0 -28 0.311111122 0.118634343 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -57 0.6333333 0.07001256 0.9375 0 0 0.3030303 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.0266591683 0.9375 0 0 0.4040404 Local-gov Prof-school Separated Prof-specialty Own-child Black Female United-States 0 -27 0.3 0.341102123 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female Peru 0 -32 0.355555564 0.152875483 0.625 0 0.430670351 0.6060606 Private Some-college Never-married Sales Own-child White Male United-States 0 -49 0.544444442 0.104056366 0.5625 0 0 0.444444448 State-gov HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -34 0.377777785 0.09242442 0.375 0 0 0.4040404 Self-emp-not-inc 10th Never-married Other-service Own-child White Female United-States 0 -24 0.266666681 0.06891807 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -54 0.6 0.173613623 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Male Guatemala 0 -52 0.5777778 0.0289107952 0.5 0 0 0.454545468 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.112883709 0.4375 0 0 0.25252524 Private 11th Married-civ-spouse Handlers-cleaners Wife White Female United-States 0 -84 0.933333337 0.248483717 0.1875 0 0 0.151515156 ? 5th-6th Widowed ? Not-in-family White Male United-States 0 -79 0.8777778 0.06794683 0.75 0 0 0.02020202 ? Assoc-acdm Married-civ-spouse ? Wife White Female United-States 1 -35 0.3888889 0.0355208628 0.625 0 0 0.464646459 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -56 0.622222245 0.06628792 0.5625 0 0 0.3030303 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -30 0.333333343 0.256719679 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -54 0.6 0.06984553 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -35 0.3888889 0.20114097 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family Asian-Pac-Islander Male United-States 0 -32 0.355555564 0.08614169 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -44 0.4888889 0.1433012 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.189521834 0.5625 0 0 0.1010101 Private HS-grad Married-AF-spouse Other-service Other-relative White Female United-States 0 -60 0.6666667 0.122044452 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -40 0.444444448 0.173343524 0.625 0 0 0.454545468 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -50 0.5555556 0.190799519 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -58 0.644444466 0.144474491 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -41 0.455555558 0.0466981679 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.128011972 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -53 0.5888889 0.06456771 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 -71 0.788888931 0.09757629 0.625 0.06514065 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -17 0.188888893 0.185746 0.3125 0 0 0.25252524 ? 9th Never-married ? Own-child White Female Mexico 0 -45 0.5 0.0184090454 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -23 0.25555557 0.0164308734 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -25 0.2777778 0.222734481 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.11558862 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 1 -28 0.311111122 0.0783805549 0.8125 0 0 0.6060606 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -27 0.3 0.0259977579 0.5 0 0 0.4040404 Private 12th Never-married Transport-moving Not-in-family White Male United-States 0 -19 0.211111113 0.1361779 0.625 0 0 0.151515156 Local-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 -24 0.266666681 0.212367445 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -38 0.422222227 0.06968118 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Unmarried White Male United-States 0 -24 0.266666681 0.110109419 0.875 0 0 0.4040404 State-gov Masters Never-married Adm-clerical Not-in-family Black Female United-States 0 -18 0.2 0.21379669 0.4375 0 0 0.07070707 Private 11th Never-married Other-service Own-child Black Male United-States 0 -58 0.644444466 0.14611724 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -35 0.3888889 0.0784943849 0.875 0 0 0.444444448 Private Masters Never-married Prof-specialty Own-child White Male United-States 1 -43 0.477777779 0.125544131 0.3125 0 0 0.2020202 Private 9th Never-married Machine-op-inspct Not-in-family White Female United-States 0 -45 0.5 0.184005573 0.5625 0.031370312 0 0.353535354 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -24 0.266666681 0.2596745 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male Mexico 0 -63 0.7 0.135805428 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Farming-fishing Husband Black Male United-States 0 -40 0.444444448 0.29630062 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -21 0.233333334 0.122662082 0.8125 0 0 0.2020202 Private Bachelors Never-married Other-service Other-relative White Male United-States 0 -20 0.222222224 0.225036621 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -42 0.466666669 0.124494091 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 -49 0.544444442 0.153816417 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -47 0.5222222 0.142198622 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.0261459351 0.5625 0 0 0.363636374 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -61 0.677777767 0.109375939 0.25 0 0.379017442 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -23 0.25555557 0.203970492 0.75 0 0 0.4040404 ? Assoc-acdm Married-civ-spouse ? Husband White Male El-Salvador 0 -35 0.3888889 0.05997151 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.17795454 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Farming-fishing Wife White Female United-States 0 -18 0.2 0.0587032437 0.5 0 0 0.25252524 Private 12th Never-married Other-service Own-child White Male United-States 0 -28 0.311111122 0.268685043 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -62 0.6888889 0.083256945 0.8125 0 0 0.04040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -20 0.222222224 0.1049488 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.164113417 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -57 0.6333333 0.09038496 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -56 0.622222245 0.160730928 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.1077177 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.133809745 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -29 0.322222233 0.14514938 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -30 0.333333343 0.106419794 0.625 0 0 0.5555556 Private Some-college Never-married Craft-repair Other-relative White Male Ecuador 0 -53 0.5888889 0.0237791352 0.8125 0 0 0.575757563 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -25 0.2777778 0.132008716 0.125 0 0 0.4040404 Private 1st-4th Never-married Priv-house-serv Not-in-family White Female Guatemala 0 -44 0.4888889 0.216759562 0.5625 0 0 0.3838384 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -22 0.244444445 0.121538624 0.625 0 0 0.282828271 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -40 0.444444448 0.135895014 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -25 0.2777778 0.168409213 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Male ? 0 -30 0.333333343 0.152579129 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -51 0.566666663 0.09168219 0.6875 0 0 0.3838384 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -17 0.188888893 0.0317901559 0.4375 0 0 0.24242425 Private 11th Never-married Priv-house-serv Own-child White Female United-States 0 -46 0.51111114 0.145412728 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -50 0.5555556 0.0166006051 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -34 0.377777785 0.4945043 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -42 0.466666669 0.21626249 0.875 0 0 0.5050505 ? Masters Married-civ-spouse ? Husband White Male United-States 0 -41 0.455555558 0.129715338 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -32 0.355555564 0.219762847 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Unmarried Other Male United-States 0 -32 0.355555564 0.139612928 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.0734752044 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -50 0.5555556 0.184904069 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -77 0.8555556 0.096077 0.25 0 0 0.232323229 Private 7th-8th Widowed Priv-house-serv Unmarried White Female United-States 0 -33 0.366666675 0.121814772 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -47 0.5222222 0.127035335 0.5625 0 0 0.4848485 Self-emp-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -64 0.7111111 0.114234142 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -34 0.377777785 0.175496146 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.1267895 0.5625 0 0 0.353535354 Local-gov HS-grad Never-married Prof-specialty Unmarried Black Female United-States 0 -67 0.7444445 0.06958622 0.875 0.158311576 0 0.727272749 Local-gov Masters Never-married Exec-managerial Other-relative White Female United-States 1 -37 0.411111116 0.0353369862 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Not-in-family White Male United-States 0 -34 0.377777785 0.4966071 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.131435543 0.625 0 0 0.2929293 ? Some-college Never-married ? Own-child White Female United-States 0 -50 0.5555556 0.14778693 1 0 0 0.646464646 Self-emp-not-inc Doctorate Divorced Sales Not-in-family White Male United-States 0 -60 0.6666667 0.133474335 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.123369962 0.8125 0 0 0.434343427 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -44 0.4888889 0.13237983 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.11343129 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Sales Other-relative White Female Poland 0 -48 0.533333361 0.117454983 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male El-Salvador 1 -36 0.4 0.3668648 0.5625 0.02907029 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female Nicaragua 0 -48 0.533333361 0.06443098 0.625 0 0 0.434343427 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.315694362 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -51 0.566666663 0.113902763 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -52 0.5777778 0.049857717 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.0745077357 0.1875 0 0 0.2020202 Private 5th-6th Never-married Sales Own-child Asian-Pac-Islander Female Vietnam 0 -43 0.477777779 0.0224495772 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.122284904 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -66 0.733333349 0.09606218 0.75 0.0555605553 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male Yugoslavia 1 -37 0.411111116 0.129487678 0.375 0.0263502635 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Other-service Wife White Female United-States 0 -35 0.3888889 0.09839733 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.117582284 0.8125 0.05178052 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.135346085 0.375 0 0 0.3838384 Private 10th Never-married Other-service Unmarried White Female Peru 0 -51 0.566666663 0.13575761 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -71 0.788888931 0.100616626 0.5625 0 0 0.09090909 Federal-gov HS-grad Widowed Exec-managerial Not-in-family White Male United-States 0 -50 0.5555556 0.113606408 0.875 0 0.43663913 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -63 0.7 0.0258313939 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -41 0.455555558 0.121419407 0.875 0 0 0.353535354 State-gov Masters Never-married Prof-specialty Own-child White Female United-States 0 -24 0.266666681 0.185505539 0.625 0 0 0.4040404 State-gov Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 -41 0.455555558 0.116555817 0.625 0 0 0.454545468 Local-gov Some-college Divorced Other-service Unmarried White Female United-States 0 -33 0.366666675 0.112799518 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 -42 0.466666669 0.179926649 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 -23 0.25555557 0.0910201 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child Asian-Pac-Islander Male United-States 0 -49 0.544444442 0.147070974 0.6875 0 0 0.3838384 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.07222714 0.5 0 0 0.4040404 Self-emp-not-inc 12th Married-civ-spouse Craft-repair Not-in-family White Male United-States 0 -31 0.344444454 0.09322795 0.1875 0 0 0.565656543 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -28 0.311111122 0.104305573 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Own-child Black Male United-States 0 -37 0.411111116 0.130668387 0.4375 0 0 0.25252524 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.228411034 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -51 0.566666663 0.369340032 0.8125 0 0 0.262626261 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -25 0.2777778 0.06857389 0.6875 0 0 0.414141417 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -49 0.544444442 0.0856136456 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.11571794 0.5625 0 0 0.454545468 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -48 0.533333361 0.0273899529 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -41 0.455555558 0.229461074 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.11790356 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -26 0.2888889 0.216628224 0.5625 0 0 0.161616161 ? HS-grad Never-married ? Unmarried White Female United-States 0 -46 0.51111114 0.103997089 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -17 0.188888893 0.0730124861 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Female United-States 0 -34 0.377777785 0.233228147 0.4375 0 0 0.434343427 Private 11th Divorced Handlers-cleaners Not-in-family White Male United-States 0 -44 0.4888889 0.02860905 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -23 0.25555557 0.108915918 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 -35 0.3888889 0.0474484824 0.625 0.046500463 0 0.2020202 Private Some-college Never-married Prof-specialty Unmarried Asian-Pac-Islander Male United-States 0 -30 0.333333343 0.127809227 0.8125 0.0486504845 0 0.4040404 Private Bachelors Never-married Transport-moving Not-in-family White Male United-States 0 -65 0.722222269 0.09251265 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Husband Asian-Pac-Islander Male United-States 0 -34 0.377777785 0.168871254 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male Jamaica 0 -34 0.377777785 0.1006045 0.9375 0 0 0.4040404 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.104156047 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -28 0.311111122 0.0258024335 0.6875 0.02407024 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -53 0.5888889 0.13654767 0.875 0.07688077 0 0.7070707 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.03781896 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Unmarried White Male United-States 0 -21 0.233333334 0.175290048 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -53 0.5888889 0.0727976263 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -54 0.6 0.0480526462 0.875 0 0 0.5050505 Self-emp-not-inc Masters Divorced Prof-specialty Not-in-family White Male United-States 1 -32 0.355555564 0.117339812 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 -39 0.433333337 0.0770294443 0.8125 0 0 0.353535354 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -39 0.433333337 0.107066385 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried White Female United-States 0 -29 0.322222233 0.12089809 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male Germany 0 -29 0.322222233 0.0215093233 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 -43 0.477777779 0.100968882 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.0395634174 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child White Male United-States 0 -39 0.433333337 0.145855233 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 -45 0.5 0.171985686 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -36 0.4 0.118575744 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -71 0.788888931 0.08425984 0.6875 0 0 0.4040404 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 -62 0.6888889 0.132878929 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -43 0.477777779 0.227297008 0.625 0.005940059 0 0.2020202 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female Mexico 0 -31 0.344444454 0.107588381 0.5625 0 0 0.5858586 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 -39 0.433333337 0.212979019 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.0859497339 0.8125 0 0.43663913 0.323232323 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -45 0.5 0.374924332 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 -19 0.211111113 0.1788746 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -43 0.477777779 0.234156281 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.04201104 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 -43 0.477777779 0.114655778 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Female United-States 0 -34 0.377777785 0.136761844 0.8125 0 0 0.272727281 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -66 0.733333349 0.0780491754 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.112975307 0.6875 0 0.4331956 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.122187912 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 0 -23 0.25555557 0.124977015 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -41 0.455555558 0.235997722 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -63 0.7 0.151613966 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male ? 0 -55 0.6111111 0.07111312 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -35 0.3888889 0.235903427 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.101047009 0.3125 0 0 0.5050505 Private 9th Never-married Craft-repair Not-in-family White Male ? 1 -37 0.411111116 0.07256459 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -63 0.7 0.2254596 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -43 0.477777779 0.07783499 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.08862636 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 -36 0.4 0.06456165 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -54 0.6 0.263362765 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.0344102047 0.8125 0 0 0.5050505 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -78 0.8666667 0.126654118 0.8125 0 0.549127638 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -77 0.8555556 0.07940837 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.0473090634 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Other-service Not-in-family Asian-Pac-Islander Female Philippines 0 -39 0.433333337 0.126417711 0.5625 0 0 0.727272749 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -37 0.411111116 0.230127871 0.8125 0 0 0.4040404 Private Bachelors Separated Tech-support Not-in-family Asian-Pac-Islander Male Philippines 0 -34 0.377777785 0.140124142 0.6875 0.07298073 0 0.454545468 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.195312873 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -54 0.6 0.0514203161 0.8125 0 0 0.5050505 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -21 0.233333334 0.135362253 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -36 0.4 0.07501625 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.0920613855 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Widowed Adm-clerical Other-relative White Female United-States 0 -40 0.444444448 0.119024321 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.112408862 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Prof-specialty Unmarried Black Female United-States 0 -38 0.422222227 0.1642562 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.104816109 0.1875 0 0 0.4040404 Private 5th-6th Never-married Craft-repair Not-in-family White Male Columbia 0 -46 0.51111114 0.0691026151 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -22 0.244444445 0.04063501 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -37 0.411111116 0.05053125 0.5625 0 0 0.25252524 Private HS-grad Divorced Sales Unmarried White Female Canada 0 -69 0.7666667 0.117514253 0.375 0 0 0.282828271 Private 10th Separated Machine-op-inspct Not-in-family White Female Peru 0 -43 0.477777779 0.0979595259 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -53 0.5888889 0.0561956763 0.8125 0 0 0.212121218 Private Bachelors Never-married Other-service Not-in-family Asian-Pac-Islander Female Japan 1 -20 0.222222224 0.465971351 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child Black Female United-States 0 -22 0.244444445 0.127434745 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -48 0.533333361 0.07798452 0.3125 0 0 0.444444448 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.188702136 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -68 0.75555557 0.2743562 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -39 0.433333337 0.03568251 0.625 0 0.395087242 0.5555556 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -57 0.6333333 0.114048921 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband Black Male Trinadad&Tobago 1 -23 0.25555557 0.212207139 0.375 0 0 0.6060606 Private 10th Never-married Other-service Unmarried White Male Mexico 0 -25 0.2777778 0.11304266 0.8125 0 0 0.3838384 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -22 0.244444445 0.0425033942 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Own-child Black Male United-States 0 -23 0.25555557 0.350759923 0.5 0 0 0.3030303 Private 12th Never-married Priv-house-serv Own-child White Male United-States 0 -41 0.455555558 0.0322636478 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.09795482 0.625 0 0 0.25252524 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 -58 0.644444466 0.0379819572 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.109322727 0.5625 0 0 0.454545468 Private HS-grad Divorced Sales Not-in-family Asian-Pac-Islander Male Japan 0 -28 0.311111122 0.137450874 0.875 0 0 0.4848485 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -19 0.211111113 0.0668456 0.4375 0 0 0.25252524 Private 11th Never-married Machine-op-inspct Not-in-family White Female United-States 0 -44 0.4888889 0.068757765 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Other-relative White Female United-States 0 -68 0.75555557 0.113688581 0.0625 0 0 0.1010101 Private Preschool Never-married Machine-op-inspct Not-in-family White Male United-States 0 -33 0.366666675 0.223868713 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.157215744 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -44 0.4888889 0.0385484 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -38 0.422222227 0.1295456 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.2979912 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried White Female Mexico 0 -29 0.322222233 0.248611 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -65 0.722222269 0.176017463 0.3125 0 0 0.4040404 Private 9th Widowed Sales Not-in-family White Female United-States 0 -55 0.6111111 0.1079696 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Other-relative White Female United-States 0 -49 0.544444442 0.03399598 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -27 0.3 0.2165932 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Female United-States 0 -41 0.455555558 0.0199305583 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -33 0.366666675 0.225461632 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.181500033 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -41 0.455555558 0.1935105 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -66 0.733333349 0.0226435568 0.5625 0 0 0.04040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -38 0.422222227 0.100590356 0.625 0 0 0.6060606 Private Some-college Divorced Sales Not-in-family White Male United-States 0 -43 0.477777779 0.06482702 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -40 0.444444448 0.249545872 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -32 0.355555564 0.126790166 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.11285609 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Unmarried White Female Mexico 0 -35 0.3888889 0.196796671 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -41 0.455555558 0.0684263855 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.0472578742 0.8125 0 0 0.6060606 Local-gov Bachelors Never-married Prof-specialty Not-in-family Amer-Indian-Eskimo Male United-States 0 -36 0.4 0.181667075 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.11820665 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -53 0.5888889 0.157044664 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.119452015 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -22 0.244444445 0.14286609 0.8125 0 0 0.151515156 Private Bachelors Never-married Handlers-cleaners Own-child White Female United-States 0 -26 0.2888889 0.194623858 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 -64 0.7111111 0.156003386 0.5625 0 0 0.212121218 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -48 0.533333361 0.09895501 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.261877626 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -26 0.2888889 0.164046064 0.625 0 0 0.4040404 Private Some-college Never-married Sales Unmarried White Female ? 0 -35 0.3888889 0.06624885 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -46 0.51111114 0.248896584 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -65 0.722222269 0.0213779844 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Widowed Exec-managerial Unmarried White Female United-States 0 -53 0.5888889 0.150642723 0.5625 0.068490684 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family White Male United-States 0 -18 0.2 0.224698514 0.1875 0 0 0.545454562 Private 5th-6th Never-married Other-service Other-relative White Male Mexico 0 -34 0.377777785 0.07290809 0.9375 0 0 0.5555556 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.0512755066 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Female Guatemala 0 -37 0.411111116 0.06177052 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -61 0.677777767 0.1123826 0.8125 0 0 0.1010101 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -59 0.655555546 0.122625038 0.8125 0.0501305 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -32 0.355555564 0.170237184 0.875 0.135501355 0 0.6060606 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 -31 0.344444454 0.0296038613 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -25 0.2777778 0.056727767 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -81 0.900000036 0.0678080842 0.125 0 0 0.151515156 Private 1st-4th Married-civ-spouse Prof-specialty Husband White Male Poland 0 -47 0.5222222 0.104740672 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Other-relative Black Female United-States 0 -39 0.433333337 0.0200807564 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.162864 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 -44 0.4888889 0.1447008 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -37 0.411111116 0.162193835 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.1037755 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -27 0.3 0.118240327 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Wife White Female Mexico 0 -55 0.6111111 0.114694171 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male Poland 1 -60 0.6666667 0.0983326659 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.292091042 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Handlers-cleaners Not-in-family White Male ? 0 -23 0.25555557 0.157355174 0.8125 0 0 0.25252524 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -19 0.211111113 0.409373581 0.5625 0 0 0.6060606 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -45 0.5 0.0596078038 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -36 0.4 0.08608377 0.5625 0 0 0.3030303 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 -46 0.51111114 0.164169312 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.11935772 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -39 0.433333337 0.1557077 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -29 0.322222233 0.170980766 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -39 0.433333337 0.119266123 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.102953114 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child Other Female Mexico 0 -37 0.411111116 0.12873736 0.75 0 0 0.25252524 Private Assoc-acdm Divorced Prof-specialty Unmarried White Male United-States 0 -49 0.544444442 0.1721278 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -27 0.3 0.114376262 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 -28 0.311111122 0.148995936 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Other-relative White Male Mexico 0 -35 0.3888889 0.181894049 0.625 0 0 0.3030303 Private Some-college Divorced Sales Unmarried White Female United-States 0 -54 0.6 0.0212756079 0.5625 0.0263502635 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -17 0.188888893 0.232640833 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Male United-States 0 -18 0.2 0.131269857 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 -33 0.366666675 0.261830479 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Unmarried Other Female United-States 0 -33 0.366666675 0.239681289 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband Asian-Pac-Islander Male United-States 0 -51 0.566666663 0.08224462 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -49 0.544444442 0.0509683751 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -49 0.544444442 0.09500743 0.625 0 0.5369605 0.5050505 Self-emp-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -41 0.455555558 0.0322636478 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -64 0.7111111 0.149082139 0.125 0 0 0.121212125 Private 1st-4th Divorced Priv-house-serv Not-in-family White Female United-States 0 -40 0.444444448 0.172205925 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.137067631 0.5625 0 0 0.4040404 Federal-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -23 0.25555557 0.0842632055 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -34 0.377777785 0.09422074 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -38 0.422222227 0.0517799854 0.4375 0.05178052 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.01888254 0.625 0 0 0.868686855 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -30 0.333333343 0.0296038613 0.5625 0 0.453168035 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -36 0.4 0.109945752 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 -23 0.25555557 0.0376438424 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.172380373 0.625 0 0 0.8080808 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -61 0.677777767 0.113594286 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female Canada 0 -47 0.5222222 0.02693195 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -56 0.622222245 0.140398934 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.139206782 0.5 0 0 0.5555556 Private 12th Never-married Sales Not-in-family White Female United-States 0 -33 0.366666675 0.07932822 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 -36 0.4 0.08698698 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -38 0.422222227 0.119399481 0.5625 0 0 0.353535354 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -34 0.377777785 0.15251717 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -56 0.622222245 0.09855561 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.1265578 0.6875 0 0 0.232323229 Private Assoc-voc Never-married Exec-managerial Not-in-family White Female United-States 0 -26 0.2888889 0.0654358938 0.75 0.05178052 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -49 0.544444442 0.127091914 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -71 0.788888931 0.126283 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -19 0.211111113 0.143104523 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 -20 0.222222224 0.05706588 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -42 0.466666669 0.09288512 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -51 0.566666663 0.02314332 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -38 0.422222227 0.171154544 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Prof-specialty Own-child Black Female United-States 0 -38 0.422222227 0.114618056 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -35 0.3888889 0.128574371 0.8125 0 0 0.25252524 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -24 0.266666681 0.2138088 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife Black Female United-States 0 -40 0.444444448 0.252981573 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Male United-States 0 -21 0.233333334 0.136778682 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -49 0.544444442 0.0362987928 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -18 0.2 0.1156782 0.625 0 0 0.24242425 ? Some-college Never-married ? Own-child Black Female United-States 0 -54 0.6 0.11299888 0.5625 0 0.43663913 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.137794375 0.8125 0 0 0.424242437 Private Bachelors Married-spouse-absent Exec-managerial Not-in-family White Female United-States 0 -27 0.3 0.445118725 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -20 0.222222224 0.07118317 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -38 0.422222227 0.04733735 0.875 0.1502415 0 0.02020202 ? Masters Married-civ-spouse ? Wife Black Female United-States 1 -31 0.344444454 0.100091942 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -25 0.2777778 0.172323123 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -19 0.211111113 0.172371626 0.625 0 0 0.2020202 Federal-gov Some-college Never-married Handlers-cleaners Own-child White Male England 0 -33 0.366666675 0.07632897 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.2966623 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -34 0.377777785 0.07105318 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Unmarried White Female United-States 0 -42 0.466666669 0.1749553 0.8125 0 0.14990817 0.5050505 Private Bachelors Divorced Prof-specialty Unmarried White Male United-States 1 -37 0.411111116 0.0602752753 0.875 0 0 0.4040404 Local-gov Masters Divorced Exec-managerial Not-in-family White Female United-States 0 -25 0.2777778 0.115725346 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -40 0.444444448 0.03445196 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.127269059 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Female United-States 0 -31 0.344444454 0.06596126 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.1316403 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -63 0.7 0.0315934829 0.8125 0 0 0.08080808 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -54 0.6 0.258209556 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.1370023 0.5625 0 0 0.444444448 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.09980569 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -26 0.2888889 0.142450526 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -39 0.433333337 0.0323720872 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -57 0.6333333 0.1426573 0.8125 0.03103031 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -54 0.6 0.124878012 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -57 0.6333333 0.15216963 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.211843431 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.1404838 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.150120065 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -31 0.344444454 0.141131073 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.119292386 0.875 0 0 0.6060606 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -50 0.5555556 0.117029309 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.08174688 0.5625 0 0 0.3030303 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -37 0.411111116 0.0452110022 0.5625 0 0 0.6060606 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -26 0.2888889 0.04528846 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.133592874 0.8125 0 0 0.353535354 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.09497038 0.625 0 0 0.25252524 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -24 0.266666681 0.04086199 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 -29 0.322222233 0.07022001 0.5625 0 0 0.343434334 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -47 0.5222222 0.088234365 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.104499549 0.625 0 0.399449021 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.119700551 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 -20 0.222222224 0.02668207 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -25 0.2777778 0.137314156 0.6875 0 0.4331956 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -57 0.6333333 0.0168686714 0.8125 0.0217402168 0 0.373737365 State-gov Bachelors Divorced Adm-clerical Unmarried White Male United-States 0 -36 0.4 0.07561368 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -25 0.2777778 0.113894679 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -46 0.51111114 0.1048417 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male Germany 1 -39 0.433333337 0.196446434 0.5625 0.04508045 0 0.24242425 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -29 0.322222233 0.151016533 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.18219243 0.4375 0 0 0.2020202 Private 11th Never-married Exec-managerial Own-child White Female United-States 0 -46 0.51111114 0.0845198259 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -61 0.677777767 0.03460957 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.0759497657 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -50 0.5555556 0.07336542 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family Black Female United-States 0 -53 0.5888889 0.2471582 0.8125 1 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male India 1 -36 0.4 0.07393119 0.8125 0 0 0.6060606 Local-gov Bachelors Never-married Protective-serv Not-in-family White Male United-States 0 -38 0.422222227 0.1522902 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -75 0.8333334 0.06249861 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.125917271 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 1 -44 0.4888889 0.155234888 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.156016186 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -31 0.344444454 0.08113464 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -49 0.544444442 0.0226799268 0.5 0 0 0.353535354 Private 12th Never-married Transport-moving Not-in-family Asian-Pac-Islander Male United-States 0 -34 0.377777785 0.1289044 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.15487656 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male Columbia 0 -47 0.5222222 0.107853748 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -38 0.422222227 0.128574371 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.08487949 0.5625 0 0 0.2020202 Private HS-grad Never-married Craft-repair Own-child White Female United-States 0 -47 0.5222222 0.018734362 0.3125 0 0.3946281 0.3030303 Private 9th Divorced Other-service Not-in-family White Female United-States 0 -42 0.466666669 0.137092561 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -29 0.322222233 0.0973877 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 -38 0.422222227 0.150200889 0.625 0 0 0.75757575 Local-gov Some-college Divorced Protective-serv Not-in-family White Male United-States 0 -22 0.244444445 0.123429909 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Black Female United-States 0 -32 0.355555564 0.116328835 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -20 0.222222224 0.08864455 0.625 0 0 0.4848485 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -41 0.455555558 0.170444638 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.317901552 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 -44 0.4888889 0.0935983956 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -35 0.3888889 0.259588271 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -18 0.2 0.123998374 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Male United-States 0 -60 0.6666667 0.0696057454 0.5625 0.1502415 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.0914565548 0.3125 0 0 0.25252524 Local-gov 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.153134122 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 -40 0.444444448 0.05853823 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.05592559 0.625 0.0217602178 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -25 0.2777778 0.116239257 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -56 0.622222245 0.184623212 0.875 0 0.383149683 0.4040404 State-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -42 0.466666669 0.1264864 0.625 1 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.3258708 0.25 0 0 0.4040404 Private 7th-8th Never-married Handlers-cleaners Unmarried White Male Guatemala 0 -66 0.733333349 0.148543313 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -48 0.533333361 0.103019118 0.25 0 0 0.323232323 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Dominican-Republic 0 -35 0.3888889 0.161483258 0.625 0 0 0.5050505 Private Some-college Never-married Sales Unmarried White Male United-States 0 -41 0.455555558 0.119825155 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.1347985 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -55 0.6111111 0.07518329 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.226653114 0.8125 0.1502415 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.109728873 0.625 0 0 0.5050505 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 -29 0.322222233 0.07857588 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family White Male United-States 0 -42 0.466666669 0.0166787338 1 0.1502415 0 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -65 0.722222269 0.1519359 0.5625 0 0 0.2020202 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -30 0.333333343 0.113897376 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Other-relative Asian-Pac-Islander Male Vietnam 0 -43 0.477777779 0.143391445 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -61 0.677777767 0.06331022 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male Italy 0 -22 0.244444445 0.127920359 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -23 0.25555557 0.184834033 0.4375 0 0 0.4040404 Private 11th Separated Other-service Unmarried White Female United-States 0 -34 0.377777785 0.126790166 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.1914259 0.5625 0 0 0.353535354 Private HS-grad Widowed Prof-specialty Unmarried White Female United-States 0 -21 0.233333334 0.133534268 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -31 0.344444454 0.24820891 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 0 -34 0.377777785 0.113671072 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -33 0.366666675 0.08231939 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Wife Black Female United-States 1 -32 0.355555564 0.09173809 0.875 0 0.6483012 0.5555556 Private Masters Separated Exec-managerial Not-in-family White Male United-States 1 -44 0.4888889 0.118300274 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Husband White Male United-States 1 -21 0.233333334 0.11673969 0.625 0 0 0.2020202 State-gov Some-college Never-married Other-service Own-child Black Male United-States 0 -75 0.8333334 0.02101091 0.5625 0 0 0.2020202 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -55 0.6111111 0.0598610528 0.875 0 0 0.6060606 Federal-gov Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 -43 0.477777779 0.118588544 0.5625 0 0 0.161616161 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -31 0.344444454 0.14500995 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.133646086 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.121880777 0.875 0 0 0.5050505 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -23 0.25555557 0.138834983 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Unmarried Black Female United-States 0 -42 0.466666669 0.0444195978 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -29 0.322222233 0.133102536 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.124844335 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -28 0.311111122 0.0908530653 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -64 0.7111111 0.130021125 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -35 0.3888889 0.10347712 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Other-service Unmarried Black Female United-States 0 -65 0.722222269 0.07805591 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -34 0.377777785 0.265673667 0.8125 0.0246302467 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male France 0 -58 0.644444466 0.231666908 0.8125 0 0 0.5050505 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 -63 0.7 0.167027116 0.9375 0 0 0.3030303 ? Prof-school Married-civ-spouse ? Husband White Male United-States 1 -50 0.5555556 0.160947129 0.8125 1 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male ? 1 -59 0.655555546 0.107124314 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.285054624 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.0604396164 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.021403579 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 -51 0.566666663 0.10596516 0.1875 0 0 0.08080808 ? 5th-6th Married-civ-spouse ? Husband Black Male United-States 0 -47 0.5222222 0.157277718 0.875 0.2782828 0 0.6060606 Private Masters Divorced Sales Not-in-family White Male United-States 1 -30 0.333333343 0.220321208 0.8125 0 0.359045 0.4040404 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 -34 0.377777785 0.159319863 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -51 0.566666663 0.130985618 0.625 0 0 0.4040404 State-gov Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -41 0.455555558 0.204424456 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -57 0.6333333 0.115337394 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.0265291762 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -62 0.6888889 0.132833123 0.5625 0 0 0.181818187 Local-gov HS-grad Widowed Other-service Not-in-family White Female United-States 0 -22 0.244444445 0.102371179 0.625 0 0 0.2020202 State-gov Some-college Never-married Tech-support Own-child White Male United-States 0 -38 0.422222227 0.252254844 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.180070788 0.4375 0 0 0.3030303 ? 11th Never-married ? Not-in-family White Male United-States 0 -45 0.5 0.24554576 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -37 0.411111116 0.125300989 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.0320205 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Other-relative White Male United-States 0 -49 0.544444442 0.101775773 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 -24 0.266666681 0.337110072 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -47 0.5222222 0.09301983 0.8125 0 0.518365443 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -20 0.222222224 0.151892126 0.625 0 0 0.24242425 Federal-gov Some-college Never-married Tech-support Own-child White Female United-States 0 -27 0.3 0.103246778 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 -40 0.444444448 0.114423409 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -19 0.211111113 0.07596122 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 -31 0.344444454 0.118392542 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -43 0.477777779 0.03718786 0.5625 0 0.453856736 0.5252525 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -48 0.533333361 0.0262341686 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -64 0.7111111 0.0444472134 0.5625 0.07298073 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -39 0.433333337 0.117417268 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried White Male United-States 0 -50 0.5555556 0.0237245783 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.118287474 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Unmarried White Female United-States 0 -44 0.4888889 0.110916309 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 -50 0.5555556 0.05877464 0.5625 0 0 0.5555556 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -54 0.6 0.11023806 0.5625 0 0.4331956 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -17 0.188888893 0.122123249 0.375 0 0 0.353535354 Self-emp-not-inc 10th Never-married Farming-fishing Own-child White Male United-States 0 -33 0.366666675 0.119852096 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -28 0.311111122 0.0317692757 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Own-child White Female United-States 0 -39 0.433333337 0.127987042 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.1136805 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Unmarried White Male United-States 0 -59 0.655555546 0.11806386 0.25 0 0 0.323232323 Private 7th-8th Never-married Other-service Other-relative White Male United-States 0 -74 0.822222233 0.0979743451 0.125 0 0 0.151515156 Private 1st-4th Widowed Priv-house-serv Not-in-family Black Female United-States 0 -54 0.6 0.1076005 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -31 0.344444454 0.07635456 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.328511059 0.625 0 0 0.4040404 Private Some-college Separated Sales Unmarried White Female United-States 0 -20 0.222222224 0.2052327 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Female United-States 0 -54 0.6 0.125173688 0.875 0 0.453856736 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.143391445 0.6875 0.02407024 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -57 0.6333333 0.212473184 0.9375 0 0 0.363636374 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -49 0.544444442 0.09136024 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried Asian-Pac-Islander Female South 0 -40 0.444444448 0.148835629 1 0.03103031 0 0.4040404 Private Doctorate Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male India 1 -19 0.211111113 0.07910258 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Own-child White Male United-States 0 -38 0.422222227 0.136514 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -39 0.433333337 0.111042939 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -43 0.477777779 0.129193351 0.75 0.07688077 0 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.1530001 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Male United-States 0 -57 0.6333333 0.106470309 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 0 -38 0.422222227 0.128714457 0.9375 0 0 1 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.1304643 0.8125 0 0 0.3838384 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -40 0.444444448 0.0963464156 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -34 0.377777785 0.138948143 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.127003685 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Farming-fishing Own-child White Male United-States 0 -53 0.5888889 0.0236424077 0.625 0 0 0.343434334 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.136764541 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Unmarried White Male United-States 0 -43 0.477777779 0.20874989 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.163959846 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.11928767 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Prof-specialty Unmarried Black Female United-States 0 -64 0.7111111 0.07673511 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -19 0.211111113 0.196341366 0.5 0 0 0.282828271 ? 12th Never-married ? Own-child White Male United-States 0 -40 0.444444448 0.149532065 0.875 0.0332503319 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -34 0.377777785 0.125832409 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -46 0.51111114 0.129835889 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -35 0.3888889 0.158255011 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male Mexico 0 -32 0.355555564 0.0560737662 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -26 0.2888889 0.167703345 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -25 0.2777778 0.23315002 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -55 0.6111111 0.183643222 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -22 0.244444445 0.04078386 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -29 0.322222233 0.0227641184 0.625 0 0 0.2020202 State-gov Some-college Divorced Adm-clerical Own-child White Male United-States 0 -38 0.422222227 0.07554228 0.5625 0 0 1 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -55 0.6111111 0.135375038 0.625 0 0 0.353535354 Private Some-college Widowed Other-service Not-in-family White Female United-States 0 -26 0.2888889 0.0661107749 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.0536039174 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Never-married Prof-specialty Not-in-family Other Male United-States 0 -25 0.2777778 0.09635719 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -39 0.433333337 0.06812532 0.5625 0.046500463 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 -18 0.2 0.191586882 0.4375 0 0 0.25252524 ? 11th Never-married ? Own-child White Male United-States 0 -58 0.644444466 0.107106127 0.3125 0 0 0.4040404 State-gov 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -34 0.377777785 0.237939522 0.6875 0 0 0.4040404 Local-gov Assoc-voc Never-married Craft-repair Own-child White Female United-States 0 -29 0.322222233 0.109322727 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Never-married Exec-managerial Own-child Asian-Pac-Islander Male South 0 -49 0.544444442 0.156233728 1 0 0 0.5050505 State-gov Doctorate Divorced Prof-specialty Unmarried White Male United-States 1 -38 0.422222227 0.122544885 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.110186875 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 -28 0.311111122 0.08813603 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.140684515 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female El-Salvador 1 -29 0.322222233 0.03956611 0.75 0 0 0.6060606 Self-emp-not-inc Assoc-acdm Never-married Other-service Own-child White Male United-States 0 -48 0.533333361 0.07856174 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -40 0.444444448 0.0466981679 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -36 0.4 0.216077268 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.133283049 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -57 0.6333333 0.171019837 0.125 0 0 0.353535354 Self-emp-not-inc 1st-4th Married-civ-spouse Sales Husband White Male Mexico 0 -24 0.266666681 0.0600482933 0.3125 0 0 0.4040404 Private 9th Never-married Other-service Not-in-family White Male El-Salvador 0 -32 0.355555564 0.250768334 0.3125 0 0 0.232323229 Private 9th Separated Other-service Unmarried White Female Mexico 0 -18 0.2 0.19942683 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Never-married Sales Own-child White Male ? 0 -39 0.433333337 0.129732177 0.5625 0 0 0.565656543 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -39 0.433333337 0.271763742 0.4375 0 0 0.4040404 Private 11th Divorced Transport-moving Own-child White Male United-States 0 -18 0.2 0.11426647 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Own-child White Female United-States 0 -20 0.222222224 0.14647153 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -27 0.3 0.109182633 0.3125 0 0 0.4040404 ? 9th Never-married ? Own-child White Female United-States 0 -54 0.6 0.1184828 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -40 0.444444448 0.120921664 0.5625 0 0 0.75757575 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -27 0.3 0.100776926 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -27 0.3 0.194750473 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -43 0.477777779 0.234201416 0.8125 0 0 0.5050505 Federal-gov Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -22 0.244444445 0.2741137 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Other-relative White Female United-States 0 -17 0.188888893 0.1301262 0.4375 0 0 0.121212125 Private 11th Never-married Sales Unmarried White Female Poland 0 -37 0.411111116 0.110458307 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -49 0.544444442 0.116598919 0.375 0.04416044 0 1 Private 10th Separated Exec-managerial Not-in-family Black Male United-States 0 -33 0.366666675 0.224759132 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Unmarried Black Male United-States 0 -21 0.233333334 0.0324111544 0.625 0 0.3677686 0.1010101 State-gov Some-college Never-married Exec-managerial Own-child White Male United-States 0 -45 0.5 0.125449836 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.07040119 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -25 0.2777778 0.07011292 0.8125 0.0282902829 0 0.6060606 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -71 0.788888931 0.143332183 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.13696526 0.8125 0 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -41 0.455555558 0.0876443461 0.9375 0 0 0.8080808 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.181883276 0.375 0 0 0.3030303 ? 10th Never-married ? Unmarried White Female United-States 0 -47 0.5222222 0.1471235 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Sales Unmarried White Female Cuba 0 -30 0.333333343 0.103805132 0.8125 0 0 0.656565666 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -40 0.444444448 0.130353838 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female Dominican-Republic 0 -44 0.4888889 0.0569372363 0.625 0 0 0.4848485 Private Some-college Divorced Sales Unmarried White Female United-States 0 -50 0.5555556 0.101703033 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.106198207 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -68 0.75555557 0.146442562 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -45 0.5 0.241722092 0.5 0.02407024 0 0.5050505 Private 12th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -38 0.422222227 0.125406057 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -78 0.8666667 0.143233851 0.4375 0 0 0.1010101 Self-emp-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.0213779844 0.6875 0 0 0.5555556 Self-emp-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -39 0.433333337 0.335948884 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -36 0.4 0.0242101979 0.25 0.07298073 0 0.454545468 Self-emp-not-inc 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -46 0.51111114 0.109493807 0.875 0 0 0.5050505 Local-gov Masters Divorced Prof-specialty Unmarried White Female Canada 0 -30 0.333333343 0.08005698 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male United-States 1 -34 0.377777785 0.1391583 0.625 0 0 0.353535354 Private Some-college Never-married Sales Unmarried White Male United-States 0 -30 0.333333343 0.2849482 0.5625 0 0 0.353535354 Federal-gov HS-grad Separated Adm-clerical Other-relative Black Male United-States 0 -47 0.5222222 0.129289657 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 1 -40 0.444444448 0.150827274 0.625 0 0 0.171717167 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -62 0.6888889 0.08705164 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -44 0.4888889 0.131666556 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband Black Male Jamaica 0 -40 0.444444448 0.07717358 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative White Female Vietnam 0 -20 0.222222224 0.0802954137 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -45 0.5 0.162021413 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.134078488 0.8125 0.1502415 0 0.424242437 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.09704554 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -38 0.422222227 0.2415847 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -49 0.544444442 0.04015074 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.263746 0.8125 0.1502415 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.06825935 0.5625 0 0 0.262626261 Local-gov HS-grad Separated Other-service Unmarried White Female United-States 0 -20 0.222222224 0.07921978 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -34 0.377777785 0.155746773 0.3125 0 0 0.4040404 Private 9th Separated Farming-fishing Unmarried Black Male United-States 0 -42 0.466666669 0.0963464156 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Transport-moving Unmarried White Female United-States 0 -46 0.51111114 0.220149457 0.875 0 0.5544077 0.656565666 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.137159914 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -62 0.6888889 0.0596610121 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.1619965 0.625 0 0 0.7070707 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 -58 0.644444466 0.105508506 0.125 0 0 0.4040404 Local-gov 1st-4th Widowed Handlers-cleaners Unmarried Black Male United-States 0 -30 0.333333343 0.0965794548 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 -37 0.411111116 0.24615328 0.5625 0 0 0.7070707 Private HS-grad Separated Craft-repair Unmarried White Male Philippines 0 -22 0.244444445 0.178291321 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Tech-support Own-child White Female United-States 0 -64 0.7111111 0.150757223 0.3125 0 0 0.3838384 State-gov 9th Never-married Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.103976212 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -43 0.477777779 0.163346261 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.08390152 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.140923619 0.5625 0 0 0.0606060624 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -21 0.233333334 0.109266154 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -45 0.5 0.040591903 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -55 0.6111111 0.0517954752 0.75 0 0 0.5555556 Self-emp-not-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.09286424 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -70 0.7777778 0.234329388 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -27 0.3 0.09356539 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -34 0.377777785 0.3585756 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.02123789 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.0208613835 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -52 0.5777778 0.07900223 0.125 0 0 0.5050505 Private 1st-4th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.19888261 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.128500953 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.1658289 0.8125 0 0 0.4040404 Private Bachelors Never-married Machine-op-inspct Own-child Black Female United-States 0 -50 0.5555556 0.08808484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -36 0.4 0.1254202 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.118222818 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -40 0.444444448 0.13943848 0.5625 0.068490684 0 0.3838384 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.0556487665 0.8125 0 0 0.454545468 Federal-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -51 0.566666663 0.134496748 0.8125 0 0.453856736 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 -38 0.422222227 0.214780718 0.8125 0 0 0.5252525 State-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 0 -18 0.2 0.172428191 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -63 0.7 0.146638557 0.1875 0 0 0.0303030312 Self-emp-not-inc 5th-6th Never-married Sales Not-in-family White Female United-States 0 -50 0.5555556 0.138615415 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -82 0.9111111 0.161978975 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male Cuba 0 -33 0.366666675 0.103805132 0.5625 0 0 0.454545468 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 -37 0.411111116 0.0466429368 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male United-States 0 -24 0.266666681 0.224627122 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Transport-moving Own-child White Male Peru 0 -31 0.344444454 0.113504708 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Unmarried White Female United-States 0 -59 0.655555546 0.13037473 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Female United-States 0 -18 0.2 0.2875285 0.5 0 0 0.5555556 Private 12th Never-married Farming-fishing Own-child White Male United-States 0 -47 0.5222222 0.08878936 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -48 0.533333361 0.05364433 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.112501137 0.8125 0 0 0.333333343 Private Bachelors Never-married Prof-specialty Unmarried Other Female United-States 0 -34 0.377777785 0.0493020527 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Own-child Asian-Pac-Islander Male Philippines 0 -50 0.5555556 0.07682065 0.6875 0 0 0.8484849 Private Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 -57 0.6333333 0.0743696541 0.625 0 0 0.75757575 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -60 0.6666667 0.0224057976 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -39 0.433333337 0.104000457 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -56 0.622222245 0.104086 0.625 0 0 0.5050505 ? Some-college Divorced ? Unmarried White Female United-States 1 -18 0.2 0.0187107883 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child White Female United-States 0 -26 0.2888889 0.09625751 0.75 0 0 0.75757575 Private Assoc-acdm Married-civ-spouse Prof-specialty Wife White Female United-States 0 -37 0.411111116 0.12863633 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 -20 0.222222224 0.211774066 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 -29 0.322222233 0.184394211 0.875 0 0 0.454545468 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -30 0.333333343 0.117924437 0.5625 0 0 0.5252525 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -21 0.233333334 0.0428805724 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Male United-States 0 -24 0.266666681 0.130272344 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Female United-States 0 -51 0.566666663 0.0500267744 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.08258139 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -45 0.5 0.151852384 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.07873079 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.132666767 0.8125 0 0 0.727272749 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -20 0.222222224 0.07093126 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -46 0.51111114 0.07321253 0.625 0 0 0.6060606 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.11558862 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -39 0.433333337 0.261346877 0.5625 0 0 0.3838384 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -39 0.433333337 0.122282207 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -45 0.5 0.115073368 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -28 0.311111122 0.126273572 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -44 0.4888889 0.187054 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -48 0.533333361 0.332633078 0.5625 0.07298073 0 0.3838384 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -27 0.3 0.148685426 0.5625 0 0 0.7070707 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.141285986 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.06279025 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.2301528 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -25 0.2777778 0.159117132 0.9375 0 0 0.3030303 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 -21 0.233333334 0.08209644 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Black Female United-States 0 -18 0.2 0.214311942 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Male United-States 0 -63 0.7 0.07496843 0.25 0 0 0.1010101 Self-emp-not-inc 7th-8th Widowed Farming-fishing Unmarried White Female United-States 0 -18 0.2 0.133773372 0.4375 0 0 0.08080808 Private 11th Never-married Sales Own-child Black Female United-States 0 -32 0.355555564 0.13014774 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.07046114 0.4375 0 0 0.4040404 ? 11th Never-married ? Unmarried White Female United-States 0 -19 0.211111113 0.116095789 0.4375 0 0 0.2020202 Private 11th Never-married Transport-moving Own-child White Male United-States 0 -23 0.25555557 0.04063501 0.625 0 0 0.6060606 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -38 0.422222227 0.104106881 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 0 -36 0.4 0.129951075 0.875 0 0.453856736 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.09307169 0.5625 0 0.404499531 0.353535354 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 -45 0.5 0.1606831 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male England 1 -30 0.333333343 0.14014098 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Other Male Mexico 0 -46 0.51111114 0.122455306 0.5625 0.0406404063 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -24 0.266666681 0.191228569 0.625 0 0 0.25252524 Federal-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -42 0.466666669 0.0722540841 0.625 0 0.5610652 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 1 -23 0.25555557 0.0254481528 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -27 0.3 0.177511364 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -48 0.533333361 0.172046974 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -31 0.344444454 0.231881082 0.5625 0 0 0.444444448 Self-emp-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -31 0.344444454 0.04752998 0.125 0 0 0.25252524 Private 1st-4th Never-married Other-service Other-relative White Female El-Salvador 0 -18 0.2 0.08609589 0.5 0 0 0.25252524 Private 12th Never-married Sales Own-child White Female United-States 0 -36 0.4 0.124740608 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -58 0.644444466 0.08313841 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.0918175653 0.5625 0 0.3624885 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -22 0.244444445 0.12598598 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -72 0.8 0.11973355 0.375 0 0 0.151515156 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 -61 0.677777767 0.0459808521 0.375 0 0 0.5555556 Private 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -42 0.466666669 0.2861545 0.625 0.03908039 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.055130817 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Prof-specialty Unmarried Asian-Pac-Islander Female ? 0 -30 0.333333343 0.103420548 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.182792544 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 -20 0.222222224 0.133459508 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -65 0.722222269 0.31629315 0.8125 0 0 0.151515156 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.109981447 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 -37 0.411111116 0.199331865 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -33 0.366666675 0.0843797252 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -64 0.7111111 0.123166561 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Other-service Unmarried White Female United-States 0 -61 0.677777767 0.07514153 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -38 0.422222227 0.0230166949 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Unmarried White Female United-States 0 -27 0.3 0.123679116 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.13319616 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Female Philippines 0 -39 0.433333337 0.0666401759 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -44 0.4888889 0.138393819 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.13919197 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Other-relative White Female United-States 0 -73 0.811111152 0.128910452 0.9375 0 0 0.4040404 ? Prof-school Married-civ-spouse ? Husband White Male United-States 0 -66 0.733333349 0.16478762 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 0 -53 0.5888889 0.03192284 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -43 0.477777779 0.182339936 0.8125 0 0 0.5555556 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -57 0.6333333 0.0220205374 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.115346819 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Machine-op-inspct Own-child White Female United-States 0 -59 0.655555546 0.114488736 0.8125 0 0.459595948 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -52 0.5777778 0.146298423 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Widowed Other-service Other-relative Black Female United-States 0 -46 0.51111114 0.147052109 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -20 0.222222224 0.2604174 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -37 0.411111116 0.08482022 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -41 0.455555558 0.104914449 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -39 0.433333337 0.2913407 0.5625 0 0.373737365 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -30 0.333333343 0.0369965769 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -59 0.655555546 0.109204188 0.625 0 0 0.565656543 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -22 0.244444445 0.172764286 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.109178595 0.5625 0 0 0.3030303 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -39 0.433333337 0.06944814 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -24 0.266666681 0.153303191 0.375 0 0 0.5858586 Private 10th Divorced Handlers-cleaners Unmarried White Female United-States 0 -63 0.7 0.119010851 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.148190379 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 -34 0.377777785 0.1636581 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -38 0.422222227 0.126521438 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.08933492 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Female United-States 0 -20 0.222222224 0.07333915 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.13194339 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.0755577758 0.8125 0 0 0.121212125 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 -56 0.622222245 0.26397568 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -17 0.188888893 0.131679356 0.375 0 0 0.05050505 Private 10th Never-married Sales Own-child White Male United-States 0 -31 0.344444454 0.0295136068 0.8125 0.07688077 0 0.434343427 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -23 0.25555557 0.09792451 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 -33 0.366666675 0.125832409 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -36 0.4 0.06858804 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Not-in-family White Male United-States 0 -37 0.411111116 0.05542044 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male ? 0 -52 0.5777778 0.0670853853 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Own-child Black Female United-States 0 -28 0.311111122 0.143648744 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -59 0.655555546 0.285893828 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male ? 0 -30 0.333333343 0.118624911 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Other-relative Asian-Pac-Islander Male Vietnam 0 -32 0.355555564 0.0261311177 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.06860555 0.25 0 0 0.5050505 Private 7th-8th Never-married Craft-repair Not-in-family White Male United-States 0 -53 0.5888889 0.058703918 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -54 0.6 0.138119027 0.375 0 0 0.363636374 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.0383436456 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family Black Male ? 0 -34 0.377777785 0.01705524 0.8125 0 0.5369605 0.4040404 Private Bachelors Married-spouse-absent Machine-op-inspct Not-in-family Asian-Pac-Islander Male ? 0 -31 0.344444454 0.0592373572 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Not-in-family Amer-Indian-Eskimo Female United-States 0 -34 0.377777785 0.1011339 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -58 0.644444466 0.09569309 0.5625 0.04787048 0 0.3939394 Private HS-grad Divorced Tech-support Not-in-family White Male United-States 1 -30 0.333333343 0.0755294859 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -53 0.5888889 0.1005028 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Puerto-Rico 0 -27 0.3 0.127954036 0.625 0 0 0.2020202 Private Some-college Divorced Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.07354929 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -24 0.266666681 0.128166884 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.127570122 0.8125 0 0.453856736 0.353535354 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.288455278 0.5625 0 0 0.353535354 Federal-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -22 0.244444445 0.09038294 0.625 0 0 0.1010101 State-gov Some-college Never-married Tech-support Own-child White Female United-States 0 -47 0.5222222 0.113295913 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.186780542 0.75 0 0.43663913 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband Black Male United-States 1 -44 0.4888889 0.212917715 0.9375 0 0 0.4040404 Federal-gov Prof-school Divorced Prof-specialty Unmarried White Male United-States 1 -41 0.455555558 0.0722540841 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 -45 0.5 0.07574097 0.5625 0 0 0.04040404 ? HS-grad Separated ? Not-in-family Asian-Pac-Islander Male United-States 0 -24 0.266666681 0.23365517 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 -65 0.722222269 0.07073257 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -45 0.5 0.21375291 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -23 0.25555557 0.127309471 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -54 0.6 0.093068324 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -40 0.444444448 0.2019344 0.4375 0 0 0.373737365 Private 11th Never-married Machine-op-inspct Not-in-family White Female Dominican-Republic 0 -45 0.5 0.178542539 0.1875 0 0 0.353535354 Private 5th-6th Divorced Priv-house-serv Unmarried White Female Mexico 0 -50 0.5555556 0.125173688 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.124371514 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Other-service Other-relative White Male United-States 0 -24 0.266666681 0.134905592 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -42 0.466666669 0.07901839 0.5625 0 0.3838384 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.0424326733 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -58 0.644444466 0.07202913 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Craft-repair Unmarried White Male United-States 0 -47 0.5222222 0.0355592519 0.625 0 0 0.464646459 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.0345280729 1 0 0 1 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male France 1 -37 0.411111116 0.276768118 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 -22 0.244444445 0.07111985 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Transport-moving Not-in-family White Male United-States 0 -29 0.322222233 0.123358518 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -45 0.5 0.141382977 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male India 1 -49 0.544444442 0.18579112 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -44 0.4888889 0.162895 0.6875 0.04386044 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 -72 0.8 0.0601459555 0.5625 0 0 0.161616161 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -63 0.7 0.07183111 0.5625 0 0 0.121212125 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -26 0.2888889 0.0393519253 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -58 0.644444466 0.08211194 0.6875 0 0 0.424242437 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.114992544 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -56 0.622222245 0.173472181 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -55 0.6111111 0.0346863531 0.625 0 0 0.727272749 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -28 0.311111122 0.131339222 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Other-relative White Female United-States 0 -57 0.6333333 0.07324082 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -37 0.411111116 0.124579631 0.875 0 0 0.454545468 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 1 -44 0.4888889 0.10562031 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.0332220867 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -42 0.466666669 0.08198127 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male Germany 0 -18 0.2 0.115899123 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -57 0.6333333 0.220852628 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.145476714 0.625 0 0 0.353535354 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -38 0.422222227 0.14202553 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.2174661 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -42 0.466666669 0.178956762 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Unmarried White Female United-States 0 -70 0.7777778 0.0181786958 0.5625 0 0 0.6060606 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -50 0.5555556 0.11981909 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.127370089 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.206660584 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male Nicaragua 0 -72 0.8 0.0263419338 0.4375 0 0 0.08080808 Federal-gov 11th Divorced Adm-clerical Not-in-family White Female Canada 0 -33 0.366666675 0.104717776 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -47 0.5222222 0.09146801 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 0 -48 0.533333361 0.0793753639 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -64 0.7111111 0.2285444 0.8125 0 0 0.24242425 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.214737609 0.4375 0 0 0.353535354 Private 11th Never-married Priv-house-serv Not-in-family White Female United-States 0 -48 0.533333361 0.117729791 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -37 0.411111116 0.1375876 0.5625 0 0.4242424 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -55 0.6111111 0.1228931 0.5625 0.1502415 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.1306118 0.875 0 0 0.454545468 Private Masters Never-married Priv-house-serv Not-in-family White Female ? 0 -42 0.466666669 0.0616068542 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.0719065443 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female Canada 1 -34 0.377777785 0.253033429 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Own-child Black Female United-States 0 -55 0.6111111 0.149938881 0.875 0 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -22 0.244444445 0.12862353 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -39 0.433333337 0.0517052226 0.625 0 0 0.6060606 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -50 0.5555556 0.136793509 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.109238535 0.625 0 0.4331956 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -25 0.2777778 0.163486347 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Own-child White Female United-States 0 -52 0.5777778 0.170932278 0.4375 0 0 0.2020202 Private 11th Divorced Other-service Unmarried White Female United-States 0 -30 0.333333343 0.138782457 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.122282207 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -73 0.811111152 0.0545468628 0.5625 0 0 0.2020202 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.135234281 0.25 0 0 0.6060606 Private 7th-8th Divorced Craft-repair Not-in-family White Male United-States 0 -34 0.377777785 0.0286898743 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -24 0.266666681 0.3128581 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family Black Male ? 0 -66 0.733333349 0.1385622 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.300490677 0.5625 0 0 0.5555556 Private HS-grad Never-married Sales Own-child White Male United-States 0 -69 0.7666667 0.0217464082 0.375 0 0 0.25252524 Local-gov 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -23 0.25555557 0.0382392481 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -55 0.6111111 0.2075281 0.8125 0 0 0.4040404 Private Bachelors Widowed Machine-op-inspct Unmarried White Female ? 0 -35 0.3888889 0.118729986 0.625 0 0 0.3030303 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 -20 0.222222224 0.0695606247 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -70 0.7777778 0.152070612 0.625 0 0 0.2020202 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.104214646 0.6875 0.07688077 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -34 0.377777785 0.100991778 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Asian-Pac-Islander Male Japan 0 -38 0.422222227 0.0149827749 1 0 0 0.454545468 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.06267642 0.25 0 0 0.4040404 Private 7th-8th Divorced Handlers-cleaners Own-child White Male United-States 0 -43 0.477777779 0.1822059 0.5625 0 0 0.262626261 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -60 0.6666667 0.08299157 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -81 0.900000036 0.08349066 0.8125 0 0.382920116 0.0303030312 Self-emp-not-inc Bachelors Widowed Prof-specialty Not-in-family White Female Hungary 0 -32 0.355555564 0.069806464 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.106248043 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -46 0.51111114 0.103780217 0.875 0 0 0.25252524 Self-emp-not-inc Masters Never-married Exec-managerial Not-in-family White Male United-States 0 -30 0.333333343 0.0155162141 0.625 0 0 0.8484849 State-gov Some-college Never-married Other-service Own-child Amer-Indian-Eskimo Male United-States 0 -23 0.25555557 0.152818918 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Other-relative Asian-Pac-Islander Female South 0 -29 0.322222233 0.0336955823 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -51 0.566666663 0.09311682 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.2490899 0.25 0 0 0.25252524 Private 7th-8th Never-married Handlers-cleaners Other-relative White Male United-States 0 -36 0.4 0.0298806839 0.5625 0 0 0.363636374 Federal-gov HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -23 0.25555557 0.1553871 0.625 0 0 0.222222224 Private Some-college Never-married Handlers-cleaners Own-child Black Male United-States 0 -35 0.3888889 0.0283180848 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.037946932 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.105081484 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.110078432 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -27 0.3 0.05741949 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -38 0.422222227 0.126227766 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.104481362 0.6875 0 0.383149683 0.4040404 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 -25 0.2777778 0.267146 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 1 -45 0.5 0.122794092 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.03542522 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -66 0.733333349 0.175193727 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -65 0.722222269 0.09669935 0.625 0 0 0.4040404 Local-gov Some-college Never-married Prof-specialty Not-in-family Black Female United-States 0 -30 0.333333343 0.108192541 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 1 -54 0.6 0.0201447438 0.4375 0 0 0.434343427 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 -49 0.544444442 0.06345705 0.5 0 0 0.4040404 Private 12th Divorced Machine-op-inspct Not-in-family White Female United-States 0 -41 0.455555558 0.102370508 0.6875 0 0 0.151515156 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -48 0.533333361 0.126679033 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -23 0.25555557 0.147130236 0.1875 0 0 0.121212125 Private 5th-6th Never-married Priv-house-serv Unmarried White Female Mexico 0 -77 0.8555556 0.1588026 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Husband White Male Cuba 0 -19 0.211111113 0.0664138645 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -30 0.333333343 0.126892552 0.5625 0 0 0.3030303 Private HS-grad Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 -41 0.455555558 0.09454067 0.8125 0 0.43663913 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.13669382 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male Iran 1 -20 0.222222224 0.146975324 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -66 0.733333349 0.1332359 0.8125 0.106051058 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.0990109146 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Female Puerto-Rico 0 -52 0.5777778 0.0932825059 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.03887035 0.875 0 0 0.353535354 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -50 0.5555556 0.11445035 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.04870328 0.4375 0 0 0.656565666 Private 11th Never-married Transport-moving Not-in-family White Male United-States 0 -19 0.211111113 0.115039691 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -39 0.433333337 0.1448739 0.4375 0 0 0.3030303 Private 11th Never-married Prof-specialty Unmarried White Female Puerto-Rico 0 -45 0.5 0.323779464 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male ? 0 -61 0.677777767 0.0233258456 0.8125 0 0 0.3030303 Local-gov Bachelors Divorced Other-service Not-in-family White Male United-States 0 -45 0.5 0.09474205 0.75 0 0 0.5555556 Private Assoc-acdm Divorced Transport-moving Not-in-family White Male United-States 0 -36 0.4 0.1197935 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Own-child White Male United-States 0 -40 0.444444448 0.108014055 0.875 0 0.5544077 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.0869546458 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -52 0.5777778 0.187594175 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 -29 0.322222233 0.08416016 0.6875 0 0 0.424242437 Federal-gov Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -33 0.366666675 0.0425566025 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -40 0.444444448 0.111682124 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 -34 0.377777785 0.1674299 0.5625 0 0 0.5555556 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -46 0.51111114 0.152805448 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Protective-serv Not-in-family Black Male United-States 1 -44 0.4888889 0.180316627 0.875 0.1502415 0 0.454545468 Private Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.0406592563 0.5625 0 0 0.13131313 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -44 0.4888889 0.0903344452 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -40 0.444444448 0.06441616 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 -20 0.222222224 0.08894225 0.625 0 0 0.02020202 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -24 0.266666681 0.09346503 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Handlers-cleaners Own-child White Male United-States 0 -76 0.844444454 0.137340412 0.5625 0 0 0.171717167 Private HS-grad Widowed Other-service Not-in-family White Male United-States 0 -20 0.222222224 0.07405646 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Other-relative White Male United-States 0 -33 0.366666675 0.104923874 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 -31 0.344444454 0.0332712568 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -33 0.366666675 0.107296064 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -19 0.211111113 0.167264879 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -29 0.322222233 0.128334582 0.8125 0 0.365013778 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -30 0.333333343 0.1236744 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -48 0.533333361 0.017153576 0.875 1 0 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 1 -42 0.466666669 0.135713831 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.035172645 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -54 0.6 0.06496914 0.5625 0.07688077 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.219136462 0.75 0.07688077 0 0.424242437 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 -28 0.311111122 0.118560255 0.5625 0 0 0.282828271 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family White Female United-States 0 -42 0.466666669 0.1792511 0.625 0 0 0.5252525 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -60 0.6666667 0.130835414 0.875 0.03103031 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 -76 0.844444454 0.111022055 0.5625 0 0 0.25252524 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -21 0.233333334 0.244622335 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Own-child White Female United-States 0 -29 0.322222233 0.0211220421 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -43 0.477777779 0.0427714624 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.106158465 0.5625 0 0 0.3838384 Private HS-grad Divorced Sales Own-child White Male United-States 0 -45 0.5 0.108201295 0.8125 0.0468704663 0 0.353535354 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 1 -38 0.422222227 0.244759068 0.625 0 0 0.4040404 Private Some-college Never-married Sales Unmarried Black Female United-States 0 -28 0.311111122 0.227907911 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -29 0.322222233 0.0589497574 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -20 0.222222224 0.189070553 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -49 0.544444442 0.08053115 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.115499042 0.625 0 0 0.565656543 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -40 0.444444448 0.0331709 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.2233117 0.5 0 0 0.3030303 Private 12th Never-married Adm-clerical Own-child White Female United-States 0 -45 0.5 0.117481925 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.124001063 0.625 0 0 0.282828271 Private Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 -29 0.322222233 0.0255491845 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried Black Female United-States 0 -57 0.6333333 0.196354836 0.8125 0.04386044 0 0.13131313 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.253529161 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -20 0.222222224 0.177551776 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female Haiti 0 -23 0.25555557 0.153209567 0.5625 0 0 0.24242425 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -39 0.433333337 0.128714457 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -34 0.377777785 0.0240074638 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.15309304 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 -25 0.2777778 0.126293108 0.625 0 0 0.4040404 State-gov Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -40 0.444444448 0.124184944 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male Puerto-Rico 0 -52 0.5777778 0.128195837 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -48 0.533333361 0.104648404 0.5625 0 0 0.363636374 Private HS-grad Widowed Machine-op-inspct Unmarried White Female United-States 0 -37 0.411111116 0.175039485 0.6875 0 0 0.0606060624 Private Assoc-voc Never-married Sales Unmarried Black Female United-States 0 -36 0.4 0.146208853 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.06977548 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.126783431 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -24 0.266666681 0.2377644 0.8125 0 0 0.1010101 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -42 0.466666669 0.04758858 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -35 0.3888889 0.0436948761 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Never-married Sales Own-child White Male United-States 0 -40 0.444444448 0.1476657 0.5625 0 0 0.222222224 Federal-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -50 0.5555556 0.07061942 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 -40 0.444444448 0.116918854 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.277709037 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Other-relative Black Male ? 0 -57 0.6333333 0.131901622 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -51 0.566666663 0.114890836 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -61 0.677777767 0.155280009 0.5625 0 0 0.353535354 Federal-gov HS-grad Never-married Adm-clerical Unmarried White Female Puerto-Rico 0 -71 0.788888931 0.109312624 0.5625 0 0 0.2020202 Private HS-grad Widowed Sales Unmarried White Female United-States 0 -47 0.5222222 0.1141971 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.07915916 0.8125 0 0 0.454545468 Private Bachelors Never-married Other-service Other-relative White Female United-States 0 -25 0.2777778 0.184464931 0.8125 0 0 0.656565666 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -33 0.366666675 0.3563698 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -40 0.444444448 0.307205826 0.4375 0 0 0.5252525 State-gov 11th Divorced Transport-moving Unmarried White Female United-States 0 -39 0.433333337 0.121820837 0.4375 0 0 0.4040404 ? 11th Never-married ? Not-in-family Black Female United-States 0 -29 0.322222233 0.114703596 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -33 0.366666675 0.0375273228 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -46 0.51111114 0.111928634 0.625 0 0 0.363636374 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -24 0.266666681 0.03518679 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 1 -28 0.311111122 0.151295379 0.875 0 0 0.3030303 Private Masters Never-married Exec-managerial Not-in-family Other Male Cuba 0 -20 0.222222224 0.133357808 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -34 0.377777785 0.0310795754 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Unmarried White Female United-States 0 -34 0.377777785 0.121822856 0.8125 0 0 0.5555556 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -25 0.2777778 0.142998785 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -36 0.4 0.156848669 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -61 0.677777767 0.1185414 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.1192971 0.625 0 0 0.5858586 Private Some-college Separated Other-service Not-in-family White Female United-States 0 -57 0.6333333 0.20162794 0.5625 0 0.3946281 0.25252524 Private HS-grad Widowed Other-service Other-relative White Female United-States 0 -20 0.222222224 0.219992533 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Female United-States 0 -56 0.622222245 0.08744902 0.5625 0 0 0.1010101 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -24 0.266666681 0.151892126 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -60 0.6666667 0.09810973 0.625 0 0 0.4848485 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -37 0.411111116 0.102218285 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -27 0.3 0.123609066 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -54 0.6 0.173683658 0.625 0 0 0.282828271 Private Some-college Separated Other-service Not-in-family White Male Columbia 0 -40 0.444444448 0.0491848551 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 -18 0.2 0.111491509 0.5 0 0 0.151515156 Private 12th Never-married Other-service Own-child White Male United-States 0 -51 0.566666663 0.0943184048 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -40 0.444444448 0.2190058 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -64 0.7111111 0.109062746 0.5625 0 0 0.08080808 Federal-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -24 0.266666681 0.110234022 0.5625 0.0217402168 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -33 0.366666675 0.07202643 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Tech-support Wife Black Female United-States 0 -31 0.344444454 0.06563795 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -26 0.2888889 0.16330786 0.5625 0.03103031 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -54 0.6 0.10455478 0.8125 0.14084141 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 1 -31 0.344444454 0.167476371 0.125 0 0 0.373737365 Private 1st-4th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 -39 0.433333337 0.03994935 0.5 0 0 0.454545468 Private 12th Married-spouse-absent Transport-moving Not-in-family Black Male ? 0 -22 0.244444445 0.0951684043 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -31 0.344444454 0.153111234 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -68 0.75555557 0.08328456 0.1875 0 0 0.121212125 Private 5th-6th Separated Other-service Not-in-family White Male Italy 0 -59 0.655555546 0.118755579 0.375 0 0 0.373737365 Federal-gov 10th Divorced Other-service Not-in-family White Female United-States 0 -35 0.3888889 0.05196049 0.5625 0.0282902829 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.113910846 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -23 0.25555557 0.12084084 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -35 0.3888889 0.121328481 0.625 0 0 0.6060606 Private Some-college Divorced Exec-managerial Unmarried White Male United-States 0 -17 0.188888893 0.120777532 0.375 0 0 0.3030303 State-gov 10th Never-married Other-service Own-child White Male United-States 0 -19 0.211111113 0.03082498 0.625 0 0 0.454545468 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -53 0.5888889 0.102922805 0.875 0 0.453856736 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -59 0.655555546 0.1441714 0.1875 0 0 0.4040404 Private 5th-6th Divorced Machine-op-inspct Unmarried White Female United-States 0 -37 0.411111116 0.1354754 0.5625 0 0 0.373737365 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -74 0.822222233 0.02936543 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Widowed Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.197033077 0.625 0 0 0.5050505 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -40 0.444444448 0.0553382672 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -30 0.333333343 0.121678047 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Craft-repair Not-in-family White Male ? 0 -20 0.222222224 0.122158952 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Male United-States 0 -80 0.8888889 0.100102715 0.9375 0 0 0.353535354 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.05684564 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -17 0.188888893 0.09653837 0.375 0 0 0.151515156 Private 10th Never-married Sales Own-child White Male United-States 0 -37 0.411111116 0.0328543372 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -19 0.211111113 0.118201934 0.5625 0 0 0.24242425 ? HS-grad Never-married ? Own-child Black Female United-States 0 -58 0.644444466 0.0562684163 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -57 0.6333333 0.1445533 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.107789092 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -23 0.25555557 0.0266739856 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Craft-repair Unmarried Amer-Indian-Eskimo Male United-States 0 -36 0.4 0.122306451 0.8125 0 0 0.323232323 Private Bachelors Never-married Adm-clerical Not-in-family White Female Columbia 0 -33 0.366666675 0.176136672 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.0198840853 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 -30 0.333333343 0.0244762432 0.5625 0 0 0.24242425 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -41 0.455555558 0.2161938 0.9375 1 0 0.656565666 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -57 0.6333333 0.271855354 0.625 0 0 0.6060606 ? Some-college Married-civ-spouse ? Husband Asian-Pac-Islander Male United-States 1 -23 0.25555557 0.08240425 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -40 0.444444448 0.07125591 0.9375 0.14084141 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 -53 0.5888889 0.102971971 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family Black Female United-States 0 -31 0.344444454 0.0828696638 0.625 0 0 0.13131313 State-gov Some-college Never-married Tech-support Not-in-family White Male United-States 0 -41 0.455555558 0.228787541 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Husband White Male Mexico 0 -36 0.4 0.122633114 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 -30 0.333333343 0.167432591 0.5 0 0 0.4040404 Private 12th Divorced Other-service Not-in-family White Female United-States 0 -44 0.4888889 0.1263443 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male Canada 0 -36 0.4 0.0314581022 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -42 0.466666669 0.128166884 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.166561037 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male Peru 0 -22 0.244444445 0.07932822 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -38 0.422222227 0.08190314 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.304265171 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.0726023 0.5625 0.0217402168 0 0.4040404 Private HS-grad Divorced Other-service Own-child White Male United-States 0 -35 0.3888889 0.228848159 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -21 0.233333334 0.12499588 0.625 0 0 0.434343427 Private Some-college Never-married Sales Own-child White Male United-States 0 -26 0.2888889 0.17553252 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.0358455069 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -43 0.477777779 0.144031316 0.5625 0 0 0.424242437 Private HS-grad Married-AF-spouse Craft-repair Wife Black Female United-States 1 -33 0.366666675 0.143615067 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.0394569971 0.8125 0 0 0.1010101 Private Bachelors Never-married Craft-repair Own-child White Male United-States 0 -52 0.5777778 0.130070284 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -38 0.422222227 0.13565658 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.128325164 0.8125 0 0 0.464646459 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -57 0.6333333 0.0931397155 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Other-service Husband White Male Iran 0 -51 0.566666663 0.07539478 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.07360183 0.3125 0 0 0.4848485 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -32 0.355555564 0.223302945 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male China 1 -32 0.355555564 0.267221451 0.8125 0 0.5544077 0.4848485 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.08531998 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -69 0.7666667 0.23507835 0.5625 0 0 0.333333343 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.06610404 0.625 0 0 0.3030303 ? Some-college Divorced ? Unmarried Amer-Indian-Eskimo Male United-States 0 -37 0.411111116 0.158213928 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male Germany 1 -36 0.4 0.06781212 0.625 0.0246302467 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -47 0.5222222 0.178551972 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -63 0.7 0.159882948 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -21 0.233333334 0.03016963 0.625 0 0 0.656565666 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -17 0.188888893 0.182488784 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Other-relative White Male Mexico 0 -56 0.622222245 0.130411088 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried White Male United-States 0 -90 1 0.126455426 0.75 0 0 0.2020202 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 0 -27 0.3 0.107885405 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.458266139 0.5625 0 0 0.2020202 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -33 0.366666675 0.06482433 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -26 0.2888889 0.02344102 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -20 0.222222224 0.114562154 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 -42 0.466666669 0.156134054 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -55 0.6111111 0.016022712 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -32 0.355555564 0.295487 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Prof-specialty Wife Black Female United-States 0 -66 0.733333349 0.114368849 0.8125 0.200512 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -66 0.733333349 0.253589779 1 0.0327303261 0 0.4040404 Local-gov Doctorate Divorced Prof-specialty Not-in-family White Female United-States 0 -49 0.544444442 0.0193917323 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -34 0.377777785 0.109660842 0.5625 0 0 0.454545468 Private HS-grad Divorced Protective-serv Not-in-family Black Male United-States 0 -38 0.422222227 0.0391377434 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.06885274 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -22 0.244444445 0.140856937 0.75 0 0 0.2020202 Federal-gov Assoc-acdm Never-married Other-service Own-child White Male United-States 0 -46 0.51111114 0.105823718 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.116430536 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.020069981 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 -71 0.788888931 0.154524982 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -37 0.411111116 0.05434076 0.8125 0.0115101151 0 0.353535354 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -52 0.5777778 0.160947129 0.875 0 0 0.323232323 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -27 0.3 0.1276092 0.875 0 0 0.464646459 Private Masters Never-married Adm-clerical Not-in-family White Female United-States 0 -52 0.5777778 0.09385501 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Wife White Female United-States 0 -31 0.344444454 0.126697227 0.5625 0.04101041 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -37 0.411111116 0.07484854 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.0549200028 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -25 0.2777778 0.17347689 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -31 0.344444454 0.04007261 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -29 0.322222233 0.0201885235 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.0691026151 0.5625 0 0 0.353535354 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -69 0.7666667 0.0278971251 0.25 0 0 0.2020202 Private 7th-8th Married-civ-spouse Other-service Husband White Male United-States 0 -50 0.5555556 0.07985762 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -54 0.6 0.210746914 1 0 0 0.464646459 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male England 1 -17 0.188888893 0.112002052 0.3125 0 0 0.2020202 Private 9th Never-married Other-service Own-child White Female United-States 0 -34 0.377777785 0.107941307 0.5625 0.14084141 0 0.353535354 Private HS-grad Never-married Tech-support Own-child Asian-Pac-Islander Male China 1 -32 0.355555564 0.07869173 0.5625 0 0 0.05050505 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female ? 0 -23 0.25555557 0.136778682 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -66 0.733333349 0.135513112 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -61 0.677777767 0.184415758 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.105608188 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Female United-States 0 -24 0.266666681 0.191213742 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -30 0.333333343 0.1006045 0.5625 0.0115101151 0 0.3030303 Private HS-grad Divorced Sales Unmarried White Male United-States 0 -49 0.544444442 0.105695076 0.6875 0 0 0.454545468 Private Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 1 -21 0.233333334 0.110399708 0.625 0 0 0.0303030312 ? Some-college Never-married ? Own-child White Female United-States 0 -56 0.622222245 0.111726575 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -25 0.2777778 0.058511287 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -49 0.544444442 0.112832516 0.8125 0 0 0.4040404 Private Bachelors Divorced Protective-serv Not-in-family White Male United-States 0 -58 0.644444466 0.104364172 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -40 0.444444448 0.115329981 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Adm-clerical Not-in-family White Male Puerto-Rico 0 -62 0.6888889 0.164970815 0.875 0 0 0.454545468 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -54 0.6 0.1730364 0.8125 0 0 0.25252524 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -34 0.377777785 0.02252434 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Never-married Other-service Other-relative White Female United-States 0 -18 0.2 0.08496099 0.375 0 0 0.3030303 Private 10th Never-married Craft-repair Own-child White Male United-States 0 -28 0.311111122 0.180656761 0.4375 0 0 0.4040404 ? 11th Never-married ? Not-in-family Black Female United-States 0 -32 0.355555564 0.112551652 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male Hong 0 -22 0.244444445 0.0337205045 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -34 0.377777785 0.170087 0.8125 0 0 0.4848485 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -53 0.5888889 0.134481266 0.8125 0 0 0.3030303 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -47 0.5222222 0.2314123 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 -19 0.211111113 0.12852183 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -41 0.455555558 0.101763651 0.625 0 0.5544077 0.5555556 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.125829712 0.625 0.0501305 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -56 0.622222245 0.141934589 0.25 0 0 0.2020202 Self-emp-not-inc 7th-8th Divorced Sales Other-relative White Male Mexico 0 -42 0.466666669 0.08339435 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Female United-States 0 -25 0.2777778 0.0519099757 0.8125 0 0.5369605 0.353535354 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -42 0.466666669 0.07751372 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -43 0.477777779 0.11485447 0.8125 0.143441439 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 -17 0.188888893 0.141407892 0.4375 0 0.3677686 0.121212125 Private 11th Never-married Sales Own-child White Female United-States 0 -57 0.6333333 0.0231002122 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.121899642 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.0224724784 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Other-service Not-in-family White Female Canada 0 -20 0.222222224 0.133192793 0.625 0 0 0.161616161 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -47 0.5222222 0.121607326 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -40 0.444444448 0.0525188521 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -44 0.4888889 0.107292026 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female ? 1 -48 0.533333361 0.06354259 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.02302141 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 -46 0.51111114 0.247356221 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 -72 0.8 0.11612206 0.9375 1 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.20439212 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.148358762 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -40 0.444444448 0.03037169 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male Canada 0 -34 0.377777785 0.06850452 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Not-in-family Asian-Pac-Islander Male United-States 0 -41 0.455555558 0.147902116 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -41 0.455555558 0.05160958 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.230752245 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -42 0.466666669 0.08476162 0.125 0 0 0.6060606 Self-emp-inc 1st-4th Married-civ-spouse Sales Husband White Male ? 0 -54 0.6 0.1604743 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -39 0.433333337 0.1389185 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -37 0.411111116 0.116232522 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -59 0.655555546 0.06409691 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Sales Husband White Male United-States 0 -69 0.7666667 0.09509027 0.1875 0.01797018 0 0.4040404 Private 5th-6th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -24 0.266666681 0.1804015 0.8125 0 0 0.353535354 Private Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 -36 0.4 0.122167036 0.6875 0.03103031 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -21 0.233333334 0.139948338 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 -68 0.75555557 0.06948249 0.5625 0 0 0.323232323 ? HS-grad Widowed ? Not-in-family White Male United-States 0 -20 0.222222224 0.08912209 0.625 0 0 0.4040404 Private Some-college Separated Craft-repair Not-in-family White Male United-States 0 -26 0.2888889 0.135473385 0.6875 0 0 0.353535354 Self-emp-not-inc Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 -48 0.533333361 0.161013812 0.5 0 0 0.5050505 Private 12th Widowed Handlers-cleaners Unmarried White Female United-States 0 -39 0.433333337 0.161483258 0.9375 0 0.43663913 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.118718535 0.75 0 0 0.181818187 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 -22 0.244444445 0.178310171 0.5625 0 0 0.424242437 Private HS-grad Never-married Exec-managerial Other-relative White Female Germany 0 -34 0.377777785 0.122730106 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -33 0.366666675 0.214845374 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.145932019 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Guatemala 0 -47 0.5222222 0.184683159 0.4375 0.07298073 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 -65 0.722222269 0.101094157 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.129977345 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -28 0.311111122 0.0458144881 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -34 0.377777785 0.0192415323 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 1 -20 0.222222224 0.07749486 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.09400386 0.4375 0 0 0.4040404 Private 11th Never-married Adm-clerical Not-in-family White Male United-States 0 -52 0.5777778 0.0932825059 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -40 0.444444448 0.1228931 0.875 0 0 0.3838384 State-gov Masters Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female China 1 -22 0.244444445 0.170613021 0.8125 0 0 0.07070707 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -29 0.322222233 0.08813603 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.262520164 0.25 0 0 0.6060606 Self-emp-not-inc 7th-8th Married-civ-spouse Prof-specialty Husband White Male United-States 0 -42 0.466666669 0.0355498232 0.875 0 0.43663913 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.09845592 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried Black Female United-States 0 -22 0.244444445 0.155622169 0.4375 0 0 0.7070707 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -21 0.233333334 0.09831179 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -43 0.477777779 0.325620234 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Exec-managerial Husband White Male Mexico 0 -43 0.477777779 0.133572668 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.10817907 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -17 0.188888893 0.219013885 0.375 0 0 0.353535354 Self-emp-inc 10th Never-married Other-service Own-child Black Male United-States 0 -54 0.6 0.116452768 0.9375 0.05178052 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.125596 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -55 0.6111111 0.193282172 0.375 0 0 0.454545468 Local-gov 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.07539478 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -65 0.722222269 0.218958646 0.375 0 0 0.4040404 Federal-gov 10th Divorced Craft-repair Unmarried White Male United-States 0 -21 0.233333334 0.096707426 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Female United-States 0 -40 0.444444448 0.207466811 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried Black Female United-States 0 -58 0.644444466 0.07076153 0.625 0 0 0.373737365 Private Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 -53 0.5888889 0.0267009269 0.5625 0 0 0.5858586 Federal-gov HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 -39 0.433333337 0.125406057 0.875 0 0.4242424 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -56 0.622222245 0.180347621 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -37 0.411111116 0.0837156251 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -44 0.4888889 0.02442977 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.09662458 0.3125 0 0 0.3838384 Private 9th Separated Handlers-cleaners Own-child White Male United-States 0 -36 0.4 0.12553066 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male United-States 1 -59 0.655555546 0.03557744 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.07039042 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -36 0.4 0.124237478 0.9375 0.2782828 0 0.5050505 Private Prof-school Never-married Exec-managerial Not-in-family White Male United-States 1 -26 0.2888889 0.129522026 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -22 0.244444445 0.105625026 0.375 0 0.404499531 0.25252524 Private 10th Never-married Sales Not-in-family White Female United-States 0 -25 0.2777778 0.144414544 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Own-child White Male United-States 0 -28 0.311111122 0.0731283352 0.625 0 0 0.151515156 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -41 0.455555558 0.150827274 0.75 0 0 0.3838384 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -45 0.5 0.1350834 0.6875 0 0 0.7070707 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -43 0.477777779 0.09276052 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -30 0.333333343 0.176248491 0.3125 0 0 0.4040404 Private 9th Never-married Handlers-cleaners Unmarried Black Male United-States 0 -33 0.366666675 0.09182363 0.5625 0 0 0.5050505 Private HS-grad Married-spouse-absent Craft-repair Unmarried White Male United-States 0 -34 0.377777785 0.222261667 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -21 0.233333334 0.0618432648 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 -31 0.344444454 0.1354626 0.8125 0 0.43663913 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -48 0.533333361 0.212448269 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 0 -22 0.244444445 0.0695606247 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -47 0.5222222 0.159496337 0.625 0 0 0.6060606 Private Some-college Divorced Sales Unmarried White Female United-States 0 -27 0.3 0.0504362844 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family Asian-Pac-Islander Female Philippines 0 -18 0.2 0.07775484 0.4375 0 0 0.25252524 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -43 0.477777779 0.1013858 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.0294341315 0.625 0 0 0.2020202 Private Some-college Widowed Sales Not-in-family White Female United-States 0 -37 0.411111116 0.282246649 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -24 0.266666681 0.123656891 0.6875 0 0 0.2020202 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 -24 0.266666681 0.26291284 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -38 0.422222227 0.0249133669 0.8125 0.03908039 0 0.7070707 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 -48 0.533333361 0.166965827 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -75 0.8333334 0.128945485 0.125 0 0 0.161616161 Private 1st-4th Married-civ-spouse Other-service Other-relative Black Female United-States 0 -43 0.477777779 0.02257755 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 -64 0.7111111 0.0310411844 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -67 0.7444445 0.0870125741 1 0.200512 0 0.05050505 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 -36 0.4 0.240333274 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -53 0.5888889 0.106920905 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -22 0.244444445 0.103268325 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Not-in-family Black Male United-States 0 -73 0.811111152 0.08782283 0.5625 0 0 0.363636374 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.116934344 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.24441421 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.123093143 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.03394412 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 -43 0.477777779 0.06850452 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Handlers-cleaners Not-in-family Asian-Pac-Islander Male United-States 0 -21 0.233333334 0.136437878 0.5 0 0 0.4848485 Private 12th Never-married Adm-clerical Other-relative Black Male ? 0 -40 0.444444448 0.09809963 0.5625 0 0 0.25252524 Private HS-grad Separated Sales Unmarried Black Female United-States 0 -36 0.4 0.0918317139 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -64 0.7111111 0.09575371 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Divorced Sales Not-in-family White Male United-States 0 -19 0.211111113 0.162996024 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -46 0.51111114 0.08559883 0.625 0.05178052 0 0.3838384 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.0835661 0.875 0 0 0.656565666 Local-gov Masters Divorced Exec-managerial Unmarried White Female United-States 1 -41 0.455555558 0.128219411 0.8125 0 0 0.7070707 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -29 0.322222233 0.013331268 0.625 0 0 0.08080808 ? Some-college Divorced ? Unmarried White Female United-States 0 -28 0.311111122 0.0455720164 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative White Female United-States 0 -23 0.25555557 0.04194638 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.198699415 0.8125 0 0 0.6060606 Federal-gov Bachelors Never-married Protective-serv Not-in-family White Female United-States 1 -44 0.4888889 0.137331665 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Adm-clerical Not-in-family White Female Cuba 0 -27 0.3 0.178698123 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -25 0.2777778 0.107498124 0.5625 0 0 0.343434334 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -29 0.322222233 0.09047656 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.08285215 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Poland 1 -27 0.3 0.185197741 0.8125 0 0 0.656565666 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 -34 0.377777785 0.0446614 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.04948525 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.0179638378 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Other-relative Amer-Indian-Eskimo Female United-States 0 -56 0.622222245 0.2405313 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -35 0.3888889 0.124371514 0.5625 0 0 0.6262626 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.0373757742 0.6875 0 0 0.3030303 ? Assoc-voc Never-married ? Not-in-family Amer-Indian-Eskimo Female United-States 0 -23 0.25555557 0.118047692 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -19 0.211111113 0.126629874 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Black Female United-States 0 -42 0.466666669 0.0587887838 0.9375 0.07298073 0 0.353535354 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.222324982 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.03837463 0.5625 0 0 0.8484849 Self-emp-inc HS-grad Divorced Sales Unmarried Asian-Pac-Islander Female ? 0 -27 0.3 0.101047009 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male Puerto-Rico 0 -22 0.244444445 0.127434745 0.75 0 0 0.151515156 ? Assoc-acdm Never-married ? Other-relative White Male United-States 0 -49 0.544444442 0.222855046 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.09215568 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -24 0.266666681 0.135501 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -34 0.377777785 0.218665659 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Asian-Pac-Islander Male China 0 -25 0.2777778 0.24665305 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Transport-moving Own-child White Male United-States 0 -33 0.366666675 0.06995329 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.07186613 0.75 0 0 0.272727281 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 -54 0.6 0.110161282 0.5625 0 0 0.3030303 Local-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.192806661 0.875 0 0 0.4040404 Self-emp-inc Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -25 0.2777778 0.08290064 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -75 0.8333334 0.084324494 0.5625 0 0 0.262626261 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -28 0.311111122 0.187291756 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Machine-op-inspct Other-relative Black Male United-States 0 -50 0.5555556 0.0902287 0.8125 0 0 0.5050505 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 -62 0.6888889 0.04813549 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.0515166335 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -58 0.644444466 0.144974932 0.8125 0 0 0.373737365 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.08566348 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 0 -21 0.233333334 0.121047616 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Other-relative White Female United-States 0 -40 0.444444448 0.0598832779 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.230345428 0.6875 0 0.43663913 0.424242437 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.117153242 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.231881082 0.5625 0 0 0.7070707 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -23 0.25555557 0.101342022 0.5625 0 0 0.4040404 Private HS-grad Never-married Priv-house-serv Unmarried Other Female Guatemala 0 -43 0.477777779 0.141135111 0.875 0.105201051 0 0.5050505 Local-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 1 -42 0.466666669 0.1358674 0.625 0 0 0.4040404 Local-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -39 0.433333337 0.231342927 0.8125 0.1502415 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male Japan 1 -52 0.5777778 0.05212618 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -21 0.233333334 0.115279466 0.625 0 0 0.353535354 ? Some-college Never-married ? Not-in-family White Female United-States 0 -56 0.622222245 0.2405313 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -48 0.533333361 0.112984739 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -37 0.411111116 0.2376782 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family Asian-Pac-Islander Female South 1 -25 0.2777778 0.03448564 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.246504188 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Own-child White Male United-States 1 -34 0.377777785 0.269693971 0.4375 0 0 0.454545468 Private 11th Never-married Machine-op-inspct Own-child Black Male United-States 0 -52 0.5777778 0.0212385636 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -41 0.455555558 0.07200084 0.8125 0 0.43663913 0.424242437 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -36 0.4 0.1295456 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Not-in-family White Male United-States 0 -21 0.233333334 0.07995663 0.6875 0 0.3452709 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 -28 0.311111122 0.203174368 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -31 0.344444454 0.0977716148 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 -20 0.222222224 0.0593559 0.625 0 0 0.09090909 Private Some-college Never-married Adm-clerical Own-child White Male England 0 -68 0.75555557 0.11114464 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male Italy 1 -35 0.3888889 0.160531551 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.577577353 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Male United-States 0 -64 0.7111111 0.0905082151 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.175655767 0.375 0 0 0.232323229 Private 10th Never-married Handlers-cleaners Own-child White Female United-States 0 -25 0.2777778 0.09346301 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -74 0.822222233 0.172878787 0.5625 0 0 0.25252524 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -31 0.344444454 0.166662067 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male Columbia 0 -51 0.566666663 0.305827081 1 0.07298073 0 0.4040404 State-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -67 0.7444445 0.121599242 0.5625 0 0 0.1010101 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.267626226 0.5625 0.0332503319 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -29 0.322222233 0.07217596 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -31 0.344444454 0.1764822 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -21 0.233333334 0.08838793 0.5625 0 0 0.373737365 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -67 0.7444445 0.184852213 0.375 0 0 0.161616161 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -41 0.455555558 0.246504188 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Protective-serv Not-in-family White Male United-States 1 -27 0.3 0.1377479 0.8125 0 0 0.363636374 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -51 0.566666663 0.06689275 0.5 0 0 0.5050505 Private 12th Divorced Transport-moving Unmarried White Male United-States 0 -21 0.233333334 0.139206782 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Wife White Female United-States 0 -28 0.311111122 0.180996224 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.18548803 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -28 0.311111122 0.2581806 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -29 0.322222233 0.08541899 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -39 0.433333337 0.1133929 0.5625 0 0 0.7070707 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -21 0.233333334 0.109561831 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male Columbia 0 -43 0.477777779 0.2514998 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.184926972 0.5625 0.143441439 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 -28 0.311111122 0.167953908 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.0751442239 0.3125 0 0 0.434343427 Private 9th Never-married Sales Not-in-family White Male United-States 1 -18 0.2 0.14582561 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Own-child White Male United-States 0 -27 0.3 0.09819055 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Wife Amer-Indian-Eskimo Female United-States 0 -34 0.377777785 0.140982226 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -25 0.2777778 0.174785569 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 -34 0.377777785 0.232611865 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male England 0 -43 0.477777779 0.133424491 0.5625 0.07688077 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.0223115031 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.138986543 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -25 0.2777778 1 0.625 0 0 0.25252524 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -21 0.233333334 0.0177880451 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.148784444 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Never-married Transport-moving Own-child White Male United-States 0 -49 0.544444442 0.03008746 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.026011901 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -36 0.4 0.05997151 0.4375 0 0 0.474747479 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.24931553 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Unmarried Black Female United-States 0 -23 0.25555557 0.140732333 0.625 0 0 0.323232323 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -21 0.233333334 0.08838793 0.625 0 0 0.1010101 Private Some-college Never-married Sales Own-child White Male United-States 0 -25 0.2777778 0.0406531952 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -26 0.2888889 0.2363116 0.1875 0 0 0.4040404 Private 5th-6th Never-married Transport-moving Not-in-family White Male ? 0 -24 0.266666681 0.141295418 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 -22 0.244444445 0.237051815 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Unmarried White Female United-States 0 -26 0.2888889 0.09569646 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female Mexico 0 -22 0.244444445 0.110981643 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Unmarried White Male Guatemala 0 -41 0.455555558 0.0322340131 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -18 0.2 0.272165179 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -24 0.266666681 0.147287175 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 -38 0.422222227 0.124371514 0.5625 0 0.399449021 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.216716453 0.8125 0 0 0.171717167 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.124872617 0.875 0 0 0.5555556 Local-gov Masters Divorced Prof-specialty Own-child White Female United-States 0 -38 0.422222227 0.2756103 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -38 0.422222227 0.0269932412 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.0213779844 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -53 0.5888889 0.157419831 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Adm-clerical Not-in-family Black Male United-States 0 -32 0.355555564 0.1293449 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -17 0.188888893 0.1499409 0.4375 0 0 0.3030303 Private 11th Never-married Sales Own-child Black Female United-States 0 -45 0.5 0.143897951 0.8125 0.07298073 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.130760655 0.5625 0 0 0.4848485 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -47 0.5222222 0.0540726967 1 0 0 0.454545468 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -27 0.3 0.112042464 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -61 0.677777767 0.0408438034 0.625 0 0 0.3030303 Federal-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -33 0.366666675 0.08407529 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -67 0.7444445 0.07101613 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Other-relative White Female United-States 0 -38 0.422222227 0.0574147739 0.8125 0 0 0.4040404 Private Bachelors Separated Craft-repair Not-in-family White Male United-States 0 -25 0.2777778 0.08118448 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -33 0.366666675 0.181587592 0.1875 0 0 0.4040404 Local-gov 5th-6th Never-married Other-service Unmarried Other Female El-Salvador 0 -27 0.3 0.1668419 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -45 0.5 0.2565641 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.189412042 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Other-relative Asian-Pac-Islander Female Taiwan 0 -23 0.25555557 0.1816435 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 -48 0.533333361 0.122420281 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -61 0.677777767 0.0921307653 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -22 0.244444445 0.07266225 0.5625 0 0 0.2020202 Private HS-grad Never-married Prof-specialty Own-child White Female United-States 0 -34 0.377777785 0.116237909 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Unmarried White Female United-States 0 -32 0.355555564 0.0201609079 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -35 0.3888889 0.02620386 0.625 0 0 0.5050505 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.113710135 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 -24 0.266666681 0.285601526 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Unmarried White Male United-States 0 -60 0.6666667 0.07914636 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.132666767 0.8125 0 0 0.434343427 ? Bachelors Never-married ? Not-in-family White Female United-States 0 -64 0.7111111 0.0468274839 0.5625 0 0 0.2020202 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -22 0.244444445 0.251980036 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Unmarried White Female United-States 0 -27 0.3 0.1912252 0.1875 0 0 0.656565666 Private 5th-6th Never-married Priv-house-serv Not-in-family White Female England 0 -36 0.4 0.09918334 0.625 0 0 0.6060606 State-gov Some-college Divorced Transport-moving Not-in-family White Male United-States 0 -27 0.3 0.0942295 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 -52 0.5777778 0.07608178 0.625 0 0 0.4040404 Private Some-college Widowed Sales Not-in-family White Female United-States 0 -57 0.6333333 0.177912787 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -23 0.25555557 0.17256695 0.625 0 0 0.24242425 Private Some-college Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male Vietnam 0 -29 0.322222233 0.09599146 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.189837039 0.5625 0 0 0.8080808 Private HS-grad Never-married Transport-moving Not-in-family Black Male United-States 0 -38 0.422222227 0.256308824 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -50 0.5555556 0.1376718 0.5625 0 0 0.8484849 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -50 0.5555556 0.129455343 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -51 0.566666663 0.134036735 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -17 0.188888893 0.041650027 0.375 0 0 0.4040404 Self-emp-inc 10th Never-married Craft-repair Own-child White Male United-States 0 -25 0.2777778 0.141506225 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Handlers-cleaners Not-in-family White Female Mexico 0 -19 0.211111113 0.12618804 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.0218568668 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.09467807 0.625 0.14084141 0 0.6060606 Private Some-college Separated Sales Not-in-family White Male United-States 1 -39 0.433333337 0.0589719862 0.875 0.068490684 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -18 0.2 0.0535076 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Own-child White Male Mexico 0 -27 0.3 0.14320825 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Own-child White Female United-States 0 -39 0.433333337 0.0219909 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Farming-fishing Not-in-family White Male United-States 0 -44 0.4888889 0.08450231 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -19 0.211111113 0.148088008 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -32 0.355555564 0.1391583 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Own-child White Male United-States 0 -48 0.533333361 0.06822837 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.019826835 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -65 0.722222269 0.05870796 0.4375 0 0 0.2020202 Private 11th Widowed Sales Other-relative White Female United-States 0 -57 0.6333333 0.0984054059 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.114045553 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Unmarried Black Female Haiti 0 -46 0.51111114 0.0931969658 0.25 0 0.379017442 0.4040404 Private 7th-8th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 -27 0.3 0.01988476 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -29 0.322222233 0.2584655 0.625 0 0.3409091 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -21 0.233333334 0.166413531 0.5625 0 0 0.25252524 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -20 0.222222224 0.1353582 0.625 0 0 0.121212125 ? Some-college Never-married ? Own-child White Female United-States 0 -51 0.566666663 0.118531965 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -35 0.3888889 0.127570122 0.625 0 0.399449021 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.180278912 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -30 0.333333343 0.123206973 0.625 0.1502415 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -65 0.722222269 0.164246768 0.5625 0 0 0.151515156 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -20 0.222222224 0.0293573476 0.5625 0 0 0.353535354 ? HS-grad Married-spouse-absent ? Not-in-family White Female United-States 0 -47 0.5222222 0.0211078972 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -41 0.455555558 0.137860388 0.5625 0.0217402168 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male Japan 0 -17 0.188888893 0.04926568 0.3125 0 0 0.161616161 Private 9th Never-married Craft-repair Own-child White Female United-States 0 -38 0.422222227 0.146954447 0.1875 0 0 0.4040404 Local-gov 5th-6th Married-civ-spouse Handlers-cleaners Other-relative White Male Mexico 0 -38 0.422222227 0.150357813 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.06285357 0.5625 0 0 0.04040404 Self-emp-not-inc HS-grad Never-married Sales Other-relative White Female United-States 0 -24 0.266666681 0.142991379 0.5625 0 0 0.3838384 ? HS-grad Separated ? Not-in-family White Female United-States 0 -52 0.5777778 0.126190722 0.375 0 0 0.414141417 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -46 0.51111114 0.148737967 0.625 0 0 0.5858586 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.142358929 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -56 0.622222245 0.09038496 0.875 0 0 0.5050505 Private Masters Never-married Sales Not-in-family White Male United-States 0 -37 0.411111116 0.146998227 0.4375 0 0 0.3030303 Self-emp-not-inc 11th Divorced Prof-specialty Unmarried Black Female United-States 0 -59 0.655555546 0.04763236 0.8125 0 0 0.5555556 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 -19 0.211111113 0.230607435 0.4375 0 0.488751143 0.5555556 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Own-child White Male United-States 0 -31 0.344444454 0.15984118 0.3125 0 0 0.454545468 Private 9th Never-married Craft-repair Not-in-family Other Male United-States 0 -22 0.244444445 0.242310092 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family Asian-Pac-Islander Male Philippines 0 -48 0.533333361 0.122420281 1 0 0 0.6060606 Self-emp-not-inc Doctorate Never-married Prof-specialty Unmarried White Female United-States 1 -63 0.7 0.179901734 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.1496735 0.5625 0.07298073 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -53 0.5888889 0.03713802 0.5625 0 0 0.1010101 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -38 0.422222227 0.148337215 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male ? 1 -39 0.433333337 0.06807615 0.75 0 0 0.24242425 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -59 0.655555546 0.0470692851 0.9375 0 0 0.5050505 Private Prof-school Married-spouse-absent Prof-specialty Unmarried White Male United-States 0 -45 0.5 0.135465965 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -39 0.433333337 0.110953353 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -60 0.6666667 0.08718702 0.5625 0 0 0.353535354 State-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.0221168511 0.8125 0 0 0.565656543 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -31 0.344444454 0.1347857 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -61 0.677777767 0.147627309 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -66 0.733333349 0.1271916 0.8125 0 0 0.24242425 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -26 0.2888889 0.183651969 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Not-in-family Asian-Pac-Islander Male South 0 -60 0.6666667 0.226434216 0.9375 0 0.5544077 0.8080808 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -68 0.75555557 0.128839061 0.25 0 0 0.151515156 ? 7th-8th Widowed ? Not-in-family White Female United-States 0 -32 0.355555564 0.118666671 0.625 0 0 0.6060606 Private Some-college Divorced Exec-managerial Other-relative White Male United-States 0 -25 0.2777778 0.133176625 0.8125 0 0 0.2020202 Local-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -43 0.477777779 0.0975129753 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male ? 0 -26 0.2888889 0.089831315 0.8125 0 0 0.444444448 ? Bachelors Never-married ? Own-child White Male United-States 0 -55 0.6111111 0.13295503 0.875 1 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -66 0.733333349 0.0579307 0.375 0 0 0.111111112 Private 10th Widowed Transport-moving Not-in-family White Female United-States 0 -31 0.344444454 0.154153854 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.126230463 0.1875 0 0 0.5050505 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male ? 0 -58 0.644444466 0.07607235 0.9375 0.2782828 0 0.4040404 Self-emp-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 -56 0.622222245 0.06624953 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 -22 0.244444445 0.08700179 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Male United-States 0 -46 0.51111114 0.212974966 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -33 0.366666675 0.152642444 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -26 0.2888889 0.121832959 0.875 0 0 0.3030303 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -42 0.466666669 0.0466981679 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -45 0.5 0.143880442 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -43 0.477777779 0.132953689 0.625 0 0 0.0606060624 Private Some-college Married-civ-spouse Prof-specialty Wife Other Female Puerto-Rico 0 -19 0.211111113 0.150634646 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male ? 0 -27 0.3 0.121178955 0.8125 0 0 1 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -51 0.566666663 0.228937745 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.07607976 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -43 0.477777779 0.284121782 0.625 0.07298073 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male Mexico 1 -38 0.422222227 0.126623809 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -44 0.4888889 0.0520729721 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.156224981 0.5625 0 0 0.646464646 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -37 0.411111116 0.02499419 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Philippines 0 -29 0.322222233 0.05346988 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -53 0.5888889 0.0902287 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -42 0.466666669 0.119846709 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-spouse-absent Exec-managerial Not-in-family White Male Poland 0 -80 0.8888889 0.116850153 0.625 0 0 0.2020202 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -61 0.677777767 0.123495914 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -55 0.6111111 0.09967569 0.625 0.0501305 0 0.5252525 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.195287287 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -23 0.25555557 0.04194638 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -48 0.533333361 0.0743965954 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.199206576 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -71 0.788888931 0.06739588 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -49 0.544444442 0.131313637 0.4375 0 0 0.0606060624 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 -39 0.433333337 0.153294429 0.5625 0 0 0.5050505 Federal-gov HS-grad Never-married Armed-Forces Not-in-family White Male United-States 0 -22 0.244444445 0.0792117 0.8125 0 0 0.25252524 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -67 0.7444445 0.0301568322 0.8125 0 0 0.4040404 Federal-gov Bachelors Widowed Adm-clerical Not-in-family White Female United-States 0 -18 0.2 0.119652055 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child White Female United-States 0 -38 0.422222227 0.116232522 0.8125 0 0.4242424 0.545454562 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.137052149 0.25 0 0 0.454545468 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -50 0.5555556 0.103677839 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -56 0.622222245 0.0570982136 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Farming-fishing Wife White Female United-States 0 -23 0.25555557 0.105830453 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -26 0.2888889 0.115030259 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.1892834 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -44 0.4888889 0.137240067 0.8125 0.105201051 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 1 -27 0.3 0.112753041 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Farming-fishing Own-child White Female Mexico 0 -40 0.444444448 0.126918152 0.625 0.07298073 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -43 0.477777779 0.261903226 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -31 0.344444454 0.119214259 0.625 0 0 0.353535354 State-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -57 0.6333333 0.134919733 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -25 0.2777778 0.107967578 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -22 0.244444445 0.159414843 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Other-service Own-child Black Female United-States 0 -20 0.222222224 0.1668978 0.6875 0 0 0.353535354 Local-gov Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -27 0.3 0.180052608 0.5625 0.0346403457 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -39 0.433333337 0.188246161 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female Mexico 0 -27 0.3 0.1890059 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -41 0.455555558 0.167310014 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Transport-moving Own-child White Male United-States 0 -31 0.344444454 0.152551517 0.8125 0 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -41 0.455555558 0.148487419 0.75 0 0 0.2020202 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.0729552358 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -29 0.322222233 0.0991819948 0.75 0 0 0.4040404 State-gov Assoc-acdm Never-married Prof-specialty Not-in-family Black Male United-States 1 -22 0.244444445 0.0743386745 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Own-child White Male United-States 0 -62 0.6888889 0.07682335 0.25 0 0 0.9191919 Private 7th-8th Married-civ-spouse Protective-serv Husband White Male United-States 0 -29 0.322222233 0.020988008 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Exec-managerial Not-in-family Other Female United-States 0 -44 0.4888889 0.0713017061 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -32 0.355555564 0.2708208 0.8125 0 0 0.02020202 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 -19 0.211111113 0.286553234 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -20 0.222222224 0.092476286 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Unmarried White Female United-States 0 -65 0.722222269 0.220037654 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -24 0.266666681 0.185284629 0.5625 0 0 0.363636374 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 -37 0.411111116 0.07577061 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.117525704 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Tech-support Not-in-family Black Female United-States 0 -38 0.422222227 0.077345334 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Wife White Female United-States 1 -28 0.311111122 0.09287906 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 -33 0.366666675 0.103152484 0.5625 0.04416044 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -32 0.355555564 0.0908503756 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -38 0.422222227 0.130541086 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.160188735 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 -42 0.466666669 0.0684263855 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.111082 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -41 0.455555558 0.11733038 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Unmarried White Male United-States 0 -47 0.5222222 0.0243610684 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.09703679 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.121814772 0.625 0 0 0.08080808 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 -54 0.6 0.149467409 0.625 0 0 0.5050505 Private Some-college Widowed Craft-repair Unmarried White Female United-States 0 -40 0.444444448 0.01811269 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -21 0.233333334 0.236467183 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.06553895 0.8125 0 0 0.25252524 Private Bachelors Divorced Craft-repair Unmarried White Female United-States 0 -30 0.333333343 0.124622062 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.122946315 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.145075962 0.5625 0 0 0.373737365 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -37 0.411111116 0.125569731 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 1 -41 0.455555558 0.1467773 0.3125 0 0 0.4040404 ? 9th Married-civ-spouse ? Wife Asian-Pac-Islander Female Hong 0 -52 0.5777778 0.233492851 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Own-child White Female United-States 0 -57 0.6333333 0.278137416 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -48 0.533333361 0.112486318 0.625 0 0 0.4848485 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -58 0.644444466 0.212836891 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.14565587 0.3125 0 0 0.5050505 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.230237663 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -30 0.333333343 0.114393771 0.5625 0 0 0.25252524 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -26 0.2888889 0.135165572 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male Outlying-US(Guam-USVI-etc) 0 -46 0.51111114 0.307775617 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -26 0.2888889 0.185946032 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -50 0.5555556 0.0651018247 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Prof-specialty Unmarried Black Female United-States 0 -22 0.244444445 0.252112716 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -36 0.4 0.07476098 0.875 0 0 0.4040404 Private Masters Widowed Tech-support Unmarried Asian-Pac-Islander Female India 0 -30 0.333333343 0.0358892865 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -58 0.644444466 0.07046046 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.204294458 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child White Male United-States 0 -72 0.8 0.200760424 0.6875 0.06723067 0 0.25252524 Private Assoc-voc Separated Other-service Unmarried White Female United-States 0 -19 0.211111113 0.214737609 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.252627969 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Wife White Female Mexico 0 -20 0.222222224 0.156798154 0.5625 0 0 0.25252524 ? HS-grad Never-married ? Own-child Black Female United-States 0 -30 0.333333343 0.142015427 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.143964633 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Divorced Other-service Unmarried White Female United-States 0 -51 0.566666663 0.1377021 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.214813054 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -24 0.266666681 0.159887657 0.625 0 0 0.424242437 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -44 0.4888889 0.123006932 0.875 0 0 0.24242425 Private Masters Divorced Sales Not-in-family White Male Iran 0 -43 0.477777779 0.0975129753 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.07891534 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -51 0.566666663 0.160052 0.5625 0.07298073 0 0.5050505 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -41 0.455555558 0.115544841 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.1113366 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Other Female United-States 0 -39 0.433333337 0.028413726 0.5625 0.0346403457 0 0.2020202 State-gov HS-grad Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female United-States 0 -54 0.6 0.191925 0.375 0 0 0.434343427 Private 10th Separated Sales Unmarried White Female Italy 0 -62 0.6888889 0.06472599 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -45 0.5 0.133871034 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.153489083 0.5625 0 0 0.353535354 Private HS-grad Never-married Exec-managerial Own-child Black Female Jamaica 0 -32 0.355555564 0.263940662 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.124179557 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Other-service Not-in-family White Female United-States 0 -84 0.933333337 0.09149225 0.6875 0 0 0.141414136 Local-gov Assoc-voc Widowed Adm-clerical Not-in-family White Female United-States 0 -46 0.51111114 0.131135821 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -67 0.7444445 0.230466664 0.875 0.0200902 0 0.4040404 Local-gov Masters Divorced Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.045273643 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.138176948 0.6875 0 0 0.5555556 Private Assoc-voc Never-married Exec-managerial Not-in-family White Male United-States 1 -23 0.25555557 0.2926285 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -63 0.7 0.07418983 0.5625 0 0 0.5555556 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -55 0.6111111 0.08310203 0.5625 0 0.459366381 0.4040404 ? HS-grad Separated ? Not-in-family Black Female United-States 0 -42 0.466666669 0.272493869 0.9375 0 0 0.4040404 State-gov Prof-school Divorced Prof-specialty Unmarried White Female United-States 0 -17 0.188888893 0.06699109 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child Amer-Indian-Eskimo Female United-States 0 -60 0.6666667 0.11470966 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.134628087 0.5 0 0 0.4040404 Private 12th Divorced Transport-moving Own-child White Male United-States 0 -28 0.311111122 0.0471703149 0.25 0 0 0.4040404 Private 7th-8th Never-married Adm-clerical Own-child White Male Portugal 0 -31 0.344444454 0.264939517 0.3125 0 0 0.4848485 Private 9th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -65 0.722222269 0.167739049 0.8125 0.106051058 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -31 0.344444454 0.04891881 0.8125 0.14084141 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -61 0.677777767 0.150287777 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family Black Female United-States 0 -43 0.477777779 0.233022049 0.9375 0 0 0.5050505 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.131689459 0.625 0 0 0.4949495 State-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -39 0.433333337 0.173732832 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -37 0.411111116 0.181382835 0.625 0 0 0.272727281 Local-gov Some-college Married-spouse-absent Adm-clerical Unmarried Black Female United-States 0 -47 0.5222222 0.09251265 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 -45 0.5 0.15693152 0.625 0 0 0.656565666 Federal-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -30 0.333333343 0.0520413145 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.110587627 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Never-married Prof-specialty Own-child White Male United-States 0 -49 0.544444442 0.103411794 0.625 0.14084141 0 0.444444448 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 1 -51 0.566666663 0.0180722773 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.126689136 0.8125 0 0 0.727272749 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -48 0.533333361 0.24888581 0.8125 0 0 0.25252524 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -20 0.222222224 0.07476098 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -32 0.355555564 0.138176948 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.110385567 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried Black Female United-States 0 -19 0.211111113 0.241550341 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -50 0.5555556 0.124842308 0.875 0 0 0.353535354 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 0 -33 0.366666675 0.226348668 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.03166353 0.8125 0 0 0.2020202 ? Bachelors Never-married ? Own-child White Male United-States 0 -49 0.544444442 0.100995824 0.5625 0 0.430670351 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.04007261 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -23 0.25555557 0.02219296 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -44 0.4888889 0.07402952 1 0.1502415 0 0.323232323 Private Doctorate Married-civ-spouse Exec-managerial Wife White Female United-States 1 -24 0.266666681 0.134407178 0.6875 0 0 0.05050505 Private Assoc-voc Never-married Sales Unmarried White Male United-States 0 -28 0.311111122 0.0614930242 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 -56 0.622222245 0.06692171 0.5625 0 0.371212125 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -38 0.422222227 0.163371846 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -20 0.222222224 0.19289422 0.625 0.0217602178 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -82 0.9111111 0.08949253 0.5625 0 1 0.181818187 Private HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 -52 0.5777778 0.0151060317 0.8125 0 0 0.6060606 Federal-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -32 0.355555564 0.161075771 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 -37 0.411111116 0.114880063 0.6875 0 0 0.323232323 Private Assoc-voc Separated Prof-specialty Unmarried White Female United-States 0 -36 0.4 0.116886519 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.192648381 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -30 0.333333343 0.04909191 0.5625 0.03411034 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Own-child Asian-Pac-Islander Male United-States 0 -49 0.544444442 0.109940358 0.5625 0 0 0.565656543 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -40 0.444444448 0.111622177 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Exec-managerial Unmarried White Female United-States 0 -42 0.466666669 0.04718446 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.124371514 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -39 0.433333337 0.0942315161 0.5625 0 0 0.8181818 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -32 0.355555564 0.133501947 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 -22 0.244444445 0.09869974 0.4375 0 0 0.5050505 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 -53 0.5888889 0.0891113058 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.128588513 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -17 0.188888893 0.159810871 0.375 0 0 0.3030303 Never-worked 10th Never-married ? Own-child White Male United-States 0 -44 0.4888889 0.509096444 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -52 0.5777778 0.08575104 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.204957888 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -34 0.377777785 0.124564812 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -27 0.3 0.180499837 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.126878411 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -39 0.433333337 0.148890853 0.875 0.07688077 0 0.3838384 State-gov Masters Married-civ-spouse Prof-specialty Other-relative Other Female United-States 1 -26 0.2888889 0.2295318 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -48 0.533333361 0.0948215351 0.875 0 0.43663913 0.3838384 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 -57 0.6333333 0.113875151 0.5625 0 0 0.282828271 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -36 0.4 0.101767018 0.6875 0 0 0.4848485 Self-emp-not-inc Assoc-voc Separated Exec-managerial Not-in-family White Male United-States 0 -27 0.3 0.08279221 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -17 0.188888893 0.101798676 0.4375 0 0 0.151515156 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -30 0.333333343 0.09203916 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -37 0.411111116 0.119407564 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Adm-clerical Wife Black Female United-States 1 -31 0.344444454 0.08622319 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Sales Own-child White Female United-States 0 -23 0.25555557 0.134921074 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.168622047 0.375 0 0 0.454545468 Private 10th Never-married Craft-repair Other-relative White Male United-States 0 -58 0.644444466 0.128691554 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.0187619776 0.5625 0 0 0.08080808 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -44 0.4888889 0.352584541 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -39 0.433333337 0.173216239 0.8125 0 0.143480256 0.4040404 Federal-gov Bachelors Divorced Tech-support Unmarried Black Female United-States 0 -59 0.655555546 0.117776938 0.5625 0 0.3409091 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.13203229 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 -45 0.5 0.13502413 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -20 0.222222224 0.237889 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -35 0.3888889 0.150109291 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -50 0.5555556 0.149383888 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband Black Male United-States 0 -56 0.622222245 0.132763073 0.5625 0 0 0.282828271 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -48 0.533333361 0.107913695 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -58 0.644444466 0.185166076 0.875 0 0 0.151515156 Self-emp-not-inc Masters Widowed Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.23469983 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.07589588 0.625 0 0 0.121212125 Private Some-college Never-married Sales Own-child White Female United-States 0 -48 0.533333361 0.232929111 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -33 0.366666675 0.07097033 0.5625 0 0 0.7070707 Private HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 -48 0.533333361 0.232373446 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female Mexico 0 -55 0.6111111 0.131560817 0.5625 0.0220202189 0 0.353535354 Private HS-grad Widowed Other-service Not-in-family White Female Italy 0 -40 0.444444448 0.07325698 0.6875 0 0 0.4040404 Local-gov Assoc-voc Never-married Exec-managerial Unmarried Amer-Indian-Eskimo Female United-States 0 -50 0.5555556 0.09296258 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -52 0.5777778 0.117888071 0.375 0 0 0.353535354 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.127684623 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -55 0.6111111 0.09524384 0.375 0.07688077 0 0.5050505 Self-emp-not-inc 10th Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.125300989 0.9375 0 0 0.3030303 Self-emp-not-inc Prof-school Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.111291468 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Unmarried Asian-Pac-Islander Female Philippines 1 -22 0.244444445 0.07075008 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -44 0.4888889 0.155373633 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.232844234 0.5625 0 0.323232323 0.3838384 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.1674299 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -55 0.6111111 0.294240952 0.875 0.14084141 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 1 -35 0.3888889 0.134809941 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.2684877 0.4375 0 0 0.4040404 Private 11th Widowed Machine-op-inspct Not-in-family White Female United-States 0 -43 0.477777779 0.0768118948 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -29 0.322222233 0.11419373 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 -56 0.622222245 0.23159416 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 -33 0.366666675 0.109497845 0.8125 1 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.196387842 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.0917098 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Unmarried White Female United-States 0 -60 0.6666667 0.253338546 0.5625 0.1502415 0 0.151515156 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -48 0.533333361 0.203819618 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Other-service Husband White Male United-States 0 -65 0.722222269 0.161760077 0.4375 0 0 0.353535354 Local-gov 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.130094528 0.5625 0 0.323232323 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -42 0.466666669 0.167099863 0.5625 0 0.399449021 0.434343427 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -44 0.4888889 0.0803398639 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -73 0.811111152 0.202332452 0.625 0 0 0.0606060624 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -21 0.233333334 0.05580031 0.625 0 0 0.5050505 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -32 0.355555564 0.1085421 0.5625 0 0.43663913 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -43 0.477777779 0.193309784 0.875 0 0 0.353535354 Federal-gov Masters Married-civ-spouse Protective-serv Husband White Male United-States 1 -21 0.233333334 0.440586537 0.5625 0 0 0.323232323 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 -30 0.333333343 0.170165792 0.625 0 0 0.2020202 Private Some-college Separated Transport-moving Not-in-family White Male United-States 0 -54 0.6 0.115796745 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -19 0.211111113 0.148003817 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 -55 0.6111111 0.103581525 0.625 0 0 0.373737365 State-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -20 0.222222224 0.04084246 0.625 0 0 0.282828271 Private Some-college Never-married Sales Own-child White Female United-States 0 -53 0.5888889 0.06470107 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Greece 0 -51 0.566666663 0.11154674 0.875 0 0 0.5555556 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -33 0.366666675 0.107690081 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -62 0.6888889 0.074483484 0.625 0 0 0.4040404 Private Some-college Widowed Priv-house-serv Unmarried White Female United-States 0 -24 0.266666681 0.09635719 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Other-service Own-child White Male United-States 0 -17 0.188888893 0.2785449 0.3125 0 0 0.4040404 Self-emp-inc 9th Never-married Sales Own-child White Female United-States 0 -26 0.2888889 0.09271741 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.268693775 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.209983811 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Exec-managerial Wife White Female United-States 0 -58 0.644444466 0.0664946958 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.09487002 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -72 0.8 0.0655376 0.5625 0.0234602336 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Unmarried White Male ? 0 -26 0.2888889 0.237601414 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -45 0.5 0.0183093622 0.5625 0 0 0.3838384 ? HS-grad Widowed ? Unmarried White Female United-States 0 -72 0.8 0.159781918 0.6875 0 0 0.3030303 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 -60 0.6666667 0.0959746242 0.625 0.1502415 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.141653061 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male Guatemala 0 -38 0.422222227 0.131028056 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -37 0.411111116 0.0179820228 0.625 0 0.3409091 0.444444448 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.142137334 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -38 0.422222227 0.0726804361 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -29 0.322222233 0.09165255 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -19 0.211111113 0.124426737 0.5625 0 0.395087242 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.144600451 0.8125 0 0 0.25252524 Private Bachelors Never-married Handlers-cleaners Other-relative White Male United-States 0 -70 0.7777778 0.0993854 0.8125 0 0 0.07070707 ? Bachelors Divorced ? Not-in-family White Female United-States 0 -40 0.444444448 0.06317282 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.166379854 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Own-child White Male United-States 0 -43 0.477777779 0.191555232 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband Black Male United-States 0 -29 0.322222233 0.149509162 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -25 0.2777778 0.228972092 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 0 -29 0.322222233 0.108504385 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -60 0.6666667 0.150666967 0.125 0 0 0.3838384 Private 1st-4th Divorced Craft-repair Not-in-family Other Male Dominican-Republic 0 -31 0.344444454 0.15794383 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 -51 0.566666663 0.06533621 0.25 0 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -18 0.2 0.163409576 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -36 0.4 0.117826775 0.8125 0 0 0.2020202 Private Bachelors Divorced Tech-support Unmarried White Male United-States 0 -35 0.3888889 0.107846342 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 -48 0.533333361 0.130514145 0.8125 0 0 0.3838384 Private Bachelors Divorced Adm-clerical Own-child White Male United-States 1 -78 0.8666667 0.0401312038 0.25 0 0 0.25252524 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -72 0.8 0.106359854 0.8125 0 0 0.171717167 Private Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 -24 0.266666681 0.207586691 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -58 0.644444466 0.106759258 0.4375 0 0 0.161616161 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -36 0.4 0.135898381 0.4375 0.135501355 0 0.4040404 Private 11th Never-married Protective-serv Not-in-family Black Male United-States 1 -48 0.533333361 0.222582936 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -28 0.311111122 0.123982884 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.08310338 0.875 0 0 0.4040404 Private Masters Never-married Other-service Own-child White Female United-States 0 -29 0.322222233 0.222355291 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -47 0.5222222 0.1850334 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband Black Male Jamaica 0 -50 0.5555556 0.08733924 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 -35 0.3888889 0.138467908 0.1875 0 0 0.4040404 Federal-gov 5th-6th Never-married Craft-repair Not-in-family White Male Mexico 0 -17 0.188888893 0.220331311 0.4375 0 0 0.2020202 Private 11th Never-married Transport-moving Own-child White Male United-States 0 -41 0.455555558 0.152146056 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -37 0.411111116 0.151468471 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.0186993387 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband Amer-Indian-Eskimo Male United-States 0 -56 0.622222245 0.049628716 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Portugal 0 -23 0.25555557 0.07237263 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.0160779413 0.75 0 0 0.323232323 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 -79 0.8777778 0.208305359 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.3164696 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 -55 0.6111111 0.19278577 0.4375 0 0 0.2020202 Private 11th Divorced Sales Own-child White Female United-States 0 -59 0.655555546 0.125484869 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -22 0.244444445 0.0761511549 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -19 0.211111113 0.058024995 0.4375 0 0 0.1919192 Private 11th Never-married Sales Own-child Asian-Pac-Islander Female Philippines 0 -41 0.455555558 0.176491633 0.1875 0 0 0.353535354 Private 5th-6th Married-spouse-absent Farming-fishing Not-in-family White Male Mexico 0 -32 0.355555564 0.188071713 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male Italy 0 -67 0.7444445 0.127232686 0.25 0.02414024 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -45 0.5 0.123786211 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -61 0.677777767 0.228569314 0.1875 0 0 0.454545468 Private 5th-6th Married-civ-spouse Farming-fishing Other-relative White Female Mexico 0 -34 0.377777785 0.193800792 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -43 0.477777779 0.06681664 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.200342163 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -35 0.3888889 0.07643337 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -65 0.722222269 0.137429327 0.5625 0 0 0.2020202 Private HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 -24 0.266666681 0.0292226411 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male England 1 -37 0.411111116 0.06683685 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -34 0.377777785 0.2113073 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -42 0.466666669 0.06713724 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -18 0.2 0.114329115 0.25 0 0 0.4040404 Private 7th-8th Never-married Other-service Own-child White Female United-States 0 -43 0.477777779 0.0134127662 0.625 0 0 0.151515156 Federal-gov Some-college Widowed Exec-managerial Unmarried Amer-Indian-Eskimo Female United-States 0 -31 0.344444454 0.07647513 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 1 -19 0.211111113 0.151034042 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -40 0.444444448 0.0925214142 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male China 0 -32 0.355555564 0.177751139 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -47 0.5222222 0.189127132 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.137299329 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -46 0.51111114 0.0421268865 1 0 0 0.353535354 Self-emp-inc Doctorate Separated Prof-specialty Not-in-family White Male United-States 0 -40 0.444444448 0.132917985 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.06279025 0.8125 0 0 0.353535354 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.126328126 0.6875 0 0 0.363636374 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.04158604 0.1875 0 0 0.353535354 State-gov 5th-6th Never-married Transport-moving Not-in-family White Male United-States 0 -21 0.233333334 0.12571387 0.375 0 0 0.4040404 Private 10th Separated Machine-op-inspct Own-child White Male United-States 0 -40 0.444444448 0.116737671 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 -53 0.5888889 0.16624178 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.285601526 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child White Male United-States 0 -53 0.5888889 0.196507052 0.625 0 0 0.727272749 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -58 0.644444466 0.0706840754 0.3125 0 0 0.6060606 Private 9th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -51 0.566666663 0.0575353354 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.144294664 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -35 0.3888889 0.187668264 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.0184649471 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child Amer-Indian-Eskimo Male United-States 0 -31 0.344444454 0.0965794548 0.625 0 0 0.353535354 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.186843857 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Unmarried White Female United-States 0 -39 0.433333337 0.2268417 0.875 0 0 0.5555556 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.12400578 0.9375 0.1502415 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 -51 0.566666663 0.0502860844 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.266063631 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Own-child White Male United-States 0 -32 0.355555564 0.115319207 0.625 0 0 0.4848485 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 -56 0.622222245 0.08174149 0.8125 0 0 0.323232323 Private Bachelors Divorced Other-service Not-in-family White Female United-States 0 -35 0.3888889 0.2756103 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Protective-serv Not-in-family White Male United-States 0 -63 0.7 0.1811572 0.5 0 0 0.4040404 Private 12th Widowed Sales Unmarried White Female United-States 0 -61 0.677777767 0.09177715 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.09518591 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -52 0.5777778 0.0727976263 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.05537127 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -33 0.366666675 0.270048946 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.207777977 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 0 -35 0.3888889 0.125986651 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Female United-States 1 -38 0.422222227 0.0510714278 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 0 -23 0.25555557 0.27840212 0.8125 0 0 0.6060606 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.240160167 0.6875 0 0 0.6060606 Private Assoc-voc Divorced Tech-support Not-in-family White Male United-States 0 -20 0.222222224 0.150744423 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -19 0.211111113 0.1073028 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -47 0.5222222 0.168498129 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -59 0.655555546 0.0913427249 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.126183987 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -36 0.4 0.0728111 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -27 0.3 0.1720719 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Other-relative White Male Mexico 0 -24 0.266666681 0.0461889729 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.10504511 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child Black Female Jamaica 0 -22 0.244444445 0.1778818 0.625 0 0 0.3939394 State-gov Some-college Never-married Other-service Other-relative Black Male Haiti 0 -37 0.411111116 0.1130036 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.151814 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.134705544 0.5625 0 0 0.25252524 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -55 0.6111111 0.134609908 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -29 0.322222233 0.127813265 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Wife White Female United-States 0 -32 0.355555564 0.13002044 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -66 0.733333349 0.15007022 0.625 0 0 0.353535354 ? Some-college Divorced ? Other-relative White Female United-States 0 -47 0.5222222 0.109513342 0.625 0 0 0.454545468 Local-gov Some-college Married-spouse-absent Craft-repair Other-relative White Male United-States 0 -23 0.25555557 0.140651509 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -50 0.5555556 0.08095211 0.875 0 0 0.454545468 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -40 0.444444448 0.0183484256 0.5625 0 0 0.8484849 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -51 0.566666663 0.234456688 0.5625 0 0.365013778 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -34 0.377777785 0.124631494 0.5625 0 0.383149683 0.454545468 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.208254173 0.8125 0 0 0.4040404 Private Bachelors Never-married Protective-serv Not-in-family White Female United-States 0 -52 0.5777778 0.171269715 1 0 0.4331956 0.7070707 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male Germany 1 -39 0.433333337 0.2264598 0.5625 0.03103031 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.1621184 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -36 0.4 0.2773595 0.8125 0 0 0.353535354 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 1 -25 0.2777778 0.120456927 0.8125 0 0 0.151515156 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -42 0.466666669 0.0917199 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -35 0.3888889 0.163944349 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male Germany 0 -43 0.477777779 0.1738049 0.875 0.07688077 0 0.535353541 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.110963456 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.0162894316 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.112800859 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -44 0.4888889 0.07200084 0.875 0 0 0.444444448 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.0360320732 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.226108223 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.1421306 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Not-in-family White Male United-States 1 -30 0.333333343 0.109788142 0.8125 0 0 0.5252525 Private Bachelors Never-married Exec-managerial Own-child Asian-Pac-Islander Female Taiwan 0 -36 0.4 0.05196049 0.8125 0.1502415 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.0454184525 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -25 0.2777778 0.30884856 0.125 0 0 0.969697 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -26 0.2888889 0.128287435 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -20 0.222222224 0.131616041 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child Black Female United-States 0 -20 0.222222224 0.146082222 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Own-child White Male United-States 0 -70 0.7777778 0.22631231 0.1875 0 0 0.2020202 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 0 -26 0.2888889 0.112716 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -24 0.266666681 0.162899032 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 -48 0.533333361 0.08479261 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -62 0.6888889 0.183342144 0.5625 0 0 1 Private HS-grad Divorced Priv-house-serv Unmarried Black Female United-States 0 -48 0.533333361 0.118017383 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -52 0.5777778 0.121367544 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -25 0.2777778 0.0256549288 0.8125 0 0 0.444444448 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -58 0.644444466 0.208852947 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -40 0.444444448 0.07993911 0.8125 0 0 0.454545468 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -29 0.322222233 0.07608448 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -45 0.5 0.080912374 0.25 0 0 0.5252525 Self-emp-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male ? 0 -19 0.211111113 0.029593084 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Other-relative White Female United-States 0 -37 0.411111116 0.141737252 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -23 0.25555557 0.119029708 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male Puerto-Rico 0 -31 0.344444454 0.07635456 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -64 0.7111111 0.0498321243 0.25 0 0 0.2020202 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.133314028 0.625 0 0 0.161616161 Local-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -32 0.355555564 0.130184114 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -49 0.544444442 0.150428534 0.625 0 0 0.444444448 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.0335076675 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 1 -19 0.211111113 0.142488241 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 -45 0.5 0.135963038 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.216974422 0.5 0.1502415 0 0.7070707 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 1 -55 0.6111111 0.106891267 0.625 0 0.5369605 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family Black Female ? 0 -46 0.51111114 0.185642943 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Divorced Other-service Unmarried Asian-Pac-Islander Female South 1 -19 0.211111113 0.139151558 0.625 0 0 0.161616161 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -29 0.322222233 0.0604921542 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female Scotland 0 -25 0.2777778 0.105642535 0.5625 0 0 0.353535354 State-gov HS-grad Married-civ-spouse Protective-serv Own-child White Male United-States 0 -37 0.411111116 0.109445311 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.1383487 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 -28 0.311111122 0.252786249 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Philippines 0 -36 0.4 0.6270256 0.625 0.06497065 0 0.565656543 Federal-gov Some-college Separated Adm-clerical Unmarried Black Female United-States 0 -32 0.355555564 0.08614169 0.625 0 0 0.353535354 Private Some-college Never-married Exec-managerial Unmarried Black Female United-States 0 -34 0.377777785 0.1675444 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -34 0.377777785 0.126689136 0.5625 0 0 0.363636374 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -20 0.222222224 0.146029681 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -27 0.3 0.0766953751 0.875 0 0 0.4040404 Self-emp-inc Masters Never-married Transport-moving Own-child White Male United-States 0 -36 0.4 0.231057346 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -35 0.3888889 0.189240292 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -37 0.411111116 0.0283180848 0.5625 0 0 0.353535354 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -32 0.355555564 0.208467677 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.11019294 0.875 0 0 0.2020202 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -52 0.5777778 0.151005089 0.5625 0 0 0.4848485 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -50 0.5555556 0.227845266 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.163247928 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -25 0.2777778 0.0547489226 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.163916737 0.0625 0 0 0.5050505 Private Preschool Never-married Farming-fishing Not-in-family White Male Mexico 0 -31 0.344444454 0.146697834 0.5625 0 0 0.323232323 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -31 0.344444454 0.2175651 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -41 0.455555558 0.0230874158 0.6875 0 0 0.4040404 Private Assoc-voc Separated Other-service Not-in-family White Male United-States 0 -47 0.5222222 0.124320321 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -20 0.222222224 0.14196828 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Female United-States 0 -20 0.222222224 0.09609519 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.08871392 0.375 0 0 0.25252524 Private 10th Divorced Machine-op-inspct Not-in-family Black Female United-States 0 -51 0.566666663 0.0503696 0.625 0 0 0.4040404 Local-gov Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.1221603 0.8125 0 0 0.333333343 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -23 0.25555557 0.04210062 0.625 0 0 0.121212125 ? Some-college Never-married ? Not-in-family White Female United-States 0 -48 0.533333361 0.104845069 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -39 0.433333337 0.11781735 0.5625 0.143441439 0 0.4040404 Private HS-grad Separated Exec-managerial Not-in-family White Male United-States 1 -62 0.6888889 0.07640575 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.09916246 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -46 0.51111114 0.139436454 0.8125 0.07688077 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.08285215 0.875 0 0.453856736 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.124387 0.5625 0 0 0.323232323 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -40 0.444444448 0.122877613 0.75 0.1502415 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.06643677 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -30 0.333333343 0.11733038 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -52 0.5777778 0.0833701 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -20 0.222222224 0.251980036 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Other-relative White Female United-States 0 -37 0.411111116 0.142792672 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -65 0.722222269 0.0834947 0.8125 0 0 0.4040404 Private Bachelors Widowed Other-service Not-in-family White Female United-States 0 -40 0.444444448 0.163412258 0.8125 0.046500463 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -60 0.6666667 0.09328587 0.8125 0.07298073 0 0.4848485 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -27 0.3 0.076537095 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male Ireland 0 -62 0.6888889 0.4474734 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -53 0.5888889 0.14704 0.5625 0 0 0.353535354 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -38 0.422222227 0.187617749 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -49 0.544444442 0.212010473 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -21 0.233333334 0.1312456 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -18 0.2 0.269828677 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -25 0.2777778 0.140173972 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Other-relative White Male United-States 0 -36 0.4 0.124265768 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.0792574957 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.109530851 0.625 0 0 0.141414136 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -23 0.25555557 0.248358428 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -63 0.7 0.132682249 0.8125 0 0 0.151515156 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -63 0.7 0.283308148 0.6875 0 0 0.454545468 Self-emp-not-inc Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -62 0.6888889 0.165346652 0.8125 1 0 0.4040404 Self-emp-inc Bachelors Divorced Sales Not-in-family White Male United-States 1 -51 0.566666663 0.186202645 0.75 0.03103031 0 0.3030303 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -76 0.844444454 0.113916911 0.625 0 0 0.3030303 Local-gov Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -50 0.5555556 0.0668866858 0.5625 0.0501305 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.080912374 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.307290673 0.625 0 0 0.454545468 Self-emp-inc Some-college Divorced Sales Own-child White Male United-States 1 -51 0.566666663 0.0721510351 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -42 0.466666669 0.08450231 0.8125 0.046500463 0 0.353535354 Local-gov Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -43 0.477777779 0.0248695873 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.11252404 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -29 0.322222233 0.0361297354 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -41 0.455555558 0.104174234 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -44 0.4888889 0.06886082 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -35 0.3888889 0.0367716141 0.375 0 0.454545438 0.4040404 Private 10th Widowed Other-service Not-in-family Black Female United-States 0 -27 0.3 0.10301777 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.173126653 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -60 0.6666667 0.05000522 0.6875 0 0 0.3030303 Private Assoc-voc Widowed Craft-repair Not-in-family White Female United-States 0 -49 0.544444442 0.100389645 0.625 0.143441439 0 0.454545468 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 1 -33 0.366666675 0.07892881 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.120106019 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.193244457 0.625 0 0 0.3838384 State-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -54 0.6 0.13715519 0.5625 0.07298073 0 0.6060606 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -57 0.6333333 0.119398132 1 0 0 0.353535354 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -30 0.333333343 0.100644238 0.3125 0 0 0.454545468 Private 9th Never-married Craft-repair Own-child White Male United-States 0 -45 0.5 0.068468824 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male Vietnam 0 -41 0.455555558 0.184792936 0.625 0.07298073 0 0.424242437 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -25 0.2777778 0.162338644 0.8125 0 0 0.181818187 Private Bachelors Never-married Other-service Own-child White Male United-States 0 -51 0.566666663 0.228217736 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.141801909 0.1875 0 0 0.4040404 Private 5th-6th Separated Adm-clerical Other-relative White Male El-Salvador 0 -28 0.311111122 0.06447409 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Handlers-cleaners Not-in-family White Male United-States 0 -47 0.5222222 0.119897895 0.375 0 0 0.2020202 ? 10th Married-civ-spouse ? Wife White Female Cuba 0 -53 0.5888889 0.112756409 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Tech-support Not-in-family Amer-Indian-Eskimo Male United-States 0 -31 0.344444454 0.106527559 0.8125 0.135501355 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 -46 0.51111114 0.162951559 0.4375 0.07688077 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband Black Male United-States 1 -25 0.2777778 0.274098217 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -47 0.5222222 0.230188489 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -26 0.2888889 0.161178827 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 0 -30 0.333333343 0.0261654686 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -48 0.533333361 0.0368719734 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.223744109 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Male United-States 0 -32 0.355555564 0.104364172 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.132243112 1 0 0 0.454545468 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 -31 0.344444454 0.1355771 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -43 0.477777779 0.228844792 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Other-service Wife White Female England 1 -26 0.2888889 0.168428078 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 -34 0.377777785 0.214780718 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband Black Male United-States 0 -50 0.5555556 0.08356947 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -30 0.333333343 0.163077518 0.5625 0 0 0.4040404 State-gov HS-grad Separated Adm-clerical Unmarried Black Female United-States 0 -17 0.188888893 0.02291297 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 -35 0.3888889 0.15542078 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Own-child Black Female United-States 0 -29 0.322222233 0.14402996 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.13227275 0.75 0.0406404063 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male El-Salvador 0 -32 0.355555564 0.04187027 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Black Male ? 0 -34 0.377777785 0.0907500163 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 1 -32 0.355555564 0.3472939 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Not-in-family White Female United-States 0 -47 0.5222222 0.08028464 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -40 0.444444448 0.06076763 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -26 0.2888889 0.01915734 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.107389688 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female Ireland 0 -54 0.6 0.212704882 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -53 0.5888889 0.09149292 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.0547125526 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 -43 0.477777779 0.07947774 0.25 0 0 0.4040404 Private 7th-8th Separated Farming-fishing Not-in-family Black Male United-States 0 -25 0.2777778 0.140010983 0.625 0 0 0.2020202 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -39 0.433333337 0.111064486 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.114545316 0.5625 0 0 0.25252524 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -47 0.5222222 0.0754318237 0.5625 0 0 0.343434334 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -45 0.5 0.112235092 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Other-relative Black Female United-States 0 -24 0.266666681 0.041582 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -32 0.355555564 0.162917882 0.375 0 0 0.4040404 Self-emp-not-inc 10th Divorced Craft-repair Not-in-family White Male United-States 0 -25 0.2777778 0.157735035 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -57 0.6333333 0.155518442 0.1875 0 0 0.4040404 Private 5th-6th Separated Machine-op-inspct Not-in-family White Female United-States 0 -28 0.311111122 0.07688935 0.8125 0 0.453856736 0.24242425 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -28 0.311111122 0.149822354 0.5625 0 0 0.5151515 Private HS-grad Married-civ-spouse Sales Husband White Male Cuba 0 -27 0.3 0.106157117 0.8125 0 0 0.5555556 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.134641558 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -74 0.822222233 0.197094381 0.125 0 0 0.4040404 ? 1st-4th Married-civ-spouse ? Husband Black Male United-States 0 -44 0.4888889 0.1055341 0.5625 0 0 0.424242437 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male Japan 0 -27 0.3 0.24888581 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -61 0.677777767 0.152418837 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.239789724 0.4375 0 0 1 Private 11th Never-married Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.127471119 0.3125 0 0 0.24242425 Private 9th Never-married Handlers-cleaners Own-child Black Female United-States 0 -20 0.222222224 0.1061093 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -33 0.366666675 0.0466429368 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Sales Own-child Asian-Pac-Islander Male Philippines 0 -38 0.422222227 0.18383719 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Other-service Not-in-family White Male United-States 0 -31 0.344444454 0.07655864 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 -40 0.444444448 0.149532065 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 -43 0.477777779 0.1287771 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.113897376 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.0987933651 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Own-child Black Male United-States 0 -56 0.622222245 0.152882218 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Other-service Husband White Male United-States 0 -38 0.422222227 0.103095233 0.875 0 0 0.454545468 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 1 -30 0.333333343 0.107296064 0.8125 0 0 0.04040404 ? Bachelors Married-civ-spouse ? Wife White Female United-States 0 -22 0.244444445 0.134780318 0.5625 0.04508045 0 0.4040404 Private HS-grad Married-civ-spouse Priv-house-serv Wife White Female United-States 0 -18 0.2 0.07371498 0.5625 0 0 0.25252524 State-gov HS-grad Never-married Other-service Own-child White Male United-States 0 -68 0.75555557 0.06701062 0.625 0 0 0.2020202 Private Some-college Widowed Other-service Not-in-family White Female United-States 0 -35 0.3888889 0.116232522 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Transport-moving Not-in-family White Male United-States 0 -42 0.466666669 0.096707426 0.25 0 0 0.4848485 Private 7th-8th Married-civ-spouse Other-service Other-relative Asian-Pac-Islander Female ? 0 -32 0.355555564 0.139497742 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Unmarried White Male United-States 0 -43 0.477777779 0.129798174 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -30 0.333333343 0.103924349 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Unmarried Black Female United-States 0 -62 0.6888889 0.16091615 0.625 0.0282902829 0 0.24242425 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -38 0.422222227 0.07435955 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.1395651 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -28 0.311111122 0.408236653 1 0 0 0.6060606 Private Doctorate Never-married Prof-specialty Not-in-family White Female Germany 1 -26 0.2888889 0.0229756087 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 -21 0.233333334 0.08025567 0.625 0 0 0.2020202 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -19 0.211111113 0.16824016 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative Black Male United-States 0 -20 0.222222224 0.103398323 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -25 0.2777778 0.175626814 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Protective-serv Not-in-family Black Male United-States 0 -28 0.311111122 0.104816109 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male Columbia 0 -36 0.4 0.0228887219 0.6875 0 0 0.424242437 Private Assoc-voc Never-married Adm-clerical Not-in-family White Male United-States 1 -23 0.25555557 0.206506342 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family Amer-Indian-Eskimo Male Mexico 0 -24 0.266666681 0.181904823 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 -23 0.25555557 0.073704876 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -24 0.266666681 0.1260284 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -25 0.2777778 0.3122957 0.5625 0 0 0.08080808 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family White Male United-States 0 -24 0.266666681 0.03520026 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -30 0.333333343 0.09703207 0.5625 0 0 0.6262626 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.09956254 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Own-child White Female ? 0 -62 0.6888889 0.156744272 0.875 0 0 0.5050505 ? Masters Married-civ-spouse ? Husband White Male United-States 0 -36 0.4 0.180924833 0.625 0 0 0.333333343 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -45 0.5 0.0546452 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 0 -31 0.344444454 0.21759811 0.75 0 0.2020202 0.454545468 Private Assoc-acdm Divorced Sales Unmarried White Female United-States 0 -34 0.377777785 0.1636581 0.5625 0 0 0.4848485 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -65 0.722222269 0.11630863 0.8125 0 0 0.444444448 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Mexico 1 -42 0.466666669 0.07000179 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -27 0.3 0.2907224 0.9375 0 0 0.7070707 State-gov Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 -40 0.444444448 0.127258956 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife Black Female Puerto-Rico 0 -53 0.5888889 0.114739291 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -54 0.6 0.0192078557 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.1302481 0.8125 0 0 0.353535354 State-gov Bachelors Never-married Prof-specialty Other-relative White Male United-States 0 -59 0.655555546 0.118503004 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -42 0.466666669 0.0363412276 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Divorced Exec-managerial Unmarried White Male United-States 0 -23 0.25555557 0.08134478 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.06480681 0.8125 0 0 0.151515156 Private Bachelors Married-civ-spouse Other-service Wife White Female United-States 0 -20 0.222222224 0.07015805 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -22 0.244444445 0.1282605 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -73 0.811111152 0.163689092 0.8125 0 0 0.3030303 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -47 0.5222222 0.1540104 0.625 0 0.453856736 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.248370558 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -40 0.444444448 0.148556784 0.5 0 0 0.4040404 Private 12th Divorced Craft-repair Not-in-family White Male United-States 0 -37 0.411111116 0.15731813 0.6875 0 0 0.373737365 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 -39 0.433333337 0.126521438 0.5625 0 0 0.5050505 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 -49 0.544444442 0.05677761 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -44 0.4888889 0.171281844 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Divorced Other-service Not-in-family White Male United-States 0 -27 0.3 0.07382679 0.3125 0 0 0.373737365 Private 9th Married-civ-spouse Machine-op-inspct Wife White Female Portugal 0 -50 0.5555556 0.127421275 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -39 0.433333337 0.139388636 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.190530777 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 -55 0.6111111 0.2539636 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -53 0.5888889 0.141378924 0.125 0 0 0.353535354 Private 1st-4th Married-civ-spouse Other-service Husband Black Male Puerto-Rico 0 -53 0.5888889 0.118581809 0.875 0 0 0.5050505 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -31 0.344444454 0.187926218 0.875 0 0.5544077 0.7070707 Private Masters Married-civ-spouse Exec-managerial Husband White Male Taiwan 1 -21 0.233333334 0.233913139 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.186780542 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family Black Male United-States 0 -74 0.822222233 0.0201299246 0.5625 0 0 0.1010101 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -53 0.5888889 0.229970947 0.875 0 0 0.6060606 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 -47 0.5222222 0.141078532 0.625 0 0.3409091 0.474747479 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -60 0.6666667 0.07696007 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Female Hungary 1 -59 0.655555546 0.155518442 0.3125 0 0 0.4040404 Private 9th Separated Machine-op-inspct Unmarried White Female Mexico 0 -37 0.411111116 0.183044448 0.8125 0 0 0.4848485 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -47 0.5222222 0.0141145885 0.8125 0 0.399449021 0.4040404 Federal-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.02693195 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -73 0.811111152 0.0308371037 0.625 0 0 0.111111112 Local-gov Some-college Never-married Prof-specialty Other-relative White Female United-States 0 -58 0.644444466 0.08553282 0.5625 0 0 0.2020202 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 -18 0.2 0.158043519 0.4375 0 0 0.151515156 ? 11th Never-married ? Own-child Black Male United-States 0 -35 0.3888889 0.139876947 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Black Male United-States 0 -24 0.266666681 0.27840212 0.625 0 0 0.5050505 State-gov Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 0 -62 0.6888889 0.0821934342 0.5625 0 0 0.3838384 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -58 0.644444466 0.114238858 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -51 0.566666663 0.0608625971 0.625 0.1502415 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -21 0.233333334 0.2509832 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Male United-States 0 -30 0.333333343 0.229619354 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.0230840482 0.6875 0 0.430670351 0.363636374 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female Canada 0 -25 0.2777778 0.108457237 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -31 0.344444454 0.0672483742 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 -31 0.344444454 0.139883012 0.5625 0 0 0.343434334 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -44 0.4888889 0.0502995551 0.625 0.05178052 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -52 0.5777778 0.225144386 1 1 0 0.656565666 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.0242937151 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.06773265 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 -36 0.4 0.117402449 0.4375 0 0 0.4040404 Private 11th Divorced Transport-moving Not-in-family White Male United-States 0 -54 0.6 0.07369343 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -59 0.655555546 0.143193439 0.625 0 0 0.4040404 Local-gov Some-college Separated Protective-serv Not-in-family White Male United-States 1 -55 0.6111111 0.183006048 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -70 0.7777778 0.155462533 0.6875 0 0 0.3030303 ? Assoc-voc Never-married ? Not-in-family White Male United-States 0 -22 0.244444445 0.0695606247 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.2148218 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -36 0.4 0.126063436 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Wife White Female United-States 0 -32 0.355555564 0.1379008 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.18997848 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.190953761 0.5625 0 0 0.454545468 ? HS-grad Never-married ? Unmarried Black Male United-States 0 -25 0.2777778 0.188652292 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Handlers-cleaners Not-in-family White Male Mexico 0 -31 0.344444454 0.136544973 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.138714433 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -54 0.6 0.264218152 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.08029003 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -49 0.544444442 0.131712362 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.11652483 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -54 0.6 0.1298992 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -39 0.433333337 0.110939212 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Unmarried White Male United-States 0 -24 0.266666681 0.131883442 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -21 0.233333334 0.134332418 0.5625 0 0 0.444444448 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.0850983858 0.3125 0 0 0.3030303 Private 9th Never-married Other-service Unmarried Black Female United-States 0 -54 0.6 0.119670242 0.5625 0 0 0.424242437 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.0339064 0.875 0 0 0.2020202 Private Masters Never-married Sales Not-in-family White Female United-States 0 -39 0.433333337 0.160262823 0.5625 0 0.396235079 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 -23 0.25555557 0.0855018348 0.625 0 0 0.25252524 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -67 0.7444445 0.0620062575 0.5625 0 0 0.08080808 ? HS-grad Widowed ? Other-relative White Female United-States 0 -19 0.211111113 0.07404704 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Wife Asian-Pac-Islander Female Laos 0 -41 0.455555558 0.180003434 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -32 0.355555564 0.117669173 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family Black Male United-States 0 -57 0.6333333 0.08403757 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.135113046 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -60 0.6666667 0.1116902 1 0.07688077 0 0.6060606 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.20286791 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 -53 0.5888889 0.145342 0.625 0 0 0.222222224 Private Some-college Widowed Adm-clerical Other-relative White Female United-States 0 -38 0.422222227 0.0589719862 0.8125 0.07688077 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.07507687 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -53 0.5888889 0.05566493 1 0 0 0.5555556 Private Doctorate Divorced Exec-managerial Not-in-family White Female United-States 1 -24 0.266666681 0.109302521 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.161024585 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Other-service Husband White Male United-States 0 -29 0.322222233 0.1447594 0.875 0 0 0.6060606 Private Masters Never-married Exec-managerial Not-in-family Black Male United-States 0 -23 0.25555557 0.130832046 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -44 0.4888889 0.142473429 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.150378019 0.875 0 0 0.4848485 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -25 0.2777778 0.135808125 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -41 0.455555558 0.127121553 0.5625 0 0 0.272727281 Self-emp-not-inc HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -18 0.2 0.08961713 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -57 0.6333333 0.0415981635 0.625 0 0.3838384 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.0696057454 0.8125 0.105201051 0 0.5050505 Private Bachelors Widowed Exec-managerial Not-in-family White Male United-States 1 -29 0.322222233 0.0739635155 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 -19 0.211111113 0.151743278 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 -35 0.3888889 0.0655194148 0.9375 0 0 0.656565666 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.09881492 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.1929353 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Unmarried White Female United-States 0 -38 0.422222227 0.0136781381 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -42 0.466666669 0.151008457 0.625 0 0 0.4040404 Private Some-college Widowed Sales Unmarried Black Female United-States 0 -41 0.455555558 0.152203977 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 -23 0.25555557 0.160112619 0.8125 0 0 0.3838384 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -31 0.344444454 0.105571814 0.875 0 0 0.7676768 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.343074232 0.1875 0 0 0.454545468 Private 5th-6th Never-married Machine-op-inspct Not-in-family White Male Mexico 0 -46 0.51111114 0.0972253755 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.2529223 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 -57 0.6333333 0.06973035 0.875 0 0 0.3838384 Self-emp-not-inc Masters Married-civ-spouse Tech-support Husband White Male United-States 1 -25 0.2777778 0.134351268 0.6875 0 0 0.3838384 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.234492376 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.14896293 0.3125 0 0 0.4040404 Private 9th Never-married Farming-fishing Own-child White Male United-States 0 -46 0.51111114 0.230188489 0.8125 0.07688077 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.427173078 0.375 0 0 0.171717167 ? 10th Never-married ? Own-child White Female United-States 0 -43 0.477777779 0.1073944 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -56 0.622222245 0.0742490962 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-spouse-absent Prof-specialty Not-in-family White Female United-States 1 -19 0.211111113 0.30885464 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 0 -20 0.222222224 0.229147881 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.10446924 0.625 0 0 0.454545468 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -90 1 0.0609703623 0.5625 0 0 1 Private HS-grad Widowed Transport-moving Unmarried White Male United-States 0 -25 0.2777778 0.0826804 0.4375 0 0 0.353535354 Private 11th Separated Machine-op-inspct Not-in-family Black Male United-States 0 -27 0.3 0.19790329 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female Jamaica 0 -48 0.533333361 0.2015828 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -48 0.533333361 0.325492948 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Not-in-family Black Male United-States 0 -27 0.3 0.0821968 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.108201295 0.8125 0 0 0.3838384 Private Bachelors Widowed Tech-support Unmarried White Female United-States 0 -32 0.355555564 0.07175904 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Other-relative White Male United-States 0 -22 0.244444445 0.0855018348 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -24 0.266666681 0.126964614 0.8125 0 0 0.4040404 Private Bachelors Married-AF-spouse Prof-specialty Wife White Female United-States 1 -31 0.344444454 0.254495 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.130386844 0.625 0 0 0.181818187 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.212444231 0.9375 0.0217602178 0 0.4040404 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 -40 0.444444448 0.0385484 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.131509632 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -54 0.6 0.116515405 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.150343 0.625 0 0 0.424242437 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -17 0.188888893 0.06452393 0.4375 0 0 0.181818187 Private 11th Never-married Sales Own-child White Female United-States 0 -25 0.2777778 0.143722162 0.625 0 0 0.8080808 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 -49 0.544444442 0.136368513 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -55 0.6111111 0.09804911 0.5625 0.3409534 0 0.6060606 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -39 0.433333337 0.09937867 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -67 0.7444445 0.07086661 0.625 0 0 0.161616161 Private Some-college Widowed Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.0523740426 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male United-States 0 -35 0.3888889 0.113147058 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Canada 0 -44 0.4888889 0.112483628 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -51 0.566666663 0.07303471 0.875 0 0 0.474747479 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.03815236 0.8125 0 0 0.4040404 Private Bachelors Widowed Farming-fishing Own-child Asian-Pac-Islander Male United-States 0 -45 0.5 0.20540984 0.5625 0 0 0.7878788 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -32 0.355555564 0.0286898743 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.148609325 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -45 0.5 0.06833142 0.875 0.1502415 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male England 1 -35 0.3888889 0.127222583 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -55 0.6111111 0.113685884 0.5625 0 0 0.444444448 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.06624953 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.270600557 0.5625 0 0 0.5555556 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -46 0.51111114 0.10789147 0.875 0 0 0.353535354 Local-gov Masters Widowed Exec-managerial Unmarried Black Female United-States 0 -23 0.25555557 0.137209073 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -47 0.5222222 0.0972253755 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.283388972 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Germany 0 -51 0.566666663 0.07149636 0.4375 0 0 0.4040404 Private 11th Divorced Transport-moving Own-child White Male United-States 0 -40 0.444444448 0.244144127 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.025696015 0.625 0 0 0.121212125 State-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 -20 0.222222224 0.0287639629 0.625 0 0 0.727272749 Private Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 -44 0.4888889 0.084999375 0.625 0.0183101818 0 0.5050505 Private Some-college Divorced Transport-moving Unmarried White Male United-States 0 -26 0.2888889 0.11147669 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -35 0.3888889 0.145529255 0.5625 0 0 0.3838384 Local-gov HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.1452302 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Unmarried Asian-Pac-Islander Male Vietnam 0 -40 0.444444448 0.161451608 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -49 0.544444442 0.134287953 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -32 0.355555564 0.155195817 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -28 0.311111122 0.266060948 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -51 0.566666663 0.228072241 0.875 0.1502415 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.14153789 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.3006375 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -47 0.5222222 0.237497687 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 -36 0.4 0.197701231 0.6875 0 0 0.0303030312 Private Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 -44 0.4888889 0.0373104438 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -18 0.2 0.08657478 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Own-child White Female United-States 0 -46 0.51111114 0.288545549 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.0854297653 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -51 0.566666663 0.0921637639 0.75 0 0 0.3030303 Self-emp-not-inc Assoc-acdm Divorced Transport-moving Unmarried Black Female United-States 0 -48 0.533333361 0.0712855458 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.0942295 0.8125 0 0 0.4040404 Private Bachelors Never-married Machine-op-inspct Unmarried Black Female United-States 0 -57 0.6333333 0.07146403 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -33 0.366666675 0.125832409 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.235997722 0.5625 0 0 0.151515156 Private HS-grad Separated Machine-op-inspct Not-in-family White Male United-States 0 -17 0.188888893 0.09625616 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Male United-States 0 -63 0.7 0.216476008 0.3125 0 0 0.4040404 ? 9th Separated ? Not-in-family Black Male United-States 0 -31 0.344444454 0.0774140358 0.8125 0 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.193094924 0.875 0.046500463 0 0.3030303 ? Masters Never-married ? Not-in-family White Male United-States 0 -35 0.3888889 0.09918334 0.625 0 0.453168035 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -20 0.222222224 0.3044349 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -36 0.4 0.10091769 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -24 0.266666681 0.142767757 0.625 0 0 0.24242425 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -33 0.366666675 0.193915963 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 1 -36 0.4 0.112176493 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -31 0.344444454 0.0169838462 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -29 0.322222233 0.1929353 0.75 0.03418034 0 0.4040404 Private Assoc-acdm Divorced Sales Unmarried White Female United-States 0 -47 0.5222222 0.109135486 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.125905156 1 0.05178052 0 0.75757575 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.0558616035 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -23 0.25555557 0.08220354 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Female United-States 0 -33 0.366666675 0.07995528 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Not-in-family White Male United-States 0 -59 0.655555546 0.1638211 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family White Female United-States 0 -67 0.7444445 0.180853441 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -26 0.2888889 0.246034741 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -27 0.3 0.111379027 0.5625 0.0288502872 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Laos 0 -20 0.222222224 0.147683218 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Prof-specialty Own-child White Female ? 0 -24 0.266666681 0.191120133 0.8125 0 0 0.3939394 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -44 0.4888889 0.139120564 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Divorced Tech-support Not-in-family White Male United-States 0 -31 0.344444454 0.07635456 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.2215585 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -19 0.211111113 0.05652975 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -31 0.344444454 0.219137818 0.8125 0 0.43663913 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -20 0.222222224 0.08880687 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -64 0.7111111 0.08049141 0.5625 0 0 0.151515156 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -47 0.5222222 0.0679044 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -36 0.4 0.109315991 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -48 0.533333361 0.12272539 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.130803764 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Other-service Own-child White Female Mexico 0 -22 0.244444445 0.0949953049 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child Black Female United-States 0 -56 0.622222245 0.233065158 0.3125 0 0 0.4040404 Private 9th Divorced Adm-clerical Not-in-family White Male United-States 0 -22 0.244444445 0.1192998 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -37 0.411111116 0.162439 0.8125 0 0 1 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -57 0.6333333 0.0879178047 0.8125 0 0 0.353535354 Local-gov Bachelors Widowed Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.11348787 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -34 0.377777785 0.244349554 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -22 0.244444445 0.164861709 0.4375 0 0 0.4040404 ? 11th Separated ? Unmarried Black Female United-States 0 -38 0.422222227 0.0324125 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -30 0.333333343 0.11709936 0.625 0 0.43663913 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male South 1 -32 0.355555564 0.139557019 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -29 0.322222233 0.0255491845 0.5 0 0 0.4040404 Private 12th Married-spouse-absent Other-service Not-in-family Black Female United-States 0 -56 0.622222245 0.02244419 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -42 0.466666669 0.118503675 0.6875 0.07298073 0 0.353535354 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 -66 0.733333349 0.206221446 0.375 0.0205002055 0 0.4040404 ? 10th Divorced ? Not-in-family White Male United-States 0 -71 0.788888931 0.15431349 0.5625 0 0 0.333333343 Local-gov HS-grad Widowed Exec-managerial Other-relative White Female United-States 0 -20 0.222222224 0.076453574 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Own-child White Male United-States 0 -25 0.2777778 0.224742964 0.5625 0 0 0.363636374 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -42 0.466666669 0.158968285 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male ? 1 -20 0.222222224 0.249941245 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Female United-States 0 -61 0.677777767 0.07747196 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.0899747759 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 -51 0.566666663 0.0613839142 0.3125 0 0 0.4040404 Private 9th Never-married Other-service Unmarried Black Female United-States 0 -27 0.3 0.0711239 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -41 0.455555558 0.237631053 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -31 0.344444454 0.137959391 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -39 0.433333337 0.166856721 0.5625 0 0 0.161616161 Private HS-grad Divorced Priv-house-serv Unmarried Black Female United-States 0 -36 0.4 0.249601781 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 -51 0.566666663 0.069547154 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -52 0.5777778 0.120505422 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Unmarried White Female United-States 0 -49 0.544444442 0.03654598 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.0373104438 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.157277718 0.8125 0 0.453856736 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.214406908 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -19 0.211111113 0.132002652 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -44 0.4888889 0.026184326 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -67 0.7444445 0.0548344627 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -58 0.644444466 0.116264179 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.117677927 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -67 0.7444445 0.151534483 0.5625 0.158311576 0 0.161616161 Private HS-grad Widowed Adm-clerical Not-in-family White Female Germany 1 -61 0.677777767 0.285105139 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.0598475821 0.25 0 0 0.4040404 Local-gov 7th-8th Never-married Other-service Unmarried Black Female United-States 0 -23 0.25555557 0.113897376 0.75 0 0 0.161616161 ? Assoc-acdm Never-married ? Own-child Asian-Pac-Islander Male Philippines 0 -35 0.3888889 0.026407266 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -35 0.3888889 0.229013845 0.375 0 0 0.3838384 Private 10th Never-married Other-service Unmarried Black Female United-States 0 -20 0.222222224 0.0207421687 0.625 0 0 0.1010101 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -51 0.566666663 0.10466928 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -23 0.25555557 0.160363168 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -39 0.433333337 0.151952744 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -36 0.4 0.194751143 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -47 0.5222222 0.228909448 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.120413147 0.8125 0 0 0.8080808 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -29 0.322222233 0.382897615 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.08711832 0.625 0 0 0.4040404 State-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 0 -18 0.2 0.301663965 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.211600959 0.625 0 0 0.2020202 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -39 0.433333337 0.257868737 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.05556929 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.100828111 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -62 0.6888889 0.141337171 0.625 0 0 0.3030303 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -49 0.544444442 0.0421268865 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.154027909 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 -24 0.266666681 0.2199676 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -25 0.2777778 0.136115253 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 -54 0.6 0.209317014 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.3032562 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -20 0.222222224 0.05682947 0.5625 0 0 0.454545468 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -43 0.477777779 0.09594095 0.625 0 0 0.5555556 Private Some-college Divorced Sales Unmarried White Female United-States 1 -26 0.2888889 0.0553955175 0.8125 0 0.430670351 0.3838384 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -24 0.266666681 0.129834548 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -18 0.2 0.0357707441 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child Amer-Indian-Eskimo Male United-States 0 -45 0.5 0.08206075 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Prof-specialty Wife White Female ? 1 -45 0.5 0.200800836 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.09136158 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -47 0.5222222 0.178671867 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -54 0.6 0.276225924 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -21 0.233333334 0.156744272 0.5625 0 0 0.4040404 Without-pay HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -29 0.322222233 0.112962507 0.5625 0 0 1 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -68 0.75555557 0.0724905 0.625 0 0 0.151515156 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -21 0.233333334 0.08733991 0.625 0 0 0.4848485 Private Some-college Never-married Exec-managerial Not-in-family Black Male Mexico 0 -28 0.311111122 0.07681863 0.625 0 0 0.3030303 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -46 0.51111114 0.136431143 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -35 0.3888889 0.148111582 0.5625 0 0 0.4848485 Private HS-grad Separated Transport-moving Unmarried Black Female United-States 0 -50 0.5555556 0.129759118 0.375 0 0 0.25252524 Self-emp-not-inc 10th Never-married Craft-repair Not-in-family White Male United-States 0 -48 0.533333361 0.160951838 0.625 0 0 0.4040404 Self-emp-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -17 0.188888893 0.07607033 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 -59 0.655555546 0.103376769 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.109027721 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Black Male United-States 0 -53 0.5888889 0.175190359 0.5625 0 0 0.3030303 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -50 0.5555556 0.161900178 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.169469357 0.1875 0 0 0.454545468 ? 5th-6th Never-married ? Unmarried White Female Mexico 0 -53 0.5888889 0.150666967 0.5 0 0 0.565656543 Private 12th Married-spouse-absent Handlers-cleaners Not-in-family Other Male Dominican-Republic 0 -52 0.5777778 0.118632324 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -38 0.422222227 0.125923336 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -43 0.477777779 0.307290673 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.06664489 0.8125 0 0 0.323232323 Private Bachelors Married-civ-spouse Other-service Wife White Female United-States 0 -41 0.455555558 0.112252608 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.3021651 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -39 0.433333337 0.112804905 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -45 0.5 0.127831459 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.268775284 0.3125 0 0 0.424242437 Private 9th Married-civ-spouse Farming-fishing Wife White Female United-States 0 -40 0.444444448 0.0701796 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.102883741 0.1875 0 0 0.2020202 Self-emp-not-inc 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 0 -53 0.5888889 0.180874318 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male Jamaica 0 -53 0.5888889 0.100041427 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.189791247 0.8125 0 0.359045 0.5252525 Local-gov Bachelors Never-married Tech-support Not-in-family Black Male United-States 1 -24 0.266666681 0.1520329 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -34 0.377777785 0.134836212 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.115073368 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -29 0.322222233 0.151449621 0.625 0 0 0.6060606 Federal-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -61 0.677777767 0.107703552 0.4375 0 0 0.323232323 State-gov 11th Widowed Other-service Unmarried White Female United-States 1 -31 0.344444454 0.07778515 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -29 0.322222233 0.854270041 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Tech-support Own-child Black Male United-States 0 -42 0.466666669 0.131847739 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried White Male United-States 0 -50 0.5555556 0.12546061 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.122171074 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.119337514 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -74 0.822222233 0.0616203249 0.125 0 0 0.2020202 Private 1st-4th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -40 0.444444448 0.1555602 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -75 0.8333334 0.208765388 0.9375 0 0.499081731 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.04246096 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -36 0.4 0.0200807564 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -61 0.677777767 0.07828491 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -42 0.466666669 0.112936914 0.4375 0 0 0.222222224 ? 11th Married-civ-spouse ? Husband White Male Ecuador 0 -28 0.311111122 0.128704354 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -19 0.211111113 0.042980928 0.625 0 0 0.181818187 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.19253993 0.75 0 0 0.323232323 Private Assoc-acdm Separated Other-service Unmarried Black Female United-States 0 -33 0.366666675 0.108288184 0.6875 0 0 0.4040404 ? Assoc-voc Divorced ? Not-in-family White Female France 0 -50 0.5555556 0.201946512 0.625 0 0.2020202 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -47 0.5222222 0.109611675 0.75 0.1502415 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Wife Black Female United-States 1 -48 0.533333361 0.138067842 0.5625 0 0 0.333333343 Private HS-grad Never-married Tech-support Unmarried Black Female Jamaica 0 -60 0.6666667 0.115386561 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.199677378 0.875 0 0 0.3030303 Private Masters Never-married Prof-specialty Not-in-family Black Male United-States 0 -32 0.355555564 0.06995329 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.107641585 0.875 0 0.453856736 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -51 0.566666663 0.065054 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -53 0.5888889 0.136538908 0.3125 0 0 0.75757575 Private 9th Married-spouse-absent Machine-op-inspct Unmarried Black Male Haiti 0 -34 0.377777785 0.136607617 0.875 0 0 0.4040404 Private Masters Never-married Tech-support Unmarried Black Female ? 0 -48 0.533333361 0.2558643 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male Mexico 1 -68 0.75555557 0.08315726 0.5625 0 0 0.454545468 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -32 0.355555564 0.198100641 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Machine-op-inspct Not-in-family White Female United-States 0 -63 0.7 0.121223412 0.5625 0 0 0.04040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -31 0.344444454 0.15786773 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried Black Female United-States 0 -58 0.644444466 0.104086 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Divorced Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.0847683549 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.105081484 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -40 0.444444448 0.07855567 0.8125 0 0 0.8080808 Private Bachelors Divorced Sales Own-child White Male United-States 0 -50 0.5555556 0.08416689 0.8125 1 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.07760128 0.375 0 0 0.4040404 Self-emp-not-inc 10th Separated Machine-op-inspct Not-in-family White Male United-States 0 -30 0.333333343 0.1716873 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -21 0.233333334 0.13169755 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.12801668 0.8125 0 0.359045 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 1 -63 0.7 0.122467428 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male ? 0 -32 0.355555564 0.137181461 0.75 0 0.2020202 0.363636374 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 -25 0.2777778 0.217272118 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -59 0.655555546 0.165865943 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -22 0.244444445 0.14220266 0.6875 0 0 0.1010101 Local-gov Assoc-voc Never-married Adm-clerical Own-child White Female ? 0 -49 0.544444442 0.0938018039 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -36 0.4 0.126988187 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -31 0.344444454 0.169169635 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Wife White Female Mexico 0 -46 0.51111114 0.06385713 0.625 0 0 0.3030303 Private Some-college Divorced Priv-house-serv Unmarried White Female United-States 0 -37 0.411111116 0.178512231 0.9375 0 0 0.6060606 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.122964494 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 1 -43 0.477777779 0.148251 0.625 0 0.3838384 0.444444448 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -41 0.455555558 0.140411735 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.01931899 0.5625 0.0346403457 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.15731813 0.625 0 0 0.04040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -29 0.322222233 0.0165433548 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Unmarried Other Female United-States 0 -66 0.733333349 0.0244924072 0.5625 0 0.5204316 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.113537036 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 -62 0.6888889 0.112546265 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.182917818 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family White Male Mexico 0 -28 0.311111122 0.1288842 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.0213234276 0.8125 0 0.4331956 0.6060606 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -42 0.466666669 0.0561801866 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -60 0.6666667 0.0275179241 0.6875 0 0 0.464646459 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -58 0.644444466 0.077863954 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.089126125 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.148321047 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Not-in-family White Female United-States 0 -50 0.5555556 0.11619211 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.105573162 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 -39 0.433333337 0.147447482 0.9375 0 0 0.5050505 Private Prof-school Divorced Exec-managerial Not-in-family White Male United-States 0 -21 0.233333334 0.206178337 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -24 0.266666681 0.132467389 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -59 0.655555546 0.04944484 0.9375 0 0 0.3030303 Self-emp-not-inc Prof-school Married-civ-spouse Farming-fishing Husband White Male United-States 0 -36 0.4 0.1243742 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -72 0.8 0.0511145331 0.625 0 0 0.04040404 ? Some-college Widowed ? Unmarried Asian-Pac-Islander Female United-States 0 -35 0.3888889 0.2158348 0.875 0 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Hong 1 -33 0.366666675 0.116183355 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Own-child White Male United-States 0 -30 0.333333343 0.08862906 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Not-in-family Black Female United-States 0 -40 0.444444448 0.08386851 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Craft-repair Unmarried White Male United-States 1 -26 0.2888889 0.06318158 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -37 0.411111116 0.116650783 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Separated Adm-clerical Not-in-family Black Male United-States 0 -68 0.75555557 0.13373296 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Divorced Transport-moving Not-in-family White Female United-States 0 -45 0.5 0.0178500116 0.8125 0 0 0.727272749 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -56 0.622222245 0.1517251 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -36 0.4 0.101058461 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -50 0.5555556 0.142330632 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.1403363 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.0391424559 0.8125 0 0 0.414141417 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -28 0.311111122 0.147683889 0.5625 0 0 0.282828271 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -39 0.433333337 0.0872718841 0.625 0 0 0.5050505 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -26 0.2888889 0.0187471583 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Protective-serv Not-in-family White Male United-States 0 -52 0.5777778 0.279541731 0.625 0 0 0.656565666 Self-emp-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 1 -52 0.5777778 0.1290014 0.8125 0 0 0.4040404 Private Bachelors Divorced Farming-fishing Not-in-family White Male United-States 0 -84 0.933333337 0.08944942 0.5625 0 0 0.13131313 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -33 0.366666675 0.09231396 0.625 0 0 0.1010101 Federal-gov Some-college Never-married Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.06890797 0.9375 0.1502415 0 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.11066778 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -38 0.422222227 0.0275846049 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male England 1 -66 0.733333349 0.0950256139 0.5625 0 0 0.08080808 Private HS-grad Widowed Priv-house-serv Not-in-family White Female United-States 0 -62 0.6888889 0.173855409 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Adm-clerical Husband White Male Italy 1 -31 0.344444454 0.3149306 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -31 0.344444454 0.097756125 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.155681431 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -60 0.6666667 0.09879 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family Black Male ? 0 -27 0.3 0.163134769 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Female United-States 0 -37 0.411111116 0.0690649 0.6875 0 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Wife Amer-Indian-Eskimo Female United-States 0 -38 0.422222227 0.09120735 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Own-child White Female United-States 0 -25 0.2777778 0.180025 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -48 0.533333361 0.0881063938 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -42 0.466666669 0.123772062 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Male ? 0 -45 0.5 0.1271788 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.13510631 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -50 0.5555556 0.08358159 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Poland 0 -21 0.233333334 0.0339535475 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -44 0.4888889 0.06849105 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -60 0.6666667 0.04922931 0.5625 0 0.430670351 0.5050505 Self-emp-not-inc HS-grad Separated Other-service Not-in-family Black Male United-States 0 -21 0.233333334 0.07260769 0.625 0 0 0.0606060624 ? Some-college Never-married ? Own-child White Female United-States 0 -51 0.566666663 0.119194724 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -30 0.333333343 0.230826333 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Other-relative White Male United-States 0 -46 0.51111114 0.248238549 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 -43 0.477777779 0.01812818 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -57 0.6333333 0.106400937 0.5625 0 0 0.4848485 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 -48 0.533333361 0.07397564 0.875 0 0.43663913 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.07837112 0.8125 0.07688077 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male ? 1 -68 0.75555557 0.131932616 0.5625 0.02414024 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -33 0.366666675 0.12325681 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -22 0.244444445 0.203641132 0.5625 0.04416044 0 0.4040404 Without-pay HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -18 0.2 0.102015555 0.4375 0 0 0.07070707 ? 11th Never-married ? Other-relative White Male United-States 0 -28 0.311111122 0.146291688 0.5625 0 0 0.5050505 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -32 0.355555564 0.0213779844 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 -56 0.622222245 0.0239239447 0.5625 0 0 0.424242437 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.249102011 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -34 0.377777785 0.134186253 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -18 0.2 0.09746785 0.5625 0 0.395087242 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -39 0.433333337 0.257830352 0.375 0 0.365013778 0.4040404 Private 10th Widowed Machine-op-inspct Not-in-family Black Male United-States 0 -25 0.2777778 0.171603784 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -27 0.3 0.0475899279 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -56 0.622222245 0.03420949 0.875 0 0.430670351 0.6060606 Self-emp-not-inc Masters Divorced Sales Not-in-family White Male United-States 0 -33 0.366666675 0.149633765 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.0637204051 1 0 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -44 0.4888889 0.0701796 0.5625 0 0 0.8484849 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.30712837 0.4375 0 0 0.454545468 Self-emp-not-inc 11th Never-married Craft-repair Not-in-family White Male United-States 1 -27 0.3 0.11194817 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -25 0.2777778 0.134023935 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 1 -30 0.333333343 0.19698526 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -38 0.422222227 0.06694125 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Other-service Husband White Male El-Salvador 0 -38 0.422222227 0.470371574 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.104357436 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 -37 0.411111116 0.270759523 0.5625 0 0 0.2020202 Private HS-grad Widowed Machine-op-inspct Unmarried White Female United-States 0 -62 0.6888889 0.109668255 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.1830633 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -47 0.5222222 0.0907055661 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 -45 0.5 0.05899017 0.5625 0 0 0.141414136 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 -50 0.5555556 0.167453468 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.08769419 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 -45 0.5 0.120510139 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -23 0.25555557 0.03501369 0.5625 0 0 0.3838384 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -37 0.411111116 0.08482022 0.75 0.07688077 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.0702361763 1 0 0 0.5555556 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.41615 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Black Male United-States 0 -29 0.322222233 0.08224665 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 0 -45 0.5 0.122420281 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -41 0.455555558 0.150650129 0.5625 0 0.4331956 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.09437363 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Never-married Other-service Not-in-family White Female United-States 0 -27 0.3 0.07237667 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -51 0.566666663 0.145448431 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Handlers-cleaners Husband Other Male ? 0 -44 0.4888889 0.2063979 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.414825171 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Transport-moving Husband Black Male Nicaragua 0 -28 0.311111122 0.1355057 0.5625 1 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband Black Male United-States 1 -32 0.355555564 0.0250622183 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.132069334 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -45 0.5 0.111928634 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Other-service Own-child Black Female United-States 0 -52 0.5777778 0.196063191 0.75 0.07298073 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Other-service Husband White Male United-States 1 -24 0.266666681 0.156826437 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -19 0.211111113 0.08889443 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -47 0.5222222 0.2753328 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.0289107952 1 0.14084141 0 0.5050505 Self-emp-inc Doctorate Divorced Exec-managerial Not-in-family White Male United-States 1 -31 0.344444454 0.121971034 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.134872586 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -56 0.622222245 0.18995221 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -49 0.544444442 0.0868792161 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.07195908 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.09749412 0.625 0 0 0.181818187 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -39 0.433333337 0.07283602 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.0695916042 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.180522054 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -58 0.644444466 0.132763073 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.129068062 0.5625 0.0217402168 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family Black Male United-States 0 -59 0.655555546 0.118621543 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 1 -24 0.266666681 0.0285585355 0.8125 0 0 0.474747479 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -42 0.466666669 0.217137411 0.6875 0.02407024 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -53 0.5888889 0.08285215 0.875 0 0 0.6060606 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.142078727 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -36 0.4 0.0879770741 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female China 1 -26 0.2888889 0.167703345 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 -33 0.366666675 0.0893814 0.3125 0 0 0.4848485 Private 9th Separated Adm-clerical Not-in-family White Male United-States 0 -29 0.322222233 0.06391303 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -43 0.477777779 0.09554625 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -35 0.3888889 0.0547125526 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -48 0.533333361 0.07716078 0.8125 0 0 0.363636374 Private Bachelors Married-spouse-absent Prof-specialty Other-relative Asian-Pac-Islander Female Philippines 1 -45 0.5 0.12916775 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -43 0.477777779 0.086450845 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -27 0.3 0.0249800477 0.3125 0 0 0.3030303 Private 9th Never-married Other-service Own-child White Male United-States 0 -21 0.233333334 0.2793902 0.25 0 0 0.4040404 Private 7th-8th Never-married Craft-repair Own-child White Male United-States 0 -63 0.7 0.105609536 0.5625 0 0 0.04040404 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -39 0.433333337 0.0228887219 0.625 0.1502415 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -52 0.5777778 0.131335855 0.8125 0.1502415 0 0.5555556 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.04945831 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Widowed Prof-specialty Unmarried White Female United-States 0 -48 0.533333361 0.104845069 0.5625 0.07688077 0 0.7070707 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.122843258 0.4375 0 0 0.353535354 ? 11th Divorced ? Unmarried White Female United-States 0 -53 0.5888889 0.189313039 0.5625 0 0.2506887 0.4040404 State-gov HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -33 0.366666675 0.1672696 0.75 0 0 0.5050505 Local-gov Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.112804905 0.375 0 0 0.353535354 Private 10th Never-married Craft-repair Own-child White Male United-States 0 -18 0.2 0.115233667 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -43 0.477777779 0.142629683 1 0 0 0.24242425 Federal-gov Doctorate Separated Prof-specialty Unmarried Black Female United-States 1 -20 0.222222224 0.08228301 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.2492879 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.09358088 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -41 0.455555558 0.117582284 0.5625 0 0.4331956 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -67 0.7444445 0.06811589 0.25 0.01797018 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.19687885 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Craft-repair Not-in-family Black Male Dominican-Republic 0 -47 0.5222222 0.167559221 0.875 0 0 0.25252524 Self-emp-not-inc Masters Never-married Exec-managerial Not-in-family Black Male United-States 0 -39 0.433333337 0.21149455 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -34 0.377777785 0.143615067 0.8125 0 0.3409091 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 0 -36 0.4 0.0517577566 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -24 0.266666681 0.09989864 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -50 0.5555556 0.036546655 0.5625 0 0 0.8484849 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -21 0.233333334 0.150435269 0.5625 0.010550105 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -21 0.233333334 0.142124534 0.3125 0 0 0.5050505 Private 9th Never-married Other-service Own-child White Female Mexico 0 -40 0.444444448 0.141329765 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -19 0.211111113 0.239961475 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.0966777951 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -34 0.377777785 0.163641945 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.177726224 0.625 0 0 0.5050505 Local-gov Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -20 0.222222224 0.101774432 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 -44 0.4888889 0.139883012 0.5625 0 0.359045 0.5555556 Private HS-grad Never-married Exec-managerial Not-in-family White Male England 1 -49 0.544444442 0.0313442759 0.5625 0.005940059 0 0.1010101 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.05679512 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.15135397 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -34 0.377777785 0.1254586 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Male United-States 0 -58 0.644444466 0.0968077853 0.5625 0 0 0.727272749 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.159217492 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.03674804 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -38 0.422222227 0.179379076 0.8125 0 0 0.323232323 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -32 0.355555564 0.02889463 0.9375 0.1502415 0 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.123735018 0.5625 0 0 0.4848485 State-gov HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -23 0.25555557 0.187413663 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -35 0.3888889 0.08081875 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.191505387 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -55 0.6111111 0.248350352 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.238226458 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -22 0.244444445 0.0211402271 0.8125 0.0288502872 0 0.25252524 Private Bachelors Married-civ-spouse Adm-clerical Own-child Amer-Indian-Eskimo Female United-States 0 -27 0.3 0.07471585 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -24 0.266666681 0.114185646 0.75 0 0 0.151515156 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 -21 0.233333334 0.192308918 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -49 0.544444442 0.133881137 0.8125 0 0 0.353535354 Private Bachelors Divorced Sales Other-relative White Female United-States 0 -32 0.355555564 0.0830407441 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -64 0.7111111 0.09841012 0.625 0 0 0.24242425 Private Some-college Widowed Other-service Unmarried White Female United-States 0 -37 0.411111116 0.0200807564 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Farming-fishing Unmarried White Male United-States 0 -61 0.677777767 0.131739974 0.25 0 0 0.4040404 Private 7th-8th Married-spouse-absent Machine-op-inspct Not-in-family White Male Guatemala 0 -44 0.4888889 0.0624022968 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 1 -53 0.5888889 0.1957884 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.287856519 0.875 0 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -60 0.6666667 0.158182263 1 0 0.43663913 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.18627809 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -25 0.2777778 0.168409213 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Machine-op-inspct Not-in-family White Male Mexico 0 -29 0.322222233 0.101610087 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -51 0.566666663 0.0587355755 0.8125 0 0 0.5555556 Private Bachelors Divorced Prof-specialty Unmarried White Female England 0 -47 0.5222222 0.2314123 0.125 0 0 0.121212125 Private 1st-4th Married-spouse-absent Farming-fishing Not-in-family White Male Mexico 0 -20 0.222222224 0.06358233 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Unmarried White Female United-States 0 -25 0.2777778 0.080984436 0.4375 0.05178052 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male Poland 1 -27 0.3 0.138370931 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.13403067 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -18 0.2 0.198189542 0.5625 0 0 0.272727281 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -23 0.25555557 0.1728478 0.25 0 0 0.323232323 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.150286421 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -46 0.51111114 0.139624372 0.5625 0 0 0.373737365 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -66 0.733333349 0.182164133 0.25 0 0 0.4040404 ? 7th-8th Divorced ? Not-in-family White Male United-States 0 -46 0.51111114 0.08449961 0.875 0 0 0.3838384 Local-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -36 0.4 0.14336586 0.4375 0 0 0.232323229 Local-gov 11th Never-married Other-service Unmarried White Female United-States 0 -44 0.4888889 0.1329483 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Unmarried White Female United-States 0 -17 0.188888893 0.049395673 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 -27 0.3 0.0458252653 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -32 0.355555564 0.124622062 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -53 0.5888889 0.0721510351 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Male United-States 0 -22 0.244444445 0.0737399 0.625 0 0 0.989899 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -30 0.333333343 0.117560729 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Own-child White Female United-States 0 -47 0.5222222 0.1403693 0.8125 0 0.459595948 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -68 0.75555557 0.142509118 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.07310543 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.136334151 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -62 0.6888889 0.107869916 0.25 0.06418064 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 1 -20 0.222222224 0.118661962 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Female United-States 0 -21 0.233333334 0.178586319 0.5625 0 0 0.3838384 Private HS-grad Never-married Handlers-cleaners Other-relative White Male Jamaica 0 -34 0.377777785 0.14860259 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Other-service Not-in-family White Male ? 0 -30 0.333333343 0.204547033 0.5625 0 0 0.75757575 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.09149629 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.134649649 0.5625 0 0 0.212121218 State-gov HS-grad Never-married Other-service Own-child White Female United-States 0 -40 0.444444448 0.10138917 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Other-relative White Male United-States 0 -26 0.2888889 0.0575750768 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male United-States 0 -57 0.6333333 0.01648341 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.18383719 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.05528169 0.625 0 0 0.4040404 ? Some-college Divorced ? Unmarried Asian-Pac-Islander Female United-States 0 -49 0.544444442 0.1312685 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -58 0.644444466 0.211592883 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -32 0.355555564 0.118712477 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family Black Male United-States 0 -59 0.655555546 0.0767553151 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -42 0.466666669 0.11287158 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Other-relative White Female United-States 0 -37 0.411111116 0.0536039174 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Iran 0 -40 0.444444448 0.112252608 0.9375 0.1502415 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.04909797 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -56 0.622222245 0.232861072 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.203726 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.0285214912 0.5625 0 0 0.353535354 Private HS-grad Widowed Exec-managerial Not-in-family Black Female United-States 0 -21 0.233333334 0.1642892 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -21 0.233333334 0.08865061 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Own-child White Female Dominican-Republic 0 -47 0.5222222 0.107040793 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Wife White Female United-States 0 -22 0.244444445 0.0221734289 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 -35 0.3888889 0.170334846 0.75 0.143441439 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 1 -41 0.455555558 0.104840361 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Other-relative Black Female United-States 0 -43 0.477777779 0.10446924 0.8125 0 0 0.535353541 Federal-gov Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -60 0.6666667 0.0557518154 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -73 0.811111152 0.0176789332 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Sales Husband White Male United-States 1 -90 1 0.05993851 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female England 1 -62 0.6888889 0.08429621 0.5625 0 0 0.3838384 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -28 0.311111122 0.146856785 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.03605026 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.174682513 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -30 0.333333343 0.199671313 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -19 0.211111113 0.187858865 0.5 0 0 0.5252525 Private 12th Never-married Handlers-cleaners Own-child Black Female United-States 0 -23 0.25555557 0.3807578 0.625 0.0220202189 0 0.8080808 Private Some-college Never-married Other-service Own-child Black Male United-States 0 -22 0.244444445 0.184617817 0.8125 0 0 0.1010101 Federal-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -19 0.211111113 0.182607323 0.5625 0 0 0.282828271 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -45 0.5 0.1394937 0.75 0 0.4775023 0.4040404 Federal-gov Assoc-acdm Divorced Adm-clerical Unmarried Asian-Pac-Islander Male Philippines 0 -26 0.2888889 0.09334986 0.5625 0 0 0.25252524 Local-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 -42 0.466666669 0.121899642 0.375 1 0 0.4040404 Local-gov 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -62 0.6888889 0.107724436 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -61 0.677777767 0.07470845 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.02348076 0.8125 0 0.359045 0.6060606 Private Bachelors Divorced Sales Not-in-family Amer-Indian-Eskimo Male United-States 1 -22 0.244444445 0.1099242 0.5625 0 0 0.535353541 Local-gov HS-grad Never-married Other-service Own-child White Female United-States 0 -56 0.622222245 0.0740908161 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.154273748 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -24 0.266666681 0.0975938 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried White Male United-States 0 -26 0.2888889 0.142517209 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.0326381326 0.5625 0 0.383149683 0.454545468 Private HS-grad Never-married Sales Own-child Black Female United-States 0 -58 0.644444466 0.135645136 0.75 0 0.430670351 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Male United-States 0 -25 0.2777778 0.09190378 0.75 0 0 0.353535354 Self-emp-not-inc Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 -23 0.25555557 0.130386844 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.0614189357 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -54 0.6 0.153452709 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -28 0.311111122 0.183158278 0.625 0 0 0.353535354 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -35 0.3888889 0.0413166247 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.106268927 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.135838434 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.1537814 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -72 0.8 0.0224987455 0.375 0 0 0.2020202 Private 10th Widowed Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.06951213 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.18793565 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -54 0.6 0.143524811 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -58 0.644444466 0.08493539 0.875 0 0.454545438 0.454545468 Private Masters Divorced Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.0802341253 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -65 0.722222269 0.0215019155 0.625 0 0 0.151515156 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.170942381 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male ? 0 -52 0.5777778 0.179253116 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 -65 0.722222269 0.124604553 0.375 0 0 0.2020202 Private 10th Widowed Sales Not-in-family White Female United-States 0 -33 0.366666675 0.0229688734 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family White Female United-States 0 -35 0.3888889 0.0776006058 0.5625 0.06497065 0 0.656565666 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 -27 0.3 0.194977462 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -34 0.377777785 0.193915963 0.5625 0 0 0.424242437 State-gov HS-grad Never-married Other-service Own-child Black Male United-States 0 -53 0.5888889 0.106609732 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.04086199 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male Portugal 0 -43 0.477777779 0.15018338 1 0 0 0.4040404 State-gov Doctorate Separated Prof-specialty Unmarried White Female United-States 1 -58 0.644444466 0.1647499 0.6875 0.03908039 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.101434968 0.375 0 0.8654729 0.4040404 Private 10th Separated Adm-clerical Unmarried White Male United-States 0 -26 0.2888889 0.134129673 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -60 0.6666667 0.0886917 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.233316392 0.5625 0 0.3838384 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.263434142 0.5625 0 0 0.3030303 Federal-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -29 0.322222233 0.188821346 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -54 0.6 0.127169371 1 0 0 0.5050505 State-gov Doctorate Never-married Exec-managerial Not-in-family White Female United-States 1 -41 0.455555558 0.18689774 0.25 0 0 0.363636374 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -63 0.7 0.122287594 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -31 0.344444454 0.106785528 0.5625 0 0 0.272727281 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -23 0.25555557 0.211202234 0.8125 0 0 0.25252524 Private Bachelors Never-married Sales Own-child Black Female United-States 0 -31 0.344444454 0.398537755 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Transport-moving Not-in-family Black Male ? 0 -41 0.455555558 0.1806305 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.264218152 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -59 0.655555546 0.157143682 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.350393534 0.625 0 0 0.454545468 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.125837117 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Never-married Exec-managerial Not-in-family Black Male United-States 0 -67 0.7444445 0.0950256139 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 -65 0.722222269 0.13337262 0.5625 0 0 0.353535354 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -47 0.5222222 0.133804366 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.2756305 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male Guatemala 0 -38 0.422222227 0.2532658 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -55 0.6111111 0.05399524 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -39 0.433333337 0.06692036 0.875 0.01506015 0 0.4040404 Private Masters Divorced Prof-specialty Own-child White Female United-States 0 -24 0.266666681 0.05580031 0.5625 0 0 0.5050505 Private HS-grad Separated Other-service Unmarried White Female Portugal 1 -24 0.266666681 0.0149531392 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband Asian-Pac-Islander Male Thailand 0 -38 0.422222227 0.185372189 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -19 0.211111113 0.07920429 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -32 0.355555564 0.139871553 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -63 0.7 0.121223412 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.129711285 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -36 0.4 0.04465803 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -41 0.455555558 0.135158837 0.8125 0.06497065 0 0.4040404 Private Bachelors Divorced Transport-moving Own-child Black Male United-States 0 -57 0.6333333 0.0217989441 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Not-in-family White Male United-States 0 -48 0.533333361 0.0191937126 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.15018338 0.5625 0 0.3452709 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -25 0.2777778 0.107941307 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Asian-Pac-Islander Male China 0 -48 0.533333361 0.08131178 0.5 0 0 0.5050505 Private 12th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -20 0.222222224 0.06178534 0.625 0 0 0.08080808 Private Some-college Never-married Sales Own-child White Female United-States 0 -74 0.822222233 0.09896175 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.138550088 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -26 0.2888889 0.122358315 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -54 0.6 0.188220561 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -39 0.433333337 0.1398042 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -38 0.422222227 0.0151504846 0.625 0.07443074 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -18 0.2 0.141459748 0.375 0 0 0.4040404 Private 10th Never-married Other-service Other-relative White Female United-States 0 -32 0.355555564 0.128570318 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family Other Female ? 0 -24 0.266666681 0.07400056 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -19 0.211111113 0.19213447 0.3125 0 0 0.353535354 Self-emp-not-inc 9th Never-married Prof-specialty Not-in-family White Male Mexico 0 -28 0.311111122 0.129714653 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.156896487 0.5625 0 0 0.3030303 Private HS-grad Separated Handlers-cleaners Not-in-family Other Male United-States 0 -49 0.544444442 0.0211078972 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.205527022 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -63 0.7 0.127240092 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Other-relative Black Female Haiti 0 -58 0.644444466 0.0950795 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -68 0.75555557 0.09174752 0.5625 0 0 0.151515156 Self-emp-inc HS-grad Widowed Other-service Unmarried White Female United-States 0 -41 0.455555558 0.250138581 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -21 0.233333334 0.134152576 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -27 0.3 0.149097636 0.625 0.03103031 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.271886349 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -50 0.5555556 0.1305788 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -47 0.5222222 0.206224814 0.625 0 0 0.444444448 Private Some-college Divorced Other-service Own-child White Female United-States 0 -64 0.7111111 0.107723758 0.5625 0.0861408561 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Male United-States 1 -54 0.6 0.08364894 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -28 0.311111122 0.0470443629 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -26 0.2888889 0.114044882 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -35 0.3888889 0.116068177 0.8125 0 0 0.424242437 State-gov Bachelors Separated Exec-managerial Not-in-family White Male United-States 0 -48 0.533333361 0.0800758451 0.5625 0.0288502872 0 0.151515156 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.111954905 0.75 0.0394203924 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Wife White Female United-States 0 -39 0.433333337 0.1255603 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -46 0.51111114 0.12984331 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -41 0.455555558 0.07113602 0.625 0 0 0.4848485 Private Some-college Widowed Adm-clerical Unmarried Black Female United-States 0 -24 0.266666681 0.09504447 0.25 0.0258002579 0 0.4040404 Private 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 -57 0.6333333 0.10795074 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.110801138 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male Columbia 0 -41 0.455555558 0.139810935 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband Black Male India 1 -55 0.6111111 0.211888567 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -41 0.455555558 0.171502084 0.6875 0 0 0.8080808 ? Assoc-voc Divorced ? Not-in-family White Male United-States 0 -69 0.7666667 0.107443571 0.25 0.0296402965 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Unmarried Black Female United-States 0 -22 0.244444445 0.07552342 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -45 0.5 0.129881024 0.5625 0.0394203924 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -33 0.366666675 0.1389367 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Male United-States 0 -57 0.6333333 0.20802854 0.625 0 0 0.4040404 Private Some-college Separated Sales Not-in-family White Female United-States 0 -38 0.422222227 0.06277745 0.8125 0 0.43663913 0.656565666 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 -40 0.444444448 0.13879256 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.208724976 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Handlers-cleaners Own-child White Female United-States 0 -38 0.422222227 0.145570338 0.625 0 0 0.353535354 Local-gov Some-college Married-spouse-absent Exec-managerial Unmarried Black Female United-States 0 -26 0.2888889 0.193587288 0.8125 0 0 0.6060606 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.110186875 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -35 0.3888889 0.114562824 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Other-service Unmarried Black Female United-States 0 -37 0.411111116 0.193325281 0.625 0.05178052 0 0.75757575 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.04005779 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -37 0.411111116 0.06678162 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -37 0.411111116 0.1393462 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -28 0.311111122 0.119295754 0.875 0 0 0.8080808 Private Masters Never-married Exec-managerial Not-in-family White Female ? 0 -22 0.244444445 0.117017187 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.122693062 0.4375 0 0 0.4040404 Private 11th Never-married Adm-clerical Not-in-family White Female Germany 0 -45 0.5 0.209523112 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -29 0.322222233 0.262582123 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 -23 0.25555557 0.200142115 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -24 0.266666681 0.08791915 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -25 0.2777778 0.09247696 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Own-child White Female United-States 0 -58 0.644444466 0.212995172 0.5625 0 0 0.323232323 Private HS-grad Divorced Sales Other-relative White Female United-States 0 -28 0.311111122 0.0221741032 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Never-married Sales Not-in-family White Male United-States 0 -58 0.644444466 0.07968115 0.5625 0 0 0.353535354 Private HS-grad Widowed Sales Not-in-family White Female United-States 1 -18 0.2 0.1267868 0.4375 0 0 0.161616161 Private 11th Never-married Other-service Own-child White Male United-States 0 -59 0.655555546 0.1594465 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Protective-serv Husband White Male Puerto-Rico 0 -39 0.433333337 0.141036108 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -53 0.5888889 0.195756063 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.149467409 0.9375 0 0 0.656565666 Private Prof-school Never-married Prof-specialty Other-relative White Female United-States 0 -51 0.566666663 0.118034221 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -59 0.655555546 0.107579619 0.875 0.07298073 0 0.5555556 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.108014055 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Protective-serv Not-in-family White Male United-States 1 -36 0.4 0.310726374 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -37 0.411111116 0.126160413 0.625 0 0 0.6060606 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.0197426435 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -38 0.422222227 0.132932141 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -19 0.211111113 0.203237012 0.5625 0 0 0.3030303 Private HS-grad Separated Adm-clerical Own-child White Female United-States 0 -55 0.6111111 0.09122284 0.8125 0 0 0.4848485 Local-gov Bachelors Widowed Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.229619354 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -27 0.3 0.104436234 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -65 0.722222269 0.135211378 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -44 0.4888889 0.217973948 0.8125 0 0 0.05050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -23 0.25555557 0.104344636 0.1875 0 0 0.5050505 ? 5th-6th Never-married ? Not-in-family White Male United-States 0 -32 0.355555564 0.08851927 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -60 0.6666667 0.124093339 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 -28 0.311111122 0.100874588 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male Cambodia 0 -44 0.4888889 0.08414062 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male Mexico 0 -29 0.322222233 0.170406252 0.5625 0 0 0.161616161 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -57 0.6333333 0.169041 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.0701796 0.625 0 0 0.6060606 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 -34 0.377777785 0.1685062 0.4375 0 0 0.6060606 Self-emp-not-inc 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -44 0.4888889 0.126847416 0.625 0 0 0.424242437 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -44 0.4888889 0.126167834 0.8125 0 0 0.4040404 Private Bachelors Divorced Transport-moving Not-in-family White Male United-States 0 -57 0.6333333 0.08804039 0.125 0 0 0.222222224 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -37 0.411111116 0.0275846049 0.8125 0 0 0.3030303 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -35 0.3888889 0.07215238 0.8125 0 0 0.161616161 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.0981434062 0.875 1 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male ? 1 -27 0.3 0.09021119 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -41 0.455555558 0.197672263 0.625 0.03103031 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -28 0.311111122 0.136902615 0.8125 0 0 0.08080808 ? Bachelors Never-married ? Not-in-family White Male United-States 0 -37 0.411111116 0.0965632945 1 0 0 0.6060606 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -18 0.2 0.0348816775 0.625 0 0 0.08080808 Private Some-college Never-married Other-service Own-child White Male United-States 0 -24 0.266666681 0.142148778 0.25 0 0 0.2020202 State-gov 7th-8th Never-married Tech-support Unmarried White Female United-States 0 -53 0.5888889 0.05509108 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Adm-clerical Wife White Female United-States 0 -40 0.444444448 0.09375129 0.5625 0 0.454545438 0.4848485 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -54 0.6 0.101703033 0.625 0 0 0.6060606 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -22 0.244444445 0.224055961 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -44 0.4888889 0.161677241 0.375 0 0 0.3030303 Private 10th Married-spouse-absent Adm-clerical Unmarried Black Female United-States 0 -43 0.477777779 0.125404045 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Unmarried White Female Iran 0 -58 0.644444466 0.1504676 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -59 0.655555546 0.06899822 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -31 0.344444454 0.159357592 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.190769881 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -17 0.188888893 0.10110157 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Female United-States 0 -45 0.5 0.06875171 0.625 0 0 0.323232323 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -40 0.444444448 0.2524165 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 -35 0.3888889 0.02190873 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -25 0.2777778 0.03371242 0.8125 0 0 0.454545468 Federal-gov Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -58 0.644444466 0.143371239 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -39 0.433333337 0.0206593238 0.625 0 0 0.5050505 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 1 -69 0.7666667 0.16720359 0.125 0 0 0.343434334 ? 1st-4th Married-civ-spouse ? Husband Asian-Pac-Islander Male Philippines 0 -23 0.25555557 0.2825841 0.5625 0 0 0.545454562 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.119361088 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -48 0.533333361 0.07958349 0.75 0 0 0.444444448 Private Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 -41 0.455555558 0.078393355 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male Germany 0 -74 0.822222233 0.130875826 0.3125 0 0 0.1010101 Private 9th Widowed Craft-repair Not-in-family White Male ? 0 -43 0.477777779 0.07536514 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.130187482 0.625 0 0.395087242 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -24 0.266666681 0.193969846 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Armed-Forces Not-in-family White Male United-States 0 -58 0.644444466 0.09944939 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -54 0.6 0.0792574957 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -60 0.6666667 0.126259431 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.276385546 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -41 0.455555558 0.139810935 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -62 0.6888889 0.0374626629 0.625 0 0 0.353535354 ? Some-college Married-civ-spouse ? Husband Black Male United-States 1 -27 0.3 0.182691514 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Unmarried Black Male Jamaica 0 -30 0.333333343 0.127161965 0.625 0 0 0.2020202 Private Some-college Divorced Other-service Own-child White Female United-States 0 -63 0.7 0.113595635 0.8125 0 0 0.353535354 Local-gov Bachelors Divorced Craft-repair Not-in-family Black Male Outlying-US(Guam-USVI-etc) 0 -33 0.366666675 0.310100675 0.5625 0.0332503319 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -34 0.377777785 0.162917882 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.08962117 0.3125 0 0 0.4040404 ? 9th Never-married ? Own-child White Male United-States 0 -51 0.566666663 0.130731016 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -21 0.233333334 0.147596329 0.375 0 0 0.25252524 Private 10th Never-married Other-service Own-child Black Male United-States 0 -50 0.5555556 0.0212978348 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.139883012 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.03842649 0.5625 0.0288502872 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.07399046 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -20 0.222222224 0.248990878 0.5625 0 0 0.434343427 ? HS-grad Never-married ? Not-in-family Other Male United-States 0 -17 0.188888893 0.03610886 0.5 0 0 0.0606060624 Private 12th Never-married Other-service Own-child White Female United-States 0 -47 0.5222222 0.232312828 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Transport-moving Not-in-family Black Male United-States 0 -25 0.2777778 0.133907408 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Adm-clerical Other-relative Black Female United-States 0 -71 0.788888931 0.12172991 0.875 0 0 0.2020202 Private Masters Never-married Other-service Not-in-family White Female United-States 0 -21 0.233333334 0.126673654 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Female United-States 0 -69 0.7666667 0.107143849 0.4375 0 0 0.4848485 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -48 0.533333361 0.117753364 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -57 0.6333333 0.0961746648 0.25 0 0.3677686 0.0303030312 Private 7th-8th Widowed Sales Other-relative White Female United-States 0 -58 0.644444466 0.029110834 0.625 0 0.5544077 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -34 0.377777785 0.127120212 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Machine-op-inspct Other-relative Other Female Columbia 0 -33 0.366666675 0.149965152 0.625 0 0 0.6666667 Local-gov Some-college Married-civ-spouse Handlers-cleaners Husband White Male ? 0 -56 0.622222245 0.169620231 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male ? 0 -40 0.444444448 0.07569719 0.875 0 0 0.4040404 Federal-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -28 0.311111122 0.141200438 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -42 0.466666669 0.211452782 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male Ecuador 0 -19 0.211111113 0.090909645 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 -41 0.455555558 0.102877006 0.6875 0.0332503319 0 0.4040404 Private Assoc-voc Divorced Tech-support Not-in-family White Female United-States 0 -28 0.311111122 0.103246778 0.5625 0 0 0.353535354 Self-emp-inc HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.238048643 0.375 0 0 0.353535354 Private 10th Divorced Machine-op-inspct Not-in-family White Female United-States 0 -23 0.25555557 0.0650870055 0.625 0 0 0.3030303 Private Some-college Never-married Machine-op-inspct Own-child Asian-Pac-Islander Male United-States 0 -46 0.51111114 0.136431143 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 1 -39 0.433333337 0.101068564 0.875 0 0 0.5050505 Private Masters Never-married Sales Not-in-family White Male United-States 1 -39 0.433333337 0.07735139 0.8125 0 0.430670351 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -45 0.5 0.08947703 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 -21 0.233333334 0.0278546922 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 -50 0.5555556 0.06311355 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Sales Not-in-family White Female United-States 0 -33 0.366666675 0.2083579 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -34 0.377777785 0.08290132 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Own-child White Female United-States 0 -55 0.6111111 0.117640883 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -62 0.6888889 0.1194143 0.5625 0 0 0.4040404 Federal-gov HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -31 0.344444454 0.14270848 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.306400955 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.156579927 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 -57 0.6333333 0.1647499 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.10162019 0.5625 0 0.4331956 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -51 0.566666663 0.173325345 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -47 0.5222222 0.221689835 0.5625 0.04386044 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.07877659 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -58 0.644444466 0.180280268 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male Mexico 0 -39 0.433333337 0.03224277 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 1 -34 0.377777785 0.19931367 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male England 1 -45 0.5 0.118289493 0.5625 0 0 0.3838384 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.08728064 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -42 0.466666669 0.12809211 0.8125 1 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.113201618 0.6875 0.0332503319 0 0.4040404 Private Assoc-voc Divorced Tech-support Not-in-family White Male United-States 0 -39 0.433333337 0.136072159 0.9375 0 0.453856736 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.136499852 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -56 0.622222245 0.06832065 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Other-relative Amer-Indian-Eskimo Female United-States 0 -19 0.211111113 0.0803082138 0.625 0 0 0.151515156 ? Some-college Never-married ? Other-relative White Female United-States 0 -37 0.411111116 0.242972851 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 -60 0.6666667 0.06282191 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -56 0.622222245 0.09804911 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.0685132742 0.25 0.03908039 0 0.474747479 Private 7th-8th Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 -34 0.377777785 0.09145588 0.8125 0 0 0.363636374 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.14711003 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Female United-States 0 -19 0.211111113 0.08601642 0.5625 0 0 0.3030303 Private HS-grad Never-married Farming-fishing Own-child Black Male United-States 0 -37 0.411111116 0.301970422 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Exec-managerial Unmarried Black Female United-States 0 -58 0.644444466 0.209011227 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.169408068 0.4375 0 0 0.353535354 Private 11th Never-married Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.172090083 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -36 0.4 0.07853951 0.5625 0.0486504845 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.04782701 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female Philippines 0 -22 0.244444445 0.1178517 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Tech-support Own-child White Female United-States 0 -32 0.355555564 0.0727572143 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family White Male United-States 0 -17 0.188888893 0.137413159 0.4375 0 0 0.151515156 Private 11th Never-married Sales Unmarried White Male United-States 0 -57 0.6333333 0.246892825 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Female United-States 0 -68 0.75555557 0.08206748 0.25 0 0 0.2020202 Private 7th-8th Widowed Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 -70 0.7777778 0.1873362 0.5625 0.0343203433 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.07724834 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -19 0.211111113 0.3615028 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Other-relative White Female Japan 0 -51 0.566666663 0.06360321 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -19 0.211111113 0.192632213 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Other-relative White Male Nicaragua 0 -47 0.5222222 0.06848768 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.237645864 0.8125 0.07688077 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.06677825 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -30 0.333333343 0.155864641 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.106988259 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -41 0.455555558 0.128500953 0.8125 0 0 0.2020202 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -25 0.2777778 0.20644708 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -62 0.6888889 0.102476925 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 -23 0.25555557 0.208512813 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -26 0.2888889 0.0881198645 0.8125 0 0 0.1010101 ? Bachelors Never-married ? Unmarried White Female United-States 0 -25 0.2777778 0.131269857 0.5625 0.068490684 0 0.4040404 Private HS-grad Never-married Sales Own-child Amer-Indian-Eskimo Male United-States 0 -30 0.333333343 0.08761202 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -48 0.533333361 0.02693195 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -20 0.222222224 0.255402923 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative Other Male Mexico 0 -51 0.566666663 0.127811253 0.625 0 0 0.151515156 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -19 0.211111113 0.119988151 0.625 0 0 0.1010101 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -31 0.344444454 0.223868713 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -36 0.4 0.118379749 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.1765078 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -40 0.444444448 0.185522377 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Male United-States 0 -30 0.333333343 0.187594175 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Never-married Farming-fishing Own-child Black Male United-States 0 -28 0.311111122 0.0368308872 0.625 0 0.365013778 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -57 0.6333333 0.0916727558 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband Black Male United-States 1 -18 0.2 0.1386767 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Male United-States 0 -54 0.6 0.141937956 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -32 0.355555564 0.112233743 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -52 0.5777778 0.124794491 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.121608675 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried White Female United-States 0 -45 0.5 0.134072423 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 0 -18 0.2 0.09766587 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -37 0.411111116 0.124371514 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -52 0.5777778 0.241498485 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -59 0.655555546 0.20706 0.3125 0 0 0.5050505 Private 9th Never-married Other-service Not-in-family Black Male United-States 0 -27 0.3 0.317955434 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Not-in-family White Male United-States 0 -43 0.477777779 0.07783499 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -56 0.622222245 0.0218535 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.0223081354 0.625 0 0 0.727272749 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -37 0.411111116 0.123489179 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.080684714 0.6875 0.105201051 0 0.5050505 Private Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 1 -48 0.533333361 0.06592757 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Separated Other-service Other-relative White Female United-States 0 -58 0.644444466 0.0213725958 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.138916492 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.0695916042 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.09122082 0.9375 0 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.253555417 0.6875 0 0 0.3838384 Private Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 -52 0.5777778 0.10823901 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -30 0.333333343 0.08870382 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -22 0.244444445 0.164236 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Own-child White Male United-States 0 -55 0.6111111 0.235676453 0.75 0 0 0.6060606 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -61 0.677777767 0.114677332 0.5625 0.1502415 0 0.3838384 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -33 0.366666675 0.124136448 0.5625 0 0 0.3030303 Private HS-grad Divorced Handlers-cleaners Unmarried White Male United-States 0 -46 0.51111114 0.151007786 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -64 0.7111111 0.102067418 0.4375 0 0 0.161616161 Private 11th Widowed Tech-support Unmarried White Female United-States 0 -28 0.311111122 0.155719146 0.375 0 0 0.4040404 Private 10th Married-spouse-absent Craft-repair Unmarried White Male Mexico 0 -19 0.211111113 0.1885681 0.5625 0 0 0.424242437 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.109551057 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Male Columbia 0 -43 0.477777779 0.0876443461 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.107846342 1 0 0 0.4040404 Self-emp-not-inc Doctorate Divorced Adm-clerical Other-relative Other Male ? 0 -56 0.622222245 0.108884931 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.135827661 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 -40 0.444444448 0.09236987 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -45 0.5 0.0823099539 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.12337064 0.875 0 0 0.4040404 Local-gov Masters Widowed Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.08521087 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Female ? 0 -35 0.3888889 0.124639578 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -36 0.4 0.275089681 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.133751154 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -61 0.677777767 0.134166718 0.25 0 0 0.212121218 Private 7th-8th Widowed Other-service Not-in-family Black Female United-States 0 -31 0.344444454 0.124136448 0.6875 0 0.454545438 0.6060606 Private Assoc-voc Never-married Transport-moving Own-child White Male United-States 0 -63 0.7 0.116346344 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -41 0.455555558 0.138177618 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -48 0.533333361 0.111108944 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -45 0.5 0.109520748 0.5625 0 0 0.353535354 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -24 0.266666681 0.120984979 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.0696488544 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family Black Male Germany 1 -27 0.3 0.0245435964 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -26 0.2888889 0.0387363136 0.6875 0 0 0.4848485 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 -27 0.3 0.12661168 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -55 0.6111111 0.265216321 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.07323071 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.121607326 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -51 0.566666663 0.118703716 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -56 0.622222245 0.04763236 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.0241731536 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -50 0.5555556 0.191065565 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.07108483 0.8125 0 0.4708448 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -44 0.4888889 0.275285 0.5625 0.0367403664 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -21 0.233333334 0.0390084237 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Own-child White Male United-States 0 -37 0.411111116 0.119871624 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.119420357 0.375 0 0 0.4040404 ? 10th Divorced ? Not-in-family White Male Columbia 0 -18 0.2 0.07802156 0.5 0 0 0.3030303 Private 12th Never-married Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.138247 0.5625 0.0288502872 0 0.8080808 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -38 0.422222227 0.07934371 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -19 0.211111113 0.142354876 0.5625 0 0 0.121212125 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -46 0.51111114 0.116685137 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.231157035 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 -22 0.244444445 0.270552069 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female Mexico 0 -38 0.422222227 0.1320956 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.113814533 0.875 0.14084141 0 0.5050505 Private Masters Divorced Exec-managerial Own-child White Female United-States 1 -83 0.922222257 0.144046128 0.5625 0 0 0.08080808 Self-emp-not-inc HS-grad Widowed Exec-managerial Not-in-family White Male United-States 0 -34 0.377777785 0.0371629372 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -38 0.422222227 0.103708148 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.08026914 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 -27 0.3 0.11390613 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 1 -38 0.422222227 0.105441824 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.07382544 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -38 0.422222227 0.0179820228 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -52 0.5777778 0.159288883 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.206309676 0.875 0 0 0.5050505 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -17 0.188888893 0.163515985 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.0839762762 0.8125 0.068490684 0 0.6060606 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -52 0.5777778 0.0295742266 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -34 0.377777785 0.07598816 0.5625 0.0246302467 0 0.4040404 Private HS-grad Separated Handlers-cleaners Not-in-family White Male United-States 0 -25 0.2777778 0.0998851657 0.8125 0 0 0.151515156 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -17 0.188888893 0.0898825 0.3125 0 0 0.262626261 Private 9th Never-married Other-service Own-child Black Male United-States 0 -22 0.244444445 0.177590832 0.5625 0 0 0.8080808 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -22 0.244444445 0.186228245 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -46 0.51111114 0.128049016 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -58 0.644444466 0.213833049 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Female United-States 0 -39 0.433333337 0.101870745 0.625 0 0 0.353535354 Private Some-college Divorced Sales Other-relative White Female United-States 0 -59 0.655555546 0.0879178047 0.625 0 0 0.4040404 Local-gov Some-college Widowed Other-service Not-in-family White Female Poland 0 -61 0.677777767 0.107807279 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -32 0.355555564 0.2018145 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.115325943 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Philippines 1 -51 0.566666663 0.0224313922 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.064412795 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Other-service Wife Asian-Pac-Islander Female ? 0 -20 0.222222224 0.164260238 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -38 0.422222227 0.122395359 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -44 0.4888889 0.135673419 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 1 -28 0.311111122 0.224982068 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Sales Not-in-family White Male United-States 0 -50 0.5555556 0.148190379 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 -53 0.5888889 0.0483409166 1 0 0 0.5050505 Private Doctorate Divorced Prof-specialty Not-in-family White Male United-States 0 -42 0.466666669 0.0186306369 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -47 0.5222222 0.128921911 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 -39 0.433333337 0.08348123 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -38 0.422222227 0.0254447851 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -34 0.377777785 0.115319878 0.8125 0 0 0.5050505 State-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -40 0.444444448 0.06328193 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 0 -63 0.7 0.110331014 0.625 0 0 0.2020202 Private Some-college Widowed Sales Not-in-family White Female United-States 0 -53 0.5888889 0.233550772 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -43 0.477777779 0.126918152 0.6875 0 0 0.4848485 Private Assoc-voc Divorced Prof-specialty Not-in-family White Male United-States 0 -28 0.311111122 0.0487928577 0.625 0 0.383149683 0.6060606 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -68 0.75555557 0.125513151 0.5625 0 0 0.1010101 Private HS-grad Widowed Exec-managerial Not-in-family White Female United-States 1 -22 0.244444445 0.144296676 0.25 0 0 0.4040404 ? 7th-8th Never-married ? Unmarried White Female Mexico 0 -46 0.51111114 0.265951842 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -57 0.6333333 0.17689845 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -38 0.422222227 0.08456226 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -66 0.733333349 0.129658088 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.08844181 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 -54 0.6 0.167926967 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.116356447 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -35 0.3888889 0.141437531 0.4375 0 0 0.08080808 Private 11th Separated Priv-house-serv Unmarried White Female Mexico 0 -30 0.333333343 0.11245399 0.8125 0 0 0.373737365 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -39 0.433333337 0.212359369 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -31 0.344444454 0.191757292 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family Black Male United-States 0 -50 0.5555556 0.112187274 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -30 0.333333343 0.117096663 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.127445519 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 -24 0.266666681 0.14196828 0.8125 0 0 0.4040404 Private Bachelors Never-married Priv-house-serv Not-in-family White Female France 0 -59 0.655555546 0.115395315 0.5625 0 0.5369605 0.4040404 Local-gov HS-grad Separated Protective-serv Other-relative Black Female United-States 0 -45 0.5 0.13459374 0.8125 0 0 0.151515156 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -64 0.7111111 0.169253826 0.1875 0 0 0.2020202 Private 5th-6th Separated Other-service Other-relative White Female Cuba 0 -61 0.677777767 0.0823368952 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Other-service Wife White Female United-States 0 -42 0.466666669 0.128488153 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Unmarried White Female United-States 0 -28 0.311111122 0.187738314 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -53 0.5888889 0.08416689 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -33 0.366666675 0.112800859 0.4375 0 0 0.07070707 Self-emp-not-inc 11th Divorced Handlers-cleaners Not-in-family White Male United-States 0 -34 0.377777785 0.165759534 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 0 -41 0.455555558 0.11558862 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -67 0.7444445 0.177877083 0.625 0.09386094 0 0.24242425 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male Cuba 1 -46 0.51111114 0.119292386 0.75 0 0 0.272727281 Private Assoc-acdm Widowed Prof-specialty Unmarried White Female United-States 0 -32 0.355555564 0.09843976 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -41 0.455555558 0.133491844 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.05368878 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Other Male United-States 0 -54 0.6 0.104253039 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -33 0.366666675 0.12286818 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried Black Male United-States 0 -20 0.222222224 0.233913139 0.5625 0 0 0.323232323 ? HS-grad Never-married ? Own-child White Male United-States 0 -34 0.377777785 0.07987041 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -20 0.222222224 0.148066461 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Male ? 0 -17 0.188888893 0.100201055 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child Black Male United-States 0 -45 0.5 0.13296783 0.625 0 0 0.4848485 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.1705322 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -25 0.2777778 0.12950249 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -38 0.422222227 0.0872718841 0.5625 0 0 0.414141417 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.117065005 0.4375 0 0 0.151515156 Private 11th Never-married Craft-repair Own-child White Female United-States 0 -35 0.3888889 0.146758452 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -38 0.422222227 0.0693322942 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.274461925 0.75 0 0 0.565656543 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 -25 0.2777778 0.03371242 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male Japan 0 -57 0.6333333 0.15719083 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male Cuba 0 -32 0.355555564 0.1825063 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 -39 0.433333337 0.183313191 0.8125 0 0 0.3030303 Local-gov Bachelors Separated Prof-specialty Not-in-family Black Male United-States 0 -23 0.25555557 0.134649649 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -21 0.233333334 0.205954045 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 -47 0.5222222 0.07252754 0.5625 0 0 0.4848485 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -25 0.2777778 0.12696597 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Other-relative White Female Dominican-Republic 0 -18 0.2 0.0190684348 0.4375 0 0 0.353535354 ? 11th Never-married ? Own-child White Female United-States 0 -41 0.455555558 0.132732764 0.625 0.046500463 0 0.4040404 Federal-gov Some-college Married-spouse-absent Adm-clerical Not-in-family Black Male United-States 0 -19 0.211111113 0.1197807 0.5625 0 0 0.151515156 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -24 0.266666681 0.052310057 0.5625 0 0 0.424242437 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -57 0.6333333 0.08602922 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.1159658 1 0 0.6483012 0.4040404 ? Doctorate Never-married ? Not-in-family White Male United-States 1 -32 0.355555564 0.0718944147 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -28 0.311111122 0.129883036 0.6875 0 0 0.454545468 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.0535668731 0.8125 0 0 0.75757575 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.227497056 0.625 0 0 0.2020202 State-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 -45 0.5 0.0223842449 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -17 0.188888893 0.0229594428 0.5 0 0 0.25252524 ? 12th Never-married ? Own-child White Female United-States 0 -55 0.6111111 0.119150944 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.115947612 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -49 0.544444442 0.134072423 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -38 0.422222227 0.0323922932 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -50 0.5555556 0.09676266 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -47 0.5222222 0.113380775 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -43 0.477777779 0.13148202 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife Black Female ? 0 -39 0.433333337 0.155134529 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male Canada 1 -42 0.466666669 0.253297448 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.2897377 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Other-relative Black Female United-States 0 -44 0.4888889 0.162071258 0.75 0.0235402342 0 0.4040404 Federal-gov Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 -50 0.5555556 0.106616467 0.9375 1 0 0.8080808 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.0193540137 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 -37 0.411111116 0.112804905 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -59 0.655555546 0.07624613 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -56 0.622222245 0.07001256 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.2091493 0.5 0 0 0.323232323 Self-emp-not-inc 12th Never-married Craft-repair Not-in-family Black Male United-States 0 -35 0.3888889 0.0708140656 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -44 0.4888889 0.103380136 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male United-States 0 -57 0.6333333 0.171716943 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.07957742 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family Black Female United-States 0 -18 0.2 0.180483669 0.4375 0 0 0.151515156 Private 11th Never-married Sales Not-in-family White Female United-States 0 -43 0.477777779 0.0341118276 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.0994810462 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Other Male United-States 0 -18 0.2 0.3009157 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -47 0.5222222 0.11333026 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -53 0.5888889 0.0788426 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -59 0.655555546 0.0949394 0.6875 0 0 0.353535354 Self-emp-not-inc Assoc-voc Never-married Exec-managerial Not-in-family White Male United-States 1 -35 0.3888889 0.125362277 0.875 0 0 0.3838384 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 0 -49 0.544444442 0.180664852 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.326743037 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 -25 0.2777778 0.0211153068 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male England 0 -36 0.4 0.142001271 0.875 0 0 0.3030303 State-gov Masters Never-married Prof-specialty Own-child White Female United-States 0 -29 0.322222233 0.132295638 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -52 0.5777778 0.115959063 0.375 0 0 0.25252524 Private 10th Divorced Other-service Other-relative White Female United-States 0 -50 0.5555556 0.125657961 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.0803924054 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child Asian-Pac-Islander Female United-States 0 -44 0.4888889 0.0738759562 0.875 0 0 0.4040404 Self-emp-not-inc Masters Divorced Exec-managerial Unmarried White Female United-States 0 -32 0.355555564 0.114224039 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -49 0.544444442 0.08447537 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -31 0.344444454 0.3367686 0.125 0 0 0.454545468 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -33 0.366666675 0.150966689 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -50 0.5555556 0.07630472 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -62 0.6888889 0.08351289 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -26 0.2888889 0.0391310081 0.625 0 0.453168035 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -46 0.51111114 0.0253733918 0.5625 0 0 0.151515156 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -55 0.6111111 0.1334575 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.0238471627 0.5625 0 0 0.2020202 Federal-gov HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 -22 0.244444445 0.13431558 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -43 0.477777779 0.0979595259 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.160596222 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -48 0.533333361 0.143431857 0.875 0.1502415 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.03810993 0.4375 0 0 0.5050505 Private 11th Never-married Other-service Own-child White Male United-States 0 -67 0.7444445 0.119169131 0.25 0 0 0.2020202 Local-gov 7th-8th Widowed Other-service Not-in-family White Female United-States 0 -39 0.433333337 0.127009079 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -52 0.5777778 0.210479528 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Divorced Farming-fishing Not-in-family White Female United-States 0 -25 0.2777778 0.187514693 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.07693448 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 1 -18 0.2 0.123941123 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 -41 0.455555558 0.123262875 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 -59 0.655555546 0.138585776 1 0 0 0.5050505 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 -23 0.25555557 0.311370939 0.75 0 0 0.444444448 Private Assoc-acdm Never-married Other-service Own-child Black Male United-States 0 -42 0.466666669 0.068757765 0.5625 0 0 0.151515156 Private HS-grad Divorced Other-service Own-child White Female United-States 0 -54 0.6 0.0561128333 0.9375 0 0 0.3030303 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.167503983 0.5625 0 0 0.6060606 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -57 0.6333333 0.128474683 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Other-service Husband White Male United-States 0 -51 0.566666663 0.109778039 0.375 0 0 0.25252524 Private 10th Divorced Other-service Unmarried White Female United-States 0 -31 0.344444454 0.105670825 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.209051639 0.625 0 0 0.454545468 Private Some-college Married-spouse-absent Adm-clerical Own-child Black Female United-States 0 -35 0.3888889 0.115973212 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -26 0.2888889 0.209803969 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -42 0.466666669 0.298717946 1 0 0 0.454545468 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.102482311 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.104997292 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 -38 0.422222227 0.2104984 0.8125 0 0 0.373737365 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -51 0.566666663 0.190437838 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male Canada 0 -27 0.3 0.138172239 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.0807689056 0.8125 0 0 0.454545468 ? Bachelors Never-married ? Not-in-family Black Male ? 0 -22 0.244444445 0.2703911 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -72 0.8 0.116809063 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male Cuba 0 -25 0.2777778 0.1273162 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 -58 0.644444466 0.0239448249 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.0287639629 0.625 0 0 0.454545468 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -63 0.7 0.0720075741 0.1875 0 0 0.1919192 Private 5th-6th Widowed Other-service Other-relative Asian-Pac-Islander Female Philippines 0 -23 0.25555557 0.0358623452 0.3125 0 0 0.4040404 Private 9th Separated Other-service Not-in-family White Male United-States 0 -51 0.566666663 0.149303734 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -75 0.8333334 0.0484257825 0.0625 0 0 0.4848485 Private Preschool Never-married Priv-house-serv Not-in-family Asian-Pac-Islander Female Philippines 0 -52 0.5777778 0.149596721 0.625 0 0 0.5050505 Private Some-college Divorced Sales Unmarried White Female United-States 0 -69 0.7666667 0.1869651 0.5625 0 0 0.1010101 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -52 0.5777778 0.120551221 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 -40 0.444444448 0.2638531 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -34 0.377777785 0.281550884 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.0264268 0.625 0 0 0.08080808 State-gov Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.05846818 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Other-relative White Female United-States 0 -46 0.51111114 0.0994406343 0.1875 0 0.43663913 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -21 0.233333334 0.124439538 0.625 0 0 0.161616161 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -44 0.4888889 0.128817514 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.07135627 0.5625 0.03908039 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -40 0.444444448 0.0682101846 0.5625 0 0 0.323232323 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -33 0.366666675 0.117884025 0.5625 0 0 0.373737365 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -22 0.244444445 0.240864009 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.055753164 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -75 0.8333334 0.147181436 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 -55 0.6111111 0.120922342 0.4375 0 0 0.4040404 Private 11th Widowed Handlers-cleaners Unmarried White Female United-States 0 -24 0.266666681 0.0224549659 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 -45 0.5 0.100052871 0.625 0.2782828 0 0.565656543 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 1 -31 0.344444454 0.1334063 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -49 0.544444442 0.159348831 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -26 0.2888889 0.112656049 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -61 0.677777767 0.108399987 0.875 0.03103031 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.07246153 0.875 0.03908039 0 0.5050505 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 -28 0.311111122 0.16963236 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -79 0.8777778 0.109880418 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -51 0.566666663 0.203797385 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Other-relative Black Female United-States 0 -44 0.4888889 0.04353188 1 0 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -24 0.266666681 0.05599833 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -46 0.51111114 0.219604567 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.0562206 0.5625 0 0 0.2020202 Private HS-grad Widowed Other-service Unmarried Asian-Pac-Islander Female United-States 0 -23 0.25555557 0.114548013 0.5 0 0 0.3838384 Private 12th Never-married Other-service Not-in-family White Female United-States 0 -25 0.2777778 0.140010983 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -48 0.533333361 0.0806368962 0.625 0 0 0.08080808 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 0 -18 0.2 0.226081952 0.4375 0 0 0.24242425 Private 11th Never-married Other-service Other-relative Black Female United-States 0 -25 0.2777778 0.1431409 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -19 0.211111113 0.0283349231 0.5625 0.0217602178 0 0.454545468 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -26 0.2888889 0.08875635 0.8125 0 0.459595948 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -33 0.366666675 0.159220859 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -42 0.466666669 0.107705571 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -22 0.244444445 0.09014114 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -36 0.4 0.152856633 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.11733038 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -34 0.377777785 0.0334793776 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.136045888 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -62 0.6888889 0.1093463 0.9375 0 0 0.151515156 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.123144329 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Black Female United-States 0 -22 0.244444445 0.258369863 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -34 0.377777785 0.0474612825 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 -43 0.477777779 0.124500155 0.5625 0 0 0.6060606 Private HS-grad Widowed Machine-op-inspct Unmarried White Female United-States 0 -25 0.2777778 0.119051263 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Own-child White Male United-States 0 -35 0.3888889 0.07578071 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Own-child White Female United-States 0 -28 0.311111122 0.09247359 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Not-in-family Black Female United-States 0 -28 0.311111122 0.0254737474 0.625 0 0 0.454545468 Private Some-college Divorced Sales Unmarried White Female United-States 0 -25 0.2777778 0.198765412 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Unmarried Black Female United-States 0 -40 0.444444448 0.275285 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.172178984 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband Other Male Mexico 0 -48 0.533333361 0.119742982 0.25 0 0 0.5050505 Self-emp-not-inc 7th-8th Never-married Farming-fishing Not-in-family White Male United-States 0 -63 0.7 0.120832086 0.5625 0.02290023 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.161838889 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -36 0.4 0.276172042 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.121685453 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -24 0.266666681 0.132236376 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 -32 0.355555564 0.107217938 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -46 0.51111114 0.151589036 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Machine-op-inspct Wife White Female Mexico 0 -19 0.211111113 0.119988151 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Male United-States 0 -30 0.333333343 0.183651969 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family Asian-Pac-Islander Male United-States 0 -35 0.3888889 0.234047174 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.098604776 0.8125 0 0 0.5555556 ? Bachelors Never-married ? Not-in-family White Male United-States 0 -33 0.366666675 0.0506275669 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -25 0.2777778 0.089831315 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 -64 0.7111111 0.05707329 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male United-States 1 -18 0.2 0.06498463 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child Asian-Pac-Islander Female United-States 0 -59 0.655555546 0.247864053 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.0242687948 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Protective-serv Unmarried Black Female United-States 0 -30 0.333333343 0.117339812 1 0 0 0.151515156 Private Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.15408583 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Other-relative White Female Mexico 0 -22 0.244444445 0.163609609 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -49 0.544444442 0.0583961122 0.625 0 0 0.565656543 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 1 -35 0.3888889 0.112176493 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -48 0.533333361 0.08191661 0.875 0 0.3168044 0.4040404 Local-gov Masters Never-married Prof-specialty Unmarried White Female United-States 0 -18 0.2 0.135793313 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 -35 0.3888889 0.0201211683 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -27 0.3 0.113246739 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 -28 0.311111122 0.109384693 0.8125 0 0 0.6060606 Private Bachelors Never-married Craft-repair Not-in-family Black Male United-States 0 -21 0.233333334 0.109220356 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Male Taiwan 0 -26 0.2888889 0.0936994255 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Own-child Black Female United-States 0 -44 0.4888889 0.129575238 0.8125 0 0.4242424 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.249601781 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family Black Male United-States 0 -40 0.444444448 0.1017293 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Craft-repair Not-in-family White Male United-States 0 -70 0.7777778 0.0244567115 0.8125 0.200512 0 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.183156252 0.875 0 0 0.5050505 Private Masters Never-married Exec-managerial Unmarried White Female United-States 0 -34 0.377777785 0.122853361 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family Black Male United-States 0 -66 0.733333349 0.1581075 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -40 0.444444448 0.122677572 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Unmarried Black Male United-States 0 -61 0.677777767 0.145207971 0.5625 0 0.4331956 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -59 0.655555546 0.06496847 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.1384531 0.875 0 0 0.4040404 ? Masters Never-married ? Not-in-family Black Female United-States 0 -47 0.5222222 0.126679033 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -33 0.366666675 0.08166269 0.8125 0 0 0.6060606 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.08572275 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Other-relative White Male United-States 0 -25 0.2777778 0.0770153 0.3125 0.009140091 0 0.4040404 Private 9th Never-married Craft-repair Unmarried White Male United-States 0 -22 0.244444445 0.229828149 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -40 0.444444448 0.112408191 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 1 -68 0.75555557 0.04427142 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -30 0.333333343 0.0978180841 0.75 0 0.404499531 0.4040404 Private Assoc-acdm Divorced Adm-clerical Own-child White Female United-States 0 -73 0.811111152 0.0690440238 0.25 0.06418064 0 1 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 1 -45 0.5 0.192182958 0.25 0 0 0.1010101 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.1192742 0.4375 0 0 0.353535354 Private 11th Never-married Adm-clerical Unmarried Black Male United-States 0 -40 0.444444448 0.161987737 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.147160545 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.2590757 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -51 0.566666663 0.127669141 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child Black Male United-States 0 -53 0.5888889 0.131198451 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -24 0.266666681 0.131090015 0.8125 0 0 0.353535354 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -53 0.5888889 0.119651385 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Male United-States 0 -49 0.544444442 0.03476785 1 0 0 0.6060606 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -34 0.377777785 0.169340715 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.121557482 0.5625 0 0 0.474747479 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.2638477 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.114562154 0.625 0 0 0.0606060624 State-gov Some-college Never-married Prof-specialty Own-child White Female United-States 0 -36 0.4 0.118111007 0.875 0.135501355 0 0.5050505 Private Masters Never-married Adm-clerical Not-in-family White Male United-States 1 -35 0.3888889 0.185998574 0.8125 0.046500463 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family Asian-Pac-Islander Female United-States 0 -53 0.5888889 0.07125187 0.8125 0 0 0.5050505 Federal-gov Bachelors Divorced Exec-managerial Unmarried Black Female United-States 1 -42 0.466666669 0.167357162 0.625 0 0 0.656565666 Local-gov Some-college Divorced Transport-moving Not-in-family White Male United-States 1 -32 0.355555564 0.113452166 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 0 -33 0.366666675 0.08095952 0.5625 0 0 0.656565666 Private HS-grad Divorced Adm-clerical Own-child Other Female United-States 0 -59 0.655555546 0.07723959 0.5625 0 0 0.6060606 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 -36 0.4 0.112776615 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.1786658 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male Cuba 1 -31 0.344444454 0.142947584 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -46 0.51111114 0.03008746 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 -44 0.4888889 0.0587874353 0.8125 0 0 0.3838384 State-gov Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female United-States 0 -27 0.3 0.07594371 0.8125 0 0.3409091 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.217038408 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -39 0.433333337 0.0440370329 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -62 0.6888889 0.0775750056 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -48 0.533333361 0.109271541 0.875 0 0 0.4040404 Self-emp-not-inc Masters Widowed Exec-managerial Unmarried White Female ? 1 -42 0.466666669 0.276083142 0.5625 0 0 0.25252524 Private HS-grad Never-married Exec-managerial Unmarried Black Female United-States 0 -60 0.6666667 0.1374428 0.875 0 0 0.4848485 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.190815687 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -39 0.433333337 0.293417215 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -34 0.377777785 0.07727663 0.75 0 0 0.363636374 Self-emp-inc Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 -22 0.244444445 0.109343611 0.625 0 0 0.222222224 Private Some-college Never-married Adm-clerical Other-relative Black Male United-States 0 -18 0.2 0.131999969 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Own-child White Male United-States 0 -44 0.4888889 0.0535668731 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.266098648 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -49 0.544444442 0.107523717 0.8125 0 0.143480256 0.4040404 Local-gov Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -21 0.233333334 0.10747388 0.5625 0 0 0.5050505 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -49 0.544444442 0.09019772 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Sales Other-relative Black Male ? 0 -52 0.5777778 0.1326149 0.4375 0 0 0.4040404 Private 11th Separated Handlers-cleaners Unmarried White Male United-States 0 -39 0.433333337 0.08949859 0.8125 0 0.4331956 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.128166884 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -54 0.6 0.0692582056 0.5625 0 0 0.4949495 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.08654447 0.5625 0 0 0.25252524 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.195780978 0.875 0 0 0.2020202 State-gov Masters Never-married Adm-clerical Not-in-family Black Female United-States 0 -21 0.233333334 0.191120133 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -38 0.422222227 0.113897376 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband Asian-Pac-Islander Male Philippines 1 -51 0.566666663 0.115449876 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -34 0.377777785 0.214968637 1 0 0 0.5050505 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.136850089 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Unmarried White Female United-States 0 -20 0.222222224 0.142767757 0.625 0 0 0.454545468 ? Some-college Never-married ? Own-child White Female United-States 0 -26 0.2888889 0.145068556 0.8125 0 0.453168035 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -26 0.2888889 0.1122553 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -41 0.455555558 0.1054526 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.0946747 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.2170182 0.625 0 0 0.4040404 Local-gov Some-college Never-married Transport-moving Own-child White Male United-States 0 -65 0.722222269 0.283071041 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -31 0.344444454 0.08313436 0.4375 0 0 0.656565666 Private 11th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -45 0.5 0.102097049 0.9375 0 0 0.353535354 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.2350366 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 1 -47 0.5222222 0.113310054 0.5625 0 0.4331956 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -47 0.5222222 0.135851234 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.344524354 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -40 0.444444448 0.07947774 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband Black Male United-States 0 -38 0.422222227 0.130639419 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 1 -21 0.233333334 0.02204613 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -40 0.444444448 0.1505673 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male Mexico 0 -33 0.366666675 0.262632638 0.5625 0 0 0.5555556 Private HS-grad Divorced Transport-moving Not-in-family Black Male United-States 0 -29 0.322222233 0.06893288 0.625 0 0 0.5252525 Private Some-college Never-married Tech-support Not-in-family White Male United-States 0 -41 0.455555558 0.07246153 0.625 0 0 0.353535354 Private Some-college Separated Transport-moving Not-in-family White Male United-States 0 -20 0.222222224 0.0231163763 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 -20 0.222222224 0.0265897941 0.625 0 0 0.545454562 State-gov Some-college Never-married Exec-managerial Own-child White Male United-States 0 -34 0.377777785 0.186044365 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -78 0.8666667 0.259473771 0.8125 0.09386094 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.15871571 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.08305085 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -59 0.655555546 0.0259802453 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.146082222 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -23 0.25555557 0.260459155 0.625 0 0 0.24242425 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -47 0.5222222 0.168104112 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.0318420157 0.8125 0 0 0.3838384 Local-gov Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 -42 0.466666669 0.109623127 0.625 0 0 0.565656543 Self-emp-not-inc Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -46 0.51111114 0.09867078 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 -29 0.322222233 0.128486812 0.5625 0 0 0.444444448 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -21 0.233333334 0.1254889 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -55 0.6111111 0.143877074 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.109329462 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Own-child White Female United-States 0 -44 0.4888889 0.0780842 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -61 0.677777767 0.264492959 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Divorced Exec-managerial Not-in-family White Male United-States 1 -38 0.422222227 0.09666365 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -50 0.5555556 0.08313369 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male Italy 1 -53 0.5888889 0.171269715 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.160510674 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -49 0.544444442 0.189698964 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.0506275669 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -19 0.211111113 0.170311272 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Own-child White Female United-States 0 -59 0.655555546 0.134195015 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Divorced Prof-specialty Not-in-family White Male England 0 -43 0.477777779 0.0981757343 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.09594027 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -49 0.544444442 0.06692306 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -36 0.4 0.0708140656 0.5625 0 0 0.5050505 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -26 0.2888889 0.123371989 0.4375 0.010550105 0 0.323232323 Private 11th Never-married Other-service Own-child Black Male United-States 0 -18 0.2 0.102286987 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -60 0.6666667 0.200215533 0.625 0 0 0.151515156 Private Some-college Widowed Sales Not-in-family White Female United-States 0 -43 0.477777779 0.10035529 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -42 0.466666669 0.0963464156 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -41 0.455555558 0.123829313 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -55 0.6111111 0.167603 0.875 0 0.453856736 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.133664265 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -20 0.222222224 0.108501017 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -37 0.411111116 0.07577061 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.105046459 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.09938675 0.625 0 0.43663913 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.253513664 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Sales Not-in-family White Female United-States 0 -21 0.233333334 0.1022358 0.625 0 0 0.3030303 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -21 0.233333334 0.295101732 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -20 0.222222224 0.110399708 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -35 0.3888889 0.144739866 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.06925349 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Not-in-family White Male Mexico 0 -44 0.4888889 0.0606322475 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.0519194044 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Japan 1 -42 0.466666669 0.106792264 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.01896673 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -32 0.355555564 0.311344683 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -33 0.366666675 0.0976281539 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -27 0.3 0.07826942 0.3125 0 0 0.323232323 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.1261584 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Female United-States 0 -45 0.5 0.127897456 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -41 0.455555558 0.124783717 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -19 0.211111113 0.0427249856 0.625 0 0 0.353535354 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 -45 0.5 0.920128942 0.6875 0 0 0.08080808 Private Assoc-voc Divorced Other-service Not-in-family White Female United-States 0 -41 0.455555558 0.333440661 1 1 0 0.7070707 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.0908503756 0.5625 0 0.399449021 0.353535354 Local-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -33 0.366666675 0.08736214 0.8125 0 0 0.6060606 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 1 -17 0.188888893 0.12213672 0.375 0 0 0.2020202 ? 10th Never-married ? Own-child Other Female United-States 0 -51 0.566666663 0.0503696 0.8125 0 0 0.6060606 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 -33 0.366666675 0.0298995432 0.5625 0 0 0.2020202 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 -23 0.25555557 0.27388674 0.625 0 0 0.181818187 Private Some-college Never-married Handlers-cleaners Other-relative White Female United-States 0 -52 0.5777778 0.0599721856 0.8125 0 0 0.3030303 Private Bachelors Married-spouse-absent Prof-specialty Not-in-family White Male United-States 1 -36 0.4 0.09413992 0.625 0 0 0.323232323 ? Some-college Divorced ? Own-child White Female United-States 0 -25 0.2777778 0.121378995 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -38 0.422222227 0.227797449 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -64 0.7111111 0.120207049 0.3125 0 0 0.454545468 Self-emp-not-inc 9th Separated Transport-moving Not-in-family White Male United-States 0 -42 0.466666669 0.2587962 0.875 0.07688077 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.113470353 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -26 0.2888889 0.0542094223 0.8125 0 0 0.3838384 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.122384585 0.5625 0 0 0.24242425 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -24 0.266666681 0.146067411 0.375 0 0 0.3030303 Private 10th Never-married Other-service Other-relative White Male Mexico 0 -43 0.477777779 0.144500762 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.258124679 0.375 0.03103031 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.0471703149 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.179353476 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Female United-States 0 -44 0.4888889 0.08653908 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 0 -81 0.900000036 0.0599546731 0.5625 0 0 0.181818187 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -55 0.6111111 0.07189307 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.112835214 0.4375 0 0 0.4040404 Private 11th Widowed Other-service Unmarried Black Female United-States 0 -31 0.344444454 0.0130005628 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.141543269 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -39 0.433333337 0.121117666 0.5625 0 0 0.363636374 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -27 0.3 0.2831209 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -23 0.25555557 0.1451083 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -26 0.2888889 0.07815964 0.4375 0.02907029 0 0.5050505 Private 11th Separated Craft-repair Other-relative White Male United-States 0 -33 0.366666675 0.145016015 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Male Cuba 0 -39 0.433333337 0.0727882 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried White Female United-States 0 -44 0.4888889 0.175149947 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -38 0.422222227 0.0209152661 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -18 0.2 0.244022891 0.5 0 0 0.151515156 Private 12th Never-married Other-service Own-child White Male United-States 0 -54 0.6 0.0587355755 0.5625 0 0 0.151515156 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -45 0.5 0.129118577 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -43 0.477777779 0.163647324 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male India 1 -23 0.25555557 0.124991164 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -37 0.411111116 0.1197935 0.625 0.0217402168 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -33 0.366666675 0.049562037 0.4375 0 0 0.5050505 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.203274056 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 -32 0.355555564 0.0730562657 0.8125 0 0 0.5555556 Self-emp-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -47 0.5222222 0.290458381 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.105891071 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.1380308 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -17 0.188888893 0.1866445 0.4375 0 0 0.3030303 Private 11th Never-married Sales Own-child White Male United-States 0 -64 0.7111111 0.0398361981 1 0 0.43663913 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.107612625 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -51 0.566666663 0.08001118 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.102685049 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 -31 0.344444454 0.1265578 0.625 0 0.3452709 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -50 0.5555556 0.179516479 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.172545388 0.625 0.005940059 0 0.1010101 ? Some-college Never-married ? Own-child White Male United-States 0 -63 0.7 0.07661859 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 -48 0.533333361 0.05620241 0.6875 0 0 0.434343427 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.020562334 0.8125 0 0.5544077 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -51 0.566666663 0.09855493 0.5625 0 0 0.282828271 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -29 0.322222233 0.1339155 0.5625 0 0 0.3838384 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -69 0.7666667 0.04815031 0.875 0 0 0.25252524 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -56 0.622222245 0.07490916 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -26 0.2888889 0.149272755 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Wife White Female United-States 0 -39 0.433333337 0.137052149 0.875 0.07298073 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.237216145 0.5625 0 0 0.222222224 Self-emp-not-inc HS-grad Separated Other-service Not-in-family White Female United-States 0 -41 0.455555558 0.239723042 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -45 0.5 0.11333026 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -23 0.25555557 0.1229975 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -29 0.322222233 0.142440423 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -34 0.377777785 0.260233521 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.0573022924 0.8125 0 0.43663913 0.2020202 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 -46 0.51111114 0.12124294 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -46 0.51111114 0.09578334 0.5625 0 0 0.25252524 Without-pay HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -33 0.366666675 0.279992342 0.1875 0 0 0.4040404 Private 5th-6th Separated Other-service Unmarried White Female Mexico 0 -46 0.51111114 0.160120025 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -26 0.2888889 0.231363133 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 -49 0.544444442 0.07823978 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female France 0 -66 0.733333349 0.139125288 0.5625 0 0 0.353535354 ? HS-grad Widowed ? Not-in-family Other Female Puerto-Rico 0 -55 0.6111111 0.103354543 0.5625 0 0.4331956 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Wife White Female United-States 1 -35 0.3888889 0.203314468 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.0225155838 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -31 0.344444454 0.11422 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 -47 0.5222222 0.09867078 0.625 0 0 0.161616161 Private Some-college Separated Adm-clerical Unmarried White Female Germany 0 -48 0.533333361 0.258222342 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.162193164 0.625 0 0 0.565656543 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.137241408 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.147359237 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -23 0.25555557 0.257115722 0.75 0 0.395087242 0.2020202 ? Assoc-acdm Never-married ? Own-child White Male United-States 0 -17 0.188888893 0.164747879 0.5 0 0 0.151515156 Private 12th Never-married Other-service Own-child White Male United-States 0 -44 0.4888889 0.118337318 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.06804517 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -37 0.411111116 0.06686177 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Other-relative White Female United-States 0 -49 0.544444442 0.151136428 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.129575238 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.0886950642 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -73 0.811111152 0.0568395741 0.6875 0 0 0.323232323 ? Assoc-voc Married-spouse-absent ? Not-in-family White Female United-States 0 -44 0.4888889 0.186928049 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.0490871929 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.100791745 0.625 0 0 0.2020202 ? Some-college Divorced ? Own-child White Female ? 0 -49 0.544444442 0.140807092 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Male United-States 0 -17 0.188888893 0.07335397 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 -42 0.466666669 0.0504807346 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 0 -30 0.333333343 0.158710986 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.09255778 0.6875 0 0 0.373737365 State-gov Assoc-voc Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male Hong 0 -53 0.5888889 0.082448706 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.292916119 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -35 0.3888889 0.2559155 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.0645818561 0.4375 0.135501355 0 0.6060606 Private 11th Never-married Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 1 -39 0.433333337 0.151767522 0.8125 0 0 0.5050505 Private Bachelors Widowed Prof-specialty Unmarried White Female Poland 1 -40 0.444444448 0.02197541 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -28 0.311111122 0.0438949168 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -32 0.355555564 0.1302481 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -42 0.466666669 0.124484666 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -35 0.3888889 0.05473074 0.8125 0 0 0.434343427 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.202982411 0.5 0 0 0.4040404 Private 12th Never-married Machine-op-inspct Unmarried Black Female United-States 0 -21 0.233333334 0.12862353 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -71 0.788888931 0.132423609 0.25 0.06097061 0 0.4040404 Private 7th-8th Widowed Exec-managerial Not-in-family White Male United-States 1 -31 0.344444454 0.222747952 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Male United-States 0 -25 0.2777778 0.0523322821 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -35 0.3888889 0.09413992 0.5625 0.068490684 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -24 0.266666681 0.07345095 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 -69 0.7666667 0.210582584 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.130167276 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Sales Husband Asian-Pac-Islander Male ? 1 -35 0.3888889 0.223499626 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.0365069173 0.8125 0.105201051 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -51 0.566666663 0.11042463 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -48 0.533333361 0.0244008079 0.5625 0 0 0.444444448 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -49 0.544444442 0.107878 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -53 0.5888889 0.120128915 0.75 0.02407024 0 1 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.0701796 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -53 0.5888889 0.194215685 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.126417711 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -36 0.4 0.07744838 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -34 0.377777785 0.07906756 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -48 0.533333361 0.08158119 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 1 -53 0.5888889 0.131768942 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.165051654 0.625 0 0.3452709 0.4040404 Private Some-college Divorced Handlers-cleaners Own-child White Male United-States 0 -49 0.544444442 0.145977825 0.9375 0 0 0.4040404 State-gov Prof-school Divorced Exec-managerial Not-in-family White Female United-States 0 -30 0.333333343 0.133243307 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -41 0.455555558 0.03310826 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.0849549249 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -24 0.266666681 0.205066323 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.144330353 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -29 0.322222233 0.185201108 0.5625 0 0 0.424242437 Private HS-grad Never-married Craft-repair Unmarried White Female United-States 0 -23 0.25555557 0.127346516 0.8125 0 0 0.454545468 Private Bachelors Never-married Tech-support Not-in-family Black Female United-States 0 -46 0.51111114 0.08624407 0.625 0 0 0.424242437 Private Some-college Separated Sales Not-in-family White Male United-States 0 -20 0.222222224 0.1416699 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 -63 0.7 0.08246891 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.112534814 0.875 0.03103031 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.169340715 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Male United-States 0 -24 0.266666681 0.147853613 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -36 0.4 0.0224657431 0.625 0 0 0.454545468 Private Some-college Never-married Other-service Own-child White Male United-States 0 -25 0.2777778 0.297170162 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Own-child White Male United-States 0 -54 0.6 0.120128915 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Other-service Husband White Male United-States 0 -50 0.5555556 0.155718476 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Sales Not-in-family White Male United-States 0 -58 0.644444466 0.0275643989 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -17 0.188888893 0.18224968 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male England 0 -40 0.444444448 0.147683218 0.5625 0.07688077 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.07743424 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 -20 0.222222224 0.232027248 0.5625 0 0 0.262626261 Private HS-grad Separated Sales Own-child White Female United-States 0 -22 0.244444445 0.248794883 0.4375 0 0 0.353535354 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -80 0.8888889 0.06854628 0.4375 0 0 0.25252524 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -52 0.5777778 0.0925625 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -40 0.444444448 0.08150575 0.8125 0.07298073 0 0.4848485 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -48 0.533333361 0.0938166156 0.375 0 0 0.4848485 Private 10th Separated Machine-op-inspct Own-child White Female United-States 0 -62 0.6888889 0.13416335 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -32 0.355555564 0.193094924 0.75 0 0 0.424242437 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -21 0.233333334 0.0833344 0.625 0 0 0.282828271 ? Some-college Never-married ? Not-in-family White Female United-States 0 -58 0.644444466 0.140526235 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.080911696 0.875 0 0 0.6060606 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.16261211 1 0 0 0.353535354 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.08112723 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -26 0.2888889 0.102538891 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -50 0.5555556 0.135353491 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.211698622 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.0300167371 0.8125 0 0 0.8080808 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -59 0.655555546 0.0146776633 0.5625 0 0 0.1010101 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -36 0.4 0.122633114 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -37 0.411111116 0.149423629 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male Ecuador 1 -42 0.466666669 0.162071258 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -34 0.377777785 0.2146157 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -27 0.3 0.09487609 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.08698698 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -41 0.455555558 0.0963174552 0.6875 0.07298073 0 0.6060606 Private Assoc-voc Married-civ-spouse Other-service Husband Asian-Pac-Islander Male India 1 -34 0.377777785 0.133807048 0.8125 0.1502415 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male South 1 -41 0.455555558 0.1649789 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -50 0.5555556 0.09329396 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -18 0.2 0.06197056 0.5625 0 0 0.282828271 Private HS-grad Never-married Handlers-cleaners Other-relative White Female United-States 0 -23 0.25555557 0.139701158 0.8125 0 0 0.151515156 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -26 0.2888889 0.127046123 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.173266754 0.625 0.07298073 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -27 0.3 0.0900488645 0.625 0 0 0.8888889 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -21 0.233333334 0.1319582 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family Other Male Dominican-Republic 0 -41 0.455555558 0.08032976 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -42 0.466666669 0.09461408 0.75 0 0 0.353535354 Self-emp-not-inc Assoc-acdm Divorced Craft-repair Own-child Amer-Indian-Eskimo Male United-States 0 -25 0.2777778 0.0469716229 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Own-child White Male United-States 0 -43 0.477777779 0.197464153 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.146804243 0.625 0 0 0.151515156 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -40 0.444444448 0.110274434 0.8125 0.07688077 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.282476336 0.625 0 0 0.09090909 Private Some-college Never-married Sales Own-child Black Male United-States 0 -18 0.2 0.148740664 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Not-in-family White Female United-States 0 -37 0.411111116 0.225156516 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -58 0.644444466 0.201118067 0.3125 0.0378103778 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -36 0.4 0.134949371 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.137052149 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.06676478 0.6875 0.07688077 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -62 0.6888889 0.07354323 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.02347133 0.625 0.0406404063 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -27 0.3 0.0200255271 0.8125 0.0486504845 0 0.363636374 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.0591814555 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Male United-States 0 -55 0.6111111 0.08319161 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.118498288 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -22 0.244444445 0.154546529 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -44 0.4888889 0.124001063 0.75 0.04386044 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.06705305 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -21 0.233333334 0.128124446 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 -25 0.2777778 0.01954597 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Adm-clerical Not-in-family Black Female United-States 0 -31 0.344444454 0.2064107 0.125 0 0 0.353535354 Private 1st-4th Separated Handlers-cleaners Unmarried White Male Honduras 0 -42 0.466666669 0.130662322 0.625 0 0 0.3838384 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -26 0.2888889 0.07076086 0.3125 0 0 0.2020202 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.04832677 0.625 0 0.453856736 0.989899 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.1190021 0.8125 0.05178052 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.230826333 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -51 0.566666663 0.03626175 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -45 0.5 0.141093358 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -44 0.4888889 0.144299373 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -47 0.5222222 0.0232086517 0.25 0 0 0.1010101 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -35 0.3888889 0.0676060244 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Farming-fishing Own-child White Male United-States 0 -46 0.51111114 0.100995824 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -46 0.51111114 0.127811253 0.75 0 0 0.565656543 Private Assoc-acdm Never-married Tech-support Not-in-family White Male United-States 0 -46 0.51111114 0.0537978932 0.8125 0 0 0.535353541 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -66 0.733333349 0.07043554 0.8125 0 0 0.08080808 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.239576221 0.5625 0 0 0.2020202 State-gov HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -26 0.2888889 0.143883809 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.138063788 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.09738837 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male ? 0 -23 0.25555557 0.146270812 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -46 0.51111114 0.124525078 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -44 0.4888889 0.0918829 0.375 0 0 0.4040404 ? 10th Married-civ-spouse ? Husband White Male United-States 0 -54 0.6 0.0389020033 0.875 0 0 0.686868668 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.0208176039 0.25 0 0 0.6060606 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -71 0.788888931 0.146810979 0.3125 0 0 0.13131313 Private 9th Widowed Sales Unmarried White Female United-States 0 -51 0.566666663 0.10823901 0.5 0 0 0.454545468 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.09609653 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -75 0.8333334 0.1675976 0.5625 0.0265302639 0 0.141414136 ? HS-grad Married-AF-spouse ? Wife White Female United-States 0 -57 0.6333333 0.115337394 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Craft-repair Not-in-family White Male Canada 0 -34 0.377777785 0.253908366 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Not-in-family White Male United-States 0 -40 0.444444448 0.118498288 0.8125 0.14084141 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 -21 0.233333334 0.186926022 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 -50 0.5555556 0.070385024 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.06333986 0.6875 0 0 0.444444448 Private Assoc-voc Never-married Craft-repair Not-in-family White Male Ireland 0 -37 0.411111116 0.399571627 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -19 0.211111113 0.08154751 0.25 0 0 1 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -64 0.7111111 0.129720047 0.5625 0 0 0.3030303 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -17 0.188888893 0.0959497 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child Black Male United-States 0 -37 0.411111116 0.09161955 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -32 0.355555564 0.145581111 0.625 0.046500463 0 0.454545468 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -20 0.222222224 0.106347054 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child Black Male United-States 0 -39 0.433333337 0.110859059 1 0.04787048 0 0.4040404 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 -18 0.2 0.170399517 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Own-child White Male Columbia 0 -42 0.466666669 0.09814139 0.875 0 0.43663913 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.241259381 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.147902116 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -53 0.5888889 0.138077945 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -52 0.5777778 0.14948155 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -51 0.566666663 0.08143975 0.375 0 0 0.4040404 Private 10th Never-married Farming-fishing Own-child White Male United-States 0 -77 0.8555556 0.1049104 0.625 0 0 0.08080808 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.131954834 0.625 0.03418034 0 0.3030303 Private Some-college Never-married Sales Own-child Black Female United-States 0 -38 0.422222227 0.159416854 0.625 0 0 0.4040404 Local-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 -20 0.222222224 0.214208215 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -23 0.25555557 0.0359034277 0.5625 0 0 0.3030303 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -27 0.3 0.117629431 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -19 0.211111113 0.216754854 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Own-child White Female United-States 0 -41 0.455555558 0.139386609 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.271417558 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -72 0.8 0.195277855 0.8125 0.009910099 0 0.07070707 ? Bachelors Separated ? Not-in-family White Female United-States 0 -42 0.466666669 0.247220159 0.875 0.046500463 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -36 0.4 0.09664277 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.0183113813 0.875 0 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Farming-fishing Husband White Male United-States 1 -24 0.266666681 0.126433879 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -22 0.244444445 0.2546661 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -29 0.322222233 0.0766953751 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Other-service Husband White Male ? 0 -42 0.466666669 0.170079589 0.9375 0.1502415 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.219797209 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -41 0.455555558 0.188531727 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -29 0.322222233 0.2158348 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Not-in-family Asian-Pac-Islander Male Philippines 0 -36 0.4 0.139996171 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 -78 0.8666667 0.1598257 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Widowed Sales Not-in-family White Male United-States 1 -43 0.477777779 0.0755577758 0.6875 0 0.43663913 0.323232323 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 -34 0.377777785 0.174920276 0.625 0 0 0.4040404 State-gov Some-college Separated Exec-managerial Own-child White Female United-States 0 -20 0.222222224 0.07933495 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -24 0.266666681 0.30270794 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.06000047 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -49 0.544444442 0.04015074 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.08754601 0.3125 0 0 0.4040404 Private 9th Never-married Transport-moving Own-child White Male United-States 0 -51 0.566666663 0.0728986561 0.75 0 0 0.4040404 Private Assoc-acdm Separated Other-service Not-in-family Black Female United-States 0 -30 0.333333343 0.230826333 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -37 0.411111116 0.08531998 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.09504784 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -20 0.222222224 0.184347063 0.625 0.3409534 0 0.1010101 ? Some-college Never-married ? Other-relative Black Male United-States 0 -46 0.51111114 0.116685137 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.108501017 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Own-child White Male United-States 0 -32 0.355555564 0.141234115 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.0602867231 0.625 0 0 0.5050505 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 0 -30 0.333333343 0.269091845 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Handlers-cleaners Unmarried White Female United-States 0 -60 0.6666667 0.09223314 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -56 0.622222245 0.17810677 0.625 0 0 0.4040404 Local-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -57 0.6333333 0.134418622 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -61 0.677777767 0.0190549642 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 -50 0.5555556 0.145476714 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -56 0.622222245 0.120962754 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -61 0.677777767 0.09388465 0.625 0 0.43663913 0.353535354 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.126200154 0.875 0.07430074 0 0.7070707 Private Masters Divorced Exec-managerial Unmarried White Male United-States 1 -31 0.344444454 0.3186714 0.875 0.05178052 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -60 0.6666667 0.138240263 0.5625 0 0.5874656 0.5050505 Self-emp-not-inc HS-grad Never-married Exec-managerial Not-in-family Black Male United-States 1 -26 0.2888889 0.122790724 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -56 0.622222245 0.0347961374 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Other-service Wife White Female United-States 0 -45 0.5 0.194966674 0.4375 0 0 0.4040404 Private 11th Widowed Other-service Unmarried White Female United-States 0 -28 0.311111122 0.136022985 0.75 0 0 0.656565666 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 1 -45 0.5 0.0180379264 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 -58 0.644444466 0.06800004 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -38 0.422222227 0.137240067 0.6875 0.0235402342 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 -23 0.25555557 0.144009084 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -49 0.544444442 0.08397089 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.1477061 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 -22 0.244444445 0.18214798 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -23 0.25555557 0.143206224 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.130386844 0.5625 0.03908039 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -40 0.444444448 0.0566684976 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.178374827 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -34 0.377777785 0.06667655 0.6875 0 0 0.4040404 State-gov Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 -21 0.233333334 0.187413663 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -28 0.311111122 0.113145038 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -43 0.477777779 0.04909191 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-spouse-absent Tech-support Not-in-family Asian-Pac-Islander Male United-States 0 -17 0.188888893 0.118856609 0.3125 0 0 0.2020202 Private 9th Never-married Transport-moving Not-in-family White Male United-States 0 -51 0.566666663 0.05785796 0.375 0 0 0.4040404 Self-emp-not-inc 10th Widowed Transport-moving Other-relative White Female United-States 0 -37 0.411111116 0.150489837 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.07303471 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.116182007 0.8125 0 0 0.3030303 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -35 0.3888889 0.162994 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -48 0.533333361 0.165654466 0.5625 0.0217402168 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Female United-States 0 -23 0.25555557 0.126296476 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Own-child White Male United-States 0 -24 0.266666681 0.2964481 0.5625 0 0 0.454545468 Private HS-grad Never-married Priv-house-serv Not-in-family White Female England 0 -24 0.266666681 0.146975324 0.6875 0 0 0.2020202 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -50 0.5555556 0.10705696 0.25 0.03411034 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.0635904148 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -45 0.5 0.123659588 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.129765853 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -33 0.366666675 0.264572442 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.1049488 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -32 0.355555564 0.131339222 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.207586691 0.1875 0 0 0.4040404 Private 5th-6th Never-married Farming-fishing Other-relative White Male Mexico 0 -53 0.5888889 0.0706396252 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -36 0.4 0.102584019 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -22 0.244444445 0.09831179 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 -47 0.5222222 0.06561506 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Wife Black Female United-States 0 -25 0.2777778 0.008274371 0.625 0 0 0.2020202 ? Some-college Never-married ? Not-in-family Amer-Indian-Eskimo Female United-States 0 -30 0.333333343 0.1772406 0.5625 0 0 0.2020202 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -49 0.544444442 0.127894089 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Not-in-family Black Female United-States 0 -23 0.25555557 0.102301806 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -40 0.444444448 0.171190247 0.375 0 0 0.353535354 Private 10th Separated Transport-moving Own-child White Male United-States 0 -45 0.5 0.22326456 0.75 0 0 0.4040404 Local-gov Assoc-acdm Divorced Tech-support Own-child White Male United-States 0 -61 0.677777767 0.1193429 0.8125 0 0 0.424242437 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -35 0.3888889 0.125874162 0.5625 0 0 0.5555556 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -20 0.222222224 0.0223754887 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -27 0.3 0.126739651 0.375 0 0 0.6060606 Private 10th Never-married Adm-clerical Own-child White Male United-States 0 -23 0.25555557 0.141287327 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -25 0.2777778 0.110788338 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 0 -65 0.722222269 0.121821508 0.625 0 0 0.353535354 Local-gov Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.1282073 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -49 0.544444442 0.092403546 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male South 1 -45 0.5 0.13743943 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Female Germany 0 -46 0.51111114 0.133881137 0.875 0 0.0741506 0.454545468 Private Masters Divorced Exec-managerial Unmarried White Female United-States 0 -67 0.7444445 0.0908638462 0.5625 0 0 0.323232323 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -40 0.444444448 0.117541872 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried White Female United-States 0 -51 0.566666663 0.174689919 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.135880187 0.8125 0 0.5544077 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.141178891 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -28 0.311111122 0.124689423 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -44 0.4888889 0.311737359 0.5625 0 0 0.4848485 Private HS-grad Divorced Handlers-cleaners Not-in-family White Female United-States 0 -37 0.411111116 0.119193375 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -54 0.6 0.191370681 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -33 0.366666675 0.025288526 0.9375 0 0 0.4040404 Federal-gov Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 -46 0.51111114 0.07857858 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -45 0.5 0.08131178 0.875 0.04386044 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -27 0.3 0.211651474 0.75 0.0332503319 0 0.4040404 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 0 -49 0.544444442 0.285054624 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -51 0.566666663 0.135465965 0.5625 0 0 0.454545468 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -27 0.3 0.136214942 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -36 0.4 0.141192362 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -59 0.655555546 0.111754186 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.0899303257 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 -66 0.733333349 0.06727801 0.6875 0 0 0.4040404 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 -31 0.344444454 0.118818216 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -35 0.3888889 0.0695181862 1 0 0 0.6060606 Federal-gov Doctorate Never-married Prof-specialty Not-in-family Amer-Indian-Eskimo Female United-States 1 -34 0.377777785 0.08258341 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Philippines 1 -50 0.5555556 0.152713835 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 1 -43 0.477777779 0.101763651 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.164552554 0.3125 0 0 0.3030303 Private 9th Never-married Craft-repair Own-child White Male El-Salvador 0 -33 0.366666675 0.140982226 0.3125 0 0 0.454545468 Private 9th Never-married Other-service Not-in-family White Male El-Salvador 0 -48 0.533333361 0.06674457 0.625 0 0.365013778 0.3838384 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.251980036 0.5625 0 0 0.363636374 Private HS-grad Never-married Priv-house-serv Own-child White Female United-States 0 -29 0.322222233 0.138242275 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 0 -42 0.466666669 0.21962814 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -28 0.311111122 0.123609066 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male Hungary 0 -36 0.4 0.236264452 0.5625 0 0 0.3838384 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 -66 0.733333349 0.0948666558 0.5625 0 0 0.25252524 Local-gov HS-grad Widowed Other-service Not-in-family White Female United-States 0 -44 0.4888889 0.118503675 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -45 0.5 0.08482022 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -49 0.544444442 0.151628777 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Own-child Black Female United-States 0 -36 0.4 0.183262 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Unmarried White Female El-Salvador 0 -48 0.533333361 0.0273899529 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -19 0.211111113 0.0237387232 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -36 0.4 0.112804905 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -41 0.455555558 0.137846917 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.196097538 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -49 0.544444442 0.121147975 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.13814193 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -20 0.222222224 0.237177759 0.625 0 0 0.2929293 Private Some-college Divorced Other-service Own-child White Female United-States 0 -39 0.433333337 0.0749428347 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -38 0.422222227 0.166437775 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -19 0.211111113 0.182828248 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -29 0.322222233 0.0891840458 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 -52 0.5777778 0.05032111 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male United-States 1 -22 0.244444445 0.06375812 0.6875 0 0 0.444444448 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.0223115031 0.625 0 0 0.8080808 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.08997343 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -41 0.455555558 0.06988526 0.625 0.0394203924 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -63 0.7 0.04340795 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -40 0.444444448 0.252149075 0.6875 0 0 0.444444448 Private Assoc-voc Separated Sales Not-in-family Black Male United-States 0 -40 0.444444448 0.12101125 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Not-in-family White Male Canada 0 -18 0.2 0.06682742 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Female United-States 0 -57 0.6333333 0.121378325 0.9375 0 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 -54 0.6 0.147689953 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Philippines 1 -44 0.4888889 0.101037584 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -20 0.222222224 0.155742049 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -40 0.444444448 0.122729436 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female Scotland 0 -29 0.322222233 0.1867994 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Unmarried White Male United-States 0 -22 0.244444445 0.0942955 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -44 0.4888889 0.0671183839 0.875 0.05178052 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.150413051 0.625 0 0 0.454545468 Private Some-college Divorced Sales Own-child White Male United-States 0 -52 0.5777778 0.15848738 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -57 0.6333333 0.138979122 0.5625 0.0217402168 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family White Male Cuba 0 -51 0.566666663 0.1050734 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 -23 0.25555557 0.356449932 0.8125 0 0 0.1010101 Private Bachelors Never-married Sales Own-child Black Male United-States 0 -22 0.244444445 0.136640608 0.6875 0 0 0.444444448 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -37 0.411111116 0.03929198 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 1 -58 0.644444466 0.201146364 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -61 0.677777767 0.1287717 0.375 0 0 0.2020202 Private 10th Widowed Farming-fishing Unmarried White Male United-States 0 -30 0.333333343 0.06485262 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.07034596 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -30 0.333333343 0.217588 0.375 0 0 0.4040404 Private 10th Divorced Other-service Not-in-family Amer-Indian-Eskimo Male United-States 0 -18 0.2 0.06460341 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Male Canada 0 -34 0.377777785 0.160506636 0.625 0 0.373737365 0.121212125 Private Some-college Married-civ-spouse Other-service Wife White Female ? 0 -23 0.25555557 0.033202555 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative Black Male United-States 0 -23 0.25555557 0.0343186036 0.625 0 0 0.1010101 Private Some-college Never-married Priv-house-serv Own-child White Female United-States 0 -57 0.6333333 0.08385976 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -58 0.644444466 0.161327 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -59 0.655555546 0.20820567 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -27 0.3 0.16176413 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Adm-clerical Not-in-family White Male United-States 0 -50 0.5555556 0.070727855 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -44 0.4888889 0.0909648761 0.875 0 0 0.161616161 Local-gov Masters Divorced Prof-specialty Unmarried White Female ? 0 -25 0.2777778 0.120211087 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Female United-States 0 -33 0.366666675 0.0160779413 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -22 0.244444445 0.2440276 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 -21 0.233333334 0.1736244 0.625 0 0.3946281 0.3030303 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -44 0.4888889 0.118319131 0.4375 0.05178052 0 0.363636374 Private 11th Married-civ-spouse Prof-specialty Wife White Female United-States 1 -50 0.5555556 0.200649962 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband Asian-Pac-Islander Male United-States 1 -44 0.4888889 0.155373633 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -53 0.5888889 0.08285215 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -41 0.455555558 0.115084141 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.122949004 0.625 0 0 0.4040404 Local-gov Some-college Widowed Adm-clerical Unmarried White Female Mexico 0 -60 0.6666667 0.1592707 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -58 0.644444466 0.02271495 0.875 0 0 0.2020202 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.127258286 0.625 0.03908039 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -43 0.477777779 0.139339462 0.5625 0 0 0.6060606 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -33 0.366666675 0.117064334 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -24 0.266666681 0.128449082 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -41 0.455555558 0.10042534 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male Poland 0 -21 0.233333334 0.0170168485 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -39 0.433333337 0.067804046 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Own-child Asian-Pac-Islander Male United-States 0 -27 0.3 0.07688935 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -50 0.5555556 0.153604254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.0363789462 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -46 0.51111114 0.148155361 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.161557347 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.08043416 0.8125 0 0 0.353535354 State-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -56 0.622222245 0.148303539 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 1 -41 0.455555558 0.0222724378 0.875 0 0.453168035 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -41 0.455555558 0.187096432 0.625 0 0.459366381 0.5050505 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -42 0.466666669 0.118215404 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.1830633 0.25 0 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.04718446 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -25 0.2777778 0.237627015 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female Mexico 0 -57 0.6333333 0.179287478 0.5625 0 0 0.424242437 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -49 0.544444442 0.06933701 0.25 0 0 0.4040404 Private 7th-8th Widowed Machine-op-inspct Not-in-family White Female United-States 0 -23 0.25555557 0.117094643 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -59 0.655555546 0.09705093 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.1338185 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -33 0.366666675 0.236956164 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female Mexico 0 -52 0.5777778 0.121331848 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 0 -37 0.411111116 0.118111007 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.151207149 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -39 0.433333337 0.104156047 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -54 0.6 0.102740951 0.625 0 0 0.424242437 Local-gov Some-college Divorced Craft-repair Unmarried White Male United-States 0 -52 0.5777778 0.14660354 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.09333504 0.5625 0 0 0.565656543 Local-gov HS-grad Never-married Protective-serv Unmarried White Male United-States 0 -19 0.211111113 0.02187438 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Male United-States 0 -65 0.722222269 0.06809703 0.5625 0.09386094 0 0.1010101 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.0300915 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -25 0.2777778 0.307547957 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Unmarried White Male El-Salvador 0 -34 0.377777785 0.153082266 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -47 0.5222222 0.0186057165 0.6875 0 0 0.5555556 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 -24 0.266666681 0.189534619 0.5625 0 0 0.989899 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -63 0.7 0.0263897553 1 0 0.5874656 0.6060606 Federal-gov Doctorate Divorced Exec-managerial Not-in-family White Female United-States 1 -48 0.533333361 0.2540168 0.1875 0 0 0.353535354 Private 5th-6th Never-married Priv-house-serv Unmarried White Female Nicaragua 0 -26 0.2888889 0.201932371 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -28 0.311111122 0.1225267 0.625 0 0 0.4040404 Private Some-college Separated Machine-op-inspct Not-in-family White Male United-States 0 -23 0.25555557 0.159657314 0.5625 0 0 0.121212125 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -57 0.6333333 0.08288044 0.9375 0.1502415 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -64 0.7111111 0.181525633 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Tech-support Not-in-family White Male United-States 0 -28 0.311111122 0.0301521178 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 1 -28 0.311111122 0.045273643 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Sales Other-relative White Male United-States 0 -34 0.377777785 0.119210213 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.02944154 0.4375 0 0.4331956 0.454545468 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.255888551 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Farming-fishing Husband White Male United-States 1 -34 0.377777785 0.07039042 0.6875 0.0163901635 0 0.2020202 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 -18 0.2 0.143038526 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.12101125 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband Other Male United-States 0 -73 0.811111152 0.1575276 0.5625 0 0.5640496 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male Vietnam 0 -24 0.266666681 0.132946953 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male Mexico 0 -29 0.322222233 0.148619428 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -33 0.366666675 0.121971034 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -57 0.6333333 0.09094601 0.5625 0 0 0.353535354 Federal-gov HS-grad Separated Adm-clerical Other-relative Black Female United-States 0 -41 0.455555558 0.124642268 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Female ? 0 -55 0.6111111 0.07173008 0.375 0 0 0.353535354 Private 10th Widowed Transport-moving Not-in-family Black Female United-States 0 -21 0.233333334 0.136729524 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.150729612 0.875 0 0 0.454545468 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.123947859 0.625 0 0 0.5050505 Private Some-college Never-married Prof-specialty Not-in-family Other Male United-States 0 -32 0.355555564 0.225921646 0.8125 0 0 0.2020202 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 -40 0.444444448 0.04436302 0.625 0 0.04889807 0.4040404 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 -32 0.355555564 0.2510209 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.030717887 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -59 0.655555546 0.2041995 0.625 0 0.500229537 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.09307573 0.5625 0 0.261248857 0.4040404 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 -29 0.322222233 0.143392131 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -59 0.655555546 0.0211213678 0.875 0.1502415 0 0.8080808 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.09967569 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -47 0.5222222 0.0978578255 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -44 0.4888889 0.176926732 0.5625 0 0.3452709 0.454545468 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.08931135 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -42 0.466666669 0.0207172465 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.215456277 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -66 0.733333349 0.0198227931 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -41 0.455555558 0.0750876442 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -22 0.244444445 0.124439538 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 -31 0.344444454 0.438737661 0.5625 0 0.365932047 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 -30 0.333333343 0.126328126 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -36 0.4 0.0571480542 0.5625 0 0 0.161616161 Self-emp-not-inc HS-grad Separated Other-service Not-in-family White Female United-States 0 -75 0.8333334 0.02441091 1 0 0 0.4040404 ? Doctorate Never-married ? Not-in-family White Male United-States 0 -41 0.455555558 0.05988597 0.75 0 0 0.363636374 State-gov Assoc-acdm Divorced Prof-specialty Unmarried Asian-Pac-Islander Female United-States 0 -19 0.211111113 0.0492959879 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -60 0.6666667 0.08926285 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -24 0.266666681 0.144501433 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Own-child White Male United-States 0 -25 0.2777778 0.14616102 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -52 0.5777778 0.114356056 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -30 0.333333343 0.05090102 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female Germany 0 -37 0.411111116 0.161089912 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -55 0.6111111 0.03607855 1 0 0 0.3030303 Self-emp-not-inc Doctorate Divorced Exec-managerial Not-in-family White Female United-States 0 -20 0.222222224 0.07887695 0.625 0 0 0.24242425 Private Some-college Never-married Adm-clerical Other-relative Black Female United-States 0 -32 0.355555564 0.268079519 0.25 0 0 0.151515156 Private 7th-8th Never-married Priv-house-serv Not-in-family White Female Mexico 0 -18 0.2 0.07678832 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -24 0.266666681 0.137840852 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -33 0.366666675 0.171707511 0.625 0 0 0.454545468 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -76 0.844444454 0.0570854172 0.625 0 0 0.4040404 ? Some-college Widowed ? Unmarried White Female United-States 0 -57 0.6333333 0.1334575 0.875 0 0 0.141414136 Local-gov Masters Married-civ-spouse Protective-serv Husband White Male United-States 1 -53 0.5888889 0.117208473 0.875 0 0.430670351 0.3838384 Private Masters Divorced Prof-specialty Unmarried White Female United-States 0 -19 0.211111113 0.3044046 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -50 0.5555556 0.1159658 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.141086623 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -40 0.444444448 0.226783782 0.6875 0 0 0.6060606 Private Assoc-voc Separated Craft-repair Not-in-family White Female United-States 0 -26 0.2888889 0.2908733 0.375 0 0 0.4040404 ? 10th Separated ? Not-in-family White Male United-States 0 -47 0.5222222 0.105561711 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.1955412 0.6875 0 0 0.5050505 Federal-gov Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -49 0.544444442 0.139136732 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Own-child White Male United-States 0 -28 0.311111122 0.100574866 0.625 0 0 0.07070707 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.0334025957 0.625 0 0 0.3030303 ? Some-college Married-civ-spouse ? Wife Black Female United-States 0 -50 0.5555556 0.06666308 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.1223536 0.4375 0 0 0.5050505 Private 11th Never-married Transport-moving Own-child White Male United-States 0 -30 0.333333343 0.117726423 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -47 0.5222222 0.06890797 0.875 1 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.124469846 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.1185515 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.173004746 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -37 0.411111116 0.161242142 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -26 0.2888889 0.157456875 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -55 0.6111111 0.15930438 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.04765526 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.165270552 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.119033076 0.8125 0 0 0.454545468 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 1 -32 0.355555564 0.103805132 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -43 0.477777779 0.05988597 0.625 0.010550105 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Asian-Pac-Islander Female United-States 0 -19 0.211111113 0.348241568 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female El-Salvador 0 -38 0.422222227 0.2939042 0.5625 0 0 0.75757575 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -38 0.422222227 0.155611381 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Sales Husband White Male Mexico 0 -65 0.722222269 0.141328409 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 -70 0.7777778 0.09687649 0.625 0 0.515610635 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.112736873 0.5625 0 0 0.25252524 ? HS-grad Widowed ? Unmarried White Female United-States 0 -44 0.4888889 0.145125136 0.8125 0 0 0.07070707 Private Bachelors Separated Machine-op-inspct Unmarried Black Female United-States 0 -32 0.355555564 0.135178372 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -30 0.333333343 0.129168421 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Own-child Black Female United-States 0 -49 0.544444442 0.131633565 0.75 0 0 0.6060606 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 -23 0.25555557 0.100623362 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -25 0.2777778 0.07055005 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -19 0.211111113 0.0728407353 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -27 0.3 0.160879776 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -43 0.477777779 0.015597038 0.5625 0 0 0.6060606 State-gov HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -38 0.422222227 0.335277379 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.09534419 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.07945215 0.8125 0 0 0.3838384 Federal-gov Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -30 0.333333343 0.156499773 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.106378712 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -30 0.333333343 0.069806464 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.114316985 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -43 0.477777779 0.1850408 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.108824313 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -38 0.422222227 0.0328543372 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -48 0.533333361 0.0953125358 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -57 0.6333333 0.211592883 0.8125 0 0.4331956 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.113378756 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -42 0.466666669 0.180003434 0.875 0 0 0.454545468 Local-gov Masters Separated Exec-managerial Unmarried Black Male United-States 1 -31 0.344444454 0.2101798 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.140052736 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.156699821 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -63 0.7 0.166255921 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -32 0.355555564 0.103782907 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.134040773 0.625 0 0 0.121212125 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -51 0.566666663 0.13814193 0.875 0 0 0.3030303 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -36 0.4 0.1198265 0.8125 0.0217602178 0 0.2020202 Private Bachelors Never-married Other-service Not-in-family White Male ? 0 -24 0.266666681 0.0339461379 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Amer-Indian-Eskimo Male United-States 0 -41 0.455555558 0.0653759539 0.6875 0 0 0.444444448 Local-gov Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -21 0.233333334 0.0438053347 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -27 0.3 0.196989983 0.625 0 0.430670351 0.454545468 Private Some-college Never-married Craft-repair Not-in-family Asian-Pac-Islander Male Cambodia 0 -17 0.188888893 0.151687369 0.3125 0 0 0.353535354 Private 9th Never-married Other-service Own-child Black Male United-States 0 -45 0.5 0.215660349 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Other-service Wife White Female United-States 0 -39 0.433333337 0.08043416 0.5625 0 0.143480256 0.353535354 State-gov HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -21 0.233333334 0.0562940128 0.625 0 0 0.04040404 Private Some-college Never-married Prof-specialty Own-child Amer-Indian-Eskimo Female United-States 0 -29 0.322222233 0.0900488645 0.8125 0.0861408561 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -39 0.433333337 0.09536171 0.875 0 0.5610652 0.454545468 Private Masters Never-married Sales Not-in-family White Male United-States 1 -42 0.466666669 0.356445223 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Other-relative Black Male United-States 0 -22 0.244444445 0.2632287 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Other-relative White Male Mexico 0 -21 0.233333334 0.05774413 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -59 0.655555546 0.105055213 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.148966968 0.875 0 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.182421431 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -35 0.3888889 0.0556487665 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -58 0.644444466 0.2499244 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -45 0.5 0.0368719734 0.625 0 0.4242424 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.0152494945 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Amer-Indian-Eskimo Male United-States 0 -21 0.233333334 0.1474751 0.4375 0 0 0.454545468 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -51 0.566666663 0.297457755 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -34 0.377777785 0.09678623 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -40 0.444444448 0.123321474 0.8125 0 0 0.353535354 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.06545138 0.4375 0 0 0.161616161 Private 11th Divorced Adm-clerical Unmarried White Female United-States 0 -38 0.422222227 0.08250326 0.375 0 0.4331956 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.209722474 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -37 0.411111116 0.05316073 0.3125 0.031370312 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 -62 0.6888889 0.08323674 0.375 0 0 0.4040404 Private 10th Divorced Other-service Unmarried White Female United-States 0 -32 0.355555564 0.117339812 0.8125 0 0 0.6060606 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -36 0.4 0.123864338 0.8125 0 0 0.04040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -43 0.477777779 0.166955724 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -37 0.411111116 0.1728532 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.102966584 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Wife Asian-Pac-Islander Female China 0 -28 0.311111122 0.0151019907 0.5625 0 0 0.5555556 Private HS-grad Never-married Transport-moving Unmarried White Male United-States 0 -49 0.544444442 0.12003395 0.625 0 0 0.282828271 ? Some-college Widowed ? Unmarried White Female United-States 0 -47 0.5222222 0.130908161 0.5625 0 0 0.07070707 Local-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 -59 0.655555546 0.166488975 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.0430529974 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.1514705 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.120269015 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Prof-specialty Other-relative White Male United-States 0 -57 0.6333333 0.03207304 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Not-in-family Black Female United-States 0 -41 0.455555558 0.0624871626 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.0342404731 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.158882737 0.625 0 0 0.4040404 Local-gov Some-college Never-married Farming-fishing Own-child White Male United-States 0 -44 0.4888889 0.164998442 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -20 0.222222224 0.354773521 0.5625 0 0 0.3030303 Local-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.163994864 0.8125 0 0 0.282828271 Self-emp-not-inc Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -23 0.25555557 0.135827661 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Other-relative White Male United-States 0 -24 0.266666681 0.158038139 0.5625 0 0 0.363636374 Private HS-grad Married-spouse-absent Sales Own-child White Female United-States 0 -46 0.51111114 0.180522054 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.150378019 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -21 0.233333334 0.0668139458 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.09232541 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -41 0.455555558 0.0777332857 0.625 0.0217402168 0 0.454545468 Private Some-college Divorced Sales Own-child White Male United-States 0 -51 0.566666663 0.210914627 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -69 0.7666667 0.0201925635 0.25 0.0184801836 0 0.1010101 Self-emp-not-inc 7th-8th Never-married Farming-fishing Other-relative White Male United-States 0 -39 0.433333337 0.365757525 0.5625 0.05178052 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.18307139 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -51 0.566666663 0.06596193 0.8125 0.05178052 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -43 0.477777779 0.1287771 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -35 0.3888889 0.178235412 0.4375 0 0 0.8484849 Self-emp-not-inc 11th Divorced Exec-managerial Unmarried White Female United-States 0 -32 0.355555564 0.123796314 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 -25 0.2777778 0.1409216 0.8125 0 0 0.212121218 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -64 0.7111111 0.14562355 0.625 0 0 0.4040404 Private Some-college Widowed Sales Not-in-family White Female United-States 0 -28 0.311111122 0.253986478 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 -44 0.4888889 0.213870779 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Protective-serv Other-relative White Male Mexico 0 -40 0.444444448 0.166955724 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -21 0.233333334 0.102542929 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Asian-Pac-Islander Male Philippines 0 -23 0.25555557 0.288474143 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.108915918 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Unmarried White Female United-States 0 -19 0.211111113 0.113058828 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -61 0.677777767 0.0573810972 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -47 0.5222222 0.0804678351 0.25 0 0 0.4040404 Self-emp-inc 7th-8th Never-married Craft-repair Not-in-family Other Male ? 0 -39 0.433333337 0.07926356 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -51 0.566666663 0.09385501 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -25 0.2777778 0.288100332 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.0822493359 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.153519392 0.625 0 0 0.3838384 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -54 0.6 0.152553543 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.05643074 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Female United-States 0 -28 0.311111122 0.1327624 0.5625 0 0 0.5050505 Private HS-grad Never-married Machine-op-inspct Own-child Other Male Puerto-Rico 0 -33 0.366666675 0.1379008 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -63 0.7 0.223294869 0.5625 0 0 0.141414136 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -31 0.344444454 0.1435834 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -70 0.7777778 0.1267996 0.5625 0 0 0.161616161 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.200821713 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female Nicaragua 0 -36 0.4 0.0968367457 0.625 0 0 0.121212125 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -50 0.5555556 0.09382066 0.4375 0 0 0.4040404 Local-gov 11th Never-married Craft-repair Unmarried White Male United-States 0 -21 0.233333334 0.10263925 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family Black Female United-States 0 -31 0.344444454 0.208778173 0.625 0 0 0.4040404 Private Some-college Separated Tech-support Unmarried Black Female United-States 0 -19 0.211111113 0.0249780267 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 -39 0.433333337 0.181894049 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -29 0.322222233 0.08758979 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Wife White Female United-States 0 -39 0.433333337 0.12665008 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 -17 0.188888893 0.113290519 0.25 0 0 0.4040404 Private 7th-8th Never-married Farming-fishing Other-relative Other Male Mexico 0 -46 0.51111114 0.11571794 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 -62 0.6888889 0.125746191 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.11957325 0.375 0 0 0.232323229 Private 10th Divorced Other-service Unmarried Black Female United-States 0 -28 0.311111122 0.07776899 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 -19 0.211111113 0.337537766 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative Black Female United-States 0 -61 0.677777767 0.121289417 1 0.0406404063 0 0.4040404 Local-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 0 -18 0.2 0.1386767 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Male ? 0 -39 0.433333337 0.147160545 0.9375 0 0.5544077 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male ? 1 -24 0.266666681 0.137349844 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 -38 0.422222227 0.0618688576 0.625 0 0 0.414141417 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.154710874 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -17 0.188888893 0.106892616 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Male United-States 0 -28 0.311111122 0.128585145 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.09373984 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -61 0.677777767 0.0806113 0.9375 0.1502415 0 0.2020202 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -69 0.7666667 0.08414467 0.1875 0 0.5204316 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.113620557 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child White Female United-States 0 -26 0.2888889 0.168409213 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -34 0.377777785 0.238382041 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -70 0.7777778 0.145746127 0.3125 0.0265302639 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -21 0.233333334 0.155079976 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.07929387 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.07802965 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.130217791 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.137329638 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -53 0.5888889 0.06742686 0.875 0 0.453856736 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.1061753 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -46 0.51111114 0.158496141 0.875 0 0 0.6060606 Self-emp-inc Masters Divorced Sales Not-in-family White Male United-States 1 -36 0.4 0.08600093 0.5625 0 0 0.373737365 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -39 0.433333337 0.0192442276 0.5625 0 0 0.4848485 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -78 0.8666667 0.0616513044 0.8125 0 0 0.0303030312 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -30 0.333333343 0.124393061 0.5625 0 0 0.3030303 Private HS-grad Never-married Prof-specialty Own-child White Female United-States 0 -22 0.244444445 0.1804702 0.625 0 0 0.161616161 Private Some-college Never-married Sales Own-child White Female United-States 0 -43 0.477777779 0.0888385251 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.129732177 0.5625 0 0 0.565656543 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -36 0.4 0.125821635 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Own-child White Male United-States 1 -50 0.5555556 0.0297136474 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -27 0.3 0.03128029 0.8125 0 0 0.353535354 Federal-gov Bachelors Never-married Protective-serv Not-in-family White Female United-States 0 -46 0.51111114 0.05255051 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -24 0.266666681 0.2813138 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -41 0.455555558 0.1507121 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -68 0.75555557 0.150771365 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -38 0.422222227 0.07788349 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.07709208 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.132748932 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family Black Male United-States 0 -31 0.344444454 0.240549475 1 0 0 0.4848485 Self-emp-not-inc Doctorate Never-married Prof-specialty Own-child White Female United-States 0 -29 0.322222233 0.0398941226 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.196876153 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -51 0.566666663 0.082365185 0.625 0 0 0.363636374 Private Some-college Widowed Machine-op-inspct Unmarried White Female United-States 0 -26 0.2888889 0.0352406725 0.8125 0 0 0.6060606 Federal-gov Bachelors Never-married Tech-support Not-in-family Other Male United-States 0 -27 0.3 0.07128015 0.8125 0 0 0.6060606 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -36 0.4 0.07215238 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -28 0.311111122 0.189842433 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -53 0.5888889 0.19082579 0.8125 0 0 0.4040404 Private Bachelors Divorced Tech-support Not-in-family White Female United-States 0 -40 0.444444448 0.01791467 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -38 0.422222227 0.148704961 0.5625 0 0 0.2020202 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -21 0.233333334 0.0819651037 0.25 0 0 0.4040404 ? 7th-8th Never-married ? Own-child White Male United-States 0 -53 0.5888889 0.140298575 0.375 0 0 0.343434334 Private 10th Married-civ-spouse Other-service Husband White Male United-States 0 -34 0.377777785 0.116295159 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.03678239 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -64 0.7111111 0.4256381 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -21 0.233333334 0.265698582 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -25 0.2777778 0.161055565 0.8125 0 0 0.13131313 ? Bachelors Never-married ? Not-in-family White Male United-States 0 -38 0.422222227 0.0253808 0.9375 1 0 0.575757563 Federal-gov Prof-school Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female Canada 1 -47 0.5222222 0.130000234 0.875 0 0 0.5050505 Local-gov Masters Divorced Protective-serv Not-in-family Black Male United-States 1 -48 0.533333361 0.09638144 1 0 0.43663913 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 1 -57 0.6333333 0.0571749955 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.126963273 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.227505133 0.4375 0 0 0.4040404 Private 11th Divorced Farming-fishing Not-in-family White Male United-States 0 -51 0.566666663 0.06360321 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -32 0.355555564 0.113764018 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -49 0.544444442 0.07822631 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -52 0.5777778 0.0863956138 0.5625 0 0 0.141414136 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -64 0.7111111 0.202991843 0.75 0.09386094 0 0.454545468 Federal-gov Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.117865168 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -24 0.266666681 0.195263714 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -39 0.433333337 0.104156047 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.14079161 0.5625 0.0394203924 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -30 0.333333343 0.137056187 0.625 0 0 0.444444448 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -34 0.377777785 0.09504784 0.875 0 0 0.6060606 Private Masters Divorced Prof-specialty Own-child White Female United-States 1 -30 0.333333343 0.114224039 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -25 0.2777778 0.0927086547 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family Black Female United-States 0 -58 0.644444466 0.329415619 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 0 -32 0.355555564 0.0244506486 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -37 0.411111116 0.170687109 0.5625 0 0 0.25252524 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 -35 0.3888889 0.181382835 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family Black Female United-States 0 -18 0.2 0.190346912 0.1875 0 0 0.3030303 Private 5th-6th Never-married Handlers-cleaners Other-relative White Male Honduras 0 -46 0.51111114 0.233701646 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -71 0.788888931 0.122849323 0.8125 0.116781168 0 0.454545468 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 1 -44 0.4888889 0.138108924 0.375 0 0 0.4040404 Private 10th Divorced Adm-clerical Unmarried White Female United-States 0 -45 0.5 0.0867081359 0.375 0 0 0.4040404 Private 10th Divorced Sales Not-in-family White Female United-States 0 -40 0.444444448 0.159028232 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Prof-specialty Husband White Male Cuba 1 -38 0.422222227 0.210325286 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.08552406 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female China 0 -47 0.5222222 0.137867123 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.131983131 0.8125 0 0 0.353535354 Private Bachelors Divorced Tech-support Unmarried White Female United-States 0 -59 0.655555546 0.136513323 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.156200737 0.6875 0 0 0.373737365 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -44 0.4888889 0.0168262385 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -76 0.844444454 0.187874362 0.8125 0 0 0.2020202 Private Bachelors Widowed Prof-specialty Not-in-family White Female United-States 0 -50 0.5555556 0.0245766 0.375 0 0 0.4040404 Local-gov 10th Never-married Other-service Not-in-family White Male United-States 0 -33 0.366666675 0.104312979 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -43 0.477777779 0.0502328761 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.209769621 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -37 0.411111116 0.109223045 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.161451608 0.4375 0 0 0.5555556 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -49 0.544444442 0.109689131 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Exec-managerial Not-in-family Amer-Indian-Eskimo Female United-States 0 -48 0.533333361 0.057323847 0.625 0 0 0.454545468 Self-emp-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -49 0.544444442 0.113855615 0.5625 0 0.143480256 0.4040404 Private HS-grad Separated Prof-specialty Unmarried White Female Puerto-Rico 0 -22 0.244444445 0.2941985 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -42 0.466666669 0.232613891 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female England 0 -36 0.4 0.0335669369 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -57 0.6333333 0.199713752 0.625 0 0 0.5050505 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -30 0.333333343 0.121426821 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -40 0.444444448 0.06441616 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Other-relative Amer-Indian-Eskimo Male United-States 0 -42 0.466666669 0.0223310366 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -56 0.622222245 0.221632585 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Italy 1 -55 0.6111111 0.01663226 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -25 0.2777778 0.298951656 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 -52 0.5777778 0.198484555 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -33 0.366666675 0.203317836 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Unmarried Asian-Pac-Islander Female United-States 0 -55 0.6111111 0.15280813 0.5625 0.0406404063 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -47 0.5222222 0.24438189 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.121464536 0.75 0 0 0.656565666 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 -55 0.6111111 0.139751 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Divorced Sales Not-in-family White Female Germany 0 -43 0.477777779 0.226740673 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -31 0.344444454 0.09675525 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -62 0.6888889 0.06834691 0.75 0 0 0.4040404 State-gov Assoc-acdm Widowed Prof-specialty Not-in-family White Female United-States 0 -42 0.466666669 0.177726224 0.5625 0 0 0.08080808 Local-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -38 0.422222227 0.0524144545 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.06429897 0.5625 0 0 0.424242437 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 -26 0.2888889 0.173711285 0.625 0 0 0.6060606 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -26 0.2888889 0.164592966 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -37 0.411111116 0.08536241 0.5625 0 0 0.727272749 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -79 0.8777778 0.065388076 0.5 0.184811845 0 0.454545468 Self-emp-inc 12th Widowed Sales Not-in-family White Male United-States 1 -61 0.677777767 0.08969054 0.25 0 0 0.4848485 Private 7th-8th Never-married Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.07046316 0.25 0 0 1 Self-emp-not-inc 7th-8th Never-married Other-service Other-relative White Female Mexico 0 -60 0.6666667 0.07094945 0.8125 0.07298073 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.174266949 0.5625 0 0 0.8181818 Self-emp-inc HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 -34 0.377777785 0.123206973 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.111936718 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 -27 0.3 0.1388323 0.375 0 0 0.6060606 Local-gov 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.233443 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -25 0.2777778 0.0729444548 0.5625 0 0 0.2020202 Private HS-grad Separated Other-service Unmarried White Female United-States 0 -32 0.355555564 0.04950344 0.25 0 0 0.4040404 Private 7th-8th Divorced Other-service Unmarried White Female United-States 0 -36 0.4 0.08698698 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.122098334 0.875 0 0 0.3030303 Private Masters Never-married Handlers-cleaners Unmarried White Male United-States 0 -40 0.444444448 0.09894761 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.123772062 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Male ? 1 -25 0.2777778 0.110788338 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -41 0.455555558 0.2070903 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.06323411 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.188477173 0.8125 0 0.518365443 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -52 0.5777778 0.09271741 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband Other Male Dominican-Republic 0 -32 0.355555564 0.06840551 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.09182363 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -35 0.3888889 0.175015241 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.06649065 0.5625 0 0 0.444444448 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -62 0.6888889 0.113613144 0.25 0 0 0.05050505 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.1340017 0.75 0 0 0.02020202 Self-emp-not-inc Assoc-acdm Never-married Prof-specialty Own-child Black Female United-States 0 -41 0.455555558 0.0196099561 0.625 0 0 0.2020202 ? Some-college Widowed ? Not-in-family White Female United-States 0 -28 0.311111122 0.116974756 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Not-in-family White Female Mexico 0 -23 0.25555557 0.045772057 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -50 0.5555556 0.06666645 0.8125 0.07298073 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.06342944 0.625 0 0 0.353535354 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -63 0.7 0.08246891 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -63 0.7 0.10417895 0.5625 0 0 0.4040404 Federal-gov HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 -40 0.444444448 0.07855567 0.5625 0 0 0.6060606 Private HS-grad Divorced Sales Not-in-family White Male United-States 1 -20 0.222222224 0.160762578 0.4375 0 0 0.4040404 ? 11th Divorced ? Not-in-family White Female United-States 0 -61 0.677777767 0.09388465 0.625 1 0 0.3030303 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -40 0.444444448 0.113848209 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -41 0.455555558 0.1599321 0.8125 0 0 0.151515156 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female Cuba 1 -41 0.455555558 0.146135435 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family Black Male ? 0 -27 0.3 0.145806074 0.8125 0 0 0.24242425 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 -20 0.222222224 0.08541899 0.625 0 0 0.151515156 State-gov Some-college Never-married Prof-specialty Own-child White Female United-States 0 -28 0.311111122 0.0346607566 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -35 0.3888889 0.03701274 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.149965152 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.0253760852 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -57 0.6333333 0.107306838 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.084408015 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -38 0.422222227 0.141178891 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -37 0.411111116 0.151509568 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 -43 0.477777779 0.295295715 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 -26 0.2888889 0.258823127 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.132554948 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 -27 0.3 0.16306068 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.124136448 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -45 0.5 0.1090816 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female Germany 0 -65 0.722222269 0.174149752 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 -57 0.6333333 0.06417437 0.625 1 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -59 0.655555546 0.143316686 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -18 0.2 0.138077259 0.625 0 0 0.262626261 Private Some-college Never-married Other-service Own-child White Male United-States 0 -44 0.4888889 0.2612263 0.5 0 0 0.4040404 Local-gov 12th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -37 0.411111116 0.0564960726 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -27 0.3 0.108543448 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -43 0.477777779 0.178956762 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -59 0.655555546 0.09865731 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.06550864 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -36 0.4 0.294934 0.5625 0 0 0.909090936 State-gov HS-grad Never-married Exec-managerial Unmarried Black Male United-States 0 -68 0.75555557 0.0900758058 0.625 0.200512 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -63 0.7 0.114489414 0.4375 0.0217602178 0 0.3030303 Private 11th Widowed Sales Not-in-family White Female United-States 0 -37 0.411111116 0.08531998 0.625 0 0 0.575757563 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -46 0.51111114 0.118376382 0.875 0 0.430670351 0.6060606 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -31 0.344444454 0.08201495 0.75 0 0 0.353535354 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female Poland 0 -23 0.25555557 0.12127123 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -22 0.244444445 0.08382406 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -49 0.544444442 0.128049016 0.5625 0 0.3838384 0.444444448 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.149918 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -38 0.422222227 0.0149827749 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -46 0.51111114 0.0768907 0.875 0 0.43663913 0.454545468 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.15421246 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 -26 0.2888889 0.08929181 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child Black Female United-States 0 -47 0.5222222 0.0693875253 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife Other Female Puerto-Rico 0 -40 0.444444448 0.126491129 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -31 0.344444454 0.0341138467 0.875 0 0 0.5050505 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -42 0.466666669 0.09274435 0.1875 0 0 0.353535354 Private 5th-6th Married-spouse-absent Farming-fishing Not-in-family White Male Mexico 0 -48 0.533333361 0.0205933172 0.6875 0 0 0.7070707 Self-emp-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -56 0.622222245 0.136202142 0.625 0 0 0.3838384 Private Some-college Separated Tech-support Unmarried Black Female United-States 0 -50 0.5555556 0.0337966122 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -17 0.188888893 0.1399544 0.375 0 0 0.2020202 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 -21 0.233333334 0.3641882 0.5625 0 0.3946281 0.25252524 Private HS-grad Never-married Other-service Other-relative Black Male United-States 0 -50 0.5555556 0.216723189 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -49 0.544444442 0.136089668 0.5625 0 0 0.323232323 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -34 0.377777785 0.09678623 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -32 0.355555564 0.07750092 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.150704011 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -62 0.6888889 0.23848173 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.02204613 0.8125 0 0 0.151515156 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -24 0.266666681 0.2632624 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family Black Female United-States 0 -31 0.344444454 0.0684964359 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 0 -36 0.4 0.188401744 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -58 0.644444466 0.1504676 0.75 0 0 0.353535354 Private Assoc-acdm Married-civ-spouse Priv-house-serv Other-relative White Female Poland 0 -46 0.51111114 0.138988554 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Wife White Female Mexico 0 -39 0.433333337 0.0514694862 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.124389693 0.5625 0 0 0.181818187 ? HS-grad Never-married ? Own-child White Female United-States 0 -21 0.233333334 0.05265019 0.5625 0 0 0.424242437 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -39 0.433333337 0.13565658 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -21 0.233333334 0.127306774 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 -33 0.366666675 0.08076554 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.36988762 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.1446119 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Unmarried White Female United-States 0 -30 0.333333343 0.0227728747 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Wife Other Female Taiwan 1 -43 0.477777779 0.157755241 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Female Cuba 0 -22 0.244444445 0.160112619 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -25 0.2777778 0.125238344 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Own-child White Female United-States 1 -69 0.7666667 0.193292946 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -17 0.188888893 0.09431301 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Own-child White Female United-States 0 -18 0.2 0.07763024 0.4375 0 0 0.121212125 ? 11th Never-married ? Own-child White Male United-States 0 -54 0.6 0.104672648 0.5625 0 0 0.4040404 Private HS-grad Widowed Handlers-cleaners Unmarried White Female United-States 0 -65 0.722222269 0.07945215 0.5625 0 0 0.454545468 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -28 0.311111122 0.106914841 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Other-relative Other Male Ecuador 0 -27 0.3 0.1343506 0.6875 0 0 0.3838384 Local-gov Assoc-voc Never-married Tech-support Own-child White Female United-States 0 -35 0.3888889 0.193776548 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Craft-repair Unmarried White Male United-States 1 -38 0.422222227 0.0927504152 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 -33 0.366666675 0.07281985 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -26 0.2888889 0.2471198 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -56 0.622222245 0.126190051 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Wife White Female Canada 1 -38 0.422222227 0.02229736 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 1 -51 0.566666663 0.180937633 0.625 0 0.4722222 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Wife White Female Canada 0 -26 0.2888889 0.241782039 0.625 0 0 0.5050505 Private Some-college Never-married Priv-house-serv Not-in-family White Female Hungary 0 -33 0.366666675 0.134186253 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.167204261 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -36 0.4 0.3101202 0.3125 0 0 0.4040404 Private 9th Divorced Sales Not-in-family White Female United-States 0 -42 0.466666669 0.126148969 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 -44 0.4888889 0.0780842 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -44 0.4888889 0.122422978 0.8125 0.1502415 0 0.5555556 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 -21 0.233333334 0.0182184335 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -41 0.455555558 0.5432406 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.101538688 1 0.1502415 0 0.5050505 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male Canada 1 -62 0.6888889 0.0470578335 0.6875 0.07298073 0 0.5050505 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.108294919 0.4375 0 0 0.454545468 Private 11th Separated Craft-repair Not-in-family White Male Germany 0 -38 0.422222227 0.1478718 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -60 0.6666667 0.01675215 0.625 0 0 0.3030303 Private Some-college Separated Transport-moving Not-in-family Amer-Indian-Eskimo Female United-States 0 -24 0.266666681 0.0743386745 0.5 0 0 0.4040404 Private 12th Never-married Machine-op-inspct Unmarried White Male Mexico 0 -24 0.266666681 0.253568232 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -22 0.244444445 0.205159947 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -32 0.355555564 0.09678623 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried White Female United-States 0 -22 0.244444445 0.160918832 0.125 0 0 0.24242425 Private 1st-4th Never-married Machine-op-inspct Not-in-family White Male Mexico 0 -51 0.566666663 0.135123149 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -31 0.344444454 0.12328577 0.875 0 0.453856736 0.4848485 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.141275212 0.9375 0 0 0.5555556 Local-gov Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.11830835 0.75 0.14084141 0 0.4040404 ? Assoc-acdm Divorced ? Not-in-family White Female United-States 1 -49 0.544444442 0.132488951 0.5625 0.07298073 0 0.434343427 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -37 0.411111116 0.0664946958 0.8125 0 0 0.424242437 Local-gov Bachelors Never-married Tech-support Own-child White Female United-States 0 -37 0.411111116 0.121337235 0.9375 0 0 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -66 0.733333349 0.1018566 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 -18 0.2 0.0800475553 0.5625 0 0 0.24242425 ? HS-grad Never-married ? Own-child White Female United-States 0 -46 0.51111114 0.1902991 0.6875 0 0 0.4040404 Private Assoc-voc Separated Machine-op-inspct Not-in-family Black Female United-States 0 -52 0.5777778 0.0603042357 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.19600594 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -67 0.7444445 0.111932673 0.5625 0 0 0.3838384 Private HS-grad Widowed Exec-managerial Unmarried White Male United-States 1 -19 0.211111113 0.127075076 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 -37 0.411111116 0.120527647 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -42 0.466666669 0.127121553 0.5625 0 0.453856736 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male Italy 1 -39 0.433333337 0.108309731 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 -54 0.6 0.0630461946 0.5625 0 0.4242424 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -46 0.51111114 0.214406908 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.0740355849 0.5625 0 0 0.323232323 ? HS-grad Separated ? Unmarried Black Female United-States 0 -33 0.366666675 0.05900499 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -69 0.7666667 0.0602658466 0.625 0 0 0.141414136 Self-emp-not-inc Some-college Widowed Farming-fishing Not-in-family White Female United-States 0 -21 0.233333334 0.03253239 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -27 0.3 0.148681387 0.5625 0 0 0.4848485 Private HS-grad Never-married Handlers-cleaners Other-relative Black Male United-States 0 -39 0.433333337 0.260703653 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.168884054 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Black Male United-States 0 -26 0.2888889 0.05270946 0.6875 0 0 0.363636374 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -42 0.466666669 0.0211402271 1 0 0 0.4040404 Private Doctorate Married-spouse-absent Prof-specialty Unmarried Amer-Indian-Eskimo Female United-States 0 -36 0.4 0.194779441 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -24 0.266666681 0.407176524 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Unmarried White Male Mexico 0 -35 0.3888889 0.221233174 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male Mexico 0 -42 0.466666669 0.271560341 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Unmarried Black Female United-States 0 -37 0.411111116 0.1478718 0.6875 0.04386044 0 0.444444448 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -41 0.455555558 0.148535237 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.137837484 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Unmarried Black Female United-States 0 -42 0.466666669 0.135992 0.9375 1 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.07402952 0.8125 0 0 0.161616161 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 -18 0.2 0.246300116 0.5625 0 0 0.161616161 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -41 0.455555558 0.1183225 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -31 0.344444454 0.137056187 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -26 0.2888889 0.07166811 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -67 0.7444445 0.116357125 0.125 0.0206202064 0 0.343434334 Private 1st-4th Widowed Machine-op-inspct Not-in-family White Female Ecuador 0 -37 0.411111116 0.08430429 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.167938411 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.0637513846 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child Amer-Indian-Eskimo Male United-States 0 -40 0.444444448 0.1316046 0.75 0.07688077 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.08776289 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 -38 0.422222227 0.0449153222 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -43 0.477777779 0.226335883 0.5625 0 0 0.4040404 Private HS-grad Separated Transport-moving Not-in-family White Male United-States 0 -23 0.25555557 0.130386844 0.625 0 0 0.4040404 Private Some-college Separated Farming-fishing Other-relative White Female United-States 0 -44 0.4888889 0.219209209 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -60 0.6666667 0.211390153 0.875 0 0 0.25252524 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.0205488633 0.875 0 0.383149683 0.5555556 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -21 0.233333334 0.0219834913 0.625 0 0 0.2020202 Local-gov Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -18 0.2 0.158248946 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -49 0.544444442 0.08124779 0.8125 0.2782828 0 0.6060606 Private Bachelors Divorced Exec-managerial Not-in-family Black Female United-States 1 -43 0.477777779 0.235992342 0.1875 0 0 0.4040404 Private 5th-6th Divorced Priv-house-serv Unmarried White Female Mexico 0 -26 0.2888889 0.119193375 0.4375 0 0 0.656565666 ? 11th Never-married ? Not-in-family White Female United-States 0 -36 0.4 0.0245321468 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -31 0.344444454 0.0831121355 0.5625 0.05178052 0 0.353535354 Private HS-grad Married-civ-spouse Transport-moving Wife White Female United-States 1 -38 0.422222227 0.0881070644 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Other-relative White Female United-States 0 -43 0.477777779 0.02373266 0.625 0 0 0.8484849 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -58 0.644444466 0.0224623755 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -55 0.6111111 0.11947155 0.5625 0 0 0.2929293 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.145570338 0.75 0 0 0.353535354 Private Assoc-acdm Divorced Exec-managerial Unmarried Black Female Jamaica 0 -38 0.422222227 0.2257041 0.8125 0 0 0.353535354 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -54 0.6 0.134532452 0.5625 0 0.459366381 0.353535354 Self-emp-not-inc HS-grad Widowed Craft-repair Not-in-family White Male United-States 0 -57 0.6333333 0.111726575 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -35 0.3888889 0.261181176 0.75 0 0 0.5252525 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 -44 0.4888889 0.100991778 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 -36 0.4 0.127186209 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.1957702 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.104803987 0.625 0 0.506198347 0.4040404 Private Some-college Never-married Other-service Own-child Black Female United-States 0 -25 0.2777778 0.07734735 0.9375 0 0 0.08080808 Private Prof-school Never-married Prof-specialty Not-in-family White Female Italy 0 -54 0.6 0.113526255 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.06941716 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -37 0.411111116 0.08340579 0.625 0 0 0.6060606 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -60 0.6666667 0.0374626629 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Other-service Husband Black Male United-States 0 -66 0.733333349 0.127859741 0.25 0 0 0.2020202 Local-gov 7th-8th Widowed Other-service Not-in-family White Female United-States 0 -36 0.4 0.14678067 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -29 0.322222233 0.230127871 0.5625 0 0.359045 0.5050505 Self-emp-not-inc HS-grad Married-spouse-absent Transport-moving Other-relative Asian-Pac-Islander Male India 1 -29 0.322222233 0.109788142 0.8125 0.0220202189 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Female Taiwan 0 -25 0.2777778 0.130902767 0.8125 0 0 0.444444448 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -62 0.6888889 0.036962226 0.5625 0 0 0.25252524 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -23 0.25555557 0.264866084 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -38 0.422222227 0.1881283 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -33 0.366666675 0.264572442 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -49 0.544444442 0.02357236 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -57 0.6333333 0.0343610346 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -57 0.6333333 0.08938947 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -46 0.51111114 0.125329956 0.625 0 0 0.454545468 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 -37 0.411111116 0.1320956 0.875 0 0 0.7070707 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.2053647 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -26 0.2888889 0.0279658251 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -40 0.444444448 0.233613417 0.6875 0 0 0.4040404 Private Assoc-voc Separated Prof-specialty Other-relative White Female United-States 0 -39 0.433333337 0.07222512 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Other-relative Amer-Indian-Eskimo Male United-States 0 -39 0.433333337 0.101114362 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Other-service Unmarried Black Female United-States 0 -31 0.344444454 0.269774139 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -31 0.344444454 0.275894552 0.8125 0 0 0.363636374 Private Bachelors Married-civ-spouse Machine-op-inspct Husband Other Male Mexico 0 -27 0.3 0.0919024348 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 -36 0.4 0.13669382 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Iran 0 -40 0.444444448 0.132694378 0.8125 0.0861408561 0 0.4040404 Local-gov Bachelors Divorced Tech-support Not-in-family White Female England 1 -57 0.6333333 0.160093084 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 -24 0.266666681 0.114687435 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.108293571 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -28 0.311111122 0.0227641184 0.5 0 0 0.5050505 Private 12th Never-married Transport-moving Not-in-family White Male United-States 0 -22 0.244444445 0.133250713 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -31 0.344444454 0.150340974 0.25 0 0 0.5050505 Private 7th-8th Never-married Handlers-cleaners Own-child White Male United-States 0 -33 0.366666675 0.08470505 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -20 0.222222224 0.191262916 0.625 0 0 0.151515156 Private Some-college Never-married Handlers-cleaners Other-relative White Male United-States 0 -25 0.2777778 0.2520117 0.5 0 0 0.6060606 Private 12th Married-civ-spouse Farming-fishing Husband Other Male Mexico 0 -49 0.544444442 0.0798589662 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -21 0.233333334 0.09945074 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -45 0.5 0.0557666346 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.09602783 0.5625 0 0 0.454545468 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.158393085 0.1875 0 0 0.323232323 Private 5th-6th Married-spouse-absent Priv-house-serv Not-in-family White Female Mexico 0 -23 0.25555557 0.0358623452 0.8125 0 0.3677686 0.121212125 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -47 0.5222222 0.01888254 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.166418254 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -30 0.333333343 0.0831121355 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Unmarried White Female United-States 0 -29 0.322222233 0.0898003355 0.625 0 0 0.4040404 Local-gov Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 -31 0.344444454 0.06888237 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Unmarried White Female United-States 0 -64 0.7111111 0.0308593288 0.3125 0 0 0.5050505 ? 9th Married-civ-spouse ? Husband White Male United-States 0 -55 0.6111111 0.16231373 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Other-relative Asian-Pac-Islander Male Philippines 0 -19 0.211111113 0.260238916 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -31 0.344444454 0.236175537 0.5 0 0 0.4040404 State-gov 12th Married-civ-spouse Tech-support Wife White Female United-States 1 -18 0.2 0.05128426 0.4375 0 0 0.08080808 State-gov 11th Never-married Other-service Own-child White Male United-States 0 -68 0.75555557 0.04968866 0.5625 0 0 0.24242425 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -50 0.5555556 0.189602658 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -36 0.4 0.19758673 0.625 0 0 0.4848485 Local-gov Some-college Never-married Exec-managerial Unmarried Black Female United-States 0 -44 0.4888889 0.09894626 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -58 0.644444466 0.223259166 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -20 0.222222224 0.14394711 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child Black Female United-States 0 -18 0.2 0.06856244 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 -32 0.355555564 0.153744355 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -49 0.544444442 0.08769823 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Other-service Not-in-family White Female United-States 0 -34 0.377777785 0.218396246 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -22 0.244444445 0.150210992 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.1277466 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -35 0.3888889 0.09367922 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -26 0.2888889 0.242019132 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male ? 0 -44 0.4888889 0.0505588651 0.5 0 0 0.6060606 Self-emp-not-inc 12th Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Vietnam 0 -55 0.6111111 0.0941890851 0.5625 0 0 0.6060606 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -21 0.233333334 0.0231089685 0.6875 0 0.597566545 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.233052358 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Wife White Female United-States 0 -39 0.433333337 0.109973364 0.625 0.0220202189 0 0.444444448 Local-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -52 0.5777778 0.0211893953 0.5625 0 0 0.3838384 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -57 0.6333333 0.02271495 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -67 0.7444445 0.0428044647 0.25 0 0 0.353535354 ? 7th-8th Widowed ? Not-in-family White Female United-States 0 -58 0.644444466 0.202479959 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -27 0.3 0.119264096 0.625 0 0 0.161616161 Local-gov Some-college Never-married Prof-specialty Other-relative White Male United-States 0 -66 0.733333349 0.0251437165 0.5625 0 0 0.151515156 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -41 0.455555558 0.112968571 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -18 0.2 0.08835425 0.4375 0 0 0.161616161 Private 11th Never-married Prof-specialty Own-child White Female United-States 0 -58 0.644444466 0.185800552 0.5625 0.0861408561 0 0.5252525 Private HS-grad Widowed Craft-repair Unmarried White Male Mexico 1 -50 0.5555556 0.185343891 0.1875 0 0 0.373737365 Private 5th-6th Divorced Other-service Not-in-family White Male Cuba 0 -31 0.344444454 0.2687322 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -32 0.355555564 0.149965152 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family White Male United-States 0 -37 0.411111116 0.07484921 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.0928096846 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.163096383 0.6875 0 0 0.5050505 Local-gov Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -35 0.3888889 0.160215676 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 -44 0.4888889 0.247691631 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female Mexico 0 -26 0.2888889 0.139152229 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Own-child White Male Mexico 0 -48 0.533333361 0.166391984 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -40 0.444444448 0.126423776 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -62 0.6888889 0.0280985124 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 -37 0.411111116 0.10226611 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.0801088437 0.4375 0 0 0.181818187 Private 11th Never-married Sales Own-child White Male United-States 0 -48 0.533333361 0.1514577 0.5625 0 0 0.3838384 Private HS-grad Divorced Machine-op-inspct Other-relative Other Female Ecuador 0 -45 0.5 0.120118812 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -35 0.3888889 0.0413166247 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.0249133669 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -34 0.377777785 0.152418166 0.5625 0 0 0.5151515 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -29 0.322222233 0.1256977 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female Cuba 0 -19 0.211111113 0.116239928 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Male United-States 0 -53 0.5888889 0.153156355 0.625 0 0 0.6060606 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -49 0.544444442 0.126330152 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -71 0.788888931 0.09261032 0.5625 0 0 0.161616161 Private HS-grad Widowed Sales Other-relative White Female United-States 0 -38 0.422222227 0.161242142 0.25 0 0 0.363636374 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -39 0.433333337 0.220356241 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.09483231 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.126254037 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -52 0.5777778 0.131056339 0.1875 0 0 0.4040404 Private 5th-6th Divorced Farming-fishing Unmarried White Male United-States 0 -41 0.455555558 0.251014173 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -20 0.222222224 0.1585783 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -30 0.333333343 0.08625619 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -56 0.622222245 0.061658714 0.375 0 0 0.363636374 Private 10th Divorced Adm-clerical Unmarried Black Female United-States 0 -26 0.2888889 0.104131125 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -36 0.4 0.129419655 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -26 0.2888889 0.145835027 0.8125 0 0 0.424242437 Local-gov Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 -58 0.644444466 0.105098322 0.75 0 0.4242424 0.4040404 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -24 0.266666681 0.139328018 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -41 0.455555558 0.06575852 0.625 0 0 0.323232323 Private Some-college Divorced Sales Not-in-family Asian-Pac-Islander Female United-States 0 -27 0.3 0.127654985 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 -28 0.311111122 0.257148057 0.625 0 0.5369605 0.4040404 State-gov Some-college Separated Exec-managerial Own-child White Male United-States 0 -57 0.6333333 0.2483975 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -21 0.233333334 0.02773817 0.625 0 0 0.2020202 State-gov Some-college Never-married Prof-specialty Own-child White Female United-States 0 -50 0.5555556 0.128686845 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -27 0.3 0.08955517 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -58 0.644444466 0.1034219 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -27 0.3 0.0447718576 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.16186583 0.5625 0 0 0.171717167 Private HS-grad Separated Sales Unmarried Black Female United-States 0 -68 0.75555557 0.163059339 0.8125 0.200512 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.08622319 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Widowed Sales Unmarried White Female United-States 0 -19 0.211111113 0.0198867787 0.625 0 0 0.181818187 Private Some-college Never-married Other-service Own-child White Female United-States 0 -26 0.2888889 0.230990678 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried Black Female United-States 0 -37 0.411111116 0.145130515 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Unmarried Black Female United-States 0 -53 0.5888889 0.156205446 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -32 0.355555564 0.035385482 0.625 0 0 0.3838384 Private Some-college Never-married Tech-support Not-in-family Black Male United-States 0 -18 0.2 0.0188050829 0.4375 0 0 0.25252524 Private 11th Never-married Exec-managerial Own-child White Female United-States 0 -53 0.5888889 0.1030858 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.134237438 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -50 0.5555556 0.157182068 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -43 0.477777779 0.232900813 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -60 0.6666667 0.16091615 0.8125 0 0 0.464646459 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.131748065 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -34 0.377777785 0.165132478 0.5625 0 0.383149683 0.454545468 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -37 0.411111116 0.09324479 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -25 0.2777778 0.04544135 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -46 0.51111114 0.06908376 0.875 0.1502415 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.143692523 0.4375 0 0.404499531 0.4040404 Private 11th Married-spouse-absent Handlers-cleaners Own-child White Male Dominican-Republic 0 -26 0.2888889 0.02505683 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.09444233 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -18 0.2 0.201292515 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 -22 0.244444445 0.0345940776 0.8125 0 0 0.161616161 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -36 0.4 0.1346712 0.625 0 0 0.3030303 Private Some-college Divorced Machine-op-inspct Own-child White Female United-States 0 -59 0.655555546 0.0219248943 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.123825945 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Other-service Wife White Female El-Salvador 0 -33 0.366666675 0.121971034 0.375 0 0 0.353535354 Private 10th Divorced Craft-repair Not-in-family White Male England 0 -53 0.5888889 0.09136024 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female South 0 -44 0.4888889 0.06482702 0.625 0.03411034 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -55 0.6111111 0.122057922 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -56 0.622222245 0.08959693 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -54 0.6 0.08410089 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Divorced Sales Not-in-family White Female United-States 0 -51 0.566666663 0.0307124984 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 -31 0.344444454 0.130863041 0.625 0.0246302467 0 0.3838384 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.06882175 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.0815852359 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -22 0.244444445 0.09346503 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -43 0.477777779 0.0666725039 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Husband Amer-Indian-Eskimo Male United-States 0 -26 0.2888889 0.08508559 0.75 0 0 0.4040404 State-gov Assoc-acdm Never-married Adm-clerical Unmarried Black Female United-States 0 -30 0.333333343 0.07635456 0.8125 0 0 0.181818187 Private Bachelors Never-married Sales Own-child White Male United-States 0 -30 0.333333343 0.219706282 0.3125 0.0258002579 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.2537804 0.5625 0 0 0.151515156 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -27 0.3 0.09231666 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.188013777 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.120438069 0.8125 0.0861408561 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -25 0.2777778 0.165264487 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Separated Craft-repair Own-child White Male United-States 0 -30 0.333333343 0.0334025957 0.9375 0 0 0.4040404 Federal-gov Prof-school Never-married Prof-specialty Not-in-family Black Female United-States 0 -46 0.51111114 0.160737664 0.5625 0.07298073 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Husband Black Male United-States 1 -47 0.5222222 0.111928634 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 1 -66 0.733333349 0.167739049 0.8125 0.0555605553 0 0.262626261 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.105342813 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -71 0.788888931 0.08656871 0.5625 0 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -36 0.4 0.1259065 0.8125 0 0.4242424 0.5555556 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -46 0.51111114 0.100012459 0.5625 0 0 0.4040404 ? HS-grad Married-spouse-absent ? Not-in-family Asian-Pac-Islander Male Philippines 0 -44 0.4888889 0.261176467 0.625 0 0 0.151515156 Local-gov Some-college Widowed Adm-clerical Unmarried White Female United-States 0 -42 0.466666669 0.07780064 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -39 0.433333337 0.13565658 0.8125 0 0.453856736 0.454545468 Private Bachelors Married-civ-spouse Transport-moving Husband White Male Philippines 1 -36 0.4 0.14857161 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -60 0.6666667 0.189981177 0.8125 0 0.453856736 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.189240292 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -26 0.2888889 0.196393222 0.8125 0 0 0.2020202 Private Bachelors Never-married Transport-moving Own-child White Male United-States 0 -24 0.266666681 0.09579479 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -17 0.188888893 0.0700644255 0.4375 0 0 0.181818187 ? 11th Never-married ? Own-child White Male United-States 0 -45 0.5 0.09985418 0.875 0 0 0.353535354 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -54 0.6 0.114879392 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.14985469 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 -63 0.7 0.0388454273 0.875 0 0 0.4848485 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -22 0.244444445 0.157353818 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.0287828222 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -33 0.366666675 0.157005608 0.3125 0 0 0.333333343 Private 9th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -64 0.7111111 0.09638952 0.8125 0 0 0.3030303 Private Bachelors Widowed Prof-specialty Not-in-family White Female United-States 0 -50 0.5555556 0.131907687 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.07805996 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Widowed Prof-specialty Unmarried White Female United-States 0 -31 0.344444454 0.204654127 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -44 0.4888889 0.116167858 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female Vietnam 0 -53 0.5888889 0.0202114228 0.375 0 0 0.353535354 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -33 0.366666675 0.0996298939 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Other-service Unmarried White Female United-States 0 -34 0.377777785 0.116330184 0.5 0 0 0.4040404 Federal-gov 12th Married-civ-spouse Armed-Forces Husband White Male United-States 0 -27 0.3 0.104436234 0.5625 0 0 0.7070707 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -43 0.477777779 0.102760486 0.6875 0 0.5369605 0.363636374 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 -80 0.8888889 0.08939689 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -31 0.344444454 0.13143082 0.75 0 0 0.323232323 Private Assoc-acdm Divorced Other-service Not-in-family White Female United-States 0 -40 0.444444448 0.2541394 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 -53 0.5888889 0.1979794 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -58 0.644444466 0.122666121 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.02190873 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.0944335759 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.2547449 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male Mexico 1 -23 0.25555557 0.142520577 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife Black Female United-States 0 -31 0.344444454 0.08042742 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 -52 0.5777778 0.161657035 0.875 0 0 0.7070707 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.0643575639 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Own-child White Male United-States 0 -45 0.5 0.123735018 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -36 0.4 0.127555311 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -52 0.5777778 0.256369442 0.1875 0 0 0.4040404 Private 5th-6th Widowed Other-service Unmarried White Female Mexico 0 -54 0.6 0.0359714553 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.101353467 0.9375 0 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.1183225 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.252786249 0.5625 0 0 0.5050505 Private HS-grad Never-married Tech-support Not-in-family Asian-Pac-Islander Male United-States 0 -21 0.233333334 0.187505946 0.625 0 0 0.161616161 ? Some-college Never-married ? Own-child White Male United-States 0 -23 0.25555557 0.1433874 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.328068554 0.25 0 0 0.4040404 Self-emp-inc 7th-8th Never-married Craft-repair Unmarried Black Male United-States 0 -22 0.244444445 0.1175055 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -55 0.6111111 0.0897154659 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -71 0.788888931 0.05203256 0.5625 0 0 0.171717167 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -47 0.5222222 0.0953125358 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.122319251 0.375 0 0 0.121212125 Self-emp-inc 10th Never-married Sales Own-child White Male United-States 0 -31 0.344444454 0.0859497339 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -32 0.355555564 0.1041089 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Other-relative Asian-Pac-Islander Male ? 0 -46 0.51111114 0.0227937549 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -27 0.3 0.101084054 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -39 0.433333337 0.0208229925 0.625 0 0.43663913 0.5050505 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.101901725 0.5625 0 0 0.4848485 Private HS-grad Divorced Handlers-cleaners Not-in-family White Female United-States 0 -30 0.333333343 0.0328880139 0.5625 0 0.3677686 0.3030303 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -17 0.188888893 0.1305101 0.3125 0 0 0.2020202 Private 9th Never-married Other-service Unmarried White Male United-States 0 -33 0.366666675 0.1868755 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -72 0.8 0.152070612 1 0 0 0.3030303 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 -34 0.377777785 0.2938907 0.625 0 0 0.4040404 Federal-gov Some-college Married-AF-spouse Adm-clerical Wife White Female United-States 1 -65 0.722222269 0.172011271 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative Asian-Pac-Islander Male Cambodia 0 -36 0.4 0.117826775 0.8125 0 0.4331956 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.117726423 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 -26 0.2888889 0.165438935 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative White Male Mexico 0 -22 0.244444445 0.154072359 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -47 0.5222222 0.238530889 0.9375 1 0 0.4848485 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.1299248 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.128234908 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 -38 0.422222227 0.237934813 0.875 0 0 0.5050505 Private Masters Never-married Adm-clerical Not-in-family White Female Italy 1 -34 0.377777785 0.07624276 0.75 0 0 0.282828271 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 -44 0.4888889 0.139810935 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.06277745 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Asian-Pac-Islander Male United-States 0 -50 0.5555556 0.110458307 0.8125 0 0 0.444444448 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -47 0.5222222 0.07540959 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 -20 0.222222224 0.147586226 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -24 0.266666681 0.07506205 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -29 0.322222233 0.208646163 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -37 0.411111116 0.150211662 0.6875 0 0 0.323232323 Local-gov Assoc-voc Never-married Other-service Unmarried Black Female United-States 0 -42 0.466666669 0.204185352 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Male United-States 0 -20 0.222222224 0.0276384875 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 -68 0.75555557 0.107220627 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.164617211 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female Vietnam 0 -72 0.8 0.319085628 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -45 0.5 0.0483752675 0.625 0 0 0.2020202 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -30 0.333333343 0.0559478141 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -33 0.366666675 0.1011339 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.128500953 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -56 0.622222245 0.119911365 0.625 0.04416044 0 0.6060606 Private Some-college Widowed Exec-managerial Not-in-family White Male United-States 0 -25 0.2777778 0.10770423 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -41 0.455555558 0.128567636 0.5625 0 0 0.4040404 Private HS-grad Divorced Priv-house-serv Not-in-family White Female Guatemala 0 -25 0.2777778 0.164198279 0.8125 0 0 0.373737365 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -31 0.344444454 0.0835317448 0.75 0 0 0.4040404 State-gov Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -36 0.4 0.107102759 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.123795636 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.130284473 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.165035486 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 -55 0.6111111 0.06650884 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Tech-support Husband White Male Canada 1 -46 0.51111114 0.09474205 0.625 0 0 0.4848485 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.232315511 0.8125 0 0.371212125 0.2020202 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.114487395 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Other-service Husband Black Male United-States 0 -28 0.311111122 0.104665242 0.8125 0 0 0.5555556 State-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -42 0.466666669 0.165229455 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -41 0.455555558 0.0499641337 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -39 0.433333337 0.188973576 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -64 0.7111111 0.02065326 0.6875 0 0 0.3030303 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -20 0.222222224 0.07405646 0.625 0 0 0.25252524 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -45 0.5 0.129852727 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -31 0.344444454 0.163966581 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -36 0.4 0.07159469 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.220959723 0.3125 0 0 0.4040404 Private 9th Separated Other-service Unmarried Other Female Mexico 0 -33 0.366666675 0.0328024775 0.6875 0 0 0.656565666 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -51 0.566666663 0.07495294 0.5625 1 0 0.353535354 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family White Female United-States 1 -36 0.4 0.32600686 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 -40 0.444444448 0.140411735 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.115869485 0.6875 0.07298073 0 0.5151515 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 1 -40 0.444444448 0.0201568659 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried White Female England 0 -46 0.51111114 0.06601446 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.0730569363 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.139624372 0.5625 0 0.454545438 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -26 0.2888889 0.113425225 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -25 0.2777778 0.04508303 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Other-relative White Male United-States 0 -35 0.3888889 0.0283180848 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.124473214 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Other-relative White Male United-States 0 -39 0.433333337 0.980285645 0.75 0 0 0.4040404 Private Assoc-acdm Separated Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.299980134 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Other-service Unmarried White Male United-States 0 -37 0.411111116 0.187630549 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -79 0.8777778 0.0572362877 0.6875 0 0 0.2020202 Self-emp-not-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.4441987 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -44 0.4888889 0.0922647938 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.187314659 0.5625 0 0.3611111 0.3030303 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.06480681 0.8125 0 0 0.454545468 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -46 0.51111114 0.08829431 0.8125 0 0.43663913 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -58 0.644444466 0.138350725 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.28069213 0.75 0 0 0.4848485 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Male United-States 0 -36 0.4 0.121685453 0.5625 0 0.4331956 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.0485746339 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -41 0.455555558 0.07337821 0.5625 0.143441439 0 0.4040404 State-gov HS-grad Never-married Transport-moving Not-in-family White Female United-States 1 -49 0.544444442 0.131978408 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.06825935 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 -29 0.322222233 0.295858771 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Protective-serv Husband White Male Peru 0 -63 0.7 0.143526837 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.04036627 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -65 0.722222269 0.116396859 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -26 0.2888889 0.0275576636 0.8125 0 0 0.25252524 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -42 0.466666669 0.0936293751 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 -44 0.4888889 0.0820237 0.625 0 0 0.373737365 Private Some-college Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 -51 0.566666663 0.08800873 0.5625 0 0 0.0606060624 ? HS-grad Separated ? Not-in-family Black Male United-States 0 -41 0.455555558 0.09908366 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -22 0.244444445 0.160173908 0.75 0 0 0.353535354 Local-gov Assoc-acdm Never-married Adm-clerical Own-child Black Female Haiti 0 -36 0.4 0.08664348 0.625 0 0 0.25252524 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -18 0.2 0.07508293 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -33 0.366666675 0.195133716 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -46 0.51111114 0.09560418 0.8125 0 0 0.3838384 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.21807228 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Priv-house-serv Other-relative White Female United-States 0 -41 0.455555558 0.118988626 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -52 0.5777778 0.10455478 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -40 0.444444448 0.0965356752 0.625 0 0 0.4040404 Private Some-college Separated Handlers-cleaners Not-in-family White Male United-States 0 -53 0.5888889 0.119358391 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Prof-specialty Unmarried White Female United-States 0 -45 0.5 0.08290401 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.03171337 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -56 0.622222245 0.06877191 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -24 0.266666681 0.158882737 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -71 0.788888931 0.115878917 0.25 0 0 0.5050505 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -20 0.222222224 0.132825717 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Female United-States 0 -26 0.2888889 0.102681682 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -34 0.377777785 0.116472974 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.144739866 0.3125 0 0 0.4040404 ? 9th Divorced ? Unmarried White Female Mexico 0 -49 0.544444442 0.07835765 0.5625 0 0.14990817 0.6060606 Private HS-grad Separated Prof-specialty Unmarried White Female United-States 0 -48 0.533333361 0.186342746 1 0 0.43663913 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.04036088 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -30 0.333333343 0.130760655 0.625 0 0.371212125 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -51 0.566666663 0.06407199 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -46 0.51111114 0.19701153 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Sales Unmarried White Female United-States 0 -32 0.355555564 0.0308451857 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -42 0.466666669 0.0803924054 0.9375 0.1502415 0 0.4040404 Private Prof-school Married-civ-spouse Sales Wife Amer-Indian-Eskimo Female South 1 -52 0.5777778 0.0702361763 0.625 0 0 0.5050505 State-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -57 0.6333333 0.116043933 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Other-relative Black Female United-States 0 -35 0.3888889 0.121901661 0.625 0 0 0.3939394 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -52 0.5777778 0.0745926 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -59 0.655555546 0.374948561 0.3125 0 0 0.121212125 ? 9th Divorced ? Not-in-family White Female United-States 0 -36 0.4 0.0151504846 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -33 0.366666675 0.180412278 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Cuba 1 -67 0.7444445 0.1729778 0.5625 0 0 0.2020202 Local-gov HS-grad Divorced Protective-serv Not-in-family Black Male United-States 0 -31 0.344444454 0.07903658 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -31 0.344444454 0.04201104 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -28 0.311111122 0.211933687 0.625 0 0 0.424242437 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -72 0.8 0.07729549 0.25 0 0 0.2020202 ? 7th-8th Widowed ? Unmarried White Female United-States 0 -36 0.4 0.06279025 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -58 0.644444466 0.111345351 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -56 0.622222245 0.08403757 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.0184602328 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -37 0.411111116 0.133926272 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.183061287 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Exec-managerial Unmarried White Female United-States 0 -26 0.2888889 0.04330086 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -51 0.566666663 0.123519488 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.162167579 0.625 0.04386044 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.158226043 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female El-Salvador 0 -20 0.222222224 0.05942662 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.104008541 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -37 0.411111116 0.08021661 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.10209436 0.6875 0.04386044 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -54 0.6 0.08001118 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -32 0.355555564 0.020542128 0.8125 0 0 0.323232323 ? Bachelors Divorced ? Unmarried White Female United-States 0 -34 0.377777785 0.1121738 0.625 0.07688077 0 0.0606060624 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 -30 0.333333343 0.183006048 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.207784042 0.5625 0 0 0.4040404 State-gov HS-grad Married-spouse-absent Exec-managerial Unmarried White Female United-States 0 -48 0.533333361 0.116316035 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Own-child White Female United-States 0 -42 0.466666669 0.02018044 0.8125 0 0 0.4848485 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -62 0.6888889 0.1349305 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.196471363 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.0452844165 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -45 0.5 0.113179386 0.8125 0 0 0.323232323 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.0928224847 0.625 0 0 0.454545468 Private Some-college Separated Sales Not-in-family White Male United-States 0 -64 0.7111111 0.08502228 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -42 0.466666669 0.05323347 0.8125 0 0 0.656565666 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -60 0.6666667 0.220565036 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.0977702662 0.5625 0 0 0.5858586 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -67 0.7444445 0.0249827411 0.25 0 0 0.04040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -45 0.5 0.08714661 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Tech-support Unmarried White Female ? 0 -53 0.5888889 0.0224313922 0.9375 0 0 0.3838384 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.241799548 0.6875 0.1502415 0 0.5050505 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 -32 0.355555564 0.09642454 0.375 0 0 0.4040404 ? 10th Married-civ-spouse ? Wife White Female United-States 0 -23 0.25555557 0.08992696 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -28 0.311111122 0.11376065 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 0 -55 0.6111111 0.505805552 0.25 0 0 0.414141417 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.09626424 0.875 0 0 0.24242425 Private Masters Never-married Adm-clerical Not-in-family White Female United-States 1 -74 0.822222233 0.153616384 0.625 0.200512 0 0.25252524 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.0614189357 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -37 0.411111116 0.195735186 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -22 0.244444445 0.02094827 0.625 0 0 0.04040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Female South 0 -44 0.4888889 0.14610377 0.375 0 0 0.7070707 Self-emp-not-inc 10th Married-civ-spouse Other-service Husband White Male United-States 0 -23 0.25555557 0.08085512 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Own-child White Male United-States 0 -41 0.455555558 0.218648821 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Yugoslavia 0 -45 0.5 0.0546452 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male United-States 1 -29 0.322222233 0.107953437 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 -33 0.366666675 0.154732421 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -61 0.677777767 0.09747593 0.875 0.07298073 0 0.6060606 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.0999733955 0.75 0.07688077 0 0.454545468 Private Assoc-acdm Married-civ-spouse Sales Wife Other Female United-States 1 -22 0.244444445 0.108033583 0.625 0 0 0.3838384 Private Some-college Never-married Sales Other-relative White Male United-States 0 -28 0.311111122 0.08719578 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Not-in-family White Male El-Salvador 0 -30 0.333333343 0.170237184 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -20 0.222222224 0.0392145254 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -28 0.311111122 0.286174029 0.375 0 0 0.3030303 ? 10th Separated ? Not-in-family White Male United-States 0 -45 0.5 0.07709208 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.031252 0.625 0 0 0.24242425 ? Some-college Never-married ? Not-in-family White Female United-States 0 -42 0.466666669 0.150827274 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Unmarried White Female United-States 0 -34 0.377777785 0.0566570461 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -31 0.344444454 0.107174829 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.13169755 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -50 0.5555556 0.128846467 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.133572668 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -57 0.6333333 0.109315321 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.09641781 0.625 0.03908039 0 0.272727281 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -24 0.266666681 0.0623753555 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -27 0.3 0.166914642 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.15438959 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Female United-States 1 -45 0.5 0.09612617 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -80 0.8888889 0.057998728 1 0 0 0.3030303 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -23 0.25555557 0.0240000542 0.625 0 0 0.5050505 State-gov Some-college Never-married Other-service Not-in-family White Male United-States 0 -46 0.51111114 0.110964134 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.4094066 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.116945796 0.5625 0 0 0.6060606 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -90 1 0.209593162 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Sales Husband White Male ? 0 -55 0.6111111 0.0334995836 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -72 0.8 0.12367171 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female England 0 -65 0.722222269 0.08717287 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.306400955 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 -39 0.433333337 0.0374269634 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -38 0.422222227 0.0201211683 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.265180618 0.625 0.1502415 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.09695731 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.0608625971 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.0361869857 0.875 0 0 0.5050505 Private Masters Never-married Sales Not-in-family White Male United-States 1 -30 0.333333343 0.0875736251 0.25 0.0282902829 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.116945796 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -28 0.311111122 0.276385546 0.625 0 0 0.3030303 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -34 0.377777785 0.269000232 0.6875 0 0 0.535353541 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.106372647 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -20 0.222222224 0.08962117 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -19 0.211111113 0.031252 0.625 0 0 0.323232323 ? Some-college Never-married ? Not-in-family White Female United-States 0 -21 0.233333334 0.072671 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -39 0.433333337 0.04244682 0.625 0 0 0.2020202 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -43 0.477777779 0.1253744 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -33 0.366666675 0.01883135 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Unmarried Amer-Indian-Eskimo Male United-States 0 -26 0.2888889 0.120945916 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.06822837 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.07619628 0.625 0 0 0.656565666 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 -32 0.355555564 0.213153452 0.1875 0 0 0.6060606 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -60 0.6666667 0.060539972 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -41 0.455555558 0.0216346011 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -21 0.233333334 0.212367445 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child Black Male United-States 0 -27 0.3 0.171414524 0.625 0 0 0.363636374 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -33 0.366666675 0.282813758 0.1875 0 0 0.4040404 Private 5th-6th Divorced Handlers-cleaners Unmarried White Male Mexico 0 -43 0.477777779 0.107461751 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.108294919 0.4375 0 0.43663913 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.17409116 0.375 0 0 0.4040404 Self-emp-not-inc 10th Never-married Farming-fishing Own-child White Male United-States 0 -48 0.533333361 0.2492879 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.0342404731 0.25 0 0 0.5050505 Private 7th-8th Divorced Exec-managerial Not-in-family White Male United-States 0 -58 0.644444466 0.09261503 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -57 0.6333333 0.3692693 0.5 0.07688077 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband Black Male United-States 1 -42 0.466666669 0.118300945 0.8125 1 0 0.4040404 Local-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 1 -24 0.266666681 0.123656891 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 -26 0.2888889 0.229913011 0.8125 0 0 0.151515156 Private Bachelors Never-married Other-service Other-relative White Male United-States 0 -43 0.477777779 0.167023748 0.5625 0.0545505434 0 0.5050505 Self-emp-inc HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -34 0.377777785 0.1303727 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.0266760066 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 -51 0.566666663 0.08563924 0.4375 0 0 0.454545468 Self-emp-not-inc 11th Married-civ-spouse Farming-fishing Husband White Male United-States 1 -31 0.344444454 0.157183424 0.5625 0 0 0.454545468 ? HS-grad Married-civ-spouse ? Wife Black Female United-States 0 -49 0.544444442 0.123089775 1 0 0 0.353535354 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 -26 0.2888889 0.181221187 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -28 0.311111122 0.121201858 0.5625 0 0 0.2020202 Private HS-grad Divorced Transport-moving Unmarried Black Female United-States 0 -22 0.244444445 0.02219296 0.625 0 0.43663913 0.373737365 Federal-gov Some-college Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.10806524 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -45 0.5 0.150871053 0.3125 0 0.4242424 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 1 -39 0.433333337 0.0548843034 0.625 0 0.143480256 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -23 0.25555557 0.211852863 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -62 0.6888889 0.227466747 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -42 0.466666669 0.06788756 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.172025427 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.0624871626 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.0224340875 0.625 0 0 0.7070707 Self-emp-not-inc Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 -68 0.75555557 0.332297 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.107488692 0.875 0 0 0.464646459 ? Masters Married-civ-spouse ? Husband White Male United-States 1 -32 0.355555564 0.07221502 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male United-States 0 -25 0.2777778 0.0832394361 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Other Male United-States 0 -53 0.5888889 0.106655531 0.1875 0 0 0.24242425 Private 5th-6th Married-civ-spouse Other-service Other-relative White Female Italy 0 -38 0.422222227 0.051402133 0.6875 0 0 0.5555556 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.119049244 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -20 0.222222224 0.08240425 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -26 0.2888889 0.311977118 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.109266154 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -43 0.477777779 0.0774598345 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Tech-support Not-in-family White Female United-States 0 -29 0.322222233 0.123448767 0.625 0 0 0.363636374 State-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 0 -34 0.377777785 0.11423482 0.375 0 0 0.363636374 Private 10th Separated Other-service Unmarried White Female United-States 0 -24 0.266666681 0.303558618 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 -44 0.4888889 0.08398436 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.04305098 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -47 0.5222222 0.06908376 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -40 0.444444448 0.1948596 0.625 0 0 0.4848485 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -45 0.5 0.06858265 0.5625 0 0 0.454545468 Private HS-grad Widowed Sales Unmarried White Female United-States 0 -43 0.477777779 0.139309153 0.5625 0 0 0.454545468 Private HS-grad Separated Handlers-cleaners Unmarried Black Female United-States 0 -22 0.244444445 0.05245015 0.3125 0 0 0.3030303 ? 9th Never-married ? Not-in-family White Male United-States 0 -50 0.5555556 0.0978867859 1 0.105201051 0 0.5050505 Private Doctorate Divorced Prof-specialty Other-relative White Male United-States 1 -72 0.8 0.131034791 0.625 0 0 0.0303030312 ? Some-college Married-spouse-absent ? Not-in-family White Male United-States 0 -29 0.322222233 0.138984516 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -47 0.5222222 0.133494541 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -24 0.266666681 0.0942955 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Male El-Salvador 0 -22 0.244444445 0.193969846 0.625 0 0 0.151515156 ? Some-college Never-married ? Not-in-family White Male United-States 0 -21 0.233333334 0.0967222452 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -30 0.333333343 0.09844448 0.5625 0 0.4331956 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.132369056 0.625 0.0235402342 0 0.4040404 Private Some-college Widowed Other-service Not-in-family White Female ? 0 -74 0.822222233 0.129596785 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Divorced Prof-specialty Other-relative White Male United-States 0 -70 0.7777778 0.0942200646 0.625 0.0265302639 0 0.7070707 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.07066522 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.108761005 0.8125 0 0 0.464646459 Local-gov Bachelors Divorced Adm-clerical Unmarried Asian-Pac-Islander Female United-States 0 -30 0.333333343 0.0240074638 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -29 0.322222233 0.07863583 0.6875 0 0 0.565656543 Local-gov Assoc-voc Divorced Protective-serv Unmarried White Male United-States 0 -18 0.2 0.160885155 0.4375 0 0.3677686 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -31 0.344444454 0.178962156 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.121012591 0.625 0 0 0.7070707 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -21 0.233333334 0.0390319973 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 -31 0.344444454 0.119020954 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.248315334 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -39 0.433333337 0.145583808 0.9375 0 0 0.7070707 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 -29 0.322222233 0.117094643 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.0610929467 0.625 0 0.3409091 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -52 0.5777778 0.145713791 0.8125 0 0 0.5555556 State-gov Bachelors Widowed Exec-managerial Unmarried White Female United-States 0 -35 0.3888889 0.09480133 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -33 0.366666675 0.07847215 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.151114866 0.3125 0 0 0.05050505 ? 9th Divorced ? Unmarried White Female Cuba 0 -43 0.477777779 0.121440291 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 -66 0.733333349 0.132508487 0.125 0 0 0.3030303 ? 1st-4th Never-married ? Not-in-family Black Male United-States 0 -51 0.566666663 0.0743090361 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.125012711 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -17 0.188888893 0.164918959 0.4375 0 0 0.4040404 Local-gov 11th Never-married Prof-specialty Own-child White Female United-States 0 -32 0.355555564 0.133405626 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.06542444 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -19 0.211111113 0.110902838 0.625 0 0 0.6060606 Self-emp-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 -54 0.6 0.15874736 0.4375 0 0 0.4040404 Private 11th Divorced Adm-clerical Not-in-family White Male United-States 1 -45 0.5 0.132711887 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 -47 0.5222222 0.06561506 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family Black Female United-States 0 -49 0.544444442 0.140682489 0.5625 0 0.3838384 0.989899 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -32 0.355555564 0.1384302 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.09836432 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.14995639 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -27 0.3 0.2538794 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Sales Not-in-family White Male United-States 0 -42 0.466666669 0.09299962 0.875 0 0 0.3838384 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -24 0.266666681 0.105012782 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -45 0.5 0.0242512822 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.14459303 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -46 0.51111114 0.248896584 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 -50 0.5555556 0.112187274 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.173127323 0.5625 0 0 0.424242437 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.121997304 0.9375 1 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -69 0.7666667 0.171639487 0.8125 0.106051058 0 0.1010101 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -43 0.477777779 0.026184326 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -29 0.322222233 0.126000121 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -43 0.477777779 0.105742224 0.9375 0 0.5544077 0.5555556 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 1 -90 1 0.211320773 0.8125 0 0 0.1010101 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -41 0.455555558 0.22337839 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Exec-managerial Wife White Female Japan 1 -24 0.266666681 0.163916737 0.0625 0 0 0.363636374 Private Preschool Never-married Farming-fishing Not-in-family White Male Mexico 0 -24 0.266666681 0.0221734289 0.625 0 0 0.5050505 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -24 0.266666681 0.07891601 0.625 0 0 0.535353541 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -35 0.3888889 0.270713717 0.5625 0 0.4331956 0.424242437 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -30 0.333333343 0.07724834 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Other-relative White Male United-States 0 -46 0.51111114 0.06693923 0.8125 0 0 0.4040404 Private Bachelors Separated Exec-managerial Unmarried White Female United-States 0 -19 0.211111113 0.1416497 0.625 0 0.395087242 0.3030303 Local-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -39 0.433333337 0.169950932 0.3125 0 0 0.353535354 Private 9th Separated Craft-repair Own-child White Male Mexico 0 -43 0.477777779 0.0610101 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.128102213 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -65 0.722222269 0.177939728 0.5625 0 0 0.24242425 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -34 0.377777785 0.164191544 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -41 0.455555558 0.04517059 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.1375418 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 -24 0.266666681 0.152668715 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family Amer-Indian-Eskimo Male United-States 0 -34 0.377777785 0.117339812 0.875 0.04787048 0 0.454545468 Self-emp-inc Masters Never-married Exec-managerial Not-in-family White Female France 1 -33 0.366666675 0.21225968 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male Cuba 1 -37 0.411111116 0.0799357444 0.5625 0 0 0.3838384 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male Puerto-Rico 0 -39 0.433333337 0.140168592 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -58 0.644444466 0.07873686 0.5625 0 0 0.25252524 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -36 0.4 0.273215234 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 -33 0.366666675 0.197716042 0.625 0.0406404063 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Wife White Female United-States 0 -42 0.466666669 0.22131063 0.875 0 0 0.5555556 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -31 0.344444454 0.146804929 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Other-relative Black Male ? 0 -57 0.6333333 0.106975459 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried White Male United-States 0 -67 0.7444445 0.04409967 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -23 0.25555557 0.107569516 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -35 0.3888889 0.09461408 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 -43 0.477777779 0.0975129753 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Italy 1 -39 0.433333337 0.0560663566 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -36 0.4 0.0965747461 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -29 0.322222233 0.112846665 0.75 0 0 0.13131313 Local-gov Assoc-acdm Divorced Other-service Unmarried White Female United-States 0 -25 0.2777778 0.08228908 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -54 0.6 0.255099177 0.375 0 0 0.454545468 Private 10th Separated Transport-moving Unmarried Black Male United-States 1 -24 0.266666681 0.155232862 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.08135017 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male South 1 -70 0.7777778 0.138904363 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -61 0.677777767 0.20098269 0.8125 0.04787048 0 0.4848485 Private Bachelors Divorced Sales Not-in-family Black Male United-States 1 -51 0.566666663 0.11023806 0.8125 0 0.43663913 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.0946875 0.875 0 0 0.7070707 Self-emp-not-inc Masters Married-civ-spouse Farming-fishing Husband White Male United-States 0 -51 0.566666663 0.09244463 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried White Female United-States 1 -28 0.311111122 0.1663455 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -66 0.733333349 0.122899838 0.9375 0 0 0.25252524 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -57 0.6333333 0.07248376 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Separated Farming-fishing Not-in-family White Male United-States 1 -44 0.4888889 0.07837112 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male ? 1 -29 0.322222233 0.168935239 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.132354915 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child Black Female United-States 0 -42 0.466666669 0.247546151 0.375 0 0 0.434343427 Private 10th Married-civ-spouse Craft-repair Own-child Other Male United-States 1 -74 0.822222233 0.127102017 0.9375 1 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.1826356 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -65 0.722222269 0.116975427 0.5625 0 0 0.141414136 Private HS-grad Divorced Other-service Other-relative White Female United-States 0 -64 0.7111111 0.173630461 0.5625 0 0 0.3838384 ? HS-grad Divorced ? Unmarried White Female United-States 0 -44 0.4888889 0.217141449 0.4375 0 0 0.3030303 Private 11th Separated Other-service Unmarried Black Female United-States 0 -34 0.377777785 0.141234115 0.6875 0.04386044 0 0.5050505 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.07020385 0.375 0 0 0.1010101 Private 10th Never-married Other-service Own-child White Male United-States 0 -17 0.188888893 0.0584533624 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Female United-States 0 -43 0.477777779 0.05942797 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.162246376 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -54 0.6 0.1143116 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -20 0.222222224 0.0870476 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.108417496 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -34 0.377777785 0.159534052 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -30 0.333333343 0.0736051947 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 -32 0.355555564 0.144841567 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -40 0.444444448 0.0780842 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Ireland 1 -28 0.311111122 0.03728687 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 -44 0.4888889 0.151314914 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.253452361 0.6875 0 0 0.353535354 Local-gov Assoc-voc Married-civ-spouse Tech-support Wife White Female Nicaragua 1 -28 0.311111122 0.12365891 1 0.005940059 0 0.5050505 Private Doctorate Never-married Prof-specialty Not-in-family White Male Germany 0 -37 0.411111116 0.07765112 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -56 0.622222245 0.174366623 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.0465627871 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -34 0.377777785 0.139624372 0.5625 0 0 0.2020202 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -37 0.411111116 0.121014617 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -66 0.733333349 0.09460196 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -19 0.211111113 0.220513165 0.5625 0 0 0.3030303 Private HS-grad Never-married Prof-specialty Own-child White Male United-States 0 -60 0.6666667 0.13486518 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -54 0.6 0.07303471 0.625 0.0282902829 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -47 0.5222222 0.131997943 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.221689835 0.625 0 0 0.4848485 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 1 -48 0.533333361 0.168837577 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.119146228 0.5625 0 0 0.6060606 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -50 0.5555556 0.0893888 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male Germany 1 -62 0.6888889 0.11733038 0.3125 0 0 0.25252524 Private 9th Widowed Other-service Unmarried Black Female United-States 0 -45 0.5 0.112895831 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -55 0.6111111 0.171716943 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -62 0.6888889 0.2152495 0.5625 0 0 0.323232323 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -25 0.2777778 0.167703345 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male Guatemala 0 -49 0.544444442 0.0972556844 0.4375 0 0 0.3838384 Private 11th Divorced Exec-managerial Not-in-family White Female United-States 0 -32 0.355555564 0.135022789 0.625 0.0388703868 0 0.4040404 State-gov Some-college Never-married Protective-serv Unmarried Black Female United-States 0 -25 0.2777778 0.0374727659 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Handlers-cleaners Not-in-family Amer-Indian-Eskimo Male United-States 0 -39 0.433333337 0.12502417 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.08448951 0.625 0 0 0.5050505 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.108400658 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 1 -30 0.333333343 0.164235324 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Other-relative Asian-Pac-Islander Female South 0 -21 0.233333334 0.02331507 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -33 0.366666675 0.158851087 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Wife White Female United-States 1 -33 0.366666675 0.117726423 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -33 0.366666675 0.188664421 0.4375 0 0 0.3838384 Private 11th Never-married Adm-clerical Unmarried Black Female United-States 0 -70 0.7777778 0.158991188 0.25 0 0 0.353535354 Private 7th-8th Widowed Other-service Not-in-family White Female United-States 0 -25 0.2777778 0.160210282 0.625 0 0 0.424242437 Private Some-college Never-married Other-service Own-child Black Male United-States 0 -17 0.188888893 0.1310779 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Own-child White Male United-States 0 -20 0.222222224 0.117094643 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -19 0.211111113 0.250880152 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Other-relative Black Male United-States 0 -71 0.788888931 0.284331918 0.625 0.200512 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.11733038 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.183617622 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -52 0.5777778 0.0502860844 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.1357044 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -38 0.422222227 0.118024796 0.5625 0 0 0.454545468 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -25 0.2777778 0.22660394 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -22 0.244444445 0.0314170159 0.8125 0 0 0.09090909 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -48 0.533333361 0.0209745374 0.625 0 0.43663913 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -53 0.5888889 0.189549446 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.021223072 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.208967447 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -32 0.355555564 0.05549453 0.8125 0 0 0.565656543 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 1 -59 0.655555546 0.128317744 0.4375 0 0 0.2020202 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.111478716 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Unmarried Black Female United-States 0 -65 0.722222269 0.120516196 0.5625 0.03818038 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Amer-Indian-Eskimo Male United-States 0 -31 0.344444454 0.152687579 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 -53 0.5888889 0.13188681 0.1875 0.05178052 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband Other Male Puerto-Rico 1 -44 0.4888889 0.111682124 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -36 0.4 0.08350682 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Japan 1 -36 0.4 0.158530489 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -37 0.411111116 0.09918334 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -63 0.7 0.149719313 0.8125 0.07688077 0 0.545454562 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -67 0.7444445 0.115554273 0.5625 0.200512 0 0.3030303 Self-emp-inc HS-grad Married-civ-spouse Prof-specialty Wife White Female England 1 -29 0.322222233 0.172390476 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Unmarried Black Male United-States 0 -52 0.5777778 0.12546061 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -37 0.411111116 0.190524042 0.5625 0 0.373737365 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.0752176344 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -36 0.4 0.1343708 0.625 0 0 0.3838384 Private Some-college Divorced Exec-managerial Unmarried Black Female United-States 0 -24 0.266666681 0.102002084 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Other-relative Black Female United-States 0 -31 0.344444454 0.0982922539 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child Black Male United-States 0 -54 0.6 0.155173585 0.5625 0 0 0.353535354 Federal-gov HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -44 0.4888889 0.08593761 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -18 0.2 0.14199993 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child Other Male United-States 0 -41 0.455555558 0.200165018 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Wife White Female United-States 0 -37 0.411111116 0.07850314 0.875 0 0 0.7070707 Self-emp-inc Masters Divorced Exec-managerial Not-in-family White Female United-States 0 -30 0.333333343 0.09738837 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male ? 0 -26 0.2888889 0.09949384 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male India 0 -68 0.75555557 0.05995198 1 0 0 0.5050505 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male Canada 0 -31 0.344444454 0.02570073 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -48 0.533333361 0.12035118 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -80 0.8888889 0.116404273 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -26 0.2888889 0.104904346 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -63 0.7 0.067420125 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.156049863 0.625 0 0 0.2020202 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -30 0.333333343 0.09915438 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 -42 0.466666669 0.0337588973 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -64 0.7111111 0.0584877133 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Other-service Husband Asian-Pac-Islander Male United-States 1 -32 0.355555564 0.07635456 0.8125 0 0 0.4040404 Private Bachelors Never-married Transport-moving Not-in-family White Male United-States 0 -50 0.5555556 0.194914147 0.5625 0 0 0.474747479 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -73 0.811111152 0.05245756 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male Philippines 0 -32 0.355555564 0.262784183 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 -53 0.5888889 0.0603399351 0.625 0.07298073 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -58 0.644444466 0.157827988 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 -37 0.411111116 0.2461297 0.625 0.05178052 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.276444823 0.625 0 0 0.151515156 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -53 0.5888889 0.087239556 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.112161681 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Other Female United-States 0 -42 0.466666669 0.07402952 0.75 0 0 0.4040404 ? Assoc-acdm Never-married ? Other-relative White Female United-States 0 -30 0.333333343 0.142052472 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Other-relative White Female United-States 0 -38 0.422222227 0.272972763 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.09312894 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -19 0.211111113 0.017127309 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child White Female United-States 0 -45 0.5 0.156039089 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -26 0.2888889 0.174142346 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -33 0.366666675 0.180606246 0.3125 0 0 0.4040404 Private 9th Never-married Sales Unmarried White Female United-States 0 -29 0.322222233 0.0366476849 0.5625 0 0 0.5050505 Private HS-grad Never-married Farming-fishing Not-in-family White Male ? 0 -54 0.6 0.0251154266 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 -23 0.25555557 0.106385447 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -43 0.477777779 0.151656389 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.160334215 0.3125 0 0 0.3030303 Private 9th Never-married Priv-house-serv Not-in-family White Female El-Salvador 0 -31 0.344444454 0.132856026 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Husband White Male Mexico 0 -56 0.622222245 0.145911813 0.5 0 0.379017442 0.4040404 Self-emp-inc 12th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.123644091 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -17 0.188888893 0.0133036533 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Own-child Black Female United-States 0 -37 0.411111116 0.06999707 0.5625 0 0 0.686868668 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -60 0.6666667 0.0212681983 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -59 0.655555546 0.0412863158 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-spouse-absent Exec-managerial Not-in-family White Female United-States 0 -59 0.655555546 0.128335938 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.246573567 0.9375 0.1502415 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.262582123 0.5625 0 0 0.161616161 ? HS-grad Married-civ-spouse ? Other-relative White Male United-States 0 -33 0.366666675 0.129752383 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 -24 0.266666681 0.145570338 0.5625 0 0.323232323 0.5050505 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -29 0.322222233 0.034986075 0.5625 0.04386044 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 -33 0.366666675 0.0454514548 0.6875 0 0 1 Self-emp-not-inc Assoc-voc Divorced Other-service Unmarried White Female United-States 0 -29 0.322222233 0.07326371 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male Dominican-Republic 0 -23 0.25555557 0.188079789 0.625 0 0 0.4040404 State-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 0 -20 0.222222224 0.187505946 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Male Nicaragua 0 -60 0.6666667 0.235668376 0.5625 0 0 0.444444448 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -44 0.4888889 0.147801086 0.375 0 0 0.353535354 Private 10th Never-married Sales Unmarried Other Female Dominican-Republic 0 -18 0.2 0.116693221 0.5625 0.010550105 0 0.25252524 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -52 0.5777778 0.0199521128 0.5 0 0 0.4040404 Federal-gov 12th Never-married Other-service Unmarried Black Female United-States 0 -31 0.344444454 0.1464668 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.11019294 0.8125 0 0 0.5555556 Private Bachelors Widowed Prof-specialty Unmarried White Female United-States 1 -33 0.366666675 0.109860212 0.5625 0.0378103778 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -20 0.222222224 0.160762578 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -27 0.3 0.16963236 0.8125 0 0 0.353535354 ? Bachelors Married-civ-spouse ? Wife Black Female ? 1 -33 0.366666675 0.143670291 0.6875 0 0 0.5050505 Private Assoc-voc Separated Adm-clerical Own-child Black Female United-States 0 -25 0.2777778 0.1305128 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -63 0.7 0.07679034 0.5625 0 0 0.2020202 Private HS-grad Separated Craft-repair Not-in-family White Female United-States 0 -63 0.7 0.03512078 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Widowed Exec-managerial Not-in-family White Male United-States 0 -43 0.477777779 0.234345555 0.5625 0 0 0.3030303 Private HS-grad Separated Sales Not-in-family White Female United-States 0 -58 0.644444466 0.197614342 0.4375 0 0 0.4040404 Private 11th Widowed Machine-op-inspct Not-in-family White Female United-States 0 -70 0.7777778 0.0799014 0.6875 0 0 0.353535354 ? Assoc-voc Widowed ? Unmarried White Female United-States 0 -35 0.3888889 0.0857449844 0.6875 0.143441439 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 1 -42 0.466666669 0.246634856 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.127264336 0.625 0 0 0.25252524 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 -35 0.3888889 0.127555311 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -62 0.6888889 0.0165116973 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.190688387 0.5625 0.01506015 0 0.5050505 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -43 0.477777779 0.122729436 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -19 0.211111113 0.372029454 0.5 0 0 0.4040404 Private 12th Never-married Machine-op-inspct Own-child White Male United-States 0 -46 0.51111114 0.109800264 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -47 0.5222222 0.04168168 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.123188108 0.8125 0.07298073 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.123318776 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family Black Female United-States 0 -48 0.533333361 0.0204006862 0.375 0 0 0.3030303 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.0522474162 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 -48 0.533333361 0.07969934 0.8125 0.05178052 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.3159254 0.5625 0 0 0.25252524 Private HS-grad Divorced Sales Unmarried Black Female United-States 0 -58 0.644444466 0.09804911 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.203435034 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 -59 0.655555546 0.0219248943 0.8125 0 0 0.04040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.12488205 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.0178776253 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -23 0.25555557 0.1103721 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Armed-Forces Other-relative White Male United-States 0 -21 0.233333334 0.161690712 0.625 0 0 0.25252524 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -48 0.533333361 0.140598983 0.1875 0 0 0.4040404 Private 5th-6th Divorced Machine-op-inspct Unmarried Other Female Dominican-Republic 0 -32 0.355555564 0.0566570461 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.0566644557 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -66 0.733333349 0.175834253 0.875 0 0 0.4040404 Local-gov Masters Widowed Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.226314321 0.8125 0 0 0.323232323 Local-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -52 0.5777778 0.262186766 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -17 0.188888893 0.0931451 0.4375 0 0 0.151515156 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -35 0.3888889 0.161910281 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.1281716 1 1 0 0.5555556 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.114548013 0.625 0 0 0.1010101 ? Some-college Never-married ? Not-in-family White Female United-States 0 -24 0.266666681 0.100664444 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -45 0.5 0.05491596 0.5625 0 0 0.8484849 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Japan 1 -25 0.2777778 0.254812926 0.5625 0 0.459366381 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -29 0.322222233 0.132627025 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 -56 0.622222245 0.07822631 0.8125 0.05178052 0 0.444444448 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -34 0.377777785 0.0545111671 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -64 0.7111111 0.128416091 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 -27 0.3 0.0809285343 0.5625 0 0 0.3939394 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -47 0.5222222 0.112587348 0.5625 0.046500463 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -36 0.4 0.0392960235 0.8125 0.03103031 0 0.424242437 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -44 0.4888889 0.1086007 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -31 0.344444454 0.08513611 0.5625 0 0 0.6060606 Private HS-grad Never-married Farming-fishing Not-in-family Black Female United-States 0 -23 0.25555557 0.100160643 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 -45 0.5 0.21437256 0.625 0.07688077 0 0.5050505 Local-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.0539218225 0.5625 0 0 0.646464646 Local-gov HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -45 0.5 0.185012519 0.375 0 0 0.6060606 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.1059921 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried Black Female ? 0 -33 0.366666675 0.1464668 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.0227162968 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 -30 0.333333343 0.11245399 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -25 0.2777778 0.09841484 0.625 0 0 0.424242437 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -33 0.366666675 0.107911 0.875 0 0 0.323232323 Private Masters Never-married Exec-managerial Not-in-family White Female ? 0 -70 0.7777778 0.08382069 0.875 0 0.515610635 0.08080808 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.03378651 0.3125 0 0 0.4040404 Private 9th Never-married Transport-moving Own-child White Male United-States 0 -30 0.333333343 0.158463135 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -46 0.51111114 0.08158119 0.75 0.1502415 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.0971358 0.5 0 0 0.6060606 Self-emp-not-inc 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.0635372 0.25 0 0 0.25252524 Private 7th-8th Never-married Machine-op-inspct Own-child White Female United-States 0 -59 0.655555546 0.114488736 0.625 0.1502415 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.0237724 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Never-married Farming-fishing Unmarried White Male United-States 0 -47 0.5222222 0.0902327448 0.8125 0.0288502872 0 0.656565666 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 0 -36 0.4 0.0238626525 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -73 0.811111152 0.138465226 0.1875 0 0 0.0606060624 Local-gov 5th-6th Married-civ-spouse Prof-specialty Husband White Male United-States 0 -32 0.355555564 0.119750388 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -34 0.377777785 0.112799518 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -51 0.566666663 0.023715822 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -20 0.222222224 0.07896788 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Unmarried White Female United-States 0 -57 0.6333333 0.131238192 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband Other Male Mexico 0 -19 0.211111113 0.09760255 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -45 0.5 0.132847935 0.5 0.07688077 0 0.4040404 Private 12th Married-civ-spouse Sales Husband White Male United-States 1 -55 0.6111111 0.0682546347 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -60 0.6666667 0.100034691 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 -19 0.211111113 0.06550864 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -35 0.3888889 0.112214886 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -20 0.222222224 0.154518247 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -34 0.377777785 0.140912175 0.8125 0 0 0.151515156 Local-gov Bachelors Never-married Prof-specialty Other-relative Black Male United-States 0 -26 0.2888889 0.19665052 0.9375 0 0.453856736 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -73 0.811111152 0.0861167759 0.625 0.0327303261 0 0.4040404 Federal-gov Some-college Widowed Tech-support Not-in-family White Female United-States 0 -27 0.3 0.203680873 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.0195688717 0.6875 0 0 0.8484849 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Own-child White Male United-States 0 -73 0.811111152 0.22631231 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.23521845 0.6875 0 0.4242424 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -36 0.4 0.0683509558 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -54 0.6 0.0314567536 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -49 0.544444442 0.157363921 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 -68 0.75555557 0.0213678814 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -34 0.377777785 0.0369433649 0.8125 0 0.365013778 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -30 0.333333343 0.197690457 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family Black Male United-States 0 -28 0.311111122 0.2530166 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Unmarried White Male United-States 0 -28 0.311111122 0.0712714 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.1370023 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -26 0.2888889 0.109315991 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male Philippines 0 -40 0.444444448 0.11009258 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -32 0.355555564 0.06744438 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -60 0.6666667 0.0279631317 0.4375 0 0 0.2020202 ? 11th Married-spouse-absent ? Unmarried Black Female United-States 0 -18 0.2 0.0688231 0.5 0 0 0.3030303 Private 12th Never-married Priv-house-serv Not-in-family White Female United-States 0 -36 0.4 0.2793033 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 0 -26 0.2888889 0.130902767 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -24 0.266666681 0.130730346 0.5625 0 0 0.454545468 Private HS-grad Never-married Prof-specialty Own-child White Female United-States 0 -90 1 0.103456244 0.5625 0.06767067 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -20 0.222222224 0.145143315 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female Mexico 0 -27 0.3 0.110868491 0.8125 0 0 0.5050505 Private Bachelors Separated Tech-support Own-child White Male United-States 0 -58 0.644444466 0.0234915353 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.08524859 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -65 0.722222269 0.2126537 0.5625 0.0232902318 0 0.75757575 ? HS-grad Widowed ? Unmarried White Female United-States 0 -28 0.311111122 0.0151019907 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -36 0.4 0.120038666 0.8125 0 0 0.6060606 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -45 0.5 0.0382843725 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.202245563 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -69 0.7666667 0.13288027 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -58 0.644444466 0.106274314 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -22 0.244444445 0.07454949 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -58 0.644444466 0.09478583 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -53 0.5888889 0.0607036427 0.625 0 0 0.6060606 Federal-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -44 0.4888889 0.02559229 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -31 0.344444454 0.04129305 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Male United-States 0 -46 0.51111114 0.115308434 0.8125 0 0 0.4040404 Private Bachelors Divorced Machine-op-inspct Unmarried Other Female Puerto-Rico 0 -48 0.533333361 0.08650338 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -46 0.51111114 0.131354719 0.625 0 0 0.4040404 Federal-gov Some-college Separated Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.08248979 0.3125 0 0.143480256 0.4040404 Private 9th Never-married Machine-op-inspct Unmarried Black Female United-States 0 -43 0.477777779 0.115772493 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -17 0.188888893 0.123784862 0.375 0 0 0.151515156 Self-emp-inc 10th Never-married Sales Own-child White Male United-States 0 -20 0.222222224 0.147680521 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -22 0.244444445 0.04807622 0.625 0 0 0.353535354 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -19 0.211111113 0.15795663 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Male United-States 0 -35 0.3888889 0.0652143061 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -29 0.322222233 0.163397446 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -18 0.2 0.08580021 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -25 0.2777778 0.137762055 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -54 0.6 0.09685695 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.05434076 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Sales Own-child White Female United-States 0 -36 0.4 0.202886775 0.1875 0 0 0.353535354 Private 5th-6th Separated Priv-house-serv Unmarried Other Female Mexico 0 -26 0.2888889 0.136006817 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.118956968 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Own-child White Male United-States 0 -46 0.51111114 0.237905174 0.3125 0 0 0.4040404 Private 9th Divorced Other-service Unmarried White Female United-States 0 -41 0.455555558 0.08491653 0.625 0 0 0.5050505 Private Some-college Divorced Craft-repair Not-in-family White Female United-States 0 -31 0.344444454 0.105403431 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Own-child White Male United-States 0 -48 0.533333361 0.2933263 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.3781822 0.875 0 0 0.5050505 Self-emp-inc Masters Divorced Exec-managerial Not-in-family Black Female United-States 0 -22 0.244444445 0.06758582 0.5625 0 0 0.434343427 Federal-gov HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -18 0.2 0.0244324636 0.5625 0 0 0.25252524 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -46 0.51111114 0.07462358 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.09683136 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 -30 0.333333343 0.0513994358 0.5625 0 0 0.4848485 Federal-gov HS-grad Married-civ-spouse Armed-Forces Other-relative Amer-Indian-Eskimo Male United-States 0 -31 0.344444454 0.08170512 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family White Male United-States 0 -21 0.233333334 0.145936057 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.06057904 0.5625 0.0367403664 0 0.454545468 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 -45 0.5 0.0696475059 0.8125 0 0.453856736 0.6060606 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.106614448 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -21 0.233333334 0.306701332 0.3125 0 0 0.353535354 Private 9th Never-married Other-service Unmarried White Male Mexico 0 -44 0.4888889 0.1517224 0.625 0 0.323232323 0.464646459 Private Some-college Divorced Sales Unmarried White Female United-States 0 -54 0.6 0.15175204 0.4375 0 0 0.5050505 Private 11th Divorced Craft-repair Own-child White Female United-States 1 -36 0.4 0.192708313 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -50 0.5555556 0.126509979 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -26 0.2888889 0.09598271 0.8125 0 0 0.353535354 Private Bachelors Never-married Prof-specialty Unmarried Black Female United-States 0 -47 0.5222222 0.100071058 0.9375 0 0 0.353535354 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -36 0.4 0.12482278 0.5625 0 0 0.373737365 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -32 0.355555564 0.01881788 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband Amer-Indian-Eskimo Male United-States 0 -21 0.233333334 0.258369863 0.375 0 0 0.353535354 Private 10th Never-married Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.09482692 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.152642444 0.5625 0 0 0.4040404 Private HS-grad Never-married Priv-house-serv Not-in-family White Female Mexico 0 -51 0.566666663 0.153913409 0.5625 0 0 0.454545468 Private HS-grad Married-spouse-absent Craft-repair Not-in-family White Male Columbia 0 -55 0.6111111 0.08066384 0.375 0 0 0.5050505 Self-emp-not-inc 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -43 0.477777779 0.2015195 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -37 0.411111116 0.100556679 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Not-in-family Amer-Indian-Eskimo Male United-States 0 -28 0.311111122 0.1364298 0.625 0 0 0.4040404 Local-gov Some-college Never-married Exec-managerial Own-child White Female United-States 0 -39 0.433333337 0.118024796 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -35 0.3888889 0.106063493 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.27604273 0.875 0 0 0.2020202 ? Masters Married-civ-spouse ? Husband White Male United-States 0 -26 0.2888889 0.07125119 0.5625 0 0 0.363636374 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -68 0.75555557 0.09702668 0.5625 0.03818038 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -46 0.51111114 0.0305535458 0.9375 0 0.6483012 0.4040404 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 -21 0.233333334 0.138638988 0.5625 0 0 0.373737365 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -23 0.25555557 0.0776760355 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -17 0.188888893 0.125876859 0.375 0 0 0.3030303 Private 10th Married-civ-spouse Sales Own-child White Female United-States 0 -23 0.25555557 0.205014467 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Not-in-family White Female United-States 0 -34 0.377777785 0.0165211279 0.5625 0 0 0.151515156 Private HS-grad Widowed Adm-clerical Unmarried White Male United-States 0 -33 0.366666675 0.123631969 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 -31 0.344444454 0.230840474 0.75 0 0 0.454545468 Private Assoc-acdm Separated Transport-moving Not-in-family White Male United-States 0 -31 0.344444454 0.122711919 0.8125 0.0406404063 0 0.3030303 ? Bachelors Married-civ-spouse ? Wife White Female Canada 0 -56 0.622222245 0.0456932522 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.236667216 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -45 0.5 0.197811022 0.5625 0 0.365013778 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female Japan 0 -41 0.455555558 0.148730561 0.8125 0.07688077 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.127989739 0.375 0 0 0.3030303 Private 10th Divorced Handlers-cleaners Not-in-family White Female United-States 0 -41 0.455555558 0.231658146 0.4375 0 0 0.4040404 Private 11th Widowed Other-service Unmarried White Female United-States 0 -46 0.51111114 0.0743965954 0.875 0 0 0.5555556 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.04871877 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Unmarried Asian-Pac-Islander Female United-States 0 -43 0.477777779 0.130324885 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.225633383 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.184792936 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 -58 0.644444466 0.0766522661 0.8125 0.07688077 0 0.3030303 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.0353848077 0.75 0 0.365932047 0.25252524 Private Assoc-acdm Divorced Tech-support Own-child White Female United-States 0 -44 0.4888889 0.126435891 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Unmarried White Male United-States 0 -57 0.6333333 0.07071843 0.625 0 0 0.424242437 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -24 0.266666681 0.1445102 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -38 0.422222227 0.0356724076 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -33 0.366666675 0.128315732 0.25 0.0217602178 0 0.353535354 Private 7th-8th Divorced Handlers-cleaners Not-in-family White Male United-States 0 -25 0.2777778 0.05106806 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -33 0.366666675 0.0830407441 0.5625 0 0 0.8484849 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -50 0.5555556 0.152553543 0.625 0 0 0.5252525 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -35 0.3888889 0.190596119 0.5625 0.05178052 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.112176493 0.8125 0 0 0.5555556 Private Bachelors Divorced Adm-clerical Not-in-family White Male United-States 1 -27 0.3 0.1264534 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -22 0.244444445 0.105842575 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 -30 0.333333343 0.15326345 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -90 1 0.0776625648 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Own-child White Female United-States 0 -39 0.433333337 0.113995038 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Other-relative Black Male United-States 0 -34 0.377777785 0.149501756 0.8125 0 0 0.454545468 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -39 0.433333337 0.15125294 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.018939117 0.625 0 0 0.04040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -19 0.211111113 0.2180972 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 -29 0.322222233 0.141777664 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -66 0.733333349 0.117865168 0.75 0.02290023 0 0.3030303 Self-emp-not-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male Hungary 0 -38 0.422222227 0.108534023 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -44 0.4888889 0.141801909 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -34 0.377777785 0.07587366 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Never-married Craft-repair Own-child White Male United-States 0 -35 0.3888889 0.214784086 0.75 0 0 0.4040404 State-gov Assoc-acdm Widowed Exec-managerial Not-in-family White Female United-States 0 -29 0.322222233 0.2530166 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -22 0.244444445 0.153879061 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -33 0.366666675 0.068788074 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -73 0.811111152 0.123400271 0.6875 0.251242518 0 0.6060606 Private Assoc-voc Widowed Prof-specialty Not-in-family White Male United-States 1 -35 0.3888889 0.119421035 0.625 0 0.5456841 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.0229250938 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -27 0.3 0.07854288 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -25 0.2777778 0.118232243 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -47 0.5222222 0.10154745 0.8125 0 0.359045 0.5151515 Private Bachelors Divorced Handlers-cleaners Not-in-family White Male United-States 1 -36 0.4 0.11896909 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 -36 0.4 0.141437531 0.125 0 0 0.2020202 Private 1st-4th Widowed Other-service Other-relative White Female Mexico 0 -25 0.2777778 0.13874945 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Tech-support Unmarried White Female United-States 0 -37 0.411111116 0.13555488 0.4375 0 0 0.656565666 Private 11th Divorced Transport-moving Not-in-family White Male United-States 0 -26 0.2888889 0.136246592 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Tech-support Own-child White Male United-States 0 -53 0.5888889 0.06470107 0.625 0 0.399449021 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.389556855 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 -30 0.333333343 0.3431658 0.8125 0.04787048 0 0.454545468 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 1 -53 0.5888889 0.218239322 0.625 0 0 0.4040404 Local-gov Some-college Divorced Other-service Not-in-family White Female United-States 0 -37 0.411111116 0.07256459 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.08746856 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -53 0.5888889 0.06976874 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -23 0.25555557 0.126296476 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Own-child White Male United-States 0 -28 0.311111122 0.116448052 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -53 0.5888889 0.139724061 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Other-service Husband White Male United-States 0 -32 0.355555564 0.140838087 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -33 0.366666675 0.275349647 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.140965387 0.5625 0 0 0.323232323 Private HS-grad Never-married Sales Other-relative Black Female Dominican-Republic 0 -52 0.5777778 0.09723211 0.6875 0 0.43663913 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.141131073 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -27 0.3 0.164613172 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Female United-States 1 -44 0.4888889 0.5994221 0.5625 0.031370312 0 0.3030303 Private HS-grad Married-civ-spouse Handlers-cleaners Wife White Female United-States 0 -37 0.411111116 0.201012328 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -39 0.433333337 0.109945752 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.210004687 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child Black Female United-States 0 -42 0.466666669 0.105052523 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -49 0.544444442 0.196525916 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.103411116 0.5625 0 0 0.363636374 Private HS-grad Divorced Handlers-cleaners Unmarried Black Female United-States 0 -43 0.477777779 0.168229386 0.5625 0 0 1 Private HS-grad Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male United-States 0 -43 0.477777779 0.311294168 0.9375 1 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.207812324 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.02337232 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -46 0.51111114 0.0715643838 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -54 0.6 0.09358358 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -37 0.411111116 0.09477506 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male Jamaica 1 -53 0.5888889 0.1461105 0.625 0.04386044 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -26 0.2888889 0.109322727 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male Philippines 0 -59 0.655555546 0.170445979 0.9375 0 0 0.5555556 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.24196659 0.625 0 0 0.4040404 Federal-gov Some-college Separated Adm-clerical Not-in-family Black Male United-States 0 -32 0.355555564 0.155864641 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -53 0.5888889 0.132722661 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.08818655 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -35 0.3888889 0.0205865819 0.5625 0 0 0.4040404 Private HS-grad Married-AF-spouse Other-service Wife White Female United-States 1 -48 0.533333361 0.0708140656 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried Asian-Pac-Islander Female United-States 0 -30 0.333333343 0.1201471 0.625 0 0 0.4040404 Local-gov Some-college Separated Handlers-cleaners Not-in-family Black Male United-States 0 -38 0.422222227 0.162994 0.5 0.07688077 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 1 -58 0.644444466 0.1322842 0.5625 0 0 0.1010101 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -44 0.4888889 0.156543553 0.5625 0 0 0.323232323 Private HS-grad Married-spouse-absent Transport-moving Not-in-family Other Male Canada 0 -30 0.333333343 0.08780802 0.6875 0 0 0.4040404 Private Assoc-voc Separated Prof-specialty Unmarried White Female United-States 0 -68 0.75555557 0.226529181 0.5625 0 0 0.1010101 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.22756508 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 -26 0.2888889 0.07046114 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -41 0.455555558 0.1505673 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -43 0.477777779 0.341030031 0.8125 0.1502415 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 1 -48 0.533333361 0.04342883 0.8125 0 0 0.474747479 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -55 0.6111111 0.191347778 0.5625 0 0 0.373737365 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -50 0.5555556 0.14907743 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Exec-managerial Unmarried Asian-Pac-Islander Female ? 0 -41 0.455555558 0.288608849 0.4375 0 0.3409091 0.5050505 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 -52 0.5777778 0.140298575 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.277601272 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female Mexico 0 -31 0.344444454 0.122702494 0.5625 0 0.43663913 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -54 0.6 0.08754063 0.6875 0 0 0.3838384 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 -31 0.344444454 0.1255603 0.875 0 0 0.25252524 Self-emp-not-inc Masters Separated Tech-support Not-in-family White Female United-States 0 -31 0.344444454 0.137056187 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.08674855 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.0373104438 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.212008446 0.625 0 0 0.4848485 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -45 0.5 0.09095679 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -39 0.433333337 0.215024531 0.375 0 0 0.25252524 Private 10th Never-married Other-service Unmarried White Female Mexico 0 -34 0.377777785 0.15923366 0.625 0 0 0.181818187 Local-gov Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -48 0.533333361 0.102097049 0.625 0.0861408561 0 0.6060606 ? Some-college Never-married ? Not-in-family White Male United-States 1 -19 0.211111113 0.09024217 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 -56 0.622222245 0.0547044724 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female Canada 0 -47 0.5222222 0.1017623 0.5625 0 0 0.4040404 Private HS-grad Separated Prof-specialty Other-relative Other Female Puerto-Rico 0 -35 0.3888889 0.216993272 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 1 -25 0.2777778 0.128394529 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Columbia 0 -43 0.477777779 0.07205607 0.8125 0 0 0.4040404 Local-gov Bachelors Separated Prof-specialty Unmarried White Female United-States 0 -59 0.655555546 0.153468877 0.8125 0 0 0.373737365 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -66 0.733333349 0.143784121 0.25 0 0 0.1010101 ? 7th-8th Divorced ? Not-in-family White Male United-States 0 -63 0.7 0.179216072 0.25 0 0 0.6060606 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 1 -32 0.355555564 0.173144162 0.625 0 0 0.373737365 Private Some-college Married-spouse-absent Transport-moving Not-in-family White Female United-States 0 -58 0.644444466 0.0253188349 0.8125 0 0 0.4040404 ? Bachelors Widowed ? Not-in-family White Female United-States 0 -43 0.477777779 0.10138917 0.6875 0 0 0.5050505 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Other-relative White Male United-States 1 -27 0.3 0.1422397 0.5625 0 0 0.5252525 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.09201155 0.5 0 0 0.323232323 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 -44 0.4888889 0.164378792 0.625 0 0 0.6060606 Federal-gov Some-college Divorced Exec-managerial Unmarried White Male United-States 1 -40 0.444444448 0.1621184 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -65 0.722222269 0.116458155 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -50 0.5555556 0.160947129 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -18 0.2 0.109843373 0.5625 0 0 0.2020202 ? HS-grad Separated ? Own-child White Male United-States 0 -51 0.566666663 0.11586275 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -44 0.4888889 0.146872282 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -20 0.222222224 0.135918587 0.625 0 0 0.13131313 Private Some-college Never-married Sales Own-child White Female United-States 0 -29 0.322222233 0.101513095 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Not-in-family White Male United-States 0 -50 0.5555556 0.0635755956 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -50 0.5555556 0.103093885 0.5625 0.05178052 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.105590679 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -23 0.25555557 0.145913839 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -41 0.455555558 0.0553382672 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.107199073 0.625 0 0 0.3030303 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -58 0.644444466 0.208805114 0.8125 0 0 0.25252524 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -50 0.5555556 0.0895895138 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.0243913773 0.8125 0 0 0.656565666 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.268755078 0.5625 0 0 0.24242425 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -33 0.366666675 0.121073209 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -52 0.5777778 0.0329674929 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -47 0.5222222 0.135963038 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -45 0.5 0.214939669 0.8125 0.14084141 0 0.454545468 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 1 -34 0.377777785 0.104499549 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.0162362214 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male Philippines 1 -31 0.344444454 0.17367962 0.625 0 0 0.151515156 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -19 0.211111113 0.0195102729 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 -45 0.5 0.255534261 0.625 0 0 0.454545468 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 -45 0.5 0.102883741 0.6875 0 0 0.0303030312 Self-emp-not-inc Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 -34 0.377777785 0.104312979 0.5625 0.04416044 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -27 0.3 0.10386575 0.4375 0 0 0.353535354 Private 11th Married-spouse-absent Sales Own-child Asian-Pac-Islander Male India 0 -37 0.411111116 0.2261163 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -20 0.222222224 0.06381335 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -32 0.355555564 0.09016 0.8125 0.135501355 0 0.4848485 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -24 0.266666681 0.161740556 0.125 0 0 0.5555556 Private 1st-4th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 -39 0.433333337 0.0538854524 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -18 0.2 0.07388808 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 -62 0.6888889 0.0266787019 0.625 0 0 0.8080808 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -24 0.266666681 0.0606490858 0.8125 0 0 0.4040404 Private Bachelors Separated Exec-managerial Not-in-family White Female United-States 0 -37 0.411111116 0.130568027 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -46 0.51111114 0.139346883 0.8125 0 0 0.25252524 Private Bachelors Widowed Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.05812468 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -53 0.5888889 0.100794435 0.5625 0 0.5874656 0.4848485 Private HS-grad Never-married Sales Not-in-family White Male United-States 1 -25 0.2777778 0.217645258 0.8125 0 0 0.353535354 Private Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 -44 0.4888889 0.1602965 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Machine-op-inspct Husband White Male ? 0 -24 0.266666681 0.0242863074 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -61 0.677777767 0.11005082 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -45 0.5 0.06299905 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -33 0.366666675 0.07607707 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 -48 0.533333361 0.122947656 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.049432043 0.5625 0 0 0.3030303 Local-gov HS-grad Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 -40 0.444444448 0.341539919 0.5625 0 0 0.323232323 ? HS-grad Divorced ? Not-in-family Black Female United-States 0 -68 0.75555557 0.131923854 0.8125 0.200512 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.186468691 0.5625 0 0.404499531 0.4040404 Private HS-grad Divorced Protective-serv Own-child White Female United-States 0 -25 0.2777778 0.0268746987 0.8125 0 0 0.6060606 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -31 0.344444454 0.0223101564 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -55 0.6111111 0.282703966 0.625 0 0 0.3838384 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -46 0.51111114 0.115238383 0.75 0 0 0.3838384 Private Assoc-acdm Divorced Sales Unmarried White Female United-States 0 -58 0.644444466 0.1342206 0.8125 0 0 0.3838384 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -56 0.622222245 0.158418685 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -45 0.5 0.113310054 0.8125 0 0 0.5555556 Federal-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 1 -24 0.266666681 0.09831179 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried White Male United-States 1 -35 0.3888889 0.0487221368 0.5625 0 0 0.565656543 Local-gov HS-grad Divorced Farming-fishing Own-child Asian-Pac-Islander Male United-States 0 -51 0.566666663 0.103636749 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -47 0.5222222 0.218089119 0.9375 0.1502415 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.133918867 0.4375 0 0 0.1010101 Private 11th Never-married Adm-clerical Other-relative White Female United-States 0 -21 0.233333334 0.179860651 0.375 0 0 0.4040404 Private 10th Never-married Prof-specialty Unmarried Black Female United-States 0 -45 0.5 0.112606212 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -42 0.466666669 0.155373633 0.5625 0.05178052 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -56 0.622222245 0.444235057 0.5 0 0 0.4040404 Private 12th Widowed Other-service Unmarried Black Female United-States 0 -39 0.433333337 0.122354947 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -31 0.344444454 0.1253744 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Not-in-family Other Female Mexico 0 -20 0.222222224 0.120237358 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Tech-support Not-in-family White Male United-States 0 -65 0.722222269 0.08851388 0.1875 0.01797018 0 0.212121218 Self-emp-not-inc 5th-6th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -44 0.4888889 0.0385484 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.255807042 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.08228908 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.0722716 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.08597735 0.375 0 0.3996786 0.4040404 Local-gov 10th Never-married Transport-moving Other-relative White Male United-States 0 -33 0.366666675 0.06929592 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Sales Own-child White Male United-States 0 -49 0.544444442 0.162828982 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Other-service Unmarried White Female United-States 0 -28 0.311111122 0.116932996 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 -29 0.322222233 0.156708568 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.237223566 0.6875 0 0 0.2020202 Private Assoc-voc Never-married Other-service Own-child White Male United-States 0 -37 0.411111116 0.162994 0.8125 0 0 0.05050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.188003 0.625 0 0 0.373737365 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 1 -27 0.3 0.119253993 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -47 0.5222222 0.1048417 0.625 0.07688077 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.169463292 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -41 0.455555558 0.0134127662 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female Philippines 1 -61 0.677777767 0.07747196 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -32 0.355555564 0.06850452 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 1 -21 0.233333334 0.211289123 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -63 0.7 0.168429419 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Sales Husband White Male United-States 1 -34 0.377777785 0.153134122 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -21 0.233333334 0.132569775 0.75 0 0 0.1010101 State-gov Assoc-acdm Never-married Tech-support Own-child White Male United-States 0 -44 0.4888889 0.0798475146 0.5625 0 0 0.333333343 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -26 0.2888889 0.191960022 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Not-in-family Asian-Pac-Islander Male South 0 -36 0.4 0.188703477 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.0973984748 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male ? 1 -52 0.5777778 0.05176786 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Asian-Pac-Islander Male Philippines 0 -44 0.4888889 0.11266885 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.2254879 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 -60 0.6666667 0.09535901 0.5625 0 0 0.5050505 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -31 0.344444454 0.15251717 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -30 0.333333343 0.2465574 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried Black Male United-States 0 -23 0.25555557 0.1520329 0.625 0 0 0.25252524 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -81 0.900000036 0.08904395 0.125 0 0 0.2020202 State-gov 1st-4th Widowed Other-service Not-in-family White Female United-States 0 -39 0.433333337 0.1739578 0.8125 0.031370312 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male ? 0 -38 0.422222227 0.133165181 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family Asian-Pac-Islander Female Portugal 0 -21 0.233333334 0.0206229519 0.625 0 0 0.3838384 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -28 0.311111122 0.225644156 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.0412688069 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -47 0.5222222 0.07176106 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -36 0.4 0.09710279 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.0271400716 0.5625 0 0 1 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -56 0.622222245 0.179221466 0.8125 0.02907029 0 0.5252525 Private Bachelors Never-married Prof-specialty Not-in-family White Female Cuba 0 -57 0.6333333 0.0963356346 0.5625 0 0 0.3030303 Private HS-grad Widowed Other-service Unmarried White Female ? 0 -42 0.466666669 0.129586011 0.625 0 0 0.3838384 State-gov Some-college Divorced Adm-clerical Own-child White Female United-States 0 -43 0.477777779 0.07701934 0.5625 0 0 0.353535354 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -48 0.533333361 0.04274654 0.5625 0 0 0.323232323 ? HS-grad Married-spouse-absent ? Unmarried White Female United-States 0 -53 0.5888889 0.0891113058 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female Scotland 0 -58 0.644444466 0.0863215253 0.5625 0 0 0.24242425 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -19 0.211111113 0.084823586 0.5 0 0 0.4040404 Private 12th Never-married Other-service Own-child White Male El-Salvador 0 -37 0.411111116 0.114618056 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.137031272 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -31 0.344444454 0.07403289 0.25 0 0 0.4040404 Private 7th-8th Separated Craft-repair Not-in-family White Female United-States 0 -31 0.344444454 0.0774140358 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -53 0.5888889 0.155718476 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -19 0.211111113 0.160620466 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Male United-States 0 -56 0.622222245 0.211590186 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.0213699024 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -51 0.566666663 0.242560655 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Other-relative White Female United-States 0 -62 0.6888889 0.09517581 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.0561801866 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.0807130039 0.25 0 0 0.4848485 ? 7th-8th Divorced ? Not-in-family Amer-Indian-Eskimo Male United-States 0 -28 0.311111122 0.1997279 0.5625 0 0 0.454545468 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.1300238 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.0266921725 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -57 0.6333333 0.144119546 0.5625 0 0 0.3030303 Local-gov HS-grad Widowed Other-service Unmarried White Female United-States 0 -60 0.6666667 0.174986273 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -23 0.25555557 0.03735759 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -47 0.5222222 0.122116514 0.625 1 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -21 0.233333334 0.142318517 0.625 0 0 0.08080808 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -51 0.566666663 0.135009989 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -61 0.677777767 0.119034424 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -52 0.5777778 0.09495826 0.8125 1 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -76 0.844444454 0.08471986 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -24 0.266666681 0.102495782 0.625 0 0 0.3939394 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -31 0.344444454 0.07504723 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -43 0.477777779 0.0876443461 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.020280797 0.625 0 0 0.4040404 Federal-gov Some-college Widowed Prof-specialty Unmarried Amer-Indian-Eskimo Female United-States 0 -18 0.2 0.144802511 0.625 0 0.3677686 0.24242425 ? Some-college Never-married ? Own-child White Female United-States 0 -19 0.211111113 0.183740214 0.5 0 0 0.25252524 Private 12th Never-married Adm-clerical Own-child White Female United-States 0 -44 0.4888889 0.131932616 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Other-relative White Female United-States 0 -41 0.455555558 0.115123212 0.625 0 0 0.07070707 Local-gov Some-college Never-married Prof-specialty Other-relative White Male United-States 0 -21 0.233333334 0.0885516 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Male Vietnam 0 -40 0.444444448 0.100670509 0.5625 0 0 0.353535354 Private HS-grad Divorced Handlers-cleaners Not-in-family Black Male United-States 0 -25 0.2777778 0.128253087 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male Canada 0 -62 0.6888889 0.113079034 1 0 0 0.4040404 Local-gov Doctorate Widowed Prof-specialty Unmarried White Female Iran 0 -42 0.466666669 0.119881727 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.125300989 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 -19 0.211111113 0.131881416 0.5625 0 0 0.121212125 Private HS-grad Never-married Sales Own-child White Female United-States 0 -60 0.6666667 0.03690969 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -20 0.222222224 0.06776094 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Other Male Puerto-Rico 0 -23 0.25555557 0.1705322 0.75 0 0 0.25252524 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -18 0.2 0.136930227 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.118337318 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.187447339 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 -51 0.566666663 0.0627687 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 -41 0.455555558 0.106881842 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 -18 0.2 0.220657974 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Female United-States 0 -41 0.455555558 0.1420107 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Sales Unmarried Black Female United-States 0 -27 0.3 0.0992385745 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -71 0.788888931 0.08785314 0.125 0 0 0.282828271 Self-emp-not-inc 1st-4th Divorced Craft-repair Not-in-family White Female United-States 0 -25 0.2777778 0.139152229 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male El-Salvador 0 -73 0.811111152 0.1917418 0.5625 0 0 0.2020202 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -45 0.5 0.08603595 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -25 0.2777778 0.143740341 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.193928763 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 -44 0.4888889 0.1679337 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male Ecuador 0 -44 0.4888889 0.195596442 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Protective-serv Own-child White Female Cuba 0 -49 0.544444442 0.03689083 0.5625 0.03103031 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.0381564 0.625 0.07688077 0 0.454545468 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.1202057 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -20 0.222222224 0.0423417464 0.5625 0 0 0.454545468 Private HS-grad Never-married Priv-house-serv Not-in-family White Female United-States 0 -66 0.733333349 0.0722002 0.5625 0 0 0.181818187 Private HS-grad Widowed Tech-support Not-in-family White Female United-States 0 -19 0.211111113 0.0585032068 0.625 0 0 0.151515156 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -60 0.6666667 0.08802018 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.110919006 0.6875 0 0 0.4040404 Private Assoc-voc Separated Prof-specialty Not-in-family White Male United-States 0 -42 0.466666669 0.133572668 0.6875 0 0 0.353535354 Private Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 -59 0.655555546 0.1763421 0.625 0 0 0.5252525 Private Some-college Divorced Exec-managerial Not-in-family White Female Outlying-US(Guam-USVI-etc) 0 -58 0.644444466 0.188797772 0.75 0.05178052 0 0.6060606 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.06545138 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -58 0.644444466 0.06454818 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -69 0.7666667 0.217562422 0.8125 1 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -17 0.188888893 0.189040929 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Female United-States 0 -19 0.211111113 0.09180679 0.4375 0 0 0.24242425 Private 11th Never-married Farming-fishing Own-child White Male United-States 0 -28 0.311111122 0.0438949168 0.625 0 0 0.7070707 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -37 0.411111116 0.0174202956 0.5625 0 0 0.4040404 Private HS-grad Separated Prof-specialty Unmarried Amer-Indian-Eskimo Female United-States 0 -30 0.333333343 0.100714289 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.0228240639 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Male United-States 0 -45 0.5 0.116401576 0.4375 0 0.6483012 0.7676768 Private 11th Divorced Transport-moving Not-in-family White Male United-States 1 -59 0.655555546 0.07189846 0.25 0 0 1 Private 7th-8th Married-civ-spouse Other-service Wife White Female United-States 0 -45 0.5 0.08878936 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -53 0.5888889 0.145948857 1 0.105201051 0 0.4040404 Local-gov Doctorate Divorced Prof-specialty Not-in-family White Female United-States 1 -37 0.411111116 0.089801006 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -26 0.2888889 0.11095605 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -53 0.5888889 0.06672302 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.04004836 0.5625 0 0 0.151515156 State-gov HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -27 0.3 0.140583485 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Own-child White Male United-States 0 -22 0.244444445 0.09329328 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -41 0.455555558 0.08153472 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -53 0.5888889 0.100884691 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -58 0.644444466 0.07711633 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.08976733 0.5 0 0 0.535353541 ? 12th Separated ? Unmarried Black Female United-States 0 -32 0.355555564 0.142975211 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.296442062 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -47 0.5222222 0.06601446 0.875 0.07688077 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -27 0.3 0.09785379 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -25 0.2777778 0.119314611 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -40 0.444444448 0.09533005 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family Black Female United-States 0 -36 0.4 0.0323922932 0.625 0 0 0.9292929 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.212041453 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Transport-moving Own-child White Male United-States 0 -44 0.4888889 0.08323 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -19 0.211111113 0.115039691 0.5625 0 0 0.6060606 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -42 0.466666669 0.223883539 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -60 0.6666667 0.130017757 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -41 0.455555558 0.236519039 0.5625 0 0.4242424 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.0720075741 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Transport-moving Unmarried Asian-Pac-Islander Female United-States 0 -67 0.7444445 0.110275105 0.1875 0 0 0.4949495 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 0 -36 0.4 0.410812259 0.8125 0 0 0.4848485 Self-emp-not-inc Bachelors Married-civ-spouse Transport-moving Husband Black Male ? 0 -52 0.5777778 0.21191214 0.875 0 0 0.4040404 State-gov Masters Divorced Prof-specialty Not-in-family Asian-Pac-Islander Female United-States 0 -28 0.311111122 0.0780929551 1 0 0 0.181818187 Private Doctorate Never-married Adm-clerical Own-child White Male United-States 0 -83 0.922222257 0.183368415 0.5625 0 0 0.2020202 Self-emp-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 -17 0.188888893 0.11307162 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 -27 0.3 0.119196743 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -35 0.3888889 0.0209435541 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Not-in-family White Male United-States 0 -40 0.444444448 0.08812121 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -23 0.25555557 0.139701158 0.75 0 0 0.25252524 Private Assoc-acdm Married-civ-spouse Sales Wife White Female United-States 0 -51 0.566666663 0.178120911 0.4375 0 0 0.4040404 Local-gov 11th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -51 0.566666663 0.229397759 0.125 0 0 0.545454562 Private 1st-4th Married-civ-spouse Other-service Husband White Male Mexico 0 -82 0.9111111 0.0285814367 0.375 0 0 0.2020202 ? 10th Widowed ? Not-in-family White Male United-States 0 -28 0.311111122 0.07234501 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -53 0.5888889 0.195756063 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male Germany 1 -29 0.322222233 0.07151522 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Not-in-family White Female Canada 0 -19 0.211111113 0.166820347 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.115577169 0.8125 0 0 0.5050505 Private Bachelors Married-spouse-absent Sales Not-in-family White Female United-States 0 -23 0.25555557 0.157916889 0.25 0 0 0.4040404 Private 7th-8th Never-married Machine-op-inspct Own-child Black Female Dominican-Republic 0 -66 0.733333349 0.132466719 0.8125 0 0 0.151515156 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.122946985 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 -35 0.3888889 0.116315365 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -17 0.188888893 0.0199170876 0.5 0 0 0.151515156 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 -27 0.3 0.08785449 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -27 0.3 0.1437464 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 -44 0.4888889 0.127941921 0.8125 0.1502415 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Wife Black Female United-States 1 -64 0.7111111 0.08967707 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -62 0.6888889 0.0161985047 0.5625 0 0 0.151515156 Self-emp-inc HS-grad Widowed Sales Not-in-family White Female United-States 0 -26 0.2888889 0.186546832 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.124507561 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried White Male United-States 0 -40 0.444444448 0.0977702662 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.129487678 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -25 0.2777778 0.128409356 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Male Taiwan 0 -52 0.5777778 0.172375664 0.625 0 0 0.24242425 Local-gov Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -46 0.51111114 0.06673784 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -30 0.333333343 0.146029681 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 -52 0.5777778 0.0744679943 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.081141375 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family Other Male United-States 0 -17 0.188888893 0.123301268 0.375 0 0 0.25252524 Private 10th Never-married Other-service Own-child White Female United-States 0 -46 0.51111114 0.20124267 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Own-child Black Female United-States 0 -45 0.5 0.20063515 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -21 0.233333334 0.170816422 0.625 0.010550105 0 0.323232323 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -18 0.2 0.13971664 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -17 0.188888893 0.100034691 0.4375 0 0.395087242 0.151515156 Private 11th Never-married Other-service Own-child White Male United-States 0 -90 1 0.09406583 0.625 0 0 0.373737365 Private Some-college Divorced Sales Unmarried Black Female United-States 0 -23 0.25555557 0.111452445 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -41 0.455555558 0.08101071 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.0457525253 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 -69 0.7666667 0.154520929 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -23 0.25555557 0.0278546922 0.75 0 0 0.323232323 Federal-gov Assoc-acdm Never-married Exec-managerial Unmarried White Female United-States 0 -28 0.311111122 0.124689423 0.625 0 0 0.545454562 Private Some-college Never-married Tech-support Not-in-family White Male United-States 0 -37 0.411111116 0.07350484 0.75 0 0.453856736 0.454545468 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -57 0.6333333 0.09989527 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.09812859 0.625 0 0.453168035 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family Black Male United-States 0 -48 0.533333361 0.14172782 0.5625 0.009140091 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -73 0.811111152 0.13371411 0.5625 0 0 0.323232323 Private HS-grad Widowed Other-service Other-relative White Female United-States 0 -25 0.2777778 0.351180881 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Other-relative White Male Mexico 0 -33 0.366666675 0.06794751 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 -36 0.4 0.08406923 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.12853463 0.5625 0.03411034 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.048068136 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -31 0.344444454 0.2041025 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 -35 0.3888889 0.0666725039 0.3125 0 0 0.3838384 ? 9th Divorced ? Own-child Amer-Indian-Eskimo Male United-States 0 -40 0.444444448 0.2632045 0.5625 0 0 0.4848485 State-gov HS-grad Divorced Other-service Not-in-family Black Female United-States 0 -32 0.355555564 0.0368975662 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -35 0.3888889 0.136514 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Not-in-family White Male United-States 0 -26 0.2888889 0.1435174 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female Jamaica 0 -27 0.3 0.06042817 0.625 0 0 0.4040404 Self-emp-inc Some-college Separated Sales Own-child White Female United-States 0 -17 0.188888893 0.151616648 0.375 0 0.3677686 0.181818187 Private 10th Never-married Other-service Own-child White Female United-States 0 -29 0.322222233 0.170580685 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Female United-States 0 -18 0.2 0.0526576 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Own-child White Female United-States 0 -20 0.222222224 0.1065572 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -69 0.7666667 0.227466062 0.5625 0 0 0.24242425 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -18 0.2 0.263525069 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Not-in-family White Female United-States 0 -56 0.622222245 0.09076282 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -40 0.444444448 0.12352892 0.625 0 0 0.08080808 Private Some-college Separated Other-service Unmarried White Female United-States 0 -46 0.51111114 0.129852727 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -41 0.455555558 0.137362644 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Protective-serv Husband Black Male ? 0 -53 0.5888889 0.0602139831 0.625 0 0 0.4040404 Private Some-college Widowed Exec-managerial Unmarried White Female United-States 0 -50 0.5555556 0.160212308 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.09374724 0.4375 0 0 0.5050505 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -40 0.444444448 0.08533749 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Exec-managerial Not-in-family White Male United-States 1 -54 0.6 0.1159658 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -45 0.5 0.1106011 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -53 0.5888889 0.4096329 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 -17 0.188888893 0.133896634 0.4375 0 0 0.2020202 ? 11th Never-married ? Own-child White Male Peru 0 -50 0.5555556 0.286793679 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 -22 0.244444445 0.07921978 0.8125 0 0 0.25252524 ? Bachelors Never-married ? Not-in-family White Male United-States 0 -30 0.333333343 0.08026107 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Unmarried White Male ? 0 -40 0.444444448 0.06198942 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.05196049 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -25 0.2777778 0.12918593 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 -29 0.322222233 0.036998596 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -29 0.322222233 0.1695246 0.8125 0 0 0.5050505 Private Bachelors Never-married Farming-fishing Own-child White Male United-States 0 -22 0.244444445 0.1806049 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -56 0.622222245 0.0706147 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Unmarried Black Female Haiti 0 -60 0.6666667 0.153115943 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.143134162 0.5625 0.0346403457 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -53 0.5888889 0.089873746 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Female United-States 0 -23 0.25555557 0.2081592 0.625 0 0 0.2020202 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -18 0.2 0.0398745872 0.5625 0 0 0.1010101 Private HS-grad Never-married Priv-house-serv Other-relative White Female United-States 0 -36 0.4 0.02203064 0.625 0.0332503319 0 0.454545468 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -67 0.7444445 0.0495445244 0.5625 0.09386094 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.07945215 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -26 0.2888889 0.113908827 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.20804739 0.4375 0 0 0.2020202 Private 11th Never-married Adm-clerical Other-relative Asian-Pac-Islander Female United-States 0 -45 0.5 0.09762209 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried Black Female United-States 0 -64 0.7111111 0.068728134 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.226306245 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -53 0.5888889 0.0199076589 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -27 0.3 0.141653061 0.5625 0 0 0.282828271 Private HS-grad Never-married Handlers-cleaners Other-relative White Male Guatemala 0 -32 0.355555564 0.1284996 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried Amer-Indian-Eskimo Male United-States 0 -49 0.544444442 0.07247029 0.5625 0.14084141 0 0.3030303 Self-emp-not-inc HS-grad Divorced Exec-managerial Unmarried White Female United-States 1 -59 0.655555546 0.065446 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.105024233 0.875 0.07688077 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -61 0.677777767 0.12193197 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -41 0.455555558 0.23208113 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried White Female United-States 0 -46 0.51111114 0.114612 0.5625 0 0 0.373737365 State-gov HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -32 0.355555564 0.12045154 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -29 0.322222233 0.0796319842 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -48 0.533333361 0.1007877 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 0 -32 0.355555564 0.0203885622 0.625 0 0 0.3030303 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -21 0.233333334 0.103835441 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -50 0.5555556 0.230212063 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.09782819 0.875 0 0 0.444444448 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.188652292 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Other-relative White Female United-States 0 -42 0.466666669 0.251544237 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.134149209 0.8125 0 0 0.4040404 Private Bachelors Never-married Protective-serv Own-child White Female United-States 0 -70 0.7777778 0.119349636 0.5625 0 0 0.0303030312 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.174399629 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -65 0.722222269 0.09426789 0.5625 0.106051058 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -39 0.433333337 0.173796818 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family White Male ? 0 -32 0.355555564 0.07858598 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.04007261 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -43 0.477777779 0.0230470039 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.134872586 0.3125 0 0 0.4040404 Private 9th Never-married Other-service Own-child White Male United-States 0 -64 0.7111111 0.213002592 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Adm-clerical Not-in-family Black Female United-States 0 -37 0.411111116 0.161083177 0.625 0 0 0.5252525 Local-gov Some-college Separated Protective-serv Own-child Other Male United-States 0 -49 0.544444442 0.116798289 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 0 -29 0.322222233 0.174597651 0.4375 0 0 0.4848485 Private 11th Never-married Machine-op-inspct Own-child White Male United-States 0 -35 0.3888889 0.131686762 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -37 0.411111116 0.135109678 0.75 0 0.399449021 0.454545468 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -42 0.466666669 0.108014055 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.280131757 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -23 0.25555557 0.0991799757 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 -35 0.3888889 0.134487331 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 -29 0.322222233 0.133691877 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 -23 0.25555557 0.254004 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Unmarried White Female United-States 0 -21 0.233333334 0.2698415 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Female ? 0 -45 0.5 0.3459677 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -24 0.266666681 0.117915012 0.8125 0 0 0.5050505 ? Bachelors Never-married ? Not-in-family White Male United-States 0 -38 0.422222227 0.05560162 0.5625 0.005940059 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -28 0.311111122 0.0527970232 0.375 0 0 0.3838384 ? 10th Never-married ? Own-child White Female United-States 0 -23 0.25555557 0.115649238 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Unmarried White Female United-States 0 -39 0.433333337 0.21259442 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Never-married Sales Own-child Asian-Pac-Islander Male Iran 0 -45 0.5 0.179739416 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -68 0.75555557 0.129876986 0.75 0 0 0.434343427 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 -60 0.6666667 0.15984118 0.6875 0.049340494 0 0.4040404 Federal-gov Assoc-voc Divorced Prof-specialty Unmarried White Male United-States 1 -38 0.422222227 0.07437572 1 0.07688077 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Wife White Female ? 1 -41 0.455555558 0.220653936 0.5 0 0 0.4040404 Private 12th Separated Craft-repair Not-in-family Black Male United-States 0 -48 0.533333361 0.0234693084 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative White Male United-States 0 -33 0.366666675 0.0394569971 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -48 0.533333361 0.1048417 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.141461775 0.625 0 0 0.2020202 Local-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -26 0.2888889 0.257032871 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.2010157 0.8125 0 0.5544077 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.152750209 0.875 0 0 0.75757575 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -52 0.5777778 0.141937956 0.625 0.03103031 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.0748721138 0.5625 0 0 0.3838384 State-gov HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -72 0.8 0.05176786 0.5625 0 0 0.01010101 ? HS-grad Married-civ-spouse ? Husband Asian-Pac-Islander Male United-States 0 -18 0.2 0.06204061 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -62 0.6888889 0.0921307653 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Transport-moving Other-relative White Male United-States 0 -22 0.244444445 0.020078063 0.625 0 0 0.3030303 Private Some-college Never-married Transport-moving Own-child White Female United-States 0 -40 0.444444448 0.243067816 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -26 0.2888889 0.179174989 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.09623057 0.75 0 0 0.363636374 Private Assoc-acdm Married-spouse-absent Sales Own-child Black Female United-States 0 -25 0.2777778 0.0487221368 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Sales Unmarried Asian-Pac-Islander Female United-States 0 -46 0.51111114 0.119421035 0.6875 0 0 0.353535354 ? Assoc-voc Married-civ-spouse ? Wife Black Female United-States 1 -39 0.433333337 0.111204587 0.8125 0 0.359045 0.5050505 Private Bachelors Married-spouse-absent Craft-repair Not-in-family White Male ? 1 -41 0.455555558 0.285900563 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 -59 0.655555546 0.127783641 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male Italy 1 -37 0.411111116 0.02302141 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.123444729 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.0237818286 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family Asian-Pac-Islander Male ? 0 -23 0.25555557 0.174518853 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Other-service Wife White Female Puerto-Rico 0 -67 0.7444445 0.100147843 0.875 0.184811845 0 0.02020202 Self-emp-not-inc Masters Widowed Prof-specialty Not-in-family White Male United-States 1 -60 0.6666667 0.08420461 0.8125 0.0861408561 0 0.4848485 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 -39 0.433333337 0.1162103 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.276563376 0.5625 0 0.4331956 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -26 0.2888889 0.217246532 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -39 0.433333337 0.202572227 0.5625 0 0 0.5050505 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 -28 0.311111122 0.15678671 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.117629431 0.4375 0 0 0.5252525 Private 11th Divorced Craft-repair Unmarried White Female United-States 0 -43 0.477777779 0.110926412 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.139328018 0.625 0 0 0.25252524 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -32 0.355555564 0.1317447 0.8125 0 0.453856736 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.284878135 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -45 0.5 0.07837247 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 -48 0.533333361 0.187599555 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -43 0.477777779 0.126820475 0.9375 0.1502415 0 0.454545468 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.11042463 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -63 0.7 0.04347261 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 1 -55 0.6111111 0.068342194 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.07266225 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -32 0.355555564 0.123048685 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Other-service Unmarried White Male United-States 0 -27 0.3 0.13725017 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 -22 0.244444445 0.135560945 0.8125 0 0 0.151515156 Private Bachelors Never-married Sales Own-child White Female United-States 0 -44 0.4888889 0.0200457331 0.5625 0 0 0.686868668 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -34 0.377777785 0.125510454 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -28 0.311111122 0.132477492 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -40 0.444444448 0.06708673 0.875 0.1502415 0 0.24242425 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -45 0.5 0.131185666 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -17 0.188888893 0.06428617 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Male United-States 0 -53 0.5888889 0.173183233 0.5 0 0 0.454545468 Self-emp-not-inc 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.1311594 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -55 0.6111111 0.06624953 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 -44 0.4888889 0.08414062 0.6875 0 0 0.444444448 Local-gov Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -40 0.444444448 0.07541633 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.08804039 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.1403363 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -62 0.6888889 0.09943187 0.3125 0.010550105 0 0.222222224 Private 9th Never-married Priv-house-serv Not-in-family Black Female United-States 0 -31 0.344444454 0.100698121 0.6875 0.0346403457 0 0.3838384 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.111045629 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -30 0.333333343 0.159534052 0.5625 0 0.430670351 0.454545468 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -37 0.411111116 0.148389071 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female Mexico 0 -38 0.422222227 0.2222529 0.5625 0 0.430670351 0.4040404 Local-gov HS-grad Never-married Craft-repair Not-in-family White Male Canada 0 -58 0.644444466 0.214545652 0.5 0 0 0.4040404 Local-gov 12th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -30 0.333333343 0.123448096 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.225208372 0.6875 0.046500463 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.07356815 0.625 0 0 0.7070707 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -34 0.377777785 0.0798481852 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -39 0.433333337 0.109824516 0.625 0 0 1 Self-emp-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -61 0.677777767 0.170472249 0.625 0 0 0.2020202 Self-emp-inc Some-college Widowed Sales Not-in-family White Female United-States 0 -30 0.333333343 0.0135366963 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Divorced Machine-op-inspct Not-in-family White Female United-States 0 -31 0.344444454 0.132165655 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -21 0.233333334 0.118120439 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -50 0.5555556 0.157632 0.5625 0 0 0.5858586 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.230188489 0.5625 0 0 0.333333343 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -20 0.222222224 0.117675908 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -23 0.25555557 0.150087059 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Own-child White Female United-States 0 -46 0.51111114 0.169586554 0.125 0 0 0.4040404 Private 1st-4th Separated Other-service Not-in-family White Female Mexico 0 -20 0.222222224 0.110607162 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -33 0.366666675 0.169137985 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.159622952 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.07132461 0.625 0 0 0.4040404 Local-gov Some-college Divorced Protective-serv Unmarried White Female United-States 0 -23 0.25555557 0.142470732 0.625 0 0 0.6060606 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -34 0.377777785 0.214055315 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 -25 0.2777778 0.124797188 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -50 0.5555556 0.020889 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 1 -44 0.4888889 0.10236714 0.875 0 0 0.24242425 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 -26 0.2888889 0.0602065735 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -35 0.3888889 0.273489356 1 0 0 0.8080808 Private Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 -48 0.533333361 0.115838505 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 -26 0.2888889 0.113051414 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -41 0.455555558 0.143475637 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -25 0.2777778 0.142401353 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Male United-States 0 -33 0.366666675 0.113814533 0.6875 0 0 0.5555556 Private Assoc-voc Never-married Prof-specialty Unmarried White Female United-States 0 -24 0.266666681 0.0824056 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 -31 0.344444454 0.09412847 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.118661962 0.75 0 0 0.02020202 Local-gov Assoc-acdm Never-married Prof-specialty Own-child White Female United-States 0 -41 0.455555558 0.09781068 0.3125 0 0 0.4040404 Private 9th Never-married Priv-house-serv Unmarried White Female Columbia 0 -38 0.422222227 0.127036691 0.625 0 0 0.454545468 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.3002132 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -19 0.211111113 0.214185312 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -24 0.266666681 0.1587669 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -59 0.655555546 0.247849911 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -67 0.7444445 0.14326416 0.875 0 0 0.5555556 Private Masters Married-spouse-absent Exec-managerial Not-in-family White Male United-States 1 -49 0.544444442 0.277006537 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family Black Male United-States 0 -35 0.3888889 0.0700381547 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -44 0.4888889 0.137240067 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.179693609 0.625 1 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -22 0.244444445 0.0786688253 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Protective-serv Own-child White Male United-States 0 -21 0.233333334 0.0668139458 0.625 0 0 0.1010101 State-gov Some-college Never-married Exec-managerial Own-child White Male United-States 0 -50 0.5555556 0.10933283 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -44 0.4888889 0.0676760748 0.75 0 0 0.4848485 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -36 0.4 0.0219484679 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Husband Amer-Indian-Eskimo Male United-States 0 -30 0.333333343 0.216871366 0.625 0.07298073 0 0.4848485 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male Cuba 1 -52 0.5777778 0.0733573362 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.0413166247 0.5625 0 0 0.909090936 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.05466002 0.6875 0 0 0.4848485 Local-gov Assoc-voc Never-married Protective-serv Unmarried White Male United-States 0 -23 0.25555557 0.109749079 0.5625 0 0.5456841 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -37 0.411111116 0.15188472 0.875 0 0 0.5050505 Private Masters Never-married Sales Not-in-family White Male United-States 0 -44 0.4888889 0.129124641 0.875 0 0.5544077 0.5555556 Self-emp-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.1185845 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -36 0.4 0.133755192 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -26 0.2888889 0.0235501342 0.625 0 0 0.121212125 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.314613342 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -23 0.25555557 0.177745074 0.5625 0 0 0.121212125 ? HS-grad Never-married ? Own-child Black Male England 0 -29 0.322222233 0.138063788 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.146539554 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried Black Female United-States 0 -52 0.5777778 0.0325606763 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -55 0.6111111 0.130079716 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -31 0.344444454 0.170642659 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 -19 0.211111113 0.173789412 0.5625 0 0 0.161616161 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -64 0.7111111 0.142358243 0.5625 0 0 0.3030303 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -55 0.6111111 0.128892273 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -48 0.533333361 0.100353271 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.0834516 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Female United-States 0 -50 0.5555556 0.07913761 0.5625 0.07298073 0 0.3030303 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -45 0.5 0.0217928812 0.8125 0 0 0.5151515 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -17 0.188888893 0.139088914 0.375 0 0 0.1010101 Private 10th Never-married Handlers-cleaners Other-relative White Male El-Salvador 0 -38 0.422222227 0.147321522 0.5625 0 0 0.25252524 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -43 0.477777779 0.035359215 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 1 -22 0.244444445 0.0921172947 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -63 0.7 0.147867754 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 -36 0.4 0.07682267 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -56 0.622222245 0.16659 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.209448352 0.9375 0 0 0.4040404 State-gov Prof-school Married-civ-spouse Prof-specialty Husband Black Male United-States 0 -41 0.455555558 0.115542144 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -41 0.455555558 0.146463439 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.2764785 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -59 0.655555546 0.09859939 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.111459181 0.75 0 0 0.444444448 Local-gov Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.124112874 0.8125 0 0 0.363636374 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.155820176 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Separated Prof-specialty Not-in-family White Male United-States 0 -53 0.5888889 0.06430166 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -47 0.5222222 0.164359257 0.5625 0 0 0.565656543 Private HS-grad Never-married Machine-op-inspct Unmarried Amer-Indian-Eskimo Male Puerto-Rico 0 -46 0.51111114 0.0313442759 0.875 0 0 0.4040404 Federal-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.138566256 0.5625 0 0 0.565656543 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.2584655 0.5625 0 0.4331956 0.3030303 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -32 0.355555564 0.221053347 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Unmarried White Female United-States 0 -90 1 0.0569493622 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -63 0.7 0.148899615 0.8125 0 0 0.4949495 Private Bachelors Married-civ-spouse Craft-repair Husband White Male ? 0 -23 0.25555557 0.08350682 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Own-child Asian-Pac-Islander Male United-States 0 -76 0.844444454 0.128661245 0.8125 0 0 0.3030303 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -23 0.25555557 0.113064885 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.1521373 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Adm-clerical Wife Other Female Mexico 1 -81 0.900000036 0.166519284 0.375 0.0293602925 0 0.282828271 Self-emp-inc 10th Married-civ-spouse Exec-managerial Wife White Female United-States 0 -17 0.188888893 0.0968482 0.375 0 0 0.121212125 Private 10th Never-married Other-service Own-child Black Female United-States 0 -56 0.622222245 0.119398132 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -58 0.644444466 0.087415345 0.375 0 0 0.4040404 Federal-gov 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.0211078972 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -25 0.2777778 0.159133971 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -36 0.4 0.0879770741 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female Philippines 1 -32 0.355555564 0.14021641 0.6875 0 0 0.24242425 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 -25 0.2777778 0.196711138 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 -29 0.322222233 0.09612145 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -23 0.25555557 0.0805985 0.5625 0 0 0.6060606 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -41 0.455555558 0.07868566 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.135499641 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -29 0.322222233 0.07970405 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -27 0.3 0.117060296 0.875 0 0 0.2020202 ? Masters Never-married ? Unmarried Asian-Pac-Islander Male Taiwan 0 -55 0.6111111 0.194824561 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.128585815 0.4375 0 0.379017442 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband Asian-Pac-Islander Male Vietnam 0 -45 0.5 0.09468615 0.625 0 0 0.4040404 Private Some-college Widowed Other-service Unmarried Black Female United-States 0 -50 0.5555556 0.117263705 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male Puerto-Rico 0 -22 0.244444445 0.213179722 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -80 0.8888889 0.0135387164 0.5625 0 0 0.323232323 Local-gov HS-grad Widowed Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 -30 0.333333343 0.126138866 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -20 0.222222224 0.1747795 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -29 0.322222233 0.122223608 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -56 0.622222245 0.120025195 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -63 0.7 0.12728186 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -20 0.222222224 0.136745691 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -38 0.422222227 0.0956567153 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -31 0.344444454 0.08017283 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.145605356 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 -47 0.5222222 0.120118812 0.375 0 0 0.464646459 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -25 0.2777778 0.164617211 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Tech-support Unmarried Asian-Pac-Islander Female Vietnam 0 -31 0.344444454 0.1340017 0.625 0 0 0.3838384 Private Some-college Separated Adm-clerical Unmarried Black Female United-States 0 -28 0.311111122 0.116595551 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -38 0.422222227 0.0446728468 0.5625 0 0 1 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.121971034 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 -39 0.433333337 0.09126392 0.5625 0 0.453856736 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.0902058 0.8125 0 0 0.363636374 Private Bachelors Never-married Prof-specialty Unmarried White Female ? 0 -26 0.2888889 0.0582492836 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -47 0.5222222 0.113010332 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -27 0.3 0.1404838 0.5625 0 0.518365443 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -43 0.477777779 0.1459529 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Protective-serv Husband Other Male United-States 0 -32 0.355555564 0.07978488 0.8125 0 0 0.5555556 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -20 0.222222224 0.20114097 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Male Philippines 0 -21 0.233333334 0.143314674 0.5 0 0 0.2020202 Local-gov 12th Never-married Handlers-cleaners Unmarried Black Female United-States 0 -32 0.355555564 0.107217938 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Male United-States 0 -37 0.411111116 0.160297841 0.6875 0 0 0.4848485 Private Assoc-voc Divorced Machine-op-inspct Not-in-family Black Male United-States 0 -45 0.5 0.108253159 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Vietnam 0 -37 0.411111116 0.123795636 0.75 0 0.4331956 0.4040404 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.1252343 0.3125 0 0 0.151515156 ? 9th Divorced ? Not-in-family White Female United-States 0 -24 0.266666681 0.108572409 0.8125 0 0 0.25252524 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -28 0.311111122 0.076537095 0.4375 0 0 0.3030303 ? 11th Never-married ? Not-in-family White Male United-States 0 -23 0.25555557 0.144501433 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -54 0.6 0.116515405 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -40 0.444444448 0.137240067 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -38 0.422222227 0.108534023 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -71 0.788888931 0.12131501 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.213777155 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -52 0.5777778 0.160212308 0.625 0 0 0.05050505 Self-emp-not-inc Some-college Never-married Adm-clerical Unmarried White Male United-States 0 -30 0.333333343 0.21759811 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -34 0.377777785 0.121971034 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.208204329 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family White Female United-States 0 -43 0.477777779 0.07135155 0.6875 0.135501355 0 0.4040404 Federal-gov Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 1 -43 0.477777779 0.0269575436 0.4375 0 0 0.424242437 Private 11th Never-married Transport-moving Not-in-family White Male United-States 0 -36 0.4 0.129616991 0.625 0.135501355 0 0.4040404 Federal-gov Some-college Never-married Exec-managerial Not-in-family Black Male United-States 1 -24 0.266666681 0.12407583 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -29 0.322222233 0.17256695 0.125 0 0 0.4040404 ? 1st-4th Never-married ? Own-child Asian-Pac-Islander Male Philippines 0 -55 0.6111111 0.1383588 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Wife Black Female United-States 0 -51 0.566666663 0.0149598746 0.875 0 0.43663913 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.132220209 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Exec-managerial Unmarried Amer-Indian-Eskimo Female United-States 0 -28 0.311111122 0.262485147 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 -54 0.6 0.0556110479 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -47 0.5222222 0.134072423 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.108061872 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.05121152 0.625 0 0 0.575757563 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 1 -38 0.422222227 0.126963273 0.625 0.06497065 0 0.353535354 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -60 0.6666667 0.06253431 0.1875 0 0 0.4040404 Self-emp-not-inc 5th-6th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -19 0.211111113 0.0195884034 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child Amer-Indian-Eskimo Female United-States 0 -22 0.244444445 0.157926321 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -55 0.6111111 0.07227564 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.0753624439 0.625 0 0 0.353535354 Private Some-college Separated Sales Other-relative Black Female United-States 0 -53 0.5888889 0.0979447141 0.125 0.07688077 0 0.676767647 Self-emp-not-inc 1st-4th Married-civ-spouse Exec-managerial Husband White Male Italy 1 -44 0.4888889 0.130278409 0.875 0.04386044 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -28 0.311111122 0.126811728 0.8125 0 0 0.5050505 Federal-gov Bachelors Never-married Protective-serv Not-in-family White Male United-States 0 -30 0.333333343 0.204407617 0.625 0 0 0.4040404 Local-gov Some-college Never-married Transport-moving Unmarried Black Female United-States 0 -39 0.433333337 0.0452527627 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Exec-managerial Own-child Amer-Indian-Eskimo Female United-States 0 -43 0.477777779 0.07712509 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -24 0.266666681 0.137516886 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Other-relative White Female United-States 0 -27 0.3 0.109767936 0.6875 0 0 0.565656543 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 0 -64 0.7111111 0.12978673 0.1875 0 0 0.7070707 Self-emp-not-inc 5th-6th Married-civ-spouse Farming-fishing Husband White Male Canada 0 -41 0.455555558 0.0600604154 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -28 0.311111122 0.110001653 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -61 0.677777767 0.086367324 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -27 0.3 0.165985838 0.4375 0 0 0.4040404 Private 11th Divorced Machine-op-inspct Unmarried White Female United-States 0 -49 0.544444442 0.03405862 0.625 0 0 0.323232323 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -20 0.222222224 0.07912414 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.212725088 0.8125 0 0.430670351 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.144729763 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.131686762 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -44 0.4888889 0.147270337 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Craft-repair Own-child White Male United-States 0 -51 0.566666663 0.0587355755 0.8125 0.07688077 0 0.2020202 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -40 0.444444448 0.110895433 0.625 0 0 0.3838384 Private Some-college Divorced Prof-specialty Unmarried Black Female United-States 0 -19 0.211111113 0.08698765 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 -54 0.6 0.21532695 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 0 -55 0.6111111 0.130244061 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -57 0.6333333 0.113062195 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Prof-specialty Not-in-family White Female United-States 0 -29 0.322222233 0.133314028 0.625 0 0 0.3030303 Private Some-college Separated Priv-house-serv Not-in-family White Female Guatemala 0 -51 0.566666663 0.06930939 0.5625 0 0 0.434343427 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -44 0.4888889 0.146094352 0.5625 0 0 0.373737365 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -35 0.3888889 0.223205954 0.6875 0 0 0.424242437 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 -40 0.444444448 0.115459979 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -46 0.51111114 0.0238471627 0.25 0 0 0.323232323 Private 7th-8th Separated Other-service Not-in-family White Female United-States 0 -25 0.2777778 0.1609505 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -33 0.366666675 0.1434642 0.8125 0 0.323232323 0.363636374 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -32 0.355555564 0.0187794883 0.625 0 0.506198347 0.4040404 Private Some-college Never-married Machine-op-inspct Other-relative White Female Holand-Netherlands 0 -22 0.244444445 0.22936745 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Female United-States 0 -39 0.433333337 0.0473090634 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife Asian-Pac-Islander Female Philippines 0 -18 0.2 0.0587113276 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child Asian-Pac-Islander Male United-States 0 -43 0.477777779 0.17091544 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -46 0.51111114 0.130955979 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Other-relative White Male United-States 0 -63 0.7 0.09284201 0.625 0.07298073 0 0.4848485 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.114937983 0.625 0 0 0.08080808 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -59 0.655555546 0.1228931 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.01813761 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.268755078 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -64 0.7111111 0.0337919 0.5625 0 0 0.1010101 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -36 0.4 0.147160545 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -48 0.533333361 0.110744558 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -43 0.477777779 0.08381194 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -18 0.2 0.04107281 0.375 0 0 0.3030303 Private 10th Never-married Other-service Own-child White Female United-States 0 -17 0.188888893 0.04773204 0.4375 0 0 0.161616161 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -36 0.4 0.101434968 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male ? 0 -53 0.5888889 0.153902635 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -36 0.4 0.0517052226 0.625 0 0 0.3939394 State-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -20 0.222222224 0.146950409 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -22 0.244444445 0.4144709 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -34 0.377777785 0.1012484 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.0345280729 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Own-child White Male United-States 0 -57 0.6333333 0.1331187 0.625 0 0 0.4040404 Private Some-college Widowed Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.154842213 0.375 0 0 0.4040404 Private 10th Divorced Other-service Unmarried White Female United-States 0 -37 0.411111116 0.112759776 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.1124358 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -38 0.422222227 0.205830112 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Unmarried White Male United-States 0 -34 0.377777785 0.203131944 0.5625 0 0 0.353535354 Private HS-grad Never-married Exec-managerial Unmarried White Female United-States 0 -47 0.5222222 0.1546745 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-spouse-absent Adm-clerical Not-in-family Black Female Puerto-Rico 0 -28 0.311111122 0.0346607566 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -25 0.2777778 0.139152229 0.375 0 0 0.24242425 Private 10th Never-married Other-service Not-in-family White Male Nicaragua 0 -25 0.2777778 0.119105145 0.625 0 0 0.6060606 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -50 0.5555556 0.1377021 0.875 0.1502415 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.0224313922 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.11722935 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.0262126159 0.5625 0 0.430670351 0.75757575 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -32 0.355555564 0.114512309 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.06632025 0.375 0 0 0.353535354 Private 10th Never-married Farming-fishing Unmarried White Male United-States 0 -19 0.211111113 0.127206415 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 -53 0.5888889 0.0928231552 0.625 0 0 0.4040404 Self-emp-inc Some-college Widowed Exec-managerial Not-in-family White Male United-States 1 -21 0.233333334 0.0292819124 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 -26 0.2888889 0.375317663 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -68 0.75555557 0.0220777877 0.5625 0 0.09618916 0.121212125 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.1089543 0.625 0 0.4708448 0.575757563 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.139871553 0.8125 0 0.5610652 0.5050505 Private Bachelors Never-married Exec-managerial Other-relative White Male United-States 1 -33 0.366666675 0.115319207 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Own-child White Male United-States 0 -49 0.544444442 0.0354211777 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family Black Male United-States 0 -24 0.266666681 0.123762637 0.4375 0 0 0.656565666 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.100698121 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -49 0.544444442 0.0660683438 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.08332565 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -30 0.333333343 0.12823087 0.625 0 0 0.373737365 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -51 0.566666663 0.225144386 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.231318682 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -52 0.5777778 0.140298575 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Other-relative White Male United-States 0 -23 0.25555557 0.18870011 0.5625 0 0 0.323232323 Local-gov HS-grad Never-married Other-service Own-child Black Male United-States 0 -23 0.25555557 0.117675908 0.375 0 0 0.6060606 Self-emp-not-inc 10th Never-married Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.124371514 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.09460398 0.4375 0 0 0.25252524 Private 11th Never-married Craft-repair Other-relative White Male United-States 0 -53 0.5888889 0.07329065 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.102816388 0.4375 0 0 0.25252524 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -69 0.7666667 0.181516871 0.5625 0 0 0.08080808 Private HS-grad Widowed Handlers-cleaners Not-in-family White Female United-States 0 -46 0.51111114 0.0224778671 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -33 0.366666675 0.16412285 0.5625 0 0 0.464646459 Private HS-grad Separated Tech-support Not-in-family White Male United-States 0 -40 0.444444448 0.151836231 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -56 0.622222245 0.145375013 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male ? 0 -29 0.322222233 0.131689459 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -41 0.455555558 0.04720938 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -22 0.244444445 0.127896115 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -28 0.311111122 0.04331298 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.06347052 0.8125 0 0 0.464646459 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.0419834256 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.175790474 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -17 0.188888893 0.09851654 0.375 0 0 0.1010101 Private 10th Never-married Other-service Own-child White Female United-States 0 -39 0.433333337 0.09918334 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.140060157 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Other-service Not-in-family Black Male United-States 0 -50 0.5555556 0.121645041 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -56 0.622222245 0.07071843 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -80 0.8888889 0.378752679 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -38 0.422222227 0.225207031 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Wife White Female United-States 0 -52 0.5777778 0.09615176 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband Black Male United-States 1 -26 0.2888889 0.148619428 0.8125 0 0 0.3838384 Local-gov Bachelors Never-married Prof-specialty Own-child Black Male England 0 -43 0.477777779 0.06498463 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Own-child Asian-Pac-Islander Female South 0 -45 0.5 0.03485137 0.8125 0 0 0.424242437 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -41 0.455555558 0.07743424 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -30 0.333333343 0.265349 0.75 0 0 0.25252524 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.0281793363 0.625 0.02407024 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.0963464156 0.625 0 0 0.2020202 Local-gov Some-college Divorced Other-service Unmarried White Female United-States 0 -44 0.4888889 0.1408859 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.123423845 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family Black Male United-States 0 -23 0.25555557 0.0693349838 0.8125 0 0.518365443 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 1 -33 0.366666675 0.287918478 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.228080332 0.4375 0 0 0.161616161 Private 11th Never-married Other-service Own-child White Male United-States 0 -38 0.422222227 0.060321074 0.625 0 0 0.4040404 Private Some-college Separated Prof-specialty Unmarried White Female Germany 0 -41 0.455555558 0.0219120979 0.6875 0 0 0.454545468 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -22 0.244444445 0.172403947 0.5 0 0 0.4848485 ? 12th Never-married ? Not-in-family White Male United-States 0 -66 0.733333349 0.0756891146 0.25 0 0 0.4040404 Self-emp-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 1 -70 0.7777778 0.233078629 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -58 0.644444466 0.09944939 0.375 0 0.453856736 0.353535354 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Wife White Female ? 1 -60 0.6666667 0.030251801 0.875 0 0 0.1010101 Self-emp-not-inc Masters Divorced Prof-specialty Unmarried White Female United-States 0 -24 0.266666681 0.07506542 0.375 0 0 0.656565666 Local-gov 10th Never-married Craft-repair Unmarried Black Male Haiti 0 -61 0.677777767 0.115463346 0.4375 0 0 0.363636374 Private 11th Divorced Other-service Unmarried White Female United-States 0 -35 0.3888889 0.128620833 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.0734186247 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -52 0.5777778 0.272413045 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -38 0.422222227 0.188703477 0.8125 0.07298073 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.109923519 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.129491046 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.122418262 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -41 0.455555558 0.123327531 0.5625 0 0 0.444444448 Private HS-grad Separated Machine-op-inspct Unmarried White Female Cuba 0 -37 0.411111116 0.225747213 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.05835705 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.121412672 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -38 0.422222227 0.0861214846 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Unmarried White Female United-States 0 -38 0.422222227 0.09836432 0.8125 0.03103031 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 1 -49 0.544444442 0.0687746 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -38 0.422222227 0.102536872 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male ? 1 -22 0.244444445 0.136555746 0.5625 0 0 0.5555556 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 -40 0.444444448 0.134237438 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.179474711 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.232543841 1 0 0 1 Federal-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.1380308 0.875 0 0 0.565656543 Private Masters Never-married Adm-clerical Not-in-family White Male United-States 0 -58 0.644444466 0.16490145 0.8125 0.04787048 0 0.4040404 Federal-gov Bachelors Separated Prof-specialty Not-in-family White Male United-States 1 -24 0.266666681 0.128279358 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -43 0.477777779 0.121329159 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -38 0.422222227 0.112200744 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 -42 0.466666669 0.02018044 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.128731966 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -18 0.2 0.255072236 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Female United-States 0 -37 0.411111116 0.07837112 0.5625 0.2782828 0 0.4848485 Private HS-grad Never-married Craft-repair Other-relative Amer-Indian-Eskimo Male United-States 1 -48 0.533333361 0.162071928 0.5625 0 0 0.656565666 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -40 0.444444448 0.157149062 0.25 0 0 0.25252524 Private 7th-8th Separated Other-service Not-in-family White Female United-States 0 -50 0.5555556 0.203884274 0.8125 0.07688077 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 -57 0.6333333 0.0197850764 0.5625 0 0 0.353535354 Private HS-grad Separated Sales Not-in-family Amer-Indian-Eskimo Female United-States 0 -36 0.4 0.09248571 0.625 0 0 0.6060606 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -41 0.455555558 0.09489158 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -90 1 0.152870774 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -66 0.733333349 0.102237821 0.25 0 0 0.1010101 Private 7th-8th Widowed Other-service Not-in-family Black Female United-States 0 -34 0.377777785 0.0380277559 0.5625 0 0.500229537 0.121212125 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Wife White Female United-States 0 -23 0.25555557 0.04909191 0.5625 0 0 0.01010101 Private HS-grad Never-married Craft-repair Own-child Asian-Pac-Islander Male Vietnam 0 -35 0.3888889 0.1762276 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -32 0.355555564 0.120303363 0.5625 0.02407024 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.199089378 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 1 -32 0.355555564 0.254485577 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.0380614325 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 0 -32 0.355555564 0.227449909 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.123772062 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -27 0.3 0.072638 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 -34 0.377777785 0.0152494945 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Not-in-family Amer-Indian-Eskimo Male United-States 0 -35 0.3888889 0.137798414 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Wife Black Female United-States 1 -29 0.322222233 0.07732243 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.128369614 0.5625 0 0 0.2020202 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 -33 0.366666675 0.148222044 1 0 0 0.4848485 State-gov Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 -22 0.244444445 0.153889164 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Own-child White Female United-States 0 -52 0.5777778 0.08646701 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.106145665 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.102492414 0.4375 0 0 0.1010101 Local-gov 11th Never-married Protective-serv Own-child White Male United-States 0 -63 0.7 0.228836715 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 1 -49 0.544444442 0.162214726 0.25 0 0 0.353535354 Private 7th-8th Divorced Other-service Unmarried White Female United-States 0 -58 0.644444466 0.06354461 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.1947296 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Other-service Unmarried White Female United-States 0 -59 0.655555546 0.118977845 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -49 0.544444442 0.05363153 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.14196828 0.8125 0 0 0.151515156 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -17 0.188888893 0.10909979 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 -20 0.222222224 0.33235088 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -36 0.4 0.05823312 0.6875 0 0.4331956 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -64 0.7111111 0.21030575 0.625 0 0 0.0303030312 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 0 -34 0.377777785 0.124878682 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -63 0.7 0.0680788457 0.75 0 0 0.353535354 Private Assoc-acdm Married-spouse-absent Adm-clerical Other-relative White Female United-States 0 -51 0.566666663 0.09914428 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 -40 0.444444448 0.112026967 0.625 0 0 0.353535354 State-gov Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 -55 0.6111111 0.1203229 0.3125 0 0 0.5555556 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.08531998 0.5625 0 0 0.464646459 Private HS-grad Divorced Craft-repair Not-in-family White Male ? 0 -30 0.333333343 0.106701337 0.8125 0 0 0.25252524 Private Bachelors Never-married Machine-op-inspct Not-in-family White Male United-States 0 -47 0.5222222 0.0559343435 0.8125 0 0 0.181818187 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -29 0.322222233 0.031392768 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family Black Male ? 0 -17 0.188888893 0.114716396 0.4375 0 0 0.08080808 ? 11th Never-married ? Own-child White Female United-States 0 -32 0.355555564 0.0250770357 0.9375 0.07688077 0 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.09555905 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.0549967848 0.625 0 0 0.565656543 Local-gov Some-college Divorced Exec-managerial Not-in-family White Male United-States 1 -50 0.5555556 0.119690448 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Not-in-family White Male United-States 0 -42 0.466666669 0.08405171 0.5625 0.07688077 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 -32 0.355555564 0.0872207 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -60 0.6666667 0.0770611 0.75 0 0 0.3030303 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -53 0.5888889 0.1276422 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.07518329 0.8125 0.0861408561 0 0.4040404 Private Bachelors Widowed Exec-managerial Unmarried White Male United-States 1 -45 0.5 0.165979773 0.8125 0 0 0.3030303 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -31 0.344444454 0.09945006 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 -32 0.355555564 0.298743516 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -37 0.411111116 0.189769015 0.625 0 0 0.3030303 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -28 0.311111122 0.177225783 0.625 0 0 0.6060606 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.19713816 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Not-in-family White Male Mexico 0 -47 0.5222222 0.06519679 0.5625 0 0 0.8080808 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.289992958 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.213562965 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Male United-States 0 -48 0.533333361 0.07311688 0.8125 1 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 -32 0.355555564 0.139691055 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -35 0.3888889 0.1260109 0.6875 0 0 0.424242437 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 -46 0.51111114 0.268730819 1 0 0.43663913 0.5252525 Local-gov Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 -38 0.422222227 0.16096127 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -49 0.544444442 0.274461925 0.5625 0 0 0.7070707 ? HS-grad Married-spouse-absent ? Not-in-family White Male United-States 0 -35 0.3888889 0.123795636 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -61 0.677777767 0.152884915 0.5625 0.0486504845 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Male United-States 0 -45 0.5 0.193432376 0.75 0 0 0.353535354 Private Assoc-acdm Divorced Adm-clerical Unmarried Black Male United-States 0 -31 0.344444454 0.07500682 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -52 0.5777778 0.175750747 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.123656891 0.625 0 0 0.5050505 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -64 0.7111111 0.033133857 0.4375 0 0 0.3030303 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -20 0.222222224 0.07921978 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -24 0.266666681 0.116182007 0.875 0 0 0.5050505 Private Masters Never-married Tech-support Not-in-family White Male United-States 0 -29 0.322222233 0.262485147 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.11747317 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -34 0.377777785 0.1278658 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -54 0.6 0.13372758 0.875 0 0 0.3838384 Private Masters Widowed Adm-clerical Unmarried White Female United-States 0 -21 0.233333334 0.0555645749 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -23 0.25555557 0.130052775 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -79 0.8777778 0.115996107 0.25 0.0296402965 0 0.3030303 Private 7th-8th Widowed Priv-house-serv Not-in-family White Female United-States 0 -55 0.6111111 0.140398934 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.157793641 0.5625 0 0 0.353535354 ? HS-grad Married-spouse-absent ? Not-in-family White Male United-States 0 -60 0.6666667 0.110277131 0.5625 0.02597026 0 0.4040404 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 -37 0.411111116 0.2923793 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Not-in-family Black Male United-States 0 -47 0.5222222 0.129354313 0.5625 0 0.365013778 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -20 0.222222224 0.120312117 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 -53 0.5888889 0.0652163252 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male Canada 0 -34 0.377777785 0.104173556 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -43 0.477777779 0.107931204 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Unmarried Black Female United-States 0 -24 0.266666681 0.111830972 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -23 0.25555557 0.125825 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Own-child Amer-Indian-Eskimo Male United-States 0 -29 0.322222233 0.109322727 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Not-in-family Other Male United-States 0 -58 0.644444466 0.12385828 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -55 0.6111111 0.182007879 0.75 0.07688077 0 0.4040404 ? Assoc-acdm Married-civ-spouse ? Husband Black Male United-States 1 -40 0.444444448 0.07532069 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Own-child White Female United-States 0 -43 0.477777779 0.118319131 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -25 0.2777778 0.07011292 0.875 0 0 0.4040404 State-gov Masters Never-married Exec-managerial Not-in-family White Male United-States 0 -23 0.25555557 0.07921978 0.8125 0 0 0.24242425 Local-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -34 0.377777785 0.136357054 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.07379917 0.625 0 0 0.353535354 Private Some-college Separated Sales Unmarried White Female United-States 0 -60 0.6666667 0.0680916458 1 0 0 0.656565666 Private Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 -39 0.433333337 0.159217492 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -21 0.233333334 0.09225739 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -45 0.5 0.112832516 0.5625 0 0.500229537 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.162307665 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -26 0.2888889 0.167448759 0.8125 0 0 0.7070707 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -39 0.433333337 0.1017192 0.625 0.00114001136 0 0.454545468 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -29 0.322222233 0.1592478 0.75 0.0861408561 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 1 -29 0.322222233 0.103163257 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Black Female United-States 0 -52 0.5777778 0.04158065 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 -34 0.377777785 0.163780019 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 -24 0.266666681 0.261927456 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -77 0.8555556 0.0572362877 1 0.200512 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Farming-fishing Husband White Male United-States 1 -34 0.377777785 0.05873827 0.875 0 0 0.6060606 Self-emp-not-inc Masters Married-civ-spouse Farming-fishing Husband White Male United-States 0 -53 0.5888889 0.11351683 0.3125 0 0 0.7070707 Self-emp-not-inc 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -31 0.344444454 0.120571427 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family Black Male United-States 0 -58 0.644444466 0.132445842 0.5625 0 0 0.151515156 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -50 0.5555556 0.0464051776 0.875 0.07688077 0 0.5555556 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.1053839 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.0241691116 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.123064183 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -77 0.8555556 0.231982112 0.3125 0 0 0.1010101 Private 9th Married-civ-spouse Priv-house-serv Wife Black Female United-States 0 -37 0.411111116 0.11940217 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -51 0.566666663 0.0476640165 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 -33 0.366666675 0.350290477 0.75 0 0 0.6060606 Self-emp-not-inc Assoc-acdm Divorced Sales Unmarried Black Male United-States 0 -53 0.5888889 0.216723189 0.5625 0 0 0.353535354 Local-gov HS-grad Married-spouse-absent Transport-moving Other-relative White Female United-States 0 -32 0.355555564 0.10669864 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -30 0.333333343 0.210592 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.140537009 0.625 0.005940059 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -33 0.366666675 0.0212035384 0.8125 0 0 0.24242425 Private Bachelors Married-spouse-absent Other-service Unmarried White Female United-States 0 -31 0.344444454 0.174803078 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.125438392 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -19 0.211111113 0.109755136 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child White Female United-States 0 -27 0.3 0.167922243 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.207608253 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -24 0.266666681 0.06941716 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.125174358 0.5625 0 0 0.545454562 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -31 0.344444454 0.113504708 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -60 0.6666667 0.133474335 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -21 0.233333334 0.238180652 0.375 0 0 0.3838384 Private 10th Separated Sales Unmarried Black Female United-States 0 -38 0.422222227 0.184066877 0.4375 0 0 0.323232323 ? 11th Never-married ? Not-in-family White Female United-States 0 -31 0.344444454 0.183247849 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Transport-moving Not-in-family White Male United-States 0 -26 0.2888889 0.0150386784 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -46 0.51111114 0.208264947 0.5625 0 0 0.25252524 Private HS-grad Divorced Priv-house-serv Not-in-family White Female United-States 0 -25 0.2777778 0.1002812 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.218654215 0.625 0 0 0.3030303 Local-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -53 0.5888889 0.03713802 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.142928064 0.875 0 0.4331956 0.4848485 ? Masters Married-civ-spouse ? Wife White Female United-States 1 -29 0.322222233 0.0801533 0.5625 0 0.500229537 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -45 0.5 0.1697839 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -70 0.7777778 0.212747991 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Male United-States 0 -55 0.6111111 0.2642444 0.8125 1 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.117385611 1 0 0.4331956 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.08542573 0.375 0 0 0.3030303 Private 10th Never-married Other-service Own-child White Male United-States 0 -18 0.2 0.0849131644 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -34 0.377777785 0.178962156 0.875 0 0 0.6060606 Private Masters Never-married Sales Unmarried White Male United-States 1 -41 0.455555558 0.190586016 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.2212682 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -23 0.25555557 0.190946355 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Protective-serv Own-child White Male United-States 0 -32 0.355555564 0.193085492 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Other-relative White Male United-States 0 -56 0.622222245 0.0919185951 0.25 0 0 0.4848485 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -36 0.4 0.08949859 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Unmarried White Male United-States 0 -26 0.2888889 0.212027311 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -62 0.6888889 0.0969505757 0.8125 0 0 0.07070707 Private Bachelors Widowed Tech-support Unmarried White Female United-States 0 -35 0.3888889 0.09050081 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -25 0.2777778 0.247049749 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.131725162 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -21 0.233333334 0.0226415358 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -31 0.344444454 0.110587627 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -23 0.25555557 0.256132364 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Other-service Own-child White Male Columbia 0 -58 0.644444466 0.128485456 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.141129047 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -54 0.6 0.1050734 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.0375151969 0.5625 0.03908039 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -28 0.311111122 0.123358518 0.4375 0.07688077 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -40 0.444444448 0.133891925 0.4375 0 0 0.3030303 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.183443174 0.8125 0.07298073 0 0.8080808 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.15927811 0.9375 0 0 0.1010101 Private Prof-school Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male India 0 -55 0.6111111 0.09649459 0.5625 0 0 0.25252524 Private HS-grad Divorced Adm-clerical Unmarried White Male United-States 0 -53 0.5888889 0.1295786 0.5625 0 0 0.454545468 Private HS-grad Separated Transport-moving Unmarried White Male United-States 0 -23 0.25555557 0.0670456439 0.5 0 0 0.464646459 Private 12th Never-married Transport-moving Not-in-family White Male United-States 0 -66 0.733333349 0.114120319 0.5625 0 0 0.161616161 Private HS-grad Widowed Craft-repair Not-in-family White Male United-States 0 -34 0.377777785 0.0232854337 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.08033381 0.375 0 0 0.4040404 Private 10th Divorced Transport-moving Not-in-family White Male United-States 0 -21 0.233333334 0.142520577 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -26 0.2888889 0.104253039 0.625 0 0 0.353535354 Private Some-college Married-spouse-absent Adm-clerical Own-child Other Female United-States 0 -21 0.233333334 0.143490463 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female Cuba 0 -59 0.655555546 0.154871851 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -61 0.677777767 0.118091471 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.15251717 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.03136044 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.108648524 0.5625 0 0 0.3030303 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -50 0.5555556 0.06615119 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -67 0.7444445 0.07972156 0.8125 0 0.5064279 0.05050505 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -59 0.655555546 0.122072734 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.239938572 0.75 0 0 0.8080808 Private Assoc-acdm Never-married Other-service Not-in-family White Female United-States 1 -56 0.622222245 0.0265237875 0.625 0.2782828 0 0.2020202 Self-emp-not-inc Some-college Married-spouse-absent Farming-fishing Not-in-family White Female United-States 1 -28 0.311111122 0.212356672 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative Black Male ? 0 -34 0.377777785 0.181667745 0.5625 0.0297702979 0 0.5050505 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -63 0.7 0.0229661781 0.375 0 0 0.565656543 Private 10th Widowed Farming-fishing Unmarried White Female United-States 0 -48 0.533333361 0.0342694335 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Germany 0 -41 0.455555558 0.240407363 0.625 0 0 0.444444448 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.186103642 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child Black Female United-States 0 -47 0.5222222 0.118491553 0.375 0 0.500229537 0.5252525 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.110868491 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -30 0.333333343 0.1511829 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -19 0.211111113 0.06254643 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Male United-States 0 -27 0.3 0.120943218 0.8125 0 0 0.373737365 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -59 0.655555546 0.020971844 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -19 0.211111113 0.134366766 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -45 0.5 0.118045 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband Asian-Pac-Islander Male India 0 -37 0.411111116 0.14857161 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -44 0.4888889 0.156120583 1 0 0 0.3838384 Local-gov Doctorate Married-spouse-absent Prof-specialty Unmarried White Female United-States 0 -34 0.377777785 0.128875434 0.8125 0 0 0.3838384 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male United-States 0 -30 0.333333343 0.1255603 0.8125 0 0 0.353535354 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -30 0.333333343 0.2210823 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Hong 1 -56 0.622222245 0.188145131 0.4375 0 0 0.4040404 Private 11th Separated Other-service Not-in-family Black Female United-States 0 -19 0.211111113 0.11751695 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -37 0.411111116 0.102223 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.09809087 0.875 0 0.453856736 0.434343427 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.08104371 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -34 0.377777785 0.165985167 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.09707855 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Other-relative White Male United-States 0 -44 0.4888889 0.09801409 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.2101798 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -32 0.355555564 0.158851087 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Other-relative White Female United-States 0 -37 0.411111116 0.126454756 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.2670443 0.8125 0 0 0.4848485 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -49 0.544444442 0.1762559 0.5625 0.0501305 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.0265891217 0.625 0 0 0.3030303 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.0963545 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.146067411 0.1875 0 0 0.4848485 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -44 0.4888889 0.155311659 0.8125 0 0 0.353535354 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -30 0.333333343 0.0271690339 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.07776427 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -36 0.4 0.252563983 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -29 0.322222233 0.192239538 0.5 0 0 0.4040404 Private 12th Never-married Tech-support Not-in-family White Male United-States 0 -19 0.211111113 0.259917647 0.625 0 0 0.222222224 ? Some-college Never-married ? Own-child White Male United-States 0 -45 0.5 0.126342267 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 -38 0.422222227 0.201411054 0.8125 0 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.04629135 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Asian-Pac-Islander Male United-States 0 -27 0.3 0.224953786 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Own-child White Female United-States 0 -20 0.222222224 0.07932013 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -43 0.477777779 0.124184944 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -21 0.233333334 0.156658053 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -33 0.366666675 0.09688861 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -36 0.4 0.06036351 0.5625 0 0 0.8080808 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.13638939 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Other-service Husband White Male Dominican-Republic 0 -72 0.8 0.181087151 0.25 0 0 1 Private 7th-8th Widowed Other-service Not-in-family White Female ? 0 -54 0.6 0.231185317 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.310100675 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -63 0.7 0.138240263 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -36 0.4 0.155134529 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.133272946 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -72 0.8 0.135633 0.75 0 0 0.4040404 ? Assoc-acdm Widowed ? Not-in-family White Female United-States 0 -55 0.6111111 0.130861014 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.129193351 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.06409893 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -20 0.222222224 0.09286424 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -47 0.5222222 0.260075927 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -71 0.788888931 0.0730044 0.625 0.0343203433 0 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -41 0.455555558 0.102733545 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -35 0.3888889 0.1447365 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Other Male Dominican-Republic 0 -18 0.2 0.0900205746 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.09937867 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -57 0.6333333 0.0492023677 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -56 0.622222245 0.0405238755 0.125 0 0 0.656565666 Self-emp-not-inc 1st-4th Never-married Exec-managerial Not-in-family Amer-Indian-Eskimo Male United-States 0 -25 0.2777778 0.30641374 0.625 0 0 0.353535354 Self-emp-inc Some-college Never-married Sales Own-child White Female United-States 0 -64 0.7111111 0.227893755 0.6875 0 0 0.151515156 ? Assoc-voc Married-civ-spouse ? Wife White Female United-States 0 -35 0.3888889 0.125022143 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -61 0.677777767 0.06836375 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -36 0.4 0.0245146342 0.8125 0 0 0.5555556 State-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -18 0.2 0.186259225 0.5 0 0 0.151515156 Private 12th Never-married Sales Own-child Black Female United-States 0 -21 0.233333334 0.197997585 0.625 0 0 0.2020202 Private Some-college Married-spouse-absent Sales Own-child Black Female United-States 0 -43 0.477777779 0.0239259657 0.75 0 0 0.353535354 ? Assoc-acdm Divorced ? Not-in-family White Female United-States 0 -32 0.355555564 0.125946239 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -52 0.5777778 0.156348914 0.5 0 0 0.454545468 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -48 0.533333361 0.1191597 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.07135155 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -35 0.3888889 0.0712740943 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.0232409816 0.625 0 0 0.25252524 ? Some-college Separated ? Unmarried White Female United-States 0 -42 0.466666669 0.119938977 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -60 0.6666667 0.07877727 0.25 0 0 0.2020202 ? 7th-8th Widowed ? Unmarried White Female United-States 0 -34 0.377777785 0.129271477 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -27 0.3 0.0881030262 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 -47 0.5222222 0.06337959 0.8125 0 0 0.656565666 Self-emp-not-inc Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 -65 0.722222269 0.0975426137 0.3125 0 0 0.454545468 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -61 0.677777767 0.0688291639 0.875 0 0 1 Self-emp-inc Masters Widowed Exec-managerial Unmarried White Female United-States 0 -18 0.2 0.0612471849 0.625 0 0 0.282828271 Private Some-college Never-married Sales Own-child White Male United-States 0 -49 0.544444442 0.199967 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male Puerto-Rico 0 -48 0.533333361 0.116685137 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.174289167 0.625 0.0217402168 0 0.75757575 Private Some-college Never-married Transport-moving Not-in-family Black Male United-States 0 -30 0.333333343 0.127809227 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -68 0.75555557 0.04664159 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -23 0.25555557 0.08962117 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -65 0.722222269 0.11800459 0.5625 0 0 0.24242425 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.018219782 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -44 0.4888889 0.0406909138 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.21375291 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -24 0.266666681 0.1739726 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 -58 0.644444466 0.117221944 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 -32 0.355555564 0.119596824 0.625 0 0 0.5050505 Local-gov Some-college Married-spouse-absent Prof-specialty Not-in-family White Male Germany 0 -54 0.6 0.10927289 0.875 0 0 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 1 -35 0.3888889 0.0589719862 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -35 0.3888889 0.09720585 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 -24 0.266666681 0.127981663 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -50 0.5555556 0.12337333 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.101920582 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Separated Craft-repair Not-in-family White Male United-States 0 -57 0.6333333 0.0319201462 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.07215238 0.625 0 0 0.6060606 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -49 0.544444442 0.178685337 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -25 0.2777778 0.127445519 0.8125 0 0 0.161616161 Private Bachelors Never-married Tech-support Own-child White Female United-States 0 -56 0.622222245 0.09967569 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Transport-moving Not-in-family White Male United-States 0 -32 0.355555564 0.1250969 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Unmarried White Female United-States 0 -22 0.244444445 0.103398323 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -23 0.25555557 0.129258 0.625 0 0 0.4040404 ? Some-college Never-married ? Other-relative White Male United-States 0 -33 0.366666675 0.145581111 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.1366413 0.625 0 0 0.121212125 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -62 0.6888889 0.0266921725 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.0769796 0.3125 0 0 0.4040404 ? 9th Never-married ? Own-child White Male United-States 0 -26 0.2888889 0.139233723 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Protective-serv Own-child White Male United-States 0 -46 0.51111114 0.241519362 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Male United-States 1 -33 0.366666675 0.2541131 0.8125 0 0 0.5050505 Private Bachelors Separated Sales Not-in-family White Female United-States 1 -65 0.722222269 0.0512175821 0.5625 0 0 0.01010101 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -65 0.722222269 0.116487116 0.5625 0.02414024 0 0.2020202 Without-pay HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -46 0.51111114 0.07420397 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.1507781 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 -43 0.477777779 0.11009258 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.1238576 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.03167094 0.5625 0 0 0.4848485 Private HS-grad Widowed Handlers-cleaners Other-relative White Female United-States 0 -55 0.6111111 0.0979325846 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.260707676 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -56 0.622222245 0.07096561 0.8125 0.04508045 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -59 0.655555546 0.131653771 0.875 0 0 0.4040404 Federal-gov Masters Never-married Exec-managerial Not-in-family White Male United-States 0 -56 0.622222245 0.114647023 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.105614923 0.5625 0 0 0.1010101 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -26 0.2888889 0.171881288 0.4375 0.03411034 0 0.4040404 Private 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.184305981 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -27 0.3 0.1287643 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -48 0.533333361 0.124460414 0.25 0 0 0.5050505 Self-emp-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 1 -37 0.411111116 0.161250219 0.875 0 0 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -63 0.7 0.272476345 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.01598971 0.5625 0 0 0.3838384 State-gov HS-grad Never-married Transport-moving Not-in-family Amer-Indian-Eskimo Male United-States 1 -20 0.222222224 0.2573932 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Male United-States 0 -26 0.2888889 0.110788338 0.875 0 0.4331956 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.153851435 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child Black Male United-States 0 -51 0.566666663 0.11351683 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.127654985 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.06022678 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Not-in-family Amer-Indian-Eskimo Female Columbia 0 -35 0.3888889 0.151216581 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -21 0.233333334 0.211924255 0.625 0 0 0.434343427 ? Some-college Never-married ? Not-in-family White Female United-States 0 -65 0.722222269 0.0577805042 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.188509509 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Transport-moving Husband Black Male United-States 0 -39 0.433333337 0.130858988 0.25 0 0.3677686 0.353535354 Private 7th-8th Never-married Other-service Own-child White Male United-States 0 -24 0.266666681 0.0949953049 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -36 0.4 0.14972268 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family Asian-Pac-Islander Female United-States 0 -70 0.7777778 0.276809216 0.625 0 0 0.1010101 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -52 0.5777778 0.026129771 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 -64 0.7111111 0.123242669 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -43 0.477777779 0.150384754 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.04517059 0.6875 0.005940059 0 0.25252524 Private Assoc-voc Never-married Priv-house-serv Not-in-family White Male United-States 0 -47 0.5222222 0.108201295 0.5625 0 0 0.4040404 Federal-gov HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -32 0.355555564 0.0308451857 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -20 0.222222224 0.0744909 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 -33 0.366666675 0.11245399 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -52 0.5777778 0.214840665 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female Cuba 0 -49 0.544444442 0.205870524 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.0814013556 0.5625 0 0 0.181818187 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -62 0.6888889 0.106898 0.5625 0 0 0.0606060624 Self-emp-not-inc HS-grad Never-married Other-service Unmarried White Female United-States 0 -44 0.4888889 0.205111459 0.625 0 0 0.5555556 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.220604777 0.5625 0.03908039 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -68 0.75555557 0.157576084 0.875 0 0 0.4040404 Local-gov Masters Widowed Prof-specialty Unmarried Black Female United-States 1 -40 0.444444448 0.0181046072 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -46 0.51111114 0.04765526 0.25 0 0 0.5050505 Private 7th-8th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -22 0.244444445 0.124378249 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -37 0.411111116 0.1652665 0.8125 0 0 0.151515156 Self-emp-not-inc Bachelors Divorced Tech-support Not-in-family White Male United-States 0 -62 0.6888889 0.170180619 0.875 0 0 0.7070707 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -37 0.411111116 0.0582950823 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.162994 0.5625 0.04787048 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 1 -44 0.4888889 0.07200084 0.5625 0 0 0.686868668 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -41 0.455555558 0.13755931 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.08605885 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Male United-States 0 -26 0.2888889 0.07894969 0.8125 0 0 0.454545468 Private Bachelors Divorced Other-service Not-in-family White Female United-States 0 -48 0.533333361 0.145071924 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 -21 0.233333334 0.133393511 0.5625 0 0 0.282828271 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -39 0.433333337 0.116842069 0.9375 0.07688077 0 0.4040404 Private Prof-school Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.146392047 0.6875 0.143441439 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 1 -44 0.4888889 0.253934622 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -56 0.622222245 0.06728205 0.375 0 0 0.3030303 Private 10th Married-civ-spouse Sales Wife Asian-Pac-Islander Female Japan 1 -25 0.2777778 0.115030259 0.3125 0 0 0.4040404 Private 9th Never-married Transport-moving Other-relative White Male United-States 0 -32 0.355555564 0.168777645 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.133877769 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 1 -26 0.2888889 0.20644708 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -31 0.344444454 0.120308749 0.8125 0.14084141 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 1 -23 0.25555557 0.07362203 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Own-child White Male United-States 0 -41 0.455555558 0.07205607 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Prof-specialty Unmarried White Female United-States 1 -55 0.6111111 0.267311 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -23 0.25555557 0.231883109 0.625 0 0 0.25252524 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -45 0.5 0.13716732 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -42 0.466666669 0.15349178 0.8125 0 0.3409091 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.0726151 0.625 0 0 0.151515156 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -48 0.533333361 0.124700196 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.0963612348 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 -52 0.5777778 0.07729347 0.8125 0.1502415 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -46 0.51111114 0.179387152 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Unmarried White Male United-States 0 -34 0.377777785 0.216734648 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -27 0.3 0.0143503258 0.75 0 0 0.4040404 State-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Female Germany 0 -18 0.2 0.183157608 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -18 0.2 0.10032431 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Female United-States 0 -42 0.466666669 0.1324344 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -64 0.7111111 0.0727969557 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -36 0.4 0.134329051 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.204805672 0.4375 0 0 0.2020202 ? 11th Never-married ? Own-child Black Female United-States 0 -52 0.5777778 0.0548499562 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Sales Husband White Male United-States 1 -44 0.4888889 0.237738147 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -53 0.5888889 0.2526657 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.139099017 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.222580254 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Other-relative Asian-Pac-Islander Male United-States 0 -52 0.5777778 0.140298575 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -60 0.6666667 0.09111911 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -41 0.455555558 0.11558862 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -64 0.7111111 0.100826763 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.04805736 0.125 0 0 0.25252524 Private 1st-4th Never-married Other-service Other-relative White Male El-Salvador 0 -63 0.7 0.05707329 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male South 0 -54 0.6 0.2526657 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.139491 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -27 0.3 0.134244859 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male Poland 0 -63 0.7 0.195150554 0.875 0.413104117 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Farming-fishing Husband White Male United-States 0 -37 0.411111116 0.162212029 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -22 0.244444445 0.190946355 0.5625 0 0 0.353535354 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -54 0.6 0.06585685 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.0146143511 0.375 0 0 0.4040404 Private 10th Divorced Other-service Unmarried White Female United-States 0 -60 0.6666667 0.156676248 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -19 0.211111113 0.118420832 0.4375 0 0 0.25252524 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -25 0.2777778 0.0431035124 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -51 0.566666663 0.123246707 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -47 0.5222222 0.256028652 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -44 0.4888889 0.0750876442 0.375 0 0 0.5050505 Self-emp-not-inc 10th Never-married Craft-repair Own-child White Male United-States 0 -18 0.2 0.0208849572 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 -57 0.6333333 0.06489235 0.5625 0 0 0.575757563 Private HS-grad Widowed Prof-specialty Not-in-family White Female United-States 0 -22 0.244444445 0.213866055 0.625 0 0 0.343434334 Private Some-college Never-married Sales Own-child White Male United-States 0 -36 0.4 0.150211662 0.625 0 0 0.2020202 State-gov Some-college Divorced Other-service Unmarried Black Female United-States 0 -33 0.366666675 0.117193654 0.5625 0 0.3409091 0.3838384 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -39 0.433333337 0.07750765 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -49 0.544444442 0.0902327448 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband Other Male United-States 1 -41 0.455555558 0.11709936 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 -35 0.3888889 0.130154476 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -40 0.444444448 0.03411048 0.75 0.01506015 0 0.4040404 Self-emp-inc Assoc-acdm Divorced Sales Unmarried White Female United-States 0 -30 0.333333343 0.120455578 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -25 0.2777778 0.119227052 0.5625 0 0.3452709 0.373737365 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -25 0.2777778 0.170584053 0.625 0 0.43663913 0.363636374 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -37 0.411111116 0.136072159 0.875 0.07688077 0 0.5050505 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 -53 0.5888889 0.216787174 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 -34 0.377777785 0.2166821 0.75 0 0 0.25252524 Self-emp-not-inc Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 -22 0.244444445 0.112056606 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Male ? 0 -18 0.2 0.14182885 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 -52 0.5777778 0.06261715 0.875 0.1502415 0 0.4040404 ? Masters Married-civ-spouse ? Wife White Female United-States 1 -45 0.5 0.319670916 0.5625 0.0545505434 0 0.4040404 Private HS-grad Divorced Sales Unmarried Black Male United-States 0 -19 0.211111113 0.17807579 0.625 0 0.459366381 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -33 0.366666675 0.0976281539 0.8125 0 0 0.656565666 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -45 0.5 0.06115895 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -43 0.477777779 0.08533749 0.8125 0 0 0.353535354 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.120170005 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.132804841 0.8125 0 0 0.75757575 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -25 0.2777778 0.122736171 0.5625 0 0.3624885 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.0792117 0.8125 0 0 0.323232323 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -52 0.5777778 0.235401645 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Unmarried White Male United-States 0 -45 0.5 0.0548843034 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male Puerto-Rico 1 -32 0.355555564 0.11422 1 0 0 0.7070707 State-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 -26 0.2888889 0.326743037 0.8125 0 0 0.2020202 Private Bachelors Never-married Transport-moving Own-child White Male United-States 0 -24 0.266666681 0.0239798483 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family Black Male United-States 0 -37 0.411111116 0.118131213 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried Black Female United-States 0 -49 0.544444442 0.12459445 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -43 0.477777779 0.117461048 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -35 0.3888889 0.126429826 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -37 0.411111116 0.12788938 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.1509209 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 -48 0.533333361 0.107580967 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -40 0.444444448 0.0441468172 0.875 0 0 0.5555556 ? Masters Divorced ? Own-child White Female United-States 0 -26 0.2888889 0.307547957 0.625 0.02597026 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -35 0.3888889 0.136321366 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 1 -21 0.233333334 0.139206782 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 -54 0.6 0.14953813 0.375 0 0 0.7070707 Private 10th Divorced Other-service Not-in-family White Male United-States 0 -40 0.444444448 0.0924789757 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family Black Female United-States 0 -51 0.566666663 0.09540279 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Not-in-family Black Female United-States 0 -60 0.6666667 0.146887764 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 -22 0.244444445 0.03542522 0.625 0 0 0.08080808 Private Some-college Never-married Sales Own-child White Male United-States 0 -20 0.222222224 0.133357808 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -21 0.233333334 0.128944144 0.4375 0 0 0.4040404 Private 11th Never-married Farming-fishing Unmarried White Male United-States 0 -21 0.233333334 0.02745798 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -43 0.477777779 0.11623656 0.625 0 0 0.444444448 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.162994 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -65 0.722222269 0.14542149 0.5625 0 0.499081731 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -48 0.533333361 0.142870128 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -37 0.411111116 0.07350484 0.875 0.2782828 0 0.6060606 Private Masters Separated Exec-managerial Not-in-family White Male Iran 1 -20 0.222222224 0.1511573 0.5 0 0 0.4040404 Private 12th Never-married Machine-op-inspct Own-child White Male United-States 0 -41 0.455555558 0.144799814 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -55 0.6111111 0.09907558 0.3125 0 0 0.5050505 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.10091769 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -41 0.455555558 0.170922846 0.625 0.07298073 0 0.4040404 Federal-gov Some-college Married-civ-spouse Transport-moving Wife White Female United-States 1 -80 0.8888889 0.170044556 0.6875 0 0 0.24242425 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.08938947 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -52 0.5777778 0.09358358 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.188973576 0.8125 0.03103031 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.09724491 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-spouse-absent Prof-specialty Not-in-family Black Male United-States 0 -69 0.7666667 0.444843262 0.5625 0 0 0.2020202 Local-gov HS-grad Widowed Adm-clerical Not-in-family Black Female United-States 0 -49 0.544444442 0.11935772 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.132971868 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.0213624928 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.199938044 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.1304771 0.5625 0 0 0.4040404 Local-gov HS-grad Married-spouse-absent Handlers-cleaners Unmarried White Male United-States 0 -42 0.466666669 0.0718647838 0.625 0 0 0.323232323 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -66 0.733333349 0.144452274 0.5625 0 0 0.13131313 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.125141367 0.6875 0 0 0.4848485 Private Assoc-voc Separated Craft-repair Other-relative White Male United-States 1 -26 0.2888889 0.224359721 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -43 0.477777779 0.02371515 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.0948639661 0.375 0 0.0355831049 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family White Female United-States 0 -25 0.2777778 0.2258873 0.8125 0 0 0.3030303 ? Bachelors Never-married ? Own-child White Female United-States 0 -17 0.188888893 0.114807323 0.4375 0 0 0.08080808 Private 11th Never-married Sales Own-child White Female United-States 0 -52 0.5777778 0.200858086 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.06320044 0.5625 0 0 0.08080808 ? HS-grad Separated ? Own-child White Female United-States 0 -24 0.266666681 0.27238813 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -41 0.455555558 0.139365062 0.8125 0 0 0.3030303 ? Bachelors Married-spouse-absent ? Not-in-family White Male United-States 0 -65 0.722222269 0.0964333 0.625 0 0 0.454545468 Private Some-college Widowed Sales Other-relative White Female United-States 0 -36 0.4 0.2756029 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.192462474 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -43 0.477777779 0.158655092 0.625 0 0 0.454545468 Private Some-college Married-spouse-absent Sales Not-in-family White Male Mexico 0 -39 0.433333337 0.114758156 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female England 1 -48 0.533333361 0.131633565 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 1 -50 0.5555556 0.128732651 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 -21 0.233333334 0.155694231 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Male United-States 0 -36 0.4 0.031864915 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -33 0.366666675 0.144564077 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Other-service Husband Black Male Haiti 0 -50 0.5555556 0.0438875072 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -49 0.544444442 0.285054624 0.875 1 0 0.8080808 State-gov Masters Married-civ-spouse Sales Husband White Male United-States 1 -34 0.377777785 0.177346349 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Unmarried Black Male ? 0 -70 0.7777778 0.18380487 1 0 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.1568352 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -44 0.4888889 0.297725827 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -32 0.355555564 0.08612822 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 -40 0.444444448 0.1910979 0.3125 0 0 0.4949495 Private 9th Never-married Craft-repair Other-relative Black Male United-States 0 -46 0.51111114 0.272048 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 -21 0.233333334 0.154003 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 -40 0.444444448 0.119233787 0.8125 0.07688077 0 0.5252525 Private Bachelors Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Japan 1 -47 0.5222222 0.168339849 0.4375 0 0 0.08080808 Private 11th Divorced Craft-repair Own-child White Male United-States 0 -19 0.211111113 0.3590929 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -22 0.244444445 0.09285481 0.625 0 0 0.161616161 Private Some-college Never-married Adm-clerical Other-relative White Female United-States 0 -20 0.222222224 0.168075815 0.625 0 0 0.161616161 Private Some-college Never-married Protective-serv Own-child White Female United-States 0 -46 0.51111114 0.155572325 0.8125 0.04787048 0 0.25252524 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 -41 0.455555558 0.09235909 0.8125 0 0.453856736 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.0992379 0.375 0 0 0.151515156 Private 10th Never-married Prof-specialty Own-child Other Female United-States 0 -41 0.455555558 0.172860608 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -28 0.311111122 0.0752311051 0.5625 0 0.453168035 0.4040404 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 -20 0.222222224 0.101086751 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Male United-States 0 -24 0.266666681 0.192265138 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -33 0.366666675 0.2046649 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -44 0.4888889 0.0765114948 0.625 0 0 0.5555556 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.102125339 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Prof-specialty Own-child Black Female United-States 0 -47 0.5222222 0.017609559 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.118669368 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -58 0.644444466 0.334917039 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -41 0.455555558 0.0276755318 0.5625 0 0.459595948 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.190247223 0.25 0 0 0.353535354 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 1 -21 0.233333334 0.151909634 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -33 0.366666675 0.137056187 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -23 0.25555557 0.199779078 0.625 0 0 0.323232323 ? Some-college Never-married ? Own-child White Female United-States 0 -40 0.444444448 0.06693114 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Unmarried White Female United-States 0 -47 0.5222222 0.0738901 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -41 0.455555558 0.0976268053 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried Black Female United-States 0 -38 0.422222227 0.4161756 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -50 0.5555556 0.0258031059 0.25 0 0 0.4040404 Private 7th-8th Divorced Other-service Other-relative White Female United-States 0 -45 0.5 0.167705372 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Farming-fishing Other-relative Black Male United-States 0 -65 0.722222269 0.100444868 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male Italy 1 -33 0.366666675 0.04668335 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -34 0.377777785 0.09683136 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 -65 0.722222269 0.143784121 0.875 0 0 0.282828271 Private Masters Divorced Sales Not-in-family White Male United-States 0 -24 0.266666681 0.1856874 0.4375 0 0 0.3939394 Private 11th Never-married Transport-moving Own-child White Male United-States 0 -26 0.2888889 0.03998572 0.8125 0 0 0.4040404 Private Bachelors Never-married Machine-op-inspct Other-relative White Male United-States 0 -55 0.6111111 0.0239448249 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -66 0.733333349 0.1594822 0.8125 0 0 0.08080808 Private Bachelors Divorced Prof-specialty Unmarried White Female Cuba 0 -43 0.477777779 0.130500674 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.212359369 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Other-relative Black Female United-States 0 -22 0.244444445 0.195664465 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.172586471 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -69 0.7666667 0.134431422 0.9375 0 0 0.25252524 ? Prof-school Married-civ-spouse ? Wife White Female ? 0 -27 0.3 0.120366678 0.875 0 0 0.4040404 Private Masters Never-married Machine-op-inspct Not-in-family White Female United-States 0 -48 0.533333361 0.302655429 0.5625 0.04386044 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -24 0.266666681 0.126582056 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 -18 0.2 0.10583315 0.4375 0 0 0.1010101 Never-worked 11th Never-married ? Own-child White Female United-States 0 -53 0.5888889 0.127144456 0.5625 0 0 0.3030303 Local-gov HS-grad Widowed Other-service Not-in-family White Female United-States 0 -26 0.2888889 0.106160484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Poland 0 -60 0.6666667 0.06472599 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -21 0.233333334 0.08238809 0.625 0 0 0.6060606 Private Some-college Never-married Other-service Own-child White Female United-States 0 -39 0.433333337 0.2756029 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 -45 0.5 0.118491553 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -76 0.844444454 0.1595455 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.145919219 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -34 0.377777785 0.202519029 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband Black Male Jamaica 1 -54 0.6 0.220763728 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.13115266 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.0210486259 0.25 0 0 0.4040404 Local-gov 7th-8th Divorced Handlers-cleaners Not-in-family White Male United-States 0 -27 0.3 0.143130124 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -23 0.25555557 0.0155162141 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 -37 0.411111116 0.0195688717 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -41 0.455555558 0.0624588728 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.124387 0.625 0 0 0.353535354 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -37 0.411111116 0.02190873 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male England 1 -63 0.7 0.08483436 0.5625 0.0217402168 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -35 0.3888889 0.0496495962 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.14091149 0.3125 0 0 0.565656543 Private 9th Married-civ-spouse Machine-op-inspct Husband Black Male ? 0 -41 0.455555558 0.193329319 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 -50 0.5555556 0.0435554534 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Prof-specialty Not-in-family Asian-Pac-Islander Female Vietnam 0 -26 0.2888889 0.246959507 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Sales Own-child White Male United-States 0 -36 0.4 0.07633638 0.625 0 0 0.424242437 Local-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -47 0.5222222 0.260973066 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male Scotland 1 -51 0.566666663 0.2588043 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Unmarried Black Female United-States 0 -41 0.455555558 0.22408694 0.5625 0 0.143480256 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family Other Female United-States 0 -40 0.444444448 0.133947819 0.9375 0.1502415 0 0.3030303 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 -32 0.355555564 0.214055315 0.8125 0.0406404063 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.108378433 0.8125 0.07298073 0 0.4040404 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -40 0.444444448 0.123006932 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -56 0.622222245 0.180272847 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.2762744 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.2461169 0.3125 0 0 0.424242437 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.138301551 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.06802631 0.4375 0 0 0.3030303 Self-emp-not-inc 11th Never-married Adm-clerical Own-child White Female United-States 0 -44 0.4888889 0.132997468 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -42 0.466666669 0.134129673 0.9375 0.07430074 0 0.444444448 Self-emp-not-inc Prof-school Divorced Prof-specialty Unmarried White Female United-States 1 -47 0.5222222 0.1293038 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.0337966122 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -61 0.677777767 0.0487921871 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 1 -21 0.233333334 0.1673814 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -26 0.2888889 0.119983435 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 -58 0.644444466 0.238447368 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -35 0.3888889 0.09671214 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Prof-specialty Not-in-family Asian-Pac-Islander Female Philippines 0 -35 0.3888889 0.148111582 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family Black Female United-States 0 -29 0.322222233 0.282697231 0.75 0.0367403664 0 0.4040404 Local-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 -40 0.444444448 0.103976212 0.875 0.07688077 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.08931135 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.01982212 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Machine-op-inspct Unmarried White Male United-States 0 -50 0.5555556 0.020698389 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 -66 0.733333349 0.1419979 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -36 0.4 0.169118449 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -33 0.366666675 0.14752695 0.4375 0 0 0.4040404 Private 11th Never-married Sales Not-in-family White Female United-States 0 -55 0.6111111 0.0240606721 0.875 0 0 0.6060606 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.241722092 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -36 0.4 0.167513415 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 -41 0.455555558 0.0524932556 0.5 0 0 0.4040404 ? 12th Divorced ? Not-in-family White Female Canada 0 -30 0.333333343 0.0202484671 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -29 0.322222233 0.170942381 0.5 0 0 0.424242437 Private 12th Never-married Exec-managerial Not-in-family White Male England 0 -60 0.6666667 0.0279873777 0.625 0 0 0.4040404 ? Some-college Widowed ? Not-in-family Black Female United-States 0 -24 0.266666681 0.0398368724 0.5625 0 0 0.4848485 Private HS-grad Separated Sales Unmarried White Female United-States 0 -42 0.466666669 0.231432512 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Separated Other-service Unmarried Black Female United-States 0 -26 0.2888889 0.145490184 0.5625 0 0 0.4040404 Private HS-grad Separated Exec-managerial Own-child White Female United-States 0 -37 0.411111116 0.110813938 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -27 0.3 0.101675421 0.1875 0 0 0.4848485 Private 5th-6th Never-married Farming-fishing Unmarried White Male Guatemala 0 -26 0.2888889 0.164675817 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.134259671 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Craft-repair Unmarried White Male United-States 0 -60 0.6666667 0.10195224 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.0799492151 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -46 0.51111114 0.147915587 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -21 0.233333334 0.124312915 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -48 0.533333361 0.1662896 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Craft-repair Husband White Male United-States 0 -70 0.7777778 0.163962543 0.3125 0 0 0.454545468 Self-emp-inc 9th Divorced Sales Not-in-family White Male United-States 0 -44 0.4888889 0.04601453 0.875 0 0 0.5555556 Local-gov Masters Never-married Prof-specialty Own-child White Female United-States 0 -58 0.644444466 0.03794087 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -41 0.455555558 0.128369614 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family Black Female Jamaica 0 -54 0.6 0.0945366248 0.25 0 0.8953168 0.4040404 Private 7th-8th Divorced Machine-op-inspct Unmarried White Female United-States 0 -42 0.466666669 0.0158347953 0.875 0 0.5052801 0.6060606 Self-emp-inc Masters Divorced Exec-managerial Unmarried Asian-Pac-Islander Male India 1 -28 0.311111122 0.08253492 0.375 0 0 0.4040404 Private 10th Divorced Handlers-cleaners Not-in-family White Male United-States 0 -65 0.722222269 0.143167838 0.4375 0 0 0.2020202 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -35 0.3888889 0.07577061 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Other-relative White Male Ireland 0 -82 0.9111111 0.0995005742 0.1875 0 0 0.2020202 Private 5th-6th Widowed Other-service Unmarried White Male United-States 0 -48 0.533333361 0.199410662 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -44 0.4888889 0.09977605 1 0.1502415 0 0.4040404 Private Doctorate Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 -68 0.75555557 0.0339131355 0.875 0.06360064 0 0.2020202 Private Masters Never-married Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.206435621 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -24 0.266666681 0.141461775 0.5625 0 0.459366381 0.373737365 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -54 0.6 0.110388264 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -22 0.244444445 0.0767398253 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -43 0.477777779 0.2133892 0.625 0 0 0.8484849 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -17 0.188888893 0.035944514 0.3125 0 0 0.353535354 Private 9th Never-married Other-service Own-child White Female United-States 0 -46 0.51111114 0.0641582 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -59 0.655555546 0.08602922 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -37 0.411111116 0.0449153222 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -70 0.7777778 0.139843941 0.5625 0.0222802218 0 0.24242425 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -57 0.6333333 0.134550631 0.5625 0 0.43663913 0.3030303 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.125819609 0.5625 0 0 0.353535354 ? HS-grad Married-civ-spouse ? Not-in-family White Female United-States 0 -31 0.344444454 0.103924349 0.5625 0 0 0.24242425 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 -23 0.25555557 0.06941716 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -17 0.188888893 0.06279699 0.5 0 0.395087242 0.25252524 Private 12th Never-married Other-service Own-child White Female United-States 0 -63 0.7 0.296764016 0.0625 0 0 0.3030303 Private Preschool Married-civ-spouse Prof-specialty Husband Other Male Mexico 0 -44 0.4888889 0.143391445 0.9375 0 0 0.5555556 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 -30 0.333333343 0.113147058 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.25490585 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -44 0.4888889 0.101763651 0.875 0 0.4331956 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.103443444 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -34 0.377777785 0.07721332 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Other-relative White Male United-States 0 -37 0.411111116 0.232019156 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.12682654 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Unmarried White Female United-States 0 -32 0.355555564 0.0713529 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child Black Female United-States 0 -42 0.466666669 0.146713316 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband Black Male Jamaica 0 -20 0.222222224 0.255623162 0.625 0 0 0.1010101 Private Some-college Never-married Other-service Own-child White Female United-States 0 -34 0.377777785 0.119438544 0.625 0.04386044 0 0.4040404 State-gov Some-college Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -37 0.411111116 0.08615719 0.625 0 0 0.2020202 Private Some-college Never-married Transport-moving Unmarried White Female Puerto-Rico 0 -47 0.5222222 0.0182305574 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.168409213 0.3125 0 0 0.454545468 Private 9th Never-married Farming-fishing Other-relative White Male Mexico 0 -36 0.4 0.0244290959 0.5625 0 0.453856736 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -60 0.6666667 0.20785813 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -64 0.7111111 0.143849447 0.5625 0.0263502635 0 0.1010101 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.158354014 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 -33 0.366666675 0.252511442 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Other-service Husband White Male United-States 0 -71 0.788888931 0.08006708 0.8125 0 0 0.141414136 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -55 0.6111111 0.150680438 0.625 0 0 0.4040404 Local-gov Some-college Divorced Exec-managerial Not-in-family Amer-Indian-Eskimo Female United-States 0 -85 0.9444445 0.111824907 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Widowed Sales Not-in-family White Female United-States 0 -57 0.6333333 0.185857132 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Prof-specialty Husband White Male ? 0 -39 0.433333337 0.133800313 0.9375 0 0.5544077 0.676767647 Private Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -25 0.2777778 0.07346914 0.625 0 0 0.5555556 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -58 0.644444466 0.07027187 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -57 0.6333333 0.131929249 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.2632705 0.6875 0 0 0.363636374 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -19 0.211111113 0.1331901 0.4375 0 0 0.2020202 Private 11th Divorced Sales Unmarried White Female United-States 0 -40 0.444444448 0.297732562 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.029781 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Unmarried Amer-Indian-Eskimo Female United-States 0 -43 0.477777779 0.07714462 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -40 0.444444448 0.170653433 0.5625 0 0 0.353535354 ? HS-grad Married-civ-spouse ? Wife White Female United-States 1 -19 0.211111113 0.185107484 0.5625 0 0 0.151515156 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -24 0.266666681 0.21671848 0.5625 0 0 0.3838384 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -34 0.377777785 0.143615067 0.8125 0 0 0.656565666 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -22 0.244444445 0.113010332 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -64 0.7111111 0.2375637 0.6875 0 0 0.5555556 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -55 0.6111111 0.212855086 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male ? 0 -26 0.2888889 0.143740341 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -80 0.8888889 0.136379287 0.5625 0 0 0.161616161 Private HS-grad Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 -79 0.8777778 0.09850038 1 0 0 0.4040404 Local-gov Doctorate Widowed Prof-specialty Unmarried White Female United-States 0 -58 0.644444466 0.303456932 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.0547199622 0.8125 0 0.430670351 0.4040404 Private Bachelors Divorced Tech-support Not-in-family White Male United-States 0 -43 0.477777779 0.131513 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.0390171781 0.5625 0 0 0.25252524 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -35 0.3888889 0.6422744 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -51 0.566666663 0.06672302 0.6875 0.0501305 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.131196439 0.875 0.04787048 0 0.6060606 Local-gov Masters Divorced Exec-managerial Not-in-family White Female United-States 1 -43 0.477777779 0.104595192 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -68 0.75555557 0.137456268 0.625 0 0 0.454545468 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 0 -34 0.377777785 0.145674065 0.8125 0 0 0.454545468 State-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -37 0.411111116 0.239681289 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Cambodia 1 -22 0.244444445 0.200295687 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Female United-States 0 -32 0.355555564 0.2866711 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -65 0.722222269 0.09808548 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.07782624 0.625 0 0 0.6060606 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -37 0.411111116 0.165340587 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male ? 0 -40 0.444444448 0.09594095 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -40 0.444444448 0.09027113 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Other-relative White Male United-States 0 -52 0.5777778 0.119462118 0.5625 0 0 0.2020202 Private HS-grad Separated Other-service Other-relative White Female United-States 0 -35 0.3888889 0.0257593263 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.145445734 0.1875 0 0 0.3030303 Self-emp-not-inc 5th-6th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -49 0.544444442 0.07798452 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -49 0.544444442 0.114612 0.5625 0 0 0.5555556 Private HS-grad Divorced Machine-op-inspct Other-relative White Female United-States 0 -47 0.5222222 0.239320278 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.07823978 0.5625 0 0 0.4040404 Private HS-grad Separated Exec-managerial Not-in-family White Female United-States 0 -37 0.411111116 0.273215234 0.125 0 0 0.7777778 Private 1st-4th Married-spouse-absent Farming-fishing Other-relative White Male Mexico 0 -36 0.4 0.150489837 0.6875 0 0 0.535353541 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 -36 0.4 0.0280352 0.375 0 0 0.7070707 Private 10th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -44 0.4888889 0.101763651 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.192460462 0.875 0 0.453856736 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.07310678 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -28 0.311111122 0.1430035 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -57 0.6333333 0.116582081 0.5625 0 0 0.323232323 Private HS-grad Widowed Sales Unmarried White Female United-States 0 -46 0.51111114 0.0180379264 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 -59 0.655555546 0.0214062724 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 -28 0.311111122 0.127460346 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Own-child White Male United-States 0 -25 0.2777778 0.1106139 0.5625 0.02597026 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -35 0.3888889 0.161962822 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Unmarried Black Female United-States 0 -27 0.3 0.177553117 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.05017832 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.177477688 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -38 0.422222227 0.03213231 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -26 0.2888889 0.156016186 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -55 0.6111111 0.262327552 0.875 0 0 0.5050505 ? Masters Married-civ-spouse ? Husband White Male United-States 1 -36 0.4 0.07484854 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Own-child White Male United-States 0 -37 0.411111116 0.102584019 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -23 0.25555557 0.1886799 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 -34 0.377777785 0.4107139 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband White Male ? 0 -41 0.455555558 0.124244213 0.4375 0 0 0.5555556 Private 11th Married-civ-spouse Protective-serv Husband White Male United-States 0 -44 0.4888889 0.145760268 0.6875 0 0 0.4040404 Private Assoc-voc Separated Prof-specialty Not-in-family White Female Dominican-Republic 0 -48 0.533333361 0.2183417 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 -35 0.3888889 0.202519029 0.5625 0.07298073 0 0.353535354 Local-gov HS-grad Married-civ-spouse Protective-serv Husband Black Male United-States 1 -43 0.477777779 0.403443784 0.8125 0 0 0.424242437 Local-gov Bachelors Divorced Prof-specialty Unmarried Black Female United-States 0 -57 0.6333333 0.09477371 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.176628351 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 -28 0.311111122 0.207540229 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -55 0.6111111 0.10008049 0.375 0 0 0.4040404 Private 10th Widowed Craft-repair Unmarried Black Female United-States 0 -52 0.5777778 0.131766915 0.5625 0 0.4708448 0.3838384 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -30 0.333333343 0.15383932 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried Black Female United-States 0 -31 0.344444454 0.09186876 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Thailand 1 -21 0.233333334 0.205741882 0.625 0 0 0.7070707 ? Some-college Never-married ? Own-child White Male United-States 0 -50 0.5555556 0.117915682 0.9375 0 0 0.454545468 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.0229048878 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -33 0.366666675 0.0816290155 0.5625 0 0 0.5050505 Private HS-grad Never-married Machine-op-inspct Not-in-family Other Male United-States 0 -23 0.25555557 0.146057978 0.6875 0 0 0.25252524 Federal-gov Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -35 0.3888889 0.0547448844 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male Yugoslavia 1 -18 0.2 0.143419743 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Male United-States 0 -21 0.233333334 0.1434999 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried Other Female United-States 0 -33 0.366666675 0.148467213 0.8125 0 0 0.7070707 Local-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 1 -30 0.333333343 0.0495142154 0.8125 0 0 0.454545468 Federal-gov Bachelors Never-married Exec-managerial Other-relative Asian-Pac-Islander Female United-States 0 -21 0.233333334 0.207024962 0.625 0 0 0.151515156 Private Some-college Never-married Protective-serv Own-child White Male United-States 0 -36 0.4 0.256356657 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Adm-clerical Wife White Female Germany 1 -38 0.422222227 0.08081875 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.129319966 0.875 0.07298073 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male Canada 1 -24 0.266666681 0.220594674 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.148395136 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband Black Male United-States 0 -39 0.433333337 0.283984363 0.625 0 0 0.3030303 Private Some-college Divorced Protective-serv Unmarried Black Female United-States 0 -43 0.477777779 0.10386575 0.5625 0.0282902829 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male China 0 -43 0.477777779 0.0235966071 0.8125 0 0 0.212121218 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -62 0.6888889 0.254757017 0.875 0 0 0.02020202 ? Masters Married-civ-spouse ? Husband White Male United-States 1 -30 0.333333343 0.182001144 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Own-child Black Female United-States 0 -25 0.2777778 0.17170617 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -45 0.5 0.04159143 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -22 0.244444445 0.09286424 0.625 0 0 0.2020202 Private Some-college Never-married Protective-serv Not-in-family White Male United-States 0 -73 0.811111152 0.22631231 0.8125 0 0.515610635 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.1498877 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.157510087 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Other-relative Black Male United-States 0 -18 0.2 0.133774728 0.5 0.005940059 0 0.2020202 Private 12th Never-married Craft-repair Own-child White Male United-States 0 -35 0.3888889 0.136072159 0.8125 0.07298073 0 0.353535354 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -22 0.244444445 0.136850089 0.625 0 0 0.434343427 Private Some-college Separated Sales Unmarried White Female United-States 0 -28 0.311111122 0.14906463 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -38 0.422222227 0.1259065 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -68 0.75555557 0.236681372 1 0 0 0.7070707 ? Doctorate Married-civ-spouse ? Husband White Male United-States 0 -40 0.444444448 0.120953321 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -32 0.355555564 0.0180527456 0.625 0 0 0.8484849 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -42 0.466666669 0.232116148 0.5625 0 0.43663913 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -31 0.344444454 0.0403911881 0.5625 0 0 0.353535354 State-gov HS-grad Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 -33 0.366666675 0.109738976 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Italy 0 -54 0.6 0.129759118 0.8125 0 0 0.656565666 Self-emp-not-inc Bachelors Divorced Transport-moving Not-in-family White Male United-States 0 -63 0.7 0.07926221 0.5625 0 0 0.25252524 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -67 0.7444445 0.120754629 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -47 0.5222222 0.146265417 0.5625 0 0 0.141414136 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 -67 0.7444445 0.07847822 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Widowed Other-service Unmarried White Female United-States 0 -33 0.366666675 0.114727169 0.5625 0 0 0.1919192 Private HS-grad Married-civ-spouse Adm-clerical Wife Other Female United-States 0 -33 0.366666675 0.172781125 0.5625 0 0 0.8080808 Local-gov HS-grad Separated Other-service Own-child White Female United-States 0 -25 0.2777778 0.153489083 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -25 0.2777778 0.0954438746 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.243744045 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried White Male United-States 0 -54 0.6 0.124878012 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.1186101 0.5625 0 0 0.8080808 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -18 0.2 0.145975128 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Own-child White Male United-States 0 -54 0.6 0.104906365 0.5625 0.04416044 0 0.25252524 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -30 0.333333343 0.4107139 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -29 0.322222233 0.09161214 0.375 0 0 0.4848485 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 -41 0.455555558 0.039657712 0.8125 0.07688077 0 0.1010101 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -40 0.444444448 0.1924874 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -46 0.51111114 0.116685137 0.625 0.05178052 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -39 0.433333337 0.108382478 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Tech-support Wife White Female United-States 0 -42 0.466666669 0.153159723 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -49 0.544444442 0.07480678 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.127920359 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -34 0.377777785 0.0213779844 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.0813878849 0.5625 0 0.4687787 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.116052687 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -72 0.8 0.11197713 0.5625 0 0 0.02020202 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -31 0.344444454 0.0582553446 0.6875 0 0 0.3030303 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 -90 1 0.13919735 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -27 0.3 0.103418529 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -18 0.2 0.127325639 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Other-relative White Male United-States 0 -30 0.333333343 0.0780842 0.5625 1 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 -27 0.3 0.102125339 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Prof-specialty Own-child Black Female United-States 0 -27 0.3 0.0251241829 0.4375 0 0 0.5050505 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.073415935 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -40 0.444444448 0.131667912 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -43 0.477777779 0.145561576 0.875 0 0 0.373737365 Local-gov Masters Separated Prof-specialty Unmarried Black Female United-States 0 -26 0.2888889 0.07981182 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -48 0.533333361 0.0681839138 0.6875 0 0 0.151515156 Self-emp-not-inc Assoc-voc Married-civ-spouse Other-service Wife White Female United-States 0 -41 0.455555558 0.235537037 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male United-States 0 -32 0.355555564 0.152813524 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Germany 0 -23 0.25555557 0.144564077 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -35 0.3888889 0.114279941 0.4375 0 0 0.656565666 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.04812943 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -27 0.3 0.0960601643 0.8125 0.04101041 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -34 0.377777785 0.0843797252 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -25 0.2777778 0.132890373 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -46 0.51111114 0.100353271 0.8125 0.04787048 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 1 -34 0.377777785 0.0466429368 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 0 -39 0.433333337 0.107848361 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -33 0.366666675 0.09248302 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female ? 0 -25 0.2777778 0.217705876 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -45 0.5 0.0933693945 0.6875 0.0217402168 0 0.5050505 Private Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 0 -46 0.51111114 0.0689423159 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -23 0.25555557 0.102301806 0.5625 0.046500463 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male Ireland 0 -37 0.411111116 0.272553146 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family Black Male United-States 0 -39 0.433333337 0.06677825 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 -38 0.422222227 0.12482278 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -35 0.3888889 0.155093446 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -49 0.544444442 0.0261459351 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.256356657 0.75 0 0 0.13131313 Private Assoc-acdm Married-civ-spouse Prof-specialty Wife White Female United-States 1 -45 0.5 0.215286538 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -71 0.788888931 0.10038358 0.5 0 0 0.4040404 Private 12th Never-married Other-service Not-in-family White Female United-States 0 -44 0.4888889 0.2161938 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -19 0.211111113 0.07893892 0.625 0 0 0.222222224 ? Some-college Never-married ? Own-child White Male United-States 0 -38 0.422222227 0.0552062541 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 -42 0.466666669 0.122786686 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.0359896421 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.145627588 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -56 0.622222245 0.0162503663 0.6875 0 0 0.545454562 Self-emp-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.07750092 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -19 0.211111113 0.08101071 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -57 0.6333333 0.09044625 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Separated Sales Not-in-family White Male United-States 0 -55 0.6111111 0.0179941468 0.375 0 0 0.6060606 Private 10th Never-married Transport-moving Not-in-family White Male United-States 0 -48 0.533333361 0.117553994 0.4375 0 0 0.4040404 ? 11th Separated ? Unmarried White Male United-States 0 -46 0.51111114 0.118513778 0.5 0 0 0.454545468 Self-emp-inc 12th Married-civ-spouse Craft-repair Husband White Male ? 0 -36 0.4 0.147469029 0.3125 0 0 0.4040404 Private 9th Separated Other-service Unmarried Black Female ? 0 -66 0.733333349 0.07930599 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -26 0.2888889 0.13888213 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 -58 0.644444466 0.06056557 0.6875 0.1502415 0 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.0470578335 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.07342873 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Unmarried Other Male United-States 0 -77 0.8555556 0.106988929 0.6875 0 0 0.25252524 ? Assoc-voc Married-spouse-absent ? Not-in-family White Female United-States 0 -25 0.2777778 0.08776289 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.105561711 0.8125 0 0 0.565656543 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -33 0.366666675 0.2860629 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -51 0.566666663 0.146592766 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Prof-specialty Not-in-family Black Female United-States 0 -20 0.222222224 0.022285236 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Farming-fishing Own-child White Male United-States 0 -40 0.444444448 0.162924618 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -20 0.222222224 0.0259007681 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Male United-States 0 -41 0.455555558 0.0545926653 0.625 0 0 0.25252524 Local-gov Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -44 0.4888889 0.109930933 0.5 0 0 0.4040404 Private 12th Divorced Machine-op-inspct Unmarried White Female United-States 0 -35 0.3888889 0.105561711 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -35 0.3888889 0.0861652642 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-spouse-absent Farming-fishing Not-in-family White Male United-States 0 -46 0.51111114 0.153101131 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -24 0.266666681 0.06522778 0.625 0 0 0.171717167 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -18 0.2 0.165149987 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -37 0.411111116 0.0312418975 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -58 0.644444466 0.125536725 1 0 0 0.08080808 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 -55 0.6111111 0.1702116 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -68 0.75555557 0.104328468 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -41 0.455555558 0.216032147 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.09352161 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.06876248 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.0219120979 0.625 0 0 0.454545468 ? Some-college Never-married ? Not-in-family White Male United-States 0 -45 0.5 0.1873443 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -43 0.477777779 0.227849975 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.02315477 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.06193756 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.179080024 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -60 0.6666667 0.185901582 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 0 -27 0.3 0.130597 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.09386646 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.206420138 0.75 0 0 0.4040404 State-gov Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.0250770357 0.625 0 0 0.8080808 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -19 0.211111113 0.03800351 0.5 0 0 0.2020202 State-gov 12th Never-married Transport-moving Own-child Black Male United-States 0 -33 0.366666675 0.111291468 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Not-in-family Asian-Pac-Islander Female Thailand 0 -34 0.377777785 0.103270352 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.0720520243 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -57 0.6333333 0.07342536 0.625 0 0 0.4848485 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -59 0.655555546 0.103791662 0.875 0.2782828 0 0.454545468 Private Masters Never-married Sales Not-in-family White Female United-States 1 -36 0.4 0.123754553 0.5625 0 0.459595948 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Own-child White Female United-States 0 -60 0.6666667 0.247655258 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 -33 0.366666675 0.105081484 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -41 0.455555558 0.12469279 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -20 0.222222224 0.126809031 0.625 0 0 0.1010101 Self-emp-not-inc Some-college Never-married Prof-specialty Own-child White Male United-States 0 -28 0.311111122 0.034021575 0.8125 0.0220202189 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.09949384 0.875 0 0 0.2020202 State-gov Masters Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male India 0 -31 0.344444454 0.2791969 0.5 0 0 0.6060606 Private 12th Never-married Farming-fishing Not-in-family Black Male United-States 0 -38 0.422222227 0.194751143 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Unmarried White Female United-States 0 -40 0.444444448 0.118588544 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -55 0.6111111 0.134513587 0.8125 0 0 0.151515156 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -49 0.544444442 0.20063515 0.5625 0.0406404063 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.137959391 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -52 0.5777778 0.104689486 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Not-in-family White Female ? 0 -24 0.266666681 0.02219296 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -46 0.51111114 0.157277718 0.8125 0 0 0.4848485 Private Bachelors Divorced Craft-repair Not-in-family White Male United-States 0 -20 0.222222224 0.14196828 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -50 0.5555556 0.128484786 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -22 0.244444445 0.0561155267 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 -32 0.355555564 0.231609657 0.625 0 0 0.353535354 Self-emp-inc Some-college Married-civ-spouse Transport-moving Husband Black Male Haiti 0 -46 0.51111114 0.124863192 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -62 0.6888889 0.203503057 0.5625 0.0296102948 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -39 0.433333337 0.0541009828 0.625 0 0.453856736 0.6262626 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.241080225 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -20 0.222222224 0.142313123 0.625 0 0 0.141414136 Private Some-college Never-married Sales Own-child Black Female United-States 0 -37 0.411111116 0.134211853 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -40 0.444444448 0.1366413 0.625 0 0 0.24242425 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -22 0.244444445 0.131389737 0.625 0 0 0.3838384 Private Some-college Never-married Other-service Own-child White Female United-States 0 -32 0.355555564 0.213765025 0.8125 0.105201051 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 1 -41 0.455555558 0.126491129 0.625 0 0 0.5050505 Private Some-college Divorced Tech-support Not-in-family White Male United-States 0 -24 0.266666681 0.0654756352 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 -40 0.444444448 0.0322636478 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.0517052226 0.9375 0 0 0.3939394 State-gov Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 -42 0.466666669 0.116047971 0.875 0 0.43663913 0.4040404 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 -56 0.622222245 0.18486838 0.3125 0 0 0.4040404 Private 9th Widowed Sales Unmarried White Female United-States 0 -20 0.222222224 0.0708854645 0.625 0 0 0.5050505 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -55 0.6111111 0.111601293 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Male United-States 0 -29 0.322222233 0.170943722 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -37 0.411111116 0.205830112 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -61 0.677777767 0.237385884 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -26 0.2888889 0.163512617 0.8125 0 0 0.3838384 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -49 0.544444442 0.135434315 0.625 0 0 0.5555556 Self-emp-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -18 0.2 0.10711354 0.25 0 0 0.4040404 Local-gov 7th-8th Never-married Farming-fishing Own-child White Male United-States 0 -30 0.333333343 0.1007392 0.3125 0 0 0.4040404 Private 9th Never-married Farming-fishing Other-relative Black Male United-States 0 -24 0.266666681 0.154611856 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child Black Female ? 0 -24 0.266666681 0.104919836 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -37 0.411111116 0.08087398 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -37 0.411111116 0.1734944 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.1198265 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -40 0.444444448 0.20833163 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -44 0.4888889 0.09360445 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.126474962 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.0241563153 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Not-in-family White Female United-States 0 -50 0.5555556 0.1578583 0.875 0 0.3409091 0.4040404 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 0 -17 0.188888893 0.101798676 0.375 0 0 0.3030303 ? 10th Never-married ? Own-child White Male United-States 0 -39 0.433333337 0.09745236 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -43 0.477777779 0.167099863 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -43 0.477777779 0.167099863 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -40 0.444444448 0.144015819 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -31 0.344444454 0.0376162268 0.625 0 0 0.4040404 State-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -25 0.2777778 0.0819772258 0.8125 0 0 0.4040404 Private Bachelors Divorced Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.110831447 0.8125 0 0.430670351 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -55 0.6111111 0.150283724 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -55 0.6111111 0.128317744 0.25 0 0 0.75757575 Private 7th-8th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -29 0.322222233 0.137264311 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -28 0.311111122 0.25490585 0.8125 0.105201051 0 0.6060606 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 1 -30 0.333333343 0.07133269 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.156499773 0.5625 0 0.3838384 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.141796514 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -71 0.788888931 0.130349129 0.4375 0 0 0.75757575 Private 11th Never-married Priv-house-serv Not-in-family White Female United-States 0 -22 0.244444445 0.0154683935 0.625 0 0 0.0606060624 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -21 0.233333334 0.0293223243 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -62 0.6888889 0.04882182 0.5625 0 0 0.24242425 ? HS-grad Married-civ-spouse ? Husband Asian-Pac-Islander Male China 0 -22 0.244444445 0.1549109 0.625 0 0 0.4040404 ? Some-college Married-spouse-absent ? Unmarried Black Female United-States 0 -49 0.544444442 0.123265564 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -31 0.344444454 0.07635456 0.75 0 0 0.2020202 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.132942244 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.20114097 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Hong 1 -26 0.2888889 0.143722162 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -30 0.333333343 0.07305425 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -17 0.188888893 0.0208842847 0.375 0 0 0.3030303 Private 10th Never-married Other-service Own-child White Female United-States 0 -26 0.2888889 0.0241913386 0.625 0 0 0.5050505 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -45 0.5 0.06693923 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female Canada 0 -50 0.5555556 0.03257078 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.162917882 0.5625 0 0 0.454545468 Private HS-grad Never-married Farming-fishing Unmarried White Male United-States 0 -51 0.566666663 0.0163965244 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -56 0.622222245 0.100818686 0.3125 0 0 0.4040404 Private 9th Widowed Machine-op-inspct Unmarried White Female United-States 0 -24 0.266666681 0.104015276 0.8125 0 0 0.353535354 State-gov Bachelors Never-married Machine-op-inspct Not-in-family White Male United-States 0 -29 0.322222233 0.223529264 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Not-in-family White Male Dominican-Republic 0 -26 0.2888889 0.174839452 0.625 0 0 0.24242425 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -51 0.566666663 0.07055139 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.0976281539 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -47 0.5222222 0.13437821 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.20370242 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -41 0.455555558 0.08699035 0.4375 0 0 0.4040404 ? 11th Widowed ? Other-relative Black Female United-States 0 -49 0.544444442 0.07798452 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.06500214 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 1 -62 0.6888889 0.1527125 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -43 0.477777779 0.1649789 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -76 0.844444454 0.16418615 0.1875 0 0 0.2020202 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -40 0.444444448 0.236519039 0.875 0 0 0.6060606 ? Masters Married-civ-spouse ? Husband White Male United-States 1 -35 0.3888889 0.1259065 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.0604921542 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -54 0.6 0.08717692 0.8125 0.1502415 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.124403164 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.18541798 0.625 0 0 0.121212125 Private Some-college Never-married Sales Own-child White Male United-States 0 -20 0.222222224 0.1739726 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -39 0.433333337 0.09412173 0.5625 0 0 0.2020202 Private HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.06902112 0.8125 0.105201051 0 0.646464646 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 1 -20 0.222222224 0.06993982 0.5625 0 0 0.424242437 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -28 0.311111122 0.184938431 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -56 0.622222245 0.1056385 0.625 0 0 0.4040404 Federal-gov Some-college Separated Other-service Not-in-family Black Male United-States 0 -39 0.433333337 0.06804045 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -44 0.4888889 0.04629135 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 -55 0.6111111 0.09518793 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -54 0.6 0.113640763 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.233828276 0.8125 0.135501355 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -34 0.377777785 0.143949136 0.5625 0 0 0.575757563 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -42 0.466666669 0.132549569 0.5625 0 0 0.3838384 Private HS-grad Never-married Transport-moving Unmarried Black Female United-States 0 -50 0.5555556 0.139587328 0.625 0 0 0.75757575 Self-emp-inc Some-college Separated Exec-managerial Unmarried White Female United-States 0 -34 0.377777785 0.134662449 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -23 0.25555557 0.183325991 0.6875 0 0 0.333333343 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 -27 0.3 0.128409356 0.8125 0 0 0.25252524 ? Bachelors Never-married ? Unmarried Asian-Pac-Islander Male Philippines 0 -81 0.900000036 0.0990749 0.8125 0 0 0.05050505 ? Bachelors Widowed ? Not-in-family White Male United-States 0 -47 0.5222222 0.179349437 0.4375 0.068490684 0 0.4040404 Private 11th Never-married Machine-op-inspct Unmarried Black Female United-States 0 -57 0.6333333 0.065184 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 -65 0.722222269 0.0789126456 0.6875 0 0 0.565656543 ? Assoc-voc Married-civ-spouse ? Wife White Female United-States 1 -33 0.366666675 0.126861572 0.875 0 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family Black Male United-States 0 -37 0.411111116 0.241887107 0.5625 0 0 0.4848485 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -53 0.5888889 0.133914813 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried White Female United-States 0 -27 0.3 0.0460650437 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.07786934 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.0305535458 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -39 0.433333337 0.08189506 0.625 0.04787048 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family Black Male United-States 1 -58 0.644444466 0.196927339 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -20 0.222222224 0.325136662 0.5625 0 0 0.24242425 Private HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 -19 0.211111113 0.133806378 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 -39 0.433333337 0.155134529 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.0201299246 0.5625 0 0 0.444444448 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -52 0.5777778 0.130840138 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female Germany 0 -53 0.5888889 0.085113205 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 1 -50 0.5555556 0.0730421245 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.14864637 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -30 0.333333343 0.0215584915 0.8125 0 0 0.727272749 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -30 0.333333343 0.129168421 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female ? 0 -50 0.5555556 0.125173688 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -76 0.844444454 0.08554966 0.25 0 0 0.4040404 Private 7th-8th Widowed Priv-house-serv Not-in-family White Female United-States 0 -46 0.51111114 0.06890797 0.8125 0 0.5544077 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.106347054 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Black Male United-States 0 -26 0.2888889 0.232642174 0.5625 0.0288502872 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -56 0.622222245 0.0634173155 0.9375 0 0.453856736 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.09793798 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.12862353 0.625 0.02407024 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.143330157 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -51 0.566666663 0.113598324 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -58 0.644444466 0.157931045 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -38 0.422222227 0.08854352 0.3125 0 0 0.24242425 Private 9th Married-civ-spouse Other-service Wife Black Female Haiti 0 -45 0.5 0.2753227 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -55 0.6111111 0.08494415 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Widowed Sales Not-in-family White Male United-States 0 -45 0.5 0.1047272 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.199870691 0.625 0 0 0.454545468 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -44 0.4888889 0.125164255 0.8125 0 0 0.464646459 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -60 0.6666667 0.0291202627 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.143565223 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -25 0.2777778 0.225140348 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -61 0.677777767 0.170472249 0.8125 0 0 0.24242425 ? Bachelors Divorced ? Not-in-family White Female United-States 0 -43 0.477777779 0.04353121 0.5625 0.1502415 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.1305862 0.6875 0 0.307621658 0.4040404 Local-gov Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 -63 0.7 0.0483597778 0.25 0 0 0.414141417 Private 7th-8th Widowed Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.114562824 0.875 0 0 0.434343427 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.133510023 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.242335021 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family Black Male United-States 0 -43 0.477777779 0.07446328 0.5625 0 0 0.4040404 Private HS-grad Separated Exec-managerial Unmarried Black Female United-States 0 -46 0.51111114 0.132590652 0.875 0 0 0.353535354 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.0760151 0.375 0 0 0.353535354 ? 10th Married-civ-spouse ? Wife Black Female United-States 0 -61 0.677777767 0.151399776 0.75 0 0 0.909090936 Self-emp-not-inc Assoc-acdm Married-spouse-absent Exec-managerial Not-in-family White Female United-States 0 -53 0.5888889 0.182894245 0.5625 0 0.453856736 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -79 0.8777778 0.0957570747 0.25 0.01409014 0 0.353535354 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -44 0.4888889 0.148966968 0.5625 0 0 0.3030303 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -54 0.6 0.173041791 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -22 0.244444445 0.105968527 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -47 0.5222222 0.129920766 0.5625 0 0 0.5050505 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 -18 0.2 0.161771536 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -25 0.2777778 0.137628689 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -24 0.266666681 0.08228301 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female Iran 0 -37 0.411111116 0.267983884 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -51 0.566666663 0.07750092 0.625 0 0.5847107 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 1 -35 0.3888889 0.114618056 0.5625 0.07298073 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -59 0.655555546 0.1151845 0.625 0 0 0.343434334 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -46 0.51111114 0.0614681058 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Craft-repair Not-in-family Asian-Pac-Islander Male Philippines 0 -45 0.5 0.08599553 0.6875 0 0 0.6060606 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 -19 0.211111113 0.177367225 0.5625 0 0 0.151515156 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -22 0.244444445 0.0872281045 0.5625 0 0 0.282828271 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -41 0.455555558 0.129390687 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.06326509 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.139783323 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 -22 0.244444445 0.0933128148 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -29 0.322222233 0.07826942 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.133524165 0.5625 0 0 0.3939394 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.0610316545 0.75 0 0.4687787 0.1010101 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 -23 0.25555557 0.142223537 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Handlers-cleaners Own-child White Male United-States 0 -20 0.222222224 0.131090015 0.5625 0.0378103778 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -25 0.2777778 0.108761005 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female United-States 0 -59 0.655555546 0.09703679 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -44 0.4888889 0.112483628 0.625 0.04386044 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.23043029 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -77 0.8555556 0.0482762568 0.625 0 0.446281 0.01010101 Self-emp-not-inc Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.08398436 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.0991685241 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.09778037 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -45 0.5 0.174662977 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.104383029 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Guatemala 0 -60 0.6666667 0.110423282 0.3125 0 0 0.4040404 ? 9th Married-civ-spouse ? Husband White Male United-States 0 -23 0.25555557 0.08605616 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -52 0.5777778 0.06640242 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.129920766 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.131236851 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -20 0.222222224 0.02320057 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -23 0.25555557 0.119394094 0.5625 0 0 0.454545468 Local-gov HS-grad Never-married Other-service Own-child White Female United-States 0 -30 0.333333343 0.09629994 0.625 0 0 0.656565666 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -45 0.5 0.162557542 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -30 0.333333343 0.104318365 0.9375 0 0 0.353535354 Private Prof-school Widowed Other-service Not-in-family White Male United-States 0 -17 0.188888893 0.0407905951 0.3125 0 0 0.2020202 Private 9th Never-married Other-service Own-child White Female United-States 0 -22 0.244444445 0.09602312 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -25 0.2777778 0.118651181 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Own-child White Male United-States 0 -52 0.5777778 0.1254815 0.625 0.1502415 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Canada 1 -40 0.444444448 0.160079613 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 1 -18 0.2 0.124210536 0.375 0 0 0.3030303 ? 10th Never-married ? Own-child Black Male United-States 0 -58 0.644444466 0.04622063 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.154578865 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.229399785 0.375 0.0394203924 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -29 0.322222233 0.176606134 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family Black Female Jamaica 0 -26 0.2888889 0.158959523 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -39 0.433333337 0.14432767 0.8125 0 0 0.1010101 Local-gov Bachelors Widowed Prof-specialty Unmarried Asian-Pac-Islander Female Japan 0 -33 0.366666675 0.1141614 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.1387077 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -22 0.244444445 0.131459787 0.625 0 0 0.24242425 Private Some-college Never-married Sales Own-child White Male United-States 0 -25 0.2777778 0.316357136 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Own-child White Male United-States 0 -19 0.211111113 0.09445782 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 -44 0.4888889 0.1444159 0.625 0 0 0.4040404 Private Some-college Separated Prof-specialty Unmarried Black Female United-States 0 -35 0.3888889 0.3046282 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Own-child White Female United-States 0 -40 0.444444448 0.16445826 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -19 0.211111113 0.156241149 0.4375 0 0 0.2020202 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 -37 0.411111116 0.277695566 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 1 -32 0.355555564 0.0205407813 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -52 0.5777778 0.1274435 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -36 0.4 0.180703908 0.5625 0 0 0.414141417 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.04667998 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Female United-States 0 -57 0.6333333 0.0749131963 0.8125 0 0 0.3939394 State-gov Bachelors Divorced Machine-op-inspct Not-in-family Black Male United-States 0 -22 0.244444445 0.208356544 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -80 0.8888889 0.117865168 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Husband White Male Canada 0 -20 0.222222224 0.14196828 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.193136021 0.4375 0 0 0.363636374 Private 11th Separated Machine-op-inspct Not-in-family Black Male United-States 0 -36 0.4 0.21638912 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.129949048 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -52 0.5777778 0.0489949174 0.5625 0 0 0.5050505 Private HS-grad Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.126530856 0.5625 0 0 0.444444448 Private HS-grad Separated Transport-moving Unmarried White Female United-States 0 -35 0.3888889 0.120952651 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.446818739 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband Black Male United-States 0 -27 0.3 0.203691646 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -24 0.266666681 0.103975542 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -49 0.544444442 0.0251585338 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.07382544 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Separated Craft-repair Not-in-family White Male United-States 0 -47 0.5222222 0.124201104 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -20 0.222222224 0.151302785 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -19 0.211111113 0.273135751 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -34 0.377777785 0.0245065521 0.875 0 0.518365443 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -20 0.222222224 0.09960497 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.110615246 0.4375 0 0 0.353535354 Private 11th Separated Prof-specialty Own-child White Male United-States 0 -25 0.2777778 0.2581698 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -21 0.233333334 0.2813138 0.5625 0 0 0.363636374 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -25 0.2777778 0.108443767 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -63 0.7 0.06723423 0.625 0 0 0.323232323 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -25 0.2777778 0.0251760464 0.8125 0 0 0.5050505 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -28 0.311111122 0.100117534 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -39 0.433333337 0.121557482 0.875 0 0 0.6060606 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -28 0.311111122 0.08294375 0.625 0.0486504845 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -30 0.333333343 0.0750418454 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.07228844 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -52 0.5777778 0.09871658 0.75 0.0486504845 0 0.3030303 Local-gov Assoc-acdm Divorced Other-service Not-in-family White Female United-States 0 -36 0.4 0.180208191 0.5625 0.0406404063 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.191870436 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.131130427 0.3125 0 0 0.5050505 Private 9th Never-married Other-service Own-child White Male Mexico 0 -32 0.355555564 0.09832458 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Wife White Female United-States 0 -52 0.5777778 0.110458307 0.5625 1 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.086534366 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -21 0.233333334 0.1688194 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Other-relative White Male Nicaragua 0 -60 0.6666667 0.152857974 0.5625 0 0 0.373737365 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -47 0.5222222 0.10635177 0.4375 0 0 0.363636374 Private 11th Married-civ-spouse Other-service Husband Amer-Indian-Eskimo Male United-States 0 -54 0.6 0.022807898 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -32 0.355555564 0.02724043 0.875 0 0 0.5050505 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -61 0.677777767 0.0366220921 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.0355309658 0.5625 0 0.3452709 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -29 0.322222233 0.07033249 0.625 0.04386044 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Other-relative White Male United-States 1 -36 0.4 0.205908924 0.5625 0 0 0.7070707 Local-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 -38 0.422222227 0.112776615 0.5625 0 0 0.2020202 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.196354836 0.375 0 0 0.5252525 Private 10th Widowed Machine-op-inspct Not-in-family White Male United-States 0 -43 0.477777779 0.163924828 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -19 0.211111113 0.0260112286 0.4375 0 0 0.1010101 Private 11th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -42 0.466666669 0.155373633 0.8125 0.0501305 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.08931135 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.130184114 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 -51 0.566666663 0.1880212 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.228578746 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -61 0.677777767 0.06820547 0.625 0 0 0.434343427 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.07933495 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -31 0.344444454 0.210592 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.172090083 0.4375 0 0 0.5555556 Self-emp-not-inc 11th Divorced Exec-managerial Not-in-family White Male United-States 0 -21 0.233333334 0.14949435 0.3125 0 0 0.4040404 Private 9th Never-married Handlers-cleaners Other-relative White Male Mexico 0 -22 0.244444445 0.09374926 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -35 0.3888889 0.124978364 0.875 0 0.4331956 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.05676414 0.8125 0 0 0.4848485 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.07717358 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -36 0.4 0.124876663 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -33 0.366666675 0.1343964 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -23 0.25555557 0.233366236 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -51 0.566666663 0.235353827 0.5625 0.04386044 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.147920966 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Other-relative White Male United-States 0 -28 0.311111122 0.08586959 0.5625 0.0572105721 0 0.4040404 Local-gov HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.171009734 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Sales Not-in-family White Male United-States 0 -32 0.355555564 0.1045541 0.8125 0 0 0.6060606 Private Bachelors Divorced Protective-serv Not-in-family Black Male United-States 1 -43 0.477777779 0.122877613 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -19 0.211111113 0.357279062 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.0683166 0.4375 0 0 0.4040404 Private 11th Divorced Handlers-cleaners Unmarried Black Female United-States 0 -49 0.544444442 0.241575271 1 0 0 0.454545468 Local-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.0610680245 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Female United-States 0 -45 0.5 0.08496031 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.160540313 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -22 0.244444445 0.130686566 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 -25 0.2777778 0.07936459 0.8125 0 0.430670351 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.168172136 0.9375 0 0 0.5050505 Private Prof-school Separated Prof-specialty Not-in-family White Male United-States 1 -44 0.4888889 0.147902116 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.149360985 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -30 0.333333343 0.0543037169 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -54 0.6 0.124878012 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.109860212 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.01650429 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 -30 0.333333343 0.107217938 0.8125 0 0.43663913 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.06766462 0.6875 0.0217402168 0 0.6060606 Private Assoc-voc Never-married Exec-managerial Own-child White Female United-States 0 -27 0.3 0.129949048 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -29 0.322222233 0.09766991 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -60 0.6666667 0.122041754 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.0254447851 0.875 0 0 0.7070707 Self-emp-not-inc Masters Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.040606048 0.875 0 0 0.4040404 Private Masters Never-married Sales Own-child White Female United-States 0 -57 0.6333333 0.0567324832 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -24 0.266666681 0.03504265 0.125 0 0 0.05050505 Private 1st-4th Married-civ-spouse Other-service Own-child Asian-Pac-Islander Female Vietnam 0 -63 0.7 0.214697868 0.625 0 0 0.222222224 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 -29 0.322222233 0.113246739 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -34 0.377777785 0.07646637 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -27 0.3 0.216808051 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -31 0.344444454 0.09819527 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Unmarried White Female United-States 0 -31 0.344444454 0.08851927 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.09780664 0.625 0.046500463 0 0.2020202 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -64 0.7111111 0.09575371 0.5625 0 0 1 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.3332541 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Other-relative Black Female United-States 0 -44 0.4888889 0.116170555 0.5625 0.1502415 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -35 0.3888889 0.124371514 0.4375 0 0 0.5050505 Private 11th Divorced Transport-moving Not-in-family White Male United-States 0 -41 0.455555558 0.0179624911 0.625 0 0 0.4040404 Local-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -38 0.422222227 0.128967717 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Own-child Black Female United-States 0 -21 0.233333334 0.0583449267 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male ? 0 -64 0.7111111 0.07529779 0.8125 0 0 0.454545468 State-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.163375214 0.25 0 0.506198347 0.4040404 Private 7th-8th Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -31 0.344444454 0.24560906 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Germany 1 -42 0.466666669 0.2937331 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.183521986 0.75 0 0 0.353535354 Private Assoc-acdm Married-civ-spouse Other-service Wife White Female United-States 1 -36 0.4 0.031864915 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Unmarried Black Female United-States 1 -23 0.25555557 0.191146389 0.5 0 0 0.3030303 Private 12th Never-married Machine-op-inspct Other-relative White Male Mexico 0 -20 0.222222224 0.108501017 0.625 0 0 0.141414136 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -26 0.2888889 0.178641558 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 -56 0.622222245 0.04168168 0.8125 0 0.459366381 0.656565666 Federal-gov Bachelors Never-married Transport-moving Not-in-family Black Male United-States 0 -40 0.444444448 0.101347409 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Other-service Not-in-family White Female United-States 0 -19 0.211111113 0.123284429 0.4375 0 0 0.24242425 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -33 0.366666675 0.118995361 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Female United-States 0 -45 0.5 0.158880726 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Male Columbia 0 -41 0.455555558 0.109979428 0.5625 0.07688077 0 0.434343427 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.1104866 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -46 0.51111114 0.21860303 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -48 0.533333361 0.06676545 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 -38 0.422222227 0.225633383 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.3660505 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -35 0.3888889 0.0443697572 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.0713044 0.8125 0 0 0.3030303 Local-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 0 -27 0.3 0.144714266 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Own-child White Male United-States 0 -43 0.477777779 0.1037755 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -70 0.7777778 0.188796431 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Cuba 0 -30 0.333333343 0.06581981 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -24 0.266666681 0.157269627 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -76 0.844444454 0.174857631 0.5625 0 0 0.151515156 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -25 0.2777778 0.159612179 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Own-child White Male Mexico 0 -39 0.433333337 0.234264731 0.75 0 0 0.565656543 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 -36 0.4 0.1330197 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried Black Female United-States 0 -23 0.25555557 0.1532924 0.5 0 0 0.4040404 Private 12th Never-married Machine-op-inspct Own-child White Female United-States 0 -60 0.6666667 0.11143022 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Unmarried White Female United-States 0 -20 0.222222224 0.227309808 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child Black Male United-States 0 -54 0.6 0.112852052 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Craft-repair Husband Black Male Haiti 1 -20 0.222222224 0.267205954 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -22 0.244444445 0.0986984 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -24 0.266666681 0.0350056067 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -41 0.455555558 0.0975129753 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.114279941 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.161740556 0.1875 0 0 0.5555556 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 -54 0.6 0.06949461 1 0 0.43663913 0.5050505 State-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.115881607 0.4375 0 0 0.161616161 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -43 0.477777779 0.120546505 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -33 0.366666675 0.118666671 0.5 0 0.518365443 0.424242437 Private 12th Divorced Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.106553152 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Own-child Asian-Pac-Islander Female ? 0 -38 0.422222227 0.116232522 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Male United-States 1 -54 0.6 0.152713835 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -39 0.433333337 0.09969321 0.5625 0 0 0.5252525 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Female United-States 0 -32 0.355555564 0.134389669 0.625 0 0.454545438 0.4040404 Private Some-college Separated Tech-support Not-in-family Amer-Indian-Eskimo Male United-States 0 -61 0.677777767 0.02357438 0.25 0.0288502872 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -24 0.266666681 0.0455215 0.6875 0 0 0.353535354 ? Assoc-voc Married-civ-spouse ? Wife Black Female United-States 0 -22 0.244444445 0.0593559 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -34 0.377777785 0.152418166 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -18 0.2 0.304742038 0.375 0 0 0.2020202 Private 10th Never-married Priv-house-serv Own-child Black Female United-States 0 -20 0.222222224 0.2549638 0.5625 0 0 0.25252524 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -53 0.5888889 0.125336 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Tech-support Unmarried White Male United-States 0 -32 0.355555564 0.0187619776 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -68 0.75555557 0.158185631 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -28 0.311111122 0.04831465 0.625 0 0 0.151515156 Private Some-college Separated Other-service Unmarried White Female United-States 0 -28 0.311111122 0.139740214 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male El-Salvador 0 -54 0.6 0.120758675 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Prof-specialty Husband Black Male Haiti 1 -21 0.233333334 0.1705322 0.625 0 0 0.4848485 ? Some-college Never-married ? Own-child White Male United-States 0 -52 0.5777778 0.06261715 0.8125 0 0 0.4040404 Private Bachelors Separated Exec-managerial Unmarried White Female ? 0 -25 0.2777778 0.140961334 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.08276998 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -33 0.366666675 0.0756769851 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -49 0.544444442 0.118771747 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Unmarried Asian-Pac-Islander Female India 0 -58 0.644444466 0.166548908 0.25 0 0 0.3030303 Private 7th-8th Widowed Other-service Not-in-family Other Female United-States 0 -45 0.5 0.185954109 0.6875 0 0 0.24242425 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -67 0.7444445 0.173473522 0.25 0.105661057 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -42 0.466666669 0.119846709 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male ? 0 -69 0.7666667 0.0716607049 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -61 0.677777767 0.112573206 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -34 0.377777785 0.144060269 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.125039652 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.0965579 0.5625 0 0 0.343434334 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -31 0.344444454 0.119122654 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.0657464 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -76 0.844444454 0.151329726 0.9375 0 0.288797051 0.2020202 ? Prof-school Married-civ-spouse ? Husband White Male United-States 0 -53 0.5888889 0.132526666 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Female United-States 0 -46 0.51111114 0.206224814 0.5625 0 0 0.373737365 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.231063411 0.25 0.04508045 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male Cuba 0 -48 0.533333361 0.1300238 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -39 0.433333337 0.234740913 0.625 0 0.5544077 1 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -59 0.655555546 0.131901622 0.25 0 0 0.4040404 Private 7th-8th Divorced Transport-moving Not-in-family White Male United-States 0 -19 0.211111113 0.07157853 0.625 0 0 0.3838384 Private Some-college Never-married Sales Own-child White Female United-States 0 -40 0.444444448 0.150033846 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -63 0.7 0.07449965 0.375 0 0 0.5050505 Self-emp-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -44 0.4888889 0.1293065 0.625 0 0 0.1010101 ? Some-college Divorced ? Unmarried White Female Poland 0 -46 0.51111114 0.166555643 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Female United-States 0 -22 0.244444445 0.147532344 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Unmarried White Male United-States 0 -36 0.4 0.15125294 0.75 0 0.383149683 0.454545468 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 0 -57 0.6333333 0.137906864 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -58 0.644444466 0.07637747 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 -25 0.2777778 0.114789136 0.8125 0 0 0.282828271 ? Bachelors Never-married ? Not-in-family Asian-Pac-Islander Male Taiwan 0 -59 0.655555546 0.174161881 0.625 0.03103031 0 0.353535354 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -36 0.4 0.109398164 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.177142933 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male Germany 0 -49 0.544444442 0.0178500116 0.8125 0.06497065 0 0.454545468 Self-emp-inc Bachelors Divorced Prof-specialty Unmarried White Male United-States 0 -42 0.466666669 0.248622462 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.0773614943 0.625 0 0 0.171717167 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -46 0.51111114 0.2729896 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.217973948 0.625 0 0 0.121212125 Local-gov Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -40 0.444444448 0.0718647838 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Transport-moving Unmarried White Female United-States 0 -43 0.477777779 0.0346910655 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 -48 0.533333361 0.07897259 0.5625 0 0 0.323232323 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.0718695 0.5625 0 0 0.282828271 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -30 0.333333343 0.146356344 0.6875 0 0 0.353535354 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 -58 0.644444466 0.0234309174 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.0965632945 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family Black Male United-States 0 -53 0.5888889 0.05832809 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -74 0.822222233 0.07881498 0.625 0 0 0.161616161 State-gov Some-college Separated Sales Not-in-family White Male United-States 0 -64 0.7111111 0.07055678 0.625 0 0 0.08080808 ? Some-college Widowed ? Unmarried White Female United-States 0 -45 0.5 0.0375293419 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.32403475 0.1875 0 0 0.1010101 State-gov 5th-6th Never-married Machine-op-inspct Own-child White Female United-States 0 -23 0.25555557 0.1897131 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child Black Female United-States 0 -38 0.422222227 0.125375077 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 -42 0.466666669 0.06501225 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.126218349 0.625 0.0115101151 0 0.4040404 Local-gov Some-college Never-married Protective-serv Unmarried Other Male United-States 0 -63 0.7 0.122012794 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.252689928 0.625 0 0 0.353535354 Local-gov Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -37 0.411111116 0.242972851 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 -28 0.311111122 0.282920867 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male Italy 0 -31 0.344444454 0.0927329 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -46 0.51111114 0.0191411767 0.9375 1 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.06817112 0.8125 0 0 0.444444448 Private Bachelors Divorced Sales Unmarried White Male United-States 1 -42 0.466666669 0.143475637 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 1 -45 0.5 0.139785349 1 0 0 0.4040404 Private Doctorate Separated Exec-managerial Unmarried White Male United-States 1 -52 0.5777778 0.0978867859 0.8125 0 0 0.6060606 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 -40 0.444444448 0.07227429 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.131559476 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -55 0.6111111 0.132097632 0.8125 0 0 0.4040404 Private Bachelors Separated Craft-repair Not-in-family White Male ? 0 -17 0.188888893 0.118181728 0.375 0 0 0.141414136 Private 10th Never-married Other-service Own-child White Female United-States 0 -27 0.3 0.133295849 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -71 0.788888931 0.07955722 0.625 0.200512 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.116232522 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -17 0.188888893 0.0168727133 0.375 0 0 0.161616161 Private 10th Never-married Other-service Own-child White Male United-States 0 -26 0.2888889 0.141923144 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -22 0.244444445 0.123312712 0.625 0 0 0.353535354 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 -51 0.566666663 0.06680452 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.19123058 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.2670342 0.75 0 0 0.5050505 Local-gov Assoc-acdm Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -50 0.5555556 0.106876455 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.136115253 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -21 0.233333334 0.192042872 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Female United-States 0 -53 0.5888889 0.14725484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -32 0.355555564 0.0668880343 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.111473322 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -22 0.244444445 0.08235441 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -58 0.644444466 0.099485755 0.5625 0.1502415 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.0298086163 0.8125 0 0 0.6060606 Federal-gov Bachelors Married-spouse-absent Exec-managerial Not-in-family White Male United-States 1 -51 0.566666663 0.131335855 0.625 0 0 0.454545468 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.233022049 0.8125 0 0 0.4848485 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.0214466844 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -29 0.322222233 0.096707426 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female Vietnam 0 -50 0.5555556 0.108734064 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.213523224 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -47 0.5222222 0.106722213 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Divorced Other-service Not-in-family White Female United-States 0 -60 0.6666667 0.152139992 0.625 0 0 0.272727281 Private Some-college Widowed Sales Unmarried White Female United-States 0 -46 0.51111114 0.118756928 0.5625 0.07298073 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Own-child White Female United-States 1 -58 0.644444466 0.174366623 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -62 0.6888889 0.0181625318 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.136600882 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 -59 0.655555546 0.02385053 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 -41 0.455555558 0.128567636 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried White Female Mexico 0 -31 0.344444454 0.122692391 0.5625 0 0 0.373737365 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -18 0.2 0.2375152 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -64 0.7111111 0.14409934 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.0909958556 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -47 0.5222222 0.06909319 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 -68 0.75555557 0.151957467 0.8125 0 0 0.353535354 Private Bachelors Widowed Sales Not-in-family White Male United-States 1 -32 0.355555564 0.162861988 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife Other Female United-States 0 -39 0.433333337 0.234008774 0.3125 0 0 0.434343427 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -37 0.411111116 0.205602467 0.75 0 0 0.4848485 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 -29 0.322222233 0.09485386 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -44 0.4888889 0.1963811 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband Other Male United-States 0 -46 0.51111114 0.136772633 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.10446924 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.170237184 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Own-child Black Male United-States 0 -65 0.722222269 0.272512734 0.5625 0.02414024 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -52 0.5777778 0.0675056651 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -40 0.444444448 0.0427714624 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -61 0.677777767 0.06461149 0.3125 0 0 0.4040404 Private 9th Divorced Other-service Not-in-family White Male United-States 0 -30 0.333333343 0.1263672 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -61 0.677777767 0.0620850623 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Other-service Husband White Male United-States 0 -33 0.366666675 0.1484214 0.6875 0 0 0.8484849 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 -32 0.355555564 0.141374886 0.8125 0 0 0.656565666 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.183454633 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.117096663 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Divorced Prof-specialty Other-relative White Male United-States 1 -37 0.411111116 0.187864929 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -53 0.5888889 0.218607739 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.08416689 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -29 0.322222233 0.142317161 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Sales Not-in-family Black Male United-States 0 -48 0.533333361 0.129851386 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -69 0.7666667 0.123163864 0.5625 0.158311576 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 1 -28 0.311111122 0.0315672159 0.875 0 0 0.4040404 Private Masters Never-married Tech-support Not-in-family White Female United-States 0 -55 0.6111111 0.02112541 0.8125 0 0 0.4040404 Local-gov Bachelors Widowed Prof-specialty Not-in-family White Female United-States 1 -45 0.5 0.09979828 0.6875 0.1502415 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.09607767 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -60 0.6666667 0.07828491 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.07335262 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male ? 0 -19 0.211111113 0.334060967 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -18 0.2 0.22497803 0.4375 0 0 0.25252524 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -33 0.366666675 0.180891827 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -33 0.366666675 0.144010425 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 -29 0.322222233 0.162771061 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.108385168 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.07224668 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -19 0.211111113 0.0280250963 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Male United-States 0 -28 0.311111122 0.08719578 0.375 0 0.5137741 0.353535354 Private 10th Widowed Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.07402952 0.8125 0 0 0.07070707 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 -23 0.25555557 0.112765841 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 -47 0.5222222 0.18190752 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.219520375 0.625 0 0 0.353535354 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -19 0.211111113 0.131275237 0.625 0 0 0.121212125 Private Some-college Never-married Other-service Own-child White Female United-States 0 -47 0.5222222 0.123584151 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -36 0.4 0.103095233 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -62 0.6888889 0.03788497 0.8125 0 0.5544077 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -65 0.722222269 0.07089085 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -46 0.51111114 0.113285132 0.9375 0 0.43663913 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.112975307 0.4375 0.068490684 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -50 0.5555556 0.09854483 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -20 0.222222224 0.172764286 0.625 0 0 0.0606060624 Private Some-college Never-married Sales Own-child White Female United-States 0 -17 0.188888893 0.08178393 0.4375 0 0 0.161616161 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 -33 0.366666675 0.09863239 0.625 0 0.399449021 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.104572289 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Female United-States 0 -53 0.5888889 0.06656474 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -47 0.5222222 0.161190942 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -62 0.6888889 0.09077089 0.875 0 0 0.353535354 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.375092715 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Male United-States 0 -27 0.3 0.0322670154 0.8125 0 0 0.434343427 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -23 0.25555557 0.07702339 0.5625 0 0 0.5050505 Private HS-grad Never-married Tech-support Own-child White Male United-States 0 -27 0.3 0.1276092 0.875 0 0.3452709 0.454545468 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -39 0.433333337 0.0610532053 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -25 0.2777778 0.15687561 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -24 0.266666681 0.129454 0.625 0 0 0.2020202 Private Some-college Never-married Exec-managerial Not-in-family Black Female United-States 0 -23 0.25555557 0.0187080931 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -29 0.322222233 0.0925948247 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -30 0.333333343 0.0678478256 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -34 0.377777785 0.07526478 0.5625 0 0 0.454545468 Private HS-grad Separated Craft-repair Not-in-family White Male Portugal 0 -32 0.355555564 0.1244914 0.375 0 0 0.4040404 Private 10th Separated Craft-repair Unmarried White Female United-States 0 -18 0.2 0.279328883 0.4375 0 0.3677686 0.232323229 Private 11th Never-married Other-service Own-child Black Male United-States 0 -20 0.222222224 0.102229066 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Sales Not-in-family Black Female United-States 0 -38 0.422222227 0.137150481 0.8125 0 0 0.454545468 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.09251872 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child White Female United-States 0 -41 0.455555558 0.116054706 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.184146345 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 -36 0.4 0.025547836 0.5625 0 0 0.4848485 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -61 0.677777767 0.06535305 0.625 0 0 0.3030303 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.0367803723 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -26 0.2888889 0.07310678 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -27 0.3 0.170952484 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Wife White Female United-States 1 -45 0.5 0.2838355 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -47 0.5222222 0.139515936 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.09305081 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -29 0.322222233 0.0316473655 0.5625 0 0 0.5555556 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -51 0.566666663 0.12337333 0.5625 0 0 0.7070707 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.154597044 0.75 0 0 0.6060606 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -42 0.466666669 0.216032147 0.5625 0.03908039 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.173371151 0.1875 0 0 0.4040404 Private 5th-6th Never-married Farming-fishing Other-relative Black Male Mexico 0 -20 0.222222224 0.291001916 0.625 0 0 0.151515156 State-gov Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -43 0.477777779 0.2675818 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 1 -20 0.222222224 0.0255949832 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -27 0.3 0.0684432238 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -46 0.51111114 0.224103108 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.07760128 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -33 0.366666675 0.120191559 0.625 0 0 0.4949495 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -42 0.466666669 0.124783717 0.6875 0 0 0.323232323 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -23 0.25555557 0.276444823 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -29 0.322222233 0.0576356947 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -27 0.3 0.056251578 0.5625 0 0 0.6060606 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -43 0.477777779 0.131154671 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Divorced Craft-repair Own-child White Male United-States 0 -23 0.25555557 0.217332065 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -40 0.444444448 0.023263881 0.875 0 0 0.444444448 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -35 0.3888889 0.142164946 0.625 0 0 0.616161644 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -30 0.333333343 0.131272539 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Other-relative White Male United-States 0 -59 0.655555546 0.07884327 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -65 0.722222269 0.05312503 0.625 0.02290023 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.0346607566 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -79 0.8777778 0.179240331 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -43 0.477777779 0.0622170754 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Wife Black Female United-States 1 -54 0.6 0.118045 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.140262887 0.5625 0 0 0.6262626 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -30 0.333333343 0.132272065 0.8125 0.1502415 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.0745077357 0.8125 0 0 0.151515156 ? Bachelors Never-married ? Own-child Asian-Pac-Islander Female Taiwan 0 -34 0.377777785 0.0989960954 0.5625 0 0 0.656565666 Private HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 -18 0.2 0.0760918856 0.4375 0 0 0.0303030312 Private 11th Never-married Prof-specialty Other-relative White Male United-States 0 -40 0.444444448 0.118503675 0.6875 0 0.453856736 0.151515156 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -28 0.311111122 0.109964609 0.3125 0.04508045 0 0.4040404 Private 9th Married-civ-spouse Sales Husband White Male United-States 0 -18 0.2 0.142069981 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -46 0.51111114 0.0978578255 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.134027973 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -77 0.8555556 0.117792428 0.625 0 0 0.0606060624 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -41 0.455555558 0.0246857125 0.875 0 0.4242424 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.128020048 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 1 -29 0.322222233 0.0330617875 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -41 0.455555558 0.0852842852 0.4375 0 0 0.4040404 Private 11th Divorced Handlers-cleaners Unmarried White Female United-States 0 -41 0.455555558 0.117322296 0.3125 0 0 0.4040404 Private 9th Separated Other-service Not-in-family White Male United-States 0 -34 0.377777785 0.07988456 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -49 0.544444442 0.254341453 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Divorced Sales Not-in-family White Male United-States 0 -49 0.544444442 0.105928116 0.5625 0 0 0.5050505 Private HS-grad Separated Sales Unmarried White Male United-States 0 -30 0.333333343 0.0528926626 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -28 0.311111122 0.128234908 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -62 0.6888889 0.109569244 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.07003412 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -20 0.222222224 0.1978346 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -61 0.677777767 0.06624211 0.0625 0 0 0.4040404 Private Preschool Married-spouse-absent Other-service Not-in-family Asian-Pac-Islander Male China 0 -30 0.333333343 0.139871553 0.8125 0 0 0.6060606 Private Bachelors Never-married Tech-support Not-in-family White Male Hungary 0 -29 0.322222233 0.02762367 0.9375 0 0 0.5555556 Federal-gov Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 -50 0.5555556 0.126749754 0.875 0 0.365013778 0.454545468 Private Masters Divorced Sales Not-in-family White Female United-States 0 -44 0.4888889 0.215578854 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -25 0.2777778 0.206713125 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -62 0.6888889 0.112919405 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Not-in-family White Female United-States 0 -57 0.6333333 0.116912119 0.625 0 0 0.4040404 Private Some-college Widowed Machine-op-inspct Unmarried White Female United-States 0 -35 0.3888889 0.184287116 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -26 0.2888889 0.131713033 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -60 0.6666667 0.1255778 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -22 0.244444445 0.2818102 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.0281490274 0.875 0 0 0.5050505 Local-gov Masters Separated Prof-specialty Not-in-family White Female ? 0 -26 0.2888889 0.123906769 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -26 0.2888889 0.238959253 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -44 0.4888889 0.133424491 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.493095934 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -66 0.733333349 0.06590333 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.132469416 0.0625 0 0 0.3030303 Private Preschool Never-married Machine-op-inspct Own-child White Female United-States 0 -19 0.211111113 0.215540469 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Male United-States 0 -54 0.6 0.200858086 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.198778212 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -38 0.422222227 0.24795498 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.126227766 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Transport-moving Husband White Male ? 0 -22 0.244444445 0.0815448239 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Male United-States 0 -34 0.377777785 0.1428991 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.07287508 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Divorced Craft-repair Own-child Amer-Indian-Eskimo Male United-States 0 -42 0.466666669 0.198309436 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -47 0.5222222 0.136431143 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -29 0.322222233 0.179207325 0.8125 0 0 0.8080808 Self-emp-inc Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -34 0.377777785 0.2331251 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 -38 0.422222227 0.207910672 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -62 0.6888889 0.1590188 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family Black Male United-States 0 -35 0.3888889 0.126429826 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.160947129 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -47 0.5222222 0.06301387 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -37 0.411111116 0.2222529 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.08419855 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Priv-house-serv Not-in-family White Female United-States 0 -60 0.6666667 0.06123439 0.4375 0 0 0.4040404 Self-emp-inc 11th Married-civ-spouse Transport-moving Husband White Male United-States 1 -31 0.344444454 0.195143819 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -74 0.822222233 0.0223034211 0.375 0.01797018 0 0.3030303 ? 10th Married-civ-spouse ? Husband Amer-Indian-Eskimo Male United-States 0 -63 0.7 0.138783127 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.1289044 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -44 0.4888889 0.181048766 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 -40 0.444444448 0.128934041 0.9375 0.1502415 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.134540528 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -50 0.5555556 0.06229251 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.115233667 0.625 0 0 0.1010101 Private Some-college Never-married Sales Own-child White Female United-States 0 -33 0.366666675 0.07598816 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 -59 0.655555546 0.022128975 0.25 0 0 0.7070707 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -17 0.188888893 0.0962911844 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 -47 0.5222222 0.0600429066 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 1 -51 0.566666663 0.09901967 0.625 0 0 0.5050505 ? Some-college Divorced ? Not-in-family Black Male United-States 0 -26 0.2888889 0.19665052 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -32 0.355555564 0.01969078 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Wife White Female France 1 -55 0.6111111 0.160446689 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.21804063 0.625 0 0 0.4040404 State-gov Some-college Never-married Tech-support Unmarried Black Female United-States 0 -54 0.6 0.0954149142 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -19 0.211111113 0.14714776 0.5625 0 0.3677686 0.3030303 ? HS-grad Never-married ? Own-child White Female United-States 0 -32 0.355555564 0.0798481852 0.875 0 0 0.454545468 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 -52 0.5777778 0.0236356724 1 0 0 0.4040404 Local-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.09409479 0.5625 0 0 0.282828271 Private HS-grad Married-spouse-absent Sales Unmarried Black Female Jamaica 0 -39 0.433333337 0.138876081 0.5625 0 0 0.454545468 Federal-gov HS-grad Never-married Exec-managerial Unmarried White Female United-States 0 -59 0.655555546 0.120126896 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.113916911 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Prof-specialty Unmarried White Male United-States 0 -54 0.6 0.06949461 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -31 0.344444454 0.238743722 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -19 0.211111113 0.08395675 0.4375 0 0 0.25252524 ? 11th Never-married ? Own-child Black Male United-States 0 -30 0.333333343 0.040698994 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Own-child Amer-Indian-Eskimo Female United-States 0 -47 0.5222222 0.06649537 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-spouse-absent Exec-managerial Not-in-family White Female United-States 0 -31 0.344444454 0.09016 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Male United-States 0 -32 0.355555564 0.121440291 0.8125 0 0 0.474747479 Self-emp-not-inc Bachelors Divorced Craft-repair Unmarried Asian-Pac-Islander Male Iran 0 -33 0.366666675 0.149069354 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Unmarried Black Female United-States 0 -31 0.344444454 0.219341889 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -32 0.355555564 0.141820773 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -46 0.51111114 0.102544948 0.5625 0 0 0.353535354 Private HS-grad Married-spouse-absent Other-service Not-in-family White Male Mexico 0 -29 0.322222233 0.120326266 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Other-service Not-in-family White Female France 0 -41 0.455555558 0.03300117 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -39 0.433333337 0.163944349 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.109410286 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -23 0.25555557 0.136780038 0.8125 0 0 0.24242425 Private Bachelors Never-married Adm-clerical Own-child Black Male United-States 0 -53 0.5888889 0.105059929 0.875 0 0 0.656565666 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.123039261 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-spouse-absent Craft-repair Not-in-family Asian-Pac-Islander Male Thailand 0 -34 0.377777785 0.114686757 0.8125 0 0 0.1010101 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 -47 0.5222222 0.07097774 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -24 0.266666681 0.172586471 0.25 0 0 0.6060606 ? 7th-8th Married-civ-spouse ? Own-child White Male United-States 0 -42 0.466666669 0.141627461 0.875 0.0468704663 0 0.353535354 Private Masters Divorced Tech-support Unmarried Black Female United-States 1 -53 0.5888889 0.10169024 0.625 0.031370312 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.09536171 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Divorced Sales Unmarried White Male United-States 0 -26 0.2888889 0.076493986 0.5625 0 0 0.7070707 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -18 0.2 0.103784256 0.4375 0 0 0.2020202 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -43 0.477777779 0.0338094123 0.375 0 0 0.4040404 Private 10th Separated Other-service Not-in-family Black Female United-States 0 -26 0.2888889 0.08929181 0.8125 0 0 0.323232323 Private Bachelors Never-married Adm-clerical Own-child Black Female United-States 0 -47 0.5222222 0.160425812 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.07594371 0.6875 0 0 0.656565666 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.240471348 0.625 0.02105021 0 0.2020202 ? Some-college Married-civ-spouse ? Wife Black Female United-States 0 -32 0.355555564 0.143724844 0.625 0 0.396235079 0.3838384 State-gov Some-college Divorced Protective-serv Unmarried White Female United-States 0 -48 0.533333361 0.193740174 1 0.07688077 0 0.5555556 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.101071261 0.875 0.1502015 0 0.6060606 Private Masters Divorced Exec-managerial Unmarried Black Female United-States 1 -58 0.644444466 0.09649459 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -55 0.6111111 0.0458043851 0.25 0 0 0.6060606 Self-emp-not-inc 7th-8th Never-married Other-service Other-relative White Female United-States 0 -40 0.444444448 0.1933576 0.5625 0 0 0.5555556 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -33 0.366666675 0.150340974 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -74 0.822222233 0.117147177 1 0 0 0.25252524 Self-emp-not-inc Doctorate Married-spouse-absent Prof-specialty Not-in-family White Male United-States 1 -49 0.544444442 0.12272539 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Widowed Farming-fishing Not-in-family White Male United-States 0 -56 0.622222245 0.0421221741 0.4375 0 0 0.656565666 Self-emp-not-inc 11th Widowed Other-service Unmarried White Female Greece 1 -29 0.322222233 0.106157117 0.8125 0.143441439 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -25 0.2777778 0.205745921 0.75 0 0 0.4848485 Private Assoc-acdm Never-married Machine-op-inspct Own-child Black Male United-States 0 -57 0.6333333 0.3692693 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -29 0.322222233 0.0271400716 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -28 0.311111122 0.075707294 0.5625 0.0235402342 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -59 0.655555546 0.020971844 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.0782229453 0.8125 0.2782828 0 0.6060606 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -28 0.311111122 0.08609994 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -19 0.211111113 0.135880873 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -40 0.444444448 0.161666468 0.625 0 0 0.454545468 Private Some-college Never-married Sales Unmarried Black Female United-States 0 -28 0.311111122 0.08748001 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -48 0.533333361 0.239704192 0.8125 0 0 0.5555556 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -20 0.222222224 0.072511375 0.625 0 0 0.1010101 Private Some-college Never-married Tech-support Not-in-family White Female Canada 0 -58 0.644444466 0.09216713 0.8125 1 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -19 0.211111113 0.0987933651 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Own-child Black Male United-States 0 -75 0.8333334 0.0240613464 0.5625 0 0 0.08080808 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -24 0.266666681 0.0284575056 0.8125 0 0 0.3030303 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -31 0.344444454 0.07667382 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.1902048 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -41 0.455555558 0.0224495772 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.0276357941 0.625 0 0 0.353535354 Federal-gov Some-college Never-married Sales Not-in-family White Female United-States 0 -46 0.51111114 0.1047272 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -33 0.366666675 0.0357256159 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Own-child Black Male United-States 0 -34 0.377777785 0.117726423 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -47 0.5222222 0.136772633 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -81 0.900000036 0.119490407 0.5625 0 0.5456841 0.262626261 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.145905077 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried Other Male Columbia 0 -35 0.3888889 0.06266161 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male Cambodia 0 -59 0.655555546 0.1266265 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Widowed Prof-specialty Not-in-family White Female United-States 1 -46 0.51111114 0.04414008 0.8125 0 0 0.4848485 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.2470235 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.279210359 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child Black Male United-States 0 -25 0.2777778 0.199311659 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Unmarried White Female United-States 0 -37 0.411111116 0.02315477 0.125 0 0 0.4040404 Private 1st-4th Never-married Other-service Not-in-family White Male United-States 0 -49 0.544444442 0.0393068 0.625 0.1502415 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.320827365 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.172036871 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -34 0.377777785 0.118445083 0.625 0 0 0.4040404 Local-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -40 0.444444448 0.08398436 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.0798481852 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -78 0.8666667 0.196684867 0.25 0 0 0.2020202 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -31 0.344444454 0.194359154 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -61 0.677777767 0.0927679241 0.625 0 0 0.25252524 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -22 0.244444445 0.0265588127 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.09330945 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Laos 0 -37 0.411111116 0.477835685 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Other-relative Black Male United-States 0 -35 0.3888889 0.13121058 0.4375 0 0 0.4040404 Private 11th Divorced Machine-op-inspct Unmarried White Female United-States 0 -52 0.5777778 0.0599721856 0.875 0.1502415 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.201447427 0.5625 0 0 0.3030303 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -18 0.2 0.107469834 0.4375 0 0 0.2020202 Private 11th Never-married Transport-moving Own-child White Male United-States 0 -37 0.411111116 0.159175053 0.375 0 0 0.4848485 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.181211084 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -25 0.2777778 0.132435068 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child White Male United-States 0 -47 0.5222222 0.218089119 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.311894953 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.134474531 0.625 0 0.399449021 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife Other Female ? 0 -25 0.2777778 0.06651557 0.625 0 0 0.5050505 Self-emp-inc Some-college Divorced Adm-clerical Own-child White Female United-States 0 -50 0.5555556 0.108489566 0.5625 0 0 0.4040404 State-gov HS-grad Widowed Tech-support Unmarried Black Female United-States 0 -18 0.2 0.129645288 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child Black Male United-States 0 -25 0.2777778 0.13577041 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Not-in-family White Male Mexico 0 -23 0.25555557 0.0792117 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -51 0.566666663 0.119543612 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -47 0.5222222 0.160120025 0.5625 0.0282902829 0 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -37 0.411111116 0.0406228863 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -37 0.411111116 0.181894049 0.625 0.25236252 0 0.25252524 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 1 -27 0.3 0.114472575 0.1875 0 0 0.4040404 Private 5th-6th Never-married Craft-repair Own-child White Male ? 0 -19 0.211111113 0.162110329 0.4375 0 0 0.25252524 Private 11th Never-married Sales Own-child White Female United-States 0 -52 0.5777778 0.08405239 0.5 0 0 0.4040404 Local-gov 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.07674791 0.6875 0 0 0.454545468 Self-emp-not-inc Assoc-voc Married-civ-spouse Other-service Wife White Female United-States 0 -17 0.188888893 0.162335962 0.5 0 0 0.4040404 ? 12th Never-married ? Own-child Other Female United-States 0 -21 0.233333334 0.09945074 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -41 0.455555558 0.026184326 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -55 0.6111111 0.07900492 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.0773305148 0.375 0 0 0.4040404 ? 10th Separated ? Unmarried White Female United-States 0 -24 0.266666681 0.09180949 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -41 0.455555558 0.103139684 0.8125 0 0 0.3838384 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.133058086 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 -33 0.366666675 0.0469776839 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -29 0.322222233 0.1183656 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 -50 0.5555556 0.0529728122 0.625 0 0 0.4040404 State-gov Some-college Married-spouse-absent Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 -37 0.411111116 0.1271458 0.4375 0 0 0.6060606 Self-emp-inc 11th Married-spouse-absent Sales Not-in-family White Male ? 0 -48 0.533333361 0.1048417 0.6875 0.07688077 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.145410031 0.625 0 0 0.1010101 Federal-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.0976140052 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.02269003 0.5625 0 0.383149683 0.7070707 Private HS-grad Never-married Transport-moving Unmarried White Female United-States 0 -65 0.722222269 0.176766425 0.4375 0 0 0.2020202 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 -44 0.4888889 0.128843784 0.8125 0 0 0.4848485 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -32 0.355555564 0.188032642 0.8125 0 0 0.454545468 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 -41 0.455555558 0.103071652 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.136214942 0.25 0 0 0.5555556 Private 7th-8th Married-civ-spouse Prof-specialty Husband White Male United-States 0 -44 0.4888889 0.316193461 0.6875 0.07298073 0 0.4848485 Federal-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 -39 0.433333337 0.110564724 0.75 0 0 0.5555556 Local-gov Assoc-acdm Divorced Other-service Unmarried White Female United-States 0 -59 0.655555546 0.1323374 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -31 0.344444454 0.118666671 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male France 1 -34 0.377777785 0.193516567 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -20 0.222222224 0.07894497 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -33 0.366666675 0.02802577 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -52 0.5777778 0.10823901 1 0 0 0.656565666 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.0542269349 0.75 0 0 0.444444448 Private Assoc-acdm Divorced Tech-support Not-in-family White Female United-States 0 -39 0.433333337 0.147608444 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.07162837 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.04640585 0.5625 0 0.488751143 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.110449553 0.9375 0 0 0.323232323 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.18245174 0.75 0 0 0.656565666 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 -17 0.188888893 0.138563558 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Female United-States 0 -23 0.25555557 0.147436023 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Own-child White Female United-States 0 -35 0.3888889 0.125400677 0.5625 0.1502415 0 0.8080808 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -19 0.211111113 0.167541027 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 -30 0.333333343 0.133062124 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -27 0.3 0.118888266 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.078682296 0.5625 0 0 0.5050505 ? HS-grad Never-married ? Own-child White Male United-States 0 -27 0.3 0.0867041 0.6875 0.105201051 0 0.656565666 Private Assoc-voc Never-married Exec-managerial Not-in-family White Male Greece 1 -37 0.411111116 0.145148709 0.5625 0.04386044 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.152305678 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.118445083 0.8125 0.03103031 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.189356133 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family White Female United-States 0 -41 0.455555558 0.06604747 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -34 0.377777785 0.175496146 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.195263714 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -51 0.566666663 0.04013592 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -24 0.266666681 0.1594721 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Exec-managerial Own-child White Male United-States 0 -38 0.422222227 0.285319984 0.5625 0 0 0.24242425 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 1 -24 0.266666681 0.196272671 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -53 0.5888889 0.06737298 1 0 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.137733757 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.135838434 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -45 0.5 0.103931762 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -31 0.344444454 0.1012484 0.4375 0 0 0.5050505 Private 11th Divorced Farming-fishing Not-in-family White Male United-States 0 -38 0.422222227 0.2233501 0.625 0 0 0.474747479 Local-gov Some-college Widowed Transport-moving Not-in-family Black Female United-States 0 -28 0.311111122 0.06791181 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -38 0.422222227 0.136841327 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -25 0.2777778 0.0822217241 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -29 0.322222233 0.120413147 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -29 0.322222233 0.186127886 0.5625 0 0 0.5050505 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 -48 0.533333361 0.157277718 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -24 0.266666681 0.1949532 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child Asian-Pac-Islander Female Philippines 0 -31 0.344444454 0.116757207 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -36 0.4 0.0879562 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -62 0.6888889 0.06352643 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.200397387 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 -55 0.6111111 0.0873991847 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -21 0.233333334 0.122996829 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Female Poland 0 -60 0.6666667 0.0808692649 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -41 0.455555558 0.122832485 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Own-child White Male United-States 0 -43 0.477777779 0.0410512537 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.128315732 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -47 0.5222222 0.126755819 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -50 0.5555556 0.0603042357 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -41 0.455555558 0.08475152 0.5625 0 0.4331956 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.123497933 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male Puerto-Rico 0 -38 0.422222227 0.05053125 0.25 0 0 0.4040404 ? 7th-8th Divorced ? Not-in-family White Female United-States 0 -30 0.333333343 0.169137985 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family White Male England 0 -35 0.3888889 0.07337889 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 -25 0.2777778 0.0627889 0.625 0 0 0.353535354 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -61 0.677777767 0.09927427 0.9375 0 0 0.2020202 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 0 -71 0.788888931 0.0308485534 0.5625 0 0 0.7070707 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -35 0.3888889 0.151804566 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 -35 0.3888889 0.0160920862 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 -38 0.422222227 0.121012591 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male Scotland 0 -27 0.3 0.27278012 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 -51 0.566666663 0.046394404 0.125 0 0 0.353535354 Private 1st-4th Widowed Other-service Unmarried White Female Portugal 0 -55 0.6111111 0.130709469 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Divorced Sales Not-in-family White Female United-States 0 -45 0.5 0.24081552 0.8125 0 0.459595948 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.124830186 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -25 0.2777778 0.102716029 0.625 0 0 0.4040404 State-gov Some-college Never-married Tech-support Not-in-family Black Male United-States 0 -52 0.5777778 0.113015048 1 0 0 0.3838384 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.0650311038 0.625 0 0 0.171717167 Private Some-college Divorced Machine-op-inspct Own-child White Female United-States 0 -34 0.377777785 0.114182279 0.625 0.04386044 0 0.2020202 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 -52 0.5777778 0.171269715 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -47 0.5222222 0.021895932 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -46 0.51111114 0.08452319 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family Black Female United-States 0 -36 0.4 0.125300989 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -69 0.7666667 0.113688581 0.25 0 0 0.4848485 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -34 0.377777785 0.129221633 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -36 0.4 0.145148709 0.5625 0 0 0.656565666 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -31 0.344444454 0.126328126 0.5625 0.0217402168 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -31 0.344444454 0.170237184 0.5625 0 0.5544077 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 -38 0.422222227 0.142109722 0.8125 0 0.399449021 0.4040404 Local-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.128475353 0.625 0 0 0.353535354 Local-gov Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -24 0.266666681 0.07932013 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Sales Own-child White Male United-States 0 -37 0.411111116 0.202781022 0.5625 0 0 0.454545468 Private HS-grad Divorced Farming-fishing Unmarried White Male United-States 0 -69 0.7666667 0.137835458 0.625 0.09386094 0 0.727272749 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.125400677 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.08877724 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Craft-repair Unmarried White Male United-States 0 -34 0.377777785 0.105268054 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -21 0.233333334 0.08391499 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -21 0.233333334 0.177017659 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -61 0.677777767 0.0643225461 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.162527919 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -29 0.322222233 0.160759211 0.625 0 0 0.5555556 Private Some-college Never-married Sales Not-in-family Black Male Outlying-US(Guam-USVI-etc) 0 -18 0.2 0.0284857936 0.375 0 0 0.3030303 ? 10th Never-married ? Own-child White Female United-States 0 -41 0.455555558 0.113201618 0.5625 0 0 0.454545468 Local-gov HS-grad Divorced Exec-managerial Own-child White Male United-States 0 -42 0.466666669 0.227404773 0.5 0 0 0.6060606 Private 12th Married-civ-spouse Craft-repair Husband Black Male ? 1 -52 0.5777778 0.113154471 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 1 -38 0.422222227 0.06584406 0.5 0 0 0.171717167 Private 12th Never-married Other-service Unmarried White Female United-States 0 -51 0.566666663 0.07213285 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -55 0.6111111 0.05176786 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Other-relative Asian-Pac-Islander Male Philippines 0 -20 0.222222224 0.0471986 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 -23 0.25555557 0.2101542 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -24 0.266666681 0.117287949 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.08479261 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Other-relative White Male United-States 0 -22 0.244444445 0.1417615 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -22 0.244444445 0.105968527 0.625 0 0 0.151515156 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.02072533 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -28 0.311111122 0.215374783 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Sales Husband White Male France 1 -34 0.377777785 0.140836731 0.8125 0.05178052 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.21863535 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Male United-States 0 -48 0.533333361 0.180664852 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.119962551 0.5625 0 0 0.434343427 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -31 0.344444454 0.0174815878 0.3125 0 0 0.353535354 Private 9th Never-married Craft-repair Own-child Amer-Indian-Eskimo Male United-States 0 -65 0.722222269 0.0831707343 0.5625 0 0 0.25252524 ? HS-grad Widowed ? Other-relative White Female United-States 0 -56 0.622222245 0.0873991847 0.625 0 0 0.353535354 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.07308254 0.6875 0 0 0.75757575 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Not-in-family Amer-Indian-Eskimo Male United-States 0 -27 0.3 0.162730649 0.8125 0 0 0.5050505 Private Bachelors Never-married Tech-support Other-relative White Male United-States 0 -27 0.3 0.1443957 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 -30 0.333333343 0.12325681 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.195838913 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -50 0.5555556 0.115796745 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.0654601455 0.625 0 0 0.222222224 Private Some-college Never-married Sales Own-child White Female United-States 0 -42 0.466666669 0.131403878 0.5625 0.0406404063 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -37 0.411111116 0.22165212 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -26 0.2888889 0.03931488 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -32 0.355555564 0.172674716 0.5 0 0 0.4040404 ? 12th Never-married ? Own-child Black Female United-States 0 -43 0.477777779 0.0241287 0.625 0 0 0.4040404 Private Some-college Separated Prof-specialty Unmarried White Female United-States 0 -47 0.5222222 0.116703995 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -26 0.2888889 0.263587058 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -24 0.266666681 0.0580270179 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.19926855 0.4375 0 0 0.7070707 Private 11th Divorced Other-service Not-in-family White Female United-States 0 -33 0.366666675 0.2208533 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.192026034 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female Taiwan 1 -57 0.6333333 0.120126896 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.018939117 0.5625 0 0 0.07070707 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -42 0.466666669 0.13303788 0.625 0 0 0.4040404 Private Some-college Separated Machine-op-inspct Unmarried Black Female United-States 0 -25 0.2777778 0.07310678 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -56 0.622222245 0.121088706 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.08552137 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -23 0.25555557 0.121276617 0.8125 0 0 0.5050505 Private Bachelors Never-married Machine-op-inspct Own-child White Male United-States 0 -35 0.3888889 0.0262328219 0.625 0 0 0.5050505 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -28 0.311111122 0.18291311 0.3125 0 0 0.5252525 Private 9th Never-married Other-service Other-relative White Male United-States 0 -41 0.455555558 0.119421035 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.160548389 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -37 0.411111116 0.116004191 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 -22 0.244444445 0.103592969 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Unmarried Other Male Puerto-Rico 0 -30 0.333333343 0.0178776253 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Not-in-family White Male United-States 0 -42 0.466666669 0.0734603852 0.8125 0 0 0.4040404 Private Bachelors Separated Tech-support Not-in-family White Male United-States 0 -38 0.422222227 0.1439451 0.6875 0 0 0.3030303 Private Assoc-voc Divorced Other-service Not-in-family White Female United-States 0 -49 0.544444442 0.100901529 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Other-service Husband White Male ? 0 -27 0.3 0.125055149 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.157506719 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -68 0.75555557 0.129353642 0.625 0 0.5640496 0.4040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -41 0.455555558 0.130345091 0.5625 0 0.3409091 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.143722162 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -23 0.25555557 0.0257546119 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Male United-States 0 -68 0.75555557 0.07034259 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Ireland 1 -17 0.188888893 0.136285663 0.375 0 0 0.25252524 Private 10th Never-married Other-service Own-child White Male United-States 0 -45 0.5 0.0292542968 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -45 0.5 0.0687995255 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 1 -30 0.333333343 0.1561428 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -49 0.544444442 0.166617617 0.625 0 0 0.2020202 State-gov Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -42 0.466666669 0.0530509427 0.625 0.03103031 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.123982884 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Female United-States 0 -21 0.233333334 0.0693349838 0.625 0 0.459366381 0.4040404 Local-gov Some-college Never-married Other-service Not-in-family White Female United-States 0 -20 0.222222224 0.174061522 0.625 0 0 0.1919192 Private Some-college Never-married Other-service Own-child White Female United-States 0 -59 0.655555546 0.164715558 0.4375 0 0 0.353535354 Private 11th Divorced Other-service Not-in-family Black Female United-States 0 -26 0.2888889 0.170111239 0.375 0 0 0.5555556 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.176990047 0.875 0 0 0.373737365 Private Masters Never-married Other-service Not-in-family White Female United-States 0 -33 0.366666675 0.109497845 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -35 0.3888889 0.0442552567 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -45 0.5 0.06908376 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -66 0.733333349 0.2360725 0.625 0 0 0.282828271 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -67 0.7444445 0.107457042 0.1875 0 0 0.4040404 ? 5th-6th Widowed ? Unmarried Black Female United-States 0 -33 0.366666675 0.09589986 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Sales Not-in-family Other Male United-States 0 -38 0.422222227 0.154398352 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Other Male Puerto-Rico 0 -72 0.8 0.03809444 0.5625 0 0 0.121212125 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.0182184335 0.625 0 0 0.121212125 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -39 0.433333337 0.0245004911 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -41 0.455555558 0.130908161 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.166339442 0.625 0 0 0.121212125 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -49 0.544444442 0.128831655 0.625 0.1502415 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.180860847 0.8125 0 0 0.323232323 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -25 0.2777778 0.307538539 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -26 0.2888889 0.150510713 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -50 0.5555556 0.230212063 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.1175055 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -41 0.455555558 0.264138 0.375 0 0 0.4848485 Private 10th Divorced Sales Not-in-family White Male United-States 0 -60 0.6666667 0.141485348 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 -67 0.7444445 0.157056123 0.5625 0 0 0.07070707 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -77 0.8555556 0.119586051 0.8125 0.03818038 0 0.141414136 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -62 0.6888889 0.09652557 0.625 0 0 0.6060606 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -22 0.244444445 0.219797209 0.625 0 0 0.353535354 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -37 0.411111116 0.120621942 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -17 0.188888893 0.139850676 0.4375 0 0 0.1010101 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -52 0.5777778 0.0251154266 0.875 0 0 0.4040404 Federal-gov Masters Never-married Adm-clerical Not-in-family White Female United-States 1 -31 0.344444454 0.0242937151 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.0358623452 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.269349128 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Craft-repair Other-relative White Male Mexico 0 -38 0.422222227 0.1342664 0.625 0 0 0.454545468 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -23 0.25555557 0.231035128 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Female United-States 0 -22 0.244444445 0.156759769 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -61 0.677777767 0.262996346 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -55 0.6111111 0.195408523 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -23 0.25555557 0.163609609 0.625 0.046500463 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -39 0.433333337 0.0473090634 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Other-service Unmarried Asian-Pac-Islander Female Philippines 0 -38 0.422222227 0.192903638 1 0 0.4331956 0.5050505 Local-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.103617221 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -25 0.2777778 0.0925214142 0.8125 0 0 0.444444448 Private Bachelors Never-married Sales Unmarried Asian-Pac-Islander Male Philippines 0 -66 0.733333349 0.210988045 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.0678478256 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -32 0.355555564 0.1674299 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -43 0.477777779 0.0404127426 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.225677833 0.25 0 0 0.3030303 Private 7th-8th Never-married Sales Own-child White Male Mexico 0 -20 0.222222224 0.147680521 0.4375 0 0 0.6060606 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 -20 0.222222224 0.125836447 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Other-relative Black Male United-States 0 -34 0.377777785 0.1524781 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Unmarried Black Female United-States 0 -33 0.366666675 0.4107139 0.75 0 0 0.4040404 Private Assoc-acdm Married-spouse-absent Machine-op-inspct Unmarried White Male United-States 0 -40 0.444444448 0.207291692 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.1464668 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.07008261 0.5625 0 0.3996786 0.424242437 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -41 0.455555558 0.108366981 0.0625 0 0 0.3030303 Local-gov Preschool Never-married Handlers-cleaners Own-child White Female United-States 0 -20 0.222222224 0.04604147 0.625 0 0 0.121212125 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.16409725 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -44 0.4888889 0.0480021276 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -50 0.5555556 0.0484257825 0.1875 0 0 0.353535354 Private 5th-6th Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female Philippines 0 -38 0.422222227 0.14282164 0.9375 0 0 0.3030303 ? Prof-school Divorced ? Not-in-family White Female United-States 0 -30 0.333333343 0.07748341 0.5625 0 0 0.25252524 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Other-relative White Male United-States 0 -45 0.5 0.0754318237 0.625 0.046500463 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Male United-States 0 -25 0.2777778 0.141977027 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -22 0.244444445 0.0593559 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -25 0.2777778 0.384467632 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -63 0.7 0.09846805 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -55 0.6111111 0.11415197 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -26 0.2888889 0.042821303 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -22 0.244444445 0.140732333 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -41 0.455555558 0.01791467 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.127434745 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 0 -39 0.433333337 0.1238576 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -82 0.9111111 0.131063074 0.6875 0 0 0.08080808 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 -18 0.2 0.127039388 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Male United-States 0 -60 0.6666667 0.07860619 0.4375 0 0 0.4040404 Private 11th Divorced Protective-serv Not-in-family White Male United-States 0 -22 0.244444445 0.0668139458 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -39 0.433333337 0.1236744 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family Black Female United-States 1 -34 0.377777785 0.0744093955 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -50 0.5555556 0.105773874 0.875 0.0220202189 0 0.3030303 Local-gov Masters Divorced Prof-specialty Not-in-family Black Female ? 0 -53 0.5888889 0.10151916 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.144604489 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Own-child Black Male United-States 0 -37 0.411111116 0.116315365 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -25 0.2777778 0.232237384 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 -33 0.366666675 0.215141729 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male Peru 0 -34 0.377777785 0.2208533 0.8125 0 0 0.5555556 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -35 0.3888889 0.295126647 0.6875 0 0 0.656565666 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 -51 0.566666663 0.133128136 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.148068473 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -57 0.6333333 0.02395156 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -25 0.2777778 0.105642535 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -56 0.622222245 0.128144652 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -34 0.377777785 0.1053839 0.8125 0 0 0.858585835 Private Bachelors Divorced Exec-managerial Not-in-family White Male England 1 -36 0.4 0.0442000255 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -46 0.51111114 0.135851234 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -55 0.6111111 0.235676453 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -88 0.9777778 0.126016289 0.9375 0 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 0 -60 0.6666667 0.17802459 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male Columbia 0 -40 0.444444448 0.190393388 0.875 0 0 0.2020202 Self-emp-not-inc Masters Separated Exec-managerial Unmarried White Female United-States 0 -21 0.233333334 0.127246156 0.625 0 0 0.5555556 Private Some-college Never-married Sales Own-child White Female United-States 0 -46 0.51111114 0.07731974 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Black Female United-States 0 -56 0.622222245 0.16516076 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -36 0.4 0.0244290959 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -67 0.7444445 0.07216114 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.0524144545 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.0265891217 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Not-in-family White Female United-States 0 -34 0.377777785 0.0392704271 0.5625 0 0.3611111 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.242310092 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Asian-Pac-Islander Male Philippines 0 -19 0.211111113 0.1678091 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Own-child White Male United-States 0 -19 0.211111113 0.0301723238 0.625 0 0 0.151515156 Private Some-college Never-married Farming-fishing Not-in-family White Female United-States 0 -25 0.2777778 0.110788338 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -53 0.5888889 0.0326078236 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.175978392 0.625 0 0.3677686 0.4040404 ? Some-college Never-married ? Own-child Black Female Cambodia 0 -31 0.344444454 0.0246459749 0.5625 0 0 0.9191919 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -33 0.366666675 0.189211324 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -33 0.366666675 0.01994807 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Other-service Not-in-family Black Male United-States 0 -45 0.5 0.140635341 0.9375 0.25236252 0 0.363636374 Self-emp-inc Prof-school Divorced Prof-specialty Unmarried White Male United-States 1 -35 0.3888889 0.12745966 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 -20 0.222222224 0.02554851 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 -36 0.4 0.122384585 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.09937867 0.5625 0 0 0.858585835 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.2066296 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -45 0.5 0.17576085 0.875 0 0 0.4040404 ? Masters Married-civ-spouse ? Husband White Male United-States 0 -45 0.5 0.128245011 0.9375 0.25236252 0 0.363636374 State-gov Prof-school Divorced Prof-specialty Unmarried Black Male United-States 1 -24 0.266666681 0.155067176 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Other-relative White Male Mexico 0 -28 0.311111122 0.0316473655 0.6875 0.0217402168 0 0.363636374 Private Assoc-voc Never-married Tech-support Own-child White Female United-States 0 -63 0.7 0.202806622 0.4375 0 0 0.222222224 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.177194133 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 -25 0.2777778 0.0254198648 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 -36 0.4 0.0780181959 0.6875 0.07298073 0 0.5555556 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 -44 0.4888889 0.101081364 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -49 0.544444442 0.09985418 0.5625 0 0 0.282828271 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Female United-States 0 -52 0.5777778 0.123668343 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.174289167 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -35 0.3888889 0.19374758 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Male United-States 0 -51 0.566666663 0.06462294 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.0210594032 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.203507766 0.8125 0.07298073 0 0.4040404 Local-gov Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male Philippines 1 -28 0.311111122 0.168474555 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -37 0.411111116 0.118591234 0.625 0 0 0.5050505 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -65 0.722222269 0.0158819426 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.110234022 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Female United-States 0 -30 0.333333343 0.0296038613 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.09756821 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.04140486 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -57 0.6333333 0.09535228 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -40 0.444444448 0.151989788 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -42 0.466666669 0.2269077 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 -31 0.344444454 0.1415527 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.11522828 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 -42 0.466666669 0.09654578 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Female United-States 0 -25 0.2777778 0.1896855 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -40 0.444444448 0.2760966 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -65 0.722222269 0.15118964 0.9375 0.251242518 0 0.8080808 ? Prof-school Never-married ? Not-in-family White Male United-States 1 -29 0.322222233 0.10592138 0.875 0 0 0.454545468 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -31 0.344444454 0.0976281539 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -71 0.788888931 0.204660192 0.875 0.0205002055 0 0.2020202 Local-gov Masters Widowed Exec-managerial Not-in-family White Male United-States 0 -34 0.377777785 0.07024493 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -25 0.2777778 0.131663188 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Other-relative White Male United-States 0 -40 0.444444448 0.130662322 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -67 0.7444445 0.07086661 0.625 0 0 0.25252524 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.09914832 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.116915487 0.5625 0 0 0.181818187 Private HS-grad Never-married Sales Own-child Black Female United-States 0 -38 0.422222227 0.126536921 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.167655528 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male Guatemala 0 -42 0.466666669 0.188865811 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male Haiti 0 -36 0.4 0.115080774 0.5625 0 0 0.323232323 State-gov HS-grad Separated Other-service Own-child White Female United-States 0 -23 0.25555557 0.2756305 0.125 0 0 0.4040404 Self-emp-not-inc 1st-4th Married-civ-spouse Sales Other-relative White Male United-States 0 -56 0.622222245 0.2291169 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -36 0.4 0.0276263636 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.280430138 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 -39 0.433333337 0.176131964 0.5 0 0 0.4040404 Private 12th Divorced Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.138448387 0.9375 0 0 0.4040404 State-gov Prof-school Divorced Prof-specialty Own-child Asian-Pac-Islander Female Philippines 0 -44 0.4888889 0.165229455 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.103512146 0.4375 0 0 0.5252525 Private 11th Divorced Machine-op-inspct Unmarried Black Female United-States 0 -19 0.211111113 0.114337869 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -37 0.411111116 0.066931814 0.375 0 0 0.5555556 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -57 0.6333333 0.09392573 0.5625 0 0 0.161616161 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -54 0.6 0.153452709 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.143479 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 -22 0.244444445 0.0161702167 0.625 0 0 0.727272749 ? Some-college Never-married ? Own-child White Male United-States 0 -63 0.7 0.022554649 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.12658003 0.5625 0 0 0.2020202 Self-emp-inc HS-grad Married-civ-spouse Other-service Wife White Female Poland 0 -26 0.2888889 0.283935875 0.4375 0 0 0.25252524 Private 11th Married-civ-spouse Other-service Other-relative White Male United-States 0 -40 0.444444448 0.07406791 0.4375 0 0 0.2020202 Private 11th Divorced Other-service Other-relative White Female United-States 0 -20 0.222222224 0.07868903 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -39 0.433333337 0.07891534 0.375 0.0263502635 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.072035186 0.5625 0 0 0.424242437 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -30 0.333333343 0.0603655279 0.625 0 0 0.05050505 Private Some-college Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female United-States 1 -42 0.466666669 0.131027386 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -42 0.466666669 0.09699031 0.5625 0 0 0.5050505 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -21 0.233333334 0.1361981 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -40 0.444444448 0.07392849 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 -36 0.4 0.197055981 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Unmarried White Female United-States 0 -67 0.7444445 0.07089085 0.625 0.0797807947 0 0.353535354 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 -65 0.722222269 0.06368403 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -50 0.5555556 0.0312526748 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -18 0.2 0.101804741 0.375 0 0 0.272727281 Private 10th Never-married Farming-fishing Own-child White Male United-States 0 -31 0.344444454 0.133150354 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -36 0.4 0.121557482 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.1224223 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -34 0.377777785 0.256719679 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.111452445 0.5625 0 0 0.3939394 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -38 0.422222227 0.128088742 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 -17 0.188888893 0.199360147 0.375 0 0 0.2020202 Private 10th Never-married Adm-clerical Own-child White Female United-States 0 -52 0.5777778 0.1335363 0.5625 0 0 0.3030303 Without-pay HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -34 0.377777785 0.12823087 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 -30 0.333333343 0.277199864 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 -49 0.544444442 0.17654416 0.9375 0 0 0.4848485 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -45 0.5 0.120510139 0.3125 0 0 0.151515156 Private 9th Never-married Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.129967242 0.8125 0 0.5544077 0.353535354 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 -34 0.377777785 0.141131073 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -21 0.233333334 0.0695606247 0.5 0.04508045 0 0.3030303 Self-emp-not-inc 12th Married-civ-spouse Adm-clerical Wife White Female Portugal 0 -17 0.188888893 0.14554137 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Own-child White Female United-States 0 -23 0.25555557 0.4283794 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Male United-States 0 -32 0.355555564 0.104923874 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -22 0.244444445 0.0921886861 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -48 0.533333361 0.08221566 0.5625 0 0 0.353535354 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -27 0.3 0.233316392 0.8125 0 0 0.5050505 State-gov Bachelors Never-married Prof-specialty Unmarried White Male United-States 0 -43 0.477777779 0.07941982 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family White Male United-States 0 -44 0.4888889 0.0134127662 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Philippines 0 -55 0.6111111 0.171996459 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.4735668 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -34 0.377777785 0.04201104 0.5625 0 0 0.4848485 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -34 0.377777785 0.06482433 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -37 0.411111116 0.234926134 0.8125 0 0 0.4040404 Private Bachelors Divorced Other-service Not-in-family White Male United-States 0 -21 0.233333334 0.0921886861 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -35 0.3888889 0.2615011 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -28 0.311111122 0.0321835 0.625 0 0 0.3030303 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -62 0.6888889 0.130778164 0.5625 0.0217402168 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -40 0.444444448 0.3669362 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -34 0.377777785 0.2926258 0.8125 0 0 0.3939394 Private Bachelors Never-married Machine-op-inspct Not-in-family White Female United-States 0 -32 0.355555564 0.21365793 0.875 0 0.365013778 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -70 0.7777778 0.149257258 0.625 0 0 0.343434334 Private Some-college Widowed Sales Not-in-family White Female United-States 0 -23 0.25555557 0.157412425 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -30 0.333333343 0.0751442239 0.5625 0 0 0.4848485 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -57 0.6333333 0.05376826 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 0 -34 0.377777785 0.129493073 0.9375 0 0 0.353535354 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.1614213 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband White Male Mexico 0 -41 0.455555558 0.0235649515 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.2756029 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male Mexico 0 -48 0.533333361 0.09128076 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.102484331 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -18 0.2 0.0952128544 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -35 0.3888889 0.144685984 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.0288993437 0.5625 0 0 0.4848485 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 -30 0.333333343 0.10898798 0.625 0 0 0.353535354 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -42 0.466666669 0.08575037 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -48 0.533333361 0.266293973 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Other-relative Black Male United-States 0 -70 0.7777778 0.124048889 0.5625 0 0 0.282828271 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -37 0.411111116 0.07588039 0.3125 0 0 0.353535354 Private 9th Divorced Craft-repair Own-child White Male United-States 0 -51 0.566666663 0.123734348 0.6875 0 0 0.4040404 Private Assoc-voc Separated Prof-specialty Unmarried White Female United-States 0 -35 0.3888889 0.292390764 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -59 0.655555546 0.111345351 0.8125 1 0 0.434343427 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -57 0.6333333 0.128643066 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.225993052 0.5625 0 0 0.2020202 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -26 0.2888889 0.118640408 0.1875 0 0 0.353535354 Private 5th-6th Separated Craft-repair Not-in-family Other Male Mexico 0 -19 0.211111113 0.183243811 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -34 0.377777785 0.1142072 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -56 0.622222245 0.127201036 0.8125 0.0861408561 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 -25 0.2777778 0.0470443629 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -46 0.51111114 0.133871034 0.9375 0 0.5544077 0.8080808 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.118158832 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -32 0.355555564 0.153806314 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Unmarried White Female ? 0 -72 0.8 0.191364616 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.07350484 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.112706564 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -76 0.844444454 0.0284292176 0.3125 0 0 0.25252524 ? 9th Widowed ? Not-in-family White Male United-States 0 -37 0.411111116 0.190577254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -42 0.466666669 0.204185352 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.176398009 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.113174 0.625 0.07298073 0 0.212121218 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -53 0.5888889 0.0481018126 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -28 0.311111122 0.1610623 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -69 0.7666667 0.135084078 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -20 0.222222224 0.1061093 0.625 0 0 0.272727281 Private Some-college Never-married Other-service Own-child White Male United-States 0 -33 0.366666675 0.171753988 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -47 0.5222222 0.155004531 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 1 -50 0.5555556 0.08416689 0.5625 0 0.453856736 0.353535354 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.02668207 0.625 0 0 0.454545468 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -20 0.222222224 0.0321127772 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -42 0.466666669 0.189475358 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -23 0.25555557 0.118624911 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Other-relative Asian-Pac-Islander Male Vietnam 0 -24 0.266666681 0.111368924 0.5625 0 0 0.5050505 ? HS-grad Separated ? Not-in-family Black Male Germany 0 -32 0.355555564 0.15886119 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -41 0.455555558 0.0960318744 0.8125 0 0 0.5050505 Private Bachelors Widowed Sales Unmarried Black Male United-States 0 -35 0.3888889 0.02579233 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.0750876442 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.127870515 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child Black Male United-States 0 -34 0.377777785 0.09825117 1 0 0 0.2020202 State-gov Doctorate Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male China 0 -23 0.25555557 0.0936293751 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Transport-moving Own-child Asian-Pac-Islander Male South 0 -30 0.333333343 0.142556265 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.116582081 0.875 0 0 0.454545468 Local-gov Masters Widowed Prof-specialty Unmarried White Female United-States 0 -26 0.2888889 0.0706093162 0.875 0 0.383149683 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -42 0.466666669 0.131422743 0.5625 0 0 0.6060606 ? HS-grad Married-civ-spouse ? Husband White Male Dominican-Republic 0 -39 0.433333337 0.02165144 0.875 0 0 0.6060606 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -52 0.5777778 0.190390691 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 1 -42 0.466666669 0.128242984 0.625 0 0 0.6060606 Private Some-college Separated Exec-managerial Not-in-family White Male Canada 0 -25 0.2777778 0.166379854 0.8125 0.0332503319 0 0.4848485 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -27 0.3 0.1335336 0.8125 0 0 0.353535354 Private Bachelors Never-married Sales Own-child White Male United-States 0 -30 0.333333343 0.116351739 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Never-married Craft-repair Own-child White Male United-States 0 -23 0.25555557 0.193969846 0.8125 0.105201051 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -47 0.5222222 0.0823779851 0.8125 0 0.4331956 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -58 0.644444466 0.117879987 0.8125 0 0 0.25252524 ? Bachelors Divorced ? Not-in-family White Male United-States 0 -18 0.2 0.11462412 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -52 0.5777778 0.101577081 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -24 0.266666681 0.162446409 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -58 0.644444466 0.117776938 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.020562334 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -31 0.344444454 0.203162923 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Farming-fishing Own-child White Male United-States 0 -46 0.51111114 0.285054624 0.625 0.03103031 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.14466241 0.875 0.05178052 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.163609609 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Other-relative White Female United-States 0 -52 0.5777778 0.1290014 0.625 0 0.399449021 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -24 0.266666681 0.07904803 0.8125 0 0 0.353535354 Private Bachelors Never-married Sales Own-child White Female United-States 0 -22 0.244444445 0.2243934 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -39 0.433333337 0.130167276 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Mexico 0 -34 0.377777785 0.187497184 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -58 0.644444466 0.0750277042 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.06902112 0.8125 0 0 0.25252524 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -29 0.322222233 0.01781566 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Amer-Indian-Eskimo Male United-States 0 -67 0.7444445 0.140860975 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -28 0.311111122 0.142078727 0.75 0 0 0.353535354 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife Black Female Haiti 0 -62 0.6888889 0.07747196 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -54 0.6 0.03625838 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 1 -36 0.4 0.101068564 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -18 0.2 0.08627034 0.5 0 0 0.181818187 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 -25 0.2777778 0.0191775467 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.104740672 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Female United-States 0 -56 0.622222245 0.111345351 0.375 0 0 0.7070707 Private 10th Married-civ-spouse Craft-repair Husband White Male ? 0 -30 0.333333343 0.115773171 0.9375 0 0 0.24242425 Private Prof-school Never-married Tech-support Own-child White Female United-States 0 -41 0.455555558 0.124642268 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -59 0.655555546 0.186591953 0.5625 0 0 0.6060606 Private HS-grad Divorced Tech-support Unmarried White Male United-States 1 -36 0.4 0.112214886 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.06563795 0.5625 0 0 0.545454562 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -27 0.3 0.091664 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -19 0.211111113 0.0416614749 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Other-relative White Female United-States 0 -30 0.333333343 0.123102568 0.8125 0 0 0.151515156 Private Bachelors Never-married Other-service Not-in-family Asian-Pac-Islander Male China 0 -47 0.5222222 0.2821847 0.6875 0 0 0.25252524 Private Assoc-voc Divorced Sales Unmarried Black Female United-States 0 -39 0.433333337 0.07204192 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.0551261045 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male United-States 0 -44 0.4888889 0.07135155 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -37 0.411111116 0.0245334934 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -28 0.311111122 0.4008123 0.625 0 0 0.6363636 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.100368761 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.154652268 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -44 0.4888889 0.02257755 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.04751045 0.625 0.04386044 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -53 0.5888889 0.07121146 0.5625 0 0 0.282828271 State-gov HS-grad Married-civ-spouse Other-service Wife Amer-Indian-Eskimo Female United-States 1 -31 0.344444454 0.130136967 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Own-child White Male United-States 0 -18 0.2 0.09251872 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -43 0.477777779 0.07064838 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -30 0.333333343 0.100644238 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -19 0.211111113 0.11896909 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -36 0.4 0.123444729 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.152067244 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -25 0.2777778 0.136115253 0.875 0 0 0.6060606 Private Masters Never-married Prof-specialty Own-child White Female United-States 0 -36 0.4 0.08294644 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.113279745 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Unmarried White Female United-States 0 -42 0.466666669 0.02257755 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.164125532 0.625 0 0 0.4040404 State-gov Some-college Never-married Tech-support Not-in-family White Female United-States 0 -38 0.422222227 0.111064486 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.176654622 0.625 0.0378103778 0 0.4040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -33 0.366666675 0.195738554 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -52 0.5777778 0.134211853 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family Black Male United-States 0 -30 0.333333343 0.139871553 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Male United-States 0 -18 0.2 0.0206687525 0.625 0 0 0.1010101 State-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 -24 0.266666681 0.01881788 0.625 0 0 0.24242425 State-gov Some-college Married-civ-spouse Other-service Husband Asian-Pac-Islander Male ? 0 -17 0.188888893 0.295678943 0.375 0 0 0.4040404 Private 10th Never-married Other-service Other-relative White Male Mexico 0 -48 0.533333361 0.102993526 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -66 0.733333349 0.125297621 0.25 0 0 0.323232323 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -46 0.51111114 0.200550959 0.625 0 0 0.4040404 Local-gov Some-college Divorced Tech-support Not-in-family White Female United-States 0 -55 0.6111111 0.115337394 0.5625 0 0 0.6060606 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 1 -28 0.311111122 0.138807371 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -33 0.366666675 0.123116717 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -44 0.4888889 0.112968571 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -43 0.477777779 0.108219482 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -42 0.466666669 0.1311439 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -39 0.433333337 0.171769485 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Unmarried Black Female United-States 0 -23 0.25555557 0.137832776 0.375 0 0 0.5050505 Private 10th Never-married Handlers-cleaners Unmarried White Male United-States 0 -20 0.222222224 0.119745679 0.625 0 0 0.2020202 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 -29 0.322222233 0.036998596 0.625 0 0 0.353535354 Private Some-college Divorced Craft-repair Unmarried White Male United-States 1 -54 0.6 0.0616324469 0.625 0 0 0.656565666 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.133786842 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.152990669 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -59 0.655555546 0.09136293 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.03738655 0.25 0 0 0.4040404 Private 7th-8th Divorced Farming-fishing Unmarried White Female United-States 0 -37 0.411111116 0.117809266 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Own-child White Male United-States 0 -45 0.5 0.118491553 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.106072254 0.875 0.07298073 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.221689835 0.625 0 0 0.444444448 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -67 0.7444445 0.0550688542 0.875 0 0 0.02020202 ? Masters Married-civ-spouse ? Husband White Male United-States 0 -49 0.544444442 0.068914704 0.75 0 0 0.25252524 Self-emp-not-inc Assoc-acdm Divorced Exec-managerial Not-in-family White Male United-States 0 -30 0.333333343 0.179472014 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -56 0.622222245 0.07227968 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 -29 0.322222233 0.07688935 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.0835533 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.0971917 0.625 0 0 0.424242437 Private Some-college Never-married Sales Own-child White Male United-States 0 -28 0.311111122 0.1190021 0.6875 0 0 0.7070707 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -23 0.25555557 0.158053622 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -39 0.433333337 0.120527647 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Wife White Female United-States 0 -37 0.411111116 0.4094066 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -39 0.433333337 0.136685073 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 -32 0.355555564 0.05618153 0.8125 0 0 0.353535354 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -26 0.2888889 0.143326789 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -57 0.6333333 0.129492387 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Own-child White Male United-States 0 -36 0.4 0.07577061 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Sales Own-child White Male United-States 1 -30 0.333333343 0.06568376 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.108420193 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.217505172 0.625 0 0 0.5555556 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -22 0.244444445 0.271783948 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -43 0.477777779 0.222383574 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.18734698 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -30 0.333333343 0.0263042152 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -57 0.6333333 0.114694171 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 -42 0.466666669 0.226740673 0.6875 0 0 0.4040404 Private Assoc-voc Separated Prof-specialty Unmarried White Female United-States 0 -29 0.322222233 0.177924916 0.6875 0 0 0.454545468 Private Assoc-voc Divorced Other-service Unmarried White Female Columbia 0 -44 0.4888889 0.292115271 0.5625 0 0 0.5252525 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -28 0.311111122 0.0182150658 0.75 0 0 0.434343427 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 0 -42 0.466666669 0.111536637 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -26 0.2888889 0.1076032 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Male United-States 0 -29 0.322222233 0.259372741 0.625 0 0 0.363636374 Private Some-college Divorced Prof-specialty Own-child White Female United-States 0 -42 0.466666669 0.1271687 0.8125 0 0 0.3030303 Private Bachelors Divorced Adm-clerical Unmarried White Male United-States 0 -30 0.333333343 0.112800859 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -21 0.233333334 0.130730346 0.625 0 0 0.1010101 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 -59 0.655555546 0.1228931 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.06891807 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 -56 0.622222245 0.156353623 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -39 0.433333337 0.230174348 0.0625 0 0 0.121212125 Private Preschool Never-married Other-service Not-in-family White Female United-States 0 -21 0.233333334 0.138753489 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Own-child Black Male United-States 0 -48 0.533333361 0.231975377 0.8125 0 0 0.373737365 Private Bachelors Married-spouse-absent Prof-specialty Not-in-family White Male United-States 1 -35 0.3888889 0.2506424 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband Black Male United-States 0 -43 0.477777779 0.0187013578 0.8125 0 0 0.6060606 Private Bachelors Separated Exec-managerial Unmarried White Male United-States 1 -23 0.25555557 0.0948094055 0.6875 0 0 0.151515156 Private Assoc-voc Never-married Other-service Own-child White Female United-States 0 -17 0.188888893 0.1086135 0.375 0 0 0.121212125 ? 10th Never-married ? Other-relative White Male United-States 0 -41 0.455555558 0.0149531392 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 -35 0.3888889 0.125981927 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 -22 0.244444445 0.09267228 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 -53 0.5888889 0.184734344 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.230185121 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 -36 0.4 0.147195578 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried Black Female United-States 0 -44 0.4888889 0.12798503 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -27 0.3 0.149144784 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female Cuba 1 -39 0.433333337 0.0351497456 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -59 0.655555546 0.106941111 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.0347159877 0.625 0 0 0.4848485 Local-gov Some-college Never-married Other-service Not-in-family White Male United-States 0 -17 0.188888893 0.09855763 0.5 0 0 0.232323229 Private 12th Never-married Sales Own-child White Female United-States 0 -31 0.344444454 0.267707735 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.07111985 0.625 0 0 0.121212125 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -39 0.433333337 0.0526508652 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 -46 0.51111114 0.037298318 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -31 0.344444454 0.174399629 0.5625 0 0 0.8080808 Private HS-grad Married-spouse-absent Other-service Not-in-family White Female Italy 0 -27 0.3 0.0260024723 0.8125 0 0.3452709 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -18 0.2 0.1480705 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -46 0.51111114 0.105695076 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.108009338 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -48 0.533333361 0.12942706 0.8125 0 0 0.434343427 Private Bachelors Divorced Handlers-cleaners Not-in-family White Male United-States 0 -53 0.5888889 0.140479088 0.5625 0 0 0.262626261 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -44 0.4888889 0.123102568 0.8125 0 0 0.4848485 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male South 1 -43 0.477777779 0.101763651 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -50 0.5555556 0.109787472 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Other-relative White Female United-States 0 -56 0.622222245 0.104840361 0.25 0 0 0.2020202 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Female Yugoslavia 0 -27 0.3 0.146513954 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -20 0.222222224 0.16461587 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -18 0.2 0.102499828 0.375 0 0 0.0606060624 Local-gov 10th Never-married Protective-serv Own-child White Female United-States 0 -34 0.377777785 0.0375273228 0.5625 0 0.4242424 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.135686219 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -40 0.444444448 0.0972388461 0.8125 0 0 0.151515156 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.186591953 0.625 0 0 0.4040404 Private Some-college Divorced Protective-serv Not-in-family White Male United-States 0 -35 0.3888889 0.3117333 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Wife Black Female United-States 1 -26 0.2888889 0.135165572 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -54 0.6 0.08053115 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male Puerto-Rico 1 -22 0.244444445 0.129330069 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -52 0.5777778 0.0571211129 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -33 0.366666675 0.06745717 0.375 0 0 0.4040404 Private 10th Separated Handlers-cleaners Not-in-family White Male United-States 0 -42 0.466666669 0.114085294 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.0295594074 0.5625 0 0 0.1010101 Without-pay HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -45 0.5 0.03654598 0.625 0 0 1 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 -53 0.5888889 0.107682 0.5625 0.03103031 0 0.727272749 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -46 0.51111114 0.108084776 0.5625 0 0.365013778 0.434343427 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -25 0.2777778 0.320827365 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -90 1 0.0352837779 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 0 -33 0.366666675 0.056355305 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Female United-States 0 -45 0.5 0.116494521 0.625 0 0 0.7070707 Private Some-college Divorced Protective-serv Not-in-family White Male United-States 0 -47 0.5222222 0.129289657 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 1 -38 0.422222227 0.0275846049 0.875 0 0 0.434343427 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -35 0.3888889 0.06606026 0.9375 0.04787048 0 0.454545468 ? Prof-school Never-married ? Not-in-family Asian-Pac-Islander Male Japan 1 -37 0.411111116 0.118301615 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -53 0.5888889 0.13281022 0.875 0 0 0.7070707 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.126149639 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.0274950247 0.4375 0 0 0.151515156 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -44 0.4888889 0.154056877 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male ? 0 -50 0.5555556 0.161982343 0.625 0 0 0.363636374 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 -26 0.2888889 0.0349975266 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Not-in-family Black Male United-States 0 -36 0.4 0.117792428 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -37 0.411111116 0.06456165 0.4375 0 0 0.4040404 Private 11th Divorced Handlers-cleaners Not-in-family White Female United-States 0 -32 0.355555564 0.243993923 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -38 0.422222227 0.0208229925 0.75 0 0 0.6060606 Self-emp-not-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -62 0.6888889 0.103150457 0.5625 0 0 0.8484849 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.113096543 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.0304141231 0.5625 0.0217402168 0 0.414141417 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -37 0.411111116 0.06652904 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.1413082 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Female ? 0 -38 0.422222227 0.123795636 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 -35 0.3888889 0.0367716141 0.5 0 0 0.4040404 Private 12th Never-married Sales Not-in-family Black Female United-States 0 -34 0.377777785 0.0536382645 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child Amer-Indian-Eskimo Female United-States 0 -50 0.5555556 0.08524656 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -28 0.311111122 0.157469675 0.625 0.07298073 0 0.323232323 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -67 0.7444445 0.129183918 0.8125 0.06360064 0 0.353535354 Local-gov Bachelors Divorced Adm-clerical Unmarried Black Female United-States 0 -34 0.377777785 0.3550618 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -19 0.211111113 0.09393516 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 -23 0.25555557 0.0434564464 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -50 0.5555556 0.06583194 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -45 0.5 0.107882038 0.875 0.07688077 0 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.236407235 0.5 0 0 0.161616161 Private 12th Never-married Other-service Own-child White Male United-States 0 -59 0.655555546 0.123146355 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 1 -25 0.2777778 0.09649526 0.5625 0 0 0.4848485 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.233272612 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -50 0.5555556 0.1159658 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.103074349 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Female United-States 0 -63 0.7 0.134792432 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.13771759 0.875 0 0 0.434343427 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -45 0.5 0.237765759 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -25 0.2777778 0.130896032 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -20 0.222222224 0.0389962979 0.5 0 0 0.4040404 Private 12th Never-married Farming-fishing Own-child White Male United-States 0 -31 0.344444454 0.110935844 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Female ? 0 -42 0.466666669 0.18119964 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male France 0 -56 0.622222245 0.0565243624 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.108201295 0.5625 0 0 0.464646459 Private HS-grad Never-married Farming-fishing Unmarried White Female United-States 0 -69 0.7666667 0.08448614 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -42 0.466666669 0.165696889 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -19 0.211111113 0.146114558 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Other-relative Other Female Guatemala 0 -56 0.622222245 0.0446930528 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -33 0.366666675 0.104385048 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -61 0.677777767 0.132895768 0.875 0 0 0.4040404 Federal-gov Masters Widowed Prof-specialty Unmarried White Female United-States 0 -38 0.422222227 0.203234315 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -50 0.5555556 0.2701668 0.5625 1 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.06652904 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 1 -35 0.3888889 0.02190873 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -27 0.3 0.119295754 0.625 0 0 0.444444448 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -40 0.444444448 0.130345091 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -59 0.655555546 0.129492387 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.09828013 0.625 0 0 0.151515156 ? Some-college Never-married ? Not-in-family White Female United-States 0 -42 0.466666669 0.1447008 0.5625 0 0 0.3030303 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -59 0.655555546 0.118549481 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried White Male United-States 0 -54 0.6 0.09917054 1 0 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.107212543 0.625 0 0.43663913 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -53 0.5888889 0.105046459 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -20 0.222222224 0.242780223 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -54 0.6 0.07723689 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.06446264 0.875 0 0 0.454545468 Self-emp-not-inc Masters Never-married Exec-managerial Not-in-family Asian-Pac-Islander Male United-States 1 -33 0.366666675 0.0678478256 0.5625 0 0 0.5555556 Local-gov HS-grad Divorced Tech-support Not-in-family White Female United-States 0 -35 0.3888889 0.127279162 0.5625 0 0 0.3030303 Private HS-grad Widowed Exec-managerial Unmarried White Female United-States 0 -22 0.244444445 0.109561831 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Own-child White Male Portugal 0 -45 0.5 0.0191937126 0.8125 0 0.3409091 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -29 0.322222233 0.121746749 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -56 0.622222245 0.233470634 0.875 0 0.5369605 0.6060606 Self-emp-not-inc Masters Divorced Sales Unmarried White Female United-States 0 -23 0.25555557 0.0314170159 0.8125 0 0 0.25252524 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.136901274 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -17 0.188888893 0.09057692 0.4375 0 0 0.25252524 Private 11th Never-married Priv-house-serv Own-child White Female United-States 0 -35 0.3888889 0.057619527 0.625 0 0 0.4040404 Local-gov Some-college Separated Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 -25 0.2777778 0.132008716 0.125 0 0 0.4040404 Private 1st-4th Never-married Priv-house-serv Not-in-family White Female Guatemala 0 -42 0.466666669 0.09989594 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 -42 0.466666669 0.1532062 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative Black Male United-States 0 -19 0.211111113 0.0461721346 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -32 0.355555564 0.169903785 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.0202909 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -53 0.5888889 0.204992235 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.115826376 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Widowed Exec-managerial Unmarried Asian-Pac-Islander Female Thailand 0 -24 0.266666681 0.138639659 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -30 0.333333343 0.147261575 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Prof-specialty Wife Black Female United-States 1 -42 0.466666669 0.101412743 0.5625 0 0 0.454545468 Private HS-grad Separated Sales Unmarried White Female United-States 0 -19 0.211111113 0.257787228 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 -37 0.411111116 0.09358088 0.4375 0 0 0.373737365 Self-emp-not-inc 11th Never-married Farming-fishing Own-child White Male United-States 0 -26 0.2888889 0.173978 0.375 0 0 1 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -25 0.2777778 0.128043622 0.5625 0 0.3946281 0.161616161 Local-gov HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -52 0.5777778 0.102628469 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.0955577046 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -40 0.444444448 0.0536039174 0.9375 1 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 1 -32 0.355555564 0.105939567 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Handlers-cleaners Other-relative White Male United-States 0 -37 0.411111116 0.124265768 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.0738759562 0.875 0 0.3996786 0.353535354 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.13459374 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.0158583689 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -28 0.311111122 0.118346743 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -27 0.3 0.03504265 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female South 0 -61 0.677777767 0.212821409 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -47 0.5222222 0.136270851 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -30 0.333333343 0.169612825 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Machine-op-inspct Unmarried Black Female United-States 0 -54 0.6 0.136131421 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 -56 0.622222245 0.146038443 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 -69 0.7666667 0.09810434 0.625 0 0 0.24242425 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.09232541 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -36 0.4 0.102795504 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Canada 1 -42 0.466666669 0.0183484256 0.4375 0 0 0.6060606 Self-emp-not-inc 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -45 0.5 0.241288349 0.8125 0 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.124009147 0.8125 0.07688077 0 0.2020202 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -26 0.2888889 0.202255666 0.4375 0 0 0.4040404 Private 11th Divorced Adm-clerical Own-child White Female United-States 0 -28 0.311111122 0.101024114 0.8125 0 0 0.424242437 Local-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 1 -31 0.344444454 0.127809227 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.228652835 0.1875 0 0 0.6060606 Private 5th-6th Separated Farming-fishing Other-relative White Male Mexico 0 -51 0.566666663 0.0679818541 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Other-relative White Female United-States 0 -29 0.322222233 0.238807037 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.109525464 0.875 0 0.518365443 0.6060606 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -64 0.7111111 0.191992357 0.625 0 0 0.1010101 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 0 -26 0.2888889 0.117898174 0.625 0 0 0.4040404 State-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 -68 0.75555557 0.030651208 0.1875 0 0 0.222222224 Private 5th-6th Married-spouse-absent Sales Not-in-family White Male United-States 0 -32 0.355555564 0.116757877 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.116932996 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -51 0.566666663 0.122949004 0.125 0 0 0.4040404 ? 1st-4th Separated ? Unmarried White Female Mexico 0 -21 0.233333334 0.09635719 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -26 0.2888889 0.09291475 0.375 0 0 0.4040404 ? 10th Separated ? Other-relative White Female Puerto-Rico 0 -33 0.366666675 0.197388038 0.8125 0 0 0.4040404 Local-gov Bachelors Married-spouse-absent Prof-specialty Other-relative Black Male ? 0 -26 0.2888889 0.254430354 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -52 0.5777778 0.102628469 0.5625 0.02105021 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.130313426 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.1867866 0.5625 0 0 0.454545468 Local-gov HS-grad Never-married Protective-serv Unmarried White Male United-States 0 -19 0.211111113 0.0465964638 0.625 0 0 0.272727281 Private Some-college Never-married Other-service Own-child White Female United-States 0 -51 0.566666663 0.1479075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -45 0.5 0.08713583 0.3125 0 0 0.4040404 Private 9th Separated Other-service Unmarried Other Female Trinadad&Tobago 0 -20 0.222222224 0.317150563 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Sales Own-child Black Male United-States 0 -40 0.444444448 0.135874808 0.625 0 0 0.4848485 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -43 0.477777779 0.03936607 1 1 0 0.5555556 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.0617557019 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -46 0.51111114 0.112174474 0.625 0 0 0.24242425 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.197563827 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -20 0.222222224 0.147680521 0.3125 0 0 0.5050505 Private 9th Never-married Transport-moving Not-in-family White Male United-States 0 -38 0.422222227 0.27169776 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -44 0.4888889 0.247691631 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female Mexico 0 -24 0.266666681 0.08654042 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.07500682 0.9375 0 0 0.75757575 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.162233576 0.25 0 0 0.353535354 Private 7th-8th Never-married Other-service Other-relative White Male United-States 0 -36 0.4 0.109973364 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -31 0.344444454 0.280469865 0.5625 0 0 0.454545468 Private HS-grad Separated Adm-clerical Not-in-family White Male United-States 0 -46 0.51111114 0.188609868 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Husband White Male Mexico 0 -46 0.51111114 0.16922082 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -46 0.51111114 0.112587348 0.625 0 0 0.7070707 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -29 0.322222233 0.109016269 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Other-service Not-in-family Other Female Columbia 0 -37 0.411111116 0.107789092 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.128109634 0.25 0 0 0.25252524 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -28 0.311111122 0.108634375 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Black Female United-States 0 -28 0.311111122 0.075707294 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Protective-serv Own-child White Male United-States 0 -48 0.533333361 0.16079019 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -52 0.5777778 0.110816628 0.4375 0 0 0.2020202 Private 11th Divorced Machine-op-inspct Not-in-family Black Female United-States 0 -19 0.211111113 0.307517 0.5625 0 0 0.353535354 Private HS-grad Never-married Farming-fishing Other-relative White Male United-States 0 -31 0.344444454 0.119670242 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.166187227 0.8125 1 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.0693424 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.151032031 0.625 0 0 0.02020202 ? Some-college Never-married ? Own-child White Male United-States 0 -46 0.51111114 0.1047272 0.75 0 0 0.444444448 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.105611555 0.5625 0.03103031 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -50 0.5555556 0.113296583 0.875 0 0.43663913 0.454545468 Private Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.223205954 0.25 0.0394203924 0 0.8484849 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male Portugal 0 -40 0.444444448 0.176127255 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -58 0.644444466 0.24618426 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family Other Male Mexico 0 -36 0.4 0.126623809 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.1282073 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 -17 0.188888893 0.112317935 0.5 0 0 0.4040404 ? 12th Never-married ? Own-child White Female United-States 0 -49 0.544444442 0.11333026 0.375 0 0 0.4848485 Private 10th Divorced Other-service Not-in-family White Male United-States 0 -39 0.433333337 0.082178615 0.875 0.05178052 0 0.3838384 State-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -46 0.51111114 0.11177507 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -26 0.2888889 0.2532355 0.5625 0 0 0.373737365 Private HS-grad Separated Sales Unmarried Black Female United-States 0 -40 0.444444448 0.273766845 0.875 0 0 0.4040404 Federal-gov Masters Never-married Tech-support Not-in-family White Female United-States 0 -53 0.5888889 0.155904368 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -60 0.6666667 0.0531506278 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.04654595 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -22 0.244444445 0.122843936 0.625 0 0 0.121212125 ? Some-college Never-married ? Not-in-family Asian-Pac-Islander Female Thailand 0 -31 0.344444454 0.113828674 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -45 0.5 0.1548907 0.5625 0.135501355 0 0.5050505 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 1 -34 0.377777785 0.284794629 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried White Male Mexico 0 -27 0.3 0.155533925 0.875 0 0 0.4040404 State-gov Masters Never-married Exec-managerial Not-in-family White Male Scotland 0 -40 0.444444448 0.131940022 0.625 0 0 0.4040404 Private Some-college Divorced Transport-moving Not-in-family Black Female United-States 0 -68 0.75555557 0.110019162 0.5625 0 0 0.323232323 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 -51 0.566666663 0.0556110479 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.0582641 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -43 0.477777779 0.120414495 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.117157958 0.8125 0 0 0.272727281 State-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -48 0.533333361 0.119087629 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -42 0.466666669 0.016038876 0.625 0.0288502872 0 0.3030303 Self-emp-inc Some-college Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 -51 0.566666663 0.141937956 0.5625 0.105201051 0 0.4040404 Self-emp-inc HS-grad Never-married Exec-managerial Not-in-family White Male United-States 1 -32 0.355555564 0.231553748 0.5625 0.0501305 0 0.5555556 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.07667382 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.08153472 0.5625 0 0 0.7070707 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -71 0.788888931 0.03513897 0.25 0 0 0.454545468 ? 7th-8th Divorced ? Unmarried White Male United-States 0 -17 0.188888893 0.3812535 0.375 0 0 0.08080808 Private 10th Never-married Other-service Own-child White Male United-States 0 -37 0.411111116 0.0454184525 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -26 0.2888889 0.0262772739 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Priv-house-serv Wife Other Female Dominican-Republic 0 -17 0.188888893 0.0349827074 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Female United-States 0 -34 0.377777785 0.067804046 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male United-States 1 -46 0.51111114 0.1048417 0.4375 0 0.43663913 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 -33 0.366666675 0.0760063455 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male ? 0 -41 0.455555558 0.0216777083 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -59 0.655555546 0.0931969658 0.375 0 0 0.4040404 Private 10th Married-spouse-absent Protective-serv Not-in-family Asian-Pac-Islander Male India 0 -50 0.5555556 0.1160372 0.5625 0.07688077 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.121576339 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -45 0.5 0.11333026 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.0573353 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -31 0.344444454 0.07667382 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -32 0.355555564 0.1329941 0.5625 0.0147101469 0 0.3838384 Private HS-grad Divorced Tech-support Unmarried White Female United-States 0 -28 0.311111122 0.133295849 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.2132336 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.226554781 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Exec-managerial Unmarried White Male United-States 0 -39 0.433333337 0.09639828 0.6875 0 0.5544077 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.14141193 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.141451 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -37 0.411111116 0.1512361 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.185661808 0.25 0.0297702979 0 0.4040404 Private 7th-8th Married-spouse-absent Machine-op-inspct Unmarried White Female Puerto-Rico 0 -45 0.5 0.05931212 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Machine-op-inspct Unmarried Asian-Pac-Islander Female South 0 -43 0.477777779 0.13194339 0.5625 0.07298073 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -49 0.544444442 0.029100731 0.9375 0 0 0.5555556 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 -37 0.411111116 0.13669382 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -26 0.2888889 0.103786953 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 -34 0.377777785 0.07551332 0.9375 0 0.453856736 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.2397473 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.2555511 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -67 0.7444445 0.19288142 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -40 0.444444448 0.03238825 0.5625 0.07298073 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.2608397 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 1 -21 0.233333334 0.181883276 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 -39 0.433333337 0.04427681 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 1 -33 0.366666675 0.107690081 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.187268853 0.5625 0 0 0.6060606 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -21 0.233333334 0.178778946 0.625 0 0 0.3030303 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -68 0.75555557 0.03505882 0.6875 0.251242518 0 0.5050505 Self-emp-inc Assoc-voc Widowed Sales Not-in-family White Female United-States 1 -24 0.266666681 0.140689224 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 -24 0.266666681 0.154504091 0.4375 0.0246302467 0 0.4040404 Private 11th Never-married Farming-fishing Unmarried White Male United-States 0 -23 0.25555557 0.03604285 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -40 0.444444448 0.151675254 0.5625 0 0 0.6363636 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -48 0.533333361 0.112351611 0.8125 0 0 0.5050505 Private Bachelors Married-spouse-absent Exec-managerial Not-in-family White Female United-States 1 -42 0.466666669 0.1183225 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -45 0.5 0.248498529 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Protective-serv Not-in-family Black Female United-States 0 -31 0.344444454 0.131272539 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -53 0.5888889 0.136844024 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.180124 0.8125 0 0 0.5555556 Private Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 -32 0.355555564 0.0753254 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Other-service Husband Black Male United-States 0 -34 0.377777785 0.1337727 0.4375 0 0 0.25252524 Private 11th Married-civ-spouse Sales Husband White Male ? 0 -41 0.455555558 0.10042534 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -57 0.6333333 0.0815724358 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -25 0.2777778 0.08782688 0.375 0 0 0.4040404 Private 10th Never-married Farming-fishing Unmarried Amer-Indian-Eskimo Male United-States 0 -40 0.444444448 0.1433598 0.625 0 0.500229537 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -17 0.188888893 0.124063708 0.4375 0 0 0.13131313 Private 11th Never-married Sales Own-child White Female United-States 0 -17 0.188888893 0.0816909745 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Own-child White Male United-States 0 -82 0.9111111 0.0810989439 0.625 0 0 0.2020202 Self-emp-inc Some-college Widowed Sales Not-in-family White Male United-States 0 -40 0.444444448 0.110916309 0.75 0 0 0.323232323 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 -26 0.2888889 0.261878282 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family Black Male United-States 0 -37 0.411111116 0.198638111 0.625 0 0 0.4040404 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 -25 0.2777778 0.06848768 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -65 0.722222269 0.02438801 0.375 0 0 0.222222224 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -39 0.433333337 0.08350682 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family Asian-Pac-Islander Male China 0 -36 0.4 0.2290024 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.137285188 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.12378823 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -34 0.377777785 0.205844939 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -63 0.7 0.117316909 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -59 0.655555546 0.08881832 0.5625 0 0 0.353535354 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -49 0.544444442 0.0292846058 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.136812359 0.3125 0 0 0.4040404 ? 9th Never-married ? Unmarried White Female Dominican-Republic 0 -17 0.188888893 0.08001051 0.4375 0 0 0.09090909 Private 11th Never-married Sales Own-child White Female United-States 0 -28 0.311111122 0.183816314 0.375 0 0 0.3030303 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -45 0.5 0.149532065 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -40 0.444444448 0.2027386 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -45 0.5 0.133178651 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -20 0.222222224 0.117017187 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Own-child White Male United-States 0 -19 0.211111113 0.122980662 0.375 0 0 0.3838384 ? 10th Never-married ? Not-in-family White Female United-States 0 -59 0.655555546 0.06278082 0.8125 0 0 0.222222224 Local-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -41 0.455555558 0.0166787338 0.5625 0.07443074 0 0.4040404 Private HS-grad Divorced Transport-moving Unmarried White Male United-States 0 -49 0.544444442 0.1475182 0.625 0 0 0.4848485 Local-gov Some-college Divorced Exec-managerial Unmarried White Male United-States 1 -37 0.411111116 0.09242846 0.6875 0 0 0.454545468 Private Assoc-voc Divorced Sales Not-in-family White Male United-States 1 -31 0.344444454 0.1892834 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.157679811 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -27 0.3 0.0315672159 0.8125 0 0 0.151515156 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -20 0.222222224 0.109561831 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Other-relative White Male El-Salvador 0 -51 0.566666663 0.116717465 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.205535784 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -48 0.533333361 0.143431857 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.07562715 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -50 0.5555556 0.110593013 0.75 0.1502415 0 0.454545468 Private Assoc-acdm Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 -41 0.455555558 0.103022486 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.09792451 0.625 0 0 0.25252524 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -54 0.6 0.08053452 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.1834324 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -44 0.4888889 0.126435891 0.5625 0 0 0.414141417 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.09793798 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -42 0.466666669 0.140584156 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -34 0.377777785 0.137056187 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -46 0.51111114 0.222546577 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -35 0.3888889 0.0173792113 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.115275428 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.0556177832 0.9375 0.14084141 0 0.363636374 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 -30 0.333333343 0.2218791 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.124908321 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -21 0.233333334 0.135501 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -40 0.444444448 0.122763783 0.0625 0 0 0.4040404 Private Preschool Married-spouse-absent Adm-clerical Own-child White Male United-States 0 -56 0.622222245 0.06449968 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.08479261 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Poland 0 -21 0.233333334 0.0817718 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Other-service Own-child White Female United-States 0 -52 0.5777778 0.251475543 0.4375 0 0 0.4040404 Private 11th Widowed Craft-repair Not-in-family White Male United-States 0 -60 0.6666667 0.1117946 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.111459181 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.105670825 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.105585285 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -43 0.477777779 0.16445826 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male ? 0 -36 0.4 0.1480523 0.3125 0 0 0.353535354 Private 9th Married-civ-spouse Craft-repair Husband White Male Guatemala 0 -42 0.466666669 0.115740843 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -28 0.311111122 0.113506727 0.875 0.07688077 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -62 0.6888889 0.138507649 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Craft-repair Husband White Male United-States 1 -65 0.722222269 0.117803879 0.5625 0 0 0.4040404 ? HS-grad Separated ? Not-in-family White Female United-States 0 -45 0.5 0.06907702 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Canada 1 -47 0.5222222 0.040591903 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.2618197 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.145289466 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -44 0.4888889 0.11566069 0.5625 0 0 0.3939394 Private HS-grad Separated Other-service Unmarried White Female United-States 0 -25 0.2777778 0.1300265 0.5625 0 0 0.25252524 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 -21 0.233333334 0.205728412 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -29 0.322222233 0.09897522 0.6875 0 0 0.434343427 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -21 0.233333334 0.2169751 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -41 0.455555558 0.0510148481 0.9375 0 0 0.454545468 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male El-Salvador 1 -64 0.7111111 0.25640583 0.8125 0 0 0.08080808 ? Bachelors Married-civ-spouse ? Wife Black Female United-States 0 -55 0.6111111 0.06408613 0.625 0 0 1 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.0461162329 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -63 0.7 0.01862525 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -21 0.233333334 0.276444823 0.625 0 0 0.24242425 Private Some-college Never-married Sales Own-child White Male United-States 0 -28 0.311111122 0.0254737474 0.6875 0 0 0.5555556 Private Assoc-voc Never-married Sales Unmarried White Female ? 0 -45 0.5 0.153949782 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -21 0.233333334 0.09527347 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -34 0.377777785 0.0594158433 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female China 1 -53 0.5888889 0.03276139 0.5 0 0 0.353535354 Private 12th Never-married Other-service Not-in-family Other Female United-States 0 -45 0.5 0.124863192 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.2299925 0.5625 0 0 0.04040404 Private HS-grad Divorced Priv-house-serv Not-in-family White Female United-States 0 -41 0.455555558 0.110003 0.4375 0 0 0.363636374 Private 11th Divorced Exec-managerial Unmarried White Female United-States 0 -35 0.3888889 0.06692036 0.8125 0 0.453856736 0.3030303 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -43 0.477777779 0.405813277 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -53 0.5888889 0.193433717 0.125 0 0 0.323232323 Local-gov 1st-4th Married-civ-spouse Other-service Husband White Male Mexico 0 -34 0.377777785 0.144841567 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -46 0.51111114 0.0659141 0.6875 0.05178052 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 1 -59 0.655555546 0.2075281 0.75 0 0 0.4040404 Private Assoc-acdm Widowed Exec-managerial Not-in-family White Female United-States 1 -53 0.5888889 0.092403546 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Unmarried Asian-Pac-Islander Male United-States 0 -33 0.366666675 0.185470521 0.25 0 0 0.353535354 Private 7th-8th Separated Handlers-cleaners Not-in-family Black Male Haiti 0 -45 0.5 0.0673339143 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -48 0.533333361 0.06985428 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.170922846 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -55 0.6111111 0.109250665 0.5625 0.05178052 0 0.727272749 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -46 0.51111114 0.0210594032 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -17 0.188888893 0.133458167 0.4375 0 0 0.161616161 Private 11th Never-married Sales Own-child White Female United-States 0 -23 0.25555557 0.120028563 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Unmarried Amer-Indian-Eskimo Female United-States 0 -21 0.233333334 0.2136283 0.5625 0 0 0.6060606 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -53 0.5888889 0.149383888 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Craft-repair Not-in-family Black Male United-States 0 -61 0.677777767 0.126034468 0.5625 0 0 0.2020202 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.188939214 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Other-service Own-child Black Male United-States 0 -36 0.4 0.1398042 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.129779324 0.625 0 0 0.3838384 Local-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -39 0.433333337 0.06954917 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Craft-repair Wife White Female United-States 1 -39 0.433333337 0.128797978 0.8125 0.135501355 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 -48 0.533333361 0.257453173 1 0 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Exec-managerial Wife White Female United-States 1 -41 0.455555558 0.07200084 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -30 0.333333343 0.0326798931 0.75 0 0.459595948 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -50 0.5555556 0.0373993479 0.75 0 0 0.454545468 Private Assoc-acdm Divorced Craft-repair Not-in-family Black Male United-States 0 -51 0.566666663 0.16624178 0.5625 0.07298073 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.0228220429 0.625 0 0 0.4040404 Private Some-college Separated Sales Unmarried White Female United-States 0 -41 0.455555558 0.0200457331 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.113227211 0.5625 0 0 0.7070707 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -51 0.566666663 0.139724061 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -60 0.6666667 0.127364025 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -51 0.566666663 0.130840138 0.8125 0 0 0.4040404 Private Bachelors Divorced Tech-support Unmarried White Female United-States 0 -20 0.222222224 0.131090015 0.625 0 0 0.4040404 Local-gov Some-college Never-married Other-service Not-in-family White Male United-States 0 -29 0.322222233 0.121021353 0.5625 0 0 0.373737365 Local-gov HS-grad Never-married Transport-moving Own-child White Female United-States 0 -42 0.466666669 0.09227153 0.625 0 0 0.4848485 State-gov Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 0 -32 0.355555564 0.0967222452 0.5625 0 0 0.161616161 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 -19 0.211111113 0.1639201 0.5 0.010550105 0 0.4040404 Private 12th Never-married Sales Other-relative White Male United-States 0 -34 0.377777785 0.176330656 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -48 0.533333361 0.0965046957 0.5625 0 0 0.4848485 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 -38 0.422222227 0.124978364 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Italy 0 -38 0.422222227 0.0750984251 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 -40 0.444444448 0.1888813 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.0251322649 0.875 0 0 0.5050505 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 -38 0.422222227 0.0696488544 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Black Male ? 0 -26 0.2888889 0.181956008 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -23 0.25555557 0.06516311 0.625 0 0 0.1010101 State-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 -20 0.222222224 0.110981643 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Other-relative White Male Guatemala 0 -49 0.544444442 0.1281864 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Adm-clerical Not-in-family Amer-Indian-Eskimo Male Philippines 0 -23 0.25555557 0.143540308 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -47 0.5222222 0.105695076 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Canada 1 -43 0.477777779 0.07608717 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -56 0.622222245 0.0238249358 0.625 0 0 0.3030303 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -60 0.6666667 0.148407936 0.4375 0 0 0.353535354 Self-emp-not-inc 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -29 0.322222233 0.109898604 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Own-child White Male United-States 0 -25 0.2777778 0.27274847 0.8125 0 0 0.3838384 Private Bachelors Never-married Exec-managerial Not-in-family Black Female United-States 0 -39 0.433333337 0.08219276 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Not-in-family White Male United-States 0 -37 0.411111116 0.096707426 0.6875 0.04101041 0 0.353535354 Private Assoc-voc Never-married Adm-clerical Not-in-family Other Female United-States 0 -38 0.422222227 0.07283602 0.8125 0.0220202189 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -47 0.5222222 0.1693993 0.5625 0 0 0.363636374 Private HS-grad Divorced Tech-support Not-in-family White Female United-States 0 -50 0.5555556 0.132722661 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Divorced Sales Not-in-family White Male United-States 1 -64 0.7111111 0.0248938352 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -35 0.3888889 0.111759581 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.120535731 0.4375 0 0 0.4040404 ? 11th Never-married ? Unmarried White Female United-States 0 -42 0.466666669 0.144475162 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.07439727 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Not-in-family White Male United-States 0 -21 0.233333334 0.136138156 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -53 0.5888889 0.191505387 0.875 0 0 0.5050505 Self-emp-not-inc Masters Divorced Exec-managerial Not-in-family White Male United-States 1 -29 0.322222233 0.129940972 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.229619354 0.9375 0.0282902829 0 0.5050505 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male ? 0 -37 0.411111116 0.229415283 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.132469416 0.5 0 0 0.4040404 Private 12th Never-married Adm-clerical Own-child White Female United-States 0 -18 0.2 0.179489538 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -57 0.6333333 0.04140486 0.625 0.07688077 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.06676545 0.6875 0 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 1 -27 0.3 0.14545314 0.625 0.0282902829 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -23 0.25555557 0.145075962 0.6875 0 0 0.5050505 Self-emp-inc Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.123861648 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Divorced Sales Not-in-family White Male United-States 0 -48 0.533333361 0.06545138 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Other-relative White Female United-States 0 -40 0.444444448 0.0977702662 0.625 0 0 0.434343427 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.241091 0.8125 0 0 0.161616161 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -59 0.655555546 0.119296432 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 -32 0.355555564 0.194132179 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Other-relative Asian-Pac-Islander Female Greece 0 -39 0.433333337 0.342869461 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -32 0.355555564 0.0322838537 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -38 0.422222227 0.06999707 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -44 0.4888889 0.123815171 0.8125 0 0 0.3838384 State-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -51 0.566666663 0.09352161 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -54 0.6 0.126749754 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Other-relative White Female Hungary 0 -22 0.244444445 0.02331507 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -19 0.211111113 0.1487292 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Female United-States 0 -31 0.344444454 0.1896269 0.75 0 0 0.454545468 Federal-gov Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 -53 0.5888889 0.03192284 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.0952041 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -19 0.211111113 0.223231554 0.5625 0 0 0.323232323 Private HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 -40 0.444444448 0.233401254 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -21 0.233333334 0.162569 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -39 0.433333337 0.14565587 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Italy 1 -40 0.444444448 0.103071652 0.875 0.07298073 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.0782229453 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Cambodia 0 -18 0.2 0.130103961 0.3125 0 0 0.424242437 Private 9th Never-married Sales Own-child White Female United-States 0 -32 0.355555564 0.1852853 0.8125 0.07688077 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male Mexico 1 -50 0.5555556 0.05492539 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -18 0.2 0.113139652 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Male United-States 0 -19 0.211111113 0.0456380248 0.5625 0 0 0.434343427 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -53 0.5888889 0.134834871 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 1 -49 0.544444442 0.271509826 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 -40 0.444444448 0.1447365 0.8125 0 0 0.454545468 Private Bachelors Married-spouse-absent Transport-moving Own-child Other Male ? 0 -31 0.344444454 0.09609653 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -47 0.5222222 0.0596078038 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -35 0.3888889 0.09786995 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -47 0.5222222 0.13765496 0.625 0 0 0.2020202 Local-gov Some-college Never-married Other-service Own-child White Female United-States 0 -43 0.477777779 0.175587744 0.875 0 0 0.2020202 Self-emp-not-inc Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -51 0.566666663 0.155708373 0.625 0 0 0.212121218 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -54 0.6 0.175153986 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -76 0.844444454 0.120337039 0.3125 0 0 0.3030303 Local-gov 9th Married-civ-spouse Other-service Husband White Male United-States 0 -33 0.366666675 0.152398631 0.25 0 0 0.434343427 Private 7th-8th Never-married Sales Not-in-family White Male Mexico 0 -19 0.211111113 0.07491859 0.5 0 0 0.151515156 Private 12th Never-married Transport-moving Own-child White Male United-States 0 -49 0.544444442 0.05922254 0.6875 0.0501305 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.143293113 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -23 0.25555557 0.07454478 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 -49 0.544444442 0.0938018039 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.206626236 0.625 0 0 0.656565666 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -48 0.533333361 0.214406908 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -36 0.4 0.0965747461 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -33 0.366666675 0.1941618 0.5 0.0147101469 0 0.4040404 Private 12th Separated Adm-clerical Unmarried White Female United-States 0 -31 0.344444454 0.112968571 0.8125 0.1502415 0 0.4848485 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 -53 0.5888889 0.0633668 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.13115266 0.8125 0 0 0.1010101 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -43 0.477777779 0.110449553 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.127809227 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male Italy 0 -53 0.5888889 0.131960228 0.875 0 0 0.4040404 State-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -36 0.4 0.0364779532 0.8125 0 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.112387985 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.070385024 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male Germany 1 -39 0.433333337 0.141863868 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -24 0.266666681 0.301760972 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 -17 0.188888893 0.115117818 0.375 0 0.3677686 0.4040404 Local-gov 10th Never-married Protective-serv Own-child White Female United-States 0 -53 0.5888889 0.19101572 0.875 0.1502415 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -21 0.233333334 0.127802491 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -29 0.322222233 0.0612471849 0.8125 0 0 0.646464646 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Male Philippines 1 -34 0.377777785 0.17048572 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -28 0.311111122 0.1224324 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -61 0.677777767 0.109379977 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -20 0.222222224 0.0476242751 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -47 0.5222222 0.0696475059 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -40 0.444444448 0.151314914 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -26 0.2888889 0.143766612 0.625 0 0 0.1010101 Local-gov Some-college Never-married Other-service Own-child Black Female Jamaica 0 -53 0.5888889 0.094073236 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.024382621 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -39 0.433333337 0.160107911 0.9375 0 0.5544077 1 Private Prof-school Married-civ-spouse Sales Husband White Male United-States 1 -17 0.188888893 0.11685621 0.4375 0 0 0.151515156 Local-gov 11th Never-married Prof-specialty Own-child Black Male United-States 0 -46 0.51111114 0.2529836 1 0 0 0.4040404 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 -34 0.377777785 0.137056187 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.0722237751 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Male France 0 -23 0.25555557 0.146029681 0.5625 0 0 0.161616161 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -41 0.455555558 0.194435269 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.07106867 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -28 0.311111122 0.1905914 0.8125 0 0 0.04040404 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -18 0.2 0.07905409 0.4375 0 0 0.151515156 Self-emp-inc 11th Never-married Sales Own-child White Male United-States 0 -38 0.422222227 0.07577061 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 1 -66 0.733333349 0.125298962 0.6875 0.0296402965 0 0.3030303 ? Assoc-voc Widowed ? Not-in-family White Female United-States 0 -28 0.311111122 0.129577264 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -49 0.544444442 0.0291963723 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -29 0.322222233 0.12246339 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -43 0.477777779 0.1455306 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Wife Amer-Indian-Eskimo Female United-States 1 -34 0.377777785 0.07547762 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Unmarried White Female United-States 0 -30 0.333333343 0.147201642 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -25 0.2777778 0.272522837 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.114137158 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.161702827 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Male United-States 0 -22 0.244444445 0.09945074 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -26 0.2888889 0.0608046725 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male ? 0 -49 0.544444442 0.040917892 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -44 0.4888889 0.131094053 0.5625 0.031370312 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.104156047 0.75 0.02105021 0 0.5050505 Self-emp-not-inc Assoc-acdm Married-civ-spouse Farming-fishing Husband White Male United-States 0 -39 0.433333337 0.330705434 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Other-relative Black Male United-States 0 -33 0.366666675 0.268799543 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Unmarried White Female United-States 0 -41 0.455555558 0.125889659 0.875 0 0.43663913 0.353535354 Self-emp-not-inc Masters Married-civ-spouse Sales Wife White Female United-States 1 -65 0.722222269 0.07105183 0.8125 1 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.0235649515 0.8125 0 0 0.535353541 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -26 0.2888889 0.11304266 0.8125 0 0 0.2020202 ? Bachelors Married-civ-spouse ? Wife White Female United-States 0 -31 0.344444454 0.194640011 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Not-in-family White Male United-States 0 -28 0.311111122 0.179207325 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -71 0.788888931 0.07434474 0.5625 0 0.5663453 0.5252525 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.0214675646 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.19828856 0.25 0 0 0.6060606 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.1241378 0.625 0 0 0.3030303 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -36 0.4 0.118386485 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Craft-repair Husband White Male United-States 0 -56 0.622222245 0.12276715 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.07175904 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -39 0.433333337 0.09307708 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.132545531 0.9375 0 0 0.454545468 Private Prof-school Divorced Prof-specialty Not-in-family White Female United-States 1 -22 0.244444445 0.150210992 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -44 0.4888889 0.07359914 0.625 0 0 0.3838384 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -60 0.6666667 0.06431581 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -65 0.722222269 0.100444868 0.4375 0 0 0.4040404 Private 11th Divorced Machine-op-inspct Other-relative White Male United-States 0 -44 0.4888889 0.147608444 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male England 1 -53 0.5888889 0.0557572059 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -28 0.311111122 0.144714266 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -41 0.455555558 0.114655778 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -40 0.444444448 0.1410004 0.5625 0 0 0.151515156 Self-emp-inc HS-grad Divorced Adm-clerical Unmarried White Female ? 0 -35 0.3888889 0.0608915575 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Wife White Female United-States 0 -41 0.455555558 0.2019344 0.3125 0 0 0.7070707 Self-emp-inc 9th Married-civ-spouse Sales Wife White Female Dominican-Republic 0 -28 0.311111122 0.126667589 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Canada 0 -53 0.5888889 0.165768281 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 -26 0.2888889 0.08941103 0.625 0 0 0.454545468 Private Some-college Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.135447115 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Transport-moving Own-child Black Female United-States 0 -27 0.3 0.0656628758 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Female United-States 0 -27 0.3 0.149020851 0.5625 0 0 0.08080808 Private HS-grad Never-married Adm-clerical Not-in-family Amer-Indian-Eskimo Female United-States 0 -26 0.2888889 0.0787974745 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -53 0.5888889 0.108904466 0.5625 0 0 0.353535354 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -34 0.377777785 0.0726023 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Germany 1 -50 0.5555556 0.131011888 0.875 0 0 0.5050505 Self-emp-inc Masters Never-married Prof-specialty Not-in-family Black Male Trinadad&Tobago 0 -30 0.333333343 0.1875807 0.5625 0 0 0.6262626 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -47 0.5222222 0.2315221 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Male United-States 0 -27 0.3 0.137450874 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 -55 0.6111111 0.02152953 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -21 0.233333334 0.0967222452 0.625 0 0 0.2929293 Private Some-college Never-married Other-service Own-child White Female ? 0 -35 0.3888889 0.117402449 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -31 0.344444454 0.109483704 0.5 0 0 0.5050505 Self-emp-not-inc 12th Married-civ-spouse Sales Wife Asian-Pac-Islander Female ? 0 -39 0.433333337 0.250908434 0.875 0 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.0506275669 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -39 0.433333337 0.118741438 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 1 -19 0.211111113 0.0629875958 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -25 0.2777778 0.08540215 0.5625 0 0 0.4040404 ? HS-grad Married-spouse-absent ? Not-in-family White Male United-States 0 -57 0.6333333 0.01692188 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -21 0.233333334 0.07552814 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Other-relative Asian-Pac-Islander Female South 0 -30 0.333333343 0.03960248 0.25 0 0 0.444444448 ? 7th-8th Widowed ? Not-in-family White Female United-States 0 -25 0.2777778 0.0144621329 0.625 0 0 0.222222224 Self-emp-not-inc Some-college Never-married Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.06127076 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 -26 0.2888889 0.100851014 0.5625 0 0.365932047 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Female United-States 0 -42 0.466666669 0.0355956256 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -39 0.433333337 0.07162837 0.625 0 0 0.474747479 Self-emp-not-inc Some-college Divorced Sales Unmarried White Male United-States 0 -48 0.533333361 0.134528413 0.8125 0 0 0.444444448 Private Bachelors Divorced Priv-house-serv Not-in-family White Female Germany 0 -24 0.266666681 0.3290492 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 -46 0.51111114 0.272048 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 1 -53 0.5888889 0.116515405 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.142078727 0.625 0 0 0.7070707 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -34 0.377777785 0.106045313 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -25 0.2777778 0.0736779347 0.5625 0 0 0.7070707 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -33 0.366666675 0.0908503756 0.625 1 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Female United-States 1 -45 0.5 0.09737894 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.137056187 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 -21 0.233333334 0.136640608 0.5625 0 0 0.2020202 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -33 0.366666675 0.118146032 0.3125 0.00114001136 0 0.5555556 Private 9th Divorced Craft-repair Unmarried White Male United-States 0 -44 0.4888889 0.2269178 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.11961703 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female Puerto-Rico 1 -30 0.333333343 0.0535109676 0.625 0 0 0.1010101 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -32 0.355555564 0.129137442 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -46 0.51111114 0.156942964 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family Black Female United-States 0 -29 0.322222233 0.09021119 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.147646174 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -35 0.3888889 0.06366854 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Protective-serv Unmarried White Female United-States 0 -35 0.3888889 0.166731447 0.5625 0 0 0.4040404 Private HS-grad Separated Prof-specialty Other-relative Black Female United-States 0 -29 0.322222233 0.0197756458 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -21 0.233333334 0.1123799 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 -43 0.477777779 0.132732764 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male Philippines 1 -33 0.366666675 0.103446811 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -61 0.677777767 0.10195224 0.9375 0 0 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.11727044 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.350260168 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Adm-clerical Wife White Female United-States 0 -35 0.3888889 0.131223381 0.625 0 0 0.4040404 State-gov Some-college Never-married Prof-specialty Own-child Black Female United-States 0 -32 0.355555564 0.146095023 0.5625 0 0 0.24242425 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -22 0.244444445 0.08527822 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -61 0.677777767 0.0176829752 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -28 0.311111122 0.0363991521 0.6875 0.0246302467 0 0.353535354 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 -24 0.266666681 0.0456683338 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -58 0.644444466 0.0360213 0.875 0 0 0.353535354 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -42 0.466666669 0.277751476 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -56 0.622222245 0.148303539 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -26 0.2888889 0.1725198 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -25 0.2777778 0.180656761 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Unmarried Black Female United-States 0 -59 0.655555546 0.06676815 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -65 0.722222269 0.0777918845 0.8125 0.03818038 0 0.1010101 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -57 0.6333333 0.214080915 0.875 0 0.6483012 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 1 -36 0.4 0.0662683845 0.75 0 0 0.444444448 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.116995633 0.625 0 0.4331956 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.142235 0.5 0 0 0.2020202 ? 12th Never-married ? Other-relative Black Male United-States 0 -18 0.2 0.07775484 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.043832276 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.0167683139 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -19 0.211111113 0.124408558 0.625 0 0 0.3030303 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -28 0.311111122 0.276452243 0.8125 0 0 0.4848485 Private Bachelors Divorced Other-service Unmarried White Female England 1 -37 0.411111116 0.056504827 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -23 0.25555557 0.07631752 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -60 0.6666667 0.108186476 0.625 0 0 0.474747479 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -17 0.188888893 0.229030684 0.5 0 0 0.121212125 Local-gov 12th Never-married Adm-clerical Own-child White Female United-States 0 -37 0.411111116 0.0329870246 0.8125 0.0486504845 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -29 0.322222233 0.164258227 0.6875 0 0 0.4040404 State-gov Assoc-voc Divorced Adm-clerical Own-child White Male United-States 0 -34 0.377777785 0.37327686 0.5625 0 0 0.2020202 Private HS-grad Separated Transport-moving Not-in-family Black Male United-States 0 -36 0.4 0.243744045 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male ? 1 -37 0.411111116 0.138316363 0.625 0 0 0.151515156 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -47 0.5222222 0.11266952 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 -22 0.244444445 0.02402026 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -61 0.677777767 0.24074614 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -57 0.6333333 0.263255 0.1875 0 0 0.454545468 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -33 0.366666675 0.223354146 1 0 0.4242424 0.4040404 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -54 0.6 0.13633348 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.12125776 0.875 0 0.383149683 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -40 0.444444448 0.05202852 0.5 0 0 0.5050505 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.06856244 0.5625 0 0 0.424242437 Local-gov HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 -35 0.3888889 0.183214173 0.4375 0 0.4722222 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.133405626 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Own-child White Male United-States 0 -49 0.544444442 0.134252936 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -31 0.344444454 0.120455578 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -58 0.644444466 0.09224122 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 0 -26 0.2888889 0.0735769048 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -35 0.3888889 0.08680243 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -25 0.2777778 0.06961518 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male India 0 -43 0.477777779 0.238706008 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -32 0.355555564 0.138782457 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -45 0.5 0.1048417 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.09651682 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -31 0.344444454 0.169872135 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Own-child White Male Mexico 0 -20 0.222222224 0.0870476 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Female United-States 0 -28 0.311111122 0.268685043 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 -50 0.5555556 0.162060484 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -22 0.244444445 0.289179325 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative Black Male United-States 0 -19 0.211111113 0.08332834 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -38 0.422222227 0.306713462 0.8125 0 0 0.6363636 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.253529161 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -24 0.266666681 0.158053622 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -26 0.2888889 0.190032363 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 0 -45 0.5 0.14012818 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Tech-support Unmarried White Female United-States 0 -88 0.9777778 0.04616338 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.08520278 0.4375 0 0 0.151515156 Private 11th Never-married Adm-clerical Own-child Amer-Indian-Eskimo Female South 0 -24 0.266666681 0.125581846 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -84 0.933333337 0.08566281 0.1875 0 0 0.2020202 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 0 -48 0.533333361 0.111313023 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Farming-fishing Husband Black Male United-States 0 -46 0.51111114 0.08401198 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Vietnam 0 -31 0.344444454 0.100845627 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.0278668161 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried Amer-Indian-Eskimo Male United-States 0 -35 0.3888889 0.222104058 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.14308095 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -36 0.4 0.124670558 0.9375 0 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.08537319 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -57 0.6333333 0.08250596 0.3125 0 0 0.5252525 Private 9th Widowed Other-service Unmarried Black Male ? 0 -30 0.333333343 0.07951479 0.625 0 0 0.454545468 Private Some-college Married-spouse-absent Exec-managerial Unmarried White Female United-States 0 -30 0.333333343 0.135307685 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -19 0.211111113 0.13523899 0.5 0.1502415 0 0.4040404 ? 12th Married-civ-spouse ? Other-relative White Female United-States 1 -30 0.333333343 0.0566570461 0.8125 0 0 0.434343427 Self-emp-inc Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -23 0.25555557 0.1333046 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 1 -41 0.455555558 0.10138917 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.29887554 0.625 0 0 0.6060606 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -27 0.3 0.07033249 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 -59 0.655555546 0.113916911 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.124974996 0.5625 0 0 0.363636374 Private HS-grad Never-married Sales Own-child White Female United-States 0 -60 0.6666667 0.117522337 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 -69 0.7666667 0.03399194 0.9375 0 0 0.343434334 State-gov Prof-school Married-civ-spouse Adm-clerical Husband White Male United-States 1 -24 0.266666681 0.1326479 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -19 0.211111113 0.08128955 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child Black Male United-States 0 -60 0.6666667 0.133908764 0.75 0 0 0.2020202 State-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male Mexico 0 -64 0.7111111 0.0149430363 0.625 0 0 0.353535354 Private Some-college Widowed Tech-support Not-in-family White Female United-States 0 -39 0.433333337 0.126670957 0.6875 0 0 0.6060606 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.15703389 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.09318888 0.375 0 0 0.353535354 Private 10th Divorced Craft-repair Not-in-family Black Female United-States 0 -25 0.2777778 0.227663413 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 -17 0.188888893 0.224062026 0.375 0 0 0.04040404 ? 10th Never-married ? Own-child White Female United-States 0 -37 0.411111116 0.112035051 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 -74 0.822222233 0.264622271 0.5625 0 0 0.141414136 Self-emp-not-inc HS-grad Widowed Farming-fishing Not-in-family White Female United-States 0 -26 0.2888889 0.09553278 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -23 0.25555557 0.350749135 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 -57 0.6333333 0.0251531452 0.9375 0 0 0.363636374 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.261182517 0.4375 0 0 0.151515156 Private 11th Never-married Transport-moving Own-child White Male United-States 0 -37 0.411111116 0.135738075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -46 0.51111114 0.08324751 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.256356657 0.625 0 0 0.454545468 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 1 -40 0.444444448 0.0564819276 0.5625 0 0 0.3030303 Private HS-grad Widowed Machine-op-inspct Own-child White Female United-States 0 -50 0.5555556 0.01669692 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -25 0.2777778 0.179712474 0.0625 0 0 0.353535354 Private Preschool Never-married Farming-fishing Not-in-family White Male Mexico 0 -44 0.4888889 0.057546787 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -41 0.455555558 0.284121782 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.272149682 0.5625 0 0.453856736 0.151515156 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.15125294 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -54 0.6 0.198686615 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -40 0.444444448 0.127708867 0.5625 0 0 0.5252525 Federal-gov HS-grad Divorced Adm-clerical Not-in-family Black Female United-States 0 -37 0.411111116 0.147599027 0.4375 0.07688077 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 -46 0.51111114 0.0141145885 0.8125 0.1502415 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.04781758 0.5625 0 0 0.454545468 Private HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 -20 0.222222224 0.14496617 0.625 0 0 0.1010101 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -71 0.788888931 0.120087832 0.75 0 0 0.0303030312 ? Assoc-acdm Married-civ-spouse ? Husband White Male United-States 0 -35 0.3888889 0.03785331 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -62 0.6888889 0.06605757 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.236956164 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female Cuba 0 -56 0.622222245 0.0972253755 0.5625 0 0 0.909090936 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.0926871 0.875 0 0 0.2020202 State-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 0 -17 0.188888893 0.03654396 0.4375 0 0 0.2020202 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 -18 0.2 0.155164167 0.4375 0.005940059 0 0.04040404 Self-emp-not-inc 11th Never-married Other-service Own-child White Female United-States 0 -35 0.3888889 0.0662683845 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -21 0.233333334 0.124021269 0.5625 0 0 0.01010101 Private HS-grad Never-married Machine-op-inspct Own-child Black Male United-States 0 -46 0.51111114 0.0943763256 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Own-child White Male United-States 0 -33 0.366666675 0.01650429 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.0872415751 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -36 0.4 0.279906124 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.06542849 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.135601357 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -25 0.2777778 0.172842413 0.8125 0 0 0.4040404 Private Bachelors Separated Exec-managerial Not-in-family White Male United-States 0 -47 0.5222222 0.06523451 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.09554625 0.9375 0.1502415 0 0.75757575 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.01400615 0.5625 0.07688077 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -53 0.5888889 0.06433534 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.07596863 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -20 0.222222224 0.196272671 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child Black Male United-States 0 -32 0.355555564 0.1614186 0.625 0 0 0.7070707 Private Some-college Separated Machine-op-inspct Unmarried Black Female United-States 0 -28 0.311111122 0.123358518 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.06575987 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 0 -52 0.5777778 0.09685897 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -35 0.3888889 0.1259065 0.875 0 0 0.4040404 Private Masters Separated Prof-specialty Not-in-family White Male United-States 1 -30 0.333333343 0.114544645 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.07296264 0.625 0.068490684 0 0.5050505 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -56 0.622222245 0.0563721433 0.8125 0 0 0.3838384 State-gov Bachelors Separated Prof-specialty Not-in-family White Female ? 0 -21 0.233333334 0.137802467 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -56 0.622222245 0.0219599176 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family Black Female United-States 0 -56 0.622222245 0.130297273 0.8125 0 0.43663913 0.656565666 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.100353271 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.0572780445 0.625 0 0 0.2020202 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -62 0.6888889 0.0948680043 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -24 0.266666681 0.132201344 0.8125 0 0 0.3030303 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -52 0.5777778 0.02624966 0.8125 0 0 0.4040404 Federal-gov Bachelors Separated Adm-clerical Unmarried Black Female United-States 0 -23 0.25555557 0.0263904277 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.133926272 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.467979848 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.166662067 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male Nicaragua 0 -41 0.455555558 0.198201 0.3125 0 0 0.353535354 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.131891519 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -27 0.3 0.221879765 0.875 0 0 0.373737365 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 0 -19 0.211111113 0.117781647 0.625 0 0 0.232323229 ? Some-college Never-married ? Own-child White Male United-States 0 -41 0.455555558 0.07819937 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -27 0.3 0.1393563 0.8125 0 0 0.353535354 Private Bachelors Never-married Handlers-cleaners Unmarried White Male United-States 0 -50 0.5555556 0.146545619 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Unmarried White Female United-States 0 -29 0.322222233 0.227447882 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Own-child White Female El-Salvador 0 -38 0.422222227 0.137738481 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.113952607 0.5625 0 0 0.6060606 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -48 0.533333361 0.07369882 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -39 0.433333337 0.180435181 0.75 0.07298073 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Craft-repair Husband Black Male United-States 1 -40 0.444444448 0.135029525 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -27 0.3 0.14906463 0.4375 0 0 0.4040404 Local-gov 11th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -59 0.655555546 0.0895295739 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.1909679 0.5625 0 0 0.2020202 ? HS-grad Divorced ? Unmarried Black Female United-States 0 -34 0.377777785 0.115018807 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -47 0.5222222 0.125553563 0.9375 0 0 0.6060606 Self-emp-inc Prof-school Never-married Other-service Not-in-family White Male United-States 1 -64 0.7111111 0.2073045 0.125 0 0 0.2020202 Self-emp-inc 1st-4th Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.2563203 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -38 0.422222227 0.09918334 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -42 0.466666669 0.143391445 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -49 0.544444442 0.0837580562 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -53 0.5888889 0.066539146 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -35 0.3888889 0.145802036 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -70 0.7777778 0.0911554843 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband Asian-Pac-Islander Male China 0 -38 0.422222227 0.07227227 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.102878354 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Other-relative Asian-Pac-Islander Female South 0 -34 0.377777785 0.0674066544 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male India 0 -24 0.266666681 0.07932822 0.8125 0 0 0.1010101 Private Bachelors Never-married Prof-specialty Not-in-family White Male Hungary 0 -23 0.25555557 0.133099169 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.276868463 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -47 0.5222222 0.129981384 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 -59 0.655555546 0.0446930528 0.25 0.0486504845 0 0.4040404 Private 7th-8th Never-married Farming-fishing Unmarried White Male United-States 0 -33 0.366666675 0.09239815 0.75 0 0 0.5050505 Federal-gov Assoc-acdm Divorced Exec-managerial Unmarried White Male United-States 1 -63 0.7 0.155657187 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -18 0.2 0.09873073 0.5625 0 0 0.6060606 Local-gov HS-grad Never-married Other-service Own-child White Male United-States 0 -32 0.355555564 0.0218265578 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.389775068 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male ? 0 -19 0.211111113 0.139271438 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -27 0.3 0.08991349 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Prof-specialty Own-child White Male United-States 0 -40 0.444444448 0.0233864635 0.625 0 0 0.4848485 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 1 -38 0.422222227 0.08978147 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.0168161355 0.5625 0 0 0.474747479 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -35 0.3888889 0.115826376 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Separated Transport-moving Not-in-family White Male United-States 0 -22 0.244444445 0.277601272 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.0345455855 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.133538321 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -23 0.25555557 0.197726145 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -26 0.2888889 0.152412772 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -53 0.5888889 0.07438852 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -34 0.377777785 0.108192541 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.117358 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.2628913 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -18 0.2 0.201292515 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 -65 0.722222269 0.115567744 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -49 0.544444442 0.156707227 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -64 0.7111111 0.042887982 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband Black Male United-States 0 -68 0.75555557 0.114754111 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.118517824 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Other-service Not-in-family White Female United-States 0 -68 0.75555557 0.2842403 0.5625 0 0.845500469 0.4040404 Federal-gov HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 -35 0.3888889 0.07126871 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.206577748 0.5625 0 0 0.121212125 Federal-gov HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -45 0.5 0.119581334 0.5625 0 0 0.282828271 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.2157176 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -39 0.433333337 0.08721935 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried Black Female United-States 0 -37 0.411111116 0.173126653 0.5625 0.01506015 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -45 0.5 0.18589215 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -20 0.222222224 0.05813815 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Female United-States 0 -36 0.4 0.188886017 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Tech-support Unmarried White Female United-States 0 -26 0.2888889 0.2502558 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.274956316 0.8125 0 0 0.323232323 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.10058362 0.8125 0 0 0.6060606 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -34 0.377777785 0.140968755 0.5625 0 0.459366381 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -53 0.5888889 0.239644915 0.625 0 0 0.3030303 Private Some-college Widowed Sales Unmarried White Female United-States 0 -32 0.355555564 0.111772373 0.8125 0 0.365013778 0.424242437 Private Bachelors Divorced Machine-op-inspct Not-in-family White Female United-States 0 -44 0.4888889 0.0757773444 0.1875 0 0 0.4040404 Self-emp-not-inc 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.31175822 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male Mexico 0 -35 0.3888889 0.2786062 0.1875 0 0 0.363636374 Private 5th-6th Never-married Farming-fishing Unmarried White Male United-States 0 -34 0.377777785 0.01969078 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 -42 0.466666669 0.100910954 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.0266248174 0.5625 0 0 0.04040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -23 0.25555557 0.132946953 0.5625 0 0 0.373737365 Private HS-grad Never-married Craft-repair Own-child White Male Mexico 0 -56 0.622222245 0.172024742 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -50 0.5555556 0.0294765625 1 0.1502415 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.113370672 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -46 0.51111114 0.187459469 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.07800405 0.75 0 0 0.575757563 Private Assoc-acdm Separated Adm-clerical Unmarried White Female United-States 0 -38 0.422222227 0.124237478 0.5625 0.0346403457 0 0.8080808 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male Italy 0 -42 0.466666669 0.195079833 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -48 0.533333361 0.06848768 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -27 0.3 0.08986634 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -40 0.444444448 0.235336319 0.6875 0 0 0.363636374 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 0 -53 0.5888889 0.08356947 1 1 0 0.373737365 Private Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 -75 0.8333334 0.111785173 0.6875 0 0 0.3030303 Self-emp-not-inc Assoc-voc Widowed Exec-managerial Not-in-family White Female United-States 0 -39 0.433333337 0.124670558 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.1806965 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -51 0.566666663 0.104363494 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family Black Female United-States 0 -34 0.377777785 0.119020954 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Own-child White Male United-States 0 -23 0.25555557 0.1111763 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.143968 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 -45 0.5 0.0519510619 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Never-married Sales Not-in-family White Male United-States 0 -21 0.233333334 0.0738645047 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -36 0.4 0.109223045 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.147902116 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.220556945 0.375 0 0 0.4040404 ? 10th Divorced ? Not-in-family White Female United-States 0 -68 0.75555557 0.159589276 0.3125 0 0 0.2020202 Private 9th Divorced Farming-fishing Not-in-family Black Male United-States 0 -40 0.444444448 0.06009679 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -20 0.222222224 0.0840241 0.625 0 0 0.24242425 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -48 0.533333361 0.09707114 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 1 -27 0.3 0.06652433 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -57 0.6333333 0.114545316 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 -54 0.6 0.109408267 0.5625 0 0 0.989899 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.01542394 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.068788074 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.145310357 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child White Male United-States 0 -35 0.3888889 0.2570093 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband Other Male United-States 1 -56 0.622222245 0.1335464 0.5 0 0 0.4040404 Local-gov 12th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -20 0.222222224 0.163788766 0.5625 0 0 0.282828271 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -38 0.422222227 0.119421035 0.8125 0 0 0.3838384 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -19 0.211111113 0.112580612 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 -24 0.266666681 0.182441637 0.5625 0.005940059 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male ? 0 -31 0.344444454 0.257538021 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male Germany 0 -44 0.4888889 0.186666042 0.8125 0 0 0.6060606 Local-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -21 0.233333334 0.0981009752 0.625 0 0.3677686 0.121212125 State-gov Some-college Never-married Sales Own-child Black Female United-States 0 -41 0.455555558 0.115410805 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.178553313 0.4375 0 0 0.161616161 Private 11th Never-married Other-service Own-child White Female United-States 0 -23 0.25555557 0.07113669 0.3125 0 0 0.4040404 Private 9th Never-married Transport-moving Own-child White Male United-States 0 -37 0.411111116 0.146621048 0.625 0 0 0.323232323 Local-gov Some-college Married-civ-spouse Other-service Husband Amer-Indian-Eskimo Male United-States 0 -46 0.51111114 0.0546478927 0.6875 0 0 0.3030303 ? Assoc-voc Divorced ? Unmarried White Male United-States 0 -43 0.477777779 0.04976275 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Divorced Sales Unmarried White Male United-States 0 -31 0.344444454 0.228652835 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -40 0.444444448 0.2197285 0.625 0 0 0.4040404 Private Some-college Divorced Transport-moving Unmarried White Male United-States 1 -27 0.3 0.07160749 0.9375 0 0 0.121212125 Private Prof-school Divorced Prof-specialty Not-in-family White Female United-States 0 -64 0.7111111 0.133850157 0.625 0 0 0.4040404 Local-gov Some-college Never-married Transport-moving Unmarried White Male United-States 0 -31 0.344444454 0.08520278 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Never-married Prof-specialty Own-child White Male United-States 0 -48 0.533333361 0.157473713 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -37 0.411111116 0.137738481 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male Canada 1 -28 0.311111122 0.140262887 0.625 0 0 0.24242425 Private Some-college Divorced Tech-support Not-in-family White Male United-States 0 -42 0.466666669 0.127091244 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -60 0.6666667 0.06282191 0.25 0 0 0.6060606 Self-emp-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 -17 0.188888893 0.107293367 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 -21 0.233333334 0.204476982 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 -46 0.51111114 0.0236653071 0.375 0 0 0.4040404 Private 10th Divorced Adm-clerical Own-child Black Male United-States 0 -18 0.2 0.09400925 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -22 0.244444445 0.1699698 0.5625 0 0 0.272727281 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -44 0.4888889 0.0564502738 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -36 0.4 0.06042817 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -65 0.722222269 0.15007022 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 -26 0.2888889 0.307547957 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male Mexico 0 -21 0.233333334 0.199472621 0.375 0 0 0.25252524 Private 10th Married-civ-spouse Other-service Husband White Male United-States 0 -41 0.455555558 0.109206885 0.5625 0 0.5369605 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.0246520359 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Unmarried White Female United-States 0 -27 0.3 0.131566212 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 -19 0.211111113 0.190422341 0.625 0 0 0.121212125 State-gov Some-college Never-married Other-service Not-in-family Black Male United-States 0 -40 0.444444448 0.1387811 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.15046221 0.5625 0 0 0.151515156 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -40 0.444444448 0.0187384021 0.6875 0.0282902829 0 0.4040404 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.08879003 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -33 0.366666675 0.3700486 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -34 0.377777785 0.0468045846 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -44 0.4888889 0.130500674 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Protective-serv Not-in-family White Male United-States 0 -33 0.366666675 0.4033138 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -72 0.8 0.174958661 0.5625 0.02290023 0 0.1010101 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -19 0.211111113 0.179331928 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -59 0.655555546 0.0221956559 0.6875 0 0 0.363636374 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 -40 0.444444448 0.196542755 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Not-in-family Black Female United-States 0 -35 0.3888889 0.128461882 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 -22 0.244444445 0.0398624651 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 -41 0.455555558 0.1323199 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -59 0.655555546 0.09967569 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -50 0.5555556 0.131867275 0.5 0 0 0.4040404 Private 12th Divorced Handlers-cleaners Unmarried White Male United-States 0 -21 0.233333334 0.1361981 0.75 0 0 0.1010101 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.151656389 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -22 0.244444445 0.0369265266 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -43 0.477777779 0.127234027 0.1875 0 0 0.4040404 Private 5th-6th Separated Machine-op-inspct Not-in-family White Female Mexico 0 -17 0.188888893 0.08933492 0.4375 0 0 0.161616161 Private 11th Never-married Transport-moving Own-child White Female United-States 0 -42 0.466666669 0.1537814 0.25 0 0 0.4040404 Local-gov 7th-8th Divorced Other-service Not-in-family White Male United-States 0 -37 0.411111116 0.279853582 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -19 0.211111113 0.17124413 0.5 0 0 0.3838384 Private 12th Never-married Adm-clerical Own-child White Male ? 0 -43 0.477777779 0.172178984 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband Other Male Mexico 0 -46 0.51111114 0.064713195 0.3125 0 0 0.4040404 Private 9th Separated Craft-repair Unmarried White Female United-States 0 -18 0.2 0.0526576 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Own-child White Female United-States 0 -50 0.5555556 0.228696615 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Laos 1 -47 0.5222222 0.08520211 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male Puerto-Rico 0 -31 0.344444454 0.344370782 0.5625 0.02907029 0 1 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -33 0.366666675 0.107478589 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -27 0.3 0.150942445 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -59 0.655555546 0.08628313 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -39 0.433333337 0.0602867231 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.249370754 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.04529991 0.8125 0 0 0.5555556 Private Bachelors Widowed Exec-managerial Not-in-family White Female United-States 0 -24 0.266666681 0.04240034 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -25 0.2777778 0.07480139 0.625 0 0.454545438 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -30 0.333333343 0.01969078 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Other-relative White Female United-States 0 -52 0.5777778 0.0681071356 0.4375 0 0 0.4040404 State-gov 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -51 0.566666663 0.09464237 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.107690081 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -19 0.211111113 0.0307421349 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Female United-States 0 -23 0.25555557 0.112056606 0.625 0 0 0.6060606 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -37 0.411111116 0.108378433 1 0 0 0.454545468 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -25 0.2777778 0.173141465 0.625 0 0 0.3838384 State-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -49 0.544444442 0.122116514 0.9375 0.1502415 0 0.656565666 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.0560737662 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -40 0.444444448 0.08668389 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -20 0.222222224 0.163675621 0.5625 0 0 0.323232323 Private HS-grad Never-married Machine-op-inspct Other-relative Other Male United-States 0 -35 0.3888889 0.0254447851 0.6875 0.03103031 0 0.5555556 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -24 0.266666681 0.08912209 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -32 0.355555564 0.1581156 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Male United-States 0 -35 0.3888889 0.0960568 0.5625 0 0 0.3030303 Private HS-grad Separated Other-service Own-child Black Female United-States 0 -20 0.222222224 0.10002593 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -29 0.322222233 0.162145346 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -25 0.2777778 0.0217389986 0.5625 0 0 0.282828271 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -50 0.5555556 0.110406443 0.25 0 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.312589377 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -49 0.544444442 0.1827609 0.8125 0.1502415 0 0.6060606 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -30 0.333333343 0.220801443 0.5625 0 0 0.323232323 Local-gov HS-grad Divorced Protective-serv Own-child White Female United-States 0 -37 0.411111116 0.17989096 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -50 0.5555556 0.179796666 0.5625 0.031370312 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female El-Salvador 0 -20 0.222222224 0.158053622 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -49 0.544444442 0.127380863 0.5625 0.0501305 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.07071843 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -61 0.677777767 0.06820547 0.5 0 0 0.4040404 Private 12th Widowed Machine-op-inspct Unmarried White Female Italy 0 -22 0.244444445 0.124587044 0.5625 0 0 0.0303030312 Private HS-grad Married-spouse-absent Other-service Own-child White Female United-States 0 -23 0.25555557 0.166339442 0.75 0 0 0.121212125 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 -43 0.477777779 0.1529361 0.5625 0.046500463 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -39 0.433333337 0.203317836 0.8125 0 0 0.24242425 Private Bachelors Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female Philippines 0 -21 0.233333334 0.1252424 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 -52 0.5777778 0.09082882 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.1892834 0.6875 0.0406404063 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.08533749 0.8125 0.09562095 0 0.454545468 Private Bachelors Divorced Adm-clerical Unmarried White Male United-States 1 -50 0.5555556 0.06462496 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.05962666 0.75 0 0 1 Self-emp-not-inc Assoc-acdm Divorced Exec-managerial Unmarried White Female United-States 0 -47 0.5222222 0.0166517925 0.375 0 0 0.454545468 Private 10th Divorced Exec-managerial Not-in-family Amer-Indian-Eskimo Female United-States 0 -49 0.544444442 0.115451217 0.3125 0 0 0.4040404 ? 9th Divorced ? Not-in-family White Male United-States 0 -45 0.5 0.124321669 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -48 0.533333361 0.06739858 0.625 0 0 0.4040404 Federal-gov Some-college Widowed Other-service Unmarried Black Female United-States 0 -36 0.4 0.123164535 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.311370939 0.625 0 0 0.4040404 Never-worked Some-college Never-married ? Own-child Black Male United-States 0 -61 0.677777767 0.057542745 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -72 0.8 0.106480412 0.8125 0 0 0.3030303 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 -19 0.211111113 0.07061605 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 -54 0.6 0.2051384 0.8125 0.07688077 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male ? 1 -47 0.5222222 0.060487438 0.625 0 0 0.353535354 ? Some-college Divorced ? Not-in-family Amer-Indian-Eskimo Female United-States 0 -39 0.433333337 0.0715179145 0.5625 0.068490684 0 0.4040404 Private HS-grad Divorced Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 -24 0.266666681 0.0601782873 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family White Female United-States 0 -44 0.4888889 0.105903871 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Handlers-cleaners Unmarried White Male Poland 0 -19 0.211111113 0.175966948 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -20 0.222222224 0.192742676 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -23 0.25555557 0.08235441 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Female United-States 0 -58 0.644444466 0.167534292 0.5625 0 0 0.535353541 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -20 0.222222224 0.151032031 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Own-child White Male United-States 0 -62 0.6888889 0.0930535048 0.5625 0 0 0.121212125 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.09999293 0.5625 0.04416044 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female Puerto-Rico 0 -67 0.7444445 0.159376442 0.8125 0 0 0.02020202 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.128890246 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male France 1 -36 0.4 0.2381106 0.5625 0.0183101818 0 0.4040404 Private HS-grad Divorced Exec-managerial Own-child White Female United-States 0 -38 0.422222227 0.263378918 0.6875 0 0 0.2020202 Private Assoc-voc Separated Tech-support Unmarried White Female United-States 0 -23 0.25555557 0.0909251347 0.5625 0 0 0.8080808 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -28 0.311111122 0.264353544 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -25 0.2777778 0.14597109 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Own-child White Male United-States 0 -41 0.455555558 0.117461048 1 0.1502415 0 0.5555556 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -63 0.7 0.2580028 0.8125 0 0.4242424 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -60 0.6666667 0.06470848 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.06966704 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.06514291 0.5625 0 0 0.373737365 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.120527647 0.8125 0.07688077 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -51 0.566666663 0.117186248 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Sales Husband White Male United-States 0 -45 0.5 0.0231823828 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.151443556 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.1682873 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -34 0.377777785 0.2293102 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -66 0.733333349 0.287883461 1 0 0.5456841 0.25252524 Self-emp-not-inc Doctorate Married-civ-spouse Sales Husband White Male United-States 1 -19 0.211111113 0.296636045 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child White Female United-States 0 -36 0.4 0.118301615 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.200366408 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -27 0.3 0.156902552 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.219794512 0.625 0.0183101818 0 0.4040404 Private Some-college Divorced Exec-managerial Own-child White Female United-States 0 -25 0.2777778 0.07369747 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -22 0.244444445 0.08605616 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Own-child White Male United-States 1 -41 0.455555558 0.1703948 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.2563095 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Transport-moving Own-child White Male United-States 0 -52 0.5777778 0.2061743 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.156835869 0.625 0 0 0.373737365 Private Some-college Separated Other-service Unmarried Black Female United-States 0 -44 0.4888889 0.0876443461 0.9375 0 0 0.454545468 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 -50 0.5555556 0.130821273 0.875 0 0 0.4040404 Private Masters Divorced Sales Not-in-family White Female United-States 1 -49 0.544444442 0.132711887 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.113303989 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Own-child White Female United-States 0 -71 0.788888931 0.0175853111 0.9375 0 0 0.282828271 State-gov Prof-school Married-civ-spouse Other-service Husband White Male United-States 0 -20 0.222222224 0.192409277 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Other-relative Black Male United-States 0 -20 0.222222224 0.103443444 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female ? 0 -59 0.655555546 0.07001256 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.29630062 0.1875 0.03411034 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -38 0.422222227 0.0271562375 0.625 0 0 0.424242437 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -55 0.6111111 0.107110843 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -17 0.188888893 0.06646101 0.3125 0 0 0.2020202 Private 9th Never-married Other-service Unmarried White Female United-States 0 -45 0.5 0.0611286424 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.0508080758 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Divorced Craft-repair Unmarried Amer-Indian-Eskimo Male United-States 0 -19 0.211111113 0.147631347 0.5 0 0 0.25252524 Private 12th Never-married Other-service Own-child White Male United-States 0 -33 0.366666675 0.137039348 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Own-child White Female United-States 0 -63 0.7 0.126378641 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -39 0.433333337 0.104156047 0.5625 0.0861408561 0 0.5050505 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 1 -34 0.377777785 0.018288482 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.1012484 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Machine-op-inspct Unmarried White Male United-States 0 -21 0.233333334 0.05637753 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.118718535 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Adm-clerical Other-relative White Female United-States 0 -20 0.222222224 0.120847575 0.625 0 0 0.08080808 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 -45 0.5 0.113179386 0.8125 0 0 0.6060606 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 -59 0.655555546 0.07325698 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -58 0.644444466 0.09865731 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male Greece 1 -66 0.733333349 0.126772657 0.5625 0 0 0.353535354 Local-gov HS-grad Widowed Adm-clerical Unmarried White Female United-States 1 -37 0.411111116 0.197247937 0.6875 0 0.4331956 0.353535354 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -29 0.322222233 0.07736891 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Own-child White Male United-States 0 -32 0.355555564 0.05234912 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Exec-managerial Not-in-family Asian-Pac-Islander Female United-States 0 -39 0.433333337 0.1913956 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -57 0.6333333 0.09018762 0.5625 0 0 0.454545468 Private HS-grad Widowed Exec-managerial Unmarried White Female United-States 0 -57 0.6333333 0.128859267 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.0456616 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-spouse-absent Sales Not-in-family White Male United-States 0 -44 0.4888889 0.240909144 0.8125 0.1502415 0 0.656565666 Self-emp-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -56 0.622222245 0.07939085 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 1 -26 0.2888889 0.03767011 0.875 0 0 0.4848485 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -22 0.244444445 0.111176968 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female Italy 0 -26 0.2888889 0.0231069475 0.6875 0 0 0.656565666 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Own-child White Male United-States 0 -33 0.366666675 0.165715083 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.09918334 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 -45 0.5 0.221689835 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -56 0.622222245 0.0356656723 1 0 0.383149683 0.3838384 Local-gov Doctorate Divorced Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.145605356 0.625 0 0 0.363636374 Private Some-college Never-married Sales Own-child White Male Iran 0 -23 0.25555557 0.263467163 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family Black Male United-States 0 -35 0.3888889 0.15036118 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -39 0.433333337 0.06999707 0.8125 0.07688077 0 0.323232323 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -45 0.5 0.0257559586 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.09998215 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 -56 0.622222245 0.07426189 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -31 0.344444454 0.06825935 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -44 0.4888889 0.180573255 0.5 0 0 0.363636374 Private 12th Never-married Transport-moving Not-in-family Black Male United-States 0 -21 0.233333334 0.2485908 0.625 0 0 0.1010101 ? Some-college Never-married ? Other-relative White Male United-States 0 -31 0.344444454 0.1945336 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -20 0.222222224 0.109575979 0.5625 0 0 0.3838384 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -17 0.188888893 0.03283548 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child Black Female United-States 0 -44 0.4888889 0.123997025 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -19 0.211111113 0.207109153 0.625 0 0 0.232323229 Private Some-college Never-married Other-service Own-child White Female United-States 0 -71 0.788888931 0.119206175 0.5625 0 0 0.24242425 ? HS-grad Widowed ? Unmarried White Male United-States 0 -23 0.25555557 0.180476934 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -21 0.233333334 0.191262916 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male Mexico 0 -29 0.322222233 0.137748584 0.875 0 0 0.151515156 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.112999551 0.625 0 0 0.3030303 Private Some-college Separated Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.232418567 0.5625 0 0 0.4848485 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 1 -21 0.233333334 0.2560906 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Black Female United-States 0 -36 0.4 0.20620662 0.625 0.1502415 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -70 0.7777778 0.025057504 0.875 0.09386094 0 0.3030303 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.124669217 0.5625 0 0 0.373737365 Private HS-grad Never-married Handlers-cleaners Not-in-family White Female United-States 0 -29 0.322222233 0.09753318 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Own-child Black Female United-States 0 -34 0.377777785 0.12608768 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Sales Unmarried White Male United-States 0 -26 0.2888889 0.084251754 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -30 0.333333343 0.194959939 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -34 0.377777785 0.097526446 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.115950309 0.8125 0 0 0.25252524 ? Bachelors Never-married ? Not-in-family Asian-Pac-Islander Male Taiwan 0 -28 0.311111122 0.139767155 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Own-child White Male United-States 0 -24 0.266666681 0.110846266 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -76 0.844444454 0.134672552 0.8125 0.200512 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -19 0.211111113 0.143479 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 -45 0.5 0.143557146 0.375 0.0282902829 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.0561552644 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 1 -37 0.411111116 0.129951075 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.285911351 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -24 0.266666681 0.144973591 0.8125 0 0 0.424242437 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.0206653848 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -20 0.222222224 0.206531942 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -23 0.25555557 0.147287175 0.4375 0 0 0.4040404 Local-gov 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -25 0.2777778 0.1475916 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family Other Female United-States 0 -64 0.7111111 0.121656492 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Prof-specialty Other-relative White Female United-States 0 -53 0.5888889 0.134834871 0.875 0 0.453856736 0.5555556 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.1309836 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Own-child White Female United-States 0 -52 0.5777778 0.13859117 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -28 0.311111122 0.168296069 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family Black Male United-States 0 -31 0.344444454 0.142278776 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -77 0.8555556 0.1009709 0.8125 0 0 0.1010101 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -22 0.244444445 0.0575124361 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Own-child White Male United-States 0 -17 0.188888893 0.543081641 0.4375 0 0 0.2020202 ? 11th Never-married ? Own-child White Female United-States 0 -38 0.422222227 0.2222529 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -45 0.5 0.159366339 0.4375 0 0 0.4040404 ? 11th Divorced ? Own-child Black Male United-States 0 -25 0.2777778 0.16785422 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -50 0.5555556 0.173183233 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -53 0.5888889 0.137668431 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -24 0.266666681 0.196657926 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -33 0.366666675 0.09339701 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -57 0.6333333 0.0284891613 0.875 0.1502415 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -39 0.433333337 0.252879858 0.9375 0.1502415 0 0.4848485 Private Prof-school Married-civ-spouse Exec-managerial Wife White Female United-States 1 -30 0.333333343 0.0635904148 0.625 0 0 0.3030303 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 -31 0.344444454 0.112228356 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -39 0.433333337 0.219953462 0.625 0 0 0.4040404 State-gov Some-college Never-married Transport-moving Own-child Black Male United-States 0 -30 0.333333343 0.111471981 0.8125 0 0 0.656565666 Private Bachelors Never-married Sales Own-child White Female United-States 0 -48 0.533333361 0.0691026151 0.625 0 0 0.444444448 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 -62 0.6888889 0.076267004 0.875 0 0 0.4040404 ? Masters Married-civ-spouse ? Wife White Female United-States 0 -39 0.433333337 0.11940217 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -34 0.377777785 0.1334292 0.5625 0 0.454545438 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -45 0.5 0.175449 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.159949616 0.4375 0 0 0.4040404 Private 11th Divorced Machine-op-inspct Unmarried White Female United-States 0 -40 0.444444448 0.02484332 0.625 0 0 0.5050505 Federal-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -17 0.188888893 0.111969717 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Female United-States 0 -19 0.211111113 0.106824592 0.375 0 0 0.25252524 ? 10th Never-married ? Own-child Black Male United-States 0 -25 0.2777778 0.184702009 0.5625 0 0 0.8484849 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -42 0.466666669 0.124701545 0.625 0 0 0.575757563 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -66 0.733333349 0.0191061534 0.8125 0 0 1 Private Bachelors Married-civ-spouse Priv-house-serv Other-relative White Male United-States 0 -63 0.7 0.0192711689 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Widowed Sales Not-in-family White Male United-States 0 -43 0.477777779 0.128934041 0.25 0 0 0.25252524 Private 7th-8th Married-civ-spouse Other-service Husband White Male United-States 0 -26 0.2888889 0.309521437 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male Mexico 0 -23 0.25555557 0.04410371 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 -39 0.433333337 0.125364974 0.9375 0 0 0.5555556 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.236248285 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.242255539 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Female United-States 0 -35 0.3888889 0.148578346 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.0199359469 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -21 0.233333334 0.201489866 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -46 0.51111114 0.05068751 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Priv-house-serv Wife White Female United-States 0 -43 0.477777779 0.096708104 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -31 0.344444454 0.139761776 1 0 0.453856736 0.7070707 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.207819059 0.5625 0 0 0.6060606 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -50 0.5555556 0.0981454253 0.5625 0 0 0.353535354 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.225207031 0.4375 0 0 0.323232323 Private 11th Separated Exec-managerial Not-in-family White Female United-States 0 -31 0.344444454 0.05132198 0.5625 0 0 0.2020202 ? HS-grad Separated ? Own-child White Female United-States 0 -45 0.5 0.1047272 0.25 0 0 0.656565666 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.132903174 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.130840138 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Exec-managerial Wife White Female United-States 0 -40 0.444444448 0.233170226 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.06624953 0.8125 0.1502415 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -64 0.7111111 0.120263621 0.375 0 0 0.565656543 ? 10th Married-civ-spouse ? Husband White Male United-States 1 -51 0.566666663 0.10974773 0.9375 0 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.0130005628 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -56 0.622222245 0.04557269 0.875 0 0 0.3939394 State-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -35 0.3888889 0.08531998 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -55 0.6111111 0.187396154 0.375 0 0 0.353535354 Self-emp-not-inc 10th Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.113929704 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Unmarried White Female United-States 0 -34 0.377777785 0.137436062 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.145073935 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -43 0.477777779 0.05613775 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.132562369 0.625 0 0 0.5050505 Local-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 0 -30 0.333333343 0.364613175 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband Black Male United-States 0 -33 0.366666675 0.0376647227 0.6875 0 0 0.7070707 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 0 -32 0.355555564 0.1695293 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Male ? 0 -29 0.322222233 0.08072176 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -50 0.5555556 0.10815078 0.5625 0.031370312 0 0.474747479 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -18 0.2 0.01740211 0.4375 0 0 0.151515156 Private 11th Never-married Prof-specialty Own-child White Male United-States 0 -20 0.222222224 0.159352869 0.4375 0 0 0.25252524 Private 11th Never-married Sales Own-child White Female United-States 0 -45 0.5 0.134252936 0.875 0 0 0.454545468 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.230086118 0.625 0 0 0.353535354 Private Some-college Never-married Sales Not-in-family White Male ? 0 -45 0.5 0.118513778 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.1340098 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -42 0.466666669 0.130353838 0.25 0 0 0.353535354 Local-gov 7th-8th Married-spouse-absent Other-service Not-in-family White Female Puerto-Rico 0 -24 0.266666681 0.2955732 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -22 0.244444445 0.200866163 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 -28 0.311111122 0.182841718 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.226017967 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -21 0.233333334 0.139348224 0.25 0 0 0.3838384 Private 7th-8th Never-married Farming-fishing Own-child White Female United-States 0 -23 0.25555557 0.109483704 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 -45 0.5 0.09809154 0.625 0 0 0.4848485 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -41 0.455555558 0.06822231 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -49 0.544444442 0.154492646 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -38 0.422222227 0.296080381 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child Black Female United-States 0 -37 0.411111116 0.108534023 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -70 0.7777778 0.2051384 0.8125 0 0 0.323232323 Private Bachelors Widowed Machine-op-inspct Other-relative Asian-Pac-Islander Male Philippines 0 -24 0.266666681 0.0695606247 0.5625 0.02597026 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.274581164 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.0497930571 0.6875 0 0 0.2020202 Private Assoc-voc Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -83 0.922222257 0.1617493 0.375 0.200512 0 0.5050505 Self-emp-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 1 -69 0.7666667 0.155193791 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male China 1 -37 0.411111116 0.175181612 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -28 0.311111122 0.06467278 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -54 0.6 0.07033114 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -71 0.788888931 0.102584019 0.5625 0 0.5456841 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.06291822 0.5625 0 0 0.4040404 State-gov HS-grad Widowed Adm-clerical Unmarried Asian-Pac-Islander Female United-States 0 -27 0.3 0.190383956 0.8125 0 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Not-in-family Other Female ? 0 -42 0.466666669 0.18167448 0.875 1 0 0.8080808 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -21 0.233333334 0.136640608 0.5625 0 0 0.444444448 Private HS-grad Never-married Sales Own-child White Male United-States 0 -29 0.322222233 0.114287354 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -27 0.3 0.182933986 0.25 0 0 0.24242425 Private 7th-8th Never-married Other-service Not-in-family White Male ? 0 -32 0.355555564 0.229619354 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -31 0.344444454 0.222181514 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -38 0.422222227 0.0294806045 0.625 0.046500463 0 0.727272749 Private Some-college Separated Other-service Not-in-family White Female United-States 0 -55 0.6111111 0.08135017 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -48 0.533333361 0.0929942355 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -58 0.644444466 0.02243476 0.5625 0 0 0.8080808 Self-emp-not-inc HS-grad Widowed Farming-fishing Not-in-family White Male United-States 0 -23 0.25555557 0.05147959 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.186996743 0.625 0 0 0.5050505 State-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -49 0.544444442 0.08290401 0.625 0 0 0.464646459 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -51 0.566666663 0.03886159 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 -23 0.25555557 0.122462042 0.5625 0 0 0.535353541 Private HS-grad Separated Craft-repair Own-child White Male United-States 0 -40 0.444444448 0.0666698143 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Exec-managerial Not-in-family Black Male United-States 0 -59 0.655555546 0.06624211 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Asian-Pac-Islander Male China 0 -47 0.5222222 0.08427264 0.8125 0 0 0.5050505 Private Bachelors Divorced Craft-repair Not-in-family White Female United-States 0 -37 0.411111116 0.163944349 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -39 0.433333337 0.0397196747 0.75 0.01506015 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Unmarried White Male United-States 0 -43 0.477777779 0.0423363559 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.190727457 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -48 0.533333361 0.07231942 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 -29 0.322222233 0.13548483 0.3125 0 0 0.4848485 Private 9th Never-married Sales Not-in-family White Female United-States 0 -48 0.533333361 0.126291081 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.0416096151 0.8125 0 0 0.3030303 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 -19 0.211111113 0.150634646 0.5625 0.04101041 0 0.4848485 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -28 0.311111122 0.100795783 0.375 0 0 0.3030303 Private 10th Never-married Other-service Own-child Black Female United-States 0 -56 0.622222245 0.114719085 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband Black Male Trinadad&Tobago 0 -45 0.5 0.111764289 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Own-child White Male United-States 0 -60 0.6666667 0.07682335 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -53 0.5888889 0.0396799371 0.875 0 0 0.424242437 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.255213 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -31 0.344444454 0.162917882 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -29 0.322222233 0.151155278 0.6875 0 0 0.444444448 Private Assoc-voc Married-AF-spouse Farming-fishing Husband White Male United-States 1 -31 0.344444454 0.143982142 0.5625 0 0 0.363636374 ? HS-grad Widowed ? Unmarried White Female United-States 0 -39 0.433333337 0.2125439 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male Cuba 0 -31 0.344444454 0.103054143 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.0661485 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.133767992 0.4375 0 0 0.161616161 Private 11th Never-married Handlers-cleaners Own-child White Female United-States 0 -19 0.211111113 0.17534326 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -24 0.266666681 0.147847548 0.8125 0 0 0.323232323 Private Bachelors Never-married Other-service Not-in-family Asian-Pac-Islander Male United-States 0 -62 0.6888889 0.179580465 0.5625 0.06418064 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -34 0.377777785 0.09218128 0.125 0 0 0.4040404 Private 1st-4th Never-married Other-service Other-relative White Female Guatemala 0 -47 0.5222222 0.1452275 0.875 0.1502415 0 0.5555556 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.125996083 0.8125 0 0 0.6262626 Private Bachelors Never-married Prof-specialty Not-in-family White Female Canada 0 -23 0.25555557 0.219519034 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.180592775 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -76 0.844444454 0.096002236 0.5625 0 0 0.0606060624 Private HS-grad Widowed Adm-clerical Not-in-family White Male United-States 0 -40 0.444444448 0.119271509 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -28 0.311111122 0.05186822 0.25 0 0 0.5050505 Private 7th-8th Divorced Other-service Unmarried White Female United-States 0 -41 0.455555558 0.206374332 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 0 -46 0.51111114 0.204699248 0.5625 0.07688077 0 0.969697 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -22 0.244444445 0.177017659 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.0330617875 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -26 0.2888889 0.03625838 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Male United-States 0 -31 0.344444454 0.695910633 0.8125 0.0861408561 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 1 -22 0.244444445 0.0546539575 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -41 0.455555558 0.145132542 0.625 0 0 0.434343427 Private Some-college Never-married Transport-moving Not-in-family Black Male United-States 0 -29 0.322222233 0.07642192 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Other-relative Other Male Dominican-Republic 0 -60 0.6666667 0.07377223 0.6875 0.07298073 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -72 0.8 0.146738917 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -41 0.455555558 0.07928915 0.625 0 0 0.656565666 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -19 0.211111113 0.13435936 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -25 0.2777778 0.167609736 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Male United-States 0 -24 0.266666681 0.0787819847 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -59 0.655555546 0.246929869 0.3125 0 0 0.3030303 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 -17 0.188888893 0.1617446 0.4375 0 0 0.3030303 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -59 0.655555546 0.285893828 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -69 0.7666667 0.215719625 0.625 0.0184801836 0 0.01010101 ? Some-college Never-married ? Not-in-family White Male United-States 0 -25 0.2777778 0.080984436 0.625 0.0288502872 0 0.434343427 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.130790964 0.5625 0 0 0.6060606 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -29 0.322222233 0.166398719 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -43 0.477777779 0.121639654 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.128193825 0.625 0 0 0.1010101 Local-gov Some-college Never-married Other-service Own-child White Female United-States 0 -29 0.322222233 0.134336457 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Unmarried Black Male United-States 0 -32 0.355555564 0.1343964 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -17 0.188888893 0.06355876 0.375 0 0 0.0606060624 ? 10th Never-married ? Other-relative White Male United-States 0 -50 0.5555556 0.0196880866 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.0223115031 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.068757765 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Female United-States 0 -32 0.355555564 0.142832413 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -54 0.6 0.112328038 0.875 0 0 0.454545468 State-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 1 -65 0.722222269 0.06418986 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.255786836 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child Other Female United-States 0 -70 0.7777778 0.166620985 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -53 0.5888889 0.1545526 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.09122082 0.8125 0 0.453856736 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.12127123 0.625 0 0 0.3030303 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -20 0.222222224 0.144397035 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -47 0.5222222 0.10058362 0.5625 0 0 0.3838384 State-gov HS-grad Divorced Adm-clerical Unmarried White Male United-States 0 -26 0.2888889 0.140314743 0.5625 0.0394203924 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.0231520738 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 -45 0.5 0.0395250246 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.2714593 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -55 0.6111111 0.0217989441 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.1047272 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.195248216 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Never-married Other-service Unmarried Asian-Pac-Islander Male Vietnam 0 -30 0.333333343 0.03683156 0.9375 0 0 0.5555556 Federal-gov Prof-school Never-married Exec-managerial Not-in-family White Male ? 0 -19 0.211111113 0.0683967546 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Male United-States 0 -48 0.533333361 0.0347402357 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.0270430837 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 1 -29 0.322222233 0.164828032 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -47 0.5222222 0.153816417 0.875 0 0 0.4848485 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.159542128 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -19 0.211111113 0.168551326 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -71 0.788888931 0.06277476 0.5625 0 0 0.161616161 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -29 0.322222233 0.119029038 0.625 0 0 0.25252524 Private Some-college Never-married Sales Unmarried White Female United-States 0 -43 0.477777779 0.118222818 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -23 0.25555557 0.0618587546 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -52 0.5777778 0.0483382232 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -56 0.622222245 0.122057922 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.137748584 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.0600604154 0.8125 0 0 0.8080808 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.09668385 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.20939447 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.1012484 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.14580135 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 -64 0.7111111 0.14335373 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.1133444 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -40 0.444444448 0.126423776 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 1 -19 0.211111113 0.0408572741 0.5625 0 0 0.5252525 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -54 0.6 0.07764775 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 -61 0.677777767 0.06624211 1 0 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Taiwan 1 -18 0.2 0.131589785 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 -62 0.6888889 0.0549455956 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -33 0.366666675 0.0751442239 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -51 0.566666663 0.164727673 0.5625 0 0 0.373737365 Private HS-grad Separated Other-service Not-in-family Black Female United-States 0 -54 0.6 0.155531913 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.190343544 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Protective-serv Other-relative White Male United-States 0 -54 0.6 0.215663046 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female Germany 0 -42 0.466666669 0.1356943 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.17121987 0.875 0 0 0.5050505 Federal-gov Masters Widowed Sales Unmarried White Male El-Salvador 1 -41 0.455555558 0.403870821 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 1 -47 0.5222222 0.147929728 0.75 0 0.323232323 0.4040404 Local-gov Assoc-acdm Separated Exec-managerial Not-in-family White Male United-States 0 -31 0.344444454 0.108864054 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -21 0.233333334 0.1363052 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child Black Male United-States 0 -52 0.5777778 0.1141971 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -20 0.222222224 0.08566348 0.625 0 0 0.151515156 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -18 0.2 0.124116912 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Own-child White Female United-States 0 -58 0.644444466 0.08065643 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Priv-house-serv Other-relative Asian-Pac-Islander Female Philippines 0 -23 0.25555557 0.19849129 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -21 0.233333334 0.0180790126 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -43 0.477777779 0.07714462 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 -53 0.5888889 0.08512533 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 -18 0.2 0.110316195 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -44 0.4888889 0.0661485 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.118211366 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -48 0.533333361 0.107667185 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Other-service Husband White Male United-States 0 -55 0.6111111 0.08144379 0.875 0 0 0.353535354 Self-emp-inc Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.126322061 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -41 0.455555558 0.0183908585 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.145962328 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.147231951 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 -54 0.6 0.188786328 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.135040969 0.8125 0 0 0.4040404 Private Bachelors Separated Sales Not-in-family White Male United-States 0 -56 0.622222245 0.05259631 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Divorced Sales Unmarried White Female United-States 0 -23 0.25555557 0.07994383 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 -34 0.377777785 0.137056187 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.115909226 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Unmarried Black Male United-States 0 -32 0.355555564 0.07635456 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -72 0.8 0.0942200646 0.625 0 0 0.74747473 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -43 0.477777779 0.2031636 0.5 0 0.3624885 0.4040404 Local-gov 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.07427671 0.75 0 0 0.353535354 Private Assoc-acdm Divorced Prof-specialty Unmarried Black Female United-States 0 -53 0.5888889 0.1635739 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Own-child White Male Cuba 0 -18 0.2 0.08957066 0.5 0 0 0.1010101 Private 12th Never-married Other-service Own-child White Male United-States 0 -38 0.422222227 0.171373442 0.375 0.00114001136 0 0.4040404 Private 10th Widowed Transport-moving Unmarried Black Male United-States 0 -41 0.455555558 0.126262128 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Divorced Adm-clerical Own-child Black Female United-States 0 -29 0.322222233 0.178460374 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -70 0.7777778 0.0997268856 0.625 0 0 0.04040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -46 0.51111114 0.135346085 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Widowed Exec-managerial Not-in-family White Female ? 0 -47 0.5222222 0.031822484 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -56 0.622222245 0.384599656 0.625 0 0 0.151515156 Local-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -28 0.311111122 0.280578971 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -55 0.6111111 0.20003368 0.9375 0.1502415 0 0.4040404 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.0309563186 0.8125 0.068490684 0 0.4040404 State-gov Bachelors Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 -47 0.5222222 0.2038863 0.4375 0 0 0.4040404 Private 11th Divorced Adm-clerical Unmarried White Female United-States 0 -42 0.466666669 0.0339165032 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -22 0.244444445 0.134259671 0.625 0 0 0.25252524 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -42 0.466666669 0.229795143 0.1875 0 0 0.444444448 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 -42 0.466666669 0.0473090634 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Unmarried Asian-Pac-Islander Female United-States 0 -46 0.51111114 0.154504776 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -45 0.5 0.2629263 0.625 0.1502415 0 1 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 1 -55 0.6111111 0.0552958325 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 0 -57 0.6333333 0.114777684 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -25 0.2777778 0.07377358 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Own-child White Male United-States 0 -43 0.477777779 0.09610125 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Transport-moving Husband White Male Dominican-Republic 0 -34 0.377777785 0.08597735 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Divorced Farming-fishing Not-in-family White Male United-States 0 -27 0.3 0.159272045 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Other-relative White Female United-States 0 -25 0.2777778 0.118573725 0.5625 0.0217602178 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -37 0.411111116 0.0750984251 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -48 0.533333361 0.2863862 0.625 0 0 0.454545468 Private Some-college Divorced Sales Unmarried White Male United-States 0 -38 0.422222227 0.154245466 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -17 0.188888893 0.156740233 0.375 0.005940059 0 0.3030303 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 -70 0.7777778 0.0954681262 0.6875 0.09386094 0 0.5050505 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -37 0.411111116 0.158150613 0.5625 0 0 0.373737365 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -45 0.5 0.497615367 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -56 0.622222245 0.137950644 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -64 0.7111111 0.230681524 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.152428269 0.625 0 0 0.3838384 Local-gov Some-college Divorced Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.09635719 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -42 0.466666669 0.08429621 0.5625 0 0 0.909090936 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -23 0.25555557 0.222215861 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -26 0.2888889 0.140764669 0.625 0 0 0.121212125 ? Some-college Never-married ? Own-child White Male United-States 0 -56 0.622222245 0.143371239 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -41 0.455555558 0.144299373 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.12876296 0.1875 0 0.500229537 0.5050505 Self-emp-not-inc 5th-6th Married-civ-spouse Sales Husband White Male Mexico 0 -21 0.233333334 0.07994383 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -29 0.322222233 0.170803636 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -32 0.355555564 0.138782457 0.625 0 0 0.5050505 State-gov Some-college Married-spouse-absent Farming-fishing Own-child White Male United-States 0 -72 0.8 0.334935218 0.3125 0 0 0.2020202 Private 9th Widowed Other-service Unmarried Black Female United-States 0 -69 0.7666667 0.162026808 0.9375 1 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.09495826 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Other-relative White Male United-States 0 -25 0.2777778 0.129265413 0.8125 0 0 0.25252524 Local-gov Bachelors Never-married Craft-repair Own-child White Male United-States 0 -56 0.622222245 0.137434036 0.625 0 0.4242424 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.22337839 0.875 0.0861408561 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 1 -58 0.644444466 0.09574831 0.8125 0 0 0.353535354 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -24 0.266666681 0.167741075 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 -41 0.455555558 0.143475637 0.6875 0 0 0.3838384 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 -40 0.444444448 0.134436816 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.125406057 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Husband White Male ? 0 -25 0.2777778 0.0188643541 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.0555585138 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Own-child Asian-Pac-Islander Female Philippines 1 -36 0.4 0.0788527057 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -41 0.455555558 0.2194281 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.025288526 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -22 0.244444445 0.13755326 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 -36 0.4 0.08978147 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.0200053211 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -29 0.322222233 0.207322 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.117562078 0.5625 0 0 0.464646459 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.157251447 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -34 0.377777785 0.124029353 0.5625 0 0 0.2020202 Private HS-grad Separated Sales Unmarried Black Female United-States 0 -27 0.3 0.13348645 0.5625 0.0258002579 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -32 0.355555564 0.30111438 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 1 -33 0.366666675 0.134872586 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 -38 0.422222227 0.112200744 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -21 0.233333334 0.226017967 0.625 0 0 0.3030303 Private Some-college Never-married Machine-op-inspct Own-child White Male ? 0 -39 0.433333337 0.03608057 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.11252404 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.07635456 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -40 0.444444448 0.147683218 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.134735182 0.625 0.1502415 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.138731271 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -63 0.7 0.157662973 0.5625 0 0.506198347 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -56 0.622222245 0.04399864 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -30 0.333333343 0.1311641 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 -39 0.433333337 0.0667237 0.625 0 0 0.3939394 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -25 0.2777778 0.143323421 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 1 -33 0.366666675 0.07606966 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -41 0.455555558 0.126167834 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -50 0.5555556 0.191065565 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.116980813 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -27 0.3 0.113470353 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -27 0.3 0.1255832 0.8125 0.135501355 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 1 -58 0.644444466 0.0955119058 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Italy 0 -25 0.2777778 0.165438935 0.625 0 0 0.151515156 Private Some-college Never-married Tech-support Own-child White Male Mexico 0 -31 0.344444454 0.178395033 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Amer-Indian-Eskimo Female United-States 0 -39 0.433333337 0.177032471 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.0252157841 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.115039691 0.6875 0 0 0.121212125 Private Assoc-voc Never-married Other-service Own-child White Female United-States 0 -44 0.4888889 0.102478273 0.75 0 0 0.4040404 Private Assoc-acdm Separated Exec-managerial Not-in-family White Male United-States 0 -41 0.455555558 0.142703772 0.6875 0 0.373737365 0.05050505 ? Assoc-voc Married-civ-spouse ? Wife White Female ? 0 -44 0.4888889 0.107482634 0.5 0 0 0.4040404 Private 12th Divorced Transport-moving Not-in-family White Female United-States 0 -61 0.677777767 0.3214167 0.25 0 0 0.545454562 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -32 0.355555564 0.0478108451 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.162994 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.168074474 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.0911554843 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Philippines 1 -32 0.355555564 0.0300901532 1 0 0 0.656565666 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.167031169 0.25 0 0 0.4040404 State-gov 7th-8th Never-married Other-service Not-in-family Black Female United-States 0 -26 0.2888889 0.149272755 0.5625 0 0.3624885 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -43 0.477777779 0.03238825 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.07681324 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Other-service Not-in-family White Female United-States 0 -60 0.6666667 0.0466429368 0.875 0 0 0.3838384 State-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 1 -67 0.7444445 0.129769892 0.5625 0 0 0.2020202 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -19 0.211111113 0.180771261 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 -55 0.6111111 0.11517036 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -48 0.533333361 0.2906389 0.375 0 0 0.656565666 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.0251443889 0.5625 0 0 0.2020202 State-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.0241563153 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -43 0.477777779 0.123856932 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -31 0.344444454 0.101238295 1 0 0 0.909090936 Private Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 0 -65 0.722222269 0.06285289 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -32 0.355555564 0.115722656 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -36 0.4 0.123751856 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.238122061 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -33 0.366666675 0.10261365 0.625 0.03908039 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -72 0.8 0.182764933 0.375 0 0 0.121212125 ? 10th Divorced ? Not-in-family White Male United-States 0 -34 0.377777785 0.232844234 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.150704011 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -75 0.8333334 0.110843569 0.4375 0 0 0.5050505 Self-emp-inc 11th Never-married Exec-managerial Not-in-family White Male United-States 0 -39 0.433333337 0.189507678 0.375 0 0 0.151515156 ? 10th Widowed ? Unmarried White Female United-States 0 -51 0.566666663 0.07459193 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.0232086517 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -31 0.344444454 0.171275109 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -40 0.444444448 0.181953326 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 -48 0.533333361 0.131669924 0.5625 0 0 0.3030303 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -36 0.4 0.172057077 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Protective-serv Not-in-family Black Male United-States 0 -18 0.2 0.08494954 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -33 0.366666675 0.416372955 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -34 0.377777785 0.109860212 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 -51 0.566666663 0.09793798 0.625 0.03103031 0 0.4848485 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.158535868 0.75 0 0 0.4040404 State-gov Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 -20 0.222222224 0.03735759 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -67 0.7444445 0.122057922 0.625 0 0 0.2020202 Local-gov Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 -42 0.466666669 0.0179645121 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -59 0.655555546 0.06624953 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.148098782 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Not-in-family Black Male United-States 0 -19 0.211111113 0.253709 0.625 0.0203602035 0 0.3030303 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 -47 0.5222222 0.0228092447 0.625 0 0 0.4848485 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -68 0.75555557 0.113688581 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Other-service Husband White Male United-States 0 -30 0.333333343 0.0634772554 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -34 0.377777785 0.0232854337 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -49 0.544444442 0.234895825 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.0440370329 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -60 0.6666667 0.07860619 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -51 0.566666663 0.119925506 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male ? 1 -24 0.266666681 0.0942955 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -18 0.2 0.112405494 0.625 0 0.3677686 0.353535354 Private Some-college Never-married Handlers-cleaners Own-child Black Female United-States 0 -24 0.266666681 0.07933495 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -21 0.233333334 0.160918832 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 -48 0.533333361 0.163617015 0.5625 0 0.4242424 0.4040404 Local-gov HS-grad Married-civ-spouse Tech-support Wife White Female United-States 1 -52 0.5777778 0.222804531 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Other-service Wife White Female United-States 0 -48 0.533333361 0.141078532 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -40 0.444444448 0.0507259034 0.8125 0.07688077 0 0.6666667 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.228395551 0.4375 0.03418034 0 0.4848485 ? 11th Divorced ? Not-in-family White Female United-States 0 -20 0.222222224 0.124455027 0.625 0 0 0.2020202 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -31 0.344444454 0.09362129 0.5625 0 0 0.25252524 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -30 0.333333343 0.243645713 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.175645664 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male ? 0 -51 0.566666663 0.137020484 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -29 0.322222233 0.06774343 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 -56 0.622222245 0.2398234 0.875 0 0 0.161616161 Self-emp-not-inc Masters Never-married Sales Not-in-family White Male United-States 0 -46 0.51111114 0.0587658845 0.8125 0 0 0.4040404 Private Bachelors Separated Tech-support Unmarried White Female United-States 0 -41 0.455555558 0.178259656 0.625 0 0.8953168 0.4040404 Private Some-college Separated Prof-specialty Own-child White Female United-States 0 -29 0.322222233 0.172301576 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Other-relative White Female El-Salvador 0 -48 0.533333361 0.164093882 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male South 0 -34 0.377777785 0.366583258 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Divorced Sales Not-in-family White Female United-States 0 -42 0.466666669 0.06604747 0.6875 0 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.06445119 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Unmarried White Female Columbia 0 -47 0.5222222 0.0982471257 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Unmarried Black Female United-States 0 -23 0.25555557 0.0438053347 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -43 0.477777779 0.1533867 0.6875 0 0 0.222222224 Local-gov Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.119101778 0.625 0 0 0.353535354 Local-gov Some-college Never-married Other-service Own-child Black Female United-States 0 -22 0.244444445 0.142572433 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -40 0.444444448 0.105906561 0.8125 0 0 0.7070707 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -41 0.455555558 0.0979595259 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male Yugoslavia 0 -71 0.788888931 0.04487356 0.8125 0 0.549127638 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.0515166335 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -31 0.344444454 0.375733227 0.8125 0 0 0.474747479 State-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -69 0.7666667 0.176703125 0.625 0 0 0.323232323 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -58 0.644444466 0.079647474 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -36 0.4 0.09875699 0.4375 0 0 0.121212125 Private 11th Widowed Other-service Unmarried Black Female United-States 0 -31 0.344444454 0.11733038 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.0449213833 0.625 0.005940059 0 0.353535354 ? Some-college Never-married ? Own-child Other Female United-States 0 -41 0.455555558 0.0815852359 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.259881258 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.056199044 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -28 0.311111122 0.07688935 0.8125 0 0 0.151515156 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -27 0.3 0.257148057 0.5 0 0 0.5555556 Private 12th Married-civ-spouse Farming-fishing Own-child White Male United-States 0 -17 0.188888893 0.0552574433 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male Canada 0 -35 0.3888889 0.07787271 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Male United-States 1 -45 0.5 0.07146874 0.625 0 0 1 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -44 0.4888889 0.180184618 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 -27 0.3 0.06108419 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family Asian-Pac-Islander Female Philippines 0 -51 0.566666663 0.03845949 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.15956907 0.5625 0 0 0.454545468 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -64 0.7111111 0.261752337 0.375 0 0 0.1010101 Self-emp-not-inc 10th Married-civ-spouse Prof-specialty Husband White Male United-States 1 -54 0.6 0.175931916 0.25 0 0 0.454545468 Self-emp-not-inc 7th-8th Divorced Transport-moving Not-in-family White Male Cuba 0 -43 0.477777779 0.165343955 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Other Male Mexico 0 -32 0.355555564 0.176569089 0.5625 0 0 0.353535354 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -36 0.4 0.1518928 0.75 0.105201051 0 0.434343427 Private Assoc-acdm Never-married Sales Not-in-family Black Male United-States 1 -26 0.2888889 0.04629135 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Sales Other-relative Asian-Pac-Islander Male United-States 1 -37 0.411111116 0.0855079 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.0573002733 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -26 0.2888889 0.2581698 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.08630873 0.8125 0 0.4331956 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.124631494 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.06693114 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -66 0.733333349 0.106379382 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Transport-moving Not-in-family Black Female United-States 0 -43 0.477777779 0.16294685 0.5625 0 0 0.323232323 Private HS-grad Separated Adm-clerical Not-in-family Black Female United-States 0 -37 0.411111116 0.234887749 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.0644262657 0.375 0 0 0.353535354 Private 10th Divorced Exec-managerial Unmarried White Female United-States 0 -25 0.2777778 0.247393265 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -29 0.322222233 0.182137877 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -63 0.7 0.149249852 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -50 0.5555556 0.105711915 0.75 0.03103031 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -42 0.466666669 0.02642882 0.875 0 0 0.7070707 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -32 0.355555564 0.04899559 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -42 0.466666669 0.247383833 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -41 0.455555558 0.275137484 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.243478 0.8125 0.0332503319 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -65 0.722222269 0.106016345 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.155763611 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -32 0.355555564 0.164441422 0.5625 0 0 0.1010101 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -24 0.266666681 0.1488134 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.21149455 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -67 0.7444445 0.135287479 0.375 0 0 0.353535354 ? 10th Never-married ? Not-in-family Black Female United-States 0 -28 0.311111122 0.02247854 0.4375 0 0 0.353535354 Private 11th Married-spouse-absent Other-service Unmarried White Female United-States 0 -32 0.355555564 0.232698753 0.625 0 0 0.5555556 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -77 0.8555556 0.0563081577 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.109315991 0.5625 0 0 0.2020202 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -26 0.2888889 0.0760063455 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -20 0.222222224 0.0992412642 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -57 0.6333333 0.123699322 0.625 0 0 0.353535354 State-gov Some-college Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -40 0.444444448 0.08807137 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -50 0.5555556 0.11042463 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -19 0.211111113 0.2133737 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Handlers-cleaners Own-child White Male Mexico 0 -54 0.6 0.223777115 0.5 0 0 0.4040404 Federal-gov 12th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -51 0.566666663 0.131907687 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -51 0.566666663 0.26082623 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -38 0.422222227 0.126828566 0.625 0.07688077 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -68 0.75555557 0.02758528 0.8125 0 0 0.25252524 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -17 0.188888893 0.120531015 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 -32 0.355555564 0.2687322 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -29 0.322222233 0.360999674 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.200027615 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried White Male United-States 0 -40 0.444444448 0.156253934 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -27 0.3 0.199230835 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.135763675 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -58 0.644444466 0.13037473 0.4375 0 0 0.4040404 Private 11th Widowed Other-service Not-in-family White Female United-States 0 -61 0.677777767 0.0654190555 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.1369922 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Craft-repair Wife Black Female United-States 1 -49 0.544444442 0.0931969658 0.875 0 0 0.4040404 Private Masters Married-spouse-absent Protective-serv Not-in-family Asian-Pac-Islander Male India 0 -41 0.455555558 0.08101071 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 0 -43 0.477777779 0.0619308241 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Female United-States 0 -46 0.51111114 0.153816417 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Unmarried White Male United-States 1 -28 0.311111122 0.0890352 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -39 0.433333337 0.185008466 0.625 0.07688077 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.132219538 0.625 0.07688077 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -57 0.6333333 0.131901622 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Adm-clerical Not-in-family White Male United-States 0 -47 0.5222222 0.124872617 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -79 0.8777778 0.06983475 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -40 0.444444448 0.09467133 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Priv-house-serv Wife White Female United-States 0 -35 0.3888889 0.07421542 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Vietnam 0 -35 0.3888889 0.4501359 0.8125 0 0.399449021 0.8080808 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.0756769851 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 -26 0.2888889 0.102249272 0.375 0 0 0.4040404 Private 10th Never-married Farming-fishing Not-in-family Black Male United-States 0 -49 0.544444442 0.03241048 0.5625 0.01506015 0 0.4040404 Private HS-grad Never-married Transport-moving Unmarried Black Female United-States 0 -48 0.533333361 0.0975574255 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.138639659 0.625 0 0 0.454545468 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -22 0.244444445 0.07662129 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Own-child White Female United-States 0 -50 0.5555556 0.09318888 0.375 0 0 0.474747479 Private 10th Separated Adm-clerical Not-in-family Black Female Jamaica 0 -47 0.5222222 0.145925954 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -36 0.4 0.187630549 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -44 0.4888889 0.117446229 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -73 0.811111152 0.148190379 0.3125 0 0 0.09090909 Private 9th Widowed Other-service Unmarried White Female United-States 0 -24 0.266666681 0.210108414 0.5625 0 0 0.454545468 ? HS-grad Never-married ? Not-in-family Asian-Pac-Islander Female ? 0 -34 0.377777785 0.2046649 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.10386575 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Hong 0 -28 0.311111122 0.08844181 0.5 0 0 0.2020202 ? 12th Married-civ-spouse ? Wife White Female Germany 0 -46 0.51111114 0.136431143 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -20 0.222222224 0.241652727 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 -29 0.322222233 0.284921259 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -24 0.266666681 0.139200047 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.165224746 0.625 0 0 0.353535354 State-gov Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -18 0.2 0.0215416532 0.5 0 0 0.2020202 Private 12th Never-married Adm-clerical Own-child White Female United-States 0 -41 0.455555558 0.0841621757 0.8125 0 0 0.909090936 Private Bachelors Divorced Exec-managerial Unmarried Black Female United-States 1 -59 0.655555546 0.0797181949 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.330989 0.1875 0 0 0.5050505 Private 5th-6th Never-married Farming-fishing Unmarried White Male United-States 0 -50 0.5555556 0.10209436 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.167703345 0.125 0 0 0.24242425 Private 1st-4th Never-married Machine-op-inspct Not-in-family White Male Mexico 0 -42 0.466666669 0.106031165 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -36 0.4 0.149288923 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male Japan 0 -62 0.6888889 0.05930808 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -71 0.788888931 0.145892963 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.459988356 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -44 0.4888889 0.153649375 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Unmarried Black Female United-States 0 -19 0.211111113 0.14628765 0.375 0 0 0.3030303 ? 10th Never-married ? Own-child White Male United-States 0 -49 0.544444442 0.115538105 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -60 0.6666667 0.14199926 0.8125 0.07688077 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.276385546 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male Poland 0 -26 0.2888889 0.110289253 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -18 0.2 0.07334252 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -43 0.477777779 0.121300869 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -65 0.722222269 0.10365022 0.5 0.0200902 0 0.444444448 Local-gov 12th Widowed Exec-managerial Not-in-family White Male United-States 0 -23 0.25555557 0.0791268349 0.375 0 0 0.444444448 Private 10th Never-married Craft-repair Own-child White Male United-States 0 -21 0.233333334 0.110010408 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 -20 0.222222224 0.20657976 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -19 0.211111113 0.10140264 0.625 0 0 0.181818187 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Female Philippines 0 -77 0.8555556 0.08349066 0.5625 0 0 0.323232323 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.0168120936 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -37 0.411111116 0.2203266 0.625 0 0 0.3030303 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.0227641184 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.0551820062 1 0 0.5544077 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.201042637 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -30 0.333333343 0.0684964359 0.8125 0 0 0.2020202 ? Bachelors Married-civ-spouse ? Wife White Female United-States 0 -31 0.344444454 0.09703207 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -59 0.655555546 0.131901622 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.124417312 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Other-service Not-in-family White Female United-States 1 -56 0.622222245 0.178544566 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.15889284 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -37 0.411111116 0.0287228785 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -58 0.644444466 0.188507482 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.07064838 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.09231666 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Unmarried White Male United-States 0 -38 0.422222227 0.0397196747 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.08531998 0.875 0 0.453856736 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.192923844 0.625 0.005940059 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -46 0.51111114 0.128907084 0.5625 0 0 0.282828271 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -42 0.466666669 0.123419136 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -29 0.322222233 0.0616600625 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -42 0.466666669 0.0355498232 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.14208816 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 -47 0.5222222 0.246187627 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Unmarried White Female United-States 0 -37 0.411111116 0.07561839 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.181487232 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -46 0.51111114 0.110714927 0.8125 0 0 0.353535354 Private Bachelors Divorced Sales Unmarried Black Female United-States 1 -28 0.311111122 0.0738335252 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.07062548 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -39 0.433333337 0.06686177 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -44 0.4888889 0.130345091 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -70 0.7777778 0.10038358 0.5625 0.0296402965 0 0.121212125 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -60 0.6666667 0.211453453 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -35 0.3888889 0.109353714 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 -59 0.655555546 0.135178372 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Craft-repair Husband Black Male United-States 1 -21 0.233333334 0.07845936 0.625 0 0 0.6060606 Private Some-college Never-married Sales Own-child White Female United-States 0 -22 0.244444445 0.07968587 0.75 0 0 0.161616161 Private Assoc-acdm Never-married Prof-specialty Own-child White Female United-States 0 -31 0.344444454 0.237397328 0.625 0.1502415 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.07235983 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.199728563 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.13194339 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -31 0.344444454 0.145674065 0.75 0 0 0.353535354 Self-emp-not-inc Assoc-acdm Married-civ-spouse Other-service Wife White Female United-States 1 -62 0.6888889 0.232894748 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Not-in-family White Male United-States 0 -43 0.477777779 0.145944819 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 -28 0.311111122 0.142078727 0.8125 0 0 0.6060606 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 -43 0.477777779 0.124146551 0.375 0 0.4331956 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -55 0.6111111 0.217343524 0.875 0.03103031 0 0.5555556 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.129798174 0.5625 0 0 0.25252524 Private HS-grad Separated Other-service Unmarried White Female United-States 0 -23 0.25555557 0.120072342 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -55 0.6111111 0.216428861 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -44 0.4888889 0.08101071 0.8125 1 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.198038667 0.4375 0 0 0.323232323 Private 11th Never-married Sales Own-child Other Female Nicaragua 0 -23 0.25555557 0.07598749 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -41 0.455555558 0.102805607 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -63 0.7 0.203145415 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -51 0.566666663 0.0907978341 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Unmarried White Female United-States 0 -49 0.544444442 0.04325169 0.5625 0 0 0.909090936 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -29 0.322222233 0.14432767 0.875 0 0 0.2020202 State-gov Masters Never-married Prof-specialty Unmarried Asian-Pac-Islander Female Taiwan 0 -25 0.2777778 0.316272944 0.625 0.0861408561 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 1 -44 0.4888889 0.190423012 0.9375 1 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.15588215 0.4375 0 0 0.3030303 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -42 0.466666669 0.08101071 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.245627925 0.4375 0 0 0.353535354 Private 11th Never-married Tech-support Own-child White Female United-States 0 -26 0.2888889 0.0126806339 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -24 0.266666681 0.113914214 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -30 0.333333343 0.136088312 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.237922013 0.8125 0.2782828 0 0.5050505 ? Bachelors Widowed ? Unmarried White Female United-States 1 -19 0.211111113 0.386791319 0.5625 0 0 0.282828271 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -65 0.722222269 0.0197183955 0.25 0 0 0.24242425 State-gov 7th-8th Widowed Other-service Other-relative White Female United-States 0 -52 0.5777778 0.070385024 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -17 0.188888893 0.265491128 0.375 0 0 0.2020202 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 -27 0.3 0.05767139 0.5625 0 0 0.222222224 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -53 0.5888889 0.229488686 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.100586988 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -37 0.411111116 0.0496495962 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.09637134 0.6875 0 0 0.181818187 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 -40 0.444444448 0.195769534 0.75 0.0861408561 0 0.5050505 Local-gov Assoc-acdm Divorced Exec-managerial Not-in-family White Male United-States 1 -49 0.544444442 0.06650345 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -86 0.955555558 0.1009709 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family White Female United-States 0 -49 0.544444442 0.208144382 0.6875 0.1502415 0 0.6060606 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -43 0.477777779 0.06474619 0.4375 0 0 0.6060606 Self-emp-not-inc 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -47 0.5222222 0.1455481 0.625 0 0 0.353535354 Private Some-college Married-spouse-absent Exec-managerial Unmarried White Female Puerto-Rico 0 -32 0.355555564 0.115235686 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -30 0.333333343 0.0534133054 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -25 0.2777778 0.12283922 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Own-child White Male United-States 0 -42 0.466666669 0.02442977 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -60 0.6666667 0.07960976 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.181619927 0.625 0.04386044 0 0.3838384 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.130541086 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -28 0.311111122 0.0956129357 0.75 0 0.4331956 0.7070707 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -26 0.2888889 0.1499537 0.375 0 0 0.5555556 Private 10th Never-married Craft-repair Not-in-family White Male Puerto-Rico 0 -27 0.3 0.0796319842 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -59 0.655555546 0.117221944 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Unmarried White Male United-States 0 -64 0.7111111 0.07122493 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -90 1 0.05565281 0.5625 0.0296402965 0 0.121212125 Self-emp-not-inc HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -51 0.566666663 0.13814193 0.625 0 0 0.454545468 Private Some-college Divorced Sales Not-in-family White Female United-States 1 -36 0.4 0.0726851448 0.5625 0 0.459595948 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -39 0.433333337 0.0879770741 0.25 0 0 0.4040404 Private 7th-8th Married-spouse-absent Machine-op-inspct Unmarried Other Female Dominican-Republic 0 -30 0.333333343 0.243696228 0.5625 0 0 0.25252524 ? HS-grad Never-married ? Own-child White Male United-States 0 -47 0.5222222 0.15871571 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.0358838961 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.307441562 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 -23 0.25555557 0.1974069 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Male United-States 0 -62 0.6888889 0.142071992 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -48 0.533333361 0.134547263 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -62 0.6888889 0.150499254 0.5 0 0 0.4040404 ? 12th Divorced ? Not-in-family White Male Canada 0 -35 0.3888889 0.15729253 0.8125 0 0 0.656565666 Self-emp-not-inc Bachelors Separated Craft-repair Not-in-family White Male United-States 0 -27 0.3 0.06442155 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Male United-States 0 -49 0.544444442 0.134547263 0.625 0 0 0.353535354 Private Some-college Divorced Machine-op-inspct Not-in-family White Female United-States 0 -18 0.2 0.0502045862 0.375 0 0 0.2020202 Private 10th Never-married Sales Not-in-family White Male United-States 0 -19 0.211111113 0.05698775 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 -63 0.7 0.0652857 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.0778619349 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 -24 0.266666681 0.159857348 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -61 0.677777767 0.09685426 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 -50 0.5555556 0.110406443 0.5625 0 0 0.4848485 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.04598422 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -21 0.233333334 0.0762191862 0.625 0 0 0.5050505 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -38 0.422222227 0.322507858 0.9375 1 0 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.232844234 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Other-relative White Male United-States 0 -22 0.244444445 0.259362638 0.5625 0.02907029 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -33 0.366666675 0.129511252 0.625 0 0 0.5252525 Private Some-college Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 -39 0.433333337 0.159217492 0.5625 0 0 0.3838384 Local-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -42 0.466666669 0.07185198 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.20761162 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -42 0.466666669 0.0310458988 0.8125 0 0 0.333333343 Local-gov Bachelors Divorced Transport-moving Not-in-family White Male United-States 0 -29 0.322222233 0.13129881 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.230108336 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -23 0.25555557 0.1417615 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.0513994358 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 -34 0.377777785 0.0780343562 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.03717304 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 -67 0.7444445 0.245747134 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Widowed Other-service Not-in-family White Female United-States 0 -49 0.544444442 0.225490585 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -34 0.377777785 0.138568267 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -60 0.6666667 0.08093392 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -26 0.2888889 0.224742964 0.8125 0.0246302467 0 0.353535354 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -25 0.2777778 0.140493229 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -40 0.444444448 0.229812667 0.625 0.0183101818 0 0.3030303 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -56 0.622222245 0.0777407 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -35 0.3888889 0.07497718 0.75 0 0.4331956 0.454545468 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.550109267 0.5625 0 0.4708448 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.11304266 0.8125 0.0332503319 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -28 0.311111122 0.06214164 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -31 0.344444454 0.0619409271 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -45 0.5 0.07252754 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -52 0.5777778 0.09118849 0.5625 0.0501305 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.40266788 0.875 0 0 0.5050505 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Female Columbia 0 -19 0.211111113 0.262639374 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -23 0.25555557 0.2978868 0.5 0 0 0.4040404 Private 12th Never-married Adm-clerical Unmarried White Male United-States 0 -23 0.25555557 0.401063532 0.25 0 0 0.4040404 Private 7th-8th Never-married Craft-repair Not-in-family White Male Mexico 0 -52 0.5777778 0.191505387 0.6875 0.1502415 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.08614102 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.132618263 0.8125 0 0 0.5050505 Private Bachelors Never-married Handlers-cleaners Not-in-family Asian-Pac-Islander Female Haiti 0 -58 0.644444466 0.143148974 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -61 0.677777767 0.0479617156 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.160262823 0.8125 1 0 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.128482759 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.0675642639 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.232116148 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -27 0.3 0.130681857 0.3125 0 0 0.5050505 ? 9th Separated ? Unmarried White Female United-States 0 -19 0.211111113 0.05893225 0.4375 0 0 0.1010101 Private 11th Never-married Transport-moving Other-relative White Male United-States 0 -22 0.244444445 0.159565032 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -59 0.655555546 0.114257716 0.75 0 0 0.4040404 Private Assoc-acdm Widowed Exec-managerial Unmarried White Female United-States 0 -37 0.411111116 0.07126197 0.5625 0.03103031 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.100698121 0.5 0 0 0.434343427 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.1982798 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -20 0.222222224 0.108915918 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 -28 0.311111122 0.190198734 0.5625 0 0 0.6060606 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -28 0.311111122 0.04373933 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 -49 0.544444442 0.131828889 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.025547836 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -19 0.211111113 0.114985809 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Male United-States 0 -43 0.477777779 0.103022486 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.21039331 0.5625 0.1502415 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -41 0.455555558 0.0266591683 0.625 0 0 0.24242425 Private Some-college Divorced Adm-clerical Not-in-family Black Female El-Salvador 0 -50 0.5555556 0.139328688 0.875 0 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.146112531 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Male Portugal 0 -20 0.222222224 0.09635719 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -45 0.5 0.1632587 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.111153394 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -37 0.411111116 0.134202421 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -46 0.51111114 0.237765759 1 0 0.43663913 0.5050505 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -66 0.733333349 0.117525704 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -35 0.3888889 0.224492416 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Own-child White Female United-States 0 -38 0.422222227 0.13682045 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -25 0.2777778 0.148325771 0.4375 0 0 0.454545468 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -55 0.6111111 0.206000522 0.9375 0.1502415 0 0.4040404 Federal-gov Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.184145674 0.25 0 0.43663913 0.4040404 Local-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -56 0.622222245 0.13561213 0.625 0 0 0.3838384 Private Some-college Widowed Craft-repair Unmarried White Female United-States 0 -47 0.5222222 0.147285834 0.875 0 0 0.454545468 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -55 0.6111111 0.0955119058 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.149816975 0.75 0 0 0.4040404 State-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 -47 0.5222222 0.179739416 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.0229762811 0.5625 0.068490684 0 0.434343427 Private HS-grad Never-married Exec-managerial Not-in-family Amer-Indian-Eskimo Male United-States 0 -41 0.455555558 0.107461751 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.131506264 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Other Female United-States 0 -52 0.5777778 0.07369343 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -62 0.6888889 0.13157025 1 0.1502015 0 0.5050505 Private Doctorate Divorced Prof-specialty Unmarried White Male United-States 1 -46 0.51111114 0.124799877 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -21 0.233333334 0.09430291 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 -35 0.3888889 0.0770294443 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -29 0.322222233 0.114252329 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Own-child White Female United-States 0 -21 0.233333334 0.1103721 0.375 0.03908039 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband White Male United-States 0 -35 0.3888889 0.210299015 0.5625 0 0 0.5050505 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 -46 0.51111114 0.154735789 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male India 1 -70 0.7777778 0.206480756 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -35 0.3888889 0.108868092 1 0 0.43663913 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 -34 0.377777785 0.0714040846 0.625 0 0 0.6060606 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.0170168485 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Machine-op-inspct Not-in-family White Male United-States 0 -29 0.322222233 0.04840019 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -41 0.455555558 0.06338835 0.875 0 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.1400972 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.07647984 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -47 0.5222222 0.0559343435 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -42 0.466666669 0.18689774 0.9375 0.1502415 0 0.656565666 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.138633609 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female El-Salvador 0 -46 0.51111114 0.1842622 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 -23 0.25555557 0.165114954 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Black Male United-States 0 -49 0.544444442 0.1850334 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -58 0.644444466 0.109817781 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -41 0.455555558 0.0322636478 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -50 0.5555556 0.0867499 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -77 0.8555556 0.103862382 0.5625 0 0 0.1010101 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.1190021 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -29 0.322222233 0.07054398 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.235292539 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male India 0 -39 0.433333337 0.146998227 0.625 0 0 0.373737365 State-gov Some-college Separated Prof-specialty Unmarried Black Female United-States 0 -32 0.355555564 0.1896269 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -36 0.4 0.0760063455 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 0 -24 0.266666681 0.08527822 0.8125 0 0 0.2020202 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -50 0.5555556 0.0979447141 0.875 0.07688077 0 0.454545468 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.0232854337 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -26 0.2888889 0.0700778961 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -49 0.544444442 0.0388393663 0.8125 0 0 0.4040404 ? Bachelors Divorced ? Own-child White Female United-States 0 -38 0.422222227 0.241799548 0.6875 0 0 0.424242437 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -47 0.5222222 0.07090499 0.8125 0.06497065 0 0.4040404 Private Bachelors Widowed Craft-repair Unmarried Black Female United-States 0 -31 0.344444454 0.1354626 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.107789092 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.113077007 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.0215928424 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -59 0.655555546 0.135012016 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 -56 0.622222245 0.271482885 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.0250622183 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -32 0.355555564 0.134313554 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -29 0.322222233 0.278322637 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -29 0.322222233 0.127079114 0.625 0 0 0.4040404 ? Some-college Divorced ? Own-child Black Male United-States 0 -42 0.466666669 0.152826324 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -37 0.411111116 0.131466523 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 -36 0.4 0.07853951 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -59 0.655555546 0.06676815 0.875 0 0 0.4040404 Private Masters Widowed Exec-managerial Not-in-family White Female United-States 1 -32 0.355555564 0.372737348 0.8125 1 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -52 0.5777778 0.125356212 0.5625 0 0 0.565656543 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -29 0.322222233 0.0451625064 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Not-in-family Asian-Pac-Islander Male Thailand 0 -39 0.433333337 0.234363064 0.9375 0.14084141 0 0.353535354 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 -39 0.433333337 0.2191506 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -69 0.7666667 0.08783765 0.8125 0.0234602336 0 0.151515156 Private Bachelors Widowed Exec-managerial Not-in-family White Female United-States 0 -43 0.477777779 0.0754015148 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -39 0.433333337 0.187617749 0.6875 0 0.373737365 0.4848485 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.131275237 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 -60 0.6666667 0.131644338 0.6875 0 0 0.6060606 Local-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.1903065 0.5625 0.031370312 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -75 0.8333334 0.212917045 0.625 0 0 0.08080808 Private Some-college Widowed Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.170363143 0.6875 0.0545505434 0 0.4040404 State-gov Assoc-voc Never-married Prof-specialty Unmarried Black Female United-States 0 -24 0.266666681 0.341030031 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Male ? 0 -20 0.222222224 0.212865859 0.4375 0.005940059 0 0.2020202 Private 11th Never-married Other-service Own-child Black Male United-States 0 -58 0.644444466 0.215351209 0.5625 0 0 0.7070707 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -21 0.233333334 0.0668139458 0.875 0 0 0.151515156 State-gov Masters Never-married Transport-moving Own-child White Male United-States 0 -28 0.311111122 0.137805149 0.5625 0 0 0.4040404 Private HS-grad Separated Protective-serv Other-relative White Male United-States 0 -40 0.444444448 0.116728239 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -45 0.5 0.02320057 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -40 0.444444448 0.159825012 0.9375 0.1502415 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 -41 0.455555558 0.118300945 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Female United-States 0 -58 0.644444466 0.137222543 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -44 0.4888889 0.115571111 0.6875 0.07688077 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.1333376 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.278369784 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Sales Not-in-family White Male Mexico 0 -45 0.5 0.162214726 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.102504537 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Not-in-family White Male United-States 0 -39 0.433333337 0.0578391 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -45 0.5 0.119090326 1 0.1502415 0 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.08980639 0.875 0.1502415 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.244239092 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -67 0.7444445 0.025035277 0.25 0 0 0.0303030312 ? 7th-8th Divorced ? Not-in-family White Male United-States 0 -28 0.311111122 0.0208202973 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -23 0.25555557 0.02387545 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Unmarried White Female United-States 0 -33 0.366666675 0.116688505 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -37 0.411111116 0.03342482 0.6875 0 0 0.434343427 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -19 0.211111113 0.0691874847 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -90 1 0.112037748 0.125 0 0 0.4040404 ? 1st-4th Widowed ? Not-in-family Black Female United-States 0 -35 0.3888889 0.113370672 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -62 0.6888889 0.08831182 0.25 0 0 0.3838384 Private 7th-8th Divorced Tech-support Unmarried White Female Columbia 0 -20 0.222222224 0.1417615 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child White Female United-States 0 -25 0.2777778 0.07418174 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -21 0.233333334 0.07237263 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -32 0.355555564 0.1081656 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 -32 0.355555564 0.125805467 0.8125 0.0501305 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -70 0.7777778 0.225409091 0.5625 0 0 0.121212125 Local-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -65 0.722222269 0.128901035 0.375 0.09386094 0 0.5050505 ? 10th Married-civ-spouse ? Husband White Male United-States 1 -57 0.6333333 0.07023079 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.0131278606 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -37 0.411111116 0.0866939947 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.08625485 0.5625 0 0 0.363636374 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -26 0.2888889 0.0249362681 0.625 0 0 0.7878788 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -44 0.4888889 0.0463041477 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -66 0.733333349 0.09468278 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.220538765 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -31 0.344444454 0.136544973 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -53 0.5888889 0.186886281 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -36 0.4 0.127749279 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -61 0.677777767 0.1380126 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.115740843 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.0527020544 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.04640316 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Male Mexico 0 -27 0.3 0.0381611176 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Amer-Indian-Eskimo Male United-States 0 -58 0.644444466 0.174590915 0.3125 0 0 0.4040404 Local-gov 9th Divorced Other-service Not-in-family White Female United-States 0 -37 0.411111116 0.182041556 0.5625 0 0 0.121212125 State-gov HS-grad Divorced Adm-clerical Unmarried White Female Puerto-Rico 0 -56 0.622222245 0.160844073 0.25 0 0 0.262626261 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.07484854 0.625 0 0 0.6060606 Private Some-college Separated Exec-managerial Not-in-family White Male United-States 1 -29 0.322222233 0.08043955 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 -28 0.311111122 0.04919294 0.375 0 0 0.3030303 Private 10th Never-married Transport-moving Unmarried White Male United-States 0 -61 0.677777767 0.0568523742 1 0 0 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -66 0.733333349 0.184852213 0.3125 0 0 0.25252524 Self-emp-not-inc 9th Married-civ-spouse Farming-fishing Husband White Male United-States 1 -31 0.344444454 0.165985167 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -21 0.233333334 0.08368127 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 -67 0.7444445 0.08310944 0.5625 0.06418064 0 0.5858586 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -26 0.2888889 0.107585013 0.5625 0 0 0.4040404 Private HS-grad Widowed Transport-moving Not-in-family White Male United-States 0 -21 0.233333334 0.108718567 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.106127486 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.113174 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -59 0.655555546 0.235676453 0.8125 0.106051058 0 0.5050505 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -82 0.9111111 0.08778108 0.25 0 0 0.5050505 Self-emp-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -34 0.377777785 0.03836722 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 -29 0.322222233 0.2495506 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male France 1 -19 0.211111113 0.07160076 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Own-child White Female United-States 0 -57 0.6333333 0.0380412266 0.5625 0 0 0.01010101 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.0780842 0.625 1 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.104114965 0.375 0.0258002579 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband Black Male United-States 0 -27 0.3 0.2723915 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -33 0.366666675 0.131272539 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -43 0.477777779 0.110991746 0.625 0 0 0.5050505 State-gov Some-college Divorced Adm-clerical Not-in-family Black Male United-States 1 -72 0.8 0.06347524 0.625 0 0 0.161616161 Federal-gov Some-college Widowed Tech-support Not-in-family White Female United-States 0 -68 0.75555557 0.245853558 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.108110368 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Own-child White Female United-States 0 -41 0.455555558 0.1147238 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -30 0.333333343 0.06820615 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -31 0.344444454 0.06752318 0.8125 1 0 0.7070707 Private Bachelors Divorced Other-service Not-in-family Asian-Pac-Islander Male United-States 1 -54 0.6 0.146640584 0.1875 0 0 0.3030303 Private 5th-6th Married-spouse-absent Other-service Unmarried Black Female Haiti 0 -32 0.355555564 0.114604585 0.75 0.25236252 0 0.5050505 Private Assoc-acdm Separated Exec-managerial Unmarried White Female United-States 1 -56 0.622222245 0.07091039 0.5625 0 0.453168035 0.4040404 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -39 0.433333337 0.243710369 0.8125 0 0 0.0606060624 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 -41 0.455555558 0.1912279 0.6875 0 0 0.353535354 State-gov Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.0266248174 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -66 0.733333349 0.142913908 0.25 0 0 0.4848485 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -25 0.2777778 0.0611246 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Never-married Sales Not-in-family White Female United-States 0 -31 0.344444454 0.136357054 0.5625 0 0.3611111 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -32 0.355555564 0.113246739 0.75 0.02597026 0 0.4848485 Private Assoc-acdm Divorced Sales Not-in-family White Male United-States 0 -51 0.566666663 0.1076005 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.129160345 0.5625 0 0.5369605 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative Black Female Trinadad&Tobago 0 -22 0.244444445 0.141982421 0.625 0 0 0.353535354 ? Some-college Never-married ? Not-in-family Black Female United-States 0 -31 0.344444454 0.229594439 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.0762515143 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -42 0.466666669 0.09059645 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Unmarried Black Female United-States 0 -20 0.222222224 0.09919816 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Other-relative Other Male United-States 0 -40 0.444444448 0.0979595259 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -65 0.722222269 0.2680674 0.5625 0 0 0.2020202 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -53 0.5888889 0.0212756079 0.8125 0 0 0.5252525 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -56 0.622222245 0.127954721 0.625 0 0.43663913 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.155919865 1 0.07688077 0 0.5555556 State-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.0815886 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -44 0.4888889 0.125894368 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.143557146 0.5625 0 0.43663913 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.119143538 0.5625 0.0861408561 0 0.444444448 Private HS-grad Divorced Craft-repair Not-in-family Black Male United-States 1 -22 0.244444445 0.07762081 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Wife White Female United-States 0 -53 0.5888889 0.210979968 0.625 0 0.5610652 0.454545468 Private Some-college Separated Craft-repair Not-in-family White Male United-States 1 -41 0.455555558 0.1144975 0.625 0 0 0.2020202 Local-gov Some-college Divorced Protective-serv Not-in-family White Male United-States 0 -19 0.211111113 0.133668974 0.5625 0 0.459366381 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -27 0.3 0.04500827 0.8125 0.0332503319 0 0.434343427 Local-gov Bachelors Never-married Prof-specialty Not-in-family Amer-Indian-Eskimo Female United-States 0 -48 0.533333361 0.03518544 0.6875 0 0 0.25252524 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 -52 0.5777778 0.0237791352 0.25 0 0 0.07070707 Private 7th-8th Never-married Other-service Own-child White Female United-States 0 -61 0.677777767 0.125581175 0.9375 0 0.43663913 0.4040404 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.108253159 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male China 1 -29 0.322222233 0.141754761 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -41 0.455555558 0.139883012 0.625 0 0 0.212121218 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -38 0.422222227 0.157416463 0.625 0 0 0.6060606 Private Some-college Divorced Exec-managerial Unmarried Black Male United-States 0 -32 0.355555564 0.149662733 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -37 0.411111116 0.112893134 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -55 0.6111111 0.100203745 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -62 0.6888889 0.0459808521 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -48 0.533333361 0.117553994 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -43 0.477777779 0.184029832 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.12628907 0.5625 0 0 0.24242425 Private HS-grad Never-married Sales Own-child Black Male United-States 0 -47 0.5222222 0.140984237 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -49 0.544444442 0.0382843725 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -55 0.6111111 0.171500072 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -42 0.466666669 0.0287619438 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -40 0.444444448 0.251994163 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Male United-States 0 -34 0.377777785 0.132272065 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.12994501 0.5625 0 0 0.1010101 Private HS-grad Separated Sales Unmarried White Female United-States 0 -39 0.433333337 0.06703487 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.124898218 0.75 0 0 0.5555556 Private Assoc-acdm Divorced Craft-repair Not-in-family White Female United-States 0 -43 0.477777779 0.166472137 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Own-child White Male United-States 0 -32 0.355555564 0.0885926858 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Exec-managerial Not-in-family Black Female United-States 0 -18 0.2 0.124397106 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female Mexico 0 -27 0.3 0.474241018 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -57 0.6333333 0.148354053 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Tech-support Not-in-family White Female United-States 0 -38 0.422222227 0.0644262657 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -67 0.7444445 0.060177613 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.0635762662 0.4375 0 0 0.2020202 Private 11th Separated Other-service Unmarried White Female United-States 0 -21 0.233333334 0.225036621 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -17 0.188888893 0.02206701 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Male United-States 0 -31 0.344444454 0.09203916 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 -51 0.566666663 0.161807224 0.75 0 0 0.3030303 Self-emp-not-inc Assoc-acdm Separated Sales Not-in-family Black Male United-States 0 -29 0.322222233 0.0358798541 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.0212116223 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Own-child White Male United-States 1 -32 0.355555564 0.131939352 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.140838087 0.625 0.0346403457 0 0.454545468 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -26 0.2888889 0.142401353 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -28 0.311111122 0.05701941 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -40 0.444444448 0.101978511 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -51 0.566666663 0.07194628 0.25 0 0 0.1919192 Private 7th-8th Never-married Handlers-cleaners Own-child White Male United-States 0 -62 0.6888889 0.08952418 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 -54 0.6 0.09889776 0.375 0 0 0.6060606 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -55 0.6111111 0.11068327 0.5625 0 0 0.161616161 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -24 0.266666681 0.0206478741 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -27 0.3 0.07644684 0.875 0 0 0.454545468 Private Masters Never-married Adm-clerical Own-child White Male United-States 0 -18 0.2 0.111346029 0.5625 0 0 0.3030303 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -22 0.244444445 0.157576755 0.8125 0.143441439 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Amer-Indian-Eskimo Female United-States 1 -21 0.233333334 0.08527822 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -44 0.4888889 0.243334547 0.625 0 0 0.8080808 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband Asian-Pac-Islander Male Philippines 1 -50 0.5555556 0.08287438 0.875 0 0 0.6060606 ? Masters Married-civ-spouse ? Husband White Male United-States 1 -38 0.422222227 0.1114511 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.0669843554 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.05723494 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.161956757 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Not-in-family Black Male United-States 0 -51 0.566666663 0.155490831 0.625 0 0.453856736 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -60 0.6666667 0.08299157 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -62 0.6888889 0.12872456 0.625 0.07298073 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -38 0.422222227 0.07765112 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.251831174 0.625 0 0 0.353535354 Private Some-college Separated Handlers-cleaners Not-in-family Black Male United-States 0 -43 0.477777779 0.102792814 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Own-child White Female United-States 0 -49 0.544444442 0.0489114 0.625 0 0 0.5050505 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -17 0.188888893 0.0281975213 0.375 0 0 0.25252524 Private 10th Never-married Other-service Own-child White Female United-States 0 -32 0.355555564 0.128125116 0.5625 0 0 0.6060606 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -23 0.25555557 0.130052775 0.8125 0 0 0.3838384 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.0934138447 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -83 0.922222257 0.103174031 0.8125 0 0.549127638 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.122513227 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.1806305 0.8125 0 0.3409091 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -46 0.51111114 0.143912762 0.4375 0 0 0.4040404 Local-gov 11th Never-married Other-service Not-in-family White Male United-States 0 -29 0.322222233 0.06692845 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family Other Female United-States 0 -44 0.4888889 0.0701796 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -60 0.6666667 0.119107164 0.9375 0 0 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.06701803 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Protective-serv Unmarried Amer-Indian-Eskimo Female United-States 0 -24 0.266666681 0.123532958 0.625 0 0 0.171717167 Private Some-college Never-married Sales Own-child White Female United-States 0 -17 0.188888893 0.0173031017 0.375 0 0 0.1010101 Private 10th Never-married Other-service Own-child White Female United-States 0 -76 0.844444454 0.136044532 0.4375 0 0 0.161616161 ? 11th Widowed ? Other-relative White Female United-States 0 -31 0.344444454 0.127271757 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Own-child White Female United-States 0 -52 0.5777778 0.07743693 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.08181289 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Own-child Asian-Pac-Islander Female United-States 0 -73 0.811111152 0.1290088 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.0986041054 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -48 0.533333361 0.130364627 0.5625 0 0 0.2020202 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 -60 0.6666667 0.08158321 0.375 0 0 0.4040404 Private 10th Widowed Sales Not-in-family White Female United-States 0 -26 0.2888889 0.262581468 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -20 0.222222224 0.195664465 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 -54 0.6 0.0923180059 1 0 0 0.4040404 State-gov Doctorate Never-married Exec-managerial Not-in-family White Female United-States 1 -50 0.5555556 0.143250689 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -20 0.222222224 0.048140876 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.07506542 0.625 0 0 0.222222224 Private Some-college Never-married Adm-clerical Other-relative Black Male United-States 0 -35 0.3888889 0.1521245 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.08746047 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -50 0.5555556 0.0673029348 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -58 0.644444466 0.153431162 0.125 0 0 0.5050505 Private 1st-4th Separated Farming-fishing Not-in-family Black Male United-States 0 -55 0.6111111 0.07484989 0.75 0 0 0.4040404 State-gov Assoc-acdm Divorced Adm-clerical Own-child Asian-Pac-Islander Male United-States 0 -29 0.322222233 0.06786803 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.185285971 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Female United-States 0 -39 0.433333337 0.09934634 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Wife Black Female United-States 0 -63 0.7 0.101083383 0.5625 0 0 0.353535354 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -27 0.3 0.09487609 0.5625 0 0 0.6060606 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -62 0.6888889 0.134166718 0.4375 0 0 0.4040404 ? 11th Divorced ? Not-in-family Black Female United-States 0 -38 0.422222227 0.1302427 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -25 0.2777778 0.13253206 0.5625 0 0 0.656565666 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -31 0.344444454 0.1561428 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 -40 0.444444448 0.1323199 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.0229250938 1 0 0 0.5050505 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 -52 0.5777778 0.117844291 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -46 0.51111114 0.06170115 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -31 0.344444454 0.271749616 0.625 0 0 0.5050505 Private Some-college Separated Other-service Unmarried White Female Mexico 0 -33 0.366666675 0.07604204 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -58 0.644444466 0.16344662 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -52 0.5777778 0.126509979 0.5625 0.049340494 0 0.363636374 Local-gov HS-grad Divorced Tech-support Unmarried White Male United-States 1 -25 0.2777778 0.247938141 0.8125 0.135501355 0 0.353535354 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -54 0.6 0.231185317 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -46 0.51111114 0.07637207 0.875 0 0.399449021 0.6060606 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 -28 0.311111122 0.1352006 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.1594721 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.0151504846 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -60 0.6666667 0.0871412158 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -22 0.244444445 0.161040753 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -27 0.3 0.1128177 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -35 0.3888889 0.05196049 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.0557666346 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.0908503756 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -40 0.444444448 0.147206351 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.1398042 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.132618263 0.75 0 0 0.4040404 Private Assoc-acdm Separated Craft-repair Not-in-family Other Female United-States 0 -54 0.6 0.135353491 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.126670957 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male ? 0 -60 0.6666667 0.156486988 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Male United-States 0 -32 0.355555564 0.06644822 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -19 0.211111113 0.130840808 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -49 0.544444442 0.32463488 0.5625 0 0 0.6060606 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -31 0.344444454 0.158264443 0.4375 0 0 0.4848485 Private 11th Never-married Adm-clerical Unmarried White Female United-States 0 -29 0.322222233 0.235141665 0.5625 0 0 0.25252524 Private HS-grad Separated Sales Unmarried White Female United-States 0 -39 0.433333337 0.118131213 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried Black Female United-States 0 -42 0.466666669 0.126435891 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male ? 1 -26 0.2888889 0.144565418 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -27 0.3 0.124689423 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Own-child White Male United-States 0 -52 0.5777778 0.0665128753 0.3125 0 0 0.4040404 Private 9th Widowed Adm-clerical Unmarried White Female United-States 0 -50 0.5555556 0.147087812 0.625 0 0 0.4040404 Local-gov Some-college Divorced Other-service Unmarried Black Female United-States 0 -51 0.566666663 0.103378117 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -51 0.566666663 0.117263705 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -40 0.444444448 0.09236987 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -61 0.677777767 0.162330568 0.25 0 0 0.4040404 Private 7th-8th Widowed Farming-fishing Not-in-family Black Male United-States 0 -35 0.3888889 0.1803712 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -41 0.455555558 0.102969952 0.5625 0 0 0.282828271 ? HS-grad Divorced ? Not-in-family Black Female United-States 0 -31 0.344444454 0.177517429 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.07632762 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.0267824251 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -35 0.3888889 0.115973212 0.625 0 0 0.4040404 Private Some-college Separated Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.310100675 0.625 0 0.3838384 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.124690764 0.9375 0 0.4331956 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.04126746 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -39 0.433333337 0.0839796439 0.875 0 0 1 Self-emp-inc Masters Divorced Exec-managerial Not-in-family Asian-Pac-Islander Male Japan 1 -69 0.7666667 0.0518406034 0.3125 0 0 0.25252524 Self-emp-not-inc 9th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -63 0.7 0.209062412 0.3125 0.05178052 0 0.4040404 ? 9th Married-civ-spouse ? Husband White Male United-States 1 -29 0.322222233 0.0255491845 0.625 0.0217402168 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -21 0.233333334 0.02611428 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 -24 0.266666681 0.116182007 0.8125 0 0 0.5555556 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -55 0.6111111 0.206212014 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -42 0.466666669 0.0227620974 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.032118164 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 -31 0.344444454 0.130081058 0.8125 0 0 0.424242437 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -52 0.5777778 0.269416481 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.06821759 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -29 0.322222233 0.129577264 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.07667382 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -47 0.5222222 0.187459469 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -56 0.622222245 0.134513587 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.158968285 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.09357954 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -36 0.4 0.0855025053 0.625 0 0 0.4040404 Private Some-college Separated Craft-repair Not-in-family White Male United-States 0 -45 0.5 0.0301682837 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -38 0.422222227 0.0215288568 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -60 0.6666667 0.2371892 0.9375 0 0 0.4040404 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -70 0.7777778 0.138653815 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -21 0.233333334 0.07618079 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 -57 0.6333333 0.0600671545 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -33 0.366666675 0.168910325 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.130568027 0.5625 0 0.43663913 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.0893888 0.9375 1 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -68 0.75555557 0.147259563 0.625 0 0.5456841 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.119858831 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Adm-clerical Wife White Female Mexico 0 -32 0.355555564 0.133804366 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.140052736 0.9375 0.105201051 0 0.5050505 Private Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 -18 0.2 0.113652207 0.4375 0 0 0.3030303 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -45 0.5 0.134454325 0.625 0 0 0.2020202 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -22 0.244444445 0.144070372 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female Mexico 0 -38 0.422222227 0.140350446 0.8125 0 0 0.08080808 Private Bachelors Never-married Machine-op-inspct Not-in-family White Female United-States 0 -37 0.411111116 0.07619022 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.03894848 0.8125 0 0 0.4040404 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 -59 0.655555546 0.347349823 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.0364988334 0.9375 0.1502415 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.09078773 0.625 0.1502415 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.266901523 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -30 0.333333343 0.156004056 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female Mexico 0 -50 0.5555556 0.117636167 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -63 0.7 0.06588716 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -38 0.422222227 0.232019156 0.5625 0.0406404063 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.119035095 0.3125 0 0 0.4040404 Private 9th Divorced Sales Not-in-family White Female United-States 0 -60 0.6666667 0.09694316 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.371765435 0.5625 0 0 0.5050505 Private HS-grad Separated Handlers-cleaners Unmarried White Female Peru 0 -30 0.333333343 0.2011019 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Own-child White Male United-States 0 -39 0.433333337 0.173732832 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -55 0.6111111 0.170445979 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.130495965 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Male United-States 0 -46 0.51111114 0.248238549 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.129967913 0.5625 0 0 0.656565666 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -32 0.355555564 0.146361738 0.8125 0 0 0.3030303 Private Bachelors Never-married Protective-serv Not-in-family Black Male United-States 0 -18 0.2 0.08084367 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -34 0.377777785 0.0418426581 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family Black Male United-States 0 -50 0.5555556 0.0639083162 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 -32 0.355555564 0.129699171 0.4375 0 0 0.5555556 Private 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.14879185 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 -26 0.2888889 0.124011166 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -46 0.51111114 0.0948215351 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 -43 0.477777779 0.115029588 0.625 0 0 0.5555556 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.0610929467 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -37 0.411111116 0.07293907 0.75 0 0 0.3838384 State-gov Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 -48 0.533333361 0.1133444 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -28 0.311111122 0.228578746 0.8125 0 0.323232323 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -43 0.477777779 0.130444765 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.09689804 0.375 0 0 0.24242425 Local-gov 10th Widowed Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.140982226 0.5625 0 0 0.5050505 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male Dominican-Republic 0 -34 0.377777785 0.13771154 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.0923334956 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Other-relative Amer-Indian-Eskimo Male United-States 0 -41 0.455555558 0.10042534 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -53 0.5888889 0.123159148 0.375 0 0 0.4848485 Private 10th Divorced Adm-clerical Unmarried White Female United-States 0 -42 0.466666669 0.385767549 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Craft-repair Husband White Male Nicaragua 0 -18 0.2 0.0562071279 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -81 0.900000036 0.06608451 0.8125 0 0 0.5050505 Private Bachelors Widowed Sales Not-in-family White Male United-States 1 -40 0.444444448 0.08030215 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -26 0.2888889 0.09085172 0.8125 0 0 0.353535354 Private Bachelors Never-married Tech-support Own-child White Female United-States 0 -20 0.222222224 0.502333462 0.625 0 0 0.151515156 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -41 0.455555558 0.059518896 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -49 0.544444442 0.08221566 0.875 0 0 0.454545468 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.244640529 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.056847658 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 -56 0.622222245 0.0233218055 0.625 0 0.454545438 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -35 0.3888889 0.101058461 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -34 0.377777785 0.0323390849 0.8125 0 0 0.353535354 Private Bachelors Separated Exec-managerial Not-in-family White Female United-States 0 -29 0.322222233 0.119483672 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -28 0.311111122 0.2516985 0.5 0 0 0.454545468 Private 12th Married-civ-spouse Prof-specialty Husband White Male ? 0 -35 0.3888889 0.284859955 0.8125 0 0 0.373737365 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -29 0.322222233 0.0882922858 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -21 0.233333334 0.120060891 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Female Columbia 0 -52 0.5777778 0.08709542 0.625 0 0 0.959596 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.318696976 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.159617573 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -35 0.3888889 0.152474061 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Other-relative White Female United-States 0 -21 0.233333334 0.187040523 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 -35 0.3888889 0.1398042 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Male United-States 0 -30 0.333333343 0.0577272922 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -45 0.5 0.06652164 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Female Canada 0 -29 0.322222233 0.129509225 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Other-relative White Female United-States 0 -29 0.322222233 0.182535931 0.375 0 0 0.4040404 State-gov 10th Never-married Other-service Own-child Black Female United-States 0 -33 0.366666675 0.1274765 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -17 0.188888893 0.216797277 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child Black Male United-States 0 -52 0.5777778 0.1195288 0.5625 0 0 0.25252524 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -24 0.266666681 0.085974656 0.625 0 0 0.353535354 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 -32 0.355555564 0.08017283 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -40 0.444444448 0.195155278 0.8125 0.046500463 0 0.4848485 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -32 0.355555564 0.140982226 0.5625 0 0 0.4040404 Private HS-grad Separated Exec-managerial Not-in-family White Male ? 0 -33 0.366666675 0.191641435 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -30 0.333333343 0.169137985 0.25 0 0 0.3838384 Private 7th-8th Never-married Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.0766953751 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -62 0.6888889 0.114577644 0.75 0 0 0.5050505 Without-pay Assoc-acdm Married-civ-spouse Farming-fishing Husband White Male United-States 0 -46 0.51111114 0.08158119 0.8125 0.1502415 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -32 0.355555564 0.221053347 0.6875 0 0 0.646464646 Private Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 -26 0.2888889 0.138954878 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -41 0.455555558 0.158968285 0.8125 0.1502415 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -57 0.6333333 0.114907004 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -52 0.5777778 0.0500267744 0.625 0.07298073 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.07561839 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.07968317 0.5625 0 0 0.161616161 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -49 0.544444442 0.08537319 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -47 0.5222222 0.179971784 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male ? 1 -38 0.422222227 0.138316363 0.4375 0 0 0.323232323 Private 11th Married-civ-spouse Adm-clerical Wife White Female United-States 0 -30 0.333333343 0.2685126 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -32 0.355555564 0.13638939 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male Columbia 0 -32 0.355555564 0.0711589158 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -46 0.51111114 0.128782481 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Own-child White Female United-States 0 -22 0.244444445 0.03810993 0.5625 0 0 0.5050505 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -47 0.5222222 0.0347402357 0.625 0 0 0.5050505 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -57 0.6333333 0.102397449 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Married-civ-spouse Sales Wife White Female United-States 1 -47 0.5222222 0.153101131 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -41 0.455555558 0.0376195945 0.8125 0 0 0.565656543 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.0195298065 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.108192541 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -37 0.411111116 0.149827749 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Other-service Other-relative White Male El-Salvador 0 -36 0.4 0.121518418 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -64 0.7111111 0.07818658 0.5625 0.0263502635 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.136404872 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Male United-States 0 -23 0.25555557 0.125286847 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.059518896 0.625 0.009140091 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -42 0.466666669 0.128001183 0.8125 0.1502415 0 0.5050505 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.0237959735 0.5625 0 0 0.424242437 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -35 0.3888889 0.0571480542 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Handlers-cleaners Unmarried White Female United-States 0 -56 0.622222245 0.118730657 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Other-service Not-in-family White Male United-States 0 -52 0.5777778 0.0978450254 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 0 -37 0.411111116 0.0729572549 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -48 0.533333361 0.0716485754 1 0 0 0.656565666 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.174263582 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Own-child White Female Japan 0 -33 0.366666675 0.0392704271 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.230127871 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male Philippines 0 -34 0.377777785 0.118978523 0.5625 0 0 0.424242437 Private HS-grad Divorced Adm-clerical Not-in-family Black Male United-States 0 -24 0.266666681 0.0219680015 0.8125 0 0 0.4040404 ? Bachelors Divorced ? Not-in-family White Female United-States 0 -23 0.25555557 0.324087948 0.625 0 0 0.24242425 Private Some-college Never-married Exec-managerial Own-child Other Male Peru 0 -49 0.544444442 0.126256734 0.5625 1 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.01740211 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -20 0.222222224 0.259362638 0.5 0 0 0.4040404 Private 12th Never-married Machine-op-inspct Own-child White Male United-States 0 -54 0.6 0.0464637764 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -19 0.211111113 0.122295007 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -53 0.5888889 0.01596142 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.180592775 0.5 0 0 0.4040404 ? 12th Separated ? Unmarried Black Female United-States 0 -28 0.311111122 0.1093133 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -35 0.3888889 0.0973984748 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -20 0.222222224 0.168807954 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -31 0.344444454 0.1013272 0.625 0 0 0.5050505 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.127467081 1 0 0 0.4040404 Private Doctorate Separated Prof-specialty Unmarried White Female United-States 0 -64 0.7111111 0.175174192 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male Columbia 0 -42 0.466666669 0.09370616 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -27 0.3 0.0337656327 0.625 0 0 0.5050505 Private Some-college Divorced Sales Not-in-family White Male United-States 0 -36 0.4 0.112945668 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Never-married Other-service Unmarried White Female United-States 0 -36 0.4 0.0524144545 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.1054169 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -46 0.51111114 0.16707629 0.5625 0.0346403457 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.190672219 0.4375 0 0 0.353535354 Private 11th Never-married Craft-repair Not-in-family Black Male Jamaica 0 -22 0.244444445 0.118463263 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -62 0.6888889 0.156467453 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.181848243 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male Puerto-Rico 0 -20 0.222222224 0.205728412 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -47 0.5222222 0.08135017 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 1 -57 0.6333333 0.05301188 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -19 0.211111113 0.236950785 0.5625 0 0 0.353535354 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -37 0.411111116 0.132369056 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -35 0.3888889 0.118386485 0.5625 0 0 0.656565666 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -17 0.188888893 0.103064917 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 -36 0.4 0.223547444 0.625 0 0 0.353535354 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -50 0.5555556 0.188226625 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -35 0.3888889 0.09813667 0.5625 0.0394203924 0 0.353535354 Private HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 -27 0.3 0.138410658 1 0 0 0.7777778 State-gov Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 -28 0.311111122 0.1979693 0.5625 0 0.399449021 0.3030303 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.0465627871 0.9375 1 0 0.6060606 Self-emp-not-inc Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 -25 0.2777778 0.07617608 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family Black Male United-States 0 -47 0.5222222 0.139385939 0.75 0 0 0.676767647 Self-emp-inc Assoc-acdm Widowed Exec-managerial Not-in-family White Female United-States 0 -29 0.322222233 0.10761869 0.875 0 0 0.454545468 State-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -19 0.211111113 0.276514858 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -49 0.544444442 0.02320057 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.140836731 0.9375 0 0 0.25252524 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.06459331 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Prof-specialty Wife Black Female United-States 0 -56 0.622222245 0.144353926 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.159171686 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -45 0.5 0.135465965 0.625 0 0 0.565656543 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.09623865 0.8125 0 0 0.4040404 Private Bachelors Widowed Exec-managerial Unmarried White Female United-States 0 -44 0.4888889 0.0520729721 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -17 0.188888893 0.1428735 0.375 0 0 0.2020202 ? 10th Never-married ? Own-child White Female United-States 0 -36 0.4 0.12601696 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.132589981 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -53 0.5888889 0.104609333 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -72 0.8 0.136922151 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.07884327 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -33 0.366666675 0.120284505 0.625 0 0 0.373737365 Private Some-college Separated Prof-specialty Unmarried White Female United-States 0 -22 0.244444445 0.05549453 0.3125 0 0 0.4040404 Private 9th Never-married Handlers-cleaners Own-child Asian-Pac-Islander Male Philippines 0 -17 0.188888893 0.09783627 0.4375 0 0 0.25252524 ? 11th Never-married ? Other-relative White Female United-States 0 -41 0.455555558 0.124701545 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Tech-support Husband White Male ? 1 -46 0.51111114 0.04909797 0.3125 0 0 0.434343427 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.0908503756 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 -32 0.355555564 0.150340974 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -52 0.5777778 0.1177015 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -27 0.3 0.155292138 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -48 0.533333361 0.238312662 0.5625 0 0 0.727272749 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -22 0.244444445 0.07904803 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.19220452 0.5625 0 0 0.5050505 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -60 0.6666667 0.09388465 0.5625 0 0 0.424242437 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -38 0.422222227 0.133474335 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -37 0.411111116 0.0262328219 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -49 0.544444442 0.126971349 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -40 0.444444448 0.119761169 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.126915455 0.5625 0.03103031 0 0.464646459 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -31 0.344444454 0.120229945 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -40 0.444444448 0.08708666 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -25 0.2777778 0.111345351 0.5625 0 0 0.373737365 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -68 0.75555557 0.07896249 0.8125 0.200512 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.115992069 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Own-child Black Female United-States 0 -19 0.211111113 0.0427249856 0.5 0 0 0.3030303 Private 12th Never-married Farming-fishing Own-child White Female United-States 0 -35 0.3888889 0.09487002 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -28 0.311111122 0.08960905 0.5625 0 0 0.5050505 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -53 0.5888889 0.07622794 0.5625 0.02597026 0 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -33 0.366666675 0.174648166 0.625 0 0 0.414141417 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.132445842 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -45 0.5 0.2454124 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Female United-States 0 -36 0.4 0.181394964 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.07304751 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.11560344 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -19 0.211111113 0.123653524 0.625 0 0 0.25252524 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -24 0.266666681 0.07260769 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -34 0.377777785 0.121153362 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -32 0.355555564 0.113814533 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -37 0.411111116 0.08122152 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.209316328 0.625 0 0 0.4040404 Private Some-college Separated Sales Unmarried White Female Mexico 0 -21 0.233333334 0.132719964 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 -47 0.5222222 0.107580967 0.5625 0 0 0.858585835 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -23 0.25555557 0.141979054 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.0372403935 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -60 0.6666667 0.09511721 0.8125 0 0.496556461 0.25252524 ? Bachelors Married-civ-spouse ? Husband Asian-Pac-Islander Male South 0 -17 0.188888893 0.18637912 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -67 0.7444445 0.226417378 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -57 0.6333333 0.07600163 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.1117515 0.4375 0 0 0.2020202 Private 11th Never-married Handlers-cleaners Own-child White Male Peru 0 -53 0.5888889 0.111634977 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.174646825 0.625 0.03103031 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.133178651 0.5625 0 0 0.4949495 State-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -48 0.533333361 0.133159116 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -51 0.566666663 0.10927289 0.875 0 0.4331956 0.474747479 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.14363797 0.5625 0 0 0.4040404 Private HS-grad Separated Protective-serv Not-in-family Black Male United-States 0 -51 0.566666663 0.03625838 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.06022678 0.5625 0 0 0.1010101 Private HS-grad Never-married Tech-support Own-child White Female United-States 0 -23 0.25555557 0.0806247741 0.625 0 0 0.4040404 Private Some-college Separated Sales Unmarried White Female United-States 0 -42 0.466666669 0.291754931 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.123064183 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Not-in-family White Female ? 0 -39 0.433333337 0.1162103 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 -20 0.222222224 0.14825505 0.5625 0 0 0.121212125 ? HS-grad Never-married ? Own-child White Male United-States 0 -39 0.433333337 0.107062347 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 -21 0.233333334 0.0172633622 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Farming-fishing Own-child White Male United-States 0 -26 0.2888889 0.320978254 0.25 0 0 0.4040404 Private 7th-8th Never-married Craft-repair Not-in-family White Male Mexico 0 -54 0.6 0.0239616632 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.137039348 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -32 0.355555564 0.213946208 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Transport-moving Own-child White Male United-States 0 -59 0.655555546 0.114777684 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.117317587 0.4375 0 0 0.24242425 ? 11th Married-civ-spouse ? Wife Other Female United-States 0 -54 0.6 0.148214638 0.8125 0 0 0.4040404 Private Bachelors Widowed Sales Unmarried White Female United-States 0 -54 0.6 0.1559111 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -67 0.7444445 0.226293445 0.5625 0.009910099 0 0.181818187 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -33 0.366666675 0.188032642 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.060321074 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -47 0.5222222 0.109078906 0.8125 0 0 0.25252524 Private Bachelors Divorced Other-service Not-in-family White Female Germany 0 -51 0.566666663 0.0882788152 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -45 0.5 0.147929728 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.118210018 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -58 0.644444466 0.122625038 1 0 0 0.24242425 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.193625 0.5625 0.0332503319 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 -36 0.4 0.1389185 0.625 0 0.371212125 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -20 0.222222224 0.127434745 0.75 0 0 0.4040404 ? Assoc-acdm Never-married ? Not-in-family White Male United-States 0 -51 0.566666663 0.0146143511 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.220953658 0.875 0 0 0.6060606 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -32 0.355555564 0.240242347 0.5625 0.0388703868 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Male United-States 0 -59 0.655555546 0.08208028 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 -45 0.5 0.2835486 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.147206351 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -54 0.6 0.194646075 0.375 0.143441439 0 0.686868668 Private 10th Divorced Prof-specialty Unmarried White Male United-States 1 -20 0.222222224 0.127796426 0.625 0 0 0.323232323 ? Some-college Never-married ? Own-child White Female United-States 0 -29 0.322222233 0.127236724 0.8125 0 0 0.424242437 Local-gov Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 -28 0.311111122 0.1435174 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family Black Female Jamaica 0 -18 0.2 0.10583315 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Never-married Sales Own-child White Female United-States 0 -49 0.544444442 0.06601311 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.139877617 0.5625 0 0 0.3030303 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -58 0.644444466 0.243731931 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 -56 0.622222245 0.179221466 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female Mexico 0 -41 0.455555558 0.07181696 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Exec-managerial Unmarried Black Female United-States 0 -50 0.5555556 0.11301437 0.9375 0 0.5544077 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -74 0.822222233 0.139207453 0.625 0 0.378328741 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -30 0.333333343 0.163780019 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -62 0.6888889 0.136005476 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried Black Female United-States 0 -19 0.211111113 0.08644546 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -29 0.322222233 0.13288027 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -20 0.222222224 0.113951258 0.625 0 0 0.4040404 ? Some-college Never-married ? Other-relative Black Female United-States 0 -36 0.4 0.165366858 0.25 0 0 0.353535354 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -36 0.4 0.0872840062 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -51 0.566666663 0.031935636 0.75 0 0.373737365 0.3030303 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 -37 0.411111116 0.127003685 0.625 0.04386044 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.124408558 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.0429270454 0.375 0 0 0.2020202 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 -18 0.2 0.07493475 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.0750876442 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -26 0.2888889 0.179590568 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.06321323 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.124069765 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.16030255 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Other-relative White Male Mexico 0 -28 0.311111122 0.0203656629 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried White Female United-States 0 -43 0.477777779 0.13237983 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -47 0.5222222 0.0975574255 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.188926429 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child Black Female United-States 0 -73 0.811111152 0.09133195 0.8125 0 0 0.1010101 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -37 0.411111116 0.2756029 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 -50 0.5555556 0.0159533378 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Other-relative White Female United-States 1 -19 0.211111113 0.154748589 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Own-child White Male United-States 0 -32 0.355555564 0.06434275 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -44 0.4888889 0.0493020527 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Tech-support Unmarried Asian-Pac-Islander Male United-States 0 -20 0.222222224 0.132514536 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 -29 0.322222233 0.0535331927 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -21 0.233333334 0.07875908 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -34 0.377777785 0.0679933056 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Unmarried White Female Germany 0 -44 0.4888889 0.0381564 0.8125 0 0 0.5252525 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -18 0.2 0.125919968 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 -22 0.244444445 0.178401768 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Other-relative White Female United-States 0 -39 0.433333337 0.123318776 1 0 0 0.4040404 State-gov Doctorate Divorced Prof-specialty Not-in-family White Female United-States 1 -26 0.2888889 0.184143662 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family White Male Peru 0 -29 0.322222233 0.09594027 0.8125 0 0 0.25252524 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -21 0.233333334 0.119569883 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -49 0.544444442 0.0210594032 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -24 0.266666681 0.216653138 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Machine-op-inspct Own-child White Male United-States 0 -26 0.2888889 0.223519832 0.8125 0 0 0.6060606 Private Bachelors Never-married Exec-managerial Not-in-family White Male ? 0 -25 0.2777778 0.190957129 0.625 0 0 0.6060606 Private Some-college Never-married Protective-serv Not-in-family White Male United-States 0 -30 0.333333343 0.0367803723 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -52 0.5777778 0.10927289 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.1184956 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.159495667 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -31 0.344444454 0.1136805 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -44 0.4888889 0.1529361 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.192182958 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.174920276 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Female United-States 0 -57 0.6333333 0.0164234657 0.25 0 0 0.1010101 Private 7th-8th Widowed Other-service Not-in-family White Female United-States 0 -58 0.644444466 0.216886863 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.0335399956 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.0354050137 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.1793454 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -72 0.8 0.192232132 0.9375 0 0.515610635 0.282828271 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.1197935 0.8125 0 0.430670351 0.3838384 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -45 0.5 0.123798333 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 -48 0.533333361 0.0722237751 0.9375 1 0 0.5050505 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.116978794 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -20 0.222222224 0.110436082 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 -18 0.2 0.116915487 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Male Peru 0 -27 0.3 0.115853995 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -25 0.2777778 0.02988001 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -45 0.5 0.1659535 0.5625 0 0 0.3030303 Private HS-grad Never-married Priv-house-serv Unmarried Black Female United-States 0 -53 0.5888889 0.112502486 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family Black Female United-States 0 -54 0.6 0.0968690738 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -41 0.455555558 0.0255060773 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.3013986 0.3125 0 0 0.353535354 Private 9th Never-married Machine-op-inspct Other-relative White Male Mexico 0 -17 0.188888893 0.16120778 0.375 0 0 0.181818187 Private 10th Never-married Other-service Own-child White Male United-States 0 -42 0.466666669 0.165672645 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -61 0.677777767 0.0233258456 0.5 0 0 0.4040404 Private 12th Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 -57 0.6333333 0.08174149 0.625 0 0.518365443 0.3838384 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 1 -21 0.233333334 0.0161702167 0.625 0 0 0.353535354 State-gov Some-college Never-married Craft-repair Own-child White Male United-States 0 -44 0.4888889 0.111464567 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -48 0.533333361 0.219604567 0.75 0 0 0.444444448 Private Assoc-acdm Divorced Other-service Not-in-family White Male United-States 0 -46 0.51111114 0.1689366 0.9375 0 0 0.4848485 Private Prof-school Divorced Farming-fishing Unmarried White Male United-States 0 -37 0.411111116 0.104156047 0.5625 0 0 0.868686855 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -35 0.3888889 0.133495882 0.5625 0 0 0.545454562 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -27 0.3 0.114840321 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Transport-moving Not-in-family White Female United-States 0 -28 0.311111122 0.128875434 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family Other Male India 0 -19 0.211111113 0.160953864 0.5625 0 0 0.1010101 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -63 0.7 0.231782079 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -69 0.7666667 0.10015054 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -69 0.7666667 0.121362157 0.75 0 0 0.0606060624 ? Assoc-acdm Widowed ? Not-in-family White Female Italy 0 -36 0.4 0.113755934 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-spouse-absent Protective-serv Own-child White Female Germany 0 -20 0.222222224 0.136904642 0.5 0 0 0.353535354 Private 12th Never-married Other-service Own-child White Male United-States 0 -28 0.311111122 0.06032444 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 -58 0.644444466 0.06571137 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -48 0.533333361 0.2266713 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.09405707 0.625 0 0 0.565656543 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -38 0.422222227 0.107894838 0.5625 0 0.4708448 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.215791017 0.75 0 0 0.4040404 Local-gov Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 -35 0.3888889 0.0216379687 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -45 0.5 0.1855217 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Exec-managerial Unmarried White Male United-States 0 -38 0.422222227 0.03701274 0.625 0 0 0.3838384 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.0697647 0.75 0 0 0.5555556 Private Assoc-acdm Divorced Exec-managerial Unmarried White Female United-States 1 -42 0.466666669 0.1653965 0.8125 0 0 0.121212125 Private Bachelors Never-married Prof-specialty Own-child White Female England 0 -32 0.355555564 0.0264180433 0.375 0 0 0.4040404 Private 10th Separated Craft-repair Unmarried Black Female ? 0 -55 0.6111111 0.0790439844 1 0 0 0.7070707 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 1 -63 0.7 0.139680952 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.239298046 0.3125 0 0 0.4848485 Private 9th Never-married Machine-op-inspct Not-in-family White Male Mexico 0 -62 0.6888889 0.09511519 0.875 0 0 0.3030303 ? Masters Married-civ-spouse ? Husband White Male United-States 1 -46 0.51111114 0.139877617 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -43 0.477777779 0.0687773 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -35 0.3888889 0.04059325 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.187668264 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -51 0.566666663 0.239475861 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Unmarried White Female Mexico 0 -45 0.5 0.1662896 0.8125 0 0 0.727272749 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Canada 1 -19 0.211111113 0.0838456154 0.5 0 0.3677686 0.2020202 Private 12th Never-married Other-service Own-child White Male United-States 0 -61 0.677777767 0.136125356 0.5625 0 0.43663913 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -61 0.677777767 0.128925949 0.3125 0 0 0.656565666 Private 9th Widowed Exec-managerial Not-in-family Black Male United-States 0 -21 0.233333334 0.124296077 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -45 0.5 0.0823099539 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -38 0.422222227 0.1542495 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.08760461 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -40 0.444444448 0.20643495 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -32 0.355555564 0.156835869 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -55 0.6111111 0.115395315 0.625 0 0 0.353535354 Local-gov Some-college Married-spouse-absent Adm-clerical Unmarried Black Female United-States 0 -64 0.7111111 0.09711155 0.5625 0 0 0.232323229 Private HS-grad Widowed Prof-specialty Not-in-family White Female United-States 0 -34 0.377777785 0.06927841 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Male United-States 0 -19 0.211111113 0.134366766 0.625 0 0 0.6060606 ? Some-college Never-married ? Own-child White Male United-States 0 -58 0.644444466 0.14106372 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 -46 0.51111114 0.0504443645 0.75 0 0.3409091 0.5555556 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.124184944 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.300741225 0.625 0 0 0.4040404 Private Some-college Separated Other-service Unmarried Black Female United-States 0 -31 0.344444454 0.07657279 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Machine-op-inspct Unmarried White Female United-States 0 -39 0.433333337 0.224492416 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 -19 0.211111113 0.07983741 0.5 0 0 0.181818187 Private 12th Never-married Sales Own-child White Female United-States 0 -56 0.622222245 0.05128426 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -53 0.5888889 0.026129771 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -68 0.75555557 0.140417129 0.875 0 0 0.181818187 Private Masters Married-civ-spouse Prof-specialty Husband White Male ? 0 -69 0.7666667 0.136938319 0.5625 0.009910099 0 0.181818187 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -62 0.6888889 0.166688338 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -62 0.6888889 0.133821875 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -39 0.433333337 0.03779741 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -45 0.5 0.2423431 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 0 -29 0.322222233 0.1559596 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -33 0.366666675 0.02347133 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -34 0.377777785 0.134662449 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -29 0.322222233 0.132176429 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -65 0.722222269 0.04469575 0.4375 0.06418064 0 0.353535354 Self-emp-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.127626032 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 -22 0.244444445 0.131236851 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -30 0.333333343 0.112688385 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -44 0.4888889 0.129909977 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -48 0.533333361 0.0472881831 0.625 0 0 0.2020202 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -52 0.5777778 0.08285215 0.5625 0 0 0.454545468 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -53 0.5888889 0.0911554843 0.8125 0.07688077 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male China 1 -48 0.533333361 0.335073978 0.5625 0.0147101469 0 0.4040404 Federal-gov HS-grad Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 -25 0.2777778 0.120211087 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -41 0.455555558 0.100968882 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.0695916042 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -55 0.6111111 0.161246851 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -67 0.7444445 0.111188419 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.262493223 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 -47 0.5222222 0.252292544 0.5625 0 0 0.5252525 Private HS-grad Separated Sales Not-in-family White Female United-States 0 -36 0.4 0.126613036 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried White Female United-States 0 -25 0.2777778 0.1746475 0.8125 0 0 0.161616161 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -19 0.211111113 0.187037155 0.3125 0 0 0.161616161 Private 9th Never-married Farming-fishing Other-relative White Male Mexico 0 -24 0.266666681 0.155079976 0.25 0 0 0.4040404 Private 7th-8th Separated Machine-op-inspct Own-child White Male United-States 0 -30 0.333333343 0.132243112 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Never-married Sales Own-child White Male United-States 0 -17 0.188888893 0.108417496 0.4375 0 0 0.161616161 Private 11th Never-married Adm-clerical Own-child White Male United-States 0 -28 0.311111122 0.07775147 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -34 0.377777785 0.155615434 0.6875 0.03908039 0 0.454545468 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -35 0.3888889 0.08728805 0.625 0 0 0.464646459 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.2607306 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 0 -43 0.477777779 0.07135155 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -20 0.222222224 0.07223119 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male ? 0 -55 0.6111111 0.0841918141 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Unmarried White Male United-States 1 -22 0.244444445 0.154546529 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -20 0.222222224 0.154989034 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Own-child White Male United-States 0 -44 0.4888889 0.0718647838 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -38 0.422222227 0.08988587 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 -53 0.5888889 0.199042916 0.3125 0 0 0.25252524 Private 9th Widowed Sales Unmarried Black Female United-States 0 -26 0.2888889 0.102074824 0.625 0.02597026 0 0.4848485 Private Some-college Separated Sales Own-child Amer-Indian-Eskimo Male United-States 0 -58 0.644444466 0.0675642639 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -23 0.25555557 0.215729058 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -53 0.5888889 0.1093692 0.125 0 0 0.5050505 Private 1st-4th Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.123861648 0.5625 0.0235402342 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -41 0.455555558 0.02156388 0.5625 0 0 0.6262626 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -31 0.344444454 0.0788224 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -50 0.5555556 0.1887769 0.5625 0 0 0.4040404 Private HS-grad Widowed Prof-specialty Unmarried Black Female United-States 0 -57 0.6333333 0.230959013 0.3125 0 0 0.5555556 Private 9th Married-civ-spouse Sales Husband Black Male United-States 1 -25 0.2777778 0.122312516 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Tech-support Husband White Male United-States 0 -23 0.25555557 0.150911465 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -48 0.533333361 0.100052871 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -34 0.377777785 0.06557195 0.625 0 0 0.6060606 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -37 0.411111116 0.1041089 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male ? 0 -43 0.477777779 0.09496028 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Other-relative Asian-Pac-Islander Male India 0 -20 0.222222224 0.0999585763 0.625 0.010550105 0 0.2020202 Private Some-college Never-married Sales Other-relative White Male United-States 0 -40 0.444444448 0.101538688 0.8125 1 0 0.75757575 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.0586015433 0.625 0 0.3624885 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -35 0.3888889 0.07554228 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.08182636 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -57 0.6333333 0.191037953 0.625 0 0 0.4040404 State-gov Some-college Divorced Craft-repair Not-in-family White Female United-States 0 -43 0.477777779 0.04698442 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male United-States 0 -40 0.444444448 0.134639546 0.75 0 0.4242424 0.5555556 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.05928383 0.625 0 0 0.5555556 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 -28 0.311111122 0.0215093233 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.217588678 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.127633438 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -52 0.5777778 0.0599721856 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.0757773444 0.375 0 0 0.6060606 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.159587264 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -33 0.366666675 0.187588781 0.5625 0 0 0.424242437 Private HS-grad Divorced Craft-repair Own-child White Female United-States 0 -21 0.233333334 0.2918627 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried White Male United-States 0 -25 0.2777778 0.17402716 0.8125 0 0 0.323232323 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -44 0.4888889 0.109131448 0.4375 0 0 0.444444448 Private 11th Divorced Sales Unmarried White Female United-States 0 -20 0.222222224 0.133357808 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -46 0.51111114 0.06624211 0.375 0 0 0.373737365 Private 10th Married-spouse-absent Other-service Not-in-family Asian-Pac-Islander Male China 0 -39 0.433333337 0.11170435 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.120303363 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -19 0.211111113 0.154198319 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -27 0.3 0.141777664 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -53 0.5888889 0.10432443 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -46 0.51111114 0.111764289 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Machine-op-inspct Unmarried White Male United-States 0 -23 0.25555557 0.09346503 0.8125 0.02907029 0 0.4040404 ? Bachelors Never-married ? Own-child White Male United-States 0 -39 0.433333337 0.107846342 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Other-relative Asian-Pac-Islander Male Philippines 0 -30 0.333333343 0.257538021 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -53 0.5888889 0.08285215 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.08017283 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -22 0.244444445 0.334649652 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -44 0.4888889 0.1306987 0.625 0 0 0.353535354 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 -30 0.333333343 0.201537013 0.625 0 0 0.4040404 Private Some-college Divorced Sales Unmarried Amer-Indian-Eskimo Female United-States 0 -66 0.733333349 0.117725745 0.625 0 0 0.2020202 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.1186101 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.0262328219 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.183156252 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Wife White Female United-States 0 -17 0.188888893 0.08219882 0.4375 0 0 0.2020202 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -43 0.477777779 0.0780842 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -46 0.51111114 0.178557366 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.06791113 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Not-in-family White Male United-States 0 -60 0.6666667 0.08171253 0.25 0.031370312 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male Poland 0 -63 0.7 0.207467481 0.875 0.0501305 0 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 0 -42 0.466666669 0.143606976 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.23480624 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband Other Male Mexico 0 -33 0.366666675 0.185647652 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -43 0.477777779 0.161083177 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Amer-Indian-Eskimo Male United-States 0 -20 0.222222224 0.145143315 0.3125 0 0 0.4040404 Private 9th Never-married Exec-managerial Other-relative White Female Mexico 0 -30 0.333333343 0.144178808 0.625 0 0 0.727272749 Private Some-college Never-married Farming-fishing Other-relative Black Male United-States 0 -37 0.411111116 0.08250326 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.142586574 0.625 0 0 0.4040404 ? Some-college Divorced ? Unmarried White Female United-States 0 -49 0.544444442 0.118287474 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -65 0.722222269 0.103402361 0.5625 0 0 0.171717167 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -35 0.3888889 0.174000219 0.9375 0 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.080684714 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.0899188742 0.5625 0 0.453856736 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.109678358 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 -41 0.455555558 0.04557875 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -38 0.422222227 0.127222583 0.8125 0 0.307621658 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -45 0.5 0.09472858 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -18 0.2 0.0849690661 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -33 0.366666675 0.165459812 0.625 0 0 0.3838384 Private Some-college Separated Other-service Unmarried White Female El-Salvador 0 -28 0.311111122 0.08730623 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male ? 0 -47 0.5222222 0.0700933859 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried Amer-Indian-Eskimo Female United-States 0 -30 0.333333343 0.227592692 0.75 0 0 0.2020202 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -36 0.4 0.108534023 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -21 0.233333334 0.109266154 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Male United-States 0 -44 0.4888889 0.078393355 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -33 0.366666675 0.211698622 0.5625 0 0 0.2020202 Private HS-grad Married-spouse-absent Sales Not-in-family White Male United-States 0 -61 0.677777767 0.265732259 0.5625 0 0 0.0606060624 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 -29 0.322222233 0.207540229 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.131135821 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.0456609242 0.5625 0 0 0.6060606 ? HS-grad Never-married ? Own-child White Female United-States 0 -29 0.322222233 0.203691646 0.6875 0 0.359045 0.565656543 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 1 -27 0.3 0.194750473 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -21 0.233333334 0.154795736 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -22 0.244444445 0.103882588 0.625 0.0378103778 0 0.353535354 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -49 0.544444442 0.166187227 0.625 0 0 0.454545468 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.126652092 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.1262473 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -37 0.411111116 0.0709002838 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.167850181 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.137058884 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -18 0.2 0.0478721373 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 -55 0.6111111 0.09865731 0.625 0 0 0.454545468 Federal-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.135851234 0.75 0.05178052 0 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -59 0.655555546 0.138713747 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Amer-Indian-Eskimo Female United-States 0 -70 0.7777778 0.060783118 0.5625 0 0 0.05050505 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -53 0.5888889 0.119651385 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male France 1 -39 0.433333337 0.0851980746 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried White Female United-States 0 -38 0.422222227 0.173593417 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -33 0.366666675 0.782218039 0.625 0 0 0.5050505 Private Some-college Separated Tech-support Unmarried White Female Columbia 0 -19 0.211111113 0.173329383 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -28 0.311111122 0.149155557 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -74 0.822222233 0.175569564 0.375 0 0 0.01010101 Private 10th Divorced Other-service Not-in-family White Female United-States 0 -40 0.444444448 0.129550323 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -35 0.3888889 0.05420538 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Not-in-family White Male United-States 0 -35 0.3888889 0.07328594 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -41 0.455555558 0.1183225 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.183841243 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -29 0.322222233 0.108294919 0.375 0 0 0.353535354 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.0823099539 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -46 0.51111114 0.08161083 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 -40 0.444444448 0.141137138 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.16466099 0.8125 0.07688077 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.118741438 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Protective-serv Husband Black Male United-States 0 -31 0.344444454 0.0617402121 0.5625 0 0 0.6060606 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 -50 0.5555556 0.128661931 0.875 0.046500463 0 0.7070707 Local-gov Masters Divorced Exec-managerial Not-in-family White Female United-States 0 -31 0.344444454 0.04290684 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -27 0.3 0.0213234276 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.1288 0.625 0 0 0.25252524 Private Some-college Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -28 0.311111122 0.037946932 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -21 0.233333334 0.148956865 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 -57 0.6333333 0.09692835 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -56 0.622222245 0.293550581 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -22 0.244444445 0.0414216965 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -48 0.533333361 0.140891284 0.0625 0 0 0.4040404 Private Preschool Separated Other-service Unmarried White Female El-Salvador 0 -36 0.4 0.07221502 0.625 0 0 0.5555556 Self-emp-inc Some-college Divorced Sales Unmarried Asian-Pac-Islander Male United-States 0 -51 0.566666663 0.0373811647 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 -39 0.433333337 0.241099745 0.75 0 0 0.4848485 Local-gov Assoc-acdm Never-married Transport-moving Not-in-family White Male United-States 0 -43 0.477777779 0.134946 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -38 0.422222227 0.2158348 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male ? 0 -51 0.566666663 0.1242954 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -43 0.477777779 0.139372468 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -44 0.4888889 0.0365796573 0.875 0.07298073 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.1402063 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -40 0.444444448 0.09894761 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.214464158 0.375 0 0 0.121212125 Private 10th Separated Other-service Own-child Black Female United-States 0 -47 0.5222222 0.139785349 0.25 0 0 0.4040404 Self-emp-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male ? 0 -23 0.25555557 0.04708747 0.0625 0 0 0.151515156 Private Preschool Never-married Other-service Own-child White Female United-States 0 -26 0.2888889 0.205632776 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -25 0.2777778 0.198887318 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Prof-specialty Own-child Black Female United-States 0 -29 0.322222233 0.185296074 0.625 0 0 0.424242437 Private Some-college Separated Handlers-cleaners Not-in-family Black Male United-States 0 -30 0.333333343 0.22884883 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -57 0.6333333 0.268905938 0.8125 0 0.3409091 0.4040404 State-gov Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male China 0 -37 0.411111116 0.0345280729 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.03301666 0.8125 0.03103031 0 0.4848485 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.119956493 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 1 -45 0.5 0.145445064 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -21 0.233333334 0.118661962 0.625 0 0 0.161616161 Private Some-college Never-married Sales Own-child White Female United-States 0 -25 0.2777778 0.121831611 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -61 0.677777767 0.08787335 0.5625 0 0 0.4040404 State-gov HS-grad Widowed Adm-clerical Unmarried Amer-Indian-Eskimo Female United-States 0 -59 0.655555546 0.221272916 0.5625 0.02414024 0 0.151515156 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -28 0.311111122 0.09612145 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -24 0.266666681 0.118758276 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -47 0.5222222 0.09769011 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Cuba 1 -29 0.322222233 0.06427068 0.5625 0 0 0.8080808 Private HS-grad Married-AF-spouse Transport-moving Husband White Male United-States 0 -49 0.544444442 0.144874573 0.3125 0 0 0.2020202 Self-emp-not-inc 9th Divorced Other-service Not-in-family White Female United-States 0 -41 0.455555558 0.119619049 0.8125 0 0 0.353535354 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -33 0.366666675 0.08346439 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family Black Female United-States 0 -20 0.222222224 0.135710463 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -40 0.444444448 0.0316493846 1 0 0.453856736 0.2020202 Private Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 -32 0.355555564 0.261784 0.625 0 0 0.161616161 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 -48 0.533333361 0.10049808 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family Black Male United-States 1 -24 0.266666681 0.09078369 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -50 0.5555556 0.124878012 0.6875 0 0 0.3838384 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -31 0.344444454 0.0580202825 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Protective-serv Other-relative Asian-Pac-Islander Male United-States 0 -23 0.25555557 0.0281005315 0.6875 0 0 0.5555556 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.131840333 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -50 0.5555556 0.06470107 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -39 0.433333337 0.144910946 0.3125 0 0 0.5050505 Private 9th Divorced Handlers-cleaners Not-in-family White Male United-States 0 -52 0.5777778 0.182344645 0.25 0 0 0.4848485 Private 7th-8th Married-civ-spouse Other-service Husband White Male Cuba 0 -44 0.4888889 0.05052317 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -43 0.477777779 0.138841718 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.0341481976 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.1510455 0.25 0 0 0.4040404 Private 7th-8th Never-married Farming-fishing Not-in-family White Male Mexico 1 -31 0.344444454 0.1619453 0.875 0 0.359045 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 -40 0.444444448 0.274001241 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -28 0.311111122 0.02320461 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -19 0.211111113 0.243375629 0.5 0 0 0.25252524 Private 12th Never-married Prof-specialty Not-in-family Asian-Pac-Islander Female Thailand 0 -35 0.3888889 0.0527020544 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.07200084 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -40 0.444444448 0.111205935 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Adm-clerical Husband White Male England 0 -20 0.222222224 0.27388674 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -55 0.6111111 0.115488939 0.5625 0 0 0.4848485 Private HS-grad Divorced Craft-repair Unmarried Black Male United-States 1 -30 0.333333343 0.229801208 0.25 0 0 0.353535354 Private 7th-8th Separated Transport-moving Not-in-family White Male United-States 0 -38 0.422222227 0.08026982 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -75 0.8333334 0.07065108 0.5625 0.0265302639 0 0.2020202 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -17 0.188888893 0.230855286 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Male United-States 0 -79 0.8777778 0.0516203567 0.875 0.200512 0 0.4040404 ? Masters Married-civ-spouse ? Husband White Male Poland 1 -20 0.222222224 0.0320205 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Male United-States 0 -25 0.2777778 0.157244042 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Tech-support Not-in-family White Male United-States 0 -27 0.3 0.2047235 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -19 0.211111113 0.109796226 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -21 0.233333334 0.051028993 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife Amer-Indian-Eskimo Female United-States 0 -19 0.211111113 0.0289640035 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -42 0.466666669 0.221080288 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.08813603 0.375 0 0 0.363636374 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.128020048 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male Iran 1 -59 0.655555546 0.114600547 0.625 0 0 0.323232323 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -50 0.5555556 0.070385024 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -48 0.533333361 0.143557146 0.5625 0 0 0.8080808 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.118211366 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -27 0.3 0.116932996 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Not-in-family White Female United-States 0 -45 0.5 0.100353271 1 1 0 0.3030303 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 -24 0.266666681 0.0434564464 0.25 0 0 0.4040404 Private 7th-8th Never-married Sales Own-child White Male United-States 0 -31 0.344444454 0.09417494 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -24 0.266666681 0.174243376 0.1875 0 0 0.4040404 Private 5th-6th Never-married Farming-fishing Other-relative Black Male Mexico 0 -29 0.322222233 0.023436306 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -24 0.266666681 0.08416689 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -24 0.266666681 0.04428018 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.108497649 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family Black Female Jamaica 0 -63 0.7 0.285976678 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -36 0.4 0.137290582 0.625 0 0 0.5050505 Federal-gov Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -58 0.644444466 0.0742228255 0.25 0 0 0.4040404 State-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -51 0.566666663 0.212876633 0.625 0 0 0.363636374 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -42 0.466666669 0.172200546 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.130456224 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -26 0.2888889 0.04089836 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Female United-States 0 -39 0.433333337 0.126521438 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.157118753 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -51 0.566666663 0.145082027 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 1 -45 0.5 0.135963038 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Exec-managerial Unmarried White Male United-States 0 -45 0.5 0.0800758451 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.248358428 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.08340579 0.625 0 0.323232323 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -38 0.422222227 0.115406096 0.4375 0 0 0.363636374 Private 11th Married-spouse-absent Transport-moving Own-child White Male Mexico 0 -39 0.433333337 0.103708148 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -52 0.5777778 0.25249663 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Farming-fishing Not-in-family White Male United-States 0 -17 0.188888893 0.112923443 0.5 0 0 0.0606060624 Private 12th Never-married Sales Own-child White Female United-States 0 -31 0.344444454 0.234729469 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -22 0.244444445 0.174114734 0.5625 0 0 0.24242425 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 -47 0.5222222 0.07334117 0.5625 0.0183101818 0 0.3838384 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.126783431 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.239489332 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -41 0.455555558 0.286285162 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -29 0.322222233 0.09601571 0.875 0 0 0.424242437 Private Masters Never-married Prof-specialty Not-in-family Black Male United-States 0 -42 0.466666669 0.01974803 0.9375 0 0 0.6060606 Self-emp-not-inc Prof-school Divorced Prof-specialty Unmarried White Male United-States 1 -52 0.5777778 0.13998808 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -35 0.3888889 0.126172543 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.182509661 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 -46 0.51111114 0.132909909 0.875 0.07688077 0 0.464646459 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -21 0.233333334 0.117980339 0.625 0.0217602178 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -45 0.5 0.10789147 0.5625 0 0 0.4040404 Local-gov HS-grad Married-spouse-absent Adm-clerical Unmarried Black Female United-States 0 -21 0.233333334 0.1333046 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -74 0.822222233 0.129513949 0.375 0 0 0.2020202 Private 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -29 0.322222233 0.162924618 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Other-relative White Male United-States 0 -39 0.433333337 0.110806525 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -44 0.4888889 0.09914832 0.625 0.07688077 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.206686184 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 -32 0.355555564 0.114391074 0.75 0 0 0.4040404 Local-gov Assoc-acdm Divorced Exec-managerial Not-in-family Black Female United-States 0 -61 0.677777767 0.08395473 0.375 0 0 0.4040404 ? 10th Divorced ? Not-in-family White Female United-States 0 -43 0.477777779 0.124642268 0.5625 0 0 0.3030303 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 1 -23 0.25555557 0.16168128 0.0625 0 0 0.4040404 Private Preschool Never-married Other-service Not-in-family Asian-Pac-Islander Female Laos 0 -18 0.2 0.110756688 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -38 0.422222227 0.120774165 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -33 0.366666675 0.2154327 0.8125 0.046500463 0 0.353535354 Private Bachelors Separated Prof-specialty Not-in-family White Male United-States 0 -19 0.211111113 0.100326329 0.625 0 0 0.353535354 Self-emp-inc Some-college Never-married Other-service Own-child Asian-Pac-Islander Female South 0 -23 0.25555557 0.02219296 0.625 0.04101041 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -37 0.411111116 0.139218912 0.5625 0 0 0.454545468 Private HS-grad Divorced Tech-support Own-child White Male United-States 0 -25 0.2777778 0.259745866 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -36 0.4 0.021174578 0.5625 0 0 0.434343427 Private HS-grad Divorced Transport-moving Unmarried White Male ? 0 -45 0.5 0.113556564 0.5 0.03103031 0 0.4040404 Private 12th Married-civ-spouse Adm-clerical Wife Black Female United-States 1 -32 0.355555564 0.06553895 0.8125 0 0 0.4848485 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -65 0.722222269 0.0720075741 0.4375 0 0 0.151515156 ? 11th Divorced ? Not-in-family Asian-Pac-Islander Female United-States 0 -18 0.2 0.0199244972 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Never-married Craft-repair Own-child White Male United-States 0 -25 0.2777778 0.148368865 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Unmarried White Male Mexico 0 -29 0.322222233 0.07424101 0.875 0 0 0.656565666 Private Masters Never-married Sales Not-in-family White Male ? 0 -53 0.5888889 0.162263885 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.077790536 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.0712714 0.8125 0 0 0.454545468 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -24 0.266666681 0.222829461 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -54 0.6 0.0244674869 0.25 0 0 0.5050505 Self-emp-not-inc 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.0225115437 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -45 0.5 0.0509683751 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 -36 0.4 0.125105 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -36 0.4 0.125300989 0.4375 0.05178052 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 -44 0.4888889 0.1323199 0.875 0 0.383149683 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.07506542 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Unmarried Black Male United-States 0 -39 0.433333337 0.07765112 0.625 0 0.3168044 0.7070707 Private Some-college Divorced Sales Own-child White Male United-States 0 -50 0.5555556 0.0504335873 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Handlers-cleaners Unmarried White Female United-States 0 -38 0.422222227 0.0790136755 0.5625 0.1502415 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -58 0.644444466 0.183808908 0.8125 0 0 0.4040404 Private Bachelors Widowed Exec-managerial Unmarried White Female United-States 0 -44 0.4888889 0.1483325 0.5625 0 0 0.4848485 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -24 0.266666681 0.0612471849 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Own-child Asian-Pac-Islander Male United-States 0 -52 0.5777778 0.1577997 0.5625 0.1502415 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.245535657 0.8125 0.0861408561 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 -50 0.5555556 0.191065565 1 0.1502415 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.1317447 0.75 0 0 0.444444448 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.0476599745 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family Black Male United-States 0 -53 0.5888889 0.09612482 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 -24 0.266666681 0.08368127 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -58 0.644444466 0.0360213 0.8125 0 0 0.7070707 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -26 0.2888889 0.1938412 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.126809031 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Handlers-cleaners Own-child White Male United-States 0 -36 0.4 0.115826376 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -78 0.8666667 0.05037701 0.75 0 0 0.04040404 ? Assoc-acdm Widowed ? Not-in-family White Female United-States 0 -36 0.4 0.147160545 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Germany 1 -43 0.477777779 0.06394334 0.8125 0 0 0.282828271 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -60 0.6666667 0.07375944 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -49 0.544444442 0.181535736 0.875 0.07298073 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.1358445 0.25 0 0.453856736 0.6363636 Self-emp-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male ? 1 -34 0.377777785 0.08127675 0.25 0 0 0.1010101 Self-emp-not-inc 7th-8th Never-married Handlers-cleaners Unmarried Black Male United-States 0 -46 0.51111114 0.08808417 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -46 0.51111114 0.297393769 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Transport-moving Husband Black Male United-States 0 -69 0.7666667 0.07732243 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -32 0.355555564 0.121427491 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.01848448 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -61 0.677777767 0.121493496 0.1875 0.03411034 0 0.454545468 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -56 0.622222245 0.09649459 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.0938018039 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -29 0.322222233 0.08500544 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -37 0.411111116 0.125406057 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.132796079 0.9375 0 0.5874656 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 -44 0.4888889 0.130345091 0.875 0 0.43663913 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.122171074 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried White Female United-States 0 -51 0.566666663 0.08416689 0.9375 0 0 0.8080808 Self-emp-not-inc Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 -24 0.266666681 0.1272475 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.100511551 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Never-married Other-service Own-child White Female United-States 0 -40 0.444444448 0.2618197 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -34 0.377777785 0.07647513 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Own-child White Male United-States 0 -61 0.677777767 0.126379311 0.8125 0 0 0.4040404 ? Bachelors Divorced ? Unmarried White Female United-States 0 -56 0.622222245 0.180347621 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male ? 0 -69 0.7666667 0.09688726 0.4375 0 0 0.2020202 Federal-gov 11th Widowed Adm-clerical Not-in-family White Female United-States 0 -41 0.455555558 0.0655194148 0.6875 0 0 0.1010101 Self-emp-not-inc Assoc-voc Divorced Other-service Unmarried White Female United-States 0 -40 0.444444448 0.134237438 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.0840921253 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Black Male United-States 0 -26 0.2888889 0.03371242 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -53 0.5888889 0.06533621 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -90 1 0.118167587 0.25 0 0 0.151515156 ? 7th-8th Separated ? Not-in-family White Female United-States 0 -39 0.433333337 0.227585956 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -51 0.566666663 0.08356947 0.8125 0 0 0.4040404 Federal-gov Bachelors Widowed Adm-clerical Not-in-family White Female United-States 0 -56 0.622222245 0.186851934 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male Puerto-Rico 1 -51 0.566666663 0.1887769 0.375 0 0 0.4040404 Private 10th Separated Adm-clerical Unmarried Black Female United-States 0 -17 0.188888893 0.162446409 0.5 0 0 0.2020202 Private 12th Never-married Prof-specialty Own-child White Male United-States 0 -42 0.466666669 0.1361806 0.625 0 0.3996786 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -42 0.466666669 0.133644059 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Own-child White Female United-States 0 -29 0.322222233 0.0553928241 0.9375 0.2782828 0 0.454545468 Private Prof-school Never-married Prof-specialty Unmarried White Male Germany 1 -33 0.366666675 0.120178089 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.125187159 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male ? 1 -43 0.477777779 0.1433598 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -64 0.7111111 0.147949263 0.9375 0 0 0.09090909 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.21678111 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 1 -21 0.233333334 0.2114043 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 -31 0.344444454 0.09703207 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -60 0.6666667 0.0940159857 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Exec-managerial Unmarried Asian-Pac-Islander Female United-States 1 -32 0.355555564 0.282676369 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Sales Husband White Male United-States 1 -66 0.733333349 0.143300518 0.8125 0.06767067 0 0.2020202 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -27 0.3 0.131717756 0.5625 0 0 0.2020202 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -40 0.444444448 0.138550088 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -27 0.3 0.08844181 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 -18 0.2 0.0366672166 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 -43 0.477777779 0.135201275 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family Black Female United-States 0 -52 0.5777778 0.05513486 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -31 0.344444454 0.107488692 0.5625 0 0 0.858585835 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.202676624 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -44 0.4888889 0.124642268 0.875 0 0 0.353535354 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.0283180848 0.625 0 0 0.8484849 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -35 0.3888889 0.112086914 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.1432857 0.3125 0 0 0.4040404 Private 9th Separated Craft-repair Unmarried Black Male United-States 0 -18 0.2 0.1590006 0.375 0 0 0.1010101 Private 10th Never-married Other-service Own-child Black Male United-States 0 -46 0.51111114 0.1457623 0.875 0 0.453856736 0.6060606 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.0184763987 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -54 0.6 0.0979447141 0.5625 0 0.3838384 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -56 0.622222245 0.09914562 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Not-in-family White Female Germany 0 -27 0.3 0.0197082926 0.625 0 0 0.5050505 Private Some-college Never-married Sales Unmarried White Male United-States 0 -26 0.2888889 0.242164612 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female Mexico 0 -41 0.455555558 0.153326079 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.0606322475 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male ? 0 -32 0.355555564 0.1267282 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried White Female United-States 0 -18 0.2 0.07418443 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -36 0.4 0.125556931 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -37 0.411111116 0.118353479 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -31 0.344444454 0.116430536 0.1875 0 0 0.25252524 Private 5th-6th Never-married Farming-fishing Own-child White Male Mexico 0 -46 0.51111114 0.0242263619 0.8125 0 0 0.5151515 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -24 0.266666681 0.2918627 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -25 0.2777778 0.107941307 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Never-married Exec-managerial Own-child Asian-Pac-Islander Male Taiwan 0 -55 0.6111111 0.127653643 0.1875 0 0 0.5050505 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 -64 0.7111111 0.07632762 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Exec-managerial Not-in-family White Male United-States 0 -30 0.333333343 0.07981384 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -65 0.722222269 0.0604032464 0.875 0 0 1 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -46 0.51111114 0.134656385 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -45 0.5 0.06890797 0.875 0.1502415 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.299458146 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 -32 0.355555564 0.119214259 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.06368875 0.8125 0.07688077 0 0.5050505 ? Bachelors Married-civ-spouse ? Wife Other Female ? 1 -34 0.377777785 0.246646985 1 0 0 0.454545468 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male Germany 1 -35 0.3888889 0.121698253 0.5625 0.031370312 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.0727545246 0.5625 0.0332503319 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -24 0.266666681 0.103415832 0.625 0 0 0.353535354 Private Some-college Never-married Sales Other-relative White Male United-States 0 -45 0.5 0.141687408 0.5625 0.1502415 0 0.8080808 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.12486925 0.375 0 0 0.343434334 Private 10th Never-married Handlers-cleaners Not-in-family White Female United-States 0 -44 0.4888889 0.149998158 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband Other Male Nicaragua 0 -23 0.25555557 0.1238933 0.625 0 0 0.6060606 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -57 0.6333333 0.109088339 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.252962053 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male Mexico 1 -20 0.222222224 0.210430354 0.5625 0 0 0.3030303 Local-gov HS-grad Married-civ-spouse Protective-serv Husband Black Male Puerto-Rico 0 -32 0.355555564 0.0359485559 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -60 0.6666667 0.112028994 0.5625 1 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 -38 0.422222227 0.08396617 0.8125 0 0 0.2020202 Self-emp-inc Bachelors Never-married Craft-repair Not-in-family White Female United-States 0 -29 0.322222233 0.09882031 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Not-in-family White Female United-States 0 -22 0.244444445 0.206500962 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -21 0.233333334 0.1055341 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Male India 0 -40 0.444444448 0.103380136 0.5625 0.031370312 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Other-relative White Male United-States 0 -59 0.655555546 0.155840382 0.625 0 0.4242424 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.08559883 0.875 0 0 0.454545468 State-gov Masters Divorced Exec-managerial Not-in-family White Male United-States 0 -76 0.844444454 0.221831948 0.5625 0 0 0.13131313 Local-gov HS-grad Widowed Other-service Not-in-family White Female United-States 0 -45 0.5 0.120103993 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -49 0.544444442 0.204920173 0.875 0 0 0.7070707 Local-gov Masters Separated Prof-specialty Unmarried White Female United-States 0 -36 0.4 0.117626064 0.6875 0 0 0.6060606 Local-gov Assoc-voc Never-married Protective-serv Not-in-family Black Female United-States 1 -22 0.244444445 0.09988112 0.4375 0 0 0.353535354 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -47 0.5222222 0.200738192 0.6875 0 0 0.444444448 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -26 0.2888889 0.0661107749 0.5625 0 0 0.5555556 Private HS-grad Married-AF-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.0692164451 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Own-child White Male United-States 0 -27 0.3 0.05289199 0.5625 0 0 0.151515156 Private HS-grad Never-married Transport-moving Own-child White Female United-States 0 -26 0.2888889 0.09180881 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -20 0.222222224 0.18546243 0.6875 0 0 0.25252524 Private Assoc-voc Never-married Tech-support Own-child White Female United-States 0 -31 0.344444454 0.022305442 0.875 0 0 0.454545468 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Male England 0 -57 0.6333333 0.134401113 0.875 0 0 0.4040404 Local-gov Masters Divorced Other-service Unmarried Black Female United-States 0 -39 0.433333337 0.124016561 0.4375 0 0 0.4040404 Private 11th Divorced Sales Other-relative White Female United-States 0 -36 0.4 0.227007389 0.75 0.143441439 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family Black Male England 1 -66 0.733333349 0.08520952 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.219432145 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -80 0.8888889 0.0618984923 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -21 0.233333334 0.08046986 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Female United-States 0 -40 0.444444448 0.103211075 0.8125 0 0.43663913 0.323232323 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.216777742 0.75 0 0 0.3030303 Local-gov Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 -48 0.533333361 0.07311688 0.625 0.0332503319 0 0.6060606 Self-emp-not-inc Some-college Divorced Sales Not-in-family White Female United-States 0 -19 0.211111113 0.04527297 0.625 0.005940059 0 0.24242425 State-gov Some-college Never-married Other-service Not-in-family White Male United-States 0 -42 0.466666669 0.131681383 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -59 0.655555546 0.06883051 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -63 0.7 0.0136882411 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -26 0.2888889 0.0823099539 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -41 0.455555558 0.135146037 0.3125 0 0 0.353535354 Private 9th Divorced Other-service Other-relative White Female United-States 0 -42 0.466666669 0.116918854 0.625 0 0.373737365 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -19 0.211111113 0.124011844 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -45 0.5 0.0357801728 0.4375 0 0 0.25252524 Local-gov 11th Married-civ-spouse Other-service Wife White Female United-States 0 -47 0.5222222 0.118535332 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 1 -47 0.5222222 0.21290493 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.022954056 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male England 0 -49 0.544444442 0.147987649 0.8125 0.1502415 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.0855079 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -53 0.5888889 0.06680452 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried White Male United-States 1 -21 0.233333334 0.0269764028 0.625 0 0.459366381 0.454545468 ? Some-college Never-married ? Not-in-family White Male United-States 0 -39 0.433333337 0.08087398 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -52 0.5777778 0.05208846 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.04107281 0.625 0.0217602178 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 -59 0.655555546 0.05245756 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Not-in-family Asian-Pac-Islander Male United-States 0 -50 0.5555556 0.0440545455 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.116709381 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male United-States 1 -52 0.5777778 0.214420378 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 -41 0.455555558 0.106206961 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.186861366 0.75 0 0 0.4040404 Private Assoc-acdm Widowed Tech-support Unmarried White Male United-States 1 -54 0.6 0.12434794 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -22 0.244444445 0.0231985487 0.5625 0 0 0.25252524 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -50 0.5555556 0.180879712 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -20 0.222222224 0.0278546922 0.75 0 0 0.323232323 ? Assoc-acdm Never-married ? Not-in-family White Female United-States 0 -43 0.477777779 0.309382677 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -48 0.533333361 0.100052871 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -24 0.266666681 0.171275109 0.8125 0.0217402168 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -54 0.6 0.070385024 0.625 0.1502415 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -26 0.2888889 0.160548389 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -53 0.5888889 0.121531889 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.06737298 1 0.1502415 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -54 0.6 0.145476714 0.875 0 0.4331956 0.444444448 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.0751442239 0.5625 0 0 0.4949495 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.214967281 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -60 0.6666667 0.107869916 0.8125 0 0 0.121212125 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -52 0.5777778 0.254626334 0.5625 0 0 0.454545468 Local-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.119271509 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -56 0.622222245 0.0807507262 0.625 0 0.3838384 0.4040404 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -57 0.6333333 0.0860635638 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.201624572 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -30 0.333333343 0.0430125855 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 -29 0.322222233 0.075707294 0.625 0 0 0.353535354 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -49 0.544444442 0.05631422 0.8125 0.07688077 0 0.6666667 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.3049818 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -30 0.333333343 0.119128719 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried Black Female United-States 0 -45 0.5 0.06779192 0.5625 0 0.454545438 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -17 0.188888893 0.179250434 0.375 0 0 0.121212125 Private 10th Never-married Other-service Own-child White Male United-States 0 -54 0.6 0.132219538 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -31 0.344444454 0.05919762 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -54 0.6 0.12279477 1 0 0.453856736 0.5050505 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.09215231 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -26 0.2888889 0.122358315 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Own-child White Female ? 0 -37 0.411111116 0.121014617 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -34 0.377777785 0.0185181573 0.5625 0 0 0.4848485 Private HS-grad Divorced Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 1 -38 0.422222227 0.227870181 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Canada 0 -51 0.566666663 0.134496748 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.0650870055 0.5625 0 0 0.6060606 Private HS-grad Never-married Exec-managerial Not-in-family Asian-Pac-Islander Male United-States 0 -24 0.266666681 0.1111763 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -56 0.622222245 0.0739918053 0.8125 0.1502415 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.05549453 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Asian-Pac-Islander Male United-States 0 -31 0.344444454 0.141131073 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.141368821 0.625 0 0 0.5050505 Private Some-college Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -32 0.355555564 0.0377354436 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Sales Other-relative White Male United-States 0 -35 0.3888889 0.1420107 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male Puerto-Rico 0 -43 0.477777779 0.0789099559 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.130089149 0.5625 0 0 0.363636374 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -19 0.211111113 0.09266353 0.5625 0 0 0.535353541 Self-emp-not-inc HS-grad Never-married Other-service Own-child White Male United-States 0 -23 0.25555557 0.157679811 0.75 0 0 0.323232323 Private Assoc-acdm Never-married Handlers-cleaners Own-child White Male United-States 0 -40 0.444444448 0.104914449 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried White Male United-States 0 -59 0.655555546 0.07464109 0.5625 0 0 0.3838384 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 -43 0.477777779 0.2716203 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.09919075 0.375 0 0 0.6060606 Self-emp-not-inc 10th Married-civ-spouse Craft-repair Husband White Male ? 0 -53 0.5888889 0.08290671 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 -26 0.2888889 0.111586481 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -68 0.75555557 0.122671507 0.625 0.106051058 0 0.2020202 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.137680545 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.0623228177 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -25 0.2777778 0.105763771 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -20 0.222222224 0.154003 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -22 0.244444445 0.0991799757 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -33 0.366666675 0.108293571 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.109913416 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Other-relative White Male United-States 0 -29 0.322222233 0.09856706 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -20 0.222222224 0.1520915 0.5625 0 0 0.232323229 Private HS-grad Never-married Sales Own-child White Female United-States 0 -68 0.75555557 0.136524767 0.875 0 0.5456841 0.424242437 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 -58 0.644444466 0.251974642 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -32 0.355555564 0.06326509 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -23 0.25555557 0.277663231 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.287918478 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male Mexico 0 -67 0.7444445 0.107871935 0.625 0 0 0.08080808 State-gov Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -26 0.2888889 0.107498124 0.75 0 0 0.323232323 Private Assoc-acdm Never-married Adm-clerical Unmarried White Female United-States 0 -53 0.5888889 0.0680384338 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -27 0.3 0.11036671 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.143185347 0.625 0 0 0.656565666 Without-pay Some-college Married-civ-spouse Farming-fishing Own-child White Male United-States 0 -38 0.422222227 0.216839716 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.213983253 0.3125 0 0 0.4040404 Private 9th Never-married Other-service Own-child Black Female United-States 0 -48 0.533333361 0.1936277 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 -52 0.5777778 0.09133599 0.625 0 0 0.4040404 Private Some-college Widowed Other-service Unmarried Black Female ? 0 -28 0.311111122 0.113499992 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 0 -18 0.2 0.0597034432 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Male United-States 0 -28 0.311111122 0.152962372 0.625 0 0 0.3030303 Private Some-college Divorced Sales Not-in-family White Male United-States 0 -34 0.377777785 0.105939567 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.143679053 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.198630035 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -30 0.333333343 0.169333979 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -20 0.222222224 0.123656891 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -29 0.322222233 0.127678558 0.5625 0.0217402168 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -55 0.6111111 0.146697164 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -20 0.222222224 0.261436462 0.625 0 0 0.24242425 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -54 0.6 0.301443726 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -27 0.3 0.137467042 0.375 0 0 0.3030303 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 -43 0.477777779 0.1305862 0.625 0 0 0.5555556 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -17 0.188888893 0.0605305433 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 -48 0.533333361 0.0334039442 0.875 0 0 0.727272749 State-gov Masters Divorced Protective-serv Not-in-family White Male United-States 0 -34 0.377777785 0.154153854 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -66 0.733333349 0.07286633 0.3125 0 0 0.4040404 ? 9th Married-civ-spouse ? Husband Black Male United-States 0 -29 0.322222233 0.118560255 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -43 0.477777779 0.273033381 0.625 0 0 0.4040404 ? Some-college Separated ? Not-in-family Black Male United-States 0 -37 0.411111116 0.0266760066 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Unmarried White Female United-States 0 -56 0.622222245 0.120126896 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -58 0.644444466 0.1082114 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -54 0.6 0.132233679 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband Black Male Jamaica 0 -45 0.5 0.0138303572 0.625 0 0 0.414141417 Private Some-college Separated Craft-repair Not-in-family White Male United-States 0 -29 0.322222233 0.10562031 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -26 0.2888889 0.242642149 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 -43 0.477777779 0.165053666 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -33 0.366666675 0.284715146 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -45 0.5 0.0795316249 0.625 0.03103031 0 0.424242437 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -25 0.2777778 0.177124754 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -25 0.2777778 0.126339585 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -69 0.7666667 0.174662977 0.9375 0 0 0.05050505 ? Prof-school Divorced ? Not-in-family White Male United-States 0 -37 0.411111116 0.108385168 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 -20 0.222222224 0.130832046 0.5625 0 0 0.25252524 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -39 0.433333337 0.09050081 0.875 0 0.453856736 0.24242425 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -17 0.188888893 0.083070375 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Female United-States 0 -27 0.3 0.223781154 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -26 0.2888889 0.241208866 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative Black Female United-States 0 -55 0.6111111 0.140107974 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -39 0.433333337 0.2144884 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Prof-specialty Husband White Male United-States 0 -41 0.455555558 0.139946327 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -34 0.377777785 0.160554454 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -51 0.566666663 0.4538033 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -67 0.7444445 0.161449581 1 0 0 0.121212125 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Black Male ? 0 -40 0.444444448 0.09023611 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Own-child White Male United-States 0 -58 0.644444466 0.0931397155 0.75 0 0.399449021 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.102471538 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -45 0.5 0.193924055 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.195036724 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.0530509427 0.625 0 0 0.4040404 State-gov Some-college Divorced Exec-managerial Unmarried White Male United-States 0 -25 0.2777778 0.0667311 0.8125 0.02597026 0 0.5050505 State-gov Bachelors Never-married Other-service Not-in-family White Female United-States 0 -36 0.4 0.151468471 0.8125 0.02407024 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -58 0.644444466 0.139106423 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.0872422457 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -60 0.6666667 0.136372551 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -24 0.266666681 0.109322727 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Asian-Pac-Islander Male South 0 -45 0.5 0.0490629449 0.5625 0 0 0.464646459 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -49 0.544444442 0.139385939 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.0431816429 0.5 0 0 0.4040404 Private 12th Never-married Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.0135090807 0.625 0 0 0.3838384 State-gov Some-college Married-spouse-absent Adm-clerical Unmarried Asian-Pac-Islander Female Philippines 0 -42 0.466666669 0.150120065 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Adm-clerical Not-in-family White Male United-States 0 -25 0.2777778 0.08936658 0.5625 0 0 0.5050505 Private HS-grad Never-married Priv-house-serv Not-in-family White Female United-States 0 -73 0.811111152 0.119736247 0.5625 0 0 0.151515156 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -59 0.655555546 0.09703679 0.1875 0.0258002579 0 0.151515156 Self-emp-not-inc 5th-6th Married-civ-spouse Other-service Husband White Male El-Salvador 0 -28 0.311111122 0.09997205 0.5625 0.0288502872 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.11355859 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Other-relative White Male United-States 0 -31 0.344444454 0.05273169 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -58 0.644444466 0.1642946 0.8125 0 0 0.4848485 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -21 0.233333334 0.144836187 0.5625 0 0 0.13131313 Private HS-grad Never-married Craft-repair Own-child White Male ? 0 -47 0.5222222 0.125057176 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.08159331 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -41 0.455555558 0.11709936 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male China 0 -59 0.655555546 0.05876386 0.375 0 0 0.4040404 ? 10th Divorced ? Not-in-family White Female England 0 -43 0.477777779 0.225627989 0.625 0.049340494 0 0.5151515 Private Some-college Separated Transport-moving Unmarried White Male United-States 1 -48 0.533333361 0.06295931 0.5625 0 0.459366381 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 -44 0.4888889 0.117385611 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -44 0.4888889 0.086667724 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 -24 0.266666681 0.138643026 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child Black Female United-States 0 -28 0.311111122 0.04211948 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.162060484 0.5625 0 0 0.1010101 Private HS-grad Married-spouse-absent Exec-managerial Unmarried White Female United-States 0 -33 0.366666675 0.119210213 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.1711633 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Other-relative White Female United-States 0 -30 0.333333343 0.09344887 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 -46 0.51111114 0.08652224 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -21 0.233333334 0.03810993 0.625 0 0 0.1010101 State-gov Some-college Never-married Tech-support Own-child White Male United-States 0 -52 0.5777778 0.1035566 0.3125 0 0 0.3030303 Private 9th Separated Other-service Not-in-family Black Female United-States 0 -26 0.2888889 0.19151482 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.21060884 0.8125 0 0 0.121212125 State-gov Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -28 0.311111122 0.07511257 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Unmarried White Female Nicaragua 0 -50 0.5555556 0.20539771 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.1943807 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -61 0.677777767 0.07906419 0.4375 0 0 0.2020202 Self-emp-not-inc 11th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.155238926 0.25 0 0 0.353535354 Private 7th-8th Separated Sales Unmarried White Female United-States 0 -30 0.333333343 0.2150461 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -51 0.566666663 0.1255576 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.09926012 0.625 0 0.5610652 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 1 -36 0.4 0.0982909054 0.5625 0 0.518365443 0.7070707 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -28 0.311111122 0.07419925 0.625 0 0 0.24242425 Private Some-college Divorced Other-service Other-relative Black Male United-States 0 -49 0.544444442 0.151851043 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -61 0.677777767 0.148407936 0.25 0 0 0.3030303 Self-emp-not-inc 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -41 0.455555558 0.09699031 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.1517911 0.5625 0 0 0.3030303 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -36 0.4 0.126613036 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -21 0.233333334 0.06061204 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -57 0.6333333 0.1521602 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -49 0.544444442 0.154735789 0.9375 1 0 0.373737365 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -59 0.655555546 0.09804911 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -41 0.455555558 0.184792936 0.625 0 0 0.8080808 Private Some-college Separated Sales Not-in-family White Male United-States 1 -59 0.655555546 0.246102765 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.179474711 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -42 0.466666669 0.123515449 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 -41 0.455555558 0.07597267 0.875 0 0 0.6060606 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -45 0.5 0.05119401 0.8125 0 0 0.5050505 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.105596736 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Other-relative Asian-Pac-Islander Female ? 0 -42 0.466666669 0.125889659 0.75 0 0 0.454545468 Local-gov Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 -25 0.2777778 0.01717311 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -45 0.5 0.06921981 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -58 0.644444466 0.167603 0.5625 0.1502415 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.0208229925 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.0830265954 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.141553372 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.149926081 0.5625 0 0 0.5050505 Private HS-grad Divorced Tech-support Not-in-family White Male United-States 1 -53 0.5888889 0.126669616 0.625 0 0 0.4040404 Self-emp-inc Some-college Widowed Sales Unmarried White Female United-States 0 -22 0.244444445 0.08054934 0.75 0 0.6483012 0.4040404 Private Assoc-acdm Never-married Handlers-cleaners Not-in-family Black Male ? 1 -27 0.3 0.1685951 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Protective-serv Husband White Male Guatemala 0 -60 0.6666667 0.138703644 0.5625 0 0 0.25252524 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.125393257 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -56 0.622222245 0.06628792 0.9375 1 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.2222529 0.8125 0.2782828 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -56 0.622222245 0.09944939 0.5625 0 0 0.323232323 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -35 0.3888889 0.1319764 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband Asian-Pac-Islander Male Philippines 1 -29 0.322222233 0.113302648 0.8125 0 0.399449021 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -19 0.211111113 0.102243207 0.375 0 0 0.3939394 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 -38 0.422222227 0.119319327 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -40 0.444444448 0.04976275 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -52 0.5777778 0.11834944 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.0293223243 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -32 0.355555564 0.07039042 0.5625 0 0 0.25252524 State-gov HS-grad Divorced Other-service Not-in-family White Female United-States 0 -27 0.3 0.0796319842 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -25 0.2777778 0.102408223 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female Guatemala 0 -36 0.4 0.03524404 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Other Male Iran 1 -22 0.244444445 0.147427276 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 -32 0.355555564 0.0566570461 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.127751976 0.8125 0 0 0.4040404 Private Bachelors Separated Exec-managerial Unmarried Black Female United-States 0 -22 0.244444445 0.150193483 0.5625 0 0 0.545454562 Private HS-grad Never-married Prof-specialty Own-child White Male United-States 0 -29 0.322222233 0.03194507 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -42 0.466666669 0.09765913 0.0625 0 0 0.25252524 Private Preschool Never-married Handlers-cleaners Not-in-family White Male United-States 0 -45 0.5 0.1266036 0.6875 0 0 0.3838384 Private Assoc-voc Never-married Sales Not-in-family White Female United-States 0 -33 0.366666675 0.194246 0.8125 0 0 0.454545468 Private Bachelors Divorced Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.07718099 0.625 0 0 0.4040404 Private Some-college Separated Prof-specialty Unmarried White Female United-States 0 -27 0.3 0.112976655 0.5 0 0 0.454545468 Private 12th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -53 0.5888889 0.167598277 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -30 0.333333343 0.111595236 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -52 0.5777778 0.027076086 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Widowed Craft-repair Not-in-family Black Male United-States 0 -43 0.477777779 0.0789099559 0.8125 0.1502415 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.145925954 0.875 0 0 0.353535354 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -61 0.677777767 0.08368127 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband Black Male India 0 -39 0.433333337 0.1610549 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family Black Male Dominican-Republic 0 -47 0.5222222 0.128020048 0.625 0 0 0.5050505 Private Some-college Divorced Sales Unmarried White Male United-States 0 -19 0.211111113 0.254672825 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.159620941 0.625 0.0346403457 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.0685395449 0.5625 0 0 0.5151515 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -69 0.7666667 0.02542256 0.6875 0 0 0.08080808 Self-emp-not-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.285911351 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Male United-States 0 -29 0.322222233 0.08785449 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -24 0.266666681 0.06776094 0.625 0 0 0.141414136 Private Some-college Never-married Machine-op-inspct Own-child Other Male United-States 0 -42 0.466666669 0.148700252 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Unmarried White Male Poland 0 -30 0.333333343 0.104364172 0.8125 0 0 0.727272749 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -28 0.311111122 0.129509225 0.875 0 0 0.8080808 Private Masters Married-spouse-absent Sales Not-in-family White Female United-States 1 -27 0.3 0.141957492 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Handlers-cleaners Not-in-family White Male United-States 0 -53 0.5888889 0.09933017 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family Black Female United-States 0 -35 0.3888889 0.130154476 0.5625 0 0.379017442 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.07345095 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 -25 0.2777778 0.178902879 0.5625 0 0 0.4040404 Private HS-grad Separated Protective-serv Own-child Black Male United-States 0 -38 0.422222227 0.1164238 0.8125 0 0.4331956 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife Black Female United-States 1 -27 0.3 0.0463715 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Unmarried White Female United-States 0 -30 0.333333343 0.154273748 0.3125 0 0 0.373737365 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 -27 0.3 0.07142092 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Own-child White Female United-States 0 -25 0.2777778 0.07599826 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -36 0.4 0.1383413 0.5625 0 0 0.04040404 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -32 0.355555564 0.190879673 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -70 0.7777778 0.131836966 0.375 0 0 0.454545468 Private 10th Widowed Craft-repair Unmarried White Male United-States 0 -50 0.5555556 0.0245705377 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -40 0.444444448 0.204276949 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -34 0.377777785 0.197951779 0.4375 0 0 0.5555556 Private 11th Married-spouse-absent Craft-repair Not-in-family Black Male United-States 0 -57 0.6333333 0.111754186 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.04427681 0.875 0 0 0.323232323 Private Masters Never-married Other-service Not-in-family White Female United-States 0 -49 0.544444442 0.117915682 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -43 0.477777779 0.228876442 0.625 0.05178052 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.101119079 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.2541744 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female Japan 0 -60 0.6666667 0.111909777 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.07420397 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.06363352 0.625 0.07298073 0 0.5555556 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -27 0.3 0.130829364 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Own-child White Female United-States 0 -31 0.344444454 0.07162837 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -59 0.655555546 0.14471899 0.5625 0 0 0.5050505 Private HS-grad Widowed Exec-managerial Unmarried White Female United-States 0 -19 0.211111113 0.1250208 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 -18 0.2 0.0649590343 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Female United-States 0 -22 0.244444445 0.06912619 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -24 0.266666681 0.14079161 0.75 0 0 0.2020202 Private Assoc-acdm Married-civ-spouse Sales Own-child White Female United-States 0 -53 0.5888889 0.103378117 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Transport-moving Husband White Male United-States 1 -43 0.477777779 0.0972388461 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -24 0.266666681 0.125420883 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -60 0.6666667 0.126783431 0.375 0 0 0.4040404 Private 10th Widowed Tech-support Unmarried White Female United-States 0 -24 0.266666681 0.2818102 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.08472794 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family Black Male United-States 0 -32 0.355555564 0.123461567 0.6875 0 0 1 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 -34 0.377777785 0.221988216 0.375 0 0 0.353535354 Private 10th Separated Other-service Not-in-family White Female United-States 0 -35 0.3888889 0.122967191 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 -38 0.422222227 0.300836861 0.3125 0 0 0.4040404 Private 9th Married-spouse-absent Handlers-cleaners Not-in-family White Male Mexico 0 -34 0.377777785 0.171282515 0.5625 0.04508045 0 0.909090936 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -53 0.5888889 0.08840679 0.9375 0 0 0.5050505 Local-gov Prof-school Never-married Prof-specialty Not-in-family White Female United-States 1 -23 0.25555557 0.06979973 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.162924618 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -40 0.444444448 0.1649789 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.01400615 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -17 0.188888893 0.233933344 0.375 0 0 0.2020202 Private 10th Never-married Sales Own-child White Female United-States 0 -53 0.5888889 0.07004422 0.8125 0 0.430670351 0.545454562 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -32 0.355555564 0.0358360745 0.8125 0 0 0.5050505 Private Bachelors Divorced Craft-repair Not-in-family White Male United-States 1 -43 0.477777779 0.261222929 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Other-relative White Female United-States 0 -18 0.2 0.0384642072 0.4375 0 0 0.161616161 Private 11th Never-married Sales Own-child White Male United-States 0 -62 0.6888889 0.119748369 0.375 0 0 0.4040404 Private 10th Divorced Other-service Own-child White Female United-States 0 -45 0.5 0.022761425 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Other-service Husband White Male United-States 0 -46 0.51111114 0.168339849 1 0 0 0.7070707 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -73 0.811111152 0.162403315 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -64 0.7111111 0.06640107 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.122529395 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -23 0.25555557 0.2926285 0.5625 0 0 0.4848485 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -30 0.333333343 0.07635456 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male Vietnam 0 -51 0.566666663 0.1681856 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -35 0.3888889 0.06429224 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -39 0.433333337 0.141352668 0.625 0.135501355 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 1 -35 0.3888889 0.0536039174 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -41 0.455555558 0.195102066 0.5625 0 0 0.4040404 Private HS-grad Widowed Machine-op-inspct Not-in-family White Female United-States 0 -31 0.344444454 0.233828276 0.625 0.046500463 0 0.4040404 Private Some-college Divorced Craft-repair Own-child White Male United-States 0 -40 0.444444448 0.03625973 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -46 0.51111114 0.0100208465 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 -31 0.344444454 0.17924504 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -41 0.455555558 0.0987798944 0.625 0 0 0.4040404 Self-emp-inc Some-college Divorced Machine-op-inspct Not-in-family White Female Honduras 0 -42 0.466666669 0.0843804 0.8125 0.031370312 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.11688181 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -21 0.233333334 0.052310057 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Male United-States 0 -49 0.544444442 0.188943267 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -53 0.5888889 0.3230413 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Not-in-family Black Male United-States 0 -38 0.422222227 0.131090015 0.8125 0.04787048 0 0.434343427 Local-gov Bachelors Never-married Protective-serv Not-in-family White Female United-States 1 -36 0.4 0.166767135 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Unmarried Asian-Pac-Islander Female Taiwan 0 -32 0.355555564 0.174045354 0.625 0 0 0.727272749 Private Some-college Never-married Craft-repair Unmarried White Male Mexico 0 -20 0.222222224 0.0725706443 0.4375 0 0 0.4040404 Private 11th Never-married Transport-moving Other-relative White Male Guatemala 0 -17 0.188888893 0.03193025 0.4375 0 0 0.1010101 ? 11th Never-married ? Own-child White Male United-States 0 -22 0.244444445 0.154904172 0.625 0 0 0.323232323 Private Some-college Never-married Tech-support Other-relative Asian-Pac-Islander Female United-States 0 -25 0.2777778 0.210370421 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Unmarried Amer-Indian-Eskimo Male United-States 0 -58 0.644444466 0.151810631 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.251711965 0.625 0 0 0.2020202 Private Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 -48 0.533333361 0.080912374 0.5625 0.0861408561 0 0.4040404 State-gov HS-grad Divorced Craft-repair Own-child White Male United-States 1 -20 0.222222224 0.3184397 0.125 0 0 0.3030303 Private 1st-4th Never-married Farming-fishing Not-in-family White Male El-Salvador 0 -60 0.6666667 0.0187821835 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.09318484 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 -52 0.5777778 0.08285215 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.206483454 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Wife White Female United-States 1 -46 0.51111114 0.126455426 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 -22 0.244444445 0.175519049 0.4375 0 0 0.25252524 Private 11th Never-married Sales Unmarried White Female United-States 0 -19 0.211111113 0.159546182 0.625 0 0 0.353535354 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -37 0.411111116 0.125821635 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Male United-States 0 -30 0.333333343 0.251371831 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Not-in-family White Female United-States 1 -44 0.4888889 0.1263746 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 -63 0.7 0.07183111 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -22 0.244444445 0.205954045 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Male Canada 0 -31 0.344444454 0.172668651 0.8125 0.03908039 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -17 0.188888893 0.161612585 0.4375 0 0 0.4040404 Private 11th Never-married Adm-clerical Own-child White Male United-States 0 -21 0.233333334 0.23509115 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -67 0.7444445 0.07089085 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.123064853 0.25 0 0 0.4040404 Private 7th-8th Divorced Exec-managerial Not-in-family White Male United-States 0 -29 0.322222233 0.11194817 0.5625 0 0 0.5050505 Private HS-grad Divorced Handlers-cleaners Own-child White Male United-States 0 -20 0.222222224 0.0762441 0.625 0 0 0.0606060624 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 -27 0.3 0.09569241 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Male United-States 0 -35 0.3888889 0.306352437 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.0957894 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -36 0.4 0.07578071 0.5 0 0 0.4040404 Private 12th Separated Other-service Unmarried White Female Mexico 0 -43 0.477777779 0.143391445 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.178622022 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -28 0.311111122 0.169666708 0.9375 0 0.5369605 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Male Canada 0 -18 0.2 0.114923172 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Female United-States 0 -59 0.655555546 0.23845613 0.9375 0.1502415 0 0.5050505 Private Prof-school Married-civ-spouse Transport-moving Husband Black Male United-States 1 -37 0.411111116 0.174505383 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -27 0.3 0.01472077 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 -46 0.51111114 0.1400588 0.875 0 0 0.434343427 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -29 0.322222233 0.05186822 0.4375 0 0.6322314 0.424242437 Private 11th Separated Sales Not-in-family White Female United-States 0 -33 0.366666675 0.0246102773 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -62 0.6888889 0.119088307 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.3071735 1 0 0.5544077 0.5555556 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.1870715 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -22 0.244444445 0.194066837 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 -46 0.51111114 0.231975377 0.875 0 0.4331956 0.4040404 Federal-gov Masters Married-civ-spouse Armed-Forces Husband White Male United-States 1 -54 0.6 0.1393974 0.625 0 0.453856736 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -34 0.377777785 0.133421123 0.5625 0 0 0.727272749 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -67 0.7444445 0.101207986 1 0 0 0.2020202 ? Doctorate Married-civ-spouse ? Husband White Male Canada 1 -62 0.6888889 0.396364272 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.07635456 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male Poland 0 -19 0.211111113 0.182225436 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -49 0.544444442 0.02120152 0.25 0 0 1 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -27 0.3 0.128325164 0.6875 0 0 0.454545468 Private Assoc-voc Never-married Machine-op-inspct Unmarried White Male United-States 0 -36 0.4 0.103095233 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -52 0.5777778 0.101294875 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -47 0.5222222 0.0672935 0.5 0 0 0.5555556 Private 12th Married-spouse-absent Exec-managerial Not-in-family White Female United-States 0 -57 0.6333333 0.2313234 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Protective-serv Not-in-family White Female United-States 0 -64 0.7111111 0.11415197 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Exec-managerial Unmarried White Female United-States 0 -56 0.622222245 0.022128975 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Male United-States 0 -53 0.5888889 0.131003127 0.4375 0 0 0.474747479 Private 11th Widowed Other-service Own-child White Female United-States 0 -53 0.5888889 0.119690448 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.08350682 0.625 0 0 0.4040404 Private Some-college Separated Sales Unmarried Asian-Pac-Islander Male South 0 -41 0.455555558 0.09360445 0.8125 0.07688077 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.1585709 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Other-service Unmarried Black Female United-States 0 -63 0.7 0.0559323244 0.8125 0 0.500229537 0.454545468 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -45 0.5 0.08769823 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Other-relative White Female United-States 0 -23 0.25555557 0.141477942 0.625 0 0 0.282828271 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -39 0.433333337 0.167974114 0.875 0 0 0.727272749 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -31 0.344444454 0.0588790365 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.128232211 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -54 0.6 0.118703716 0.875 0.07688077 0 0.6060606 Private Masters Married-civ-spouse Transport-moving Husband White Male United-States 1 -22 0.244444445 0.142124534 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female Mexico 0 -40 0.444444448 0.0713017061 0.8125 0.0545505434 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -55 0.6111111 0.124735221 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.116854869 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.05296271 0.4375 0 0 0.6060606 Self-emp-inc 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.09920085 1 0 0.453856736 1 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.05561509 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Widowed Other-service Other-relative White Female United-States 0 -38 0.422222227 0.104156047 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.0264268 0.625 0.005940059 0 0.25252524 Local-gov Some-college Never-married Prof-specialty Own-child White Female United-States 0 -17 0.188888893 0.0436349325 0.375 0 0 0.3030303 ? 10th Never-married ? Own-child White Male United-States 0 -48 0.533333361 0.120789655 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male England 0 -73 0.811111152 0.11655312 0.8125 0 0 0.151515156 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -25 0.2777778 0.177821189 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -53 0.5888889 0.1534554 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Farming-fishing Not-in-family White Male United-States 0 -46 0.51111114 0.216424823 0.625 0.07298073 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -45 0.5 0.07280908 0.8125 1 0 0.25252524 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female ? 1 -37 0.411111116 0.0986041054 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 -30 0.333333343 0.218306 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -29 0.322222233 0.247408748 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -29 0.322222233 0.203125879 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -75 0.8333334 0.150056079 0.8125 0 0 0.0606060624 ? Bachelors Widowed ? Not-in-family White Female United-States 0 -58 0.644444466 0.114573605 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.05542987 0.25 0 0 0.5050505 Self-emp-not-inc 7th-8th Married-civ-spouse Other-service Wife Black Female United-States 0 -62 0.6888889 0.121345319 0.3125 0 0 0.24242425 Local-gov 9th Divorced Protective-serv Not-in-family Black Male United-States 0 -45 0.5 0.234505847 0.8125 0.07298073 0 0.4040404 Local-gov Bachelors Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male United-States 1 -38 0.422222227 0.545283437 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.0456171446 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -70 0.7777778 0.109824516 0.5625 0.0200902 0 0.4040404 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -42 0.466666669 0.06874699 0.25 0 0 0.3030303 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 -47 0.5222222 0.100828111 0.875 0.1502415 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.07359914 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Unmarried White Male United-States 0 -43 0.477777779 0.2649375 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 1 -37 0.411111116 0.152856633 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.0584661625 0.625 0.07298073 0 0.3939394 State-gov Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -27 0.3 0.332516581 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family Black Female France 0 -54 0.6 0.201605037 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Machine-op-inspct Unmarried White Male Mexico 0 -48 0.533333361 0.237765759 0.5625 0 0.43663913 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.117477208 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -29 0.322222233 0.141086623 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.198778212 0.625 0 0 0.474747479 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -55 0.6111111 0.12276715 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -67 0.7444445 0.153700575 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Priv-house-serv Wife Black Female United-States 0 -51 0.566666663 0.17770265 0.5625 0 0 0.3030303 Private HS-grad Widowed Handlers-cleaners Not-in-family White Male United-States 0 -35 0.3888889 0.120527647 0.875 0 0 0.323232323 Private Masters Never-married Prof-specialty Unmarried White Female United-States 0 -41 0.455555558 0.0295984726 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male ? 0 -64 0.7111111 0.170603588 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Widowed Other-service Other-relative White Female United-States 0 -23 0.25555557 0.161740556 0.1875 0 0 0.5555556 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 -49 0.544444442 0.0166443847 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Not-in-family Asian-Pac-Islander Female Philippines 0 -38 0.422222227 0.230776489 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -62 0.6888889 0.0777171254 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative Black Female United-States 0 -62 0.6888889 0.123255461 0.25 0 0 0.1010101 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -70 0.7777778 0.08974712 0.5625 0 0 0.141414136 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -45 0.5 0.1662896 0.875 0 0 0.4040404 Self-emp-not-inc Masters Divorced Craft-repair Not-in-family White Male United-States 0 -20 0.222222224 0.0202296078 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 -38 0.422222227 0.118024796 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -50 0.5555556 0.09464237 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -40 0.444444448 0.04376627 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -30 0.333333343 0.104923874 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.1293624 0.625 0 0 0.4040404 Federal-gov Some-college Separated Exec-managerial Not-in-family White Female United-States 0 -28 0.311111122 0.15349178 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 1 -62 0.6888889 0.109280296 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.111772373 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -40 0.444444448 0.299980134 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.142754287 0.5625 0 0.365013778 0.4040404 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -53 0.5888889 0.110242777 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.0602227375 0.5 0 0 0.4040404 Private 12th Never-married Farming-fishing Own-child White Male United-States 0 -26 0.2888889 0.195122942 0.625 0 0 0.25252524 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -51 0.566666663 0.110342458 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -49 0.544444442 0.124863192 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.113848209 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -42 0.466666669 0.03678239 0.625 0 0 0.4040404 Private Some-college Divorced Farming-fishing Not-in-family White Male United-States 0 -31 0.344444454 0.0879770741 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Sales Own-child Asian-Pac-Islander Female India 0 -26 0.2888889 0.221365869 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Other Male United-States 0 -50 0.5555556 0.114262432 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Unmarried Asian-Pac-Islander Female Philippines 0 -35 0.3888889 0.125826344 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.06999707 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Other-relative White Female United-States 0 -53 0.5888889 0.101294875 0.5625 0 0.3452709 0.353535354 ? HS-grad Never-married ? Not-in-family White Male United-States 0 -20 0.222222224 0.055753164 0.625 0 0 0.161616161 Private Some-college Never-married Sales Own-child White Male United-States 0 -31 0.344444454 0.120191559 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.0348028727 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -46 0.51111114 0.256052226 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband Black Male United-States 1 -21 0.233333334 0.14286609 0.625 0 0 0.08080808 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -41 0.455555558 0.0678922758 0.875 0.07298073 0 0.7070707 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.109497845 0.8125 0 0 0.7070707 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -66 0.733333349 0.121203206 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.128482759 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -74 0.822222233 0.15896222 0.25 0 0 0.2020202 State-gov 7th-8th Widowed Handlers-cleaners Not-in-family White Female United-States 0 -46 0.51111114 0.110475145 0.625 0 0 0.7070707 State-gov Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 1 -51 0.566666663 0.115878917 0.875 0 0.453856736 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.123206973 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.101704381 0.1875 0.0346403457 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -47 0.5222222 0.24438189 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.06592757 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -53 0.5888889 0.0619052276 0.5625 0 0 0.4848485 Private HS-grad Divorced Craft-repair Unmarried Black Female United-States 0 -24 0.266666681 0.187330142 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Machine-op-inspct Not-in-family White Male United-States 0 -54 0.6 0.09854483 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.255547076 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -45 0.5 0.0255855545 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.173037067 0.5625 0.0332503319 0 0.454545468 Self-emp-inc HS-grad Married-spouse-absent Farming-fishing Not-in-family White Male United-States 0 -37 0.411111116 0.325268 0.625 0 0 0.656565666 State-gov Some-college Divorced Other-service Not-in-family White Male United-States 0 -48 0.533333361 0.0299278311 0.875 0 0 0.616161644 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.172070548 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.204534918 0.5625 0.03103031 0 0.2020202 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -44 0.4888889 0.131667912 0.5 0 0 0.363636374 ? 12th Separated ? Not-in-family White Female Puerto-Rico 0 -58 0.644444466 0.0770267546 0.625 0 0 0.3030303 ? Some-college Married-civ-spouse ? Husband Black Male United-States 0 -27 0.3 0.230014727 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -69 0.7666667 0.13274017 0.5625 0 0 0.08080808 Private HS-grad Widowed Adm-clerical Unmarried White Male United-States 0 -38 0.422222227 0.06933701 0.8125 0 0 0.5252525 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.339093626 0.5 0 0 0.4040404 Private 12th Never-married Adm-clerical Other-relative Black Female United-States 0 -30 0.333333343 0.0589753538 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -46 0.51111114 0.182321072 0.5625 0.0367403664 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -27 0.3 0.170278281 0.9375 0 0 0.454545468 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 -19 0.211111113 0.386791319 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 -18 0.2 0.123941123 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Priv-house-serv Not-in-family White Female United-States 0 -24 0.266666681 0.158328429 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 1 -32 0.355555564 0.106581442 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.201932371 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -19 0.211111113 0.187037155 0.0625 0 0 0.363636374 Private Preschool Never-married Farming-fishing Not-in-family White Male Hong 0 -28 0.311111122 0.0157095175 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -39 0.433333337 0.2132289 0.875 0 0 0.5555556 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.11898458 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Separated Sales Not-in-family Asian-Pac-Islander Male Japan 0 -42 0.466666669 0.06315733 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 1 -31 0.344444454 0.08390152 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -46 0.51111114 0.07901435 0.3125 0 0 0.4040404 Private 9th Separated Machine-op-inspct Not-in-family White Female Ireland 0 -53 0.5888889 0.03624424 0.625 0 0 0.545454562 Private Some-college Widowed Exec-managerial Not-in-family White Female United-States 0 -21 0.233333334 0.114807993 0.75 0 0 0.151515156 Private Assoc-acdm Never-married Handlers-cleaners Own-child White Male United-States 0 -48 0.533333361 0.07811047 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.0211705361 0.5625 0.03103031 0 0.5252525 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -30 0.333333343 0.07569382 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.190672219 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative Black Male Jamaica 0 -32 0.355555564 0.018324852 0.375 0 0 0.5050505 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.0314621441 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -57 0.6333333 0.0131473932 1 0 0 0.5050505 State-gov Doctorate Divorced Prof-specialty Unmarried White Female United-States 0 -56 0.622222245 0.0664307 0.25 0 0 0.4040404 Private 7th-8th Never-married Adm-clerical Not-in-family White Male United-States 0 -27 0.3 0.107696146 0.5625 0 0 0.373737365 Private HS-grad Never-married Exec-managerial Not-in-family Black Female United-States 0 -38 0.422222227 0.09202434 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male Iran 0 -19 0.211111113 0.274639755 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -61 0.677777767 0.149446532 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -49 0.544444442 0.100003034 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Unmarried White Female United-States 0 -28 0.311111122 0.185197741 0.5625 0 0 0.3838384 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.107837588 0.875 0 0 0.5555556 Self-emp-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.112658747 0.8125 0 0 0.8484849 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.09983532 0.5625 0 0 0.4848485 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -28 0.311111122 0.103636079 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.140688553 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.1730667 0.5625 0 0 0.444444448 Private HS-grad Widowed Machine-op-inspct Unmarried Black Female United-States 0 -26 0.2888889 0.06745246 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -51 0.566666663 0.112117223 1 0 0 0.4040404 Local-gov Doctorate Married-civ-spouse Prof-specialty Wife Black Female United-States 1 -35 0.3888889 0.115394644 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.200265378 0.75 0 0 0.3131313 Private Assoc-acdm Married-spouse-absent Exec-managerial Unmarried Asian-Pac-Islander Female Laos 0 -63 0.7 0.08969189 1 0 0 0.121212125 ? Doctorate Married-civ-spouse ? Husband White Male United-States 0 -31 0.344444454 0.114224039 0.875 0 0 0.3030303 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -22 0.244444445 0.1843693 0.5625 0 0 0.2020202 Local-gov HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -67 0.7444445 0.106621183 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -50 0.5555556 0.173177168 0.3125 0 0 0.5050505 ? 9th Married-civ-spouse ? Husband White Male United-States 0 -63 0.7 0.132501066 0.5625 0 0 0.24242425 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -31 0.344444454 0.09257328 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -17 0.188888893 0.193277463 0.4375 0 0 0.4040404 Private 11th Never-married Prof-specialty Own-child White Male United-States 0 -41 0.455555558 0.135673419 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -53 0.5888889 0.1461105 0.25 0 0 0.3838384 Local-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -44 0.4888889 0.143237218 0.625 0 0 1 Local-gov Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 0 -24 0.266666681 0.311725229 0.8125 0 0 0.4040404 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 -35 0.3888889 0.133926272 0.6875 0 0 0.353535354 Private Assoc-voc Divorced Tech-support Own-child White Male United-States 0 -61 0.677777767 0.148100808 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 1 -31 0.344444454 0.109788142 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Other-relative Asian-Pac-Islander Female Philippines 0 -44 0.4888889 0.07561233 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -56 0.622222245 0.143533573 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -66 0.733333349 0.20345591 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -45 0.5 0.227725372 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Vietnam 0 -69 0.7666667 0.0392084643 0.8125 0.200512 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -64 0.7111111 0.0846525058 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.14509213 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -43 0.477777779 0.278681636 0.625 0 0 0.4040404 Local-gov Some-college Separated Craft-repair Not-in-family Black Male United-States 0 -37 0.411111116 0.138302892 0.5625 0 0 0.4949495 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -19 0.211111113 0.159338057 0.5625 0 0 0.161616161 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -59 0.655555546 0.166734815 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -50 0.5555556 0.123935059 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -33 0.366666675 0.229801208 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.148303539 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -28 0.311111122 0.1335336 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -27 0.3 0.11842151 0.5625 0 0 0.343434334 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -42 0.466666669 0.06215915 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband Asian-Pac-Islander Male ? 0 -34 0.377777785 0.176074043 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -19 0.211111113 0.136942357 0.4375 0 0 0.3030303 Private 11th Never-married Sales Own-child White Male United-States 0 -68 0.75555557 0.11186263 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.073415935 0.875 0 0 0.3838384 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -81 0.900000036 0.07190991 0.625 0 0 0.04040404 ? Some-college Widowed ? Unmarried White Female United-States 0 -22 0.244444445 0.132946953 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -58 0.644444466 0.191845521 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.05895784 0.625 0 0 0.25252524 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 -17 0.188888893 0.1182639 0.4375 0 0 0.3030303 Local-gov 11th Never-married Protective-serv Own-child White Male United-States 0 -25 0.2777778 0.163466826 0.625 0.105201051 0 0.5050505 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 1 -23 0.25555557 0.108761005 0.625 0 0 0.232323229 Private Some-college Never-married Other-service Own-child Asian-Pac-Islander Female United-States 0 -25 0.2777778 0.03468568 0.5 0 0 0.4040404 Private 12th Never-married Other-service Other-relative White Male United-States 0 -47 0.5222222 0.1482611 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -39 0.433333337 0.126963273 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -44 0.4888889 0.07632762 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.140682489 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.02302141 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -23 0.25555557 0.196687564 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -34 0.377777785 0.09504784 0.8125 0 0 0.353535354 Private Bachelors Married-spouse-absent Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.234788731 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 -38 0.422222227 0.124740608 0.5625 0 0 0.2020202 Private HS-grad Widowed Other-service Unmarried White Female United-States 0 -52 0.5777778 0.111320436 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -50 0.5555556 0.07875841 0.5625 0 0 0.333333343 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -38 0.422222227 0.16003719 0.8125 0 0.5610652 0.454545468 Private Bachelors Never-married Sales Not-in-family White Female United-States 1 -35 0.3888889 0.057106968 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 -67 0.7444445 0.146757782 1 0.106051058 0 0.353535354 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -60 0.6666667 0.219552711 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -44 0.4888889 0.139339462 0.5625 0 0 0.151515156 Private HS-grad Never-married Sales Other-relative White Female United-States 0 -38 0.422222227 0.08605885 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Farming-fishing Own-child White Male United-States 0 -29 0.322222233 0.1404838 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -65 0.722222269 0.231798247 0.875 0.0555605553 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.0274000559 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.06405852 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 -18 0.2 0.1889958 0.4375 0 0 0.3030303 Private 11th Never-married Sales Own-child White Female United-States 0 -43 0.477777779 0.126918152 0.9375 0 0 0.4040404 Private Prof-school Divorced Exec-managerial Not-in-family White Male United-States 0 -42 0.466666669 0.0904018 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Own-child Amer-Indian-Eskimo Female United-States 0 -42 0.466666669 0.119881727 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.110587627 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -36 0.4 0.0612222627 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 -41 0.455555558 0.0223115031 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -30 0.333333343 0.182451069 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -21 0.233333334 0.145570338 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -33 0.366666675 0.127545878 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 1 -19 0.211111113 0.0952499 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child White Male United-States 0 -19 0.211111113 0.2062531 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -35 0.3888889 0.2227136 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -43 0.477777779 0.129160345 0.5625 0 0 0.353535354 Private HS-grad Divorced Tech-support Unmarried Black Female United-States 0 -45 0.5 0.194889218 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -25 0.2777778 0.0357963368 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Own-child Black Male United-States 0 -39 0.433333337 0.0824089646 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.127141088 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -60 0.6666667 0.1613627 0.875 0 0 0.1010101 Private Masters Married-civ-spouse Transport-moving Husband White Male United-States 0 -52 0.5777778 0.104492813 1 0 0 0.4040404 Local-gov Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 -22 0.244444445 0.0434564464 0.5 0 0 0.3030303 Private 12th Never-married Transport-moving Unmarried White Male United-States 0 -23 0.25555557 0.322619 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -46 0.51111114 0.104838334 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -34 0.377777785 0.0835533 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.165051654 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.123650827 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 -56 0.622222245 0.217982024 0.875 0 0 0.25252524 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -55 0.6111111 0.125810176 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -40 0.444444448 0.191487879 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -23 0.25555557 0.125725985 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -39 0.433333337 0.134809941 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Not-in-family White Male United-States 0 -24 0.266666681 0.121863268 0.8125 0 0 0.3030303 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 0 -51 0.566666663 0.12337333 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.080912374 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Cuba 1 -25 0.2777778 0.177341625 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -34 0.377777785 0.15251717 0.9375 0 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.272692561 0.4375 0 0.3677686 0.2020202 Private 11th Never-married Sales Own-child Black Female United-States 0 -19 0.211111113 0.140435979 0.625 0 0 0.282828271 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -32 0.355555564 0.0314850435 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 -49 0.544444442 0.165812746 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.111341313 0.25 0 0 0.08080808 ? 7th-8th Separated ? Not-in-family White Female United-States 0 -43 0.477777779 0.08267569 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -71 0.788888931 0.026147956 0.875 1 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -59 0.655555546 0.113128871 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Male United-States 0 -32 0.355555564 0.184037238 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -25 0.2777778 0.080984436 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -32 0.355555564 0.113147058 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male Ireland 0 -17 0.188888893 0.151886746 0.4375 0 0 0.151515156 Private 11th Never-married Handlers-cleaners Not-in-family Black Female United-States 0 -57 0.6333333 0.0841918141 0.9375 0 0 0.353535354 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.117275827 0.5 0 0 0.151515156 Self-emp-not-inc 12th Never-married Handlers-cleaners Own-child White Male United-States 0 -27 0.3 0.155558854 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child Asian-Pac-Islander Female Philippines 0 -41 0.455555558 0.08899074 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -62 0.6888889 0.0461108461 1 0 0 0.4040404 ? Doctorate Married-civ-spouse ? Husband Amer-Indian-Eskimo Male United-States 1 -19 0.211111113 0.153012216 0.4375 0 0 0.25252524 Private 11th Never-married Sales Not-in-family White Female United-States 0 -41 0.455555558 0.111670673 0.1875 0 0 0.4040404 Private 5th-6th Divorced Other-service Unmarried White Female Puerto-Rico 0 -39 0.433333337 0.0872718841 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -30 0.333333343 0.151125655 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -37 0.411111116 0.120886646 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -18 0.2 0.292494476 0.4375 0 0 0.151515156 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.117003717 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.164883256 0.625 0 0.3409091 0.6060606 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male Cuba 1 -24 0.266666681 0.07693785 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Other-relative White Male United-States 0 -33 0.366666675 0.1270697 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.1455461 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -51 0.566666663 0.08416689 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -48 0.533333361 0.057480108 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.130322188 0.25 0 0 0.454545468 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.0539218225 0.9375 0 0 0.5050505 Private Prof-school Never-married Exec-managerial Own-child White Male United-States 0 -41 0.455555558 0.09423219 0.6875 0 0 0.3030303 Private Assoc-voc Separated Craft-repair Not-in-family White Male United-States 0 -51 0.566666663 0.0366012119 0.9375 0.2782828 0 0.6060606 Self-emp-inc Prof-school Divorced Prof-specialty Not-in-family White Male United-States 1 -25 0.2777778 0.127141088 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -20 0.222222224 0.07895306 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -61 0.677777767 0.115734108 0.5625 0.0282902829 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.1260311 0.625 0 0 0.7070707 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -42 0.466666669 0.0655194148 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -26 0.2888889 0.148015946 0.5625 0 0 0.161616161 Local-gov HS-grad Never-married Other-service Other-relative White Male United-States 0 -46 0.51111114 0.04263406 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -39 0.433333337 0.115499042 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -18 0.2 0.232195631 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 -29 0.322222233 0.142027542 0.625 0 0 0.8080808 Private Some-college Never-married Sales Own-child Black Male United-States 0 -39 0.433333337 0.0258044526 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Craft-repair Unmarried White Male United-States 1 -47 0.5222222 0.0807830542 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -40 0.444444448 0.05654524 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -43 0.477777779 0.06828494 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -32 0.355555564 0.137652934 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -31 0.344444454 0.119101778 0.375 0 0 0.4040404 Private 10th Divorced Sales Other-relative White Female United-States 0 -19 0.211111113 0.04087546 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Male United-States 0 -44 0.4888889 0.169262588 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 -46 0.51111114 0.135344729 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -53 0.5888889 0.0314567536 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.0806362256 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.03969139 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -35 0.3888889 0.166868165 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Unmarried Black Male United-States 0 -48 0.533333361 0.04561512 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -28 0.311111122 0.135228887 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Wife White Female United-States 0 -44 0.4888889 0.123621866 0.8125 0 0 0.323232323 Private Bachelors Widowed Prof-specialty Unmarried White Female United-States 0 -20 0.222222224 0.0169319827 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -51 0.566666663 0.08306364 0.9375 0 0 0.4040404 Local-gov Prof-school Widowed Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.181710169 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Unmarried White Male United-States 0 -36 0.4 0.0344102047 0.8125 0 0 0.6060606 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.09226412 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -21 0.233333334 0.08712169 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -34 0.377777785 0.02397446 0.8125 0 0 0.3030303 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -36 0.4 0.04128699 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.129534826 0.75 0 0 0.8080808 ? Assoc-acdm Never-married ? Own-child White Female United-States 0 -31 0.344444454 0.173532113 0.5625 0 0 0.434343427 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -44 0.4888889 0.0477428176 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -49 0.544444442 0.107580967 0.4375 0 0 0.4040404 Local-gov 11th Divorced Handlers-cleaners Unmarried White Male United-States 0 -40 0.444444448 0.117461048 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -64 0.7111111 0.118228205 1 0 0 0.4040404 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 1 -54 0.6 0.116555139 0.875 0.07688077 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.0219026674 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband Asian-Pac-Islander Male South 0 -18 0.2 0.217550963 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -68 0.75555557 0.100271776 0.3125 0 0 0.444444448 Private 9th Married-civ-spouse Craft-repair Husband Black Male United-States 0 -64 0.7111111 0.0294590518 1 0 0 0.8080808 Private Doctorate Widowed Prof-specialty Not-in-family White Male United-States 1 -36 0.4 0.131598532 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -21 0.233333334 0.100901529 0.5625 0 0 0.24242425 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -22 0.244444445 0.03501369 0.625 0 0 0.3030303 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -61 0.677777767 0.07097976 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -24 0.266666681 0.09267228 0.625 0 0 0.1010101 Private Some-college Never-married Sales Own-child White Male Greece 0 -49 0.544444442 0.218757942 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.124134429 0.625 0 0 0.3030303 Private Some-college Separated Priv-house-serv Other-relative White Female El-Salvador 0 -66 0.733333349 0.211723551 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 -29 0.322222233 0.184555188 0.625 0 0 0.454545468 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -22 0.244444445 0.216225445 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child Black Female United-States 0 -57 0.6333333 0.211442009 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 -41 0.455555558 0.2658232 0.8125 0 0.3996786 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -29 0.322222233 0.10301777 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.166440472 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -47 0.5222222 0.118513778 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.07344153 0.5625 0 0 0.5555556 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -59 0.655555546 0.09518793 0.6875 0 0 0.5050505 Self-emp-inc Assoc-voc Divorced Prof-specialty Not-in-family White Male United-States 1 -42 0.466666669 0.0500665121 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Adm-clerical Husband Amer-Indian-Eskimo Male United-States 1 -64 0.7111111 0.0319672935 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -29 0.322222233 0.122814976 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-spouse-absent Other-service Unmarried Black Male United-States 0 -25 0.2777778 0.199306935 0.625 0 0 0.2020202 State-gov Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -62 0.6888889 0.209802628 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -44 0.4888889 0.1594566 0.875 0.105201051 0 0.454545468 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 1 -21 0.233333334 0.126384035 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female United-States 0 -60 0.6666667 0.1905584 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.3378927 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Unmarried Black Male United-States 0 -44 0.4888889 0.0199305583 0.8125 0 0.518365443 0.4040404 Federal-gov Bachelors Divorced Tech-support Not-in-family White Male United-States 1 -21 0.233333334 0.20310837 0.5625 0 0 0.1919192 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -18 0.2 0.1261126 0.4375 0 0 0.181818187 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -39 0.433333337 0.147829369 0.8125 0.0501305 0 0.323232323 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -33 0.366666675 0.400205433 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -63 0.7 0.135026157 0.125 0 0 0.4040404 Private 1st-4th Divorced Transport-moving Not-in-family White Male United-States 0 -52 0.5777778 0.1029127 0.5625 0 0 0.5252525 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -17 0.188888893 0.155444354 0.3125 0 0 0.222222224 Private 9th Never-married Sales Own-child Black Male United-States 0 -45 0.5 0.209624812 0.9375 0 0.3409091 0.5050505 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.07724834 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -35 0.3888889 0.131063744 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -31 0.344444454 0.07724834 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -51 0.566666663 0.0282998979 0.625 0 0 0.4040404 State-gov Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -48 0.533333361 0.258222342 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.01983155 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Amer-Indian-Eskimo Male United-States 0 -42 0.466666669 0.0361869857 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male ? 0 -38 0.422222227 0.186583877 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female Columbia 0 -43 0.477777779 0.07632762 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.230826333 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -24 0.266666681 0.1206994 0.5 0 0 0.5555556 Private 12th Never-married Sales Other-relative White Male United-States 0 -46 0.51111114 0.169376418 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.0631303862 0.375 0 0 0.6060606 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -22 0.244444445 0.0255229156 0.5625 0 0 0.353535354 Private HS-grad Separated Other-service Other-relative White Male United-States 0 -18 0.2 0.183819681 0.5625 0 0 0.151515156 State-gov HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 -53 0.5888889 0.10198053 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.1418787 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.234047174 1 0 0 0.353535354 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -32 0.355555564 0.172347367 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.2403427 0.5625 0 0 0.121212125 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -46 0.51111114 0.145593911 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -26 0.2888889 0.194503963 0.8125 0 0 0.424242437 Local-gov Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -19 0.211111113 0.296206325 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Male United-States 0 -24 0.266666681 0.10886877 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Not-in-family White Female Ecuador 0 -28 0.311111122 0.128325164 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Own-child White Male United-States 0 -25 0.2777778 0.18606323 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Own-child White Female United-States 0 -44 0.4888889 0.09918806 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.165076569 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Nicaragua 0 -42 0.466666669 0.1479634 0.875 0 0 0.454545468 State-gov Masters Divorced Exec-managerial Not-in-family White Male United-States 0 -28 0.311111122 0.264092863 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Own-child White Male United-States 0 -36 0.4 0.2415847 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Other-relative White Male ? 0 -47 0.5222222 0.176630378 0.8125 0 0 0.6060606 Private Bachelors Never-married Sales Not-in-family Black Male United-States 1 -46 0.51111114 0.115327962 0.5625 0.03411034 0 0.353535354 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Guatemala 0 -21 0.233333334 0.147130236 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Own-child White Female Mexico 0 -19 0.211111113 0.122993462 0.5625 0 0 0.25252524 ? HS-grad Never-married ? Own-child Black Female United-States 0 -35 0.3888889 0.3431402 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -26 0.2888889 0.143636614 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.0797471553 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -67 0.7444445 0.03085731 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -54 0.6 0.222086549 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Unmarried White Male United-States 1 -26 0.2888889 0.0201770719 0.875 0 0 0.25252524 Private Masters Never-married Tech-support Other-relative White Male United-States 0 -51 0.566666663 0.145385116 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -27 0.3 0.2207617 0.625 0 0 0.454545468 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -27 0.3 0.2732967 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male ? 1 -39 0.433333337 0.05434076 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Own-child White Female United-States 0 -32 0.355555564 0.119749047 0.8125 0 0 0.4848485 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 -52 0.5777778 0.184221119 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.1363052 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -27 0.3 0.224142179 0.5625 0 0 0.3838384 Local-gov HS-grad Never-married Protective-serv Own-child White Male United-States 0 -46 0.51111114 0.1007877 0.25 0 0 0.454545468 Private 7th-8th Married-spouse-absent Transport-moving Not-in-family White Male United-States 0 -42 0.466666669 0.0270430837 0.6875 0 0 0.3030303 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -79 0.8777778 0.123718858 0.8125 0 0 0.2020202 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.022092605 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Wife Amer-Indian-Eskimo Female United-States 1 -19 0.211111113 0.131529167 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Own-child Black Female United-States 0 -43 0.477777779 0.09027113 0.625 0.0217402168 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Other-relative White Male United-States 0 -51 0.566666663 0.0651159659 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -45 0.5 0.117553994 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -65 0.722222269 0.121779747 0.5625 0.009910099 0 0.2020202 Private HS-grad Separated Protective-serv Not-in-family White Male United-States 0 -66 0.733333349 0.125495642 0.8125 0 0 0.05050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.173266754 0.6875 0 0 1 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -26 0.2888889 0.143328145 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Prof-specialty Own-child White Female United-States 0 -28 0.311111122 0.03728687 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family Black Male United-States 0 -39 0.433333337 0.131509632 0.9375 0 0 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.0304141231 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.2933034 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female Mexico 0 -29 0.322222233 0.155779764 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Unmarried White Male United-States 0 -32 0.355555564 0.113728993 0.8125 0 0.4242424 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -44 0.4888889 0.124642268 0.8125 0.0332503319 0 0.4040404 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -18 0.2 0.0617429055 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Female United-States 0 -60 0.6666667 0.111481406 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -34 0.377777785 0.0492764562 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -60 0.6666667 0.120422579 0.5625 0 0 0.4040404 Private HS-grad Widowed Handlers-cleaners Not-in-family White Female United-States 0 -38 0.422222227 0.0221572649 0.4375 0 0 0.4040404 Private 11th Divorced Sales Unmarried White Female United-States 0 -29 0.322222233 0.169034928 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -41 0.455555558 0.02822177 0.625 0 0.323232323 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -49 0.544444442 0.255794257 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -37 0.411111116 0.146721408 0.1875 0 0 0.4040404 Private 5th-6th Separated Other-service Unmarried White Female Mexico 0 -37 0.411111116 0.09262918 1 0 0.5874656 0.6060606 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 -43 0.477777779 0.1340098 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.047581844 0.875 0.046500463 0 0.5555556 Private Masters Widowed Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.148611337 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried Black Female ? 0 -19 0.211111113 0.117923088 0.3125 0 0 0.6060606 Private 9th Never-married Craft-repair Other-relative White Male United-States 0 -29 0.322222233 0.121437594 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -40 0.444444448 0.369544119 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.187319368 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.265996963 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.08586352 0.5625 0.07298073 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male England 1 -29 0.322222233 0.159585908 0.75 0 0 0.3838384 Private Assoc-acdm Divorced Craft-repair Unmarried White Female United-States 0 -25 0.2777778 0.156927466 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband Other Male Mexico 0 -38 0.422222227 0.02315477 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -48 0.533333361 0.054901816 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.0719200149 0.625 0 0 0.121212125 Private Some-college Never-married Other-service Own-child White Female United-States 0 -50 0.5555556 0.120290563 0.5625 0 0.323232323 0.5050505 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -37 0.411111116 0.221610352 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -48 0.533333361 0.0178419277 0.8125 0 0 0.2020202 Private Bachelors Widowed Other-service Unmarried White Female United-States 0 -50 0.5555556 0.227676883 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -74 0.822222233 0.114031412 0.5625 0.06767067 0 0.0606060624 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -24 0.266666681 0.0142479483 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -34 0.377777785 0.141071126 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband Black Male United-States 1 -19 0.211111113 0.262101233 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -39 0.433333337 0.0682021 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -40 0.444444448 0.133541688 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -30 0.333333343 0.0308350828 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -27 0.3 0.0906348452 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -23 0.25555557 0.191153124 0.3125 0 0 0.353535354 ? 9th Divorced ? Not-in-family White Female United-States 0 -68 0.75555557 0.19321616 0.25 0 0.382920116 0.4040404 ? 7th-8th Widowed ? Not-in-family White Female ? 0 -46 0.51111114 0.284779131 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -24 0.266666681 0.0695606247 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -18 0.2 0.135967076 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child White Male United-States 0 -50 0.5555556 0.112970591 1 0 0 0.6060606 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.142464 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -42 0.466666669 0.07961986 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.175015241 0.6875 0.0347103477 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -57 0.6333333 0.06663007 0.625 0 0 0.161616161 Private Some-college Widowed Tech-support Not-in-family White Female United-States 0 -27 0.3 0.139658719 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male India 1 -31 0.344444454 0.1391583 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.07039042 0.875 0 0 0.4040404 Local-gov Masters Separated Prof-specialty Unmarried White Female United-States 0 -55 0.6111111 0.1147366 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Other-service Other-relative White Female United-States 0 -56 0.622222245 0.123852216 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -36 0.4 0.07473808 0.8125 0 0.3838384 0.3838384 State-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -35 0.3888889 0.104000457 0.625 0 0 0.4040404 State-gov Some-college Never-married Farming-fishing Own-child White Male United-States 0 -63 0.7 0.173542216 0.875 0 0 0.0303030312 ? Masters Never-married ? Not-in-family White Female United-States 0 -28 0.311111122 0.185005784 0.875 0 0 0.5050505 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -38 0.422222227 0.170176566 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -30 0.333333343 0.240242347 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -18 0.2 0.1382214 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -35 0.3888889 0.162527919 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -53 0.5888889 0.09370683 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.118289493 0.9375 0 0 0.4040404 Private Prof-school Divorced Prof-specialty Unmarried White Female United-States 0 -45 0.5 0.139057264 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -35 0.3888889 0.118624911 0.375 0 0 0.6060606 Private 10th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male India 0 -41 0.455555558 0.0750876442 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -60 0.6666667 0.0714741349 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.0524312928 0.625 0 0.3677686 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -19 0.211111113 0.1091759 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -24 0.266666681 0.145799339 0.5625 0 0.3624885 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -56 0.622222245 0.2572666 0.8125 0.1502415 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.09785379 0.5625 0 0 0.7070707 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -29 0.322222233 0.16331999 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -35 0.3888889 0.107894838 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Own-child White Male United-States 0 -27 0.3 0.18906045 0.625 0 0 0.4040404 ? Some-college Never-married ? Unmarried White Female United-States 0 -55 0.6111111 0.118503004 1 0 0.453856736 0.5555556 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 -18 0.2 0.105711237 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -53 0.5888889 0.145195171 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -26 0.2888889 0.116920874 0.875 0 0 0.2020202 Private Masters Married-civ-spouse Machine-op-inspct Husband White Male Canada 0 -55 0.6111111 0.130244061 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -45 0.5 0.224986792 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.227428347 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -32 0.355555564 0.07644886 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.119264096 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -35 0.3888889 0.117533788 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 -36 0.4 0.144679919 0.5625 0 0 0.373737365 Private HS-grad Divorced Handlers-cleaners Unmarried White Female United-States 0 -41 0.455555558 0.149926081 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.06758582 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Own-child White Male United-States 0 -22 0.244444445 0.2756305 0.5 0 0 0.4040404 Private 12th Never-married Transport-moving Other-relative White Male United-States 0 -36 0.4 0.07577061 0.9375 0.25236252 0 0.4040404 Self-emp-not-inc Prof-school Divorced Prof-specialty Unmarried White Male United-States 1 -65 0.722222269 0.0780774653 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -59 0.655555546 0.252608448 0.5625 0 0 0.414141417 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -25 0.2777778 0.164046064 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female Columbia 0 -33 0.366666675 0.123237282 0.625 0 0.4331956 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -31 0.344444454 0.08568369 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.186057836 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.117941953 0.625 0 0 0.5050505 State-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.3354734 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -23 0.25555557 0.231961235 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 -34 0.377777785 0.06726724 0.875 0.03103031 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male India 1 -23 0.25555557 0.165219352 0.625 0 0 0.4040404 Private Some-college Divorced Sales Own-child Black Female United-States 0 -63 0.7 0.0291727986 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.126939029 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -51 0.566666663 0.236597851 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Divorced Farming-fishing Unmarried White Male United-States 0 -31 0.344444454 0.122748964 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.0537952 0.625 0.02597026 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Own-child White Female Japan 0 -48 0.533333361 0.238312662 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male ? 1 -31 0.344444454 0.260736 0.625 0 0 0.363636374 Private Some-college Never-married Adm-clerical Not-in-family Black Female Jamaica 0 -47 0.5222222 0.02306721 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.133858919 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -23 0.25555557 0.02219296 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -34 0.377777785 0.256719679 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.06739858 0.4375 0 0 0.353535354 Private 11th Married-civ-spouse Other-service Wife Black Female United-States 1 -34 0.377777785 0.1406239 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Sales Not-in-family White Male United-States 1 -31 0.344444454 0.04146211 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -41 0.455555558 0.118846506 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male Peru 0 -41 0.455555558 0.08668389 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Female United-States 0 -27 0.3 0.2212682 0.6875 0 0 0.3030303 Self-emp-not-inc Assoc-voc Never-married Prof-specialty Other-relative White Male United-States 0 -30 0.333333343 0.135512441 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child Black Female United-States 0 -23 0.25555557 0.2549638 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -24 0.266666681 0.142930746 0.75 0 0 0.2020202 Local-gov Assoc-acdm Never-married Adm-clerical Own-child White Female ? 0 -59 0.655555546 0.120333672 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 -56 0.622222245 0.158836946 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.0152494945 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -59 0.655555546 0.212855086 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Other-service Husband White Male Cuba 0 -47 0.5222222 0.290640235 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.100875258 0.5625 0 0 0.444444448 Self-emp-not-inc HS-grad Divorced Sales Not-in-family White Female United-States 0 -42 0.466666669 0.111750148 0.8125 0 0 0.454545468 Private Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 -29 0.322222233 0.07234501 0.625 0 0 0.4040404 Federal-gov Some-college Married-spouse-absent Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.146804243 0.5625 0 0 0.454545468 Private HS-grad Never-married Craft-repair Unmarried White Male Outlying-US(Guam-USVI-etc) 0 -43 0.477777779 0.235997722 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.219149262 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.105554976 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Not-in-family White Female United-States 0 -23 0.25555557 0.14580135 0.625 0 0 0.2020202 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -29 0.322222233 0.0720493346 0.875 0 0 0.353535354 State-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.0888621 0.5625 0 0 0.454545468 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -33 0.366666675 0.246451661 0.5625 0.02105021 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -46 0.51111114 0.241928875 0.625 0 0 0.454545468 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -35 0.3888889 0.175800577 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Adm-clerical Not-in-family Black Female United-States 0 -36 0.4 0.18383719 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.07654989 0.5625 0 0 0.373737365 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 -35 0.3888889 0.147473738 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.07810508 0.25 0 0 0.424242437 Private 7th-8th Never-married Machine-op-inspct Unmarried White Male United-States 0 -39 0.433333337 0.054312475 0.625 0 0 0.8484849 Private Some-college Married-civ-spouse Other-service Husband Asian-Pac-Islander Male United-States 1 -37 0.411111116 0.09918334 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.144564077 0.5625 0 0 0.424242437 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -25 0.2777778 0.134921074 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -50 0.5555556 0.09312961 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife Black Female United-States 0 -64 0.7111111 0.261731446 0.9375 0.1502415 0 0.454545468 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male ? 1 -33 0.366666675 0.06966704 0.6875 0 0 0.454545468 Private Assoc-voc Separated Prof-specialty Not-in-family White Male United-States 0 -59 0.655555546 0.0897154659 0.1875 0 0 0.4040404 Self-emp-inc 5th-6th Married-civ-spouse Farming-fishing Husband White Male Italy 0 -24 0.266666681 0.11799179 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -41 0.455555558 0.06726589 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.07239081 0.3125 0 0 0.121212125 ? 9th Never-married ? Own-child White Female United-States 0 -60 0.6666667 0.07640575 0.8125 0 0 0.6060606 Private Bachelors Divorced Exec-managerial Own-child White Male United-States 0 -19 0.211111113 0.05771517 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 -23 0.25555557 0.0307892822 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Other-relative White Male United-States 0 -57 0.6333333 0.253403872 0.875 1 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.09805045 0.875 0 0.453856736 0.4040404 Private Masters Married-civ-spouse Adm-clerical Husband White Male Japan 1 -17 0.188888893 0.0456710272 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child White Male United-States 0 -24 0.266666681 0.0767398253 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -32 0.355555564 0.106614448 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.130597 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.1293065 0.6875 0 0 0.5555556 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -21 0.233333334 0.049136363 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -54 0.6 0.1826356 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Exec-managerial Not-in-family White Female United-States 0 -22 0.244444445 0.022285236 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -29 0.322222233 0.07149771 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -22 0.244444445 0.01983155 0.5 0 0 0.5050505 Private 12th Never-married Farming-fishing Not-in-family Amer-Indian-Eskimo Male United-States 0 -37 0.411111116 0.07073527 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.16100505 1 0 0 0.5050505 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.0635904148 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -45 0.5 0.0138303572 0.625 0 0 0.8484849 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -28 0.311111122 0.235908151 0.125 0 0 0.4040404 Private 1st-4th Never-married Priv-house-serv Not-in-family White Female Mexico 0 -68 0.75555557 0.131168142 1 0 0 0.4040404 Private Doctorate Divorced Prof-specialty Not-in-family White Female Cuba 0 -36 0.4 0.181209072 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Laos 0 -20 0.222222224 0.3013986 0.3125 0 0 0.3030303 Private 9th Never-married Other-service Unmarried White Male Mexico 0 -24 0.266666681 0.180309221 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Own-child White Female United-States 0 -38 0.422222227 0.133505315 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -32 0.355555564 0.153519392 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -34 0.377777785 0.170165792 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.150428534 0.5625 0.0217402168 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female England 0 -28 0.311111122 0.1224324 0.8125 0 0 0.5050505 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.08931135 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -58 0.644444466 0.138350725 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -64 0.7111111 0.125218138 0.9375 1 0 0.353535354 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.197055981 0.625 0 0 0.5050505 Private Some-college Never-married Sales Own-child White Female United-States 0 -43 0.477777779 0.0514984466 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.198802456 0.5 0 0 0.4040404 Private 12th Divorced Farming-fishing Not-in-family White Male United-States 0 -21 0.233333334 0.0183571819 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male ? 0 -23 0.25555557 0.0470443629 0.8125 0 0 0.2020202 Private Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Female United-States 0 -25 0.2777778 0.0707164 0.3125 0.02907029 0 0.4040404 Private 9th Never-married Handlers-cleaners Own-child Black Male United-States 0 -41 0.455555558 0.217538163 0.5625 0.0235402342 0 0.4040404 Private HS-grad Separated Adm-clerical Not-in-family Black Male United-States 0 -24 0.266666681 0.263087958 0.5625 0 0 0.363636374 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -41 0.455555558 0.213873461 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 -27 0.3 0.131795883 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -54 0.6 0.3142052 0.25 0 0 0.3030303 Private 7th-8th Widowed Other-service Unmarried White Male United-States 0 -28 0.311111122 0.148685426 0.5625 0 0 0.25252524 Local-gov HS-grad Separated Transport-moving Own-child White Female United-States 0 -29 0.322222233 0.136645332 0.25 0 0.4687787 0.4040404 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -36 0.4 0.231342927 0.5625 0 0 0.3030303 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -41 0.455555558 0.0627916 0.8125 0 0.453856736 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Taiwan 1 -60 0.6666667 0.02601325 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.117013149 0.875 0 0 0.3838384 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.120308749 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female ? 0 -27 0.3 0.202587724 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 -60 0.6666667 0.151305482 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.1289832 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.04168168 0.5 0 0 0.353535354 Private 12th Divorced Transport-moving Other-relative Black Male United-States 0 -34 0.377777785 0.144060269 1 0 0 0.323232323 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male Canada 1 -36 0.4 0.223205954 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -54 0.6 0.0977285057 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -48 0.533333361 0.08289526 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -19 0.211111113 0.146024972 0.25 0 0 0.333333343 Private 7th-8th Never-married Other-service Own-child White Male United-States 0 -40 0.444444448 0.126820475 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.0226374939 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -39 0.433333337 0.158213928 0.75 0 0 0.4040404 Private Assoc-acdm Separated Adm-clerical Unmarried White Male United-States 0 -34 0.377777785 0.235163212 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.113452166 0.5625 0 0 0.3030303 Private HS-grad Separated Other-service Unmarried White Female United-States 0 -43 0.477777779 0.14269501 0.5625 0 0 0.24242425 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -35 0.3888889 0.130639419 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 -36 0.4 0.0353821144 1 0 0.4331956 0.5050505 Local-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -59 0.655555546 0.05105661 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -33 0.366666675 0.118666671 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.206626236 0.625 0 0 0.5050505 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -48 0.533333361 0.178615957 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.09385501 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -49 0.544444442 0.07252754 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.0230166949 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -45 0.5 0.08646701 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -51 0.566666663 0.131768942 0.625 0 0 0.4040404 Self-emp-inc Some-college Separated Sales Not-in-family White Female United-States 0 -46 0.51111114 0.0399318375 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.109410286 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -29 0.322222233 0.236143216 0.375 0 0 0.3838384 ? 10th Never-married ? Own-child White Female United-States 0 -39 0.433333337 0.2321963 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Own-child Black Female United-States 1 -35 0.3888889 0.0754877254 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -26 0.2888889 0.119077526 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 1 -51 0.566666663 0.0928231552 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -31 0.344444454 0.208539754 0.875 0 0 0.0606060624 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male South 0 -39 0.433333337 0.2269003 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -26 0.2888889 0.139152229 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Other-relative White Male Mexico 0 -25 0.2777778 0.1300265 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -61 0.677777767 0.154281154 0.625 0 0.4331956 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -49 0.544444442 0.04229325 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Own-child White Female United-States 0 -53 0.5888889 0.178445548 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female Mexico 0 -52 0.5777778 0.249579549 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Machine-op-inspct Husband White Male El-Salvador 0 -52 0.5777778 0.110242777 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -74 0.822222233 0.0603938177 0.8125 0 0 0.353535354 ? Bachelors Widowed ? Not-in-family Other Female United-States 0 -50 0.5555556 0.376162261 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family Black Male United-States 0 -29 0.322222233 0.0839762762 0.8125 0.135501355 0 0.353535354 Private Bachelors Never-married Sales Not-in-family White Female United-States 1 -76 0.844444454 0.140662968 0.25 0 0 0.3030303 Private 7th-8th Widowed Protective-serv Not-in-family White Male United-States 0 -19 0.211111113 0.0640383139 0.5625 0 0 0.151515156 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -25 0.2777778 0.114284657 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -45 0.5 0.06824251 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.113764018 0.75 0 0 0.353535354 Private Assoc-acdm Divorced Adm-clerical Own-child White Female United-States 0 -20 0.222222224 0.143181309 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 -66 0.733333349 0.114916436 0.875 0 0 0.0606060624 ? Masters Widowed ? Not-in-family White Male United-States 0 -63 0.7 0.11485716 0.8125 0 0 0.454545468 ? Bachelors Married-civ-spouse ? Wife Black Female United-States 0 -27 0.3 0.06728408 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -41 0.455555558 0.07064838 0.625 0.0282902829 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -43 0.477777779 0.118019409 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Other-service Husband White Male Nicaragua 0 -23 0.25555557 0.100830808 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -37 0.411111116 0.144501433 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -31 0.344444454 0.11269512 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.0294442344 0.625 0 0 0.04040404 State-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.129274845 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Sales Own-child White Male United-States 0 -70 0.7777778 0.106850855 0.5625 0.0299303 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -35 0.3888889 0.228066191 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -41 0.455555558 0.0918829 0.75 0 0 0.75757575 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -17 0.188888893 0.04871069 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Other-relative White Female United-States 0 -41 0.455555558 0.127941921 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife Black Female United-States 1 -44 0.4888889 0.2719611 0.6875 0 0 0.454545468 Private Assoc-voc Divorced Sales Not-in-family White Male United-States 0 -47 0.5222222 0.307576925 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -24 0.266666681 0.187943742 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -38 0.422222227 0.044261992 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Divorced Other-service Unmarried White Female United-States 0 -34 0.377777785 0.1278429 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male Jamaica 0 -62 0.6888889 0.150627226 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Other-service Not-in-family Black Female United-States 0 -27 0.3 0.13426438 0.5625 0 0 0.3838384 Local-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -59 0.655555546 0.09385299 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -35 0.3888889 0.08021661 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.131356061 0.5625 0 0 0.323232323 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 -28 0.311111122 0.125762358 0.625 0 0 0.5050505 Private Some-college Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.221540987 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -59 0.655555546 0.107409894 0.3125 0 0 0.4040404 State-gov 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.09339364 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Own-child White Female United-States 0 -54 0.6 0.192861214 0.875 0 0 0.323232323 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 1 -39 0.433333337 0.122384585 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -41 0.455555558 0.1305862 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -43 0.477777779 0.145818189 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Female Germany 0 -32 0.355555564 0.08413725 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Iran 1 -62 0.6888889 0.07372711 0.625 0 0.371212125 0.333333343 Private Some-college Separated Sales Unmarried White Female United-States 0 -58 0.644444466 0.172609374 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.219827518 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -67 0.7444445 0.117865168 0.625 0 0.5640496 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -31 0.344444454 0.163764521 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -51 0.566666663 0.104477324 0.875 0 0 0.7070707 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -54 0.6 0.127706856 0.8125 0 0 0.363636374 Private Bachelors Never-married Other-service Own-child Black Female United-States 0 -20 0.222222224 0.0265897941 0.625 0 0 0.7070707 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -35 0.3888889 0.139388636 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.085974656 0.5625 0 0 0.363636374 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -38 0.422222227 0.157807782 0.8125 0.068490684 0 0.6060606 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -42 0.466666669 0.122786686 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -44 0.4888889 0.112208828 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 -28 0.311111122 0.0224711318 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -74 0.822222233 0.112841949 0.625 0 0 0.353535354 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.120817266 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife Black Female United-States 0 -50 0.5555556 0.200410858 0.5625 0 0 0.5252525 State-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -50 0.5555556 0.133603647 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Exec-managerial Unmarried White Female United-States 0 -43 0.477777779 0.161987737 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -29 0.322222233 0.114273205 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.111092776 0.5625 0 0 0.25252524 ? HS-grad Separated ? Unmarried Black Female United-States 0 -61 0.677777767 0.141770929 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.104286715 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female Vietnam 0 -27 0.3 0.224486351 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Not-in-family White Male ? 0 -47 0.5222222 0.129852727 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male Iran 1 -39 0.433333337 0.03329685 0.75 0 0.3168044 0.4040404 Private Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 -33 0.366666675 0.09182363 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.342861384 0.5625 0 0 0.373737365 Private HS-grad Never-married Sales Other-relative Black Female United-States 0 -38 0.422222227 0.214594826 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -45 0.5 0.0703984946 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.166831121 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -35 0.3888889 0.1478718 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Not-in-family White Male Germany 0 -21 0.233333334 0.114298128 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -49 0.544444442 0.0884364247 0.6875 0 0 0.444444448 State-gov Assoc-voc Divorced Adm-clerical Not-in-family Black Female United-States 0 -50 0.5555556 0.115748249 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Own-child Other Female United-States 0 -36 0.4 0.229063019 1 0 0 0.363636374 State-gov Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 -20 0.222222224 0.137832776 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -49 0.544444442 0.143753141 0.5625 0 0 0.4040404 Private HS-grad Separated Prof-specialty Unmarried Black Female United-States 0 -40 0.444444448 0.253934622 0.8125 0 0 0.6060606 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.124296077 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -60 0.6666667 0.126783431 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -67 0.7444445 0.156948358 0.4375 0 0 0.2020202 Private 11th Widowed Adm-clerical Unmarried White Female United-States 0 -21 0.233333334 0.119498491 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Other Female United-States 0 -60 0.6666667 0.0142122516 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband Amer-Indian-Eskimo Male United-States 0 -17 0.188888893 0.03535113 0.4375 0 0 0.121212125 Private 11th Never-married Other-service Own-child White Female United-States 0 -43 0.477777779 0.123440683 0.875 0.1502415 0 0.323232323 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 -49 0.544444442 0.024366457 0.8125 0 0 0.454545468 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.0841621757 0.8125 1 0 0.6060606 Private Bachelors Separated Prof-specialty Not-in-family Black Female United-States 1 -38 0.422222227 0.06893625 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 -38 0.422222227 0.111759581 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.200426355 0.75 0 0 1 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.08101071 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -23 0.25555557 0.05898074 0.625 0 0 0.4040404 ? Some-college Separated ? Not-in-family White Female United-States 0 -19 0.211111113 0.18739076 0.625 0 0.3677686 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -40 0.444444448 0.105052523 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -46 0.51111114 0.109686442 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -25 0.2777778 0.0436854474 0.625 0 0 0.222222224 Private Some-college Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.152227551 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -24 0.266666681 0.217332065 0.75 0 0 0.4848485 Private Assoc-acdm Never-married Handlers-cleaners Not-in-family White Male United-States 0 -62 0.6888889 0.136216968 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -54 0.6 0.118045 0.0625 0 0 0.4040404 Private Preschool Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male China 0 -23 0.25555557 0.135839775 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 -60 0.6666667 0.112028994 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -18 0.2 0.09942177 0.5625 0 0 0.08080808 Self-emp-inc HS-grad Never-married Farming-fishing Own-child White Female United-States 0 -41 0.455555558 0.143566564 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -45 0.5 0.0227641184 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -62 0.6888889 0.134166718 0.6875 0 0 0.4040404 State-gov Assoc-voc Widowed Exec-managerial Unmarried Black Female United-States 0 -28 0.311111122 0.06123439 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Tech-support Unmarried Black Female United-States 0 -36 0.4 0.227505133 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male Yugoslavia 1 -31 0.344444454 0.12608768 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Other-relative White Male United-States 0 -44 0.4888889 0.176127255 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male ? 0 -33 0.366666675 0.243696228 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Separated Craft-repair Unmarried White Male United-States 0 -62 0.6888889 0.15258655 0.9375 0 0 0.161616161 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -27 0.3 0.0674666 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Wife White Female United-States 0 -42 0.466666669 0.183622345 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Divorced Adm-clerical Unmarried Black Female United-States 1 -55 0.6111111 0.1714253 0.3125 0 0 0.373737365 Private 9th Never-married Handlers-cleaners Other-relative Black Male United-States 0 -41 0.455555558 0.139674217 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -26 0.2888889 0.02632981 0.625 0.0406404063 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -45 0.5 0.0325121842 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -67 0.7444445 0.102445945 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Widowed Farming-fishing Not-in-family White Male United-States 0 -25 0.2777778 0.158054978 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.08597735 0.5625 0 0.4331956 0.4848485 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.121276617 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried White Male United-States 0 -19 0.211111113 0.02187438 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -26 0.2888889 0.09271741 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -61 0.677777767 0.153759167 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.107389688 0.9375 0.135501355 0 0.5050505 Private Prof-school Never-married Sales Not-in-family White Female United-States 1 -43 0.477777779 0.0224354342 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -53 0.5888889 0.182222068 0.5625 0 0 0.2020202 Private HS-grad Divorced Priv-house-serv Not-in-family White Female United-States 0 -53 0.5888889 0.195520326 0.625 0 0 0.454545468 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 -42 0.466666669 0.193329319 0.5 0 0 0.1010101 Self-emp-inc 12th Divorced Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.08655996 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -55 0.6111111 0.124735221 0.8125 0 0 1 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.0334457 0.8125 0.07298073 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.066009745 0.4375 0 0 0.161616161 Private 11th Never-married Sales Own-child White Female United-States 0 -55 0.6111111 0.191037953 0.9375 0 0 0.353535354 Self-emp-not-inc Prof-school Divorced Prof-specialty Not-in-family White Female United-States 0 -36 0.4 0.06624885 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -40 0.444444448 0.1366413 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -54 0.6 0.07972291 0.375 0 0 0.1010101 Self-emp-not-inc 10th Divorced Other-service Not-in-family Black Female United-States 0 -45 0.5 0.1241223 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -48 0.533333361 0.232929111 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -40 0.444444448 0.06713724 0.9375 0 0 0.6060606 Local-gov Prof-school Never-married Exec-managerial Not-in-family White Male United-States 1 -31 0.344444454 0.170642659 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -26 0.2888889 0.128409356 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Male Taiwan 0 -34 0.377777785 0.193800792 0.625 0 0.3409091 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -19 0.211111113 0.137663037 0.5625 0 0 0.25252524 Private HS-grad Never-married Adm-clerical Own-child Other Female Puerto-Rico 0 -31 0.344444454 0.19860512 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.107389688 0.5625 0 0 0.3030303 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 -55 0.6111111 0.108884931 0.875 0 0 0.5555556 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.0355208628 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.169746861 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Other-relative White Male Mexico 0 -27 0.3 0.127770841 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.274743468 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family Black Male United-States 0 -20 0.222222224 0.112161681 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Other Female United-States 0 -24 0.266666681 0.0235184766 0.6875 0 0 0.3838384 Self-emp-not-inc Assoc-voc Never-married Other-service Unmarried White Female United-States 0 -27 0.3 0.09612145 0.875 0 0 0.4040404 Private Masters Never-married Tech-support Not-in-family White Male ? 0 -18 0.2 0.135842472 0.4375 0 0 0.04040404 Federal-gov 11th Never-married Machine-op-inspct Own-child White Male United-States 0 -28 0.311111122 0.121073887 0.625 0 0 0.4040404 Local-gov Some-college Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.06395479 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Female United-States 0 -66 0.733333349 0.2360725 0.625 0 0.288797051 0.2020202 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.135880873 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 -59 0.655555546 0.0803823 0.375 0 0 0.363636374 Self-emp-not-inc 10th Married-civ-spouse Exec-managerial Wife White Female United-States 0 -33 0.366666675 0.100845627 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -28 0.311111122 0.2823093 0.25 0 0 0.4040404 Private 7th-8th Separated Handlers-cleaners Not-in-family White Male Mexico 0 -34 0.377777785 0.117726423 0.8125 0 0.459366381 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -41 0.455555558 0.115332007 0.625 0 0 0.5555556 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.138967 0.4375 0 0 0.454545468 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.136513323 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.08153472 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -47 0.5222222 0.10789147 0.5625 0.14084141 0 0.3838384 Private HS-grad Separated Prof-specialty Other-relative Black Female United-States 1 -29 0.322222233 0.05682341 0.375 0 0 0.4040404 Private 10th Married-spouse-absent Adm-clerical Unmarried White Female Mexico 0 -60 0.6666667 0.09388465 0.625 0 0 0.5050505 Private Some-college Married-spouse-absent Machine-op-inspct Not-in-family White Male United-States 1 -53 0.5888889 0.08358159 0.5625 0.0501305 0 0.353535354 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.0207172465 0.25 0 0 0.6060606 Private 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.09286357 0.625 0 0 0.3030303 Private Some-college Divorced Sales Unmarried White Female United-States 0 -73 0.811111152 0.0936543 0.5625 0 0 0.222222224 ? HS-grad Widowed ? Not-in-family White Female United-States 1 -20 0.222222224 0.160559848 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -49 0.544444442 0.229510248 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.151509568 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Unmarried White Male United-States 0 -33 0.366666675 0.0754318237 0.625 0 0 0.454545468 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -25 0.2777778 0.0845225155 0.625 0 0 0.343434334 Private Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Female United-States 0 -34 0.377777785 0.2091493 0.5625 0 0 0.1010101 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 -19 0.211111113 0.04821968 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Female United-States 0 -40 0.444444448 0.06680452 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 -48 0.533333361 0.168339849 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -51 0.566666663 0.1392701 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -22 0.244444445 0.1553871 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Handlers-cleaners Own-child Black Male Jamaica 0 -34 0.377777785 0.1632385 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband Black Male United-States 0 -22 0.244444445 0.09075608 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Sales Wife White Female United-States 0 -34 0.377777785 0.1337727 0.5625 0 0.459595948 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -56 0.622222245 0.117221944 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -49 0.544444442 0.11177507 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -36 0.4 0.184281737 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -18 0.2 0.1295941 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -26 0.2888889 0.06902112 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 -48 0.533333361 0.157946527 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.315694362 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.0569540747 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -47 0.5222222 0.100353271 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.0234497767 0.6875 0 0 0.121212125 Private Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 -28 0.311111122 0.1422397 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -53 0.5888889 0.0224313922 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -65 0.722222269 0.1212261 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.14805299 0.625 0 0 0.4040404 Private Some-college Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 -50 0.5555556 0.09076955 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.0717637539 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -70 0.7777778 0.06047464 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -55 0.6111111 0.111036874 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Own-child White Male United-States 0 -27 0.3 0.173181877 0.8125 0 0 0.353535354 Federal-gov Bachelors Never-married Transport-moving Other-relative White Male United-States 0 -31 0.344444454 0.153192729 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Cuba 1 -43 0.477777779 0.08450231 0.8125 0 0.43663913 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.127802491 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.118758276 0.25 0 0 0.4040404 Private 7th-8th Never-married Other-service Unmarried White Female Mexico 0 -26 0.2888889 0.191452175 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried Black Female United-States 0 -23 0.25555557 0.06862306 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family White Female United-States 0 -41 0.455555558 0.09034118 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -52 0.5777778 0.175750747 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 -41 0.455555558 0.160425141 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Wife White Female United-States 0 -59 0.655555546 0.100104734 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -56 0.622222245 0.0323983543 0.625 0 0.453856736 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -58 0.644444466 0.157750532 0.5625 0.143441439 0 0.4848485 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 -65 0.722222269 0.07632695 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.0230658613 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 0 -51 0.566666663 0.117915682 0.75 0.05178052 0 0.454545468 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.188374132 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -84 0.933333337 0.1268454 0.5625 0 0 0.161616161 Private HS-grad Widowed Prof-specialty Not-in-family White Female United-States 0 -51 0.566666663 0.0650695 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.0567499958 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -30 0.333333343 0.185647652 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -22 0.244444445 0.2596745 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Male Mexico 0 -30 0.333333343 0.132243112 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male Ireland 0 -47 0.5222222 0.06545138 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -19 0.211111113 0.133167192 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Female United-States 0 -43 0.477777779 0.09907625 0.625 0 0 0.363636374 Self-emp-not-inc Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -30 0.333333343 0.125510454 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -46 0.51111114 0.0494603328 0.875 0 0 0.454545468 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 0 -49 0.544444442 0.185271829 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.140912846 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Unmarried White Female Mexico 0 -42 0.466666669 0.141795844 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 0 -57 0.6333333 0.2505683 0.625 0.0501305 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.119002767 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -23 0.25555557 0.1417615 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -26 0.2888889 0.197810337 0.8125 0 0 0.5858586 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -64 0.7111111 0.100878626 0.875 0 0 0.08080808 Private Masters Never-married Prof-specialty Other-relative White Female United-States 0 -20 0.222222224 0.2175577 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female Germany 0 -31 0.344444454 0.0855052 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -38 0.422222227 0.1162103 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -44 0.4888889 0.0777332857 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Male United-States 0 -42 0.466666669 0.06850452 0.6875 0.0288502872 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 0 -23 0.25555557 0.17872642 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Unmarried White Male United-States 0 -31 0.344444454 0.129699171 0.875 0 0 0.909090936 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.2349093 0.4375 0 0 0.363636374 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.100329027 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -35 0.3888889 0.08524859 0.5625 0 0 0.2020202 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 -40 0.444444448 0.07135155 0.5625 0 0 0.3838384 Private HS-grad Married-spouse-absent Adm-clerical Own-child White Female United-States 0 -18 0.2 0.126675665 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 -23 0.25555557 0.124199763 0.375 0 0 0.3030303 Private 10th Never-married Transport-moving Own-child Asian-Pac-Islander Male ? 0 -63 0.7 0.08368127 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -20 0.222222224 0.135258526 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Transport-moving Own-child White Male United-States 0 -50 0.5555556 0.0676767454 0.875 0 0 0.6060606 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.08723147 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 -53 0.5888889 0.200575873 0.375 0 0 0.4040404 Self-emp-not-inc 10th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -34 0.377777785 0.131667912 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Own-child White Female United-States 0 -54 0.6 0.103378117 0.5625 0 0 0.565656543 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 1 -40 0.444444448 0.08543448 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -22 0.244444445 0.139404133 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -28 0.311111122 0.277596563 0.375 0 0 0.353535354 Private 10th Never-married Farming-fishing Other-relative White Male Mexico 0 -24 0.266666681 0.44020462 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male El-Salvador 0 -37 0.411111116 0.04752594 0.125 0 0 0.4848485 Private 1st-4th Never-married Other-service Unmarried White Female El-Salvador 0 -62 0.6888889 0.133032486 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -19 0.211111113 0.208313435 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 -51 0.566666663 0.225417852 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Prof-specialty Unmarried Asian-Pac-Islander Female United-States 0 -65 0.722222269 0.0707992539 0.625 0.0234602336 0 0.4040404 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.102029696 0.5625 0 0 0.08080808 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.0530509427 0.625 0 0 0.909090936 Self-emp-inc Some-college Divorced Exec-managerial Unmarried White Male United-States 1 -42 0.466666669 0.06629398 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 -54 0.6 0.155429527 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male Cuba 0 -23 0.25555557 0.0792117 0.8125 0 0 0.6060606 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -28 0.311111122 0.0462327525 0.5625 0 0 0.464646459 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -42 0.466666669 0.230104968 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Not-in-family White Male United-States 0 -30 0.333333343 0.04439939 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family Black Male United-States 0 -33 0.366666675 0.126790166 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.133849487 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Not-in-family White Female United-States 0 -39 0.433333337 0.108255848 0.5625 0.0297702979 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 -27 0.3 0.47553286 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -20 0.222222224 0.234489679 0.4375 0 0 0.4040404 ? 11th Never-married ? Own-child Black Male United-States 0 -62 0.6888889 0.05245756 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male Philippines 0 -17 0.188888893 0.108276054 0.375 0 0 0.3030303 Private 10th Never-married Sales Other-relative White Male United-States 0 -58 0.644444466 0.135455862 0.625 0 0 0.5555556 Private Some-college Divorced Adm-clerical Not-in-family Black Female United-States 1 -69 0.7666667 0.0726406947 0.875 0.06514065 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.15507862 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.1367504 0.8125 0 0.6483012 0.5050505 Private Bachelors Separated Sales Not-in-family White Male United-States 1 -20 0.222222224 0.251858115 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -64 0.7111111 0.230143368 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -27 0.3 0.080684714 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male ? 0 -41 0.455555558 0.119890489 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -40 0.444444448 0.15702109 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male El-Salvador 0 -53 0.5888889 0.129980028 0.875 0 0 0.3838384 Local-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 1 -44 0.4888889 0.0223310366 1 0 0 0.454545468 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 -37 0.411111116 0.126183987 0.1875 0 0 0.4040404 Private 5th-6th Never-married Adm-clerical Other-relative White Female Mexico 0 -46 0.51111114 0.05289199 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -17 0.188888893 0.06844862 0.3125 0 0 0.2020202 Private 9th Never-married Machine-op-inspct Own-child White Male United-States 0 -35 0.3888889 0.0791854262 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.07462156 0.75 0 0 0.4040404 Local-gov Assoc-acdm Separated Adm-clerical Unmarried White Female United-States 0 -49 0.544444442 0.139502466 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -48 0.533333361 0.029100731 0.9375 0 0 0.25252524 Private Prof-school Divorced Prof-specialty Unmarried White Female United-States 0 -26 0.2888889 0.080984436 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Other-relative White Male United-States 0 -26 0.2888889 0.127445519 0.75 0 0 0.08080808 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.128574371 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.056251578 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -54 0.6 0.023948865 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.03994935 0.625 0 0 0.4040404 Local-gov Some-college Separated Adm-clerical Own-child Black Male United-States 0 -25 0.2777778 0.1360762 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -18 0.2 0.03748758 0.375 0 0 0.25252524 Local-gov 10th Never-married Other-service Own-child White Male United-States 0 -21 0.233333334 0.0796023458 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child Black Female United-States 0 -22 0.244444445 0.18852298 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Own-child Black Male United-States 0 -52 0.5777778 0.07473134 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male El-Salvador 1 -36 0.4 0.0607251972 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -25 0.2777778 0.08250056 0.8125 0 0.396235079 0.6060606 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -49 0.544444442 0.0291963723 1 1 0 0.7070707 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Male United-States 1 -42 0.466666669 0.0230874158 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.0254447851 0.6875 0 0 0.545454562 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.108185127 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Own-child White Male United-States 0 -32 0.355555564 0.230657279 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -53 0.5888889 0.0433230847 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.251844 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.138669968 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 1 -62 0.6888889 0.140274331 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Adm-clerical Not-in-family Black Female United-States 0 -38 0.422222227 0.149827749 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -23 0.25555557 0.234672889 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -39 0.433333337 0.09165525 0.5625 0 0.4708448 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.132877573 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Own-child White Male United-States 0 -27 0.3 0.137921676 0.75 0 0 0.4040404 ? Assoc-acdm Married-civ-spouse ? Wife White Female United-States 0 -41 0.455555558 0.13879256 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.04168168 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -25 0.2777778 0.201998383 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife Black Female United-States 1 -35 0.3888889 0.0310014449 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Other-service Unmarried White Female United-States 0 -47 0.5222222 0.161557347 0.5625 0 0.453856736 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.104119673 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male Puerto-Rico 0 -29 0.322222233 0.16466099 0.6875 0 0.4708448 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -36 0.4 0.0217780638 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 -42 0.466666669 0.215253547 0.8125 0 0 0.6060606 Private Bachelors Married-spouse-absent Transport-moving Not-in-family White Male United-States 0 -51 0.566666663 0.152713835 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -34 0.377777785 0.15251717 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Male United-States 0 -44 0.4888889 0.241973326 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Divorced Craft-repair Not-in-family White Male Portugal 0 -27 0.3 0.024820419 0.8125 0 0 0.414141417 Private Bachelors Never-married Machine-op-inspct Not-in-family White Male United-States 0 -39 0.433333337 0.265022337 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Not-in-family Black Male United-States 0 -46 0.51111114 0.0223000534 0.5625 0 0.3996786 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.126790166 0.5625 0 0.365013778 0.6262626 Self-emp-not-inc HS-grad Divorced Sales Own-child White Male United-States 0 -31 0.344444454 0.155969709 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family Black Female United-States 0 -23 0.25555557 0.2377644 0.4375 0 0 0.353535354 Private 11th Never-married Craft-repair Unmarried White Male United-States 0 -47 0.5222222 0.0691235 0.875 0.1502415 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -66 0.733333349 0.17665799 0.8125 0 0 1 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -26 0.2888889 0.107967578 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -52 0.5777778 0.105713256 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -53 0.5888889 0.09215501 0.4375 0 0 0.3030303 Self-emp-inc 11th Widowed Exec-managerial Not-in-family White Female United-States 0 -48 0.533333361 0.108253159 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 0 -37 0.411111116 0.05823312 0.75 0 0 0.5050505 Self-emp-inc Assoc-acdm Separated Exec-managerial Unmarried White Male United-States 0 -17 0.188888893 0.1607242 0.4375 0 0 0.05050505 Private 11th Never-married Other-service Own-child White Female United-States 0 -50 0.5555556 0.228970736 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.149528027 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Other-relative White Female Mexico 0 -17 0.188888893 0.06728138 0.4375 0 0.3677686 0.4040404 Federal-gov 11th Never-married Adm-clerical Not-in-family Black Female United-States 0 -39 0.433333337 0.144215181 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Unmarried Black Male United-States 0 -28 0.311111122 0.201158479 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Tech-support Not-in-family Black Female United-States 0 -38 0.422222227 0.120891355 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 -53 0.5888889 0.0325606763 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -28 0.311111122 0.0675353 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -42 0.466666669 0.1529361 0.625 0.1502415 0 0.323232323 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.08533749 0.3125 0 0 0.454545468 Private 9th Never-married Transport-moving Not-in-family White Male United-States 0 -20 0.222222224 0.140856937 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -32 0.355555564 0.2695027 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -23 0.25555557 0.18734698 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -25 0.2777778 0.0936293751 0.8125 0.0217402168 0 0.4040404 Private Bachelors Never-married Sales Own-child Asian-Pac-Islander Male Vietnam 0 -41 0.455555558 0.12017943 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Taiwan 0 -42 0.466666669 0.34422192 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.134059638 0.5 0.005940059 0 0.141414136 Private 12th Never-married Sales Own-child White Male United-States 0 -29 0.322222233 0.128325164 0.8125 0 0.4242424 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male Germany 1 -36 0.4 0.07792794 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.113040641 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.146940976 0.5625 0 0 0.444444448 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -48 0.533333361 0.115798093 0.9375 0.1502415 0 0.5050505 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.163049236 0.9375 0 0 0.8080808 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -67 0.7444445 0.150371283 0.5625 0 0 0.4040404 Federal-gov HS-grad Widowed Other-service Unmarried White Male United-States 0 -53 0.5888889 0.260504961 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -53 0.5888889 0.0710430741 0.8125 0 0.5544077 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.09472858 1 0 0 0.454545468 Private Doctorate Divorced Prof-specialty Not-in-family White Male United-States 1 -22 0.244444445 0.1387279 0.375 0 0 0.353535354 Private 10th Separated Other-service Unmarried White Female United-States 0 -25 0.2777778 0.145876125 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -61 0.677777767 0.109403551 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -31 0.344444454 0.056355305 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Not-in-family Black Female United-States 0 -47 0.5222222 0.13814193 0.5625 0 0 0.3838384 Self-emp-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male Germany 0 -31 0.344444454 0.131844372 0.125 0 0 0.454545468 Private 1st-4th Married-civ-spouse Prof-specialty Husband White Male United-States 0 -17 0.188888893 0.148556113 0.3125 0 0 0.323232323 Private 9th Never-married Sales Other-relative Other Female Mexico 0 -38 0.422222227 0.210299015 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.2602113 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male ? 0 -42 0.466666669 0.05804857 0.625 0 0 0.4040404 Private Some-college Widowed Exec-managerial Not-in-family Amer-Indian-Eskimo Female United-States 0 -78 0.8666667 0.0711158141 0.1875 0 0 0.363636374 Private 5th-6th Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male United-States 0 -54 0.6 0.06960642 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.10140264 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -30 0.333333343 0.0175179578 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.100617968 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.102125339 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 -30 0.333333343 0.11422 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Female United-States 0 -66 0.733333349 0.117522337 1 0.200512 0 0.353535354 Local-gov Doctorate Married-civ-spouse Prof-specialty Husband Black Male Jamaica 1 -23 0.25555557 0.108406052 0.5625 0.02597026 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -25 0.2777778 0.1437208 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -32 0.355555564 0.06942659 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.07376954 0.5625 0 0 0.3838384 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.0962042958 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -24 0.266666681 0.0292819124 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -22 0.244444445 0.128588513 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -28 0.311111122 0.118533313 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -29 0.322222233 0.1443957 0.4375 0 0 0.2020202 Local-gov 11th Divorced Other-service Unmarried Black Female United-States 0 -26 0.2888889 0.129757762 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Own-child White Male United-States 0 -41 0.455555558 0.139883012 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -19 0.211111113 0.09689265 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 -39 0.433333337 0.110050149 0.5625 0 0 0.262626261 Private HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male ? 0 -51 0.566666663 0.209317014 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.2882492 0.5625 0 0 0.2020202 ? HS-grad Separated ? Unmarried Black Female United-States 0 -27 0.3 0.188325629 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -33 0.366666675 0.210736141 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -19 0.211111113 0.117924437 0.5625 0 0 0.08080808 Private HS-grad Never-married Sales Own-child White Female United-States 0 -67 0.7444445 0.08894494 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 -41 0.455555558 0.0221444666 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.242827371 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.0670018643 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -25 0.2777778 0.07613297 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -21 0.233333334 0.0668139458 0.5625 0 0 0.363636374 Federal-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -24 0.266666681 0.304868639 0.625 0.143441439 0 0.5050505 Local-gov Some-college Never-married Tech-support Not-in-family White Male United-States 1 -48 0.533333361 0.159532025 0.4375 0 0 0.3131313 Private 11th Divorced Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.135963038 0.9375 0 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.180952445 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.3201471 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.07900223 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.0442539081 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female ? 0 -45 0.5 0.129881024 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -62 0.6888889 0.0516735651 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -39 0.433333337 0.121698253 0.875 0 0.453856736 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.0901701 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -22 0.244444445 0.0833344 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Not-in-family White Female United-States 0 -50 0.5555556 0.0875298455 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -25 0.2777778 0.06483982 0.4375 0 0 0.4040404 Private 11th Divorced Exec-managerial Unmarried White Female United-States 0 -44 0.4888889 0.213725969 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried White Female United-States 0 -26 0.2888889 0.058511287 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -31 0.344444454 0.06793471 0.875 0 0 0.5050505 State-gov Masters Divorced Exec-managerial Unmarried White Female United-States 1 -56 0.622222245 0.11068327 0.5625 0 0 0.151515156 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -49 0.544444442 0.0825645551 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 -49 0.544444442 0.0231540948 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.1091328 0.5625 0 0 0.434343427 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -33 0.366666675 0.134147868 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 -25 0.2777778 0.316697925 0.8125 0 0 0.3030303 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -40 0.444444448 0.179701015 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Not-in-family White Female United-States 1 -72 0.8 0.126630545 0.25 0 0 0.3030303 ? 7th-8th Divorced ? Not-in-family White Male United-States 0 -32 0.355555564 0.34580338 0.875 0 0 0.1010101 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -44 0.4888889 0.0661485 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -48 0.533333361 0.132084832 0.5625 0 0 0.3030303 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -17 0.188888893 0.0729256 0.375 0 0 0.121212125 Private 10th Never-married Sales Own-child White Female United-States 0 -50 0.5555556 0.143658176 0.6875 0 0.4331956 0.363636374 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -61 0.677777767 0.0651038438 0.625 0.1502415 0 0.343434334 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -22 0.244444445 0.277709037 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -17 0.188888893 0.0808699355 0.4375 0 0 0.171717167 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -49 0.544444442 0.0685132742 0.9375 0 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -26 0.2888889 0.08100464 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -19 0.211111113 0.09727791 0.625 0 0 0.1010101 State-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 -17 0.188888893 0.18261002 0.5 0 0 0.161616161 Private 12th Never-married Other-service Own-child White Female United-States 0 -38 0.422222227 0.172169566 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -34 0.377777785 0.0612471849 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Protective-serv Own-child Asian-Pac-Islander Male United-States 0 -51 0.566666663 0.109614372 0.5625 0.07298073 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -48 0.533333361 0.08652224 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -63 0.7 0.0207536183 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.110853672 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -73 0.811111152 0.0996851251 0.625 0.200512 0 0.363636374 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -51 0.566666663 0.145245686 0.5625 0 0 0.434343427 Private HS-grad Divorced Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.202717036 0.875 0 0.3409091 0.4040404 Private Masters Married-civ-spouse Other-service Husband Black Male ? 0 -54 0.6 0.283935875 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.100968882 0.5625 0 0.4242424 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -65 0.722222269 0.1622255 0.8125 0 0.5456841 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -36 0.4 0.09358088 0.8125 0.04386044 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.0449617952 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband Other Male United-States 0 -38 0.422222227 0.0695916042 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.07895306 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -37 0.411111116 0.019630162 0.8125 0 0 0.5050505 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.1243742 0.5625 0 0.3409091 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.01400615 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.209722474 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.08261574 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 -19 0.211111113 0.09266353 0.625 0 0 0.161616161 ? Some-college Never-married ? Own-child White Male United-States 0 -37 0.411111116 0.130456224 0.6875 0 0 0.424242437 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -29 0.322222233 0.09736345 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.154034644 0.125 0 0.597566545 0.323232323 Private 1st-4th Married-civ-spouse Craft-repair Not-in-family White Male Mexico 0 -60 0.6666667 0.124053605 0.5625 0.046500463 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -22 0.244444445 0.163788766 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -22 0.244444445 0.159176409 0.625 0 0.395087242 0.2020202 ? Some-college Never-married ? Own-child Black Male United-States 0 -60 0.6666667 0.1284309 0.6875 0 0 0.373737365 State-gov Assoc-voc Widowed Other-service Not-in-family Black Female United-States 0 -35 0.3888889 0.15746294 0.4375 0 0 0.2020202 Private 11th Separated Other-service Unmarried White Male United-States 0 -45 0.5 0.06883657 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.06418716 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Vietnam 1 -43 0.477777779 0.161987737 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.114482678 0.875 0 0 0.3838384 State-gov Masters Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.09762007 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.1426216 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Other-service Unmarried Black Female United-States 0 -61 0.677777767 0.05697226 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 1 -40 0.444444448 0.101618841 0.875 0.01506015 0 0.4040404 State-gov Masters Divorced Exec-managerial Unmarried White Female United-States 0 -20 0.222222224 0.126174569 0.375 0 0 0.3030303 ? 10th Never-married ? Not-in-family White Female United-States 0 -42 0.466666669 0.1270387 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -21 0.233333334 0.0806247741 0.625 0 0 0.353535354 Private Some-college Never-married Sales Unmarried White Female United-States 0 -21 0.233333334 0.185349956 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -26 0.2888889 0.2814977 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -36 0.4 0.13224715 0.5625 0 0 0.6060606 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.14949435 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Other-relative White Male United-States 0 -47 0.5222222 0.117153242 0.8125 0 0 0.575757563 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.08313369 0.75 0 0 0.3030303 Private Assoc-acdm Divorced Tech-support Not-in-family White Male United-States 0 -65 0.722222269 0.0968084559 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Not-in-family Black Female United-States 0 -61 0.677777767 0.136812359 0.8125 0 0 0.121212125 Private Bachelors Divorced Priv-house-serv Not-in-family White Female ? 0 -67 0.7444445 0.117661759 0.625 0 0 0.25252524 Private Some-college Widowed Sales Not-in-family White Female Nicaragua 0 -49 0.544444442 0.24081552 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -63 0.7 0.0201110654 0.5625 0 0.3409091 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -58 0.644444466 0.2115518 0.6875 0 0.4331956 0.4848485 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -61 0.677777767 0.188648924 0.25 0 0 0.4040404 Private 7th-8th Divorced Machine-op-inspct Unmarried White Female United-States 0 -36 0.4 0.173354313 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -19 0.211111113 0.111339293 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Other-relative Asian-Pac-Islander Male Vietnam 0 -29 0.322222233 0.073415935 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.179455861 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -60 0.6666667 0.103290558 0.5625 0.02597026 0 0.5555556 Self-emp-not-inc HS-grad Divorced Sales Not-in-family Black Male United-States 0 -21 0.233333334 0.02219296 0.625 0 0 0.4040404 Private Some-college Never-married Sales Unmarried White Male United-States 0 -22 0.244444445 0.122693062 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Unmarried White Female United-States 0 -33 0.366666675 0.126790166 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.200265378 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family Asian-Pac-Islander Female China 0 -37 0.411111116 0.07298824 0.8125 0 0 0.464646459 Private Bachelors Never-married Transport-moving Not-in-family White Male United-States 0 -35 0.3888889 0.221122041 0.75 0 0 0.4040404 Private Assoc-acdm Married-AF-spouse Adm-clerical Wife White Female United-States 0 -17 0.188888893 0.122689694 0.375 0 0 0.3030303 Private 10th Never-married Priv-house-serv Own-child White Male United-States 0 -37 0.411111116 0.114114255 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.222650975 0.5625 0 0 0.454545468 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -28 0.311111122 0.360999674 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.0197971985 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Female United-States 0 -57 0.6333333 0.174366623 0.5625 0.05178052 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Transport-moving Husband White Male Hungary 1 -26 0.2888889 0.248646036 0.625 0 0 0.656565666 Private Some-college Never-married Farming-fishing Other-relative White Female United-States 0 -45 0.5 0.173674241 0.4375 0 0 0.5050505 Local-gov 11th Married-civ-spouse Other-service Husband Black Male United-States 0 -32 0.355555564 0.110592343 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -63 0.7 0.0737634748 0.625 0 0 0.434343427 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 -22 0.244444445 0.07552814 0.625 0 0 0.2020202 Private Some-college Never-married Prof-specialty Other-relative Asian-Pac-Islander Female South 0 -36 0.4 0.107789092 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.03405862 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -34 0.377777785 0.09430224 0.9375 0 0 0.5555556 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.182748765 0.8125 0 0 0.6060606 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -20 0.222222224 0.123312712 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Female United-States 0 -47 0.5222222 0.107677288 0.5625 0 0 0.565656543 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -46 0.51111114 0.06906557 0.25 0 0 0.5252525 Private 7th-8th Never-married Other-service Own-child White Male United-States 0 -28 0.311111122 0.2005395 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 -45 0.5 0.1191597 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -26 0.2888889 0.111291468 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Female Thailand 0 -32 0.355555564 0.03545957 0.375 0 0 0.454545468 Self-emp-not-inc 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.0326947123 0.5 0 0 0.4040404 Local-gov 12th Married-civ-spouse Adm-clerical Wife White Female United-States 0 -59 0.655555546 0.188072383 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male Puerto-Rico 0 -58 0.644444466 0.17507115 1 0 0 0.434343427 State-gov Doctorate Never-married Exec-managerial Not-in-family White Female United-States 1 -45 0.5 0.149376482 0.625 0 0 0.3030303 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 -76 0.844444454 0.170679033 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Widowed Transport-moving Not-in-family White Male United-States 0 -38 0.422222227 0.201279715 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -32 0.355555564 0.21641539 0.875 0 0 0.4040404 Private Masters Never-married Sales Own-child Black Male United-States 0 -38 0.422222227 0.04369555 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -30 0.333333343 0.185378239 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Prof-specialty Unmarried Black Female United-States 0 -53 0.5888889 0.09082882 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male Greece 1 -41 0.455555558 0.0453551374 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male ? 0 -27 0.3 0.129557729 0.8125 0 0 0.5050505 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -44 0.4888889 0.1404508 0.75 0 0 0.3030303 Local-gov Assoc-acdm Married-civ-spouse Farming-fishing Husband White Male United-States 0 -35 0.3888889 0.107846342 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 -36 0.4 0.16854392 0.125 0 0 0.4040404 Private 1st-4th Never-married Other-service Other-relative Other Female El-Salvador 0 -51 0.566666663 0.01685924 0.625 0 0 0.1010101 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -42 0.466666669 0.172321782 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -40 0.444444448 0.01811269 0.8125 0.07298073 0 0.5050505 Self-emp-not-inc Bachelors Married-AF-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.07542172 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -55 0.6111111 0.27516377 0.3125 1 0 0.373737365 Private 9th Divorced Craft-repair Unmarried White Female United-States 1 -36 0.4 0.155611381 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -57 0.6333333 0.02022624 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 -27 0.3 0.196752891 0.5625 0 0 0.454545468 Private HS-grad Divorced Tech-support Not-in-family White Female United-States 0 -62 0.6888889 0.09311816 0.875 0.046500463 0 0.4040404 Private Masters Never-married Handlers-cleaners Not-in-family White Male United-States 0 -29 0.322222233 0.128494889 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.0280129723 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Never-married Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 -29 0.322222233 0.12577112 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.0529175848 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 -19 0.211111113 0.0946922153 0.5 0 0 0.3030303 ? 12th Never-married ? Own-child Black Male United-States 0 -32 0.355555564 0.155527189 0.875 0.0486504845 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -34 0.377777785 0.118666671 0.8125 0 0.3996786 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -25 0.2777778 0.122736171 0.75 0 0 0.5555556 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 0 -34 0.377777785 0.138548732 0.875 0 0 0.353535354 Local-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -37 0.411111116 0.0163951758 0.625 0 0 0.3838384 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.09307708 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.225415826 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -24 0.266666681 0.119569883 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 -17 0.188888893 0.102846019 0.5 0 0 0.3030303 Private 12th Never-married Other-service Own-child White Female United-States 0 -35 0.3888889 0.07729819 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 -31 0.344444454 0.178829461 0.6875 0 0 0.323232323 Private Assoc-voc Separated Tech-support Unmarried Black Female United-States 0 -29 0.322222233 0.121746749 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 -49 0.544444442 0.08615921 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -71 0.788888931 0.119825825 0.8125 0 0 0.1010101 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -35 0.3888889 0.123188108 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -55 0.6111111 0.284399271 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.149827749 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -33 0.366666675 0.127989739 0.625 0 0 0.181818187 Local-gov Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -49 0.544444442 0.189698964 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.07945215 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -63 0.7 0.214939 0.4375 0 0 0.4040404 ? 11th Separated ? Not-in-family Black Male United-States 0 -39 0.433333337 0.15188472 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -42 0.466666669 0.07027255 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Farming-fishing Husband White Male El-Salvador 0 -30 0.333333343 0.03247379 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -30 0.333333343 0.0981434062 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Male United-States 0 -48 0.533333361 0.0257559586 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -57 0.6333333 0.0184447411 0.8125 0 0 0.1010101 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -56 0.622222245 0.13757211 0.375 0 0 0.454545468 Private 10th Divorced Other-service Unmarried Black Female United-States 0 -28 0.311111122 0.277218044 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Own-child White Male Honduras 0 -43 0.477777779 0.148966968 0.8125 0 0 0.24242425 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -46 0.51111114 0.0364988334 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -60 0.6666667 0.06331022 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.0162584484 0.875 0 0 0.656565666 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -37 0.411111116 0.07577061 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.0935586542 0.5625 0 0 0.4040404 Private HS-grad Divorced Priv-house-serv Other-relative Black Female United-States 0 -38 0.422222227 0.125496313 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -23 0.25555557 0.1343378 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -59 0.655555546 0.08532133 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -72 0.8 0.07261645 0.875 0.0232902318 0 0.6060606 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -47 0.5222222 0.06305495 0.625 0 0 0.333333343 Local-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.23799476 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Other-relative White Male United-States 0 -35 0.3888889 0.0963545 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -24 0.266666681 0.1614213 0.625 0 0 0.151515156 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -22 0.244444445 0.112894483 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Female United-States 0 -24 0.266666681 0.2978868 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Own-child White Male United-States 0 -42 0.466666669 0.10049808 0.8125 0.07298073 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.117553994 0.8125 0 0 0.727272749 Federal-gov Bachelors Separated Other-service Unmarried White Female ? 0 -40 0.444444448 0.0337393619 0.875 0 0 0.2020202 State-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -61 0.677777767 0.181892022 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family Asian-Pac-Islander Female Japan 0 -58 0.644444466 0.08890049 0.8125 0 0 0.727272749 Self-emp-not-inc Bachelors Never-married Farming-fishing Own-child White Male United-States 0 -39 0.433333337 0.08509165 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Prof-specialty Not-in-family White Male United-States 0 -45 0.5 0.229754061 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -25 0.2777778 0.07308186 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -69 0.7666667 0.071775876 1 0 0 0.5050505 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 -36 0.4 0.0503743179 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Wife White Male ? 0 -34 0.377777785 0.0163439885 0.6875 0.07688077 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.18048501 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.122101024 0.5 0 0 0.454545468 ? 12th Married-civ-spouse ? Husband Black Male United-States 0 -28 0.311111122 0.06905951 0.625 0 0 0.4040404 Private Some-college Separated Handlers-cleaners Not-in-family Black Male United-States 0 -27 0.3 0.0469837449 0.625 0 0 0.6060606 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -41 0.455555558 0.141505554 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Not-in-family White Female United-States 0 -18 0.2 0.262103915 0.5625 0 0 0.3030303 State-gov HS-grad Never-married Sales Not-in-family Black Female United-States 0 -44 0.4888889 0.1418787 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -47 0.5222222 0.06385713 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 -36 0.4 0.201196209 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -66 0.733333349 0.159546182 0.0625 0 0 0.4040404 Private Preschool Widowed Priv-house-serv Other-relative White Female Guatemala 0 -33 0.366666675 0.114600547 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -39 0.433333337 0.112141475 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 1 -30 0.333333343 0.166468084 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 -34 0.377777785 0.137436062 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -62 0.6888889 0.0823368952 0.875 0 0 0.323232323 Self-emp-not-inc Masters Divorced Prof-specialty Unmarried White Female United-States 0 -21 0.233333334 0.121464536 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -50 0.5555556 0.104784451 0.875 0.07298073 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.0773972 0.8125 0.03103031 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.1305862 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.0756170452 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Other-relative White Female United-States 0 -26 0.2888889 0.115799434 0.6875 0 0 0.5050505 Federal-gov Assoc-voc Never-married Craft-repair Own-child White Male Japan 0 -50 0.5555556 0.06427877 0.25 0 0.3624885 0.656565666 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male Canada 0 -45 0.5 0.120992385 0.875 0 0 0.4040404 Federal-gov Masters Divorced Exec-managerial Not-in-family White Male United-States 1 -46 0.51111114 0.08479261 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -17 0.188888893 0.486097932 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Male United-States 0 -56 0.622222245 0.132934824 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.238293141 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 1 -47 0.5222222 0.225417852 0.875 0 0 0.424242437 Private Masters Separated Machine-op-inspct Unmarried Asian-Pac-Islander Female India 0 -23 0.25555557 0.158855125 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -51 0.566666663 0.237946942 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Separated Other-service Unmarried White Female United-States 0 -19 0.211111113 0.136768579 0.625 0 0 0.25252524 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -33 0.366666675 0.04238687 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.0798481852 0.5625 0 0 0.8080808 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -52 0.5777778 0.06680384 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -36 0.4 0.127751976 0.625 0 0 0.4040404 Private Some-college Separated Other-service Other-relative Black Female United-States 0 -34 0.377777785 0.152813524 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -26 0.2888889 0.07379513 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Female United-States 0 -26 0.2888889 0.0450406 0.5 0 0 0.989899 Self-emp-inc 12th Married-civ-spouse Sales Husband Other Male Dominican-Republic 0 -35 0.3888889 0.180703908 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.0938166156 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -32 0.355555564 0.139112487 0.4375 0 0 0.5050505 Private 11th Divorced Craft-repair Own-child White Male United-States 0 -23 0.25555557 0.136821121 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Other-relative White Female United-States 0 -28 0.311111122 0.1982872 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -20 0.222222224 0.260566235 0.375 0 0 0.353535354 Private 10th Never-married Other-service Other-relative White Male Mexico 0 -17 0.188888893 0.249146461 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Male United-States 0 -56 0.622222245 0.06056557 0.5625 0.03103031 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -26 0.2888889 0.118547454 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -43 0.477777779 0.162662625 0.8125 0.01506015 0 0.363636374 State-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -45 0.5 0.117481925 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -34 0.377777785 0.112815008 0.625 0.07688077 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -54 0.6 0.19712536 0.125 0 0 0.353535354 Private 1st-4th Married-civ-spouse Other-service Husband White Male Mexico 0 -51 0.566666663 0.0907978341 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Other-service Unmarried White Female United-States 0 -58 0.644444466 0.06449968 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -49 0.544444442 0.0563223027 0.75 0.02597026 0 0.4040404 Private Assoc-acdm Separated Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.14985469 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -44 0.4888889 0.0196099561 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -26 0.2888889 0.04488299 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -39 0.433333337 0.03632102 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -19 0.211111113 0.0294597242 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 -37 0.411111116 0.07028939 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -49 0.544444442 0.08392509 0.5625 0 0 0.323232323 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -45 0.5 0.07731974 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried Black Female United-States 0 -60 0.6666667 0.04534234 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 -28 0.311111122 0.0357963368 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family Black Male United-States 0 -23 0.25555557 0.009273896 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Machine-op-inspct Husband Amer-Indian-Eskimo Male United-States 0 -44 0.4888889 0.1366413 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -19 0.211111113 0.100712262 0.625 0 0 0.121212125 State-gov Some-college Never-married Farming-fishing Own-child White Male United-States 0 -37 0.411111116 0.08949859 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.07567968 0.5625 0 0 0.3838384 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -56 0.622222245 0.105225623 0.8125 0.07688077 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.08867081 0.75 0 0 0.545454562 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.104106881 0.8125 0 0 0.363636374 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Vietnam 1 -23 0.25555557 0.0891086161 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -44 0.4888889 0.0840214044 0.5625 0.03103031 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -38 0.422222227 0.186272025 0.5625 0.07688077 0 0.7070707 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.0714040846 0.625 0.05178052 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -57 0.6333333 0.09101741 0.875 0 0 0.2020202 Self-emp-not-inc Masters Never-married Farming-fishing Not-in-family White Male United-States 0 -35 0.3888889 0.0583604164 0.9375 0.07688077 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.0722237751 0.8125 1 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.07667382 0.625 0 0 1 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -76 0.844444454 0.01705322 0.875 0 0 0.151515156 Federal-gov Masters Widowed Prof-specialty Not-in-family White Female United-States 0 -57 0.6333333 0.128349409 0.5625 0 0 0.3030303 Local-gov HS-grad Divorced Handlers-cleaners Not-in-family Black Female United-States 0 -58 0.644444466 0.101051055 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Female United-States 0 -51 0.566666663 0.0325606763 0.875 0.07298073 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.142193913 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Husband Black Male United-States 0 -38 0.422222227 0.152428269 0.5625 0 0 0.25252524 Private HS-grad Married-AF-spouse Other-service Wife White Female United-States 0 -53 0.5888889 0.1911107 0.5625 0 0.459595948 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.0431749076 0.25 0 0 0.2020202 Self-emp-not-inc 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.158053622 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -44 0.4888889 0.166955724 0.6875 0.0861408561 0 0.4040404 Private Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 1 -23 0.25555557 0.4144709 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -23 0.25555557 0.109846741 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Sales Own-child White Male United-States 0 -44 0.4888889 0.12947017 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.249331012 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -28 0.311111122 0.16331999 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.114469208 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -34 0.377777785 0.09711155 0.0625 0 0 0.25252524 Local-gov Preschool Never-married Adm-clerical Own-child Black Female United-States 0 -38 0.422222227 0.08482022 0.8125 0.2782828 0 0.454545468 Private Bachelors Separated Exec-managerial Not-in-family White Male United-States 1 -26 0.2888889 0.137250841 0.625 0 0 0.373737365 Private Some-college Never-married Sales Not-in-family Black Female United-States 0 -39 0.433333337 0.142109722 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.318298936 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child Black Male United-States 0 -33 0.366666675 0.134901553 0.875 0 0 0.1919192 State-gov Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 -43 0.477777779 0.195102066 0.875 0 0.5847107 0.4040404 Private Masters Divorced Prof-specialty Unmarried White Female United-States 1 -30 0.333333343 0.0745077357 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family Asian-Pac-Islander Female China 0 -59 0.655555546 0.09403619 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.0264106337 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.0349975266 0.625 0 0 0.24242425 Private Some-college Never-married Tech-support Own-child Black Male United-States 0 -48 0.533333361 0.0793753639 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Other-service Not-in-family White Male United-States 0 -49 0.544444442 0.03418053 0.8125 0.01506015 0 0.353535354 Private Bachelors Widowed Prof-specialty Unmarried White Female United-States 0 -41 0.455555558 0.114645 0.5625 0 0.500229537 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -20 0.222222224 0.1022358 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -49 0.544444442 0.113295913 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -37 0.411111116 0.0792420059 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Other-relative White Male United-States 0 -18 0.2 0.10583315 0.5 0 0 0.08080808 Private 12th Never-married Sales Own-child White Female United-States 0 -61 0.677777767 0.152198583 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -26 0.2888889 0.119856134 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -66 0.733333349 0.09034118 0.8125 0 0 0.121212125 Private Bachelors Widowed Other-service Not-in-family White Male United-States 0 -68 0.75555557 0.129036412 0.875 0.0327303261 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -27 0.3 0.134149209 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Wife White Female United-States 0 -66 0.733333349 0.176837832 0.625 0 0 0.07070707 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -28 0.311111122 0.04474559 0.375 0 0 0.151515156 Private 10th Never-married Other-service Unmarried White Female United-States 0 -26 0.2888889 0.0523073636 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -25 0.2777778 0.155489475 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -46 0.51111114 0.129881024 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -62 0.6888889 0.12191917 0.8125 0 0 0.4040404 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -35 0.3888889 0.135006621 0.5625 0 0.453168035 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -26 0.2888889 0.0255390815 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -40 0.444444448 0.0747758 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family White Female United-States 0 -31 0.344444454 0.164790317 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male Honduras 0 -52 0.5777778 0.210464031 0.5625 0 0 0.4040404 Private HS-grad Widowed Transport-moving Not-in-family White Male United-States 0 -61 0.677777767 0.164000928 0.5625 0 0 0.121212125 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -39 0.433333337 0.102392733 0.4375 0 0 0.4040404 State-gov 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.07017758 0.5625 0.00114001136 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -47 0.5222222 0.115073368 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -33 0.366666675 0.0923334956 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband Other Male Ecuador 0 -17 0.188888893 0.229376882 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Own-child White Male United-States 0 -26 0.2888889 0.200864822 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -25 0.2777778 0.0768839642 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -39 0.433333337 0.131115615 0.5625 0 0 0.161616161 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.126790166 0.875 0.07298073 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.222873241 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -27 0.3 0.0539938919 0.625 0 0 0.2020202 Private Some-college Separated Adm-clerical Unmarried White Female United-States 0 -48 0.533333361 0.05620241 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.0576356947 0.4375 0 0 0.05050505 Self-emp-not-inc 11th Married-civ-spouse Other-service Wife White Female United-States 0 -40 0.444444448 0.07855567 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 -24 0.266666681 0.09428742 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child Black Male United-States 0 -55 0.6111111 0.09146801 0.8125 0 0.3624885 0.353535354 Private Bachelors Married-civ-spouse Exec-managerial Husband Other Male India 0 -56 0.622222245 0.0510438122 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.167448759 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.0192442276 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.0209758841 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.1461058 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -36 0.4 0.36988762 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.07496169 0.4375 0 0 0.5050505 Self-emp-not-inc 11th Never-married Craft-repair Own-child White Male Mexico 0 -25 0.2777778 0.140688553 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -36 0.4 0.164117455 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Own-child Black Female United-States 0 -37 0.411111116 0.220356241 0.625 0 0 0.7070707 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male ? 0 -39 0.433333337 0.08842699 0.75 0.05178052 0 0.4848485 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.173378557 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child Black Male United-States 0 -33 0.366666675 0.1450039 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child Black Male United-States 0 -31 0.344444454 0.0394569971 0.625 0 0 0.464646459 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -49 0.544444442 0.134287953 0.625 0 0 0.222222224 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -34 0.377777785 0.07690754 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Transport-moving Not-in-family White Male ? 0 -40 0.444444448 0.09255778 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband Asian-Pac-Islander Male Trinadad&Tobago 0 -27 0.3 0.145807415 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 -50 0.5555556 0.132352218 1 0 0 0.232323229 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -38 0.422222227 0.241037786 0.5 0 0 0.5050505 Private 12th Never-married Machine-op-inspct Not-in-family Black Female United-States 0 -55 0.6111111 0.172650456 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Exec-managerial Unmarried Black Male United-States 0 -49 0.544444442 0.113282442 0.25 0 0 0.7070707 Self-emp-not-inc 7th-8th Married-civ-spouse Other-service Husband White Male Italy 0 -40 0.444444448 0.145211339 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Other-service Not-in-family Other Male Mexico 0 -42 0.466666669 0.124389693 0.6875 0 0 0.3030303 Private Assoc-voc Divorced Tech-support Not-in-family White Female United-States 0 -51 0.566666663 0.115790009 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.194132179 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Own-child Asian-Pac-Islander Female Laos 0 -30 0.333333343 0.09703207 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -70 0.7777778 0.0369426943 1 0 0 0.2020202 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 -40 0.444444448 0.09536103 0.375 0 0 0.4040404 Private 10th Never-married Other-service Unmarried Black Female United-States 0 -43 0.477777779 0.121899642 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Separated Craft-repair Unmarried White Male United-States 0 -24 0.266666681 0.100160643 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -22 0.244444445 0.117616631 0.25 0 0 0.4040404 ? 7th-8th Never-married ? Own-child White Male United-States 0 -38 0.422222227 0.124469846 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -52 0.5777778 0.05998094 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.09920085 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -33 0.366666675 0.114482678 0.6875 0 0 0.4040404 Private Assoc-voc Separated Protective-serv Not-in-family White Female United-States 0 -21 0.233333334 0.150193483 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -27 0.3 0.0276815947 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -31 0.344444454 0.022305442 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -29 0.322222233 0.109483704 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female Hong 1 -49 0.544444442 0.08221566 0.1875 0 0.597566545 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Greece 0 -61 0.677777767 0.0289202239 0.8125 0 0 0.07070707 ? Bachelors Never-married ? Not-in-family White Male United-States 1 -46 0.51111114 0.2625727 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male Germany 1 -37 0.411111116 0.09358088 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -56 0.622222245 0.09555905 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -37 0.411111116 0.116334222 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.07982933 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -31 0.344444454 0.153489083 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -36 0.4 0.0543831959 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Wife Asian-Pac-Islander Female South 0 -52 0.5777778 0.134496748 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -40 0.444444448 0.15209958 0.625 0 0 0.6060606 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.118869409 0.5625 0 0 0.6060606 Private HS-grad Married-spouse-absent Exec-managerial Other-relative White Female United-States 0 -63 0.7 0.118391871 0.375 0 0 0.4040404 Private 10th Separated Machine-op-inspct Not-in-family Black Male United-States 0 -30 0.333333343 0.198699415 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.294890225 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Sales Husband White Male Peru 0 -50 0.5555556 0.181984976 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.163055286 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -39 0.433333337 0.07917735 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.09867213 0.5625 0 0 0.4848485 Private HS-grad Separated Machine-op-inspct Unmarried White Female United-States 0 -52 0.5777778 0.14979744 0.5625 0 0.5456841 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 -17 0.188888893 0.1458842 0.4375 0 0 0.2020202 ? 11th Never-married ? Own-child Black Female United-States 0 -46 0.51111114 0.106412388 0.6875 0 0.143480256 0.4040404 Private Assoc-voc Divorced Tech-support Unmarried Black Female United-States 0 -26 0.2888889 0.251600832 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -30 0.333333343 0.13122271 0.625 0 0.399449021 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.04063501 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -21 0.233333334 0.06498463 0.625 0 0 0.121212125 State-gov Some-college Never-married Adm-clerical Own-child Asian-Pac-Islander Female United-States 0 -39 0.433333337 0.1422195 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.166868165 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband Black Male United-States 0 -40 0.444444448 0.13755931 0.875 1 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.1327624 0.625 0 0 0.2020202 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -47 0.5222222 0.120118812 0.8125 0.0406404063 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -20 0.222222224 0.197545648 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male United-States 0 -35 0.3888889 0.0237959735 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.136091679 0.8125 0.14084141 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 1 -32 0.355555564 0.04169044 0.4375 0 0 0.151515156 Private 11th Divorced Other-service Unmarried White Female United-States 0 -42 0.466666669 0.739172459 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.119210213 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Unmarried White Male United-States 0 -27 0.3 0.198887318 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child Black Female United-States 0 -53 0.5888889 0.200858086 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.141397789 0.1875 0 0 0.25252524 Self-emp-not-inc 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -26 0.2888889 0.111091428 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -47 0.5222222 0.285054624 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.08369272 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Own-child Black Female United-States 0 -70 0.7777778 0.156846642 0.625 0 0 0.3030303 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.0493020527 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 0 -43 0.477777779 0.0186306369 0.875 0 0 0.454545468 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -65 0.722222269 0.310980976 0.5625 0 0 0.25252524 Private HS-grad Divorced Sales Unmarried White Female ? 0 -40 0.444444448 0.0602227375 0.5625 0 0.3838384 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -64 0.7111111 0.021435909 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.188373446 0.625 0 0 0.454545468 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -43 0.477777779 0.148966968 0.8125 0 0 0.353535354 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -50 0.5555556 0.14953813 0.5625 0 0 0.4848485 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -19 0.211111113 0.122088231 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 -32 0.355555564 0.175830215 0.8125 0.0217402168 0 0.6060606 Self-emp-not-inc Bachelors Never-married Prof-specialty Own-child Black Female ? 0 -32 0.355555564 0.137934476 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -42 0.466666669 0.2589794 0.4375 0.01506015 0 0.5050505 Private 11th Divorced Sales Unmarried White Male Mexico 0 -41 0.455555558 0.1943605 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.123064183 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female England 0 -20 0.222222224 0.3175392 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 -45 0.5 0.17784813 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.0987798944 1 0 0.43663913 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.136745691 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Machine-op-inspct Own-child White Male United-States 0 -43 0.477777779 0.147038639 0.8125 0 0 0.5050505 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 -28 0.311111122 0.09000105 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -35 0.3888889 0.0309401546 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -36 0.4 0.2625774 0.5625 0 0 0.5050505 ? HS-grad Married-spouse-absent ? Unmarried Black Male United-States 0 -38 0.422222227 0.135796 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -32 0.355555564 0.07727663 0.8125 0 0 0.353535354 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -50 0.5555556 0.06585685 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -34 0.377777785 0.100698121 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.0556487665 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -30 0.333333343 0.0323390849 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family White Female France 0 -61 0.677777767 0.109569244 0.1875 0 0 0.4040404 State-gov 5th-6th Married-civ-spouse Transport-moving Husband White Male United-States 0 -27 0.3 0.14402996 0.8125 0 0 0.3838384 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -61 0.677777767 0.149152189 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Female United-States 0 -18 0.2 0.287488759 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Other-relative White Male Mexico 0 -31 0.344444454 0.1391583 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -31 0.344444454 0.03386262 0.8125 0 0 0.6060606 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -20 0.222222224 0.121570952 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -35 0.3888889 0.14857161 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 0 -51 0.566666663 0.13656047 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 -43 0.477777779 0.0511839055 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.114867263 0.4375 0 0 0.2020202 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -55 0.6111111 0.07775215 0.9375 1 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -59 0.655555546 0.0164234657 0.5625 0 0 0.4040404 Private HS-grad Widowed Priv-house-serv Not-in-family White Female United-States 0 -21 0.233333334 0.140813828 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -22 0.244444445 0.0439312868 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Female United-States 0 -60 0.6666667 0.018499298 0.625 0 0 0.4040404 Federal-gov Some-college Widowed Exec-managerial Not-in-family White Female England 0 -49 0.544444442 0.121147975 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.297790468 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -61 0.677777767 0.163859487 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -64 0.7111111 0.2132592 0.1875 0 0 0.4040404 Private 5th-6th Divorced Craft-repair Not-in-family White Male United-States 0 -63 0.7 0.140675753 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -27 0.3 0.0260287412 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -23 0.25555557 0.095151566 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Own-child Black Female United-States 0 -41 0.455555558 0.0197507255 0.5625 0 0 0.454545468 State-gov HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -18 0.2 0.234786034 0.5 0 0 0.25252524 ? 12th Never-married ? Own-child Black Male United-States 0 -40 0.444444448 0.0840214044 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 1 -55 0.6111111 0.3218599 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.147073671 0.375 0 0.3677686 0.121212125 Private 10th Never-married Other-service Own-child White Female United-States 0 -34 0.377777785 0.105616271 0.625 0 0.3452709 0.6060606 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -24 0.266666681 0.1804702 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -30 0.333333343 0.0240613464 0.9375 0 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 -29 0.322222233 0.126077577 0.875 0 0 0.6060606 Private Masters Never-married Exec-managerial Not-in-family Asian-Pac-Islander Male United-States 0 -52 0.5777778 0.105059929 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -57 0.6333333 0.279512763 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.0696933046 0.8125 0 0 0.454545468 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -43 0.477777779 0.14220199 0.875 0 0 0.5050505 Private Masters Divorced Exec-managerial Not-in-family White Female United-States 1 -61 0.677777767 0.137027219 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Other-relative White Female United-States 0 -38 0.422222227 0.0258044526 0.8125 0.1502415 0 0.656565666 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.120051458 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 1 -40 0.444444448 0.175631523 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male Mexico 0 -41 0.455555558 0.0248695873 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -19 0.211111113 0.197069451 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -28 0.311111122 0.3111251 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -59 0.655555546 0.127745241 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.128360182 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -31 0.344444454 0.231830567 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.227313846 0.75 0 0 0.4848485 Private Assoc-acdm Never-married Machine-op-inspct Not-in-family White Male United-States 0 -54 0.6 0.0354508124 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.131272539 0.6875 0 0.5610652 0.424242437 Private Assoc-voc Separated Craft-repair Not-in-family White Male United-States 1 -20 0.222222224 0.114562154 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -27 0.3 0.127566755 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Female United-States 0 -32 0.355555564 0.138123065 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.208991021 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Wife Black Female United-States 0 -27 0.3 0.09028595 0.4375 0 0 0.454545468 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 -40 0.444444448 0.06193756 0.8125 0 0 0.464646459 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.103685245 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.157671735 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.124826148 0.625 0 0 0.25252524 Private Some-college Never-married Craft-repair Own-child White Female United-States 0 -28 0.311111122 0.110306092 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Other Male United-States 0 -65 0.722222269 0.05644219 0.625 0 0 0.272727281 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -61 0.677777767 0.09388465 0.625 0 0 0.161616161 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -18 0.2 0.322205424 0.4375 0 0 0.25252524 Private 11th Never-married Sales Own-child White Female United-States 0 -35 0.3888889 0.12584655 0.8125 0.05178052 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Own-child White Male United-States 1 -45 0.5 0.177006215 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -68 0.75555557 0.102482989 0.5625 0 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -25 0.2777778 0.07710825 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -48 0.533333361 0.07949256 0.9375 0 0 0.13131313 Private Prof-school Divorced Sales Not-in-family White Male United-States 0 -19 0.211111113 0.148245618 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.147789627 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family Black Female United-States 1 -54 0.6 0.125356212 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.323034555 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Sales Not-in-family White Male United-States 0 -25 0.2777778 0.0540929027 0.6875 0.0486504845 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.07300171 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -67 0.7444445 0.0848155 0.625 0 0 0.08080808 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -35 0.3888889 0.1192843 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Unmarried White Female United-States 0 -26 0.2888889 0.128484786 0.625 0 0 0.181818187 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -61 0.677777767 0.121661879 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -54 0.6 0.05928383 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Unmarried White Male United-States 0 -50 0.5555556 0.0911554843 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Sales Husband Asian-Pac-Islander Male Cambodia 1 -32 0.355555564 0.06779933 0.3125 0 0 0.4040404 Private 9th Separated Machine-op-inspct Unmarried White Female Columbia 0 -34 0.377777785 0.123631969 0.5625 0 0 0.25252524 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -36 0.4 0.107789092 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -50 0.5555556 0.206633642 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.181346461 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -22 0.244444445 0.207673579 0.5625 0 0 0.1919192 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -58 0.644444466 0.144937888 0.4375 0 0 0.2020202 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 -27 0.3 0.2823093 0.1875 0 0 0.75757575 Private 5th-6th Never-married Other-service Not-in-family White Male Mexico 0 -62 0.6888889 0.119107164 0.8125 0 0 0.3838384 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -36 0.4 0.124237478 0.8125 0.2782828 0 0.5555556 Self-emp-inc Bachelors Never-married Tech-support Not-in-family White Male United-States 1 -21 0.233333334 0.208356544 0.625 0.005940059 0 0.04040404 Local-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -41 0.455555558 0.038253393 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Wife White Female England 0 -28 0.311111122 0.13596034 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.1209055 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -54 0.6 0.196507052 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.164302677 0.625 0 0.395087242 0.25252524 Private Some-college Never-married Sales Own-child Amer-Indian-Eskimo Female United-States 0 -76 0.844444454 0.07891736 0.25 0 0 0.3030303 Self-emp-not-inc 7th-8th Never-married Farming-fishing Not-in-family White Male United-States 0 -25 0.2777778 0.06796165 0.8125 0 0 0.25252524 ? Bachelors Married-civ-spouse ? Wife White Female United-States 0 -34 0.377777785 0.107308865 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.177053362 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.12598598 0.4375 0 0 0.3030303 Private 11th Never-married Sales Unmarried White Female United-States 0 -17 0.188888893 0.186961725 0.4375 0 0 0.151515156 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -55 0.6111111 0.113875151 0.625 0 0 0.2020202 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -51 0.566666663 0.06478728 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -26 0.2888889 0.0414917432 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband Other Male Mexico 0 -44 0.4888889 0.0294408668 0.8125 0 0 0.4848485 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -65 0.722222269 0.133281022 0.375 0 0 0.7070707 ? 10th Married-civ-spouse ? Husband White Male United-States 0 -54 0.6 0.0669722259 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.11964599 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 -42 0.466666669 0.1358674 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Male United-States 0 -26 0.2888889 0.149691686 0.5625 0 0 0.7070707 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -39 0.433333337 0.0580202825 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 0 -46 0.51111114 0.153983459 0.4375 0 0 0.4040404 ? 11th Widowed ? Unmarried Black Female United-States 0 -34 0.377777785 0.233065829 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male El-Salvador 0 -59 0.655555546 0.0589410029 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -20 0.222222224 0.02554851 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -34 0.377777785 0.124646313 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -62 0.6888889 0.0845238641 0.5625 0.05178052 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female Scotland 1 -51 0.566666663 0.1076005 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.07330547 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -47 0.5222222 0.0745393857 0.8125 0 0 0.5050505 Private Bachelors Separated Prof-specialty Unmarried White Female United-States 0 -21 0.233333334 0.14825505 0.625 0 0 0.2020202 ? Some-college Never-married ? Own-child White Male United-States 0 -30 0.333333343 0.0305966511 0.6875 0 0 0.4949495 Self-emp-not-inc Assoc-voc Divorced Craft-repair Not-in-family White Male United-States 0 -38 0.422222227 0.104174905 0.5625 0 0 0.6060606 Private HS-grad Separated Sales Not-in-family White Male United-States 0 -45 0.5 0.175979748 0.8125 0.05178052 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female Philippines 1 -23 0.25555557 0.0484028831 0.625 0 0 0.353535354 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -34 0.377777785 0.116854869 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.171275109 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -31 0.344444454 0.07535706 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -50 0.5555556 0.09862498 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.318451822 0.125 0 0 0.5252525 Private 1st-4th Never-married Handlers-cleaners Other-relative White Male Mexico 0 -28 0.311111122 0.192155346 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Sales Wife Black Female United-States 1 -23 0.25555557 0.124378249 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.138648421 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -28 0.311111122 0.0564954 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -27 0.3 0.120269015 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -46 0.51111114 0.113689929 0.8125 0 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -27 0.3 0.181479827 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -25 0.2777778 0.03189388 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Other-service Wife White Female United-States 0 -34 0.377777785 0.0197035782 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.104628868 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 -36 0.4 0.1577896 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Female United-States 0 -30 0.333333343 0.173670188 0.25 0 0 0.4848485 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.153720781 0.625 0 0 0.474747479 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 -36 0.4 0.153306559 0.1875 0 0 0.323232323 Private 5th-6th Married-spouse-absent Craft-repair Other-relative White Male Mexico 0 -29 0.322222233 0.274011344 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -50 0.5555556 0.0185484663 0.625 0.07688077 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -19 0.211111113 0.06550864 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -20 0.222222224 0.156274825 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -52 0.5777778 0.11351683 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -20 0.222222224 0.347407073 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.236667216 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.108451173 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -60 0.6666667 0.0179975145 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.1105425 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family Black Male United-States 0 -59 0.655555546 0.06628792 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -36 0.4 0.0200807564 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Other-relative White Male United-States 0 -25 0.2777778 0.171490639 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male Cuba 0 -49 0.544444442 0.139877617 0.25 0 0 0.7070707 Private 7th-8th Divorced Craft-repair Not-in-family White Male United-States 0 -25 0.2777778 0.146177188 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Other-service Unmarried White Female United-States 0 -50 0.5555556 0.115308434 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Unmarried White Female United-States 0 -44 0.4888889 0.133541688 0.75 0 0 0.434343427 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.08844181 0.5625 0 0 0.4040404 ? HS-grad Separated ? Unmarried White Female United-States 0 -33 0.366666675 0.0538308956 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.320145756 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Separated Craft-repair Own-child White Male United-States 0 -56 0.622222245 0.09044625 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -56 0.622222245 0.0496704727 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.08454542 0.8125 0 0 0.424242437 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -38 0.422222227 0.104853153 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried Black Female United-States 0 -21 0.233333334 0.205393672 0.625 0 0 0.1010101 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -67 0.7444445 0.101377718 0.25 0 0 0.24242425 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.167774752 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 0 -50 0.5555556 0.110545196 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -59 0.655555546 0.205279171 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.105773874 0.4375 0 0 0.4040404 Private 11th Widowed Handlers-cleaners Unmarried Black Female United-States 0 -30 0.333333343 0.267082 0.5625 0 0 0.2929293 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 -42 0.466666669 0.343551069 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -64 0.7111111 0.134718344 0.5625 0 0 0.2020202 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -61 0.677777767 0.0408438034 0.8125 0 0 0.454545468 ? Bachelors Never-married ? Not-in-family White Female United-States 0 -26 0.2888889 0.0601641424 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -47 0.5222222 0.13502413 0.6875 0.0406404063 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -78 0.8666667 0.0557787567 0.625 0 0 0.0303030312 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.07894497 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -27 0.3 0.136192709 0.4375 0 0 0.4040404 Private 11th Separated Farming-fishing Other-relative White Male Puerto-Rico 0 -51 0.566666663 0.08313369 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.238102525 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -55 0.6111111 0.01797192 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -20 0.222222224 0.137832776 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Male United-States 0 -30 0.333333343 0.15158096 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.06652904 0.625 0 0 0.3030303 ? Some-college Never-married ? Not-in-family White Male United-States 0 -19 0.211111113 0.1777673 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -30 0.333333343 0.07290809 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.248970672 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Married-civ-spouse Craft-repair Not-in-family White Male United-States 1 -26 0.2888889 0.228546411 0.5625 0 0 0.969697 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -59 0.655555546 0.09804911 0.75 0 0 0.353535354 ? Assoc-acdm Married-civ-spouse ? Husband White Male United-States 1 -53 0.5888889 0.213721246 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -24 0.266666681 0.109731562 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.1254889 0.625 0 0 0.545454562 Private Some-college Separated Prof-specialty Own-child White Male United-States 0 -36 0.4 0.171213821 0.5625 0 0 0.5050505 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -39 0.433333337 0.07283602 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -53 0.5888889 0.193517908 0.5625 0 0 0.323232323 Private HS-grad Divorced Machine-op-inspct Unmarried Black Male United-States 0 -75 0.8333334 0.05491596 0.5625 0 0 0.353535354 Self-emp-inc HS-grad Widowed Sales Other-relative Asian-Pac-Islander Male United-States 1 -36 0.4 0.0242101979 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.138026074 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -56 0.622222245 0.140640065 0.5625 0 0.43663913 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -29 0.322222233 0.09000105 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -60 0.6666667 0.048280973 0.3125 0 0 0.4949495 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -58 0.644444466 0.3842932 0.5625 0 0 0.3838384 Private HS-grad Widowed Sales Not-in-family White Male United-States 0 -67 0.7444445 0.0248372573 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -35 0.3888889 0.170408264 0.625 0.07688077 0 0.3838384 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.0337413847 0.625 0 0 0.8080808 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -37 0.411111116 0.2269003 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -54 0.6 0.09149292 0.625 0 0 0.5050505 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -63 0.7 0.113186121 0.9375 0 0 0.3030303 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -47 0.5222222 0.1266036 0.4375 0 0 0.3838384 Private 11th Divorced Other-service Not-in-family White Female United-States 0 -23 0.25555557 0.07904803 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -55 0.6111111 0.172779113 0.5625 0.0486504845 0 0.454545468 Private HS-grad Separated Machine-op-inspct Not-in-family White Male United-States 0 -49 0.544444442 0.205034673 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Wife White Female United-States 0 -39 0.433333337 0.167043969 0.6875 0.05178052 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -23 0.25555557 0.154795736 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -19 0.211111113 0.107628115 0.625 0 0 0.121212125 Private Some-college Never-married Other-service Own-child White Female United-States 0 -44 0.4888889 0.111366235 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.0170983467 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Unmarried Amer-Indian-Eskimo Female United-States 0 -35 0.3888889 0.330705434 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Own-child Black Male United-States 0 -23 0.25555557 0.166855365 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Own-child White Female Cuba 0 -48 0.533333361 0.121594526 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.1276092 0.625 0.0217602178 0 0.4040404 Private Some-college Divorced Handlers-cleaners Own-child White Male United-States 0 -44 0.4888889 0.282301217 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -55 0.6111111 0.114612669 0.8125 0 0 0.25252524 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 -33 0.366666675 0.116854869 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.284921259 0.5 0 0 0.2020202 Private 12th Never-married Handlers-cleaners Own-child White Male United-States 0 -24 0.266666681 0.0485746339 0.8125 0.0220202189 0 0.3030303 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -32 0.355555564 0.0130005628 0.75 0 0 0.565656543 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male England 1 -24 0.266666681 0.173516631 0.8125 0 0 0.2020202 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -44 0.4888889 0.07961986 0.8125 1 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.1750112 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -39 0.433333337 0.07765112 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male France 1 -26 0.2888889 0.107537866 0.375 0 0 0.4040404 Local-gov 10th Married-civ-spouse Other-service Husband White Male United-States 0 -34 0.377777785 0.255807042 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.153528824 0.875 1 0 0.656565666 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.0249201022 0.875 0 0 0.75757575 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -73 0.811111152 0.08889443 0.8125 0 0 0.05050505 ? Bachelors Married-civ-spouse ? Husband Asian-Pac-Islander Male Vietnam 0 -32 0.355555564 0.0835533 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -56 0.622222245 0.183931485 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -59 0.655555546 0.114570908 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.06482702 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.09491111 0.8125 0 0.365013778 0.4040404 Private Bachelors Never-married Sales Own-child Asian-Pac-Islander Male South 0 -52 0.5777778 0.155355439 0.5625 0.0378103778 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Other Male Columbia 0 -30 0.333333343 0.131727174 0.625 0.0332503319 0 0.5050505 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -23 0.25555557 0.07932013 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -43 0.477777779 0.0759497657 0.5625 0.0861408561 0 0.434343427 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 1 -61 0.677777767 0.0537662357 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.06999707 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -68 0.75555557 0.108940162 0.375 0 0 0.161616161 Private 10th Married-civ-spouse Sales Husband White Male United-States 0 -41 0.455555558 0.07185198 0.875 0.2782828 0 0.5050505 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 -42 0.466666669 0.132358953 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -48 0.533333361 0.0417490341 0.3125 0 0 0.2020202 ? 9th Separated ? Not-in-family Amer-Indian-Eskimo Female United-States 0 -19 0.211111113 0.1061524 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -31 0.344444454 0.0925214142 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Handlers-cleaners Not-in-family Asian-Pac-Islander Male India 0 -40 0.444444448 0.07466938 0.75 0 0.5456841 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.0504362844 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family Asian-Pac-Islander Female Philippines 0 -51 0.566666663 0.06643879 0.5625 0.14084141 0 0.4040404 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 1 -44 0.4888889 0.0975129753 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.119745679 0.8125 0 0 0.3030303 Private Bachelors Never-married Sales Own-child White Female England 0 -30 0.333333343 0.06981252 0.4375 0 0 0.353535354 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -44 0.4888889 0.109185331 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.146562457 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -34 0.377777785 0.3186714 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -17 0.188888893 0.07631213 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male ? 0 -61 0.677777767 0.0544862449 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -30 0.333333343 0.113414451 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -45 0.5 0.0262341686 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family White Male United-States 0 -22 0.244444445 0.07260769 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -49 0.544444442 0.128831655 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -39 0.433333337 0.138316363 0.75 0 0 0.454545468 Private Assoc-acdm Widowed Adm-clerical Unmarried White Female United-States 0 -39 0.433333337 0.161800489 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband Black Male United-States 0 -34 0.377777785 0.136967957 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative White Female United-States 0 -52 0.5777778 0.103093885 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.136699885 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.07082215 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.160620466 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Own-child White Male United-States 0 -24 0.266666681 0.7311318 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -25 0.2777778 0.055607006 0.75 0 0 0.434343427 Private Assoc-acdm Never-married Other-service Own-child White Male United-States 0 -71 0.788888931 0.0376943573 0.25 0 0 0.1010101 Private 7th-8th Widowed Transport-moving Not-in-family White Male United-States 0 -27 0.3 0.108497649 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Wife Black Female United-States 0 -28 0.311111122 0.175979748 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family Black Female United-States 0 -54 0.6 0.12270923 0.6875 0.1502415 0 0.3838384 Private Assoc-voc Married-civ-spouse Protective-serv Husband Black Male Jamaica 1 -18 0.2 0.09356539 0.4375 0 0 0.1010101 Private 11th Never-married Sales Own-child Black Female United-States 0 -49 0.544444442 0.13484025 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -36 0.4 0.138316363 0.5625 0 0 0.25252524 Private HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 -57 0.6333333 0.168519 0.5625 0 0 0.5050505 Private HS-grad Widowed Transport-moving Unmarried White Male United-States 0 -56 0.622222245 0.04522986 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male Portugal 1 -17 0.188888893 0.164694667 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Male United-States 0 -30 0.333333343 0.159357592 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.07322195 0.375 0 0 0.4040404 Private 10th Never-married Sales Own-child White Female United-States 0 -26 0.2888889 0.119314611 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -61 0.677777767 0.08705164 0.375 0 0 0.4848485 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.149781272 0.625 0 0 0.4040404 ? Some-college Divorced ? Unmarried White Male United-States 0 -24 0.266666681 0.09773726 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -44 0.4888889 0.04193291 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family White Female United-States 0 -38 0.422222227 0.07293907 0.875 0 0 0.4040404 State-gov Masters Never-married Prof-specialty Other-relative White Female United-States 0 -61 0.677777767 0.112671547 0.25 0 0 0.4040404 ? 7th-8th Widowed ? Not-in-family Black Female United-States 0 -25 0.2777778 0.065864265 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Own-child White Male United-States 0 -34 0.377777785 0.0750418454 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.252254844 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -42 0.466666669 0.193468735 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.229941308 0.375 0 0 0.2020202 ? 10th Never-married ? Own-child Black Male United-States 0 -48 0.533333361 0.187268853 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.06624885 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.213531986 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -55 0.6111111 0.198285192 0.6875 0.068490684 0 0.4040404 State-gov Assoc-voc Widowed Prof-specialty Unmarried White Female United-States 0 -41 0.455555558 0.162254453 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Divorced Farming-fishing Other-relative White Male United-States 0 -45 0.5 0.02215659 0.1875 0 0 0.353535354 Private 5th-6th Never-married Machine-op-inspct Own-child White Female United-States 0 -49 0.544444442 0.06560967 0.25 0 0 0.454545468 Private 7th-8th Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male Laos 0 -19 0.211111113 0.04873359 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -39 0.433333337 0.230650544 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -43 0.477777779 0.126423776 0.625 0.0217402168 0 0.454545468 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -42 0.466666669 0.204342276 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -17 0.188888893 0.0756318644 0.4375 0 0 0.121212125 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -30 0.333333343 0.1405451 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Prof-specialty Not-in-family Black Female United-States 0 -61 0.677777767 0.01911154 0.875 0 0 0.7070707 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -48 0.533333361 0.1396082 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -60 0.6666667 0.059725672 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -57 0.6333333 0.03223334 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -27 0.3 0.2508916 0.1875 0 0 0.454545468 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -24 0.266666681 0.12862353 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -41 0.455555558 0.02559229 0.5 0 0 0.8484849 Private 12th Divorced Transport-moving Not-in-family White Male United-States 1 -42 0.466666669 0.17331928 0.5625 0 0 0.4040404 Private HS-grad Widowed Transport-moving Unmarried White Male United-States 0 -34 0.377777785 0.0859497339 0.8125 0 0 0.151515156 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -22 0.244444445 0.09383952 0.3125 0 0 0.363636374 ? 9th Never-married ? Unmarried Black Female United-States 0 -47 0.5222222 0.110744558 0.5625 0 0 0.434343427 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -50 0.5555556 0.070385024 0.5625 0 0.454545438 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -30 0.333333343 0.03779943 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -38 0.422222227 0.199509 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.106175974 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.149864122 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -34 0.377777785 0.175808 0.625 0 0.379017442 0.3838384 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.09871793 0.5625 0.143441439 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Male United-States 1 -34 0.377777785 0.0787429139 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.08931135 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -68 0.75555557 0.124965571 0.625 0 0 0.2020202 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -22 0.244444445 0.3372522 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female Mexico 0 -42 0.466666669 0.122656018 0.8125 0 0 0.353535354 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -37 0.411111116 0.155917168 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.161254257 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -38 0.422222227 0.12073914 0.625 0 0 0.3030303 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -72 0.8 0.08150037 0.5625 0 0 0.5555556 Without-pay HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -40 0.444444448 0.169994712 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 -19 0.211111113 0.110175423 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Male United-States 0 -55 0.6111111 0.09649459 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Hungary 1 -30 0.333333343 0.19256486 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.07617271 0.8125 0 0.2506887 0.4040404 Private Bachelors Separated Adm-clerical Unmarried White Female United-States 0 -29 0.322222233 0.187671632 0.8125 0.03103031 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.11755871 0.625 0 0 0.04040404 Private Some-college Married-civ-spouse Prof-specialty Husband Black Male United-States 0 -29 0.322222233 0.127115488 0.8125 0 0 0.454545468 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.0485907979 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -46 0.51111114 0.221064791 0.9375 0 0 0.454545468 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.111682124 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.213983253 0.375 0 0 0.151515156 Private 10th Never-married Sales Own-child Black Female United-States 0 -35 0.3888889 0.145027474 0.6875 0 0 0.353535354 Private Assoc-voc Divorced Other-service Unmarried White Female United-States 0 -38 0.422222227 0.129951075 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -36 0.4 0.105308466 0.3125 0 0 0.4040404 Private 9th Never-married Handlers-cleaners Own-child White Male United-States 0 -24 0.266666681 0.1044423 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.102795504 0.8125 0 0 1 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -19 0.211111113 0.201313391 0.4375 0 0 0.4040404 Private 11th Never-married Sales Not-in-family White Female Honduras 0 -30 0.333333343 0.130192876 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.101238295 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -27 0.3 0.2588447 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -27 0.3 0.205863789 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 1 -66 0.733333349 0.122837871 0.25 0 0 0.3030303 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -65 0.722222269 0.01582402 0.625 0 0.499081731 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -37 0.411111116 0.283984363 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family Black Female United-States 1 -17 0.188888893 0.03887843 0.4375 0 0 0.3030303 Private 11th Never-married Sales Own-child White Male United-States 0 -19 0.211111113 0.20733884 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -57 0.6333333 0.06973776 0.1875 0 0 0.5050505 Private 5th-6th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -54 0.6 0.09175156 0.875 0 0 0.3030303 Self-emp-not-inc Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -21 0.233333334 0.1559724 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -43 0.477777779 0.163536862 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Not-in-family White Male United-States 0 -50 0.5555556 0.11023806 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.193776548 0.4375 0 0 0.4848485 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -31 0.344444454 0.126328126 0.5625 0.1502415 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.149864122 0.9375 0 0 0.3838384 Private Prof-school Divorced Prof-specialty Unmarried White Female United-States 0 -20 0.222222224 0.0278546922 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.03996417 0.8125 0 0 0.151515156 Private Bachelors Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 -62 0.6888889 0.0570860878 0.3125 0 0 0.353535354 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 -41 0.455555558 0.274414778 0.5 0 0 0.4040404 Private 12th Divorced Machine-op-inspct Not-in-family Black Female United-States 0 -37 0.411111116 0.109398164 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.118175671 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -28 0.311111122 0.0354299359 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.168807954 0.875 0 0 0.3030303 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.157589555 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -28 0.311111122 0.253452361 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -50 0.5555556 0.131768942 0.375 0 0 0.4040404 Private 10th Separated Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.152067244 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Not-in-family White Male Mexico 0 -84 0.933333337 0.26159 0.25 0 0 0.1010101 Private 7th-8th Married-civ-spouse Prof-specialty Husband Black Male United-States 0 -48 0.533333361 0.1475182 0.9375 0 0 0.353535354 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -61 0.677777767 0.113594286 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -44 0.4888889 0.121646389 0.625 0 0 0.424242437 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.07728539 0.5625 0 0 0.6060606 Private HS-grad Separated Handlers-cleaners Unmarried Asian-Pac-Islander Female South 0 -25 0.2777778 0.119914062 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -47 0.5222222 0.107795827 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.180860177 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 -37 0.411111116 0.117763467 0.625 0 0 0.171717167 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -28 0.311111122 0.0555585138 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Own-child Asian-Pac-Islander Female United-States 0 -34 0.377777785 0.1489636 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 -32 0.355555564 0.0323390849 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Divorced Other-service Not-in-family White Female United-States 0 -24 0.266666681 0.1463092 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -22 0.244444445 0.119823135 0.625 0 0 0.25252524 ? Some-college Never-married ? Not-in-family Asian-Pac-Islander Female United-States 0 -30 0.333333343 0.02652783 0.625 0 0 1 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -56 0.622222245 0.02518615 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.07774339 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.07688935 0.625 0 0 0.262626261 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -40 0.444444448 0.08021863 0.625 0 0.4331956 0.686868668 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.242827371 0.625 0 0 0.454545468 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -39 0.433333337 0.151911661 0.5 0 0 0.4040404 Private 12th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -33 0.366666675 0.07303673 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.1551251 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family Asian-Pac-Islander Male Dominican-Republic 0 -32 0.355555564 0.106419794 0.625 0 0 0.5555556 Private Some-college Never-married Machine-op-inspct Other-relative White Male Ecuador 0 -37 0.411111116 0.120877884 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -71 0.788888931 0.06728205 0.1875 0 0 0.75757575 Private 5th-6th Widowed Priv-house-serv Not-in-family Asian-Pac-Islander Female United-States 0 -30 0.333333343 0.182453081 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -20 0.222222224 0.0284763649 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -53 0.5888889 0.1127362 0.5625 0 0.399449021 0.5050505 Federal-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.1851634 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -44 0.4888889 0.0241866242 0.8125 0 0.43663913 0.565656543 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.0458010174 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -21 0.233333334 0.018294543 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child White Female United-States 0 -37 0.411111116 0.1927292 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-spouse-absent Other-service Unmarried Black Female United-States 0 -36 0.4 0.0642969459 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -25 0.2777778 0.0337460972 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Female United-States 0 -54 0.6 0.344626039 1 0 0.453856736 0.434343427 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.127755344 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.0774995759 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -20 0.222222224 0.1451083 0.625 0 0 0.3838384 State-gov Some-college Never-married Craft-repair Own-child White Male United-States 0 -32 0.355555564 0.117726423 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -24 0.266666681 0.0619645 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Exec-managerial Not-in-family White Male United-States 0 -59 0.655555546 0.06798051 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -56 0.622222245 0.08019708 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -40 0.444444448 0.18689774 0.5625 0 0 0.8484849 Self-emp-not-inc HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -35 0.3888889 0.178932518 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -38 0.422222227 0.07718099 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -24 0.266666681 0.1532924 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -30 0.333333343 0.08736214 0.625 0 0.4242424 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -61 0.677777767 0.11789009 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -36 0.4 0.0899633244 0.125 0 0 0.4040404 Private 1st-4th Never-married Farming-fishing Not-in-family White Male Mexico 0 -20 0.222222224 0.20788911 0.625 0 0 0.2020202 Local-gov Some-college Never-married Protective-serv Own-child Asian-Pac-Islander Female United-States 0 -36 0.4 0.10512796 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -45 0.5 0.256028652 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -22 0.244444445 0.14196828 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -31 0.344444454 0.127809227 0.5625 0 0.459366381 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -34 0.377777785 0.174226537 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -24 0.266666681 0.150445372 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Unmarried White Male United-States 0 -42 0.466666669 0.137951314 0.3125 0 0 0.353535354 ? 9th Never-married ? Own-child Black Male United-States 0 -23 0.25555557 0.2756305 0.8125 0 0 0.25252524 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -46 0.51111114 0.207500488 0.9375 0 0 0.4040404 Federal-gov Prof-school Separated Prof-specialty Unmarried White Female Germany 1 -60 0.6666667 0.107124984 0.9375 0 0 0.7070707 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male Germany 1 -40 0.444444448 0.237853318 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried Black Female United-States 0 -55 0.6111111 0.0963356346 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -47 0.5222222 0.2053317 0.875 0.2782828 0 0.4040404 Private Masters Separated Tech-support Not-in-family White Male United-States 1 -28 0.311111122 0.0208202973 0.5625 0 0 0.434343427 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -55 0.6111111 0.0841918141 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.122154236 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -54 0.6 0.228072241 0.875 0 0 0.5252525 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.07812259 0.4375 0 0 0.6060606 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 -38 0.422222227 0.07484854 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -61 0.677777767 0.135564312 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Widowed Machine-op-inspct Not-in-family White Female United-States 0 -62 0.6888889 0.09251265 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male South 0 -29 0.322222233 0.08986297 0.625 0.0501305 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.129458711 0.5625 0 0 0.323232323 Private HS-grad Never-married Protective-serv Not-in-family Black Female United-States 0 -19 0.211111113 0.148178264 0.625 0 0 0.5050505 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -40 0.444444448 0.237496346 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.114114255 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -42 0.466666669 0.214868277 0.5625 0.0288502872 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -55 0.6111111 0.08065643 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Other-relative Asian-Pac-Islander Female Thailand 0 -55 0.6111111 0.136202142 0.5625 0.02407024 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 -43 0.477777779 0.0668280944 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.07494755 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.175954819 0.625 0 0 0.454545468 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -28 0.311111122 0.176280811 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female Mexico 0 -36 0.4 0.122592032 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 -49 0.544444442 0.0273899529 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -41 0.455555558 0.145793945 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Own-child Black Female United-States 0 -60 0.6666667 0.215784281 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -35 0.3888889 0.190577254 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.112276182 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -51 0.566666663 0.195901543 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -23 0.25555557 0.306701332 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male Guatemala 0 -51 0.566666663 0.0557572059 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.0380789451 0.4375 0.010550105 0 0.181818187 Private 11th Never-married Sales Own-child White Female India 0 -33 0.366666675 0.07406118 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.119839974 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 -38 0.422222227 0.1295456 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.159137338 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -26 0.2888889 0.0226374939 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -21 0.233333334 0.141094029 0.625 0 0 0.474747479 Private Some-college Never-married Sales Own-child White Female United-States 0 -26 0.2888889 0.166367054 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.210084155 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -39 0.433333337 0.137910232 0.625 0 0 0.2020202 ? Some-college Divorced ? Not-in-family White Female United-States 0 -33 0.366666675 0.202519029 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Other-service Not-in-family Black Male United-States 0 -42 0.466666669 0.01634264 0.625 0 0 0.3838384 State-gov Some-college Divorced Transport-moving Unmarried White Male United-States 0 -28 0.311111122 0.179207325 0.9375 0 0 0.5050505 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 -20 0.222222224 0.15287751 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -66 0.733333349 0.243930623 0.8125 0 0.5064279 0.25252524 Local-gov Bachelors Widowed Prof-specialty Not-in-family Black Female United-States 0 -31 0.344444454 0.230127871 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male India 0 -36 0.4 0.120891355 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Male Canada 0 -39 0.433333337 0.1642562 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 1 -52 0.5777778 0.1748381 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -61 0.677777767 0.107645631 0.25 0.07688077 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male Poland 1 -27 0.3 0.148085311 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -45 0.5 0.139385939 0.5625 0 0 0.5050505 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.1654012 0.3125 0 0 0.4040404 Private 9th Never-married Other-service Own-child Amer-Indian-Eskimo Male United-States 0 -25 0.2777778 0.0259229951 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -24 0.266666681 0.122922741 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -38 0.422222227 0.130541086 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male Italy 0 -51 0.566666663 0.351359367 0.625 0 0 0.24242425 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -29 0.322222233 0.03128029 0.8125 0 0.43663913 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -45 0.5 0.040591903 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -59 0.655555546 0.178053558 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -41 0.455555558 0.129193351 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Own-child White Male United-States 0 -23 0.25555557 0.07266225 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -43 0.477777779 0.117582284 0.625 0 0 0.454545468 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 -17 0.188888893 0.09653837 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 -32 0.355555564 0.0849542543 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.133776739 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -68 0.75555557 0.142309085 0.875 0 0.549127638 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.160430521 0.5625 0 0.4331956 0.4040404 Federal-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -43 0.477777779 0.173623726 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -61 0.677777767 0.123495914 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -28 0.311111122 0.09997205 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -47 0.5222222 0.0479698 0.5625 0 0 0.6060606 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -21 0.233333334 0.1594721 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Never-married Craft-repair Not-in-family White Male United-States 0 -39 0.433333337 0.02165144 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -39 0.433333337 0.234047174 0.4375 0 0.430670351 0.464646459 Private 11th Divorced Craft-repair Not-in-family White Male United-States 0 -34 0.377777785 0.12171711 0.625 0 0.500229537 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 -57 0.6333333 0.127215177 0.3125 0 0 0.4040404 ? 9th Divorced ? Not-in-family White Male United-States 0 -27 0.3 0.206604689 0.8125 0 0 0.4040404 Private Bachelors Divorced Handlers-cleaners Own-child Black Male United-States 0 -21 0.233333334 0.32225728 0.625 0 0 0.121212125 State-gov Some-college Never-married Other-service Own-child Black Female United-States 0 -25 0.2777778 0.167703345 0.1875 0 0 0.4040404 Private 5th-6th Never-married Machine-op-inspct Not-in-family White Male Mexico 0 -51 0.566666663 0.031171849 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.09969321 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child Black Female United-States 0 -19 0.211111113 0.187320039 0.625 0 0 0.121212125 Private Some-college Never-married Other-service Own-child White Male United-States 0 -27 0.3 0.128325164 0.8125 0.07298073 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.118995361 0.625 0 0 0.353535354 Private Some-college Never-married Sales Other-relative Black Female United-States 0 -33 0.366666675 0.136300474 0.5625 0 0 0.323232323 ? HS-grad Divorced ? Unmarried White Female United-States 0 -36 0.4 0.160580724 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -33 0.366666675 0.0255532246 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -60 0.6666667 0.0240108315 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.258295774 0.625 0.1502415 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.138007224 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Prof-specialty Wife Black Female United-States 0 -42 0.466666669 0.01401558 0.5625 0 0 0.75757575 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 1 -34 0.377777785 0.09982253 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.134809941 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -30 0.333333343 0.1141614 0.875 0 0 0.151515156 Private Masters Married-civ-spouse Other-service Husband White Male United-States 1 -53 0.5888889 0.0154764755 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 -34 0.377777785 0.247118458 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Germany 0 -37 0.411111116 0.21886301 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -27 0.3 0.2165932 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Female United-States 0 -31 0.344444454 0.162564278 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -30 0.333333343 0.139801517 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -33 0.366666675 0.148756832 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -41 0.455555558 0.22669217 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.0379886925 0.625 0 0 0.3030303 State-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -65 0.722222269 0.121424794 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -30 0.333333343 0.05474623 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -51 0.566666663 0.05814758 0.6875 0.0406404063 0 0.5555556 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -30 0.333333343 0.018219782 0.625 0 0 0.4040404 Local-gov Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -49 0.544444442 0.193740174 0.875 0.04787048 0 0.454545468 Private Masters Divorced Sales Not-in-family White Male United-States 1 -37 0.411111116 0.123751856 0.5625 0.031370312 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -42 0.466666669 0.0678922758 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -62 0.6888889 0.104461156 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Exec-managerial Wife White Female United-States 1 -67 0.7444445 0.06916728 0.5625 0.0108601088 0 0.353535354 ? HS-grad Widowed ? Not-in-family White Male United-States 0 -31 0.344444454 0.101739407 0.625 0.05178052 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -50 0.5555556 0.369340032 0.8125 0 0 0.2020202 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -33 0.366666675 0.11709936 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Other-relative Asian-Pac-Islander Male India 0 -27 0.3 0.233819515 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Other-relative White Male United-States 0 -31 0.344444454 0.214955837 0.6875 0.04386044 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Mexico 1 -35 0.3888889 0.13317056 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Other-relative Amer-Indian-Eskimo Male United-States 0 -55 0.6111111 0.132763073 0.625 0 0 0.0606060624 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -54 0.6 0.0736968 0.8125 0 0.453856736 0.353535354 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -56 0.622222245 0.122625038 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -21 0.233333334 0.124296077 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -66 0.733333349 0.118244365 0.25 0 0 0.2020202 Private 7th-8th Widowed Other-service Not-in-family White Female Germany 0 -46 0.51111114 0.08218872 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.22936745 0.8125 0 0 0.3838384 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -43 0.477777779 0.06866684 0.875 0 0 0.454545468 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -40 0.444444448 0.120904826 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -52 0.5777778 0.151758775 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -59 0.655555546 0.0359020829 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.190342188 0.6875 0 0 0.4040404 Local-gov Assoc-voc Separated Adm-clerical Own-child Black Female United-States 0 -33 0.366666675 0.123941123 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -20 0.222222224 0.168494761 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.1323273 0.5625 0 0 0.353535354 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -59 0.655555546 0.148704961 0.375 0 0 0.4040404 ? 10th Widowed ? Unmarried White Female United-States 0 -42 0.466666669 0.120414495 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.04436437 0.5625 0 0 0.434343427 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -54 0.6 0.0238828585 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -35 0.3888889 0.0666704848 0.25 0 0 0.3030303 Private 7th-8th Never-married Machine-op-inspct Own-child White Female United-States 0 -36 0.4 0.189998686 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 -21 0.233333334 0.0948094055 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -30 0.333333343 0.0223101564 0.5625 0 0 0.141414136 Private HS-grad Separated Farming-fishing Unmarried White Female United-States 0 -46 0.51111114 0.0606463924 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -32 0.355555564 0.06936462 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female Laos 1 -21 0.233333334 0.144397035 0.625 0 0 0.646464646 Private Some-college Never-married Sales Other-relative White Male United-States 0 -39 0.433333337 0.121685453 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -54 0.6 0.187464178 0.5625 0 0 0.434343427 Private HS-grad Married-spouse-absent Exec-managerial Not-in-family White Female United-States 0 -32 0.355555564 0.124226704 0.625 0.0346403457 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.0946060047 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -42 0.466666669 0.13643451 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Italy 0 -62 0.6888889 0.121952176 0.375 0 0 0.3030303 ? 10th Widowed ? Not-in-family White Female United-States 0 -28 0.311111122 0.1934849 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.14545314 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.05560162 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 -19 0.211111113 0.0281166974 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -27 0.3 0.04956338 0.5625 0 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -54 0.6 0.177762583 0.125 0 0 0.5050505 Private 1st-4th Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.132092908 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Female United-States 0 -27 0.3 0.191782877 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -30 0.333333343 0.197976038 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Not-in-family White Male ? 0 -35 0.3888889 0.22929 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -66 0.733333349 0.118468657 0.3125 0 0 0.4040404 ? 9th Married-civ-spouse ? Husband White Male United-States 0 -19 0.211111113 0.186550871 0.625 0 0 0.2020202 Local-gov Some-college Never-married Prof-specialty Own-child White Female United-States 0 -30 0.333333343 0.1088425 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -32 0.355555564 0.09703207 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -31 0.344444454 0.159217492 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -26 0.2888889 0.151506871 0.6875 0 0 0.656565666 Private Assoc-voc Never-married Sales Other-relative Black Male United-States 0 -44 0.4888889 0.101901725 0.625 0 0 0.25252524 Private Some-college Widowed Sales Not-in-family White Female United-States 0 -52 0.5777778 0.0464617573 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.162917882 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -32 0.355555564 0.127608523 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family White Female United-States 0 -19 0.211111113 0.0242553242 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Own-child White Male United-States 0 -33 0.366666675 0.0574895367 0.5625 0 0 0.3030303 Private HS-grad Separated Machine-op-inspct Not-in-family White Male United-States 0 -20 0.222222224 0.106145665 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -61 0.677777767 0.132878929 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.244322613 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family Black Female United-States 0 -24 0.266666681 0.26624617 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Female United-States 0 -31 0.344444454 0.0976281539 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Divorced Craft-repair Not-in-family White Male United-States 0 -20 0.222222224 0.110234022 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Own-child White Female United-States 0 -32 0.355555564 0.0952983946 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Exec-managerial Unmarried White Female United-States 0 -29 0.322222233 0.09960834 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Wife White Female United-States 0 -61 0.677777767 0.156804219 0.375 0 0 0.24242425 Private 10th Divorced Other-service Not-in-family White Male United-States 0 -48 0.533333361 0.0475973338 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -29 0.322222233 0.0224388018 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 -61 0.677777767 0.0427869521 0.5 0 0 0.5252525 ? 12th Never-married ? Not-in-family Black Male United-States 0 -34 0.377777785 0.398537755 0.625 0 0 0.4848485 Private Some-college Never-married Handlers-cleaners Not-in-family Black Male ? 0 -22 0.244444445 0.134921074 0.75 0 0 0.151515156 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -32 0.355555564 0.06581981 0.5625 0 0.3838384 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.07357085 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.06929929 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried White Female United-States 0 -26 0.2888889 0.112551652 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative Asian-Pac-Islander Male Hong 0 -35 0.3888889 0.123188108 0.5625 0.0861408561 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 1 -62 0.6888889 0.1333046 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.045386795 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -50 0.5555556 0.08526408 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family Black Male United-States 0 -34 0.377777785 0.03331908 0.8125 1 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -37 0.411111116 0.08077632 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -63 0.7 0.106552482 0.125 0 0 0.444444448 Private 1st-4th Widowed Machine-op-inspct Unmarried White Female Portugal 0 -35 0.3888889 0.229743958 0.3125 0 0 0.4040404 Private 9th Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -55 0.6111111 0.0683799163 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.1366413 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 1 -25 0.2777778 0.1314746 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband Other Male United-States 0 -51 0.566666663 0.0863956138 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.17720288 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.240853235 0.8125 0.07298073 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.0691235 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 1 -26 0.2888889 0.115251184 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -46 0.51111114 0.1457623 0.6875 0 0 0.4040404 Private Assoc-voc Married-spouse-absent Craft-repair Unmarried White Male United-States 0 -24 0.266666681 0.086046055 0.5 0 0 0.4040404 Private 12th Never-married Craft-repair Other-relative White Male United-States 0 -19 0.211111113 0.190406859 0.25 0 0 0.8080808 Private 7th-8th Never-married Adm-clerical Own-child White Male United-States 0 -35 0.3888889 0.09386646 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.210671484 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Own-child Black Male United-States 0 -18 0.2 0.06254711 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child White Female United-States 0 -46 0.51111114 0.118156806 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.07019778 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -29 0.322222233 0.09751701 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -65 0.722222269 0.120518222 0.5625 0 0 0.2020202 Private HS-grad Widowed Other-service Unmarried Black Female Jamaica 0 -41 0.455555558 0.142286181 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 -34 0.377777785 0.08966226 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -58 0.644444466 0.06973776 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -39 0.433333337 0.1163194 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Unmarried Black Female United-States 0 -21 0.233333334 0.19026272 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -31 0.344444454 0.217588678 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -33 0.366666675 0.196331263 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.1446092 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.07816704 0.5625 0.0297702979 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -32 0.355555564 0.152687579 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -31 0.344444454 0.146040469 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 -41 0.455555558 0.103139684 0.9375 0.1502415 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.207071438 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male Philippines 1 -27 0.3 0.187324762 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -45 0.5 0.08230255 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Unmarried Black Female United-States 0 -34 0.377777785 0.105670825 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -17 0.188888893 0.0248379316 0.375 0 0 0.1010101 Private 10th Never-married Sales Own-child White Female United-States 0 -25 0.2777778 0.0883529 0.5625 0 0 0.232323229 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -34 0.377777785 0.0420258567 0.8125 0 0 0.6262626 Self-emp-inc Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -33 0.366666675 0.0492043868 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -21 0.233333334 0.06522778 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.218846172 0.5625 0 0 0.5050505 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -61 0.677777767 0.08802018 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -40 0.444444448 0.120551221 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -58 0.644444466 0.054581888 0.625 0 0 0.121212125 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.102355018 0.625 0 0 0.5858586 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.187314659 0.5625 0 0 0.6060606 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -52 0.5777778 0.12335515 0.5 0 0 0.5050505 Self-emp-not-inc 12th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.12368653 0.5625 0 0 0.4040404 Private HS-grad Widowed Sales Unmarried White Female United-States 0 -49 0.544444442 0.166963816 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 -22 0.244444445 0.149174422 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -32 0.355555564 0.0798481852 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female ? 1 -21 0.233333334 0.349247843 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -25 0.2777778 0.130522221 0.625 0 0 0.5050505 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 -34 0.377777785 0.106058784 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -48 0.533333361 0.0953125358 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Exec-managerial Husband White Male United-States 1 -61 0.677777767 0.106898 0.5625 0 0 1 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -21 0.233333334 0.169901088 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -20 0.222222224 0.135009989 0.25 0 0 0.5252525 Private 7th-8th Never-married Machine-op-inspct Own-child White Female United-States 0 -30 0.333333343 0.231553748 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -44 0.4888889 0.187004834 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -44 0.4888889 0.196379751 0.5625 0 0 0.6060606 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 -29 0.322222233 0.101960994 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.1489636 0.9375 0 0 0.353535354 Private Prof-school Divorced Tech-support Not-in-family White Female United-States 0 -35 0.3888889 0.132132649 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.203691646 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -26 0.2888889 0.0251760464 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -37 0.411111116 0.0555935353 0.3125 0 0 0.7070707 Self-emp-not-inc 9th Married-civ-spouse Transport-moving Husband White Male United-States 1 -33 0.366666675 0.123206973 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Transport-moving Not-in-family White Male ? 0 -44 0.4888889 0.107705571 0.25 0 0 0.5555556 Private 7th-8th Married-civ-spouse Other-service Wife White Female United-States 0 -34 0.377777785 0.143315345 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.1395651 0.75 0 0 0.05050505 Local-gov Assoc-acdm Never-married Craft-repair Own-child White Male United-States 0 -30 0.333333343 0.134836212 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -41 0.455555558 0.121300869 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -23 0.25555557 0.129865527 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Female United-States 0 -19 0.211111113 0.07133269 0.5625 0 0 0.7070707 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -48 0.533333361 0.2514749 0.125 0.0378103778 0 0.5050505 Private 1st-4th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -26 0.2888889 0.157735035 0.625 0 0 0.2020202 State-gov Some-college Never-married Other-service Not-in-family White Male United-States 0 -32 0.355555564 0.1757036 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 1 -26 0.2888889 0.07348059 0.5625 0 0 0.4848485 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.115439095 0.875 0.07298073 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.14086704 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.194682449 0.5625 0 0.3996786 0.4040404 ? HS-grad Divorced ? Not-in-family Black Male United-States 0 -54 0.6 0.1160372 0.875 0 0 0.4040404 Private Masters Divorced Tech-support Not-in-family White Male United-States 1 -36 0.4 0.04918351 0.5625 0 0 0.5555556 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -41 0.455555558 0.08259284 0.5625 0 0 0.4848485 Private HS-grad Divorced Handlers-cleaners Unmarried White Male United-States 0 -27 0.3 0.076537095 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -68 0.75555557 0.173279539 0.8125 0 0.5456841 0.353535354 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -21 0.233333334 0.129187956 0.625 0 0 0.75757575 ? Some-college Never-married ? Own-child White Male United-States 0 -56 0.622222245 0.0240606721 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Own-child White Male United-States 0 -40 0.444444448 0.0207172465 0.6875 0 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -46 0.51111114 0.0709413663 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -55 0.6111111 0.253288031 0.3125 0 0 0.454545468 ? 9th Never-married ? Own-child White Female United-States 0 -43 0.477777779 0.14771083 0.3125 0 0 0.4040404 Private 9th Divorced Transport-moving Not-in-family Black Male United-States 0 -46 0.51111114 0.1401403 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Other-relative White Male United-States 0 -51 0.566666663 0.05296069 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 -19 0.211111113 0.1416497 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -67 0.7444445 0.128416762 1 0.07896079 0 0.5050505 Local-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 1 -31 0.344444454 0.400205433 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.153886467 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -21 0.233333334 0.08527822 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -36 0.4 0.0203858688 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -23 0.25555557 0.146029681 0.5625 0 0 0.161616161 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -62 0.6888889 0.07797037 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -31 0.344444454 0.134281218 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 1 -52 0.5777778 0.1076005 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.126850113 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -24 0.266666681 0.2813138 0.8125 0 0 0.3030303 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -55 0.6111111 0.0955119058 0.5625 0.135501355 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 1 -38 0.422222227 0.199579716 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -36 0.4 0.111064486 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -17 0.188888893 0.304711044 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child Black Female United-States 0 -27 0.3 0.0287572276 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 -30 0.333333343 0.177135527 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family Black Male United-States 0 -43 0.477777779 0.112680972 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -51 0.566666663 0.06973035 0.4375 0 0 0.3030303 Private 11th Divorced Other-service Unmarried Black Female United-States 0 -47 0.5222222 0.06592757 0.8125 0.25236252 0 0.353535354 Private Bachelors Widowed Priv-house-serv Unmarried White Female United-States 1 -49 0.544444442 0.181461647 1 0 0.518365443 0.5050505 State-gov Doctorate Never-married Exec-managerial Not-in-family White Female United-States 1 -34 0.377777785 0.1343964 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.02657767 0.5625 0 0 0.6060606 ? HS-grad Never-married ? Own-child White Male United-States 0 -79 0.8777778 0.04187768 1 0 0 0.0606060624 Federal-gov Doctorate Widowed Exec-managerial Not-in-family White Male United-States 1 -28 0.311111122 0.1610623 0.625 0 0 0.4040404 State-gov Some-college Divorced Other-service Unmarried White Male United-States 0 -41 0.455555558 0.101763651 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -21 0.233333334 0.223351449 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -31 0.344444454 0.137039348 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -45 0.5 0.1020526 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.0268363077 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -32 0.355555564 0.2018145 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Germany 0 -67 0.7444445 0.08310944 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.141131073 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.160841376 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -29 0.322222233 0.3362264 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -38 0.422222227 0.134855077 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.07682267 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -18 0.2 0.292603582 0.5625 0 0 0.3030303 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -47 0.5222222 0.124863192 0.5625 0.0501305 0 0.24242425 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -22 0.244444445 0.151650324 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.254549563 0.625 0 0.5456841 0.4848485 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -27 0.3 0.08982188 0.8125 0 0 0.5050505 ? Bachelors Married-spouse-absent ? Not-in-family White Male ? 0 -28 0.311111122 0.152818918 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Unmarried Asian-Pac-Islander Female ? 0 -32 0.355555564 0.136045888 0.9375 0.04508045 0 0.4040404 Private Prof-school Married-civ-spouse Sales Husband White Male ? 0 -40 0.444444448 0.193309784 0.9375 0.1502415 0 0.5555556 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male Germany 1 -23 0.25555557 0.102316625 0.8125 0 0.3946281 0.4040404 Private Bachelors Never-married Machine-op-inspct Own-child White Female United-States 0 -25 0.2777778 0.156067371 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -44 0.4888889 0.120232642 0.625 0 0.518365443 0.6060606 Self-emp-inc Some-college Never-married Sales Not-in-family White Male United-States 0 -43 0.477777779 0.120472416 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -31 0.344444454 0.07452188 0.8125 0 0.453856736 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.0998588949 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.146764517 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.0520015769 0.875 0 0 0.3030303 Self-emp-not-inc Masters Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.253933966 0.75 0 0 0.4040404 ? Assoc-acdm Never-married ? Own-child White Male United-States 0 -78 0.8666667 0.124441557 0.25 0.01797018 0 0.151515156 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -64 0.7111111 0.0541070476 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.178544566 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.0687395856 0.5 0 0 0.3030303 ? 12th Widowed ? Not-in-family White Male United-States 0 -20 0.222222224 0.224854767 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -35 0.3888889 0.199688151 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -27 0.3 0.07857588 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.237958387 0.5625 1 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.09592748 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.13525112 0.5 0 0 0.353535354 Local-gov 12th Married-civ-spouse Adm-clerical Husband White Male Puerto-Rico 0 -29 0.322222233 0.08018563 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Female United-States 0 -33 0.366666675 0.113814533 0.125 0 0 0.24242425 Private 1st-4th Never-married Sales Own-child White Female United-States 0 -44 0.4888889 0.102229066 0.625 0 0 0.4040404 Private Some-college Widowed Exec-managerial Not-in-family Black Female United-States 0 -70 0.7777778 0.159671456 0.1875 0.0234602336 0 0.4040404 Private 5th-6th Widowed Other-service Other-relative White Female ? 0 -25 0.2777778 0.34341234 0.5625 0 0 0.7878788 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -24 0.266666681 0.167969391 0.8125 0 0 0.1010101 State-gov Bachelors Never-married Adm-clerical Other-relative White Female United-States 0 -42 0.466666669 0.07372643 0.8125 0.0297702979 0 0.4040404 State-gov Bachelors Divorced Adm-clerical Unmarried Black Female United-States 0 -53 0.5888889 0.168406516 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -39 0.433333337 0.168195039 0.8125 0 0 0.6060606 Private Bachelors Divorced Exec-managerial Unmarried Black Female United-States 0 -72 0.8 0.174284458 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -43 0.477777779 0.0431385376 0.3125 0 0 0.444444448 Self-emp-inc 9th Never-married Sales Own-child White Female Portugal 0 -25 0.2777778 0.103410445 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -37 0.411111116 0.130541086 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.1721433 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -39 0.433333337 0.13775599 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -64 0.7111111 0.107723758 0.5625 0.0263502635 0 0.24242425 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male Italy 0 -29 0.322222233 0.154469073 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 -50 0.5555556 0.08630873 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.11819116 0.1875 0 0 0.4040404 Private 5th-6th Never-married Other-service Unmarried White Female Mexico 0 -18 0.2 0.203282133 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -20 0.222222224 0.160918832 0.4375 0 0 0.323232323 Private 11th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 -32 0.355555564 0.1384659 0.625 0 0 0.5050505 Private Some-college Separated Tech-support Unmarried White Female United-States 0 -45 0.5 0.2292314 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -48 0.533333361 0.09958881 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Wife Black Female United-States 0 -20 0.222222224 0.08151317 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -23 0.25555557 0.1747795 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -34 0.377777785 0.128125116 0.8125 0 0.43663913 0.4848485 Federal-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -43 0.477777779 0.121639654 0.8125 0.0861408561 0 0.4040404 Private Bachelors Separated Exec-managerial Unmarried White Male United-States 1 -44 0.4888889 0.07837112 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband Asian-Pac-Islander Male United-States 1 -47 0.5222222 0.121536605 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Tech-support Husband Black Male United-States 1 -47 0.5222222 0.177977443 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Not-in-family Black Female United-States 0 -46 0.51111114 0.133351743 0.125 0 0 0.2020202 Local-gov 1st-4th Never-married Other-service Not-in-family Amer-Indian-Eskimo Female United-States 0 -19 0.211111113 0.139151558 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -51 0.566666663 0.210914627 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -41 0.455555558 0.0668227 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Separated Exec-managerial Unmarried White Male United-States 0 -37 0.411111116 0.22940518 0.4375 0 0 0.4040404 Private 11th Separated Other-service Unmarried Black Female United-States 0 -31 0.344444454 0.04238687 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -25 0.2777778 0.030215431 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -46 0.51111114 0.0362987928 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -53 0.5888889 0.102922805 0.5625 0.05178052 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.0864825 1 0 0 0.4040404 Local-gov Doctorate Never-married Prof-specialty Unmarried White Female United-States 0 -28 0.311111122 0.226948112 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -60 0.6666667 0.0642855 0.625 0.031370312 0 0.464646459 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -43 0.477777779 0.03678239 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -45 0.5 0.212826118 0.5625 0.07688077 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.141653061 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Other-relative White Male Mexico 0 -19 0.211111113 0.121923216 0.4375 0 0 0.3030303 Private 11th Never-married Handlers-cleaners Other-relative White Male United-States 0 -51 0.566666663 0.08135017 0.9375 1 0 0.7070707 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband Other Male India 1 -19 0.211111113 0.173084214 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -64 0.7111111 0.0318568349 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.08450231 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.14141193 0.5625 0 0 0.4848485 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.122748964 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -63 0.7 0.05176786 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Protective-serv Husband Asian-Pac-Islander Male Philippines 1 -44 0.4888889 0.0619308241 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -44 0.4888889 0.0922647938 0.875 0.1502415 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.123556532 0.5625 0 0 0.7070707 Federal-gov HS-grad Never-married Exec-managerial Unmarried White Female Puerto-Rico 0 -24 0.266666681 0.088058576 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 -20 0.222222224 0.129236445 0.625 0 0 0.2020202 Federal-gov Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -21 0.233333334 0.157555208 0.625 0 0 0.24242425 ? Some-college Never-married ? Own-child White Female United-States 0 -20 0.222222224 0.0324111544 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -21 0.233333334 0.204957888 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 -34 0.377777785 0.191757292 0.625 0 0 0.5252525 Federal-gov Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -17 0.188888893 0.2702207 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Female United-States 0 -35 0.3888889 0.163909331 0.4375 0 0 0.4040404 Private 11th Separated Other-service Unmarried Black Female United-States 0 -26 0.2888889 0.0217389986 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -35 0.3888889 0.074451156 0.5625 0 0 0.7070707 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -25 0.2777778 0.173307166 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -27 0.3 0.277462542 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -52 0.5777778 0.264475435 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 -43 0.477777779 0.035359215 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 -36 0.4 0.150489837 0.875 0.07688077 0 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -37 0.411111116 0.05864869 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -58 0.644444466 0.151446924 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.130247429 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 0 -54 0.6 0.06630004 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Other-service Husband White Male United-States 0 -42 0.466666669 0.07855567 0.625 0 0 0.6060606 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -65 0.722222269 0.141698852 0.8125 1 0 0.656565666 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.0610814951 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Female Laos 0 -61 0.677777767 0.154740512 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male El-Salvador 0 -29 0.322222233 0.0402315632 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 -34 0.377777785 0.1299248 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.0606490858 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Not-in-family White Female Canada 0 -40 0.444444448 0.183847979 0.75 0 0 0.424242437 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -42 0.466666669 0.102425061 0.9375 0 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male Cuba 1 -50 0.5555556 0.20312655 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -18 0.2 0.115823686 0.5625 0 0.3677686 0.2020202 ? HS-grad Never-married ? Own-child White Female United-States 0 -49 0.544444442 0.212826118 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.162969753 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -41 0.455555558 0.08863108 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -70 0.7777778 0.140053421 0.625 0 0 0.05050505 Self-emp-inc Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -51 0.566666663 0.0358300135 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.08151317 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -57 0.6333333 0.193458632 0.5625 0 0 0.4848485 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.110399708 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -31 0.344444454 0.129206821 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.1378954 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 0 -45 0.5 0.1488363 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -39 0.433333337 0.246337831 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.0337460972 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -38 0.422222227 0.190807611 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -38 0.422222227 0.131025359 0.875 1 0 0.6060606 Self-emp-not-inc Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -19 0.211111113 0.177367225 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -36 0.4 0.340048015 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -30 0.333333343 0.234788731 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.11715728 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.152309716 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Not-in-family Black Male Jamaica 0 -32 0.355555564 0.116100505 0.8125 0 0 0.3838384 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -57 0.6333333 0.08602922 0.9375 0.1502415 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.233733311 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -36 0.4 0.128870726 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.1668877 0.4375 0 0 0.3838384 Private 11th Never-married Sales Own-child White Female United-States 0 -25 0.2777778 0.176913261 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -37 0.411111116 0.06456165 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Unmarried White Female United-States 0 -31 0.344444454 0.0501789935 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -43 0.477777779 0.165229455 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -61 0.677777767 0.01957224 0.5625 0 0.6322314 0.25252524 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -56 0.622222245 0.134919733 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -35 0.3888889 0.1335895 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 0 -59 0.655555546 0.06765856 0.25 0 0 0.3838384 Private 7th-8th Separated Other-service Own-child Black Female United-States 0 -44 0.4888889 0.2311503 0.625 0 0.4331956 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.158740625 0.875 0 0 0.4040404 Private Masters Divorced Prof-specialty Unmarried White Female United-States 0 -44 0.4888889 0.05606299 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -64 0.7111111 0.0595875978 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -26 0.2888889 0.133899331 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.113225862 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.132142752 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male ? 0 -30 0.333333343 0.1383561 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -46 0.51111114 0.468383282 0.5625 0 0 0.444444448 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.0938018039 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -44 0.4888889 0.129837915 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -59 0.655555546 0.08243389 0.625 0 0.453856736 0.4848485 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -65 0.722222269 0.124580309 1 1 0 0.4040404 Self-emp-inc Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.121799953 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Female United-States 0 -33 0.366666675 0.10746108 0.625 0 0 0.3838384 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -34 0.377777785 0.07446193 0.5625 0 0 0.353535354 Private HS-grad Divorced Sales Own-child White Female United-States 0 -38 0.422222227 0.0696933046 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -62 0.6888889 0.120056845 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.09346503 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Male United-States 0 -41 0.455555558 0.216759562 0.5625 0 0 0.08080808 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.164883256 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male Peru 0 -62 0.6888889 0.138790533 0.625 0 0 0.454545468 Local-gov Some-college Divorced Other-service Not-in-family White Male United-States 0 -53 0.5888889 0.112918727 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -69 0.7666667 0.11025019 0.625 0 0 0.161616161 State-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.0306768026 0.625 0 0 0.161616161 Self-emp-not-inc Some-college Never-married Sales Own-child White Female United-States 0 -47 0.5222222 0.2835486 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.04581045 0.625 0 0 0.909090936 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.118268616 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.100136392 0.5625 0 0 0.1010101 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -30 0.333333343 0.138964981 0.5625 0 0 0.7373737 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -39 0.433333337 0.183429033 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -73 0.811111152 0.0713178739 0.8125 0.0117301168 0 0.75757575 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -64 0.7111111 0.210478187 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.119670242 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -51 0.566666663 0.102922805 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -57 0.6333333 0.214939669 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -25 0.2777778 0.142994061 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Male United-States 0 -53 0.5888889 0.140311375 0.5625 0 0.399449021 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -39 0.433333337 0.162214726 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -49 0.544444442 0.1407539 0.5625 0 0 0.161616161 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.297944039 0.8125 0 0.2506887 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.133492514 0.8125 0 0 0.5555556 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -46 0.51111114 0.175832242 0.875 0 0.453856736 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.04902725 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child Black Male United-States 0 -24 0.266666681 0.18548803 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -20 0.222222224 0.131855831 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 -50 0.5555556 0.311823577 0.375 0 0 0.08080808 Private 10th Married-civ-spouse Other-service Husband White Male El-Salvador 0 -24 0.266666681 0.178778946 0.8125 0 0 0.4040404 ? Bachelors Never-married ? Not-in-family White Female United-States 0 -35 0.3888889 0.02106075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.165885478 0.8125 0 0 0.464646459 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -54 0.6 0.08646701 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -35 0.3888889 0.1557077 0.5625 0 0 0.454545468 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.138948143 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -47 0.5222222 0.2270148 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -48 0.533333361 0.130042672 0.5625 0 0 0.2020202 Private HS-grad Divorced Sales Own-child White Female United-States 0 -33 0.366666675 0.11426647 0.6875 0 0.383149683 0.5555556 Local-gov Assoc-voc Never-married Adm-clerical Own-child White Male United-States 0 -35 0.3888889 0.0242101979 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.09527347 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Female United-States 0 -36 0.4 0.169886276 0.0625 0 0 0.4040404 Private Preschool Never-married Machine-op-inspct Not-in-family Black Male Puerto-Rico 0 -30 0.333333343 0.08622319 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -39 0.433333337 0.101068564 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -25 0.2777778 0.1739578 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family Amer-Indian-Eskimo Male United-States 0 -40 0.444444448 0.126937672 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -25 0.2777778 0.108443767 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.271749616 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female Mexico 0 -53 0.5888889 0.122365728 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 -18 0.2 0.0809878 0.4375 0 0 0.1010101 Private 11th Never-married Other-service Own-child White Male United-States 0 -41 0.455555558 0.105761752 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Male United-States 0 -25 0.2777778 0.206713125 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -66 0.733333349 0.0189000517 0.25 0 0 0.5050505 Self-emp-not-inc 7th-8th Widowed Farming-fishing Unmarried White Male United-States 0 -53 0.5888889 0.06434949 0.625 0.0147101469 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -27 0.3 0.09092783 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.197613671 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Unmarried Black Female United-States 0 -23 0.25555557 0.124675274 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -29 0.322222233 0.165548041 0.375 0 0 0.8080808 Self-emp-not-inc 10th Divorced Craft-repair Not-in-family White Male United-States 0 -26 0.2888889 0.09025632 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -26 0.2888889 0.138098821 0.5625 0 0 0.424242437 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -26 0.2888889 0.164675817 0.3125 0 0 0.353535354 Private 9th Never-married Other-service Not-in-family White Male United-States 0 -38 0.422222227 0.107212543 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.272885859 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -34 0.377777785 0.119509935 0.625 0.1502415 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -32 0.355555564 0.271004021 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -57 0.6333333 0.124302812 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.20382905 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -38 0.422222227 0.06677286 0.8125 0 0 0.3838384 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -39 0.433333337 0.07592822 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Other Female Dominican-Republic 0 -35 0.3888889 0.1299403 0.5625 0 0.5456841 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.512563765 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 -75 0.8333334 0.08471986 0.625 0 0 0.08080808 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -28 0.311111122 0.122814976 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 -41 0.455555558 0.0788116157 0.875 0 0 0.5555556 Self-emp-not-inc Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -39 0.433333337 0.0206593238 0.3125 0 0 0.4040404 Federal-gov 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -31 0.344444454 0.3264413 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Tech-support Not-in-family White Male United-States 0 -38 0.422222227 0.211524859 0.5625 0 0 0.3838384 State-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.025956 0.625 0 0 0.3838384 State-gov Some-college Divorced Exec-managerial Unmarried Black Female ? 0 -27 0.3 0.111410685 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.1335895 0.875 0 0.43663913 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -46 0.51111114 0.07855769 0.8125 0 0 0.363636374 Private Bachelors Separated Prof-specialty Unmarried Black Female United-States 0 -20 0.222222224 0.124908321 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.07993911 0.625 0 0 0.2020202 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -69 0.7666667 0.05182107 0.5625 0 0 0.4040404 Private HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 -47 0.5222222 0.108200625 0.6875 0 0 0.353535354 Federal-gov Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 -49 0.544444442 0.08537319 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male Portugal 0 -20 0.222222224 0.142148778 0.625 0 0 0.3030303 Private Some-college Never-married Exec-managerial Own-child White Female United-States 0 -52 0.5777778 0.210096285 0.1875 0 0 0.151515156 Private 5th-6th Married-civ-spouse Sales Wife White Female El-Salvador 0 -33 0.366666675 0.19101572 0.1875 0 0 0.5959596 Private 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 -18 0.2 0.104411989 0.4375 0 0 0.0606060624 Private 11th Never-married Other-service Own-child White Female United-States 0 -55 0.6111111 0.06773669 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Separated Farming-fishing Unmarried White Female United-States 0 -61 0.677777767 0.2562543 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Farming-fishing Husband Black Male United-States 0 -61 0.677777767 0.149486259 0.625 0.09386094 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -39 0.433333337 0.07714933 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -30 0.333333343 0.1674299 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -61 0.677777767 0.153207541 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -36 0.4 0.0445697978 0.75 0 0 0.151515156 Private Assoc-acdm Married-civ-spouse Sales Wife White Female United-States 0 -34 0.377777785 0.07248848 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.04740807 0.875 0.04386044 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -38 0.422222227 0.285319984 0.6875 0 0 0.363636374 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 1 -46 0.51111114 0.06643542 0.8125 0.07298073 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.145492211 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -32 0.355555564 0.142065942 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Separated Handlers-cleaners Unmarried White Female Nicaragua 0 -60 0.6666667 0.172230184 0.8125 0 0 0.6060606 Local-gov Bachelors Widowed Prof-specialty Unmarried White Female United-States 1 -23 0.25555557 0.0522534773 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -29 0.322222233 0.102687739 0.8125 0.143441439 0 0.5050505 Private Bachelors Never-married Prof-specialty Unmarried White Female United-States 1 -22 0.244444445 0.136904642 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -25 0.2777778 0.176142067 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Male United-States 0 -29 0.322222233 0.0614189357 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -90 1 0.131630868 0.5625 0 0 0.3030303 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.183518618 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -32 0.355555564 0.209822163 0.5625 0 0 0.3838384 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -18 0.2 0.101963691 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Other-service Own-child Black Male Jamaica 0 -35 0.3888889 0.1263719 0.625 0 0 0.656565666 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -50 0.5555556 0.07337013 0.3125 0.0288502872 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.09118849 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -43 0.477777779 0.114085294 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.128731966 0.5625 0 0 0.656565666 Self-emp-inc HS-grad Never-married Exec-managerial Not-in-family White Male United-States 1 -51 0.566666663 0.314952135 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -31 0.344444454 0.251352966 0.625 0 0 0.424242437 Private Some-college Never-married Craft-repair Unmarried White Male Mexico 0 -69 0.7666667 0.0875998959 0.5625 0.023870239 0 0.4040404 Private HS-grad Separated Transport-moving Unmarried Black Female United-States 0 -57 0.6333333 0.134662449 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -71 0.788888931 0.07824113 0.625 0 0 0.141414136 ? Some-college Widowed ? Not-in-family White Female Canada 0 -28 0.311111122 0.028881833 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Own-child White Female United-States 0 -28 0.311111122 0.117643572 0.375 0 0 0.8080808 ? 10th Separated ? Not-in-family White Male United-States 0 -25 0.2777778 0.11433854 0.5625 0 0 0.959596 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -49 0.544444442 0.122278169 0.75 0 0 0.3030303 Self-emp-not-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male Columbia 0 -52 0.5777778 0.06445994 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -23 0.25555557 0.159918636 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male ? 0 -32 0.355555564 0.152398631 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Craft-repair Other-relative White Male El-Salvador 0 -31 0.344444454 0.107751377 0.625 0 0 0.5050505 Private Some-college Never-married Sales Not-in-family Asian-Pac-Islander Female United-States 0 -30 0.333333343 0.137056187 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -24 0.266666681 0.271886349 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.129536167 0.75 0 0 0.6666667 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male Yugoslavia 0 -30 0.333333343 0.113040641 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -52 0.5777778 0.0977743044 0.8125 0.1502415 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.104840361 0.5625 0 0 0.25252524 State-gov HS-grad Divorced Adm-clerical Not-in-family Black Female United-States 0 -49 0.544444442 0.07866142 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -20 0.222222224 0.0264254529 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -25 0.2777778 0.08359304 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -41 0.455555558 0.116405621 0.3125 0 0 0.5555556 Private 9th Married-civ-spouse Other-service Husband White Male Outlying-US(Guam-USVI-etc) 0 -55 0.6111111 0.0965659842 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried Black Female United-States 0 -31 0.344444454 0.17903018 0.6875 0.031370312 0 0.5050505 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.146954447 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Protective-serv Not-in-family Black Female United-States 0 -32 0.355555564 0.103782907 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.296790957 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Other-relative White Male United-States 0 -37 0.411111116 0.130633354 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Female ? 0 -52 0.5777778 0.08481955 0.25 0 0 0.4040404 Private 7th-8th Widowed Other-service Not-in-family White Female United-States 0 -19 0.211111113 0.191722944 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -21 0.233333334 0.144564077 0.625 0 0 0.24242425 ? Some-college Never-married ? Own-child White Male United-States 0 -43 0.477777779 0.1167343 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 -39 0.433333337 0.04404242 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband White Male ? 0 -40 0.444444448 0.0303454231 0.625 0 0 0.4040404 Self-emp-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -54 0.6 0.124632165 0.125 0 0 0.4040404 Private 1st-4th Separated Priv-house-serv Other-relative White Female Mexico 0 -35 0.3888889 0.07906015 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Male United-States 0 -34 0.377777785 0.174220473 0.6875 0 0.453168035 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Female United-States 0 -35 0.3888889 0.121012591 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -57 0.6333333 0.08572545 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Taiwan 1 -26 0.2888889 0.129333436 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Other-relative White Female United-States 0 -55 0.6111111 0.06705103 0.8125 0 0 0.151515156 Self-emp-not-inc Bachelors Widowed Sales Unmarried White Female United-States 0 -51 0.566666663 0.140700683 0.8125 0 0 0.4040404 Private Bachelors Separated Adm-clerical Unmarried White Female United-States 0 -35 0.3888889 0.19374758 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Transport-moving Not-in-family Black Male Jamaica 0 -31 0.344444454 0.132096946 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -17 0.188888893 0.185256332 0.4375 0 0 0.08080808 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 -38 0.422222227 0.0160920862 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -39 0.433333337 0.253555417 0.9375 0 0.4331956 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.180499837 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.0203872155 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Sales Unmarried White Female United-States 0 -42 0.466666669 0.13755931 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.140807092 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -73 0.811111152 0.235297248 0.25 0 0 0.25252524 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -47 0.5222222 0.103746541 0.625 0 0.430670351 0.4040404 Local-gov Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.0839762762 0.5625 0 0 0.7070707 Private HS-grad Never-married Sales Unmarried White Female United-States 0 -27 0.3 0.08944875 0.375 0 0.454545438 0.4040404 Private 10th Never-married Sales Other-relative White Male United-States 0 -38 0.422222227 0.06683685 0.9375 0 0 0.4040404 Private Prof-school Never-married Exec-managerial Not-in-family White Male United-States 1 -19 0.211111113 0.151443556 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -60 0.6666667 0.06810107 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Prof-specialty Unmarried White Male United-States 1 -24 0.266666681 0.124495439 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -52 0.5777778 0.2039779 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -36 0.4 0.122126617 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -26 0.2888889 0.129462078 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Not-in-family White Female Canada 0 -28 0.311111122 0.02508916 0.8125 0 0 0.161616161 State-gov Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -38 0.422222227 0.09487002 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -47 0.5222222 0.10661108 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.181244761 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 1 -27 0.3 0.188562721 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -47 0.5222222 0.118703045 0.625 0 0 0.4040404 Private Some-college Widowed Prof-specialty Unmarried White Female United-States 0 -36 0.4 0.07769894 0.375 0.0346403457 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Own-child White Female United-States 0 -49 0.544444442 0.2274297 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Male United-States 0 -68 0.75555557 0.171937183 0.625 0 0 0.4848485 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -63 0.7 0.09780529 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -36 0.4 0.124670558 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -42 0.466666669 0.09615109 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.10527344 0.875 0 0 0.454545468 Private Masters Never-married Exec-managerial Not-in-family Black Female United-States 0 -68 0.75555557 0.125456572 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -38 0.422222227 0.147596329 0.5625 0 0 0.222222224 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -43 0.477777779 0.07474212 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.136772633 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -59 0.655555546 0.10025157 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -25 0.2777778 0.104358107 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -26 0.2888889 0.08359304 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 -59 0.655555546 0.105948992 0.625 0 0 0.4848485 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -34 0.377777785 0.07667382 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.111629583 0.875 0 0 0.434343427 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -67 0.7444445 0.0948666558 0.5625 0 0 0.24242425 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -45 0.5 0.1349514 0.6875 0 0 0.444444448 Private Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 -64 0.7111111 0.121402569 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband Black Male United-States 0 -51 0.566666663 0.05561913 0.875 0 0 0.3838384 Private Masters Married-civ-spouse Prof-specialty Husband White Male Canada 1 -31 0.344444454 0.152990669 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.234986752 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -65 0.722222269 0.061228998 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband Asian-Pac-Islander Male United-States 0 -23 0.25555557 0.09615783 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -31 0.344444454 0.165985167 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.124458395 0.375 0 0 0.4040404 Private 10th Divorced Machine-op-inspct Not-in-family White Female United-States 0 -17 0.188888893 0.1315157 0.4375 0 0 0.353535354 Local-gov 11th Never-married Craft-repair Own-child White Male United-States 0 -63 0.7 0.113131568 0.875 0 0 0.464646459 Private Masters Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -48 0.533333361 0.09809087 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -45 0.5 0.114567541 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -17 0.188888893 0.153736264 0.375 0 0 0.1010101 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 -26 0.2888889 0.13845849 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.341367483 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Tech-support Unmarried Black Female United-States 0 -29 0.322222233 0.2777892 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female Outlying-US(Guam-USVI-etc) 0 -44 0.4888889 0.110009059 0.625 0 0 0.323232323 Private Some-college Widowed Adm-clerical Unmarried White Female United-States 0 -43 0.477777779 0.150033846 0.875 0 0 0.4040404 Federal-gov Masters Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.214802265 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -43 0.477777779 0.07084774 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Male Haiti 0 -23 0.25555557 0.134628773 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.06498463 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Asian-Pac-Islander Female United-States 0 -49 0.544444442 0.129455343 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male Canada 0 -52 0.5777778 0.136991531 0.625 0.0501305 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.06711502 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -38 0.422222227 0.112776615 0.8125 0.04508045 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -25 0.2777778 0.141506225 0.1875 0 0 0.25252524 ? 5th-6th Never-married ? Unmarried White Female El-Salvador 0 -44 0.4888889 0.147902116 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Own-child White Male United-States 0 -63 0.7 0.02038789 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.15223226 0.5625 0 0 0.6060606 Local-gov HS-grad Separated Other-service Not-in-family Black Female ? 0 -21 0.233333334 0.211600959 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male Columbia 0 -32 0.355555564 0.222747952 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.02387545 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Separated Other-service Unmarried White Female United-States 0 -50 0.5555556 0.116501257 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Transport-moving Husband White Male Puerto-Rico 0 -26 0.2888889 0.127636135 0.8125 0 0 0.8080808 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.0414344929 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -31 0.344444454 0.386612177 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.189502969 0.125 0 0 0.6666667 Private 1st-4th Never-married Farming-fishing Not-in-family Other Male Mexico 0 -40 0.444444448 0.09360445 0.5625 0 0 0.565656543 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.119194724 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -43 0.477777779 0.08917125 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male Poland 0 -44 0.4888889 0.131288037 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.322087556 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Other-relative White Female United-States 0 -75 0.8333334 0.0863632858 0.1875 0 0 0.25252524 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 0 -52 0.5777778 0.0202855114 0.625 0.031370312 0 0.424242437 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -51 0.566666663 0.1957884 0.1875 0 0 0.4040404 Self-emp-not-inc 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.0576316528 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -40 0.444444448 0.08208634 0.75 0.07688077 0 0.5050505 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.0195567477 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Machine-op-inspct Not-in-family White Male United-States 0 -33 0.366666675 0.234492376 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.0496495962 0.625 0 0 0.6060606 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -29 0.322222233 0.101960994 0.6875 0 0 0.5050505 Private Assoc-voc Divorced Handlers-cleaners Unmarried White Male United-States 0 -37 0.411111116 0.159195945 0.625 0 0 0.373737365 Private Some-college Divorced Adm-clerical Not-in-family Black Female United-States 0 -37 0.411111116 0.0134026632 0.5625 0.1502415 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.09345964 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -46 0.51111114 0.239079148 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -46 0.51111114 0.122154236 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.2649415 0.625 0 0 0.3030303 Private Some-college Never-married Protective-serv Own-child Black Male United-States 0 -34 0.377777785 0.141937956 0.625 0 0 0.4040404 Private Some-college Separated Adm-clerical Unmarried Black Female ? 0 -38 0.422222227 0.07409755 0.625 0 0 0.434343427 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -26 0.2888889 0.130196914 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.0798481852 0.8125 0 0 0.353535354 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -57 0.6333333 0.1360479 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.106045313 0.4375 0 0 0.656565666 Private 11th Never-married Craft-repair Not-in-family White Male United-States 0 -26 0.2888889 0.19075641 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 -20 0.222222224 0.1668978 0.5625 0 0 0.8484849 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -38 0.422222227 0.02944154 0.8125 0.07298073 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -61 0.677777767 0.0240108315 0.625 0 0 0.0606060624 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -36 0.4 0.230833068 1 0 0 0.454545468 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male ? 1 -61 0.677777767 0.04813549 0.5625 0.03103031 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -17 0.188888893 0.1830916 0.625 0 0 0.161616161 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -40 0.444444448 0.269454867 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Other Male United-States 1 -18 0.2 0.0424138121 0.4375 0 0 0.161616161 Private 11th Never-married Other-service Own-child White Male United-States 0 -21 0.233333334 0.1178059 0.75 0 0 0.323232323 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 -41 0.455555558 0.118846506 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male Peru 0 -46 0.51111114 0.180748373 0.4375 0 0 0.4040404 Private 11th Separated Machine-op-inspct Not-in-family White Female United-States 0 -55 0.6111111 0.119150944 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -27 0.3 0.1190021 0.75 0 0 0.5252525 Private Assoc-acdm Never-married Sales Not-in-family White Male United-States 0 -39 0.433333337 0.06605824 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -36 0.4 0.179470673 0.5625 0 0 0.4848485 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 -51 0.566666663 0.210464031 0.625 0.03908039 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -27 0.3 0.406845152 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -30 0.333333343 0.08861559 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.06579623 0.5625 0 0 0.474747479 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -23 0.25555557 0.251651347 0.8125 0 0 0.2020202 Private Bachelors Never-married Other-service Own-child White Female United-States 0 -56 0.622222245 0.247849911 0.6875 0.1502415 0 0.4040404 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.130301312 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.168877319 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.134521678 0.6875 0 0 0.6060606 Federal-gov Assoc-voc Divorced Craft-repair Not-in-family Amer-Indian-Eskimo Female United-States 0 -54 0.6 0.10566207 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Greece 0 -38 0.422222227 0.0822223946 0.625 0.07298073 0 0.434343427 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -45 0.5 0.1457542 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -50 0.5555556 0.02855921 0.9375 0 0.5544077 0.3030303 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.212819383 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -31 0.344444454 0.04272701 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family White Male Ireland 0 -27 0.3 0.108294919 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -34 0.377777785 0.0575023331 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.313849568 0.4375 0 0 0.3030303 Private 11th Never-married Transport-moving Own-child White Male United-States 0 -47 0.5222222 0.05289199 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -36 0.4 0.0660313 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Other-service Husband Asian-Pac-Islander Male United-States 0 -22 0.244444445 0.120151818 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -51 0.566666663 0.14207536 0.5625 0 0.459595948 0.454545468 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -43 0.477777779 0.0434470139 0.625 0 0 0.3030303 Private Some-college Divorced Other-service Not-in-family White Male United-States 0 -54 0.6 0.08646701 0.625 0 0 0.5050505 Private Some-college Widowed Prof-specialty Not-in-family White Male United-States 0 -24 0.266666681 0.157916889 0.3125 0 0 0.4040404 Private 9th Never-married Machine-op-inspct Own-child Black Female Dominican-Republic 0 -29 0.322222233 0.119053952 0.9375 0 0 0.5555556 Private Prof-school Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 0 -40 0.444444448 0.04004836 0.625 0 0 0.3838384 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -18 0.2 0.157895342 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 -31 0.344444454 0.144841567 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -57 0.6333333 0.09458175 1 0 0.453856736 0.4040404 Private Doctorate Married-civ-spouse Tech-support Husband White Male Germany 1 -32 0.355555564 0.129168421 0.875 0 0 0.4040404 Private Masters Never-married Adm-clerical Not-in-family Black Female United-States 0 -48 0.533333361 0.100353271 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.154760033 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.1175055 0.75 0 0 0.222222224 Private Assoc-acdm Divorced Other-service Not-in-family White Female United-States 0 -24 0.266666681 0.1688194 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Guatemala 0 -49 0.544444442 0.08075948 0.8125 0.07688077 0 0.3030303 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -27 0.3 0.101974465 0.5625 0 0.3611111 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -37 0.411111116 0.124304831 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Unmarried White Female United-States 0 -33 0.366666675 0.177517429 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.119852096 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Male United-States 0 -45 0.5 0.206700325 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -54 0.6 0.0366247855 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.0972253755 0.5625 0 0.143480256 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -22 0.244444445 0.064367 0.625 0 0 0.222222224 Private Some-college Married-spouse-absent Sales Own-child Other Female Dominican-Republic 0 -20 0.222222224 0.122364379 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -36 0.4 0.115934819 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -49 0.544444442 0.236248285 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -58 0.644444466 0.07111985 0.25 0 0 0.4040404 Self-emp-not-inc 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 1 -20 0.222222224 0.134747982 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female ? 0 -34 0.377777785 0.135170966 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Divorced Sales Unmarried White Female United-States 0 -36 0.4 0.2604733 0.875 0 0.453856736 0.444444448 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -28 0.311111122 0.09130905 0.8125 0.04101041 0 0.6060606 Local-gov Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 -38 0.422222227 0.1904439 0.6875 0 0 0.4040404 Local-gov Assoc-voc Divorced Exec-managerial Own-child White Male United-States 0 -32 0.355555564 0.0925214142 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family Asian-Pac-Islander Male India 0 -35 0.3888889 0.103708148 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -51 0.566666663 0.06470107 0.75 0 0 0.6060606 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.103005648 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -71 0.788888931 0.06591882 0.875 0 0 0.151515156 Private Masters Divorced Prof-specialty Not-in-family White Female Germany 0 -48 0.533333361 0.171273753 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.06831795 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.08471447 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 1 -64 0.7111111 0.111455813 0.5625 0 0 0.05050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.116054706 0.5625 0 0 0.4848485 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -25 0.2777778 0.119033076 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -66 0.733333349 0.117380895 0.625 0 0 0.5050505 Private Some-college Widowed Sales Unmarried White Female United-States 1 -59 0.655555546 0.0323983543 0.875 0 0 0.4040404 Federal-gov Masters Never-married Prof-specialty Not-in-family White Female ? 1 -42 0.466666669 0.0535668731 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.206411377 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Unmarried White Male United-States 0 -19 0.211111113 0.03723568 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -26 0.2888889 0.115890361 0.625 0 0 0.24242425 Private Some-college Never-married Sales Own-child White Female United-States 0 -22 0.244444445 0.09498722 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -33 0.366666675 0.0251053236 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -63 0.7 0.0211415738 0.4375 0 0 0.121212125 Private 11th Never-married Farming-fishing Not-in-family White Male United-States 0 -20 0.222222224 0.280131757 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -33 0.366666675 0.199090734 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Craft-repair Not-in-family White Male Mexico 0 -57 0.6333333 0.13666217 0.25 0.0117301168 0 0.454545468 ? 7th-8th Married-civ-spouse ? Wife White Female Puerto-Rico 0 -56 0.622222245 0.107610606 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -70 0.7777778 0.181067616 0.6875 0 0 0.24242425 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 1 -42 0.466666669 0.0848673657 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -25 0.2777778 0.151675254 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family Black Female United-States 0 -28 0.311111122 0.200534791 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -80 0.8888889 0.152146056 0.5625 0.01409014 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -36 0.4 0.407826483 0.375 0 0 0.4040404 Private 10th Never-married Transport-moving Not-in-family Black Female United-States 0 -37 0.411111116 0.117296033 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.111447059 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -52 0.5777778 0.12778835 0.5625 0 0 0.353535354 State-gov HS-grad Separated Other-service Not-in-family White Female United-States 0 -49 0.544444442 0.242803127 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -30 0.333333343 0.07748341 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.176929429 0.625 0.07688077 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 1 -70 0.7777778 0.106712781 0.9375 0 0 0.353535354 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.0276876558 0.625 0 0.518365443 0.6262626 Private Some-college Widowed Farming-fishing Not-in-family White Male United-States 1 -25 0.2777778 0.100945979 0.8125 0 0 0.4040404 Private Bachelors Widowed Exec-managerial Not-in-family White Female United-States 0 -59 0.655555546 0.08884998 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female Italy 1 -22 0.244444445 0.04086199 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -41 0.455555558 0.103139684 0.75 0 0 0.5050505 Local-gov Assoc-acdm Separated Craft-repair Not-in-family White Male United-States 0 -62 0.6888889 0.10457027 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.164861038 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -38 0.422222227 0.210215509 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -52 0.5777778 0.0692582056 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.06279025 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -74 0.822222233 0.1555878 0.5625 0 0 0.3030303 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.173092976 0.1875 0 0 0.151515156 Self-emp-not-inc 5th-6th Married-civ-spouse Other-service Wife White Female Mexico 0 -41 0.455555558 0.0799626857 0.5 0 0 0.4040404 Private 12th Divorced Adm-clerical Not-in-family Amer-Indian-Eskimo Male United-States 0 -30 0.333333343 0.10236983 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female United-States 0 -25 0.2777778 0.0734906942 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.3972567 0.625 0.135501355 0 0.6060606 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 1 -38 0.422222227 0.1162103 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.214845374 0.875 0 0.4242424 0.4040404 State-gov Masters Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -48 0.533333361 0.137824684 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.06728205 0.1875 0 0 0.151515156 Self-emp-not-inc 5th-6th Never-married Tech-support Not-in-family Asian-Pac-Islander Female United-States 0 -19 0.211111113 0.248846069 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -51 0.566666663 0.05342745 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.0412054919 0.8125 0 0 0.4040404 Private Bachelors Divorced Adm-clerical Unmarried White Male United-States 0 -20 0.222222224 0.13755326 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Own-child White Female United-States 0 -17 0.188888893 0.1233309 0.4375 0 0 0.161616161 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -42 0.466666669 0.06487551 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -25 0.2777778 0.112501137 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Other-relative Other Female Ecuador 0 -36 0.4 0.07341324 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -65 0.722222269 0.119078204 1 0 0 0.4040404 Private Doctorate Widowed Prof-specialty Not-in-family White Female United-States 0 -32 0.355555564 0.0907500163 0.8125 0 0 0.7070707 Self-emp-not-inc Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -33 0.366666675 0.03353865 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -32 0.355555564 0.08862906 0.625 0 0 0.2020202 State-gov Some-college Never-married Tech-support Unmarried Black Female United-States 0 -25 0.2777778 0.207208171 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -41 0.455555558 0.236646339 0.625 0 0 0.4040404 Local-gov Some-college Divorced Protective-serv Unmarried White Female United-States 0 -44 0.4888889 0.175631523 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -72 0.8 0.105280176 0.375 0.02414024 0 0.121212125 Private 10th Married-civ-spouse Other-service Husband White Male United-States 0 -36 0.4 0.139953062 0.5625 0 0 0.5252525 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -67 0.7444445 0.1702978 0.5625 0.01797018 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -28 0.311111122 0.19864957 0.5625 0.0406404063 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.132193938 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband Other Male United-States 0 -17 0.188888893 0.03125335 0.25 0 0 0.08080808 Private 7th-8th Never-married Sales Own-child White Male United-States 0 -32 0.355555564 0.179942146 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Divorced Exec-managerial Unmarried Black Female United-States 0 -67 0.7444445 0.108072646 0.4375 0 0 0.4040404 Private 11th Widowed Other-service Not-in-family White Female United-States 0 -21 0.233333334 0.08350682 0.625 0 0 0.1010101 ? Some-college Never-married ? Other-relative Asian-Pac-Islander Male Vietnam 0 -51 0.566666663 0.08288044 0.875 0.0501305 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 -32 0.355555564 0.287240237 0.125 0.0367403664 0 0.4040404 Private 1st-4th Never-married Craft-repair Not-in-family White Male Guatemala 0 -39 0.433333337 0.181398332 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.0288656671 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Female United-States 0 -50 0.5555556 0.123873092 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.142379135 0.375 0 0 0.151515156 Private 10th Never-married Sales Not-in-family White Female United-States 0 -21 0.233333334 0.130079716 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.05842575 0.8125 0 0 0.161616161 Private Bachelors Never-married Adm-clerical Other-relative Asian-Pac-Islander Female United-States 0 -34 0.377777785 0.1525724 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Own-child White Male United-States 0 -68 0.75555557 0.182082638 0.375 0 0 0.353535354 ? 10th Married-civ-spouse ? Husband White Male United-States 0 -49 0.544444442 0.2315221 0.375 0 0 0.323232323 Self-emp-not-inc 10th Never-married Craft-repair Not-in-family Black Male United-States 0 -50 0.5555556 0.101686873 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Amer-Indian-Eskimo Female United-States 0 -33 0.366666675 0.139624372 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Exec-managerial Own-child White Female United-States 0 -18 0.2 0.0915495 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -45 0.5 0.124116912 0.6875 0 0 0.5555556 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 1 -20 0.222222224 0.09579883 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -46 0.51111114 0.0814316645 0.8125 0.03103031 0 0.373737365 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -64 0.7111111 0.106695943 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.08497378 1 0 0 0.454545468 Private Doctorate Never-married Prof-specialty Not-in-family White Male United-States 0 -35 0.3888889 0.100590356 0.5625 0 0 0.7070707 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.217332065 0.625 0 0 0.323232323 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -29 0.322222233 0.0373070762 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Tech-support Not-in-family White Male United-States 0 -38 0.422222227 0.135315776 0.8125 0 0 0.3030303 State-gov Bachelors Married-civ-spouse Exec-managerial Wife Black Female United-States 1 -45 0.5 0.111844443 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -30 0.333333343 0.07857858 0.875 0 0 0.5050505 Self-emp-not-inc Masters Divorced Prof-specialty Not-in-family Asian-Pac-Islander Male India 1 -41 0.455555558 0.11337202 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -37 0.411111116 0.0820176452 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family Asian-Pac-Islander Male Hong 0 -45 0.5 0.08546412 0.8125 0 0.4331956 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -20 0.222222224 0.270552069 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -45 0.5 0.07921103 0.5625 0 0 0.4848485 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.276449531 0.5625 0 0 0.2020202 Federal-gov HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 -63 0.7 0.02591222 0.625 0.14084141 0 0.6060606 Self-emp-inc Some-college Widowed Sales Not-in-family White Female United-States 1 -35 0.3888889 0.226108223 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -24 0.266666681 0.04732321 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -19 0.211111113 0.03204475 0.625 0 0 0.5050505 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -23 0.25555557 0.07932013 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -34 0.377777785 0.120994411 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.2313948 0.4375 0 0 0.4040404 ? 11th Never-married ? Not-in-family Black Male United-States 0 -36 0.4 0.221233174 0.1875 0 0 0.5050505 Self-emp-not-inc 5th-6th Married-civ-spouse Transport-moving Husband White Male Mexico 1 -46 0.51111114 0.178551972 0.5625 0 0 0.05050505 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -38 0.422222227 0.27937603 0.8125 0 0 0.424242437 Local-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.0323667 0.5 0 0 0.4040404 Local-gov 12th Widowed Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.230127871 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative Asian-Pac-Islander Male India 0 -48 0.533333361 0.17967476 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.15731813 0.5625 0 0 0.5050505 Private HS-grad Divorced Other-service Own-child White Female United-States 0 -53 0.5888889 0.08526408 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 -47 0.5222222 0.04765526 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.09352161 0.625 0.046500463 0 0.222222224 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.118445083 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.130324885 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -41 0.455555558 0.07027255 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.132909909 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -21 0.233333334 0.138643026 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child Black Female United-States 0 -45 0.5 0.139057264 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 -33 0.366666675 0.136607617 0.25 0 0 0.141414136 Private 7th-8th Never-married Other-service Unmarried Black Female Trinadad&Tobago 0 -68 0.75555557 0.117663108 0.625 0 0 0.25252524 Without-pay Some-college Married-spouse-absent Farming-fishing Unmarried White Female United-States 0 -44 0.4888889 0.12348716 0.9375 0 0 0.5555556 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.07113467 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -45 0.5 0.22199899 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male Poland 1 -41 0.455555558 0.052113384 0.625 0 0.4242424 0.656565666 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -29 0.322222233 0.139740214 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male Mexico 0 -46 0.51111114 0.100465074 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 0 -19 0.211111113 0.210125253 0.5625 0 0 0.25252524 Private HS-grad Never-married Craft-repair Other-relative White Male Mexico 0 -56 0.622222245 0.117954075 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -55 0.6111111 0.07518329 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.0329324678 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.0182184335 0.5625 0 0 0.25252524 Private HS-grad Never-married Priv-house-serv Not-in-family White Female United-States 0 -38 0.422222227 0.07335262 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male ? 0 -52 0.5777778 0.063977696 0.1875 0 0 0.5050505 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -22 0.244444445 0.147061542 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -20 0.222222224 0.153313965 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -31 0.344444454 0.183777928 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Own-child Black Male England 0 -39 0.433333337 0.0208229925 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.186049759 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Female United-States 0 -35 0.3888889 0.194722861 0.75 0 0 0.4040404 Private Assoc-acdm Separated Sales Unmarried White Male United-States 0 -67 0.7444445 0.0263351984 0.5625 0 0 0.05050505 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -45 0.5 0.129841283 0.8125 0.07298073 0 0.5555556 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -61 0.677777767 0.09919816 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.126469567 0.5625 0 0 0.3030303 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -51 0.566666663 0.143662214 0.8125 0 0 0.4040404 State-gov Bachelors Widowed Adm-clerical Not-in-family White Male United-States 0 -37 0.411111116 0.07234434 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -21 0.233333334 0.114684068 0.625 0 0 0.25252524 ? Some-college Never-married ? Own-child White Female United-States 0 -32 0.355555564 0.05846818 0.625 0 0 0.3838384 Private Some-college Never-married Other-service Own-child White Female United-States 0 -48 0.533333361 0.10049808 0.5625 0 0 0.454545468 Private HS-grad Separated Craft-repair Unmarried Black Male United-States 0 -62 0.6888889 0.08312157 0.25 0 0 0.535353541 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -21 0.233333334 0.206626236 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -28 0.311111122 0.328245 0.5625 0 0 0.454545468 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -19 0.211111113 0.191246748 0.375 0 0.3677686 0.454545468 Private 10th Never-married Handlers-cleaners Other-relative White Male United-States 0 -20 0.222222224 0.253045559 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -41 0.455555558 0.183035016 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -29 0.322222233 0.16963236 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 0 -47 0.5222222 0.17784813 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.01916273 0.8125 0 0 0.373737365 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.190343544 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Other-relative White Male United-States 0 -29 0.322222233 0.125215456 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -51 0.566666663 0.133485109 0.8125 0 0 0.4040404 Federal-gov Bachelors Widowed Prof-specialty Not-in-family Black Female United-States 0 -40 0.444444448 0.163346261 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.227614239 0.1875 0 0 0.4040404 Private 5th-6th Never-married Transport-moving Not-in-family White Male Mexico 0 -30 0.333333343 0.142832413 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -36 0.4 0.08706309 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Not-in-family White Female United-States 0 -68 0.75555557 0.0975015238 0.5625 0 0.382920116 0.2020202 Local-gov HS-grad Widowed Protective-serv Not-in-family White Male United-States 0 -42 0.466666669 0.07402952 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 1 -41 0.455555558 0.07632762 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -43 0.477777779 0.1264864 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.1170091 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -43 0.477777779 0.124690764 0.8125 0 0 0.4040404 Private Bachelors Divorced Tech-support Own-child White Male United-States 0 -53 0.5888889 0.04925827 0.5625 0.1502415 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.158981085 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.0499722175 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Unmarried White Male United-States 0 -31 0.344444454 0.068788074 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -23 0.25555557 0.09491111 0.625 0 0 0.25252524 Private Some-college Never-married Sales Other-relative Asian-Pac-Islander Male Philippines 0 -69 0.7666667 0.07245547 0.5625 0.0296402965 0 0.353535354 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -38 0.422222227 0.0231453385 0.875 0 0 0.4040404 State-gov Masters Divorced Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.173796818 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male Cuba 1 -18 0.2 0.263746 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Female United-States 0 -41 0.455555558 0.15702109 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male Mexico 0 -30 0.333333343 0.06825935 0.8125 0.03103031 0 0.5555556 Private Bachelors Married-civ-spouse Sales Wife White Female United-States 1 -23 0.25555557 0.0221572649 0.75 0 0 0.2020202 ? Assoc-acdm Married-civ-spouse ? Husband White Male United-States 0 -26 0.2888889 0.167448759 0.8125 0 0 0.3030303 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -37 0.411111116 0.143102512 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.133755192 0.625 0.0217402168 0 0.5050505 Private Some-college Never-married Tech-support Not-in-family Black Female United-States 0 -33 0.366666675 0.2733964 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male Peru 1 -37 0.411111116 0.3960403 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.03152613 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -27 0.3 0.141777664 0.625 0 0 0.8080808 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.139388636 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -28 0.311111122 0.159941539 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -59 0.655555546 0.1883445 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Male Guatemala 0 -42 0.466666669 0.01974803 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -50 0.5555556 0.182704315 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -27 0.3 0.0197756458 0.75 0 0 0.454545468 ? Assoc-acdm Never-married ? Not-in-family White Female United-States 0 -32 0.355555564 0.0517092645 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Unmarried White Female United-States 0 -27 0.3 0.0734179541 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Unmarried Black Male United-States 0 -43 0.477777779 0.152826324 0.8125 0 0 0.4040404 Private Bachelors Divorced Machine-op-inspct Other-relative White Male United-States 0 -46 0.51111114 0.118913859 0.4375 0 0 0.4040404 Private 11th Divorced Prof-specialty Unmarried Amer-Indian-Eskimo Male United-States 1 -41 0.455555558 0.122787356 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -59 0.655555546 0.1995366 0.875 0.0861408561 0 0.6060606 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 1 -20 0.222222224 0.146975324 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 -57 0.6333333 0.111601293 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 -46 0.51111114 0.0345327854 0.5625 0.04386044 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -45 0.5 0.0647266656 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -29 0.322222233 0.05549453 0.5625 0 0.365013778 0.454545468 Local-gov HS-grad Never-married Handlers-cleaners Unmarried Asian-Pac-Islander Male United-States 0 -23 0.25555557 0.167695269 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -46 0.51111114 0.171324953 0.5625 0 0.365013778 0.4848485 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -55 0.6111111 0.13486518 0.5625 0 0 0.5050505 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -58 0.644444466 0.06360119 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.0587874353 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Other-relative Asian-Pac-Islander Female United-States 0 -29 0.322222233 0.080684714 0.625 0 0 0.5050505 Private Some-college Never-married Sales Other-relative White Male United-States 0 -57 0.6333333 0.05779936 0.5625 0 0 0.2020202 ? HS-grad Divorced ? Own-child Asian-Pac-Islander Male United-States 0 -26 0.2888889 0.133200869 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -42 0.466666669 0.206762969 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 -61 0.677777767 0.0544862449 0.5625 0 0 0.454545468 Private HS-grad Separated Transport-moving Unmarried Asian-Pac-Islander Male United-States 1 -31 0.344444454 0.133283049 0.625 0.1502415 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.23959507 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Male United-States 0 -47 0.5222222 0.08158119 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.1304771 0.5625 0 0 0.565656543 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.233913139 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -24 0.266666681 0.0232409816 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried White Female United-States 0 -25 0.2777778 0.219821453 0.625 0 0 0.3838384 Private Some-college Never-married Adm-clerical Not-in-family White Male ? 0 -22 0.244444445 0.181329623 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -38 0.422222227 0.0427755 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.09985418 0.5625 0 0 0.161616161 Private HS-grad Married-civ-spouse Handlers-cleaners Wife White Female United-States 1 -33 0.366666675 0.128315732 0.5625 0 0 0.3030303 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -46 0.51111114 0.180522054 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male ? 1 -18 0.2 0.0135090807 0.25 0 0 0.4040404 Private 7th-8th Never-married Other-service Other-relative Asian-Pac-Islander Female Philippines 0 -52 0.5777778 0.139328688 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.127633438 0.8125 0 0.4242424 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.112022258 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -37 0.411111116 0.195248216 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Other-relative Asian-Pac-Islander Male Vietnam 0 -23 0.25555557 0.0581509471 0.625 0 0 0.151515156 ? Some-college Never-married ? Not-in-family White Female United-States 0 -45 0.5 0.0364988334 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.09905604 0.375 0 0 0.161616161 Private 10th Never-married Sales Own-child White Female United-States 0 -56 0.622222245 0.18995221 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.25559622 0.75 0 0 0.454545468 Self-emp-inc Assoc-acdm Divorced Exec-managerial Unmarried White Male United-States 0 -81 0.900000036 0.0871136039 0.25 0 0 0.1010101 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -22 0.244444445 0.06723827 0.625 0 0 0.3030303 Private Some-college Never-married Machine-op-inspct Own-child White Female United-States 0 -43 0.477777779 0.122754358 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -31 0.344444454 0.0737035349 0.75 0 0.399449021 0.4040404 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 0 -42 0.466666669 0.236519039 0.8125 0 0.4331956 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -66 0.733333349 0.141947389 0.625 0 0 0.5050505 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -50 0.5555556 0.0893888 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -31 0.344444454 0.1636581 0.625 0 0 0.4040404 Private Some-college Separated Handlers-cleaners Not-in-family White Male United-States 0 -35 0.3888889 0.06836981 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -21 0.233333334 0.343252718 0.625 0 0 0.353535354 ? Some-college Never-married ? Own-child White Female United-States 0 -36 0.4 0.08079518 0.8125 0 0 0.353535354 Private Bachelors Separated Other-service Unmarried Black Female United-States 0 -33 0.366666675 0.04696354 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -36 0.4 0.137798414 0.8125 0 0.04889807 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried Black Female United-States 0 -37 0.411111116 0.03425731 0.5625 0 0 0.5555556 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -50 0.5555556 0.123194173 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -55 0.6111111 0.139076114 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.113163896 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -24 0.266666681 0.100623362 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Other-relative Black Female Haiti 0 -39 0.433333337 0.124579631 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Adm-clerical Not-in-family White Male United-States 1 -34 0.377777785 0.2687322 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -29 0.322222233 0.08673575 0.25 0 0 0.5555556 Private 7th-8th Divorced Craft-repair Unmarried White Female United-States 0 -60 0.6666667 0.170008853 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Craft-repair Husband Other Male United-States 1 -33 0.366666675 0.1221603 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 1 -58 0.644444466 0.146056622 0.3125 0 0 0.4040404 Private 9th Never-married Handlers-cleaners Own-child White Male El-Salvador 0 -27 0.3 0.07202441 0.625 0 0 0.4040404 Private Some-college Separated Sales Not-in-family White Male United-States 0 -46 0.51111114 0.245082363 0.625 0 0 0.4040404 State-gov Some-college Divorced Protective-serv Unmarried Amer-Indian-Eskimo Female United-States 0 -63 0.7 0.193490967 0.5625 0 0 0.4040404 Private HS-grad Divorced Protective-serv Not-in-family White Male United-States 0 -38 0.422222227 0.11607828 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Other-service Unmarried White Female United-States 0 -23 0.25555557 0.207784042 0.625 0 0 0.151515156 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -29 0.322222233 0.08225675 0.8125 0.0861408561 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -31 0.344444454 0.07168899 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 -49 0.544444442 0.2062962 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.135851234 1 0 0 0.6060606 Self-emp-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.18997848 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -48 0.533333361 0.158353344 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.228652835 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.122462042 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -49 0.544444442 0.06690555 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.247546151 0.625 0.0258002579 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -57 0.6333333 0.0437528 0.6875 0 0.43663913 0.454545468 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -50 0.5555556 0.181244761 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -46 0.51111114 0.0395250246 0.8125 0.1502415 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.0602867231 0.625 0.03908039 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -19 0.211111113 0.06802631 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -18 0.2 0.022984365 0.375 0 0 0.282828271 Private 10th Never-married Other-service Own-child White Female United-States 0 -20 0.222222224 0.07749486 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -42 0.466666669 0.09370616 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -46 0.51111114 0.07047326 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Cambodia 1 -40 0.444444448 0.120472416 0.5625 0 0 0.2020202 Federal-gov HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -54 0.6 0.0941938 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 -28 0.311111122 0.04137859 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.208277076 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.0307219289 0.625 0 0 0.4040404 Private Some-college Never-married Priv-house-serv Not-in-family White Female United-States 0 -22 0.244444445 0.18361561 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -31 0.344444454 0.0365850478 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.111482754 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.0326630548 0.8125 0 0 0.424242437 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.09639828 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -67 0.7444445 0.2905803 0.75 0.200512 0 0.04040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 -75 0.8333334 0.17274408 0.875 0 0 0.161616161 Private Masters Never-married Protective-serv Not-in-family White Male United-States 0 -41 0.455555558 0.128948852 0.875 0 0 0.6060606 Private Masters Divorced Exec-managerial Unmarried Black Female United-States 1 -37 0.411111116 0.06677825 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.158944711 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Own-child White Female Cuba 0 -34 0.377777785 0.289550453 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male Mexico 1 -25 0.2777778 0.12790218 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Own-child White Male United-States 0 -52 0.5777778 0.0977669 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.129491717 0.5625 0.0217402168 0 0.4040404 State-gov HS-grad Never-married Protective-serv Own-child White Male United-States 0 -35 0.3888889 0.131312281 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Not-in-family Other Male Puerto-Rico 0 -44 0.4888889 0.241000071 0.5 0 0 0.353535354 Local-gov 12th Married-civ-spouse Other-service Other-relative White Female Mexico 0 -27 0.3 0.09269788 0.5625 0 0 0.8080808 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.105425656 0.625 0 0 0.333333343 Private Some-college Never-married Tech-support Not-in-family White Male United-States 0 -26 0.2888889 0.127458319 0.3125 0 0 0.3838384 Private 9th Never-married Other-service Own-child White Female El-Salvador 0 -23 0.25555557 0.136720091 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Male Canada 0 -28 0.311111122 0.01729906 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family Amer-Indian-Eskimo Female United-States 0 -38 0.422222227 0.129951075 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.0934138447 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -29 0.322222233 0.149692371 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Female United-States 0 -56 0.622222245 0.135594621 0.3125 0.03411034 0 0.5050505 Self-emp-not-inc 9th Married-civ-spouse Exec-managerial Other-relative White Male Columbia 0 -23 0.25555557 0.128409356 0.8125 0 0 0.353535354 ? Bachelors Never-married ? Not-in-family Asian-Pac-Islander Male United-States 0 -30 0.333333343 0.0377206244 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child Black Female United-States 0 -48 0.533333361 0.122794092 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -45 0.5 0.0935957 0.625 0 0 0.727272749 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 0 -38 0.422222227 0.186736092 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male Cuba 1 -24 0.266666681 0.08421269 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -47 0.5222222 0.1457623 1 0 0 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.115292937 0.5625 0 0 0.4848485 Private HS-grad Never-married Other-service Not-in-family White Female ? 0 -29 0.322222233 0.239867851 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Other-relative White Female United-States 0 -45 0.5 0.124871276 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 0 -24 0.266666681 0.207640573 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -40 0.444444448 0.0381564 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.104305573 0.3125 0 0 0.4040404 Local-gov 9th Married-civ-spouse Craft-repair Husband Black Male Trinadad&Tobago 1 -46 0.51111114 0.0301110335 0.8125 0 0 0.5050505 Federal-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 1 -34 0.377777785 0.149893746 0.625 0 0 0.04040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -32 0.355555564 0.1675444 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -20 0.222222224 0.07070833 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -23 0.25555557 0.212207139 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Unmarried White Male Mexico 0 -46 0.51111114 0.126843378 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -21 0.233333334 0.149296328 0.5625 0 0 0.353535354 Private HS-grad Never-married Sales Own-child White Female United-States 0 -59 0.655555546 0.05521164 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 1 -31 0.344444454 0.1139095 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -48 0.533333361 0.145977825 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -34 0.377777785 0.06607441 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -19 0.211111113 0.197016239 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Male United-States 0 -20 0.222222224 0.0828252062 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child White Male United-States 0 -29 0.322222233 0.08416016 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -54 0.6 0.08285215 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.0514694862 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.236798555 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -46 0.51111114 0.022761425 0.8125 0.03103031 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -33 0.366666675 0.0538308956 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.07946562 0.375 0 0 0.454545468 Private 10th Divorced Other-service Unmarried White Female United-States 0 -36 0.4 0.1253515 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.126347661 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -37 0.411111116 0.215318874 0.6875 0 0 0.545454562 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 1 -64 0.7111111 0.0431742333 0.5 0 0 0.24242425 ? 12th Married-civ-spouse ? Husband White Male United-States 0 -45 0.5 0.10973426 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.1943275 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.0227641184 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -26 0.2888889 0.1318336 0.5625 0.0235402342 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.144217208 0.5625 0 0 0.4040404 Private HS-grad Never-married Priv-house-serv Own-child White Male United-States 0 -24 0.266666681 0.07645626 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -58 0.644444466 0.175947413 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -36 0.4 0.06635325 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Unmarried White Female United-States 0 -46 0.51111114 0.126432523 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.144296676 0.25 0 0 0.4040404 ? 7th-8th Never-married ? Not-in-family White Female Mexico 0 -32 0.355555564 0.08349403 0.625 0.04386044 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.04646782 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Male United-States 0 -52 0.5777778 0.196746156 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Not-in-family White Female United-States 0 -19 0.211111113 0.133575365 0.5625 0 0 0.454545468 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -33 0.366666675 0.478073418 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -60 0.6666667 0.251119256 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.10803628 0.625 0 0 0.3838384 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -45 0.5 0.0663263053 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -37 0.411111116 0.06542444 0.625 0 0 0.4040404 Local-gov Some-college Married-spouse-absent Adm-clerical Unmarried Black Female United-States 0 -29 0.322222233 0.09226412 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Own-child White Male United-States 0 -53 0.5888889 0.126190722 0.625 0 0 0.6666667 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.0722237751 0.625 0 0.399449021 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -20 0.222222224 0.20601669 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -39 0.433333337 0.195946 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Own-child White Female United-States 0 -48 0.533333361 0.167207628 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -38 0.422222227 0.108309731 0.5625 0.04386044 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -36 0.4 0.166579217 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.166801482 0.25 0 0 0.565656543 Private 7th-8th Divorced Machine-op-inspct Unmarried Black Female United-States 0 -29 0.322222233 0.1446092 0.5625 0 0.453168035 0.353535354 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -64 0.7111111 0.0509037152 0.25 0.0258002579 0 0.5050505 Private 7th-8th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -34 0.377777785 0.3780778 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.151468471 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -41 0.455555558 0.270177573 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -34 0.377777785 0.1738864 0.5625 0 0 0.3838384 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -68 0.75555557 0.09509027 0.3125 0 0 0.02020202 ? 9th Married-civ-spouse ? Husband White Male United-States 0 -37 0.411111116 0.196921274 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband Other Male ? 1 -22 0.244444445 0.202647 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -43 0.477777779 0.09208631 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.0945635661 0.625 0 0 0.3030303 ? Some-college Never-married ? Other-relative White Female United-States 0 -36 0.4 0.07350484 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -47 0.5222222 0.125637084 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -25 0.2777778 0.152818918 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Other-relative Asian-Pac-Islander Female ? 0 -33 0.366666675 0.162917882 0.625 0 0 0.4040404 Private Some-college Separated Machine-op-inspct Not-in-family White Male United-States 0 -27 0.3 0.06544398 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Other-relative White Female United-States 0 -33 0.366666675 0.143407613 0.625 0 0 0.7070707 Private Some-college Never-married Tech-support Not-in-family White Male United-States 0 -24 0.266666681 0.142509788 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Own-child White Female United-States 0 -47 0.5222222 0.120097257 0.625 0 0 0.4040404 Local-gov Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -48 0.533333361 0.32463488 0.375 0 0 0.4040404 Self-emp-inc 10th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -28 0.311111122 0.144952029 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -33 0.366666675 0.131272539 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.2295978 0.8125 0 0.453856736 0.4040404 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -33 0.366666675 0.128166884 0.6875 0 0 0.565656543 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Male United-States 0 -26 0.2888889 0.127007723 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.109302521 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Own-child White Male United-States 0 -34 0.377777785 0.193516567 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.20489727 0.625 0 0 0.454545468 Self-emp-inc Some-college Never-married Exec-managerial Own-child White Male United-States 0 -73 0.811111152 0.135298267 0.5625 0 0 0.151515156 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -38 0.422222227 0.173006758 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -51 0.566666663 0.0312526748 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -36 0.4 0.0254447851 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.129131377 0.625 0.07688077 0 0.545454562 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -64 0.7111111 0.0698071346 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.09683136 0.625 0 0 0.5555556 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -21 0.233333334 0.137687281 0.625 0 0 0.2020202 State-gov Some-college Never-married Exec-managerial Own-child White Female United-States 0 -28 0.311111122 0.10524448 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.076234 0.4375 0 0 0.25252524 ? 11th Never-married ? Own-child White Male United-States 0 -41 0.455555558 0.07561233 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -17 0.188888893 0.0188798457 0.3125 0 0 0.161616161 Private 9th Never-married Other-service Own-child White Male United-States 0 -58 0.644444466 0.215599731 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -50 0.5555556 0.225144386 0.8125 0 0 0.08080808 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.239788383 0.4375 0 0 0.4040404 Private 11th Married-spouse-absent Handlers-cleaners Not-in-family Amer-Indian-Eskimo Male Mexico 0 -47 0.5222222 0.187848762 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.09599752 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Male United-States 0 -50 0.5555556 0.231031761 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -29 0.322222233 0.135391876 0.875 0 0 0.5555556 Private Masters Never-married Prof-specialty Not-in-family White Male Scotland 0 -31 0.344444454 0.0545765 1 0 0 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.0229048878 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -31 0.344444454 0.01997838 0.625 0 0 0.6060606 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -53 0.5888889 0.234016865 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -33 0.366666675 0.0610680245 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -43 0.477777779 0.128242984 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 -56 0.622222245 0.07342536 0.625 0.07688077 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -38 0.422222227 0.158150613 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -18 0.2 0.10583315 0.4375 0 0 0.3030303 Private 11th Never-married Sales Own-child White Female United-States 0 -50 0.5555556 0.0633668 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -78 0.8666667 0.09130838 0.5625 0.0232902318 0 0.121212125 Private HS-grad Widowed Sales Unmarried White Female United-States 0 -27 0.3 0.06948451 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.383916 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Female United-States 0 -24 0.266666681 0.145346716 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -20 0.222222224 0.19492425 0.625 0 0.3677686 0.151515156 Private Some-college Never-married Sales Own-child White Male United-States 0 -25 0.2777778 0.161285236 0.875 0 0 0.353535354 Private Masters Never-married Prof-specialty Own-child White Male United-States 0 -34 0.377777785 0.0683704838 0.8125 0 0 0.5050505 Private Bachelors Divorced Sales Not-in-family White Female United-States 1 -30 0.333333343 0.298743516 0.6875 0 0 0.353535354 Self-emp-inc Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -37 0.411111116 0.09498789 0.875 0 0 0.4040404 Federal-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -38 0.422222227 0.139557689 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -67 0.7444445 0.092403546 0.5625 0 0 0.121212125 Without-pay HS-grad Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 0 -35 0.3888889 0.150190786 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -75 0.8333334 0.02446614 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -47 0.5222222 0.04943339 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -23 0.25555557 0.167741075 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -51 0.566666663 0.067793265 0.5625 0 0 0.08080808 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -42 0.466666669 0.7581392 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Other-service Not-in-family Black Male United-States 0 -32 0.355555564 0.06826407 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 1 -54 0.6 0.229322329 0.5625 0 0 0.353535354 Private HS-grad Separated Sales Unmarried White Female United-States 0 -20 0.222222224 0.1297975 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Female United-States 0 -39 0.433333337 0.184118733 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -41 0.455555558 0.06765721 0.5625 0.07688077 0 0.3838384 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -35 0.3888889 0.05751917 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -45 0.5 0.113282442 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -27 0.3 0.103370704 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -61 0.677777767 0.1325334 0.25 0 0 0.3030303 Self-emp-not-inc 7th-8th Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.121329159 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -22 0.244444445 0.0325633734 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -55 0.6111111 0.117916353 0.625 0.1502415 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 1 -66 0.733333349 0.08720655 0.8125 0 0 0.0606060624 ? Bachelors Married-civ-spouse ? Husband White Male United-States 0 -25 0.2777778 0.122429714 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.191497311 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 -20 0.222222224 0.1598331 0.625 0 0 0.353535354 Private Some-college Never-married Machine-op-inspct Other-relative Black Female United-States 0 -67 0.7444445 0.07497853 0.8125 0 0 0.161616161 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -44 0.4888889 0.1875632 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.0263082571 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -29 0.322222233 0.138251036 0.625 0 0 0.4040404 Local-gov Some-college Never-married Adm-clerical Not-in-family Other Male Ecuador 0 -48 0.533333361 0.133359835 0.625 0 0 0.3838384 Private Some-college Never-married Craft-repair Unmarried White Female United-States 1 -25 0.2777778 0.268041134 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative Black Female United-States 0 -31 0.344444454 0.120138347 0.5625 0 0 1 Private HS-grad Divorced Other-service Unmarried White Female United-States 1 -48 0.533333361 0.08166808 0.8125 0 0.5674931 0.7070707 Private Bachelors Married-spouse-absent Sales Unmarried White Female United-States 1 -40 0.444444448 0.0377664268 0.875 0 0 0.2020202 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -26 0.2888889 0.119051263 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -28 0.311111122 0.0406639725 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Own-child White Female United-States 0 -52 0.5777778 0.111591868 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -41 0.455555558 0.193329319 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -39 0.433333337 0.0374269634 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Wife White Female United-States 0 -48 0.533333361 0.104740672 0.5625 0 0 0.161616161 Private HS-grad Never-married Adm-clerical Not-in-family Black Female Trinadad&Tobago 0 -19 0.211111113 0.135500327 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -27 0.3 0.02508916 0.625 0 0.379017442 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -59 0.655555546 0.211590186 0.6875 0 0.399449021 0.5050505 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -19 0.211111113 0.178212509 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Male United-States 0 -32 0.355555564 0.107488692 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -39 0.433333337 0.306400955 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -33 0.366666675 0.192045555 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.101068564 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -27 0.3 0.0373070762 0.625 0 0 0.454545468 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -23 0.25555557 0.212091967 0.5625 0 0 0.454545468 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 -59 0.655555546 0.124568857 0.6875 0 0 0.4848485 ? Assoc-voc Divorced ? Not-in-family White Male United-States 0 -25 0.2777778 0.0838436 0.8125 0 0 0.2020202 Local-gov Bachelors Never-married Adm-clerical Not-in-family Asian-Pac-Islander Male India 0 -37 0.411111116 0.06599695 0.75 0 0 0.686868668 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 0 -31 0.344444454 0.141820773 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.15712212 0.75 0 0 0.373737365 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 -53 0.5888889 0.110661715 0.8125 0 0 0.3838384 Local-gov Bachelors Divorced Adm-clerical Unmarried White Female Dominican-Republic 0 -26 0.2888889 0.153221682 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Other-relative Black Male ? 0 -25 0.2777778 0.177660212 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -59 0.655555546 0.06496847 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -39 0.433333337 0.07853951 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.121240921 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -22 0.244444445 0.205741882 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -20 0.222222224 0.160918832 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male El-Salvador 0 -25 0.2777778 0.087414 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -27 0.3 0.24744983 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 -20 0.222222224 0.158746019 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Male United-States 0 -63 0.7 0.112092979 0.625 0 0 0.24242425 ? Some-college Widowed ? Not-in-family Black Female United-States 0 -43 0.477777779 0.108014055 0.375 0 0 0.25252524 Self-emp-not-inc 10th Divorced Farming-fishing Unmarried White Male United-States 0 -39 0.433333337 0.138948813 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.123609066 0.8125 0 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -17 0.188888893 0.146387339 0.375 0 0 0.05050505 Private 10th Never-married Sales Own-child White Female United-States 0 -40 0.444444448 0.09554625 0.9375 0 0 0.727272749 State-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -50 0.5555556 0.143662214 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.135839775 0.8125 0 0 0.353535354 Self-emp-inc Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -60 0.6666667 0.120099284 0.5625 0.07298073 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.181667745 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -24 0.266666681 0.13510631 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -23 0.25555557 0.0219680015 0.8125 0 0 0.2020202 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -24 0.266666681 0.174788937 0.8125 0.0501305 0 0.3030303 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -45 0.5 0.183085531 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -58 0.644444466 0.052605737 0.625 0.07298073 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.0765828937 0.625 0 0 0.2020202 Private Some-college Never-married Sales Other-relative White Male United-States 0 -41 0.455555558 0.126491129 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -48 0.533333361 0.296830684 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -31 0.344444454 0.129206821 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Other-relative White Male United-States 0 -33 0.366666675 0.100480571 0.9375 0 0.453856736 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.21283555 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.107488692 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.0406228863 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -58 0.644444466 0.022128975 0.5625 0 0 0.4848485 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -58 0.644444466 0.09586147 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -61 0.677777767 0.136030391 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -58 0.644444466 0.116072215 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -32 0.355555564 0.139112487 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -33 0.366666675 0.119773291 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.204377308 0.8125 0 0 0.5050505 Private Bachelors Separated Exec-managerial Not-in-family White Female United-States 1 -22 0.244444445 0.06061204 0.625 0 0 0.111111112 Private Some-college Never-married Other-service Own-child White Female United-States 0 -35 0.3888889 0.12528348 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -59 0.655555546 0.115166314 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -45 0.5 0.121397182 0.9375 0.07688077 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male ? 1 -50 0.5555556 0.14390333 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 -56 0.622222245 0.02176594 0.5 0 0 0.4040404 Self-emp-inc 12th Widowed Exec-managerial Not-in-family White Female United-States 0 -36 0.4 0.101280056 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -18 0.2 0.2612445 0.375 0 0 0.3030303 ? 10th Never-married ? Own-child White Male United-States 0 -28 0.311111122 0.211926952 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband Amer-Indian-Eskimo Male United-States 0 -42 0.466666669 0.161820024 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -60 0.6666667 0.13897644 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -41 0.455555558 0.1550261 0.625 0 0 0.9191919 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.115459979 0.8125 0.07298073 0 0.454545468 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -36 0.4 0.100074425 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -52 0.5777778 0.06041941 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.167310014 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -26 0.2888889 0.04889456 0.625 0 0 0.5555556 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -31 0.344444454 0.0926359147 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 0 -47 0.5222222 0.151589036 0.1875 0 0 0.4040404 Private 5th-6th Separated Sales Unmarried White Female Mexico 0 -35 0.3888889 0.146341532 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.0465755835 0.3125 0 0 0.25252524 Private 9th Never-married Handlers-cleaners Own-child White Male United-States 0 -59 0.655555546 0.05462836 0.625 0 0 0.8080808 Self-emp-not-inc Some-college Married-civ-spouse Sales Wife White Female United-States 1 -38 0.422222227 0.138648421 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.135459229 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.26759997 0.875 0 0 0.5555556 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -39 0.433333337 0.0777407 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -64 0.7111111 0.07745242 0.625 0 0 0.4040404 Private Some-college Separated Other-service Not-in-family White Male United-States 0 -17 0.188888893 0.026816776 0.375 0 0 0.25252524 Local-gov 10th Never-married Other-service Own-child White Female United-States 0 -49 0.544444442 0.102097049 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -19 0.211111113 0.111091428 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -36 0.4 0.121166162 0.5625 0.031370312 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Prof-specialty Wife White Female United-States 0 -26 0.2888889 0.170970663 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -27 0.3 0.119858831 0.1875 0.0217602178 0 0.4040404 Private 5th-6th Never-married Priv-house-serv Other-relative White Female El-Salvador 0 -66 0.733333349 0.07632695 0.8125 0.200512 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.215736464 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Adm-clerical Husband White Male United-States 0 -25 0.2777778 0.1544327 0.8125 0 0 0.25252524 Private Bachelors Never-married Exec-managerial Other-relative White Female United-States 0 -19 0.211111113 0.06788554 0.5625 0 0 0.4040404 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.223222122 0.75 0.04787048 0 0.5050505 Private Assoc-acdm Never-married Craft-repair Not-in-family White Male United-States 1 -22 0.244444445 0.115456611 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Unmarried Asian-Pac-Islander Male South 0 -60 0.6666667 0.13620618 0.625 0 0 0.444444448 Private Some-college Divorced Craft-repair Own-child White Male United-States 1 -54 0.6 0.207507223 0.625 0 0.453856736 0.181818187 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -46 0.51111114 0.1482611 0.5625 0 0 0.373737365 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.0213530641 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Own-child White Male United-States 0 -51 0.566666663 0.103662349 0.875 0 0 0.4040404 Local-gov Masters Divorced Exec-managerial Not-in-family White Female United-States 0 -43 0.477777779 0.121639654 0.9375 0.1502415 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.169761673 0.5625 0 0 0.3030303 ? HS-grad Never-married ? Own-child White Female United-States 0 -60 0.6666667 0.107807279 0.5625 0 0 0.25252524 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -39 0.433333337 0.09998148 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -23 0.25555557 0.06178534 0.8125 0.0332503319 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Female United-States 0 -39 0.433333337 0.11896909 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Tech-support Not-in-family White Female United-States 0 -40 0.444444448 0.0504807346 0.625 0 0 0.4040404 Local-gov Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -48 0.533333361 0.111459181 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.0301325861 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -32 0.355555564 0.0875864252 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -31 0.344444454 0.15796876 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.120573446 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -27 0.3 0.225917608 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Own-child White Female United-States 0 -45 0.5 0.210599422 0.875 0 0 0.3838384 State-gov Masters Never-married Adm-clerical Not-in-family Black Male United-States 0 -22 0.244444445 0.211345688 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Other-relative Black Female United-States 0 -31 0.344444454 0.133865654 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Not-in-family Asian-Pac-Islander Male Vietnam 0 -63 0.7 0.08858258 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -45 0.5 0.191997737 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.127813265 0.625 0 0 0.5050505 State-gov Some-college Separated Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.08816903 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 -50 0.5555556 0.09855493 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -33 0.366666675 0.06925349 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Protective-serv Husband White Male United-States 0 -22 0.244444445 0.09286424 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -27 0.3 0.262003571 0.8125 0.135501355 0 0.464646459 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -29 0.322222233 0.055842746 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.208204329 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -60 0.6666667 0.3588895 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Craft-repair Husband White Male Mexico 1 -46 0.51111114 0.131900281 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Transport-moving Husband White Male ? 0 -67 0.7444445 0.0666004345 0.875 0 0 0.4040404 ? Masters Widowed ? Not-in-family White Female United-States 0 -20 0.222222224 0.08992696 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child White Female France 0 -23 0.25555557 0.037189208 0.8125 0 0 0.5555556 Private Bachelors Never-married Sales Own-child White Male United-States 0 -38 0.422222227 0.11878252 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -60 0.6666667 0.125166953 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.03647324 0.625 0 0 0.353535354 Self-emp-not-inc Some-college Never-married Craft-repair Not-in-family White Female United-States 0 -37 0.411111116 0.143083647 0.625 0 0 0.4848485 Private Some-college Widowed Machine-op-inspct Unmarried Black Female United-States 0 -37 0.411111116 0.15125294 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -58 0.644444466 0.134733841 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.0279691927 0.8125 0 0 0.3030303 Private Bachelors Never-married Craft-repair Own-child White Male Canada 0 -27 0.3 0.0603473447 0.625 0 0 0.6060606 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -33 0.366666675 0.21809788 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -43 0.477777779 0.0207610279 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.1219744 0.625 0 0 0.2020202 Federal-gov Some-college Never-married Tech-support Own-child Black Male United-States 0 -45 0.5 0.146798864 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Other Male Mexico 0 -44 0.4888889 0.149952352 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -52 0.5777778 0.0821321458 0.25 0 0 0.4040404 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -53 0.5888889 0.233629584 0.5625 0.04787048 0 0.464646459 Private HS-grad Divorced Prof-specialty Not-in-family White Male United-States 1 -31 0.344444454 0.124529116 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 -18 0.2 0.06850452 0.4375 0 0 0.151515156 Federal-gov 11th Never-married Other-service Own-child Asian-Pac-Islander Male Philippines 0 -20 0.222222224 0.08419855 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -32 0.355555564 0.0357882567 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -48 0.533333361 0.3356411 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -46 0.51111114 0.4070708 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -28 0.311111122 0.117415249 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -27 0.3 0.240642428 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Sales Not-in-family Black Male United-States 0 -18 0.2 0.189079985 0.625 0 0 0.323232323 Federal-gov Some-college Never-married Sales Own-child White Female United-States 0 -69 0.7666667 0.124630146 0.5625 0.09386094 0 0.121212125 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.169218808 0.875 0 0 0.4040404 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.0963464156 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female Greece 0 -32 0.355555564 0.141806617 0.8125 0 0 0.3030303 Private Bachelors Divorced Sales Unmarried White Female United-States 0 -43 0.477777779 0.1160931 0.5625 0 0 0.4848485 Private HS-grad Separated Exec-managerial Not-in-family White Female United-States 0 -52 0.5777778 0.09335929 0.5625 0.07688077 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.118694961 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 -35 0.3888889 0.09405707 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 1 -20 0.222222224 0.1175055 0.5625 0 0 0.05050505 ? HS-grad Never-married ? Own-child White Female United-States 0 -73 0.811111152 0.08307711 0.5625 0 0 0.656565666 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -46 0.51111114 0.110747255 0.5625 0 0 0.454545468 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -58 0.644444466 0.138232857 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -46 0.51111114 0.12984331 0.9375 0.1502415 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.110078432 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -25 0.2777778 0.177850142 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -22 0.244444445 0.2264524 0.75 0 0 0.25252524 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -33 0.366666675 0.0527424663 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -49 0.544444442 0.156973273 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.06158328 0.375 0 0 0.4040404 Private 10th Divorced Prof-specialty Unmarried White Female United-States 0 -56 0.622222245 0.106098518 0.625 0 0 0.4848485 Local-gov Some-college Divorced Protective-serv Not-in-family Black Male United-States 0 -24 0.266666681 0.0579677448 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Unmarried White Female Mexico 0 -42 0.466666669 0.0153774656 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -41 0.455555558 0.121358119 0.875 0 0 0.4040404 Private Masters Divorced Exec-managerial Unmarried White Female United-States 0 -23 0.25555557 0.143204883 0.8125 0 0 0.6666667 Private Bachelors Never-married Other-service Not-in-family White Male Ecuador 0 -22 0.244444445 0.08480136 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -35 0.3888889 0.2268417 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Other-relative White Male United-States 0 -42 0.466666669 0.211926952 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Handlers-cleaners Other-relative Asian-Pac-Islander Male ? 0 -22 0.244444445 0.191262916 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male Mexico 0 -32 0.355555564 0.02397446 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.2763108 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -66 0.733333349 0.119969964 0.1875 0 0 0.151515156 Private 5th-6th Divorced Priv-house-serv Not-in-family Black Female United-States 0 -26 0.2888889 0.19828856 0.5625 0 0 0.3838384 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -46 0.51111114 0.0440175 0.625 0.0332503319 0 0.5555556 Private Some-college Divorced Transport-moving Own-child White Male United-States 0 -55 0.6111111 0.127782285 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.0157863013 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.119914062 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Male United-States 0 -22 0.244444445 0.073964186 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.13326554 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -30 0.333333343 0.183156252 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -54 0.6 0.0954149142 0.5625 0 0 0.151515156 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -19 0.211111113 0.134443551 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -56 0.622222245 0.0621099845 0.3125 0 0 0.4040404 Private 9th Divorced Craft-repair Not-in-family White Female United-States 1 -47 0.5222222 0.06294113 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Japan 0 -29 0.322222233 0.1585453 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -53 0.5888889 0.102285638 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.12748459 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -50 0.5555556 0.137789667 0.8125 0 0.43663913 0.6060606 ? Bachelors Married-civ-spouse ? Husband Black Male United-States 1 -42 0.466666669 0.23208113 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 1 -21 0.233333334 0.17872642 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Male United-States 0 -36 0.4 0.112399437 0.5625 0 0 0.7070707 Self-emp-inc HS-grad Never-married Other-service Not-in-family White Female United-States 0 -60 0.6666667 0.127062276 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Sales Husband White Male ? 1 -69 0.7666667 0.143630549 0.6875 0 0 0.25252524 Private Assoc-voc Widowed Sales Not-in-family White Female United-States 0 -31 0.344444454 0.07585817 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -48 0.533333361 0.08427264 0.625 0 0 0.5555556 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.0406875461 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -24 0.266666681 0.163796857 0.75 0.0861408561 0 0.4040404 Private Assoc-acdm Separated Craft-repair Unmarried Asian-Pac-Islander Male United-States 1 -47 0.5222222 0.393179119 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -36 0.4 0.04586029 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Amer-Indian-Eskimo Female United-States 0 -39 0.433333337 0.206536651 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.125663355 0.5625 0 0 0.464646459 Private HS-grad Never-married Transport-moving Not-in-family White Female United-States 0 -27 0.3 0.188306779 0.8125 0.105201051 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -36 0.4 0.29494682 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -54 0.6 0.2833499 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Other-service Husband White Male Mexico 0 -33 0.366666675 0.06344223 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -42 0.466666669 0.1037755 0.5625 0.07688077 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.09825454 0.625 0 0 0.656565666 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -23 0.25555557 0.140732333 0.8125 0 0 0.323232323 Private Bachelors Never-married Sales Own-child White Male United-States 0 -33 0.366666675 0.1561428 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -30 0.333333343 0.120284505 0.6875 0 0 0.3838384 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.143602937 0.6875 0 0 0.3838384 Private Assoc-voc Married-civ-spouse Tech-support Husband Black Male Jamaica 0 -35 0.3888889 0.09413992 0.6875 0 0 0.2020202 ? Assoc-voc Married-civ-spouse ? Wife White Female United-States 1 -27 0.3 0.103636079 0.5625 0 0 0.373737365 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -24 0.266666681 0.0597263426 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -44 0.4888889 0.101763651 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -62 0.6888889 0.09336603 0.6875 0 0 0.2020202 Private Assoc-voc Separated Priv-house-serv Not-in-family Black Female United-States 0 -45 0.5 0.02051384 0.8125 0.1502415 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -75 0.8333334 0.1436979 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -47 0.5222222 0.129841283 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -64 0.7111111 0.12991403 0.9375 0 0 0.6060606 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 0 -54 0.6 0.069390215 0.5625 0 0 0.424242437 Private HS-grad Divorced Tech-support Not-in-family White Male United-States 1 -41 0.455555558 0.343551069 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.120303363 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.16835399 0.625 0 0 0.1010101 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -51 0.566666663 0.119690448 0.8125 0 0 0.5050505 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 -45 0.5 0.08158119 0.9375 0 0 0.5050505 Self-emp-inc Prof-school Never-married Craft-repair Not-in-family White Male United-States 1 -18 0.2 0.01740211 0.4375 0 0 0.727272749 ? 11th Never-married ? Own-child White Male United-States 0 -43 0.477777779 0.375393778 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male Yugoslavia 0 -30 0.333333343 0.0604396164 0.5625 0 0.3452709 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -32 0.355555564 0.149893746 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -45 0.5 0.0318676122 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male ? 1 -61 0.677777767 0.2130787 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -21 0.233333334 0.134766847 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Other-service Other-relative White Male England 0 -56 0.622222245 0.1830633 0.4375 0 0 0.4949495 Private 11th Divorced Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.02141907 0.5625 0 0 0.6060606 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -23 0.25555557 0.132354915 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Black Female United-States 0 -55 0.6111111 0.127926424 0.625 0 0 0.8484849 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -27 0.3 0.33755663 0.625 0 0.09618916 0.2020202 ? Some-college Married-civ-spouse ? Husband White Male Mexico 0 -33 0.366666675 0.2434807 0.5625 0 0 0.7070707 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -22 0.244444445 0.101148039 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -43 0.477777779 0.10446924 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.04194234 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -38 0.422222227 0.12791498 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 -18 0.2 0.218232587 0.3125 0 0 0.2020202 Private 9th Never-married Farming-fishing Own-child White Male United-States 0 -35 0.3888889 0.07126197 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -67 0.7444445 0.0360933654 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -29 0.322222233 0.072740376 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Own-child White Female United-States 0 -19 0.211111113 0.229383618 0.125 0 0 0.5555556 Private 1st-4th Never-married Handlers-cleaners Not-in-family White Male Mexico 0 -39 0.433333337 0.1130036 0.4375 0 0 0.353535354 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.1541451 0.625 0 0.4331956 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.0273899529 0.9375 0 0 0.5555556 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.18689774 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -42 0.466666669 0.13194339 0.25 0 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.1636581 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -52 0.5777778 0.159288883 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -18 0.2 0.210569784 0.4375 0 0 0.25252524 ? 11th Never-married ? Own-child White Male United-States 0 -64 0.7111111 0.0402968936 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male France 0 -30 0.333333343 0.0163615 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.121510334 0.8125 0 0 0.424242437 Local-gov Bachelors Divorced Exec-managerial Unmarried White Male Germany 0 -49 0.544444442 0.0816579759 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Craft-repair Unmarried White Male United-States 0 -35 0.3888889 0.1899246 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.234887749 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.13079299 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -19 0.211111113 0.2216804 0.4375 0 0 0.4040404 Private 11th Separated Other-service Own-child White Female United-States 0 -22 0.244444445 0.138707012 0.8125 0.0220202189 0 0.04040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -31 0.344444454 0.04187027 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -26 0.2888889 0.151114866 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.0233864635 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -38 0.422222227 0.11852321 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -33 0.366666675 0.242087156 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.09328722 0.5625 0 0 0.373737365 ? HS-grad Separated ? Unmarried Black Female United-States 0 -18 0.2 0.181148455 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child White Male United-States 0 -32 0.355555564 0.173757076 0.6875 0 0 0.4040404 Private Assoc-voc Widowed Tech-support Unmarried Black Female United-States 0 -27 0.3 0.08001523 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.05277547 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Husband Black Male Jamaica 0 -30 0.333333343 0.4107139 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -33 0.366666675 0.08295049 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Not-in-family Black Male United-States 0 -74 0.822222233 0.0567095838 0.875 0 0 0.1010101 Private Masters Divorced Sales Not-in-family White Female United-States 0 -36 0.4 0.109322727 0.5625 0 0 0.7070707 Private HS-grad Never-married Craft-repair Not-in-family Asian-Pac-Islander Male South 0 -36 0.4 0.09324479 0.75 0 0 0.5555556 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 -29 0.322222233 0.161481917 0.5625 0 0.4722222 0.2020202 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -39 0.433333337 0.176572457 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 0 -25 0.2777778 0.089831315 0.8125 0 0 0.8080808 Self-emp-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 -21 0.233333334 0.0390084237 0.5625 0 0 0.4040404 Private HS-grad Separated Farming-fishing Own-child White Male United-States 0 -39 0.433333337 0.0962460563 0.6875 0 0 0.5050505 State-gov Assoc-voc Never-married Exec-managerial Unmarried White Female United-States 0 -38 0.422222227 0.108449832 0.625 0 0 0.323232323 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -20 0.222222224 0.153223038 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Not-in-family Asian-Pac-Islander Female United-States 0 -51 0.566666663 0.206633642 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.0227863453 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.127279162 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -50 0.5555556 0.21118404 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 -38 0.422222227 0.14857161 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.321005851 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.110234022 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 -36 0.4 0.206536651 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.13906467 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Germany 0 -34 0.377777785 0.11422 0.875 0 0 0.5050505 Private Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -19 0.211111113 0.08559613 0.625 0 0 0.1010101 State-gov Some-college Never-married Other-service Own-child White Male United-States 0 -18 0.2 0.102406874 0.375 0 0 0.0303030312 Private 10th Never-married Other-service Own-child White Female United-States 0 -36 0.4 0.07502299 0.375 0 0 0.4040404 Private 10th Divorced Sales Own-child White Male United-States 0 -46 0.51111114 0.068914704 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -29 0.322222233 0.14392893 0.625 0 0 0.454545468 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -23 0.25555557 0.110234022 0.5625 0 0 0.323232323 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -35 0.3888889 0.020562334 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -35 0.3888889 0.195477217 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -40 0.444444448 0.122674875 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -22 0.244444445 0.0493471771 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child Asian-Pac-Islander Male United-States 0 -19 0.211111113 0.0406895652 0.625 0 0 0.151515156 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -70 0.7777778 0.126551062 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -38 0.422222227 0.130870447 0.625 0 0 0.5555556 Private Some-college Divorced Transport-moving Not-in-family Black Male United-States 0 -35 0.3888889 0.108378433 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.0998851657 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 -39 0.433333337 0.111633629 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -50 0.5555556 0.08296194 1 0 0 0.373737365 Private Doctorate Married-civ-spouse Prof-specialty Husband Black Male ? 1 -43 0.477777779 0.123942472 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.126670957 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male Philippines 1 -51 0.566666663 0.09352161 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male El-Salvador 1 -29 0.322222233 0.05289199 0.375 0 0 0.121212125 ? 10th Separated ? Unmarried White Female United-States 0 -20 0.222222224 0.110756688 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -21 0.233333334 0.13431558 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.122140095 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Wife Black Female United-States 0 -44 0.4888889 0.116778754 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Tech-support Unmarried White Female United-States 0 -17 0.188888893 0.124552689 0.3125 0 0.3946281 0.151515156 Private 9th Never-married Handlers-cleaners Own-child White Male United-States 0 -25 0.2777778 0.145068556 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Not-in-family White Male United-States 0 -43 0.477777779 0.285641938 1 0 0 0.4040404 State-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 -46 0.51111114 0.142870128 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 1 -42 0.466666669 0.125118464 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -46 0.51111114 0.0902327448 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family Amer-Indian-Eskimo Male United-States 0 -22 0.244444445 0.0219680015 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -49 0.544444442 0.10049808 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -21 0.233333334 0.108580492 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -53 0.5888889 0.1923756 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Adm-clerical Wife White Female United-States 1 -43 0.477777779 0.1899832 0.625 0 0 0.424242437 Private Some-college Divorced Craft-repair Unmarried White Male United-States 0 -22 0.244444445 0.065675 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -33 0.366666675 0.2403326 0.8125 0.105201051 0 0.454545468 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -28 0.311111122 0.115263976 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -25 0.2777778 0.156016186 0.625 0 0 0.24242425 Private Some-college Never-married Tech-support Unmarried White Female United-States 0 -40 0.444444448 0.128875434 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male China 1 -50 0.5555556 0.152553543 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -48 0.533333361 0.251636535 0.625 0 0 0.656565666 Self-emp-not-inc Some-college Divorced Sales Unmarried White Male United-States 1 -30 0.333333343 0.0263688751 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.1945437 0.5625 0 0 0.3838384 Private HS-grad Married-spouse-absent Other-service Unmarried Black Female United-States 0 -34 0.377777785 0.1978191 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 0 -42 0.466666669 0.0536039174 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male United-States 1 -48 0.533333361 0.0552958325 0.625 0 0 0.656565666 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 0 -38 0.422222227 0.1652665 0.8125 0.07688077 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.0527114831 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.239775583 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Not-in-family White Male United-States 0 -64 0.7111111 0.147160545 0.8125 0.2782828 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 1 -44 0.4888889 0.07470036 0.6875 0 0 0.25252524 Private Assoc-voc Married-civ-spouse Transport-moving Wife White Female United-States 0 -42 0.466666669 0.0230470039 0.8125 0.07298073 0 0.5050505 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.16763936 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -25 0.2777778 0.2449692 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -33 0.366666675 0.1834782 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -38 0.422222227 0.0862346441 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -20 0.222222224 0.119408906 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -44 0.4888889 0.132917985 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -45 0.5 0.192535222 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 -27 0.3 0.130576789 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Never-married Sales Not-in-family White Male United-States 0 -18 0.2 0.156315237 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -38 0.422222227 0.0184602328 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -45 0.5 0.166391984 0.4375 0 0 0.424242437 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.109384693 0.5625 0.0217402168 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Not-in-family Black Male United-States 0 -64 0.7111111 0.159183815 0.1875 0 0 0.161616161 Private 5th-6th Widowed Other-service Not-in-family Black Female United-States 0 -66 0.733333349 0.120754629 0.5625 0.0343203433 0 0.2020202 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -34 0.377777785 0.0204976741 0.8125 0 0 0.353535354 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -45 0.5 0.06921981 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 1 -42 0.466666669 0.148966968 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -32 0.355555564 0.07281985 0.8125 0 0.43663913 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.252911538 0.375 0 0 0.2020202 Private 10th Never-married Adm-clerical Not-in-family Black Male United-States 0 -27 0.3 0.120352529 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Other-relative White Male United-States 0 -21 0.233333334 0.186373055 0.625 0 0 0.4040404 Private Some-college Never-married Sales Other-relative White Female United-States 0 -23 0.25555557 0.1603598 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Male United-States 0 -47 0.5222222 0.05710899 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.0252454188 0.625 0 0 0.4040404 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -46 0.51111114 0.12035118 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -35 0.3888889 0.103674471 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife Black Female United-States 0 -55 0.6111111 0.0745926 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.07854288 0.625 0 0 0.24242425 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -21 0.233333334 0.07320444 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -36 0.4 0.246337831 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -29 0.322222233 0.131530508 1 0 0 0.6060606 Private Doctorate Divorced Prof-specialty Not-in-family White Female United-States 1 -38 0.422222227 0.08482022 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 -37 0.411111116 0.09487002 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -81 0.900000036 0.130151778 0.125 0 0 0.454545468 Self-emp-not-inc 1st-4th Widowed Sales Other-relative White Male Mexico 0 -41 0.455555558 0.03156856 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -29 0.322222233 0.23662883 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Female United-States 0 -30 0.333333343 0.1274765 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Divorced Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.159334019 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -42 0.466666669 0.37559247 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -30 0.333333343 0.2522077 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Own-child Black Male United-States 0 -65 0.722222269 0.108206011 0.5625 0 0 0.2020202 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -18 0.2 0.0826932 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -26 0.2888889 0.144414544 0.4375 0.06497065 0 0.4848485 Private 11th Never-married Machine-op-inspct Unmarried White Male United-States 0 -30 0.333333343 0.2218791 0.625 0 0 0.4848485 Private Some-college Never-married Protective-serv Own-child White Male United-States 0 -61 0.677777767 0.120099284 0.75 0 0 0.424242437 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 -21 0.233333334 0.162962347 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -53 0.5888889 0.0876558 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -41 0.455555558 0.07717358 0.9375 0 0.5544077 0.5555556 Self-emp-inc Prof-school Married-civ-spouse Exec-managerial Wife White Female United-States 1 -43 0.477777779 0.0876443461 0.625 0.1502415 0 0.454545468 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -60 0.6666667 0.269000918 0.25 0 0 0.151515156 Private 7th-8th Separated Priv-house-serv Unmarried Black Female United-States 0 -47 0.5222222 0.110334381 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.04686857 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family Black Male United-States 0 -32 0.355555564 0.160235882 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 -25 0.2777778 0.148108214 0.875 0 0 0.353535354 ? Masters Never-married ? Not-in-family White Female Canada 0 -31 0.344444454 0.163780019 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Unmarried White Male United-States 0 -33 0.366666675 0.117064334 0.875 0 0 0.3030303 State-gov Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.04398719 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -44 0.4888889 0.275159717 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 1 -44 0.4888889 0.15881 0.625 0.07298073 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.212138444 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -34 0.377777785 0.05469504 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family Black Male United-States 0 -51 0.566666663 0.197477624 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.06420737 0.875 0 0 0.4040404 Private Masters Divorced Protective-serv Unmarried White Male United-States 0 -25 0.2777778 0.0306283068 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -25 0.2777778 0.251045167 0.8125 0 0 0.24242425 Private Bachelors Never-married Other-service Not-in-family Black Female Jamaica 0 -29 0.322222233 0.0783953741 0.8125 0 0 0.5050505 Federal-gov Bachelors Married-AF-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.02302141 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 1 -55 0.6111111 0.220642492 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -39 0.433333337 0.475636572 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Unmarried White Female United-States 0 -31 0.344444454 0.0219235476 0.375 0 0 0.4040404 Private 10th Divorced Handlers-cleaners Not-in-family White Male United-States 0 -31 0.344444454 0.11709936 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male India 0 -51 0.566666663 0.154976919 0.6875 0 0 0.4040404 Self-emp-inc Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -30 0.333333343 0.0936293751 0.6875 0.0246302467 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Other-relative Asian-Pac-Islander Male Vietnam 0 -62 0.6888889 0.117673881 0.5625 0 0 0.323232323 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -37 0.411111116 0.115275428 0.8125 1 0 0.6060606 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.05232622 0.8125 0.07688077 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.130597 0.8125 0 0 0.5252525 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -32 0.355555564 0.131339222 0.8125 0.07298073 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.204162449 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -35 0.3888889 0.126988187 0.3125 0 0 0.5050505 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.106860287 0.75 0 0 0.363636374 Private Assoc-acdm Never-married Prof-specialty Unmarried White Female United-States 0 -45 0.5 0.137533054 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 -27 0.3 0.123796985 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -46 0.51111114 0.100353271 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.128579751 0.4375 0 0 0.2020202 Private 11th Married-civ-spouse Adm-clerical Wife White Female United-States 0 -37 0.411111116 0.117046826 0.625 0 0 0.3030303 State-gov Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -42 0.466666669 0.169218138 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Puerto-Rico 0 -45 0.5 0.0759484246 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Female United-States 0 -33 0.366666675 0.2867809 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -46 0.51111114 0.133178651 0.6875 0 0 0.4040404 Private Assoc-voc Married-spouse-absent Machine-op-inspct Unmarried White Male United-States 0 -24 0.266666681 0.08025567 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -56 0.622222245 0.0901317149 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family White Female United-States 0 -34 0.377777785 0.124978364 0.625 0 0 0.121212125 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 1 -50 0.5555556 0.07360183 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -48 0.533333361 0.0242607128 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.03088627 0.4375 0 0 0.363636374 Private 11th Married-civ-spouse Other-service Wife White Female United-States 0 -55 0.6111111 0.1245244 0.6875 0.05178052 0 0.5050505 Private Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 -41 0.455555558 0.230910525 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -66 0.733333349 0.1581075 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.07151522 0.625 0 0.323232323 0.4040404 Federal-gov Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.119818419 0.625 0.0501305 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Wife White Female United-States 0 -63 0.7 0.173688382 0.9375 0 0 0.4040404 ? Prof-school Married-civ-spouse ? Husband White Male United-States 0 -61 0.677777767 0.0579690933 0.75 0.1502415 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -64 0.7111111 0.044880297 0.8125 0.2782828 0 0.5050505 Private Bachelors Divorced Exec-managerial Unmarried White Male United-States 1 -35 0.3888889 0.09324479 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -22 0.244444445 0.1884563 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -58 0.644444466 0.27422148 0.25 0.0293602925 0 0.5050505 Private 7th-8th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -58 0.644444466 0.0213725958 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.137516886 0.5625 0 0 0.4848485 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -34 0.377777785 0.06775285 0.625 0 0 0.0606060624 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -33 0.366666675 0.1095322 0.875 0 0 0.5050505 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.0545111671 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -17 0.188888893 0.03194237 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Female United-States 0 -27 0.3 0.0726151 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Other-relative White Male United-States 1 -20 0.222222224 0.07034596 0.625 0 0 0.2020202 Self-emp-inc Some-college Never-married Adm-clerical Own-child White Female United-States 0 -52 0.5777778 0.07913761 0.8125 0 0.40289256 0.4040404 Private Bachelors Divorced Prof-specialty Unmarried White Female United-States 1 -30 0.333333343 0.141234115 0.25 0 0 0.4040404 Private 7th-8th Divorced Transport-moving Not-in-family White Male United-States 0 -22 0.244444445 0.211843431 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -20 0.222222224 0.128491521 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Not-in-family White Female United-States 0 -64 0.7111111 0.134234071 0.1875 0 0 0.454545468 Local-gov 5th-6th Divorced Other-service Not-in-family White Female ? 0 -49 0.544444442 0.126200154 0.875 0.1502415 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.145570338 0.8125 0 0 0.6060606 Private Bachelors Divorced Other-service Not-in-family Black Female ? 0 -46 0.51111114 0.1477014 0.5625 0 0 0.8080808 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -17 0.188888893 0.0918451846 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Male United-States 0 -45 0.5 0.157471687 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -27 0.3 0.139833167 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -45 0.5 0.120120831 0.6875 0 0 0.3030303 Self-emp-inc Assoc-voc Divorced Sales Unmarried White Female United-States 0 -26 0.2888889 0.1263901 0.5625 0 0 0.7878788 Self-emp-inc HS-grad Divorced Exec-managerial Not-in-family White Male United-States 1 -23 0.25555557 0.126991555 0.75 0 0.453168035 0.2020202 Private Assoc-acdm Never-married Adm-clerical Own-child White Female United-States 0 -44 0.4888889 0.039148517 0.8125 0 0 0.454545468 Local-gov Bachelors Divorced Prof-specialty Unmarried White Male United-States 0 -36 0.4 0.216698274 0.8125 0 0.3996786 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -35 0.3888889 0.1389185 0.3125 0 0 0.4040404 Private 9th Never-married Exec-managerial Not-in-family White Female United-States 0 -24 0.266666681 0.102471538 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -56 0.622222245 0.051377885 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Prof-specialty Unmarried White Female United-States 0 -47 0.5222222 0.4086684 0.875 0 0 0.4040404 Private Masters Divorced Tech-support Not-in-family White Male United-States 0 -32 0.355555564 0.0201609079 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -29 0.322222233 0.07688935 0.8125 0.0332503319 0 0.1010101 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -55 0.6111111 0.153029054 0.75 0 0 0.05050505 ? Assoc-acdm Married-spouse-absent ? Not-in-family White Female United-States 0 -35 0.3888889 0.0442000255 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.0229985081 0.5625 0 0 0.686868668 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.02315477 0.6875 0.03908039 0 0.75757575 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -33 0.366666675 0.0952983946 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -34 0.377777785 0.134186253 0.5625 0 0 0.5050505 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -24 0.266666681 0.151514277 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -25 0.2777778 0.155826911 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.07646637 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -38 0.422222227 0.0149827749 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.0245052055 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male Mexico 1 -35 0.3888889 0.215736464 0.5625 0 0 0.323232323 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -67 0.7444445 0.135822937 0.8125 0 0 0.6060606 ? Bachelors Divorced ? Not-in-family White Female United-States 0 -34 0.377777785 0.03295941 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -46 0.51111114 0.06833344 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -19 0.211111113 0.164315477 0.625 0 0 0.161616161 Local-gov Some-college Never-married Sales Own-child White Female United-States 0 -26 0.2888889 0.06123439 0.75 0 0 0.151515156 Private Assoc-acdm Never-married Other-service Own-child Black Female United-States 0 -28 0.311111122 0.212356672 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family Black Male United-States 0 -47 0.5222222 0.07156641 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.145412728 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Adm-clerical Husband White Male Italy 1 -33 0.366666675 0.115160257 0.9375 0 0.4331956 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.141795844 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.131667912 0.5625 0 0 0.4040404 Private HS-grad Never-married Priv-house-serv Own-child White Female Guatemala 0 -18 0.2 0.102542929 0.625 0 0 0.161616161 Private Some-college Never-married Other-service Own-child Asian-Pac-Islander Male United-States 0 -60 0.6666667 0.126485735 0.5625 0.03103031 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -44 0.4888889 0.07435551 0.875 0.14084141 0 0.565656543 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 -81 0.900000036 0.060207922 0.9375 0 0 0.24242425 ? Prof-school Married-civ-spouse ? Husband White Male United-States 1 -43 0.477777779 0.171628043 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Not-in-family White Female United-States 0 -35 0.3888889 0.02813825 0.5 0 0 0.2020202 Private 12th Never-married Farming-fishing Not-in-family White Male United-States 0 -58 0.644444466 0.158173516 0.5625 0 0 0.727272749 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -32 0.355555564 0.0536039174 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 0 -40 0.444444448 0.0776794 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.0428125449 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 -21 0.233333334 0.08894225 0.625 0 0.395087242 0.353535354 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -44 0.4888889 0.249545872 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Husband White Male Mexico 0 -33 0.366666675 0.0397944376 0.8125 0 0.43663913 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -25 0.2777778 0.04675205 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -42 0.466666669 0.02221384 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -27 0.3 0.1190021 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -62 0.6888889 0.0970670953 0.375 0 0 0.4040404 ? 10th Married-civ-spouse ? Husband White Male United-States 0 -31 0.344444454 0.140912175 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Sales Not-in-family Black Male ? 0 -33 0.366666675 0.101472683 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Other-relative Black Female United-States 0 -50 0.5555556 0.08405239 0.625 0 0 0.5555556 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.0149598746 0.875 0.07688077 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.182234854 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -22 0.244444445 0.0257633682 0.75 0 0 0.353535354 Private Assoc-acdm Never-married Other-service Unmarried White Female United-States 0 -66 0.733333349 0.109749079 0.9375 0.200512 0 0.5555556 State-gov Prof-school Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -52 0.5777778 0.131768942 0.5625 0 0 0.454545468 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -57 0.6333333 0.080019936 0.125 0 0.3677686 0.454545468 Self-emp-not-inc 1st-4th Widowed Craft-repair Other-relative White Female Columbia 0 -41 0.455555558 0.0296395589 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Divorced Farming-fishing Not-in-family White Male United-States 0 -42 0.466666669 0.0806079358 0.5625 0 0.3624885 0.424242437 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -19 0.211111113 0.224928856 0.5 0 0 0.3030303 Private 12th Never-married Other-service Other-relative White Female United-States 0 -45 0.5 0.1159227 0.8125 0 0 0.6060606 Local-gov Bachelors Divorced Exec-managerial Unmarried Black Female United-States 0 -51 0.566666663 0.0218036585 0.5 0 0 1 Self-emp-not-inc 12th Married-civ-spouse Other-service Husband White Male United-States 0 -69 0.7666667 0.0791571438 0.75 0 0 0.01010101 ? Assoc-acdm Divorced ? Unmarried White Female United-States 0 -45 0.5 0.08330342 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -48 0.533333361 0.21375291 0.625 0 0 0.5050505 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -60 0.6666667 0.0807109848 0.625 0.07298073 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -42 0.466666669 0.0909648761 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -19 0.211111113 0.09103627 0.625 0 0 0.1010101 State-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -39 0.433333337 0.130668387 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.119641952 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -58 0.644444466 0.143371239 0.5625 0.03908039 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -36 0.4 0.0205488633 0.625 0 0 0.454545468 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -21 0.233333334 0.07995663 0.5625 0 0 0.353535354 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -41 0.455555558 0.134045482 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.102241859 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 -29 0.322222233 0.122098334 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -52 0.5777778 0.156276166 0.625 0 0 0.6060606 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -33 0.366666675 0.152398631 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband White Male Mexico 0 -38 0.422222227 0.161962822 0.875 0 0 0.353535354 Private Masters Never-married Exec-managerial Unmarried Black Female United-States 0 -42 0.466666669 0.103976212 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.155905053 0.75 0 0 0.3030303 State-gov Assoc-acdm Married-civ-spouse Adm-clerical Husband White Male United-States 0 -59 0.655555546 0.106966034 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.23336488 0.8125 0 0.5544077 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -54 0.6 0.145476714 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -39 0.433333337 0.119319327 0.8125 0.1502415 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.160427839 0.5625 0 0 0.969697 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -54 0.6 0.105610207 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.0879770741 0.75 0 0 0.4040404 Private Assoc-acdm Married-spouse-absent Craft-repair Other-relative Asian-Pac-Islander Female ? 0 -50 0.5555556 0.118096866 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -42 0.466666669 0.0255518779 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -48 0.533333361 0.112233743 0.8125 0.07688077 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -31 0.344444454 0.1489636 0.8125 0 0 0.3030303 Private Bachelors Widowed Other-service Not-in-family White Female United-States 0 -56 0.622222245 0.120994411 0.5625 0 0 0.454545468 Private HS-grad Never-married Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.14359419 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 -34 0.377777785 0.106248043 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -28 0.311111122 0.1534581 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Female United-States 0 -41 0.455555558 0.113897376 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male ? 1 -44 0.4888889 0.125894368 0.625 0 0.4331956 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -34 0.377777785 0.02535588 0.75 0 0 0.656565666 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.105763771 0.875 0 0 0.5555556 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -37 0.411111116 0.1271458 0.8125 0 0.6483012 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -64 0.7111111 0.0985192358 0.625 0.03411034 0 0.151515156 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -25 0.2777778 0.123025112 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -48 0.533333361 0.13502413 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.241438538 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -17 0.188888893 0.05294116 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Other-relative White Female United-States 0 -44 0.4888889 0.143743038 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -46 0.51111114 0.232983 0.625 0 0 0.4040404 Local-gov Some-college Divorced Transport-moving Not-in-family White Female United-States 0 -32 0.355555564 0.08050219 0.8125 0 0 0.5050505 ? Bachelors Divorced ? Not-in-family White Male United-States 0 -42 0.466666669 0.08508088 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 0 -33 0.366666675 0.158463135 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Divorced Sales Not-in-family White Male United-States 1 -61 0.677777767 0.0954701453 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family Black Female United-States 0 -47 0.5222222 0.242109373 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.07365167 0.8125 0.0861408561 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Female United-States 1 -62 0.6888889 0.09975921 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband Black Male United-States 0 -62 0.6888889 0.0508370362 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.0676060244 0.9375 1 0 0.6060606 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.0191654246 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -33 0.366666675 0.155864641 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -39 0.433333337 0.08043416 0.8125 0 0 0.424242437 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -17 0.188888893 0.139420286 0.4375 0 0 0.1010101 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -58 0.644444466 0.123802371 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.125986651 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Separated Prof-specialty Not-in-family White Female United-States 0 -34 0.377777785 0.104923874 0.5625 0.0406404063 0 0.5050505 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -55 0.6111111 0.130594969 0.25 0 0 0.4040404 ? 7th-8th Divorced ? Unmarried White Female United-States 0 -32 0.355555564 0.0326798931 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.114585057 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Never-married Sales Own-child White Male United-States 0 -41 0.455555558 0.07246153 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -24 0.266666681 0.132512525 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -52 0.5777778 0.164486557 0.5625 0 0 0.353535354 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -48 0.533333361 0.08615921 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -32 0.355555564 0.02870402 0.625 0 0 0.3030303 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -47 0.5222222 0.128907084 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -38 0.422222227 0.126613036 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Sales Wife White Female United-States 0 -18 0.2 0.144884 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -25 0.2777778 0.1551096 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.0607251972 0.8125 0 0 0.323232323 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -40 0.444444448 0.1181366 0.6875 0 0 0.2020202 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 -56 0.622222245 0.03594384 0.4375 0 0 0.2020202 Self-emp-not-inc 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.031086985 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 1 -55 0.6111111 0.0415624678 0.5625 0.06418064 0 0.5050505 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -32 0.355555564 0.07587366 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -41 0.455555558 0.116980813 0.6875 0 0 0.434343427 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -28 0.311111122 0.108426258 0.625 0 0 0.5252525 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -53 0.5888889 0.04866758 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.122806892 0.6875 0 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Wife White Female United-States 0 -60 0.6666667 0.032860402 0.8125 0.0545505434 0 0.5555556 Local-gov Bachelors Separated Prof-specialty Unmarried White Female United-States 0 -21 0.233333334 0.2813138 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Male United-States 0 -29 0.322222233 0.07237667 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -73 0.811111152 0.09938069 0.625 0 0.499081731 0.5050505 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.0227176454 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.068685025 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.252384156 0.3125 0 0 0.353535354 ? 9th Married-civ-spouse ? Wife White Female United-States 0 -36 0.4 0.14439097 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Own-child White Female United-States 1 -25 0.2777778 0.074926 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Other-relative White Female United-States 0 -38 0.422222227 0.170368522 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -30 0.333333343 0.07981384 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -49 0.544444442 0.131751433 0.625 0.07298073 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.117582284 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.128234908 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -64 0.7111111 0.1122883 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.09613021 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.04948525 0.8125 0 0.4331956 0.474747479 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.162823588 0.1875 0 0 0.4040404 Private 5th-6th Separated Machine-op-inspct Unmarried White Female Mexico 0 -35 0.3888889 0.212931871 0.625 0.07443074 0 0.4040404 Private Some-college Divorced Prof-specialty Unmarried White Female United-States 0 -61 0.677777767 0.1674373 0.125 0 0 0.4040404 Local-gov 1st-4th Married-civ-spouse Other-service Husband White Male Mexico 0 -52 0.5777778 0.0607454032 0.25 0 0 0.161616161 Private 7th-8th Divorced Priv-house-serv Own-child Black Female United-States 0 -40 0.444444448 0.138205916 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -20 0.222222224 0.100316226 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -52 0.5777778 0.200736851 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -50 0.5555556 0.104214646 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -49 0.544444442 0.112351611 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Unmarried White Female United-States 1 -36 0.4 0.06542444 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Unmarried Black Female United-States 0 -33 0.366666675 0.234136075 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Unmarried White Male United-States 0 -40 0.444444448 0.07942116 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 0 -45 0.5 0.179739416 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.0484028831 0.625 0 0 0.353535354 Private Some-college Never-married Craft-repair Own-child White Female United-States 0 -47 0.5222222 0.106722213 0.875 0 0 0.02020202 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -24 0.266666681 0.154795736 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Not-in-family White Male United-States 0 -19 0.211111113 0.08202842 0.625 0 0 0.3030303 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -40 0.444444448 0.10194955 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 -40 0.444444448 0.243067816 0.625 0 0 0.5050505 Private Some-college Never-married Tech-support Not-in-family White Female United-States 1 -54 0.6 0.0245705377 0.5625 0.1502415 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.07857858 0.9375 0 0 0.353535354 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband Other Male United-States 1 -63 0.7 0.14423269 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Transport-moving Husband White Male Cuba 0 -18 0.2 0.0305218883 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 -19 0.211111113 0.210125253 0.125 0 0 0.4040404 Private 1st-4th Never-married Machine-op-inspct Other-relative White Male Mexico 0 -49 0.544444442 0.0326630548 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -27 0.3 0.0780929551 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.115070671 0.875 0 0 0.4040404 Local-gov Masters Divorced Exec-managerial Not-in-family White Female United-States 0 -60 0.6666667 0.0962628946 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -71 0.788888931 0.122112475 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -34 0.377777785 0.193085492 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.157046691 0.8125 0 0 0.464646459 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -30 0.333333343 0.119420357 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.226970345 0.5625 0 0 0.171717167 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -32 0.355555564 0.255547076 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.121760219 0.5625 0 0 0.75757575 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -25 0.2777778 0.09555838 0.875 0 0 0.454545468 Private Masters Never-married Prof-specialty Unmarried White Male ? 0 -22 0.244444445 0.153771967 0.625 0 0 0.4040404 Private Some-college Married-AF-spouse Other-service Wife White Female United-States 1 -32 0.355555564 0.222261667 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -40 0.444444448 0.1666789 1 0 0 0.3030303 Private Doctorate Married-civ-spouse Prof-specialty Wife White Female United-States 1 -51 0.566666663 0.4538033 0.875 0.2782828 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -20 0.222222224 0.104919836 0.5625 0 0 0.3030303 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -34 0.377777785 0.05470649 0.5625 0 0 0.4848485 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -40 0.444444448 0.158968285 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -34 0.377777785 0.06962393 0.6875 0 0 0.4040404 State-gov Assoc-voc Never-married Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.134356663 0.375 0 0 0.25252524 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 -53 0.5888889 0.102819756 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband Black Male United-States 0 -42 0.466666669 0.30997 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -38 0.422222227 0.0613179058 0.875 0 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.13293685 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -64 0.7111111 0.179967061 0.9375 0 0 0.161616161 ? Prof-school Married-civ-spouse ? Husband White Male United-States 0 -30 0.333333343 0.07535706 0.625 0 0 0.4040404 State-gov Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -20 0.222222224 0.04507091 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Farming-fishing Own-child White Male Mexico 0 -19 0.211111113 0.197064742 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -20 0.222222224 0.263809323 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Other-relative White Male United-States 0 -35 0.3888889 0.3201471 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -33 0.366666675 0.146940976 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.06838665 0.625 0 0.43663913 0.151515156 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.0442552567 0.625 0 0 0.3838384 Federal-gov Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -50 0.5555556 0.105479538 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 0 -23 0.25555557 0.1353582 0.5625 0 0 0.1010101 Private HS-grad Divorced Other-service Own-child White Female United-States 0 -30 0.333333343 0.110791706 0.625 0 0 0.1010101 Local-gov Some-college Never-married Adm-clerical Own-child White Female United-States 0 -33 0.366666675 0.3690201 0.8125 0 0 0.4040404 Private Bachelors Separated Exec-managerial Unmarried Black Female United-States 0 -48 0.533333361 0.156357661 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -43 0.477777779 0.06494287 0.8125 0 0 0.24242425 Private Bachelors Divorced Prof-specialty Unmarried White Female Outlying-US(Guam-USVI-etc) 0 -33 0.366666675 0.37327686 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family Black Male Philippines 0 -50 0.5555556 0.157703385 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -23 0.25555557 0.2563095 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -36 0.4 0.0699708 0.625 0 0 0.5050505 Local-gov Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 -50 0.5555556 0.0368484 0.5625 0 0 0.464646459 State-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -26 0.2888889 0.186264619 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -55 0.6111111 0.118573055 0.875 0 0.5204316 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 0 -37 0.411111116 0.07719042 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -43 0.477777779 0.218031868 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -38 0.422222227 0.176049784 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.1505673 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Handlers-cleaners Husband White Male Mexico 0 -47 0.5222222 0.239763454 1 0 0.459595948 0.454545468 Self-emp-not-inc Doctorate Married-civ-spouse Transport-moving Husband White Male United-States 0 -44 0.4888889 0.07221502 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male United-States 0 -28 0.311111122 0.0213624928 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.221557155 0.625 0 0 0.4040404 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -51 0.566666663 0.0999733955 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.08190314 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -62 0.6888889 0.16440101 1 0.1502415 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.0561896153 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Female United-States 0 -29 0.322222233 0.10595236 0.4375 0.0282902829 0 0.141414136 Private 11th Married-civ-spouse Handlers-cleaners Wife Asian-Pac-Islander Female Philippines 0 -23 0.25555557 0.0389962979 0.625 0 0 0.3030303 Private Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 -40 0.444444448 0.118073292 0.625 0 0 0.4040404 State-gov Some-college Divorced Sales Not-in-family White Female United-States 0 -66 0.733333349 0.06914707 0.25 0 0 0.5050505 Self-emp-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -17 0.188888893 0.0667977855 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Not-in-family White Female United-States 0 -37 0.411111116 0.1403363 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -69 0.7666667 0.2435238 0.9375 0 0 0.0303030312 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 0 -23 0.25555557 0.144887373 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.139466092 0.5625 0 0 0.424242437 Federal-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.108378433 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.0436982438 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -38 0.422222227 0.2896434 0.3125 0 0 0.545454562 Private 9th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -37 0.411111116 0.0499513373 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.0662683845 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.2599971 0.3125 0 0 0.7070707 Private 9th Never-married Farming-fishing Unmarried White Male United-States 0 -17 0.188888893 0.07597132 0.375 0 0 0.151515156 Private 10th Never-married Other-service Own-child White Female United-States 0 -48 0.533333361 0.223926648 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -17 0.188888893 0.02600584 0.4375 0 0 0.232323229 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 -55 0.6111111 0.2483975 0.875 0 0.453856736 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.0162362214 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -68 0.75555557 0.0732017457 0.625 0 0 0.121212125 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 -35 0.3888889 0.162994 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -53 0.5888889 0.210443154 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.0466981679 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -36 0.4 0.1162103 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Own-child White Male United-States 0 -24 0.266666681 0.185817391 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried Black Female United-States 0 -45 0.5 0.0292846058 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -34 0.377777785 0.1346153 0.625 0 0.4722222 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -56 0.622222245 0.158413291 0.5625 0 0 0.3838384 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.114754111 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.219019264 0.625 0 0 0.5050505 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -19 0.211111113 0.236541942 0.3125 0 0.3946281 0.353535354 ? 9th Never-married ? Other-relative White Male El-Salvador 0 -33 0.366666675 0.0955348 0.5625 0 0 0.363636374 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -48 0.533333361 0.139971912 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Not-in-family White Female Columbia 0 -20 0.222222224 0.09293025 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 -64 0.7111111 0.108657949 0.75 0 0.4331956 0.5050505 Self-emp-inc Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.197765216 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male Dominican-Republic 0 -20 0.222222224 0.0254481528 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -44 0.4888889 0.207466811 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Exec-managerial Not-in-family Black Female United-States 0 -45 0.5 0.100503467 0.8125 0 0 0.7777778 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -45 0.5 0.252204984 0.5625 0.05178052 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Wife White Female United-States 1 -45 0.5 0.04168168 0.875 0 0 0.373737365 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.196130544 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 -41 0.455555558 0.0305555649 0.5625 0 0 0.727272749 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.136745691 0.5625 0 0 0.5555556 Private HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -54 0.6 0.150704682 0.8125 0.07688077 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 -17 0.188888893 0.08936456 0.375 0 0.3677686 0.1010101 Private 10th Never-married Other-service Own-child White Female United-States 0 -50 0.5555556 0.104784451 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.1303727 0.875 0 0 0.4040404 State-gov Masters Never-married Tech-support Not-in-family White Male United-States 0 -49 0.544444442 0.08324751 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.307290673 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Adm-clerical Husband White Male United-States 0 -49 0.544444442 0.109940358 0.5625 0 0 0.5050505 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.28270936 0.8125 0 0 0.5252525 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -43 0.477777779 0.08005159 0.625 0.04386044 0 1 Local-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -33 0.366666675 0.0211819857 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Machine-op-inspct Unmarried Amer-Indian-Eskimo Female United-States 0 -35 0.3888889 0.137510821 0.625 0 0 0.5555556 Private Some-college Divorced Machine-op-inspct Unmarried Black Female United-States 0 -17 0.188888893 0.119639255 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 -25 0.2777778 0.125526622 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -41 0.455555558 0.126831263 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Female United-States 0 -30 0.333333343 0.03736837 0.875 0 0 0.454545468 Private Masters Never-married Tech-support Unmarried White Male Nicaragua 0 -48 0.533333361 0.0804678351 0.6875 0 0 0.565656543 Private Assoc-voc Married-civ-spouse Other-service Husband Asian-Pac-Islander Male Philippines 1 -61 0.677777767 0.112713978 0.625 0 0 0.353535354 Local-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -41 0.455555558 0.124184944 0.5625 0 0 0.4040404 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.2350366 0.5625 0 0 0.5050505 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 -24 0.266666681 0.04690494 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Not-in-family White Male United-States 0 -27 0.3 0.200347543 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child Black Male United-States 0 -18 0.2 0.188315526 0.4375 0 0 0.02020202 Private 11th Never-married Prof-specialty Own-child White Female United-States 0 -20 0.222222224 0.142767757 0.625 0 0 0.151515156 Private Some-college Never-married Prof-specialty Own-child White Female United-States 0 -18 0.2 0.131043538 0.625 0 0 0.121212125 Private Some-college Never-married Other-service Own-child White Male United-States 0 -23 0.25555557 0.09457367 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.0166787338 0.875 0 0.4331956 0.454545468 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -38 0.422222227 0.3117333 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Wife Black Female Trinadad&Tobago 0 -36 0.4 0.03298433 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.02359526 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -47 0.5222222 0.153958529 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male ? 0 -51 0.566666663 0.264475435 1 0.1502415 0 0.8484849 Private Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.07283602 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.07577061 0.8125 0 0 0.6060606 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 -47 0.5222222 0.09603322 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -26 0.2888889 0.0996709839 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Not-in-family White Female United-States 0 -31 0.344444454 0.296442062 0.625 0 0 0.4040404 State-gov Some-college Divorced Protective-serv Not-in-family White Male United-States 1 -46 0.51111114 0.135201275 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Unmarried Black Female Trinadad&Tobago 0 -49 0.544444442 0.02142311 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Unmarried White Female United-States 0 -19 0.211111113 0.111909777 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 -45 0.5 0.143431857 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -46 0.51111114 0.0352197923 0.8125 0.07688077 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -70 0.7777778 0.204476982 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -19 0.211111113 0.06477785 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -46 0.51111114 0.124356017 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.09269047 0.625 0 0 0.353535354 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -17 0.188888893 0.107785054 0.4375 0 0 0.222222224 Private 11th Never-married Other-service Other-relative White Female United-States 0 -43 0.477777779 0.120414495 0.625 0 0 0.4949495 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.0267770365 0.625 0 0 0.151515156 Private Some-college Never-married Other-service Own-child White Female United-States 0 -37 0.411111116 0.0237818286 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.07897394 0.5625 0 0 0.4040404 Private HS-grad Widowed Prof-specialty Unmarried White Female United-States 0 -40 0.444444448 0.204223737 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.144501433 0.625 0 0 0.6060606 Private Some-college Never-married Craft-repair Own-child White Male Canada 0 -31 0.344444454 0.2303616 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -59 0.655555546 0.0853152648 0.6875 0.05178052 0 0.5050505 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.2704295 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -40 0.444444448 0.01684173 0.8125 0.1502415 0 1 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -30 0.333333343 0.0577272922 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.07791245 0.75 0 0 0.323232323 Private Assoc-acdm Never-married Adm-clerical Own-child White Male United-States 0 -25 0.2777778 0.09716341 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -22 0.244444445 0.133078963 0.8125 0 0 0.2020202 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -21 0.233333334 0.09615783 0.625 0 0 0.4040404 State-gov Some-college Never-married Exec-managerial Own-child White Male United-States 0 -67 0.7444445 0.0893281847 0.625 0 0 0.0606060624 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -35 0.3888889 0.125022143 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 -54 0.6 0.0201299246 0.5625 0 0 0.565656543 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.07906015 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -29 0.322222233 0.142440423 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.06105792 0.5625 0 0.3168044 0.4040404 Federal-gov HS-grad Never-married Exec-managerial Unmarried White Female United-States 0 -55 0.6111111 0.141129047 0.5625 0 0 0.4040404 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -56 0.622222245 0.126538947 0.875 0 0 0.4040404 Federal-gov Masters Divorced Adm-clerical Unmarried White Female United-States 0 -19 0.211111113 0.11768803 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child Black Male United-States 0 -36 0.4 0.20061022 0.5625 0 0.459366381 0.4040404 Private HS-grad Never-married Other-service Not-in-family Black Female United-States 0 -58 0.644444466 0.07423226 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 1 -35 0.3888889 0.109517381 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -44 0.4888889 0.07303673 0.375 0 0 0.4040404 Private 10th Separated Machine-op-inspct Unmarried Black Female United-States 0 -40 0.444444448 0.0890560746 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -18 0.2 0.11746037 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -71 0.788888931 0.217409521 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband Amer-Indian-Eskimo Male United-States 0 -51 0.566666663 0.0487881452 0.5625 0 0 0.575757563 Federal-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.0409010537 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child Black Male United-States 0 -20 0.222222224 0.128155425 0.5 0 0 0.353535354 Private 12th Never-married Other-service Own-child White Male United-States 0 -33 0.366666675 0.2649523 0.4375 0 0 0.4040404 ? 11th Never-married ? Not-in-family White Female United-States 0 -34 0.377777785 0.0946794152 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Tech-support Unmarried Black Female United-States 0 -28 0.311111122 0.393876225 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 1 -23 0.25555557 0.133134872 0.625 0 0 0.24242425 Private Some-college Never-married Adm-clerical Not-in-family White Female Greece 0 -36 0.4 0.165076569 0.625 0.031370312 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male El-Salvador 0 -42 0.466666669 0.129701868 0.9375 0 0 0.3939394 Private Prof-school Divorced Prof-specialty Not-in-family White Female United-States 1 -31 0.344444454 0.106614448 0.8125 0.0861408561 0 0.4040404 Local-gov Bachelors Never-married Craft-repair Not-in-family White Male United-States 1 -19 0.211111113 0.0767256841 0.5625 0 0 0.1010101 ? HS-grad Never-married ? Own-child Black Male United-States 0 -38 0.422222227 0.19374758 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family Black Male Jamaica 0 -22 0.244444445 0.129625082 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.21353738 0.6875 0 0 0.545454562 Private Assoc-voc Divorced Adm-clerical Unmarried Black Female United-States 0 -36 0.4 0.147294581 0.875 0 0.453856736 0.5050505 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -17 0.188888893 0.0785516351 0.4375 0 0.3946281 0.181818187 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -30 0.333333343 0.0326381326 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -35 0.3888889 0.1626377 0.3125 0.0263502635 0 0.3030303 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.113147058 0.875 0.14084141 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 -42 0.466666669 0.176418215 0.8125 0.07688077 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.286793679 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 1 -36 0.4 0.02249201 0.8125 0 0.4331956 0.353535354 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -58 0.644444466 0.0490413941 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Male United-States 0 -39 0.433333337 0.05997151 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 0 -62 0.6888889 0.110808544 0.5625 0 0 0.3838384 Local-gov HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -51 0.566666663 0.123081692 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Unmarried White Male United-States 0 -52 0.5777778 0.2437353 0.625 0 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -25 0.2777778 0.132773846 0.5625 0 0 0.3030303 Private HS-grad Never-married Sales Own-child White Female United-States 0 -26 0.2888889 0.229227364 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.198008358 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Own-child Black Male United-States 0 -59 0.655555546 0.176185846 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Exec-managerial Not-in-family Black Female Outlying-US(Guam-USVI-etc) 0 -21 0.233333334 0.114704274 0.5625 0 0 0.5050505 Private HS-grad Never-married Farming-fishing Other-relative White Male United-States 0 -45 0.5 0.32463488 0.875 0 0 0.181818187 Private Masters Married-civ-spouse Tech-support Husband White Male United-States 1 -26 0.2888889 0.0595734529 0.5625 0 0 0.363636374 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -68 0.75555557 0.176396668 0.375 0 0 0.2020202 Self-emp-not-inc 10th Widowed Farming-fishing Unmarried White Male United-States 0 -60 0.6666667 0.168755412 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -65 0.722222269 0.05961656 0.5625 0 0 0.181818187 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -41 0.455555558 0.113351136 0.875 0 0 0.454545468 Private Masters Divorced Exec-managerial Unmarried White Female United-States 0 -34 0.377777785 0.19123058 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -28 0.311111122 0.2741575 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -40 0.444444448 0.042934455 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Adm-clerical Not-in-family White Female United-States 0 -57 0.6333333 0.0336046554 0.875 0 0 0.6060606 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -37 0.411111116 0.162969753 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.227934852 0.375 0 0 0.6060606 Private 10th Divorced Machine-op-inspct Not-in-family Black Male United-States 0 -21 0.233333334 0.1433874 0.4375 0 0 0.565656543 ? 11th Married-civ-spouse ? Wife White Female United-States 0 -57 0.6333333 0.209011227 0.8125 0 0 0.4848485 Federal-gov Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -55 0.6111111 0.24245356 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.04353929 0.5625 0 0 0.6060606 Private HS-grad Never-married Farming-fishing Not-in-family White Male ? 0 -56 0.622222245 0.0841918141 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -32 0.355555564 0.193085492 0.625 0 0 0.6060606 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -18 0.2 0.111491509 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Male United-States 0 -48 0.533333361 0.235727638 0.6875 0 0 0.4040404 Private Assoc-voc Married-spouse-absent Prof-specialty Not-in-family White Male United-States 0 -46 0.51111114 0.143557146 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 1 -41 0.455555558 0.147608444 0.9375 0 0 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male India 1 -33 0.366666675 0.123669013 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -33 0.366666675 0.263428777 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -47 0.5222222 0.147929728 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Machine-op-inspct Other-relative White Male Mexico 0 -46 0.51111114 0.215614557 0.5625 0.1502415 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Wife Amer-Indian-Eskimo Female United-States 1 -40 0.444444448 0.5383433 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -42 0.466666669 0.442779541 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -31 0.344444454 0.251519322 0.8125 0.07298073 0 0.5555556 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -51 0.566666663 0.113598324 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -44 0.4888889 0.128745437 0.625 0 0 0.575757563 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -37 0.411111116 0.240333274 0.5625 0 0 0.4040404 Private HS-grad Separated Tech-support Unmarried White Female United-States 0 -25 0.2777778 0.129171789 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Own-child Black Female United-States 0 -63 0.7 0.0201110654 0.25 0.07688077 0 0.6060606 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 1 -52 0.5777778 0.13755326 0.5625 0 0 0.454545468 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -42 0.466666669 0.166270077 0.625 0.0332503319 0 0.4040404 Local-gov Some-college Divorced Tech-support Not-in-family White Female United-States 0 -28 0.311111122 0.3344274 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.287215978 0.875 0.105201051 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 1 -34 0.377777785 0.05668062 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -37 0.411111116 0.0309401546 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 -31 0.344444454 0.0875736251 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.04244682 0.625 0 0 0.353535354 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -25 0.2777778 0.247393265 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -38 0.422222227 0.0442000255 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -43 0.477777779 0.0976140052 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Never-married Farming-fishing Not-in-family White Male United-States 0 -22 0.244444445 0.07930666 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Other-relative Asian-Pac-Islander Female Vietnam 0 -18 0.2 0.17961885 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Male United-States 0 -26 0.2888889 0.102400817 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.127987042 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -43 0.477777779 0.15702109 0.5625 0 0 0.2020202 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -21 0.233333334 0.10078568 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -62 0.6888889 0.1510583 0.625 0 0 0.4040404 Federal-gov Some-college Widowed Protective-serv Not-in-family White Female United-States 0 -26 0.2888889 0.08187418 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.15555346 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.23256135 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 -65 0.722222269 0.0191061534 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -41 0.455555558 0.216032147 0.5625 0.0332503319 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -31 0.344444454 0.164189517 0.3125 0 0 0.2020202 Private 9th Never-married Other-service Unmarried White Female United-States 0 -56 0.622222245 0.102022961 0.3125 0 0 0.4040404 Private 9th Divorced Sales Unmarried White Female United-States 0 -50 0.5555556 0.09124035 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.14196828 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -36 0.4 0.241799548 0.625 0 0 0.4848485 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -48 0.533333361 0.0804678351 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -30 0.333333343 0.15248552 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -35 0.3888889 0.190692425 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Tech-support Husband White Male United-States 0 -37 0.411111116 0.219841659 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.113952607 0.5625 0 0 0.05050505 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -56 0.622222245 0.106924944 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Wife White Female United-States 0 -29 0.322222233 0.140368626 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Not-in-family White Male United-States 0 -41 0.455555558 0.0651584 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Sales Unmarried White Male United-States 0 -38 0.422222227 0.171879932 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Other-service Not-in-family White Male United-States 0 -34 0.377777785 0.119709305 0.3125 0 0 0.353535354 Private 9th Separated Machine-op-inspct Unmarried White Female Dominican-Republic 0 -54 0.6 0.0928231552 0.5 0.04101041 0 0.4040404 State-gov 12th Never-married Other-service Own-child White Male United-States 0 -36 0.4 0.12608768 0.6875 0 0 0.5050505 ? Assoc-voc Divorced ? Own-child White Male United-States 0 -42 0.466666669 0.113500662 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 -33 0.366666675 0.0826238245 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -21 0.233333334 0.131473258 0.5625 0 0 0.3030303 Private HS-grad Never-married Prof-specialty Own-child White Female United-States 0 -69 0.7666667 0.121110253 0.375 0 0 0.1010101 Local-gov 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -32 0.355555564 0.120308749 0.75 0 0 0.464646459 Private Assoc-acdm Never-married Sales Not-in-family Black Female Trinadad&Tobago 0 -50 0.5555556 0.02821436 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.251262039 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Other-service Husband White Male ? 0 -45 0.5 0.054172378 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -31 0.344444454 0.1337727 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -24 0.266666681 0.222650975 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -28 0.311111122 0.140906781 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 1 -21 0.233333334 0.08907022 0.75 0 0 0.05050505 Private Assoc-acdm Never-married Other-service Own-child White Female United-States 0 -43 0.477777779 0.160078943 0.6875 0 0 0.25252524 Self-emp-not-inc Assoc-voc Divorced Exec-managerial Not-in-family White Male United-States 0 -22 0.244444445 0.130386844 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -62 0.6888889 0.13292405 0.5625 0 0.399449021 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.050203912 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Never-married Tech-support Not-in-family White Male United-States 0 -37 0.411111116 0.06042817 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -34 0.377777785 0.06275254 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Unmarried Black Female United-States 0 -74 0.822222233 0.197288349 0.8125 0 0.418962359 0.121212125 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.221303225 0.625 0 0 0.3838384 Private Some-college Divorced Machine-op-inspct Unmarried Black Female United-States 0 -25 0.2777778 0.2102485 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Not-in-family White Female United-States 0 -43 0.477777779 0.130301312 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -23 0.25555557 0.159495667 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 -33 0.366666675 0.08501554 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried Black Female United-States 0 -51 0.566666663 0.1160372 0.8125 0 0 0.353535354 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -64 0.7111111 0.103652917 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Unmarried White Female Peru 0 -35 0.3888889 0.223205954 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -69 0.7666667 0.06228308 0.375 0.0327303261 0 0.454545468 Self-emp-not-inc 10th Married-spouse-absent Farming-fishing Not-in-family White Male United-States 0 -32 0.355555564 0.214619741 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.224240512 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female United-States 0 -66 0.733333349 0.051331412 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -31 0.344444454 0.202847034 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male Italy 0 -22 0.244444445 0.297007829 0.625 0 0 0.24242425 Private Some-college Never-married Other-service Own-child White Female United-States 0 -32 0.355555564 0.104364172 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 -23 0.25555557 0.147061542 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Own-child White Female United-States 0 -21 0.233333334 0.161363378 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -36 0.4 0.166993439 0.5625 0 0 0.02020202 Private HS-grad Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Taiwan 0 -62 0.6888889 0.1370811 0.25 0.0282902829 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.122813627 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -45 0.5 0.0172754861 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -27 0.3 0.164052129 0.4375 0.0394203924 0 0.4040404 Private 11th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -38 0.422222227 0.126536921 0.9375 0 0.5544077 0.909090936 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.1947296 0.625 0 0 0.05050505 ? Some-college Never-married ? Own-child White Female United-States 0 -30 0.333333343 0.32823357 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -17 0.188888893 0.02291297 0.375 0 0 0.2020202 ? 10th Never-married ? Own-child White Male United-States 0 -17 0.188888893 0.168748 0.4375 0 0 0.08080808 ? 11th Never-married ? Own-child Black Male United-States 0 -21 0.233333334 0.214848742 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -56 0.622222245 0.09467066 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -59 0.655555546 0.204387411 0.875 0.04787048 0 0.6060606 Local-gov Masters Widowed Prof-specialty Unmarried White Female United-States 1 -37 0.411111116 0.0517644919 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -52 0.5777778 0.2079632 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -50 0.5555556 0.228937745 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.153468877 0.8125 0.07298073 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -55 0.6111111 0.105361 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.06618486 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Female United-States 0 -72 0.8 0.07856106 0.625 0.0347103477 0 0.2020202 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -39 0.433333337 0.126063436 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -28 0.311111122 0.123982884 0.5 0 0 0.4040404 Private 12th Divorced Machine-op-inspct Not-in-family White Female United-States 0 -38 0.422222227 0.07283602 0.8125 0 0 0.4040404 Private Bachelors Divorced Tech-support Other-relative White Male United-States 0 -44 0.4888889 0.10138917 0.625 0 0.430670351 0.5555556 Private Some-college Separated Craft-repair Not-in-family White Male United-States 0 -51 0.566666663 0.211289123 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Sales Not-in-family White Male United-States 0 -20 0.222222224 0.026808694 0.625 0 0.3946281 0.363636374 Private Some-college Never-married Other-service Own-child White Male United-States 0 -25 0.2777778 0.170237184 0.625 0 0 0.454545468 Private Some-college Never-married Transport-moving Not-in-family White Female United-States 0 -52 0.5777778 0.0752338 0.625 0 0 0.2020202 Private Some-college Divorced Sales Other-relative White Female United-States 1 -45 0.5 0.243713066 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Not-in-family White Female United-States 0 -17 0.188888893 0.155881479 0.4375 0 0 0.121212125 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 -20 0.222222224 0.12020503 0.5625 0 0 0.151515156 Private HS-grad Never-married Other-service Own-child Asian-Pac-Islander Female ? 0 -64 0.7111111 0.07854759 0.875 0 0 0.25252524 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -34 0.377777785 0.07557865 0.5625 0 0.3409091 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -74 0.822222233 0.07348329 0.625 0 0 0.04040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -58 0.644444466 0.0491666719 0.4375 0.14084141 0 0.4040404 Federal-gov 11th Divorced Craft-repair Not-in-family Black Female United-States 1 -44 0.4888889 0.09918806 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -23 0.25555557 0.211924255 0.75 0 0 0.25252524 State-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -23 0.25555557 0.299422443 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -27 0.3 0.0873096 0.6875 0 0 0.363636374 Private Assoc-voc Never-married Tech-support Other-relative White Female United-States 0 -34 0.377777785 0.0719072148 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.127920359 0.5625 0 0 0.24242425 Private HS-grad Never-married Sales Own-child White Female United-States 0 -33 0.366666675 0.2095999 0.4375 0 0 0.171717167 Private 11th Never-married Sales Unmarried Black Female United-States 0 -50 0.5555556 0.060440965 0.625 0 0 0.4848485 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.0332039036 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -50 0.5555556 0.128195837 0.9375 1 0 0.5555556 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.169678822 0.4375 0 0 0.151515156 Private 11th Never-married Sales Own-child White Female United-States 0 -49 0.544444442 0.201013 0.9375 0 0.453856736 0.6060606 Local-gov Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 -34 0.377777785 0.121427491 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -51 0.566666663 0.103954658 0.875 0.07688077 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -56 0.622222245 0.04624353 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -64 0.7111111 0.137254879 0.5625 0 0 0.08080808 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.168408543 0.625 0 0 0.5050505 Private Some-college Never-married Farming-fishing Not-in-family White Female United-States 0 -33 0.366666675 0.106881842 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -43 0.477777779 0.14466241 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -60 0.6666667 0.272123426 0.5625 0.105201051 0 0.4040404 Federal-gov HS-grad Divorced Exec-managerial Not-in-family White Male United-States 1 -57 0.6333333 0.07342536 0.5 0 0 0.4040404 State-gov 12th Divorced Other-service Unmarried White Female United-States 0 -22 0.244444445 0.131090015 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -23 0.25555557 0.161227316 0.8125 0 0 0.4040404 Private Bachelors Never-married Machine-op-inspct Own-child White Male United-States 0 -54 0.6 0.0239616632 0.625 0 0.5544077 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.244917348 0.5625 0.07688077 0 0.5252525 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband Black Male United-States 1 -32 0.355555564 0.123206973 0.875 0 0 0.4040404 Self-emp-not-inc Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -20 0.222222224 0.07895306 0.625 0 0 0.151515156 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -30 0.333333343 0.07452188 0.625 0 0 0.5252525 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -56 0.622222245 0.114647023 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -34 0.377777785 0.130184114 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -32 0.355555564 0.108489566 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -59 0.655555546 0.217343524 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.154529691 0.625 0 0 0.111111112 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -60 0.6666667 0.07158459 0.3125 0 0 0.4040404 ? 9th Widowed ? Not-in-family White Female United-States 0 -29 0.322222233 0.0711885542 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -24 0.266666681 0.134628087 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.0678922758 0.875 0 0 0.353535354 State-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -23 0.25555557 0.172612071 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Handlers-cleaners Other-relative Other Female El-Salvador 0 -32 0.355555564 0.1053839 0.5625 0 0.43663913 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -51 0.566666663 0.087239556 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Never-married Sales Other-relative White Male ? 0 -18 0.2 0.191966087 0.5625 0 0 0.1010101 Private HS-grad Never-married Sales Own-child White Male United-States 0 -28 0.311111122 0.167650148 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Female ? 0 -33 0.366666675 0.248794213 0.625 0.05178052 0 0.4040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 -38 0.422222227 0.148111582 0.5625 0 0 0.3030303 Private HS-grad Separated Transport-moving Unmarried Black Female United-States 0 -29 0.322222233 0.252900064 0.8125 0 0 0.5050505 Private Bachelors Never-married Prof-specialty Not-in-family White Male England 0 -25 0.2777778 0.113910846 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -31 0.344444454 0.12325681 0.9375 0 0 0.5555556 Private Prof-school Never-married Tech-support Not-in-family White Male United-States 0 -34 0.377777785 0.0188946631 0.8125 0 0 0.25252524 Private Bachelors Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.1636581 0.5625 0 0.4331956 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -66 0.733333349 0.08894359 0.5625 0 0.418962359 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.143391445 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband White Male Guatemala 0 -62 0.6888889 0.150854886 0.25 0 0 0.2020202 Private 7th-8th Married-civ-spouse Prof-specialty Husband White Male United-States 0 -58 0.644444466 0.240982562 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -40 0.444444448 0.274001241 0.5625 0 0 0.4040404 Private HS-grad Separated Exec-managerial Unmarried White Female Canada 0 -24 0.266666681 0.104008541 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child Asian-Pac-Islander Female Philippines 0 -47 0.5222222 0.09472858 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -19 0.211111113 0.239426017 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child Black Male United-States 0 -32 0.355555564 0.10222435 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.23004435 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.345368952 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -60 0.6666667 0.09535901 0.875 0 0 0.4040404 ? Masters Married-civ-spouse ? Husband White Male United-States 0 -22 0.244444445 0.03299511 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -29 0.322222233 0.135395244 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -20 0.222222224 0.055753164 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Own-child White Male United-States 0 -42 0.466666669 0.102832548 0.25 0 0 0.4040404 Private 7th-8th Divorced Craft-repair Unmarried White Male Puerto-Rico 0 -18 0.2 0.0780053958 0.5625 0 0 0.2020202 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -23 0.25555557 0.113159858 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Own-child Asian-Pac-Islander Female Vietnam 0 -28 0.311111122 0.143565223 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male ? 1 -55 0.6111111 0.0604093075 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 -40 0.444444448 0.08544997 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Black Male United-States 0 -52 0.5777778 0.06407199 0.625 0 0 0.5050505 Private Some-college Divorced Sales Not-in-family White Male United-States 0 -37 0.411111116 0.124985777 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 1 -21 0.233333334 0.203008682 0.625 0 0.3677686 0.222222224 Private Some-college Never-married Sales Own-child White Female United-States 0 -35 0.3888889 0.14565587 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 -45 0.5 0.122947656 0.625 0 0 0.4848485 Private Some-college Divorced Machine-op-inspct Unmarried White Male United-States 0 -39 0.433333337 0.1164238 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -54 0.6 0.0462610424 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.245726928 0.25 0 0 0.4040404 Private 7th-8th Divorced Sales Not-in-family White Female United-States 0 -26 0.2888889 0.178015158 0.625 0 0 0.2020202 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -59 0.655555546 0.235676453 0.75 0 0 0.4040404 Self-emp-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.186042354 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 1 -22 0.244444445 0.16918917 0.625 0 0 0.2020202 Private Some-college Never-married Protective-serv Own-child Black Female United-States 0 -33 0.366666675 0.1326176 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -39 0.433333337 0.0392960235 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -18 0.2 0.06806807 0.4375 0 0 0.7070707 Self-emp-inc 11th Never-married Farming-fishing Own-child White Male United-States 0 -46 0.51111114 0.279551148 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 1 -24 0.266666681 0.117223963 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.08719578 0.6875 0 0 0.3030303 Private Assoc-voc Married-civ-spouse Handlers-cleaners Wife White Female Ecuador 0 -21 0.233333334 0.0747259557 0.5625 0 0 0.434343427 State-gov HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -22 0.244444445 0.2114043 0.4375 0 0 0.3030303 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -61 0.677777767 0.0546452 0.1875 0.07298073 0 0.4040404 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband Asian-Pac-Islander Male Philippines 1 -56 0.622222245 0.172011271 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Laos 0 -21 0.233333334 0.128979832 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -17 0.188888893 0.08662798 0.375 0 0 0.262626261 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 -29 0.322222233 0.24849987 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male ? 1 -28 0.311111122 0.177543685 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -62 0.6888889 0.173284933 0.5625 0 0 0.3838384 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.2286259 0.5625 0.0217602178 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family Black Male United-States 0 -30 0.333333343 0.194949165 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Protective-serv Not-in-family White Male United-States 0 -20 0.222222224 0.109561831 0.4375 0 0 0.4040404 ? 11th Never-married ? Unmarried White Male El-Salvador 0 -18 0.2 0.31408596 0.4375 0 0 0.121212125 Local-gov 11th Never-married Adm-clerical Own-child White Male United-States 0 -54 0.6 0.0957557261 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -49 0.544444442 0.1697839 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -33 0.366666675 0.08057358 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Hong 0 -50 0.5555556 0.118410058 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -57 0.6333333 0.04763236 0.5625 0 0 0.7878788 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -50 0.5555556 0.13572596 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -45 0.5 0.17350854 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.08398436 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Own-child White Male United-States 1 -23 0.25555557 0.180860847 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.168807954 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -47 0.5222222 0.121422775 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female Hungary 0 -39 0.433333337 0.128875434 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male South 0 -29 0.322222233 0.169034928 0.6875 0 0.4331956 0.4848485 Private Assoc-voc Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -46 0.51111114 0.103221856 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -18 0.2 0.24422361 0.1875 0 0 0.4040404 Private 5th-6th Never-married Handlers-cleaners Own-child White Male United-States 0 -68 0.75555557 0.1158028 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.142390579 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 1 -43 0.477777779 0.0324596465 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 -35 0.3888889 0.0151296053 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.297007829 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -21 0.233333334 0.111080654 0.625 0 0 0.4040404 State-gov Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -41 0.455555558 0.0906065553 0.6875 0 0 0.454545468 Local-gov Assoc-voc Divorced Craft-repair Unmarried White Female United-States 0 -61 0.677777767 0.119006135 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.1488464 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.345407337 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Own-child Black Male United-States 0 -36 0.4 0.284416765 0.1875 0 0 0.4040404 State-gov 5th-6th Married-civ-spouse Other-service Husband White Male Mexico 0 -37 0.411111116 0.04397574 0.6875 0 0 0.4040404 Local-gov Assoc-voc Never-married Protective-serv Not-in-family White Female United-States 0 -69 0.7666667 0.13274017 0.5 0.09386094 0 0.6060606 Private 12th Married-civ-spouse Transport-moving Husband White Male United-States 1 -49 0.544444442 0.122352257 0.625 0 0 0.5050505 Federal-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -55 0.6111111 0.128144652 0.5625 0 0 0.535353541 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -21 0.233333334 0.160347015 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -18 0.2 0.2270121 0.375 0 0 0.4040404 Private 10th Never-married Other-service Own-child White Male United-States 0 -26 0.2888889 0.126117989 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Prof-specialty Not-in-family Black Male United-States 0 -20 0.222222224 0.168408543 0.625 0 0 0.181818187 ? Some-college Never-married ? Own-child White Female ? 0 -46 0.51111114 0.192462474 0.5625 0.0406404063 0 0.5555556 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -23 0.25555557 0.175534531 0.375 0 0 0.4040404 Private 10th Never-married Craft-repair Not-in-family White Male United-States 0 -48 0.533333361 0.146156311 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.357683867 0.5625 0 0.43663913 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.08167616 0.875 0 0 0.4040404 State-gov Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -41 0.455555558 0.124244213 0.875 0 0 0.3838384 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -45 0.5 0.200495049 0.75 0 0 0.4040404 Private Assoc-acdm Widowed Sales Unmarried White Female Cuba 0 -52 0.5777778 0.0769365 0.5625 0.0332503319 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -22 0.244444445 0.08159466 0.8125 0 0 0.181818187 Local-gov Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 -20 0.222222224 0.0180790126 0.625 0.0217602178 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family White Female United-States 0 -27 0.3 0.07614577 0.5625 0 0 0.434343427 Private HS-grad Separated Machine-op-inspct Not-in-family White Male United-States 0 -36 0.4 0.1728532 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -34 0.377777785 0.102542929 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Transport-moving Husband Amer-Indian-Eskimo Male United-States 0 -38 0.422222227 0.07283602 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.13696526 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -47 0.5222222 0.139561057 0.5625 0 0 0.454545468 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -21 0.233333334 0.07773935 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.0539218225 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -31 0.344444454 0.0326798931 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Protective-serv Unmarried White Male United-States 0 -61 0.677777767 0.277261823 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -46 0.51111114 0.103997089 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -55 0.6111111 0.07066522 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -19 0.211111113 0.17607674 0.625 0 0 0.4040404 State-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 -39 0.433333337 0.03294594 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -61 0.677777767 0.115872853 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -28 0.311111122 0.09755002 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -28 0.311111122 0.185300112 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -61 0.677777767 0.0490912348 0.5625 0 0 0.3838384 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -61 0.677777767 0.0697613358 0.5625 0 0 0.373737365 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.135234281 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -50 0.5555556 0.102922805 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Machine-op-inspct Husband White Male Germany 0 -37 0.411111116 0.03010295 0.875 0 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -17 0.188888893 0.03280315 0.4375 0 0 0.3030303 ? 11th Never-married ? Own-child White Female United-States 0 -56 0.622222245 0.0619011857 0.5625 0 0 0.04040404 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -31 0.344444454 0.113764018 0.8125 0 0 0.5050505 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 -32 0.355555564 0.09915438 0.8125 0 0 0.5555556 State-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -28 0.311111122 0.103418529 0.4375 0 0 0.4040404 Private 11th Divorced Other-service Unmarried White Female United-States 0 -34 0.377777785 0.02397446 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Tech-support Husband White Male United-States 0 -33 0.366666675 0.151886746 0.375 0 0 0.25252524 Private 10th Never-married Other-service Own-child White Female United-States 0 -42 0.466666669 0.232708856 0.6875 0 0 0.353535354 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 -64 0.7111111 0.0924123 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.220770463 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -41 0.455555558 0.143743038 0.1875 0 0 0.323232323 ? 5th-6th Married-civ-spouse ? Husband White Male Mexico 0 -45 0.5 0.24441421 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -48 0.533333361 0.08844114 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.126847416 0.625 0 0 0.3838384 Private Some-college Separated Tech-support Not-in-family White Female United-States 0 -34 0.377777785 0.1311641 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 0 -40 0.444444448 0.0294408668 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -45 0.5 0.12597318 0.5625 0 0.4708448 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.157555208 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child White Female United-States 0 -51 0.566666663 0.05676414 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.294783145 0.5625 0.0288502872 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.1255374 0.8125 0.105201051 0 0.4040404 Private Bachelors Widowed Prof-specialty Unmarried White Male United-States 1 -23 0.25555557 0.08740255 0.625 0 0.395087242 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -34 0.377777785 0.121427491 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -36 0.4 0.0729572549 0.5625 0.04101041 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -56 0.622222245 0.0506592244 0.9375 0 0 0.323232323 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.191794336 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -45 0.5 0.126846746 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.224725455 0.8125 0.1502415 0 0.7070707 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.0776618943 0.6875 0.07688077 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 -54 0.6 0.11649587 0.8125 0 0.307621658 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -40 0.444444448 0.133424491 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -29 0.322222233 0.109964609 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -35 0.3888889 0.0866219252 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -47 0.5222222 0.07237802 0.5625 0 0 0.373737365 Private HS-grad Separated Exec-managerial Unmarried White Female United-States 0 -51 0.566666663 0.1696236 0.6875 0 0 0.434343427 Private Assoc-voc Never-married Exec-managerial Not-in-family White Female United-States 0 -28 0.311111122 0.271886349 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Male Mexico 0 -58 0.644444466 0.107346579 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -24 0.266666681 0.114548013 0.5625 0 0 0.25252524 Private HS-grad Never-married Machine-op-inspct Own-child White Female United-States 0 -46 0.51111114 0.129536167 0.5625 0 0 0.4040404 State-gov HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -57 0.6333333 0.09146329 0.375 0 0 0.4848485 Private 10th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -22 0.244444445 0.156923428 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Other-relative White Male United-States 0 -28 0.311111122 0.0232584924 0.8125 0 0 0.3030303 Private Bachelors Never-married Tech-support Not-in-family Black Male Jamaica 0 -17 0.188888893 0.250094146 0.375 0 0 0.25252524 ? 10th Never-married ? Own-child White Male United-States 0 -23 0.25555557 0.159623638 0.5625 0 0 0.6060606 Private HS-grad Never-married Sales Own-child White Male United-States 0 -19 0.211111113 0.140341684 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -66 0.733333349 0.06913158 0.5625 0 0 0.353535354 State-gov HS-grad Widowed Prof-specialty Unmarried Black Female United-States 0 -38 0.422222227 0.07501625 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -39 0.433333337 0.318020076 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Unmarried Black Female United-States 0 -39 0.433333337 0.0582950823 0.5 0 0 0.4040404 ? 12th Married-civ-spouse ? Husband White Male United-States 0 -47 0.5222222 0.04778256 0.5625 0.05178052 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -39 0.433333337 0.198638111 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Own-child White Male United-States 0 -22 0.244444445 0.275060028 0.625 0 0 0.4040404 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -36 0.4 0.172057077 0.5625 0 0 0.3030303 Private HS-grad Never-married Craft-repair Own-child Black Male United-States 0 -32 0.355555564 0.130167276 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Asian-Pac-Islander Male Philippines 0 -29 0.322222233 0.129274845 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 -43 0.477777779 0.08450231 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -51 0.566666663 0.06533621 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.12347167 0.1875 0 0 0.6060606 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.112513259 0.5 0 0 0.4040404 State-gov 12th Never-married Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.124749362 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -51 0.566666663 0.109003477 0.6875 0 0 0.575757563 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.11170435 0.8125 0 0 0.444444448 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.0934973657 0.5625 0 0 0.2020202 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -33 0.366666675 0.06719247 0.8125 0 0 0.151515156 Self-emp-not-inc Bachelors Never-married Other-service Not-in-family White Female United-States 0 -34 0.377777785 0.0755294859 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.08689942 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -38 0.422222227 0.24615328 0.6875 0 0 0.151515156 ? Assoc-voc Never-married ? Own-child White Male United-States 0 -27 0.3 0.17503342 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband Black Male United-States 1 -35 0.3888889 0.06036351 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -29 0.322222233 0.135754913 0.8125 0 0 0.5050505 State-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -40 0.444444448 0.1187347 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.129920766 0.25 0 0 0.3030303 Private 7th-8th Married-civ-spouse Farming-fishing Husband Black Male United-States 0 -37 0.411111116 0.116004191 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -38 0.422222227 0.109923519 0.5625 0.03411034 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.178983033 0.625 0 0.4331956 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband Black Male Cuba 1 -44 0.4888889 0.145014673 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.125245079 0.875 0 0 0.3030303 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -38 0.422222227 0.146052584 0.5625 0 0 0.424242437 Private HS-grad Never-married Sales Unmarried White Male United-States 0 -34 0.377777785 0.02403373 0.75 0 0 0.1010101 Local-gov Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -50 0.5555556 0.250086725 0.5625 0 0.43663913 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -46 0.51111114 0.0689423159 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.134766847 0.1875 0 0 0.3030303 Private 5th-6th Never-married Handlers-cleaners Unmarried White Male Guatemala 0 -47 0.5222222 0.139502466 0.6875 0 0 0.3838384 State-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.198917627 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.15796876 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Sales Not-in-family White Male United-States 0 -61 0.677777767 0.0962628946 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -55 0.6111111 0.122341476 0.625 0 0 0.373737365 State-gov Some-college Divorced Prof-specialty Not-in-family Black Female United-States 0 -36 0.4 0.12482278 0.5625 0 0 0.353535354 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -28 0.311111122 0.112706564 0.625 0.105201051 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 1 -22 0.244444445 0.255793571 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -34 0.377777785 0.118620872 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child Black Female United-States 0 -33 0.366666675 0.06750701 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Not-in-family Black Male United-States 0 -27 0.3 0.101229541 0.5625 0 0 0.323232323 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -43 0.477777779 0.01684173 0.875 0.0501305 0 0.121212125 Federal-gov Masters Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -55 0.6111111 0.0903344452 0.375 1 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -39 0.433333337 0.169535369 0.375 0 0.395087242 0.151515156 Self-emp-not-inc 10th Married-spouse-absent Other-service Not-in-family White Female United-States 0 -20 0.222222224 0.44020462 0.625 0 0 0.333333343 Private Some-college Never-married Other-service Own-child White Male El-Salvador 0 -38 0.422222227 0.118165568 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -30 0.333333343 0.224367142 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.0600482933 0.4375 0 0 0.424242437 Private 11th Never-married Other-service Own-child White Male El-Salvador 0 -60 0.6666667 0.133849487 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -43 0.477777779 0.0587887838 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -36 0.4 0.121698253 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.152939469 0.625 0 0 0.4848485 Private Some-college Never-married Other-service Unmarried White Female El-Salvador 0 -57 0.6333333 0.127853 0.625 0.07298073 0 0.4040404 Local-gov Some-college Married-civ-spouse Handlers-cleaners Husband Black Male United-States 1 -25 0.2777778 0.2350541 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Handlers-cleaners Other-relative Black Male United-States 0 -38 0.422222227 0.0647839159 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 -22 0.244444445 0.07590262 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.281271368 0.1875 0 0 0.4040404 Private 5th-6th Never-married Craft-repair Not-in-family White Male Mexico 0 -61 0.677777767 0.09449689 0.5625 0 0 0.444444448 Self-emp-not-inc HS-grad Never-married Sales Not-in-family White Female United-States 0 -28 0.311111122 0.229276523 0.625 0 0 0.464646459 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -17 0.188888893 0.126313984 0.4375 0 0 0.1010101 ? 11th Never-married ? Own-child White Female United-States 0 -21 0.233333334 0.159662023 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -49 0.544444442 0.118287474 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -37 0.411111116 0.262493223 0.5 0 0 0.353535354 Private 12th Divorced Craft-repair Own-child White Male United-States 0 -23 0.25555557 0.123130187 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female Dominican-Republic 0 -38 0.422222227 0.1652665 0.625 0.031370312 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -34 0.377777785 0.06323546 0.8125 0 0 0.464646459 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -21 0.233333334 0.338678062 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Female Peru 0 -27 0.3 0.142945573 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -57 0.6333333 0.202130392 0.5625 0 0 0.8484849 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.105699785 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -20 0.222222224 0.193125233 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family Other Female United-States 0 -49 0.544444442 0.09664007 0.625 0 0 0.656565666 Self-emp-inc Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 1 -38 0.422222227 0.152459249 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.07064838 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -44 0.4888889 0.15032886 0.5625 0 0.3409091 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male Haiti 0 -37 0.411111116 0.183262 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -57 0.6333333 0.137950644 0.875 0 0 0.3030303 Private Masters Divorced Prof-specialty Not-in-family White Male United-States 0 -56 0.622222245 0.1549392 0.25 0 0 0.3030303 Private 7th-8th Never-married Other-service Own-child White Female United-States 0 -41 0.455555558 0.163412258 0.75 0 0 0.8080808 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Male United-States 0 -50 0.5555556 0.08889443 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Other-service Husband Asian-Pac-Islander Male South 0 -33 0.366666675 0.0588062964 0.3125 0 0 0.5050505 Private 9th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -29 0.322222233 0.0906348452 0.875 0 0 0.2020202 Private Masters Married-civ-spouse Sales Husband White Male United-States 0 -28 0.311111122 0.11036671 0.8125 0.05178052 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.161250219 0.375 0 0 0.5050505 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -36 0.4 0.137210429 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -45 0.5 0.116032481 1 0 0.6896235 0.353535354 Private Doctorate Divorced Prof-specialty Unmarried Black Female United-States 1 -30 0.333333343 0.0439669825 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Never-married Craft-repair Own-child White Male United-States 0 -35 0.3888889 0.09112181 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -27 0.3 0.1663455 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.121276617 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male Yugoslavia 0 -24 0.266666681 0.07949256 0.625 0 0 0.3030303 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -47 0.5222222 0.06890797 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -47 0.5222222 0.0306889247 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.0927093253 0.4375 0 0 0.151515156 Private 11th Never-married Other-service Own-child White Female United-States 0 -18 0.2 0.160062775 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -31 0.344444454 0.1278658 0.5625 0 0 0.474747479 Local-gov HS-grad Divorced Protective-serv Not-in-family White Male United-States 1 -43 0.477777779 0.07965286 0.875 0 0 0.3030303 Self-emp-not-inc Masters Divorced Other-service Unmarried White Female United-States 0 -45 0.5 0.194272265 0.5625 0.0406404063 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Other Male United-States 0 -39 0.433333337 0.07162837 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -30 0.333333343 0.213154137 0.8125 0 0 0.5050505 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -22 0.244444445 0.03371579 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -30 0.333333343 0.122643225 0.5625 0 0 0.858585835 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -36 0.4 0.125860021 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.1065572 0.75 0 0 0.3030303 State-gov Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 0 -61 0.677777767 0.154740512 0.125 0.0394203924 0 0.2020202 ? 1st-4th Married-civ-spouse ? Husband White Male Mexico 0 -27 0.3 0.09533544 0.5625 0 0.43663913 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -59 0.655555546 0.03430244 0.625 0 0 0.6060606 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -60 0.6666667 0.08926285 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.175587744 0.8125 0 0 0.4040404 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -35 0.3888889 0.1557077 0.5625 0 0 0.6060606 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -40 0.444444448 0.150384754 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -20 0.222222224 0.188278481 0.4375 0.0296102948 0 0.353535354 Private 11th Married-civ-spouse Handlers-cleaners Other-relative White Male United-States 0 -47 0.5222222 0.0310122222 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 0 -40 0.444444448 0.113201618 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Male United-States 0 -20 0.222222224 0.05367464 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -75 0.8333334 0.07692033 0.625 0 0 0.13131313 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -25 0.2777778 0.08359304 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -47 0.5222222 0.0703984946 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.08655996 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Widowed Sales Unmarried White Female United-States 1 -34 0.377777785 0.07581574 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -45 0.5 0.02167838 0.8125 0 0 0.4040404 State-gov Bachelors Separated Prof-specialty Not-in-family White Female United-States 0 -23 0.25555557 0.1614213 0.625 0.02597026 0 0.5050505 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -46 0.51111114 0.181372061 0.75 0 0 0.4040404 Private Assoc-acdm Widowed Adm-clerical Unmarried White Female United-States 0 -41 0.455555558 0.118230224 0.625 0 0 0.3838384 State-gov Some-college Divorced Machine-op-inspct Not-in-family Black Female United-States 0 -29 0.322222233 0.29925406 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.0184649471 0.4375 0 0 0.2020202 Private 11th Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Male United-States 0 -39 0.433333337 0.117426023 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.09977942 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -34 0.377777785 0.140912175 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband Black Male ? 0 -20 0.222222224 0.111198522 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -18 0.2 0.034736868 0.5625 0 0.3677686 0.3838384 ? HS-grad Never-married ? Own-child Asian-Pac-Islander Female United-States 0 -52 0.5777778 0.112918727 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.0195830148 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Wife Amer-Indian-Eskimo Female United-States 0 -22 0.244444445 0.267322481 0.1875 0 0 0.353535354 Private 5th-6th Married-civ-spouse Craft-repair Husband White Male Mexico 0 -66 0.733333349 0.047871463 0.625 0 0 0.5555556 State-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -35 0.3888889 0.0872718841 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -40 0.444444448 0.123772062 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Prof-specialty Not-in-family White Male United-States 1 -21 0.233333334 0.111127131 0.5625 0 0 0.3838384 Private HS-grad Divorced Sales Unmarried Amer-Indian-Eskimo Female United-States 0 -51 0.566666663 0.10432443 0.5625 0 0 0.5252525 Local-gov HS-grad Divorced Protective-serv Unmarried White Male United-States 0 -34 0.377777785 0.1347857 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.118804075 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.230730683 0.8125 0 0 0.4040404 Private Bachelors Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.120455578 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -42 0.466666669 0.128745437 0.875 0 0 0.4040404 Local-gov Masters Never-married Prof-specialty Unmarried White Female United-States 0 -41 0.455555558 0.0200053211 0.6875 0 0 0.3030303 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.106346384 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Female United-States 0 -64 0.7111111 0.0215483885 0.25 0 0 0.1010101 Local-gov 7th-8th Married-civ-spouse Protective-serv Husband White Male United-States 0 -24 0.266666681 0.141937956 0.5625 0 0.453168035 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -23 0.25555557 0.02668207 0.625 0 0 0.1010101 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -29 0.322222233 0.135051072 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.03220707 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -28 0.311111122 0.123361208 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.252511442 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.08680243 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.1366413 0.375 0 0 0.4040404 Private 10th Married-spouse-absent Craft-repair Not-in-family White Female United-States 0 -42 0.466666669 0.103329621 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband Black Male United-States 1 -51 0.566666663 0.01669692 0.625 0 0 1 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -32 0.355555564 0.213354841 0.4375 0 0 0.4040404 Private 11th Never-married Other-service Unmarried Black Female Jamaica 0 -37 0.411111116 0.08524859 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -18 0.2 0.08657478 0.4375 0 0 0.25252524 Private 11th Never-married Sales Own-child White Female United-States 0 -24 0.266666681 0.158038139 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Other-service Own-child White Female United-States 0 -29 0.322222233 0.0440302975 0.625 0 0 0.4040404 ? Some-college Divorced ? Unmarried White Female United-States 0 -45 0.5 0.231276259 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -52 0.5777778 0.020698389 0.8125 0 0 0.454545468 Federal-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.277751476 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -46 0.51111114 0.07565139 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Divorced Exec-managerial Not-in-family White Female United-States 0 -63 0.7 0.122535452 0.5625 0 0 0.5050505 Private HS-grad Widowed Exec-managerial Unmarried White Male United-States 1 -32 0.355555564 0.06744438 0.8125 0 0 0.353535354 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -24 0.266666681 0.0862535 0.5625 0.005940059 0 0.151515156 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -72 0.8 0.270966977 0.625 0 0 0.323232323 ? Some-college Married-civ-spouse ? Husband White Male Canada 0 -35 0.3888889 0.0662683845 0.625 0 0 0.1010101 ? Some-college Never-married ? Unmarried White Male United-States 0 -29 0.322222233 0.120943218 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.0437272042 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -70 0.7777778 0.06911138 0.375 0 0 0.323232323 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -65 0.722222269 0.07780199 0.8125 0.0555605553 0 0.4848485 ? Bachelors Married-civ-spouse ? Husband White Male United-States 1 -36 0.4 0.101399273 0.5625 0 0 0.3030303 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -53 0.5888889 0.08972759 0.5625 0.04386044 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 1 -49 0.544444442 0.0451274849 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -60 0.6666667 0.1093463 0.9375 0 0.43663913 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.09332292 0.4375 0 0 0.4040404 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -21 0.233333334 0.114807993 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Male Italy 0 -42 0.466666669 0.0444573164 0.375 0 0 0.4040404 Private 10th Never-married Transport-moving Not-in-family Black Male United-States 0 -25 0.2777778 0.118593931 0.875 0 0 0.373737365 State-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -32 0.355555564 0.1470474 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -25 0.2777778 0.122375153 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male ? 0 -47 0.5222222 0.113310054 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -30 0.333333343 0.108903788 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Prof-specialty Not-in-family White Female United-States 0 -21 0.233333334 0.16349107 0.75 0 0 0.4040404 ? Assoc-acdm Never-married ? Own-child White Female United-States 0 -38 0.422222227 0.045340322 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -34 0.377777785 0.17903018 0.5625 0 0.4708448 0.5555556 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.06692036 0.75 0 0 0.3030303 Private Assoc-acdm Never-married Other-service Not-in-family White Female United-States 0 -56 0.622222245 0.114548013 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -52 0.5777778 0.15569827 0.6875 0 0 0.4040404 State-gov Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.0419874676 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -29 0.322222233 0.07982731 0.5625 0 0 0.424242437 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -45 0.5 0.1048417 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.105967857 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -45 0.5 0.230188489 0.875 0 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -30 0.333333343 0.110587627 0.8125 0 0 0.424242437 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -45 0.5 0.05594647 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.204945087 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -23 0.25555557 0.2941985 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -24 0.266666681 0.0197359081 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Own-child White Female ? 0 -43 0.477777779 0.07049212 0.875 0.049340494 0 0.4040404 Private Masters Widowed Exec-managerial Unmarried White Male United-States 1 -42 0.466666669 0.05323347 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Unmarried White Male United-States 0 -72 0.8 0.111552127 0.625 0 0 0.25252524 Private Some-college Widowed Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.119408906 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -57 0.6333333 0.134603843 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.0154683935 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -27 0.3 0.0397843346 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -54 0.6 0.05208846 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -42 0.466666669 0.06501225 0.5625 0 0 0.6060606 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.09690006 0.3125 0 0 0.4040404 Private 9th Never-married Other-service Own-child Black Male United-States 0 -48 0.533333361 0.08178325 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.118729986 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 -41 0.455555558 0.119825155 0.8125 0.07688077 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.13814193 0.25 0 0 0.353535354 Private 7th-8th Married-civ-spouse Other-service Wife White Female ? 0 -57 0.6333333 0.238351062 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -44 0.4888889 0.119846709 1 0 0 0.363636374 Local-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.08233555 0.5625 0 0 0.282828271 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -49 0.544444442 0.08479261 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -44 0.4888889 0.104715757 0.75 0.0115101151 0 0.5050505 Private Assoc-acdm Never-married Prof-specialty Unmarried Black Female United-States 0 -42 0.466666669 0.23959507 0.6875 0 0 0.444444448 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -18 0.2 0.1652005 0.625 0 0 0.161616161 ? Some-college Never-married ? Own-child White Male United-States 0 -18 0.2 0.161870539 0.5 0 0 0.181818187 Private 12th Never-married Other-service Own-child White Male United-States 0 -51 0.566666663 0.123219095 0.5625 0 0 0.4040404 Private HS-grad Widowed Tech-support Unmarried Black Female United-States 0 -28 0.311111122 0.178148523 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -39 0.433333337 0.07437572 0.75 0.1502415 0 0.454545468 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 1 -25 0.2777778 0.112460725 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -41 0.455555558 0.234156281 0.9375 0 0.453856736 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.0228833333 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -42 0.466666669 0.144957423 0.4375 0 0 0.3030303 Self-emp-not-inc 11th Separated Other-service Unmarried White Female United-States 0 -33 0.366666675 0.128491521 0.5625 0 0.371212125 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -63 0.7 0.223294869 0.375 0 0 0.4040404 ? 10th Married-civ-spouse ? Husband White Male United-States 0 -47 0.5222222 0.109445311 0.625 0 0 0.454545468 Private Some-college Divorced Sales Unmarried White Female United-States 1 -27 0.3 0.0578687377 0.8125 0 0 0.686868668 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 -39 0.433333337 0.0615388267 0.875 0 0.4242424 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.122813627 0.625 0 0 0.4040404 Private Some-college Never-married Farming-fishing Own-child White Male United-States 0 -49 0.544444442 0.08731701 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -70 0.7777778 0.0899411 0.5625 0 0 0.282828271 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -46 0.51111114 0.100180171 0.5625 0 0.399449021 0.353535354 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -47 0.5222222 0.06909319 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -35 0.3888889 0.07502299 0.3125 0 0 0.4040404 Private 9th Never-married Craft-repair Not-in-family White Male United-States 0 -24 0.266666681 0.162828311 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -22 0.244444445 0.225359932 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Male United-States 0 -43 0.477777779 0.06866684 0.8125 0 0 0.353535354 Private Bachelors Divorced Other-service Not-in-family White Female United-States 0 -60 0.6666667 0.14336586 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 -53 0.5888889 0.123912163 0.4375 0 0 0.4848485 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -47 0.5222222 0.0956829861 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -34 0.377777785 0.106832676 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -37 0.411111116 0.019630162 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Male United-States 0 -35 0.3888889 0.0270323064 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -23 0.25555557 0.151302785 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -27 0.3 0.09877451 0.5625 0 0 0.151515156 ? HS-grad Married-civ-spouse ? Own-child White Female United-States 0 -29 0.322222233 0.112976655 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Other-relative White Male United-States 0 -23 0.25555557 0.04063501 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -35 0.3888889 0.126063436 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -18 0.2 0.10583315 0.5625 0 0 0.121212125 ? HS-grad Never-married ? Own-child White Female United-States 0 -27 0.3 0.171910927 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -56 0.622222245 0.129537523 0.625 0 0 0.2020202 ? Some-college Divorced ? Not-in-family White Female United-States 0 -40 0.444444448 0.110016473 0.5625 0 0 0.7070707 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.08740794 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -18 0.2 0.138753489 0.625 0.0217602178 0 0.4040404 Private Some-college Never-married Sales Unmarried White Male United-States 0 -25 0.2777778 0.2676067 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 -36 0.4 0.502300441 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Unmarried Black Female United-States 0 -38 0.422222227 0.09533881 0.375 0 0 0.4040404 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 -52 0.5777778 0.0239616632 0.5625 0 0 0.4040404 Private HS-grad Widowed Craft-repair Not-in-family White Male United-States 0 -23 0.25555557 0.253506929 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Unmarried White Male Mexico 0 -48 0.533333361 0.135262564 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.244349554 0.5625 0 0 0.353535354 ? HS-grad Never-married ? Unmarried Black Female United-States 0 -46 0.51111114 0.07866142 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -26 0.2888889 0.107967578 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Protective-serv Not-in-family White Male United-States 0 -47 0.5222222 0.244259968 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -21 0.233333334 0.07260769 0.625 0 0 0.0303030312 ? Some-college Never-married ? Own-child White Female United-States 0 -65 0.722222269 0.115133315 0.8125 0.06723067 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -31 0.344444454 0.151029333 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband Black Male United-States 0 -38 0.422222227 0.322182536 0.5625 0.07688077 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -68 0.75555557 0.1422249 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.0994392857 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Other-relative Asian-Pac-Islander Female Hong 0 -42 0.466666669 0.0704833642 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Male United-States 0 -49 0.544444442 0.04537265 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.155558854 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female Philippines 1 -39 0.433333337 0.1187677 0.875 0.07688077 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.180831879 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.194470286 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -36 0.4 0.15564169 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 0 -42 0.466666669 0.224643961 0.625 0 0 0.4040404 State-gov Some-college Married-civ-spouse Exec-managerial Wife White Female United-States 1 -62 0.6888889 0.144330353 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -21 0.233333334 0.07949256 0.5625 0 0 0.24242425 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -21 0.233333334 0.126010224 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child Other Female Cuba 0 -60 0.6666667 0.117244169 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -22 0.244444445 0.09014114 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Own-child White Female United-States 0 -30 0.333333343 0.154759362 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -64 0.7111111 0.141497478 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.08034391 0.8125 0.1502415 0 0.282828271 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -41 0.455555558 0.0752823 0.75 0 0.4331956 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -25 0.2777778 0.08284407 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative White Male United-States 0 -27 0.3 0.0301521178 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -40 0.444444448 0.13509351 0.75 0 0 0.444444448 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 0 -58 0.644444466 0.159355566 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.0223101564 0.9375 0 0 1 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 -50 0.5555556 0.2079632 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Transport-moving Unmarried White Female United-States 0 -27 0.3 0.06972698 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Unmarried White Male United-States 0 -31 0.344444454 0.06700523 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child Amer-Indian-Eskimo Male United-States 0 -50 0.5555556 0.15555346 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -45 0.5 0.06691902 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband Black Male United-States 1 -33 0.366666675 0.577577353 0.5 0 0 0.4040404 Private 12th Never-married Protective-serv Own-child Black Male United-States 0 -62 0.6888889 0.0546344221 0.625 0 0.453168035 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Male United-States 0 -38 0.422222227 0.104000457 0.5625 0 0.4708448 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Poland 0 -19 0.211111113 0.133994967 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Own-child White Female United-States 0 -30 0.333333343 0.209938 0.4375 0 0 0.3030303 Private 11th Married-civ-spouse Other-service Wife Black Female United-States 0 -38 0.422222227 0.170334846 0.625 0 0 0.25252524 Private Some-college Divorced Sales Own-child White Female United-States 0 -42 0.466666669 0.02663088 0.5625 0 0 1 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -49 0.544444442 0.08221566 0.625 0 0 0.25252524 Self-emp-inc Some-college Divorced Sales Not-in-family White Male United-States 0 -53 0.5888889 0.07474684 0.875 0 0.43663913 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.134430751 0.625 0 0.4331956 0.4040404 Local-gov Some-college Married-civ-spouse Craft-repair Husband White Male Mexico 1 -24 0.266666681 0.136539578 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child Black Female United-States 0 -29 0.322222233 0.133066848 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Adm-clerical Own-child White Female United-States 0 -24 0.266666681 0.139305115 0.625 0.0506005064 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 -38 0.422222227 0.128574371 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male ? 1 -25 0.2777778 0.106924273 0.6875 0 0 0.5555556 Self-emp-inc Assoc-voc Never-married Transport-moving Unmarried White Male United-States 0 -51 0.566666663 0.164093882 0.375 0 0 0.4040404 State-gov 10th Married-civ-spouse Craft-repair Husband Amer-Indian-Eskimo Male United-States 0 -17 0.188888893 0.147690624 0.4375 0 0 0.2020202 ? 11th Never-married ? Own-child White Female United-States 0 -19 0.211111113 0.0305656679 0.625 0 0 0.08080808 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -38 0.422222227 0.112804905 0.625 0 0 0.5252525 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -60 0.6666667 0.151554689 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -29 0.322222233 0.272837371 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Sales Not-in-family White Male United-States 0 -66 0.733333349 0.1253185 0.625 0 1 0.4040404 ? Some-college Widowed ? Unmarried Black Female United-States 0 -28 0.311111122 0.0162678789 0.375 0 0 0.4040404 Federal-gov 10th Married-civ-spouse Other-service Wife Amer-Indian-Eskimo Female United-States 0 -36 0.4 0.08524859 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male Ecuador 1 -57 0.6333333 0.09271741 0.5625 0 0 0.05050505 ? HS-grad Married-civ-spouse ? Husband Other Male Columbia 0 -24 0.266666681 0.212483972 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Craft-repair Own-child White Male United-States 0 -43 0.477777779 0.167161837 0.75 0 0 0.3838384 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.1393563 0.9375 0 0 0.5555556 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -67 0.7444445 0.128901035 0.9375 0.200512 0 0.25252524 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.129258 0.5625 0 0 0.4040404 Private HS-grad Never-married Protective-serv Own-child White Male United-States 0 -21 0.233333334 0.0977426544 0.625 0 0 0.2020202 Private Some-college Never-married Other-service Own-child Asian-Pac-Islander Male United-States 0 -20 0.222222224 0.08812525 0.375 0 0 0.4040404 Private 10th Never-married Handlers-cleaners Own-child White Male United-States 0 -42 0.466666669 0.0223115031 0.75 0 0 0.6060606 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -20 0.222222224 0.225031242 0.625 0 0 0.1010101 Private Some-college Never-married Other-service Own-child White Female United-States 0 -19 0.211111113 0.238501251 0.5625 0 0 0.353535354 Local-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -34 0.377777785 0.07542576 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.216330528 0.8125 0 0 0.454545468 Local-gov Bachelors Never-married Prof-specialty Unmarried White Female United-States 0 -33 0.366666675 0.0930434 0.625 0 0 0.25252524 Private Some-college Separated Other-service Unmarried Black Female United-States 0 -36 0.4 0.200039074 0.625 0 0 0.373737365 Private Some-college Divorced Craft-repair Not-in-family White Female United-States 0 -43 0.477777779 0.10446924 0.75 0 0.5610652 0.7070707 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 1 -41 0.455555558 0.117525704 0.5625 0 0 0.4040404 Local-gov HS-grad Separated Other-service Unmarried Black Female United-States 0 -34 0.377777785 0.116700627 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Tech-support Husband White Male United-States 1 -33 0.366666675 0.01724922 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Sales Husband Other Male Japan 1 -47 0.5222222 0.126330152 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -41 0.455555558 0.132244453 0.125 0 0 0.5050505 Private 1st-4th Married-civ-spouse Sales Husband White Male Mexico 0 -40 0.444444448 0.138106227 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Not-in-family White Male United-States 1 -28 0.311111122 0.482208937 0.8125 0 0 0.4040404 Private Bachelors Never-married Craft-repair Own-child Black Male United-States 0 -62 0.6888889 0.151221961 0.5625 0 0 0.909090936 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -29 0.322222233 0.154681236 0.5625 0 0 0.5050505 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -46 0.51111114 0.06592757 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.08843373 0.5625 0 0 0.6060606 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -57 0.6333333 0.133275643 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.116363861 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -28 0.311111122 0.118404672 0.75 0 0 0.4040404 Local-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.0350056067 0.8125 0 0 0.454545468 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -54 0.6 0.0189842433 0.8125 0.2782828 0 0.5050505 Self-emp-not-inc Bachelors Divorced Farming-fishing Not-in-family White Male United-States 1 -22 0.244444445 0.196657926 0.4375 0 0 0.4040404 Private 11th Separated Craft-repair Not-in-family White Male United-States 0 -36 0.4 0.1217427 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Protective-serv Unmarried Black Female United-States 0 -50 0.5555556 0.158049583 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -18 0.2 0.0265446678 0.4375 0 0 0.24242425 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -52 0.5777778 0.225144386 0.75 0 0 0.4040404 State-gov Assoc-acdm Married-civ-spouse Sales Husband White Male United-States 1 -41 0.455555558 0.12984331 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Husband White Male ? 0 -21 0.233333334 0.07093126 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Not-in-family White Female United-States 0 -36 0.4 0.11562971 0.8125 0 0.3996786 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -34 0.377777785 0.123064183 0.8125 0 0 0.5555556 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Female United-States 1 -21 0.233333334 0.156169742 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 -46 0.51111114 0.06876922 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -57 0.6333333 0.03384376 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -61 0.677777767 0.131688789 0.875 0 0 0.25252524 Local-gov Masters Never-married Prof-specialty Unmarried White Female United-States 0 -22 0.244444445 0.0231089685 0.625 0 0 0.25252524 State-gov Some-college Never-married Transport-moving Own-child White Male United-States 0 -33 0.366666675 0.212104768 0.4375 0 0 0.535353541 ? 11th Divorced ? Own-child White Male United-States 0 -36 0.4 0.503614545 0.9375 0.1502415 0 0.5050505 State-gov Prof-school Married-civ-spouse Prof-specialty Wife White Female United-States 1 -43 0.477777779 0.126813069 0.875 0.009140091 0 0.4040404 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -25 0.2777778 0.07474751 0.75 0 0 0.373737365 Private Assoc-acdm Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female India 1 -17 0.188888893 0.0536685735 0.375 0 0 0.3030303 Private 10th Never-married Priv-house-serv Other-relative White Male United-States 0 -45 0.5 0.198471084 0.6875 0.04386044 0 0.3838384 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -30 0.333333343 0.229607239 0.9375 0 0.365013778 0.8080808 Private Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 -40 0.444444448 0.129493073 0.875 0 0 0.353535354 Private Masters Never-married Prof-specialty Not-in-family White Male United-States 0 -31 0.344444454 0.128125116 0.875 0 0 0.454545468 Local-gov Masters Never-married Exec-managerial Not-in-family White Male United-States 0 -42 0.466666669 0.08011491 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -53 0.5888889 0.03762431 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -37 0.411111116 0.160592854 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Transport-moving Husband White Male Cuba 0 -37 0.411111116 0.112307832 0.5625 0 0 0.2020202 State-gov HS-grad Married-spouse-absent Other-service Unmarried White Female United-States 0 -54 0.6 0.0973836556 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 -36 0.4 0.09050081 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Own-child White Female United-States 0 -46 0.51111114 0.08999498 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -46 0.51111114 0.136753768 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.1464668 0.3125 0 0 0.5050505 Private 9th Married-civ-spouse Transport-moving Husband White Male United-States 0 -17 0.188888893 0.07188836 0.4375 0.005940059 0 0.4040404 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -42 0.466666669 0.1428075 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Prof-specialty Not-in-family Black Male United-States 0 -37 0.411111116 0.08524859 0.5625 0 0 0.4040404 Local-gov HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -29 0.322222233 0.195298061 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -54 0.6 0.117263705 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.122391991 0.5 0 0 0.4848485 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.116401576 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -24 0.266666681 0.1974069 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -57 0.6333333 0.0723665655 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male Portugal 0 -59 0.655555546 0.06417639 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -33 0.366666675 0.0439669825 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.148812726 0.5625 0 0.365932047 0.4040404 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 -53 0.5888889 0.173731491 0.5625 0.0282902829 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -26 0.2888889 0.09089011 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 -55 0.6111111 0.07111312 0.875 0.0222802218 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.114045553 0.5625 0 0 0.454545468 Private HS-grad Separated Other-service Not-in-family Black Female Jamaica 0 -44 0.4888889 0.0666725039 0.8125 0 0 0.3838384 State-gov Bachelors Married-civ-spouse Prof-specialty Husband Amer-Indian-Eskimo Male United-States 1 -30 0.333333343 0.07667382 0.6875 0.031370312 0 0.6060606 Self-emp-not-inc Assoc-voc Married-civ-spouse Sales Husband White Male Germany 0 -24 0.266666681 0.09660909 0.625 0 0 0.24242425 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -32 0.355555564 0.0967222452 0.375 0 0 0.373737365 Private 10th Married-spouse-absent Other-service Not-in-family Black Female United-States 0 -35 0.3888889 0.152428269 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -67 0.7444445 0.0637230948 0.875 0 0 0.3030303 Private Masters Married-civ-spouse Sales Husband White Male United-States 1 -56 0.622222245 0.0179941468 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -26 0.2888889 0.107941307 0.875 0 0 0.2020202 Private Masters Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male India 0 -46 0.51111114 0.0790123343 0.75 0.06497065 0 0.4040404 Private Assoc-acdm Widowed Tech-support Unmarried White Female United-States 0 -52 0.5777778 0.103954658 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.0600806251 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -31 0.344444454 0.117669173 0.5625 0 0 0.5050505 Private HS-grad Divorced Sales Unmarried Black Male United-States 0 -53 0.5888889 0.103378117 0.5625 0 0 0.3030303 Private HS-grad Separated Transport-moving Not-in-family White Male United-States 0 -27 0.3 0.242537752 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -39 0.433333337 0.155152708 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -22 0.244444445 0.1103721 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -37 0.411111116 0.134540528 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.224627122 0.5625 0 0 0.3030303 Private HS-grad Never-married Adm-clerical Own-child White Male Nicaragua 0 -60 0.6666667 0.1005459 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -51 0.566666663 0.09329396 0.6875 0 0 0.4848485 Private Assoc-voc Divorced Tech-support Unmarried Black Female United-States 0 -57 0.6333333 0.0447927378 0.9375 0 0 0.5050505 Federal-gov Prof-school Divorced Prof-specialty Not-in-family White Female United-States 1 -59 0.655555546 0.139076114 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -37 0.411111116 0.114514336 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -35 0.3888889 0.146564469 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Wife White Female United-States 0 -43 0.477777779 0.09814139 0.625 0 0 0.727272749 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -17 0.188888893 0.113931723 0.5 0 0 0.353535354 Private 12th Never-married Other-service Own-child White Male United-States 0 -45 0.5 0.0229857117 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -18 0.2 0.07418443 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Female United-States 0 -52 0.5777778 0.149959758 0.5 0 0 0.4040404 Private 12th Separated Machine-op-inspct Other-relative White Female Cuba 0 -18 0.2 0.123016357 0.625 0 0 0.09090909 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -20 0.222222224 0.2044615 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Own-child Black Male Germany 0 -34 0.377777785 0.09435679 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 -19 0.211111113 0.120435372 0.5625 0 0 0.2020202 Private HS-grad Never-married Machine-op-inspct Own-child Black Female United-States 0 -18 0.2 0.180102453 0.5 0 0 0.121212125 ? 12th Never-married ? Own-child White Female United-States 0 -17 0.188888893 0.129579276 0.3125 0 0 0.454545468 Local-gov 9th Never-married Other-service Own-child White Male United-States 0 -30 0.333333343 0.0859497339 0.8125 0 0 0.353535354 Federal-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.174352482 0.8125 0 0 0.454545468 Private Bachelors Never-married Craft-repair Not-in-family White Female United-States 0 -30 0.333333343 0.151700839 0.625 0.0861408561 0 0.5050505 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 1 -18 0.2 0.117818691 0.3125 0 0 0.151515156 Private 9th Never-married Other-service Own-child White Male ? 0 -50 0.5555556 0.160427153 0.8125 0 0 0.373737365 State-gov Bachelors Divorced Adm-clerical Not-in-family Black Female United-States 0 -22 0.244444445 0.128944144 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Other-relative White Male United-States 0 -21 0.233333334 0.133913472 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -39 0.433333337 0.1692747 0.3125 0 0 0.4040404 Self-emp-not-inc 9th Married-civ-spouse Farming-fishing Other-relative White Male Cuba 0 -20 0.222222224 0.113279745 0.625 0.04416044 0 0.25252524 Private Some-college Never-married Other-service Other-relative White Female United-States 0 -62 0.6888889 0.249801144 0.75 0 0 0.07070707 Private Assoc-acdm Widowed Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.133483082 0.625 0 0 0.3838384 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -38 0.422222227 0.1418531 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Tech-support Husband White Male United-States 1 -32 0.355555564 0.181303367 0.625 0.0388703868 0 0.4040404 Private Some-college Separated Tech-support Unmarried Black Female United-States 0 -55 0.6111111 0.09545802 0.8125 0.0346403457 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 -38 0.422222227 0.125175044 0.875 1 0 0.7070707 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -34 0.377777785 0.0314850435 0.4375 0 0 0.3030303 Private 11th Never-married Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.0811440647 0.5625 0 0 0.2020202 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -26 0.2888889 0.09149629 0.625 0 0 0.373737365 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -41 0.455555558 0.208967447 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -61 0.677777767 0.255865663 1 0 0.43663913 0.4040404 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -75 0.8333334 0.0211678427 0.5625 0.0345603451 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -21 0.233333334 0.142124534 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Other-service Other-relative White Female Mexico 0 -50 0.5555556 0.117888071 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -49 0.544444442 0.08051364 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male ? 1 -26 0.2888889 0.166379854 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -39 0.433333337 0.169950932 0.25 0 0 0.4040404 Private 7th-8th Never-married Other-service Own-child White Male Mexico 0 -24 0.266666681 0.252786249 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male United-States 0 -56 0.622222245 0.0721793249 0.5625 0 0 0.181818187 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -17 0.188888893 0.0730582848 0.4375 0 0 0.171717167 Private 11th Never-married Other-service Own-child Black Male United-States 0 -37 0.411111116 0.101068564 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.127613232 0.6875 0 0 0.3030303 Private Assoc-voc Married-civ-spouse Machine-op-inspct Own-child White Female United-States 0 -28 0.311111122 0.133624524 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family Black Female United-States 0 -57 0.6333333 0.121930622 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -42 0.466666669 0.3838675 0.8125 0 0 0.454545468 Local-gov Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -25 0.2777778 0.0184622537 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 -22 0.244444445 0.09927696 0.8125 0 0 0.2020202 Private Bachelors Never-married Farming-fishing Not-in-family White Male United-States 0 -39 0.433333337 0.163616344 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -54 0.6 0.104363494 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Wife Black Female United-States 1 -41 0.455555558 0.285051256 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Divorced Exec-managerial Not-in-family White Male United-States 0 -43 0.477777779 0.131598532 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 -19 0.211111113 0.06735951 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Not-in-family White Female United-States 0 -35 0.3888889 0.129068062 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -34 0.377777785 0.229594439 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male Philippines 1 -19 0.211111113 0.139538154 0.5625 0 0 0.3030303 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -33 0.366666675 0.03233639 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -33 0.366666675 0.154273748 0.625 0 0 0.5252525 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -49 0.544444442 0.130238667 0.875 0 0 0.656565666 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.0389174968 0.5625 0 0 0.5050505 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -69 0.7666667 0.0815892741 0.5625 0 0 0.13131313 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -41 0.455555558 0.292306572 0.6875 0.04386044 0 0.6060606 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.09206341 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Unmarried Other Female United-States 0 -45 0.5 0.103803113 0.5625 0 0 0.3838384 State-gov HS-grad Divorced Exec-managerial Unmarried White Female United-States 1 -63 0.7 0.1980252 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -75 0.8333334 0.161000341 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -34 0.377777785 0.164385527 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Male United-States 0 -69 0.7666667 0.08644681 0.8125 0.09386094 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Black Male United-States 1 -33 0.366666675 0.04464052 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -44 0.4888889 0.10954567 0.5625 0 0 0.434343427 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.121006534 0.8125 0.03103031 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -18 0.2 0.1382214 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Female United-States 0 -48 0.533333361 0.103746541 0.5625 0 0 0.5252525 Private HS-grad Divorced Sales Not-in-family White Female United-States 0 -43 0.477777779 0.106774077 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.246661127 0.5625 0 0.4242424 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 -35 0.3888889 0.203314468 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -34 0.377777785 0.15383932 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -48 0.533333361 0.080912374 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -54 0.6 0.0861740261 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Other-service Unmarried Black Female United-States 0 -57 0.6333333 0.203080073 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -21 0.233333334 0.105731443 0.5625 0 0 0.6060606 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -28 0.311111122 0.0839796439 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 -51 0.566666663 0.205881312 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male Canada 1 -34 0.377777785 0.02114292 0.5625 0 0 0.535353541 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -41 0.455555558 0.0226698238 0.625 0 0 0.454545468 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -21 0.233333334 0.142379135 0.625 0 0 0.272727281 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.271433055 0.8125 0 0 0.5858586 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -66 0.733333349 0.05311156 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female United-States 0 -40 0.444444448 0.2158348 1 0 0.453856736 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Hong 1 -48 0.533333361 0.0331904329 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -44 0.4888889 0.167626575 0.8125 0 0 0.5050505 ? Bachelors Divorced ? Not-in-family White Male United-States 0 -41 0.455555558 0.16339004 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -41 0.455555558 0.242267653 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -55 0.6111111 0.199423462 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 1 -43 0.477777779 0.15702109 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Male United-States 1 -51 0.566666663 0.1276422 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Other-service Husband White Male Germany 1 -31 0.344444454 0.08380116 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.0451753065 0.8125 0.068490684 0 0.6060606 Self-emp-not-inc Bachelors Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 -51 0.566666663 0.131277263 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 0 -31 0.344444454 0.0639797151 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Other-service Unmarried Amer-Indian-Eskimo Male United-States 0 -18 0.2 0.131043538 0.625 0 0 0.373737365 Private Some-college Never-married Other-service Own-child White Male United-States 0 -60 0.6666667 0.05100407 0.5625 0 0.2506887 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 0 -29 0.322222233 0.04089836 0.5625 0 0 0.4040404 Private HS-grad Never-married Exec-managerial Not-in-family Asian-Pac-Islander Female United-States 0 -33 0.366666675 0.04037435 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Male United-States 0 -34 0.377777785 0.148743361 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Farming-fishing Husband White Male Mexico 0 -40 0.444444448 0.07020587 0.875 0 0 1 Self-emp-inc Masters Never-married Other-service Own-child White Male United-States 0 -57 0.6333333 0.0961228 0.625 0 0 0.3838384 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -55 0.6111111 0.07441883 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -40 0.444444448 0.1037755 0.75 0 0 0.6060606 Self-emp-not-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.08793464 0.8125 0 0 0.353535354 State-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -29 0.322222233 0.07214093 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband Amer-Indian-Eskimo Male United-States 0 -30 0.333333343 0.139537483 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female Mexico 0 -29 0.322222233 0.205155239 0.875 0 0 0.5050505 Private Masters Never-married Sales Not-in-family White Male United-States 1 -43 0.477777779 0.320145756 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -65 0.722222269 0.07248578 0.4375 0 0 0.08080808 Private 11th Widowed Adm-clerical Not-in-family White Female United-States 0 -19 0.211111113 0.203347474 0.625 0 0 0.353535354 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Male Laos 0 -35 0.3888889 0.180416986 0.5625 0 0.4331956 0.5050505 Private HS-grad Married-civ-spouse Sales Husband Asian-Pac-Islander Male Iran 1 -28 0.311111122 0.181710169 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -34 0.377777785 0.112799518 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -61 0.677777767 0.07747196 0.6875 0 0.4331956 0.6060606 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -63 0.7 0.058321353 0.5625 0 0 0.323232323 Local-gov HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 0 -47 0.5222222 0.126009554 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.124137118 0.625 0 0 0.4040404 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -18 0.2 0.152123824 0.625 0.02907029 0 0.3030303 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -29 0.322222233 0.0389902368 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -59 0.655555546 0.106372647 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.126509979 0.875 0 0 0.6262626 Private Masters Divorced Exec-managerial Not-in-family White Male United-States 1 -49 0.544444442 0.1691784 0.25 0.02407024 0 0.5050505 Private 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -60 0.6666667 0.213566333 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.128574371 0.875 0 0 0.4040404 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -48 0.533333361 0.221327469 0.5625 0 0 0.4040404 Federal-gov HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -21 0.233333334 0.272013634 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -41 0.455555558 0.145132542 0.5625 0 0 0.4040404 Private HS-grad Separated Handlers-cleaners Not-in-family Black Male United-States 0 -56 0.622222245 0.1061753 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.102464125 0.5 0 0 0.4040404 Private 12th Never-married Other-service Unmarried Black Male United-States 0 -53 0.5888889 0.161166027 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -23 0.25555557 0.157810479 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family Black Male United-States 0 -58 0.644444466 0.147318155 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -61 0.677777767 0.0716169253 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.02359526 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -22 0.244444445 0.15803881 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -43 0.477777779 0.114992544 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.1470474 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -90 1 0.0322818346 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -53 0.5888889 0.09591872 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -22 0.244444445 0.147586226 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -55 0.6111111 0.08950397 0.5625 0.03411034 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband Black Male Jamaica 0 -34 0.377777785 0.0299480371 1 0 0 0.6060606 State-gov Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.121861249 0.625 0.0501305 0 0.5555556 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -22 0.244444445 0.134320289 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family White Female United-States 0 -36 0.4 0.09409479 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family Black Female United-States 0 -33 0.366666675 0.136486381 0.8125 0 0 0.4040404 Private Bachelors Separated Prof-specialty Other-relative Black Female Jamaica 0 -17 0.188888893 0.107798524 0.375 0 0 0.121212125 Private 10th Never-married Other-service Own-child White Female United-States 0 -38 0.422222227 0.161483258 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Not-in-family White Male United-States 0 -60 0.6666667 0.10262578 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -34 0.377777785 0.02889463 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -72 0.8 0.07881498 0.5625 0 0 0.08080808 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -57 0.6333333 0.117879987 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male Italy 0 -39 0.433333337 0.2307812 0.5625 0 0 0.6060606 Private HS-grad Divorced Sales Not-in-family White Male United-States 0 -50 0.5555556 0.0968071148 0.8125 0 0 0.8080808 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -45 0.5 0.128711089 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 0 -37 0.411111116 0.140166566 0.8125 0 0 0.353535354 Private Bachelors Separated Exec-managerial Not-in-family White Male United-States 0 -27 0.3 0.112976655 0.625 0 0 0.4848485 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -43 0.477777779 0.212817371 0.8125 0 0 0.454545468 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 -41 0.455555558 0.09612482 0.625 0 0 0.363636374 Private Some-college Divorced Tech-support Unmarried Black Female United-States 0 -20 0.222222224 0.128124446 0.875 0 0 0.25252524 Private Masters Never-married Exec-managerial Own-child White Male United-States 0 -44 0.4888889 0.0537911579 0.875 0 0 0.2020202 Private Masters Separated Exec-managerial Unmarried White Female United-States 0 -50 0.5555556 0.0229453 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -54 0.6 0.150118709 0.5625 0 0 0.454545468 Private HS-grad Widowed Exec-managerial Unmarried White Female United-States 0 -31 0.344444454 0.0299480371 0.8125 0 0.359045 0.6060606 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 -33 0.366666675 0.172466591 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Unmarried White Female Puerto-Rico 0 -22 0.244444445 0.16910632 0.3125 0 0 0.5050505 Private 9th Never-married Other-service Own-child White Male United-States 0 -46 0.51111114 0.100995824 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.111291468 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female Philippines 1 -22 0.244444445 0.163796857 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Male China 0 -59 0.655555546 0.1082114 0.5625 0.02407024 0 0.6060606 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -57 0.6333333 0.118503004 0.625 0 0 0.25252524 Self-emp-not-inc Some-college Widowed Exec-managerial Other-relative White Male United-States 0 -26 0.2888889 0.143323421 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -52 0.5777778 0.103260919 0.75 0 0 0.4040404 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 -55 0.6111111 0.116720833 0.875 0 0 0.454545468 Local-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -47 0.5222222 0.080912374 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -19 0.211111113 0.07910258 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -26 0.2888889 0.152350813 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child White Male United-States 0 -44 0.4888889 0.1366413 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Prof-specialty Not-in-family White Female United-States 1 -42 0.466666669 0.119024321 0.875 0 0 0.4040404 Private Masters Never-married Exec-managerial Not-in-family White Male United-States 1 -39 0.433333337 0.0555935353 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -17 0.188888893 0.0280479975 0.4375 0 0 0.151515156 ? 11th Never-married ? Own-child White Female United-States 0 -26 0.2888889 0.132882968 0.5625 0 0 0.5050505 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -26 0.2888889 0.0515193269 0.875 0 0 0.2020202 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -50 0.5555556 0.0680903 0.875 0 0 0.5555556 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.08078642 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -18 0.2 0.09538999 0.625 0.0217602178 0 0.2020202 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -26 0.2888889 0.08255849 0.8125 0 0 0.6060606 Private Bachelors Never-married Exec-managerial Unmarried Asian-Pac-Islander Male Vietnam 0 -32 0.355555564 0.1311641 0.8125 0 0.43663913 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.177274272 0.1875 0 0 0.343434334 Private 5th-6th Married-spouse-absent Other-service Unmarried White Female Mexico 0 -47 0.5222222 0.09472858 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -52 0.5777778 0.136131421 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -25 0.2777778 0.0182810724 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.214214951 0.4375 0 0 0.4040404 Local-gov 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -53 0.5888889 0.186144054 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -30 0.333333343 0.0452527627 0.5625 0 0 0.08080808 Private HS-grad Never-married Handlers-cleaners Own-child Amer-Indian-Eskimo Female United-States 0 -23 0.25555557 0.0899720863 0.125 0 0 0.363636374 Private 1st-4th Never-married Farming-fishing Not-in-family White Male Mexico 0 -23 0.25555557 0.145936057 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Own-child White Male ? 0 -32 0.355555564 0.0308451857 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -29 0.322222233 0.021403579 0.5625 0 0 0.25252524 Self-emp-inc HS-grad Separated Prof-specialty Other-relative White Male United-States 0 -40 0.444444448 0.128001183 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Other-service Husband White Male United-States 0 -45 0.5 0.0972253755 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -17 0.188888893 0.115945593 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child Black Female United-States 0 -55 0.6111111 0.130079716 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -59 0.655555546 0.09461678 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -56 0.622222245 0.08243389 0.6875 0.1502415 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -23 0.25555557 0.07868903 0.5 0 0 0.5050505 Private 12th Never-married Craft-repair Not-in-family White Male United-States 0 -37 0.411111116 0.07926356 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -25 0.2777778 0.07172536 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -22 0.244444445 0.026808694 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -27 0.3 0.244528711 0.3125 0 0 0.24242425 Private 9th Never-married Priv-house-serv Unmarried White Female Mexico 0 -21 0.233333334 0.03668877 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -47 0.5222222 0.13502413 0.5625 0.05178052 0 0.4040404 Local-gov HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -38 0.422222227 0.0365843736 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -62 0.6888889 0.0764077753 0.875 0.105201051 0 0.333333343 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 1 -27 0.3 0.107511595 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.108597331 0.6875 0 0 0.909090936 ? Assoc-voc Never-married ? Own-child White Male United-States 0 -27 0.3 0.167021737 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child Black Female United-States 0 -40 0.444444448 0.205997825 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 1 -22 0.244444445 0.144145817 0.625 1 0 0.5555556 Self-emp-not-inc Some-college Never-married Sales Own-child Black Male United-States 1 -33 0.366666675 0.1525724 0.5625 0 0 0.6060606 Private HS-grad Divorced Exec-managerial Not-in-family White Male United-States 0 -28 0.311111122 0.166914642 0.6875 0 0 0.05050505 Private Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 0 -28 0.311111122 0.13129881 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -29 0.322222233 0.195318937 0.5625 0 0 0.5555556 Private HS-grad Never-married Transport-moving Unmarried White Male United-States 0 -46 0.51111114 0.394260824 0.3125 0 0 0.4040404 Private 9th Divorced Exec-managerial Unmarried White Female United-States 0 -30 0.333333343 0.0613893 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -65 0.722222269 0.155993283 0.5625 0 0 0.454545468 ? HS-grad Married-civ-spouse ? Husband White Male Germany 0 -28 0.311111122 0.184056088 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family Black Male United-States 0 -39 0.433333337 0.136514 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -35 0.3888889 0.107212543 0.625 0 0 0.4040404 Private Some-college Never-married Sales Not-in-family White Male United-States 0 -50 0.5555556 0.01950017 0.625 0 0 0.3939394 Private Some-college Married-civ-spouse Sales Wife White Female United-States 0 -25 0.2777778 0.1447594 0.375 0 0 0.4040404 ? 10th Never-married ? Own-child Black Male United-States 0 -63 0.7 0.110262983 0.3125 0 0 0.2020202 Private 9th Widowed Other-service Not-in-family White Female United-States 0 -56 0.622222245 0.13486518 0.6875 0 0 0.4848485 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.07355603 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -19 0.211111113 0.111909777 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Female United-States 0 -56 0.622222245 0.180650711 0.875 0 0 0.353535354 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male ? 1 -31 0.344444454 0.0465115979 0.5625 0 0 0.151515156 Private HS-grad Divorced Other-service Own-child White Female United-States 0 -51 0.566666663 0.159722641 0.875 0 0 0.4040404 State-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -17 0.188888893 0.186933428 0.4375 0 0 0.05050505 Private 11th Never-married Sales Own-child White Male United-States 0 -27 0.3 0.19467774 0.625 0 0 0.4040404 Local-gov Some-college Never-married Protective-serv Unmarried Asian-Pac-Islander Female United-States 0 -30 0.333333343 0.0907500163 0.625 0 0 0.454545468 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -18 0.2 0.03813081 0.625 0 0 0.2020202 Private Some-college Never-married Protective-serv Own-child White Female United-States 0 -41 0.455555558 0.0247180425 0.625 0.046500463 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -40 0.444444448 0.224643961 0.875 0 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -35 0.3888889 0.124850392 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -29 0.322222233 0.10373576 0.5625 0 0 0.1010101 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -27 0.3 0.14514938 0.8125 0 0.4242424 0.5555556 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -25 0.2777778 0.1498877 0.375 0.02597026 0 0.5050505 Private 10th Never-married Transport-moving Not-in-family White Male United-States 0 -53 0.5888889 0.129025638 0.125 0 0 0.4040404 Private 1st-4th Divorced Other-service Unmarried Black Female Dominican-Republic 0 -53 0.5888889 0.07539478 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Other-service Husband White Male United-States 0 -26 0.2888889 0.0363055281 0.5625 0 0 0.5050505 State-gov HS-grad Never-married Craft-repair Unmarried White Male United-States 0 -41 0.455555558 0.0987798944 0.8125 0 0 0.7070707 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -28 0.311111122 0.1308004 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -48 0.533333361 0.05289199 0.875 0 0 0.6060606 State-gov Masters Separated Prof-specialty Not-in-family White Male United-States 0 -22 0.244444445 0.131224051 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -40 0.444444448 0.222383574 0.9375 0.07688077 0 0.4040404 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -52 0.5777778 0.155429527 0.8125 0 0.43663913 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Cuba 1 -53 0.5888889 0.09244261 0.875 0 0.383149683 0.353535354 Local-gov Masters Widowed Prof-specialty Unmarried Black Female United-States 0 -40 0.444444448 0.171399713 0.625 0.07298073 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -57 0.6333333 0.202671915 0.75 0 0 0.75757575 Private Assoc-acdm Divorced Machine-op-inspct Not-in-family White Male United-States 0 -53 0.5888889 0.126509979 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Separated Craft-repair Not-in-family White Male Poland 0 -23 0.25555557 0.135473385 0.625 0 0 0.08080808 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -31 0.344444454 0.029974306 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -20 0.222222224 0.2568571 0.3125 0 0 0.282828271 Private 9th Never-married Handlers-cleaners Own-child White Male United-States 0 -25 0.2777778 0.20955275 0.9375 0 0 0.2020202 Private Prof-school Never-married Prof-specialty Not-in-family White Female United-States 0 -37 0.411111116 0.06488158 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Unmarried Black Female United-States 0 -50 0.5555556 0.153726161 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -34 0.377777785 0.03836722 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.08605885 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.2602517 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.27278012 0.6875 0 0 0.909090936 Self-emp-not-inc Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -49 0.544444442 0.0232672486 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.106341667 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -47 0.5222222 0.06822837 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.09055469 0.5625 0 0 0.7070707 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -27 0.3 0.12919873 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -23 0.25555557 0.04776639 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -55 0.6111111 0.17939119 0.5625 0 0 0.464646459 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -28 0.311111122 0.0587584749 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.159282148 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Not-in-family White Female Germany 0 -30 0.333333343 0.150970727 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Own-child Black Male United-States 0 -23 0.25555557 0.132821 0.8125 0 0 0.6060606 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -19 0.211111113 0.08369676 0.5625 0 0 0.5050505 Private HS-grad Never-married Sales Own-child White Male United-States 0 -22 0.244444445 0.05386929 0.625 0 0 0.25252524 Private Some-college Never-married Sales Own-child White Male United-States 0 -50 0.5555556 0.08676067 0.5625 0 0 0.25252524 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -64 0.7111111 0.140675753 0.5625 0 0 0.5050505 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -21 0.233333334 0.0345267244 0.5625 0 0 0.353535354 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -75 0.8333334 0.06608451 0.625 0 0 0.4040404 Self-emp-inc Some-college Widowed Sales Not-in-family White Male United-States 1 -29 0.322222233 0.05549453 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Asian-Pac-Islander Male Germany 0 -47 0.5222222 0.0387511328 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.147478461 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -33 0.366666675 0.137907535 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -45 0.5 0.164093882 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 1 -41 0.455555558 0.114702247 0.6875 0 0 0.434343427 Private Assoc-voc Divorced Prof-specialty Unmarried White Female United-States 0 -23 0.25555557 0.04063501 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -38 0.422222227 0.181394964 0.8125 0.05178052 0 0.5050505 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 1 -67 0.7444445 0.089458175 0.625 0 0 0.414141417 State-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -21 0.233333334 0.0805985 0.625 0 0 0.353535354 Private Some-college Never-married Tech-support Own-child White Male United-States 0 -38 0.422222227 0.101068564 0.625 0 0 0.454545468 Private Some-college Never-married Prof-specialty Not-in-family White Male United-States 0 -31 0.344444454 0.0865943059 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -19 0.211111113 0.1555016 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -59 0.655555546 0.100037381 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.107894838 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -50 0.5555556 0.0502860844 0.625 0 0 0.4040404 Local-gov Some-college Widowed Prof-specialty Unmarried White Male United-States 0 -60 0.6666667 0.0959746242 0.375 0 0 0.4040404 Self-emp-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.0821995 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.0249800477 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 -36 0.4 0.0416096151 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.11878185 0.625 0 0 0.1010101 ? Some-college Never-married ? Own-child White Female Germany 0 -27 0.3 0.08304815 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male Poland 0 -18 0.2 0.0604564548 0.5 0 0 0.2020202 Private 12th Never-married Other-service Own-child White Female United-States 0 -44 0.4888889 0.111337945 0.625 0 0.3409091 0.4040404 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -56 0.622222245 0.0706840754 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Other-service Husband Black Male United-States 0 -51 0.566666663 0.129973978 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Married-civ-spouse Protective-serv Husband Black Male United-States 1 -48 0.533333361 0.0659141 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Italy 1 -31 0.344444454 0.049562037 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -35 0.3888889 0.019630162 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Transport-moving Not-in-family White Male United-States 0 -35 0.3888889 0.118024796 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Other-relative White Male United-States 0 -36 0.4 0.2191506 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.0722237751 0.75 0 0.3838384 0.656565666 Self-emp-not-inc Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.08711832 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -21 0.233333334 0.153831914 0.625 0 0 0.2020202 Private Some-college Never-married Sales Other-relative Black Female United-States 0 -49 0.544444442 0.304708362 0.625 0 0 0.6060606 Private Some-college Separated Exec-managerial Unmarried Black Female United-States 0 -51 0.566666663 0.227829769 0.9375 0.1502415 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.111226141 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.0734523 0.5625 0.031370312 0 0.454545468 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -27 0.3 0.130074322 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -56 0.622222245 0.2865869 0.75 0 0 0.2020202 ? Assoc-acdm Married-civ-spouse ? Husband White Male United-States 0 -48 0.533333361 0.129222974 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.200144142 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -29 0.322222233 0.122099675 0.8125 0 0 0.5050505 Local-gov Bachelors Divorced Prof-specialty Not-in-family White Male United-States 0 -50 0.5555556 0.0752338 0.875 0 0 0.5050505 Federal-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -18 0.2 0.0236174874 0.5625 0 0 0.353535354 Private HS-grad Never-married Transport-moving Not-in-family Black Male United-States 0 -37 0.411111116 0.201076314 0.5625 0 0.43663913 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -51 0.566666663 0.06427877 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -31 0.344444454 0.109220356 0.5625 0 0 0.474747479 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.11856699 0.6875 0.143441439 0 0.4040404 Private Assoc-voc Divorced Tech-support Not-in-family Black Male United-States 1 -39 0.433333337 0.21149455 0.375 0 0.4708448 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.133146316 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband Black Male United-States 1 -44 0.4888889 0.163346261 0.8125 0.07688077 0 0.5050505 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.1955412 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -22 0.244444445 0.0296786241 0.4375 0 0 0.353535354 Local-gov 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -27 0.3 0.117304787 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Wife White Female United-States 1 -42 0.466666669 0.252434 0.3125 0 0 0.4040404 Private 9th Divorced Craft-repair Not-in-family White Male United-States 0 -18 0.2 0.155964985 0.5625 0 0 0.333333343 Private HS-grad Never-married Sales Own-child White Female United-States 0 -27 0.3 0.25335 0.625 0 0 0.25252524 Private Some-college Married-spouse-absent Sales Not-in-family White Female United-States 0 -51 0.566666663 0.0673446953 0.375 0 0 0.4040404 Private 10th Separated Machine-op-inspct Unmarried Black Female United-States 0 -27 0.3 0.08090901 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -60 0.6666667 0.0227095615 0.4375 0 0 0.5050505 Self-emp-not-inc 11th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -36 0.4 0.08949859 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male Italy 0 -45 0.5 0.2051384 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male China 1 -40 0.444444448 0.06755012 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -63 0.7 0.07912212 0.625 0.04386044 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.1615358 0.5625 0 0 0.5050505 Private HS-grad Married-spouse-absent Transport-moving Unmarried Black Male United-States 0 -53 0.5888889 0.10455478 0.5 0 0 0.4040404 ? 12th Married-civ-spouse ? Wife White Female Italy 0 -34 0.377777785 0.08780802 0.5625 0.0115101151 0 0.4848485 Private HS-grad Divorced Transport-moving Unmarried White Female Germany 0 -34 0.377777785 0.233828276 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -31 0.344444454 0.3386208 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -22 0.244444445 0.172138572 0.75 0 0 0.151515156 State-gov Assoc-acdm Never-married Prof-specialty Not-in-family White Female United-States 0 -49 0.544444442 0.187206224 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -43 0.477777779 0.144500762 0.5625 0 0 0.353535354 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -36 0.4 0.09639828 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -27 0.3 0.0465627871 0.8125 0 0 0.373737365 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -52 0.5777778 0.02355552 0.5625 0 0.4331956 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -29 0.322222233 0.159622282 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband Black Male United-States 0 -27 0.3 0.3315561 0.375 0 0 0.353535354 Private 10th Separated Machine-op-inspct Own-child White Male Mexico 0 -42 0.466666669 0.121249005 0.5625 0 0 0.656565666 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -49 0.544444442 0.0317140445 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Widowed Sales Unmarried White Female United-States 0 -24 0.266666681 0.150099188 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Unmarried White Male United-States 0 -22 0.244444445 0.2318144 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Unmarried White Male United-States 0 -30 0.333333343 0.150340974 0.8125 0 0 0.4040404 Self-emp-not-inc Bachelors Never-married Sales Unmarried White Male United-States 0 -28 0.311111122 0.07474953 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -20 0.222222224 0.109575979 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Own-child White Male United-States 0 -45 0.5 0.122116514 0.9375 0.1502415 0 0.434343427 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.100291304 0.5625 0.0468704663 0 0.5050505 Private HS-grad Divorced Sales Not-in-family White Female United-States 1 -43 0.477777779 0.2063979 0.9375 0 0 0.6666667 Private Prof-school Never-married Prof-specialty Not-in-family White Male France 0 -18 0.2 0.1416517 0.5625 0 0 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 -53 0.5888889 0.0856176838 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -74 0.822222233 0.03686389 0.625 0 0 0.2020202 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.182878762 0.8125 0 0 0.4848485 Private Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 -33 0.366666675 0.146095023 0.375 0 0 0.4040404 ? 10th Never-married ? Other-relative White Male United-States 0 -49 0.544444442 0.366350234 0.5625 0 0 0.424242437 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -21 0.233333334 0.51600486 0.375 0 0 0.353535354 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -65 0.722222269 0.0355141275 0.625 0 0 0.4040404 ? Some-college Married-civ-spouse ? Husband White Male United-States 0 -39 0.433333337 0.1913956 0.5625 0 0.359045 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 1 -49 0.544444442 0.0823099539 0.6875 0 0 0.25252524 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -20 0.222222224 0.0646519 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -47 0.5222222 0.224986792 0.8125 0.07298073 0 0.444444448 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.151852384 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.0760063455 0.6875 0.07298073 0 0.323232323 Private Assoc-voc Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 1 -61 0.677777767 0.115740165 0.5625 0 0 0.161616161 Self-emp-not-inc HS-grad Widowed Prof-specialty Unmarried White Female United-States 0 -48 0.533333361 0.121704318 0.625 0 0 0.3838384 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -44 0.4888889 0.08150575 0.3125 0 0 0.4040404 Private 9th Divorced Craft-repair Not-in-family White Male United-States 0 -37 0.411111116 0.08524859 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.1534251 0.625 0 0.399449021 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -51 0.566666663 0.195520326 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -33 0.366666675 0.169408068 0.8125 0 0 0.5050505 Local-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -55 0.6111111 0.02824669 0.8125 0 0 0.08080808 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -25 0.2777778 0.0186420884 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -26 0.2888889 0.09008928 0.5625 0 0 0.4040404 Private HS-grad Divorced Farming-fishing Not-in-family Asian-Pac-Islander Male Philippines 0 -54 0.6 0.145476714 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.310726374 0.5625 0 0 0.333333343 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -39 0.433333337 0.232271731 0.875 0 0.453856736 0.2020202 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -20 0.222222224 0.144501433 0.625 0 0 0.4040404 State-gov Some-college Never-married Prof-specialty Own-child White Male United-States 0 -30 0.333333343 0.1738864 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.163094357 0.5625 0 0 0.454545468 Federal-gov HS-grad Divorced Adm-clerical Not-in-family Other Male United-States 0 -42 0.466666669 0.158752084 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Female United-States 0 -24 0.266666681 0.187330142 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 -36 0.4 0.175954819 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -60 0.6666667 0.0579205975 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male South 1 -42 0.466666669 0.2295978 0.5625 0 0 0.444444448 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 0 -42 0.466666669 0.102976017 0.375 0 0 0.454545468 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.131354719 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Machine-op-inspct Not-in-family White Female Columbia 0 -52 0.5777778 0.07381938 0.875 0.04787048 0 0.444444448 State-gov Masters Married-spouse-absent Exec-managerial Unmarried White Female United-States 1 -27 0.3 0.168021932 0.6875 0 0 0.2020202 ? Assoc-voc Married-civ-spouse ? Husband White Male United-States 0 -43 0.477777779 0.106537662 0.625 0 0 0.353535354 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -43 0.477777779 0.03220707 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -27 0.3 0.2636672 0.4375 0 0 0.4040404 Private 11th Divorced Craft-repair Own-child White Male United-States 0 -52 0.5777778 0.134703532 0.875 0.07298073 0 0.6060606 Local-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -31 0.344444454 0.155615434 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 0 -38 0.422222227 0.189780459 0.25 0 0 0.3030303 ? 7th-8th Divorced ? Unmarried Black Female United-States 0 -44 0.4888889 0.1803658 0.3125 0 0 0.4040404 Private 9th Never-married Other-service Unmarried Black Female United-States 0 -27 0.3 0.146412253 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Own-child White Female United-States 0 -50 0.5555556 0.283935875 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Male United-States 0 -23 0.25555557 0.0343186036 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -22 0.244444445 0.09328722 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Unmarried Black Female United-States 0 -36 0.4 0.119258709 0.625 0 0 0.4040404 State-gov Some-college Never-married Exec-managerial Unmarried White Female United-States 0 -24 0.266666681 0.06941716 0.8125 0.0367403664 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -59 0.655555546 0.1242624 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.0701075345 0.6875 0 0 0.5050505 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -23 0.25555557 0.100494042 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -37 0.411111116 0.272972763 0.8125 0 0.307621658 0.424242437 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -25 0.2777778 0.09247359 0.75 0 0 0.3838384 Local-gov Assoc-acdm Never-married Adm-clerical Own-child Black Female United-States 0 -40 0.444444448 0.0591167957 0.5625 0 0.373737365 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Wife White Female United-States 0 -38 0.422222227 0.0845279 0.8125 0.07688077 0 0.6060606 State-gov Bachelors Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -31 0.344444454 0.0397944376 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -28 0.311111122 0.09317137 1 0 0 0.4040404 Local-gov Doctorate Divorced Prof-specialty Not-in-family White Female United-States 0 -24 0.266666681 0.133975446 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Unmarried Black Male United-States 0 -46 0.51111114 0.160410315 0.75 0 0.4331956 0.5050505 Local-gov Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 1 -29 0.322222233 0.0833007246 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife Asian-Pac-Islander Female Laos 0 -38 0.422222227 0.219261065 0.9375 0 0 0.5050505 Federal-gov Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.169099584 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Unmarried Black Female United-States 0 -33 0.366666675 0.0346674919 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Tech-support Wife White Female United-States 1 -39 0.433333337 0.118327215 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Prof-specialty Husband Black Male ? 0 -44 0.4888889 0.111536637 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -46 0.51111114 0.1007877 0.8125 0 0 0.454545468 Private Bachelors Divorced Prof-specialty Not-in-family White Male England 1 -30 0.333333343 0.09666971 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Own-child White Male United-States 0 -24 0.266666681 0.142223537 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.231014922 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Female United-States 0 -62 0.6888889 0.116946466 0.625 0 0 0.7070707 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -25 0.2777778 0.09555838 0.5625 0 0 0.454545468 Private HS-grad Married-spouse-absent Exec-managerial Not-in-family White Male United-States 0 -45 0.5 0.09268104 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -21 0.233333334 0.08704221 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Own-child White Male United-States 0 -64 0.7111111 0.182898283 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -39 0.433333337 0.307752728 0.8125 0 0 0.4040404 Private Bachelors Divorced Tech-support Not-in-family White Male United-States 0 -60 0.6666667 0.156423 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.237210765 0.5625 0 0 0.4040404 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 -27 0.3 0.07743424 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -41 0.455555558 0.136041164 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Own-child White Male United-States 0 -32 0.355555564 0.10725835 0.875 0 0 0.5050505 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -24 0.266666681 0.08480136 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.125832409 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.08150575 0.625 0 0 0.454545468 Local-gov Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.0746572539 0.875 0 0 0.272727281 Private Masters Widowed Sales Not-in-family White Female United-States 0 -23 0.25555557 0.0963174552 0.875 0 0.4331956 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male India 1 -31 0.344444454 0.0402315632 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Farming-fishing Husband Amer-Indian-Eskimo Male United-States 0 -28 0.311111122 0.1202185 0.8125 0 0 0.454545468 Private Bachelors Never-married Exec-managerial Unmarried Black Female ? 0 -41 0.455555558 0.169816226 0.625 0 0 0.2020202 ? Some-college Widowed ? Unmarried Black Female United-States 0 -37 0.411111116 0.07384161 0.8125 0 0 0.161616161 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -19 0.211111113 0.108311757 0.5625 0 0 0.3838384 Private HS-grad Never-married Sales Own-child White Male United-States 0 -27 0.3 0.245914176 0.8125 0 0 0.2020202 Self-emp-not-inc Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -61 0.677777767 0.07616328 0.3125 0 0 0.5858586 Self-emp-not-inc 9th Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.138797939 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -25 0.2777778 0.116563223 0.8125 0 0 0.4040404 Private Bachelors Never-married Handlers-cleaners Unmarried Black Male United-States 0 -58 0.644444466 0.07898741 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.103592969 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Transport-moving Other-relative Other Male Ecuador 1 -51 0.566666663 0.197885782 0.1875 0 0 0.5252525 Private 5th-6th Married-civ-spouse Handlers-cleaners Husband Black Male United-States 0 -43 0.477777779 0.103139684 0.875 0.1502415 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -46 0.51111114 0.112351611 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -67 0.7444445 0.022982344 0.1875 0 0 0.4040404 ? 5th-6th Married-civ-spouse ? Husband White Male United-States 0 -50 0.5555556 0.156074777 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -20 0.222222224 0.0425741151 0.5625 0 0 0.151515156 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -35 0.3888889 0.07293907 0.8125 0 0 0.323232323 Private Bachelors Widowed Prof-specialty Unmarried White Female United-States 1 -57 0.6333333 0.07872137 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Husband White Male Italy 0 -40 0.444444448 0.0745077357 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Adm-clerical Other-relative Asian-Pac-Islander Female Philippines 0 -42 0.466666669 0.121450394 0.375 0 0 0.353535354 Local-gov 10th Never-married Farming-fishing Unmarried White Male United-States 0 -67 0.7444445 0.0756500438 0.375 0 0 0.4040404 Self-emp-inc 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.1697839 0.8125 0.07688077 0 0.444444448 Private Bachelors Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -30 0.333333343 0.018288482 0.5625 0 0 0.5050505 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -26 0.2888889 0.04937816 0.4375 0 0 0.151515156 Private 11th Never-married Machine-op-inspct Unmarried White Female United-States 0 -51 0.566666663 0.09793798 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -38 0.422222227 0.113074318 0.625 0 0 0.454545468 Private Some-college Widowed Other-service Other-relative Black Female Haiti 0 -24 0.266666681 0.159422919 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Handlers-cleaners Own-child White Male United-States 0 -48 0.533333361 0.0193917323 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -34 0.377777785 0.0798481852 0.8125 0.05178052 0 0.25252524 State-gov Bachelors Married-civ-spouse Tech-support Own-child White Female ? 1 -70 0.7777778 0.126147628 0.8125 0.06418064 0 0.4040404 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -35 0.3888889 0.127919018 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -61 0.677777767 0.3935186 0.875 0 0 0.02020202 ? Masters Married-civ-spouse ? Husband White Male United-States 1 -26 0.2888889 0.117189616 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -64 0.7111111 0.17091544 0.5625 0 0 0.0303030312 Private HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -26 0.2888889 0.074926 0.5625 0 0 0.353535354 Private HS-grad Never-married Adm-clerical Unmarried White Female United-States 0 -39 0.433333337 0.0995820761 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -55 0.6111111 0.1151845 0.625 0 0 0.363636374 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.07949256 0.625 0 0 0.454545468 Private Some-college Never-married Exec-managerial Not-in-family White Male ? 0 -33 0.366666675 0.2434807 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -31 0.344444454 0.09246955 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.2706841 0.5625 0 0 0.2020202 Local-gov HS-grad Never-married Adm-clerical Other-relative White Male United-States 0 -50 0.5555556 0.1359745 0.875 0 0 0.3030303 Private Masters Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -26 0.2888889 0.0207401477 0.8125 0 0 0.5555556 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -44 0.4888889 0.0937297344 0.75 0 0.3996786 0.4040404 Federal-gov Assoc-acdm Divorced Adm-clerical Not-in-family Black Female United-States 0 -51 0.566666663 0.141937956 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Craft-repair Not-in-family White Male United-States 0 -34 0.377777785 0.113006286 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -37 0.411111116 0.0700381547 0.8125 0.07688077 0 0.3939394 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.0973877 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.332075417 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Black Male United-States 0 -27 0.3 0.123982884 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -44 0.4888889 0.129193351 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.2221667 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -54 0.6 0.150642723 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -47 0.5222222 0.1192742 0.625 0 0 0.5050505 Private Some-college Separated Adm-clerical Unmarried White Female United-States 1 -30 0.333333343 0.09683136 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -35 0.3888889 0.1577896 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.212043479 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -42 0.466666669 0.131732568 0.75 0 0 0.4040404 Private Assoc-acdm Separated Adm-clerical Unmarried Black Female United-States 0 -70 0.7777778 0.140053421 0.8125 0 0.5456841 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.08543785 0.9375 0 0 0.4040404 Private Prof-school Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 0 -36 0.4 0.1882428 0.5625 0 0 0.3838384 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -44 0.4888889 0.180316627 0.875 0 0 0.424242437 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.118498288 0.5625 0 0 0.4040404 ? HS-grad Separated ? Unmarried White Male United-States 0 -20 0.222222224 0.110234022 0.625 0 0 0.171717167 Private Some-college Never-married Transport-moving Own-child White Female United-States 0 -29 0.322222233 0.135022119 0.375 0 0 0.4040404 Private 10th Never-married Prof-specialty Not-in-family White Male United-States 0 -27 0.3 0.06162908 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Tech-support Wife White Female United-States 0 -30 0.333333343 0.123102568 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male United-States 1 -59 0.655555546 0.0379819572 0.625 0 0.3624885 0.6060606 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -31 0.344444454 0.0138148656 0.8125 0 0 0.25252524 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -21 0.233333334 0.3629152 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Male Mexico 0 -26 0.2888889 0.223618835 0.625 0 0 0.373737365 Private Some-college Never-married Craft-repair Unmarried Asian-Pac-Islander Male Taiwan 0 -57 0.6333333 0.148709 0.5625 0 0 0.454545468 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -59 0.655555546 0.07729482 0.625 0 0 0.2020202 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -87 0.9666667 0.06084576 0.5625 0 0 0.02020202 ? HS-grad Widowed ? Not-in-family White Male United-States 0 -25 0.2777778 0.1222977 0.625 0 0 0.5555556 Private Some-college Never-married Transport-moving Not-in-family White Male United-States 0 -39 0.433333337 0.133926272 0.875 0.07688077 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -53 0.5888889 0.0358300135 0.875 0.03103031 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.365234166 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.130009666 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.0171784963 0.6875 0 0 0.353535354 Private Assoc-voc Never-married Adm-clerical Unmarried Black Female United-States 0 -17 0.188888893 0.253017932 0.4375 0 0 0.3030303 Private 11th Never-married Handlers-cleaners Own-child White Male United-States 0 -44 0.4888889 0.135783881 0.4375 0 0 0.4040404 Private 11th Never-married Machine-op-inspct Unmarried Black Female United-States 0 -23 0.25555557 0.122462042 0.625 0 0 0.2020202 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -57 0.6333333 0.2251114 0.625 0.09386094 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Wife White Female United-States 1 -30 0.333333343 0.0365850478 0.4375 0 0 0.4040404 State-gov 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -51 0.566666663 0.09522969 0.5625 0 0 0.5555556 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -54 0.6 0.03845949 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.113500662 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female Germany 0 -60 0.6666667 0.110234022 0.625 0 0 0.161616161 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -28 0.311111122 0.139767155 0.8125 0.07298073 0 0.424242437 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -39 0.433333337 0.197541609 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -55 0.6111111 0.0472066849 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.1342664 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -55 0.6111111 0.0969546139 0.875 0.03103031 0 0.454545468 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -33 0.366666675 0.139557019 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -30 0.333333343 0.289810449 0.5625 0.07298073 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Wife White Female United-States 1 -40 0.444444448 0.19789049 0.8125 0 0 0.2020202 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -30 0.333333343 0.2546021 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -40 0.444444448 0.1526283 0.625 0 0 0.3030303 Private Some-college Divorced Tech-support Not-in-family White Male Guatemala 1 -24 0.266666681 0.211612418 0.5625 0 0 0.5050505 Private HS-grad Never-married Transport-moving Not-in-family White Female United-States 0 -18 0.2 0.114867263 0.4375 0 0 0.2020202 Private 11th Never-married Sales Own-child White Male United-States 0 -18 0.2 0.06344426 0.5625 0 0 0.25252524 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -49 0.544444442 0.1300238 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.0758447 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.09897522 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -32 0.355555564 0.208467677 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -48 0.533333361 0.128907084 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Separated Sales Unmarried White Female United-States 0 -24 0.266666681 0.144070372 0.25 0 0 0.323232323 Private 7th-8th Never-married Priv-house-serv Own-child White Female El-Salvador 0 -73 0.811111152 0.0313287824 0.5625 0 0 0.25252524 Self-emp-not-inc HS-grad Married-civ-spouse Sales Wife White Female United-States 0 -35 0.3888889 0.05109096 0.875 0.07298073 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Black Male ? 1 -23 0.25555557 0.0260705 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -19 0.211111113 0.127007052 0.625 0 0 0.4040404 Private Some-college Never-married Priv-house-serv Not-in-family White Female United-States 0 -27 0.3 0.144819349 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Sales Husband White Male Mexico 0 -27 0.3 0.124251619 0.5 0 0 0.4040404 Private 12th Never-married Other-service Not-in-family White Male United-States 0 -41 0.455555558 0.13755931 0.9375 0 0 0.5050505 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.0263042152 0.5625 0 0 0.2020202 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -64 0.7111111 0.18355903 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -45 0.5 0.241597489 0.5 0 0 0.1010101 Private 12th Never-married Other-service Own-child White Male Mexico 0 -47 0.5222222 0.146662131 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -22 0.244444445 0.1349588 0.5625 0 0 0.353535354 Private HS-grad Never-married Machine-op-inspct Other-relative White Male United-States 0 -24 0.266666681 0.335655242 0.8125 0 0 0.4040404 Private Bachelors Never-married Transport-moving Unmarried Black Female United-States 0 -69 0.7666667 0.114809342 0.5625 0 0 0.2020202 State-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -40 0.444444448 0.0385484 0.6875 0 0 0.4040404 Self-emp-not-inc Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -45 0.5 0.126915455 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -47 0.5222222 0.0224286988 0.75 0.105201051 0 0.454545468 Self-emp-not-inc Assoc-acdm Never-married Farming-fishing Other-relative White Male United-States 1 -31 0.344444454 0.152069941 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -48 0.533333361 0.03143857 0.75 0 0 0.424242437 Private Assoc-acdm Divorced Exec-managerial Unmarried White Female United-States 0 -41 0.455555558 0.1535443 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Prof-specialty Wife Black Female Haiti 1 -34 0.377777785 0.0574895367 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Own-child White Male United-States 0 -48 0.533333361 0.139502466 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -28 0.311111122 0.15438959 0.6875 0.07688077 0 0.363636374 Local-gov Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -20 0.222222224 0.151302785 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Exec-managerial Own-child White Female United-States 0 -39 0.433333337 0.0936293751 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 -40 0.444444448 0.08806396 0.625 0 0 0.4040404 Federal-gov Some-college Divorced Exec-managerial Not-in-family Black Female United-States 0 -28 0.311111122 0.137748584 0.375 0 0 0.454545468 Private 10th Never-married Transport-moving Not-in-family White Male United-States 0 -20 0.222222224 0.0710437447 0.625 0 0 0.25252524 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -41 0.455555558 0.132748932 0.8125 0 0 0.4040404 Private Bachelors Divorced Prof-specialty Not-in-family Black Male United-States 0 -49 0.544444442 0.290458381 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.104498878 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -35 0.3888889 0.145507023 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -22 0.244444445 0.261497736 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Male United-States 0 -23 0.25555557 0.140706748 0.8125 0 0 0.3030303 Private Bachelors Never-married Other-service Not-in-family White Female United-States 0 -23 0.25555557 0.174648166 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Unmarried White Female United-States 0 -42 0.466666669 0.0466981679 0.6875 0.04386044 0 0.8080808 Self-emp-not-inc Assoc-voc Married-civ-spouse Transport-moving Husband White Male United-States 1 -34 0.377777785 0.113081723 0.625 0 0 0.646464646 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.260575 0.6875 0.046500463 0 0.4040404 Federal-gov Assoc-voc Never-married Tech-support Own-child Black Male United-States 0 -54 0.6 0.0987071544 0.5625 0 0 0.545454562 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -48 0.533333361 0.16054368 0.8125 0 0 0.4040404 Private Bachelors Separated Adm-clerical Unmarried Asian-Pac-Islander Female Philippines 0 -38 0.422222227 0.126454756 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.03418053 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Adm-clerical Unmarried White Female United-States 0 -22 0.244444445 0.033768326 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Other-service Husband White Male El-Salvador 0 -42 0.466666669 0.0750876442 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -31 0.344444454 0.201299921 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male China 0 -27 0.3 0.0992385745 0.5625 0 0 0.5050505 Private HS-grad Never-married Other-service Not-in-family White Female United-States 1 -57 0.6333333 0.08938072 0.875 0.105201051 0 0.323232323 Private Masters Separated Prof-specialty Not-in-family White Male United-States 1 -46 0.51111114 0.220775172 0.6875 0.0332503319 0 0.424242437 State-gov Assoc-voc Divorced Tech-support Not-in-family White Female United-States 0 -44 0.4888889 0.16409725 0.6875 0 0 0.4040404 Federal-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -42 0.466666669 0.130946562 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -24 0.266666681 0.159422919 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -38 0.422222227 0.227068678 0.125 0 0 0.4040404 Private 1st-4th Married-spouse-absent Craft-repair Not-in-family White Male Mexico 0 -29 0.322222233 0.183909267 0.8125 0 0 0.5252525 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Yugoslavia 1 -38 0.422222227 0.125406057 0.5625 0 0 0.5555556 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.180811 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Unmarried White Female United-States 0 -61 0.677777767 0.104128435 0.5625 0 0 0.04040404 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -49 0.544444442 0.2729896 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.06680452 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -42 0.466666669 0.129160345 0.5625 0 0 0.353535354 Private HS-grad Divorced Other-service Other-relative Black Female United-States 0 -21 0.233333334 0.1707969 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Male United-States 0 -29 0.322222233 0.200076118 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Not-in-family White Male United-States 0 -54 0.6 0.137668431 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -23 0.25555557 0.194497228 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -52 0.5777778 0.117186248 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -28 0.311111122 0.0226725172 0.875 0.07298073 0 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -23 0.25555557 0.0617348254 0.625 0 0 0.4040404 Private Some-college Divorced Handlers-cleaners Own-child White Male United-States 0 -43 0.477777779 0.152826324 0.5625 0 0 0.8080808 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.156654686 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -51 0.566666663 0.196507052 0.25 0 0 0.424242437 Self-emp-not-inc 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -29 0.322222233 0.139443189 0.5625 0 0 0.424242437 ? HS-grad Married-spouse-absent ? Unmarried Black Female Haiti 0 -23 0.25555557 0.108761005 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child Asian-Pac-Islander Female United-States 0 -73 0.811111152 0.0739763156 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -47 0.5222222 0.154504776 0.4375 0 0 0.5555556 Self-emp-not-inc 11th Divorced Exec-managerial Unmarried White Female United-States 0 -61 0.677777767 0.0466658361 0.5625 0 0 0.373737365 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -26 0.2888889 0.331286 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Exec-managerial Not-in-family Black Female United-States 0 -40 0.444444448 0.2098289 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -32 0.355555564 0.2834873 0.8125 0 0 0.474747479 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -39 0.433333337 0.1524707 0.375 0 0 0.4040404 Private 10th Divorced Other-service Unmarried Black Female United-States 0 -33 0.366666675 0.06825935 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -35 0.3888889 0.0328543372 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -42 0.466666669 0.102832548 0.5625 0 0 0.4040404 Private HS-grad Divorced Exec-managerial Own-child White Male United-States 0 -46 0.51111114 0.111050345 0.625 0 0 0.444444448 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -33 0.366666675 0.06568376 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -47 0.5222222 0.05965091 0.1875 0 0 0.2020202 Private 5th-6th Never-married Machine-op-inspct Own-child White Male United-States 0 -33 0.366666675 0.126790166 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -26 0.2888889 0.127422616 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Own-child White Female United-States 0 -42 0.466666669 0.109832592 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -28 0.311111122 0.169666708 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -29 0.322222233 0.075707294 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male ? 0 -18 0.2 0.0248413 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 -33 0.366666675 0.131939352 0.625 0 0 0.454545468 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -36 0.4 0.131275237 0.8125 0 0 0.444444448 Private Bachelors Widowed Prof-specialty Unmarried White Female United-States 0 -33 0.366666675 0.0899188742 0.5625 0.07688077 0 0.4848485 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -40 0.444444448 0.0212978348 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Unmarried White Female United-States 0 -57 0.6333333 0.278420985 1 0 0.43663913 0.4040404 Self-emp-not-inc Doctorate Married-civ-spouse Sales Husband White Male United-States 1 -40 0.444444448 0.13203229 0.5625 0 0 0.454545468 Private HS-grad Divorced Transport-moving Unmarried White Male United-States 0 -36 0.4 0.0722716 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Tech-support Husband White Male United-States 0 -45 0.5 0.101883538 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family Black Female United-States 1 -52 0.5777778 0.173004746 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -24 0.266666681 0.055753164 0.5625 0 0 0.4040404 Private HS-grad Separated Machine-op-inspct Not-in-family White Male United-States 0 -30 0.333333343 0.09929919 0.5625 0 0 0.4040404 Private HS-grad Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.0409010537 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child Black Male United-States 0 -46 0.51111114 0.111641034 1 0 0 0.454545468 Self-emp-not-inc Doctorate Never-married Prof-specialty Not-in-family White Female United-States 0 -36 0.4 0.301970422 0.5625 0 0 0.4040404 Private HS-grad Separated Sales Unmarried Black Female United-States 0 -48 0.533333361 0.124657087 0.5625 0 0 0.5050505 Private HS-grad Never-married Exec-managerial Not-in-family White Female United-States 0 -36 0.4 0.282010227 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -48 0.533333361 0.0279543754 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -21 0.233333334 0.26088348 0.625 0 0.3946281 0.09090909 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -18 0.2 0.176277444 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -38 0.422222227 0.0902287 0.8125 0 0 0.5050505 Private Bachelors Divorced Prof-specialty Not-in-family White Female United-States 1 -66 0.733333349 0.240956962 0.4375 0 0 0.4040404 ? 11th Widowed ? Not-in-family Black Female United-States 0 -36 0.4 0.120891355 0.8125 0.07298073 0 0.5555556 State-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -38 0.422222227 0.0405029953 0.5625 0 0 0.4040404 Private HS-grad Never-married Transport-moving Not-in-family White Female United-States 0 -55 0.6111111 0.207951084 0.9375 0 0 0.5555556 Self-emp-not-inc Prof-school Widowed Prof-specialty Not-in-family White Male United-States 1 -27 0.3 0.187727526 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.321616083 0.75 0 0 0.4040404 State-gov Assoc-acdm Never-married Adm-clerical Not-in-family White Male United-States 0 -29 0.322222233 0.110938542 0.625 0 0 0.4040404 Private Some-college Never-married Handlers-cleaners Other-relative White Male United-States 0 -40 0.444444448 0.140281737 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Unmarried White Female United-States 0 -21 0.233333334 0.0269029886 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -49 0.544444442 0.07041264 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -29 0.322222233 0.19305788 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 1 -28 0.311111122 0.09612145 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 1 -26 0.2888889 0.2265797 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -33 0.366666675 0.07946562 0.5625 0 0 0.414141417 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -72 0.8 0.07327786 0.9375 0 0 0.4040404 ? Prof-school Married-civ-spouse ? Husband White Male United-States 1 -59 0.655555546 0.0400544219 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Tech-support Husband White Male Iran 0 -37 0.411111116 0.115826376 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Adm-clerical Husband White Male United-States 0 -56 0.622222245 0.0803216845 0.375 0 0 0.4040404 ? 10th Divorced ? Not-in-family White Female United-States 0 -27 0.3 0.187658161 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -39 0.433333337 0.0487221368 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Philippines 1 -49 0.544444442 0.231177911 0.875 0 0 0.8080808 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -30 0.333333343 0.0430455878 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Own-child Asian-Pac-Islander Female United-States 0 -28 0.311111122 0.1282073 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Protective-serv Wife Black Female United-States 0 -25 0.2777778 0.118651181 0.8125 0 0 0.4040404 State-gov Bachelors Never-married Protective-serv Own-child White Male United-States 0 -18 0.2 0.0254057217 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Own-child White Male United-States 0 -25 0.2777778 0.283872545 0.75 0 0 0.262626261 Private Assoc-acdm Never-married Handlers-cleaners Own-child White Male United-States 0 -36 0.4 0.09324479 0.625 0 0 0.4040404 Private Some-college Never-married Machine-op-inspct Own-child White Male United-States 0 -52 0.5777778 0.0988526344 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -20 0.222222224 0.248990878 0.5 0 0.3677686 0.4040404 ? 12th Never-married ? Not-in-family Other Male United-States 0 -25 0.2777778 0.10806524 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -26 0.2888889 0.142583877 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -50 0.5555556 0.06893356 0.8125 0 0.5544077 0.2020202 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -48 0.533333361 0.08674855 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.07484921 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -30 0.333333343 0.0300167371 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -26 0.2888889 0.07981182 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.225156516 0.625 0 0.4331956 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -49 0.544444442 0.160247326 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Sales Husband White Male United-States 0 -34 0.377777785 0.09182363 0.8125 0 0 0.6060606 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -28 0.311111122 0.126218349 0.5625 0 0 0.4848485 Private HS-grad Never-married Other-service Other-relative Other Male Mexico 0 -28 0.311111122 0.080684714 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Never-married Other-service Not-in-family White Male United-States 0 -42 0.466666669 0.0168262385 0.625 0.07688077 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.156067371 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -54 0.6 0.1544226 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 1 -66 0.733333349 0.04594785 0.3125 0 0 0.4040404 ? 9th Married-civ-spouse ? Husband White Male United-States 0 -61 0.677777767 0.181066945 0.5625 0 0 0.535353541 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -45 0.5 0.1007877 0.9375 0 0 0.3030303 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 1 -29 0.322222233 0.176280811 0.8125 0 0 0.353535354 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -74 0.822222233 0.108699709 0.5625 0 0 0.161616161 Private HS-grad Divorced Handlers-cleaners Not-in-family White Female United-States 0 -61 0.677777767 0.175231442 0.5625 0 0 0.4040404 Local-gov HS-grad Widowed Prof-specialty Not-in-family White Female United-States 0 -27 0.3 0.135331944 0.625 0 0 0.222222224 Private Some-college Never-married Sales Own-child White Male United-States 0 -53 0.5888889 0.104797922 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -57 0.6333333 0.05357226 0.5625 0 0 0.4040404 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband Asian-Pac-Islander Male United-States 0 -41 0.455555558 0.316193461 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.22326456 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -43 0.477777779 0.151675254 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -26 0.2888889 0.249697417 0.8125 0 0.453856736 0.4040404 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 -29 0.322222233 0.05549453 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Other-service Own-child Asian-Pac-Islander Male Philippines 0 -65 0.722222269 0.025035277 0.25 0 0 0.2020202 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -41 0.455555558 0.0393909924 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 -31 0.344444454 0.1053839 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Other-relative White Male ? 0 -50 0.5555556 0.232114121 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Female United-States 0 -52 0.5777778 0.1177015 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -18 0.2 0.117331058 0.5625 0 0 0.6060606 Self-emp-inc HS-grad Never-married Transport-moving Own-child White Male United-States 0 -26 0.2888889 0.175929233 0.25 0 0 0.3030303 Private 7th-8th Never-married Other-service Unmarried Other Female ? 0 -57 0.6333333 0.212836891 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -63 0.7 0.1460701 0.625 0 0.399449021 0.4040404 State-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -29 0.322222233 0.1663179 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Other-relative White Male Mexico 0 -32 0.355555564 0.07551332 0.8125 0.07688077 0 0.4040404 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -34 0.377777785 0.178251579 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -43 0.477777779 0.06680452 0.5625 0 0 0.5858586 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -39 0.433333337 0.118667349 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -28 0.311111122 0.06750096 0.5625 0 0 0.454545468 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -32 0.355555564 0.031448 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -28 0.311111122 0.200534791 0.9375 0 0 0.909090936 State-gov Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 -40 0.444444448 0.0890560746 0.625 0.04386044 0 0.5050505 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -25 0.2777778 0.127739862 0.8125 0 0 0.6060606 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 1 -54 0.6 0.1515008 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -48 0.533333361 0.100503467 0.8125 0 0 0.7070707 Self-emp-inc Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 1 -51 0.566666663 0.106760606 0.625 0 0 0.363636374 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -67 0.7444445 0.175929233 0.25 0 0 0.353535354 State-gov 7th-8th Married-civ-spouse Transport-moving Husband White Male United-States 0 -17 0.188888893 0.208461612 0.375 0 0 0.24242425 Private 10th Never-married Sales Unmarried White Female United-States 0 -24 0.266666681 0.218654215 0.625 0 0 0.4040404 State-gov Some-college Never-married Other-service Not-in-family White Male United-States 0 -25 0.2777778 0.180120632 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -68 0.75555557 0.154250175 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -54 0.6 0.0312526748 0.625 0 0 0.474747479 Private Some-college Divorced Other-service Not-in-family White Female United-States 0 -32 0.355555564 0.07697691 0.5625 0 0 0.4040404 Private HS-grad Divorced Prof-specialty Own-child White Female United-States 0 -61 0.677777767 0.137299329 0.625 0 0 0.4040404 ? Some-college Divorced ? Not-in-family White Female United-States 0 -41 0.455555558 0.1305862 0.5625 0 0 0.4040404 Federal-gov HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -53 0.5888889 0.209650412 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -45 0.5 0.105150186 0.6875 0 0 0.323232323 Private Assoc-voc Divorced Prof-specialty Not-in-family White Female United-States 0 -64 0.7111111 0.114444956 0.25 0 0 0.04040404 ? 7th-8th Widowed ? Not-in-family White Female United-States 0 -51 0.566666663 0.149938881 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -41 0.455555558 0.07200084 0.875 0.07298073 0 0.6060606 State-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -40 0.444444448 0.05255994 0.6875 0 0 0.656565666 Federal-gov Assoc-voc Married-civ-spouse Prof-specialty Wife White Female United-States 1 -27 0.3 0.2563203 0.5625 0 0 0.4040404 Private HS-grad Never-married Farming-fishing Other-relative White Male Mexico 0 -41 0.455555558 0.112551652 0.8125 0.03103031 0 0.353535354 Private Bachelors Married-civ-spouse Adm-clerical Husband Asian-Pac-Islander Male Philippines 1 -51 0.566666663 0.194945127 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.5049057 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.103805132 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -43 0.477777779 0.07080127 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -61 0.677777767 0.1219643 0.5625 0 0 0.2020202 Federal-gov HS-grad Divorced Adm-clerical Own-child Black Female United-States 0 -31 0.344444454 0.122742906 0.375 0 0 0.4040404 Private 10th Separated Transport-moving Unmarried White Male United-States 0 -34 0.377777785 0.068788074 0.5625 0 0 0.656565666 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -43 0.477777779 0.1793784 0.5625 0 0.43663913 1 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -52 0.5777778 0.114879392 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.162014008 0.4375 0 0 0.2020202 Private 11th Never-married Other-service Own-child White Female United-States 0 -37 0.411111116 0.125981927 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -60 0.6666667 0.262176 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 0 -47 0.5222222 0.121205896 0.625 0 0 0.25252524 Private Some-college Widowed Transport-moving Unmarried White Female Outlying-US(Guam-USVI-etc) 0 -21 0.233333334 0.133357808 0.625 0 0 0.3030303 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -34 0.377777785 0.231553748 0.8125 0.07688077 0 0.5555556 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.128704354 0.5625 0 0.3996786 0.5252525 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -40 0.444444448 0.09540549 0.6875 0 0 0.4040404 Local-gov Assoc-voc Married-civ-spouse Protective-serv Husband White Male United-States 1 -26 0.2888889 0.292250663 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Not-in-family White Male United-States 0 -48 0.533333361 0.140083045 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Unmarried Black Female United-States 0 -46 0.51111114 0.118491553 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -58 0.644444466 0.0577670336 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.1892834 0.5625 0 0 0.4040404 Self-emp-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -90 1 0.2114804 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -38 0.422222227 0.267120421 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male United-States 1 -20 0.222222224 0.127434745 0.75 0 0 0.2020202 ? Assoc-acdm Never-married ? Not-in-family White Male United-States 0 -43 0.477777779 0.109858863 0.625 0 0 1 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 0 -17 0.188888893 0.09536575 0.4375 0 0 0.121212125 Private 11th Never-married Priv-house-serv Own-child White Female United-States 0 -36 0.4 0.09255778 0.5 0 0 0.454545468 Private 12th Never-married Transport-moving Not-in-family Asian-Pac-Islander Male ? 0 -36 0.4 0.0456171446 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Italy 0 -30 0.333333343 0.232720986 0.5625 0.03103031 0 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 1 -45 0.5 0.222324982 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -51 0.566666663 0.137617916 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -29 0.322222233 0.033875417 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.09918334 0.6875 0 0 0.656565666 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Own-child White Male United-States 0 -19 0.211111113 0.130840808 0.625 0 0 0.2020202 Private Some-college Never-married Sales Own-child White Female United-States 0 -56 0.622222245 0.294824243 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Sales Husband White Male United-States 0 -64 0.7111111 0.0229675267 0.625 0 0 0.04040404 ? Some-college Widowed ? Not-in-family White Male United-States 0 -62 0.6888889 0.12568894 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Not-in-family White Male United-States 0 -24 0.266666681 0.189236253 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -33 0.366666675 0.022305442 0.75 0 0 0.4040404 Private Assoc-acdm Married-civ-spouse Protective-serv Husband White Male United-States 0 -43 0.477777779 0.11425031 0.8125 0 0 0.353535354 Private Bachelors Never-married Sales Unmarried Black Female United-States 1 -22 0.244444445 0.08415274 0.625 0 0 0.454545468 State-gov Some-college Never-married Other-service Own-child White Male United-States 0 -44 0.4888889 0.0965632945 0.625 0 0 0.5555556 Private Some-college Never-married Other-service Not-in-family Black Male United-States 0 -37 0.411111116 0.172169566 0.5625 0 0 0.5050505 Private HS-grad Separated Craft-repair Not-in-family White Male United-States 0 -34 0.377777785 0.1038772 0.625 0 0 0.75757575 Self-emp-inc Some-college Never-married Sales Not-in-family White Male United-States 0 -43 0.477777779 0.1154694 0.6875 0 0 0.454545468 Private Assoc-voc Separated Sales Unmarried White Female United-States 0 -39 0.433333337 0.128998026 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -30 0.333333343 0.253933966 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -58 0.644444466 0.129861489 0.25 0 0 0.333333343 Private 7th-8th Never-married Handlers-cleaners Not-in-family White Female United-States 0 -31 0.344444454 0.174526259 0.625 0 0 0.1010101 ? Some-college Married-civ-spouse ? Wife White Female United-States 0 -45 0.5 0.1577384 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -30 0.333333343 0.0994109958 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried Black Female United-States 0 -42 0.466666669 0.09917863 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 0 -50 0.5555556 0.118647814 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -25 0.2777778 0.118651181 0.6875 0 0 0.3030303 Local-gov Assoc-voc Never-married Protective-serv Own-child White Male United-States 0 -34 0.377777785 0.258738279 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -50 0.5555556 0.07251609 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -72 0.8 0.05565752 0.4375 0 0 0.4040404 ? 11th Married-civ-spouse ? Husband White Male United-States 0 -60 0.6666667 0.1116902 1 0 0 0.5555556 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -41 0.455555558 0.1935105 0.75 0.1502415 0 0.6060606 Private Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 1 -71 0.788888931 0.0530650876 0.25 0 0 0.1010101 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -40 0.444444448 0.0224354342 0.9375 0 0.5369605 0.353535354 Self-emp-not-inc Prof-school Divorced Other-service Not-in-family White Female United-States 0 -22 0.244444445 0.2353114 0.8125 0 0 0.3030303 Private Bachelors Never-married Exec-managerial Own-child White Female United-States 0 -52 0.5777778 0.0792574957 0.8125 0 0 0.3838384 Private Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -30 0.333333343 0.20939447 0.625 0 0 0.5555556 Private Some-college Never-married Handlers-cleaners Not-in-family White Male United-States 0 -36 0.4 0.126063436 0.5625 0 0 0.3030303 ? HS-grad Separated ? Not-in-family White Female United-States 0 -40 0.444444448 0.255888551 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.02348076 0.75 0 0 0.4040404 Federal-gov Assoc-acdm Married-civ-spouse Sales Husband Asian-Pac-Islander Male United-States 0 -44 0.4888889 0.1358674 0.8125 0.1502415 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -38 0.422222227 0.1087509 0.9375 0 0 0.4040404 Local-gov Prof-school Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -46 0.51111114 0.125553563 0.9375 0 0 0.5050505 Private Prof-school Never-married Exec-managerial Not-in-family White Male United-States 1 -57 0.6333333 0.0417726077 0.9375 0 0 0.5555556 Federal-gov Prof-school Divorced Exec-managerial Not-in-family Black Male United-States 1 -39 0.433333337 0.0283180848 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -42 0.466666669 0.114655778 0.8125 0 0 0.5555556 Private Bachelors Divorced Exec-managerial Not-in-family White Female United-States 1 -43 0.477777779 0.229916379 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.134320289 0.625 0 0 0.171717167 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -44 0.4888889 0.0600604154 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.100326329 0.625 0 0 0.151515156 ? Some-college Never-married ? Own-child Asian-Pac-Islander Female South 0 -37 0.411111116 0.09474812 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Wife White Female United-States 1 -20 0.222222224 0.0483516939 0.625 0 0 0.181818187 ? Some-college Never-married ? Own-child White Female United-States 0 -26 0.2888889 0.219594464 0.8125 0 0 0.8080808 State-gov Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -35 0.3888889 0.08709138 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -28 0.311111122 0.115219526 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Own-child White Female United-States 0 -34 0.377777785 0.096707426 0.625 0 0 0.353535354 Private Some-college Never-married Adm-clerical Not-in-family Asian-Pac-Islander Female Japan 0 -17 0.188888893 0.115484893 0.375 0 0 0.2020202 ? 10th Never-married ? Own-child White Female United-States 0 -18 0.2 0.173758432 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -25 0.2777778 0.123166561 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -44 0.4888889 0.0466981679 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -61 0.677777767 0.450164855 0.125 0 0 0.4040404 Private 1st-4th Widowed Handlers-cleaners Not-in-family White Female United-States 0 -39 0.433333337 0.08949859 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -61 0.677777767 0.122057244 0.8125 0 0.4242424 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.11181885 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -22 0.244444445 0.08117303 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Own-child White Female United-States 0 -19 0.211111113 0.123615131 0.625 0 0 0.25252524 Private Some-college Never-married Handlers-cleaners Own-child White Male United-States 0 -45 0.5 0.0332039036 0.8125 0 0 0.4040404 Private Bachelors Never-married Tech-support Own-child White Male United-States 0 -20 0.222222224 0.105968527 0.625 0 0 0.25252524 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -37 0.411111116 0.143951833 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family Asian-Pac-Islander Female Philippines 0 -26 0.2888889 0.0209758841 0.625 0 0 0.4040404 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -17 0.188888893 0.17254135 0.375 0 0 0.151515156 ? 10th Never-married ? Own-child White Female United-States 0 -26 0.2888889 0.124517664 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -58 0.644444466 0.136493117 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Unmarried White Female Dominican-Republic 0 -61 0.677777767 0.06843245 1 0 0 0.25252524 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 -64 0.7111111 0.0410451926 0.5625 0.0861408561 0 0.5050505 Private HS-grad Widowed Sales Not-in-family White Female France 1 -19 0.211111113 0.197069451 0.5625 0 0 0.25252524 Private HS-grad Married-civ-spouse Sales Other-relative White Female United-States 0 -36 0.4 0.09525125 0.8125 0 0 0.3030303 Private Bachelors Divorced Handlers-cleaners Not-in-family White Male United-States 0 -47 0.5222222 0.107353985 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Adm-clerical Not-in-family White Female United-States 0 -62 0.6888889 0.171437427 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -36 0.4 0.0602867231 0.9375 0 0 0.4040404 State-gov Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 -38 0.422222227 0.16096127 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Never-married Sales Not-in-family White Male United-States 0 -54 0.6 0.1205263 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -31 0.344444454 0.137907535 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -26 0.2888889 0.19546847 0.625 0 0 0.4040404 Private Some-college Separated Farming-fishing Own-child White Male United-States 0 -50 0.5555556 0.0691147447 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -41 0.455555558 0.1966485 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Unmarried Asian-Pac-Islander Female Philippines 0 -52 0.5777778 0.118096866 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -28 0.311111122 0.0609865263 0.5625 0 0 0.232323229 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 -23 0.25555557 0.302485019 0.5625 0 0 0.3030303 ? HS-grad Married-civ-spouse ? Own-child White Female United-States 0 -46 0.51111114 0.0685132742 0.625 0.031370312 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -32 0.355555564 0.6611603 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried Black Male United-States 0 -59 0.655555546 0.09967569 0.5625 0 0 0.353535354 ? HS-grad Widowed ? Not-in-family White Female United-States 0 -30 0.333333343 0.13771759 0.625 0 0 0.363636374 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.2097447 0.875 0.07688077 0 0.3030303 Local-gov Masters Married-civ-spouse Prof-specialty Husband Black Male United-States 1 -31 0.344444454 0.127989739 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative Black Female ? 0 -36 0.4 0.146840617 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -31 0.344444454 0.0522891767 0.0625 0 0 0.24242425 State-gov Preschool Never-married Other-service Not-in-family White Male United-States 0 -52 0.5777778 0.0289512072 0.9375 0 0 0.7070707 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -29 0.322222233 0.278369784 0.625 0.03411034 0 0.7070707 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Mexico 0 -48 0.533333361 0.147392914 0.875 0 0 0.5050505 Self-emp-not-inc Masters Married-civ-spouse Sales Husband White Male England 0 -30 0.333333343 0.22970961 0.875 0.1502415 0 0.6060606 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -58 0.644444466 0.1700129 0.4375 0 0 0.5050505 Private 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -20 0.222222224 0.234346226 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Protective-serv Own-child Black Male United-States 0 -19 0.211111113 0.160198838 0.625 0 0 0.0303030312 Private Some-college Never-married Other-service Own-child White Male United-States 0 -63 0.7 0.117751338 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -51 0.566666663 0.114558786 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Tech-support Husband White Male United-States 1 -53 0.5888889 0.316809058 0.75 0 0 0.4848485 Private Assoc-acdm Divorced Adm-clerical Unmarried White Female United-States 0 -54 0.6 0.0506733656 0.5625 0.05178052 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.0241489056 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Female United-States 0 -26 0.2888889 0.5027477 0.5625 0 0 0.4848485 Private HS-grad Never-married Handlers-cleaners Own-child Black Male United-States 0 -47 0.5222222 0.174107313 0.625 0 0 0.5252525 Self-emp-not-inc Some-college Married-civ-spouse Other-service Wife White Female United-States 0 -44 0.4888889 0.1185845 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -80 0.8888889 0.0180945043 0.25 0 0 0.2020202 Self-emp-not-inc 7th-8th Never-married Farming-fishing Unmarried White Male United-States 0 -55 0.6111111 0.07053523 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -43 0.477777779 0.233259141 0.875 0 0 0.454545468 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.27107203 0.8125 0 0 0.3030303 Private Bachelors Married-spouse-absent Transport-moving Unmarried White Male Columbia 0 -27 0.3 0.10310331 0.9375 0 0 0.4040404 Private Prof-school Never-married Prof-specialty Own-child Asian-Pac-Islander Male United-States 0 -42 0.466666669 0.1185845 0.6875 0.1502415 0 0.5555556 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.3038038 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -36 0.4 0.154598385 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -32 0.355555564 0.07168899 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -58 0.644444466 0.198229954 0.625 0 0 0.5555556 Local-gov Some-college Married-civ-spouse Adm-clerical Wife Black Female United-States 0 -63 0.7 0.0457350127 0.3125 0 0 0.4040404 Private 9th Separated Farming-fishing Not-in-family Black Male United-States 0 -49 0.544444442 0.09003068 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -36 0.4 0.169548839 0.625 0 0 0.6060606 Self-emp-inc Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -46 0.51111114 0.04909797 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -47 0.5222222 0.104845069 0.875 1 0 0.5555556 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -39 0.433333337 0.139098346 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Not-in-family White Male United-States 0 -33 0.366666675 0.0487221368 0.9375 0 0 0.656565666 Private Prof-school Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 -43 0.477777779 0.0233312342 0.5625 0 0.4331956 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband Other Male United-States 1 -30 0.333333343 0.159319863 0.625 0 0 0.686868668 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -39 0.433333337 0.0294348039 0.6875 0 0 0.373737365 Local-gov Assoc-voc Married-civ-spouse Adm-clerical Wife White Female United-States 0 -44 0.4888889 0.2258011 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -27 0.3 0.133492514 0.8125 0 0 0.454545468 Private Bachelors Never-married Tech-support Not-in-family White Male United-States 0 -80 0.8888889 0.189780459 0.75 0 0 0.04040404 ? Assoc-acdm Married-civ-spouse ? Husband White Male United-States 0 -31 0.344444454 0.1081656 0.75 0 0 0.0303030312 Private Assoc-acdm Never-married Prof-specialty Own-child White Male United-States 0 -34 0.377777785 0.1561428 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male El-Salvador 0 -28 0.311111122 0.126739651 0.75 0 0 0.6060606 Private Assoc-acdm Never-married Transport-moving Own-child White Male United-States 0 -55 0.6111111 0.0841918141 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -36 0.4 0.112149552 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 -42 0.466666669 0.271008044 0.625 0.07688077 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband Black Male United-States 1 -67 0.7444445 0.13748388 0.8125 0 0 0.1010101 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -53 0.5888889 0.148706988 0.625 0 0 0.6060606 Self-emp-inc Some-college Widowed Sales Not-in-family White Female United-States 0 -43 0.477777779 0.171176091 0.625 0 0.43663913 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -29 0.322222233 0.102687739 0.8125 0 0 0.424242437 Local-gov Bachelors Never-married Tech-support Not-in-family White Female United-States 0 -19 0.211111113 0.150648788 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Own-child White Male United-States 0 -51 0.566666663 0.08100599 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 1 -21 0.233333334 0.205159947 0.6875 0 0 0.989899 Self-emp-not-inc Assoc-voc Never-married Farming-fishing Own-child White Male United-States 0 -54 0.6 0.01623757 0.625 0 0 0.4040404 Private Some-college Separated Exec-managerial Not-in-family White Female United-States 0 -42 0.466666669 0.0219208542 0.9375 0.07430074 0 0.4040404 Self-emp-not-inc Prof-school Divorced Prof-specialty Unmarried White Male United-States 1 -41 0.455555558 0.06323478 0.625 0 0 0.4848485 Private Some-college Divorced Sales Unmarried White Female United-States 0 -28 0.311111122 0.141957492 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -31 0.344444454 0.128830984 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Handlers-cleaners Unmarried White Female United-States 0 -82 0.9111111 0.0481159575 0.5625 0 0 0.2020202 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -23 0.25555557 0.222650975 0.8125 0 0 0.161616161 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -40 0.444444448 0.09337478 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -35 0.3888889 0.07561368 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -24 0.266666681 0.138657182 0.5625 0 0 0.454545468 Private HS-grad Never-married Sales Unmarried White Male United-States 0 -21 0.233333334 0.151302785 0.625 0 0 0.4040404 Private Some-college Never-married Sales Own-child White Female United-States 0 -27 0.3 0.121746749 0.625 0 0 0.3030303 Private Some-college Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -29 0.322222233 0.336723477 0.6875 0 0 0.4040404 ? Assoc-voc Never-married ? Unmarried White Female United-States 0 -40 0.444444448 0.0725814253 0.8125 0 0 0.454545468 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -17 0.188888893 0.144666448 0.5 0 0 0.25252524 Private 12th Never-married Adm-clerical Own-child White Female United-States 0 -27 0.3 0.142137334 0.125 0 0 0.4040404 Private 1st-4th Never-married Craft-repair Not-in-family White Male Mexico 0 -34 0.377777785 0.140332937 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -18 0.2 0.105928786 0.375 0 0 0.151515156 Private 10th Never-married Other-service Other-relative Black Male United-States 0 -39 0.433333337 0.0511152074 0.8125 0 0 0.4040404 Private Bachelors Divorced Tech-support Unmarried White Female United-States 0 -34 0.377777785 0.119670242 0.625 0 0 0.656565666 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -44 0.4888889 0.122832485 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -18 0.2 0.1350605 0.4375 0 0 0.25252524 ? 11th Never-married ? Own-child White Female United-States 0 -39 0.433333337 0.117358 0.8125 0.1502415 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -28 0.311111122 0.064367 0.125 0 0 0.353535354 Private 1st-4th Married-spouse-absent Other-service Own-child Other Female Dominican-Republic 0 -30 0.333333343 0.02040136 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Not-in-family White Female United-States 0 -60 0.6666667 0.162288815 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Other-relative White Female United-States 0 -58 0.644444466 0.123802371 0.5625 0 0 0.24242425 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -49 0.544444442 0.06354259 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 0 -61 0.677777767 0.100071736 0.5625 0 0 0.5555556 Self-emp-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -27 0.3 0.06980107 0.5625 0 0 0.3838384 Private HS-grad Divorced Adm-clerical Not-in-family White Male United-States 0 -59 0.655555546 0.0562684163 0.75 0 0 0.4040404 Self-emp-not-inc Assoc-acdm Divorced Tech-support Not-in-family White Male United-States 0 -52 0.5777778 0.0512768552 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Exec-managerial Wife Asian-Pac-Islander Female United-States 1 -42 0.466666669 0.1767368 0.8125 0 0 0.4040404 Federal-gov Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -27 0.3 0.133552462 0.625 0 0 0.343434334 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -41 0.455555558 0.0979595259 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -35 0.3888889 0.184250742 0.625 0 0 0.3030303 ? Some-college Never-married ? Not-in-family Black Male United-States 0 -50 0.5555556 0.07913761 0.8125 0 0 0.24242425 Local-gov Bachelors Married-civ-spouse Prof-specialty Wife White Female United-States 0 -36 0.4 0.08680243 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.134503484 0.5625 0 0 0.454545468 Private HS-grad Never-married Farming-fishing Own-child White Male United-States 0 -38 0.422222227 0.04404242 0.75 0 0 0.454545468 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 0 -46 0.51111114 0.08664685 0.625 0 0 0.4040404 Private Some-college Divorced Prof-specialty Not-in-family White Female United-States 0 -59 0.655555546 0.0360213 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -55 0.6111111 0.0621099845 0.5625 0 0 0.454545468 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -49 0.544444442 0.0531142578 0.875 0 0.0741506 0.2020202 Local-gov Masters Widowed Prof-specialty Unmarried White Female United-States 0 -59 0.655555546 0.12628907 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -38 0.422222227 0.163049236 0.625 0 0 0.5555556 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -22 0.244444445 0.0281786621 0.625 0 0 0.25252524 Private Some-college Never-married Transport-moving Own-child White Male United-States 0 -28 0.311111122 0.196250439 0.5 0 0 0.4040404 Private 12th Never-married Sales Unmarried Black Female United-States 0 -47 0.5222222 0.100353271 0.8125 0 0.5544077 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -59 0.655555546 0.107097372 0.625 0 0 0.565656543 Private Some-college Married-civ-spouse Protective-serv Husband White Male United-States 0 -37 0.411111116 0.1825366 0.5625 0 0 0.4040404 Private HS-grad Divorced Handlers-cleaners Not-in-family White Male United-States 0 -33 0.366666675 0.134064347 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Female United-States 0 -34 0.377777785 0.110648245 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband White Male Portugal 0 -35 0.3888889 0.07877659 0.875 0 0.4331956 0.4040404 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.067389816 0.375 0 0 0.4040404 Private 10th Never-married Other-service Not-in-family White Male United-States 0 -18 0.2 0.123811804 0.5 0 0 0.3030303 Private 12th Never-married Other-service Own-child White Male United-States 0 -48 0.533333361 0.211439312 0.75 0 0 0.3030303 Private Assoc-acdm Married-civ-spouse Prof-specialty Wife White Female United-States 1 -48 0.533333361 0.2558643 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male Cuba 1 -70 0.7777778 0.06236458 0.625 0 0 0.25252524 ? Some-college Widowed ? Not-in-family White Female United-States 0 -27 0.3 0.127821356 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.1335821 0.875 0 0 0.373737365 Private Masters Widowed Prof-specialty Unmarried Black Female United-States 0 -32 0.355555564 0.08584265 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 1 -62 0.6888889 0.0212681983 0.5625 0 0 0.181818187 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -18 0.2 0.060773015 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Own-child White Male United-States 0 -50 0.5555556 0.202750042 0.8125 0 0 0.4040404 Private Bachelors Separated Sales Not-in-family White Male United-States 1 -38 0.422222227 0.118361562 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family Amer-Indian-Eskimo Male United-States 0 -18 0.2 0.147429287 0.3125 0 0 0.353535354 Private 9th Never-married Other-service Own-child Black Male United-States 0 -46 0.51111114 0.07921103 0.3125 0 0 0.353535354 Private 9th Divorced Sales Not-in-family White Male United-States 0 -26 0.2888889 0.1041089 0.625 0 0 0.454545468 Private Some-college Never-married Machine-op-inspct Not-in-family Asian-Pac-Islander Male United-States 1 -44 0.4888889 0.153604254 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Machine-op-inspct Wife White Female Dominican-Republic 0 -32 0.355555564 0.117193654 0.625 0 0 0.6060606 Private Some-college Never-married Adm-clerical Not-in-family White Female United-States 0 -25 0.2777778 0.0611246 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 0 -55 0.6111111 0.0343556479 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -55 0.6111111 0.07637747 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Adm-clerical Unmarried White Male United-States 0 -25 0.2777778 0.0504995957 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -40 0.444444448 0.0684263855 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -29 0.322222233 0.153798908 0.6875 0 0 0.5050505 Private Assoc-voc Never-married Craft-repair Not-in-family White Male United-States 0 -60 0.6666667 0.121517748 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -45 0.5 0.0299648754 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -43 0.477777779 0.18689774 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -24 0.266666681 0.06941716 0.5625 0 0 0.5555556 Private HS-grad Never-married Sales Own-child White Female United-States 0 -34 0.377777785 0.152806118 0.8125 0 0 0.4040404 Private Bachelors Divorced Sales Not-in-family White Female United-States 0 -47 0.5222222 0.222546577 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Never-married Farming-fishing Not-in-family White Male United-States 0 -24 0.266666681 0.125610813 0.5625 0 0 0.323232323 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -47 0.5222222 0.138554126 0.625 0 0 0.3838384 State-gov Some-college Married-civ-spouse Other-service Husband White Male United-States 0 -18 0.2 0.146657422 0.4375 0 0 0.4040404 Private 11th Never-married Sales Own-child White Female United-States 0 -50 0.5555556 0.03540434 0.625 0 0.3409091 0.4040404 Self-emp-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.1616173 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Other-relative White Male United-States 0 -49 0.544444442 0.235727638 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -41 0.455555558 0.0791975558 0.5625 0 0.3409091 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -68 0.75555557 0.08223452 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -62 0.6888889 0.0180891156 0.25 0 0 0.353535354 Self-emp-not-inc 7th-8th Widowed Farming-fishing Other-relative White Female United-States 0 -25 0.2777778 0.129534826 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -24 0.266666681 0.05933502 0.625 0 0 0.24242425 Private Some-college Never-married Machine-op-inspct Not-in-family White Female Mexico 0 -44 0.4888889 0.09703409 0.8125 0 0 0.121212125 Private Bachelors Divorced Adm-clerical Not-in-family White Male ? 0 -32 0.355555564 0.0836442262 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Farming-fishing Husband Black Male United-States 0 -49 0.544444442 0.08330342 0.875 0 0 0.434343427 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -68 0.75555557 0.09809221 0.625 0 0 0.4040404 Private Some-college Divorced Sales Not-in-family White Female United-States 0 -25 0.2777778 0.0879050046 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Sales Own-child White Female Peru 0 -47 0.5222222 0.132711887 0.8125 0 0 0.5050505 Federal-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -35 0.3888889 0.127359986 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -37 0.411111116 0.133926272 0.4375 0 0 0.4040404 Self-emp-not-inc 11th Married-civ-spouse Transport-moving Husband White Male United-States 0 -57 0.6333333 0.21416308 0.5625 0 0 0.5050505 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -37 0.411111116 0.06945555 0.8125 0 0.4242424 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 1 -34 0.377777785 0.07515904 0.375 0 0 0.4040404 Private 10th Never-married Other-service Unmarried Black Female Jamaica 0 -46 0.51111114 0.1804749 0.6875 0 0 0.363636374 Local-gov Assoc-voc Divorced Exec-managerial Not-in-family White Female United-States 0 -21 0.233333334 0.043038182 0.4375 0 0 0.4040404 Private 11th Never-married Adm-clerical Other-relative White Female United-States 0 -26 0.2888889 0.319002777 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Other-service Wife White Female United-States 0 -45 0.5 0.1265578 0.5625 0 0.518365443 0.444444448 Private HS-grad Divorced Farming-fishing Not-in-family White Male United-States 1 -17 0.188888893 0.016225446 0.5625 0 0 0.353535354 Private HS-grad Never-married Exec-managerial Own-child White Female United-States 0 -36 0.4 0.06919152 0.75 0 0 0.7070707 Self-emp-inc Assoc-acdm Married-civ-spouse Prof-specialty Husband White Male United-States 0 -33 0.366666675 0.0617402121 0.5 0 0 0.4040404 Private 12th Divorced Exec-managerial Not-in-family White Male United-States 0 -27 0.3 0.145397916 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child Black Male United-States 0 -32 0.355555564 0.102450654 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -24 0.266666681 0.11826323 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Unmarried Black Female United-States 0 -37 0.411111116 0.156673551 0.5625 0 0 0.3030303 Private HS-grad Divorced Other-service Unmarried Black Female United-States 0 -53 0.5888889 0.1545526 1 0 0 0.5050505 State-gov Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.09908366 0.625 0.143441439 0 0.4040404 Private Some-college Divorced Adm-clerical Own-child White Male United-States 1 -43 0.477777779 0.1086007 0.5625 0 0 0.454545468 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -29 0.322222233 0.241208866 0.5625 0 0 0.5252525 Private HS-grad Never-married Other-service Other-relative Black Female United-States 0 -47 0.5222222 0.149880961 0.8125 0 0 0.656565666 Private Bachelors Married-civ-spouse Farming-fishing Husband White Male United-States 0 -37 0.411111116 0.227870181 0.875 0 0 0.6060606 Self-emp-not-inc Masters Never-married Exec-managerial Not-in-family White Male United-States 0 -43 0.477777779 0.04177665 0.9375 1 0 0.4040404 Self-emp-inc Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.177736327 0.625 0 0 0.2020202 Private Some-college Never-married Sales Not-in-family Black Female United-States 0 -50 0.5555556 0.209317014 0.8125 0 0 0.353535354 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -25 0.2777778 0.0661107749 0.625 0 0 0.4040404 Private Some-college Never-married Prof-specialty Own-child White Male United-States 0 -40 0.444444448 0.1746522 0.625 0 0 0.5050505 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -39 0.433333337 0.241632521 0.6875 0.07688077 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -41 0.455555558 0.0200457331 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -32 0.355555564 0.136544973 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Own-child White Male United-States 0 -19 0.211111113 0.019391058 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -26 0.2888889 0.0358380973 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Own-child White Male United-States 0 -30 0.333333343 0.113840796 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -34 0.377777785 0.08567022 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -41 0.455555558 0.142608136 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family White Female Mexico 0 -42 0.466666669 0.0852789 0.8125 0 0 0.3030303 Self-emp-not-inc Bachelors Divorced Exec-managerial Not-in-family Other Male Iran 0 -45 0.5 0.174757272 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 1 -22 0.244444445 0.153842688 0.625 0 0 0.353535354 Private Some-college Never-married Exec-managerial Not-in-family White Male United-States 0 -25 0.2777778 0.0793605447 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -22 0.244444445 0.03853695 0.625 0 0 0.2020202 Federal-gov Some-college Never-married Adm-clerical Own-child Black Male United-States 0 -46 0.51111114 0.1689366 0.9375 0.1502415 0 0.4040404 State-gov Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.05965091 0.625 0 0 0.454545468 Self-emp-inc Some-college Divorced Farming-fishing Not-in-family White Male United-States 0 -45 0.5 0.116401576 0.5625 0 0 0.5252525 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -19 0.211111113 0.169447139 0.625 0 0 0.141414136 Private Some-college Never-married Other-service Own-child White Male United-States 0 -31 0.344444454 0.07974581 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -30 0.333333343 0.1201471 0.625 0 0 0.7070707 Self-emp-inc Some-college Married-civ-spouse Craft-repair Husband Black Male United-States 0 -40 0.444444448 0.115084141 0.75 0 0 0.5050505 Self-emp-not-inc Assoc-acdm Married-civ-spouse Farming-fishing Husband White Male United-States 1 -60 0.6666667 0.1811498 0.625 0 0 0.121212125 ? Some-college Married-civ-spouse ? Husband White Male United-States 1 -52 0.5777778 0.0605851 0.5 0 0 0.4040404 ? 12th Married-civ-spouse ? Wife Black Female United-States 1 -22 0.244444445 0.137329638 0.625 0 0 0.151515156 Private Some-college Never-married Sales Own-child White Female United-States 0 -25 0.2777778 0.159671456 0.625 0 0 0.3838384 Private Some-college Divorced Other-service Own-child Black Male United-States 0 -51 0.566666663 0.07303471 0.875 0 0 0.8080808 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -32 0.355555564 0.06278217 0.75 0 0 0.6262626 Private Assoc-acdm Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -51 0.566666663 0.155741379 0.8125 0 0 0.25252524 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -42 0.466666669 0.260102183 0.625 0 0 0.5050505 Private Some-college Divorced Sales Not-in-family White Male United-States 1 -39 0.433333337 0.08647644 0.5625 0 0.4331956 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -24 0.266666681 0.150545061 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -52 0.5777778 0.1405195 0.5625 0 0.3996786 0.3838384 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -58 0.644444466 0.0659855 0.125 0 0 0.4040404 ? 1st-4th Married-spouse-absent ? Unmarried Amer-Indian-Eskimo Male United-States 0 -43 0.477777779 0.117393695 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -31 0.344444454 0.04056631 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -28 0.311111122 0.0445172638 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -31 0.344444454 0.08759788 0.875 0.07688077 0 0.6060606 Federal-gov Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -61 0.677777767 0.121063106 0.5625 0 0.4708448 0.2020202 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -26 0.2888889 0.129333436 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Female United-States 0 -46 0.51111114 0.030503029 0.8125 0 0 0.4040404 Private Bachelors Never-married Other-service Not-in-family White Male United-States 0 -62 0.6888889 0.120403722 0.5625 0 0 0.4040404 ? HS-grad Married-civ-spouse ? Husband White Male United-States 1 -50 0.5555556 0.0670005158 0.875 0 0 0.353535354 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 0 -18 0.2 0.0282702632 0.4375 0 0 0.05050505 Private 11th Never-married Adm-clerical Own-child White Female United-States 0 -23 0.25555557 0.109266154 0.8125 0 0 0.4848485 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -21 0.233333334 0.142767757 0.625 0 0.404499531 0.282828271 Private Some-college Never-married Sales Own-child White Female United-States 0 -46 0.51111114 0.142268 0.75 0 0 0.363636374 Private Assoc-acdm Married-civ-spouse Transport-moving Husband Other Male United-States 0 -38 0.422222227 0.0224940311 0.5625 0 0 0.4040404 Private HS-grad Divorced Sales Unmarried White Female United-States 0 -53 0.5888889 0.08138923 0.5 0 0 0.4040404 Private 12th Divorced Farming-fishing Own-child White Male United-States 0 -53 0.5888889 0.0244674869 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.09409479 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -26 0.2888889 0.0726252049 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Unmarried White Male United-States 0 -46 0.51111114 0.09444233 0.875 0.0861408561 0 0.5555556 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 1 -44 0.4888889 0.137240067 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -36 0.4 0.0772672 0.875 0 0 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -20 0.222222224 0.231961235 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -35 0.3888889 0.131686762 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Tech-support Husband White Male Mexico 0 -40 0.444444448 0.0213018749 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 -70 0.7777778 0.117216557 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -57 0.6333333 0.15280813 0.25 0 0 0.5050505 Private 7th-8th Married-civ-spouse Sales Husband White Male United-States 0 -40 0.444444448 0.3815822 0.0625 0 0.3838384 0.4040404 Private Preschool Married-civ-spouse Other-service Husband White Male Mexico 0 -18 0.2 0.024356354 0.4375 0 0 0.05050505 Private 11th Never-married Craft-repair Own-child White Male United-States 0 -45 0.5 0.02120152 0.8125 0.0282902829 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -52 0.5777778 0.198686615 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -24 0.266666681 0.07307512 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 -42 0.466666669 0.108797371 0.8125 0 0 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband Black Male United-States 0 -28 0.311111122 0.223781154 0.5625 0 0 0.454545468 Local-gov HS-grad Separated Transport-moving Own-child White Male United-States 0 -32 0.355555564 0.180606246 0.6875 0 0 0.6060606 Private Assoc-voc Never-married Tech-support Unmarried White Female United-States 0 -56 0.622222245 0.214080915 0.8125 0 0 0.4040404 Federal-gov Bachelors Divorced Adm-clerical Not-in-family White Male United-States 0 -44 0.4888889 0.03504265 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Other-service Wife Asian-Pac-Islander Female Vietnam 0 -20 0.222222224 0.123960651 0.625 0 0 0.3030303 Private Some-college Never-married Sales Unmarried Black Female United-States 0 -32 0.355555564 0.1391583 0.8125 0 0 0.6060606 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -59 0.655555546 0.103029221 0.625 0.0332503319 0 0.4040404 Private Some-college Separated Adm-clerical Other-relative White Male United-States 0 -21 0.233333334 0.143472955 0.5625 0.0217602178 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Other-relative Black Male United-States 0 -32 0.355555564 0.2113787 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -49 0.544444442 0.04471259 0.5625 0.0501305 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -22 0.244444445 0.1387077 0.8125 0.010550105 0 0.3030303 Private Bachelors Never-married Adm-clerical Own-child White Female United-States 0 -51 0.566666663 0.175750747 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.0407939628 0.5625 0.03411034 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.225679174 0.8125 0 0 0.5050505 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -34 0.377777785 0.223024786 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Unmarried Black Male United-States 0 -53 0.5888889 0.105483584 0.5 0 0 0.4040404 Private 12th Divorced Transport-moving Not-in-family White Female United-States 0 -44 0.4888889 0.126918152 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -60 0.6666667 0.153207541 0.625 0 0 0.4040404 Private Some-college Widowed Protective-serv Not-in-family Black Female United-States 0 -55 0.6111111 0.123647459 0.625 0 0 0.3838384 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.034343522 0.5625 0 0 0.3030303 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -59 0.655555546 0.258802921 1 0 0 0.5050505 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 0 -26 0.2888889 0.252786249 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child Asian-Pac-Islander Male Philippines 0 -30 0.333333343 0.118818216 0.6875 0.07298073 0 0.161616161 Private Assoc-voc Married-civ-spouse Prof-specialty Own-child White Female United-States 1 -49 0.544444442 0.0630691 0.8125 0 0 0.434343427 Private Bachelors Married-civ-spouse Exec-managerial Wife White Female United-States 0 -45 0.5 0.0204006862 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.08415814 0.8125 0 0 0.4040404 Self-emp-inc Bachelors Never-married Sales Own-child White Female United-States 0 -37 0.411111116 0.08531998 0.5625 0 0 0.6060606 Self-emp-not-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 1 -21 0.233333334 0.09831179 0.5 0 0 0.4040404 Private 12th Never-married Farming-fishing Not-in-family White Male United-States 0 -36 0.4 0.232848957 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 0 -18 0.2 0.0656521 0.5625 0 0 0.2020202 ? HS-grad Never-married ? Own-child White Female United-States 0 -37 0.411111116 0.121466555 0.8125 0 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -19 0.211111113 0.112538859 0.5625 0 0 0.4040404 Private HS-grad Never-married Adm-clerical Not-in-family White Female United-States 0 -65 0.722222269 0.129874289 0.25 0 0 0.25252524 ? 7th-8th Married-civ-spouse ? Husband White Male United-States 0 -30 0.333333343 0.21468845 0.6875 0 0 0.353535354 Private Assoc-voc Married-civ-spouse Tech-support Wife White Female Germany 0 -27 0.3 0.0994392857 0.875 0 0 0.4040404 ? Masters Never-married ? Not-in-family Other Female Japan 0 -59 0.655555546 0.197999611 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Tech-support Husband White Male United-States 1 -32 0.355555564 0.154620618 0.6875 0 0 0.6060606 Private Assoc-voc Married-civ-spouse Other-service Husband White Male United-States 1 -25 0.2777778 0.16330786 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -40 0.444444448 0.07480746 0.8125 0 0 0.8080808 Private Bachelors Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -21 0.233333334 0.1048673 0.3125 0 0 0.424242437 ? 9th Never-married ? Own-child White Male United-States 0 -49 0.544444442 0.07176779 0.8125 0 0 0.4040404 Local-gov Bachelors Divorced Prof-specialty Unmarried White Female United-States 1 -49 0.544444442 0.0160139557 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 0 -51 0.566666663 0.0295742266 0.5625 0 0 0.4040404 ? HS-grad Divorced ? Unmarried Black Female United-States 0 -48 0.533333361 0.07126534 0.3125 0 0 0.4040404 Private 9th Widowed Transport-moving Unmarried White Male United-States 1 -42 0.466666669 0.1144975 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -53 0.5888889 0.09522969 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -29 0.322222233 0.16261211 0.5625 0 0 0.454545468 Self-emp-not-inc HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -21 0.233333334 0.05278759 0.5625 0 0 0.24242425 ? HS-grad Never-married ? Other-relative Asian-Pac-Islander Female United-States 0 -54 0.6 0.10705696 0.5625 0 0 0.151515156 Self-emp-not-inc HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -66 0.733333349 0.0777918845 0.8125 1 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 -34 0.377777785 0.1834782 0.8125 0 0 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Female United-States 0 -39 0.433333337 0.020562334 0.8125 0 0.4331956 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -62 0.6888889 0.177391469 0.6875 0 0 0.4040404 ? Assoc-voc Married-civ-spouse ? Husband White Male Canada 0 -30 0.333333343 0.128125116 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -27 0.3 0.08490576 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -25 0.2777778 0.2634813 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Craft-repair Own-child White Male United-States 0 -26 0.2888889 0.144182861 0.5625 0 0 0.4040404 Private HS-grad Separated Farming-fishing Not-in-family White Male United-States 0 -45 0.5 0.115087509 0.5625 0.07298073 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -55 0.6111111 0.08014589 0.625 0 0 0.1010101 Private Some-college Separated Exec-managerial Unmarried White Female United-States 0 -26 0.2888889 0.165608659 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 -45 0.5 0.117729791 0.8125 0 0 0.565656543 Private Bachelors Separated Prof-specialty Unmarried White Female Germany 0 -61 0.677777767 0.103325576 0.875 0 0 0.4040404 Local-gov Masters Divorced Prof-specialty Not-in-family White Female United-States 1 -34 0.377777785 0.222469121 0.25 0 0 0.4040404 ? 7th-8th Separated ? Unmarried Black Female United-States 0 -26 0.2888889 0.25949803 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband Black Male United-States 0 -44 0.4888889 0.0258866251 0.875 0 0 0.4040404 Federal-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -45 0.5 0.07521966 0.625 0 0 0.3030303 Self-emp-not-inc Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -55 0.6111111 0.113797694 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -20 0.222222224 0.0580202825 0.625 0 0 0.3030303 Private Some-college Never-married Other-service Other-relative Asian-Pac-Islander Male United-States 0 -48 0.533333361 0.06724232 0.75 0 0 0.5050505 Private Assoc-acdm Married-civ-spouse Exec-managerial Husband White Male United-States 1 -33 0.366666675 0.177517429 0.5625 0 0 0.6060606 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -44 0.4888889 0.07983808 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -32 0.355555564 0.141234115 0.8125 0 0 0.5050505 Self-emp-inc Bachelors Married-civ-spouse Craft-repair Husband White Male Canada 0 -54 0.6 0.0830966458 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -40 0.444444448 0.09242577 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -29 0.322222233 0.0803924054 0.5625 0 0 0.1010101 Private HS-grad Married-civ-spouse Prof-specialty Wife Asian-Pac-Islander Female China 1 -56 0.622222245 0.09035667 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Adm-clerical Husband Black Male United-States 0 -47 0.5222222 0.08158119 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.09945074 0.625 0 0 0.4040404 Private Some-college Never-married Tech-support Not-in-family White Female United-States 0 -46 0.51111114 0.111226141 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -24 0.266666681 0.2101542 0.625 0 0 0.4040404 Federal-gov Some-college Never-married Exec-managerial Own-child White Male United-States 0 -37 0.411111116 0.183841243 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family White Male United-States 0 -49 0.544444442 0.174662977 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Unmarried White Male United-States 0 -44 0.4888889 0.189760938 0.625 0.135501355 0 0.5050505 Federal-gov Some-college Never-married Adm-clerical Not-in-family White Male United-States 1 -21 0.233333334 0.08025567 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -55 0.6111111 0.111726575 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.09165121 0.8125 0 0 0.323232323 State-gov Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -50 0.5555556 0.12626414 0.4375 0 0 0.4040404 Private 11th Divorced Sales Not-in-family White Female United-States 0 -44 0.4888889 0.22129716 0.6875 0 0 0.2020202 Private Assoc-voc Married-civ-spouse Adm-clerical Other-relative White Female United-States 0 -48 0.533333361 0.236033425 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Other-relative Asian-Pac-Islander Male Cambodia 1 -38 0.422222227 0.07350484 0.875 0 0 0.7070707 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -48 0.533333361 0.0739635155 0.9375 0 0.453856736 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -39 0.433333337 0.05835705 0.625 0 0 0.5050505 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -52 0.5777778 0.104075223 0.5625 0 0 0.444444448 Federal-gov HS-grad Married-civ-spouse Adm-clerical Husband White Male United-States 1 -63 0.7 0.0309233163 0.5625 0 0 0.4040404 Private HS-grad Widowed Other-service Other-relative White Female United-States 0 -48 0.533333361 0.117915682 0.5625 0 0.518365443 0.4040404 Private HS-grad Divorced Exec-managerial Not-in-family White Female United-States 1 -37 0.411111116 0.227676883 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -26 0.2888889 0.107067063 0.875 0 0 0.4040404 State-gov Masters Never-married Exec-managerial Not-in-family White Female United-States 0 -50 0.5555556 0.0817947 0.4375 0 0.5610652 0.4040404 Self-emp-inc 11th Never-married Exec-managerial Other-relative White Male United-States 1 -47 0.5222222 0.1632587 0.9375 0.1502415 0 0.4040404 Self-emp-not-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.08079989 0.5625 0 0 0.151515156 Private HS-grad Never-married Craft-repair Other-relative White Female United-States 0 -34 0.377777785 0.130223855 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Unmarried White Female Germany 0 -29 0.322222233 0.03068219 0.625 0 0 0.4040404 Local-gov Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -33 0.366666675 0.168192342 0.5625 0 0 0.454545468 Private HS-grad Never-married Tech-support Not-in-family White Male United-States 0 -53 0.5888889 0.0397284329 0.625 0 0 0.24242425 Private Some-college Married-civ-spouse Prof-specialty Wife White Female United-States 0 -24 0.266666681 0.307378918 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.07906015 0.625 0 0 0.656565666 Private Some-college Divorced Transport-moving Not-in-family White Male United-States 0 -50 0.5555556 0.162269279 0.75 0 0.323232323 0.05050505 Self-emp-not-inc Assoc-acdm Never-married Sales Not-in-family White Female United-States 0 -31 0.344444454 0.15251717 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -22 0.244444445 0.2453969 0.6875 0 0 0.25252524 Private Assoc-voc Never-married Sales Not-in-family Black Female United-States 0 -42 0.466666669 0.0684263855 0.8125 0 0 0.424242437 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 0 -23 0.25555557 0.180150941 0.5 0 0 0.25252524 Private 12th Never-married Sales Own-child White Female United-States 0 -22 0.244444445 0.125849247 0.4375 0 0 0.5050505 Private 11th Divorced Sales Own-child White Male United-States 0 -65 0.722222269 0.117601141 0.1875 0 0 0.1010101 Private 5th-6th Widowed Machine-op-inspct Not-in-family White Female Italy 0 -34 0.377777785 0.07748341 0.5625 0 0 0.444444448 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.09615783 0.625 0.010550105 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -38 0.422222227 0.0401830673 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -45 0.5 0.0334039442 0.625 0 0 0.8080808 Self-emp-not-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 0 -19 0.211111113 0.08586959 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Not-in-family White Male United-States 0 -46 0.51111114 0.105026253 0.8125 0 0.3677686 0.08080808 Private Bachelors Never-married Machine-op-inspct Not-in-family White Female United-States 0 -23 0.25555557 0.08235441 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -37 0.411111116 0.09683473 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Exec-managerial Husband White Male United-States 1 -59 0.655555546 0.0615502745 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Adm-clerical Husband White Male United-States 0 -36 0.4 0.0915158242 0.8125 0 0 0.4040404 State-gov Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -35 0.3888889 0.139466092 0.8125 0.105201051 0 0.454545468 Private Bachelors Never-married Sales Not-in-family White Male United-States 1 -51 0.566666663 0.116179988 0.625 0 0 0.121212125 Private Some-college Never-married Exec-managerial Not-in-family White Female United-States 0 -42 0.466666669 0.127941921 0.8125 0 0 0.3030303 Local-gov Bachelors Divorced Prof-specialty Unmarried Black Female United-States 0 -35 0.3888889 0.07204597 0.875 0 0 0.4040404 Private Masters Never-married Sales Not-in-family White Female United-States 0 -20 0.222222224 0.134809941 0.5625 0 0 0.3838384 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -25 0.2777778 0.100991778 0.5625 0.04101041 0 0.6060606 Private HS-grad Never-married Other-service Other-relative Asian-Pac-Islander Male ? 0 -41 0.455555558 0.102199428 0.375 0 0 0.4040404 Private 10th Never-married Machine-op-inspct Not-in-family White Male United-States 0 -40 0.444444448 0.04570066 0.5625 0 0 0.353535354 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -36 0.4 0.0365251 0.75 0 0 0.373737365 Private Assoc-acdm Married-civ-spouse Exec-managerial Wife White Female United-States 0 -34 0.377777785 0.103805132 0.875 0 0 0.6060606 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male United-States 1 -44 0.4888889 0.105891071 0.8125 0 0 0.424242437 Self-emp-not-inc Bachelors Never-married Sales Not-in-family White Male United-States 0 -31 0.344444454 0.25705108 0.8125 0 0 0.4040404 Federal-gov Bachelors Separated Prof-specialty Not-in-family White Male United-States 0 -41 0.455555558 0.108294241 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -43 0.477777779 0.08997343 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -43 0.477777779 0.114655778 0.875 0 0 0.4040404 Private Masters Never-married Tech-support Not-in-family White Female United-States 0 -58 0.644444466 0.168522373 0.375 0.05178052 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 1 -19 0.211111113 0.08645691 0.625 0 0 0.3030303 Private Some-college Never-married Sales Own-child White Female United-States 0 -43 0.477777779 0.110078432 0.8125 0 0 0.5555556 Local-gov Bachelors Married-civ-spouse Protective-serv Husband White Male United-States 1 -50 0.5555556 0.13180396 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 0 -44 0.4888889 0.0936152339 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.07975928 0.5625 0 0 0.3838384 Private HS-grad Divorced Machine-op-inspct Unmarried White Male United-States 0 -52 0.5777778 0.124878012 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.190663472 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Never-married Prof-specialty Not-in-family White Male United-States 0 -18 0.2 0.08059177 0.5 0 0 0.121212125 Private 12th Never-married Adm-clerical Own-child White Female United-States 0 -29 0.322222233 0.10333097 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -19 0.211111113 0.137985662 0.5625 0 0 0.363636374 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -34 0.377777785 0.1484214 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Own-child White Male United-States 0 -23 0.25555557 0.136780038 0.625 0 0 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband Black Male United-States 0 -64 0.7111111 0.07029073 0.625 0 0 0.656565666 State-gov Some-college Separated Adm-clerical Not-in-family White Female United-States 0 -68 0.75555557 0.184613109 0.375 0 0 0.2020202 Private 10th Divorced Transport-moving Not-in-family White Male United-States 0 -42 0.466666669 0.306830645 0.5625 0 0 0.4040404 State-gov HS-grad Never-married Adm-clerical Unmarried Black Female United-States 0 -41 0.455555558 0.07562647 0.5625 0 0 0.6060606 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -41 0.455555558 0.0434470139 0.5625 0 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Farming-fishing Husband White Male United-States 0 -22 0.244444445 0.0164308734 0.625 0 0 0.2020202 State-gov Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -67 0.7444445 0.1229746 0.625 0.200512 0 0.2020202 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.067804046 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband Asian-Pac-Islander Male Philippines 1 -25 0.2777778 0.119905978 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -49 0.544444442 0.0767243356 0.5625 0 0 0.6060606 ? HS-grad Married-civ-spouse ? Wife White Female United-States 0 -28 0.311111122 0.03717304 0.75 0 0 0.454545468 Private Assoc-acdm Never-married Handlers-cleaners Not-in-family White Male United-States 0 -51 0.566666663 0.150336936 1 0.1502415 0 0.4040404 Federal-gov Doctorate Married-civ-spouse Prof-specialty Husband Asian-Pac-Islander Male Vietnam 1 -23 0.25555557 0.109483704 0.8125 0 0 0.353535354 Local-gov Bachelors Never-married Prof-specialty Own-child Asian-Pac-Islander Female China 0 -19 0.211111113 0.466803849 0.5 0 0 0.151515156 Private 12th Never-married Other-service Own-child White Female United-States 0 -72 0.8 0.06524327 0.1875 0 0 0.4040404 ? 5th-6th Widowed ? Not-in-family White Female United-States 0 -33 0.366666675 0.172668651 0.625 0 0 0.353535354 Private Some-college Never-married Other-service Not-in-family White Male United-States 0 -53 0.5888889 0.363617033 0.625 0 0 0.2020202 Private Some-college Divorced Craft-repair Not-in-family White Male United-States 0 -35 0.3888889 0.162424862 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family White Male United-States 0 -31 0.344444454 0.191549838 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 0 -18 0.2 0.121262476 0.5 0 0 0.2020202 Private 12th Never-married Sales Own-child White Female United-States 0 -45 0.5 0.120169327 0.6875 0 0 0.4040404 Private Assoc-voc Divorced Handlers-cleaners Not-in-family White Female United-States 0 -28 0.311111122 0.118346743 0.8125 0 0 0.3030303 Private Bachelors Never-married Adm-clerical Not-in-family White Female ? 0 -22 0.244444445 0.110981643 0.1875 0 0 0.4040404 Local-gov 5th-6th Never-married Handlers-cleaners Other-relative White Male Guatemala 1 -55 0.6111111 0.119146228 0.625 0 0 0.4040404 Private Some-college Divorced Tech-support Not-in-family White Male United-States 0 -45 0.5 0.178551972 0.5625 0 0.43663913 0.4040404 Private HS-grad Married-civ-spouse Other-service Husband White Male United-States 1 -22 0.244444445 0.130052775 0.5625 0 0 0.373737365 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -37 0.411111116 0.12528348 0.5625 0 0.3838384 0.6060606 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -28 0.311111122 0.118045 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Own-child White Male United-States 0 -19 0.211111113 0.0740403 0.4375 0 0 0.353535354 Private 11th Never-married Sales Own-child Black Female United-States 0 -37 0.411111116 0.109674312 0.5625 0 0.43663913 0.454545468 Self-emp-not-inc HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.11981909 1 0 0 0.4040404 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.1221603 0.5625 0 0 0.353535354 Private HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -40 0.444444448 0.047581844 0.0625 0 0 0.2020202 Private Preschool Never-married Other-service Not-in-family White Female United-States 0 -51 0.566666663 0.0863956138 0.3125 0 0 0.454545468 Private 9th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -56 0.622222245 0.07188162 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.0824056 0.625 0 0 0.353535354 Private Some-college Never-married Tech-support Own-child White Female United-States 0 -40 0.444444448 0.119825155 0.6875 0.07688077 0 0.444444448 Private Assoc-voc Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.171446189 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Unmarried Black Female Jamaica 0 -47 0.5222222 0.06890797 0.9375 0 0.5544077 0.454545468 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -44 0.4888889 0.02229736 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Exec-managerial Husband Amer-Indian-Eskimo Male United-States 0 -30 0.333333343 0.145106941 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Not-in-family Other Male ? 0 -44 0.4888889 0.133305266 0.625 0 0 0.4040404 Local-gov Some-college Divorced Other-service Unmarried White Female United-States 0 -41 0.455555558 0.138841718 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 1 -47 0.5222222 0.0793753639 0.75 0 0 0.444444448 Private Assoc-acdm Divorced Sales Own-child White Male United-States 0 -26 0.2888889 0.217581272 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Exec-managerial Husband White Male Germany 1 -34 0.377777785 0.0608976223 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Tech-support Not-in-family Black Male United-States 0 -47 0.5222222 0.198634073 0.9375 1 0 0.4040404 Private Prof-school Married-civ-spouse Exec-managerial Husband White Male United-States 1 -36 0.4 0.08592481 0.5625 0 0 0.3838384 Private HS-grad Separated Adm-clerical Not-in-family White Female United-States 0 -21 0.233333334 0.121364176 0.6875 0 0 0.464646459 Private Assoc-voc Married-civ-spouse Farming-fishing Husband White Male United-States 0 -45 0.5 0.155595228 0.8125 0 0 0.4040404 State-gov Bachelors Divorced Protective-serv Not-in-family White Male United-States 0 -33 0.366666675 0.239788383 0.5625 0 0 0.353535354 Private HS-grad Separated Craft-repair Not-in-family Amer-Indian-Eskimo Male Hong 0 -33 0.366666675 0.1334063 0.5625 0 0 0.656565666 Private HS-grad Never-married Machine-op-inspct Not-in-family White Male United-States 0 -58 0.644444466 0.06677488 0.5625 0 0 0.1010101 Self-emp-not-inc HS-grad Divorced Farming-fishing Unmarried White Female United-States 0 -31 0.344444454 0.126790166 0.75 0 0 0.5050505 Private Assoc-acdm Divorced Craft-repair Not-in-family White Male United-States 1 -32 0.355555564 0.07847215 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Farming-fishing Husband White Male United-States 1 -44 0.4888889 0.0258866251 0.8125 0 0 0.4040404 Federal-gov Bachelors Widowed Exec-managerial Unmarried White Female United-States 1 -24 0.266666681 0.08653369 0.875 0 0 0.4040404 Private Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -35 0.3888889 0.0618567355 0.8125 0.07688077 0 0.2020202 Private Bachelors Married-civ-spouse Other-service Husband Amer-Indian-Eskimo Male United-States 1 -43 0.477777779 0.2760966 0.8125 0 0.453856736 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -49 0.544444442 0.124631494 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -37 0.411111116 0.06999707 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Wife White Female United-States 0 -42 0.466666669 0.0229250938 0.8125 0 0 0.353535354 Self-emp-not-inc Bachelors Never-married Farming-fishing Own-child White Male United-States 0 -31 0.344444454 0.169501022 0.625 0 0.3409091 0.5555556 Private Some-college Married-civ-spouse Other-service Husband Asian-Pac-Islander Male ? 1 -19 0.211111113 0.03848913 0.5625 0 0 0.25252524 Private HS-grad Never-married Other-service Own-child White Female United-States 0 -41 0.455555558 0.122656018 1 0 0 0.4040404 Private Doctorate Never-married Machine-op-inspct Not-in-family White Female United-States 1 -51 0.566666663 0.143662214 0.5625 0 0 0.3030303 Self-emp-inc HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -51 0.566666663 0.01937422 0.9375 0 0 0.6060606 Self-emp-inc Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -63 0.7 0.0254542157 0.375 0 0 0.3131313 Private 10th Widowed Other-service Not-in-family White Female United-States 0 -39 0.433333337 0.156284243 0.625 0 0 0.4040404 Federal-gov Some-college Married-civ-spouse Adm-clerical Husband White Male United-States 1 -30 0.333333343 0.0226832945 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -62 0.6888889 0.107703552 0.625 0 0 0.161616161 Without-pay Some-college Married-civ-spouse Adm-clerical Wife White Female United-States 0 -27 0.3 0.11905463 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative Other Male Nicaragua 0 -32 0.355555564 0.175761521 0.4375 0 0.4687787 0.3030303 Private 11th Married-civ-spouse Craft-repair Husband White Male United-States 0 -37 0.411111116 0.121466555 0.8125 0 0 0.4040404 Local-gov Bachelors Married-civ-spouse Other-service Husband White Male United-States 1 -47 0.5222222 0.218757942 0.875 0 0.4331956 0.5050505 Local-gov Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -31 0.344444454 0.123796314 0.875 0 0.43663913 0.434343427 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.13755931 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband White Male United-States 0 -37 0.411111116 0.168195039 0.6875 0 0 0.323232323 Private Assoc-voc Married-spouse-absent Sales Unmarried Black Female United-States 0 -60 0.6666667 0.08559546 0.5625 0 0.4687787 0.343434334 Private HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 0 -42 0.466666669 0.135713831 0.625 0 0 0.727272749 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -38 0.422222227 0.301302969 0.625 0 0 0.363636374 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -24 0.266666681 0.138753489 0.75 0 0 0.2020202 Private Assoc-acdm Never-married Prof-specialty Own-child Black Male United-States 0 -34 0.377777785 0.192644328 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -20 0.222222224 0.06728003 0.625 0 0 0.3030303 ? Some-college Never-married ? Own-child White Female United-States 0 -29 0.322222233 0.11419373 0.625 0 0 0.4848485 Local-gov Some-college Never-married Protective-serv Own-child White Male United-States 0 -90 1 0.211320773 0.5625 0 0 0.25252524 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -55 0.6111111 0.0600671545 0.5 0 0 0.4040404 Private 12th Divorced Machine-op-inspct Not-in-family White Female Italy 0 -36 0.4 0.1738406 0.5625 0 0 0.4040404 Private HS-grad Never-married Handlers-cleaners Not-in-family White Male United-States 0 -49 0.544444442 0.172065169 0.625 0 0 0.6060606 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -50 0.5555556 0.026129771 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -17 0.188888893 0.210080117 0.4375 0 0 0.25252524 Private 11th Never-married Other-service Own-child White Male United-States 0 -54 0.6 0.115796745 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -26 0.2888889 0.110788338 0.8125 0 0 0.1010101 Private Bachelors Never-married Exec-managerial Not-in-family White Male United-States 0 -44 0.4888889 0.200707212 0.75 0 0 0.5050505 Private Assoc-acdm Never-married Exec-managerial Not-in-family Asian-Pac-Islander Female United-States 0 -28 0.311111122 0.322161645 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child Black Female United-States 0 -54 0.6 0.023460554 1 0 0 0.6060606 Local-gov Doctorate Married-civ-spouse Exec-managerial Husband White Male United-States 1 -21 0.233333334 0.0456683338 0.3125 0 0 0.2020202 Private 9th Never-married Machine-op-inspct Own-child Black Male United-States 0 -24 0.266666681 0.02328274 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Transport-moving Not-in-family White Male United-States 0 -31 0.344444454 0.0317578241 0.5625 0 0 0.565656543 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -59 0.655555546 0.08123971 0.625 0 0 0.4040404 ? Some-college Never-married ? Not-in-family Black Female United-States 0 -41 0.455555558 0.214214951 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -29 0.322222233 0.245141625 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -50 0.5555556 0.06251141 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Tech-support Husband White Male United-States 0 -32 0.355555564 0.0226832945 0.625 0 0 0.5050505 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -42 0.466666669 0.0445327535 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Not-in-family White Female United-States 0 -47 0.5222222 0.108084776 0.5625 0 0 0.3030303 Private HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 -44 0.4888889 0.107738577 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -49 0.544444442 0.163660124 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male Columbia 0 -61 0.677777767 0.156744272 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -65 0.722222269 0.0694771 0.25 0 0.323921025 0.4040404 Local-gov 7th-8th Married-civ-spouse Exec-managerial Husband White Male United-States 0 -45 0.5 0.109238535 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Protective-serv Husband White Male United-States 1 -59 0.655555546 0.13968499 0.5625 0 0 0.4040404 Private HS-grad Divorced Machine-op-inspct Not-in-family White Male United-States 0 -30 0.333333343 0.118995361 0.5625 0 0 0.4040404 Never-worked HS-grad Married-civ-spouse ? Wife Black Female United-States 0 -34 0.377777785 0.24037233 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -24 0.266666681 0.288061261 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Handlers-cleaners Other-relative White Male Mexico 0 -42 0.466666669 0.1287771 0.8125 0 0.453856736 0.6060606 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male ? 1 -37 0.411111116 0.254459977 0.625 0.03103031 0 0.4040404 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -36 0.4 0.02944154 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -21 0.233333334 0.138707012 0.625 0 0 0.4040404 ? Some-college Never-married ? Own-child White Male United-States 0 -54 0.6 0.108904466 0.875 0 0.5874656 0.4040404 Private Masters Divorced Prof-specialty Not-in-family White Female United-States 1 -34 0.377777785 0.233065829 0.5 0 0 0.353535354 Private 12th Married-spouse-absent Handlers-cleaners Unmarried White Male Mexico 0 -41 0.455555558 0.09729879 0.625 0 0 0.4040404 Private Some-college Divorced Machine-op-inspct Own-child White Male Italy 0 -18 0.2 0.103497326 0.625 0 0 0.04040404 Never-worked Some-college Never-married ? Own-child White Male United-States 0 -26 0.2888889 0.176881611 0.5625 0 0 0.4848485 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -23 0.25555557 0.117094643 0.5625 0 0 0.08080808 Federal-gov HS-grad Never-married Armed-Forces Not-in-family White Male United-States 0 -63 0.7 0.0852290541 0.625 0 0 0.05050505 ? Some-college Divorced ? Not-in-family White Female United-States 0 -34 0.377777785 0.07945215 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Craft-repair Husband White Male United-States 1 -54 0.6 0.148000449 0.5625 0 0 0.373737365 Private HS-grad Widowed Sales Not-in-family White Female United-States 0 -37 0.411111116 0.221233174 0.5625 0 0 0.727272749 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 -54 0.6 0.09352161 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Prof-specialty Husband White Male United-States 0 -22 0.244444445 0.13169755 0.625 0 0 0.434343427 Local-gov Some-college Never-married Protective-serv Other-relative White Female United-States 0 -32 0.355555564 0.126790166 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -42 0.466666669 0.09305687 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Own-child White Male United-States 0 -31 0.344444454 0.0745696947 0.625 0 0 0.373737365 State-gov Some-college Never-married Other-service Own-child White Female United-States 0 -48 0.533333361 0.08289526 1 0 0 0.454545468 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -28 0.311111122 0.222580254 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male Hong 0 -31 0.344444454 0.171282515 0.375 0 0 0.3838384 Private 10th Divorced Craft-repair Not-in-family White Male United-States 0 -28 0.311111122 0.2935546 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -24 0.266666681 0.0799195841 0.5 0 0 0.4040404 Private 12th Married-civ-spouse Machine-op-inspct Husband White Male United-States 0 -50 0.5555556 0.187369213 0.5625 0 0 0.454545468 Private HS-grad Divorced Craft-repair Not-in-family White Female United-States 0 -26 0.2888889 0.157456875 0.5625 0 0 0.727272749 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Mexico 0 -37 0.411111116 0.221233174 0.625 0 0 0.5050505 Self-emp-inc Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -24 0.266666681 0.118932717 0.1875 0 0 0.4040404 Private 5th-6th Married-spouse-absent Farming-fishing Not-in-family White Male Mexico 0 -18 0.2 0.105480887 0.4375 0 0 0.25252524 ? 11th Never-married ? Own-child White Female United-States 0 -32 0.355555564 0.116127446 0.5625 0 0 0.4040404 Private HS-grad Never-married Other-service Unmarried Black Female United-States 0 -23 0.25555557 0.131306216 0.8125 0 0 0.5555556 Private Bachelors Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male Ireland 0 -33 0.366666675 0.214804292 0.5625 0 0 0.353535354 Local-gov HS-grad Divorced Transport-moving Not-in-family White Female United-States 0 -49 0.544444442 0.1276092 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -75 0.8333334 0.1298662 0.875 0 0 0.454545468 Self-emp-not-inc Masters Widowed Sales Not-in-family White Male United-States 0 -74 0.822222233 0.134124964 0.8125 0.158311576 0 0.08080808 Self-emp-not-inc Bachelors Widowed Craft-repair Not-in-family White Male Germany 1 -26 0.2888889 0.105613574 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Machine-op-inspct Husband Black Male United-States 0 -66 0.733333349 0.06285289 0.5625 0 0 0.4040404 ? HS-grad Widowed ? Unmarried White Female United-States 0 -34 0.377777785 0.0821483061 0.8125 0 0 0.454545468 Private Bachelors Married-spouse-absent Adm-clerical Not-in-family White Female United-States 0 -18 0.2 0.233942777 0.5 0 0 0.121212125 Private 12th Never-married Other-service Own-child White Male United-States 0 -33 0.366666675 0.138714433 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -36 0.4 0.142885625 0.8125 0 0 0.2020202 State-gov Bachelors Married-civ-spouse Adm-clerical Wife White Female United-States 1 -44 0.4888889 0.126503915 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Transport-moving Husband White Male United-States 0 -36 0.4 0.168927163 0.4375 0 0 0.4040404 Private 11th Never-married Craft-repair Not-in-family Black Female United-States 0 -53 0.5888889 0.196507052 0.6875 0 0 0.4040404 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -60 0.6666667 0.0242991038 0.25 0 0 0.4040404 Private 7th-8th Married-spouse-absent Machine-op-inspct Not-in-family White Male United-States 0 -28 0.311111122 0.080684714 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male Portugal 0 -36 0.4 0.124371514 0.375 0 0 0.4848485 Private 10th Divorced Transport-moving Unmarried White Male United-States 0 -35 0.3888889 0.109285012 0.6875 0.068490684 0 0.4040404 Private Assoc-voc Divorced Adm-clerical Not-in-family White Female United-States 0 -45 0.5 0.13767381 0.6875 0 0 0.2020202 Self-emp-not-inc Assoc-voc Married-civ-spouse Prof-specialty Husband White Male United-States 0 -23 0.25555557 0.08981919 0.625 0 0 0.151515156 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -35 0.3888889 0.060321074 0.625 0 0 0.5555556 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -34 0.377777785 0.07750092 0.625 0 0 0.424242437 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -46 0.51111114 0.09396749 0.0625 0 0 0.75757575 Private Preschool Married-civ-spouse Machine-op-inspct Other-relative Black Male Dominican-Republic 0 -58 0.644444466 0.134919733 0.5625 0 0 0.4040404 State-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -55 0.6111111 0.112144843 0.875 0 0 0.454545468 Local-gov Masters Never-married Prof-specialty Not-in-family White Female United-States 0 -63 0.7 0.152503029 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.169262588 0.625 0 0 0.4040404 Self-emp-not-inc Some-college Married-civ-spouse Sales Husband White Male United-States 0 -45 0.5 0.1282962 0.6875 0 0 0.7676768 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 0 -41 0.455555558 0.08231602 0.875 0.1502415 0 0.4040404 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 1 -42 0.466666669 0.167276338 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Unmarried White Female United-States 0 -90 1 0.144536465 0.25 0.0265302639 0 0.4040404 Local-gov 7th-8th Married-civ-spouse Protective-serv Husband White Male United-States 0 -41 0.455555558 0.148487419 0.5625 0 0 0.4040404 Private HS-grad Never-married Sales Own-child White Male United-States 0 -22 0.244444445 0.117223963 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -53 0.5888889 0.09264265 0.9375 0.2782828 0 0.4040404 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family Asian-Pac-Islander Male Philippines 1 -49 0.544444442 0.07540825 0.8125 0 0 0.6060606 Self-emp-not-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male Scotland 1 -51 0.566666663 0.0273731146 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.1387077 0.8125 0 0 0.4040404 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -23 0.25555557 0.1785385 0.6875 0 0 0.4040404 Private Assoc-voc Never-married Other-service Not-in-family White Female United-States 0 -59 0.655555546 0.266541839 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Handlers-cleaners Husband White Male United-States 1 -40 0.444444448 0.2062531 0.5625 0 0 0.4040404 Private HS-grad Divorced Craft-repair Not-in-family Asian-Pac-Islander Female Japan 0 -28 0.311111122 0.121437594 0.5625 0 0 0.7070707 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -39 0.433333337 0.144739866 0.5625 0 0 0.4040404 Private HS-grad Separated Other-service Not-in-family White Female El-Salvador 0 -25 0.2777778 0.184408352 0.5625 0 0 0.373737365 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -48 0.533333361 0.151190981 0.625 0 0 0.4040404 State-gov Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -62 0.6888889 0.182818145 0.3125 0 0 0.424242437 Private 9th Married-civ-spouse Other-service Husband Black Male United-States 0 -44 0.4888889 0.101145349 0.5625 0 0 0.4040404 Local-gov HS-grad Divorced Adm-clerical Unmarried White Female United-States 0 -28 0.311111122 0.257148057 0.8125 0 0 0.5050505 Federal-gov Bachelors Never-married Prof-specialty Not-in-family White Male United-States 0 -62 0.6888889 0.115163624 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.0729141459 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -59 0.655555546 0.016022712 0.5625 0 0 0.4040404 Federal-gov HS-grad Married-civ-spouse Sales Wife White Female United-States 1 -20 0.222222224 0.118758276 0.625 0 0 0.2020202 Private Some-college Never-married Adm-clerical Other-relative White Female United-States 0 -40 0.444444448 0.175405219 0.75 0.0147101469 0 0.323232323 Private Assoc-acdm Separated Tech-support Unmarried White Female United-States 0 -47 0.5222222 0.16707629 0.625 0 0 0.474747479 Private Some-college Married-civ-spouse Other-service Husband White Male United-States 1 -60 0.6666667 0.03788497 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -55 0.6111111 0.134547263 0.5625 0 0 0.8181818 Private HS-grad Separated Protective-serv Not-in-family White Male United-States 0 -18 0.2 0.13473855 0.5 0 0 0.353535354 Private 12th Never-married Adm-clerical Own-child White Male United-States 0 -43 0.477777779 0.129124641 0.8125 0 0.3996786 0.4040404 Private Bachelors Never-married Adm-clerical Not-in-family White Male United-States 0 -31 0.344444454 0.105093606 0.5625 0 0 0.353535354 Self-emp-not-inc HS-grad Divorced Other-service Not-in-family White Male United-States 0 -22 0.244444445 0.117017187 0.5625 0 0 0.5050505 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -56 0.622222245 0.09123564 0.5625 0 0 0.4040404 Private HS-grad Divorced Tech-support Not-in-family Black Female United-States 0 -41 0.455555558 0.125048414 0.5625 0 0 0.4040404 Private HS-grad Separated Adm-clerical Unmarried White Female United-States 0 -24 0.266666681 0.149528027 0.5625 0 0 0.3030303 Private HS-grad Never-married Other-service Other-relative White Male United-States 0 -42 0.466666669 0.108782552 0.8125 0.07298073 0 0.4040404 Private Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -53 0.5888889 0.1254815 0.625 0 0.4331956 0.4040404 Local-gov Some-college Married-civ-spouse Protective-serv Husband White Male United-States 1 -52 0.5777778 0.09667443 0.25 0 0 0.4040404 Local-gov 7th-8th Never-married Other-service Other-relative Black Female United-States 0 -42 0.466666669 0.194081649 0.625 0 0 0.8989899 Private Some-college Married-civ-spouse Craft-repair Husband White Male United-States 1 -48 0.533333361 0.219149262 0.125 0 0 0.4040404 Private 1st-4th Married-civ-spouse Machine-op-inspct Husband White Male Portugal 0 -35 0.3888889 0.2559155 0.5625 0 0 0.4040404 Private HS-grad Divorced Other-service Not-in-family White Female United-States 0 -33 0.366666675 0.113414451 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Other-service Husband White Male United-States 0 -20 0.222222224 0.158038139 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Female United-States 0 -33 0.366666675 0.156579927 0.625 0 0 0.454545468 Private Some-college Never-married Sales Own-child White Male United-States 0 -30 0.333333343 0.138176948 0.8125 0 0 0.4040404 Private Bachelors Never-married Sales Not-in-family White Male United-States 0 -31 0.344444454 0.07551332 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -29 0.322222233 0.12383201 0.5625 0 0 0.25252524 Private HS-grad Never-married Sales Not-in-family White Female United-States 0 -26 0.2888889 0.110719644 0.5625 0 0 0.4848485 Private HS-grad Never-married Craft-repair Own-child White Male United-States 0 -61 0.677777767 0.100774229 0.625 0 0 0.4040404 Private Some-college Divorced Other-service Not-in-family Black Male United-States 0 -45 0.5 0.134430751 0.1875 0 0 0.4040404 Private 5th-6th Married-civ-spouse Machine-op-inspct Husband White Male ? 0 -29 0.322222233 0.0564031266 0.5625 0 0 0.454545468 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -57 0.6333333 0.0438336246 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -33 0.366666675 0.128870726 0.75 0 0.43663913 0.5050505 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -20 0.222222224 0.153416336 0.625 0 0 0.565656543 Private Some-college Never-married Sales Not-in-family White Female United-States 0 -26 0.2888889 0.0325182453 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Not-in-family White Female United-States 0 -36 0.4 0.04465803 0.8125 0 0 0.5555556 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.03087078 0.8125 0 0 0.5050505 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 0 -31 0.344444454 0.201383442 0.5625 0 0 0.353535354 Private HS-grad Married-civ-spouse Other-service Wife Black Female United-States 0 -47 0.5222222 0.109078906 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -61 0.677777767 0.06652904 0.4375 0 0 0.3030303 Private 11th Widowed Handlers-cleaners Not-in-family White Female United-States 0 -35 0.3888889 0.06888103 0.8125 0 0 0.454545468 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 0 -23 0.25555557 0.1217555 0.125 0 0 0.353535354 Private 1st-4th Married-civ-spouse Machine-op-inspct Wife Amer-Indian-Eskimo Female Mexico 0 -20 0.222222224 0.13739565 0.5625 0 0 0.4040404 ? HS-grad Never-married ? Own-child White Male United-States 0 -41 0.455555558 0.139339462 0.5625 0 0 0.323232323 Private HS-grad Divorced Other-service Unmarried White Female United-States 0 -39 0.433333337 0.0745077357 0.8125 0 0 0.4040404 Federal-gov Bachelors Married-civ-spouse Adm-clerical Wife Asian-Pac-Islander Female Philippines 0 -51 0.566666663 0.13695246 1 0 0 0.454545468 Local-gov Doctorate Divorced Exec-managerial Not-in-family White Female United-States 1 -61 0.677777767 0.0340020433 0.25 0 0 0.565656543 Self-emp-not-inc 7th-8th Married-civ-spouse Farming-fishing Husband White Male United-States 0 -51 0.566666663 0.18488656 0.25 0 0 0.4848485 Private 7th-8th Divorced Machine-op-inspct Not-in-family White Female United-States 0 -36 0.4 0.14014098 0.0625 0 0 0.727272749 Private Preschool Divorced Other-service Not-in-family Other Male Mexico 0 -41 0.455555558 0.1132198 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -34 0.377777785 0.14366962 0.5625 0.07443074 0 0.353535354 Private HS-grad Never-married Handlers-cleaners Unmarried White Female United-States 0 -25 0.2777778 0.117954746 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -37 0.411111116 0.0275846049 0.9375 0 0 0.5050505 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -19 0.211111113 0.041011516 0.5625 0 0 0.4949495 Private HS-grad Never-married Craft-repair Not-in-family White Male United-States 0 -66 0.733333349 0.06916256 0.875 0 0 0.2020202 Self-emp-not-inc Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -23 0.25555557 0.128155425 0.8125 0 0 0.4040404 Private Bachelors Never-married Prof-specialty Own-child White Male United-States 0 -30 0.333333343 0.118666671 0.625 0 0 0.6060606 Self-emp-not-inc Some-college Married-spouse-absent Craft-repair Own-child White Male United-States 1 -53 0.5888889 0.20509395 0.625 0 0.4331956 0.454545468 Private Some-college Married-civ-spouse Transport-moving Husband White Male United-States 1 -25 0.2777778 0.263120949 0.625 0 0 0.4040404 Private Some-college Never-married Other-service Not-in-family Black Male United-States 0 -18 0.2 0.02787153 0.5625 0 0.3677686 0.2020202 Private HS-grad Never-married Sales Own-child White Female United-States 0 -51 0.566666663 0.06831795 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -61 0.677777767 0.1284309 0.5625 0 0.383149683 0.5050505 Private HS-grad Widowed Craft-repair Not-in-family Black Female United-States 0 -53 0.5888889 0.107087269 0.5625 0 0 0.3838384 Private HS-grad Widowed Machine-op-inspct Unmarried Black Female United-States 0 -17 0.188888893 0.07934102 0.375 0 0 0.2020202 Private 10th Never-married Other-service Own-child White Male United-States 0 -61 0.677777767 0.0926473662 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -44 0.4888889 0.0481954329 0.875 0 0 0.5050505 Self-emp-inc Masters Married-civ-spouse Sales Husband White Male ? 1 -38 0.422222227 0.173378557 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Transport-moving Husband Black Male United-States 0 -40 0.444444448 0.1317548 0.625 0 0 0.2020202 Private Some-college Separated Exec-managerial Unmarried White Female United-States 0 -32 0.355555564 0.159168318 0.625 0 0 0.323232323 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -46 0.51111114 0.0284575056 0.625 0 0 0.454545468 Private Some-college Married-civ-spouse Sales Husband White Male United-States 1 -50 0.5555556 0.173726767 0.625 0 0 0.4040404 Private Some-college Divorced Adm-clerical Not-in-family White Female United-States 0 -36 0.4 0.07350484 0.8125 0 0 0.5050505 Self-emp-not-inc Bachelors Married-civ-spouse Sales Husband White Male United-States 1 -30 0.333333343 0.176427647 0.4375 0 0 0.3030303 Self-emp-not-inc 11th Married-spouse-absent Craft-repair Not-in-family White Male Honduras 0 -33 0.366666675 0.0936596841 0.875 0 0 0.5050505 Private Masters Married-civ-spouse Tech-support Husband Asian-Pac-Islander Male United-States 1 -36 0.4 0.160262823 0.8125 0 0.453856736 0.454545468 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 1 -85 0.9444445 0.06641791 0.8125 0 0 0.0303030312 Private Bachelors Married-civ-spouse Exec-managerial Husband White Male Poland 0 -62 0.6888889 0.08627438 0.5625 0 0 0.323232323 Private HS-grad Widowed Adm-clerical Not-in-family White Female United-States 0 -24 0.266666681 0.191497311 0.8125 0 0 0.323232323 Private Bachelors Never-married Machine-op-inspct Not-in-family White Female United-States 0 -48 0.533333361 0.124631494 0.5625 0.07298073 0 0.5050505 Self-emp-inc HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -58 0.644444466 0.15034233 0.5625 0 0 0.4040404 Local-gov HS-grad Married-civ-spouse Other-service Husband White Male United-States 0 -45 0.5 0.116968691 0.8125 0 0 0.454545468 Self-emp-inc Bachelors Married-civ-spouse Exec-managerial Husband White Male United-States 1 -66 0.733333349 0.181628674 0.5625 0 0 0.25252524 Private HS-grad Widowed Exec-managerial Not-in-family White Female United-States 0 -37 0.411111116 0.0818485841 0.9375 0.1502415 0 0.454545468 Private Prof-school Married-civ-spouse Prof-specialty Husband White Male United-States 1 -55 0.6111111 0.134513587 0.3125 0 0 0.4848485 Private 9th Married-civ-spouse Craft-repair Husband White Male United-States 0 -39 0.433333337 0.130456224 0.5625 0 0 0.656565666 Self-emp-not-inc HS-grad Never-married Exec-managerial Not-in-family White Male United-States 0 -58 0.644444466 0.122565761 1 0 0 1 Self-emp-inc Doctorate Never-married Prof-specialty Not-in-family White Female ? 0 -50 0.5555556 0.327142447 1 0 0 0.5050505 Private Doctorate Divorced Prof-specialty Not-in-family White Female United-States 0 -28 0.311111122 0.125039652 0.625 0 0 0.5050505 Private Some-college Divorced Handlers-cleaners Not-in-family White Male United-States 0 -34 0.377777785 0.0206593238 0.875 0 0 0.5555556 Private Masters Married-civ-spouse Prof-specialty Husband White Male United-States 0 -41 0.455555558 0.108080059 0.875 0.01506015 0 0.4040404 Federal-gov Masters Divorced Prof-specialty Unmarried White Female United-States 0 -36 0.4 0.125829041 0.75 0 0 0.5252525 Private Assoc-acdm Married-civ-spouse Craft-repair Husband White Male United-States 1 -22 0.244444445 0.0452844165 0.5625 0 0 0.454545468 Private HS-grad Never-married Handlers-cleaners Unmarried White Male United-States 0 -35 0.3888889 0.0206593238 0.5 0 0 0.8484849 Private 12th Married-civ-spouse Craft-repair Husband White Male United-States 0 -49 0.544444442 0.07721938 0.5 0 0 0.4040404 ? 12th Divorced ? Other-relative Black Male United-States 0 -21 0.233333334 0.122662082 0.75 0 0 0.4040404 Private Assoc-acdm Never-married Other-service Own-child White Male United-States 0 -64 0.7111111 0.150175288 0.25 0 0 0.4040404 State-gov 7th-8th Married-civ-spouse Other-service Wife Black Female United-States 0 -41 0.455555558 0.135713831 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -52 0.5777778 0.202888116 0.6875 0 0 0.4040404 Private Assoc-voc Separated Sales Unmarried White Female United-States 0 -32 0.355555564 0.106248043 0.625 0 0 0.4040404 Private Some-college Married-civ-spouse Prof-specialty Husband White Male United-States 0 -27 0.3 0.104655139 0.625 0 0 0.25252524 Private Some-college Never-married Other-service Not-in-family White Female United-States 0 -48 0.533333361 0.180563152 0.625 0 0 0.4040404 Private Some-college Divorced Exec-managerial Not-in-family White Female United-States 0 -28 0.311111122 0.07677417 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -24 0.266666681 0.146146208 0.625 0 0 0.353535354 Private Some-college Married-civ-spouse Other-service Own-child Asian-Pac-Islander Female United-States 0 -51 0.566666663 0.1196662 0.625 0 0 0.6060606 Private Some-college Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.110587627 0.625 0 0 0.4040404 Private Some-college Never-married Exec-managerial Own-child White Male United-States 0 -61 0.677777767 0.239539176 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Sales Husband Black Male United-States 0 -60 0.6666667 0.090356 0.3125 0 0 0.353535354 ? 9th Divorced ? Not-in-family Black Male United-States 0 -33 0.366666675 0.04248588 0.5625 0 0 0.4040404 Private HS-grad Divorced Adm-clerical Unmarried Black Female United-States 0 -42 0.466666669 0.146559089 0.5625 0 0 0.5050505 Self-emp-not-inc HS-grad Divorced Sales Own-child White Male ? 0 -24 0.266666681 0.257219464 0.4375 0 0 0.4040404 Private 11th Divorced Machine-op-inspct Unmarried White Female United-States 0 -82 0.9111111 0.2720473 0.5625 0 0 0.0303030312 ? HS-grad Never-married ? Not-in-family White Male United-States 0 -26 0.2888889 0.120569408 0.625 0 0 0.656565666 Private Some-college Never-married Craft-repair Not-in-family White Male United-States 0 -18 0.2 0.29377082 0.4375 0 0 0.2020202 Private 11th Never-married Prof-specialty Own-child White Male United-States 0 -34 0.377777785 0.2166821 0.5625 0 0 0.282828271 Private HS-grad Never-married Other-service Not-in-family White Female United-States 0 -57 0.6333333 0.103669085 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Transport-moving Husband White Male United-States 0 -25 0.2777778 0.271965146 0.5625 0 0 0.4040404 Private HS-grad Never-married Craft-repair Other-relative Black Male United-States 0 -34 0.377777785 0.0407939628 0.4375 0 0.2020202 0.6060606 Private 11th Divorced Transport-moving Unmarried White Male United-States 0 -71 0.788888931 0.09304542 0.3125 0 0 0.4040404 Private 9th Married-civ-spouse Other-service Husband White Male United-States 0 -35 0.3888889 0.05364635 0.8125 0 0 0.5050505 Local-gov Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -47 0.5222222 0.210202038 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 0 -50 0.5555556 0.1405195 0.875 0 0 0.5050505 Private Masters Divorced Sales Not-in-family White Female United-States 1 -33 0.366666675 0.122853361 0.375 0 0 0.4040404 Private 10th Never-married Adm-clerical Not-in-family Black Male United-States 0 -38 0.422222227 0.0221700612 0.6875 0 0 0.5555556 Private Assoc-voc Married-civ-spouse Craft-repair Husband White Male United-States 1 -50 0.5555556 0.20365797 0.8125 0 0 0.4040404 Private Bachelors Married-civ-spouse Prof-specialty Husband White Male United-States 0 -45 0.5 0.104460485 0.375 0 0 0.3838384 Private 10th Divorced Other-service Not-in-family Black Female Dominican-Republic 0 -32 0.355555564 0.129968584 0.5625 0 0 0.454545468 Private HS-grad Separated Sales Not-in-family White Female United-States 0 -39 0.433333337 0.0722716 0.5625 0 0 0.454545468 Private HS-grad Married-civ-spouse Prof-specialty Husband White Male ? 1 -25 0.2777778 0.346678972 0.8125 0 0 0.4040404 Local-gov Bachelors Never-married Adm-clerical Own-child Black Female United-States 0 -20 0.222222224 0.18214798 0.5625 0 0 0.4040404 Private HS-grad Never-married Machine-op-inspct Own-child White Male United-States 0 -46 0.51111114 0.0289431233 0.875 0 0 0.222222224 Private Masters Married-civ-spouse Prof-specialty Wife White Female United-States 1 -40 0.444444448 0.09608441 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Craft-repair Husband Black Male United-States 0 -66 0.733333349 0.0318972468 0.375 0.0347103477 0 0.4040404 Federal-gov 10th Married-civ-spouse Craft-repair Husband White Male United-States 0 -30 0.333333343 0.118659936 0.6875 0 0 0.24242425 Private Assoc-voc Divorced Adm-clerical Unmarried White Female United-States 0 -36 0.4 0.08854217 0.25 0 0 0.4040404 Private 7th-8th Married-civ-spouse Craft-repair Husband White Male United-States 0 -57 0.6333333 0.0743696541 0.5625 1 0 0.4040404 Local-gov HS-grad Married-civ-spouse Craft-repair Husband White Male United-States 1 -46 0.51111114 0.245535657 0.625 0 0 0.4848485 Private Some-college Married-civ-spouse Exec-managerial Husband White Male United-States 1 -27 0.3 0.119483672 0.5625 0 0 0.646464646 Private HS-grad Never-married Other-service Unmarried White Female United-States 0 -33 0.366666675 0.184038579 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Craft-repair Husband Black Male United-States 0 -58 0.644444466 0.099485755 0.4375 0 0 0.4040404 Private 11th Married-civ-spouse Sales Husband White Male United-States 0 -30 0.333333343 0.0520413145 0.5625 0 0 0.5555556 Private HS-grad Divorced Transport-moving Not-in-family White Male United-States 0 -26 0.2888889 0.129081532 0.75 0 0 0.151515156 Private Assoc-acdm Never-married Machine-op-inspct Other-relative White Female United-States 0 -81 0.900000036 0.08114609 0.6875 0 0 0.01010101 ? Assoc-voc Divorced ? Unmarried White Female ? 0 -32 0.355555564 0.142350838 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Transport-moving Husband White Male United-States 0 -22 0.244444445 0.137209073 0.625 0 0 0.4040404 Private Some-college Never-married Adm-clerical Own-child White Male United-States 0 -31 0.344444454 0.1970708 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Wife White Female United-States 0 -29 0.322222233 0.08484918 0.5625 0 0 0.353535354 Private HS-grad Separated Sales Unmarried White Female United-States 0 -35 0.3888889 0.215587616 0.8125 0 0 0.5555556 ? Bachelors Married-civ-spouse ? Wife White Female United-States 1 -30 0.333333343 0.0227728747 0.8125 0 0 1 ? Bachelors Never-married ? Not-in-family Asian-Pac-Islander Female United-States 0 -34 0.377777785 0.13771154 1 0 0 0.6060606 Private Doctorate Married-civ-spouse Prof-specialty Husband White Male United-States 1 -54 0.6 0.227649271 0.8125 0 0 0.5050505 Private Bachelors Married-civ-spouse Exec-managerial Husband Asian-Pac-Islander Male Japan 1 -37 0.411111116 0.120654948 0.625 0 0 0.3939394 Private Some-college Divorced Adm-clerical Unmarried White Female United-States 0 -22 0.244444445 0.218920931 0.5 0 0 0.353535354 Private 12th Never-married Protective-serv Own-child Black Male United-States 0 -34 0.377777785 0.107911 0.8125 0 0 0.5555556 Private Bachelors Never-married Exec-managerial Not-in-family White Female United-States 1 -30 0.333333343 0.232974231 0.5625 0 0 0.464646459 Private HS-grad Never-married Craft-repair Not-in-family Black Male United-States 0 -38 0.422222227 0.09374253 0.8125 0.1502015 0 0.454545468 Private Bachelors Divorced Prof-specialty Unmarried Black Female United-States 1 -71 0.788888931 0.193554953 1 0 0 0.1010101 ? Doctorate Married-civ-spouse ? Husband White Male United-States 1 -45 0.5 0.169870779 0.5625 0 0 0.4040404 State-gov HS-grad Separated Adm-clerical Own-child White Female United-States 0 -41 0.455555558 0.136607617 0.5625 0 0 0.323232323 ? HS-grad Separated ? Not-in-family Black Female United-States 0 -72 0.8 0.0875002146 0.5625 0 0 0.25252524 ? HS-grad Married-civ-spouse ? Husband White Male United-States 0 -45 0.5 0.08028464 0.75 0 0 0.4848485 Local-gov Assoc-acdm Divorced Prof-specialty Unmarried White Female United-States 0 -31 0.344444454 0.134474531 0.875 0 0 0.3030303 Private Masters Divorced Other-service Not-in-family Other Female United-States 0 -39 0.433333337 0.0750984251 0.75 0 0 0.2020202 Local-gov Assoc-acdm Married-civ-spouse Adm-clerical Wife White Female United-States 1 -37 0.411111116 0.133505315 0.75 0 0 0.4040404 Private Assoc-acdm Divorced Tech-support Not-in-family White Female United-States 0 -43 0.477777779 0.175631523 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male Mexico 0 -65 0.722222269 0.06692171 0.9375 0.0108601088 0 0.6060606 Self-emp-not-inc Prof-school Never-married Prof-specialty Not-in-family White Male United-States 0 -43 0.477777779 0.17231369 0.625 0 0 0.4040404 State-gov Some-college Divorced Adm-clerical Other-relative White Female United-States 0 -43 0.477777779 0.0183484256 0.625 0 0 0.5050505 Self-emp-not-inc Some-college Married-civ-spouse Craft-repair Husband White Male United-States 0 -32 0.355555564 0.0229446255 0.375 0 0 0.4040404 Private 10th Married-civ-spouse Handlers-cleaners Husband Amer-Indian-Eskimo Male United-States 0 -43 0.477777779 0.0570221022 0.6875 0 0 0.454545468 Private Assoc-voc Married-civ-spouse Sales Husband White Male United-States 0 -32 0.355555564 0.0782229453 0.875 0 0 0.111111112 Private Masters Never-married Tech-support Not-in-family Asian-Pac-Islander Male Taiwan 0 -53 0.5888889 0.216787174 0.875 0 0 0.4040404 Private Masters Married-civ-spouse Exec-managerial Husband White Male United-States 1 -22 0.244444445 0.208898067 0.625 0 0 0.4040404 Private Some-college Never-married Protective-serv Not-in-family White Male United-States 0 -27 0.3 0.173301771 0.75 0 0 0.3838384 Private Assoc-acdm Married-civ-spouse Tech-support Wife White Female United-States 0 -40 0.444444448 0.103976212 0.5625 0 0 0.4040404 Private HS-grad Married-civ-spouse Machine-op-inspct Husband White Male United-States 1 -58 0.644444466 0.102316625 0.5625 0 0 0.4040404 Private HS-grad Widowed Adm-clerical Unmarried White Female United-States 0 -22 0.244444445 0.135710463 0.5625 0 0 0.2020202 Private HS-grad Never-married Adm-clerical Own-child White Male United-States 0 -52 0.5777778 0.193928763 0.5625 0.1502415 0 0.4040404 Self-emp-inc HS-grad Married-civ-spouse Exec-managerial Wife White Female United-States 1 diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Schema.txt deleted file mode 100644 index 5ef68276e1..0000000000 --- a/test/BaselineOutput/Common/SavePipe/SavePipeDropColumns-Schema.txt +++ /dev/null @@ -1,163 +0,0 @@ ----- BoundLoader ---- -3 columns: - One: Text - Num: 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' - Cat: Vec - Metadata 'SlotNames': Vec: Length=9, Count=9 - [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' ----- RowToRowMapperTransform ---- -4 columns: - One: Text - Num: 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' - Num: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=6, Count=6 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' - Cat: Vec - Metadata 'SlotNames': Vec: Length=9, Count=9 - [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' ----- RowToRowMapperTransform ---- -5 columns: - One: Text - Num: 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' - Num: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=6, Count=6 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' - Cat: Vec - Metadata 'SlotNames': Vec: Length=9, Count=9 - [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' - temp_IsMissing_000: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=6, Count=6 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' ----- RowToRowMapperTransform ---- -6 columns: - One: Text - Num: 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' - Num: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=6, Count=6 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' - Cat: Vec - Metadata 'SlotNames': Vec: Length=9, Count=9 - [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' - temp_IsMissing_000: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=6, Count=6 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' - temp_IsMissing_000: 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' ----- RowToRowMapperTransform ---- -7 columns: - One: Text - Num: 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' - Num: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=6, Count=6 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' - Cat: Vec - Metadata 'SlotNames': Vec: Length=9, Count=9 - [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' - temp_IsMissing_000: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=6, Count=6 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' - temp_IsMissing_000: 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' - temp_Replace_000: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=6, Count=6 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' ----- RowToRowMapperTransform ---- -8 columns: - One: Text - Num: 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' - Num: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=6, Count=6 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' - Cat: Vec - Metadata 'SlotNames': Vec: Length=9, Count=9 - [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' - temp_IsMissing_000: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=6, Count=6 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' - temp_IsMissing_000: 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' - temp_Replace_000: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=6, Count=6 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' - NumSparse: Vec - Metadata 'SlotNames': Vec: Length=12, Count=12 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week', [6] 'IsMissing.age', [7] 'IsMissing.fnlwgt', [8] 'IsMissing.education-num', [9] 'IsMissing.capital-gain' - [10] 'IsMissing.capital-loss', [11] 'IsMissing.hours-per-week' ----- SelectColumnsDataTransform ---- -5 columns: - One: Text - Num: 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' - Num: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=6, Count=6 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' - Cat: Vec - Metadata 'SlotNames': Vec: Length=9, Count=9 - [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' - NumSparse: Vec - Metadata 'SlotNames': Vec: Length=12, Count=12 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week', [6] 'IsMissing.age', [7] 'IsMissing.fnlwgt', [8] 'IsMissing.education-num', [9] 'IsMissing.capital-gain' - [10] 'IsMissing.capital-loss', [11] 'IsMissing.hours-per-week' ----- RowToRowMapperTransform ---- -6 columns: - One: Text - Num: 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' - Num: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=6, Count=6 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' - Cat: Vec - Metadata 'SlotNames': Vec: Length=9, Count=9 - [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' - NumSparse: Vec - Metadata 'SlotNames': Vec: Length=12, Count=12 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week', [6] 'IsMissing.age', [7] 'IsMissing.fnlwgt', [8] 'IsMissing.education-num', [9] 'IsMissing.capital-gain' - [10] 'IsMissing.capital-loss', [11] 'IsMissing.hours-per-week' - NumSparse: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=12, Count=12 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week', [6] 'IsMissing.age', [7] 'IsMissing.fnlwgt', [8] 'IsMissing.education-num', [9] 'IsMissing.capital-gain' - [10] 'IsMissing.capital-loss', [11] 'IsMissing.hours-per-week' ----- SelectColumnsDataTransform ---- -4 columns: - One: Text - Num: 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' - Num: Vec - Metadata 'IsNormalized': Bool: '1' - Metadata 'SlotNames': Vec: Length=6, Count=6 - [0] 'age', [1] 'fnlwgt', [2] 'education-num', [3] 'capital-gain', [4] 'capital-loss', [5] 'hours-per-week' - Cat: Vec - Metadata 'SlotNames': Vec: Length=9, Count=9 - [0] 'workclass', [1] 'education', [2] 'marital-status', [3] 'occupation', [4] 'relationship', [5] 'ethnicity', [6] 'sex', [7] 'native-country', [8] 'label(IsOver50K)' diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers-Schema.txt index 6402981be7..6bfec04297 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers-Schema.txt @@ -34,7 +34,7 @@ StringLabel: Key Metadata 'KeyValues': Vec: Length=7, Count=7 [0] 'Wirtschaft', [1] 'Gesundheit', [2] 'Deutschland', [3] 'Ausland', [4] 'Unterhaltung', [5] 'Sport', [6] 'Technik & Wissen' ----- TermLookupTransformer ---- +---- TermLookupTransform ---- 6 columns: RawLabel: Text Names: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers1-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers1-Schema.txt index 1e8446cc3e..2f805fd103 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers1-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers1-Schema.txt @@ -7,7 +7,7 @@ Features: Vec Metadata 'SlotNames': Vec: Length=2, Count=2 [0] 'weg fuer milliardenhilfe frei', [1] 'vor dem parlamentsgebaeude toben strassenkaempfe zwischen demonstranten drinnen haben die griechischen abgeordneten das drastische sparpaket am abend endgueltig beschlossen die entscheidung ist eine wichtige voraussetzung fuer die auszahlung von weiteren acht milliarden euro hilfsgeldern athen das griechische parlament hat einem umfassenden sparpaket endgueltig zugestimmt' ----- TermLookupTransformer ---- +---- TermLookupTransform ---- 4 columns: RawLabel: Text Names: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers2-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers2-Schema.txt index f40e727ef0..7f097005cb 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers2-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers2-Schema.txt @@ -7,7 +7,7 @@ Features: Vec Metadata 'SlotNames': Vec: Length=2, Count=2 [0] 'weg fuer milliardenhilfe frei', [1] 'vor dem parlamentsgebaeude toben strassenkaempfe zwischen demonstranten drinnen haben die griechischen abgeordneten das drastische sparpaket am abend endgueltig beschlossen die entscheidung ist eine wichtige voraussetzung fuer die auszahlung von weiteren acht milliarden euro hilfsgeldern athen das griechische parlament hat einem umfassenden sparpaket endgueltig zugestimmt' ----- TermLookupTransformer ---- +---- TermLookupTransform ---- 4 columns: RawLabel: Text Names: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers3-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers3-Schema.txt index eb6fccd5db..9c8630237b 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers3-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers3-Schema.txt @@ -7,7 +7,7 @@ Features: Vec Metadata 'SlotNames': Vec: Length=2, Count=2 [0] 'weg fuer milliardenhilfe frei', [1] 'vor dem parlamentsgebaeude toben strassenkaempfe zwischen demonstranten drinnen haben die griechischen abgeordneten das drastische sparpaket am abend endgueltig beschlossen die entscheidung ist eine wichtige voraussetzung fuer die auszahlung von weiteren acht milliarden euro hilfsgeldern athen das griechische parlament hat einem umfassenden sparpaket endgueltig zugestimmt' ----- TermLookupTransformer ---- +---- TermLookupTransform ---- 4 columns: RawLabel: Text Names: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers4-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers4-Schema.txt index 750b267e78..e54b1a5652 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers4-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers4-Schema.txt @@ -7,7 +7,7 @@ Features: Vec Metadata 'SlotNames': Vec: Length=2, Count=2 [0] 'weg fuer milliardenhilfe frei', [1] 'vor dem parlamentsgebaeude toben strassenkaempfe zwischen demonstranten drinnen haben die griechischen abgeordneten das drastische sparpaket am abend endgueltig beschlossen die entscheidung ist eine wichtige voraussetzung fuer die auszahlung von weiteren acht milliarden euro hilfsgeldern athen das griechische parlament hat einem umfassenden sparpaket endgueltig zugestimmt' ----- TermLookupTransformer ---- +---- TermLookupTransform ---- 4 columns: RawLabel: Text Names: Vec @@ -17,7 +17,7 @@ Metadata 'SlotNames': Vec: Length=2, Count=2 [0] 'weg fuer milliardenhilfe frei', [1] 'vor dem parlamentsgebaeude toben strassenkaempfe zwischen demonstranten drinnen haben die griechischen abgeordneten das drastische sparpaket am abend endgueltig beschlossen die entscheidung ist eine wichtige voraussetzung fuer die auszahlung von weiteren acht milliarden euro hilfsgeldern athen das griechische parlament hat einem umfassenden sparpaket endgueltig zugestimmt' FileLabelNum: R4 ----- TermLookupTransformer ---- +---- TermLookupTransform ---- 5 columns: RawLabel: Text Names: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers5-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers5-Schema.txt index 68614d1599..76739e7fda 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers5-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeLabelParsers5-Schema.txt @@ -7,7 +7,7 @@ Features: Vec Metadata 'SlotNames': Vec: Length=2, Count=2 [0] 'weg fuer milliardenhilfe frei', [1] 'vor dem parlamentsgebaeude toben strassenkaempfe zwischen demonstranten drinnen haben die griechischen abgeordneten das drastische sparpaket am abend endgueltig beschlossen die entscheidung ist eine wichtige voraussetzung fuer die auszahlung von weiteren acht milliarden euro hilfsgeldern athen das griechische parlament hat einem umfassenden sparpaket endgueltig zugestimmt' ----- TermLookupTransformer ---- +---- TermLookupTransform ---- 4 columns: RawLabel: Text Names: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeNgram-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeNgram-Schema.txt index e373916802..2ebab1ef83 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeNgram-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeNgram-Schema.txt @@ -9,7 +9,7 @@ Key: Vec, 9> Metadata 'KeyValues': Vec: Length=5, Count=5 [0] '5', [1] '1', [2] '2', [3] '3', [4] '4' ----- RowToRowMapperTransform ---- +---- NgramTransform ---- 4 columns: Label: R4 Text: Vec @@ -21,7 +21,7 @@ [0] '5', [1] '5|1', [2] '5|1|1', [3] '1', [4] '1|1', [5] '1|1|1', [6] '1|1|2', [7] '1|2', [8] '1|2|1', [9] '1|2|3' [10] '1|1|3', [11] '2', [12] '2|1', [13] '2|1|3', [14] '2|1|1', [15] '2|3', [16] '2|3|1', [17] '1|3', [18] '1|3|1', [19] '3' [20] '3|1', [21] '5|4', [22] '4', [23] '4|4', [24] '4|5', [25] '*' ----- RowToRowMapperTransform ---- +---- NgramTransform ---- 6 columns: Label: R4 Text: Vec @@ -50,7 +50,7 @@ [10] '1|1|3', [11] '1|2|3', [12] '1|3', [13] '1|3|1', [14] '2', [15] '2|1', [16] '2|1|3', [17] '2|1|1', [18] '2|3', [19] '2|3|1' [20] '3', [21] '3|1', [22] '3|1|1', [23] '5|4', [24] '5|4|4', [25] '5|4|5', [26] '5|4|*', [27] '5|5', [28] '4', [29] '4|4' [30] '4|5', [31] '4|*', [32] '5|*', [33] '5|3', [34] '*', [35] '*|*' ----- RowToRowMapperTransform ---- +---- NgramTransform ---- 7 columns: Label: R4 Text: Vec @@ -119,7 +119,7 @@ KeyU4: Vec, 9> Metadata 'KeyValues': Vec: Length=5, Count=5 [0] '5', [1] '1', [2] '2', [3] '3', [4] '4' ----- RowToRowMapperTransform ---- +---- NgramTransform ---- 9 columns: Label: R4 Text: Vec @@ -160,7 +160,7 @@ [0] '5', [1] '5|1', [2] '5|1|1', [3] '1', [4] '1|1', [5] '1|1|1', [6] '1|1|2', [7] '1|2', [8] '1|2|1', [9] '2' [10] '2|1', [11] '2|1|3', [12] '1|3', [13] '1|3|1', [14] '3', [15] '3|1', [16] '3|1|1', [17] '5|4', [18] '5|4|4', [19] '4' [20] '4|4', [21] '*' ----- RowToRowMapperTransform ---- +---- NgramTransform ---- 10 columns: Label: R4 Text: Vec @@ -208,7 +208,7 @@ [20] '2|3', [21] '*|1', [22] '3|4', [23] '4|3', [24] '3|*', [25] '4|1', [26] '2|*', [27] '1|5', [28] '4|2', [29] '5|3' [30] '3|3', [31] '*|5', [32] '5|5', [33] '*|4', [34] '4|*', [35] '1|4', [36] '5|2', [37] '1|*', [38] '*|2', [39] '2|5' [40] '2|4', [41] '3|5' ----- RowToRowMapperTransform ---- +---- NgramTransform ---- 11 columns: Label: R4 Text: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Convert-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Convert-Schema.txt index 857b3b6773..ba08514d74 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Convert-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Convert-Schema.txt @@ -2,7 +2,7 @@ 2 columns: CatU8: Vec, 9> CatU2: Vec, 3> ----- NgramHashingTransformer ---- +---- NgramHashTransform ---- 4 columns: CatU8: Vec, 9> CatU2: Vec, 3> diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Schema.txt index 215b737a64..e0f2dafe79 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeNgramHash-Schema.txt @@ -45,7 +45,7 @@ [0] 'versicherer', [1] 'lediglich', [2] 'air', [3] 'worldwide', [4] 'ein', [5] 'spezialist', [6] 'fuer', [7] 'risikomodelle', [8] 'wagte', [9] 'sich' Hash: Vec> HashBig: Vec> ----- NgramHashingTransformer ---- +---- NgramHashTransform ---- 8 columns: Label: Text Attrs: Vec @@ -61,7 +61,7 @@ Hash: Vec> HashBig: Vec> NgramHashOne: Vec ----- NgramHashingTransformer ---- +---- NgramHashTransform ---- 9 columns: Label: Text Attrs: Vec @@ -78,7 +78,7 @@ HashBig: Vec> NgramHashOne: Vec HashNgram1: Vec ----- NgramHashingTransformer ---- +---- NgramHashTransform ---- 11 columns: Label: Text Attrs: Vec @@ -97,7 +97,7 @@ HashNgram1: Vec HashNgram2: Vec HashNgram3: Vec ----- NgramHashingTransformer ---- +---- NgramHashTransform ---- 12 columns: Label: Text Attrs: Vec @@ -117,7 +117,7 @@ HashNgram2: Vec HashNgram3: Vec HashNgram4: Vec ----- NgramHashingTransformer ---- +---- NgramHashTransform ---- 14 columns: Label: Text Attrs: Vec @@ -139,7 +139,7 @@ HashNgram4: Vec HashNgram5: Vec HashNgram6: Vec ----- NgramHashingTransformer ---- +---- NgramHashTransform ---- 16 columns: Label: Text Attrs: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeNgramSparse-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeNgramSparse-Schema.txt index ba12e36ba1..bff6ef8ecd 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeNgramSparse-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeNgramSparse-Schema.txt @@ -7,7 +7,7 @@ Key: Vec, 21> Metadata 'KeyValues': Vec: Length=4, Count=4 [0] 'a', [1] 'b', [2] 'c', [3] 'd' ----- RowToRowMapperTransform ---- +---- NgramTransform ---- 3 columns: Text: Vec Key: Vec, 21> diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgram-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgram-Schema.txt index 00b722a0ae..83f4220b1c 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgram-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgram-Schema.txt @@ -39,7 +39,7 @@ Metadata 'KeyValues': Vec: Length=11, Count=11 [0] 'sport', [1] 'baseball', [2] 'fred', [3] 'mcgriff', [4] 'padres', [5] 'free', [6] 'agent', [7] 'med', [8] 'erythromycin', [9] 'treating' [10] 'pneumonia' ----- RowToRowMapperTransform ---- +---- NgramTransform ---- 7 columns: T1: Text T2: Text diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgramTerms-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgramTerms-Schema.txt index 4cef44e36d..7f049f63b6 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgramTerms-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeTermDictionaryNgramTerms-Schema.txt @@ -38,7 +38,7 @@ Features_WordExtractor: Vec> Metadata 'KeyValues': Vec: Length=8, Count=8 [0] 'sport', [1] 'baseball', [2] 'mcgriff', [3] 'padres', [4] 'agent', [5] 'med', [6] 'erythromycin', [7] 'pneumonia' ----- RowToRowMapperTransform ---- +---- NgramTransform ---- 7 columns: T1: Text T2: Text diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Data.txt b/test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Data.txt deleted file mode 100644 index a200d4f3a6..0000000000 --- a/test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Data.txt +++ /dev/null @@ -1,16 +0,0 @@ -#@ TextLoader{ -#@ header+ -#@ sep=tab -#@ col=Source:TX:0 -#@ col=Lang:TX:1 -#@ col=SourceTokens:TX:2-** -#@ col={name=Output type=TX src={ min=-1 var=+}} -#@ } -Source Lang -"1 ""Oh, no,"" she's saying, ""our $400 blender can't handle something this hard!""" English 1 """Oh," "no,""" she's saying, """our" $400 blender can't handle something this "hard!""" 1 """Oh," "no,""" she's saying, """our" $400 blender can't handle "hard!""" -2 Vous êtes au volant d'une voiture et vous roulez à grande vitesse French 2 Vous êtes au volant d'une voiture et vous roulez à grande vitesse 2 êtes volant d'une voiture roulez grande vitesse -3 Lange nichts voneinander gehört! Es freut mich, dich kennen zu lernen German 3 Lange nichts voneinander gehört! Es freut mich, dich kennen zu lernen 3 voneinander gehört! freut mich, kennen lernen -4 Goedemorgen, Waar kom je vandaan? Ik kom uit Nederlands Dutch 4 Goedemorgen, Waar kom je vandaan? Ik kom uit Nederlands 4 Goedemorgen, Waar kom vandaan? kom Nederlands -5 Ciao, Come va? Bene grazie. E tu? Quanto tempo! Italian 5 Ciao, Come va? Bene grazie. E tu? Quanto tempo! 5 Ciao, Come va? Bene grazie. tu? Quanto tempo! -六 初めまして 良い一日を ごきげんよう! さようなら Japanese 六 初めまして 良い一日を ごきげんよう! さようなら 六 初めまして 良い一日を ごきげんよう! さようなら -6 ¡Hola! ¿Cómo te llamas? Mi nombre es ABELE Spanish 6 ¡Hola! ¿Cómo te llamas? Mi nombre es ABELE 6 ¡Hola! ¿Cómo te llamas? Mi nombre ABELE diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Schema.txt deleted file mode 100644 index a28688666c..0000000000 --- a/test/BaselineOutput/Common/SavePipe/SavePipeTokenizerAndStopWords-Schema.txt +++ /dev/null @@ -1,15 +0,0 @@ ----- BoundLoader ---- -2 columns: - Source: Text - Lang: Text ----- RowToRowMapperTransform ---- -3 columns: - Source: Text - Lang: Text - SourceTokens: Vec ----- StopWordsRemovingTransformer ---- -4 columns: - Source: Text - Lang: Text - SourceTokens: Vec - Output: Vec diff --git a/test/BaselineOutput/Common/SavePipe/SavePipeWordHash-Schema.txt b/test/BaselineOutput/Common/SavePipe/SavePipeWordHash-Schema.txt index 83ee4402b3..cfbea3a96d 100644 --- a/test/BaselineOutput/Common/SavePipe/SavePipeWordHash-Schema.txt +++ b/test/BaselineOutput/Common/SavePipe/SavePipeWordHash-Schema.txt @@ -55,7 +55,7 @@ temp__tmp012_000: Vec> temp__tmp013_000: Vec> temp__tmp014_000: Vec> ----- NgramHashingTransformer ---- +---- NgramHashTransform ---- 41 columns: One: Text Two: Text diff --git a/test/BaselineOutput/README.md b/test/BaselineOutput/README.md deleted file mode 100644 index 1e516fab56..0000000000 --- a/test/BaselineOutput/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## Baseline Output - -This folder mirrors the `TestOutput` directory that is produced by running tests. This is so that any differences between the expected output (this folder) and the actual output of the tests can be reviewed. \ No newline at end of file diff --git a/test/BaselineOutput/SingleDebug/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleDebug/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt index f8b3b2adfe..81c7282f03 100644 --- a/test/BaselineOutput/SingleDebug/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleDebug/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt @@ -5,8 +5,6 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Warning: Skipped 16 instances with missing features during training Reserved memory for tree learner: 3852 bytes Starting to train ... Training calibrator. @@ -50,11 +48,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt index bed22fbab6..5a21f19b1c 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,7 +4,6 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise Reserved memory for tree learner: 4980 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -51,11 +50,7 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree data preparation #2' started. -[5] 'FastTree data preparation #2' finished in %Time%. -[6] 'FastTree feature conversion #2' started. -[6] 'FastTree feature conversion #2' finished in %Time%. -[7] 'FastTree training' started. -[7] 'FastTree training' finished in %Time%. -[8] 'Saving model' started. -[8] 'Saving model' finished in %Time%. +[5] 'FastTree training' started. +[5] 'FastTree training' finished in %Time%. +[6] 'Saving model' started. +[6] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt index 0650a38d87..f210a6d8e9 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt @@ -4,7 +4,6 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise Reserved memory for tree learner: 28728 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -51,11 +50,7 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree data preparation #2' started. -[5] 'FastTree data preparation #2' finished in %Time%. -[6] 'FastTree feature conversion #2' started. -[6] 'FastTree feature conversion #2' finished in %Time%. -[7] 'FastTree training' started. -[7] 'FastTree training' finished in %Time%. -[8] 'Saving model' started. -[8] 'Saving model' finished in %Time%. +[5] 'FastTree training' started. +[5] 'FastTree training' finished in %Time%. +[6] 'Saving model' started. +[6] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt index 2c97041dbe..cc2cb57518 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt @@ -6,9 +6,6 @@ Warning: This is not ranking problem, Group Id 'GroupId' column will be ignored Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Warning: This is not ranking problem, Group Id 'GroupId' column will be ignored -Warning: Skipped 16 instances with missing features during training Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -52,11 +49,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt index c71f54ec07..272c5910e8 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt @@ -5,8 +5,6 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Warning: Skipped 16 instances with missing features during training Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -50,11 +48,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt index 7331706461..961910669b 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt @@ -5,8 +5,6 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Warning: Skipped 16 instances with missing features during training Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -50,11 +48,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt index 99262943b6..56dbf90c87 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,7 +4,6 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise Reserved memory for tree learner: 4980 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -51,11 +50,7 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree data preparation #2' started. -[5] 'FastTree data preparation #2' finished in %Time%. -[6] 'FastTree feature conversion #2' started. -[6] 'FastTree feature conversion #2' finished in %Time%. -[7] 'FastTree training' started. -[7] 'FastTree training' finished in %Time%. -[8] 'Saving model' started. -[8] 'Saving model' finished in %Time%. +[5] 'FastTree training' started. +[5] 'FastTree training' finished in %Time%. +[6] 'Saving model' started. +[6] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt index a348f6068d..016be19407 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt @@ -4,7 +4,6 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise Reserved memory for tree learner: 28728 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -51,11 +50,7 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree data preparation #2' started. -[5] 'FastTree data preparation #2' finished in %Time%. -[6] 'FastTree feature conversion #2' started. -[6] 'FastTree feature conversion #2' finished in %Time%. -[7] 'FastTree training' started. -[7] 'FastTree training' finished in %Time%. -[8] 'Saving model' started. -[8] 'Saving model' finished in %Time%. +[5] 'FastTree training' started. +[5] 'FastTree training' finished in %Time%. +[6] 'Saving model' started. +[6] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt index 7da23f1a22..6f8744f870 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,7 +4,6 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise on disk Reserved memory for tree learner: 5016 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -47,9 +46,7 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree disk-based bins initialization #2' started. -[3] 'FastTree disk-based bins initialization #2' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[3] 'FastTree training' started. +[3] 'FastTree training' finished in %Time%. +[4] 'Saving model' started. +[4] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt index 2648aef201..58e8aed7b1 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt @@ -4,7 +4,6 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise on disk Reserved memory for tree learner: 28812 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -47,9 +46,7 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree disk-based bins initialization #2' started. -[3] 'FastTree disk-based bins initialization #2' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[3] 'FastTree training' started. +[3] 'FastTree training' finished in %Time%. +[4] 'Saving model' started. +[4] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt index 4a67de0680..743d238d0f 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,7 +4,6 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise on disk Reserved memory for tree learner: 14688 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -47,9 +46,7 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree disk-based bins initialization #2' started. -[3] 'FastTree disk-based bins initialization #2' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[3] 'FastTree training' started. +[3] 'FastTree training' finished in %Time%. +[4] 'Saving model' started. +[4] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt index d17f9694d5..3bfe5092e9 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt @@ -4,7 +4,6 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise on disk Reserved memory for tree learner: 38484 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -47,9 +46,7 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree disk-based bins initialization #2' started. -[3] 'FastTree disk-based bins initialization #2' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[3] 'FastTree training' started. +[3] 'FastTree training' finished in %Time%. +[4] 'Saving model' started. +[4] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt index afcb06feba..f3d444d231 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt @@ -5,8 +5,6 @@ Changing data from row-wise to column-wise on disk Warning: 16 of 699 examples will be skipped due to missing feature values Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise on disk -Warning: 16 of 699 examples will be skipped due to missing feature values Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -46,9 +44,7 @@ Virtual memory usage(MB): %Number% --- Progress log --- [1] 'FastTree disk-based bins initialization' started. [1] 'FastTree disk-based bins initialization' finished in %Time%. -[2] 'FastTree disk-based bins initialization #2' started. -[2] 'FastTree disk-based bins initialization #2' finished in %Time%. -[3] 'FastTree training' started. -[3] 'FastTree training' finished in %Time%. -[4] 'Saving model' started. -[4] 'Saving model' finished in %Time%. +[2] 'FastTree training' started. +[2] 'FastTree training' finished in %Time%. +[3] 'Saving model' started. +[3] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt index e964468ca2..942e432cbf 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt @@ -5,8 +5,6 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Warning: Skipped 16 instances with missing features during training Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. @@ -50,11 +48,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt index c0be8c4763..7e76faa1d9 100644 --- a/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleDebug/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt @@ -5,8 +5,6 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Warning: Skipped 16 instances with missing features during training Reserved memory for tree learner: 468 bytes Starting to train ... Warning: 5 of the boosting iterations failed to grow a tree. This is commonly because the minimum documents in leaf hyperparameter was set too high for this dataset. @@ -51,11 +49,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/Common/NormalizerEstimator/normalized.tsv b/test/BaselineOutput/SingleDebug/NormalizerEstimator/normalized.tsv similarity index 100% rename from test/BaselineOutput/Common/NormalizerEstimator/normalized.tsv rename to test/BaselineOutput/SingleDebug/NormalizerEstimator/normalized.tsv diff --git a/test/BaselineOutput/SingleDebug/PCA/pca.tsv b/test/BaselineOutput/SingleDebug/PCA/pca.tsv index 328ff1bf86..ece1e59164 100644 --- a/test/BaselineOutput/SingleDebug/PCA/pca.tsv +++ b/test/BaselineOutput/SingleDebug/PCA/pca.tsv @@ -2,7 +2,7 @@ #@ sep=tab #@ col=pca:R4:0-4 #@ } --2.085465 -0.09400512 -2.58367229 1.72141707 0.732049346 --0.906982958 -0.774861753 -0.609727442 -1.07867944 -0.453824759 -0.167715371 0.927231133 0.191398591 -0.243467987 1.06056178 --0.54830873 -0.5576661 0.587476134 1.38609958 -0.9422357 +2.085487 0.09400085 2.58366132 -1.721405 -0.732070744 +0.9069792 0.7748574 0.6097196 1.07868779 0.453838825 +-0.167718172 -0.92723 -0.19140324 0.243479848 -1.060547 +0.548309 0.5576686 -0.587472439 -1.38610959 0.9422219 diff --git a/test/BaselineOutput/Common/NormalizerEstimator/lpnorm_gcnorm_whitened.tsv b/test/BaselineOutput/SingleDebug/Text/lpnorm_gcnorm_whitened.tsv similarity index 100% rename from test/BaselineOutput/Common/NormalizerEstimator/lpnorm_gcnorm_whitened.tsv rename to test/BaselineOutput/SingleDebug/Text/lpnorm_gcnorm_whitened.tsv diff --git a/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-CV-breast-cancer-out.txt b/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-CV-breast-cancer-out.txt index e90417c232..92c6aa4480 100644 --- a/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-CV-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-CV-breast-cancer-out.txt @@ -5,7 +5,7 @@ Changing data from row-wise to column-wise Warning: Skipped 8 instances with missing features during training Processed 329 instances Binning and forming Feature objects -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 3852 bytes Starting to train ... Training calibrator. Not adding a normalizer. @@ -14,7 +14,7 @@ Changing data from row-wise to column-wise Warning: Skipped 8 instances with missing features during training Processed 354 instances Binning and forming Feature objects -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 3816 bytes Starting to train ... Training calibrator. TEST POSITIVE RATIO: 0.3702 (134.0/(134.0+228.0)) diff --git a/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt index 52c5c46466..81c7282f03 100644 --- a/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleRelease/FastForestClassification/FastForestClassification-TrainTest-breast-cancer-out.txt @@ -5,9 +5,7 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Warning: Skipped 16 instances with missing features during training -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 3852 bytes Starting to train ... Training calibrator. TEST POSITIVE RATIO: 0.3448 (241.0/(241.0+458.0)) @@ -50,11 +48,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt index 6ded5fda02..5a21f19b1c 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,8 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 4980 bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -51,11 +50,7 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree data preparation #2' started. -[5] 'FastTree data preparation #2' finished in %Time%. -[6] 'FastTree feature conversion #2' started. -[6] 'FastTree feature conversion #2' finished in %Time%. -[7] 'FastTree training' started. -[7] 'FastTree training' finished in %Time%. -[8] 'Saving model' started. -[8] 'Saving model' finished in %Time%. +[5] 'FastTree training' started. +[5] 'FastTree training' finished in %Time%. +[6] 'Saving model' started. +[6] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt index 812e00820d..f210a6d8e9 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-Census.Cat-out.txt @@ -4,8 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 28728 bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -51,11 +50,7 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree data preparation #2' started. -[5] 'FastTree data preparation #2' finished in %Time%. -[6] 'FastTree feature conversion #2' started. -[6] 'FastTree feature conversion #2' finished in %Time%. -[7] 'FastTree training' started. -[7] 'FastTree training' finished in %Time%. -[8] 'Saving model' started. -[8] 'Saving model' finished in %Time%. +[5] 'FastTree training' started. +[5] 'FastTree training' finished in %Time%. +[6] 'Saving model' started. +[6] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt index b1828d67c2..cc2cb57518 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-group-out.txt @@ -6,10 +6,7 @@ Warning: This is not ranking problem, Group Id 'GroupId' column will be ignored Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Warning: This is not ranking problem, Group Id 'GroupId' column will be ignored -Warning: Skipped 16 instances with missing features during training -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.3448 (241.0/(241.0+458.0)) @@ -52,11 +49,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt index e2b27ff59a..272c5910e8 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTree-TrainTest-breast-cancer-out.txt @@ -5,9 +5,7 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Warning: Skipped 16 instances with missing features during training -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.3448 (241.0/(241.0+458.0)) @@ -50,11 +48,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt index b19ff0b896..961910669b 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeBsr-TrainTest-breast-cancer-out.txt @@ -5,9 +5,7 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Warning: Skipped 16 instances with missing features during training -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.3448 (241.0/(241.0+458.0)) @@ -50,11 +48,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt index a64a06ef87..56dbf90c87 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,8 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 4980 bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -51,11 +50,7 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree data preparation #2' started. -[5] 'FastTree data preparation #2' finished in %Time%. -[6] 'FastTree feature conversion #2' started. -[6] 'FastTree feature conversion #2' finished in %Time%. -[7] 'FastTree training' started. -[7] 'FastTree training' finished in %Time%. -[8] 'Saving model' started. -[8] 'Saving model' finished in %Time%. +[5] 'FastTree training' started. +[5] 'FastTree training' finished in %Time%. +[6] 'Saving model' started. +[6] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt index ce5239bec1..016be19407 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategorical-TrainTest-Census.Cat-out.txt @@ -4,8 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 28728 bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -51,11 +50,7 @@ Virtual memory usage(MB): %Number% [3] 'FastTree in-memory bins initialization' finished in %Time%. [4] 'FastTree feature conversion' started. [4] 'FastTree feature conversion' finished in %Time%. -[5] 'FastTree data preparation #2' started. -[5] 'FastTree data preparation #2' finished in %Time%. -[6] 'FastTree feature conversion #2' started. -[6] 'FastTree feature conversion #2' finished in %Time%. -[7] 'FastTree training' started. -[7] 'FastTree training' finished in %Time%. -[8] 'Saving model' started. -[8] 'Saving model' finished in %Time%. +[5] 'FastTree training' started. +[5] 'FastTree training' finished in %Time%. +[6] 'Saving model' started. +[6] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt index d08fd2b758..6f8744f870 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,8 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise on disk -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 5016 bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -47,9 +46,7 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree disk-based bins initialization #2' started. -[3] 'FastTree disk-based bins initialization #2' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[3] 'FastTree training' started. +[3] 'FastTree training' finished in %Time%. +[4] 'Saving model' started. +[4] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt index ef974fde35..58e8aed7b1 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeCategoricalDisk-TrainTest-Census.Cat-out.txt @@ -4,8 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise on disk -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 28812 bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -47,9 +46,7 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree disk-based bins initialization #2' started. -[3] 'FastTree disk-based bins initialization #2' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[3] 'FastTree training' started. +[3] 'FastTree training' finished in %Time%. +[4] 'Saving model' started. +[4] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt index 532e974ba9..743d238d0f 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census-Cat-Only.Cat-out.txt @@ -4,8 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise on disk -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 14688 bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -47,9 +46,7 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree disk-based bins initialization #2' started. -[3] 'FastTree disk-based bins initialization #2' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[3] 'FastTree training' started. +[3] 'FastTree training' finished in %Time%. +[4] 'Saving model' started. +[4] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt index 95d79a778a..3bfe5092e9 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-Census.Cat-out.txt @@ -4,8 +4,7 @@ Making per-feature arrays Changing data from row-wise to column-wise on disk Processed 32561 instances Binning and forming Feature objects -Changing data from row-wise to column-wise on disk -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 38484 bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.2362 (3846.0/(3846.0+12435.0)) @@ -47,9 +46,7 @@ Virtual memory usage(MB): %Number% [1] 'Building term dictionary' finished in %Time%. [2] 'FastTree disk-based bins initialization' started. [2] 'FastTree disk-based bins initialization' finished in %Time%. -[3] 'FastTree disk-based bins initialization #2' started. -[3] 'FastTree disk-based bins initialization #2' finished in %Time%. -[4] 'FastTree training' started. -[4] 'FastTree training' finished in %Time%. -[5] 'Saving model' started. -[5] 'Saving model' finished in %Time%. +[3] 'FastTree training' started. +[3] 'FastTree training' finished in %Time%. +[4] 'Saving model' started. +[4] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt index add50cace0..f3d444d231 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDisk-TrainTest-breast-cancer-out.txt @@ -5,9 +5,7 @@ Changing data from row-wise to column-wise on disk Warning: 16 of 699 examples will be skipped due to missing feature values Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise on disk -Warning: 16 of 699 examples will be skipped due to missing feature values -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.3448 (241.0/(241.0+458.0)) @@ -46,9 +44,7 @@ Virtual memory usage(MB): %Number% --- Progress log --- [1] 'FastTree disk-based bins initialization' started. [1] 'FastTree disk-based bins initialization' finished in %Time%. -[2] 'FastTree disk-based bins initialization #2' started. -[2] 'FastTree disk-based bins initialization #2' finished in %Time%. -[3] 'FastTree training' started. -[3] 'FastTree training' finished in %Time%. -[4] 'Saving model' started. -[4] 'Saving model' finished in %Time%. +[2] 'FastTree training' started. +[2] 'FastTree training' finished in %Time%. +[3] 'Saving model' started. +[3] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt index 74278aadad..942e432cbf 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeDrop-TrainTest-breast-cancer-out.txt @@ -5,9 +5,7 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Warning: Skipped 16 instances with missing features during training -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 3852 bytes Starting to train ... Not training a calibrator because it is not needed. TEST POSITIVE RATIO: 0.3448 (241.0/(241.0+458.0)) @@ -50,11 +48,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt index 58eac554cd..7e76faa1d9 100644 --- a/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt +++ b/test/BaselineOutput/SingleRelease/FastTreeBinaryClassification/FastTreeHighMinDocs-TrainTest-breast-cancer-out.txt @@ -5,9 +5,7 @@ Changing data from row-wise to column-wise Warning: Skipped 16 instances with missing features during training Processed 683 instances Binning and forming Feature objects -Changing data from row-wise to column-wise -Warning: Skipped 16 instances with missing features during training -Reserved memory for tree learner: %Number% bytes +Reserved memory for tree learner: 468 bytes Starting to train ... Warning: 5 of the boosting iterations failed to grow a tree. This is commonly because the minimum documents in leaf hyperparameter was set too high for this dataset. Not training a calibrator because it is not needed. @@ -51,11 +49,7 @@ Virtual memory usage(MB): %Number% [2] 'FastTree in-memory bins initialization' finished in %Time%. [3] 'FastTree feature conversion' started. [3] 'FastTree feature conversion' finished in %Time%. -[4] 'FastTree data preparation #2' started. -[4] 'FastTree data preparation #2' finished in %Time%. -[5] 'FastTree feature conversion #2' started. -[5] 'FastTree feature conversion #2' finished in %Time%. -[6] 'FastTree training' started. -[6] 'FastTree training' finished in %Time%. -[7] 'Saving model' started. -[7] 'Saving model' finished in %Time%. +[4] 'FastTree training' started. +[4] 'FastTree training' finished in %Time%. +[5] 'Saving model' started. +[5] 'Saving model' finished in %Time%. diff --git a/test/BaselineOutput/SingleRelease/NormalizerEstimator/normalized.tsv b/test/BaselineOutput/SingleRelease/NormalizerEstimator/normalized.tsv new file mode 100644 index 0000000000..b231f8e23d --- /dev/null +++ b/test/BaselineOutput/SingleRelease/NormalizerEstimator/normalized.tsv @@ -0,0 +1,175 @@ +#@ TextLoader{ +#@ header+ +#@ sep=tab +#@ col=float1:R4:0 +#@ col=float1:R4:1 +#@ col=float4:R4:2-5 +#@ col=float4:R4:6-9 +#@ col=double1:R8:10 +#@ col=double1:R8:11 +#@ col=double4:R8:12-15 +#@ col=double4:R8:16-19 +#@ col=int1:I4:20 +#@ col=float1bin:R4:21 +#@ col=float4bin:R4:22-25 +#@ col=double1bin:R8:26 +#@ col=double4bin:R8:27-30 +#@ col=float1mv:R4:31 +#@ col=float4mv:R4:32-35 +#@ col=double1mv:R8:36 +#@ col=double4mv:R8:37-40 +#@ col=float1lmv:R4:41 +#@ col=float4lmv:R4:42-45 +#@ col=double1lmv:R8:46 +#@ col=double4lmv:R8:47-50 +#@ } +float1 float1 5.1 3.5 1.4 0.2 5.1 3.5 1.4 0.2 double1 double1 5.1 3.5 1.4 0.2 5.1 3.5 1.4 0.2 int1 float1bin 5.1 3.5 1.4 0.2 double1bin 5.1 3.5 1.4 0.2 float1mv 5.1 3.5 1.4 0.2 double1mv 5.1 3.5 1.4 0.2 float1lmv 5.1 3.5 1.4 0.2 double1lmv 5.1 3.5 1.4 0.2 +4.9 0.6202532 4.9 3 1.4 0.2 0.6202532 0.6818181 0.202898547 0.0800000057 4.9000000000000004 0.620253164556962 4.9000000000000004 3 1.3999999999999999 0.20000000000000001 0.620253164556962 0.68181818181818177 0.20289855072463767 0.080000000000000016 0 0.1764706 0.1764706 0.4090909 0.0952381 0.04761905 0.17647058823529413 0.17647058823529413 0.40909090909090912 0.095238095238095233 0.047619047619047616 0.829617262 0.829617262 0.9735693 0.336375058 0.140421242 0.82961722543499561 0.82961722543499561 0.97356928368104678 0.33637507090625185 0.14042123582229432 0.117838435 0.117838435 0.480745673 0.07455328 0.07146728 0.11783846996167147 0.11783846996167147 0.4807456731235793 0.074553292690365869 0.071467286508792471 +4.7 0.594936669 4.7 3.2 1.3 0.2 0.594936669 0.7272727 0.188405782 0.0800000057 4.7000000000000002 0.59493670886075944 4.7000000000000002 3.2000000000000002 1.3 0.20000000000000001 0.59493670886075944 0.72727272727272729 0.18840579710144928 0.080000000000000016 0 0.117647059 0.117647059 0.5 0.0714285746 0.04761905 0.11764705882352941 0.11764705882352941 0.5 0.071428571428571425 0.047619047619047616 0.7957553 0.7957553 1.038474 0.312348276 0.140421242 0.79575529786622023 0.79575529786622023 1.0384739025931167 0.31234828012723387 0.14042123582229432 0.06917418 0.06917418 0.6578964 0.0582755022 0.07146728 0.069174201507542998 0.069174201507542998 0.65789648182451921 0.058275496366795021 0.071467286508792471 +4.6 0.5822785 4.6 3.1 1.5 0.2 0.5822785 0.7045454 0.2173913 0.0800000057 4.5999999999999996 0.58227848101265811 4.5999999999999996 3.1000000000000001 1.5 0.20000000000000001 0.58227848101265811 0.70454545454545459 0.21739130434782611 0.080000000000000016 0 0.0882353 0.0882353 0.454545468 0.119047619 0.04761905 0.088235294117647065 0.088235294117647065 0.45454545454545453 0.11904761904761904 0.047619047619047616 0.7788243 0.7788243 1.0060215 0.360401869 0.140421242 0.77882433408183249 0.77882433408183249 1.0060215931370817 0.36040186168526983 0.14042123582229432 0.0510348342 0.0510348342 0.5725629 0.0926237255 0.07146728 0.05103484272829939 0.05103484272829939 0.5725628341629212 0.092623715229236292 0.071467286508792471 +5 0.6329114 5 3.6 1.4 0.2 0.6329114 0.818181753 0.202898547 0.0800000057 5 0.63291139240506322 5 3.6000000000000001 1.3999999999999999 0.20000000000000001 0.63291139240506322 0.81818181818181812 0.20289855072463767 0.080000000000000016 0 0.205882356 0.205882356 0.6818182 0.0952381 0.04761905 0.20588235294117646 0.20588235294117646 0.68181818181818177 0.095238095238095233 0.047619047619047616 0.8465482 0.8465482 1.1682831 0.336375058 0.140421242 0.84654818921938324 0.84654818921938324 1.1682831404172562 0.33637507090625185 0.14042123582229432 0.14861621 0.14861621 0.8919594 0.07455328 0.07146728 0.14861616399327332 0.14861616399327332 0.89195941323598249 0.074553292690365869 0.071467286508792471 +5.4 0.683544338 5.4 3.9 1.7 0.4 0.683544338 0.8863636 0.246376812 0.160000011 5.4000000000000004 0.68354430379746833 5.4000000000000004 3.8999999999999999 1.7 0.40000000000000002 0.68354430379746833 0.88636363636363635 0.24637681159420291 0.16000000000000003 0 0.323529422 0.323529422 0.8181818 0.166666672 0.142857149 0.3235294117647059 0.3235294117647059 0.81818181818181823 0.16666666666666666 0.14285714285714285 0.9142721 0.9142721 1.26564014 0.408455431 0.280842483 0.91427204435693399 0.91427204435693399 1.2656400687853608 0.40845544324330579 0.28084247164458864 0.3099612 0.3099612 0.9642299 0.13329801 0.223406911 0.30996111189240849 0.30996111189240849 0.96422985148785167 0.1332979854433643 0.22340689032507804 +4.6 0.5822785 4.6 3.4 1.4 0.3 0.5822785 0.772727251 0.202898547 0.120000005 4.5999999999999996 0.58227848101265811 4.5999999999999996 3.3999999999999999 1.3999999999999999 0.29999999999999999 0.58227848101265811 0.77272727272727271 0.20289855072463767 0.12 0 0.0882353 0.0882353 0.590909064 0.0952381 0.0952381 0.088235294117647065 0.088235294117647065 0.59090909090909094 0.095238095238095233 0.095238095238095233 0.7788243 0.7788243 1.10337853 0.336375058 0.210631862 0.77882433408183249 0.77882433408183249 1.1033785215051863 0.33637507090625185 0.21063185373344145 0.0510348342 0.0510348342 0.797875941 0.07455328 0.146190211 0.05103484272829939 0.05103484272829939 0.79787580879856601 0.074553292690365869 0.14619023377705653 +5 0.6329114 5 3.4 1.5 0.2 0.6329114 0.772727251 0.2173913 0.0800000057 5 0.63291139240506322 5 3.3999999999999999 1.5 0.20000000000000001 0.63291139240506322 0.77272727272727271 0.21739130434782611 0.080000000000000016 0 0.205882356 0.205882356 0.590909064 0.119047619 0.04761905 0.20588235294117646 0.20588235294117646 0.59090909090909094 0.11904761904761904 0.047619047619047616 0.8465482 0.8465482 1.10337853 0.360401869 0.140421242 0.84654818921938324 0.84654818921938324 1.1033785215051863 0.36040186168526983 0.14042123582229432 0.14861621 0.14861621 0.797875941 0.0926237255 0.07146728 0.14861616399327332 0.14861616399327332 0.79787580879856601 0.092623715229236292 0.071467286508792471 +4.4 0.5569621 4.4 2.9 1.4 0.2 0.5569621 0.659090936 0.202898547 0.0800000057 4.4000000000000004 0.55696202531645567 4.4000000000000004 2.8999999999999999 1.3999999999999999 0.20000000000000001 0.55696202531645567 0.65909090909090906 0.20289855072463767 0.080000000000000016 0 0.0294117648 0.0294117648 0.363636374 0.0952381 0.04761905 0.029411764705882353 0.029411764705882353 0.36363636363636365 0.095238095238095233 0.047619047619047616 0.744962454 0.744962454 0.941117 0.336375058 0.140421242 0.74496240651305734 0.74496240651305734 0.94111697422501195 0.33637507090625185 0.14042123582229432 0.0255098473 0.0255098473 0.386941522 0.07455328 0.07146728 0.025509830781751675 0.025509830781751675 0.38694155923435009 0.074553292690365869 0.071467286508792471 +4.9 0.6202532 4.9 3.1 1.5 0.1 0.6202532 0.7045454 0.2173913 0.0400000028 4.9000000000000004 0.620253164556962 4.9000000000000004 3.1000000000000001 1.5 0.10000000000000001 0.620253164556962 0.70454545454545459 0.21739130434782611 0.040000000000000008 0 0.1764706 0.1764706 0.454545468 0.119047619 0 0.17647058823529413 0.17647058823529413 0.45454545454545453 0.11904761904761904 0 0.829617262 0.829617262 1.0060215 0.360401869 0.07021062 0.82961722543499561 0.82961722543499561 1.0060215931370817 0.36040186168526983 0.070210617911147161 0.117838435 0.117838435 0.5725629 0.0926237255 0.0149739943 0.11783846996167147 0.11783846996167147 0.5725628341629212 0.092623715229236292 0.014973996264087019 +5.4 0.683544338 5.4 3.7 1.5 0.2 0.683544338 0.840909064 0.2173913 0.0800000057 5.4000000000000004 0.68354430379746833 5.4000000000000004 3.7000000000000002 1.5 0.20000000000000001 0.68354430379746833 0.84090909090909094 0.21739130434782611 0.080000000000000016 0 0.323529422 0.323529422 0.727272749 0.119047619 0.04761905 0.3235294117647059 0.3235294117647059 0.72727272727272729 0.11904761904761904 0.047619047619047616 0.9142721 0.9142721 1.20073545 0.360401869 0.140421242 0.91427204435693399 0.91427204435693399 1.2007354498732912 0.36040186168526983 0.14042123582229432 0.3099612 0.3099612 0.9236834 0.0926237255 0.07146728 0.30996111189240849 0.30996111189240849 0.92368343544686704 0.092623715229236292 0.071467286508792471 +4.8 0.607594967 4.8 3.4 1.6 0.2 0.607594967 0.772727251 0.231884047 0.0800000057 4.7999999999999998 0.60759493670886067 4.7999999999999998 3.3999999999999999 1.6000000000000001 0.20000000000000001 0.60759493670886067 0.77272727272727271 0.23188405797101452 0.080000000000000016 0 0.14705883 0.14705883 0.590909064 0.142857149 0.04761905 0.14705882352941177 0.14705882352941177 0.59090909090909094 0.14285714285714285 0.047619047619047616 0.8126863 0.8126863 1.10337853 0.38442865 0.140421242 0.81268626165060787 0.81268626165060787 1.1033785215051863 0.38442865246428787 0.14042123582229432 0.09137413 0.09137413 0.797875941 0.112279132 0.07146728 0.091374136005250073 0.091374136005250073 0.79787580879856601 0.11227913256984562 0.071467286508792471 +4.8 0.607594967 4.8 3 1.4 0.1 0.607594967 0.6818181 0.202898547 0.0400000028 4.7999999999999998 0.60759493670886067 4.7999999999999998 3 1.3999999999999999 0.10000000000000001 0.60759493670886067 0.68181818181818177 0.20289855072463767 0.040000000000000008 0 0.14705883 0.14705883 0.4090909 0.0952381 0 0.14705882352941177 0.14705882352941177 0.40909090909090912 0.095238095238095233 0 0.8126863 0.8126863 0.9735693 0.336375058 0.07021062 0.81268626165060787 0.81268626165060787 0.97356928368104678 0.33637507090625185 0.070210617911147161 0.09137413 0.09137413 0.480745673 0.07455328 0.0149739943 0.091374136005250073 0.091374136005250073 0.4807456731235793 0.074553292690365869 0.014973996264087019 +4.3 0.544303834 4.3 3 1.1 0.1 0.544303834 0.6818181 0.159420282 0.0400000028 4.2999999999999998 0.54430379746835433 4.2999999999999998 3 1.1000000000000001 0.10000000000000001 0.54430379746835433 0.68181818181818177 0.15942028985507248 0.040000000000000008 0 0 0 0.4090909 0.0238095243 0 0 0 0.40909090909090912 0.023809523809523808 0 0.7280315 0.7280315 0.9735693 0.264294684 0.07021062 0.7280314427286696 0.7280314427286696 0.97356928368104678 0.26429469856919791 0.070210617911147161 0.01720981 0.01720981 0.480745673 0.0317756645 0.0149739943 0.017209798931850762 0.017209798931850762 0.4807456731235793 0.031775654639957629 0.014973996264087019 +5.8 0.734177232 5.8 4 1.2 0.2 0.734177232 0.9090909 0.173913047 0.0800000057 5.7999999999999998 0.73417721518987333 5.7999999999999998 4 1.2 0.20000000000000001 0.73417721518987333 0.90909090909090906 0.17391304347826086 0.080000000000000016 0 0.441176474 0.441176474 0.8636364 0.04761905 0.04761905 0.44117647058823528 0.44117647058823528 0.86363636363636365 0.047619047619047616 0.047619047619047616 0.981996 0.981996 1.29809237 0.2883215 0.140421242 0.98199589949448451 0.98199589949448451 1.2980923782413958 0.28832148934821589 0.14042123582229432 0.504585147 0.504585147 0.9762056 0.0439706929 0.07146728 0.50458515122771275 0.50458515122771275 0.9762055888000436 0.043970678884132197 0.071467286508792471 +5.7 0.721519 5.7 4.4 1.5 0.4 0.721519 1 0.2173913 0.160000011 5.7000000000000002 0.72151898734177211 5.7000000000000002 4.4000000000000004 1.5 0.40000000000000002 0.72151898734177211 1 0.21739130434782611 0.16000000000000003 0 0.4117647 0.4117647 1 0.119047619 0.142857149 0.41176470588235292 0.41176470588235292 1 0.11904761904761904 0.14285714285714285 0.965064943 0.965064943 1.42790163 0.360401869 0.280842483 0.96506493571009688 0.96506493571009688 1.4279016160655356 0.36040186168526983 0.28084247164458864 0.455403626 0.455403626 0.996043563 0.0926237255 0.223406911 0.45540375842690767 0.45540375842690767 0.99604355189588412 0.092623715229236292 0.22340689032507804 +5.4 0.683544338 5.4 3.9 1.3 0.4 0.683544338 0.8863636 0.188405782 0.160000011 5.4000000000000004 0.68354430379746833 5.4000000000000004 3.8999999999999999 1.3 0.40000000000000002 0.68354430379746833 0.88636363636363635 0.18840579710144928 0.16000000000000003 0 0.323529422 0.323529422 0.8181818 0.0714285746 0.142857149 0.3235294117647059 0.3235294117647059 0.81818181818181823 0.071428571428571425 0.14285714285714285 0.9142721 0.9142721 1.26564014 0.312348276 0.280842483 0.91427204435693399 0.91427204435693399 1.2656400687853608 0.31234828012723387 0.28084247164458864 0.3099612 0.3099612 0.9642299 0.0582755022 0.223406911 0.30996111189240849 0.30996111189240849 0.96422985148785167 0.058275496366795021 0.22340689032507804 +5.1 0.6455696 5.1 3.5 1.4 0.3 0.6455696 0.7954545 0.202898547 0.120000005 5.0999999999999996 0.64556962025316444 5.0999999999999996 3.5 1.3999999999999999 0.29999999999999999 0.64556962025316444 0.79545454545454541 0.20289855072463767 0.12 0 0.235294119 0.235294119 0.6363636 0.0952381 0.0952381 0.23529411764705882 0.23529411764705882 0.63636363636363635 0.095238095238095233 0.095238095238095233 0.8634792 0.8634792 1.13583088 0.336375058 0.210631862 0.86347915300377087 0.86347915300377087 1.1358308309612213 0.33637507090625185 0.21063185373344145 0.183586776 0.183586776 0.8504554 0.07455328 0.146190211 0.18358681923369741 0.18358681923369741 0.8504555107896975 0.074553292690365869 0.14619023377705653 +5.7 0.721519 5.7 3.8 1.7 0.3 0.721519 0.8636363 0.246376812 0.120000005 5.7000000000000002 0.72151898734177211 5.7000000000000002 3.7999999999999998 1.7 0.29999999999999999 0.72151898734177211 0.86363636363636354 0.24637681159420291 0.12 0 0.4117647 0.4117647 0.772727251 0.166666672 0.0952381 0.41176470588235292 0.41176470588235292 0.77272727272727271 0.16666666666666666 0.095238095238095233 0.965064943 0.965064943 1.23318768 0.408455431 0.210631862 0.96506493571009688 0.96506493571009688 1.2331877593293259 0.40845544324330579 0.21063185373344145 0.455403626 0.455403626 0.9472266 0.13329801 0.146190211 0.45540375842690767 0.45540375842690767 0.94722658326235554 0.1332979854433643 0.14619023377705653 +5.1 0.6455696 5.1 3.8 1.5 0.3 0.6455696 0.8636363 0.2173913 0.120000005 5.0999999999999996 0.64556962025316444 5.0999999999999996 3.7999999999999998 1.5 0.29999999999999999 0.64556962025316444 0.86363636363636354 0.21739130434782611 0.12 0 0.235294119 0.235294119 0.772727251 0.119047619 0.0952381 0.23529411764705882 0.23529411764705882 0.77272727272727271 0.11904761904761904 0.095238095238095233 0.8634792 0.8634792 1.23318768 0.360401869 0.210631862 0.86347915300377087 0.86347915300377087 1.2331877593293259 0.36040186168526983 0.21063185373344145 0.183586776 0.183586776 0.9472266 0.0926237255 0.146190211 0.18358681923369741 0.18358681923369741 0.94722658326235554 0.092623715229236292 0.14619023377705653 +5.4 0.683544338 5.4 3.4 1.7 0.2 0.683544338 0.772727251 0.246376812 0.0800000057 5.4000000000000004 0.68354430379746833 5.4000000000000004 3.3999999999999999 1.7 0.20000000000000001 0.68354430379746833 0.77272727272727271 0.24637681159420291 0.080000000000000016 0 0.323529422 0.323529422 0.590909064 0.166666672 0.04761905 0.3235294117647059 0.3235294117647059 0.59090909090909094 0.16666666666666666 0.047619047619047616 0.9142721 0.9142721 1.10337853 0.408455431 0.140421242 0.91427204435693399 0.91427204435693399 1.1033785215051863 0.40845544324330579 0.14042123582229432 0.3099612 0.3099612 0.797875941 0.13329801 0.07146728 0.30996111189240849 0.30996111189240849 0.79787580879856601 0.1332979854433643 0.071467286508792471 +5.1 0.6455696 5.1 3.7 1.5 0.4 0.6455696 0.840909064 0.2173913 0.160000011 5.0999999999999996 0.64556962025316444 5.0999999999999996 3.7000000000000002 1.5 0.40000000000000002 0.64556962025316444 0.84090909090909094 0.21739130434782611 0.16000000000000003 0 0.235294119 0.235294119 0.727272749 0.119047619 0.142857149 0.23529411764705882 0.23529411764705882 0.72727272727272729 0.11904761904761904 0.14285714285714285 0.8634792 0.8634792 1.20073545 0.360401869 0.280842483 0.86347915300377087 0.86347915300377087 1.2007354498732912 0.36040186168526983 0.28084247164458864 0.183586776 0.183586776 0.9236834 0.0926237255 0.223406911 0.18358681923369741 0.18358681923369741 0.92368343544686704 0.092623715229236292 0.22340689032507804 +4.6 0.5822785 4.6 3.6 1 0.2 0.5822785 0.818181753 0.144927531 0.0800000057 4.5999999999999996 0.58227848101265811 4.5999999999999996 3.6000000000000001 1 0.20000000000000001 0.58227848101265811 0.81818181818181812 0.14492753623188406 0.080000000000000016 0 0.0882353 0.0882353 0.6818182 0 0.04761905 0.088235294117647065 0.088235294117647065 0.68181818181818177 0 0.047619047619047616 0.7788243 0.7788243 1.1682831 0.2402679 0.140421242 0.77882433408183249 0.77882433408183249 1.1682831404172562 0.2402679077901799 0.14042123582229432 0.0510348342 0.0510348342 0.8919594 0.0217650775 0.07146728 0.05103484272829939 0.05103484272829939 0.89195941323598249 0.021765071971117544 0.071467286508792471 +5.1 0.6455696 5.1 3.3 1.7 0.5 0.6455696 0.74999994 0.246376812 0.2 5.0999999999999996 0.64556962025316444 5.0999999999999996 3.2999999999999998 1.7 0.5 0.64556962025316444 0.74999999999999989 0.24637681159420291 0.20000000000000001 0 0.235294119 0.235294119 0.545454562 0.166666672 0.1904762 0.23529411764705882 0.23529411764705882 0.54545454545454541 0.16666666666666666 0.19047619047619047 0.8634792 0.8634792 1.07092619 0.408455431 0.3510531 0.86347915300377087 0.86347915300377087 1.0709262120491514 0.40845544324330579 0.35105308955573578 0.183586776 0.183586776 0.733567655 0.13329801 0.29663077 0.18358681923369741 0.18358681923369741 0.73356785053506501 0.1332979854433643 0.29663078722186503 +4.8 0.607594967 4.8 3.4 1.9 0.2 0.607594967 0.772727251 0.2753623 0.0800000057 4.7999999999999998 0.60759493670886067 4.7999999999999998 3.3999999999999999 1.8999999999999999 0.20000000000000001 0.60759493670886067 0.77272727272727271 0.27536231884057971 0.080000000000000016 0 0.14705883 0.14705883 0.590909064 0.1904762 0.04761905 0.14705882352941177 0.14705882352941177 0.59090909090909094 0.19047619047619047 0.047619047619047616 0.8126863 0.8126863 1.10337853 0.456509024 0.140421242 0.81268626165060787 0.81268626165060787 1.1033785215051863 0.45650902480134176 0.14042123582229432 0.09137413 0.09137413 0.797875941 0.1785302 0.07146728 0.091374136005250073 0.091374136005250073 0.79787580879856601 0.17853019682812199 0.071467286508792471 +5 0.6329114 5 3 1.6 0.2 0.6329114 0.6818181 0.231884047 0.0800000057 5 0.63291139240506322 5 3 1.6000000000000001 0.20000000000000001 0.63291139240506322 0.68181818181818177 0.23188405797101452 0.080000000000000016 0 0.205882356 0.205882356 0.4090909 0.142857149 0.04761905 0.20588235294117646 0.20588235294117646 0.40909090909090912 0.14285714285714285 0.047619047619047616 0.8465482 0.8465482 0.9735693 0.38442865 0.140421242 0.84654818921938324 0.84654818921938324 0.97356928368104678 0.38442865246428787 0.14042123582229432 0.14861621 0.14861621 0.480745673 0.112279132 0.07146728 0.14861616399327332 0.14861616399327332 0.4807456731235793 0.11227913256984562 0.071467286508792471 +5 0.6329114 5 3.4 1.6 0.4 0.6329114 0.772727251 0.231884047 0.160000011 5 0.63291139240506322 5 3.3999999999999999 1.6000000000000001 0.40000000000000002 0.63291139240506322 0.77272727272727271 0.23188405797101452 0.16000000000000003 0 0.205882356 0.205882356 0.590909064 0.142857149 0.142857149 0.20588235294117646 0.20588235294117646 0.59090909090909094 0.14285714285714285 0.14285714285714285 0.8465482 0.8465482 1.10337853 0.38442865 0.280842483 0.84654818921938324 0.84654818921938324 1.1033785215051863 0.38442865246428787 0.28084247164458864 0.14861621 0.14861621 0.797875941 0.112279132 0.223406911 0.14861616399327332 0.14861616399327332 0.79787580879856601 0.11227913256984562 0.22340689032507804 +5.2 0.6582278 5.2 3.5 1.5 0.2 0.6582278 0.7954545 0.2173913 0.0800000057 5.2000000000000002 0.65822784810126578 5.2000000000000002 3.5 1.5 0.20000000000000001 0.65822784810126578 0.79545454545454541 0.21739130434782611 0.080000000000000016 0 0.2647059 0.2647059 0.6363636 0.119047619 0.04761905 0.26470588235294118 0.26470588235294118 0.63636363636363635 0.11904761904761904 0.047619047619047616 0.880410135 0.880410135 1.13583088 0.360401869 0.140421242 0.88041011678815861 0.88041011678815861 1.1358308309612213 0.36040186168526983 0.14042123582229432 0.222458825 0.222458825 0.8504554 0.0926237255 0.07146728 0.22245879972342997 0.22245879972342997 0.8504555107896975 0.092623715229236292 0.071467286508792471 +5.2 0.6582278 5.2 3.4 1.4 0.2 0.6582278 0.772727251 0.202898547 0.0800000057 5.2000000000000002 0.65822784810126578 5.2000000000000002 3.3999999999999999 1.3999999999999999 0.20000000000000001 0.65822784810126578 0.77272727272727271 0.20289855072463767 0.080000000000000016 0 0.2647059 0.2647059 0.590909064 0.0952381 0.04761905 0.26470588235294118 0.26470588235294118 0.59090909090909094 0.095238095238095233 0.047619047619047616 0.880410135 0.880410135 1.10337853 0.336375058 0.140421242 0.88041011678815861 0.88041011678815861 1.1033785215051863 0.33637507090625185 0.14042123582229432 0.222458825 0.222458825 0.797875941 0.07455328 0.07146728 0.22245879972342997 0.22245879972342997 0.79787580879856601 0.074553292690365869 0.071467286508792471 +4.7 0.594936669 4.7 3.2 1.6 0.2 0.594936669 0.7272727 0.231884047 0.0800000057 4.7000000000000002 0.59493670886075944 4.7000000000000002 3.2000000000000002 1.6000000000000001 0.20000000000000001 0.59493670886075944 0.72727272727272729 0.23188405797101452 0.080000000000000016 0 0.117647059 0.117647059 0.5 0.142857149 0.04761905 0.11764705882352941 0.11764705882352941 0.5 0.14285714285714285 0.047619047619047616 0.7957553 0.7957553 1.038474 0.38442865 0.140421242 0.79575529786622023 0.79575529786622023 1.0384739025931167 0.38442865246428787 0.14042123582229432 0.06917418 0.06917418 0.6578964 0.112279132 0.07146728 0.069174201507542998 0.069174201507542998 0.65789648182451921 0.11227913256984562 0.071467286508792471 +4.8 0.607594967 4.8 3.1 1.6 0.2 0.607594967 0.7045454 0.231884047 0.0800000057 4.7999999999999998 0.60759493670886067 4.7999999999999998 3.1000000000000001 1.6000000000000001 0.20000000000000001 0.60759493670886067 0.70454545454545459 0.23188405797101452 0.080000000000000016 0 0.14705883 0.14705883 0.454545468 0.142857149 0.04761905 0.14705882352941177 0.14705882352941177 0.45454545454545453 0.14285714285714285 0.047619047619047616 0.8126863 0.8126863 1.0060215 0.38442865 0.140421242 0.81268626165060787 0.81268626165060787 1.0060215931370817 0.38442865246428787 0.14042123582229432 0.09137413 0.09137413 0.5725629 0.112279132 0.07146728 0.091374136005250073 0.091374136005250073 0.5725628341629212 0.11227913256984562 0.071467286508792471 +5.4 0.683544338 5.4 3.4 1.5 0.4 0.683544338 0.772727251 0.2173913 0.160000011 5.4000000000000004 0.68354430379746833 5.4000000000000004 3.3999999999999999 1.5 0.40000000000000002 0.68354430379746833 0.77272727272727271 0.21739130434782611 0.16000000000000003 0 0.323529422 0.323529422 0.590909064 0.119047619 0.142857149 0.3235294117647059 0.3235294117647059 0.59090909090909094 0.11904761904761904 0.14285714285714285 0.9142721 0.9142721 1.10337853 0.360401869 0.280842483 0.91427204435693399 0.91427204435693399 1.1033785215051863 0.36040186168526983 0.28084247164458864 0.3099612 0.3099612 0.797875941 0.0926237255 0.223406911 0.30996111189240849 0.30996111189240849 0.79787580879856601 0.092623715229236292 0.22340689032507804 +5.2 0.6582278 5.2 4.1 1.5 0.1 0.6582278 0.9318181 0.2173913 0.0400000028 5.2000000000000002 0.65822784810126578 5.2000000000000002 4.0999999999999996 1.5 0.10000000000000001 0.65822784810126578 0.93181818181818166 0.21739130434782611 0.040000000000000008 0 0.2647059 0.2647059 0.909090936 0.119047619 0 0.26470588235294118 0.26470588235294118 0.90909090909090906 0.11904761904761904 0 0.880410135 0.880410135 1.33054459 0.360401869 0.07021062 0.88041011678815861 0.88041011678815861 1.3305446876974305 0.36040186168526983 0.070210617911147161 0.222458825 0.222458825 0.984447062 0.0926237255 0.0149739943 0.22245879972342997 0.22245879972342997 0.98444709277532771 0.092623715229236292 0.014973996264087019 +5.5 0.6962025 5.5 4.2 1.4 0.2 0.6962025 0.9545454 0.202898547 0.0800000057 5.5 0.69620253164556956 5.5 4.2000000000000002 1.3999999999999999 0.20000000000000001 0.69620253164556956 0.95454545454545459 0.20289855072463767 0.080000000000000016 0 0.3529412 0.3529412 0.954545438 0.0952381 0.04761905 0.35294117647058826 0.35294117647058826 0.95454545454545459 0.095238095238095233 0.047619047619047616 0.931203067 0.931203067 1.36299694 0.336375058 0.140421242 0.93120300814132162 0.93120300814132162 1.3629969971534657 0.33637507090625185 0.14042123582229432 0.3573058 0.3573058 0.9899987 0.07455328 0.07146728 0.35730592590256216 0.35730592590256216 0.98999870773555454 0.074553292690365869 0.071467286508792471 +4.9 0.6202532 4.9 3.1 1.5 0.1 0.6202532 0.7045454 0.2173913 0.0400000028 4.9000000000000004 0.620253164556962 4.9000000000000004 3.1000000000000001 1.5 0.10000000000000001 0.620253164556962 0.70454545454545459 0.21739130434782611 0.040000000000000008 0 0.1764706 0.1764706 0.454545468 0.119047619 0 0.17647058823529413 0.17647058823529413 0.45454545454545453 0.11904761904761904 0 0.829617262 0.829617262 1.0060215 0.360401869 0.07021062 0.82961722543499561 0.82961722543499561 1.0060215931370817 0.36040186168526983 0.070210617911147161 0.117838435 0.117838435 0.5725629 0.0926237255 0.0149739943 0.11783846996167147 0.11783846996167147 0.5725628341629212 0.092623715229236292 0.014973996264087019 +5 0.6329114 5 3.2 1.2 0.2 0.6329114 0.7272727 0.173913047 0.0800000057 5 0.63291139240506322 5 3.2000000000000002 1.2 0.20000000000000001 0.63291139240506322 0.72727272727272729 0.17391304347826086 0.080000000000000016 0 0.205882356 0.205882356 0.5 0.04761905 0.04761905 0.20588235294117646 0.20588235294117646 0.5 0.047619047619047616 0.047619047619047616 0.8465482 0.8465482 1.038474 0.2883215 0.140421242 0.84654818921938324 0.84654818921938324 1.0384739025931167 0.28832148934821589 0.14042123582229432 0.14861621 0.14861621 0.6578964 0.0439706929 0.07146728 0.14861616399327332 0.14861616399327332 0.65789648182451921 0.043970678884132197 0.071467286508792471 +5.5 0.6962025 5.5 3.5 1.3 0.2 0.6962025 0.7954545 0.188405782 0.0800000057 5.5 0.69620253164556956 5.5 3.5 1.3 0.20000000000000001 0.69620253164556956 0.79545454545454541 0.18840579710144928 0.080000000000000016 0 0.3529412 0.3529412 0.6363636 0.0714285746 0.04761905 0.35294117647058826 0.35294117647058826 0.63636363636363635 0.071428571428571425 0.047619047619047616 0.931203067 0.931203067 1.13583088 0.312348276 0.140421242 0.93120300814132162 0.93120300814132162 1.1358308309612213 0.31234828012723387 0.14042123582229432 0.3573058 0.3573058 0.8504554 0.0582755022 0.07146728 0.35730592590256216 0.35730592590256216 0.8504555107896975 0.058275496366795021 0.071467286508792471 +4.9 0.6202532 4.9 3.1 1.5 0.1 0.6202532 0.7045454 0.2173913 0.0400000028 4.9000000000000004 0.620253164556962 4.9000000000000004 3.1000000000000001 1.5 0.10000000000000001 0.620253164556962 0.70454545454545459 0.21739130434782611 0.040000000000000008 0 0.1764706 0.1764706 0.454545468 0.119047619 0 0.17647058823529413 0.17647058823529413 0.45454545454545453 0.11904761904761904 0 0.829617262 0.829617262 1.0060215 0.360401869 0.07021062 0.82961722543499561 0.82961722543499561 1.0060215931370817 0.36040186168526983 0.070210617911147161 0.117838435 0.117838435 0.5725629 0.0926237255 0.0149739943 0.11783846996167147 0.11783846996167147 0.5725628341629212 0.092623715229236292 0.014973996264087019 +4.4 0.5569621 4.4 3 1.3 0.2 0.5569621 0.6818181 0.188405782 0.0800000057 4.4000000000000004 0.55696202531645567 4.4000000000000004 3 1.3 0.20000000000000001 0.55696202531645567 0.68181818181818177 0.18840579710144928 0.080000000000000016 0 0.0294117648 0.0294117648 0.4090909 0.0714285746 0.04761905 0.029411764705882353 0.029411764705882353 0.40909090909090912 0.071428571428571425 0.047619047619047616 0.744962454 0.744962454 0.9735693 0.312348276 0.140421242 0.74496240651305734 0.74496240651305734 0.97356928368104678 0.31234828012723387 0.14042123582229432 0.0255098473 0.0255098473 0.480745673 0.0582755022 0.07146728 0.025509830781751675 0.025509830781751675 0.4807456731235793 0.058275496366795021 0.071467286508792471 +5.1 0.6455696 5.1 3.4 1.5 0.2 0.6455696 0.772727251 0.2173913 0.0800000057 5.0999999999999996 0.64556962025316444 5.0999999999999996 3.3999999999999999 1.5 0.20000000000000001 0.64556962025316444 0.77272727272727271 0.21739130434782611 0.080000000000000016 0 0.235294119 0.235294119 0.590909064 0.119047619 0.04761905 0.23529411764705882 0.23529411764705882 0.59090909090909094 0.11904761904761904 0.047619047619047616 0.8634792 0.8634792 1.10337853 0.360401869 0.140421242 0.86347915300377087 0.86347915300377087 1.1033785215051863 0.36040186168526983 0.14042123582229432 0.183586776 0.183586776 0.797875941 0.0926237255 0.07146728 0.18358681923369741 0.18358681923369741 0.79787580879856601 0.092623715229236292 0.071467286508792471 +5 0.6329114 5 3.5 1.3 0.3 0.6329114 0.7954545 0.188405782 0.120000005 5 0.63291139240506322 5 3.5 1.3 0.29999999999999999 0.63291139240506322 0.79545454545454541 0.18840579710144928 0.12 0 0.205882356 0.205882356 0.6363636 0.0714285746 0.0952381 0.20588235294117646 0.20588235294117646 0.63636363636363635 0.071428571428571425 0.095238095238095233 0.8465482 0.8465482 1.13583088 0.312348276 0.210631862 0.84654818921938324 0.84654818921938324 1.1358308309612213 0.31234828012723387 0.21063185373344145 0.14861621 0.14861621 0.8504554 0.0582755022 0.146190211 0.14861616399327332 0.14861616399327332 0.8504555107896975 0.058275496366795021 0.14619023377705653 +4.5 0.569620252 4.5 2.3 1.3 0.3 0.569620252 0.522727251 0.188405782 0.120000005 4.5 0.56962025316455689 4.5 2.2999999999999998 1.3 0.29999999999999999 0.56962025316455689 0.52272727272727271 0.18840579710144928 0.12 0 0.05882353 0.05882353 0.09090909 0.0714285746 0.0952381 0.058823529411764705 0.058823529411764705 0.090909090909090912 0.071428571428571425 0.095238095238095233 0.7618934 0.7618934 0.7464031 0.312348276 0.210631862 0.76189337029744486 0.76189337029744486 0.7464031174888025 0.31234828012723387 0.21063185373344145 0.0366229452 0.0366229452 0.02727463 0.0582755022 0.146190211 0.036622927317243759 0.036622927317243759 0.027274649605582402 0.058275496366795021 0.14619023377705653 +4.4 0.5569621 4.4 3.2 1.3 0.2 0.5569621 0.7272727 0.188405782 0.0800000057 4.4000000000000004 0.55696202531645567 4.4000000000000004 3.2000000000000002 1.3 0.20000000000000001 0.55696202531645567 0.72727272727272729 0.18840579710144928 0.080000000000000016 0 0.0294117648 0.0294117648 0.5 0.0714285746 0.04761905 0.029411764705882353 0.029411764705882353 0.5 0.071428571428571425 0.047619047619047616 0.744962454 0.744962454 1.038474 0.312348276 0.140421242 0.74496240651305734 0.74496240651305734 1.0384739025931167 0.31234828012723387 0.14042123582229432 0.0255098473 0.0255098473 0.6578964 0.0582755022 0.07146728 0.025509830781751675 0.025509830781751675 0.65789648182451921 0.058275496366795021 0.071467286508792471 +5 0.6329114 5 3.5 1.6 0.6 0.6329114 0.7954545 0.231884047 0.24000001 5 0.63291139240506322 5 3.5 1.6000000000000001 0.59999999999999998 0.63291139240506322 0.79545454545454541 0.23188405797101452 0.23999999999999999 0 0.205882356 0.205882356 0.6363636 0.142857149 0.238095239 0.20588235294117646 0.20588235294117646 0.63636363636363635 0.14285714285714285 0.23809523809523808 0.8465482 0.8465482 1.13583088 0.38442865 0.421263725 0.84654818921938324 0.84654818921938324 1.1358308309612213 0.38442865246428787 0.42126370746688291 0.14861621 0.14861621 0.8504554 0.112279132 0.363569826 0.14861616399327332 0.14861616399327332 0.8504555107896975 0.11227913256984562 0.36356980977329256 +5.1 0.6455696 5.1 3.8 1.9 0.4 0.6455696 0.8636363 0.2753623 0.160000011 5.0999999999999996 0.64556962025316444 5.0999999999999996 3.7999999999999998 1.8999999999999999 0.40000000000000002 0.64556962025316444 0.86363636363636354 0.27536231884057971 0.16000000000000003 0 0.235294119 0.235294119 0.772727251 0.1904762 0.142857149 0.23529411764705882 0.23529411764705882 0.77272727272727271 0.19047619047619047 0.14285714285714285 0.8634792 0.8634792 1.23318768 0.456509024 0.280842483 0.86347915300377087 0.86347915300377087 1.2331877593293259 0.45650902480134176 0.28084247164458864 0.183586776 0.183586776 0.9472266 0.1785302 0.223406911 0.18358681923369741 0.18358681923369741 0.94722658326235554 0.17853019682812199 0.22340689032507804 +4.8 0.607594967 4.8 3 1.4 0.3 0.607594967 0.6818181 0.202898547 0.120000005 4.7999999999999998 0.60759493670886067 4.7999999999999998 3 1.3999999999999999 0.29999999999999999 0.60759493670886067 0.68181818181818177 0.20289855072463767 0.12 0 0.14705883 0.14705883 0.4090909 0.0952381 0.0952381 0.14705882352941177 0.14705882352941177 0.40909090909090912 0.095238095238095233 0.095238095238095233 0.8126863 0.8126863 0.9735693 0.336375058 0.210631862 0.81268626165060787 0.81268626165060787 0.97356928368104678 0.33637507090625185 0.21063185373344145 0.09137413 0.09137413 0.480745673 0.07455328 0.146190211 0.091374136005250073 0.091374136005250073 0.4807456731235793 0.074553292690365869 0.14619023377705653 +5.1 0.6455696 5.1 3.8 1.6 0.2 0.6455696 0.8636363 0.231884047 0.0800000057 5.0999999999999996 0.64556962025316444 5.0999999999999996 3.7999999999999998 1.6000000000000001 0.20000000000000001 0.64556962025316444 0.86363636363636354 0.23188405797101452 0.080000000000000016 0 0.235294119 0.235294119 0.772727251 0.142857149 0.04761905 0.23529411764705882 0.23529411764705882 0.77272727272727271 0.14285714285714285 0.047619047619047616 0.8634792 0.8634792 1.23318768 0.38442865 0.140421242 0.86347915300377087 0.86347915300377087 1.2331877593293259 0.38442865246428787 0.14042123582229432 0.183586776 0.183586776 0.9472266 0.112279132 0.07146728 0.18358681923369741 0.18358681923369741 0.94722658326235554 0.11227913256984562 0.071467286508792471 +4.6 0.5822785 4.6 3.2 1.4 0.2 0.5822785 0.7272727 0.202898547 0.0800000057 4.5999999999999996 0.58227848101265811 4.5999999999999996 3.2000000000000002 1.3999999999999999 0.20000000000000001 0.58227848101265811 0.72727272727272729 0.20289855072463767 0.080000000000000016 0 0.0882353 0.0882353 0.5 0.0952381 0.04761905 0.088235294117647065 0.088235294117647065 0.5 0.095238095238095233 0.047619047619047616 0.7788243 0.7788243 1.038474 0.336375058 0.140421242 0.77882433408183249 0.77882433408183249 1.0384739025931167 0.33637507090625185 0.14042123582229432 0.0510348342 0.0510348342 0.6578964 0.07455328 0.07146728 0.05103484272829939 0.05103484272829939 0.65789648182451921 0.074553292690365869 0.071467286508792471 +5.3 0.6708861 5.3 3.7 1.5 0.2 0.6708861 0.840909064 0.2173913 0.0800000057 5.2999999999999998 0.670886075949367 5.2999999999999998 3.7000000000000002 1.5 0.20000000000000001 0.670886075949367 0.84090909090909094 0.21739130434782611 0.080000000000000016 0 0.294117659 0.294117659 0.727272749 0.119047619 0.04761905 0.29411764705882354 0.29411764705882354 0.72727272727272729 0.11904761904761904 0.047619047619047616 0.897341132 0.897341132 1.20073545 0.360401869 0.140421242 0.89734108057254625 0.89734108057254625 1.2007354498732912 0.36040186168526983 0.14042123582229432 0.264780223 0.264780223 0.9236834 0.0926237255 0.07146728 0.26478014840942388 0.26478014840942388 0.92368343544686704 0.092623715229236292 0.071467286508792471 +5 0.6329114 5 3.3 1.4 0.2 0.6329114 0.74999994 0.202898547 0.0800000057 5 0.63291139240506322 5 3.2999999999999998 1.3999999999999999 0.20000000000000001 0.63291139240506322 0.74999999999999989 0.20289855072463767 0.080000000000000016 0 0.205882356 0.205882356 0.545454562 0.0952381 0.04761905 0.20588235294117646 0.20588235294117646 0.54545454545454541 0.095238095238095233 0.047619047619047616 0.8465482 0.8465482 1.07092619 0.336375058 0.140421242 0.84654818921938324 0.84654818921938324 1.0709262120491514 0.33637507090625185 0.14042123582229432 0.14861621 0.14861621 0.733567655 0.07455328 0.07146728 0.14861616399327332 0.14861616399327332 0.73356785053506501 0.074553292690365869 0.071467286508792471 +7 0.886076 7 3.2 4.7 1.4 0.886076 0.7272727 0.6811594 0.56 7 0.88607594936708844 7 3.2000000000000002 4.7000000000000002 1.3999999999999999 0.88607594936708844 0.72727272727272729 0.6811594202898551 0.55999999999999994 1 0.7941176 0.7941176 0.5 0.547619045 0.476190478 0.79411764705882348 0.79411764705882348 0.5 0.54761904761904767 0.47619047619047616 1.18516755 1.18516755 1.038474 1.12925911 0.982948661 1.1851674649071366 1.1851674649071366 1.0384739025931167 1.1292591666138456 0.98294865075606008 0.91099143 0.91099143 0.6578964 0.734288335 0.6955889 0.9109914626370752 0.9109914626370752 0.65789648182451921 0.73428833770009005 0.69558889835906823 +6.4 0.8101266 6.4 3.2 4.5 1.5 0.8101266 0.7272727 0.6521739 0.6 6.4000000000000004 0.81012658227848089 6.4000000000000004 3.2000000000000002 4.5 1.5 0.81012658227848089 0.72727272727272729 0.65217391304347827 0.60000000000000009 1 0.617647052 0.617647052 0.5 0.5 0.523809552 0.61764705882352944 0.61764705882352944 0.5 0.5 0.52380952380952384 1.08358181 1.08358181 1.038474 1.08120561 1.05315924 1.0835816822008106 1.0835816822008106 1.0384739025931167 1.0812055850558095 1.0531592686672073 0.7613054 0.7613054 0.6578964 0.7093809 0.719658256 0.76130542616799635 0.76130542616799635 0.65789648182451921 0.70938088629442786 0.71965826470413374 +6.9 0.873417735 6.9 3.1 4.9 1.5 0.873417735 0.7045454 0.710144937 0.6 6.9000000000000004 0.87341772151898722 6.9000000000000004 3.1000000000000001 4.9000000000000004 1.5 0.87341772151898722 0.70454545454545459 0.71014492753623193 0.60000000000000009 1 0.7647059 0.7647059 0.454545468 0.5952381 0.523809552 0.76470588235294112 0.76470588235294112 0.45454545454545453 0.59523809523809523 0.52380952380952384 1.16823661 1.16823661 1.0060215 1.17731273 1.05315924 1.1682365011227489 1.1682365011227489 1.0060215931370817 1.1773127481718815 1.0531592686672073 0.8933714 0.8933714 0.5725629 0.757097244 0.719658256 0.89337135404275458 0.89337135404275458 0.5725628341629212 0.75709721026728072 0.71965826470413374 +5.5 0.6962025 5.5 2.3 4 1.3 0.6962025 0.522727251 0.5797101 0.52 5.5 0.69620253164556956 5.5 2.2999999999999998 4 1.3 0.69620253164556956 0.52272727272727271 0.57971014492753625 0.52000000000000002 1 0.3529412 0.3529412 0.09090909 0.3809524 0.428571433 0.35294117647058826 0.35294117647058826 0.090909090909090912 0.38095238095238093 0.42857142857142855 0.931203067 0.931203067 0.7464031 0.9610716 0.912738 0.93120300814132162 0.93120300814132162 0.7464031174888025 0.96107163116071959 0.91273803284491306 0.3573058 0.3573058 0.02727463 0.636991262 0.6687579 0.35730592590256216 0.35730592590256216 0.027274649605582402 0.63699126114775995 0.66875793094202918 +6.5 0.822784841 6.5 2.8 4.6 1.5 0.822784841 0.6363636 0.6666666 0.6 6.5 0.82278481012658211 6.5 2.7999999999999998 4.5999999999999996 1.5 0.82278481012658211 0.63636363636363635 0.66666666666666663 0.60000000000000009 1 0.647058845 0.647058845 0.3181818 0.523809552 0.523809552 0.6470588235294118 0.6470588235294118 0.31818181818181818 0.52380952380952384 0.52380952380952384 1.10051274 1.10051274 0.908664644 1.10523236 1.05315924 1.1005126459851982 1.1005126459851982 0.908664664768977 1.1052323758348275 1.0531592686672073 0.7940583 0.7940583 0.296437562 0.7221062 0.719658256 0.79405825408863862 0.79405825408863862 0.29643751019242903 0.72210618745756316 0.71965826470413374 +5.7 0.721519 5.7 2.8 4.5 1.3 0.721519 0.6363636 0.6521739 0.52 5.7000000000000002 0.72151898734177211 5.7000000000000002 2.7999999999999998 4.5 1.3 0.72151898734177211 0.63636363636363635 0.65217391304347827 0.52000000000000002 1 0.4117647 0.4117647 0.3181818 0.5 0.428571433 0.41176470588235292 0.41176470588235292 0.31818181818181818 0.5 0.42857142857142855 0.965064943 0.965064943 0.908664644 1.08120561 0.912738 0.96506493571009688 0.96506493571009688 0.908664664768977 1.0812055850558095 0.91273803284491306 0.455403626 0.455403626 0.296437562 0.7093809 0.6687579 0.45540375842690767 0.45540375842690767 0.29643751019242903 0.70938088629442786 0.66875793094202918 +6.3 0.797468364 6.3 3.3 4.7 1.6 0.797468364 0.74999994 0.6811594 0.640000045 6.2999999999999998 0.79746835443037956 6.2999999999999998 3.2999999999999998 4.7000000000000002 1.6000000000000001 0.79746835443037956 0.74999999999999989 0.6811594202898551 0.64000000000000012 1 0.5882353 0.5882353 0.545454562 0.547619045 0.5714286 0.58823529411764708 0.58823529411764708 0.54545454545454541 0.54761904761904767 0.5714285714285714 1.06665075 1.06665075 1.07092619 1.12925911 1.12336993 1.0666507184164229 1.0666507184164229 1.0709262120491514 1.1292591666138456 1.1233698865783546 0.72531265 0.72531265 0.733567655 0.734288335 0.7413043 0.72531248018388961 0.72531248018388961 0.73356785053506501 0.73428833770009005 0.74130430666213609 +4.9 0.6202532 4.9 2.4 3.3 1 0.6202532 0.545454562 0.478260845 0.4 4.9000000000000004 0.620253164556962 4.9000000000000004 2.3999999999999999 3.2999999999999998 1 0.620253164556962 0.54545454545454541 0.47826086956521741 0.40000000000000002 1 0.1764706 0.1764706 0.13636364 0.238095239 0.2857143 0.17647058823529413 0.17647058823529413 0.13636363636363635 0.23809523809523808 0.2857142857142857 0.829617262 0.829617262 0.778855443 0.792884052 0.7021062 0.82961722543499561 0.82961722543499561 0.77885542694483745 0.79288409570759366 0.70210617911147155 0.117838435 0.117838435 0.052431643 0.508717 0.567488432 0.11783846996167147 0.11783846996167147 0.052431629740293029 0.50871703350008446 0.56748843907683133 +6.6 0.835443 6.6 2.9 4.6 1.3 0.835443 0.659090936 0.6666666 0.52 6.5999999999999996 0.83544303797468333 6.5999999999999996 2.8999999999999999 4.5999999999999996 1.3 0.83544303797468333 0.65909090909090906 0.66666666666666663 0.52000000000000002 1 0.6764706 0.6764706 0.363636374 0.523809552 0.428571433 0.67647058823529416 0.67647058823529416 0.36363636363636365 0.52380952380952384 0.42857142857142855 1.11744368 1.11744368 0.941117 1.10523236 0.912738 1.1174436097695859 1.1174436097695859 0.94111697422501195 1.1052323758348275 0.91273803284491306 0.8235505 0.8235505 0.386941522 0.7221062 0.6687579 0.82355060799945012 0.82355060799945012 0.38694155923435009 0.72210618745756316 0.66875793094202918 +5.2 0.6582278 5.2 2.7 3.9 1.4 0.6582278 0.6136364 0.5652174 0.56 5.2000000000000002 0.65822784810126578 5.2000000000000002 2.7000000000000002 3.8999999999999999 1.3999999999999999 0.65822784810126578 0.61363636363636365 0.56521739130434778 0.55999999999999994 1 0.2647059 0.2647059 0.272727281 0.357142866 0.476190478 0.26470588235294118 0.26470588235294118 0.27272727272727271 0.35714285714285715 0.47619047619047616 0.880410135 0.880410135 0.876212358 0.937044859 0.982948661 0.88041011678815861 0.88041011678815861 0.87621235531294217 0.93704484038170155 0.98294865075606008 0.222458825 0.222458825 0.214467555 0.620649636 0.6955889 0.22245879972342997 0.22245879972342997 0.21446754872116464 0.62064960460061858 0.69558889835906823 +5 0.6329114 5 2 3.5 1 0.6329114 0.454545438 0.5072464 0.4 5 0.63291139240506322 5 2 3.5 1 0.63291139240506322 0.45454545454545453 0.50724637681159424 0.40000000000000002 1 0.205882356 0.205882356 0 0.261904776 0.2857143 0.20588235294117646 0.20588235294117646 0 0.26190476190476192 0.2857142857142857 0.8465482 0.8465482 0.6490462 0.8409377 0.7021062 0.84654818921938324 0.84654818921938324 0.64904618912069789 0.84093767726562962 0.70210617911147155 0.14861621 0.14861621 0.00179608515 0.548691869 0.567488432 0.14861616399327332 0.14861616399327332 0.0017960868928680873 0.54869186015931659 0.56748843907683133 +5.9 0.7468355 5.9 3 4.2 1.5 0.7468355 0.6818181 0.6086956 0.6 5.9000000000000004 0.74683544303797467 5.9000000000000004 3 4.2000000000000002 1.5 0.74683544303797467 0.68181818181818177 0.60869565217391308 0.60000000000000009 1 0.470588237 0.470588237 0.4090909 0.428571433 0.523809552 0.47058823529411764 0.47058823529411764 0.40909090909090912 0.42857142857142855 0.52380952380952384 0.998926938 0.998926938 0.9735693 1.00912511 1.05315924 0.99892686327887226 0.99892686327887226 0.97356928368104678 1.0091252127187555 1.0531592686672073 0.5528621 0.5528621 0.480745673 0.667766631 0.719658256 0.55286190159866166 0.55286190159866166 0.4807456731235793 0.66776662351076677 0.71965826470413374 +6 0.7594937 6 2.2 4 1 0.7594937 0.5 0.5797101 0.4 6 0.75949367088607578 6 2.2000000000000002 4 1 0.75949367088607578 0.5 0.57971014492753625 0.40000000000000002 1 0.5 0.5 0.0454545468 0.3809524 0.2857143 0.5 0.5 0.045454545454545456 0.38095238095238093 0.2857142857142857 1.01585793 1.01585793 0.7139508 0.9610716 0.7021062 1.0158578270632599 1.0158578270632599 0.71395080803276778 0.96107163116071959 0.70210617911147155 0.5995771 0.5995771 0.0126449876 0.636991262 0.567488432 0.59957706030964308 0.59957706030964308 0.012644988485085273 0.63699126114775995 0.56748843907683133 +6.1 0.7721519 6.1 2.9 4.7 1.4 0.7721519 0.659090936 0.6811594 0.56 6.0999999999999996 0.772151898734177 6.0999999999999996 2.8999999999999999 4.7000000000000002 1.3999999999999999 0.772151898734177 0.65909090909090906 0.6811594202898551 0.55999999999999994 1 0.5294118 0.5294118 0.363636374 0.547619045 0.476190478 0.52941176470588236 0.52941176470588236 0.36363636363636365 0.54761904761904767 0.47619047619047616 1.03278887 1.03278887 0.941117 1.12925911 0.982948661 1.0327887908476474 1.0327887908476474 0.94111697422501195 1.1292591666138456 0.98294865075606008 0.644171059 0.644171059 0.386941522 0.734288335 0.6955889 0.64417093822767468 0.64417093822767468 0.38694155923435009 0.73428833770009005 0.69558889835906823 +5.6 0.708860755 5.6 2.9 3.6 1.3 0.708860755 0.659090936 0.5217391 0.52 5.5999999999999996 0.70886075949367078 5.5999999999999996 2.8999999999999999 3.6000000000000001 1.3 0.70886075949367078 0.65909090909090906 0.52173913043478259 0.52000000000000002 1 0.382352948 0.382352948 0.363636374 0.2857143 0.428571433 0.38235294117647056 0.38235294117647056 0.36363636363636365 0.2857142857142857 0.42857142857142855 0.948134 0.948134 0.941117 0.8649644 0.912738 0.94813397192570914 0.94813397192570914 0.94111697422501195 0.86496446804464766 0.91273803284491306 0.4060508 0.4060508 0.386941522 0.5676816 0.6687579 0.40605068921232229 0.40605068921232229 0.38694155923435009 0.56768154970207829 0.66875793094202918 +6.7 0.848101258 6.7 3.1 4.4 1.4 0.848101258 0.7045454 0.6376811 0.56 6.7000000000000002 0.84810126582278467 6.7000000000000002 3.1000000000000001 4.4000000000000004 1.3999999999999999 0.84810126582278467 0.70454545454545459 0.63768115942028991 0.55999999999999994 1 0.7058824 0.7058824 0.454545468 0.476190478 0.476190478 0.70588235294117652 0.70588235294117652 0.45454545454545453 0.47619047619047616 0.47619047619047616 1.13437462 1.13437462 1.0060215 1.05717874 0.982948661 1.1343745735539736 1.1343745735539736 1.0060215931370817 1.0571787942767916 0.98294865075606008 0.84984225 0.84984225 0.5725629 0.6960943 0.6955889 0.84984228863096656 0.84984228863096656 0.5725628341629212 0.69609423458217601 0.69558889835906823 +5.6 0.708860755 5.6 3 4.5 1.5 0.708860755 0.6818181 0.6521739 0.6 5.5999999999999996 0.70886075949367078 5.5999999999999996 3 4.5 1.5 0.70886075949367078 0.68181818181818177 0.65217391304347827 0.60000000000000009 1 0.382352948 0.382352948 0.4090909 0.5 0.523809552 0.38235294117647056 0.38235294117647056 0.40909090909090912 0.5 0.52380952380952384 0.948134 0.948134 0.9735693 1.08120561 1.05315924 0.94813397192570914 0.94813397192570914 0.97356928368104678 1.0812055850558095 1.0531592686672073 0.4060508 0.4060508 0.480745673 0.7093809 0.719658256 0.40605068921232229 0.40605068921232229 0.4807456731235793 0.70938088629442786 0.71965826470413374 +5.8 0.734177232 5.8 2.7 4.1 1 0.734177232 0.6136364 0.5942029 0.4 5.7999999999999998 0.73417721518987333 5.7999999999999998 2.7000000000000002 4.0999999999999996 1 0.73417721518987333 0.61363636363636365 0.59420289855072461 0.40000000000000002 1 0.441176474 0.441176474 0.272727281 0.4047619 0.2857143 0.44117647058823528 0.44117647058823528 0.27272727272727271 0.40476190476190477 0.2857142857142857 0.981996 0.981996 0.876212358 0.985098362 0.7021062 0.98199589949448451 0.98199589949448451 0.87621235531294217 0.98509842193973751 0.70210617911147155 0.504585147 0.504585147 0.214467555 0.6526925 0.567488432 0.50458515122771275 0.50458515122771275 0.21446754872116464 0.65269250269310186 0.56748843907683133 +6.2 0.7848101 6.2 2.2 4.5 1.5 0.7848101 0.5 0.6521739 0.6 6.2000000000000002 0.78481012658227833 6.2000000000000002 2.2000000000000002 4.5 1.5 0.78481012658227833 0.5 0.65217391304347827 0.60000000000000009 1 0.5588235 0.5588235 0.0454545468 0.5 0.523809552 0.55882352941176472 0.55882352941176472 0.045454545454545456 0.5 0.52380952380952384 1.04971981 1.04971981 0.7139508 1.08120561 1.05315924 1.0497197546320352 1.0497197546320352 0.71395080803276778 1.0812055850558095 1.0531592686672073 0.6861942 0.6861942 0.0126449876 0.7093809 0.719658256 0.6861941068147408 0.6861941068147408 0.012644988485085273 0.70938088629442786 0.71965826470413374 +5.6 0.708860755 5.6 2.5 3.9 1.1 0.708860755 0.5681818 0.5652174 0.440000027 5.5999999999999996 0.70886075949367078 5.5999999999999996 2.5 3.8999999999999999 1.1000000000000001 0.70886075949367078 0.56818181818181812 0.56521739130434778 0.44000000000000006 1 0.382352948 0.382352948 0.181818187 0.357142866 0.333333343 0.38235294117647056 0.38235294117647056 0.18181818181818182 0.35714285714285715 0.33333333333333331 0.948134 0.948134 0.8113077 0.937044859 0.7723168 0.94813397192570914 0.94813397192570914 0.81130773640087239 0.93704484038170155 0.7723167970226188 0.4060508 0.4060508 0.09116498 0.620649636 0.605188966 0.40605068921232229 0.40605068921232229 0.091164973250557446 0.62064960460061858 0.60518894407556645 +5.9 0.7468355 5.9 3.2 4.8 1.8 0.7468355 0.7272727 0.6956522 0.719999969 5.9000000000000004 0.74683544303797467 5.9000000000000004 3.2000000000000002 4.7999999999999998 1.8 0.74683544303797467 0.72727272727272729 0.69565217391304346 0.72000000000000008 1 0.470588237 0.470588237 0.5 0.5714286 0.6666667 0.47058823529411764 0.47058823529411764 0.5 0.5714285714285714 0.66666666666666663 0.998926938 0.998926938 1.038474 1.153286 1.26379108 0.99892686327887226 0.99892686327887226 1.0384739025931167 1.1532859573928635 1.2637911224006488 0.5528621 0.5528621 0.6578964 0.7459458 0.778455853 0.55286190159866166 0.55286190159866166 0.65789648182451921 0.74594581373449664 0.77845583371698512 +6.1 0.7721519 6.1 2.8 4 1.3 0.7721519 0.6363636 0.5797101 0.52 6.0999999999999996 0.772151898734177 6.0999999999999996 2.7999999999999998 4 1.3 0.772151898734177 0.63636363636363635 0.57971014492753625 0.52000000000000002 1 0.5294118 0.5294118 0.3181818 0.3809524 0.428571433 0.52941176470588236 0.52941176470588236 0.31818181818181818 0.38095238095238093 0.42857142857142855 1.03278887 1.03278887 0.908664644 0.9610716 0.912738 1.0327887908476474 1.0327887908476474 0.908664664768977 0.96107163116071959 0.91273803284491306 0.644171059 0.644171059 0.296437562 0.636991262 0.6687579 0.64417093822767468 0.64417093822767468 0.29643751019242903 0.63699126114775995 0.66875793094202918 +6.3 0.797468364 6.3 2.5 4.9 1.5 0.797468364 0.5681818 0.710144937 0.6 6.2999999999999998 0.79746835443037956 6.2999999999999998 2.5 4.9000000000000004 1.5 0.79746835443037956 0.56818181818181812 0.71014492753623193 0.60000000000000009 1 0.5882353 0.5882353 0.181818187 0.5952381 0.523809552 0.58823529411764708 0.58823529411764708 0.18181818181818182 0.59523809523809523 0.52380952380952384 1.06665075 1.06665075 0.8113077 1.17731273 1.05315924 1.0666507184164229 1.0666507184164229 0.81130773640087239 1.1773127481718815 1.0531592686672073 0.72531265 0.72531265 0.09116498 0.757097244 0.719658256 0.72531248018388961 0.72531248018388961 0.091164973250557446 0.75709721026728072 0.71965826470413374 +6.1 0.7721519 6.1 2.8 4.7 1.2 0.7721519 0.6363636 0.6811594 0.480000019 6.0999999999999996 0.772151898734177 6.0999999999999996 2.7999999999999998 4.7000000000000002 1.2 0.772151898734177 0.63636363636363635 0.6811594202898551 0.47999999999999998 1 0.5294118 0.5294118 0.3181818 0.547619045 0.3809524 0.52941176470588236 0.52941176470588236 0.31818181818181818 0.54761904761904767 0.38095238095238093 1.03278887 1.03278887 0.908664644 1.12925911 0.842527449 1.0327887908476474 1.0327887908476474 0.908664664768977 1.1292591666138456 0.84252741493376582 0.644171059 0.644171059 0.296437562 0.734288335 0.6387745 0.64417093822767468 0.64417093822767468 0.29643751019242903 0.73428833770009005 0.63877450359674082 +6.4 0.8101266 6.4 2.9 4.3 1.3 0.8101266 0.659090936 0.623188436 0.52 6.4000000000000004 0.81012658227848089 6.4000000000000004 2.8999999999999999 4.2999999999999998 1.3 0.81012658227848089 0.65909090909090906 0.62318840579710144 0.52000000000000002 1 0.617647052 0.617647052 0.363636374 0.452380955 0.428571433 0.61764705882352944 0.61764705882352944 0.36363636363636365 0.45238095238095238 0.42857142857142855 1.08358181 1.08358181 0.941117 1.033152 0.912738 1.0835816822008106 1.0835816822008106 0.94111697422501195 1.0331520034977735 0.91273803284491306 0.7613054 0.7613054 0.386941522 0.682228565 0.6687579 0.76130542616799635 0.76130542616799635 0.38694155923435009 0.68222849726345214 0.66875793094202918 +6.6 0.835443 6.6 3 4.4 1.4 0.835443 0.6818181 0.6376811 0.56 6.5999999999999996 0.83544303797468333 6.5999999999999996 3 4.4000000000000004 1.3999999999999999 0.83544303797468333 0.68181818181818177 0.63768115942028991 0.55999999999999994 1 0.6764706 0.6764706 0.4090909 0.476190478 0.476190478 0.67647058823529416 0.67647058823529416 0.40909090909090912 0.47619047619047616 0.47619047619047616 1.11744368 1.11744368 0.9735693 1.05717874 0.982948661 1.1174436097695859 1.1174436097695859 0.97356928368104678 1.0571787942767916 0.98294865075606008 0.8235505 0.8235505 0.480745673 0.6960943 0.6955889 0.82355060799945012 0.82355060799945012 0.4807456731235793 0.69609423458217601 0.69558889835906823 +6.8 0.860759556 6.8 2.8 4.8 1.4 0.860759556 0.6363636 0.6956522 0.56 6.7999999999999998 0.86075949367088589 6.7999999999999998 2.7999999999999998 4.7999999999999998 1.3999999999999999 0.86075949367088589 0.63636363636363635 0.69565217391304346 0.55999999999999994 1 0.7352941 0.7352941 0.3181818 0.5714286 0.476190478 0.73529411764705888 0.73529411764705888 0.31818181818181818 0.5714285714285714 0.47619047619047616 1.15130568 1.15130568 0.908664644 1.153286 0.982948661 1.1513055373383612 1.1513055373383612 0.908664664768977 1.1532859573928635 0.98294865075606008 0.873058 0.873058 0.296437562 0.7459458 0.6955889 0.87305788341059976 0.87305788341059976 0.29643751019242903 0.74594581373449664 0.69558889835906823 +6.7 0.848101258 6.7 3 5 1.7 0.848101258 0.6818181 0.7246376 0.68 6.7000000000000002 0.84810126582278467 6.7000000000000002 3 5 1.7 0.84810126582278467 0.68181818181818177 0.72463768115942029 0.68000000000000005 1 0.7058824 0.7058824 0.4090909 0.619047642 0.619047642 0.70588235294117652 0.70588235294117652 0.40909090909090912 0.61904761904761907 0.61904761904761907 1.13437462 1.13437462 0.9735693 1.20133948 1.19358051 1.1343745735539736 1.1343745735539736 0.97356928368104678 1.2013395389508994 1.1935805044895016 0.84984225 0.84984225 0.480745673 0.7677612 0.7608193 0.84984228863096656 0.84984228863096656 0.4807456731235793 0.76776110588492996 0.76081931222191046 +6 0.7594937 6 2.9 4.5 1.5 0.7594937 0.659090936 0.6521739 0.6 6 0.75949367088607578 6 2.8999999999999999 4.5 1.5 0.75949367088607578 0.65909090909090906 0.65217391304347827 0.60000000000000009 1 0.5 0.5 0.363636374 0.5 0.523809552 0.5 0.5 0.36363636363636365 0.5 0.52380952380952384 1.01585793 1.01585793 0.941117 1.08120561 1.05315924 1.0158578270632599 1.0158578270632599 0.94111697422501195 1.0812055850558095 1.0531592686672073 0.5995771 0.5995771 0.386941522 0.7093809 0.719658256 0.59957706030964308 0.59957706030964308 0.38694155923435009 0.70938088629442786 0.71965826470413374 +5.7 0.721519 5.7 2.6 3.5 1 0.721519 0.590909064 0.5072464 0.4 5.7000000000000002 0.72151898734177211 5.7000000000000002 2.6000000000000001 3.5 1 0.72151898734177211 0.59090909090909094 0.50724637681159424 0.40000000000000002 1 0.4117647 0.4117647 0.227272734 0.261904776 0.2857143 0.41176470588235292 0.41176470588235292 0.22727272727272727 0.26190476190476192 0.2857142857142857 0.965064943 0.965064943 0.84376 0.8409377 0.7021062 0.96506493571009688 0.96506493571009688 0.84376004585690734 0.84093767726562962 0.70210617911147155 0.455403626 0.455403626 0.145245746 0.548691869 0.567488432 0.45540375842690767 0.45540375842690767 0.14524588521591403 0.54869186015931659 0.56748843907683133 +5.5 0.6962025 5.5 2.4 3.8 1.1 0.6962025 0.545454562 0.5507246 0.440000027 5.5 0.69620253164556956 5.5 2.3999999999999999 3.7999999999999998 1.1000000000000001 0.69620253164556956 0.54545454545454541 0.55072463768115942 0.44000000000000006 1 0.3529412 0.3529412 0.13636364 0.333333343 0.333333343 0.35294117647058826 0.35294117647058826 0.13636363636363635 0.33333333333333331 0.33333333333333331 0.931203067 0.931203067 0.778855443 0.913018048 0.7723168 0.93120300814132162 0.93120300814132162 0.77885542694483745 0.91301804960268351 0.7723167970226188 0.3573058 0.3573058 0.052431643 0.6036563 0.605188966 0.35730592590256216 0.35730592590256216 0.052431629740293029 0.60365621138880055 0.60518894407556645 +5.5 0.6962025 5.5 2.4 3.7 1 0.6962025 0.545454562 0.5362319 0.4 5.5 0.69620253164556956 5.5 2.3999999999999999 3.7000000000000002 1 0.69620253164556956 0.54545454545454541 0.53623188405797106 0.40000000000000002 1 0.3529412 0.3529412 0.13636364 0.309523821 0.2857143 0.35294117647058826 0.35294117647058826 0.13636363636363635 0.30952380952380953 0.2857142857142857 0.931203067 0.931203067 0.778855443 0.888991237 0.7021062 0.93120300814132162 0.93120300814132162 0.77885542694483745 0.8889912588236657 0.70210617911147155 0.3573058 0.3573058 0.052431643 0.5860022 0.567488432 0.35730592590256216 0.35730592590256216 0.052431629740293029 0.58600218188861053 0.56748843907683133 +5.8 0.734177232 5.8 2.7 3.9 1.2 0.734177232 0.6136364 0.5652174 0.480000019 5.7999999999999998 0.73417721518987333 5.7999999999999998 2.7000000000000002 3.8999999999999999 1.2 0.73417721518987333 0.61363636363636365 0.56521739130434778 0.47999999999999998 1 0.441176474 0.441176474 0.272727281 0.357142866 0.3809524 0.44117647058823528 0.44117647058823528 0.27272727272727271 0.35714285714285715 0.38095238095238093 0.981996 0.981996 0.876212358 0.937044859 0.842527449 0.98199589949448451 0.98199589949448451 0.87621235531294217 0.93704484038170155 0.84252741493376582 0.504585147 0.504585147 0.214467555 0.620649636 0.6387745 0.50458515122771275 0.50458515122771275 0.21446754872116464 0.62064960460061858 0.63877450359674082 +6 0.7594937 6 2.7 5.1 1.6 0.7594937 0.6136364 0.7391304 0.640000045 6 0.75949367088607578 6 2.7000000000000002 5.0999999999999996 1.6000000000000001 0.75949367088607578 0.61363636363636365 0.73913043478260865 0.64000000000000012 1 0.5 0.5 0.272727281 0.642857134 0.5714286 0.5 0.5 0.27272727272727271 0.6428571428571429 0.5714285714285714 1.01585793 1.01585793 0.876212358 1.22536623 1.12336993 1.0158578270632599 1.0158578270632599 0.87621235531294217 1.2253663297299173 1.1233698865783546 0.5995771 0.5995771 0.214467555 0.777955949 0.7413043 0.59957706030964308 0.59957706030964308 0.21446754872116464 0.77795595083214475 0.74130430666213609 +5.4 0.683544338 5.4 3 4.5 1.5 0.683544338 0.6818181 0.6521739 0.6 5.4000000000000004 0.68354430379746833 5.4000000000000004 3 4.5 1.5 0.68354430379746833 0.68181818181818177 0.65217391304347827 0.60000000000000009 1 0.323529422 0.323529422 0.4090909 0.5 0.523809552 0.3235294117647059 0.3235294117647059 0.40909090909090912 0.5 0.52380952380952384 0.9142721 0.9142721 0.9735693 1.08120561 1.05315924 0.91427204435693399 0.91427204435693399 0.97356928368104678 1.0812055850558095 1.0531592686672073 0.3099612 0.3099612 0.480745673 0.7093809 0.719658256 0.30996111189240849 0.30996111189240849 0.4807456731235793 0.70938088629442786 0.71965826470413374 +6 0.7594937 6 3.4 4.5 1.6 0.7594937 0.772727251 0.6521739 0.640000045 6 0.75949367088607578 6 3.3999999999999999 4.5 1.6000000000000001 0.75949367088607578 0.77272727272727271 0.65217391304347827 0.64000000000000012 1 0.5 0.5 0.590909064 0.5 0.5714286 0.5 0.5 0.59090909090909094 0.5 0.5714285714285714 1.01585793 1.01585793 1.10337853 1.08120561 1.12336993 1.0158578270632599 1.0158578270632599 1.1033785215051863 1.0812055850558095 1.1233698865783546 0.5995771 0.5995771 0.797875941 0.7093809 0.7413043 0.59957706030964308 0.59957706030964308 0.79787580879856601 0.70938088629442786 0.74130430666213609 +6.7 0.848101258 6.7 3.1 4.7 1.5 0.848101258 0.7045454 0.6811594 0.6 6.7000000000000002 0.84810126582278467 6.7000000000000002 3.1000000000000001 4.7000000000000002 1.5 0.84810126582278467 0.70454545454545459 0.6811594202898551 0.60000000000000009 1 0.7058824 0.7058824 0.454545468 0.547619045 0.523809552 0.70588235294117652 0.70588235294117652 0.45454545454545453 0.54761904761904767 0.52380952380952384 1.13437462 1.13437462 1.0060215 1.12925911 1.05315924 1.1343745735539736 1.1343745735539736 1.0060215931370817 1.1292591666138456 1.0531592686672073 0.84984225 0.84984225 0.5725629 0.734288335 0.719658256 0.84984228863096656 0.84984228863096656 0.5725628341629212 0.73428833770009005 0.71965826470413374 +6.3 0.797468364 6.3 2.3 4.4 1.3 0.797468364 0.522727251 0.6376811 0.52 6.2999999999999998 0.79746835443037956 6.2999999999999998 2.2999999999999998 4.4000000000000004 1.3 0.79746835443037956 0.52272727272727271 0.63768115942028991 0.52000000000000002 1 0.5882353 0.5882353 0.09090909 0.476190478 0.428571433 0.58823529411764708 0.58823529411764708 0.090909090909090912 0.47619047619047616 0.42857142857142855 1.06665075 1.06665075 0.7464031 1.05717874 0.912738 1.0666507184164229 1.0666507184164229 0.7464031174888025 1.0571787942767916 0.91273803284491306 0.72531265 0.72531265 0.02727463 0.6960943 0.6687579 0.72531248018388961 0.72531248018388961 0.027274649605582402 0.69609423458217601 0.66875793094202918 +5.6 0.708860755 5.6 3 4.1 1.3 0.708860755 0.6818181 0.5942029 0.52 5.5999999999999996 0.70886075949367078 5.5999999999999996 3 4.0999999999999996 1.3 0.70886075949367078 0.68181818181818177 0.59420289855072461 0.52000000000000002 1 0.382352948 0.382352948 0.4090909 0.4047619 0.428571433 0.38235294117647056 0.38235294117647056 0.40909090909090912 0.40476190476190477 0.42857142857142855 0.948134 0.948134 0.9735693 0.985098362 0.912738 0.94813397192570914 0.94813397192570914 0.97356928368104678 0.98509842193973751 0.91273803284491306 0.4060508 0.4060508 0.480745673 0.6526925 0.6687579 0.40605068921232229 0.40605068921232229 0.4807456731235793 0.65269250269310186 0.66875793094202918 +5.5 0.6962025 5.5 2.5 4 1.3 0.6962025 0.5681818 0.5797101 0.52 5.5 0.69620253164556956 5.5 2.5 4 1.3 0.69620253164556956 0.56818181818181812 0.57971014492753625 0.52000000000000002 1 0.3529412 0.3529412 0.181818187 0.3809524 0.428571433 0.35294117647058826 0.35294117647058826 0.18181818181818182 0.38095238095238093 0.42857142857142855 0.931203067 0.931203067 0.8113077 0.9610716 0.912738 0.93120300814132162 0.93120300814132162 0.81130773640087239 0.96107163116071959 0.91273803284491306 0.3573058 0.3573058 0.09116498 0.636991262 0.6687579 0.35730592590256216 0.35730592590256216 0.091164973250557446 0.63699126114775995 0.66875793094202918 +5.5 0.6962025 5.5 2.6 4.4 1.2 0.6962025 0.590909064 0.6376811 0.480000019 5.5 0.69620253164556956 5.5 2.6000000000000001 4.4000000000000004 1.2 0.69620253164556956 0.59090909090909094 0.63768115942028991 0.47999999999999998 1 0.3529412 0.3529412 0.227272734 0.476190478 0.3809524 0.35294117647058826 0.35294117647058826 0.22727272727272727 0.47619047619047616 0.38095238095238093 0.931203067 0.931203067 0.84376 1.05717874 0.842527449 0.93120300814132162 0.93120300814132162 0.84376004585690734 1.0571787942767916 0.84252741493376582 0.3573058 0.3573058 0.145245746 0.6960943 0.6387745 0.35730592590256216 0.35730592590256216 0.14524588521591403 0.69609423458217601 0.63877450359674082 +6.1 0.7721519 6.1 3 4.6 1.4 0.7721519 0.6818181 0.6666666 0.56 6.0999999999999996 0.772151898734177 6.0999999999999996 3 4.5999999999999996 1.3999999999999999 0.772151898734177 0.68181818181818177 0.66666666666666663 0.55999999999999994 1 0.5294118 0.5294118 0.4090909 0.523809552 0.476190478 0.52941176470588236 0.52941176470588236 0.40909090909090912 0.52380952380952384 0.47619047619047616 1.03278887 1.03278887 0.9735693 1.10523236 0.982948661 1.0327887908476474 1.0327887908476474 0.97356928368104678 1.1052323758348275 0.98294865075606008 0.644171059 0.644171059 0.480745673 0.7221062 0.6955889 0.64417093822767468 0.64417093822767468 0.4807456731235793 0.72210618745756316 0.69558889835906823 +5.8 0.734177232 5.8 2.6 4 1.2 0.734177232 0.590909064 0.5797101 0.480000019 5.7999999999999998 0.73417721518987333 5.7999999999999998 2.6000000000000001 4 1.2 0.73417721518987333 0.59090909090909094 0.57971014492753625 0.47999999999999998 1 0.441176474 0.441176474 0.227272734 0.3809524 0.3809524 0.44117647058823528 0.44117647058823528 0.22727272727272727 0.38095238095238093 0.38095238095238093 0.981996 0.981996 0.84376 0.9610716 0.842527449 0.98199589949448451 0.98199589949448451 0.84376004585690734 0.96107163116071959 0.84252741493376582 0.504585147 0.504585147 0.145245746 0.636991262 0.6387745 0.50458515122771275 0.50458515122771275 0.14524588521591403 0.63699126114775995 0.63877450359674082 +5 0.6329114 5 2.3 3.3 1 0.6329114 0.522727251 0.478260845 0.4 5 0.63291139240506322 5 2.2999999999999998 3.2999999999999998 1 0.63291139240506322 0.52272727272727271 0.47826086956521741 0.40000000000000002 1 0.205882356 0.205882356 0.09090909 0.238095239 0.2857143 0.20588235294117646 0.20588235294117646 0.090909090909090912 0.23809523809523808 0.2857142857142857 0.8465482 0.8465482 0.7464031 0.792884052 0.7021062 0.84654818921938324 0.84654818921938324 0.7464031174888025 0.79288409570759366 0.70210617911147155 0.14861621 0.14861621 0.02727463 0.508717 0.567488432 0.14861616399327332 0.14861616399327332 0.027274649605582402 0.50871703350008446 0.56748843907683133 +5.6 0.708860755 5.6 2.7 4.2 1.3 0.708860755 0.6136364 0.6086956 0.52 5.5999999999999996 0.70886075949367078 5.5999999999999996 2.7000000000000002 4.2000000000000002 1.3 0.70886075949367078 0.61363636363636365 0.60869565217391308 0.52000000000000002 1 0.382352948 0.382352948 0.272727281 0.428571433 0.428571433 0.38235294117647056 0.38235294117647056 0.27272727272727271 0.42857142857142855 0.42857142857142855 0.948134 0.948134 0.876212358 1.00912511 0.912738 0.94813397192570914 0.94813397192570914 0.87621235531294217 1.0091252127187555 0.91273803284491306 0.4060508 0.4060508 0.214467555 0.667766631 0.6687579 0.40605068921232229 0.40605068921232229 0.21446754872116464 0.66776662351076677 0.66875793094202918 +5.7 0.721519 5.7 3 4.2 1.2 0.721519 0.6818181 0.6086956 0.480000019 5.7000000000000002 0.72151898734177211 5.7000000000000002 3 4.2000000000000002 1.2 0.72151898734177211 0.68181818181818177 0.60869565217391308 0.47999999999999998 1 0.4117647 0.4117647 0.4090909 0.428571433 0.3809524 0.41176470588235292 0.41176470588235292 0.40909090909090912 0.42857142857142855 0.38095238095238093 0.965064943 0.965064943 0.9735693 1.00912511 0.842527449 0.96506493571009688 0.96506493571009688 0.97356928368104678 1.0091252127187555 0.84252741493376582 0.455403626 0.455403626 0.480745673 0.667766631 0.6387745 0.45540375842690767 0.45540375842690767 0.4807456731235793 0.66776662351076677 0.63877450359674082 +5.7 0.721519 5.7 2.9 4.2 1.3 0.721519 0.659090936 0.6086956 0.52 5.7000000000000002 0.72151898734177211 5.7000000000000002 2.8999999999999999 4.2000000000000002 1.3 0.72151898734177211 0.65909090909090906 0.60869565217391308 0.52000000000000002 1 0.4117647 0.4117647 0.363636374 0.428571433 0.428571433 0.41176470588235292 0.41176470588235292 0.36363636363636365 0.42857142857142855 0.42857142857142855 0.965064943 0.965064943 0.941117 1.00912511 0.912738 0.96506493571009688 0.96506493571009688 0.94111697422501195 1.0091252127187555 0.91273803284491306 0.455403626 0.455403626 0.386941522 0.667766631 0.6687579 0.45540375842690767 0.45540375842690767 0.38694155923435009 0.66776662351076677 0.66875793094202918 +6.2 0.7848101 6.2 2.9 4.3 1.3 0.7848101 0.659090936 0.623188436 0.52 6.2000000000000002 0.78481012658227833 6.2000000000000002 2.8999999999999999 4.2999999999999998 1.3 0.78481012658227833 0.65909090909090906 0.62318840579710144 0.52000000000000002 1 0.5588235 0.5588235 0.363636374 0.452380955 0.428571433 0.55882352941176472 0.55882352941176472 0.36363636363636365 0.45238095238095238 0.42857142857142855 1.04971981 1.04971981 0.941117 1.033152 0.912738 1.0497197546320352 1.0497197546320352 0.94111697422501195 1.0331520034977735 0.91273803284491306 0.6861942 0.6861942 0.386941522 0.682228565 0.6687579 0.6861941068147408 0.6861941068147408 0.38694155923435009 0.68222849726345214 0.66875793094202918 +5.1 0.6455696 5.1 2.5 3 1.1 0.6455696 0.5681818 0.4347826 0.440000027 5.0999999999999996 0.64556962025316444 5.0999999999999996 2.5 3 1.1000000000000001 0.64556962025316444 0.56818181818181812 0.43478260869565222 0.44000000000000006 1 0.235294119 0.235294119 0.181818187 0.214285716 0.333333343 0.23529411764705882 0.23529411764705882 0.18181818181818182 0.21428571428571427 0.33333333333333331 0.8634792 0.8634792 0.8113077 0.720803738 0.7723168 0.86347915300377087 0.86347915300377087 0.81130773640087239 0.72080372337053966 0.7723167970226188 0.183586776 0.183586776 0.09116498 0.4439562 0.605188966 0.18358681923369741 0.18358681923369741 0.091164973250557446 0.44395614729152527 0.60518894407556645 +5.7 0.721519 5.7 2.8 4.1 1.3 0.721519 0.6363636 0.5942029 0.52 5.7000000000000002 0.72151898734177211 5.7000000000000002 2.7999999999999998 4.0999999999999996 1.3 0.72151898734177211 0.63636363636363635 0.59420289855072461 0.52000000000000002 1 0.4117647 0.4117647 0.3181818 0.4047619 0.428571433 0.41176470588235292 0.41176470588235292 0.31818181818181818 0.40476190476190477 0.42857142857142855 0.965064943 0.965064943 0.908664644 0.985098362 0.912738 0.96506493571009688 0.96506493571009688 0.908664664768977 0.98509842193973751 0.91273803284491306 0.455403626 0.455403626 0.296437562 0.6526925 0.6687579 0.45540375842690767 0.45540375842690767 0.29643751019242903 0.65269250269310186 0.66875793094202918 +6.3 0.797468364 6.3 3.3 6 2.5 0.797468364 0.74999994 0.8695652 1 6.2999999999999998 0.79746835443037956 6.2999999999999998 3.2999999999999998 6 2.5 0.79746835443037956 0.74999999999999989 0.86956521739130443 1 2 0.5882353 0.5882353 0.545454562 0.857142866 1 0.58823529411764708 0.58823529411764708 0.54545454545454541 0.8571428571428571 1 1.06665075 1.06665075 1.07092619 1.44160748 1.75526547 1.0666507184164229 1.0666507184164229 1.0709262120491514 1.4416074467410793 1.7552654477786789 0.72531265 0.72531265 0.733567655 0.851488352 0.8644717 0.72531248018388961 0.72531248018388961 0.73356785053506501 0.85148833619462083 0.86447170475057145 +5.8 0.734177232 5.8 2.7 5.1 1.9 0.734177232 0.6136364 0.7391304 0.76 5.7999999999999998 0.73417721518987333 5.7999999999999998 2.7000000000000002 5.0999999999999996 1.8999999999999999 0.73417721518987333 0.61363636363636365 0.73913043478260865 0.76000000000000001 2 0.441176474 0.441176474 0.272727281 0.642857134 0.714285731 0.44117647058823528 0.44117647058823528 0.27272727272727271 0.6428571428571429 0.7142857142857143 0.981996 0.981996 0.876212358 1.22536623 1.33400178 0.98199589949448451 0.98199589949448451 0.87621235531294217 1.2253663297299173 1.3340017403117959 0.504585147 0.504585147 0.214467555 0.777955949 0.794432342 0.50458515122771275 0.50458515122771275 0.21446754872116464 0.77795595083214475 0.7944323164067586 +7.1 0.898734152 7.1 3 5.9 2.1 0.898734152 0.6818181 0.855072439 0.84 7.0999999999999996 0.89873417721518967 7.0999999999999996 3 5.9000000000000004 2.1000000000000001 0.89873417721518967 0.68181818181818177 0.85507246376811608 0.84000000000000008 2 0.8235294 0.8235294 0.4090909 0.8333333 0.8095238 0.82352941176470584 0.82352941176470584 0.40909090909090912 0.83333333333333337 0.80952380952380953 1.20209849 1.20209849 0.9735693 1.4175806 1.47442293 1.2020984286915242 1.2020984286915242 0.97356928368104678 1.4175806559620614 1.4744229761340903 0.9261487 0.9261487 0.480745673 0.8447406 0.8221373 0.92614864776751638 0.92614864776751638 0.4807456731235793 0.8447405985468005 0.82213728509573358 +6.3 0.797468364 6.3 2.9 5.6 1.8 0.797468364 0.659090936 0.8115942 0.719999969 6.2999999999999998 0.79746835443037956 6.2999999999999998 2.8999999999999999 5.5999999999999996 1.8 0.79746835443037956 0.65909090909090906 0.81159420289855067 0.72000000000000008 2 0.5882353 0.5882353 0.363636374 0.7619048 0.6666667 0.58823529411764708 0.58823529411764708 0.36363636363636365 0.76190476190476186 0.66666666666666663 1.06665075 1.06665075 0.941117 1.34550023 1.26379108 1.0666507184164229 1.0666507184164229 0.94111697422501195 1.3455002836250074 1.2637911224006488 0.72531265 0.72531265 0.386941522 0.8225208 0.778455853 0.72531248018388961 0.72531248018388961 0.38694155923435009 0.82252078229590153 0.77845583371698512 +6.5 0.822784841 6.5 3 5.8 2.2 0.822784841 0.6818181 0.8405797 0.880000055 6.5 0.82278481012658211 6.5 3 5.7999999999999998 2.2000000000000002 0.82278481012658211 0.68181818181818177 0.84057971014492749 0.88000000000000012 2 0.647058845 0.647058845 0.4090909 0.8095238 0.857142866 0.6470588235294118 0.6470588235294118 0.40909090909090912 0.80952380952380953 0.8571428571428571 1.10051274 1.10051274 0.9735693 1.39355385 1.54463363 1.1005126459851982 1.1005126459851982 0.97356928368104678 1.3935538651830432 1.5446335940452376 0.7940583 0.7940583 0.480745673 0.837673366 0.834173143 0.79405825408863862 0.79405825408863862 0.4807456731235793 0.83767331479677276 0.83417310863648386 +7.6 0.9620253 7.6 3 6.6 2.1 0.9620253 0.6818181 0.9565217 0.84 7.5999999999999996 0.962025316455696 7.5999999999999996 3 6.5999999999999996 2.1000000000000001 0.962025316455696 0.68181818181818177 0.95652173913043481 0.84000000000000008 2 0.9411765 0.9411765 0.4090909 0.952380955 0.8095238 0.94117647058823528 0.94117647058823528 0.40909090909090912 0.95238095238095233 0.80952380952380953 1.2867533 1.2867533 0.9735693 1.5857681 1.47442293 1.2867532476134624 1.2867532476134624 0.97356928368104678 1.5857681914151873 1.4744229761340903 0.9733138 0.9733138 0.480745673 0.8860214 0.8221373 0.97331382055990801 0.97331382055990801 0.4807456731235793 0.88602142043286447 0.82213728509573358 +4.9 0.6202532 4.9 2.5 4.5 1.7 0.6202532 0.5681818 0.6521739 0.68 4.9000000000000004 0.620253164556962 4.9000000000000004 2.5 4.5 1.7 0.620253164556962 0.56818181818181812 0.65217391304347827 0.68000000000000005 2 0.1764706 0.1764706 0.181818187 0.5 0.619047642 0.17647058823529413 0.17647058823529413 0.18181818181818182 0.5 0.61904761904761907 0.829617262 0.829617262 0.8113077 1.08120561 1.19358051 0.82961722543499561 0.82961722543499561 0.81130773640087239 1.0812055850558095 1.1935805044895016 0.117838435 0.117838435 0.09116498 0.7093809 0.7608193 0.11783846996167147 0.11783846996167147 0.091164973250557446 0.70938088629442786 0.76081931222191046 +7.3 0.9240507 7.3 2.9 6.3 1.8 0.9240507 0.659090936 0.9130435 0.719999969 7.2999999999999998 0.92405063291139222 7.2999999999999998 2.8999999999999999 6.2999999999999998 1.8 0.92405063291139222 0.65909090909090906 0.91304347826086962 0.72000000000000008 2 0.882352948 0.882352948 0.363636374 0.9047619 0.6666667 0.88235294117647056 0.88235294117647056 0.36363636363636365 0.90476190476190477 0.66666666666666663 1.23596048 1.23596048 0.941117 1.51368785 1.26379108 1.2359603562602994 1.2359603562602994 0.94111697422501195 1.5136878190781333 1.2637911224006488 0.950038552 0.950038552 0.386941522 0.869953454 0.778455853 0.95003851659070837 0.95003851659070837 0.38694155923435009 0.86995338291407664 0.77845583371698512 +6.7 0.848101258 6.7 2.5 5.8 1.8 0.848101258 0.5681818 0.8405797 0.719999969 6.7000000000000002 0.84810126582278467 6.7000000000000002 2.5 5.7999999999999998 1.8 0.84810126582278467 0.56818181818181812 0.84057971014492749 0.72000000000000008 2 0.7058824 0.7058824 0.181818187 0.8095238 0.6666667 0.70588235294117652 0.70588235294117652 0.18181818181818182 0.80952380952380953 0.66666666666666663 1.13437462 1.13437462 0.8113077 1.39355385 1.26379108 1.1343745735539736 1.1343745735539736 0.81130773640087239 1.3935538651830432 1.2637911224006488 0.84984225 0.84984225 0.09116498 0.837673366 0.778455853 0.84984228863096656 0.84984228863096656 0.091164973250557446 0.83767331479677276 0.77845583371698512 +7.2 0.9113924 7.2 3.6 6.1 2.5 0.9113924 0.818181753 0.884057939 1 7.2000000000000002 0.911392405063291 7.2000000000000002 3.6000000000000001 6.0999999999999996 2.5 0.911392405063291 0.81818181818181812 0.88405797101449268 1 2 0.852941155 0.852941155 0.6818182 0.880952358 1 0.8529411764705882 0.8529411764705882 0.68181818181818177 0.88095238095238093 1 1.21902943 1.21902943 1.1682831 1.46563423 1.75526547 1.2190293924759119 1.2190293924759119 1.1682831404172562 1.4656342375200972 1.7552654477786789 0.939083755 0.939083755 0.8919594 0.8579307 0.8644717 0.93908371694631576 0.93908371694631576 0.89195941323598249 0.85793070191741871 0.86447170475057145 +6.5 0.822784841 6.5 3.2 5.1 2 0.822784841 0.7272727 0.7391304 0.8 6.5 0.82278481012658211 6.5 3.2000000000000002 5.0999999999999996 2 0.82278481012658211 0.72727272727272729 0.73913043478260865 0.80000000000000004 2 0.647058845 0.647058845 0.5 0.642857134 0.7619048 0.6470588235294118 0.6470588235294118 0.5 0.6428571428571429 0.76190476190476186 1.10051274 1.10051274 1.038474 1.22536623 1.40421236 1.1005126459851982 1.1005126459851982 1.0384739025931167 1.2253663297299173 1.4042123582229431 0.7940583 0.7940583 0.6578964 0.777955949 0.808938 0.79405825408863862 0.79405825408863862 0.65789648182451921 0.77795595083214475 0.80893802463851161 +6.4 0.8101266 6.4 2.7 5.3 1.9 0.8101266 0.6136364 0.768115938 0.76 6.4000000000000004 0.81012658227848089 6.4000000000000004 2.7000000000000002 5.2999999999999998 1.8999999999999999 0.81012658227848089 0.61363636363636365 0.76811594202898548 0.76000000000000001 2 0.617647052 0.617647052 0.272727281 0.6904762 0.714285731 0.61764705882352944 0.61764705882352944 0.27272727272727271 0.69047619047619047 0.7142857142857143 1.08358181 1.08358181 0.876212358 1.27342 1.33400178 1.0835816822008106 1.0835816822008106 0.87621235531294217 1.2734199112879534 1.3340017403117959 0.7613054 0.7613054 0.214467555 0.797011137 0.794432342 0.76130542616799635 0.76130542616799635 0.21446754872116464 0.79701110606800918 0.7944323164067586 +6.8 0.860759556 6.8 3 5.5 2.1 0.860759556 0.6818181 0.797101438 0.84 6.7999999999999998 0.86075949367088589 6.7999999999999998 3 5.5 2.1000000000000001 0.86075949367088589 0.68181818181818177 0.79710144927536231 0.84000000000000008 2 0.7352941 0.7352941 0.4090909 0.7380952 0.8095238 0.73529411764705888 0.73529411764705888 0.40909090909090912 0.73809523809523814 0.80952380952380953 1.15130568 1.15130568 0.9735693 1.32147348 1.47442293 1.1513055373383612 1.1513055373383612 0.97356928368104678 1.3214734928459895 1.4744229761340903 0.873058 0.873058 0.480745673 0.814404547 0.8221373 0.87305788341059976 0.87305788341059976 0.4807456731235793 0.81440457252843534 0.82213728509573358 +5.7 0.721519 5.7 2.5 5 2 0.721519 0.5681818 0.7246376 0.8 5.7000000000000002 0.72151898734177211 5.7000000000000002 2.5 5 2 0.72151898734177211 0.56818181818181812 0.72463768115942029 0.80000000000000004 2 0.4117647 0.4117647 0.181818187 0.619047642 0.7619048 0.41176470588235292 0.41176470588235292 0.18181818181818182 0.61904761904761907 0.76190476190476186 0.965064943 0.965064943 0.8113077 1.20133948 1.40421236 0.96506493571009688 0.96506493571009688 0.81130773640087239 1.2013395389508994 1.4042123582229431 0.455403626 0.455403626 0.09116498 0.7677612 0.808938 0.45540375842690767 0.45540375842690767 0.091164973250557446 0.76776110588492996 0.80893802463851161 +5.8 0.734177232 5.8 2.8 5.1 2.4 0.734177232 0.6363636 0.7391304 0.960000038 5.7999999999999998 0.73417721518987333 5.7999999999999998 2.7999999999999998 5.0999999999999996 2.3999999999999999 0.73417721518987333 0.63636363636363635 0.73913043478260865 0.95999999999999996 2 0.441176474 0.441176474 0.3181818 0.642857134 0.952380955 0.44117647058823528 0.44117647058823528 0.31818181818181818 0.6428571428571429 0.95238095238095233 0.981996 0.981996 0.908664644 1.22536623 1.6850549 0.98199589949448451 0.98199589949448451 0.908664664768977 1.2253663297299173 1.6850548298675316 0.504585147 0.504585147 0.296437562 0.777955949 0.8552379 0.50458515122771275 0.50458515122771275 0.29643751019242903 0.77795595083214475 0.85523789511433224 +6.4 0.8101266 6.4 3.2 5.3 2.3 0.8101266 0.7272727 0.768115938 0.92 6.4000000000000004 0.81012658227848089 6.4000000000000004 3.2000000000000002 5.2999999999999998 2.2999999999999998 0.81012658227848089 0.72727272727272729 0.76811594202898548 0.91999999999999993 2 0.617647052 0.617647052 0.5 0.6904762 0.9047619 0.61764705882352944 0.61764705882352944 0.5 0.69047619047619047 0.90476190476190477 1.08358181 1.08358181 1.038474 1.27342 1.6148442 1.0835816822008106 1.0835816822008106 1.0384739025931167 1.2734199112879534 1.6148442119563844 0.7613054 0.7613054 0.6578964 0.797011137 0.845170259 0.76130542616799635 0.76130542616799635 0.65789648182451921 0.79701110606800918 0.84517026625737923 +6.5 0.822784841 6.5 3 5.5 1.8 0.822784841 0.6818181 0.797101438 0.719999969 6.5 0.82278481012658211 6.5 3 5.5 1.8 0.82278481012658211 0.68181818181818177 0.79710144927536231 0.72000000000000008 2 0.647058845 0.647058845 0.4090909 0.7380952 0.6666667 0.6470588235294118 0.6470588235294118 0.40909090909090912 0.73809523809523814 0.66666666666666663 1.10051274 1.10051274 0.9735693 1.32147348 1.26379108 1.1005126459851982 1.1005126459851982 0.97356928368104678 1.3214734928459895 1.2637911224006488 0.7940583 0.7940583 0.480745673 0.814404547 0.778455853 0.79405825408863862 0.79405825408863862 0.4807456731235793 0.81440457252843534 0.77845583371698512 +7.7 0.9746835 7.7 3.8 6.7 2.2 0.9746835 0.8636363 0.97101444 0.880000055 7.7000000000000002 0.97468354430379733 7.7000000000000002 3.7999999999999998 6.7000000000000002 2.2000000000000002 0.97468354430379733 0.86363636363636354 0.97101449275362328 0.88000000000000012 2 0.9705882 0.9705882 0.772727251 0.976190448 0.857142866 0.97058823529411764 0.97058823529411764 0.77272727272727271 0.97619047619047616 0.8571428571428571 1.30368423 1.30368423 1.23318768 1.60979486 1.54463363 1.3036842113978502 1.3036842113978502 1.2331877593293259 1.6097949821942052 1.5446335940452376 0.9785672 0.9785672 0.9472266 0.8909001 0.834173143 0.97856725002805034 0.97856725002805034 0.94722658326235554 0.89090007639933866 0.83417310863648386 +7.7 0.9746835 7.7 2.6 6.9 2.3 0.9746835 0.590909064 1 0.92 7.7000000000000002 0.97468354430379733 7.7000000000000002 2.6000000000000001 6.9000000000000004 2.2999999999999998 0.97468354430379733 0.59090909090909094 1 0.91999999999999993 2 0.9705882 0.9705882 0.227272734 1 0.9047619 0.97058823529411764 0.97058823529411764 0.22727272727272727 1 0.90476190476190477 1.30368423 1.30368423 0.84376 1.6578486 1.6148442 1.3036842113978502 1.3036842113978502 0.84376004585690734 1.6578485637522413 1.6148442119563844 0.9785672 0.9785672 0.145245746 0.900005937 0.845170259 0.97856725002805034 0.97856725002805034 0.14524588521591403 0.90000590086073773 0.84517026625737923 +6 0.7594937 6 2.2 5 1.5 0.7594937 0.5 0.7246376 0.6 6 0.75949367088607578 6 2.2000000000000002 5 1.5 0.75949367088607578 0.5 0.72463768115942029 0.60000000000000009 2 0.5 0.5 0.0454545468 0.619047642 0.523809552 0.5 0.5 0.045454545454545456 0.61904761904761907 0.52380952380952384 1.01585793 1.01585793 0.7139508 1.20133948 1.05315924 1.0158578270632599 1.0158578270632599 0.71395080803276778 1.2013395389508994 1.0531592686672073 0.5995771 0.5995771 0.0126449876 0.7677612 0.719658256 0.59957706030964308 0.59957706030964308 0.012644988485085273 0.76776110588492996 0.71965826470413374 +6.9 0.873417735 6.9 3.2 5.7 2.3 0.873417735 0.7272727 0.8260869 0.92 6.9000000000000004 0.87341772151898722 6.9000000000000004 3.2000000000000002 5.7000000000000002 2.2999999999999998 0.87341772151898722 0.72727272727272729 0.82608695652173914 0.91999999999999993 2 0.7647059 0.7647059 0.5 0.785714269 0.9047619 0.76470588235294112 0.76470588235294112 0.5 0.7857142857142857 0.90476190476190477 1.16823661 1.16823661 1.038474 1.369527 1.6148442 1.1682365011227489 1.1682365011227489 1.0384739025931167 1.3695270744040255 1.6148442119563844 0.8933714 0.8933714 0.6578964 0.8302718 0.845170259 0.89337135404275458 0.89337135404275458 0.65789648182451921 0.83027178393794032 0.84517026625737923 +5.6 0.708860755 5.6 2.8 4.9 2 0.708860755 0.6363636 0.710144937 0.8 5.5999999999999996 0.70886075949367078 5.5999999999999996 2.7999999999999998 4.9000000000000004 2 0.70886075949367078 0.63636363636363635 0.71014492753623193 0.80000000000000004 2 0.382352948 0.382352948 0.3181818 0.5952381 0.7619048 0.38235294117647056 0.38235294117647056 0.31818181818181818 0.59523809523809523 0.76190476190476186 0.948134 0.948134 0.908664644 1.17731273 1.40421236 0.94813397192570914 0.94813397192570914 0.908664664768977 1.1773127481718815 1.4042123582229431 0.4060508 0.4060508 0.296437562 0.757097244 0.808938 0.40605068921232229 0.40605068921232229 0.29643751019242903 0.75709721026728072 0.80893802463851161 +7.7 0.9746835 7.7 2.8 6.7 2 0.9746835 0.6363636 0.97101444 0.8 7.7000000000000002 0.97468354430379733 7.7000000000000002 2.7999999999999998 6.7000000000000002 2 0.97468354430379733 0.63636363636363635 0.97101449275362328 0.80000000000000004 2 0.9705882 0.9705882 0.3181818 0.976190448 0.7619048 0.97058823529411764 0.97058823529411764 0.31818181818181818 0.97619047619047616 0.76190476190476186 1.30368423 1.30368423 0.908664644 1.60979486 1.40421236 1.3036842113978502 1.3036842113978502 0.908664664768977 1.6097949821942052 1.4042123582229431 0.9785672 0.9785672 0.296437562 0.8909001 0.808938 0.97856725002805034 0.97856725002805034 0.29643751019242903 0.89090007639933866 0.80893802463851161 +6.3 0.797468364 6.3 2.7 4.9 1.8 0.797468364 0.6136364 0.710144937 0.719999969 6.2999999999999998 0.79746835443037956 6.2999999999999998 2.7000000000000002 4.9000000000000004 1.8 0.79746835443037956 0.61363636363636365 0.71014492753623193 0.72000000000000008 2 0.5882353 0.5882353 0.272727281 0.5952381 0.6666667 0.58823529411764708 0.58823529411764708 0.27272727272727271 0.59523809523809523 0.66666666666666663 1.06665075 1.06665075 0.876212358 1.17731273 1.26379108 1.0666507184164229 1.0666507184164229 0.87621235531294217 1.1773127481718815 1.2637911224006488 0.72531265 0.72531265 0.214467555 0.757097244 0.778455853 0.72531248018388961 0.72531248018388961 0.21446754872116464 0.75709721026728072 0.77845583371698512 +6.7 0.848101258 6.7 3.3 5.7 2.1 0.848101258 0.74999994 0.8260869 0.84 6.7000000000000002 0.84810126582278467 6.7000000000000002 3.2999999999999998 5.7000000000000002 2.1000000000000001 0.84810126582278467 0.74999999999999989 0.82608695652173914 0.84000000000000008 2 0.7058824 0.7058824 0.545454562 0.785714269 0.8095238 0.70588235294117652 0.70588235294117652 0.54545454545454541 0.7857142857142857 0.80952380952380953 1.13437462 1.13437462 1.07092619 1.369527 1.47442293 1.1343745735539736 1.1343745735539736 1.0709262120491514 1.3695270744040255 1.4744229761340903 0.84984225 0.84984225 0.733567655 0.8302718 0.8221373 0.84984228863096656 0.84984228863096656 0.73356785053506501 0.83027178393794032 0.82213728509573358 +7.2 0.9113924 7.2 3.2 6 1.8 0.9113924 0.7272727 0.8695652 0.719999969 7.2000000000000002 0.911392405063291 7.2000000000000002 3.2000000000000002 6 1.8 0.911392405063291 0.72727272727272729 0.86956521739130443 0.72000000000000008 2 0.852941155 0.852941155 0.5 0.857142866 0.6666667 0.8529411764705882 0.8529411764705882 0.5 0.8571428571428571 0.66666666666666663 1.21902943 1.21902943 1.038474 1.44160748 1.26379108 1.2190293924759119 1.2190293924759119 1.0384739025931167 1.4416074467410793 1.2637911224006488 0.939083755 0.939083755 0.6578964 0.851488352 0.778455853 0.93908371694631576 0.93908371694631576 0.65789648182451921 0.85148833619462083 0.77845583371698512 +6.2 0.7848101 6.2 2.8 4.8 1.8 0.7848101 0.6363636 0.6956522 0.719999969 6.2000000000000002 0.78481012658227833 6.2000000000000002 2.7999999999999998 4.7999999999999998 1.8 0.78481012658227833 0.63636363636363635 0.69565217391304346 0.72000000000000008 2 0.5588235 0.5588235 0.3181818 0.5714286 0.6666667 0.55882352941176472 0.55882352941176472 0.31818181818181818 0.5714285714285714 0.66666666666666663 1.04971981 1.04971981 0.908664644 1.153286 1.26379108 1.0497197546320352 1.0497197546320352 0.908664664768977 1.1532859573928635 1.2637911224006488 0.6861942 0.6861942 0.296437562 0.7459458 0.778455853 0.6861941068147408 0.6861941068147408 0.29643751019242903 0.74594581373449664 0.77845583371698512 +6.1 0.7721519 6.1 3 4.9 1.8 0.7721519 0.6818181 0.710144937 0.719999969 6.0999999999999996 0.772151898734177 6.0999999999999996 3 4.9000000000000004 1.8 0.772151898734177 0.68181818181818177 0.71014492753623193 0.72000000000000008 2 0.5294118 0.5294118 0.4090909 0.5952381 0.6666667 0.52941176470588236 0.52941176470588236 0.40909090909090912 0.59523809523809523 0.66666666666666663 1.03278887 1.03278887 0.9735693 1.17731273 1.26379108 1.0327887908476474 1.0327887908476474 0.97356928368104678 1.1773127481718815 1.2637911224006488 0.644171059 0.644171059 0.480745673 0.757097244 0.778455853 0.64417093822767468 0.64417093822767468 0.4807456731235793 0.75709721026728072 0.77845583371698512 +6.4 0.8101266 6.4 2.8 5.6 2.1 0.8101266 0.6363636 0.8115942 0.84 6.4000000000000004 0.81012658227848089 6.4000000000000004 2.7999999999999998 5.5999999999999996 2.1000000000000001 0.81012658227848089 0.63636363636363635 0.81159420289855067 0.84000000000000008 2 0.617647052 0.617647052 0.3181818 0.7619048 0.8095238 0.61764705882352944 0.61764705882352944 0.31818181818181818 0.76190476190476186 0.80952380952380953 1.08358181 1.08358181 0.908664644 1.34550023 1.47442293 1.0835816822008106 1.0835816822008106 0.908664664768977 1.3455002836250074 1.4744229761340903 0.7613054 0.7613054 0.296437562 0.8225208 0.8221373 0.76130542616799635 0.76130542616799635 0.29643751019242903 0.82252078229590153 0.82213728509573358 +7.2 0.9113924 7.2 3 5.8 1.6 0.9113924 0.6818181 0.8405797 0.640000045 7.2000000000000002 0.911392405063291 7.2000000000000002 3 5.7999999999999998 1.6000000000000001 0.911392405063291 0.68181818181818177 0.84057971014492749 0.64000000000000012 2 0.852941155 0.852941155 0.4090909 0.8095238 0.5714286 0.8529411764705882 0.8529411764705882 0.40909090909090912 0.80952380952380953 0.5714285714285714 1.21902943 1.21902943 0.9735693 1.39355385 1.12336993 1.2190293924759119 1.2190293924759119 0.97356928368104678 1.3935538651830432 1.1233698865783546 0.939083755 0.939083755 0.480745673 0.837673366 0.7413043 0.93908371694631576 0.93908371694631576 0.4807456731235793 0.83767331479677276 0.74130430666213609 +7.4 0.936708868 7.4 2.8 6.1 1.9 0.936708868 0.6363636 0.884057939 0.76 7.4000000000000004 0.93670886075949356 7.4000000000000004 2.7999999999999998 6.0999999999999996 1.8999999999999999 0.93670886075949356 0.63636363636363635 0.88405797101449268 0.76000000000000001 2 0.9117647 0.9117647 0.3181818 0.880952358 0.714285731 0.91176470588235292 0.91176470588235292 0.31818181818181818 0.88095238095238093 0.7142857142857143 1.25289142 1.25289142 0.908664644 1.46563423 1.33400178 1.2528913200446872 1.2528913200446872 0.908664664768977 1.4656342375200972 1.3340017403117959 0.959248662 0.959248662 0.296437562 0.8579307 0.794432342 0.95924858044400851 0.95924858044400851 0.29643751019242903 0.85793070191741871 0.7944323164067586 +7.9 1 7.9 3.8 6.4 2 1 0.8636363 0.9275362 0.8 7.9000000000000004 0.99999999999999989 7.9000000000000004 3.7999999999999998 6.4000000000000004 2 0.99999999999999989 0.86363636363636354 0.92753623188405809 0.80000000000000004 2 1 1 0.772727251 0.9285714 0.7619048 1 1 0.77272727272727271 0.9285714285714286 0.76190476190476186 1.33754623 1.33754623 1.23318768 1.5377146 1.40421236 1.3375461389666257 1.3375461389666257 1.2331877593293259 1.5377146098571515 1.4042123582229431 0.9863704 0.9863704 0.9472266 0.875559449 0.808938 0.98637034929396195 0.98637034929396195 0.94722658326235554 0.87555942778912454 0.80893802463851161 +6.4 0.8101266 6.4 2.8 5.6 2.2 0.8101266 0.6363636 0.8115942 0.880000055 6.4000000000000004 0.81012658227848089 6.4000000000000004 2.7999999999999998 5.5999999999999996 2.2000000000000002 0.81012658227848089 0.63636363636363635 0.81159420289855067 0.88000000000000012 2 0.617647052 0.617647052 0.3181818 0.7619048 0.857142866 0.61764705882352944 0.61764705882352944 0.31818181818181818 0.76190476190476186 0.8571428571428571 1.08358181 1.08358181 0.908664644 1.34550023 1.54463363 1.0835816822008106 1.0835816822008106 0.908664664768977 1.3455002836250074 1.5446335940452376 0.7613054 0.7613054 0.296437562 0.8225208 0.834173143 0.76130542616799635 0.76130542616799635 0.29643751019242903 0.82252078229590153 0.83417310863648386 +6.3 0.797468364 6.3 2.8 5.1 1.5 0.797468364 0.6363636 0.7391304 0.6 6.2999999999999998 0.79746835443037956 6.2999999999999998 2.7999999999999998 5.0999999999999996 1.5 0.79746835443037956 0.63636363636363635 0.73913043478260865 0.60000000000000009 2 0.5882353 0.5882353 0.3181818 0.642857134 0.523809552 0.58823529411764708 0.58823529411764708 0.31818181818181818 0.6428571428571429 0.52380952380952384 1.06665075 1.06665075 0.908664644 1.22536623 1.05315924 1.0666507184164229 1.0666507184164229 0.908664664768977 1.2253663297299173 1.0531592686672073 0.72531265 0.72531265 0.296437562 0.777955949 0.719658256 0.72531248018388961 0.72531248018388961 0.29643751019242903 0.77795595083214475 0.71965826470413374 +6.1 0.7721519 6.1 2.6 5.6 1.4 0.7721519 0.590909064 0.8115942 0.56 6.0999999999999996 0.772151898734177 6.0999999999999996 2.6000000000000001 5.5999999999999996 1.3999999999999999 0.772151898734177 0.59090909090909094 0.81159420289855067 0.55999999999999994 2 0.5294118 0.5294118 0.227272734 0.7619048 0.476190478 0.52941176470588236 0.52941176470588236 0.22727272727272727 0.76190476190476186 0.47619047619047616 1.03278887 1.03278887 0.84376 1.34550023 0.982948661 1.0327887908476474 1.0327887908476474 0.84376004585690734 1.3455002836250074 0.98294865075606008 0.644171059 0.644171059 0.145245746 0.8225208 0.6955889 0.64417093822767468 0.64417093822767468 0.14524588521591403 0.82252078229590153 0.69558889835906823 +7.7 0.9746835 7.7 3 6.1 2.3 0.9746835 0.6818181 0.884057939 0.92 7.7000000000000002 0.97468354430379733 7.7000000000000002 3 6.0999999999999996 2.2999999999999998 0.97468354430379733 0.68181818181818177 0.88405797101449268 0.91999999999999993 2 0.9705882 0.9705882 0.4090909 0.880952358 0.9047619 0.97058823529411764 0.97058823529411764 0.40909090909090912 0.88095238095238093 0.90476190476190477 1.30368423 1.30368423 0.9735693 1.46563423 1.6148442 1.3036842113978502 1.3036842113978502 0.97356928368104678 1.4656342375200972 1.6148442119563844 0.9785672 0.9785672 0.480745673 0.8579307 0.845170259 0.97856725002805034 0.97856725002805034 0.4807456731235793 0.85793070191741871 0.84517026625737923 +6.3 0.797468364 6.3 3.4 5.6 2.4 0.797468364 0.772727251 0.8115942 0.960000038 6.2999999999999998 0.79746835443037956 6.2999999999999998 3.3999999999999999 5.5999999999999996 2.3999999999999999 0.79746835443037956 0.77272727272727271 0.81159420289855067 0.95999999999999996 2 0.5882353 0.5882353 0.590909064 0.7619048 0.952380955 0.58823529411764708 0.58823529411764708 0.59090909090909094 0.76190476190476186 0.95238095238095233 1.06665075 1.06665075 1.10337853 1.34550023 1.6850549 1.0666507184164229 1.0666507184164229 1.1033785215051863 1.3455002836250074 1.6850548298675316 0.72531265 0.72531265 0.797875941 0.8225208 0.8552379 0.72531248018388961 0.72531248018388961 0.79787580879856601 0.82252078229590153 0.85523789511433224 +6.4 0.8101266 6.4 3.1 5.5 1.8 0.8101266 0.7045454 0.797101438 0.719999969 6.4000000000000004 0.81012658227848089 6.4000000000000004 3.1000000000000001 5.5 1.8 0.81012658227848089 0.70454545454545459 0.79710144927536231 0.72000000000000008 2 0.617647052 0.617647052 0.454545468 0.7380952 0.6666667 0.61764705882352944 0.61764705882352944 0.45454545454545453 0.73809523809523814 0.66666666666666663 1.08358181 1.08358181 1.0060215 1.32147348 1.26379108 1.0835816822008106 1.0835816822008106 1.0060215931370817 1.3214734928459895 1.2637911224006488 0.7613054 0.7613054 0.5725629 0.814404547 0.778455853 0.76130542616799635 0.76130542616799635 0.5725628341629212 0.81440457252843534 0.77845583371698512 +6 0.7594937 6 3 4.8 1.8 0.7594937 0.6818181 0.6956522 0.719999969 6 0.75949367088607578 6 3 4.7999999999999998 1.8 0.75949367088607578 0.68181818181818177 0.69565217391304346 0.72000000000000008 2 0.5 0.5 0.4090909 0.5714286 0.6666667 0.5 0.5 0.40909090909090912 0.5714285714285714 0.66666666666666663 1.01585793 1.01585793 0.9735693 1.153286 1.26379108 1.0158578270632599 1.0158578270632599 0.97356928368104678 1.1532859573928635 1.2637911224006488 0.5995771 0.5995771 0.480745673 0.7459458 0.778455853 0.59957706030964308 0.59957706030964308 0.4807456731235793 0.74594581373449664 0.77845583371698512 +6.9 0.873417735 6.9 3.1 5.4 2.1 0.873417735 0.7045454 0.7826087 0.84 6.9000000000000004 0.87341772151898722 6.9000000000000004 3.1000000000000001 5.4000000000000004 2.1000000000000001 0.87341772151898722 0.70454545454545459 0.78260869565217395 0.84000000000000008 2 0.7647059 0.7647059 0.454545468 0.714285731 0.8095238 0.76470588235294112 0.76470588235294112 0.45454545454545453 0.7142857142857143 0.80952380952380953 1.16823661 1.16823661 1.0060215 1.29744673 1.47442293 1.1682365011227489 1.1682365011227489 1.0060215931370817 1.2974467020669715 1.4744229761340903 0.8933714 0.8933714 0.5725629 0.805906951 0.8221373 0.89337135404275458 0.89337135404275458 0.5725628341629212 0.80590691835886541 0.82213728509573358 +6.7 0.848101258 6.7 3.1 5.6 2.4 0.848101258 0.7045454 0.8115942 0.960000038 6.7000000000000002 0.84810126582278467 6.7000000000000002 3.1000000000000001 5.5999999999999996 2.3999999999999999 0.84810126582278467 0.70454545454545459 0.81159420289855067 0.95999999999999996 2 0.7058824 0.7058824 0.454545468 0.7619048 0.952380955 0.70588235294117652 0.70588235294117652 0.45454545454545453 0.76190476190476186 0.95238095238095233 1.13437462 1.13437462 1.0060215 1.34550023 1.6850549 1.1343745735539736 1.1343745735539736 1.0060215931370817 1.3455002836250074 1.6850548298675316 0.84984225 0.84984225 0.5725629 0.8225208 0.8552379 0.84984228863096656 0.84984228863096656 0.5725628341629212 0.82252078229590153 0.85523789511433224 +6.9 0.873417735 6.9 3.1 5.1 2.3 0.873417735 0.7045454 0.7391304 0.92 6.9000000000000004 0.87341772151898722 6.9000000000000004 3.1000000000000001 5.0999999999999996 2.2999999999999998 0.87341772151898722 0.70454545454545459 0.73913043478260865 0.91999999999999993 2 0.7647059 0.7647059 0.454545468 0.642857134 0.9047619 0.76470588235294112 0.76470588235294112 0.45454545454545453 0.6428571428571429 0.90476190476190477 1.16823661 1.16823661 1.0060215 1.22536623 1.6148442 1.1682365011227489 1.1682365011227489 1.0060215931370817 1.2253663297299173 1.6148442119563844 0.8933714 0.8933714 0.5725629 0.777955949 0.845170259 0.89337135404275458 0.89337135404275458 0.5725628341629212 0.77795595083214475 0.84517026625737923 +5.8 0.734177232 5.8 2.7 5.1 1.9 0.734177232 0.6136364 0.7391304 0.76 5.7999999999999998 0.73417721518987333 5.7999999999999998 2.7000000000000002 5.0999999999999996 1.8999999999999999 0.73417721518987333 0.61363636363636365 0.73913043478260865 0.76000000000000001 2 0.441176474 0.441176474 0.272727281 0.642857134 0.714285731 0.44117647058823528 0.44117647058823528 0.27272727272727271 0.6428571428571429 0.7142857142857143 0.981996 0.981996 0.876212358 1.22536623 1.33400178 0.98199589949448451 0.98199589949448451 0.87621235531294217 1.2253663297299173 1.3340017403117959 0.504585147 0.504585147 0.214467555 0.777955949 0.794432342 0.50458515122771275 0.50458515122771275 0.21446754872116464 0.77795595083214475 0.7944323164067586 +6.8 0.860759556 6.8 3.2 5.9 2.3 0.860759556 0.7272727 0.855072439 0.92 6.7999999999999998 0.86075949367088589 6.7999999999999998 3.2000000000000002 5.9000000000000004 2.2999999999999998 0.86075949367088589 0.72727272727272729 0.85507246376811608 0.91999999999999993 2 0.7352941 0.7352941 0.5 0.8333333 0.9047619 0.73529411764705888 0.73529411764705888 0.5 0.83333333333333337 0.90476190476190477 1.15130568 1.15130568 1.038474 1.4175806 1.6148442 1.1513055373383612 1.1513055373383612 1.0384739025931167 1.4175806559620614 1.6148442119563844 0.873058 0.873058 0.6578964 0.8447406 0.845170259 0.87305788341059976 0.87305788341059976 0.65789648182451921 0.8447405985468005 0.84517026625737923 +6.7 0.848101258 6.7 3.3 5.7 2.5 0.848101258 0.74999994 0.8260869 1 6.7000000000000002 0.84810126582278467 6.7000000000000002 3.2999999999999998 5.7000000000000002 2.5 0.84810126582278467 0.74999999999999989 0.82608695652173914 1 2 0.7058824 0.7058824 0.545454562 0.785714269 1 0.70588235294117652 0.70588235294117652 0.54545454545454541 0.7857142857142857 1 1.13437462 1.13437462 1.07092619 1.369527 1.75526547 1.1343745735539736 1.1343745735539736 1.0709262120491514 1.3695270744040255 1.7552654477786789 0.84984225 0.84984225 0.733567655 0.8302718 0.8644717 0.84984228863096656 0.84984228863096656 0.73356785053506501 0.83027178393794032 0.86447170475057145 +6.7 0.848101258 6.7 3 5.2 2.3 0.848101258 0.6818181 0.7536231 0.92 6.7000000000000002 0.84810126582278467 6.7000000000000002 3 5.2000000000000002 2.2999999999999998 0.84810126582278467 0.68181818181818177 0.75362318840579712 0.91999999999999993 2 0.7058824 0.7058824 0.4090909 0.6666667 0.9047619 0.70588235294117652 0.70588235294117652 0.40909090909090912 0.66666666666666663 0.90476190476190477 1.13437462 1.13437462 0.9735693 1.24939311 1.6148442 1.1343745735539736 1.1343745735539736 0.97356928368104678 1.2493931205089355 1.6148442119563844 0.84984225 0.84984225 0.480745673 0.7877 0.845170259 0.84984228863096656 0.84984228863096656 0.4807456731235793 0.78769997391633806 0.84517026625737923 +6.3 0.797468364 6.3 2.5 5 1.9 0.797468364 0.5681818 0.7246376 0.76 6.2999999999999998 0.79746835443037956 6.2999999999999998 2.5 5 1.8999999999999999 0.79746835443037956 0.56818181818181812 0.72463768115942029 0.76000000000000001 2 0.5882353 0.5882353 0.181818187 0.619047642 0.714285731 0.58823529411764708 0.58823529411764708 0.18181818181818182 0.61904761904761907 0.7142857142857143 1.06665075 1.06665075 0.8113077 1.20133948 1.33400178 1.0666507184164229 1.0666507184164229 0.81130773640087239 1.2013395389508994 1.3340017403117959 0.72531265 0.72531265 0.09116498 0.7677612 0.794432342 0.72531248018388961 0.72531248018388961 0.091164973250557446 0.76776110588492996 0.7944323164067586 +6.5 0.822784841 6.5 3 5.2 2 0.822784841 0.6818181 0.7536231 0.8 6.5 0.82278481012658211 6.5 3 5.2000000000000002 2 0.82278481012658211 0.68181818181818177 0.75362318840579712 0.80000000000000004 2 0.647058845 0.647058845 0.4090909 0.6666667 0.7619048 0.6470588235294118 0.6470588235294118 0.40909090909090912 0.66666666666666663 0.76190476190476186 1.10051274 1.10051274 0.9735693 1.24939311 1.40421236 1.1005126459851982 1.1005126459851982 0.97356928368104678 1.2493931205089355 1.4042123582229431 0.7940583 0.7940583 0.480745673 0.7877 0.808938 0.79405825408863862 0.79405825408863862 0.4807456731235793 0.78769997391633806 0.80893802463851161 +6.2 0.7848101 6.2 3.4 5.4 2.3 0.7848101 0.772727251 0.7826087 0.92 6.2000000000000002 0.78481012658227833 6.2000000000000002 3.3999999999999999 5.4000000000000004 2.2999999999999998 0.78481012658227833 0.77272727272727271 0.78260869565217395 0.91999999999999993 2 0.5588235 0.5588235 0.590909064 0.714285731 0.9047619 0.55882352941176472 0.55882352941176472 0.59090909090909094 0.7142857142857143 0.90476190476190477 1.04971981 1.04971981 1.10337853 1.29744673 1.6148442 1.0497197546320352 1.0497197546320352 1.1033785215051863 1.2974467020669715 1.6148442119563844 0.6861942 0.6861942 0.797875941 0.805906951 0.845170259 0.6861941068147408 0.6861941068147408 0.79787580879856601 0.80590691835886541 0.84517026625737923 +5.9 0.7468355 5.9 3 5.1 1.8 0.7468355 0.6818181 0.7391304 0.719999969 5.9000000000000004 0.74683544303797467 5.9000000000000004 3 5.0999999999999996 1.8 0.74683544303797467 0.68181818181818177 0.73913043478260865 0.72000000000000008 2 0.470588237 0.470588237 0.4090909 0.642857134 0.6666667 0.47058823529411764 0.47058823529411764 0.40909090909090912 0.6428571428571429 0.66666666666666663 0.998926938 0.998926938 0.9735693 1.22536623 1.26379108 0.99892686327887226 0.99892686327887226 0.97356928368104678 1.2253663297299173 1.2637911224006488 0.5528621 0.5528621 0.480745673 0.777955949 0.778455853 0.55286190159866166 0.55286190159866166 0.4807456731235793 0.77795595083214475 0.77845583371698512 diff --git a/test/BaselineOutput/SingleRelease/PCA/pca.tsv b/test/BaselineOutput/SingleRelease/PCA/pca.tsv index 328ff1bf86..ece1e59164 100644 --- a/test/BaselineOutput/SingleRelease/PCA/pca.tsv +++ b/test/BaselineOutput/SingleRelease/PCA/pca.tsv @@ -2,7 +2,7 @@ #@ sep=tab #@ col=pca:R4:0-4 #@ } --2.085465 -0.09400512 -2.58367229 1.72141707 0.732049346 --0.906982958 -0.774861753 -0.609727442 -1.07867944 -0.453824759 -0.167715371 0.927231133 0.191398591 -0.243467987 1.06056178 --0.54830873 -0.5576661 0.587476134 1.38609958 -0.9422357 +2.085487 0.09400085 2.58366132 -1.721405 -0.732070744 +0.9069792 0.7748574 0.6097196 1.07868779 0.453838825 +-0.167718172 -0.92723 -0.19140324 0.243479848 -1.060547 +0.548309 0.5576686 -0.587472439 -1.38610959 0.9422219 diff --git a/test/BaselineOutput/SingleRelease/Text/lpnorm_gcnorm_whitened.tsv b/test/BaselineOutput/SingleRelease/Text/lpnorm_gcnorm_whitened.tsv new file mode 100644 index 0000000000..fad6d5db4d --- /dev/null +++ b/test/BaselineOutput/SingleRelease/Text/lpnorm_gcnorm_whitened.tsv @@ -0,0 +1,10 @@ +#@ TextLoader{ +#@ sep=tab +#@ col=lpnorm:R4:0-10 +#@ col=gcnorm:R4:11-21 +#@ col=whitened:R4:22-32 +#@ } +-0.686319232 0.192169383 -0.152238086 0.03493989 0.346903175 0.09483684 -0.132272437 -0.124785319 -0.5315855 -0.0973325446 0.114802495 -0.626524031 0.289601743 -0.0695612058 0.125636056 0.4509648 0.188099176 -0.0487401523 -0.04093227 -0.465160966 -0.0123033375 0.208920211 -2.604605 0.829638362 -0.5992434 0.19860521 1.33247662 0.369197041 -0.5760094 -0.5490271 -1.94509208 -0.393351972 0.507488966 +-0.20306389 -0.1231699 -0.039946992 0.183090389 -0.3328916 0.279628932 -0.0066578323 0.432759076 -0.0798939839 -0.1664458 -0.7057302 -0.137441739 -0.055349838 0.0301625486 0.259335726 -0.270841062 0.3585301 0.0643675 0.5158729 -0.0108833946 -0.09981628 -0.653936446 -0.5923902 -0.324390084 -0.114805378 0.6855182 -1.055579 0.8767955 -0.0392023772 1.21807373 -0.160801888 -0.47570774 -2.22817 +-0.268398017 -0.28734377 0.571529865 0.006315247 -0.246294647 -0.445224941 -0.344181 -0.20524554 0.284186125 -0.116832078 -0.06946772 -0.176903129 -0.19703348 0.715542555 0.114987023 -0.153417692 -0.3647864 -0.257424533 -0.109801926 0.410232216 -0.0158602837 0.0344656035 -0.9132714 -0.911281645 1.814283 0.07471426 -0.8969923 -1.44387519 -1.19571114 -0.6542767 0.887983143 -0.4604767 -0.17543222 +0.117021732 0.438831449 -0.100304335 0.125380427 -0.413755417 0.0794076 0.133739114 -0.397038 -0.497342378 -0.2632989 0.313451052 0.160775661 0.485780418 -0.0587080531 0.169217348 -0.3752711 0.122788094 0.17765902 -0.358387738 -0.459687948 -0.223320842 0.3591552 0.236966148 1.004758 -0.233154371 0.3862052 -1.02724624 0.240614042 0.299898773 -1.03102541 -1.13852251 -0.6675951 0.766793966 diff --git a/test/Microsoft.ML.Benchmarks/Harness/Configs.cs b/test/Microsoft.ML.Benchmarks/Harness/Configs.cs index 96cc22ec74..b0fdf95155 100644 --- a/test/Microsoft.ML.Benchmarks/Harness/Configs.cs +++ b/test/Microsoft.ML.Benchmarks/Harness/Configs.cs @@ -18,21 +18,22 @@ public RecommendedConfig() .With(CreateToolchain())); // toolchain is responsible for generating, building and running dedicated executable per benchmark Add(new ExtraMetricColumn()); // an extra colum that can display additional metric reported by the benchmarks + + UnionRule = ConfigUnionRule.AlwaysUseLocal; // global config can be overwritten with local (the one set via [ConfigAttribute]) } protected virtual Job GetJobDefinition() => Job.Default .WithWarmupCount(1) // ML.NET benchmarks are typically CPU-heavy benchmarks, 1 warmup is usually enough - .WithMaxIterationCount(20) - .AsDefault(); // this way we tell BDN that it's a default config which can be overwritten + .WithMaxIterationCount(20); /// /// we need our own toolchain because MSBuild by default does not copy recursive native dependencies to the output /// private IToolchain CreateToolchain() { - var tfm = NetCoreAppSettings.Current.Value.TargetFrameworkMoniker; - var csProj = CsProjCoreToolchain.Current.Value; + var tfm = GetTargetFrameworkMoniker(); + var csProj = CsProjCoreToolchain.From(new NetCoreAppSettings(targetFrameworkMoniker: tfm, runtimeFrameworkVersion: null, name: tfm)); return new Toolchain( tfm, @@ -41,6 +42,15 @@ private IToolchain CreateToolchain() csProj.Executor); } + private static string GetTargetFrameworkMoniker() + { +#if NETCOREAPP3_0 // todo: remove the #IF DEFINES when BDN 0.11.2 gets released (BDN gains the 3.0 support) + return "netcoreapp3.0"; +#else + return NetCoreAppSettings.Current.Value.TargetFrameworkMoniker; +#endif + } + private static string GetBuildConfigurationName() { #if NETCOREAPP3_0 diff --git a/test/Microsoft.ML.Benchmarks/Harness/ProjectGenerator.cs b/test/Microsoft.ML.Benchmarks/Harness/ProjectGenerator.cs index 563933914b..2c77ce6d79 100644 --- a/test/Microsoft.ML.Benchmarks/Harness/ProjectGenerator.cs +++ b/test/Microsoft.ML.Benchmarks/Harness/ProjectGenerator.cs @@ -27,7 +27,7 @@ namespace Microsoft.ML.Benchmarks.Harness /// public class ProjectGenerator : CsProjGenerator { - public ProjectGenerator(string targetFrameworkMoniker) : base(targetFrameworkMoniker, null, null, null) + public ProjectGenerator(string targetFrameworkMoniker) : base(targetFrameworkMoniker, platform => platform.ToConfig(), null) { } diff --git a/test/Microsoft.ML.Benchmarks/HashBench.cs b/test/Microsoft.ML.Benchmarks/HashBench.cs index c4e0a66166..74a056ea77 100644 --- a/test/Microsoft.ML.Benchmarks/HashBench.cs +++ b/test/Microsoft.ML.Benchmarks/HashBench.cs @@ -41,8 +41,8 @@ private void InitMap(T val, ColumnType type, int hashBits = 20) _counted = new Counted(); var inRow = RowColumnUtils.GetRow(_counted, col); // One million features is a nice, typical number. - var info = new HashingTransformer.ColumnInfo("Foo", "Bar", hashBits: hashBits); - var xf = new HashingTransformer(_env, new[] { info }); + var info = new HashTransformer.ColumnInfo("Foo", "Bar", hashBits: hashBits); + var xf = new HashTransformer(_env, new[] { info }); var mapper = xf.GetRowToRowMapper(inRow.Schema); mapper.Schema.TryGetColumnIndex("Bar", out int outCol); var outRow = mapper.GetRow(inRow, c => c == outCol, out var _); diff --git a/test/Microsoft.ML.Benchmarks/Helpers/EnvironmentFactory.cs b/test/Microsoft.ML.Benchmarks/Helpers/EnvironmentFactory.cs index 3b0b055d30..f707df9e59 100644 --- a/test/Microsoft.ML.Benchmarks/Helpers/EnvironmentFactory.cs +++ b/test/Microsoft.ML.Benchmarks/Helpers/EnvironmentFactory.cs @@ -5,45 +5,42 @@ using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Training; using Microsoft.ML.Transforms; namespace Microsoft.ML.Benchmarks { internal static class EnvironmentFactory { - internal static MLContext CreateClassificationEnvironment() + internal static ConsoleEnvironment CreateClassificationEnvironment() where TLoader : IDataReader where TTransformer : ITransformer - where TTrainer : ITrainerEstimator, IPredictor> + where TTrainer : ITrainer { - var ctx = new MLContext(); - IHostEnvironment environment = ctx; + var environment = new ConsoleEnvironment(verbose: false, sensitivity: MessageSensitivity.None, outWriter: EmptyWriter.Instance); environment.ComponentCatalog.RegisterAssembly(typeof(TLoader).Assembly); environment.ComponentCatalog.RegisterAssembly(typeof(TTransformer).Assembly); environment.ComponentCatalog.RegisterAssembly(typeof(TTrainer).Assembly); - return ctx; + return environment; } - internal static MLContext CreateRankingEnvironment() + internal static ConsoleEnvironment CreateRankingEnvironment() where TEvaluator : IEvaluator where TLoader : IDataReader where TTransformer : ITransformer - where TTrainer : ITrainerEstimator, IPredictor> + where TTrainer : ITrainer { - var ctx = new MLContext(); - IHostEnvironment environment = ctx; + var environment = new ConsoleEnvironment(verbose: false, sensitivity: MessageSensitivity.None, outWriter: EmptyWriter.Instance); environment.ComponentCatalog.RegisterAssembly(typeof(TEvaluator).Assembly); environment.ComponentCatalog.RegisterAssembly(typeof(TLoader).Assembly); environment.ComponentCatalog.RegisterAssembly(typeof(TTransformer).Assembly); environment.ComponentCatalog.RegisterAssembly(typeof(TTrainer).Assembly); - environment.ComponentCatalog.RegisterAssembly(typeof(MissingValueHandlingTransformer).Assembly); + environment.ComponentCatalog.RegisterAssembly(typeof(NAHandleTransform).Assembly); - return ctx; + return environment; } } } diff --git a/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs b/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs index 89dabd1279..c56eae60aa 100644 --- a/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs +++ b/test/Microsoft.ML.Benchmarks/KMeansAndLogisticRegressionBench.cs @@ -3,8 +3,14 @@ // See the LICENSE file in the project root for more information. using BenchmarkDotNet.Attributes; +using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Internal.Calibration; +using Microsoft.ML.Runtime.Learners; +using Microsoft.ML.Trainers.KMeans; +using Microsoft.ML.Transforms; +using Microsoft.ML.Transforms.Categorical; +using Microsoft.ML.Transforms.Normalizers; namespace Microsoft.ML.Benchmarks { @@ -15,10 +21,15 @@ public class KMeansAndLogisticRegressionBench [Benchmark] public ParameterMixingCalibratedPredictor TrainKMeansAndLR() { - var ml = new MLContext(seed: 1); - // Pipeline - - var input = ml.Data.ReadFromTextFile(new[] { + using (var env = new ConsoleEnvironment(seed: 1)) + { + // Pipeline + var loader = TextLoader.ReadFile(env, + new TextLoader.Arguments() + { + HasHeader = true, + Separator = ",", + Column = new[] { new TextLoader.Column("Label", DataKind.R4, 14), new TextLoader.Column("CatFeatures", DataKind.TX, new [] { @@ -33,23 +44,30 @@ public ParameterMixingCalibratedPredictor TrainKMeansAndLR() new TextLoader.Range() { Min = 2, Max = 2 }, new TextLoader.Range() { Min = 4, Max = 4 }, new TextLoader.Range() { Min = 10, Max = 12 } - }), - }, _dataPath, s => - { - s.HasHeader = true; - s.Separator = ","; - }); + }) + } + }, new MultiFileSource(_dataPath)); + + IDataView trans = new OneHotEncodingEstimator(env, "CatFeatures").Fit(loader).Transform(loader); - var estimatorPipeline = ml.Transforms.Categorical.OneHotEncoding("CatFeatures") - .Append(ml.Transforms.Normalize("NumFeatures")) - .Append(ml.Transforms.Concatenate("Features", "NumFeatures", "CatFeatures")) - .Append(ml.Clustering.Trainers.KMeans("Features")) - .Append(ml.Transforms.Concatenate("Features", "Features", "Score")) - .Append(ml.BinaryClassification.Trainers.LogisticRegression(advancedSettings: args => { args.EnforceNonNegativity = true; args.OptTol = 1e-3f; })); + trans = NormalizeTransform.CreateMinMaxNormalizer(env, trans, "NumFeatures"); + trans = new ConcatTransform(env, "Features", "NumFeatures", "CatFeatures").Transform(trans); + trans = TrainAndScoreTransform.Create(env, new TrainAndScoreTransform.Arguments + { + Trainer = ComponentFactoryUtils.CreateFromFunction(host => + new KMeansPlusPlusTrainer(host, "Features", advancedSettings: s=> + { + s.K = 100; + })), + FeatureColumn = "Features" + }, trans); + trans = new ConcatTransform(env, "Features", "Features", "Score").Transform(trans); - var model = estimatorPipeline.Fit(input); - // Return the last model in the chain. - return model.LastTransformer.Model; + // Train + var trainer = new LogisticRegression(env, "Features", "Label", advancedSettings: args => { args.EnforceNonNegativity = true; args.OptTol = 1e-3f; }); + var trainRoles = new RoleMappedData(trans, label: "Label", feature: "Features"); + return trainer.Train(trainRoles); + } } } } \ No newline at end of file diff --git a/test/Microsoft.ML.Benchmarks/Microsoft.ML.Benchmarks.csproj b/test/Microsoft.ML.Benchmarks/Microsoft.ML.Benchmarks.csproj index e0ef8157dc..346ff6ecea 100644 --- a/test/Microsoft.ML.Benchmarks/Microsoft.ML.Benchmarks.csproj +++ b/test/Microsoft.ML.Benchmarks/Microsoft.ML.Benchmarks.csproj @@ -12,7 +12,6 @@ - diff --git a/test/Microsoft.ML.Benchmarks/Numeric/Ranking.cs b/test/Microsoft.ML.Benchmarks/Numeric/Ranking.cs index adc1bccdce..5c8328fda4 100644 --- a/test/Microsoft.ML.Benchmarks/Numeric/Ranking.cs +++ b/test/Microsoft.ML.Benchmarks/Numeric/Ranking.cs @@ -24,7 +24,7 @@ public void SetupTrainingSpeedTests() { _mslrWeb10k_Validate = Path.GetFullPath(TestDatasets.MSLRWeb.validFilename); _mslrWeb10k_Train = Path.GetFullPath(TestDatasets.MSLRWeb.trainFilename); - + if (!File.Exists(_mslrWeb10k_Validate)) throw new FileNotFoundException(string.Format(Errors.DatasetNotFound, _mslrWeb10k_Validate)); @@ -42,8 +42,10 @@ public void TrainTest_Ranking_MSLRWeb10K_RawNumericFeatures_FastTreeRanking() " xf=HashTransform{col=GroupId} xf=NAHandleTransform{col=Features}" + " tr=FastTreeRanking{}"; - var environment = EnvironmentFactory.CreateRankingEnvironment(); - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + using (var environment = EnvironmentFactory.CreateRankingEnvironment()) + { + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + } } [Benchmark] @@ -57,8 +59,10 @@ public void TrainTest_Ranking_MSLRWeb10K_RawNumericFeatures_LightGBMRanking() " xf=NAHandleTransform{col=Features}" + " tr=LightGBMRanking{}"; - var environment = EnvironmentFactory.CreateRankingEnvironment(); - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + using (var environment = EnvironmentFactory.CreateRankingEnvironment()) + { + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + } } } @@ -96,8 +100,10 @@ public void SetupScoringSpeedTests() " tr=FastTreeRanking{}" + " out={" + _modelPath_MSLR + "}"; - var environment = EnvironmentFactory.CreateRankingEnvironment(); - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + using (var environment = EnvironmentFactory.CreateRankingEnvironment()) + { + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + } } [Benchmark] @@ -106,8 +112,10 @@ public void Test_Ranking_MSLRWeb10K_RawNumericFeatures_FastTreeRanking() // This benchmark is profiling bulk scoring speed and not training speed. string cmd = @"Test data=" + _mslrWeb10k_Test + " in=" + _modelPath_MSLR; - var environment = EnvironmentFactory.CreateRankingEnvironment(); - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + using (var environment = EnvironmentFactory.CreateRankingEnvironment()) + { + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + } } } } diff --git a/test/Microsoft.ML.Benchmarks/PredictionEngineBench.cs b/test/Microsoft.ML.Benchmarks/PredictionEngineBench.cs index 39342cf224..fac87ca362 100644 --- a/test/Microsoft.ML.Benchmarks/PredictionEngineBench.cs +++ b/test/Microsoft.ML.Benchmarks/PredictionEngineBench.cs @@ -36,30 +36,32 @@ public void SetupIrisPipeline() string _irisDataPath = Program.GetInvariantCultureDataPath("iris.txt"); - var env = new MLContext(seed: 1, conc: 1); - var reader = new TextLoader(env, - new TextLoader.Arguments() - { - Separator = "\t", - HasHeader = true, - Column = new[] + using (var env = new ConsoleEnvironment(seed: 1, conc: 1, verbose: false, sensitivity: MessageSensitivity.None, outWriter: EmptyWriter.Instance)) + { + var reader = new TextLoader(env, + new TextLoader.Arguments() { + Separator = "\t", + HasHeader = true, + Column = new[] + { new TextLoader.Column("Label", DataKind.R4, 0), new TextLoader.Column("SepalLength", DataKind.R4, 1), new TextLoader.Column("SepalWidth", DataKind.R4, 2), new TextLoader.Column("PetalLength", DataKind.R4, 3), new TextLoader.Column("PetalWidth", DataKind.R4, 4), - } - }); + } + }); - IDataView data = reader.Read(_irisDataPath); + IDataView data = reader.Read(_irisDataPath); - var pipeline = new ColumnConcatenatingEstimator(env, "Features", new[] { "SepalLength", "SepalWidth", "PetalLength", "PetalWidth" }) - .Append(new SdcaMultiClassTrainer(env, "Label", "Features", advancedSettings: (s) => { s.NumThreads = 1; s.ConvergenceTolerance = 1e-2f; })); + var pipeline = new ColumnConcatenatingEstimator (env, "Features", new[] { "SepalLength", "SepalWidth", "PetalLength", "PetalWidth" }) + .Append(new SdcaMultiClassTrainer(env, "Features", "Label", advancedSettings: (s) => { s.NumThreads = 1; s.ConvergenceTolerance = 1e-2f; })); - var model = pipeline.Fit(data); + var model = pipeline.Fit(data); - _irisModel = model.MakePredictionFunction(env); + _irisModel = model.MakePredictionFunction(env); + } } [GlobalSetup(Target = nameof(MakeSentimentPredictions))] @@ -72,8 +74,9 @@ public void SetupSentimentPipeline() string _sentimentDataPath = Program.GetInvariantCultureDataPath("wikipedia-detox-250-line-data.tsv"); - var env = new MLContext(seed: 1, conc: 1); - var reader = new TextLoader(env, + using (var env = new ConsoleEnvironment(seed: 1, conc: 1, verbose: false, sensitivity: MessageSensitivity.None, outWriter: EmptyWriter.Instance)) + { + var reader = new TextLoader(env, new TextLoader.Arguments() { Separator = "\t", @@ -85,14 +88,15 @@ public void SetupSentimentPipeline() } }); - IDataView data = reader.Read(_sentimentDataPath); + IDataView data = reader.Read(_sentimentDataPath); - var pipeline = new TextFeaturizingEstimator(env, "SentimentText", "Features") - .Append(new SdcaBinaryTrainer(env, "Label", "Features", advancedSettings: (s) => { s.NumThreads = 1; s.ConvergenceTolerance = 1e-2f; })); + var pipeline = new TextFeaturizingEstimator(env, "SentimentText", "Features") + .Append(new SdcaBinaryTrainer(env, "Features", "Label", advancedSettings: (s) => { s.NumThreads = 1; s.ConvergenceTolerance = 1e-2f; })); - var model = pipeline.Fit(data); + var model = pipeline.Fit(data); - _sentimentModel = model.MakePredictionFunction(env); + _sentimentModel = model.MakePredictionFunction(env); + } } [GlobalSetup(Target = nameof(MakeBreastCancerPredictions))] @@ -105,8 +109,9 @@ public void SetupBreastCancerPipeline() string _breastCancerDataPath = Program.GetInvariantCultureDataPath("breast-cancer.txt"); - var env = new MLContext(seed: 1, conc: 1); - var reader = new TextLoader(env, + using (var env = new ConsoleEnvironment(seed: 1, conc: 1, verbose: false, sensitivity: MessageSensitivity.None, outWriter: EmptyWriter.Instance)) + { + var reader = new TextLoader(env, new TextLoader.Arguments() { Separator = "\t", @@ -118,13 +123,14 @@ public void SetupBreastCancerPipeline() } }); - IDataView data = reader.Read(_breastCancerDataPath); + IDataView data = reader.Read(_breastCancerDataPath); - var pipeline = new SdcaBinaryTrainer(env, "Label", "Features", advancedSettings: (s) => { s.NumThreads = 1; s.ConvergenceTolerance = 1e-2f; }); + var pipeline = new SdcaBinaryTrainer(env, "Features", "Label", advancedSettings: (s) => { s.NumThreads = 1; s.ConvergenceTolerance = 1e-2f; }); - var model = pipeline.Fit(data); + var model = pipeline.Fit(data); - _breastCancerModel = model.MakePredictionFunction(env); + _breastCancerModel = model.MakePredictionFunction(env); + } } [Benchmark] diff --git a/test/Microsoft.ML.Benchmarks/README.md b/test/Microsoft.ML.Benchmarks/README.md index 244f6c2bb8..d999a3b261 100644 --- a/test/Microsoft.ML.Benchmarks/README.md +++ b/test/Microsoft.ML.Benchmarks/README.md @@ -4,11 +4,7 @@ This project contains performance benchmarks. ## Run the Performance Tests -**Pre-requisite:** In order to fetch dependencies which come through Git submodules the following command needs to be run before building: - - git submodule update --init - -**Pre-requisite:** On a clean repo with initalized submodules, `build.cmd` at the root installs the right version of dotnet.exe and builds the solution. You need to build the solution in `Release` with native dependencies. +**Pre-requisite:** On a clean repo, `build.cmd` at the root installs the right version of dotnet.exe and builds the solution. You need to build the solution in `Release` with native dependencies. build.cmd -release -buildNative diff --git a/test/Microsoft.ML.Benchmarks/StochasticDualCoordinateAscentClassifierBench.cs b/test/Microsoft.ML.Benchmarks/StochasticDualCoordinateAscentClassifierBench.cs index 7e2e5f8702..7db3814b98 100644 --- a/test/Microsoft.ML.Benchmarks/StochasticDualCoordinateAscentClassifierBench.cs +++ b/test/Microsoft.ML.Benchmarks/StochasticDualCoordinateAscentClassifierBench.cs @@ -63,17 +63,18 @@ private Legacy.PredictionModel Train(string dataPath) [Benchmark] public void TrainSentiment() { - var env = new MLContext(seed: 1); - // Pipeline - var loader = TextLoader.ReadFile(env, - new TextLoader.Arguments() - { - AllowQuoting = false, - AllowSparse = false, - Separator = "tab", - HasHeader = true, - Column = new[] + using (var env = new ConsoleEnvironment(seed: 1)) + { + // Pipeline + var loader = TextLoader.ReadFile(env, + new TextLoader.Arguments() { + AllowQuoting = false, + AllowSparse = false, + Separator = "tab", + HasHeader = true, + Column = new[] + { new TextLoader.Column() { Name = "Label", @@ -87,14 +88,14 @@ public void TrainSentiment() Source = new [] { new TextLoader.Range() { Min=1, Max=1} }, Type = DataKind.Text } - } - }, new MultiFileSource(_sentimentDataPath)); + } + }, new MultiFileSource(_sentimentDataPath)); - var text = TextFeaturizingEstimator.Create(env, - new TextFeaturizingEstimator.Arguments() - { - Column = new TextFeaturizingEstimator.Column + var text = TextFeaturizingEstimator.Create(env, + new TextFeaturizingEstimator.Arguments() { + Column = new TextFeaturizingEstimator.Column + { Name = "WordEmbeddings", Source = new[] { "SentimentText" } }, @@ -106,24 +107,27 @@ public void TrainSentiment() WordFeatureExtractor = null, }, loader); - var trans = WordEmbeddingsExtractingTransformer.Create(env, - new WordEmbeddingsExtractingTransformer.Arguments() + var trans = WordEmbeddingsTransform.Create(env, + new WordEmbeddingsTransform.Arguments() { - Column = new WordEmbeddingsExtractingTransformer.Column[1] + Column = new WordEmbeddingsTransform.Column[1] { - new WordEmbeddingsExtractingTransformer.Column + new WordEmbeddingsTransform.Column { Name = "Features", Source = "WordEmbeddings_TransformedText" } }, - ModelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe, + ModelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe, }, text); - // Train - var trainer = new SdcaMultiClassTrainer(env, "Label", "Features", maxIterations: 20); - var predicted = trainer.Fit(trans); - _consumer.Consume(predicted); + // Train + var trainer = new SdcaMultiClassTrainer(env, "Features", "Label", maxIterations: 20); + var trainRoles = new RoleMappedData(trans, label: "Label", feature: "Features"); + + var predicted = trainer.Train(trainRoles); + _consumer.Consume(predicted); + } } [GlobalSetup(Targets = new string[] { nameof(PredictIris), nameof(PredictIrisBatchOf1), nameof(PredictIrisBatchOf2), nameof(PredictIrisBatchOf5) })] diff --git a/test/Microsoft.ML.Benchmarks/Text/MultiClassClassification.cs b/test/Microsoft.ML.Benchmarks/Text/MultiClassClassification.cs index d7705aaadb..50524107e7 100644 --- a/test/Microsoft.ML.Benchmarks/Text/MultiClassClassification.cs +++ b/test/Microsoft.ML.Benchmarks/Text/MultiClassClassification.cs @@ -25,13 +25,13 @@ public void SetupTrainingSpeedTests() _dataPath_Wiki = Path.GetFullPath(TestDatasets.WikiDetox.trainFilename); if (!File.Exists(_dataPath_Wiki)) - throw new FileNotFoundException(string.Format(Errors.DatasetNotFound, _dataPath_Wiki)); + throw new FileNotFoundException(string.Format(Errors.DatasetNotFound, _dataPath_Wiki)); } [Benchmark] public void CV_Multiclass_WikiDetox_BigramsAndTrichar_OVAAveragedPerceptron() { - string cmd = @"CV k=5 data=" + _dataPath_Wiki + + string cmd = @"CV k=5 data=" + _dataPath_Wiki + " loader=TextLoader{quote=- sparse=- col=Label:R4:0 col=rev_id:TX:1 col=comment:TX:2 col=logged_in:BL:4 col=ns:TX:5 col=sample:TX:6 col=split:TX:7 col=year:R4:3 header=+}" + " xf=Convert{col=logged_in type=R4}" + " xf=CategoricalTransform{col=ns}" + @@ -39,8 +39,10 @@ public void CV_Multiclass_WikiDetox_BigramsAndTrichar_OVAAveragedPerceptron() " xf=Concat{col=Features:FeaturesText,logged_in,ns}" + " tr=OVA{p=AveragedPerceptron{iter=10}}"; - var environment = EnvironmentFactory.CreateClassificationEnvironment(); - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + using (var environment = EnvironmentFactory.CreateClassificationEnvironment()) + { + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + } } [Benchmark] @@ -54,8 +56,10 @@ public void CV_Multiclass_WikiDetox_BigramsAndTrichar_LightGBMMulticlass() " xf=Concat{col=Features:FeaturesText,logged_in,ns}" + " tr=LightGBMMulticlass{iter=10}"; - var environment = EnvironmentFactory.CreateClassificationEnvironment(); - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + using (var environment = EnvironmentFactory.CreateClassificationEnvironment()) + { + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + } } [Benchmark] @@ -70,8 +74,10 @@ public void CV_Multiclass_WikiDetox_WordEmbeddings_OVAAveragedPerceptron() " xf=WordEmbeddingsTransform{col=FeaturesWordEmbedding:FeaturesText_TransformedText model=FastTextWikipedia300D}" + " xf=Concat{col=Features:FeaturesText,FeaturesWordEmbedding,logged_in,ns}"; - var environment = EnvironmentFactory.CreateClassificationEnvironment(); - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + using (var environment = EnvironmentFactory.CreateClassificationEnvironment()) + { + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + } } [Benchmark] @@ -86,8 +92,10 @@ public void CV_Multiclass_WikiDetox_WordEmbeddings_SDCAMC() " xf=WordEmbeddingsTransform{col=FeaturesWordEmbedding:FeaturesText_TransformedText model=FastTextWikipedia300D}" + " xf=Concat{col=Features:FeaturesWordEmbedding,logged_in,ns}"; - var environment = EnvironmentFactory.CreateClassificationEnvironment(); - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + using (var environment = EnvironmentFactory.CreateClassificationEnvironment()) + { + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + } } } @@ -114,8 +122,10 @@ public void SetupScoringSpeedTests() " tr=OVA{p=AveragedPerceptron{iter=10}}" + " out={" + _modelPath_Wiki + "}"; - var environment = EnvironmentFactory.CreateClassificationEnvironment(); - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + using (var environment = EnvironmentFactory.CreateClassificationEnvironment()) + { + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + } } [Benchmark] @@ -125,8 +135,10 @@ public void Test_Multiclass_WikiDetox_BigramsAndTrichar_OVAAveragedPerceptron() string modelpath = Path.Combine(Directory.GetCurrentDirectory(), @"WikiModel.fold000.zip"); string cmd = @"Test data=" + _dataPath_Wiki + " in=" + modelpath; - var environment = EnvironmentFactory.CreateClassificationEnvironment(); - Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + using (var environment = EnvironmentFactory.CreateClassificationEnvironment()) + { + Maml.MainCore(environment, cmd, alwaysPrintStacktrace: false); + } } } } diff --git a/test/Microsoft.ML.CodeAnalyzer.Tests/Code/ContractsCheckTest.cs b/test/Microsoft.ML.CodeAnalyzer.Tests/Code/ContractsCheckTest.cs index da5994ec7a..ff528bfcce 100644 --- a/test/Microsoft.ML.CodeAnalyzer.Tests/Code/ContractsCheckTest.cs +++ b/test/Microsoft.ML.CodeAnalyzer.Tests/Code/ContractsCheckTest.cs @@ -2,19 +2,15 @@ // 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.CodeAnalysis; using Microsoft.ML.CodeAnalyzer.Tests.Helpers; -using System; -using System.Linq; using Xunit; namespace Microsoft.ML.InternalCodeAnalyzer.Tests { public sealed class ContractsCheckTest : DiagnosticVerifier { - private readonly Lazy Source = TestUtils.LazySource("ContractsCheckResource.cs"); - private readonly Lazy SourceContracts = TestUtils.LazySource("Contracts.cs"); - private readonly Lazy SourceFriend = TestUtils.LazySource("BestFriendAttribute.cs"); + private static string _contractsSource; + internal static string Source => TestUtils.EnsureSourceLoaded(ref _contractsSource, "ContractsCheckResource.cs"); [Fact] public void ContractsCheck() @@ -41,7 +37,7 @@ public void ContractsCheck() diagDecode.CreateDiagnosticResult(basis + 39, 41, "CheckDecode", "\"This message is suspicious\""), }; - VerifyCSharpDiagnostic(Source.Value + SourceContracts.Value + SourceFriend.Value, expected); + VerifyCSharpDiagnostic(Source, expected); } [Fact] @@ -72,27 +68,16 @@ public TypeName() public sealed class ContractsCheckFixTest : CodeFixVerifier { - private readonly Lazy SourcePreFix = TestUtils.LazySource("ContractsCheckBeforeFix.cs"); - private readonly Lazy SourcePostFix = TestUtils.LazySource("ContractsCheckAfterFix.cs"); - - private readonly Lazy SourceArgAttr = TestUtils.LazySource("ArgumentAttribute.cs"); - private readonly Lazy SourceArgType = TestUtils.LazySource("ArgumentType.cs"); - private readonly Lazy SourceBestAttr = TestUtils.LazySource("BestFriendAttribute.cs"); - private readonly Lazy SourceDefArgAttr = TestUtils.LazySource("DefaultArgumentAttribute.cs"); + private static string _preFix; + private static string _postFix; [Fact] public void ContractsCheckFix() { - //VerifyCSharpFix(SourcePreFix.Value, SourcePostFix.Value); - - Solution solution = null; - var proj = CreateProject(TestProjectName, ref solution, SourcePostFix.Value, SourceArgAttr.Value, - SourceArgType.Value, SourceBestAttr.Value, SourceDefArgAttr.Value); - var document = proj.Documents.First(); - var analyzer = GetCSharpDiagnosticAnalyzer(); - var comp = proj.GetCompilationAsync().Result; + string test = TestUtils.EnsureSourceLoaded(ref _preFix, "ContractsCheckBeforeFix.cs"); + string expected = TestUtils.EnsureSourceLoaded(ref _postFix, "ContractsCheckAfterFix.cs"); - CycleAndVerifyFix(analyzer, GetCSharpCodeFixProvider(), SourcePostFix.Value, document); + VerifyCSharpFix(test, expected); } } } diff --git a/test/Microsoft.ML.CodeAnalyzer.Tests/Helpers/CodeFixVerifier.cs b/test/Microsoft.ML.CodeAnalyzer.Tests/Helpers/CodeFixVerifier.cs index 483e7ace65..489ec5c446 100644 --- a/test/Microsoft.ML.CodeAnalyzer.Tests/Helpers/CodeFixVerifier.cs +++ b/test/Microsoft.ML.CodeAnalyzer.Tests/Helpers/CodeFixVerifier.cs @@ -76,11 +76,6 @@ protected void VerifyBasicFix(string oldSource, string newSource, int? codeFixIn private void VerifyFix(string language, DiagnosticAnalyzer analyzer, CodeFixProvider codeFixProvider, string oldSource, string newSource, int? codeFixIndex, bool allowNewCompilerDiagnostics) { var document = CreateDocument(oldSource); - CycleAndVerifyFix(analyzer, codeFixProvider, newSource, document, codeFixIndex, allowNewCompilerDiagnostics); - } - - internal static void CycleAndVerifyFix(DiagnosticAnalyzer analyzer, CodeFixProvider codeFixProvider, string newSource, Document document, int? codeFixIndex = null, bool allowNewCompilerDiagnostics = false) - { var analyzerDiagnostics = GetSortedDiagnosticsFromDocuments(analyzer, new[] { document }); var compilerDiagnostics = GetCompilerDiagnostics(document); int attempts = analyzerDiagnostics.Length; diff --git a/test/Microsoft.ML.CodeAnalyzer.Tests/Microsoft.ML.CodeAnalyzer.Tests.csproj b/test/Microsoft.ML.CodeAnalyzer.Tests/Microsoft.ML.CodeAnalyzer.Tests.csproj index 7851f01ecb..386ef06c8b 100644 --- a/test/Microsoft.ML.CodeAnalyzer.Tests/Microsoft.ML.CodeAnalyzer.Tests.csproj +++ b/test/Microsoft.ML.CodeAnalyzer.Tests/Microsoft.ML.CodeAnalyzer.Tests.csproj @@ -8,19 +8,7 @@ - - %(Filename)%(Extension) - - - %(Filename)%(Extension) - - - %(Filename)%(Extension) - - - %(Filename)%(Extension) - - + %(Filename)%(Extension) diff --git a/test/Microsoft.ML.CodeAnalyzer.Tests/Resources/ContractsCheckResource.cs b/test/Microsoft.ML.CodeAnalyzer.Tests/Resources/ContractsCheckResource.cs index cd6690942f..0c8ca4f332 100644 --- a/test/Microsoft.ML.CodeAnalyzer.Tests/Resources/ContractsCheckResource.cs +++ b/test/Microsoft.ML.CodeAnalyzer.Tests/Resources/ContractsCheckResource.cs @@ -57,15 +57,3 @@ public static class Messages public const string CoolMessage = "This is super cool"; } } - -// Dummy declarations so that the independent compilation of contracts works as expected. -namespace Microsoft.ML.Runtime -{ - [Flags] - internal enum MessageSensitivity - { - None = 0, - Unknown = ~None - } - internal interface IHostEnvironment : IExceptionContext { } -} \ No newline at end of file diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestCSharpApi.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestCSharpApi.cs index ade016eeff..5a38ecb6d0 100644 --- a/test/Microsoft.ML.Core.Tests/UnitTests/TestCSharpApi.cs +++ b/test/Microsoft.ML.Core.Tests/UnitTests/TestCSharpApi.cs @@ -25,95 +25,99 @@ public TestCSharpApi(ITestOutputHelper output) : base(output) public void TestSimpleExperiment() { var dataPath = GetDataPath("adult.tiny.with-schema.txt"); - var env = new MLContext(); - var experiment = env.CreateExperiment(); + using (var env = new ConsoleEnvironment()) + { + var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - var importOutput = experiment.Add(importInput); + var importInput = new Legacy.Data.TextLoader(dataPath); + var importOutput = experiment.Add(importInput); - var normalizeInput = new Legacy.Transforms.MinMaxNormalizer - { - Data = importOutput.Data - }; - normalizeInput.AddColumn("NumericFeatures"); - var normalizeOutput = experiment.Add(normalizeInput); - - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - var data = experiment.GetOutput(normalizeOutput.OutputData); - - var schema = data.Schema; - Assert.Equal(5, schema.ColumnCount); - var expected = new[] { "Label", "Workclass", "Categories", "NumericFeatures", "NumericFeatures" }; - for (int i = 0; i < schema.ColumnCount; i++) - Assert.Equal(expected[i], schema.GetColumnName(i)); + var normalizeInput = new Legacy.Transforms.MinMaxNormalizer + { + Data = importOutput.Data + }; + normalizeInput.AddColumn("NumericFeatures"); + var normalizeOutput = experiment.Add(normalizeInput); + + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + var data = experiment.GetOutput(normalizeOutput.OutputData); + + var schema = data.Schema; + Assert.Equal(5, schema.ColumnCount); + var expected = new[] { "Label", "Workclass", "Categories", "NumericFeatures", "NumericFeatures" }; + for (int i = 0; i < schema.ColumnCount; i++) + Assert.Equal(expected[i], schema.GetColumnName(i)); + } } [Fact] public void TestSimpleTrainExperiment() { var dataPath = GetDataPath("adult.tiny.with-schema.txt"); - var env = new MLContext(); - var experiment = env.CreateExperiment(); + using (var env = new ConsoleEnvironment()) + { + var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - var importOutput = experiment.Add(importInput); + var importInput = new Legacy.Data.TextLoader(dataPath); + var importOutput = experiment.Add(importInput); - var catInput = new Legacy.Transforms.CategoricalOneHotVectorizer - { - Data = importOutput.Data - }; - catInput.AddColumn("Categories"); - var catOutput = experiment.Add(catInput); + var catInput = new Legacy.Transforms.CategoricalOneHotVectorizer + { + Data = importOutput.Data + }; + catInput.AddColumn("Categories"); + var catOutput = experiment.Add(catInput); - var concatInput = new Legacy.Transforms.ColumnConcatenator - { - Data = catOutput.OutputData - }; - concatInput.AddColumn("Features", "Categories", "NumericFeatures"); - var concatOutput = experiment.Add(concatInput); + var concatInput = new Legacy.Transforms.ColumnConcatenator + { + Data = catOutput.OutputData + }; + concatInput.AddColumn("Features", "Categories", "NumericFeatures"); + var concatOutput = experiment.Add(concatInput); - var sdcaInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier - { - TrainingData = concatOutput.OutputData, - LossFunction = new HingeLossSDCAClassificationLossFunction() { Margin = 1.1f }, - NumThreads = 1, - Shuffle = false - }; - var sdcaOutput = experiment.Add(sdcaInput); - - var scoreInput = new Legacy.Transforms.DatasetScorer - { - Data = concatOutput.OutputData, - PredictorModel = sdcaOutput.PredictorModel - }; - var scoreOutput = experiment.Add(scoreInput); + var sdcaInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier + { + TrainingData = concatOutput.OutputData, + LossFunction = new HingeLossSDCAClassificationLossFunction() { Margin = 1.1f }, + NumThreads = 1, + Shuffle = false + }; + var sdcaOutput = experiment.Add(sdcaInput); - var evalInput = new Legacy.Models.BinaryClassificationEvaluator - { - Data = scoreOutput.ScoredData - }; - var evalOutput = experiment.Add(evalInput); - - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - var data = experiment.GetOutput(evalOutput.OverallMetrics); - - var schema = data.Schema; - var b = schema.TryGetColumnIndex("AUC", out int aucCol); - Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == aucCol)) - { - var getter = cursor.GetGetter(aucCol); - b = cursor.MoveNext(); + var scoreInput = new Legacy.Transforms.DatasetScorer + { + Data = concatOutput.OutputData, + PredictorModel = sdcaOutput.PredictorModel + }; + var scoreOutput = experiment.Add(scoreInput); + + var evalInput = new Legacy.Models.BinaryClassificationEvaluator + { + Data = scoreOutput.ScoredData + }; + var evalOutput = experiment.Add(evalInput); + + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + var data = experiment.GetOutput(evalOutput.OverallMetrics); + + var schema = data.Schema; + var b = schema.TryGetColumnIndex("AUC", out int aucCol); Assert.True(b); - double auc = 0; - getter(ref auc); - Assert.Equal(0.93, auc, 2); - b = cursor.MoveNext(); - Assert.False(b); + using (var cursor = data.GetRowCursor(col => col == aucCol)) + { + var getter = cursor.GetGetter(aucCol); + b = cursor.MoveNext(); + Assert.True(b); + double auc = 0; + getter(ref auc); + Assert.Equal(0.93, auc, 2); + b = cursor.MoveNext(); + Assert.False(b); + } } } @@ -121,69 +125,71 @@ public void TestSimpleTrainExperiment() public void TestTrainTestMacro() { var dataPath = GetDataPath("adult.tiny.with-schema.txt"); - var env = new MLContext(); - var subGraph = env.CreateExperiment(); + using (var env = new ConsoleEnvironment()) + { + var subGraph = env.CreateExperiment(); - var catInput = new Legacy.Transforms.CategoricalOneHotVectorizer(); - catInput.AddColumn("Categories"); - var catOutput = subGraph.Add(catInput); + var catInput = new Legacy.Transforms.CategoricalOneHotVectorizer(); + catInput.AddColumn("Categories"); + var catOutput = subGraph.Add(catInput); - var concatInput = new Legacy.Transforms.ColumnConcatenator - { - Data = catOutput.OutputData - }; - concatInput.AddColumn("Features", "Categories", "NumericFeatures"); - var concatOutput = subGraph.Add(concatInput); + var concatInput = new Legacy.Transforms.ColumnConcatenator + { + Data = catOutput.OutputData + }; + concatInput.AddColumn("Features", "Categories", "NumericFeatures"); + var concatOutput = subGraph.Add(concatInput); - var sdcaInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier - { - TrainingData = concatOutput.OutputData, - LossFunction = new HingeLossSDCAClassificationLossFunction() { Margin = 1.1f }, - NumThreads = 1, - Shuffle = false - }; - var sdcaOutput = subGraph.Add(sdcaInput); - - var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner - { - TransformModels = new ArrayVar(catOutput.Model, concatOutput.Model), - PredictorModel = sdcaOutput.PredictorModel - }; - var modelCombineOutput = subGraph.Add(modelCombine); + var sdcaInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier + { + TrainingData = concatOutput.OutputData, + LossFunction = new HingeLossSDCAClassificationLossFunction() { Margin = 1.1f }, + NumThreads = 1, + Shuffle = false + }; + var sdcaOutput = subGraph.Add(sdcaInput); + + var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner + { + TransformModels = new ArrayVar(catOutput.Model, concatOutput.Model), + PredictorModel = sdcaOutput.PredictorModel + }; + var modelCombineOutput = subGraph.Add(modelCombine); - var experiment = env.CreateExperiment(); + var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - var importOutput = experiment.Add(importInput); + var importInput = new Legacy.Data.TextLoader(dataPath); + var importOutput = experiment.Add(importInput); - var trainTestInput = new Legacy.Models.TrainTestBinaryEvaluator - { - TrainingData = importOutput.Data, - TestingData = importOutput.Data, - Nodes = subGraph - }; - trainTestInput.Inputs.Data = catInput.Data; - trainTestInput.Outputs.Model = modelCombineOutput.PredictorModel; - var trainTestOutput = experiment.Add(trainTestInput); - - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - var data = experiment.GetOutput(trainTestOutput.OverallMetrics); - - var schema = data.Schema; - var b = schema.TryGetColumnIndex("AUC", out int aucCol); - Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == aucCol)) - { - var getter = cursor.GetGetter(aucCol); - b = cursor.MoveNext(); + var trainTestInput = new Legacy.Models.TrainTestBinaryEvaluator + { + TrainingData = importOutput.Data, + TestingData = importOutput.Data, + Nodes = subGraph + }; + trainTestInput.Inputs.Data = catInput.Data; + trainTestInput.Outputs.Model = modelCombineOutput.PredictorModel; + var trainTestOutput = experiment.Add(trainTestInput); + + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + var data = experiment.GetOutput(trainTestOutput.OverallMetrics); + + var schema = data.Schema; + var b = schema.TryGetColumnIndex("AUC", out int aucCol); Assert.True(b); - double auc = 0; - getter(ref auc); - Assert.Equal(0.93, auc, 2); - b = cursor.MoveNext(); - Assert.False(b); + using (var cursor = data.GetRowCursor(col => col == aucCol)) + { + var getter = cursor.GetGetter(aucCol); + b = cursor.MoveNext(); + Assert.True(b); + double auc = 0; + getter(ref auc); + Assert.Equal(0.93, auc, 2); + b = cursor.MoveNext(); + Assert.False(b); + } } } @@ -191,66 +197,68 @@ public void TestTrainTestMacro() public void TestCrossValidationBinaryMacro() { var dataPath = GetDataPath("adult.tiny.with-schema.txt"); - var env = new MLContext(); - var subGraph = env.CreateExperiment(); + using (var env = new ConsoleEnvironment()) + { + var subGraph = env.CreateExperiment(); - var catInput = new Legacy.Transforms.CategoricalOneHotVectorizer(); - catInput.AddColumn("Categories"); - var catOutput = subGraph.Add(catInput); + var catInput = new Legacy.Transforms.CategoricalOneHotVectorizer(); + catInput.AddColumn("Categories"); + var catOutput = subGraph.Add(catInput); - var concatInput = new Legacy.Transforms.ColumnConcatenator - { - Data = catOutput.OutputData - }; - concatInput.AddColumn("Features", "Categories", "NumericFeatures"); - var concatOutput = subGraph.Add(concatInput); + var concatInput = new Legacy.Transforms.ColumnConcatenator + { + Data = catOutput.OutputData + }; + concatInput.AddColumn("Features", "Categories", "NumericFeatures"); + var concatOutput = subGraph.Add(concatInput); - var lrInput = new Legacy.Trainers.LogisticRegressionBinaryClassifier - { - TrainingData = concatOutput.OutputData, - NumThreads = 1 - }; - var lrOutput = subGraph.Add(lrInput); + var lrInput = new Legacy.Trainers.LogisticRegressionBinaryClassifier + { + TrainingData = concatOutput.OutputData, + NumThreads = 1 + }; + var lrOutput = subGraph.Add(lrInput); - var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner - { - TransformModels = new ArrayVar(catOutput.Model, concatOutput.Model), - PredictorModel = lrOutput.PredictorModel - }; - var modelCombineOutput = subGraph.Add(modelCombine); + var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner + { + TransformModels = new ArrayVar(catOutput.Model, concatOutput.Model), + PredictorModel = lrOutput.PredictorModel + }; + var modelCombineOutput = subGraph.Add(modelCombine); - var experiment = env.CreateExperiment(); + var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - var importOutput = experiment.Add(importInput); + var importInput = new Legacy.Data.TextLoader(dataPath); + var importOutput = experiment.Add(importInput); - var crossValidateBinary = new Legacy.Models.BinaryCrossValidator - { - Data = importOutput.Data, - Nodes = subGraph - }; - crossValidateBinary.Inputs.Data = catInput.Data; - crossValidateBinary.Outputs.Model = modelCombineOutput.PredictorModel; - var crossValidateOutput = experiment.Add(crossValidateBinary); - - experiment.Compile(); - importInput.SetInput(env, experiment); - experiment.Run(); - var data = experiment.GetOutput(crossValidateOutput.OverallMetrics[0]); - - var schema = data.Schema; - var b = schema.TryGetColumnIndex("AUC", out int aucCol); - Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == aucCol)) - { - var getter = cursor.GetGetter(aucCol); - b = cursor.MoveNext(); + var crossValidateBinary = new Legacy.Models.BinaryCrossValidator + { + Data = importOutput.Data, + Nodes = subGraph + }; + crossValidateBinary.Inputs.Data = catInput.Data; + crossValidateBinary.Outputs.Model = modelCombineOutput.PredictorModel; + var crossValidateOutput = experiment.Add(crossValidateBinary); + + experiment.Compile(); + importInput.SetInput(env, experiment); + experiment.Run(); + var data = experiment.GetOutput(crossValidateOutput.OverallMetrics[0]); + + var schema = data.Schema; + var b = schema.TryGetColumnIndex("AUC", out int aucCol); Assert.True(b); - double auc = 0; - getter(ref auc); - Assert.Equal(0.87, auc, 1); - b = cursor.MoveNext(); - Assert.False(b); + using (var cursor = data.GetRowCursor(col => col == aucCol)) + { + var getter = cursor.GetGetter(aucCol); + b = cursor.MoveNext(); + Assert.True(b); + double auc = 0; + getter(ref auc); + Assert.Equal(0.87, auc, 1); + b = cursor.MoveNext(); + Assert.False(b); + } } } @@ -258,41 +266,42 @@ public void TestCrossValidationBinaryMacro() public void TestCrossValidationMacro() { var dataPath = GetDataPath(TestDatasets.generatedRegressionDatasetmacro.trainFilename); - var env = new MLContext(42); - var subGraph = env.CreateExperiment(); - - var nop = new Legacy.Transforms.NoOperation(); - var nopOutput = subGraph.Add(nop); + using (var env = new ConsoleEnvironment(42)) + { + var subGraph = env.CreateExperiment(); - var generate = new Legacy.Transforms.RandomNumberGenerator(); - generate.Column = new[] { new Legacy.Transforms.GenerateNumberTransformColumn() { Name = "Weight1" } }; - generate.Data = nopOutput.OutputData; - var generateOutput = subGraph.Add(generate); + var nop = new Legacy.Transforms.NoOperation(); + var nopOutput = subGraph.Add(nop); - var learnerInput = new Legacy.Trainers.PoissonRegressor - { - TrainingData = generateOutput.OutputData, - NumThreads = 1, - WeightColumn = "Weight1" - }; - var learnerOutput = subGraph.Add(learnerInput); + var generate = new Legacy.Transforms.RandomNumberGenerator(); + generate.Column = new[] { new Legacy.Transforms.GenerateNumberTransformColumn() { Name = "Weight1" } }; + generate.Data = nopOutput.OutputData; + var generateOutput = subGraph.Add(generate); - var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner - { - TransformModels = new ArrayVar(nopOutput.Model, generateOutput.Model), - PredictorModel = learnerOutput.PredictorModel - }; - var modelCombineOutput = subGraph.Add(modelCombine); + var learnerInput = new Legacy.Trainers.PoissonRegressor + { + TrainingData = generateOutput.OutputData, + NumThreads = 1, + WeightColumn = "Weight1" + }; + var learnerOutput = subGraph.Add(learnerInput); - var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath) - { - Arguments = new Legacy.Data.TextLoaderArguments + var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner { - Separator = new[] { ';' }, - HasHeader = true, - Column = new[] + TransformModels = new ArrayVar(nopOutput.Model, generateOutput.Model), + PredictorModel = learnerOutput.PredictorModel + }; + var modelCombineOutput = subGraph.Add(modelCombine); + + var experiment = env.CreateExperiment(); + var importInput = new Legacy.Data.TextLoader(dataPath) { + Arguments = new Legacy.Data.TextLoaderArguments + { + Separator = new[] { ';' }, + HasHeader = true, + Column = new[] + { new TextLoaderColumn() { Name = "Label", @@ -307,94 +316,95 @@ public void TestCrossValidationMacro() Type = Legacy.Data.DataKind.Num } } - } - }; - var importOutput = experiment.Add(importInput); + } + }; + var importOutput = experiment.Add(importInput); - var crossValidate = new Legacy.Models.CrossValidator - { - Data = importOutput.Data, - Nodes = subGraph, - Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureRegressorTrainer, - TransformModel = null, - WeightColumn = "Weight1" - }; - crossValidate.Inputs.Data = nop.Data; - crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; - var crossValidateOutput = experiment.Add(crossValidate); - - experiment.Compile(); - importInput.SetInput(env, experiment); - experiment.Run(); - var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); - - var schema = data.Schema; - var b = schema.TryGetColumnIndex("L1(avg)", out int metricCol); - Assert.True(b); - b = schema.TryGetColumnIndex("Fold Index", out int foldCol); - Assert.True(b); - b = schema.TryGetColumnIndex("IsWeighted", out int isWeightedCol); - using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol || col == isWeightedCol)) - { - var getter = cursor.GetGetter(metricCol); - var foldGetter = cursor.GetGetter>(foldCol); - ReadOnlyMemory fold = default; - var isWeightedGetter = cursor.GetGetter(isWeightedCol); - bool isWeighted = default; - double avg = 0; - double weightedAvg = 0; - for (int w = 0; w < 2; w++) + var crossValidate = new Legacy.Models.CrossValidator { - // Get the average. - b = cursor.MoveNext(); - Assert.True(b); - if (w == 1) - getter(ref weightedAvg); - else - getter(ref avg); - foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); - isWeightedGetter(ref isWeighted); - Assert.True(isWeighted == (w == 1)); + Data = importOutput.Data, + Nodes = subGraph, + Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureRegressorTrainer, + TransformModel = null, + WeightColumn = "Weight1" + }; + crossValidate.Inputs.Data = nop.Data; + crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; + var crossValidateOutput = experiment.Add(crossValidate); - // Get the standard deviation. - b = cursor.MoveNext(); - Assert.True(b); - double stdev = 0; - getter(ref stdev); - foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); - if (w == 1) - Assert.Equal(1.585, stdev, 3); - else - Assert.Equal(1.39, stdev, 2); - isWeightedGetter(ref isWeighted); - Assert.True(isWeighted == (w == 1)); - } - double sum = 0; - double weightedSum = 0; - for (int f = 0; f < 2; f++) + experiment.Compile(); + importInput.SetInput(env, experiment); + experiment.Run(); + var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); + + var schema = data.Schema; + var b = schema.TryGetColumnIndex("L1(avg)", out int metricCol); + Assert.True(b); + b = schema.TryGetColumnIndex("Fold Index", out int foldCol); + Assert.True(b); + b = schema.TryGetColumnIndex("IsWeighted", out int isWeightedCol); + using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol || col == isWeightedCol)) { + var getter = cursor.GetGetter(metricCol); + var foldGetter = cursor.GetGetter>(foldCol); + ReadOnlyMemory fold = default; + var isWeightedGetter = cursor.GetGetter(isWeightedCol); + bool isWeighted = default; + double avg = 0; + double weightedAvg = 0; for (int w = 0; w < 2; w++) { + // Get the average. b = cursor.MoveNext(); Assert.True(b); - double val = 0; - getter(ref val); + if (w == 1) + getter(ref weightedAvg); + else + getter(ref avg); foldGetter(ref fold); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); + isWeightedGetter(ref isWeighted); + Assert.True(isWeighted == (w == 1)); + + // Get the standard deviation. + b = cursor.MoveNext(); + Assert.True(b); + double stdev = 0; + getter(ref stdev); + foldGetter(ref fold); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); if (w == 1) - weightedSum += val; + Assert.Equal(1.585, stdev, 3); else - sum += val; - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); + Assert.Equal(1.39, stdev, 2); isWeightedGetter(ref isWeighted); Assert.True(isWeighted == (w == 1)); } + double sum = 0; + double weightedSum = 0; + for (int f = 0; f < 2; f++) + { + for (int w = 0; w < 2; w++) + { + b = cursor.MoveNext(); + Assert.True(b); + double val = 0; + getter(ref val); + foldGetter(ref fold); + if (w == 1) + weightedSum += val; + else + sum += val; + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); + isWeightedGetter(ref isWeighted); + Assert.True(isWeighted == (w == 1)); + } + } + Assert.Equal(weightedAvg, weightedSum / 2); + Assert.Equal(avg, sum / 2); + b = cursor.MoveNext(); + Assert.False(b); } - Assert.Equal(weightedAvg, weightedSum / 2); - Assert.Equal(avg, sum / 2); - b = cursor.MoveNext(); - Assert.False(b); } } @@ -402,207 +412,207 @@ public void TestCrossValidationMacro() public void TestCrossValidationMacroWithMultiClass() { var dataPath = GetDataPath(@"Train-Tiny-28x28.txt"); - var env = new MLContext(42); - var subGraph = env.CreateExperiment(); + using (var env = new ConsoleEnvironment(42)) + { + var subGraph = env.CreateExperiment(); - var nop = new Legacy.Transforms.NoOperation(); - var nopOutput = subGraph.Add(nop); + var nop = new Legacy.Transforms.NoOperation(); + var nopOutput = subGraph.Add(nop); - var learnerInput = new Legacy.Trainers.StochasticDualCoordinateAscentClassifier - { - TrainingData = nopOutput.OutputData, - NumThreads = 1 - }; - var learnerOutput = subGraph.Add(learnerInput); + var learnerInput = new Legacy.Trainers.StochasticDualCoordinateAscentClassifier + { + TrainingData = nopOutput.OutputData, + NumThreads = 1 + }; + var learnerOutput = subGraph.Add(learnerInput); - var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner - { - TransformModels = new ArrayVar(nopOutput.Model), - PredictorModel = learnerOutput.PredictorModel - }; - var modelCombineOutput = subGraph.Add(modelCombine); + var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner + { + TransformModels = new ArrayVar(nopOutput.Model), + PredictorModel = learnerOutput.PredictorModel + }; + var modelCombineOutput = subGraph.Add(modelCombine); - var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - var importOutput = experiment.Add(importInput); + var experiment = env.CreateExperiment(); + var importInput = new Legacy.Data.TextLoader(dataPath); + var importOutput = experiment.Add(importInput); - var crossValidate = new Legacy.Models.CrossValidator - { - Data = importOutput.Data, - Nodes = subGraph, - Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureMultiClassClassifierTrainer, - TransformModel = null - }; - crossValidate.Inputs.Data = nop.Data; - crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; - var crossValidateOutput = experiment.Add(crossValidate); - - experiment.Compile(); - importInput.SetInput(env, experiment); - experiment.Run(); - var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); - - var schema = data.Schema; - var b = schema.TryGetColumnIndex("Accuracy(micro-avg)", out int metricCol); - Assert.True(b); - b = schema.TryGetColumnIndex("Fold Index", out int foldCol); - Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol)) - { - var getter = cursor.GetGetter(metricCol); - var foldGetter = cursor.GetGetter>(foldCol); - ReadOnlyMemory fold = default; + var crossValidate = new Legacy.Models.CrossValidator + { + Data = importOutput.Data, + Nodes = subGraph, + Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureMultiClassClassifierTrainer, + TransformModel = null + }; + crossValidate.Inputs.Data = nop.Data; + crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; + var crossValidateOutput = experiment.Add(crossValidate); - // Get the average. - b = cursor.MoveNext(); - Assert.True(b); - double avg = 0; - getter(ref avg); - foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); + experiment.Compile(); + importInput.SetInput(env, experiment); + experiment.Run(); + var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); - // Get the standard deviation. - b = cursor.MoveNext(); + var schema = data.Schema; + var b = schema.TryGetColumnIndex("Accuracy(micro-avg)", out int metricCol); Assert.True(b); - double stdev = 0; - getter(ref stdev); - foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); - Assert.Equal(0.015, stdev, 3); - - double sum = 0; - double val = 0; - for (int f = 0; f < 2; f++) + b = schema.TryGetColumnIndex("Fold Index", out int foldCol); + Assert.True(b); + using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol)) { + var getter = cursor.GetGetter(metricCol); + var foldGetter = cursor.GetGetter>(foldCol); + ReadOnlyMemory fold = default; + + // Get the average. b = cursor.MoveNext(); Assert.True(b); - getter(ref val); + double avg = 0; + getter(ref avg); foldGetter(ref fold); - sum += val; - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); + + // Get the standard deviation. + b = cursor.MoveNext(); + Assert.True(b); + double stdev = 0; + getter(ref stdev); + foldGetter(ref fold); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); + Assert.Equal(0.025, stdev, 3); + + double sum = 0; + double val = 0; + for (int f = 0; f < 2; f++) + { + b = cursor.MoveNext(); + Assert.True(b); + getter(ref val); + foldGetter(ref fold); + sum += val; + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); + } + Assert.Equal(avg, sum / 2); + b = cursor.MoveNext(); + Assert.False(b); } - Assert.Equal(avg, sum / 2); - b = cursor.MoveNext(); - Assert.False(b); - } - var confusion = experiment.GetOutput(crossValidateOutput.ConfusionMatrix); - schema = confusion.Schema; - b = schema.TryGetColumnIndex("Count", out int countCol); - Assert.True(b); - b = schema.TryGetColumnIndex("Fold Index", out foldCol); - Assert.True(b); - var type = schema.GetMetadataTypeOrNull(MetadataUtils.Kinds.SlotNames, countCol); - Assert.True(type is VectorType vecType && vecType.ItemType is TextType && vecType.Size == 10); - var slotNames = default(VBuffer>); - schema.GetMetadata(MetadataUtils.Kinds.SlotNames, countCol, ref slotNames); - var slotNameValues = slotNames.GetValues(); - for (int i = 0; i < slotNameValues.Length; i++) - { - Assert.True(ReadOnlyMemoryUtils.EqualsStr(i.ToString(), slotNameValues[i])); - } - using (var curs = confusion.GetRowCursor(col => true)) - { - var countGetter = curs.GetGetter>(countCol); - var foldGetter = curs.GetGetter>(foldCol); - var confCount = default(VBuffer); - var foldIndex = default(ReadOnlyMemory); - int rowCount = 0; - var foldCur = "Fold 0"; - while (curs.MoveNext()) - { - countGetter(ref confCount); - foldGetter(ref foldIndex); - rowCount++; - Assert.True(ReadOnlyMemoryUtils.EqualsStr(foldCur, foldIndex)); - if (rowCount == 10) + var confusion = experiment.GetOutput(crossValidateOutput.ConfusionMatrix); + schema = confusion.Schema; + b = schema.TryGetColumnIndex("Count", out int countCol); + Assert.True(b); + b = schema.TryGetColumnIndex("Fold Index", out foldCol); + Assert.True(b); + var type = schema.GetMetadataTypeOrNull(MetadataUtils.Kinds.SlotNames, countCol); + Assert.True(type is VectorType vecType && vecType.ItemType is TextType && vecType.Size == 10); + var slotNames = default(VBuffer>); + schema.GetMetadata(MetadataUtils.Kinds.SlotNames, countCol, ref slotNames); + Assert.True(slotNames.Values.Select((s, i) => ReadOnlyMemoryUtils.EqualsStr(i.ToString(), s)).All(x => x)); + using (var curs = confusion.GetRowCursor(col => true)) + { + var countGetter = curs.GetGetter>(countCol); + var foldGetter = curs.GetGetter>(foldCol); + var confCount = default(VBuffer); + var foldIndex = default(ReadOnlyMemory); + int rowCount = 0; + var foldCur = "Fold 0"; + while (curs.MoveNext()) { - rowCount = 0; - foldCur = "Fold 1"; + countGetter(ref confCount); + foldGetter(ref foldIndex); + rowCount++; + Assert.True(ReadOnlyMemoryUtils.EqualsStr(foldCur, foldIndex)); + if (rowCount == 10) + { + rowCount = 0; + foldCur = "Fold 1"; + } } + Assert.Equal(0, rowCount); } - Assert.Equal(0, rowCount); - } - var warnings = experiment.GetOutput(crossValidateOutput.Warnings); - using (var cursor = warnings.GetRowCursor(col => true)) - Assert.False(cursor.MoveNext()); + var warnings = experiment.GetOutput(crossValidateOutput.Warnings); + using (var cursor = warnings.GetRowCursor(col => true)) + Assert.False(cursor.MoveNext()); + } } [Fact] public void TestCrossValidationMacroMultiClassWithWarnings() { var dataPath = GetDataPath(@"Train-Tiny-28x28.txt"); - var env = new MLContext(42); - var subGraph = env.CreateExperiment(); + using (var env = new ConsoleEnvironment(42)) + { + var subGraph = env.CreateExperiment(); - var nop = new Legacy.Transforms.NoOperation(); - var nopOutput = subGraph.Add(nop); + var nop = new Legacy.Transforms.NoOperation(); + var nopOutput = subGraph.Add(nop); - var learnerInput = new Legacy.Trainers.LogisticRegressionClassifier - { - TrainingData = nopOutput.OutputData, - NumThreads = 1 - }; - var learnerOutput = subGraph.Add(learnerInput); - - var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - var importOutput = experiment.Add(importInput); - - var filter = new Legacy.Transforms.RowRangeFilter(); - filter.Data = importOutput.Data; - filter.Column = "Label"; - filter.Min = 0; - filter.Max = 5; - var filterOutput = experiment.Add(filter); - - var term = new Legacy.Transforms.TextToKeyConverter(); - term.Column = new[] - { - new Legacy.Transforms.ValueToKeyMappingTransformerColumn() + var learnerInput = new Legacy.Trainers.LogisticRegressionClassifier + { + TrainingData = nopOutput.OutputData, + NumThreads = 1 + }; + var learnerOutput = subGraph.Add(learnerInput); + + var experiment = env.CreateExperiment(); + var importInput = new Legacy.Data.TextLoader(dataPath); + var importOutput = experiment.Add(importInput); + + var filter = new Legacy.Transforms.RowRangeFilter(); + filter.Data = importOutput.Data; + filter.Column = "Label"; + filter.Min = 0; + filter.Max = 5; + var filterOutput = experiment.Add(filter); + + var term = new Legacy.Transforms.TextToKeyConverter(); + term.Column = new[] + { + new Legacy.Transforms.TermTransformColumn() { - Source = "Label", Name = "Strat", Sort = Legacy.Transforms.ValueToKeyMappingTransformerSortOrder.Value + Source = "Label", Name = "Strat", Sort = Legacy.Transforms.TermTransformSortOrder.Value } }; - term.Data = filterOutput.OutputData; - var termOutput = experiment.Add(term); + term.Data = filterOutput.OutputData; + var termOutput = experiment.Add(term); - var crossValidate = new Legacy.Models.CrossValidator - { - Data = termOutput.OutputData, - Nodes = subGraph, - Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureMultiClassClassifierTrainer, - TransformModel = null, - StratificationColumn = "Strat" - }; - crossValidate.Inputs.Data = nop.Data; - crossValidate.Outputs.PredictorModel = learnerOutput.PredictorModel; - var crossValidateOutput = experiment.Add(crossValidate); - - experiment.Compile(); - importInput.SetInput(env, experiment); - experiment.Run(); - var warnings = experiment.GetOutput(crossValidateOutput.Warnings); - - var schema = warnings.Schema; - var b = schema.TryGetColumnIndex("WarningText", out int warningCol); - Assert.True(b); - using (var cursor = warnings.GetRowCursor(col => col == warningCol)) - { - var getter = cursor.GetGetter>(warningCol); + var crossValidate = new Legacy.Models.CrossValidator + { + Data = termOutput.OutputData, + Nodes = subGraph, + Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureMultiClassClassifierTrainer, + TransformModel = null, + StratificationColumn = "Strat" + }; + crossValidate.Inputs.Data = nop.Data; + crossValidate.Outputs.PredictorModel = learnerOutput.PredictorModel; + var crossValidateOutput = experiment.Add(crossValidate); - b = cursor.MoveNext(); - Assert.True(b); - var warning = default(ReadOnlyMemory); - getter(ref warning); - Assert.Contains("test instances with class values not seen in the training set.", warning.ToString()); - b = cursor.MoveNext(); + experiment.Compile(); + importInput.SetInput(env, experiment); + experiment.Run(); + var warnings = experiment.GetOutput(crossValidateOutput.Warnings); + + var schema = warnings.Schema; + var b = schema.TryGetColumnIndex("WarningText", out int warningCol); Assert.True(b); - getter(ref warning); - Assert.Contains("Detected columns of variable length: SortedScores, SortedClasses", warning.ToString()); - b = cursor.MoveNext(); - Assert.False(b); + using (var cursor = warnings.GetRowCursor(col => col == warningCol)) + { + var getter = cursor.GetGetter>(warningCol); + + b = cursor.MoveNext(); + Assert.True(b); + var warning = default(ReadOnlyMemory); + getter(ref warning); + Assert.Contains("test instances with class values not seen in the training set.", warning.ToString()); + b = cursor.MoveNext(); + Assert.True(b); + getter(ref warning); + Assert.Contains("Detected columns of variable length: SortedScores, SortedClasses", warning.ToString()); + b = cursor.MoveNext(); + Assert.False(b); + } } } @@ -610,93 +620,95 @@ public void TestCrossValidationMacroMultiClassWithWarnings() public void TestCrossValidationMacroWithStratification() { var dataPath = GetDataPath(@"breast-cancer.txt"); - var env = new MLContext(42); - var subGraph = env.CreateExperiment(); + using (var env = new ConsoleEnvironment(42)) + { + var subGraph = env.CreateExperiment(); - var nop = new Legacy.Transforms.NoOperation(); - var nopOutput = subGraph.Add(nop); + var nop = new Legacy.Transforms.NoOperation(); + var nopOutput = subGraph.Add(nop); - var learnerInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier - { - TrainingData = nopOutput.OutputData, - NumThreads = 1 - }; - var learnerOutput = subGraph.Add(learnerInput); + var learnerInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier + { + TrainingData = nopOutput.OutputData, + NumThreads = 1 + }; + var learnerOutput = subGraph.Add(learnerInput); - var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner - { - TransformModels = new ArrayVar(nopOutput.Model), - PredictorModel = learnerOutput.PredictorModel - }; - var modelCombineOutput = subGraph.Add(modelCombine); - - var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - importInput.Arguments.Column = new Legacy.Data.TextLoaderColumn[] - { + var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner + { + TransformModels = new ArrayVar(nopOutput.Model), + PredictorModel = learnerOutput.PredictorModel + }; + var modelCombineOutput = subGraph.Add(modelCombine); + + var experiment = env.CreateExperiment(); + var importInput = new Legacy.Data.TextLoader(dataPath); + importInput.Arguments.Column = new Legacy.Data.TextLoaderColumn[] + { new Legacy.Data.TextLoaderColumn { Name = "Label", Source = new[] { new Legacy.Data.TextLoaderRange(0) } }, new Legacy.Data.TextLoaderColumn { Name = "Strat", Source = new[] { new Legacy.Data.TextLoaderRange(1) } }, new Legacy.Data.TextLoaderColumn { Name = "Features", Source = new[] { new Legacy.Data.TextLoaderRange(2, 9) } } - }; - var importOutput = experiment.Add(importInput); - - var crossValidate = new Legacy.Models.CrossValidator - { - Data = importOutput.Data, - Nodes = subGraph, - TransformModel = null, - StratificationColumn = "Strat" - }; - crossValidate.Inputs.Data = nop.Data; - crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; - var crossValidateOutput = experiment.Add(crossValidate); - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); - - var schema = data.Schema; - var b = schema.TryGetColumnIndex("AUC", out int metricCol); - Assert.True(b); - b = schema.TryGetColumnIndex("Fold Index", out int foldCol); - Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol)) - { - var getter = cursor.GetGetter(metricCol); - var foldGetter = cursor.GetGetter>(foldCol); - ReadOnlyMemory fold = default; + }; + var importOutput = experiment.Add(importInput); - // Get the verage. - b = cursor.MoveNext(); + var crossValidate = new Legacy.Models.CrossValidator + { + Data = importOutput.Data, + Nodes = subGraph, + TransformModel = null, + StratificationColumn = "Strat" + }; + crossValidate.Inputs.Data = nop.Data; + crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; + var crossValidateOutput = experiment.Add(crossValidate); + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); + + var schema = data.Schema; + var b = schema.TryGetColumnIndex("AUC", out int metricCol); Assert.True(b); - double avg = 0; - getter(ref avg); - foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); - - // Get the standard deviation. - b = cursor.MoveNext(); + b = schema.TryGetColumnIndex("Fold Index", out int foldCol); Assert.True(b); - double stdev = 0; - getter(ref stdev); - foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); - Assert.Equal(0.00488, stdev, 5); - - double sum = 0; - double val = 0; - for (int f = 0; f < 2; f++) + using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol)) { + var getter = cursor.GetGetter(metricCol); + var foldGetter = cursor.GetGetter>(foldCol); + ReadOnlyMemory fold = default; + + // Get the verage. b = cursor.MoveNext(); Assert.True(b); - getter(ref val); + double avg = 0; + getter(ref avg); foldGetter(ref fold); - sum += val; - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); + + // Get the standard deviation. + b = cursor.MoveNext(); + Assert.True(b); + double stdev = 0; + getter(ref stdev); + foldGetter(ref fold); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); + Assert.Equal(0.00485, stdev, 5); + + double sum = 0; + double val = 0; + for (int f = 0; f < 2; f++) + { + b = cursor.MoveNext(); + Assert.True(b); + getter(ref val); + foldGetter(ref fold); + sum += val; + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); + } + Assert.Equal(avg, sum / 2); + b = cursor.MoveNext(); + Assert.False(b); } - Assert.Equal(avg, sum / 2); - b = cursor.MoveNext(); - Assert.False(b); } } @@ -704,129 +716,127 @@ public void TestCrossValidationMacroWithStratification() public void TestCrossValidationMacroWithNonDefaultNames() { string dataPath = GetDataPath(@"adult.tiny.with-schema.txt"); - var env = new MLContext(42); - var subGraph = env.CreateExperiment(); + using (var env = new ConsoleEnvironment(42)) + { + var subGraph = env.CreateExperiment(); - var textToKey = new Legacy.Transforms.TextToKeyConverter(); - textToKey.Column = new[] { new Legacy.Transforms.ValueToKeyMappingTransformerColumn() { Name = "Label1", Source = "Label" } }; - var textToKeyOutput = subGraph.Add(textToKey); + var textToKey = new Legacy.Transforms.TextToKeyConverter(); + textToKey.Column = new[] { new Legacy.Transforms.TermTransformColumn() { Name = "Label1", Source = "Label" } }; + var textToKeyOutput = subGraph.Add(textToKey); - var hash = new Legacy.Transforms.HashConverter(); - hash.Column = new[] { new Legacy.Transforms.HashJoiningTransformColumn() { Name = "GroupId1", Source = "Workclass" } }; - hash.Data = textToKeyOutput.OutputData; - var hashOutput = subGraph.Add(hash); + var hash = new Legacy.Transforms.HashConverter(); + hash.Column = new[] { new Legacy.Transforms.HashJoinTransformColumn() { Name = "GroupId1", Source = "Workclass" } }; + hash.Data = textToKeyOutput.OutputData; + var hashOutput = subGraph.Add(hash); - var learnerInput = new Legacy.Trainers.FastTreeRanker - { - TrainingData = hashOutput.OutputData, - NumThreads = 1, - LabelColumn = "Label1", - GroupIdColumn = "GroupId1" - }; - var learnerOutput = subGraph.Add(learnerInput); - - var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner - { - TransformModels = new ArrayVar(textToKeyOutput.Model, hashOutput.Model), - PredictorModel = learnerOutput.PredictorModel - }; - var modelCombineOutput = subGraph.Add(modelCombine); - - var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - importInput.Arguments.HasHeader = true; - importInput.Arguments.Column = new TextLoaderColumn[] - { + var learnerInput = new Legacy.Trainers.FastTreeRanker + { + TrainingData = hashOutput.OutputData, + NumThreads = 1, + LabelColumn = "Label1", + GroupIdColumn = "GroupId1" + }; + var learnerOutput = subGraph.Add(learnerInput); + + var modelCombine = new Legacy.Transforms.ManyHeterogeneousModelCombiner + { + TransformModels = new ArrayVar(textToKeyOutput.Model, hashOutput.Model), + PredictorModel = learnerOutput.PredictorModel + }; + var modelCombineOutput = subGraph.Add(modelCombine); + + var experiment = env.CreateExperiment(); + var importInput = new Legacy.Data.TextLoader(dataPath); + importInput.Arguments.HasHeader = true; + importInput.Arguments.Column = new TextLoaderColumn[] + { new TextLoaderColumn { Name = "Label", Source = new[] { new TextLoaderRange(0) } }, new TextLoaderColumn { Name = "Workclass", Source = new[] { new TextLoaderRange(1) }, Type = Legacy.Data.DataKind.Text }, new TextLoaderColumn { Name = "Features", Source = new[] { new TextLoaderRange(9, 14) } } - }; - var importOutput = experiment.Add(importInput); - - var crossValidate = new Legacy.Models.CrossValidator - { - Data = importOutput.Data, - Nodes = subGraph, - TransformModel = null, - LabelColumn = "Label1", - GroupColumn = "GroupId1", - NameColumn = "Workclass", - Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureRankerTrainer - }; - crossValidate.Inputs.Data = textToKey.Data; - crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; - var crossValidateOutput = experiment.Add(crossValidate); - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); - - var schema = data.Schema; - var b = schema.TryGetColumnIndex("NDCG", out int metricCol); - Assert.True(b); - b = schema.TryGetColumnIndex("Fold Index", out int foldCol); - Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol)) - { - var getter = cursor.GetGetter>(metricCol); - var foldGetter = cursor.GetGetter>(foldCol); - ReadOnlyMemory fold = default; + }; + var importOutput = experiment.Add(importInput); - // Get the verage. - b = cursor.MoveNext(); + var crossValidate = new Legacy.Models.CrossValidator + { + Data = importOutput.Data, + Nodes = subGraph, + TransformModel = null, + LabelColumn = "Label1", + GroupColumn = "GroupId1", + NameColumn = "Workclass", + Kind = Legacy.Models.MacroUtilsTrainerKinds.SignatureRankerTrainer + }; + crossValidate.Inputs.Data = textToKey.Data; + crossValidate.Outputs.PredictorModel = modelCombineOutput.PredictorModel; + var crossValidateOutput = experiment.Add(crossValidate); + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + var data = experiment.GetOutput(crossValidateOutput.OverallMetrics); + + var schema = data.Schema; + var b = schema.TryGetColumnIndex("NDCG", out int metricCol); Assert.True(b); - var avg = default(VBuffer); - getter(ref avg); - foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); - - // Get the standard deviation. - b = cursor.MoveNext(); + b = schema.TryGetColumnIndex("Fold Index", out int foldCol); Assert.True(b); - var stdev = default(VBuffer); - getter(ref stdev); - foldGetter(ref fold); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); - var stdevValues = stdev.GetValues(); - Assert.Equal(2.462, stdevValues[0], 3); - Assert.Equal(2.763, stdevValues[1], 3); - Assert.Equal(3.273, stdevValues[2], 3); - - var sumBldr = new BufferBuilder(R8Adder.Instance); - sumBldr.Reset(avg.Length, true); - var val = default(VBuffer); - for (int f = 0; f < 2; f++) + using (var cursor = data.GetRowCursor(col => col == metricCol || col == foldCol)) { + var getter = cursor.GetGetter>(metricCol); + var foldGetter = cursor.GetGetter>(foldCol); + ReadOnlyMemory fold = default; + + // Get the verage. + b = cursor.MoveNext(); + Assert.True(b); + var avg = default(VBuffer); + getter(ref avg); + foldGetter(ref fold); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Average", fold)); + + // Get the standard deviation. b = cursor.MoveNext(); Assert.True(b); - getter(ref val); + var stdev = default(VBuffer); + getter(ref stdev); foldGetter(ref fold); - sumBldr.AddFeatures(0, in val); - Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Standard Deviation", fold)); + Assert.Equal(2.462, stdev.Values[0], 3); + Assert.Equal(2.763, stdev.Values[1], 3); + Assert.Equal(3.273, stdev.Values[2], 3); + + var sumBldr = new BufferBuilder(R8Adder.Instance); + sumBldr.Reset(avg.Length, true); + var val = default(VBuffer); + for (int f = 0; f < 2; f++) + { + b = cursor.MoveNext(); + Assert.True(b); + getter(ref val); + foldGetter(ref fold); + sumBldr.AddFeatures(0, in val); + Assert.True(ReadOnlyMemoryUtils.EqualsStr("Fold " + f, fold)); + } + var sum = default(VBuffer); + sumBldr.GetResult(ref sum); + for (int i = 0; i < avg.Length; i++) + Assert.Equal(avg.Values[i], sum.Values[i] / 2); + b = cursor.MoveNext(); + Assert.False(b); } - var sum = default(VBuffer); - sumBldr.GetResult(ref sum); - - var avgValues = avg.GetValues(); - var sumValues = sum.GetValues(); - for (int i = 0; i < avgValues.Length; i++) - Assert.Equal(avgValues[i], sumValues[i] / 2); - b = cursor.MoveNext(); - Assert.False(b); - } - data = experiment.GetOutput(crossValidateOutput.PerInstanceMetrics); - Assert.True(data.Schema.TryGetColumnIndex("Instance", out int nameCol)); - using (var cursor = data.GetRowCursor(col => col == nameCol)) - { - var getter = cursor.GetGetter>(nameCol); - while (cursor.MoveNext()) - { - ReadOnlyMemory name = default; - getter(ref name); - Assert.Subset(new HashSet() { "Private", "?", "Federal-gov" }, new HashSet() { name.ToString() }); - if (cursor.Position > 4) - break; + data = experiment.GetOutput(crossValidateOutput.PerInstanceMetrics); + Assert.True(data.Schema.TryGetColumnIndex("Instance", out int nameCol)); + using (var cursor = data.GetRowCursor(col => col == nameCol)) + { + var getter = cursor.GetGetter>(nameCol); + while (cursor.MoveNext()) + { + ReadOnlyMemory name = default; + getter(ref name); + Assert.Subset(new HashSet() { "Private", "?", "Federal-gov" }, new HashSet() { name.ToString() }); + if (cursor.Position > 4) + break; + } } } } @@ -835,56 +845,58 @@ public void TestCrossValidationMacroWithNonDefaultNames() public void TestOvaMacro() { var dataPath = GetDataPath(@"iris.txt"); - var env = new MLContext(42); - // Specify subgraph for OVA - var subGraph = env.CreateExperiment(); - var learnerInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier { NumThreads = 1 }; - var learnerOutput = subGraph.Add(learnerInput); - // Create pipeline with OVA and multiclass scoring. - var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - importInput.Arguments.Column = new TextLoaderColumn[] - { + using (var env = new ConsoleEnvironment(42)) + { + // Specify subgraph for OVA + var subGraph = env.CreateExperiment(); + var learnerInput = new Legacy.Trainers.StochasticDualCoordinateAscentBinaryClassifier { NumThreads = 1 }; + var learnerOutput = subGraph.Add(learnerInput); + // Create pipeline with OVA and multiclass scoring. + var experiment = env.CreateExperiment(); + var importInput = new Legacy.Data.TextLoader(dataPath); + importInput.Arguments.Column = new TextLoaderColumn[] + { new TextLoaderColumn { Name = "Label", Source = new[] { new TextLoaderRange(0) } }, new TextLoaderColumn { Name = "Features", Source = new[] { new TextLoaderRange(1,4) } } - }; - var importOutput = experiment.Add(importInput); - var oneVersusAll = new Legacy.Models.OneVersusAll - { - TrainingData = importOutput.Data, - Nodes = subGraph, - UseProbabilities = true, - }; - var ovaOutput = experiment.Add(oneVersusAll); - var scoreInput = new Legacy.Transforms.DatasetScorer - { - Data = importOutput.Data, - PredictorModel = ovaOutput.PredictorModel - }; - var scoreOutput = experiment.Add(scoreInput); - var evalInput = new Legacy.Models.ClassificationEvaluator - { - Data = scoreOutput.ScoredData - }; - var evalOutput = experiment.Add(evalInput); - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - - var data = experiment.GetOutput(evalOutput.OverallMetrics); - var schema = data.Schema; - var b = schema.TryGetColumnIndex(MultiClassClassifierEvaluator.AccuracyMacro, out int accCol); - Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == accCol)) - { - var getter = cursor.GetGetter(accCol); - b = cursor.MoveNext(); + }; + var importOutput = experiment.Add(importInput); + var oneVersusAll = new Legacy.Models.OneVersusAll + { + TrainingData = importOutput.Data, + Nodes = subGraph, + UseProbabilities = true, + }; + var ovaOutput = experiment.Add(oneVersusAll); + var scoreInput = new Legacy.Transforms.DatasetScorer + { + Data = importOutput.Data, + PredictorModel = ovaOutput.PredictorModel + }; + var scoreOutput = experiment.Add(scoreInput); + var evalInput = new Legacy.Models.ClassificationEvaluator + { + Data = scoreOutput.ScoredData + }; + var evalOutput = experiment.Add(evalInput); + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + + var data = experiment.GetOutput(evalOutput.OverallMetrics); + var schema = data.Schema; + var b = schema.TryGetColumnIndex(MultiClassClassifierEvaluator.AccuracyMacro, out int accCol); Assert.True(b); - double acc = 0; - getter(ref acc); - Assert.Equal(0.96, acc, 2); - b = cursor.MoveNext(); - Assert.False(b); + using (var cursor = data.GetRowCursor(col => col == accCol)) + { + var getter = cursor.GetGetter(accCol); + b = cursor.MoveNext(); + Assert.True(b); + double acc = 0; + getter(ref acc); + Assert.Equal(0.96, acc, 2); + b = cursor.MoveNext(); + Assert.False(b); + } } } @@ -892,56 +904,58 @@ public void TestOvaMacro() public void TestOvaMacroWithUncalibratedLearner() { var dataPath = GetDataPath(@"iris.txt"); - var env = new MLContext(42); - // Specify subgraph for OVA - var subGraph = env.CreateExperiment(); - var learnerInput = new Legacy.Trainers.AveragedPerceptronBinaryClassifier { Shuffle = false }; - var learnerOutput = subGraph.Add(learnerInput); - // Create pipeline with OVA and multiclass scoring. - var experiment = env.CreateExperiment(); - var importInput = new Legacy.Data.TextLoader(dataPath); - importInput.Arguments.Column = new TextLoaderColumn[] - { + using (var env = new ConsoleEnvironment(42)) + { + // Specify subgraph for OVA + var subGraph = env.CreateExperiment(); + var learnerInput = new Legacy.Trainers.AveragedPerceptronBinaryClassifier { Shuffle = false }; + var learnerOutput = subGraph.Add(learnerInput); + // Create pipeline with OVA and multiclass scoring. + var experiment = env.CreateExperiment(); + var importInput = new Legacy.Data.TextLoader(dataPath); + importInput.Arguments.Column = new TextLoaderColumn[] + { new TextLoaderColumn { Name = "Label", Source = new[] { new TextLoaderRange(0) } }, new TextLoaderColumn { Name = "Features", Source = new[] { new TextLoaderRange(1,4) } } - }; - var importOutput = experiment.Add(importInput); - var oneVersusAll = new Legacy.Models.OneVersusAll - { - TrainingData = importOutput.Data, - Nodes = subGraph, - UseProbabilities = true, - }; - var ovaOutput = experiment.Add(oneVersusAll); - var scoreInput = new Legacy.Transforms.DatasetScorer - { - Data = importOutput.Data, - PredictorModel = ovaOutput.PredictorModel - }; - var scoreOutput = experiment.Add(scoreInput); - var evalInput = new Legacy.Models.ClassificationEvaluator - { - Data = scoreOutput.ScoredData - }; - var evalOutput = experiment.Add(evalInput); - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - - var data = experiment.GetOutput(evalOutput.OverallMetrics); - var schema = data.Schema; - var b = schema.TryGetColumnIndex(MultiClassClassifierEvaluator.AccuracyMacro, out int accCol); - Assert.True(b); - using (var cursor = data.GetRowCursor(col => col == accCol)) - { - var getter = cursor.GetGetter(accCol); - b = cursor.MoveNext(); + }; + var importOutput = experiment.Add(importInput); + var oneVersusAll = new Legacy.Models.OneVersusAll + { + TrainingData = importOutput.Data, + Nodes = subGraph, + UseProbabilities = true, + }; + var ovaOutput = experiment.Add(oneVersusAll); + var scoreInput = new Legacy.Transforms.DatasetScorer + { + Data = importOutput.Data, + PredictorModel = ovaOutput.PredictorModel + }; + var scoreOutput = experiment.Add(scoreInput); + var evalInput = new Legacy.Models.ClassificationEvaluator + { + Data = scoreOutput.ScoredData + }; + var evalOutput = experiment.Add(evalInput); + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + + var data = experiment.GetOutput(evalOutput.OverallMetrics); + var schema = data.Schema; + var b = schema.TryGetColumnIndex(MultiClassClassifierEvaluator.AccuracyMacro, out int accCol); Assert.True(b); - double acc = 0; - getter(ref acc); - Assert.Equal(0.71, acc, 2); - b = cursor.MoveNext(); - Assert.False(b); + using (var cursor = data.GetRowCursor(col => col == accCol)) + { + var getter = cursor.GetGetter(accCol); + b = cursor.MoveNext(); + Assert.True(b); + double acc = 0; + getter(ref acc); + Assert.Equal(0.71, acc, 2); + b = cursor.MoveNext(); + Assert.False(b); + } } } @@ -949,35 +963,37 @@ public void TestOvaMacroWithUncalibratedLearner() public void TestTensorFlowEntryPoint() { var dataPath = GetDataPath("Train-Tiny-28x28.txt"); - var env = new MLContext(42); - var experiment = env.CreateExperiment(); - - var importInput = new Legacy.Data.TextLoader(dataPath); - importInput.Arguments.Column = new TextLoaderColumn[] + using (var env = new ConsoleEnvironment(42)) { + var experiment = env.CreateExperiment(); + + var importInput = new Legacy.Data.TextLoader(dataPath); + importInput.Arguments.Column = new TextLoaderColumn[] + { new TextLoaderColumn { Name = "Label", Source = new[] { new TextLoaderRange(0) } }, new TextLoaderColumn { Name = "Placeholder", Source = new[] { new TextLoaderRange(1, 784) } } - }; - var importOutput = experiment.Add(importInput); + }; + var importOutput = experiment.Add(importInput); - var tfTransformInput = new Legacy.Transforms.TensorFlowScorer - { - Data = importOutput.Data, - ModelLocation = "mnist_model/frozen_saved_model.pb", - InputColumns = new[] { "Placeholder" }, - OutputColumns = new[] { "Softmax" }, - }; - var tfTransformOutput = experiment.Add(tfTransformInput); - - experiment.Compile(); - experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); - experiment.Run(); - var data = experiment.GetOutput(tfTransformOutput.OutputData); - - var schema = data.Schema; - Assert.Equal(3, schema.ColumnCount); - Assert.Equal("Softmax", schema.GetColumnName(2)); - Assert.Equal(10, (schema.GetColumnType(2) as VectorType)?.Size); + var tfTransformInput = new Legacy.Transforms.TensorFlowScorer + { + Data = importOutput.Data, + ModelLocation = "mnist_model/frozen_saved_model.pb", + InputColumns = new[] { "Placeholder" }, + OutputColumns = new[] { "Softmax" }, + }; + var tfTransformOutput = experiment.Add(tfTransformInput); + + experiment.Compile(); + experiment.SetInput(importInput.InputFile, new SimpleFileHandle(env, dataPath, false, false)); + experiment.Run(); + var data = experiment.GetOutput(tfTransformOutput.OutputData); + + var schema = data.Schema; + Assert.Equal(3, schema.ColumnCount); + Assert.Equal("Softmax", schema.GetColumnName(2)); + Assert.Equal(10, (schema.GetColumnType(2) as VectorType)?.Size); + } } } } diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestContracts.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestContracts.cs index ca1315b83b..6b4fd5297f 100644 --- a/test/Microsoft.ML.Core.Tests/UnitTests/TestContracts.cs +++ b/test/Microsoft.ML.Core.Tests/UnitTests/TestContracts.cs @@ -3,6 +3,8 @@ // See the LICENSE file in the project root for more information. using System; +using Microsoft.ML.Runtime; +using Microsoft.ML.Runtime.Data; using Xunit; namespace Microsoft.ML.Runtime.RunTests { @@ -40,7 +42,7 @@ private void Helper(IExceptionContext ectx, MessageSensitivity expected) [Fact] public void ExceptionSensitivity() { - var env = new MLContext(); + var env = new ConsoleEnvironment(); // Default sensitivity should be unknown, that is, all bits set. Helper(null, MessageSensitivity.Unknown); // If we set it to be not sensitive, then the messages should be marked insensitive, diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestEarlyStoppingCriteria.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestEarlyStoppingCriteria.cs index 688287dda2..3798246fa8 100644 --- a/test/Microsoft.ML.Core.Tests/UnitTests/TestEarlyStoppingCriteria.cs +++ b/test/Microsoft.ML.Core.Tests/UnitTests/TestEarlyStoppingCriteria.cs @@ -13,7 +13,7 @@ public sealed class TestEarlyStoppingCriteria { private IEarlyStoppingCriterion CreateEarlyStoppingCriterion(string name, string args, bool lowerIsBetter) { - var env = new MLContext() + var env = new ConsoleEnvironment() .AddStandardComponents(); var sub = new SubComponent(name, args); return sub.CreateInstance(env, lowerIsBetter); diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs index 386f9f8a97..0a38664fa6 100644 --- a/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs +++ b/test/Microsoft.ML.Core.Tests/UnitTests/TestEntryPoints.cs @@ -461,19 +461,19 @@ public void EntryPointCreateEnsemble() new ScoreModel.Input { Data = splitOutput.TestData[nModels], PredictorModel = predictorModels[i] }) .ScoredData; - individualScores[i] = ColumnsCopyingTransformer.Create(Env, - new ColumnsCopyingTransformer.Arguments() + individualScores[i] = CopyColumnsTransform.Create(Env, + new CopyColumnsTransform.Arguments() { Column = new[] { - new ColumnsCopyingTransformer.Column() + new CopyColumnsTransform.Column() { Name = MetadataUtils.Const.ScoreValueKind.Score + i, Source = MetadataUtils.Const.ScoreValueKind.Score }, } }, individualScores[i]); - individualScores[i] = ColumnSelectingTransformer.CreateDrop(Env, individualScores[i], MetadataUtils.Const.ScoreValueKind.Score); + individualScores[i] = SelectColumnsTransform.CreateDrop(Env, individualScores[i], MetadataUtils.Const.ScoreValueKind.Score); } var avgEnsembleInput = new EnsembleCreator.ClassifierInput { Models = predictorModels, ModelCombiner = EnsembleCreator.ClassifierCombiner.Average }; @@ -754,24 +754,24 @@ public void EntryPointPipelineEnsemble() { var data = splitOutput.TrainData[i]; data = new RandomFourierFeaturizingEstimator(Env, new[] { - new RandomFourierFeaturizingTransformer.ColumnInfo("Features", "Features1", 10, false), - new RandomFourierFeaturizingTransformer.ColumnInfo("Features", "Features2", 10, false), + new RffTransform.ColumnInfo("Features", "Features1", 10, false), + new RffTransform.ColumnInfo("Features", "Features2", 10, false), }).Fit(data).Transform(data); - data = ColumnConcatenatingTransformer.Create(Env, new ColumnConcatenatingTransformer.Arguments() + data = ConcatTransform.Create(Env, new ConcatTransform.Arguments() { - Column = new[] { new ColumnConcatenatingTransformer.Column() { Name = "Features", Source = new[] { "Features1", "Features2" } } } + Column = new[] { new ConcatTransform.Column() { Name = "Features", Source = new[] { "Features1", "Features2" } } } }, data); - data = ValueToKeyMappingTransformer.Create(Env, new ValueToKeyMappingTransformer.Arguments() + data = TermTransform.Create(Env, new TermTransform.Arguments() { Column = new[] { - new ValueToKeyMappingTransformer.Column() + new TermTransform.Column() { Name = "Label", Source = "Label", - Sort = ValueToKeyMappingTransformer.SortOrder.Value + Sort = TermTransform.SortOrder.Value } } }, data); @@ -1031,11 +1031,11 @@ public void EntryPointPipelineEnsembleText() } else { - data = WordHashBagProducingTransformer.Create(Env, - new WordHashBagProducingTransformer.Arguments() + data = WordHashBagTransform.Create(Env, + new WordHashBagTransform.Arguments() { Column = - new[] { new WordHashBagProducingTransformer.Column() { Name = "Features", Source = new[] { "Text" } }, } + new[] { new WordHashBagTransform.Column() { Name = "Features", Source = new[] { "Text" } }, } }, data); } @@ -1223,15 +1223,15 @@ public void EntryPointMulticlassPipelineEnsemble() { var data = splitOutput.TrainData[i]; data = new RandomFourierFeaturizingEstimator(Env, new[] { - new RandomFourierFeaturizingTransformer.ColumnInfo("Features", "Features1", 10, false), - new RandomFourierFeaturizingTransformer.ColumnInfo("Features", "Features2", 10, false), + new RffTransform.ColumnInfo("Features", "Features1", 10, false), + new RffTransform.ColumnInfo("Features", "Features2", 10, false), }).Fit(data).Transform(data); - data = ColumnConcatenatingTransformer.Create(Env, new ColumnConcatenatingTransformer.Arguments() + data = ConcatTransform.Create(Env, new ConcatTransform.Arguments() { - Column = new[] { new ColumnConcatenatingTransformer.Column() { Name = "Features", Source = new[] { "Features1", "Features2" } } } + Column = new[] { new ConcatTransform.Column() { Name = "Features", Source = new[] { "Features1", "Features2" } } } }, data); - var mlr = new MulticlassLogisticRegression(Env, "Label", "Features"); + var mlr = new MulticlassLogisticRegression(Env, "Features", "Label"); var rmd = new RoleMappedData(data, "Label", "Features"); predictorModels[i] = new PredictorModel(Env, rmd, data, mlr.Train(rmd)); @@ -1371,12 +1371,12 @@ public void EntryPointPipelineEnsembleGetSummary() for (int i = 0; i < nModels; i++) { var data = splitOutput.TrainData[i]; - data = OneHotEncodingTransformer.Create(Env, - new OneHotEncodingTransformer.Arguments() + data = CategoricalTransform.Create(Env, + new CategoricalTransform.Arguments() { - Column = new[] { new OneHotEncodingTransformer.Column() { Name = "Cat", Source = "Cat" } } + Column = new[] { new CategoricalTransform.Column() { Name = "Cat", Source = "Cat" } } }, data); - data = new ColumnConcatenatingTransformer(Env, new ColumnConcatenatingTransformer.ColumnInfo("Features", i % 2 == 0 ? new[] { "Features", "Cat" } : new[] { "Cat", "Features" })).Transform(data); + data = new ConcatTransform(Env, new ConcatTransform.ColumnInfo("Features", i % 2 == 0 ? new[] { "Features", "Cat" } : new[] { "Cat", "Features" })).Transform(data); if (i % 2 == 0) { var lrInput = new LogisticRegression.Arguments @@ -1483,11 +1483,9 @@ private static bool CompareVBuffers(in VBuffer v1, in VBuffer v2 return false; v1.CopyToDense(ref dense1); v2.CopyToDense(ref dense2); - var dense1Values = dense1.GetValues(); - var dense2Values = dense2.GetValues(); for (int i = 0; i < dense1.Length; i++) { - if (!Single.IsNaN(dense1Values[i]) && !Single.IsNaN(dense2Values[i]) && dense1Values[i] != dense2Values[i]) + if (!Single.IsNaN(dense1.Values[i]) && !Single.IsNaN(dense2.Values[i]) && dense1.Values[i] != dense2.Values[i]) return false; } return true; @@ -2020,7 +2018,7 @@ public void EntryPointPcaTransform() } [Fact] - public void EntryPointLightLdaTransformer() + public void EntryPointLightLdaTransform() { string dataFile = DeleteOutputPath("SavePipe", "SavePipeTextLightLda-SampleText.txt"); File.WriteAllLines(dataFile, new[] { @@ -3769,15 +3767,15 @@ public void EntryPointTreeLeafFeaturizer() #pragma warning disable 0618 var dataView = ImportTextData.ImportText(Env, new ImportTextData.Input { InputFile = inputFile }).Data; #pragma warning restore 0618 - var cat = Categorical.CatTransformDict(Env, new OneHotEncodingTransformer.Arguments() + var cat = Categorical.CatTransformDict(Env, new CategoricalTransform.Arguments() { Data = dataView, - Column = new[] { new OneHotEncodingTransformer.Column { Name = "Categories", Source = "Categories" } } + Column = new[] { new CategoricalTransform.Column { Name = "Categories", Source = "Categories" } } }); - var concat = SchemaManipulation.ConcatColumns(Env, new ColumnConcatenatingTransformer.Arguments() + var concat = SchemaManipulation.ConcatColumns(Env, new ConcatTransform.Arguments() { Data = cat.OutputData, - Column = new[] { new ColumnConcatenatingTransformer.Column { Name = "Features", Source = new[] { "Categories", "NumericFeatures" } } } + Column = new[] { new ConcatTransform.Column { Name = "Features", Source = new[] { "Categories", "NumericFeatures" } } } }); var fastTree = FastTree.TrainBinary(Env, new FastTreeBinaryClassificationTrainer.Arguments @@ -3850,11 +3848,11 @@ public void EntryPointWordEmbeddings() }, InputFile = inputFile, }).Data; - var embedding = Transforms.Text.TextAnalytics.WordEmbeddings(Env, new WordEmbeddingsExtractingTransformer.Arguments() + var embedding = Transforms.Text.TextAnalytics.WordEmbeddings(Env, new WordEmbeddingsTransform.Arguments() { Data = dataView, - Column = new[] { new WordEmbeddingsExtractingTransformer.Column { Name = "Features", Source = "Text" } }, - ModelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe + Column = new[] { new WordEmbeddingsTransform.Column { Name = "Features", Source = "Text" } }, + ModelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe }); var result = embedding.OutputData; using (var cursor = result.GetRowCursor((x => true))) diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestHosts.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestHosts.cs index 2f1df54285..ce01945bcb 100644 --- a/test/Microsoft.ML.Core.Tests/UnitTests/TestHosts.cs +++ b/test/Microsoft.ML.Core.Tests/UnitTests/TestHosts.cs @@ -20,7 +20,7 @@ public class TestHosts [Fact] public void TestCancellation() { - IHostEnvironment env = new MLContext(seed: 42); + var env = new ConsoleEnvironment(seed: 42); for (int z = 0; z < 1000; z++) { var mainHost = env.Register("Main"); diff --git a/test/Microsoft.ML.Core.Tests/UnitTests/TestVectorUtils.cs b/test/Microsoft.ML.Core.Tests/UnitTests/TestVectorUtils.cs deleted file mode 100644 index ee3e531e4d..0000000000 --- a/test/Microsoft.ML.Core.Tests/UnitTests/TestVectorUtils.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; -using Microsoft.ML.Runtime.Numeric; -using System.Linq; -using Xunit; - -namespace Microsoft.ML.Runtime.RunTests -{ - public class TestVectorUtils - { - /// - /// Tests SparsifyNormalize works correctly. - /// - [Theory] - [InlineData(1, true, new[] { 0.8f, 0.9f, 1f }, new[] { 7, 8, 9 })] - [InlineData(1, false, new[] { 8f, 9f, 10f }, new[] { 7, 8, 9 })] - [InlineData(-4, true, new[] { -0.8f, -0.6f, -0.4f, 0.6f, 0.8f, 1f }, new[] { 0, 1, 2, 7, 8, 9 })] - [InlineData(-4, false, new[] { -4f, -3f, -2f, 3f, 4f, 5f }, new[] { 0, 1, 2, 7, 8, 9 })] - [InlineData(-10, true, new[] { -1f, -0.9f, -0.8f }, new[] { 0, 1, 2 })] - [InlineData(-10, false, new[] { -10f, -9f, -8f }, new[] { 0, 1, 2 })] - public void TestSparsifyNormalize(int startRange, bool normalize, float[] expectedValues, int[] expectedIndices) - { - float[] values = Enumerable.Range(startRange, 10).Select(i => (float)i).ToArray(); - var a = new VBuffer(10, values); - - VectorUtils.SparsifyNormalize(ref a, 3, 3, normalize); - - Assert.False(a.IsDense); - Assert.Equal(10, a.Length); - Assert.Equal(expectedIndices, a.GetIndices().ToArray()); - - var actualValues = a.GetValues().ToArray(); - Assert.Equal(expectedValues.Length, actualValues.Length); - for (int i = 0; i < expectedValues.Length; i++) - Assert.Equal(expectedValues[i], actualValues[i], precision: 6); - } - - /// - /// Tests SparsifyNormalize works when asked for all values. - /// - [Theory] - [InlineData(10, 0)] - [InlineData(10, 10)] - [InlineData(20, 20)] - public void TestSparsifyNormalizeReturnsDense(int top, int bottom) - { - float[] values = Enumerable.Range(1, 10).Select(i => (float)i).ToArray(); - var a = new VBuffer(10, values); - - VectorUtils.SparsifyNormalize(ref a, top, bottom, false); - - Assert.True(a.IsDense); - Assert.Equal(10, a.Length); - Assert.True(a.GetIndices().IsEmpty); - - Assert.Equal(values, a.GetValues().ToArray()); - } - } -} diff --git a/test/Microsoft.ML.CpuMath.UnitTests.netcoreapp/UnitTests.cs b/test/Microsoft.ML.CpuMath.UnitTests.netcoreapp/UnitTests.cs index 25996ec42c..1d2b53bb79 100644 --- a/test/Microsoft.ML.CpuMath.UnitTests.netcoreapp/UnitTests.cs +++ b/test/Microsoft.ML.CpuMath.UnitTests.netcoreapp/UnitTests.cs @@ -52,8 +52,8 @@ public CpuMathUtilsUnitTests() AlignedArray testMatrixAligned1 = new AlignedArray(8 * 8, _vectorAlignment); AlignedArray testMatrixAligned2 = new AlignedArray(8 * 16, _vectorAlignment); - testMatrixAligned1.CopyFrom(testMatrix1); - testMatrixAligned2.CopyFrom(testMatrix2); + testMatrixAligned1.CopyFrom(testMatrix1, 0, testMatrix1.Length); + testMatrixAligned2.CopyFrom(testMatrix2, 0, testMatrix2.Length); _testMatrices = new AlignedArray[] { testMatrixAligned1, testMatrixAligned2 }; @@ -63,8 +63,8 @@ public CpuMathUtilsUnitTests() AlignedArray testSrcVectorAligned1 = new AlignedArray(8, _vectorAlignment); AlignedArray testSrcVectorAligned2 = new AlignedArray(16, _vectorAlignment); - testSrcVectorAligned1.CopyFrom(testSrcVector1); - testSrcVectorAligned2.CopyFrom(testSrcVector2); + testSrcVectorAligned1.CopyFrom(testSrcVector1, 0, testSrcVector1.Length); + testSrcVectorAligned2.CopyFrom(testSrcVector2, 0, testSrcVector2.Length); _testSrcVectors = new AlignedArray[] { testSrcVectorAligned1, testSrcVectorAligned2 }; @@ -74,8 +74,8 @@ public CpuMathUtilsUnitTests() AlignedArray testDstVectorAligned1 = new AlignedArray(8, _vectorAlignment); AlignedArray testDstVectorAligned2 = new AlignedArray(16, _vectorAlignment); - testDstVectorAligned1.CopyFrom(testDstVector1); - testDstVectorAligned2.CopyFrom(testDstVector2); + testDstVectorAligned1.CopyFrom(testDstVector1, 0, testDstVector1.Length); + testDstVectorAligned2.CopyFrom(testDstVector2, 0, testDstVector2.Length); _testDstVectors = new AlignedArray[] { testDstVectorAligned1, testDstVectorAligned2 }; } diff --git a/src/Microsoft.ML.PipelineInference/GenerateSweepCandidatesCommand.cs b/test/Microsoft.ML.InferenceTesting/GenerateSweepCandidatesCommand.cs similarity index 96% rename from src/Microsoft.ML.PipelineInference/GenerateSweepCandidatesCommand.cs rename to test/Microsoft.ML.InferenceTesting/GenerateSweepCandidatesCommand.cs index 8d03868719..61aad5729a 100644 --- a/src/Microsoft.ML.PipelineInference/GenerateSweepCandidatesCommand.cs +++ b/test/Microsoft.ML.InferenceTesting/GenerateSweepCandidatesCommand.cs @@ -10,23 +10,23 @@ using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Internal.Utilities; +using Microsoft.ML.Runtime.MLTesting.Inference; using Microsoft.ML.Runtime.PipelineInference; using Microsoft.ML.Runtime.Sweeper; [assembly: LoadableClass(typeof(GenerateSweepCandidatesCommand), typeof(GenerateSweepCandidatesCommand.Arguments), typeof(SignatureCommand), "Generate Experiment Candidates", "GenerateSweepCandidates", DocName = "command/GenerateSweepCandidates.md")] -namespace Microsoft.ML.Runtime.PipelineInference +namespace Microsoft.ML.Runtime.MLTesting.Inference { /// /// This is a command that takes as an input: /// 1- the schema of a dataset, in the format produced by InferSchema - /// 2- the path to the datafile - /// and generates experiment candidates by combining all the transform recipes suggested for the dataset, with all the learners available for the task. + /// 2- the path to the datafile + /// and generates experiment candidates by combining all the transform recipes suggested for the dataset, with all the learners available for the task. /// - internal sealed class GenerateSweepCandidatesCommand : ICommand + public sealed class GenerateSweepCandidatesCommand : ICommand { -#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. public sealed class Arguments { [Argument(ArgumentType.Required, HelpText = "Text file with data to analyze.", ShortName = "data")] @@ -53,7 +53,6 @@ public sealed class Arguments [Argument(ArgumentType.AtMostOnce, HelpText = "If this option is provided, the result RSP are indented and written in separate files for easier visual inspection. Otherwise all the generated RSPs are written to a single file, one RSP per line.")] public bool Indent; } -#pragma warning disable CS0649 private readonly IHost _host; private readonly string _dataFile; diff --git a/test/Microsoft.ML.Predictor.Tests/Commands/InferRecipesCommand.cs b/test/Microsoft.ML.InferenceTesting/InferRecipesCommand.cs similarity index 96% rename from test/Microsoft.ML.Predictor.Tests/Commands/InferRecipesCommand.cs rename to test/Microsoft.ML.InferenceTesting/InferRecipesCommand.cs index d84b6f9a7d..a6dbae8248 100644 --- a/test/Microsoft.ML.Predictor.Tests/Commands/InferRecipesCommand.cs +++ b/test/Microsoft.ML.InferenceTesting/InferRecipesCommand.cs @@ -22,9 +22,8 @@ namespace Microsoft.ML.Runtime.MLTesting.Inference /// This command generates a suggested RSP to load the text file and recipes it prior to training. /// The results are output to the console and also to the RSP file, if it's specified. /// - internal sealed class InferRecipesCommand : ICommand + public sealed class InferRecipesCommand : ICommand { -#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. public sealed class Arguments { [Argument(ArgumentType.Required, HelpText = "Text file with data to analyze", ShortName = "data")] @@ -36,7 +35,6 @@ public sealed class Arguments [Argument(ArgumentType.AtMostOnce, HelpText = "Optional path to the schema definition file generated by the InferSchema command", ShortName = "schema")] public string SchemaDefinitionFile; } -#pragma warning restore CS0649 private readonly IHost _host; private readonly string _dataFile; diff --git a/test/Microsoft.ML.Predictor.Tests/Commands/InferSchemaCommand.cs b/test/Microsoft.ML.InferenceTesting/InferSchemaCommand.cs similarity index 95% rename from test/Microsoft.ML.Predictor.Tests/Commands/InferSchemaCommand.cs rename to test/Microsoft.ML.InferenceTesting/InferSchemaCommand.cs index 269da88b19..7a96008bd0 100644 --- a/test/Microsoft.ML.Predictor.Tests/Commands/InferSchemaCommand.cs +++ b/test/Microsoft.ML.InferenceTesting/InferSchemaCommand.cs @@ -22,9 +22,8 @@ namespace Microsoft.ML.Runtime.MLTesting.Inference /// This command generates a suggested RSP to load the text file and recipes it prior to training. /// The results are output to the console and also to the RSP file, if it's specified. /// - internal sealed class InferSchemaCommand : ICommand + public sealed class InferSchemaCommand : ICommand { -#pragma warning disable CS0649 // The fields will still be set via the reflection driven mechanisms. public sealed class Arguments { [Argument(ArgumentType.Required, HelpText = "Text file with data to analyze", ShortName = "data")] @@ -33,7 +32,6 @@ public sealed class Arguments [Argument(ArgumentType.AtMostOnce, HelpText = "Path to the output json file describing the columns", ShortName = "out")] public string OutputFile; } -#pragma warning restore CS0649 private readonly IHost _host; private readonly string _dataFile; diff --git a/test/Microsoft.ML.InferenceTesting/Microsoft.ML.InferenceTesting.csproj b/test/Microsoft.ML.InferenceTesting/Microsoft.ML.InferenceTesting.csproj new file mode 100644 index 0000000000..60b52497a0 --- /dev/null +++ b/test/Microsoft.ML.InferenceTesting/Microsoft.ML.InferenceTesting.csproj @@ -0,0 +1,22 @@ + + + + true + CORECLR + + + + + + + + + + + + + + + + + diff --git a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj index 82f31a0d41..20974dea70 100644 --- a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj +++ b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj @@ -10,7 +10,7 @@ - + @@ -33,4 +33,4 @@ DestinationFolder="$(OutDir)\DnnImageModels\ResNet18Onnx" /> - + \ No newline at end of file diff --git a/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs b/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs index af6a26d440..a95d5c15c8 100644 --- a/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs +++ b/test/Microsoft.ML.OnnxTransformTest/OnnxTransformTests.cs @@ -29,16 +29,6 @@ private class TestData [VectorType(inputSize)] public float[] data_0; } - - private class TestDataMulti - { - [VectorType(5)] - public float[] ina; - - [VectorType(5)] - public float[] inb; - } - private class TestDataSize { [VectorType(2)] @@ -55,7 +45,7 @@ private class TestDataDifferntType public string[] data_0; } - private float[] GetSampleArrayData() + private float[] getSampleArrayData() { var samplevector = new float[inputSize]; for (int i = 0; i < inputSize; i++) @@ -66,7 +56,7 @@ private float[] GetSampleArrayData() public OnnxTransformTests(ITestOutputHelper output) : base(output) { } - + [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 fails with "An attempt was made to load a program with an incorrect format." void TestSimpleCase() { @@ -75,7 +65,7 @@ void TestSimpleCase() var modelFile = "squeezenet/00000001/model.onnx"; - var samplevector = GetSampleArrayData(); + var samplevector = getSampleArrayData(); var dataView = ComponentCreation.CreateDataView(Env, new TestData[] { @@ -92,7 +82,7 @@ void TestSimpleCase() var xyData = new List { new TestDataXY() { A = new float[inputSize] } }; var stringData = new List { new TestDataDifferntType() { data_0 = new string[inputSize] } }; var sizeData = new List { new TestDataSize() { data_0 = new float[2] } }; - var pipe = new OnnxScoringEstimator(Env, modelFile, new[] { "data_0" }, new[] { "softmaxout_1" }); + var pipe = new OnnxScoringEstimator(Env, modelFile, "data_0", "softmaxout_1"); var invalidDataWrongNames = ComponentCreation.CreateDataView(Env, xyData); var invalidDataWrongTypes = ComponentCreation.CreateDataView(Env, stringData); @@ -118,7 +108,7 @@ void TestOldSavingAndLoading() var modelFile = "squeezenet/00000001/model.onnx"; - var samplevector = GetSampleArrayData(); + var samplevector = getSampleArrayData(); var dataView = ComponentCreation.CreateDataView(Env, new TestData[] { @@ -128,8 +118,8 @@ void TestOldSavingAndLoading() } }); - var inputNames = new[] { "data_0" }; - var outputNames = new[] { "softmaxout_1" }; + var inputNames = "data_0"; + var outputNames = "softmaxout_1"; var est = new OnnxScoringEstimator(Env, modelFile, inputNames, outputNames); var transformer = est.Fit(dataView); var result = transformer.Transform(dataView); @@ -140,7 +130,7 @@ void TestOldSavingAndLoading() ms.Position = 0; var loadedView = ModelFileUtils.LoadTransforms(Env, dataView, ms); - loadedView.Schema.TryGetColumnIndex(outputNames[0], out int softMaxOut1); + loadedView.Schema.TryGetColumnIndex(outputNames, out int softMaxOut1); using (var cursor = loadedView.GetRowCursor(col => col == softMaxOut1)) { VBuffer softMaxValue = default; @@ -176,132 +166,55 @@ public void OnnxStatic() var modelFile = "squeezenet/00000001/model.onnx"; - var env = new MLContext(conc: 1); - var imageHeight = 224; - var imageWidth = 224; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - - var data = TextLoader.CreateReader(env, ctx => ( - imagePath: ctx.LoadText(0), - name: ctx.LoadText(1))) - .Read(dataFile); - - // Note that CamelCase column names are there to match the TF graph node names. - var pipe = data.MakeNewEstimator() - .Append(row => ( - row.name, - data_0: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) - .Append(row => (row.name, softmaxout_1: row.data_0.ApplyOnnxModel(modelFile))); - - TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); - - var result = pipe.Fit(data).Transform(data).AsDynamic; - result.Schema.TryGetColumnIndex("softmaxout_1", out int output); - using (var cursor = result.GetRowCursor(col => col == output)) - { - var buffer = default(VBuffer); - var getter = cursor.GetGetter>(output); - var numRows = 0; - while (cursor.MoveNext()) - { - getter(ref buffer); - Assert.Equal(1000, buffer.Length); - numRows += 1; - } - Assert.Equal(3, numRows); - } - } - - [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 output differs from Baseline - void TestCommandLine() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - return; - - var env = new MLContext(); - var x = Maml.Main(new[] { @"showschema loader=Text{col=data_0:R4:0-150527} xf=Onnx{InputColumns={data_0} OutputColumns={softmaxout_1} model={squeezenet/00000001/model.onnx}}" }); - Assert.Equal(0, x); - } - - [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 output differs from Baseline - public void OnnxModelScenario() - { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - return; - - var modelFile = "squeezenet/00000001/model.onnx"; - using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) + using (var env = new ConsoleEnvironment(null, false, 0, 1, null, null)) { - var samplevector = GetSampleArrayData(); - - var dataView = ComponentCreation.CreateDataView(Env, - new TestData[] { - new TestData() - { - data_0 = samplevector - } - }); - - var onnx = OnnxTransform.Create(env, dataView, modelFile, - new[] { "data_0" }, - new[] { "softmaxout_1" }); - - onnx.Schema.TryGetColumnIndex("softmaxout_1", out int scores); - using (var curs = onnx.GetRowCursor(col => col == scores)) + var imageHeight = 224; + var imageWidth = 224; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + + var data = TextLoader.CreateReader(env, ctx => ( + imagePath: ctx.LoadText(0), + name: ctx.LoadText(1))) + .Read(dataFile); + + // Note that CamelCase column names are there to match the TF graph node names. + var pipe = data.MakeNewEstimator() + .Append(row => ( + row.name, + data_0: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) + .Append(row => (row.name, softmaxout_1: row.data_0.ApplyOnnxModel(modelFile))); + + TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); + + var result = pipe.Fit(data).Transform(data).AsDynamic; + result.Schema.TryGetColumnIndex("softmaxout_1", out int output); + using (var cursor = result.GetRowCursor(col => col == output)) { - var getScores = curs.GetGetter>(scores); var buffer = default(VBuffer); - while (curs.MoveNext()) + var getter = cursor.GetGetter>(output); + var numRows = 0; + while (cursor.MoveNext()) { - getScores(ref buffer); + getter(ref buffer); Assert.Equal(1000, buffer.Length); + numRows += 1; } + Assert.Equal(3, numRows); } } } [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 output differs from Baseline - public void OnnxModelMultiInput() + void TestCommandLine() { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return; - var modelFile = @"twoinput\twoinput.onnx"; - using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) + using (var env = new ConsoleEnvironment()) { - var samplevector = GetSampleArrayData(); - - var dataView = ComponentCreation.CreateDataView(Env, - new TestDataMulti[] { - new TestDataMulti() - { - ina = new float[] {1,2,3,4,5}, - inb = new float[] {1,2,3,4,5} - } - }); - - var onnx = OnnxTransform.Create(env, dataView, modelFile, - new[] { "ina", "inb" }, - new[] { "outa", "outb" }); - - onnx.Schema.TryGetColumnIndex("outa", out int scoresa); - onnx.Schema.TryGetColumnIndex("outb", out int scoresb); - using (var curs = onnx.GetRowCursor(col => col == scoresa || col == scoresb)) - { - var getScoresa = curs.GetGetter>(scoresa); - var getScoresb = curs.GetGetter>(scoresb); - var buffera = default(VBuffer); - var bufferb = default(VBuffer); - - while (curs.MoveNext()) - { - getScoresa(ref buffera); - getScoresb(ref bufferb); - Console.WriteLine(buffera.GetValues().ToArray()); - Assert.Equal(5, buffera.Length); - } - } + var x = Maml.Main(new[] { @"showschema loader=Text{col=data_0:R4:0-150527} xf=Onnx{InputColumn=data_0 OutputColumn=softmaxout_1 model={squeezenet/00000001/model.onnx}}" }); + Assert.Equal(0, x); } } } diff --git a/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdIndenterTest.cs b/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdIndenterTest.cs index 76fa11fa5f..d77d455eac 100644 --- a/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdIndenterTest.cs +++ b/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdIndenterTest.cs @@ -4,7 +4,6 @@ using Microsoft.ML.Runtime.Internal.Utilities; using System; -using System.CodeDom.Compiler; using System.IO; using Xunit; using Xunit.Abstractions; @@ -46,7 +45,7 @@ internal void Run() using (var writer = File.CreateText(outPath)) { - var wrt = new IndentedTextWriter(writer, " "); + var wrt = IndentingTextWriter.Wrap(writer); // Individual scripts are separated by $ int count = 0; diff --git a/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLine.cs b/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLine.cs index 0f11af8ae0..0839a57ed3 100644 --- a/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLine.cs +++ b/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLine.cs @@ -5,7 +5,6 @@ #pragma warning disable 649 // field is never assigned using System; -using System.CodeDom.Compiler; using System.Collections.Generic; using System.IO; using System.Linq; @@ -82,8 +81,8 @@ public void CmdParsingSingle() new ArgsSingle(), new ArgsSingle() { value = "3" }, }; - Action init = null; - Action action = null; + Action init = null; + Action action = null; foreach (var def in defaults) { init += def.CallInit; @@ -96,9 +95,9 @@ public void CmdParsingSingle() /// /// Called at the beginning of a test - it dumps the usage of the Arguments class(es). /// - private static void Init(IndentedTextWriter wrt, object defaults) + private static void Init(IndentingTextWriter wrt, object defaults) { - var env = new MLContext(seed: 42); + var env = new ConsoleEnvironment(seed: 42); wrt.WriteLine("Usage:"); wrt.WriteLine(CmdParser.ArgumentsUsage(env, defaults.GetType(), defaults, false, 200)); } @@ -106,9 +105,9 @@ private static void Init(IndentedTextWriter wrt, object defaults) /// /// Process a script to be parsed (from the input resource). /// - private static void Process(IndentedTextWriter wrt, string text, ArgsBase defaults) + private static void Process(IndentingTextWriter wrt, string text, ArgsBase defaults) { - var env = new MLContext(seed: 42); + var env = new ConsoleEnvironment(seed: 42); using (wrt.Nest()) { var args1 = defaults.Clone(); @@ -139,7 +138,7 @@ private static void Process(IndentedTextWriter wrt, string text, ArgsBase defaul private abstract class ArgsBase { - public void CallInit(IndentedTextWriter wrt) + public void CallInit(IndentingTextWriter wrt) { Init(wrt, this); } @@ -147,7 +146,7 @@ public void CallInit(IndentedTextWriter wrt) /// /// Call the Process method passing "this" as the defaults. /// - public void CallProcess(IndentedTextWriter wrt, string text) + public void CallProcess(IndentingTextWriter wrt, string text) { Process(wrt, text, this); } @@ -337,8 +336,8 @@ private string GetResText(string resName) // Run the test. The init delegate is called once at the beginning of the test. // The action delegate is called on script in the input resource. - private void Run(string dir, string name, Action init, - Action action) + private void Run(string dir, string name, Action init, + Action action) { string text = GetResText(InResName(name)); @@ -347,7 +346,7 @@ private void Run(string dir, string name, Action init, using (var writer = File.CreateText(outPath)) { - var wrt = new IndentedTextWriter(writer, " "); + var wrt = IndentingTextWriter.Wrap(writer); init(wrt); @@ -405,4 +404,4 @@ private void Run(string dir, string name, Action init, Done(); } } -} \ No newline at end of file +} diff --git a/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLineReverseTest.cs b/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLineReverseTest.cs index 51330648ee..6d95829454 100644 --- a/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLineReverseTest.cs +++ b/test/Microsoft.ML.Predictor.Tests/CmdLine/CmdLineReverseTest.cs @@ -19,7 +19,7 @@ public class CmdLineReverseTests [TestCategory("Cmd Parsing")] public void ArgumentParseTest() { - var env = new MLContext(seed: 42); + var env = new ConsoleEnvironment(seed: 42); var innerArg1 = new SimpleArg() { required = -2, diff --git a/test/Microsoft.ML.Predictor.Tests/Microsoft.ML.Predictor.Tests.csproj b/test/Microsoft.ML.Predictor.Tests/Microsoft.ML.Predictor.Tests.csproj index 9cc27b17e2..d089946b87 100644 --- a/test/Microsoft.ML.Predictor.Tests/Microsoft.ML.Predictor.Tests.csproj +++ b/test/Microsoft.ML.Predictor.Tests/Microsoft.ML.Predictor.Tests.csproj @@ -16,6 +16,7 @@ + diff --git a/test/Microsoft.ML.Predictor.Tests/TestAutoInference.cs b/test/Microsoft.ML.Predictor.Tests/TestAutoInference.cs index 84cbea24ba..48f6336ecb 100644 --- a/test/Microsoft.ML.Predictor.Tests/TestAutoInference.cs +++ b/test/Microsoft.ML.Predictor.Tests/TestAutoInference.cs @@ -28,102 +28,111 @@ public TestAutoInference(ITestOutputHelper helper) [TestCategory("EntryPoints")] public void TestLearn() { - var env = new MLContext().AddStandardComponents(); // AutoInference uses ComponentCatalog to find all learners - string pathData = GetDataPath("adult.train"); - string pathDataTest = GetDataPath("adult.test"); - int numOfSampleRows = 1000; - int batchSize = 5; - int numIterations = 10; - int numTransformLevels = 3; - SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); - - // Using the simple, uniform random sampling (with replacement) engine - PipelineOptimizerBase autoMlEngine = new UniformRandomEngine(env); - - // Test initial learning - var amls = AutoInference.InferPipelines(env, autoMlEngine, pathData, "", out var schema, numTransformLevels, batchSize, - metric, out var bestPipeline, numOfSampleRows, new IterationTerminator(numIterations / 2), MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer); - env.Check(amls.GetAllEvaluatedPipelines().Length == numIterations / 2); - - // Resume learning - amls.UpdateTerminator(new IterationTerminator(numIterations)); - bestPipeline = amls.InferPipelines(numTransformLevels, batchSize, numOfSampleRows); - env.Check(amls.GetAllEvaluatedPipelines().Length == numIterations); - - // Use best pipeline for another task - var inputFileTrain = new SimpleFileHandle(env, pathData, false, false); + using (var env = new ConsoleEnvironment() + .AddStandardComponents()) // AutoInference.InferPipelines uses ComponentCatalog to read text data + { + string pathData = GetDataPath("adult.train"); + string pathDataTest = GetDataPath("adult.test"); + int numOfSampleRows = 1000; + int batchSize = 5; + int numIterations = 10; + int numTransformLevels = 3; + SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); + + // Using the simple, uniform random sampling (with replacement) engine + PipelineOptimizerBase autoMlEngine = new UniformRandomEngine(env); + + // Test initial learning + var amls = AutoInference.InferPipelines(env, autoMlEngine, pathData, "", out var schema, numTransformLevels, batchSize, + metric, out var bestPipeline, numOfSampleRows, new IterationTerminator(numIterations / 2), MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer); + env.Check(amls.GetAllEvaluatedPipelines().Length == numIterations / 2); + + // Resume learning + amls.UpdateTerminator(new IterationTerminator(numIterations)); + bestPipeline = amls.InferPipelines(numTransformLevels, batchSize, numOfSampleRows); + env.Check(amls.GetAllEvaluatedPipelines().Length == numIterations); + + // Use best pipeline for another task + var inputFileTrain = new SimpleFileHandle(env, pathData, false, false); #pragma warning disable 0618 - var datasetTrain = ImportTextData.ImportText(env, - new ImportTextData.Input { InputFile = inputFileTrain, CustomSchema = schema }).Data; - var inputFileTest = new SimpleFileHandle(env, pathDataTest, false, false); - var datasetTest = ImportTextData.ImportText(env, - new ImportTextData.Input { InputFile = inputFileTest, CustomSchema = schema }).Data; + var datasetTrain = ImportTextData.ImportText(env, + new ImportTextData.Input { InputFile = inputFileTrain, CustomSchema = schema }).Data; + var inputFileTest = new SimpleFileHandle(env, pathDataTest, false, false); + var datasetTest = ImportTextData.ImportText(env, + new ImportTextData.Input { InputFile = inputFileTest, CustomSchema = schema }).Data; #pragma warning restore 0618 - // REVIEW: Theoretically, it could be the case that a new, very bad learner is introduced and - // we get unlucky and only select it every time, such that this test fails. Not - // likely at all, but a non-zero probability. Should be ok, since all current learners are returning d > .80. - bestPipeline.RunTrainTestExperiment(datasetTrain, datasetTest, metric, MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer, - out var testMetricValue, out var trainMtericValue); - env.Check(testMetricValue > 0.2); + // REVIEW: Theoretically, it could be the case that a new, very bad learner is introduced and + // we get unlucky and only select it every time, such that this test fails. Not + // likely at all, but a non-zero probability. Should be ok, since all current learners are returning d > .80. + bestPipeline.RunTrainTestExperiment(datasetTrain, datasetTest, metric, MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer, + out var testMetricValue, out var trainMtericValue); + env.Check(testMetricValue > 0.2); + } Done(); } [Fact(Skip = "Need CoreTLC specific baseline update")] public void TestTextDatasetLearn() { - var env = new MLContext().AddStandardComponents(); // AutoInference uses ComponentCatalog to find all learners - string pathData = GetDataPath(@"../UnitTest/tweets_labeled_10k_test_validation.tsv"); - int batchSize = 5; - int numIterations = 35; - int numTransformLevels = 1; - int numSampleRows = 100; - SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.AccuracyMicro); - - // Using the simple, uniform random sampling (with replacement) engine - PipelineOptimizerBase autoMlEngine = new UniformRandomEngine(env); - - // Test initial learning - var amls = AutoInference.InferPipelines(env, autoMlEngine, pathData, "", out var _, numTransformLevels, batchSize, - metric, out var _, numSampleRows, new IterationTerminator(numIterations), - MacroUtils.TrainerKinds.SignatureMultiClassClassifierTrainer); - env.Check(amls.GetAllEvaluatedPipelines().Length == numIterations); + using (var env = new ConsoleEnvironment() + .AddStandardComponents()) // AutoInference uses ComponentCatalog to find all learners + { + string pathData = GetDataPath(@"../UnitTest/tweets_labeled_10k_test_validation.tsv"); + int batchSize = 5; + int numIterations = 35; + int numTransformLevels = 1; + int numSampleRows = 100; + SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.AccuracyMicro); + + // Using the simple, uniform random sampling (with replacement) engine + PipelineOptimizerBase autoMlEngine = new UniformRandomEngine(env); + + // Test initial learning + var amls = AutoInference.InferPipelines(env, autoMlEngine, pathData, "", out var _, numTransformLevels, batchSize, + metric, out var _, numSampleRows, new IterationTerminator(numIterations), + MacroUtils.TrainerKinds.SignatureMultiClassClassifierTrainer); + env.Check(amls.GetAllEvaluatedPipelines().Length == numIterations); + } Done(); } [Fact] public void TestPipelineNodeCloning() { - var env = new MLContext().AddStandardComponents(); // AutoInference uses ComponentCatalog to find all learners - var lr1 = RecipeInference + using (var env = new ConsoleEnvironment() + .AddStandardComponents()) // RecipeInference.AllowedLearners uses ComponentCatalog to find all learners + { + var lr1 = RecipeInference .AllowedLearners(env, MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer) .First(learner => learner.PipelineNode != null && learner.LearnerName.Contains("LogisticRegression")); - var sdca1 = RecipeInference - .AllowedLearners(env, MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer) - .First(learner => learner.PipelineNode != null && learner.LearnerName.Contains("StochasticDualCoordinateAscent")); - - // Clone and change hyperparam values - var lr2 = lr1.Clone(); - lr1.PipelineNode.SweepParams[0].RawValue = 1.2f; - lr2.PipelineNode.SweepParams[0].RawValue = 3.5f; - var sdca2 = sdca1.Clone(); - sdca1.PipelineNode.SweepParams[0].RawValue = 3; - sdca2.PipelineNode.SweepParams[0].RawValue = 0; - - // Make sure the changes are propagated to entry point objects - env.Check(lr1.PipelineNode.UpdateProperties()); - env.Check(lr2.PipelineNode.UpdateProperties()); - env.Check(sdca1.PipelineNode.UpdateProperties()); - env.Check(sdca2.PipelineNode.UpdateProperties()); - env.Check(lr1.PipelineNode.CheckEntryPointStateMatchesParamValues()); - env.Check(lr2.PipelineNode.CheckEntryPointStateMatchesParamValues()); - env.Check(sdca1.PipelineNode.CheckEntryPointStateMatchesParamValues()); - env.Check(sdca2.PipelineNode.CheckEntryPointStateMatchesParamValues()); - - // Make sure second object's set of changes didn't overwrite first object's - env.Check(!lr1.PipelineNode.SweepParams[0].RawValue.Equals(lr2.PipelineNode.SweepParams[0].RawValue)); - env.Check(!sdca2.PipelineNode.SweepParams[0].RawValue.Equals(sdca1.PipelineNode.SweepParams[0].RawValue)); + var sdca1 = RecipeInference + .AllowedLearners(env, MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer) + .First(learner => learner.PipelineNode != null && learner.LearnerName.Contains("StochasticDualCoordinateAscent")); + + // Clone and change hyperparam values + var lr2 = lr1.Clone(); + lr1.PipelineNode.SweepParams[0].RawValue = 1.2f; + lr2.PipelineNode.SweepParams[0].RawValue = 3.5f; + var sdca2 = sdca1.Clone(); + sdca1.PipelineNode.SweepParams[0].RawValue = 3; + sdca2.PipelineNode.SweepParams[0].RawValue = 0; + + // Make sure the changes are propagated to entry point objects + env.Check(lr1.PipelineNode.UpdateProperties()); + env.Check(lr2.PipelineNode.UpdateProperties()); + env.Check(sdca1.PipelineNode.UpdateProperties()); + env.Check(sdca2.PipelineNode.UpdateProperties()); + env.Check(lr1.PipelineNode.CheckEntryPointStateMatchesParamValues()); + env.Check(lr2.PipelineNode.CheckEntryPointStateMatchesParamValues()); + env.Check(sdca1.PipelineNode.CheckEntryPointStateMatchesParamValues()); + env.Check(sdca2.PipelineNode.CheckEntryPointStateMatchesParamValues()); + + // Make sure second object's set of changes didn't overwrite first object's + env.Check(!lr1.PipelineNode.SweepParams[0].RawValue.Equals(lr2.PipelineNode.SweepParams[0].RawValue)); + env.Check(!sdca2.PipelineNode.SweepParams[0].RawValue.Equals(sdca1.PipelineNode.SweepParams[0].RawValue)); + } } [Fact] @@ -134,42 +143,45 @@ public void TestHyperparameterFreezing() int batchSize = 1; int numIterations = 10; int numTransformLevels = 3; - var env = new MLContext().AddStandardComponents(); // AutoInference uses ComponentCatalog to find all learners - SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); - - // Using the simple, uniform random sampling (with replacement) brain - PipelineOptimizerBase autoMlBrain = new UniformRandomEngine(env); - - // Run initial experiments - var amls = AutoInference.InferPipelines(env, autoMlBrain, pathData, "", out var _, numTransformLevels, batchSize, - metric, out var bestPipeline, numOfSampleRows, new IterationTerminator(numIterations), - MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer); - - // Clear results - amls.ClearEvaluatedPipelines(); - - // Get space, remove transforms and all but one learner, freeze hyperparameters on learner. - var space = amls.GetSearchSpace(); - var transforms = space.Item1.Where(t => - t.ExpertType != typeof(TransformInference.Experts.Categorical)).ToArray(); - var learners = new[] { space.Item2.First() }; - var hyperParam = learners[0].PipelineNode.SweepParams.First(); - var frozenParamValue = hyperParam.RawValue; - hyperParam.Frozen = true; - amls.UpdateSearchSpace(learners, transforms); - - // Allow for one more iteration - amls.UpdateTerminator(new IterationTerminator(numIterations + 1)); - - // Do learning. Only retained learner should be left in all pipelines. - bestPipeline = amls.InferPipelines(numTransformLevels, batchSize, numOfSampleRows); - - // Make sure all pipelines have retained learner - Assert.True(amls.GetAllEvaluatedPipelines().All(p => p.Learner.LearnerName == learners[0].LearnerName)); - - // Make sure hyperparameter value did not change - Assert.NotNull(bestPipeline); - Assert.Equal(bestPipeline.Learner.PipelineNode.SweepParams.First().RawValue, frozenParamValue); + using (var env = new ConsoleEnvironment() + .AddStandardComponents()) // AutoInference uses ComponentCatalog to find all learners + { + SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); + + // Using the simple, uniform random sampling (with replacement) brain + PipelineOptimizerBase autoMlBrain = new UniformRandomEngine(env); + + // Run initial experiments + var amls = AutoInference.InferPipelines(env, autoMlBrain, pathData, "", out var _, numTransformLevels, batchSize, + metric, out var bestPipeline, numOfSampleRows, new IterationTerminator(numIterations), + MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer); + + // Clear results + amls.ClearEvaluatedPipelines(); + + // Get space, remove transforms and all but one learner, freeze hyperparameters on learner. + var space = amls.GetSearchSpace(); + var transforms = space.Item1.Where(t => + t.ExpertType != typeof(TransformInference.Experts.Categorical)).ToArray(); + var learners = new[] { space.Item2.First() }; + var hyperParam = learners[0].PipelineNode.SweepParams.First(); + var frozenParamValue = hyperParam.RawValue; + hyperParam.Frozen = true; + amls.UpdateSearchSpace(learners, transforms); + + // Allow for one more iteration + amls.UpdateTerminator(new IterationTerminator(numIterations + 1)); + + // Do learning. Only retained learner should be left in all pipelines. + bestPipeline = amls.InferPipelines(numTransformLevels, batchSize, numOfSampleRows); + + // Make sure all pipelines have retained learner + Assert.True(amls.GetAllEvaluatedPipelines().All(p => p.Learner.LearnerName == learners[0].LearnerName)); + + // Make sure hyperparameter value did not change + Assert.NotNull(bestPipeline); + Assert.Equal(bestPipeline.Learner.PipelineNode.SweepParams.First().RawValue, frozenParamValue); + } } [Fact(Skip = "Dataset not available.")] @@ -180,27 +192,30 @@ public void TestRegressionPipelineWithMinimizingMetric() int batchSize = 5; int numIterations = 10; int numTransformLevels = 1; - var env = new MLContext().AddStandardComponents(); // AutoInference uses ComponentCatalog to find all learners - SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.AccuracyMicro); + using (var env = new ConsoleEnvironment() + .AddStandardComponents()) // AutoInference uses ComponentCatalog to find all learners + { + SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.AccuracyMicro); - // Using the simple, uniform random sampling (with replacement) brain - PipelineOptimizerBase autoMlBrain = new UniformRandomEngine(env); + // Using the simple, uniform random sampling (with replacement) brain + PipelineOptimizerBase autoMlBrain = new UniformRandomEngine(env); - // Run initial experiments - var amls = AutoInference.InferPipelines(env, autoMlBrain, pathData, "", out var _, numTransformLevels, batchSize, - metric, out var bestPipeline, numOfSampleRows, new IterationTerminator(numIterations), - MacroUtils.TrainerKinds.SignatureRegressorTrainer); + // Run initial experiments + var amls = AutoInference.InferPipelines(env, autoMlBrain, pathData, "", out var _, numTransformLevels, batchSize, + metric, out var bestPipeline, numOfSampleRows, new IterationTerminator(numIterations), + MacroUtils.TrainerKinds.SignatureRegressorTrainer); - // Allow for one more iteration - amls.UpdateTerminator(new IterationTerminator(numIterations + 1)); + // Allow for one more iteration + amls.UpdateTerminator(new IterationTerminator(numIterations + 1)); - // Do learning. Only retained learner should be left in all pipelines. - bestPipeline = amls.InferPipelines(numTransformLevels, batchSize, numOfSampleRows); + // Do learning. Only retained learner should be left in all pipelines. + bestPipeline = amls.InferPipelines(numTransformLevels, batchSize, numOfSampleRows); - // Make sure hyperparameter value did not change - Assert.NotNull(bestPipeline); - Assert.True(amls.GetAllEvaluatedPipelines().All( - p => p.PerformanceSummary.MetricValue >= bestPipeline.PerformanceSummary.MetricValue)); + // Make sure hyperparameter value did not change + Assert.NotNull(bestPipeline); + Assert.True(amls.GetAllEvaluatedPipelines().All( + p => p.PerformanceSummary.MetricValue >= bestPipeline.PerformanceSummary.MetricValue)); + } } [Fact] @@ -212,24 +227,27 @@ public void TestLearnerConstrainingByName() int numIterations = 1; int numTransformLevels = 2; var retainedLearnerNames = new[] { $"LogisticRegressionBinaryClassifier", $"FastTreeBinaryClassifier" }; - var env = new MLContext().AddStandardComponents(); // AutoInference uses ComponentCatalog to find all learners - SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); - - // Using the simple, uniform random sampling (with replacement) brain. - PipelineOptimizerBase autoMlBrain = new UniformRandomEngine(env); - - // Run initial experiment. - var amls = AutoInference.InferPipelines(env, autoMlBrain, pathData, "", out var _, - numTransformLevels, batchSize, metric, out var _, numOfSampleRows, - new IterationTerminator(numIterations), MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer); - - // Keep only logistic regression and FastTree. - amls.KeepSelectedLearners(retainedLearnerNames); - var space = amls.GetSearchSpace(); - - // Make sure only learners left are those retained. - Assert.Equal(retainedLearnerNames.Length, space.Item2.Length); - Assert.True(space.Item2.All(l => retainedLearnerNames.Any(r => r == l.LearnerName))); + using (var env = new ConsoleEnvironment() + .AddStandardComponents()) // AutoInference uses ComponentCatalog to find all learners + { + SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); + + // Using the simple, uniform random sampling (with replacement) brain. + PipelineOptimizerBase autoMlBrain = new UniformRandomEngine(env); + + // Run initial experiment. + var amls = AutoInference.InferPipelines(env, autoMlBrain, pathData, "", out var _, + numTransformLevels, batchSize, metric, out var _, numOfSampleRows, + new IterationTerminator(numIterations), MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer); + + // Keep only logistic regression and FastTree. + amls.KeepSelectedLearners(retainedLearnerNames); + var space = amls.GetSearchSpace(); + + // Make sure only learners left are those retained. + Assert.Equal(retainedLearnerNames.Length, space.Item2.Length); + Assert.True(space.Item2.All(l => retainedLearnerNames.Any(r => r == l.LearnerName))); + } } [Fact] diff --git a/test/Microsoft.ML.Predictor.Tests/TestDatasetInference.cs b/test/Microsoft.ML.Predictor.Tests/TestDatasetInference.cs index 5cf5a86ceb..0b92eb7b30 100644 --- a/test/Microsoft.ML.Predictor.Tests/TestDatasetInference.cs +++ b/test/Microsoft.ML.Predictor.Tests/TestDatasetInference.cs @@ -25,7 +25,7 @@ public TestDatasetInference(ITestOutputHelper helper) { } - [Fact(Skip = "Disabled")] + [Fact(Skip="Disabled")] public void DatasetInferenceTest() { var datasets = new[] @@ -35,49 +35,51 @@ public void DatasetInferenceTest() GetDataPath(@"..\UnitTest\breast-cancer.txt"), }; - IHostEnvironment env = new MLContext(); - var h = env.Register("InferDatasetFeatures", seed: 0, verbose: false); - - using (var ch = h.Start("InferDatasetFeatures")) + using (var env = new ConsoleEnvironment()) { + var h = env.Register("InferDatasetFeatures", seed: 0, verbose: false); - for (int i = 0; i < datasets.Length; i++) + using (var ch = h.Start("InferDatasetFeatures")) { - var sample = TextFileSample.CreateFromFullFile(h, datasets[i]); - var splitResult = TextFileContents.TrySplitColumns(h, sample, TextFileContents.DefaultSeparators); - if (!splitResult.IsSuccess) - throw ch.ExceptDecode("Couldn't detect separator."); - var typeInfResult = ColumnTypeInference.InferTextFileColumnTypes(Env, sample, - new ColumnTypeInference.Arguments - { - Separator = splitResult.Separator, - AllowSparse = splitResult.AllowSparse, - AllowQuote = splitResult.AllowQuote, - ColumnCount = splitResult.ColumnCount - }); - - if (!typeInfResult.IsSuccess) - return; - - ColumnGroupingInference.GroupingColumn[] columns = null; - bool hasHeader = false; - columns = InferenceUtils.InferColumnPurposes(ch, h, sample, splitResult, out hasHeader); - Guid id = new Guid("60C77F4E-DB62-4351-8311-9B392A12968E"); - var commandArgs = new DatasetFeatureInference.Arguments(typeInfResult.Data, - columns.Select( - col => - new DatasetFeatureInference.Column(col.SuggestedName, col.Purpose, col.ItemKind, - col.ColumnRangeSelector)).ToArray(), sample.FullFileSize, sample.ApproximateRowCount, - false, id, true); - - string jsonString = DatasetFeatureInference.InferDatasetFeatures(env, commandArgs); - var outFile = string.Format("dataset-inference-result-{0:00}.txt", i); - string dataPath = GetOutputPath(@"..\Common\Inference", outFile); - using (var sw = new StreamWriter(File.Create(dataPath))) - sw.WriteLine(jsonString); - - CheckEquality(@"..\Common\Inference", outFile); + for (int i = 0; i < datasets.Length; i++) + { + var sample = TextFileSample.CreateFromFullFile(h, datasets[i]); + var splitResult = TextFileContents.TrySplitColumns(h, sample, TextFileContents.DefaultSeparators); + if (!splitResult.IsSuccess) + throw ch.ExceptDecode("Couldn't detect separator."); + + var typeInfResult = ColumnTypeInference.InferTextFileColumnTypes(Env, sample, + new ColumnTypeInference.Arguments + { + Separator = splitResult.Separator, + AllowSparse = splitResult.AllowSparse, + AllowQuote = splitResult.AllowQuote, + ColumnCount = splitResult.ColumnCount + }); + + if (!typeInfResult.IsSuccess) + return; + + ColumnGroupingInference.GroupingColumn[] columns = null; + bool hasHeader = false; + columns = InferenceUtils.InferColumnPurposes(ch, h, sample, splitResult, out hasHeader); + Guid id = new Guid("60C77F4E-DB62-4351-8311-9B392A12968E"); + var commandArgs = new DatasetFeatureInference.Arguments(typeInfResult.Data, + columns.Select( + col => + new DatasetFeatureInference.Column(col.SuggestedName, col.Purpose, col.ItemKind, + col.ColumnRangeSelector)).ToArray(), sample.FullFileSize, sample.ApproximateRowCount, + false, id, true); + + string jsonString = DatasetFeatureInference.InferDatasetFeatures(env, commandArgs); + var outFile = string.Format("dataset-inference-result-{0:00}.txt", i); + string dataPath = GetOutputPath(@"..\Common\Inference", outFile); + using (var sw = new StreamWriter(File.Create(dataPath))) + sw.WriteLine(jsonString); + + CheckEquality(@"..\Common\Inference", outFile); + } } } Done(); @@ -91,24 +93,26 @@ public void InferSchemaCommandTest() GetDataPath(Path.Combine("..", "data", "wikipedia-detox-250-line-data.tsv")) }; - IHostEnvironment env = new MLContext(); - var h = env.Register("InferSchemaCommandTest", seed: 0, verbose: false); - using (var ch = h.Start("InferSchemaCommandTest")) + using (var env = new ConsoleEnvironment()) { - for (int i = 0; i < datasets.Length; i++) + var h = env.Register("InferSchemaCommandTest", seed: 0, verbose: false); + using (var ch = h.Start("InferSchemaCommandTest")) { - var outFile = string.Format("dataset-infer-schema-result-{0:00}.txt", i); - string dataPath = GetOutputPath(Path.Combine("..", "Common", "Inference"), outFile); - var args = new InferSchemaCommand.Arguments() + for (int i = 0; i < datasets.Length; i++) { - DataFile = datasets[i], - OutputFile = dataPath, - }; + var outFile = string.Format("dataset-infer-schema-result-{0:00}.txt", i); + string dataPath = GetOutputPath(Path.Combine("..", "Common", "Inference"), outFile); + var args = new InferSchemaCommand.Arguments() + { + DataFile = datasets[i], + OutputFile = dataPath, + }; - var cmd = new InferSchemaCommand(Env, args); - cmd.Run(); + var cmd = new InferSchemaCommand(Env, args); + cmd.Run(); - CheckEquality(Path.Combine("..", "Common", "Inference"), outFile); + CheckEquality(Path.Combine("..", "Common", "Inference"), outFile); + } } } Done(); @@ -124,24 +128,26 @@ public void InferRecipesCommandTest() GetDataPath(Path.Combine("..", "data", "wikipedia-detox-250-line-data-schema.txt"))) }; - IHostEnvironment env = new MLContext(); - var h = env.Register("InferRecipesCommandTest", seed: 0, verbose: false); - using (var ch = h.Start("InferRecipesCommandTest")) + using (var env = new ConsoleEnvironment()) { - for (int i = 0; i < datasets.Length; i++) + var h = env.Register("InferRecipesCommandTest", seed: 0, verbose: false); + using (var ch = h.Start("InferRecipesCommandTest")) { - var outFile = string.Format("dataset-infer-recipe-result-{0:00}.txt", i); - string dataPath = GetOutputPath(Path.Combine("..", "Common", "Inference"), outFile); - var args = new InferRecipesCommand.Arguments() + for (int i = 0; i < datasets.Length; i++) { - DataFile = datasets[i].Item1, - SchemaDefinitionFile = datasets[i].Item2, - RspOutputFile = dataPath - }; - var cmd = new InferRecipesCommand(Env, args); - cmd.Run(); - - CheckEquality(Path.Combine("..", "Common", "Inference"), outFile); + var outFile = string.Format("dataset-infer-recipe-result-{0:00}.txt", i); + string dataPath = GetOutputPath(Path.Combine("..", "Common", "Inference"), outFile); + var args = new InferRecipesCommand.Arguments() + { + DataFile = datasets[i].Item1, + SchemaDefinitionFile = datasets[i].Item2, + RspOutputFile = dataPath + }; + var cmd = new InferRecipesCommand(Env, args); + cmd.Run(); + + CheckEquality(Path.Combine("..", "Common", "Inference"), outFile); + } } } Done(); diff --git a/test/Microsoft.ML.Predictor.Tests/TestPipelineSweeper.cs b/test/Microsoft.ML.Predictor.Tests/TestPipelineSweeper.cs index 5e277daa05..b72c9773d3 100644 --- a/test/Microsoft.ML.Predictor.Tests/TestPipelineSweeper.cs +++ b/test/Microsoft.ML.Predictor.Tests/TestPipelineSweeper.cs @@ -123,40 +123,42 @@ public void PipelineSweeperNoTransforms() const int batchSize = 5; const int numIterations = 20; const int numTransformLevels = 2; - var env = new MLContext(); - SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); + using (var env = new ConsoleEnvironment()) + { + SupportedMetric metric = PipelineSweeperSupportedMetrics.GetSupportedMetric(PipelineSweeperSupportedMetrics.Metrics.Auc); - // Using the simple, uniform random sampling (with replacement) engine - PipelineOptimizerBase autoMlEngine = new UniformRandomEngine(Env); + // Using the simple, uniform random sampling (with replacement) engine + PipelineOptimizerBase autoMlEngine = new UniformRandomEngine(Env); - // Create search object - var amls = new AutoInference.AutoMlMlState(Env, metric, autoMlEngine, new IterationTerminator(numIterations), - MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer, datasetTrain, datasetTest); + // Create search object + var amls = new AutoInference.AutoMlMlState(Env, metric, autoMlEngine, new IterationTerminator(numIterations), + MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer, datasetTrain, datasetTest); - // Infer search space - amls.InferSearchSpace(numTransformLevels); + // Infer search space + amls.InferSearchSpace(numTransformLevels); - // Create macro object - var pipelineSweepInput = new Microsoft.ML.Legacy.Models.PipelineSweeper() - { - BatchSize = batchSize, - }; - - var exp = new Experiment(Env); - var output = exp.Add(pipelineSweepInput); - exp.Compile(); - exp.SetInput(pipelineSweepInput.TrainingData, datasetTrain); - exp.SetInput(pipelineSweepInput.TestingData, datasetTest); - exp.SetInput(pipelineSweepInput.State, amls); - exp.SetInput(pipelineSweepInput.CandidateOutputs, new IDataView[0]); - exp.Run(); - - // Make sure you get back an AutoMlState, and that it ran for correct number of iterations - // with at least minimal performance values (i.e., best should have AUC better than 0.1 on this dataset). - AutoInference.AutoMlMlState amlsOut = (AutoInference.AutoMlMlState)exp.GetOutput(output.State); - Assert.NotNull(amlsOut); - Assert.Equal(amlsOut.GetAllEvaluatedPipelines().Length, numIterations); - Assert.True(amlsOut.GetBestPipeline().PerformanceSummary.MetricValue > 0.8); + // Create macro object + var pipelineSweepInput = new Microsoft.ML.Legacy.Models.PipelineSweeper() + { + BatchSize = batchSize, + }; + + var exp = new Experiment(Env); + var output = exp.Add(pipelineSweepInput); + exp.Compile(); + exp.SetInput(pipelineSweepInput.TrainingData, datasetTrain); + exp.SetInput(pipelineSweepInput.TestingData, datasetTest); + exp.SetInput(pipelineSweepInput.State, amls); + exp.SetInput(pipelineSweepInput.CandidateOutputs, new IDataView[0]); + exp.Run(); + + // Make sure you get back an AutoMlState, and that it ran for correct number of iterations + // with at least minimal performance values (i.e., best should have AUC better than 0.1 on this dataset). + AutoInference.AutoMlMlState amlsOut = (AutoInference.AutoMlMlState)exp.GetOutput(output.State); + Assert.NotNull(amlsOut); + Assert.Equal(amlsOut.GetAllEvaluatedPipelines().Length, numIterations); + Assert.True(amlsOut.GetBestPipeline().PerformanceSummary.MetricValue > 0.8); + } } [Fact] diff --git a/test/Microsoft.ML.Predictor.Tests/TestTransposer.cs b/test/Microsoft.ML.Predictor.Tests/TestTransposer.cs index a9f969a7f1..9517e82a55 100644 --- a/test/Microsoft.ML.Predictor.Tests/TestTransposer.cs +++ b/test/Microsoft.ML.Predictor.Tests/TestTransposer.cs @@ -143,7 +143,7 @@ private static T[] GenerateHelper(int rowCount, Double density, Random rgen, return values; } - [Fact] + [Fact(Skip = "Need CoreTLC specific baseline update")] [TestCategory("Transposer")] public void TransposerTest() { diff --git a/test/Microsoft.ML.StaticPipelineTesting/ImageAnalyticsTests.cs b/test/Microsoft.ML.StaticPipelineTesting/ImageAnalyticsTests.cs index bdb9677495..3b28fc1cfa 100644 --- a/test/Microsoft.ML.StaticPipelineTesting/ImageAnalyticsTests.cs +++ b/test/Microsoft.ML.StaticPipelineTesting/ImageAnalyticsTests.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; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.ImageAnalytics; using Xunit; @@ -19,7 +20,7 @@ public ImageAnalyticsTests(ITestOutputHelper output) [Fact] public void SimpleImageSmokeTest() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(0, verbose: true); var reader = TextLoader.CreateReader(env, ctx => ctx.LoadText(0).LoadAsImage().AsGrayscale().Resize(10, 8).ExtractPixels()); diff --git a/test/Microsoft.ML.StaticPipelineTesting/Microsoft.ML.StaticPipelineTesting.csproj b/test/Microsoft.ML.StaticPipelineTesting/Microsoft.ML.StaticPipelineTesting.csproj index ae02e94492..532cff72cc 100644 --- a/test/Microsoft.ML.StaticPipelineTesting/Microsoft.ML.StaticPipelineTesting.csproj +++ b/test/Microsoft.ML.StaticPipelineTesting/Microsoft.ML.StaticPipelineTesting.csproj @@ -4,7 +4,6 @@ - diff --git a/test/Microsoft.ML.StaticPipelineTesting/StaticPipeTests.cs b/test/Microsoft.ML.StaticPipelineTesting/StaticPipeTests.cs index 4de9cfc660..de118ca2f5 100644 --- a/test/Microsoft.ML.StaticPipelineTesting/StaticPipeTests.cs +++ b/test/Microsoft.ML.StaticPipelineTesting/StaticPipeTests.cs @@ -22,7 +22,6 @@ using System.Text; using Xunit; using Xunit.Abstractions; -using static Microsoft.ML.Transforms.Text.LatentDirichletAllocationTransformer; namespace Microsoft.ML.StaticPipelineTesting { @@ -59,7 +58,7 @@ private void CheckSchemaHasColumn(ISchema schema, string name, out int idx) [Fact] public void SimpleTextLoaderCopyColumnsTest() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(0, verbose: true); const string data = "0 hello 3.14159 -0 2\n" + "1 1 2 4 15"; @@ -160,7 +159,7 @@ private static Obnoxious3 MakeObnoxious3(Scalar hi, Obnoxious1 my, T [Fact] public void SimpleTextLoaderObnoxiousTypeTest() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(0, verbose: true); const string data = "0 hello 3.14159 -0 2\n" + "1 1 2 4 15"; @@ -207,7 +206,7 @@ private static KeyValuePair P(string name, ColumnType type) [Fact] public void AssertStaticSimple() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(0, verbose: true); var schema = SimpleSchemaUtils.Create(env, P("hello", TextType.Instance), P("my", new VectorType(NumberType.I8, 5)), @@ -231,7 +230,7 @@ public void AssertStaticSimple() [Fact] public void AssertStaticSimpleFailure() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(0, verbose: true); var schema = SimpleSchemaUtils.Create(env, P("hello", TextType.Instance), P("my", new VectorType(NumberType.I8, 5)), @@ -263,7 +262,7 @@ private sealed class MetaCounted : ICounted [Fact] public void AssertStaticKeys() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(0, verbose: true); var counted = new MetaCounted(); // We'll test a few things here. First, the case where the key-value metadata is text. @@ -370,7 +369,7 @@ public void AssertStaticKeys() [Fact] public void Normalizer() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath("generated_regression_dataset.csv"); var dataSource = new MultiFileSource(dataPath); @@ -395,7 +394,7 @@ public void Normalizer() [Fact] public void NormalizerWithOnFit() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath("generated_regression_dataset.csv"); var dataSource = new MultiFileSource(dataPath); @@ -423,7 +422,7 @@ public void NormalizerWithOnFit() // Just for fun, let's also write out some of the lines of the data to the console. using (var stream = new MemoryStream()) { - IDataView v = ColumnSelectingTransformer.CreateKeep(env, tdata.AsDynamic, new[] { "r", "ncdf", "n", "b" }); + IDataView v = SelectColumnsTransform.CreateKeep(env, tdata.AsDynamic, "r", "ncdf", "n", "b"); v = TakeFilter.Create(env, v, 10); var saver = new TextSaver(env, new TextSaver.Arguments() { @@ -439,7 +438,7 @@ public void NormalizerWithOnFit() [Fact] public void ToKey() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath("iris.data"); var reader = TextLoader.CreateReader(env, c => (label: c.LoadText(4), values: c.LoadFloat(0, 3)), @@ -477,7 +476,7 @@ public void ToKey() [Fact] public void ConcatWith() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath("iris.data"); var reader = TextLoader.CreateReader(env, c => (label: c.LoadText(4), values: c.LoadFloat(0, 3), value: c.LoadFloat(2)), @@ -515,7 +514,7 @@ public void ConcatWith() [Fact] public void Tokenize() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var reader = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -544,7 +543,7 @@ public void Tokenize() [Fact] public void NormalizeTextAndRemoveStopWords() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var reader = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -573,7 +572,7 @@ public void NormalizeTextAndRemoveStopWords() [Fact] public void ConvertToWordBag() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var reader = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -602,7 +601,7 @@ public void ConvertToWordBag() [Fact] public void Ngrams() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var reader = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -632,7 +631,7 @@ public void Ngrams() [Fact] public void LpGcNormAndWhitening() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath("generated_regression_dataset.csv"); var dataSource = new MultiFileSource(dataPath); @@ -670,7 +669,7 @@ public void LpGcNormAndWhitening() [Fact] public void LdaTopicModel() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var reader = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -678,27 +677,26 @@ public void LdaTopicModel() var dataSource = new MultiFileSource(dataPath); var data = reader.Read(dataSource); - // This will be populated once we call fit. - LdaSummary ldaSummary; - var est = data.MakeNewEstimator() .Append(r => ( r.label, - topics: r.text.ToBagofWords().ToLdaTopicVector(numTopic: 3, numSummaryTermPerTopic:5, alphaSum: 10, onFit: m => ldaSummary = m.LdaTopicSummary))); - - var transformer = est.Fit(data); - var tdata = transformer.Transform(data); + topics: r.text.ToBagofWords().ToLdaTopicVector(numTopic: 10, advancedSettings: s => + { + s.AlphaSum = 10; + }))); + var tdata = est.Fit(data).Transform(data); var schema = tdata.AsDynamic.Schema; + Assert.True(schema.TryGetColumnIndex("topics", out int topicsCol)); var type = schema.GetColumnType(topicsCol); Assert.True(type is VectorType vecType && vecType.Size > 0 && vecType.ItemType is NumberType); - } +} - [Fact(Skip = "FeatureSeclection transform cannot be trained on empty data, schema propagation fails")] + [Fact] public void FeatureSelection() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var reader = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -727,7 +725,7 @@ public void FeatureSelection() [Fact] public void TrainTestSplit() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.iris.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -757,7 +755,7 @@ public void TrainTestSplit() [Fact] public void PrincipalComponentAnalysis() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath("generated_regression_dataset.csv"); var dataSource = new MultiFileSource(dataPath); @@ -780,10 +778,10 @@ public void PrincipalComponentAnalysis() [Fact] public void NAIndicatorStatic() { - var env = new MLContext(0); + var Env = new ConsoleEnvironment(seed: 0); string dataPath = GetDataPath("breast-cancer.txt"); - var reader = TextLoader.CreateReader(env, ctx => ( + var reader = TextLoader.CreateReader(Env, ctx => ( ScalarFloat: ctx.LoadFloat(1), ScalarDouble: ctx.LoadDouble(1), VectorFloat: ctx.LoadFloat(1, 4), @@ -800,12 +798,12 @@ public void NAIndicatorStatic() D: row.VectorDoulbe.IsMissingValue() )); - IDataView newData = TakeFilter.Create(env, est.Fit(data).Transform(data).AsDynamic, 4); + IDataView newData = TakeFilter.Create(Env, est.Fit(data).Transform(data).AsDynamic, 4); Assert.NotNull(newData); - bool[] ScalarFloat = newData.GetColumn(env, "A").ToArray(); - bool[] ScalarDouble = newData.GetColumn(env, "B").ToArray(); - bool[][] VectorFloat = newData.GetColumn(env, "C").ToArray(); - bool[][] VectorDoulbe = newData.GetColumn(env, "D").ToArray(); + bool[] ScalarFloat = newData.GetColumn(Env, "A").ToArray(); + bool[] ScalarDouble = newData.GetColumn(Env, "B").ToArray(); + bool[][] VectorFloat = newData.GetColumn(Env, "C").ToArray(); + bool[][] VectorDoulbe = newData.GetColumn(Env, "D").ToArray(); Assert.NotNull(ScalarFloat); Assert.NotNull(ScalarDouble); @@ -824,7 +822,7 @@ public void NAIndicatorStatic() [Fact] public void TextNormalizeStatic() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var reader = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -864,7 +862,7 @@ public void TextNormalizeStatic() [Fact] public void TestPcaStatic() { - var env = new MLContext(0); + var env = new ConsoleEnvironment(seed: 1); var dataSource = GetDataPath("generated_regression_dataset.csv"); var reader = TextLoader.CreateReader(env, c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), diff --git a/test/Microsoft.ML.StaticPipelineTesting/Training.cs b/test/Microsoft.ML.StaticPipelineTesting/Training.cs index b59c2118b5..c689cba935 100644 --- a/test/Microsoft.ML.StaticPipelineTesting/Training.cs +++ b/test/Microsoft.ML.StaticPipelineTesting/Training.cs @@ -32,7 +32,7 @@ public Training(ITestOutputHelper output) : base(output) [Fact] public void SdcaRegression() { - var env = new MLContext(seed: 0, conc: 1); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -45,8 +45,7 @@ public void SdcaRegression() LinearRegressionPredictor pred = null; var est = reader.MakeNewEstimator() - .Append(r => (r.label, score: ctx.Trainers.Sdca(r.label, r.features, maxIterations: 2, - onFit: p => pred = p, advancedSettings: s => s.NumThreads = 1))); + .Append(r => (r.label, score: ctx.Trainers.Sdca(r.label, r.features, maxIterations: 2, onFit: p => pred = p))); var pipe = reader.Append(est); @@ -75,7 +74,7 @@ public void SdcaRegression() [Fact] public void SdcaRegressionNameCollision() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new RegressionContext(env); @@ -86,7 +85,7 @@ public void SdcaRegressionNameCollision() separator: ';', hasHeader: true); var est = reader.MakeNewEstimator() - .Append(r => (r.label, r.Score, score: ctx.Trainers.Sdca(r.label, r.features, maxIterations: 2, advancedSettings: s => s.NumThreads = 1))); + .Append(r => (r.label, r.Score, score: ctx.Trainers.Sdca(r.label, r.features, maxIterations: 2))); var pipe = reader.Append(est); @@ -105,7 +104,7 @@ public void SdcaRegressionNameCollision() [Fact] public void SdcaBinaryClassification() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -119,8 +118,7 @@ public void SdcaBinaryClassification() var est = reader.MakeNewEstimator() .Append(r => (r.label, preds: ctx.Trainers.Sdca(r.label, r.features, maxIterations: 2, - onFit: (p, c) => { pred = p; cali = c; }, - advancedSettings: s => s.NumThreads = 1))); + onFit: (p, c) => { pred = p; cali = c; }))); var pipe = reader.Append(est); @@ -151,7 +149,7 @@ public void SdcaBinaryClassification() [Fact] public void SdcaBinaryClassificationNoCalibration() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -167,8 +165,7 @@ public void SdcaBinaryClassificationNoCalibration() var est = reader.MakeNewEstimator() .Append(r => (r.label, preds: ctx.Trainers.Sdca(r.label, r.features, maxIterations: 2, - loss: loss, onFit: p => pred = p, - advancedSettings: s => s.NumThreads = 1))); + loss: loss, onFit: p => pred = p))); var pipe = reader.Append(est); @@ -195,7 +192,7 @@ public void SdcaBinaryClassificationNoCalibration() [Fact] public void AveragePerceptronNoCalibration() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -231,7 +228,7 @@ public void AveragePerceptronNoCalibration() [Fact] public void FfmBinaryClassification() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -263,7 +260,7 @@ public void FfmBinaryClassification() [Fact] public void SdcaMulticlass() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.iris.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -313,7 +310,7 @@ public void SdcaMulticlass() [Fact] public void CrossValidate() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.iris.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -337,7 +334,7 @@ public void CrossValidate() [Fact] public void FastTreeBinaryClassification() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -376,7 +373,7 @@ public void FastTreeBinaryClassification() [Fact] public void FastTreeRegression() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -418,7 +415,7 @@ public void FastTreeRegression() [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // LightGBM is 64-bit only public void LightGbmBinaryClassification() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -458,7 +455,7 @@ public void LightGbmBinaryClassification() [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // LightGBM is 64-bit only public void LightGbmRegression() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -500,7 +497,7 @@ public void LightGbmRegression() [Fact] public void PoissonRegression() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -516,8 +513,7 @@ public void PoissonRegression() .Append(r => (r.label, score: ctx.Trainers.PoissonRegression(r.label, r.features, l1Weight: 2, enoforceNoNegativity: true, - onFit: (p) => { pred = p; }, - advancedSettings: s => s.NumThreads = 1))); + onFit: (p) => { pred = p; }))); var pipe = reader.Append(est); @@ -543,7 +539,7 @@ public void PoissonRegression() [Fact] public void LogisticRegressionBinaryClassification() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -556,8 +552,7 @@ public void LogisticRegressionBinaryClassification() var est = reader.MakeNewEstimator() .Append(r => (r.label, preds: ctx.Trainers.LogisticRegressionBinaryClassifier(r.label, r.features, l1Weight: 10, - onFit: (p) => { pred = p; }, - advancedSettings: s => s.NumThreads = 1))); + onFit: (p) => { pred = p; }))); var pipe = reader.Append(est); @@ -582,7 +577,7 @@ public void LogisticRegressionBinaryClassification() [Fact] public void MulticlassLogisticRegression() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.iris.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -597,8 +592,7 @@ public void MulticlassLogisticRegression() .Append(r => (label: r.label.ToKey(), r.features)) .Append(r => (r.label, preds: ctx.Trainers.MultiClassLogisticRegression( r.label, - r.features, onFit: p => pred = p, - advancedSettings: s => s.NumThreads = 1))); + r.features, onFit: p => pred = p))); var pipe = reader.Append(est); @@ -626,7 +620,7 @@ public void MulticlassLogisticRegression() [Fact] public void OnlineGradientDescent() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -669,10 +663,11 @@ public void OnlineGradientDescent() [Fact] public void KMeans() { - var env = new MLContext(seed: 0, conc: 1); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.iris.trainFilename); var dataSource = new MultiFileSource(dataPath); + var ctx = new ClusteringContext(env); var reader = TextLoader.CreateReader(env, c => (label: c.LoadText(0), features: c.LoadFloat(1, 4))); @@ -680,7 +675,7 @@ public void KMeans() var est = reader.MakeNewEstimator() .Append(r => (label: r.label.ToKey(), r.features)) - .Append(r => (r.label, r.features, preds: env.Clustering.Trainers.KMeans(r.features, clustersCount: 3, onFit: p => pred = p, advancedSettings: s => s.NumThreads = 1))); + .Append(r => (r.label, r.features, preds: ctx.Trainers.KMeans(r.features, clustersCount: 3, onFit: p => pred = p))); var pipe = reader.Append(est); @@ -696,23 +691,23 @@ public void KMeans() var data = model.Read(dataSource); - var metrics = env.Clustering.Evaluate(data, r => r.preds.score, r => r.label, r => r.features); + var metrics = ctx.Evaluate(data, r => r.preds.score, r => r.label, r => r.features); Assert.NotNull(metrics); Assert.InRange(metrics.AvgMinScore, 0.5262, 0.5264); Assert.InRange(metrics.Nmi, 0.73, 0.77); Assert.InRange(metrics.Dbi, 0.662, 0.667); - metrics = env.Clustering.Evaluate(data, r => r.preds.score, label: r => r.label); + metrics = ctx.Evaluate(data, r => r.preds.score, label: r => r.label); Assert.NotNull(metrics); Assert.InRange(metrics.AvgMinScore, 0.5262, 0.5264); Assert.True(metrics.Dbi == 0.0); - metrics = env.Clustering.Evaluate(data, r => r.preds.score, features: r => r.features); + metrics = ctx.Evaluate(data, r => r.preds.score, features: r => r.features); Assert.True(double.IsNaN(metrics.Nmi)); - metrics = env.Clustering.Evaluate(data, r => r.preds.score); + metrics = ctx.Evaluate(data, r => r.preds.score); Assert.NotNull(metrics); Assert.InRange(metrics.AvgMinScore, 0.5262, 0.5264); Assert.True(double.IsNaN(metrics.Nmi)); @@ -723,7 +718,7 @@ public void KMeans() [Fact] public void FastTreeRanking() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.adultRanking.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -764,7 +759,7 @@ public void FastTreeRanking() [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // LightGBM is 64-bit only public void LightGBMRanking() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.adultRanking.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -805,7 +800,7 @@ public void LightGBMRanking() [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // LightGBM is 64-bit only public void MultiClassLightGBM() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.iris.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -843,7 +838,7 @@ public void MultiClassLightGBM() [Fact] public void MultiClassNaiveBayesTrainer() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.iris.trainFilename); var dataSource = new MultiFileSource(dataPath); @@ -888,7 +883,7 @@ public void MultiClassNaiveBayesTrainer() [Fact] public void HogwildSGDBinaryClassification() { - var env = new MLContext(seed: 0); + var env = new ConsoleEnvironment(seed: 0); var dataPath = GetDataPath(TestDatasets.breastCancer.trainFilename); var dataSource = new MultiFileSource(dataPath); var ctx = new BinaryClassificationContext(env); @@ -901,8 +896,7 @@ public void HogwildSGDBinaryClassification() var est = reader.MakeNewEstimator() .Append(r => (r.label, preds: ctx.Trainers.StochasticGradientDescentClassificationTrainer(r.label, r.features, l2Weight: 0, - onFit: (p) => { pred = p; }, - advancedSettings: s => s.NumThreads = 1))); + onFit: (p) => { pred = p; }))); var pipe = reader.Append(est); diff --git a/test/Microsoft.ML.Sweeper.Tests/SweeperTest.cs b/test/Microsoft.ML.Sweeper.Tests/SweeperTest.cs index 1cd0065703..2f19a5c4f3 100644 --- a/test/Microsoft.ML.Sweeper.Tests/SweeperTest.cs +++ b/test/Microsoft.ML.Sweeper.Tests/SweeperTest.cs @@ -20,16 +20,19 @@ public void UniformRandomSweeperReturnsDistinctValuesWhenProposeSweep() { DiscreteValueGenerator valueGenerator = CreateDiscreteValueGenerator(); - var env = new MLContext(42); - var sweeper = new UniformRandomSweeper(env, + using (var writer = new StreamWriter(new MemoryStream())) + using (var env = new ConsoleEnvironment(42, outWriter: writer, errWriter: writer)) + { + var sweeper = new UniformRandomSweeper(env, new SweeperBase.ArgumentsBase(), new[] { valueGenerator }); - var results = sweeper.ProposeSweeps(3); - Assert.NotNull(results); + var results = sweeper.ProposeSweeps(3); + Assert.NotNull(results); - int length = results.Length; - Assert.Equal(2, length); + int length = results.Length; + Assert.Equal(2, length); + } } [Fact] @@ -37,16 +40,19 @@ public void RandomGridSweeperReturnsDistinctValuesWhenProposeSweep() { DiscreteValueGenerator valueGenerator = CreateDiscreteValueGenerator(); - var env = new MLContext(42); - var sweeper = new RandomGridSweeper(env, - new RandomGridSweeper.Arguments(), - new[] { valueGenerator }); + using (var writer = new StreamWriter(new MemoryStream())) + using (var env = new ConsoleEnvironment(42, outWriter: writer, errWriter: writer)) + { + var sweeper = new RandomGridSweeper(env, + new RandomGridSweeper.Arguments(), + new[] { valueGenerator }); - var results = sweeper.ProposeSweeps(3); - Assert.NotNull(results); + var results = sweeper.ProposeSweeps(3); + Assert.NotNull(results); - int length = results.Length; - Assert.Equal(2, length); + int length = results.Length; + Assert.Equal(2, length); + } } private static DiscreteValueGenerator CreateDiscreteValueGenerator() diff --git a/test/Microsoft.ML.Sweeper.Tests/TestSweeper.cs b/test/Microsoft.ML.Sweeper.Tests/TestSweeper.cs index 0718a7edde..9aa18dc30a 100644 --- a/test/Microsoft.ML.Sweeper.Tests/TestSweeper.cs +++ b/test/Microsoft.ML.Sweeper.Tests/TestSweeper.cs @@ -94,37 +94,39 @@ public void TestDiscreteValueSweep(double normalizedValue, string expected) [Fact] public void TestRandomSweeper() { - var env = new MLContext(42); - var args = new SweeperBase.ArgumentsBase() + using (var env = new ConsoleEnvironment(42)) { - SweptParameters = new[] { + var args = new SweeperBase.ArgumentsBase() + { + SweptParameters = new[] { ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "foo", Min = 10, Max = 20 })), ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 100, Max = 200 })) } - }; + }; - var sweeper = new UniformRandomSweeper(env, args); - var initialList = sweeper.ProposeSweeps(5, new List()); - Assert.Equal(5, initialList.Length); - foreach (var parameterSet in initialList) - { - foreach (var parameterValue in parameterSet) + var sweeper = new UniformRandomSweeper(env, args); + var initialList = sweeper.ProposeSweeps(5, new List()); + Assert.Equal(5, initialList.Length); + foreach (var parameterSet in initialList) { - if (parameterValue.Name == "foo") - { - var val = long.Parse(parameterValue.ValueText); - Assert.InRange(val, 10, 20); - } - else if (parameterValue.Name == "bar") - { - var val = long.Parse(parameterValue.ValueText); - Assert.InRange(val, 100, 200); - } - else + foreach (var parameterValue in parameterSet) { - Assert.True(false, "Wrong parameter"); + if (parameterValue.Name == "foo") + { + var val = long.Parse(parameterValue.ValueText); + Assert.InRange(val, 10, 20); + } + else if (parameterValue.Name == "bar") + { + var val = long.Parse(parameterValue.ValueText); + Assert.InRange(val, 100, 200); + } + else + { + Assert.True(false, "Wrong parameter"); + } } } } @@ -134,273 +136,282 @@ public void TestRandomSweeper() public void TestSimpleSweeperAsync() { var random = new Random(42); - var env = new MLContext(42); - const int sweeps = 100; - var sweeper = new SimpleAsyncSweeper(env, new SweeperBase.ArgumentsBase + using (var env = new ConsoleEnvironment(42)) { - SweptParameters = new IComponentFactory[] { + int sweeps = 100; + var sweeper = new SimpleAsyncSweeper(env, new SweeperBase.ArgumentsBase + { + SweptParameters = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( environ => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5 })), ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 1000, LogBase = true })) } - }); + }); - var paramSets = new List(); - for (int i = 0; i < sweeps; i++) - { - var task = sweeper.Propose(); - Assert.True(task.IsCompleted); - paramSets.Add(task.Result.ParameterSet); - var result = new RunResult(task.Result.ParameterSet, random.NextDouble(), true); - sweeper.Update(task.Result.Id, result); - } - Assert.Equal(sweeps, paramSets.Count); - CheckAsyncSweeperResult(paramSets); + var paramSets = new List(); + for (int i = 0; i < sweeps; i++) + { + var task = sweeper.Propose(); + Assert.True(task.IsCompleted); + paramSets.Add(task.Result.ParameterSet); + var result = new RunResult(task.Result.ParameterSet, random.NextDouble(), true); + sweeper.Update(task.Result.Id, result); + } + Assert.Equal(sweeps, paramSets.Count); + CheckAsyncSweeperResult(paramSets); - // Test consumption without ever calling Update. - var gridArgs = new RandomGridSweeper.Arguments(); - gridArgs.SweptParameters = new IComponentFactory[] { + // Test consumption without ever calling Update. + var gridArgs = new RandomGridSweeper.Arguments(); + gridArgs.SweptParameters = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( environ => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 100, LogBase = true })) }; - var gridSweeper = new SimpleAsyncSweeper(env, gridArgs); - paramSets.Clear(); - for (int i = 0; i < sweeps; i++) - { - var task = gridSweeper.Propose(); - Assert.True(task.IsCompleted); - paramSets.Add(task.Result.ParameterSet); + var gridSweeper = new SimpleAsyncSweeper(env, gridArgs); + paramSets.Clear(); + for (int i = 0; i < sweeps; i++) + { + var task = gridSweeper.Propose(); + Assert.True(task.IsCompleted); + paramSets.Add(task.Result.ParameterSet); + } + Assert.Equal(sweeps, paramSets.Count); + CheckAsyncSweeperResult(paramSets); } - Assert.Equal(sweeps, paramSets.Count); - CheckAsyncSweeperResult(paramSets); } [Fact] public void TestDeterministicSweeperAsyncCancellation() { var random = new Random(42); - var env = new MLContext(42); - var args = new DeterministicSweeperAsync.Arguments(); - args.BatchSize = 5; - args.Relaxation = 1; - - args.Sweeper = ComponentFactoryUtils.CreateFromFunction( - environ => new KdoSweeper(environ, - new KdoSweeper.Arguments() - { - SweptParameters = new IComponentFactory[] { + using (var env = new ConsoleEnvironment(42)) + { + var args = new DeterministicSweeperAsync.Arguments(); + args.BatchSize = 5; + args.Relaxation = 1; + + args.Sweeper = ComponentFactoryUtils.CreateFromFunction( + environ => new KdoSweeper(environ, + new KdoSweeper.Arguments() + { + SweptParameters = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( t => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( t => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 1000, LogBase = true })) - } - })); + } + })); - var sweeper = new DeterministicSweeperAsync(env, args); + var sweeper = new DeterministicSweeperAsync(env, args); - int sweeps = 20; - var tasks = new List>(); - int numCompleted = 0; - for (int i = 0; i < sweeps; i++) - { - var task = sweeper.Propose(); - if (i < args.BatchSize - args.Relaxation) + int sweeps = 20; + var tasks = new List>(); + int numCompleted = 0; + for (int i = 0; i < sweeps; i++) { - Assert.True(task.IsCompleted); - sweeper.Update(task.Result.Id, new RunResult(task.Result.ParameterSet, random.NextDouble(), true)); - numCompleted++; + var task = sweeper.Propose(); + if (i < args.BatchSize - args.Relaxation) + { + Assert.True(task.IsCompleted); + sweeper.Update(task.Result.Id, new RunResult(task.Result.ParameterSet, random.NextDouble(), true)); + numCompleted++; + } + else + tasks.Add(task); } - else - tasks.Add(task); - } - // Cancel after the first barrier and check if the number of registered actions - // is indeed 2 * batchSize. - sweeper.Cancel(); - Task.WaitAll(tasks.ToArray()); - foreach (var task in tasks) - { - if (task.Result != null) - numCompleted++; + // Cancel after the first barrier and check if the number of registered actions + // is indeed 2 * batchSize. + sweeper.Cancel(); + Task.WaitAll(tasks.ToArray()); + foreach (var task in tasks) + { + if (task.Result != null) + numCompleted++; + } + Assert.Equal(args.BatchSize + args.BatchSize, numCompleted); } - Assert.Equal(args.BatchSize + args.BatchSize, numCompleted); } [Fact] public void TestDeterministicSweeperAsync() { var random = new Random(42); - var env = new MLContext(42); - var args = new DeterministicSweeperAsync.Arguments(); - args.BatchSize = 5; - args.Relaxation = args.BatchSize - 1; - - args.Sweeper = ComponentFactoryUtils.CreateFromFunction( - environ => new SmacSweeper(environ, - new SmacSweeper.Arguments() - { - SweptParameters = new IComponentFactory[] { + using (var env = new ConsoleEnvironment(42)) + { + var args = new DeterministicSweeperAsync.Arguments(); + args.BatchSize = 5; + args.Relaxation = args.BatchSize - 1; + + args.Sweeper = ComponentFactoryUtils.CreateFromFunction( + environ => new SmacSweeper(environ, + new SmacSweeper.Arguments() + { + SweptParameters = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( t => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( t => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 1000, LogBase = true })) - } - })); + } + })); - var sweeper = new DeterministicSweeperAsync(env, args); + var sweeper = new DeterministicSweeperAsync(env, args); - // Test single-threaded consumption. - int sweeps = 10; - var paramSets = new List(); - for (int i = 0; i < sweeps; i++) - { - var task = sweeper.Propose(); - Assert.True(task.IsCompleted); - paramSets.Add(task.Result.ParameterSet); - var result = new RunResult(task.Result.ParameterSet, random.NextDouble(), true); - sweeper.Update(task.Result.Id, result); - } - Assert.Equal(sweeps, paramSets.Count); - CheckAsyncSweeperResult(paramSets); - - // Create two batches and test if the 2nd batch is executed after the synchronization barrier is reached. - object mlock = new object(); - var tasks = new Task[sweeps]; - args.Relaxation = args.Relaxation - 1; - sweeper = new DeterministicSweeperAsync(env, args); - paramSets.Clear(); - var results = new List>(); - for (int i = 0; i < args.BatchSize; i++) - { - var task = sweeper.Propose(); - Assert.True(task.IsCompleted); - tasks[i] = task; - if (task.Result == null) - continue; - results.Add(new KeyValuePair(task.Result.Id, new RunResult(task.Result.ParameterSet, 0.42, true))); - } - // Register consumers for the 2nd batch. Those consumers will await until at least one run - // in the previous batch has been posted to the sweeper. - for (int i = args.BatchSize; i < 2 * args.BatchSize; i++) - { - var task = sweeper.Propose(); - Assert.False(task.IsCompleted); - tasks[i] = task; - } - // Call update to unblock the 2nd batch. - foreach (var run in results) - sweeper.Update(run.Key, run.Value); + // Test single-threaded consumption. + int sweeps = 10; + var paramSets = new List(); + for (int i = 0; i < sweeps; i++) + { + var task = sweeper.Propose(); + Assert.True(task.IsCompleted); + paramSets.Add(task.Result.ParameterSet); + var result = new RunResult(task.Result.ParameterSet, random.NextDouble(), true); + sweeper.Update(task.Result.Id, result); + } + Assert.Equal(sweeps, paramSets.Count); + CheckAsyncSweeperResult(paramSets); + + // Create two batches and test if the 2nd batch is executed after the synchronization barrier is reached. + object mlock = new object(); + var tasks = new Task[sweeps]; + args.Relaxation = args.Relaxation - 1; + sweeper = new DeterministicSweeperAsync(env, args); + paramSets.Clear(); + var results = new List>(); + for (int i = 0; i < args.BatchSize; i++) + { + var task = sweeper.Propose(); + Assert.True(task.IsCompleted); + tasks[i] = task; + if (task.Result == null) + continue; + results.Add(new KeyValuePair(task.Result.Id, new RunResult(task.Result.ParameterSet, 0.42, true))); + } + // Register consumers for the 2nd batch. Those consumers will await until at least one run + // in the previous batch has been posted to the sweeper. + for (int i = args.BatchSize; i < 2 * args.BatchSize; i++) + { + var task = sweeper.Propose(); + Assert.False(task.IsCompleted); + tasks[i] = task; + } + // Call update to unblock the 2nd batch. + foreach (var run in results) + sweeper.Update(run.Key, run.Value); - Task.WaitAll(tasks); - tasks.All(t => t.IsCompleted); + Task.WaitAll(tasks); + tasks.All(t => t.IsCompleted); + } } [Fact] public void TestDeterministicSweeperAsyncParallel() { var random = new Random(42); - var env = new MLContext(42); - const int batchSize = 5; - const int sweeps = 20; - var paramSets = new List(); - var args = new DeterministicSweeperAsync.Arguments(); - args.BatchSize = batchSize; - args.Relaxation = batchSize - 2; - - args.Sweeper = ComponentFactoryUtils.CreateFromFunction( - environ => new SmacSweeper(environ, - new SmacSweeper.Arguments() - { - SweptParameters = new IComponentFactory[] { + using (var env = new ConsoleEnvironment(42)) + { + int batchSize = 5; + int sweeps = 20; + var paramSets = new List(); + var args = new DeterministicSweeperAsync.Arguments(); + args.BatchSize = batchSize; + args.Relaxation = batchSize - 2; + + args.Sweeper = ComponentFactoryUtils.CreateFromFunction( + environ => new SmacSweeper(environ, + new SmacSweeper.Arguments() + { + SweptParameters = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( t => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( t => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 1000, LogBase = true })) - } - })); + } + })); - var sweeper = new DeterministicSweeperAsync(env, args); + var sweeper = new DeterministicSweeperAsync(env, args); - var mlock = new object(); - var options = new ParallelOptions(); - options.MaxDegreeOfParallelism = 4; + var mlock = new object(); + var options = new ParallelOptions(); + options.MaxDegreeOfParallelism = 4; - // Sleep randomly to simulate doing work. - int[] sleeps = new int[sweeps]; - for (int i = 0; i < sleeps.Length; i++) - sleeps[i] = random.Next(10, 100); - var r = Parallel.For(0, sweeps, options, (int i) => - { - var task = sweeper.Propose(); - task.Wait(); - Assert.Equal(TaskStatus.RanToCompletion, task.Status); - var paramWithId = task.Result; - if (paramWithId == null) - return; - Thread.Sleep(sleeps[i]); - var result = new RunResult(paramWithId.ParameterSet, 0.42, true); - sweeper.Update(paramWithId.Id, result); - lock (mlock) - paramSets.Add(paramWithId.ParameterSet); - }); - Assert.True(paramSets.Count <= sweeps); - CheckAsyncSweeperResult(paramSets); + // Sleep randomly to simulate doing work. + int[] sleeps = new int[sweeps]; + for (int i = 0; i < sleeps.Length; i++) + sleeps[i] = random.Next(10, 100); + var r = Parallel.For(0, sweeps, options, (int i) => + { + var task = sweeper.Propose(); + task.Wait(); + Assert.Equal(TaskStatus.RanToCompletion, task.Status); + var paramWithId = task.Result; + if (paramWithId == null) + return; + Thread.Sleep(sleeps[i]); + var result = new RunResult(paramWithId.ParameterSet, 0.42, true); + sweeper.Update(paramWithId.Id, result); + lock (mlock) + paramSets.Add(paramWithId.ParameterSet); + }); + Assert.True(paramSets.Count <= sweeps); + CheckAsyncSweeperResult(paramSets); + } } [Fact] public async Task TestNelderMeadSweeperAsync() { var random = new Random(42); - var env = new MLContext(42); - const int batchSize = 5; - const int sweeps = 40; - var paramSets = new List(); - var args = new DeterministicSweeperAsync.Arguments(); - args.BatchSize = batchSize; - args.Relaxation = 0; - - args.Sweeper = ComponentFactoryUtils.CreateFromFunction( - environ => - { - var param = new IComponentFactory[] { + using (var env = new ConsoleEnvironment(42)) + { + int batchSize = 5; + int sweeps = 40; + var paramSets = new List(); + var args = new DeterministicSweeperAsync.Arguments(); + args.BatchSize = batchSize; + args.Relaxation = 0; + + args.Sweeper = ComponentFactoryUtils.CreateFromFunction( + environ => { + var param = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( innerEnviron => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( innerEnviron => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 1000, LogBase = true })) - }; + }; - var nelderMeadSweeperArgs = new NelderMeadSweeper.Arguments() - { - SweptParameters = param, - FirstBatchSweeper = ComponentFactoryUtils.CreateFromFunction( - (firstBatchSweeperEnviron, firstBatchSweeperArgs) => - new RandomGridSweeper(environ, new RandomGridSweeper.Arguments() { SweptParameters = param })) - }; + var nelderMeadSweeperArgs = new NelderMeadSweeper.Arguments() + { + SweptParameters = param, + FirstBatchSweeper = ComponentFactoryUtils.CreateFromFunction( + (firstBatchSweeperEnviron, firstBatchSweeperArgs) => + new RandomGridSweeper(environ, new RandomGridSweeper.Arguments() { SweptParameters = param })) + }; - return new NelderMeadSweeper(environ, nelderMeadSweeperArgs); - } - ); + return new NelderMeadSweeper(environ, nelderMeadSweeperArgs); + } + ); - var sweeper = new DeterministicSweeperAsync(env, args); - var mlock = new object(); - double[] metrics = new double[sweeps]; - for (int i = 0; i < metrics.Length; i++) - metrics[i] = random.NextDouble(); + var sweeper = new DeterministicSweeperAsync(env, args); + var mlock = new object(); + double[] metrics = new double[sweeps]; + for (int i = 0; i < metrics.Length; i++) + metrics[i] = random.NextDouble(); - for (int i = 0; i < sweeps; i++) - { - var paramWithId = await sweeper.Propose(); - if (paramWithId == null) - return; - var result = new RunResult(paramWithId.ParameterSet, metrics[i], true); - sweeper.Update(paramWithId.Id, result); - lock (mlock) - paramSets.Add(paramWithId.ParameterSet); + for (int i = 0; i < sweeps; i++) + { + var paramWithId = await sweeper.Propose(); + if (paramWithId == null) + return; + var result = new RunResult(paramWithId.ParameterSet, metrics[i], true); + sweeper.Update(paramWithId.Id, result); + lock (mlock) + paramSets.Add(paramWithId.ParameterSet); + } + Assert.True(paramSets.Count <= sweeps); + CheckAsyncSweeperResult(paramSets); } - Assert.True(paramSets.Count <= sweeps); - CheckAsyncSweeperResult(paramSets); } private void CheckAsyncSweeperResult(List paramSets) @@ -431,266 +442,275 @@ private void CheckAsyncSweeperResult(List paramSets) [Fact] public void TestRandomGridSweeper() { - var env = new MLContext(42); - var args = new RandomGridSweeper.Arguments() + using (var env = new ConsoleEnvironment(42)) { - SweptParameters = new[] { + var args = new RandomGridSweeper.Arguments() + { + SweptParameters = new[] { ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "foo", Min = 10, Max = 20, NumSteps = 3 })), ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 100, Max = 10000, LogBase = true, StepSize = 10 })) } - }; - var sweeper = new RandomGridSweeper(env, args); - var initialList = sweeper.ProposeSweeps(5, new List()); - Assert.Equal(5, initialList.Length); - var gridPoint = new bool[3][] { + }; + var sweeper = new RandomGridSweeper(env, args); + var initialList = sweeper.ProposeSweeps(5, new List()); + Assert.Equal(5, initialList.Length); + var gridPoint = new bool[3][] { new bool[3], new bool[3], new bool[3] }; - int i = 0; - int j = 0; - foreach (var parameterSet in initialList) - { - foreach (var parameterValue in parameterSet) + int i = 0; + int j = 0; + foreach (var parameterSet in initialList) { - if (parameterValue.Name == "foo") - { - var val = long.Parse(parameterValue.ValueText); - Assert.True(val == 10 || val == 15 || val == 20); - i = (val == 10) ? 0 : (val == 15) ? 1 : 2; - } - else if (parameterValue.Name == "bar") - { - var val = long.Parse(parameterValue.ValueText); - Assert.True(val == 100 || val == 1000 || val == 10000); - j = (val == 100) ? 0 : (val == 1000) ? 1 : 2; - } - else + foreach (var parameterValue in parameterSet) { - Assert.True(false, "Wrong parameter"); + if (parameterValue.Name == "foo") + { + var val = long.Parse(parameterValue.ValueText); + Assert.True(val == 10 || val == 15 || val == 20); + i = (val == 10) ? 0 : (val == 15) ? 1 : 2; + } + else if (parameterValue.Name == "bar") + { + var val = long.Parse(parameterValue.ValueText); + Assert.True(val == 100 || val == 1000 || val == 10000); + j = (val == 100) ? 0 : (val == 1000) ? 1 : 2; + } + else + { + Assert.True(false, "Wrong parameter"); + } } + Assert.False(gridPoint[i][j]); + gridPoint[i][j] = true; } - Assert.False(gridPoint[i][j]); - gridPoint[i][j] = true; - } - var nextList = sweeper.ProposeSweeps(5, initialList.Select(p => new RunResult(p))); - Assert.Equal(4, nextList.Length); - foreach (var parameterSet in nextList) - { - foreach (var parameterValue in parameterSet) + var nextList = sweeper.ProposeSweeps(5, initialList.Select(p => new RunResult(p))); + Assert.Equal(4, nextList.Length); + foreach (var parameterSet in nextList) { - if (parameterValue.Name == "foo") - { - var val = long.Parse(parameterValue.ValueText); - Assert.True(val == 10 || val == 15 || val == 20); - i = (val == 10) ? 0 : (val == 15) ? 1 : 2; - } - else if (parameterValue.Name == "bar") - { - var val = long.Parse(parameterValue.ValueText); - Assert.True(val == 100 || val == 1000 || val == 10000); - j = (val == 100) ? 0 : (val == 1000) ? 1 : 2; - } - else + foreach (var parameterValue in parameterSet) { - Assert.True(false, "Wrong parameter"); + if (parameterValue.Name == "foo") + { + var val = long.Parse(parameterValue.ValueText); + Assert.True(val == 10 || val == 15 || val == 20); + i = (val == 10) ? 0 : (val == 15) ? 1 : 2; + } + else if (parameterValue.Name == "bar") + { + var val = long.Parse(parameterValue.ValueText); + Assert.True(val == 100 || val == 1000 || val == 10000); + j = (val == 100) ? 0 : (val == 1000) ? 1 : 2; + } + else + { + Assert.True(false, "Wrong parameter"); + } } + Assert.False(gridPoint[i][j]); + gridPoint[i][j] = true; } - Assert.False(gridPoint[i][j]); - gridPoint[i][j] = true; - } - gridPoint = new bool[3][] { + gridPoint = new bool[3][] { new bool[3], new bool[3], new bool[3] }; - var lastList = sweeper.ProposeSweeps(10, null); - Assert.Equal(9, lastList.Length); - foreach (var parameterSet in lastList) - { - foreach (var parameterValue in parameterSet) + var lastList = sweeper.ProposeSweeps(10, null); + Assert.Equal(9, lastList.Length); + foreach (var parameterSet in lastList) { - if (parameterValue.Name == "foo") - { - var val = long.Parse(parameterValue.ValueText); - Assert.True(val == 10 || val == 15 || val == 20); - i = (val == 10) ? 0 : (val == 15) ? 1 : 2; - } - else if (parameterValue.Name == "bar") - { - var val = long.Parse(parameterValue.ValueText); - Assert.True(val == 100 || val == 1000 || val == 10000); - j = (val == 100) ? 0 : (val == 1000) ? 1 : 2; - } - else + foreach (var parameterValue in parameterSet) { - Assert.True(false, "Wrong parameter"); + if (parameterValue.Name == "foo") + { + var val = long.Parse(parameterValue.ValueText); + Assert.True(val == 10 || val == 15 || val == 20); + i = (val == 10) ? 0 : (val == 15) ? 1 : 2; + } + else if (parameterValue.Name == "bar") + { + var val = long.Parse(parameterValue.ValueText); + Assert.True(val == 100 || val == 1000 || val == 10000); + j = (val == 100) ? 0 : (val == 1000) ? 1 : 2; + } + else + { + Assert.True(false, "Wrong parameter"); + } } + Assert.False(gridPoint[i][j]); + gridPoint[i][j] = true; } - Assert.False(gridPoint[i][j]); - gridPoint[i][j] = true; + Assert.True(gridPoint.All(bArray => bArray.All(b => b))); } - Assert.True(gridPoint.All(bArray => bArray.All(b => b))); } [Fact] public void TestNelderMeadSweeper() { var random = new Random(42); - var env = new MLContext(42); - var param = new IComponentFactory[] { + using (var env = new ConsoleEnvironment(42)) + { + var param = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( environ => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 1000, LogBase = true })) }; - var args = new NelderMeadSweeper.Arguments() - { - SweptParameters = param, - FirstBatchSweeper = ComponentFactoryUtils.CreateFromFunction( - (environ, firstBatchArgs) => - { - return new RandomGridSweeper(environ, new RandomGridSweeper.Arguments() { SweptParameters = param }); - } - ) - }; - var sweeper = new NelderMeadSweeper(env, args); - var sweeps = sweeper.ProposeSweeps(5, new List()); - Assert.Equal(3, sweeps.Length); - - var results = new List(); - for (int i = 1; i < 10; i++) - { - foreach (var parameterSet in sweeps) + var args = new NelderMeadSweeper.Arguments() { - foreach (var parameterValue in parameterSet) - { - if (parameterValue.Name == "foo") - { - var val = float.Parse(parameterValue.ValueText, CultureInfo.InvariantCulture); - Assert.InRange(val, 1, 5); + SweptParameters = param, + FirstBatchSweeper = ComponentFactoryUtils.CreateFromFunction( + (environ, firstBatchArgs) => { + return new RandomGridSweeper(environ, new RandomGridSweeper.Arguments() { SweptParameters = param }); } - else if (parameterValue.Name == "bar") - { - var val = long.Parse(parameterValue.ValueText); - Assert.InRange(val, 1, 1000); - } - else + ) + }; + var sweeper = new NelderMeadSweeper(env, args); + var sweeps = sweeper.ProposeSweeps(5, new List()); + Assert.Equal(3, sweeps.Length); + + var results = new List(); + for (int i = 1; i < 10; i++) + { + foreach (var parameterSet in sweeps) + { + foreach (var parameterValue in parameterSet) { - Assert.True(false, "Wrong parameter"); + if (parameterValue.Name == "foo") + { + var val = float.Parse(parameterValue.ValueText, CultureInfo.InvariantCulture); + Assert.InRange(val, 1, 5); + } + else if (parameterValue.Name == "bar") + { + var val = long.Parse(parameterValue.ValueText); + Assert.InRange(val, 1, 1000); + } + else + { + Assert.True(false, "Wrong parameter"); + } } + results.Add(new RunResult(parameterSet, random.NextDouble(), true)); } - results.Add(new RunResult(parameterSet, random.NextDouble(), true)); - } - sweeps = sweeper.ProposeSweeps(5, results); + sweeps = sweeper.ProposeSweeps(5, results); + } + Assert.True(sweeps.Length <= 5); } - Assert.True(sweeps.Length <= 5); } [Fact] public void TestNelderMeadSweeperWithDefaultFirstBatchSweeper() { var random = new Random(42); - var env = new MLContext(42); - var param = new IComponentFactory[] { + using (var env = new ConsoleEnvironment(42)) + { + var param = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( environ => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 1000, LogBase = true })) }; - var args = new NelderMeadSweeper.Arguments(); - args.SweptParameters = param; - var sweeper = new NelderMeadSweeper(env, args); - var sweeps = sweeper.ProposeSweeps(5, new List()); - Assert.Equal(3, sweeps.Length); + var args = new NelderMeadSweeper.Arguments(); + args.SweptParameters = param; + var sweeper = new NelderMeadSweeper(env, args); + var sweeps = sweeper.ProposeSweeps(5, new List()); + Assert.Equal(3, sweeps.Length); - var results = new List(); - for (int i = 1; i < 10; i++) - { - foreach (var parameterSet in sweeps) + var results = new List(); + for (int i = 1; i < 10; i++) { - foreach (var parameterValue in parameterSet) + foreach (var parameterSet in sweeps) { - if (parameterValue.Name == "foo") - { - var val = float.Parse(parameterValue.ValueText, CultureInfo.InvariantCulture); - Assert.InRange(val, 1, 5); - } - else if (parameterValue.Name == "bar") + foreach (var parameterValue in parameterSet) { - var val = long.Parse(parameterValue.ValueText); - Assert.InRange(val, 1, 1000); - } - else - { - Assert.True(false, "Wrong parameter"); + if (parameterValue.Name == "foo") + { + var val = float.Parse(parameterValue.ValueText, CultureInfo.InvariantCulture); + Assert.InRange(val, 1, 5); + } + else if (parameterValue.Name == "bar") + { + var val = long.Parse(parameterValue.ValueText); + Assert.InRange(val, 1, 1000); + } + else + { + Assert.True(false, "Wrong parameter"); + } } + results.Add(new RunResult(parameterSet, random.NextDouble(), true)); } - results.Add(new RunResult(parameterSet, random.NextDouble(), true)); - } - sweeps = sweeper.ProposeSweeps(5, results); + sweeps = sweeper.ProposeSweeps(5, results); + } + Assert.True(Utils.Size(sweeps) <= 5); } - Assert.True(sweeps == null || sweeps.Length <= 5); } [Fact] public void TestSmacSweeper() { - var random = new Random(42); - var env = new MLContext(42); - const int maxInitSweeps = 5; - var args = new SmacSweeper.Arguments() + RunMTAThread(() => { - NumberInitialPopulation = 20, - SweptParameters = new IComponentFactory[] { + var random = new Random(42); + using (var env = new ConsoleEnvironment(42)) + { + int maxInitSweeps = 5; + var args = new SmacSweeper.Arguments() + { + NumberInitialPopulation = 20, + SweptParameters = new IComponentFactory[] { ComponentFactoryUtils.CreateFromFunction( environ => new FloatValueGenerator(new FloatParamArguments() { Name = "foo", Min = 1, Max = 5})), ComponentFactoryUtils.CreateFromFunction( environ => new LongValueGenerator(new LongParamArguments() { Name = "bar", Min = 1, Max = 100, LogBase = true })) } - }; + }; - var sweeper = new SmacSweeper(env, args); - var results = new List(); - var sweeps = sweeper.ProposeSweeps(maxInitSweeps, results); - Assert.Equal(Math.Min(args.NumberInitialPopulation, maxInitSweeps), sweeps.Length); + var sweeper = new SmacSweeper(env, args); + var results = new List(); + var sweeps = sweeper.ProposeSweeps(maxInitSweeps, results); + Assert.Equal(Math.Min(args.NumberInitialPopulation, maxInitSweeps), sweeps.Length); - for (int i = 1; i < 10; i++) - { - foreach (var parameterSet in sweeps) - { - foreach (var parameterValue in parameterSet) + for (int i = 1; i < 10; i++) { - if (parameterValue.Name == "foo") - { - var val = float.Parse(parameterValue.ValueText, CultureInfo.InvariantCulture); - Assert.InRange(val, 1, 5); - } - else if (parameterValue.Name == "bar") - { - var val = long.Parse(parameterValue.ValueText); - Assert.InRange(val, 1, 1000); - } - else + foreach (var parameterSet in sweeps) { - Assert.True(false, "Wrong parameter"); + foreach (var parameterValue in parameterSet) + { + if (parameterValue.Name == "foo") + { + var val = float.Parse(parameterValue.ValueText, CultureInfo.InvariantCulture); + Assert.InRange(val, 1, 5); + } + else if (parameterValue.Name == "bar") + { + var val = long.Parse(parameterValue.ValueText); + Assert.InRange(val, 1, 1000); + } + else + { + Assert.True(false, "Wrong parameter"); + } + } + results.Add(new RunResult(parameterSet, random.NextDouble(), true)); } + + sweeps = sweeper.ProposeSweeps(5, results); } - results.Add(new RunResult(parameterSet, random.NextDouble(), true)); + Assert.Equal(5, sweeps.Length); } - - sweeps = sweeper.ProposeSweeps(5, results); - } - // Because only unique configurations are considered, the number asked for may exceed the number actually returned. - Assert.True(sweeps.Length <= 5); + }); } } } diff --git a/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs b/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs index 0a1e7ada2f..614166c904 100644 --- a/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs +++ b/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs @@ -74,8 +74,7 @@ protected BaseTestBaseline(ITestOutputHelper output) : base(output) // The writer to write to test log files. protected StreamWriter LogWriter; - private protected ConsoleEnvironment _env; - protected IHostEnvironment Env => _env; + protected ConsoleEnvironment Env; protected MLContext ML; private bool _normal; private bool _passed; @@ -97,7 +96,7 @@ protected override void Initialize() string logPath = Path.Combine(logDir, FullTestName + LogSuffix); LogWriter = OpenWriter(logPath); _passed = true; - _env = new ConsoleEnvironment(42, outWriter: LogWriter, errWriter: LogWriter) + Env = new ConsoleEnvironment(42, outWriter: LogWriter, errWriter: LogWriter) .AddStandardComponents(); ML = new MLContext(42); } @@ -107,8 +106,9 @@ protected override void Initialize() // It is called as a first step in test clean up. protected override void Cleanup() { - _env?.Dispose(); - _env = null; + if (Env != null) + Env.Dispose(); + Env = null; Contracts.Assert(IsActive); Log("Test {0}: {1}: {2}", TestName, @@ -535,52 +535,41 @@ private bool MatchNumberWithTolerance(MatchCollection firstCollection, MatchColl double f1 = double.Parse(firstCollection[i].ToString()); double f2 = double.Parse(secondCollection[i].ToString()); - if (!CompareNumbersWithTolerance(f1, f2, i, digitsOfPrecision)) - { - return false; - } - } + // this follows the IEEE recommendations for how to compare floating point numbers + double allowedVariance = Math.Pow(10, -digitsOfPrecision); + double delta = Round(f1, digitsOfPrecision) - Round(f2, digitsOfPrecision); + // limitting to the digits we care about. + delta = Math.Round(delta, digitsOfPrecision); - return true; - } + bool inRange = delta > -allowedVariance && delta < allowedVariance; - public bool CompareNumbersWithTolerance(double expected, double actual, int? iterationOnCollection = null, int digitsOfPrecision = DigitsOfPrecision) - { - // this follows the IEEE recommendations for how to compare floating point numbers - double allowedVariance = Math.Pow(10, -digitsOfPrecision); - double delta = Round(expected, digitsOfPrecision) - Round(actual, digitsOfPrecision); - // limitting to the digits we care about. - delta = Math.Round(delta, digitsOfPrecision); - - bool inRange = delta > -allowedVariance && delta < allowedVariance; - - // for some cases, rounding up is not beneficial - // so checking on whether the difference is significant prior to rounding, and failing only then. - // example, for 5 digits of precision. - // F1 = 1.82844949 Rounds to 1.8284 - // F2 = 1.8284502 Rounds to 1.8285 - // would fail the inRange == true check, but would suceed the following, and we doconsider those two numbers - // (1.82844949 - 1.8284502) = -0.00000071 + // for some cases, rounding up is not beneficial + // so checking on whether the difference is significant prior to rounding, and failing only then. + // example, for 5 digits of precision. + // F1 = 1.82844949 Rounds to 1.8284 + // F2 = 1.8284502 Rounds to 1.8285 + // would fail the inRange == true check, but would suceed the following, and we doconsider those two numbers + // (1.82844949 - 1.8284502) = -0.00000071 - double delta2 = 0; - if (!inRange) - { - delta2 = Math.Round(expected - actual, digitsOfPrecision); - inRange = delta2 >= -allowedVariance && delta2 <= allowedVariance; - } - - if (!inRange) - { - var message = iterationOnCollection != null ? "" : $"Output and baseline mismatch at line {iterationOnCollection}." + Environment.NewLine; + double delta2 = 0; + if (!inRange) + { + delta2 = Math.Round(f1 - f2, digitsOfPrecision); + inRange = delta2 >= -allowedVariance && delta2 <= allowedVariance; + } - Fail(_allowMismatch, message + - $"Values to compare are {expected} and {actual}" + Environment.NewLine + + if (!inRange) + { + Fail(_allowMismatch, $"Output and baseline mismatch at line {i}." + Environment.NewLine + + $"Values to compare are {firstCollection[i]} and {secondCollection[i]}" + Environment.NewLine + $"\t AllowedVariance: {allowedVariance}" + Environment.NewLine + $"\t delta: {delta}" + Environment.NewLine + $"\t delta2: {delta2}" + Environment.NewLine); + return false; + } } - return inRange; + return true; } private static double Round(double value, int digitsOfPrecision) @@ -817,8 +806,11 @@ protected static StreamReader OpenReader(string path) /// protected static int MainForTest(string args) { - var env = new MLContext(); - return Maml.MainCore(env, args, false); + using (var env = new ConsoleEnvironment()) + { + int result = Maml.MainCore(env, args, false); + return result; + } } } diff --git a/test/Microsoft.ML.TestFramework/BaseTestPredictorsMaml.cs b/test/Microsoft.ML.TestFramework/BaseTestPredictorsMaml.cs index cf0303bc05..8eb4edb1b5 100644 --- a/test/Microsoft.ML.TestFramework/BaseTestPredictorsMaml.cs +++ b/test/Microsoft.ML.TestFramework/BaseTestPredictorsMaml.cs @@ -158,7 +158,7 @@ protected void Run(RunContext ctx, int digitsOfPrecision = DigitsOfPrecision) { // Not capturing into a specific log. Log("*** Start raw predictor output"); - res = MainForTest(_env, LogWriter, string.Join(" ", ctx.Command, runcmd), ctx.BaselineProgress); + res = MainForTest(Env, LogWriter, string.Join(" ", ctx.Command, runcmd), ctx.BaselineProgress); Log("*** End raw predictor output, return={0}", res); return; } @@ -189,7 +189,7 @@ protected void Run(RunContext ctx, int digitsOfPrecision = DigitsOfPrecision) Log(" Saving ini file: {0}", str); } - MainForTest(_env, LogWriter, str); + MainForTest(Env, LogWriter, str); files.ForEach(file => CheckEqualityNormalized(dir, file, digitsOfPrecision: digitsOfPrecision)); } diff --git a/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipe.cs b/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipe.cs index d2b575a98b..c8b2bb0645 100644 --- a/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipe.cs +++ b/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipe.cs @@ -123,7 +123,7 @@ public void SavePipeLabelParsers() string name = TestName + "4-out.txt"; string pathOut = DeleteOutputPath("SavePipe", name); using (var writer = OpenWriter(pathOut)) - using (_env.RedirectChannelOutput(writer, writer)) + using (Env.RedirectChannelOutput(writer, writer)) { TestCore(pathData, true, new[] { @@ -133,7 +133,7 @@ public void SavePipeLabelParsers() "xf=SelectColumns{keepcol=RawLabel keepcol=FileLabelNum keepcol=FileLabelKey hidden=-}" }, suffix: "4"); writer.WriteLine(ProgressLogLine); - _env.PrintProgress(); + Env.PrintProgress(); } CheckEqualityNormalized("SavePipe", name); @@ -638,7 +638,7 @@ public void SavePipeWithKey() Check(tmp, "Parsing argsText failed!"); IDataView view2 = TextLoader.Create(Env, argsText, new MultiFileSource(dataPath)); - var argsConv = new TypeConvertingTransformer.Arguments(); + var argsConv = new ConvertingTransform.Arguments(); tmp = CmdParser.ParseArguments(Env, " col=Label:U1[0-1]:Label" + " col=Features:U2:Features" + @@ -651,19 +651,19 @@ public void SavePipeWithKey() " key={min=3}", argsConv); Check(tmp, "Parsing argsConv failed!"); - view2 = TypeConvertingTransformer.Create(Env, argsConv, view2); + view2 = ConvertingTransform.Create(Env, argsConv, view2); - argsConv = new TypeConvertingTransformer.Arguments(); + argsConv = new ConvertingTransform.Arguments(); tmp = CmdParser.ParseArguments(Env, " col=Label2:U2:Label col=Features2:Num:Features", argsConv); Check(tmp, "Parsing argsConv(2) failed!"); - view2 = TypeConvertingTransformer.Create(Env, argsConv, view2); + view2 = ConvertingTransform.Create(Env, argsConv, view2); var colsChoose = new[] { "Label", "Features", "Label2", "Features2", "A", "B", "C", "D", "E", "F" }; - IDataView view1 = ColumnSelectingTransformer.CreateKeep(Env, pipe, colsChoose); - view2 = ColumnSelectingTransformer.CreateKeep(Env, view2, colsChoose); + IDataView view1 = SelectColumnsTransform.CreateKeep(Env, pipe, colsChoose); + view2 = SelectColumnsTransform.CreateKeep(Env, view2, colsChoose); CheckSameValues(view1, view2); }, @@ -673,118 +673,6 @@ public void SavePipeWithKey() Done(); } - [Fact] - public void SavePipeDropColumns() - { - string pathData = GetDataPath("adult.train"); - TestCore(pathData, false, - new[] { - "loader=Text{header+ sep=, col=One:TX:0 col=Num:R4:0,2,4,10-12 col=Cat:TX:0~*}", - "xf=MinMax{col=Num}", - "xf=NAHandle{col=NumSparse:Num}", - "xf=MinMax{col=NumSparse}", - "xf=SelectColumns{dropcol=NumSparse hidden=+}", - }); - - Done(); - } - - [Fact] - public void SavePipeCustomStopwordsRemover() - { - string dataFile = DeleteOutputPath("SavePipe", "CustomStopwordsRemover-dataFile.txt"); - File.WriteAllLines(dataFile, new[] { - "When does Fred McGriff of the Padres become a free agent?", - "Is erythromycin effective in treating pneumonia?" - }); - - var stopwordsList = new[] - { - "When", - "does", - "of", - "the", - "Padres", - "become", - "a", - "Is", - "effective", - "in" - }; - string stopwordsFile = DeleteOutputPath("SavePipe", "CustomStopwordsRemover-stopwordsFile.txt"); - File.WriteAllLines(stopwordsFile, stopwordsList); - - Action action - = pipe => - { - VBuffer>[] expected = new VBuffer>[2]; - ReadOnlyMemory[] values = { "Fred".AsMemory(), "McGriff".AsMemory(), "free".AsMemory(), "agent".AsMemory() }; - expected[0] = new VBuffer>(values.Length, values); - ReadOnlyMemory[] values1 = { "erythromycin".AsMemory(), "treating".AsMemory(), "pneumonia".AsMemory() }; - expected[1] = new VBuffer>(values1.Length, values1); - - using (var c = pipe.GetRowCursor(col => true)) - { - int col; - bool res = c.Schema.TryGetColumnIndex("T", out col); - if (!Check(res, "Column T not found!")) - return; - var getter = c.GetGetter>>(col); - var buffer = default(VBuffer>); - int index = 0; - while (c.MoveNext()) - { - getter(ref buffer); - CompareVec(in buffer, in expected[index++], buffer.GetValues().Length, (s1, s2) => s1.Span.SequenceEqual(s2.Span)); - } - } - }; - - TestCore(dataFile, true, - new[] { - "loader=Text{col=T:TX:0}", - "xf=WordToken{col=T}", - "xf=TextNorm{col=T case=None punc=-}", - string.Format("xf=CustomStopWords{{data={0} col=T}}", stopwordsFile), - "xf=SelectColumns{keepcol=T}" - }, action, baselineSchema: false); - - TestCore(dataFile, true, - new[] { - "loader=Text{col=T:TX:0}", - "xf=WordToken{col=T}", - "xf=TextNorm{col=T case=None punc=-}", - string.Format("xf=CustomStopWords{{stopwords={0} col=T}}", string.Join(",", stopwordsList)), - "xf=SelectColumns{keepcol=T}" - }, action, baselineSchema: false); - - Done(); - } - - [Fact] - public void SavePipeTokenizerAndStopWords() - { - string dataFile = DeleteOutputPath("SavePipe", "Multi-Languages.txt"); - File.WriteAllLines(dataFile, new[] { - "1 \"Oh, no,\" she's saying, \"our $400 blender can't handle something this hard!\" English", - "2 Vous êtes au volant d'une voiture et vous roulez à grande vitesse French", - "3 Lange nichts voneinander gehört! Es freut mich, dich kennen zu lernen German", - "4 Goedemorgen, Waar kom je vandaan? Ik kom uit Nederlands Dutch", - "5 Ciao, Come va? Bene grazie. E tu? Quanto tempo! Italian", - "六 初めまして 良い一日を ごきげんよう! さようなら Japanese", - "6 ¡Hola! ¿Cómo te llamas? Mi nombre es ABELE Spanish" - }); - - TestCore(dataFile, true, - new[] { - "Loader=Text{col=Source:TXT:0 col=Lang:TXT:1 sep=tab}", - "xf=Token{col=SourceTokens:Source}", - "xf=StopWords{langscol=Lang col=Output:SourceTokens}" - }, roundTripText: false); - - Done(); - } - [Fact] public void TestHashTransformFloat() { @@ -834,14 +722,14 @@ private void TestHashTransformHelper(T[] data, uint[] results, NumberType typ builder.AddColumn("F1", type, data); var srcView = builder.GetDataView(); - var col = new HashingTransformer.Column(); + var col = new HashTransformer.Column(); col.Name = "F1"; col.HashBits = 5; col.Seed = 42; - var args = new HashingTransformer.Arguments(); - args.Column = new HashingTransformer.Column[] { col }; + var args = new HashTransformer.Arguments(); + args.Column = new HashTransformer.Column[] { col }; - var hashTransform = HashingTransformer.Create(Env, args, srcView); + var hashTransform = HashTransformer.Create(Env, args, srcView); using (var cursor = hashTransform.GetRowCursor(c => true)) { var resultGetter = cursor.GetGetter(1); @@ -872,14 +760,14 @@ private void TestHashTransformVectorHelper(VBuffer data, uint[][] results, private void TestHashTransformVectorHelper(ArrayDataViewBuilder builder, uint[][] results) { var srcView = builder.GetDataView(); - var col = new HashingTransformer.Column(); + var col = new HashTransformer.Column(); col.Name = "F1V"; col.HashBits = 5; col.Seed = 42; - var args = new HashingTransformer.Arguments(); - args.Column = new HashingTransformer.Column[] { col }; + var args = new HashTransformer.Arguments(); + args.Column = new HashTransformer.Column[] { col }; - var hashTransform = HashingTransformer.Create(Env, args, srcView); + var hashTransform = HashTransformer.Create(Env, args, srcView); using (var cursor = hashTransform.GetRowCursor(c => true)) { var resultGetter = cursor.GetGetter>(1); @@ -913,13 +801,23 @@ public void TestLDATransform() }; builder.AddColumn("F1V", NumberType.Float, data); + var srcView = builder.GetDataView(); - var est = new LatentDirichletAllocationEstimator(Env, "F1V", numTopic: 3, numSummaryTermPerTopic: 3, alphaSum: 3, numThreads: 1, resetRandomGenerator: true); - var ldaTransformer = est.Fit(srcView); - var transformedData = ldaTransformer.Transform(srcView); + LdaTransform.Column col = new LdaTransform.Column(); + col.Source = "F1V"; + col.NumTopic = 20; + col.NumTopic = 3; + col.NumSummaryTermPerTopic = 3; + col.AlphaSum = 3; + col.NumThreads = 1; + col.ResetRandomGenerator = true; + LdaTransform.Arguments args = new LdaTransform.Arguments(); + args.Column = new LdaTransform.Column[] { col }; + + LdaTransform ldaTransform = new LdaTransform(Env, args, srcView); - using (var cursor = transformedData.GetRowCursor(c => true)) + using (var cursor = ldaTransform.GetRowCursor(c => true)) { var resultGetter = cursor.GetGetter>(1); VBuffer resultFirstRow = new VBuffer(); @@ -950,7 +848,7 @@ public void TestLDATransform() } [Fact] - public void TestLdaTransformerEmptyDocumentException() + public void TestLdaTransformEmptyDocumentException() { var builder = new ArrayDataViewBuilder(Env); var data = new[] @@ -963,18 +861,18 @@ public void TestLdaTransformerEmptyDocumentException() builder.AddColumn("Zeros", NumberType.Float, data); var srcView = builder.GetDataView(); - var col = new LatentDirichletAllocationTransformer.Column() + var col = new LdaTransform.Column() { - Source = "Zeros", + Source = "Zeros" }; - var args = new LatentDirichletAllocationTransformer.Arguments() + var args = new LdaTransform.Arguments() { Column = new[] { col } }; try { - var lda = new LatentDirichletAllocationEstimator(Env, "Zeros").Fit(srcView).Transform(srcView); + var lda = new LdaTransform(Env, args, srcView); } catch (InvalidOperationException ex) { diff --git a/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs b/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs index 03ca7d8600..93bccb69f5 100644 --- a/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs +++ b/test/Microsoft.ML.TestFramework/DataPipe/TestDataPipeBase.cs @@ -8,7 +8,6 @@ using System.Linq; using System.Reflection; using Microsoft.ML.Core.Data; -using Microsoft.ML.Data; using Microsoft.ML.Runtime.Api; using Microsoft.ML.Runtime.CommandLine; using Microsoft.ML.Runtime.Data; @@ -172,16 +171,19 @@ private void CheckSameSchemaShape(SchemaShape promised, SchemaShape delivered) /// protected IDataLoader TestCore(string pathData, bool keepHidden, string[] argsPipe, Action actLoader = null, string suffix = "", string suffixBase = null, bool checkBaseline = true, - bool forceDense = false, bool logCurs = false, bool roundTripText = true, + bool forceDense = false, bool logCurs = false, ConsoleEnvironment env = null, bool roundTripText = true, bool checkTranspose = false, bool checkId = true, bool baselineSchema = true) { Contracts.AssertValue(Env); + if (env == null) + env = Env; MultiFileSource files; IDataLoader compositeLoader; - var pipe1 = compositeLoader = CreatePipeDataLoader(_env, pathData, argsPipe, out files); + var pipe1 = compositeLoader = CreatePipeDataLoader(env, pathData, argsPipe, out files); - actLoader?.Invoke(compositeLoader); + if (actLoader != null) + actLoader(compositeLoader); // Re-apply pipe to the loader and check equality. var comp = compositeLoader as CompositeDataLoader; @@ -191,7 +193,7 @@ protected IDataLoader TestCore(string pathData, bool keepHidden, string[] argsPi srcLoader = comp.View; while (srcLoader is IDataTransform) srcLoader = ((IDataTransform)srcLoader).Source; - var reappliedPipe = ApplyTransformUtils.ApplyAllTransformsToData(_env, comp.View, srcLoader); + var reappliedPipe = ApplyTransformUtils.ApplyAllTransformsToData(env, comp.View, srcLoader); if (!CheckMetadataTypes(reappliedPipe.Schema)) Failed(); @@ -207,12 +209,12 @@ protected IDataLoader TestCore(string pathData, bool keepHidden, string[] argsPi string pathLog = DeleteOutputPath("SavePipe", name); using (var writer = OpenWriter(pathLog)) - using (_env.RedirectChannelOutput(writer, writer)) + using (env.RedirectChannelOutput(writer, writer)) { long count = 0; // Set the concurrency to 1 for this; restore later. - int conc = _env.ConcurrencyFactor; - _env.ConcurrencyFactor = 1; + int conc = env.ConcurrencyFactor; + env.ConcurrencyFactor = 1; using (var curs = pipe1.GetRowCursor(c => true, null)) { while (curs.MoveNext()) @@ -221,14 +223,14 @@ protected IDataLoader TestCore(string pathData, bool keepHidden, string[] argsPi } } writer.WriteLine("Cursored through {0} rows", count); - _env.ConcurrencyFactor = conc; + env.ConcurrencyFactor = conc; } CheckEqualityNormalized("SavePipe", name); } var pathModel = SavePipe(pipe1, suffix); - var pipe2 = LoadPipe(pathModel, _env, files); + var pipe2 = LoadPipe(pathModel, env, files); if (!CheckMetadataTypes(pipe2.Schema)) Failed(); @@ -240,21 +242,21 @@ protected IDataLoader TestCore(string pathData, bool keepHidden, string[] argsPi if (pipe1.Schema.ColumnCount > 0) { // The text saver fails if there are no columns, so we cannot check in that case. - if (!SaveLoadText(pipe1, _env, keepHidden, suffix, suffixBase, checkBaseline, forceDense, roundTripText)) + if (!SaveLoadText(pipe1, env, keepHidden, suffix, suffixBase, checkBaseline, forceDense, roundTripText)) Failed(); // The transpose saver likewise fails for the same reason. - if (checkTranspose && !SaveLoadTransposed(pipe1, _env, suffix)) + if (checkTranspose && !SaveLoadTransposed(pipe1, env, suffix)) Failed(); } - if (!SaveLoad(pipe1, _env, suffix)) + if (!SaveLoad(pipe1, env, suffix)) Failed(); // Check that the pipe doesn't shuffle when it cannot :). if (srcLoader != null) { // First we need to cache the data so it can be shuffled. - var cachedData = new CacheDataView(_env, srcLoader, null); - var newPipe = ApplyTransformUtils.ApplyAllTransformsToData(_env, comp.View, cachedData); + var cachedData = new CacheDataView(env, srcLoader, null); + var newPipe = ApplyTransformUtils.ApplyAllTransformsToData(env, comp.View, cachedData); if (!newPipe.CanShuffle) { using (var c1 = newPipe.GetRowCursor(col => true, new SysRandom(123))) diff --git a/test/Microsoft.ML.TestFramework/EnvironmentExtensions.cs b/test/Microsoft.ML.TestFramework/EnvironmentExtensions.cs index 13a78fdf3f..180a192b5d 100644 --- a/test/Microsoft.ML.TestFramework/EnvironmentExtensions.cs +++ b/test/Microsoft.ML.TestFramework/EnvironmentExtensions.cs @@ -20,7 +20,7 @@ public static TEnvironment AddStandardComponents(this TEnvironment { env.ComponentCatalog.RegisterAssembly(typeof(TextLoader).Assembly); // ML.Data env.ComponentCatalog.RegisterAssembly(typeof(LinearPredictor).Assembly); // ML.StandardLearners - env.ComponentCatalog.RegisterAssembly(typeof(OneHotEncodingTransformer).Assembly); // ML.Transforms + env.ComponentCatalog.RegisterAssembly(typeof(CategoricalTransform).Assembly); // ML.Transforms env.ComponentCatalog.RegisterAssembly(typeof(FastTreeBinaryPredictor).Assembly); // ML.FastTree env.ComponentCatalog.RegisterAssembly(typeof(EnsemblePredictor).Assembly); // ML.Ensemble env.ComponentCatalog.RegisterAssembly(typeof(KMeansPredictor).Assembly); // ML.KMeansClustering diff --git a/test/Microsoft.ML.TestFramework/ModelHelper.cs b/test/Microsoft.ML.TestFramework/ModelHelper.cs index 3fe189183b..94341e4a85 100644 --- a/test/Microsoft.ML.TestFramework/ModelHelper.cs +++ b/test/Microsoft.ML.TestFramework/ModelHelper.cs @@ -13,7 +13,7 @@ namespace Microsoft.ML.TestFramework { public static class ModelHelper { - private static IHostEnvironment s_environment = new MLContext(seed: 1); + private static ConsoleEnvironment s_environment = new ConsoleEnvironment(seed: 1); private static ITransformModel s_housePriceModel; public static void WriteKcHousePriceModel(string dataPath, string outputModelPath) @@ -35,6 +35,7 @@ public static void WriteKcHousePriceModel(string dataPath, Stream stream) { s_housePriceModel = CreateKcHousePricePredictorModel(dataPath); } + s_housePriceModel.Save(s_environment, stream); } diff --git a/test/Microsoft.ML.TestFramework/TestCommandBase.cs b/test/Microsoft.ML.TestFramework/TestCommandBase.cs index 4e5c04395f..75f8d5d1e0 100644 --- a/test/Microsoft.ML.TestFramework/TestCommandBase.cs +++ b/test/Microsoft.ML.TestFramework/TestCommandBase.cs @@ -292,10 +292,10 @@ protected bool TestCore(RunContextBase ctx, string cmdName, string args, int dig Contracts.AssertValueOrNull(args); OutputPath outputPath = ctx.StdoutPath(); using (var newWriter = OpenWriter(outputPath.Path)) - using (_env.RedirectChannelOutput(newWriter, newWriter)) + using (Env.RedirectChannelOutput(newWriter, newWriter)) { - _env.ResetProgressChannel(); - int res = MainForTest(_env, newWriter, string.Format("{0} {1}", cmdName, args), ctx.BaselineProgress); + Env.ResetProgressChannel(); + int res = MainForTest(Env, newWriter, string.Format("{0} {1}", cmdName, args), ctx.BaselineProgress); if (res != 0) Log("*** Predictor returned {0}", res); } @@ -322,7 +322,7 @@ protected bool TestCore(RunContextBase ctx, string cmdName, string args, int dig /// /// The arguments for MAML. /// Whether to print the progress summary. If true, progress summary will appear in the end of baseline output file. - private protected static int MainForTest(ConsoleEnvironment env, TextWriter writer, string args, bool printProgress = false) + protected static int MainForTest(ConsoleEnvironment env, TextWriter writer, string args, bool printProgress = false) { Contracts.AssertValue(env); Contracts.AssertValue(writer); @@ -364,7 +364,7 @@ private bool TestCoreCore(RunContextBase ctx, string cmdName, string dataPath, P return TestCoreCore(ctx, cmdName, dataPath, situation, inModelPath, outModelPath, loaderArgs, extraArgs, DigitsOfPrecision, toCompare); } - private bool TestCoreCore(RunContextBase ctx, string cmdName, string dataPath, PathArgument.Usage situation, + private bool TestCoreCore(RunContextBase ctx, string cmdName, string dataPath, PathArgument.Usage situation, OutputPath inModelPath, OutputPath outModelPath, string loaderArgs, string extraArgs, int digitsOfPrecision, params PathArgument[] toCompare) { Contracts.AssertNonEmpty(cmdName); @@ -503,22 +503,24 @@ private string DataArg(string dataPath) protected void TestPipeFromModel(string dataPath, OutputPath model) { - var env = new MLContext(seed: 42); - var files = new MultiFileSource(dataPath); - - bool tmp; - IDataView pipe; - using (var file = Env.OpenInputFile(model.Path)) - using (var strm = file.OpenReadStream()) - using (var rep = RepositoryReader.Open(strm, env)) + using (var env = new ConsoleEnvironment(42)) { - ModelLoadContext.LoadModel(env, - out pipe, rep, ModelFileUtils.DirDataLoaderModel, files); - } + var files = new MultiFileSource(dataPath); - using (var c = pipe.GetRowCursor(col => true)) - tmp = CheckSameValues(c, pipe, true, true, true); - Check(tmp, "Single value same failed"); + bool tmp; + IDataView pipe; + using (var file = Env.OpenInputFile(model.Path)) + using (var strm = file.OpenReadStream()) + using (var rep = RepositoryReader.Open(strm, env)) + { + ModelLoadContext.LoadModel(env, + out pipe, rep, ModelFileUtils.DirDataLoaderModel, files); + } + + using (var c = pipe.GetRowCursor(col => true)) + tmp = CheckSameValues(c, pipe, true, true, true); + Check(tmp, "Single value same failed"); + } } } @@ -1967,7 +1969,7 @@ public void CommandTrainingBinaryFieldAwareFactorizationMachineWithInitializatio string data = GetDataPath("breast-cancer.txt"); OutputPath model = ModelPath(); - TestCore("traintest", data, loaderArgs, extraArgs + " test=" + data, digitsOfPrecision: 5); + TestCore("traintest", data, loaderArgs, extraArgs + " test=" + data, digitsOfPrecision:5); _step++; TestInOutCore("traintest", data, model, extraArgs + " " + loaderArgs + " " + "cont+" + " " + "test=" + data); @@ -1986,17 +1988,17 @@ public void CommandTrainingBinaryFactorizationMachineWithValidation() string args = $"{loaderArgs} data={trainData} valid={validData} test={validData} {extraArgs} out={model}"; OutputPath outputPath = StdoutPath(); using (var newWriter = OpenWriter(outputPath.Path)) - using (_env.RedirectChannelOutput(newWriter, newWriter)) + using (Env.RedirectChannelOutput(newWriter, newWriter)) { - _env.ResetProgressChannel(); - int res = MainForTest(_env, newWriter, string.Format("{0} {1}", "traintest", args), true); + Env.ResetProgressChannel(); + int res = MainForTest(Env, newWriter, string.Format("{0} {1}", "traintest", args), true); Assert.True(res == 0); } // see https://github.com/dotnet/machinelearning/issues/404 // in Linux, the clang sqrt() results vary highly from the ones in mac and Windows. if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - Assert.True(outputPath.CheckEqualityNormalized(digitsOfPrecision: 4)); + Assert.True(outputPath.CheckEqualityNormalized(digitsOfPrecision:4)); else Assert.True(outputPath.CheckEqualityNormalized()); @@ -2015,10 +2017,10 @@ public void CommandTrainingBinaryFieldAwareFactorizationMachineWithValidation() string args = $"{loaderArgs} data={trainData} valid={validData} test={validData} {extraArgs} out={model}"; OutputPath outputPath = StdoutPath(); using (var newWriter = OpenWriter(outputPath.Path)) - using (_env.RedirectChannelOutput(newWriter, newWriter)) + using (Env.RedirectChannelOutput(newWriter, newWriter)) { - _env.ResetProgressChannel(); - int res = MainForTest(_env, newWriter, string.Format("{0} {1}", "traintest", args), true); + Env.ResetProgressChannel(); + int res = MainForTest(Env, newWriter, string.Format("{0} {1}", "traintest", args), true); Assert.Equal(0, res); } @@ -2042,15 +2044,15 @@ public void CommandTrainingBinaryFactorizationMachineWithValidationAndInitializa OutputPath outputPath = StdoutPath(); string args = $"data={data} test={data} valid={data} in={model.Path} cont+" + " " + loaderArgs + " " + extraArgs; using (var newWriter = OpenWriter(outputPath.Path)) - using (_env.RedirectChannelOutput(newWriter, newWriter)) + using (Env.RedirectChannelOutput(newWriter, newWriter)) { - _env.ResetProgressChannel(); - int res = MainForTest(_env, newWriter, string.Format("{0} {1}", "traintest", args), true); + Env.ResetProgressChannel(); + int res = MainForTest(Env, newWriter, string.Format("{0} {1}", "traintest", args), true); Assert.True(res == 0); } if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - Assert.True(outputPath.CheckEqualityNormalized(digitsOfPrecision: 4)); + Assert.True(outputPath.CheckEqualityNormalized(digitsOfPrecision:4)); else Assert.True(outputPath.CheckEqualityNormalized()); @@ -2072,10 +2074,10 @@ public void CommandTrainingBinaryFieldAwareFactorizationMachineWithValidationAnd OutputPath outputPath = StdoutPath(); string args = $"data={data} test={data} valid={data} in={model.Path} cont+" + " " + loaderArgs + " " + extraArgs; using (var newWriter = OpenWriter(outputPath.Path)) - using (_env.RedirectChannelOutput(newWriter, newWriter)) + using (Env.RedirectChannelOutput(newWriter, newWriter)) { - _env.ResetProgressChannel(); - int res = MainForTest(_env, newWriter, string.Format("{0} {1}", "traintest", args), true); + Env.ResetProgressChannel(); + int res = MainForTest(Env, newWriter, string.Format("{0} {1}", "traintest", args), true); Assert.True(res == 0); } diff --git a/test/Microsoft.ML.TestFramework/TestSparseDataView.cs b/test/Microsoft.ML.TestFramework/TestSparseDataView.cs index 75cd3ca516..a674618dd8 100644 --- a/test/Microsoft.ML.TestFramework/TestSparseDataView.cs +++ b/test/Microsoft.ML.TestFramework/TestSparseDataView.cs @@ -48,26 +48,28 @@ private void GenericSparseDataView(T[] v1, T[] v2) new SparseExample() { X = new VBuffer (5, 3, v1, new int[] { 0, 2, 4 }) }, new SparseExample() { X = new VBuffer (5, 3, v2, new int[] { 0, 1, 3 }) } }; - var env = new MLContext(); - var data = env.CreateStreamingDataView(inputs); - var value = new VBuffer(); - int n = 0; - using (var cur = data.GetRowCursor(i => true)) + using (var host = new ConsoleEnvironment()) { - var getter = cur.GetGetter>(0); - while (cur.MoveNext()) + var data = host.CreateStreamingDataView(inputs); + var value = new VBuffer(); + int n = 0; + using (var cur = data.GetRowCursor(i => true)) { - getter(ref value); - Assert.True(value.GetValues().Length == 3); - ++n; + var getter = cur.GetGetter>(0); + while (cur.MoveNext()) + { + getter(ref value); + Assert.True(value.GetValues().Length == 3); + ++n; + } } + Assert.True(n == 2); + var iter = data.AsEnumerable>(host, false).GetEnumerator(); + n = 0; + while (iter.MoveNext()) + ++n; + Assert.True(n == 2); } - Assert.True(n == 2); - var iter = data.AsEnumerable>(env, false).GetEnumerator(); - n = 0; - while (iter.MoveNext()) - ++n; - Assert.True(n == 2); } [Fact] @@ -88,26 +90,28 @@ private void GenericDenseDataView(T[] v1, T[] v2) new DenseExample() { X = v1 }, new DenseExample() { X = v2 } }; - var env = new MLContext(); - var data = env.CreateStreamingDataView(inputs); - var value = new VBuffer(); - int n = 0; - using (var cur = data.GetRowCursor(i => true)) + using (var host = new ConsoleEnvironment()) { - var getter = cur.GetGetter>(0); - while (cur.MoveNext()) + var data = host.CreateStreamingDataView(inputs); + var value = new VBuffer(); + int n = 0; + using (var cur = data.GetRowCursor(i => true)) { - getter(ref value); - Assert.True(value.GetValues().Length == 3); - ++n; + var getter = cur.GetGetter>(0); + while (cur.MoveNext()) + { + getter(ref value); + Assert.True(value.GetValues().Length == 3); + ++n; + } } + Assert.True(n == 2); + var iter = data.AsEnumerable>(host, false).GetEnumerator(); + n = 0; + while (iter.MoveNext()) + ++n; + Assert.True(n == 2); } - Assert.True(n == 2); - var iter = data.AsEnumerable>(env, false).GetEnumerator(); - n = 0; - while (iter.MoveNext()) - ++n; - Assert.True(n == 2); } } } diff --git a/test/Microsoft.ML.Tests/CachingTests.cs b/test/Microsoft.ML.Tests/CachingTests.cs deleted file mode 100644 index ef77eab19f..0000000000 --- a/test/Microsoft.ML.Tests/CachingTests.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; -using Microsoft.ML.Runtime.Api; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.RunTests; -using System.Linq; -using System.Threading; -using Xunit; -using Xunit.Abstractions; - -namespace Microsoft.ML.Tests -{ - public class CachingTests : TestDataPipeBase - { - public CachingTests(ITestOutputHelper helper) : base(helper) - { - } - - private class MyData - { - [NoColumn] - public int AccessCount; - private float[] _features; - - [VectorType(3)] - public float[] Features - { - get { Interlocked.Increment(ref AccessCount); return _features; } - set { _features = value; } - } - - public MyData() - { - Features = new float[] { 1, 2, 3 }; - } - } - - [Fact] - public void CacheCheckpointTest() - { - var trainData = Enumerable.Range(0, 100).Select(c => new MyData()).ToArray(); - - var pipe = ML.Transforms.CopyColumns("Features", "F1") - .Append(ML.Transforms.Normalize("F1", "Norm1")) - .Append(ML.Transforms.Normalize("F1", "Norm2", Transforms.Normalizers.NormalizingEstimator.NormalizerMode.MeanVariance)); - - pipe.Fit(ML.CreateDataView(trainData)); - - Assert.True(trainData.All(x => x.AccessCount == 2)); - - trainData = Enumerable.Range(0, 100).Select(c => new MyData()).ToArray(); - pipe = ML.Transforms.CopyColumns("Features", "F1") - .AppendCacheCheckpoint(ML) - .Append(ML.Transforms.Normalize("F1", "Norm1")) - .Append(ML.Transforms.Normalize("F1", "Norm2", Transforms.Normalizers.NormalizingEstimator.NormalizerMode.MeanVariance)); - - pipe.Fit(ML.CreateDataView(trainData)); - - Assert.True(trainData.All(x => x.AccessCount == 1)); - } - - [Fact] - public void CacheTest() - { - var src = Enumerable.Range(0, 100).Select(c => new MyData()).ToArray(); - var data = ML.CreateDataView(src); - data.GetColumn(ML, "Features").ToArray(); - data.GetColumn(ML, "Features").ToArray(); - Assert.True(src.All(x => x.AccessCount == 2)); - - src = Enumerable.Range(0, 100).Select(c => new MyData()).ToArray(); - data = ML.CreateDataView(src); - data = ML.Data.Cache(data); - data.GetColumn(ML, "Features").ToArray(); - data.GetColumn(ML, "Features").ToArray(); - Assert.True(src.All(x => x.AccessCount == 1)); - } - } -} diff --git a/test/Microsoft.ML.Tests/CollectionDataSourceTests.cs b/test/Microsoft.ML.Tests/CollectionDataSourceTests.cs index 8862864885..2e3b71ab01 100644 --- a/test/Microsoft.ML.Tests/CollectionDataSourceTests.cs +++ b/test/Microsoft.ML.Tests/CollectionDataSourceTests.cs @@ -59,13 +59,15 @@ public void CheckConstructor() public void CanSuccessfullyApplyATransform() { var collection = CollectionDataSource.Create(new List() { new Input { Number1 = 1, String1 = "1" } }); - var environment = new MLContext(); + using (var environment = new ConsoleEnvironment()) + { Experiment experiment = environment.CreateExperiment(); Legacy.ILearningPipelineDataStep output = (Legacy.ILearningPipelineDataStep)collection.ApplyStep(null, experiment); Assert.NotNull(output.Data); Assert.NotNull(output.Data.VarName); Assert.Null(output.Model); + } } [Fact] @@ -77,8 +79,9 @@ public void CanSuccessfullyEnumerated() new Input { Number1 = 3, String1 = "3" } }); - var environment = new MLContext(); - Experiment experiment = environment.CreateExperiment(); + using (var environment = new ConsoleEnvironment()) + { + Experiment experiment = environment.CreateExperiment(); Legacy.ILearningPipelineDataStep output = collection.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; experiment.Compile(); @@ -125,6 +128,7 @@ public void CanSuccessfullyEnumerated() Assert.False(cursor.MoveNext()); } + } } [Fact] @@ -290,7 +294,7 @@ public class ConversionSimpleClass public float fFloat; public double fDouble; public bool fBool; - public string fString = ""; + public string fString=""; } public bool CompareObjectValues(object x, object y, Type type) @@ -414,15 +418,17 @@ public void RoundTripConversionWithBasicTypes() new ConversionSimpleClass() }; - var env = new MLContext(); - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + using (var env = new ConsoleEnvironment()) { - Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + { + Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); + } + Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); } - Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); } public class ConversionNotSupportedMinValueClass @@ -436,25 +442,27 @@ public class ConversionNotSupportedMinValueClass [Fact] public void ConversionExceptionsBehavior() { - var env = new MLContext(); - var data = new ConversionNotSupportedMinValueClass[1]; - foreach (var field in typeof(ConversionNotSupportedMinValueClass).GetFields()) + using (var env = new ConsoleEnvironment()) { - data[0] = new ConversionNotSupportedMinValueClass(); - FieldInfo fi; - if ((fi = field.FieldType.GetField("MinValue")) != null) - { - field.SetValue(data[0], fi.GetValue(null)); - } - var dataView = ComponentCreation.CreateDataView(env, data); - var enumerator = dataView.AsEnumerable(env, false).GetEnumerator(); - try - { - enumerator.MoveNext(); - Assert.True(false); - } - catch + var data = new ConversionNotSupportedMinValueClass[1]; + foreach (var field in typeof(ConversionNotSupportedMinValueClass).GetFields()) { + data[0] = new ConversionNotSupportedMinValueClass(); + FieldInfo fi; + if ((fi = field.FieldType.GetField("MinValue")) != null) + { + field.SetValue(data[0], fi.GetValue(null)); + } + var dataView = ComponentCreation.CreateDataView(env, data); + var enumerator = dataView.AsEnumerable(env, false).GetEnumerator(); + try + { + enumerator.MoveNext(); + Assert.True(false); + } + catch + { + } } } } @@ -488,13 +496,15 @@ public void ClassWithConstFieldsConversion() new ClassWithConstField(){ fInt=-1, fString ="" }, }; - var env = new MLContext(); - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) - Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); - Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); + using (var env = new ConsoleEnvironment()) + { + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); + Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); + } } @@ -514,13 +524,15 @@ public void ClassWithMixOfFieldsAndPropertiesConversion() new ClassWithMixOfFieldsAndProperties(){ IntProp=-1, fString ="" }, }; - var env = new MLContext(); - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) - Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); - Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); + using (var env = new ConsoleEnvironment()) + { + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); + Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); + } } public abstract class BaseClassWithInheritedProperties @@ -568,25 +580,28 @@ public void ClassWithPrivateFieldsAndPropertiesConversion() new ClassWithPrivateFieldsAndProperties(){ StringProp ="baba" } }; - var env = new MLContext(); - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + using (var env = new ConsoleEnvironment()) { - Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); - Assert.True(enumeratorSimple.Current.UnusedPropertyWithPrivateSetter == 100); + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + { + Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); + Assert.True(enumeratorSimple.Current.UnusedPropertyWithPrivateSetter == 100); + } + Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); } - Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); } public class ClassWithInheritedProperties : BaseClassWithInheritedProperties { + private int _fInt; private long _fLong; private byte _fByte2; - public int IntProp { get; set; } - public override long LongProp { get => _fLong; set => _fLong = value; } - public override byte ByteProp { get => _fByte2; set => _fByte2 = value; } + public int IntProp { get { return _fInt; } set { _fInt = value; } } + public override long LongProp { get { return _fLong; } set { _fLong = value; } } + public override byte ByteProp { get { return _fByte2; } set { _fByte2 = value; } } } [Fact] @@ -598,13 +613,15 @@ public void ClassWithInheritedPropertiesConversion() new ClassWithInheritedProperties(){ IntProp=-1, StringProp ="", LongProp=2, ByteProp=4 }, }; - var env = new MLContext(); - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) - Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); - Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); + using (var env = new ConsoleEnvironment()) + { + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); + Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); + } } public class ClassWithArrays @@ -649,30 +666,44 @@ public void RoundTripConversionWithArrays() }; - var env = new MLContext(); - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + using (var env = new ConsoleEnvironment()) { - Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + { + Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); + } + Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); } - Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); } public class ClassWithArrayProperties { - public string[] StringProp { get; set; } - public int[] IntProp { get; set; } - public uint[] UIntProp { get; set; } - public short[] ShortProp { get; set; } - public ushort[] UShortProp { get; set; } - public sbyte[] SByteProp { get; set; } - public byte[] ByteProp { get; set; } - public long[] LongProp { get; set; } - public ulong[] ULongProp { get; set; } - public float[] FloatProp { get; set; } - public double[] DobuleProp { get; set; } - public bool[] BoolProp { get; set; } + private string[] _fString; + private int[] _fInt; + private uint[] _fuInt; + private short[] _fShort; + private ushort[] _fuShort; + private sbyte[] _fsByte; + private byte[] _fByte; + private long[] _fLong; + private ulong[] _fuLong; + private float[] _fFloat; + private double[] _fDouble; + private bool[] _fBool; + public string[] StringProp { get { return _fString; } set { _fString = value; } } + public int[] IntProp { get { return _fInt; } set { _fInt = value; } } + public uint[] UIntProp { get { return _fuInt; } set { _fuInt = value; } } + public short[] ShortProp { get { return _fShort; } set { _fShort = value; } } + public ushort[] UShortProp { get { return _fuShort; } set { _fuShort = value; } } + public sbyte[] SByteProp { get { return _fsByte; } set { _fsByte = value; } } + public byte[] ByteProp { get { return _fByte; } set { _fByte = value; } } + public long[] LongProp { get { return _fLong; } set { _fLong = value; } } + public ulong[] ULongProp { get { return _fuLong; } set { _fuLong = value; } } + public float[] FloatProp { get { return _fFloat; } set { _fFloat = value; } } + public double[] DobuleProp { get { return _fDouble; } set { _fDouble = value; } } + public bool[] BoolProp { get { return _fBool; } set { _fBool = value; } } } [Fact] @@ -700,23 +731,27 @@ public void RoundTripConversionWithArrayPropertiess() new ClassWithArrayProperties() }; - var env = new MLContext(); - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) - Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); - Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); + using (var env = new ConsoleEnvironment()) + { + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + { + Assert.True(CompareThroughReflection(enumeratorSimple.Current, originalEnumerator.Current)); + } + Assert.True(!enumeratorSimple.MoveNext() && !originalEnumerator.MoveNext()); + } } - private sealed class ClassWithGetter + class ClassWithGetter { private DateTime _dateTime = DateTime.Now; - public float Day => _dateTime.Day; - public int Hour => _dateTime.Hour; + public float Day { get { return _dateTime.Day; } } + public int Hour { get { return _dateTime.Hour; } } } - private sealed class ClassWithSetter + class ClassWithSetter { public float Day { private get; set; } public int Hour { private get; set; } @@ -737,14 +772,16 @@ public void PrivateGetSetProperties() new ClassWithGetter() }; - var env = new MLContext(); - var dataView = ComponentCreation.CreateDataView(env, data); - var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); - var originalEnumerator = data.GetEnumerator(); - while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + using (var env = new ConsoleEnvironment()) { - Assert.True(enumeratorSimple.Current.GetDay == originalEnumerator.Current.Day && - enumeratorSimple.Current.GetHour == originalEnumerator.Current.Hour); + var dataView = ComponentCreation.CreateDataView(env, data); + var enumeratorSimple = dataView.AsEnumerable(env, false).GetEnumerator(); + var originalEnumerator = data.GetEnumerator(); + while (enumeratorSimple.MoveNext() && originalEnumerator.MoveNext()) + { + Assert.True(enumeratorSimple.Current.GetDay == originalEnumerator.Current.Day && + enumeratorSimple.Current.GetHour == originalEnumerator.Current.Hour); + } } } } diff --git a/test/Microsoft.ML.Tests/ImagesTests.cs b/test/Microsoft.ML.Tests/ImagesTests.cs index cde998e2b4..3c4522bf1d 100644 --- a/test/Microsoft.ML.Tests/ImagesTests.cs +++ b/test/Microsoft.ML.Tests/ImagesTests.cs @@ -2,7 +2,6 @@ // 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; using Microsoft.ML.Runtime.Api; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.ImageAnalytics; @@ -26,69 +25,72 @@ public ImageTests(ITestOutputHelper output) : base(output) [Fact] public void TestEstimatorChain() { - var env = new MLContext(); - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var invalidData = TextLoader.Create(env, new TextLoader.Arguments() - { - Column = new[] + }, new MultiFileSource(dataFile)); + var invalidData = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.R4, 0), } - }, new MultiFileSource(dataFile)); + }, new MultiFileSource(dataFile)); - var pipe = new ImageLoadingEstimator(env, imageFolder, ("ImagePath", "ImageReal")) - .Append(new ImageResizingEstimator(env, "ImageReal", "ImageReal", 100, 100)) - .Append(new ImagePixelExtractingEstimator(env, "ImageReal", "ImagePixels")) - .Append(new ImageGrayscalingEstimator(env, ("ImageReal", "ImageGray"))); + var pipe = new ImageLoadingEstimator(env, imageFolder, ("ImagePath", "ImageReal")) + .Append(new ImageResizingEstimator(env, "ImageReal", "ImageReal", 100, 100)) + .Append(new ImagePixelExtractingEstimator(env, "ImageReal", "ImagePixels")) + .Append(new ImageGrayscalingEstimator(env, ("ImageReal", "ImageGray"))); - TestEstimatorCore(pipe, data, null, invalidData); + TestEstimatorCore(pipe, data, null, invalidData); + } Done(); } [Fact] public void TestEstimatorSaveLoad() { - IHostEnvironment env = new MLContext(); - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); + }, new MultiFileSource(dataFile)); - var pipe = new ImageLoadingEstimator(env, imageFolder, ("ImagePath", "ImageReal")) - .Append(new ImageResizingEstimator(env, "ImageReal", "ImageReal", 100, 100)) - .Append(new ImagePixelExtractingEstimator(env, "ImageReal", "ImagePixels")) - .Append(new ImageGrayscalingEstimator(env, ("ImageReal", "ImageGray"))); + var pipe = new ImageLoadingEstimator(env, imageFolder, ("ImagePath", "ImageReal")) + .Append(new ImageResizingEstimator(env, "ImageReal", "ImageReal", 100, 100)) + .Append(new ImagePixelExtractingEstimator(env, "ImageReal", "ImagePixels")) + .Append(new ImageGrayscalingEstimator(env, ("ImageReal", "ImageGray"))); - pipe.GetOutputSchema(Core.Data.SchemaShape.Create(data.Schema)); - var model = pipe.Fit(data); + pipe.GetOutputSchema(Core.Data.SchemaShape.Create(data.Schema)); + var model = pipe.Fit(data); - var tempPath = Path.GetTempFileName(); - using (var file = new SimpleFileHandle(env, tempPath, true, true)) - { - using (var fs = file.CreateWriteStream()) - model.SaveTo(env, fs); - var model2 = TransformerChain.LoadFrom(env, file.OpenReadStream()); - - var newCols = ((ImageLoaderTransform)model2.First()).Columns; - var oldCols = ((ImageLoaderTransform)model.First()).Columns; - Assert.True(newCols - .Zip(oldCols, (x, y) => x == y) - .All(x => x)); + using (var file = env.CreateTempFile()) + { + using (var fs = file.CreateWriteStream()) + model.SaveTo(env, fs); + var model2 = TransformerChain.LoadFrom(env, file.OpenReadStream()); + + var newCols = ((ImageLoaderTransform)model2.First()).Columns; + var oldCols = ((ImageLoaderTransform)model.First()).Columns; + Assert.True(newCols + .Zip(oldCols, (x, y) => x == y) + .All(x => x)); + } } Done(); } @@ -96,48 +98,50 @@ public void TestEstimatorSaveLoad() [Fact] public void TestSaveImages() { - var env = new MLContext(); - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() - { - Column = new ImageLoaderTransform.Column[1] + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); + }, + ImageFolder = imageFolder + }, data); - IDataView cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + IDataView cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Name= "ImageCropped", Source = "ImageReal", ImageHeight =100, ImageWidth = 100, Resizing = ImageResizerTransform.ResizingKind.IsoPad} } - }, images); + }, images); - cropped.Schema.TryGetColumnIndex("ImagePath", out int pathColumn); - cropped.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = cropped.GetRowCursor((x) => true)) - { - var pathGetter = cursor.GetGetter>(pathColumn); - ReadOnlyMemory path = default; - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap bitmap = default; - while (cursor.MoveNext()) - { - pathGetter(ref path); - bitmapCropGetter(ref bitmap); - Assert.NotNull(bitmap); - var fileToSave = GetOutputPath(Path.GetFileNameWithoutExtension(path.ToString()) + ".cropped.jpg"); - bitmap.Save(fileToSave, System.Drawing.Imaging.ImageFormat.Jpeg); + cropped.Schema.TryGetColumnIndex("ImagePath", out int pathColumn); + cropped.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = cropped.GetRowCursor((x) => true)) + { + var pathGetter = cursor.GetGetter>(pathColumn); + ReadOnlyMemory path = default; + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap bitmap = default; + while (cursor.MoveNext()) + { + pathGetter(ref path); + bitmapCropGetter(ref bitmap); + Assert.NotNull(bitmap); + var fileToSave = GetOutputPath(Path.GetFileNameWithoutExtension(path.ToString()) + ".cropped.jpg"); + bitmap.Save(fileToSave, System.Drawing.Imaging.ImageFormat.Jpeg); + } } } Done(); @@ -146,66 +150,68 @@ public void TestSaveImages() [Fact] public void TestGreyscaleTransformImages() { - IHostEnvironment env = new MLContext(); - var imageHeight = 150; - var imageWidth = 100; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var imageHeight = 150; + var imageWidth = 100; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() - { - Column = new ImageLoaderTransform.Column[1] + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Name= "ImageCropped", Source = "ImageReal", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - IDataView grey = ImageGrayscaleTransform.Create(env, new ImageGrayscaleTransform.Arguments() - { - Column = new ImageGrayscaleTransform.Column[1]{ + IDataView grey = ImageGrayscaleTransform.Create(env, new ImageGrayscaleTransform.Arguments() + { + Column = new ImageGrayscaleTransform.Column[1]{ new ImageGrayscaleTransform.Column() { Name= "ImageGrey", Source = "ImageCropped"} } - }, cropped); + }, cropped); - var fname = nameof(TestGreyscaleTransformImages) + "_model.zip"; + var fname = nameof(TestGreyscaleTransformImages) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(grey)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(grey)); - grey = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + grey = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - grey.Schema.TryGetColumnIndex("ImageGrey", out int greyColumn); - using (var cursor = grey.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(greyColumn); - Bitmap bitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref bitmap); - Assert.NotNull(bitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var pixel = bitmap.GetPixel(x, y); - // greyscale image has same values for R,G and B - Assert.True(pixel.R == pixel.G && pixel.G == pixel.B); - } + grey.Schema.TryGetColumnIndex("ImageGrey", out int greyColumn); + using (var cursor = grey.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(greyColumn); + Bitmap bitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref bitmap); + Assert.NotNull(bitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var pixel = bitmap.GetPixel(x, y); + // greyscale image has same values for R,G and B + Assert.True(pixel.R == pixel.G && pixel.G == pixel.B); + } + } } } Done(); @@ -214,86 +220,88 @@ public void TestGreyscaleTransformImages() [Fact] public void TestBackAndForthConversionWithAlphaInterleave() { - IHostEnvironment env = new MLContext(); - const int imageHeight = 100; - const int imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var imageHeight = 100; + var imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() - { - Column = new ImageLoaderTransform.Column[1] + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = true, - Offset = 127.5f, - Scale = 2f / 255, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = true, + Offset = 127.5f, + Scale = 2f / 255, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=true} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = true, - Offset = -1f, - Scale = 255f / 2, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = true, + Offset = -1f, + Scale = 255f / 2, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=true} } - }, pixels); + }, pixels); - var fname = nameof(TestBackAndForthConversionWithAlphaInterleave) + "_model.zip"; + var fname = nameof(TestBackAndForthConversionWithAlphaInterleave) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c == r); - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c == r); + } + } } } Done(); @@ -302,86 +310,88 @@ public void TestBackAndForthConversionWithAlphaInterleave() [Fact] public void TestBackAndForthConversionWithoutAlphaInterleave() { - IHostEnvironment env = new MLContext(); - const int imageHeight = 100; - const int imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var imageHeight = 100; + var imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() - { - Column = new ImageLoaderTransform.Column[1] + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = true, - Offset = 127.5f, - Scale = 2f / 255, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = true, + Offset = 127.5f, + Scale = 2f / 255, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=false} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = true, - Offset = -1f, - Scale = 255f / 2, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = true, + Offset = -1f, + Scale = 255f / 2, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=false} } - }, pixels); + }, pixels); - var fname = nameof(TestBackAndForthConversionWithoutAlphaInterleave) + "_model.zip"; + var fname = nameof(TestBackAndForthConversionWithoutAlphaInterleave) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); + } + } } } Done(); @@ -390,86 +400,88 @@ public void TestBackAndForthConversionWithoutAlphaInterleave() [Fact] public void TestBackAndForthConversionWithAlphaNoInterleave() { - IHostEnvironment env = new MLContext(); - const int imageHeight = 100; - const int imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var imageHeight = 100; + var imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() - { - Column = new ImageLoaderTransform.Column[1] + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = false, - Offset = 127.5f, - Scale = 2f / 255, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = false, + Offset = 127.5f, + Scale = 2f / 255, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=true} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = false, - Offset = -1f, - Scale = 255f / 2, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = false, + Offset = -1f, + Scale = 255f / 2, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=true} } - }, pixels); + }, pixels); - var fname = nameof(TestBackAndForthConversionWithAlphaNoInterleave) + "_model.zip"; + var fname = nameof(TestBackAndForthConversionWithAlphaNoInterleave) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c == r); - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c == r); + } + } } } Done(); @@ -478,86 +490,88 @@ public void TestBackAndForthConversionWithAlphaNoInterleave() [Fact] public void TestBackAndForthConversionWithoutAlphaNoInterleave() { - IHostEnvironment env = new MLContext(); - const int imageHeight = 100; - const int imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var imageHeight = 100; + var imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() - { - Column = new ImageLoaderTransform.Column[1] + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = false, - Offset = 127.5f, - Scale = 2f / 255, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = false, + Offset = 127.5f, + Scale = 2f / 255, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=false} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = false, - Offset = -1f, - Scale = 255f / 2, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = false, + Offset = -1f, + Scale = 255f / 2, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=false} } - }, pixels); + }, pixels); - var fname = nameof(TestBackAndForthConversionWithoutAlphaNoInterleave) + "_model.zip"; + var fname = nameof(TestBackAndForthConversionWithoutAlphaNoInterleave) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); + } + } } } Done(); @@ -566,82 +580,84 @@ public void TestBackAndForthConversionWithoutAlphaNoInterleave() [Fact] public void TestBackAndForthConversionWithAlphaInterleaveNoOffset() { - IHostEnvironment env = new MLContext(); - const int imageHeight = 100; - const int imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var imageHeight = 100; + var imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() - { - Column = new ImageLoaderTransform.Column[1] + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = true, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = true, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=true} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = true, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = true, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=true} } - }, pixels); + }, pixels); - var fname = nameof(TestBackAndForthConversionWithAlphaInterleaveNoOffset) + "_model.zip"; + var fname = nameof(TestBackAndForthConversionWithAlphaInterleaveNoOffset) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c == r); - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c == r); + } + } } } Done(); @@ -650,82 +666,84 @@ public void TestBackAndForthConversionWithAlphaInterleaveNoOffset() [Fact] public void TestBackAndForthConversionWithoutAlphaInterleaveNoOffset() { - IHostEnvironment env = new MLContext(); - const int imageHeight = 100; - const int imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var imageHeight = 100; + var imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() - { - Column = new ImageLoaderTransform.Column[1] + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = true, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = true, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=false} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = true, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = true, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=false} } - }, pixels); + }, pixels); - var fname = nameof(TestBackAndForthConversionWithoutAlphaInterleaveNoOffset) + "_model.zip"; + var fname = nameof(TestBackAndForthConversionWithoutAlphaInterleaveNoOffset) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); + } + } } } Done(); @@ -734,82 +752,84 @@ public void TestBackAndForthConversionWithoutAlphaInterleaveNoOffset() [Fact] public void TestBackAndForthConversionWithAlphaNoInterleaveNoOffset() { - IHostEnvironment env = new MLContext(); - const int imageHeight = 100; - var imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var imageHeight = 100; + var imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() - { - Column = new ImageLoaderTransform.Column[1] + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = false, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = false, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=true} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = false, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = false, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=true} } - }, pixels); + }, pixels); - var fname = nameof(TestBackAndForthConversionWithAlphaNoInterleaveNoOffset) + "_model.zip"; + var fname = nameof(TestBackAndForthConversionWithAlphaNoInterleaveNoOffset) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c == r); - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c == r); + } + } } } Done(); @@ -818,85 +838,87 @@ public void TestBackAndForthConversionWithAlphaNoInterleaveNoOffset() [Fact] public void TestBackAndForthConversionWithoutAlphaNoInterleaveNoOffset() { - IHostEnvironment env = new MLContext(); - const int imageHeight = 100; - const int imageWidth = 130; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var imageHeight = 100; + var imageWidth = 130; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() - { - Column = new ImageLoaderTransform.Column[1] + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - InterleaveArgb = false, - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + InterleaveArgb = false, + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "ImagePixels", UseAlpha=false} } - }, cropped); + }, cropped); - IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() - { - InterleaveArgb = false, - Column = new VectorToImageTransform.Column[1]{ + IDataView backToBitmaps = new VectorToImageTransform(env, new VectorToImageTransform.Arguments() + { + InterleaveArgb = false, + Column = new VectorToImageTransform.Column[1]{ new VectorToImageTransform.Column() { Source= "ImagePixels", Name = "ImageRestored" , ImageHeight=imageHeight, ImageWidth=imageWidth, ContainsAlpha=false} } - }, pixels); + }, pixels); - var fname = nameof(TestBackAndForthConversionWithoutAlphaNoInterleaveNoOffset) + "_model.zip"; + var fname = nameof(TestBackAndForthConversionWithoutAlphaNoInterleaveNoOffset) + "_model.zip"; - var fh = env.CreateOutputFile(fname); - using (var ch = env.Start("save")) - TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); + var fh = env.CreateOutputFile(fname); + using (var ch = env.Start("save")) + TrainUtils.SaveModel(env, ch, fh, null, new RoleMappedData(backToBitmaps)); - backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); - DeleteOutputPath(fname); + backToBitmaps = ModelFileUtils.LoadPipeline(env, fh.OpenReadStream(), new MultiFileSource(dataFile)); + DeleteOutputPath(fname); - backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); - backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); - using (var cursor = backToBitmaps.GetRowCursor((x) => true)) - { - var bitmapGetter = cursor.GetGetter(bitmapColumn); - Bitmap restoredBitmap = default; - - var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); - Bitmap croppedBitmap = default; - while (cursor.MoveNext()) - { - bitmapGetter(ref restoredBitmap); - Assert.NotNull(restoredBitmap); - bitmapCropGetter(ref croppedBitmap); - Assert.NotNull(croppedBitmap); - for (int x = 0; x < imageWidth; x++) - for (int y = 0; y < imageHeight; y++) - { - var c = croppedBitmap.GetPixel(x, y); - var r = restoredBitmap.GetPixel(x, y); - Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); - } + backToBitmaps.Schema.TryGetColumnIndex("ImageRestored", out int bitmapColumn); + backToBitmaps.Schema.TryGetColumnIndex("ImageCropped", out int cropBitmapColumn); + using (var cursor = backToBitmaps.GetRowCursor((x) => true)) + { + var bitmapGetter = cursor.GetGetter(bitmapColumn); + Bitmap restoredBitmap = default; + + var bitmapCropGetter = cursor.GetGetter(cropBitmapColumn); + Bitmap croppedBitmap = default; + while (cursor.MoveNext()) + { + bitmapGetter(ref restoredBitmap); + Assert.NotNull(restoredBitmap); + bitmapCropGetter(ref croppedBitmap); + Assert.NotNull(croppedBitmap); + for (int x = 0; x < imageWidth; x++) + for (int y = 0; y < imageHeight; y++) + { + var c = croppedBitmap.GetPixel(x, y); + var r = restoredBitmap.GetPixel(x, y); + Assert.True(c.R == r.R && c.G == r.G && c.B == r.B); + } + } } - Done(); } + Done(); } } } diff --git a/test/Microsoft.ML.Tests/LearningPipelineTests.cs b/test/Microsoft.ML.Tests/LearningPipelineTests.cs index 785fb38603..a459456a03 100644 --- a/test/Microsoft.ML.Tests/LearningPipelineTests.cs +++ b/test/Microsoft.ML.Tests/LearningPipelineTests.cs @@ -66,7 +66,7 @@ public void TransformOnlyPipeline() const string _dataPath = @"..\..\Data\breast-cancer.txt"; var pipeline = new Legacy.LearningPipeline(seed: 1, conc: 1); pipeline.Add(new ML.Legacy.Data.TextLoader(_dataPath).CreateFrom(useHeader: false)); - pipeline.Add(new CategoricalHashOneHotVectorizer("F1") { HashBits = 10, Seed = 314489979, OutputKind = OneHotEncodingTransformerOutputKind.Bag }); + pipeline.Add(new CategoricalHashOneHotVectorizer("F1") { HashBits = 10, Seed = 314489979, OutputKind = CategoricalTransformOutputKind.Bag }); var model = pipeline.Train(); var predictionModel = model.Predict(new InputData() { F1 = "5" }); diff --git a/test/Microsoft.ML.Tests/OnnxTests.cs b/test/Microsoft.ML.Tests/OnnxTests.cs index 8e513a5a93..d6a88f83b4 100644 --- a/test/Microsoft.ML.Tests/OnnxTests.cs +++ b/test/Microsoft.ML.Tests/OnnxTests.cs @@ -82,68 +82,70 @@ public class BreastCancerClusterPrediction [Fact] public void InitializerCreationTest() { - var env = new MLContext(); - // Create the actual implementation - var ctxImpl = new OnnxContextImpl(env, "model", "ML.NET", "0", 0, "com.test", Runtime.Model.Onnx.OnnxVersion.Stable); - - // Use implementation as in the actual conversion code - var ctx = ctxImpl as OnnxContext; - ctx.AddInitializer(9.4f, "float"); - ctx.AddInitializer(17L, "int64"); - ctx.AddInitializer("36", "string"); - ctx.AddInitializer(new List { 9.4f, 1.7f, 3.6f }, new List { 1, 3 }, "floats"); - ctx.AddInitializer(new List { 94L, 17L, 36L }, new List { 1, 3 }, "int64s"); - ctx.AddInitializer(new List { "94", "17", "36" }, new List { 1, 3 }, "strings"); - - var model = ctxImpl.MakeModel(); - - var floatScalar = model.Graph.Initializer[0]; - Assert.True(floatScalar.Name == "float"); - Assert.True(floatScalar.Dims.Count == 0); - Assert.True(floatScalar.FloatData.Count == 1); - Assert.True(floatScalar.FloatData[0] == 9.4f); - - var int64Scalar = model.Graph.Initializer[1]; - Assert.True(int64Scalar.Name == "int64"); - Assert.True(int64Scalar.Dims.Count == 0); - Assert.True(int64Scalar.Int64Data.Count == 1); - Assert.True(int64Scalar.Int64Data[0] == 17L); - - var stringScalar = model.Graph.Initializer[2]; - Assert.True(stringScalar.Name == "string"); - Assert.True(stringScalar.Dims.Count == 0); - Assert.True(stringScalar.StringData.Count == 1); - Assert.True(stringScalar.StringData[0].ToStringUtf8() == "36"); - - var floatsTensor = model.Graph.Initializer[3]; - Assert.True(floatsTensor.Name == "floats"); - Assert.True(floatsTensor.Dims.Count == 2); - Assert.True(floatsTensor.Dims[0] == 1); - Assert.True(floatsTensor.Dims[1] == 3); - Assert.True(floatsTensor.FloatData.Count == 3); - Assert.True(floatsTensor.FloatData[0] == 9.4f); - Assert.True(floatsTensor.FloatData[1] == 1.7f); - Assert.True(floatsTensor.FloatData[2] == 3.6f); - - var int64sTensor = model.Graph.Initializer[4]; - Assert.True(int64sTensor.Name == "int64s"); - Assert.True(int64sTensor.Dims.Count == 2); - Assert.True(int64sTensor.Dims[0] == 1); - Assert.True(int64sTensor.Dims[1] == 3); - Assert.True(int64sTensor.Int64Data.Count == 3); - Assert.True(int64sTensor.Int64Data[0] == 94L); - Assert.True(int64sTensor.Int64Data[1] == 17L); - Assert.True(int64sTensor.Int64Data[2] == 36L); - - var stringsTensor = model.Graph.Initializer[5]; - Assert.True(stringsTensor.Name == "strings"); - Assert.True(stringsTensor.Dims.Count == 2); - Assert.True(stringsTensor.Dims[0] == 1); - Assert.True(stringsTensor.Dims[1] == 3); - Assert.True(stringsTensor.StringData.Count == 3); - Assert.True(stringsTensor.StringData[0].ToStringUtf8() == "94"); - Assert.True(stringsTensor.StringData[1].ToStringUtf8() == "17"); - Assert.True(stringsTensor.StringData[2].ToStringUtf8() == "36"); + using (var env = new ConsoleEnvironment()) + { + // Create the actual implementation + var ctxImpl = new OnnxContextImpl(env, "model", "ML.NET", "0", 0, "com.test", Runtime.Model.Onnx.OnnxVersion.Stable); + + // Use implementation as in the actual conversion code + var ctx = ctxImpl as OnnxContext; + ctx.AddInitializer(9.4f, "float"); + ctx.AddInitializer(17L, "int64"); + ctx.AddInitializer("36", "string"); + ctx.AddInitializer(new List { 9.4f, 1.7f, 3.6f }, new List { 1, 3 }, "floats"); + ctx.AddInitializer(new List { 94L, 17L, 36L }, new List { 1, 3 }, "int64s"); + ctx.AddInitializer(new List { "94" , "17", "36" }, new List { 1, 3 }, "strings"); + + var model = ctxImpl.MakeModel(); + + var floatScalar = model.Graph.Initializer[0]; + Assert.True(floatScalar.Name == "float"); + Assert.True(floatScalar.Dims.Count == 0); + Assert.True(floatScalar.FloatData.Count == 1); + Assert.True(floatScalar.FloatData[0] == 9.4f); + + var int64Scalar = model.Graph.Initializer[1]; + Assert.True(int64Scalar.Name == "int64"); + Assert.True(int64Scalar.Dims.Count == 0); + Assert.True(int64Scalar.Int64Data.Count == 1); + Assert.True(int64Scalar.Int64Data[0] == 17L); + + var stringScalar = model.Graph.Initializer[2]; + Assert.True(stringScalar.Name == "string"); + Assert.True(stringScalar.Dims.Count == 0); + Assert.True(stringScalar.StringData.Count == 1); + Assert.True(stringScalar.StringData[0].ToStringUtf8() == "36"); + + var floatsTensor = model.Graph.Initializer[3]; + Assert.True(floatsTensor.Name == "floats"); + Assert.True(floatsTensor.Dims.Count == 2); + Assert.True(floatsTensor.Dims[0] == 1); + Assert.True(floatsTensor.Dims[1] == 3); + Assert.True(floatsTensor.FloatData.Count == 3); + Assert.True(floatsTensor.FloatData[0] == 9.4f); + Assert.True(floatsTensor.FloatData[1] == 1.7f); + Assert.True(floatsTensor.FloatData[2] == 3.6f); + + var int64sTensor = model.Graph.Initializer[4]; + Assert.True(int64sTensor.Name == "int64s"); + Assert.True(int64sTensor.Dims.Count == 2); + Assert.True(int64sTensor.Dims[0] == 1); + Assert.True(int64sTensor.Dims[1] == 3); + Assert.True(int64sTensor.Int64Data.Count == 3); + Assert.True(int64sTensor.Int64Data[0] == 94L); + Assert.True(int64sTensor.Int64Data[1] == 17L); + Assert.True(int64sTensor.Int64Data[2] == 36L); + + var stringsTensor = model.Graph.Initializer[5]; + Assert.True(stringsTensor.Name == "strings"); + Assert.True(stringsTensor.Dims.Count == 2); + Assert.True(stringsTensor.Dims[0] == 1); + Assert.True(stringsTensor.Dims[1] == 3); + Assert.True(stringsTensor.StringData.Count == 3); + Assert.True(stringsTensor.StringData[0].ToStringUtf8() == "94"); + Assert.True(stringsTensor.StringData[1].ToStringUtf8() == "17"); + Assert.True(stringsTensor.StringData[2].ToStringUtf8() == "36"); + } } [Fact] @@ -257,13 +259,9 @@ public void KeyToVectorWithBagTest() }); var vectorizer = new CategoricalOneHotVectorizer(); - var categoricalColumn = new OneHotEncodingTransformerColumn() - { - OutputKind = OneHotEncodingTransformerOutputKind.Bag, - Name = "F2", - Source = "F2" - }; - vectorizer.Column = new OneHotEncodingTransformerColumn[1] { categoricalColumn }; + var categoricalColumn = new CategoricalTransformColumn() { + OutputKind = CategoricalTransformOutputKind.Bag, Name = "F2", Source = "F2" }; + vectorizer.Column = new CategoricalTransformColumn[1] { categoricalColumn }; pipeline.Add(vectorizer); pipeline.Add(new ColumnConcatenator("Features", "F1", "F2")); pipeline.Add(new FastTreeBinaryClassifier() { NumLeaves = 2, NumTrees = 1, MinDocumentsInLeafs = 2 }); @@ -308,7 +306,7 @@ public void WordEmbeddingsTest() { Separator = new[] { '\t' }, HasHeader = false, - Column = new[] + Column = new [] { new TextLoaderColumn() { @@ -319,7 +317,7 @@ public void WordEmbeddingsTest() } } }); - + var modelPath = GetDataPath(@"shortsentiment.emd"); var embed = new WordEmbeddings() { CustomLookupTable = modelPath }; embed.AddColumn("Cat", "Cat"); diff --git a/test/Microsoft.ML.Tests/RangeFilterTests.cs b/test/Microsoft.ML.Tests/RangeFilterTests.cs deleted file mode 100644 index 5518eee472..0000000000 --- a/test/Microsoft.ML.Tests/RangeFilterTests.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; -using Microsoft.ML.Runtime.Api; -using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.RunTests; -using System.Linq; -using System.Threading; -using Xunit; -using Xunit.Abstractions; - -namespace Microsoft.ML.Tests -{ - public class RangeFilterTests : TestDataPipeBase - { - public RangeFilterTests(ITestOutputHelper helper) : base(helper) - { - } - - [Fact] - public void RangeFilterTest() - { - var builder = new ArrayDataViewBuilder(ML); - builder.AddColumn("Strings", new[] { "foo", "bar", "baz" }); - builder.AddColumn("Floats", NumberType.R4, new float[] { 1, 2, 3 }); - var data = builder.GetDataView(); - - var data1 = ML.Data.FilterByColumn(data, "Floats", upperBound: 2.8); - var cnt = data1.GetColumn(ML, "Floats").Count(); - Assert.Equal(2L, cnt); - - data = ML.Transforms.Conversion.Hash("Strings", "Key", hashBits: 20).Fit(data).Transform(data); - var data2 = ML.Data.FilterByKeyColumnFraction(data, "Key", upperBound: 0.5); - cnt = data2.GetColumn(ML, "Floats").Count(); - Assert.Equal(1L, cnt); - } - } -} diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamples.cs b/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamples.cs index 870ce2cc34..eaf42e4e96 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamples.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamples.cs @@ -153,7 +153,7 @@ private void TrainRegression(string trainDataPath, string testDataPath, string m [Fact] public void TrainRegressionModel() => TrainRegression(GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename), GetDataPath(TestDatasets.generatedRegressionDataset.testFilename), - DeleteOutputPath("cook_model_static.zip")); + DeleteOutputPath("cook_model.zip")); private ITransformer TrainOnIris(string irisDataPath) { @@ -442,10 +442,10 @@ private void TextFeaturizationOn(string dataPath) BagOfBigrams: r.Message.NormalizeText().ToBagofHashedWords(ngramLength: 2, allLengths: false), // NLP pipeline 3: bag of tri-character sequences with TF-IDF weighting. - BagOfTrichar: r.Message.TokenizeIntoCharacters().ToNgrams(ngramLength: 3, weighting: NgramCountingEstimator.WeightingCriteria.TfIdf), + BagOfTrichar: r.Message.TokenizeIntoCharacters().ToNgrams(ngramLength: 3, weighting: NgramTransform.WeightingCriteria.TfIdf), // NLP pipeline 4: word embeddings. - Embeddings: r.Message.NormalizeText().TokenizeText().WordEmbeddings(WordEmbeddingsExtractingTransformer.PretrainedModelKind.GloVeTwitter25D) + Embeddings: r.Message.NormalizeText().TokenizeText().WordEmbeddings(WordEmbeddingsTransform.PretrainedModelKind.GloVeTwitter25D) )); // Let's train our pipeline, and then apply it to the same data. @@ -624,7 +624,7 @@ private void MixMatch(string dataPath) IEstimator dynamicPipe = learningPipeline.AsDynamic; // Create a binary classification trainer. - var binaryTrainer = mlContext.BinaryClassification.Trainers.AveragedPerceptron("Label", "Features"); + var binaryTrainer = mlContext.BinaryClassification.Trainers.AveragedPerceptron(); // Append the OVA learner to the pipeline. dynamicPipe = dynamicPipe.Append(new Ova(mlContext, binaryTrainer)); @@ -654,7 +654,7 @@ private void MixMatch(string dataPath) var model = staticFinalPipe.Fit(data); // And here is how we could've stayed in the dynamic pipeline and train that way. - dynamicPipe = dynamicPipe.Append(new KeyToValueMappingEstimator(mlContext, "PredictedLabel")); + dynamicPipe = dynamicPipe.Append(new KeyToValueEstimator(mlContext, "PredictedLabel")); var dynamicModel = dynamicPipe.Fit(data.AsDynamic); // Now 'dynamicModel', and 'model.AsDynamic' are equivalent. diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs b/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs index 926b9c2d48..5d6bf62eeb 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/CookbookSamples/CookbookSamplesDynamicApi.cs @@ -14,8 +14,6 @@ using Microsoft.ML.Transforms.Text; using System; using System.Collections.Generic; -using System.ComponentModel.Composition; -using System.ComponentModel.Composition.Hosting; using System.IO; using System.Linq; using Xunit; @@ -119,7 +117,7 @@ private void TrainRegression(string trainDataPath, string testDataPath, string m // between -1 and 1 for all examples), and then train the model. mlContext.Transforms.Normalize("FeatureVector") // Add the SDCA regression trainer. - .Append(mlContext.Regression.Trainers.StochasticDualCoordinateAscent(labelColumn: "Target", featureColumn: "FeatureVector")); + .Append(mlContext.Regression.Trainers.StochasticDualCoordinateAscent(label: "Target", features: "FeatureVector")); // Step three. Fit the pipeline to the training data. var model = dynamicPipeline.Fit(trainData); @@ -318,13 +316,13 @@ private void TextFeaturizationOn(string dataPath) // NLP pipeline 3: bag of tri-character sequences with TF-IDF weighting. .Append(mlContext.Transforms.Text.TokenizeCharacters("Message", "MessageChars")) - .Append(new NgramCountingEstimator(mlContext, "MessageChars", "BagOfTrichar", - ngramLength: 3, weighting: NgramCountingEstimator.WeightingCriteria.TfIdf)) + .Append(new NgramEstimator(mlContext, "MessageChars", "BagOfTrichar", + ngramLength: 3, weighting: NgramTransform.WeightingCriteria.TfIdf)) // NLP pipeline 4: word embeddings. .Append(mlContext.Transforms.Text.TokenizeWords("NormalizedMessage", "TokenizedMessage")) - .Append(mlContext.Transforms.Text.ExtractWordEmbeddings("TokenizedMessage", "Embeddings", - WordEmbeddingsExtractingTransformer.PretrainedModelKind.GloVeTwitter25D)); + .Append(mlContext.Transforms.Text.ExtractWordEmbeedings("TokenizedMessage", "Embeddings", + WordEmbeddingsTransform.PretrainedModelKind.GloVeTwitter25D)); // Let's train our pipeline, and then apply it to the same data. // Note that even on a small dataset of 70KB the pipeline above can take up to a minute to completely train. @@ -335,7 +333,7 @@ private void TextFeaturizationOn(string dataPath) var unigrams = transformedData.GetColumn(mlContext, "BagOfWords").Take(10).ToArray(); } - [Fact(Skip = "This test is running for one minute")] + [Fact (Skip = "This test is running for one minute")] public void TextFeaturization() => TextFeaturizationOn(GetDataPath("wikipedia-detox-250-line-data.tsv")); @@ -379,7 +377,7 @@ private void CategoricalFeaturizationOn(params string[] dataPath) // Convert each categorical feature into one-hot encoding independently. mlContext.Transforms.Categorical.OneHotEncoding("CategoricalFeatures", "CategoricalOneHot") // Convert all categorical features into indices, and build a 'word bag' of these. - .Append(mlContext.Transforms.Categorical.OneHotEncoding("CategoricalFeatures", "CategoricalBag", OneHotEncodingTransformer.OutputKind.Bag)) + .Append(mlContext.Transforms.Categorical.OneHotEncoding("CategoricalFeatures", "CategoricalBag", CategoricalTransform.OutputKind.Bag)) // One-hot encode the workclass column, then drop all the categories that have fewer than 10 instances in the train set. .Append(mlContext.Transforms.Categorical.OneHotEncoding("Workclass", "WorkclassOneHot")) .Append(new CountFeatureSelector(mlContext, "WorkclassOneHot", "WorkclassOneHotTrimmed", count: 10)); @@ -460,7 +458,7 @@ private void CrossValidationOn(string dataPath) var microAccuracies = cvResults.Select(r => r.metrics.AccuracyMicro); Console.WriteLine(microAccuracies.Average()); } - + [Fact] public void ReadData() { @@ -487,99 +485,6 @@ private void ReadDataDynamic(string dataPath) var data = reader.Read(dataPath); } - // Define a class for all the input columns that we intend to consume. - public class InputRow - { - public float Income { get; set; } - } - - // Define a class for all output columns that we intend to produce. - public class OutputRow - { - public bool Label { get; set; } - } - - [Fact] - public void CustomTransformer() - { - var mlContext = new MLContext(); - var data = mlContext.Data.ReadFromTextFile(new[] - { - new TextLoader.Column("Income", DataKind.R4, 2), - new TextLoader.Column("Features", DataKind.R4, 10, 12) - }, GetDataPath("adult.train"), s => { s.Separator = ","; s.HasHeader = true; }); - - PrepareData(mlContext, data); - TrainModel(mlContext, data); - - RunEndToEnd(mlContext, data, DeleteOutputPath("custom-model.zip")); - } - - /// - /// One class that contains all custom mappings that we need for our model. - /// - public class CustomMappings - { - // This is the custom mapping. We now separate it into a method, so that we can use it both in training and in loading. - public static void IncomeMapping(InputRow input, OutputRow output) => output.Label = input.Income > 50000; - - // MLContext is needed to create a new transformer. We are using 'Import' to have ML.NET populate - // this property. - [Import] - public MLContext MLContext { get; set; } - - // We are exporting the custom transformer by the name 'IncomeMapping'. - [Export(nameof(IncomeMapping))] - public ITransformer MyCustomTransformer - => MLContext.Transforms.CustomMappingTransformer(IncomeMapping, nameof(IncomeMapping)); - } - - private static void RunEndToEnd(MLContext mlContext, IDataView trainData, string modelPath) - { - // Construct the learning pipeline. Note that we are now providing a contract name for the custom mapping: - // otherwise we will not be able to save the model. - var estimator = mlContext.Transforms.CustomMapping(CustomMappings.IncomeMapping, nameof(CustomMappings.IncomeMapping)) - .Append(mlContext.BinaryClassification.Trainers.FastTree(labelColumn: "Label")); - - // Train the model. - var model = estimator.Fit(trainData); - - // Save the model. - using (var fs = File.Create(modelPath)) - mlContext.Model.Save(model, fs); - - // Now pretend we are in a different process. - var newContext = new MLContext(); - - // Create a custom composition container for all our custom mapping actions. - newContext.CompositionContainer = new CompositionContainer(new TypeCatalog(typeof(CustomMappings))); - - // Now we can load the model. - ITransformer loadedModel; - using (var fs = File.OpenRead(modelPath)) - loadedModel = newContext.Model.Load(fs); - } - - public static IDataView PrepareData(MLContext mlContext, IDataView data) - { - // Define the operation code. - Action mapping = (input, output) => output.Label = input.Income > 50000; - // Make a custom transformer and transform the data. - var transformer = mlContext.Transforms.CustomMappingTransformer(mapping, null); - return transformer.Transform(data); - } - - public static ITransformer TrainModel(MLContext mlContext, IDataView trainData) - { - // Define the custom operation. - Action mapping = (input, output) => output.Label = input.Income > 50000; - // Construct the learning pipeline. - var estimator = mlContext.Transforms.CustomMapping(mapping, null) - .Append(mlContext.BinaryClassification.Trainers.FastTree(labelColumn: "Label")); - - return estimator.Fit(trainData); - } - private class CustomerChurnInfo { public string CustomerID { get; set; } diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/CrossValidation.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/CrossValidation.cs index 1eeaf9c13c..55a88e28cb 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/CrossValidation.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/CrossValidation.cs @@ -4,11 +4,7 @@ using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.RunTests; -using Microsoft.ML.Transforms.Categorical; -using Microsoft.ML.Transforms.Conversions; using Xunit; -using System; -using System.Linq; namespace Microsoft.ML.Tests.Scenarios.Api { @@ -30,7 +26,7 @@ void New_CrossValidation() var data = ml.Data.TextReader(MakeSentimentTextLoaderArgs()).Read(GetDataPath(TestDatasets.Sentiment.trainFilename)); // Pipeline. var pipeline = ml.Transforms.Text.FeaturizeText("SentimentText", "Features") - .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: (s) => { s.ConvergenceTolerance = 1f; s.NumThreads = 1; })); + .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: (s) => { s.ConvergenceTolerance = 1f; s.NumThreads = 1; })); var cvResult = ml.BinaryClassification.CrossValidate(data, pipeline); } diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/DecomposableTrainAndPredict.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/DecomposableTrainAndPredict.cs index a6a1bb6e6e..d316cf6ae9 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/DecomposableTrainAndPredict.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/DecomposableTrainAndPredict.cs @@ -34,8 +34,8 @@ void New_DecomposableTrainAndPredict() var pipeline = new ColumnConcatenatingEstimator (ml, "Features", "SepalLength", "SepalWidth", "PetalLength", "PetalWidth") .Append(new ValueToKeyMappingEstimator(ml, "Label"), TransformerScope.TrainTest) - .Append(ml.MulticlassClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features",advancedSettings: s => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; })) - .Append(new KeyToValueMappingEstimator(ml, "PredictedLabel")); + .Append(ml.MulticlassClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; })) + .Append(new KeyToValueEstimator(ml, "PredictedLabel")); var model = pipeline.Fit(data).GetModelFor(TransformerScope.Scoring); var engine = model.MakePredictionFunction(ml); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Evaluation.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Evaluation.cs index ad249fa6e9..434264cbe7 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Evaluation.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Evaluation.cs @@ -24,7 +24,7 @@ public void New_Evaluation() // Pipeline. var pipeline = ml.Data.TextReader(MakeSentimentTextLoaderArgs()) .Append(ml.Transforms.Text.FeaturizeText("SentimentText", "Features")) - .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: s => s.NumThreads = 1)); + .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => s.NumThreads = 1)); // Train. var readerModel = pipeline.Fit(new MultiFileSource(GetDataPath(TestDatasets.Sentiment.trainFilename))); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Extensibility.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Extensibility.cs index 5ab9cf377d..a6e81fbc96 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Extensibility.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Extensibility.cs @@ -42,8 +42,8 @@ void New_Extensibility() var pipeline = new ColumnConcatenatingEstimator (ml, "Features", "SepalLength", "SepalWidth", "PetalLength", "PetalWidth") .Append(new CustomMappingEstimator(ml, action, null), TransformerScope.TrainTest) .Append(new ValueToKeyMappingEstimator(ml, "Label"), TransformerScope.TrainTest) - .Append(ml.MulticlassClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; })) - .Append(new KeyToValueMappingEstimator(ml, "PredictedLabel")); + .Append(ml.MulticlassClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; })) + .Append(new KeyToValueEstimator(ml, "PredictedLabel")); var model = pipeline.Fit(data).GetModelFor(TransformerScope.Scoring); var engine = model.MakePredictionFunction(ml); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/FileBasedSavingOfData.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/FileBasedSavingOfData.cs index 667581c9b3..d304c8bda8 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/FileBasedSavingOfData.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/FileBasedSavingOfData.cs @@ -39,7 +39,7 @@ void New_FileBasedSavingOfData() DataSaverUtils.SaveDataView(ch, saver, trainData, file); } - var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: s => s.NumThreads = 1); + var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => s.NumThreads = 1); var loadedTrainData = new BinaryLoader(ml, new BinaryLoader.Arguments(), new MultiFileSource(path)); // Train. diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/IntrospectiveTraining.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/IntrospectiveTraining.cs index d0ba9a82db..60552a2863 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/IntrospectiveTraining.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/IntrospectiveTraining.cs @@ -38,7 +38,7 @@ public void New_IntrospectiveTraining() .Read(GetDataPath(TestDatasets.Sentiment.trainFilename)); var pipeline = ml.Transforms.Text.FeaturizeText("SentimentText", "Features") - .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: s => s.NumThreads = 1)); + .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => s.NumThreads = 1)); // Train. var model = pipeline.Fit(data); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Metacomponents.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Metacomponents.cs index 94206fefc4..6b8abd8d39 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Metacomponents.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/Metacomponents.cs @@ -27,12 +27,12 @@ public void New_Metacomponents() var data = ml.Data.TextReader(MakeIrisTextLoaderArgs()) .Read(GetDataPath(TestDatasets.irisData.trainFilename)); - var sdcaTrainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; }); + var sdcaTrainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; }); var pipeline = new ColumnConcatenatingEstimator (ml, "Features", "SepalLength", "SepalWidth", "PetalLength", "PetalWidth") .Append(new ValueToKeyMappingEstimator(ml, "Label"), TransformerScope.TrainTest) .Append(new Ova(ml, sdcaTrainer)) - .Append(new KeyToValueMappingEstimator(ml, "PredictedLabel")); + .Append(new KeyToValueEstimator(ml, "PredictedLabel")); var model = pipeline.Fit(data); } diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/MultithreadedPrediction.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/MultithreadedPrediction.cs index 4f52662d34..784d14c770 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/MultithreadedPrediction.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/MultithreadedPrediction.cs @@ -31,7 +31,7 @@ void New_MultithreadedPrediction() // Pipeline. var pipeline = ml.Transforms.Text.FeaturizeText("SentimentText", "Features") - .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: s => s.NumThreads = 1)); + .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => s.NumThreads = 1)); // Train. var model = pipeline.Fit(data); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/ReconfigurablePrediction.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/ReconfigurablePrediction.cs index 5755efe56e..343d1ee6a9 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/ReconfigurablePrediction.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/ReconfigurablePrediction.cs @@ -31,7 +31,7 @@ public void New_ReconfigurablePrediction() var pipeline = ml.Transforms.Text.FeaturizeText("SentimentText", "Features") .Fit(data); - var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: (s) => s.NumThreads = 1); + var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: (s) => s.NumThreads = 1); var trainData = pipeline.Transform(data); var model = trainer.Fit(trainData); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs index ad1f37e161..907736ec43 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/SimpleTrainAndPredict.cs @@ -26,7 +26,7 @@ public void New_SimpleTrainAndPredict() var data = reader.Read(GetDataPath(TestDatasets.Sentiment.trainFilename)); // Pipeline. var pipeline = ml.Transforms.Text.FeaturizeText("SentimentText", "Features") - .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: s => s.NumThreads = 1)); + .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => s.NumThreads = 1)); // Train. var model = pipeline.Fit(data); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainSaveModelAndPredict.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainSaveModelAndPredict.cs index 630d9e71aa..38902d75cf 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainSaveModelAndPredict.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainSaveModelAndPredict.cs @@ -30,7 +30,7 @@ public void New_TrainSaveModelAndPredict() // Pipeline. var pipeline = ml.Transforms.Text.FeaturizeText("SentimentText", "Features") - .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: s => s.NumThreads = 1)); + .Append(ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => s.NumThreads = 1)); // Train. var model = pipeline.Fit(data); diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithInitialPredictor.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithInitialPredictor.cs index 32486abb27..4b29dd16d3 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithInitialPredictor.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithInitialPredictor.cs @@ -31,14 +31,14 @@ public void New_TrainWithInitialPredictor() var trainData = pipeline.Fit(data).Transform(data); // Train the first predictor. - var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features",advancedSettings: s => s.NumThreads = 1); + var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(advancedSettings: s => s.NumThreads = 1); var firstModel = trainer.Fit(trainData); // Train the second predictor on the same data. - var secondTrainer = ml.BinaryClassification.Trainers.AveragedPerceptron("Label","Features"); + var secondTrainer = ml.BinaryClassification.Trainers.AveragedPerceptron(); var trainRoles = new RoleMappedData(trainData, label: "Label", feature: "Features"); - var finalModel = ((ITrainer)secondTrainer).Train(new TrainContext(trainRoles, initialPredictor: firstModel.Model)); + var finalModel = secondTrainer.Train(new TrainContext(trainRoles, initialPredictor: firstModel.Model)); } } diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithValidationSet.cs b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithValidationSet.cs index 07c9ebeb8a..4a977a6b2b 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithValidationSet.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/Estimators/TrainWithValidationSet.cs @@ -30,7 +30,7 @@ public void New_TrainWithValidationSet() var validData = preprocess.Transform(reader.Read(GetDataPath(TestDatasets.Sentiment.testFilename))); // Train model with validation set. - var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent("Label","Features"); + var trainer = ml.BinaryClassification.Trainers.StochasticDualCoordinateAscent(); var model = trainer.Train(trainData, validData); } } diff --git a/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs b/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs index b3086a68a1..5115a25be9 100644 --- a/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs +++ b/test/Microsoft.ML.Tests/Scenarios/Api/TestApi.cs @@ -62,78 +62,80 @@ private class TwoIChannelsOnlyOneWithAttribute [Fact] public void CursorChannelExposedInMapTransform() { - var env = new MLContext(seed: 0); - // Correct use of CursorChannel attribute. - var data1 = Utils.CreateArray(10, new OneIChannelWithAttribute()); - var idv1 = env.CreateDataView(data1); - Assert.Null(data1[0].Channel); - - var filter1 = LambdaTransform.CreateFilter(env, idv1, - (input, state) => + using (var env = new ConsoleEnvironment(0)) + { + // Correct use of CursorChannel attribute. + var data1 = Utils.CreateArray(10, new OneIChannelWithAttribute()); + var idv1 = env.CreateDataView(data1); + Assert.Null(data1[0].Channel); + + var filter1 = LambdaTransform.CreateFilter(env, idv1, + (input, state) => + { + Assert.NotNull(input.Channel); + return false; + }, null); + filter1.GetRowCursor(col => true).MoveNext(); + + // Error case: non-IChannel field marked with attribute. + var data2 = Utils.CreateArray(10, new OneStringWithAttribute()); + var idv2 = env.CreateDataView(data2); + Assert.Null(data2[0].Channel); + + var filter2 = LambdaTransform.CreateFilter(env, idv2, + (input, state) => + { + Assert.Null(input.Channel); + return false; + }, null); + try { - Assert.NotNull(input.Channel); - return false; - }, null); - filter1.GetRowCursor(col => true).MoveNext(); - - // Error case: non-IChannel field marked with attribute. - var data2 = Utils.CreateArray(10, new OneStringWithAttribute()); - var idv2 = env.CreateDataView(data2); - Assert.Null(data2[0].Channel); - - var filter2 = LambdaTransform.CreateFilter(env, idv2, - (input, state) => + filter2.GetRowCursor(col => true).MoveNext(); + Assert.True(false, "Throw an error if attribute is applied to a field that is not an IChannel."); + } + catch (InvalidOperationException ex) { - Assert.Null(input.Channel); - return false; - }, null); - try - { - filter2.GetRowCursor(col => true).MoveNext(); - Assert.True(false, "Throw an error if attribute is applied to a field that is not an IChannel."); - } - catch (InvalidOperationException ex) - { - Assert.True(ex.IsMarked()); - } + Assert.True(ex.IsMarked()); + } - // Error case: multiple fields marked with attributes. - var data3 = Utils.CreateArray(10, new TwoIChannelsWithAttributes()); - var idv3 = env.CreateDataView(data3); - Assert.Null(data3[0].ChannelOne); - Assert.Null(data3[2].ChannelTwo); + // Error case: multiple fields marked with attributes. + var data3 = Utils.CreateArray(10, new TwoIChannelsWithAttributes()); + var idv3 = env.CreateDataView(data3); + Assert.Null(data3[0].ChannelOne); + Assert.Null(data3[2].ChannelTwo); - var filter3 = LambdaTransform.CreateFilter(env, idv3, - (input, state) => + var filter3 = LambdaTransform.CreateFilter(env, idv3, + (input, state) => + { + Assert.Null(input.ChannelOne); + Assert.Null(input.ChannelTwo); + return false; + }, null); + try { - Assert.Null(input.ChannelOne); - Assert.Null(input.ChannelTwo); - return false; - }, null); - try - { - filter3.GetRowCursor(col => true).MoveNext(); - Assert.True(false, "Throw an error if attribute is applied to a field that is not an IChannel."); - } - catch (InvalidOperationException ex) - { - Assert.True(ex.IsMarked()); - } + filter3.GetRowCursor(col => true).MoveNext(); + Assert.True(false, "Throw an error if attribute is applied to a field that is not an IChannel."); + } + catch (InvalidOperationException ex) + { + Assert.True(ex.IsMarked()); + } - // Correct case: non-marked IChannel field is not touched. - var example4 = new TwoIChannelsOnlyOneWithAttribute(); - Assert.Null(example4.ChannelTwo); - Assert.Null(example4.ChannelOne); - var idv4 = env.CreateDataView(Utils.CreateArray(10, example4)); + // Correct case: non-marked IChannel field is not touched. + var example4 = new TwoIChannelsOnlyOneWithAttribute(); + Assert.Null(example4.ChannelTwo); + Assert.Null(example4.ChannelOne); + var idv4 = env.CreateDataView(Utils.CreateArray(10, example4)); - var filter4 = LambdaTransform.CreateFilter(env, idv4, - (input, state) => - { - Assert.Null(input.ChannelOne); - Assert.NotNull(input.ChannelTwo); - return false; - }, null); - filter1.GetRowCursor(col => true).MoveNext(); + var filter4 = LambdaTransform.CreateFilter(env, idv4, + (input, state) => + { + Assert.Null(input.ChannelOne); + Assert.NotNull(input.ChannelTwo); + return false; + }, null); + filter1.GetRowCursor(col => true).MoveNext(); + } } public class BreastCancerExample @@ -147,40 +149,44 @@ public class BreastCancerExample [Fact] public void LambdaTransformCreate() { - var env = new MLContext(seed: 42); - var data = ReadBreastCancerExamples(); - var idv = env.CreateDataView(data); + using (var env = new ConsoleEnvironment(42)) + { + var data = ReadBreastCancerExamples(); + var idv = env.CreateDataView(data); - var filter = LambdaTransform.CreateFilter(env, idv, - (input, state) => input.Label == 0, null); + var filter = LambdaTransform.CreateFilter(env, idv, + (input, state) => input.Label == 0, null); - Assert.Null(filter.GetRowCount()); + Assert.Null(filter.GetRowCount(false)); - // test re-apply - var applied = env.CreateDataView(data); - applied = ApplyTransformUtils.ApplyAllTransformsToData(env, filter, applied); + // test re-apply + var applied = env.CreateDataView(data); + applied = ApplyTransformUtils.ApplyAllTransformsToData(env, filter, applied); - var saver = new TextSaver(env, new TextSaver.Arguments()); - Assert.True(applied.Schema.TryGetColumnIndex("Label", out int label)); - using (var fs = File.Create(GetOutputPath(OutputRelativePath, "lambda-output.tsv"))) - saver.SaveData(fs, applied, label); + var saver = new TextSaver(env, new TextSaver.Arguments()); + Assert.True(applied.Schema.TryGetColumnIndex("Label", out int label)); + using (var fs = File.Create(GetOutputPath(OutputRelativePath, "lambda-output.tsv"))) + saver.SaveData(fs, applied, label); + } } [Fact] public void TrainAveragedPerceptronWithCache() { - var env = new MLContext(0); - var dataFile = GetDataPath("breast-cancer.txt"); - var loader = TextLoader.Create(env, new TextLoader.Arguments(), new MultiFileSource(dataFile)); - var globalCounter = 0; - var xf = LambdaTransform.CreateFilter(env, loader, - (i, s) => true, - s => { globalCounter++; }); + using (var env = new ConsoleEnvironment(0)) + { + var dataFile = GetDataPath("breast-cancer.txt"); + var loader = TextLoader.Create(env, new TextLoader.Arguments(), new MultiFileSource(dataFile)); + var globalCounter = 0; + var xf = LambdaTransform.CreateFilter(env, loader, + (i, s) => true, + s => { globalCounter++; }); - new AveragedPerceptronTrainer(env, "Label", "Features", numIterations: 2).Fit(xf).Transform(xf); + new AveragedPerceptronTrainer(env, "Label", "Features", numIterations: 2).Fit(xf).Transform(xf); - // Make sure there were 2 cursoring events. - Assert.Equal(1, globalCounter); + // Make sure there were 2 cursoring events. + Assert.Equal(1, globalCounter); + } } private List ReadBreastCancerExamples() diff --git a/test/Microsoft.ML.Tests/Scenarios/OvaTest.cs b/test/Microsoft.ML.Tests/Scenarios/OvaTest.cs deleted file mode 100644 index 4e22905a4a..0000000000 --- a/test/Microsoft.ML.Tests/Scenarios/OvaTest.cs +++ /dev/null @@ -1,148 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Data; -using Microsoft.ML.Runtime.Learners; -using Microsoft.ML.Trainers.FastTree; -using Microsoft.ML.Trainers.Online; -using Xunit; - -namespace Microsoft.ML.Scenarios -{ - public partial class ScenariosTests - { - [Fact] - public void OvaLogisticRegression() - { - string dataPath = GetDataPath("iris.txt"); - - // Create a new context for ML.NET operations. It can be used for exception tracking and logging, - // as a catalog of available operations and as the source of randomness. - var mlContext = new MLContext(seed: 1); - var reader = new TextLoader(mlContext, new TextLoader.Arguments() - { - Column = new[] - { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(1, 4) }), - } - }); - - // Data - var data = reader.Read(GetDataPath(dataPath)); - - // Pipeline - var pipeline = new Ova( - mlContext, - new LogisticRegression(mlContext, "Label", "Features"), - useProbabilities: false); - - var model = pipeline.Fit(data); - var predictions = model.Transform(data); - - // Metrics - var metrics = mlContext.MulticlassClassification.Evaluate(predictions); - Assert.True(metrics.AccuracyMicro > 0.94); - } - - [Fact] - public void OvaAveragedPerceptron() - { - string dataPath = GetDataPath("iris.txt"); - - // Create a new context for ML.NET operations. It can be used for exception tracking and logging, - // as a catalog of available operations and as the source of randomness. - var mlContext = new MLContext(seed: 1); - var reader = new TextLoader(mlContext, new TextLoader.Arguments() - { - Column = new[] - { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(1, 4) }), - } - }); - - // Data - var data = reader.Read(GetDataPath(dataPath)); - - // Pipeline - var pipeline = new Ova( - mlContext, - new AveragedPerceptronTrainer(mlContext, "Label", "Features", advancedSettings: s => { s.Shuffle = true; s.Calibrator = null; }), - useProbabilities: false); - - var model = pipeline.Fit(data); - var predictions = model.Transform(data); - - // Metrics - var metrics = mlContext.MulticlassClassification.Evaluate(predictions); - Assert.True(metrics.AccuracyMicro > 0.71); - } - - [Fact] - public void OvaFastTree() - { - string dataPath = GetDataPath("iris.txt"); - - // Create a new context for ML.NET operations. It can be used for exception tracking and logging, - // as a catalog of available operations and as the source of randomness. - var mlContext = new MLContext(seed: 1); - var reader = new TextLoader(mlContext, new TextLoader.Arguments() - { - Column = new[] - { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(1, 4) }), - } - }); - - // Data - var data = reader.Read(GetDataPath(dataPath)); - - // Pipeline - var pipeline = new Ova( - mlContext, - new FastTreeBinaryClassificationTrainer(mlContext, "Label", "Features", advancedSettings: s => { s.NumThreads = 1; }), - useProbabilities: false); - - var model = pipeline.Fit(data); - var predictions = model.Transform(data); - - // Metrics - var metrics = mlContext.MulticlassClassification.Evaluate(predictions); - Assert.True(metrics.AccuracyMicro > 0.99); - } - - [Fact] - public void OvaLinearSvm() - { - string dataPath = GetDataPath("iris.txt"); - - // Create a new context for ML.NET operations. It can be used for exception tracking and logging, - // as a catalog of available operations and as the source of randomness. - var mlContext = new MLContext(seed: 1); - var reader = new TextLoader(mlContext, new TextLoader.Arguments() - { - Column = new[] - { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("Features", DataKind.R4, new [] { new TextLoader.Range(1, 4) }), - } - }); - - // Data - var data = reader.Read(GetDataPath(dataPath)); - - // Pipeline - var pipeline = new Ova(mlContext, new LinearSvm(mlContext, new LinearSvm.Arguments()), useProbabilities: false); - - var model = pipeline.Fit(data); - var predictions = model.Transform(data); - - // Metrics - var metrics = mlContext.MulticlassClassification.Evaluate(predictions); - Assert.True(metrics.AccuracyMicro > 0.83); - } - } -} diff --git a/test/Microsoft.ML.Tests/Scenarios/SentimentPredictionTests.cs b/test/Microsoft.ML.Tests/Scenarios/SentimentPredictionTests.cs index a67834cda0..089edc4407 100644 --- a/test/Microsoft.ML.Tests/Scenarios/SentimentPredictionTests.cs +++ b/test/Microsoft.ML.Tests/Scenarios/SentimentPredictionTests.cs @@ -420,7 +420,8 @@ private LearningPipeline PreparePipelineSymSGD() WordFeatureExtractor = new NGramNgramExtractor() { NgramLength = 2, AllLengths = true } }); - pipeline.Add(new SymSgdBinaryClassifier() { NumberOfThreads = 1 }); + + pipeline.Add(new SymSgdBinaryClassifier() { NumberOfThreads = 1}); pipeline.Add(new PredictedLabelColumnOriginalValueConverter() { PredictedLabelColumn = "PredictedLabel" }); return pipeline; diff --git a/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs b/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs index 7d4b248dcb..e0abab35b4 100644 --- a/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs +++ b/test/Microsoft.ML.Tests/Scenarios/TensorflowTests.cs @@ -5,6 +5,7 @@ using Microsoft.ML.Legacy.Trainers; using Microsoft.ML.Legacy.Transforms; using Microsoft.ML.Runtime.Api; +using Microsoft.ML.Transforms.TensorFlow; using System; using System.IO; using Xunit; diff --git a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs index f4f95243d5..8ed4aa335e 100644 --- a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs +++ b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/IrisPlantClassificationTests.cs @@ -2,14 +2,12 @@ // 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.Data; using Microsoft.ML.Legacy.Models; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Api; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Learners; using Microsoft.ML.Runtime.Model; -using Microsoft.ML.Runtime.RunTests; using Microsoft.ML.Trainers; using Microsoft.ML.Transforms.Normalizers; using System; @@ -23,43 +21,56 @@ public partial class ScenariosTests [Fact] public void TrainAndPredictIrisModelUsingDirectInstantiationTest() { - var mlContext = new MLContext(seed: 1, conc: 1); + string dataPath = GetDataPath("iris.txt"); + string testDataPath = dataPath; - var reader = mlContext.Data.TextReader(new TextLoader.Arguments() + using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) { - HasHeader = false, - Column = new[] - { - new TextLoader.Column("Label", DataKind.R4, 0), - new TextLoader.Column("SepalLength", DataKind.R4, 1), - new TextLoader.Column("SepalWidth", DataKind.R4, 2), - new TextLoader.Column("PetalLength", DataKind.R4, 3), - new TextLoader.Column("PetalWidth", DataKind.R4, 4) - } - }); - - var pipe = mlContext.Transforms.Concatenate("Features", "SepalLength", "SepalWidth", "PetalLength", "PetalWidth") - .Append(mlContext.Transforms.Normalize("Features")) - .Append(mlContext.MulticlassClassification.Trainers.StochasticDualCoordinateAscent("Label", "Features", advancedSettings: s => s.NumThreads = 1)); - - // Read training and test data sets - string dataPath = GetDataPath(TestDatasets.iris.trainFilename); - string testDataPath = dataPath; - var trainData = reader.Read(dataPath); - var testData = reader.Read(testDataPath); - - // Train the pipeline - var trainedModel = pipe.Fit(trainData); - - // Make prediction and then evaluate the trained pipeline - var predicted = trainedModel.Transform(testData); - var metrics = mlContext.MulticlassClassification.Evaluate(predicted); - CompareMatrics(metrics); - var predictFunction = trainedModel.MakePredictionFunction(mlContext); - ComparePredictions(predictFunction); + // Pipeline + var loader = TextLoader.ReadFile(env, + new TextLoader.Arguments() + { + HasHeader = false, + Column = new[] + { + new TextLoader.Column("Label", DataKind.R4, 0), + new TextLoader.Column("SepalLength", DataKind.R4, 1), + new TextLoader.Column("SepalWidth", DataKind.R4, 2), + new TextLoader.Column("PetalLength", DataKind.R4, 3), + new TextLoader.Column("PetalWidth", DataKind.R4, 4) + } + }, new MultiFileSource(dataPath)); + + IDataView pipeline = new ConcatTransform(env, "Features", + "SepalLength", "SepalWidth", "PetalLength", "PetalWidth").Transform(loader); + + // NormalizingEstimator is not automatically added though the trainer has 'NormalizeFeatures' On/Auto + pipeline = NormalizeTransform.CreateMinMaxNormalizer(env, pipeline, "Features"); + + // Train + var trainer = new SdcaMultiClassTrainer(env, "Features", "Label", advancedSettings: (s) => s.NumThreads = 1); + + // Explicity adding CacheDataView since caching is not working though trainer has 'Caching' On/Auto + var cached = new CacheDataView(env, pipeline, prefetch: null); + var trainRoles = new RoleMappedData(cached, label: "Label", feature: "Features"); + var pred = trainer.Train(trainRoles); + + // Get scorer and evaluate the predictions from test data + IDataScorerTransform testDataScorer = GetScorer(env, pipeline, pred, testDataPath); + var metrics = Evaluate(env, testDataScorer); + CompareMatrics(metrics); + + // Create prediction engine and test predictions + var model = env.CreatePredictionEngine(testDataScorer); + ComparePredictions(model); + + // Get feature importance i.e. weight vector + var summary = ((MulticlassLogisticRegressionPredictor)pred).GetSummaryInKeyValuePairs(trainRoles.Schema); + Assert.Equal(7.757864, Convert.ToDouble(summary[0].Value), 5); + } } - private void ComparePredictions(PredictionFunction model) + private void ComparePredictions(PredictionEngine model) { IrisPrediction prediction = model.Predict(new IrisData() { @@ -98,17 +109,46 @@ private void ComparePredictions(PredictionFunction mod Assert.Equal(0, prediction.PredictedLabels[2], 2); } - private void CompareMatrics(MultiClassClassifierEvaluator.Result metrics) + private void CompareMatrics(ClassificationMetrics metrics) { Assert.Equal(.98, metrics.AccuracyMacro); Assert.Equal(.98, metrics.AccuracyMicro, 2); - Assert.InRange(metrics.LogLoss, .05, .06); + Assert.Equal(.06, metrics.LogLoss, 2); Assert.InRange(metrics.LogLossReduction, 94, 96); + Assert.Equal(1, metrics.TopKAccuracy); Assert.Equal(3, metrics.PerClassLogLoss.Length); Assert.Equal(0, metrics.PerClassLogLoss[0], 1); Assert.Equal(.1, metrics.PerClassLogLoss[1], 1); Assert.Equal(.1, metrics.PerClassLogLoss[2], 1); + + ConfusionMatrix matrix = metrics.ConfusionMatrix; + Assert.Equal(3, matrix.Order); + Assert.Equal(3, matrix.ClassNames.Count); + Assert.Equal("0", matrix.ClassNames[0]); + Assert.Equal("1", matrix.ClassNames[1]); + Assert.Equal("2", matrix.ClassNames[2]); + + Assert.Equal(50, matrix[0, 0]); + Assert.Equal(50, matrix["0", "0"]); + Assert.Equal(0, matrix[0, 1]); + Assert.Equal(0, matrix["0", "1"]); + Assert.Equal(0, matrix[0, 2]); + Assert.Equal(0, matrix["0", "2"]); + + Assert.Equal(0, matrix[1, 0]); + Assert.Equal(0, matrix["1", "0"]); + Assert.Equal(48, matrix[1, 1]); + Assert.Equal(48, matrix["1", "1"]); + Assert.Equal(2, matrix[1, 2]); + Assert.Equal(2, matrix["1", "2"]); + + Assert.Equal(0, matrix[2, 0]); + Assert.Equal(0, matrix["2", "0"]); + Assert.Equal(1, matrix[2, 1]); + Assert.Equal(1, matrix["2", "1"]); + Assert.Equal(49, matrix[2, 2]); + Assert.Equal(49, matrix["2", "2"]); } private ClassificationMetrics Evaluate(IHostEnvironment env, IDataView scoredData) diff --git a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/SentimentPredictionTests.cs b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/SentimentPredictionTests.cs index 820d146cc1..60892e9325 100644 --- a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/SentimentPredictionTests.cs +++ b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/SentimentPredictionTests.cs @@ -22,9 +22,10 @@ public void TrainAndPredictSentimentModelWithDirectionInstantiationTest() var dataPath = GetDataPath(SentimentDataPath); var testDataPath = GetDataPath(SentimentTestPath); - var env = new MLContext(seed: 1, conc: 1); - // Pipeline - var loader = TextLoader.ReadFile(env, + using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) + { + // Pipeline + var loader = TextLoader.ReadFile(env, new TextLoader.Arguments() { Separator = "tab", @@ -36,45 +37,46 @@ public void TrainAndPredictSentimentModelWithDirectionInstantiationTest() } }, new MultiFileSource(dataPath)); - var trans = TextFeaturizingEstimator.Create(env, new TextFeaturizingEstimator.Arguments() - { - Column = new TextFeaturizingEstimator.Column + var trans = TextFeaturizingEstimator.Create(env, new TextFeaturizingEstimator.Arguments() { - Name = "Features", - Source = new[] { "SentimentText" } + Column = new TextFeaturizingEstimator.Column + { + Name = "Features", + Source = new[] { "SentimentText" } + }, + OutputTokens = true, + KeepPunctuations = false, + StopWordsRemover = new PredefinedStopWordsRemoverFactory(), + VectorNormalizer = TextFeaturizingEstimator.TextNormKind.L2, + CharFeatureExtractor = new NgramExtractorTransform.NgramExtractorArguments() { NgramLength = 3, AllLengths = false }, + WordFeatureExtractor = new NgramExtractorTransform.NgramExtractorArguments() { NgramLength = 2, AllLengths = true }, }, - OutputTokens = true, - KeepPunctuations = false, - StopWordsRemover = new PredefinedStopWordsRemoverFactory(), - VectorNormalizer = TextFeaturizingEstimator.TextNormKind.L2, - CharFeatureExtractor = new NgramExtractingTransformer.NgramExtractorArguments() { NgramLength = 3, AllLengths = false }, - WordFeatureExtractor = new NgramExtractingTransformer.NgramExtractorArguments() { NgramLength = 2, AllLengths = true }, - }, - loader); - - // Train - var trainer = new FastTreeBinaryClassificationTrainer(env, DefaultColumnNames.Label, DefaultColumnNames.Features, - numLeaves: 5, numTrees: 5, minDatapointsInLeaves: 2); - - var trainRoles = new RoleMappedData(trans, label: "Label", feature: "Features"); - var pred = trainer.Train(trainRoles); - - // Get scorer and evaluate the predictions from test data - IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); - var metrics = EvaluateBinary(env, testDataScorer); - ValidateBinaryMetrics(metrics); - - // Create prediction engine and test predictions - var model = env.CreateBatchPredictionEngine(testDataScorer); - var sentiments = GetTestData(); - var predictions = model.Predict(sentiments, false); - Assert.Equal(2, predictions.Count()); - Assert.True(predictions.ElementAt(0).Sentiment); - Assert.True(predictions.ElementAt(1).Sentiment); - - // Get feature importance based on feature gain during training - var summary = ((FeatureWeightsCalibratedPredictor)pred).GetSummaryInKeyValuePairs(trainRoles.Schema); - Assert.Equal(1.0, (double)summary[0].Value, 1); + loader); + + // Train + var trainer = new FastTreeBinaryClassificationTrainer(env, DefaultColumnNames.Label, DefaultColumnNames.Features, + numLeaves:5, numTrees:5, minDocumentsInLeafs: 2); + + var trainRoles = new RoleMappedData(trans, label: "Label", feature: "Features"); + var pred = trainer.Train(trainRoles); + + // Get scorer and evaluate the predictions from test data + IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); + var metrics = EvaluateBinary(env, testDataScorer); + ValidateBinaryMetrics(metrics); + + // Create prediction engine and test predictions + var model = env.CreateBatchPredictionEngine(testDataScorer); + var sentiments = GetTestData(); + var predictions = model.Predict(sentiments, false); + Assert.Equal(2, predictions.Count()); + Assert.True(predictions.ElementAt(0).Sentiment); + Assert.True(predictions.ElementAt(1).Sentiment); + + // Get feature importance based on feature gain during training + var summary = ((FeatureWeightsCalibratedPredictor)pred).GetSummaryInKeyValuePairs(trainRoles.Schema); + Assert.Equal(1.0, (double)summary[0].Value, 1); + } } [Fact] @@ -83,9 +85,10 @@ public void TrainAndPredictSentimentModelWithDirectionInstantiationTestWithWordE var dataPath = GetDataPath(SentimentDataPath); var testDataPath = GetDataPath(SentimentTestPath); - var env = new MLContext(seed: 1, conc: 1); - // Pipeline - var loader = TextLoader.ReadFile(env, + using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) + { + // Pipeline + var loader = TextLoader.ReadFile(env, new TextLoader.Arguments() { Separator = "tab", @@ -97,60 +100,60 @@ public void TrainAndPredictSentimentModelWithDirectionInstantiationTestWithWordE } }, new MultiFileSource(dataPath)); - var text = TextFeaturizingEstimator.Create(env, new TextFeaturizingEstimator.Arguments() - { - Column = new TextFeaturizingEstimator.Column + var text = TextFeaturizingEstimator.Create(env, new TextFeaturizingEstimator.Arguments() { - Name = "WordEmbeddings", - Source = new[] { "SentimentText" } + Column = new TextFeaturizingEstimator.Column + { + Name = "WordEmbeddings", + Source = new[] { "SentimentText" } + }, + OutputTokens = true, + KeepPunctuations= false, + StopWordsRemover = new PredefinedStopWordsRemoverFactory(), + VectorNormalizer = TextFeaturizingEstimator.TextNormKind.None, + CharFeatureExtractor = null, + WordFeatureExtractor = null, }, - OutputTokens = true, - KeepPunctuations = false, - StopWordsRemover = new PredefinedStopWordsRemoverFactory(), - VectorNormalizer = TextFeaturizingEstimator.TextNormKind.None, - CharFeatureExtractor = null, - WordFeatureExtractor = null, - }, - loader); - - var trans = WordEmbeddingsExtractingTransformer.Create(env, new WordEmbeddingsExtractingTransformer.Arguments() - { - Column = new WordEmbeddingsExtractingTransformer.Column[1] + loader); + + var trans = WordEmbeddingsTransform.Create(env, new WordEmbeddingsTransform.Arguments() { - new WordEmbeddingsExtractingTransformer.Column + Column = new WordEmbeddingsTransform.Column[1] + { + new WordEmbeddingsTransform.Column { Name = "Features", Source = "WordEmbeddings_TransformedText" } - }, - ModelKind = WordEmbeddingsExtractingTransformer.PretrainedModelKind.Sswe, - }, text); - // Train - var trainer = new FastTreeBinaryClassificationTrainer(env, DefaultColumnNames.Label, DefaultColumnNames.Features, numLeaves: 5, numTrees: 5, minDatapointsInLeaves: 2); - - var trainRoles = new RoleMappedData(trans, label: "Label", feature: "Features"); - var pred = trainer.Train(trainRoles); - // Get scorer and evaluate the predictions from test data - IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); - var metrics = EvaluateBinary(env, testDataScorer); - - // SSWE is a simple word embedding model + we train on a really small dataset, so metrics are not great. - Assert.Equal(.6667, metrics.Accuracy, 4); - Assert.Equal(.71, metrics.Auc, 1); - Assert.Equal(.58, metrics.Auprc, 2); - // Create prediction engine and test predictions - var model = env.CreateBatchPredictionEngine(testDataScorer); - var sentiments = GetTestData(); - var predictions = model.Predict(sentiments, false); - Assert.Equal(2, predictions.Count()); - Assert.True(predictions.ElementAt(0).Sentiment); - Assert.True(predictions.ElementAt(1).Sentiment); - - // Get feature importance based on feature gain during training - var summary = ((FeatureWeightsCalibratedPredictor)pred).GetSummaryInKeyValuePairs(trainRoles.Schema); - Assert.Equal(1.0, (double)summary[0].Value, 1); + }, + ModelKind = WordEmbeddingsTransform.PretrainedModelKind.Sswe, + }, text); + // Train + var trainer = new FastTreeBinaryClassificationTrainer(env, DefaultColumnNames.Label, DefaultColumnNames.Features, numLeaves: 5, numTrees:5, minDocumentsInLeafs:2); + + var trainRoles = new RoleMappedData(trans, label: "Label", feature: "Features"); + var pred = trainer.Train(trainRoles); + // Get scorer and evaluate the predictions from test data + IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); + var metrics = EvaluateBinary(env, testDataScorer); + + // SSWE is a simple word embedding model + we train on a really small dataset, so metrics are not great. + Assert.Equal(.6667, metrics.Accuracy, 4); + Assert.Equal(.71, metrics.Auc, 1); + Assert.Equal(.58, metrics.Auprc, 2); + // Create prediction engine and test predictions + var model = env.CreateBatchPredictionEngine(testDataScorer); + var sentiments = GetTestData(); + var predictions = model.Predict(sentiments, false); + Assert.Equal(2, predictions.Count()); + Assert.True(predictions.ElementAt(0).Sentiment); + Assert.True(predictions.ElementAt(1).Sentiment); + + // Get feature importance based on feature gain during training + var summary = ((FeatureWeightsCalibratedPredictor)pred).GetSummaryInKeyValuePairs(trainRoles.Schema); + Assert.Equal(1.0, (double)summary[0].Value, 1); + } } - private BinaryClassificationMetrics EvaluateBinary(IHostEnvironment env, IDataView scoredData) { var dataEval = new RoleMappedData(scoredData, label: "Label", feature: "Features", opt: true); diff --git a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs index 150cc8b3e8..4cbbafb346 100644 --- a/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs +++ b/test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs @@ -17,8 +17,6 @@ using System.Collections.Generic; using System.IO; using Xunit; -using Microsoft.ML.Data; -using Microsoft.ML.Runtime.RunTests; namespace Microsoft.ML.Scenarios { @@ -36,9 +34,10 @@ private class TestData public void TensorFlowTransformMatrixMultiplicationTest() { var model_location = "model_matmul/frozen_saved_model.pb"; - var env = new MLContext(seed: 1, conc: 1); - // Pipeline - var loader = ComponentCreation.CreateDataView(env, + using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) + { + // Pipeline + var loader = ComponentCreation.CreateDataView(env, new List(new TestData[] { new TestData() { a = new[] { 1.0f, 2.0f, 3.0f, 4.0f }, b = new[] { 1.0f, 2.0f, @@ -48,32 +47,32 @@ public void TensorFlowTransformMatrixMultiplicationTest() b = new[] { 3.0f, 3.0f, 3.0f, 3.0f } } })); - var trans = TensorFlowTransform.Create(env, loader, model_location, new[] { "c" }, new[] { "a", "b" }); + var trans = TensorFlowTransform.Create(env, loader, model_location, new[] { "c" }, new[] { "a", "b" }); - using (var cursor = trans.GetRowCursor(a => true)) - { - var cgetter = cursor.GetGetter>(2); - Assert.True(cursor.MoveNext()); - VBuffer c = default; - cgetter(ref c); - - var cValues = c.GetValues(); - Assert.Equal(1.0 * 1.0 + 2.0 * 3.0, cValues[0]); - Assert.Equal(1.0 * 2.0 + 2.0 * 4.0, cValues[1]); - Assert.Equal(3.0 * 1.0 + 4.0 * 3.0, cValues[2]); - Assert.Equal(3.0 * 2.0 + 4.0 * 4.0, cValues[3]); - - Assert.True(cursor.MoveNext()); - c = default; - cgetter(ref c); - - cValues = c.GetValues(); - Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, cValues[0]); - Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, cValues[1]); - Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, cValues[2]); - Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, cValues[3]); - - Assert.False(cursor.MoveNext()); + using (var cursor = trans.GetRowCursor(a => true)) + { + var cgetter = cursor.GetGetter>(2); + Assert.True(cursor.MoveNext()); + VBuffer c = default; + cgetter(ref c); + + Assert.Equal(1.0 * 1.0 + 2.0 * 3.0, c.Values[0]); + Assert.Equal(1.0 * 2.0 + 2.0 * 4.0, c.Values[1]); + Assert.Equal(3.0 * 1.0 + 4.0 * 3.0, c.Values[2]); + Assert.Equal(3.0 * 2.0 + 4.0 * 4.0, c.Values[3]); + + Assert.True(cursor.MoveNext()); + c = default; + cgetter(ref c); + + Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, c.Values[0]); + Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, c.Values[1]); + Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, c.Values[2]); + Assert.Equal(2.0 * 3.0 + 2.0 * 3.0, c.Values[3]); + + Assert.False(cursor.MoveNext()); + + } } } @@ -81,56 +80,58 @@ public void TensorFlowTransformMatrixMultiplicationTest() public void TensorFlowTransformObjectDetectionTest() { var model_location = @"C:\models\TensorFlow\ssd_mobilenet_v1_coco_2018_01_28\frozen_inference_graph.pb"; - var env = new MLContext(seed: 1, conc: 1); - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = env.CreateLoader("Text{col=ImagePath:TX:0 col=Name:TX:1}", new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) { - Column = new ImageLoaderTransform.Column[1] + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = env.CreateLoader("Text{col=ImagePath:TX:0 col=Name:TX:1}", new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =32, ImageWidth = 32, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - Column = new ImagePixelExtractorTransform.Column[1]{ + }, images); + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "image_tensor", UseAlpha=false, InterleaveArgb=true, Convert = false} } - }, cropped); - - var tf = TensorFlowTransform.Create(env, pixels, model_location, - new[] { "detection_boxes", "detection_scores", "num_detections", "detection_classes" }, - new[] { "image_tensor" }); - - tf.Schema.TryGetColumnIndex("image_tensor", out int input); - tf.Schema.TryGetColumnIndex("detection_boxes", out int boxes); - tf.Schema.TryGetColumnIndex("detection_scores", out int scores); - tf.Schema.TryGetColumnIndex("num_detections", out int num); - tf.Schema.TryGetColumnIndex("detection_classes", out int classes); - using (var curs = tf.GetRowCursor(col => col == classes || col == num || col == scores || col == boxes || col == input)) - { - var getInput = curs.GetGetter>(input); - var getBoxes = curs.GetGetter>(boxes); - var getScores = curs.GetGetter>(scores); - var getNum = curs.GetGetter>(num); - var getClasses = curs.GetGetter>(classes); - var buffer = default(VBuffer); - var inputBuffer = default(VBuffer); - while (curs.MoveNext()) - { - getInput(ref inputBuffer); - getBoxes(ref buffer); - getScores(ref buffer); - getNum(ref buffer); - getClasses(ref buffer); + }, cropped); + + var tf = TensorFlowTransform.Create(env, pixels, model_location, + new[] { "detection_boxes", "detection_scores", "num_detections", "detection_classes" }, + new[] { "image_tensor" }); + + tf.Schema.TryGetColumnIndex("image_tensor", out int input); + tf.Schema.TryGetColumnIndex("detection_boxes", out int boxes); + tf.Schema.TryGetColumnIndex("detection_scores", out int scores); + tf.Schema.TryGetColumnIndex("num_detections", out int num); + tf.Schema.TryGetColumnIndex("detection_classes", out int classes); + using (var curs = tf.GetRowCursor(col => col == classes || col == num || col == scores || col == boxes || col == input)) + { + var getInput = curs.GetGetter>(input); + var getBoxes = curs.GetGetter>(boxes); + var getScores = curs.GetGetter>(scores); + var getNum = curs.GetGetter>(num); + var getClasses = curs.GetGetter>(classes); + var buffer = default(VBuffer); + var inputBuffer = default(VBuffer); + while (curs.MoveNext()) + { + getInput(ref inputBuffer); + getBoxes(ref buffer); + getScores(ref buffer); + getNum(ref buffer); + getClasses(ref buffer); + } } } } @@ -139,45 +140,47 @@ public void TensorFlowTransformObjectDetectionTest() public void TensorFlowTransformInceptionTest() { var model_location = @"C:\models\TensorFlow\tensorflow_inception_graph.pb"; - var env = new MLContext(seed: 1, conc: 1); - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = env.CreateLoader("Text{col=ImagePath:TX:0 col=Name:TX:1}", new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() + using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) { - Column = new ImageLoaderTransform.Column[1] + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = env.CreateLoader("Text{col=ImagePath:TX:0 col=Name:TX:1}", new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =224, ImageWidth = 224, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - Column = new ImagePixelExtractorTransform.Column[1]{ + }, images); + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "input", UseAlpha=false, InterleaveArgb=true, Convert = true} } - }, cropped); + }, cropped); - var tf = TensorFlowTransform.Create(env, pixels, model_location, new[] { "softmax2_pre_activation" }, new[] { "input" }); + var tf = TensorFlowTransform.Create(env, pixels, model_location, new[] { "softmax2_pre_activation" }, new[] { "input" }); - tf.Schema.TryGetColumnIndex("input", out int input); - tf.Schema.TryGetColumnIndex("softmax2_pre_activation", out int b); - using (var curs = tf.GetRowCursor(col => col == b || col == input)) - { - var get = curs.GetGetter>(b); - var getInput = curs.GetGetter>(input); - var buffer = default(VBuffer); - var inputBuffer = default(VBuffer); - while (curs.MoveNext()) - { - getInput(ref inputBuffer); - get(ref buffer); + tf.Schema.TryGetColumnIndex("input", out int input); + tf.Schema.TryGetColumnIndex("softmax2_pre_activation", out int b); + using (var curs = tf.GetRowCursor(col => col == b || col == input)) + { + var get = curs.GetGetter>(b); + var getInput = curs.GetGetter>(input); + var buffer = default(VBuffer); + var inputBuffer = default(VBuffer); + while (curs.MoveNext()) + { + getInput(ref inputBuffer); + get(ref buffer); + } } } } @@ -185,148 +188,202 @@ public void TensorFlowTransformInceptionTest() [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only public void TensorFlowInputsOutputsSchemaTest() { - var env = new MLContext(seed: 1, conc: 1); - var model_location = "mnist_model/frozen_saved_model.pb"; - var schema = TensorFlowUtils.GetModelSchema(env, model_location); - Assert.Equal(86, schema.ColumnCount); - Assert.True(schema.TryGetColumnIndex("Placeholder", out int col)); - var type = (VectorType)schema.GetColumnType(col); - Assert.Equal(2, type.Dimensions.Length); - Assert.Equal(28, type.Dimensions[0]); - Assert.Equal(28, type.Dimensions[1]); - var metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); - Assert.NotNull(metadataType); - Assert.True(metadataType is TextType); - ReadOnlyMemory opType = default; - schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); - Assert.Equal("Placeholder", opType.ToString()); - metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); - Assert.Null(metadataType); - - Assert.True(schema.TryGetColumnIndex("conv2d/Conv2D/ReadVariableOp", out col)); - type = (VectorType)schema.GetColumnType(col); - Assert.Equal(new[] { 5, 5, 1, 32 }, type.Dimensions); - metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); - Assert.NotNull(metadataType); - Assert.True(metadataType is TextType); - schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); - Assert.Equal("Identity", opType.ToString()); - metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); - Assert.NotNull(metadataType); - VBuffer> inputOps = default; - schema.GetMetadata(TensorFlowUtils.InputOps, col, ref inputOps); - Assert.Equal(1, inputOps.Length); - Assert.Equal("conv2d/kernel", inputOps.GetValues()[0].ToString()); - - Assert.True(schema.TryGetColumnIndex("conv2d/Conv2D", out col)); - type = (VectorType)schema.GetColumnType(col); - Assert.Equal(new[] { 28, 28, 32 }, type.Dimensions); - metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); - Assert.NotNull(metadataType); - Assert.True(metadataType is TextType); - schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); - Assert.Equal("Conv2D", opType.ToString()); - metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); - Assert.NotNull(metadataType); - schema.GetMetadata(TensorFlowUtils.InputOps, col, ref inputOps); - Assert.Equal(2, inputOps.Length); - Assert.Equal("reshape/Reshape", inputOps.GetValues()[0].ToString()); - Assert.Equal("conv2d/Conv2D/ReadVariableOp", inputOps.GetValues()[1].ToString()); - - Assert.True(schema.TryGetColumnIndex("Softmax", out col)); - type = (VectorType)schema.GetColumnType(col); - Assert.Equal(new[] { 10 }, type.Dimensions); - metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); - Assert.NotNull(metadataType); - Assert.True(metadataType is TextType); - schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); - Assert.Equal("Softmax", opType.ToString()); - metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); - Assert.NotNull(metadataType); - schema.GetMetadata(TensorFlowUtils.InputOps, col, ref inputOps); - Assert.Equal(1, inputOps.Length); - Assert.Equal("sequential/dense_1/BiasAdd", inputOps.GetValues()[0].ToString()); - - model_location = "model_matmul/frozen_saved_model.pb"; - schema = TensorFlowUtils.GetModelSchema(env, model_location); - char name = 'a'; - for (int i = 0; i < schema.ColumnCount; i++) - { - Assert.Equal(name.ToString(), schema.GetColumnName(i)); - type = (VectorType)schema.GetColumnType(i); - Assert.Equal(new[] { 2, 2 }, type.Dimensions); - name++; + using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) + { + var model_location = "mnist_model/frozen_saved_model.pb"; + var schema = TensorFlowUtils.GetModelSchema(env, model_location); + Assert.Equal(86, schema.ColumnCount); + Assert.True(schema.TryGetColumnIndex("Placeholder", out int col)); + var type = (VectorType)schema.GetColumnType(col); + Assert.Equal(2, type.Dimensions.Length); + Assert.Equal(28, type.Dimensions[0]); + Assert.Equal(28, type.Dimensions[1]); + var metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); + Assert.NotNull(metadataType); + Assert.True(metadataType is TextType); + ReadOnlyMemory opType = default; + schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); + Assert.Equal("Placeholder", opType.ToString()); + metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); + Assert.Null(metadataType); + + Assert.True(schema.TryGetColumnIndex("conv2d/Conv2D/ReadVariableOp", out col)); + type = (VectorType)schema.GetColumnType(col); + Assert.Equal(new[] { 5, 5, 1, 32 }, type.Dimensions); + metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); + Assert.NotNull(metadataType); + Assert.True(metadataType is TextType); + schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); + Assert.Equal("Identity", opType.ToString()); + metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); + Assert.NotNull(metadataType); + VBuffer> inputOps = default; + schema.GetMetadata(TensorFlowUtils.InputOps, col, ref inputOps); + Assert.Equal(1, inputOps.Length); + Assert.Equal("conv2d/kernel", inputOps.Values[0].ToString()); + + Assert.True(schema.TryGetColumnIndex("conv2d/Conv2D", out col)); + type = (VectorType)schema.GetColumnType(col); + Assert.Equal(new[] { 28, 28, 32 }, type.Dimensions); + metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); + Assert.NotNull(metadataType); + Assert.True(metadataType is TextType); + schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); + Assert.Equal("Conv2D", opType.ToString()); + metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); + Assert.NotNull(metadataType); + schema.GetMetadata(TensorFlowUtils.InputOps, col, ref inputOps); + Assert.Equal(2, inputOps.Length); + Assert.Equal("reshape/Reshape", inputOps.Values[0].ToString()); + Assert.Equal("conv2d/Conv2D/ReadVariableOp", inputOps.Values[1].ToString()); + + Assert.True(schema.TryGetColumnIndex("Softmax", out col)); + type = (VectorType)schema.GetColumnType(col); + Assert.Equal(new[] { 10 }, type.Dimensions); + metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.OpType, col); + Assert.NotNull(metadataType); + Assert.True(metadataType is TextType); + schema.GetMetadata(TensorFlowUtils.OpType, col, ref opType); + Assert.Equal("Softmax", opType.ToString()); + metadataType = schema.GetMetadataTypeOrNull(TensorFlowUtils.InputOps, col); + Assert.NotNull(metadataType); + schema.GetMetadata(TensorFlowUtils.InputOps, col, ref inputOps); + Assert.Equal(1, inputOps.Length); + Assert.Equal("sequential/dense_1/BiasAdd", inputOps.Values[0].ToString()); + + model_location = "model_matmul/frozen_saved_model.pb"; + schema = TensorFlowUtils.GetModelSchema(env, model_location); + char name = 'a'; + for (int i = 0; i < schema.ColumnCount; i++) + { + Assert.Equal(name.ToString(), schema.GetColumnName(i)); + type = (VectorType)schema.GetColumnType(i); + Assert.Equal(new[] { 2, 2 }, type.Dimensions); + name++; + } } } [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only public void TensorFlowTransformMNISTConvTest() { - var mlContext = new MLContext(seed: 1, conc: 1); - var reader = mlContext.Data.TextReader( + var model_location = "mnist_model/frozen_saved_model.pb"; + using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) + { + var dataPath = GetDataPath("Train-Tiny-28x28.txt"); + var testDataPath = GetDataPath("MNIST.Test.tiny.txt"); + + // Pipeline + var loader = TextLoader.ReadFile(env, new TextLoader.Arguments() { Separator = "tab", HasHeader = true, Column = new[] { - new TextLoader.Column("Label", DataKind.U4 , new [] { new TextLoader.Range(0) }, new KeyRange(0, 9)), - new TextLoader.Column("Placeholder", DataKind.R4, new []{ new TextLoader.Range(1, 784) }) + new TextLoader.Column("Label", DataKind.Num,0), + new TextLoader.Column("Placeholder", DataKind.Num,new []{new TextLoader.Range(1, 784) }) } - }); + }, new MultiFileSource(dataPath)); - var trainData = reader.Read(GetDataPath(TestDatasets.mnistTiny28.trainFilename)); - var testData = reader.Read(GetDataPath(TestDatasets.mnistOneClass.testFilename)); + IDataView trans = CopyColumnsTransform.Create(env, new CopyColumnsTransform.Arguments() + { + Column = new[] { new CopyColumnsTransform.Column() + { Name = "reshape_input", Source = "Placeholder" } + } + }, loader); + trans = TensorFlowTransform.Create(env, trans, model_location, new[] { "Softmax", "dense/Relu" }, new[] { "Placeholder", "reshape_input" }); + trans = new ConcatTransform(env, "Features", "Softmax", "dense/Relu").Transform(trans); - var pipe = mlContext.Transforms.CopyColumns(("Placeholder", "reshape_input")) - .Append(new TensorFlowEstimator(mlContext, "mnist_model/frozen_saved_model.pb", new[] { "Placeholder", "reshape_input" }, new[] { "Softmax", "dense/Relu" })) - .Append(mlContext.Transforms.Concatenate("Features", "Softmax", "dense/Relu")) - .Append(mlContext.MulticlassClassification.Trainers.LightGbm("Label", "Features")); + var trainer = new LightGbmMulticlassTrainer(env, "Label", "Features"); - var trainedModel = pipe.Fit(trainData); - var predicted = trainedModel.Transform(testData); - var metrics = mlContext.MulticlassClassification.Evaluate(predicted); + var cached = new CacheDataView(env, trans, prefetch: null); + var trainRoles = new RoleMappedData(cached, label: "Label", feature: "Features"); + var pred = trainer.Train(trainRoles); - Assert.Equal(0.99, metrics.AccuracyMicro, 2); - Assert.Equal(1.0, metrics.AccuracyMacro, 2); + // Get scorer and evaluate the predictions from test data + IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); + var metrics = Evaluate(env, testDataScorer); - var oneSample = GetOneMNISTExample(); + Assert.Equal(0.99, metrics.AccuracyMicro, 2); + Assert.Equal(1.0, metrics.AccuracyMacro, 2); - var predictFunction = trainedModel.MakePredictionFunction(mlContext); + // Create prediction engine and test predictions + var model = env.CreatePredictionEngine(testDataScorer); - var onePrediction = predictFunction.Predict(oneSample); + var sample1 = new MNISTData() + { + Placeholder = new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 18, 18, 18, 126, 136, 175, 26, + 166, 255, 247, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 36, 94, 154, 170, 253, 253, 253, 253, 253, + 225, 172, 253, 242, 195, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 238, 253, 253, 253, 253, 253, 253, 253, + 253, 251, 93, 82, 82, 56, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 219, 253, 253, 253, 253, 253, 198, + 182, 247, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 156, 107, 253, 253, 205, 11, 0, + 43, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 1, 154, 253, 90, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 253, 190, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 190, 253, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 241, 225, 160, 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 240, 253, 253, 119, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 186, 253, 253, 150, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 93, 252, 253, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 253, 249, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 130, 183, 253, 253, 207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 148, 229, 253, 253, 253, 250, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 114, 221, 253, 253, 253, 253, 201, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 66, 213, 253, 253, 253, 253, 198, 81, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 171, 219, 253, 253, 253, 253, 195, 80, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 172, 226, 253, 253, 253, 253, 244, 133, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 253, 253, 253, 212, 135, 132, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + }; + + var prediction = model.Predict(sample1); + + float max = -1; + int maxIndex = -1; + for (int i = 0; i < prediction.PredictedLabels.Length; i++) + { + if (prediction.PredictedLabels[i] > max) + { + max = prediction.PredictedLabels[i]; + maxIndex = i; + } + } - Assert.Equal(5, GetMaxIndexForOnePrediction(onePrediction)); + Assert.Equal(5, maxIndex); + } } [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only public void TensorFlowTransformMNISTLRTrainingTest() { - const double expectedMicroAccuracy = 0.72173913043478266; - const double expectedMacroAccruacy = 0.67482993197278918; + // Without shuffling + ExecuteTFTransformMNISTLRTrainingTest(false, null, 0.72173913043478266, 0.67482993197278918); + + // With shuffling + ExecuteTFTransformMNISTLRTrainingTest(true, 5, 0.8, 0.691156462585034); + } + + private void ExecuteTFTransformMNISTLRTrainingTest(bool shuffle, int? shuffleSeed, double expectedMicroAccuracy, double expectedMacroAccruacy) + { var model_location = "mnist_lr_model"; try { - var mlContext = new MLContext(seed: 1, conc: 1); - var reader = mlContext.Data.TextReader( - new TextLoader.Arguments + using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) + { + var dataPath = GetDataPath("Train-Tiny-28x28.txt"); + var testDataPath = GetDataPath("MNIST.Test.tiny.txt"); + + // Pipeline + var loader = TextLoader.ReadFile(env, + new TextLoader.Arguments() { Separator = "tab", HasHeader = false, Column = new[] { - new TextLoader.Column("Label", DataKind.I8, 0), - new TextLoader.Column("Placeholder", DataKind.R4, new []{ new TextLoader.Range(1, 784) }) + new TextLoader.Column("Label", DataKind.Num,0), + new TextLoader.Column("Placeholder", DataKind.Num,new []{new TextLoader.Range(1, 784) }) + } - }); + }, new MultiFileSource(dataPath)); - var trainData = reader.Read(GetDataPath(TestDatasets.mnistTiny28.trainFilename)); - var testData = reader.Read(GetDataPath(TestDatasets.mnistOneClass.testFilename)); + IDataView trans = new OneHotEncodingEstimator(env, "Label", "OneHotLabel").Fit(loader).Transform(loader); + trans = NormalizeTransform.CreateMinMaxNormalizer(env, trans, "Features", "Placeholder"); - var pipe = mlContext.Transforms.Categorical.OneHotEncoding("Label", "OneHotLabel") - .Append(mlContext.Transforms.Normalize(new NormalizingEstimator.MinMaxColumn("Placeholder", "Features"))) - .Append(new TensorFlowEstimator(mlContext, new TensorFlowTransform.Arguments() + var args = new TensorFlowTransform.Arguments() { ModelLocation = model_location, InputColumns = new[] { "Features" }, @@ -340,33 +397,85 @@ public void TensorFlowTransformMNISTLRTrainingTest() LearningRate = 0.001f, BatchSize = 20, ReTrain = true - })) - .Append(mlContext.Transforms.Concatenate("Features", "Prediction")) - .Append(mlContext.Transforms.Categorical.MapValueToKey("Label", "KeyLabel", maxNumTerms: 10)) - .Append(mlContext.MulticlassClassification.Trainers.LightGbm("KeyLabel", "Features")); + }; - var trainedModel = pipe.Fit(trainData); - var predicted = trainedModel.Transform(testData); - var metrics = mlContext.MulticlassClassification.Evaluate(predicted, label: "KeyLabel"); - Assert.InRange(metrics.AccuracyMicro, expectedMicroAccuracy, 1); - Assert.InRange(metrics.AccuracyMacro, expectedMacroAccruacy, 1); - var predictionFunction = trainedModel.MakePredictionFunction(mlContext); + IDataView trainedTfDataView = null; + if (shuffle) + { + var shuffledView = new ShuffleTransform(env, new ShuffleTransform.Arguments() + { + ForceShuffle = shuffle, + ForceShuffleSeed = shuffleSeed + }, trans); + trainedTfDataView = new TensorFlowEstimator(env, args).Fit(shuffledView).Transform(trans); + } + else + { + trainedTfDataView = new TensorFlowEstimator(env, args).Fit(trans).Transform(trans); + } - var oneSample = GetOneMNISTExample(); - var onePrediction = predictionFunction.Predict(oneSample); - Assert.Equal(0, GetMaxIndexForOnePrediction(onePrediction)); + trans = new ConcatTransform(env, "Features", "Prediction").Transform(trainedTfDataView); + var trainer = new LightGbmMulticlassTrainer(env, "Label", "Features"); - var trainDataTransformed = trainedModel.Transform(trainData); - using (var cursor = trainDataTransformed.GetRowCursor(a => true)) - { - trainDataTransformed.Schema.TryGetColumnIndex("b", out int bias); - var getter = cursor.GetGetter>(bias); - if (cursor.MoveNext()) + var cached = new CacheDataView(env, trans, prefetch: null); + var trainRoles = new RoleMappedData(cached, label: "Label", feature: "Features"); + + var pred = trainer.Train(trainRoles); + + // Get scorer and evaluate the predictions from test data + IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); + var metrics = Evaluate(env, testDataScorer); + + Assert.Equal(expectedMicroAccuracy, metrics.AccuracyMicro, 2); + Assert.Equal(expectedMacroAccruacy, metrics.AccuracyMacro, 2); + + // Create prediction engine and test predictions + var model = env.CreatePredictionEngine(testDataScorer); + + var sample1 = new MNISTData() + { + Placeholder = new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 18, 18, 18, 126, 136, 175, 26, + 166, 255, 247, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 36, 94, 154, 170, 253, 253, 253, 253, 253, + 225, 172, 253, 242, 195, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 238, 253, 253, 253, 253, 253, 253, 253, + 253, 251, 93, 82, 82, 56, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 219, 253, 253, 253, 253, 253, 198, + 182, 247, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 156, 107, 253, 253, 205, 11, 0, + 43, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 1, 154, 253, 90, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 253, 190, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 190, 253, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 241, 225, 160, 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 240, 253, 253, 119, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 186, 253, 253, 150, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 93, 252, 253, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 253, 249, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 130, 183, 253, 253, 207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 148, 229, 253, 253, 253, 250, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 114, 221, 253, 253, 253, 253, 201, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 66, 213, 253, 253, 253, 253, 198, 81, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 171, 219, 253, 253, 253, 253, 195, 80, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 172, 226, 253, 253, 253, 253, 244, 133, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 253, 253, 253, 212, 135, 132, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + }; + + var prediction = model.Predict(sample1); + + float max = -1; + int maxIndex = -1; + for (int i = 0; i < prediction.PredictedLabels.Length; i++) + { + if (prediction.PredictedLabels[i] > max) + { + max = prediction.PredictedLabels[i]; + maxIndex = i; + } + } + + Assert.Equal(5, maxIndex); + + // Check if the bias actually got changed after the training. + using (var cursor = trainedTfDataView.GetRowCursor(a => true)) { - var trainedBias = default(VBuffer); - getter(ref trainedBias); - Assert.NotEqual(trainedBias.GetValues().ToArray(), new float[] { 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f }); + trainedTfDataView.Schema.TryGetColumnIndex("b", out int bias); + var getter = cursor.GetGetter>(bias); + if (cursor.MoveNext()) + { + var trainedBias = default(VBuffer); + getter(ref trainedBias); + Assert.NotEqual(trainedBias.Values, new float[] { 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f }); + } } } } @@ -393,63 +502,46 @@ private void CleanUp(string model_location) [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only public void TensorFlowTransformMNISTConvTrainingTest() { + // Without shuffling ExecuteTFTransformMNISTConvTrainingTest(false, null, 0.74782608695652175, 0.608843537414966); + + // With shuffling ExecuteTFTransformMNISTConvTrainingTest(true, 5, 0.75652173913043474, 0.610204081632653); } private void ExecuteTFTransformMNISTConvTrainingTest(bool shuffle, int? shuffleSeed, double expectedMicroAccuracy, double expectedMacroAccruacy) { - const string modelLocation = "mnist_conv_model"; + var model_location = "mnist_conv_model"; try { - var mlContext = new MLContext(seed: 1, conc: 1); - - var reader = mlContext.Data.TextReader(new TextLoader.Arguments + using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) { - Separator = "tab", - HasHeader = false, - Column = new[] - { - new TextLoader.Column("Label", DataKind.U4, new []{ new TextLoader.Range(0) }, new KeyRange(0, 9)), - new TextLoader.Column("TfLabel", DataKind.I8, 0), - new TextLoader.Column("Placeholder", DataKind.R4, new []{ new TextLoader.Range(1, 784) }) - } - }); - - var trainData = reader.Read(GetDataPath(TestDatasets.mnistTiny28.trainFilename)); - var testData = reader.Read(GetDataPath(TestDatasets.mnistOneClass.testFilename)); + var dataPath = GetDataPath("Train-Tiny-28x28.txt"); + var testDataPath = GetDataPath("MNIST.Test.tiny.txt"); - IDataView preprocessedTrainData = null; - IDataView preprocessedTestData = null; - if (shuffle) - { - // Shuffle training data set - preprocessedTrainData = new RowShufflingTransformer(mlContext, new RowShufflingTransformer.Arguments() + // Pipeline + var loader = TextLoader.ReadFile(env, + new TextLoader.Arguments() { - ForceShuffle = shuffle, - ForceShuffleSeed = shuffleSeed - }, trainData); + Separator = "tab", + HasHeader = false, + Column = new[] + { + new TextLoader.Column("Label", DataKind.I8,0), + new TextLoader.Column("Placeholder", DataKind.Num,new []{new TextLoader.Range(1, 784) }) - // Shuffle test data set - preprocessedTestData = new RowShufflingTransformer(mlContext, new RowShufflingTransformer.Arguments() - { - ForceShuffle = shuffle, - ForceShuffleSeed = shuffleSeed - }, testData); - } - else - { - preprocessedTrainData = trainData; - preprocessedTestData = testData; - } + } + }, new MultiFileSource(dataPath)); + + IDataView trans = new CopyColumnsTransform(env, + ("Placeholder", "Features")).Transform(loader); - var pipe = mlContext.Transforms.CopyColumns(("Placeholder", "Features")) - .Append(new TensorFlowEstimator(mlContext, new TensorFlowTransform.Arguments() + var args = new TensorFlowTransform.Arguments() { - ModelLocation = modelLocation, + ModelLocation = model_location, InputColumns = new[] { "Features" }, OutputColumns = new[] { "Prediction" }, - LabelColumn = "TfLabel", + LabelColumn = "Label", TensorFlowLabel = "Label", OptimizationOperation = "MomentumOp", LossOperation = "Loss", @@ -459,176 +551,210 @@ private void ExecuteTFTransformMNISTConvTrainingTest(bool shuffle, int? shuffleS LearningRate = 0.01f, BatchSize = 20, ReTrain = true - })) - .Append(mlContext.Transforms.Concatenate("Features", "Prediction")) - .Append(mlContext.MulticlassClassification.Trainers.LightGbm("Label", "Features")); + }; + + IDataView trainedTfDataView = null; + if (shuffle) + { + var shuffledView = new ShuffleTransform(env, new ShuffleTransform.Arguments() + { + ForceShuffle = shuffle, + ForceShuffleSeed = shuffleSeed + }, trans); + trainedTfDataView = new TensorFlowEstimator(env, args).Fit(shuffledView).Transform(trans); + } + else + { + trainedTfDataView = new TensorFlowEstimator(env, args).Fit(trans).Transform(trans); + } + + trans = new ConcatTransform(env, "Features", "Prediction").Transform(trainedTfDataView); + trans = new ConvertingTransform(env, new ConvertingTransform.ColumnInfo("Label", "Label", DataKind.R4)).Transform(trans); - var trainedModel = pipe.Fit(preprocessedTrainData); - var predicted = trainedModel.Transform(preprocessedTestData); - var metrics = mlContext.MulticlassClassification.Evaluate(predicted); + var trainer = new LightGbmMulticlassTrainer(env, "Label", "Features"); - // First group of checks. They check if the overall prediction quality is ok using a test set. - Assert.InRange(metrics.AccuracyMicro, expectedMicroAccuracy-.01, expectedMicroAccuracy+.01); - Assert.InRange(metrics.AccuracyMacro, expectedMacroAccruacy-.01, expectedMicroAccuracy+.01); + var cached = new CacheDataView(env, trans, prefetch: null); + var trainRoles = new RoleMappedData(cached, label: "Label", feature: "Features"); - // Create prediction function and test prediction - var predictFunction = trainedModel.MakePredictionFunction(mlContext); + var pred = trainer.Train(trainRoles); - var oneSample = GetOneMNISTExample(); + // Get scorer and evaluate the predictions from test data + IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); + var metrics = Evaluate(env, testDataScorer); - var prediction = predictFunction.Predict(oneSample); + Assert.Equal(expectedMicroAccuracy, metrics.AccuracyMicro, 2); + Assert.Equal(expectedMacroAccruacy, metrics.AccuracyMacro, 2); + + // Create prediction engine and test predictions + var model = env.CreatePredictionEngine(testDataScorer); + + var sample1 = new MNISTData() + { + Placeholder = new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 18, 18, 18, 126, 136, 175, 26, + 166, 255, 247, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 36, 94, 154, 170, 253, 253, 253, 253, 253, + 225, 172, 253, 242, 195, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 238, 253, 253, 253, 253, 253, 253, 253, + 253, 251, 93, 82, 82, 56, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 219, 253, 253, 253, 253, 253, 198, + 182, 247, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 156, 107, 253, 253, 205, 11, 0, + 43, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 1, 154, 253, 90, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 253, 190, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 190, 253, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 241, 225, 160, 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 240, 253, 253, 119, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 186, 253, 253, 150, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 93, 252, 253, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 253, 249, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 130, 183, 253, 253, 207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 148, 229, 253, 253, 253, 250, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 114, 221, 253, 253, 253, 253, 201, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 66, 213, 253, 253, 253, 253, 198, 81, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 171, 219, 253, 253, 253, 253, 195, 80, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 172, 226, 253, 253, 253, 253, 244, 133, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 253, 253, 253, 212, 135, 132, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + }; + + var prediction = model.Predict(sample1); + + float max = -1; + int maxIndex = -1; + for (int i = 0; i < prediction.PredictedLabels.Length; i++) + { + if (prediction.PredictedLabels[i] > max) + { + max = prediction.PredictedLabels[i]; + maxIndex = i; + } + } - Assert.Equal(5, GetMaxIndexForOnePrediction(prediction)); + Assert.Equal(5, maxIndex); + } } finally { // This test changes the state of the model. // Cleanup folder so that other test can also use the same model. - CleanUp(modelLocation); + CleanUp(model_location); } } [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only public void TensorFlowTransformMNISTConvSavedModelTest() { - // This test trains a multi-class classifier pipeline where a pre-trained Tenroflow model is used for featurization. - // Two group of test criteria are checked. One group contains micro and macro accuracies. The other group is the range - // of predicted label of a single in-memory example. - - var mlContext = new MLContext(seed: 1, conc: 1); - var reader = mlContext.Data.TextReader(new TextLoader.Arguments + var model_location = "mnist_model"; + using (var env = new ConsoleEnvironment(seed: 1, conc: 1)) { - Separator = "tab", - HasHeader = true, - Column = new[] + var dataPath = GetDataPath("Train-Tiny-28x28.txt"); + var testDataPath = GetDataPath("MNIST.Test.tiny.txt"); + + // Pipeline + var loader = TextLoader.ReadFile(env, + new TextLoader.Arguments() { - new TextLoader.Column("Label", DataKind.U4 , new [] { new TextLoader.Range(0) }, new KeyRange(0, 9)), - new TextLoader.Column("Placeholder", DataKind.R4, new []{ new TextLoader.Range(1, 784) }) - } - }); + Separator = "tab", + HasHeader = true, + Column = new[] + { + new TextLoader.Column("Label", DataKind.Num,0), + new TextLoader.Column("Placeholder", DataKind.Num,new []{new TextLoader.Range(1, 784) }) - var trainData = reader.Read(GetDataPath(TestDatasets.mnistTiny28.trainFilename)); - var testData = reader.Read(GetDataPath(TestDatasets.mnistOneClass.testFilename)); + } + }, new MultiFileSource(dataPath)); - var pipe = mlContext.Transforms.CopyColumns(("Placeholder", "reshape_input")) - .Append(new TensorFlowEstimator(mlContext, "mnist_model", new[] { "Placeholder", "reshape_input" }, new[] { "Softmax", "dense/Relu" })) - .Append(mlContext.Transforms.Concatenate("Features", new[] { "Softmax", "dense/Relu" })) - .Append(mlContext.MulticlassClassification.Trainers.LightGbm("Label", "Features")); + IDataView trans = CopyColumnsTransform.Create(env, new CopyColumnsTransform.Arguments() + { + Column = new[] { new CopyColumnsTransform.Column() + { Name = "reshape_input", Source = "Placeholder" } + } + }, loader); + trans = TensorFlowTransform.Create(env, trans, model_location, new[] { "Softmax", "dense/Relu" }, new[] { "Placeholder", "reshape_input" }); + trans = new ConcatTransform(env, "Features", "Softmax", "dense/Relu").Transform(trans); - var trainedModel = pipe.Fit(trainData); - var predicted = trainedModel.Transform(testData); - var metrics = mlContext.MulticlassClassification.Evaluate(predicted); + var trainer = new LightGbmMulticlassTrainer(env, "Label", "Features"); - // First group of checks - Assert.Equal(0.99, metrics.AccuracyMicro, 2); - Assert.Equal(1.0, metrics.AccuracyMacro, 2); + var cached = new CacheDataView(env, trans, prefetch: null); + var trainRoles = new RoleMappedData(cached, label: "Label", feature: "Features"); + var pred = trainer.Train(trainRoles); - // An in-memory example. Its label is predicted below. - var oneSample = GetOneMNISTExample(); + // Get scorer and evaluate the predictions from test data + IDataScorerTransform testDataScorer = GetScorer(env, trans, pred, testDataPath); + var metrics = Evaluate(env, testDataScorer); - var predictFunction = trainedModel.MakePredictionFunction(mlContext); + Assert.Equal(0.99, metrics.AccuracyMicro, 2); + Assert.Equal(1.0, metrics.AccuracyMacro, 2); - var onePrediction = predictFunction.Predict(oneSample); + // Create prediction engine and test predictions + var model = env.CreatePredictionEngine(testDataScorer); - // Second group of checks - Assert.Equal(5, GetMaxIndexForOnePrediction(onePrediction)); + var sample1 = new MNISTData() + { + Placeholder = new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 18, 18, 18, 126, 136, 175, 26, + 166, 255, 247, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 36, 94, 154, 170, 253, 253, 253, 253, 253, + 225, 172, 253, 242, 195, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 238, 253, 253, 253, 253, 253, 253, 253, + 253, 251, 93, 82, 82, 56, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 219, 253, 253, 253, 253, 253, 198, + 182, 247, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 156, 107, 253, 253, 205, 11, 0, + 43, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 1, 154, 253, 90, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 253, 190, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 190, 253, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 241, 225, 160, 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 240, 253, 253, 119, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 186, 253, 253, 150, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 93, 252, 253, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 253, 249, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 130, 183, 253, 253, 207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 148, 229, 253, 253, 253, 250, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 114, 221, 253, 253, 253, 253, 201, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 66, 213, 253, 253, 253, 253, 198, 81, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 171, 219, 253, 253, 253, 253, 195, 80, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 172, 226, 253, 253, 253, 253, 244, 133, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 253, 253, 253, 212, 135, 132, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + }; + + var prediction = model.Predict(sample1); + + float max = -1; + int maxIndex = -1; + for (int i = 0; i < prediction.PredictedLabels.Length; i++) + { + if (prediction.PredictedLabels[i] > max) + { + max = prediction.PredictedLabels[i]; + maxIndex = i; + } + } + + Assert.Equal(5, maxIndex); + } } [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only public void TensorFlowTransformMNISTConvPipelineTest() { var model_location = "mnist_model/frozen_saved_model.pb"; - var dataPath = GetDataPath(TestDatasets.mnistTiny28.trainFilename); + var dataPath = GetDataPath("Train-Tiny-28x28.txt"); var pipeline = new Legacy.LearningPipeline(seed: 1); pipeline.Add(new Microsoft.ML.Legacy.Data.TextLoader(dataPath).CreateFrom(useHeader: false)); - pipeline.Add(new Legacy.Transforms.ColumnCopier() { Column = new[] { new ColumnsCopyingTransformerColumn() { Name = "reshape_input", Source = "Placeholder" } } }); + pipeline.Add(new Legacy.Transforms.ColumnCopier() { Column = new[] { new CopyColumnsTransformColumn() { Name = "reshape_input", Source = "Placeholder" } } }); pipeline.Add(new TensorFlowScorer() { ModelLocation = model_location, OutputColumns = new[] { "Softmax", "dense/Relu" }, InputColumns = new[] { "Placeholder", "reshape_input" } }); - pipeline.Add(new Legacy.Transforms.ColumnConcatenator() { Column = new[] { new ColumnConcatenatingTransformerColumn() { Name = "Features", Source = new[] { "Placeholder", "dense/Relu" } } } }); - pipeline.Add(new Legacy.Transforms.LabelToFloatConverter() { LabelColumn = "Label" }); + pipeline.Add(new Legacy.Transforms.ColumnConcatenator() { Column = new[] { new ConcatTransformColumn() { Name = "Features", Source = new[] { "Placeholder", "dense/Relu" } } } }); pipeline.Add(new Legacy.Trainers.LogisticRegressionClassifier()); var model = pipeline.Train(); - var sample1 = GetOneMNISTExample();; - - MNISTPrediction prediction = model.Predict(sample1); - } - - private MNISTData GetOneMNISTExample() - { - return new MNISTData() - { - Placeholder = new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 18, 18, 18, 126, - 136, 175, 26, 166, 255, 247, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 30, 36, 94, 154, 170, 253, 253, 253, 253, 253, 225, 172, - 253, 242, 195, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 238, - 253, 253, 253, 253, 253, 253, 253, 253, 251, 93, 82, 82, 56, - 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 219, 253, 253, 253, - 253, 253, 198, 182, 247, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 80, 156, 107, 253, 253, 205, 11, 0, 43, - 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 14, 1, 154, 253, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 253, 190, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, - 190, 253, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 241, 225, 160, 108, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, - 240, 253, 253, 119, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 186, 253, 253, 150, 27, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 16, 93, 252, 253, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 253, 249, 64, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 130, - 183, 253, 253, 207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 39, 148, 229, 253, 253, 253, 250, 182, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 114, 221, - 253, 253, 253, 253, 201, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 23, 66, 213, 253, 253, 253, 253, 198, 81, 2, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 171, 219, - 253, 253, 253, 253, 195, 80, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 55, 172, 226, 253, 253, 253, 253, 244, 133, - 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, - 253, 253, 253, 212, 135, 132, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0 } + var sample1 = new MNISTData() + { + Placeholder = new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 18, 18, 18, 126, 136, 175, 26, + 166, 255, 247, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 36, 94, 154, 170, 253, 253, 253, 253, 253, + 225, 172, 253, 242, 195, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 238, 253, 253, 253, 253, 253, 253, 253, + 253, 251, 93, 82, 82, 56, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 219, 253, 253, 253, 253, 253, 198, + 182, 247, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 156, 107, 253, 253, 205, 11, 0, + 43, 154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 1, 154, 253, 90, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 253, 190, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 190, 253, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 241, 225, 160, 108, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 240, 253, 253, 119, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 186, 253, 253, 150, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 93, 252, 253, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 253, 249, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 130, 183, 253, 253, 207, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 148, 229, 253, 253, 253, 250, 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 114, 221, 253, 253, 253, 253, 201, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 66, 213, 253, 253, 253, 253, 198, 81, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 171, 219, 253, 253, 253, 253, 195, 80, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 172, 226, 253, 253, 253, 253, 244, 133, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136, 253, 253, 253, 212, 135, 132, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; - } - private int GetMaxIndexForOnePrediction(MNISTPrediction onePrediction) - { - float maxLabel = -1; - int maxIndex = -1; - for (int i = 0; i < onePrediction.PredictedLabels.Length; i++) - { - if (onePrediction.PredictedLabels[i] > maxLabel) - { - maxLabel = onePrediction.PredictedLabels[i]; - maxIndex = i; - } - } - return maxIndex; + MNISTPrediction prediction = model.Predict(sample1); } public class MNISTData { [Column("0")] - public long Label; + public float Label; [Column(ordinal: "1-784")] [VectorType(784)] @@ -646,62 +772,64 @@ public void TensorFlowTransformCifar() { var model_location = "cifar_model/frozen_model.pb"; - var env = new MLContext(); - var tensorFlowModel = TensorFlowUtils.LoadTensorFlowModel(env, model_location); - var schema = tensorFlowModel.GetInputSchema(); - Assert.True(schema.TryGetColumnIndex("Input", out int column)); - var type = (VectorType)schema.GetColumnType(column); - var imageHeight = type.Dimensions[0]; - var imageWidth = type.Dimensions[1]; - - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var tensorFlowModel = TensorFlowUtils.LoadTensorFlowModel(env, model_location); + var schema = tensorFlowModel.GetInputSchema(); + Assert.True(schema.TryGetColumnIndex("Input", out int column)); + var type = (VectorType)schema.GetColumnType(column); + var imageHeight = type.Dimensions[0]; + var imageWidth = type.Dimensions[1]; + + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() - { - Column = new ImageLoaderTransform.Column[1] + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "Input", UseAlpha=false, InterleaveArgb=true} } - }, cropped); + }, cropped); - IDataView trans = TensorFlowTransform.Create(env, pixels, tensorFlowModel, new[] { "Output" }, new[] { "Input" }); + IDataView trans = TensorFlowTransform.Create(env, pixels, tensorFlowModel, new[] { "Output" }, new[] { "Input" }); - trans.Schema.TryGetColumnIndex("Output", out int output); - using (var cursor = trans.GetRowCursor(col => col == output)) - { - var buffer = default(VBuffer); - var getter = cursor.GetGetter>(output); - var numRows = 0; - while (cursor.MoveNext()) - { - getter(ref buffer); - Assert.Equal(10, buffer.Length); - numRows += 1; + trans.Schema.TryGetColumnIndex("Output", out int output); + using (var cursor = trans.GetRowCursor(col => col == output)) + { + var buffer = default(VBuffer); + var getter = cursor.GetGetter>(output); + var numRows = 0; + while (cursor.MoveNext()) + { + getter(ref buffer); + Assert.Equal(10, buffer.Length); + numRows += 1; + } + Assert.Equal(3, numRows); } - Assert.Equal(3, numRows); } } @@ -710,62 +838,64 @@ public void TensorFlowTransformCifarSavedModel() { var model_location = "cifar_saved_model"; - var env = new MLContext(); - var tensorFlowModel = TensorFlowUtils.LoadTensorFlowModel(env, model_location); - var schema = tensorFlowModel.GetInputSchema(); - Assert.True(schema.TryGetColumnIndex("Input", out int column)); - var type = (VectorType)schema.GetColumnType(column); - var imageHeight = type.Dimensions[0]; - var imageWidth = type.Dimensions[1]; - - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var tensorFlowModel = TensorFlowUtils.LoadTensorFlowModel(env, model_location); + var schema = tensorFlowModel.GetInputSchema(); + Assert.True(schema.TryGetColumnIndex("Input", out int column)); + var type = (VectorType)schema.GetColumnType(column); + var imageHeight = type.Dimensions[0]; + var imageWidth = type.Dimensions[1]; + + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() - { - Column = new ImageLoaderTransform.Column[1] + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "Input", UseAlpha=false, InterleaveArgb=true} } - }, cropped); + }, cropped); - IDataView trans = TensorFlowTransform.Create(env, pixels, tensorFlowModel, new[] { "Output" }, new[] { "Input" }); + IDataView trans = TensorFlowTransform.Create(env, pixels, tensorFlowModel, new[] { "Output" }, new[] { "Input" }); - trans.Schema.TryGetColumnIndex("Output", out int output); - using (var cursor = trans.GetRowCursor(col => col == output)) - { - var buffer = default(VBuffer); - var getter = cursor.GetGetter>(output); - var numRows = 0; - while (cursor.MoveNext()) - { - getter(ref buffer); - Assert.Equal(10, buffer.Length); - numRows += 1; + trans.Schema.TryGetColumnIndex("Output", out int output); + using (var cursor = trans.GetRowCursor(col => col == output)) + { + var buffer = default(VBuffer); + var getter = cursor.GetGetter>(output); + var numRows = 0; + while (cursor.MoveNext()) + { + getter(ref buffer); + Assert.Equal(10, buffer.Length); + numRows += 1; + } + Assert.Equal(3, numRows); } - Assert.Equal(3, numRows); } } @@ -774,51 +904,53 @@ public void TensorFlowTransformCifarInvalidShape() { var model_location = "cifar_model/frozen_model.pb"; - var env = new MLContext(); - var imageHeight = 28; - var imageWidth = 28; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.Create(env, new TextLoader.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] + var imageHeight = 28; + var imageWidth = 28; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); + var data = TextLoader.Create(env, new TextLoader.Arguments() { + Column = new[] + { new TextLoader.Column("ImagePath", DataKind.TX, 0), new TextLoader.Column("Name", DataKind.TX, 1), } - }, new MultiFileSource(dataFile)); - var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() - { - Column = new ImageLoaderTransform.Column[1] + }, new MultiFileSource(dataFile)); + var images = ImageLoaderTransform.Create(env, new ImageLoaderTransform.Arguments() { + Column = new ImageLoaderTransform.Column[1] + { new ImageLoaderTransform.Column() { Source= "ImagePath", Name="ImageReal" } - }, - ImageFolder = imageFolder - }, data); - var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() - { - Column = new ImageResizerTransform.Column[1]{ + }, + ImageFolder = imageFolder + }, data); + var cropped = ImageResizerTransform.Create(env, new ImageResizerTransform.Arguments() + { + Column = new ImageResizerTransform.Column[1]{ new ImageResizerTransform.Column() { Source = "ImageReal", Name= "ImageCropped", ImageHeight =imageHeight, ImageWidth = imageWidth, Resizing = ImageResizerTransform.ResizingKind.IsoCrop} } - }, images); + }, images); - var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() - { - Column = new ImagePixelExtractorTransform.Column[1]{ + var pixels = ImagePixelExtractorTransform.Create(env, new ImagePixelExtractorTransform.Arguments() + { + Column = new ImagePixelExtractorTransform.Column[1]{ new ImagePixelExtractorTransform.Column() { Source= "ImageCropped", Name = "Input", UseAlpha=false, InterleaveArgb=true} } - }, cropped); + }, cropped); - var thrown = false; - try - { - IDataView trans = TensorFlowTransform.Create(env, pixels, model_location, new[] { "Output" }, new[] { "Input" }); - } - catch - { - thrown = true; + var thrown = false; + try + { + IDataView trans = TensorFlowTransform.Create(env, pixels, model_location, new[] { "Output" }, new[] { "Input" }); + } + catch + { + thrown = true; + } + Assert.True(thrown); } - Assert.True(thrown); } } } diff --git a/test/Microsoft.ML.Tests/TensorFlowEstimatorTests.cs b/test/Microsoft.ML.Tests/TensorFlowEstimatorTests.cs index 89320fecf8..2f2820692f 100644 --- a/test/Microsoft.ML.Tests/TensorFlowEstimatorTests.cs +++ b/test/Microsoft.ML.Tests/TensorFlowEstimatorTests.cs @@ -133,8 +133,10 @@ void TestOldSavingAndLoading() [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 output differs from Baseline void TestCommandLine() { - var env = new MLContext(); - Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=a:R4:0-3 col=b:R4:0-3} xf=TFTransform{inputs=a inputs=b outputs=c modellocation={model_matmul/frozen_saved_model.pb}}" }), (int)0); + using (var env = new ConsoleEnvironment()) + { + Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=a:R4:0-3 col=b:R4:0-3} xf=TFTransform{inputs=a inputs=b outputs=c modellocation={model_matmul/frozen_saved_model.pb}}"}), (int)0); + } } [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // TensorFlow is 64-bit only @@ -142,87 +144,91 @@ public void TestTensorFlowStatic() { var modelLocation = "cifar_model/frozen_model.pb"; - var env = new MLContext(); - var imageHeight = 32; - var imageWidth = 32; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); + using (var env = new ConsoleEnvironment()) + { + var imageHeight = 32; + var imageWidth = 32; + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.CreateReader(env, ctx => ( - imagePath: ctx.LoadText(0), - name: ctx.LoadText(1))) - .Read(dataFile); + var data = TextLoader.CreateReader(env, ctx => ( + imagePath: ctx.LoadText(0), + name: ctx.LoadText(1))) + .Read(dataFile); - // Note that CamelCase column names are there to match the TF graph node names. - var pipe = data.MakeNewEstimator() - .Append(row => ( - row.name, - Input: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) - .Append(row => (row.name, Output: row.Input.ApplyTensorFlowGraph(modelLocation))); + // Note that CamelCase column names are there to match the TF graph node names. + var pipe = data.MakeNewEstimator() + .Append(row => ( + row.name, + Input: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) + .Append(row => (row.name, Output: row.Input.ApplyTensorFlowGraph(modelLocation))); - TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); + TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); - var result = pipe.Fit(data).Transform(data).AsDynamic; - result.Schema.TryGetColumnIndex("Output", out int output); - using (var cursor = result.GetRowCursor(col => col == output)) - { - var buffer = default(VBuffer); - var getter = cursor.GetGetter>(output); - var numRows = 0; - while (cursor.MoveNext()) + var result = pipe.Fit(data).Transform(data).AsDynamic; + result.Schema.TryGetColumnIndex("Output", out int output); + using (var cursor = result.GetRowCursor(col => col == output)) { - getter(ref buffer); - Assert.Equal(10, buffer.Length); - numRows += 1; + var buffer = default(VBuffer); + var getter = cursor.GetGetter>(output); + var numRows = 0; + while (cursor.MoveNext()) + { + getter(ref buffer); + Assert.Equal(10, buffer.Length); + numRows += 1; + } + Assert.Equal(3, numRows); } - Assert.Equal(3, numRows); } } [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] public void TestTensorFlowStaticWithSchema() { - const string modelLocation = "cifar_model/frozen_model.pb"; + var modelLocation = "cifar_model/frozen_model.pb"; - var env = new MLContext(); - var tensorFlowModel = TensorFlowUtils.LoadTensorFlowModel(env, modelLocation); - var schema = tensorFlowModel.GetInputSchema(); - Assert.True(schema.TryGetColumnIndex("Input", out int column)); - var type = (VectorType)schema.GetColumnType(column); - var imageHeight = type.Dimensions[0]; - var imageWidth = type.Dimensions[1]; + using (var env = new ConsoleEnvironment()) + { + var tensorFlowModel = TensorFlowUtils.LoadTensorFlowModel(env, modelLocation); + var schema = tensorFlowModel.GetInputSchema(); + Assert.True(schema.TryGetColumnIndex("Input", out int column)); + var type = (VectorType)schema.GetColumnType(column); + var imageHeight = type.Dimensions[0]; + var imageWidth = type.Dimensions[1]; - var dataFile = GetDataPath("images/images.tsv"); - var imageFolder = Path.GetDirectoryName(dataFile); + var dataFile = GetDataPath("images/images.tsv"); + var imageFolder = Path.GetDirectoryName(dataFile); - var data = TextLoader.CreateReader(env, ctx => ( - imagePath: ctx.LoadText(0), - name: ctx.LoadText(1))) - .Read(dataFile); + var data = TextLoader.CreateReader(env, ctx => ( + imagePath: ctx.LoadText(0), + name: ctx.LoadText(1))) + .Read(dataFile); - // Note that CamelCase column names are there to match the TF graph node names. - var pipe = data.MakeNewEstimator() - .Append(row => ( - row.name, - Input: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) - .Append(row => (row.name, Output: row.Input.ApplyTensorFlowGraph(tensorFlowModel))); + // Note that CamelCase column names are there to match the TF graph node names. + var pipe = data.MakeNewEstimator() + .Append(row => ( + row.name, + Input: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) + .Append(row => (row.name, Output: row.Input.ApplyTensorFlowGraph(tensorFlowModel))); - TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); + TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); - var result = pipe.Fit(data).Transform(data).AsDynamic; - result.Schema.TryGetColumnIndex("Output", out int output); - using (var cursor = result.GetRowCursor(col => col == output)) - { - var buffer = default(VBuffer); - var getter = cursor.GetGetter>(output); - var numRows = 0; - while (cursor.MoveNext()) + var result = pipe.Fit(data).Transform(data).AsDynamic; + result.Schema.TryGetColumnIndex("Output", out int output); + using (var cursor = result.GetRowCursor(col => col == output)) { - getter(ref buffer); - Assert.Equal(10, buffer.Length); - numRows += 1; + var buffer = default(VBuffer); + var getter = cursor.GetGetter>(output); + var numRows = 0; + while (cursor.MoveNext()) + { + getter(ref buffer); + Assert.Equal(10, buffer.Length); + numRows += 1; + } + Assert.Equal(3, numRows); } - Assert.Equal(3, numRows); } } @@ -245,13 +251,10 @@ private void ValidateTensorFlowTransformer(IDataView result) aGetter(ref avalue); bGetter(ref bvalue); cGetter(ref cvalue); - var aValues = avalue.GetValues(); - var bValues = bvalue.GetValues(); - var cValues = cvalue.GetValues(); - Assert.Equal(aValues[0] * bValues[0] + aValues[1] * bValues[2], cValues[0]); - Assert.Equal(aValues[0] * bValues[1] + aValues[1] * bValues[3], cValues[1]); - Assert.Equal(aValues[2] * bValues[0] + aValues[3] * bValues[2], cValues[2]); - Assert.Equal(aValues[2] * bValues[1] + aValues[3] * bValues[3], cValues[3]); + Assert.Equal(avalue.Values[0] * bvalue.Values[0] + avalue.Values[1] * bvalue.Values[2], cvalue.Values[0]); + Assert.Equal(avalue.Values[0] * bvalue.Values[1] + avalue.Values[1] * bvalue.Values[3], cvalue.Values[1]); + Assert.Equal(avalue.Values[2] * bvalue.Values[0] + avalue.Values[3] * bvalue.Values[2], cvalue.Values[2]); + Assert.Equal(avalue.Values[2] * bvalue.Values[1] + avalue.Values[3] * bvalue.Values[3], cvalue.Values[3]); } } } diff --git a/test/Microsoft.ML.Tests/TermEstimatorTests.cs b/test/Microsoft.ML.Tests/TermEstimatorTests.cs index 4caeaa27ae..84309d80de 100644 --- a/test/Microsoft.ML.Tests/TermEstimatorTests.cs +++ b/test/Microsoft.ML.Tests/TermEstimatorTests.cs @@ -71,13 +71,13 @@ void TestDifferentTypes() }, new MultiFileSource(dataPath)); var pipe = new ValueToKeyMappingEstimator(Env, new[]{ - new ValueToKeyMappingTransformer.ColumnInfo("float1", "TermFloat1"), - new ValueToKeyMappingTransformer.ColumnInfo("float4", "TermFloat4"), - new ValueToKeyMappingTransformer.ColumnInfo("double1", "TermDouble1"), - new ValueToKeyMappingTransformer.ColumnInfo("double4", "TermDouble4"), - new ValueToKeyMappingTransformer.ColumnInfo("int1", "TermInt1"), - new ValueToKeyMappingTransformer.ColumnInfo("text1", "TermText1"), - new ValueToKeyMappingTransformer.ColumnInfo("text2", "TermText2") + new TermTransform.ColumnInfo("float1", "TermFloat1"), + new TermTransform.ColumnInfo("float4", "TermFloat4"), + new TermTransform.ColumnInfo("double1", "TermDouble1"), + new TermTransform.ColumnInfo("double4", "TermDouble4"), + new TermTransform.ColumnInfo("int1", "TermInt1"), + new TermTransform.ColumnInfo("text1", "TermText1"), + new TermTransform.ColumnInfo("text2", "TermText2") }); var data = loader.Read(dataPath); data = TakeFilter.Create(Env, data, 10); @@ -102,9 +102,9 @@ void TestSimpleCase() var stringData = new[] { new TestClassDifferentTypes { A = "1", B = "c", C = "b" } }; var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new ValueToKeyMappingEstimator(Env, new[]{ - new ValueToKeyMappingTransformer.ColumnInfo("A", "TermA"), - new ValueToKeyMappingTransformer.ColumnInfo("B", "TermB"), - new ValueToKeyMappingTransformer.ColumnInfo("C", "TermC") + new TermTransform.ColumnInfo("A", "TermA"), + new TermTransform.ColumnInfo("B", "TermB"), + new TermTransform.ColumnInfo("C", "TermC") }); var invalidData = ComponentCreation.CreateDataView(Env, xydata); var validFitNotValidTransformData = ComponentCreation.CreateDataView(Env, stringData); @@ -117,9 +117,9 @@ void TestOldSavingAndLoading() var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); var est = new ValueToKeyMappingEstimator(Env, new[]{ - new ValueToKeyMappingTransformer.ColumnInfo("A", "TermA"), - new ValueToKeyMappingTransformer.ColumnInfo("B", "TermB"), - new ValueToKeyMappingTransformer.ColumnInfo("C", "TermC") + new TermTransform.ColumnInfo("A", "TermA"), + new TermTransform.ColumnInfo("B", "TermB"), + new TermTransform.ColumnInfo("C", "TermC") }); var transformer = est.Fit(dataView); var result = transformer.Transform(dataView); @@ -139,8 +139,8 @@ void TestMetadataCopy() var data = new[] { new TestMetaClass() { Term = "A", NotUsed = 1 }, new TestMetaClass() { Term = "B" }, new TestMetaClass() { Term = "C" } }; var dataView = ComponentCreation.CreateDataView(Env, data); var termEst = new ValueToKeyMappingEstimator(Env, new[] { - new ValueToKeyMappingTransformer.ColumnInfo("Term" ,"T") }); - + new TermTransform.ColumnInfo("Term" ,"T") }); + var termTransformer = termEst.Fit(dataView); var result = termTransformer.Transform(dataView); result.Schema.TryGetColumnIndex("T", out int termIndex); @@ -155,8 +155,10 @@ void TestMetadataCopy() [Fact] void TestCommandLine() { - var env = new MLContext(); - Assert.Equal(0, Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0} xf=Term{col=B:A} in=f:\2.txt" })); + using (var env = new ConsoleEnvironment()) + { + Assert.Equal(0, Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0} xf=Term{col=B:A} in=f:\2.txt" })); + } } private void ValidateTermTransformer(IDataView result) diff --git a/test/Microsoft.ML.Tests/TextLoaderTests.cs b/test/Microsoft.ML.Tests/TextLoaderTests.cs index fb83ffab24..575146fbf7 100644 --- a/test/Microsoft.ML.Tests/TextLoaderTests.cs +++ b/test/Microsoft.ML.Tests/TextLoaderTests.cs @@ -46,7 +46,7 @@ public void TestTextLoaderDataTypes() Assert.True(cursor.MoveNext()); - sbyte[] sByteTargets = new sbyte[] { sbyte.MinValue, sbyte.MaxValue, default }; + sbyte[] sByteTargets = new sbyte[] { sbyte.MinValue, sbyte.MaxValue, default}; short[] shortTargets = new short[] { short.MinValue, short.MaxValue, default }; int[] intTargets = new int[] { int.MinValue, int.MaxValue, default }; long[] longTargets = new long[] { long.MinValue, long.MaxValue, default }; @@ -96,7 +96,7 @@ public void TestTextLoaderInvalidLongMin() "loader=Text{col=DvInt8:I8:0 sep=comma}", }, logCurs: true); } - catch (Exception ex) + catch(Exception ex) { Assert.Equal("Could not parse value -9223372036854775809 in line 1, column DvInt8", ex.Message); return; @@ -142,7 +142,7 @@ public TextLoaderTests(ITestOutputHelper output) public void ConstructorDoesntThrow() { Assert.NotNull(new Legacy.Data.TextLoader("fakeFile.txt").CreateFrom()); - Assert.NotNull(new Legacy.Data.TextLoader("fakeFile.txt").CreateFrom(useHeader: true)); + Assert.NotNull(new Legacy.Data.TextLoader("fakeFile.txt").CreateFrom(useHeader:true)); Assert.NotNull(new Legacy.Data.TextLoader("fakeFile.txt").CreateFrom()); Assert.NotNull(new Legacy.Data.TextLoader("fakeFile.txt").CreateFrom(useHeader: false)); Assert.NotNull(new Legacy.Data.TextLoader("fakeFile.txt").CreateFrom(useHeader: false, supportSparse: false, trimWhitespace: false)); @@ -158,13 +158,15 @@ public void CanSuccessfullyApplyATransform() { var loader = new Legacy.Data.TextLoader("fakeFile.txt").CreateFrom(); - var environment = new MLContext(); - Experiment experiment = environment.CreateExperiment(); - Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; + using (var environment = new ConsoleEnvironment()) + { + Experiment experiment = environment.CreateExperiment(); + Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; - Assert.NotNull(output.Data); - Assert.NotNull(output.Data.VarName); - Assert.Null(output.Model); + Assert.NotNull(output.Data); + Assert.NotNull(output.Data.VarName); + Assert.Null(output.Model); + } } [Fact] @@ -172,54 +174,56 @@ public void CanSuccessfullyRetrieveQuotedData() { string dataPath = GetDataPath("QuotingData.csv"); var loader = new Legacy.Data.TextLoader(dataPath).CreateFrom(useHeader: true, separator: ',', allowQuotedStrings: true, supportSparse: false); + + using (var environment = new ConsoleEnvironment()) + { + Experiment experiment = environment.CreateExperiment(); + Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; - var environment = new MLContext(); - Experiment experiment = environment.CreateExperiment(); - Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; - - experiment.Compile(); - loader.SetInput(environment, experiment); - experiment.Run(); + experiment.Compile(); + loader.SetInput(environment, experiment); + experiment.Run(); - IDataView data = experiment.GetOutput(output.Data); - Assert.NotNull(data); + IDataView data = experiment.GetOutput(output.Data); + Assert.NotNull(data); - using (var cursor = data.GetRowCursor((a => true))) - { - var IDGetter = cursor.GetGetter(0); - var TextGetter = cursor.GetGetter>(1); + using (var cursor = data.GetRowCursor((a => true))) + { + var IDGetter = cursor.GetGetter(0); + var TextGetter = cursor.GetGetter>(1); - Assert.True(cursor.MoveNext()); + Assert.True(cursor.MoveNext()); - float ID = 0; - IDGetter(ref ID); - Assert.Equal(1, ID); + float ID = 0; + IDGetter(ref ID); + Assert.Equal(1, ID); - ReadOnlyMemory Text = new ReadOnlyMemory(); - TextGetter(ref Text); - Assert.Equal("This text contains comma, within quotes.", Text.ToString()); + ReadOnlyMemory Text = new ReadOnlyMemory(); + TextGetter(ref Text); + Assert.Equal("This text contains comma, within quotes.", Text.ToString()); - Assert.True(cursor.MoveNext()); + Assert.True(cursor.MoveNext()); - ID = 0; - IDGetter(ref ID); - Assert.Equal(2, ID); + ID = 0; + IDGetter(ref ID); + Assert.Equal(2, ID); - Text = new ReadOnlyMemory(); - TextGetter(ref Text); - Assert.Equal("This text contains extra punctuations and special characters.;*<>?!@#$%^&*()_+=-{}|[]:;'", Text.ToString()); + Text = new ReadOnlyMemory(); + TextGetter(ref Text); + Assert.Equal("This text contains extra punctuations and special characters.;*<>?!@#$%^&*()_+=-{}|[]:;'", Text.ToString()); - Assert.True(cursor.MoveNext()); + Assert.True(cursor.MoveNext()); - ID = 0; - IDGetter(ref ID); - Assert.Equal(3, ID); + ID = 0; + IDGetter(ref ID); + Assert.Equal(3, ID); - Text = new ReadOnlyMemory(); - TextGetter(ref Text); - Assert.Equal("This text has no quotes", Text.ToString()); + Text = new ReadOnlyMemory(); + TextGetter(ref Text); + Assert.Equal("This text has no quotes", Text.ToString()); - Assert.False(cursor.MoveNext()); + Assert.False(cursor.MoveNext()); + } } } @@ -229,20 +233,21 @@ public void CanSuccessfullyRetrieveSparseData() string dataPath = GetDataPath("SparseData.txt"); var loader = new Legacy.Data.TextLoader(dataPath).CreateFrom(useHeader: true, allowQuotedStrings: false, supportSparse: true); - var environment = new MLContext(); - Experiment experiment = environment.CreateExperiment(); - Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; + using (var environment = new ConsoleEnvironment()) + { + Experiment experiment = environment.CreateExperiment(); + Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; - experiment.Compile(); - loader.SetInput(environment, experiment); - experiment.Run(); + experiment.Compile(); + loader.SetInput(environment, experiment); + experiment.Run(); - IDataView data = experiment.GetOutput(output.Data); - Assert.NotNull(data); + IDataView data = experiment.GetOutput(output.Data); + Assert.NotNull(data); - using (var cursor = data.GetRowCursor((a => true))) - { - var getters = new ValueGetter[]{ + using (var cursor = data.GetRowCursor((a => true))) + { + var getters = new ValueGetter[]{ cursor.GetGetter(0), cursor.GetGetter(1), cursor.GetGetter(2), @@ -251,37 +256,38 @@ public void CanSuccessfullyRetrieveSparseData() }; - Assert.True(cursor.MoveNext()); + Assert.True(cursor.MoveNext()); - float[] targets = new float[] { 1, 2, 3, 4, 5 }; - for (int i = 0; i < getters.Length; i++) - { - float value = 0; - getters[i](ref value); - Assert.Equal(targets[i], value); - } + float[] targets = new float[] { 1, 2, 3, 4, 5 }; + for (int i = 0; i < getters.Length; i++) + { + float value = 0; + getters[i](ref value); + Assert.Equal(targets[i], value); + } - Assert.True(cursor.MoveNext()); + Assert.True(cursor.MoveNext()); - targets = new float[] { 0, 0, 0, 4, 5 }; - for (int i = 0; i < getters.Length; i++) - { - float value = 0; - getters[i](ref value); - Assert.Equal(targets[i], value); - } + targets = new float[] { 0, 0, 0, 4, 5 }; + for (int i = 0; i < getters.Length; i++) + { + float value = 0; + getters[i](ref value); + Assert.Equal(targets[i], value); + } - Assert.True(cursor.MoveNext()); + Assert.True(cursor.MoveNext()); - targets = new float[] { 0, 2, 0, 0, 0 }; - for (int i = 0; i < getters.Length; i++) - { - float value = 0; - getters[i](ref value); - Assert.Equal(targets[i], value); - } + targets = new float[] { 0, 2, 0, 0, 0 }; + for (int i = 0; i < getters.Length; i++) + { + float value = 0; + getters[i](ref value); + Assert.Equal(targets[i], value); + } - Assert.False(cursor.MoveNext()); + Assert.False(cursor.MoveNext()); + } } } @@ -292,50 +298,52 @@ public void CanSuccessfullyTrimSpaces() string dataPath = GetDataPath("TrimData.csv"); var loader = new Legacy.Data.TextLoader(dataPath).CreateFrom(useHeader: true, separator: ',', allowQuotedStrings: false, supportSparse: false, trimWhitespace: true); - var environment = new MLContext(); - Experiment experiment = environment.CreateExperiment(); - Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; - - experiment.Compile(); - loader.SetInput(environment, experiment); - experiment.Run(); + using (var environment = new ConsoleEnvironment()) + { + Experiment experiment = environment.CreateExperiment(); + Legacy.ILearningPipelineDataStep output = loader.ApplyStep(null, experiment) as Legacy.ILearningPipelineDataStep; - IDataView data = experiment.GetOutput(output.Data); - Assert.NotNull(data); + experiment.Compile(); + loader.SetInput(environment, experiment); + experiment.Run(); - using (var cursor = data.GetRowCursor((a => true))) - { - var IDGetter = cursor.GetGetter(0); - var TextGetter = cursor.GetGetter>(1); + IDataView data = experiment.GetOutput(output.Data); + Assert.NotNull(data); - Assert.True(cursor.MoveNext()); + using (var cursor = data.GetRowCursor((a => true))) + { + var IDGetter = cursor.GetGetter(0); + var TextGetter = cursor.GetGetter>(1); - float ID = 0; - IDGetter(ref ID); - Assert.Equal(1, ID); + Assert.True(cursor.MoveNext()); - ReadOnlyMemory Text = new ReadOnlyMemory(); - TextGetter(ref Text); - Assert.Equal("There is a space at the end", Text.ToString()); + float ID = 0; + IDGetter(ref ID); + Assert.Equal(1, ID); - Assert.True(cursor.MoveNext()); + ReadOnlyMemory Text = new ReadOnlyMemory(); + TextGetter(ref Text); + Assert.Equal("There is a space at the end", Text.ToString()); - ID = 0; - IDGetter(ref ID); - Assert.Equal(2, ID); + Assert.True(cursor.MoveNext()); - Text = new ReadOnlyMemory(); - TextGetter(ref Text); - Assert.Equal("There is no space at the end", Text.ToString()); + ID = 0; + IDGetter(ref ID); + Assert.Equal(2, ID); - Assert.False(cursor.MoveNext()); + Text = new ReadOnlyMemory(); + TextGetter(ref Text); + Assert.Equal("There is no space at the end", Text.ToString()); + + Assert.False(cursor.MoveNext()); + } } } [Fact] public void ThrowsExceptionWithPropertyName() { - Exception ex = Assert.Throws(() => new Legacy.Data.TextLoader("fakefile.txt").CreateFrom()); + Exception ex = Assert.Throws( () => new Legacy.Data.TextLoader("fakefile.txt").CreateFrom() ); Assert.StartsWith("Field or property String1 is missing ColumnAttribute", ex.Message); } @@ -343,9 +351,9 @@ public void ThrowsExceptionWithPropertyName() public void CanSuccessfullyColumnNameProperty() { var loader = new Legacy.Data.TextLoader("fakefile.txt").CreateFrom(); - Assert.Equal("Col1", loader.Arguments.Column[0].Name); - Assert.Equal("Col2", loader.Arguments.Column[1].Name); - Assert.Equal("String_3", loader.Arguments.Column[2].Name); + Assert.Equal("Col1",loader.Arguments.Column[0].Name); + Assert.Equal("Col2",loader.Arguments.Column[1].Name); + Assert.Equal("String_3",loader.Arguments.Column[2].Name); } public class QuoteInput @@ -405,7 +413,7 @@ public class ModelWithColumnNameAttribute [Column("1")] [ColumnName("Col2")] public string String_2; - [Column("3")] + [Column("3")] public string String_3; } } diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs b/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs index 7ccd12667c..6d4a20cd15 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/FAFMEstimator.cs @@ -20,7 +20,7 @@ public void FieldAwareFactorizationMachine_Estimator() var data = new TextLoader(Env, GetFafmBCLoaderArgs()) .Read(GetDataPath(TestDatasets.breastCancer.trainFilename)); - var est = new FieldAwareFactorizationMachineTrainer(Env, new[] { "Feature1", "Feature2", "Feature3", "Feature4" }, "Label", + var est = new FieldAwareFactorizationMachineTrainer(Env, "Label", new[] { "Feature1", "Feature2", "Feature3", "Feature4" }, advancedSettings:s=> { s.Shuffle = false; diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs index 30906c8940..fc3b458145 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/LbfgsTests.cs @@ -4,7 +4,6 @@ using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime.Data; -using Microsoft.ML.Runtime.Internal.Calibration; using Microsoft.ML.Runtime.Learners; using Microsoft.ML.Trainers; using Xunit; @@ -17,7 +16,7 @@ public partial class TrainerEstimators public void TestEstimatorLogisticRegression() { (IEstimator pipe, IDataView dataView) = GetBinaryClassificationPipeline(); - pipe = pipe.Append(new LogisticRegression(Env, "Label", "Features")); + pipe = pipe.Append(new LogisticRegression(Env, "Features", "Label")); TestEstimatorCore(pipe, dataView); Done(); } @@ -26,7 +25,7 @@ public void TestEstimatorLogisticRegression() public void TestEstimatorMulticlassLogisticRegression() { (IEstimator pipe, IDataView dataView) = GetMultiClassPipeline(); - pipe = pipe.Append(new MulticlassLogisticRegression(Env, "Label", "Features")); + pipe = pipe.Append(new MulticlassLogisticRegression(Env, "Features", "Label")); TestEstimatorCore(pipe, dataView); Done(); } @@ -35,45 +34,9 @@ public void TestEstimatorMulticlassLogisticRegression() public void TestEstimatorPoissonRegression() { var dataView = GetRegressionPipeline(); - var pipe = new PoissonRegression(Env, "Label", "Features"); + var pipe = new PoissonRegression(Env, "Features", "Label"); TestEstimatorCore(pipe, dataView); Done(); } - - [Fact] - public void TestLogisticRegressionStats() - { - (IEstimator pipe, IDataView dataView) = GetBinaryClassificationPipeline(); - - pipe = pipe.Append(new LogisticRegression(Env, "Label", "Features", advancedSettings: s => { s.ShowTrainingStats = true; })); - var transformerChain = pipe.Fit(dataView) as TransformerChain>; - - var linearModel = transformerChain.LastTransformer.Model.SubPredictor as LinearBinaryPredictor; - var stats = linearModel.Statistics; - LinearModelStatistics.TryGetBiasStatistics(stats, 2, out float stdError, out float zScore, out float pValue); - - CompareNumbersWithTolerance(stdError, 0.250672936); - CompareNumbersWithTolerance(zScore, 7.97852373); - } - - [Fact] - public void TestLogisticRegressionStats_MKL() - { - (IEstimator pipe, IDataView dataView) = GetBinaryClassificationPipeline(); - - pipe = pipe.Append(new LogisticRegression(Env, "Label", "Features", advancedSettings: s => { - s.ShowTrainingStats = true; - s.StdComputer = new ComputeLRTrainingStdThroughHal(); - })); - - var transformerChain = pipe.Fit(dataView) as TransformerChain>; - - var linearModel = transformerChain.LastTransformer.Model.SubPredictor as LinearBinaryPredictor; - var stats = linearModel.Statistics; - LinearModelStatistics.TryGetBiasStatistics(stats, 2, out float stdError, out float zScore, out float pValue); - - CompareNumbersWithTolerance(stdError, 0.250672936); - CompareNumbersWithTolerance(zScore, 7.97852373); - } } } diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs index 4b1e8cf92e..cb5a8b2748 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/MatrixFactorizationTests.cs @@ -31,7 +31,7 @@ public void MatrixFactorization_Estimator() var invalidData = new TextLoader(Env, GetLoaderArgs(labelColumnName, matrixColumnIndexColumnName + "Renamed", matrixRowIndexColumnName + "Renamed")) .Read(new MultiFileSource(GetDataPath(TestDatasets.trivialMatrixFactorization.testFilename))); - var est = new MatrixFactorizationTrainer(Env, matrixColumnIndexColumnName, matrixRowIndexColumnName, labelColumnName, + var est = new MatrixFactorizationTrainer(Env, labelColumnName, matrixColumnIndexColumnName, matrixRowIndexColumnName, advancedSettings: s => { s.NumIterations = 3; @@ -62,7 +62,7 @@ public void MatrixFactorizationSimpleTrainAndPredict() var data = reader.Read(new MultiFileSource(GetDataPath(TestDatasets.trivialMatrixFactorization.trainFilename))); // Create a pipeline with a single operator. - var pipeline = new MatrixFactorizationTrainer(mlContext, userColumnName, itemColumnName, labelColumnName, + var pipeline = new MatrixFactorizationTrainer(mlContext, labelColumnName, userColumnName, itemColumnName, advancedSettings: s => { s.NumIterations = 3; @@ -179,10 +179,8 @@ public void MatrixFactorizationInMemoryData() // Create a matrix factorization trainer which may consume "Value" as the training label, "MatrixColumnIndex" as the // matrix's column index, and "MatrixRowIndex" as the matrix's row index. var mlContext = new MLContext(seed: 1, conc: 1); - var pipeline = new MatrixFactorizationTrainer(mlContext, - nameof(MatrixElement.MatrixColumnIndex), - nameof(MatrixElement.MatrixRowIndex), - nameof(MatrixElement.Value), + var pipeline = new MatrixFactorizationTrainer(mlContext, nameof(MatrixElement.Value), + nameof(MatrixElement.MatrixColumnIndex), nameof(MatrixElement.MatrixRowIndex), advancedSettings: s => { s.NumIterations = 10; @@ -271,10 +269,8 @@ public void MatrixFactorizationInMemoryDataZeroBaseIndex() // Create a matrix factorization trainer which may consume "Value" as the training label, "MatrixColumnIndex" as the // matrix's column index, and "MatrixRowIndex" as the matrix's row index. var mlContext = new MLContext(seed: 1, conc: 1); - var pipeline = new MatrixFactorizationTrainer(mlContext, - nameof(MatrixElementZeroBased.MatrixColumnIndex), - nameof(MatrixElementZeroBased.MatrixRowIndex), - nameof(MatrixElementZeroBased.Value), + var pipeline = new MatrixFactorizationTrainer(mlContext, nameof(MatrixElementZeroBased.Value), + nameof(MatrixElementZeroBased.MatrixColumnIndex), nameof(MatrixElementZeroBased.MatrixRowIndex), advancedSettings: s => { s.NumIterations = 100; @@ -331,112 +327,5 @@ public void MatrixFactorizationInMemoryDataZeroBaseIndex() // The presence of out-of-range indexes may lead to NaN Assert.True(float.IsNaN(pred.Score)); } - - // The following ingredients are used to define a 3-by-2 one-class - // matrix used in a test, OneClassMatrixFactorizationInMemoryDataZeroBaseIndex, - // for one-class matrix factorization. One-class matrix means that all - // the available elements in the training matrix are 1. Such a matrix - // is common. Let's use online game store as an example. Assume that - // user IDs are row indexes and game IDs are column indexes. By - // encoding all users' purchase history as a matrix (i.e., if the value - // at the u-th row and the v-th column is 1, then the u-th user owns - // the v-th game), a one-class matrix gets created because all matrix - // elements are 1. If you train a prediction model from that matrix - // using standard collaborative filtering, all your predictions would - // be 1! One-class matrix factorization assumes unspecified matrix - // entries are all 0 (or a small constant value selected by the user) - // so that the trainined model can assign purchased itemas higher - // scores than those not purchased. - private const int _oneClassMatrixColumnCount = 2; - private const int _oneClassMatrixRowCount = 3; - - private class OneClassMatrixElementZeroBased - { - [KeyType(Contiguous = true, Count = _oneClassMatrixColumnCount, Min = 0)] - public uint MatrixColumnIndex; - [KeyType(Contiguous = true, Count = _oneClassMatrixRowCount, Min = 0)] - public uint MatrixRowIndex; - public float Value; - } - - private class OneClassMatrixElementZeroBasedForScore - { - [KeyType(Contiguous = true, Count = _oneClassMatrixColumnCount, Min = 0)] - public uint MatrixColumnIndex; - [KeyType(Contiguous = true, Count = _oneClassMatrixRowCount, Min = 0)] - public uint MatrixRowIndex; - public float Value; - public float Score; - } - - [ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // This test is being fixed as part of issue #1441. - public void OneClassMatrixFactorizationInMemoryDataZeroBaseIndex() - { - // Create an in-memory matrix as a list of tuples (column index, row index, value). For one-class matrix - // factorization problem, unspecified matrix elements are all a constant provided by user. If that constant is 0.15, - // the following list means a 3-by-2 training matrix with elements: - // (0, 0, 1), (1, 1, 1), (0, 2, 1), (0, 1, 0.15), (1, 0, 0.15), (1, 2, 0.15). - // because matrix elements at (0, 1), (1, 0), and (1, 2) are not specified. - var dataMatrix = new List(); - dataMatrix.Add(new OneClassMatrixElementZeroBased() { MatrixColumnIndex = 0, MatrixRowIndex = 0, Value = 1 }); - dataMatrix.Add(new OneClassMatrixElementZeroBased() { MatrixColumnIndex = 1, MatrixRowIndex = 1, Value = 1 }); - dataMatrix.Add(new OneClassMatrixElementZeroBased() { MatrixColumnIndex = 0, MatrixRowIndex = 2, Value = 1 }); - - // Convert the in-memory matrix into an IDataView so that ML.NET components can consume it. - var dataView = ComponentCreation.CreateDataView(Env, dataMatrix); - - // Create a matrix factorization trainer which may consume "Value" as the training label, "MatrixColumnIndex" as the - // matrix's column index, and "MatrixRowIndex" as the matrix's row index. - var mlContext = new MLContext(seed: 1, conc: 1); - var pipeline = new MatrixFactorizationTrainer(mlContext, - nameof(OneClassMatrixElementZeroBased.MatrixColumnIndex), - nameof(OneClassMatrixElementZeroBased.MatrixRowIndex), - nameof(OneClassMatrixElementZeroBased.Value), - advancedSettings: s => - { - s.LossFunction = MatrixFactorizationTrainer.LossFunctionType.SquareLossOneClass; - s.NumIterations = 100; - s.NumThreads = 1; // To eliminate randomness, # of threads must be 1. - // Let's test non-default regularization coefficient. - s.Lambda = 0.025; - s.K = 16; - // Importance coefficient of loss function over matrix elements not specified in the input matrix. - s.Alpha = 0.01; - // Desired value for matrix elements not specified in the input matrix. - s.C = 0.15; - }); - - // Train a matrix factorization model. - var model = pipeline.Fit(dataView); - - // Apply the trained model to the training set. - var prediction = model.Transform(dataView); - - // Calculate regression matrices for the prediction result. - var metrics = mlContext.Regression.Evaluate(prediction, label: "Value", score: "Score"); - - // Make sure the prediction error is not too large. - Assert.InRange(metrics.L2, 0, 0.0016); - - // Create data for testing. Note that the 2nd element is not specified in the training data so it should - // be close to the constant specified by s.C = 0.15. Comparing with the data structure used in training phase, - // one extra float is added into OneClassMatrixElementZeroBasedForScore for storing the prediction result. Note - // that the prediction engine may ignore Value and assign the predicted value to Score. - var testDataMatrix = new List(); - testDataMatrix.Add(new OneClassMatrixElementZeroBasedForScore() { MatrixColumnIndex = 0, MatrixRowIndex = 0, Value = 0, Score = 0 }); - testDataMatrix.Add(new OneClassMatrixElementZeroBasedForScore() { MatrixColumnIndex = 1, MatrixRowIndex = 2, Value = 0, Score = 0 }); - - // Convert the in-memory matrix into an IDataView so that ML.NET components can consume it. - var testDataView = ComponentCreation.CreateDataView(Env, testDataMatrix); - - // Apply the trained model to the test data. - var testPrediction = model.Transform(testDataView); - - var testResults = new List(testPrediction.AsEnumerable(mlContext, false)); - // Positive example (i.e., examples can be found in dataMatrix) is close to 1. - CompareNumbersWithTolerance(0.982391, testResults[0].Score, digitsOfPrecision: 5); - // Negative example (i.e., examples can not be found in dataMatrix) is close to 0.15 (specified by s.C = 0.15 in the trainer). - CompareNumbersWithTolerance(0.141411, testResults[1].Score, digitsOfPrecision: 5); - } } } \ No newline at end of file diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/MetalinearEstimators.cs b/test/Microsoft.ML.Tests/TrainerEstimators/MetalinearEstimators.cs index 08796a4ff3..0ef6f379db 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/MetalinearEstimators.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/MetalinearEstimators.cs @@ -31,7 +31,7 @@ public void OVAWithAllConstructorArgs() }); pipeline.Append(new Ova(Env, averagePerceptron, "Label", true, calibrator: calibrator, 10000, true)) - .Append(new KeyToValueMappingEstimator(Env, "PredictedLabel")); + .Append(new KeyToValueEstimator(Env, "PredictedLabel")); TestEstimatorCore(pipeline, data); Done(); @@ -44,10 +44,10 @@ public void OVAWithAllConstructorArgs() public void OVAUncalibrated() { var (pipeline, data) = GetMultiClassPipeline(); - var sdcaTrainer = new SdcaBinaryTrainer(Env, "Label", "Features", advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; s.Calibrator = null; }); + var sdcaTrainer = new SdcaBinaryTrainer(Env, "Features", "Label", advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; s.Calibrator = null; }); pipeline.Append(new Ova(Env, sdcaTrainer, useProbabilities: false)) - .Append(new KeyToValueMappingEstimator(Env, "PredictedLabel")); + .Append(new KeyToValueEstimator(Env, "PredictedLabel")); TestEstimatorCore(pipeline, data); Done(); @@ -61,9 +61,9 @@ public void Pkpd() { var (pipeline, data) = GetMultiClassPipeline(); - var sdcaTrainer = new SdcaBinaryTrainer(Env, "Label", "Features", advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; }); + var sdcaTrainer = new SdcaBinaryTrainer(Env, "Features", "Label", advancedSettings: (s) => { s.MaxIterations = 100; s.Shuffle = true; s.NumThreads = 1; }); pipeline.Append(new Pkpd(Env, sdcaTrainer)) - .Append(new KeyToValueMappingEstimator(Env, "PredictedLabel")); + .Append(new KeyToValueEstimator(Env, "PredictedLabel")); TestEstimatorCore(pipeline, data); Done(); diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs index edd5d19bec..87bdddc6e8 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/OlsLinearRegressionTests.cs @@ -13,7 +13,7 @@ public partial class TrainerEstimators public void TestEstimatorOlsLinearRegression() { var dataView = GetRegressionPipeline(); - var pipe = new OlsLinearRegressionTrainer(Env, "Label", "Features"); + var pipe = new OlsLinearRegressionTrainer(Env, "Features", "Label"); TestEstimatorCore(pipe, dataView); Done(); } diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/OnlineLinearTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/OnlineLinearTests.cs index afb6826001..10ae3c7a8a 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/OnlineLinearTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/OnlineLinearTests.cs @@ -5,7 +5,6 @@ using Microsoft.ML.Core.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Data; -using Microsoft.ML.StaticPipe; using Microsoft.ML.Trainers.Online; using Xunit; diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/SdcaTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/SdcaTests.cs index a1a3d37703..6f5917015f 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/SdcaTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/SdcaTests.cs @@ -19,13 +19,13 @@ public void SdcaWorkout() var data = TextLoader.CreateReader(Env, ctx => (Label: ctx.LoadFloat(0), Features: ctx.LoadFloat(1, 10))) .Read(dataPath); - IEstimator est = new SdcaBinaryTrainer(Env, "Label", "Features", advancedSettings: (s) => s.ConvergenceTolerance = 1e-2f); + IEstimator est = new SdcaBinaryTrainer(Env, "Features", "Label", advancedSettings: (s) => s.ConvergenceTolerance = 1e-2f); TestEstimatorCore(est, data.AsDynamic); - est = new SdcaRegressionTrainer(Env, "Label", "Features", advancedSettings: (s) => s.ConvergenceTolerance = 1e-2f); + est = new SdcaRegressionTrainer(Env, "Features", "Label", advancedSettings: (s) => s.ConvergenceTolerance = 1e-2f); TestEstimatorCore(est, data.AsDynamic); - est = new SdcaMultiClassTrainer(Env, "Label", "Features", advancedSettings: (s) => s.ConvergenceTolerance = 1e-2f); + est = new SdcaMultiClassTrainer(Env, "Features", "Label", advancedSettings: (s) => s.ConvergenceTolerance = 1e-2f); TestEstimatorCore(est, data.AsDynamic); Done(); diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs b/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs index bf139bee79..fc4694c9c1 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/SymSgdClassificationTests.cs @@ -18,7 +18,7 @@ public partial class TrainerEstimators public void TestEstimatorSymSgdClassificationTrainer() { (var pipe, var dataView) = GetBinaryClassificationPipeline(); - pipe = pipe.Append(new SymSgdClassificationTrainer(Env, "Label", "Features")); + pipe = pipe.Append(new SymSgdClassificationTrainer(Env, "Features", "Label")); TestEstimatorCore(pipe, dataView); Done(); } @@ -29,13 +29,13 @@ public void TestEstimatorSymSgdInitPredictor() (var pipe, var dataView) = GetBinaryClassificationPipeline(); var transformedData = pipe.Fit(dataView).Transform(dataView); - var initPredictor = new SdcaBinaryTrainer(Env, "Label", "Features").Fit(transformedData); + var initPredictor = new SdcaBinaryTrainer(Env, "Features", "Label").Fit(transformedData); var data = initPredictor.Transform(transformedData); - var withInitPredictor = new SymSgdClassificationTrainer(Env, "Label", "Features").Train(transformedData, initialPredictor: initPredictor.Model); + var withInitPredictor = new SymSgdClassificationTrainer(Env, "Features", "Label").Train(transformedData, initialPredictor: initPredictor.Model); var outInitData = withInitPredictor.Transform(transformedData); - var notInitPredictor = new SymSgdClassificationTrainer(Env, "Label", "Features").Train(transformedData); + var notInitPredictor = new SymSgdClassificationTrainer(Env, "Features", "Label").Train(transformedData); var outNoInitData = notInitPredictor.Transform(transformedData); int numExamples = 10; diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs b/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs index 1ac7c28622..744b186aed 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/TrainerEstimators.cs @@ -71,7 +71,7 @@ public void KMeansEstimator() // Pipeline. - var pipeline = new KMeansPlusPlusTrainer(Env, featureColumn, weights: weights, + var pipeline = new KMeansPlusPlusTrainer(Env, featureColumn, weightColumn: weights, advancedSettings: s => { s.InitAlgorithm = KMeansPlusPlusTrainer.InitAlgorithm.KMeansParallel; }); TestEstimatorCore(pipeline, data); @@ -86,7 +86,7 @@ public void KMeansEstimator() public void TestEstimatorHogwildSGD() { (IEstimator pipe, IDataView dataView) = GetBinaryClassificationPipeline(); - pipe = pipe.Append(new StochasticGradientDescentClassificationTrainer(Env, "Label", "Features")); + pipe = pipe.Append(new StochasticGradientDescentClassificationTrainer(Env, "Features", "Label")); TestEstimatorCore(pipe, dataView); Done(); } @@ -140,8 +140,8 @@ public void TestEstimatorMultiClassNaiveBayesTrainer() // Pipeline. var pipeline = new ValueToKeyMappingEstimator(Env, new[]{ - new ValueToKeyMappingTransformer.ColumnInfo("Workclass", "Group"), - new ValueToKeyMappingTransformer.ColumnInfo("Label", "Label0") }); + new TermTransform.ColumnInfo("Workclass", "Group"), + new TermTransform.ColumnInfo("Label", "Label0") }); return (pipeline, data); } diff --git a/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs b/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs index 9c583c9533..8dff39c0dc 100644 --- a/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs +++ b/test/Microsoft.ML.Tests/TrainerEstimators/TreeEstimators.cs @@ -204,7 +204,7 @@ public void LightGbmMultiClassEstimator() var (pipeline, data) = GetMultiClassPipeline(); pipeline.Append(new LightGbmMulticlassTrainer(Env, "Label", "Features", advancedSettings: s => { s.LearningRate = 0.4; })) - .Append(new KeyToValueMappingEstimator(Env, "PredictedLabel")); + .Append(new KeyToValueEstimator(Env, "PredictedLabel")); TestEstimatorCore(pipeline, data); Done(); diff --git a/test/Microsoft.ML.Tests/Transformers/CategoricalHashTests.cs b/test/Microsoft.ML.Tests/Transformers/CategoricalHashTests.cs index 43646f5ef1..53700b1962 100644 --- a/test/Microsoft.ML.Tests/Transformers/CategoricalHashTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/CategoricalHashTests.cs @@ -51,10 +51,10 @@ public void CategoricalHashWorkout() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new OneHotHashEncodingEstimator(Env, new[]{ - new OneHotHashEncodingEstimator.ColumnInfo("A", "CatA", OneHotEncodingTransformer.OutputKind.Bag), - new OneHotHashEncodingEstimator.ColumnInfo("A", "CatB", OneHotEncodingTransformer.OutputKind.Bin), - new OneHotHashEncodingEstimator.ColumnInfo("A", "CatC", OneHotEncodingTransformer.OutputKind.Ind), - new OneHotHashEncodingEstimator.ColumnInfo("A", "CatD", OneHotEncodingTransformer.OutputKind.Key), + new OneHotHashEncodingEstimator.ColumnInfo("A", "CatA", CategoricalTransform.OutputKind.Bag), + new OneHotHashEncodingEstimator.ColumnInfo("A", "CatB", CategoricalTransform.OutputKind.Bin), + new OneHotHashEncodingEstimator.ColumnInfo("A", "CatC", CategoricalTransform.OutputKind.Ind), + new OneHotHashEncodingEstimator.ColumnInfo("A", "CatD", CategoricalTransform.OutputKind.Key), }); TestEstimatorCore(pipe, dataView); @@ -88,7 +88,7 @@ public void CategoricalHashStatic() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); var savedData = TakeFilter.Create(Env, est.Fit(data).Transform(data).AsDynamic, 4); - var view = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "A", "B", "C", "D", "E" }); + var view = SelectColumnsTransform.CreateKeep(Env, savedData, false, "A", "B", "C", "D", "E"); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, view, fs, keepHidden: true); } @@ -107,16 +107,16 @@ public void TestMetadataPropagation() var dataView = ComponentCreation.CreateDataView(Env, data); var bagPipe = new OneHotHashEncodingEstimator(Env, - new OneHotHashEncodingEstimator.ColumnInfo("A", "CatA", OneHotEncodingTransformer.OutputKind.Bag, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("B", "CatB", OneHotEncodingTransformer.OutputKind.Bag, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("C", "CatC", OneHotEncodingTransformer.OutputKind.Bag, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("D", "CatD", OneHotEncodingTransformer.OutputKind.Bag, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("E", "CatE", OneHotEncodingTransformer.OutputKind.Ind, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("F", "CatF", OneHotEncodingTransformer.OutputKind.Ind, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("A", "CatG", OneHotEncodingTransformer.OutputKind.Key, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("B", "CatH", OneHotEncodingTransformer.OutputKind.Key, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("A", "CatI", OneHotEncodingTransformer.OutputKind.Bin, invertHash: -1), - new OneHotHashEncodingEstimator.ColumnInfo("B", "CatJ", OneHotEncodingTransformer.OutputKind.Bin, invertHash: -1)); + new OneHotHashEncodingEstimator.ColumnInfo("A", "CatA", CategoricalTransform.OutputKind.Bag, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("B", "CatB", CategoricalTransform.OutputKind.Bag, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("C", "CatC", CategoricalTransform.OutputKind.Bag, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("D", "CatD", CategoricalTransform.OutputKind.Bag, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("E", "CatE", CategoricalTransform.OutputKind.Ind, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("F", "CatF", CategoricalTransform.OutputKind.Ind, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("A", "CatG", CategoricalTransform.OutputKind.Key, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("B", "CatH", CategoricalTransform.OutputKind.Key, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("A", "CatI", CategoricalTransform.OutputKind.Bin, invertHash: -1), + new OneHotHashEncodingEstimator.ColumnInfo("B", "CatJ", CategoricalTransform.OutputKind.Bin, invertHash: -1)); var bagResult = bagPipe.Fit(dataView).Transform(dataView); ValidateMetadata(bagResult); diff --git a/test/Microsoft.ML.Tests/Transformers/CategoricalTests.cs b/test/Microsoft.ML.Tests/Transformers/CategoricalTests.cs index f9d7f58876..3caf54f6f3 100644 --- a/test/Microsoft.ML.Tests/Transformers/CategoricalTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/CategoricalTests.cs @@ -54,30 +54,16 @@ public void CategoricalWorkout() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new OneHotEncodingEstimator(Env, new[]{ - new OneHotEncodingEstimator.ColumnInfo("A", "CatA", OneHotEncodingTransformer.OutputKind.Bag), - new OneHotEncodingEstimator.ColumnInfo("A", "CatB", OneHotEncodingTransformer.OutputKind.Bin), - new OneHotEncodingEstimator.ColumnInfo("A", "CatC", OneHotEncodingTransformer.OutputKind.Ind), - new OneHotEncodingEstimator.ColumnInfo("A", "CatD", OneHotEncodingTransformer.OutputKind.Key), + new OneHotEncodingEstimator.ColumnInfo("A", "CatA", CategoricalTransform.OutputKind.Bag), + new OneHotEncodingEstimator.ColumnInfo("A", "CatB", CategoricalTransform.OutputKind.Bin), + new OneHotEncodingEstimator.ColumnInfo("A", "CatC", CategoricalTransform.OutputKind.Ind), + new OneHotEncodingEstimator.ColumnInfo("A", "CatD", CategoricalTransform.OutputKind.Key), }); TestEstimatorCore(pipe, dataView); Done(); } - [Fact] - public void CategoricalOneHotHashEncoding() - { - var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; - - var mlContext = new MLContext(); - var dataView = ComponentCreation.CreateDataView(mlContext, data); - - var pipe = mlContext.Transforms.Categorical.OneHotHashEncoding("A", "CatA", 16, 0, OneHotEncodingTransformer.OutputKind.Bag); - - TestEstimatorCore(pipe, dataView); - Done(); - } - [Fact] public void CategoricalStatic() { @@ -105,7 +91,7 @@ public void CategoricalStatic() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); var savedData = TakeFilter.Create(Env, est.Fit(data).Transform(data).AsDynamic, 4); - var view = new ColumnSelectingTransformer(Env, new string[]{"A", "B", "C", "D", "E" }, null, false).Transform(savedData); + var view = new SelectColumnsTransform(Env, new string[]{"A", "B", "C", "D", "E" }, null, false).Transform(savedData); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, view, fs, keepHidden: true); } @@ -125,18 +111,18 @@ public void TestMetadataPropagation() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new OneHotEncodingEstimator(Env, new[] { - new OneHotEncodingEstimator.ColumnInfo("A", "CatA", OneHotEncodingTransformer.OutputKind.Bag), - new OneHotEncodingEstimator.ColumnInfo("B", "CatB", OneHotEncodingTransformer.OutputKind.Bag), - new OneHotEncodingEstimator.ColumnInfo("C", "CatC", OneHotEncodingTransformer.OutputKind.Bag), - new OneHotEncodingEstimator.ColumnInfo("D", "CatD", OneHotEncodingTransformer.OutputKind.Bag), - new OneHotEncodingEstimator.ColumnInfo("E", "CatE", OneHotEncodingTransformer.OutputKind.Ind), - new OneHotEncodingEstimator.ColumnInfo("F", "CatF", OneHotEncodingTransformer.OutputKind.Ind), - new OneHotEncodingEstimator.ColumnInfo("G", "CatG", OneHotEncodingTransformer.OutputKind.Key), - new OneHotEncodingEstimator.ColumnInfo("H", "CatH", OneHotEncodingTransformer.OutputKind.Key), - new OneHotEncodingEstimator.ColumnInfo("A", "CatI", OneHotEncodingTransformer.OutputKind.Bin), - new OneHotEncodingEstimator.ColumnInfo("B", "CatJ", OneHotEncodingTransformer.OutputKind.Bin), - new OneHotEncodingEstimator.ColumnInfo("C", "CatK", OneHotEncodingTransformer.OutputKind.Bin), - new OneHotEncodingEstimator.ColumnInfo("D", "CatL", OneHotEncodingTransformer.OutputKind.Bin) }); + new OneHotEncodingEstimator.ColumnInfo("A", "CatA", CategoricalTransform.OutputKind.Bag), + new OneHotEncodingEstimator.ColumnInfo("B", "CatB", CategoricalTransform.OutputKind.Bag), + new OneHotEncodingEstimator.ColumnInfo("C", "CatC", CategoricalTransform.OutputKind.Bag), + new OneHotEncodingEstimator.ColumnInfo("D", "CatD", CategoricalTransform.OutputKind.Bag), + new OneHotEncodingEstimator.ColumnInfo("E", "CatE", CategoricalTransform.OutputKind.Ind), + new OneHotEncodingEstimator.ColumnInfo("F", "CatF", CategoricalTransform.OutputKind.Ind), + new OneHotEncodingEstimator.ColumnInfo("G", "CatG", CategoricalTransform.OutputKind.Key), + new OneHotEncodingEstimator.ColumnInfo("H", "CatH", CategoricalTransform.OutputKind.Key), + new OneHotEncodingEstimator.ColumnInfo("A", "CatI", CategoricalTransform.OutputKind.Bin), + new OneHotEncodingEstimator.ColumnInfo("B", "CatJ", CategoricalTransform.OutputKind.Bin), + new OneHotEncodingEstimator.ColumnInfo("C", "CatK", CategoricalTransform.OutputKind.Bin), + new OneHotEncodingEstimator.ColumnInfo("D", "CatL", CategoricalTransform.OutputKind.Bin) }); var result = pipe.Fit(dataView).Transform(dataView); diff --git a/test/Microsoft.ML.Tests/Transformers/CharTokenizeTests.cs b/test/Microsoft.ML.Tests/Transformers/CharTokenizeTests.cs index 58d663b871..f01c8101dc 100644 --- a/test/Microsoft.ML.Tests/Transformers/CharTokenizeTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/CharTokenizeTests.cs @@ -42,7 +42,7 @@ public void CharTokenizeWorkout() var dataView = ComponentCreation.CreateDataView(Env, data); var invalidData = new[] { new TestWrong() { A = 1, B = new float[2] { 2,3} } }; var invalidDataView = ComponentCreation.CreateDataView(Env, invalidData); - var pipe = new TokenizingByCharactersEstimator(Env, columns: new[] { ("A", "TokenizeA"), ("B", "TokenizeB") }); + var pipe = new CharacterTokenizingEstimator(Env, columns: new[] { ("A", "TokenizeA"), ("B", "TokenizeB") }); TestEstimatorCore(pipe, dataView, invalidInput:invalidDataView); Done(); @@ -60,7 +60,7 @@ public void TestOldSavingAndLoading() var data = new[] { new TestClass() { A = "This is a good sentence.", B = new string[2] { "Much words", "Wow So Cool" } } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var pipe = new TokenizingByCharactersEstimator(Env, columns: new[] { ("A", "TokenizeA"), ("B", "TokenizeB") }); + var pipe = new CharacterTokenizingEstimator(Env, columns: new[] { ("A", "TokenizeA"), ("B", "TokenizeB") }); var result = pipe.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); using (var ms = new MemoryStream()) diff --git a/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs b/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs index 24098ac6d0..efb3833be3 100644 --- a/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/ConcatTests.cs @@ -63,7 +63,7 @@ ColumnType GetType(Schema schema, string name) t = GetType(data.Schema, "f4"); Assert.True(t is VectorType vt4 && vt4.ItemType == NumberType.R4 && vt4.Size == 0); - data = ColumnSelectingTransformer.CreateKeep(Env, data, new[] { "f1", "f2", "f3", "f4" }); + data = SelectColumnsTransform.CreateKeep(Env, data, "f1", "f2", "f3", "f4"); var subdir = Path.Combine("Transform", "Concat"); var outputPath = GetOutputPath(subdir, "Concat1.tsv"); @@ -104,9 +104,9 @@ ColumnType GetType(Schema schema, string name) data = TakeFilter.Create(Env, data, 10); - var concater = new ColumnConcatenatingTransformer(Env, - new ColumnConcatenatingTransformer.ColumnInfo("f2", new[] { ("float1", "FLOAT1"), ("float1", "FLOAT2") }), - new ColumnConcatenatingTransformer.ColumnInfo("f3", new[] { ("float4", "FLOAT4"), ("float1", "FLOAT1") })); + var concater = new ConcatTransform(Env, + new ConcatTransform.ColumnInfo("f2", new[] { ("float1", "FLOAT1"), ("float1", "FLOAT2") }), + new ConcatTransform.ColumnInfo("f3", new[] { ("float4", "FLOAT4"), ("float1", "FLOAT1") })); data = concater.Transform(data); ColumnType t; @@ -115,7 +115,7 @@ ColumnType GetType(Schema schema, string name) t = GetType(data.Schema, "f3"); Assert.True(t is VectorType vt3 && vt3.ItemType == NumberType.R4 && vt3.Size == 5); - data = ColumnSelectingTransformer.CreateKeep(Env, data, new[] { "f2", "f3" }); + data = SelectColumnsTransform.CreateKeep(Env, data, "f2", "f3"); var subdir = Path.Combine("Transform", "Concat"); var outputPath = GetOutputPath(subdir, "Concat2.tsv"); diff --git a/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs b/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs index c7b274a4d9..8e72219609 100644 --- a/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/ConvertTests.cs @@ -74,8 +74,8 @@ public void TestConvertWorkout() var data = new[] { new TestClass() { A = 1, B = new int[2] { 1,4 } }, new TestClass() { A = 2, B = new int[2] { 3,4 } }}; var dataView = ComponentCreation.CreateDataView(Env, data); - var pipe = new TypeConvertingEstimator(Env, columns: new[] {new TypeConvertingTransformer.ColumnInfo("A", "ConvA", DataKind.R4), - new TypeConvertingTransformer.ColumnInfo("B", "ConvB", DataKind.R4)}); + var pipe = new ConvertingEstimator(Env, columns: new[] {new ConvertingTransform.ColumnInfo("A", "ConvA", DataKind.R4), + new ConvertingTransform.ColumnInfo("B", "ConvB", DataKind.R4)}); TestEstimatorCore(pipe, dataView); var allTypesData = new[] @@ -113,19 +113,19 @@ public void TestConvertWorkout() }; var allTypesDataView = ComponentCreation.CreateDataView(Env, allTypesData); - var allTypesPipe = new TypeConvertingEstimator(Env, columns: new[] { - new TypeConvertingTransformer.ColumnInfo("AA", "ConvA", DataKind.R4), - new TypeConvertingTransformer.ColumnInfo("AB", "ConvB", DataKind.R4), - new TypeConvertingTransformer.ColumnInfo("AC", "ConvC", DataKind.R4), - new TypeConvertingTransformer.ColumnInfo("AD", "ConvD", DataKind.R4), - new TypeConvertingTransformer.ColumnInfo("AE", "ConvE", DataKind.R4), - new TypeConvertingTransformer.ColumnInfo("AF", "ConvF", DataKind.R4), - new TypeConvertingTransformer.ColumnInfo("AG", "ConvG", DataKind.R4), - new TypeConvertingTransformer.ColumnInfo("AH", "ConvH", DataKind.R4), - new TypeConvertingTransformer.ColumnInfo("AK", "ConvK", DataKind.R4), - new TypeConvertingTransformer.ColumnInfo("AL", "ConvL", DataKind.R4), - new TypeConvertingTransformer.ColumnInfo("AM", "ConvM", DataKind.R4), - new TypeConvertingTransformer.ColumnInfo("AN", "ConvN", DataKind.R4)} + var allTypesPipe = new ConvertingEstimator(Env, columns: new[] { + new ConvertingTransform.ColumnInfo("AA", "ConvA", DataKind.R4), + new ConvertingTransform.ColumnInfo("AB", "ConvB", DataKind.R4), + new ConvertingTransform.ColumnInfo("AC", "ConvC", DataKind.R4), + new ConvertingTransform.ColumnInfo("AD", "ConvD", DataKind.R4), + new ConvertingTransform.ColumnInfo("AE", "ConvE", DataKind.R4), + new ConvertingTransform.ColumnInfo("AF", "ConvF", DataKind.R4), + new ConvertingTransform.ColumnInfo("AG", "ConvG", DataKind.R4), + new ConvertingTransform.ColumnInfo("AH", "ConvH", DataKind.R4), + new ConvertingTransform.ColumnInfo("AK", "ConvK", DataKind.R4), + new ConvertingTransform.ColumnInfo("AL", "ConvL", DataKind.R4), + new ConvertingTransform.ColumnInfo("AM", "ConvM", DataKind.R4), + new ConvertingTransform.ColumnInfo("AN", "ConvN", DataKind.R4)} ); TestEstimatorCore(allTypesPipe, allTypesDataView); @@ -154,8 +154,8 @@ public void TestOldSavingAndLoading() var data = new[] { new TestClass() { A = 1, B = new int[2] { 1,4 } }, new TestClass() { A = 2, B = new int[2] { 3,4 } }}; var dataView = ComponentCreation.CreateDataView(Env, data); - var pipe = new TypeConvertingEstimator(Env, columns: new[] {new TypeConvertingTransformer.ColumnInfo("A", "ConvA", DataKind.R8), - new TypeConvertingTransformer.ColumnInfo("B", "ConvB", DataKind.R8)}); + var pipe = new ConvertingEstimator(Env, columns: new[] {new ConvertingTransform.ColumnInfo("A", "ConvA", DataKind.R8), + new ConvertingTransform.ColumnInfo("B", "ConvB", DataKind.R8)}); var result = pipe.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); @@ -173,11 +173,11 @@ public void TestMetadata() var data = new[] { new MetaClass() { A = 1, B = "A" }, new MetaClass() { A = 2, B = "B" }}; var pipe = new OneHotEncodingEstimator(Env, new[] { - new OneHotEncodingEstimator.ColumnInfo("A", "CatA", OneHotEncodingTransformer.OutputKind.Ind), - new OneHotEncodingEstimator.ColumnInfo("B", "CatB", OneHotEncodingTransformer.OutputKind.Key) - }).Append(new TypeConvertingEstimator(Env, new[] { - new TypeConvertingTransformer.ColumnInfo("CatA", "ConvA", DataKind.R8), - new TypeConvertingTransformer.ColumnInfo("CatB", "ConvB", DataKind.U2) + new OneHotEncodingEstimator.ColumnInfo("A", "CatA", CategoricalTransform.OutputKind.Ind), + new OneHotEncodingEstimator.ColumnInfo("B", "CatB", CategoricalTransform.OutputKind.Key) + }).Append(new ConvertingEstimator(Env, new[] { + new ConvertingTransform.ColumnInfo("CatA", "ConvA", DataKind.R8), + new ConvertingTransform.ColumnInfo("CatB", "ConvB", DataKind.U2) })); var dataView = ComponentCreation.CreateDataView(Env, data); dataView = pipe.Fit(dataView).Transform(dataView); diff --git a/test/Microsoft.ML.Tests/Transformers/CopyColumnEstimatorTests.cs b/test/Microsoft.ML.Tests/Transformers/CopyColumnEstimatorTests.cs index 09714ffd22..50f57673f8 100644 --- a/test/Microsoft.ML.Tests/Transformers/CopyColumnEstimatorTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/CopyColumnEstimatorTests.cs @@ -40,28 +40,32 @@ class TestMetaClass void TestWorking() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; - var env = new MLContext(); - var dataView = ComponentCreation.CreateDataView(env, data); - var est = new ColumnsCopyingEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); - var transformer = est.Fit(dataView); - var result = transformer.Transform(dataView); - ValidateCopyColumnTransformer(result); + using (var env = new ConsoleEnvironment()) + { + var dataView = ComponentCreation.CreateDataView(env, data); + var est = new CopyColumnsEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); + var transformer = est.Fit(dataView); + var result = transformer.Transform(dataView); + ValidateCopyColumnTransformer(result); + } } [Fact] void TestBadOriginalSchema() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; - var env = new MLContext(); - var dataView = ComponentCreation.CreateDataView(env, data); - var est = new ColumnsCopyingEstimator(env, new[] { ("D", "A"), ("B", "E") }); - try - { - var transformer = est.Fit(dataView); - Assert.False(true); - } - catch + using (var env = new ConsoleEnvironment()) { + var dataView = ComponentCreation.CreateDataView(env, data); + var est = new CopyColumnsEstimator(env, new[] { ("D", "A"), ("B", "E") }); + try + { + var transformer = est.Fit(dataView); + Assert.False(true); + } + catch + { + } } } @@ -70,18 +74,20 @@ void TestBadTransformSchema() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var xydata = new[] { new TestClassXY() { X = 10, Y = 100 }, new TestClassXY() { X = -1, Y = -100 } }; - var env = new MLContext(); - var dataView = ComponentCreation.CreateDataView(env, data); - var xyDataView = ComponentCreation.CreateDataView(env, xydata); - var est = new ColumnsCopyingEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); - var transformer = est.Fit(dataView); - try - { - var result = transformer.Transform(xyDataView); - Assert.False(true); - } - catch + using (var env = new ConsoleEnvironment()) { + var dataView = ComponentCreation.CreateDataView(env, data); + var xyDataView = ComponentCreation.CreateDataView(env, xydata); + var est = new CopyColumnsEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); + var transformer = est.Fit(dataView); + try + { + var result = transformer.Transform(xyDataView); + Assert.False(true); + } + catch + { + } } } @@ -89,17 +95,20 @@ void TestBadTransformSchema() void TestSavingAndLoading() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; - var env = new MLContext(); - var dataView = ComponentCreation.CreateDataView(env, data); - var est = new ColumnsCopyingEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); - var transformer = est.Fit(dataView); - using (var ms = new MemoryStream()) + using (var env = new ConsoleEnvironment()) { - transformer.SaveTo(env, ms); - ms.Position = 0; - var loadedTransformer = TransformerChain.LoadFrom(env, ms); - var result = loadedTransformer.Transform(dataView); - ValidateCopyColumnTransformer(result); + var dataView = ComponentCreation.CreateDataView(env, data); + var est = new CopyColumnsEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); + var transformer = est.Fit(dataView); + using (var ms = new MemoryStream()) + { + transformer.SaveTo(env, ms); + ms.Position = 0; + var loadedTransformer = TransformerChain.LoadFrom(env, ms); + var result = loadedTransformer.Transform(dataView); + ValidateCopyColumnTransformer(result); + } + } } @@ -107,18 +116,20 @@ void TestSavingAndLoading() void TestOldSavingAndLoading() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; - IHostEnvironment env = new MLContext(); - var dataView = ComponentCreation.CreateDataView(env, data); - var est = new ColumnsCopyingEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); - var transformer = est.Fit(dataView); - var result = transformer.Transform(dataView); - var resultRoles = new RoleMappedData(result); - using (var ms = new MemoryStream()) + using (var env = new ConsoleEnvironment()) { - TrainUtils.SaveModel(env, env.Start("saving"), ms, null, resultRoles); - ms.Position = 0; - var loadedView = ModelFileUtils.LoadTransforms(env, dataView, ms); - ValidateCopyColumnTransformer(loadedView); + var dataView = ComponentCreation.CreateDataView(env, data); + var est = new CopyColumnsEstimator(env, new[] { ("A", "D"), ("B", "E"), ("A", "F") }); + var transformer = est.Fit(dataView); + var result = transformer.Transform(dataView); + var resultRoles = new RoleMappedData(result); + using (var ms = new MemoryStream()) + { + TrainUtils.SaveModel(env, env.Start("saving"), ms, null, resultRoles); + ms.Position = 0; + var loadedView = ModelFileUtils.LoadTransforms(env, dataView, ms); + ValidateCopyColumnTransformer(loadedView); + } } } @@ -126,33 +137,37 @@ void TestOldSavingAndLoading() void TestMetadataCopy() { var data = new[] { new TestMetaClass() { Term = "A", NotUsed = 1 }, new TestMetaClass() { Term = "B" }, new TestMetaClass() { Term = "C" } }; - var env = new MLContext(); - var dataView = ComponentCreation.CreateDataView(env, data); - var term = ValueToKeyMappingTransformer.Create(env, new ValueToKeyMappingTransformer.Arguments() + using (var env = new ConsoleEnvironment()) { - Column = new[] { new ValueToKeyMappingTransformer.Column() { Source = "Term", Name = "T" } } - }, dataView); - var est = new ColumnsCopyingEstimator(env, "T", "T1"); - var transformer = est.Fit(term); - var result = transformer.Transform(term); - result.Schema.TryGetColumnIndex("T", out int termIndex); - result.Schema.TryGetColumnIndex("T1", out int copyIndex); - var names1 = default(VBuffer>); - var names2 = default(VBuffer>); - var type1 = result.Schema.GetColumnType(termIndex); - var itemType1 = (type1 as VectorType)?.ItemType ?? type1; - int size = (itemType1 as KeyType)?.Count ?? -1; - var type2 = result.Schema.GetColumnType(copyIndex); - result.Schema.GetMetadata(MetadataUtils.Kinds.KeyValues, termIndex, ref names1); - result.Schema.GetMetadata(MetadataUtils.Kinds.KeyValues, copyIndex, ref names2); - Assert.True(CompareVec(in names1, in names2, size, (a, b) => a.Span.SequenceEqual(b.Span))); + var dataView = ComponentCreation.CreateDataView(env, data); + var term = TermTransform.Create(env, new TermTransform.Arguments() + { + Column = new[] { new TermTransform.Column() { Source = "Term", Name = "T" } } + }, dataView); + var est = new CopyColumnsEstimator(env, "T", "T1"); + var transformer = est.Fit(term); + var result = transformer.Transform(term); + result.Schema.TryGetColumnIndex("T", out int termIndex); + result.Schema.TryGetColumnIndex("T1", out int copyIndex); + var names1 = default(VBuffer>); + var names2 = default(VBuffer>); + var type1 = result.Schema.GetColumnType(termIndex); + var itemType1 = (type1 as VectorType)?.ItemType ?? type1; + int size = (itemType1 as KeyType)?.Count ?? -1; + var type2 = result.Schema.GetColumnType(copyIndex); + result.Schema.GetMetadata(MetadataUtils.Kinds.KeyValues, termIndex, ref names1); + result.Schema.GetMetadata(MetadataUtils.Kinds.KeyValues, copyIndex, ref names2); + Assert.True(CompareVec(in names1, in names2, size, (a, b) => a.Span.SequenceEqual(b.Span))); + } } [Fact] void TestCommandLine() { - var env = new MLContext(); - Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0} xf=copy{col=B:A} in=f:\1.txt" }), (int)0); + using (var env = new ConsoleEnvironment()) + { + Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0} xf=copy{col=B:A} in=f:\1.txt" }), (int)0); + } } private void ValidateCopyColumnTransformer(IDataView result) diff --git a/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs b/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs index 1e5e053c96..1a78122eb2 100644 --- a/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/CustomMappingTests.cs @@ -66,21 +66,23 @@ public void TestCustomTransformer() IDataView transformedData; // We create a temporary environment to instantiate the custom transformer. This is to ensure that we don't need the same // environment for saving and loading. - var tempoEnv = new MLContext(); - var customEst = new CustomMappingEstimator(tempoEnv, MyLambda.MyAction, "MyLambda"); - - try + using (var tempoEnv = new ConsoleEnvironment()) { + var customEst = new CustomMappingEstimator(tempoEnv, MyLambda.MyAction, "MyLambda"); + + try + { + TestEstimatorCore(customEst, data); + Assert.True(false, "Cannot work without MEF injection"); + } + catch (Exception) + { + // REVIEW: we should have a common mechanism that will make sure this is 'our' exception thrown. + } + ML.CompositionContainer = new CompositionContainer(new TypeCatalog(typeof(MyLambda))); TestEstimatorCore(customEst, data); - Assert.True(false, "Cannot work without MEF injection"); - } - catch (Exception) - { - // REVIEW: we should have a common mechanism that will make sure this is 'our' exception thrown. + transformedData = customEst.Fit(data).Transform(data); } - ML.CompositionContainer = new CompositionContainer(new TypeCatalog(typeof(MyLambda))); - TestEstimatorCore(customEst, data); - transformedData = customEst.Fit(data).Transform(data); var inputs = transformedData.AsEnumerable(ML, true); var outputs = transformedData.AsEnumerable(ML, true); @@ -89,43 +91,5 @@ public void TestCustomTransformer() Done(); } - - [Fact] - public void TestSchemaPropagation() - { - string dataPath = GetDataPath("adult.test"); - var source = new MultiFileSource(dataPath); - var loader = ML.Data.TextReader(new[] { - new TextLoader.Column("Float1", DataKind.R4, 0), - new TextLoader.Column("Float4", DataKind.R4, new[]{new TextLoader.Range(0), new TextLoader.Range(2), new TextLoader.Range(4), new TextLoader.Range(10) }), - new TextLoader.Column("Text1", DataKind.Text, 0) - }, s => { s.Separator = ","; s.HasHeader = true; }); - - var data = loader.Read(source); - - Action mapping = (input, output) => output.Together = input.Float1.ToString(); - var est = ML.Transforms.CustomMapping(mapping, null); - - // Make sure schema propagation works for valid data. - est.GetOutputSchema(SchemaShape.Create(data.Schema)); - - var badData1 = ML.Transforms.CopyColumns("Text1", "Float1").Fit(data).Transform(data); - try - { - est.GetOutputSchema(SchemaShape.Create(badData1.Schema)); - Assert.True(false); - } - catch (Exception) { } - - var badData2 = ML.Transforms.KeepColumns(new[] { "Float1" }).Fit(data).Transform(data); - try - { - est.GetOutputSchema(SchemaShape.Create(badData2.Schema)); - Assert.True(false); - } - catch (Exception) { } - - Done(); - } } } diff --git a/test/Microsoft.ML.Tests/Transformers/FeatureSelectionTests.cs b/test/Microsoft.ML.Tests/Transformers/FeatureSelectionTests.cs index 406d623a29..ccbb809982 100644 --- a/test/Microsoft.ML.Tests/Transformers/FeatureSelectionTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/FeatureSelectionTests.cs @@ -20,7 +20,7 @@ public FeatureSelectionTests(ITestOutputHelper helper) { } - [Fact(Skip = "FeatureSeclection transform cannot be trained on empty data, schema propagation fails")] + [Fact] public void FeatureSelectionWorkout() { string sentimentDataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); @@ -43,7 +43,7 @@ public void FeatureSelectionWorkout() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); IDataView savedData = TakeFilter.Create(Env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "bag_of_words_count", "bag_of_words_mi" }); + savedData = SelectColumnsTransform.CreateKeep(Env, savedData, "bag_of_words_count", "bag_of_words_mi"); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); diff --git a/test/Microsoft.ML.Tests/Transformers/HashTests.cs b/test/Microsoft.ML.Tests/Transformers/HashTests.cs index 4863c5dd46..a8812b1337 100644 --- a/test/Microsoft.ML.Tests/Transformers/HashTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/HashTests.cs @@ -48,10 +48,10 @@ public void HashWorkout() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new HashingEstimator(Env, new[]{ - new HashingTransformer.ColumnInfo("A", "HashA", hashBits:4, invertHash:-1), - new HashingTransformer.ColumnInfo("B", "HashB", hashBits:3, ordered:true), - new HashingTransformer.ColumnInfo("C", "HashC", seed:42), - new HashingTransformer.ColumnInfo("A", "HashD"), + new HashTransformer.ColumnInfo("A", "HashA", hashBits:4, invertHash:-1), + new HashTransformer.ColumnInfo("B", "HashB", hashBits:3, ordered:true), + new HashTransformer.ColumnInfo("C", "HashC", seed:42), + new HashTransformer.ColumnInfo("A", "HashD"), }); TestEstimatorCore(pipe, dataView); @@ -70,9 +70,9 @@ public void TestMetadata() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new HashingEstimator(Env, new[] { - new HashingTransformer.ColumnInfo("A", "HashA", invertHash:1, hashBits:10), - new HashingTransformer.ColumnInfo("A", "HashAUnlim", invertHash:-1, hashBits:10), - new HashingTransformer.ColumnInfo("A", "HashAUnlimOrdered", invertHash:-1, hashBits:10, ordered:true) + new HashTransformer.ColumnInfo("A", "HashA", invertHash:1, hashBits:10), + new HashTransformer.ColumnInfo("A", "HashAUnlim", invertHash:-1, hashBits:10), + new HashTransformer.ColumnInfo("A", "HashAUnlimOrdered", invertHash:-1, hashBits:10, ordered:true) }); var result = pipe.Fit(dataView).Transform(dataView); ValidateMetadata(result); @@ -118,10 +118,10 @@ public void TestOldSavingAndLoading() var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new HashingEstimator(Env, new[]{ - new HashingTransformer.ColumnInfo("A", "HashA", hashBits:4, invertHash:-1), - new HashingTransformer.ColumnInfo("B", "HashB", hashBits:3, ordered:true), - new HashingTransformer.ColumnInfo("C", "HashC", seed:42), - new HashingTransformer.ColumnInfo("A", "HashD"), + new HashTransformer.ColumnInfo("A", "HashA", hashBits:4, invertHash:-1), + new HashTransformer.ColumnInfo("B", "HashB", hashBits:3, ordered:true), + new HashTransformer.ColumnInfo("C", "HashC", seed:42), + new HashTransformer.ColumnInfo("A", "HashD"), }); var result = pipe.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); @@ -148,8 +148,8 @@ private void HashTestCore(T val, PrimitiveType type, uint expected, uint expe var inRow = RowColumnUtils.GetRow(new Counted(), col); // First do an unordered hash. - var info = new HashingTransformer.ColumnInfo("Foo", "Bar", hashBits: bits); - var xf = new HashingTransformer(Env, new[] { info }); + var info = new HashTransformer.ColumnInfo("Foo", "Bar", hashBits: bits); + var xf = new HashTransformer(Env, new[] { info }); var mapper = xf.GetRowToRowMapper(inRow.Schema); mapper.Schema.TryGetColumnIndex("Bar", out int outCol); var outRow = mapper.GetRow(inRow, c => c == outCol, out var _); @@ -160,8 +160,8 @@ private void HashTestCore(T val, PrimitiveType type, uint expected, uint expe Assert.Equal(expected, result); // Next do an ordered hash. - info = new HashingTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: true); - xf = new HashingTransformer(Env, new[] { info }); + info = new HashTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: true); + xf = new HashTransformer(Env, new[] { info }); mapper = xf.GetRowToRowMapper(inRow.Schema); mapper.Schema.TryGetColumnIndex("Bar", out outCol); outRow = mapper.GetRow(inRow, c => c == outCol, out var _); @@ -177,8 +177,8 @@ private void HashTestCore(T val, PrimitiveType type, uint expected, uint expe col = RowColumnUtils.GetColumn("Foo", new VectorType(type, vecLen), ref denseVec); inRow = RowColumnUtils.GetRow(new Counted(), col); - info = new HashingTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: false); - xf = new HashingTransformer(Env, new[] { info }); + info = new HashTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: false); + xf = new HashTransformer(Env, new[] { info }); mapper = xf.GetRowToRowMapper(inRow.Schema); mapper.Schema.TryGetColumnIndex("Bar", out outCol); outRow = mapper.GetRow(inRow, c => c == outCol, out var _); @@ -192,8 +192,8 @@ private void HashTestCore(T val, PrimitiveType type, uint expected, uint expe Assert.All(vecResult.DenseValues(), v => Assert.Equal(expected, v)); // Now do ordered with the dense vector. - info = new HashingTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: true); - xf = new HashingTransformer(Env, new[] { info }); + info = new HashTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: true); + xf = new HashTransformer(Env, new[] { info }); mapper = xf.GetRowToRowMapper(inRow.Schema); mapper.Schema.TryGetColumnIndex("Bar", out outCol); outRow = mapper.GetRow(inRow, c => c == outCol, out var _); @@ -210,8 +210,8 @@ private void HashTestCore(T val, PrimitiveType type, uint expected, uint expe col = RowColumnUtils.GetColumn("Foo", new VectorType(type, vecLen), ref sparseVec); inRow = RowColumnUtils.GetRow(new Counted(), col); - info = new HashingTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: false); - xf = new HashingTransformer(Env, new[] { info }); + info = new HashTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: false); + xf = new HashTransformer(Env, new[] { info }); mapper = xf.GetRowToRowMapper(inRow.Schema); mapper.Schema.TryGetColumnIndex("Bar", out outCol); outRow = mapper.GetRow(inRow, c => c == outCol, out var _); @@ -223,8 +223,8 @@ private void HashTestCore(T val, PrimitiveType type, uint expected, uint expe Assert.Equal(expected, vecResult.GetItemOrDefault(3)); Assert.Equal(expected, vecResult.GetItemOrDefault(7)); - info = new HashingTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: true); - xf = new HashingTransformer(Env, new[] { info }); + info = new HashTransformer.ColumnInfo("Foo", "Bar", hashBits: bits, ordered: true); + xf = new HashTransformer(Env, new[] { info }); mapper = xf.GetRowToRowMapper(inRow.Schema); mapper.Schema.TryGetColumnIndex("Bar", out outCol); outRow = mapper.GetRow(inRow, c => c == outCol, out var _); diff --git a/test/Microsoft.ML.Tests/Transformers/KeyToBinaryVectorEstimatorTest.cs b/test/Microsoft.ML.Tests/Transformers/KeyToBinaryVectorEstimatorTest.cs index 34605089fe..285289a1f1 100644 --- a/test/Microsoft.ML.Tests/Transformers/KeyToBinaryVectorEstimatorTest.cs +++ b/test/Microsoft.ML.Tests/Transformers/KeyToBinaryVectorEstimatorTest.cs @@ -48,13 +48,13 @@ public void KeyToBinaryVectorWorkout() var dataView = ComponentCreation.CreateDataView(Env, data); dataView = new ValueToKeyMappingEstimator(Env, new[]{ - new ValueToKeyMappingTransformer.ColumnInfo("A", "TermA"), - new ValueToKeyMappingTransformer.ColumnInfo("B", "TermB"), - new ValueToKeyMappingTransformer.ColumnInfo("C", "TermC", textKeyValues:true) + new TermTransform.ColumnInfo("A", "TermA"), + new TermTransform.ColumnInfo("B", "TermB"), + new TermTransform.ColumnInfo("C", "TermC", textKeyValues:true) }).Fit(dataView).Transform(dataView); - var pipe = new KeyToBinaryVectorMappingEstimator(Env, new KeyToBinaryVectorMappingTransformer.ColumnInfo("TermA", "CatA"), - new KeyToBinaryVectorMappingTransformer.ColumnInfo("TermC", "CatC")); + var pipe = new KeyToBinaryVectorMappingEstimator(Env, new KeyToBinaryVectorTransform.ColumnInfo("TermA", "CatA"), + new KeyToBinaryVectorTransform.ColumnInfo("TermC", "CatC")); TestEstimatorCore(pipe, dataView); Done(); } @@ -72,8 +72,8 @@ public void KeyToBinaryVectorStatic() // Non-pigsty Term. var dynamicData = new ValueToKeyMappingEstimator(Env, new[] { - new ValueToKeyMappingTransformer.ColumnInfo("ScalarString", "A"), - new ValueToKeyMappingTransformer.ColumnInfo("VectorString", "B") }) + new TermTransform.ColumnInfo("ScalarString", "A"), + new TermTransform.ColumnInfo("VectorString", "B") }) .Fit(data.AsDynamic).Transform(data.AsDynamic); var data2 = dynamicData.AssertStatic(Env, ctx => ( @@ -101,18 +101,18 @@ public void TestMetadataPropagation() var dataView = ComponentCreation.CreateDataView(Env, data); var termEst = new ValueToKeyMappingEstimator(Env, new[] { - new ValueToKeyMappingTransformer.ColumnInfo("A", "TA", textKeyValues: true), - new ValueToKeyMappingTransformer.ColumnInfo("B", "TB", textKeyValues: true), - new ValueToKeyMappingTransformer.ColumnInfo("C", "TC"), - new ValueToKeyMappingTransformer.ColumnInfo("D", "TD") }); + new TermTransform.ColumnInfo("A", "TA", textKeyValues: true), + new TermTransform.ColumnInfo("B", "TB", textKeyValues: true), + new TermTransform.ColumnInfo("C", "TC"), + new TermTransform.ColumnInfo("D", "TD") }); var termTransformer = termEst.Fit(dataView); dataView = termTransformer.Transform(dataView); var pipe = new KeyToBinaryVectorMappingEstimator(Env, - new KeyToBinaryVectorMappingTransformer.ColumnInfo("TA", "CatA"), - new KeyToBinaryVectorMappingTransformer.ColumnInfo("TB", "CatB"), - new KeyToBinaryVectorMappingTransformer.ColumnInfo("TC", "CatC"), - new KeyToBinaryVectorMappingTransformer.ColumnInfo("TD", "CatD")); + new KeyToBinaryVectorTransform.ColumnInfo("TA", "CatA"), + new KeyToBinaryVectorTransform.ColumnInfo("TB", "CatB"), + new KeyToBinaryVectorTransform.ColumnInfo("TC", "CatC"), + new KeyToBinaryVectorTransform.ColumnInfo("TD", "CatD")); var result = pipe.Fit(dataView).Transform(dataView); ValidateMetadata(result); @@ -162,16 +162,16 @@ public void TestOldSavingAndLoading() var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); var est = new ValueToKeyMappingEstimator(Env, new[]{ - new ValueToKeyMappingTransformer.ColumnInfo("A", "TermA"), - new ValueToKeyMappingTransformer.ColumnInfo("B", "TermB", textKeyValues:true), - new ValueToKeyMappingTransformer.ColumnInfo("C", "TermC") + new TermTransform.ColumnInfo("A", "TermA"), + new TermTransform.ColumnInfo("B", "TermB", textKeyValues:true), + new TermTransform.ColumnInfo("C", "TermC") }); var transformer = est.Fit(dataView); dataView = transformer.Transform(dataView); var pipe = new KeyToBinaryVectorMappingEstimator(Env, - new KeyToBinaryVectorMappingTransformer.ColumnInfo("TermA", "CatA"), - new KeyToBinaryVectorMappingTransformer.ColumnInfo("TermB", "CatB"), - new KeyToBinaryVectorMappingTransformer.ColumnInfo("TermC", "CatC") + new KeyToBinaryVectorTransform.ColumnInfo("TermA", "CatA"), + new KeyToBinaryVectorTransform.ColumnInfo("TermB", "CatB"), + new KeyToBinaryVectorTransform.ColumnInfo("TermC", "CatC") ); var result = pipe.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); diff --git a/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs b/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs index 611857ef4b..1f4fff6edc 100644 --- a/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/KeyToValueTests.cs @@ -45,13 +45,13 @@ public void KeyToValueWorkout() var data = reader.Read(dataPath); data = new ValueToKeyMappingEstimator(Env, new[] { - new ValueToKeyMappingTransformer.ColumnInfo("ScalarString", "A"), - new ValueToKeyMappingTransformer.ColumnInfo("VectorString", "B") }).Fit(data).Transform(data); + new TermTransform.ColumnInfo("ScalarString", "A"), + new TermTransform.ColumnInfo("VectorString", "B") }).Fit(data).Transform(data); - var badData1 = new ColumnsCopyingTransformer(Env, ("BareKey", "A")).Transform(data); - var badData2 = new ColumnsCopyingTransformer(Env, ("VectorString", "B")).Transform(data); + var badData1 = new CopyColumnsTransform(Env, ("BareKey", "A")).Transform(data); + var badData2 = new CopyColumnsTransform(Env, ("VectorString", "B")).Transform(data); - var est = new KeyToValueMappingEstimator(Env, ("A", "A_back"), ("B", "B_back")); + var est = new KeyToValueEstimator(Env, ("A", "A_back"), ("B", "B_back")); TestEstimatorCore(est, data, invalidInput: badData1); TestEstimatorCore(est, data, invalidInput: badData2); @@ -82,8 +82,8 @@ public void KeyToValuePigsty() // Non-pigsty Term. var dynamicData = new ValueToKeyMappingEstimator(Env, new[] { - new ValueToKeyMappingTransformer.ColumnInfo("ScalarString", "A"), - new ValueToKeyMappingTransformer.ColumnInfo("VectorString", "B") }) + new TermTransform.ColumnInfo("ScalarString", "A"), + new TermTransform.ColumnInfo("VectorString", "B") }) .Fit(data.AsDynamic).Transform(data.AsDynamic); var data2 = dynamicData.AssertStatic(Env, ctx => ( @@ -98,8 +98,8 @@ public void KeyToValuePigsty() TestEstimatorCore(est.AsDynamic, data2.AsDynamic, invalidInput: data.AsDynamic); // Check that term and ToValue are round-trippable. - var dataLeft = ColumnSelectingTransformer.CreateKeep(Env, data.AsDynamic, new[] { "ScalarString", "VectorString" }); - var dataRight = ColumnSelectingTransformer.CreateKeep(Env, est.Fit(data2).Transform(data2).AsDynamic, new[] { "ScalarString", "VectorString" }); + var dataLeft = SelectColumnsTransform.CreateKeep(Env, data.AsDynamic, "ScalarString", "VectorString"); + var dataRight = SelectColumnsTransform.CreateKeep(Env, est.Fit(data2).Transform(data2).AsDynamic, "ScalarString", "VectorString"); CheckSameSchemas(dataLeft.Schema, dataRight.Schema); CheckSameValues(dataLeft, dataRight); diff --git a/test/Microsoft.ML.Tests/Transformers/KeyToVectorEstimatorTests.cs b/test/Microsoft.ML.Tests/Transformers/KeyToVectorEstimatorTests.cs index 4468a1f3ea..31ad714099 100644 --- a/test/Microsoft.ML.Tests/Transformers/KeyToVectorEstimatorTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/KeyToVectorEstimatorTests.cs @@ -54,15 +54,15 @@ public void KeyToVectorWorkout() var dataView = ComponentCreation.CreateDataView(Env, data); dataView = new ValueToKeyMappingEstimator(Env, new[]{ - new ValueToKeyMappingTransformer.ColumnInfo("A", "TermA"), - new ValueToKeyMappingTransformer.ColumnInfo("B", "TermB"), - new ValueToKeyMappingTransformer.ColumnInfo("C", "TermC", textKeyValues:true) + new TermTransform.ColumnInfo("A", "TermA"), + new TermTransform.ColumnInfo("B", "TermB"), + new TermTransform.ColumnInfo("C", "TermC", textKeyValues:true) }).Fit(dataView).Transform(dataView); - var pipe = new KeyToVectorMappingEstimator(Env, new KeyToVectorMappingTransformer.ColumnInfo("TermA", "CatA", false), - new KeyToVectorMappingTransformer.ColumnInfo("TermB", "CatB", true), - new KeyToVectorMappingTransformer.ColumnInfo("TermC", "CatC", true), - new KeyToVectorMappingTransformer.ColumnInfo("TermC", "CatCNonBag", false)); + var pipe = new KeyToVectorMappingEstimator(Env, new KeyToVectorTransform.ColumnInfo("TermA", "CatA", false), + new KeyToVectorTransform.ColumnInfo("TermB", "CatB", true), + new KeyToVectorTransform.ColumnInfo("TermC", "CatC", true), + new KeyToVectorTransform.ColumnInfo("TermC", "CatCNonBag", false)); TestEstimatorCore(pipe, dataView); Done(); } @@ -80,8 +80,8 @@ public void KeyToVectorStatic() // Non-pigsty Term. var dynamicData = new ValueToKeyMappingEstimator(Env, new[] { - new ValueToKeyMappingTransformer.ColumnInfo("ScalarString", "A"), - new ValueToKeyMappingTransformer.ColumnInfo("VectorString", "B") }) + new TermTransform.ColumnInfo("ScalarString", "A"), + new TermTransform.ColumnInfo("VectorString", "B") }) .Fit(data.AsDynamic).Transform(data.AsDynamic); var data2 = dynamicData.AssertStatic(Env, ctx => ( @@ -111,26 +111,26 @@ public void TestMetadataPropagation() var dataView = ComponentCreation.CreateDataView(Env, data); var termEst = new ValueToKeyMappingEstimator(Env, new[] { - new ValueToKeyMappingTransformer.ColumnInfo("A", "TA", textKeyValues: true), - new ValueToKeyMappingTransformer.ColumnInfo("B", "TB"), - new ValueToKeyMappingTransformer.ColumnInfo("C", "TC", textKeyValues: true), - new ValueToKeyMappingTransformer.ColumnInfo("D", "TD", textKeyValues: true), - new ValueToKeyMappingTransformer.ColumnInfo("E", "TE"), - new ValueToKeyMappingTransformer.ColumnInfo("F", "TF"), - new ValueToKeyMappingTransformer.ColumnInfo("G", "TG"), - new ValueToKeyMappingTransformer.ColumnInfo("H", "TH", textKeyValues: true) }); + new TermTransform.ColumnInfo("A", "TA", textKeyValues: true), + new TermTransform.ColumnInfo("B", "TB"), + new TermTransform.ColumnInfo("C", "TC", textKeyValues: true), + new TermTransform.ColumnInfo("D", "TD", textKeyValues: true), + new TermTransform.ColumnInfo("E", "TE"), + new TermTransform.ColumnInfo("F", "TF"), + new TermTransform.ColumnInfo("G", "TG"), + new TermTransform.ColumnInfo("H", "TH", textKeyValues: true) }); var termTransformer = termEst.Fit(dataView); dataView = termTransformer.Transform(dataView); var pipe = new KeyToVectorMappingEstimator(Env, - new KeyToVectorMappingTransformer.ColumnInfo("TA", "CatA", true), - new KeyToVectorMappingTransformer.ColumnInfo("TB", "CatB", false), - new KeyToVectorMappingTransformer.ColumnInfo("TC", "CatC", false), - new KeyToVectorMappingTransformer.ColumnInfo("TD", "CatD", true), - new KeyToVectorMappingTransformer.ColumnInfo("TE", "CatE", false), - new KeyToVectorMappingTransformer.ColumnInfo("TF", "CatF", true), - new KeyToVectorMappingTransformer.ColumnInfo("TG", "CatG", true), - new KeyToVectorMappingTransformer.ColumnInfo("TH", "CatH", false) + new KeyToVectorTransform.ColumnInfo("TA", "CatA", true), + new KeyToVectorTransform.ColumnInfo("TB", "CatB", false), + new KeyToVectorTransform.ColumnInfo("TC", "CatC", false), + new KeyToVectorTransform.ColumnInfo("TD", "CatD", true), + new KeyToVectorTransform.ColumnInfo("TE", "CatE", false), + new KeyToVectorTransform.ColumnInfo("TF", "CatF", true), + new KeyToVectorTransform.ColumnInfo("TG", "CatG", true), + new KeyToVectorTransform.ColumnInfo("TH", "CatH", false) ); var result = pipe.Fit(dataView).Transform(dataView); @@ -227,15 +227,15 @@ public void TestOldSavingAndLoading() var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); var est = new ValueToKeyMappingEstimator(Env, new[]{ - new ValueToKeyMappingTransformer.ColumnInfo("A", "TermA"), - new ValueToKeyMappingTransformer.ColumnInfo("B", "TermB"), - new ValueToKeyMappingTransformer.ColumnInfo("C", "TermC") + new TermTransform.ColumnInfo("A", "TermA"), + new TermTransform.ColumnInfo("B", "TermB"), + new TermTransform.ColumnInfo("C", "TermC") }); var transformer = est.Fit(dataView); dataView = transformer.Transform(dataView); var pipe = new KeyToVectorMappingEstimator(Env, - new KeyToVectorMappingTransformer.ColumnInfo("TermA", "CatA", false), - new KeyToVectorMappingTransformer.ColumnInfo("TermB", "CatB", true) + new KeyToVectorTransform.ColumnInfo("TermA", "CatA", false), + new KeyToVectorTransform.ColumnInfo("TermB", "CatB", true) ); var result = pipe.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); diff --git a/test/Microsoft.ML.Tests/Transformers/LineParserTests.cs b/test/Microsoft.ML.Tests/Transformers/LineParserTests.cs deleted file mode 100644 index 1beeaea68e..0000000000 --- a/test/Microsoft.ML.Tests/Transformers/LineParserTests.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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.Internal.Utilities; -using System.Collections.Generic; -using Xunit; - -namespace Microsoft.ML.Tests.Transformers -{ - public class LineParserTests - { - public static IEnumerable ValidInputs() - { - yield return new object[] { "key 0.1 0.2 0.3", "key", new float[] { 0.1f, 0.2f, 0.3f } }; - yield return new object[] { "key 0.1 0.2 0.3 ", "key", new float[] { 0.1f, 0.2f, 0.3f } }; - yield return new object[] { "key\t0.1\t0.2\t0.3", "key", new float[] { 0.1f, 0.2f, 0.3f } }; // tab can also be a separator - yield return new object[] { "key\t0.1\t0.2\t0.3\t", "key", new float[] { 0.1f, 0.2f, 0.3f } }; - } - - [Theory] - [MemberData(nameof(ValidInputs))] - public void WhenProvidedAValidInputParserParsesKeyAndValues(string input, string expectedKey, float[] expectedValues) - { - var result = LineParser.ParseKeyThenNumbers(input); - - Assert.True(result.isSuccess); - Assert.Equal(expectedKey, result.key); - Assert.Equal(expectedValues, result.values); - } - - [Theory] - [InlineData("")] - [InlineData("key 0.1 NOT_A_NUMBER")] // invalid number - public void WhenProvidedAnInvalidInputParserReturnsFailure(string input) - { - Assert.False(LineParser.ParseKeyThenNumbers(input).isSuccess); - } - } -} diff --git a/test/Microsoft.ML.Tests/Transformers/NAReplaceTests.cs b/test/Microsoft.ML.Tests/Transformers/NAReplaceTests.cs index 977ceec40d..200ee73e06 100644 --- a/test/Microsoft.ML.Tests/Transformers/NAReplaceTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/NAReplaceTests.cs @@ -44,10 +44,10 @@ public void NAReplaceWorkout() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new MissingValueReplacingEstimator(Env, - new MissingValueReplacingTransformer.ColumnInfo("A", "NAA", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), - new MissingValueReplacingTransformer.ColumnInfo("B", "NAB", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), - new MissingValueReplacingTransformer.ColumnInfo("C", "NAC", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), - new MissingValueReplacingTransformer.ColumnInfo("D", "NAD", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean)); + new NAReplaceTransform.ColumnInfo("A", "NAA", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), + new NAReplaceTransform.ColumnInfo("B", "NAB", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), + new NAReplaceTransform.ColumnInfo("C", "NAC", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), + new NAReplaceTransform.ColumnInfo("D", "NAD", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean)); TestEstimatorCore(pipe, dataView); Done(); } @@ -69,10 +69,10 @@ public void NAReplaceStatic() var est = data.MakeNewEstimator(). Append(row => ( - A: row.ScalarFloat.ReplaceNaNValues(MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Maximum), - B: row.ScalarDouble.ReplaceNaNValues(MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), - C: row.VectorFloat.ReplaceNaNValues(MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), - D: row.VectorDoulbe.ReplaceNaNValues(MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Minimum) + A: row.ScalarFloat.ReplaceNaNValues(NAReplaceTransform.ColumnInfo.ReplacementMode.Maximum), + B: row.ScalarDouble.ReplaceNaNValues(NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), + C: row.VectorFloat.ReplaceNaNValues(NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), + D: row.VectorDoulbe.ReplaceNaNValues(NAReplaceTransform.ColumnInfo.ReplacementMode.Minimum) )); TestEstimatorCore(est.AsDynamic, data.AsDynamic, invalidInput: invalidData); @@ -81,7 +81,7 @@ public void NAReplaceStatic() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); var savedData = TakeFilter.Create(Env, est.Fit(data).Transform(data).AsDynamic, 4); - var view = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "A", "B", "C", "D" }); + var view = SelectColumnsTransform.CreateKeep(Env, savedData, "A", "B", "C", "D"); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, view, fs, keepHidden: true); } @@ -109,10 +109,10 @@ public void TestOldSavingAndLoading() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new MissingValueReplacingEstimator(Env, - new MissingValueReplacingTransformer.ColumnInfo("A", "NAA", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), - new MissingValueReplacingTransformer.ColumnInfo("B", "NAB", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), - new MissingValueReplacingTransformer.ColumnInfo("C", "NAC", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean), - new MissingValueReplacingTransformer.ColumnInfo("D", "NAD", MissingValueReplacingTransformer.ColumnInfo.ReplacementMode.Mean)); + new NAReplaceTransform.ColumnInfo("A", "NAA", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), + new NAReplaceTransform.ColumnInfo("B", "NAB", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), + new NAReplaceTransform.ColumnInfo("C", "NAC", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean), + new NAReplaceTransform.ColumnInfo("D", "NAD", NAReplaceTransform.ColumnInfo.ReplacementMode.Mean)); var result = pipe.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); diff --git a/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs b/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs index b546ee5d28..56fbb2d976 100644 --- a/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/NormalizerTests.cs @@ -2,16 +2,13 @@ // 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; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Data.IO; -using Microsoft.ML.Runtime.Model; using Microsoft.ML.Runtime.RunTests; -using Microsoft.ML.Runtime.Tools; using Microsoft.ML.Transforms; using Microsoft.ML.Transforms.Normalizers; -using Microsoft.ML.Transforms.Projections; using System; -using System.Collections.Immutable; using System.IO; using Xunit; using Xunit.Abstractions; @@ -27,7 +24,7 @@ public NormalizerTests(ITestOutputHelper output) : base(output) [Fact] public void NormalizerWorkout() { - string dataPath = GetDataPath(TestDatasets.iris.trainFilename); + string dataPath = GetDataPath("iris.txt"); var loader = new TextLoader(Env, new TextLoader.Arguments { @@ -62,8 +59,8 @@ public void NormalizerWorkout() var data = loader.Read(dataPath); - var badData1 = new ColumnsCopyingTransformer(Env, ("int1", "float1")).Transform(data); - var badData2 = new ColumnsCopyingTransformer(Env, ("float0", "float4")).Transform(data); + var badData1 = new CopyColumnsTransform(Env, ("int1", "float1")).Transform(data); + var badData2 = new CopyColumnsTransform(Env, ("float0", "float4")).Transform(data); TestEstimatorCore(est, data, null, badData1); TestEstimatorCore(est, data, null, badData2); @@ -74,7 +71,7 @@ public void NormalizerWorkout() var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); using (var fs = File.Create(outputPath)) { - var dataView = ColumnSelectingTransformer.CreateDrop(Env, est.Fit(data).Transform(data), "float0"); + var dataView = SelectColumnsTransform.CreateDrop(Env, est.Fit(data).Transform(data), true, "float0"); DataSaverUtils.SaveDataView(ch, saver, dataView, fs, keepHidden: true); } } @@ -84,127 +81,10 @@ public void NormalizerWorkout() Done(); } - [Fact] - public void NormalizerParameters() - { - string dataPath = GetDataPath("iris.txt"); - - var loader = new TextLoader(Env, new TextLoader.Arguments - { - Column = new[] { - new TextLoader.Column("float1", DataKind.R4, 1), - new TextLoader.Column("float4", DataKind.R4, new[]{new TextLoader.Range(1, 4) }), - new TextLoader.Column("double1", DataKind.R8, 1), - new TextLoader.Column("double4", DataKind.R8, new[]{new TextLoader.Range(1, 4) }), - new TextLoader.Column("int1", DataKind.I4, 0), - new TextLoader.Column("float0", DataKind.R4, new[]{ new TextLoader.Range { Min = 1, VariableEnd = true } }) - }, - HasHeader = true - }, new MultiFileSource(dataPath)); - - var est = new NormalizingEstimator(Env, - new NormalizingEstimator.MinMaxColumn("float1"), - new NormalizingEstimator.MinMaxColumn("float4"), - new NormalizingEstimator.MinMaxColumn("double1"), - new NormalizingEstimator.MinMaxColumn("double4"), - new NormalizingEstimator.BinningColumn("float1", "float1bin"), - new NormalizingEstimator.BinningColumn("float4", "float4bin"), - new NormalizingEstimator.BinningColumn("double1", "double1bin"), - new NormalizingEstimator.BinningColumn("double4", "double4bin"), - new NormalizingEstimator.MeanVarColumn("float1", "float1mv"), - new NormalizingEstimator.MeanVarColumn("float4", "float4mv"), - new NormalizingEstimator.MeanVarColumn("double1", "double1mv"), - new NormalizingEstimator.MeanVarColumn("double4", "double4mv"), - new NormalizingEstimator.LogMeanVarColumn("float1", "float1lmv"), - new NormalizingEstimator.LogMeanVarColumn("float4", "float4lmv"), - new NormalizingEstimator.LogMeanVarColumn("double1", "double1lmv"), - new NormalizingEstimator.LogMeanVarColumn("double4", "double4lmv")); - - var data = loader.Read(dataPath); - - var transformer = est.Fit(data); - - var floatAffineData = transformer.Columns[0].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters; - Assert.Equal(0.12658228f, floatAffineData.Scale); - Assert.Equal(0, floatAffineData.Offset); - - var floatAffineDataVec = transformer.Columns[1].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters>; - Assert.Equal(4, floatAffineDataVec.Scale.Length); - Assert.Empty(floatAffineDataVec.Offset); - - var doubleAffineData = transformer.Columns[2].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters; - Assert.Equal(0.12658227848101264, doubleAffineData.Scale); - Assert.Equal(0, doubleAffineData.Offset); - - var doubleAffineDataVec = transformer.Columns[3].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters>; - Assert.Equal(4, doubleAffineDataVec.Scale.Length); - Assert.Empty(doubleAffineDataVec.Offset); - - var floatBinData = transformer.Columns[4].ModelParameters as NormalizingTransformer.BinNormalizerModelParameters; - Assert.True(35 == floatBinData.UpperBounds.Length); - Assert.True(34 == floatBinData.Density); - Assert.True(0 == floatBinData.Offset); - - var floatBinDataVec = transformer.Columns[5].ModelParameters as NormalizingTransformer.BinNormalizerModelParameters>; - Assert.True(4 == floatBinDataVec.UpperBounds.Length); - Assert.True(35 == floatBinDataVec.UpperBounds[0].Length); - Assert.True(4 == floatBinDataVec.Density.Length); - Assert.True(0 == floatBinDataVec.Offset.Length); - - var doubleBinData = transformer.Columns[6].ModelParameters as NormalizingTransformer.BinNormalizerModelParameters; - Assert.Equal(35, doubleBinData.UpperBounds.Length); - Assert.Equal(34, doubleBinData.Density); - Assert.Equal(0, doubleBinData.Offset); - - var doubleBinDataVec = transformer.Columns[7].ModelParameters as NormalizingTransformer.BinNormalizerModelParameters>; - Assert.Equal(35, doubleBinDataVec.UpperBounds[0].Length); - Assert.Equal(4, doubleBinDataVec.Density.Length); - Assert.Empty(doubleBinDataVec.Offset); - - var floatCdfMeanData = transformer.Columns[8].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters; - Assert.Equal(0.169309646f, floatCdfMeanData.Scale); - Assert.Equal(0, floatCdfMeanData.Offset); - - var floatCdfMeanDataVec = transformer.Columns[9].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters>; - Assert.Equal(0.16930964589119f, floatCdfMeanDataVec.Scale[0]); - Assert.Equal(4, floatCdfMeanDataVec.Scale.Length); - Assert.Empty(floatCdfMeanDataVec.Offset); - - var doubleCdfMeanData = transformer.Columns[10].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters; - Assert.Equal(0.16930963784387665, doubleCdfMeanData.Scale); - Assert.Equal(0, doubleCdfMeanData.Offset); - - var doubleCdfMeanDataVec = transformer.Columns[11].ModelParameters as NormalizingTransformer.AffineNormalizerModelParameters>; - Assert.Equal(4, doubleCdfMeanDataVec.Scale.Length); - Assert.Empty(doubleCdfMeanDataVec.Offset); - - var floatCdfLogMeanData = transformer.Columns[12].ModelParameters as NormalizingTransformer.CdfNormalizerModelParameters; - Assert.Equal(1.75623953f, floatCdfLogMeanData.Mean); - Assert.True(true == floatCdfLogMeanData.UseLog); - Assert.Equal(0.140807763f, floatCdfLogMeanData.Stddev); - - var floatCdfLogMeanDataVec = transformer.Columns[13].ModelParameters as NormalizingTransformer.CdfNormalizerModelParameters>; - Assert.Equal(4, floatCdfLogMeanDataVec.Mean.Length); - Assert.True(true == floatCdfLogMeanDataVec.UseLog); - Assert.Equal(4, floatCdfLogMeanDataVec.Stddev.Length); - - var doubleCdfLogMeanData = transformer.Columns[14].ModelParameters as NormalizingTransformer.CdfNormalizerModelParameters; - Assert.Equal(1.7562395401953814, doubleCdfLogMeanData.Mean); - Assert.True(doubleCdfLogMeanData.UseLog); - Assert.Equal(0.14080776721611848, doubleCdfLogMeanData.Stddev); - - var doubleCdfLogMeanDataVec = transformer.Columns[15].ModelParameters as NormalizingTransformer.CdfNormalizerModelParameters>; - Assert.Equal(4, doubleCdfLogMeanDataVec.Mean.Length); - Assert.True(doubleCdfLogMeanDataVec.UseLog); - Assert.Equal(4, doubleCdfLogMeanDataVec.Stddev.Length); - - Done(); - } - [Fact] public void SimpleConstructorsAndExtensions() { - string dataPath = GetDataPath(TestDatasets.iris.trainFilename); + string dataPath = GetDataPath("iris.txt"); var loader = new TextLoader(Env, new TextLoader.Arguments { @@ -242,213 +122,36 @@ public void SimpleConstructorsAndExtensions() [Fact] public void LpGcNormAndWhiteningWorkout() { - string dataSource = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); - var data = TextLoader.CreateReader(ML, - c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), - separator: ';', hasHeader: true) - .Read(dataSource); - - var invalidData = TextLoader.CreateReader(ML, - c => (label: c.LoadFloat(11), features: c.LoadText(0, 10)), - separator: ';', hasHeader: true) - .Read(dataSource); - - var est = new LpNormalizingEstimator(ML, "features", "lpnorm") - .Append(new GlobalContrastNormalizingEstimator(ML, "features", "gcnorm")) - .Append(new VectorWhiteningEstimator(ML, "features", "whitened")); - TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); - - var outputPath = GetOutputPath("NormalizerEstimator", "lpnorm_gcnorm_whitened.tsv"); - using (var ch = Env.Start("save")) - { - var saver = new TextSaver(ML, new TextSaver.Arguments { Silent = true, OutputHeader = false }); - IDataView savedData = TakeFilter.Create(ML, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = ColumnSelectingTransformer.CreateKeep(ML, savedData, new[] { "lpnorm", "gcnorm", "whitened" }); - - using (var fs = File.Create(outputPath)) - DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); - } - - CheckEquality("NormalizerEstimator", "lpnorm_gcnorm_whitened.tsv", digitsOfPrecision: 4); - Done(); - } - - [Fact] - public void WhiteningWorkout() - { - string dataSource = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); - var data = TextLoader.CreateReader(ML, + var env = new ConsoleEnvironment(seed: 0); + string dataSource = GetDataPath("generated_regression_dataset.csv"); + var data = TextLoader.CreateReader(env, c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), separator: ';', hasHeader: true) .Read(dataSource); - var invalidData = TextLoader.CreateReader(ML, + var invalidData = TextLoader.CreateReader(env, c => (label: c.LoadFloat(11), features: c.LoadText(0, 10)), separator: ';', hasHeader: true) .Read(dataSource); - var est = new VectorWhiteningEstimator(ML, "features", "whitened1") - .Append(new VectorWhiteningEstimator(ML, "features", "whitened2", kind: WhiteningKind.Pca, pcaNum: 5)); + var est = new LpNormalizer(env, "features", "lpnorm") + .Append(new GlobalContrastNormalizer(env, "features", "gcnorm")) + .Append(new Whitening(env, "features", "whitened")); TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); - var outputPath = GetOutputPath("NormalizerEstimator", "whitened.tsv"); + var outputPath = GetOutputPath("Text", "lpnorm_gcnorm_whitened.tsv"); using (var ch = Env.Start("save")) { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true, OutputHeader = false }); IDataView savedData = TakeFilter.Create(Env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "whitened1", "whitened2" }); + savedData = SelectColumnsTransform.CreateKeep(Env, savedData, "lpnorm", "gcnorm", "whitened"); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); } - CheckEquality("NormalizerEstimator", "whitened.tsv", digitsOfPrecision: 4); + CheckEquality("Text", "lpnorm_gcnorm_whitened.tsv", digitsOfPrecision: 4); Done(); } - - [Fact] - public void TestWhiteningCommandLine() - { - Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0-10} xf=whitening{col=B:A} in=f:\2.txt" }), (int)0); - } - - [Fact] - public void TestWhiteningOldSavingAndLoading() - { - string dataSource = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); - var dataView = TextLoader.CreateReader(ML, - c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), - separator: ';', hasHeader: true) - .Read(dataSource).AsDynamic; - var pipe = new VectorWhiteningEstimator(ML, "features", "whitened"); - - var result = pipe.Fit(dataView).Transform(dataView); - var resultRoles = new RoleMappedData(result); - using (var ms = new MemoryStream()) - { - TrainUtils.SaveModel(ML, Env.Start("saving"), ms, null, resultRoles); - ms.Position = 0; - var loadedView = ModelFileUtils.LoadTransforms(ML, dataView, ms); - } - Done(); - } - - [Fact] - public void LpNormWorkout() - { - string dataSource = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); - var data = TextLoader.CreateReader(ML, - c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), - separator: ';', hasHeader: true) - .Read(dataSource); - - var invalidData = TextLoader.CreateReader(ML, - c => (label: c.LoadFloat(11), features: c.LoadText(0, 10)), - separator: ';', hasHeader: true) - .Read(dataSource); - - var est = new LpNormalizingEstimator(ML, "features", "lpNorm1") - .Append(new LpNormalizingEstimator(ML, "features", "lpNorm2", normKind: LpNormalizingEstimatorBase.NormalizerKind.L1Norm, substractMean: true)); - TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); - - var outputPath = GetOutputPath("NormalizerEstimator", "lpNorm.tsv"); - using (var ch = Env.Start("save")) - { - var saver = new TextSaver(ML, new TextSaver.Arguments { Silent = true, OutputHeader = false }); - IDataView savedData = TakeFilter.Create(ML, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "lpNorm1", "lpNorm2" }); - - using (var fs = File.Create(outputPath)) - DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); - } - - CheckEquality("NormalizerEstimator", "lpNorm.tsv"); - Done(); - } - - [Fact] - public void TestLpNormCommandLine() - { - Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0-10} xf=LpNormNormalizer{col=B:A} in=f:\2.txt" }), (int)0); - } - - [Fact] - public void TestLpNormOldSavingAndLoading() - { - string dataSource = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); - var dataView = TextLoader.CreateReader(ML, - c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), - separator: ';', hasHeader: true) - .Read(dataSource).AsDynamic; - var pipe = new LpNormalizingEstimator(ML, "features", "whitened"); - - var result = pipe.Fit(dataView).Transform(dataView); - var resultRoles = new RoleMappedData(result); - using (var ms = new MemoryStream()) - { - TrainUtils.SaveModel(ML, Env.Start("saving"), ms, null, resultRoles); - ms.Position = 0; - var loadedView = ModelFileUtils.LoadTransforms(ML, dataView, ms); - } - } - - [Fact] - public void GcnWorkout() - { - string dataSource = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); - var data = TextLoader.CreateReader(ML, - c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), - separator: ';', hasHeader: true) - .Read(dataSource); - - var invalidData = TextLoader.CreateReader(ML, - c => (label: c.LoadFloat(11), features: c.LoadText(0, 10)), - separator: ';', hasHeader: true) - .Read(dataSource); - - var est = new GlobalContrastNormalizingEstimator(ML, "features", "gcnNorm1") - .Append(new GlobalContrastNormalizingEstimator(ML, "features", "gcnNorm2", substractMean: false, useStdDev: true, scale: 3)); - TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); - - var outputPath = GetOutputPath("NormalizerEstimator", "gcnNorm.tsv"); - using (var ch = Env.Start("save")) - { - var saver = new TextSaver(ML, new TextSaver.Arguments { Silent = true, OutputHeader = false }); - IDataView savedData = TakeFilter.Create(ML, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = ColumnSelectingTransformer.CreateKeep(ML, savedData, new[] { "gcnNorm1", "gcnNorm2" }); - - using (var fs = File.Create(outputPath)) - DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); - } - - CheckEquality("NormalizerEstimator", "gcnNorm.tsv", digitsOfPrecision: 4); - Done(); - } - - [Fact] - public void TestGcnNormCommandLine() - { - Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0-10} xf=GcnTransform{col=B:A} in=f:\2.txt" }), (int)0); - } - - [Fact] - public void TestGcnNormOldSavingAndLoading() - { - string dataSource = GetDataPath(TestDatasets.generatedRegressionDataset.trainFilename); - var dataView = TextLoader.CreateReader(ML, - c => (label: c.LoadFloat(11), features: c.LoadFloat(0, 10)), - separator: ';', hasHeader: true) - .Read(dataSource).AsDynamic; - var pipe = new GlobalContrastNormalizingEstimator(ML, "features", "whitened"); - - var result = pipe.Fit(dataView).Transform(dataView); - var resultRoles = new RoleMappedData(result); - using (var ms = new MemoryStream()) - { - TrainUtils.SaveModel(ML, Env.Start("saving"), ms, null, resultRoles); - ms.Position = 0; - var loadedView = ModelFileUtils.LoadTransforms(ML, dataView, ms); - } - } } } diff --git a/test/Microsoft.ML.Tests/Transformers/PcaTests.cs b/test/Microsoft.ML.Tests/Transformers/PcaTests.cs index 43ad1f7d70..fa53e88170 100644 --- a/test/Microsoft.ML.Tests/Transformers/PcaTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/PcaTests.cs @@ -2,7 +2,6 @@ // 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; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Data.IO; using Microsoft.ML.Runtime.RunTests; @@ -16,14 +15,14 @@ namespace Microsoft.ML.Tests.Transformers { public sealed class PcaTests : TestDataPipeBase { - private readonly IHostEnvironment _env; + private readonly ConsoleEnvironment _env; private readonly string _dataSource; private readonly TextSaver _saver; public PcaTests(ITestOutputHelper helper) : base(helper) { - _env = new MLContext(seed: 1); + _env = new ConsoleEnvironment(seed: 1); _dataSource = GetDataPath("generated_regression_dataset.csv"); _saver = new TextSaver(_env, new TextSaver.Arguments { Silent = true, OutputHeader = false }); } @@ -63,7 +62,7 @@ public void TestPcaEstimator() using (var ch = _env.Start("save")) { IDataView savedData = TakeFilter.Create(_env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = ColumnSelectingTransformer.CreateKeep(_env, savedData, new[] { "pca" }); + savedData = SelectColumnsTransform.CreateKeep(_env, savedData, "pca"); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, _saver, savedData, fs, keepHidden: true); diff --git a/test/Microsoft.ML.Tests/Transformers/RffTests.cs b/test/Microsoft.ML.Tests/Transformers/RffTests.cs index d647eddbca..80d404cf9c 100644 --- a/test/Microsoft.ML.Tests/Transformers/RffTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/RffTests.cs @@ -51,8 +51,8 @@ public void RffWorkout() var generator = new GaussianFourierSampler.Arguments(); var pipe = new RandomFourierFeaturizingEstimator(Env, new[]{ - new RandomFourierFeaturizingTransformer.ColumnInfo("A", "RffA", 5, false), - new RandomFourierFeaturizingTransformer.ColumnInfo("A", "RffB", 10, true, new LaplacianFourierSampler.Arguments()) + new RffTransform.ColumnInfo("A", "RffA", 5, false), + new RffTransform.ColumnInfo("A", "RffB", 10, true, new LaplacianFourierSampler.Arguments()) }); TestEstimatorCore(pipe, dataView, invalidInput: invalidData, validForFitNotValidForTransformInput: validFitInvalidData); @@ -107,8 +107,8 @@ public void TestOldSavingAndLoading() var dataView = ComponentCreation.CreateDataView(Env, data); var est = new RandomFourierFeaturizingEstimator(Env, new[]{ - new RandomFourierFeaturizingTransformer.ColumnInfo("A", "RffA", 5, false), - new RandomFourierFeaturizingTransformer.ColumnInfo("A", "RffB", 10, true,new LaplacianFourierSampler.Arguments()) + new RffTransform.ColumnInfo("A", "RffA", 5, false), + new RffTransform.ColumnInfo("A", "RffB", 10, true,new LaplacianFourierSampler.Arguments()) }); var result = est.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); diff --git a/test/Microsoft.ML.Tests/Transformers/SelectColumnsTests.cs b/test/Microsoft.ML.Tests/Transformers/SelectColumnsTests.cs index e60fe7ada1..bcf09807e6 100644 --- a/test/Microsoft.ML.Tests/Transformers/SelectColumnsTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/SelectColumnsTests.cs @@ -47,7 +47,7 @@ void TestSelectKeep() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = ColumnSelectingEstimator.KeepColumns(Env, "A", "C"); + var est = new ColumnSelectingEstimator(Env, "A", "C"); var transformer = est.Fit(dataView); var result = transformer.Transform(dataView); var foundColumnA = result.Schema.TryGetColumnIndex("A", out int aIdx); @@ -69,7 +69,7 @@ void TestSelectKeepWithOrder() var dataView = ComponentCreation.CreateDataView(Env, data); // Expected output will be CA - var est = ColumnSelectingEstimator.KeepColumns(Env, "C", "A"); + var est = new ColumnSelectingEstimator(Env, "C", "A"); var transformer = est.Fit(dataView); var result = transformer.Transform(dataView); var foundColumnA = result.Schema.TryGetColumnIndex("A", out int aIdx); @@ -89,7 +89,7 @@ void TestSelectDrop() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = ColumnSelectingEstimator.DropColumns(Env, "A", "C"); + var est = new ColumnSelectingEstimator(Env, null, new string[] { "A", "C" }); var transformer = est.Fit(dataView); var result = transformer.Transform(dataView); var foundColumnA = result.Schema.TryGetColumnIndex("A", out int aIdx); @@ -113,15 +113,15 @@ void TestSelectWorkout() var invalidDataView = ComponentCreation.CreateDataView(Env, invalidData); // Workout on keep columns - var est = ML.Transforms.SelectColumns(new[] {"A", "B"}, null, true, false); + var est = new ColumnSelectingEstimator(Env, new[] {"A", "B"}, null, true, false); TestEstimatorCore(est, validFitInput: dataView, invalidInput: invalidDataView); // Workout on drop columns - est = ML.Transforms.SelectColumns(null, new[] {"A", "B"}, true, false); + est = new ColumnSelectingEstimator(Env, null, new[] {"A", "B"}, true, false); TestEstimatorCore(est, validFitInput: dataView, invalidInput: invalidDataView); // Workout on keep columns with ignore mismatch -- using invalid data set - est = ML.Transforms.SelectColumns(new[] {"A", "B"}, null, true, true); + est = new ColumnSelectingEstimator(Env, new[] {"A", "B"}, null, true, true); TestEstimatorCore(est, validFitInput: invalidDataView); } @@ -130,7 +130,7 @@ void TestSelectColumnsWithMissing() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = ColumnSelectingEstimator.KeepColumns(Env, "D", "G"); + var est = new ColumnSelectingEstimator(Env, new[] {"D", "G"}); Assert.Throws(() => est.Fit(dataView)); } @@ -139,8 +139,8 @@ void TestSelectColumnsWithSameName() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = new ColumnsCopyingEstimator(Env, new[] {("A", "A"), ("B", "B")}); - var chain = est.Append(ColumnSelectingEstimator.KeepColumns(Env, "C", "A")); + var est = new CopyColumnsEstimator(Env, new[] {("A", "A"), ("B", "B")}); + var chain = est.Append(new ColumnSelectingEstimator(Env, new[]{"C", "A" })); var transformer = chain.Fit(dataView); var result = transformer.Transform(dataView); @@ -163,8 +163,8 @@ void TestSelectColumnsWithKeepHidden() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = new ColumnsCopyingEstimator(Env, new[] {("A", "A"), ("B", "B")}); - var chain = est.Append(ML.Transforms.SelectColumns(new[] {"B", "A" }, null, true)); + var est = new CopyColumnsEstimator(Env, new[] {("A", "A"), ("B", "B")}); + var chain = est.Append(new ColumnSelectingEstimator(Env, new[] {"B", "A" }, null, true)); var transformer = chain.Fit(dataView); var result = transformer.Transform(dataView); @@ -187,8 +187,8 @@ void TestSelectColumnsDropWithKeepHidden() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = new ColumnsCopyingEstimator(Env, new[] {("A", "A"), ("B", "B")}); - var chain = est.Append(ML.Transforms.SelectColumns(null, new[] { "A" }, true)); + var est = new CopyColumnsEstimator(Env, new[] {("A", "A"), ("B", "B")}); + var chain = est.Append(new ColumnSelectingEstimator(Env, null, new[] { "A" }, true)); var transformer = chain.Fit(dataView); var result = transformer.Transform(dataView); @@ -211,14 +211,14 @@ void TestSelectWithKeepAndDropSet() { // Setting both keep and drop is not allowed. var test = new string[]{ "D", "G"}; - Assert.Throws(() => ML.Transforms.SelectColumns(test, test)); + Assert.Throws(() => new ColumnSelectingEstimator(Env, test, test)); } [Fact] void TestSelectNoKeepAndDropSet() { // Passing null to both keep and drop is not allowed. - Assert.Throws(() => ML.Transforms.SelectColumns(null, null)); + Assert.Throws(() => new ColumnSelectingEstimator(Env, null, null)); } [Fact] @@ -226,7 +226,7 @@ void TestSelectSavingAndLoading() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = ColumnSelectingEstimator.KeepColumns(Env, "A", "B"); + var est = new ColumnSelectingEstimator(Env, new[] { "A", "B" }); var transformer = est.Fit(dataView); using (var ms = new MemoryStream()) { @@ -245,8 +245,8 @@ void TestSelectSavingAndLoadingWithNoKeepHidden() { var data = new[] { new TestClass() { A = 1, B = 2, C = 3, }, new TestClass() { A = 4, B = 5, C = 6 } }; var dataView = ComponentCreation.CreateDataView(Env, data); - var est = new ColumnsCopyingEstimator(Env, new[] {("A", "A"), ("B", "B")}).Append( - ML.Transforms.SelectColumns(new[] { "A", "B" }, null, false)); + var est = new CopyColumnsEstimator(Env, new[] {("A", "A"), ("B", "B")}).Append( + new ColumnSelectingEstimator(Env, new[] { "A", "B" }, null, false)); var transformer = est.Fit(dataView); using (var ms = new MemoryStream()) { diff --git a/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs b/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs index d3d66d5751..b436c96149 100644 --- a/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs @@ -2,18 +2,16 @@ // 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; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Data.IO; using Microsoft.ML.Runtime.RunTests; -using Microsoft.ML.Runtime.Tools; using Microsoft.ML.Transforms; -using Microsoft.ML.Transforms.Categorical; -using Microsoft.ML.Transforms.Conversions; using Microsoft.ML.Transforms.Text; +using Microsoft.ML.Transforms.Categorical; using System.IO; using Xunit; using Xunit.Abstractions; +using Microsoft.ML.Transforms.Conversions; namespace Microsoft.ML.Tests.Transformers { @@ -49,7 +47,7 @@ public void TextFeaturizerWorkout() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); IDataView savedData = TakeFilter.Create(Env, feat.Fit(data).Transform(data).AsDynamic, 4); - savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "Data", "Data_TransformedText" }); + savedData = SelectColumnsTransform.CreateKeep(Env, savedData, "Data", "Data_TransformedText"); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); @@ -74,8 +72,8 @@ public void TextTokenizationWorkout() .Read(sentimentDataPath); var est = new WordTokenizingEstimator(Env, "text", "words") - .Append(new TokenizingByCharactersEstimator(Env, "text", "chars")) - .Append(new KeyToValueMappingEstimator(Env, "chars")); + .Append(new CharacterTokenizingEstimator(Env, "text", "chars")) + .Append(new KeyToValueEstimator(Env, "chars")); TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); var outputPath = GetOutputPath("Text", "tokenized.tsv"); @@ -83,7 +81,7 @@ public void TextTokenizationWorkout() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); IDataView savedData = TakeFilter.Create(Env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "text", "words", "chars" }); + savedData = SelectColumnsTransform.CreateKeep(Env, savedData, "text", "words", "chars"); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); @@ -102,9 +100,9 @@ public void TokenizeWithSeparators() text: ctx.LoadText(1)), hasHeader: true) .Read(dataPath).AsDynamic; - var est = new WordTokenizingEstimator(Env, "text", "words", separators: new[] { ' ', '?', '!', '.', ',' }); + var est = new WordTokenizingEstimator(Env, "text", "words", separators: new[] { ' ', '?', '!', '.', ','}); var outdata = TakeFilter.Create(Env, est.Fit(data).Transform(data), 4); - var savedData = ColumnSelectingTransformer.CreateKeep(Env, outdata, new[] { "words" }); + var savedData = SelectColumnsTransform.CreateKeep(Env, outdata, "words"); var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); var outputPath = GetOutputPath("Text", "tokenizedWithSeparators.tsv"); @@ -144,7 +142,7 @@ public void TextNormalizationAndStopwordRemoverWorkout() text: ctx.LoadFloat(1)), hasHeader: true) .Read(sentimentDataPath); - var est = new TextNormalizingEstimator(Env, "text") + var est = new TextNormalizingEstimator(Env,"text") .Append(new WordTokenizingEstimator(Env, "text", "words")) .Append(new StopwordRemover(Env, "words", "words_without_stopwords")); TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); @@ -154,7 +152,7 @@ public void TextNormalizationAndStopwordRemoverWorkout() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); IDataView savedData = TakeFilter.Create(Env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "text", "words_without_stopwords" }); + savedData = SelectColumnsTransform.CreateKeep(Env, savedData, "text", "words_without_stopwords"); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); @@ -180,7 +178,7 @@ public void WordBagWorkout() var est = new WordBagEstimator(Env, "text", "bag_of_words"). Append(new WordHashBagEstimator(Env, "text", "bag_of_wordshash")); - + // The following call fails because of the following issue // https://github.com/dotnet/machinelearning/issues/969 // TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); @@ -190,7 +188,7 @@ public void WordBagWorkout() { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); IDataView savedData = TakeFilter.Create(Env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "text", "bag_of_words", "bag_of_wordshash" }); + savedData = SelectColumnsTransform.CreateKeep(Env, savedData, "text", "bag_of_words", "bag_of_wordshash"); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); @@ -216,17 +214,19 @@ public void NgramWorkout() var est = new WordTokenizingEstimator(Env, "text", "text") .Append(new ValueToKeyMappingEstimator(Env, "text", "terms")) - .Append(new NgramCountingEstimator(Env, "terms", "ngrams")) + .Append(new NgramEstimator(Env, "terms", "ngrams")) .Append(new NgramHashEstimator(Env, "terms", "ngramshash")); - - TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); + + // The following call fails because of the following issue + // https://github.com/dotnet/machinelearning/issues/969 + // TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); var outputPath = GetOutputPath("Text", "ngrams.tsv"); using (var ch = Env.Start("save")) { var saver = new TextSaver(Env, new TextSaver.Arguments { Silent = true }); IDataView savedData = TakeFilter.Create(Env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); - savedData = ColumnSelectingTransformer.CreateKeep(Env, savedData, new[] { "text", "terms", "ngrams", "ngramshash" }); + savedData = SelectColumnsTransform.CreateKeep(Env, savedData, "text", "terms", "ngrams", "ngramshash"); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); @@ -239,7 +239,7 @@ public void NgramWorkout() [Fact] public void LdaWorkout() { - IHostEnvironment env = new MLContext(seed: 42, conc: 1); + var env = new ConsoleEnvironment(seed: 42, conc: 1); string sentimentDataPath = GetDataPath("wikipedia-detox-250-line-data.tsv"); var data = TextLoader.CreateReader(env, ctx => ( label: ctx.LoadBool(0), @@ -252,22 +252,21 @@ public void LdaWorkout() .Read(sentimentDataPath); var est = new WordBagEstimator(env, "text", "bag_of_words"). - Append(new LatentDirichletAllocationEstimator(env, "bag_of_words", "topics", 10, numIterations: 10, - resetRandomGenerator: true)); + Append(new LdaEstimator(env, "bag_of_words", "topics", 10, advancedSettings: s => { + s.NumIterations = 10; + s.ResetRandomGenerator = true; + })); // The following call fails because of the following issue // https://github.com/dotnet/machinelearning/issues/969 - // In this test it manifests because of the WordBagEstimator in the estimator chain // TestEstimatorCore(est, data.AsDynamic, invalidInput: invalidData.AsDynamic); var outputPath = GetOutputPath("Text", "ldatopics.tsv"); using (var ch = env.Start("save")) { - var saver = new TextSaver(env, new TextSaver.Arguments { Silent = true, OutputHeader = false, Dense = true }); - var transformer = est.Fit(data.AsDynamic); - var transformedData = transformer.Transform(data.AsDynamic); - IDataView savedData = TakeFilter.Create(env, transformedData, 4); - savedData = ColumnSelectingTransformer.CreateKeep(env, savedData, new[] { "topics" }); + var saver = new TextSaver(env, new TextSaver.Arguments { Silent = true, OutputHeader = false, Dense = true }); + IDataView savedData = TakeFilter.Create(env, est.Fit(data.AsDynamic).Transform(data.AsDynamic), 4); + savedData = SelectColumnsTransform.CreateKeep(env, savedData, "topics"); using (var fs = File.Create(outputPath)) DataSaverUtils.SaveDataView(ch, saver, savedData, fs, keepHidden: true); @@ -282,30 +281,5 @@ public void LdaWorkout() // CheckEquality("Text", "ldatopics.tsv"); Done(); } - - [Fact] - public void LdaWorkoutEstimatorCore() - { - var ml = new MLContext(); - - var builder = new ArrayDataViewBuilder(Env); - var data = new[] - { - new[] { (float)1.0, (float)0.0, (float)0.0 }, - new[] { (float)0.0, (float)1.0, (float)0.0 }, - new[] { (float)0.0, (float)0.0, (float)1.0 }, - }; - builder.AddColumn("F1V", NumberType.Float, data); - var srcView = builder.GetDataView(); - - var est = ml.Transforms.Text.LatentDirichletAllocation("F1V"); - TestEstimatorCore(est, srcView); - } - - [Fact] - public void TestLdaCommandLine() - { - Assert.Equal(Maml.Main(new[] { @"showschema loader=Text{col=A:R4:0-10} xf=lda{col=B:A} in=f:\2.txt" }), (int)0); - } } } diff --git a/test/Microsoft.ML.Tests/Transformers/WordTokenizeTests.cs b/test/Microsoft.ML.Tests/Transformers/WordTokenizeTests.cs index 83ff4c2226..4ceb263fc2 100644 --- a/test/Microsoft.ML.Tests/Transformers/WordTokenizeTests.cs +++ b/test/Microsoft.ML.Tests/Transformers/WordTokenizeTests.cs @@ -40,8 +40,8 @@ public void WordTokenizeWorkout() var invalidData = new[] { new TestWrong() { A =1, B = new float[2] { 2,3 } } }; var invalidDataView = ComponentCreation.CreateDataView(Env, invalidData); var pipe = new WordTokenizingEstimator(Env, new[]{ - new WordTokenizingTransformer.ColumnInfo("A", "TokenizeA"), - new WordTokenizingTransformer.ColumnInfo("B", "TokenizeB"), + new WordTokenizeTransform.ColumnInfo("A", "TokenizeA"), + new WordTokenizeTransform.ColumnInfo("B", "TokenizeB"), }); TestEstimatorCore(pipe, dataView, invalidInput: invalidDataView); @@ -61,8 +61,8 @@ public void TestOldSavingAndLoading() var dataView = ComponentCreation.CreateDataView(Env, data); var pipe = new WordTokenizingEstimator(Env, new[]{ - new WordTokenizingTransformer.ColumnInfo("A", "TokenizeA"), - new WordTokenizingTransformer.ColumnInfo("B", "TokenizeB"), + new WordTokenizeTransform.ColumnInfo("A", "TokenizeA"), + new WordTokenizeTransform.ColumnInfo("B", "TokenizeB"), }); var result = pipe.Fit(dataView).Transform(dataView); var resultRoles = new RoleMappedData(result); diff --git a/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesDirectApi.cs b/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesDirectApi.cs index 834e3f669f..a72e131bc4 100644 --- a/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesDirectApi.cs +++ b/test/Microsoft.ML.TimeSeries.Tests/TimeSeriesDirectApi.cs @@ -13,109 +13,114 @@ namespace Microsoft.ML.Tests public sealed class TimeSeries { - private sealed class Prediction + public class Prediction { -#pragma warning disable CS0649 [VectorType(4)] public double[] Change; -#pragma warning restore CS0649 } - private sealed class Data + sealed class Data { public float Value; - public Data(float value) => Value = value; + public Data(float value) + { + Value = value; + } } [Fact] public void ChangeDetection() { - var env = new MLContext(conc: 1); - const int size = 10; - List data = new List(size); - var dataView = env.CreateStreamingDataView(data); - for (int i = 0; i < size / 2; i++) - data.Add(new Data(5)); - - for (int i = 0; i < size / 2; i++) - data.Add(new Data((float)(5 + i * 1.1))); - - var args = new IidChangePointDetector.Arguments() + using (var env = new ConsoleEnvironment(conc: 1)) { - Confidence = 80, - Source = "Value", - Name = "Change", - ChangeHistoryLength = size - }; - // Train - var detector = new IidChangePointEstimator(env, args).Fit(dataView); - // Transform - var output = detector.Transform(dataView); - // Get predictions - var enumerator = output.AsEnumerable(env, true).GetEnumerator(); - Prediction row = null; - List expectedValues = new List() { 0, 5, 0.5, 5.1200000000000114E-08, 0, 5, 0.4999999995, 5.1200000046080209E-08, 0, 5, 0.4999999995, 5.1200000092160303E-08, + const int size = 10; + List data = new List(size); + var dataView = env.CreateStreamingDataView(data); + for (int i = 0; i < size / 2; i++) + data.Add(new Data(5)); + + for (int i = 0; i < size / 2; i++) + data.Add(new Data((float)(5 + i * 1.1))); + + var args = new IidChangePointDetector.Arguments() + { + Confidence = 80, + Source = "Value", + Name = "Change", + ChangeHistoryLength = size + }; + // Train + var detector = new IidChangePointEstimator(env, args).Fit(dataView); + // Transform + var output = detector.Transform(dataView); + // Get predictions + var enumerator = output.AsEnumerable(env, true).GetEnumerator(); + Prediction row = null; + List expectedValues = new List() { 0, 5, 0.5, 5.1200000000000114E-08, 0, 5, 0.4999999995, 5.1200000046080209E-08, 0, 5, 0.4999999995, 5.1200000092160303E-08, 0, 5, 0.4999999995, 5.12000001382404E-08}; - int index = 0; - while (enumerator.MoveNext() && index < expectedValues.Count) - { - row = enumerator.Current; - - Assert.Equal(expectedValues[index++], row.Change[0]); - Assert.Equal(expectedValues[index++], row.Change[1]); - Assert.Equal(expectedValues[index++], row.Change[2]); - Assert.Equal(expectedValues[index++], row.Change[3]); + int index = 0; + while (enumerator.MoveNext() && index < expectedValues.Count) + { + row = enumerator.Current; + + Assert.Equal(expectedValues[index++], row.Change[0]); + Assert.Equal(expectedValues[index++], row.Change[1]); + Assert.Equal(expectedValues[index++], row.Change[2]); + Assert.Equal(expectedValues[index++], row.Change[3]); + } } } [Fact] public void ChangePointDetectionWithSeasonality() { - var env = new MLContext(conc: 1); - const int ChangeHistorySize = 10; - const int SeasonalitySize = 10; - const int NumberOfSeasonsInTraining = 5; - const int MaxTrainingSize = NumberOfSeasonsInTraining * SeasonalitySize; - - List data = new List(); - var dataView = env.CreateStreamingDataView(data); - - var args = new SsaChangePointDetector.Arguments() + using (var env = new ConsoleEnvironment(conc: 1)) { - Confidence = 95, - Source = "Value", - Name = "Change", - ChangeHistoryLength = ChangeHistorySize, - TrainingWindowSize = MaxTrainingSize, - SeasonalWindowSize = SeasonalitySize - }; - - for (int j = 0; j < NumberOfSeasonsInTraining; j++) - for (int i = 0; i < SeasonalitySize; i++) - data.Add(new Data(i)); - - for (int i = 0; i < ChangeHistorySize; i++) - data.Add(new Data(i * 100)); - - // Train - var detector = new SsaChangePointEstimator(env, args).Fit(dataView); - // Transform - var output = detector.Transform(dataView); - // Get predictions - var enumerator = output.AsEnumerable(env, true).GetEnumerator(); - Prediction row = null; - List expectedValues = new List() { 0, -3.31410598754883, 0.5, 5.12000000000001E-08, 0, 1.5700820684432983, 5.2001145245395008E-07, + const int ChangeHistorySize = 10; + const int SeasonalitySize = 10; + const int NumberOfSeasonsInTraining = 5; + const int MaxTrainingSize = NumberOfSeasonsInTraining * SeasonalitySize; + + List data = new List(); + var dataView = env.CreateStreamingDataView(data); + + var args = new SsaChangePointDetector.Arguments() + { + Confidence = 95, + Source = "Value", + Name = "Change", + ChangeHistoryLength = ChangeHistorySize, + TrainingWindowSize = MaxTrainingSize, + SeasonalWindowSize = SeasonalitySize + }; + + for (int j = 0; j < NumberOfSeasonsInTraining; j++) + for (int i = 0; i < SeasonalitySize; i++) + data.Add(new Data(i)); + + for (int i = 0; i < ChangeHistorySize; i++) + data.Add(new Data(i * 100)); + + // Train + var detector = new SsaChangePointEstimator(env, args).Fit(dataView); + // Transform + var output = detector.Transform(dataView); + // Get predictions + var enumerator = output.AsEnumerable(env, true).GetEnumerator(); + Prediction row = null; + List expectedValues = new List() { 0, -3.31410598754883, 0.5, 5.12000000000001E-08, 0, 1.5700820684432983, 5.2001145245395008E-07, 0.012414560443710681, 0, 1.2854313254356384, 0.28810801662678009, 0.02038940454467935, 0, -1.0950627326965332, 0.36663890634019225, 0.026956459625565483}; - int index = 0; - while (enumerator.MoveNext() && index < expectedValues.Count) - { - row = enumerator.Current; - Assert.Equal(expectedValues[index++], row.Change[0], precision: 7); // Alert - Assert.Equal(expectedValues[index++], row.Change[1], precision: 7); // Raw score - Assert.Equal(expectedValues[index++], row.Change[2], precision: 7); // P-Value score - Assert.Equal(expectedValues[index++], row.Change[3], precision: 7); // Martingale score + int index = 0; + while (enumerator.MoveNext() && index < expectedValues.Count) + { + row = enumerator.Current; + Assert.Equal(expectedValues[index++], row.Change[0], precision: 7); // Alert + Assert.Equal(expectedValues[index++], row.Change[1], precision: 7); // Raw score + Assert.Equal(expectedValues[index++], row.Change[2], precision: 7); // P-Value score + Assert.Equal(expectedValues[index++], row.Change[3], precision: 7); // Martingale score + } } } } diff --git a/tools-local/Microsoft.ML.InternalCodeAnalyzer/InstanceInitializerAnalyzer.cs b/tools-local/Microsoft.ML.InternalCodeAnalyzer/InstanceInitializerAnalyzer.cs index c4bd2fe38c..c7ee67537a 100644 --- a/tools-local/Microsoft.ML.InternalCodeAnalyzer/InstanceInitializerAnalyzer.cs +++ b/tools-local/Microsoft.ML.InternalCodeAnalyzer/InstanceInitializerAnalyzer.cs @@ -18,7 +18,7 @@ public sealed class InstanceInitializerAnalyzer : DiagnosticAnalyzer internal const string DiagnosticId = "MSML_NoInstanceInitializers"; private const string Title = "No initializers on instance fields or properties"; - private const string Format = "Member {0} has a {1} initializer outside the constructor"; + private const string Format = "Member {0} has a {1} initialier outside the constructor"; private static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, Format, Category, From 55b5b0f949f775524db9df14afac1301eee1cb2c Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Wed, 21 Nov 2018 13:28:40 -0800 Subject: [PATCH 42/54] updated libmf ref --- src/Native/MatrixFactorizationNative/libmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Native/MatrixFactorizationNative/libmf b/src/Native/MatrixFactorizationNative/libmf index 1ecc365249..f92a18161b 160000 --- a/src/Native/MatrixFactorizationNative/libmf +++ b/src/Native/MatrixFactorizationNative/libmf @@ -1 +1 @@ -Subproject commit 1ecc365249e5cac5e72c66317a141298dc52f6e3 +Subproject commit f92a18161b6824fda4c4ab698a69d299a836841a From 7405fced3935c9ea8ddf0c5565b31ed349a6100a Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Wed, 21 Nov 2018 16:25:53 -0800 Subject: [PATCH 43/54] Updated to fix issues related to OnnxTransform changes --- .../AlexNet.cs | 23 +++++++++++------ .../ResNet101.cs | 23 +++++++++++------ .../ResNet18.cs | 25 ++++++++++++------- .../ResNet50.cs | 23 +++++++++++------ .../DnnImageFeaturizerTransform.cs | 23 +++++++++-------- 5 files changed, 74 insertions(+), 43 deletions(-) diff --git a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs index 2d7c0f056b..5d216e10b3 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs @@ -17,10 +17,11 @@ public static class AlexNetExtension { /// /// Returns an estimator chain with the two corresponding models (a preprocessing one and a main one) required for the AlexNet pipeline. + /// Also includes the renaming ColumnsCopyingTransforms required to be able to use arbitrary input and output column names. /// This assumes both of the models are in the same location as the file containing this method, which they will be if used through the NuGet. /// This should be the default way to use AlexNet if importing the model from a NuGet. /// - public static EstimatorChain AlexNet(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) + public static EstimatorChain AlexNet(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) { return AlexNet(dnnModelContext, env, inputColumn, outputColumn, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "DnnImageModels")); } @@ -31,16 +32,22 @@ public static EstimatorChain AlexNet(this DnnImageModelSelector d /// must be in a directory all by themsleves for the OnnxTransform to work, this method appends a AlexNetOnnx/AlexNetPrepOnnx subdirectory /// to the passed in directory to prevent having to make that directory manually each time. ///
- public static EstimatorChain AlexNet(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn, string modelDir) + public static EstimatorChain AlexNet(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn, string modelDir) { - var modelChain = new EstimatorChain(); - var tempCol = "onnxDnnPrep"; + var modelChain = new EstimatorChain(); + + var inputRename = new ColumnsCopyingEstimator(env, new[] { (inputColumn, "OriginalInput") }); + var midRename = new ColumnsCopyingEstimator(env, new[] { ("PreprocessedInput", "Input140") }); + var endRename = new ColumnsCopyingEstimator(env, new[] { ("Dropout234_Output_0", outputColumn) }); // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. - var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "AlexNetPrepOnnx", "AlexNetPreprocess.onnx"), inputColumn, tempCol); - var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "AlexNetOnnx", "AlexNet.onnx"), tempCol, outputColumn); - modelChain = modelChain.Append(prepEstimator); - modelChain = modelChain.Append(mainEstimator); + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "AlexNetPrepOnnx", "AlexNetPreprocess.onnx"), new[] { "OriginalInput" }, new[] { "PreprocessedInput" }); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "AlexNetOnnx", "AlexNet.onnx"), new[] { "Input140" }, new[] { "Dropout234_Output_0" }); + modelChain = modelChain.Append(inputRename); + var modelChain2 = modelChain.Append(prepEstimator); + modelChain = modelChain2.Append(midRename); + modelChain2 = modelChain.Append(mainEstimator); + modelChain = modelChain2.Append(endRename); return modelChain; } } diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs index 71ca56e36a..4f5c825c46 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs @@ -17,10 +17,11 @@ public static class ResNet101Extension { /// /// Returns an estimator chain with the two corresponding models (a preprocessing one and a main one) required for the ResNet pipeline. + /// Also includes the renaming ColumnsCopyingTransforms required to be able to use arbitrary input and output column names. /// This assumes both of the models are in the same location as the file containing this method, which they will be if used through the NuGet. /// This should be the default way to use ResNet101 if importing the model from a NuGet. /// - public static EstimatorChain ResNet101(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) + public static EstimatorChain ResNet101(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) { return ResNet101(dnnModelContext, env, inputColumn, outputColumn, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "DnnImageModels")); } @@ -31,16 +32,22 @@ public static EstimatorChain ResNet101(this DnnImageModelSelector /// must be in a directory all by themsleves for the OnnxTransform to work, this method appends a ResNet101Onnx/ResNetPrepOnnx subdirectory /// to the passed in directory to prevent having to make that directory manually each time. ///
- public static EstimatorChain ResNet101(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn, string modelDir) + public static EstimatorChain ResNet101(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn, string modelDir) { - var modelChain = new EstimatorChain(); - var tempCol = "onnxDnnPrep"; + var modelChain = new EstimatorChain(); + + var inputRename = new ColumnsCopyingEstimator(env, new[] { (inputColumn, "OriginalInput") }); + var midRename = new ColumnsCopyingEstimator(env, new[] { ("PreprocessedInput", "Input1600") }); + var endRename = new ColumnsCopyingEstimator(env, new[] { ("Pooling2286_Output_0", outputColumn) }); // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. - var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), inputColumn, tempCol); - var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet101Onnx", "ResNet101.onnx"), tempCol, outputColumn); - modelChain = modelChain.Append(prepEstimator); - modelChain = modelChain.Append(mainEstimator); + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), new[] { "OriginalInput" }, new[] { "PreprocessedInput" }); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet101Onnx", "ResNet101.onnx"), new[] { "Input1600" }, new[] { "Pooling2286_Output_0" }); + modelChain = modelChain.Append(inputRename); + var modelChain2 = modelChain.Append(prepEstimator); + modelChain = modelChain2.Append(midRename); + modelChain2 = modelChain.Append(mainEstimator); + modelChain = modelChain2.Append(endRename); return modelChain; } } diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs index fc74c02d28..6a04f768fe 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs @@ -17,12 +17,13 @@ public static class ResNet18Extension { /// /// Returns an estimator chain with the two corresponding models (a preprocessing one and a main one) required for the ResNet pipeline. + /// Also includes the renaming ColumnsCopyingTransforms required to be able to use arbitrary input and output column names. /// This assumes both of the models are in the same location as the file containing this method, which they will be if used through the NuGet. /// This should be the default way to use ResNet18 if importing the model from a NuGet. /// - public static EstimatorChain ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) + public static EstimatorChain ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) { - return ResNet18(dnnModelContext, env, inputColumn, outputColumn, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "DnnImageModels")); + return ResNet18(dnnModelContext, env, inputColumn, outputColumn, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "DnnImageModels")); } /// @@ -31,16 +32,22 @@ public static EstimatorChain ResNet18(this DnnImageModelSelector /// must be in a directory all by themsleves for the OnnxTransform to work, this method appends a ResNet18Onnx/ResNetPrepOnnx subdirectory /// to the passed in directory to prevent having to make that directory manually each time. /// - public static EstimatorChain ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn, string modelDir) + public static EstimatorChain ResNet18(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn, string modelDir) { - var modelChain = new EstimatorChain(); - var tempCol = "onnxDnnPrep"; + var modelChain = new EstimatorChain(); + + var inputRename = new ColumnsCopyingEstimator(env, new[] { (inputColumn, "OriginalInput") }); + var midRename = new ColumnsCopyingEstimator(env, new[] { ("PreprocessedInput", "Input247") }); + var endRename = new ColumnsCopyingEstimator(env, new[] { ("Pooling395_Output_0", outputColumn) }); // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. - var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), inputColumn, tempCol); - var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet18Onnx", "ResNet18.onnx"), tempCol, outputColumn); - modelChain = modelChain.Append(prepEstimator); - modelChain = modelChain.Append(mainEstimator); + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), new[] { "OriginalInput" }, new[] { "PreprocessedInput" }); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet18Onnx", "ResNet18.onnx"), new[] { "Input247" }, new[] { "Pooling395_Output_0" }); + modelChain = modelChain.Append(inputRename); + var modelChain2 = modelChain.Append(prepEstimator); + modelChain = modelChain2.Append(midRename); + modelChain2 = modelChain.Append(mainEstimator); + modelChain = modelChain2.Append(endRename); return modelChain; } } diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs index ea8bd38239..acf9cfa033 100644 --- a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs +++ b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs @@ -17,10 +17,11 @@ public static class ResNet50Extension { /// /// Returns an estimator chain with the two corresponding models (a preprocessing one and a main one) required for the ResNet pipeline. + /// Also includes the renaming ColumnsCopyingTransforms required to be able to use arbitrary input and output column names. /// This assumes both of the models are in the same location as the file containing this method, which they will be if used through the NuGet. /// This should be the default way to use ResNet50 if importing the model from a NuGet. /// - public static EstimatorChain ResNet50(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) + public static EstimatorChain ResNet50(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn) { return ResNet50(dnnModelContext, env, inputColumn, outputColumn, Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "DnnImageModels")); } @@ -31,16 +32,22 @@ public static EstimatorChain ResNet50(this DnnImageModelSelector /// must be in a directory all by themsleves for the OnnxTransform to work, this method appends a ResNet50Onnx/ResNetPrepOnnx subdirectory /// to the passed in directory to prevent having to make that directory manually each time. ///
- public static EstimatorChain ResNet50(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn, string modelDir) + public static EstimatorChain ResNet50(this DnnImageModelSelector dnnModelContext, IHostEnvironment env, string inputColumn, string outputColumn, string modelDir) { - var modelChain = new EstimatorChain(); - var tempCol = "onnxDnnPrep"; + var modelChain = new EstimatorChain(); + + var inputRename = new ColumnsCopyingEstimator(env, new[] { (inputColumn, "OriginalInput") }); + var midRename = new ColumnsCopyingEstimator(env, new[] { ("PreprocessedInput", "Input750") }); + var endRename = new ColumnsCopyingEstimator(env, new[] { ("Pooling1096_Output_0", outputColumn) }); // There are two estimators created below. The first one is for image preprocessing and the second one is the actual DNN model. - var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), inputColumn, tempCol); - var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet50Onnx", "ResNet50.onnx"), tempCol, outputColumn); - modelChain = modelChain.Append(prepEstimator); - modelChain = modelChain.Append(mainEstimator); + var prepEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNetPrepOnnx", "ResNetPreprocess.onnx"), new[] { "OriginalInput" }, new[] { "PreprocessedInput" }); + var mainEstimator = new OnnxScoringEstimator(env, Path.Combine(modelDir, "ResNet50Onnx", "ResNet50.onnx"), new[] { "Input750" }, new[] { "Pooling1096_Output_0" }); + modelChain = modelChain.Append(inputRename); + var modelChain2 = modelChain.Append(prepEstimator); + modelChain = modelChain2.Append(midRename); + modelChain2 = modelChain.Append(mainEstimator); + modelChain = modelChain2.Append(endRename); return modelChain; } } diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index 5a9de1b09b..6421ebc017 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -45,12 +45,14 @@ public DnnImageFeaturizerInput(IHostEnvironment env, string inputColumn, string } /// - /// The Dnn Image Featurizer is just a wrapper around two s with present pretrained DNN models. + /// The Dnn Image Featurizer is just a wrapper around two s and three + /// with present pretrained DNN models. The ColumnsCopying are there to allow arbitrary column input and output names, as by default + /// the ONNXTransform requires the names of the columns to be identical to the names of the ONNX model nodes. /// Note that because of this, it only works on Windows machines as that is a constraint of the OnnxTransform. /// - public sealed class DnnImageFeaturizerEstimator : IEstimator> + public sealed class DnnImageFeaturizerEstimator : IEstimator> { - private readonly EstimatorChain _modelChain; + private readonly EstimatorChain _modelChain; /// /// Constructor for the estimator for a DnnImageFeaturizer transform. @@ -58,11 +60,12 @@ public sealed class DnnImageFeaturizerEstimator : IEstimatorHost environment. /// An extension method on the that creates a chain of two /// s (one for preprocessing and one with a pretrained image DNN) with specific models - /// included in a package together with that extension method. + /// included in a package together with that extension method. It also contains three s + /// to allow arbitrary column naming, as the ONNXEstimators require very specific naming based on the models. /// For an example, see Microsoft.ML.DnnImageFeaturizer.ResNet18 /// inputColumn column name. /// Output column name. - public DnnImageFeaturizerEstimator(IHostEnvironment env, Func> modelFactory, string inputColumn, string outputColumn) + public DnnImageFeaturizerEstimator(IHostEnvironment env, Func> modelFactory, string inputColumn, string outputColumn) { _modelChain = modelFactory( new DnnImageFeaturizerInput(env, inputColumn, outputColumn, new DnnImageModelSelector())); } @@ -71,7 +74,7 @@ public DnnImageFeaturizerEstimator(IHostEnvironment env, Func - public TransformerChain Fit(IDataView input) + public TransformerChain Fit(IDataView input) { return _modelChain.Fit(input); } @@ -88,7 +91,7 @@ private sealed class OutColumn : Vector { public PipelineColumn Input { get; } - public OutColumn(Vector input, Func> modelFactory) + public OutColumn(Vector input, Func> modelFactory) : base(new Reconciler(modelFactory), input) { Input = input; @@ -97,9 +100,9 @@ public OutColumn(Vector input, Func> _modelFactory; + private readonly Func> _modelFactory; - public Reconciler(Func> modelFactory) + public Reconciler(Func> modelFactory) { _modelFactory = modelFactory; } @@ -127,7 +130,7 @@ public override IEstimator Reconcile(IHostEnvironment env, /// included in a package together with that extension method. /// For an example, see Microsoft.ML.DnnImageFeaturizer.ResNet18 /// A vector of float feature weights based on the input image. - public static Vector DnnImageFeaturizer(this Vector input, Func> modelFactory) + public static Vector DnnImageFeaturizer(this Vector input, Func> modelFactory) { Contracts.CheckValue(input, nameof(input)); return new OutColumn(input, modelFactory); From 02e8ebc699a2327c0eebf1351d504832ebe18339 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Wed, 21 Nov 2018 16:59:37 -0800 Subject: [PATCH 44/54] Update to new namespace --- src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index 6421ebc017..c739ba7f28 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using Microsoft.ML.Core.Data; +using Microsoft.ML.Data; using Microsoft.ML.Runtime; using Microsoft.ML.Runtime.Data; using Microsoft.ML.Runtime.Internal.Utilities; From c519a193d42a2f7506f54deccfeaf59260db70da Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Mon, 26 Nov 2018 11:49:57 -0800 Subject: [PATCH 45/54] Address more comments --- ...ft.ML.DnnImageFeaturizer.AlexNet.nupkgproj | 4 +- ....ML.DnnImageFeaturizer.ResNet101.nupkgproj | 4 +- ...t.ML.DnnImageFeaturizer.ResNet18.nupkgproj | 4 +- ...t.ML.DnnImageFeaturizer.ResNet50.nupkgproj | 4 +- .../{AlexNet.cs => AlexNetExtension.cs} | 0 .../{ResNet101.cs => ResNet101Extension.cs} | 0 .../{ResNet18.cs => ResNet18Extension.cs} | 0 .../{ResNet50.cs => ResNet50Extension.cs} | 0 .../DnnImageFeaturizerTransform.cs | 4 +- ...oft.ML.DnnImageFeaturizer.ModelRedist.proj | 61 ++++--------------- .../DnnImageFeaturizerTest.cs | 6 +- .../Microsoft.ML.OnnxTransformTest.csproj | 4 +- 12 files changed, 26 insertions(+), 65 deletions(-) rename src/Microsoft.ML.DnnImageFeaturizer.AlexNet/{AlexNet.cs => AlexNetExtension.cs} (100%) rename src/Microsoft.ML.DnnImageFeaturizer.ResNet101/{ResNet101.cs => ResNet101Extension.cs} (100%) rename src/Microsoft.ML.DnnImageFeaturizer.ResNet18/{ResNet18.cs => ResNet18Extension.cs} (100%) rename src/Microsoft.ML.DnnImageFeaturizer.ResNet50/{ResNet50.cs => ResNet50Extension.cs} (100%) diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj index aa3eccd518..9757e5f403 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj @@ -10,8 +10,8 @@ - - + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj index 2ca7e17de0..155205ab38 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj @@ -10,8 +10,8 @@ - - + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj index f76a414d7f..f367320307 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj @@ -10,8 +10,8 @@ - - + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj index 76ee8b166f..4c33a738a1 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj @@ -10,8 +10,8 @@ - - + + diff --git a/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs b/src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNetExtension.cs similarity index 100% rename from src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNet.cs rename to src/Microsoft.ML.DnnImageFeaturizer.AlexNet/AlexNetExtension.cs diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101Extension.cs similarity index 100% rename from src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101.cs rename to src/Microsoft.ML.DnnImageFeaturizer.ResNet101/ResNet101Extension.cs diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18Extension.cs similarity index 100% rename from src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18.cs rename to src/Microsoft.ML.DnnImageFeaturizer.ResNet18/ResNet18Extension.cs diff --git a/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs b/src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50Extension.cs similarity index 100% rename from src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50.cs rename to src/Microsoft.ML.DnnImageFeaturizer.ResNet50/ResNet50Extension.cs diff --git a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs index c739ba7f28..f7189127ba 100644 --- a/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs +++ b/src/Microsoft.ML.OnnxTransform/DnnImageFeaturizerTransform.cs @@ -31,14 +31,14 @@ public sealed class DnnImageModelSelector /// public sealed class DnnImageFeaturizerInput { - public IHostEnvironment Env { get; } + public IHostEnvironment Environment { get; } public string InputColumn { get; } public DnnImageModelSelector ModelSelector { get; } public string OutputColumn { get; } public DnnImageFeaturizerInput(IHostEnvironment env, string inputColumn, string outputColumn, DnnImageModelSelector modelSelector) { - Env = env; + Environment = env; InputColumn = inputColumn; OutputColumn = outputColumn; ModelSelector = modelSelector; diff --git a/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj b/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj index 922195db88..0928e1508b 100644 --- a/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj +++ b/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj @@ -8,96 +8,57 @@ - $(RepoRoot)bin\obj\DnnImageModels + $(ObjDir)DnnImageModels - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Inputs="@(ModelFiles)" Outputs="@(ModelFiles->'%(DestinationFile)')"> + - - + + { new TestDataXY() { A = new float[inputSize] } }; var stringData = new List { new TestDataDifferntType() { data_0 = new string[inputSize] } }; var sizeData = new List { new TestDataSize() { data_0 = new float[2] } }; - var pipe = new DnnImageFeaturizerEstimator(Env, m => m.ModelSelector.ResNet18(m.Env, m.InputColumn, m.OutputColumn), "data_0", "output_1"); + var pipe = new DnnImageFeaturizerEstimator(Env, m => m.ModelSelector.ResNet18(m.Environment, m.InputColumn, m.OutputColumn), "data_0", "output_1"); var invalidDataWrongNames = ComponentCreation.CreateDataView(Env, xyData); var invalidDataWrongTypes = ComponentCreation.CreateDataView(Env, stringData); @@ -117,7 +117,7 @@ public void OnnxStatic() .Append(row => ( row.name, data_0: row.imagePath.LoadAsImage(imageFolder).Resize(imageHeight, imageWidth).ExtractPixels(interleaveArgb: true))) - .Append(row => (row.name, output_1: row.data_0.DnnImageFeaturizer(m => m.ModelSelector.ResNet18(m.Env, m.InputColumn, m.OutputColumn)))); + .Append(row => (row.name, output_1: row.data_0.DnnImageFeaturizer(m => m.ModelSelector.ResNet18(m.Environment, m.InputColumn, m.OutputColumn)))); TestEstimatorCore(pipe.AsDynamic, data.AsDynamic); @@ -158,7 +158,7 @@ public void TestOldSavingAndLoading() var inputNames = "data_0"; var outputNames = "output_1"; - var est = new DnnImageFeaturizerEstimator(Env, m => m.ModelSelector.ResNet18(m.Env, m.InputColumn, m.OutputColumn), inputNames, outputNames); + var est = new DnnImageFeaturizerEstimator(Env, m => m.ModelSelector.ResNet18(m.Environment, m.InputColumn, m.OutputColumn), inputNames, outputNames); var transformer = est.Fit(dataView); var result = transformer.Transform(dataView); var resultRoles = new RoleMappedData(result); diff --git a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj index 82f31a0d41..de80970f5a 100644 --- a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj +++ b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj @@ -14,11 +14,11 @@ - + - + From a687ccbd8865d47fa9ea8329c38fe7bb56201bb7 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Mon, 26 Nov 2018 11:56:36 -0800 Subject: [PATCH 46/54] Reorganize model downloading --- ...soft.ML.DnnImageFeaturizer.ModelRedist.proj | 4 ++-- .../Microsoft.ML.OnnxTransformTest.csproj | 18 +++++++----------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj b/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj index 0928e1508b..267603f7d5 100644 --- a/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj +++ b/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj @@ -53,7 +53,7 @@ DestinationDir="$(ModelPlacementDir)\ResNet101Onnx" /> - @@ -62,6 +62,6 @@ + DependsOnTargets="DownloadDnnModelFiles" /> \ No newline at end of file diff --git a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj index de80970f5a..889983025d 100644 --- a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj +++ b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj @@ -14,23 +14,19 @@ - + - + - - - - - + + SourceFiles="@(DnnModelFiles)" + DestinationFolder="@(DnnModelFiles->'%(DestinationDir)')" /> From 52a3e6a7c561f23c96f22825f57917cc20a9187e Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Mon, 26 Nov 2018 12:02:44 -0800 Subject: [PATCH 47/54] Fix test downloading --- .../Microsoft.ML.OnnxTransformTest.csproj | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj index 889983025d..de80970f5a 100644 --- a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj +++ b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj @@ -14,19 +14,23 @@ - + - + + + + + - + + SourceFiles="@(DnnMainModelFiles)" + DestinationFolder="$(OutDir)\DnnImageModels\ResNet18Onnx" /> From 9f566a23394cf3eb5f3e75b68ae4a0eb332abb27 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Mon, 26 Nov 2018 14:12:25 -0800 Subject: [PATCH 48/54] Removed model duplication in NuGets --- .../Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj | 5 +++-- ...icrosoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj | 5 +++-- ...Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj | 5 +++-- ...Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj | 5 +++-- pkg/common/DnnImageFeaturizer.targets | 11 +++++++++++ 5 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 pkg/common/DnnImageFeaturizer.targets diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj index 9757e5f403..8c29700715 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj @@ -10,8 +10,9 @@ - - + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj index 155205ab38..f3492381a1 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj @@ -10,8 +10,9 @@ - - + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj index f367320307..d21ee412df 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj @@ -10,8 +10,9 @@ - - + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj index 4c33a738a1..4f1c2b6220 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj @@ -10,8 +10,9 @@ - - + + + diff --git a/pkg/common/DnnImageFeaturizer.targets b/pkg/common/DnnImageFeaturizer.targets new file mode 100644 index 0000000000..a8a9a950f5 --- /dev/null +++ b/pkg/common/DnnImageFeaturizer.targets @@ -0,0 +1,11 @@ + + + + + %(RecursiveDir)%(Filename)%(Extension) + false + PreserveNewest + PreserveNewest + + + \ No newline at end of file From d33eb069bfd52aa6377c6a0b8b420461c5d55ab0 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Mon, 26 Nov 2018 14:44:56 -0800 Subject: [PATCH 49/54] Updated targets location --- .../Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj | 2 +- .../Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj | 2 +- .../Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj | 2 +- .../Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj index 8c29700715..f23b8ce9bd 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj @@ -12,7 +12,7 @@ - + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj index f3492381a1..64f8878071 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj @@ -12,7 +12,7 @@ - + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj index d21ee412df..5f5b80152d 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj @@ -12,7 +12,7 @@ - + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj index 4f1c2b6220..ac27c756c2 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj @@ -12,7 +12,7 @@ - + From 3e4db4461e9ade0c405fd68d3bb4528191241f42 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Mon, 26 Nov 2018 15:58:41 -0800 Subject: [PATCH 50/54] Fixed issues with target content inclusion --- .../Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj | 6 +++--- .../Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj | 6 +++--- .../Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj | 6 +++--- .../Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj | 6 +++--- pkg/common/DnnImageFeaturizer.targets | 5 ++--- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj index f23b8ce9bd..0e617f6a20 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj index 64f8878071..6a7b1797ab 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj index 5f5b80152d..b8222a0141 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj index ac27c756c2..0d6a31efd0 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/pkg/common/DnnImageFeaturizer.targets b/pkg/common/DnnImageFeaturizer.targets index a8a9a950f5..cf1f9121ce 100644 --- a/pkg/common/DnnImageFeaturizer.targets +++ b/pkg/common/DnnImageFeaturizer.targets @@ -1,9 +1,8 @@ - - %(RecursiveDir)%(Filename)%(Extension) - false + + DnnImageModels\%(RecursiveDir)%(Filename)%(Extension) PreserveNewest PreserveNewest From 5fbd41d74c0c585308c0823926b141023765fb09 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Tue, 27 Nov 2018 09:12:55 -0800 Subject: [PATCH 51/54] Change targets file to be consistent --- .../Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj | 6 +++--- .../Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj | 6 +++--- .../Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj | 6 +++--- .../Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj | 6 +++--- ...{DnnImageFeaturizer.targets => DnnImageFeaturizer.props} | 3 +-- 5 files changed, 13 insertions(+), 14 deletions(-) rename pkg/common/{DnnImageFeaturizer.targets => DnnImageFeaturizer.props} (81%) diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj index 0e617f6a20..b48522f99b 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj index 6a7b1797ab..cb30ee1529 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj index b8222a0141..7ff9ef7d30 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj index 0d6a31efd0..7298d4c563 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/pkg/common/DnnImageFeaturizer.targets b/pkg/common/DnnImageFeaturizer.props similarity index 81% rename from pkg/common/DnnImageFeaturizer.targets rename to pkg/common/DnnImageFeaturizer.props index cf1f9121ce..dfa55fba0d 100644 --- a/pkg/common/DnnImageFeaturizer.targets +++ b/pkg/common/DnnImageFeaturizer.props @@ -1,10 +1,9 @@ - + DnnImageModels\%(RecursiveDir)%(Filename)%(Extension) PreserveNewest - PreserveNewest \ No newline at end of file From bdc9f6005d80dd91e793ace4c4a167aa9d7c71d3 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Tue, 27 Nov 2018 09:21:06 -0800 Subject: [PATCH 52/54] Fix bug due to targets --- .../Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj | 2 +- .../Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj | 2 +- .../Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj | 2 +- .../Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj index b48522f99b..a19ff5245c 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.AlexNet/Microsoft.ML.DnnImageFeaturizer.AlexNet.nupkgproj @@ -12,7 +12,7 @@ - + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj index cb30ee1529..58714cd0e3 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet101/Microsoft.ML.DnnImageFeaturizer.ResNet101.nupkgproj @@ -12,7 +12,7 @@ - + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj index 7ff9ef7d30..1d5b96fb0d 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet18/Microsoft.ML.DnnImageFeaturizer.ResNet18.nupkgproj @@ -12,7 +12,7 @@ - + diff --git a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj index 7298d4c563..e9d6025592 100644 --- a/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj +++ b/pkg/Microsoft.ML.DnnImageFeaturizer.ResNet50/Microsoft.ML.DnnImageFeaturizer.ResNet50.nupkgproj @@ -12,7 +12,7 @@ - + From 8effaf9100d7a5b30e9a85cc791cc480f4bbd7f5 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Tue, 27 Nov 2018 09:32:29 -0800 Subject: [PATCH 53/54] Simplify model copy in tests --- .../Microsoft.ML.OnnxTransformTest.csproj | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj index de80970f5a..37df5ac124 100644 --- a/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj +++ b/test/Microsoft.ML.OnnxTransformTest/Microsoft.ML.OnnxTransformTest.csproj @@ -14,23 +14,17 @@ - + + DnnImageModels\ResNetPrepOnnx\ResNetPreprocess.onnx + PreserveNewest + - + + DnnImageModels\ResNet18Onnx\ResNet18.onnx + PreserveNewest + - - - - - - - - From b27ebe27018987d1040d64380a821322a0844f76 Mon Sep 17 00:00:00 2001 From: vaeksare <42353187+vaeksare@users.noreply.github.com> Date: Tue, 27 Nov 2018 10:13:25 -0800 Subject: [PATCH 54/54] Address minor comment --- pkg/common/DnnImageFeaturizer.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/DnnImageFeaturizer.props b/pkg/common/DnnImageFeaturizer.props index dfa55fba0d..b8b445eebe 100644 --- a/pkg/common/DnnImageFeaturizer.props +++ b/pkg/common/DnnImageFeaturizer.props @@ -1,5 +1,5 @@ - + DnnImageModels\%(RecursiveDir)%(Filename)%(Extension)